{"version":3,"sources":["jsdelivr-header.js","/npm/safe-identifier@0.4.2/index.mjs"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,aAAc,gBAGrB,SAAS,SAAS,GAChB,IAAI,EAAO,EACX,IAAK,IAAI,EAAI,EAAG,EAAI,EAAI,SAAU,EAAG,CAEnC,GAAQ,GAAQ,GAAK,EADR,EAAI,WAAW,GAE5B,GAAQ,CACV,CACA,OAAO,CACT,QAEO,SAAS,WAAW,EAAK,GAC1B,IAAQ,GAAO,IAAM,SAAS,GAAK,SAAS,KAChD,MAAM,EAAK,EAAI,OAAO,QAAQ,OAAQ,KACtC,OAAO,SAAS,IAAI,IAAO,SAAS,OAAO,IAAO,MAAM,KAAK,GACzD,IAAM,EACN,CACN,QAEO,SAAS,SAAS,EAAK,GAC5B,GAAI,wBAAwB,KAAK,KAAS,SAAS,IAAI,GACrD,OAAO,EAAM,EAAM,IAAM,EAAM,EAC1B,CACL,MAAM,EAAO,KAAK,UAAU,GAC5B,OAAO,EAAM,EAAM,IAAM,EAAO,IAAM,CACxC,CACF","file":"/npm/safe-identifier@0.4.2/index.mjs","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/safe-identifier@0.4.2/index.mjs\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import reserved from './reserved.js'\n\n// from https://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/\nfunction hashCode(str) {\n  let hash = 0\n  for (let i = 0; i < str.length; ++i) {\n    const char = str.charCodeAt(i)\n    hash = (hash << 5) - hash + char\n    hash |= 0 // Convert to 32bit integer\n  }\n  return hash\n}\n\nexport function identifier(key, unique) {\n  if (unique) key += ' ' + hashCode(key).toString(36)\n  const id = key.trim().replace(/\\W+/g, '_')\n  return reserved.ES3[id] || reserved.ESnext[id] || /^\\d/.test(id)\n    ? '_' + id\n    : id\n}\n\nexport function property(obj, key) {\n  if (/^[A-Z_$][0-9A-Z_$]*$/i.test(key) && !reserved.ES3[key]) {\n    return obj ? obj + '.' + key : key\n  } else {\n    const jkey = JSON.stringify(key)\n    return obj ? obj + '[' + jkey + ']' : jkey\n  }\n}\n"]}