{"version":3,"sources":["jsdelivr-header.js","/npm/eshost@9.0.0/lib/eshost.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,gBACJ,gBAAe,mBACf,mBAAkB,UAClB,WACE,QAAQ,kBACN,aAAe,QAAQ,oBACvB,eAAC,eAAc,kBAAE,mBAAqB,QAAQ,qBAC9C,mBAAqB,GAAY,kBAAkB,IAAa,EAEtE,QAAQ,YAAc,SAAS,EAAM,GACnC,MAAM,EAAW,mBAAmB,GAC9B,EAAU,YAAY,OAE5B,IACE,MAAM,EAAQ,QAAQ,GAEtB,OADU,IAAI,EAAM,GACX,YACX,CAAE,MAAO,GACP,MAAI,EAAM,QAAQ,QAAQ,uBAAuB,OAAe,EACxD,IAAI,MAAM,cAAc,oDAA2D,eAAe,KAAK,UAEvG,CAEV,CACF,EAEA,QAAQ,eAAiB,eACzB,QAAQ,mBAAqB,mBAE7B,QAAQ,OAAS,CACf,gCACA,sCACA,0BACA,UAAU,GACD,UAAU,IAAI","file":"/npm/eshost@9.0.0/lib/eshost.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/eshost@9.0.0/lib/eshost.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';\n\nconst {\n  getDependencies,\n  hasModuleSpecifier,\n  rawSource\n} = require('./dependencies');\nconst writeSources = require('./write-sources');\nconst {supportedHosts, supportedHostsMap} = require('./supported-hosts');\nconst normalizeHostForVU = hostType => supportedHostsMap[hostType] || hostType;\n\nexports.createAgent = function(type, options) {\n  const hostType = normalizeHostForVU(type);\n  const reqPath = `./agents/${hostType}.js`;\n\n  try {\n    const Agent = require(reqPath);\n    const a = new Agent(options);\n    return a.initialize();\n  } catch (error) {\n    if (error.message.indexOf(`Cannot find module '${reqPath}'`) > -1) {\n      throw new Error(`Agent for '${hostType}' not supported. Supported host type names are '${supportedHosts.join(', ')}'`);\n    } else {\n      throw error;\n    }\n  }\n};\n\nexports.supportedHosts = supportedHosts;\nexports.normalizeHostForVU = normalizeHostForVU;\n\nexports.source = {\n  getDependencies,\n  hasModuleSpecifier,\n  writeSources,\n  getSource(fileName) {\n    return rawSource.get(fileName);\n  }\n};\n"]}