@bigbinary/neeto-molecules 4.1.23 → 4.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/IpRestriction.js +93 -86
  2. package/dist/IpRestriction.js.map +1 -1
  3. package/dist/cjs/IpRestriction.js +93 -86
  4. package/dist/cjs/IpRestriction.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/translations/ar.json +3 -1
  7. package/src/translations/bg.json +3 -1
  8. package/src/translations/ca.json +3 -1
  9. package/src/translations/cs.json +3 -1
  10. package/src/translations/da.json +3 -1
  11. package/src/translations/de.json +4 -2
  12. package/src/translations/es-MX.json +3 -1
  13. package/src/translations/es.json +3 -1
  14. package/src/translations/et.json +4 -2
  15. package/src/translations/fi.json +4 -2
  16. package/src/translations/fil.json +4 -2
  17. package/src/translations/fr.json +3 -1
  18. package/src/translations/he.json +3 -1
  19. package/src/translations/hi.json +3 -1
  20. package/src/translations/hr.json +3 -1
  21. package/src/translations/hu.json +4 -2
  22. package/src/translations/id.json +4 -2
  23. package/src/translations/it.json +3 -1
  24. package/src/translations/ja.json +3 -1
  25. package/src/translations/ko.json +3 -1
  26. package/src/translations/nl.json +3 -1
  27. package/src/translations/pl.json +4 -2
  28. package/src/translations/pt-BR.json +4 -2
  29. package/src/translations/pt.json +4 -2
  30. package/src/translations/ro.json +3 -1
  31. package/src/translations/ru.json +3 -1
  32. package/src/translations/sk.json +3 -1
  33. package/src/translations/sl.json +4 -2
  34. package/src/translations/sv.json +3 -1
  35. package/src/translations/th.json +3 -1
  36. package/src/translations/tr.json +4 -2
  37. package/src/translations/uk.json +3 -1
  38. package/src/translations/vi.json +3 -1
  39. package/src/translations/zh-CN.json +3 -1
  40. package/src/translations/zh-TW.json +3 -1
@@ -366,86 +366,93 @@ function requireIPv6Utils () {
366
366
 
367
367
  var HexadecimalUtils = {};
368
368
 
369
- (function (exports$1) {
370
- Object.defineProperty(exports$1, "__esModule", { value: true });
371
- exports$1.hexadectetNotationToBinaryString = exports$1.binaryStringToHexadecimalString = exports$1.colonHexadecimalNotationToBinaryString = exports$1.hexadecimalStringToHexadecatetString = exports$1.hexadecimalStringToBinaryString = exports$1.bigIntToHexadecimalString = void 0;
372
- const IPv6Utils_1 = requireIPv6Utils();
373
- const BinaryUtils_1 = BinaryUtils;
374
- /**
375
- * Converts a given bigint number to a hexadecimal string
376
- * @param num the bigint number
377
- * @returns {string} the hexadeciaml string
378
- */
379
- let bigIntToHexadecimalString = (num) => {
380
- return num.toString(16);
381
- };
382
- exports$1.bigIntToHexadecimalString = bigIntToHexadecimalString;
383
- /**
384
- * Converts a number in hexadecimal (base 16) to binary string
385
- * @param {string} hexadecimalString the number in base 16
386
- * @returns {string} the number converted to base 2
387
- */
388
- let hexadecimalStringToBinaryString = (hexadecimalString) => {
389
- let inDecimal = BigInt(`0x${hexadecimalString}`);
390
- return inDecimal.toString(2);
391
- };
392
- exports$1.hexadecimalStringToBinaryString = hexadecimalStringToBinaryString;
393
- /**
394
- * Converts a number in hexadecimal (base 16) to binary hexadecatet string.
395
- * This means the bits in the output cannot be more than 16
396
- *
397
- * @param hexadecimalString {string} the number converted to binary hexadecatet string
398
- */
399
- let hexadecimalStringToHexadecatetString = (hexadecimalString) => {
400
- let binaryString = (0, exports$1.hexadecimalStringToBinaryString)(hexadecimalString);
401
- let length = binaryString.length;
402
- if (length > 16) {
403
- throw new Error("Given decimal in binary contains digits greater than an Hexadecatet");
404
- }
405
- return (0, BinaryUtils_1.leftPadWithZeroBit)(binaryString, 16);
406
- };
407
- exports$1.hexadecimalStringToHexadecatetString = hexadecimalStringToHexadecatetString;
408
- /**
409
- * Given an IPv6 number in hexadecimal notated string, e.g 2001:0db8:0000:0000:0000:0000:0000:0000 converts it to
410
- * binary string
411
- *
412
- * @param hexadecimalString IPv6 string
413
- * @returns {string} the binary value of the given ipv6 number in string
414
- */
415
- let colonHexadecimalNotationToBinaryString = (hexadecimalString) => {
416
- let expandedIPv6 = (0, IPv6Utils_1.expandIPv6Number)(hexadecimalString);
417
- let stringHexadecimal = expandedIPv6.split(":");
418
- return stringHexadecimal.reduce((binaryAsString, hexidecimal) => {
419
- return binaryAsString.concat((0, exports$1.hexadecimalStringToHexadecatetString)(hexidecimal));
420
- }, '');
421
- };
422
- exports$1.colonHexadecimalNotationToBinaryString = colonHexadecimalNotationToBinaryString;
423
- /**
424
- * Converts number in binary string to hexadecimal string
425
- * @param {string} num in binary string
426
- * @returns {string} num in hexadecimal string
427
- */
428
- let binaryStringToHexadecimalString = (num) => {
429
- // first convert to binary string to decimal (big Integer)
430
- let inDecimal = BigInt(`0b${num}`);
431
- return inDecimal.toString(16);
432
- };
433
- exports$1.binaryStringToHexadecimalString = binaryStringToHexadecimalString;
434
- /**
435
- * Converts a given IPv6 number expressed in the hexadecimal string notation into a 16 bit binary number in string
436
- * @param {string} hexadectetString the IPv6 number
437
- * @returns {string} the IPv6 number converted to binary string
438
- */
439
- let hexadectetNotationToBinaryString = (hexadectetString) => {
440
- let expand = (0, IPv6Utils_1.expandIPv6Number)(hexadectetString);
441
- let hexadecimals = expand.split(":");
442
- return hexadecimals.reduce((hexadecimalAsString, hexavalue) => {
443
- return hexadecimalAsString.concat((0, BinaryUtils_1.leftPadWithZeroBit)((0, exports$1.hexadecimalStringToBinaryString)(hexavalue), 16));
444
- }, '');
445
- };
446
- exports$1.hexadectetNotationToBinaryString = hexadectetNotationToBinaryString;
447
-
448
- } (HexadecimalUtils));
369
+ var hasRequiredHexadecimalUtils;
370
+
371
+ function requireHexadecimalUtils () {
372
+ if (hasRequiredHexadecimalUtils) return HexadecimalUtils;
373
+ hasRequiredHexadecimalUtils = 1;
374
+ (function (exports$1) {
375
+ Object.defineProperty(exports$1, "__esModule", { value: true });
376
+ exports$1.hexadectetNotationToBinaryString = exports$1.binaryStringToHexadecimalString = exports$1.colonHexadecimalNotationToBinaryString = exports$1.hexadecimalStringToHexadecatetString = exports$1.hexadecimalStringToBinaryString = exports$1.bigIntToHexadecimalString = void 0;
377
+ const IPv6Utils_1 = requireIPv6Utils();
378
+ const BinaryUtils_1 = BinaryUtils;
379
+ /**
380
+ * Converts a given bigint number to a hexadecimal string
381
+ * @param num the bigint number
382
+ * @returns {string} the hexadeciaml string
383
+ */
384
+ let bigIntToHexadecimalString = (num) => {
385
+ return num.toString(16);
386
+ };
387
+ exports$1.bigIntToHexadecimalString = bigIntToHexadecimalString;
388
+ /**
389
+ * Converts a number in hexadecimal (base 16) to binary string
390
+ * @param {string} hexadecimalString the number in base 16
391
+ * @returns {string} the number converted to base 2
392
+ */
393
+ let hexadecimalStringToBinaryString = (hexadecimalString) => {
394
+ let inDecimal = BigInt(`0x${hexadecimalString}`);
395
+ return inDecimal.toString(2);
396
+ };
397
+ exports$1.hexadecimalStringToBinaryString = hexadecimalStringToBinaryString;
398
+ /**
399
+ * Converts a number in hexadecimal (base 16) to binary hexadecatet string.
400
+ * This means the bits in the output cannot be more than 16
401
+ *
402
+ * @param hexadecimalString {string} the number converted to binary hexadecatet string
403
+ */
404
+ let hexadecimalStringToHexadecatetString = (hexadecimalString) => {
405
+ let binaryString = (0, exports$1.hexadecimalStringToBinaryString)(hexadecimalString);
406
+ let length = binaryString.length;
407
+ if (length > 16) {
408
+ throw new Error("Given decimal in binary contains digits greater than an Hexadecatet");
409
+ }
410
+ return (0, BinaryUtils_1.leftPadWithZeroBit)(binaryString, 16);
411
+ };
412
+ exports$1.hexadecimalStringToHexadecatetString = hexadecimalStringToHexadecatetString;
413
+ /**
414
+ * Given an IPv6 number in hexadecimal notated string, e.g 2001:0db8:0000:0000:0000:0000:0000:0000 converts it to
415
+ * binary string
416
+ *
417
+ * @param hexadecimalString IPv6 string
418
+ * @returns {string} the binary value of the given ipv6 number in string
419
+ */
420
+ let colonHexadecimalNotationToBinaryString = (hexadecimalString) => {
421
+ let expandedIPv6 = (0, IPv6Utils_1.expandIPv6Number)(hexadecimalString);
422
+ let stringHexadecimal = expandedIPv6.split(":");
423
+ return stringHexadecimal.reduce((binaryAsString, hexidecimal) => {
424
+ return binaryAsString.concat((0, exports$1.hexadecimalStringToHexadecatetString)(hexidecimal));
425
+ }, '');
426
+ };
427
+ exports$1.colonHexadecimalNotationToBinaryString = colonHexadecimalNotationToBinaryString;
428
+ /**
429
+ * Converts number in binary string to hexadecimal string
430
+ * @param {string} num in binary string
431
+ * @returns {string} num in hexadecimal string
432
+ */
433
+ let binaryStringToHexadecimalString = (num) => {
434
+ // first convert to binary string to decimal (big Integer)
435
+ let inDecimal = BigInt(`0b${num}`);
436
+ return inDecimal.toString(16);
437
+ };
438
+ exports$1.binaryStringToHexadecimalString = binaryStringToHexadecimalString;
439
+ /**
440
+ * Converts a given IPv6 number expressed in the hexadecimal string notation into a 16 bit binary number in string
441
+ * @param {string} hexadectetString the IPv6 number
442
+ * @returns {string} the IPv6 number converted to binary string
443
+ */
444
+ let hexadectetNotationToBinaryString = (hexadectetString) => {
445
+ let expand = (0, IPv6Utils_1.expandIPv6Number)(hexadectetString);
446
+ let hexadecimals = expand.split(":");
447
+ return hexadecimals.reduce((hexadecimalAsString, hexavalue) => {
448
+ return hexadecimalAsString.concat((0, BinaryUtils_1.leftPadWithZeroBit)((0, exports$1.hexadecimalStringToBinaryString)(hexavalue), 16));
449
+ }, '');
450
+ };
451
+ exports$1.hexadectetNotationToBinaryString = hexadectetNotationToBinaryString;
452
+
453
+ } (HexadecimalUtils));
454
+ return HexadecimalUtils;
455
+ }
449
456
 
450
457
  var hasRequiredValidator;
451
458
 
@@ -457,8 +464,8 @@ function requireValidator () {
457
464
  const BinaryUtils_1 = BinaryUtils;
458
465
  const BinaryUtils_2 = BinaryUtils;
459
466
  const IPv6Utils_1 = requireIPv6Utils();
460
- const HexadecimalUtils_1 = HexadecimalUtils;
461
- const HexadecimalUtils_2 = HexadecimalUtils;
467
+ const HexadecimalUtils_1 = requireHexadecimalUtils();
468
+ const HexadecimalUtils_2 = requireHexadecimalUtils();
462
469
  let Validator$1 = class Validator {
463
470
  /**
464
471
  * Checks if given ipNumber is in between the given lower and upper bound
@@ -955,9 +962,9 @@ const BinaryUtils_2 = BinaryUtils;
955
962
  const BinaryUtils_3 = BinaryUtils;
956
963
  const BinaryUtils_4 = BinaryUtils;
957
964
  const Hexadecatet_1$1 = Hexadecatet$1;
958
- const HexadecimalUtils_1$1 = HexadecimalUtils;
965
+ const HexadecimalUtils_1$1 = requireHexadecimalUtils();
959
966
  const IPv6Utils_1 = requireIPv6Utils();
960
- const HexadecimalUtils_2 = HexadecimalUtils;
967
+ const HexadecimalUtils_2 = requireHexadecimalUtils();
961
968
  /**
962
969
  * Provides the implementation of functionality that are common
963
970
  * to {@link IPv4}, {@link IPv6}, {@link IPv4Mask} and {@link IPv6Mask}
@@ -1708,7 +1715,7 @@ Prefix.isIPv4Prefix = isIPv4Prefix;
1708
1715
  const Validator_1$1 = requireValidator();
1709
1716
  const IPNumber_1$1 = IPNumber;
1710
1717
  const BinaryUtils_1$1 = BinaryUtils;
1711
- const HexadecimalUtils_1 = HexadecimalUtils;
1718
+ const HexadecimalUtils_1 = requireHexadecimalUtils();
1712
1719
  const Hexadecatet_1 = Hexadecatet$1;
1713
1720
  /**
1714
1721
  * Represents the prefix portion in the CIDR notation for representing IP ranges
@@ -3206,7 +3213,7 @@ class SortedSet {
3206
3213
  */
3207
3214
  __exportStar(BinaryUtils, exports$1);
3208
3215
  __exportStar(Hexadecatet$1, exports$1);
3209
- __exportStar(HexadecimalUtils, exports$1);
3216
+ __exportStar(requireHexadecimalUtils(), exports$1);
3210
3217
  __exportStar(IPNumber, exports$1);
3211
3218
  __exportStar(IPNumType, exports$1);
3212
3219
  __exportStar(IPPool, exports$1);