You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
74 KiB
1 line
74 KiB
2 years ago
|
{"version":3,"file":"zxcvbn-ts.js","sources":["../src/helper.ts","../src/data/dateSplits.ts","../src/data/const.ts","../src/matcher/date/matching.ts","../../../../node_modules/fastest-levenshtein/index.js","../src/levenshtein.ts","../src/data/l33tTable.ts","../src/data/translationKeys.ts","../src/Options.ts","../src/matcher/dictionary/variants/matching/reverse.ts","../src/matcher/dictionary/variants/matching/l33t.ts","../src/matcher/dictionary/matching.ts","../src/matcher/regex/matching.ts","../src/scoring/utils.ts","../src/matcher/bruteforce/scoring.ts","../src/matcher/date/scoring.ts","../src/matcher/dictionary/variants/scoring/uppercase.ts","../src/matcher/dictionary/variants/scoring/l33t.ts","../src/matcher/dictionary/scoring.ts","../src/matcher/regex/scoring.ts","../src/matcher/repeat/scoring.ts","../src/matcher/sequence/scoring.ts","../src/matcher/spatial/scoring.ts","../src/scoring/estimate.ts","../src/scoring/index.ts","../src/matcher/repeat/matching.ts","../src/matcher/sequence/matching.ts","../src/matcher/spatial/matching.ts","../src/Matching.ts","../src/TimeEstimates.ts","../src/matcher/bruteforce/feedback.ts","../src/matcher/date/feedback.ts","../src/matcher/dictionary/feedback.ts","../src/matcher/regex/feedback.ts","../src/matcher/repeat/feedback.ts","../src/matcher/sequence/feedback.ts","../src/matcher/spatial/feedback.ts","../src/Feedback.ts","../src/debounce.ts","../src/index.ts"],"sourcesContent":[null,null,null,null,"\"use strict\";\nconst peq = new Uint32Array(0x10000);\nconst myers_32 = (a, b) => {\n const n = a.length;\n const m = b.length;\n const lst = 1 << (n - 1);\n let pv = -1;\n let mv = 0;\n let sc = n;\n let i = n;\n while (i--) {\n peq[a.charCodeAt(i)] |= 1 << i;\n }\n for (i = 0; i < m; i++) {\n let eq = peq[b.charCodeAt(i)];\n const xv = eq | mv;\n eq |= ((eq & pv) + pv) ^ pv;\n mv |= ~(eq | pv);\n pv &= eq;\n if (mv & lst) {\n sc++;\n }\n if (pv & lst) {\n sc--;\n }\n mv = (mv << 1) | 1;\n pv = (pv << 1) | ~(xv | mv);\n mv &= xv;\n }\n i = n;\n while (i--) {\n peq[a.charCodeAt(i)] = 0;\n }\n return sc;\n};\n\nconst myers_x = (a, b) => {\n const n = a.length;\n const m = b.length;\n const mhc = [];\n const phc = [];\n const hsize = Math.ceil(n / 32);\n const vsize = Math.ceil(m / 32);\n let score = m;\n for (let i = 0; i < hsize; i++) {\n phc[i] = -1;\n mhc[i] = 0;\n }\n let j = 0;\n for (; j < vsize - 1; j++) {\n let mv = 0;\n let pv = -1;\n const start = j * 32;\n const end = Math.min(32, m) + start;\n for (let k = start; k < end; k++) {\n peq[b.charCodeAt(k)] |= 1 << k;\n }\n score = m;\n for (let i = 0; i < n; i++) {\n const eq = peq[a.charCodeAt(i)];\n const pb = (phc[(i / 32) | 0] >>> i) & 1;\n const mb = (mhc[(i / 32) | 0] >>> i) & 1;\n const xv = eq | mv;\n const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;\n let ph = mv | ~(xh | pv);\n let mh = pv & xh;\n if ((ph >>> 31) ^ pb) {\n phc[(i / 32) | 0] ^= 1 << i;\n }\n if ((mh >>> 31) ^ mb) {\n mhc[(i / 32) | 0] ^= 1 << i;\n }\n ph = (ph << 1) | pb;\n mh = (mh << 1) | mb;\n pv = mh | ~(xv | ph);\n mv = ph & xv;\n }\n for (let k = start; k < end; k++) {\n peq[b.charCodeAt(k)] = 0;\n }\n }\n let mv = 0;\n let pv = -1;\n const start = j * 32;\n const end = Math.min(32, m - start) + start;\n for (let k = start; k < end; k++) {\n peq[b.charCodeAt(k)] |= 1 << k;\n }\n score = m;\n for (let i = 0; i < n; i++) {\n const eq = peq[a.charCodeAt(i)];\n const pb = (phc[(i / 32) | 0] >>> i) & 1;\n const mb = (mhc[(i / 32) | 0] >>> i) & 1;\n const xv = eq | mv;\n const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;\n let ph = mv | ~(xh | pv);\n let mh = pv & xh;\n score += (ph >>> (m - 1)) & 1;\n score -= (mh >>> (m - 1)) & 1;\n if ((ph >>> 31) ^ pb) {\n phc[(i / 32) | 0] ^= 1 << i;\n }\n if ((mh >>> 31) ^ mb) {\n mhc[(i / 32) | 0] ^= 1 << i;\n }\n ph = (ph << 1) | pb;\n
|