`;return l+=e.durationSeconds,i})).join("\n");const g=await(await fetch(new URL("nftowners.json?t="+(new Date).getTime(),import.meta.url))).json(),p=document.getElementById("nftownerstablebody");g.sort(((e,t)=>parseInt(e.token_id)-parseInt(t.token_id))),p.innerHTML=g.map(((e,t)=>`
\n ${e.token_id} | \n ${e.owner_id} | \n | \n
`)).join(""),g.forEach((async(e,t)=>{const n=await async function(e){const t=btoa(JSON.stringify({keys:[`${e}/profile/**`]})),n=await fetch("https://rpc.mainnet.near.org",{method:"post",headers:{"content-type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"dontcare",method:"query",params:{request_type:"call_function",finality:"final",account_id:"social.near",method_name:"get",args_base64:t}})}).then((e=>e.json()));return JSON.parse(n.result.result.map((e=>String.fromCharCode(e))).join(""))}(e.owner_id);n[e.owner_id]&&n[e.owner_id].profile.image.ipfs_cid&&(document.getElementById(e.owner_id+"_profileimage_"+t).src=`https://i.near.social/thumbnail/https://ipfs.near.social/ipfs/${n[e.owner_id].profile.image.ipfs_cid}`)}))}else document.documentElement.innerHTML="This app requires that your browser supports serviceworkers"})();