1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0fd72-2df0-7ed1-b2be-bed3448cde4a")}catch(e){}}();(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2771],{75767:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/profile",function(){return t(7470)}])},73863:function(e,n,t){"use strict";t.d(n,{Jt:function(){return m},BN:function(){return N},lN:function(){return A},ef:function(){return T}});var r=t(31549),i=t(84742),a=t(9211),o=t(36763);function l(){let{t:e}=(0,i.$G)("profile");return(0,r.jsx)(o.LU,{links:[{label:e("profile.header.settings","Profile"),href:a._.profile.settings(),exact:!0},{label:e("profile.header.organizations","Organizations"),href:a._.profile.orgs()}]})}var s=t(91531),c=t(87932),u=t(96019),d=t.n(u);let f=(0,c.U)(d(),"profile-content"),p=f(s.W2)`~ :global(content is-left)`;function m(){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(l,{})})}var h=t(85815),g=t(98104),j=t.n(g),b=t(42284),y=t(42627);let x=(0,h.Cl)(),v=[x.accessor("name",{header:()=>(0,r.jsx)(i.cC,{i18nKey:"table.name",ns:"organization",defaults:"Name"}),cell:e=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("small",{children:["ID: ",e.row.original.id]}),(0,r.jsx)("p",{children:e.getValue()})]})}),x.accessor("type",{header:()=>(0,r.jsx)(i.cC,{i18nKey:"table.type",ns:"organization",defaults:"Type"})})];function w(){let e=(0,y.lX)();return(0,b.Wi)(e)?null:(0,r.jsxs)(s.W2,{className:"content is-left",children:[(0,r.jsx)("div",{className:"flex-right",children:(0,r.jsx)(j(),{href:a._.orgs.create(),className:"btn",children:(0,r.jsx)(i.cC,{i18nKey:"button.new",ns:"organization",defaults:"New Organization"})})}),(0,r.jsx)("br",{}),(0,r.jsx)(o.iA,{getRowId:e=>e.id,columns:v,dataSource:e.value})]})}function N(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l,{}),(0,r.jsx)(w,{})]})}var S=t(31957),E=t(21105),I=t(78162),_=t(69109),P=t(34441),z=t(6829),C=t(39355),k=t(87866);async function L(e,n){return e(async e=>{let{client:t,payload:r,authBearerToken:i}=e;return await t.request(C.Ps` 2 mutation UpdateUserProfile($userId: ID!, $data: UserEditInputType!) { 3 editUser(userId: $userId, data: $data) { 4 id 5 } 6 } 7 `,(0,I.D0)(r,{data:n}),{authorization:i}),(0,k.ZV)("/api/auth/refreshUser",{method:"POST"})})}var F=t(58739),O=t(5394),U=t(45251),$=t(7124),D=t(3299),G=t(44194);function T(e){let n=(0,I.fC)();return(0,G.useMemo)(()=>Object.assign({language:function(e){let n=(0,b.pC)(e)?e.value.language:void 0;if(n&&F.k.some(e=>e===n))return n}(n)??e},(0,_.IN)((0,b.WG)(n),{email:"[email protected]",firstName:"",lastName:"",phoneNumber:""})),[n,e])}let W=O.z.object({email:O.z.string().email(),firstName:O.z.string(),lastName:O.z.string(),phoneNumber:(0,D.j)().min(1,"Phone number is required"),language:O.z.string()}),q=(0,s.Ql)();function V(e){let{onSubmit:n}=e,t=T("en"),{t:a}=(0,i.$G)("profile"),l=(0,U.qL)();return(0,r.jsxs)(s.l0,{schema:W,defaultValues:t,onSubmit:async e=>n((0,$.l$)(e,["email"])),children:[(0,r.jsxs)(o.NI,{title:a("fieldGroup.userInfo.title","User Information"),description:a("fieldGroup.userInfo.description","Here you can edit Information about yourself."),children:[(0,r.jsx)(q,{name:"email",label:a("field.label.email","Email address"),children:(0,r.jsx)(s.II,{type:"email",readOnly:!0,placeholder:a("field.placeholder.email","[email protected]")})}),(0,r.jsxs)(s.rj,{children:[(0,r.jsx)(s.sg,{md:6,children:(0,r.jsx)(q,{name:"firstName",label:a("field.label.firstName","First Name"),children:(0,r.jsx)(s.II,{placeholder:a("field.placeholder.firstName","Person")})})}),(0,r.jsx)(s.sg,{md:6,children:(0,r.jsx)(q,{name:"lastName",label:a("field.label.lastName","Last Name"),children:(0,r.jsx)(s.II,{placeholder:a("field.placeholder.lastName","Doe")})})})]}),(0,r.jsx)(q,{name:"phoneNumber",label:a("field.label.phoneNumber","Phone number"),children:(0,r.jsx)(s.II,{type:"tel",placeholder:a("field.placeholder.phoneNumber","+46 111 22 33 44")})})]}),(0,r.jsx)(o.NI,{title:a("fieldGroup.communication.title","Communication Information"),description:a("fieldGroup.communication.description","Help us communicate better with you."),children:(0,r.jsx)(q,{name:"language",label:a("field.label.language","Email Language"),children:(0,r.jsx)(s.Ph,{displayValue:e=>l[e]?.name??e,options:F.k.map(e=>({key:e,value:e})),placeholder:a("field.placeholder.language","Language")})})}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,r.jsx)(s.Mm,{variant:"default",children:a("field.label.submit","Save profile information")})})]})}function A(){let{t:e}=(0,i.$G)("profile"),n=(0,S.NL)(),{mutateAsync:t}=(0,E.D)(e=>L(P.po,e),{onError:()=>z.C.error(e("update.error","Unknown error while trying to update user information")),onSuccess:t=>{n.setQueryData(I.D9,(0,b.G)(t)),z.C.success(e("update.success","User information updated!"))}});return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(p,{className:"py-gutter",children:(0,r.jsxs)(s.gC,{children:[(0,r.jsx)(s.Dx,{variant:"display",size:"sm",level:2,children:e("title.settings","Profile Settings")}),(0,r.jsx)(s.ZT.Paragraph,{children:e("intro.settings","Edit your contact information and communication preferences.")}),(0,r.jsx)(V,{onSubmit:(0,_.lz)(t)})]})})})}},7470:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return l}});var r=t(31549),i=t(84742),a=t(73863),o=t(23647),l=!0;n.default=o.p0.withLayout({title:(0,r.jsx)(i.cC,{i18nKey:"page.title",ns:"profile",defaults:"Profile Settings"})})(a.lN)},96019:function(e){e.exports={"profile-content":"zV15Ez"}},39856:function(e,n,t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.d(n,{J:function(){return x}});var i,a="basil",o="https://js.stripe.com",l="".concat(o,"/").concat(a,"/stripe.js"),s=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,c=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,u="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",d=function(){for(var e=document.querySelectorAll('script[src^="'.concat(o,'"]')),n=0;n<e.length;n++){var t,r=e[n];if(t=r.src,s.test(t)||c.test(t))return r}return null},f=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src="".concat(l).concat(n);var r=document.head||document.body;if(!r)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(t),t},p=function(e,n){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"7.9.0",startTime:n})},m=null,h=null,g=null,j=function(e,n,t){if(null===e)return null;var r,i=n[0].match(/^pk_test/),o=3===(r=e.version)?"v3":r;i&&o!==a&&console.warn("Stripe.js@".concat(o," was loaded on the page, but @stripe/stripe-js@").concat("7.9.0"," expected Stripe.js@").concat(a,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var l=e.apply(void 0,n);return p(l,t),l},b=function(e){var n="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==r(e))throw Error(n);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw Error(n)},y=!1,x=function(){for(var e,n=arguments.length,t=Array(n),r=0;r<n;r++)t[r]=arguments[r];y=!0;var a=Date.now();return(e=i,null!==m?m:(m=new Promise(function(n,t){if("undefined"==typeof window||"undefined"==typeof document){n(null);return}if(window.Stripe&&e&&console.warn(u),window.Stripe){n(window.Stripe);return}try{var r,i=d();i&&e?console.warn(u):i?i&&null!==g&&null!==h&&(i.removeEventListener("load",g),i.removeEventListener("error",h),null===(r=i.parentNode)||void 0===r||r.removeChild(i),i=f(e)):i=f(e),g=function(){window.Stripe?n(window.Stripe):t(Error("Stripe.js not available"))},h=function(e){t(Error("Failed to load Stripe.js",{cause:e}))},i.addEventListener("load",g),i.addEventListener("error",h)}catch(e){t(e);return}})).catch(function(e){return m=null,Promise.reject(e)})).then(function(e){return j(e,t,a)})};x.setLoadParameters=function(e){if(!(y&&i&&Object.keys(b(e)).reduce(function(n,t){var r;return n&&e[t]===(null===(r=i)||void 0===r?void 0:r[t])},!0))){if(y)throw Error("You cannot change load parameters after calling loadStripe");i=b(e)}}}},function(e){e.O(0,[2915,3647,9774,2888,179],function(){return e(e.s=75767)}),_N_E=e.O()}]); 8//# chunkId=01a0fd72-2df0-7ed1-b2be-bed3448cde4a
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.