{"version":3,"file":"get-url-cjs.cjs","sourceRoot":"","sources":["../../src/get-url-cjs.cts"],"names":[],"mappings":";;;AAAA,8DAA8D;AAC9D,8BAA8B;AAC9B,yCAAmC;AACnC,uCAAwC;AAExC,MAAM,MAAM,GACV,UAAU,KAAK,IAAA,mBAAO,EAAC,SAAS,EAAE,wBAAwB,CAAC,CAAA;AAEtD,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE;AAClC,8CAA8C;AAC9C,qBAAqB;AACrB,MAAM,CAAC,IAAA,wBAAa,EAAC,IAAA,mBAAO,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;AAHzD,QAAA,MAAM,UAGmD;AACtE,oBAAoB","sourcesContent":["// this has to return the ESM urls, because --loader is always\n// loaded in type=module mode.\nimport { resolve } from 'node:path'\nimport { pathToFileURL } from 'node:url'\n\nconst inDist =\n  __filename === resolve(__dirname, '../commonjs/get-url.js')\n\nexport const getUrl = (f: string) =>\n  // polyfill sometimes confuses v8 coverage API\n  /* c8 ignore start */\n  String(pathToFileURL(resolve(__dirname, inDist ? '../esm' : '', f)))\n/* c8 ignore stop */\n"]}