Initial project upload

This commit is contained in:
Mohamed Mathar Irfan
2026-07-28 17:57:02 +05:30
commit ed6610d5d8
23919 changed files with 3003316 additions and 0 deletions

101
frontend/node_modules/qrcode-generator/README.md generated vendored Normal file
View File

@@ -0,0 +1,101 @@
QR Code Generator
===
## Getting Started
1. Include qrcode.js in your html.
2. Prepare a place holder.
3. Generate QR and render it.
```html
<script type="text/javascript" src="qrcode.js"></script>
```
```html
<div id="placeHolder"></div>
```
```javascript
var typeNumber = 4;
var errorCorrectionLevel = 'L';
var qr = qrcode(typeNumber, errorCorrectionLevel);
qr.addData('Hi!');
qr.make();
document.getElementById('placeHolder').innerHTML = qr.createImgTag();
```
## API Documentation
### QRCodeFactory
#### qrcode(typeNumber, errorCorrectionLevel) => <code>QRCode</code>
Create a QRCode Object.
| Param | Type | Description |
| ---------------------| ------------------- | ---------------------------------------------- |
| typeNumber | <code>number</code> | Type number (1 ~ 40), or 0 for auto detection. |
| errorCorrectionLevel | <code>string</code> | Error correction level ('L', 'M', 'Q', 'H') |
#### qrcode.stringToBytes(s) : <code>number[]</code>
Encodes a string into an array of number(byte) using any charset.
This function is used by internal.
Overwrite this function to encode using a multibyte charset.
| Param | Type | Description |
| ------ | ------------------- | ---------------- |
| s | <code>string</code> | string to encode |
### QRCode
#### addData(data, mode) => <code>void</code>
Add a data to encode.
| Param | Type | Description |
| ------ | ------------------- | ---------------------------------------------------------- |
| data | <code>string</code> | string to encode |
| mode | <code>string</code> | Mode ('Numeric', 'Alphanumeric', 'Byte'(default), 'Kanji') |
#### make() => <code>void</code>
Make a QR Code.
#### getModuleCount() => <code>number</code>
The number of modules(cells) for each orientation.
_[Note] call make() before this function._
#### isDark(row, col) => <code>boolean</code>
The module at row and col is dark or not.
_[Note] call make() before this function._
| Param | Type | Description |
| ----- | ------------------- | ------------------- |
| row | <code>number</code> | 0 ~ moduleCount - 1 |
| col | <code>number</code> | 0 ~ moduleCount - 1 |
#### createDataURL(cellSize, margin) => <code>string</code>
#### createImgTag(cellSize, margin, alt) => <code>string</code>
#### createSvgTag(cellSize, margin) => <code>string</code>
#### createTableTag(cellSize, margin) => <code>string</code>
#### createASCII(cellSize, margin) => <code>string</code>
Helper functions for HTML.
_[Note] call make() before these functions._
| Param | Type | Description |
| -------- | ------------------- | --------------------- |
| cellSize | <code>number</code> | default: 2 |
| margin | <code>number</code> | default: cellSize * 4 |
| alt | <code>string</code> | (optional) |
#### createSvgTag(opts) => <code>string</code>
| Param | Type | Description |
| ------------- | -------------------- | --------------------- |
| opts | <code>object</code> | default: {} |
| opts.cellSize | <code>number</code> | default: 2 |
| opts.margin | <code>number</code> | default: cellSize * 4 |
| opts.scalable | <code>boolean</code> | default: false |
#### renderTo2dContext(context, cellSize) => <code>void</code>
--
This implementation is based on JIS X 0510:1999.
The word 'QR Code' is registered trademark of DENSO WAVE INCORPORATED
<br/>http://www.denso-wave.com/qrcode/faqpatent-e.html

30
frontend/node_modules/qrcode-generator/package.json generated vendored Normal file
View File

@@ -0,0 +1,30 @@
{
"name": "qrcode-generator",
"version": "1.5.2",
"description": "QR Code Generator implementation in JavaScript.",
"author": "Kazuhiko Arase",
"main": "qrcode.js",
"types": "qrcode.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/kazuhikoarase/qrcode-generator.git"
},
"bugs": {
"url": "https://github.com/kazuhikoarase/qrcode-generator/issues"
},
"keywords": [
"qr",
"qrcode",
"generator"
],
"license": "MIT",
"directories": {
"test": "test"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "^5.2.0"
}
}

57
frontend/node_modules/qrcode-generator/qrcode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,57 @@
//---------------------------------------------------------------------
//
// QR Code Generator for JavaScript - TypeScript Declaration File
//
// Copyright (c) 2016 Kazuhiko Arase
//
// URL: http://www.d-project.com/
//
// Licensed under the MIT license:
// http://www.opensource.org/licenses/mit-license.php
//
// The word 'QR Code' is registered trademark of
// DENSO WAVE INCORPORATED
// http://www.denso-wave.com/qrcode/faqpatent-e.html
//
//---------------------------------------------------------------------
type TypeNumber =
| 0 // Automatic type number
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
| 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
| 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30
| 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40
;
type ErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H';
type Mode = 'Numeric' | 'Alphanumeric' | 'Byte' /* Default */ | 'Kanji';
interface QRCodeFactory {
(typeNumber: TypeNumber, errorCorrectionLevel: ErrorCorrectionLevel) : QRCode;
stringToBytes(s: string) : number[];
stringToBytesFuncs : { [encoding : string] : (s: string) => number[] };
createStringToBytes(unicodeData: string, numChars: number) :
(s : string) => number[];
}
interface QRCode {
addData(data: string, mode?: Mode) : void;
make() : void;
getModuleCount() : number;
isDark(row: number, col: number) : boolean;
createImgTag(cellSize?: number, margin?: number) : string;
createSvgTag(cellSize?: number, margin?: number) : string;
createSvgTag(opts? : { cellSize?: number, margin?: number,
scalable?: boolean }) : string;
createDataURL(cellSize?: number, margin?: number) : string;
createTableTag(cellSize?: number, margin?: number) : string;
createASCII(cellSize?: number, margin?: number) : string;
renderTo2dContext(context: CanvasRenderingContext2D, cellSize?: number): void;
}
declare var qrcode : QRCodeFactory;
declare module 'qrcode-generator' {
export = qrcode;
}

2297
frontend/node_modules/qrcode-generator/qrcode.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

30
frontend/node_modules/qrcode-generator/qrcode_SJIS.js generated vendored Normal file

File diff suppressed because one or more lines are too long

26
frontend/node_modules/qrcode-generator/qrcode_UTF8.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
//---------------------------------------------------------------------
//
// QR Code Generator for JavaScript UTF8 Support (optional)
//
// Copyright (c) 2011 Kazuhiko Arase
//
// URL: http://www.d-project.com/
//
// Licensed under the MIT license:
// http://www.opensource.org/licenses/mit-license.php
//
// The word 'QR Code' is registered trademark of
// DENSO WAVE INCORPORATED
// http://www.denso-wave.com/qrcode/faqpatent-e.html
//
//---------------------------------------------------------------------
!function(qrcode) {
//---------------------------------------------------------------------
// overwrite qrcode.stringToBytes
//---------------------------------------------------------------------
qrcode.stringToBytes = qrcode.stringToBytesFuncs['UTF-8'];
}(qrcode);

118
frontend/node_modules/qrcode-generator/test/qrcode.js generated vendored Normal file
View File

@@ -0,0 +1,118 @@
var assert = require('assert');
var qrcode = require('../qrcode.js');
describe('QRCode', function(){
it('should exist', function(){
assert.ok(qrcode);
});
it('should be a callable function', function(){
assert.ok(qrcode instanceof Function);
});
it('should generate correct GIF image tag', function(){
var sourceText = 'http://www.example.com/ążśźęćńół';
var correctImgTag = '<img src="data:image/gif;base64,R0lGODdhSgBKAIAAAAAAAP///ywAAAAASgBKAAAC/4yPqcvtD6OctNqLs968+w+G4kiWZgKk6roa7ZEiccACco1TeE6r9997uXYsna0xmw0VLyXsyHBCpKijk9qEPh1UrrXYAy4Xu3FtLEmCr9pucP3NGofyN9peBZ7DE3W9Tqd15+fDlxZXiPVlltiGqDb3BpnHRzj4uNgnSHkjZCiZGbXpRVrlyQZINopE9Jc5CdtaeCj7asvIWEvimet4oqkYKDZiCSrMWtobmcW8esfki2exN4XY2cj7aZQtehxIGHwR+41dDg3tdogLCm7N+ZTOOom+irqZGk//DF/vqDiv7cEpTMW4CZxVYSC5gghpOTt46dg4PGxE5aNUkeItje3Drm3zh9DewIytPl7LuBCkHiImpbEjaAvlloTm+DVzJXNftZM89lAz5vLiOZs94YysqZNmtZ8/vQiFeJApmKUPu30qU6mhKola1V0t6g2ZxqcaAK4biraE2axW004LyeNs1loGHfIkGY3uVLV7Ge4rSayvu7WAHQIGGMvn4KqqdLGd2S5xKE2lit2dfIlswJVhU/5VSRmoyEbr9NbdKhqkq156l8GJCFQZ0aRWFcOWGtZ2aN2IN3LlvPv149Kg8UZqi5ElP+JvkyXH+ns4MFnR/+0F/vEw6YDQk//6Dj68+PHky5s/jz69+vULCgAAOw==" width="74" height="74"/>';
var qr = qrcode(-1, 'M');
qr.addData(unescape(encodeURI(sourceText)));
qr.make();
assert.strictEqual(qr.createImgTag(), correctImgTag);
});
it('should generate correct GIF image data', function(){
var sourceText = 'http://www.example.com/ążśźęćńół';
var correctImgData = 'R0lGODdhSgBKAIAAAAAAAP///ywAAAAASgBKAAAC/4yPqcvtD6OctNqLs968+w+G4kiWZgKk6roa7ZEiccACco1TeE6r9997uXYsna0xmw0VLyXsyHBCpKijk9qEPh1UrrXYAy4Xu3FtLEmCr9pucP3NGofyN9peBZ7DE3W9Tqd15+fDlxZXiPVlltiGqDb3BpnHRzj4uNgnSHkjZCiZGbXpRVrlyQZINopE9Jc5CdtaeCj7asvIWEvimet4oqkYKDZiCSrMWtobmcW8esfki2exN4XY2cj7aZQtehxIGHwR+41dDg3tdogLCm7N+ZTOOom+irqZGk//DF/vqDiv7cEpTMW4CZxVYSC5gghpOTt46dg4PGxE5aNUkeItje3Drm3zh9DewIytPl7LuBCkHiImpbEjaAvlloTm+DVzJXNftZM89lAz5vLiOZs94YysqZNmtZ8/vQiFeJApmKUPu30qU6mhKola1V0t6g2ZxqcaAK4biraE2axW004LyeNs1loGHfIkGY3uVLV7Ge4rSayvu7WAHQIGGMvn4KqqdLGd2S5xKE2lit2dfIlswJVhU/5VSRmoyEbr9NbdKhqkq156l8GJCFQZ0aRWFcOWGtZ2aN2IN3LlvPv149Kg8UZqi5ElP+JvkyXH+ns4MFnR/+0F/vEw6YDQk//6Dj68+PHky5s/jz69+vULCgAAOw==';
var qr = qrcode(-1, 'M');
qr.addData(unescape(encodeURI(sourceText)));
qr.make();
var data = Buffer.from(qr.createDataURL().replace('data:image/gif;base64,', ''), 'base64');
assert.strictEqual(data.toString('base64'), correctImgData);
});
it('should generate correct UTF8 text data', function(){
var sourceText = 'http://www.example.com/ążśźęćńół';
var correctTextData1 = [
'█████████████████████████████████',
'██ ▄▄▄▄▄ █ ▄█▀▄██ ▀▄ ▄██ ▄▄▄▄▄ ██',
'██ █ █ █▀ █▀▄█▀▀█▄▄ ▄█ █ █ ██',
'██ █▄▄▄█ ███ ▀ █▄▀▄▄▀ ▀█ █▄▄▄█ ██',
'██▄▄▄▄▄▄▄█ ▀▄█▄▀▄▀ █▄▀▄█▄▄▄▄▄▄▄██',
'██▄█ ▀▄▄▄█▄▄█▀█▀▀▄█▀▀▀█ ▀▀▄█▄ ██',
'██▀▀▄▀▄█▄█ ▄▄█▄ ▄█ ███ ▀█▀▄▄▀██',
'██ ▄▀█▄▀▄ ▄▀▄ █ ▄▀▀█▀██▀██▄▄▀▀██',
'██ █▀ ▄▄▀▀ ▀█ █▀▄ ▀█▄▀▄▄▄ ▄██',
'██▄██ ▄▄▄▄▄█ ▀▄▄ ▀▀▄▄▄█▄▄█▀ ███',
'██▄█▄██▄▄▄ █ █▄▄▀█▀███▄▀▄▄█▄ ████',
'███▄▄██▄▄▄ ▀▀▄█ █▀ █ ▄ ▄▄▄ ▀▀██',
'██ ▄▄▄▄▄ █ █ ▀█▄█ ▀ ▄ █▄█ ▄█ ▀██',
'██ █ █ █▀▄▄ ▄▀ ▀▄█ █ ▄▄ ▄ ██',
'██ █▄▄▄█ █▄█▄▀█ ▀ ▀ ██ █ █▀▄▀▄██',
'██▄▄▄▄▄▄▄█▄▄█▄█▄███▄▄▄▄████▄█▄███',
'▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀'].join('\n');
var correctTextData2 = [
' ▄▄▄▄▄ █ ▄█▀▄██ ▀▄ ▄██ ▄▄▄▄▄ ',
' █ █ █▀ █▀▄█▀▀█▄▄ ▄█ █ █ ',
' █▄▄▄█ ███ ▀ █▄▀▄▄▀ ▀█ █▄▄▄█ ',
'▄▄▄▄▄▄▄█ ▀▄█▄▀▄▀ █▄▀▄█▄▄▄▄▄▄▄',
'▄█ ▀▄▄▄█▄▄█▀█▀▀▄█▀▀▀█ ▀▀▄█▄ ',
'▀▀▄▀▄█▄█ ▄▄█▄ ▄█ ███ ▀█▀▄▄▀',
' ▄▀█▄▀▄ ▄▀▄ █ ▄▀▀█▀██▀██▄▄▀▀',
' █▀ ▄▄▀▀ ▀█ █▀▄ ▀█▄▀▄▄▄ ▄',
'▄██ ▄▄▄▄▄█ ▀▄▄ ▀▀▄▄▄█▄▄█▀ █',
'▄█▄██▄▄▄ █ █▄▄▀█▀███▄▀▄▄█▄ ██',
'█▄▄██▄▄▄ ▀▀▄█ █▀ █ ▄ ▄▄▄ ▀▀',
' ▄▄▄▄▄ █ █ ▀█▄█ ▀ ▄ █▄█ ▄█ ▀',
' █ █ █▀▄▄ ▄▀ ▀▄█ █ ▄▄ ▄ ',
' █▄▄▄█ █▄█▄▀█ ▀ ▀ ██ █ █▀▄▀▄',
' ▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀ ▀'].join('\n');
var correctTextData3 = [
'██████████████████████████████████████████████████████████████████',
'██████████████████████████████████████████████████████████████████',
'████ ██ ████ ████ ██ ████ ████',
'████ ██████████ ██ ████ ██████ ██ ██████ ██████████ ████',
'████ ██ ██ ████ ████ ████████ ██ ██ ██ ████',
'████ ██ ██ ██ ██ ████ ██████ ████ ██ ██ ████',
'████ ██ ██ ██████ ██ ██ ██ ██ ████ ██ ██ ████',
'████ ██████████ ██████ ████ ████ ██ ██████████ ████',
'████ ██ ██ ██ ██ ██ ██ ██ ██ ████',
'████████████████████ ██████ ██ ████ ██████████████████████',
'████ ██ ██ ██ ██████████ ██████████ ████ ██ ████',
'████████ ██████████████ ██ ████ ██ ██████ ████',
'████████ ██ ██ ██ ██ ██ ██████ ██████ ██████',
'████ ██ ████████ ████████ ████ ██████ ██ ████ ████',
'████ ████ ██ ██ ██ ██████████████████ ████████',
'████ ██ ████ ██ ██ ██ ██ ██ ██ ████ ████████ ████',
'████ ████ ████ ████ ████ ████ ██ ████',
'████ ██ ████ ██ ██ ██ ████ ██████ ██████',
'████ ████ ██ ██ ████ ██ ████ ██████',
'██████████ ████████████ ████ ██████████████ ██████',
'████ ██ ████ ██ ██ ████████████ ██ ██ ████████',
'████████████████████ ██ ██████ ██ ████████ ████████ ████████',
'██████ ████ ████ ██ ████ ██ ████████',
'████████████████████ ████ ██ ██ ██ ██████ ████',
'████ ██ ██ ████ ██ ██ ██ ██ ██ ██████',
'████ ██████████ ██ ██ ██████ ██ ██████ ████ ████',
'████ ██ ██ ████ ██ ██ ██ ██ ████',
'████ ██ ██ ██ ████ ██ ████ ██ ████ ██ ████',
'████ ██ ██ ██ ██ ████ ██ ██ ████ ██ ████ ██ ████',
'████ ██████████ ████████ ██ ████ ██ ██ ██ ██████',
'████ ██ ██ ██ ██████ ████████ ██ ██████',
'██████████████████████████████████████████████████████████████████',
'██████████████████████████████████████████████████████████████████',].join('\n');
var qr = qrcode(-1, 'M');
qr.addData(unescape(encodeURI(sourceText)));
qr.make();
assert.strictEqual(qr.createASCII(), correctTextData1, 'ASCII QRCode of size 1 is incorrect');
assert.strictEqual(qr.createASCII(1, 0), correctTextData2, 'ASCII QRCode of size 1 without margin is incorrect');
assert.strictEqual(qr.createASCII(2), correctTextData3, 'ASCII QRCode of size 2 is incorrect');
});
});