1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9681],{69681:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var n=r(75038),c=r(76430),a=r(2272),l=r(1433),i=r(46001),o=r.n(i),s=r(88061),d=r(25393),m=r(20142),u=new Map;u.set("bold",function(e){return c.createElement(c.Fragment,null,c.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),c.createElement("circle",{cx:"92",cy:"108",r:"16"}),c.createElement("circle",{cx:"164",cy:"108",r:"16"}),c.createElement("path",{d:"M165.3,169.8a48,48,0,0,0-74.6,0",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))}),u.set("duotone",function(e){return c.createElement(c.Fragment,null,c.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),c.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeMiterlimit:"10",strokeWidth:"16"}),c.createElement("circle",{cx:"92",cy:"108",r:"12"}),c.createElement("circle",{cx:"164",cy:"108",r:"12"}),c.createElement("circle",{cx:"92",cy:"108",r:"12"}),c.createElement("circle",{cx:"164",cy:"108",r:"12"}),c.createElement("path",{d:"M169.6,176a48.1,48.1,0,0,0-83.2,0",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}),u.set("fill",function(){return c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.2,104.2,0,0,0,128,24Zm36,72a12,12,0,1,1-12,12A12,12,0,0,1,164,96ZM92,96a12,12,0,1,1-12,12A12,12,0,0,1,92,96Zm81.6,86.9a7.6,7.6,0,0,1-4,1.1,7.7,7.7,0,0,1-6.9-4,40.1,40.1,0,0,0-69.4,0,8,8,0,1,1-13.8-8,56,56,0,0,1,97,0A8,8,0,0,1,173.6,182.9Z"}))}),u.set("light",function(e){return c.createElement(c.Fragment,null,c.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),c.createElement("circle",{cx:"92",cy:"108",r:"10"}),c.createElement("circle",{cx:"164",cy:"108",r:"10"}),c.createElement("path",{d:"M169.6,176a48.1,48.1,0,0,0-83.2,0",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))}),u.set("thin",function(e){return c.createElement(c.Fragment,null,c.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),c.createElement("circle",{cx:"92",cy:"108",r:"8"}),c.createElement("circle",{cx:"164",cy:"108",r:"8"}),c.createElement("path",{d:"M169.6,176a48.1,48.1,0,0,0-83.2,0",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))}),u.set("regular",function(e){return c.createElement(c.Fragment,null,c.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeMiterlimit:"10",strokeWidth:"16"}),c.createElement("circle",{cx:"92",cy:"108",r:"12"}),c.createElement("circle",{cx:"164",cy:"108",r:"12"}),c.createElement("circle",{cx:"92",cy:"108",r:"12"}),c.createElement("circle",{cx:"164",cy:"108",r:"12"}),c.createElement("path",{d:"M169.6,176a48.1,48.1,0,0,0-83.2,0",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))});var x=function(e,t){return(0,d.$)(e,t,u)},k=(0,c.forwardRef)(function(e,t){return c.createElement(m.A,Object.assign({ref:t},e,{renderPath:x}))});k.displayName="SmileySad";var h=r(72651),p=r(18070),y=r(34530);let g=()=>{let[e,t]=(0,c.useState)({loading:!1}),[r,i]=(0,c.useState)(!1),{c_Session:d}=(0,c.useContext)(a.A),m=async()=>{t(e=>({...e,loading:!0}));try{let e=await (0,h.SV)({url:"/api/stripe/create-customer",body:{supabaseId:d?.id,email:d?.email,name:d?.user_metadata?.name}}),n=await (0,h.SV)({url:"/api/stripe/create-checkout-session",body:{customer:e?.id,isYearly:r,clientReferenceId:(0,h.Ii)()}});if(n?.alreadySubscribed){l.oR.success("You already have Pika Pro on this account"),t(e=>({...e,loading:!1}));return}if(n?.url)try{d&&(0,h.vq)("upgrading_to_pro",{key:d?.email||""}),t(e=>({...e,loading:!1})),window.location.assign(n.url)}catch(e){t(e=>({...e,loading:!1}))}else t(e=>({...e,loading:!1})),l.oR.error(n?.error||"Could not start checkout, please try again or contact support")}catch(e){t(e=>({...e,loading:!1})),l.oR.error("Could not start checkout, please try again")}},u=[{title:"Monthly",subText:(0,p.Q4)("monthly"),active:!1===r,onClick:()=>i(!1)},{title:"Yearly",subText:(0,p.Q4)("annually"),active:!0===r,onClick:()=>i(!0)}];return(0,n.jsxs)("div",{className:"py-10 px-5 max-w-[560px] mx-auto relative",children:[(0,n.jsxs)("div",{className:"",children:[(0,n.jsx)(k,{size:96,className:"rotate-20 absolute top-[-3%] left-[-3%] opacity-[.05]"}),(0,n.jsx)("h2",{className:"text-2xl md:text-4xl dark:text-white font-black mb-5",children:"Oops! Subscription failed!"}),(0,n.jsxs)("div",{className:"text-lg",children:[(0,n.jsx)("p",{className:"mb-4",children:"Either payment for subscription didn't go through or something else went wrong"}),(0,n.jsxs)("p",{className:"mb-4",children:["Don't worry, you can"," ",(0,n.jsx)("strong",{className:"dark:text-white",children:"select the plan and try again"})," ",":)"]})]})]}),(0,n.jsx)("div",{className:"grid grid-cols-2 my-6 gap-x-4",children:u.map(e=>(0,n.jsxs)("div",{className:o()("p-3 border-2 border-pink-400 cursor-pointer rounded-xl duration-200",{"bg-linear-to-br from-red-400 to-pink-600 text-white":e?.active},{"hover:bg-pink-200 dark:text-gray-200 dark:hover:bg-pink-800":!e?.active}),onClick:e.onClick,children:[(0,n.jsx)("div",{className:"w-6 h-6 mb-1 text-pink-100",children:e.active?s.Sr:""}),(0,n.jsx)("div",{className:"text-lg md:text-xl font-semibold",children:e.title}),(0,n.jsx)("span",{children:e.subText})]},e.title))}),(0,n.jsx)(y.$n,{onClick:m,variant:"primary",disabled:e.loading,className:"px-5 py-3 mb-0 md:py-5 text-xl md:text-2xl font-semibold my-10 rounded-xl",children:e?.loading?(0,n.jsx)("div",{className:"w-7 h-7",children:s.Nl}):"Try again â"})]})}}}]);
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.