{"version":3,"file":"injectSelf.mjs","names":["getCurrentInstance","injectSelf","key","_getCurrentInstance","provides"],"sources":["../../src/utils/injectSelf.ts"],"sourcesContent":["// Utilities\nimport { getCurrentInstance } from '@/utils/getCurrentInstance'\n\n// Types\nimport type { InjectionKey } from 'vue'\n\nexport function injectSelf<T>(key: InjectionKey<T> | string): T | undefined\nexport function injectSelf(key: InjectionKey<any> | string) {\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-ignore\n  const { provides } = getCurrentInstance('injectSelf')\n\n  if (provides && (key as string | symbol) in provides) {\n    // TS doesn't allow symbol as index type\n    return provides[key as string]\n  }\n}\n"],"mappings":"AAAA;AAAA,SACSA,kBAAkB,oCAE3B;AAIA,OAAO,SAASC,UAAUA,CAACC,GAA+B,EAAE;EAC1D;EACA;EACA,IAAAC,mBAAA,GAAqBH,kBAAkB,CAAC,YAAY,CAAC;IAA7CI,QAAQ,GAAAD,mBAAA,CAARC,QAAQ;EAEhB,IAAIA,QAAQ,IAAKF,GAAG,IAAwBE,QAAQ,EAAE;IACpD;IACA,OAAOA,QAAQ,CAACF,GAAG,CAAW;EAChC;AACF"}