{"version":3,"sources":["jsdelivr-header.js","/npm/confusables@1.1.1/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,MAAQ,QAAQ,SAAW,QAAQ,WAAa,QAAQ,UAAY,QAAQ,OAAS,QAAQ,eAAiB,QAAQ,iBAAc,EAC5I,MAAM,aAAe,QAAQ,gBAC7B,OAAO,eAAe,QAAS,aAAc,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,aAAa,UAAY,IACpH,MAAM,OAAS,QAAQ,UACvB,OAAO,eAAe,QAAS,WAAY,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,OAAO,QAAU,IAC1G,OAAO,eAAe,QAAS,QAAS,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,OAAO,KAAO,IAEpG,QAAQ,YAAc,IAAI,IAE1B,QAAQ,eAAiB,IAAI,IAC7B,IAAK,MAAO,EAAM,KAAS,aAAa,WAAW,UAAW,CAC1D,QAAQ,YAAY,IAAI,EAAM,IAAI,IAClC,IAAK,MAAM,KAAQ,EACf,QAAQ,eAAe,IAAI,EAAM,EAEzC,CAKA,SAAS,OAAO,GACZ,IAAI,EAAI,OAAO,UAAU,GACrB,OAAO,EACX,IAAI,EAAS,GACb,IAAK,MAAM,KAAQ,EAAI,OAAO,OAAO,GACjC,GAAU,QAAQ,eAAe,IAAI,IAAS,EAElD,OAAO,CACX,CAMA,SAAS,UAAU,GACf,IAAI,EAAS,GACb,IAAK,MAAM,KAAQ,EAAK,CACpB,MAAM,EAAU,QAAQ,YAAY,IAAI,GACxC,GAAU,EAAU,EAAQ,KAAK,MAAM,KAAK,SAAW,EAAQ,SAAW,CAC9E,CACA,OAAO,CACX,CAZA,QAAQ,OAAS,OAajB,QAAQ,UAAY,UACpB,QAAQ,QAAU","file":"/npm/confusables@1.1.1/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/confusables@1.1.1/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clean = exports.checkLNP = exports.characters = exports.obfuscate = exports.remove = exports.confusablesMap = exports.alphabetMap = void 0;\nconst characters_1 = require(\"./characters\");\nObject.defineProperty(exports, \"characters\", { enumerable: true, get: function () { return characters_1.characters; } });\nconst util_1 = require(\"./util\");\nObject.defineProperty(exports, \"checkLNP\", { enumerable: true, get: function () { return util_1.checkLNP; } });\nObject.defineProperty(exports, \"clean\", { enumerable: true, get: function () { return util_1.clean; } });\n/** The current cache of all the supported alphabet characters  */\nexports.alphabetMap = new Map();\n/** The current cache of all the supported confusable characters */\nexports.confusablesMap = new Map();\nfor (const [base, alts] of characters_1.characters.entries()) {\n    exports.alphabetMap.set(base, [...alts]);\n    for (const char of alts) {\n        exports.confusablesMap.set(char, base);\n    }\n}\n/**\n * Removes confusable unicode characters from a string.\n * @param str The text to remove confusables from.\n */\nfunction remove(str) {\n    if ((0, util_1.checkLNP)(str))\n        return str;\n    let newStr = '';\n    for (const char of (0, util_1.clean)(str)) {\n        newStr += exports.confusablesMap.get(char) || char;\n    }\n    return newStr;\n}\nexports.remove = remove;\n/**\n * Randomly mixes up a string with random confusable characters.\n * @param str The text to obfuscate.\n */\nfunction obfuscate(str) {\n    let newStr = '';\n    for (const char of str) {\n        const charMap = exports.alphabetMap.get(char);\n        newStr += charMap ? charMap[Math.floor(Math.random() * charMap.length)] : char;\n    }\n    return newStr;\n}\nexports.obfuscate = obfuscate;\nexports.default = remove;\n"]}