vite在线查看+资源全备份
This commit is contained in:
1 parent
11ded99daa
commit
d04757c5ed
737 files changed
+335075
-1
No files matched your search
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
|
||||
else
|
||||
exec node "$basedir/../acorn/bin/acorn" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@"
|
||||
else
|
||||
exec node "$basedir/../esbuild/bin/esbuild" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
else
|
||||
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@"
|
||||
else
|
||||
exec node "$basedir/../rollup/dist/bin/rollup" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../terser/bin/terser" "$@"
|
||||
else
|
||||
exec node "$basedir/../terser/bin/terser" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\terser\bin\terser" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../terser/bin/terser" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../terser/bin/terser" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../vite/bin/vite.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vite\bin\vite.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+627
@@ -0,0 +1,627 @@
|
||||
{
|
||||
"name": "nodecrypt",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@dicebear/core": {
|
||||
"version": "9.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/@dicebear/core/-/core-9.2.2.tgz",
|
||||
"integrity": "sha512-ROhgHG249dPtcXgBHcqPEsDeAPRPRD/9d+tZCjLYyueO+cXDlIA8dUlxpwIVcOuZFvCyW6RJtqo8BhNAi16pIQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.11"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@dicebear/micah": {
|
||||
"version": "9.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/@dicebear/micah/-/micah-9.2.2.tgz",
|
||||
"integrity": "sha512-NCajcJV5yw8uMKiACp694w1T/UyYme2CUEzyTzWHgWnQ+drAuCcH8gpAoLWd67viNdQB/MTpNlaelUgTjmI4AQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dicebear/core": "^9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.25.4",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz",
|
||||
"integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/gen-mapping": {
|
||||
"version": "0.3.8",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
|
||||
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/set-array": "^1.2.1",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10",
|
||||
"@jridgewell/trace-mapping": "^0.3.24"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/resolve-uri": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/set-array": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz",
|
||||
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/source-map": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.6.tgz",
|
||||
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/gen-mapping": "^0.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.25"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
|
||||
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.25",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
|
||||
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.1.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.40.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.2.tgz",
|
||||
"integrity": "sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
|
||||
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.15",
|
||||
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.14.1",
|
||||
"resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.1.tgz",
|
||||
"integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/aes-js": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/aes-js/-/aes-js-3.1.2.tgz",
|
||||
"integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bn.js": {
|
||||
"version": "4.12.2",
|
||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
|
||||
"integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/brorand": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
|
||||
"integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/buffer": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-6.0.3.tgz",
|
||||
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer-from": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
"version": "6.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/elliptic/-/elliptic-6.6.1.tgz",
|
||||
"integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bn.js": "^4.11.9",
|
||||
"brorand": "^1.1.0",
|
||||
"hash.js": "^1.0.0",
|
||||
"hmac-drbg": "^1.0.1",
|
||||
"inherits": "^2.0.4",
|
||||
"minimalistic-assert": "^1.0.1",
|
||||
"minimalistic-crypto-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-picker-element": {
|
||||
"version": "1.26.3",
|
||||
"resolved": "https://registry.npmmirror.com/emoji-picker-element/-/emoji-picker-element-1.26.3.tgz",
|
||||
"integrity": "sha512-fOMG44d/3OqTe1pPqlu5H4ZtWg7gK4Le6Bt24JTKtDyce5+EO3Mo8WA95cKHbPSsSsg7ehM12M1x3Y6U6fgvTQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.25.4",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz",
|
||||
"integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.25.4",
|
||||
"@esbuild/android-arm": "0.25.4",
|
||||
"@esbuild/android-arm64": "0.25.4",
|
||||
"@esbuild/android-x64": "0.25.4",
|
||||
"@esbuild/darwin-arm64": "0.25.4",
|
||||
"@esbuild/darwin-x64": "0.25.4",
|
||||
"@esbuild/freebsd-arm64": "0.25.4",
|
||||
"@esbuild/freebsd-x64": "0.25.4",
|
||||
"@esbuild/linux-arm": "0.25.4",
|
||||
"@esbuild/linux-arm64": "0.25.4",
|
||||
"@esbuild/linux-ia32": "0.25.4",
|
||||
"@esbuild/linux-loong64": "0.25.4",
|
||||
"@esbuild/linux-mips64el": "0.25.4",
|
||||
"@esbuild/linux-ppc64": "0.25.4",
|
||||
"@esbuild/linux-riscv64": "0.25.4",
|
||||
"@esbuild/linux-s390x": "0.25.4",
|
||||
"@esbuild/linux-x64": "0.25.4",
|
||||
"@esbuild/netbsd-arm64": "0.25.4",
|
||||
"@esbuild/netbsd-x64": "0.25.4",
|
||||
"@esbuild/openbsd-arm64": "0.25.4",
|
||||
"@esbuild/openbsd-x64": "0.25.4",
|
||||
"@esbuild/sunos-x64": "0.25.4",
|
||||
"@esbuild/win32-arm64": "0.25.4",
|
||||
"@esbuild/win32-ia32": "0.25.4",
|
||||
"@esbuild/win32-x64": "0.25.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fdir": {
|
||||
"version": "6.4.4",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz",
|
||||
"integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"picomatch": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/hash.js": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
|
||||
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"minimalistic-assert": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
"integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"hash.js": "^1.0.3",
|
||||
"minimalistic-assert": "^1.0.0",
|
||||
"minimalistic-crypto-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/js-chacha20": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/js-chacha20/-/js-chacha20-1.1.0.tgz",
|
||||
"integrity": "sha512-ML5/rujYI/iYydrkIdf+JtUyjmiTWd4UgxNkEmIQ/rltgHzgtzlYJnnMETxPTFGnivEWynZca4YXUoZlxVtjqA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/js-sha256": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmmirror.com/js-sha256/-/js-sha256-0.11.0.tgz",
|
||||
"integrity": "sha512-6xNlKayMZvds9h1Y1VWc0fQHQ82BxTXizWPEtEeGvmOUYpBRy4gbWroHLpzowe6xiQhHpelCQiE7HEdznyBL9Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/minimalistic-assert": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
|
||||
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/minimalistic-crypto-utils": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
||||
"integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.11",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
|
||||
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.3",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
|
||||
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.8",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.40.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.2.tgz",
|
||||
"integrity": "sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.7"
|
||||
},
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0",
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.40.2",
|
||||
"@rollup/rollup-android-arm64": "4.40.2",
|
||||
"@rollup/rollup-darwin-arm64": "4.40.2",
|
||||
"@rollup/rollup-darwin-x64": "4.40.2",
|
||||
"@rollup/rollup-freebsd-arm64": "4.40.2",
|
||||
"@rollup/rollup-freebsd-x64": "4.40.2",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.40.2",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.40.2",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.40.2",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.40.2",
|
||||
"@rollup/rollup-linux-loongarch64-gnu": "4.40.2",
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.40.2",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.40.2",
|
||||
"@rollup/rollup-linux-riscv64-musl": "4.40.2",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.40.2",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.40.2",
|
||||
"@rollup/rollup-linux-x64-musl": "4.40.2",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.40.2",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.40.2",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.40.2",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-support": {
|
||||
"version": "0.5.21",
|
||||
"resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.39.2",
|
||||
"resolved": "https://registry.npmmirror.com/terser/-/terser-5.39.2.tgz",
|
||||
"integrity": "sha512-yEPUmWve+VA78bI71BW70Dh0TuV4HHd+I5SHOAfS1+QBOmvmCiiffgjR8ryyEd3KIfvPGFqoADt8LdQ6XpXIvg==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
"acorn": "^8.14.0",
|
||||
"commander": "^2.20.0",
|
||||
"source-map-support": "~0.5.20"
|
||||
},
|
||||
"bin": {
|
||||
"terser": "bin/terser"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby": {
|
||||
"version": "0.2.13",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz",
|
||||
"integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fdir": "^6.4.4",
|
||||
"picomatch": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "6.3.5",
|
||||
"resolved": "https://registry.npmmirror.com/vite/-/vite-6.3.5.tgz",
|
||||
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
"picomatch": "^4.0.2",
|
||||
"postcss": "^8.5.3",
|
||||
"rollup": "^4.34.9",
|
||||
"tinyglobby": "^0.2.13"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/vitejs/vite?sponsor=1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
|
||||
"jiti": ">=1.21.0",
|
||||
"less": "*",
|
||||
"lightningcss": "^1.21.0",
|
||||
"sass": "*",
|
||||
"sass-embedded": "*",
|
||||
"stylus": "*",
|
||||
"sugarss": "*",
|
||||
"terser": "^5.16.0",
|
||||
"tsx": "^4.8.1",
|
||||
"yaml": "^2.4.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/node": {
|
||||
"optional": true
|
||||
},
|
||||
"jiti": {
|
||||
"optional": true
|
||||
},
|
||||
"less": {
|
||||
"optional": true
|
||||
},
|
||||
"lightningcss": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"sass-embedded": {
|
||||
"optional": true
|
||||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
"sugarss": {
|
||||
"optional": true
|
||||
},
|
||||
"terser": {
|
||||
"optional": true
|
||||
},
|
||||
"tsx": {
|
||||
"optional": true
|
||||
},
|
||||
"yaml": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import {
|
||||
createAvatar,
|
||||
escape_exports,
|
||||
license_exports,
|
||||
schema
|
||||
} from "./chunk-7H7TNGCE.js";
|
||||
import "./chunk-HKJ2B2AA.js";
|
||||
export {
|
||||
createAvatar,
|
||||
escape_exports as escape,
|
||||
license_exports as license,
|
||||
schema
|
||||
};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
+677
@@ -0,0 +1,677 @@
|
||||
import {
|
||||
escape_exports
|
||||
} from "./chunk-7H7TNGCE.js";
|
||||
import {
|
||||
__export
|
||||
} from "./chunk-HKJ2B2AA.js";
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/index.js
|
||||
var components_exports = {};
|
||||
__export(components_exports, {
|
||||
base: () => base,
|
||||
earrings: () => earrings,
|
||||
ears: () => ears,
|
||||
eyebrows: () => eyebrows,
|
||||
eyes: () => eyes,
|
||||
facialHair: () => facialHair,
|
||||
glasses: () => glasses,
|
||||
hair: () => hair,
|
||||
mouth: () => mouth,
|
||||
nose: () => nose,
|
||||
shirt: () => shirt
|
||||
});
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/base.js
|
||||
var base = {
|
||||
"standard": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<path d="M154 319.5c-14.4-20-25.67-58.67-27-78L58.5 212 30 319.5h124Z" fill="${escape_exports.xml(`${colors.base}`)}" stroke="#000" stroke-width="4"/><path d="M130.37 263.69c-2.1.2-4.22.31-6.37.31-30.78 0-56.05-21.57-58.76-49.1L127 241.5c.38 5.48 1.55 13.32 3.37 22.19Z" fill="#000" style="mix-blend-mode:multiply"/><path d="M181.94 151.37v.01l.1.4.14.65A75.72 75.72 0 0 1 34.93 187.7l-.2-.74L18 117.13l-.06-.29A75.72 75.72 0 0 1 165.2 81.55l.05.21.02.08.05.2.05.2v.01l16.4 68.44.08.34.08.34Z" fill="${escape_exports.xml(`${colors.base}`)}" stroke="#000" stroke-width="4"/><g transform="translate(34 102.3)">${(_b = (_a = components.facialHair) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/mouth.js
|
||||
var mouth = {
|
||||
"surprised": (components, colors) => `<path d="M36.37 56.66c12.1-2.2 18.75-15.38 16.42-28.23C50.47 15.6 39.63 5.57 27.52 7.76 15.4 9.95 8.77 23.13 11.09 35.98c2.33 12.85 13.17 22.87 25.28 20.68Z" fill="${escape_exports.xml(`${colors.mouth}`)}"/><path d="M17.14 42.66c2.78-5.21 8.14-9.25 14.8-10.45 6.66-1.2 13.1.7 17.53 4.6-1.09 8.3-6.37 15-13.74 16.33-7.37 1.33-14.67-3.1-18.6-10.47Z" fill="#FC909F"/>`,
|
||||
"laughing": (components, colors) => `<path d="M64.73 25.7a36 36 0 0 0 1.18-12.54 4.98 4.98 0 0 0-6.8-4.2c-4.26 1.67-18.03 6.88-27.62 8.2-10.52 1.44-26.66-.32-31.44-.91a4.98 4.98 0 0 0-5.53 5.74 36 36 0 0 0 70.21 3.7Z" fill="${escape_exports.xml(`${colors.mouth}`)}"/><path d="M51.83 39.55a32 32 0 0 1-37.2 4.62 21.5 21.5 0 0 1 37.2-4.62Z" fill="#FC909F"/>`,
|
||||
"nervous": (components, colors) => `<path d="M68.42 31.57 67.4 17a8.06 8.06 0 0 0-9.74-7.3c-6.95 1.49-20.1 4.1-29.54 4.76-9.43.66-22.82-.1-29.9-.6a8.06 8.06 0 0 0-8.63 8.58L-9.4 37a8.06 8.06 0 0 0 9.73 7.3c6.95-1.48 20.1-4.1 29.54-4.76 9.44-.66 22.82.1 29.91.61a8.06 8.06 0 0 0 8.63-8.58Z" fill="${escape_exports.xml(`${colors.mouth}`)}"/><path d="m-.25 17.97 1.6 6.07a6 6 0 0 0 6.22 4.46 6 6 0 0 0-5.54 5.28l-.74 6.23c7.28-1.52 19.34-3.83 28.3-4.46 8.98-.63 21.24-.02 28.66.48l-1.6-6.07a6 6 0 0 0-6.21-4.46 6 6 0 0 0 5.54-5.28l.73-6.24c-7.27 1.53-19.33 3.84-28.3 4.47-8.97.62-21.23.01-28.65-.48Z" fill="#fff"/>`,
|
||||
"smile": (components, colors) => `<path d="M-.5 17.5c2.5 17 31 25 57 5.5" stroke="${escape_exports.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
"sad": (components, colors) => `<path d="M13 46c1.72-7.96 8.07-24.77 19.77-28.35 11.7-3.58 17.7 8.46 19.23 14.92" stroke="${escape_exports.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
"pucker": (components, colors) => `<path d="M26 16.7c4.17-2.34 21-5.3 21 1.5 0 8.5-11.5 8-11.5 8s13.04-3.16 10.5 6c-2.5 9-9.5 5.5-11.5 4.5" stroke="${escape_exports.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
"frown": (components, colors) => `<path d="M-5 41c3.21-7.96 15.1-24.77 37-28.35 21.9-3.58 33.13 8.46 36 14.92" stroke="${escape_exports.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
"smirk": (components, colors) => `<path d="M10 24.16c4.94 6.45 12.43 13.6 23.98 11.96 11.55-1.62 16.68-9.6 15.17-16.04" stroke="${escape_exports.xml(`${colors.mouth}`)}" stroke-width="4"/>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/eyebrows.js
|
||||
var eyebrows = {
|
||||
"up": (components, colors) => `<path d="M99 10.21c5.67-2.66 19-5.1 27 6.5M23.58 35.52c2.07-5.9 9.68-17.12 23.56-14.7" stroke="${escape_exports.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`,
|
||||
"down": (components, colors) => `<path d="M27 26.5c6.17 2.5 21.1 3 31.5-15M94 4c5.17 5.33 18.1 12.8 28.5 0" stroke="${escape_exports.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`,
|
||||
"eyelashesUp": (components, colors) => `<path d="M99 10.21c5.67-2.66 19-5.1 27 6.5M23.58 35.52c2.07-5.9 9.68-17.12 23.56-14.7M26.07 29.46l-6.14-5.43M122.96 11.16l6.15-5.43M32.52 23.81l-4.04-7.13M115.51 7.51l4.05-7.13M40.6 20.2l-2.2-7.9M106.44 6.9l2.2-7.9" stroke="${escape_exports.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`,
|
||||
"eyelashesDown": (components, colors) => `<path d="M27 26.5c6.17 2.5 21.1 3 31.5-15M94 4c5.17 5.33 18.1 12.8 28.5 0M37.15 26.46 31 21.03M116.22 9.44l1.78-8M45.6 22.81l-4.05-7.13M108.14 9.02l.94-8.15M52.67 17.2l-2.2-7.9M100 8.03l-.78-8.16" stroke="${escape_exports.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/hair.js
|
||||
var hair = {
|
||||
"fonze": (components, colors) => `<path d="M210.18 49.4c-1.27 6.05-4.6 11.32-9.43 15.9 9.4 34.06 9.6 53.87 4.38 57.65l-14.8-49.99C158.4 91.7 98.65 94.9 83.69 94.9c-1.55.17-3.02.4-4.43.67-14.65 9-2.6 52.12 11.75 70.43l-11 2c-5.14-24.97-17.41-22.92-26.61-21.38l-.32.05c2.2 13.63 6.72 27.74 10.45 39.32.95 2.99 1.86 5.8 2.66 8.4-.79.1-1.48.3-2.12.47-5.5 1.53-7.41 2.06-33.38-61.97-6.47-15.95-6.03-30.16-.97-42.62-4.78-4.8-14.37-7.14-19.71-7.78 10.44-6.12 20.58-4.87 25.54-3.1.5-.75 1.02-1.49 1.56-2.22-.97-4.41-7.96-9.46-12.11-11.82 8.55-4.3 18.6-2.03 22.98-.2C67.63 47.13 97.03 35.05 122 29 170.81 17.17 189.5.5 189.5.5c20.68 8.5 25.62 25.22 20.68 48.9Z" fill="${escape_exports.xml(`${colors.hair}`)}" stroke="#000" stroke-width="4"/>`,
|
||||
"mrT": (components, colors) => `<g fill="${escape_exports.xml(`${colors.hair}`)}"><path opacity=".1" d="M187.99 77.18c-8-6.4-21.84-7-27.5-6.5l-8-26.5c13.6 3.2 32 24 35.5 33Z"/><path d="M85.8 11.76S91.52 7.8 115.74 1.7c24.21-6.1 33.04-3.72 33.04-3.72l11.8 72.84s-8.05-.18-28.04 4.19c-20 4.38-29.56 9.67-29.56 9.67l-17.2-72.9Z"/><path d="M48.99 86.68c-6.8-41.6 23.33-68.17 37-75.5l16.98 73.5c-19.2-39.6-45.33-15.17-54 2Z"/><path opacity=".1" d="M67.49 130.68c-7.2-27.2 22-41.84 35.5-46-7-16.34-23-31-42.5-13-18 30.5-11 54-5.5 72l12.5-13Z"/></g>`,
|
||||
"dougFunny": (components, colors) => `<path d="M140 56c14.67-.67 40.4-8.8 26-36M114 54c14.67-.67 40.4-8.8 26-36M78 65c14.67-.67 40.4-8.8 26-36" stroke="${escape_exports.xml(`${colors.hair}`)}" stroke-width="4"/>`,
|
||||
"mrClean": (components, colors) => `<ellipse cx="147.85" cy="58.18" rx="6.86" ry="18.44" transform="rotate(117 147.85 58.18)" fill="#FCFDFF"/>`,
|
||||
"dannyPhantom": (components, colors) => `<path d="M123.79 17.49H123.94a96.78 96.78 0 0 1 62.07 24.36c14.06 12.4 22.45 26.87 25.19 36.73-4.06 2.32-11.01 4.31-19.88 5.95-9.68 1.78-21.3 3.08-33.15 4.01-23.7 1.86-48.2 2.2-59.63 1.96l-6.07-.13 4.8 3.71c2.5 1.93 5.83 3.28 9.34 4.22 3.55.95 7.42 1.54 11.14 1.87 3.82.34 7.55.42 10.64.34-10.59 8.16-24.06 14.44-37.35 19.09a225.88 225.88 0 0 1-39.83 9.92l-2.15.32.5 2.11c3.34 14.43 9.5 39.65 13.62 56.57 1.83 7.5 3.26 13.38 3.87 15.94 1.09 4.56 4.5 11.05 8.4 17.03 3.6 5.52 7.78 10.89 11.32 14.2l-7.84 31.81H49.37c8.34-12.71 10.1-27.4 8.4-42.98-1.84-16.87-7.76-35-14-53.17l-1.85-5.36c-5.69-16.46-11.36-32.88-14.43-48.6-3.4-17.44-3.56-33.75 2.83-48.09 10.34-23.21 28.66-36.7 47-44.12 18.37-7.45 36.61-8.76 46.46-7.71Z" fill="${escape_exports.xml(`${colors.hair}`)}" stroke="#000" stroke-width="4"/>`,
|
||||
"full": (components, colors) => `<path d="m-13.4 312.86-.62-1.64c-.56-1.55-1.35-3.84-2.23-6.74a163.21 163.21 0 0 1-5.28-23.98c-2.81-19.77-2.8-45.8 8.4-71.12 1.8-4.09 4.07-8.3 6.52-12.85 9.47-17.6 21.77-40.46 21.77-82.45 0-30.59 14.84-56.35 36.7-74.51 21.88-18.18 50.7-28.66 78.38-28.66 15.13 0 27.3 1.73 37.07 7.64 9.72 5.87 17.37 16.05 23.05 33.58a3.47 3.47 0 0 0 4.36 2.27c11.31-3.67 28.47.04 42.95 9.5 14.42 9.4 25.62 24.15 25.62 41.91 0 15.43-2.64 25.85-5.22 36-3.12 12.3-6.13 24.16-4 43.5.7 6.45 2.15 11.03 4.16 14.82 1.98 3.73 4.48 6.62 7.12 9.66l.05.07c6.28 7.25 9.13 13.22 10.06 18.47.92 5.23-.05 9.98-1.84 14.9-.9 2.48-2 4.97-3.15 7.59l-.1.22c-1.12 2.53-2.3 5.19-3.35 7.98-2.18 5.77-3.89 12.2-3.72 19.83.15 6.48 1.3 10.91 3.01 14.27 1.7 3.32 3.89 5.44 5.8 7.3l.05.05c1.74 1.68 3.2 3.1 4.27 5.1.96 1.78 1.67 4.13 1.79 7.66a172.14 172.14 0 0 1-87.4 23.9 110.86 110.86 0 0 1-7.28-.28c-6.15-9.4-11.75-24.88-16.1-40.8-4.21-15.46-7.18-31.08-8.3-41.4 37.08-10.72 60.32-48.98 54.73-88.46l-.01-.12a5.97 5.97 0 0 0-.08-.47 76.68 76.68 0 0 0-.43-2.25 486.97 486.97 0 0 0-6.53-28.2 276.64 276.64 0 0 0-7.45-24.2c-2.76-7.5-5.83-14.15-9.1-18.24l-.3-.37-.44-.2c-1.93-.83-3.94-1.77-6.03-2.74-9.93-4.62-21.84-10.17-37.26-10.78-18.78-.74-42.56 5.78-74.7 29.09l-2.02 1.46 1.95 1.57c15.92 12.83 19.37 29.86 18.63 44.3a89.2 89.2 0 0 1-5.24 25.1c-1.16-1.69-1.9-3.82-2.45-6.33a85.19 85.19 0 0 1-.96-5.45l-.05-.3c-.3-2-.63-4.08-1.1-6.09-.96-4.01-2.57-8.02-6.14-10.86-3.58-2.84-8.8-4.25-16.4-3.83l-2.22.13.46 2.18 11.36 53.31.02.08.03.09a79.8 79.8 0 0 0 19.91 32.81 65.49 65.49 0 0 1 1.54 2.68c1.01 1.82 2.37 4.38 3.76 7.33 2.82 5.94 5.66 13.24 6.2 19.2.57 6.05-.96 13.86-2.7 20.31a129.63 129.63 0 0 1-2.84 9.14c-5.03-2.4-9.53-2.23-13.38.01-4.16 2.43-7.21 7.06-9.48 12.22-4.15 9.42-6.14 21.64-7.06 29.22A601.65 601.65 0 0 1 6.2 320.1 353.85 353.85 0 0 1-9 314.64a190.8 190.8 0 0 1-4.4-1.77Z" fill="${escape_exports.xml(`${colors.hair}`)}" stroke="#000" stroke-width="3.82"/>`,
|
||||
"turban": (components, colors) => `<g stroke="#000" stroke-width="4"><path d="M222.73 100.8c0-66.1-36.46-110.8-80.87-110.8C84.96-10 27 11.34 27 112.25c0 24.97 10.66 43.58 25.56 57.29a42.88 42.88 0 0 1-3.5-4.92c-2.88-26.98 29.17-47.7 60.54-67.96 16.65-10.75 33.11-21.39 44.05-32.76 9.6 5.43 37.79 28.2 43.16 37.42 2.88 4.94 7.51 21.87 10.67 41.63 10.34-12.42 15.25-24.84 15.25-42.16Z" fill="${escape_exports.xml(`${colors.hair}`)}"/><path d="M154.26 63.25c13.18-11.95 32.89-39.21 31.62-56.92"/></g>`,
|
||||
"pixie": (components, colors) => `<g stroke="#000"><path d="m105.84 88.82 1.88.3v.08l-.04.16-.12.52c-.12.45-.3 1.09-.6 1.9a41.7 41.7 0 0 1-3.4 6.92c-3.17 5.32-8.7 12.66-18.31 21.6 29.97.74 55-8.92 72.82-19.04a156.35 156.35 0 0 0 21.71-14.87 118.43 118.43 0 0 0 7.5-6.7l.1-.1.01-.01 2.29-2.38.93 3.16-1.84.54 1.84-.54v.05l.05.13.15.52a817.06 817.06 0 0 1 2.69 9.28c1.75 6.14 4.14 14.58 6.66 23.77 5.03 18.35 10.6 39.81 12.7 51.97 3.49 20.32-1.91 35.74-5.1 44.87-.63 1.77-1.17 3.3-1.54 4.6.06.04.12.1.22.16.6.42 1.65.91 3.18 1.4 3.02.96 7.32 1.74 11.92 2.19 4.6.44 9.38.53 13.34.14 1.98-.2 3.7-.5 5.08-.92a6.85 6.85 0 0 0 2.58-1.27c.02-.08.03-.29-.02-.68-.1-.78-.4-1.87-.93-3.32-.8-2.15-1.97-4.8-3.35-7.88l-1.46-3.3c-3.93-8.94-8.65-20.56-9.68-32.4-1.15-13.16 1.45-24.42 3.79-34.54l.11-.48c2.39-10.34 4.38-19.32 2.34-28.42-3.1-13.8-7.32-25.3-13.8-33.57-6.42-8.17-15.13-13.27-27.5-14.21l-1.28-.1-.4-1.22c-5.7-17.57-13.38-29.05-23.18-36.17-9.8-7.12-21.96-10.05-36.94-10.05-27.7 0-57.5 10.52-79.88 28.72-22.35 18.18-37.14 43.9-35.2 74.33 2.13 33.6-.3 59.06-5.8 77.72-5 17-12.59 28.46-21.68 35.14 1.19.61 2.78 1.39 4.77 2.27 5.02 2.24 12.59 5.2 22.67 8.03 19.34 5.43 47.95 10.38 85.71 8.89-8.32-7.15-16.72-15.83-23.37-25-7.63-10.53-13.14-21.94-13.3-32.58-.19-12.62.67-45.67.93-52.5.62-15.9 10.82-28.15 20.54-36.3a96.6 96.6 0 0 1 18.96-12.34l.2-.1.13-.06.1-.05h.02v-.01l.8 1.74Zm0 0 1.88.3.56-3.5-3.23 1.46.79 1.74Zm100.23 126.57.03.04-.03-.04Z" fill="${escape_exports.xml(`${colors.hair}`)}" stroke-width="3.82"/><path d="M191 58c.5 4.5-.3 13.5-1.5 19.5" stroke-width="4"/></g>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/eyes.js
|
||||
var eyes = {
|
||||
"eyes": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<g fill="${escape_exports.xml(`${colors.eyes}`)}"><ellipse cx="16.53" cy="29.4" rx="9" ry="13.5" transform="rotate(-6.78 16.53 29.4)"/><ellipse cx="80.53" cy="19.4" rx="9" ry="13.5" transform="rotate(-6.28 80.53 19.4)"/></g><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
},
|
||||
"round": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<g fill="${escape_exports.xml(`${colors.eyes}`)}"><ellipse cx="16.12" cy="28.93" rx="9" ry="10" transform="rotate(-6.78 16.12 28.93)"/><ellipse cx="80.15" cy="18.92" rx="9" ry="10" transform="rotate(-6.28 80.15 18.92)"/></g><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
},
|
||||
"eyesShadow": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<circle cx="15.24" cy="20.24" r="12" transform="rotate(-6.28 15.24 20.24)" fill="${escape_exports.xml(`${colors.eyeShadow}`)}"/><ellipse cx="16.53" cy="29.4" rx="9" ry="13.5" transform="rotate(-6.78 16.53 29.4)" fill="${escape_exports.xml(`${colors.eyes}`)}"/><circle cx="79.02" cy="11.61" r="12" transform="rotate(-6.28 79.02 11.61)" fill="${escape_exports.xml(`${colors.eyeShadow}`)}"/><ellipse cx="80.53" cy="19.4" rx="9" ry="13.5" transform="rotate(-6.28 80.53 19.4)" fill="${escape_exports.xml(`${colors.eyes}`)}"/><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
},
|
||||
"smiling": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<path d="M5.29 34.07c.11.82 1.14 1 1.72.41 2.46-2.52 6.25-4.36 10.65-4.89 2.6-.3 5.1-.12 7.32.48.75.2 1.5-.44 1.23-1.17A10.84 10.84 0 0 0 5.3 34.07ZM69.38 24.07c.12.82 1.15 1 1.73.41 2.44-2.48 6.19-4.3 10.54-4.83 2.56-.3 5.03-.12 7.23.47.75.2 1.5-.44 1.23-1.17a10.74 10.74 0 0 0-20.73 5.12Z" fill="${escape_exports.xml(`${colors.eyes}`)}"/><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
},
|
||||
"smilingShadow": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<path d="M26.47 24.36c1.86 6.36-5.04 1.48-11.4 3.33-6.36 1.86-9.78 9.76-11.64 3.4a12 12 0 0 1 23.04-6.73ZM90.26 15.17c1.64 6.42-4.7 1.52-11.11 3.15-6.43 1.64-10.51 9.19-12.15 2.77a12 12 0 1 1 23.26-5.92Z" fill="${escape_exports.xml(`${colors.eyeShadow}`)}"/><path d="M5.29 34.07c.11.82 1.14 1 1.72.41 2.46-2.52 6.25-4.36 10.65-4.89 2.6-.3 5.1-.12 7.32.48.75.2 1.5-.44 1.23-1.17A10.84 10.84 0 0 0 5.3 34.07ZM69.38 24.07c.12.82 1.15 1 1.73.41 2.44-2.48 6.19-4.3 10.54-4.83 2.56-.3 5.03-.12 7.23.47.75.2 1.5-.44 1.23-1.17a10.74 10.74 0 0 0-20.73 5.12Z" fill="${escape_exports.xml(`${colors.eyes}`)}"/><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/nose.js
|
||||
var nose = {
|
||||
"curve": (components, colors) => `<path d="M16.5 7c-.33 3.83 0 12.2 4 15 5 3.5-.5 12-10.5 10" stroke="#000" stroke-width="4"/>`,
|
||||
"pointed": (components, colors) => `<path d="M16.5 3c0 14 7 25 7 25S20 34 10 32" stroke="#000" stroke-width="4"/>`,
|
||||
"tound": (components, colors) => `<path d="M12.3 12.34c5.45-1.24 14.38.62 12.42 10.54-1.74 8.82-11.1 9.3-13.72 6.82" stroke="#000" stroke-width="4"/>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/ears.js
|
||||
var ears = {
|
||||
"attached": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<path d="M30.5 6.18A23.78 23.78 0 0 0 23.08 5c-10.5 0-19 6.5-18 18.5 1.04 12.5 8.5 17 19 17A19.6 19.6 0 0 0 31 39.23" stroke="#000" stroke-width="8"/><path d="M31.5 39.04a19.38 19.38 0 0 1-7.42 1.46c-10.5 0-17.96-4.5-19-17-1-12 7.5-18.5 18-18.5 3.14 0 6.19.6 8.92 1.73l-.5 32.3Z" fill="${escape_exports.xml(`${colors.base}`)}"/><path d="M27.5 13.5c-4-1.83-12.8-2.8-16 8" stroke="#000" stroke-width="4"/><path d="M17 14c2.17 1.83 6.3 7.5 5.5 15.5" stroke="#000" stroke-width="4"/><g transform="translate(3 35)">${(_b = (_a = components.earrings) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
},
|
||||
"detached": (components, colors) => {
|
||||
var _a, _b;
|
||||
return `<path d="M37 8.25V7.13l-.95-.59A24.91 24.91 0 0 0 23.08 3C17.44 3 12.16 4.75 8.4 8.3c-3.8 3.58-5.86 8.83-5.31 15.37.52 6.37 2.66 11.06 6.2 14.17-.29 1-.37 2.08-.24 3.21a8.98 8.98 0 0 0 4.6 7.08C16.09 49.5 19.2 50 22.52 50c5.48 0 10.29-2.95 13.95-6.89l.53-.57V8.25Z" stroke="#000" stroke-width="4"/><path d="M42.97 23.98c.07-.65.1-1.3.1-1.98 0-10.22-9.5-17-20-17C12.6 5 4.09 11.5 5.09 23.5c.56 6.68 2.95 11.07 6.65 13.72a5.7 5.7 0 0 0-.68 3.6C11.68 46.1 16.19 48 22.52 48c11.1 0 19.9-14.05 20.45-24.02Z" fill="${escape_exports.xml(`${colors.base}`)}"/><path d="M27.5 13.5c-4-1.83-12.8-2.8-16 8" stroke="#000" stroke-width="4"/><path d="M17 14c2.17 1.83 6.3 7.5 5.5 15.5" stroke="#000" stroke-width="4"/><g transform="translate(3 42)">${(_b = (_a = components.earrings) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g>`;
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/shirt.js
|
||||
var shirt = {
|
||||
"open": (components, colors) => `<path d="M260.37 90.86H-12.54l.1-.2C-7.89 81.38.5 64.31 11.4 49.03c6.2-8.67 13.13-16.65 20.54-22.27 7.41-5.61 15.12-8.73 22.95-8.04 15.06 1.31 28.46 9.56 41.93 17.83l3.83 2.35c14.48 8.82 29.35 17.02 45.72 13.43 5.53-1.2 9.26-3.8 11.6-7.16 2.32-3.3 3.15-7.15 3.3-10.66.14-3.52-.4-6.85-.96-9.26a39.89 39.89 0 0 0-.75-2.78c3.63-3.64 7.47-5.77 11.43-6.73 4.3-1.03 8.89-.73 13.72.7 9.73 2.87 20.14 10.25 30.3 19.73 18.61 17.37 35.69 41.14 45.36 54.68Z" fill="${escape_exports.xml(`${colors.shirt}`)}" stroke="#000" stroke-width="4.27"/>`,
|
||||
"crew": (components, colors) => `<g stroke="#000" stroke-width="4"><path d="M260.7 91H-12.64C3.67 61.66 26.86 42.98 64.44 34.4c16.02-3.65 34.67-5.47 56.56-5.47 9.46 0 16.81 1.44 23.8 3.35 2.58.7 5.18 1.5 7.84 2.3 4.4 1.34 8.97 2.72 13.91 3.86l.14.03.15.01c46.12 3.8 73.78 24.3 93.85 52.5Z" fill="${escape_exports.xml(`${colors.shirt}`)}"/><path d="m52.93 36.58 9.15-19.6a1 1 0 0 1 1.25-.51c37.93 13.42 72.43 12.48 104.4 3.57a1 1 0 0 1 1.09.38l13.93 19.05a.98.98 0 0 1-.42 1.5c-33.6 13.2-96.67 10.95-128.91-3.07a.98.98 0 0 1-.49-1.32Z" fill="${escape_exports.xml(`${colors.shirt}`)}"/><path opacity=".75" d="m52.93 36.58 9.15-19.6a1 1 0 0 1 1.25-.51c37.93 13.42 72.43 12.48 104.4 3.57a1 1 0 0 1 1.09.38l13.93 19.05a.98.98 0 0 1-.42 1.5c-33.6 13.2-96.67 10.95-128.91-3.07a.98.98 0 0 1-.49-1.32Z" fill="#fff"/></g>`,
|
||||
"collared": (components, colors) => `<g stroke="#000" stroke-width="4"><path d="M126.77 67.58 128 66l-1.23 1.58 1.72 1.34 1.19-1.83v-.02l.05-.06.04-.05a28.57 28.57 0 0 1 .8-1.18 112.35 112.35 0 0 1 11.5-14.05c3.67-3.78 7.83-7.4 12.13-9.93 4.31-2.53 8.58-3.84 12.53-3.3C209.17 44.2 240.4 63 260.67 91h-273.3c16.3-29.34 39.49-48.02 77.07-56.59 1.6-.36 3.78-.25 6.5.38 2.7.63 5.77 1.73 9.09 3.19 6.62 2.9 14.02 7.16 20.97 11.56a355.78 355.78 0 0 1 25.24 17.63l.4.3.1.08.02.02h.01Z" fill="${escape_exports.xml(`${colors.shirt}`)}"/><path d="m52.61 37.08 5.17-19.23c.2-.78 1.22-1 1.76-.4C74.4 33.7 93.16 33.08 99.4 32.33c.84-.1 1.5.82 1.1 1.58L87.34 58.86c-.2.38-.62.6-1.04.5-3.95-.82-23.62-5.63-33.57-21.5a1 1 0 0 1-.12-.78ZM183.2 36.98 171.61 17.5c-.4-.66-1.37-.65-1.79 0-5.73 8.83-15.63 12.9-19.09 14.1-.62.22-.9.96-.57 1.53l13.5 22.81c.2.34.59.53.97.42 2.13-.61 9.46-3.67 18.54-18.34a1 1 0 0 0 .01-1.04Z" fill="${escape_exports.xml(`${colors.shirt}`)}"/><path d="m52.61 37.08 5.17-19.23c.2-.78 1.22-1 1.76-.4C74.4 33.7 93.16 33.08 99.4 32.33c.84-.1 1.5.82 1.1 1.58L87.34 58.86c-.2.38-.62.6-1.04.5-3.95-.82-23.62-5.63-33.57-21.5a1 1 0 0 1-.12-.78ZM183.2 36.98 171.61 17.5c-.4-.66-1.37-.65-1.79 0-5.73 8.83-15.63 12.9-19.09 14.1-.62.22-.9.96-.57 1.53l13.5 22.81c.2.34.59.53.97.42 2.13-.61 9.46-3.67 18.54-18.34a1 1 0 0 0 .01-1.04Z" fill="#fff" fill-opacity=".75"/><path d="m109.5 54.5-9-21.5-7 15 16 6.5ZM141 53.5l9-21.5 7 15-16 6.5ZM70.5 14l-12 3 10 6.5 2-9.5ZM160 14l11 3-7 6.5-4-9.5Z" fill="#000" stroke-linejoin="round"/></g>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/earrings.js
|
||||
var earrings = {
|
||||
"hoop": (components, colors) => `<path d="M24 0A24 24 0 1 1 0 24c0-6.4 3.5-11.5 6.57-16.5L7.5 6" stroke="${escape_exports.xml(`${colors.earring}`)}" stroke-width="4"/>`,
|
||||
"stud": (components, colors) => `<circle cx="25" cy="2" r="4" fill="${escape_exports.xml(`${colors.earring}`)}"/><circle cx="26" cy="1" r="1" fill="#fff"/>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/glasses.js
|
||||
var glasses = {
|
||||
"round": (components, colors) => `<g stroke="${escape_exports.xml(`${colors.glasses}`)}" stroke-width="4"><circle cx="122.5" cy="28" r="26"/><circle cx="55.5" cy="37" r="26"/><path d="M97.5 35a8 8 0 0 0-16 0M30 39 0 44.5"/></g>`,
|
||||
"square": (components, colors) => `<g stroke="${escape_exports.xml(`${colors.glasses}`)}" stroke-width="4"><path d="M34.5 42.5 0 49.12" stroke-linecap="round"/><path d="M35.47 18.53 74.2 13.1a6 6 0 0 1 6.77 5.1l5.57 39.62a6 6 0 0 1-5.1 6.78l-34.48 4.84a6 6 0 0 1-6.65-4.48l-9.81-39.01a6 6 0 0 1 4.98-7.4ZM145.92 3.22 107.2 8.66a6 6 0 0 0-5.1 6.78l5.56 39.6a6 6 0 0 0 6.78 5.11l34.47-4.84a6 6 0 0 0 5.16-6.14l-1.32-40.2a6 6 0 0 0-6.83-5.75ZM83.5 37.12l22-3.5"/></g>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/components/facialHair.js
|
||||
var facialHair = {
|
||||
"beard": (components, colors) => `<path d="M146.13 49.15A73.74 73.74 0 0 1 27.69 123.4C10.5 107.5 6.5 56 2.7 31.65c14 31.5 49.62 33.94 83.5 28 28.5-5 51.3-6 51.3-45 1.88 2.62 6.97 27.59 8.63 34.5Z" fill="${escape_exports.xml(`${colors.facialHair}`)}"/>`,
|
||||
"scruff": (components, colors) => `<g fill="${escape_exports.xml(`${colors.facialHair}`)}"><path d="M31 109a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM83 116a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM79 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82a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM87 76a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM100 76a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" stroke="#000"/><path d="M113 76a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM139 76a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM61 116a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM72 110a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM68 102a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM92 93a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM43 75a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM80 91a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM80 73a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM115 87a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM115 69a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM122 71a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM137 62a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" stroke="#000"/></g>`
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/utils/pickComponent.js
|
||||
function pickComponent({ prng, group, values = [] }) {
|
||||
const componentCollection = components_exports;
|
||||
const key = prng.pick(values);
|
||||
if (key && componentCollection[group][key]) {
|
||||
return {
|
||||
name: key,
|
||||
value: componentCollection[group][key]
|
||||
};
|
||||
} else {
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/micah/lib/utils/getComponents.js
|
||||
function getComponents({ prng, options }) {
|
||||
const baseComponent = pickComponent({
|
||||
prng,
|
||||
group: "base",
|
||||
values: options.base
|
||||
});
|
||||
const mouthComponent = pickComponent({
|
||||
prng,
|
||||
group: "mouth",
|
||||
values: options.mouth
|
||||
});
|
||||
const eyebrowsComponent = pickComponent({
|
||||
prng,
|
||||
group: "eyebrows",
|
||||
values: options.eyebrows
|
||||
});
|
||||
const hairComponent = pickComponent({
|
||||
prng,
|
||||
group: "hair",
|
||||
values: options.hair
|
||||
});
|
||||
const eyesComponent = pickComponent({
|
||||
prng,
|
||||
group: "eyes",
|
||||
values: options.eyes
|
||||
});
|
||||
const noseComponent = pickComponent({
|
||||
prng,
|
||||
group: "nose",
|
||||
values: options.nose
|
||||
});
|
||||
const earsComponent = pickComponent({
|
||||
prng,
|
||||
group: "ears",
|
||||
values: options.ears
|
||||
});
|
||||
const shirtComponent = pickComponent({
|
||||
prng,
|
||||
group: "shirt",
|
||||
values: options.shirt
|
||||
});
|
||||
const earringsComponent = pickComponent({
|
||||
prng,
|
||||
group: "earrings",
|
||||
values: options.earrings
|
||||
});
|
||||
const glassesComponent = pickComponent({
|
||||
prng,
|
||||
group: "glasses",
|
||||
values: options.glasses
|
||||
});
|
||||
const facialHairComponent = pickComponent({
|
||||
prng,
|
||||
group: "facialHair",
|
||||
values: options.facialHair
|
||||
});
|
||||
return {
|
||||
"base": baseComponent,
|
||||
"mouth": mouthComponent,
|
||||
"eyebrows": eyebrowsComponent,
|
||||
"hair": prng.bool(options.hairProbability) ? hairComponent : void 0,
|
||||
"eyes": eyesComponent,
|
||||
"nose": noseComponent,
|
||||
"ears": earsComponent,
|
||||
"shirt": shirtComponent,
|
||||
"earrings": prng.bool(options.earringsProbability) ? earringsComponent : void 0,
|
||||
"glasses": prng.bool(options.glassesProbability) ? glassesComponent : void 0,
|
||||
"facialHair": prng.bool(options.facialHairProbability) ? facialHairComponent : void 0
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/micah/lib/utils/convertColor.js
|
||||
function convertColor(color) {
|
||||
return "transparent" === color ? color : `#${color}`;
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/micah/lib/utils/getColors.js
|
||||
function getColors({ prng, options }) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
||||
return {
|
||||
"base": convertColor(prng.pick((_a = options.baseColor) !== null && _a !== void 0 ? _a : [], "transparent")),
|
||||
"earring": convertColor(prng.pick((_b = options.earringColor) !== null && _b !== void 0 ? _b : [], "transparent")),
|
||||
"eyeShadow": convertColor(prng.pick((_c = options.eyeShadowColor) !== null && _c !== void 0 ? _c : [], "transparent")),
|
||||
"eyebrows": convertColor(prng.pick((_d = options.eyebrowsColor) !== null && _d !== void 0 ? _d : [], "transparent")),
|
||||
"facialHair": convertColor(prng.pick((_e = options.facialHairColor) !== null && _e !== void 0 ? _e : [], "transparent")),
|
||||
"glasses": convertColor(prng.pick((_f = options.glassesColor) !== null && _f !== void 0 ? _f : [], "transparent")),
|
||||
"hair": convertColor(prng.pick((_g = options.hairColor) !== null && _g !== void 0 ? _g : [], "transparent")),
|
||||
"mouth": convertColor(prng.pick((_h = options.mouthColor) !== null && _h !== void 0 ? _h : [], "transparent")),
|
||||
"shirt": convertColor(prng.pick((_j = options.shirtColor) !== null && _j !== void 0 ? _j : [], "transparent")),
|
||||
"eyes": convertColor(prng.pick((_k = options.eyesColor) !== null && _k !== void 0 ? _k : [], "transparent"))
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/micah/lib/hooks/onPreCreate.js
|
||||
function onPreCreate({ prng, options }) {
|
||||
var _a;
|
||||
options.baseColor = options.baseColor && options.baseColor.length > 0 ? [prng.pick(options.baseColor, "transparent")] : [];
|
||||
for (const colorName of ["eyebrows", "hair", "eyes", "nose", "ears", "shirt", "earrings", "glasses", "facialHair"]) {
|
||||
const colorOption = (_a = options[`${colorName}Color`]) !== null && _a !== void 0 ? _a : [];
|
||||
const index = colorOption.indexOf(options.baseColor[0]);
|
||||
if (colorOption.length > 1 && index > -1) {
|
||||
colorOption.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/micah/lib/hooks/onPostCreate.js
|
||||
function onPostCreate({ prng, options, components, colors }) {
|
||||
var _a;
|
||||
if (((_a = components.facialHair) === null || _a === void 0 ? void 0 : _a.name) === "beard" && colors.facialHair === colors.mouth) {
|
||||
colors.mouth = "#ffffff33";
|
||||
}
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/micah/lib/schema.js
|
||||
var schema = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"base": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"standard"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"standard"
|
||||
]
|
||||
},
|
||||
"baseColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"ac6651",
|
||||
"77311d"
|
||||
]
|
||||
},
|
||||
"earringColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"earrings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"hoop",
|
||||
"stud"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"hoop",
|
||||
"stud"
|
||||
]
|
||||
},
|
||||
"earringsProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 30
|
||||
},
|
||||
"ears": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"attached",
|
||||
"detached"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"attached",
|
||||
"detached"
|
||||
]
|
||||
},
|
||||
"eyeShadowColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"d2eff3",
|
||||
"e0ddff",
|
||||
"ffeba4",
|
||||
"ffedef",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"eyebrows": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"up",
|
||||
"down",
|
||||
"eyelashesUp",
|
||||
"eyelashesDown"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"up",
|
||||
"down",
|
||||
"eyelashesUp",
|
||||
"eyelashesDown"
|
||||
]
|
||||
},
|
||||
"eyebrowsColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"eyes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"eyes",
|
||||
"round",
|
||||
"eyesShadow",
|
||||
"smiling",
|
||||
"smilingShadow"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"eyes",
|
||||
"round",
|
||||
"eyesShadow",
|
||||
"smiling",
|
||||
"smilingShadow"
|
||||
]
|
||||
},
|
||||
"eyesColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"facialHair": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"beard",
|
||||
"scruff"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"beard",
|
||||
"scruff"
|
||||
]
|
||||
},
|
||||
"facialHairColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"facialHairProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 10
|
||||
},
|
||||
"glasses": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"round",
|
||||
"square"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"round",
|
||||
"square"
|
||||
]
|
||||
},
|
||||
"glassesColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"glassesProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 30
|
||||
},
|
||||
"hair": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"fonze",
|
||||
"mrT",
|
||||
"dougFunny",
|
||||
"mrClean",
|
||||
"dannyPhantom",
|
||||
"full",
|
||||
"turban",
|
||||
"pixie"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"fonze",
|
||||
"mrT",
|
||||
"dougFunny",
|
||||
"mrClean",
|
||||
"dannyPhantom",
|
||||
"full",
|
||||
"turban",
|
||||
"pixie"
|
||||
]
|
||||
},
|
||||
"hairColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"hairProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 100
|
||||
},
|
||||
"mouth": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"surprised",
|
||||
"laughing",
|
||||
"nervous",
|
||||
"smile",
|
||||
"sad",
|
||||
"pucker",
|
||||
"frown",
|
||||
"smirk"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"surprised",
|
||||
"laughing",
|
||||
"nervous",
|
||||
"smile",
|
||||
"sad",
|
||||
"pucker",
|
||||
"frown",
|
||||
"smirk"
|
||||
]
|
||||
},
|
||||
"mouthColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"nose": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"curve",
|
||||
"pointed",
|
||||
"tound"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"curve",
|
||||
"pointed",
|
||||
"tound"
|
||||
]
|
||||
},
|
||||
"shirt": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"open",
|
||||
"crew",
|
||||
"collared"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"open",
|
||||
"crew",
|
||||
"collared"
|
||||
]
|
||||
},
|
||||
"shirtColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/micah/lib/index.js
|
||||
var meta = {
|
||||
title: "Avatar Illustration System",
|
||||
creator: "Micah Lanier",
|
||||
source: "https://www.figma.com/community/file/829741575478342595",
|
||||
homepage: "https://dribbble.com/micahlanier",
|
||||
license: {
|
||||
name: "CC BY 4.0",
|
||||
url: "https://creativecommons.org/licenses/by/4.0/"
|
||||
}
|
||||
};
|
||||
var create = ({ prng, options }) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
||||
onPreCreate({ prng, options });
|
||||
const components = getComponents({ prng, options });
|
||||
const colors = getColors({ prng, options });
|
||||
onPostCreate({ prng, options, components, colors });
|
||||
return {
|
||||
attributes: {
|
||||
viewBox: "0 0 360 360",
|
||||
fill: "none",
|
||||
"shape-rendering": "auto"
|
||||
},
|
||||
body: `<g transform="translate(80 23)">${(_b = (_a = components.base) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ""}</g><g transform="translate(170 183)">${(_d = (_c = components.mouth) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ""}</g><g transform="translate(110 102)">${(_f = (_e = components.eyebrows) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ""}</g><g transform="translate(49 11)">${(_h = (_g = components.hair) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ""}</g><g transform="translate(142 119)">${(_k = (_j = components.eyes) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ""}</g><g transform="rotate(-8 1149.44 -1186.92)">${(_m = (_l = components.nose) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ""}</g><g transform="translate(84 154)">${(_p = (_o = components.ears) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ""}</g><g transform="translate(53 272)">${(_r = (_q = components.shirt) === null || _q === void 0 ? void 0 : _q.value(components, colors)) !== null && _r !== void 0 ? _r : ""}</g>`,
|
||||
extra: () => ({
|
||||
...Object.entries(components).reduce((acc, [key, value]) => {
|
||||
acc[key] = value === null || value === void 0 ? void 0 : value.name;
|
||||
return acc;
|
||||
}, {}),
|
||||
...Object.entries(colors).reduce((acc, [key, value]) => {
|
||||
acc[`${key}Color`] = value;
|
||||
return acc;
|
||||
}, {})
|
||||
})
|
||||
};
|
||||
};
|
||||
export {
|
||||
create,
|
||||
meta,
|
||||
schema
|
||||
};
|
||||
//# sourceMappingURL=@dicebear_micah.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@dicebear/micah/lib/components/index.js", "../../@dicebear/micah/lib/components/base.js", "../../@dicebear/micah/lib/components/mouth.js", "../../@dicebear/micah/lib/components/eyebrows.js", "../../@dicebear/micah/lib/components/hair.js", "../../@dicebear/micah/lib/components/eyes.js", "../../@dicebear/micah/lib/components/nose.js", "../../@dicebear/micah/lib/components/ears.js", "../../@dicebear/micah/lib/components/shirt.js", "../../@dicebear/micah/lib/components/earrings.js", "../../@dicebear/micah/lib/components/glasses.js", "../../@dicebear/micah/lib/components/facialHair.js", "../../@dicebear/micah/lib/utils/pickComponent.js", "../../@dicebear/micah/lib/utils/getComponents.js", "../../@dicebear/micah/lib/utils/convertColor.js", "../../@dicebear/micah/lib/utils/getColors.js", "../../@dicebear/micah/lib/hooks/onPreCreate.js", "../../@dicebear/micah/lib/hooks/onPostCreate.js", "../../@dicebear/micah/lib/schema.js", "../../@dicebear/micah/lib/index.js"],
|
||||
"sourcesContent": ["/**\n * Do not change this file manually! This file was generated with the \"Dicebear Exporter\"-Plugin for Figma.\n *\n * Plugin: https://www.figma.com/community/plugin/1005765655729342787\n * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL\n */\nexport { base } from './base.js';\nexport { mouth } from './mouth.js';\nexport { eyebrows } from './eyebrows.js';\nexport { hair } from './hair.js';\nexport { eyes } from './eyes.js';\nexport { nose } from './nose.js';\nexport { ears } from './ears.js';\nexport { shirt } from './shirt.js';\nexport { earrings } from './earrings.js';\nexport { glasses } from './glasses.js';\nexport { facialHair } from './facialHair.js';\n", "/**\n * Do not change this file manually! This file was generated with the \"Dicebear Exporter\"-Plugin for Figma.\n *\n * Plugin: https://www.figma.com/community/plugin/1005765655729342787\n * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL\n */\nimport { escape } from '@dicebear/core';\nexport const base = {\n 'standard': (components, colors) => { var _a, _b; return `<path d=\"M154 319.5c-14.4-20-25.67-58.67-27-78L58.5 212 30 319.5h124Z\" fill=\"${escape.xml(`${colors.base}`)}\" stroke=\"#000\" stroke-width=\"4\"/><path d=\"M130.37 263.69c-2.1.2-4.22.31-6.37.31-30.78 0-56.05-21.57-58.76-49.1L127 241.5c.38 5.48 1.55 13.32 3.37 22.19Z\" fill=\"#000\" style=\"mix-blend-mode:multiply\"/><path d=\"M181.94 151.37v.01l.1.4.14.65A75.72 75.72 0 0 1 34.93 187.7l-.2-.74L18 117.13l-.06-.29A75.72 75.72 0 0 1 165.2 81.55l.05.21.02.08.05.2.05.2v.01l16.4 68.44.08.34.08.34Z\" fill=\"${escape.xml(`${colors.base}`)}\" stroke=\"#000\" stroke-width=\"4\"/><g transform=\"translate(34 102.3)\">${(_b = (_a = components.facialHair) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },\n};\n", "/**\n * Do not change this file manually! This file was generated with the \"Dicebear Exporter\"-Plugin for Figma.\n *\n * Plugin: https://www.figma.com/community/plugin/1005765655729342787\n * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL\n */\nimport { escape } from '@dicebear/core';\nexport const mouth = {\n 'surprised': (components, colors) => `<path d=\"M36.37 56.66c12.1-2.2 18.75-15.38 16.42-28.23C50.47 15.6 39.63 5.57 27.52 7.76 15.4 9.95 8.77 23.13 11.09 35.98c2.33 12.85 13.17 22.87 25.28 20.68Z\" fill=\"${escape.xml(`${colors.mouth}`)}\"/><path d=\"M17.14 42.66c2.78-5.21 8.14-9.25 14.8-10.45 6.66-1.2 13.1.7 17.53 4.6-1.09 8.3-6.37 15-13.74 16.33-7.37 1.33-14.67-3.1-18.6-10.47Z\" fill=\"#FC909F\"/>`,\n 'laughing': (components, colors) => `<path d=\"M64.73 25.7a36 36 0 0 0 1.18-12.54 4.98 4.98 0 0 0-6.8-4.2c-4.26 1.67-18.03 6.88-27.62 8.2-10.52 1.44-26.66-.32-31.44-.91a4.98 4.98 0 0 0-5.53 5.74 36 36 0 0 0 70.21 3.7Z\" fill=\"${escape.xml(`${colors.mouth}`)}\"/><path d=\"M51.83 39.55a32 32 0 0 1-37.2 4.62 21.5 21.5 0 0 1 37.2-4.62Z\" fill=\"#FC909F\"/>`,\n 'nervous': (components, colors) => `<path d=\"M68.42 31.57 67.4 17a8.06 8.06 0 0 0-9.74-7.3c-6.95 1.49-20.1 4.1-29.54 4.76-9.43.66-22.82-.1-29.9-.6a8.06 8.06 0 0 0-8.63 8.58L-9.4 37a8.06 8.06 0 0 0 9.73 7.3c6.95-1.48 20.1-4.1 29.54-4.76 9.44-.66 22.82.1 29.91.61a8.06 8.06 0 0 0 8.63-8.58Z\" fill=\"${escape.xml(`${colors.mouth}`)}\"/><path d=\"m-.25 17.97 1.6 6.07a6 6 0 0 0 6.22 4.46 6 6 0 0 0-5.54 5.28l-.74 6.23c7.28-1.52 19.34-3.83 28.3-4.46 8.98-.63 21.24-.02 28.66.48l-1.6-6.07a6 6 0 0 0-6.21-4.46 6 6 0 0 0 5.54-5.28l.73-6.24c-7.27 1.53-19.33 3.84-28.3 4.47-8.97.62-21.23.01-28.65-.48Z\" fill=\"#fff\"/>`,\n 'smile': (components, colors) => `<path d=\"M-.5 17.5c2.5 17 31 25 57 5.5\" stroke=\"${escape.xml(`${colors.mouth}`)}\" stroke-width=\"4\"/>`,\n 'sad': (components, colors) => `<path d=\"M13 46c1.72-7.96 8.07-24.77 19.77-28.35 11.7-3.58 17.7 8.46 19.23 14.92\" stroke=\"${escape.xml(`${colors.mouth}`)}\" stroke-width=\"4\"/>`,\n 'pucker': (components, colors) => `<path d=\"M26 16.7c4.17-2.34 21-5.3 21 1.5 0 8.5-11.5 8-11.5 8s13.04-3.16 10.5 6c-2.5 9-9.5 5.5-11.5 4.5\" stroke=\"${escape.xml(`${colors.mouth}`)}\" stroke-width=\"4\"/>`,\n 'frown': (components, colors) => `<path d=\"M-5 41c3.21-7.96 15.1-24.77 37-28.35 21.9-3.58 33.13 8.46 36 14.92\" stroke=\"${escape.xml(`${colors.mouth}`)}\" stroke-width=\"4\"/>`,\n 'smirk': (components, colors) => `<path d=\"M10 24.16c4.94 6.45 12.43 13.6 23.98 11.96 11.55-1.62 16.68-9.6 15.17-16.04\" stroke=\"${escape.xml(`${colors.mouth}`)}\" stroke-width=\"4\"/>`,\n};\n", "/**\n * Do not change this file manually! This file was generated with the \"Dicebear Exporter\"-Plugin for Figma.\n *\n * Plugin: https://www.figma.com/community/plugin/1005765655729342787\n * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL\n */\nimport { escape } from '@dicebear/core';\nexport const eyebrows = {\n 'up': (components, colors) => `<path d=\"M99 10.21c5.67-2.66 19-5.1 27 6.5M23.58 35.52c2.07-5.9 9.68-17.12 23.56-14.7\" stroke=\"${escape.xml(`${colors.eyebLine truncated
|
||||
"mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOO,IAAM,OAAO;AAAA,EA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EAAE,CAAC;AAAA,EAC9E,UAAU,CAAC,YAAY,WAAW,cAAc,eAAO,IAAI,GAAG,OAAO,OAAO,EAAE,CAAC;AACnF;;;ACHO,IAAM,aAAa;AAAA,EACtB,SAAS,CAAC,YAAY,WAAW,6KAA6K,eAAO,IAAI,GAAG,OAAO,UAAU,EAAE,CAAC;AAAA,EAChP,UAAU,CAAC,YAAY,WAAW,YAAY,eAAO,IAAI,GAAG,OAAO,UAAU,EAAE,CAAC;AACpF;;;ACHO,SAAS,cAAc,EAAE,MAAM,OAAO,SAAS,CAAC,EAAE,GAAG;AACxD,QAAM,sBAAsB;AAC5B,QAAM,MAAM,KAAK,KAAK,MAAM;AAC5B,MAAI,OAAO,oBAAoB,KAAK,EAAE,GAAG,GAAG;AACxC,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO,oBAAoB,KAAK,EAAE,GAAG;AAAA,IACzC;AAAA,EACJ,OACK;AACD,WAAO;AAAA,EACX;AACJ;;;ACZO,SAAS,cAAc,EAAE,MAAM,QAAQ,GAAG;AAC7C,QAAM,gBAAgB,cAAc;AAAA,IAChC;AAAA,IACA,OAAO;AAAA,IACP,QAAQ,QAAQ;AAAA,EACpB,CAAC;AACD,QAAM,iBAAiB,cAAc;AAAA,IACjC;AAAA,IACA,OAAO;AAAA,IACP,QAAQ,QAAQ;AAAA,EACpB,CAAC;AACD,QAAM,oBAAoB,cAAc;AAAA,IACpC;AAAA,IACA,OAAO;AAAA,IACP,QAAQ,QAAQ;Line truncated
|
||||
"names": []
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"hash": "314ff9b8",
|
||||
"configHash": "a9175a6e",
|
||||
"lockfileHash": "86d0e88f",
|
||||
"browserHash": "aa2e8e2d",
|
||||
"optimized": {
|
||||
"buffer": {
|
||||
"src": "../../buffer/index.js",
|
||||
"file": "buffer.js",
|
||||
"fileHash": "8f476e4b",
|
||||
"needsInterop": true
|
||||
},
|
||||
"aes-js": {
|
||||
"src": "../../aes-js/index.js",
|
||||
"file": "aes-js.js",
|
||||
"fileHash": "f7d9f9d7",
|
||||
"needsInterop": true
|
||||
},
|
||||
"elliptic": {
|
||||
"src": "../../elliptic/lib/elliptic.js",
|
||||
"file": "elliptic.js",
|
||||
"fileHash": "952a6ef5",
|
||||
"needsInterop": true
|
||||
},
|
||||
"js-chacha20": {
|
||||
"src": "../../js-chacha20/src/jschacha20.js",
|
||||
"file": "js-chacha20.js",
|
||||
"fileHash": "11cd1a75",
|
||||
"needsInterop": true
|
||||
},
|
||||
"js-sha256": {
|
||||
"src": "../../js-sha256/src/sha256.js",
|
||||
"file": "js-sha256.js",
|
||||
"fileHash": "7eb2d482",
|
||||
"needsInterop": true
|
||||
},
|
||||
"@dicebear/core": {
|
||||
"src": "../../@dicebear/core/lib/index.js",
|
||||
"file": "@dicebear_core.js",
|
||||
"fileHash": "f3c84174",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@dicebear/micah": {
|
||||
"src": "../../@dicebear/micah/lib/index.js",
|
||||
"file": "@dicebear_micah.js",
|
||||
"fileHash": "fc5de0ef",
|
||||
"needsInterop": false
|
||||
},
|
||||
"emoji-picker-element": {
|
||||
"src": "../../emoji-picker-element/index.js",
|
||||
"file": "emoji-picker-element.js",
|
||||
"fileHash": "b2acd345",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-LNRWHUEM": {
|
||||
"file": "chunk-LNRWHUEM.js"
|
||||
},
|
||||
"chunk-7H7TNGCE": {
|
||||
"file": "chunk-7H7TNGCE.js"
|
||||
},
|
||||
"chunk-HKJ2B2AA": {
|
||||
"file": "chunk-HKJ2B2AA.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
+567
@@ -0,0 +1,567 @@
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-HKJ2B2AA.js";
|
||||
|
||||
// node_modules/aes-js/index.js
|
||||
var require_aes_js = __commonJS({
|
||||
"node_modules/aes-js/index.js"(exports, module) {
|
||||
(function(root) {
|
||||
"use strict";
|
||||
function checkInt(value) {
|
||||
return parseInt(value) === value;
|
||||
}
|
||||
function checkInts(arrayish) {
|
||||
if (!checkInt(arrayish.length)) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < arrayish.length; i++) {
|
||||
if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function coerceArray(arg, copy) {
|
||||
if (arg.buffer && arg.name === "Uint8Array") {
|
||||
if (copy) {
|
||||
if (arg.slice) {
|
||||
arg = arg.slice();
|
||||
} else {
|
||||
arg = Array.prototype.slice.call(arg);
|
||||
}
|
||||
}
|
||||
return arg;
|
||||
}
|
||||
if (Array.isArray(arg)) {
|
||||
if (!checkInts(arg)) {
|
||||
throw new Error("Array contains invalid value: " + arg);
|
||||
}
|
||||
return new Uint8Array(arg);
|
||||
}
|
||||
if (checkInt(arg.length) && checkInts(arg)) {
|
||||
return new Uint8Array(arg);
|
||||
}
|
||||
throw new Error("unsupported array-like object");
|
||||
}
|
||||
function createArray(length) {
|
||||
return new Uint8Array(length);
|
||||
}
|
||||
function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {
|
||||
if (sourceStart != null || sourceEnd != null) {
|
||||
if (sourceArray.slice) {
|
||||
sourceArray = sourceArray.slice(sourceStart, sourceEnd);
|
||||
} else {
|
||||
sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);
|
||||
}
|
||||
}
|
||||
targetArray.set(sourceArray, targetStart);
|
||||
}
|
||||
var convertUtf8 = /* @__PURE__ */ function() {
|
||||
function toBytes(text) {
|
||||
var result = [], i = 0;
|
||||
text = encodeURI(text);
|
||||
while (i < text.length) {
|
||||
var c = text.charCodeAt(i++);
|
||||
if (c === 37) {
|
||||
result.push(parseInt(text.substr(i, 2), 16));
|
||||
i += 2;
|
||||
} else {
|
||||
result.push(c);
|
||||
}
|
||||
}
|
||||
return coerceArray(result);
|
||||
}
|
||||
function fromBytes(bytes) {
|
||||
var result = [], i = 0;
|
||||
while (i < bytes.length) {
|
||||
var c = bytes[i];
|
||||
if (c < 128) {
|
||||
result.push(String.fromCharCode(c));
|
||||
i++;
|
||||
} else if (c > 191 && c < 224) {
|
||||
result.push(String.fromCharCode((c & 31) << 6 | bytes[i + 1] & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
result.push(String.fromCharCode((c & 15) << 12 | (bytes[i + 1] & 63) << 6 | bytes[i + 2] & 63));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return result.join("");
|
||||
}
|
||||
return {
|
||||
toBytes,
|
||||
fromBytes
|
||||
};
|
||||
}();
|
||||
var convertHex = /* @__PURE__ */ function() {
|
||||
function toBytes(text) {
|
||||
var result = [];
|
||||
for (var i = 0; i < text.length; i += 2) {
|
||||
result.push(parseInt(text.substr(i, 2), 16));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var Hex = "0123456789abcdef";
|
||||
function fromBytes(bytes) {
|
||||
var result = [];
|
||||
for (var i = 0; i < bytes.length; i++) {
|
||||
var v = bytes[i];
|
||||
result.push(Hex[(v & 240) >> 4] + Hex[v & 15]);
|
||||
}
|
||||
return result.join("");
|
||||
}
|
||||
return {
|
||||
toBytes,
|
||||
fromBytes
|
||||
};
|
||||
}();
|
||||
var numberOfRounds = { 16: 10, 24: 12, 32: 14 };
|
||||
var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];
|
||||
var S = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];
|
||||
var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];
|
||||
var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];
|
||||
var T2 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];
|
||||
var T3 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];
|
||||
var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];
|
||||
var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];
|
||||
var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];
|
||||
var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];
|
||||
var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];
|
||||
var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];
|
||||
var U2 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];
|
||||
var U3 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];
|
||||
var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];
|
||||
function convertToInt32(bytes) {
|
||||
var result = [];
|
||||
for (var i = 0; i < bytes.length; i += 4) {
|
||||
result.push(
|
||||
bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]
|
||||
);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var AES = function(key) {
|
||||
if (!(this instanceof AES)) {
|
||||
throw Error("AES must be instanitated with `new`");
|
||||
}
|
||||
Object.defineProperty(this, "key", {
|
||||
value: coerceArray(key, true)
|
||||
});
|
||||
this._prepare();
|
||||
};
|
||||
AES.prototype._prepare = function() {
|
||||
var rounds = numberOfRounds[this.key.length];
|
||||
if (rounds == null) {
|
||||
throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
|
||||
}
|
||||
this._Ke = [];
|
||||
this._Kd = [];
|
||||
for (var i = 0; i <= rounds; i++) {
|
||||
this._Ke.push([0, 0, 0, 0]);
|
||||
this._Kd.push([0, 0, 0, 0]);
|
||||
}
|
||||
var roundKeyCount = (rounds + 1) * 4;
|
||||
var KC = this.key.length / 4;
|
||||
var tk = convertToInt32(this.key);
|
||||
var index;
|
||||
for (var i = 0; i < KC; i++) {
|
||||
index = i >> 2;
|
||||
this._Ke[index][i % 4] = tk[i];
|
||||
this._Kd[rounds - index][i % 4] = tk[i];
|
||||
}
|
||||
var rconpointer = 0;
|
||||
var t = KC, tt;
|
||||
while (t < roundKeyCount) {
|
||||
tt = tk[KC - 1];
|
||||
tk[0] ^= S[tt >> 16 & 255] << 24 ^ S[tt >> 8 & 255] << 16 ^ S[tt & 255] << 8 ^ S[tt >> 24 & 255] ^ rcon[rconpointer] << 24;
|
||||
rconpointer += 1;
|
||||
if (KC != 8) {
|
||||
for (var i = 1; i < KC; i++) {
|
||||
tk[i] ^= tk[i - 1];
|
||||
}
|
||||
} else {
|
||||
for (var i = 1; i < KC / 2; i++) {
|
||||
tk[i] ^= tk[i - 1];
|
||||
}
|
||||
tt = tk[KC / 2 - 1];
|
||||
tk[KC / 2] ^= S[tt & 255] ^ S[tt >> 8 & 255] << 8 ^ S[tt >> 16 & 255] << 16 ^ S[tt >> 24 & 255] << 24;
|
||||
for (var i = KC / 2 + 1; i < KC; i++) {
|
||||
tk[i] ^= tk[i - 1];
|
||||
}
|
||||
}
|
||||
var i = 0, r, c;
|
||||
while (i < KC && t < roundKeyCount) {
|
||||
r = t >> 2;
|
||||
c = t % 4;
|
||||
this._Ke[r][c] = tk[i];
|
||||
this._Kd[rounds - r][c] = tk[i++];
|
||||
t++;
|
||||
}
|
||||
}
|
||||
for (var r = 1; r < rounds; r++) {
|
||||
for (var c = 0; c < 4; c++) {
|
||||
tt = this._Kd[r][c];
|
||||
this._Kd[r][c] = U1[tt >> 24 & 255] ^ U2[tt >> 16 & 255] ^ U3[tt >> 8 & 255] ^ U4[tt & 255];
|
||||
}
|
||||
}
|
||||
};
|
||||
AES.prototype.encrypt = function(plaintext) {
|
||||
if (plaintext.length != 16) {
|
||||
throw new Error("invalid plaintext size (must be 16 bytes)");
|
||||
}
|
||||
var rounds = this._Ke.length - 1;
|
||||
var a = [0, 0, 0, 0];
|
||||
var t = convertToInt32(plaintext);
|
||||
for (var i = 0; i < 4; i++) {
|
||||
t[i] ^= this._Ke[0][i];
|
||||
}
|
||||
for (var r = 1; r < rounds; r++) {
|
||||
for (var i = 0; i < 4; i++) {
|
||||
a[i] = T1[t[i] >> 24 & 255] ^ T2[t[(i + 1) % 4] >> 16 & 255] ^ T3[t[(i + 2) % 4] >> 8 & 255] ^ T4[t[(i + 3) % 4] & 255] ^ this._Ke[r][i];
|
||||
}
|
||||
t = a.slice();
|
||||
}
|
||||
var result = createArray(16), tt;
|
||||
for (var i = 0; i < 4; i++) {
|
||||
tt = this._Ke[rounds][i];
|
||||
result[4 * i] = (S[t[i] >> 24 & 255] ^ tt >> 24) & 255;
|
||||
result[4 * i + 1] = (S[t[(i + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;
|
||||
result[4 * i + 2] = (S[t[(i + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;
|
||||
result[4 * i + 3] = (S[t[(i + 3) % 4] & 255] ^ tt) & 255;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
AES.prototype.decrypt = function(ciphertext) {
|
||||
if (ciphertext.length != 16) {
|
||||
throw new Error("invalid ciphertext size (must be 16 bytes)");
|
||||
}
|
||||
var rounds = this._Kd.length - 1;
|
||||
var a = [0, 0, 0, 0];
|
||||
var t = convertToInt32(ciphertext);
|
||||
for (var i = 0; i < 4; i++) {
|
||||
t[i] ^= this._Kd[0][i];
|
||||
}
|
||||
for (var r = 1; r < rounds; r++) {
|
||||
for (var i = 0; i < 4; i++) {
|
||||
a[i] = T5[t[i] >> 24 & 255] ^ T6[t[(i + 3) % 4] >> 16 & 255] ^ T7[t[(i + 2) % 4] >> 8 & 255] ^ T8[t[(i + 1) % 4] & 255] ^ this._Kd[r][i];
|
||||
}
|
||||
t = a.slice();
|
||||
}
|
||||
var result = createArray(16), tt;
|
||||
for (var i = 0; i < 4; i++) {
|
||||
tt = this._Kd[rounds][i];
|
||||
result[4 * i] = (Si[t[i] >> 24 & 255] ^ tt >> 24) & 255;
|
||||
result[4 * i + 1] = (Si[t[(i + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;
|
||||
result[4 * i + 2] = (Si[t[(i + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;
|
||||
result[4 * i + 3] = (Si[t[(i + 1) % 4] & 255] ^ tt) & 255;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
var ModeOfOperationECB = function(key) {
|
||||
if (!(this instanceof ModeOfOperationECB)) {
|
||||
throw Error("AES must be instanitated with `new`");
|
||||
}
|
||||
this.description = "Electronic Code Block";
|
||||
this.name = "ecb";
|
||||
this._aes = new AES(key);
|
||||
};
|
||||
ModeOfOperationECB.prototype.encrypt = function(plaintext) {
|
||||
plaintext = coerceArray(plaintext);
|
||||
if (plaintext.length % 16 !== 0) {
|
||||
throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
|
||||
}
|
||||
var ciphertext = createArray(plaintext.length);
|
||||
var block = createArray(16);
|
||||
for (var i = 0; i < plaintext.length; i += 16) {
|
||||
copyArray(plaintext, block, 0, i, i + 16);
|
||||
block = this._aes.encrypt(block);
|
||||
copyArray(block, ciphertext, i);
|
||||
}
|
||||
return ciphertext;
|
||||
};
|
||||
ModeOfOperationECB.prototype.decrypt = function(ciphertext) {
|
||||
ciphertext = coerceArray(ciphertext);
|
||||
if (ciphertext.length % 16 !== 0) {
|
||||
throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
|
||||
}
|
||||
var plaintext = createArray(ciphertext.length);
|
||||
var block = createArray(16);
|
||||
for (var i = 0; i < ciphertext.length; i += 16) {
|
||||
copyArray(ciphertext, block, 0, i, i + 16);
|
||||
block = this._aes.decrypt(block);
|
||||
copyArray(block, plaintext, i);
|
||||
}
|
||||
return plaintext;
|
||||
};
|
||||
var ModeOfOperationCBC = function(key, iv) {
|
||||
if (!(this instanceof ModeOfOperationCBC)) {
|
||||
throw Error("AES must be instanitated with `new`");
|
||||
}
|
||||
this.description = "Cipher Block Chaining";
|
||||
this.name = "cbc";
|
||||
if (!iv) {
|
||||
iv = createArray(16);
|
||||
} else if (iv.length != 16) {
|
||||
throw new Error("invalid initialation vector size (must be 16 bytes)");
|
||||
}
|
||||
this._lastCipherblock = coerceArray(iv, true);
|
||||
this._aes = new AES(key);
|
||||
};
|
||||
ModeOfOperationCBC.prototype.encrypt = function(plaintext) {
|
||||
plaintext = coerceArray(plaintext);
|
||||
if (plaintext.length % 16 !== 0) {
|
||||
throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
|
||||
}
|
||||
var ciphertext = createArray(plaintext.length);
|
||||
var block = createArray(16);
|
||||
for (var i = 0; i < plaintext.length; i += 16) {
|
||||
copyArray(plaintext, block, 0, i, i + 16);
|
||||
for (var j = 0; j < 16; j++) {
|
||||
block[j] ^= this._lastCipherblock[j];
|
||||
}
|
||||
this._lastCipherblock = this._aes.encrypt(block);
|
||||
copyArray(this._lastCipherblock, ciphertext, i);
|
||||
}
|
||||
return ciphertext;
|
||||
};
|
||||
ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {
|
||||
ciphertext = coerceArray(ciphertext);
|
||||
if (ciphertext.length % 16 !== 0) {
|
||||
throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
|
||||
}
|
||||
var plaintext = createArray(ciphertext.length);
|
||||
var block = createArray(16);
|
||||
for (var i = 0; i < ciphertext.length; i += 16) {
|
||||
copyArray(ciphertext, block, 0, i, i + 16);
|
||||
block = this._aes.decrypt(block);
|
||||
for (var j = 0; j < 16; j++) {
|
||||
plaintext[i + j] = block[j] ^ this._lastCipherblock[j];
|
||||
}
|
||||
copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);
|
||||
}
|
||||
return plaintext;
|
||||
};
|
||||
var ModeOfOperationCFB = function(key, iv, segmentSize) {
|
||||
if (!(this instanceof ModeOfOperationCFB)) {
|
||||
throw Error("AES must be instanitated with `new`");
|
||||
}
|
||||
this.description = "Cipher Feedback";
|
||||
this.name = "cfb";
|
||||
if (!iv) {
|
||||
iv = createArray(16);
|
||||
} else if (iv.length != 16) {
|
||||
throw new Error("invalid initialation vector size (must be 16 size)");
|
||||
}
|
||||
if (!segmentSize) {
|
||||
segmentSize = 1;
|
||||
}
|
||||
this.segmentSize = segmentSize;
|
||||
this._shiftRegister = coerceArray(iv, true);
|
||||
this._aes = new AES(key);
|
||||
};
|
||||
ModeOfOperationCFB.prototype.encrypt = function(plaintext) {
|
||||
if (plaintext.length % this.segmentSize != 0) {
|
||||
throw new Error("invalid plaintext size (must be segmentSize bytes)");
|
||||
}
|
||||
var encrypted = coerceArray(plaintext, true);
|
||||
var xorSegment;
|
||||
for (var i = 0; i < encrypted.length; i += this.segmentSize) {
|
||||
xorSegment = this._aes.encrypt(this._shiftRegister);
|
||||
for (var j = 0; j < this.segmentSize; j++) {
|
||||
encrypted[i + j] ^= xorSegment[j];
|
||||
}
|
||||
copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
|
||||
copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
|
||||
}
|
||||
return encrypted;
|
||||
};
|
||||
ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {
|
||||
if (ciphertext.length % this.segmentSize != 0) {
|
||||
throw new Error("invalid ciphertext size (must be segmentSize bytes)");
|
||||
}
|
||||
var plaintext = coerceArray(ciphertext, true);
|
||||
var xorSegment;
|
||||
for (var i = 0; i < plaintext.length; i += this.segmentSize) {
|
||||
xorSegment = this._aes.encrypt(this._shiftRegister);
|
||||
for (var j = 0; j < this.segmentSize; j++) {
|
||||
plaintext[i + j] ^= xorSegment[j];
|
||||
}
|
||||
copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
|
||||
copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
|
||||
}
|
||||
return plaintext;
|
||||
};
|
||||
var ModeOfOperationOFB = function(key, iv) {
|
||||
if (!(this instanceof ModeOfOperationOFB)) {
|
||||
throw Error("AES must be instanitated with `new`");
|
||||
}
|
||||
this.description = "Output Feedback";
|
||||
this.name = "ofb";
|
||||
if (!iv) {
|
||||
iv = createArray(16);
|
||||
} else if (iv.length != 16) {
|
||||
throw new Error("invalid initialation vector size (must be 16 bytes)");
|
||||
}
|
||||
this._lastPrecipher = coerceArray(iv, true);
|
||||
this._lastPrecipherIndex = 16;
|
||||
this._aes = new AES(key);
|
||||
};
|
||||
ModeOfOperationOFB.prototype.encrypt = function(plaintext) {
|
||||
var encrypted = coerceArray(plaintext, true);
|
||||
for (var i = 0; i < encrypted.length; i++) {
|
||||
if (this._lastPrecipherIndex === 16) {
|
||||
this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);
|
||||
this._lastPrecipherIndex = 0;
|
||||
}
|
||||
encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];
|
||||
}
|
||||
return encrypted;
|
||||
};
|
||||
ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;
|
||||
var Counter = function(initialValue) {
|
||||
if (!(this instanceof Counter)) {
|
||||
throw Error("Counter must be instanitated with `new`");
|
||||
}
|
||||
if (initialValue !== 0 && !initialValue) {
|
||||
initialValue = 1;
|
||||
}
|
||||
if (typeof initialValue === "number") {
|
||||
this._counter = createArray(16);
|
||||
this.setValue(initialValue);
|
||||
} else {
|
||||
this.setBytes(initialValue);
|
||||
}
|
||||
};
|
||||
Counter.prototype.setValue = function(value) {
|
||||
if (typeof value !== "number" || parseInt(value) != value) {
|
||||
throw new Error("invalid counter value (must be an integer)");
|
||||
}
|
||||
if (value > Number.MAX_SAFE_INTEGER) {
|
||||
throw new Error("integer value out of safe range");
|
||||
}
|
||||
for (var index = 15; index >= 0; --index) {
|
||||
this._counter[index] = value % 256;
|
||||
value = parseInt(value / 256);
|
||||
}
|
||||
};
|
||||
Counter.prototype.setBytes = function(bytes) {
|
||||
bytes = coerceArray(bytes, true);
|
||||
if (bytes.length != 16) {
|
||||
throw new Error("invalid counter bytes size (must be 16 bytes)");
|
||||
}
|
||||
this._counter = bytes;
|
||||
};
|
||||
Counter.prototype.increment = function() {
|
||||
for (var i = 15; i >= 0; i--) {
|
||||
if (this._counter[i] === 255) {
|
||||
this._counter[i] = 0;
|
||||
} else {
|
||||
this._counter[i]++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
var ModeOfOperationCTR = function(key, counter) {
|
||||
if (!(this instanceof ModeOfOperationCTR)) {
|
||||
throw Error("AES must be instanitated with `new`");
|
||||
}
|
||||
this.description = "Counter";
|
||||
this.name = "ctr";
|
||||
if (!(counter instanceof Counter)) {
|
||||
counter = new Counter(counter);
|
||||
}
|
||||
this._counter = counter;
|
||||
this._remainingCounter = null;
|
||||
this._remainingCounterIndex = 16;
|
||||
this._aes = new AES(key);
|
||||
};
|
||||
ModeOfOperationCTR.prototype.encrypt = function(plaintext) {
|
||||
var encrypted = coerceArray(plaintext, true);
|
||||
for (var i = 0; i < encrypted.length; i++) {
|
||||
if (this._remainingCounterIndex === 16) {
|
||||
this._remainingCounter = this._aes.encrypt(this._counter._counter);
|
||||
this._remainingCounterIndex = 0;
|
||||
this._counter.increment();
|
||||
}
|
||||
encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];
|
||||
}
|
||||
return encrypted;
|
||||
};
|
||||
ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;
|
||||
function pkcs7pad(data) {
|
||||
data = coerceArray(data, true);
|
||||
var padder = 16 - data.length % 16;
|
||||
var result = createArray(data.length + padder);
|
||||
copyArray(data, result);
|
||||
for (var i = data.length; i < result.length; i++) {
|
||||
result[i] = padder;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function pkcs7strip(data) {
|
||||
data = coerceArray(data, true);
|
||||
if (data.length < 16) {
|
||||
throw new Error("PKCS#7 invalid length");
|
||||
}
|
||||
var padder = data[data.length - 1];
|
||||
if (padder > 16) {
|
||||
throw new Error("PKCS#7 padding byte out of range");
|
||||
}
|
||||
var length = data.length - padder;
|
||||
for (var i = 0; i < padder; i++) {
|
||||
if (data[length + i] !== padder) {
|
||||
throw new Error("PKCS#7 invalid padding byte");
|
||||
}
|
||||
}
|
||||
var result = createArray(length);
|
||||
copyArray(data, result, 0, 0, length);
|
||||
return result;
|
||||
}
|
||||
var aesjs = {
|
||||
AES,
|
||||
Counter,
|
||||
ModeOfOperation: {
|
||||
ecb: ModeOfOperationECB,
|
||||
cbc: ModeOfOperationCBC,
|
||||
cfb: ModeOfOperationCFB,
|
||||
ofb: ModeOfOperationOFB,
|
||||
ctr: ModeOfOperationCTR
|
||||
},
|
||||
utils: {
|
||||
hex: convertHex,
|
||||
utf8: convertUtf8
|
||||
},
|
||||
padding: {
|
||||
pkcs7: {
|
||||
pad: pkcs7pad,
|
||||
strip: pkcs7strip
|
||||
}
|
||||
},
|
||||
_arrayTest: {
|
||||
coerceArray,
|
||||
createArray,
|
||||
copyArray
|
||||
}
|
||||
};
|
||||
if (typeof exports !== "undefined") {
|
||||
module.exports = aesjs;
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define([], function() {
|
||||
return aesjs;
|
||||
});
|
||||
} else {
|
||||
if (root.aesjs) {
|
||||
aesjs._aesjs = root.aesjs;
|
||||
}
|
||||
root.aesjs = aesjs;
|
||||
}
|
||||
})(exports);
|
||||
}
|
||||
});
|
||||
export default require_aes_js();
|
||||
/*! Bundled license information:
|
||||
|
||||
aes-js/index.js:
|
||||
(*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. *)
|
||||
*/
|
||||
//# sourceMappingURL=aes-js.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../aes-js/index.js"],
|
||||
"sourcesContent": ["/*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */\n(function(root) {\n \"use strict\";\n\n function checkInt(value) {\n return (parseInt(value) === value);\n }\n\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) { return false; }\n\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n\n return true;\n }\n\n function coerceArray(arg, copy) {\n\n // ArrayBuffer view\n if (arg.buffer && arg.name === 'Uint8Array') {\n\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n\n throw new Error('unsupported array-like object');\n }\n\n function createArray(length) {\n return new Uint8Array(length);\n }\n\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n\n\n\n var convertUtf8 = (function() {\n function toBytes(text) {\n var result = [], i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16))\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c)\n }\n }\n\n return coerceArray(result);\n }\n\n function fromBytes(bytes) {\n var result = [], i = 0;\n\n while (i < bytes.length) {\n var c = bytes[i];\n\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));\n i += 2;\n } else {\n result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));\n i += 3;\n }\n }\n\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n var convertHex = (function() {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n\n // Number of rounds by keysize\n var numberOfRounds = {16: 10, 24: 12, 32: 14}\n\n // Round constant words\n var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n // S-box and Inverse S-box (S is for Substitution)\n var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0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,KAAM,ILine truncated
|
||||
"names": []
|
||||
}
|
||||
+1793
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../base64-js/index.js", "../../ieee754/index.js", "../../buffer/index.js"],
|
||||
"sourcesContent": ["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n", "/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * MLine truncated
|
||||
"mappings": ";;;;;AAAA;AAAA;AAAA;AAEA,YAAQ,aAAa;AACrB,YAAQ,cAAc;AACtB,YAAQ,gBAAgB;AAExB,QAAI,SAAS,CAAC;AACd,QAAI,YAAY,CAAC;AACjB,QAAI,MAAM,OAAO,eAAe,cAAc,aAAa;AAE3D,QAAI,OAAO;AACX,SAAS,IAAI,GAAG,MAAM,KAAK,QAAQ,IAAI,KAAK,EAAE,GAAG;AAC/C,aAAO,CAAC,IAAI,KAAK,CAAC;AAClB,gBAAU,KAAK,WAAW,CAAC,CA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;AACxC,cAAI,IAAI;AAAA,QACV,OAAO;AACL,cAAI,QAAQ,KAAK,IAAI,GAAG,QAAQ,CAAC,IAAI,KAAK,IAAI,GAAG,IAAI;AACrD,cAAI;AAAA,QACN;AAAA,MACF;AAEA,aAAO,QAAQ,GAAG,OAAO,SAAS,CAAC,IAAI,IAAI,KAAM,KAAK,GAAG,KAAK,KAAK,QAAQ,GAAG;AAAA,MAAC;AAE/E,UAAK,KAAK,OAAQ;AAClB,cAAQ;AACR,aAAO,OAAO,GAAG,OAAO,SAAS,CAAC,IAAI,IAAI,KAAM,KAAK,GAAG,KAAK,KAAK,QAAQ,GAAG;AAAA,MAAC;AAE9E,aAAO,SAAS,IAAI,CAAC,KAAK,IAAI;AAAA,IAChC;AAAA;AAAA;;;ACpFA;AAAA;AAUA,QAAM,SAAS;AACf,QAAM,UAAU;AAChB,QAAM,sBACH,OAAO,WAAW,cAAc,OAAO,OAAO,KAAK,MAAM,aACtD,OAAO,KAAK,EAAE,4BAA4B,IAC1C;AAEN,YAAQ,Line truncated
|
||||
"names": ["len", "i", "len2", "i", "byteLength"]
|
||||
}
|
||||
+397
@@ -0,0 +1,397 @@
|
||||
import {
|
||||
__export
|
||||
} from "./chunk-HKJ2B2AA.js";
|
||||
|
||||
// node_modules/@dicebear/core/lib/utils/license.js
|
||||
var license_exports = {};
|
||||
__export(license_exports, {
|
||||
text: () => text,
|
||||
xml: () => xml2
|
||||
});
|
||||
|
||||
// node_modules/@dicebear/core/lib/utils/escape.js
|
||||
var escape_exports = {};
|
||||
__export(escape_exports, {
|
||||
xml: () => xml
|
||||
});
|
||||
function xml(content) {
|
||||
return content.replace(/&/g, "&").replace(/'/g, "'").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/core/lib/utils/license.js
|
||||
function xml2(style) {
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
const title = (_a = style.meta) === null || _a === void 0 ? void 0 : _a.title;
|
||||
const creator = (_b = style.meta) === null || _b === void 0 ? void 0 : _b.creator;
|
||||
const source = (_c = style.meta) === null || _c === void 0 ? void 0 : _c.source;
|
||||
const license = (_e = (_d = style.meta) === null || _d === void 0 ? void 0 : _d.license) === null || _e === void 0 ? void 0 : _e.url;
|
||||
const rights = text(style);
|
||||
if (!title && !creator && !source && !license && !rights) {
|
||||
return "";
|
||||
}
|
||||
return '<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>' + (title ? `<dc:title>${xml(title)}</dc:title>` : "") + (creator ? `<dc:creator>${xml(creator)}</dc:creator>` : "") + (source ? `<dc:source xsi:type="dcterms:URI">${xml((_g = (_f = style.meta) === null || _f === void 0 ? void 0 : _f.source) !== null && _g !== void 0 ? _g : "")}</dc:source>` : "") + (license ? `<dcterms:license xsi:type="dcterms:URI">${xml(license)}</dcterms:license>` : "") + (rights ? `<dc:rights>${xml(rights)}</dc:rights>` : "") + "</rdf:Description></rdf:RDF></metadata>";
|
||||
}
|
||||
function text(style) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
||||
let title = ((_a = style.meta) === null || _a === void 0 ? void 0 : _a.title) ? `„${(_b = style.meta) === null || _b === void 0 ? void 0 : _b.title}”` : "Design";
|
||||
let creator = `„${(_d = (_c = style.meta) === null || _c === void 0 ? void 0 : _c.creator) !== null && _d !== void 0 ? _d : "Unknown"}”`;
|
||||
if ((_e = style.meta) === null || _e === void 0 ? void 0 : _e.source) {
|
||||
title += ` (${style.meta.source})`;
|
||||
}
|
||||
let result = "";
|
||||
if (((_g = (_f = style.meta) === null || _f === void 0 ? void 0 : _f.license) === null || _g === void 0 ? void 0 : _g.name) !== "MIT" && ((_h = style.meta) === null || _h === void 0 ? void 0 : _h.creator) !== "DiceBear" && ((_j = style.meta) === null || _j === void 0 ? void 0 : _j.title)) {
|
||||
result += "Remix of ";
|
||||
}
|
||||
result += `${title} by ${creator}`;
|
||||
if ((_l = (_k = style.meta) === null || _k === void 0 ? void 0 : _k.license) === null || _l === void 0 ? void 0 : _l.name) {
|
||||
result += `, licensed under „${(_o = (_m = style.meta) === null || _m === void 0 ? void 0 : _m.license) === null || _o === void 0 ? void 0 : _o.name}”`;
|
||||
if ((_q = (_p = style.meta) === null || _p === void 0 ? void 0 : _p.license) === null || _q === void 0 ? void 0 : _q.url) {
|
||||
result += ` (${style.meta.license.url})`;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/core/lib/utils/prng.js
|
||||
var MIN = -2147483648;
|
||||
var MAX = 2147483647;
|
||||
function xorshift(value) {
|
||||
value ^= value << 13;
|
||||
value ^= value >> 17;
|
||||
value ^= value << 5;
|
||||
return value;
|
||||
}
|
||||
function hashSeed(seed) {
|
||||
let hash = 0;
|
||||
for (let i = 0; i < seed.length; i++) {
|
||||
hash = (hash << 5) - hash + seed.charCodeAt(i) | 0;
|
||||
hash = xorshift(hash);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
function create(seed = "") {
|
||||
seed = seed.toString();
|
||||
let value = hashSeed(seed) || 1;
|
||||
const next = () => value = xorshift(value);
|
||||
const integer = (min, max) => {
|
||||
return Math.floor((next() - MIN) / (MAX - MIN) * (max + 1 - min) + min);
|
||||
};
|
||||
return {
|
||||
seed,
|
||||
next,
|
||||
bool(likelihood = 50) {
|
||||
return integer(1, 100) <= likelihood;
|
||||
},
|
||||
integer(min, max) {
|
||||
return integer(min, max);
|
||||
},
|
||||
pick(arr, fallback) {
|
||||
var _a;
|
||||
if (arr.length === 0) {
|
||||
next();
|
||||
return fallback;
|
||||
}
|
||||
return (_a = arr[integer(0, arr.length - 1)]) !== null && _a !== void 0 ? _a : fallback;
|
||||
},
|
||||
shuffle(arr) {
|
||||
const internalPrng = create(next().toString());
|
||||
const workingArray = [...arr];
|
||||
for (let i = workingArray.length - 1; i > 0; i--) {
|
||||
const j = internalPrng.integer(0, i);
|
||||
[workingArray[i], workingArray[j]] = [workingArray[j], workingArray[i]];
|
||||
}
|
||||
return workingArray;
|
||||
},
|
||||
string(length, characters = "abcdefghijklmnopqrstuvwxyz1234567890") {
|
||||
const internalPrng = create(next().toString());
|
||||
let str = "";
|
||||
for (let i = 0; i < length; i++) {
|
||||
str += characters[internalPrng.integer(0, characters.length - 1)];
|
||||
}
|
||||
return str;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/core/lib/utils/svg.js
|
||||
function getViewBox(result) {
|
||||
let viewBox = result.attributes["viewBox"].split(" ");
|
||||
let x = parseInt(viewBox[0]);
|
||||
let y = parseInt(viewBox[1]);
|
||||
let width = parseInt(viewBox[2]);
|
||||
let height = parseInt(viewBox[3]);
|
||||
return {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height
|
||||
};
|
||||
}
|
||||
function addBackground(result, primaryColor, secondaryColor, type, rotation) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
const solidBackground = `<rect fill="${primaryColor}" width="${width}" height="${height}" x="${x}" y="${y}" />`;
|
||||
switch (type) {
|
||||
case "solid":
|
||||
return solidBackground + result.body;
|
||||
case "gradientLinear":
|
||||
return `<rect fill="url(#backgroundLinear)" width="${width}" height="${height}" x="${x}" y="${y}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${rotation} 0.5 0.5)"><stop stop-color="${primaryColor}"/><stop offset="1" stop-color="${secondaryColor}"/></linearGradient></defs>` + result.body;
|
||||
}
|
||||
}
|
||||
function addScale(result, scale) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
let percent = scale ? (scale - 100) / 100 : 0;
|
||||
let translateX = (width / 2 + x) * percent * -1;
|
||||
let translateY = (height / 2 + y) * percent * -1;
|
||||
return `<g transform="translate(${translateX} ${translateY}) scale(${scale / 100})">${result.body}</g>`;
|
||||
}
|
||||
function addTranslate(result, x, y) {
|
||||
let viewBox = getViewBox(result);
|
||||
let translateX = (viewBox.width + viewBox.x * 2) * ((x !== null && x !== void 0 ? x : 0) / 100);
|
||||
let translateY = (viewBox.height + viewBox.y * 2) * ((y !== null && y !== void 0 ? y : 0) / 100);
|
||||
return `<g transform="translate(${translateX} ${translateY})">${result.body}</g>`;
|
||||
}
|
||||
function addRotate(result, rotate) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
return `<g transform="rotate(${rotate}, ${width / 2 + x}, ${height / 2 + y})">${result.body}</g>`;
|
||||
}
|
||||
function addFlip(result) {
|
||||
let { width, x } = getViewBox(result);
|
||||
return `<g transform="scale(-1 1) translate(${width * -1 - x * 2} 0)">${result.body}</g>`;
|
||||
}
|
||||
function addViewboxMask(result, radius) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
let rx = radius ? width * radius / 100 : 0;
|
||||
let ry = radius ? height * radius / 100 : 0;
|
||||
return `<mask id="viewboxMask"><rect width="${width}" height="${height}" rx="${rx}" ry="${ry}" x="${x}" y="${y}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${result.body}</g>`;
|
||||
}
|
||||
function createAttrString(result) {
|
||||
const attributes = {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
...result.attributes
|
||||
};
|
||||
return Object.keys(attributes).map((attr) => `${xml(attr)}="${xml(attributes[attr])}"`).join(" ");
|
||||
}
|
||||
function randomizeIds(result) {
|
||||
const prng = create(Math.random().toString());
|
||||
const ids = {};
|
||||
return result.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi, (match, m1, m2, m3) => {
|
||||
ids[m2] = ids[m2] || prng.string(8);
|
||||
return `${m1}${ids[m2]}${m3}`;
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/core/lib/schema.js
|
||||
var schema = {
|
||||
type: "object",
|
||||
$schema: "http://json-schema.org/draft-07/schema#",
|
||||
properties: {
|
||||
seed: {
|
||||
type: "string"
|
||||
},
|
||||
flip: {
|
||||
type: "boolean",
|
||||
default: false
|
||||
},
|
||||
rotate: {
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
maximum: 360,
|
||||
default: 0
|
||||
},
|
||||
scale: {
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
maximum: 200,
|
||||
default: 100
|
||||
},
|
||||
radius: {
|
||||
type: "integer",
|
||||
minimum: 0,
|
||||
maximum: 50,
|
||||
default: 0
|
||||
},
|
||||
size: {
|
||||
type: "integer",
|
||||
minimum: 1
|
||||
},
|
||||
backgroundColor: {
|
||||
type: "array",
|
||||
items: {
|
||||
type: "string",
|
||||
pattern: "^(transparent|[a-fA-F0-9]{6})$"
|
||||
}
|
||||
},
|
||||
backgroundType: {
|
||||
type: "array",
|
||||
items: {
|
||||
type: "string",
|
||||
enum: ["solid", "gradientLinear"]
|
||||
},
|
||||
default: ["solid"]
|
||||
},
|
||||
backgroundRotation: {
|
||||
type: "array",
|
||||
items: {
|
||||
type: "integer",
|
||||
minimum: -360,
|
||||
maximum: 360
|
||||
},
|
||||
default: [
|
||||
0,
|
||||
360
|
||||
]
|
||||
},
|
||||
translateX: {
|
||||
type: "integer",
|
||||
minimum: -100,
|
||||
maximum: 100,
|
||||
default: 0
|
||||
},
|
||||
translateY: {
|
||||
type: "integer",
|
||||
minimum: -100,
|
||||
maximum: 100,
|
||||
default: 0
|
||||
},
|
||||
clip: {
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
randomizeIds: {
|
||||
type: "boolean",
|
||||
default: false
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/@dicebear/core/lib/utils/options.js
|
||||
function defaults(schema2) {
|
||||
var _a;
|
||||
let result = {};
|
||||
let props = (_a = schema2.properties) !== null && _a !== void 0 ? _a : {};
|
||||
Object.keys(props).forEach((key) => {
|
||||
let val = props[key];
|
||||
if (typeof val === "object" && void 0 !== val.default) {
|
||||
if (Array.isArray(val.default)) {
|
||||
result[key] = [...val.default];
|
||||
} else if (typeof val.default === "object") {
|
||||
result[key] = { ...val.default };
|
||||
} else {
|
||||
result[key] = val.default;
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
function merge(style, options) {
|
||||
var _a;
|
||||
let result = {
|
||||
...defaults(schema),
|
||||
...defaults((_a = style.schema) !== null && _a !== void 0 ? _a : {}),
|
||||
...options
|
||||
};
|
||||
return JSON.parse(JSON.stringify(result));
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/core/lib/utils/color.js
|
||||
function convertColor(color) {
|
||||
return "transparent" === color ? color : `#${color}`;
|
||||
}
|
||||
function getBackgroundColors(prng, backgroundColor, backgroundType) {
|
||||
var _a;
|
||||
let shuffledBackgroundColors = prng.shuffle(backgroundColor);
|
||||
if (shuffledBackgroundColors.length <= 1) {
|
||||
shuffledBackgroundColors = backgroundColor;
|
||||
prng.next();
|
||||
} else if (backgroundColor.length == 2 && backgroundType == "gradientLinear") {
|
||||
shuffledBackgroundColors = backgroundColor;
|
||||
prng.next();
|
||||
} else {
|
||||
shuffledBackgroundColors = prng.shuffle(backgroundColor);
|
||||
}
|
||||
if (shuffledBackgroundColors.length === 0) {
|
||||
shuffledBackgroundColors = ["transparent"];
|
||||
}
|
||||
const primary = shuffledBackgroundColors[0];
|
||||
const secondary = (_a = shuffledBackgroundColors[1]) !== null && _a !== void 0 ? _a : shuffledBackgroundColors[0];
|
||||
return {
|
||||
primary: convertColor(primary),
|
||||
secondary: convertColor(secondary)
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@dicebear/core/lib/core.js
|
||||
function createAvatar(style, options = {}) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
options = merge(style, options);
|
||||
const prng = create(options.seed);
|
||||
const result = style.create({ prng, options });
|
||||
const backgroundType = prng.pick((_a = options.backgroundType) !== null && _a !== void 0 ? _a : [], "solid");
|
||||
const { primary: primaryBackgroundColor, secondary: secondaryBackgroundColor } = getBackgroundColors(prng, (_b = options.backgroundColor) !== null && _b !== void 0 ? _b : [], backgroundType);
|
||||
const backgroundRotation = prng.integer(((_c = options.backgroundRotation) === null || _c === void 0 ? void 0 : _c.length) ? Math.min(...options.backgroundRotation) : 0, ((_d = options.backgroundRotation) === null || _d === void 0 ? void 0 : _d.length) ? Math.max(...options.backgroundRotation) : 0);
|
||||
if (options.size) {
|
||||
result.attributes.width = options.size.toString();
|
||||
result.attributes.height = options.size.toString();
|
||||
}
|
||||
if (options.scale !== void 0 && options.scale !== 100) {
|
||||
result.body = addScale(result, options.scale);
|
||||
}
|
||||
if (options.flip) {
|
||||
result.body = addFlip(result);
|
||||
}
|
||||
if (options.rotate) {
|
||||
result.body = addRotate(result, options.rotate);
|
||||
}
|
||||
if (options.translateX || options.translateY) {
|
||||
result.body = addTranslate(result, options.translateX, options.translateY);
|
||||
}
|
||||
if (primaryBackgroundColor !== "transparent" && secondaryBackgroundColor !== "transparent") {
|
||||
result.body = addBackground(result, primaryBackgroundColor, secondaryBackgroundColor, backgroundType, backgroundRotation);
|
||||
}
|
||||
if (options.radius || options.clip) {
|
||||
result.body = addViewboxMask(result, (_e = options.radius) !== null && _e !== void 0 ? _e : 0);
|
||||
}
|
||||
if (options.randomizeIds) {
|
||||
result.body = randomizeIds(result);
|
||||
}
|
||||
const attributes = createAttrString(result);
|
||||
const metadata = xml2(style);
|
||||
const svg = `<svg ${attributes}>${metadata}${result.body}</svg>`;
|
||||
return {
|
||||
toString: () => svg,
|
||||
toJson: () => {
|
||||
var _a2;
|
||||
return {
|
||||
svg,
|
||||
extra: {
|
||||
primaryBackgroundColor,
|
||||
secondaryBackgroundColor,
|
||||
backgroundType,
|
||||
backgroundRotation,
|
||||
...(_a2 = result.extra) === null || _a2 === void 0 ? void 0 : _a2.call(result)
|
||||
}
|
||||
};
|
||||
},
|
||||
toDataUri: () => {
|
||||
return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
escape_exports,
|
||||
license_exports,
|
||||
schema,
|
||||
createAvatar
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
@dicebear/core/lib/index.js:
|
||||
(*!
|
||||
* DiceBear (@dicebear/core)
|
||||
*
|
||||
* Code licensed under MIT (https://github.com/dicebear/dicebear/blob/main/LICENSE)
|
||||
* Copyright (c) 2024 Florian Körner
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=chunk-7H7TNGCE.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@dicebear/core/lib/utils/license.js", "../../@dicebear/core/lib/utils/escape.js", "../../@dicebear/core/lib/utils/prng.js", "../../@dicebear/core/lib/utils/svg.js", "../../@dicebear/core/lib/schema.js", "../../@dicebear/core/lib/utils/options.js", "../../@dicebear/core/lib/utils/color.js", "../../@dicebear/core/lib/core.js"],
|
||||
"sourcesContent": ["import * as _ from './escape.js';\nexport function xml(style) {\n var _a, _b, _c, _d, _e, _f, _g;\n const title = (_a = style.meta) === null || _a === void 0 ? void 0 : _a.title;\n const creator = (_b = style.meta) === null || _b === void 0 ? void 0 : _b.creator;\n const source = (_c = style.meta) === null || _c === void 0 ? void 0 : _c.source;\n const license = (_e = (_d = style.meta) === null || _d === void 0 ? void 0 : _d.license) === null || _e === void 0 ? void 0 : _e.url;\n const rights = text(style);\n if (!title && !creator && !source && !license && !rights) {\n return '';\n }\n // https://nsteffel.github.io/dublin_core_generator/generator.html\n return ('<metadata' +\n ' xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"' +\n ' xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"' +\n ' xmlns:dc=\"http://purl.org/dc/elements/1.1/\"' +\n ' xmlns:dcterms=\"http://purl.org/dc/terms/\">' +\n '<rdf:RDF>' +\n '<rdf:Description>' +\n (title ? `<dc:title>${_.xml(title)}</dc:title>` : '') +\n (creator ? `<dc:creator>${_.xml(creator)}</dc:creator>` : '') +\n (source\n ? `<dc:source xsi:type=\"dcterms:URI\">${_.xml((_g = (_f = style.meta) === null || _f === void 0 ? void 0 : _f.source) !== null && _g !== void 0 ? _g : '')}</dc:source>`\n : '') +\n (license\n ? `<dcterms:license xsi:type=\"dcterms:URI\">${_.xml(license)}</dcterms:license>`\n : '') +\n (rights ? `<dc:rights>${_.xml(rights)}</dc:rights>` : '') +\n '</rdf:Description>' +\n '</rdf:RDF>' +\n '</metadata>');\n}\nexport function text(style) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;\n let title = ((_a = style.meta) === null || _a === void 0 ? void 0 : _a.title) ? `„${(_b = style.meta) === null || _b === void 0 ? void 0 : _b.title}”` : 'Design';\n let creator = `„${(_d = (_c = style.meta) === null || _c === void 0 ? void 0 : _c.creator) !== null && _d !== void 0 ? _d : 'Unknown'}”`;\n if ((_e = style.meta) === null || _e === void 0 ? void 0 : _e.source) {\n title += ` (${style.meta.source})`;\n }\n let result = '';\n if (((_g = (_f = style.meta) === null || _f === void 0 ? void 0 : _f.license) === null || _g === void 0 ? void 0 : _g.name) !== 'MIT' &&\n ((_h = style.meta) === null || _h === void 0 ? void 0 : _h.creator) !== 'DiceBear' &&\n ((_j = style.meta) === null || _j === void 0 ? void 0 : _j.title)) {\n result += 'Remix of ';\n }\n result += `${title} by ${creator}`;\n if ((_l = (_k = style.meta) === null || _k === void 0 ? void 0 : _k.license) === null || _l === void 0 ? void 0 : _l.name) {\n result += `, licensed under „${(_o = (_m = style.meta) === null || _m === void 0 ? void 0 : _m.license) === null || _o === void 0 ? void 0 : _o.name}”`;\n if ((_q = (_p = style.meta) === null || _p === void 0 ? void 0 : _p.license) === null || _q === void 0 ? void 0 : _q.url) {\n result += ` (${style.meta.license.url})`;\n }\n }\n return result;\n}\n", "export function xml(content) {\n return content\n .replace(/&/g, '&')\n .replace(/'/g, ''')\n .replace(/\"/g, '"')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n", "const MIN = -2147483648;\nconst MAX = 2147483647;\nfunction xorshift(value) {\n value ^= value << 13;\n value ^= value >> 17;\n value ^= value << 5;\n return value;\n}\nfunction hashSeed(seed) {\n let hash = 0;\n for (let i = 0; i < seed.length; i++) {\n hash = ((hash << 5) - hash + seed.charCodeAt(i)) | 0;\n hash = xorshift(hash);\n }\n return hash;\n}\nexport function create(seed = '') {\n // Ensure that seed is a string\n seed = seed.toString();\n let value = hashSeed(seed) || 1;\n const next = () => (value = xorshift(value));\n const integer = (min, max) => {\n return Math.floor(((next() - MIN) / (MAX - MIN)) * (max + 1 - min) + min);\n };\n return {\n seed,\n next,\n bool(likelihood = 50) {\n return integer(1, 100) <= likelihood;\n },\n integer(min, max) {\n return integer(min, max);\n },\n pick(arr, fallback) {\n var _a;\n if (arr.length === 0) {\n next();\n return fallback;\n }\n return (_a = arr[integer(0, arr.length - 1)]) !== null && _a !== void 0 ? _a : fallback;\n },\n shuffle(arr) {\n // Each method call should call the `next` function only once.\n // Therefore, we use a separate instance of the PRNG here.\n const internalPrng = create(next().toString());\n // Fisher-Yates shuffle algorithm - We do not use the Array.sort method\n // because it is not stable anLine truncated
|
||||
"mappings": ";;;;;AAAA;AAAA;AAAA;AAAA,aAAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAO,SAAS,IAAI,SAAS;AACzB,SAAO,QACF,QAAQ,MAAM,OAAO,EACrB,QAAQ,MAAM,QAAQ,EACtB,QAAQ,MAAM,QAAQ,EACtB,QAAQ,MAAM,MAAM,EACpB,QAAQ,MAAM,MAAM;AAC7B;;;ADNO,SAASC,KAAI,OAAO;AACvB,MAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI;AAC5B,QAAM,SAAS,KAAK,MAAM,UAAU,QAAQ,OAAO,SAAS,SAAS,GAAG;AACxE,QAAM,WAAW,KAAK,MAAM,UAAU,QAAQ,OAAO,SAAS,SAAS,GAAG;AAC1E,QAAM,UAAU,KAAK,MAAM,UAAU,QAAQ,OAAO,SAAS,SAAS,G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AAS,IAAI,CAAC,MAAM,OAAO,IAAI;AAC/F;AACO,SAAS,QAAQ,QAAQ;AAC5B,MAAI,EAAE,OAAO,EAAE,IAAI,WAAW,MAAM;AACpC,SAAO,uCAAuC,QAAQ,KAAK,IAAI,CAAC,QAAQ,OAAO,IAAI;AACvF;AACO,SAAS,eAAe,QAAQ,QAAQ;AAC3C,MAAI,EAAE,OAAO,QAAQ,GAAG,EAAE,IAAI,WAAW,MAAM;AAC/C,MAAI,KAAK,SAAU,QAAQ,SAAU,MAAM;AAC3C,MAAI,KAAK,SAAU,SAAS,SAAU,MAAM;AAC5C,SAAQ,uCACY,KAAK,aAAa,MAAM,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,sDAEjD,OAAO,IAAI;AAClD;AACO,SAAS,iBAAiB,QAAQ;AACrC,QAAM,aAAa;AAAA,IALine truncated
|
||||
"names": ["xml", "xml", "schema", "xml", "_a"]
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
|
||||
export {
|
||||
__commonJS,
|
||||
__export
|
||||
};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-HKJ2B2AA.js";
|
||||
|
||||
// browser-external:buffer
|
||||
var require_buffer = __commonJS({
|
||||
"browser-external:buffer"(exports, module) {
|
||||
module.exports = Object.create(new Proxy({}, {
|
||||
get(_, key) {
|
||||
if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") {
|
||||
console.warn(`Module "buffer" has been externalized for browser compatibility. Cannot access "buffer.${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
// browser-external:crypto
|
||||
var require_crypto = __commonJS({
|
||||
"browser-external:crypto"(exports, module) {
|
||||
module.exports = Object.create(new Proxy({}, {
|
||||
get(_, key) {
|
||||
if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") {
|
||||
console.warn(`Module "crypto" has been externalized for browser compatibility. Cannot access "crypto.${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
require_buffer,
|
||||
require_crypto
|
||||
};
|
||||
//# sourceMappingURL=chunk-LNRWHUEM.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["browser-external:buffer", "browser-external:crypto"],
|
||||
"sourcesContent": ["module.exports = Object.create(new Proxy({}, {\n get(_, key) {\n if (\n key !== '__esModule' &&\n key !== '__proto__' &&\n key !== 'constructor' &&\n key !== 'splice'\n ) {\n console.warn(`Module \"buffer\" has been externalized for browser compatibility. Cannot access \"buffer.${key}\" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)\n }\n }\n}))", "module.exports = Object.create(new Proxy({}, {\n get(_, key) {\n if (\n key !== '__esModule' &&\n key !== '__proto__' &&\n key !== 'constructor' &&\n key !== 'splice'\n ) {\n console.warn(`Module \"crypto\" has been externalized for browser compatibility. Cannot access \"crypto.${key}\" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)\n }\n }\n}))"],
|
||||
"mappings": ";;;;;AAAA;AAAA;AAAA,WAAO,UAAU,OAAO,OAAO,IAAI,MAAM,CAAC,GAAG;AAAA,MAC3C,IAAI,GAAG,KAAK;AACV,YACE,QAAQ,gBACR,QAAQ,eACR,QAAQ,iBACR,QAAQ,UACR;AACA,kBAAQ,KAAK,0FAA0F,GAAG,mIAAmI;AAAA,QAC/O;AAAA,MACF;AAAA,IACF,CAAC,CAAC;AAAA;AAAA;;;ACXF;AAAA;AAAA,WAAO,UAAU,OAAO,OAAO,IAAI,MAAM,CAAC,GAAG;AAAA,MAC3C,IAAI,GAAG,KAAK;AACV,YACE,QAAQ,gBACR,QAAQ,eACR,QAAQ,iBACR,QAAQ,UACR;AACA,kBAAQ,KAAK,0FAA0F,GAAG,mIAAmI;AAAA,QAC/O;AAAA,MACF;AAAA,IACF,CAAC,CAAC;AAAA;AAAA;",
|
||||
"names": []
|
||||
}
|
||||
+7971
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../elliptic/package.json", "../../bn.js/lib/bn.js", "../../minimalistic-assert/index.js", "../../minimalistic-crypto-utils/lib/utils.js", "../../elliptic/lib/elliptic/utils.js", "../../brorand/index.js", "../../elliptic/lib/elliptic/curve/base.js", "../../inherits/inherits_browser.js", "../../elliptic/lib/elliptic/curve/short.js", "../../elliptic/lib/elliptic/curve/mont.js", "../../elliptic/lib/elliptic/curve/edwards.js", "../../elliptic/lib/elliptic/curve/index.js", "../../hash.js/lib/hash/utils.js", "../../hash.js/lib/hash/common.js", "../../hash.js/lib/hash/sha/common.js", "../../hash.js/lib/hash/sha/1.js", "../../hash.js/lib/hash/sha/256.js", "../../hash.js/lib/hash/sha/224.js", "../../hash.js/lib/hash/sha/512.js", "../../hash.js/lib/hash/sha/384.js", "../../hash.js/lib/hash/sha.js", "../../hash.js/lib/hash/ripemd.js", "../../hash.js/lib/hash/hmac.js", "../../hash.js/lib/hash.js", "../../elliptic/lib/elliptic/precomputed/secp256k1.js", "../../elliptic/lib/elliptic/curves.js", "../../hmac-drbg/lib/hmac-drbg.js", "../../elliptic/lib/elliptic/ec/key.js", "../../elliptic/lib/elliptic/ec/signature.js", "../../elliptic/lib/elliptic/ec/index.js", "../../elliptic/lib/elliptic/eddsa/key.js", "../../elliptic/lib/elliptic/eddsa/signature.js", "../../elliptic/lib/elliptic/eddsa/index.js", "../../elliptic/lib/elliptic.js"],
|
||||
"sourcesContent": ["{\n \"name\": \"elliptic\",\n \"version\": \"6.6.1\",\n \"description\": \"EC cryptography\",\n \"main\": \"lib/elliptic.js\",\n \"files\": [\n \"lib\"\n ],\n \"scripts\": {\n \"lint\": \"eslint lib test\",\n \"lint:fix\": \"npm run lint -- --fix\",\n \"unit\": \"istanbul test _mocha --reporter=spec test/index.js\",\n \"test\": \"npm run lint && npm run unit\",\n \"version\": \"grunt dist && git add dist/\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git@github.com:indutny/elliptic\"\n },\n \"keywords\": [\n \"EC\",\n \"Elliptic\",\n \"curve\",\n \"Cryptography\"\n ],\n \"author\": \"Fedor Indutny <fedor@indutny.com>\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/indutny/elliptic/issues\"\n },\n \"homepage\": \"https://github.com/indutny/elliptic\",\n \"devDependencies\": {\n \"brfs\": \"^2.0.2\",\n \"coveralls\": \"^3.1.0\",\n \"eslint\": \"^7.6.0\",\n \"grunt\": \"^1.2.1\",\n \"grunt-browserify\": \"^5.3.0\",\n \"grunt-cli\": \"^1.3.2\",\n \"grunt-contrib-connect\": \"^3.0.0\",\n \"grunt-contrib-copy\": \"^1.0.0\",\n \"grunt-contrib-uglify\": \"^5.0.0\",\n \"grunt-mocha-istanbul\": \"^5.0.2\",\n \"grunt-saucelabs\": \"^9.0.1\",\n \"istanbul\": \"^0.4.5\",\n \"mocha\": \"^8.0.1\"\n },\n \"dependencies\": {\n \"bn.js\": \"^4.11.9\",\n \"brorand\": \"^1.1.0\",\n \"hash.js\": \"^1.0.0\",\n \"hmac-drbg\": \"^1.0.1\",\n \"inherits\": \"^2.0.4\",\n \"minimalistic-assert\": \"^1.0.1\",\n \"minimalistic-crypto-utils\": \"^1.0.1\"\n }\n}\n", "(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\nLine truncated
|
||||
"mappings": ";;;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,aAAe;AAAA,MACf,MAAQ;AAAA,MACR,OAAS;AAAA,QACP;AAAA,MACF;AAAA,MACA,SAAW;AAAA,QACT,MAAQ;AAAA,QACR,YAAY;AAAA,QACZ,MAAQ;AAAA,QACR,MAAQ;AAAA,QACR,SAAW;AAAA,MACb;AAAA,MACA,YAAc;AAAA,QACZ,MAAQ;AAAA,QACR,KAAO;AAAA,MACT;AAAA,MACA,UAAY;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,QAAU;AAAA,MACV,SAAW;AAAA,MACX,MAAQ;AAAA,QACN,KAAO;AAAA,MACT;AAAA,MACA,UAAY;AAAA,MACZ,iBAAmB;AAAA,QACjB,MAAQ;AAAA,QACR,WAAa;AAAA,QACb,QAAU;AAAA,QACV,OAAS;AAAA,QACT,oBAAoB;AAAA,QACpB,aAAa;AAAA,QACb,yBAAyB;AAAA,QACzB,sBAAsB;AAAA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,YAAI,IAAI;AAER,YAAI;AACJ,YAAI,WAAW,MAAM;AACnB,eAAK,IAAI,OAAO,SAAS,GAAG,KAAK,OAAO,KAAK,GAAG;AAC9C,gBAAI,aAAa,QAAQ,OAAO,CAAC,KAAK;AACtC,iBAAK,MAAM,CAAC,KAAK,IAAI;AACrB,gBAAI,OAAO,IAAI;AACb,qBAAO;AACP,mBAAK;AACL,mBAAK,MAAM,CAAC,KAAK,MAALine truncated
|
||||
"names": ["module", "exports", "self", "comb10MulTo", "prime", "require_utils", "cachedProperty", "obj", "require_utils", "require_common", "require__", "require__", "require__", "require__", "curve", "e", "require_key", "require_signature", "hash"]
|
||||
}
|
||||
+2045
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../emoji-picker-element/database.js", "../../emoji-picker-element/picker.js"],
|
||||
"sourcesContent": ["function assertNonEmptyString (str) {\n if (typeof str !== 'string' || !str) {\n throw new Error('expected a non-empty string, got: ' + str)\n }\n}\n\nfunction assertNumber (number) {\n if (typeof number !== 'number') {\n throw new Error('expected a number, got: ' + number)\n }\n}\n\nconst DB_VERSION_CURRENT = 1;\nconst DB_VERSION_INITIAL = 1;\nconst STORE_EMOJI = 'emoji';\nconst STORE_KEYVALUE = 'keyvalue';\nconst STORE_FAVORITES = 'favorites';\nconst FIELD_TOKENS = 'tokens';\nconst INDEX_TOKENS = 'tokens';\nconst FIELD_UNICODE = 'unicode';\nconst INDEX_COUNT = 'count';\nconst FIELD_GROUP = 'group';\nconst FIELD_ORDER = 'order';\nconst INDEX_GROUP_AND_ORDER = 'group-order';\nconst KEY_ETAG = 'eTag';\nconst KEY_URL = 'url';\nconst KEY_PREFERRED_SKINTONE = 'skinTone';\nconst MODE_READONLY = 'readonly';\nconst MODE_READWRITE = 'readwrite';\nconst INDEX_SKIN_UNICODE = 'skinUnicodes';\nconst FIELD_SKIN_UNICODE = 'skinUnicodes';\n\nconst DEFAULT_DATA_SOURCE = 'https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json';\nconst DEFAULT_LOCALE = 'en';\n\n// like lodash's uniqBy but much smaller\nfunction uniqBy (arr, func) {\n const set = new Set();\n const res = [];\n for (const item of arr) {\n const key = func(item);\n if (!set.has(key)) {\n set.add(key);\n res.push(item);\n }\n }\n return res\n}\n\nfunction uniqEmoji (emojis) {\n return uniqBy(emojis, _ => _.unicode)\n}\n\nfunction initialMigration (db) {\n function createObjectStore (name, keyPath, indexes) {\n const store = keyPath\n ? db.createObjectStore(name, { keyPath })\n : db.createObjectStore(name);\n if (indexes) {\n for (const [indexName, [keyPath, multiEntry]] of Object.entries(indexes)) {\n store.createIndex(indexName, keyPath, { multiEntry });\n }\n }\n return store\n }\n\n createObjectStore(STORE_KEYVALUE);\n createObjectStore(STORE_EMOJI, /* keyPath */ FIELD_UNICODE, {\n [INDEX_TOKENS]: [FIELD_TOKENS, /* multiEntry */ true],\n [INDEX_GROUP_AND_ORDER]: [[FIELD_GROUP, FIELD_ORDER]],\n [INDEX_SKIN_UNICODE]: [FIELD_SKIN_UNICODE, /* multiEntry */ true]\n });\n createObjectStore(STORE_FAVORITES, undefined, {\n [INDEX_COUNT]: ['']\n });\n}\n\nconst openIndexedDBRequests = {};\nconst databaseCache = {};\nconst onCloseListeners = {};\n\nfunction handleOpenOrDeleteReq (resolve, reject, req) {\n // These things are almost impossible to test with fakeIndexedDB sadly\n /* istanbul ignore next */\n req.onerror = () => reject(req.error);\n /* istanbul ignore next */\n req.onblocked = () => reject(new Error('IDB blocked'));\n req.onsuccess = () => resolve(req.result);\n}\n\nasync function createDatabase (dbName) {\n const db = await new Promise((resolve, reject) => {\n const req = indexedDB.open(dbName, DB_VERSION_CURRENT);\n openIndexedDBRequests[dbName] = req;\n req.onupgradeneeded = e => {\n // Technically there is only one version, so we don't need this `if` check\n // But if an old version of the JS is in another browser tab\n // and it gets upgraded in the future and we have a new DB version, well...\n // better safe than sorry.\n /* istanbul ignore else */\n if (e.oldVersion < DB_VERSION_INITIAL) {\n initialMigration(req.result);\n }\n };\n handleOpenOrDeleteReq(resolve, reject, req);\n });\n // Handle abnormal closes, e.g. \"delete database\" in chrome dev tools.\n // No need for removeEventListener, because once the DB can no longer\n // fire \"close\" events, it will auto-GC.\n // Unfortunately cannot test in fakeIndexedDB: https://github.com/dumbmatter/fakeIndexedDB/issues/50\n /* istanbul ignore next */\n db.onclose = () => closeDatabase(dbName);\n return db\n}\n\nfunction openDatabase (dbName) {\n if (!databaseCache[dbName]) {\n databaseCache[dbName] = createDatabase(dbName);\n }\n return databaseCache[dbName]\n}\n\nfunction dbPromise (db, storeName, readOnlyOrReadWrite, cb) {\n return new Promise((resolve, reject) => {\n // Use relaxed durability because neither the emoji data nor the favorites/preferred skin tone\n // are really irreplaceable data. IndexedDB is just a cache in this case.\n const txn = db.transaction(storeName, readOnlyOrReadWrite, { durability: 'relaxed' });\n const store = typeof storeName === 'string'\n ? txn.objectStore(storeName)\n : storeName.map(name => txn.objectStore(name));\n let res;\n cb(store, txn, (result) => {\n res = result;\n });\n\n txn.oncomplete = () => resolve(res);\n /* istanbul ignore next */\n txn.onerror = () => reject(txn.error);\n })\n}\n\nfunction closeDatabase (dbName) {\n // close any open requests\n const req = openIndexedDBRequests[dbName];\n const db = req && req.result;\n if (db) {\n db.close();\n const listeners = onCloseListeners[dbName];\n /* istanbul ignore else */\n if (listeners) {\n for (const listener of listeLine truncated
|
||||
"mappings": ";;;AAAA,SAAS,qBAAsB,KAAK;AAClC,MAAI,OAAO,QAAQ,YAAY,CAAC,KAAK;AACnC,UAAM,IAAI,MAAM,uCAAuC,GAAG;AAAA,EAC5D;AACF;AAEA,SAAS,aAAc,QAAQ;AAC7B,MAAI,OAAO,WAAW,UAAU;AAC9B,UAAM,IAAI,MAAM,6BAA6B,MAAM;AAAA,EACrD;AACF;AAEA,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,cAAc;AACpB,IAAM,iBAAiB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AC;AACpB,iBAAW,EAAE,MAAM,OAAAC,QAAO,SAAAC,SAAQ,KAAK,OAAO;AAC5C,QAAAF,KAAI,UAAU,KAAK,IAAI;AACvB,QAAAA,KAAI,aAAa,KAAKC,MAAK;AAC3B,QAAAD,KAAI,aAAa,KAAKE,QAAO;AAAA,MAC/B;AAAA,IACF;AACA,WAAOF;AAAA,EACT,CAAC;AACD,SAAO;AACT;AAIA,SAAS,UAAW,OAAO,QAAQ,KAAK,IAAI;AAC1C,QAAM,MAAM,EAAE,GAAG,EAAE,YAAY,OAAM,MAAM,GAAG,EAAE,OAAO,MAAM;AAC/D;AAEA,SAAS,OAAQ,OAAO,KAAK,IAAI;AAC/B,YAAU,OAAO,OAAO,KAAK,EAAE;AACjC;AAEA,SAAS,UAAW,OAAO,KAAK,IAAI;AAClC,YAAU,OAAO,UAAU,KAAK,EAAE;AACpC;AAEA,SAAS,OAAQ,KAAK;AAEpB,MAAI,IAAI,QAAQ;AACd,QAAI,OAAO;AAAA,EACbLine truncated
|
||||
"names": ["set", "keyPath", "res", "emoji", "version", "_", "result", "customEmojiIndex", "results", "currentMap", "MIN_SEARCH_TEXT_LENGTH", "uniqBy", "set", "DEFAULT_DATA_SOURCE", "DEFAULT_LOCALE"]
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-HKJ2B2AA.js";
|
||||
|
||||
// node_modules/js-chacha20/src/jschacha20.js
|
||||
var require_jschacha20 = __commonJS({
|
||||
"node_modules/js-chacha20/src/jschacha20.js"(exports, module) {
|
||||
var JSChaCha20 = function(key, nonce, counter) {
|
||||
if (typeof counter === "undefined") {
|
||||
counter = 0;
|
||||
}
|
||||
if (!(key instanceof Uint8Array) || key.length !== 32) {
|
||||
throw new Error("Key should be 32 byte array!");
|
||||
}
|
||||
if (!(nonce instanceof Uint8Array) || nonce.length !== 12) {
|
||||
throw new Error("Nonce should be 12 byte array!");
|
||||
}
|
||||
this._rounds = 20;
|
||||
this._sigma = [1634760805, 857760878, 2036477234, 1797285236];
|
||||
this._param = [
|
||||
this._sigma[0],
|
||||
this._sigma[1],
|
||||
this._sigma[2],
|
||||
this._sigma[3],
|
||||
// key
|
||||
this._get32(key, 0),
|
||||
this._get32(key, 4),
|
||||
this._get32(key, 8),
|
||||
this._get32(key, 12),
|
||||
this._get32(key, 16),
|
||||
this._get32(key, 20),
|
||||
this._get32(key, 24),
|
||||
this._get32(key, 28),
|
||||
// counter
|
||||
counter,
|
||||
// nonce
|
||||
this._get32(nonce, 0),
|
||||
this._get32(nonce, 4),
|
||||
this._get32(nonce, 8)
|
||||
];
|
||||
this._keystream = [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
];
|
||||
this._byteCounter = 0;
|
||||
};
|
||||
JSChaCha20.prototype._chacha = function() {
|
||||
var mix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||
var i = 0;
|
||||
var b = 0;
|
||||
for (i = 0; i < 16; i++) {
|
||||
mix[i] = this._param[i];
|
||||
}
|
||||
for (i = 0; i < this._rounds; i += 2) {
|
||||
this._quarterround(mix, 0, 4, 8, 12);
|
||||
this._quarterround(mix, 1, 5, 9, 13);
|
||||
this._quarterround(mix, 2, 6, 10, 14);
|
||||
this._quarterround(mix, 3, 7, 11, 15);
|
||||
this._quarterround(mix, 0, 5, 10, 15);
|
||||
this._quarterround(mix, 1, 6, 11, 12);
|
||||
this._quarterround(mix, 2, 7, 8, 13);
|
||||
this._quarterround(mix, 3, 4, 9, 14);
|
||||
}
|
||||
for (i = 0; i < 16; i++) {
|
||||
mix[i] += this._param[i];
|
||||
this._keystream[b++] = mix[i] & 255;
|
||||
this._keystream[b++] = mix[i] >>> 8 & 255;
|
||||
this._keystream[b++] = mix[i] >>> 16 & 255;
|
||||
this._keystream[b++] = mix[i] >>> 24 & 255;
|
||||
}
|
||||
};
|
||||
JSChaCha20.prototype._quarterround = function(output, a, b, c, d) {
|
||||
output[d] = this._rotl(output[d] ^ (output[a] += output[b]), 16);
|
||||
output[b] = this._rotl(output[b] ^ (output[c] += output[d]), 12);
|
||||
output[d] = this._rotl(output[d] ^ (output[a] += output[b]), 8);
|
||||
output[b] = this._rotl(output[b] ^ (output[c] += output[d]), 7);
|
||||
output[a] >>>= 0;
|
||||
output[b] >>>= 0;
|
||||
output[c] >>>= 0;
|
||||
output[d] >>>= 0;
|
||||
};
|
||||
JSChaCha20.prototype._get32 = function(data, index) {
|
||||
return data[index++] ^ data[index++] << 8 ^ data[index++] << 16 ^ data[index] << 24;
|
||||
};
|
||||
JSChaCha20.prototype._rotl = function(data, shift) {
|
||||
return data << shift | data >>> 32 - shift;
|
||||
};
|
||||
JSChaCha20.prototype.encrypt = function(data) {
|
||||
return this._update(data);
|
||||
};
|
||||
JSChaCha20.prototype.decrypt = function(data) {
|
||||
return this._update(data);
|
||||
};
|
||||
JSChaCha20.prototype._update = function(data) {
|
||||
if (!(data instanceof Uint8Array) || data.length === 0) {
|
||||
throw new Error("Data should be type of bytes (Uint8Array) and not empty!");
|
||||
}
|
||||
var output = new Uint8Array(data.length);
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (this._byteCounter === 0 || this._byteCounter === 64) {
|
||||
this._chacha();
|
||||
this._param[12]++;
|
||||
this._byteCounter = 0;
|
||||
}
|
||||
output[i] = data[i] ^ this._keystream[this._byteCounter++];
|
||||
}
|
||||
return output;
|
||||
};
|
||||
if (typeof module !== "undefined" && module.exports) {
|
||||
module.exports = JSChaCha20;
|
||||
}
|
||||
}
|
||||
});
|
||||
export default require_jschacha20();
|
||||
//# sourceMappingURL=js-chacha20.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../js-chacha20/src/jschacha20.js"],
|
||||
"sourcesContent": ["'use strict'\n/*\n * Copyright (c) 2017, Bubelich Mykola\n * https, 0x//www.bubelich.com\n *\n * (。◕‿‿◕。)\n *\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met, 0x\n *\n * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * Neither the name of the copyright holder nor the names of its contributors\n * may be used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *\n * ChaCha20 is a stream cipher designed by D. J. Bernstein.\n * It is a refinement of the Salsa20 algorithm, and it uses a 256-bit key.\n *\n * ChaCha20 successively calls the ChaCha20 block function, with the same key and nonce, and with successively increasing block counter parameters.\n * ChaCha20 then serializes the resulting state by writing the numbers in little-endian order, creating a keystream block.\n *\n * Concatenating the keystream blocks from the successive blocks forms a keystream.\n * The ChaCha20 function then performs an XOR of this keystream with the plaintext.\n * Alternatively, each keystream block can be XORed with a plaintext block before proceeding to create the next block, saving some memory.\n * There is no requirement for the plaintext to be an integral multiple of 512 bits. If there is extra keystream from the last block, it is discarded.\n *\n * The inputs to ChaCha20 are\n * - 256-bit key\n * - 32-bit initial counter\n * - 96-bit nonce. In some protocols, this is known as the Initialization Vector\n * - Arbitrary-length plaintext\n *\n * Implementation derived from chacha-ref.c version 20080118\n * See for details, 0x http, 0x//cr.yp.to/chacha/chacha-20080128.pdf\n */\n\n/**\n *\n * @param {Uint8Array} key\n * @param {Uint8Array} nonce\n * @param {number} counter\n * @throws {Error}\n *\n * @constructor\n */\nvar JSChaCha20 = function (key, nonce, counter) {\n if (typeof counter === 'undefined') {\n counter = 0\n }\n\n if (!(key instanceof Uint8Array) || key.length !== 32) {\n throw new Error('Key should be 32 byte array!')\n }\n\n if (!(nonce instanceof Uint8Array) || nonce.length !== 12) {\n throw new Error('Nonce should be 12 byte array!')\n }\n\n this._rounds = 20\n // Constants\n this._sigma = [0x61707865, 0x3320646e, 0x79622d32, 0x6b206574]\n\n // param construction\n this._param = [\n this._sigma[0],\n this._sigma[1],\n this._sigma[2],\n this._sigma[3],\n // key\n this._get32(key, 0),\n this._get32(key, 4),\n this._get32(key, 8),\n this._get32(key, 12),\n this._get32(key, 16),\n this._get32(key, 20),\n this._get32(key, 24),\n this._get32(key, 28),\n // counter\n counter,\n // nonce\n this._get32(nonce, 0),\n this._get32(nonce, 4),\n this._get32(nonce, 8)\n ]\n\n // init 64 byte keystream block //\n this._keystream = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n ]\n\n // internal byte counter //\n this._byteCounter = 0\n}\n\nJSChaCha20.prototype._chacha = function () {\n var mix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n var i = 0\n var b = 0\n\n // copy param array to mix //\n for (i = 0; i < 16; i++) {\n mix[i] = this._param[i]\n }\n\n // mix rounds //\n for (i = 0; i < this._rounds; i += 2) {\n this._quarterround(mix, 0, 4, 8, 12)\n this._quarterround(mix, 1, 5, 9, 13)\n this._quarterround(mix, 2, 6, 10, 14)\n this._quarterround(mix, 3, 7, 11, 15)\n\n this._quarterround(mix, 0, 5, 10, 15)\n this._quarterround(mix, 1, 6, 11, 12)\n this._quarterround(mix, 2, 7, 8, 13)\n this._quarterround(mix, 3, 4, 9, 14)\n }\n\Line truncated
|
||||
"mappings": ";;;;;AAAA;AAAA;AAiEA,QAAI,aAAa,SAAU,KAAK,OAAO,SAAS;AAC9C,UAAI,OAAO,YAAY,aAAa;AAClC,kBAAU;AAAA,MACZ;AAEA,UAAI,EAAE,eAAe,eAAe,IAAI,WAAW,IAAI;AACrD,cAAM,IAAI,MAAM,8BAA8B;AAAA,MAChD;AAEA,UAAI,EAAE,iBA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,MAC5E;AAEA,UAAI,SAAS,IAAI,WAAW,KAAK,MAAM;AAGvC,eAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAI,KAAK,iBAAiB,KAAK,KAAK,iBAAiB,IAAI;AAGvD,eAAK,QAAQ;AAEb,eAAK,OAAO,EAAE;AAGd,eAAK,eAAe;AAAA,QACtB;AAEA,eAAO,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,KAAK,cAAc;AAAA,MAC3D;AAEA,aAAO;AAAA,IACT;AAGA,QAAI,OAAO,WAAW,eAAe,OAAO,SAAS;AACnD,aAAO,UAAU;AAAA,IACnB;AAAA;AAAA;",
|
||||
"names": []
|
||||
}
|
||||
+539
@@ -0,0 +1,539 @@
|
||||
import {
|
||||
require_buffer,
|
||||
require_crypto
|
||||
} from "./chunk-LNRWHUEM.js";
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-HKJ2B2AA.js";
|
||||
|
||||
// node_modules/js-sha256/src/sha256.js
|
||||
var require_sha256 = __commonJS({
|
||||
"node_modules/js-sha256/src/sha256.js"(exports, module) {
|
||||
(function() {
|
||||
"use strict";
|
||||
var ERROR = "input is invalid type";
|
||||
var WINDOW = typeof window === "object";
|
||||
var root = WINDOW ? window : {};
|
||||
if (root.JS_SHA256_NO_WINDOW) {
|
||||
WINDOW = false;
|
||||
}
|
||||
var WEB_WORKER = !WINDOW && typeof self === "object";
|
||||
var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node;
|
||||
if (NODE_JS) {
|
||||
root = global;
|
||||
} else if (WEB_WORKER) {
|
||||
root = self;
|
||||
}
|
||||
var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === "object" && module.exports;
|
||||
var AMD = typeof define === "function" && define.amd;
|
||||
var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== "undefined";
|
||||
var HEX_CHARS = "0123456789abcdef".split("");
|
||||
var EXTRA = [-2147483648, 8388608, 32768, 128];
|
||||
var SHIFT = [24, 16, 8, 0];
|
||||
var K = [
|
||||
1116352408,
|
||||
1899447441,
|
||||
3049323471,
|
||||
3921009573,
|
||||
961987163,
|
||||
1508970993,
|
||||
2453635748,
|
||||
2870763221,
|
||||
3624381080,
|
||||
310598401,
|
||||
607225278,
|
||||
1426881987,
|
||||
1925078388,
|
||||
2162078206,
|
||||
2614888103,
|
||||
3248222580,
|
||||
3835390401,
|
||||
4022224774,
|
||||
264347078,
|
||||
604807628,
|
||||
770255983,
|
||||
1249150122,
|
||||
1555081692,
|
||||
1996064986,
|
||||
2554220882,
|
||||
2821834349,
|
||||
2952996808,
|
||||
3210313671,
|
||||
3336571891,
|
||||
3584528711,
|
||||
113926993,
|
||||
338241895,
|
||||
666307205,
|
||||
773529912,
|
||||
1294757372,
|
||||
1396182291,
|
||||
1695183700,
|
||||
1986661051,
|
||||
2177026350,
|
||||
2456956037,
|
||||
2730485921,
|
||||
2820302411,
|
||||
3259730800,
|
||||
3345764771,
|
||||
3516065817,
|
||||
3600352804,
|
||||
4094571909,
|
||||
275423344,
|
||||
430227734,
|
||||
506948616,
|
||||
659060556,
|
||||
883997877,
|
||||
958139571,
|
||||
1322822218,
|
||||
1537002063,
|
||||
1747873779,
|
||||
1955562222,
|
||||
2024104815,
|
||||
2227730452,
|
||||
2361852424,
|
||||
2428436474,
|
||||
2756734187,
|
||||
3204031479,
|
||||
3329325298
|
||||
];
|
||||
var OUTPUT_TYPES = ["hex", "array", "digest", "arrayBuffer"];
|
||||
var blocks = [];
|
||||
if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {
|
||||
Array.isArray = function(obj) {
|
||||
return Object.prototype.toString.call(obj) === "[object Array]";
|
||||
};
|
||||
}
|
||||
if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
|
||||
ArrayBuffer.isView = function(obj) {
|
||||
return typeof obj === "object" && obj.buffer && obj.buffer.constructor === ArrayBuffer;
|
||||
};
|
||||
}
|
||||
var createOutputMethod = function(outputType, is224) {
|
||||
return function(message) {
|
||||
return new Sha256(is224, true).update(message)[outputType]();
|
||||
};
|
||||
};
|
||||
var createMethod = function(is224) {
|
||||
var method = createOutputMethod("hex", is224);
|
||||
if (NODE_JS) {
|
||||
method = nodeWrap(method, is224);
|
||||
}
|
||||
method.create = function() {
|
||||
return new Sha256(is224);
|
||||
};
|
||||
method.update = function(message) {
|
||||
return method.create().update(message);
|
||||
};
|
||||
for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
|
||||
var type = OUTPUT_TYPES[i];
|
||||
method[type] = createOutputMethod(type, is224);
|
||||
}
|
||||
return method;
|
||||
};
|
||||
var nodeWrap = function(method, is224) {
|
||||
var crypto = require_crypto();
|
||||
var Buffer = require_buffer().Buffer;
|
||||
var algorithm = is224 ? "sha224" : "sha256";
|
||||
var bufferFrom;
|
||||
if (Buffer.from && !root.JS_SHA256_NO_BUFFER_FROM) {
|
||||
bufferFrom = Buffer.from;
|
||||
} else {
|
||||
bufferFrom = function(message) {
|
||||
return new Buffer(message);
|
||||
};
|
||||
}
|
||||
var nodeMethod = function(message) {
|
||||
if (typeof message === "string") {
|
||||
return crypto.createHash(algorithm).update(message, "utf8").digest("hex");
|
||||
} else {
|
||||
if (message === null || message === void 0) {
|
||||
throw new Error(ERROR);
|
||||
} else if (message.constructor === ArrayBuffer) {
|
||||
message = new Uint8Array(message);
|
||||
}
|
||||
}
|
||||
if (Array.isArray(message) || ArrayBuffer.isView(message) || message.constructor === Buffer) {
|
||||
return crypto.createHash(algorithm).update(bufferFrom(message)).digest("hex");
|
||||
} else {
|
||||
return method(message);
|
||||
}
|
||||
};
|
||||
return nodeMethod;
|
||||
};
|
||||
var createHmacOutputMethod = function(outputType, is224) {
|
||||
return function(key, message) {
|
||||
return new HmacSha256(key, is224, true).update(message)[outputType]();
|
||||
};
|
||||
};
|
||||
var createHmacMethod = function(is224) {
|
||||
var method = createHmacOutputMethod("hex", is224);
|
||||
method.create = function(key) {
|
||||
return new HmacSha256(key, is224);
|
||||
};
|
||||
method.update = function(key, message) {
|
||||
return method.create(key).update(message);
|
||||
};
|
||||
for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
|
||||
var type = OUTPUT_TYPES[i];
|
||||
method[type] = createHmacOutputMethod(type, is224);
|
||||
}
|
||||
return method;
|
||||
};
|
||||
function Sha256(is224, sharedMemory) {
|
||||
if (sharedMemory) {
|
||||
blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
|
||||
this.blocks = blocks;
|
||||
} else {
|
||||
this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||
}
|
||||
if (is224) {
|
||||
this.h0 = 3238371032;
|
||||
this.h1 = 914150663;
|
||||
this.h2 = 812702999;
|
||||
this.h3 = 4144912697;
|
||||
this.h4 = 4290775857;
|
||||
this.h5 = 1750603025;
|
||||
this.h6 = 1694076839;
|
||||
this.h7 = 3204075428;
|
||||
} else {
|
||||
this.h0 = 1779033703;
|
||||
this.h1 = 3144134277;
|
||||
this.h2 = 1013904242;
|
||||
this.h3 = 2773480762;
|
||||
this.h4 = 1359893119;
|
||||
this.h5 = 2600822924;
|
||||
this.h6 = 528734635;
|
||||
this.h7 = 1541459225;
|
||||
}
|
||||
this.block = this.start = this.bytes = this.hBytes = 0;
|
||||
this.finalized = this.hashed = false;
|
||||
this.first = true;
|
||||
this.is224 = is224;
|
||||
}
|
||||
Sha256.prototype.update = function(message) {
|
||||
if (this.finalized) {
|
||||
return;
|
||||
}
|
||||
var notString, type = typeof message;
|
||||
if (type !== "string") {
|
||||
if (type === "object") {
|
||||
if (message === null) {
|
||||
throw new Error(ERROR);
|
||||
} else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
|
||||
message = new Uint8Array(message);
|
||||
} else if (!Array.isArray(message)) {
|
||||
if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
|
||||
throw new Error(ERROR);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error(ERROR);
|
||||
}
|
||||
notString = true;
|
||||
}
|
||||
var code, index = 0, i, length = message.length, blocks2 = this.blocks;
|
||||
while (index < length) {
|
||||
if (this.hashed) {
|
||||
this.hashed = false;
|
||||
blocks2[0] = this.block;
|
||||
this.block = blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0;
|
||||
}
|
||||
if (notString) {
|
||||
for (i = this.start; index < length && i < 64; ++index) {
|
||||
blocks2[i >>> 2] |= message[index] << SHIFT[i++ & 3];
|
||||
}
|
||||
} else {
|
||||
for (i = this.start; index < length && i < 64; ++index) {
|
||||
code = message.charCodeAt(index);
|
||||
if (code < 128) {
|
||||
blocks2[i >>> 2] |= code << SHIFT[i++ & 3];
|
||||
} else if (code < 2048) {
|
||||
blocks2[i >>> 2] |= (192 | code >>> 6) << SHIFT[i++ & 3];
|
||||
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
|
||||
} else if (code < 55296 || code >= 57344) {
|
||||
blocks2[i >>> 2] |= (224 | code >>> 12) << SHIFT[i++ & 3];
|
||||
blocks2[i >>> 2] |= (128 | code >>> 6 & 63) << SHIFT[i++ & 3];
|
||||
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
|
||||
} else {
|
||||
code = 65536 + ((code & 1023) << 10 | message.charCodeAt(++index) & 1023);
|
||||
blocks2[i >>> 2] |= (240 | code >>> 18) << SHIFT[i++ & 3];
|
||||
blocks2[i >>> 2] |= (128 | code >>> 12 & 63) << SHIFT[i++ & 3];
|
||||
blocks2[i >>> 2] |= (128 | code >>> 6 & 63) << SHIFT[i++ & 3];
|
||||
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
|
||||
}
|
||||
}
|
||||
}
|
||||
this.lastByteIndex = i;
|
||||
this.bytes += i - this.start;
|
||||
if (i >= 64) {
|
||||
this.block = blocks2[16];
|
||||
this.start = i - 64;
|
||||
this.hash();
|
||||
this.hashed = true;
|
||||
} else {
|
||||
this.start = i;
|
||||
}
|
||||
}
|
||||
if (this.bytes > 4294967295) {
|
||||
this.hBytes += this.bytes / 4294967296 << 0;
|
||||
this.bytes = this.bytes % 4294967296;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
Sha256.prototype.finalize = function() {
|
||||
if (this.finalized) {
|
||||
return;
|
||||
}
|
||||
this.finalized = true;
|
||||
var blocks2 = this.blocks, i = this.lastByteIndex;
|
||||
blocks2[16] = this.block;
|
||||
blocks2[i >>> 2] |= EXTRA[i & 3];
|
||||
this.block = blocks2[16];
|
||||
if (i >= 56) {
|
||||
if (!this.hashed) {
|
||||
this.hash();
|
||||
}
|
||||
blocks2[0] = this.block;
|
||||
blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0;
|
||||
}
|
||||
blocks2[14] = this.hBytes << 3 | this.bytes >>> 29;
|
||||
blocks2[15] = this.bytes << 3;
|
||||
this.hash();
|
||||
};
|
||||
Sha256.prototype.hash = function() {
|
||||
var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks2 = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;
|
||||
for (j = 16; j < 64; ++j) {
|
||||
t1 = blocks2[j - 15];
|
||||
s0 = (t1 >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3;
|
||||
t1 = blocks2[j - 2];
|
||||
s1 = (t1 >>> 17 | t1 << 15) ^ (t1 >>> 19 | t1 << 13) ^ t1 >>> 10;
|
||||
blocks2[j] = blocks2[j - 16] + s0 + blocks2[j - 7] + s1 << 0;
|
||||
}
|
||||
bc = b & c;
|
||||
for (j = 0; j < 64; j += 4) {
|
||||
if (this.first) {
|
||||
if (this.is224) {
|
||||
ab = 300032;
|
||||
t1 = blocks2[0] - 1413257819;
|
||||
h = t1 - 150054599 << 0;
|
||||
d = t1 + 24177077 << 0;
|
||||
} else {
|
||||
ab = 704751109;
|
||||
t1 = blocks2[0] - 210244248;
|
||||
h = t1 - 1521486534 << 0;
|
||||
d = t1 + 143694565 << 0;
|
||||
}
|
||||
this.first = false;
|
||||
} else {
|
||||
s0 = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10);
|
||||
s1 = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
|
||||
ab = a & b;
|
||||
maj = ab ^ a & c ^ bc;
|
||||
ch = e & f ^ ~e & g;
|
||||
t1 = h + s1 + ch + K[j] + blocks2[j];
|
||||
t2 = s0 + maj;
|
||||
h = d + t1 << 0;
|
||||
d = t1 + t2 << 0;
|
||||
}
|
||||
s0 = (d >>> 2 | d << 30) ^ (d >>> 13 | d << 19) ^ (d >>> 22 | d << 10);
|
||||
s1 = (h >>> 6 | h << 26) ^ (h >>> 11 | h << 21) ^ (h >>> 25 | h << 7);
|
||||
da = d & a;
|
||||
maj = da ^ d & b ^ ab;
|
||||
ch = h & e ^ ~h & f;
|
||||
t1 = g + s1 + ch + K[j + 1] + blocks2[j + 1];
|
||||
t2 = s0 + maj;
|
||||
g = c + t1 << 0;
|
||||
c = t1 + t2 << 0;
|
||||
s0 = (c >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10);
|
||||
s1 = (g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7);
|
||||
cd = c & d;
|
||||
maj = cd ^ c & a ^ da;
|
||||
ch = g & h ^ ~g & e;
|
||||
t1 = f + s1 + ch + K[j + 2] + blocks2[j + 2];
|
||||
t2 = s0 + maj;
|
||||
f = b + t1 << 0;
|
||||
b = t1 + t2 << 0;
|
||||
s0 = (b >>> 2 | b << 30) ^ (b >>> 13 | b << 19) ^ (b >>> 22 | b << 10);
|
||||
s1 = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7);
|
||||
bc = b & c;
|
||||
maj = bc ^ b & d ^ cd;
|
||||
ch = f & g ^ ~f & h;
|
||||
t1 = e + s1 + ch + K[j + 3] + blocks2[j + 3];
|
||||
t2 = s0 + maj;
|
||||
e = a + t1 << 0;
|
||||
a = t1 + t2 << 0;
|
||||
this.chromeBugWorkAround = true;
|
||||
}
|
||||
this.h0 = this.h0 + a << 0;
|
||||
this.h1 = this.h1 + b << 0;
|
||||
this.h2 = this.h2 + c << 0;
|
||||
this.h3 = this.h3 + d << 0;
|
||||
this.h4 = this.h4 + e << 0;
|
||||
this.h5 = this.h5 + f << 0;
|
||||
this.h6 = this.h6 + g << 0;
|
||||
this.h7 = this.h7 + h << 0;
|
||||
};
|
||||
Sha256.prototype.hex = function() {
|
||||
this.finalize();
|
||||
var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7;
|
||||
var hex = HEX_CHARS[h0 >>> 28 & 15] + HEX_CHARS[h0 >>> 24 & 15] + HEX_CHARS[h0 >>> 20 & 15] + HEX_CHARS[h0 >>> 16 & 15] + HEX_CHARS[h0 >>> 12 & 15] + HEX_CHARS[h0 >>> 8 & 15] + HEX_CHARS[h0 >>> 4 & 15] + HEX_CHARS[h0 & 15] + HEX_CHARS[h1 >>> 28 & 15] + HEX_CHARS[h1 >>> 24 & 15] + HEX_CHARS[h1 >>> 20 & 15] + HEX_CHARS[h1 >>> 16 & 15] + HEX_CHARS[h1 >>> 12 & 15] + HEX_CHARS[h1 >>> 8 & 15] + HEX_CHARS[h1 >>> 4 & 15] + HEX_CHARS[h1 & 15] + HEX_CHARS[h2 >>> 28 & 15] + HEX_CHARS[h2 >>> 24 & 15] + HEX_CHARS[h2 >>> 20 & 15] + HEX_CHARS[h2 >>> 16 & 15] + HEX_CHARS[h2 >>> 12 & 15] + HEX_CHARS[h2 >>> 8 & 15] + HEX_CHARS[h2 >>> 4 & 15] + HEX_CHARS[h2 & 15] + HEX_CHARS[h3 >>> 28 & 15] + HEX_CHARS[h3 >>> 24 & 15] + HEX_CHARS[h3 >>> 20 & 15] + HEX_CHARS[h3 >>> 16 & 15] + HEX_CHARS[h3 >>> 12 & 15] + HEX_CHARS[h3 >>> 8 & 15] + HEX_CHARS[h3 >>> 4 & 15] + HEX_CHARS[h3 & 15] + HEX_CHARS[h4 >>> 28 & 15] + HEX_CHARS[h4 >>> 24 & 15] + HEX_CHARS[h4 >>> 20 & 15] + HEX_CHARS[h4 >>> 16 & 15] + HEX_CHARS[h4 >>> 12 & 15] + HEX_CHARS[h4 >>> 8 & 15] + HEX_CHARS[h4 >>> 4 & 15] + HEX_CHARS[h4 & 15] + HEX_CHARS[h5 >>> 28 & 15] + HEX_CHARS[h5 >>> 24 & 15] + HEX_CHARS[h5 >>> 20 & 15] + HEX_CHARS[h5 >>> 16 & 15] + HEX_CHARS[h5 >>> 12 & 15] + HEX_CHARS[h5 >>> 8 & 15] + HEX_CHARS[h5 >>> 4 & 15] + HEX_CHARS[h5 & 15] + HEX_CHARS[h6 >>> 28 & 15] + HEX_CHARS[h6 >>> 24 & 15] + HEX_CHARS[h6 >>> 20 & 15] + HEX_CHARS[h6 >>> 16 & 15] + HEX_CHARS[h6 >>> 12 & 15] + HEX_CHARS[h6 >>> 8 & 15] + HEX_CHARS[h6 >>> 4 & 15] + HEX_CHARS[h6 & 15];
|
||||
if (!this.is224) {
|
||||
hex += HEX_CHARS[h7 >>> 28 & 15] + HEX_CHARS[h7 >>> 24 & 15] + HEX_CHARS[h7 >>> 20 & 15] + HEX_CHARS[h7 >>> 16 & 15] + HEX_CHARS[h7 >>> 12 & 15] + HEX_CHARS[h7 >>> 8 & 15] + HEX_CHARS[h7 >>> 4 & 15] + HEX_CHARS[h7 & 15];
|
||||
}
|
||||
return hex;
|
||||
};
|
||||
Sha256.prototype.toString = Sha256.prototype.hex;
|
||||
Sha256.prototype.digest = function() {
|
||||
this.finalize();
|
||||
var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7;
|
||||
var arr = [
|
||||
h0 >>> 24 & 255,
|
||||
h0 >>> 16 & 255,
|
||||
h0 >>> 8 & 255,
|
||||
h0 & 255,
|
||||
h1 >>> 24 & 255,
|
||||
h1 >>> 16 & 255,
|
||||
h1 >>> 8 & 255,
|
||||
h1 & 255,
|
||||
h2 >>> 24 & 255,
|
||||
h2 >>> 16 & 255,
|
||||
h2 >>> 8 & 255,
|
||||
h2 & 255,
|
||||
h3 >>> 24 & 255,
|
||||
h3 >>> 16 & 255,
|
||||
h3 >>> 8 & 255,
|
||||
h3 & 255,
|
||||
h4 >>> 24 & 255,
|
||||
h4 >>> 16 & 255,
|
||||
h4 >>> 8 & 255,
|
||||
h4 & 255,
|
||||
h5 >>> 24 & 255,
|
||||
h5 >>> 16 & 255,
|
||||
h5 >>> 8 & 255,
|
||||
h5 & 255,
|
||||
h6 >>> 24 & 255,
|
||||
h6 >>> 16 & 255,
|
||||
h6 >>> 8 & 255,
|
||||
h6 & 255
|
||||
];
|
||||
if (!this.is224) {
|
||||
arr.push(h7 >>> 24 & 255, h7 >>> 16 & 255, h7 >>> 8 & 255, h7 & 255);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
Sha256.prototype.array = Sha256.prototype.digest;
|
||||
Sha256.prototype.arrayBuffer = function() {
|
||||
this.finalize();
|
||||
var buffer = new ArrayBuffer(this.is224 ? 28 : 32);
|
||||
var dataView = new DataView(buffer);
|
||||
dataView.setUint32(0, this.h0);
|
||||
dataView.setUint32(4, this.h1);
|
||||
dataView.setUint32(8, this.h2);
|
||||
dataView.setUint32(12, this.h3);
|
||||
dataView.setUint32(16, this.h4);
|
||||
dataView.setUint32(20, this.h5);
|
||||
dataView.setUint32(24, this.h6);
|
||||
if (!this.is224) {
|
||||
dataView.setUint32(28, this.h7);
|
||||
}
|
||||
return buffer;
|
||||
};
|
||||
function HmacSha256(key, is224, sharedMemory) {
|
||||
var i, type = typeof key;
|
||||
if (type === "string") {
|
||||
var bytes = [], length = key.length, index = 0, code;
|
||||
for (i = 0; i < length; ++i) {
|
||||
code = key.charCodeAt(i);
|
||||
if (code < 128) {
|
||||
bytes[index++] = code;
|
||||
} else if (code < 2048) {
|
||||
bytes[index++] = 192 | code >>> 6;
|
||||
bytes[index++] = 128 | code & 63;
|
||||
} else if (code < 55296 || code >= 57344) {
|
||||
bytes[index++] = 224 | code >>> 12;
|
||||
bytes[index++] = 128 | code >>> 6 & 63;
|
||||
bytes[index++] = 128 | code & 63;
|
||||
} else {
|
||||
code = 65536 + ((code & 1023) << 10 | key.charCodeAt(++i) & 1023);
|
||||
bytes[index++] = 240 | code >>> 18;
|
||||
bytes[index++] = 128 | code >>> 12 & 63;
|
||||
bytes[index++] = 128 | code >>> 6 & 63;
|
||||
bytes[index++] = 128 | code & 63;
|
||||
}
|
||||
}
|
||||
key = bytes;
|
||||
} else {
|
||||
if (type === "object") {
|
||||
if (key === null) {
|
||||
throw new Error(ERROR);
|
||||
} else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {
|
||||
key = new Uint8Array(key);
|
||||
} else if (!Array.isArray(key)) {
|
||||
if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {
|
||||
throw new Error(ERROR);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error(ERROR);
|
||||
}
|
||||
}
|
||||
if (key.length > 64) {
|
||||
key = new Sha256(is224, true).update(key).array();
|
||||
}
|
||||
var oKeyPad = [], iKeyPad = [];
|
||||
for (i = 0; i < 64; ++i) {
|
||||
var b = key[i] || 0;
|
||||
oKeyPad[i] = 92 ^ b;
|
||||
iKeyPad[i] = 54 ^ b;
|
||||
}
|
||||
Sha256.call(this, is224, sharedMemory);
|
||||
this.update(iKeyPad);
|
||||
this.oKeyPad = oKeyPad;
|
||||
this.inner = true;
|
||||
this.sharedMemory = sharedMemory;
|
||||
}
|
||||
HmacSha256.prototype = new Sha256();
|
||||
HmacSha256.prototype.finalize = function() {
|
||||
Sha256.prototype.finalize.call(this);
|
||||
if (this.inner) {
|
||||
this.inner = false;
|
||||
var innerHash = this.array();
|
||||
Sha256.call(this, this.is224, this.sharedMemory);
|
||||
this.update(this.oKeyPad);
|
||||
this.update(innerHash);
|
||||
Sha256.prototype.finalize.call(this);
|
||||
}
|
||||
};
|
||||
var exports2 = createMethod();
|
||||
exports2.sha256 = exports2;
|
||||
exports2.sha224 = createMethod(true);
|
||||
exports2.sha256.hmac = createHmacMethod();
|
||||
exports2.sha224.hmac = createHmacMethod(true);
|
||||
if (COMMON_JS) {
|
||||
module.exports = exports2;
|
||||
} else {
|
||||
root.sha256 = exports2.sha256;
|
||||
root.sha224 = exports2.sha224;
|
||||
if (AMD) {
|
||||
define(function() {
|
||||
return exports2;
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
}
|
||||
});
|
||||
export default require_sha256();
|
||||
/*! Bundled license information:
|
||||
|
||||
js-sha256/src/sha256.js:
|
||||
(**
|
||||
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
||||
*
|
||||
* @version 0.11.0
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2024
|
||||
* @license MIT
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=js-sha256.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../js-sha256/src/sha256.js"],
|
||||
"sourcesContent": ["/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.11.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2024\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = require('crypto')\n var Buffer = require('buffer').Buffer;\n var algorithm = is224 ? 'sha224' : 'sha256';\n var bufferFrom;\n if (Buffer.from && !root.JS_SHA256_NO_BUFFER_FROM) {\n bufferFrom = Buffer.from;\n } else {\n bufferFrom = function (message) {\n return new Buffer(message);\n };\n }\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(bufferFrom(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blLine truncated
|
||||
"mappings": ";;;;;;;;;AAAA;AAAA;AASA,KAAC,WAAY;AACX;AAEA,UAAI,QAAQ;AACZ,UAAI,SAAS,OAAO,WAAW;AAC/B,UAAI,OAAO,SAAS,SAAS,CAAC;AAC9B,UAAI,KAAK,qBAAqB;AAC5B,iBAAS;AAAA,MACX;AACA,UAAI,aAAa,CAAC,UAAU,OAAO,SAAS;AAC5C,UAAI,UAAU,CAAC,KAAK,wBAAwB,OAAO,YAAY,YAAY,QAAQ,YAAY,QAAQ,SAAS;AAChH,UAAI,SAAS;AACX,eAAO;AAAA,MACT,WAAW,YAAY;AACrB,eAAO;AAAA,MACT;AACA,UAAI,YAAY,CAAC,KAAK,0BAA0B,OAAO,WAAW,YAAY,OAAO;AACrF,UAAI,MAAM,OAAO,WAAW,cAAc,OAAO;AACjD,UAAI,eAAe,CAAC,KAAK,6BAA6B,OAAO,gBAAgB;AAC7E,UAAI,YAAY,mBAAmB,MAAM,EAAE;AAC3C,UAAI,QAAQ,CAAC,aAAa,SAAS,OAAO,GAAG;AAC7C,UAAI,QAAQ,CAAC,IAAI,IAAI,GAAG,CAAC;AACzB,UAAI,IAAI;AAAA,QACN;A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iBAAK,QAAQA,QAAO,EAAE,IAAIA,QAAO,CAAC,IAAIA,QAAO,CAAC,IAAIA,QAAO,CAAC,IACxDA,QAAO,CAAC,IAAIA,QAAO,CAAC,IAAIA,QAAO,CAAC,IAAIA,QAAO,CAAC,IAC5CA,QAAO,CAAC,IAAIA,QAAO,CAAC,IAAIA,QAAO,EAAE,IAAIA,QAAO,EAAE,ILine truncated
|
||||
"names": ["blocks", "exports"]
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Florian Körner
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<h1><img src="https://www.dicebear.com/logo-readme.svg" width="28" /> DiceBear</h1>
|
||||
|
||||
<p>
|
||||
<img src="https://api.dicebear.com/6.x/adventurer/svg?seed=Mimi&backgroundColor=0077b6&radius=10" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/open-peeps/svg?seed=Kitty&backgroundColor=0096c7&radius=10" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/pixel-art/svg?seed=Lilly&backgroundColor=00b4d8&radius=10" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/lorelei/svg?seed=Tigger&backgroundColor=48cae4&radius=10" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/bottts/svg?seed=Zoe&backgroundColor=90e0ef&radius=10" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/initials/svg?seed=..&backgroundColor=ade8f4&radius=10" width="64" />
|
||||
</p>
|
||||
|
||||
With DiceBear you can create awesome avatars for your project in no time.
|
||||
Whether you are looking for abstract shapes or lovingly designed characters, you
|
||||
will find something suitable among our avatar styles. And no matter how and for
|
||||
what you want to use the avatars, DiceBear offers the right solution!
|
||||
|
||||
In addition to purely random avatars, you can also create deterministic avatars
|
||||
for user identities. With the built-in PRNG you create the same avatar over and
|
||||
over again based on a seed. But also individual avatars are possible! Just use
|
||||
the countless options that each avatar style provides.
|
||||
|
||||
And thanks to the JavaScript library, HTTP API, CLI, Figma plugin and
|
||||
Playground, your next avatar is always just a stone's throw away!
|
||||
|
||||
[Playground](https://www.dicebear.com/playground) |
|
||||
[Documentation](https://www.dicebear.com/introduction)
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { Result, Style, StyleOptions } from './types.js';
|
||||
export declare function createAvatar<O extends {}>(style: Style<O>, options?: StyleOptions<O>): Result;
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
import * as svgUtils from './utils/svg.js';
|
||||
import { merge as mergeOptions } from './utils/options.js';
|
||||
import { create as createPrng } from './utils/prng.js';
|
||||
import * as license from './utils/license.js';
|
||||
import { getBackgroundColors } from './utils/color.js';
|
||||
export function createAvatar(style, options = {}) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
options = mergeOptions(style, options);
|
||||
const prng = createPrng(options.seed);
|
||||
const result = style.create({ prng: prng, options });
|
||||
const backgroundType = prng.pick((_a = options.backgroundType) !== null && _a !== void 0 ? _a : [], 'solid');
|
||||
const { primary: primaryBackgroundColor, secondary: secondaryBackgroundColor, } = getBackgroundColors(prng, (_b = options.backgroundColor) !== null && _b !== void 0 ? _b : [], backgroundType);
|
||||
const backgroundRotation = prng.integer(((_c = options.backgroundRotation) === null || _c === void 0 ? void 0 : _c.length)
|
||||
? Math.min(...options.backgroundRotation)
|
||||
: 0, ((_d = options.backgroundRotation) === null || _d === void 0 ? void 0 : _d.length)
|
||||
? Math.max(...options.backgroundRotation)
|
||||
: 0);
|
||||
if (options.size) {
|
||||
result.attributes.width = options.size.toString();
|
||||
result.attributes.height = options.size.toString();
|
||||
}
|
||||
if (options.scale !== undefined && options.scale !== 100) {
|
||||
result.body = svgUtils.addScale(result, options.scale);
|
||||
}
|
||||
if (options.flip) {
|
||||
result.body = svgUtils.addFlip(result);
|
||||
}
|
||||
if (options.rotate) {
|
||||
result.body = svgUtils.addRotate(result, options.rotate);
|
||||
}
|
||||
if (options.translateX || options.translateY) {
|
||||
result.body = svgUtils.addTranslate(result, options.translateX, options.translateY);
|
||||
}
|
||||
if (primaryBackgroundColor !== 'transparent' &&
|
||||
secondaryBackgroundColor !== 'transparent') {
|
||||
result.body = svgUtils.addBackground(result, primaryBackgroundColor, secondaryBackgroundColor, backgroundType, backgroundRotation);
|
||||
}
|
||||
if (options.radius || options.clip) {
|
||||
result.body = svgUtils.addViewboxMask(result, (_e = options.radius) !== null && _e !== void 0 ? _e : 0);
|
||||
}
|
||||
if (options.randomizeIds) {
|
||||
// Reduces the occurrence of ID collisions when rendering multiple avatars on one HTML page.
|
||||
result.body = svgUtils.randomizeIds(result);
|
||||
}
|
||||
const attributes = svgUtils.createAttrString(result);
|
||||
const metadata = license.xml(style);
|
||||
const svg = `<svg ${attributes}>${metadata}${result.body}</svg>`;
|
||||
return {
|
||||
toString: () => svg,
|
||||
toJson: () => {
|
||||
var _a;
|
||||
return ({
|
||||
svg: svg,
|
||||
extra: {
|
||||
primaryBackgroundColor,
|
||||
secondaryBackgroundColor,
|
||||
backgroundType,
|
||||
backgroundRotation,
|
||||
...(_a = result.extra) === null || _a === void 0 ? void 0 : _a.call(result),
|
||||
},
|
||||
});
|
||||
},
|
||||
toDataUri: () => {
|
||||
return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
|
||||
},
|
||||
};
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/*!
|
||||
* DiceBear (@dicebear/core)
|
||||
*
|
||||
* Code licensed under MIT (https://github.com/dicebear/dicebear/blob/main/LICENSE)
|
||||
* Copyright (c) 2024 Florian Körner
|
||||
*/
|
||||
import * as license from './utils/license.js';
|
||||
import * as escape from './utils/escape.js';
|
||||
export * from './core.js';
|
||||
export * from './schema.js';
|
||||
export * from './types.js';
|
||||
export { license, escape };
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/*!
|
||||
* DiceBear (@dicebear/core)
|
||||
*
|
||||
* Code licensed under MIT (https://github.com/dicebear/dicebear/blob/main/LICENSE)
|
||||
* Copyright (c) 2024 Florian Körner
|
||||
*/
|
||||
import * as license from './utils/license.js';
|
||||
import * as escape from './utils/escape.js';
|
||||
export * from './core.js';
|
||||
export * from './schema.js';
|
||||
export * from './types.js';
|
||||
export { license, escape };
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { JSONSchema7 } from 'json-schema';
|
||||
export declare const schema: JSONSchema7;
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
export const schema = {
|
||||
type: 'object',
|
||||
$schema: 'http://json-schema.org/draft-07/schema#',
|
||||
properties: {
|
||||
seed: {
|
||||
type: 'string',
|
||||
},
|
||||
flip: {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
rotate: {
|
||||
type: 'integer',
|
||||
minimum: 0,
|
||||
maximum: 360,
|
||||
default: 0,
|
||||
},
|
||||
scale: {
|
||||
type: 'integer',
|
||||
minimum: 0,
|
||||
maximum: 200,
|
||||
default: 100,
|
||||
},
|
||||
radius: {
|
||||
type: 'integer',
|
||||
minimum: 0,
|
||||
maximum: 50,
|
||||
default: 0,
|
||||
},
|
||||
size: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
},
|
||||
backgroundColor: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
pattern: '^(transparent|[a-fA-F0-9]{6})$',
|
||||
},
|
||||
},
|
||||
backgroundType: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
enum: ['solid', 'gradientLinear'],
|
||||
},
|
||||
default: ['solid'],
|
||||
},
|
||||
backgroundRotation: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'integer',
|
||||
minimum: -360,
|
||||
maximum: 360,
|
||||
},
|
||||
default: [
|
||||
0, 360,
|
||||
],
|
||||
},
|
||||
translateX: {
|
||||
type: 'integer',
|
||||
minimum: -100,
|
||||
maximum: 100,
|
||||
default: 0,
|
||||
},
|
||||
translateY: {
|
||||
type: 'integer',
|
||||
minimum: -100,
|
||||
maximum: 100,
|
||||
default: 0,
|
||||
},
|
||||
clip: {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
},
|
||||
randomizeIds: {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
};
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
import type { JSONSchema7 } from 'json-schema';
|
||||
export interface ResultConvertOptions {
|
||||
includeExif?: boolean;
|
||||
}
|
||||
export interface Result {
|
||||
toString(): string;
|
||||
toJson(): {
|
||||
svg: string;
|
||||
extra: Record<string, unknown>;
|
||||
};
|
||||
toDataUri(): string;
|
||||
}
|
||||
export type BackgroundType = 'solid' | 'gradientLinear';
|
||||
export interface Options {
|
||||
seed?: string;
|
||||
flip?: boolean;
|
||||
rotate?: number;
|
||||
scale?: number;
|
||||
radius?: number;
|
||||
size?: number;
|
||||
backgroundColor?: string[];
|
||||
backgroundType?: BackgroundType[];
|
||||
backgroundRotation?: number[];
|
||||
translateX?: number;
|
||||
translateY?: number;
|
||||
clip?: boolean;
|
||||
randomizeIds?: boolean;
|
||||
}
|
||||
export interface Exif {
|
||||
[key: string]: string;
|
||||
}
|
||||
export type SchemaDefaults = Record<string, unknown>;
|
||||
export interface Prng {
|
||||
seed: string;
|
||||
next(): void;
|
||||
bool(likelihood?: number): boolean;
|
||||
integer(min: number, max: number): number;
|
||||
pick<T>(arr: T[], fallback: T): T;
|
||||
pick<T>(arr: T[]): T | undefined;
|
||||
shuffle<T>(arr: T[]): T[];
|
||||
string(length: number, characters?: string): string;
|
||||
}
|
||||
export type StyleSchema = JSONSchema7;
|
||||
export type StyleOptions<O extends {}> = Partial<O & Options>;
|
||||
export interface StyleCreateProps<O extends {}> {
|
||||
prng: Prng;
|
||||
options: StyleOptions<O>;
|
||||
}
|
||||
export type StyleCreate<O extends {}> = (props: StyleCreateProps<O>) => StyleCreateResult;
|
||||
export interface StyleCreateResultAttributes {
|
||||
viewBox: string;
|
||||
[key: string]: string;
|
||||
}
|
||||
export interface StyleCreateResult {
|
||||
attributes: StyleCreateResultAttributes;
|
||||
body: string;
|
||||
extra?: () => Record<string, unknown>;
|
||||
}
|
||||
export interface StyleMeta {
|
||||
title?: string;
|
||||
source?: string;
|
||||
creator?: string;
|
||||
homepage?: string;
|
||||
license?: {
|
||||
name: string;
|
||||
url: string;
|
||||
};
|
||||
}
|
||||
export interface Style<O extends {}> {
|
||||
meta?: StyleMeta;
|
||||
schema?: StyleSchema;
|
||||
create: StyleCreate<O>;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { Prng } from '../types.js';
|
||||
export declare function convertColor(color: string): string;
|
||||
export declare function getBackgroundColors(prng: Prng, backgroundColor: string[], backgroundType: 'solid' | 'gradientLinear'): {
|
||||
primary: string;
|
||||
secondary: string;
|
||||
};
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
export function convertColor(color) {
|
||||
return 'transparent' === color ? color : `#${color}`;
|
||||
}
|
||||
export function getBackgroundColors(prng, backgroundColor, backgroundType) {
|
||||
var _a;
|
||||
let shuffledBackgroundColors = prng.shuffle(backgroundColor);
|
||||
if (shuffledBackgroundColors.length <= 1) {
|
||||
// If no background colour or only one background colour has been selected,
|
||||
// the random sorting logic can be omitted.
|
||||
shuffledBackgroundColors = backgroundColor;
|
||||
// A function call should in any case make an identical number of calls to the PRNG.
|
||||
prng.next();
|
||||
}
|
||||
else if (backgroundColor.length == 2 && backgroundType == 'gradientLinear') {
|
||||
// If the background is to be a colour gradient and exactly two background
|
||||
// colours have been specified, do not sort them randomly. In this case, we
|
||||
// assume that the order of the background colours was chosen on purpose.
|
||||
shuffledBackgroundColors = backgroundColor;
|
||||
// A function call should in any case make an identical number of calls to the PRNG.
|
||||
prng.next();
|
||||
}
|
||||
else {
|
||||
shuffledBackgroundColors = prng.shuffle(backgroundColor);
|
||||
}
|
||||
if (shuffledBackgroundColors.length === 0) {
|
||||
shuffledBackgroundColors = ['transparent'];
|
||||
}
|
||||
const primary = shuffledBackgroundColors[0];
|
||||
const secondary = (_a = shuffledBackgroundColors[1]) !== null && _a !== void 0 ? _a : shuffledBackgroundColors[0];
|
||||
return {
|
||||
primary: convertColor(primary),
|
||||
secondary: convertColor(secondary),
|
||||
};
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export declare function xml(content: string): string;
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
export function xml(content) {
|
||||
return content
|
||||
.replace(/&/g, '&')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import { Style } from '../types.js';
|
||||
export declare function xml(style: Style<any>): string;
|
||||
export declare function text(style: Style<any>): string;
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
import * as _ from './escape.js';
|
||||
export function xml(style) {
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
const title = (_a = style.meta) === null || _a === void 0 ? void 0 : _a.title;
|
||||
const creator = (_b = style.meta) === null || _b === void 0 ? void 0 : _b.creator;
|
||||
const source = (_c = style.meta) === null || _c === void 0 ? void 0 : _c.source;
|
||||
const license = (_e = (_d = style.meta) === null || _d === void 0 ? void 0 : _d.license) === null || _e === void 0 ? void 0 : _e.url;
|
||||
const rights = text(style);
|
||||
if (!title && !creator && !source && !license && !rights) {
|
||||
return '';
|
||||
}
|
||||
// https://nsteffel.github.io/dublin_core_generator/generator.html
|
||||
return ('<metadata' +
|
||||
' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"' +
|
||||
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
|
||||
' xmlns:dc="http://purl.org/dc/elements/1.1/"' +
|
||||
' xmlns:dcterms="http://purl.org/dc/terms/">' +
|
||||
'<rdf:RDF>' +
|
||||
'<rdf:Description>' +
|
||||
(title ? `<dc:title>${_.xml(title)}</dc:title>` : '') +
|
||||
(creator ? `<dc:creator>${_.xml(creator)}</dc:creator>` : '') +
|
||||
(source
|
||||
? `<dc:source xsi:type="dcterms:URI">${_.xml((_g = (_f = style.meta) === null || _f === void 0 ? void 0 : _f.source) !== null && _g !== void 0 ? _g : '')}</dc:source>`
|
||||
: '') +
|
||||
(license
|
||||
? `<dcterms:license xsi:type="dcterms:URI">${_.xml(license)}</dcterms:license>`
|
||||
: '') +
|
||||
(rights ? `<dc:rights>${_.xml(rights)}</dc:rights>` : '') +
|
||||
'</rdf:Description>' +
|
||||
'</rdf:RDF>' +
|
||||
'</metadata>');
|
||||
}
|
||||
export function text(style) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
||||
let title = ((_a = style.meta) === null || _a === void 0 ? void 0 : _a.title) ? `„${(_b = style.meta) === null || _b === void 0 ? void 0 : _b.title}”` : 'Design';
|
||||
let creator = `„${(_d = (_c = style.meta) === null || _c === void 0 ? void 0 : _c.creator) !== null && _d !== void 0 ? _d : 'Unknown'}”`;
|
||||
if ((_e = style.meta) === null || _e === void 0 ? void 0 : _e.source) {
|
||||
title += ` (${style.meta.source})`;
|
||||
}
|
||||
let result = '';
|
||||
if (((_g = (_f = style.meta) === null || _f === void 0 ? void 0 : _f.license) === null || _g === void 0 ? void 0 : _g.name) !== 'MIT' &&
|
||||
((_h = style.meta) === null || _h === void 0 ? void 0 : _h.creator) !== 'DiceBear' &&
|
||||
((_j = style.meta) === null || _j === void 0 ? void 0 : _j.title)) {
|
||||
result += 'Remix of ';
|
||||
}
|
||||
result += `${title} by ${creator}`;
|
||||
if ((_l = (_k = style.meta) === null || _k === void 0 ? void 0 : _k.license) === null || _l === void 0 ? void 0 : _l.name) {
|
||||
result += `, licensed under „${(_o = (_m = style.meta) === null || _m === void 0 ? void 0 : _m.license) === null || _o === void 0 ? void 0 : _o.name}”`;
|
||||
if ((_q = (_p = style.meta) === null || _p === void 0 ? void 0 : _p.license) === null || _q === void 0 ? void 0 : _q.url) {
|
||||
result += ` (${style.meta.license.url})`;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { SchemaDefaults, Style, StyleOptions, StyleSchema } from '../types.js';
|
||||
export declare function defaults(schema: StyleSchema): SchemaDefaults;
|
||||
export declare function merge<O extends {}>(style: Style<O>, options: StyleOptions<O>): StyleOptions<O>;
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
import { schema } from '../schema.js';
|
||||
export function defaults(schema) {
|
||||
var _a;
|
||||
let result = {};
|
||||
let props = (_a = schema.properties) !== null && _a !== void 0 ? _a : {};
|
||||
Object.keys(props).forEach((key) => {
|
||||
let val = props[key];
|
||||
if (typeof val === 'object' && undefined !== val.default) {
|
||||
if (Array.isArray(val.default)) {
|
||||
result[key] = [...val.default];
|
||||
}
|
||||
else if (typeof val.default === 'object') {
|
||||
result[key] = { ...val.default };
|
||||
}
|
||||
else {
|
||||
result[key] = val.default;
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
export function merge(style, options) {
|
||||
var _a;
|
||||
let result = {
|
||||
...defaults(schema),
|
||||
...defaults((_a = style.schema) !== null && _a !== void 0 ? _a : {}),
|
||||
...options,
|
||||
};
|
||||
// Return a complete copy because the styles could partially customize the
|
||||
// options and thus modify nested objects and arrays.
|
||||
return JSON.parse(JSON.stringify(result));
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { Prng } from '../types.js';
|
||||
export declare function create(seed?: string): Prng;
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
const MIN = -2147483648;
|
||||
const MAX = 2147483647;
|
||||
function xorshift(value) {
|
||||
value ^= value << 13;
|
||||
value ^= value >> 17;
|
||||
value ^= value << 5;
|
||||
return value;
|
||||
}
|
||||
function hashSeed(seed) {
|
||||
let hash = 0;
|
||||
for (let i = 0; i < seed.length; i++) {
|
||||
hash = ((hash << 5) - hash + seed.charCodeAt(i)) | 0;
|
||||
hash = xorshift(hash);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
export function create(seed = '') {
|
||||
// Ensure that seed is a string
|
||||
seed = seed.toString();
|
||||
let value = hashSeed(seed) || 1;
|
||||
const next = () => (value = xorshift(value));
|
||||
const integer = (min, max) => {
|
||||
return Math.floor(((next() - MIN) / (MAX - MIN)) * (max + 1 - min) + min);
|
||||
};
|
||||
return {
|
||||
seed,
|
||||
next,
|
||||
bool(likelihood = 50) {
|
||||
return integer(1, 100) <= likelihood;
|
||||
},
|
||||
integer(min, max) {
|
||||
return integer(min, max);
|
||||
},
|
||||
pick(arr, fallback) {
|
||||
var _a;
|
||||
if (arr.length === 0) {
|
||||
next();
|
||||
return fallback;
|
||||
}
|
||||
return (_a = arr[integer(0, arr.length - 1)]) !== null && _a !== void 0 ? _a : fallback;
|
||||
},
|
||||
shuffle(arr) {
|
||||
// Each method call should call the `next` function only once.
|
||||
// Therefore, we use a separate instance of the PRNG here.
|
||||
const internalPrng = create(next().toString());
|
||||
// Fisher-Yates shuffle algorithm - We do not use the Array.sort method
|
||||
// because it is not stable and produces different results when used in
|
||||
// different browsers. See: https://github.com/dicebear/dicebear/issues/394
|
||||
const workingArray = [...arr];
|
||||
for (let i = workingArray.length - 1; i > 0; i--) {
|
||||
const j = internalPrng.integer(0, i);
|
||||
[workingArray[i], workingArray[j]] = [workingArray[j], workingArray[i]];
|
||||
}
|
||||
return workingArray;
|
||||
},
|
||||
string(length, characters = 'abcdefghijklmnopqrstuvwxyz1234567890') {
|
||||
// Each method call should call the `next` function only once.
|
||||
// Therefore, we use a separate instance of the PRNG here.
|
||||
const internalPrng = create(next().toString());
|
||||
let str = '';
|
||||
for (let i = 0; i < length; i++) {
|
||||
str += characters[internalPrng.integer(0, characters.length - 1)];
|
||||
}
|
||||
return str;
|
||||
},
|
||||
};
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import type { BackgroundType, StyleCreateResult } from '../types.js';
|
||||
export declare function getViewBox(result: StyleCreateResult): {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
export declare function addBackground(result: StyleCreateResult, primaryColor: string, secondaryColor: string, type: BackgroundType, rotation: number): string;
|
||||
export declare function addScale(result: StyleCreateResult, scale: number): string;
|
||||
export declare function addTranslate(result: StyleCreateResult, x?: number, y?: number): string;
|
||||
export declare function addRotate(result: StyleCreateResult, rotate: number): string;
|
||||
export declare function addFlip(result: StyleCreateResult): string;
|
||||
export declare function addViewboxMask(result: StyleCreateResult, radius: number): string;
|
||||
export declare function createAttrString(result: StyleCreateResult): string;
|
||||
export declare function randomizeIds(result: StyleCreateResult): string;
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
import * as escape from './escape.js';
|
||||
import { create as createPrng } from './prng.js';
|
||||
export function getViewBox(result) {
|
||||
let viewBox = result.attributes['viewBox'].split(' ');
|
||||
let x = parseInt(viewBox[0]);
|
||||
let y = parseInt(viewBox[1]);
|
||||
let width = parseInt(viewBox[2]);
|
||||
let height = parseInt(viewBox[3]);
|
||||
return {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
};
|
||||
}
|
||||
export function addBackground(result, primaryColor, secondaryColor, type, rotation) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
const solidBackground = `<rect fill="${primaryColor}" width="${width}" height="${height}" x="${x}" y="${y}" />`;
|
||||
switch (type) {
|
||||
case 'solid':
|
||||
return solidBackground + result.body;
|
||||
case 'gradientLinear':
|
||||
return (`<rect fill="url(#backgroundLinear)" width="${width}" height="${height}" x="${x}" y="${y}" />` +
|
||||
`<defs>` +
|
||||
`<linearGradient id="backgroundLinear" gradientTransform="rotate(${rotation} 0.5 0.5)">` +
|
||||
`<stop stop-color="${primaryColor}"/>` +
|
||||
`<stop offset="1" stop-color="${secondaryColor}"/>` +
|
||||
`</linearGradient>` +
|
||||
`</defs>` +
|
||||
result.body);
|
||||
}
|
||||
}
|
||||
export function addScale(result, scale) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
let percent = scale ? (scale - 100) / 100 : 0;
|
||||
let translateX = (width / 2 + x) * percent * -1;
|
||||
let translateY = (height / 2 + y) * percent * -1;
|
||||
return `<g transform="translate(${translateX} ${translateY}) scale(${scale / 100})">${result.body}</g>`;
|
||||
}
|
||||
export function addTranslate(result, x, y) {
|
||||
let viewBox = getViewBox(result);
|
||||
let translateX = (viewBox.width + viewBox.x * 2) * ((x !== null && x !== void 0 ? x : 0) / 100);
|
||||
let translateY = (viewBox.height + viewBox.y * 2) * ((y !== null && y !== void 0 ? y : 0) / 100);
|
||||
return `<g transform="translate(${translateX} ${translateY})">${result.body}</g>`;
|
||||
}
|
||||
export function addRotate(result, rotate) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
return `<g transform="rotate(${rotate}, ${width / 2 + x}, ${height / 2 + y})">${result.body}</g>`;
|
||||
}
|
||||
export function addFlip(result) {
|
||||
let { width, x } = getViewBox(result);
|
||||
return `<g transform="scale(-1 1) translate(${width * -1 - x * 2} 0)">${result.body}</g>`;
|
||||
}
|
||||
export function addViewboxMask(result, radius) {
|
||||
let { width, height, x, y } = getViewBox(result);
|
||||
let rx = radius ? (width * radius) / 100 : 0;
|
||||
let ry = radius ? (height * radius) / 100 : 0;
|
||||
return (`<mask id="viewboxMask">` +
|
||||
`<rect width="${width}" height="${height}" rx="${rx}" ry="${ry}" x="${x}" y="${y}" fill="#fff" />` +
|
||||
`</mask>` +
|
||||
`<g mask="url(#viewboxMask)">${result.body}</g>`);
|
||||
}
|
||||
export function createAttrString(result) {
|
||||
const attributes = {
|
||||
xmlns: 'http://www.w3.org/2000/svg',
|
||||
...result.attributes,
|
||||
};
|
||||
return Object.keys(attributes)
|
||||
.map((attr) => `${escape.xml(attr)}="${escape.xml(attributes[attr])}"`)
|
||||
.join(' ');
|
||||
}
|
||||
export function randomizeIds(result) {
|
||||
const prng = createPrng(Math.random().toString());
|
||||
const ids = {};
|
||||
return result.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi, (match, m1, m2, m3) => {
|
||||
ids[m2] = ids[m2] || prng.string(8);
|
||||
return `${m1}${ids[m2]}${m3}`;
|
||||
});
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "@dicebear/core",
|
||||
"version": "9.2.2",
|
||||
"description": "An avatar library for designers and developers.",
|
||||
"keywords": [
|
||||
"avatar",
|
||||
"identicon"
|
||||
],
|
||||
"homepage": "https://www.dicebear.com",
|
||||
"bugs": {
|
||||
"url": "https://github.com/dicebear/dicebear/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dicebear/dicebear.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Florian Körner <contact@florian-koerner.com>",
|
||||
"type": "module",
|
||||
"main": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"lib",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
"prebuild": "del-cli lib",
|
||||
"build": "tsc",
|
||||
"prepublishOnly": "npm run build",
|
||||
"test": "uvu tests"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/recommended": "^1.0.2",
|
||||
"del-cli": "^5.0.0",
|
||||
"typescript": "^5.1.6",
|
||||
"uvu": "^0.5.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "bf5b31d047f707f50299142660bc89ef020d9b24"
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
Licenses
|
||||
--------
|
||||
|
||||
# Design
|
||||
Applies to all design files in this package.
|
||||
|
||||
Source: Avatar Illustration System (https://www.figma.com/community/file/829741575478342595)
|
||||
Designer: Micah Lanier (https://dribbble.com/micahlanier)
|
||||
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
|
||||
|
||||
# Code
|
||||
Applies to all non-design files in this package.
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Florian Körner
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<h1 align="center"><img src="https://www.dicebear.com/logo-readme.svg" width="96" /> <br />DiceBear Micah</h1>
|
||||
<p align="center">
|
||||
<strong>Avatar Style for <a href="https://www.dicebear.com/">DiceBear</a></strong><br />
|
||||
<a href="https://www.figma.com/community/file/829741575478342595">Avatar Illustration System</a> by <a href="https://dribbble.com/micahlanier">Micah Lanier</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://api.dicebear.com/6.x/micah/svg?seed=Mimi" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/micah/svg?seed=Sasha" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/micah/svg?seed=Lilly" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/micah/svg?seed=Tigger" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/micah/svg?seed=Bella" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/micah/svg?seed=Zoe" width="64" />
|
||||
<img src="https://api.dicebear.com/6.x/micah/svg?seed=Kitty" width="64" />
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
The avatar style is based on <a href="https://www.figma.com/community/file/829741575478342595">Avatar Illustration System</a> by
|
||||
<a href="https://dribbble.com/micahlanier">Micah Lanier</a>, licensed under
|
||||
<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>. / Remix of the original.
|
||||
</p>
|
||||
<p align="center">
|
||||
See <a href="https://www.dicebear.com/licenses">license overview</a> for more information.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.dicebear.com/styles/micah">
|
||||
Read Documentation
|
||||
</a>
|
||||
</p>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const base: ComponentGroup;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const base = {
|
||||
'standard': (components, colors) => { var _a, _b; return `<path d="M154 319.5c-14.4-20-25.67-58.67-27-78L58.5 212 30 319.5h124Z" fill="${escape.xml(`${colors.base}`)}" stroke="#000" stroke-width="4"/><path d="M130.37 263.69c-2.1.2-4.22.31-6.37.31-30.78 0-56.05-21.57-58.76-49.1L127 241.5c.38 5.48 1.55 13.32 3.37 22.19Z" fill="#000" style="mix-blend-mode:multiply"/><path d="M181.94 151.37v.01l.1.4.14.65A75.72 75.72 0 0 1 34.93 187.7l-.2-.74L18 117.13l-.06-.29A75.72 75.72 0 0 1 165.2 81.55l.05.21.02.08.05.2.05.2v.01l16.4 68.44.08.34.08.34Z" fill="${escape.xml(`${colors.base}`)}" stroke="#000" stroke-width="4"/><g transform="translate(34 102.3)">${(_b = (_a = components.facialHair) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const earrings: ComponentGroup;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const earrings = {
|
||||
'hoop': (components, colors) => `<path d="M24 0A24 24 0 1 1 0 24c0-6.4 3.5-11.5 6.57-16.5L7.5 6" stroke="${escape.xml(`${colors.earring}`)}" stroke-width="4"/>`,
|
||||
'stud': (components, colors) => `<circle cx="25" cy="2" r="4" fill="${escape.xml(`${colors.earring}`)}"/><circle cx="26" cy="1" r="1" fill="#fff"/>`,
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const ears: ComponentGroup;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const ears = {
|
||||
'attached': (components, colors) => { var _a, _b; return `<path d="M30.5 6.18A23.78 23.78 0 0 0 23.08 5c-10.5 0-19 6.5-18 18.5 1.04 12.5 8.5 17 19 17A19.6 19.6 0 0 0 31 39.23" stroke="#000" stroke-width="8"/><path d="M31.5 39.04a19.38 19.38 0 0 1-7.42 1.46c-10.5 0-17.96-4.5-19-17-1-12 7.5-18.5 18-18.5 3.14 0 6.19.6 8.92 1.73l-.5 32.3Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M27.5 13.5c-4-1.83-12.8-2.8-16 8" stroke="#000" stroke-width="4"/><path d="M17 14c2.17 1.83 6.3 7.5 5.5 15.5" stroke="#000" stroke-width="4"/><g transform="translate(3 35)">${(_b = (_a = components.earrings) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
'detached': (components, colors) => { var _a, _b; return `<path d="M37 8.25V7.13l-.95-.59A24.91 24.91 0 0 0 23.08 3C17.44 3 12.16 4.75 8.4 8.3c-3.8 3.58-5.86 8.83-5.31 15.37.52 6.37 2.66 11.06 6.2 14.17-.29 1-.37 2.08-.24 3.21a8.98 8.98 0 0 0 4.6 7.08C16.09 49.5 19.2 50 22.52 50c5.48 0 10.29-2.95 13.95-6.89l.53-.57V8.25Z" stroke="#000" stroke-width="4"/><path d="M42.97 23.98c.07-.65.1-1.3.1-1.98 0-10.22-9.5-17-20-17C12.6 5 4.09 11.5 5.09 23.5c.56 6.68 2.95 11.07 6.65 13.72a5.7 5.7 0 0 0-.68 3.6C11.68 46.1 16.19 48 22.52 48c11.1 0 19.9-14.05 20.45-24.02Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M27.5 13.5c-4-1.83-12.8-2.8-16 8" stroke="#000" stroke-width="4"/><path d="M17 14c2.17 1.83 6.3 7.5 5.5 15.5" stroke="#000" stroke-width="4"/><g transform="translate(3 42)">${(_b = (_a = components.earrings) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const eyebrows: ComponentGroup;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const eyebrows = {
|
||||
'up': (components, colors) => `<path d="M99 10.21c5.67-2.66 19-5.1 27 6.5M23.58 35.52c2.07-5.9 9.68-17.12 23.56-14.7" stroke="${escape.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`,
|
||||
'down': (components, colors) => `<path d="M27 26.5c6.17 2.5 21.1 3 31.5-15M94 4c5.17 5.33 18.1 12.8 28.5 0" stroke="${escape.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`,
|
||||
'eyelashesUp': (components, colors) => `<path d="M99 10.21c5.67-2.66 19-5.1 27 6.5M23.58 35.52c2.07-5.9 9.68-17.12 23.56-14.7M26.07 29.46l-6.14-5.43M122.96 11.16l6.15-5.43M32.52 23.81l-4.04-7.13M115.51 7.51l4.05-7.13M40.6 20.2l-2.2-7.9M106.44 6.9l2.2-7.9" stroke="${escape.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`,
|
||||
'eyelashesDown': (components, colors) => `<path d="M27 26.5c6.17 2.5 21.1 3 31.5-15M94 4c5.17 5.33 18.1 12.8 28.5 0M37.15 26.46 31 21.03M116.22 9.44l1.78-8M45.6 22.81l-4.05-7.13M108.14 9.02l.94-8.15M52.67 17.2l-2.2-7.9M100 8.03l-.78-8.16" stroke="${escape.xml(`${colors.eyebrows}`)}" stroke-width="4" stroke-linecap="round"/>`,
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const eyes: ComponentGroup;
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const eyes = {
|
||||
'eyes': (components, colors) => { var _a, _b; return `<g fill="${escape.xml(`${colors.eyes}`)}"><ellipse cx="16.53" cy="29.4" rx="9" ry="13.5" transform="rotate(-6.78 16.53 29.4)"/><ellipse cx="80.53" cy="19.4" rx="9" ry="13.5" transform="rotate(-6.28 80.53 19.4)"/></g><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
'round': (components, colors) => { var _a, _b; return `<g fill="${escape.xml(`${colors.eyes}`)}"><ellipse cx="16.12" cy="28.93" rx="9" ry="10" transform="rotate(-6.78 16.12 28.93)"/><ellipse cx="80.15" cy="18.92" rx="9" ry="10" transform="rotate(-6.28 80.15 18.92)"/></g><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
'eyesShadow': (components, colors) => { var _a, _b; return `<circle cx="15.24" cy="20.24" r="12" transform="rotate(-6.28 15.24 20.24)" fill="${escape.xml(`${colors.eyeShadow}`)}"/><ellipse cx="16.53" cy="29.4" rx="9" ry="13.5" transform="rotate(-6.78 16.53 29.4)" fill="${escape.xml(`${colors.eyes}`)}"/><circle cx="79.02" cy="11.61" r="12" transform="rotate(-6.28 79.02 11.61)" fill="${escape.xml(`${colors.eyeShadow}`)}"/><ellipse cx="80.53" cy="19.4" rx="9" ry="13.5" transform="rotate(-6.28 80.53 19.4)" fill="${escape.xml(`${colors.eyes}`)}"/><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
'smiling': (components, colors) => { var _a, _b; return `<path d="M5.29 34.07c.11.82 1.14 1 1.72.41 2.46-2.52 6.25-4.36 10.65-4.89 2.6-.3 5.1-.12 7.32.48.75.2 1.5-.44 1.23-1.17A10.84 10.84 0 0 0 5.3 34.07ZM69.38 24.07c.12.82 1.15 1 1.73.41 2.44-2.48 6.19-4.3 10.54-4.83 2.56-.3 5.03-.12 7.23.47.75.2 1.5-.44 1.23-1.17a10.74 10.74 0 0 0-20.73 5.12Z" fill="${escape.xml(`${colors.eyes}`)}"/><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
'smilingShadow': (components, colors) => { var _a, _b; return `<path d="M26.47 24.36c1.86 6.36-5.04 1.48-11.4 3.33-6.36 1.86-9.78 9.76-11.64 3.4a12 12 0 0 1 23.04-6.73ZM90.26 15.17c1.64 6.42-4.7 1.52-11.11 3.15-6.43 1.64-10.51 9.19-12.15 2.77a12 12 0 1 1 23.26-5.92Z" fill="${escape.xml(`${colors.eyeShadow}`)}"/><path d="M5.29 34.07c.11.82 1.14 1 1.72.41 2.46-2.52 6.25-4.36 10.65-4.89 2.6-.3 5.1-.12 7.32.48.75.2 1.5-.44 1.23-1.17A10.84 10.84 0 0 0 5.3 34.07ZM69.38 24.07c.12.82 1.15 1 1.73.41 2.44-2.48 6.19-4.3 10.54-4.83 2.56-.3 5.03-.12 7.23.47.75.2 1.5-.44 1.23-1.17a10.74 10.74 0 0 0-20.73 5.12Z" fill="${escape.xml(`${colors.eyes}`)}"/><g transform="translate(-40 -8)">${(_b = (_a = components.glasses) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`; },
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const facialHair: ComponentGroup;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const facialHair = {
|
||||
'beard': (components, colors) => `<path d="M146.13 49.15A73.74 73.74 0 0 1 27.69 123.4C10.5 107.5 6.5 56 2.7 31.65c14 31.5 49.62 33.94 83.5 28 28.5-5 51.3-6 51.3-45 1.88 2.62 6.97 27.59 8.63 34.5Z" fill="${escape.xml(`${colors.facialHair}`)}"/>`,
|
||||
'scruff': (components, colors) => `<g fill="${escape.xml(`${colors.facialHair}`)}"><path d="M31 109a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM83 116a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM79 123a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM99 121a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM100 111a1 1 0 1 1-2 0 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1 1 0 0 1 2 0Z" stroke="#000"/><path d="M113 76a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM139 76a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM61 116a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM72 110a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM68 102a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM92 93a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM43 75a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM80 91a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM80 73a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM115 87a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM115 69a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM122 71a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM137 62a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" stroke="#000"/></g>`,
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const glasses: ComponentGroup;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const glasses = {
|
||||
'round': (components, colors) => `<g stroke="${escape.xml(`${colors.glasses}`)}" stroke-width="4"><circle cx="122.5" cy="28" r="26"/><circle cx="55.5" cy="37" r="26"/><path d="M97.5 35a8 8 0 0 0-16 0M30 39 0 44.5"/></g>`,
|
||||
'square': (components, colors) => `<g stroke="${escape.xml(`${colors.glasses}`)}" stroke-width="4"><path d="M34.5 42.5 0 49.12" stroke-linecap="round"/><path d="M35.47 18.53 74.2 13.1a6 6 0 0 1 6.77 5.1l5.57 39.62a6 6 0 0 1-5.1 6.78l-34.48 4.84a6 6 0 0 1-6.65-4.48l-9.81-39.01a6 6 0 0 1 4.98-7.4ZM145.92 3.22 107.2 8.66a6 6 0 0 0-5.1 6.78l5.56 39.6a6 6 0 0 0 6.78 5.11l34.47-4.84a6 6 0 0 0 5.16-6.14l-1.32-40.2a6 6 0 0 0-6.83-5.75ZM83.5 37.12l22-3.5"/></g>`,
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const hair: ComponentGroup;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const hair = {
|
||||
'fonze': (components, colors) => `<path d="M210.18 49.4c-1.27 6.05-4.6 11.32-9.43 15.9 9.4 34.06 9.6 53.87 4.38 57.65l-14.8-49.99C158.4 91.7 98.65 94.9 83.69 94.9c-1.55.17-3.02.4-4.43.67-14.65 9-2.6 52.12 11.75 70.43l-11 2c-5.14-24.97-17.41-22.92-26.61-21.38l-.32.05c2.2 13.63 6.72 27.74 10.45 39.32.95 2.99 1.86 5.8 2.66 8.4-.79.1-1.48.3-2.12.47-5.5 1.53-7.41 2.06-33.38-61.97-6.47-15.95-6.03-30.16-.97-42.62-4.78-4.8-14.37-7.14-19.71-7.78 10.44-6.12 20.58-4.87 25.54-3.1.5-.75 1.02-1.49 1.56-2.22-.97-4.41-7.96-9.46-12.11-11.82 8.55-4.3 18.6-2.03 22.98-.2C67.63 47.13 97.03 35.05 122 29 170.81 17.17 189.5.5 189.5.5c20.68 8.5 25.62 25.22 20.68 48.9Z" fill="${escape.xml(`${colors.hair}`)}" stroke="#000" stroke-width="4"/>`,
|
||||
'mrT': (components, colors) => `<g fill="${escape.xml(`${colors.hair}`)}"><path opacity=".1" d="M187.99 77.18c-8-6.4-21.84-7-27.5-6.5l-8-26.5c13.6 3.2 32 24 35.5 33Z"/><path d="M85.8 11.76S91.52 7.8 115.74 1.7c24.21-6.1 33.04-3.72 33.04-3.72l11.8 72.84s-8.05-.18-28.04 4.19c-20 4.38-29.56 9.67-29.56 9.67l-17.2-72.9Z"/><path d="M48.99 86.68c-6.8-41.6 23.33-68.17 37-75.5l16.98 73.5c-19.2-39.6-45.33-15.17-54 2Z"/><path opacity=".1" d="M67.49 130.68c-7.2-27.2 22-41.84 35.5-46-7-16.34-23-31-42.5-13-18 30.5-11 54-5.5 72l12.5-13Z"/></g>`,
|
||||
'dougFunny': (components, colors) => `<path d="M140 56c14.67-.67 40.4-8.8 26-36M114 54c14.67-.67 40.4-8.8 26-36M78 65c14.67-.67 40.4-8.8 26-36" stroke="${escape.xml(`${colors.hair}`)}" stroke-width="4"/>`,
|
||||
'mrClean': (components, colors) => `<ellipse cx="147.85" cy="58.18" rx="6.86" ry="18.44" transform="rotate(117 147.85 58.18)" fill="#FCFDFF"/>`,
|
||||
'dannyPhantom': (components, colors) => `<path d="M123.79 17.49H123.94a96.78 96.78 0 0 1 62.07 24.36c14.06 12.4 22.45 26.87 25.19 36.73-4.06 2.32-11.01 4.31-19.88 5.95-9.68 1.78-21.3 3.08-33.15 4.01-23.7 1.86-48.2 2.2-59.63 1.96l-6.07-.13 4.8 3.71c2.5 1.93 5.83 3.28 9.34 4.22 3.55.95 7.42 1.54 11.14 1.87 3.82.34 7.55.42 10.64.34-10.59 8.16-24.06 14.44-37.35 19.09a225.88 225.88 0 0 1-39.83 9.92l-2.15.32.5 2.11c3.34 14.43 9.5 39.65 13.62 56.57 1.83 7.5 3.26 13.38 3.87 15.94 1.09 4.56 4.5 11.05 8.4 17.03 3.6 5.52 7.78 10.89 11.32 14.2l-7.84 31.81H49.37c8.34-12.71 10.1-27.4 8.4-42.98-1.84-16.87-7.76-35-14-53.17l-1.85-5.36c-5.69-16.46-11.36-32.88-14.43-48.6-3.4-17.44-3.56-33.75 2.83-48.09 10.34-23.21 28.66-36.7 47-44.12 18.37-7.45 36.61-8.76 46.46-7.71Z" fill="${escape.xml(`${colors.hair}`)}" stroke="#000" stroke-width="4"/>`,
|
||||
'full': (components, colors) => `<path d="m-13.4 312.86-.62-1.64c-.56-1.55-1.35-3.84-2.23-6.74a163.21 163.21 0 0 1-5.28-23.98c-2.81-19.77-2.8-45.8 8.4-71.12 1.8-4.09 4.07-8.3 6.52-12.85 9.47-17.6 21.77-40.46 21.77-82.45 0-30.59 14.84-56.35 36.7-74.51 21.88-18.18 50.7-28.66 78.38-28.66 15.13 0 27.3 1.73 37.07 7.64 9.72 5.87 17.37 16.05 23.05 33.58a3.47 3.47 0 0 0 4.36 2.27c11.31-3.67 28.47.04 42.95 9.5 14.42 9.4 25.62 24.15 25.62 41.91 0 15.43-2.64 25.85-5.22 36-3.12 12.3-6.13 24.16-4 43.5.7 6.45 2.15 11.03 4.16 14.82 1.98 3.73 4.48 6.62 7.12 9.66l.05.07c6.28 7.25 9.13 13.22 10.06 18.47.92 5.23-.05 9.98-1.84 14.9-.9 2.48-2 4.97-3.15 7.59l-.1.22c-1.12 2.53-2.3 5.19-3.35 7.98-2.18 5.77-3.89 12.2-3.72 19.83.15 6.48 1.3 10.91 3.01 14.27 1.7 3.32 3.89 5.44 5.8 7.3l.05.05c1.74 1.68 3.2 3.1 4.27 5.1.96 1.78 1.67 4.13 1.79 7.66a172.14 172.14 0 0 1-87.4 23.9 110.86 110.86 0 0 1-7.28-.28c-6.15-9.4-11.75-24.88-16.1-40.8-4.21-15.46-7.18-31.08-8.3-41.4 37.08-10.72 60.32-48.98 54.73-88.46l-.01-.12a5.97 5.97 0 0 0-.08-.47 76.68 76.68 0 0 0-.43-2.25 486.97 486.97 0 0 0-6.53-28.2 276.64 276.64 0 0 0-7.45-24.2c-2.76-7.5-5.83-14.15-9.1-18.24l-.3-.37-.44-.2c-1.93-.83-3.94-1.77-6.03-2.74-9.93-4.62-21.84-10.17-37.26-10.78-18.78-.74-42.56 5.78-74.7 29.09l-2.02 1.46 1.95 1.57c15.92 12.83 19.37 29.86 18.63 44.3a89.2 89.2 0 0 1-5.24 25.1c-1.16-1.69-1.9-3.82-2.45-6.33a85.19 85.19 0 0 1-.96-5.45l-.05-.3c-.3-2-.63-4.08-1.1-6.09-.96-4.01-2.57-8.02-6.14-10.86-3.58-2.84-8.8-4.25-16.4-3.83l-2.22.13.46 2.18 11.36 53.31.02.08.03.09a79.8 79.8 0 0 0 19.91 32.81 65.49 65.49 0 0 1 1.54 2.68c1.01 1.82 2.37 4.38 3.76 7.33 2.82 5.94 5.66 13.24 6.2 19.2.57 6.05-.96 13.86-2.7 20.31a129.63 129.63 0 0 1-2.84 9.14c-5.03-2.4-9.53-2.23-13.38.01-4.16 2.43-7.21 7.06-9.48 12.22-4.15 9.42-6.14 21.64-7.06 29.22A601.65 601.65 0 0 1 6.2 320.1 353.85 353.85 0 0 1-9 314.64a190.8 190.8 0 0 1-4.4-1.77Z" fill="${escape.xml(`${colors.hair}`)}" stroke="#000" stroke-width="3.82"/>`,
|
||||
'turban': (components, colors) => `<g stroke="#000" stroke-width="4"><path d="M222.73 100.8c0-66.1-36.46-110.8-80.87-110.8C84.96-10 27 11.34 27 112.25c0 24.97 10.66 43.58 25.56 57.29a42.88 42.88 0 0 1-3.5-4.92c-2.88-26.98 29.17-47.7 60.54-67.96 16.65-10.75 33.11-21.39 44.05-32.76 9.6 5.43 37.79 28.2 43.16 37.42 2.88 4.94 7.51 21.87 10.67 41.63 10.34-12.42 15.25-24.84 15.25-42.16Z" fill="${escape.xml(`${colors.hair}`)}"/><path d="M154.26 63.25c13.18-11.95 32.89-39.21 31.62-56.92"/></g>`,
|
||||
'pixie': (components, colors) => `<g stroke="#000"><path d="m105.84 88.82 1.88.3v.08l-.04.16-.12.52c-.12.45-.3 1.09-.6 1.9a41.7 41.7 0 0 1-3.4 6.92c-3.17 5.32-8.7 12.66-18.31 21.6 29.97.74 55-8.92 72.82-19.04a156.35 156.35 0 0 0 21.71-14.87 118.43 118.43 0 0 0 7.5-6.7l.1-.1.01-.01 2.29-2.38.93 3.16-1.84.54 1.84-.54v.05l.05.13.15.52a817.06 817.06 0 0 1 2.69 9.28c1.75 6.14 4.14 14.58 6.66 23.77 5.03 18.35 10.6 39.81 12.7 51.97 3.49 20.32-1.91 35.74-5.1 44.87-.63 1.77-1.17 3.3-1.54 4.6.06.04.12.1.22.16.6.42 1.65.91 3.18 1.4 3.02.96 7.32 1.74 11.92 2.19 4.6.44 9.38.53 13.34.14 1.98-.2 3.7-.5 5.08-.92a6.85 6.85 0 0 0 2.58-1.27c.02-.08.03-.29-.02-.68-.1-.78-.4-1.87-.93-3.32-.8-2.15-1.97-4.8-3.35-7.88l-1.46-3.3c-3.93-8.94-8.65-20.56-9.68-32.4-1.15-13.16 1.45-24.42 3.79-34.54l.11-.48c2.39-10.34 4.38-19.32 2.34-28.42-3.1-13.8-7.32-25.3-13.8-33.57-6.42-8.17-15.13-13.27-27.5-14.21l-1.28-.1-.4-1.22c-5.7-17.57-13.38-29.05-23.18-36.17-9.8-7.12-21.96-10.05-36.94-10.05-27.7 0-57.5 10.52-79.88 28.72-22.35 18.18-37.14 43.9-35.2 74.33 2.13 33.6-.3 59.06-5.8 77.72-5 17-12.59 28.46-21.68 35.14 1.19.61 2.78 1.39 4.77 2.27 5.02 2.24 12.59 5.2 22.67 8.03 19.34 5.43 47.95 10.38 85.71 8.89-8.32-7.15-16.72-15.83-23.37-25-7.63-10.53-13.14-21.94-13.3-32.58-.19-12.62.67-45.67.93-52.5.62-15.9 10.82-28.15 20.54-36.3a96.6 96.6 0 0 1 18.96-12.34l.2-.1.13-.06.1-.05h.02v-.01l.8 1.74Zm0 0 1.88.3.56-3.5-3.23 1.46.79 1.74Zm100.23 126.57.03.04-.03-.04Z" fill="${escape.xml(`${colors.hair}`)}" stroke-width="3.82"/><path d="M191 58c.5 4.5-.3 13.5-1.5 19.5" stroke-width="4"/></g>`,
|
||||
};
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
export { base } from './base.js';
|
||||
export { mouth } from './mouth.js';
|
||||
export { eyebrows } from './eyebrows.js';
|
||||
export { hair } from './hair.js';
|
||||
export { eyes } from './eyes.js';
|
||||
export { nose } from './nose.js';
|
||||
export { ears } from './ears.js';
|
||||
export { shirt } from './shirt.js';
|
||||
export { earrings } from './earrings.js';
|
||||
export { glasses } from './glasses.js';
|
||||
export { facialHair } from './facialHair.js';
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
export { base } from './base.js';
|
||||
export { mouth } from './mouth.js';
|
||||
export { eyebrows } from './eyebrows.js';
|
||||
export { hair } from './hair.js';
|
||||
export { eyes } from './eyes.js';
|
||||
export { nose } from './nose.js';
|
||||
export { ears } from './ears.js';
|
||||
export { shirt } from './shirt.js';
|
||||
export { earrings } from './earrings.js';
|
||||
export { glasses } from './glasses.js';
|
||||
export { facialHair } from './facialHair.js';
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const mouth: ComponentGroup;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const mouth = {
|
||||
'surprised': (components, colors) => `<path d="M36.37 56.66c12.1-2.2 18.75-15.38 16.42-28.23C50.47 15.6 39.63 5.57 27.52 7.76 15.4 9.95 8.77 23.13 11.09 35.98c2.33 12.85 13.17 22.87 25.28 20.68Z" fill="${escape.xml(`${colors.mouth}`)}"/><path d="M17.14 42.66c2.78-5.21 8.14-9.25 14.8-10.45 6.66-1.2 13.1.7 17.53 4.6-1.09 8.3-6.37 15-13.74 16.33-7.37 1.33-14.67-3.1-18.6-10.47Z" fill="#FC909F"/>`,
|
||||
'laughing': (components, colors) => `<path d="M64.73 25.7a36 36 0 0 0 1.18-12.54 4.98 4.98 0 0 0-6.8-4.2c-4.26 1.67-18.03 6.88-27.62 8.2-10.52 1.44-26.66-.32-31.44-.91a4.98 4.98 0 0 0-5.53 5.74 36 36 0 0 0 70.21 3.7Z" fill="${escape.xml(`${colors.mouth}`)}"/><path d="M51.83 39.55a32 32 0 0 1-37.2 4.62 21.5 21.5 0 0 1 37.2-4.62Z" fill="#FC909F"/>`,
|
||||
'nervous': (components, colors) => `<path d="M68.42 31.57 67.4 17a8.06 8.06 0 0 0-9.74-7.3c-6.95 1.49-20.1 4.1-29.54 4.76-9.43.66-22.82-.1-29.9-.6a8.06 8.06 0 0 0-8.63 8.58L-9.4 37a8.06 8.06 0 0 0 9.73 7.3c6.95-1.48 20.1-4.1 29.54-4.76 9.44-.66 22.82.1 29.91.61a8.06 8.06 0 0 0 8.63-8.58Z" fill="${escape.xml(`${colors.mouth}`)}"/><path d="m-.25 17.97 1.6 6.07a6 6 0 0 0 6.22 4.46 6 6 0 0 0-5.54 5.28l-.74 6.23c7.28-1.52 19.34-3.83 28.3-4.46 8.98-.63 21.24-.02 28.66.48l-1.6-6.07a6 6 0 0 0-6.21-4.46 6 6 0 0 0 5.54-5.28l.73-6.24c-7.27 1.53-19.33 3.84-28.3 4.47-8.97.62-21.23.01-28.65-.48Z" fill="#fff"/>`,
|
||||
'smile': (components, colors) => `<path d="M-.5 17.5c2.5 17 31 25 57 5.5" stroke="${escape.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
'sad': (components, colors) => `<path d="M13 46c1.72-7.96 8.07-24.77 19.77-28.35 11.7-3.58 17.7 8.46 19.23 14.92" stroke="${escape.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
'pucker': (components, colors) => `<path d="M26 16.7c4.17-2.34 21-5.3 21 1.5 0 8.5-11.5 8-11.5 8s13.04-3.16 10.5 6c-2.5 9-9.5 5.5-11.5 4.5" stroke="${escape.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
'frown': (components, colors) => `<path d="M-5 41c3.21-7.96 15.1-24.77 37-28.35 21.9-3.58 33.13 8.46 36 14.92" stroke="${escape.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
'smirk': (components, colors) => `<path d="M10 24.16c4.94 6.45 12.43 13.6 23.98 11.96 11.55-1.62 16.68-9.6 15.17-16.04" stroke="${escape.xml(`${colors.mouth}`)}" stroke-width="4"/>`,
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const nose: ComponentGroup;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
export const nose = {
|
||||
'curve': (components, colors) => `<path d="M16.5 7c-.33 3.83 0 12.2 4 15 5 3.5-.5 12-10.5 10" stroke="#000" stroke-width="4"/>`,
|
||||
'pointed': (components, colors) => `<path d="M16.5 3c0 14 7 25 7 25S20 34 10 32" stroke="#000" stroke-width="4"/>`,
|
||||
'tound': (components, colors) => `<path d="M12.3 12.34c5.45-1.24 14.38.62 12.42 10.54-1.74 8.82-11.1 9.3-13.72 6.82" stroke="#000" stroke-width="4"/>`,
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { ComponentGroup } from '../types.js';
|
||||
export declare const shirt: ComponentGroup;
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { escape } from '@dicebear/core';
|
||||
export const shirt = {
|
||||
'open': (components, colors) => `<path d="M260.37 90.86H-12.54l.1-.2C-7.89 81.38.5 64.31 11.4 49.03c6.2-8.67 13.13-16.65 20.54-22.27 7.41-5.61 15.12-8.73 22.95-8.04 15.06 1.31 28.46 9.56 41.93 17.83l3.83 2.35c14.48 8.82 29.35 17.02 45.72 13.43 5.53-1.2 9.26-3.8 11.6-7.16 2.32-3.3 3.15-7.15 3.3-10.66.14-3.52-.4-6.85-.96-9.26a39.89 39.89 0 0 0-.75-2.78c3.63-3.64 7.47-5.77 11.43-6.73 4.3-1.03 8.89-.73 13.72.7 9.73 2.87 20.14 10.25 30.3 19.73 18.61 17.37 35.69 41.14 45.36 54.68Z" fill="${escape.xml(`${colors.shirt}`)}" stroke="#000" stroke-width="4.27"/>`,
|
||||
'crew': (components, colors) => `<g stroke="#000" stroke-width="4"><path d="M260.7 91H-12.64C3.67 61.66 26.86 42.98 64.44 34.4c16.02-3.65 34.67-5.47 56.56-5.47 9.46 0 16.81 1.44 23.8 3.35 2.58.7 5.18 1.5 7.84 2.3 4.4 1.34 8.97 2.72 13.91 3.86l.14.03.15.01c46.12 3.8 73.78 24.3 93.85 52.5Z" fill="${escape.xml(`${colors.shirt}`)}"/><path d="m52.93 36.58 9.15-19.6a1 1 0 0 1 1.25-.51c37.93 13.42 72.43 12.48 104.4 3.57a1 1 0 0 1 1.09.38l13.93 19.05a.98.98 0 0 1-.42 1.5c-33.6 13.2-96.67 10.95-128.91-3.07a.98.98 0 0 1-.49-1.32Z" fill="${escape.xml(`${colors.shirt}`)}"/><path opacity=".75" d="m52.93 36.58 9.15-19.6a1 1 0 0 1 1.25-.51c37.93 13.42 72.43 12.48 104.4 3.57a1 1 0 0 1 1.09.38l13.93 19.05a.98.98 0 0 1-.42 1.5c-33.6 13.2-96.67 10.95-128.91-3.07a.98.98 0 0 1-.49-1.32Z" fill="#fff"/></g>`,
|
||||
'collared': (components, colors) => `<g stroke="#000" stroke-width="4"><path d="M126.77 67.58 128 66l-1.23 1.58 1.72 1.34 1.19-1.83v-.02l.05-.06.04-.05a28.57 28.57 0 0 1 .8-1.18 112.35 112.35 0 0 1 11.5-14.05c3.67-3.78 7.83-7.4 12.13-9.93 4.31-2.53 8.58-3.84 12.53-3.3C209.17 44.2 240.4 63 260.67 91h-273.3c16.3-29.34 39.49-48.02 77.07-56.59 1.6-.36 3.78-.25 6.5.38 2.7.63 5.77 1.73 9.09 3.19 6.62 2.9 14.02 7.16 20.97 11.56a355.78 355.78 0 0 1 25.24 17.63l.4.3.1.08.02.02h.01Z" fill="${escape.xml(`${colors.shirt}`)}"/><path d="m52.61 37.08 5.17-19.23c.2-.78 1.22-1 1.76-.4C74.4 33.7 93.16 33.08 99.4 32.33c.84-.1 1.5.82 1.1 1.58L87.34 58.86c-.2.38-.62.6-1.04.5-3.95-.82-23.62-5.63-33.57-21.5a1 1 0 0 1-.12-.78ZM183.2 36.98 171.61 17.5c-.4-.66-1.37-.65-1.79 0-5.73 8.83-15.63 12.9-19.09 14.1-.62.22-.9.96-.57 1.53l13.5 22.81c.2.34.59.53.97.42 2.13-.61 9.46-3.67 18.54-18.34a1 1 0 0 0 .01-1.04Z" fill="${escape.xml(`${colors.shirt}`)}"/><path d="m52.61 37.08 5.17-19.23c.2-.78 1.22-1 1.76-.4C74.4 33.7 93.16 33.08 99.4 32.33c.84-.1 1.5.82 1.1 1.58L87.34 58.86c-.2.38-.62.6-1.04.5-3.95-.82-23.62-5.63-33.57-21.5a1 1 0 0 1-.12-.78ZM183.2 36.98 171.61 17.5c-.4-.66-1.37-.65-1.79 0-5.73 8.83-15.63 12.9-19.09 14.1-.62.22-.9.96-.57 1.53l13.5 22.81c.2.34.59.53.97.42 2.13-.61 9.46-3.67 18.54-18.34a1 1 0 0 0 .01-1.04Z" fill="#fff" fill-opacity=".75"/><path d="m109.5 54.5-9-21.5-7 15 16 6.5ZM141 53.5l9-21.5 7 15-16 6.5ZM70.5 14l-12 3 10 6.5 2-9.5ZM160 14l11 3-7 6.5-4-9.5Z" fill="#000" stroke-linejoin="round"/></g>`,
|
||||
};
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { Prng, StyleOptions } from "@dicebear/core";
|
||||
import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
|
||||
type Props = {
|
||||
prng: Prng;
|
||||
options: StyleOptions<Options>;
|
||||
components: ComponentPickCollection;
|
||||
colors: ColorPickCollection;
|
||||
};
|
||||
export declare function onPostCreate({ prng, options, components, colors }: Props): void;
|
||||
export {};
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
export function onPostCreate({ prng, options, components, colors }) {
|
||||
var _a;
|
||||
// Ensure that the mouth remains visible. #132
|
||||
if (((_a = components.facialHair) === null || _a === void 0 ? void 0 : _a.name) === 'beard' && colors.facialHair === colors.mouth) {
|
||||
colors.mouth = '#ffffff33';
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { Prng, StyleOptions } from "@dicebear/core";
|
||||
import { Options } from "../types.js";
|
||||
type Props = {
|
||||
prng: Prng;
|
||||
options: StyleOptions<Options>;
|
||||
};
|
||||
export declare function onPreCreate({ prng, options }: Props): void;
|
||||
export {};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
export function onPreCreate({ prng, options }) {
|
||||
var _a;
|
||||
// Prevent baseColor from being used a second time if possible.
|
||||
options.baseColor = options.baseColor && options.baseColor.length > 0 ? [prng.pick(options.baseColor, 'transparent')] : [];
|
||||
for (const colorName of ['eyebrows', 'hair', 'eyes', 'nose', 'ears', 'shirt', 'earrings', 'glasses', 'facialHair']) {
|
||||
// @ts-ignore
|
||||
const colorOption = (_a = options[`${colorName}Color`]) !== null && _a !== void 0 ? _a : [];
|
||||
const index = colorOption.indexOf(options.baseColor[0]);
|
||||
if (colorOption.length > 1 && index > -1) {
|
||||
colorOption.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
/*!
|
||||
* Micah (@dicebear/micah)
|
||||
*
|
||||
* Code licensed under MIT License.
|
||||
* Copyright (c) 2024 Florian Körner
|
||||
*
|
||||
* Design "Avatar Illustration System" by Micah Lanier licensed under CC BY 4.0. / Remix of the original.
|
||||
* Source: https://www.figma.com/community/file/829741575478342595
|
||||
* Homepage: https://dribbble.com/micahlanier
|
||||
* License: https://creativecommons.org/licenses/by/4.0/
|
||||
*/
|
||||
import type { StyleCreate, StyleMeta } from '@dicebear/core';
|
||||
import type { Options } from './types.js';
|
||||
export declare const meta: StyleMeta;
|
||||
export declare const create: StyleCreate<Options>;
|
||||
export { schema } from './schema.js';
|
||||
export type { Options } from './types.js';
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import { getComponents } from './utils/getComponents.js';
|
||||
import { getColors } from './utils/getColors.js';
|
||||
import { onPreCreate } from './hooks/onPreCreate.js';
|
||||
import { onPostCreate } from './hooks/onPostCreate.js';
|
||||
export const meta = {
|
||||
title: 'Avatar Illustration System',
|
||||
creator: 'Micah Lanier',
|
||||
source: 'https://www.figma.com/community/file/829741575478342595',
|
||||
homepage: 'https://dribbble.com/micahlanier',
|
||||
license: {
|
||||
name: 'CC BY 4.0',
|
||||
url: 'https://creativecommons.org/licenses/by/4.0/',
|
||||
},
|
||||
};
|
||||
export const create = ({ prng, options }) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
||||
onPreCreate({ prng, options });
|
||||
const components = getComponents({ prng, options });
|
||||
const colors = getColors({ prng, options });
|
||||
onPostCreate({ prng, options, components, colors });
|
||||
return {
|
||||
attributes: {
|
||||
viewBox: '0 0 360 360',
|
||||
fill: 'none',
|
||||
'shape-rendering': 'auto'
|
||||
},
|
||||
body: `<g transform="translate(80 23)">${(_b = (_a = components.base) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(170 183)">${(_d = (_c = components.mouth) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(110 102)">${(_f = (_e = components.eyebrows) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(49 11)">${(_h = (_g = components.hair) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="translate(142 119)">${(_k = (_j = components.eyes) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g><g transform="rotate(-8 1149.44 -1186.92)">${(_m = (_l = components.nose) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g><g transform="translate(84 154)">${(_p = (_o = components.ears) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}</g><g transform="translate(53 272)">${(_r = (_q = components.shirt) === null || _q === void 0 ? void 0 : _q.value(components, colors)) !== null && _r !== void 0 ? _r : ''}</g>`,
|
||||
extra: () => ({
|
||||
...Object.entries(components).reduce((acc, [key, value]) => {
|
||||
acc[key] = value === null || value === void 0 ? void 0 : value.name;
|
||||
return acc;
|
||||
}, {}),
|
||||
...Object.entries(colors).reduce((acc, [key, value]) => {
|
||||
acc[`${key}Color`] = value;
|
||||
return acc;
|
||||
}, {}),
|
||||
}),
|
||||
};
|
||||
};
|
||||
export { schema } from './schema.js';
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
import type { StyleSchema } from '@dicebear/core';
|
||||
export declare const schema: StyleSchema;
|
||||
+379
@@ -0,0 +1,379 @@
|
||||
/**
|
||||
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
||||
*
|
||||
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
||||
* File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
|
||||
*/
|
||||
export const schema = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"base": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"standard"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"standard"
|
||||
]
|
||||
},
|
||||
"baseColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"ac6651",
|
||||
"77311d"
|
||||
]
|
||||
},
|
||||
"earringColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"earrings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"hoop",
|
||||
"stud"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"hoop",
|
||||
"stud"
|
||||
]
|
||||
},
|
||||
"earringsProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 30
|
||||
},
|
||||
"ears": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"attached",
|
||||
"detached"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"attached",
|
||||
"detached"
|
||||
]
|
||||
},
|
||||
"eyeShadowColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"d2eff3",
|
||||
"e0ddff",
|
||||
"ffeba4",
|
||||
"ffedef",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"eyebrows": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"up",
|
||||
"down",
|
||||
"eyelashesUp",
|
||||
"eyelashesDown"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"up",
|
||||
"down",
|
||||
"eyelashesUp",
|
||||
"eyelashesDown"
|
||||
]
|
||||
},
|
||||
"eyebrowsColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"eyes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"eyes",
|
||||
"round",
|
||||
"eyesShadow",
|
||||
"smiling",
|
||||
"smilingShadow"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"eyes",
|
||||
"round",
|
||||
"eyesShadow",
|
||||
"smiling",
|
||||
"smilingShadow"
|
||||
]
|
||||
},
|
||||
"eyesColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"facialHair": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"beard",
|
||||
"scruff"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"beard",
|
||||
"scruff"
|
||||
]
|
||||
},
|
||||
"facialHairColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"facialHairProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 10
|
||||
},
|
||||
"glasses": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"round",
|
||||
"square"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"round",
|
||||
"square"
|
||||
]
|
||||
},
|
||||
"glassesColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"glassesProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 30
|
||||
},
|
||||
"hair": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"fonze",
|
||||
"mrT",
|
||||
"dougFunny",
|
||||
"mrClean",
|
||||
"dannyPhantom",
|
||||
"full",
|
||||
"turban",
|
||||
"pixie"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"fonze",
|
||||
"mrT",
|
||||
"dougFunny",
|
||||
"mrClean",
|
||||
"dannyPhantom",
|
||||
"full",
|
||||
"turban",
|
||||
"pixie"
|
||||
]
|
||||
},
|
||||
"hairColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
},
|
||||
"hairProbability": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 100
|
||||
},
|
||||
"mouth": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"surprised",
|
||||
"laughing",
|
||||
"nervous",
|
||||
"smile",
|
||||
"sad",
|
||||
"pucker",
|
||||
"frown",
|
||||
"smirk"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"surprised",
|
||||
"laughing",
|
||||
"nervous",
|
||||
"smile",
|
||||
"sad",
|
||||
"pucker",
|
||||
"frown",
|
||||
"smirk"
|
||||
]
|
||||
},
|
||||
"mouthColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"000000"
|
||||
]
|
||||
},
|
||||
"nose": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"curve",
|
||||
"pointed",
|
||||
"tound"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"curve",
|
||||
"pointed",
|
||||
"tound"
|
||||
]
|
||||
},
|
||||
"shirt": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"open",
|
||||
"crew",
|
||||
"collared"
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
"open",
|
||||
"crew",
|
||||
"collared"
|
||||
]
|
||||
},
|
||||
"shirtColor": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^(transparent|[a-fA-F0-9]{6})$"
|
||||
},
|
||||
"default": [
|
||||
"f9c9b6",
|
||||
"d2eff3",
|
||||
"000000",
|
||||
"e0ddff",
|
||||
"f4d150",
|
||||
"ac6651",
|
||||
"9287ff",
|
||||
"ffeba4",
|
||||
"fc909f",
|
||||
"ffedef",
|
||||
"6bd9e9",
|
||||
"77311d",
|
||||
"ffffff"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
Loaded 100 of 737 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user