{"version":3,"file":"geolocation.cjs","names":["getRuntimeKey","getGeolocationFromCloudflare","getGeolocationFromVercel","getGeolocationFromCloudfront"],"sources":["../../src/hono/geolocation.ts"],"sourcesContent":["import type { Context } from 'hono';\nimport { getRuntimeKey } from 'hono/adapter';\nimport {\n  type Geolocation,\n  getGeolocationFromCloudflare,\n  getGeolocationFromCloudfront,\n  getGeolocationFromVercel,\n} from '../utils/geolocation';\n\nexport function geolocation(c: Context): Geolocation {\n  if (getRuntimeKey() === 'workerd') return getGeolocationFromCloudflare(c.req.raw);\n  if (c.req.header('x-vercel-id')) return getGeolocationFromVercel(c.req.raw);\n  return getGeolocationFromCloudfront(c.req.raw);\n}\n"],"mappings":";;;;AASA,SAAgB,YAAY,GAAyB;CACnD,KAAA,GAAIA,aAAAA,cAAAA,CAAc,MAAM,WAAW,OAAOC,0BAAAA,6BAA6B,EAAE,IAAI,GAAG;CAChF,IAAI,EAAE,IAAI,OAAO,aAAa,GAAG,OAAOC,0BAAAA,yBAAyB,EAAE,IAAI,GAAG;CAC1E,OAAOC,0BAAAA,6BAA6B,EAAE,IAAI,GAAG;AAC/C"}