{"version":3,"file":"logger.mjs","sources":["../../../../../../../core/src/utils/logger.ts"],"sourcesContent":["/**\n * A set of tokens to stylize the console.log output\n * First token is the raw text. %c is a placeholder for string formatting\n * Second token starts our stylizing - adding custom color and background\n * Third token resets stylizing to baseline before showing the rest of the content.\n */\nconst STYTCH_BADGE =\n  process.env.NODE_ENV === 'production'\n    ? ['[Stytch]']\n    : ['%c[Stytch]%c', 'background: #19303d; color: #13E5C0; padding: 2px;border-radius: 4px', ''];\n\n// Turn this to true to enable debug logs\n// TODO: Make this an env var\nconst DEBUG = false;\n\n/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * An ultralightweight wrapper around console.log.\n * In the future, the logger might be passed in from the customer,\n * or the level might be configurable.\n */\nexport const logger = {\n  debug: (...args: any[]) => DEBUG && console.log(...STYTCH_BADGE, ...args),\n  log: (...args: any[]) => console.log(...STYTCH_BADGE, ...args),\n  warn: (...args: any[]) => console.warn(...STYTCH_BADGE, ...args),\n  error: (...args: any[]) => console.error(...STYTCH_BADGE, ...args),\n};\n\n/* eslint-enable @typescript-eslint/no-explicit-any */\n/* eslint-enable no-console */\n"],"names":["STYTCH_BADGE","DEBUG","logger","debug","args","log","console","warn","error"],"mappings":"AAAA;;;;;IAMA,MAAMA,YAAAA,GAGA;AAAC,IAAA,cAAA;AAAgB,IAAA,sEAAA;AAAwE,IAAA;AAAG,CAAA;AAElG;AACA;AACA,MAAMC,KAAAA,GAAQ,KAAA;AAEd;;;;UAQaC,MAAAA,GAAS;AACpBC,IAAAA,KAAAA,EAAO,CAAC,GAAGC,IAAAA,GAAgBH,KAAyCG;AACpEC,IAAAA,GAAAA,EAAK,CAAC,GAAGD,IAAAA,GAAgBE,OAAAA,CAAQD,GAAG,IAAIL,YAAAA,EAAAA,GAAiBI,IAAAA,CAAAA;AACzDG,IAAAA,IAAAA,EAAM,CAAC,GAAGH,IAAAA,GAAgBE,OAAAA,CAAQC,IAAI,IAAIP,YAAAA,EAAAA,GAAiBI,IAAAA,CAAAA;AAC3DI,IAAAA,KAAAA,EAAO,CAAC,GAAGJ,IAAAA,GAAgBE,OAAAA,CAAQE,KAAK,IAAIR,YAAAA,EAAAA,GAAiBI,IAAAA;AAC/D,EAAC;;;;"}