(this["webpackJsonpmyra-frontend"]=this["webpackJsonpmyra-frontend"]||[]).push([[0],{119:function(e,t,a){"use strict";a.r(t);var c=a(1),n=a.n(c),s=a(15),r=a.n(s),i=(a(91),a(92),Object(c.createContext)(void 0)),j=a(11),l=a(18),d=a(0);function o(){return Object(d.jsxs)(d.Fragment,{children:[Object(d.jsxs)("div",{className:"tabs has-3",children:[Object(d.jsx)(j.b,{to:"transaction",className:"tab",children:"Transaction"}),Object(d.jsx)(j.b,{to:"disbursement",className:"tab",children:"Disbursement"}),Object(d.jsx)(j.b,{to:"report",className:"tab",children:"Report"})]}),Object(d.jsx)("div",{className:"clearfix"})]})}var b=a(5),u=a.n(b),O=a(2),x=a(10),m=a(8),h=a(154);var p=function(){var e=Object(c.useState)({username:"",password:""}),t=Object(m.a)(e,2),a=t[0],n=t[1],s=Object(c.useContext)(i),r=s.login,o=s.getMyraUsers,b=s.getParameters,p=Object(l.g)();function g(){return(g=Object(x.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,r(a);case 3:return e.next=5,o();case 5:return e.next=7,b();case 7:p.push("/");case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(d.jsx)("div",{children:Object(d.jsxs)("div",{style:{width:"auto",position:"absolute",left:"30%",top:"60%"},className:"border p-30 p-t-60 p-b-40",children:[Object(d.jsx)("div",{className:"title",children:"LOGIN"}),Object(d.jsx)("form",{onSubmit:function(e){return g.apply(this,arguments)},children:Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Username (E-mail) "}),Object(d.jsx)("input",{name:"username",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{username:e.target.value}))},value:a.username})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Password "}),Object(d.jsx)("input",{type:"password",name:"password",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{password:e.target.value}))},value:a.password})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)("button",{className:"button",type:"submit",children:"Login"})})]})}),Object(d.jsx)("div",{style:{paddingTop:30},children:Object(d.jsx)(j.b,{to:"password-reset",children:"Forgot password?"})})]})})},g=Object(c.createContext)(void 0),v=a(158),f=a(159);var y=function(e){var t=Object(c.useContext)(g).getAccount,a=function(){var a=Object(x.a)(u.a.mark((function a(){return u.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t(e.value.id);case 2:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:Object(d.jsxs)(j.b,{to:"/account/".concat(e.value.id),onClick:a,className:"detail-link",children:[Object(d.jsx)("i",{className:"fas fa-eye"}),e.value.accountName]})}),Object(d.jsx)(f.a,{children:e.value.type}),Object(d.jsx)(f.a,{children:e.value.package}),Object(d.jsx)(f.a,{children:e.value.payment}),Object(d.jsx)(f.a,{children:e.value.accountManager.fullName}),Object(d.jsx)(f.a,{children:" 000 TL"})]})})},N=a(160),C=a(161),k=a(162),A=a(163),w=a(164),P=a(170);function S(){var e=Object(c.useState)({accountName:"",companyName:"",brandName:"",userName:"",email:"",accountManager:"",accountType:"",packageCode:"",onlyActive:!1,showBalance:!0,contractEndDate:"",monthlyPayment:!1,frontPayment:!1}),t=Object(m.a)(e,2),a=t[0],n=t[1],s=Object(c.useState)(0),r=Object(m.a)(s,2),l=r[0],o=r[1],b=Object(c.useState)(10),p=Object(m.a)(b,2),S=p[0],E=p[1],T=Object(c.useContext)(g),D=T.getAccounts,R=T.accounts,B=Object(c.useContext)(i),I=B.myraUser,U=B.parameters;function M(){return(M=Object(x.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,D(a);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(d.jsxs)(d.Fragment,{children:[Object(d.jsxs)("div",{className:"tabs",children:[Object(d.jsx)(j.b,{to:"client-management",className:"tab",children:"Client Management"}),Object(d.jsx)(j.b,{to:"brands-query",className:"tab",children:"Brands Query"})]}),Object(d.jsx)("div",{className:"clearfix"}),Object(d.jsx)("div",{className:"create-client",children:Object(d.jsx)("button",{children:Object(d.jsxs)(j.b,{to:"new-account",children:[Object(d.jsx)("i",{className:"fas fa-plus-circle"}),"Create Client"]})})}),Object(d.jsx)("form",{onSubmit:function(e){return M.apply(this,arguments)},children:Object(d.jsxs)(h.a,{container:!0,spacing:1,children:[Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Account Name"}),Object(d.jsx)("input",{type:"text",name:"accountName",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{accountName:e.target.value}))},value:a.accountName})]})}),Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Company Name"}),Object(d.jsx)("input",{type:"text",name:"companyName",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{companyName:e.target.value}))},value:a.companyName})]})}),Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Brand Name"}),Object(d.jsx)("input",{type:"text",name:"brandName",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{brandName:e.target.value}))},value:a.brandName})]})}),Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"User Name"}),Object(d.jsx)("input",{type:"text",name:"userName",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{name:e.target.value}))},value:a.name})]})}),Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"User E-Mail"}),Object(d.jsx)("input",{type:"text",name:"email",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{email:e.target.value}))},value:a.email})]})}),Object(d.jsxs)(h.a,{item:!0,xs:4,children:[Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:a.accountManager,onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{accountManager:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Select Account Manager"}),U.managers.map((function(e){return e.region===I.region?Object(d.jsx)("option",{value:e.id,children:e.fullname},e.id):""})),Object(d.jsx)("option",{value:"",children:"None"})]}),Object(d.jsx)("i",{className:"fas fa-angle-down"})]}),Object(d.jsx)(h.a,{item:!0,style:{height:60},xs:12}),Object(d.jsxs)(h.a,{item:!0,xs:4,children:[Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:a.type,onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{type:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Select Account Type"}),U.accountAndPackageTypes.map((function(e){return Object(d.jsx)("option",{value:e.type,children:e.def},e.type)})),Object(d.jsx)("option",{value:"",children:"None"})]},a.type),Object(d.jsx)("i",{className:"fas fa-angle-down"})]}),Object(d.jsxs)(h.a,{item:!0,xs:4,children:[Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:a.packageCode,onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{packageCode:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Select Package Type"}),U.accountAndPackageTypes.map((function(e){return e.type===a.type?e.packages.map((function(e){return Object(d.jsx)("option",{value:e.type,children:e.name},e.type)})):""}))]}),Object(d.jsx)("i",{className:"fas fa-angle-down"})]}),Object(d.jsxs)(h.a,{item:!0,xs:4,pt:15,children:[Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"onlyActive",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{onlyActive:e.target.checked}))},value:a.onlyActive}),Object(d.jsx)("span",{children:"Only Active"})]}),Object(d.jsxs)("div",{style:{display:"inline-block"},children:[Object(d.jsx)("input",{type:"checkbox",name:"showBalance",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{showBalance:e.target.checked}))},value:a.showBalance}),Object(d.jsx)("span",{children:"Show Balance"})]})]}),Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Contract End Date"}),Object(d.jsx)("input",{type:"date",name:"contractEndDate",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{contractEndDate:e.target.value}))},value:a.contractEndDate})]})}),Object(d.jsxs)(h.a,{item:!0,xs:4,children:[Object(d.jsx)("span",{children:"Payment"}),Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"monthlyPayment",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{monthlyPayment:e.target.checked}))},value:a.paymentTypes}),Object(d.jsx)("span",{children:"Monthly"}),Object(d.jsx)("input",{type:"checkbox",name:"frontPayment",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{frontPayment:e.target.checked}))},value:a.paymentTypes}),Object(d.jsx)("span",{children:"Front Payment"})]})]}),Object(d.jsx)(h.a,{item:!0,xs:4}),Object(d.jsx)(h.a,{item:!0,xs:9}),Object(d.jsx)(h.a,{item:!0,xs:3,children:Object(d.jsx)("button",{className:"button m-t-40",children:"DISPLAY"})}),Object(d.jsx)("div",{className:"clearfix"}),Object(d.jsx)(h.a,{item:!0,style:{height:60},xs:12})]})}),Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(k.a,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:"Account Name"}),Object(d.jsx)(f.a,{children:"Type"}),Object(d.jsx)(f.a,{children:"Package"}),Object(d.jsx)(f.a,{children:"Payment"}),Object(d.jsx)(f.a,{children:"Account Manager"}),Object(d.jsx)(f.a,{children:"Balance"})]})}),Object(d.jsx)(A.a,{children:R?(S>0?R.slice(l*S,l*S+S):R).map((function(e){return Object(d.jsx)(y,{value:e},e.id)})):""}),Object(d.jsx)(w.a,{children:Object(d.jsxs)(v.a,{children:[R.length<=S*(l+1),Object(d.jsx)(P.a,{count:-1===R.length?0:R.length,onPageChange:function(e,t){o(t)},page:l,rowsPerPage:S,onRowsPerPageChange:function(e){E(e.target.value),o(0)}})]})})]})})]})}var E=a(78);var T=function(e){var t=e.children,a=Object(E.a)(e,["children"]),n=Object(c.useContext)(i).isLoggedIn;return Object(d.jsx)(l.b,Object(O.a)(Object(O.a)({},a),{},{render:function(e){var a=e.location;return n?t:Object(d.jsx)(l.a,{to:{pathname:"/login",state:{from:a}}})}}))};var D=function(){return Object(d.jsxs)("div",{children:[Object(d.jsx)("h1",{children:"The page you were trying to access was not found!"}),Object(d.jsx)(j.b,{to:"/client-management",children:"Go to Home page"})]})};var R=function(){var e=Object(c.useContext)(i).myraUser;return Object(d.jsx)("div",{children:Object(d.jsxs)("div",{className:"row m-b-90",children:[Object(d.jsx)("div",{className:"col-xs-4",children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Username "}),Object(d.jsx)("input",{name:"fullname",defaultValue:e.fullname,readOnly:!0})]})}),Object(d.jsx)("div",{className:"col-xs-4",children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Title "}),Object(d.jsx)("input",{name:"title",defaultValue:e.title,readOnly:!0})]})}),Object(d.jsx)("div",{className:"col-xs-4",children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-mail "}),Object(d.jsx)("input",{name:"email",defaultValue:e.email,readOnly:!0})]})}),Object(d.jsx)("div",{className:"col-xs-4",children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Region "}),Object(d.jsx)("input",{name:"region",defaultValue:e.region,readOnly:!0})]})})]})})};var B=function(){var e=Object(c.useState)(""),t=Object(m.a)(e,2),a=t[0],n=t[1],s=Object(c.useContext)(i).passwordReset;return Object(d.jsxs)("div",{style:{width:"auto",position:"absolute",left:"30%",top:"60%"},className:"border p-30 p-t-60 p-b-40",children:[Object(d.jsx)("div",{className:"title",children:"FORGOT PASSWORD"}),Object(d.jsx)("form",{onSubmit:function(e){e.preventDefault(),s(a)},children:Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Username (E-mail) "}),Object(d.jsx)("input",{name:"username",onChange:function(e){return n(e.target.value)},value:a})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)("button",{className:"button",type:"submit",children:"Reset Password"})}),Object(d.jsx)("div",{style:{paddingTop:30},children:Object(d.jsx)(j.b,{to:"login",children:"Back To Login"})})]})})]})},I=Object(c.createContext)(void 0);function U(e){var t=e.headList;return Object(d.jsx)(d.Fragment,{children:Object(d.jsx)(k.a,{children:Object(d.jsx)(v.a,{children:t.map((function(e){return Object(d.jsx)(f.a,{children:e})}))})})})}var M=function(e){return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:e.value.accountName}),Object(d.jsx)(f.a,{children:e.value.accountType}),Object(d.jsx)(f.a,{children:e.value.package}),Object(d.jsx)(f.a,{children:e.value.accountStatus}),Object(d.jsx)(f.a,{children:e.value.brandName}),Object(d.jsx)(f.a,{children:e.value.type}),Object(d.jsx)(f.a,{children:e.value.status}),Object(d.jsx)(f.a,{children:e.value.lastActivateDate}),Object(d.jsx)(f.a,{children:e.value.closeDate})]})})};function F(){var e=Object(c.useState)({brandName:"",closeDateStart:"",closeDateEnd:"",onlyActiveAgency:!1,onlyActiveBrands:!1,onlyPassiveBrands:!1}),t=Object(m.a)(e,2),a=t[0],n=t[1],s=Object(c.useContext)(I),r=s.getBrands,i=s.brandList;function l(){return(l=Object(x.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,r(a);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var o=Object(c.useState)(0),b=Object(m.a)(o,2),p=b[0],g=b[1],f=Object(c.useState)(10),y=Object(m.a)(f,2),k=y[0],S=y[1];return Object(d.jsxs)(d.Fragment,{children:[Object(d.jsxs)("div",{className:"tabs",children:[Object(d.jsx)(j.b,{to:"client-management",className:"tab",children:"Client Management"}),Object(d.jsx)(j.b,{to:"brands-query",className:"tab",children:"Brands Query"})]}),Object(d.jsx)("div",{className:"clearfix"}),Object(d.jsx)("div",{className:"create-client"}),Object(d.jsx)("form",{onSubmit:function(e){return l.apply(this,arguments)},children:Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Company Name"}),Object(d.jsx)("input",{type:"text",name:"accountName",value:a.brandName,onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{brandName:e.target.value}))}})]})}),Object(d.jsxs)(h.a,{item:!0,xs:6,className:"a-right",children:[Object(d.jsxs)("div",{style:{display:"inline-block"},className:"p-t-15",children:[Object(d.jsx)("input",{type:"checkbox",name:"onlyActiveAgency",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{onlyActiveAgency:e.target.checked}))},value:a.onlyActiveAgency}),Object(d.jsx)("span",{children:"Only Active Agency"})]}),Object(d.jsx)("div",{className:"v-line m-l-20"})]}),Object(d.jsxs)(h.a,{item:!0,xs:2,className:"p-l-0 m-r-0",children:[Object(d.jsxs)("div",{style:{paddingTop:5},children:[Object(d.jsx)("input",{type:"checkbox",name:"onlyActiveBrands",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{onlyActiveBrands:e.target.checked}))},value:a.onlyActiveBrands}),Object(d.jsx)("span",{children:"Active Brands"})]}),Object(d.jsxs)("div",{style:{paddingTop:5},children:[Object(d.jsx)("input",{type:"checkbox",name:"onlyPassiveBrands",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{brandsFilter:e.target.checked}))},value:a.onlyPassiveBrands}),Object(d.jsx)("span",{children:"Passive Brands"})]})]}),Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Close Date Start"}),Object(d.jsx)("input",{type:"date",name:"closeDateStart",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{closeDateStart:e.target.value}))},value:a.closeDateStart})]})}),Object(d.jsx)(h.a,{item:!0,xs:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Close Date Start"}),Object(d.jsx)("input",{type:"date",name:"closeDateEnd",onChange:function(e){return n(Object(O.a)(Object(O.a)({},a),{},{closeDateEnd:e.target.value}))},value:a.closeDateEnd})]})}),Object(d.jsx)(h.a,{item:!0,xs:9}),Object(d.jsx)(h.a,{item:!0,xs:3,className:"pull-right",children:Object(d.jsx)("button",{className:"button m-t-40",children:"DISPLAY"})}),Object(d.jsx)(h.a,{item:!0,style:{height:60},xs:12})]})}),i?Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(U,{headList:["Client Name","Type","Package","Agency Status","Brand Name","Brand Type","Brand Status","Last Activate Date","Close Date","Distribution"]}),Object(d.jsx)(A.a,{children:(k>0?i.slice(p*k,p*k+k):i).map((function(e){return Object(d.jsx)(M,{value:e},e.brandId)}))}),Object(d.jsx)(w.a,{children:Object(d.jsxs)(v.a,{children:[i.length<=k*(p+1),Object(d.jsx)(P.a,{count:-1===i.length?0:i.length,onPageChange:function(e,t){g(t)},page:p,rowsPerPage:k,onRowsPerPageChange:function(e){S(e.target.value),g(0)}})]})})]})}):""]})}var L=a(77),q=a.n(L).a.create({baseURL:"https://g5d2vwdi81.execute-api.eu-west-1.amazonaws.com/v1",timeout:1e4,headers:{Authorization:"Bearer ".concat(localStorage.token)}}),z=function(){var e=Object(c.useState)(0),t=Object(m.a)(e,2),a=t[0],n=t[1],s=Object(c.useMemo)((function(){return{request:function(e){return function(e){return n((function(e){return e+1})),e.headers.Authorization="Bearer ".concat(localStorage.token),e}(e)},response:function(e){return function(e){return n((function(e){return e-1})),401===e.status&&(window.location="/login"),e}(e)},error:function(e){return function(e){return n((function(e){return e-1})),Promise.reject(e)}(e)}}}),[]);return Object(c.useEffect)((function(){var e=q.interceptors.request.use(s.request,s.error),t=q.interceptors.response.use(s.response,s.error);return function(){q.interceptors.request.eject(e),q.interceptors.response.eject(t)}}),[s]),[a>0]},G=q;var H=function(e){var t=Object(c.useState)([]),a=Object(m.a)(t,2),n=a[0],s=a[1],r=Object(c.useState)({}),i=Object(m.a)(r,2),j=i[0],l=i[1],o=Object(c.useState)([]),b=Object(m.a)(o,2),O=b[0],h=b[1],p={getAccounts:function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/accounts",t);case 3:a=e.sent,s(a.data.body.accounts),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("getAccounts ERROR >> ",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),accounts:n,createNewAccount:function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/account/new",t);case 3:a=e.sent,l(a.data.body),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("createNewAccount ERROR >> ",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),account:j,getAccount:function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/account/".concat(t));case 3:a=e.sent,l(a.data.body),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("getAccount ERROR >> ",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),updateAccount:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.put("/account/".concat(t),a);case 3:c=e.sent,l(c.data.body),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("updateAccount ERROR >> ",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,a){return e.apply(this,arguments)}}(),getAccountStatus:function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/account/".concat(t,"/status"));case 3:a=e.sent,h(a.data.activationHistory),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("getAccountStatus ERROR >> ",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),activationHistory:O,postNewAction:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/account/".concat(t,"/status"),a);case 3:c=e.sent,h(c.data.activationHistory),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("postNewAction ERROR >> ",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,a){return e.apply(this,arguments)}}()};return Object(d.jsx)(g.Provider,{value:p,children:e.children})},$=a.p+"static/media/logo.44c871cd.svg";var W=function(){var e=Object(c.useContext)(i),t=e.isLoggedIn,a=e.myraUser,n=e.logout;return Object(d.jsxs)("header",{children:[Object(d.jsx)("a",{className:"logo",children:Object(d.jsx)("img",{src:$,alt:"logo"})}),t?Object(d.jsxs)(d.Fragment,{children:[Object(d.jsxs)("div",{className:"acc",children:["Welcome, ",Object(d.jsx)(j.b,{to:"/profile",children:Object(d.jsx)("b",{children:a.fullname})}),Object(d.jsx)("button",{onClick:function(e){e.preventDefault(),n()},children:"Logout"})]}),Object(d.jsx)("div",{className:"clearfix"}),Object(d.jsx)("div",{className:"top-bar clearfix"})]}):Object(d.jsx)(d.Fragment,{children:Object(d.jsx)("div",{className:"acc",children:"Welcome. Please login!"})})]})},V=a(32),J=a(7),Z=a(165),Q=a(166),X=a(172),Y=a(167),K=a(168),_=a(171),ee=Object(J.a)({switchBase:{color:"#ff0000","&$checked":{color:"#4ADE79"},"&$checked + $track":{backgroundColor:"#4ADE79"}},checked:{},track:{backgroundColor:"#ff0000"}})(Z.a);var te=function(){var e=Object(c.useContext)(i),t=e.myraUser,a=e.parameters,n=Object(c.useContext)(g).createNewAccount,s=["USD","EURO","TL"],r=["Local","Global"],j={Fixed:"Fixed",Perbrand:"Per Brand"},l={monthly:"Monthly",frontPayment:"Front Payment"},o={pricing1:"",pricing2:"",pricing3:"",pricing4:"",pricing5:"",pricing6:""},b={accountName:"",accountManagerId:"",status:!0,accountType:"",userName:"",title:"",mobilePhone:"",email:"",webSite:"",address:"",officePhone:"",postalCode:"",state:"",country:"",package:"",onlinePayment:!1,invoicingPage:!1,sendOnlyTest:!1,frontPaymentAmount:"",currency:"",invoicing:"",paymentType:"",pricingModel:"",pricing:"",closeAtEndDate:!1,companyFullName:"",taxOffice:"",taxNo:"",taxPersonEmail:"",invoiceAddress:"",accountingCode:"",accountingContactName:"",accountingContactTitle:"",accountingContactMobilePhone:"",accountingContactEmail:"",note:""},p=Object(c.useState)(b),v=Object(m.a)(p,2),f=v[0],y=v[1];function N(e){y(Object(O.a)(Object(O.a)({},f),{},{package:e.target.value}))}function C(e){y(Object(O.a)(Object(O.a)({},f),{},{currency:e.target.value}))}function k(e){"Fixed"===e.target.value?y(Object(O.a)(Object(O.a)({},f),{},{pricingModel:e.target.value,pricing:""})):"Perbrand"===e.target.value?y(Object(O.a)(Object(O.a)({},f),{},{pricingModel:e.target.value,pricing:o})):y(Object(O.a)(Object(O.a)({},f),{},{pricingModel:"",pricing:""}))}function A(){return(A=Object(x.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,n(f);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var w,P,S,E,T=Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40",children:[Object(d.jsx)("div",{className:"title",children:"LEGAL / TAX"}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Company Full Name"}),Object(d.jsx)("input",{type:"text",name:"companyFullName",value:f.companyFullName,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{companyFullName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Tax Office"}),Object(d.jsx)("input",{type:"text",name:"taxOffice",value:f.taxOffice,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{taxOffice:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Tax No"}),Object(d.jsx)("input",{type:"text",name:"taxNo",value:f.taxNo,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{taxNo:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-mail"}),Object(d.jsx)("input",{type:"text",name:"taxPersonEmail",value:f.taxPersonEmail,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{taxPersonEmail:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:9,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Invoice Address"}),Object(d.jsx)("input",{type:"text",name:"invoiceAddress",value:f.invoiceAddress,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{invoiceAddress:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Accounting Code"}),Object(d.jsx)("input",{type:"text",name:"accountingCode",value:f.accountingCode,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{accountingCode:e.target.value}))}})]})})]})]}),D=Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-t-40",children:[Object(d.jsx)("div",{className:"title",children:"ACCOUNTING CONTACT"}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Name"}),Object(d.jsx)("input",{type:"text",name:"accountingContactName",value:f.accountingContactName,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{accountingContactName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Title"}),Object(d.jsx)("input",{type:"text",name:"accountingContactTitle",value:f.accountingContactTitle,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{accountingContactTitle:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Mobile Phone"}),Object(d.jsx)("input",{type:"text",name:"accountingContactMobilePhone",value:f.accountingContactMobilePhone,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{accountingContactMobilePhone:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-mail"}),Object(d.jsx)("input",{type:"text",name:"accountingContactEmail",value:f.accountingContactEmail,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{accountingContactEmail:e.target.value}))}})]})})]})]}),R=Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-t-40",children:[Object(d.jsx)("div",{className:"title",children:"NOTE"}),Object(d.jsx)(h.a,{container:!0,children:Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)("div",{className:"input text",children:Object(d.jsx)("textarea",{style:{maxHeight:200},value:f.note,onChange:function(e){y(Object(O.a)(Object(O.a)({},f),{},{note:e.target.value}))}})})})})]});switch(f.accountType){case"0":w=Object(d.jsx)("div",{className:"query-form","data-form":"agency",children:Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:[Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"AGREEMENT / PRICING"}),Object(d.jsx)(h.a,{item:!0,xs:12,md:6,children:Object(d.jsx)("div",{className:"border m-0 p-15",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.package,onChange:N,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Package: "}),a.accountAndPackageTypes.map((function(e){return e.type.toString()===f.accountType?e.packages.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.name},e.type)})):""}))]})})})}),Object(d.jsxs)(h.a,{item:!0,xs:12,md:6,style:{marginBottom:15},className:"a-right p-t-20",children:[Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"onlinePayment",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{onlinePayment:e.target.checked}))},value:f.onlinePayment}),Object(d.jsx)("span",{children:"Online Payment"})]}),Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"invoicingPage",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{invoicingPage:e.target.checked}))},value:f.invoicingPage}),Object(d.jsx)("span",{children:"Invoicing Page"})]})]}),Object(d.jsx)(h.a,{item:!0,xs:12,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"sendOnlyTest",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{sendOnlyTest:e.target.checked}))},value:f.sendOnlyTest}),Object(d.jsx)("span",{children:"Send Only Test Users"})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Front Payment Amount"}),Object(d.jsx)("input",{type:"text",name:"frontPaymentAmount",value:f.frontPaymentAmount,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{frontPaymentAmount:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.currency,onChange:C,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Currency: "}),s.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.invoicing,onChange:function(e){y(Object(O.a)(Object(O.a)({},f),{},{invoicing:e.target.value}))},children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Invoicing: "}),r.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)(Q.a,{children:Object(d.jsx)(X.a,{row:!0,value:f.pricingModel,onChange:k,children:Object.keys(j).map((function(e,t){return Object(d.jsx)(K.a,{style:{paddingRight:30},value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:j[e]},e)}))})})}),"Fixed"===f.pricingModel?Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(h.a,{item:!0,xs:12,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Fixed"}),Object(d.jsx)("input",{type:"text",name:"fixedPayment",value:f.pricing,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{pricing:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:8})]}):"Perbrand"===f.pricingModel?Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"1"}),Object(d.jsx)("input",{type:"text",name:"pricing1",value:f.pricing.pricing1,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{pricing:Object(O.a)(Object(O.a)({},f.pricing),{},{pricing1:e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"4-5"}),Object(d.jsx)("input",{type:"text",name:"pricing2",value:f.pricing.pricing2,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{pricing:Object(O.a)(Object(O.a)({},f.pricing),{},{pricing2:e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"6-10"}),Object(d.jsx)("input",{type:"text",name:"pricing3",value:f.pricing.pricing3,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{pricing:Object(O.a)(Object(O.a)({},f.pricing),{},{pricing3:e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"11-30"}),Object(d.jsx)("input",{type:"text",name:"pricing4",value:f.pricing.pricing4,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{pricing:Object(O.a)(Object(O.a)({},f.pricing),{},{pricing4:e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"31-50"}),Object(d.jsx)("input",{type:"text",name:"pricing5",value:f.pricing.pricing5,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{pricing:Object(O.a)(Object(O.a)({},f.pricing),{},{pricing5:e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"51+"}),Object(d.jsx)("input",{type:"text",name:"pricing6",value:f.pricing.pricing6,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{pricing:Object(O.a)(Object(O.a)({},f.pricing),{},{pricing6:e.target.value})}))}})]})})]}):""]}),Object(d.jsx)("div",{className:"col-xs-12 m-t-30 m-b-50",children:Object(d.jsx)("div",{className:"h-line m-t-30"})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:4,md:3,children:Object(d.jsx)("button",{className:"upload-button m-t-40",children:"Upload Local Agreement"})})]})}),P=T,S=null,E=R;break;case"1":w=Object(d.jsx)("div",{className:"query-form","data-form":"corporate",children:Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:[Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"AGREEMENT / PRICING"}),Object(d.jsx)(h.a,{item:!0,xs:12,md:6,children:Object(d.jsx)("div",{className:"border m-0 p-15",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.package,onChange:N,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Package: "}),a.accountAndPackageTypes.map((function(e){return e.type.toString()===f.accountType?e.packages.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.name},e.type)})):""}))]})})})}),Object(d.jsxs)(h.a,{item:!0,xs:12,md:6,style:{marginBottom:15},className:"a-right p-t-20",children:[Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"onlinePayment",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{onlinePayment:e.target.checked}))},value:f.onlinePayment}),Object(d.jsx)("span",{children:"Online Payment"})]}),Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"invoicingPage",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{invoicingPage:e.target.checked}))},value:f.invoicingPage}),Object(d.jsx)("span",{children:"Invoicing Page"})]})]}),Object(d.jsx)(h.a,{item:!0,xs:3,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"sendOnlyTest",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{sendOnlyTest:e.target.checked}))},value:f.sendOnlyTest}),Object(d.jsx)("span",{children:"Send Only Test Users"})]})}),Object(d.jsx)(h.a,{item:!0,xs:3,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"closeAtEndDate",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{closeAtEndDate:e.target.checked}))},value:f.closeAtEndDate}),Object(d.jsx)("span",{children:"Close at End Date"})]})}),Object(d.jsx)(h.a,{item:!0,xs:6}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Agreement Start Date"}),Object(d.jsx)("input",{type:"date",name:"agreementStartDate",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{agreementStartDate:e.target.value}))},value:f.agreementStartDate})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Agreement End Date"}),Object(d.jsx)("input",{type:"date",name:"agreementEndDate",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{agreementEndDate:e.target.value}))},value:f.agreementEndDate})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.invoicing,onChange:C,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Invoicing: "}),r.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Free Amount"}),Object(d.jsx)("input",{type:"text",name:"freeAmount",value:f.freeAmount,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{freeAmount:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:8,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.currency,onChange:C,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Currency: "}),s.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)(Q.a,{children:Object(d.jsx)(X.a,{row:!0,value:f.pricingModel,onChange:k,children:Object.keys(l).map((function(e,t){return Object(d.jsx)(K.a,{style:{paddingRight:30},value:l[e],control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:l[e]},e)}))})})})]}),Object(d.jsx)("div",{className:"col-xs-12 m-t-30 m-b-50",children:Object(d.jsx)("div",{className:"h-line m-t-30"})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:4,md:3,children:Object(d.jsx)("button",{className:"upload-button m-t-40",children:"Upload Local Agreement"})})]})}),P=T,S=D,E=R;break;case"2":w=Object(d.jsx)("div",{className:"query-form","data-form":"sponsored",children:Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:[Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"AGREEMENT / PRICING"}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)("div",{className:"border m-0 p-15",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.package,onChange:N,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Package: "}),a.accountAndPackageTypes.map((function(e){return e.type.toString()===f.accountType?e.packages.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.name},e.type)})):""}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"sendOnlyTest",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{sendOnlyTest:e.target.checked}))},value:f.sendOnlyTest}),Object(d.jsx)("span",{children:"Send Only Test Users"})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Brand Closed Date Start"}),Object(d.jsx)("input",{type:"date",name:"brandClosedDateStart",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{brandClosedDateStart:e.target.value}))},value:f.brandClosedDateStart})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Brand Closed Date End"}),Object(d.jsx)("input",{type:"date",name:"brandClosedDateEnd",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{brandClosedDateEnd:e.target.value}))},value:f.brandClosedDateEnd})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,style:{marginBottom:15},className:"p-t-20",children:Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"passiveBrands",onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{passiveBrands:e.target.checked}))},value:f.passiveBrands}),Object(d.jsx)("span",{children:"Passive Brands"})]})})]}),Object(d.jsx)("div",{className:"col-xs-12 m-t-30 m-b-50",children:Object(d.jsx)("div",{className:"h-line m-t-30"})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:4,md:3,children:Object(d.jsx)("button",{className:"upload-button m-t-40",children:"Upload Local Agreement"})})]})}),P=T,S=D,E=R;break;default:w=null,P=null,S=null,E=null}return Object(d.jsx)("div",{children:Object(d.jsxs)("form",{onSubmit:function(e){return A.apply(this,arguments)},children:[Object(d.jsx)("div",{className:"row p-15 m-t-30",children:Object(d.jsxs)(h.a,{container:!0,alignItems:"center",spacing:4,children:[Object(d.jsx)(h.a,{item:!0,xs:12,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Account Name"}),Object(d.jsx)("input",{type:"text",name:"accountName",value:f.accountName,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{accountName:e.target.value}))}})]})}),Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:4,children:[Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:f.accountManagerId,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{accountManagerId:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Select Account Manager"}),a.managers.map((function(e){return e.region===t.region?Object(d.jsx)("option",{value:e.id,children:e.fullname},e.id):""})),Object(d.jsx)("option",{value:"",children:"None"})]}),Object(d.jsx)("i",{className:"fas fa-angle-down"})]}),Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:4,style:{marginBottom:15},className:"a-right p-t-10",children:["Status:",Object(d.jsx)(K.a,{control:Object(d.jsx)(ee,{checked:f.status,onChange:function(e){y(Object(O.a)(Object(O.a)({},f),{},Object(V.a)({},e.target.name,e.target.checked)))}}),label:Object(d.jsx)("b",{children:!0===f.status?"Active":"Inactive"}),name:"status",labelPlacement:"start"})]})]})}),Object(d.jsx)("div",{className:"border query-checks p-15 m-t-30 m-b-40",children:Object(d.jsx)(h.a,{container:!0,children:Object(d.jsx)(h.a,{item:!0,children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:f.accountType,onChange:function(e){y(Object(O.a)(Object(O.a)({},f),{},{accountType:e.target.value,package:""}))},children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Account Type: "}),a.accountAndPackageTypes.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.def},e.type)}))]})})})})}),Object(d.jsx)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"CONTACT"}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"User Name"}),Object(d.jsx)("input",{type:"text",name:"userName",value:f.userName,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{userName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Title"}),Object(d.jsx)("input",{type:"text",name:"title",value:f.title,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{title:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Mobile Phone"}),Object(d.jsx)("input",{type:"text",name:"mobilePhone",value:f.mobilePhone,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{mobilePhone:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-Mail"}),Object(d.jsx)("input",{type:"text",name:"email",value:f.email,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{email:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Web Site"}),Object(d.jsx)("input",{type:"text",name:"web",value:f.webSite,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{webSite:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:9,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Address"}),Object(d.jsx)("input",{type:"text",name:"address",value:f.address,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{address:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Office Phone"}),Object(d.jsx)("input",{type:"text",name:"officePhone",value:f.officePhone,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{officePhone:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",style:{whiteSpace:"nowrap",overflow:"hidden"},children:[Object(d.jsx)("span",{children:"Post Code"}),Object(d.jsx)("input",{type:"text",name:"postalCode",value:f.postalCode,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{postalCode:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input select",children:[Object(d.jsx)("span",{children:"State"}),Object(d.jsx)("input",{type:"text",name:"state",value:f.state,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{state:e.target.value}))}}),Object(d.jsx)("i",{className:"fas fa-angle-down"})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:f.country,onChange:function(e){return y(Object(O.a)(Object(O.a)({},f),{},{country:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Select Country"}),Object.keys(a.timeZones).map((function(e,t){return Object(d.jsx)("option",{value:e,children:a.timeZones[e].timezone},e)}))]})})]})}),Object(d.jsx)("div",{className:"query-forms",children:w}),Object(d.jsx)("div",{className:"query-forms",children:Object(d.jsxs)("div",{className:"query-form","data-form":"agency",children:[P,S,E]})}),Object(d.jsx)("div",{className:"clearfix"}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:9}),Object(d.jsx)(h.a,{item:!0,xs:3,style:{paddingRight:15},children:Object(d.jsx)("button",{className:"button m-t-40",children:"SAVE AND UPDATE"})})]}),Object(d.jsx)("div",{className:"clearfix"})]})})};function ae(){var e=Object(l.h)().accountId;return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)("div",{className:"top-bar",children:[Object(d.jsx)(j.b,{to:"/account/".concat(e),className:"query-details",children:"DETAILS"}),Object(d.jsx)(j.b,{to:"/account/".concat(e,"/status"),className:"query-status",children:"STATUS"}),Object(d.jsx)(j.b,{to:"/account/".concat(e,"/users"),className:"query-users",children:"USERS"}),Object(d.jsx)(j.b,{to:"/account/".concat(e,"/brands"),className:"query-brands",children:"BRANDS"}),Object(d.jsx)(j.b,{to:"/account/".concat(e,"/financial"),className:"query-financial",children:"FINANCIAL"}),Object(d.jsx)(j.b,{to:"/account/".concat(e,"/credits"),className:"query-credits",children:"CREDITS"})]})})}var ce=Object(J.a)({switchBase:{color:"#ff0000","&$checked":{color:"#4ADE79"},"&$checked + $track":{backgroundColor:"#4ADE79"}},checked:{},track:{backgroundColor:"#ff0000"}})(Z.a);var ne=function(){var e=Object(c.useContext)(i),t=e.myraUser,a=e.parameters,n=Object(c.useContext)(g),s=n.account,r=n.updateAccount,j=["USD","EURO","TL"],o=["Local","Global"],b={Fixed:"Fixed",Perbrand:"Per Brand"},p={monthly:"Monthly",frontPayment:"Front Payment"},v={1:"","4-5":"","6-10":"","11-30":"","31-50":"","51+":""},f={accountName:s.accountName||"",accountManagerId:"",status:!0,accountType:"",userName:"",title:"",mobilePhone:"",email:"",webSite:"",address:"",officePhone:"",postalCode:"",state:"",country:"",package:"",onlinePayment:!1,invoicingPage:!1,sendOnlyTest:!1,frontPaymentAmount:"",currency:"",invoicing:"",paymentType:"",pricingModel:"",pricing:"",closeAtEndDate:!1,companyFullName:"",taxOffice:"",taxNo:"",taxPersonEmail:"",invoiceAddress:"",accountingCode:"",accountingContactName:"",accountingContactTitle:"",accountingContactMobilePhone:"",accountingContactEmail:"",note:""},y=Object(c.useState)(f),N=Object(m.a)(y,2),C=N[0],k=N[1],A=Object(l.h)().accountId;function w(e){k(Object(O.a)(Object(O.a)({},C),{},{package:e.target.value}))}function P(e){k(Object(O.a)(Object(O.a)({},C),{},{currency:e.target.value}))}function S(e){"Fixed"===e.target.value?k(Object(O.a)(Object(O.a)({},C),{},{pricingModel:e.target.value,pricing:""})):"Perbrand"===e.target.value?k(Object(O.a)(Object(O.a)({},C),{},{pricingModel:e.target.value,pricing:v})):k(Object(O.a)(Object(O.a)({},C),{},{pricingModel:"",pricing:""}))}Object(c.useEffect)((function(){k(s)}),[s,r]);var E,T,D,R,B=Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40",children:[Object(d.jsx)("div",{className:"title",children:"LEGAL / TAX"}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Company Full Name"}),Object(d.jsx)("input",{type:"text",name:"companyFullName",value:C.companyFullName,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{companyFullName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Tax Office"}),Object(d.jsx)("input",{type:"text",name:"taxOffice",value:C.taxOffice,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{taxOffice:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Tax No"}),Object(d.jsx)("input",{type:"text",name:"taxNo",value:C.taxNo,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{taxNo:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-mail"}),Object(d.jsx)("input",{type:"text",name:"taxPersonEmail",value:C.taxPersonEmail,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{taxPersonEmail:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:9,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Invoice Address"}),Object(d.jsx)("input",{type:"text",name:"invoiceAddress",value:C.invoiceAddress,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{invoiceAddress:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Accounting Code"}),Object(d.jsx)("input",{type:"text",name:"accountingCode",value:C.accountingCode,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{accountingCode:e.target.value}))}})]})})]})]}),I=Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-t-40",children:[Object(d.jsx)("div",{className:"title",children:"ACCOUNTING CONTACT"}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Name"}),Object(d.jsx)("input",{type:"text",name:"accountingContactName",value:C.accountingContactName,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{accountingContactName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Title"}),Object(d.jsx)("input",{type:"text",name:"accountingContactTitle",value:C.accountingContactTitle,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{accountingContactTitle:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Mobile Phone"}),Object(d.jsx)("input",{type:"text",name:"accountingContactMobilePhone",value:C.accountingContactMobilePhone,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{accountingContactMobilePhone:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-mail"}),Object(d.jsx)("input",{type:"text",name:"accountingContactEmail",value:C.accountingContactEmail,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{accountingContactEmail:e.target.value}))}})]})})]})]}),U=Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-t-40",children:[Object(d.jsx)("div",{className:"title",children:"NOTE"}),Object(d.jsx)(h.a,{container:!0,children:Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)("div",{className:"input text",children:Object(d.jsx)("textarea",{style:{maxHeight:200},value:C.note,onChange:function(e){k(Object(O.a)(Object(O.a)({},C),{},{note:e.target.value}))}})})})})]});switch(C.accountType){case"0":E=Object(d.jsx)("div",{className:"query-form","data-form":"agency",children:Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:[Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"AGREEMENT / PRICING"}),Object(d.jsx)(h.a,{item:!0,xs:12,md:6,children:Object(d.jsx)("div",{className:"border m-0 p-15",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.package,onChange:w,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Package: "}),a.accountAndPackageTypes.map((function(e){return e.type.toString()===C.accountType?e.packages.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.name},e.type)})):""}))]})})})}),Object(d.jsxs)(h.a,{item:!0,xs:12,md:6,style:{marginBottom:15},className:"a-right p-t-20",children:[Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"onlinePayment",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{onlinePayment:e.target.checked}))},value:C.onlinePayment}),Object(d.jsx)("span",{children:"Online Payment"})]}),Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"invoicingPage",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{invoicingPage:e.target.checked}))},value:C.invoicingPage}),Object(d.jsx)("span",{children:"Invoicing Page"})]})]}),Object(d.jsx)(h.a,{item:!0,xs:12,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"sendOnlyTest",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{sendOnlyTest:e.target.checked}))},value:C.sendOnlyTest}),Object(d.jsx)("span",{children:"Send Only Test Users"})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Front Payment Amount"}),Object(d.jsx)("input",{type:"text",name:"frontPaymentAmount",value:C.frontPaymentAmount,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{frontPaymentAmount:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.currency,onChange:P,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Currency: "}),j.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.invoicing,onChange:function(e){k(Object(O.a)(Object(O.a)({},C),{},{invoicing:e.target.value}))},children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Invoicing: "}),o.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)(Q.a,{children:Object(d.jsx)(X.a,{row:!0,value:C.pricingModel,onChange:S,children:Object.keys(b).map((function(e,t){return Object(d.jsx)(K.a,{style:{paddingRight:30},value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:b[e]},e)}))})})}),"Fixed"===C.pricingModel?Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(h.a,{item:!0,xs:12,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Fixed"}),Object(d.jsx)("input",{type:"text",name:"fixedPayment",value:C.pricing,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{pricing:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:8})]}):"Perbrand"===C.pricingModel?Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"1"}),Object(d.jsx)("input",{type:"text",name:"1",value:C.pricing[1],onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{pricing:Object(O.a)(Object(O.a)({},C.pricing),{},{1:e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"4-5"}),Object(d.jsx)("input",{type:"text",name:"4-5",value:C.pricing["4-5"],onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{pricing:Object(O.a)(Object(O.a)({},C.pricing),{},{"4-5":e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"6-10"}),Object(d.jsx)("input",{type:"text",name:"6-10",value:C.pricing["6-10"],onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{pricing:Object(O.a)(Object(O.a)({},C.pricing),{},{"6-10":e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"11-30"}),Object(d.jsx)("input",{type:"text",name:"11-30",value:C.pricing["11-30"],onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{pricing:Object(O.a)(Object(O.a)({},C.pricing),{},{"11-30":e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"31-50"}),Object(d.jsx)("input",{type:"text",name:"31-50",value:C.pricing["31-50"],onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{pricing:Object(O.a)(Object(O.a)({},C.pricing),{},{"31-50":e.target.value})}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,sm:4,md:2,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"51+"}),Object(d.jsx)("input",{type:"text",name:"51+",value:C.pricing["51+"],onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{pricing:Object(O.a)(Object(O.a)({},C.pricing),{},{"51+":e.target.value})}))}})]})})]}):""]}),Object(d.jsx)("div",{className:"col-xs-12 m-t-30 m-b-50",children:Object(d.jsx)("div",{className:"h-line m-t-30"})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:4,md:3,children:Object(d.jsx)("button",{className:"upload-button m-t-40",children:"Upload Local Agreement"})})]})}),T=B,D=null,R=U;break;case"1":E=Object(d.jsx)("div",{className:"query-form","data-form":"corporate",children:Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:[Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"AGREEMENT / PRICING"}),Object(d.jsx)(h.a,{item:!0,xs:12,md:6,children:Object(d.jsx)("div",{className:"border m-0 p-15",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.package,onChange:w,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Package: "}),a.accountAndPackageTypes.map((function(e){return e.type.toString()===C.accountType?e.packages.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.name},e.type)})):""}))]})})})}),Object(d.jsxs)(h.a,{item:!0,xs:12,md:6,style:{marginBottom:15},className:"a-right p-t-20",children:[Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"onlinePayment",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{onlinePayment:e.target.checked}))},value:C.onlinePayment}),Object(d.jsx)("span",{children:"Online Payment"})]}),Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"invoicingPage",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{invoicingPage:e.target.checked}))},value:C.invoicingPage}),Object(d.jsx)("span",{children:"Invoicing Page"})]})]}),Object(d.jsx)(h.a,{item:!0,xs:3,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"sendOnlyTest",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{sendOnlyTest:e.target.checked}))},value:C.sendOnlyTest}),Object(d.jsx)("span",{children:"Send Only Test Users"})]})}),Object(d.jsx)(h.a,{item:!0,xs:3,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"closeAtEndDate",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{closeAtEndDate:e.target.checked}))},value:C.closeAtEndDate}),Object(d.jsx)("span",{children:"Close at End Date"})]})}),Object(d.jsx)(h.a,{item:!0,xs:6}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Agreement Start Date"}),Object(d.jsx)("input",{type:"date",name:"agreementStartDate",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{agreementStartDate:e.target.value}))},value:C.agreementStartDate})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Agreement End Date"}),Object(d.jsx)("input",{type:"date",name:"agreementEndDate",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{agreementEndDate:e.target.value}))},value:C.agreementEndDate})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.invoicing,onChange:P,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Invoicing: "}),o.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Free Amount"}),Object(d.jsx)("input",{type:"text",name:"freeAmount",value:C.freeAmount,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{freeAmount:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:8,children:Object(d.jsx)("div",{className:"border m-0 p-10",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.currency,onChange:P,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Currency: "}),j.map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)(Q.a,{children:Object(d.jsx)(X.a,{row:!0,value:C.pricingModel,onChange:S,children:Object.keys(p).map((function(e,t){return Object(d.jsx)(K.a,{style:{paddingRight:30},value:p[e],control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:p[e]},e)}))})})})]}),Object(d.jsx)("div",{className:"col-xs-12 m-t-30 m-b-50",children:Object(d.jsx)("div",{className:"h-line m-t-30"})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:4,md:3,children:Object(d.jsx)("button",{className:"upload-button m-t-40",children:"Upload Local Agreement"})})]})}),T=B,D=I,R=U;break;case"2":E=Object(d.jsx)("div",{className:"query-form","data-form":"sponsored",children:Object(d.jsxs)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:[Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"AGREEMENT / PRICING"}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)("div",{className:"border m-0 p-15",children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.package,onChange:w,children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Package: "}),a.accountAndPackageTypes.map((function(e){return e.type.toString()===C.accountType?e.packages.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.name},e.type)})):""}))]})})})}),Object(d.jsx)(h.a,{item:!0,xs:12,className:"col-xs-12 m-t-30 m-b-30",children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"sendOnlyTest",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{sendOnlyTest:e.target.checked}))},value:C.sendOnlyTest}),Object(d.jsx)("span",{children:"Send Only Test Users"})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Brand Closed Date Start"}),Object(d.jsx)("input",{type:"date",name:"brandClosedDateStart",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{brandClosedDateStart:e.target.value}))},value:C.brandClosedDateStart})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Brand Closed Date End"}),Object(d.jsx)("input",{type:"date",name:"brandClosedDateEnd",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{brandClosedDateEnd:e.target.value}))},value:C.brandClosedDateEnd})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,style:{marginBottom:15},className:"p-t-20",children:Object(d.jsxs)("div",{style:{display:"inline-block",padding:15},children:[Object(d.jsx)("input",{type:"checkbox",name:"passiveBrands",onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{passiveBrands:e.target.checked}))},value:C.passiveBrands}),Object(d.jsx)("span",{children:"Passive Brands"})]})})]}),Object(d.jsx)("div",{className:"col-xs-12 m-t-30 m-b-50",children:Object(d.jsx)("div",{className:"h-line m-t-30"})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:4,md:3,children:Object(d.jsx)("button",{className:"upload-button m-t-40",children:"Upload Local Agreement"})})]})}),T=B,D=I,R=U;break;default:E=null,T=null,D=null,R=null}function M(){return(M=Object(x.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,r(A,C);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(d.jsxs)("div",{children:[Object(d.jsx)(ae,{}),Object(d.jsxs)("form",{onSubmit:function(e){return M.apply(this,arguments)},children:[Object(d.jsx)("div",{className:"row p-15 m-t-30",children:Object(d.jsxs)(h.a,{container:!0,alignItems:"center",spacing:4,children:[Object(d.jsx)(h.a,{item:!0,xs:12,md:4,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Account Name"}),Object(d.jsx)("input",{type:"text",name:"accountName",value:C.accountName,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{accountName:e.target.value}))}})]})}),Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:4,children:[Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:C.accountManagerId,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{accountManagerId:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Select Account Manager"}),a.managers.map((function(e){return e.region===t.region?Object(d.jsx)("option",{value:e.id,children:e.fullname},e.id):""})),Object(d.jsx)("option",{value:"",children:"None"})]}),Object(d.jsx)("i",{className:"fas fa-angle-down"})]}),Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:4,style:{marginBottom:15},className:"a-right p-t-10",children:["Status:",Object(d.jsx)(K.a,{control:Object(d.jsx)(ce,{checked:C.status,onChange:function(e){k(Object(O.a)(Object(O.a)({},C),{},Object(V.a)({},e.target.name,e.target.checked)))}}),label:Object(d.jsx)("b",{children:!0===C.status?"Active":"Inactive"}),name:"status",labelPlacement:"start"})]})]})}),Object(d.jsx)("div",{className:"border query-checks p-15 m-t-30 m-b-40",children:Object(d.jsx)(h.a,{container:!0,children:Object(d.jsx)(h.a,{item:!0,children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:C.accountType,onChange:function(e){k(Object(O.a)(Object(O.a)({},C),{},{accountType:e.target.value,package:""}))},children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Account Type: "}),a.accountAndPackageTypes.map((function(e){return Object(d.jsx)(K.a,{value:e.type,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e.def},e.type)}))]})})})})}),Object(d.jsx)("div",{className:"border p-30 p-t-60 p-b-40 m-b-40",children:Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"CONTACT"}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"User Name"}),Object(d.jsx)("input",{type:"text",name:"userName",value:C.userName,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{userName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Title"}),Object(d.jsx)("input",{type:"text",name:"title",value:C.title,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{title:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Mobile Phone"}),Object(d.jsx)("input",{type:"text",name:"mobilePhone",value:C.mobilePhone,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{mobilePhone:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-Mail"}),Object(d.jsx)("input",{type:"text",name:"email",value:C.email,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{email:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:12,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Web Site"}),Object(d.jsx)("input",{type:"text",name:"web",value:C.webSite,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{webSite:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,md:9,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Address"}),Object(d.jsx)("input",{type:"text",name:"address",value:C.address,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{address:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Office Phone"}),Object(d.jsx)("input",{type:"text",name:"officePhone",value:C.officePhone,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{officePhone:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input",style:{whiteSpace:"nowrap",overflow:"hidden"},children:[Object(d.jsx)("span",{children:"Post Code"}),Object(d.jsx)("input",{type:"text",name:"postalCode",value:C.postalCode,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{postalCode:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("div",{className:"input select",children:[Object(d.jsx)("span",{children:"State"}),Object(d.jsx)("input",{type:"text",name:"state",value:C.state,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{state:e.target.value}))}}),Object(d.jsx)("i",{className:"fas fa-angle-down"})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:3,children:Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:C.country,onChange:function(e){return k(Object(O.a)(Object(O.a)({},C),{},{country:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Select Country"}),Object.keys(a.timeZones).map((function(e,t){return Object(d.jsx)("option",{value:e,children:a.timeZones[e].timezone},e)}))]})})]})}),Object(d.jsx)("div",{className:"query-forms",children:E}),Object(d.jsx)("div",{className:"query-forms",children:Object(d.jsxs)("div",{className:"query-form","data-form":"agency",children:[T,D,R]})}),Object(d.jsx)("div",{className:"clearfix"}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:9}),Object(d.jsx)(h.a,{item:!0,xs:3,style:{paddingRight:15},children:Object(d.jsx)("button",{className:"button m-t-40",children:"SAVE AND UPDATE"})})]}),Object(d.jsx)("div",{className:"clearfix"})]})]})};var se=function(e){var t=Object(c.useContext)(g).account,a=Object(c.useContext)(i).parameters.accountAndPackageTypes.find((function(e){return e.type===t.accountType}));return Object(d.jsxs)("div",{className:"white-box p-50 m-b-40",children:[Object(d.jsxs)(h.a,{container:!0,className:"info",children:[Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:8,className:" p-t-10",children:[Object(d.jsx)("b",{children:"Account Name : "}),t.accountName," ",Object(d.jsx)("br",{})]}),Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:4,className:"a-right p-t-10",children:["Status: ",Object(d.jsxs)("b",{children:[t.status?"Active":"Inactive"," "]}),Object(d.jsx)(h.a,{item:!0,md:1,className:"status-box",style:{display:"inline-block",backgroundColor:t.status?"#4ADE79":"#FF0000"}})]}),Object(d.jsxs)(h.a,{item:!0,xs:12,style:{marginBottom:15},children:[Object(d.jsx)("b",{children:"Account Type : "})," ",a.def]})]}),e&&!0===e.brands?Object(d.jsxs)(h.a,{container:!0,className:"brand",children:[Object(d.jsxs)(h.a,{item:!0,xs:12,children:[Object(d.jsx)("b",{children:"Total Brands :"})," ",t.brandCounts.total]}),Object(d.jsxs)(h.a,{item:!0,xs:12,children:[Object(d.jsx)("b",{children:"Sub Brands :"})," ",t.brandCounts.sub]})]}):""]})};var re=function(e){return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:e.value.dateAction}),Object(d.jsx)(f.a,{children:e.value.action}),Object(d.jsx)(f.a,{children:e.value.actionBy}),Object(d.jsxs)(f.a,{children:[" ",e.value.reason]}),Object(d.jsxs)(f.a,{children:[" ",e.value.note]})]})})},ie=Object(J.a)({switchBase:{color:"#ff0000","&$checked":{color:"#4ADE79"},"&$checked + $track":{backgroundColor:"#4ADE79"}},checked:{},track:{backgroundColor:"#ff0000"}})(Z.a);var je=function(){var e=Object(l.h)().accountId,t=Object(c.useContext)(g),a=t.getAccountStatus,n=t.activationHistory,s=t.account,r=t.postNewAction,j=Object(c.useContext)(i),o=j.parameters,b=j.myraUser,p=Object(c.useState)(0),y=Object(m.a)(p,2),S=y[0],E=y[1],T=Object(c.useState)(10),D=Object(m.a)(T,2),R=D[0],B=D[1],I=Object(c.useState)({action:"",status:"",holdAction:"",actionBy:b.fullname,autoClosingDate:"",package:s.package,note:"",reason:""}),U=Object(m.a)(I,2),M=U[0],F=U[1],L=o.accountAndPackageTypes.find((function(e){return e.type===s.accountType})).packages.find((function(e){return"ax"===e.type}));function q(){return(q=Object(x.a)(u.a.mark((function t(a){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a.preventDefault(),t.next=3,r(e,M);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return Object(c.useEffect)((function(){console.log("actionObj",JSON.stringify(M))}),[M]),Object(c.useEffect)((function(){a(e)}),[]),Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(ae,{}),Object(d.jsx)(se,{}),Object(d.jsx)("h3",{children:"Account Activation History"}),Object(d.jsx)("div",{children:Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(k.a,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:"Date"}),Object(d.jsx)(f.a,{children:"Action"}),Object(d.jsx)(f.a,{children:"Action Owner"}),Object(d.jsx)(f.a,{children:"Reason"}),Object(d.jsx)(f.a,{children:"Note"})]})}),Object(d.jsx)(A.a,{children:(R>0?n.slice(S*R,S*R+R):n).map((function(e){return Object(d.jsx)(re,{value:e},e.dateAction)}))}),Object(d.jsx)(w.a,{children:Object(d.jsxs)(v.a,{children:[n.length<=R*(S+1),Object(d.jsx)(P.a,{count:-1===n.length?0:n.length,onPageChange:function(e,t){E(t)},page:S,rowsPerPage:R,onRowsPerPageChange:function(e){B(e.target.value),E(0)}})]})})]})})}),Object(d.jsxs)("form",{onSubmit:function(e){return q.apply(this,arguments)},children:[Object(d.jsx)("div",{className:"row m-t-50",children:Object(d.jsx)("div",{className:"border",style:{padding:20},children:Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)("div",{className:"title",children:"NEW ACTION"}),Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:3,style:{marginBottom:15},className:"a-left p-t-10",children:["Status:",Object(d.jsx)(K.a,{control:Object(d.jsx)(ie,{checked:M.status,onChange:function(e){var t;F(Object(O.a)(Object(O.a)({},M),{},(t={},Object(V.a)(t,e.target.name,e.target.checked),Object(V.a)(t,"action",e.target.checked?"Open":"Close"),t)))}}),label:Object(d.jsx)("b",{children:!0===M.status?"Active":"Inactive"}),name:"status",labelPlacement:"start"})]}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:4,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Automatic Closing Day"}),Object(d.jsx)("input",{type:"date",name:"autoClosingDate",onChange:function(e){return F(Object(O.a)(Object(O.a)({},M),{},{autoClosingDate:e.target.value}))},value:M.autoClosingDate})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,md:5,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Package"}),Object(d.jsx)("input",{type:"text",disabled:!0,name:"packageName",value:L.name})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,style:{marginTop:40},children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:M.reason,onChange:function(e){F(Object(O.a)(Object(O.a)({},M),{},{reason:e.target.value}))},children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Activation Reason: "}),["Finance","Customer","Other"].map((function(e){return Object(d.jsx)(K.a,{value:e,control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})}),Object(d.jsx)(h.a,{item:!0,xs:12,style:{marginTop:50},children:Object(d.jsxs)("div",{className:"input text",children:[Object(d.jsx)("span",{children:"Note"}),Object(d.jsx)("textarea",{style:{maxHeight:200},value:M.note,onChange:function(e){F(Object(O.a)(Object(O.a)({},M),{},{note:e.target.value}))}})]})})]})})}),Object(d.jsx)("div",{className:"clearfix"}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:9}),Object(d.jsx)(h.a,{item:!0,xs:3,style:{paddingRight:15},children:Object(d.jsx)("button",{className:"button m-t-40",children:"SAVE AND UPDATE"})})]}),Object(d.jsx)("div",{className:"clearfix"})]})]})},le=a(22);function de(e){var t=e.closePopup,a=e.isActive,n=e.masterBrands,s={brandName:"",type:"",status:!0,masterBrandId:"",expireDate:"",autoRenewal:!1},r=Object(l.h)().accountId,i=Object(c.useContext)(I).addNewAccountBrand,j=Object(c.useState)(s),o=Object(m.a)(j,2),b=o[0],p=o[1];function g(){return(g=Object(x.a)(u.a.mark((function e(a){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.preventDefault(),e.next=3,i(r,b);case 3:return p(s),e.next=6,t();case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)("div",{className:"popup ".concat(a?"active":""," "),children:[Object(d.jsx)("div",{className:"tint"}),Object(d.jsxs)("div",{className:"box active",children:[Object(d.jsx)("div",{className:"title",children:"CREATE BRAND"}),Object(d.jsxs)("div",{className:"cls",children:["Close window",Object(d.jsx)("i",{onClick:t,children:Object(d.jsx)(le.e,{})})]}),Object(d.jsx)("form",{onSubmit:function(e){return g.apply(this,arguments)},children:Object(d.jsxs)(h.a,{container:!0,spacing:2,className:"p-60",children:[Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Brand Name"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:b.brandName,onChange:function(e){return p(Object(O.a)(Object(O.a)({},b),{},{brandName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:b.country,onChange:function(e){return p(Object(O.a)(Object(O.a)({},b),{},{type:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Brand Type"}),["Master","Sub-brand"].map((function(e){return Object(d.jsx)("option",{value:e,children:e},e)}))]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:b.country,onChange:function(e){return p(Object(O.a)(Object(O.a)({},b),{},{country:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Master Brand"}),n.map((function(e){return Object(d.jsx)("option",{value:e.brandId,children:e.brandName},e.brandId)}))]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Expire Date"}),Object(d.jsx)("input",{type:"date",name:"agreementStartDate",onChange:function(e){return p(Object(O.a)(Object(O.a)({},b),{},{expireDate:e.target.value}))},value:b.expireDate})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"closeAtEndDate",onChange:function(e){return p(Object(O.a)(Object(O.a)({},b),{},{autoRenewal:e.target.checked}))},value:b.autoRenewal}),Object(d.jsx)("span",{children:"Auto Renewal"})]})}),Object(d.jsx)(h.a,{item:!0,xs:4,style:{marginTop:40},children:Object(d.jsx)("button",{className:"button",children:"CREATE BRAND"})})]})})]})]})})}function oe(e){return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:e.value.date}),Object(d.jsx)(f.a,{children:e.value.action}),Object(d.jsx)(f.a,{children:e.value.user}),Object(d.jsx)(f.a,{children:e.value.detail})]})})}function be(e){var t=e.closePopup,a=e.isActive,n=e.accountBrand,s=e.masterBrands,r=e.brandActions,i=Object(l.h)().accountId,j=["Master","Sub-brand"],o=Object(c.useState)({brandId:"",brandName:"",type:"",masterBrand:"",expireDate:"",autoRenewal:!0}),b=Object(m.a)(o,2),p=b[0],g=b[1],y=Object(c.useState)({date:"",action:"",user:"",detail:""}),S=Object(m.a)(y,2),E=(S[0],S[1]),T=Object(c.useContext)(I).updateAccountBrand;function D(){return(D=Object(x.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,T(i,p.brandId,p);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(c.useEffect)((function(){g({brandId:n.brandId,brandName:n.brandName,type:n.type,masterBrand:n.masterBrand?n.masterBrand.id:n.brandId,expireDate:n.expireDate,autoRenewal:n.autoRenewal}),E({date:r.date,action:r.action,user:r.user,detail:r.detail})}),[n]);var R=Object(c.useState)(0),B=Object(m.a)(R,2),U=B[0],M=B[1],F=Object(c.useState)(10),L=Object(m.a)(F,2),q=L[0],z=L[1];return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)("div",{className:"popup ".concat(a?"active":""," "),children:[Object(d.jsx)("div",{className:"tint"}),Object(d.jsxs)("div",{className:"box active",children:[Object(d.jsx)("div",{className:"title",children:"BRAND DETAILS"}),Object(d.jsxs)("div",{className:"cls",children:["Close window",Object(d.jsx)("i",{onClick:t,children:Object(d.jsx)(le.e,{})})]}),Object(d.jsx)("form",{onSubmit:function(e){return D.apply(this,arguments)},children:Object(d.jsxs)(h.a,{container:!0,spacing:2,className:"p-60",children:[Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Brand Name"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:p.brandName,onChange:function(e){return g(Object(O.a)(Object(O.a)({},p),{},{brandName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:p.type,onChange:function(e){return g(Object(O.a)(Object(O.a)({},p),{},{type:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Brand Type"}),j.map((function(e){return Object(d.jsx)("option",{value:j.indexOf(e),children:e},j.indexOf(e))}))]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:0===p.masterBrand?p.brandId:p.masterBrand,onChange:function(e){return g(Object(O.a)(Object(O.a)({},p),{},{masterBrand:e.target.value}))},children:[Object(d.jsx)("option",{disabled:!0,value:0,children:"Master Brand"}),s.map((function(e){return Object(d.jsx)("option",{value:e.brandId,children:e.brandName},e.brandId)}))]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("div",{className:"input date",children:[Object(d.jsx)("i",{className:"fas fa-calendar"}),Object(d.jsx)("span",{children:"Expire Date"}),Object(d.jsx)("input",{type:"date",name:"agreementStartDate",onChange:function(e){return g(Object(O.a)(Object(O.a)({},p),{},{expireDate:e.target.value}))},value:p.expireDate})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsxs)("div",{children:[Object(d.jsx)("input",{type:"checkbox",name:"closeAtEndDate",onChange:function(e){return g(Object(O.a)(Object(O.a)({},p),{},{autoRenewal:e.target.checked}))},value:p.autoRenewal}),Object(d.jsx)("span",{children:"Auto Renewal"})]})}),Object(d.jsxs)(h.a,{container:!0,spacing:2,children:[Object(d.jsx)(h.a,{item:!0,xs:8}),Object(d.jsx)(h.a,{item:!0,xs:4,style:{paddingRight:15},children:Object(d.jsx)("button",{className:"button m-t-40",children:"UPDATE"})})]})]})}),Object(d.jsx)("div",{children:Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(k.a,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:"Date"}),Object(d.jsx)(f.a,{children:"Action"}),Object(d.jsx)(f.a,{children:"User"}),Object(d.jsx)(f.a,{children:"Detail"})]})}),Object(d.jsx)(A.a,{children:(q>0?r.slice(U*q,U*q+q):r).map((function(e){return Object(d.jsx)(oe,{value:e})}))}),Object(d.jsx)(w.a,{children:Object(d.jsxs)(v.a,{children:[r.length<=q*(U+1),Object(d.jsx)(P.a,{count:-1===r.length?0:r.length,onPageChange:function(e,t){M(t)},page:U,rowsPerPage:q,onRowsPerPageChange:function(e){z(e.target.value),M(0)}})]})})]})})}),Object(d.jsx)("div",{children:Object(d.jsxs)(h.a,{container:!0,spacing:2,className:"p-60",children:[Object(d.jsx)(h.a,{item:!0,xs:8}),Object(d.jsx)(h.a,{item:!0,xs:4,style:{paddingRight:15},children:Object(d.jsx)("button",{className:"button m-t-40",children:"USER MANAGEMENT"})})]})})]})]})})}function ue(e){var t=e.closePopup,a=e.isActive,n=Object(c.useState)({}),s=Object(m.a)(n,2),r=s[0],i=s[1];return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)("div",{className:"popup ".concat(a?"active":""," "),children:[Object(d.jsx)("div",{className:"tint"}),Object(d.jsxs)("div",{className:"box active",children:[Object(d.jsx)("div",{className:"title",children:"BRAND DISTRIBUTION"}),Object(d.jsxs)("div",{className:"cls",children:["Close window",Object(d.jsx)("i",{onClick:t,children:Object(d.jsx)(le.e,{})})]}),Object(d.jsx)("form",{children:Object(d.jsxs)(h.a,{container:!0,spacing:2,className:"p-60",children:[Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Brand Name"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:r.brandName,onChange:function(e){return i(Object(O.a)(Object(O.a)({},r),{},{brandName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Brand Type"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:r.type,onChange:function(e){return i(Object(O.a)(Object(O.a)({},r),{},{type:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:6,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Main Brand"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:r.mainBrand,onChange:function(e){return i(Object(O.a)(Object(O.a)({},r),{},{mainBrand:e.target.value}))}})]})})]})}),Object(d.jsx)("div",{children:Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(k.a,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:"Period"}),Object(d.jsx)(f.a,{children:"Release"}),Object(d.jsx)(f.a,{children:"Invitation"}),Object(d.jsx)(f.a,{children:"Details"})]})}),Object(d.jsxs)(A.a,{children:[Object(d.jsx)(f.a,{children:"Not implemented"}),Object(d.jsx)(f.a,{children:"Not implemented"}),Object(d.jsx)(f.a,{children:"Not implemented"}),Object(d.jsx)(f.a,{children:"Not implemented"})]})]})})})]})]})})}function Oe(e){var t=e.value,a=Object(c.useState)(!1),n=Object(m.a)(a,2),s=n[0],r=n[1],i=Object(c.useState)(!1),o=Object(m.a)(i,2),b=o[0],O=o[1],h=Object(l.h)().accountId;function p(){return(p=Object(x.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(!1);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=Object(x.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:O(!1);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var y=Object(c.useContext)(I),N=y.getAccountBrand,C=y.accountBrands,k=y.accountBrand,A=y.accountBrandActions,w=y.getAccountBrandDistribution,P=y.accountBrandDistribution,S=function(){var e=Object(x.a)(u.a.mark((function e(a){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.preventDefault(),r(!0),e.next=4,N(h,t.accountBrand.brandId);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=Object(x.a)(u.a.mark((function e(a){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.preventDefault(),O(!0),e.next=4,w(h,t.accountBrand.brandId);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(d.jsxs)(d.Fragment,{children:[Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:Object(d.jsxs)(j.b,{onClick:S,className:"detail-link",children:[Object(d.jsx)("i",{children:Object(d.jsx)(le.d,{})})," ",t.accountBrand.brandId]})}),Object(d.jsx)(f.a,{children:t.accountBrand.brandName}),Object(d.jsx)(f.a,{children:"Master"===t.accountBrand.type?t.accountBrand.brandName:t.accountBrand.masterBrand.name}),Object(d.jsx)(f.a,{children:t.accountBrand.expireDate}),Object(d.jsx)(f.a,{children:t.accountBrand.autoRenewal?"Auto":"Manual"}),Object(d.jsx)(f.a,{children:t.accountBrand.type}),Object(d.jsx)(f.a,{children:t.accountBrand.status}),Object(d.jsxs)(f.a,{children:["".concat(t.accountBrand.distribution.distribution.sent," + ").concat(t.accountBrand.distribution.distribution.scheduled," "),Object(d.jsx)(j.b,{onClick:E,className:"detail-link",children:Object(d.jsx)("i",{className:"settings open-popup",children:Object(d.jsx)(le.a,{style:{verticalAlign:"middle"}})})})]})]}),Object(d.jsx)(be,{closePopup:function(){return p.apply(this,arguments)},isActive:s,accountBrand:k,brandActions:A,masterBrands:C.filter((function(e){return"Master"===e.type}))}),Object(d.jsx)(ue,{closePopup:function(){return g.apply(this,arguments)},isActive:b,brandDistribution:P})]})}function xe(){var e=Object(l.h)().accountId,t=Object(c.useState)(0),a=Object(m.a)(t,2),n=a[0],s=a[1],r=Object(c.useState)(10),i=Object(m.a)(r,2),j=i[0],o=i[1],b=Object(c.useState)(!1),O=Object(m.a)(b,2),h=O[0],p=O[1],g=Object(c.useContext)(I),f=g.getAccountBrands,y=g.accountBrands;function k(){return(k=Object(x.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(!1);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(c.useEffect)((function(){f(e)}),[]);return Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(ae,{}),Object(d.jsx)(se,{brands:!0}),Object(d.jsx)("div",{children:y?Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(U,{headList:["ID","Brand","Master Brand","Expire Date","Renewal","Type","Status","Distribution"]},y.brandId),Object(d.jsx)(A.a,{children:(j>0?y.slice(n*j,n*j+j):y).map((function(t){return Object(d.jsx)(Oe,{value:{accountId:e,accountBrand:t}},t.brandId)}))}),Object(d.jsx)(w.a,{children:Object(d.jsxs)(v.a,{children:[y.length<=j*(n+1),Object(d.jsx)(P.a,{count:-1===y.length?0:y.length,onPageChange:function(e,t){s(t)},page:n,rowsPerPage:j,onRowsPerPageChange:function(e){o(e.target.value),s(0)}})]})})]})}):""}),Object(d.jsxs)("div",{className:"add-user open-popup m-t-20","data-popup":"create",children:[Object(d.jsx)("button",{className:"plus-button",onClick:function(e){return p(!0)}}),Object(d.jsx)("p",{style:{display:"inline-block",position:"relative",marginLeft:15,verticalAlign:"middle"},children:" Add Brand"})]}),Object(d.jsx)(de,{closePopup:function(){return k.apply(this,arguments)},isActive:h,masterBrands:y.filter((function(e){return"Master"===e.type}))})]})}function me(){return Object(d.jsxs)("div",{children:[Object(d.jsx)(ae,{}),Object(d.jsx)(se,{}),Object(d.jsx)("h1",{children:"FINANCIAL PAGE"})]})}function he(){return Object(d.jsxs)("div",{children:[Object(d.jsx)(ae,{}),Object(d.jsx)(se,{}),Object(d.jsx)("h1",{children:"CREDITS PAGE"})]})}var pe=Object(c.createContext)(void 0);function ge(e){var t=e.closePopup,a=e.isActive,c=e.user;return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)("div",{className:"popup ".concat(a?"active":""," "),children:[Object(d.jsx)("div",{className:"tint"}),Object(d.jsxs)("div",{className:"box active",children:[Object(d.jsx)("div",{className:"title",children:"USER DETAILS"}),Object(d.jsxs)("div",{className:"cls",children:["Close window",Object(d.jsx)("i",{onClick:t,children:Object(d.jsx)(le.e,{})})]}),Object(d.jsx)("div",{className:"p-60",children:Object(d.jsxs)(h.a,{container:!0,children:[Object(d.jsx)(h.a,{item:!0,xs:12,sm:6,children:Object(d.jsx)("b",{children:"".concat(c.firstName," ").concat(c.lastName)})}),Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,className:"a-right p-t-10",children:["Status: ",Object(d.jsxs)("b",{children:[c.status," "]}),Object(d.jsx)(h.a,{item:!0,md:1,className:"status-box",style:{display:"inline-block",backgroundColor:"Active"===c.status?"#4ADE79":"#FF0000"}})]})]})}),Object(d.jsx)("div",{children:Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(k.a,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:"Date"}),Object(d.jsx)(f.a,{children:"Action"}),Object(d.jsx)(f.a,{children:"Role"}),Object(d.jsx)(f.a,{children:"Person"})]})}),Object(d.jsxs)(A.a,{children:[Object(d.jsx)(f.a,{children:"Not implemented"}),Object(d.jsx)(f.a,{children:"Not implemented"}),Object(d.jsx)(f.a,{children:"Not implemented"}),Object(d.jsx)(f.a,{children:"Not implemented"})]})]})})})]})]})})}var ve=function(e){var t=e.value,a=Object(l.h)().accountId,n=Object(c.useContext)(pe).getAccountUser,s=Object(c.useState)(!1),r=Object(m.a)(s,2),i=r[0],o=r[1];function b(){return(b=Object(x.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(!1);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O=function(){var e=Object(x.a)(u.a.mark((function e(c){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.preventDefault(),o(!0),e.next=4,n(a,t.accountUser.id);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(d.jsxs)(d.Fragment,{children:[t?Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:Object(d.jsxs)(j.b,{onClick:O,className:"detail-link",children:[Object(d.jsx)("i",{className:"fas fa-eye"}),Object(d.jsx)("i",{children:Object(d.jsx)(le.d,{})})," ",t.accountUser.id]})}),Object(d.jsx)(f.a,{children:t.accountUser.firstName}),Object(d.jsx)(f.a,{children:t.accountUser.lastName}),Object(d.jsx)(f.a,{children:t.accountUser.email}),Object(d.jsx)(f.a,{children:t.accountUser.role}),Object(d.jsx)(f.a,{children:t.accountUser.status})]}):"",Object(d.jsx)(ge,{closePopup:function(){return b.apply(this,arguments)},isActive:i,accountId:a,user:t.accountUser})]})};function fe(e){var t=e.closePopup,a=e.isActive,n={firstName:"",lastName:"",email:"",role:"",status:!0},s=Object(c.useState)(n),r=Object(m.a)(s,2),i=r[0],j=r[1],o=Object(l.h)().accountId,b={User:"0",Admin:"1"},p=Object(c.useContext)(pe).newAccountUser;function g(){return(g=Object(x.a)(u.a.mark((function e(a){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.preventDefault(),e.next=3,p(o,i);case 3:return j(n),e.next=6,t();case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)("div",{className:"popup ".concat(a?"active":""," "),children:[Object(d.jsx)("div",{className:"tint"}),Object(d.jsxs)("div",{className:"box active",children:[Object(d.jsx)("div",{className:"title",children:"CREATE USER"}),Object(d.jsxs)("div",{className:"cls",children:["Close window",Object(d.jsx)("i",{onClick:t,children:Object(d.jsx)(le.e,{})})]}),Object(d.jsx)("form",{onSubmit:function(e){return g.apply(this,arguments)},children:Object(d.jsxs)(h.a,{container:!0,className:"p-60",children:[Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"First Name"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:i.firstName,onChange:function(e){return j(Object(O.a)(Object(O.a)({},i),{},{firstName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"Last Name"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:i.lastName,onChange:function(e){return j(Object(O.a)(Object(O.a)({},i),{},{lastName:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsxs)("div",{className:"input",children:[Object(d.jsx)("span",{children:"E-Mail"}),Object(d.jsx)("input",{type:"text",name:"firstName",value:i.email,onChange:function(e){return j(Object(O.a)(Object(O.a)({},i),{},{email:e.target.value}))}})]})}),Object(d.jsx)(h.a,{item:!0,xs:12,children:Object(d.jsx)(Q.a,{children:Object(d.jsxs)(X.a,{row:!0,value:i.role,onChange:function(e){j(Object(O.a)(Object(O.a)({},i),{},{role:e.target.value}))},children:[Object(d.jsx)(Y.a,{disabled:!0,style:{alignItems:"center",display:"flex",paddingRight:15},children:"Role: "}),Object.keys(b).map((function(e,t){return Object(d.jsx)(K.a,{value:b[e],control:Object(d.jsx)(_.a,{size:"small",color:"default"}),label:e},e)}))]})})}),Object(d.jsx)(h.a,{item:!0,xs:4,style:{marginTop:40},children:Object(d.jsx)("button",{className:"button",children:"CREATE USER"})})]})})]})]})})}function ye(){var e=Object(c.useContext)(pe),t=e.getAccountUsers,a=e.accountUsers,n={User:"0",Admin:"1"},s=Object(l.h)().accountId,r=Object(c.useState)(0),i=Object(m.a)(r,2),j=i[0],o=i[1],b=Object(c.useState)(10),O=Object(m.a)(b,2),p=O[0],g=O[1],y=Object(c.useState)(!1),S=Object(m.a)(y,2),E=S[0],T=S[1],D=Object(c.useState)(""),R=Object(m.a)(D,2),B=R[0],I=R[1];function U(){return M.apply(this,arguments)}function M(){return(M=Object(x.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(s);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(){return(F=Object(x.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T(!1);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(c.useEffect)((function(){B?U().then(a.filter((function(e){return e.role===B}))):U()}),[B]),Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(ae,{}),Object(d.jsx)(se,{}),Object(d.jsx)(h.a,{container:!0,spacing:2,className:"row m-t-90",children:Object(d.jsxs)(h.a,{item:!0,xs:12,sm:6,md:4,children:[Object(d.jsxs)("select",{style:{width:"100%",paddingLeft:20},value:B,onChange:function(e){return I(e.target.value)},children:[Object(d.jsx)("option",{disabled:!0,value:"",children:"Filter"}),Object.keys(n).map((function(e,t){return Object(d.jsx)("option",{value:e,children:e},n[e])})),Object(d.jsx)("option",{value:"",children:"None"})]}),Object(d.jsx)("i",{className:"fas fa-angle-down"})]})}),Object(d.jsx)("div",{children:Object(d.jsx)(N.a,{children:Object(d.jsxs)(C.a,{className:"data-table dataTable no-footer",children:[Object(d.jsx)(k.a,{children:Object(d.jsxs)(v.a,{children:[Object(d.jsx)(f.a,{children:"ID"}),Object(d.jsx)(f.a,{children:"First Name"}),Object(d.jsx)(f.a,{children:"Last Name"}),Object(d.jsx)(f.a,{children:"E-mail"}),Object(d.jsx)(f.a,{children:"Role"}),Object(d.jsx)(f.a,{children:"Status"})]})}),Object(d.jsx)(A.a,{children:(p>0?a.slice(j*p,j*p+p):a).map((function(e){return Object(d.jsx)(ve,{value:{accountId:s,accountUser:e}},e.id)}))}),Object(d.jsx)(w.a,{children:Object(d.jsxs)(v.a,{children:[a.length<=p*(j+1),Object(d.jsx)(P.a,{count:-1===a.length?0:a.length,onPageChange:function(e,t){o(t)},page:j,rowsPerPage:p,onRowsPerPageChange:function(e){g(e.target.value),o(0)}})]})})]})})}),Object(d.jsxs)("div",{className:"add-user open-popup m-t-20","data-popup":"create",children:[Object(d.jsx)("button",{className:"plus-button",onClick:function(e){return T(!0)}}),Object(d.jsx)("p",{style:{display:"inline-block",position:"relative",marginLeft:15,verticalAlign:"middle"},children:" Add User"})]}),Object(d.jsx)(fe,{closePopup:function(){return F.apply(this,arguments)},isActive:E})]})}var Ne=function(e){var t=Object(c.useState)([]),a=Object(m.a)(t,2),n=a[0],s=a[1],r=Object(c.useState)({}),i=Object(m.a)(r,2),j=i[0],l=i[1],o=Object(c.useState)([]),b=Object(m.a)(o,2),O=b[0],h=b[1],p={getAccountUsers:function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/account/".concat(t,"/users"));case 3:if("404"!==(a=e.sent).data.stat){e.next=6;break}return e.abrupt("return",a.data.message);case 6:return s(a.data.body.users),e.abrupt("return",a.data.body.users);case 10:e.prev=10,e.t0=e.catch(0),console.log("getAccountUsers ERROR >> ",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}(),accountUsers:n,getAccountUser:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/account/".concat(t,"/user/").concat(a));case 3:return c=e.sent,l(c.data.body.user),e.abrupt("return",c.data.body.user);case 8:e.prev=8,e.t0=e.catch(0),console.log("getAccountUser ERROR >> ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,a){return e.apply(this,arguments)}}(),accountUser:j,newAccountUser:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/account/".concat(t,"/user/new"),a);case 3:return c=e.sent,l(c.data.body.user),e.abrupt("return",c.data.body.user);case 8:e.prev=8,e.t0=e.catch(0),console.log("newAccountUser ERROR >> ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,a){return e.apply(this,arguments)}}(),getAccountUserStatus:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/account/".concat(t,"/user/").concat(a,"/status"));case 3:return c=e.sent,h(c.data.body.user),e.abrupt("return",c.data.body.user);case 8:e.prev=8,e.t0=e.catch(0),console.log("getAccountUserStatus ERROR >> ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,a){return e.apply(this,arguments)}}(),accountUserStatus:O};return Object(d.jsx)(pe.Provider,{value:p,children:e.children})};var Ce=function(e){var t=Object(c.useState)([]),a=Object(m.a)(t,2),n=a[0],s=a[1],r=Object(c.useState)({}),i=Object(m.a)(r,2),j=i[0],l=i[1],o=Object(c.useState)([]),b=Object(m.a)(o,2),O=b[0],h=b[1],p=Object(c.useState)([]),g=Object(m.a)(p,2),v=g[0],f=g[1],y=function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/brands",t);case 3:if("404"!==(a=e.sent).data.statusCode){e.next=6;break}return e.abrupt("return",a.data.message);case 6:return s(a.data.body.brands),e.abrupt("return",a.data.body.brands);case 10:e.prev=10,e.t0=e.catch(0),console.log("getBrands ERROR >> ",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/account/".concat(t,"/brands"));case 3:if("404"!==(a=e.sent).data.statusCode){e.next=6;break}return e.abrupt("return",a.data.message);case 6:return h(a.data.body.brands),e.abrupt("return",a.data.body.brands);case 10:e.prev=10,e.t0=e.catch(0),console.log("getAccountBrands ERROR >> ",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}(),C={getBrands:y,brandList:n,addNewAccountBrand:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/account/".concat(t,"/brand/new"),a);case 3:if("404"!==(c=e.sent).data.statusCode){e.next=6;break}return e.abrupt("return",c.data.message);case 6:return s(c.data.body.brands),e.abrupt("return",c.data.body.brands);case 10:e.prev=10,e.t0=e.catch(0),console.log("addNewAccountBrand ERROR >> ",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,a){return e.apply(this,arguments)}}(),getAccountBrands:N,accountBrands:O,getAccountBrand:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/account/".concat(t,"/brand/").concat(a));case 3:if("404"!==(c=e.sent).data.statusCode){e.next=6;break}return e.abrupt("return",c.data.message);case 6:l(c.data.body.brandDetails),f(c.data.body.brandActions),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("getAccountBrand ERROR >> ",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,a){return e.apply(this,arguments)}}(),accountBrand:j,updateAccountBrand:function(){var e=Object(x.a)(u.a.mark((function e(t,a,c){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.put("/account/".concat(t,"/brand/").concat(a),c);case 3:if("404"!==(n=e.sent).data.statusCode){e.next=6;break}return e.abrupt("return",n.data.message);case 6:l(n.data.body.brandDetails),f(n.data.body.brandActions),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("updateAccountBrand ERROR >> ",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,a,c){return e.apply(this,arguments)}}(),accountBrandActions:v,getAccountBrandDistribution:function(){var e=Object(x.a)(u.a.mark((function e(t,a){var c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/account/".concat(t,"/brand/").concat(a,"/pressreleases"));case 3:if("404"!==(c=e.sent).data.statusCode){e.next=6;break}return e.abrupt("return",c.data.message);case 6:console.log("distribution>>",c.data),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log("addNewAccountBrand >>",e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,a){return e.apply(this,arguments)}}()};return Object(d.jsx)(I.Provider,{value:C,children:e.children})};var ke=function(){var e=Object(c.useContext)(i).isLoggedIn;return Object(d.jsx)(j.a,{children:Object(d.jsxs)("div",{children:[Object(d.jsx)(W,{}),Object(d.jsxs)("main",{className:"query-page","data-nav":!1,children:[Object(d.jsx)("nav",{className:"main",style:{display:e?"block":"none"},children:Object(d.jsxs)("ul",{children:[Object(d.jsx)("li",{style:{listStyleType:"none"},children:Object(d.jsxs)(j.b,{to:"/client-management",style:{fontWeight:"bold",textDecoration:"none"},children:[Object(d.jsx)("i",{children:Object(d.jsx)(le.b,{})})," CLIENT MANAGEMENT"]})}),Object(d.jsx)("li",{style:{listStyleType:"none"},children:Object(d.jsxs)(j.b,{to:"/transactions",style:{fontWeight:"bold",textDecoration:"none"},children:[Object(d.jsx)("i",{children:Object(d.jsx)(le.c,{})}),"TRANSACTIONS"]})})]})}),Object(d.jsx)("div",{className:"container",children:Object(d.jsxs)(l.d,{children:[Object(d.jsx)(l.b,{exact:!0,path:"/login",component:p}),Object(d.jsx)(l.b,{exact:!0,path:"/",children:Object(d.jsx)(l.a,{to:"/client-management"})}),Object(d.jsx)(l.b,{exact:!0,path:"/password-reset",children:Object(d.jsx)(B,{})}),Object(d.jsx)(T,{exact:!0,path:"/client-management",children:Object(d.jsx)(H,{children:Object(d.jsx)(S,{})})}),Object(d.jsx)(T,{exact:!0,path:"/brands-query",children:Object(d.jsx)(Ce,{children:Object(d.jsx)(F,{})})}),Object(d.jsx)(T,{exact:!0,path:"/transactions",children:Object(d.jsx)(o,{})}),Object(d.jsx)(T,{exact:!0,path:"/profile",children:Object(d.jsx)(R,{})}),Object(d.jsx)(T,{exact:!0,path:"/new-account",children:Object(d.jsx)(H,{children:Object(d.jsx)(te,{})})}),Object(d.jsx)(T,{exact:!0,path:"/account/:accountId",children:Object(d.jsx)(H,{children:Object(d.jsx)(ne,{})})}),Object(d.jsx)(T,{exact:!0,path:"/account/:accountId/status",children:Object(d.jsx)(H,{children:Object(d.jsx)(je,{})})}),Object(d.jsx)(T,{exact:!0,path:"/account/:accountId/users",children:Object(d.jsx)(H,{children:Object(d.jsx)(Ne,{children:Object(d.jsx)(ye,{})})})}),Object(d.jsx)(T,{exact:!0,path:"/account/:accountId/brands",children:Object(d.jsx)(H,{children:Object(d.jsx)(Ce,{children:Object(d.jsx)(xe,{})})})}),Object(d.jsx)(T,{exact:!0,path:"/account/:accountId/financial",children:Object(d.jsx)(H,{children:Object(d.jsx)(me,{})})}),Object(d.jsx)(T,{exact:!0,path:"/account/:accountId/credits",children:Object(d.jsx)(H,{children:Object(d.jsx)(he,{})})}),Object(d.jsx)(l.b,{component:D})]})})]})]})})},Ae=a(169);function we(){var e=z(),t=Object(m.a)(e,1)[0];return Object(d.jsx)(d.Fragment,{children:Object(d.jsx)("div",{className:"popup ".concat(t?"active":""),children:Object(d.jsx)("div",{className:"tint",children:Object(d.jsx)("div",{className:"center",children:Object(d.jsx)(Ae.a,{})})})})})}var Pe=function(){return Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(we,{}),Object(d.jsx)(ke,{})]})},Se=function(e){e&&e instanceof Function&&a.e(3).then(a.bind(null,173)).then((function(t){var a=t.getCLS,c=t.getFID,n=t.getFCP,s=t.getLCP,r=t.getTTFB;a(e),c(e),n(e),s(e),r(e)}))};var Ee=function(e){var t=Object(c.useState)(!1),a=Object(m.a)(t,2),n=a[0],s=a[1],r=Object(c.useState)(""),j=Object(m.a)(r,2),l=j[0],o=j[1],b=Object(c.useState)({}),O=Object(m.a)(b,2),h=O[0],p=O[1],g=Object(c.useState)({}),v=Object(m.a)(g,2),f=v[0],y=v[1],N=Object(c.useState)(!1),C=Object(m.a)(N,2),k=C[0],A=C[1],w={isLoggedIn:n,token:l,myraUser:h,login:function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/login",{username:t.username,password:t.password});case 3:a=e.sent,localStorage.token=a.data.Cookie,s(a.data.login),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("login Error >> ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),logout:function(){try{localStorage.removeItem("token"),localStorage.removeItem("myraUser"),s(!1),o("")}catch(e){console.log("logout ERROR >> ",e)}},getMyraUsers:function(){var e=Object(x.a)(u.a.mark((function e(){var t;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/me");case 3:t=e.sent,p(t.data.body.userInfo),localStorage.myraUser=JSON.stringify(t.data.body.userInfo),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("getMyraUsers Error >> ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),getParameters:function(){var e=Object(x.a)(u.a.mark((function e(){var t;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.get("/parameters");case 3:t=e.sent,y(t.data),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("getParameters ERROR >> ",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),parameters:f,passwordReset:function(){var e=Object(x.a)(u.a.mark((function e(t){var a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G.post("/passwordreset",{username:t});case 3:return a=e.sent,console.log(a.data),e.abrupt("return",a.data);case 8:e.prev=8,e.t0=e.catch(0),console.log("passwordReset ERROR >>",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),setIsLoading:A,isLoading:k};return Object(d.jsx)(i.Provider,{value:w,children:e.children})};r.a.render(Object(d.jsx)(n.a.StrictMode,{children:Object(d.jsx)(Ee,{children:Object(d.jsx)(Pe,{})})}),document.getElementById("root")),Se()},91:function(e,t,a){},92:function(e,t,a){}},[[119,1,2]]]); //# sourceMappingURL=main.882cd5d2.chunk.js.map