1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9930],{73212:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/d/[customerId]/onboarding",function(){return s(82586)}])},22717:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var n=s(85893),r=s(67294),a=s(18140),l=s(83358),i=s(86475),c=s(90506);function o(e){let{children:t,showErrorMsg:s,submitFunction:o,onSubmit:u,onSubmitResponse:d,onSubmitSuccess:x,onSubmitFail:m,noSubmitMode:h=!1,onSimpleClick:f,errMessageType:p,...j}=e,[y,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)(),{showToast:k}=(0,c.p)();async function N(){if(b(null),h){f&&f();return}if(u&&u(),!o)return;g(!0);let{data:e,status:t,message:s}=await o();g(!1),d&&d(e),t===i.qb.Success&&x?x(e):("toast"===p?k({message:s,type:"error"}):b(s),m&&m(s,e,t))}return(0,n.jsxs)("div",{className:"relative",children:[s&&v&&(0,n.jsx)("div",{className:"absolute right-0 pb-2 transform -translate-y-full whitespace-nowrap",children:(0,n.jsx)(a.Z,{variant:"simpleError",children:v})}),(0,n.jsx)(l.ZP,{...j,isLoading:y,onClick:N,children:t})]})}},27850:function(e,t,s){"use strict";s.d(t,{x:function(){return i}});var n=s(67294),r=s(11163),a=s(17790),l=s(89637);function i(e,t,s){var i;
1let c=(0,r.useRouter)(),[o,u]=(0,n.useState)({}),{data:d,isError:x,isLoading:m}=(0,a.QZ)(o,!(0,l.Ew)(o));return(0,l.Ew)(o)&&(null==c?void 0:null===(i=c.query)||void 0===i?void 0:i.customerId)&&u((0,l.Qx)(c.asPath,s,e,t)),{data:d,isError:x,isLoading:m}}},23530:function(e,t,s){"use strict";s.d(t,{t:function(){return r}});var n=s(67294);function r(){let e=(0,n.useRef)(!1);return(0,n.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),(0,n.useCallback)(()=>e.current,[])}},87641:function(e,t,s){"use strict";s.d(t,{Hs:function(){return f},U1:function(){return j},XU:function(){return m},YM:function(){return x},kX:function(){return p}});var n=s(85893),r=s(11163),a=s(67294),l=s(48387),i=s(18140),c=s(59214),o=s(92536),u=s(17790),d=s(96191);let x={Analyst:{key:"Analyst",display:"Analyst"},"Analytics Manager":{key:"Analytics Manager",display:"Analytics Manager"},"Business Development":{key:"Business Development",display:"Business Development"},"Customer Success":{key:"Customer Success",display:"Customer Success"},Founder:{key:"Founder",display:"Founder"},Freelancer:{key:"Freelancer",display:"Freelancer"},"Growth Marketer":{key:"Growth Marketer",display:"Growth Marketer"},"Marketing Manager":{key:"Marketing Manager",display:"Marketing Manager"},Other:{key:"Other",display:"Other"},"Product Manager":{key:"Product Manager",display:"Product Manager"},Seller:{key:"Seller",display:"Seller"}},m={customer_name:{element:"input",label:{label:"Full Name"},validation:{required:!0}},company_name:{element:"input",label:{label:"Company"},validation:{required:!0}},designation:{element:"listbox",label:{label:"Designation"},options:x,validation:{required:!0}},other:{placeholder:"Designation",element:"input",validation:{required:!0,maxLength:30},label:{label:""},invisible:!0}},h=(e,t,s)=>{let n=p(e),r={...e,designation:n,home_path:s};return(0,u.Nw)(r)};function f(e,t){let{company_name:s,customer_name:n,designation:r}=e||{},a=r&&!t[r];return{company_name:s,customer_name:n,designation:a?"Other":r,other:a?r:void 0}}function p(e){let{designation:t,other:s}=e;return"Other"===t?s:t}let j=[{name:"Show other for designation",conditions:[{type:"rule",field:"designation",operator:"equals",value:"Other"}],actions:[{type:"show",targetField:"other"}]}];t.ZP=()=>{let{data:e}=(0,u.jg)(),[t,s]=(0,a.useState)({}),p=(0,r.useRouter)(),[y,g]=(0,a.useState)(),v=(0,a.useMemo)(()=>f(e,x),[e]);return(0,n.jsxs)("div",{className:"flex flex-col mt-20 max-w-md mx-auto",children:[(0,n.jsx)("h2",{className:" font-bold text-2xl text-center",children:"Tell us about yourself!"}),(0,n.jsx)("div",{className:"max-w-md",children:(0,n.jsx)(c.ZP,{fields:m,onStateChange:e=>s(e),initialFormState:v,behaviors:j,children:(0,n.jsx)(o.Z,{})})}),y&&(0,n.jsx)(i.Z,{variant:"error",children:y}),(0,n.jsx)("div",{className:"flex justify-end mt-10",children:(0,n.jsx)(l.E0,{submitFunction:()=>h(t,g,(0,d.Xi)(p.asPath,"step","1")),onSubmitFail:e=>g(e),handleNextClick:void 0})})]})}},74741:function(e,t,s){"use strict";var n=s(85893),r=s(41664),a=s.n(r),l=s(71941);t.Z=e=>{let{iconName:t="check",title:s,paragraphs:r,buttons:i}=e;return(0,n.jsxs)("div",{className:"flex mx-auto max-w-md flex-col items-center gap-2 justify-center",children:[(0,n.jsx)("span",{className:"flex justify-center rounded-full p-2 bg-primary animate-loadFadeUp",children:(0,n.jsx)(l.Z,{tooltipContent:void 0,name:t,classes:"w-16 h-16 text-white ",strokeWidth:2})}),(0,n.jsx)("h2",{className:"header-2 py-2",children:s}),r.map((e,t)=>(0,n.jsx)("p",{className:"text-center",children:e},t)),(0,n.jsx)("div",{className:"flex gap-4 py-4",children:i.map((e,t)=>{let{link:s,handleClick:r,className:l,text:i}=e;return(0,n.jsx)(a(),{href:s,onClick:r,className:l,children:i},t)})})]})}},29525:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});var n=s(85893),r=s(71941);function a(e){let{isSelected:t,isCompleted:s,index:a,onSelect:l,isLast:i,icon:c="check",children:o,label:u}=e,d=s?"bg-primary w-5 h-5 flex items-center justify-center":"bg-gray-400 dark:bg-gray-600 w-3 h-3",x=s?"bg-primary":"bg-gray-400 dark:bg-gray-600";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{onClick:()=>l&&l(a),className:"w-5 h-5 rounded-full border-2 flex shrink-0 justify-center items-center ".concat(t?"border-primary":"border-none"," relative"),children:[null!=o?o:u&&(0,n.jsx)("div",{className:"absolute -top-6 text-sm ".concat(s?"text-gray-900 dark:text-gray-100 font-semibold":"text-gray-700 dark:text-gray-300"," "),children:u}),(0,n.jsx)("div",{className:"rounded-full m-auto ".concat(d),children:s&&(0,n.jsx)(r.Z,{tooltipContent:void 0,name:c,strokeWidth:3,classes:"w-3 h-4 text-white"})})]}),!i&&(0,n.jsx)("div",{className:"w-full h-[2px] m-auto ".concat(x)})]})}},3412:function(e,t,s){"use strict";s.d(t,{M:function(){return o}});var n=s(85893),r=s(11163),a=s(67294),l=s(90506),i=s(96191),c=s(23530);function o(e){let{successMessage:t="Success",failureMessage:s="Failed",queryStr:o="toast"}=e,{showToast:u}=(0,l.p)(),d=(0,r.useRouter)(),x=(0,c.t)(),{[o]:m}=d.query,h=(0,a.useCallback)(()=>
1{if(m&&x()){let e=(0,i.Gw)(d.asPath,o);d.replace(e)}},[d,m,o]);return(0,a.useEffect)(()=>{if(m){let e="success"===m;u({message:e?t:s,type:e?"success":"error",onClose:h})}},[m,t,s,u,h]),(0,n.jsx)(n.Fragment,{})}},48387:function(e,t,s){"use strict";s.d(t,{DY:function(){return h},E0:function(){return f},Ne:function(){return d},OP:function(){return x},ZP:function(){return o},cz:function(){return u}});var n=s(85893),r=s(67294),a=s(58202),l=s(83358),i=s(22717);let c=(0,r.createContext)(null);function o(e){let{children:t,steps:s,onCurrentIdxChange:a,startStepIdx:l}=e,[i,o]=(0,r.useState)(l||0),[u,d]=(0,r.useState)(0);return(0,r.useEffect)(()=>{l&&o(l)},[l]),(0,r.useEffect)(()=>{a&&a(i)},[i]),(0,n.jsx)(c.Provider,{value:{steps:s,currentStepIdx:i,handleNext:()=>{i!=s.length-1&&(d(i),o(i+1))},handleBack:()=>{0!=i&&(d(i),o(i-1))},handleSelect:e=>{var t;e>=i||null!==(t=s[e])&&void 0!==t&&t.disabled||(d(i),o(e))},previousIndex:u},children:t})}function u(e){let{steps:t,children:s}=e;return(0,n.jsx)(n.Fragment,{children:t.map((e,t)=>s({step:e,index:t}))})}function d(e){let{children:t,step:s}=e;return(0,n.jsx)(c.Consumer,{children:e=>{let{steps:n,currentStepIdx:r,handleSelect:a}=e,l=n.indexOf(s),i=l==n.length-1;return t({isSelected:r===l,handleSelect:a,isCompleted:r>l,isLast:i})}})}let x=e=>{let{children:t,stepIdx:s,animate:r=!1}=e;return(0,n.jsx)(c.Consumer,{children:e=>{let{currentStepIdx:l,previousIndex:i}=e,c=l<i;return r?(0,n.jsx)(a.u,{show:l==s,enter:"transition-all duration-300",enterFrom:c?"transform -translate-x-full opacity-0":"transform translate-x-full opacity-0",enterTo:"transform translate-x-0 opacity-100",leave:"transition-all duration-300",leaveFrom:"transform translate-x-0",leaveTo:c?"transform -translate-x-full opacity-0":"transform translate-x-full",children:t(l===s)}):t(l===s)}})};function m(e){let{children:t}=e;return(0,n.jsx)(c.Consumer,{children:e=>{let{handleNext:s}=e;return t({moveForward:s})}})}function h(e){let{children:t}=e;return(0,n.jsx)(c.Consumer,{children:e=>{let{currentStepIdx:s,handleBack:n}=e;return 0==s?null:t({moveBack:n})}})}function f(e){let{handleNextClick:t,disabled:s,submitFunction:r,onSubmitFail:a,onSubmitSuccess:c,noSubmitMode:o,nextButtonText:u="Next"}=e,d=(e,t)=>{c?c(e,t):t()};return(0,n.jsxs)("div",{className:"flex gap-2 items-center justify-end",children:[(0,n.jsx)(h,{children:e=>{let{moveBack:t}=e;return(0,n.jsx)(l.ZP,{onClick:t,variant:"outline",children:"Back"})}}),(0,n.jsx)(m,{children:e=>{let{moveForward:l}=e;return(0,n.jsx)(i.Z,{submitFunction:r,onSubmitSuccess:e=>d(e,l),onSubmitFail:a,noSubmitMode:o,disabled:s,onSimpleClick:()=>t(l),children:u})}})]})}},41871:function(e,t,s){"use strict";s.d(t,{G:function(){return i},T:function(){return l}});var n=s(85893),r=s(17221),a=s(58490);let l=e=>{let{children:t}=e;return(0,n.jsxs)(r.y,{children:[(0,n.jsx)("div",{className:"flex justify-center md:hidden w-screen h-screen",children:(0,n.jsx)(a.Z,{title:"Please switch to a laptop/desktop.",subTitle:"Mobile view coming soon!"})}),(0,n.jsx)("div",{className:"hidden md:block",children:t})]})},i=e=>(0,n.jsx)(l,{children:e})},46501:function(e,t,s){"use strict";s.d(t,{Q:function(){return i}});var n=s(85893),r=s(11163);s(67294);var a=s(57204),l=s(83358);let i=async e=>{try{let{success:t,isError:s}=await (0,a.kS)();s&&c(),t&&e.push("/")}catch(e){c()}},c=()=>{alert("Something went wrong, please refresh & try again.")};t.Z=e=>{let{children:t}=e,s=(0,r.useRouter)();return(0,n.jsx)("div",{className:" absolute right-0 top-0 mt-6 mr-12 ",children:(0,n.jsx)(l.ZP,{variant:"outline",onClick:()=>i(s),children:t||"Logout"})})}},82586:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return B}});var n=s(85893),r=s(81723),a=s(11163),l=s(67294),i=s(41871),c=s(17221),o=s(50822),u=s(10097),d=s(44892),x=s(3412),m=s(38353),h=s(13999),f=s(48387),p=s(65292),j=s(58294),y=s(46501),g=s(52211),v=s(29525),b=s(74741),k=s(87641),N=s(82010),w=s(72011),S=s(70665),P=s(17790),C=s(6700),Z=s(18140),E=s(33824);let M=[{heading:"Small Business ",text:"Youâre a small seller or business and want to track a few products."},{heading:"Freelancer / Agency ",text:"Youâre a freelancer or part of an agency, thatâs helping multiple other sellers or brands analyze feedback."},{heading:"Large Brand ",text:"Youâre a large business, seller or brand and want to analyse customer feedback from multiple sources."},{heading:"None of the above ",text:"Do tell us more about you. What brings you to Currents?"}];var F=s(96191),_=()=>{let{data:e}=(0,P.jg)(),[t,s]=(0,l.useState)(()=>e?e.business_type:""),[r,i]=(0,l.useState)(),c=e=>e==t,o=(0,a.useRouter)(),{theme:u}=(0,N.F)();(0,l.useEffect)(()=>{e&&s(e.business_type)},[e]);let d=M.slice(0,-1).some(e=>t&&e.heading==t)?"":t,x=!!t&&t.length<150;return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"flex flex-col items-center mt-20",children:[(0,n.jsx)("h2",{className:"font-bold text-2xl",children:"A bit more about your profession."}),(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 md:w-4/5 lg:w-4/5 gap-4 my-4 pt-4",children:M.map((e,t)=>{let{heading:r,text:a}=e,l=c(r);return t==M.length-1?(0,n.jsx)("div",{className:"col-span-1 sm:col-span-2 md:col-span-3 dark:bg-black",onClick:()=>s(),children:(0,n.jsxs)(w.Z,{className:"shadow-none border text-gray-600 ",children:[(0,n.jsx)(C.h.Description,{children:(0,n.jsx)("div",{className:"text-gray-800 dark:bg-black",children:r})}),(0,n.jsx)(S.Z,{field:"textarea",type:"text",maxChars:150,value:d,onChange:e=>s(e),fieldClasses:"textarea-transparent text-sm",placeholder:a,fieldStyles:"dark"==u?{backgroundColor:"black"}:{}})]})},t):(0,n.jsx)(E.W,{isSelected:l,onClick:()=>s(r),children:(0,n.jsxs)(w.Z,{className:"shadow-none ",children:[(0,n.jsx)(C.h.Description,{children:(0,n.jsx)("div",{className:"text-gray-800 pr-2 ",children:r})}),(0,n.jsx)("p",{className:"text-sm py-2 ",children:a})]})},t)})}),r&&(0,n.jsx)(Z.Z,{variant:"error",children:r}),(0,n.jsx)("div",{className:"flex justify-end w-full md:w-4/5 lg:w-4/5 mt-12",children:(0,n.jsx)(f.E0,{disabled:!x,submitFunction:()=>(0,P.Nw)({business_type:t,home_path:(0,F.Xi)(o.asPath,"step",2)}),onSubmitSuccess:(e,t)=>t(),onSubmitFail:e=>i(e)})})]})})},O=s(89637),T=s(34202),D=s(38375),q=s(27850),A=e=>{let{buttons:t,project:s}=e,r=(0,a.useRouter)(),{data:i,isLoading:c,isError:o}=(0,q.x)("manage/tasks",s,2),[u,d]=(0,l.useState)([]),[x,m]=(0,l.useState)(Object.keys(t)[0]),[h,p]=(0,l.useState)(),y=(0,F.FD)(r.asPath,"home");(0,l.useEffect)(()=>
1{if(i&&!o){let e=(0,T.I)(i,null,!1),t=g(e);d(e),t&&p(t)}},[i,o]);let g=e=>{for(let t in e)if(e[t].active)return t},v=e=>!!g(e),b=(e,t)=>{var s,n;let a;if(h.includes("trial")){let t=Object.keys(u[h].durations)[0];a=null===(n=u[h].durations[t])||void 0===n?void 0:n.href,(0,O.Qm)(a),e();return}a=null===(s=u[h].durations[t])||void 0===s?void 0:s.href,r.push(a)},k=(e,t)=>{v(u)?((0,P.Nw)({home_path:y}),e()):b(e,t)};return c?(0,n.jsx)("div",{className:"h-screen-3/4 flex items-center justify-center",children:(0,n.jsx)(j.Z,{})}):i&&u?(0,n.jsxs)("div",{className:"flex flex-col items-center mt-20 ",children:[(0,n.jsx)("h2",{className:"font-bold text-2xl text-center",children:"Select a plan that suits you."}),(0,n.jsxs)("div",{className:"w-full px-4 sm:px-6 lg:px-8",children:[(0,n.jsx)(D.Z,{tiers:u,data:i,planPeriodOptions:t,showPopular:!1,enableSelection:!0,period:x,setPeriod:m,showSavingMsg:!1,onSelect:e=>{e&&p(e)},defaultSelectedKey:h,unitType:"small"}),(0,n.jsx)("div",{className:"flex justify-end w-full my-16",children:(0,n.jsx)(f.E0,{noSubmitMode:!0,handleNextClick:e=>k(e,x),disabled:!h})})]})]}):(0,n.jsx)("div",{})},R=s(44689);function B(){var e;let t=(0,a.useRouter)(),{step:s,payment_status:i}=t.query,{permissions:N}=(0,c.i)(),{isDarkMode:w}=(0,o.P)(),S=(0,d.Rj)((0,u.My)(t.asPath,"home"),"step","payment_status"),C=(0,d.Wf)(),Z=(0,u.zH)(C),[E]=(0,l.useState)([{name:"Profile",status:"current",actionText:"Next"},{name:"Profession",status:"next",actionText:"next"},{name:"Plans",status:"next",actionText:"next"},{name:"Done",status:"next",actionText:"next"}]),[M,F]=(0,l.useState)(0);return((0,l.useEffect)(()=>{s&&F(Number(s))},[s]),(0,l.useEffect)(()=>{"success"==i&&(0,P.Nw)({home_path:S})},[i]),N)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.Z,{title:"Personal Profile | ".concat(null===h.THEME||void 0===h.THEME?void 0:null===(e=h.THEME.seo)||void 0===e?void 0:e.siteName)}),(0,n.jsxs)("div",{className:"dark:bg-black ",children:[(0,n.jsx)(x.M,{queryStr:"payment_status",successMessage:"Payment is Successful",failureMessage:"Payment was unsuccessful! Please try again"}),(0,n.jsxs)(m.nE,{children:[(0,n.jsxs)(g.h4,{className:"flex justify-between items-center w-full py-6",children:[(0,n.jsx)(p.Z,{logoObj:h.THEME.logo,version:"full",isDarkMode:w,className:"h-8 w-auto m-2"}),(0,n.jsx)(y.Z,{})]}),(0,n.jsx)("div",{className:"mx-auto",children:(0,n.jsxs)(f.ZP,{steps:E,startStepIdx:M,children:[M!==E.length-1&&(0,n.jsx)("div",{className:"w-1/2 md:w-1/3 lg:w-1/4 mx-auto",children:(0,n.jsx)("div",{className:"flex",children:(0,n.jsx)(f.cz,{steps:E,children:e=>{let{step:t,index:s}=e;return(0,n.jsx)(f.Ne,{step:t,children:e=>{let{isSelected:t,handleSelect:r,isCompleted:a,isLast:l}=e;return(0,n.jsx)(v.Z,{isSelected:t,onSelect:r,isCompleted:a,isLast:l,index:s})}},s)}})})}),(0,n.jsx)(f.OP,{stepIdx:0,animate:!0,children:e=>e&&(0,n.jsx)(k.ZP,{})}),(0,n.jsx)(f.OP,{stepIdx:1,animate:!0,children:e=>e&&(0,n.jsx)(_,{})}),(0,n.jsx)(f.OP,{stepIdx:2,animate:!0,children:e=>e&&(0,n.jsx)(A,{buttons:R.buttons,project:h.E})}),(0,n.jsx)(f.OP,{stepIdx:3,animate:!0,children:e=>e&&(0,n.jsx)("div",{className:"h-screen-3/4 flex items-center justify-center flex-col ",children:(0,n.jsx)(b.Z,{title:"Awesome! Youâre all setup \uD83D\uDE80",paragraphs:["Get started by adding products to analyze and donât forget to explore various reporting templates."],buttons:[{link:Z,className:"btn btn-blue",text:"Let's Go"}]})})})]})})]})]})]}):(0,n.jsx)("div",{className:"h-screen flex justify-center items-center",children:(0,n.jsx)(j.Z,{})})}B.getLayout=i.G}},function(e){e.O(0,[6342,374,6414,4979,3433,392,747,1650,6431,2017,7584,5613,9214,7867,1804,2888,9774,179],function(){return e(e.s=73212)}),_N_E=e.O()}]); 2//# sourceMappingURL=onboarding-8d9ac865da76a062.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.