1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2206],{28767:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_billing/_paymentInfo",function(){return t(11329)}])},39953:function(n,e,t){"use strict";t.d(e,{n:function(){return f},t:function(){return l}});var r=t(15243),i=t(46599),u=t(83361),o=t(722),a=t(85556),s=t(78160),c=t(38687),d=t(50791),l=function(n){(0,u._)(t,n);var e=(0,o._)(t);function t(n){var u;return(0,i._)(this,t),(u=e.call(this,{collectionPath:"customers",params:{},onError:n})).create=function(n){var e=n.userId,t=n.customer;return u._create((0,r._)(function(){return(0,a.Jh)(this,function(n){return[2,(0,c.wK)({userId:e,customer:t})]})}),u.onError)},u}return t}(s.xb),f=(0,d.B)(function(n){return new l(n.onError)})},52609:function(n,e,t){"use strict";var r=t(15243),i=t(94877),u=t(5010),o=t(10426),a=t(85556),s=t(24246),c=t(39953),d=t(29114),l=t(27378),f=t(60868),m=t(95008),p=t(1698),_=t(98176);e.Z=function(n){var e,t=n.mode,h=void 0===t?"independent":t,x=n.initialBillingInfo,v=n.onDataChange,y=(0,m.$G)().t,b=(0,d.aC)().user,I=(0,f.O)({customerId:null==b?void 0:b.customerId}),N=(0,o._)((0,l.useState)(),2),g=N[0],w=N[1];(0,l.useEffect)(function(){return I.subscribe(function(n){if(!(null==n?void 0:n.content)){w(void 0);return}w((0,u._)((0,i._)({},n.content),{_id:n._id})),E(n.content.billingInfo)})},[I]);var j=(0,o._)((0,l.useState)(x),2),C=j[0],E=j[1],P=(0,l.useMemo)(function(){return{type:"billingInfo",props:{name:{type:"text",displayName:y("Name of the organization or person"),required:!0},vatId:{type:"text",displayName:y("Vat Id"),xs:4},extraInformation:{type:"text",xs:8,displayName:y("Your reference")},streetAddress:{type:"text",displayName:y("Street address"),section:y("Invoicing address")},postalCode:{type:"text",xs:4,displayName:y("Postal code")},city:{type:"text",xs:8,displayName:y("City")},country:{type:"country-picker",xs:4,displayName:y("Country")},email:{type:"text",xs:8,displayName:y("Email address"),defaultValue:null==b?void 0:b.email,validate:(0,p.o)(y)},phoneNumber:{type:"phone-number",displayName:y("Phone number")}}}},[y,null==b?void 0:b.email]),Z=(0,l.useCallback)((e=(0,r._)(function(n,e){var t,r,o,s;return(0,a.Jh)(this,function(a){switch(a.label){case 0:if(!(null==b?void 0:b.uid))return[2];switch(E(t=n),h){case"independent":return[3,1];case"embedded":return[3,5]}return[3,6];case 1:if(r=new c.t,g)return[3,3];return[4,r.create({userId:null==b?void 0:b.uid,customer:{name:t.name,billingInfo:t}})];case 2:return o=a.sent(),w((0,u._)((0,i._)({},o.content),{_id:o._id})),E(o.content.billingInfo),[2];case 3:return[4,I.update({billingInfo:t},e.map(function(n){return"content.billingInfo.".concat(n)}))];case 4:return s=a.sent(),w((0,u._)((0,i._)({},s.content),{_id:s._id})),E(s.content.billingInfo),[3,7];case 5:return[3,7];case 6:throw Error("Unknown mode ".concat(h));case 7:return[2]}})}),function(n,t){return e.apply(this,arguments)}),[g,I,h,null==b?void 0:b.uid]),k=(0,l.useCallback)(function(n,e,t){null==v||v(n,e,t)},[v]);return(0,s.jsx)(_.Z,{config:P,initialData:C,onSave:"independent"===h?Z:void 0,onDataChange:"embedded"===h?k:void 0})}},11329:function(n,e,t){"use strict";t.r(e),t.d(e,{__N_SSG:function(){return p},default:function(){return _}});var r=t(24246),i=t(73927),u=t(29114),o=t(81330),a=t(95008),s=t(52609),c=t(35e3),d=t(36250),l=t(44384),f=t(85772),m=function(){var n=(0,a.$G)().t,e=(0,u.aC)().user;return(0,r.jsx)(u.di,{whenAuthenticated:!0,orRender:(0,r.jsx)(o.U,{}),children:(0,r.jsx)(d.Z,{children:(0,r.jsxs)(c.Z,{children:[(0,r.jsx)(f.Z,{variant:"h1",children:n("Payment-info")}),(0,r.jsxs)(l.ZP,{container:!0,children:[(0,r.jsx)(l.ZP,{item:!0,xs:12,md:6,padding:2,children:(0,r.jsx)(s.Z,{})}),(0,r.jsx)(l.ZP,{item:!0,xs:12,md:6,padding:2,children:(null==e?void 0:e.customerId)?(0,r.jsx)(i.X,{}):null})]})]})})})},p=!0,_=function(){return(0,r.jsx)(m,{})}}},function(n){n.O(0,[9974,2551,8574,6918,8023,2888,9774,179],function(){return n(n.s=28767)}),_N_E=n.O()}]);
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.