PageSourceSearch

https://bikesanjoaquin.org/_next/static/chunks/477-f2e1bf7ecfa7b716.js

js bikesanjoaquin.org collected 2026-10-02 01:07:12 UTC 18,080 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[477],{7380:function(e,t,n){var r=n(7568),o=n(4051),i=n.n(o);t.Z=function(){var e=function(){var e=(0,r.Z)(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(401!==t.status){e.next=5;break}return e.next=3,t.json();case 3:throw e.sent;case 5:if(400!==t.status){e.next=10;break}return e.next=8,t.json();case 8:throw e.sent;case 10:if(!t.ok){e.next=14;break}return e.next=13,t.json();case 13:return e.abrupt("return",e.sent);case 14:return e.next=16,t.json();case 16:throw e.sent;case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t=function(){var t=(0,r.Z)(i().mark((function t(n,r){var o,a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="".concat("https://api-viceroy.dropmobility.com").concat(n),t.next=4,fetch(o,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}});case 4:return a=t.sent,t.next=7,e(a);case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}();return{postViceroySubscriptonDepositAdd:function(e){return t("/viceroy/subscription-deposit/add",e)},postViceroySetupIntentCreate:function(e){return t("/viceroy/setup-intent/create",e)}}}},2742:function(e,t,n){n.d(t,{G:function(){return c}});var r,o=n(4465),i=n(3454),a=null!==(r="pk_live_u63BlEW9hQSWqGhuoIz9Rlpc")?r:"",c=(0,o.J)(a,{stripeAccount:i.env.NEXT_PUBLIC_STRIPE_CONNECTED_ACCOUNT_ID})},2190:function(e,t,n){n.d(t,{n:function(){return r}});var r={"United States (USA)":{code:"+1",countryCode:"US",emoji:"\ud83c\uddfa\ud83c\uddf8"},Canada:{code:"+1",countryCode:"CA",emoji:"\ud83c\udde8\ud83c\udde6"},Australia:{code:"+61",countryCode:"AU",emoji:"\ud83c\udde6\ud83c\uddfa"},Austria:{code:"+43",countryCode:"AT",emoji:"\ud83c\udde6\ud83c\uddf9"},Belarus:{code:"+375",countryCode:"BY",emoji:"\ud83c\udde7\ud83c\uddfe"},Belgium:{code:"+32",countryCode:"BE",emoji:"\ud83c\udde7\ud83c\uddea"},Brazil:{code:"+55",countryCode:"BR",emoji:"\ud83c\udde7\ud83c\uddf7"},China:{code:"+86",countryCode:"CN",emoji:"\ud83c\udde8\ud83c\uddf3"},"Costa Rica":{code:"+506",countryCode:"CR",emoji:"\ud83c\udde8\ud83c\uddf7"},Croatia:{code:"+385",countryCode:"HR",emoji:"\ud83c\udded\ud83c\uddf7"},Cyprus:{code:"+357",countryCode:"CY",emoji:"\ud83c\udde8\ud83c\uddfe"},"Czech Republic":{code:"+420",countryCode:"CZ",emoji:"\ud83c\udde8\ud83c\uddff"},Denmark:{code:"+45",countryCode:"DK",emoji:"\ud83c\udde9\ud83c\uddf0"},"El Salvador":{code:"+503",countryCode:"SV",emoji:"\ud83c\uddf8\ud83c\uddfb"},Finland:{code:"+358",countryCode:"FI",emoji:"\ud83c\uddeb\ud83c\uddee"},France:{code:"+33",countryCode:"FR",emoji:"\ud83c\uddeb\ud83c\uddf7"},Georgia:{code:"+995",countryCode:"GE",emoji:"\ud83c\uddec\ud83c\uddea"},Germany:{code:"+49",countryCode:"DE",emoji:"\ud83c\udde9\ud83c\uddea"},Greece:{code:"+30",countryCode:"GR",emoji:"\ud83c\uddec\ud83c\uddf7"},Guatemala:{code:"+502",countryCode:"GT",emoji:"\ud83c\uddec\ud83c\uddf9"},Honduras:{code:"+504",countryCode:"HN",emoji:"\ud83c\udded\ud83c\uddf3"},"Hong Kong":{code:"+852",countryCode:"HK",emoji:"\ud83c\udded\ud83c\uddf0"},Hungary:{code:"+36",countryCode:"HU",emoji:"\ud83c\udded\ud83c\uddfa"},Iceland:{code:"+354",countryCode:"IS",emoji:"\ud83c\uddee\ud83c\uddf8"},India:{code:"+91",countryCode:"IN",emoji:"\ud83c\uddee\ud83c\uddf3"},Ireland:{code:"+353",countryCode:"IE",emoji:"\ud83c\uddee\ud83c\uddea"},Israel:{code:"+972",countryCode:"IL",emoji:"\ud83c\uddee\ud83c\uddf1"},Italy:{code:"+39",countryCode:"IT",emoji:"\ud83c\uddee\ud83c\uddf9"},Japan:{code:"+81",countryCode:"JP",emoji:"\ud83c\uddef\ud83c\uddf5"},Liechtenstein:{code:"+423",countryCode:"LI",emoji:"\ud83c\uddf1\ud83c\uddee"},Luxembourg:{code:"+352",countryCode:"LU",emoji:"\ud83c\uddf1\ud83c\uddfa"},Macao:{code:"+853",countryCode:"MO",emoji:"\ud83c\uddf2\ud83c\uddf4"},Malaysia:{code:"+60",countryCode:"MY",emoji:"\ud83c\uddf2\ud83c\uddfe"},Mexico:{code:"+52",countryCode:"MX",emoji:"\ud83c\uddf2\ud83c\uddfd"},Moldova:{code:"+373",countryCode:"MD",emoji:"\ud83c\uddf2\ud83c\udde9"},Monaco:{code:"+377",countryCode:"MC",emoji:"\ud83c\uddf2\ud83c\udde8"},Netherlands:{code:"+31",countryCode:"NL",emoji:"\ud83c\uddf3\ud83c\uddf1"},"New Zealand":{code:"+64",countryCode:"NZ",emoji:"\ud83c\uddf3\ud83c\uddff"},Nicaragua:{code:"+505",countryCode:"NI",emoji:"\ud83c\uddf3\ud83c\uddee"},Norway:{code:"+47",countryCode:"NO",emoji:"\ud83c\uddf3\ud83c\uddf4"},Poland:{code:"+48",countryCode:"PL",emoji:"\ud83c\uddf5\ud83c\uddf1"},Portugal:{code:"+351",countryCode:"PT",emoji:"\ud83c\uddf5\ud83c\uddf9"},"Puerto Rico":{code:"+1939",countryCode:"PR",emoji:"\ud83c\uddf5\ud83c\uddf7"},"Republic of South Korea":{code:"+82",countryCode:"KR",emoji:"\ud83c\uddf0\ud83c\uddf7"},Russia:{code:"+7",countryCode:"RU",emoji:"\ud83c\uddf7\ud83c\uddfa"},Singapore:{code:"+65",countryCode:"SG",emoji:"\ud83c\uddf8\ud83c\uddec"},"South Africa":{code:"+27",countryCode:"ZA",emoji:"\ud83c\uddff\ud83c\udde6"},Spain:{code:"+34",countryCode:"ES",emoji:"\ud83c\uddea\ud83c\uddf8"},Sweden:{code:"+46",countryCode:"SE",emoji:"\ud83c\uddf8\ud83c\uddea"},Switzerland:{code:"+41",countryCode:"CH",emoji:"\ud83c\udde8\ud83c\udded"},Taiwan:{code:"+886",countryCode:"TW",emoji:"\ud83c\uddf9\ud83c\uddfc"},Ukraine:{code:"+380",countryCode:"UA",emoji:"\ud83c\uddfa\ud83c\udde6"},"United Kingdom":{code:"+44",countryCode:"GB",emoji:"\ud83c\uddec\ud83c\udde7"}}},1857:function(e,t,n){n.d(t,{x:function(){return r}});var r=function(e){return"$".concat((e/100).toFixed(2))}},3477:function(e,t,n){n.r(t),n.d(t,{default:function(){return P}});var r=n(7568),o=n(4924),i=n(6042),a=n(9396),c=n(4051),s=n.n(c),d=n(5893),u=n(7294),l=n(6710),y=n(9008),p=n.n(y),m=n(6664),h=n(7380),f=n(2742),g=n(5877),j=n(1857),x=n(2190),C=n(7221),b=2500,v=Math.round(0),_=Math.round(b+v),k="[email protected]",S=l.WE,w="white",I=l.lS,Z=l.HD,E="If you have any other questions about the Stockton Equity E-Bike Lending Program, contact us at",M=function(){var e=(0,u.useState)({state:"start",errorMessage:null}),t=e[0],n=e[1],c=(0,u.useState)({first_name:"",last_name:"",email:"",countryCode:"US",phone:"+1",payment_method_id:"",customer_id:"",user_id:""}),y=c[0],f=c[1],M=(0,m.useStripe)(),P=(0,m.useElements)(),D=(0,u.useState)(!1),R=D[0],q=D[1];(0,u.useEffect)((function(){q(window.innerWidth<768);var e=function(){q(window.innerWidth<768)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),(0,u.useEffect)((function(){var e=setTimeout((function(){M||n({state:"error",errorMessage:(0,g.I_)("Unable to initialize payment system. Please refresh the page or try again later.")})}),5e3);return function(){return clearTimeout(e)}}),[M]);var B=function(){return y.first_name.trim()&&y.last_name.trim()&&y.email.trim()&&y.phone.trim()},W=function(){var e=(0,r.Z)(s().mark((function e(t){var r,o,i,a,c,d,u,l,p,f,g,j,x,C,k,S;return s().wrap((function(e){for(;;
1)switch(e.prev=e.next){case 0:if(t.preventDefault(),r=y.phone,o=y.email,i=y.first_name,a=y.last_name,n({state:"processing",errorMessage:null}),M&&P){e.next=9;break}return n({state:"error",errorMessage:"Error with the payment system. Please try again."}),e.abrupt("return");case 9:if(c=P.getElement(m.CardElement)){e.next=13;break}return n({state:"error",errorMessage:"Error with the payment system. Please try again."}),e.abrupt("return");case 13:return e.next=15,M.createPaymentMethod({type:"card",card:c});case 15:if(d=e.sent,u=d.error,l=d.paymentMethod,!u&&l){e.next=21;break}return n({state:"error",errorMessage:(null===u||void 0===u?void 0:u.message)||"Error using the payment method. Please try again."}),e.abrupt("return");case 21:if(!(i.trim().length<1||a.trim().length<1)){e.next=24;break}return n({state:"error",errorMessage:"Missing name"}),e.abrupt("return");case 24:if(!(o.trim().length<1)){e.next=27;break}return n({state:"error",errorMessage:"Missing email"}),e.abrupt("return");case 27:if(!(r.trim().length<1)){e.next=30;break}return n({state:"error",errorMessage:"Missing phone"}),e.abrupt("return");case 30:return p=window.location.href,e.prev=32,e.next=35,(0,h.Z)().postViceroySetupIntentCreate({payment_method_id:l.id,first_name:i,last_name:a,phone:r,email:o,website_url:p,metadata:{}});case 35:f=e.sent,e.next=42;break;case 38:return e.prev=38,e.t0=e.catch(32),n({state:"error",errorMessage:"Error with the payment method. Please try again."}),e.abrupt("return");case 42:if(f){e.next=45;break}return n({state:"error",errorMessage:"Something went wrong. Please try again."}),e.abrupt("return");case 45:return g=f.customer_id,j=f.setup_intent_client_secret,x=f.user_id,e.next=48,M.confirmCardSetup(j);case 48:if(C=e.sent,k=C.error,S=C.setupIntent,!k&&S){e.next=55;break}return n({state:"error",errorMessage:(null===k||void 0===k?void 0:k.message)||"Error confirming setup intent"}),console.log(u),e.abrupt("return");case 55:return e.prev=55,e.next=58,(0,h.Z)().postViceroySubscriptonDepositAdd({user_id:x,customer_id:g,payment_method_id:l.id,first_name:i,last_name:a,email:o,phone:r,system_id:"stockton",total:_,tax:v,pickup_location:"Stockton",subtotal:b});case 58:e.next=64;break;case 60:return e.prev=60,e.t1=e.catch(55),n({state:"error",errorMessage:"Error with the payment method. Please try again."}),e.abrupt("return");case 64:n({state:"success",errorMessage:null});case 65:case"end":return e.stop()}}),e,null,[[32,38],[55,60]])})));return function(t){return e.apply(this,arguments)}}(),N=function(e){var t=e.target,n=t.name,r=t.value.slice(0,30);f((function(e){return(0,a.Z)((0,i.Z)({},e),(0,o.Z)({},n,r))}))},A={justifyContent:R?"flex-start":"space-between",textAlign:R?"left":"right",flex:1,paddingRight:R?0:l.Cy,fontSize:14,marginBottom:R?l.j_:0},T={display:"flex",justifyContent:"space-between",flex:R?1:3,backgroundColor:I,borderRadius:l.j_,paddingRight:l.gX,color:w,height:l.gX+l.Cy,padding:"".concat(R?l.j_:l.gX,"px"),border:"none"},z={display:"flex",flexDirection:R?"column":"row",justifyContent:"space-between",alignItems:R?"stretch":"center",paddingBottom:l.gX,paddingTop:l.gX,borderBottom:"1px solid ".concat(Z)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(p(),{children:[(0,d.jsx)("title",{children:"Bike San Joaquin lending program"}),(0,d.jsx)("meta",{name:"description",content:"A beautiful thing coming soon"})]}),"success"===t.state&&(0,d.jsxs)("div",{style:{display:"grid",placeItems:"center",height:"75vh"},children:[l.Wc,(0,d.jsx)("div",{style:{display:"grid",placeItems:"center",width:"100%",backgroundColor:S,color:w,padding:l.e4,textAlign:"center",borderRadius:l.gX},children:(0,d.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,d.jsx)("span",{style:{fontSize:l.e4,backgroundColor:"#66CDA3",color:w,width:1.5*l.e4,height:1.5*l.e4,padding:0,flexShrink:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:"\u2713"}),l.Wc,(0,d.jsx)("h2",{children:(0,g.I_)("Thank you for your order")}),l.aw,(0,d.jsx)("p",{children:(0,g.I_)("We will send you an email with your order details.")}),l.Wc,(0,d.jsxs)("p",{style:{opacity:.5},children:[(0,g.I_)(E)," ",(0,d.jsx)("a",{href:"mailto:".concat(k),style:{textDecoration:"underline"},children:k})]})]})}),l.Wc]}),"success"!==t.state&&(0,d.jsxs)(d.Fragment,{children:[l.Wc,(0,d.jsx)("div",{children:(0,d.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:(0,d.jsxs)("div",{style:{maxWidth:500,width:"100%",marginLeft:R?l.Cy:0,marginRight:R?l.Cy:0},children:[(0,d.jsx)("h3",{style:{color:w},children:(0,g.I_)("Get the Bike San Joaquin Equity E-Bike Subscription")}),l.Dq,(0,d.jsx)("p",{style:{color:w,fontSize:14},children:(0,g.I_)("You have been approved for a Bike San Joaquin Equity E-Bike Subscription. Process payment of the $25 security deposit below to receive your tuned up and quality checked e-bike within two weeks. This deposit is fully refund
1able should you choose to cancel before receiving bike or once the bike is returned at the end of your subscription. Subscription also requires download of the Bike San Joaquin app, available on Google Play and the Apple App Store.")}),l.Wc,(0,d.jsxs)("form",{style:{backgroundColor:S,padding:R?l.Cy:l.e4,borderRadius:l.gX,color:w,opacity:"processing"===t.state?.5:1,pointerEvents:"processing"===t.state?"none":"auto"},children:[(0,d.jsx)("h4",{children:(0,g.I_)("Billing information")}),l.Dq,(0,d.jsxs)("div",{style:{border:"1px solid ".concat(Z),borderRadius:l.gX,padding:l.gX},children:[(0,d.jsxs)("div",{style:z,children:[(0,d.jsx)("label",{style:A,children:(0,g.I_)("First Name")}),(0,d.jsx)("input",{style:T,type:"text",name:"first_name",value:y.first_name,onChange:N,required:!0})]}),(0,d.jsxs)("div",{style:z,children:[(0,d.jsx)("label",{style:A,children:(0,g.I_)("Last Name")}),(0,d.jsx)("input",{style:T,type:"text",name:"last_name",value:y.last_name,onChange:N,required:!0})]}),(0,d.jsxs)("div",{style:z,children:[(0,d.jsx)("label",{style:A,children:(0,g.I_)("Email")}),(0,d.jsx)("input",{style:T,type:"email",name:"email",value:y.email,onChange:function(e){var t=e.target,n=t.name,r=t.value.replace(/[^a-zA-Z0-9@._-]/g,"").slice(0,30);f((function(e){return(0,a.Z)((0,i.Z)({},e),(0,o.Z)({},n,r))}))},required:!0})]}),(0,d.jsxs)("div",{style:(0,a.Z)((0,i.Z)({},z),{borderBottom:"none"}),children:[(0,d.jsx)("label",{style:A,children:(0,g.I_)("Phone")}),(0,d.jsxs)("div",{style:{display:"flex",flex:3},children:[(0,d.jsx)(C.ZP,{options:Object.values(x.n),onChange:function(e){return f((0,a.Z)((0,i.Z)({},y),{countryCode:(null===e||void 0===e?void 0:e.countryCode)||"",phone:(null===e||void 0===e?void 0:e.code)||""}))},value:Object.values(x.n).find((function(e){return e.countryCode===y.countryCode})),getOptionLabel:function(e){return e.countryCode+" "+e.emoji},getOptionValue:function(e){return e.countryCode},styles:{container:function(e){return(0,a.Z)((0,i.Z)({},e),{boxSizing:"border-box",marginRight:l.j_})},control:function(e){return(0,a.Z)((0,i.Z)({},e),{border:"none",outline:"none",boxShadow:"none",backgroundColor:I,height:l.gX+l.Cy,minHeight:"unset",color:w,fontSize:14,"&:hover":{border:"none"}})},input:function(e){return(0,a.Z)((0,i.Z)({},e),{color:w,margin:0,padding:0,height:l.Cy,fontSize:12})},singleValue:function(e){return(0,a.Z)((0,i.Z)({},e),{color:w})},indicatorSeparator:function(e){return(0,a.Z)((0,i.Z)({},e),{display:"none"})},dropdownIndicator:function(e){return(0,a.Z)((0,i.Z)({},e),{color:Z,padding:"0 ".concat(l.j_,"px 0 0"),"&:hover":{color:w}})},menu:function(e){return(0,a.Z)((0,i.Z)({},e),{outline:"none",backgroundColor:I,color:w,fontSize:12})},valueContainer:function(e){return(0,a.Z)((0,i.Z)({},e),{margin:0})},option:function(e,t){return(0,a.Z)((0,i.Z)({},e),{backgroundColor:t.isSelected?w:"transparent",color:t.isSelected?I:w,"&:hover":{backgroundColor:w,color:S}})}}}),(0,d.jsx)("input",{style:T,type:"tel",name:"phone",value:y.phone,onChange:function(e){var t=e.target,n=t.name,r=t.value.replace(/[^\d]/g,""),c=Object.values(x.n).find((function(e){return e.countryCode===y.countryCode})),s=(null===c||void 0===c?void 0:c.code)||"+1",d=(r.startsWith(s.replace("+",""))?"+"+r:s+r).slice(0,15);f((function(e){return(0,a.Z)((0,i.Z)({},e),(0,o.Z)({},n,d))}))},required:!0})]})]})]}),l.Wc,(0,d.jsx)("h4",{children:(0,g.I_)("Payment information")}),l.Dq,(0,d.jsx)("div",{style:{border:"1px solid ".concat(Z),borderRadius:l.gX,padding:"".concat(l.gX,"px ").concat(l.Cy,"px")},children:(0,d.jsx)(m.CardElement,{onChange:function(){n({state:"start",errorMessage:null})},options:{style:{base:{fontSize:"".concat(14,"px"),color:w,"::placeholder":{color:"inherit"}}}}})}),l.Wc,(0,d.jsx)("h4",{children:(0,g.I_)("Order summary")}),l.Dq,(0,d.jsxs)("div",{style:{fontSize:14},children:[(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",opacity:.5},children:[(0,d.jsx)("div",{children:(0,g.I_)("Subtotal")}),(0,d.jsx)("div",{children:(0,j.x)(b)})]}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",opacity:.5},children:[(0,d.jsx)("div",{children:(0,g.I_)("Tax")}),(0,d.jsx)("div",{children:v>0?(0,j.x)(v):(0,g.I_)("included")})]}),l.y4,(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,d.jsx)("div",{children:(0,g.I_)("Total")}),(0,d.jsx)("div",{children:(0,j.x)(_)})]})]}),l.Dq,l.Wc,(0,d.jsx)("p",{children:(0,g.I_)("Upon bike pickup, you will be charged a $5 subscription fee. Cancel anytime after the initial 30-day rental peri
1od.")}),l.Dq,t.errorMessage&&(0,d.jsx)("p",{style:{color:"#FF4B1F",fontSize:12},children:t.errorMessage}),l.Dq,(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:[(0,d.jsx)("a",{style:{color:w,textDecoration:"underline"},href:"/terms",target:"_blank",rel:"noopener noreferrer",children:(0,g.I_)("Terms of service")}),l.Dq,(0,d.jsx)("button",{className:"payment-button",style:{opacity:B()?1:.5,pointerEvents:B()?"auto":"none"},onClick:function(e){W(e)},children:"processing"===t.state?(0,g.I_)("Processing payment..."):(0,g.I_)("Pay")+" "+(0,j.x)(_)}),(0,d.jsx)("style",{children:"\n                      .payment-button {\n                        color: ".concat(w,";\n                        border-radius: ").concat(l.gX,"px;\n                        background: ").concat("linear-gradient(135deg, #FF4B1F 0%, #FF9068 100%)",";\n                        background-size: 200% 200%;\n                        border: none;\n                        padding: ").concat(l.gX,"px ").concat(l.Cy,"px;\n                        transition: all 0.3s ease-in-out;\n                      }\n                      .payment-button:hover {\n                        background-position: 100% 100%;\n                      }\n                    ")})]})]}),l.Wc,(0,d.jsxs)("p",{style:{color:w},children:[(0,g.I_)(E)," ",(0,d.jsx)("a",{href:"mailto:".concat(k),style:{textDecoration:"underline"},children:k})]}),l.Wc,l.Wc]})})})]}),l.Wc,l.Wc]})};function P(){return(0,d.jsx)(m.Elements,{stripe:f.G,children:(0,d.jsx)(M,{})})}}}]);

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.