UNPKG

@frak-labs/components

Version:

Frak Wallet components, helping any person to interact with the Frak wallet.

1 lines 3.78 kB
var e,t,r={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.m=r,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>""+(({438:"button-wallet",766:"button-share"})[e]||e)+"."+({18:"dad4b5ac",321:"52f6fc94",438:"19a891ff",766:"0447f6d8"})[e]+".js",n.miniCssF=e=>""+({438:"button-wallet",766:"button-share"})[e]+"."+({438:"390d543a",766:"823884d0"})[e]+".css",n.h=()=>"e1378710c88b55a7",(()=>{n.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})()})(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{if("undefined"!=typeof document){var e=function(e,t,r,o,i){var a=document.createElement("link");return a.rel="stylesheet",a.type="text/css",n.nc&&(a.nonce=n.nc),a.onerror=a.onload=function(r){if(a.onerror=a.onload=null,"load"===r.type)o();else{var n=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=n,l.request=s,a.parentNode&&a.parentNode.removeChild(a),i(l)}},a.href=t,r?r.parentNode.insertBefore(a,r.nextSibling):document.head.appendChild(a),a},t=function(e,t){for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var n=r[o],i=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(i===e||i===t))return n}for(var a=document.getElementsByTagName("style"),o=0;o<a.length;o++){var n=a[o],i=n.getAttribute("data-href");if(i===e||i===t)return n}},r={276:0};n.f.miniCss=function(o,i){if(r[o])i.push(r[o]);else if(0!==r[o]&&({438:1,766:1})[o])i.push(r[o]=new Promise(function(r,i){var a=n.miniCssF(o),s=n.p+a;if(t(a,s))return r();e(o,s,null,r,i)}).then(function(){r[o]=0},function(e){throw delete r[o],e}))}}})(),e={276:0},t=t=>{var r,o,i=t.__webpack_ids__,a=t.__webpack_modules__,s=t.__webpack_runtime__,l=0;for(r in a)n.o(a,r)&&(n.m[r]=a[r]);for(s&&s(n);l<i.length;l++)o=i[l],n.o(e,o)&&e[o]&&e[o][0](),e[i[l]]=0},n.f.j=function(r,o){var i=n.o(e,r)?e[r]:void 0;if(0!==i){if(i)o.push(i[1]);else{var a=import("./"+n.u(r)).then(t,t=>{throw 0!==e[r]&&(e[r]=void 0),t}),a=Promise.race([a,new Promise(t=>{i=e[r]=[t]})]);o.push(i[1]=a)}}};const i={"button-share":()=>Promise.all([n.e("18"),n.e("321"),n.e("766")]).then(n.bind(n,"./src/components/ButtonShare/index.ts")),"button-wallet":()=>Promise.all([n.e("18"),n.e("321"),n.e("438")]).then(n.bind(n,"./src/components/ButtonWallet/index.ts"))},a=new MutationObserver(e=>{for(let{addedNodes:t}of e)for(let e of Array.from(t))e.nodeType===Node.ELEMENT_NODE&&s(e)});async function s(e){let t=e instanceof Element?e.tagName.toLowerCase():"",r=t?.startsWith("frak-"),o=Array.from(e.querySelectorAll(":not(:defined)")).map(e=>e.tagName.toLowerCase()).filter(e=>e.startsWith("frak-"));r&&!customElements.get(t)&&o.push(t);let n=[...new Set(o)];await Promise.allSettled(n.map(e=>l(e)))}async function l(e){if(customElements.get(e))return Promise.resolve();try{let t=e.replace(/^frak-/i,"");if(!(t in i))throw Error(`Component ${e} is not supported.`);await i[t]()}catch(e){console.error(e)}}s(document.body),a.observe(document.documentElement,{subtree:!0,childList:!0});