1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[83],{94925:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/signup/build/profile/select",function(){return t(84136)}])},8032:function(e,s,t){"use strict";t.d(s,{Z:function(){return C}});var n=t(85893),a=t(67294),c=t(11163),l=t(11429),i=t(52060),r=t(30004),d=t(93765),o=t(48817),u=t(59327),x=t(27278),m=t(5281),h=t(48606),f=t(76888),p=t(28749),j=t(25365),g=t(17267),b=t(489),v=t(78467),N=t(64650),k=t(74215),w=t(76688),y=t(15907);let _="/signup/build/profile?type=ad-account";function C(e){let{withinSignup:s=!1}=e,t=(0,c.useRouter)(),C=(0,i.TL)(),[S,T]=(0,a.useState)(""),[A,Z]=(0,a.useState)(!1),[E,P]=(0,a.useState)(!1),[I,L]=(0,a.useState)(s?_:"/home"),[O,G]=(0,a.useState)(!1),[H]=(0,d.Qi)(),{selectedAccounts:Q,isFetching:X}=(0,i.CG)(u.ib),Y=(0,i.CG)(o.$b),[q]=(0,r.VO)(),{selectableFilteredAccounts:B}=(0,k.L)(),D=async()=>{P(!0),t.push(I),P(!1)};(0,y.A)(),(0,w.v)(),(0,a.useEffect)(()=>{null==localStorage.getItem("oauth_network")&&t.push(s?_:"/add/credentials?ns=true")},[t,s]),(0,a.useEffect)(()=>{X||A||!(B.length>0)||0!==Q.length||(Z(!0),C((0,x.mY)({checked:!0,accounts:B})))},[C,X,B,Q,A]);let F=async()=>{T(""),P(!0);try{let e=Q.map(e=>e.id),t=localStorage.getItem("oauth_network"),n={...await q({accountIds:e,network:t})};if(n.error){T(n.error.error),P(!1);return}await H({columns:[],filters:[{column:"project_id",value:"all"}]});let{profiles:a}=n.data,c=a.length;if(1!==c||s)(0,N.iH)({businessType:Y,profileType:"Paid",quantity:c,network:t});else{let e=a[0];(0,N.Nd)({businessType:Y,profileType:"Paid",currency:e.currency,network:t}),C((0,m.vi)(e)),L("/add/project-selector")}G(!0),P(!1),localStorage.removeItem("oauth_network"),localStorage.removeItem("oauth_redirect")}catch(e){P(!1)}};return(0,n.jsxs)("div",{className:"grid grid-cols-4 gap-8",children:[(0,n.jsx)("div",{className:"col-span-4 xl:col-span-2 items-stretch",children:(0,n.jsxs)("div",{className:"bg-neutral-100 rounded border border-neutral-200 p-4 mb-8 h-full",children:[(0,n.jsx)("h1",{className:"text-violet-900 text-center text-2xl font-semibold mb-3",children:"Choose Accounts"}),(0,n.jsx)(v.Z,{error:S}),(0,n.jsx)("div",{className:"flex items-center mb-3",children:(0,n.jsx)("div",{className:"ml-auto",children:(0,n.jsx)(f.Hy,{onClick:e=>{C((0,x.Qf)(e))},disabled:E||X})})}),(0,n.jsx)(b.Z,{disabled:E||X}),(0,n.jsx)(j.Z,{})]})}),(0,n.jsx)("div",{className:"col-span-4 xl:col-span-2 items-stretch",children:(0,n.jsx)(g.Z,{})}),(0,n.jsx)("div",{className:"col-span-4",children:(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-6 sm:gap-8 justify-center items-center mt-3",children:[(0,n.jsx)(p.On,{show:O,onClose:D,element:(0,n.jsx)(h.Tx,{id:"add-accounts",name:"add accounts",text:"Add Selected Accounts",disabled:E||X||0===Q.length,isLoading:E,onClick:F}),heading:"Profile created",message:(0,n.jsx)("div",{className:"px-5",children:(0,n.jsx)("p",{className:"text-center",children:"Your Paid Profile has been added successfully!"})}),icon:(0,n.jsx)(l.Z,{className:"text-green-600 w-8 h-8 mr-2"}),actions:(0,n.jsx)("div",{className:"flex justify-center my-8 gap-x-6 -mr-3",children:(0,n.jsx)(h.Tx,{name:"profile-create-confirm",text:"Continue",disabled:E||X,isLoading:E,onClick:D})})}),s?(0,n.jsx)(h.Av,{id:"back",name:"back",text:"Back",disabled:E,onClick:()=>t.push(_)}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.Av,{id:"add-credentials",name:"add credentials",text:"Add More Credentials",disabled:E,onClick:()=>t.push("/add/credentials")}),(0,n.jsx)(h.Av,{id:"choose-network",name:"choose network",text:"Choose Different Network",disabled:E,onClick:()=>{C((0,x.Ns)()),t.push("/add/credentials?ns=true")}})]})]})})]})}},84136:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return l}});var n=t(85893),a=t(54114),c=t(8032);function l(){return(0,n.jsx)(a.Z,{children:(0,n.jsx)("div",{className:"py-10 px-4 sm:px-6 lg:px-8",children:(0,n.jsx)(c.Z,{withinSignup:!0})})})}}},function(e){e.O(0,[6415,6888,4131,2888,9774,179],function(){return e(e.s=94925)}),_N_E=e.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.