1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3655],{74878:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/giftcard",function(){return r(78258)}])},34161:function(e,a){"use strict";a.Z={src:"/_next/static/media/gc.099787d2.png",height:250,width:600,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAMFBMVEX/SXT6X4m0R7naRZS6XsL0SH+jRMbKSaW9b8ztS4jSVqjpS4v/dJHeaarXjMzgdbOUwsULAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIElEQVQImWNgYGBg5GFk5QTR/Hy8zOwM3MxcHCxMTGwABekAgIDQfbAAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},20607:function(e,a){"use strict";a.Z={src:"/_next/static/media/giftcard.cc23bf75.gif",height:1212,width:1709}},64330:function(e,a){"use strict";a.Z={src:"/_next/static/media/navLogo.a3ed02fc.png",height:630,width:1120,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAANlBMVEVMaXGfhMP/jdHRhf+FhP6EhP+EhP6DhP7xfqPde9Pxd7/0eNT/gviFhP9zhf/xcnmHhP6EhP8eEnC1AAAAEnRSTlMAEQyYJS/VQTJeJn27FYEnr+FDkglwAAAACXBIWXMAAAdiAAAHYgE4epnbAAAALElEQVQImR3KSRIAEAwAwUEisfP/zyr63AD4AkzNrLRKzmfP1AsqMoJ7fOW7FQIA10TxDIQAAAAASUVORK5CYII=",blurWidth:8,blurHeight:5}},59212:function(e,a,r){"use strict";r.d(a,{Z:function(){return f}});var s=r(85893),t=r(41664),l=r.n(t),d=r(67294),i=r(81929),n=r.n(i),c=r(11163),o=r(60696),m=r(64330),x=r(25675),u=r.n(x);r(24668);let h=[{href:"/dashboard/",title:"Home"},{href:"/dashboard/transactions",title:"Transactions"},{href:"/dashboard/paylinks",title:"Payment Links"},{href:"/dashboard/paypage",title:"Payment Pages"},{href:"/dashboard/giftcard",title:"Gift Card"},{href:"/dashboard/paysplit",title:"Payment Splitter"}];function f(e){let{children:a}=e,r=(0,c.useRouter)(),[t,i]=(0,d.useState)(!0),[x,f]=(0,d.useState)(!1);return(0,s.jsx)("div",{className:" ",children:(0,s.jsxs)("div",{className:"min-h-screen flex flex-col",children:[(0,s.jsx)("header",{children:(0,s.jsxs)("nav",{className:n().navbar,children:[(0,s.jsx)("div",{className:n().logo,children:(0,s.jsx)(l(),{href:"/",children:(0,s.jsx)(u(),{src:m.Z})})}),(0,s.jsx)("ul",{className:!1===x?n().navmenu:n().navmenu+" "+n().active,children:(0,s.jsx)("li",{className:"".concat(n().navLink),children:(0,s.jsx)(o.NL,{})})}),(0,s.jsxs)("button",{className:"md:hidden cursor-pointer mr-3 ".concat(!1===t?n().hamburger:n().hamburger+" "+n().active),onClick:()=>i(!t),children:[(0,s.jsx)("span",{className:n().bar}),(0,s.jsx)("span",{className:n().bar}),(0,s.jsx)("span",{className:n().bar})]})]})}),(0,s.jsxs)("div",{className:"flex flex-col md:flex-row flex-1",children:[(0,s.jsx)("aside",{className:"".concat(t?"block":"hidden"," scroll-auto z-[2] border-r-[0px] md:border-r-[1px] border-[#dff5ff2e] border-0 md:border-[#4a4f92] bg-[#15151f] bg-[#0c0c1712] backdrop-blur-3xl w-full md:w-72 fixed min-h-screen shadow-md"),children:(0,s.jsx)("nav",{children:(0,s.jsxs)("ul",{className:"px-2 md:pt-[6rem] pt-[4rem]",children:[h.map(e=>{let{href:a,title:t}=e;return(0,s.jsx)("li",{className:"m-2",children:(0,s.jsx)(l(),{legacyBehavior:!0,href:a,children:(0,s.jsx)("a",{className:" flex p-2 mt-5 bg-[#21212d] rounded hover:bg-[#8585ff] hover:text-black hover:duration-200 cursor-pointer ".concat(r.asPath===a&&"bg-[#8585ff] text-white"),children:t})})},t)}),(0,s.jsx)("li",{className:"mt-5 mx-2 md:hidden block w-full",children:(0,s.jsx)("span",{className:"",children:(0,s.jsx)(o.NL,{})})})]})})}),(0,s.jsx)("main",{className:"flex-1 md:ml-[300px] md:mr-16 md:pt-4",children:a})]})]})})}},78258:function(e,a,r){"use strict";r.r(a),r.d(a,{default:function(){return b}});var s=r(85893);r(41664);var t=r(67294),l=r(59212),d=r(24668),i=r(25675),n=r.n(i),c=r(20607),o=r(34161),m=r(67976),x=r(68914),u=r(64823);let h=async(e,a,r,s,t)=>{let l=new Blob([JSON.stringify({Name:e,Amount:a,Note:r,WalletAddress:s,Vaildity:t})],{type:"application/json"}),d=[new File([l],"request.json")];console.log("Uploading data to IPFS with web3.storage....");let i=new u.xk({token:x.bn}),n=await i.put(d,{wrapWithDirectory:!1});return console.log("Stored files with cid:",n),n};var f=r(61744);function b(){let{address:e,isConnected:a}=(0,m.mA)(),r=(0,m.yL)(),{data:i}=(0,m.mx)(),[u,b]=(0,t.useState)(""),[g,p]=(0,t.useState)(""),[y,A]=(0,t.useState)(0),[w,j]=(0,t.useState)(""),[N,v]=(0,t.useState)(""),[k,_]=(0,t.useState)(""),S=(0,m.cq)({address:x.o8.address,abi:x.o8.abi,signerOrProvider:i||r}),C=async()=>{try{console.log("Uploading Data ...");let e=await h(u,y,w,g,N);console.log(e),E("https://ipfs.io/ipfs/".concat(e))}catch(a){console.log(a)}},E=async e=>{try{console.log("Creating gift Card... deploying Contracts");let a=Date.parse(N);console.log(a);let r=f.parseEther(y),s=await S.createGiftCard(g,a,r,e);await s.wait(),console.log(s);let t=s.v;D(t)}catch(l){console.log(l)}},D=async e=>{try{let a=await S.getGcContractAddress(e),r=a.slice(2,18);console.log(r),_(r)}catch(s){console.log(s)}};return(0,s.jsx)(l.Z,{children:(0,s.jsx)("div",{className:"w-[90%] mx-auto pt-20",children:(0,s.jsxs)("div",{className:"flex flex-col justify-start pt-5 pb-10",children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold ml-3 pb-6 text-center",children:"Gift Card"}),(0,s.jsxs)("div",{className:"\n w-full flex justify-between items-start flex-wrap flex-row ",children:[(0,s.jsx)("div",{className:"bg-gray-50 p-4 rounded-md mx-4 my-6 w-6/12",children:(0,s.jsxs)("div",{className:"mt-3 flex flex-col justify-center items-center text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,s.jsx)("h1",{className:"text-xl font-medium leading-6 mr-auto pl-2 text-gray-900 ",children:"Enter Details"}),(0,s.jsxs)("div",{className:"flex flex-row flex-wrap justify-center items-center p-2 text-sm text-gray-500",children:[(0,s.jsxs)("div",{className:"w-full mt-1 flex flex-wrap items-center justify-between ",children:[(0,s.jsx)("label",{className:"py-3",htmlFor:"",children:"Name"}),(0,s.jsx)("input",{type:"text",id:"name",className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-[5px] focus:ring-blue-500 focus:border-blue-500
1w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Receivers name...",required:!0,onChange(e){b(e.target.value)}})]}),(0,s.jsxs)("div",{className:"w-full mt-3 flex flex-wrap items-center justify-between ",children:[(0,s.jsx)("label",{className:"py-3",htmlFor:"",children:"Wallet Address"}),(0,s.jsx)("input",{type:"text",id:"name",className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-[5px] focus:ring-blue-500 focus:border-blue-500 w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 ",placeholder:"Receivers wallet address...",required:!0,onChange(e){p(e.target.value)}})]}),(0,s.jsxs)("div",{className:"w-full mt-3 flex flex-wrap items-start justify-between",children:[(0,s.jsx)("label",{className:"py-3",htmlFor:"",children:"Amount"}),(0,s.jsx)("input",{type:"number",id:"amount",className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-[5px] focus:ring-blue-500 focus:border-blue-500 w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Amount in USD...",required:!0,onChange(e){A(e.target.value)}})]}),(0,s.jsxs)("div",{className:"w-full mt-3 flex flex-wrap items-start justify-between",children:[(0,s.jsx)("label",{htmlFor:"message",className:"py-3",children:"Note"}),(0,s.jsx)("textarea",{id:"message",rows:"5",className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-[5px] focus:ring-blue-500 focus:border-blue-500 w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Special message for receiver...",onChange(e){j(e.target.value)}})]}),(0,s.jsxs)("div",{className:"w-full mt-3 flex flex-wrap items-start justify-between",children:[(0,s.jsx)("label",{htmlFor:"message",className:"py-3",children:"Validity"}),(0,s.jsxs)("div",{className:"relative w-full",children:[(0,s.jsx)("div",{className:"flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none w-full",children:(0,s.jsx)("svg",{className:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"})})}),(0,s.jsx)("input",{"datepicker-format":"mm/dd/yyyy",type:"date",className:"bg-gray-50 w-full border border-gray-300 text-gray-900 sm:text-sm rounded-[5px] focus:ring-blue-500 focus:border-blue-500 block pl-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Select date",onChange(e){v(e.target.value)}})]})]}),(0,s.jsx)("div",{className:"w-full mt-8 flex flex-wrap items-start justify-between",children:(0,s.jsx)("span",{className:"border-t-2 w-full border-gray-300"})}),(0,s.jsx)("div",{className:"w-full mt-4 flex flex-wrap items-start justify-between",children:(0,s.jsx)(d.zx,{className:"w-full",type:"submit",onClick:()=>C(),children:"Submit"})})]})]})}),(0,s.jsxs)("div",{className:"flex hover:scale-[1.01] cursor-pointer transition ease-in-out bg-gray-900 items-center py-4 justify-center flex-col rounded-lg mx-4 my-6 w-5/12",children:[(0,s.jsx)("div",{className:" w-full "}),(0,s.jsxs)("div",{className:"flex flex-col ",children:[(0,s.jsx)(n(),{src:o.Z}),(0,s.jsx)("h2",{className:"text-xl mt-8 font-semibold text-gray-100",children:"gm!!! Kushagra,"}),(0,s.jsx)("span",{className:"text-md mt-2 font-normal text-gray-100",children:(0,s.jsxs)("u",{children:[" ","You've got a ",(0,s.jsx)("span",{className:"font-bold ",children:"SwiftFi"})," ","Gift Card"]})}),(0,s.jsx)("span",{className:"text-lg mt-2 font-semibold italic text-gray-100 max-w-[50ch]",children:"Hey Kushagra, please accept your Diwali Gift card, I wish you and your family a happy one"}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-start items-start w-full mt-4",children:[(0,s.jsx)("div",{className:" max-w-[250px] rounded-sm p-2 border-gray-600 border my-4",children:(0,s.jsx)(n(),{src:c.Z})}),(0,s.jsxs)("div",{className:"max-w-[220px] mx-6 ",children:[(0,s.jsx)("h1",{className:"text-3xl mt-6 font-semibold text-gray-100",children:"$ 5500"}),(0,s.jsxs)("h1",{className:"text-md mt-3 font-semibold text-gray-100",children:["Gifted to:"," ",(0,s.jsxs)("span",{className:"text-xs",children:[" ","0xA25c5bE1324764573dE0a14ABFe0279B4291adfA"]})]}),(0,s.jsxs)("h1",{className:"text-md mt-3 font-semibold text-gray-100",children:["Valid Till: ",(0,s.jsx)("u",{children:"11/11/2022"})]})]})]})]})]})]})]})})})}r(64146)},81929:function(e){e.exports={navbar:"DahboardLayout_navbar__bQhZD",navLink:"DahboardLayout_navLink__z_dMg",logo:"DahboardLayout_logo__KCOZd",hamburger:"DahboardLayout_hamburger__OuiYA",bar:"DahboardLayout_bar__wAvTV",small:"DahboardLayout_small__z7oNI",navmenu:"DahboardLayout_navmenu__Y_sFT",footer:"DahboardLayout_footer__CcRWb",active:"DahboardLayout_active__M96dw"}}},function(e){e.O(0,[6556,4668,3061,8764,4823,8914,9774,2888,179],function(){return e(e.s=74878)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.