var E=Object.create;var d=Object.defineProperty,S=Object.defineProperties,N=Object.getOwnPropertyDescriptor,B=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols,_=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var C=(e,t,o)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,h=(e,t)=>{for(var o in t||(t={}))b.call(t,o)&&C(e,o,t[o]);if(x)for(var o of x(t))F.call(t,o)&&C(e,o,t[o]);return e},k=(e,t)=>S(e,B(t));var L=(e,t)=>{for(var o in t)d(e,o,{get:t[o],enumerable:!0})},w=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of R(t))!b.call(e,n)&&n!==o&&d(e,n,{get:()=>t[n],enumerable:!(s=N(t,n))||s.enumerable});return e};var V=(e,t,o)=>(o=e!=null?E(_(e)):{},w(t||!e||!e.__esModule?d(o,"default",{value:e,enumerable:!0}):o,e)),W=e=>w(d({},"__esModule",{value:!0}),e);var p=(e,t,o)=>new Promise((s,n)=>{var c=i=>{try{l(o.next(i))}catch(u){n(u)}},m=i=>{try{l(o.throw(i))}catch(u){n(u)}},l=i=>i.done?s(i.value):Promise.resolve(i.value).then(c,m);l((o=o.apply(e,t)).next())});var K={};L(K,{ConsumerContext:()=>D,ConsumerContextProvider:()=>z});module.exports=W(K);var r=require("react");var P=V(require("axios"),1);var f=require("react"),q=require("react/jsx-runtime"),G=(0,f.createContext)(void 0),g="production";var y=g==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk";var A=e=>p(void 0,null,function*(){try{return(yield P.default.get(`${y}/consumer`,{headers:{"X-API-KEY":e}})).data}catch(t){return{}}});var a=require("react/jsx-runtime"),M=()=>(0,a.jsx)("div",{style:{width:"100%",maxWidth:"1660px",margin:"0 auto",height:"630px",display:"flex",alignItems:"center",justifyContent:"center",background:"transparent"},children:(0,a.jsxs)("svg",{viewBox:"0 0 50 50",width:"50",height:"50",children:[(0,a.jsx)("circle",{cx:"25",cy:"25",r:"20",stroke:"#b1b5c3",strokeWidth:"3",fill:"none"}),(0,a.jsxs)("circle",{cx:"25",cy:"25",r:"10",stroke:"#777e90",strokeWidth:"3",fill:"none",children:[(0,a.jsx)("animate",{attributeName:"r",values:"10;20;10",dur:"1s",repeatCount:"indefinite"}),(0,a.jsx)("animate",{attributeName:"stroke-opacity",values:"1;0;1",dur:"1s",repeatCount:"indefinite"})]})]})}),I=M;var v=require("react/jsx-runtime"),D=(0,r.createContext)(void 0),Y={profile:{name:"",email:"",profileImage:""},type:"BASIC",domain:"",externalCurrencyEnabled:!1,config:{launchpadEnabled:!1,allowedChains:[],allowedMarketPlaces:[],analyticsEnabled:!1,links:{support:"",whitelist:"",submit:""},logKey:"",categoryFilterEnabled:!0,typeFilterEnabled:!0,zoraReferralAddress:""}},z=({accessKey:e,children:t})=>{let[o,s]=(0,r.useState)(Y),[n,c]=(0,r.useState)(!0),m=(0,r.useCallback)(()=>p(void 0,null,function*(){c(!0);let l=yield A(e);s(l),c(!1)}),[e]);return(0,r.useEffect)(()=>{e&&m()},[e]),n?(0,v.jsx)(I,{}):(0,v.jsx)(D.Provider,{value:k(h({},o),{isConsumerLoading:n,accessKey:e}),children:t})};0&&(module.exports={ConsumerContext,ConsumerContextProvider});
