PageSourceSearch

https://oslobysykkel.no/_next/static/chunks/pages/profile.pin-code-43bc5761e89e5e4a897e.js

js oslobysykkel.no collected 2026-10-01 12:35:09 UTC 16,539 bytes, 2 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[67],{FBSs:function(e,t,i){"use strict";i.r(t);var n=i("vJKn"),r=i.n(n),o=i("rg98"),a=i("nKUr"),s=i("YquM"),c=i("cpVT"),d=i("xvhg"),l=i("q1tI"),u=i("KYPV"),f=i("7++0"),p=i("dDsW"),b=i("kriW"),m=i("bgFo"),j=i("YLly"),g=i("pZLH"),O=i("7lAM");function h(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function P(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach((function(t){Object(c.a)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updatePinCodeMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pinCode"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePinCode"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pinCode"},value:{kind:"Variable",name:{kind:"Name",value:"pinCode"}}}],directives:[]}]}}],loc:{start:0,end:96,source:{body:"\n  mutation updatePinCodeMutation($pinCode: String!) {\n    updatePinCode(pinCode: $pinCode)\n  }\n",name:"GraphQL request",locationOffset:{line:1,column:1}}}},_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"resetPinCodeMutation"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resetPinCode"},arguments:[],directives:[]}]}}],loc:{start:0,end:56,source:{body:"\n  mutation resetPinCodeMutation {\n    resetPinCode\n  }\n",name:"GraphQL request",locationOffset:{line:1,column:1}}}},y=Object(f.e)({newPinError:{id:"modules.Profile.PinCode.newPinError",defaultMessage:"Please enter a {pinCodeLength} digit code"},confirmResetPin:{id:"modules.Profile.PinCode.confirmResetPin",defaultMessage:"Do you want to remove your pin kode?"}});function C(e,t){switch(t.type){case"IS_EDITING":return{isEditing:!0,updateSuccess:!1,resetSuccess:!1};case"CANCEL_EDITING":return{isEditing:!1,updateSuccess:!1,resetSuccess:!1};case"UPDATE_SUCCESS":return{isEditing:!1,updateSuccess:!0,resetSuccess:!1};case"RESET_SUCCESS":return{isEditing:!1,updateSuccess:!1,resetSuccess:!0};default:throw new Error("Unknown action type")}}var w=function(){var e=Object(p.a)(),t=Object(O.b)(),i=t.currentUser,n=t.refetch,r=Object(l.useReducer)(C,{isEditing:!1,updateSuccess:!1,resetSuccess:!1}),o=r[0],s=r[1],c=Object(g.a)(_,{onCompleted:function(){n(),s({type:"RESET_SUCCESS"})}}),f=Object(d.a)(c,2),h=f[0],w=f[1],S=Object(g.a)(v,{onCompleted:function(){n(),s({type:"UPDATE_SUCCESS"})}}),x=Object(d.a)(S,2),E=x[0],M=x[1],N=o.isEditing,R=o.updateSuccess,k=o.resetSuccess;if(!i)return null;var I=i.havePinCode;return Object(a.jsxs)("div",{"data-testid":"Profile__PinCode",children:[Object(a.jsx)(m.B,{textAlign:"center",children:Object(a.jsx)(b.a,{id:"pin_code",defaultMessage:"PIN code"})}),Object(a.jsxs)(m.e,{mb:6,children:[Object(a.jsx)(m.mb,{as:"p",children:Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.intro1",defaultMessage:"Some bike stations has a display. From these you can unlock a bike by entering your phone number and a four-digit code you create below. Keep in mind that the PIN code is personal."})}),Object(a.jsx)(m.mb,{as:"p",children:Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.intro2",defaultMessage:"To make sure your code is safe, we\u2019ll deactivate your account if we suspect that someone else has been using it."})})]}),R&&Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.updateSuccess",defaultMessage:"Your pin code have been updated!",children:function(e){return Object(a.jsx)(m.a,{"data-testid":"Profile__PinCode__Updated",children:e})}}),k&&Object(a.jsx)(m.a,{"data-testid":"Profile__PinCode__Reset",children:Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.resetSuccess",defaultMessage:"Your pin code have removed!"})}),!N&&Object(a.jsx)(m.t,{justifyContent:"center",children:Object(a.jsxs)(m.i,{children:[Object(a.jsx)(m.g,{shape:"cool",variant:"primary",onClick:function(){s({type:"IS_EDITING"})},children:I?Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.changePin",defaultMessage:"Change pin"}):Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.setPin",defaultMessage:"Set pin"})}),I&&Object(a.jsx)(m.X,{shape:"cool",loading:w.loading,responseState:w.error?"error":"success",onClick:function(){confirm(e.formatMessage(y.confirmResetP
1in))&&h()},children:Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.resetPin",defaultMessage:"Remove pin"})})]})}),N&&Object(a.jsx)(u.d,{validate:function(t){var i={};return t.pinCode&&4===t.pinCode.length||(i.pinCode=e.formatMessage(y.newPinError,{pinCodeLength:4})),i},initialValues:{pinCode:""},onSubmit:function(e){E({variables:{pinCode:e.pinCode}})},children:function(e){var t=e.errors,i=e.touched,n=e.submitCount;return Object(a.jsx)(u.c,{children:Object(a.jsxs)(m.e,{ml:"auto",mr:"auto",style:{maxWidth:"250px"},children:[n>0&&i.pinCode&&t.pinCode&&Object(a.jsx)(m.a,{variant:"error",children:t.pinCode}),Object(a.jsx)(m.T,{htmlFor:"input-pin-code",children:Object(a.jsx)(b.a,{id:"modules.Profile.PinCode.newPinLabel",defaultMessage:"New PIN, {pinCodeLength} digits",values:{pinCodeLength:4}})}),Object(a.jsx)(u.a,{name:"pinCode",render:function(e){var t=e.field;return Object(a.jsx)(m.e,{mb:4,children:Object(a.jsx)(m.Q,P({id:"input-pin-code","data-testid":"Profile__PinCode__Input",type:"tel",autoFocus:!0},t))})}}),Object(a.jsx)(m.t,{justifyContent:"center",children:Object(a.jsx)(m.X,{"data-testid":"Profile__PinCode__SubmitButton",loading:M.loading,responseState:M.error?"error":"success",type:"submit",variant:"primary",shape:"cool",children:Object(a.jsx)(j.l,{})})}),Object(a.jsx)(m.t,{justifyContent:"center",children:Object(a.jsx)(m.g,{variant:"link",onClick:function(){return s({type:"CANCEL_EDITING"})},children:Object(a.jsx)(j.b,{})})})]})})}})]})},S=i("H8l1"),x=i("n8X0"),E=function(e){var t=e.url,i=e.statusCode;return Object(a.jsx)(s.a,{url:t,statusCode:i,children:function(){return Object(a.jsx)(w,{})}})};E.getInitialProps=function(){var e=Object(o.a)(r.a.mark((function e(t){var i,n,o;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apolloClient.query({query:S.e});case 2:return n=e.sent,null!==(i=n.data)&&void 0!==i&&i.profilePage||(o=404,t.res&&(t.res.statusCode=o)),e.abrupt("return",{statusCode:o});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.default=Object(x.a)(E)},YquM:function(e,t,i){"use strict";var n=i("nKUr"),r=i("cpVT"),o=i("q1tI"),a=i("hG6G"),s=i("bgFo"),c=i("lGJd"),d=i("vJKn"),l=i.n(d),u=i("rg98"),f=i("z7pX"),p=i("kriW"),b=i("vMbI"),m=i("bGoV"),j=i("bu3G"),g=i("YLly"),O=i("MwRc");function h(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function P(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach((function(t){Object(r.a)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var v=function(e){var t=e.url,i=Object(O.a)(),r=Object(b.b)().logOut,a=Object(o.useMemo)((function(){var e;return[{route:"profile",testId:"",label:j.e.subscription},{route:"profile.personal-info",testId:"",label:j.e["personal-info"]},{route:"profile.trips",testId:"Profile__SectionsNav__Trips",label:j.e.tripHistory},{route:"profile.receipts",testId:"",label:j.e.receipts},{route:"profile.invoices",testId:"Profile__SectionsNav__Invoices",label:j.e.invoices},{route:"profile.credit-cards",testId:"Profile__SectionsNav__CreditCards",label:j.e["credit-cards"]},{route:"profile.wallet",testId:"Profile__SectionsNav__wallet",label:j.e.wallet,visible:Boolean("opt_in"===(null===i||void 0===i?void 0:i.walletEnablement)||"forced"===(null===i||void 0===i?void 0:i.walletEnablement))},{route:"profile.assign-rfid-card",testId:"Profile__SectionsNav__AssignRfidCard",label:j.e["assign-rfid-card"],visible:Boolean(((null===i||void 0===i||null===(e=i.rfidAssignMethod)||void 0===e?void 0:e.length)||0)>0)},{route:"profile.your-data",testId:"Profile__SectionsNav__YourData",label:j.e["your-data"]}]}),[null===i||void 0===i?void 0:i.id]),c=Object(f.a)(a),d=Object(m.d)(t.asPath);return Object(n.jsx)(s.e,{"data-testid":"Profile__FooterNav",bg:"neutral.1",py:7,mt:7,children:Object(n.jsxs)(s.l,{variant:"narrow",textAlign:"center",children:[Object(n.jsx)(s.z,{small:!0,mb:"xs",fontWeight:"normal",children:Object(n.jsx)(p.a,P({},g.n.profile))}),Object(n.jsxs)(s.W,{children:[c.map((function(e){return!1===e.visible?null:Object(n.jsx)(s.U,{mb:"xxs",children:Object(n.jsx)(s.V,{route:e.route,passHref:!0,children:Object(n.jsx)(s.b,{"data-testid":e.testId,textDecoration:"none",typoStyle:"sm",color:d.route.name===e.route?"neutral.4":void 0,children:Object(n.jsx)(p.a,P({},e.label))})})},e.route)})),Object(n.jsx)(s.U,{children:Object(n.jsx)(s.b,{"data-testid":"Profile__FooterNav__LogOut",onClick:Object(u.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:m.b.pushRoute("home");case 3:case"end":return e.stop()}}),e)}))),textDecoration:"none",typoStyle:"sm",children:Object(n.jsx)(s.H,{})})})]})]})})},_=i("7lAM"),y=i("+TN3"),C=i("H8l1");function w(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?w(Object(i),!0).forEach((function(t){Object(r.a)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}t.a=function(e){var t=e.children,i=e.url,r=e.statusCode,o=Object(a.b)(),d=Object(_.b)(),l=d.currentUser,u=d.refetch,f=Object(y.f)(C.e),b=f.data,m=f.loading;return Object(n.jsx)(c.a,{statusCode:r,title:b&&b.profilePage&&b.profilePage.title,url:i,requiresAuth:!0,loading:m||o.loading&&4!==o.networkStatus,contentProps:{py:0,mx:0,mb:0},render:function(){return b&&b.profilePage&&o.data&&o.data.system&&l?Object(n.jsxs)(s.t,{column:!0,minHeight:"80vh",children:[Object(n.jsxs)(s.l,{variant:"narrow","data-testid":"Profile",style:{flex:"1 0 auto"},children:["/profile"!==i.pathname&&Object(n.jsx)(s.t,{column:!0,alignItems:"center",mb:6,children:Object(n.jsx)(s.V,{route:"profile",passHref:!0,children:Object(n.jsxs)(s.b,{textDecoration:"none",typoStyle:"xxs",children:["/ ",Object(n.jsx)(p.a,S({},g.n.profile))]})})}),Object(n.jsx)(s.e,{mb:6,children:t({profilePage:b.profilePage,system:o.data.system,currentUser:l,refetch:u,privacyPolicyPage:o.data&&o.data.settings&&o.data.settings.privacyPageSlug&&o.data.settings.privacyPageSlug.current})})]}),Object(n.jsx)(v,{url:i})]}):null}})}},bu3G:function(e,t,i){"use strict";i.d(t,"c",(function(){return o})),i.d(t,"e",(function(){return a})),i.d(t,"g",(function(){return s})),i.d(t,"f",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"d",(function(){return l})),i.d(t,"a",(function(){return f}));var n=i("7++0"),r=i("OUWn"),o=Object(n.e)({formHeading:{id:"Profile.profileSection.formHeading",defaultMessage:"More about you"},withoutSubscription:{id:"profile.noSubscriptionTitle",defaultMessage:"You don't have a valid subscription yet."},cancelSubscription:{id:"cancel_subscription",defaultMessage:"Cancel subscription"},cancelSubscriptionTitle:{id:"cancel_subscription_confirmation_title",defaultMessage:"Are you sure you want to cancel your subscription?"},cancelSubscriptionConfirmation:{id:"cancel_subscription_confirmation_description",defaultMessage:"Cancellation will be immediate and you will need to activate another subscription to be able to use the service again."},cancelSubscriptionSuccess:{id:"cancel_subscription_success",defaultMessage:"Subscription cancelled"},redeemGiftCardLink:{id:"redeem_a_voucher_code",defaultMessage:"Redeem a voucher code"},profileUpdated:{id:"profileUpdated",defaultMessage:"Profile updated"}}),a=Object(n.e)({subscription:{id:"subscription",defaultMessage:"Subscription"},"personal-info":{id:"Profile.sections.personalInfo",defaultMessage:"About you"},tripHistory:{id:"trip_history",defaultMessage:"Trip history"},receipts:{id:"receipts",defaultMessage:"Receipts"},invoices:{id:"invoices",defaultMessage:"Invoices"},"credit-cards":{id:"Profile.sections.creditCards",defaultMessage:"Payment cards"},wallet:{id:"modules.Profile.Wallet.title",defaultMessage:"Wallet"},"pin-code":{id:"pin_code",defaultMessage:"PIN code"},"your-data":{id:"your_data",defaultMessage:"Your data"},"assign-rfid-card":{id:"Profile.sections.assignRfidCard",defaultMessage:"Assign RFID card"}}),s=Object(n.e)({birthYear:{id:"Profile.UserForm.birthYear",defaultMessage:"Please enter a 4 digit birth year, eg 1986"},email:{id:"Onboarding.EmailForm.emailRequired",defaultMessage:"A valid email is required."}}),c=Object(n.e)({name:{id:"Profile.UserForm.Fields.name",defaultMessage:"Name"},gender:{id:"Profile.UserForm.Fields.gender",defaultMessage:"Gender"},birthYear:{id:"Profile.UserForm.Fields.birthYear",defaultMessage:"Birth year"},phoneNumber:{id:"phone_number",defaultMessage:"Phone number"},email:{id:"email",defaultMessage:"Email"},agreedToReceiveEmail:{id:"agreedToReceiveEmail",defaultMessage:"Receive information about the scheme, new stations etc."},agreedToReceiveExternalPromotions:{id:"agreedToReceiveExternalPromotions",defaultMessage:"Receive special offers and information from trusted partners, sponsors, the city etc."},postalCode:{id:"postal_code",defaultMessage:"Postal code"},disclaimer:{id:"Profile.UserForm.Fields.disclaimer",defaultMessage:"The following information is optional. While we appreciate knowing more about our customers, you may edit or remove your answers at any time."},nameDescription:{id:"Profile.UserForm.Fields.nameDescription",defaultMessage:"Used when we're communicating with you"}}),d=Object(n.e)({heading:{id:"Profile.PhoneNumberForm.heading",defaultMessage:"What we need to know"},isEditing:{id:"Profile.PhoneNumberForm.isEditing",defaultMessage:"Enter your new phone number"},disclaimer:{id:"Profile.PhoneNumberForm.disclaimer",defaultMessage:"Your phone number is required to use our bikes. The number is used to log you in, and to contact you if something goes wrong"},updated:{id:"Profile.PhoneNumberForm.updated",defaultMessage:"Phone number updated"}}),l=Object(n.e)({confirmCancel:{id:"renewal_disabling_confirmation_title",defaultMessage:"Are you sure you want to cancel auto-renewal?"},confirmCancelWithValidSubscription:{id:"subscription_still_active_until",defaultMessage:"Current subscription will still be active until {validTo}"},subscriptionStillPending:{id:"subscription_still_pending",defaultMessage:"Current subscription will still be pending for activation"},confirmRenew:{id:"renewal_enabling_confirmation_title",defaultMessage:"Are you sure you want to renew subscription automatically?"},subscriptionRenewalOnDate:{id:"renewal_next_scheduled",defaultMessage:"The next renewal will be for {price} on {date}"}}),u=Object(n.e)({ERR_PRODUCT_NOT_RENEWABLE:{id:"productIsNotRenewableError",defaultMessage:"Product is not renewable"},ERR_USER_NO_SUBSCRIPTION:{id:"userNoSubscriptionError",defaultMessage:"You don't have an active subscription."}});function f(e){switch(e.errorCode){case r.w.ERR_PRODUCT_NOT_RENEWABLE:return u.ERR_PRODUCT_NOT_RENEWABLE;
1case r.w.ERR_USER_NO_SUBSCRIPTION:return u.ERR_USER_NO_SUBSCRIPTION}}},qhaV:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile.pin-code",function(){return i("FBSs")}])}},[["qhaV",1,2,3,0,4,5,6,7,8,9]]]);
2//# sourceMappingURL=profile.pin-code-43bc5761e89e5e4a897e.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.