+
+# @hapi/hoek
+
+#### Utility methods for the hapi ecosystem.
+
+**hoek** is part of the **hapi** ecosystem and was designed to work seamlessly with the [hapi web framework](https://hapi.dev) and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out [hapi](https://hapi.dev) – they work even better together.
+
+This module is not intended to solve every problem for everyone, but rather as a central place to store hapi-specific methods. If you're looking for a general purpose utility module, check out [lodash](https://github.com/lodash/lodash).
+
+### Visit the [hapi.dev](https://hapi.dev) Developer Portal for tutorials, documentation, and support
+
+## Useful resources
+
+- [Documentation and API](https://hapi.dev/family/hoek/)
+- [Version status](https://hapi.dev/resources/status/#hoek) (builds, dependencies, node versions, licenses, eol)
+- [Changelog](https://hapi.dev/family/hoek/changelog/)
+- [Project policies](https://hapi.dev/policies/)
+- [Free and commercial support options](https://hapi.dev/support/)
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/applyToDefaults.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/applyToDefaults.js
new file mode 100755
index 000000000..9881247b9
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/applyToDefaults.js
@@ -0,0 +1,102 @@
+'use strict';
+
+const Assert = require('./assert');
+const Clone = require('./clone');
+const Merge = require('./merge');
+const Reach = require('./reach');
+
+
+const internals = {};
+
+
+module.exports = function (defaults, source, options = {}) {
+
+ Assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object');
+ Assert(!source || source === true || typeof source === 'object', 'Invalid source value: must be true, falsy or an object');
+ Assert(typeof options === 'object', 'Invalid options: must be an object');
+
+ if (!source) { // If no source, return null
+ return null;
+ }
+
+ if (options.shallow) {
+ return internals.applyToDefaultsWithShallow(defaults, source, options);
+ }
+
+ const copy = Clone(defaults);
+
+ if (source === true) { // If source is set to true, use defaults
+ return copy;
+ }
+
+ const nullOverride = options.nullOverride !== undefined ? options.nullOverride : false;
+ return Merge(copy, source, { nullOverride, mergeArrays: false });
+};
+
+
+internals.applyToDefaultsWithShallow = function (defaults, source, options) {
+
+ const keys = options.shallow;
+ Assert(Array.isArray(keys), 'Invalid keys');
+
+ const seen = new Map();
+ const merge = source === true ? null : new Set();
+
+ for (let key of keys) {
+ key = Array.isArray(key) ? key : key.split('.'); // Pre-split optimization
+
+ const ref = Reach(defaults, key);
+ if (ref &&
+ typeof ref === 'object') {
+
+ seen.set(ref, merge && Reach(source, key) || ref);
+ }
+ else if (merge) {
+ merge.add(key);
+ }
+ }
+
+ const copy = Clone(defaults, {}, seen);
+
+ if (!merge) {
+ return copy;
+ }
+
+ for (const key of merge) {
+ internals.reachCopy(copy, source, key);
+ }
+
+ const nullOverride = options.nullOverride !== undefined ? options.nullOverride : false;
+ return Merge(copy, source, { nullOverride, mergeArrays: false });
+};
+
+
+internals.reachCopy = function (dst, src, path) {
+
+ for (const segment of path) {
+ if (!(segment in src)) {
+ return;
+ }
+
+ const val = src[segment];
+
+ if (typeof val !== 'object' || val === null) {
+ return;
+ }
+
+ src = val;
+ }
+
+ const value = src;
+ let ref = dst;
+ for (let i = 0; i < path.length - 1; ++i) {
+ const segment = path[i];
+ if (typeof ref[segment] !== 'object') {
+ ref[segment] = {};
+ }
+
+ ref = ref[segment];
+ }
+
+ ref[path[path.length - 1]] = value;
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/assert.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/assert.js
new file mode 100755
index 000000000..6ed635a2f
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/assert.js
@@ -0,0 +1,22 @@
+'use strict';
+
+const AssertError = require('./error');
+
+
+const internals = {};
+
+
+module.exports = function (condition, ...args) {
+
+ if (condition) {
+ return;
+ }
+
+ if (args.length === 1 &&
+ args[0] instanceof Error) {
+
+ throw args[0];
+ }
+
+ throw new AssertError(args);
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/bench.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/bench.js
new file mode 100755
index 000000000..26ee19624
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/bench.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const internals = {};
+
+
+module.exports = internals.Bench = class {
+
+ constructor() {
+
+ this.ts = 0;
+ this.reset();
+ }
+
+ reset() {
+
+ this.ts = internals.Bench.now();
+ }
+
+ elapsed() {
+
+ return internals.Bench.now() - this.ts;
+ }
+
+ static now() {
+
+ const ts = process.hrtime();
+ return (ts[0] * 1e3) + (ts[1] / 1e6);
+ }
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/block.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/block.js
new file mode 100755
index 000000000..73fb9a537
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/block.js
@@ -0,0 +1,12 @@
+'use strict';
+
+const Ignore = require('./ignore');
+
+
+const internals = {};
+
+
+module.exports = function () {
+
+ return new Promise(Ignore);
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/clone.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/clone.js
new file mode 100755
index 000000000..e64defb86
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/clone.js
@@ -0,0 +1,176 @@
+'use strict';
+
+const Reach = require('./reach');
+const Types = require('./types');
+const Utils = require('./utils');
+
+
+const internals = {
+ needsProtoHack: new Set([Types.set, Types.map, Types.weakSet, Types.weakMap])
+};
+
+
+module.exports = internals.clone = function (obj, options = {}, _seen = null) {
+
+ if (typeof obj !== 'object' ||
+ obj === null) {
+
+ return obj;
+ }
+
+ let clone = internals.clone;
+ let seen = _seen;
+
+ if (options.shallow) {
+ if (options.shallow !== true) {
+ return internals.cloneWithShallow(obj, options);
+ }
+
+ clone = (value) => value;
+ }
+ else if (seen) {
+ const lookup = seen.get(obj);
+ if (lookup) {
+ return lookup;
+ }
+ }
+ else {
+ seen = new Map();
+ }
+
+ // Built-in object types
+
+ const baseProto = Types.getInternalProto(obj);
+ if (baseProto === Types.buffer) {
+ return Buffer && Buffer.from(obj); // $lab:coverage:ignore$
+ }
+
+ if (baseProto === Types.date) {
+ return new Date(obj.getTime());
+ }
+
+ if (baseProto === Types.regex) {
+ return new RegExp(obj);
+ }
+
+ // Generic objects
+
+ const newObj = internals.base(obj, baseProto, options);
+ if (newObj === obj) {
+ return obj;
+ }
+
+ if (seen) {
+ seen.set(obj, newObj); // Set seen, since obj could recurse
+ }
+
+ if (baseProto === Types.set) {
+ for (const value of obj) {
+ newObj.add(clone(value, options, seen));
+ }
+ }
+ else if (baseProto === Types.map) {
+ for (const [key, value] of obj) {
+ newObj.set(key, clone(value, options, seen));
+ }
+ }
+
+ const keys = Utils.keys(obj, options);
+ for (const key of keys) {
+ if (key === '__proto__') {
+ continue;
+ }
+
+ if (baseProto === Types.array &&
+ key === 'length') {
+
+ newObj.length = obj.length;
+ continue;
+ }
+
+ const descriptor = Object.getOwnPropertyDescriptor(obj, key);
+ if (descriptor) {
+ if (descriptor.get ||
+ descriptor.set) {
+
+ Object.defineProperty(newObj, key, descriptor);
+ }
+ else if (descriptor.enumerable) {
+ newObj[key] = clone(obj[key], options, seen);
+ }
+ else {
+ Object.defineProperty(newObj, key, { enumerable: false, writable: true, configurable: true, value: clone(obj[key], options, seen) });
+ }
+ }
+ else {
+ Object.defineProperty(newObj, key, {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: clone(obj[key], options, seen)
+ });
+ }
+ }
+
+ return newObj;
+};
+
+
+internals.cloneWithShallow = function (source, options) {
+
+ const keys = options.shallow;
+ options = Object.assign({}, options);
+ options.shallow = false;
+
+ const seen = new Map();
+
+ for (const key of keys) {
+ const ref = Reach(source, key);
+ if (typeof ref === 'object' ||
+ typeof ref === 'function') {
+
+ seen.set(ref, ref);
+ }
+ }
+
+ return internals.clone(source, options, seen);
+};
+
+
+internals.base = function (obj, baseProto, options) {
+
+ if (options.prototype === false) { // Defaults to true
+ if (internals.needsProtoHack.has(baseProto)) {
+ return new baseProto.constructor();
+ }
+
+ return baseProto === Types.array ? [] : {};
+ }
+
+ const proto = Object.getPrototypeOf(obj);
+ if (proto &&
+ proto.isImmutable) {
+
+ return obj;
+ }
+
+ if (baseProto === Types.array) {
+ const newObj = [];
+ if (proto !== baseProto) {
+ Object.setPrototypeOf(newObj, proto);
+ }
+
+ return newObj;
+ }
+
+ if (internals.needsProtoHack.has(baseProto)) {
+ const newObj = new proto.constructor();
+ if (proto !== baseProto) {
+ Object.setPrototypeOf(newObj, proto);
+ }
+
+ return newObj;
+ }
+
+ return Object.create(proto);
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/contain.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/contain.js
new file mode 100755
index 000000000..162ea3e83
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/contain.js
@@ -0,0 +1,307 @@
+'use strict';
+
+const Assert = require('./assert');
+const DeepEqual = require('./deepEqual');
+const EscapeRegex = require('./escapeRegex');
+const Utils = require('./utils');
+
+
+const internals = {};
+
+
+module.exports = function (ref, values, options = {}) { // options: { deep, once, only, part, symbols }
+
+ /*
+ string -> string(s)
+ array -> item(s)
+ object -> key(s)
+ object -> object (key:value)
+ */
+
+ if (typeof values !== 'object') {
+ values = [values];
+ }
+
+ Assert(!Array.isArray(values) || values.length, 'Values array cannot be empty');
+
+ // String
+
+ if (typeof ref === 'string') {
+ return internals.string(ref, values, options);
+ }
+
+ // Array
+
+ if (Array.isArray(ref)) {
+ return internals.array(ref, values, options);
+ }
+
+ // Object
+
+ Assert(typeof ref === 'object', 'Reference must be string or an object');
+ return internals.object(ref, values, options);
+};
+
+
+internals.array = function (ref, values, options) {
+
+ if (!Array.isArray(values)) {
+ values = [values];
+ }
+
+ if (!ref.length) {
+ return false;
+ }
+
+ if (options.only &&
+ options.once &&
+ ref.length !== values.length) {
+
+ return false;
+ }
+
+ let compare;
+
+ // Map values
+
+ const map = new Map();
+ for (const value of values) {
+ if (!options.deep ||
+ !value ||
+ typeof value !== 'object') {
+
+ const existing = map.get(value);
+ if (existing) {
+ ++existing.allowed;
+ }
+ else {
+ map.set(value, { allowed: 1, hits: 0 });
+ }
+ }
+ else {
+ compare = compare || internals.compare(options);
+
+ let found = false;
+ for (const [key, existing] of map.entries()) {
+ if (compare(key, value)) {
+ ++existing.allowed;
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ map.set(value, { allowed: 1, hits: 0 });
+ }
+ }
+ }
+
+ // Lookup values
+
+ let hits = 0;
+ for (const item of ref) {
+ let match;
+ if (!options.deep ||
+ !item ||
+ typeof item !== 'object') {
+
+ match = map.get(item);
+ }
+ else {
+ compare = compare || internals.compare(options);
+
+ for (const [key, existing] of map.entries()) {
+ if (compare(key, item)) {
+ match = existing;
+ break;
+ }
+ }
+ }
+
+ if (match) {
+ ++match.hits;
+ ++hits;
+
+ if (options.once &&
+ match.hits > match.allowed) {
+
+ return false;
+ }
+ }
+ }
+
+ // Validate results
+
+ if (options.only &&
+ hits !== ref.length) {
+
+ return false;
+ }
+
+ for (const match of map.values()) {
+ if (match.hits === match.allowed) {
+ continue;
+ }
+
+ if (match.hits < match.allowed &&
+ !options.part) {
+
+ return false;
+ }
+ }
+
+ return !!hits;
+};
+
+
+internals.object = function (ref, values, options) {
+
+ Assert(options.once === undefined, 'Cannot use option once with object');
+
+ const keys = Utils.keys(ref, options);
+ if (!keys.length) {
+ return false;
+ }
+
+ // Keys list
+
+ if (Array.isArray(values)) {
+ return internals.array(keys, values, options);
+ }
+
+ // Key value pairs
+
+ const symbols = Object.getOwnPropertySymbols(values).filter((sym) => values.propertyIsEnumerable(sym));
+ const targets = [...Object.keys(values), ...symbols];
+
+ const compare = internals.compare(options);
+ const set = new Set(targets);
+
+ for (const key of keys) {
+ if (!set.has(key)) {
+ if (options.only) {
+ return false;
+ }
+
+ continue;
+ }
+
+ if (!compare(values[key], ref[key])) {
+ return false;
+ }
+
+ set.delete(key);
+ }
+
+ if (set.size) {
+ return options.part ? set.size < targets.length : false;
+ }
+
+ return true;
+};
+
+
+internals.string = function (ref, values, options) {
+
+ // Empty string
+
+ if (ref === '') {
+ return values.length === 1 && values[0] === '' || // '' contains ''
+ !options.once && !values.some((v) => v !== ''); // '' contains multiple '' if !once
+ }
+
+ // Map values
+
+ const map = new Map();
+ const patterns = [];
+
+ for (const value of values) {
+ Assert(typeof value === 'string', 'Cannot compare string reference to non-string value');
+
+ if (value) {
+ const existing = map.get(value);
+ if (existing) {
+ ++existing.allowed;
+ }
+ else {
+ map.set(value, { allowed: 1, hits: 0 });
+ patterns.push(EscapeRegex(value));
+ }
+ }
+ else if (options.once ||
+ options.only) {
+
+ return false;
+ }
+ }
+
+ if (!patterns.length) { // Non-empty string contains unlimited empty string
+ return true;
+ }
+
+ // Match patterns
+
+ const regex = new RegExp(`(${patterns.join('|')})`, 'g');
+ const leftovers = ref.replace(regex, ($0, $1) => {
+
+ ++map.get($1).hits;
+ return ''; // Remove from string
+ });
+
+ // Validate results
+
+ if (options.only &&
+ leftovers) {
+
+ return false;
+ }
+
+ let any = false;
+ for (const match of map.values()) {
+ if (match.hits) {
+ any = true;
+ }
+
+ if (match.hits === match.allowed) {
+ continue;
+ }
+
+ if (match.hits < match.allowed &&
+ !options.part) {
+
+ return false;
+ }
+
+ // match.hits > match.allowed
+
+ if (options.once) {
+ return false;
+ }
+ }
+
+ return !!any;
+};
+
+
+internals.compare = function (options) {
+
+ if (!options.deep) {
+ return internals.shallow;
+ }
+
+ const hasOnly = options.only !== undefined;
+ const hasPart = options.part !== undefined;
+
+ const flags = {
+ prototype: hasOnly ? options.only : hasPart ? !options.part : false,
+ part: hasOnly ? !options.only : hasPart ? options.part : false
+ };
+
+ return (a, b) => DeepEqual(a, b, flags);
+};
+
+
+internals.shallow = function (a, b) {
+
+ return a === b;
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/deepEqual.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/deepEqual.js
new file mode 100755
index 000000000..a82647bea
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/deepEqual.js
@@ -0,0 +1,317 @@
+'use strict';
+
+const Types = require('./types');
+
+
+const internals = {
+ mismatched: null
+};
+
+
+module.exports = function (obj, ref, options) {
+
+ options = Object.assign({ prototype: true }, options);
+
+ return !!internals.isDeepEqual(obj, ref, options, []);
+};
+
+
+internals.isDeepEqual = function (obj, ref, options, seen) {
+
+ if (obj === ref) { // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql
+ return obj !== 0 || 1 / obj === 1 / ref;
+ }
+
+ const type = typeof obj;
+
+ if (type !== typeof ref) {
+ return false;
+ }
+
+ if (obj === null ||
+ ref === null) {
+
+ return false;
+ }
+
+ if (type === 'function') {
+ if (!options.deepFunction ||
+ obj.toString() !== ref.toString()) {
+
+ return false;
+ }
+
+ // Continue as object
+ }
+ else if (type !== 'object') {
+ return obj !== obj && ref !== ref; // NaN
+ }
+
+ const instanceType = internals.getSharedType(obj, ref, !!options.prototype);
+ switch (instanceType) {
+ case Types.buffer:
+ return Buffer && Buffer.prototype.equals.call(obj, ref); // $lab:coverage:ignore$
+ case Types.promise:
+ return obj === ref;
+ case Types.regex:
+ return obj.toString() === ref.toString();
+ case internals.mismatched:
+ return false;
+ }
+
+ for (let i = seen.length - 1; i >= 0; --i) {
+ if (seen[i].isSame(obj, ref)) {
+ return true; // If previous comparison failed, it would have stopped execution
+ }
+ }
+
+ seen.push(new internals.SeenEntry(obj, ref));
+
+ try {
+ return !!internals.isDeepEqualObj(instanceType, obj, ref, options, seen);
+ }
+ finally {
+ seen.pop();
+ }
+};
+
+
+internals.getSharedType = function (obj, ref, checkPrototype) {
+
+ if (checkPrototype) {
+ if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) {
+ return internals.mismatched;
+ }
+
+ return Types.getInternalProto(obj);
+ }
+
+ const type = Types.getInternalProto(obj);
+ if (type !== Types.getInternalProto(ref)) {
+ return internals.mismatched;
+ }
+
+ return type;
+};
+
+
+internals.valueOf = function (obj) {
+
+ const objValueOf = obj.valueOf;
+ if (objValueOf === undefined) {
+ return obj;
+ }
+
+ try {
+ return objValueOf.call(obj);
+ }
+ catch (err) {
+ return err;
+ }
+};
+
+
+internals.hasOwnEnumerableProperty = function (obj, key) {
+
+ return Object.prototype.propertyIsEnumerable.call(obj, key);
+};
+
+
+internals.isSetSimpleEqual = function (obj, ref) {
+
+ for (const entry of Set.prototype.values.call(obj)) {
+ if (!Set.prototype.has.call(ref, entry)) {
+ return false;
+ }
+ }
+
+ return true;
+};
+
+
+internals.isDeepEqualObj = function (instanceType, obj, ref, options, seen) {
+
+ const { isDeepEqual, valueOf, hasOwnEnumerableProperty } = internals;
+ const { keys, getOwnPropertySymbols } = Object;
+
+ if (instanceType === Types.array) {
+ if (options.part) {
+
+ // Check if any index match any other index
+
+ for (const objValue of obj) {
+ for (const refValue of ref) {
+ if (isDeepEqual(objValue, refValue, options, seen)) {
+ return true;
+ }
+ }
+ }
+ }
+ else {
+ if (obj.length !== ref.length) {
+ return false;
+ }
+
+ for (let i = 0; i < obj.length; ++i) {
+ if (!isDeepEqual(obj[i], ref[i], options, seen)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ }
+ else if (instanceType === Types.set) {
+ if (obj.size !== ref.size) {
+ return false;
+ }
+
+ if (!internals.isSetSimpleEqual(obj, ref)) {
+
+ // Check for deep equality
+
+ const ref2 = new Set(Set.prototype.values.call(ref));
+ for (const objEntry of Set.prototype.values.call(obj)) {
+ if (ref2.delete(objEntry)) {
+ continue;
+ }
+
+ let found = false;
+ for (const refEntry of ref2) {
+ if (isDeepEqual(objEntry, refEntry, options, seen)) {
+ ref2.delete(refEntry);
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ return false;
+ }
+ }
+ }
+ }
+ else if (instanceType === Types.map) {
+ if (obj.size !== ref.size) {
+ return false;
+ }
+
+ for (const [key, value] of Map.prototype.entries.call(obj)) {
+ if (value === undefined && !Map.prototype.has.call(ref, key)) {
+ return false;
+ }
+
+ if (!isDeepEqual(value, Map.prototype.get.call(ref, key), options, seen)) {
+ return false;
+ }
+ }
+ }
+ else if (instanceType === Types.error) {
+
+ // Always check name and message
+
+ if (obj.name !== ref.name ||
+ obj.message !== ref.message) {
+
+ return false;
+ }
+ }
+
+ // Check .valueOf()
+
+ const valueOfObj = valueOf(obj);
+ const valueOfRef = valueOf(ref);
+ if ((obj !== valueOfObj || ref !== valueOfRef) &&
+ !isDeepEqual(valueOfObj, valueOfRef, options, seen)) {
+
+ return false;
+ }
+
+ // Check properties
+
+ const objKeys = keys(obj);
+ if (!options.part &&
+ objKeys.length !== keys(ref).length &&
+ !options.skip) {
+
+ return false;
+ }
+
+ let skipped = 0;
+ for (const key of objKeys) {
+ if (options.skip &&
+ options.skip.includes(key)) {
+
+ if (ref[key] === undefined) {
+ ++skipped;
+ }
+
+ continue;
+ }
+
+ if (!hasOwnEnumerableProperty(ref, key)) {
+ return false;
+ }
+
+ if (!isDeepEqual(obj[key], ref[key], options, seen)) {
+ return false;
+ }
+ }
+
+ if (!options.part &&
+ objKeys.length - skipped !== keys(ref).length) {
+
+ return false;
+ }
+
+ // Check symbols
+
+ if (options.symbols !== false) { // Defaults to true
+ const objSymbols = getOwnPropertySymbols(obj);
+ const refSymbols = new Set(getOwnPropertySymbols(ref));
+
+ for (const key of objSymbols) {
+ if (!options.skip ||
+ !options.skip.includes(key)) {
+
+ if (hasOwnEnumerableProperty(obj, key)) {
+ if (!hasOwnEnumerableProperty(ref, key)) {
+ return false;
+ }
+
+ if (!isDeepEqual(obj[key], ref[key], options, seen)) {
+ return false;
+ }
+ }
+ else if (hasOwnEnumerableProperty(ref, key)) {
+ return false;
+ }
+ }
+
+ refSymbols.delete(key);
+ }
+
+ for (const key of refSymbols) {
+ if (hasOwnEnumerableProperty(ref, key)) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+};
+
+
+internals.SeenEntry = class {
+
+ constructor(obj, ref) {
+
+ this.obj = obj;
+ this.ref = ref;
+ }
+
+ isSame(obj, ref) {
+
+ return this.obj === obj && this.ref === ref;
+ }
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/error.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/error.js
new file mode 100755
index 000000000..9fc4f5df4
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/error.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const Stringify = require('./stringify');
+
+
+const internals = {};
+
+
+module.exports = class extends Error {
+
+ constructor(args) {
+
+ const msgs = args
+ .filter((arg) => arg !== '')
+ .map((arg) => {
+
+ return typeof arg === 'string' ? arg : arg instanceof Error ? arg.message : Stringify(arg);
+ });
+
+ super(msgs.join(' ') || 'Unknown error');
+
+ if (typeof Error.captureStackTrace === 'function') { // $lab:coverage:ignore$
+ Error.captureStackTrace(this, exports.assert);
+ }
+ }
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeHeaderAttribute.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeHeaderAttribute.js
new file mode 100755
index 000000000..a0a4deea4
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeHeaderAttribute.js
@@ -0,0 +1,16 @@
+'use strict';
+
+const Assert = require('./assert');
+
+
+const internals = {};
+
+
+module.exports = function (attribute) {
+
+ // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, "
+
+ Assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')');
+
+ return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeHtml.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeHtml.js
new file mode 100755
index 000000000..c2dd44360
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeHtml.js
@@ -0,0 +1,87 @@
+'use strict';
+
+const internals = {};
+
+
+module.exports = function (input) {
+
+ if (!input) {
+ return '';
+ }
+
+ let escaped = '';
+
+ for (let i = 0; i < input.length; ++i) {
+
+ const charCode = input.charCodeAt(i);
+
+ if (internals.isSafe(charCode)) {
+ escaped += input[i];
+ }
+ else {
+ escaped += internals.escapeHtmlChar(charCode);
+ }
+ }
+
+ return escaped;
+};
+
+
+internals.escapeHtmlChar = function (charCode) {
+
+ const namedEscape = internals.namedHtml.get(charCode);
+ if (namedEscape) {
+ return namedEscape;
+ }
+
+ if (charCode >= 256) {
+ return '' + charCode + ';';
+ }
+
+ const hexValue = charCode.toString(16).padStart(2, '0');
+ return `${hexValue};`;
+};
+
+
+internals.isSafe = function (charCode) {
+
+ return internals.safeCharCodes.has(charCode);
+};
+
+
+internals.namedHtml = new Map([
+ [38, '&'],
+ [60, '<'],
+ [62, '>'],
+ [34, '"'],
+ [160, ' '],
+ [162, '¢'],
+ [163, '£'],
+ [164, '¤'],
+ [169, '©'],
+ [174, '®']
+]);
+
+
+internals.safeCharCodes = (function () {
+
+ const safe = new Set();
+
+ for (let i = 32; i < 123; ++i) {
+
+ if ((i >= 97) || // a-z
+ (i >= 65 && i <= 90) || // A-Z
+ (i >= 48 && i <= 57) || // 0-9
+ i === 32 || // space
+ i === 46 || // .
+ i === 44 || // ,
+ i === 45 || // -
+ i === 58 || // :
+ i === 95) { // _
+
+ safe.add(i);
+ }
+ }
+
+ return safe;
+}());
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeJson.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeJson.js
new file mode 100755
index 000000000..243edfb91
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeJson.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const internals = {};
+
+
+module.exports = function (input) {
+
+ if (!input) {
+ return '';
+ }
+
+ return input.replace(/[<>&\u2028\u2029]/g, internals.escape);
+};
+
+
+internals.escape = function (char) {
+
+ return internals.replacements.get(char);
+};
+
+
+internals.replacements = new Map([
+ ['<', '\\u003c'],
+ ['>', '\\u003e'],
+ ['&', '\\u0026'],
+ ['\u2028', '\\u2028'],
+ ['\u2029', '\\u2029']
+]);
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeRegex.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeRegex.js
new file mode 100755
index 000000000..3272497ef
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/escapeRegex.js
@@ -0,0 +1,11 @@
+'use strict';
+
+const internals = {};
+
+
+module.exports = function (string) {
+
+ // Escape ^$.*+-?=!:|\/()[]{},
+
+ return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/flatten.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/flatten.js
new file mode 100755
index 000000000..a5ea622a6
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/flatten.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const internals = {};
+
+
+module.exports = internals.flatten = function (array, target) {
+
+ const result = target || [];
+
+ for (const entry of array) {
+ if (Array.isArray(entry)) {
+ internals.flatten(entry, result);
+ }
+ else {
+ result.push(entry);
+ }
+ }
+
+ return result;
+};
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/ignore.js b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/ignore.js
new file mode 100755
index 000000000..21ad14439
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/ignore.js
@@ -0,0 +1,6 @@
+'use strict';
+
+const internals = {};
+
+
+module.exports = function () { };
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/index.d.ts b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/index.d.ts
new file mode 100755
index 000000000..e9bcdc286
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/hoek/lib/index.d.ts
@@ -0,0 +1,471 @@
+///
+
+# @hapi/topo
+
+#### Topological sorting with grouping support.
+
+**topo** is part of the **hapi** ecosystem and was designed to work seamlessly with the [hapi web framework](https://hapi.dev) and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out [hapi](https://hapi.dev) – they work even better together.
+
+### Visit the [hapi.dev](https://hapi.dev) Developer Portal for tutorials, documentation, and support
+
+## Useful resources
+
+- [Documentation and API](https://hapi.dev/family/topo/)
+- [Version status](https://hapi.dev/resources/status/#topo) (builds, dependencies, node versions, licenses, eol)
+- [Changelog](https://hapi.dev/family/topo/changelog/)
+- [Project policies](https://hapi.dev/policies/)
+- [Free and commercial support options](https://hapi.dev/support/)
diff --git a/hackathon/DIKSHA-Novathon/node_modules/@hapi/topo/lib/index.d.ts b/hackathon/DIKSHA-Novathon/node_modules/@hapi/topo/lib/index.d.ts
new file mode 100755
index 000000000..e3367befe
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/@hapi/topo/lib/index.d.ts
@@ -0,0 +1,60 @@
+export class Sorter API-first authentication, authorization, and fraud prevention + | We’re bound by one common purpose: to give you the financial tools, resources and information you ne... + | Hi, we're Descope! We are building something in the authentication space for app developers and... + |
At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rate... + | At Famety, you can grow your social media following quickly, safely, and easily with just a few clic... + | Buy Instagram Likes + |
| 💜 Become a sponsor + | 💜 Become a sponsor + | 💜 Become a sponsor + |
Promise based HTTP client for the browser and node.js
+ ++ Website • + Documentation +
+ +
+
+[](https://travis-ci.org/petkaantonov/bluebird)
+[](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
+
+**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
+
+# Introduction
+
+Bluebird is a fully featured promise library with focus on innovative features and performance
+
+See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here.
+
+For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x).
+
+# Questions and issues
+
+The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
+
+
+
+## Thanks
+
+Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2013-2017 Petka Antonov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/hackathon/DIKSHA-Novathon/node_modules/bluebird/changelog.md b/hackathon/DIKSHA-Novathon/node_modules/bluebird/changelog.md
new file mode 100644
index 000000000..73b2eb6c7
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/bluebird/changelog.md
@@ -0,0 +1 @@
+[http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html)
diff --git a/hackathon/DIKSHA-Novathon/node_modules/bluebird/js/browser/bluebird.core.js b/hackathon/DIKSHA-Novathon/node_modules/bluebird/js/browser/bluebird.core.js
new file mode 100644
index 000000000..c94f3c228
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/bluebird/js/browser/bluebird.core.js
@@ -0,0 +1,3777 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2017 Petka Antonov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+/**
+ * bluebird build version 3.5.0
+ * Features enabled: core
+ * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o
+
+> BigNum in pure javascript
+
+[](http://travis-ci.org/indutny/bn.js)
+
+## Install
+`npm install --save bn.js`
+
+## Usage
+
+```js
+const BN = require('bn.js');
+
+var a = new BN('dead', 16);
+var b = new BN('101010', 2);
+
+var res = a.add(b);
+console.log(res.toString(10)); // 57047
+```
+
+**Note**: decimals are not supported in this library.
+
+## Notation
+
+### Prefixes
+
+There are several prefixes to instructions that affect the way the work. Here
+is the list of them in the order of appearance in the function name:
+
+* `i` - perform operation in-place, storing the result in the host object (on
+ which the method was invoked). Might be used to avoid number allocation costs
+* `u` - unsigned, ignore the sign of operands when performing operation, or
+ always return positive value. Second case applies to reduction operations
+ like `mod()`. In such cases if the result will be negative - modulo will be
+ added to the result to make it positive
+
+### Postfixes
+
+The only available postfix at the moment is:
+
+* `n` - which means that the argument of the function must be a plain JavaScript
+ Number. Decimals are not supported.
+
+### Examples
+
+* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a`
+* `a.umod(b)` - reduce `a` modulo `b`, returning positive value
+* `a.iushln(13)` - shift bits of `a` left by 13
+
+## Instructions
+
+Prefixes/postfixes are put in parens at the of the line. `endian` - could be
+either `le` (little-endian) or `be` (big-endian).
+
+### Utilities
+
+* `a.clone()` - clone number
+* `a.toString(base, length)` - convert to base-string and pad with zeroes
+* `a.toNumber()` - convert to Javascript Number (limited to 53 bits)
+* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`)
+* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero
+ pad to length, throwing if already exceeding
+* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`,
+ which must behave like an `Array`
+* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available). For
+ compatibility with browserify and similar tools, use this instead:
+ `a.toArrayLike(Buffer, endian, length)`
+* `a.bitLength()` - get number of bits occupied
+* `a.zeroBits()` - return number of less-significant consequent zero bits
+ (example: `1010000` has 4 zero bits)
+* `a.byteLength()` - return number of bytes occupied
+* `a.isNeg()` - true if the number is negative
+* `a.isEven()` - no comments
+* `a.isOdd()` - no comments
+* `a.isZero()` - no comments
+* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b)
+ depending on the comparison result (`ucmp`, `cmpn`)
+* `a.lt(b)` - `a` less than `b` (`n`)
+* `a.lte(b)` - `a` less than or equals `b` (`n`)
+* `a.gt(b)` - `a` greater than `b` (`n`)
+* `a.gte(b)` - `a` greater than or equals `b` (`n`)
+* `a.eq(b)` - `a` equals `b` (`n`)
+* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width
+* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width
+* `BN.isBN(object)` - returns true if the supplied `object` is a BN.js instance
+
+### Arithmetics
+
+* `a.neg()` - negate sign (`i`)
+* `a.abs()` - absolute value (`i`)
+* `a.add(b)` - addition (`i`, `n`, `in`)
+* `a.sub(b)` - subtraction (`i`, `n`, `in`)
+* `a.mul(b)` - multiply (`i`, `n`, `in`)
+* `a.sqr()` - square (`i`)
+* `a.pow(b)` - raise `a` to the power of `b`
+* `a.div(b)` - divide (`divn`, `idivn`)
+* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`)
+* `a.divRound(b)` - rounded division
+
+### Bit operations
+
+* `a.or(b)` - or (`i`, `u`, `iu`)
+* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced
+ with `andn` in future)
+* `a.xor(b)` - xor (`i`, `u`, `iu`)
+* `a.setn(b)` - set specified bit to `1`
+* `a.shln(b)` - shift left (`i`, `u`, `iu`)
+* `a.shrn(b)` - shift right (`i`, `u`, `iu`)
+* `a.testn(b)` - test if specified bit is set
+* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`)
+* `a.bincn(b)` - add `1 << b` to the number
+* `a.notn(w)` - not (for the width specified by `w`) (`i`)
+
+### Reduction
+
+* `a.gcd(b)` - GCD
+* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`)
+* `a.invm(b)` - inverse `a` modulo `b`
+
+## Fast reduction
+
+When doing lots of reductions using the same modulo, it might be beneficial to
+use some tricks: like [Montgomery multiplication][0], or using special algorithm
+for [Mersenne Prime][1].
+
+### Reduction context
+
+To enable this tricks one should create a reduction context:
+
+```js
+var red = BN.red(num);
+```
+where `num` is just a BN instance.
+
+Or:
+
+```js
+var red = BN.red(primeName);
+```
+
+Where `primeName` is either of these [Mersenne Primes][1]:
+
+* `'k256'`
+* `'p224'`
+* `'p192'`
+* `'p25519'`
+
+Or:
+
+```js
+var red = BN.mont(num);
+```
+
+To reduce numbers with [Montgomery trick][0]. `.mont()` is generally faster than
+`.red(num)`, but slower than `BN.red(primeName)`.
+
+### Converting numbers
+
+Before performing anything in reduction context - numbers should be converted
+to it. Usually, this means that one should:
+
+* Convert inputs to reducted ones
+* Operate on them in reduction context
+* Convert outputs back from the reduction context
+
+Here is how one may convert numbers to `red`:
+
+```js
+var redA = a.toRed(red);
+```
+Where `red` is a reduction context created using instructions above
+
+Here is how to convert them back:
+
+```js
+var a = redA.fromRed();
+```
+
+### Red instructions
+
+Most of the instructions from the very start of this readme have their
+counterparts in red context:
+
+* `a.redAdd(b)`, `a.redIAdd(b)`
+* `a.redSub(b)`, `a.redISub(b)`
+* `a.redShl(num)`
+* `a.redMul(b)`, `a.redIMul(b)`
+* `a.redSqr()`, `a.redISqr()`
+* `a.redSqrt()` - square root modulo reduction context's prime
+* `a.redInvm()` - modular inverse of the number
+* `a.redNeg()`
+* `a.redPow(b)` - modular exponentiation
+
+## LICENSE
+
+This software is licensed under the MIT License.
+
+[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication
+[1]: https://en.wikipedia.org/wiki/Mersenne_prime
diff --git a/hackathon/DIKSHA-Novathon/node_modules/bn.js/lib/bn.js b/hackathon/DIKSHA-Novathon/node_modules/bn.js/lib/bn.js
new file mode 100644
index 000000000..ee7864663
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/bn.js/lib/bn.js
@@ -0,0 +1,3446 @@
+(function (module, exports) {
+ 'use strict';
+
+ // Utils
+ function assert (val, msg) {
+ if (!val) throw new Error(msg || 'Assertion failed');
+ }
+
+ // Could use `inherits` module, but don't want to move from single file
+ // architecture yet.
+ function inherits (ctor, superCtor) {
+ ctor.super_ = superCtor;
+ var TempCtor = function () {};
+ TempCtor.prototype = superCtor.prototype;
+ ctor.prototype = new TempCtor();
+ ctor.prototype.constructor = ctor;
+ }
+
+ // BN
+
+ function BN (number, base, endian) {
+ if (BN.isBN(number)) {
+ return number;
+ }
+
+ this.negative = 0;
+ this.words = null;
+ this.length = 0;
+
+ // Reduction context
+ this.red = null;
+
+ if (number !== null) {
+ if (base === 'le' || base === 'be') {
+ endian = base;
+ base = 10;
+ }
+
+ this._init(number || 0, base || 10, endian || 'be');
+ }
+ }
+ if (typeof module === 'object') {
+ module.exports = BN;
+ } else {
+ exports.BN = BN;
+ }
+
+ BN.BN = BN;
+ BN.wordSize = 26;
+
+ var Buffer;
+ try {
+ if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {
+ Buffer = window.Buffer;
+ } else {
+ Buffer = require('buffer').Buffer;
+ }
+ } catch (e) {
+ }
+
+ BN.isBN = function isBN (num) {
+ if (num instanceof BN) {
+ return true;
+ }
+
+ return num !== null && typeof num === 'object' &&
+ num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
+ };
+
+ BN.max = function max (left, right) {
+ if (left.cmp(right) > 0) return left;
+ return right;
+ };
+
+ BN.min = function min (left, right) {
+ if (left.cmp(right) < 0) return left;
+ return right;
+ };
+
+ BN.prototype._init = function init (number, base, endian) {
+ if (typeof number === 'number') {
+ return this._initNumber(number, base, endian);
+ }
+
+ if (typeof number === 'object') {
+ return this._initArray(number, base, endian);
+ }
+
+ if (base === 'hex') {
+ base = 16;
+ }
+ assert(base === (base | 0) && base >= 2 && base <= 36);
+
+ number = number.toString().replace(/\s+/g, '');
+ var start = 0;
+ if (number[0] === '-') {
+ start++;
+ this.negative = 1;
+ }
+
+ if (start < number.length) {
+ if (base === 16) {
+ this._parseHex(number, start, endian);
+ } else {
+ this._parseBase(number, base, start);
+ if (endian === 'le') {
+ this._initArray(this.toArray(), base, endian);
+ }
+ }
+ }
+ };
+
+ BN.prototype._initNumber = function _initNumber (number, base, endian) {
+ if (number < 0) {
+ this.negative = 1;
+ number = -number;
+ }
+ if (number < 0x4000000) {
+ this.words = [ number & 0x3ffffff ];
+ this.length = 1;
+ } else if (number < 0x10000000000000) {
+ this.words = [
+ number & 0x3ffffff,
+ (number / 0x4000000) & 0x3ffffff
+ ];
+ this.length = 2;
+ } else {
+ assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
+ this.words = [
+ number & 0x3ffffff,
+ (number / 0x4000000) & 0x3ffffff,
+ 1
+ ];
+ this.length = 3;
+ }
+
+ if (endian !== 'le') return;
+
+ // Reverse the bytes
+ this._initArray(this.toArray(), base, endian);
+ };
+
+ BN.prototype._initArray = function _initArray (number, base, endian) {
+ // Perhaps a Uint8Array
+ assert(typeof number.length === 'number');
+ if (number.length <= 0) {
+ this.words = [ 0 ];
+ this.length = 1;
+ return this;
+ }
+
+ this.length = Math.ceil(number.length / 3);
+ this.words = new Array(this.length);
+ for (var i = 0; i < this.length; i++) {
+ this.words[i] = 0;
+ }
+
+ var j, w;
+ var off = 0;
+ if (endian === 'be') {
+ for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
+ w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
+ this.words[j] |= (w << off) & 0x3ffffff;
+ this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
+ off += 24;
+ if (off >= 26) {
+ off -= 26;
+ j++;
+ }
+ }
+ } else if (endian === 'le') {
+ for (i = 0, j = 0; i < number.length; i += 3) {
+ w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
+ this.words[j] |= (w << off) & 0x3ffffff;
+ this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
+ off += 24;
+ if (off >= 26) {
+ off -= 26;
+ j++;
+ }
+ }
+ }
+ return this.strip();
+ };
+
+ function parseHex4Bits (string, index) {
+ var c = string.charCodeAt(index);
+ // 'A' - 'F'
+ if (c >= 65 && c <= 70) {
+ return c - 55;
+ // 'a' - 'f'
+ } else if (c >= 97 && c <= 102) {
+ return c - 87;
+ // '0' - '9'
+ } else {
+ return (c - 48) & 0xf;
+ }
+ }
+
+ function parseHexByte (string, lowerBound, index) {
+ var r = parseHex4Bits(string, index);
+ if (index - 1 >= lowerBound) {
+ r |= parseHex4Bits(string, index - 1) << 4;
+ }
+ return r;
+ }
+
+ BN.prototype._parseHex = function _parseHex (number, start, endian) {
+ // Create possibly bigger array to ensure that it fits the number
+ this.length = Math.ceil((number.length - start) / 6);
+ this.words = new Array(this.length);
+ for (var i = 0; i < this.length; i++) {
+ this.words[i] = 0;
+ }
+
+ // 24-bits chunks
+ var off = 0;
+ var j = 0;
+
+ var w;
+ if (endian === 'be') {
+ for (i = number.length - 1; i >= start; i -= 2) {
+ w = parseHexByte(number, start, i) << off;
+ this.words[j] |= w & 0x3ffffff;
+ if (off >= 18) {
+ off -= 18;
+ j += 1;
+ this.words[j] |= w >>> 26;
+ } else {
+ off += 8;
+ }
+ }
+ } else {
+ var parseLength = number.length - start;
+ for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {
+ w = parseHexByte(number, start, i) << off;
+ this.words[j] |= w & 0x3ffffff;
+ if (off >= 18) {
+ off -= 18;
+ j += 1;
+ this.words[j] |= w >>> 26;
+ } else {
+ off += 8;
+ }
+ }
+ }
+
+ this.strip();
+ };
+
+ function parseBase (str, start, end, mul) {
+ var r = 0;
+ var len = Math.min(str.length, end);
+ for (var i = start; i < len; i++) {
+ var c = str.charCodeAt(i) - 48;
+
+ r *= mul;
+
+ // 'a'
+ if (c >= 49) {
+ r += c - 49 + 0xa;
+
+ // 'A'
+ } else if (c >= 17) {
+ r += c - 17 + 0xa;
+
+ // '0' - '9'
+ } else {
+ r += c;
+ }
+ }
+ return r;
+ }
+
+ BN.prototype._parseBase = function _parseBase (number, base, start) {
+ // Initialize as zero
+ this.words = [ 0 ];
+ this.length = 1;
+
+ // Find length of limb in base
+ for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
+ limbLen++;
+ }
+ limbLen--;
+ limbPow = (limbPow / base) | 0;
+
+ var total = number.length - start;
+ var mod = total % limbLen;
+ var end = Math.min(total, total - mod) + start;
+
+ var word = 0;
+ for (var i = start; i < end; i += limbLen) {
+ word = parseBase(number, i, i + limbLen, base);
+
+ this.imuln(limbPow);
+ if (this.words[0] + word < 0x4000000) {
+ this.words[0] += word;
+ } else {
+ this._iaddn(word);
+ }
+ }
+
+ if (mod !== 0) {
+ var pow = 1;
+ word = parseBase(number, i, number.length, base);
+
+ for (i = 0; i < mod; i++) {
+ pow *= base;
+ }
+
+ this.imuln(pow);
+ if (this.words[0] + word < 0x4000000) {
+ this.words[0] += word;
+ } else {
+ this._iaddn(word);
+ }
+ }
+
+ this.strip();
+ };
+
+ BN.prototype.copy = function copy (dest) {
+ dest.words = new Array(this.length);
+ for (var i = 0; i < this.length; i++) {
+ dest.words[i] = this.words[i];
+ }
+ dest.length = this.length;
+ dest.negative = this.negative;
+ dest.red = this.red;
+ };
+
+ BN.prototype.clone = function clone () {
+ var r = new BN(null);
+ this.copy(r);
+ return r;
+ };
+
+ BN.prototype._expand = function _expand (size) {
+ while (this.length < size) {
+ this.words[this.length++] = 0;
+ }
+ return this;
+ };
+
+ // Remove leading `0` from `this`
+ BN.prototype.strip = function strip () {
+ while (this.length > 1 && this.words[this.length - 1] === 0) {
+ this.length--;
+ }
+ return this._normSign();
+ };
+
+ BN.prototype._normSign = function _normSign () {
+ // -0 = 0
+ if (this.length === 1 && this.words[0] === 0) {
+ this.negative = 0;
+ }
+ return this;
+ };
+
+ BN.prototype.inspect = function inspect () {
+ return (this.red ? 'string | | |
+| [options] | object | | Optional settings |
+| [options.relaxed] | boolean | true | Attempt to return native JS types where possible, rather than BSON types (if true) |
+
+Parse an Extended JSON string, constructing the JavaScript value or object described by that
+string.
+
+**Example**
+
+```js
+const { EJSON } = require('bson');
+const text = '{ "int32": { "$numberInt": "10" } }';
+
+// prints { int32: { [String: '10'] _bsontype: 'Int32', value: '10' } }
+console.log(EJSON.parse(text, { relaxed: false }));
+
+// prints { int32: 10 }
+console.log(EJSON.parse(text));
+```
+
+
+
+#### _EJSON_.stringify(value, [replacer], [space], [options])
+
+| Param | Type | Default | Description |
+| ----------------- | ------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| value | object | | The value to convert to extended JSON |
+| [replacer] | function \| array | | A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string |
+| [space] | string \| number | | A String or Number object that's used to insert white space into the output JSON string for readability purposes. |
+| [options] | object | | Optional settings |
+| [options.relaxed] | boolean | true | Enabled Extended JSON's `relaxed` mode |
+| [options.legacy] | boolean | true | Output in Extended JSON v1 |
+
+Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer
+function is specified or optionally including only the specified properties if a replacer array
+is specified.
+
+**Example**
+
+```js
+const { EJSON } = require('bson');
+const Int32 = require('mongodb').Int32;
+const doc = { int32: new Int32(10) };
+
+// prints '{"int32":{"$numberInt":"10"}}'
+console.log(EJSON.stringify(doc, { relaxed: false }));
+
+// prints '{"int32":10}'
+console.log(EJSON.stringify(doc));
+```
+
+
+
+#### _EJSON_.serialize(bson, [options])
+
+| Param | Type | Description |
+| --------- | ------------------- | ---------------------------------------------------- |
+| bson | object | The object to serialize |
+| [options] | object | Optional settings passed to the `stringify` function |
+
+Serializes an object to an Extended JSON string, and reparse it as a JavaScript object.
+
+
+
+#### _EJSON_.deserialize(ejson, [options])
+
+| Param | Type | Description |
+| --------- | ------------------- | -------------------------------------------- |
+| ejson | object | The Extended JSON object to deserialize |
+| [options] | object | Optional settings passed to the parse method |
+
+Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types
+
+## Error Handling
+
+It is our recommendation to use `BSONError.isBSONError()` checks on errors and to avoid relying on parsing `error.message` and `error.name` strings in your code. We guarantee `BSONError.isBSONError()` checks will pass according to semver guidelines, but errors may be sub-classed or their messages may change at any time, even patch releases, as we see fit to increase the helpfulness of the errors.
+
+Any new errors we add to the driver will directly extend an existing error class and no existing error will be moved to a different parent class outside of a major release.
+This means `BSONError.isBSONError()` will always be able to accurately capture the errors that our BSON library throws.
+
+Hypothetical example: A collection in our Db has an issue with UTF-8 data:
+
+```ts
+let documentCount = 0;
+const cursor = collection.find({}, { utf8Validation: true });
+try {
+ for await (const doc of cursor) documentCount += 1;
+} catch (error) {
+ if (BSONError.isBSONError(error)) {
+ console.log(`Found the troublemaker UTF-8!: ${documentCount} ${error.message}`);
+ return documentCount;
+ }
+ throw error;
+}
+```
+
+## React Native
+
+BSON vendors the required polyfills for `TextEncoder`, `TextDecoder`, `atob`, `btoa` imported from React Native and therefore doesn't expect users to polyfill these. One additional polyfill, `crypto.getRandomValues` is recommended and can be installed with the following command:
+
+```sh
+npm install --save react-native-get-random-values
+```
+
+The following snippet should be placed at the top of the entrypoint (by default this is the root `index.js` file) for React Native projects using the BSON library. These lines must be placed for any code that imports `BSON`.
+
+```typescript
+// Required Polyfills For ReactNative
+import 'react-native-get-random-values';
+```
+
+Finally, import the `BSON` library like so:
+
+```typescript
+import { BSON, EJSON } from 'bson';
+```
+
+This will cause React Native to import the `node_modules/bson/lib/bson.rn.cjs` bundle (see the `"react-native"` setting we have in the `"exports"` section of our [package.json](./package.json).)
+
+### Technical Note about React Native module import
+
+The `"exports"` definition in our `package.json` will result in BSON's CommonJS bundle being imported in a React Native project instead of the ES module bundle. Importing the CommonJS bundle is necessary because BSON's ES module bundle of BSON uses top-level await, which is not supported syntax in [React Native's runtime hermes](https://hermesengine.dev/).
+
+## FAQ
+
+#### Why does `undefined` get converted to `null`?
+
+The `undefined` BSON type has been [deprecated for many years](http://bsonspec.org/spec.html), so this library has dropped support for it. Use the `ignoreUndefined` option (for example, from the [driver](http://mongodb.github.io/node-mongodb-native/2.2/api/MongoClient.html#connect) ) to instead remove `undefined` keys.
+
+#### How do I add custom serialization logic?
+
+This library looks for `toBSON()` functions on every path, and calls the `toBSON()` function to get the value to serialize.
+
+```javascript
+const BSON = require('bson');
+
+class CustomSerialize {
+ toBSON() {
+ return 42;
+ }
+}
+
+const obj = { answer: new CustomSerialize() };
+// "{ answer: 42 }"
+console.log(BSON.deserialize(BSON.serialize(obj)));
+```
diff --git a/hackathon/DIKSHA-Novathon/node_modules/bson/bson.d.ts b/hackathon/DIKSHA-Novathon/node_modules/bson/bson.d.ts
new file mode 100644
index 000000000..14e57096e
--- /dev/null
+++ b/hackathon/DIKSHA-Novathon/node_modules/bson/bson.d.ts
@@ -0,0 +1,1723 @@
+/**
+ * A class representation of the BSON Binary type.
+ * @public
+ * @category BSONType
+ */
+export declare class Binary extends BSONValue {
+ get _bsontype(): 'Binary';
+ /* Excluded from this release type: BSON_BINARY_SUBTYPE_DEFAULT */
+ /** Initial buffer default size */
+ static readonly BUFFER_SIZE = 256;
+ /** Default BSON type */
+ static readonly SUBTYPE_DEFAULT = 0;
+ /** Function BSON type */
+ static readonly SUBTYPE_FUNCTION = 1;
+ /** Byte Array BSON type */
+ static readonly SUBTYPE_BYTE_ARRAY = 2;
+ /** Deprecated UUID BSON type @deprecated Please use SUBTYPE_UUID */
+ static readonly SUBTYPE_UUID_OLD = 3;
+ /** UUID BSON type */
+ static readonly SUBTYPE_UUID = 4;
+ /** MD5 BSON type */
+ static readonly SUBTYPE_MD5 = 5;
+ /** Encrypted BSON type */
+ static readonly SUBTYPE_ENCRYPTED = 6;
+ /** Column BSON type */
+ static readonly SUBTYPE_COLUMN = 7;
+ /** Sensitive BSON type */
+ static readonly SUBTYPE_SENSITIVE = 8;
+ /** Vector BSON type */
+ static readonly SUBTYPE_VECTOR = 9;
+ /** User BSON type */
+ static readonly SUBTYPE_USER_DEFINED = 128;
+ /** datatype of a Binary Vector (subtype: 9) */
+ static readonly VECTOR_TYPE: Readonly<{
+ readonly Int8: 3;
+ readonly Float32: 39;
+ readonly PackedBit: 16;
+ }>;
+ /**
+ * The bytes of the Binary value.
+ *
+ * The format of a Binary value in BSON is defined as:
+ * ```txt
+ * binary ::= int32 subtype (byte*)
+ * ```
+ *
+ * This `buffer` is the "(byte*)" segment.
+ *
+ * Unless the value is subtype 2, then deserialize will read the first 4 bytes as an int32 and set this to the remaining bytes.
+ *
+ * ```txt
+ * binary ::= int32 unsigned_byte(2) int32 (byte*)
+ * ```
+ *
+ * @see https://bsonspec.org/spec.html
+ */
+ buffer: Uint8Array;
+ /**
+ * The binary subtype.
+ *
+ * Current defined values are:
+ *
+ * - `unsigned_byte(0)` Generic binary subtype
+ * - `unsigned_byte(1)` Function
+ * - `unsigned_byte(2)` Binary (Deprecated)
+ * - `unsigned_byte(3)` UUID (Deprecated)
+ * - `unsigned_byte(4)` UUID
+ * - `unsigned_byte(5)` MD5
+ * - `unsigned_byte(6)` Encrypted BSON value
+ * - `unsigned_byte(7)` Compressed BSON column
+ * - `unsigned_byte(8)` Sensitive
+ * - `unsigned_byte(9)` Vector
+ * - `unsigned_byte(128)` - `unsigned_byte(255)` User defined
+ */
+ sub_type: number;
+ /**
+ * The Binary's `buffer` can be larger than the Binary's content.
+ * This property is used to determine where the content ends in the buffer.
+ */
+ position: number;
+ /**
+ * Create a new Binary instance.
+ * @param buffer - a buffer object containing the binary data.
+ * @param subType - the option binary type.
+ */
+ constructor(buffer?: BinarySequence, subType?: number);
+ /**
+ * Updates this binary with byte_value.
+ *
+ * @param byteValue - a single byte we wish to write.
+ */
+ put(byteValue: string | number | Uint8Array | number[]): void;
+ /**
+ * Writes a buffer to the binary.
+ *
+ * @param sequence - a string or buffer to be written to the Binary BSON object.
+ * @param offset - specify the binary of where to write the content.
+ */
+ write(sequence: BinarySequence, offset: number): void;
+ /**
+ * Returns a view of **length** bytes starting at **position**.
+ *
+ * @param position - read from the given position in the Binary.
+ * @param length - the number of bytes to read.
+ */
+ read(position: number, length: number): Uint8Array;
+ /** returns a view of the binary value as a Uint8Array */
+ value(): Uint8Array;
+ /** the length of the binary sequence */
+ length(): number;
+ toJSON(): string;
+ toString(encoding?: 'hex' | 'base64' | 'utf8' | 'utf-8'): string;
+ /* Excluded from this release type: toExtendedJSON */
+ toUUID(): UUID;
+ /** Creates an Binary instance from a hex digit string */
+ static createFromHexString(hex: string, subType?: number): Binary;
+ /** Creates an Binary instance from a base64 string */
+ static createFromBase64(base64: string, subType?: number): Binary;
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+ /**
+ * If this Binary represents a Int8 Vector (`binary.buffer[0] === Binary.VECTOR_TYPE.Int8`),
+ * returns a copy of the bytes in a new Int8Array.
+ *
+ * If the Binary is not a Vector, or the datatype is not Int8, an error is thrown.
+ */
+ toInt8Array(): Int8Array;
+ /**
+ * If this Binary represents a Float32 Vector (`binary.buffer[0] === Binary.VECTOR_TYPE.Float32`),
+ * returns a copy of the bytes in a new Float32Array.
+ *
+ * If the Binary is not a Vector, or the datatype is not Float32, an error is thrown.
+ */
+ toFloat32Array(): Float32Array;
+ /**
+ * If this Binary represents packed bit Vector (`binary.buffer[0] === Binary.VECTOR_TYPE.PackedBit`),
+ * returns a copy of the bytes that are packed bits.
+ *
+ * Use `toBits` to get the unpacked bits.
+ *
+ * If the Binary is not a Vector, or the datatype is not PackedBit, an error is thrown.
+ */
+ toPackedBits(): Uint8Array;
+ /**
+ * If this Binary represents a Packed bit Vector (`binary.buffer[0] === Binary.VECTOR_TYPE.PackedBit`),
+ * returns a copy of the bit unpacked into a new Int8Array.
+ *
+ * Use `toPackedBits` to get the bits still in packed form.
+ *
+ * If the Binary is not a Vector, or the datatype is not PackedBit, an error is thrown.
+ */
+ toBits(): Int8Array;
+ /**
+ * Constructs a Binary representing an Int8 Vector.
+ * @param array - The array to store as a view on the Binary class
+ */
+ static fromInt8Array(array: Int8Array): Binary;
+ /** Constructs a Binary representing an Float32 Vector. */
+ static fromFloat32Array(array: Float32Array): Binary;
+ /**
+ * Constructs a Binary representing a packed bit Vector.
+ *
+ * Use `fromBits` to pack an array of 1s and 0s.
+ */
+ static fromPackedBits(array: Uint8Array, padding?: number): Binary;
+ /**
+ * Constructs a Binary representing an Packed Bit Vector.
+ * @param array - The array of 1s and 0s to pack into the Binary instance
+ */
+ static fromBits(bits: ArrayLike