1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[798],{2661:function(e,r,n){"use strict";n.d(r,{Z:function(){return o}});var t=n(67294),o=function(e){var r=e.children,n=(0,t.useState)(!1),o=n[0],a=n[1];return(0,t.useEffect)((function(){a(!0)}),[]),o?r:null}},42149:function(e,r,n){"use strict";n.d(r,{Z:function(){return l}});var t=n(85893),o=n(54662),a=(n(67294),n(83649)),i=n.n(a),l=function(e){var r=e.children;return(0,t.jsxs)("div",{className:i().error,children:[(0,t.jsx)("div",{className:i().icon,children:(0,t.jsx)(o.Z,{size:"small",type:"warning"})}),(0,t.jsx)("div",{className:i().body,role:"alert",children:r})]})}},2133:function(e,r,n){"use strict";n.d(r,{Z:function(){return f}});var t=n(85893),o=(n(67294),n(93967)),a=n.n(o),i=n(4316),l=n.n(i),s=n(83583),u=n(24762),c=n(2661);function d(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function p(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(r){d(e,r,n[r])}))}return e}function h(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)n=a[t],r.indexOf(n)>=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)n=a[t],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f=function(e){var r,n=e.type,o=void 0===n?"text":n,i=e.value,f=void 0===i?"":i,m=e.name,v=e.placeholder,b=e.helpText,g=e.error,_=e.success,x=e.disabled,j=e.onCh
1ange,y=e.full,w=e.touched,O=e.autocomplete,N=void 0===O?"off":O,C=e.toolTipMessage,P=void 0===C?"":C,S=h(e,["type","value","name","placeholder","helpText","error","success","disabled","onChange","full","touched","autocomplete","toolTipMessage"]),I=(0,s.$G)().t,Z=b||g||_,k=a()((d(r={},l().input,!0),d(r,l()["-disabled"],x),d(r,l()["-error"],g),d(r,l()["-success"],_&&!g),d(r,l()["-full"],y),d(r,l()["-touched"],w||""!==f),d(r,l()["-show-message"],Z),r));return(0,t.jsxs)("div",{className:k,children:[(0,t.jsx)("label",{htmlFor:m,className:"sr",children:v}),(0,t.jsx)(c.Z,{children:(0,t.jsx)(u.Z,{effect:"solid",place:"top",multiline:!0,className:l().tooltip})}),(0,t.jsx)("input",p({className:l().field,type:o,name:m,id:m,value:f,placeholder:v,disabled:x,onChange:j,autoComplete:N,"aria-invalid":!!g,"aria-describedby":"input-".concat(m,"-feedback"),"data-tip":P},S)),(0,t.jsx)("div",{className:l().shadow}),(0,t.jsx)("div",{className:l()["border-hider"],"aria-hidden":!0,children:v}),(0,t.jsx)("div",{className:l()["placeholder-wrapper"],"aria-hidden":!0,children:(0,t.jsx)("span",{className:l().placeholder,children:v})}),(0,t.jsx)("div",{id:"input-".concat(m,"-feedback"),children:Z&&(0,t.jsxs)("div",{className:l().message,"aria-live":"polite",children:[(0,t.jsx)("p",{className:"sr",children:(g||_||b)&&"".concat(g&&I("error:error-description",{description:v}))}),g||_||b]})})]})}},74593:function(e,r,n){"use strict";n.d(r,{Z:function(){return f}});var t=n(85893),o=n(93967),a=n.n(o),i=(n(67294),n(26793)),l=n(95019),s=n.n(l),u=(n(58530),n(67555)),c=n.n(u);function d(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var p=["se","no","dk","fi","is","gb","ie","de","fr","be","nl","lu","pl","lt","lv","ee","cz","es","pt","it","si","at","ch","us","ca","jp","au","nz"],h=function(e){var r,n=e.value,o=void 0===n?"":n,l=e.name,u=e.placeholder,h=e.helpText,f=e.error,m=e.success,v=e.disabled,b=e.onBlur,g=e.onFocus,_=e.manualChange,x=e.handleSubmit,j=e.full,y=e.touched,w=e.allowAllCountries,O=(0,i.$)().t,N=h||f||m,C=a()((d(r={},s()["input-inner"],!0),d(r,s()["-success"],m&&!f),d(r,s()["-full"],j),d(r,s()["-touched"],y||""!==o),d(r,s()["-show-message"],N),r)),P=function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(r){d(e,r,n[r])}))}return e}({width:"100%",borderRadius:"4px",border:"2px solid #555758",height:"52px",fontFamily:"OneDot, sans-serif",borderColor:"#555758",padding:"0 16px 0 52px"},v&&{borderColor:"2px solid #808080",backgroundColor:"#f1f1ef"},f&&{borderColor:"#e31837",background:"#fde8eb"}),S=w?["america","europe","asia","oceania","africa"]:void 0,I=w?void 0:p;return(0,t.jsxs)("div",{className:C,children:[(0,t.jsx)(c(),{containerStyle:{fontFamily:"OneDot, sans-serif"},inputStyle:P,disabled:v,regions:S,onlyCountries:I,preferredCountries:p,placeholder:u,searchPlaceholder:u,specialLabel:u,onEnterKeyPress:function(e){return x&&x(e)},country:"se",value:String(o),onBlur:b,onFocus:g,countryCodeEditable:!1,inputProps:{name:l,required:!0},onChange:function(e,r,n){var t=n.target.value?n.target.value.replaceAll(" ","").replaceAll("(","").replaceAll(")","").replaceAll("-",""):"",o=""===t?"+".concat(null===r||void 0===r?void 0:r.dialCode):t;o.startsWith("+460")&&(o=o.replace("+460","+46"));var a=[{name:l,value:o},{name:"countryCode",value:r.dialCode||""}];_(a)}}),(0,t.jsx)("div",{id:"input-".concat(l,"-feedback"),children:N&&(0,t.jsxs)("div",{className:s().message,"aria-live":"polite",children:[(0,t.jsx)("p",{className:"sr",children:(f||m||h)&&"".concat(f&&O("error:error-description",{description:u}))}),f||m||h]})})]})},f=h},80798:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return N}});var t=n(34051),o=n.n(t),a=n(85893),i=n(67294),l=n(62851),s=n(73676),u=n(92204),c=n(68774),d=n(44430),p=n(37070),h=n(2133),f=n(83148),m=n(42149),v=n(18522),b=n(83583),g=n(90429),_=n(74593),x=n(68975);function j(e,r,n,t,o,a,i){try{var l=e[a](i),s=l.value}catch(u){return void n(u)}l.done?r(s):Promise.resolve(s).then(t,o)}function y(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function w(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(r){y(e,r,n[r])}))}return e}var O=function(){var e=(0,b.$G)().t,r=(0,i.useContext)(s.Z),n=r.user,t=r.getUserData,y=r.loading,O=(0,i.useContext)(u.ZP),N=O.addNotification,C=O.closeModal,P=(0,i.useState)(""),S=P[0],I=P[1],Z=(null===n||void 0===n?void 0:n.birthdate)?(0,x.v2)(n.birthdate):"",k=(0,l.Z)({initialValues:{firstNames:(null===n||void 0===n?void 0:n.firstNames)||"",lastName:(null===n||void 0===n?void 0:n.lastName)||"",email:(null===n||void 0===n?void 0:n.email)||"",phone:(null===n||void 0===n?void 0:n.phoneNumber)||"",birthdate:Z},validation:w({firstNames:{regex:/.*\S.*/,message:e("error:required-field")},email:{regex:/.*\S.*/,message:e("error:required-field")},phone:{regex:"",message:e("error:invalid-phone-number"),additionalValidation:g.w_}},!(null===n||void 0===n?void 0:n.phoneNumber)&&{countryCode:{regex:"",message:e("error:no-country-code"),additionalValidation:function(e){return!String(null===e||void 0===e?void 0:e.phone).startsWith("+".concat(e.countryCode))}}},{birthdate:{regex:/^\d{4}-\d{2}-\d{2}$/,message:e("error:invalid-birthdate"),allowEmpty:!1}}),onSubmit:function(){var r,n=(r=o().mark((function r(n){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,c.Nq)({firstNames:n.firstNames,lastName:n.lastName,email:n.email,phoneNumber:n.phone,birthdate:n.birthdate});case 2:r.sent.error?I(e("error:error")):(I(""),C(),t(),N({title:e("profile:changes-saved"),text:e("profile:profile-updated"),autoClear:!0,autoClearQuick:!0}));case 4:case"end":return r.stop()}}),r)})),function(){var e=this,n=arguments;return new Promise((function(t,o){var a=r.apply(e,n);function i(e){j(a,t,o,i,l,"next",e)}function l(e){j(a,t,o,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}()});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.xB,{title:e("profile:change-information")}),(0,a.jsx)(v.fe,{children:(0,a.jsxs)(p.Z,{width:"min",children:[(0,a.jsx)(d.Z,{top:[2,4],children:(0,a.jsx)("h2",{className:"h3","aria-hidden":!0,
1children:e("profile:your-info")})}),(0,a.jsxs)("form",{onSubmit:k.handleSubmit,id:"edit-profile-form","aria-labelledby":"modal-header-title",children:[(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{className:"sr",children:e("profile:your-info")}),(0,a.jsx)(d.Z,{top:3,children:(0,a.jsx)(h.Z,{name:"firstNames",placeholder:e("first-name"),autocomplete:"given-name",onChange:k.handleChange,value:k.values.firstNames,error:k.errors.firstNames,disabled:y,full:!0})}),(0,a.jsx)(d.Z,{top:3,children:(0,a.jsx)(h.Z,{name:"lastName",placeholder:e("common-words:surname"),autocomplete:"family-name",onChange:k.handleChange,value:k.values.lastName,error:k.errors.lastName,disabled:y,full:!0})}),(0,a.jsx)(d.Z,{top:3,children:(0,a.jsx)(h.Z,{name:"birthdate",full:!0,type:"date",placeholder:e("common-words:birthdate"),autoComplete:"bday-year",maxLength:4,touched:!0,onChange:k.handleChange,value:k.values.birthdate,error:k.errors.birthdate})})]}),(0,a.jsx)(d.Z,{top:[6,7],children:(0,a.jsx)("h2",{className:"h3","aria-hidden":!0,children:"Login info"})}),(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{className:"sr",children:"Login info"}),(0,a.jsx)(d.Z,{top:3,children:(0,a.jsx)(h.Z,{name:"email",placeholder:e("common-words:email"),autocomplete:"email",onChange:k.handleChange,value:k.values.email,error:k.errors.email,disabled:y,full:!0})}),(0,a.jsx)(d.Z,{top:3,children:(0,a.jsx)(_.Z,{disabled:!0,name:"phone",manualChange:k.handleMultipleChanges,placeholder:e("mobile-number"),value:k.values.phone,error:k.errors.phone||k.errors.countryCode})})]}),(0,a.jsx)(d.Z,{top:1,children:(0,a.jsx)("p",{className:"small",children:(0,a.jsx)(f.Z,{href:"/min-side/endre-nummer",children:"".concat(e("common-words:change")," ").concat(e("mobile-number"))})})}),S&&(0,a.jsx)(d.Z,{top:2,bottom:4,children:(0,a.jsx)(m.Z,{children:(0,a.jsx)("p",{className:"small",children:S})})})]})]})}),(0,a.jsx)(v.mz,{confirmText:e("save-changes"),controlsForm:"edit-profile-form",disabled:y})]})},N=O},62851:function(e,r,n){"use strict";var t=n(34051),o=n.n(t),a=n(67294);function i(e,r,n,t,o,a,i){try{var l=e[a](i),s=l.value}catch(u){return void n(u)}l.done?r(s):Promise.resolve(s).then(t,o)}function l(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function s(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(r){l(e,r,n[r])}))}return e}r.Z=function(e){var r=e.initialValues,n=e.validation,t=void 0===n?{}:n,u=e.onSubmit,c=e.onEmptyField,d=(0,a.useState)(Object.assign({},r)),p=d[0],h=d[1],f=(0,a.useState)({}),m=f[0],v=f[1],b=(0,a.useState)(!1),g=b[0],_=b[1],x=(0,a.useState)(!1),j=x[0],y=x[1],w=(0,a.useState)(0),O=w[0],N=w[1],C=function(e,r,n){var o=t[e];if(o){var a="string"===typeof o.regex?RegExp(o.regex):o.regex,i=o.allowEmpty&&""===String(r),u=o.additionalValidation&&n&&o.additionalValidation(n);if(!i&&!a.test(String(r))||u){var c=l({},e,o.message+(O%2===0?".":"..")),d=Object.assign({},m,c);v((function(e){return s({},e,d)})),N((function(e){return e+1}))}else v((function(r){var n=s({},r,l({},e,void 0));return Object.keys(n).forEach((function(e){void 0===n[e]&&delete n[e]})),n}))}},P=function(){var e=Object.keys(t).filter((function(e){return!p[e]&&!t[e].allowEmpty}));return e.length?(console.log("Form missing fields error",e),c&&c(e),v(Object.assign({},m,e.reduce((function(e,r){return s({},e,l({},r,t[r].message+(O%2===0?".":"..")))}),{}))),N((function(e){return e+1})),y(!0),!1):!Object.keys(m).length||(console.log("Form has error"),y(!0),!1)},S=function(){var e,r=(e=o().mark((function e(r){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.preventDefault(),y(!0),P()&&u&&u(p);case 4:case"end":return e.stop()}}),e)})),function(){var r=this,n=arguments;return new Promise((function(t,o){var a=e.apply(r,n);function l(e){i(a,t,o,l,s,"next",e)}function s(e){i(a,t,o,l,s,"throw",e)}l(void 0)}))});return function(e){return r.apply(this,arguments)}}();return{values:p,errors:j?m:[],handleChange:function(e){var r=e.target,n=r.name,t=r.value,o=Object.assign({},p,l({},n,t));C(n,t,o),g||_(!0),h(o)},handleChangeManual:function(e,r){var n=Object.assign({},p,l({},e,r));C(e,r,n),g||_(!0),h(n)},handleMultipleChanges:function(e){var r=e.reduce((function(e,r){return s({},e,l({},r.name,r.value))}),{}),n=Object.assign({},p,r);e.forEach((function(e){C(e.name,e.value,n)})),g||_(!0),h(n)},handleSubmit:S,isTouched:g,validateForm:P}}},83649:function(e){e.exports={error:"Error_error__nvPQh",icon:"Error_icon__87p1P",body:"Error_body__q6tke"}},4316:function(e){e.exports={input:"Input_input__fo8G3",field:"Input_field__3T8t5",shadow:"Input_shadow__Q23Ni",message:"Input_message__WRrXz","placeholder-wrapper":"Input_placeholder-wrapper__6DQaf",placeholder:"Input_placeholder__QXQ
1Rr","-touched":"Input_-touched__ym6nK",inputContainer:"Input_inputContainer__nSM_2",inputBlock:"Input_inputBlock__f0_wR",inputField:"Input_inputField__3RxSR","border-hider":"Input_border-hider__l_dnr","-error":"Input_-error__fi2qJ","-success":"Input_-success__qbd_y","-full":"Input_-full__pBLie","-disabled":"Input_-disabled__msDlJ","-show-message":"Input_-show-message__FR4nz",tooltip:"Input_tooltip__QLQzm"}},95019:function(e){e.exports={input:"InputPhone_input__XJusX","input-inner":"InputPhone_input-inner__sFDmg",field:"InputPhone_field__qKmeJ",shadow:"InputPhone_shadow__S3E41",message:"InputPhone_message__MrrBj","-error":"InputPhone_-error__ixcWn","-success":"InputPhone_-success__iSS5V","-full":"InputPhone_-full__2axgS","-touched":"InputPhone_-touched__oRdxh","-disabled":"InputPhone_-disabled__9zswJ","-show-message":"InputPhone_-show-message__s3zKv"}}}]);
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.