{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/jfYvLlR6W7JXvS2N8Hn8/j0zxBtrJLdun27KURYej/Avatar_lambda.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";const IPFS_PREFIX=\"ipfs://\";const IPFS_URL=\"https://api.gateway-proxy.vechain.org/ipfs/\";const LAMBDA=\"https://qql74dfc2h.execute-api.eu-west-1.amazonaws.com/prod/get-xapp-shares-top10-mainnet\";function useLogoFromLambda(positionMinusOne){const[logo,setLogo]=useState(null);useEffect(()=>{async function fetchData(){try{const response=await fetch(LAMBDA);if(!response.ok){throw new Error(`HTTP error! Status: ${response.status}`);}const json=await response.json();console.log(\"Fetched Top10 XApp shares:\",json);const logoUrl=json.data?.details[positionMinusOne]?.logo?.replace(IPFS_PREFIX,IPFS_URL)||\"\";if(logoUrl===\"\"){throw new Error(\"Logo does not seem to exist. Review IPFS metadata.\");}console.log(\"Resolved logo URL:\",logoUrl);setLogo(logoUrl);}catch(err){console.error(\"Error fetching IPFS data:\",err.message);}}fetchData();},[positionMinusOne]);return logo;}export function withFirstApp(Component){return props=>{const positionMinusOne=0;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withSecondApp(Component){return props=>{const positionMinusOne=1;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withThirdApp(Component){return props=>{const positionMinusOne=2;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withFourthApp(Component){return props=>{const positionMinusOne=3;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withFifthApp(Component){return props=>{const positionMinusOne=4;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withSixthApp(Component){return props=>{const positionMinusOne=5;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withSeventhApp(Component){return props=>{const positionMinusOne=6;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withEighthApp(Component){return props=>{const positionMinusOne=7;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withNinthApp(Component){return props=>{const positionMinusOne=8;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}export function withTenthApp(Component){return props=>{const positionMinusOne=9;const logo=useLogoFromLambda(positionMinusOne);if(logo!==null){return /*#__PURE__*/_jsx(Component,{...props,logo:logo});}};}\nexport const __FramerMetadata__ = {\"exports\":{\"withThirdApp\":{\"type\":\"reactHoc\",\"name\":\"withThirdApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFifthApp\":{\"type\":\"reactHoc\",\"name\":\"withFifthApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFourthApp\":{\"type\":\"reactHoc\",\"name\":\"withFourthApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSeventhApp\":{\"type\":\"reactHoc\",\"name\":\"withSeventhApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTenthApp\":{\"type\":\"reactHoc\",\"name\":\"withTenthApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSecondApp\":{\"type\":\"reactHoc\",\"name\":\"withSecondApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSixthApp\":{\"type\":\"reactHoc\",\"name\":\"withSixthApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstApp\":{\"type\":\"reactHoc\",\"name\":\"withFirstApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNinthApp\":{\"type\":\"reactHoc\",\"name\":\"withNinthApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEighthApp\":{\"type\":\"reactHoc\",\"name\":\"withEighthApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Avatar_lambda.map"],
  "mappings": "uDAAiF,IAAMA,EAAY,UAAgBC,EAAS,8CAAoDC,EAAO,4FAA4F,SAASC,EAAkBC,EAAiB,CAAC,GAAK,CAACC,EAAKC,CAAO,EAAEC,EAAS,IAAI,EAAE,OAAAC,EAAU,IAAI,CAAC,eAAeC,GAAW,CAAC,GAAG,CAAC,IAAMC,EAAS,MAAM,MAAMR,CAAM,EAAE,GAAG,CAACQ,EAAS,GAAI,MAAM,IAAI,MAAM,uBAAuBA,EAAS,MAAM,EAAE,EAAG,IAAMC,EAAK,MAAMD,EAAS,KAAK,EAAE,QAAQ,IAAI,6BAA6BC,CAAI,EAAE,IAAMC,EAAQD,EAAK,MAAM,QAAQP,CAAgB,GAAG,MAAM,QAAQJ,EAAYC,CAAQ,GAAG,GAAG,GAAGW,IAAU,GAAI,MAAM,IAAI,MAAM,oDAAoD,EAAG,QAAQ,IAAI,qBAAqBA,CAAO,EAAEN,EAAQM,CAAO,CAAE,OAAOC,EAAI,CAAC,QAAQ,MAAM,4BAA4BA,EAAI,OAAO,CAAE,CAAC,CAACJ,EAAU,CAAE,EAAE,CAACL,CAAgB,CAAC,EAASC,CAAK,CAAQ,SAASS,EAAaC,EAAU,CAAC,OAAOC,GAAO,CAA0B,IAAMX,EAAKF,EAAkB,CAAgB,EAAE,GAAGE,IAAO,KAAM,OAAoBY,EAAKF,EAAU,CAAC,GAAGC,EAAM,KAAKX,CAAI,CAAC,CAAG,CAAE,CAAQ,SAASa,EAAcH,EAAU,CAAC,OAAOC,GAAO,CAA0B,IAAMX,EAAKF,EAAkB,CAAgB,EAAE,GAAGE,IAAO,KAAM,OAAoBY,EAAKF,EAAU,CAAC,G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,OAAoBY,EAAKF,EAAU,CAAC,GAAGC,EAAM,KAAKX,CAAI,CAAC,CAAG,CAAE,CAAQ,SAASqB,EAAaX,EAAU,CAAC,OAAOC,GAAO,CAA0B,IAAMX,EAAKF,EAAkB,CAAgB,EAAE,GAAGE,IAAO,KAAM,OAAoBY,EAAKF,EAAU,CAAC,GAAGC,EAAM,KAAKX,CAAI,CAAC,CAAG,CAAE",
  "names": ["IPFS_PREFIX", "IPFS_URL", "LAMBDA", "useLogoFromLambda", "positionMinusOne", "logo", "setLogo", "ye", "ue", "fetchData", "response", "json", "logoUrl", "err", "withFirstApp", "Component", "props", "p", "withSecondApp", "withThirdApp", "withFourthApp", "withFifthApp", "withSixthApp", "withSeventhApp", "withEighthApp", "withNinthApp", "withTenthApp"]
}
