1import{j as e,u as y,r as C,e as p}from"./vendor-react-uJJ-sCZi.js";import{U as f,M as x,e as g,g as j,A as b}from"./painted-dots-D9gMCW4K.js";import{L as v}from"./vendor-logrocket-oGyAbWQ1.js";import{E as k,l as M,u as N,a as H,P as V}from"./vendor-stripe-DUyThZyf.js";import{B as u,C as w}from"./input-group-CHV9rPUN.js";import{H as m}from"./app-Din040zV.js";import{s,N as B,c as S,f as P}from"./form-C0Quu2Pt.js";import"./vendor-forms-cc_8dO4Q.js";import"./vendor-state-f0PB_cmY.js";import"./vendor-maps-DP291Pe7.js";import"./vendor-sanity-c4zigSsd.js";import"./resend-verification-BkoTyEdW.js";import"./app-tWJAkY20.js";import"./address-BF-XPi1r.js";import"./select-BGCaSv_i.js";function E({className:t="",includeBrandText:a=!1,...r}){return e.jsxs("svg",{...r,className:t,viewBox:"0 0 399 121",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M96.0386 39.1813V26.5948C96.0386 24.8711 95.7064 23.2461 95.0511 21.7199C94.3957 20.1758 93.498 18.8471 92.3578 17.707C91.2177 16.5668 89.889 15.6601 88.3448 15.0137C86.8186 14.3583 85.1847 14.0262 83.47 14.0262C81.7553 14.0262 80.1034 14.3583 78.5772 15.0137C77.0331 15.6601 75.7044 16.5668 74.5643 17.707C73.4241 18.8471 72.5264 20.1758 71.871 21.7199C71.2156 23.2461 70.8835 24.8801 70.8835 26.5948V30.8412C79.9508 31.6042 89.063 34.3424 96.0386 39.4417V39.1813ZM70.8835 43.5983V64.3006H58.3418V26.5948C58.3418 23.1204 58.9972 19.8616 60.3169 16.8092C61.6366 13.7568 63.4141 11.0815 65.6854 8.80123C67.9478 6.5299 70.6052 4.73439 73.6575 3.41469C76.7099 2.09498 79.9688 1.43962 83.461 1.43962C86.9533 1.43962 90.1942 2.09498 93.2466 3.41469C96.299 4.73439 98.9743 6.5299 101.255 8.80123C103.526 11.0726 105.321 13.7568 106.641 16.8092C107.961 19.8616 108.616 23.1204 108.616 26.5948C108.616 39.1634 108.679 51.732 108.679 64.3006H95.9578C95.9578 57.7739 93.0491 53.0157 88.668 49.7659C83.9368 46.2556 77.5089 44.2806 70.8745 43.6073L70.8835 43.5983Z"}),e.jsx("path",{d:"M179.892 39.1813V26.5948C179.892 24.8711 180.224 23.2461 180.88 21.7199C181.535 20.1758 182.433 18.8471 183.573 17.707C184.713 16.5668 186.042 15.6601 187.586 15.0137C189.112 14.3583 190.746 14.0262 192.461 14.0262C194.176 14.0262 195.827 14.3583 197.354 15.0137C198.898 15.6601 200.226 16.5668 201.367 17.707C202.507 18.8471 203.405 20.1758 204.06 21.7199C204.715 23.2461 205.047 24.8801 205.047 26.5948V30.8412C195.98 31.6042 186.868 34.3424 179.892 39.4417V39.1813ZM205.038 43.5983V64.3006H217.58V26.5948C217.58 23.1204 216.925 19.8616 215.605 16.8092C214.285 13.7568 212.508 11.0815 210.236 8.80123C207.974 6.5299 205.317 4.73439 202.264 3.41469C199.212 2.09498 195.953 1.43962 192.461 1.43962C188.969 1.43962 185.728 2.09498 182.675 3.41469C179.623 4.73439 176.948 6.5299 174.667 8.80123C172.396 11.0726 170.6 13.7568 169.281 16.8092C167.961 19.8616 167.306 23.1204 167.306 26.5948C167.306 39.1634 167.243 51.732 167.243 64.3006H179.964C179.964 57.7739 182.873 53.0157 187.254 49.7659C191.985 46.2556 198.413 44.2806 205.047 43.6073L205.038 43.5983Z"}),e.jsx("path",{d:"M45.0622 58.5575C43.3564 60.2812 41.3634 61.6278 39.0921 62.6154C36.8028 63.6209 34.3609 64.1146 31.7574 64.1146H0.335938V1.25371H31.7574C34.3609 1.25371 36.8028 1.74747 39.0921 2.73501C41.3634 3.74049 43.3564 5.08713 45.0622 6.79287C46.7859 8.51656 48.1325 10.5006 49.12 12.7809C50.1255 15.0702 50.6193 17.5121 50.6193 20.1156C50.6193 21.2827 50.4577 22.4767 50.1435 23.7066C49.8113 24.9365 49.3624 26.1126 48.7789 27.2527C48.1953 28.3929 47.4951 29.4343 46.6692 30.368C46.1933 30.9246 45.6726 31.4183 45.125 31.8582C52.4956 38.9326 52.2532 51.4383 45.0622 58.5755V58.5575ZM12.9943 13.8403C13.7394 21.0492 20.5983 22.7191 27.3584 24.353C29.5759 24.8916 31.7754 25.4213 33.9031 26.0497C34.0108 26.0138 34.1095 25.969 34.2083 25.9241C34.9714 25.6098 35.6447 25.161 36.2103 24.5954C36.7759 24.0298 37.2158 23.3565 37.539 22.5754C37.8532 21.7944 38.0148 20.9774 38.0148 20.1066C38.0148 19.2358 37.8532 18.4009 37.539 17.6378C37.2068 16.8926 36.7759 16.2193 36.2103 15.6447C35.6447 15.0792 34.9714 14.6303 34.2083 14.3161C33.4632 13.9839 32.6372 13.8403 31.7574 13.8403H12.9943ZM37.3774 43.9061C35.6716 39.4084 30.0607 38.0438 24.3779 36.6702C20.4277 35.7186 16.4507 34.749 12.9045 33.2318V51.5281H31.7574C32.6372 51.5281 33.4632 51.3665 34.2083 51.0523C37.2607 49.7415 38.5624 47.0303 37.3774 43.9061Z"}),e.jsx("path",{d:"M398.221 64.218H355.129V1.3571H398.221V13.9347H367.698V26.5122H388.346V39.0898H367.698V51.6315H398.221V64.218Z"}),e.jsx("path",{d:"M160.11 64.6655H116.102V1.80454H128.679V52.0789H160.11V64.6655Z"}),e.jsx("path",{d:"M276.208 64.191H262.76L238.502 22.8045V64.191H225.934V1.33012H239.382L263.621 42.7436V1.33012H276.208V64.191Z"}),e.jsx("path",{d:"M348.017 39.0704C347.874 39.7527 347.712 40.435 347.514 41.1083C346.733 43.8644 345.656 46.4499 344.256 48.8559C342.846 51.2619 341.158 53.4614 339.165 55.4544C337.172 57.4475 334.991 59.1532 332.594 60.5537C330.188 61.9722 327.611 63.0674 324.828 63.8485C322.063 64.6295 319.172 65.0155 316.192 65.0155C313.211 65.0155 310.338 64.6295 307.573 63.8485C304.817 63.0674 302.232 61.9811 299.826 60.5537C297.42 59.1442 295.22 57.4385 293.227 55.4544C291.234 53.4614 289.528 51.2619 288.11 48.8559C286.7 46.4499 285.614 43.8554 284.833 41.1083C284.052 38.3432 283.666 35.4704 283.666 32.4898C283.666 29.5093 284.052 26.6275 284.833 23.8534C285.614 21.0704 286.7 18.4848 288.11 16.0878C289.528 13.6908 291.234 11.5092 293.227 9.51622C295.22 7.5232 297.42 5.83542 299.826 4.42594C302.232 3.01646 304.826 1.93018 307.573 1.16708C310.338 0.386035 313.211 0 316.192 0C319.172 0 322.054 0.386035 324.828 1.16708C327.611 1.93018 330.188 3.02544 332.594 4.42594C334.991 5.83542 337.172 7.5232 339.165 9.51622C341.158 11.5092 342.846 13.6908 344.256 16.0878C345.665 18.4848 346.742 21.0704 347.514 23.8534C347.712 24.5447 347.883 25.2449 348.026 25.9452H335.09C334.946 25.5322 334.775 25.1103 334.596 24.7063C333.545 22.2644 332.127 20.1457 330.331 18.3501C328.536 16.5546 326.408
115.1362 323.975 14.0678C321.533 13.0175 318.948 12.4968 316.192 12.4968C313.436 12.4968 310.823 13.0175 308.399 14.0678C305.957 15.1272 303.848 16.5546 302.043 18.3501C300.23 20.1457 298.793 22.2733 297.752 24.7063C296.692 27.1482 296.163 29.7337 296.163 32.4898C296.163 35.2459 296.683 37.8135 297.752 40.2285C298.802 42.6345 300.239 44.7442 302.043 46.5577C303.857 48.3801 305.966 49.8075 308.399 50.8669C310.823 51.9173 313.409 52.438 316.192 52.438C318.975 52.438 321.533 51.9173 323.975 50.8669C326.417 49.8075 328.536 48.3801 330.331 46.5577C332.127 44.7442 333.545 42.6345 334.596 40.2285C334.766 39.8514 334.919 39.4654 335.063 39.0793H348.008L348.017 39.0704Z"}),e.jsx("line",{x1:"0.335937",y1:"87.0991",x2:"398.802",y2:"87.0991",stroke:"currentColor",strokeWidth:"3.12931"}),e.jsx("circle",{cx:"192.787",cy:"104.832",r:"16.1681"})]}),a&&e.jsxs("g",{fontFamily:"Moriston, sans-serif",fontWeight:"500",fontSize:"1.5em",fill:"currentColor",children:[e.jsx("text",{x:"0",y:"100%",children:"FROM"}),e.jsx("text",{x:"100%",y:"100%",textAnchor:"end",children:"BYBLACK"})]})]})}const L=M("pk_live_51N99UEEzv16ZUv1vveEyLqcmdGlEt4ygss2tTIZtNWfYXXn6gQwXcr5T7XW6dPshvkykovcGkoGhdNX5dY1PBKPQ00AHfzwA8y"),Z={fonts:[{family:"Moriston",src:'url("https://storage.googleapis.com/byblack-609b5.appspot.com/public/fonts/Moriston/Moriston-Bold.otf")',weight:"700",display:"fallback"},{family:"Moriston",src:'url("https://storage.googleapis.com/byblack-609b5.appspot.com/public/fonts/Moriston/Moriston-Medium.otf")',weight:"500",display:"fallback"},{family:"Moriston",src:'url("https://storage.googleapis.com/byblack-609b5.appspot.com/public/fonts/Moriston/Moriston-Regular.otf")',weight:"400",display:"fallback"}],appearance:{theme:"flat",variables:{borderRadius:"5px",colorBackground:"#f9ece4",colorPrimary:"#480b00",colorText:"#480b00",fontFamily:"Moriston, Verdana, sans-serif",fontLineHeight:"1.15",fontSizeBase:"14px",fontWeightBold:"700",fontWeightMedium:"500",fontWeightNormal:"400",iconColor:"#fd654a"}},loader:"auto"};async function G({params:t,context:a}){const r=j(a),i=t.id||r.getQueryData(S())?._id;if(!i)return p({type:"errored",message:"Unfortunately, no waitlist reservation could be retrieved for the requested id."},400);try{const{clientSecret:o,firstName:c,paymentAmount:d,paymentStatus:l}=await r.fetchQuery({queryKey:["waitlist/reservation/payment-intent",i],queryFn:P});return p({type:l,clientSecret:o,firstName:c,paymentAmount:d})}catch(o){return p({type:"errored",message:o instanceof b?o.message:"Something went wrong!"})}}function J(){const t=y(),a=t.type!=="errored"?t.clientSecret:"",r=t.type!=="errored"?t.firstName:"",i=C.useMemo(()=>({...Z,clientSecret:a}),[a]);return e.jsxs("div",{className:s.completion,children:[e.jsxs("div",{className:s.exposition,children:[e.jsx(E,{className:s.logo,includeBrandText:!0}),e.jsxs("h1",{className:s.headlines,children:[e.jsx(m,{className:s.headline1,headingComponent:"span",children:"Letâs Make it Official."}),e.jsx(m,{className:s.headline2,headingComponent:"span",children:"Join the Waitlist."})]}),t.type==="errored"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:s.disclaimer,children:t.message}),e.jsx(u,{className:s.errored,as:"a",href:"mailto:[email protected]?subject=Balance%20Reservation",primary:!0,children:"Contact Support"})]}):e.jsxs("p",{className:s.disclaimer,children:[r?`${r}, for `:"For ",e.jsxs(f,{className:s.understroke,children:["just $",t.paymentAmount]})," ","you can secure your place on the waitlist! ",e.jsx("br",{}),e.jsx("br",{})," This reservation guarantees access to the tool on the day of its official release."]})]}),t.type!=="errored"&&e.jsx("div",{className:s.payment,children:e.jsx(k,{stripe:L,options:i,children:e.jsx(_,{amount:t.paymentAmount,status:t.type})})})]})}const R=(t,a)=>{switch(a.type){case"initiate":return{...t,status:"processing"};case"fail":return{...t,status:"errored",message:a.error};case"succeed":return{...t,message:void 0,status:"succeeded"};default:return t}};function _({amount:t,status:a}){const r=N(),i=H(),[o,c]=C.useReducer(R,{status:a}),d=C.useCallback(h=>{h.preventDefault(),!(!r||!i)&&(c({type:"initiate"}),r.confirmPayment({elements:i,redirect:"if_required"}).then(n=>{if(n.error)throw n.error;c({type:"succeed"})}).catch(n=>{c({type:"fail",error:n.message??"Something went wrong!"}),n.type!=="validation_error"&&v.captureMessage(n.message??n.type,{extra:{code:n.code??""},tags:{experience:"waitlist-reservation"}})}))},[i,r]);if(o.status==="succeeded")return e.jsxs("div",{className:s.success,children:[e.jsx(w,{}
1),e.jsx("p",{className:s.disclaimer,children:"Thank you for your reservation! Youâre locked in."})]});const l=o.status==="processing";return e.jsxs("form",{onSubmit:d,children:[e.jsxs("fieldset",{className:g({[s.errored]:o.status==="errored"}),disabled:l,children:[e.jsx(B,{title:"Cold feet? No problem.",description:"If you need time to think about it, you'll receive an email with your dedicated reservation link within the hour. Keep in mind that your deposit is fully refundable and ensures you have access to Balance as soon as it is available.",shouldBlock:o.status!="canceled"}),e.jsx(V,{options:{layout:"tabs",paymentMethodOrder:["card","apple_pay","google_pay","cashapp"]}}),e.jsxs(u,{type:"submit",disabled:!r||l,className:s.pay,primary:!0,children:[e.jsx(x,{}),l?"Processingâ¦":`Reserve Your Spot for $${t}`]})]}),e.jsxs("p",{className:s.subtext,children:["ByBlack securely processes payments through Stripe and does not store any of your financial information. ",e.jsx("br",{}),"See our"," ",e.jsx("a",{href:"/privacy",target:"_blank",children:"Privacy Policy"})," ","for more details."]})]})}export{J as default,G as loader};
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.