@zimyo/manage 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +1 -1
- package/dist/main.js +14 -17
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -3140,4 +3140,4 @@ __p += '`),Mr&&(Mt+=`' +
|
|
|
3140
3140
|
function print() { __p += __j.call(arguments, '') }
|
|
3141
3141
|
`:`;
|
|
3142
3142
|
`)+Mt+`return __p
|
|
3143
|
-
}`;var fr=DB(function(){return Tr(Ce,hn+"return "+Mt).apply(t,Ae)});if(fr.source=Mt,q6(fr))throw fr;return fr}function t0e(S){return no(S).toLowerCase()}function n0e(S){return no(S).toUpperCase()}function r0e(S,I,z){if(S=no(S),S&&(z||I===t))return x1(S);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=vs(I),Ce=Qu(J,ce),Ae=cm(J,ce)+1;return pd(J,Ce,Ae).join("")}function o0e(S,I,z){if(S=no(S),S&&(z||I===t))return S.slice(0,yf(S)+1);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=cm(J,vs(I))+1;return pd(J,0,ce).join("")}function i0e(S,I,z){if(S=no(S),S&&(z||I===t))return S.replace(Zn,"");if(!S||!(I=xs(I)))return S;var J=vs(S),ce=Qu(J,vs(I));return pd(J,ce).join("")}function a0e(S,I){var z=_,J=A;if(ci(I)){var ce="separator"in I?I.separator:ce;z="length"in I?ar(I.length):z,J="omission"in I?xs(I.omission):J}S=no(S);var Ce=S.length;if(ed(S)){var Ae=vs(S);Ce=Ae.length}if(z>=Ce)return S;var Le=z-vf(J);if(Le<1)return J;var qe=Ae?pd(Ae,0,Le).join(""):S.slice(0,Le);if(ce===t)return qe+J;if(Ae&&(Le+=qe.length-Le),Z6(ce)){if(S.slice(Le).search(ce)){var wt,Ot=qe;for(ce.global||(ce=ve(ce.source,no(_t.exec(ce))+"g")),ce.lastIndex=0;wt=ce.exec(Ot);)var Mt=wt.index;qe=qe.slice(0,Mt===t?Le:Mt)}}else if(S.indexOf(xs(ce),Le)!=Le){var qt=qe.lastIndexOf(ce);qt>-1&&(qe=qe.slice(0,qt))}return qe+J}function s0e(S){return S=no(S),S&&Yt.test(S)?S.replace(un,C1):S}var l0e=If(function(S,I,z){return S+(z?" ":"")+I.toUpperCase()}),Q6=Tm("toUpperCase");function AB(S,I,z){return S=no(S),I=z?t:I,I===t?c6(S)?dm(S):R0(S):S.match(I)||[]}var DB=er(function(S,I){try{return Qe(S,t,I)}catch(z){return q6(z)?z:new Bn(z)}}),c0e=wc(function(S,I){return st(I,function(z){z=Cc(z),Qa(S,z,U6(S[z],S))}),S});function u0e(S){var I=S==null?0:S.length,z=Cn();return S=I?Co(S,function(J){if(typeof J[1]!="function")throw new Da(a);return[z(J[0]),J[1]]}):[],er(function(J){for(var ce=-1;++ce<I;){var Ce=S[ce];if(Qe(Ce[0],this,J))return Qe(Ce[1],this,J)}})}function d0e(S){return Y0(bs(S,p))}function eP(S){return function(){return S}}function p0e(S,I){return S==null||S!==S?I:S}var f0e=zs(),h0e=zs(!0);function Us(S){return S}function tP(S){return kf(typeof S=="function"?S:bs(S,p))}function m0e(S){return Q0(bs(S,p))}function g0e(S,I){return U1(S,bs(I,p))}var v0e=er(function(S,I){return function(z){return Bl(z,S,I)}}),y0e=er(function(S,I){return function(z){return Bl(S,z,I)}});function nP(S,I,z){var J=ba(I),ce=xm(I,J);z==null&&!(ci(I)&&(ce.length||!J.length))&&(z=I,I=S,S=this,ce=xm(I,ba(I)));var Ce=!(ci(z)&&"chain"in z)||!!z.chain,Ae=vp(S);return st(ce,function(Le){var qe=I[Le];S[Le]=qe,Ae&&(S.prototype[Le]=function(){var wt=this.__chain__;if(Ce||wt){var Ot=S(this.__wrapped__),Mt=Ot.__actions__=ia(this.__actions__);return Mt.push({func:qe,args:arguments,thisArg:S}),Ot.__chain__=wt,Ot}return qe.apply(S,Ku([this.value()],arguments))})}),S}function b0e(){return na._===this&&(na._=f6),this}function rP(){}function x0e(S){return S=ar(S),er(function(I){return q1(I,S)})}var w0e=Nn(Co),C0e=Nn(jn),S0e=Nn(y1);function _B(S){return f2(S)?b1(Cc(S)):bc(S)}function O0e(S){return function(I){return S==null?t:Fa(S,I)}}var T0e=Qo(),E0e=Qo(!0);function oP(){return[]}function iP(){return!1}function k0e(){return{}}function M0e(){return""}function I0e(){return!0}function P0e(S,I){if(S=ar(S),S<1||S>G)return[];var z=Z,J=ra(S,Z);I=Cn(I),S-=Z;for(var ce=gf(J,I);++z<S;)I(z);return ce}function R0e(S){return Jn(S)?Co(S,Cc):Wl(S)?[S]:ia(b2(no(S)))}function A0e(S){var I=++Ml;return no(S)+I}var D0e=xc(function(S,I){return S+I},0),_0e=Em("ceil"),j0e=xc(function(S,I){return S/I},1),N0e=Em("floor");function F0e(S){return S&&S.length?bm(S,Us,wm):t}function L0e(S,I){return S&&S.length?bm(S,Cn(I,2),wm):t}function B0e(S){return lS(S,Us)}function V0e(S,I){return lS(S,Cn(I,2))}function z0e(S){return S&&S.length?bm(S,Us,K0):t}function $0e(S,I){return S&&S.length?bm(S,Cn(I,2),K0):t}var W0e=xc(function(S,I){return S*I},1),H0e=Em("round"),G0e=xc(function(S,I){return S-I},0);function Y0e(S){return S&&S.length?j0(S,Us):0}function U0e(S,I){return S&&S.length?j0(S,Cn(I,2)):0}return ye.after=mme,ye.ary=dB,ye.assign=nge,ye.assignIn=TB,ye.assignInWith=EO,ye.assignWith=rge,ye.at=oge,ye.before=pB,ye.bind=U6,ye.bindAll=c0e,ye.bindKey=fB,ye.castArray=kme,ye.chain=Dm,ye.chunk=ts,ye.compact=x2,ye.concat=j6,ye.cond=u0e,ye.conforms=d0e,ye.constant=eP,ye.countBy=Yhe,ye.create=ige,ye.curry=hB,ye.curryRight=mB,ye.debounce=gB,ye.defaults=age,ye.defaultsDeep=sge,ye.defer=gme,ye.delay=vme,ye.difference=N6,ye.differenceBy=w2,ye.differenceWith=C2,ye.drop=F6,ye.dropRight=L6,ye.dropRightWhile=B6,ye.dropWhile=fO,ye.fill=V6,ye.filter=Xhe,ye.flatMap=Jhe,ye.flatMapDeep=Khe,ye.flatMapDepth=Qhe,ye.flatten=fv,ye.flattenDeep=z6,ye.flattenDepth=$6,ye.flip=yme,ye.flow=f0e,ye.flowRight=h0e,ye.fromPairs=W6,ye.functions=hge,ye.functionsIn=mge,ye.groupBy=eme,ye.initial=H6,ye.intersection=G6,ye.intersectionBy=Y6,ye.intersectionWith=T,ye.invert=vge,ye.invertBy=yge,ye.invokeMap=nme,ye.iteratee=tP,ye.keyBy=rme,ye.keys=ba,ye.keysIn=Ys,ye.map=xO,ye.mapKeys=xge,ye.mapValues=wge,ye.matches=m0e,ye.matchesProperty=g0e,ye.memoize=CO,ye.merge=Cge,ye.mergeWith=EB,ye.method=v0e,ye.methodOf=y0e,ye.mixin=nP,ye.negate=SO,ye.nthArg=x0e,ye.omit=Sge,ye.omitBy=Oge,ye.once=bme,ye.orderBy=ome,ye.over=w0e,ye.overArgs=xme,ye.overEvery=C0e,ye.overSome=S0e,ye.partial=X6,ye.partialRight=vB,ye.partition=ime,ye.pick=Tge,ye.pickBy=kB,ye.property=_B,ye.propertyOf=O0e,ye.pull=Oe,ye.pullAll=je,ye.pullAllBy=Ve,ye.pullAllWith=tt,ye.pullAt=Ct,ye.range=T0e,ye.rangeRight=E0e,ye.rearg=wme,ye.reject=lme,ye.remove=bt,ye.rest=Cme,ye.reverse=Pt,ye.sampleSize=ume,ye.set=kge,ye.setWith=Mge,ye.shuffle=dme,ye.slice=rn,ye.sortBy=hme,ye.sortedUniq=Un,ye.sortedUniqBy=Dn,ye.split=Jge,ye.spread=Sme,ye.tail=Rr,ye.take=fn,ye.takeRight=Mn,ye.takeRightWhile=Ri,ye.takeWhile=li,ye.tap=yv,ye.throttle=Ome,ye.thru=bO,ye.toArray=CB,ye.toPairs=MB,ye.toPairsIn=IB,ye.toPath=R0e,ye.toPlainObject=OB,ye.transform=Ige,ye.unary=Tme,ye.union=Va,ye.unionBy=Do,ye.unionWith=ya,ye.uniq=Sc,ye.uniqBy=md,ye.uniqWith=hv,ye.unset=Pge,ye.unzip=Rm,ye.unzipWith=Am,ye.update=Rge,ye.updateWith=Age,ye.values=xv,ye.valuesIn=Dge,ye.without=gp,ye.words=AB,ye.wrap=Eme,ye.xor=gO,ye.xorBy=vO,ye.xorWith=mv,ye.zip=O2,ye.zipObject=gv,ye.zipObjectDeep=vv,ye.zipWith=yO,ye.entries=MB,ye.entriesIn=IB,ye.extend=TB,ye.extendWith=EO,nP(ye,ye),ye.add=D0e,ye.attempt=DB,ye.camelCase=Fge,ye.capitalize=PB,ye.ceil=_0e,ye.clamp=_ge,ye.clone=Mme,ye.cloneDeep=Pme,ye.cloneDeepWith=Rme,ye.cloneWith=Ime,ye.conformsTo=Ame,ye.deburr=RB,ye.defaultTo=p0e,ye.divide=j0e,ye.endsWith=Lge,ye.eq=wu,ye.escape=Bge,ye.escapeRegExp=Vge,ye.every=Uhe,ye.find=qhe,ye.findIndex=hO,ye.findKey=lge,ye.findLast=Zhe,ye.findLastIndex=pv,ye.findLastKey=cge,ye.floor=N0e,ye.forEach=cB,ye.forEachRight=uB,ye.forIn=uge,ye.forInRight=dge,ye.forOwn=pge,ye.forOwnRight=fge,ye.get=J6,ye.gt=Dme,ye.gte=_me,ye.has=gge,ye.hasIn=K6,ye.head=mO,ye.identity=Us,ye.includes=tme,ye.indexOf=S2,ye.inRange=jge,ye.invoke=bge,ye.isArguments=_m,ye.isArray=Jn,ye.isArrayBuffer=jme,ye.isArrayLike=Gs,ye.isArrayLikeObject=Ai,ye.isBoolean=Nme,ye.isBuffer=Df,ye.isDate=Fme,ye.isElement=Lme,ye.isEmpty=Bme,ye.isEqual=Vme,ye.isEqualWith=zme,ye.isError=q6,ye.isFinite=$me,ye.isFunction=vp,ye.isInteger=yB,ye.isLength=OO,ye.isMap=bB,ye.isMatch=Wme,ye.isMatchWith=Hme,ye.isNaN=Gme,ye.isNative=Yme,ye.isNil=Xme,ye.isNull=Ume,ye.isNumber=xB,ye.isObject=ci,ye.isObjectLike=vi,ye.isPlainObject=T2,ye.isRegExp=Z6,ye.isSafeInteger=qme,ye.isSet=wB,ye.isString=TO,ye.isSymbol=Wl,ye.isTypedArray=bv,ye.isUndefined=Zme,ye.isWeakMap=Jme,ye.isWeakSet=Kme,ye.join=P,ye.kebabCase=zge,ye.last=W,ye.lastIndexOf=ee,ye.lowerCase=$ge,ye.lowerFirst=Wge,ye.lt=Qme,ye.lte=ege,ye.max=F0e,ye.maxBy=L0e,ye.mean=B0e,ye.meanBy=V0e,ye.min=z0e,ye.minBy=$0e,ye.stubArray=oP,ye.stubFalse=iP,ye.stubObject=k0e,ye.stubString=M0e,ye.stubTrue=I0e,ye.multiply=W0e,ye.nth=ue,ye.noConflict=b0e,ye.noop=rP,ye.now=wO,ye.pad=Hge,ye.padEnd=Gge,ye.padStart=Yge,ye.parseInt=Uge,ye.random=Nge,ye.reduce=ame,ye.reduceRight=sme,ye.repeat=Xge,ye.replace=qge,ye.result=Ege,ye.round=H0e,ye.runInContext=Ye,ye.sample=cme,ye.size=pme,ye.snakeCase=Zge,ye.some=fme,ye.sortedIndex=cn,ye.sortedIndexBy=Sn,ye.sortedIndexOf=St,ye.sortedLastIndex=Lt,ye.sortedLastIndexBy=kn,ye.sortedLastIndexOf=Gt,ye.startCase=Kge,ye.startsWith=Qge,ye.subtract=G0e,ye.sum=Y0e,ye.sumBy=U0e,ye.template=e0e,ye.times=P0e,ye.toFinite=yp,ye.toInteger=ar,ye.toLength=SB,ye.toLower=t0e,ye.toNumber=Oc,ye.toSafeInteger=tge,ye.toString=no,ye.toUpper=n0e,ye.trim=r0e,ye.trimEnd=o0e,ye.trimStart=i0e,ye.truncate=a0e,ye.unescape=s0e,ye.uniqueId=A0e,ye.upperCase=l0e,ye.upperFirst=Q6,ye.each=cB,ye.eachRight=uB,ye.first=mO,nP(ye,function(){var S={};return Ll(ye,function(I,z){wr.call(ye.prototype,z)||(S[z]=I)}),S}(),{chain:!1}),ye.VERSION=r,st(["bind","bindKey","curry","curryRight","partial","partialRight"],function(S){ye[S].placeholder=ye}),st(["drop","take"],function(S,I){pr.prototype[S]=function(z){z=z===t?1:Ao(ar(z),0);var J=this.__filtered__&&!I?new pr(this):this.clone();return J.__filtered__?J.__takeCount__=ra(z,J.__takeCount__):J.__views__.push({size:ra(z,Z),type:S+(J.__dir__<0?"Right":"")}),J},pr.prototype[S+"Right"]=function(z){return this.reverse()[S](z).reverse()}}),st(["filter","map","takeWhile"],function(S,I){var z=I+1,J=z==L||z==V;pr.prototype[S]=function(ce){var Ce=this.clone();return Ce.__iteratees__.push({iteratee:Cn(ce,3),type:z}),Ce.__filtered__=Ce.__filtered__||J,Ce}}),st(["head","last"],function(S,I){var z="take"+(I?"Right":"");pr.prototype[S]=function(){return this[z](1).value()[0]}}),st(["initial","tail"],function(S,I){var z="drop"+(I?"":"Right");pr.prototype[S]=function(){return this.__filtered__?new pr(this):this[z](1)}}),pr.prototype.compact=function(){return this.filter(Us)},pr.prototype.find=function(S){return this.filter(S).head()},pr.prototype.findLast=function(S){return this.reverse().find(S)},pr.prototype.invokeMap=er(function(S,I){return typeof S=="function"?new pr(this):this.map(function(z){return Bl(z,S,I)})}),pr.prototype.reject=function(S){return this.filter(SO(Cn(S)))},pr.prototype.slice=function(S,I){S=ar(S);var z=this;return z.__filtered__&&(S>0||I<0)?new pr(z):(S<0?z=z.takeRight(-S):S&&(z=z.drop(S)),I!==t&&(I=ar(I),z=I<0?z.dropRight(-I):z.take(I-S)),z)},pr.prototype.takeRightWhile=function(S){return this.reverse().takeWhile(S).reverse()},pr.prototype.toArray=function(){return this.take(Z)},Ll(pr.prototype,function(S,I){var z=/^(?:filter|find|map|reject)|While$/.test(I),J=/^(?:head|last)$/.test(I),ce=ye[J?"take"+(I=="last"?"Right":""):I],Ce=J||/^find/.test(I);ce&&(ye.prototype[I]=function(){var Ae=this.__wrapped__,Le=J?[1]:arguments,qe=Ae instanceof pr,wt=Le[0],Ot=qe||Jn(Ae),Mt=function(Cr){var Mr=ce.apply(ye,Ku([Cr],Le));return J&&qt?Mr[0]:Mr};Ot&&z&&typeof wt=="function"&&wt.length!=1&&(qe=Ot=!1);var qt=this.__chain__,hn=!!this.__actions__.length,Rn=Ce&&!qt,fr=qe&&!hn;if(!Ce&&Ot){Ae=fr?Ae:new pr(this);var An=S.apply(Ae,Le);return An.__actions__.push({func:bO,args:[Mt],thisArg:t}),new Ja(An,qt)}return Rn&&fr?S.apply(this,Le):(An=this.thru(Mt),Rn?J?An.value()[0]:An.value():An)})}),st(["pop","push","shift","sort","splice","unshift"],function(S){var I=_a[S],z=/^(?:push|sort|unshift)$/.test(S)?"tap":"thru",J=/^(?:pop|shift)$/.test(S);ye.prototype[S]=function(){var ce=arguments;if(J&&!this.__chain__){var Ce=this.value();return I.apply(Jn(Ce)?Ce:[],ce)}return this[z](function(Ae){return I.apply(Jn(Ae)?Ae:[],ce)})}}),Ll(pr.prototype,function(S,I){var z=ye[I];if(z){var J=z.name+"";wr.call(rd,J)||(rd[J]=[]),rd[J].push({name:I,func:z})}}),rd[av(t,b).name]=[{name:"wrapper",func:t}],pr.prototype.clone=ir,pr.prototype.reverse=v6,pr.prototype.value=y6,ye.prototype.at=Lhe,ye.prototype.chain=Bhe,ye.prototype.commit=Vhe,ye.prototype.next=zhe,ye.prototype.plant=Whe,ye.prototype.reverse=Hhe,ye.prototype.toJSON=ye.prototype.valueOf=ye.prototype.value=Ghe,ye.prototype.first=ye.prototype.head,wf&&(ye.prototype[wf]=$he),ye},kl=B0();uu?((uu.exports=kl)._=kl,Ju._=kl):na._=kl}).call(Au)})(yk,yk.exports);var Jdt=yk.exports;const Kdt=()=>{const{pushAlert:e}=Ek();return t=>{e({type:YK.SUCCESS,message:t!=null?t:"Success"})}},Qdt=e=>{var n,t;return(t=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:t.message},ept=e=>{var n;return((n=e==null?void 0:e.data)==null?void 0:n.message)||(e==null?void 0:e.message)},a0=({url:e,token:n,method:t="post",baseURL:r,successCallback:o=()=>{},errorCallback:i=()=>{},onSettledCallback:a=()=>{},debounceTime:s=500,errorMessageFormatter:l=Qdt,successMessageFormatter:c=ept})=>{const[d,p]=U.useState(!1),f=new AbortController,g=Mb(),h=Kdt(),{session:{token:m,API_BASE_URL:v}}=s0();n=n!=null?n:m,r=r!=null?r:v;const{mutate:b,isLoading:w}=xve(E=>Tc(exports,null,function*(){return(yield fi({headers:{token:n||localStorage.getItem("token")},url:e,baseURL:r,method:t,data:E,signal:f.signal})).data}),{onSuccess:E=>{E.error?g(c(E)):(o&&o(E),h(c(E)))},onError:E=>{var M;g((M=l(E))!=null?M:"Error occurred while processing the request"),i&&i(E)},onSettled:()=>{p(!1),a()}}),C=Jdt.debounce((E,M,R,D)=>{b(E,{onError:M,onSuccess:R,onSettled:D})},s);return{handleSubmit:(E,M,R,D)=>{d||(f.abort(),p(!0),C(E,M,R,D))},isDisabled:w||d,isLoading:w}};var FL={},tpt=Zr;Object.defineProperty(FL,"__esModule",{value:!0});var mhe=FL.default=void 0,npt=tpt(go()),rpt=k;mhe=FL.default=(0,npt.default)((0,rpt.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download");var LL={},opt=Zr;Object.defineProperty(LL,"__esModule",{value:!0});var ghe=LL.default=void 0,ipt=opt(go()),apt=k;ghe=LL.default=(0,ipt.default)((0,apt.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");const Cx={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},spt=()=>{const[e,n]=U.useState(Cx.LIST_VIEW),[t,r]=U.useState(""),[o,i]=U.useState({page:0,perPage:20}),{data:a,isFetching:s}=Xd(Fh,{url:vbe,params:{page:o.page,limit:o.perPage}},"customer-subsription"),{handleSubmit:l,isDisabled:c,isLoading:d}=a0({url:qK}),p=(h,m=!1)=>{const v={customer_id:h==null?void 0:h.customer_id,invoice_id:h==null?void 0:h.id,isDownload:1};c||l(v,null,b=>{m?(r(`data:application/pdf;base64,${b==null?void 0:b.data.buffer64}`),n(Cx.INVOICE_VIEW)):qr.downloadFileFromBuffer(b==null?void 0:b.data)},null)},f=(h,m)=>{i(v=>mn(pt({},v),{[h]:m}))},g=U.useMemo(()=>[{header:"Invoice Number",accessorKey:"invoice_number",id:"invoice_number"},{header:"Invoice Date",accessorKey:"invoice_date",id:"invoice_date"},{header:"Due Date",accessorKey:"invoice_due_date",id:"invoice_due_date"},{header:"Amount",accessorKey:"grand_total_amount",id:"grand_total_amount"},{header:"MRR",accessorKey:"invoice_mrr",id:"invoice_mrr"},{header:"Status",accessorKey:"payment_status",id:"payment_status",cell:(h,m)=>{var v;return k.jsx(Xk,{variant:"outlined",color:(v=uD==null?void 0:uD[m==null?void 0:m.invoice_status])!=null?v:"primary",label:h})}},{header:"Action",accessorKey:"id",id:"id",cell:(h,m)=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(nb,{title:"View Invoice",children:k.jsx(ghe,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m,!0)}})}),k.jsx(nb,{title:"Download Invoice",children:k.jsx(mhe,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m)}})})]})}],[a]);return console.log({customerInvoices:a}),k.jsxs("div",{children:[k.jsx(om,{visible:d}),e===Cx.LIST_VIEW?k.jsx("div",{style:{height:"70vh",overflow:"scroll"},children:k.jsx(ffe,{loading:s,data:qr.validateDataType(a==null?void 0:a.data,Vi.ARRAY)?a.data:[],columns:g,wrapByTooltipDefault:!0,pagination:mn(pt({show:!0,showFirstButton:!0,showLastButton:!0,perPageOptions:[20,30,50,100],totalDataCount:(a==null?void 0:a.totalCounts)||0},o),{handlePageChange:h=>f("page",h),handlePerPageChange:h=>f("perPage",h)})})}):k.jsx(k.Fragment,{}),e===Cx.INVOICE_VIEW?k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:t,type:"application/pdf",children:" "})}),k.jsx(Qp,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(rM,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(Ea,{label:" Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>n(Cx.LIST_VIEW)})})})]}):k.jsx(k.Fragment,{})]})},lpt="_card_container_dxhto_1",cpt="_card_count_dxhto_14",aK={card_container:lpt,card_count:cpt},upt=({data:e})=>{var n,t,r;return k.jsx("div",{className:`${aK.card_container}`,style:{height:"100%"},children:k.jsxs("div",{className:"flex-between-center g-10",children:[(n=e==null?void 0:e.icon)!=null?n:k.jsx(k.Fragment,{}),k.jsxs("div",{className:"flex-start-column mr-10 g-10",children:[k.jsx("div",{children:k.jsx("span",{children:(t=e==null?void 0:e.label)!=null?t:"-"})}),k.jsx("div",{children:k.jsx("span",{className:`${aK.card_count}`,children:(r=e==null?void 0:e.count)!=null?r:"-"})})]})]})})};var BL={},dpt=Zr;Object.defineProperty(BL,"__esModule",{value:!0});var vhe=BL.default=void 0,ppt=dpt(go()),fpt=k;vhe=BL.default=(0,ppt.default)((0,fpt.jsx)("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"AccountBalanceWallet");function sK({data:e="",limit:n=17,doNotShowTooltip:t=!1,arrow:r=!0,endAdornment:o="",startAdornment:i="",styleOverrides:a={}}){return k.jsx(k.Fragment,{children:e&&typeof e=="string"&&e.length>n&&!t?k.jsx(nb,{title:e!=null?e:"",arrow:r,children:k.jsx("span",{style:a,children:i+e.substring(0,n)+".."+o})}):i+e+o})}const hpt="_card_container_95l02_1",mpt="_card_subtitles_95l02_18",kT={card_container:hpt,card_subtitles:mpt};var VL={},gpt=Zr;Object.defineProperty(VL,"__esModule",{value:!0});var yhe=VL.default=void 0,vpt=gpt(go()),ypt=k;yhe=VL.default=(0,vpt.default)((0,ypt.jsx)("path",{d:"M12 7V3H2v18h20V7zm-2 12H4v-2h6zm0-4H4v-2h6zm0-4H4V9h6zm0-4H4V5h6zm10 12h-8V9h8zm-2-8h-4v2h4zm0 4h-4v2h4z"}),"CorporateFare");var zL={},bpt=Zr;Object.defineProperty(zL,"__esModule",{value:!0});var bhe=zL.default=void 0,xpt=bpt(go()),wpt=k;bhe=zL.default=(0,xpt.default)((0,wpt.jsx)("path",{d:"M3 10h11v2H3zm0-2h11V6H3zm0 8h7v-2H3zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71zm-.71.71-5.3 5.3V21h2.12l5.3-5.3z"}),"EditNote");var $L={},Cpt=Zr;Object.defineProperty($L,"__esModule",{value:!0});var e6=$L.default=void 0,Spt=Cpt(go()),Opt=k;e6=$L.default=(0,Spt.default)((0,Opt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");const Tpt=({orgDetails:e})=>{var Z,re,oe,K,Q,pe,fe,ae;const n=zC(),[t,r]=U.useState(!1),[o,i]=U.useState({org_name:"",mobile_number:"",gstin:""}),[a,s]=U.useState({email_id:!1,mobile_number:!1}),[l,c]=U.useState([]),[d,p]=U.useState(""),[f,g]=U.useState(null),[h,m]=U.useState([]),[v,b]=U.useState([]),[w,C]=U.useState({}),{handleSubmit:O,isDisabled:x,isLoading:E}=a0({url:wbe}),{data:M,isFetching:R}=Xd(Fh,{url:pbe,params:{}},"country-list",{enabled:t}),{data:D,isFetching:_}=Xd($K,{url:fbe,data:{country_id:w==null?void 0:w.country}},"state-list",{enabled:!!(w!=null&&w.country)});U.useEffect(()=>{if(qr.validateDataType(e,Vi.OBJECT)){const{org_name:ie,email_id:se,mobile_number:le,gstin:te,country:de,state:ge,city:be,address_1:Ee,address_2:Se,zip_code:Re}=pt({org_name:"",gstin:"",mobile_number:"",email_id:[],country:"",state:"",city:"",address_1:"",address_2:"",zip_code:""},e);i(xe=>mn(pt({},xe),{org_name:ie,mobile_number:le,gstin:te})),qr.validateDataType(se,Vi.ARRAY)&&c(se),C(xe=>mn(pt({},xe),{city:be,state:ge,country:de,address_1:Ee,address_2:Se,zip_code:Re}))}},[e]),U.useEffect(()=>{if(qr.validateDataType(M,Vi.ARRAY)){const ie=M.map(se=>({value:se==null?void 0:se.country_id,label:se==null?void 0:se.country_name}));m([...ie])}},[M]),U.useEffect(()=>{if(qr.validateDataType(D,Vi.ARRAY)){const ie=D.map(se=>({value:se==null?void 0:se.STATE_ID,label:se==null?void 0:se.STATE_NAME}));b([...ie])}},[D]);const A=ie=>{if(ie.key==="Enter"&&d.trim()!==""){const se=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;ie.preventDefault(),se.test(d)?(c([...l,d.trim()]),p("")):s(le=>mn(pt({},le),{email_id:!0}))}},j=ie=>()=>{c(se=>se.filter(le=>le!==ie))},N=()=>{r(!0)},L=()=>{r(!1)},B=(ie,se)=>{ie==="email_id"&&p(se),s(le=>mn(pt({},le),{[ie]:!1})),i(le=>mn(pt({},le),{[ie]:se}))},V=(ie,se)=>{C(ie==="country"?le=>mn(pt({},le),{state:"",[ie]:se}):le=>mn(pt({},le),{[ie]:se})),s(le=>mn(pt({},le),{[ie]:!1}))},H=()=>{const ie=/^\+?(\d[\d-.()\s]+)?\d$/,se=/^\d{6}$/;let le=!0;for(const[te,de]of Object.entries(o))te==="mobile_number"&&(ie.test(de)||(s(ge=>mn(pt({},ge),{[te]:!0})),le=!1)),de.length||(s(ge=>mn(pt({},ge),{[te]:!0})),le=!1);for(const[te,de]of Object.entries(w)){let ge=!1;(te=="zip_code"&&!se.test(de)||(te==="country"||te==="state")&&!de||(te=="city"||te==="address_1")&&!(de!=null&&de.length))&&(ge=!0),ge&&(s(be=>mn(pt({},be),{[te]:!0})),le=!1)}l.length||(s(te=>mn(pt({},te),{email_id:!0})),le=!1),le&&O(mn(pt(pt({},o),w),{email:l,client_id:e==null?void 0:e.client_id,phone_no:o==null?void 0:o.mobile_number,country:w==null?void 0:w.country,state:w==null?void 0:w.state}),null,()=>{n.invalidateQueries("subsription-overview"),L()},null)},G=(ie,se,le)=>{var de;return le!=null&&le.length&&(w!=null&&w[ie])?(de=le.filter(ge=>(ge==null?void 0:ge.value)===se))==null?void 0:de[0]:null},Y=ie=>{g(ie.currentTarget)},X=()=>{g(null)};return k.jsxs(k.Fragment,{children:[k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsxs("div",{className:`${kT.card_container}`,children:[k.jsx(om,{visible:E||R||_}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{className:`${kT.card_subtitles}`,children:"Company Information"}),k.jsx("div",{className:"flex-end-center g-10",children:k.jsx("span",{children:k.jsx(yhe,{sx:{color:"#009017",cursor:"pointer"}})})})]}),k.jsx(wn,{container:!0,spacing:2,children:k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Name :"})}),k.jsx("span",{children:(Z=e==null?void 0:e.org_name)!=null?Z:"-"})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Email :"})}),k.jsxs("div",{className:"flex-end-center",style:{gap:"4px"},children:[k.jsx(sK,{data:`${(oe=(re=e==null?void 0:e.email_id)==null?void 0:re[0])!=null?oe:"-"}`,limit:34}),((K=e==null?void 0:e.email_id)==null?void 0:K.length)>1?k.jsxs("span",{style:{backgroundColor:"#2B46F21A",color:"#2B46F2",padding:"4px",borderRadius:"50%",fontSize:"8px"},className:"flex-between-center",children:[k.jsx("span",{children:(Q=e==null?void 0:e.email_id)==null?void 0:Q.length}),k.jsx(e6,{className:"cursor-pointer",onClick:Y,sx:{fontSize:"8px"}})]}):k.jsx(k.Fragment,{})]})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Phone No :"})}),k.jsx("div",{children:k.jsx(sK,{data:(pe=e==null?void 0:e.mobile_number)!=null?pe:"-",limit:34})})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"GSTIN NO. :"})}),k.jsx("span",{children:(fe=e==null?void 0:e.gstin)!=null?fe:"-"})]})]})})]})}),k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx("div",{className:`${kT.card_container}`,children:k.jsxs("div",{className:"flex-between-columns",children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("span",{className:`${kT.card_subtitles}`,children:"Billing Address"}),k.jsx(bhe,{sx:{color:"blue",cursor:"pointer"},onClick:N})]}),k.jsx("div",{children:k.jsx("span",{children:e==null?void 0:e.org_address})})]})})}),t&&k.jsx(bL,{size:"md",title:"Edit Org Details",open:t,onModalclose:L,children:k.jsxs(wn,{container:!0,spacing:2,children:[k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Basic Details"})}),k.jsx(Ha,{})]}),[{name:"org_name",label:"Name"},{name:"mobile_number",label:"Phone No"},{name:"gstin",label:"GST No"},{name:"email_id",label:"Email"}].map(ie=>k.jsxs(wn,{item:!0,xs:6,children:[ie.name==="email_id"?k.jsxs(eM,{component:"div",sx:{display:"flex",flexWrap:"wrap",border:"1px solid #ccc",borderRadius:"4px",padding:"8px",height:"38px",overflow:"scroll"},children:[l.map((se,le)=>k.jsx(Xk,{label:se,onDelete:j(se),sx:{margin:"4px"}},le)),k.jsx(V_,{required:!0,variant:"standard",name:ie.name,placeholder:`Enter ${ie.label}`,value:d,onChange:se=>{const{name:le,value:te}=se.target;B(le,te)},onKeyPress:A,InputProps:{disableUnderline:!0},sx:{flexGrow:1,minWidth:"100px"}})]}):k.jsx(Fp,{required:!0,className:"w-100",name:ie.name,label:ie.label,value:o==null?void 0:o[ie.name],onChange:se=>{const{value:le,name:te}=se.target;B(te,le)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]},ie.name)),k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Billing Adreess"})}),k.jsx(Ha,{})]}),[{name:"country",label:"Country",type:"select",required:!0,options:h},{name:"state",label:"State",type:"select",required:!0,options:v},{name:"city",label:"City",type:"input",required:!0},{name:"address_1",label:"Address 1",type:"input",multiline:!0,required:!0},{name:"address_2",label:"Address 2",type:"input",multiline:!0,required:!1},{name:"zip_code",label:"Zip Code",type:"input",required:!0}].map(ie=>{var se;return k.jsxs(wn,{item:!0,xs:6,children:[ie.type=="select"?k.jsx(hfe,{options:ie.options,label:ie.label,name:ie.name,required:ie.required,value:G(ie.name,w==null?void 0:w[ie.name],ie.options),isSearchable:!0,onChange:le=>{V(ie.name,le==null?void 0:le.value)},error:a==null?void 0:a[ie.name]}):k.jsx(Fp,{className:"w-100",required:ie.required,multiline:ie==null?void 0:ie.multiline,value:(se=w==null?void 0:w[ie.name])!=null?se:"",label:ie.label,name:ie.name,onChange:le=>{const{name:te,value:de}=le.target;V(te,de)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Cancel",variant:"outlined",onClick:L}),k.jsx(Ea,{label:"Submit",disabled:x,onClick:H})]})})]})}),qr.validateDataType(e==null?void 0:e.email_id,Vi.ARRAY)&&k.jsx(j_,{open:!!f,anchorEl:f,onClose:X,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:k.jsx("div",{style:{padding:"10px"},children:(ae=e.email_id)==null?void 0:ae.map(ie=>k.jsx("div",{className:"mb-10",children:ie}))})})]})},Ept="_card_container_c1yb9_1",kpt="_card_count_c1yb9_13",Mpt="_card_subtitles_c1yb9_18",Ipt="_icons_background_c1yb9_23",Ppt="_sub_icons_background_c1yb9_32",rs={card_container:Ept,card_count:kpt,card_subtitles:Mpt,icons_background:Ipt,sub_icons_background:Ppt};function Rpt(e){return NL({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"},child:[]}]})(e)}var WL={},Apt=Zr;Object.defineProperty(WL,"__esModule",{value:!0});var xhe=WL.default=void 0,Dpt=Apt(go()),_pt=k;xhe=WL.default=(0,Dpt.default)((0,_pt.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");var HL={},jpt=Zr;Object.defineProperty(HL,"__esModule",{value:!0});var whe=HL.default=void 0,Npt=jpt(go()),Fpt=k;whe=HL.default=(0,Npt.default)((0,Fpt.jsx)("path",{d:"m21.41 11.41-8.83-8.83c-.37-.37-.88-.58-1.41-.58H4c-1.1 0-2 .9-2 2v7.17c0 .53.21 1.04.59 1.41l8.83 8.83c.78.78 2.05.78 2.83 0l7.17-7.17c.78-.78.78-2.04-.01-2.83M6.5 8C5.67 8 5 7.33 5 6.5S5.67 5 6.5 5 8 5.67 8 6.5 7.33 8 6.5 8"}),"Sell");var GL={},Lpt=Zr;Object.defineProperty(GL,"__esModule",{value:!0});var Che=GL.default=void 0,Bpt=Lpt(go()),Vpt=k;Che=GL.default=(0,Bpt.default)((0,Vpt.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");var YL={},zpt=Zr;Object.defineProperty(YL,"__esModule",{value:!0});var UL=YL.default=void 0,$pt=zpt(go()),Wpt=k;UL=YL.default=(0,$pt.default)((0,Wpt.jsx)("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome");var XL={},Hpt=Zr;Object.defineProperty(XL,"__esModule",{value:!0});var She=XL.default=void 0,Gpt=Hpt(go()),Ypt=k;She=XL.default=(0,Gpt.default)((0,Ypt.jsx)("path",{d:"M17 8H7c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-4 12.5h-2V19h2zm0-2.5h-2c0-1.5-2.5-3-2.5-5 0-1.93 1.57-3.5 3.5-3.5s3.5 1.57 3.5 3.5c0 2-2.5 3.5-2.5 5m5-11.5H6C6 5.67 6.67 5 7.5 5h9c.83 0 1.5.67 1.5 1.5m-1-3H7C7 2.67 7.67 2 8.5 2h7c.83 0 1.5.67 1.5 1.5"}),"BatchPrediction");var qL={},Upt=Zr;Object.defineProperty(qL,"__esModule",{value:!0});var Ohe=qL.default=void 0,Xpt=Upt(go()),qpt=k;Ohe=qL.default=(0,Xpt.default)((0,qpt.jsx)("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5m-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5"}),"BlurOn");var ZL={},Zpt=Zr;Object.defineProperty(ZL,"__esModule",{value:!0});var The=ZL.default=void 0,Jpt=Zpt(go()),Kpt=k;The=ZL.default=(0,Jpt.default)((0,Kpt.jsx)("path",{d:"M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1M11 17l2.5-3.15L15.29 16l2.5-3.22L21 17z"}),"BurstMode");const MT={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},Qpt={1:"Paid",2:"Unpaid",3:"Decline",0:" "},dD={0:k.jsx(UL,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),1:k.jsx(She,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),2:k.jsx(Ohe,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),3:k.jsx(The,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},eft=e=>{var E,M,R,D,_,A,j,N,L,B,V,H,G,Y;const{onTabChange:n}=e,[t,r]=U.useState(MT.LIST_VIEW),o=[{id:1,name:"Monthly"},{id:2,name:"Quarterly"},{id:3,name:"Half Yearly"},{id:4,name:"Yearly"},{id:5,name:"2 Years"},{id:6,name:"3 Years"}],i=X=>{const Z=o.find(re=>re.id===X);return Z?Z.name:" "},[a,s]=U.useState(""),{session:{API_BASE_URL:l,mode:c}}=s0(),d=Mb(),{data:p,isFetching:f}=Xd(Fh,{url:UK,params:{}},"subsription-overview"),{handleSubmit:g,isDisabled:h,isLoading:m}=a0({url:XK}),{handleSubmit:v,isDisabled:b,isLoading:w}=a0({url:qK}),C=(X=!1)=>{if(!(p!=null&&p.openInvoice))return;const Z={customer_id:p.openInvoice.customer_id,invoice_id:p.openInvoice.id,isDownload:1};b||v(Z,null,re=>{X?(s(`data:application/pdf;base64,${re==null?void 0:re.data.buffer64}`),r(MT.INVOICE_VIEW)):qr.downloadFileFromBuffer(re==null?void 0:re.data)},null)},O=()=>{var Z;const X={plan_id:p==null?void 0:p.plan_id,add_on_id:p==null?void 0:p.add_on_id,invoice_id:(Z=p==null?void 0:p.openInvoice)==null?void 0:Z.id};g(X,null,re=>{var oe;qr.cashfreePayment((oe=re==null?void 0:re.data)==null?void 0:oe.payment_session_id,l,()=>{},d,c)},null)},x=U.useMemo(()=>{var Z,re;const{wallet:X={}}=p!=null?p:{wallet:{}};return[{label:"Wallet Balance",count:`Rs ${(Z=X==null?void 0:X.balance)!=null?Z:"-"}`,description:k.jsxs(k.Fragment,{children:[k.jsxs("span",{style:{color:"#009017"},children:["+ Rs ",(re=X==null?void 0:X.openingBalance)!=null?re:"- "]})," ","last gained"]}),icon:k.jsx("span",{style:{background:"#FAC8001A",margin:"inherit"},className:rs.icons_background,children:k.jsx(vhe,{sx:{color:"#FAC800",fontSize:"2rem"}})}),progress:(X==null?void 0:X.percentage)*100}]},[p]);return k.jsxs("div",{className:"w-100",children:[k.jsx(om,{visible:f||m||w}),t===MT.LIST_VIEW?k.jsxs(wn,{container:!0,spacing:2,children:[x.map(X=>k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx(upt,{data:X})})),k.jsx(Tpt,{orgDetails:p==null?void 0:p.orgInfo}),k.jsxs(wn,{item:!0,xs:12,sm:6,lg:8,children:[k.jsxs("div",{className:`${rs.card_container}`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsxs("span",{className:`${rs.card_count}`,children:["Last ",Qpt[(E=p==null?void 0:p.openInvoice)==null?void 0:E.payment_status]||""," Invoice"]})}),k.jsx(Ha,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Due By"}),k.jsx("span",{className:`${rs.card_subtitles}`,children:(M=p==null?void 0:p.openInvoice)!=null&&M.invoice_due_date?new Date(p.openInvoice.invoice_due_date).toLocaleDateString("en-GB"):"-"})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Amount"}),k.jsxs("span",{className:`${rs.card_subtitles}`,children:[((R=p==null?void 0:p.openInvoice)==null?void 0:R.currency_symbol)||"₹"," ",(_=(D=p==null?void 0:p.openInvoice)==null?void 0:D.grand_total_amount)!=null?_:"-"]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Invoice"}),k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{children:k.jsx(Rpt,{style:{fontSize:"24px",color:"red",cursor:"pointer"},onClick:()=>C(!0)})})})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{}),k.jsx("span",{children:((A=p==null?void 0:p.openInvoice)==null?void 0:A.payment_status)===2&&k.jsx(Ea,{disabled:h,label:"Pay Here",style:{height:"36px"},onClick:O})})]})]})]}),k.jsxs("div",{className:`${rs.card_container} g-10`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center",children:k.jsx("span",{className:`${rs.card_count}`,children:"Plan Details"})}),k.jsx(Ha,{}),k.jsx("div",{className:"flex-between-center",children:[{label:"Current Plan",value:(j=p==null?void 0:p.planDetails)==null?void 0:j.current_plan,icon:k.jsx(F3,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Billing Cycle",value:i((N=p==null?void 0:p.planDetails)==null?void 0:N.billing_cycle)||"-",icon:k.jsx(xhe,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Plan Cost",value:`${((L=p==null?void 0:p.openInvoice)==null?void 0:L.currency_symbol)||"₹"} ${(V=(B=p==null?void 0:p.planDetails)==null?void 0:B.plan_cost)!=null?V:"-"}`,icon:k.jsx(whe,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Plan Expiring",value:`${(H=p==null?void 0:p.planDetails)!=null&&H.plan_expiring_date?new Date(p.planDetails.plan_expiring_date).toLocaleDateString("en-GB"):"-"}`,icon:k.jsx(Che,{sx:{color:"#335AFF",fontSize:"1.5rem"}})}].map(X=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx("span",{style:{background:"#335AFF1A"},className:`${rs.sub_icons_background}`,children:X.icon}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:X.label}),k.jsx("span",{className:`${rs.card_subtitles}`,children:X.value})]})]}))})]}),k.jsxs("div",{className:`${rs.card_container}`,children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsx("span",{className:`${rs.card_count}`,children:"Add Ons"})}),k.jsx(Ha,{className:"mb-10"}),k.jsx("div",{className:"flex-start-center g-20",style:{overflowX:"auto",overflowY:"hidden"},children:qr.validateDataType(p==null?void 0:p.addOnProduct,Vi.ARRAY)?p.addOnProduct.map((X,Z)=>k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{style:{background:"#335AFF1A"},className:`${rs.sub_icons_background}`,children:dD==null?void 0:dD[Math.floor(Math.random()*4)]}),k.jsx("span",{className:`${rs.card_subtitles}`,children:X.product_name})]},Z)):k.jsx(i0,{message:"No Add Ons Found"})})]})]}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${rs.card_container} g-10`,style:{height:"100%"},children:qr.validateDataType(p==null?void 0:p.usageCredit,Vi.ARRAY)?k.jsxs(k.Fragment,{children:[k.jsxs("span",{className:`${rs.card_count}`,children:["User Counts"," ",k.jsx(nb,{title:"Active Employees",children:k.jsxs("span",{children:["(",(Y=(G=p==null?void 0:p.employee_details)==null?void 0:G.active_employee)!=null?Y:"--",")"]})})]}),k.jsx(vat,{type:jdt.COLUMN,data:p.usageCredit,xField:"APP_MODULE",yField:"TOTAL_USER_COUNT",xAxisTitle:"",styles:{height:"310px",width:"100%"},defaultGroupBy:"",selectedGroupBy:""}),k.jsx(wn,{container:!0,spacing:1,children:p.usageCredit.map(X=>{var Z,re;return k.jsx(wn,{item:!0,xs:6,children:k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsxs("span",{className:`${rs.card_subtitles}`,children:[(Z=X==null?void 0:X.APP_MODULE)!=null?Z:"-"," :"]}),k.jsx("span",{children:(re=X==null?void 0:X.TOTAL_USER_COUNT)!=null?re:"-"})]})})})})]}):k.jsx(i0,{message:"No Records Found"})})})]}):k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:a,type:"application/pdf",children:" "})}),k.jsx(Qp,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(rM,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(Ea,{label:"Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>r(MT.LIST_VIEW)})})})]})]})},tft="_card_container_1iza3_1",nft="_plan_card_1iza3_13",rft="_discount_card_1iza3_27",oft="_plan_total_count_1iza3_40",ift="_card_count_1iza3_45",aft="_card_subtitles_1iza3_50",Zs={card_container:tft,plan_card:nft,discount_card:rft,plan_total_count:oft,card_count:ift,card_subtitles:aft};var JL={},sft=Zr;Object.defineProperty(JL,"__esModule",{value:!0});var Ehe=JL.default=void 0,lft=sft(go()),cft=k;Ehe=JL.default=(0,lft.default)((0,cft.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle");var KL={},uft=Zr;Object.defineProperty(KL,"__esModule",{value:!0});var khe=KL.default=void 0,dft=uft(go()),pft=k;khe=KL.default=(0,dft.default)((0,pft.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCard");var QL={},fft=Zr;Object.defineProperty(QL,"__esModule",{value:!0});var Mhe=QL.default=void 0,hft=fft(go()),mft=k;Mhe=QL.default=(0,hft.default)((0,mft.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");const gft=()=>{const[e,n]=U.useState(Oi()),t=r=>{n(r)};return k.jsx("div",{children:k.jsxs(wn,{container:!0,spacing:4,children:[k.jsxs(wn,{item:!0,xs:12,sm:12,lg:7,children:[k.jsxs("div",{className:`${Zs.card_container} g-20 mb-10`,children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!0}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Credit/Debit Cards"}),k.jsx("span",{style:{color:"#615E69"},children:"Pay with your Credit/Debit Card"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-start-column g-10",style:{width:"90%",margin:"auto"},children:[k.jsx(Fp,{placeholder:"Name on the Card",suffix:k.jsx(Ehe,{})}),k.jsx(Fp,{placeholder:"Card Number",suffix:k.jsx(khe,{})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(V9,{format:"MM/YY",views:["month","year"],sx:{width:"50%"},minDate:Oi(),value:e,onChange:t}),k.jsx(Fp,{placeholder:"CVV",suffix:k.jsx(Mhe,{}),sx:{width:"50%"}})]})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Wallet"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through Wallet"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Paytm/Google Pay/Phone pe/BHIM UPI"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment through Gpay, Paypal, Paytm etc"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Net banking"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through bank account."})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]})]}),k.jsx(Ea,{label:"Pay $164.23",className:"w-100"})]}),k.jsxs(wn,{item:!0,xs:12,sm:12,lg:5,children:[k.jsxs("div",{className:"flex-start-center g-20 mb-10",children:[k.jsxs("div",{className:`${Zs.plan_card} g-10`,style:{background:"#0055FF1A",border:"1px solid #335AFF"},children:[k.jsx("span",{className:`${Zs.card_count}`,children:"$10/mth"}),k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"})]}),k.jsxs("div",{className:`${Zs.plan_card} g-10`,children:[k.jsx("span",{className:`${Zs.card_count}`,children:"$8/mth"}),k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"}),k.jsx("div",{className:`${Zs.discount_card}`,children:k.jsx("span",{children:"-20%"})})]})]}),k.jsxs("div",{className:"mb-20",children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{className:`${Zs.card_subtitles}`,style:{color:"#615E69"},children:"Gift Card/ Discount Code"})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(Fp,{style:{width:"70%"}}),k.jsx(Ea,{label:"Apply",variant:"outlined",sx:{width:"30%"}})]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Subtotal"}),k.jsx("span",{children:"$160"})]}),k.jsx(Ha,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Sales tax(6.5%)"}),k.jsx("span",{children:"$4,23"})]}),k.jsx(Ha,{}),k.jsxs("div",{className:`flex-between-center ${Zs.plan_total_count}`,children:[k.jsx("span",{children:"Total Due"}),k.jsx("span",{children:"$164.23"})]})]})]})]})})},vft="_card_container_1tgxf_1",yft="_plans_1tgxf_11",bft="_add_ons_1tgxf_14",xft="_card_subtitles_1tgxf_28",wft="_plan_headers_1tgxf_55",Cft="_card_content_1tgxf_63",Op={card_container:vft,plans:yft,add_ons:bft,card_subtitles:xft,plan_headers:wft,card_content:Cft};var eB={},Sft=Zr;Object.defineProperty(eB,"__esModule",{value:!0});var Ihe=eB.default=void 0,Oft=Sft(go()),Tft=k;Ihe=eB.default=(0,Oft.default)((0,Tft.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-5h2zm4 0h-2v-3h2zm0-5h-2v-2h2zm4 5h-2V7h2z"}),"Analytics");var tB={},Eft=Zr;Object.defineProperty(tB,"__esModule",{value:!0});var Phe=tB.default=void 0,kft=Eft(go()),Mft=k;Phe=tB.default=(0,kft.default)((0,Mft.jsx)("path",{d:"m18.85 10.39 1.06-1.06c.78-.78.78-2.05 0-2.83L18.5 5.09c-.78-.78-2.05-.78-2.83 0l-1.06 1.06zm-5.66-2.83L4 16.76V21h4.24l9.19-9.19zM19 17.5c0 2.19-2.54 3.5-5 3.5-.55 0-1-.45-1-1s.45-1 1-1c1.54 0 3-.73 3-1.5 0-.47-.48-.87-1.23-1.2l1.48-1.48c1.07.63 1.75 1.47 1.75 2.68M4.58 13.35C3.61 12.79 3 12.06 3 11c0-1.8 1.89-2.63 3.56-3.36C7.59 7.18 9 6.56 9 6c0-.41-.78-1-2-1-1.26 0-1.8.61-1.83.64-.35.41-.98.46-1.4.12-.41-.34-.49-.95-.15-1.38C3.73 4.24 4.76 3 7 3s4 1.32 4 3c0 1.87-1.93 2.72-3.64 3.47C6.42 9.88 5 10.5 5 11c0 .31.43.6 1.07.86z"}),"Draw");var nB={},Ift=Zr;Object.defineProperty(nB,"__esModule",{value:!0});var Rhe=nB.default=void 0,Pft=Ift(go()),Rft=k;Rhe=nB.default=(0,Pft.default)((0,Rft.jsx)("path",{d:"M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3 1 9l11 6 9-4.91V17h2V9z"}),"School");var rB={},Aft=Zr;Object.defineProperty(rB,"__esModule",{value:!0});var Ahe=rB.default=void 0,Dft=Aft(go()),_ft=k;Ahe=rB.default=(0,Dft.default)((0,_ft.jsx)("path",{d:"M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2m-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m13-6v11c0 1.1-.9 2-2 2H4v-2h17V7z"}),"Payments");var oB={},jft=Zr;Object.defineProperty(oB,"__esModule",{value:!0});var Dhe=oB.default=void 0,Nft=jft(go()),Fft=k;Dhe=oB.default=(0,Nft.default)((0,Fft.jsx)("path",{d:"M12 4H5C3.34 4 2 5.34 2 7v8c0 1.66 1.34 3 3 3l-1 1v1h1l2-2.03L9 18v-5H4V5.98L13 6v2h2V7c0-1.66-1.34-3-3-3M5 14c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m15.57-4.34c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66L10 13.77l.01 5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V18h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14zm-8.16.34h7.19l1.03 3h-9.25zM12 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"Commute");var iB={},Lft=Zr;Object.defineProperty(iB,"__esModule",{value:!0});var _he=iB.default=void 0,Bft=Lft(go()),lK=k;_he=iB.default=(0,Bft.default)([(0,lK.jsx)("path",{d:"M19 6h-1V1H6v5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2M8 3h8v3H8zm4 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"0"),(0,lK.jsx)("path",{d:"M12.5 11.5h-1v2.71l1.64 1.64.71-.71-1.35-1.35z"},"1")],"PunchClock");var aB={},Vft=Zr;Object.defineProperty(aB,"__esModule",{value:!0});var jhe=aB.default=void 0,zft=Vft(go()),$ft=k;jhe=aB.default=(0,zft.default)((0,$ft.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"}),"GroupAdd");const Wft={plans:{Basic:{"Core HR":["Employee","Time & Attendance","Document","Policy","Workflow","Roles & Permission","Transfer & Probation"],"Employee Self Service (ESS)":["Android & iOS","Team","Geotag","Geofence","Reports"],Payroll:["Salary","Compliance","Arrear","Full & Final"]},Standard:{"All Basic Features +":[],"Advance HR":["Onboarding","Offboarding","Helpdesk","Asset","Task","Custom Dashboard"],Engage:["Feed","Chat","Survey","Feedback","Recognition"],"Advance Time Tracking":["Time Zone","Roster","Selfie Attendance","Overtime & Incentive"]},Enterprise:{"All Standard Features +":[],"Finance & Admin":["Expense","Travel Desk","Vendor","Petty Cash","Budgeting","Manpower Planning"],Performance:["Review (KRA/KPI)","Objective (OKR)","9-Box Matrix","Bell Curve & Normalization","Compensation"],"Global Payroll":["Contract","Multi-Entry","Multi-Country","Multi-Currency"]}}},Hft=e=>{var f;const{onTabChange:n}=e,[t,r]=U.useState(!1);zC();const[o,i]=U.useState({plan:"",add_ons:[],new_add_ons:[]}),a={Analytics:k.jsx(Ihe,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),"Digital Signature":k.jsx(Phe,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),"Learning Management System":k.jsx(Rhe,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Payouts:k.jsx(Ahe,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),"Trip Management":k.jsx(Dhe,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Timesheets:k.jsx(_he,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Recruit:k.jsx(jhe,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},s=Wft,l=!1,{isDisabled:c}=a0({url:bbe}),{data:d}=Xd(Fh,{url:UK,params:{}},"subsription-overview");U.useEffect(()=>{var g,h;d&&i({plan:(g=d.plan_id)!=null?g:"",add_ons:((h=d.add_on_id)!=null?h:[]).map(String),new_add_ons:[]})},[d]);const p=g=>{var h;return g===((h=d==null?void 0:d.planDetails)==null?void 0:h.current_plan)};return k.jsxs("div",{children:[k.jsx(om,{visible:l}),k.jsxs(wn,{container:!0,spacing:3,children:[s!=null&&s.plans?Object.entries(s.plans).map(([g,h])=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,children:k.jsxs("div",{className:`${Op.card_container} ${Op.plans} ${p(g)?Op.selected_plan:""}`,style:{backgroundColor:p(g)?"#E3F2FD":"white",border:p(g)?"2px solid #2196F3":"1px solid #e0e0e0",borderRadius:"12px",padding:"24px",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[p(g)&&k.jsx("div",{style:{position:"absolute",top:"-1px",right:"20px",background:"#2196F3",color:"white",padding:"4px 12px",borderRadius:"0 0 8px 8px",fontSize:"12px",fontWeight:"bold"},children:"OPTED"}),k.jsxs("div",{className:"flex-start-column",style:{flex:1,gap:"16px"},children:[k.jsx("div",{className:Op.plan_headers,children:k.jsx("div",{style:{textAlign:"center",marginBottom:"16px"},children:k.jsx("h3",{style:{margin:0,color:"#1976D2",fontSize:"24px",fontWeight:"bold"},children:g})})}),k.jsx(Ha,{}),k.jsx("div",{className:Op.card_content,style:{flex:1},children:Object.entries(h).map(([m,v])=>k.jsxs("div",{style:{marginBottom:"16px"},children:[k.jsx("div",{style:{fontWeight:"bold",color:"#333",marginBottom:"8px",fontSize:"16px"},children:m}),Array.isArray(v)&&v.length>0&&k.jsxs("div",{style:{paddingLeft:"12px",color:"#666"},children:[v.slice(0,3).map((b,w)=>k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px",fontSize:"14px"},children:[k.jsx(hhe,{style:{color:"#4CAF50",fontSize:"16px"}}),b]},w)),v.length>3&&k.jsxs("div",{style:{color:"#999",fontSize:"12px",marginTop:"4px"},children:["+",v.length-3," more features"]})]})]},m))})]})]})},g)):k.jsx(wn,{item:!0,xs:12,children:k.jsx(i0,{message:"No Plans Found"})}),k.jsx(wn,{item:!0,xs:12,style:{marginTop:"40px",marginBottom:"12px"},children:k.jsx("div",{className:"flex-between-center",children:k.jsx("span",{className:Op.card_subtitles,children:"Addons"})})}),(f=d==null?void 0:d.addOnProduct)!=null&&f.length?k.jsx(wn,{container:!0,spacing:2,sx:{pl:3},children:d.addOnProduct.map(g=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,lg:3,children:k.jsx("div",{className:`${Op.card_container} ${Op.add_ons} ${d.add_on_id.includes(String(g.product_id))?Op.selected_addon:""}`,style:{backgroundColor:d.add_on_id.includes(String(g.product_id))?"#E8F5E8":"white",border:d.add_on_id.includes(String(g.product_id))?"2px solid #4CAF50":"1px solid #e0e0e0",borderRadius:"12px",padding:"12px 12px",width:"100%",maxWidth:"260px",margin:"10 auto",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[k.jsx("span",{style:{fontSize:"18px",display:"flex",alignItems:"center"},children:a[g.product_name]||k.jsx(UL,{sx:{color:"#335AFF",fontSize:"1.5rem"}})}),k.jsx("h4",{style:{margin:0,color:"#333",fontSize:"15px",fontWeight:600,lineHeight:1.4},children:g.product_name})]})})},g.product_id))}):k.jsx(wn,{item:!0,xs:12,children:k.jsx(i0,{message:"No Add Ons Found"})}),k.jsxs(k_,{open:t,onClose:()=>r(!1),maxWidth:"xs",fullWidth:!0,children:[k.jsx(Iee,{sx:{fontWeight:600,textAlign:"center",color:"#1976D2"},children:"Contact Your SPOC"}),k.jsx(I_,{children:k.jsx("div",{style:{textAlign:"center",fontSize:"15px",padding:"10px 0"},children:"To upgrade your plan, please contact your SPOC."})}),k.jsx(M_,{sx:{justifyContent:"center"},children:k.jsx(sy,{variant:"contained",color:"primary",onClick:()=>r(!1),children:"Close"})})]}),k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",style:{marginTop:"32px"},children:k.jsx(Ea,{label:"Upgrade",onClick:()=>r(!0),disabled:c})})})]})]})},Gft="_card_container_vce56_1",Yft="_card_titles_vce56_13",Uft="_card_subtitles_vce56_18",Xft="_card_subtotal_vce56_23",qft="_card_headers_vce56_40",Zft="_card_content_vce56_48",Um={card_container:Gft,card_titles:Yft,card_subtitles:Uft,card_subtotal:Xft,card_headers:qft,card_content:Zft},Nhe=e=>{const{open:n,setIsOpen:t}=e,r=Mb(),{session:{API_BASE_URL:o,mode:i}}=s0(),a=zC(),[s,l]=U.useState({amount:"",remarks:""}),{handleSubmit:c,isDisabled:d}=a0({url:gbe}),p=()=>{t(!1)},f=()=>{if(!s.amount.length){r("Please Enter Amount");return}const h={amount:s.amount,remarks:s.remarks};c(h,null,m=>{var v;a.invalidateQueries("transaction-history"),qr.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,o,p,r,i)},null)},g=(h,m)=>{l(v=>mn(pt({},v),{[h]:m}))};return k.jsx(bL,{open:n,title:"Add Money",size:"xs",onModalclose:p,children:k.jsxs("div",{children:[k.jsx(Fp,{label:"Amount",name:"amount",required:!0,value:s.amount,onChange:h=>{const{name:m,value:v}=h.target;(v===""||/^[0-9\b]+$/.test(v))&&g(m,v)},className:"w-100 mb-10 mt-10"}),k.jsx(Fp,{label:"Remarks",name:"remarks",value:s.remarks,onChange:h=>{const{name:m,value:v}=h.target;g(m,v)},className:"w-100 mb-10"}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Cancel",variant:"outlined",onClick:p}),k.jsx(Ea,{label:"Submit",disabled:d,onClick:f})]})]})})},Jft=e=>{const{onTabChange:n}=e,t=Mb(),{session:{API_BASE_URL:r,mode:o}}=s0(),[i,a]=U.useState(!1),{data:s,isFetching:l}=Xd(Fh,{url:hbe,params:{}},"customer-subsription"),{handleSubmit:c,isDisabled:d,isLoading:p}=a0({url:XK}),f=()=>{a(!0)},g=()=>{const h={plan_id:s==null?void 0:s.plan_id,add_on_id:s==null?void 0:s.add_on_product_id};c(h,null,m=>{var v;qr.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,r,()=>{},t,o)},null)};return k.jsxs("div",{children:[k.jsx(om,{visible:l||p}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",children:k.jsx(Ea,{label:"Top Up Wallet",startIcon:k.jsx(e6,{}),onClick:()=>{f()}})})}),qr.validateDataType(s==null?void 0:s.header,Vi.ARRAY)?s==null?void 0:s.header.map(h=>k.jsx(wn,{item:!0,xs:12,sm:12,md:4,lg:4,children:k.jsxs("div",{className:Um.card_container,children:[k.jsx("div",{className:Um.card_headers,children:k.jsx("span",{className:Um.card_titles,style:{color:"#335AFF"},children:h})}),k.jsx(Ha,{className:"mb-10"}),qr.validateDataType(s==null?void 0:s.resultRows,Vi.ARRAY)?s.resultRows.map((m,v,b)=>k.jsxs(k.Fragment,{children:[k.jsx("div",{className:Um.card_content,children:qr.validateDataType(m==null?void 0:m[h],Vi.ARRAY)?m==null?void 0:m[h].map(w=>k.jsx(k.Fragment,{children:k.jsx("span",{className:`${h==="Plan"?Um.card_titles:""}`,children:h==="Price"?`Rs ${w}`:w})})):k.jsx(k.Fragment,{})}),v!==b.length-1?k.jsx(Ha,{className:"mb-10"}):k.jsx(k.Fragment,{})]})):k.jsx(k.Fragment,{})]})})):k.jsx(i0,{message:"No Plans Found"}),qr.validateDataType(s==null?void 0:s.subtotal,Vi.ARRAY)?s.subtotal.map(h=>k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:`flex-between-center mb-10 ${h.name==="Total"?Um.card_subtitles:Um.card_subtotal}`,children:[k.jsx("span",{children:h.name}),k.jsxs("span",{children:["Rs ",h.amount]})]}),k.jsx(Ha,{})]})):k.jsx(k.Fragment,{}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Renew",variant:"outlined",disabled:d,onClick:g}),k.jsx(Ea,{label:"Modify Subscription",onClick:()=>{n(2)}})]})})]}),i&&k.jsx(Nhe,{open:i,setIsOpen:a})]})},Kft="_card_container_1ts8v_1",Qft="_card_subtitles_1ts8v_18",eht="_icons_background_1ts8v_23",ku={card_container:Kft,card_subtitles:Qft,icons_background:eht};function tht(e){return NL({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64l241.9 0c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5 608 384c0 35.3-28.7 64-64 64l-241.9 0c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5 32 128c0-35.3 28.7-64 64-64zm64 64l-64 0 0 64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64l64 0 0-64zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z"},child:[]}]})(e)}var sB={},nht=Zr;Object.defineProperty(sB,"__esModule",{value:!0});var $9=sB.default=void 0,rht=nht(go()),oht=k;$9=sB.default=(0,rht.default)((0,oht.jsx)("path",{d:"M18 4H6C3.79 4 2 5.79 2 8v8c0 2.21 1.79 4 4 4h12c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4m-1.86 9.77c-.24.2-.57.28-.88.2L4.15 11.25C4.45 10.52 5.16 10 6 10h12c.67 0 1.26.34 1.63.84zM6 6h12c1.1 0 2 .9 2 2v.55c-.59-.34-1.27-.55-2-.55H6c-.73 0-1.41.21-2 .55V8c0-1.1.9-2 2-2"}),"Wallet");var lB={},iht=Zr;Object.defineProperty(lB,"__esModule",{value:!0});var Fhe=lB.default=void 0,aht=iht(go()),sht=k;Fhe=lB.default=(0,aht.default)((0,sht.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const cK=[{label:"Credit Card",value:"cc"},{label:"Debit Card",value:"dc"},{label:"New Banking",value:"nb"}],lht=()=>{var g,h,m,v;const[e,n]=U.useState(!1),[t,r]=U.useState(!1),[o,i]=U.useState({}),{data:a,isFetching:s}=Xd(Fh,{url:mbe,params:{}},"transaction-history"),l=()=>{n(!0)},c=()=>{r(!0)},d=()=>{r(!1),i({})},p=(b,w)=>{i(C=>mn(pt({},C),{[b]:w}))};console.log({automaticTopupDetails:o});const f=U.useMemo(()=>[{header:"Date",accessorKey:"CREATED_ON",id:"CREATED_ON",cell:b=>k.jsxs("span",{children:[" ",Oi(b).format("h:mma, D MMMM YYYY")]})},{header:"Payment By",accessorKey:"PAYMENT_BY",id:"PAYMENT_BY"},{header:"Description",accessorKey:"DESCRIPTION",id:"DESCRIPTION"},{header:"Transaction Id",accessorKey:"LEDGER_ID",id:"LEDGER_ID"},{header:"Transaction Remarks",accessorKey:"TRANSACTION_REMARKS",id:"TRANSACTION_REMARKS"},{header:"Credit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="credit"?`${b}`:"--"})},{header:"Debit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="debit"?`${b}`:"--"})},{header:"Closing Balance",accessorKey:"CLOSING_BALANCE",id:"CLOSING_BALANCE",cell:b=>k.jsx("span",{className:`${ku.card_subtitles}`,style:{color:"#8B8684 "},children:b})}],[a]);return k.jsxs("div",{children:[k.jsx(om,{visible:s}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${ku.card_container}`,children:[k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{style:{background:"#027A481A",margin:"inherit"},className:ku.icons_background,children:k.jsx(tht,{style:{color:"#027A48",fontSize:"2rem"}})})}),k.jsx("div",{style:{margin:"auto"},children:k.jsx(Ea,{label:"Add Money",variant:"outlined",startIcon:k.jsx(e6,{}),onClick:()=>{l()}})})]})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${ku.card_container}`,children:k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#0237671A",margin:"inherit"},className:ku.icons_background,children:k.jsx($9,{style:{color:"#023767",fontSize:"2rem"}})}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Wallet Balance"}),k.jsxs("span",{className:`${ku.card_subtitles}`,children:["Rs ",(h=(g=a==null?void 0:a.overview)==null?void 0:g.balance)!=null?h:"--"]})]})]})})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${ku.card_container}`,children:[k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#335AFF1A",margin:"inherit"},className:ku.icons_background,children:k.jsx($9,{style:{color:"#335AFF",fontSize:"2rem"}})}),k.jsx("span",{className:`${ku.card_subtitles}`,children:"Automatic Topup"})]}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Set Up",onClick:c}),k.jsx(nb,{title:"Whenever your balance goes below, top up your wallet automatically",children:k.jsx(Fhe,{className:"cursor-pointer"})})]})]})}),k.jsx(wn,{item:!0,xs:12,sm:12,lg:12,children:k.jsxs("div",{className:`${ku.card_container} g-10`,children:[k.jsx("span",{className:`${ku.card_subtitles}`,children:"Transaction History"}),k.jsx(Ha,{}),k.jsx("div",{style:{height:"340px",overflow:"scroll"},children:k.jsx(ffe,{data:qr.validateDataType((m=a==null?void 0:a.transactionHistoryList)==null?void 0:m.result,Vi.ARRAY)?(v=a==null?void 0:a.transactionHistoryList)==null?void 0:v.result:[],columns:f,wrapByTooltipDefault:!0})})]})})]}),e&&k.jsx(Nhe,{open:e,setIsOpen:n}),t&&k.jsx(bL,{title:"Topup Setup",open:t,size:"xs",onModalclose:d,children:k.jsxs(wn,{container:!0,spacing:2,sx:{marginTop:"-10px"},children:[[{name:"min_amount",label:"Min Amount"},{name:"max_amount",label:"Max Amount"}].map(b=>{var w;return k.jsx(wn,{item:!0,xs:12,children:k.jsx(Fp,{label:b.label,name:b.name,className:"w-100",value:(w=o==null?void 0:o[b.name])!=null?w:"",onChange:C=>{const{name:O,value:x}=C.target;(x===""||/^[0-9\b]+$/.test(x))&&p(O,x)}})})}),k.jsx(wn,{item:!0,xs:12,children:k.jsx(hfe,{options:cK,value:cK.filter(b=>b.value===(o==null?void 0:o.transaction_type)),label:"Transaction Type",onChange:b=>{p("transaction_type",b==null?void 0:b.value)}})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Cancel",variant:"outlined",onClick:d}),k.jsx(Ea,{label:"Submit"})]})})]})})]})},cht=()=>{const{session:{user:e}}=s0(),[n,t]=U.useState([]),[r,o]=U.useState(null),i=(e==null?void 0:e.org_id)||null,{data:a,isFetching:s}=Xd($K,{url:Cbe,data:{org_id:i,pagination:{page:1,limit:10}}},["addon-clients",i],{enabled:!!i});U.useEffect(()=>{if(a){const{headers:c=[],result:{list:d=[]}={}}=a;t(c),d.length>0&&o(d[0])}},[a]);const l=c=>{if(!r)return;const d=String(c),p=r.productNameID.includes(d)?r.productNameID.filter(f=>f!==d):[...r.productNameID,d];o(mn(pt({},r),{productNameID:p})),console.log("Toggled:",d,"Updated:",p)};return!i||s?k.jsx(om,{visible:!0}):k.jsx(eM,{sx:{flexGrow:1},mt:2,children:k.jsxs(rM,{gap:2,children:[k.jsx(ls,{variant:"h6",children:"Subscription Activation"}),k.jsx(Qp,{variant:"outlined",sx:{width:"100%"},children:k.jsx(iM,{disablePadding:!0,children:n.map((c,d)=>{const p=(r==null?void 0:r.productNameID.includes(String(c.id)))||!1;return k.jsxs(U.Fragment,{children:[k.jsxs(__,{children:[k.jsx(Aee,{primary:c.product_name,secondary:c.short_product_name}),k.jsx(aM,{children:k.jsx(Hee,{edge:"end",checked:p,onChange:()=>l(c.id),disabled:!c.operation_allow})})]}),d<n.length-1&&k.jsx(Ha,{})]},c.id)})})})]})})};exports.BillingSubscription=cht;exports.CustomerInvoices=spt;exports.ManageProvider=H3e;exports.PlansOverview=Hft;exports.SubscriptionConsumption=Zdt;exports.SubscriptionOverview=eft;exports.SubscriptionPaymentMethod=gft;exports.SubscriptionPlans=Jft;exports.SubscriptionWallet=lht;
|
|
3143
|
+
}`;var fr=DB(function(){return Tr(Ce,hn+"return "+Mt).apply(t,Ae)});if(fr.source=Mt,q6(fr))throw fr;return fr}function t0e(S){return no(S).toLowerCase()}function n0e(S){return no(S).toUpperCase()}function r0e(S,I,z){if(S=no(S),S&&(z||I===t))return x1(S);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=vs(I),Ce=Qu(J,ce),Ae=cm(J,ce)+1;return pd(J,Ce,Ae).join("")}function o0e(S,I,z){if(S=no(S),S&&(z||I===t))return S.slice(0,yf(S)+1);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=cm(J,vs(I))+1;return pd(J,0,ce).join("")}function i0e(S,I,z){if(S=no(S),S&&(z||I===t))return S.replace(Zn,"");if(!S||!(I=xs(I)))return S;var J=vs(S),ce=Qu(J,vs(I));return pd(J,ce).join("")}function a0e(S,I){var z=_,J=A;if(ci(I)){var ce="separator"in I?I.separator:ce;z="length"in I?ar(I.length):z,J="omission"in I?xs(I.omission):J}S=no(S);var Ce=S.length;if(ed(S)){var Ae=vs(S);Ce=Ae.length}if(z>=Ce)return S;var Le=z-vf(J);if(Le<1)return J;var qe=Ae?pd(Ae,0,Le).join(""):S.slice(0,Le);if(ce===t)return qe+J;if(Ae&&(Le+=qe.length-Le),Z6(ce)){if(S.slice(Le).search(ce)){var wt,Ot=qe;for(ce.global||(ce=ve(ce.source,no(_t.exec(ce))+"g")),ce.lastIndex=0;wt=ce.exec(Ot);)var Mt=wt.index;qe=qe.slice(0,Mt===t?Le:Mt)}}else if(S.indexOf(xs(ce),Le)!=Le){var qt=qe.lastIndexOf(ce);qt>-1&&(qe=qe.slice(0,qt))}return qe+J}function s0e(S){return S=no(S),S&&Yt.test(S)?S.replace(un,C1):S}var l0e=If(function(S,I,z){return S+(z?" ":"")+I.toUpperCase()}),Q6=Tm("toUpperCase");function AB(S,I,z){return S=no(S),I=z?t:I,I===t?c6(S)?dm(S):R0(S):S.match(I)||[]}var DB=er(function(S,I){try{return Qe(S,t,I)}catch(z){return q6(z)?z:new Bn(z)}}),c0e=wc(function(S,I){return st(I,function(z){z=Cc(z),Qa(S,z,U6(S[z],S))}),S});function u0e(S){var I=S==null?0:S.length,z=Cn();return S=I?Co(S,function(J){if(typeof J[1]!="function")throw new Da(a);return[z(J[0]),J[1]]}):[],er(function(J){for(var ce=-1;++ce<I;){var Ce=S[ce];if(Qe(Ce[0],this,J))return Qe(Ce[1],this,J)}})}function d0e(S){return Y0(bs(S,p))}function eP(S){return function(){return S}}function p0e(S,I){return S==null||S!==S?I:S}var f0e=zs(),h0e=zs(!0);function Us(S){return S}function tP(S){return kf(typeof S=="function"?S:bs(S,p))}function m0e(S){return Q0(bs(S,p))}function g0e(S,I){return U1(S,bs(I,p))}var v0e=er(function(S,I){return function(z){return Bl(z,S,I)}}),y0e=er(function(S,I){return function(z){return Bl(S,z,I)}});function nP(S,I,z){var J=ba(I),ce=xm(I,J);z==null&&!(ci(I)&&(ce.length||!J.length))&&(z=I,I=S,S=this,ce=xm(I,ba(I)));var Ce=!(ci(z)&&"chain"in z)||!!z.chain,Ae=vp(S);return st(ce,function(Le){var qe=I[Le];S[Le]=qe,Ae&&(S.prototype[Le]=function(){var wt=this.__chain__;if(Ce||wt){var Ot=S(this.__wrapped__),Mt=Ot.__actions__=ia(this.__actions__);return Mt.push({func:qe,args:arguments,thisArg:S}),Ot.__chain__=wt,Ot}return qe.apply(S,Ku([this.value()],arguments))})}),S}function b0e(){return na._===this&&(na._=f6),this}function rP(){}function x0e(S){return S=ar(S),er(function(I){return q1(I,S)})}var w0e=Nn(Co),C0e=Nn(jn),S0e=Nn(y1);function _B(S){return f2(S)?b1(Cc(S)):bc(S)}function O0e(S){return function(I){return S==null?t:Fa(S,I)}}var T0e=Qo(),E0e=Qo(!0);function oP(){return[]}function iP(){return!1}function k0e(){return{}}function M0e(){return""}function I0e(){return!0}function P0e(S,I){if(S=ar(S),S<1||S>G)return[];var z=Z,J=ra(S,Z);I=Cn(I),S-=Z;for(var ce=gf(J,I);++z<S;)I(z);return ce}function R0e(S){return Jn(S)?Co(S,Cc):Wl(S)?[S]:ia(b2(no(S)))}function A0e(S){var I=++Ml;return no(S)+I}var D0e=xc(function(S,I){return S+I},0),_0e=Em("ceil"),j0e=xc(function(S,I){return S/I},1),N0e=Em("floor");function F0e(S){return S&&S.length?bm(S,Us,wm):t}function L0e(S,I){return S&&S.length?bm(S,Cn(I,2),wm):t}function B0e(S){return lS(S,Us)}function V0e(S,I){return lS(S,Cn(I,2))}function z0e(S){return S&&S.length?bm(S,Us,K0):t}function $0e(S,I){return S&&S.length?bm(S,Cn(I,2),K0):t}var W0e=xc(function(S,I){return S*I},1),H0e=Em("round"),G0e=xc(function(S,I){return S-I},0);function Y0e(S){return S&&S.length?j0(S,Us):0}function U0e(S,I){return S&&S.length?j0(S,Cn(I,2)):0}return ye.after=mme,ye.ary=dB,ye.assign=nge,ye.assignIn=TB,ye.assignInWith=EO,ye.assignWith=rge,ye.at=oge,ye.before=pB,ye.bind=U6,ye.bindAll=c0e,ye.bindKey=fB,ye.castArray=kme,ye.chain=Dm,ye.chunk=ts,ye.compact=x2,ye.concat=j6,ye.cond=u0e,ye.conforms=d0e,ye.constant=eP,ye.countBy=Yhe,ye.create=ige,ye.curry=hB,ye.curryRight=mB,ye.debounce=gB,ye.defaults=age,ye.defaultsDeep=sge,ye.defer=gme,ye.delay=vme,ye.difference=N6,ye.differenceBy=w2,ye.differenceWith=C2,ye.drop=F6,ye.dropRight=L6,ye.dropRightWhile=B6,ye.dropWhile=fO,ye.fill=V6,ye.filter=Xhe,ye.flatMap=Jhe,ye.flatMapDeep=Khe,ye.flatMapDepth=Qhe,ye.flatten=fv,ye.flattenDeep=z6,ye.flattenDepth=$6,ye.flip=yme,ye.flow=f0e,ye.flowRight=h0e,ye.fromPairs=W6,ye.functions=hge,ye.functionsIn=mge,ye.groupBy=eme,ye.initial=H6,ye.intersection=G6,ye.intersectionBy=Y6,ye.intersectionWith=T,ye.invert=vge,ye.invertBy=yge,ye.invokeMap=nme,ye.iteratee=tP,ye.keyBy=rme,ye.keys=ba,ye.keysIn=Ys,ye.map=xO,ye.mapKeys=xge,ye.mapValues=wge,ye.matches=m0e,ye.matchesProperty=g0e,ye.memoize=CO,ye.merge=Cge,ye.mergeWith=EB,ye.method=v0e,ye.methodOf=y0e,ye.mixin=nP,ye.negate=SO,ye.nthArg=x0e,ye.omit=Sge,ye.omitBy=Oge,ye.once=bme,ye.orderBy=ome,ye.over=w0e,ye.overArgs=xme,ye.overEvery=C0e,ye.overSome=S0e,ye.partial=X6,ye.partialRight=vB,ye.partition=ime,ye.pick=Tge,ye.pickBy=kB,ye.property=_B,ye.propertyOf=O0e,ye.pull=Oe,ye.pullAll=je,ye.pullAllBy=Ve,ye.pullAllWith=tt,ye.pullAt=Ct,ye.range=T0e,ye.rangeRight=E0e,ye.rearg=wme,ye.reject=lme,ye.remove=bt,ye.rest=Cme,ye.reverse=Pt,ye.sampleSize=ume,ye.set=kge,ye.setWith=Mge,ye.shuffle=dme,ye.slice=rn,ye.sortBy=hme,ye.sortedUniq=Un,ye.sortedUniqBy=Dn,ye.split=Jge,ye.spread=Sme,ye.tail=Rr,ye.take=fn,ye.takeRight=Mn,ye.takeRightWhile=Ri,ye.takeWhile=li,ye.tap=yv,ye.throttle=Ome,ye.thru=bO,ye.toArray=CB,ye.toPairs=MB,ye.toPairsIn=IB,ye.toPath=R0e,ye.toPlainObject=OB,ye.transform=Ige,ye.unary=Tme,ye.union=Va,ye.unionBy=Do,ye.unionWith=ya,ye.uniq=Sc,ye.uniqBy=md,ye.uniqWith=hv,ye.unset=Pge,ye.unzip=Rm,ye.unzipWith=Am,ye.update=Rge,ye.updateWith=Age,ye.values=xv,ye.valuesIn=Dge,ye.without=gp,ye.words=AB,ye.wrap=Eme,ye.xor=gO,ye.xorBy=vO,ye.xorWith=mv,ye.zip=O2,ye.zipObject=gv,ye.zipObjectDeep=vv,ye.zipWith=yO,ye.entries=MB,ye.entriesIn=IB,ye.extend=TB,ye.extendWith=EO,nP(ye,ye),ye.add=D0e,ye.attempt=DB,ye.camelCase=Fge,ye.capitalize=PB,ye.ceil=_0e,ye.clamp=_ge,ye.clone=Mme,ye.cloneDeep=Pme,ye.cloneDeepWith=Rme,ye.cloneWith=Ime,ye.conformsTo=Ame,ye.deburr=RB,ye.defaultTo=p0e,ye.divide=j0e,ye.endsWith=Lge,ye.eq=wu,ye.escape=Bge,ye.escapeRegExp=Vge,ye.every=Uhe,ye.find=qhe,ye.findIndex=hO,ye.findKey=lge,ye.findLast=Zhe,ye.findLastIndex=pv,ye.findLastKey=cge,ye.floor=N0e,ye.forEach=cB,ye.forEachRight=uB,ye.forIn=uge,ye.forInRight=dge,ye.forOwn=pge,ye.forOwnRight=fge,ye.get=J6,ye.gt=Dme,ye.gte=_me,ye.has=gge,ye.hasIn=K6,ye.head=mO,ye.identity=Us,ye.includes=tme,ye.indexOf=S2,ye.inRange=jge,ye.invoke=bge,ye.isArguments=_m,ye.isArray=Jn,ye.isArrayBuffer=jme,ye.isArrayLike=Gs,ye.isArrayLikeObject=Ai,ye.isBoolean=Nme,ye.isBuffer=Df,ye.isDate=Fme,ye.isElement=Lme,ye.isEmpty=Bme,ye.isEqual=Vme,ye.isEqualWith=zme,ye.isError=q6,ye.isFinite=$me,ye.isFunction=vp,ye.isInteger=yB,ye.isLength=OO,ye.isMap=bB,ye.isMatch=Wme,ye.isMatchWith=Hme,ye.isNaN=Gme,ye.isNative=Yme,ye.isNil=Xme,ye.isNull=Ume,ye.isNumber=xB,ye.isObject=ci,ye.isObjectLike=vi,ye.isPlainObject=T2,ye.isRegExp=Z6,ye.isSafeInteger=qme,ye.isSet=wB,ye.isString=TO,ye.isSymbol=Wl,ye.isTypedArray=bv,ye.isUndefined=Zme,ye.isWeakMap=Jme,ye.isWeakSet=Kme,ye.join=P,ye.kebabCase=zge,ye.last=W,ye.lastIndexOf=ee,ye.lowerCase=$ge,ye.lowerFirst=Wge,ye.lt=Qme,ye.lte=ege,ye.max=F0e,ye.maxBy=L0e,ye.mean=B0e,ye.meanBy=V0e,ye.min=z0e,ye.minBy=$0e,ye.stubArray=oP,ye.stubFalse=iP,ye.stubObject=k0e,ye.stubString=M0e,ye.stubTrue=I0e,ye.multiply=W0e,ye.nth=ue,ye.noConflict=b0e,ye.noop=rP,ye.now=wO,ye.pad=Hge,ye.padEnd=Gge,ye.padStart=Yge,ye.parseInt=Uge,ye.random=Nge,ye.reduce=ame,ye.reduceRight=sme,ye.repeat=Xge,ye.replace=qge,ye.result=Ege,ye.round=H0e,ye.runInContext=Ye,ye.sample=cme,ye.size=pme,ye.snakeCase=Zge,ye.some=fme,ye.sortedIndex=cn,ye.sortedIndexBy=Sn,ye.sortedIndexOf=St,ye.sortedLastIndex=Lt,ye.sortedLastIndexBy=kn,ye.sortedLastIndexOf=Gt,ye.startCase=Kge,ye.startsWith=Qge,ye.subtract=G0e,ye.sum=Y0e,ye.sumBy=U0e,ye.template=e0e,ye.times=P0e,ye.toFinite=yp,ye.toInteger=ar,ye.toLength=SB,ye.toLower=t0e,ye.toNumber=Oc,ye.toSafeInteger=tge,ye.toString=no,ye.toUpper=n0e,ye.trim=r0e,ye.trimEnd=o0e,ye.trimStart=i0e,ye.truncate=a0e,ye.unescape=s0e,ye.uniqueId=A0e,ye.upperCase=l0e,ye.upperFirst=Q6,ye.each=cB,ye.eachRight=uB,ye.first=mO,nP(ye,function(){var S={};return Ll(ye,function(I,z){wr.call(ye.prototype,z)||(S[z]=I)}),S}(),{chain:!1}),ye.VERSION=r,st(["bind","bindKey","curry","curryRight","partial","partialRight"],function(S){ye[S].placeholder=ye}),st(["drop","take"],function(S,I){pr.prototype[S]=function(z){z=z===t?1:Ao(ar(z),0);var J=this.__filtered__&&!I?new pr(this):this.clone();return J.__filtered__?J.__takeCount__=ra(z,J.__takeCount__):J.__views__.push({size:ra(z,Z),type:S+(J.__dir__<0?"Right":"")}),J},pr.prototype[S+"Right"]=function(z){return this.reverse()[S](z).reverse()}}),st(["filter","map","takeWhile"],function(S,I){var z=I+1,J=z==L||z==V;pr.prototype[S]=function(ce){var Ce=this.clone();return Ce.__iteratees__.push({iteratee:Cn(ce,3),type:z}),Ce.__filtered__=Ce.__filtered__||J,Ce}}),st(["head","last"],function(S,I){var z="take"+(I?"Right":"");pr.prototype[S]=function(){return this[z](1).value()[0]}}),st(["initial","tail"],function(S,I){var z="drop"+(I?"":"Right");pr.prototype[S]=function(){return this.__filtered__?new pr(this):this[z](1)}}),pr.prototype.compact=function(){return this.filter(Us)},pr.prototype.find=function(S){return this.filter(S).head()},pr.prototype.findLast=function(S){return this.reverse().find(S)},pr.prototype.invokeMap=er(function(S,I){return typeof S=="function"?new pr(this):this.map(function(z){return Bl(z,S,I)})}),pr.prototype.reject=function(S){return this.filter(SO(Cn(S)))},pr.prototype.slice=function(S,I){S=ar(S);var z=this;return z.__filtered__&&(S>0||I<0)?new pr(z):(S<0?z=z.takeRight(-S):S&&(z=z.drop(S)),I!==t&&(I=ar(I),z=I<0?z.dropRight(-I):z.take(I-S)),z)},pr.prototype.takeRightWhile=function(S){return this.reverse().takeWhile(S).reverse()},pr.prototype.toArray=function(){return this.take(Z)},Ll(pr.prototype,function(S,I){var z=/^(?:filter|find|map|reject)|While$/.test(I),J=/^(?:head|last)$/.test(I),ce=ye[J?"take"+(I=="last"?"Right":""):I],Ce=J||/^find/.test(I);ce&&(ye.prototype[I]=function(){var Ae=this.__wrapped__,Le=J?[1]:arguments,qe=Ae instanceof pr,wt=Le[0],Ot=qe||Jn(Ae),Mt=function(Cr){var Mr=ce.apply(ye,Ku([Cr],Le));return J&&qt?Mr[0]:Mr};Ot&&z&&typeof wt=="function"&&wt.length!=1&&(qe=Ot=!1);var qt=this.__chain__,hn=!!this.__actions__.length,Rn=Ce&&!qt,fr=qe&&!hn;if(!Ce&&Ot){Ae=fr?Ae:new pr(this);var An=S.apply(Ae,Le);return An.__actions__.push({func:bO,args:[Mt],thisArg:t}),new Ja(An,qt)}return Rn&&fr?S.apply(this,Le):(An=this.thru(Mt),Rn?J?An.value()[0]:An.value():An)})}),st(["pop","push","shift","sort","splice","unshift"],function(S){var I=_a[S],z=/^(?:push|sort|unshift)$/.test(S)?"tap":"thru",J=/^(?:pop|shift)$/.test(S);ye.prototype[S]=function(){var ce=arguments;if(J&&!this.__chain__){var Ce=this.value();return I.apply(Jn(Ce)?Ce:[],ce)}return this[z](function(Ae){return I.apply(Jn(Ae)?Ae:[],ce)})}}),Ll(pr.prototype,function(S,I){var z=ye[I];if(z){var J=z.name+"";wr.call(rd,J)||(rd[J]=[]),rd[J].push({name:I,func:z})}}),rd[av(t,b).name]=[{name:"wrapper",func:t}],pr.prototype.clone=ir,pr.prototype.reverse=v6,pr.prototype.value=y6,ye.prototype.at=Lhe,ye.prototype.chain=Bhe,ye.prototype.commit=Vhe,ye.prototype.next=zhe,ye.prototype.plant=Whe,ye.prototype.reverse=Hhe,ye.prototype.toJSON=ye.prototype.valueOf=ye.prototype.value=Ghe,ye.prototype.first=ye.prototype.head,wf&&(ye.prototype[wf]=$he),ye},kl=B0();uu?((uu.exports=kl)._=kl,Ju._=kl):na._=kl}).call(Au)})(yk,yk.exports);var Jdt=yk.exports;const Kdt=()=>{const{pushAlert:e}=Ek();return t=>{e({type:YK.SUCCESS,message:t!=null?t:"Success"})}},Qdt=e=>{var n,t;return(t=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:t.message},ept=e=>{var n;return((n=e==null?void 0:e.data)==null?void 0:n.message)||(e==null?void 0:e.message)},a0=({url:e,token:n,method:t="post",baseURL:r,successCallback:o=()=>{},errorCallback:i=()=>{},onSettledCallback:a=()=>{},debounceTime:s=500,errorMessageFormatter:l=Qdt,successMessageFormatter:c=ept})=>{const[d,p]=U.useState(!1),f=new AbortController,g=Mb(),h=Kdt(),{session:{token:m,API_BASE_URL:v}}=s0();n=n!=null?n:m,r=r!=null?r:v;const{mutate:b,isLoading:w}=xve(E=>Tc(exports,null,function*(){return(yield fi({headers:{token:n||localStorage.getItem("token")},url:e,baseURL:r,method:t,data:E,signal:f.signal})).data}),{onSuccess:E=>{E.error?g(c(E)):(o&&o(E),h(c(E)))},onError:E=>{var M;g((M=l(E))!=null?M:"Error occurred while processing the request"),i&&i(E)},onSettled:()=>{p(!1),a()}}),C=Jdt.debounce((E,M,R,D)=>{b(E,{onError:M,onSuccess:R,onSettled:D})},s);return{handleSubmit:(E,M,R,D)=>{d||(f.abort(),p(!0),C(E,M,R,D))},isDisabled:w||d,isLoading:w}};var FL={},tpt=Zr;Object.defineProperty(FL,"__esModule",{value:!0});var mhe=FL.default=void 0,npt=tpt(go()),rpt=k;mhe=FL.default=(0,npt.default)((0,rpt.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download");var LL={},opt=Zr;Object.defineProperty(LL,"__esModule",{value:!0});var ghe=LL.default=void 0,ipt=opt(go()),apt=k;ghe=LL.default=(0,ipt.default)((0,apt.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");const Cx={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},spt=()=>{const[e,n]=U.useState(Cx.LIST_VIEW),[t,r]=U.useState(""),[o,i]=U.useState({page:0,perPage:20}),{data:a,isFetching:s}=Xd(Fh,{url:vbe,params:{page:o.page,limit:o.perPage}},"customer-subsription"),{handleSubmit:l,isDisabled:c,isLoading:d}=a0({url:qK}),p=(h,m=!1)=>{const v={customer_id:h==null?void 0:h.customer_id,invoice_id:h==null?void 0:h.id,isDownload:1};c||l(v,null,b=>{m?(r(`data:application/pdf;base64,${b==null?void 0:b.data.buffer64}`),n(Cx.INVOICE_VIEW)):qr.downloadFileFromBuffer(b==null?void 0:b.data)},null)},f=(h,m)=>{i(v=>mn(pt({},v),{[h]:m}))},g=U.useMemo(()=>[{header:"Invoice Number",accessorKey:"invoice_number",id:"invoice_number"},{header:"Invoice Date",accessorKey:"invoice_date",id:"invoice_date"},{header:"Due Date",accessorKey:"invoice_due_date",id:"invoice_due_date"},{header:"Amount",accessorKey:"grand_total_amount",id:"grand_total_amount"},{header:"MRR",accessorKey:"invoice_mrr",id:"invoice_mrr"},{header:"Status",accessorKey:"payment_status",id:"payment_status",cell:(h,m)=>{var v;return k.jsx(Xk,{variant:"outlined",color:(v=uD==null?void 0:uD[m==null?void 0:m.invoice_status])!=null?v:"primary",label:h})}},{header:"Action",accessorKey:"id",id:"id",cell:(h,m)=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(nb,{title:"View Invoice",children:k.jsx(ghe,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m,!0)}})}),k.jsx(nb,{title:"Download Invoice",children:k.jsx(mhe,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m)}})})]})}],[a]);return console.log({customerInvoices:a}),k.jsxs("div",{children:[k.jsx(om,{visible:d}),e===Cx.LIST_VIEW?k.jsx("div",{style:{height:"70vh",overflow:"scroll"},children:k.jsx(ffe,{loading:s,data:qr.validateDataType(a==null?void 0:a.data,Vi.ARRAY)?a.data:[],columns:g,wrapByTooltipDefault:!0,pagination:mn(pt({show:!0,showFirstButton:!0,showLastButton:!0,perPageOptions:[20,30,50,100],totalDataCount:(a==null?void 0:a.totalCounts)||0},o),{handlePageChange:h=>f("page",h),handlePerPageChange:h=>f("perPage",h)})})}):k.jsx(k.Fragment,{}),e===Cx.INVOICE_VIEW?k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:t,type:"application/pdf",children:" "})}),k.jsx(Qp,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(rM,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(Ea,{label:" Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>n(Cx.LIST_VIEW)})})})]}):k.jsx(k.Fragment,{})]})},lpt="_card_container_dxhto_1",cpt="_card_count_dxhto_14",aK={card_container:lpt,card_count:cpt},upt=({data:e})=>{var n,t,r;return k.jsx("div",{className:`${aK.card_container}`,style:{height:"100%"},children:k.jsxs("div",{className:"flex-between-center g-10",children:[(n=e==null?void 0:e.icon)!=null?n:k.jsx(k.Fragment,{}),k.jsxs("div",{className:"flex-start-column mr-10 g-10",children:[k.jsx("div",{children:k.jsx("span",{children:(t=e==null?void 0:e.label)!=null?t:"-"})}),k.jsx("div",{children:k.jsx("span",{className:`${aK.card_count}`,children:(r=e==null?void 0:e.count)!=null?r:"-"})})]})]})})};var BL={},dpt=Zr;Object.defineProperty(BL,"__esModule",{value:!0});var vhe=BL.default=void 0,ppt=dpt(go()),fpt=k;vhe=BL.default=(0,ppt.default)((0,fpt.jsx)("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"AccountBalanceWallet");function sK({data:e="",limit:n=17,doNotShowTooltip:t=!1,arrow:r=!0,endAdornment:o="",startAdornment:i="",styleOverrides:a={}}){return k.jsx(k.Fragment,{children:e&&typeof e=="string"&&e.length>n&&!t?k.jsx(nb,{title:e!=null?e:"",arrow:r,children:k.jsx("span",{style:a,children:i+e.substring(0,n)+".."+o})}):i+e+o})}const hpt="_card_container_95l02_1",mpt="_card_subtitles_95l02_18",kT={card_container:hpt,card_subtitles:mpt};var VL={},gpt=Zr;Object.defineProperty(VL,"__esModule",{value:!0});var yhe=VL.default=void 0,vpt=gpt(go()),ypt=k;yhe=VL.default=(0,vpt.default)((0,ypt.jsx)("path",{d:"M12 7V3H2v18h20V7zm-2 12H4v-2h6zm0-4H4v-2h6zm0-4H4V9h6zm0-4H4V5h6zm10 12h-8V9h8zm-2-8h-4v2h4zm0 4h-4v2h4z"}),"CorporateFare");var zL={},bpt=Zr;Object.defineProperty(zL,"__esModule",{value:!0});var bhe=zL.default=void 0,xpt=bpt(go()),wpt=k;bhe=zL.default=(0,xpt.default)((0,wpt.jsx)("path",{d:"M3 10h11v2H3zm0-2h11V6H3zm0 8h7v-2H3zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71zm-.71.71-5.3 5.3V21h2.12l5.3-5.3z"}),"EditNote");var $L={},Cpt=Zr;Object.defineProperty($L,"__esModule",{value:!0});var e6=$L.default=void 0,Spt=Cpt(go()),Opt=k;e6=$L.default=(0,Spt.default)((0,Opt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");const Tpt=({orgDetails:e})=>{var Z,re,oe,K,Q,pe,fe,ae;const n=zC(),[t,r]=U.useState(!1),[o,i]=U.useState({org_name:"",mobile_number:"",gstin:""}),[a,s]=U.useState({email_id:!1,mobile_number:!1}),[l,c]=U.useState([]),[d,p]=U.useState(""),[f,g]=U.useState(null),[h,m]=U.useState([]),[v,b]=U.useState([]),[w,C]=U.useState({}),{handleSubmit:O,isDisabled:x,isLoading:E}=a0({url:wbe}),{data:M,isFetching:R}=Xd(Fh,{url:pbe,params:{}},"country-list",{enabled:t}),{data:D,isFetching:_}=Xd($K,{url:fbe,data:{country_id:w==null?void 0:w.country}},"state-list",{enabled:!!(w!=null&&w.country)});U.useEffect(()=>{if(qr.validateDataType(e,Vi.OBJECT)){const{org_name:ie,email_id:se,mobile_number:le,gstin:te,country:de,state:ge,city:be,address_1:Ee,address_2:Se,zip_code:Re}=pt({org_name:"",gstin:"",mobile_number:"",email_id:[],country:"",state:"",city:"",address_1:"",address_2:"",zip_code:""},e);i(xe=>mn(pt({},xe),{org_name:ie,mobile_number:le,gstin:te})),qr.validateDataType(se,Vi.ARRAY)&&c(se),C(xe=>mn(pt({},xe),{city:be,state:ge,country:de,address_1:Ee,address_2:Se,zip_code:Re}))}},[e]),U.useEffect(()=>{if(qr.validateDataType(M,Vi.ARRAY)){const ie=M.map(se=>({value:se==null?void 0:se.country_id,label:se==null?void 0:se.country_name}));m([...ie])}},[M]),U.useEffect(()=>{if(qr.validateDataType(D,Vi.ARRAY)){const ie=D.map(se=>({value:se==null?void 0:se.STATE_ID,label:se==null?void 0:se.STATE_NAME}));b([...ie])}},[D]);const A=ie=>{if(ie.key==="Enter"&&d.trim()!==""){const se=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;ie.preventDefault(),se.test(d)?(c([...l,d.trim()]),p("")):s(le=>mn(pt({},le),{email_id:!0}))}},j=ie=>()=>{c(se=>se.filter(le=>le!==ie))},N=()=>{r(!0)},L=()=>{r(!1)},B=(ie,se)=>{ie==="email_id"&&p(se),s(le=>mn(pt({},le),{[ie]:!1})),i(le=>mn(pt({},le),{[ie]:se}))},V=(ie,se)=>{C(ie==="country"?le=>mn(pt({},le),{state:"",[ie]:se}):le=>mn(pt({},le),{[ie]:se})),s(le=>mn(pt({},le),{[ie]:!1}))},H=()=>{const ie=/^\+?(\d[\d-.()\s]+)?\d$/,se=/^\d{6}$/;let le=!0;for(const[te,de]of Object.entries(o))te==="mobile_number"&&(ie.test(de)||(s(ge=>mn(pt({},ge),{[te]:!0})),le=!1)),de.length||(s(ge=>mn(pt({},ge),{[te]:!0})),le=!1);for(const[te,de]of Object.entries(w)){let ge=!1;(te=="zip_code"&&!se.test(de)||(te==="country"||te==="state")&&!de||(te=="city"||te==="address_1")&&!(de!=null&&de.length))&&(ge=!0),ge&&(s(be=>mn(pt({},be),{[te]:!0})),le=!1)}l.length||(s(te=>mn(pt({},te),{email_id:!0})),le=!1),le&&O(mn(pt(pt({},o),w),{email:l,client_id:e==null?void 0:e.client_id,phone_no:o==null?void 0:o.mobile_number,country:w==null?void 0:w.country,state:w==null?void 0:w.state}),null,()=>{n.invalidateQueries("subsription-overview"),L()},null)},G=(ie,se,le)=>{var de;return le!=null&&le.length&&(w!=null&&w[ie])?(de=le.filter(ge=>(ge==null?void 0:ge.value)===se))==null?void 0:de[0]:null},Y=ie=>{g(ie.currentTarget)},X=()=>{g(null)};return k.jsxs(k.Fragment,{children:[k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsxs("div",{className:`${kT.card_container}`,children:[k.jsx(om,{visible:E||R||_}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{className:`${kT.card_subtitles}`,children:"Company Information"}),k.jsx("div",{className:"flex-end-center g-10",children:k.jsx("span",{children:k.jsx(yhe,{sx:{color:"#009017",cursor:"pointer"}})})})]}),k.jsx(wn,{container:!0,spacing:2,children:k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Name :"})}),k.jsx("span",{children:(Z=e==null?void 0:e.org_name)!=null?Z:"-"})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Email :"})}),k.jsxs("div",{className:"flex-end-center",style:{gap:"4px"},children:[k.jsx(sK,{data:`${(oe=(re=e==null?void 0:e.email_id)==null?void 0:re[0])!=null?oe:"-"}`,limit:34}),((K=e==null?void 0:e.email_id)==null?void 0:K.length)>1?k.jsxs("span",{style:{backgroundColor:"#2B46F21A",color:"#2B46F2",padding:"4px",borderRadius:"50%",fontSize:"8px"},className:"flex-between-center",children:[k.jsx("span",{children:(Q=e==null?void 0:e.email_id)==null?void 0:Q.length}),k.jsx(e6,{className:"cursor-pointer",onClick:Y,sx:{fontSize:"8px"}})]}):k.jsx(k.Fragment,{})]})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Phone No :"})}),k.jsx("div",{children:k.jsx(sK,{data:(pe=e==null?void 0:e.mobile_number)!=null?pe:"-",limit:34})})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"GSTIN NO. :"})}),k.jsx("span",{children:(fe=e==null?void 0:e.gstin)!=null?fe:"-"})]})]})})]})}),k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx("div",{className:`${kT.card_container}`,children:k.jsxs("div",{className:"flex-between-columns",children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("span",{className:`${kT.card_subtitles}`,children:"Billing Address"}),k.jsx(bhe,{sx:{color:"blue",cursor:"pointer"},onClick:N})]}),k.jsx("div",{children:k.jsx("span",{children:e==null?void 0:e.org_address})})]})})}),t&&k.jsx(bL,{size:"md",title:"Edit Org Details",open:t,onModalclose:L,children:k.jsxs(wn,{container:!0,spacing:2,children:[k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Basic Details"})}),k.jsx(Ha,{})]}),[{name:"org_name",label:"Name"},{name:"mobile_number",label:"Phone No"},{name:"gstin",label:"GST No"},{name:"email_id",label:"Email"}].map(ie=>k.jsxs(wn,{item:!0,xs:6,children:[ie.name==="email_id"?k.jsxs(eM,{component:"div",sx:{display:"flex",flexWrap:"wrap",border:"1px solid #ccc",borderRadius:"4px",padding:"8px",height:"38px",overflow:"scroll"},children:[l.map((se,le)=>k.jsx(Xk,{label:se,onDelete:j(se),sx:{margin:"4px"}},le)),k.jsx(V_,{required:!0,variant:"standard",name:ie.name,placeholder:`Enter ${ie.label}`,value:d,onChange:se=>{const{name:le,value:te}=se.target;B(le,te)},onKeyPress:A,InputProps:{disableUnderline:!0},sx:{flexGrow:1,minWidth:"100px"}})]}):k.jsx(Fp,{required:!0,className:"w-100",name:ie.name,label:ie.label,value:o==null?void 0:o[ie.name],onChange:se=>{const{value:le,name:te}=se.target;B(te,le)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]},ie.name)),k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Billing Adreess"})}),k.jsx(Ha,{})]}),[{name:"country",label:"Country",type:"select",required:!0,options:h},{name:"state",label:"State",type:"select",required:!0,options:v},{name:"city",label:"City",type:"input",required:!0},{name:"address_1",label:"Address 1",type:"input",multiline:!0,required:!0},{name:"address_2",label:"Address 2",type:"input",multiline:!0,required:!1},{name:"zip_code",label:"Zip Code",type:"input",required:!0}].map(ie=>{var se;return k.jsxs(wn,{item:!0,xs:6,children:[ie.type=="select"?k.jsx(hfe,{options:ie.options,label:ie.label,name:ie.name,required:ie.required,value:G(ie.name,w==null?void 0:w[ie.name],ie.options),isSearchable:!0,onChange:le=>{V(ie.name,le==null?void 0:le.value)},error:a==null?void 0:a[ie.name]}):k.jsx(Fp,{className:"w-100",required:ie.required,multiline:ie==null?void 0:ie.multiline,value:(se=w==null?void 0:w[ie.name])!=null?se:"",label:ie.label,name:ie.name,onChange:le=>{const{name:te,value:de}=le.target;V(te,de)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Cancel",variant:"outlined",onClick:L}),k.jsx(Ea,{label:"Submit",disabled:x,onClick:H})]})})]})}),qr.validateDataType(e==null?void 0:e.email_id,Vi.ARRAY)&&k.jsx(j_,{open:!!f,anchorEl:f,onClose:X,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:k.jsx("div",{style:{padding:"10px"},children:(ae=e.email_id)==null?void 0:ae.map(ie=>k.jsx("div",{className:"mb-10",children:ie}))})})]})},Ept="_card_container_c1yb9_1",kpt="_card_count_c1yb9_13",Mpt="_card_subtitles_c1yb9_18",Ipt="_icons_background_c1yb9_23",Ppt="_sub_icons_background_c1yb9_32",rs={card_container:Ept,card_count:kpt,card_subtitles:Mpt,icons_background:Ipt,sub_icons_background:Ppt};function Rpt(e){return NL({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"},child:[]}]})(e)}var WL={},Apt=Zr;Object.defineProperty(WL,"__esModule",{value:!0});var xhe=WL.default=void 0,Dpt=Apt(go()),_pt=k;xhe=WL.default=(0,Dpt.default)((0,_pt.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");var HL={},jpt=Zr;Object.defineProperty(HL,"__esModule",{value:!0});var whe=HL.default=void 0,Npt=jpt(go()),Fpt=k;whe=HL.default=(0,Npt.default)((0,Fpt.jsx)("path",{d:"m21.41 11.41-8.83-8.83c-.37-.37-.88-.58-1.41-.58H4c-1.1 0-2 .9-2 2v7.17c0 .53.21 1.04.59 1.41l8.83 8.83c.78.78 2.05.78 2.83 0l7.17-7.17c.78-.78.78-2.04-.01-2.83M6.5 8C5.67 8 5 7.33 5 6.5S5.67 5 6.5 5 8 5.67 8 6.5 7.33 8 6.5 8"}),"Sell");var GL={},Lpt=Zr;Object.defineProperty(GL,"__esModule",{value:!0});var Che=GL.default=void 0,Bpt=Lpt(go()),Vpt=k;Che=GL.default=(0,Bpt.default)((0,Vpt.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");var YL={},zpt=Zr;Object.defineProperty(YL,"__esModule",{value:!0});var UL=YL.default=void 0,$pt=zpt(go()),Wpt=k;UL=YL.default=(0,$pt.default)((0,Wpt.jsx)("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome");var XL={},Hpt=Zr;Object.defineProperty(XL,"__esModule",{value:!0});var She=XL.default=void 0,Gpt=Hpt(go()),Ypt=k;She=XL.default=(0,Gpt.default)((0,Ypt.jsx)("path",{d:"M17 8H7c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-4 12.5h-2V19h2zm0-2.5h-2c0-1.5-2.5-3-2.5-5 0-1.93 1.57-3.5 3.5-3.5s3.5 1.57 3.5 3.5c0 2-2.5 3.5-2.5 5m5-11.5H6C6 5.67 6.67 5 7.5 5h9c.83 0 1.5.67 1.5 1.5m-1-3H7C7 2.67 7.67 2 8.5 2h7c.83 0 1.5.67 1.5 1.5"}),"BatchPrediction");var qL={},Upt=Zr;Object.defineProperty(qL,"__esModule",{value:!0});var Ohe=qL.default=void 0,Xpt=Upt(go()),qpt=k;Ohe=qL.default=(0,Xpt.default)((0,qpt.jsx)("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5m-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5"}),"BlurOn");var ZL={},Zpt=Zr;Object.defineProperty(ZL,"__esModule",{value:!0});var The=ZL.default=void 0,Jpt=Zpt(go()),Kpt=k;The=ZL.default=(0,Jpt.default)((0,Kpt.jsx)("path",{d:"M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1M11 17l2.5-3.15L15.29 16l2.5-3.22L21 17z"}),"BurstMode");const MT={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},Qpt={1:"Paid",2:"Unpaid",3:"Decline",0:" "},dD={0:k.jsx(UL,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),1:k.jsx(She,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),2:k.jsx(Ohe,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),3:k.jsx(The,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},eft=e=>{var E,M,R,D,_,A,j,N,L,B,V,H,G,Y;const{onTabChange:n}=e,[t,r]=U.useState(MT.LIST_VIEW),o=[{id:1,name:"Monthly"},{id:2,name:"Quarterly"},{id:3,name:"Half Yearly"},{id:4,name:"Yearly"},{id:5,name:"2 Years"},{id:6,name:"3 Years"}],i=X=>{const Z=o.find(re=>re.id===X);return Z?Z.name:" "},[a,s]=U.useState(""),{session:{API_BASE_URL:l,mode:c}}=s0(),d=Mb(),{data:p,isFetching:f}=Xd(Fh,{url:UK,params:{}},"subsription-overview"),{handleSubmit:g,isDisabled:h,isLoading:m}=a0({url:XK}),{handleSubmit:v,isDisabled:b,isLoading:w}=a0({url:qK}),C=(X=!1)=>{if(!(p!=null&&p.openInvoice))return;const Z={customer_id:p.openInvoice.customer_id,invoice_id:p.openInvoice.id,isDownload:1};b||v(Z,null,re=>{X?(s(`data:application/pdf;base64,${re==null?void 0:re.data.buffer64}`),r(MT.INVOICE_VIEW)):qr.downloadFileFromBuffer(re==null?void 0:re.data)},null)},O=()=>{var Z;const X={plan_id:p==null?void 0:p.plan_id,add_on_id:p==null?void 0:p.add_on_id,invoice_id:(Z=p==null?void 0:p.openInvoice)==null?void 0:Z.id};g(X,null,re=>{var oe;qr.cashfreePayment((oe=re==null?void 0:re.data)==null?void 0:oe.payment_session_id,l,()=>{},d,c)},null)},x=U.useMemo(()=>{var Z,re;const{wallet:X={}}=p!=null?p:{wallet:{}};return[{label:"Wallet Balance",count:`Rs ${(Z=X==null?void 0:X.balance)!=null?Z:"-"}`,description:k.jsxs(k.Fragment,{children:[k.jsxs("span",{style:{color:"#009017"},children:["+ Rs ",(re=X==null?void 0:X.openingBalance)!=null?re:"- "]})," ","last gained"]}),icon:k.jsx("span",{style:{background:"#FAC8001A",margin:"inherit"},className:rs.icons_background,children:k.jsx(vhe,{sx:{color:"#FAC800",fontSize:"2rem"}})}),progress:(X==null?void 0:X.percentage)*100}]},[p]);return k.jsxs("div",{className:"w-100",children:[k.jsx(om,{visible:f||m||w}),t===MT.LIST_VIEW?k.jsxs(wn,{container:!0,spacing:2,children:[x.map(X=>k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx(upt,{data:X})})),k.jsx(Tpt,{orgDetails:p==null?void 0:p.orgInfo}),k.jsxs(wn,{item:!0,xs:12,sm:6,lg:8,children:[k.jsxs("div",{className:`${rs.card_container}`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsxs("span",{className:`${rs.card_count}`,children:["Last ",Qpt[(E=p==null?void 0:p.openInvoice)==null?void 0:E.payment_status]||""," Invoice"]})}),k.jsx(Ha,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Due By"}),k.jsx("span",{className:`${rs.card_subtitles}`,children:(M=p==null?void 0:p.openInvoice)!=null&&M.invoice_due_date?new Date(p.openInvoice.invoice_due_date).toLocaleDateString("en-GB"):"-"})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Amount"}),k.jsxs("span",{className:`${rs.card_subtitles}`,children:[((R=p==null?void 0:p.openInvoice)==null?void 0:R.currency_symbol)||"₹"," ",(_=(D=p==null?void 0:p.openInvoice)==null?void 0:D.grand_total_amount)!=null?_:"-"]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Invoice"}),k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{children:k.jsx(Rpt,{style:{fontSize:"24px",color:"red",cursor:"pointer"},onClick:()=>C(!0)})})})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{}),k.jsx("span",{children:((A=p==null?void 0:p.openInvoice)==null?void 0:A.payment_status)===2&&k.jsx(Ea,{disabled:h,label:"Pay Here",style:{height:"36px"},onClick:O})})]})]})]}),k.jsxs("div",{className:`${rs.card_container} g-10`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center",children:k.jsx("span",{className:`${rs.card_count}`,children:"Plan Details"})}),k.jsx(Ha,{}),k.jsx("div",{className:"flex-between-center",children:[{label:"Current Plan",value:(j=p==null?void 0:p.planDetails)==null?void 0:j.current_plan,icon:k.jsx(F3,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Billing Cycle",value:i((N=p==null?void 0:p.planDetails)==null?void 0:N.billing_cycle)||"-",icon:k.jsx(xhe,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Plan Cost",value:`${((L=p==null?void 0:p.openInvoice)==null?void 0:L.currency_symbol)||"₹"} ${(V=(B=p==null?void 0:p.planDetails)==null?void 0:B.plan_cost)!=null?V:"-"}`,icon:k.jsx(whe,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Plan Expiring",value:`${(H=p==null?void 0:p.planDetails)!=null&&H.plan_expiring_date?new Date(p.planDetails.plan_expiring_date).toLocaleDateString("en-GB"):"-"}`,icon:k.jsx(Che,{sx:{color:"#335AFF",fontSize:"1.5rem"}})}].map(X=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx("span",{style:{background:"#335AFF1A"},className:`${rs.sub_icons_background}`,children:X.icon}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:X.label}),k.jsx("span",{className:`${rs.card_subtitles}`,children:X.value})]})]}))})]}),k.jsxs("div",{className:`${rs.card_container}`,children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsx("span",{className:`${rs.card_count}`,children:"Add Ons"})}),k.jsx(Ha,{className:"mb-10"}),k.jsx("div",{className:"flex-start-center g-20",style:{overflowX:"auto",overflowY:"hidden"},children:qr.validateDataType(p==null?void 0:p.addOnProduct,Vi.ARRAY)?p.addOnProduct.map((X,Z)=>k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{style:{background:"#335AFF1A"},className:`${rs.sub_icons_background}`,children:dD==null?void 0:dD[Math.floor(Math.random()*4)]}),k.jsx("span",{className:`${rs.card_subtitles}`,children:X.product_name})]},Z)):k.jsx(i0,{message:"No Add Ons Found"})})]})]}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${rs.card_container} g-10`,style:{height:"100%"},children:qr.validateDataType(p==null?void 0:p.usageCredit,Vi.ARRAY)?k.jsxs(k.Fragment,{children:[k.jsxs("span",{className:`${rs.card_count}`,children:["User Counts"," ",k.jsx(nb,{title:"Active Employees",children:k.jsxs("span",{children:["(",(Y=(G=p==null?void 0:p.employee_details)==null?void 0:G.active_employee)!=null?Y:"--",")"]})})]}),k.jsx(vat,{type:jdt.COLUMN,data:p.usageCredit,xField:"APP_MODULE",yField:"TOTAL_USER_COUNT",xAxisTitle:"",styles:{height:"310px",width:"100%"},defaultGroupBy:"",selectedGroupBy:""}),k.jsx(wn,{container:!0,spacing:1,children:p.usageCredit.map(X=>{var Z,re;return k.jsx(wn,{item:!0,xs:6,children:k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsxs("span",{className:`${rs.card_subtitles}`,children:[(Z=X==null?void 0:X.APP_MODULE)!=null?Z:"-"," :"]}),k.jsx("span",{children:(re=X==null?void 0:X.TOTAL_USER_COUNT)!=null?re:"-"})]})})})})]}):k.jsx(i0,{message:"No Records Found"})})})]}):k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:a,type:"application/pdf",children:" "})}),k.jsx(Qp,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(rM,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(Ea,{label:"Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>r(MT.LIST_VIEW)})})})]})]})},tft="_card_container_1iza3_1",nft="_plan_card_1iza3_13",rft="_discount_card_1iza3_27",oft="_plan_total_count_1iza3_40",ift="_card_count_1iza3_45",aft="_card_subtitles_1iza3_50",Zs={card_container:tft,plan_card:nft,discount_card:rft,plan_total_count:oft,card_count:ift,card_subtitles:aft};var JL={},sft=Zr;Object.defineProperty(JL,"__esModule",{value:!0});var Ehe=JL.default=void 0,lft=sft(go()),cft=k;Ehe=JL.default=(0,lft.default)((0,cft.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle");var KL={},uft=Zr;Object.defineProperty(KL,"__esModule",{value:!0});var khe=KL.default=void 0,dft=uft(go()),pft=k;khe=KL.default=(0,dft.default)((0,pft.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCard");var QL={},fft=Zr;Object.defineProperty(QL,"__esModule",{value:!0});var Mhe=QL.default=void 0,hft=fft(go()),mft=k;Mhe=QL.default=(0,hft.default)((0,mft.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");const gft=()=>{const[e,n]=U.useState(Oi()),t=r=>{n(r)};return k.jsx("div",{children:k.jsxs(wn,{container:!0,spacing:4,children:[k.jsxs(wn,{item:!0,xs:12,sm:12,lg:7,children:[k.jsxs("div",{className:`${Zs.card_container} g-20 mb-10`,children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!0}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Credit/Debit Cards"}),k.jsx("span",{style:{color:"#615E69"},children:"Pay with your Credit/Debit Card"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-start-column g-10",style:{width:"90%",margin:"auto"},children:[k.jsx(Fp,{placeholder:"Name on the Card",suffix:k.jsx(Ehe,{})}),k.jsx(Fp,{placeholder:"Card Number",suffix:k.jsx(khe,{})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(V9,{format:"MM/YY",views:["month","year"],sx:{width:"50%"},minDate:Oi(),value:e,onChange:t}),k.jsx(Fp,{placeholder:"CVV",suffix:k.jsx(Mhe,{}),sx:{width:"50%"}})]})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Wallet"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through Wallet"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Paytm/Google Pay/Phone pe/BHIM UPI"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment through Gpay, Paypal, Paytm etc"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Ox,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Net banking"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through bank account."})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]})]}),k.jsx(Ea,{label:"Pay $164.23",className:"w-100"})]}),k.jsxs(wn,{item:!0,xs:12,sm:12,lg:5,children:[k.jsxs("div",{className:"flex-start-center g-20 mb-10",children:[k.jsxs("div",{className:`${Zs.plan_card} g-10`,style:{background:"#0055FF1A",border:"1px solid #335AFF"},children:[k.jsx("span",{className:`${Zs.card_count}`,children:"$10/mth"}),k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"})]}),k.jsxs("div",{className:`${Zs.plan_card} g-10`,children:[k.jsx("span",{className:`${Zs.card_count}`,children:"$8/mth"}),k.jsx("span",{className:`${Zs.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"}),k.jsx("div",{className:`${Zs.discount_card}`,children:k.jsx("span",{children:"-20%"})})]})]}),k.jsxs("div",{className:"mb-20",children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{className:`${Zs.card_subtitles}`,style:{color:"#615E69"},children:"Gift Card/ Discount Code"})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(Fp,{style:{width:"70%"}}),k.jsx(Ea,{label:"Apply",variant:"outlined",sx:{width:"30%"}})]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Subtotal"}),k.jsx("span",{children:"$160"})]}),k.jsx(Ha,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Sales tax(6.5%)"}),k.jsx("span",{children:"$4,23"})]}),k.jsx(Ha,{}),k.jsxs("div",{className:`flex-between-center ${Zs.plan_total_count}`,children:[k.jsx("span",{children:"Total Due"}),k.jsx("span",{children:"$164.23"})]})]})]})]})})},vft="_card_container_1tgxf_1",yft="_plans_1tgxf_11",bft="_add_ons_1tgxf_14",xft="_card_subtitles_1tgxf_28",wft="_plan_headers_1tgxf_55",Cft="_card_content_1tgxf_63",Op={card_container:vft,plans:yft,add_ons:bft,card_subtitles:xft,plan_headers:wft,card_content:Cft};var eB={},Sft=Zr;Object.defineProperty(eB,"__esModule",{value:!0});var Ihe=eB.default=void 0,Oft=Sft(go()),Tft=k;Ihe=eB.default=(0,Oft.default)((0,Tft.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-5h2zm4 0h-2v-3h2zm0-5h-2v-2h2zm4 5h-2V7h2z"}),"Analytics");var tB={},Eft=Zr;Object.defineProperty(tB,"__esModule",{value:!0});var Phe=tB.default=void 0,kft=Eft(go()),Mft=k;Phe=tB.default=(0,kft.default)((0,Mft.jsx)("path",{d:"m18.85 10.39 1.06-1.06c.78-.78.78-2.05 0-2.83L18.5 5.09c-.78-.78-2.05-.78-2.83 0l-1.06 1.06zm-5.66-2.83L4 16.76V21h4.24l9.19-9.19zM19 17.5c0 2.19-2.54 3.5-5 3.5-.55 0-1-.45-1-1s.45-1 1-1c1.54 0 3-.73 3-1.5 0-.47-.48-.87-1.23-1.2l1.48-1.48c1.07.63 1.75 1.47 1.75 2.68M4.58 13.35C3.61 12.79 3 12.06 3 11c0-1.8 1.89-2.63 3.56-3.36C7.59 7.18 9 6.56 9 6c0-.41-.78-1-2-1-1.26 0-1.8.61-1.83.64-.35.41-.98.46-1.4.12-.41-.34-.49-.95-.15-1.38C3.73 4.24 4.76 3 7 3s4 1.32 4 3c0 1.87-1.93 2.72-3.64 3.47C6.42 9.88 5 10.5 5 11c0 .31.43.6 1.07.86z"}),"Draw");var nB={},Ift=Zr;Object.defineProperty(nB,"__esModule",{value:!0});var Rhe=nB.default=void 0,Pft=Ift(go()),Rft=k;Rhe=nB.default=(0,Pft.default)((0,Rft.jsx)("path",{d:"M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3 1 9l11 6 9-4.91V17h2V9z"}),"School");var rB={},Aft=Zr;Object.defineProperty(rB,"__esModule",{value:!0});var Ahe=rB.default=void 0,Dft=Aft(go()),_ft=k;Ahe=rB.default=(0,Dft.default)((0,_ft.jsx)("path",{d:"M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2m-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m13-6v11c0 1.1-.9 2-2 2H4v-2h17V7z"}),"Payments");var oB={},jft=Zr;Object.defineProperty(oB,"__esModule",{value:!0});var Dhe=oB.default=void 0,Nft=jft(go()),Fft=k;Dhe=oB.default=(0,Nft.default)((0,Fft.jsx)("path",{d:"M12 4H5C3.34 4 2 5.34 2 7v8c0 1.66 1.34 3 3 3l-1 1v1h1l2-2.03L9 18v-5H4V5.98L13 6v2h2V7c0-1.66-1.34-3-3-3M5 14c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m15.57-4.34c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66L10 13.77l.01 5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V18h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14zm-8.16.34h7.19l1.03 3h-9.25zM12 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"Commute");var iB={},Lft=Zr;Object.defineProperty(iB,"__esModule",{value:!0});var _he=iB.default=void 0,Bft=Lft(go()),lK=k;_he=iB.default=(0,Bft.default)([(0,lK.jsx)("path",{d:"M19 6h-1V1H6v5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2M8 3h8v3H8zm4 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"0"),(0,lK.jsx)("path",{d:"M12.5 11.5h-1v2.71l1.64 1.64.71-.71-1.35-1.35z"},"1")],"PunchClock");var aB={},Vft=Zr;Object.defineProperty(aB,"__esModule",{value:!0});var jhe=aB.default=void 0,zft=Vft(go()),$ft=k;jhe=aB.default=(0,zft.default)((0,$ft.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"}),"GroupAdd");const Wft={plans:{Basic:{"Core HR":["Employee","Time & Attendance","Document","Policy","Workflow","Roles & Permission","Transfer & Probation"],"Employee Self Service (ESS)":["Android & iOS","Team","Geotag","Geofence","Reports"],Payroll:["Salary","Compliance","Arrear","Full & Final"]},Standard:{"All Basic Features +":[],"Advance HR":["Onboarding","Offboarding","Helpdesk","Asset","Task","Custom Dashboard"],Engage:["Feed","Chat","Survey","Feedback","Recognition"],"Advance Time Tracking":["Time Zone","Roster","Selfie Attendance","Overtime & Incentive"]},Enterprise:{"All Standard Features +":[],"Finance & Admin":["Expense","Travel Desk","Vendor","Petty Cash","Budgeting","Manpower Planning"],Performance:["Review (KRA/KPI)","Objective (OKR)","9-Box Matrix","Bell Curve & Normalization","Compensation"],"Global Payroll":["Contract","Multi-Entry","Multi-Country","Multi-Currency"]}}},Hft=e=>{var f;const{onTabChange:n}=e,[t,r]=U.useState(!1);zC();const[o,i]=U.useState({plan:"",add_ons:[],new_add_ons:[]}),a={Analytics:k.jsx(Ihe,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),"Digital Signature":k.jsx(Phe,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Learn:k.jsx(Rhe,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Payout:k.jsx(Ahe,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Trip:k.jsx(Dhe,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Timesheet:k.jsx(_he,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Recruit:k.jsx(jhe,{sx:{color:"#335AFF",fontSize:"2.5rem"}})},s=Wft,l=!1,{isDisabled:c}=a0({url:bbe}),{data:d}=Xd(Fh,{url:UK,params:{}},"subsription-overview");U.useEffect(()=>{var g,h;d&&i({plan:(g=d.plan_id)!=null?g:"",add_ons:((h=d.add_on_id)!=null?h:[]).map(String),new_add_ons:[]})},[d]);const p=g=>{var h;return g===((h=d==null?void 0:d.planDetails)==null?void 0:h.current_plan)};return k.jsxs("div",{children:[k.jsx(om,{visible:l}),k.jsxs(wn,{container:!0,spacing:3,children:[s!=null&&s.plans?Object.entries(s.plans).map(([g,h])=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,children:k.jsxs("div",{className:`${Op.card_container} ${Op.plans} ${p(g)?Op.selected_plan:""}`,style:{backgroundColor:p(g)?"#E3F2FD":"white",border:p(g)?"2px solid #2196F3":"1px solid #e0e0e0",borderRadius:"12px",padding:"12px",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[p(g)&&k.jsx("div",{style:{position:"absolute",top:"-1px",right:"20px",background:"#2196F3",color:"white",padding:"4px 12px",borderRadius:"0 0 8px 8px",fontSize:"12px",fontWeight:"bold"},children:"OPTED"}),k.jsxs("div",{className:"flex-start-column",style:{flex:1,gap:"8px"},children:[k.jsx("div",{className:Op.plan_headers,children:k.jsx("div",{style:{textAlign:"center",marginBottom:"8px"},children:k.jsx("h3",{style:{margin:0,color:"#1976D2",fontSize:"24px",fontWeight:"bold"},children:g})})}),k.jsx(Ha,{}),k.jsx("div",{className:Op.card_content,style:{flex:1},children:Object.entries(h).map(([m,v])=>k.jsxs("div",{style:{marginBottom:"8px"},children:[k.jsx("div",{style:{fontWeight:"bold",color:"#333",marginBottom:"4px",fontSize:"16px"},children:m}),Array.isArray(v)&&v.length>0&&k.jsxs("div",{style:{paddingLeft:"12px",color:"#666"},children:[v.slice(0,3).map((b,w)=>k.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"4px",fontSize:"14px"},children:[k.jsx(hhe,{style:{color:"#4CAF50",fontSize:"16px"}}),b]},w)),v.length>3&&k.jsxs("div",{style:{color:"#999",fontSize:"12px",marginTop:"4px"},children:["+",v.length-3," more features"]})]})]},m))})]})]})},g)):k.jsx(wn,{item:!0,xs:12,children:k.jsx(i0,{message:"No Plans Found"})}),k.jsx(wn,{item:!0,xs:12,style:{marginTop:"10px",marginBottom:"10px"},children:k.jsx("div",{className:"flex-between-center",children:k.jsx("span",{className:Op.card_subtitles,children:"Addons"})})}),(f=d==null?void 0:d.addOnProduct)!=null&&f.length?k.jsx(wn,{container:!0,spacing:2,sx:{pl:3},children:d.addOnProduct.map(g=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,lg:3,children:k.jsx("div",{className:`${Op.card_container} ${Op.add_ons} ${d.add_on_id.includes(String(g.product_id))?Op.selected_addon:""}`,style:{backgroundColor:d.add_on_id.includes(String(g.product_id))?"#E8F5E8":"white",border:d.add_on_id.includes(String(g.product_id))?"2px solid #4CAF50":"1px solid #e0e0e0",borderRadius:"12px",width:"100%",maxWidth:"260px",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[k.jsx("span",{style:{fontSize:"18px",display:"flex",alignItems:"center"},children:a[g.product_name]||k.jsx(UL,{sx:{color:"#335AFF",fontSize:"2.5rem"}})}),k.jsx("h4",{style:{margin:0,color:"#333",fontSize:"15px",fontWeight:600,lineHeight:1.4},children:g.product_name})]})})},g.product_id))}):k.jsx(wn,{item:!0,xs:12,children:k.jsx(i0,{message:"No Add Ons Found"})}),k.jsxs(k_,{open:t,onClose:()=>r(!1),maxWidth:"xs",fullWidth:!0,children:[k.jsx(Iee,{sx:{fontWeight:600,textAlign:"center",color:"#1976D2"},children:"Contact Your SPOC"}),k.jsx(I_,{children:k.jsx("div",{style:{textAlign:"center",fontSize:"15px",padding:"10px 0"},children:"To upgrade your plan, please contact your SPOC."})}),k.jsx(M_,{sx:{justifyContent:"center"},children:k.jsx(sy,{variant:"contained",color:"primary",onClick:()=>r(!1),children:"Close"})})]}),k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",children:k.jsx(Ea,{label:"Upgrade",onClick:()=>r(!0),disabled:c})})})]})]})},Gft="_card_container_vce56_1",Yft="_card_titles_vce56_13",Uft="_card_subtitles_vce56_18",Xft="_card_subtotal_vce56_23",qft="_card_headers_vce56_40",Zft="_card_content_vce56_48",Um={card_container:Gft,card_titles:Yft,card_subtitles:Uft,card_subtotal:Xft,card_headers:qft,card_content:Zft},Nhe=e=>{const{open:n,setIsOpen:t}=e,r=Mb(),{session:{API_BASE_URL:o,mode:i}}=s0(),a=zC(),[s,l]=U.useState({amount:"",remarks:""}),{handleSubmit:c,isDisabled:d}=a0({url:gbe}),p=()=>{t(!1)},f=()=>{if(!s.amount.length){r("Please Enter Amount");return}const h={amount:s.amount,remarks:s.remarks};c(h,null,m=>{var v;a.invalidateQueries("transaction-history"),qr.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,o,p,r,i)},null)},g=(h,m)=>{l(v=>mn(pt({},v),{[h]:m}))};return k.jsx(bL,{open:n,title:"Add Money",size:"xs",onModalclose:p,children:k.jsxs("div",{children:[k.jsx(Fp,{label:"Amount",name:"amount",required:!0,value:s.amount,onChange:h=>{const{name:m,value:v}=h.target;(v===""||/^[0-9\b]+$/.test(v))&&g(m,v)},className:"w-100 mb-10 mt-10"}),k.jsx(Fp,{label:"Remarks",name:"remarks",value:s.remarks,onChange:h=>{const{name:m,value:v}=h.target;g(m,v)},className:"w-100 mb-10"}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Cancel",variant:"outlined",onClick:p}),k.jsx(Ea,{label:"Submit",disabled:d,onClick:f})]})]})})},Jft=e=>{const{onTabChange:n}=e,t=Mb(),{session:{API_BASE_URL:r,mode:o}}=s0(),[i,a]=U.useState(!1),{data:s,isFetching:l}=Xd(Fh,{url:hbe,params:{}},"customer-subsription"),{handleSubmit:c,isDisabled:d,isLoading:p}=a0({url:XK}),f=()=>{a(!0)},g=()=>{const h={plan_id:s==null?void 0:s.plan_id,add_on_id:s==null?void 0:s.add_on_product_id};c(h,null,m=>{var v;qr.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,r,()=>{},t,o)},null)};return k.jsxs("div",{children:[k.jsx(om,{visible:l||p}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",children:k.jsx(Ea,{label:"Top Up Wallet",startIcon:k.jsx(e6,{}),onClick:()=>{f()}})})}),qr.validateDataType(s==null?void 0:s.header,Vi.ARRAY)?s==null?void 0:s.header.map(h=>k.jsx(wn,{item:!0,xs:12,sm:12,md:4,lg:4,children:k.jsxs("div",{className:Um.card_container,children:[k.jsx("div",{className:Um.card_headers,children:k.jsx("span",{className:Um.card_titles,style:{color:"#335AFF"},children:h})}),k.jsx(Ha,{className:"mb-10"}),qr.validateDataType(s==null?void 0:s.resultRows,Vi.ARRAY)?s.resultRows.map((m,v,b)=>k.jsxs(k.Fragment,{children:[k.jsx("div",{className:Um.card_content,children:qr.validateDataType(m==null?void 0:m[h],Vi.ARRAY)?m==null?void 0:m[h].map(w=>k.jsx(k.Fragment,{children:k.jsx("span",{className:`${h==="Plan"?Um.card_titles:""}`,children:h==="Price"?`Rs ${w}`:w})})):k.jsx(k.Fragment,{})}),v!==b.length-1?k.jsx(Ha,{className:"mb-10"}):k.jsx(k.Fragment,{})]})):k.jsx(k.Fragment,{})]})})):k.jsx(i0,{message:"No Plans Found"}),qr.validateDataType(s==null?void 0:s.subtotal,Vi.ARRAY)?s.subtotal.map(h=>k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:`flex-between-center mb-10 ${h.name==="Total"?Um.card_subtitles:Um.card_subtotal}`,children:[k.jsx("span",{children:h.name}),k.jsxs("span",{children:["Rs ",h.amount]})]}),k.jsx(Ha,{})]})):k.jsx(k.Fragment,{}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Renew",variant:"outlined",disabled:d,onClick:g}),k.jsx(Ea,{label:"Modify Subscription",onClick:()=>{n(2)}})]})})]}),i&&k.jsx(Nhe,{open:i,setIsOpen:a})]})},Kft="_card_container_1ts8v_1",Qft="_card_subtitles_1ts8v_18",eht="_icons_background_1ts8v_23",ku={card_container:Kft,card_subtitles:Qft,icons_background:eht};function tht(e){return NL({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64l241.9 0c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5 608 384c0 35.3-28.7 64-64 64l-241.9 0c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5 32 128c0-35.3 28.7-64 64-64zm64 64l-64 0 0 64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64l64 0 0-64zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z"},child:[]}]})(e)}var sB={},nht=Zr;Object.defineProperty(sB,"__esModule",{value:!0});var $9=sB.default=void 0,rht=nht(go()),oht=k;$9=sB.default=(0,rht.default)((0,oht.jsx)("path",{d:"M18 4H6C3.79 4 2 5.79 2 8v8c0 2.21 1.79 4 4 4h12c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4m-1.86 9.77c-.24.2-.57.28-.88.2L4.15 11.25C4.45 10.52 5.16 10 6 10h12c.67 0 1.26.34 1.63.84zM6 6h12c1.1 0 2 .9 2 2v.55c-.59-.34-1.27-.55-2-.55H6c-.73 0-1.41.21-2 .55V8c0-1.1.9-2 2-2"}),"Wallet");var lB={},iht=Zr;Object.defineProperty(lB,"__esModule",{value:!0});var Fhe=lB.default=void 0,aht=iht(go()),sht=k;Fhe=lB.default=(0,aht.default)((0,sht.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const cK=[{label:"Credit Card",value:"cc"},{label:"Debit Card",value:"dc"},{label:"New Banking",value:"nb"}],lht=()=>{var g,h,m,v;const[e,n]=U.useState(!1),[t,r]=U.useState(!1),[o,i]=U.useState({}),{data:a,isFetching:s}=Xd(Fh,{url:mbe,params:{}},"transaction-history"),l=()=>{n(!0)},c=()=>{r(!0)},d=()=>{r(!1),i({})},p=(b,w)=>{i(C=>mn(pt({},C),{[b]:w}))};console.log({automaticTopupDetails:o});const f=U.useMemo(()=>[{header:"Date",accessorKey:"CREATED_ON",id:"CREATED_ON",cell:b=>k.jsxs("span",{children:[" ",Oi(b).format("h:mma, D MMMM YYYY")]})},{header:"Payment By",accessorKey:"PAYMENT_BY",id:"PAYMENT_BY"},{header:"Description",accessorKey:"DESCRIPTION",id:"DESCRIPTION"},{header:"Transaction Id",accessorKey:"LEDGER_ID",id:"LEDGER_ID"},{header:"Transaction Remarks",accessorKey:"TRANSACTION_REMARKS",id:"TRANSACTION_REMARKS"},{header:"Credit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="credit"?`${b}`:"--"})},{header:"Debit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="debit"?`${b}`:"--"})},{header:"Closing Balance",accessorKey:"CLOSING_BALANCE",id:"CLOSING_BALANCE",cell:b=>k.jsx("span",{className:`${ku.card_subtitles}`,style:{color:"#8B8684 "},children:b})}],[a]);return k.jsxs("div",{children:[k.jsx(om,{visible:s}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${ku.card_container}`,children:[k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{style:{background:"#027A481A",margin:"inherit"},className:ku.icons_background,children:k.jsx(tht,{style:{color:"#027A48",fontSize:"2rem"}})})}),k.jsx("div",{style:{margin:"auto"},children:k.jsx(Ea,{label:"Add Money",variant:"outlined",startIcon:k.jsx(e6,{}),onClick:()=>{l()}})})]})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${ku.card_container}`,children:k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#0237671A",margin:"inherit"},className:ku.icons_background,children:k.jsx($9,{style:{color:"#023767",fontSize:"2rem"}})}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Wallet Balance"}),k.jsxs("span",{className:`${ku.card_subtitles}`,children:["Rs ",(h=(g=a==null?void 0:a.overview)==null?void 0:g.balance)!=null?h:"--"]})]})]})})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${ku.card_container}`,children:[k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#335AFF1A",margin:"inherit"},className:ku.icons_background,children:k.jsx($9,{style:{color:"#335AFF",fontSize:"2rem"}})}),k.jsx("span",{className:`${ku.card_subtitles}`,children:"Automatic Topup"})]}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Set Up",onClick:c}),k.jsx(nb,{title:"Whenever your balance goes below, top up your wallet automatically",children:k.jsx(Fhe,{className:"cursor-pointer"})})]})]})}),k.jsx(wn,{item:!0,xs:12,sm:12,lg:12,children:k.jsxs("div",{className:`${ku.card_container} g-10`,children:[k.jsx("span",{className:`${ku.card_subtitles}`,children:"Transaction History"}),k.jsx(Ha,{}),k.jsx("div",{style:{height:"340px",overflow:"scroll"},children:k.jsx(ffe,{data:qr.validateDataType((m=a==null?void 0:a.transactionHistoryList)==null?void 0:m.result,Vi.ARRAY)?(v=a==null?void 0:a.transactionHistoryList)==null?void 0:v.result:[],columns:f,wrapByTooltipDefault:!0})})]})})]}),e&&k.jsx(Nhe,{open:e,setIsOpen:n}),t&&k.jsx(bL,{title:"Topup Setup",open:t,size:"xs",onModalclose:d,children:k.jsxs(wn,{container:!0,spacing:2,sx:{marginTop:"-10px"},children:[[{name:"min_amount",label:"Min Amount"},{name:"max_amount",label:"Max Amount"}].map(b=>{var w;return k.jsx(wn,{item:!0,xs:12,children:k.jsx(Fp,{label:b.label,name:b.name,className:"w-100",value:(w=o==null?void 0:o[b.name])!=null?w:"",onChange:C=>{const{name:O,value:x}=C.target;(x===""||/^[0-9\b]+$/.test(x))&&p(O,x)}})})}),k.jsx(wn,{item:!0,xs:12,children:k.jsx(hfe,{options:cK,value:cK.filter(b=>b.value===(o==null?void 0:o.transaction_type)),label:"Transaction Type",onChange:b=>{p("transaction_type",b==null?void 0:b.value)}})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(Ea,{label:"Cancel",variant:"outlined",onClick:d}),k.jsx(Ea,{label:"Submit"})]})})]})})]})},cht=()=>{const{session:{user:e}}=s0(),[n,t]=U.useState([]),[r,o]=U.useState(null),i=(e==null?void 0:e.org_id)||null,{data:a,isFetching:s}=Xd($K,{url:Cbe,data:{org_id:i,pagination:{page:1,limit:10}}},["addon-clients",i],{enabled:!!i});U.useEffect(()=>{if(a){const{headers:c=[],result:{list:d=[]}={}}=a;t(c),d.length>0&&o(d[0])}},[a]);const l=c=>{if(!r)return;const d=String(c),p=r.productNameID.includes(d)?r.productNameID.filter(f=>f!==d):[...r.productNameID,d];o(mn(pt({},r),{productNameID:p})),console.log("Toggled:",d,"Updated:",p)};return!i||s?k.jsx(om,{visible:!0}):k.jsx(eM,{sx:{flexGrow:1},mt:2,children:k.jsxs(rM,{gap:2,children:[k.jsx(ls,{variant:"h6",children:"Subscription Activation"}),k.jsx(Qp,{variant:"outlined",sx:{width:"100%"},children:k.jsx(iM,{disablePadding:!0,children:n.map((c,d)=>{const p=(r==null?void 0:r.productNameID.includes(String(c.id)))||!1;return k.jsxs(U.Fragment,{children:[k.jsxs(__,{children:[k.jsx(Aee,{primary:c.product_name,secondary:c.short_product_name}),k.jsx(aM,{children:k.jsx(Hee,{edge:"end",checked:p,onChange:()=>l(c.id),disabled:!c.operation_allow})})]}),d<n.length-1&&k.jsx(Ha,{})]},c.id)})})})]})})};exports.BillingSubscription=cht;exports.CustomerInvoices=spt;exports.ManageProvider=H3e;exports.PlansOverview=Hft;exports.SubscriptionConsumption=Zdt;exports.SubscriptionOverview=eft;exports.SubscriptionPaymentMethod=gft;exports.SubscriptionPlans=Jft;exports.SubscriptionWallet=lht;
|
package/dist/main.js
CHANGED
|
@@ -83866,13 +83866,13 @@ const rht = {
|
|
|
83866
83866
|
add_ons: [],
|
|
83867
83867
|
new_add_ons: []
|
|
83868
83868
|
}), a = {
|
|
83869
|
-
Analytics: k.jsx(Yhe, { sx: { color: "#335AFF", fontSize: "
|
|
83870
|
-
"Digital Signature": k.jsx(Uhe, { sx: { color: "#335AFF", fontSize: "
|
|
83871
|
-
|
|
83872
|
-
|
|
83873
|
-
|
|
83874
|
-
|
|
83875
|
-
Recruit: k.jsx(Khe, { sx: { color: "#335AFF", fontSize: "
|
|
83869
|
+
Analytics: k.jsx(Yhe, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
83870
|
+
"Digital Signature": k.jsx(Uhe, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
83871
|
+
Learn: k.jsx(Xhe, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
83872
|
+
Payout: k.jsx(qhe, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
83873
|
+
Trip: k.jsx(Zhe, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
83874
|
+
Timesheet: k.jsx(Jhe, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
83875
|
+
Recruit: k.jsx(Khe, { sx: { color: "#335AFF", fontSize: "2.5rem" } })
|
|
83876
83876
|
}, s = rht, l = !1, { isDisabled: c } = v0({
|
|
83877
83877
|
url: Lbe
|
|
83878
83878
|
}), { data: d } = np(Xh, {
|
|
@@ -83895,7 +83895,7 @@ const rht = {
|
|
|
83895
83895
|
backgroundColor: p(g) ? "#E3F2FD" : "white",
|
|
83896
83896
|
border: p(g) ? "2px solid #2196F3" : "1px solid #e0e0e0",
|
|
83897
83897
|
borderRadius: "12px",
|
|
83898
|
-
padding: "
|
|
83898
|
+
padding: "12px",
|
|
83899
83899
|
height: "100%",
|
|
83900
83900
|
display: "flex",
|
|
83901
83901
|
flexDirection: "column",
|
|
@@ -83910,43 +83910,40 @@ const rht = {
|
|
|
83910
83910
|
borderRadius: "0 0 8px 8px",
|
|
83911
83911
|
fontSize: "12px",
|
|
83912
83912
|
fontWeight: "bold"
|
|
83913
|
-
}, children: "OPTED" }), k.jsxs("div", { className: "flex-start-column", style: { flex: 1, gap: "
|
|
83913
|
+
}, children: "OPTED" }), k.jsxs("div", { className: "flex-start-column", style: { flex: 1, gap: "8px" }, children: [k.jsx("div", { className: Dp.plan_headers, children: k.jsx("div", { style: { textAlign: "center", marginBottom: "8px" }, children: k.jsx("h3", { style: {
|
|
83914
83914
|
margin: 0,
|
|
83915
83915
|
color: "#1976D2",
|
|
83916
83916
|
fontSize: "24px",
|
|
83917
83917
|
fontWeight: "bold"
|
|
83918
|
-
}, children: g }) }) }), k.jsx(qa, {}), k.jsx("div", { className: Dp.card_content, style: { flex: 1 }, children: Object.entries(h).map(([m, v]) => k.jsxs("div", { style: { marginBottom: "
|
|
83918
|
+
}, children: g }) }) }), k.jsx(qa, {}), k.jsx("div", { className: Dp.card_content, style: { flex: 1 }, children: Object.entries(h).map(([m, v]) => k.jsxs("div", { style: { marginBottom: "8px" }, children: [k.jsx("div", { style: {
|
|
83919
83919
|
fontWeight: "bold",
|
|
83920
83920
|
color: "#333",
|
|
83921
|
-
marginBottom: "
|
|
83921
|
+
marginBottom: "4px",
|
|
83922
83922
|
fontSize: "16px"
|
|
83923
83923
|
}, children: m }), Array.isArray(v) && v.length > 0 && k.jsxs("div", { style: { paddingLeft: "12px", color: "#666" }, children: [v.slice(0, 3).map((b, w) => k.jsxs("div", { style: {
|
|
83924
83924
|
display: "flex",
|
|
83925
83925
|
alignItems: "center",
|
|
83926
|
-
gap: "8px",
|
|
83927
83926
|
marginBottom: "4px",
|
|
83928
83927
|
fontSize: "14px"
|
|
83929
|
-
}, children: [k.jsx(Rhe, { style: { color: "#4CAF50", fontSize: "16px" } }), b] }, w)), v.length > 3 && k.jsxs("div", { style: { color: "#999", fontSize: "12px", marginTop: "4px" }, children: ["+", v.length - 3, " more features"] })] })] }, m)) })] })] }) }, g)) : k.jsx(Cn, { item: !0, xs: 12, children: k.jsx(g0, { message: "No Plans Found" }) }), k.jsx(Cn, { item: !0, xs: 12, style: { marginTop: "
|
|
83928
|
+
}, children: [k.jsx(Rhe, { style: { color: "#4CAF50", fontSize: "16px" } }), b] }, w)), v.length > 3 && k.jsxs("div", { style: { color: "#999", fontSize: "12px", marginTop: "4px" }, children: ["+", v.length - 3, " more features"] })] })] }, m)) })] })] }) }, g)) : k.jsx(Cn, { item: !0, xs: 12, children: k.jsx(g0, { message: "No Plans Found" }) }), k.jsx(Cn, { item: !0, xs: 12, style: { marginTop: "10px", marginBottom: "10px" }, children: k.jsx("div", { className: "flex-between-center", children: k.jsx("span", { className: Dp.card_subtitles, children: "Addons" }) }) }), (f = d == null ? void 0 : d.addOnProduct) != null && f.length ? k.jsx(Cn, { container: !0, spacing: 2, sx: { pl: 3 }, children: d.addOnProduct.map((g) => k.jsx(Cn, { item: !0, xs: 12, sm: 6, md: 4, lg: 3, children: k.jsx("div", { className: `${Dp.card_container} ${Dp.add_ons} ${d.add_on_id.includes(String(g.product_id)) ? Dp.selected_addon : ""}`, style: {
|
|
83930
83929
|
backgroundColor: d.add_on_id.includes(String(g.product_id)) ? "#E8F5E8" : "white",
|
|
83931
83930
|
border: d.add_on_id.includes(String(g.product_id)) ? "2px solid #4CAF50" : "1px solid #e0e0e0",
|
|
83932
83931
|
borderRadius: "12px",
|
|
83933
|
-
padding: "12px 12px",
|
|
83934
83932
|
width: "100%",
|
|
83935
83933
|
// full width inside grid column
|
|
83936
83934
|
maxWidth: "260px",
|
|
83937
83935
|
// optional fixed width
|
|
83938
|
-
margin: "10 auto",
|
|
83939
83936
|
height: "100%",
|
|
83940
83937
|
display: "flex",
|
|
83941
83938
|
flexDirection: "column",
|
|
83942
83939
|
justifyContent: "center"
|
|
83943
|
-
}, children: k.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "
|
|
83940
|
+
}, children: k.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "20px" }, children: [k.jsx("span", { style: { fontSize: "18px", display: "flex", alignItems: "center" }, children: a[g.product_name] || k.jsx(sB, { sx: { color: "#335AFF", fontSize: "2.5rem" } }) }), k.jsx("h4", { style: {
|
|
83944
83941
|
margin: 0,
|
|
83945
83942
|
color: "#333",
|
|
83946
83943
|
fontSize: "15px",
|
|
83947
83944
|
fontWeight: 600,
|
|
83948
83945
|
lineHeight: 1.4
|
|
83949
|
-
}, children: g.product_name })] }) }) }, g.product_id)) }) : k.jsx(Cn, { item: !0, xs: 12, children: k.jsx(g0, { message: "No Add Ons Found" }) }), k.jsxs(z_, { open: t, onClose: () => r(!1), maxWidth: "xs", fullWidth: !0, children: [k.jsx(Yee, { sx: { fontWeight: 600, textAlign: "center", color: "#1976D2" }, children: "Contact Your SPOC" }), k.jsx(W_, { children: k.jsx("div", { style: { textAlign: "center", fontSize: "15px", padding: "10px 0" }, children: "To upgrade your plan, please contact your SPOC." }) }), k.jsx($_, { sx: { justifyContent: "center" }, children: k.jsx(yy, { variant: "contained", color: "primary", onClick: () => r(!1), children: "Close" }) })] }), k.jsx(Cn, { item: !0, xs: 12, children: k.jsx("div", { className: "flex-end-center",
|
|
83946
|
+
}, children: g.product_name })] }) }) }, g.product_id)) }) : k.jsx(Cn, { item: !0, xs: 12, children: k.jsx(g0, { message: "No Add Ons Found" }) }), k.jsxs(z_, { open: t, onClose: () => r(!1), maxWidth: "xs", fullWidth: !0, children: [k.jsx(Yee, { sx: { fontWeight: 600, textAlign: "center", color: "#1976D2" }, children: "Contact Your SPOC" }), k.jsx(W_, { children: k.jsx("div", { style: { textAlign: "center", fontSize: "15px", padding: "10px 0" }, children: "To upgrade your plan, please contact your SPOC." }) }), k.jsx($_, { sx: { justifyContent: "center" }, children: k.jsx(yy, { variant: "contained", color: "primary", onClick: () => r(!1), children: "Close" }) })] }), k.jsx(Cn, { item: !0, xs: 12, children: k.jsx("div", { className: "flex-end-center", children: k.jsx(Ra, { label: "Upgrade", onClick: () => r(!0), disabled: c }) }) })] })] });
|
|
83950
83947
|
}, oht = "_card_container_vce56_1", iht = "_card_titles_vce56_13", aht = "_card_subtitles_vce56_18", sht = "_card_subtotal_vce56_23", lht = "_card_headers_vce56_40", cht = "_card_content_vce56_48", og = {
|
|
83951
83948
|
card_container: oht,
|
|
83952
83949
|
card_titles: iht,
|