Update of code base

This commit is contained in:
Rene Vergara 2021-10-20 15:51:14 -05:00
parent 6059c04b75
commit 30a83414ad
30 changed files with 506 additions and 524 deletions

View file

@ -3,6 +3,8 @@ const bodyparser = require('body-parser');
const app = express(); const app = express();
const postmodel = require('./models/post'); const postmodel = require('./models/post');
const usermodel = require('./models/user'); const usermodel = require('./models/user');
const ownermodel = require('./models/owner');
const itemmodel = require('./models/item');
const mongoose = require('mongoose'); const mongoose = require('mongoose');
const stdrpc = require('stdrpc'); const stdrpc = require('stdrpc');
//const RequestIP = require('@supercharge/request-ip'); //const RequestIP = require('@supercharge/request-ip');
@ -54,7 +56,15 @@ app.get('/api/posts', (req, res, next) => {
}); });
}); });
/*
* Add a new user
* @param address: String. Shielded zcash address
* @param session: String. Browser session uuid
* @param blocktime: Number. Blocktime of login zcash transaction
*/
app.post('/api/users', (req, res, next) => { app.post('/api/users', (req, res, next) => {
console.log('Post: /api/users');
const user = new usermodel({ const user = new usermodel({
address: req.body.address, address: req.body.address,
session: req.body.session, session: req.body.session,
@ -67,7 +77,7 @@ app.post('/api/users', (req, res, next) => {
}); });
app.get('/api/users', (req, res, next) => { app.get('/api/users', (req, res, next) => {
//console.log(req.query); console.log('Get: /api/users');
usermodel.find({'address': req.query.address, 'session': req.query.session}). usermodel.find({'address': req.query.address, 'session': req.query.session}).
then((documents) => { then((documents) => {
console.log("Searching"); console.log("Searching");
@ -79,6 +89,7 @@ app.get('/api/users', (req, res, next) => {
}); });
app.get('/api/getuser', (req, res, next) => { app.get('/api/getuser', (req, res, next) => {
console.log('Get: /api/getuser/', req.query.session);
usermodel.find({'session': req.query.session}). usermodel.find({'session': req.query.session}).
then((documents) => { then((documents) => {
console.log("Searching for user..."); console.log("Searching for user...");
@ -98,6 +109,7 @@ app.get('/api/getuser', (req, res, next) => {
}); });
app.get('/api/blockheight', (req, res, next) => { app.get('/api/blockheight', (req, res, next) => {
console.log('Get: /api/blockheight');
rpc.getblock("-1", 1).then(block => { rpc.getblock("-1", 1).then(block => {
res.status(200).json({ res.status(200).json({
message: 'Found block', message: 'Found block',
@ -106,7 +118,9 @@ app.get('/api/blockheight', (req, res, next) => {
}); });
}); });
app.get('/api/txs', (req, res, next) => { app.get('/api/txs', (req, res, next) => {
console.log('Get: /api/txs');
rpc.z_listreceivedbyaddress(fullnode.addr, 5).then(txs => { rpc.z_listreceivedbyaddress(fullnode.addr, 5).then(txs => {
res.status(200).json({ res.status(200).json({
message: 'Transactions found', message: 'Transactions found',
@ -116,10 +130,50 @@ app.get('/api/txs', (req, res, next) => {
}); });
app.get('/api/getaddr', (req, res, next) => { app.get('/api/getaddr', (req, res, next) => {
console.log('Get: /api/getaddr');
res.status(200).json({ res.status(200).json({
message: 'Sending address', message: 'Sending address',
addr: fullnode.addr addr: fullnode.addr
}); });
}); });
app.get('/api/getowner', (req, res, next) => {
console.log('Get: /api/getowner');
ownermodel.find({'address': req.query.address}).then((documents) => {
if(documents.length > 0){
//console.log(documents);
res.status(200).json({
message: 'Owner found!',
owner: documents
});
} else {
res.status(204).json({
message: 'Owner not found!',
owner: null
});
}
});
});
app.post('/api/addowner', (req, res, next) => {
console.log('Post: /api/addowner');
const owner = new ownermodel(req.body);
owner.save();
res.status(201).json({
message: 'Owner added successfully'
});
});
app.post('/api/addownername', (req, res, next) => {
console.log('Post: /api/addownername');
const owner = ownermodel.findOne({address: req.body.address});
owner.name = req.body.name;
owner.save();
res.status(201).json({
message: 'Ownername added successfully'
});
});
module.exports = app; module.exports = app;

10
backend/models/item.js Normal file
View file

@ -0,0 +1,10 @@
const mongoose = require('mongoose');
const userSchema = mongoose.Schema({
name: {type: String, required: true},
description: {type: String, required: true},
user: {type: String, required: true},
cost: {type: Number, required: true}
});
module.exports = mongoose.model('Item', userSchema);

8
backend/models/owner.js Normal file
View file

@ -0,0 +1,8 @@
const mongoose = require('mongoose');
const ownerSchema = mongoose.Schema({
address: {type: String, required:true},
name: {type: String, required:true}
});
module.exports = mongoose.model('Owner', ownerSchema);

294
package-lock.json generated
View file

@ -21,7 +21,6 @@
"@supercharge/request-ip": "^1.1.2", "@supercharge/request-ip": "^1.1.2",
"angular-local-storage": "^0.7.1", "angular-local-storage": "^0.7.1",
"easyqrcodejs": "^4.4.6", "easyqrcodejs": "^4.4.6",
"qrcode-with-logos": "^1.0.3",
"rxjs": "~6.6.0", "rxjs": "~6.6.0",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"urlsafe-base64": "^1.0.0", "urlsafe-base64": "^1.0.0",
@ -311,9 +310,9 @@
} }
}, },
"node_modules/@angular/cdk": { "node_modules/@angular/cdk": {
"version": "12.2.8", "version": "12.2.11",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.2.8.tgz", "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.2.11.tgz",
"integrity": "sha512-M0Y61o0yEVLMg+DSNsaDgiOifAV6OdumTgt2/kNoSuauPRWS0bkZJE58k3LR+cPi1Cho3UXELMKMOXZN9AhofA==", "integrity": "sha512-GgBB3NdVSv6RnDDOMspeLGg3uCbbmWIEIQ9VIqT5TWXWnljd2EANOQWdLu+fkmRzJn66FFdlTtJ6rHYoY/oBkA==",
"dependencies": { "dependencies": {
"tslib": "^2.2.0" "tslib": "^2.2.0"
}, },
@ -568,15 +567,15 @@
} }
}, },
"node_modules/@angular/material": { "node_modules/@angular/material": {
"version": "12.2.8", "version": "12.2.11",
"resolved": "https://registry.npmjs.org/@angular/material/-/material-12.2.8.tgz", "resolved": "https://registry.npmjs.org/@angular/material/-/material-12.2.11.tgz",
"integrity": "sha512-wRTaTZIGC9+2e8aft44V9Qqwp3PsR9AG0FeJ0spl8mdOlYEqMMyoRXjvMiWIjo2ywxHLoQgLXXsWn3ip2xnnVg==", "integrity": "sha512-3SIraessvZRfUgUA9LsJ0OUmvdm0ePj4v81l5uMRF9uUMVoM6OrW8MmIMzS1vAoHz9bpDakx5Xz3yqgZGco5Zw==",
"dependencies": { "dependencies": {
"tslib": "^2.2.0" "tslib": "^2.2.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/animations": "^12.0.0 || ^13.0.0-0", "@angular/animations": "^12.0.0 || ^13.0.0-0",
"@angular/cdk": "12.2.8", "@angular/cdk": "12.2.11",
"@angular/common": "^12.0.0 || ^13.0.0-0", "@angular/common": "^12.0.0 || ^13.0.0-0",
"@angular/core": "^12.0.0 || ^13.0.0-0", "@angular/core": "^12.0.0 || ^13.0.0-0",
"@angular/forms": "^12.0.0 || ^13.0.0-0", "@angular/forms": "^12.0.0 || ^13.0.0-0",
@ -3101,6 +3100,7 @@
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"dependencies": { "dependencies": {
"color-convert": "^1.9.0" "color-convert": "^1.9.0"
}, },
@ -3539,6 +3539,7 @@
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true,
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@ -3721,6 +3722,7 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@ -3740,29 +3742,11 @@
"ieee754": "^1.1.13" "ieee754": "^1.1.13"
} }
}, },
"node_modules/buffer-alloc": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"dependencies": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
}
},
"node_modules/buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
},
"node_modules/buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
},
"node_modules/buffer-from": { "node_modules/buffer-from": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
}, },
"node_modules/buffer-indexof": { "node_modules/buffer-indexof": {
"version": "1.1.1", "version": "1.1.1",
@ -3859,6 +3843,7 @@
"version": "5.3.1", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -4053,6 +4038,7 @@
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"dev": true,
"dependencies": { "dependencies": {
"string-width": "^3.1.0", "string-width": "^3.1.0",
"strip-ansi": "^5.2.0", "strip-ansi": "^5.2.0",
@ -4063,6 +4049,7 @@
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -4070,12 +4057,14 @@
"node_modules/cliui/node_modules/emoji-regex": { "node_modules/cliui/node_modules/emoji-regex": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
}, },
"node_modules/cliui/node_modules/is-fullwidth-code-point": { "node_modules/cliui/node_modules/is-fullwidth-code-point": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true,
"engines": { "engines": {
"node": ">=4" "node": ">=4"
} }
@ -4084,6 +4073,7 @@
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"dependencies": { "dependencies": {
"emoji-regex": "^7.0.1", "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0", "is-fullwidth-code-point": "^2.0.0",
@ -4097,6 +4087,7 @@
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"dependencies": { "dependencies": {
"ansi-regex": "^4.1.0" "ansi-regex": "^4.1.0"
}, },
@ -4153,6 +4144,7 @@
"version": "1.9.3", "version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"dependencies": { "dependencies": {
"color-name": "1.1.3" "color-name": "1.1.3"
} }
@ -4160,7 +4152,8 @@
"node_modules/color-name": { "node_modules/color-name": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
}, },
"node_modules/colord": { "node_modules/colord": {
"version": "2.8.0", "version": "2.8.0",
@ -5197,6 +5190,7 @@
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -5448,11 +5442,6 @@
"integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=",
"dev": true "dev": true
}, },
"node_modules/dijkstrajs": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz",
"integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg=="
},
"node_modules/dir-glob": { "node_modules/dir-glob": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@ -6552,6 +6541,7 @@
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true,
"engines": { "engines": {
"node": "6.* || 8.* || >= 10.*" "node": "6.* || 8.* || >= 10.*"
} }
@ -7187,6 +7177,7 @@
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true,
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@ -9965,6 +9956,7 @@
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"dependencies": { "dependencies": {
"p-try": "^2.0.0" "p-try": "^2.0.0"
}, },
@ -10018,6 +10010,7 @@
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -10286,14 +10279,6 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/pngjs": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/portfinder": { "node_modules/portfinder": {
"version": "1.0.28", "version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
@ -12246,39 +12231,6 @@
"node": ">=0.9" "node": ">=0.9"
} }
}, },
"node_modules/qrcode": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.4.tgz",
"integrity": "sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==",
"dependencies": {
"buffer": "^5.4.3",
"buffer-alloc": "^1.2.0",
"buffer-from": "^1.1.1",
"dijkstrajs": "^1.0.1",
"isarray": "^2.0.1",
"pngjs": "^3.3.0",
"yargs": "^13.2.4"
},
"bin": {
"qrcode": "bin/qrcode"
},
"engines": {
"node": ">=4"
}
},
"node_modules/qrcode-with-logos": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/qrcode-with-logos/-/qrcode-with-logos-1.0.3.tgz",
"integrity": "sha512-I0LkEyHsWpzObpvbj4jc93rj/+57DdshAd3c7xzh9Gms6bJ5A30ApFY0ZCHOVlF4Bqm2d9kFUV9oFCBkHORqOg==",
"dependencies": {
"qrcode": "^1.4.4"
}
},
"node_modules/qrcode/node_modules/isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
},
"node_modules/qs": { "node_modules/qs": {
"version": "6.7.0", "version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
@ -12620,6 +12572,7 @@
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -12636,7 +12589,8 @@
"node_modules/require-main-filename": { "node_modules/require-main-filename": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
}, },
"node_modules/requires-port": { "node_modules/requires-port": {
"version": "1.0.0", "version": "1.0.0",
@ -13136,7 +13090,8 @@
"node_modules/set-blocking": { "node_modules/set-blocking": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
}, },
"node_modules/set-value": { "node_modules/set-value": {
"version": "2.0.1", "version": "2.0.1",
@ -15358,7 +15313,8 @@
"node_modules/which-module": { "node_modules/which-module": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
}, },
"node_modules/wide-align": { "node_modules/wide-align": {
"version": "1.1.3", "version": "1.1.3",
@ -15422,6 +15378,7 @@
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"dev": true,
"dependencies": { "dependencies": {
"ansi-styles": "^3.2.0", "ansi-styles": "^3.2.0",
"string-width": "^3.0.0", "string-width": "^3.0.0",
@ -15435,6 +15392,7 @@
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -15442,12 +15400,14 @@
"node_modules/wrap-ansi/node_modules/emoji-regex": { "node_modules/wrap-ansi/node_modules/emoji-regex": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
}, },
"node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true,
"engines": { "engines": {
"node": ">=4" "node": ">=4"
} }
@ -15456,6 +15416,7 @@
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"dependencies": { "dependencies": {
"emoji-regex": "^7.0.1", "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0", "is-fullwidth-code-point": "^2.0.0",
@ -15469,6 +15430,7 @@
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"dependencies": { "dependencies": {
"ansi-regex": "^4.1.0" "ansi-regex": "^4.1.0"
}, },
@ -15494,7 +15456,8 @@
"node_modules/y18n": { "node_modules/y18n": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true
}, },
"node_modules/yallist": { "node_modules/yallist": {
"version": "4.0.0", "version": "4.0.0",
@ -15515,6 +15478,7 @@
"version": "13.3.2", "version": "13.3.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
"integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
"dependencies": { "dependencies": {
"cliui": "^5.0.0", "cliui": "^5.0.0",
"find-up": "^3.0.0", "find-up": "^3.0.0",
@ -15532,6 +15496,7 @@
"version": "13.1.2", "version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true,
"dependencies": { "dependencies": {
"camelcase": "^5.0.0", "camelcase": "^5.0.0",
"decamelize": "^1.2.0" "decamelize": "^1.2.0"
@ -15541,6 +15506,7 @@
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -15548,12 +15514,14 @@
"node_modules/yargs/node_modules/emoji-regex": { "node_modules/yargs/node_modules/emoji-regex": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
}, },
"node_modules/yargs/node_modules/find-up": { "node_modules/yargs/node_modules/find-up": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"dev": true,
"dependencies": { "dependencies": {
"locate-path": "^3.0.0" "locate-path": "^3.0.0"
}, },
@ -15565,6 +15533,7 @@
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true,
"engines": { "engines": {
"node": ">=4" "node": ">=4"
} }
@ -15573,6 +15542,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"dev": true,
"dependencies": { "dependencies": {
"p-locate": "^3.0.0", "p-locate": "^3.0.0",
"path-exists": "^3.0.0" "path-exists": "^3.0.0"
@ -15585,6 +15555,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"dev": true,
"dependencies": { "dependencies": {
"p-limit": "^2.0.0" "p-limit": "^2.0.0"
}, },
@ -15596,6 +15567,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
"dev": true,
"engines": { "engines": {
"node": ">=4" "node": ">=4"
} }
@ -15604,6 +15576,7 @@
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"dependencies": { "dependencies": {
"emoji-regex": "^7.0.1", "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0", "is-fullwidth-code-point": "^2.0.0",
@ -15617,6 +15590,7 @@
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"dependencies": { "dependencies": {
"ansi-regex": "^4.1.0" "ansi-regex": "^4.1.0"
}, },
@ -15822,9 +15796,9 @@
} }
}, },
"@angular/cdk": { "@angular/cdk": {
"version": "12.2.8", "version": "12.2.11",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.2.8.tgz", "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.2.11.tgz",
"integrity": "sha512-M0Y61o0yEVLMg+DSNsaDgiOifAV6OdumTgt2/kNoSuauPRWS0bkZJE58k3LR+cPi1Cho3UXELMKMOXZN9AhofA==", "integrity": "sha512-GgBB3NdVSv6RnDDOMspeLGg3uCbbmWIEIQ9VIqT5TWXWnljd2EANOQWdLu+fkmRzJn66FFdlTtJ6rHYoY/oBkA==",
"requires": { "requires": {
"parse5": "^5.0.0", "parse5": "^5.0.0",
"tslib": "^2.2.0" "tslib": "^2.2.0"
@ -16001,9 +15975,9 @@
} }
}, },
"@angular/material": { "@angular/material": {
"version": "12.2.8", "version": "12.2.11",
"resolved": "https://registry.npmjs.org/@angular/material/-/material-12.2.8.tgz", "resolved": "https://registry.npmjs.org/@angular/material/-/material-12.2.11.tgz",
"integrity": "sha512-wRTaTZIGC9+2e8aft44V9Qqwp3PsR9AG0FeJ0spl8mdOlYEqMMyoRXjvMiWIjo2ywxHLoQgLXXsWn3ip2xnnVg==", "integrity": "sha512-3SIraessvZRfUgUA9LsJ0OUmvdm0ePj4v81l5uMRF9uUMVoM6OrW8MmIMzS1vAoHz9bpDakx5Xz3yqgZGco5Zw==",
"requires": { "requires": {
"tslib": "^2.2.0" "tslib": "^2.2.0"
} }
@ -17890,6 +17864,7 @@
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": { "requires": {
"color-convert": "^1.9.0" "color-convert": "^1.9.0"
} }
@ -18238,7 +18213,8 @@
"base64-js": { "base64-js": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true
}, },
"base64id": { "base64id": {
"version": "2.0.0", "version": "2.0.0",
@ -18381,34 +18357,17 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"requires": { "requires": {
"base64-js": "^1.3.1", "base64-js": "^1.3.1",
"ieee754": "^1.1.13" "ieee754": "^1.1.13"
} }
}, },
"buffer-alloc": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"requires": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
}
},
"buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
},
"buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
},
"buffer-from": { "buffer-from": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
}, },
"buffer-indexof": { "buffer-indexof": {
"version": "1.1.1", "version": "1.1.1",
@ -18489,7 +18448,8 @@
"camelcase": { "camelcase": {
"version": "5.3.1", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true
}, },
"caniuse-api": { "caniuse-api": {
"version": "3.0.0", "version": "3.0.0",
@ -18638,6 +18598,7 @@
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"dev": true,
"requires": { "requires": {
"string-width": "^3.1.0", "string-width": "^3.1.0",
"strip-ansi": "^5.2.0", "strip-ansi": "^5.2.0",
@ -18647,22 +18608,26 @@
"ansi-regex": { "ansi-regex": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
}, },
"emoji-regex": { "emoji-regex": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
}, },
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
}, },
"string-width": { "string-width": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": { "requires": {
"emoji-regex": "^7.0.1", "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0", "is-fullwidth-code-point": "^2.0.0",
@ -18673,6 +18638,7 @@
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": { "requires": {
"ansi-regex": "^4.1.0" "ansi-regex": "^4.1.0"
} }
@ -18716,6 +18682,7 @@
"version": "1.9.3", "version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": { "requires": {
"color-name": "1.1.3" "color-name": "1.1.3"
} }
@ -18723,7 +18690,8 @@
"color-name": { "color-name": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
}, },
"colord": { "colord": {
"version": "2.8.0", "version": "2.8.0",
@ -19501,7 +19469,8 @@
"decamelize": { "decamelize": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
}, },
"decode-uri-component": { "decode-uri-component": {
"version": "0.2.0", "version": "0.2.0",
@ -19702,11 +19671,6 @@
"integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=",
"dev": true "dev": true
}, },
"dijkstrajs": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz",
"integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg=="
},
"dir-glob": { "dir-glob": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@ -20588,7 +20552,8 @@
"get-caller-file": { "get-caller-file": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true
}, },
"get-intrinsic": { "get-intrinsic": {
"version": "1.1.1", "version": "1.1.1",
@ -21113,7 +21078,8 @@
"ieee754": { "ieee754": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true
}, },
"ignore": { "ignore": {
"version": "5.1.8", "version": "5.1.8",
@ -23230,6 +23196,7 @@
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"requires": { "requires": {
"p-try": "^2.0.0" "p-try": "^2.0.0"
} }
@ -23264,7 +23231,8 @@
"p-try": { "p-try": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
}, },
"pacote": { "pacote": {
"version": "11.3.5", "version": "11.3.5",
@ -23474,11 +23442,6 @@
"find-up": "^4.0.0" "find-up": "^4.0.0"
} }
}, },
"pngjs": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="
},
"portfinder": { "portfinder": {
"version": "1.0.28", "version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
@ -24863,35 +24826,6 @@
"integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==",
"dev": true "dev": true
}, },
"qrcode": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.4.tgz",
"integrity": "sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==",
"requires": {
"buffer": "^5.4.3",
"buffer-alloc": "^1.2.0",
"buffer-from": "^1.1.1",
"dijkstrajs": "^1.0.1",
"isarray": "^2.0.1",
"pngjs": "^3.3.0",
"yargs": "^13.2.4"
},
"dependencies": {
"isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
}
}
},
"qrcode-with-logos": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/qrcode-with-logos/-/qrcode-with-logos-1.0.3.tgz",
"integrity": "sha512-I0LkEyHsWpzObpvbj4jc93rj/+57DdshAd3c7xzh9Gms6bJ5A30ApFY0ZCHOVlF4Bqm2d9kFUV9oFCBkHORqOg==",
"requires": {
"qrcode": "^1.4.4"
}
},
"qs": { "qs": {
"version": "6.7.0", "version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
@ -25160,7 +25094,8 @@
"require-directory": { "require-directory": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
}, },
"require-from-string": { "require-from-string": {
"version": "2.0.2", "version": "2.0.2",
@ -25171,7 +25106,8 @@
"require-main-filename": { "require-main-filename": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
}, },
"requires-port": { "requires-port": {
"version": "1.0.0", "version": "1.0.0",
@ -25549,7 +25485,8 @@
"set-blocking": { "set-blocking": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
}, },
"set-value": { "set-value": {
"version": "2.0.1", "version": "2.0.1",
@ -27286,7 +27223,8 @@
"which-module": { "which-module": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
}, },
"wide-align": { "wide-align": {
"version": "1.1.3", "version": "1.1.3",
@ -27340,6 +27278,7 @@
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"dev": true,
"requires": { "requires": {
"ansi-styles": "^3.2.0", "ansi-styles": "^3.2.0",
"string-width": "^3.0.0", "string-width": "^3.0.0",
@ -27349,22 +27288,26 @@
"ansi-regex": { "ansi-regex": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
}, },
"emoji-regex": { "emoji-regex": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
}, },
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
}, },
"string-width": { "string-width": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": { "requires": {
"emoji-regex": "^7.0.1", "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0", "is-fullwidth-code-point": "^2.0.0",
@ -27375,6 +27318,7 @@
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": { "requires": {
"ansi-regex": "^4.1.0" "ansi-regex": "^4.1.0"
} }
@ -27399,7 +27343,8 @@
"y18n": { "y18n": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true
}, },
"yallist": { "yallist": {
"version": "4.0.0", "version": "4.0.0",
@ -27417,6 +27362,7 @@
"version": "13.3.2", "version": "13.3.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
"integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
"requires": { "requires": {
"cliui": "^5.0.0", "cliui": "^5.0.0",
"find-up": "^3.0.0", "find-up": "^3.0.0",
@ -27433,17 +27379,20 @@
"ansi-regex": { "ansi-regex": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
}, },
"emoji-regex": { "emoji-regex": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
}, },
"find-up": { "find-up": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"dev": true,
"requires": { "requires": {
"locate-path": "^3.0.0" "locate-path": "^3.0.0"
} }
@ -27451,12 +27400,14 @@
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
}, },
"locate-path": { "locate-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"dev": true,
"requires": { "requires": {
"p-locate": "^3.0.0", "p-locate": "^3.0.0",
"path-exists": "^3.0.0" "path-exists": "^3.0.0"
@ -27466,6 +27417,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"dev": true,
"requires": { "requires": {
"p-limit": "^2.0.0" "p-limit": "^2.0.0"
} }
@ -27473,12 +27425,14 @@
"path-exists": { "path-exists": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
"dev": true
}, },
"string-width": { "string-width": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": { "requires": {
"emoji-regex": "^7.0.1", "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0", "is-fullwidth-code-point": "^2.0.0",
@ -27489,6 +27443,7 @@
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": { "requires": {
"ansi-regex": "^4.1.0" "ansi-regex": "^4.1.0"
} }
@ -27499,6 +27454,7 @@
"version": "13.1.2", "version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true,
"requires": { "requires": {
"camelcase": "^5.0.0", "camelcase": "^5.0.0",
"decamelize": "^1.2.0" "decamelize": "^1.2.0"

View file

@ -1,15 +1,13 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { PostCreateComponent } from './posts/post-create/post-create.component';
import { PostListComponent } from './posts/post-list/post-list.component';
import { ViewerComponent } from './viewer/viewer.component'; import { ViewerComponent } from './viewer/viewer.component';
import { LoginComponent } from './login/login.component'; import { LoginComponent } from './login/login.component';
import { AuthGuardService } from './auth-guard.service'; import { AuthGuardService } from './auth-guard.service';
const routes: Routes = [ const routes: Routes = [
{ path: '', component: LoginComponent }, { path: '', component: LoginComponent },
{ path: 'create', component: PostCreateComponent, canActivate: [AuthGuardService]}, //{ path: 'create', component: PostCreateComponent, canActivate: [AuthGuardService]},
{ path: 'view', component: PostListComponent, canActivate: [AuthGuardService]}, { path: 'view', component: ViewerComponent, canActivate: [AuthGuardService]},
{ path: 'login', component: LoginComponent} { path: 'login', component: LoginComponent}
]; ];

View file

@ -1,4 +1,3 @@
<app-header></app-header>
<main> <main>
<router-outlet></router-outlet> <router-outlet></router-outlet>
</main> </main>

View file

@ -1,5 +1,5 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Post} from './posts/post.model'; //import { Post} from './posts/post.model';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',

View file

@ -7,25 +7,28 @@ import { MatButtonModule } from '@angular/material/button';
import { MatToolbarModule } from '@angular/material/toolbar'; import { MatToolbarModule } from '@angular/material/toolbar';
import { MatExpansionModule } from '@angular/material/expansion'; import { MatExpansionModule } from '@angular/material/expansion';
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import { MatDialogModule } from '@angular/material/dialog';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { PostCreateComponent } from './posts/post-create/post-create.component'; //import { PostCreateComponent } from './posts/post-create/post-create.component';
import { HeaderComponent } from './header/header.component'; //import { HeaderComponent } from './header/header.component';
import { PostListComponent } from './posts/post-list/post-list.component'; //import { PostListComponent } from './posts/post-list/post-list.component';
import { PostService } from './posts/posts.service'; //import { PostService } from './posts/posts.service';
import { ViewerComponent } from './viewer/viewer.component'; //import { ViewerComponent } from './viewer/viewer.component';
import { LoginComponent } from './login/login.component'; import { LoginComponent } from './login/login.component';
//import { NameDialogComponent } from './namedialog/namedialog.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
PostCreateComponent, //PostCreateComponent,
HeaderComponent, //HeaderComponent,
ViewerComponent, //ViewerComponent,
LoginComponent, LoginComponent,
PostListComponent //NameDialogComponent,
//PostListComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
@ -37,9 +40,11 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
MatButtonModule, MatButtonModule,
MatToolbarModule, MatToolbarModule,
MatExpansionModule, MatExpansionModule,
MatDialogModule,
BrowserAnimationsModule BrowserAnimationsModule
], ],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]//,
//entryComponents: [NameDialogComponent]
}) })
export class AppModule { } export class AppModule { }

View file

@ -1,5 +1,5 @@
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {Subject} from 'rxjs'; import {Subject, Subscription, BehaviorSubject, Observable} from 'rxjs';
import {HttpClient, HttpParams} from '@angular/common/http'; import {HttpClient, HttpParams} from '@angular/common/http';
import {UserService} from './user.service'; import {UserService} from './user.service';
@ -9,25 +9,31 @@ import {UserService} from './user.service';
export class FullnodeService{ export class FullnodeService{
private height = 0; private height = 0;
private memoList: string[] = []; private memoList: string[] = [];
private addr: string = ''; private addr: string = '';
private heightUpdated = new Subject<number>(); private _heightUpdated: BehaviorSubject<number> = new BehaviorSubject(this.height);
private memoUpdated = new Subject<string[]>(); private _memoUpdated: BehaviorSubject<string[]> = new BehaviorSubject(this.memoList);
private addrUpdated = new Subject<string>(); private _addrUpdated: BehaviorSubject<string> = new BehaviorSubject(this.addr);
public readonly addrUpdate: Observable<string> = this._addrUpdated.asObservable();
public readonly heightUpdate: Observable<number> = this._heightUpdated.asObservable();
public readonly memoUpdate: Observable<string[]> = this._memoUpdated.asObservable();
private UserSub: Subscription = new Subscription();
constructor(private http: HttpClient, public userService: UserService){ constructor(private http: HttpClient, public userService: UserService){
} }
getHeight() { getHeight(){
this.http.get<{message: string, height: number}>('http://localhost:3000/api/blockheight'). let obs = this.http.get<{message: string, height: number}>('http://localhost:3000/api/blockheight');
subscribe((BlockData) => { obs.subscribe((BlockData) => {
this.height = BlockData.height; this.height = BlockData.height;
this.heightUpdated.next(this.height); this._heightUpdated.next(this.height);
}); });
return obs;
} }
getHeightUpdateListener() { //getHeightUpdateListener() {
return this.heightUpdated; //return this.heightUpdated;
} //}
hexToString(hexString: string) { hexToString(hexString: string) {
var str = ''; var str = '';
@ -53,38 +59,40 @@ export class FullnodeService{
var address = match[2]; var address = match[2];
var session = match[1]; var session = match[1];
var blocktime = TxData.txs[i].blocktime; var blocktime = TxData.txs[i].blocktime;
const params = new HttpParams().append('address', address).append('session', session); console.log(memo);
this.http.get<{message: string, users: any}>('http://localhost:3000/api/users', {headers:{}, params: params}). console.log(`Searching for user for ${session}`);
subscribe((UserData) => { this.userService.getUser(session);
console.log(UserData.message); this.UserSub = this.userService.getZaddrUpdateListener().
console.log(UserData.users.length); subscribe((zAddr) => {
if (UserData.users.length == 0){ if (zAddr.length == 0) {
console.log(`No matching user found! Adding ${address} ${session} ${blocktime}`); console.log('FS: getMemos new adding user');
this.userService.addUser(address, session, blocktime); this.userService.addUser(address, session, blocktime);
} else {
console.log('FS: getMemos found user');
} }
}); });
} }
} }
} }
this.memoList = memos; this.memoList = memos;
this.memoUpdated.next(this.memoList); this._memoUpdated.next(this.memoList);
}); });
} }
getMemoUpdateListener() { //getMemoUpdateListener() {
return this.memoUpdated; //return this.memoUpdated;
} //}
getAddr() { getAddr() {
this.http.get<{message: string, addr: string}>('http://localhost:3000/api/getaddr'). this.http.get<{message: string, addr: string}>('http://localhost:3000/api/getaddr').
subscribe((AddrData) => { subscribe((AddrData) => {
this.addr = AddrData.addr; this.addr = AddrData.addr;
this.addrUpdated.next(this.addr); this._addrUpdated.next(this.addr);
}); });
} }
getAddrUpdateListener() { //getAddrUpdateListener() {
return this.addrUpdated; //return this.addrUpdated;
} //}
} }

View file

@ -1,3 +1,7 @@
* {
font-family: 'Roboto Mono', monospace;
}
a{ a{
text-decoration: none; text-decoration: none;
color: white; color: white;

View file

@ -5,6 +5,9 @@
</a> </a>
</span> </span>
<span class="spacer"></span> <span class="spacer"></span>
<span>
testy
</span>
<ul> <ul>
<li> <li>
<a mat-button routerLink = "/view" routerLinkAcitve = "mat-accent">Viewer</a> <a mat-button routerLink = "/view" routerLinkAcitve = "mat-accent">Viewer</a>

View file

@ -1,27 +1,45 @@
import { Component, OnInit } from '@angular/core'; import {Component, OnInit, OnDestroy} from '@angular/core';
import {FullnodeService} from '../fullnode.service'; import {FullnodeService} from '../fullnode.service';
import { UserService } from '../user.service';
import {Subscription} from 'rxjs'; import {Subscription} from 'rxjs';
import {Owner} from '../owner.model';
@Component({ @Component({
selector: 'app-header', selector: 'app-header',
templateUrl: './header.component.html', templateUrl: './header.component.html',
styleUrls: ['./header.component.css'] styleUrls: ['./header.component.css']
}) })
export class HeaderComponent implements OnInit { export class HeaderComponent implements OnInit, OnDestroy {
height = 0; public height = 0;
private FullnodeSub: Subscription = new Subscription(); private owner: Owner= {_id:'', address: 'none', name:''};
constructor(public fullnodeService: FullnodeService){ private session: string | null = '';
//private FullnodeSub: Subscription = new Subscription();
private UserSub: Subscription = new Subscription();
constructor(
public fullnodeService: FullnodeService,
public userService: UserService
){
} }
ngOnInit(){ ngOnInit(){
this.fullnodeService.getHeight(); this.fullnodeService.getHeight();
this.FullnodeSub=this.fullnodeService.getHeightUpdateListener(). this.height = this.fullnodeService.heightUpdate;
subscribe((height: number) => { }
this.height = height;
}); ngOnDestroy(){
//this.FullnodeSub.unsubscribe();
//this.UserSub.unsubscribe();
}
shortenZaddr() {
var addr = this.owner.address;
var end = addr.length;
var last = end - 5;
return addr.substring(0,5).concat('...').concat(addr.substring(last, end));
} }
} }

View file

@ -0,0 +1,7 @@
export interface Item {
id: string;
name: string;
description: string;
cost: number;
user: string;
}

View file

@ -0,0 +1,17 @@
import { Item } from './item.model';
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import { HttpClient } from '@angular/common/http';
@Injectable({providedIn: 'root'})
export class ItemService{
private items: Item[] = [];
private itemUpdated = new Subject<Item[]>();
constructor(private http: HttpClient){
}
getItems(addr: string){
}
}

View file

@ -1,6 +1,6 @@
<br> <br>
<div align="center"> <div align="center">
<h1>Welcome to Sell4ZEC!</h1> <h1>Welcome to Zgo!</h1>
</div> </div>
<table> <table>
<colgroup> <colgroup>

View file

@ -29,68 +29,44 @@ export class LoginComponent implements OnInit {
ngOnInit(){ ngOnInit(){
this.fullnodeService.getMemos(); this.fullnodeService.getMemos();
this.fullnodeService.getAddr(); this.fullnodeService.getAddr();
this.FullnodeSub = this.fullnodeService.getAddrUpdateListener(). var nodeAddr = this.fullnodeService.addrUpdate;
subscribe((addr: string) => { var localToken = localStorage.getItem('s4z_token');
var localToken = localStorage.getItem('s4z_token'); console.log(localToken);
console.log(localToken); if(localToken == null){
if(localToken == null){ var token = uuidv4();
var token = uuidv4(); localStorage.setItem('s4z_token', token);
localStorage.setItem('s4z_token', token); console.log('Showing QR code for login');
console.log('Showing QR code for login'); console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token))));
console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token)))); var codeString = `zcash:${nodeAddr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token)))}`;
var codeString = `zcash:${addr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token)))}`; console.log(codeString);
console.log(codeString); var qrcode = new QRCode(document.getElementById("qrcode"), {
var qrcode = new QRCode(document.getElementById("qrcode"), { text: codeString,
text: codeString, logo: "/assets/zcash.png",
logo: "/assets/zcash.png", logoWidth: 80,
logoWidth: 80, logoHeight: 80
logoHeight: 80 });
}); } else {
} else { this.userService.getUser(localToken);
this.userService.getUser(localToken); this.userService.getZaddrUpdateListener().
this.userService.getZaddrUpdateListener(). subscribe((userAddr: string) => {
subscribe((userAddr: string) => { if (userAddr.length != 0) {
if (userAddr != '') { console.log('Log in found!');
console.log('Log in found!'); //this.router.navigate(['/view']);
this.router.navigate(['/create']); } else {
} else { console.log('No login for existing token found');
console.log('No login for token found'); console.log('Showing QR code for login');
console.log('Showing QR code for login'); //console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken))));
//console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken)))); var codeString = `zcash:${nodeAddr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken!)))}`;
var codeString = `zcash:${addr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken!)))}`; console.log(codeString);
console.log(codeString); var qrcode = new QRCode(document.getElementById("qrcode"), {
var qrcode = new QRCode(document.getElementById("qrcode"), { text: codeString,
text: codeString, logo: "/assets/zcash.png",
logo: "/assets/zcash.png", logoWidth: 80,
logoWidth: 80, logoHeight: 80
logoHeight: 80 });
}); }
});
} }
});
}
});
//this.FullnodeSub=this.fullnodeService.getMemoUpdateListener().
//subscribe((memos: string[]) => {
//this.memos = memos;
//var addr = this.fullnodeService.getAddr();
//if(localStorage.getItem('s4z_token') == null){
//var token = uuidv4();
//localStorage.setItem('s4z_token', token);
//console.log('Showing QR code for login');
//console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token))));
//var codeString = `zcash:${addr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token)))}`;
//console.log(codeString);
//var qrcode = new QRCode(document.getElementById("qrcode"), {
//text: codeString,
//logo: "/assets/zcash.png",
//logoWidth: 80,
//logoHeight: 80
//});
//} else {
//console.log(localStorage.getItem('s4z_token'));
//}
//});
} }
ngOnDestroy(){ ngOnDestroy(){

View file

@ -0,0 +1,14 @@
<h2 mat-dialog-title>Set the name of your business</h2>
<form (submit)="save(nameForm)" #nameForm="NgForm">
<mat-dialog-content>
<mat-form-field>
<input matInput type="text" name="bizname" placeholder="Bubba's Bakery" ngModel required #bizname="ngModel">
<mat-error *ngIf="bizname.invalid">This field is required</mat-error>
</mat-form-field>
</mat-dialog-content>
<mat-dialog-actions>
<button class="mat-raised-button" (click)="close()">Close</button>
<button class="mat-raised-button mat-primary" type="submit">Save</button>
</mat-dialog-actions>
</form>

View file

@ -0,0 +1,32 @@
import { Inject, Component, OnInit, OnDestroy } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { NgForm } from '@angular/forms';
@Component({
selector: 'name-dialog',
templateUrl: './namedialog.component.html'
})
export class NameDialogComponent implements OnInit{
bizname: string = '';
constructor(
private dialogRef: MatDialogRef<NameDialogComponent>
) {
}
ngOnInit() {
}
save(form: NgForm) {
if (form.invalid) {
return;
}
this.dialogRef.close(form.value.bizname);
//console.log(`Saving name ${form.value.bizname}`);
}
close() {
this.dialogRef.close();
}
}

5
src/app/owner.model.ts Normal file
View file

@ -0,0 +1,5 @@
export interface Owner {
_id: string;
address: string;
name: string;
}

View file

@ -1,4 +0,0 @@
mat-form-field,
textarea{
width:100%;
}

View file

@ -1,13 +0,0 @@
<mat-card>
<form (submit)="onAddPost(postForm)" #postForm="ngForm">
<mat-form-field>
<input matInput type="text" name="enteredTitle" ngModel required #enteredTitle="ngModel">
<mat-error *ngIf="enteredTitle.invalid">This field is required</mat-error>
</mat-form-field>
<mat-form-field>
<textarea matInput rows="6" name="enteredContent" ngModel required #enteredContent="ngModel"></textarea>
<mat-error *ngIf="enteredContent.invalid">This field is required</mat-error>
</mat-form-field>
<button mat-raised-button color="primary" type="submit" >Save Post</button>
</form>
</mat-card>

View file

@ -1,34 +0,0 @@
import {Component, EventEmitter, Output} from '@angular/core';
import { Post } from '../post.model';
import { NgForm } from '@angular/forms';
import { PostService } from '../posts.service';
@Component({
selector: 'app-post-create',
templateUrl: './post-create.component.html',
styleUrls: ['./post-create.component.css']
})
export class PostCreateComponent {
enteredTitle = '';
enteredContent = '';
constructor(public postsService: PostService){}
//@Output() postCreated = new EventEmitter<Post>();
onAddPost(form: NgForm) {
//console.log(this.enteredTitle);
//console.log(this.enteredContent);
if (form.invalid) {
return;
}
const post: Post = {
id: '',
title: form.value.enteredTitle,
content: form.value.enteredContent
};
//console.log("Pressed the button!");
//this.postCreated.emit(post);
this.postsService.addPost(form.value.enteredTitle, form.value.enteredContent);
}
}

View file

@ -1,8 +0,0 @@
:host{
Display: block;
margin-top: 1rem;
}
.info-text{
text-align: center;
}

View file

@ -1,9 +0,0 @@
<mat-accordion *ngIf = "posts.length > 0">
<mat-expansion-panel *ngFor="let post of posts">
<mat-expansion-panel-header>
{{post.title}}
</mat-expansion-panel-header>
<p>{{post.content}}</p>
</mat-expansion-panel>
</mat-accordion>
<p class = "info-text mat-body-1" *ngIf = "posts.length <= 0">No posts!</p>

View file

@ -1,36 +0,0 @@
import { Component, Input, OnInit, OnDestroy } from '@angular/core';
import { Post } from '../post.model';
import { PostService } from '../posts.service';
import { Subscription } from 'rxjs';
@Component({
selector: 'app-post-list',
templateUrl: './post-list.component.html',
styleUrls: ['./post-list.component.css']
})
export class PostListComponent implements OnInit, OnDestroy {
//posts=[
//{title: 'First Post', content:'This is the first post\'s content'},
//{title: 'Second Post', content:'This is the second post\'s content'},
//{title: 'Third Post', content:'This is the third post\'s content'}
//];
posts: Post[] = [];
private PostSub: Subscription = new Subscription();
constructor(public postsService: PostService){
//this.postsService = postsService;
}
ngOnInit(){
this.postsService.getPosts();
this.PostSub=this.postsService.getPostUpdateListener().
subscribe((posts: Post[]) => {
this.posts = posts;
});
}
ngOnDestroy(){
this.PostSub.unsubscribe();
}
}

View file

@ -1,5 +0,0 @@
export interface Post {
id: string;
title: string;
content: string;
}

View file

@ -1,35 +0,0 @@
import {Post} from './post.model';
import {Injectable} from '@angular/core';
import {Subject} from 'rxjs';
import {HttpClient} from '@angular/common/http';
@Injectable({providedIn: 'root'})
export class PostService{
private posts: Post[] = [];
private postUpdated = new Subject<Post[]>();
constructor(private http: HttpClient){
}
getPosts(){
this.http.get<{message: string, posts: Post[]}>('http://localhost:3000/api/posts')
.subscribe((PostData) => {
this.posts = PostData.posts;
this.postUpdated.next([...this.posts]);
});
}
addPost(title: string, content: string){
const post: Post={id: '', title: title, content: content};
this.http.post<{message: string}>('http://localhost:3000/api/posts', post).
subscribe((responseData) => {
console.log(responseData.message);
this.posts.push(post);
this.postUpdated.next([...this.posts]);
});
}
getPostUpdateListener() {
return this.postUpdated;
}
}

View file

@ -2,19 +2,45 @@ import {Injectable} from '@angular/core';
import {Subject} from 'rxjs'; import {Subject} from 'rxjs';
import {HttpClient, HttpParams} from '@angular/common/http'; import {HttpClient, HttpParams} from '@angular/common/http';
import {User} from './user.model'; import {User} from './user.model';
import {Owner} from './owner.model';
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class UserService{ export class UserService{
private uZaddr = ''; private uZaddr = '';
private oZaddr = '';
private uName = '';
private session: string | null = '';
private uZaddrUpdated = new Subject<string>(); private uZaddrUpdated = new Subject<string>();
private uNameUpdated = new Subject<string>();
private ownerUpdated = new Subject<Owner>();
constructor(private http: HttpClient){ constructor(private http: HttpClient){
this.session = localStorage.getItem('s4z_token');
} }
addUser(address: string, session: string, blocktime: number) { addUser(address: string, session: string, blocktime: number) {
const user: User={_id: '', address: address, session: session, blocktime: blocktime}; const user: User={_id: '', address: address, session: session, blocktime: blocktime};
this.http.post<{message: string}>('http://localhost:3000/api/users', user). this.http.post<{message: string}>('http://localhost:3000/api/users', user).
subscribe((responseData) => {
console.log(responseData.message);
//this.getOwner(address);
//if (this.oZaddr == '') {
//this.addOwner(address);
//}
});
}
addOwner(address: string) {
const owner: Owner={_id: '', address: address, name: 'Zgo-'.concat(address.substring(0,5))};
this.http.post<{message: string}>('http://localhost:3000/api/addowner', {address: owner.address, name: owner.name}).
subscribe((responseData) => {
console.log(responseData.message);
});
}
addOwnerName(address: string, name: string) {
this.http.post<{message: string}>('http://localhost:3000/api/addownername', {address, name}).
subscribe((responseData) => { subscribe((responseData) => {
console.log(responseData.message); console.log(responseData.message);
}); });
@ -22,21 +48,59 @@ export class UserService{
getUser(session: string) { getUser(session: string) {
const params = new HttpParams().append('session', session); const params = new HttpParams().append('session', session);
console.log(`US: Searching for session ${session} `);
this.http.get<{message: string, user: any}>('http://localhost:3000/api/getuser', { headers:{}, params: params, observe: 'response'}). this.http.get<{message: string, user: any}>('http://localhost:3000/api/getuser', { headers:{}, params: params, observe: 'response'}).
subscribe((UserDataResponse) => { subscribe((UserDataResponse) => {
console.log(UserDataResponse.status); console.log(UserDataResponse.status);
if (UserDataResponse.status == 200){ if (UserDataResponse.status == 200){
this.uZaddr = UserDataResponse.body!.user[0].address; this.uZaddr = UserDataResponse.body!.user[0].address;
console.log(`US: Found user, returning zaddr ${this.uZaddr}`);
this.uZaddrUpdated.next(this.uZaddr); this.uZaddrUpdated.next(this.uZaddr);
} else { } else {
console.log('US: Did not find user');
this.uZaddrUpdated.next(''); this.uZaddrUpdated.next('');
} }
}); });
} }
getOwner(address: string) {
const ownParams = new HttpParams().append('address', address);
this.http.get<{message:string, owner: any}>('http://localhost:3000/api/getowner', {params: ownParams, observe: 'response'}).
subscribe((OwnerDataResponse) => {
if (OwnerDataResponse.status == 200) {
this.ownerUpdated.next(OwnerDataResponse.body!.owner[0]);
} else {
console.log("No owner found, adding");
//this.addOwner(address);
}
});
}
hasOwner() {
return this.uZaddr === this.oZaddr;
}
getName() {
if (this.session != null) {
this.getUser(this.session);
this.uZaddrUpdated.subscribe((addr: string) => {
console.log(` US: ${addr}`);
this.getOwner(addr);
});
}
}
getNameUpdateListener() {
return this.uNameUpdated;
}
getZaddrUpdateListener() { getZaddrUpdateListener() {
return this.uZaddrUpdated; return this.uZaddrUpdated;
} }
getOwnerUpdateListener() {
return this.ownerUpdated;
}
} }

View file

@ -1,27 +1,4 @@
<br> <!--<app-header></app-header>-->
<div align="center"> <div align="center">
<h1>Welcome to Sell4ZEC!</h1> <h1>{{message}}</h1>
</div> </div>
<table>
<colgroup>
<col span="1" style="width: 75%;">
<col span="1" style="width: 25%;">
</colgroup>
<tr>
<td>
<p>A non-custodial point-of-sale application, powered by Zcash.</p>
</td>
<td>
<div align="center" id="info">
<p>
Ensure you include your Reply-To shielded address!
</p>
<p>
Your shielded address is your username and all payments will be sent to it.
</p>
</div>
<br>
<div align="center" id="qrcode"></div>
</td>
</tr>
</table>

View file

@ -1,12 +1,16 @@
import { Component, OnInit, OnDestroy, Injectable } from '@angular/core'; import { Component, OnInit, OnDestroy } from '@angular/core';
import { CanActivate, Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; import { CanActivate, Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { UserService } from '../user.service'; import { UserService } from '../user.service';
import { FullnodeService } from '../fullnode.service'; import { FullnodeService } from '../fullnode.service';
//import { NameDialogComponent } from '../namedialog/namedialog.component';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { v4 as uuidv4 } from 'uuid';
var QRCode = require('easyqrcodejs'); import {Owner} from '../owner.model';
var URLSafeBase64 = require('urlsafe-base64'); //import { v4 as uuidv4 } from 'uuid';
var Buffer = require('buffer/').Buffer; //var QRCode = require('easyqrcodejs');
//var URLSafeBase64 = require('urlsafe-base64');
//var Buffer = require('buffer/').Buffer;
@Component({ @Component({
@ -16,85 +20,52 @@ var Buffer = require('buffer/').Buffer;
}) })
export class ViewerComponent implements OnInit { export class ViewerComponent implements OnInit {
memos: string[] = []; public message: string = "Welcome to the inside!";
private FullnodeSub: Subscription = new Subscription();
private UserSub: Subscription = new Subscription(); private UserSub: Subscription = new Subscription();
private OwnerSub: Subscription = new Subscription();
constructor( constructor(
public fullnodeService: FullnodeService, public fullnodeService: FullnodeService,
private router: Router, private router: Router,
public userService: UserService public userService: UserService,
private dialog: MatDialog
){ ){
} }
ngOnInit(){ ngOnInit(){
this.fullnodeService.getMemos();
this.fullnodeService.getAddr(); this.userService.getName();
this.FullnodeSub = this.fullnodeService.getAddrUpdateListener(). this.UserSub = this.userService.getNameUpdateListener().
subscribe((addr: string) => { subscribe((name) => {
var localToken = localStorage.getItem('s4z_token'); if (name.length == 0) {
console.log(localToken); console.log(name);
if(localToken == null){ this.OwnerSub = this.userService.getZaddrUpdateListener().
var token = uuidv4(); subscribe((addr) => {
localStorage.setItem('s4z_token', token); //this.openDialog(addr);
console.log('Showing QR code for login');
console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token))));
var codeString = `zcash:${addr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token)))}`;
console.log(codeString);
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: codeString,
logo: "/assets/zcash.png",
logoWidth: 80,
logoHeight: 80
}); });
} else { } else {
this.userService.getUser(localToken); this.message = name;
this.userService.getZaddrUpdateListener().
subscribe((userAddr: string) => {
if (userAddr != '') {
console.log('Log in found!');
this.router.navigate(['/create']);
} else {
console.log('No login for token found');
console.log('Showing QR code for login');
//console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken))));
var codeString = `zcash:${addr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken!)))}`;
console.log(codeString);
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: codeString,
logo: "/assets/zcash.png",
logoWidth: 80,
logoHeight: 80
});
}
});
} }
}); });
//this.FullnodeSub=this.fullnodeService.getMemoUpdateListener().
//subscribe((memos: string[]) => {
//this.memos = memos;
//var addr = this.fullnodeService.getAddr();
//if(localStorage.getItem('s4z_token') == null){
//var token = uuidv4();
//localStorage.setItem('s4z_token', token);
//console.log('Showing QR code for login');
//console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token))));
//var codeString = `zcash:${addr}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(token)))}`;
//console.log(codeString);
//var qrcode = new QRCode(document.getElementById("qrcode"), {
//text: codeString,
//logo: "/assets/zcash.png",
//logoWidth: 80,
//logoHeight: 80
//});
//} else {
//console.log(localStorage.getItem('s4z_token'));
//}
//});
} }
ngOnDestroy(){ ngOnDestroy(){
this.FullnodeSub.unsubscribe();
this.UserSub.unsubscribe();
} }
//openDialog(address: string) {
//const dialogConfig = new MatDialogConfig();
//dialogConfig.autoFocus = true;
/*
*dialogConfig.data = {
* id: 1,
* title: 'Whee!'
*}
*/
//const dialogRef = this.dialog.open(NameDialogComponent, dialogConfig);
//dialogRef.afterClosed().subscribe(name => this.userService.addOwnerName(address, name) );
//}
} }