{"version":3,"sources":["jsdelivr-header.js","/npm/@panva/hkdf@1.2.1/dist/web/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,WAAY,oBACnB,SAAS,gBAAgB,GACrB,OAAQ,GACJ,IAAK,SACL,IAAK,SACL,IAAK,SACL,IAAK,OACD,OAAO,EACX,QACI,MAAM,IAAI,UAAU,8BAEhC,CACA,SAAS,oBAAoB,EAAO,GAChC,GAAqB,iBAAV,EACP,OAAO,IAAI,aAAc,OAAO,GACpC,KAAM,aAAiB,YACnB,MAAM,IAAI,UAAU,IAAI,qDAC5B,OAAO,CACX,CACA,SAAS,aAAa,GAClB,MAAM,EAAM,oBAAoB,EAAO,OACvC,IAAK,EAAI,WACL,MAAM,IAAI,UAAU,6CACxB,OAAO,CACX,CACA,SAAS,cAAc,GACnB,MAAM,EAAO,oBAAoB,EAAO,QACxC,GAAI,EAAK,WAAa,KAClB,MAAM,UAAU,gDAEpB,OAAO,CACX,CACA,SAAS,gBAAgB,EAAO,GAC5B,GAAqB,iBAAV,IAAuB,OAAO,UAAU,IAAU,EAAQ,EACjE,MAAM,IAAI,UAAU,uCAGxB,GAAI,EAAQ,KADI,SAAS,EAAO,OAAO,GAAI,KAAO,GAAK,IAEnD,MAAM,IAAI,UAAU,sBAExB,OAAO,CACX,CACA,eAAe,KAAK,EAAQ,EAAK,EAAM,EAAM,GACzC,OAAO,OAAO,gBAAgB,GAAS,aAAa,GAAM,oBAAoB,EAAM,QAAS,cAAc,GAAO,gBAAgB,EAAQ,GAC9I,QACS,KAAM","file":"/npm/@panva/hkdf@1.2.1/dist/web/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@panva/hkdf@1.2.1/dist/web/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","import derive from './runtime/hkdf.js';\nfunction normalizeDigest(digest) {\n    switch (digest) {\n        case 'sha256':\n        case 'sha384':\n        case 'sha512':\n        case 'sha1':\n            return digest;\n        default:\n            throw new TypeError('unsupported \"digest\" value');\n    }\n}\nfunction normalizeUint8Array(input, label) {\n    if (typeof input === 'string')\n        return new TextEncoder().encode(input);\n    if (!(input instanceof Uint8Array))\n        throw new TypeError(`\"${label}\"\" must be an instance of Uint8Array or a string`);\n    return input;\n}\nfunction normalizeIkm(input) {\n    const ikm = normalizeUint8Array(input, 'ikm');\n    if (!ikm.byteLength)\n        throw new TypeError(`\"ikm\" must be at least one byte in length`);\n    return ikm;\n}\nfunction normalizeInfo(input) {\n    const info = normalizeUint8Array(input, 'info');\n    if (info.byteLength > 1024) {\n        throw TypeError('\"info\" must not contain more than 1024 bytes');\n    }\n    return info;\n}\nfunction normalizeKeylen(input, digest) {\n    if (typeof input !== 'number' || !Number.isInteger(input) || input < 1) {\n        throw new TypeError('\"keylen\" must be a positive integer');\n    }\n    const hashlen = parseInt(digest.substr(3), 10) >> 3 || 20;\n    if (input > 255 * hashlen) {\n        throw new TypeError('\"keylen\" too large');\n    }\n    return input;\n}\nasync function hkdf(digest, ikm, salt, info, keylen) {\n    return derive(normalizeDigest(digest), normalizeIkm(ikm), normalizeUint8Array(salt, 'salt'), normalizeInfo(info), normalizeKeylen(keylen, digest));\n}\nexport { hkdf, hkdf as default };\n"]}