1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[64],{"2daJ":function(e,t,r){"use strict";r.r(t);var n=r("vJKn"),a=r.n(n),i=r("rg98"),o=r("nKUr"),c=r("YquM"),s=r("kriW"),l=r("bgFo"),d=r("MwRc"),u=r("cpVT"),b=r("7lAM"),p=r("jgSC"),O=function(e){var t=e.paymentMethod;return Object(o.jsx)(l.t,{p:4,borderWidth:"1px",borderStyle:"solid",borderColor:"primary",borderRadius:"md",alignItems:"center",textAlign:"center",children:"Card"===t.__typename&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(l.e,{mr:4,children:Object(o.jsx)(l.P,{src:"/static/payment-icons/".concat(t.brand,".svg"),width:100,alt:t.displayBrand})}),Object(o.jsxs)(l.e,{mr:4,children:[Object(o.jsx)(l.mb,{typoStyle:"xxs",mb:1,children:Object(o.jsx)(s.a,{id:"paymentCard.endingWith",defaultMessage:"Ending with"})}),Object(o.jsx)(l.mb,{typoStyle:"sm",children:t.last4})]}),Object(o.jsxs)(l.e,{children:[Object(o.jsx)(l.mb,{typoStyle:"xxs",mb:1,children:Object(o.jsx)(s.a,{id:"expires",defaultMessage:"Expires"})}),Object(o.jsx)(l.mb,{typoStyle:"sm",color:t.expired?"state.error":void 0,children:t.expiresAt})]})]})})},j=r("xvhg"),f=r("pZLH"),g=r("7++0"),h=r("dDsW"),_=r("/AaD"),E=r("j/2v");function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){Object(u.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=Object(g.e)({confirmRemove:{id:"paymentCard.confirmRemove",defaultMessage:"Remove {brand} ending with {last4}?"}});function x(e){var t=e.paymentMethod,r=Object(h.a)(),n=Object(f.a)(_.b,{update:function(e,t){if(t.data){var r=e.readQuery({query:b.a});null!==r&&void 0!==r&&r.currentUser&&e.writeQuery({query:b.a,data:m(m({},r),{},{currentUser:m(m({},r.currentUser),{},{paymentMethod:null})})})}}}),a=Object(j.a)(n,2),i=a[0],c=a[1],d=c.error,u=c.loading;return Object(o.jsxs)(o.Fragment,{children:[d&&Object(o.jsx)(E.a,{error:d}),"Card"===t.__typename&&Object(o.jsx)(l.X,{variant:"link",loading:u,disabled:!t.removable,responseState:d?"error":"success",onClick:function(){confirm(r.formatMessage(v.confirmRemove,{brand:t.displayBrand,last4:t.last4}))&&i({variables:{paymentMethodId:t.id}})},children:Object(o.jsx)(s.a,{id:"paymentCard.remove",defaultMessage:"Remove card"})})]})}var R=Object(g.e)({noPaymentCardDescription:{id:"paymentCard.noCardDescription",defaultMessage:"You have no card on file. <addlink>Add it now</addlink>, to be able to start trips."},paymentCardUsageDescription:{id:"paymentCard.usageDescription",defaultMessage:"Your payment card is used to charge for trips and to buy and renew subscriptions."},paymentCardExpiredDescription:{id:"paymentCard.paymentCardExpiredDescription",defaultMessage:"A valid card is required to start trips."},receiptsLink:{id:"paymentCard.receiptLink",defaultMessage:"For payment history, see <receiptslink>your receipts</receiptslink>"}});function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){Object(u.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=function(){var e=Object(b.b)(),t=e.currentUser;if(e.loading)return Object(o.jsx)(l.t,{justifyContent:"center",children:Object(o.jsx)(l.Y,{})});var r=null===t||void 0===t?void 0:t.paymentMethod;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)(l.t,{flexDirection:"column",alignItems:"center",children:[r&&Object(o.jsx)(l.e,{mb:"xs",children:Object(o.jsx)(O,{paymentMethod:r})}),Object(o.jsxs)(l.t,{flexDirection:"column",alignItems:"center",mb:"xs",children:[Object(o.jsx)(p.a,{children:function(e){var t=e.onAddPaymentMethodClick,n=e.addOrReplacePaymentMethodUI;return Object(o.jsxs)(o.Fragment,{children:[!r&&Object(o.jsx)(l.mb,{as:"p","data-testid":"StripePaymentMethods__noPaymentCardDescription",children:Object(o.jsx)(s.a,w(w({},R.noPaymentCardDescription),{},{values:{addlink:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Object(o.jsx)(l.c,{onClick:t,children:r})}}}))}),n]})}}),r&&Object(o.jsx)(x,{paymentMethod:r})]}),Object(o.jsx)(l.mb,{as:"p",children:Object(o.jsx)(s.a,w({},R.paymentCardUsageDescription))}),r&&"Card"===r.__typename&&r.expired&&Object(o.jsx)(l.mb,{as:"p",children:Object(o.jsx)(s.a,w({},R.paymentCardExpiredDescription))})]}),Object(o.jsx)(l.mb,{as:"p",children:Object(o.jsx)(s.a,w(w({},R.receiptsLink),{},{values:{receiptslink:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Object(o.jsx)(l.V,{route:"profile.receipts",passHref:!0,children:Object(o.jsx)(l.b,{children:t})})}}}))})]})},N=function(){return Object(d.a)().paymentProvider?Object(o.jsx)(o.Fragment,{children:Object(o.jsxs)(l.e,{"data-testid":"Profile__CreditCards",mb:6,children:[Object(o.jsx)(l.B,{mb:6,textAlign:"center",children:Object(o.jsx)(s.a,{id:"modules.Profile.CreditCards.title",defaultMessage:"Payment card"})}),Object(o.jsx)(C,{})]})}):null},D=r("H8l1"),M=r("n8X0"),I=function(e){var t=e.url,r=e.statusCode;return Object(o.jsx)(c.a,{url:t,statusCode:r,children:function(e){return e.currentUser?Object(o.jsx)(N,{}):null}})};I.getInitialProps=function(){var e=Object(i.a)(a.a.mark((function e(t){var r,n,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apolloClient.query({query:D.e});case 2:return n=e.sent,null!==(r=n.data)&&void 0!==r&&r.profilePage||(i=404,t.res&&(t.res.statusCode=i)),e.abrupt("return",{statusCode:i});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.default=Object(M.a)(I)},"4x56":function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile.credit-cards",function(){return r("2daJ")}])},YquM:function(e,t,r){"use strict";var n=r("nKUr"),a=r("cpVT"),i=r("q1tI"),o=r("hG6G"),c=r("bgFo"),s=r("lGJd"),l=r("vJKn"),d=r.n(l),u=r("rg98"),b=r("z7pX"),p=r("kriW"),O=r("vMbI"),j=r("bGoV"),f=r("bu3G"),g=r("YLly"),h=r("MwRc");function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?_(Object(r),!0).forEach((function(t){Object(a.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=function(e){var t=e.url,r=Object(h.a)(),a=Object(O.b)().logOut,o=Object(i.useMemo)((function(){var e;return[{route:"profile",testId:"",label:f.e.subscription},{route:"profile.personal-info",testId:"",label:f.e["personal-info"]},{route:"profile.trips",testId:"Profile__SectionsNav__Trips",label:f.e.tripHistory},{route:"profile.receipts",testId:"",label:f.e.receipts},{route:"profile.invoices",testId:"Profile__SectionsNav__Invoices",label:f.e.invoices},{route:"profile.credit-cards",testId:"Profile__SectionsNav__CreditCards",label:f.e["credit-cards"]},{route:"profile.wallet",testId:"Profile__SectionsNav__wallet",label:f.e.wallet,visible:Boolean("opt_in"===(null===r||void 0===r?void 0:r.walletEnablement)||"forced"===(null===r||void 0===r?void 0:r.walletEnablement))},{route:"profile.assign-rfid-card",testId:"Profile__SectionsNav__AssignRfidCard",label:f.e["assign-rfid-card"],visible:Boolean(((null===r||void 0===r||null===(e=r.rfidAssignMethod)||void 0===e?void 0:e.length)||0)>0)},{route:"profile.your-data",testId:"Profile__SectionsNav__YourData",label:f.e["your-data"]}]}),[null===r||void 0===r?void 0:r.id]),s=Object(b.a)(o),l=Object(j.d)(t.asPath);return Object(n.jsx)(c.e,{"data-testid":"Profile__FooterNav",bg:"neutral.1",py:7,mt:7,children:Object(n.jsxs)(c.l,{variant:"narrow",textAlign:"center",children:[Object(n.jsx)(c.z,{small:!0,mb:"xs",fontWeight:"normal",children:Object(n.jsx)(p.a,E({},g.n.profile))}),Object(n.jsxs)(c.W,{children:[s.map((function(e){return!1===e.visible?null:Object(n.jsx)(c.U,{mb:"xxs",children:Object(n.jsx)(c.V,{route:e.route,passHref:!0,children:Object(n.jsx)(c.b,{"data-testid":e.testId,textDecoration:"none",typoStyle:"sm",color:l.route.name===e.route?"neutral.4":void 0,children:Object(n.jsx)(p.a,E({},e.label))})})},e.route)})),Object(n.jsx)(c.U,{children:Object(n.jsx)(c.b,{"data-testid":"Profile__FooterNav__LogOut",onClick:Object(u.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a();case 2:j.b.pushRoute("home");case 3:case"end":return e.stop()}}),e)}))),textDecoration:"none",typoStyle:"sm",children:Object(n.jsx)(c.H,{})})})]})]})})},m=r("7lAM"),v=r("+TN3"),x=r("H8l1");function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){Object(a.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.children,r=e.url,a=e.statusCode,i=Object(o.b)(),l=Object(m.b)(),d=l.currentUser,u=l.refetch,b=Object(v.f)(x.e),O=b.data,j=b.loading;return Object(n.jsx)(s.a,{statusCode:a,title:O&&O.profilePage&&O.profilePage.title,url:r,requiresAuth:!0,loading:j||i.loading&&4!==i.networkStatus,contentProps:{py:0,mx:0,mb:0},render:function(){return O&&O.profilePage&&i.data&&i.data.system&&d?Object(n.jsxs)(c.t,{column:!0,minHeight:"80vh",children:[Object(n.jsxs)(c.l,{variant:"narrow","data-testid":"Profile",style:{flex:"1 0 auto"},children:["/profile"!==r.pathname&&Object(n.jsx)(c.t,{column:!0,alignItems:"center",mb:6,children:Object(n.jsx)(c.V,{route:"profile",passHref:!0,children:Object(n.jsxs)(c.b,{textDecoration:"none",typoStyle:"xxs",children:["/ ",Object(n.jsx)(p.a,P({},g.n.profile))]})})}),Object(n.jsx)(c.e,{mb:6,children:t({profilePage:O.profilePage,system:i.data.system,currentUser:d,refetch:u,privacyPolicyPage:i.data&&i.data.settings&&i.data.settings.privacyPageSlug&&i.data.settings.privacyPageSlug.current})})]}),Object(n.jsx)(y,{url:r})]}):null}})}},ZnOs:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r("dcx0"),a=r("zf2e").b?n.useLayoutEffect:n.useEffect},"j/2v":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r("nKUr"),a=r("dhJC"),i=r("cpVT"),o=r("kriW"),c=r("TkGN"),s=r("7++0"),l=Object(s.e)({ERR_GENERIC:{id:"error_generic",defaultMessage:"Something went wrong. Please try again."}
1,ERR_NETWORK_ERROR:{id:"graphQLErrors.ERR_NETWORK_ERROR",defaultMessage:"Ouch, could not contact the other end. Do you have an internet connection?"},ERR_INVALID_PHONE_NUMBER:{id:"graphQLErrors.ERR_INVALID_PHONE_NUMBER",defaultMessage:"Invalid phone number entered."},ERR_UNKNOWN_PHONE_NUMBER:{id:"graphQLErrors.ERR_UNKNOWN_PHONE_NUMBER",defaultMessage:"The number does not exist. Check spelling and try again."},ERR_INVALID_PHONE_VERIFICATION_CODE:{id:"graphQLErrors.ERR_INVALID_PHONE_VERIFICATION_CODE",defaultMessage:"Sorry, the code entered is incorrect."},ERR_IN_USE_PHONE_NUMBER:{id:"graphQLErrors.ERR_IN_USE_PHONE_NUMBER",defaultMessage:"Sorry, the number is already in use."},ERR_VALUE_CODE_EXPIRED:{id:"graphQLErrors.ERR_VALUE_CODE_EXPIRED",defaultMessage:"This code has expired."},ERR_VALUE_CODE_USED:{id:"graphQLErrors.ERR_VALUE_CODE_USED",defaultMessage:"Ouch! This code has already been used."},ERR_VALUE_CODE_NO_LONGER_AVAILABLE:{id:"graphQLErrors.ERR_VALUE_CODE_NO_LONGER_AVAILABLE",defaultMessage:"This voucher code is no longer available."},ERR_VALUE_CODE_ACCOUNT_ALREADY_HAS_SUBSCRIPTION:{id:"graphQLErrors.ERR_VALUE_CODE_ACCOUNT_ALREADY_HAS_SUBSCRIPTION",defaultMessage:"Your account has an active subscription already."},ERR_VALUE_CODE_UNKNOWN:{id:"platform_error_value_code_unknown",defaultMessage:"We could not find this code. Check that the code you entered is correct."},ERR_PAYMENT_DECLINED:{id:"platform_error_purchase_declined",defaultMessage:"Oops! The payment was declined."},ERR_PAYMENT_ERROR:{id:"error_payment_default",defaultMessage:"Oops! Something went wrong with your payment."},ERR_USER_NO_AGREEMENT:{id:"graphQLErrors.ERR_USER_NO_AGREEMENT",defaultMessage:"User has no payment agreement"}});function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=function(e){return Object(n.jsx)(c.a,u({variant:"error","data-testid":"GraphQLErrorMessages__Alert"},e))},p=function(e){var t=e.error,r=Object(a.a)(e,["error"]);return t.graphQLErrors&&t.graphQLErrors.length?Object(n.jsx)(n.Fragment,{children:t.graphQLErrors.map((function(e,t){if(!e)return null;var a=e.code,i=a&&l[a]||l.ERR_GENERIC;return Object(n.jsx)(b,u(u({},r),{},{children:Object(n.jsx)("span",{"data-testid":i.id,children:Object(n.jsx)(o.a,u({},i))})}),t)}))}):t.networkError?Object(n.jsx)(b,u(u({},r),{},{children:Object(n.jsx)("span",{"data-testid":l.ERR_NETWORK_ERROR.id,children:Object(n.jsx)(o.a,u({},l.ERR_NETWORK_ERROR))})})):Object(n.jsx)(b,u(u({},r),{},{children:Object(n.jsx)("span",{"data-testid":l.ERR_GENERIC.id,children:Object(n.jsx)(o.a,u({},l.ERR_GENERIC))})}))}},pZLH:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r("mrSG"),a=r("dcx0"),i=r("g0nf"),o=r("Ee3x"),c=r("v2L8"),s=r("PKC9"),l=r("6OIj"),d=r("ZnOs");function u(e,t){var r=Object(l.a)(null===t||void 0===t?void 0:t.client);Object(c.b)(e,c.a.Mutation);var u=a.useState({called:!1,loading:!1,client:r}),b=u[0],p=u[1],O=a.useRef({result:b,mutationId:0,isMounted:!0,client:r,mutation:e,options:t});Object(d.a)((function(){Object.assign(O.current,{client:r,options:t,mutation:e})}));var j=a.useCallback((function(e){void 0===e&&(e={});var t=O.current,r=t.options,a=t.mutation,c=Object(n.__assign)(Object(n.__assign)({},r),{mutation:a}),l=e.client||O.current.client;O.current.result.loading||c.ignoreResults||!O.current.isMounted||p(O.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:l});var d=++O.current.mutationId,u=Object(i.a)(c,e);return l.mutate(u).then((function(t){var r,n,a=t.data,i=t.errors,c=i&&i.length>0?new s.a({graphQLErrors:i}):void 0,b=e.onError||(null===(r=O.current.options)||void 0===r?void 0:r.onError);if(c&&b&&b(c,u),d===O.current.mutationId&&!u.ignoreResults){var j={called:!0,loading:!1,data:a,error:c,client:l};O.current.isMounted&&!Object(o.b)(O.current.result,j)&&p(O.current.result=j)}var f=e.onCompleted||(null===(n=O.current.options)||void 0===n?void 0:n.onCompleted);return c||null===f||void 0===f||f(t.data,u),t})).catch((function(t){var r;if(d===O.current.mutationId&&O.current.isMounted){var n={loading:!1,error:t,data:void 0,called:!0,client:l};Object(o.b)(O.current.result,n)||p(O.current.result=n)}var a=e.onError||(null===(r=O.current.options)||void 0===r?void 0:r.onError);if(a)return a(t,u),{data:void 0,errors:t};throw t}))}),[]),f=a.useCallback((function(){if(O.current.isMounted){var e={called:!1,loading:!1,client:O.current.client};Object.assign(O.current,{mutationId:0,result:e}),p(e)}}),[]);return a.useEffect((function(){var e=O.current;return e.isMounted=!0,function(){e.isMounted=!1}}),[]),[j,Object(n.__assign)({reset:f},b)]}}},[["4x56",1,2,3,0,4,5,6,7,8,10,31]]]); 2//# sourceMappingURL=profile.credit-cards-8f688bd56f6a88c88491.js.map
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.