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EAAK,MAAM,KACb,EAAS,GAAK,EAAS,GAG3B,OAAO,CACT,GAgCqB,oBAAZ,QAA2B,QAAU,GAAM,GAAa,EAC1C,oBAAZ,SACa,oBAAX,QAA0B,OAAO,UAC1C,OAAO,QAAU,EAIvB,CAtGA,CAsGE","file":"/npm/createpassword@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/createpassword@1.0.0/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","/*\n * create-password By @rv!nd Prajapati\n */\n(function (root) {\n\n  var localName, consonant, letter, password, vowel;\n  letter = /[a-z]$/i;\n  vowel = /[aeiou]$/i;\n  consonant = /[bcdfghjklmnpqrstvwxyz]$/i;\n\n  localName = root.localPasswordGeneratorLibraryName || \"createPassword\",\n\n  password = function (length, easy, pattern, prefix) {\n    var char = \"\", n, i, validChars = [];\n    if (length == null) {\n      length = 10;\n    }\n    if (easy == null) {\n      easy = true;\n    }\n    if (pattern == null) {\n      pattern = /\\w/;\n    }\n    if (prefix == null) {\n      prefix = '';\n    }\n\n    // Non easy passwords will pick characters from a pre-generated\n    // list of characters\n    if (!easy) {\n      for (i = 33; 126 > i; i += 1) {\n        char = String.fromCharCode(i);\n        if (char.match(pattern)) {\n          validChars.push(char);\n        }\n      }\n\n      if (!validChars.length) {\n        throw new Error(\"Could not find characters that match the \" +\n          \"password pattern \" + pattern + \". Patterns must match individual \" +\n          \"characters, not the password as a whole.\");\n      }\n    }\n\n\n    while (prefix.length < length) {\n      if (easy) {\n        if (prefix.match(consonant)) {\n          pattern = vowel;\n        } else {\n          pattern = consonant;\n        }\n        n = rand(33, 126);\n        char = String.fromCharCode(n);\n      } else {\n        char = validChars[rand(0, validChars.length)];\n      }\n\n      if (easy) {\n        char = char.toLowerCase();\n      }\n      if (char.match(pattern)) {\n        prefix = \"\" + prefix + char;\n      }\n    }\n    return prefix;\n  };\n\n\n  function rand(min, max) {\n    var key, value, arr = new Uint8Array(max);\n    getRandomValues(arr);\n    for (key in arr) {\n      if (arr.hasOwnProperty(key)) {\n        value = arr[key];\n        if (value > min && value < max) {\n          return value;\n        }\n      }\n    }\n    return rand(min, max);\n  }\n\n\n  function getRandomValues(buf) {\n    if (root.crypto && root.crypto.getRandomValues) {\n      root.crypto.getRandomValues(buf);\n    } else if (typeof root.msCrypto === \"object\" && typeof root.msCrypto.getRandomValues === 'function') {\n      root.msCrypto.getRandomValues(buf);\n    } else if (module.exports === password && typeof require !== \"undefined\") {\n      var bytes = require(\"crypto\").randomBytes(buf.length);\n      buf.set(bytes);\n    } else {\n      throw new Error(\"No secure random number generator available.\");\n    }\n  }\n\n\n  ((typeof exports !== 'undefined') ? exports : root)[localName] = password;\n  if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      module.exports = password;\n    }\n  }\n\n}(this));\n"]}