@oila/0account 3.4.7 → 3.4.8

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 (81) hide show
  1. package/dist/zero-account/app-globals-0f993ce5.js +5 -0
  2. package/dist/zero-account/app-globals-0f993ce5.js.map +1 -0
  3. package/dist/{collection/components/zero-account/enums.js → zero-account/enums-816340c2.js} +7 -4
  4. package/dist/zero-account/enums-816340c2.js.map +1 -0
  5. package/dist/zero-account/enums-e7827156.js +21 -0
  6. package/dist/zero-account/enums-e7827156.js.map +1 -0
  7. package/dist/zero-account/index-57856b47.js +3380 -0
  8. package/dist/zero-account/index-57856b47.js.map +1 -0
  9. package/dist/zero-account/index.esm.js +1 -0
  10. package/dist/zero-account/index.esm.js.map +1 -1
  11. package/dist/{collection/utils/qrcode/qrcode.js → zero-account/qr-code.entry.js} +35 -3
  12. package/dist/zero-account/qr-code.entry.js.map +1 -0
  13. package/dist/zero-account/shadow-css-8a6ccf47.js +389 -0
  14. package/dist/zero-account/shadow-css-8a6ccf47.js.map +1 -0
  15. package/dist/{components/zero-account.js → zero-account/zero-account.entry.js} +597 -58
  16. package/dist/zero-account/zero-account.entry.js.map +1 -0
  17. package/dist/zero-account/zero-account.esm.js +64 -1
  18. package/dist/zero-account/zero-account.esm.js.map +1 -1
  19. package/package.json +1 -1
  20. package/dist/cjs/index-1e526aba.js +0 -1645
  21. package/dist/cjs/index-1e526aba.js.map +0 -1
  22. package/dist/cjs/index.cjs.js +0 -4
  23. package/dist/cjs/index.cjs.js.map +0 -1
  24. package/dist/cjs/loader.cjs.js +0 -15
  25. package/dist/cjs/loader.cjs.js.map +0 -1
  26. package/dist/cjs/qr-code_2.cjs.entry.js +0 -2470
  27. package/dist/cjs/qr-code_2.cjs.entry.js.map +0 -1
  28. package/dist/cjs/zero-account.cjs.js +0 -25
  29. package/dist/cjs/zero-account.cjs.js.map +0 -1
  30. package/dist/collection/collection-manifest.json +0 -13
  31. package/dist/collection/components/zero-account/enums.js.map +0 -1
  32. package/dist/collection/components/zero-account/logo.js +0 -6
  33. package/dist/collection/components/zero-account/logo.js.map +0 -1
  34. package/dist/collection/components/zero-account/qrcode.js +0 -111
  35. package/dist/collection/components/zero-account/qrcode.js.map +0 -1
  36. package/dist/collection/components/zero-account/websocket.js +0 -175
  37. package/dist/collection/components/zero-account/websocket.js.map +0 -1
  38. package/dist/collection/components/zero-account/zero-account.css +0 -287
  39. package/dist/collection/components/zero-account/zero-account.e2e.js +0 -26
  40. package/dist/collection/components/zero-account/zero-account.e2e.js.map +0 -1
  41. package/dist/collection/components/zero-account/zero-account.js +0 -401
  42. package/dist/collection/components/zero-account/zero-account.js.map +0 -1
  43. package/dist/collection/components/zero-account/zero-account.spec.js +0 -35
  44. package/dist/collection/components/zero-account/zero-account.spec.js.map +0 -1
  45. package/dist/collection/index.js +0 -2
  46. package/dist/collection/index.js.map +0 -1
  47. package/dist/collection/utils/request.js +0 -38
  48. package/dist/collection/utils/request.js.map +0 -1
  49. package/dist/collection/utils/url.js +0 -43
  50. package/dist/collection/utils/utils.js +0 -16
  51. package/dist/collection/utils/utils.js.map +0 -1
  52. package/dist/collection/utils/utils.spec.js +0 -10
  53. package/dist/collection/utils/utils.spec.js.map +0 -1
  54. package/dist/components/index.js +0 -3
  55. package/dist/components/index.js.map +0 -1
  56. package/dist/components/qr-code.js +0 -8
  57. package/dist/components/qr-code.js.map +0 -1
  58. package/dist/components/qrcode.js +0 -1073
  59. package/dist/components/qrcode.js.map +0 -1
  60. package/dist/components/zero-account.js.map +0 -1
  61. package/dist/esm/index-09024c20.js +0 -1616
  62. package/dist/esm/index-09024c20.js.map +0 -1
  63. package/dist/esm/index.js +0 -3
  64. package/dist/esm/index.js.map +0 -1
  65. package/dist/esm/loader.js +0 -11
  66. package/dist/esm/loader.js.map +0 -1
  67. package/dist/esm/polyfills/core-js.js +0 -11
  68. package/dist/esm/polyfills/dom.js +0 -79
  69. package/dist/esm/polyfills/es5-html-element.js +0 -1
  70. package/dist/esm/polyfills/index.js +0 -34
  71. package/dist/esm/polyfills/system.js +0 -6
  72. package/dist/esm/qr-code_2.entry.js +0 -2465
  73. package/dist/esm/qr-code_2.entry.js.map +0 -1
  74. package/dist/esm/zero-account.js +0 -20
  75. package/dist/esm/zero-account.js.map +0 -1
  76. package/dist/index.cjs.js +0 -1
  77. package/dist/index.js +0 -1
  78. package/dist/zero-account/p-21f4994d.js +0 -3
  79. package/dist/zero-account/p-21f4994d.js.map +0 -1
  80. package/dist/zero-account/p-a29dc444.entry.js +0 -2
  81. package/dist/zero-account/p-a29dc444.entry.js.map +0 -1
@@ -1,2 +1,3 @@
1
1
 
2
+
2
3
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":[],"mappings":""}
1
+ {"file":"index.esm.js","mappings":"","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,3 +1,6 @@
1
+ import { r as registerInstance, h } from './index-57856b47.js';
2
+ import { a as ErrorCorrectionLevel } from './enums-e7827156.js';
3
+
1
4
  /*
2
5
  * QR Code generator library (JavaScript)
3
6
  *
@@ -164,7 +167,7 @@ var qrcodegen = new function() {
164
167
 
165
168
  this.circlePath = function(cx, cy, r){
166
169
  return 'M '+cx+' '+cy+' m -'+r+', 0 a '+r+','+r+' 0 1,0 '+(r*2)+',0 a '+r+','+r+' 0 1,0 -'+(r*2)+',0';
167
- }
170
+ };
168
171
 
169
172
  this.svgObject = function(round) {
170
173
  var parts = [];
@@ -172,7 +175,7 @@ var qrcodegen = new function() {
172
175
  for (var x = 0; x < size; x++) {
173
176
  if (this.getModule(x, y)){
174
177
  if (round) {
175
- parts.push(this.circlePath(x+0.5,y+0.5, 0.5))
178
+ parts.push(this.circlePath(x+0.5,y+0.5, 0.5));
176
179
  } else {
177
180
  parts.push("M" + x + "," + y + "h1v1h-1z");
178
181
  }
@@ -1004,4 +1007,33 @@ var qrcodegen = new function() {
1004
1007
 
1005
1008
  };
1006
1009
 
1007
- export default qrcodegen
1010
+ const QRC = qrcodegen.QrCode;
1011
+ const QRCode = class {
1012
+ constructor(hostRef) {
1013
+ registerInstance(this, hostRef);
1014
+ this.url = undefined;
1015
+ this.level = ErrorCorrectionLevel.M;
1016
+ this.class = '';
1017
+ this.color = 'black';
1018
+ }
1019
+ render() {
1020
+ const getEcc = (ecc) => {
1021
+ ecc = ecc.toUpperCase();
1022
+ if (ecc === 'L')
1023
+ return QRC.Ecc.LOW;
1024
+ if (ecc === 'M')
1025
+ return QRC.Ecc.MEDIUM;
1026
+ if (ecc === 'Q')
1027
+ return QRC.Ecc.QUARTILE;
1028
+ return QRC.Ecc.HIGH;
1029
+ };
1030
+ const ecc = getEcc(this.level);
1031
+ const qr = QRC.encodeText(this.url, ecc);
1032
+ const qrcode = qr.svgObject();
1033
+ return (h("svg", { class: this.class, viewBox: `0 0 ${qrcode.size} ${qrcode.size}` }, h("path", { d: qrcode.path, fill: this.color })));
1034
+ }
1035
+ };
1036
+
1037
+ export { QRCode as qr_code };
1038
+
1039
+ //# sourceMappingURL=qr-code.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"qr-code.entry.esm.js","mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,CAAC;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,GAAG,IAAI,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,OAAO,EAAE,SAAS,EAAE,aAAa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7C;AACA,CAAC;;ACx+BD,MAAM,GAAG,GAAGA,SAAE,CAAC,MAAM,CAAC;MAKT,MAAM;;;;iBAEsB,oBAAoB,CAAC,CAAC;iBACpC,EAAE;iBACF,OAAO;;EAEhC,MAAM;IACJ,MAAM,MAAM,GAAG,CAAC,GAAW;MACzB,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;MACxB,IAAI,GAAG,KAAK,GAAG;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;MACpC,IAAI,GAAG,KAAK,GAAG;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;MACvC,IAAI,GAAG,KAAK,GAAG;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;MACzC,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;KACrB,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE/B,MAAM,EAAE,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;IAE9B,QACE,WAAK,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,IAClE,YAAM,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI,CACtC,EACN;GACH;;;;;","names":["qr"],"sources":["src/utils/qrcode/qrcode.js","src/components/zero-account/qrcode.tsx"],"sourcesContent":["/*\n * QR Code generator library (JavaScript)\n *\n * Copyright (c) Project Nayuki. (MIT License)\n * https://www.nayuki.io/page/qr-code-generator-library\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n * - The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * - The Software is provided \"as is\", without warranty of any kind, express or\n * implied, including but not limited to the warranties of merchantability,\n * fitness for a particular purpose and noninfringement. In no event shall the\n * authors or copyright holders be liable for any claim, damages or other\n * liability, whether in an action of contract, tort or otherwise, arising from,\n * out of or in connection with the Software or the use or other dealings in the\n * Software.\n */\n\n\"use strict\";\n\n\n/*\n * Module \"qrcodegen\", public members:\n * - Class QrCode:\n * - Function encodeText(str text, QrCode.Ecc ecl) -> QrCode\n * - Function encodeBinary(list<byte> data, QrCode.Ecc ecl) -> QrCode\n * - Function encodeSegments(list<QrSegment> segs, QrCode.Ecc ecl,\n * int minVersion=1, int maxVersion=40, mask=-1, boostEcl=true) -> QrCode\n * - Constants int MIN_VERSION, MAX_VERSION\n * - Constructor QrCode(int version, QrCode.Ecc ecl, list<byte> dataCodewords, int mask)\n * - Fields int version, size, mask\n * - Field QrCode.Ecc errorCorrectionLevel\n * - Method getModule(int x, int y) -> bool\n * - Method drawCanvas(int scale, int border, HTMLCanvasElement canvas) -> void\n * - Method toSvgString(int border) -> str\n * - Enum Ecc:\n * - Constants LOW, MEDIUM, QUARTILE, HIGH\n * - Field int ordinal\n * - Class QrSegment:\n * - Function makeBytes(list<byte> data) -> QrSegment\n * - Function makeNumeric(str data) -> QrSegment\n * - Function makeAlphanumeric(str data) -> QrSegment\n * - Function makeSegments(str text) -> list<QrSegment>\n * - Function makeEci(int assignVal) -> QrSegment\n * - Constructor QrSegment(QrSegment.Mode mode, int numChars, list<int> bitData)\n * - Field QrSegment.Mode mode\n * - Field int numChars\n * - Method getData() -> list<int>\n * - Constants RegExp NUMERIC_REGEX, ALPHANUMERIC_REGEX\n * - Enum Mode:\n * - Constants NUMERIC, ALPHANUMERIC, BYTE, KANJI, ECI\n */\nvar qrcodegen = new function() {\n\n\t/*---- QR Code symbol class ----*/\n\n\t/*\n\t * A class that represents a QR Code symbol, which is a type of two-dimension barcode.\n\t * Invented by Denso Wave and described in the ISO/IEC 18004 standard.\n\t * Instances of this class represent an immutable square grid of black and white cells.\n\t * The class provides static factory functions to create a QR Code from text or binary data.\n\t * The class covers the QR Code Model 2 specification, supporting all versions (sizes)\n\t * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.\n\t *\n\t * Ways to create a QR Code object:\n\t * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().\n\t * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().\n\t * - Low level: Custom-make the array of data codeword bytes (including\n\t * segment headers and final padding, excluding error correction codewords),\n\t * supply the appropriate version number, and call the QrCode() constructor.\n\t * (Note that all ways require supplying the desired error correction level.)\n\t *\n\t * This constructor creates a new QR Code with the given version number,\n\t * error correction level, data codeword bytes, and mask number.\n\t * This is a low-level API that most users should not use directly.\n\t * A mid-level API is the encodeSegments() function.\n\t */\n\tthis.QrCode = function(version, errCorLvl, dataCodewords, mask) {\n\n\t\t/*---- Constructor (low level) ----*/\n\n\t\t// Check scalar arguments\n\t\tif (version < MIN_VERSION || version > MAX_VERSION)\n\t\t\tthrow \"Version value out of range\";\n\t\tif (mask < -1 || mask > 7)\n\t\t\tthrow \"Mask value out of range\";\n\t\tif (!(errCorLvl instanceof Ecc))\n\t\t\tthrow \"QrCode.Ecc expected\";\n\t\tvar size = version * 4 + 17;\n\n\t\t// Initialize both grids to be size*size arrays of Boolean false\n\t\tvar row = [];\n\t\tfor (var i = 0; i < size; i++)\n\t\t\trow.push(false);\n\t\tvar modules = []; // Initially all white\n\t\tvar isFunction = [];\n\t\tfor (var i = 0; i < size; i++) {\n\t\t\tmodules .push(row.slice());\n\t\t\tisFunction.push(row.slice());\n\t\t}\n\n\t\t// Compute ECC, draw modules\n\t\tdrawFunctionPatterns();\n\t\tvar allCodewords = addEccAndInterleave(dataCodewords);\n\t\tdrawCodewords(allCodewords);\n\n\t\t// Do masking\n\t\tif (mask == -1) { // Automatically choose best mask\n\t\t\tvar minPenalty = Infinity;\n\t\t\tfor (var i = 0; i < 8; i++) {\n\t\t\t\tdrawFormatBits(i);\n\t\t\t\tapplyMask(i);\n\t\t\t\tvar penalty = getPenaltyScore();\n\t\t\t\tif (penalty < minPenalty) {\n\t\t\t\t\tmask = i;\n\t\t\t\t\tminPenalty = penalty;\n\t\t\t\t}\n\t\t\t\tapplyMask(i); // Undoes the mask due to XOR\n\t\t\t}\n\t\t}\n\t\tif (mask < 0 || mask > 7)\n\t\t\tthrow \"Assertion error\";\n\t\tdrawFormatBits(mask); // Overwrite old format bits\n\t\tapplyMask(mask); // Apply the final choice of mask\n\n\t\tisFunction = null;\n\n\n\t\t/*---- Read-only instance properties ----*/\n\n\t\t// The version number of this QR Code, which is between 1 and 40 (inclusive).\n\t\t// This determines the size of this barcode.\n\t\tObject.defineProperty(this, \"version\", {value:version});\n\n\t\t// The width and height of this QR Code, measured in modules, between\n\t\t// 21 and 177 (inclusive). This is equal to version * 4 + 17.\n\t\tObject.defineProperty(this, \"size\", {value:size});\n\n\t\t// The error correction level used in this QR Code.\n\t\tObject.defineProperty(this, \"errorCorrectionLevel\", {value:errCorLvl});\n\n\t\t// The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).\n\t\t// Even if a QR Code is created with automatic masking requested (mask = -1),\n\t\t// the resulting object still has a mask value between 0 and 7.\n\t\tObject.defineProperty(this, \"mask\", {value:mask});\n\n\n\t\t/*---- Accessor methods ----*/\n\n\t\t// Returns the color of the module (pixel) at the given coordinates, which is false\n\t\t// for white or true for black. The top left corner has the coordinates (x=0, y=0).\n\t\t// If the given coordinates are out of bounds, then false (white) is returned.\n\t\tthis.getModule = function(x, y) {\n\t\t\treturn 0 <= x && x < size && 0 <= y && y < size && modules[y][x];\n\t\t};\n\n\n\t\t/*---- Public instance methods ----*/\n\n\t\tthis.circlePath = function(cx, cy, r){\n\t\t return 'M '+cx+' '+cy+' m -'+r+', 0 a '+r+','+r+' 0 1,0 '+(r*2)+',0 a '+r+','+r+' 0 1,0 -'+(r*2)+',0';\n\t\t}\n\n\t\tthis.svgObject = function(round) {\n\t\t\tvar parts = [];\n\t\t\tfor (var y = 0; y < size; y++) {\n\t\t\t\tfor (var x = 0; x < size; x++) {\n\t\t\t\t\tif (this.getModule(x, y)){\n\t\t\t\t\t\tif (round) {\n\t\t\t\t\t\t\tparts.push(this.circlePath(x+0.5,y+0.5, 0.5))\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparts.push(\"M\" + x + \",\" + y + \"h1v1h-1z\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tpath: parts.join(\" \"),\n\t\t\t\tsize: size\n\t\t\t}\n\t\t};\n\n\n\t\t/*---- Private helper methods for constructor: Drawing function modules ----*/\n\n\t\t// Reads this object's version field, and draws and marks all function modules.\n\t\tfunction drawFunctionPatterns() {\n\t\t\t// Draw horizontal and vertical timing patterns\n\t\t\tfor (var i = 0; i < size; i++) {\n\t\t\t\tsetFunctionModule(6, i, i % 2 == 0);\n\t\t\t\tsetFunctionModule(i, 6, i % 2 == 0);\n\t\t\t}\n\n\t\t\t// Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)\n\t\t\tdrawFinderPattern(3, 3);\n\t\t\tdrawFinderPattern(size - 4, 3);\n\t\t\tdrawFinderPattern(3, size - 4);\n\n\t\t\t// Draw numerous alignment patterns\n\t\t\tvar alignPatPos = getAlignmentPatternPositions();\n\t\t\tvar numAlign = alignPatPos.length;\n\t\t\tfor (var i = 0; i < numAlign; i++) {\n\t\t\t\tfor (var j = 0; j < numAlign; j++) {\n\t\t\t\t\t// Don't draw on the three finder corners\n\t\t\t\t\tif (!(i == 0 && j == 0 || i == 0 && j == numAlign - 1 || i == numAlign - 1 && j == 0))\n\t\t\t\t\t\tdrawAlignmentPattern(alignPatPos[i], alignPatPos[j]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Draw configuration data\n\t\t\tdrawFormatBits(0); // Dummy mask value; overwritten later in the constructor\n\t\t\tdrawVersion();\n\t\t}\n\n\n\t\t// Draws two copies of the format bits (with its own error correction code)\n\t\t// based on the given mask and this object's error correction level field.\n\t\tfunction drawFormatBits(mask) {\n\t\t\t// Calculate error correction code and pack bits\n\t\t\tvar data = errCorLvl.formatBits << 3 | mask; // errCorrLvl is uint2, mask is uint3\n\t\t\tvar rem = data;\n\t\t\tfor (var i = 0; i < 10; i++)\n\t\t\t\trem = (rem << 1) ^ ((rem >>> 9) * 0x537);\n\t\t\tvar bits = (data << 10 | rem) ^ 0x5412; // uint15\n\t\t\tif (bits >>> 15 != 0)\n\t\t\t\tthrow \"Assertion error\";\n\n\t\t\t// Draw first copy\n\t\t\tfor (var i = 0; i <= 5; i++)\n\t\t\t\tsetFunctionModule(8, i, getBit(bits, i));\n\t\t\tsetFunctionModule(8, 7, getBit(bits, 6));\n\t\t\tsetFunctionModule(8, 8, getBit(bits, 7));\n\t\t\tsetFunctionModule(7, 8, getBit(bits, 8));\n\t\t\tfor (var i = 9; i < 15; i++)\n\t\t\t\tsetFunctionModule(14 - i, 8, getBit(bits, i));\n\n\t\t\t// Draw second copy\n\t\t\tfor (var i = 0; i < 8; i++)\n\t\t\t\tsetFunctionModule(size - 1 - i, 8, getBit(bits, i));\n\t\t\tfor (var i = 8; i < 15; i++)\n\t\t\t\tsetFunctionModule(8, size - 15 + i, getBit(bits, i));\n\t\t\tsetFunctionModule(8, size - 8, true); // Always black\n\t\t}\n\n\n\t\t// Draws two copies of the version bits (with its own error correction code),\n\t\t// based on this object's version field, iff 7 <= version <= 40.\n\t\tfunction drawVersion() {\n\t\t\tif (version < 7)\n\t\t\t\treturn;\n\n\t\t\t// Calculate error correction code and pack bits\n\t\t\tvar rem = version; // version is uint6, in the range [7, 40]\n\t\t\tfor (var i = 0; i < 12; i++)\n\t\t\t\trem = (rem << 1) ^ ((rem >>> 11) * 0x1F25);\n\t\t\tvar bits = version << 12 | rem; // uint18\n\t\t\tif (bits >>> 18 != 0)\n\t\t\t\tthrow \"Assertion error\";\n\n\t\t\t// Draw two copies\n\t\t\tfor (var i = 0; i < 18; i++) {\n\t\t\t\tvar bit = getBit(bits, i);\n\t\t\t\tvar a = size - 11 + i % 3;\n\t\t\t\tvar b = Math.floor(i / 3);\n\t\t\t\tsetFunctionModule(a, b, bit);\n\t\t\t\tsetFunctionModule(b, a, bit);\n\t\t\t}\n\t\t}\n\n\n\t\t// Draws a 9*9 finder pattern including the border separator,\n\t\t// with the center module at (x, y). Modules can be out of bounds.\n\t\tfunction drawFinderPattern(x, y) {\n\t\t\tfor (var dy = -4; dy <= 4; dy++) {\n\t\t\t\tfor (var dx = -4; dx <= 4; dx++) {\n\t\t\t\t\tvar dist = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm\n\t\t\t\t\tvar xx = x + dx, yy = y + dy;\n\t\t\t\t\tif (0 <= xx && xx < size && 0 <= yy && yy < size)\n\t\t\t\t\t\tsetFunctionModule(xx, yy, dist != 2 && dist != 4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// Draws a 5*5 alignment pattern, with the center module\n\t\t// at (x, y). All modules must be in bounds.\n\t\tfunction drawAlignmentPattern(x, y) {\n\t\t\tfor (var dy = -2; dy <= 2; dy++) {\n\t\t\t\tfor (var dx = -2; dx <= 2; dx++)\n\t\t\t\t\tsetFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);\n\t\t\t}\n\t\t}\n\n\n\t\t// Sets the color of a module and marks it as a function module.\n\t\t// Only used by the constructor. Coordinates must be in bounds.\n\t\tfunction setFunctionModule(x, y, isBlack) {\n\t\t\tmodules[y][x] = isBlack;\n\t\t\tisFunction[y][x] = true;\n\t\t}\n\n\n\t\t/*---- Private helper methods for constructor: Codewords and masking ----*/\n\n\t\t// Returns a new byte string representing the given data with the appropriate error correction\n\t\t// codewords appended to it, based on this object's version and error correction level.\n\t\tfunction addEccAndInterleave(data) {\n\t\t\tif (data.length != QrCode.getNumDataCodewords(version, errCorLvl))\n\t\t\t\tthrow \"Invalid argument\";\n\n\t\t\t// Calculate parameter numbers\n\t\t\tvar numBlocks = QrCode.NUM_ERROR_CORRECTION_BLOCKS[errCorLvl.ordinal][version];\n\t\t\tvar blockEccLen = QrCode.ECC_CODEWORDS_PER_BLOCK [errCorLvl.ordinal][version];\n\t\t\tvar rawCodewords = Math.floor(QrCode.getNumRawDataModules(version) / 8);\n\t\t\tvar numShortBlocks = numBlocks - rawCodewords % numBlocks;\n\t\t\tvar shortBlockLen = Math.floor(rawCodewords / numBlocks);\n\n\t\t\t// Split data into blocks and append ECC to each block\n\t\t\tvar blocks = [];\n\t\t\tvar rs = new ReedSolomonGenerator(blockEccLen);\n\t\t\tfor (var i = 0, k = 0; i < numBlocks; i++) {\n\t\t\t\tvar dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));\n\t\t\t\tk += dat.length;\n\t\t\t\tvar ecc = rs.getRemainder(dat);\n\t\t\t\tif (i < numShortBlocks)\n\t\t\t\t\tdat.push(0);\n\t\t\t\tblocks.push(dat.concat(ecc));\n\t\t\t}\n\n\t\t\t// Interleave (not concatenate) the bytes from every block into a single sequence\n\t\t\tvar result = [];\n\t\t\tfor (var i = 0; i < blocks[0].length; i++) {\n\t\t\t\tfor (var j = 0; j < blocks.length; j++) {\n\t\t\t\t\t// Skip the padding byte in short blocks\n\t\t\t\t\tif (i != shortBlockLen - blockEccLen || j >= numShortBlocks)\n\t\t\t\t\t\tresult.push(blocks[j][i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result.length != rawCodewords)\n\t\t\t\tthrow \"Assertion error\";\n\t\t\treturn result;\n\t\t}\n\n\n\t\t// Draws the given sequence of 8-bit codewords (data and error correction) onto the entire\n\t\t// data area of this QR Code. Function modules need to be marked off before this is called.\n\t\tfunction drawCodewords(data) {\n\t\t\tif (data.length != Math.floor(QrCode.getNumRawDataModules(version) / 8))\n\t\t\t\tthrow \"Invalid argument\";\n\t\t\tvar i = 0; // Bit index into the data\n\t\t\t// Do the funny zigzag scan\n\t\t\tfor (var right = size - 1; right >= 1; right -= 2) { // Index of right column in each column pair\n\t\t\t\tif (right == 6)\n\t\t\t\t\tright = 5;\n\t\t\t\tfor (var vert = 0; vert < size; vert++) { // Vertical counter\n\t\t\t\t\tfor (var j = 0; j < 2; j++) {\n\t\t\t\t\t\tvar x = right - j; // Actual x coordinate\n\t\t\t\t\t\tvar upward = ((right + 1) & 2) == 0;\n\t\t\t\t\t\tvar y = upward ? size - 1 - vert : vert; // Actual y coordinate\n\t\t\t\t\t\tif (!isFunction[y][x] && i < data.length * 8) {\n\t\t\t\t\t\t\tmodules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If this QR Code has any remainder bits (0 to 7), they were assigned as\n\t\t\t\t\t\t// 0/false/white by the constructor and are left unchanged by this method\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i != data.length * 8)\n\t\t\t\tthrow \"Assertion error\";\n\t\t}\n\n\n\t\t// XORs the codeword modules in this QR Code with the given mask pattern.\n\t\t// The function modules must be marked and the codeword bits must be drawn\n\t\t// before masking. Due to the arithmetic of XOR, calling applyMask() with\n\t\t// the same mask value a second time will undo the mask. A final well-formed\n\t\t// QR Code needs exactly one (not zero, two, etc.) mask applied.\n\t\tfunction applyMask(mask) {\n\t\t\tif (mask < 0 || mask > 7)\n\t\t\t\tthrow \"Mask value out of range\";\n\t\t\tfor (var y = 0; y < size; y++) {\n\t\t\t\tfor (var x = 0; x < size; x++) {\n\t\t\t\t\tvar invert;\n\t\t\t\t\tswitch (mask) {\n\t\t\t\t\t\tcase 0: invert = (x + y) % 2 == 0; break;\n\t\t\t\t\t\tcase 1: invert = y % 2 == 0; break;\n\t\t\t\t\t\tcase 2: invert = x % 3 == 0; break;\n\t\t\t\t\t\tcase 3: invert = (x + y) % 3 == 0; break;\n\t\t\t\t\t\tcase 4: invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0; break;\n\t\t\t\t\t\tcase 5: invert = x * y % 2 + x * y % 3 == 0; break;\n\t\t\t\t\t\tcase 6: invert = (x * y % 2 + x * y % 3) % 2 == 0; break;\n\t\t\t\t\t\tcase 7: invert = ((x + y) % 2 + x * y % 3) % 2 == 0; break;\n\t\t\t\t\t\tdefault: throw \"Assertion error\";\n\t\t\t\t\t}\n\t\t\t\t\tif (!isFunction[y][x] && invert)\n\t\t\t\t\t\tmodules[y][x] = !modules[y][x];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// Calculates and returns the penalty score based on state of this QR Code's current modules.\n\t\t// This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.\n\t\tfunction getPenaltyScore() {\n\t\t\tvar result = 0;\n\n\t\t\t// Adjacent modules in row having same color\n\t\t\tfor (var y = 0; y < size; y++) {\n\t\t\t\tfor (var x = 0, runX, colorX; x < size; x++) {\n\t\t\t\t\tif (x == 0 || modules[y][x] != colorX) {\n\t\t\t\t\t\tcolorX = modules[y][x];\n\t\t\t\t\t\trunX = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trunX++;\n\t\t\t\t\t\tif (runX == 5)\n\t\t\t\t\t\t\tresult += QrCode.PENALTY_N1;\n\t\t\t\t\t\telse if (runX > 5)\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Adjacent modules in column having same color\n\t\t\tfor (var x = 0; x < size; x++) {\n\t\t\t\tfor (var y = 0, runY, colorY; y < size; y++) {\n\t\t\t\t\tif (y == 0 || modules[y][x] != colorY) {\n\t\t\t\t\t\tcolorY = modules[y][x];\n\t\t\t\t\t\trunY = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trunY++;\n\t\t\t\t\t\tif (runY == 5)\n\t\t\t\t\t\t\tresult += QrCode.PENALTY_N1;\n\t\t\t\t\t\telse if (runY > 5)\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 2*2 blocks of modules having same color\n\t\t\tfor (var y = 0; y < size - 1; y++) {\n\t\t\t\tfor (var x = 0; x < size - 1; x++) {\n\t\t\t\t\tvar color = modules[y][x];\n\t\t\t\t\tif ( color == modules[y][x + 1] &&\n\t\t\t\t\t color == modules[y + 1][x] &&\n\t\t\t\t\t color == modules[y + 1][x + 1])\n\t\t\t\t\t\tresult += QrCode.PENALTY_N2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Finder-like pattern in rows\n\t\t\tfor (var y = 0; y < size; y++) {\n\t\t\t\tfor (var x = 0, bits = 0; x < size; x++) {\n\t\t\t\t\tbits = ((bits << 1) & 0x7FF) | (modules[y][x] ? 1 : 0);\n\t\t\t\t\tif (x >= 10 && (bits == 0x05D || bits == 0x5D0)) // Needs 11 bits accumulated\n\t\t\t\t\t\tresult += QrCode.PENALTY_N3;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Finder-like pattern in columns\n\t\t\tfor (var x = 0; x < size; x++) {\n\t\t\t\tfor (var y = 0, bits = 0; y < size; y++) {\n\t\t\t\t\tbits = ((bits << 1) & 0x7FF) | (modules[y][x] ? 1 : 0);\n\t\t\t\t\tif (y >= 10 && (bits == 0x05D || bits == 0x5D0)) // Needs 11 bits accumulated\n\t\t\t\t\t\tresult += QrCode.PENALTY_N3;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Balance of black and white modules\n\t\t\tvar black = 0;\n\t\t\tmodules.forEach(function(row) {\n\t\t\t\trow.forEach(function(color) {\n\t\t\t\t\tif (color)\n\t\t\t\t\t\tblack++;\n\t\t\t\t});\n\t\t\t});\n\t\t\tvar total = size * size; // Note that size is odd, so black/total != 1/2\n\t\t\t// Compute the smallest integer k >= 0 such that (45-5k)% <= black/total <= (55+5k)%\n\t\t\tvar k = Math.ceil(Math.abs(black * 20 - total * 10) / total) - 1;\n\t\t\tresult += k * QrCode.PENALTY_N4;\n\t\t\treturn result;\n\t\t}\n\n\n\t\t// Returns an ascending list of positions of alignment patterns for this version number.\n\t\t// Each position is in the range [0,177), and are used on both the x and y axes.\n\t\t// This could be implemented as lookup table of 40 variable-length lists of integers.\n\t\tfunction getAlignmentPatternPositions() {\n\t\t\tif (version == 1)\n\t\t\t\treturn [];\n\t\t\telse {\n\t\t\t\tvar numAlign = Math.floor(version / 7) + 2;\n\t\t\t\tvar step = (version == 32) ? 26 :\n\t\t\t\t\tMath.ceil((size - 13) / (numAlign*2 - 2)) * 2;\n\t\t\t\tvar result = [6];\n\t\t\t\tfor (var pos = size - 7; result.length < numAlign; pos -= step)\n\t\t\t\t\tresult.splice(1, 0, pos);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\n\n\t\t// Returns true iff the i'th bit of x is set to 1.\n\t\tfunction getBit(x, i) {\n\t\t\treturn ((x >>> i) & 1) != 0;\n\t\t}\n\t};\n\n\n\t/*---- Static factory functions (high level) for QrCode ----*/\n\n\t/*\n\t * Returns a QR Code representing the given Unicode text string at the given error correction level.\n\t * As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer\n\t * Unicode code points (not UTF-16 code units) if the low error correction level is used. The smallest possible\n\t * QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the\n\t * ecl argument if it can be done without increasing the version.\n\t */\n\tthis.QrCode.encodeText = function(text, ecl) {\n\t\tvar segs = qrcodegen.QrSegment.makeSegments(text);\n\t\treturn this.encodeSegments(segs, ecl);\n\t};\n\n\n\t/*\n\t * Returns a QR Code representing the given binary data at the given error correction level.\n\t * This function always encodes using the binary segment mode, not any text mode. The maximum number of\n\t * bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.\n\t * The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.\n\t */\n\tthis.QrCode.encodeBinary = function(data, ecl) {\n\t\tvar seg = qrcodegen.QrSegment.makeBytes(data);\n\t\treturn this.encodeSegments([seg], ecl);\n\t};\n\n\n\t/*---- Static factory functions (mid level) for QrCode ----*/\n\n\t/*\n\t * Returns a QR Code representing the given segments with the given encoding parameters.\n\t * The smallest possible QR Code version within the given range is automatically\n\t * chosen for the output. Iff boostEcl is true, then the ECC level of the result\n\t * may be higher than the ecl argument if it can be done without increasing the\n\t * version. The mask number is either between 0 to 7 (inclusive) to force that\n\t * mask, or -1 to automatically choose an appropriate mask (which may be slow).\n\t * This function allows the user to create a custom sequence of segments that switches\n\t * between modes (such as alphanumeric and byte) to encode text in less space.\n\t * This is a mid-level API; the high-level API is encodeText() and encodeBinary().\n\t */\n\tthis.QrCode.encodeSegments = function(segs, ecl, minVersion, maxVersion, mask, boostEcl) {\n\t\tif (minVersion == undefined) minVersion = MIN_VERSION;\n\t\tif (maxVersion == undefined) maxVersion = MAX_VERSION;\n\t\tif (mask == undefined) mask = -1;\n\t\tif (boostEcl == undefined) boostEcl = true;\n\t\tif (!(MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= MAX_VERSION) || mask < -1 || mask > 7)\n\t\t\tthrow \"Invalid value\";\n\n\t\t// Find the minimal version number to use\n\t\tvar version, dataUsedBits;\n\t\tfor (version = minVersion; ; version++) {\n\t\t\tvar dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available\n\t\t\tdataUsedBits = qrcodegen.QrSegment.getTotalBits(segs, version);\n\t\t\tif (dataUsedBits <= dataCapacityBits)\n\t\t\t\tbreak; // This version number is found to be suitable\n\t\t\tif (version >= maxVersion) // All versions in the range could not fit the given data\n\t\t\t\tthrow \"Data too long\";\n\t\t}\n\n\t\t// Increase the error correction level while the data still fits in the current version number\n\t\t[this.Ecc.MEDIUM, this.Ecc.QUARTILE, this.Ecc.HIGH].forEach(function(newEcl) { // From low to high\n\t\t\tif (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8)\n\t\t\t\tecl = newEcl;\n\t\t});\n\n\t\t// Concatenate all segments to create the data bit string\n\t\tvar bb = new BitBuffer();\n\t\tsegs.forEach(function(seg) {\n\t\t\tbb.appendBits(seg.mode.modeBits, 4);\n\t\t\tbb.appendBits(seg.numChars, seg.mode.numCharCountBits(version));\n\t\t\tseg.getData().forEach(function(bit) {\n\t\t\t\tbb.push(bit);\n\t\t\t});\n\t\t});\n\t\tif (bb.length != dataUsedBits)\n\t\t\tthrow \"Assertion error\";\n\n\t\t// Add terminator and pad up to a byte if applicable\n\t\tvar dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8;\n\t\tif (bb.length > dataCapacityBits)\n\t\t\tthrow \"Assertion error\";\n\t\tbb.appendBits(0, Math.min(4, dataCapacityBits - bb.length));\n\t\tbb.appendBits(0, (8 - bb.length % 8) % 8);\n\t\tif (bb.length % 8 != 0)\n\t\t\tthrow \"Assertion error\";\n\n\t\t// Pad with alternating bytes until data capacity is reached\n\t\tfor (var padByte = 0xEC; bb.length < dataCapacityBits; padByte ^= 0xEC ^ 0x11)\n\t\t\tbb.appendBits(padByte, 8);\n\n\t\t// Pack bits into bytes in big endian\n\t\tvar dataCodewords = [];\n\t\twhile (dataCodewords.length * 8 < bb.length)\n\t\t\tdataCodewords.push(0);\n\t\tbb.forEach(function(bit, i) {\n\t\t\tdataCodewords[i >>> 3] |= bit << (7 - (i & 7));\n\t\t});\n\n\t\t// Create the QR Code object\n\t\treturn new this(version, ecl, dataCodewords, mask);\n\t};\n\n\n\t/*---- Private static helper functions for QrCode ----*/\n\n\tvar QrCode = {}; // Private object to assign properties to. Not the same object as 'this.QrCode'.\n\n\n\t// Returns the number of data bits that can be stored in a QR Code of the given version number, after\n\t// all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.\n\t// The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.\n\tQrCode.getNumRawDataModules = function(ver) {\n\t\tif (ver < MIN_VERSION || ver > MAX_VERSION)\n\t\t\tthrow \"Version number out of range\";\n\t\tvar result = (16 * ver + 128) * ver + 64;\n\t\tif (ver >= 2) {\n\t\t\tvar numAlign = Math.floor(ver / 7) + 2;\n\t\t\tresult -= (25 * numAlign - 10) * numAlign - 55;\n\t\t\tif (ver >= 7)\n\t\t\t\tresult -= 36;\n\t\t}\n\t\treturn result;\n\t};\n\n\n\t// Returns the number of 8-bit data (i.e. not error correction) codewords contained in any\n\t// QR Code of the given version number and error correction level, with remainder bits discarded.\n\t// This stateless pure function could be implemented as a (40*4)-cell lookup table.\n\tQrCode.getNumDataCodewords = function(ver, ecl) {\n\t\treturn Math.floor(QrCode.getNumRawDataModules(ver) / 8) -\n\t\t\tQrCode.ECC_CODEWORDS_PER_BLOCK [ecl.ordinal][ver] *\n\t\t\tQrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n\t};\n\n\n\t/*---- Constants and tables for QrCode ----*/\n\n\tvar MIN_VERSION = 1; // The minimum version number supported in the QR Code Model 2 standard\n\tvar MAX_VERSION = 40; // The maximum version number supported in the QR Code Model 2 standard\n\tObject.defineProperty(this.QrCode, \"MIN_VERSION\", {value:MIN_VERSION});\n\tObject.defineProperty(this.QrCode, \"MAX_VERSION\", {value:MAX_VERSION});\n\n\t// For use in getPenaltyScore(), when evaluating which mask is best.\n\tQrCode.PENALTY_N1 = 3;\n\tQrCode.PENALTY_N2 = 3;\n\tQrCode.PENALTY_N3 = 40;\n\tQrCode.PENALTY_N4 = 10;\n\n\tQrCode.ECC_CODEWORDS_PER_BLOCK = [\n\t\t// Version: (note that index 0 is for padding, and is set to an illegal value)\n\t\t// 0, 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 Error correction level\n\t\t[null, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], // Low\n\t\t[null, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28], // Medium\n\t\t[null, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], // Quartile\n\t\t[null, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], // High\n\t];\n\n\tQrCode.NUM_ERROR_CORRECTION_BLOCKS = [\n\t\t// Version: (note that index 0 is for padding, and is set to an illegal value)\n\t\t// 0, 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 Error correction level\n\t\t[null, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25], // Low\n\t\t[null, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49], // Medium\n\t\t[null, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68], // Quartile\n\t\t[null, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81], // High\n\t];\n\n\n\t/*---- Public helper enumeration ----*/\n\n\t/*\n\t * The error correction level in a QR Code symbol. Immutable.\n\t */\n\tthis.QrCode.Ecc = {\n\t\tLOW : new Ecc(0, 1), // The QR Code can tolerate about 7% erroneous codewords\n\t\tMEDIUM : new Ecc(1, 0), // The QR Code can tolerate about 15% erroneous codewords\n\t\tQUARTILE: new Ecc(2, 3), // The QR Code can tolerate about 25% erroneous codewords\n\t\tHIGH : new Ecc(3, 2), // The QR Code can tolerate about 30% erroneous codewords\n\t};\n\n\n\t// Private constructor.\n\tfunction Ecc(ord, fb) {\n\t\t// (Public) In the range 0 to 3 (unsigned 2-bit integer)\n\t\tObject.defineProperty(this, \"ordinal\", {value:ord});\n\n\t\t// (Package-private) In the range 0 to 3 (unsigned 2-bit integer)\n\t\tObject.defineProperty(this, \"formatBits\", {value:fb});\n\t}\n\n\n\n\t/*---- Data segment class ----*/\n\n\t/*\n\t * A segment of character/binary/control data in a QR Code symbol.\n\t * Instances of this class are immutable.\n\t * The mid-level way to create a segment is to take the payload data\n\t * and call a static factory function such as QrSegment.makeNumeric().\n\t * The low-level way to create a segment is to custom-make the bit buffer\n\t * and call the QrSegment() constructor with appropriate values.\n\t * This segment class imposes no length restrictions, but QR Codes have restrictions.\n\t * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.\n\t * Any segment longer than this is meaningless for the purpose of generating QR Codes.\n\t * This constructor creates a QR Code segment with the given attributes and data.\n\t * The character count (numChars) must agree with the mode and the bit buffer length,\n\t * but the constraint isn't checked. The given bit buffer is cloned and stored.\n\t */\n\tthis.QrSegment = function(mode, numChars, bitData) {\n\t\t/*---- Constructor (low level) ----*/\n\t\tif (numChars < 0 || !(mode instanceof Mode))\n\t\t\tthrow \"Invalid argument\";\n\n\t\t// The data bits of this segment. Accessed through getData().\n\t\tbitData = bitData.slice(); // Make defensive copy\n\n\t\t// The mode indicator of this segment.\n\t\tObject.defineProperty(this, \"mode\", {value:mode});\n\n\t\t// The length of this segment's unencoded data. Measured in characters for\n\t\t// numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.\n\t\t// Always zero or positive. Not the same as the data's bit length.\n\t\tObject.defineProperty(this, \"numChars\", {value:numChars});\n\n\t\t// Returns a new copy of the data bits of this segment.\n\t\tthis.getData = function() {\n\t\t\treturn bitData.slice(); // Make defensive copy\n\t\t};\n\t};\n\n\n\t/*---- Static factory functions (mid level) for QrSegment ----*/\n\n\t/*\n\t * Returns a segment representing the given binary data encoded in\n\t * byte mode. All input byte arrays are acceptable. Any text string\n\t * can be converted to UTF-8 bytes and encoded as a byte mode segment.\n\t */\n\tthis.QrSegment.makeBytes = function(data) {\n\t\tvar bb = new BitBuffer();\n\t\tdata.forEach(function(b) {\n\t\t\tbb.appendBits(b, 8);\n\t\t});\n\t\treturn new this(this.Mode.BYTE, data.length, bb);\n\t};\n\n\n\t/*\n\t * Returns a segment representing the given string of decimal digits encoded in numeric mode.\n\t */\n\tthis.QrSegment.makeNumeric = function(digits) {\n\t\tif (!this.NUMERIC_REGEX.test(digits))\n\t\t\tthrow \"String contains non-numeric characters\";\n\t\tvar bb = new BitBuffer();\n\t\tfor (var i = 0; i < digits.length; ) { // Consume up to 3 digits per iteration\n\t\t\tvar n = Math.min(digits.length - i, 3);\n\t\t\tbb.appendBits(parseInt(digits.substr(i, n), 10), n * 3 + 1);\n\t\t\ti += n;\n\t\t}\n\t\treturn new this(this.Mode.NUMERIC, digits.length, bb);\n\t};\n\n\n\t/*\n\t * Returns a segment representing the given text string encoded in alphanumeric mode.\n\t * The characters allowed are: 0 to 9, A to Z (uppercase only), space,\n\t * dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n\t */\n\tthis.QrSegment.makeAlphanumeric = function(text) {\n\t\tif (!this.ALPHANUMERIC_REGEX.test(text))\n\t\t\tthrow \"String contains unencodable characters in alphanumeric mode\";\n\t\tvar bb = new BitBuffer();\n\t\tvar i;\n\t\tfor (i = 0; i + 2 <= text.length; i += 2) { // Process groups of 2\n\t\t\tvar temp = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;\n\t\t\ttemp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));\n\t\t\tbb.appendBits(temp, 11);\n\t\t}\n\t\tif (i < text.length) // 1 character remaining\n\t\t\tbb.appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6);\n\t\treturn new this(this.Mode.ALPHANUMERIC, text.length, bb);\n\t};\n\n\n\t/*\n\t * Returns a new mutable list of zero or more segments to represent the given Unicode text string.\n\t * The result may use various segment modes and switch modes to optimize the length of the bit stream.\n\t */\n\tthis.QrSegment.makeSegments = function(text) {\n\t\t// Select the most efficient segment encoding automatically\n\t\tif (text == \"\")\n\t\t\treturn [];\n\t\telse if (this.NUMERIC_REGEX.test(text))\n\t\t\treturn [this.makeNumeric(text)];\n\t\telse if (this.ALPHANUMERIC_REGEX.test(text))\n\t\t\treturn [this.makeAlphanumeric(text)];\n\t\telse\n\t\t\treturn [this.makeBytes(toUtf8ByteArray(text))];\n\t};\n\n\n\t/*\n\t * Returns a segment representing an Extended Channel Interpretation\n\t * (ECI) designator with the given assignment value.\n\t */\n\tthis.QrSegment.makeEci = function(assignVal) {\n\t\tvar bb = new BitBuffer();\n\t\tif (assignVal < 0)\n\t\t\tthrow \"ECI assignment value out of range\";\n\t\telse if (assignVal < (1 << 7))\n\t\t\tbb.appendBits(assignVal, 8);\n\t\telse if (assignVal < (1 << 14)) {\n\t\t\tbb.appendBits(2, 2);\n\t\t\tbb.appendBits(assignVal, 14);\n\t\t} else if (assignVal < 1000000) {\n\t\t\tbb.appendBits(6, 3);\n\t\t\tbb.appendBits(assignVal, 21);\n\t\t} else\n\t\t\tthrow \"ECI assignment value out of range\";\n\t\treturn new this(this.Mode.ECI, 0, bb);\n\t};\n\n\n\t// (Package-private) Calculates and returns the number of bits needed to encode the given segments at the\n\t// given version. The result is infinity if a segment has too many characters to fit its length field.\n\tthis.QrSegment.getTotalBits = function(segs, version) {\n\t\tvar result = 0;\n\t\tfor (var i = 0; i < segs.length; i++) {\n\t\t\tvar seg = segs[i];\n\t\t\tvar ccbits = seg.mode.numCharCountBits(version);\n\t\t\tif (seg.numChars >= (1 << ccbits))\n\t\t\t\treturn Infinity; // The segment's length doesn't fit the field's bit width\n\t\t\tresult += 4 + ccbits + seg.getData().length;\n\t\t}\n\t\treturn result;\n\t};\n\n\n\t/*---- Constants for QrSegment ----*/\n\n\tvar QrSegment = {}; // Private object to assign properties to. Not the same object as 'this.QrSegment'.\n\n\t// (Public) Describes precisely all strings that are encodable in numeric mode.\n\t// To test whether a string s is encodable: var ok = NUMERIC_REGEX.test(s);\n\t// A string is encodable iff each character is in the range 0 to 9.\n\tthis.QrSegment.NUMERIC_REGEX = /^[0-9]*$/;\n\n\t// (Public) Describes precisely all strings that are encodable in alphanumeric mode.\n\t// To test whether a string s is encodable: var ok = ALPHANUMERIC_REGEX.test(s);\n\t// A string is encodable iff each character is in the following set: 0 to 9, A to Z\n\t// (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n\tthis.QrSegment.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\\/:-]*$/;\n\n\t// (Private) The set of all legal characters in alphanumeric mode,\n\t// where each character value maps to the index in the string.\n\tQrSegment.ALPHANUMERIC_CHARSET = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:\";\n\n\n\t/*---- Public helper enumeration ----*/\n\n\t/*\n\t * Describes how a segment's data bits are interpreted. Immutable.\n\t */\n\tthis.QrSegment.Mode = { // Constants\n\t\tNUMERIC : new Mode(0x1, [10, 12, 14]),\n\t\tALPHANUMERIC: new Mode(0x2, [ 9, 11, 13]),\n\t\tBYTE : new Mode(0x4, [ 8, 16, 16]),\n\t\tKANJI : new Mode(0x8, [ 8, 10, 12]),\n\t\tECI : new Mode(0x7, [ 0, 0, 0]),\n\t};\n\n\n\t// Private constructor.\n\tfunction Mode(mode, ccbits) {\n\t\t// (Package-private) The mode indicator bits, which is a uint4 value (range 0 to 15).\n\t\tObject.defineProperty(this, \"modeBits\", {value:mode});\n\n\t\t// (Package-private) Returns the bit width of the character count field for a segment in\n\t\t// this mode in a QR Code at the given version number. The result is in the range [0, 16].\n\t\tthis.numCharCountBits = function(ver) {\n\t\t\treturn ccbits[Math.floor((ver + 7) / 17)];\n\t\t};\n\t}\n\n\n\n\t/*---- Private helper functions and classes ----*/\n\n\t// Returns a new array of bytes representing the given string encoded in UTF-8.\n\tfunction toUtf8ByteArray(str) {\n\t\tstr = encodeURI(str);\n\t\tvar result = [];\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tif (str.charAt(i) != \"%\")\n\t\t\t\tresult.push(str.charCodeAt(i));\n\t\t\telse {\n\t\t\t\tresult.push(parseInt(str.substr(i + 1, 2), 16));\n\t\t\t\ti += 2;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\n\n\t/*\n\t * A private helper class that computes the Reed-Solomon error correction codewords for a sequence of\n\t * data codewords at a given degree. Objects are immutable, and the state only depends on the degree.\n\t * This class exists because each data block in a QR Code shares the same the divisor polynomial.\n\t * This constructor creates a Reed-Solomon ECC generator for the given degree. This could be implemented\n\t * as a lookup table over all possible parameter values, instead of as an algorithm.\n\t */\n\tfunction ReedSolomonGenerator(degree) {\n\t\tif (degree < 1 || degree > 255)\n\t\t\tthrow \"Degree out of range\";\n\n\t\t// Coefficients of the divisor polynomial, stored from highest to lowest power, excluding the leading term which\n\t\t// is always 1. For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array {255, 8, 93}.\n\t\tvar coefficients = [];\n\n\t\t// Start with the monomial x^0\n\t\tfor (var i = 0; i < degree - 1; i++)\n\t\t\tcoefficients.push(0);\n\t\tcoefficients.push(1);\n\n\t\t// Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),\n\t\t// drop the highest term, and store the rest of the coefficients in order of descending powers.\n\t\t// Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).\n\t\tvar root = 1;\n\t\tfor (var i = 0; i < degree; i++) {\n\t\t\t// Multiply the current product by (x - r^i)\n\t\t\tfor (var j = 0; j < coefficients.length; j++) {\n\t\t\t\tcoefficients[j] = ReedSolomonGenerator.multiply(coefficients[j], root);\n\t\t\t\tif (j + 1 < coefficients.length)\n\t\t\t\t\tcoefficients[j] ^= coefficients[j + 1];\n\t\t\t}\n\t\t\troot = ReedSolomonGenerator.multiply(root, 0x02);\n\t\t}\n\n\t\t// Computes and returns the Reed-Solomon error correction codewords for the given\n\t\t// sequence of data codewords. The returned object is always a new byte array.\n\t\t// This method does not alter this object's state (because it is immutable).\n\t\tthis.getRemainder = function(data) {\n\t\t\t// Compute the remainder by performing polynomial division\n\t\t\tvar result = coefficients.map(function() { return 0; });\n\t\t\tdata.forEach(function(b) {\n\t\t\t\tvar factor = b ^ result.shift();\n\t\t\t\tresult.push(0);\n\t\t\t\tfor (var i = 0; i < result.length; i++)\n\t\t\t\t\tresult[i] ^= ReedSolomonGenerator.multiply(coefficients[i], factor);\n\t\t\t});\n\t\t\treturn result;\n\t\t};\n\t}\n\n\t// This static function returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and\n\t// result are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.\n\tReedSolomonGenerator.multiply = function(x, y) {\n\t\tif (x >>> 8 != 0 || y >>> 8 != 0)\n\t\t\tthrow \"Byte out of range\";\n\t\t// Russian peasant multiplication\n\t\tvar z = 0;\n\t\tfor (var i = 7; i >= 0; i--) {\n\t\t\tz = (z << 1) ^ ((z >>> 7) * 0x11D);\n\t\t\tz ^= ((y >>> i) & 1) * x;\n\t\t}\n\t\tif (z >>> 8 != 0)\n\t\t\tthrow \"Assertion error\";\n\t\treturn z;\n\t};\n\n\n\n\t/*\n\t * A private helper class that represents an appendable sequence of bits (0s and 1s).\n\t * Mainly used by QrSegment. This constructor creates an empty bit buffer (length 0).\n\t */\n\tfunction BitBuffer() {\n\t\tArray.call(this);\n\n\t\t// Appends the given number of low-order bits of the given value\n\t\t// to this buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.\n\t\tthis.appendBits = function(val, len) {\n\t\t\tif (len < 0 || len > 31 || val >>> len != 0)\n\t\t\t\tthrow \"Value out of range\";\n\t\t\tfor (var i = len - 1; i >= 0; i--) // Append bit by bit\n\t\t\t\tthis.push((val >>> i) & 1);\n\t\t};\n\t}\n\n\tBitBuffer.prototype = Object.create(Array.prototype);\n\tBitBuffer.prototype.constructor = BitBuffer;\n\n};\n\nexport default qrcodegen\n","import qr from '../../utils/qrcode/qrcode';\nimport { Component, h, Prop } from '@stencil/core';\nimport { ErrorCorrectionLevel } from './enums';\n\nconst QRC = qr.QrCode;\n\n@Component({\n tag: 'qr-code',\n})\nexport class QRCode {\n @Prop() url!: string;\n @Prop() level?: ErrorCorrectionLevel = ErrorCorrectionLevel.M;\n @Prop() class?: string = '';\n @Prop() color?: string = 'black';\n\n render() {\n const getEcc = (ecc: string) => {\n ecc = ecc.toUpperCase();\n if (ecc === 'L') return QRC.Ecc.LOW;\n if (ecc === 'M') return QRC.Ecc.MEDIUM;\n if (ecc === 'Q') return QRC.Ecc.QUARTILE;\n return QRC.Ecc.HIGH;\n };\n\n const ecc = getEcc(this.level);\n\n const qr = QRC.encodeText(this.url, ecc);\n const qrcode = qr.svgObject();\n\n return (\n <svg class={this.class} viewBox={`0 0 ${qrcode.size} ${qrcode.size}`}>\n <path d={qrcode.path} fill={this.color} />\n </svg>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,389 @@
1
+ /*
2
+ Stencil Client Platform v4.0.1 | MIT Licensed | https://stenciljs.com
3
+ */
4
+ /**
5
+ * @license
6
+ * Copyright Google Inc. All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ *
11
+ * This file is a port of shadowCSS from webcomponents.js to TypeScript.
12
+ * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
13
+ * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
14
+ */
15
+ const safeSelector = (selector) => {
16
+ const placeholders = [];
17
+ let index = 0;
18
+ // Replaces attribute selectors with placeholders.
19
+ // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
20
+ selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
21
+ const replaceBy = `__ph-${index}__`;
22
+ placeholders.push(keep);
23
+ index++;
24
+ return replaceBy;
25
+ });
26
+ // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
27
+ // WS and "+" would otherwise be interpreted as selector separators.
28
+ const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
29
+ const replaceBy = `__ph-${index}__`;
30
+ placeholders.push(exp);
31
+ index++;
32
+ return pseudo + replaceBy;
33
+ });
34
+ const ss = {
35
+ content,
36
+ placeholders,
37
+ };
38
+ return ss;
39
+ };
40
+ const restoreSafeSelector = (placeholders, content) => {
41
+ return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
42
+ };
43
+ const _polyfillHost = '-shadowcsshost';
44
+ const _polyfillSlotted = '-shadowcssslotted';
45
+ // note: :host-context pre-processed to -shadowcsshostcontext.
46
+ const _polyfillHostContext = '-shadowcsscontext';
47
+ const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
48
+ const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
49
+ const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
50
+ const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
51
+ const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
52
+ const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
53
+ const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
54
+ const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
55
+ const _polyfillHostRe = /-shadowcsshost/gim;
56
+ const _colonHostRe = /:host/gim;
57
+ const _colonSlottedRe = /::slotted/gim;
58
+ const _colonHostContextRe = /:host-context/gim;
59
+ const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
60
+ const stripComments = (input) => {
61
+ return input.replace(_commentRe, '');
62
+ };
63
+ const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
64
+ const extractCommentsWithHash = (input) => {
65
+ return input.match(_commentWithHashRe) || [];
66
+ };
67
+ const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
68
+ const _curlyRe = /([{}])/g;
69
+ const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
70
+ const OPEN_CURLY = '{';
71
+ const CLOSE_CURLY = '}';
72
+ const BLOCK_PLACEHOLDER = '%BLOCK%';
73
+ const processRules = (input, ruleCallback) => {
74
+ const inputWithEscapedBlocks = escapeBlocks(input);
75
+ let nextBlockIndex = 0;
76
+ return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
77
+ const selector = m[2];
78
+ let content = '';
79
+ let suffix = m[4];
80
+ let contentPrefix = '';
81
+ if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
82
+ content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
83
+ suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
84
+ contentPrefix = '{';
85
+ }
86
+ const cssRule = {
87
+ selector,
88
+ content,
89
+ };
90
+ const rule = ruleCallback(cssRule);
91
+ return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
92
+ });
93
+ };
94
+ const escapeBlocks = (input) => {
95
+ const inputParts = input.split(_curlyRe);
96
+ const resultParts = [];
97
+ const escapedBlocks = [];
98
+ let bracketCount = 0;
99
+ let currentBlockParts = [];
100
+ for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
101
+ const part = inputParts[partIndex];
102
+ if (part === CLOSE_CURLY) {
103
+ bracketCount--;
104
+ }
105
+ if (bracketCount > 0) {
106
+ currentBlockParts.push(part);
107
+ }
108
+ else {
109
+ if (currentBlockParts.length > 0) {
110
+ escapedBlocks.push(currentBlockParts.join(''));
111
+ resultParts.push(BLOCK_PLACEHOLDER);
112
+ currentBlockParts = [];
113
+ }
114
+ resultParts.push(part);
115
+ }
116
+ if (part === OPEN_CURLY) {
117
+ bracketCount++;
118
+ }
119
+ }
120
+ if (currentBlockParts.length > 0) {
121
+ escapedBlocks.push(currentBlockParts.join(''));
122
+ resultParts.push(BLOCK_PLACEHOLDER);
123
+ }
124
+ const strEscapedBlocks = {
125
+ escapedString: resultParts.join(''),
126
+ blocks: escapedBlocks,
127
+ };
128
+ return strEscapedBlocks;
129
+ };
130
+ const insertPolyfillHostInCssText = (selector) => {
131
+ selector = selector
132
+ .replace(_colonHostContextRe, _polyfillHostContext)
133
+ .replace(_colonHostRe, _polyfillHost)
134
+ .replace(_colonSlottedRe, _polyfillSlotted);
135
+ return selector;
136
+ };
137
+ const convertColonRule = (cssText, regExp, partReplacer) => {
138
+ // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
139
+ return cssText.replace(regExp, (...m) => {
140
+ if (m[2]) {
141
+ const parts = m[2].split(',');
142
+ const r = [];
143
+ for (let i = 0; i < parts.length; i++) {
144
+ const p = parts[i].trim();
145
+ if (!p)
146
+ break;
147
+ r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
148
+ }
149
+ return r.join(',');
150
+ }
151
+ else {
152
+ return _polyfillHostNoCombinator + m[3];
153
+ }
154
+ });
155
+ };
156
+ const colonHostPartReplacer = (host, part, suffix) => {
157
+ return host + part.replace(_polyfillHost, '') + suffix;
158
+ };
159
+ const convertColonHost = (cssText) => {
160
+ return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
161
+ };
162
+ const colonHostContextPartReplacer = (host, part, suffix) => {
163
+ if (part.indexOf(_polyfillHost) > -1) {
164
+ return colonHostPartReplacer(host, part, suffix);
165
+ }
166
+ else {
167
+ return host + part + suffix + ', ' + part + ' ' + host + suffix;
168
+ }
169
+ };
170
+ const convertColonSlotted = (cssText, slotScopeId) => {
171
+ const slotClass = '.' + slotScopeId + ' > ';
172
+ const selectors = [];
173
+ cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
174
+ if (m[2]) {
175
+ const compound = m[2].trim();
176
+ const suffix = m[3];
177
+ const slottedSelector = slotClass + compound + suffix;
178
+ let prefixSelector = '';
179
+ for (let i = m[4] - 1; i >= 0; i--) {
180
+ const char = m[5][i];
181
+ if (char === '}' || char === ',') {
182
+ break;
183
+ }
184
+ prefixSelector = char + prefixSelector;
185
+ }
186
+ const orgSelector = prefixSelector + slottedSelector;
187
+ const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
188
+ if (orgSelector.trim() !== addedSelector.trim()) {
189
+ const updatedSelector = `${addedSelector}, ${orgSelector}`;
190
+ selectors.push({
191
+ orgSelector,
192
+ updatedSelector,
193
+ });
194
+ }
195
+ return slottedSelector;
196
+ }
197
+ else {
198
+ return _polyfillHostNoCombinator + m[3];
199
+ }
200
+ });
201
+ return {
202
+ selectors,
203
+ cssText,
204
+ };
205
+ };
206
+ const convertColonHostContext = (cssText) => {
207
+ return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
208
+ };
209
+ const convertShadowDOMSelectors = (cssText) => {
210
+ return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
211
+ };
212
+ const makeScopeMatcher = (scopeSelector) => {
213
+ const lre = /\[/g;
214
+ const rre = /\]/g;
215
+ scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
216
+ return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
217
+ };
218
+ const selectorNeedsScoping = (selector, scopeSelector) => {
219
+ const re = makeScopeMatcher(scopeSelector);
220
+ return !re.test(selector);
221
+ };
222
+ const injectScopingSelector = (selector, scopingSelector) => {
223
+ return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
224
+ return before + scopingSelector + colon + after;
225
+ });
226
+ };
227
+ const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
228
+ // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
229
+ _polyfillHostRe.lastIndex = 0;
230
+ if (_polyfillHostRe.test(selector)) {
231
+ const replaceBy = `.${hostSelector}`;
232
+ return selector
233
+ .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
234
+ .replace(_polyfillHostRe, replaceBy + ' ');
235
+ }
236
+ return scopeSelector + ' ' + selector;
237
+ };
238
+ const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
239
+ const isRe = /\[is=([^\]]*)\]/g;
240
+ scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
241
+ const className = '.' + scopeSelector;
242
+ const _scopeSelectorPart = (p) => {
243
+ let scopedP = p.trim();
244
+ if (!scopedP) {
245
+ return '';
246
+ }
247
+ if (p.indexOf(_polyfillHostNoCombinator) > -1) {
248
+ scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
249
+ }
250
+ else {
251
+ // remove :host since it should be unnecessary
252
+ const t = p.replace(_polyfillHostRe, '');
253
+ if (t.length > 0) {
254
+ scopedP = injectScopingSelector(t, className);
255
+ }
256
+ }
257
+ return scopedP;
258
+ };
259
+ const safeContent = safeSelector(selector);
260
+ selector = safeContent.content;
261
+ let scopedSelector = '';
262
+ let startIndex = 0;
263
+ let res;
264
+ const sep = /( |>|\+|~(?!=))\s*/g;
265
+ // If a selector appears before :host it should not be shimmed as it
266
+ // matches on ancestor elements and not on elements in the host's shadow
267
+ // `:host-context(div)` is transformed to
268
+ // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
269
+ // the `div` is not part of the component in the 2nd selectors and should not be scoped.
270
+ // Historically `component-tag:host` was matching the component so we also want to preserve
271
+ // this behavior to avoid breaking legacy apps (it should not match).
272
+ // The behavior should be:
273
+ // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
274
+ // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
275
+ // `:host-context(tag)`)
276
+ const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
277
+ // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
278
+ let shouldScope = !hasHost;
279
+ while ((res = sep.exec(selector)) !== null) {
280
+ const separator = res[1];
281
+ const part = selector.slice(startIndex, res.index).trim();
282
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
283
+ const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
284
+ scopedSelector += `${scopedPart} ${separator} `;
285
+ startIndex = sep.lastIndex;
286
+ }
287
+ const part = selector.substring(startIndex);
288
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
289
+ scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
290
+ // replace the placeholders with their original values
291
+ return restoreSafeSelector(safeContent.placeholders, scopedSelector);
292
+ };
293
+ const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
294
+ return selector
295
+ .split(',')
296
+ .map((shallowPart) => {
297
+ if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
298
+ return shallowPart.trim();
299
+ }
300
+ if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
301
+ return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
302
+ }
303
+ else {
304
+ return shallowPart.trim();
305
+ }
306
+ })
307
+ .join(', ');
308
+ };
309
+ const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
310
+ return processRules(cssText, (rule) => {
311
+ let selector = rule.selector;
312
+ let content = rule.content;
313
+ if (rule.selector[0] !== '@') {
314
+ selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
315
+ }
316
+ else if (rule.selector.startsWith('@media') ||
317
+ rule.selector.startsWith('@supports') ||
318
+ rule.selector.startsWith('@page') ||
319
+ rule.selector.startsWith('@document')) {
320
+ content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
321
+ }
322
+ const cssRule = {
323
+ selector: selector.replace(/\s{2,}/g, ' ').trim(),
324
+ content,
325
+ };
326
+ return cssRule;
327
+ });
328
+ };
329
+ const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
330
+ cssText = insertPolyfillHostInCssText(cssText);
331
+ cssText = convertColonHost(cssText);
332
+ cssText = convertColonHostContext(cssText);
333
+ const slotted = convertColonSlotted(cssText, slotScopeId);
334
+ cssText = slotted.cssText;
335
+ cssText = convertShadowDOMSelectors(cssText);
336
+ if (scopeId) {
337
+ cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
338
+ }
339
+ cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
340
+ cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
341
+ return {
342
+ cssText: cssText.trim(),
343
+ slottedSelectors: slotted.selectors,
344
+ };
345
+ };
346
+ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
347
+ const hostScopeId = scopeId + '-h';
348
+ const slotScopeId = scopeId + '-s';
349
+ const commentsWithHash = extractCommentsWithHash(cssText);
350
+ cssText = stripComments(cssText);
351
+ const orgSelectors = [];
352
+ if (commentOriginalSelector) {
353
+ const processCommentedSelector = (rule) => {
354
+ const placeholder = `/*!@___${orgSelectors.length}___*/`;
355
+ const comment = `/*!@${rule.selector}*/`;
356
+ orgSelectors.push({ placeholder, comment });
357
+ rule.selector = placeholder + rule.selector;
358
+ return rule;
359
+ };
360
+ cssText = processRules(cssText, (rule) => {
361
+ if (rule.selector[0] !== '@') {
362
+ return processCommentedSelector(rule);
363
+ }
364
+ else if (rule.selector.startsWith('@media') ||
365
+ rule.selector.startsWith('@supports') ||
366
+ rule.selector.startsWith('@page') ||
367
+ rule.selector.startsWith('@document')) {
368
+ rule.content = processRules(rule.content, processCommentedSelector);
369
+ return rule;
370
+ }
371
+ return rule;
372
+ });
373
+ }
374
+ const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
375
+ cssText = [scoped.cssText, ...commentsWithHash].join('\n');
376
+ if (commentOriginalSelector) {
377
+ orgSelectors.forEach(({ placeholder, comment }) => {
378
+ cssText = cssText.replace(placeholder, comment);
379
+ });
380
+ }
381
+ scoped.slottedSelectors.forEach((slottedSelector) => {
382
+ cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
383
+ });
384
+ return cssText;
385
+ };
386
+
387
+ export { scopeCss };
388
+
389
+ //# sourceMappingURL=shadow-css-8a6ccf47.js.map