var H=Object.create;var R=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var u=(o,n)=>()=>(o&&(n=o(o=0)),n);var A=(o,n)=>{for(var t in n)R(o,t,{get:n[t],enumerable:!0})},T=(o,n,t,d)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of V(n))!Y.call(o,c)&&c!==t&&R(o,c,{get:()=>n[c],enumerable:!(d=j(n,c))||d.enumerable});return o};var q=(o,n,t)=>(t=o!=null?H(W(o)):{},T(n||!o||!o.__esModule?R(t,"default",{value:o,enumerable:!0}):t,o)),J=o=>T(R({},"__esModule",{value:!0}),o);var _=(o,n,t)=>new Promise((d,c)=>{var m=s=>{try{r(t.next(s))}catch(p){c(p)}},l=s=>{try{r(t.throw(s))}catch(p){c(p)}},r=s=>s.done?d(s.value):Promise.resolve(s.value).then(m,l);r((t=t.apply(o,n)).next())});var C,X,Q,E,w=u(()=>{C=require("react"),X=require("react/jsx-runtime"),Q=(0,C.createContext)(void 0),E=()=>(0,C.useContext)(Q)});function L(o,n){try{b.default.capture(o,n)}catch(t){}}var b,B=u(()=>{b=q(require("posthog-js"),1)});var S=u(()=>{});var v=u(()=>{S()});var k=u(()=>{});var F=u(()=>{k()});var N=u(()=>{v();F()});var U=u(()=>{B();N()});var $={};A($,{default:()=>ot});var Lt,e,g,z,a,Z,tt,ot,P=u(()=>{Lt=require("react"),e=require("@chakra-ui/react"),g=require("react-icons/bs"),z=require("ics");w();U();a=require("react/jsx-runtime"),Z=o=>{let n=o.getFullYear(),t=o.getMonth()+1,d=o.getDate(),c=o.getHours(),m=o.getMinutes();return[n,t,d,c,m]},tt=({isOpen:o,onClose:n,reminderCollection:t})=>{let{rootRef:d}=E(),c=(l,r,s)=>_(void 0,null,function*(){let p={start:Z(new Date(l*1e3)),duration:{hours:24},title:r,description:s},x=`${r}.ics`,O=yield new Promise((h,G)=>{(0,z.createEvent)(p,(M,K)=>{M&&G(M),h(new File([K],x,{type:"plain/text"}))})}),D=URL.createObjectURL(O),f=document.createElement("a");f.href=D,f.download=x,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(D)}),m=(l,r,s)=>{let p=new Date(l*1e3).toISOString().replace(/-|:|\.\d+/g,""),x=new Date(l*1e3+1*24*60*60*1e3).toISOString().replace(/-|:|\.\d+/g,""),O=encodeURIComponent(r),D=encodeURIComponent(s),f="https://calendar.google.com/calendar/u/0/r/eventedit",h=`dates=${p}/${x}&text=${O}&details=${D}&location=&allday=false`;return`${f}?${h}`};return(0,a.jsxs)(e.Modal,{blockScrollOnMount:!1,isOpen:o,onClose:n,portalProps:{containerRef:d},children:[(0,a.jsx)(e.ModalOverlay,{}),(0,a.jsxs)(e.ModalContent,{children:[(0,a.jsx)(e.ModalHeader,{color:"foreground",fontSize:"md",children:"Add reminder to your calender"}),(0,a.jsx)(e.ModalCloseButton,{}),(0,a.jsxs)(e.ModalBody,{pb:4,children:[(0,a.jsxs)(e.Flex,{justifyContent:"space-between",alignItems:"center",mb:1,children:[(0,a.jsxs)(e.Flex,{alignItems:"center",children:[(0,a.jsx)(e.Icon,{as:g.BsGoogle,h:"4",w:"4",color:"mutedForeground"}),(0,a.jsx)(e.Text,{ml:"2",fontSize:"sm",children:"Google Calender"})]}),(0,a.jsx)(e.Button,{variant:"outline",size:"sm",onClick:()=>{var r,s,p;L("Add To Calendar Clicked",{type:"google"});let l=m((r=t==null?void 0:t.stats)==null?void 0:r.startDate,(s=t==null?void 0:t.profile)==null?void 0:s.name,`Get your hands on ${(p=t==null?void 0:t.profile)==null?void 0:p.name} NFT Collection. Mint powered by Bandit.`);window.open(l)},children:"Add"})]}),(0,a.jsxs)(e.Flex,{justifyContent:"space-between",alignItems:"center",mv:"6",children:[(0,a.jsxs)(e.Flex,{alignItems:"center",children:[(0,a.jsx)(e.Icon,{as:g.BsApple,h:"4",w:"4",color:"mutedForeground"}),(0,a.jsx)(e.Text,{ml:"2",fontSize:"sm",children:"iCalender"})]}),(0,a.jsx)(e.Button,{variant:"outline",size:"sm",onClick:()=>{var l,r,s;L("Add To Calendar Clicked",{type:"apple"}),c((l=t==null?void 0:t.stats)==null?void 0:l.startDate,(r=t==null?void 0:t.profile)==null?void 0:r.name,`Get your hands on ${(s=t==null?void 0:t.profile)==null?void 0:s.name} NFT Collection. Mint powered by Bandit.`).catch(p=>console.log(p))},children:"Add"})]})]})]})]})},ot=tt});var st={};A(st,{default:()=>at});module.exports=J(st);var y=require("react"),I=require("@chakra-ui/react"),i=require("react/jsx-runtime"),et=(0,y.lazy)(()=>Promise.resolve().then(()=>(P(),$))),nt=({collection:o})=>{let{isOpen:n,onOpen:t,onClose:d}=(0,I.useDisclosure)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(I.Button,{fontSize:"sm",fontWeight:500,variant:"outline",size:"sm",onClick:t,children:"Add"}),(0,i.jsx)(y.Suspense,{fallback:null,children:(0,i.jsx)(et,{isOpen:n,onClose:d,reminderCollection:o})})]})},at=nt;
