{"version":3,"sources":["load-uix.ts"],"sourcesContent":["declare global {\n\t// deno-lint-ignore no-var\n\tvar uixLoadingPromise: Promise<typeof import(\"uix\")>;\n\tvar UIX: typeof import(\"uix\") | undefined;\n}\n\nexport const loadUIX = (): Promise<typeof import(\"uix\")> => {\n\tif (globalThis.UIX)\n\t\treturn globalThis.UIX;\n\tif (globalThis.uixLoadingPromise) \n\t\treturn globalThis.uixLoadingPromise;\n\t// deno-lint-ignore no-async-promise-executor\n\tglobalThis.uixLoadingPromise = new Promise<void>(async (resolve, reject) => {\n\t\ttry {\n\t\t\tconsole.debug(\"Loading UIX...\");\n\t\t\tconsole.time(\"uix\");\n\t\t\tconst { UIX } = await import(\"uix\");\n\t\t\tconsole.timeLog(\"uix\", \"UIX loaded.\", UIX);\n\t\t\tresolve(globalThis.UIX ?? UIX);\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Failed to load UIX.\", error);\n\t\t\treject(error);\n\t\t}\n\t});\n\treturn globalThis.uixLoadingPromise;\n};\n"],"names":["loadUIX","globalThis","UIX","uixLoadingPromise","Promise","resolve","reject","console","debug","time","timeLog","error"],"mappings":"AAMA,OAAO,MAAMA,UAAU,IACtB,AAAIC,WAAWC,GAAG,GACVD,WAAWC,GAAG,IAClBD,WAAWE,iBAAiB,IAGhCF,CAAAA,WAAWE,iBAAiB,GAAG,IAAIC,QAAc,OAAOC,SAASC;QAChE,IAAI;YACHC,QAAQC,KAAK,CAAC,mBACdD,QAAQE,IAAI,CAAC;YACb,IAAM,EAAEP,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC;YAC7BK,QAAQG,OAAO,CAAC,OAAO,eAAeR,MACtCG,QAAQJ,WAAWC,GAAG,IAAIA;QAC3B,EAAE,OAAOS,OAAO;YACfJ,QAAQI,KAAK,CAAC,uBAAuBA,QACrCL,OAAOK;QACR;IACD,EAAC,GAbOV,WAAWE,iBAAiB,EAenC","sourceRoot":"/lib/unyt-components-0.0.17/utils/","file":"load-uix.ts"}