From 49a889921eac8020c788a0ef8982453393063605 Mon Sep 17 00:00:00 2001 From: dharaneesh-r Date: Mon, 22 Jun 2026 13:43:33 +0530 Subject: [PATCH] updates on the build file regarding the changes on the rider page on substitution page and the subsitution history page --- build/asset-manifest.json | 70 +++++++++---------- build/index.html | 2 +- build/static/js/1222.97f70748.chunk.js | 1 - build/static/js/1222.c450ab8b.chunk.js | 1 + ...f16953.chunk.js => 1425.201283eb.chunk.js} | 2 +- ...771267.chunk.js => 1504.d7a3fb13.chunk.js} | 2 +- ...3ad68d3.chunk.js => 181.1ef0e862.chunk.js} | 2 +- ...37472d.chunk.js => 2142.379ba3cc.chunk.js} | 2 +- ...16c886f8.chunk.js => 23.4be71fed.chunk.js} | 2 +- ...3695a38.chunk.js => 238.b0a6c12d.chunk.js} | 2 +- build/static/js/2533.ca2d198d.chunk.js | 1 - ...119b66.chunk.js => 2638.6b26c3ee.chunk.js} | 2 +- ...0ed207.chunk.js => 2851.828e003e.chunk.js} | 2 +- ...8c86cc.chunk.js => 2898.91e92c8b.chunk.js} | 4 +- ...txt => 2898.91e92c8b.chunk.js.LICENSE.txt} | 0 ...0ff825.chunk.js => 3121.4646b740.chunk.js} | 2 +- ...a86f42.chunk.js => 3176.340ee957.chunk.js} | 2 +- build/static/js/3388.e9dd817e.chunk.js | 1 - ...24a149.chunk.js => 3723.01b1774f.chunk.js} | 2 +- ...0b9077.chunk.js => 4263.ec3fbee8.chunk.js} | 2 +- ...e10cb8.chunk.js => 4465.8c45ec27.chunk.js} | 2 +- ...77f2ac.chunk.js => 4793.72fb0edf.chunk.js} | 2 +- ...cf8ed3.chunk.js => 4917.5bb4b5d9.chunk.js} | 2 +- ...c997b5.chunk.js => 4947.912f7e20.chunk.js} | 2 +- ...5a2100fd.chunk.js => 54.06907ff1.chunk.js} | 2 +- ...f20b8d.chunk.js => 5770.482ef079.chunk.js} | 2 +- ...ba49cb.chunk.js => 6248.8f2e2aaa.chunk.js} | 2 +- ...11f397.chunk.js => 6390.1dc7fa61.chunk.js} | 2 +- build/static/js/6597.40beeaea.chunk.js | 1 + ...8780b7.chunk.js => 6849.958bd3ec.chunk.js} | 2 +- ...4a49d6.chunk.js => 7221.e5f2ba4c.chunk.js} | 2 +- ...6056f7.chunk.js => 7875.0f6b626d.chunk.js} | 2 +- ...5756a1.chunk.js => 8846.3eae90fb.chunk.js} | 2 +- ...13af23.chunk.js => 8954.e87abf2c.chunk.js} | 2 +- ...4b1550.chunk.js => 9438.9a476f5c.chunk.js} | 2 +- ...f30508.chunk.js => 9521.9d99da63.chunk.js} | 2 +- ...bbd05d.chunk.js => 9592.e7d1e3ea.chunk.js} | 2 +- build/static/js/9593.e131cb1b.chunk.js | 1 + ...585d14.chunk.js => 9912.8ae215bb.chunk.js} | 2 +- build/static/js/main.a651017e.js | 2 + ...CENSE.txt => main.a651017e.js.LICENSE.txt} | 0 build/static/js/main.d20d1e40.js | 2 - 42 files changed, 72 insertions(+), 72 deletions(-) delete mode 100644 build/static/js/1222.97f70748.chunk.js create mode 100644 build/static/js/1222.c450ab8b.chunk.js rename build/static/js/{1425.51f16953.chunk.js => 1425.201283eb.chunk.js} (78%) rename build/static/js/{1504.c6771267.chunk.js => 1504.d7a3fb13.chunk.js} (99%) rename build/static/js/{181.03ad68d3.chunk.js => 181.1ef0e862.chunk.js} (99%) rename build/static/js/{2142.8437472d.chunk.js => 2142.379ba3cc.chunk.js} (99%) rename build/static/js/{23.16c886f8.chunk.js => 23.4be71fed.chunk.js} (99%) rename build/static/js/{238.33695a38.chunk.js => 238.b0a6c12d.chunk.js} (99%) delete mode 100644 build/static/js/2533.ca2d198d.chunk.js rename build/static/js/{2638.bc119b66.chunk.js => 2638.6b26c3ee.chunk.js} (99%) rename build/static/js/{2851.3a0ed207.chunk.js => 2851.828e003e.chunk.js} (99%) rename build/static/js/{2898.3b8c86cc.chunk.js => 2898.91e92c8b.chunk.js} (99%) rename build/static/js/{2898.3b8c86cc.chunk.js.LICENSE.txt => 2898.91e92c8b.chunk.js.LICENSE.txt} (100%) rename build/static/js/{3121.6e0ff825.chunk.js => 3121.4646b740.chunk.js} (99%) rename build/static/js/{3176.69a86f42.chunk.js => 3176.340ee957.chunk.js} (95%) delete mode 100644 build/static/js/3388.e9dd817e.chunk.js rename build/static/js/{3723.8624a149.chunk.js => 3723.01b1774f.chunk.js} (99%) rename build/static/js/{4263.640b9077.chunk.js => 4263.ec3fbee8.chunk.js} (99%) rename build/static/js/{4465.dde10cb8.chunk.js => 4465.8c45ec27.chunk.js} (90%) rename build/static/js/{4793.a677f2ac.chunk.js => 4793.72fb0edf.chunk.js} (99%) rename build/static/js/{4917.f4cf8ed3.chunk.js => 4917.5bb4b5d9.chunk.js} (99%) rename build/static/js/{4947.9fc997b5.chunk.js => 4947.912f7e20.chunk.js} (99%) rename build/static/js/{54.5a2100fd.chunk.js => 54.06907ff1.chunk.js} (99%) rename build/static/js/{5770.baf20b8d.chunk.js => 5770.482ef079.chunk.js} (94%) rename build/static/js/{6248.d7ba49cb.chunk.js => 6248.8f2e2aaa.chunk.js} (99%) rename build/static/js/{6390.b511f397.chunk.js => 6390.1dc7fa61.chunk.js} (99%) create mode 100644 build/static/js/6597.40beeaea.chunk.js rename build/static/js/{6849.648780b7.chunk.js => 6849.958bd3ec.chunk.js} (99%) rename build/static/js/{7221.434a49d6.chunk.js => 7221.e5f2ba4c.chunk.js} (99%) rename build/static/js/{7875.9e6056f7.chunk.js => 7875.0f6b626d.chunk.js} (99%) rename build/static/js/{8846.e95756a1.chunk.js => 8846.3eae90fb.chunk.js} (99%) rename build/static/js/{8954.4813af23.chunk.js => 8954.e87abf2c.chunk.js} (99%) rename build/static/js/{9438.044b1550.chunk.js => 9438.9a476f5c.chunk.js} (99%) rename build/static/js/{9521.f9f30508.chunk.js => 9521.9d99da63.chunk.js} (99%) rename build/static/js/{9592.bfbbd05d.chunk.js => 9592.e7d1e3ea.chunk.js} (99%) create mode 100644 build/static/js/9593.e131cb1b.chunk.js rename build/static/js/{9912.a8585d14.chunk.js => 9912.8ae215bb.chunk.js} (99%) create mode 100644 build/static/js/main.a651017e.js rename build/static/js/{main.d20d1e40.js.LICENSE.txt => main.a651017e.js.LICENSE.txt} (100%) delete mode 100644 build/static/js/main.d20d1e40.js diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 4e44912..2b7fd26 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,48 +1,48 @@ { "files": { "main.css": "/static/css/main.b85b0dd8.css", - "main.js": "/static/js/main.d20d1e40.js", - "static/js/3723.8624a149.chunk.js": "/static/js/3723.8624a149.chunk.js", - "static/js/2898.3b8c86cc.chunk.js": "/static/js/2898.3b8c86cc.chunk.js", - "static/js/6390.b511f397.chunk.js": "/static/js/6390.b511f397.chunk.js", - "static/js/3176.69a86f42.chunk.js": "/static/js/3176.69a86f42.chunk.js", - "static/js/4465.dde10cb8.chunk.js": "/static/js/4465.dde10cb8.chunk.js", - "static/js/5770.baf20b8d.chunk.js": "/static/js/5770.baf20b8d.chunk.js", - "static/js/2142.8437472d.chunk.js": "/static/js/2142.8437472d.chunk.js", + "main.js": "/static/js/main.a651017e.js", + "static/js/3723.01b1774f.chunk.js": "/static/js/3723.01b1774f.chunk.js", + "static/js/2898.91e92c8b.chunk.js": "/static/js/2898.91e92c8b.chunk.js", + "static/js/6390.1dc7fa61.chunk.js": "/static/js/6390.1dc7fa61.chunk.js", + "static/js/3176.340ee957.chunk.js": "/static/js/3176.340ee957.chunk.js", + "static/js/4465.8c45ec27.chunk.js": "/static/js/4465.8c45ec27.chunk.js", + "static/js/5770.482ef079.chunk.js": "/static/js/5770.482ef079.chunk.js", + "static/js/2142.379ba3cc.chunk.js": "/static/js/2142.379ba3cc.chunk.js", "static/js/4612.9e7024f7.chunk.js": "/static/js/4612.9e7024f7.chunk.js", - "static/js/1504.c6771267.chunk.js": "/static/js/1504.c6771267.chunk.js", + "static/js/1504.d7a3fb13.chunk.js": "/static/js/1504.d7a3fb13.chunk.js", "static/js/7157.99d280ab.chunk.js": "/static/js/7157.99d280ab.chunk.js", - "static/js/4947.9fc997b5.chunk.js": "/static/js/4947.9fc997b5.chunk.js", - "static/js/7221.434a49d6.chunk.js": "/static/js/7221.434a49d6.chunk.js", - "static/js/2851.3a0ed207.chunk.js": "/static/js/2851.3a0ed207.chunk.js", - "static/js/9521.f9f30508.chunk.js": "/static/js/9521.f9f30508.chunk.js", + "static/js/4947.912f7e20.chunk.js": "/static/js/4947.912f7e20.chunk.js", + "static/js/7221.e5f2ba4c.chunk.js": "/static/js/7221.e5f2ba4c.chunk.js", + "static/js/2851.828e003e.chunk.js": "/static/js/2851.828e003e.chunk.js", + "static/js/9521.9d99da63.chunk.js": "/static/js/9521.9d99da63.chunk.js", "static/js/6165.266ba693.chunk.js": "/static/js/6165.266ba693.chunk.js", - "static/js/9912.a8585d14.chunk.js": "/static/js/9912.a8585d14.chunk.js", - "static/js/6248.d7ba49cb.chunk.js": "/static/js/6248.d7ba49cb.chunk.js", + "static/js/9912.8ae215bb.chunk.js": "/static/js/9912.8ae215bb.chunk.js", + "static/js/6248.8f2e2aaa.chunk.js": "/static/js/6248.8f2e2aaa.chunk.js", "static/js/1148.1f747cf9.chunk.js": "/static/js/1148.1f747cf9.chunk.js", "static/css/9592.d6bfd15f.chunk.css": "/static/css/9592.d6bfd15f.chunk.css", - "static/js/9592.bfbbd05d.chunk.js": "/static/js/9592.bfbbd05d.chunk.js", - "static/js/54.5a2100fd.chunk.js": "/static/js/54.5a2100fd.chunk.js", - "static/js/2638.bc119b66.chunk.js": "/static/js/2638.bc119b66.chunk.js", - "static/js/4793.a677f2ac.chunk.js": "/static/js/4793.a677f2ac.chunk.js", - "static/js/7875.9e6056f7.chunk.js": "/static/js/7875.9e6056f7.chunk.js", - "static/js/6849.648780b7.chunk.js": "/static/js/6849.648780b7.chunk.js", + "static/js/9592.e7d1e3ea.chunk.js": "/static/js/9592.e7d1e3ea.chunk.js", + "static/js/54.06907ff1.chunk.js": "/static/js/54.06907ff1.chunk.js", + "static/js/2638.6b26c3ee.chunk.js": "/static/js/2638.6b26c3ee.chunk.js", + "static/js/4793.72fb0edf.chunk.js": "/static/js/4793.72fb0edf.chunk.js", + "static/js/7875.0f6b626d.chunk.js": "/static/js/7875.0f6b626d.chunk.js", + "static/js/6849.958bd3ec.chunk.js": "/static/js/6849.958bd3ec.chunk.js", "static/css/8846.d6bfd15f.chunk.css": "/static/css/8846.d6bfd15f.chunk.css", - "static/js/8846.e95756a1.chunk.js": "/static/js/8846.e95756a1.chunk.js", - "static/js/181.03ad68d3.chunk.js": "/static/js/181.03ad68d3.chunk.js", - "static/js/4263.640b9077.chunk.js": "/static/js/4263.640b9077.chunk.js", - "static/js/9438.044b1550.chunk.js": "/static/js/9438.044b1550.chunk.js", - "static/js/2533.ca2d198d.chunk.js": "/static/js/2533.ca2d198d.chunk.js", - "static/js/238.33695a38.chunk.js": "/static/js/238.33695a38.chunk.js", - "static/js/8954.4813af23.chunk.js": "/static/js/8954.4813af23.chunk.js", + "static/js/8846.3eae90fb.chunk.js": "/static/js/8846.3eae90fb.chunk.js", + "static/js/181.1ef0e862.chunk.js": "/static/js/181.1ef0e862.chunk.js", + "static/js/4263.ec3fbee8.chunk.js": "/static/js/4263.ec3fbee8.chunk.js", + "static/js/9438.9a476f5c.chunk.js": "/static/js/9438.9a476f5c.chunk.js", + "static/js/9593.e131cb1b.chunk.js": "/static/js/9593.e131cb1b.chunk.js", + "static/js/238.b0a6c12d.chunk.js": "/static/js/238.b0a6c12d.chunk.js", + "static/js/8954.e87abf2c.chunk.js": "/static/js/8954.e87abf2c.chunk.js", "static/js/9027.574b1256.chunk.js": "/static/js/9027.574b1256.chunk.js", - "static/js/4917.f4cf8ed3.chunk.js": "/static/js/4917.f4cf8ed3.chunk.js", + "static/js/4917.5bb4b5d9.chunk.js": "/static/js/4917.5bb4b5d9.chunk.js", "static/js/5260.ffe264e4.chunk.js": "/static/js/5260.ffe264e4.chunk.js", "static/js/1685.d71eee3a.chunk.js": "/static/js/1685.d71eee3a.chunk.js", "static/js/2660.8ec125e1.chunk.js": "/static/js/2660.8ec125e1.chunk.js", "static/js/6.25ff8786.chunk.js": "/static/js/6.25ff8786.chunk.js", "static/js/9925.4a94ad25.chunk.js": "/static/js/9925.4a94ad25.chunk.js", - "static/js/1222.97f70748.chunk.js": "/static/js/1222.97f70748.chunk.js", + "static/js/1222.c450ab8b.chunk.js": "/static/js/1222.c450ab8b.chunk.js", "static/js/7922.5b607201.chunk.js": "/static/js/7922.5b607201.chunk.js", "static/js/3999.847bb360.chunk.js": "/static/js/3999.847bb360.chunk.js", "static/js/191.a343f9f5.chunk.js": "/static/js/191.a343f9f5.chunk.js", @@ -55,8 +55,8 @@ "static/js/6415.63dcb217.chunk.js": "/static/js/6415.63dcb217.chunk.js", "static/js/3838.10f5e491.chunk.js": "/static/js/3838.10f5e491.chunk.js", "static/js/2075.9858b66a.chunk.js": "/static/js/2075.9858b66a.chunk.js", + "static/js/3121.4646b740.chunk.js": "/static/js/3121.4646b740.chunk.js", "static/js/4180.172969de.chunk.js": "/static/js/4180.172969de.chunk.js", - "static/js/3121.6e0ff825.chunk.js": "/static/js/3121.6e0ff825.chunk.js", "static/js/5766.994fb72c.chunk.js": "/static/js/5766.994fb72c.chunk.js", "static/js/4734.5b301125.chunk.js": "/static/js/4734.5b301125.chunk.js", "static/js/3992.7901ae42.chunk.js": "/static/js/3992.7901ae42.chunk.js", @@ -67,11 +67,11 @@ "static/js/5374.86c3f116.chunk.js": "/static/js/5374.86c3f116.chunk.js", "static/js/9054.3ae3e32b.chunk.js": "/static/js/9054.3ae3e32b.chunk.js", "static/js/5358.522741a7.chunk.js": "/static/js/5358.522741a7.chunk.js", + "static/js/6597.40beeaea.chunk.js": "/static/js/6597.40beeaea.chunk.js", "static/js/436.b7322d7b.chunk.js": "/static/js/436.b7322d7b.chunk.js", "static/js/8718.bddae0b2.chunk.js": "/static/js/8718.bddae0b2.chunk.js", "static/js/5580.da4f4eb4.chunk.js": "/static/js/5580.da4f4eb4.chunk.js", "static/js/4542.c6c7874f.chunk.js": "/static/js/4542.c6c7874f.chunk.js", - "static/js/3388.e9dd817e.chunk.js": "/static/js/3388.e9dd817e.chunk.js", "static/js/9863.29197136.chunk.js": "/static/js/9863.29197136.chunk.js", "static/js/1912.0349361e.chunk.js": "/static/js/1912.0349361e.chunk.js", "static/js/6667.5ae0f88f.chunk.js": "/static/js/6667.5ae0f88f.chunk.js", @@ -79,10 +79,10 @@ "static/js/6810.2e79aa63.chunk.js": "/static/js/6810.2e79aa63.chunk.js", "static/js/348.a1db66c5.chunk.js": "/static/js/348.a1db66c5.chunk.js", "static/js/4486.23cac129.chunk.js": "/static/js/4486.23cac129.chunk.js", - "static/js/1425.51f16953.chunk.js": "/static/js/1425.51f16953.chunk.js", + "static/js/1425.201283eb.chunk.js": "/static/js/1425.201283eb.chunk.js", "static/css/3624.a25a9ba8.chunk.css": "/static/css/3624.a25a9ba8.chunk.css", "static/js/3624.30470cab.chunk.js": "/static/js/3624.30470cab.chunk.js", - "static/js/23.16c886f8.chunk.js": "/static/js/23.16c886f8.chunk.js", + "static/js/23.4be71fed.chunk.js": "/static/js/23.4be71fed.chunk.js", "static/css/6509.ab611cf0.chunk.css": "/static/css/6509.ab611cf0.chunk.css", "static/media/aiImage.png": "/static/media/aiImage.89c2ccb91a41d85031e3.png", "static/media/coming-soon.png": "/static/media/coming-soon.69b99428ab9e22eca0ba.png", @@ -99,6 +99,6 @@ }, "entrypoints": [ "static/css/main.b85b0dd8.css", - "static/js/main.d20d1e40.js" + "static/js/main.a651017e.js" ] } \ No newline at end of file diff --git a/build/index.html b/build/index.html index 6a71047..3a72603 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -Nearle Console
\ No newline at end of file +Nearle Console
\ No newline at end of file diff --git a/build/static/js/1222.97f70748.chunk.js b/build/static/js/1222.97f70748.chunk.js deleted file mode 100644 index 18f2071..0000000 --- a/build/static/js/1222.97f70748.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1222],{31222:(t,a,h)=>{h.d(a,{$G1:()=>m,$Nl:()=>Rt,AI8:()=>x,AYP:()=>ha,AdO:()=>yt,Azs:()=>ot,BJM:()=>S,Cd7:()=>dt,CtR:()=>Kt,DX0:()=>X,DZH:()=>E,DwJ:()=>wt,EZw:()=>b,E_E:()=>Vt,E_J:()=>Y,EgJ:()=>j,F6S:()=>gt,G6c:()=>Gt,GQB:()=>ta,GdF:()=>at,H4F:()=>U,HPi:()=>et,HU2:()=>Tt,Im6:()=>p,ItP:()=>B,Itr:()=>bt,JFD:()=>Mt,JL6:()=>zt,Ki0:()=>n,LTk:()=>It,MiI:()=>ct,N3N:()=>N,NpB:()=>q,NtI:()=>Ht,Rod:()=>L,S3Y:()=>y,S75:()=>Ot,SeC:()=>Dt,U3x:()=>w,Uhn:()=>z,VP9:()=>F,WVj:()=>J,WnU:()=>Q,Wux:()=>C,X3k:()=>jt,XT0:()=>Wt,XXh:()=>$t,Xbk:()=>kt,Xh5:()=>R,YBc:()=>M,YHz:()=>$,Yvo:()=>tt,Z2J:()=>r,Zs6:()=>Yt,_pN:()=>_t,aEx:()=>Ut,aSE:()=>rt,aVM:()=>ut,auT:()=>At,bfP:()=>d,bmp:()=>G,bqQ:()=>g,bsz:()=>lt,cAP:()=>Nt,dDC:()=>l,dKO:()=>K,g9_:()=>ft,gZ7:()=>f,giK:()=>Xt,gl1:()=>Pt,gsJ:()=>Z,gwi:()=>P,ihY:()=>Ft,imn:()=>k,ivF:()=>A,j1Q:()=>xt,joZ:()=>Bt,k4P:()=>o,kci:()=>O,lB9:()=>Et,m6K:()=>Lt,mU9:()=>i,nZo:()=>V,o8z:()=>D,ohY:()=>c,pSF:()=>St,pWE:()=>vt,pk7:()=>pt,q53:()=>Zt,q8i:()=>u,qiG:()=>aa,qod:()=>Jt,rAP:()=>T,rgL:()=>W,tMO:()=>s,tX0:()=>e,tfO:()=>_,tjE:()=>qt,tpc:()=>nt,u9F:()=>H,uDv:()=>st,vbW:()=>Ct,wZm:()=>I,x2E:()=>Qt,xI$:()=>ht,xVu:()=>mt,zPd:()=>it});var v=h(99230);function c(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 18v1c0 1.1-.9 2-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h14c1.1 0 2 .9 2 2v1h-9a2 2 0 00-2 2v8a2 2 0 002 2h9zm-9-2h10V8H12v8zm4-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.5z"}}]})(t)}function r(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}}]})(t)}function n(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 002 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"}}]})(t)}function l(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{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-2zm0 18H4V8h16v13z"}}]})(t)}function i(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}}]})(t)}function z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}}]})(t)}function g(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"}}]})(t)}function d(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.1 19.37l1 1.74c-.96.44-2.01.73-3.1.84v-2.02c.74-.09 1.44-.28 2.1-.56zM4.07 13H2.05c.11 1.1.4 2.14.84 3.1l1.74-1c-.28-.66-.47-1.36-.56-2.1zM15.1 4.63l1-1.74c-.96-.44-2-.73-3.1-.84v2.02c.74.09 1.44.28 2.1.56zM19.93 11h2.02c-.11-1.1-.4-2.14-.84-3.1l-1.74 1c.28.66.47 1.36.56 2.1zM8.9 19.37l-1 1.74c.96.44 2.01.73 3.1.84v-2.02c-.74-.09-1.44-.28-2.1-.56zM11 4.07V2.05c-1.1.11-2.14.4-3.1.84l1 1.74c.66-.28 1.36-.47 2.1-.56zm7.36 3.1l1.74-1.01c-.63-.87-1.4-1.64-2.27-2.27l-1.01 1.74c.59.45 1.1.96 1.54 1.54zM4.63 8.9l-1.74-1c-.44.96-.73 2-.84 3.1h2.02c.09-.74.28-1.44.56-2.1zm15.3 4.1c-.09.74-.28 1.44-.56 2.1l1.74 1c.44-.96.73-2.01.84-3.1h-2.02zm-3.1 5.36l1.01 1.74c.87-.63 1.64-1.4 2.27-2.27l-1.74-1.01c-.45.59-.96 1.1-1.54 1.54zM7.17 5.64l-1-1.75c-.88.64-1.64 1.4-2.27 2.28l1.74 1.01a7.7 7.7 0 011.53-1.54zM5.64 16.83l-1.74 1c.63.87 1.4 1.64 2.27 2.27l1.01-1.74a7.7 7.7 0 01-1.54-1.53zM13 7h-2v5.41l4.29 4.29 1.41-1.41-3.7-3.7V7z"}}]})(t)}function e(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"}}]})(t)}function o(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}}]})(t)}function M(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}}]})(t)}function H(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M-618-3000H782V600H-618zM0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"}}]})(t)}function p(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42A6.92 6.92 0 0119 12c0 3.87-3.13 7-7 7A6.995 6.995 0 017.58 6.58L6.17 5.17A8.932 8.932 0 003 12a9 9 0 0018 0c0-2.74-1.23-5.18-3.17-6.83z"}}]})(t)}function u(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"}}]})(t)}function s(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function f(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}}]})(t)}function V(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"}}]})(t)}function m(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"}}]})(t)}function L(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"}}]})(t)}function k(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}}]})(t)}function x(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"}}]})(t)}function w(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{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.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}}]})(t)}function B(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}}]})(t)}function C(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function A(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"}}]})(t)}function S(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.38 8.57l-1.23 1.85a8 8 0 01-.22 7.58H5.07A8 8 0 0115.58 6.85l1.85-1.23A10 10 0 003.35 19a2 2 0 001.72 1h13.85a2 2 0 001.74-1 10 10 0 00-.27-10.44zm-9.79 6.84a2 2 0 002.83 0l5.66-8.49-8.49 5.66a2 2 0 000 2.83z"}}]})(t)}function E(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 22l-.01-6L14 12l3.99-4.01L18 2H6v6l4 4-4 3.99V22h12zM8 7.5V4h8v3.5l-4 4-4-4z"}}]})(t)}function P(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function b(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"}}]})(t)}function J(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"}}]})(t)}function X(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2z"}},{tag:"path",attr:{d:"M15 9l.94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11L4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"}}]})(t)}function Z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z"}}]})(t)}function _(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"}}]})(t)}function F(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}},{tag:"path",attr:{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}}]})(t)}function I(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function Y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function D(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function N(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 000-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}}]})(t)}function q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM9.1 17H7v-2.14l5.96-5.96 2.12 2.12L9.1 17zm7.75-7.73l-1.06 1.06-2.12-2.12 1.06-1.06c.2-.2.51-.2.71 0l1.41 1.41c.2.2.2.51 0 .71z"}}]})(t)}function G(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 13V9c0-.55-.45-1-1-1H7V6h5V4H9.5V3h-2v1H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h4v2H5v2h2.5v1h2v-1H11c.55 0 1-.45 1-1zM19.59 12.52l-5.66 5.65-2.83-2.83-1.41 1.42L13.93 21 21 13.93z"}}]})(t)}function R(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 4h3v16h-3zM5 14h3v6H5zm6-5h3v11h-3z"}}]})(t)}function U(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}}]})(t)}function W(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9h4v11H4zM16 13h4v7h-4zM10 4h4v16h-4z"}}]})(t)}function j(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M4 10.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.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"}}]})(t)}function K(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M3 18h12v-2H3v2zM3 6v2h18V6H3zm0 7h18v-2H3v2z"}}]})(t)}function O(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 10l.5-2h-4l1-4h-2l-1 4h-4l1-4h-2L9 8H5l-.5 2h4l-1 4h-4L3 16h4l-1 4h2l1-4h4l-1 4h2l1-4h4l.5-2h-4l1-4h4zm-7 4h-4l1-4h4l-1 4z"}}]})(t)}function y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}}]})(t)}function Q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}}]})(t)}function T(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}}]})(t)}function $(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13.66 7c-.56-1.18-1.76-2-3.16-2H6V3h12v2h-3.26c.48.58.84 1.26 1.05 2H18v2h-2.02c-.25 2.8-2.61 5-5.48 5h-.73l6.73 7h-2.77L7 14v-2h3.5c1.76 0 3.22-1.3 3.46-3H6V7h7.66z"}}]})(t)}function tt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}}]})(t)}function at(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.5 3.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2l-1.5 1.5zM19 19c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11v14z"}},{tag:"path",attr:{d:"M9 7h6v2H9zM16 7h2v2h-2zM9 10h6v2H9zM16 10h2v2h-2z"}}]})(t)}function ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"}}]})(t)}function vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 1h6v2H9zM19.03 7.39l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42A8.962 8.962 0 0012 4a9 9 0 00-9 9c0 4.97 4.02 9 9 9a8.994 8.994 0 007.03-14.61zM13 14h-2V8h2v6z"}}]})(t)}function ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}}]})(t)}function rt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"}}]})(t)}function nt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 7h-5V4c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zM9 12c.83 0 1.5.67 1.5 1.5S9.83 15 9 15s-1.5-.67-1.5-1.5S8.17 12 9 12zm3 6H6v-.75c0-1 2-1.5 3-1.5s3 .5 3 1.5V18zm1-9h-2V4h2v5zm5 7.5h-4V15h4v1.5zm0-3h-4V12h4v1.5z"}}]})(t)}function lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"}}]})(t)}function it(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6h-2c0-2.76-2.24-5-5-5S7 3.24 7 6H5c-1.1 0-1.99.9-1.99 2L3 20c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-7-3c1.66 0 3 1.34 3 3H9c0-1.66 1.34-3 3-3zm0 10c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5z"}}]})(t)}function zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}}]})(t)}function gt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.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.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.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.5z"}}]})(t)}function dt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"}}]})(t)}function et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function ot(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2a9 9 0 00-9 9c0 4.17 2.84 7.67 6.69 8.69L12 22l2.31-2.31C18.16 18.67 21 15.17 21 11a9 9 0 00-9-9zm0 2c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.3a7.2 7.2 0 01-6-3.22c.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08a7.2 7.2 0 01-6 3.22z"}}]})(t)}function Mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function Ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 9H9V2H7v7H5V2H3v7c0 2.12 1.66 3.84 3.75 3.97V22h2.5v-9.03C11.34 12.84 13 11.12 13 9V2h-2v7zm5-3v8h2.5v8H21V2c-2.76 0-5 2.24-5 4z"}}]})(t)}function pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18A2.996 2.996 0 0018 21c1.66 0 3-1.34 3-3 0-1.3-.84-2.4-2-2.82z"}}]})(t)}function ut(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 11c-.18 0-.36.03-.53.05L17.41 9H20V6l-3.72 1.86L13.41 5H9v2h3.59l2 2H11l-4 2-2-2H0v2h4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4l2 2h3l3.49-6.1 1.01 1.01c-.91.73-1.5 1.84-1.5 3.09 0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4zM4 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm16 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(t)}function st(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(t)}function ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}}]})(t)}function Vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}}]})(t)}function mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}}]})(t)}function Lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}}]})(t)}function kt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}}]})(t)}function xt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}}]})(t)}function wt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{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-2zm-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-6v11c0 1.1-.9 2-2 2H4v-2h17V7h2z"}}]})(t)}function Bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0012 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0112 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}}]})(t)}function Ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"}}]})(t)}function At(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"}}]})(t)}function St(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"}}]})(t)}function Et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M18.6 6.62c-1.44 0-2.8.56-3.77 1.53L12 10.66 10.48 12h.01L7.8 14.39c-.64.64-1.49.99-2.4.99-1.87 0-3.39-1.51-3.39-3.38S3.53 8.62 5.4 8.62c.91 0 1.76.35 2.44 1.03l1.13 1 1.51-1.34L9.22 8.2A5.37 5.37 0 005.4 6.62C2.42 6.62 0 9.04 0 12s2.42 5.38 5.4 5.38c1.44 0 2.8-.56 3.77-1.53l2.83-2.5.01.01L13.52 12h-.01l2.69-2.39c.64-.64 1.49-.99 2.4-.99 1.87 0 3.39 1.51 3.39 3.38s-1.52 3.38-3.39 3.38c-.9 0-1.76-.35-2.44-1.03l-1.14-1.01-1.51 1.34 1.27 1.12a5.386 5.386 0 003.82 1.57c2.98 0 5.4-2.41 5.4-5.38s-2.42-5.37-5.4-5.37z"}}]})(t)}function Pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.9 8.89l-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89zm-2.99-3.9l1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5l1.93-.01zM13 5h1.96l.54 4.52c.05.39-.07.78-.33 1.07-.22.26-.54.41-.95.41-.67 0-1.22-.59-1.22-1.31V5zM8.49 9.52L9.04 5H11v4.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41a1.42 1.42 0 01-.33-1.07zm-4.45-.16L5.05 5h1.97l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.27-.32-.36-.75-.26-1.17zM5 19v-6.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V19H5z"}}]})(t)}function bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 000 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0020 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"}}]})(t)}function Jt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"}}]})(t)}function Xt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"}},{tag:"path",attr:{d:"M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"}}]})(t)}function Zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.58 4.08L6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2a8.445 8.445 0 013.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43a8.495 8.495 0 013.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]})(t)}function _t(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"evenodd",d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87z"}},{tag:"circle",attr:{cx:"9",cy:"8",r:"4",fillRule:"evenodd"}},{tag:"path",attr:{fillRule:"evenodd",d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24a5.98 5.98 0 010 7.52c.42.14.86.24 1.33.24zM9 13c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}}]})(t)}function Ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8.65 5.82a3.999 3.999 0 115.53 5.53L8.65 5.82zM20 17.17c-.02-1.1-.63-2.11-1.61-2.62-.54-.28-1.13-.54-1.77-.76L20 17.17zm1.19 4.02L2.81 2.81 1.39 4.22l8.89 8.89c-1.81.23-3.39.79-4.67 1.45A2.97 2.97 0 004 17.22V20h13.17l2.61 2.61 1.41-1.42z"}}]})(t)}function It(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}}]})(t)}function Yt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}}]})(t)}function Dt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(t)}function Nt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}}]})(t)}function qt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5a2 2 0 01-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}}]})(t)}function Gt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 12c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm1.65 7.35L16.5 17.2V14h1v2.79l1.85 1.85-.7.71zM18 3h-3.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H6c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h6.11a6.743 6.743 0 01-1.42-2H6V5h2v3h8V5h2v5.08c.71.1 1.38.31 2 .6V5c0-1.1-.9-2-2-2zm-6 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}}]})(t)}function Rt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM5 18c.2-.63 2.57-1.68 4.96-1.94l2.04-2a9.34 9.34 0 00-1-.06c-2.67 0-8 1.34-8 4v2h9l-2-2H5zm15.6-5.5l-5.13 5.17-2.07-2.08L12 17l3.47 3.5L22 13.91z"}}]})(t)}function Ut(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-1 18H5V9h14v11zm1-13H4V4h16v3z"}},{tag:"path",attr:{d:"M9 12h6v2H9z"}}]})(t)}function Wt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}}]})(t)}function jt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}}]})(t)}function Kt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}}]})(t)}function Ot(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13.66 7c-.56-1.18-1.76-2-3.16-2H6V3h12v2h-3.26c.48.58.84 1.26 1.05 2H18v2h-2.02c-.25 2.8-2.61 5-5.48 5h-.73l6.73 7h-2.77L7 14v-2h3.5c1.76 0 3.22-1.3 3.46-3H6V7h7.66z"}}]})(t)}function yt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.5 3.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2l-1.5 1.5zM15 20H6c-.55 0-1-.45-1-1v-1h10v2zm4-1c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11v14z"}},{tag:"path",attr:{d:"M9 7h6v2H9zM16 7h2v2h-2zM9 10h6v2H9zM16 10h2v2h-2z"}}]})(t)}function Qt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"}}]})(t)}function Tt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}}]})(t)}function $t(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z"}}]})(t)}function ta(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.17 11H4h.17m9.24-6H9v2h3.59l2 2H11l-4 2-2-2H0v2h4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4l2 2h3l3.49-6.1 1.01 1.01c-.91.73-1.5 1.84-1.5 3.09 0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4c-.18 0-.36.03-.53.05L17.41 9H20V6l-3.72 1.86L13.41 5zM20 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM4 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(t)}function aa(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z",opacity:".87"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}}]})(t)}function ha(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 000 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0020 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9A2.988 2.988 0 006 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74zM8.07 16c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69H8.07zM12 8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}}]})(t)}}}]); \ No newline at end of file diff --git a/build/static/js/1222.c450ab8b.chunk.js b/build/static/js/1222.c450ab8b.chunk.js new file mode 100644 index 0000000..30b0eb9 --- /dev/null +++ b/build/static/js/1222.c450ab8b.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1222],{31222:(t,a,h)=>{h.d(a,{$G1:()=>L,$Nl:()=>Wt,AI8:()=>w,AYP:()=>ca,AdO:()=>Tt,Azs:()=>Mt,BJM:()=>E,Cd7:()=>et,CtR:()=>yt,DX0:()=>Z,DZH:()=>b,DwJ:()=>Ct,EZw:()=>J,E_E:()=>Lt,E_J:()=>D,EgJ:()=>K,F6S:()=>dt,G6c:()=>Ut,GQB:()=>ha,GdF:()=>ht,H4F:()=>W,HPi:()=>ot,HU2:()=>ta,Im6:()=>u,ItP:()=>C,Itr:()=>Xt,JFD:()=>Ht,JL6:()=>zt,Ki0:()=>n,LTk:()=>Dt,MiI:()=>rt,N3N:()=>q,NpB:()=>G,NtI:()=>pt,Rod:()=>k,S3Y:()=>Q,S75:()=>Qt,SeC:()=>qt,U3x:()=>B,Uhn:()=>g,VP9:()=>I,WVj:()=>X,WnU:()=>T,Wux:()=>A,X3k:()=>Ot,XT0:()=>Kt,XXh:()=>aa,Xbk:()=>wt,Xh5:()=>U,YBc:()=>H,YHz:()=>tt,Yvo:()=>at,Z2J:()=>r,Zs6:()=>Nt,_pN:()=>It,a1M:()=>ft,aEx:()=>jt,aSE:()=>nt,aVM:()=>st,auT:()=>Et,b6i:()=>z,bfP:()=>e,bmp:()=>R,bqQ:()=>d,bsz:()=>it,cAP:()=>Gt,dDC:()=>l,dKO:()=>O,g9_:()=>mt,gZ7:()=>V,giK:()=>_t,gl1:()=>Jt,gsJ:()=>_,gwi:()=>P,ihY:()=>Yt,imn:()=>x,ivF:()=>S,j1Q:()=>Bt,joZ:()=>At,k4P:()=>M,kci:()=>y,lB9:()=>Pt,m6K:()=>xt,mU9:()=>i,nZo:()=>m,o8z:()=>N,ohY:()=>c,pSF:()=>bt,pWE:()=>ct,pk7:()=>ut,q53:()=>Ft,q8i:()=>s,qiG:()=>va,qod:()=>Zt,rAP:()=>$,rgL:()=>j,tMO:()=>f,tX0:()=>o,tfO:()=>F,tjE:()=>Rt,tpc:()=>lt,u9F:()=>p,uDv:()=>Vt,vbW:()=>St,wZm:()=>Y,x2E:()=>$t,xI$:()=>vt,xVu:()=>kt,zPd:()=>gt});var v=h(99230);function c(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 18v1c0 1.1-.9 2-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h14c1.1 0 2 .9 2 2v1h-9a2 2 0 00-2 2v8a2 2 0 002 2h9zm-9-2h10V8H12v8zm4-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.5z"}}]})(t)}function r(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}}]})(t)}function n(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 002 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"}}]})(t)}function l(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{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-2zm0 18H4V8h16v13z"}}]})(t)}function i(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}}]})(t)}function g(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}}]})(t)}function z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}}]})(t)}function d(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"}}]})(t)}function e(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.1 19.37l1 1.74c-.96.44-2.01.73-3.1.84v-2.02c.74-.09 1.44-.28 2.1-.56zM4.07 13H2.05c.11 1.1.4 2.14.84 3.1l1.74-1c-.28-.66-.47-1.36-.56-2.1zM15.1 4.63l1-1.74c-.96-.44-2-.73-3.1-.84v2.02c.74.09 1.44.28 2.1.56zM19.93 11h2.02c-.11-1.1-.4-2.14-.84-3.1l-1.74 1c.28.66.47 1.36.56 2.1zM8.9 19.37l-1 1.74c.96.44 2.01.73 3.1.84v-2.02c-.74-.09-1.44-.28-2.1-.56zM11 4.07V2.05c-1.1.11-2.14.4-3.1.84l1 1.74c.66-.28 1.36-.47 2.1-.56zm7.36 3.1l1.74-1.01c-.63-.87-1.4-1.64-2.27-2.27l-1.01 1.74c.59.45 1.1.96 1.54 1.54zM4.63 8.9l-1.74-1c-.44.96-.73 2-.84 3.1h2.02c.09-.74.28-1.44.56-2.1zm15.3 4.1c-.09.74-.28 1.44-.56 2.1l1.74 1c.44-.96.73-2.01.84-3.1h-2.02zm-3.1 5.36l1.01 1.74c.87-.63 1.64-1.4 2.27-2.27l-1.74-1.01c-.45.59-.96 1.1-1.54 1.54zM7.17 5.64l-1-1.75c-.88.64-1.64 1.4-2.27 2.28l1.74 1.01a7.7 7.7 0 011.53-1.54zM5.64 16.83l-1.74 1c.63.87 1.4 1.64 2.27 2.27l1.01-1.74a7.7 7.7 0 01-1.54-1.53zM13 7h-2v5.41l4.29 4.29 1.41-1.41-3.7-3.7V7z"}}]})(t)}function o(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"}}]})(t)}function M(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}}]})(t)}function H(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}}]})(t)}function p(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M-618-3000H782V600H-618zM0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"}}]})(t)}function u(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42A6.92 6.92 0 0119 12c0 3.87-3.13 7-7 7A6.995 6.995 0 017.58 6.58L6.17 5.17A8.932 8.932 0 003 12a9 9 0 0018 0c0-2.74-1.23-5.18-3.17-6.83z"}}]})(t)}function s(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"}}]})(t)}function f(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function V(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}}]})(t)}function m(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"}}]})(t)}function L(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"}}]})(t)}function k(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"}}]})(t)}function x(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}}]})(t)}function w(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"}}]})(t)}function B(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{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.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}}]})(t)}function C(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}}]})(t)}function A(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function S(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"}}]})(t)}function E(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.38 8.57l-1.23 1.85a8 8 0 01-.22 7.58H5.07A8 8 0 0115.58 6.85l1.85-1.23A10 10 0 003.35 19a2 2 0 001.72 1h13.85a2 2 0 001.74-1 10 10 0 00-.27-10.44zm-9.79 6.84a2 2 0 002.83 0l5.66-8.49-8.49 5.66a2 2 0 000 2.83z"}}]})(t)}function b(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 22l-.01-6L14 12l3.99-4.01L18 2H6v6l4 4-4 3.99V22h12zM8 7.5V4h8v3.5l-4 4-4-4z"}}]})(t)}function P(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function J(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"}}]})(t)}function X(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"}}]})(t)}function Z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2z"}},{tag:"path",attr:{d:"M15 9l.94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11L4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"}}]})(t)}function _(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z"}}]})(t)}function F(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"}}]})(t)}function I(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}},{tag:"path",attr:{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}}]})(t)}function Y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function D(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function N(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 000-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}}]})(t)}function G(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM9.1 17H7v-2.14l5.96-5.96 2.12 2.12L9.1 17zm7.75-7.73l-1.06 1.06-2.12-2.12 1.06-1.06c.2-.2.51-.2.71 0l1.41 1.41c.2.2.2.51 0 .71z"}}]})(t)}function R(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 13V9c0-.55-.45-1-1-1H7V6h5V4H9.5V3h-2v1H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h4v2H5v2h2.5v1h2v-1H11c.55 0 1-.45 1-1zM19.59 12.52l-5.66 5.65-2.83-2.83-1.41 1.42L13.93 21 21 13.93z"}}]})(t)}function U(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 4h3v16h-3zM5 14h3v6H5zm6-5h3v11h-3z"}}]})(t)}function W(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}}]})(t)}function j(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9h4v11H4zM16 13h4v7h-4zM10 4h4v16h-4z"}}]})(t)}function K(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M4 10.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.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"}}]})(t)}function O(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M3 18h12v-2H3v2zM3 6v2h18V6H3zm0 7h18v-2H3v2z"}}]})(t)}function y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 10l.5-2h-4l1-4h-2l-1 4h-4l1-4h-2L9 8H5l-.5 2h4l-1 4h-4L3 16h4l-1 4h2l1-4h4l-1 4h2l1-4h4l.5-2h-4l1-4h4zm-7 4h-4l1-4h4l-1 4z"}}]})(t)}function Q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}}]})(t)}function T(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}}]})(t)}function $(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}}]})(t)}function tt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13.66 7c-.56-1.18-1.76-2-3.16-2H6V3h12v2h-3.26c.48.58.84 1.26 1.05 2H18v2h-2.02c-.25 2.8-2.61 5-5.48 5h-.73l6.73 7h-2.77L7 14v-2h3.5c1.76 0 3.22-1.3 3.46-3H6V7h7.66z"}}]})(t)}function at(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}}]})(t)}function ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.5 3.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2l-1.5 1.5zM19 19c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11v14z"}},{tag:"path",attr:{d:"M9 7h6v2H9zM16 7h2v2h-2zM9 10h6v2H9zM16 10h2v2h-2z"}}]})(t)}function vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"}}]})(t)}function ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 1h6v2H9zM19.03 7.39l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42A8.962 8.962 0 0012 4a9 9 0 00-9 9c0 4.97 4.02 9 9 9a8.994 8.994 0 007.03-14.61zM13 14h-2V8h2v6z"}}]})(t)}function rt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}}]})(t)}function nt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"}}]})(t)}function lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 7h-5V4c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zM9 12c.83 0 1.5.67 1.5 1.5S9.83 15 9 15s-1.5-.67-1.5-1.5S8.17 12 9 12zm3 6H6v-.75c0-1 2-1.5 3-1.5s3 .5 3 1.5V18zm1-9h-2V4h2v5zm5 7.5h-4V15h4v1.5zm0-3h-4V12h4v1.5z"}}]})(t)}function it(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"}}]})(t)}function gt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6h-2c0-2.76-2.24-5-5-5S7 3.24 7 6H5c-1.1 0-1.99.9-1.99 2L3 20c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-7-3c1.66 0 3 1.34 3 3H9c0-1.66 1.34-3 3-3zm0 10c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5z"}}]})(t)}function zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}}]})(t)}function dt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.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.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.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.5z"}}]})(t)}function et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"}}]})(t)}function ot(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function Mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2a9 9 0 00-9 9c0 4.17 2.84 7.67 6.69 8.69L12 22l2.31-2.31C18.16 18.67 21 15.17 21 11a9 9 0 00-9-9zm0 2c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.3a7.2 7.2 0 01-6-3.22c.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08a7.2 7.2 0 01-6 3.22z"}}]})(t)}function Ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 9H9V2H7v7H5V2H3v7c0 2.12 1.66 3.84 3.75 3.97V22h2.5v-9.03C11.34 12.84 13 11.12 13 9V2h-2v7zm5-3v8h2.5v8H21V2c-2.76 0-5 2.24-5 4z"}}]})(t)}function ut(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18A2.996 2.996 0 0018 21c1.66 0 3-1.34 3-3 0-1.3-.84-2.4-2-2.82z"}}]})(t)}function st(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 11c-.18 0-.36.03-.53.05L17.41 9H20V6l-3.72 1.86L13.41 5H9v2h3.59l2 2H11l-4 2-2-2H0v2h4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4l2 2h3l3.49-6.1 1.01 1.01c-.91.73-1.5 1.84-1.5 3.09 0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4zM4 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm16 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(t)}function ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}}]})(t)}function Vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(t)}function mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}}]})(t)}function Lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}}]})(t)}function kt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}}]})(t)}function xt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}}]})(t)}function wt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}}]})(t)}function Bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}}]})(t)}function Ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{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-2zm-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-6v11c0 1.1-.9 2-2 2H4v-2h17V7h2z"}}]})(t)}function At(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0012 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0112 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}}]})(t)}function St(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"}}]})(t)}function Et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"}}]})(t)}function bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"}}]})(t)}function Pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M18.6 6.62c-1.44 0-2.8.56-3.77 1.53L12 10.66 10.48 12h.01L7.8 14.39c-.64.64-1.49.99-2.4.99-1.87 0-3.39-1.51-3.39-3.38S3.53 8.62 5.4 8.62c.91 0 1.76.35 2.44 1.03l1.13 1 1.51-1.34L9.22 8.2A5.37 5.37 0 005.4 6.62C2.42 6.62 0 9.04 0 12s2.42 5.38 5.4 5.38c1.44 0 2.8-.56 3.77-1.53l2.83-2.5.01.01L13.52 12h-.01l2.69-2.39c.64-.64 1.49-.99 2.4-.99 1.87 0 3.39 1.51 3.39 3.38s-1.52 3.38-3.39 3.38c-.9 0-1.76-.35-2.44-1.03l-1.14-1.01-1.51 1.34 1.27 1.12a5.386 5.386 0 003.82 1.57c2.98 0 5.4-2.41 5.4-5.38s-2.42-5.37-5.4-5.37z"}}]})(t)}function Jt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.9 8.89l-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89zm-2.99-3.9l1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5l1.93-.01zM13 5h1.96l.54 4.52c.05.39-.07.78-.33 1.07-.22.26-.54.41-.95.41-.67 0-1.22-.59-1.22-1.31V5zM8.49 9.52L9.04 5H11v4.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41a1.42 1.42 0 01-.33-1.07zm-4.45-.16L5.05 5h1.97l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.27-.32-.36-.75-.26-1.17zM5 19v-6.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V19H5z"}}]})(t)}function Xt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 000 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0020 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"}}]})(t)}function Zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"}}]})(t)}function _t(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"}},{tag:"path",attr:{d:"M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"}}]})(t)}function Ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.58 4.08L6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2a8.445 8.445 0 013.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43a8.495 8.495 0 013.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]})(t)}function It(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"evenodd",d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87z"}},{tag:"circle",attr:{cx:"9",cy:"8",r:"4",fillRule:"evenodd"}},{tag:"path",attr:{fillRule:"evenodd",d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24a5.98 5.98 0 010 7.52c.42.14.86.24 1.33.24zM9 13c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}}]})(t)}function Yt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8.65 5.82a3.999 3.999 0 115.53 5.53L8.65 5.82zM20 17.17c-.02-1.1-.63-2.11-1.61-2.62-.54-.28-1.13-.54-1.77-.76L20 17.17zm1.19 4.02L2.81 2.81 1.39 4.22l8.89 8.89c-1.81.23-3.39.79-4.67 1.45A2.97 2.97 0 004 17.22V20h13.17l2.61 2.61 1.41-1.42z"}}]})(t)}function Dt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}}]})(t)}function Nt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}}]})(t)}function qt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(t)}function Gt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}}]})(t)}function Rt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5a2 2 0 01-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}}]})(t)}function Ut(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 12c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm1.65 7.35L16.5 17.2V14h1v2.79l1.85 1.85-.7.71zM18 3h-3.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H6c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h6.11a6.743 6.743 0 01-1.42-2H6V5h2v3h8V5h2v5.08c.71.1 1.38.31 2 .6V5c0-1.1-.9-2-2-2zm-6 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}}]})(t)}function Wt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM5 18c.2-.63 2.57-1.68 4.96-1.94l2.04-2a9.34 9.34 0 00-1-.06c-2.67 0-8 1.34-8 4v2h9l-2-2H5zm15.6-5.5l-5.13 5.17-2.07-2.08L12 17l3.47 3.5L22 13.91z"}}]})(t)}function jt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-1 18H5V9h14v11zm1-13H4V4h16v3z"}},{tag:"path",attr:{d:"M9 12h6v2H9z"}}]})(t)}function Kt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}}]})(t)}function Ot(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}}]})(t)}function yt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}}]})(t)}function Qt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13.66 7c-.56-1.18-1.76-2-3.16-2H6V3h12v2h-3.26c.48.58.84 1.26 1.05 2H18v2h-2.02c-.25 2.8-2.61 5-5.48 5h-.73l6.73 7h-2.77L7 14v-2h3.5c1.76 0 3.22-1.3 3.46-3H6V7h7.66z"}}]})(t)}function Tt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.5 3.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2l-1.5 1.5zM15 20H6c-.55 0-1-.45-1-1v-1h10v2zm4-1c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11v14z"}},{tag:"path",attr:{d:"M9 7h6v2H9zM16 7h2v2h-2zM9 10h6v2H9zM16 10h2v2h-2z"}}]})(t)}function $t(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"}}]})(t)}function ta(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}}]})(t)}function aa(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z"}}]})(t)}function ha(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.17 11H4h.17m9.24-6H9v2h3.59l2 2H11l-4 2-2-2H0v2h4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4l2 2h3l3.49-6.1 1.01 1.01c-.91.73-1.5 1.84-1.5 3.09 0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4c-.18 0-.36.03-.53.05L17.41 9H20V6l-3.72 1.86L13.41 5zM20 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM4 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(t)}function va(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z",opacity:".87"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}}]})(t)}function ca(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 000 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0020 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9A2.988 2.988 0 006 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74zM8.07 16c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69H8.07zM12 8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}}]})(t)}}}]); \ No newline at end of file diff --git a/build/static/js/1425.51f16953.chunk.js b/build/static/js/1425.201283eb.chunk.js similarity index 78% rename from build/static/js/1425.51f16953.chunk.js rename to build/static/js/1425.201283eb.chunk.js index ba69e44..ba0c404 100644 --- a/build/static/js/1425.51f16953.chunk.js +++ b/build/static/js/1425.201283eb.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1425],{20466:(t,e,a)=>{a.d(e,{k:()=>r});var n=a(8881);const r=(t,e,a)=>(0,n.M8)(t,{variant:e,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},81425:(t,e,a)=>{a.d(e,{DK:()=>F,DL:()=>g,DM:()=>O,FC:()=>w,H2:()=>k,HY:()=>m,Hh:()=>v,KN:()=>T,Mn:()=>u,N4:()=>K,OM:()=>P,R_:()=>_,Sd:()=>h,U6:()=>I,U8:()=>A,W0:()=>j,XC:()=>U,Xw:()=>Q,Y8:()=>X,Yk:()=>f,aL:()=>d,bY:()=>x,bd:()=>L,eF:()=>C,jO:()=>N,jy:()=>p,k3:()=>b,nQ:()=>y,ne:()=>l,qB:()=>M,ry:()=>H,tL:()=>Y,ts:()=>E,wT:()=>D,z3:()=>z,zF:()=>S,zR:()=>q,zb:()=>B,zf:()=>R});var n=a(89379),r=a(26910),i=a(20466),o=a(4159),c=a.n(o);const s=localStorage.getItem("userid"),l=async t=>{const e="".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs").concat(t?"?userid=".concat(t):""),a=await r.A.get(e);return a.data&&a.data.status?a.data.data:null},d=async()=>[...(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(s))).data.details,{locationname:"All",applocationid:0}],p=async t=>{const e=(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/orders/getordersummary/?applocationid=").concat(t))).data.details;return{created:e.created.toString(),uncoveredOrders:e.pending.toString(),coveredOrders:e.delivered.toString(),cancelled:e.cancelled.toString(),percentage1:(Math.round(e.created/e.total*100)||0).toString(),percentage2:(Math.round(e.pending/e.total*100)||0).toString(),percentage3:(Math.round(e.delivered/e.total*100)||0).toString(),percentage4:(Math.round(e.cancelled/e.total*100)||0).toString()}},u=async t=>{const e=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(t,"&status=active"));if(e.data.status){let t=[];return e.data.details.map((e=>{t.push((0,n.A)((0,n.A)({},e),{},{label:"".concat(e.tenantname)}))})),t}},g=async t=>{try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(t))).data.details}catch(e){console.log("gettenantlocations",e)}},v=async t=>{let{queryKey:e}=t;const[,a,n,i,o,c,s]=e,l="".concat("https://jupiter.nearle.app/live/api/v1","/orders/getordersummary/?applocationid=").concat(a,"&tenantid=").concat(c,"&locationid=").concat(s,"&fromdate=").concat(n,"&todate=").concat(i,"&status=").concat(o);return(await r.A.get(l)).data.details},y=async t=>{let{pageParam:e=1,queryKey:a}=t;const[,n,i,o,c,s,l,d,p]=a,u="".concat("https://jupiter.nearle.app/live/api/v1","/orders/tenant/getorders/?applocationid=").concat(n,"&tenantid=").concat(d,"&locationid=").concat(p,"&status=").concat(i,"&fromdate=").concat(c,"&todate=").concat(s,"&keyword=").concat(o,"&pageno=").concat(e,"&pagesize=").concat(l),g=await r.A.get(u);return{rows:g.data.details,nextPage:g.data.details.length===Number(l)?e+1:void 0}},m=async()=>{const{data:t}=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes/?tag=paymentmode"));return t.details.map((t=>(0,n.A)((0,n.A)({},t),{},{label:t.typename})))},h=async t=>{let{queryKey:e}=t;try{const[,t]=e,{data:a}=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getriders/?applocationid=").concat(t));console.log("data",a);return null!==a&&void 0!==a&&a.details?null===a||void 0===a?void 0:a.details.map((t=>(0,n.A)((0,n.A)({},t),{},{label:"".concat(t.firstname," ").concat(t.lastname," | ").concat(t.contactno)}))):[]}catch(a){throw(0,i.k)(a.message,"error",2e3),a}},w=async t=>(await r.A.post("https://routes.workolik.com/api/v1/optimization/createdeliveries",t.deliveries)).data,A=async t=>{let{riders:e}=t;return(await r.A.post("https://routes.workolik.com/api/v1/optimization/reconcile-steps",{riders:e})).data},j=async t=>{let{batch:e,tenantId:a}=t;return(await r.A.post("https://routes.workolik.com/api/v1/batch/efficiency",{batch:e,tenant_id:a},{headers:{"Content-Type":"application/json"},validateStatus:()=>!0})).data},k=async t=>{const e=t=>{const e=Number(t);return Number.isFinite(e)?e:t},a=(t.deliveries||[]).map((t=>(0,n.A)((0,n.A)({},t),{},{userid:e(t.userid),rider_id:e(t.rider_id)})));console.log("deliveryData",a);return(await r.A.post("https://jupiter.nearle.app/live/api/v1/deliveries/createdeliveries",a)).data},f=async t=>{console.log("variables",t);const e=Array.isArray(t.absent_riders)?t.absent_riders:[],a=1==t.selectedMode.value?"https://routes.workolik.com/api/v1/optimization/riderassign?hypertuning_params=".concat(t.hypertuning_params):"https://routemate.workolik.com/api/v1/optimization/riderassign?strategy=multi_trip",i=1==t.selectedMode.value?{deliveries:t.deliveries,absent_riders:e}:(0,n.A)((0,n.A)({},t.data||{}),{},{absent_riders:e});console.log("createAutomationDeliveries body",i);return(await r.A.post(a,i)).data},b=async t=>{if(!t)throw new Error("Invalid rider token");console.log("notify rider called"),console.log("riderToken",t);return(await r.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/notifyuser"),{token:t,notification:{title:"NearleXpress",body:"Orders have been placed for delivery. Kindly accept and process deliveries",sound:"ring",image:""}})).data},K=async t=>(await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/orders/updateorder"),{orderheaderid:t,orderstatus:"cancelled",cancelled:c()().format("YYYY-MM-DD HH:mm:ss")})).data,q=async t=>{console.log("data",t);const e=null===t||void 0===t?void 0:t.map((t=>({orderheaderid:t.orderheaderid,orderstatus:"cancelled",cancelled:c()().format("YYYY-MM-DD HH:mm:ss")})));return(await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/orders/updatemultipleorders"),e)).data},Y=async t=>{let{pageParam:e=1,queryKey:a}=t,[,n,i,o,c,s,l,d,p,u,g]=a;o="All"==o?"all":o;const v=0===n?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/?appuserid=").concat(i,"&status=").concat(o,"&fromdate=").concat(c,"&todate=").concat(s,"&pageno=").concat(e,"&pagesize=").concat(l,"&keyword=").concat(d,"&tenantid=").concat(p,"&locationid=").concat(u,"&userid=").concat(g):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/?applocationid=").concat(n,"&status=").concat(o,"&fromdate=").concat(c,"&todate=").concat(s,"&pageno=").concat(e,"&pagesize=").concat(l,"&keyword=").concat(d,"&tenantid=").concat(p,"&locationid=").concat(u,"&userid=").concat(g),y=await r.A.get(v);return{rows:y.data.details,nextPage:y.data.details.length===Number(l)?e+1:void 0}},M=async(t,e,a,n,i,o,c,s,l)=>{const d=0==t?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?appuserid=").concat(e,"&fromdate=").concat(a,"&todate=").concat(n):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?applocationid=").concat(t,"&fromdate=").concat(a,"&todate=").concat(n,"&tenantid=").concat(c,"&locationid=").concat(s,"&userid=").concat(l),p=(await r.A.get(d)).data.details;return{total:p.total,uncoveredLength:p.pending,assignedLength:p.accepted,arrivedLength:p.arrived,pickedLength:p.picked,activeLength:p.active,coveredLength:p.delivered,cancelLength:p.cancelled,skippedLength:p.skipped}},S=async(t,e)=>{const a={deliveryid:t.deliveryid,orderheaderid:t.orderheaderid,orderstatus:"cancelled",canceltime:c()().format("YYYY-MM-DD HH:mm:ss"),feedback:e};return(await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/updatedelivery"),a)).data},z=async t=>(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/orders/getorderdetails?orderheaderid=").concat(t))).data,_=async(t,e)=>(console.log("selectedRider",t),console.log("selectedRow",e),r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/updatedelivery"),{userid:t.userid,deliveryid:e.deliveryid,orderheaderid:e.orderheaderid,orderstatus:"pending",assigntime:c()().format("YYYY-MM-DD HH:mm:ss")})),D=async t=>r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/updatedelivery"),t),H=async t=>{let{queryKey:e}=t;const[,a,n,o,c,s]=e;try{let t="".concat("https://jupiter.nearle.app/live/api/v1","/tenants/getalltenants/?status=").concat(o,"&applocationid=").concat(a,"&keyword=").concat(n,"&pageno=").concat(c+1,"&pagesize=").concat(s,"&moduleid=6");return(await r.A.get(t)).data.details}catch(p){var l,d;const t=(null===(l=p.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.message)||p.message||"Something went wrong";return(0,i.k)(t),null}},L=async t=>{let{queryKey:e}=t;const[,a]=e;try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantsummary/?moduleid=6&applocationid=").concat(a))).data.summary}catch(c){var n,o;const t=(null===(n=c.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.message)||c.message||"Something went wrong";return(0,i.k)(t),null}},P=async t=>{let{queryKey:e}=t;const[,a]=e;try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getallpricing/?applocationid=").concat(a))).data.details||[]}catch(c){var n,o;const t=(null===(n=c.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.message)||c.message||"Something went wrong";return(0,i.k)(t),[]}},R=async t=>{let{queryKey:e}=t;const[,a]=e;try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/customers/getcustomersummary?applocationid=").concat(a))).data.summary}catch(c){var n,o;const t=(null===(n=c.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.message)||c.message||"Something went wrong";return(0,i.k)(t),null}},N=async t=>{let{pageParam:e=1,queryKey:a}=t;const[,n,o,c]=a;try{var s;const t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/customers/getallcustomers/"),{params:{applocationid:n,keyword:o,pageno:e,pagesize:c}});return{data:t.data.details||[],nextPage:(null===(s=t.data.details)||void 0===s?void 0:s.length)===c?e+1:void 0}}catch(p){var l,d;const t=(null===(l=p.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.message)||p.message||"Something went wrong";throw(0,i.k)(t),p}},O=async t=>{let{pageParam:e=1,queryKey:a}=t;try{const[,t,n,i]=a,o="".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallriders/?applocationid=").concat(t,"&pageno=").concat(e,"&pagesize=",20,"&keyword=").concat(n,"&status=").concat(0==i?"":"Active"),c=await r.A.get(o);return{details:c.data.details,nextPage:20===c.data.details.length?e+1:void 0}}catch(n){return console.log("fetchAllRiders err",n.message),[]}},C=async t=>{let{queryKey:e}=t;try{const[,t,a]=e;return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallridersummary/?applocationid=").concat(t,"&status=").concat(0==a?"":"Active"))).data.details}catch(a){return console.log("getallridersummary err",a.message),[]}},x=async()=>(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderstatus"))).data.data,F=async t=>{let{queryKey:e}=t;console.log("queryKey for getreportsummary",e);const[a,n,i,o,c]=e,s=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportsummary/?applocationid=").concat(a,"&tenantid=").concat(n,"&locationid=").concat(i,"&fromdate=").concat(o,"&todate=").concat(c));return console.log("getreportsummary",s.data.details),s.data.details},I=async t=>{let{queryKey:e}=t;console.log("queryKey for getreportlocationsummary",e);const[a,n,i,o,c]=e,s=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportlocationsummary/?applocationid=").concat(a,"&tenantid=").concat(n,"&locationid=").concat(i,"&fromdate=").concat(o,"&todate=").concat(c));return console.log("getreportlocationsummary",s.data.details),s.data.details},T=async t=>{let{queryKey:e}=t;console.log("queryKey for fetchRidersSummary",e);const[,a,n,i]=e,o=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getridersummary/?applocationid=").concat(a,"&fromdate=").concat(n,"&todate=").concat(i));return console.log("fetchRidersSummary",o.data.details),o.data.details},X=async()=>(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/invoice/getinvoiceinsight"))).data.details,U=async t=>{let{queryKey:e}=t;const[a]=e,n=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/invoice/getallinvoice/?billstatus=").concat(a));return console.log("fetchdeliverylist",n.data.details),n.data.details},B=async t=>{let{queryKey:e}=t;const[a,n,i=""]=e,o=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/partners/getriderlogs/?applocationid=").concat(a,"&fromdate=").concat(n||"","&todate=").concat(n,"&keyword=").concat(i||""," "));return console.log("fetchRidersLogs",o.data.details),o.data.details},E=async()=>{try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/users/getusers/?configid=9&userid=").concat(s))).data.details}catch(t){console.log("getusers",t.message)}},Q=async()=>{try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallriders?partnerid=64"))).data.details}catch(t){console.log("getallriders",t.message)}}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1425],{20466:(t,e,a)=>{a.d(e,{k:()=>r});var n=a(8881);const r=(t,e,a)=>(0,n.M8)(t,{variant:e,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},81425:(t,e,a)=>{a.d(e,{DK:()=>F,DL:()=>g,DM:()=>O,FC:()=>w,H2:()=>k,HY:()=>m,Hh:()=>v,KN:()=>T,Mn:()=>u,N4:()=>K,OM:()=>P,R_:()=>_,Sd:()=>h,U6:()=>I,U8:()=>A,W0:()=>j,XC:()=>U,Xw:()=>Q,Y8:()=>X,Yk:()=>f,aL:()=>d,bY:()=>x,bd:()=>L,eF:()=>C,jO:()=>N,jy:()=>p,k3:()=>b,nQ:()=>y,ne:()=>l,qB:()=>M,ry:()=>H,tL:()=>Y,ts:()=>E,wT:()=>D,z3:()=>z,zF:()=>S,zR:()=>q,zb:()=>B,zf:()=>R});var n=a(89379),r=a(26910),i=a(20466),o=a(4159),c=a.n(o);const s=localStorage.getItem("userid"),l=async t=>{const e="".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs").concat(t?"?userid=".concat(t):""),a=await r.A.get(e);return a.data&&a.data.status?a.data.data:null},d=async()=>[...(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(s))).data.details,{locationname:"All",applocationid:0}],p=async t=>{const e=(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/orders/getordersummary/?applocationid=").concat(t))).data.details;return{created:e.created.toString(),uncoveredOrders:e.pending.toString(),coveredOrders:e.delivered.toString(),cancelled:e.cancelled.toString(),percentage1:(Math.round(e.created/e.total*100)||0).toString(),percentage2:(Math.round(e.pending/e.total*100)||0).toString(),percentage3:(Math.round(e.delivered/e.total*100)||0).toString(),percentage4:(Math.round(e.cancelled/e.total*100)||0).toString()}},u=async t=>{const e=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(t,"&status=active"));if(e.data.status){let t=[];return e.data.details.map((e=>{t.push((0,n.A)((0,n.A)({},e),{},{label:"".concat(e.tenantname)}))})),t}},g=async t=>{try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(t))).data.details}catch(e){console.log("gettenantlocations",e)}},v=async t=>{let{queryKey:e}=t;const[,a,n,i,o,c,s]=e,l="".concat("https://jupiter.nearle.app/live/api/v1","/orders/getordersummary/?applocationid=").concat(a,"&tenantid=").concat(c,"&locationid=").concat(s,"&fromdate=").concat(n,"&todate=").concat(i,"&status=").concat(o);return(await r.A.get(l)).data.details},y=async t=>{let{pageParam:e=1,queryKey:a}=t;const[,n,i,o,c,s,l,d,p]=a,u="".concat("https://jupiter.nearle.app/live/api/v1","/orders/tenant/getorders/?applocationid=").concat(n,"&tenantid=").concat(d,"&locationid=").concat(p,"&status=").concat(i,"&fromdate=").concat(c,"&todate=").concat(s,"&keyword=").concat(o,"&pageno=").concat(e,"&pagesize=").concat(l),g=await r.A.get(u);return{rows:g.data.details,nextPage:g.data.details.length===Number(l)?e+1:void 0}},m=async()=>{const{data:t}=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes/?tag=paymentmode"));return t.details.map((t=>(0,n.A)((0,n.A)({},t),{},{label:t.typename})))},h=async t=>{let{queryKey:e}=t;try{const[,t]=e,{data:a}=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getriders/?applocationid=").concat(t));console.log("data",a);return null!==a&&void 0!==a&&a.details?null===a||void 0===a?void 0:a.details.map((t=>(0,n.A)((0,n.A)({},t),{},{label:"".concat(t.firstname," ").concat(t.lastname," | ").concat(t.contactno)}))):[]}catch(a){throw(0,i.k)(a.message,"error",2e3),a}},w=async t=>(await r.A.post("https://routes.workolik.com/api/v1/optimization/createdeliveries",t.deliveries)).data,A=async t=>{let{riders:e}=t;return(await r.A.post("https://routes.workolik.com/api/v1/optimization/reconcile-steps",{riders:e})).data},j=async t=>{let{batch:e,tenantId:a}=t;return(await r.A.post("https://routes.workolik.com/api/v1/batch/efficiency",{batch:e,tenant_id:a},{headers:{"Content-Type":"application/json"},validateStatus:()=>!0})).data},k=async t=>{const e=t=>{const e=Number(t);return Number.isFinite(e)?e:t},a=(t.deliveries||[]).map((t=>(0,n.A)((0,n.A)({},t),{},{userid:e(t.userid),rider_id:e(t.rider_id)})));console.log("deliveryData",a);return(await r.A.post("https://jupiter.nearle.app/live/api/v1/deliveries/createdeliveries",a)).data},f=async t=>{console.log("variables",t);const e=Array.isArray(t.absent_riders)?t.absent_riders:[],a=1==t.selectedMode.value?"https://routes.workolik.com/api/v1/optimization/riderassign?hypertuning_params=".concat(t.hypertuning_params):"https://routemate.workolik.com/api/v1/optimization/riderassign?strategy=multi_trip",i=1==t.selectedMode.value?{deliveries:t.deliveries,absent_riders:e}:(0,n.A)((0,n.A)({},t.data||{}),{},{absent_riders:e});console.log("createAutomationDeliveries body",i);return(await r.A.post(a,i)).data},b=async t=>{if(!t)throw new Error("Invalid rider token");console.log("notify rider called"),console.log("riderToken",t);return(await r.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/notifyuser"),{token:t,notification:{title:"NearleXpress",body:"Orders have been placed for delivery. Kindly accept and process deliveries",sound:"ring",image:""}})).data},K=async t=>(await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/orders/updateorder"),{orderheaderid:t,orderstatus:"cancelled",cancelled:c()().format("YYYY-MM-DD HH:mm:ss")})).data,q=async t=>{console.log("data",t);const e=null===t||void 0===t?void 0:t.map((t=>({orderheaderid:t.orderheaderid,orderstatus:"cancelled",cancelled:c()().format("YYYY-MM-DD HH:mm:ss")})));return(await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/orders/updatemultipleorders"),e)).data},Y=async t=>{let{pageParam:e=1,queryKey:a}=t,[,n,i,o,c,s,l,d,p,u,g]=a;o="All"==o?"all":o;const v=0===n?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/?appuserid=").concat(i,"&status=").concat(o,"&fromdate=").concat(c,"&todate=").concat(s,"&pageno=").concat(e,"&pagesize=").concat(l,"&keyword=").concat(d,"&tenantid=").concat(p,"&locationid=").concat(u,"&userid=").concat(g):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/?applocationid=").concat(n,"&status=").concat(o,"&fromdate=").concat(c,"&todate=").concat(s,"&pageno=").concat(e,"&pagesize=").concat(l,"&keyword=").concat(d,"&tenantid=").concat(p,"&locationid=").concat(u,"&userid=").concat(g),y=await r.A.get(v);return{rows:y.data.details,nextPage:y.data.details.length===Number(l)?e+1:void 0}},M=async(t,e,a,n,i,o,c,s,l)=>{const d=0==t?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?appuserid=").concat(e,"&fromdate=").concat(a,"&todate=").concat(n):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?applocationid=").concat(t,"&fromdate=").concat(a,"&todate=").concat(n,"&tenantid=").concat(c,"&locationid=").concat(s,"&userid=").concat(l),p=(await r.A.get(d)).data.details;return{total:p.total,uncoveredLength:p.pending,assignedLength:p.accepted,arrivedLength:p.arrived,pickedLength:p.picked,activeLength:p.active,coveredLength:p.delivered,cancelLength:p.cancelled,skippedLength:p.skipped}},S=async(t,e)=>{const a={deliveryid:t.deliveryid,orderheaderid:t.orderheaderid,orderstatus:"cancelled",canceltime:c()().format("YYYY-MM-DD HH:mm:ss"),feedback:e};return(await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/updatedelivery"),a)).data},z=async t=>(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/orders/getorderdetails?orderheaderid=").concat(t))).data,_=async(t,e)=>(console.log("selectedRider",t),console.log("selectedRow",e),r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/updatedelivery"),{userid:t.userid,deliveryid:e.deliveryid,orderheaderid:e.orderheaderid,orderstatus:"pending",assigntime:c()().format("YYYY-MM-DD HH:mm:ss")})),D=async t=>r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/updatedelivery"),t),H=async t=>{let{queryKey:e}=t;const[,a,n,o,c,s]=e;try{let t="".concat("https://jupiter.nearle.app/live/api/v1","/tenants/getalltenants/?status=").concat(o,"&applocationid=").concat(a,"&keyword=").concat(n,"&pageno=").concat(c+1,"&pagesize=").concat(s,"&moduleid=6");return(await r.A.get(t)).data.details}catch(p){var l,d;const t=(null===(l=p.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.message)||p.message||"Something went wrong";return(0,i.k)(t),null}},L=async t=>{let{queryKey:e}=t;const[,a]=e;try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantsummary/?moduleid=6&applocationid=").concat(a))).data.summary}catch(c){var n,o;const t=(null===(n=c.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.message)||c.message||"Something went wrong";return(0,i.k)(t),null}},P=async t=>{let{queryKey:e}=t;const[,a]=e;try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getallpricing/?applocationid=").concat(a))).data.details||[]}catch(c){var n,o;const t=(null===(n=c.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.message)||c.message||"Something went wrong";return(0,i.k)(t),[]}},R=async t=>{let{queryKey:e}=t;const[,a]=e;try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/customers/getcustomersummary?applocationid=").concat(a))).data.summary}catch(c){var n,o;const t=(null===(n=c.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.message)||c.message||"Something went wrong";return(0,i.k)(t),null}},N=async t=>{let{pageParam:e=1,queryKey:a}=t;const[,n,o,c]=a;try{var s;const t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/customers/getallcustomers/"),{params:{applocationid:n,keyword:o,pageno:e,pagesize:c}});return{data:t.data.details||[],nextPage:(null===(s=t.data.details)||void 0===s?void 0:s.length)===c?e+1:void 0}}catch(p){var l,d;const t=(null===(l=p.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.message)||p.message||"Something went wrong";throw(0,i.k)(t),p}},O=async t=>{let{pageParam:e=1,queryKey:a}=t;try{const[,t,n,i]=a,o="".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallriders/?applocationid=").concat(t,"&pageno=").concat(e,"&pagesize=",20,"&keyword=").concat(n,"&status=").concat(0==i||2==i?"":"Active"),c=await r.A.get(o);return{details:c.data.details,nextPage:20===c.data.details.length?e+1:void 0}}catch(n){return console.log("fetchAllRiders err",n.message),[]}},C=async t=>{let{queryKey:e}=t;try{const[,t,a]=e;return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallridersummary/?applocationid=").concat(t,"&status=").concat(0==a?"":"Active"))).data.details}catch(a){return console.log("getallridersummary err",a.message),[]}},x=async()=>(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderstatus"))).data.data,F=async t=>{let{queryKey:e}=t;console.log("queryKey for getreportsummary",e);const[a,n,i,o,c]=e,s=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportsummary/?applocationid=").concat(a,"&tenantid=").concat(n,"&locationid=").concat(i,"&fromdate=").concat(o,"&todate=").concat(c));return console.log("getreportsummary",s.data.details),s.data.details},I=async t=>{let{queryKey:e}=t;console.log("queryKey for getreportlocationsummary",e);const[a,n,i,o,c]=e,s=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportlocationsummary/?applocationid=").concat(a,"&tenantid=").concat(n,"&locationid=").concat(i,"&fromdate=").concat(o,"&todate=").concat(c));return console.log("getreportlocationsummary",s.data.details),s.data.details},T=async t=>{let{queryKey:e}=t;console.log("queryKey for fetchRidersSummary",e);const[,a,n,i]=e,o=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getridersummary/?applocationid=").concat(a,"&fromdate=").concat(n,"&todate=").concat(i));return console.log("fetchRidersSummary",o.data.details),o.data.details},X=async()=>(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/invoice/getinvoiceinsight"))).data.details,U=async t=>{let{queryKey:e}=t;const[a]=e,n=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/invoice/getallinvoice/?billstatus=").concat(a));return console.log("fetchdeliverylist",n.data.details),n.data.details},B=async t=>{let{queryKey:e}=t;const[a,n,i=""]=e,o=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/partners/getriderlogs/?applocationid=").concat(a,"&fromdate=").concat(n||"","&todate=").concat(n,"&keyword=").concat(i||""," "));return console.log("fetchRidersLogs",o.data.details),o.data.details},E=async()=>{try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/users/getusers/?configid=9&userid=").concat(s))).data.details}catch(t){console.log("getusers",t.message)}},Q=async()=>{try{return(await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallriders?partnerid=64"))).data.details}catch(t){console.log("getallriders",t.message)}}}}]); \ No newline at end of file diff --git a/build/static/js/1504.c6771267.chunk.js b/build/static/js/1504.d7a3fb13.chunk.js similarity index 99% rename from build/static/js/1504.c6771267.chunk.js rename to build/static/js/1504.d7a3fb13.chunk.js index 6a5f8dc..79f7f20 100644 --- a/build/static/js/1504.c6771267.chunk.js +++ b/build/static/js/1504.d7a3fb13.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1504],{23787:(e,t,i)=>{i.d(t,{FG:()=>p,nV:()=>x,pY:()=>g,pg:()=>h});var n=i(89379),s=i(80045),o=i(93230),r=i(2235),l=i(16491),a=i(82053),c=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:i=!1,onScroll:r,sx:l}=e,a=(0,s.A)(e,d);return(0,c.jsx)(o.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:r,sx:(0,n.A)((0,n.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:i,footer:s,selected:o=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(r.A,{elevation:0,onClick:a,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:o?t:"#e2e8f0",background:o?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[i,d,s]})]})},p=e=>{let{children:t,columns:i=2,sx:s}=e;return(0,c.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},s),children:t})},g=e=>{let{label:t,value:i,children:n,full:s=!1,align:o="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:s?"1 / -1":"auto",minWidth:0,textAlign:o},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},27001:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(93230),s=i(16491),o=i(82053),r=i(44414);function l(e){let{title:t,subtitle:i,live:l=!1,action:a}=e;return(0,r.jsxs)(n.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,r.jsxs)(s.A,{sx:{minWidth:0},children:[(0,r.jsx)(o.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),i&&(0,r.jsxs)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,r.jsx)(s.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,r.jsx)(o.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:i})]})]}),a&&(0,r.jsx)(s.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,i)=>{i.d(t,{A:()=>x});var n=i(48089),s=i(50704),o=i(93230),r=i(16491),l=i(82053),a=i(82917),c=i(41413),d=i(44414);function x(e){let{title:t,value:i,icon:x,color:h="#662582",caption:p,loading:g=!1}=e;return(0,d.jsx)(n.A,{sx:{height:"100%"},children:(0,d.jsx)(s.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(o.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(r.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),g?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i}),p&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:p})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(89379),s=i(9950),o=i(2660),r=i(2046),l=i(83274),a=i(25333),c=i(97125),d=i(7762),x=i(52097),h=i(44414);const p=e=>{let{value:t,onChange:i,onDebouncedChange:p,debounceTime:g=500,placeholder:u="Search (ctrl+k)",sx:A}=e;const j=(0,s.useRef)(null),[m]=(0,x.d7)(t,g);return(0,s.useEffect)((()=>{p&&p(m)}),[m,p]),(0,s.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=j.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===j.current&&j.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(o.A,{sx:(0,n.A)({},A),inputRef:j,placeholder:u,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>i(e.target.value),startAdornment:(0,h.jsx)(r.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>i(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(89379),s=i(9950),o=i(93230),r=i(41413),l=i(77922),a=i(29925),c=i(26910),d=i(31222),x=i(44414);const h=(0,s.forwardRef)(((e,t)=>{let{setAppId:i,setLocoName:h,setPage:p,sx:g,textfeildSx:u,textfieldSx:A,pill:j=!1,accentColor:m="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:v}=e;const[y,S]=(0,s.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,s.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(m).concat(e),C=w("26"),k=w("18"),z=j?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:m,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},W=j&&(0,x.jsx)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(r.A,{sx:{width:24,height:24,bgcolor:k,color:m,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,n.A)({},g),onChange:(e,t,n)=>{"clear"===n?(null===i||void 0===i||i(0),null===h||void 0===h||h(""),null===p||void 0===p||p(0)):t&&(null===i||void 0===i||i(t.applocationid),null===h||void 0===h||h(t.locationname),null===p||void 0===p||p(0))},renderInput:e=>j?(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:W}),sx:(0,n.A)((0,n.A)({},z),A||u||{})})):(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,n.A)({},A||u||{})}))})}))},71504:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ke});var n=i(89379),s=i(9950),o=i(50027),r=i(26910),l=i(14857),a=i(52351),c=i(13838),d=i(4159),x=i.n(d),h=i(8881),p=i(99459),g=i(28217),u=i(55471),A=i.n(u),j=i(21209),m=i(2235),f=i(41413),b=i(47223),v=i(60899),y=i(16491),S=i(93230),w=i(82053),C=i(82917),k=i(1320),z=i(15769),W=i(69780),I=i(9213),P=i(21671),M=i(34075),R=i(83274),Y=i(25333),L=i(33738),_=i(48159),E=i(84142),K=i(48089),T=i(82223),D=i(50704),O=i(29925),H=i(77922),B=i(25713),F=i(74745),q=i(6258),N=i(96583),V=i(40033),X=i(28170),J=i(29277),G=i(79739),U=i(23787),Z=i(9083),Q=i(8203),$=i(4729),ee=i(12678),te=i(94118),ie=i(24513),ne=i(37476),se=i(54826),oe=i(63057),re=i(85527),le=i(74930),ae=i(31222),ce=i(21636),de=i(39174),xe=i(59212),he=i(56311),pe=i(27001),ge=i(36803),ue=i(36150),Ae=i(81425),je=i(96646),me=i(44414);const fe=14,be="0 12px 32px rgba(15, 23, 42, 0.12)",ve="#0f172a",ye="#64748b",Se="#94a3b8",we="#e2e8f0",Ce="#f1f5f9",ke="#f8fafc",ze=(e,t)=>"".concat(e).concat(t),We=e=>ze(e,"08"),Ie=e=>ze(e,"18"),Pe=e=>ze(e,"26"),Me=e=>ze(e,"55"),Re={active:{label:"Active",color:"#10b981",icon:ae.mU9,statusKey:"active"},pending:{label:"Pending",color:"#f59e0b",icon:ae.tX0,statusKey:"pending"},inactive:{label:"Inactive",color:"#ef4444",icon:ae.uDv,statusKey:"inactive"}},Ye=[{status:"active",countKey:"active",tabStatus:"Active"},{status:"pending",countKey:"pending",tabStatus:"Pending"},{status:"inactive",countKey:"inactive",tabStatus:"InActive"}],Le=[{key:"active",label:"Active Tenants",color:"#10b981",icon:ae.cAP,countKey:"active"},{key:"pending",label:"Pending Approval",color:"#f59e0b",icon:ae.G6c,countKey:"pending"},{key:"inactive",label:"Inactive Tenants",color:"#ef4444",icon:ae.qiG,countKey:"inactive"}],_e=e=>(0,me.jsx)(m.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:be,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Ee=e=>{let{color:t,selected:i,size:n=24,children:s}=e;return(0,me.jsx)(f.A,{sx:{width:n,height:n,bgcolor:i?t:Ie(t),color:i?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:s})},Ke=()=>{var e;const t=(0,s.useRef)(null),[i,d]=(0,s.useState)(""),[u,be]=(0,s.useState)(""),[ze,Ke]=s.useState(10),Te=(0,l.A)(),De=(0,b.A)(Te.breakpoints.down("md")),[Oe,He]=(0,s.useState)(!1),[Be,Fe]=(0,s.useState)(0),[qe,Ne]=(0,s.useState)(""),[Ve]=(0,s.useState)("All"),[Xe,Je]=s.useState(null),[Ge,Ue]=(0,s.useState)(0),[Ze,Qe]=(0,s.useState)(0),[$e,et]=(0,s.useState)(0),[tt,it]=(0,s.useState)(null),[nt,st]=(0,s.useState)([]),[ot,rt]=(0,s.useState)("active"),[lt,at]=(0,s.useState)({}),[ct,dt]=(0,s.useState)(!1),[xt,ht]=(0,s.useState)([]),[pt,gt]=(0,s.useState)({}),[ut,At]=(0,s.useState)(!0),[jt,mt]=(0,s.useState)(""),[ft,bt]=(0,s.useState)(""),[vt,yt]=(0,s.useState)(""),[St,wt]=(0,s.useState)({}),[Ct,kt]=(0,s.useState)({}),[zt,Wt]=(0,s.useState)(0),[It,Pt]=(0,s.useState)("Active"),Mt=()=>{dt(!1)},Rt=(e,t)=>{Pt(0==t?"Active":1==t?"Pending":"InActive"),Ue(t),d(""),Wt(0)},Yt=(e,t)=>{console.log("newValue1",t),Qe(t)},Lt=(e,t)=>{console.log("newValue2",t),et(t)},[_t,Et]=(0,s.useState)(null),[Kt,Tt]=(0,s.useState)(null),Dt=e=>{Et((t=>t===e?null:e))};(0,s.useEffect)((()=>{console.log("selectedCustomer",lt)}),[lt]),(0,s.useEffect)((()=>{Et(-1),Tt(-1)}),[Ge]);const Ot=(e,t,i)=>{(0,h.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:i})};const Ht={current:null},[Bt,Ft]=(0,s.useState)(""),[qt,Nt]=(0,s.useState)([]),Vt=(0,s.useRef)(!1);"undefined"===typeof window||Vt.current||(document.querySelector("#google-maps")||function(e,t,i){if(!t)return;const n=document.createElement("script");n.setAttribute("async",""),n.setAttribute("id",i),n.src=e,t.appendChild(n)}("https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8","&libraries=places"),document.querySelector("head"),"google-maps"),Vt.current=!0);const Xt=(0,s.useMemo)((()=>(0,j.A)(((e,t)=>{Ht.current.getPlacePredictions(e,t)}),400)),[]);(0,s.useEffect)((()=>{let e=!0;if(!Ht.current&&window.google&&(Ht.current=new window.google.maps.places.AutocompleteService),Ht.current){if(""!==Bt)return Xt({input:Bt},(t=>{if(e){let e=[];Xe&&(e=[Xe]),t&&(e=[...e,...t]),Nt(e)}})),()=>{e=!1};Nt(Xe?[Xe]:[])}}),[Xe,Bt,Xt]),p.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,s.useEffect)((()=>{try{console.log("selected address =>",jt),p.A.fromAddress(jt).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:i}=e.results[0].geometry.location;if(wt({lat:t,lng:i}),kt((0,n.A)((0,n.A)({},Ct),{},{latitude:t.toString(),longitude:i.toString()})),e.results[0].address_components){let t,i,s,o,r=e.results[0];for(let e=0;e{console.log(e)}))}catch(e){console.log(e)}}),[jt]),(0,s.useEffect)((()=>{lt&&wt({lat:lt.latitude,lng:lt.longitude})}),[lt]),(0,s.useEffect)((()=>{const e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t.current.focus()),"Escape"===e.key&&document.activeElement===t.current&&t.current.blur()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[]);const{data:Jt,isLoading:Gt,refetch:Ut}=(0,ue.I)({queryKey:["tenantList",Be,u,ot,zt,ze],queryFn:Ae.ry}),{data:Zt=[],isLoading:Qt,refetch:$t}=(0,ue.I)({queryKey:["gettenantsummary",Be,ot],queryFn:Ae.bd}),ei=async()=>{await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/getpricinglist/?tenantid=").concat(tt)).then((e=>{console.log("getpricinglist",e),e.data.status&&st(e.data.details)})).catch((e=>{console.log(e)}))};(0,s.useEffect)((()=>{tt&&ei()}),[tt]);(0,s.useEffect)((()=>{tt&&(async e=>{try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e));console.log("tenantPricing",t.data.details),setTenanatPricing(t.data.details)}catch(t){console.log("fetchTenanatPricing",t)}})(tt)}),[tt]);const ti=async e=>{let t;He(!0),t=-1==e?{tenantid:tt,approved:1}:{tenantid:e,status:"active"===ot?"InActive":"Active"},await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),t).then((e=>{e.data.status&&(Ot(0==Ge?"Inactivated Successfully":1==Ge?"Approved Successfully":"Activate Successfully","success",2e3),Ut(),$t(),He(!1))})).catch((e=>{console.log(e),Ot(e.message,"error",1500),He(!1)}))},ii=async e=>{console.log("id",e);try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapppricing/?applocationid=").concat(e));console.log("appPricingRes",t.data.details),ht(t.data.details)}catch(t){console.log("appPricingRes",t)}},ni=async()=>{He(!0),await r.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/createpricing"),{tenantpricingid:0,applocationid:Be,pricingid:pt.pricingid,tenantid:tt,pricingdate:x()().format("YYYY-MM-DD HH:mm:ss"),configid:pt.configid,pricingtypeid:pt.pricingtypeid,slab:pt.slab,baseprice:+pt.baseprice,priceperkm:+pt.priceperkm,minkm:+pt.minkm,maxkm:+pt.maxkm,orders:+pt.minorder,othercharges:0}).then((e=>{e.data.status&&((0,h.M8)("Price Created Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Mt(),gt({}),ti(-1),ei())})).catch((e=>{console.log(e)}))},si=Re[null===(e=Ye[Ge])||void 0===e?void 0:e.status]||Re.active;return(0,me.jsxs)(me.Fragment,{children:[(Gt||Qt||Oe)&&(0,me.jsx)(a.A,{}),(0,me.jsx)(pe.A,{title:"Tenants",subtitle:"Live \xb7 ".concat(qe||"All Zones"),live:!0,action:(0,me.jsx)(xe.A,{locations:Ve,locaName:qe,setAppId:Fe,setLocoName:Ne,setPage:Wt,pill:!0,accentColor:"#662582",icon:(0,me.jsx)(ae.HPi,{size:14}),placeholder:"Select Zone",paperComponent:_e,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,me.jsx)(v.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Le.map(((e,t)=>{var i;const n=e.icon,s=null!==(i=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==i?i:0;return(0,me.jsx)(v.Ay,{item:!0,xs:12,sm:4,children:(0,me.jsx)(y.A,{onClick:()=>{t>=0&&Rt(0,t)},sx:{cursor:"pointer",height:"100%"},children:(0,me.jsx)(ge.A,{title:e.label,value:null!==s&&void 0!==s?s:0,icon:(0,me.jsx)(n,{size:20}),color:0===t?"#662582":e.color,loading:Qt})})},e.key)}))}),(0,me.jsx)(m.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:fe/8,borderTopRightRadius:fe/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:we,borderBottom:0,background:"#fff"},children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,me.jsx)(S.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:we,borderRadius:4}},children:Ye.map(((e,t)=>{var i;const n=Re[e.status],s=n.icon,o=Ge===t,r=null!==(i=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==i?i:0;return(0,me.jsxs)(y.A,{onClick:()=>{rt(e.status),Rt(0,t)},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:"10px",border:"1px solid ".concat(o?n.color:"#e2e8f0"),bgcolor:o?n.color:"#fff",color:o?"#fff":"#64748b",fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?n.color:"#cbd5e1",bgcolor:o?n.color:"#f8fafc"}},children:[(0,me.jsx)(f.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:o?"rgba(255,255,255,0.22)":Ie(n.color),color:o?"#fff":n.color},children:(0,me.jsx)(s,{size:13})}),(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:n.label}),(0,me.jsx)(y.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":"#f8fafc",color:o?"#fff":"#64748b",border:"none"},children:Qt?(0,me.jsx)(C.A,{variant:"text",width:14,height:10}):r})]},e.status)}))}),(0,me.jsx)(y.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,me.jsx)(he.A,{value:i,onChange:d,onDebouncedChange:be,sx:{m:0,width:"100%",borderRadius:999,bgcolor:We("#662582"),"& fieldset":{borderColor:Me("#662582"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Pe("#662582"))}}})})]})}),(0,me.jsxs)(m.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:fe/8,borderBottomRightRadius:fe/8,border:"1px solid",borderColor:we,overflow:"hidden",background:"#fff"},children:[(0,me.jsx)(k.A,{sx:{display:{xs:"none",md:"block"},maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:"10px",height:"10px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Me("#662582"),borderRadius:"8px","&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:ke}},children:(0,me.jsxs)(z.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{sx:{"& th":{backgroundColor:ke,color:ye,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(we),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Status"}),(0,me.jsx)(P.A,{children:"Client"}),(0,me.jsx)(P.A,{children:"Contact"}),(0,me.jsx)(P.A,{children:"Address"}),(0,me.jsx)(P.A,{align:"right",children:"Actions"})]})}),(0,me.jsxs)(M.A,{children:[Gt&&(0,me.jsx)(je.r,{}),0!=(null===Jt||void 0===Jt?void 0:Jt.length)||Oe?null===Jt||void 0===Jt?void 0:Jt.map(((e,t)=>{var i;const l=Re[0===Ge?"active":1===Ge?"pending":"inactive"],a=l.icon;return(0,me.jsxs)(s.Fragment,{children:[(0,me.jsxs)(I.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Ce),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:ke}},children:[(0,me.jsx)(P.A,{children:(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:Se},children:String(t+1+zt*ze).padStart(2,"0")})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:We(l.color),border:"1px solid ".concat(Me(l.color)),color:l.color},children:[(0,me.jsx)(Ee,{color:l.color,size:20,children:(0,me.jsx)(a,{size:12})}),(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:l.label})]})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,me.jsx)(Ee,{color:"#662582",size:32,children:(0,me.jsx)(ae.Azs,{size:16})}),(0,me.jsxs)(S.A,{children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:ve,whiteSpace:"nowrap"},children:e.tenantname}),(0,me.jsxs)(w.A,{variant:"caption",sx:{color:ye},children:["ID #",e.tenantid]})]})]})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:ve,whiteSpace:"nowrap"},children:e.primarycontact||"\u2014"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye},children:e.primaryemail||"\u2014"})]})}),(0,me.jsx)(P.A,{sx:{maxWidth:280},children:(0,me.jsx)(R.A,{title:e.address||"",placement:"top",children:(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,me.jsx)(P.A,{align:"right",children:(0,me.jsxs)(S.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[0==Ge&&(0,me.jsx)(R.A,{title:"Inactivate",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Me("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(Z.A,{style:{fontSize:14}})})}),1==Ge&&(0,me.jsx)(R.A,{title:"Approve",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Me("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{at(e),dt(!0),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid)},children:(0,me.jsx)(Q.A,{style:{fontSize:14}})})}),2==Ge&&(0,me.jsx)(R.A,{title:"Activate",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#10b981"),color:"#10b981",border:"1px solid ".concat(Me("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(se.yjt,{style:{fontSize:14}})})}),(0,me.jsx)(R.A,{title:_t===t?"Hide details":"View details",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:_t===t?"#662582":Ie("#662582"),color:_t===t?"#fff":"#662582",border:"1px solid ".concat(Me("#662582")),"&:hover":{bgcolor:"#662582",color:"#fff"}},onClick:()=>{at(e),Dt(t),Tt(-1),it(e.tenantid)},children:_t===t?(0,me.jsx)($.A,{style:{fontSize:14}}):(0,me.jsx)(ee.A,{style:{fontSize:14}})})}),1!==Ge&&(0,me.jsx)(R.A,{title:Kt===t?"Close":"Edit",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Kt===t?"#8b5cf6":Ie("#8b5cf6"),color:Kt===t?"#fff":"#8b5cf6",border:"1px solid ".concat(Me("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{var i;at(e),i=t,Tt((e=>e===i?null:i)),Et(-1),it(e.tenantid),Fe(e.applocationid)},children:Kt===t?(0,me.jsx)(te.A,{style:{fontSize:14}}):(0,me.jsx)(ie.A,{style:{fontSize:14}})})})]})})]}),_t===t&&(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{sx:{"&:hover":{backgroundColor:"white !important"}},colSpan:15,children:(0,me.jsx)(L.A,{in:open,timeout:800,easing:"ease-in-out",mountOnEnter:!0,unmountOnExit:!1,sx:{"& .MuiCollapse-wrapperInner":{transition:"transform 800ms ease, opacity 800ms ease"}},children:(0,me.jsxs)(o.A,{content:!1,sx:{transform:open?"translateY(0)":"translateY(-8px)",opacity:open?1:0},title:(0,me.jsxs)(_.A,{sx:{bgcolor:"primary.lighter"},value:Ze,onChange:Yt,"aria-label":"basic tabs example",children:[(0,me.jsx)(E.A,{label:" Details",icon:(0,me.jsx)(oe.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),(0,me.jsx)(E.A,{label:"Pricing",icon:(0,me.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}})]}),children:[0==Ze&&(0,me.jsxs)(v.Ay,{container:!0,sx:{m:1},spacing:2.5,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.tenantname}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Tenant"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.firstname}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Contact Person"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.primarycontact}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Phone"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.primaryemail}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"E-Mail"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(se.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.address}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Address"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.city}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"City"})]}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",variant:"subtitle1",children:e.postcode}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"PostCode"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.latitude}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Latitude"})]}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",variant:"subtitle1",children:e.longitude}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Longitude"})]})]})})]}),1==Ze&&(0,me.jsx)(K.A,{variant:"outlined",sx:{},children:(0,me.jsx)(k.A,{children:(0,me.jsxs)(z.A,{children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Date"}),(0,me.jsx)(P.A,{children:"Slab"}),(0,me.jsx)(P.A,{children:"Base Price"}),(0,me.jsx)(P.A,{children:"Min Kms"}),(0,me.jsx)(P.A,{children:"Price/Km"}),(0,me.jsx)(P.A,{children:"Other Charges"})]})}),(0,me.jsx)(M.A,{children:0===(null===nt||void 0===nt?void 0:nt.length)?(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:7,align:"center",children:(0,me.jsx)(c.A,{description:"No Pricing List"})})}):nt.map(((e,t)=>(0,me.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,me.jsx)(P.A,{children:t+1}),(0,me.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,me.jsx)(P.A,{children:e.slab}),(0,me.jsx)(P.A,{children:e.baseprice}),(0,me.jsx)(P.A,{children:e.minkm}),(0,me.jsx)(P.A,{children:e.priceperkm}),(0,me.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})}),Kt===t&&(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{sx:{backgroundColor:"white!important","&:hover":{backgroundColor:"white!important"}},colSpan:15,children:(0,me.jsxs)(o.A,{content:!1,title:(0,me.jsxs)(y.A,{sx:{bgcolor:"primary.lighter",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,me.jsxs)(_.A,{value:$e,onChange:Lt,"aria-label":"basic tabs example",children:[(0,me.jsx)(E.A,{label:"Edit Details",icon:(0,me.jsx)(oe.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),1!==Ge&&(0,me.jsx)(E.A,{label:"Edit Pricing",icon:(0,me.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"},onClick:()=>{ii(lt.applolcationid)}})]}),1==$e&&(0,me.jsx)(T.A,{variant:"contained",color:"error",size:"smaller",startIcon:(0,me.jsx)(ie.A,{size:"small"}),sx:{mr:1.8,height:"30px"},onClick:()=>{dt(!0)},children:"Add Pricing"})]}),children:[0==$e&&(0,me.jsx)(K.A,{variant:"outlined",sx:{m:2},children:(0,me.jsx)(v.Ay,{container:!0,spacing:0,children:(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(K.A,{variant:"outlined",children:[(0,me.jsx)(D.A,{children:(0,me.jsxs)(v.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(de.PY8,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Tenant Name",defaultValue:lt.tenantname,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{tenantname:e.target.value}))},sx:{mt:2}})})]})})," ",(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Contact Person",defaultValue:e.firstname,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{firstname:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{inputProps:{maxLength:10},fullWidth:!0,id:"outlined-basic",label:"Contact Number",defaultValue:lt.primarycontact,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{primarycontact:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"E-Mail",defaultValue:lt.primaryemail,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{primaryemail:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(se.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(H.A,{id:"google-map-demo",sx:{},fullWidth:!0,label:"Address",getOptionLabel:e=>"string"===typeof e?e:e.description,filterOptions:e=>e,options:qt,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,defaultValue:lt.address,noOptionsText:"No locations",onChange:(e,t)=>{Nt(t?[t,...qt]:qt),Je(t||""),console.log("newValue",t),mt((null===t||void 0===t?void 0:t.description)||""),kt((0,n.A)((0,n.A)({},Ct),{},{address:(null===t||void 0===t?void 0:t.description)||""}))},onInputChange:(e,t)=>{Ft(t)},renderInput:e=>(0,me.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{fullWidth:!0,label:"Address",variant:"outlined"})),renderOption:(e,t)=>{const i=t.structured_formatting.main_text_matched_substrings||[],s=A()(t.structured_formatting.main_text,i.map((e=>[e.offset,e.offset+e.length])));return(0,me.jsx)("li",(0,n.A)((0,n.A)({},e),{},{children:(0,me.jsxs)(v.Ay,{container:!0,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,me.jsx)(g.A,{sx:{color:"text.secondary"}})}),(0,me.jsxs)(v.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[s.map(((e,t)=>(0,me.jsx)(y.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,me.jsx)(w.A,{variant:"body2",color:"text.secondary",children:t.structured_formatting.secondary_text})]})]})}))}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,required:!0,id:"outlined-required",label:"City",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{city:e.target.value}))},value:""==ft?lt.city:ft})}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,required:!0,label:" PostCode",id:"outlined-required",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{postcode:e.target.value}))},value:""==vt?lt.postcode:vt})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{variant:"outlined",readonly:!0,label:"Latitude",fullWidth:!0,value:St.lat,sx:{cursor:"not-allowed"}})}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{label:"Longitude",readonly:!0,variant:"outlined",fullWidth:!0,value:St.lng})})]})})]})}),(0,me.jsx)(B.A,{sx:{display:"flex",justifyContent:"end",mr:3,mb:2},children:(0,me.jsx)(T.A,{variant:"contained",size:"medium",onClick:()=>{(async()=>{try{const e=(0,n.A)((0,n.A)({},Ct),{},{tenantid:tt});console.log("updateClient",e);const t=await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),e);console.log("updateClient",t.data.message),t.data.status&&Ot(t.data.message,"success",1500),Ut(),$t()}catch(e){console.log("updateClient",e)}})()},children:"Update Client"})})]})})})},"left - card"),1==$e&&(0,me.jsx)(K.A,{variant:"outlined",sx:{},children:(0,me.jsx)(k.A,{children:(0,me.jsxs)(z.A,{children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Date"}),(0,me.jsx)(P.A,{children:"Slab"}),(0,me.jsx)(P.A,{children:"Base Price"}),(0,me.jsx)(P.A,{children:"Min Kms"}),(0,me.jsx)(P.A,{children:"Price/Km"}),(0,me.jsx)(P.A,{children:"Other Charges"})]})}),(0,me.jsx)(M.A,{children:0===(null===nt||void 0===nt?void 0:nt.length)?(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:7,align:"center",children:(0,me.jsx)(c.A,{})})}):nt.map(((e,t)=>(0,me.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,me.jsx)(P.A,{children:t+1}),(0,me.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,me.jsx)(P.A,{children:e.slab}),(0,me.jsx)(P.A,{children:e.baseprice}),(0,me.jsx)(P.A,{children:e.minkm}),(0,me.jsx)(P.A,{children:e.priceperkm}),(0,me.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:6,sx:{py:6},children:(0,me.jsxs)(S.A,{alignItems:"center",spacing:1.5,children:[(0,me.jsx)(f.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:Se},children:(0,me.jsx)(ae.Itr,{size:28})}),(0,me.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:ve},children:"No tenants to show"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye},children:"No ".concat(si.label.toLowerCase()," tenants for this filter.")})]})})})]})]})}),De&&(0,me.jsxs)(U.nV,{scroll:!0,sx:{display:{xs:"flex",md:"none"}},children:[Gt&&(0,me.jsxs)(S.A,{alignItems:"center",sx:{py:4},children:[(0,me.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave"}),(0,me.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave",sx:{mt:1.25}})]}),0!=(null===Jt||void 0===Jt?void 0:Jt.length)||Oe?null===Jt||void 0===Jt?void 0:Jt.map(((e,t)=>{var i;const n=Re[0===Ge?"active":1===Ge?"pending":"inactive"],s=n.icon,o=_t===t;return(0,me.jsxs)(U.pg,{accent:n.color,header:(0,me.jsxs)(S.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,me.jsx)(Ee,{color:"#662582",size:36,children:(0,me.jsx)(ae.Azs,{size:18})}),(0,me.jsxs)(S.A,{sx:{minWidth:0},children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:800,color:ve},noWrap:!0,children:e.tenantname}),(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",mt:.25,pl:.25,pr:.875,py:.125,borderRadius:999,bgcolor:We(n.color),border:"1px solid ".concat(Me(n.color)),color:n.color,alignSelf:"flex-start"},children:[(0,me.jsx)(Ee,{color:n.color,size:16,children:(0,me.jsx)(s,{size:10})}),(0,me.jsx)(w.A,{sx:{fontWeight:800,fontSize:10,lineHeight:1},children:n.label})]})]})]}),(0,me.jsxs)(S.A,{direction:"row",spacing:.5,sx:{flexShrink:0},children:[0==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Me("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(Z.A,{style:{fontSize:14}})}),1==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Me("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{at(e),dt(!0),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid)},children:(0,me.jsx)(Q.A,{style:{fontSize:14}})}),2==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#10b981"),color:"#10b981",border:"1px solid ".concat(Me("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(se.yjt,{style:{fontSize:14}})}),(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:o?"#662582":Ie("#662582"),color:o?"#fff":"#662582",border:"1px solid ".concat(Me("#662582")),"&:hover":{bgcolor:"#662582",color:"#fff"}},onClick:()=>{at(e),Dt(t),Tt(-1),it(e.tenantid)},children:o?(0,me.jsx)($.A,{style:{fontSize:14}}):(0,me.jsx)(ee.A,{style:{fontSize:14}})}),1!==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(Me("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid),dt(!0)},children:(0,me.jsx)(ie.A,{style:{fontSize:14}})})]})]}),children:[(0,me.jsxs)(U.FG,{children:[(0,me.jsx)(U.pY,{label:"Tenant ID",value:"#".concat(e.tenantid)}),(0,me.jsx)(U.pY,{label:"Contact",value:e.primarycontact||"\u2014"}),(0,me.jsx)(U.pY,{label:"Email",value:e.primaryemail||"\u2014",full:!0}),(0,me.jsx)(U.pY,{label:"Address",full:!0,children:(0,me.jsx)(w.A,{sx:{fontSize:13,fontWeight:600,color:ve},children:e.address||"\u2014"})})]}),o&&(0,me.jsx)(y.A,{sx:{mt:1.25,pt:1.25,borderTop:"1px solid ".concat(Ce)},children:(0,me.jsxs)(U.FG,{children:[(0,me.jsx)(U.pY,{label:"Contact Person",value:e.firstname||"\u2014"}),(0,me.jsx)(U.pY,{label:"City",value:e.city||"\u2014"}),(0,me.jsx)(U.pY,{label:"Postcode",value:e.postcode||"\u2014"}),(0,me.jsx)(U.pY,{label:"Latitude",value:e.latitude||"\u2014"}),(0,me.jsx)(U.pY,{label:"Longitude",value:e.longitude||"\u2014"})]})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,me.jsxs)(S.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,me.jsx)(f.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:Se},children:(0,me.jsx)(ae.Itr,{size:28})}),(0,me.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:ve},children:"No tenants to show"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye,textAlign:"center"},children:"No ".concat(si.label.toLowerCase()," tenants for this filter.")})]})]}),!i&&(null===Jt||void 0===Jt?void 0:Jt.length)>0&&(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(F.A,{sx:{borderColor:we}}),(0,me.jsx)(q.A,{rowsPerPageOptions:[5,10,25,50,100],component:"div",count:0==Ge?null===Zt||void 0===Zt?void 0:Zt.active:1==Ge?null===Zt||void 0===Zt?void 0:Zt.pending:2==Ge?null===Zt||void 0===Zt?void 0:Zt.inactive:0,rowsPerPage:ze,page:zt,onPageChange:(e,t)=>{Wt(t)},onRowsPerPageChange:e=>{Ke(parseInt(e.target.value,10)),Wt(0)}})]})]}),(0,me.jsxs)(N.A,{fullWidth:!0,fullScreen:De,open:ct,onClose:Mt,scroll:"paper",maxWidth:"sm",TransitionComponent:ne.s,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,me.jsx)(V.A,{sx:{bgcolor:"#662582",color:"#fff",fontSize:"20px"},children:"Client Pricing - (".concat(lt.tenantname,")")}),(0,me.jsx)(X.A,{dividers:!0,children:(0,me.jsx)(o.A,{sx:{height:"100%"},children:(0,me.jsxs)(v.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Select Slab"}),(0,me.jsx)(H.A,{disablePortal:!0,id:"combo-box-demo",options:xt,getOptionLabel:e=>"".concat(e.slab),fullWidth:!0,selectOnFocus:!0,renderInput:e=>(0,me.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{label:"Slab"})),onChange:(e,t,i)=>{gt(t),console.log("pricing",t),At(!1),"clear"===i&&At(!0)}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Base Price"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.baseprice,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{baseprice:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Price/Km"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.priceperkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{priceperkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Min Kms"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.minkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{minkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Max Kms"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.maxkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{maxkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Min Orders"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.minorder,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{minorder:e.target.value}))}})]})]})})}),(0,me.jsx)(G.A,{children:(0,me.jsx)(v.Ay,{container:!0,children:(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(S.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[1==$e&&(0,me.jsx)(T.A,{disabled:ut,variant:"contained",onClick:()=>{ni()},children:"Update Pricing"}),1==Ge&&(0,me.jsx)(T.A,{disabled:ut,variant:"contained",onClick:()=>{ni()},children:"Save"}),(0,me.jsx)(T.A,{variant:"contained",onClick:()=>{At(!0),setTimeout((()=>{Mt()}),100),gt({})},color:"error",children:"Cancel"})]})})})})]})]})}},96646:(e,t,i)=>{i.d(t,{r:()=>a});var n=i(9213),s=i(21671),o=i(82917),r=i(93230),l=i(44414);const a=e=>{let{rowsPerPage:t=5,col:i=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"text",width:30})}),Array.from({length:i}).map(((e,t)=>(0,l.jsx)(s.A,{children:(0,l.jsxs)(r.A,{spacing:.5,children:[(0,l.jsx)(o.A,{variant:"text",width:100}),(0,l.jsx)(o.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"text",width:150})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(s.A,{align:"center",children:(0,l.jsxs)(r.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(o.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(o.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1504],{23787:(e,t,i)=>{i.d(t,{FG:()=>p,nV:()=>x,pY:()=>g,pg:()=>h});var n=i(89379),s=i(80045),o=i(93230),r=i(2235),l=i(16491),a=i(82053),c=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:i=!1,onScroll:r,sx:l}=e,a=(0,s.A)(e,d);return(0,c.jsx)(o.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:r,sx:(0,n.A)((0,n.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:i,footer:s,selected:o=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(r.A,{elevation:0,onClick:a,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:o?t:"#e2e8f0",background:o?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[i,d,s]})]})},p=e=>{let{children:t,columns:i=2,sx:s}=e;return(0,c.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},s),children:t})},g=e=>{let{label:t,value:i,children:n,full:s=!1,align:o="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:s?"1 / -1":"auto",minWidth:0,textAlign:o},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},27001:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(93230),s=i(16491),o=i(82053),r=i(44414);function l(e){let{title:t,subtitle:i,live:l=!1,action:a}=e;return(0,r.jsxs)(n.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,r.jsxs)(s.A,{sx:{minWidth:0},children:[(0,r.jsx)(o.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),i&&(0,r.jsxs)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,r.jsx)(s.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,r.jsx)(o.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:i})]})]}),a&&(0,r.jsx)(s.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,i)=>{i.d(t,{A:()=>x});var n=i(48089),s=i(50704),o=i(93230),r=i(16491),l=i(82053),a=i(82917),c=i(41413),d=i(44414);function x(e){let{title:t,value:i,icon:x,color:h="#662582",caption:p,loading:g=!1}=e;return(0,d.jsx)(n.A,{sx:{height:"100%"},children:(0,d.jsx)(s.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(o.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(r.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),g?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i}),p&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:p})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(89379),s=i(9950),o=i(2660),r=i(2046),l=i(83274),a=i(25333),c=i(97125),d=i(7762),x=i(52097),h=i(44414);const p=e=>{let{value:t,onChange:i,onDebouncedChange:p,debounceTime:g=500,placeholder:u="Search (ctrl+k)",sx:A}=e;const j=(0,s.useRef)(null),[m]=(0,x.d7)(t,g);return(0,s.useEffect)((()=>{p&&p(m)}),[m,p]),(0,s.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=j.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===j.current&&j.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(o.A,{sx:(0,n.A)({},A),inputRef:j,placeholder:u,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>i(e.target.value),startAdornment:(0,h.jsx)(r.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>i(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(89379),s=i(9950),o=i(93230),r=i(41413),l=i(77922),a=i(29925),c=i(26910),d=i(31222),x=i(44414);const h=(0,s.forwardRef)(((e,t)=>{let{setAppId:i,setLocoName:h,setPage:p,sx:g,textfeildSx:u,textfieldSx:A,pill:j=!1,accentColor:m="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:v}=e;const[y,S]=(0,s.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,s.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(m).concat(e),C=w("26"),k=w("18"),z=j?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:m,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},W=j&&(0,x.jsx)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(r.A,{sx:{width:24,height:24,bgcolor:k,color:m,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,n.A)({},g),onChange:(e,t,n)=>{"clear"===n?(null===i||void 0===i||i(0),null===h||void 0===h||h(""),null===p||void 0===p||p(0)):t&&(null===i||void 0===i||i(t.applocationid),null===h||void 0===h||h(t.locationname),null===p||void 0===p||p(0))},renderInput:e=>j?(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:W}),sx:(0,n.A)((0,n.A)({},z),A||u||{})})):(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,n.A)({},A||u||{})}))})}))},71504:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ke});var n=i(89379),s=i(9950),o=i(50027),r=i(26910),l=i(14857),a=i(52351),c=i(13838),d=i(4159),x=i.n(d),h=i(8881),p=i(99459),g=i(28217),u=i(55471),A=i.n(u),j=i(21209),m=i(2235),f=i(41413),b=i(47223),v=i(60899),y=i(16491),S=i(93230),w=i(82053),C=i(82917),k=i(1320),z=i(15769),W=i(69780),I=i(9213),P=i(21671),M=i(34075),R=i(83274),Y=i(25333),L=i(33738),_=i(48159),E=i(84142),K=i(48089),T=i(10226),D=i(50704),O=i(29925),H=i(77922),B=i(25713),F=i(74745),q=i(6258),N=i(96583),V=i(40033),X=i(28170),J=i(29277),G=i(79739),U=i(23787),Z=i(9083),Q=i(8203),$=i(4729),ee=i(12678),te=i(94118),ie=i(24513),ne=i(37476),se=i(54826),oe=i(63057),re=i(85527),le=i(74930),ae=i(31222),ce=i(21636),de=i(39174),xe=i(59212),he=i(56311),pe=i(27001),ge=i(36803),ue=i(36150),Ae=i(81425),je=i(96646),me=i(44414);const fe=14,be="0 12px 32px rgba(15, 23, 42, 0.12)",ve="#0f172a",ye="#64748b",Se="#94a3b8",we="#e2e8f0",Ce="#f1f5f9",ke="#f8fafc",ze=(e,t)=>"".concat(e).concat(t),We=e=>ze(e,"08"),Ie=e=>ze(e,"18"),Pe=e=>ze(e,"26"),Me=e=>ze(e,"55"),Re={active:{label:"Active",color:"#10b981",icon:ae.mU9,statusKey:"active"},pending:{label:"Pending",color:"#f59e0b",icon:ae.tX0,statusKey:"pending"},inactive:{label:"Inactive",color:"#ef4444",icon:ae.uDv,statusKey:"inactive"}},Ye=[{status:"active",countKey:"active",tabStatus:"Active"},{status:"pending",countKey:"pending",tabStatus:"Pending"},{status:"inactive",countKey:"inactive",tabStatus:"InActive"}],Le=[{key:"active",label:"Active Tenants",color:"#10b981",icon:ae.cAP,countKey:"active"},{key:"pending",label:"Pending Approval",color:"#f59e0b",icon:ae.G6c,countKey:"pending"},{key:"inactive",label:"Inactive Tenants",color:"#ef4444",icon:ae.qiG,countKey:"inactive"}],_e=e=>(0,me.jsx)(m.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:be,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Ee=e=>{let{color:t,selected:i,size:n=24,children:s}=e;return(0,me.jsx)(f.A,{sx:{width:n,height:n,bgcolor:i?t:Ie(t),color:i?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:s})},Ke=()=>{var e;const t=(0,s.useRef)(null),[i,d]=(0,s.useState)(""),[u,be]=(0,s.useState)(""),[ze,Ke]=s.useState(10),Te=(0,l.A)(),De=(0,b.A)(Te.breakpoints.down("md")),[Oe,He]=(0,s.useState)(!1),[Be,Fe]=(0,s.useState)(0),[qe,Ne]=(0,s.useState)(""),[Ve]=(0,s.useState)("All"),[Xe,Je]=s.useState(null),[Ge,Ue]=(0,s.useState)(0),[Ze,Qe]=(0,s.useState)(0),[$e,et]=(0,s.useState)(0),[tt,it]=(0,s.useState)(null),[nt,st]=(0,s.useState)([]),[ot,rt]=(0,s.useState)("active"),[lt,at]=(0,s.useState)({}),[ct,dt]=(0,s.useState)(!1),[xt,ht]=(0,s.useState)([]),[pt,gt]=(0,s.useState)({}),[ut,At]=(0,s.useState)(!0),[jt,mt]=(0,s.useState)(""),[ft,bt]=(0,s.useState)(""),[vt,yt]=(0,s.useState)(""),[St,wt]=(0,s.useState)({}),[Ct,kt]=(0,s.useState)({}),[zt,Wt]=(0,s.useState)(0),[It,Pt]=(0,s.useState)("Active"),Mt=()=>{dt(!1)},Rt=(e,t)=>{Pt(0==t?"Active":1==t?"Pending":"InActive"),Ue(t),d(""),Wt(0)},Yt=(e,t)=>{console.log("newValue1",t),Qe(t)},Lt=(e,t)=>{console.log("newValue2",t),et(t)},[_t,Et]=(0,s.useState)(null),[Kt,Tt]=(0,s.useState)(null),Dt=e=>{Et((t=>t===e?null:e))};(0,s.useEffect)((()=>{console.log("selectedCustomer",lt)}),[lt]),(0,s.useEffect)((()=>{Et(-1),Tt(-1)}),[Ge]);const Ot=(e,t,i)=>{(0,h.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:i})};const Ht={current:null},[Bt,Ft]=(0,s.useState)(""),[qt,Nt]=(0,s.useState)([]),Vt=(0,s.useRef)(!1);"undefined"===typeof window||Vt.current||(document.querySelector("#google-maps")||function(e,t,i){if(!t)return;const n=document.createElement("script");n.setAttribute("async",""),n.setAttribute("id",i),n.src=e,t.appendChild(n)}("https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8","&libraries=places"),document.querySelector("head"),"google-maps"),Vt.current=!0);const Xt=(0,s.useMemo)((()=>(0,j.A)(((e,t)=>{Ht.current.getPlacePredictions(e,t)}),400)),[]);(0,s.useEffect)((()=>{let e=!0;if(!Ht.current&&window.google&&(Ht.current=new window.google.maps.places.AutocompleteService),Ht.current){if(""!==Bt)return Xt({input:Bt},(t=>{if(e){let e=[];Xe&&(e=[Xe]),t&&(e=[...e,...t]),Nt(e)}})),()=>{e=!1};Nt(Xe?[Xe]:[])}}),[Xe,Bt,Xt]),p.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,s.useEffect)((()=>{try{console.log("selected address =>",jt),p.A.fromAddress(jt).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:i}=e.results[0].geometry.location;if(wt({lat:t,lng:i}),kt((0,n.A)((0,n.A)({},Ct),{},{latitude:t.toString(),longitude:i.toString()})),e.results[0].address_components){let t,i,s,o,r=e.results[0];for(let e=0;e{console.log(e)}))}catch(e){console.log(e)}}),[jt]),(0,s.useEffect)((()=>{lt&&wt({lat:lt.latitude,lng:lt.longitude})}),[lt]),(0,s.useEffect)((()=>{const e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t.current.focus()),"Escape"===e.key&&document.activeElement===t.current&&t.current.blur()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[]);const{data:Jt,isLoading:Gt,refetch:Ut}=(0,ue.I)({queryKey:["tenantList",Be,u,ot,zt,ze],queryFn:Ae.ry}),{data:Zt=[],isLoading:Qt,refetch:$t}=(0,ue.I)({queryKey:["gettenantsummary",Be,ot],queryFn:Ae.bd}),ei=async()=>{await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/getpricinglist/?tenantid=").concat(tt)).then((e=>{console.log("getpricinglist",e),e.data.status&&st(e.data.details)})).catch((e=>{console.log(e)}))};(0,s.useEffect)((()=>{tt&&ei()}),[tt]);(0,s.useEffect)((()=>{tt&&(async e=>{try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e));console.log("tenantPricing",t.data.details),setTenanatPricing(t.data.details)}catch(t){console.log("fetchTenanatPricing",t)}})(tt)}),[tt]);const ti=async e=>{let t;He(!0),t=-1==e?{tenantid:tt,approved:1}:{tenantid:e,status:"active"===ot?"InActive":"Active"},await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),t).then((e=>{e.data.status&&(Ot(0==Ge?"Inactivated Successfully":1==Ge?"Approved Successfully":"Activate Successfully","success",2e3),Ut(),$t(),He(!1))})).catch((e=>{console.log(e),Ot(e.message,"error",1500),He(!1)}))},ii=async e=>{console.log("id",e);try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapppricing/?applocationid=").concat(e));console.log("appPricingRes",t.data.details),ht(t.data.details)}catch(t){console.log("appPricingRes",t)}},ni=async()=>{He(!0),await r.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/createpricing"),{tenantpricingid:0,applocationid:Be,pricingid:pt.pricingid,tenantid:tt,pricingdate:x()().format("YYYY-MM-DD HH:mm:ss"),configid:pt.configid,pricingtypeid:pt.pricingtypeid,slab:pt.slab,baseprice:+pt.baseprice,priceperkm:+pt.priceperkm,minkm:+pt.minkm,maxkm:+pt.maxkm,orders:+pt.minorder,othercharges:0}).then((e=>{e.data.status&&((0,h.M8)("Price Created Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Mt(),gt({}),ti(-1),ei())})).catch((e=>{console.log(e)}))},si=Re[null===(e=Ye[Ge])||void 0===e?void 0:e.status]||Re.active;return(0,me.jsxs)(me.Fragment,{children:[(Gt||Qt||Oe)&&(0,me.jsx)(a.A,{}),(0,me.jsx)(pe.A,{title:"Tenants",subtitle:"Live \xb7 ".concat(qe||"All Zones"),live:!0,action:(0,me.jsx)(xe.A,{locations:Ve,locaName:qe,setAppId:Fe,setLocoName:Ne,setPage:Wt,pill:!0,accentColor:"#662582",icon:(0,me.jsx)(ae.HPi,{size:14}),placeholder:"Select Zone",paperComponent:_e,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,me.jsx)(v.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Le.map(((e,t)=>{var i;const n=e.icon,s=null!==(i=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==i?i:0;return(0,me.jsx)(v.Ay,{item:!0,xs:12,sm:4,children:(0,me.jsx)(y.A,{onClick:()=>{t>=0&&Rt(0,t)},sx:{cursor:"pointer",height:"100%"},children:(0,me.jsx)(ge.A,{title:e.label,value:null!==s&&void 0!==s?s:0,icon:(0,me.jsx)(n,{size:20}),color:0===t?"#662582":e.color,loading:Qt})})},e.key)}))}),(0,me.jsx)(m.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:fe/8,borderTopRightRadius:fe/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:we,borderBottom:0,background:"#fff"},children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,me.jsx)(S.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:we,borderRadius:4}},children:Ye.map(((e,t)=>{var i;const n=Re[e.status],s=n.icon,o=Ge===t,r=null!==(i=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==i?i:0;return(0,me.jsxs)(y.A,{onClick:()=>{rt(e.status),Rt(0,t)},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:"10px",border:"1px solid ".concat(o?n.color:"#e2e8f0"),bgcolor:o?n.color:"#fff",color:o?"#fff":"#64748b",fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?n.color:"#cbd5e1",bgcolor:o?n.color:"#f8fafc"}},children:[(0,me.jsx)(f.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:o?"rgba(255,255,255,0.22)":Ie(n.color),color:o?"#fff":n.color},children:(0,me.jsx)(s,{size:13})}),(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:n.label}),(0,me.jsx)(y.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":"#f8fafc",color:o?"#fff":"#64748b",border:"none"},children:Qt?(0,me.jsx)(C.A,{variant:"text",width:14,height:10}):r})]},e.status)}))}),(0,me.jsx)(y.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,me.jsx)(he.A,{value:i,onChange:d,onDebouncedChange:be,sx:{m:0,width:"100%",borderRadius:999,bgcolor:We("#662582"),"& fieldset":{borderColor:Me("#662582"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Pe("#662582"))}}})})]})}),(0,me.jsxs)(m.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:fe/8,borderBottomRightRadius:fe/8,border:"1px solid",borderColor:we,overflow:"hidden",background:"#fff"},children:[(0,me.jsx)(k.A,{sx:{display:{xs:"none",md:"block"},maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:"10px",height:"10px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Me("#662582"),borderRadius:"8px","&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:ke}},children:(0,me.jsxs)(z.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{sx:{"& th":{backgroundColor:ke,color:ye,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(we),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Status"}),(0,me.jsx)(P.A,{children:"Client"}),(0,me.jsx)(P.A,{children:"Contact"}),(0,me.jsx)(P.A,{children:"Address"}),(0,me.jsx)(P.A,{align:"right",children:"Actions"})]})}),(0,me.jsxs)(M.A,{children:[Gt&&(0,me.jsx)(je.r,{}),0!=(null===Jt||void 0===Jt?void 0:Jt.length)||Oe?null===Jt||void 0===Jt?void 0:Jt.map(((e,t)=>{var i;const l=Re[0===Ge?"active":1===Ge?"pending":"inactive"],a=l.icon;return(0,me.jsxs)(s.Fragment,{children:[(0,me.jsxs)(I.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Ce),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:ke}},children:[(0,me.jsx)(P.A,{children:(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:Se},children:String(t+1+zt*ze).padStart(2,"0")})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:We(l.color),border:"1px solid ".concat(Me(l.color)),color:l.color},children:[(0,me.jsx)(Ee,{color:l.color,size:20,children:(0,me.jsx)(a,{size:12})}),(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:l.label})]})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,me.jsx)(Ee,{color:"#662582",size:32,children:(0,me.jsx)(ae.Azs,{size:16})}),(0,me.jsxs)(S.A,{children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:ve,whiteSpace:"nowrap"},children:e.tenantname}),(0,me.jsxs)(w.A,{variant:"caption",sx:{color:ye},children:["ID #",e.tenantid]})]})]})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:ve,whiteSpace:"nowrap"},children:e.primarycontact||"\u2014"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye},children:e.primaryemail||"\u2014"})]})}),(0,me.jsx)(P.A,{sx:{maxWidth:280},children:(0,me.jsx)(R.A,{title:e.address||"",placement:"top",children:(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,me.jsx)(P.A,{align:"right",children:(0,me.jsxs)(S.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[0==Ge&&(0,me.jsx)(R.A,{title:"Inactivate",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Me("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(Z.A,{style:{fontSize:14}})})}),1==Ge&&(0,me.jsx)(R.A,{title:"Approve",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Me("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{at(e),dt(!0),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid)},children:(0,me.jsx)(Q.A,{style:{fontSize:14}})})}),2==Ge&&(0,me.jsx)(R.A,{title:"Activate",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#10b981"),color:"#10b981",border:"1px solid ".concat(Me("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(se.yjt,{style:{fontSize:14}})})}),(0,me.jsx)(R.A,{title:_t===t?"Hide details":"View details",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:_t===t?"#662582":Ie("#662582"),color:_t===t?"#fff":"#662582",border:"1px solid ".concat(Me("#662582")),"&:hover":{bgcolor:"#662582",color:"#fff"}},onClick:()=>{at(e),Dt(t),Tt(-1),it(e.tenantid)},children:_t===t?(0,me.jsx)($.A,{style:{fontSize:14}}):(0,me.jsx)(ee.A,{style:{fontSize:14}})})}),1!==Ge&&(0,me.jsx)(R.A,{title:Kt===t?"Close":"Edit",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Kt===t?"#8b5cf6":Ie("#8b5cf6"),color:Kt===t?"#fff":"#8b5cf6",border:"1px solid ".concat(Me("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{var i;at(e),i=t,Tt((e=>e===i?null:i)),Et(-1),it(e.tenantid),Fe(e.applocationid)},children:Kt===t?(0,me.jsx)(te.A,{style:{fontSize:14}}):(0,me.jsx)(ie.A,{style:{fontSize:14}})})})]})})]}),_t===t&&(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{sx:{"&:hover":{backgroundColor:"white !important"}},colSpan:15,children:(0,me.jsx)(L.A,{in:open,timeout:800,easing:"ease-in-out",mountOnEnter:!0,unmountOnExit:!1,sx:{"& .MuiCollapse-wrapperInner":{transition:"transform 800ms ease, opacity 800ms ease"}},children:(0,me.jsxs)(o.A,{content:!1,sx:{transform:open?"translateY(0)":"translateY(-8px)",opacity:open?1:0},title:(0,me.jsxs)(_.A,{sx:{bgcolor:"primary.lighter"},value:Ze,onChange:Yt,"aria-label":"basic tabs example",children:[(0,me.jsx)(E.A,{label:" Details",icon:(0,me.jsx)(oe.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),(0,me.jsx)(E.A,{label:"Pricing",icon:(0,me.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}})]}),children:[0==Ze&&(0,me.jsxs)(v.Ay,{container:!0,sx:{m:1},spacing:2.5,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.tenantname}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Tenant"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.firstname}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Contact Person"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.primarycontact}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Phone"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.primaryemail}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"E-Mail"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(se.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.address}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Address"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.city}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"City"})]}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",variant:"subtitle1",children:e.postcode}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"PostCode"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.latitude}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Latitude"})]}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",variant:"subtitle1",children:e.longitude}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Longitude"})]})]})})]}),1==Ze&&(0,me.jsx)(K.A,{variant:"outlined",sx:{},children:(0,me.jsx)(k.A,{children:(0,me.jsxs)(z.A,{children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Date"}),(0,me.jsx)(P.A,{children:"Slab"}),(0,me.jsx)(P.A,{children:"Base Price"}),(0,me.jsx)(P.A,{children:"Min Kms"}),(0,me.jsx)(P.A,{children:"Price/Km"}),(0,me.jsx)(P.A,{children:"Other Charges"})]})}),(0,me.jsx)(M.A,{children:0===(null===nt||void 0===nt?void 0:nt.length)?(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:7,align:"center",children:(0,me.jsx)(c.A,{description:"No Pricing List"})})}):nt.map(((e,t)=>(0,me.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,me.jsx)(P.A,{children:t+1}),(0,me.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,me.jsx)(P.A,{children:e.slab}),(0,me.jsx)(P.A,{children:e.baseprice}),(0,me.jsx)(P.A,{children:e.minkm}),(0,me.jsx)(P.A,{children:e.priceperkm}),(0,me.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})}),Kt===t&&(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{sx:{backgroundColor:"white!important","&:hover":{backgroundColor:"white!important"}},colSpan:15,children:(0,me.jsxs)(o.A,{content:!1,title:(0,me.jsxs)(y.A,{sx:{bgcolor:"primary.lighter",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,me.jsxs)(_.A,{value:$e,onChange:Lt,"aria-label":"basic tabs example",children:[(0,me.jsx)(E.A,{label:"Edit Details",icon:(0,me.jsx)(oe.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),1!==Ge&&(0,me.jsx)(E.A,{label:"Edit Pricing",icon:(0,me.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"},onClick:()=>{ii(lt.applolcationid)}})]}),1==$e&&(0,me.jsx)(T.A,{variant:"contained",color:"error",size:"smaller",startIcon:(0,me.jsx)(ie.A,{size:"small"}),sx:{mr:1.8,height:"30px"},onClick:()=>{dt(!0)},children:"Add Pricing"})]}),children:[0==$e&&(0,me.jsx)(K.A,{variant:"outlined",sx:{m:2},children:(0,me.jsx)(v.Ay,{container:!0,spacing:0,children:(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(K.A,{variant:"outlined",children:[(0,me.jsx)(D.A,{children:(0,me.jsxs)(v.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(de.PY8,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Tenant Name",defaultValue:lt.tenantname,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{tenantname:e.target.value}))},sx:{mt:2}})})]})})," ",(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Contact Person",defaultValue:e.firstname,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{firstname:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{inputProps:{maxLength:10},fullWidth:!0,id:"outlined-basic",label:"Contact Number",defaultValue:lt.primarycontact,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{primarycontact:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"E-Mail",defaultValue:lt.primaryemail,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{primaryemail:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(se.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(H.A,{id:"google-map-demo",sx:{},fullWidth:!0,label:"Address",getOptionLabel:e=>"string"===typeof e?e:e.description,filterOptions:e=>e,options:qt,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,defaultValue:lt.address,noOptionsText:"No locations",onChange:(e,t)=>{Nt(t?[t,...qt]:qt),Je(t||""),console.log("newValue",t),mt((null===t||void 0===t?void 0:t.description)||""),kt((0,n.A)((0,n.A)({},Ct),{},{address:(null===t||void 0===t?void 0:t.description)||""}))},onInputChange:(e,t)=>{Ft(t)},renderInput:e=>(0,me.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{fullWidth:!0,label:"Address",variant:"outlined"})),renderOption:(e,t)=>{const i=t.structured_formatting.main_text_matched_substrings||[],s=A()(t.structured_formatting.main_text,i.map((e=>[e.offset,e.offset+e.length])));return(0,me.jsx)("li",(0,n.A)((0,n.A)({},e),{},{children:(0,me.jsxs)(v.Ay,{container:!0,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,me.jsx)(g.A,{sx:{color:"text.secondary"}})}),(0,me.jsxs)(v.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[s.map(((e,t)=>(0,me.jsx)(y.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,me.jsx)(w.A,{variant:"body2",color:"text.secondary",children:t.structured_formatting.secondary_text})]})]})}))}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,required:!0,id:"outlined-required",label:"City",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{city:e.target.value}))},value:""==ft?lt.city:ft})}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,required:!0,label:" PostCode",id:"outlined-required",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{postcode:e.target.value}))},value:""==vt?lt.postcode:vt})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{variant:"outlined",readonly:!0,label:"Latitude",fullWidth:!0,value:St.lat,sx:{cursor:"not-allowed"}})}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{label:"Longitude",readonly:!0,variant:"outlined",fullWidth:!0,value:St.lng})})]})})]})}),(0,me.jsx)(B.A,{sx:{display:"flex",justifyContent:"end",mr:3,mb:2},children:(0,me.jsx)(T.A,{variant:"contained",size:"medium",onClick:()=>{(async()=>{try{const e=(0,n.A)((0,n.A)({},Ct),{},{tenantid:tt});console.log("updateClient",e);const t=await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),e);console.log("updateClient",t.data.message),t.data.status&&Ot(t.data.message,"success",1500),Ut(),$t()}catch(e){console.log("updateClient",e)}})()},children:"Update Client"})})]})})})},"left - card"),1==$e&&(0,me.jsx)(K.A,{variant:"outlined",sx:{},children:(0,me.jsx)(k.A,{children:(0,me.jsxs)(z.A,{children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Date"}),(0,me.jsx)(P.A,{children:"Slab"}),(0,me.jsx)(P.A,{children:"Base Price"}),(0,me.jsx)(P.A,{children:"Min Kms"}),(0,me.jsx)(P.A,{children:"Price/Km"}),(0,me.jsx)(P.A,{children:"Other Charges"})]})}),(0,me.jsx)(M.A,{children:0===(null===nt||void 0===nt?void 0:nt.length)?(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:7,align:"center",children:(0,me.jsx)(c.A,{})})}):nt.map(((e,t)=>(0,me.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,me.jsx)(P.A,{children:t+1}),(0,me.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,me.jsx)(P.A,{children:e.slab}),(0,me.jsx)(P.A,{children:e.baseprice}),(0,me.jsx)(P.A,{children:e.minkm}),(0,me.jsx)(P.A,{children:e.priceperkm}),(0,me.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:6,sx:{py:6},children:(0,me.jsxs)(S.A,{alignItems:"center",spacing:1.5,children:[(0,me.jsx)(f.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:Se},children:(0,me.jsx)(ae.Itr,{size:28})}),(0,me.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:ve},children:"No tenants to show"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye},children:"No ".concat(si.label.toLowerCase()," tenants for this filter.")})]})})})]})]})}),De&&(0,me.jsxs)(U.nV,{scroll:!0,sx:{display:{xs:"flex",md:"none"}},children:[Gt&&(0,me.jsxs)(S.A,{alignItems:"center",sx:{py:4},children:[(0,me.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave"}),(0,me.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave",sx:{mt:1.25}})]}),0!=(null===Jt||void 0===Jt?void 0:Jt.length)||Oe?null===Jt||void 0===Jt?void 0:Jt.map(((e,t)=>{var i;const n=Re[0===Ge?"active":1===Ge?"pending":"inactive"],s=n.icon,o=_t===t;return(0,me.jsxs)(U.pg,{accent:n.color,header:(0,me.jsxs)(S.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,me.jsx)(Ee,{color:"#662582",size:36,children:(0,me.jsx)(ae.Azs,{size:18})}),(0,me.jsxs)(S.A,{sx:{minWidth:0},children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:800,color:ve},noWrap:!0,children:e.tenantname}),(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",mt:.25,pl:.25,pr:.875,py:.125,borderRadius:999,bgcolor:We(n.color),border:"1px solid ".concat(Me(n.color)),color:n.color,alignSelf:"flex-start"},children:[(0,me.jsx)(Ee,{color:n.color,size:16,children:(0,me.jsx)(s,{size:10})}),(0,me.jsx)(w.A,{sx:{fontWeight:800,fontSize:10,lineHeight:1},children:n.label})]})]})]}),(0,me.jsxs)(S.A,{direction:"row",spacing:.5,sx:{flexShrink:0},children:[0==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Me("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(Z.A,{style:{fontSize:14}})}),1==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Me("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{at(e),dt(!0),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid)},children:(0,me.jsx)(Q.A,{style:{fontSize:14}})}),2==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#10b981"),color:"#10b981",border:"1px solid ".concat(Me("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(se.yjt,{style:{fontSize:14}})}),(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:o?"#662582":Ie("#662582"),color:o?"#fff":"#662582",border:"1px solid ".concat(Me("#662582")),"&:hover":{bgcolor:"#662582",color:"#fff"}},onClick:()=>{at(e),Dt(t),Tt(-1),it(e.tenantid)},children:o?(0,me.jsx)($.A,{style:{fontSize:14}}):(0,me.jsx)(ee.A,{style:{fontSize:14}})}),1!==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(Me("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid),dt(!0)},children:(0,me.jsx)(ie.A,{style:{fontSize:14}})})]})]}),children:[(0,me.jsxs)(U.FG,{children:[(0,me.jsx)(U.pY,{label:"Tenant ID",value:"#".concat(e.tenantid)}),(0,me.jsx)(U.pY,{label:"Contact",value:e.primarycontact||"\u2014"}),(0,me.jsx)(U.pY,{label:"Email",value:e.primaryemail||"\u2014",full:!0}),(0,me.jsx)(U.pY,{label:"Address",full:!0,children:(0,me.jsx)(w.A,{sx:{fontSize:13,fontWeight:600,color:ve},children:e.address||"\u2014"})})]}),o&&(0,me.jsx)(y.A,{sx:{mt:1.25,pt:1.25,borderTop:"1px solid ".concat(Ce)},children:(0,me.jsxs)(U.FG,{children:[(0,me.jsx)(U.pY,{label:"Contact Person",value:e.firstname||"\u2014"}),(0,me.jsx)(U.pY,{label:"City",value:e.city||"\u2014"}),(0,me.jsx)(U.pY,{label:"Postcode",value:e.postcode||"\u2014"}),(0,me.jsx)(U.pY,{label:"Latitude",value:e.latitude||"\u2014"}),(0,me.jsx)(U.pY,{label:"Longitude",value:e.longitude||"\u2014"})]})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,me.jsxs)(S.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,me.jsx)(f.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:Se},children:(0,me.jsx)(ae.Itr,{size:28})}),(0,me.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:ve},children:"No tenants to show"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye,textAlign:"center"},children:"No ".concat(si.label.toLowerCase()," tenants for this filter.")})]})]}),!i&&(null===Jt||void 0===Jt?void 0:Jt.length)>0&&(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(F.A,{sx:{borderColor:we}}),(0,me.jsx)(q.A,{rowsPerPageOptions:[5,10,25,50,100],component:"div",count:0==Ge?null===Zt||void 0===Zt?void 0:Zt.active:1==Ge?null===Zt||void 0===Zt?void 0:Zt.pending:2==Ge?null===Zt||void 0===Zt?void 0:Zt.inactive:0,rowsPerPage:ze,page:zt,onPageChange:(e,t)=>{Wt(t)},onRowsPerPageChange:e=>{Ke(parseInt(e.target.value,10)),Wt(0)}})]})]}),(0,me.jsxs)(N.A,{fullWidth:!0,fullScreen:De,open:ct,onClose:Mt,scroll:"paper",maxWidth:"sm",TransitionComponent:ne.s,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,me.jsx)(V.A,{sx:{bgcolor:"#662582",color:"#fff",fontSize:"20px"},children:"Client Pricing - (".concat(lt.tenantname,")")}),(0,me.jsx)(X.A,{dividers:!0,children:(0,me.jsx)(o.A,{sx:{height:"100%"},children:(0,me.jsxs)(v.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Select Slab"}),(0,me.jsx)(H.A,{disablePortal:!0,id:"combo-box-demo",options:xt,getOptionLabel:e=>"".concat(e.slab),fullWidth:!0,selectOnFocus:!0,renderInput:e=>(0,me.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{label:"Slab"})),onChange:(e,t,i)=>{gt(t),console.log("pricing",t),At(!1),"clear"===i&&At(!0)}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Base Price"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.baseprice,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{baseprice:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Price/Km"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.priceperkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{priceperkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Min Kms"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.minkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{minkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Max Kms"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.maxkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{maxkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Min Orders"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.minorder,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{minorder:e.target.value}))}})]})]})})}),(0,me.jsx)(G.A,{children:(0,me.jsx)(v.Ay,{container:!0,children:(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(S.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[1==$e&&(0,me.jsx)(T.A,{disabled:ut,variant:"contained",onClick:()=>{ni()},children:"Update Pricing"}),1==Ge&&(0,me.jsx)(T.A,{disabled:ut,variant:"contained",onClick:()=>{ni()},children:"Save"}),(0,me.jsx)(T.A,{variant:"contained",onClick:()=>{At(!0),setTimeout((()=>{Mt()}),100),gt({})},color:"error",children:"Cancel"})]})})})})]})]})}},96646:(e,t,i)=>{i.d(t,{r:()=>a});var n=i(9213),s=i(21671),o=i(82917),r=i(93230),l=i(44414);const a=e=>{let{rowsPerPage:t=5,col:i=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"text",width:30})}),Array.from({length:i}).map(((e,t)=>(0,l.jsx)(s.A,{children:(0,l.jsxs)(r.A,{spacing:.5,children:[(0,l.jsx)(o.A,{variant:"text",width:100}),(0,l.jsx)(o.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"text",width:150})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(s.A,{align:"center",children:(0,l.jsxs)(r.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(o.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(o.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/181.03ad68d3.chunk.js b/build/static/js/181.1ef0e862.chunk.js similarity index 99% rename from build/static/js/181.03ad68d3.chunk.js rename to build/static/js/181.1ef0e862.chunk.js index 2504e74..a4e0985 100644 --- a/build/static/js/181.03ad68d3.chunk.js +++ b/build/static/js/181.1ef0e862.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[181],{10181:(e,t,r)=>{r.r(t),r.d(t,{default:()=>le});var o=r(89379),n=r(9950),i=r(26910),l=r(36150),s=r(2235),a=r(41413),c=r(83274),d=r(16491),x=r(82053),h=r(14857),u=r(47223),p=r(60899),m=r(93230),A=r(25333),f=r(33738),g=r(74745),j=r(1320),b=r(15769),v=r(69780),S=r(9213),w=r(21671),y=r(34075),k=r(25277),C=r(96583),z=r(28170),D=r(31222),P=r(4159),R=r.n(P),I=r(81425),_=r(52351),M=r(35678),T=r(59212),E=r(56311),W=r(27001),N=r(36803),L=r(96646),Y=r(10523),F=r(46639),O=r(44414);const K={width:"100%",height:"100%"};function B(e){let{details:t,loading:r,riderName:o,dateRange:i,onClose:l}=e;const s=(0,n.useRef)(null),[a,c]=(0,n.useState)(null),[h,u]=(0,n.useState)([]),[p,f]=(0,n.useState)(!1),{isLoaded:g}=(0,Y.KD)({googleMapsApiKey:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_STAFF_TOKEN:"",REACT_APP_URL:"https://jupiter.nearle.app/live/api/v1",REACT_APP_URL2:"https://jupiter.nearle.app/live/api/v2",REACT_APP_URL3:"https://jupiter.nearle.app/live/api/v3",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_GOOGLE_MAPS_KEY}),j=(0,n.useMemo)((()=>(t||[]).map((e=>({lat:e.dropLat,lng:e.dropLng})))),[t]);(0,n.useEffect)((()=>{if(!g||!s.current||0===j.length)return;const e=new window.google.maps.LatLngBounds;j.forEach((t=>e.extend(t))),s.current.fitBounds(e,48)}),[g,j]),(0,n.useEffect)((()=>{if(!g||j.length<2)return void u([]);let e=!1;const t=new window.google.maps.DirectionsService,r=(e,r,o)=>new Promise(((n,i)=>{t.route({origin:e,destination:r,waypoints:o.map((e=>({location:e,stopover:!0}))),travelMode:window.google.maps.TravelMode.DRIVING},((e,t)=>{"OK"===t?n(e):i(new Error(t))}))}));return(async()=>{f(!0);try{const t=j,o=[];let n=0;for(;n({lat:e.lat(),lng:e.lng()})));o.length>0&&c.length>0&&c.shift(),o.push(...c),n+=i}e||u(o)}catch(t){e||u([])}finally{e||f(!1)}})(),()=>{e=!0}}),[g,j]);const b=(e,t)=>{const r=t?38:32,o=t?"#4D1C61":"#662582",n=encodeURIComponent('')+'')+''.concat(e,"")+"");return"data:image/svg+xml;charset=UTF-8,".concat(n)},v=(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.5,sx:{px:2,py:1.25,borderBottom:"1px solid rgba(15, 23, 42, 0.08)",background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"#fff",flexShrink:0},children:[(0,O.jsx)(D.pk7,{size:20}),(0,O.jsxs)(m.A,{sx:{flex:1,minWidth:0},children:[(0,O.jsxs)(x.A,{sx:{fontWeight:700,fontSize:15,lineHeight:1.2},children:["Planned route",o?" \u2014 ".concat(o):""]}),i&&(0,O.jsx)(x.A,{sx:{fontSize:12,opacity:.85},children:i})]}),t&&t.length>0&&(0,O.jsxs)(x.A,{sx:{fontSize:12,opacity:.9,fontWeight:600},children:[t.length," ",1===t.length?"stop":"stops",p?" \xb7 resolving route\u2026":""]}),l&&(0,O.jsx)(A.A,{size:"small",onClick:l,sx:{color:"#fff"},"aria-label":"Close",children:(0,O.jsx)(D.m6K,{})})]});return r||!g?(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsxs)(m.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1.5},children:[(0,O.jsx)(F.A,{size:32}),(0,O.jsx)(x.A,{sx:{color:"#64748b",fontSize:13},children:r?"Loading planned route\u2026":"Loading map\u2026"})]})]}):t&&0!==t.length?(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsx)(d.A,{sx:{flex:1,minHeight:0},children:(0,O.jsxs)(Y.u6,{mapContainerStyle:K,onLoad:e=>s.current=e,center:j[0],zoom:14,options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},children:[h.length>0?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Y.Ro,{path:h,options:{strokeColor:"#662582",strokeOpacity:.25,strokeWeight:8}}),(0,O.jsx)(Y.Ro,{path:h,options:{strokeColor:"#662582",strokeOpacity:.95,strokeWeight:4}})]}):(0,O.jsx)(Y.Ro,{path:j,options:{strokeColor:"#662582",strokeOpacity:0,strokeWeight:0,icons:[{icon:{path:"M 0,-1 0,1",strokeOpacity:.6,strokeColor:"#662582",scale:3},offset:"0",repeat:"14px"}]}}),t.map(((e,t)=>{const r=e.step||t+1,o=a===e.deliveryid;return(0,O.jsx)(Y.pH,{position:{lat:e.dropLat,lng:e.dropLng},icon:{url:b(r,o)},onClick:()=>c(o?null:e.deliveryid),zIndex:o?1e3:r,children:o&&(0,O.jsx)(Y.Fu,{onCloseClick:()=>c(null),children:(0,O.jsxs)(d.A,{sx:{minWidth:180,fontFamily:"inherit"},children:[(0,O.jsxs)(x.A,{sx:{fontWeight:800,fontSize:13,color:"#0f172a"},children:["Step ",r," \xb7 ",e.customer]}),e.address&&(0,O.jsx)(x.A,{sx:{fontSize:12,color:"#475569",mt:.5},children:e.address}),e.expectedTime&&(0,O.jsxs)(x.A,{sx:{fontSize:12,color:"#64748b",mt:.5},children:["ETA ",String(e.expectedTime).slice(11,16)||e.expectedTime]}),e.orderid&&(0,O.jsxs)(x.A,{sx:{fontSize:11,color:"#94a3b8",mt:.5},children:["Order #",e.orderid]})]})})},"step-".concat(e.deliveryid||e.orderid||t))}))]})})]}):(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsxs)(m.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1,p:3},children:[(0,O.jsx)(x.A,{sx:{color:"#1e293b",fontWeight:700,fontSize:16},children:"No planned route for this rider"}),(0,O.jsx)(x.A,{sx:{color:"#64748b",fontSize:13,textAlign:"center",maxWidth:360},children:"There are no deliveries with drop coordinates assigned to this rider for the selected date range."})]})]})}var H=r(20466),U=r(23787),G=r(36220);R().extend(G);const V={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},X=(e,t)=>"".concat(e).concat(t),$=e=>X(e,"08"),q=e=>X(e,"18"),Z=e=>X(e,"26"),Q=e=>X(e,"55"),J="#662582",ee="#9255AB",te=e=>(0,O.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:V.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),re=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,O.jsx)(a.A,{sx:{width:o,height:o,bgcolor:r?t:q(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},oe=e=>{let{color:t,icon:r,label:o,tooltip:n,minWidth:i=80}=e;return(0,O.jsx)(c.A,{title:n||"",placement:"top",children:(0,O.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(Q(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},ne=e=>{let{value:t,color:r="#ef4444",icon:o}=e;const n=Number(t)||0;return 0===n?(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:700},children:"0"}):(0,O.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(Q(r)),color:r,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[o,n]})};function ie(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function le(){const e=(0,h.A)(),t=(0,u.A)(e.breakpoints.down("md")),[r,o]=(0,n.useState)(R()().format("YYYY-MM-DD")),[P,Y]=(0,n.useState)(R()().format("YYYY-MM-DD")),[F,K]=(0,n.useState)("All"),[G,X]=(0,n.useState)(!1),[le,se]=(0,n.useState)("Today"),[ae,ce]=(0,n.useState)([]),[de,xe]=(0,n.useState)(null),[he,ue]=(0,n.useState)(0),[pe,me]=(0,n.useState)(!1),[Ae,fe]=(0,n.useState)(!1),[ge,je]=(0,n.useState)(null),[be,ve]=(0,n.useState)(null),[Se,we]=(0,n.useState)(!1),[ye,ke]=(0,n.useState)(""),[Ce,ze]=(0,n.useState)(""),{isLoading:De,data:Pe}=(0,l.I)({queryKey:["ridersummary",he,r,P],queryFn:I.KN}),Re=(0,n.useMemo)((()=>{if(!Pe)return[];if(!Ce)return Pe;const e=Ce.toLowerCase().trim();return Pe.filter((t=>["".concat(t.firstname||""," ").concat(t.lastname||""),String(t.userid)].filter(Boolean).some((t=>String(t).toLowerCase().includes(e)))))}),[Pe,Ce]),Ie=(0,n.useMemo)((()=>Pe&&0!==Pe.length?Pe.reduce(((e,t)=>(e.riders+=1,e.orders+=Number(t.totalorders)||0,e.delivered+=Number(t.delivered)||0,e.amount+=Math.max(Number(t.charges)||0,Number(t.deliveryamt)||0),e)),{riders:0,orders:0,delivered:0,amount:0}):{riders:0,orders:0,delivered:0,amount:0}),[Pe]),_e=async e=>{me(!0);try{const t=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportsummary/?&fromdate=").concat(r,"&todate=").concat(P,"&userid=").concat(e));ce(t.data.details)}catch(t){console.log("tenantRes",t)}finally{me(!1)}},Me=async e=>{we(!0);try{var t;const o="undefined"!==typeof window&&localStorage.getItem("userid")||0,n=0===he?"appuserid=".concat(o):"applocationid=".concat(he),l="".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/")+"?".concat(n)+"&status=all"+"&fromdate=".concat(r)+"&todate=".concat(P)+"&pageno=1&pagesize=200&keyword=&tenantid=&locationid="+"&userid=".concat(e),s=await i.A.get(l),a=(null===s||void 0===s||null===(t=s.data)||void 0===t?void 0:t.details)||[],c=e=>{const t=Number(e);return Number.isFinite(t)?t:null},d=a.map((e=>{var t,r,o,n,i;const l=c(null!==(t=e.droplat)&&void 0!==t?t:e.deliverylat),s=c(null!==(r=e.droplon)&&void 0!==r?r:e.deliverylong),a=c(null!==(o=e.pickuplat)&&void 0!==o?o:e.pickuplatitude),d=c(null!==(n=null!==(i=e.pickuplon)&&void 0!==i?i:e.pickuplong)&&void 0!==n?n:e.picklongitude);return null==l||null==s?null:{step:Number(e.step)||0,orderid:e.orderid,deliveryid:e.deliveryid,customer:e.deliverycustomer||e.customername||"Order ".concat(e.orderid),address:e.deliveryaddress||e.deliverysuburb||"",dropLat:l,dropLng:s,pickLat:null!==a&&void 0!==a?a:null,pickLng:null!==d&&void 0!==d?d:null,expectedTime:e.expecteddeliverytime||null}})).filter(Boolean).sort(((e,t)=>e.step-t.step));je(d)}catch(o){(0,H.k)(null===o||void 0===o?void 0:o.message,"error",2e3),je([])}finally{we(!1)}},Te=(0,n.useMemo)((()=>Pe?Pe.reduce(((e,t)=>e+(Number(t.deliveryamt)||0)),0):0),[Pe]),Ee=[{key:"riders",label:"Active Riders",color:J,icon:D.bsz,value:Ie.riders},{key:"orders",label:"Total Orders",color:"#0ea5e9",icon:D.HU2,value:Ie.orders},{key:"delivered",label:"Delivered",color:"#10b981",icon:D.cAP,value:Ie.delivered},{key:"amount",label:"Total Amount",color:"#f59e0b",icon:D.S75,value:ie(Te)}];return(0,O.jsxs)(O.Fragment,{children:[(De||pe)&&(0,O.jsx)(_.A,{}),(0,O.jsx)(W.A,{title:"Riders Summary",subtitle:"Live \xb7 ".concat(F||"All Zones"," \xb7 ").concat(le),live:!0,action:(0,O.jsx)(T.A,{locaName:F,setAppId:ue,setLocoName:K,pill:!0,accentColor:J,icon:(0,O.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,O.jsx)(p.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ee.map((e=>{var t;const r=e.icon;return(0,O.jsx)(p.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,O.jsx)(N.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,O.jsx)(r,{size:20}),color:e.color,loading:De})},e.key)}))}),(0,O.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:V.radiusCard/8,borderTopRightRadius:V.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:V.borderSubtle,borderBottom:0,background:"#fff"},children:(0,O.jsxs)(m.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,O.jsx)(re,{color:J,size:32,children:(0,O.jsx)(D.bsz,{size:18})}),(0,O.jsxs)(m.A,{children:[(0,O.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:["Orders \xb7 ",le]}),(0,O.jsxs)(x.A,{variant:"body2",sx:{color:V.textPrimary,fontWeight:700},children:[Re.length," riders \xb7 ",Ie.orders," orders"]})]}),(0,O.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,O.jsxs)(d.A,{onClick:()=>X(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:$("#f59e0b"),border:"1.5px solid ".concat(Q("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,ml:1,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(Z("#f59e0b"))}},children:[(0,O.jsx)(D.Ki0,{size:14}),R()(r).format("DD/MM/YY")," \u2013 ",R()(P).format("DD/MM/YY")]})})]}),(0,O.jsx)(d.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,O.jsx)(E.A,{value:ye,onChange:ke,onDebouncedChange:ze,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Z(J))}}})})]})}),(0,O.jsxs)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:V.radiusCard/8,borderBottomRightRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",background:"#fff"},children:[t?(0,O.jsxs)(U.nV,{scroll:!0,children:[De&&(0,O.jsx)(m.A,{alignItems:"center",sx:{py:4},children:(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:700},children:"Loading riders\u2026"})}),Re&&0!==Re.length||De?Re.map(((e,t)=>{const r=de===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),n="".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014";return(0,O.jsxs)(U.pg,{accent:J,selected:r,header:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,O.jsx)(re,{color:J,size:36,children:(0,O.jsx)(D.LTk,{size:18})}),(0,O.jsxs)(m.A,{sx:{minWidth:0},children:[(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary},noWrap:!0,children:n}),(0,O.jsxs)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:["#",String(t+1).padStart(2,"0")," \xb7 ID #",e.userid]})]})]}),(0,O.jsxs)(m.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,O.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{ve({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),je(null),fe(!0),Me(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:q("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(Q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,O.jsx)(D.Cd7,{size:14})})}),(0,O.jsx)(c.A,{title:r?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{const t=!r;xe(t?e.userid:null),t&&_e(e.userid)},sx:{bgcolor:r?J:q(J),color:r?"#fff":J,border:"1px solid ".concat(Q(J)),"&:hover":{bgcolor:J,color:"#fff"}},children:r?(0,O.jsx)(D.Xbk,{size:16}):(0,O.jsx)(D.j1Q,{size:16})})})]})]}),children:[(0,O.jsxs)(U.FG,{columns:2,children:[(0,O.jsx)(U.pY,{label:"Orders",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:11})})}),(0,O.jsx)(U.pY,{label:"Delivered",children:(0,O.jsx)(ne,{value:e.delivered,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:11})})}),(0,O.jsx)(U.pY,{label:"Pending",children:(0,O.jsx)(ne,{value:e.pending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:11})})}),(0,O.jsx)(U.pY,{label:"Cancelled",children:(0,O.jsx)(ne,{value:e.cancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:11})})}),(0,O.jsx)(U.pY,{label:"KMS",children:(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,O.jsx)(U.pY,{label:"Actual KMS",children:(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,O.jsx)(U.pY,{label:"Amount",full:!0,children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:11}),label:ie(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]}),r&&(0,O.jsx)(f.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,O.jsxs)(s.A,{elevation:0,sx:{mt:1.25,borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",boxShadow:V.shadowSoft},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.5,py:1,background:"#ffffff",borderBottom:"1px solid ".concat(V.borderSubtle)},children:[(0,O.jsx)(re,{color:J,size:24,selected:!0,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Tenant Breakdown"})]}),(0,O.jsxs)(m.A,{divider:(0,O.jsx)(g.A,{}),children:[pe&&(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",py:2},children:"Loading\u2026"}),pe||ae&&0!==ae.length?null===ae||void 0===ae?void 0:ae.map(((e,t)=>(0,O.jsxs)(d.A,{sx:{p:1.5},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mb:1},children:[(0,O.jsx)(re,{color:"#0ea5e9",size:24,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary},noWrap:!0,children:e.tenantname||"\u2014"})]}),(0,O.jsxs)(U.FG,{columns:2,children:[(0,O.jsx)(U.pY,{label:"All",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:10})})}),(0,O.jsx)(U.pY,{label:"Completed",children:(0,O.jsx)(ne,{value:e.deliveriescompleted,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:10})})}),(0,O.jsx)(U.pY,{label:"Pending",children:(0,O.jsx)(ne,{value:e.deliveriespending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:10})})}),(0,O.jsx)(U.pY,{label:"Cancelled",children:(0,O.jsx)(ne,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:10})})}),(0,O.jsx)(U.pY,{label:"KMS",children:(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,O.jsx)(U.pY,{label:"Actual KMS",children:(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,O.jsx)(U.pY,{label:"Amount",full:!0,children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:10}),label:ie(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.tenantname,"-").concat(t)))):(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",py:2},children:"No tenant breakdown available."})]})]})})]},e.userid||t)})):(0,O.jsxs)(m.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,O.jsx)(a.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(D.bsz,{size:28})}),(0,O.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No riders to show"}),(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:ye?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})]}):(0,O.jsx)(j.A,{sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:Q(J),borderRadius:8,"&:hover":{backgroundColor:J}},"&::-webkit-scrollbar-track":{backgroundColor:V.surfaceAlt}},children:(0,O.jsxs)(b.A,{stickyHeader:!0,sx:{minWidth:{xs:880,md:1080}},children:[(0,O.jsx)(v.A,{children:(0,O.jsxs)(S.A,{sx:{"& th":{backgroundColor:V.surfaceAlt,color:V.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(V.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,O.jsx)(w.A,{children:"#"}),(0,O.jsx)(w.A,{children:"Rider"}),(0,O.jsx)(w.A,{align:"center",children:"Orders"}),(0,O.jsx)(w.A,{align:"center",children:"Pending"}),(0,O.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,O.jsx)(w.A,{align:"center",children:"Delivered"}),(0,O.jsx)(w.A,{align:"center",children:"KMS"}),(0,O.jsx)(w.A,{align:"center",children:"Amount"}),(0,O.jsx)(w.A,{align:"right",children:"Action"})]})}),(0,O.jsxs)(y.A,{children:[De&&(0,O.jsx)(L.r,{col:5}),Re&&0!==Re.length||De?Re.map(((e,t)=>{const r=de===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,O.jsxs)(n.Fragment,{children:[(0,O.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:r?"none":"1px solid ".concat(V.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:r?"#fff":V.surfaceAlt},bgcolor:r?$(J):"transparent"},children:[(0,O.jsx)(w.A,{children:(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:V.textMuted},children:String(t+1).padStart(2,"0")})}),(0,O.jsx)(w.A,{children:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,O.jsx)(re,{color:J,size:36,children:(0,O.jsx)(D.LTk,{size:18})}),(0,O.jsxs)(m.A,{children:[(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014"}),(0,O.jsxs)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:["ID #",e.userid]})]})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.pending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.cancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.delivered,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:11}),label:ie(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,O.jsx)(w.A,{align:"right",children:(0,O.jsxs)(m.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,O.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{ve({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),je(null),fe(!0),Me(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:q("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(Q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,O.jsx)(D.Cd7,{size:14})})}),(0,O.jsx)(c.A,{title:r?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{const t=!r;xe(t?e.userid:null),t&&_e(e.userid)},sx:{bgcolor:r?J:q(J),color:r?"#fff":J,border:"1px solid ".concat(Q(J)),"&:hover":{bgcolor:J,color:"#fff"}},children:r?(0,O.jsx)(D.Xbk,{size:16}):(0,O.jsx)(D.j1Q,{size:16})})})]})})]}),r&&(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:9,sx:{p:0,borderBottom:"1px solid ".concat(V.divider),bgcolor:$(J)},children:(0,O.jsx)(f.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,O.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,O.jsxs)(s.A,{elevation:0,sx:{borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",boxShadow:V.shadowSoft},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"#ffffff",borderBottom:"1px solid ".concat(V.borderSubtle)},children:[(0,O.jsx)(re,{color:J,size:28,selected:!0,children:(0,O.jsx)(D.Itr,{size:14})}),(0,O.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Tenant Breakdown \xb7 ","".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()]})]}),(0,O.jsxs)(b.A,{size:"small",children:[(0,O.jsx)(v.A,{children:(0,O.jsxs)(S.A,{sx:{"& th":{backgroundColor:V.surfaceAlt,color:V.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(V.borderSubtle),py:1,px:1.5}},children:[(0,O.jsx)(w.A,{children:"#"}),(0,O.jsx)(w.A,{children:"Client"}),(0,O.jsx)(w.A,{align:"center",children:"All"}),(0,O.jsx)(w.A,{align:"center",children:"Pending"}),(0,O.jsx)(w.A,{align:"center",children:"Completed"}),(0,O.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,O.jsx)(w.A,{align:"center",children:"KMS"}),(0,O.jsx)(w.A,{align:"center",children:"Amount"})]})}),(0,O.jsxs)(y.A,{children:[pe&&(0,O.jsx)(L.r,{col:4}),pe||ae&&0!==ae.length?null===ae||void 0===ae?void 0:ae.map(((e,t)=>(0,O.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(V.divider),py:1,px:1.5},"&:hover":{backgroundColor:V.surfaceAlt}},children:[(0,O.jsx)(w.A,{children:(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:V.textMuted},children:String(t+1).padStart(2,"0")})}),(0,O.jsx)(w.A,{children:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,O.jsx)(re,{color:"#0ea5e9",size:24,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:e.tenantname||"\u2014"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriespending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriescompleted,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:10}),label:ie(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.tenantname,"-").concat(t)))):(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:8,sx:{py:3},children:(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",display:"block"},children:"No tenant breakdown available."})})})]})]})]})})})})})]},e.userid||t)})):(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:9,sx:{py:6},children:(0,O.jsxs)(m.A,{alignItems:"center",spacing:1.5,children:[(0,O.jsx)(a.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(D.bsz,{size:28})}),(0,O.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No riders to show"}),(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:ye?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})})})]})]})}),Re.length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(g.A,{}),(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:1.5,sx:{px:2,py:1.5,background:"#ffffff"},children:[(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,O.jsx)(k.A,{label:ie(Te),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(J," 0%, ").concat(ee," 100%)"),boxShadow:"0 6px 16px ".concat(Z(J))}})]})]})]}),(0,O.jsx)(C.A,{maxWidth:"xl",fullScreen:!0,open:Ae,onClose:()=>{fe(!1),je(null),ve(null)},children:(0,O.jsx)(z.A,{sx:{p:0,height:"100vh"},children:(0,O.jsx)(B,{details:ge,loading:Se,riderName:null===be||void 0===be?void 0:be.name,dateRange:"".concat(R()(r).format("DD/MM/YY")," \u2013 ").concat(R()(P).format("DD/MM/YY")),onClose:()=>{fe(!1),je(null),ve(null)}})})}),(0,O.jsx)(M.A,{open:G,onClose:()=>X(!1),onSelect:e=>{o(e.startDate),Y(e.endDate),se(e.label)}})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=r(89379),n=r(80045),i=r(93230),l=r(2235),s=r(16491),a=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},u=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>s});var o=r(93230),n=r(16491),i=r(82053),l=r(44414);function s(e){let{title:t,subtitle:r,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>v});var o=r(9950),n=r(96583),i=r(40033),l=r(82053),s=r(28170),a=r(93230),c=r(82223),d=r(55916),x=r(4159),h=r.n(x),u=r(56712),p=r(81417),m=r(96600),A=r(53132),f=r(94289),g=r(57326),j=r(50624),b=r(44414);const v=e=>{let{open:t,onClose:r,onSelect:x}=e;const[v,S]=(0,o.useState)(null);return(0,b.jsxs)(n.A,{open:t,onClose:r,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{S({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,A.A)(new Date,-1)),endDate:(0,m.A)((0,A.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,A.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,g.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,j.A)(new Date,-1)),endDate:(0,g.A)((0,j.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),r()):r()},children:"OK"})})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(48089),n=r(50704),i=r(93230),l=r(16491),s=r(82053),a=r(82917),c=r(41413),d=r(44414);function x(e){let{title:t,value:r,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},46639:(e,t,r)=>{r.d(t,{A:()=>_});var o=r(57528),n=r(98587),i=r(58168),l=r(9950),s=r(72004),a=r(3484),c=r(88283),d=r(89548),x=r(18463),h=r(59254),u=r(45558),p=r(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,u.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var A,f,g,j,b=r(44414);const v=["className","color","disableShrink","size","style","thickness","value","variant"];let S,w,y,k;const C=44,z=(0,c.i7)(S||(S=A||(A=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),D=(0,c.i7)(w||(w=f||(f=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),P=(0,h.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,d.A)(r.color))]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(y||(y=g||(g=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),z)})),R=(0,h.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),I=(0,h.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t["circle".concat((0,d.A)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(k||(k=j||(j=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),D)})),_=l.forwardRef((function(e,t){const r=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:l="primary",disableShrink:c=!1,size:h=40,style:u,thickness:p=3.6,value:A=0,variant:f="indeterminate"}=r,g=(0,n.A)(r,v),j=(0,i.A)({},r,{color:l,disableShrink:c,size:h,thickness:p,value:A,variant:f}),S=(e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(r)),n&&"circleDisableShrink"]};return(0,a.A)(i,m,t)})(j),w={},y={},k={};if("determinate"===f){const e=2*Math.PI*((C-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(A),w.strokeDashoffset="".concat(((100-A)/100*e).toFixed(3),"px"),y.transform="rotate(-90deg)"}return(0,b.jsx)(P,(0,i.A)({className:(0,s.A)(S.root,o),style:(0,i.A)({width:h,height:h},y,u),ownerState:j,ref:t,role:"progressbar"},k,g,{children:(0,b.jsx)(R,{className:S.svg,ownerState:j,viewBox:"".concat(22," ").concat(22," ").concat(C," ").concat(C),children:(0,b.jsx)(I,{className:S.circle,style:w,ownerState:j,cx:C,cy:C,r:(C-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),n=r(9950),i=r(2660),l=r(2046),s=r(83274),a=r(25333),c=r(97125),d=r(7762),x=r(52097),h=r(44414);const u=e=>{let{value:t,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:A}=e;const f=(0,n.useRef)(null),[g]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(g)}),[g,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=f.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},A),inputRef:f,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(93230),l=r(41413),s=r(77922),a=r(29925),c=r(26910),d=r(31222),x=r(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:A,pill:f=!1,accentColor:g="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const y=e=>"".concat(g).concat(e),k=y("26"),C=y("18"),z=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:g,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:g,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===r||void 0===r||r(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>f?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},z),A||m||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},A||m||{})}))})}))},96646:(e,t,r)=>{r.d(t,{r:()=>a});var o=r(9213),n=r(21671),i=r(82917),l=r(93230),s=r(44414);const a=e=>{let{rowsPerPage:t=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,s.jsxs)(o.A,{children:[(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,t)=>(0,s.jsx)(n.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(i.A,{variant:"text",width:100}),(0,s.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:150})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(n.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[181],{10181:(e,t,r)=>{r.r(t),r.d(t,{default:()=>le});var o=r(89379),n=r(9950),i=r(26910),l=r(36150),s=r(2235),a=r(41413),c=r(83274),d=r(16491),x=r(82053),h=r(14857),u=r(47223),p=r(60899),m=r(93230),A=r(25333),f=r(33738),g=r(74745),j=r(1320),b=r(15769),v=r(69780),S=r(9213),w=r(21671),y=r(34075),k=r(25277),C=r(96583),z=r(28170),D=r(31222),P=r(4159),R=r.n(P),I=r(81425),_=r(52351),M=r(35678),T=r(59212),E=r(56311),W=r(27001),N=r(36803),L=r(96646),Y=r(10523),F=r(46639),O=r(44414);const K={width:"100%",height:"100%"};function B(e){let{details:t,loading:r,riderName:o,dateRange:i,onClose:l}=e;const s=(0,n.useRef)(null),[a,c]=(0,n.useState)(null),[h,u]=(0,n.useState)([]),[p,f]=(0,n.useState)(!1),{isLoaded:g}=(0,Y.KD)({googleMapsApiKey:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_STAFF_TOKEN:"",REACT_APP_URL:"https://jupiter.nearle.app/live/api/v1",REACT_APP_URL2:"https://jupiter.nearle.app/live/api/v2",REACT_APP_URL3:"https://jupiter.nearle.app/live/api/v3",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_GOOGLE_MAPS_KEY}),j=(0,n.useMemo)((()=>(t||[]).map((e=>({lat:e.dropLat,lng:e.dropLng})))),[t]);(0,n.useEffect)((()=>{if(!g||!s.current||0===j.length)return;const e=new window.google.maps.LatLngBounds;j.forEach((t=>e.extend(t))),s.current.fitBounds(e,48)}),[g,j]),(0,n.useEffect)((()=>{if(!g||j.length<2)return void u([]);let e=!1;const t=new window.google.maps.DirectionsService,r=(e,r,o)=>new Promise(((n,i)=>{t.route({origin:e,destination:r,waypoints:o.map((e=>({location:e,stopover:!0}))),travelMode:window.google.maps.TravelMode.DRIVING},((e,t)=>{"OK"===t?n(e):i(new Error(t))}))}));return(async()=>{f(!0);try{const t=j,o=[];let n=0;for(;n({lat:e.lat(),lng:e.lng()})));o.length>0&&c.length>0&&c.shift(),o.push(...c),n+=i}e||u(o)}catch(t){e||u([])}finally{e||f(!1)}})(),()=>{e=!0}}),[g,j]);const b=(e,t)=>{const r=t?38:32,o=t?"#4D1C61":"#662582",n=encodeURIComponent('')+'')+''.concat(e,"")+"");return"data:image/svg+xml;charset=UTF-8,".concat(n)},v=(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.5,sx:{px:2,py:1.25,borderBottom:"1px solid rgba(15, 23, 42, 0.08)",background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"#fff",flexShrink:0},children:[(0,O.jsx)(D.pk7,{size:20}),(0,O.jsxs)(m.A,{sx:{flex:1,minWidth:0},children:[(0,O.jsxs)(x.A,{sx:{fontWeight:700,fontSize:15,lineHeight:1.2},children:["Planned route",o?" \u2014 ".concat(o):""]}),i&&(0,O.jsx)(x.A,{sx:{fontSize:12,opacity:.85},children:i})]}),t&&t.length>0&&(0,O.jsxs)(x.A,{sx:{fontSize:12,opacity:.9,fontWeight:600},children:[t.length," ",1===t.length?"stop":"stops",p?" \xb7 resolving route\u2026":""]}),l&&(0,O.jsx)(A.A,{size:"small",onClick:l,sx:{color:"#fff"},"aria-label":"Close",children:(0,O.jsx)(D.m6K,{})})]});return r||!g?(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsxs)(m.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1.5},children:[(0,O.jsx)(F.A,{size:32}),(0,O.jsx)(x.A,{sx:{color:"#64748b",fontSize:13},children:r?"Loading planned route\u2026":"Loading map\u2026"})]})]}):t&&0!==t.length?(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsx)(d.A,{sx:{flex:1,minHeight:0},children:(0,O.jsxs)(Y.u6,{mapContainerStyle:K,onLoad:e=>s.current=e,center:j[0],zoom:14,options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},children:[h.length>0?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Y.Ro,{path:h,options:{strokeColor:"#662582",strokeOpacity:.25,strokeWeight:8}}),(0,O.jsx)(Y.Ro,{path:h,options:{strokeColor:"#662582",strokeOpacity:.95,strokeWeight:4}})]}):(0,O.jsx)(Y.Ro,{path:j,options:{strokeColor:"#662582",strokeOpacity:0,strokeWeight:0,icons:[{icon:{path:"M 0,-1 0,1",strokeOpacity:.6,strokeColor:"#662582",scale:3},offset:"0",repeat:"14px"}]}}),t.map(((e,t)=>{const r=e.step||t+1,o=a===e.deliveryid;return(0,O.jsx)(Y.pH,{position:{lat:e.dropLat,lng:e.dropLng},icon:{url:b(r,o)},onClick:()=>c(o?null:e.deliveryid),zIndex:o?1e3:r,children:o&&(0,O.jsx)(Y.Fu,{onCloseClick:()=>c(null),children:(0,O.jsxs)(d.A,{sx:{minWidth:180,fontFamily:"inherit"},children:[(0,O.jsxs)(x.A,{sx:{fontWeight:800,fontSize:13,color:"#0f172a"},children:["Step ",r," \xb7 ",e.customer]}),e.address&&(0,O.jsx)(x.A,{sx:{fontSize:12,color:"#475569",mt:.5},children:e.address}),e.expectedTime&&(0,O.jsxs)(x.A,{sx:{fontSize:12,color:"#64748b",mt:.5},children:["ETA ",String(e.expectedTime).slice(11,16)||e.expectedTime]}),e.orderid&&(0,O.jsxs)(x.A,{sx:{fontSize:11,color:"#94a3b8",mt:.5},children:["Order #",e.orderid]})]})})},"step-".concat(e.deliveryid||e.orderid||t))}))]})})]}):(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsxs)(m.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1,p:3},children:[(0,O.jsx)(x.A,{sx:{color:"#1e293b",fontWeight:700,fontSize:16},children:"No planned route for this rider"}),(0,O.jsx)(x.A,{sx:{color:"#64748b",fontSize:13,textAlign:"center",maxWidth:360},children:"There are no deliveries with drop coordinates assigned to this rider for the selected date range."})]})]})}var H=r(20466),U=r(23787),G=r(36220);R().extend(G);const V={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},X=(e,t)=>"".concat(e).concat(t),$=e=>X(e,"08"),q=e=>X(e,"18"),Z=e=>X(e,"26"),Q=e=>X(e,"55"),J="#662582",ee="#9255AB",te=e=>(0,O.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:V.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),re=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,O.jsx)(a.A,{sx:{width:o,height:o,bgcolor:r?t:q(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},oe=e=>{let{color:t,icon:r,label:o,tooltip:n,minWidth:i=80}=e;return(0,O.jsx)(c.A,{title:n||"",placement:"top",children:(0,O.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(Q(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},ne=e=>{let{value:t,color:r="#ef4444",icon:o}=e;const n=Number(t)||0;return 0===n?(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:700},children:"0"}):(0,O.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(Q(r)),color:r,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[o,n]})};function ie(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function le(){const e=(0,h.A)(),t=(0,u.A)(e.breakpoints.down("md")),[r,o]=(0,n.useState)(R()().format("YYYY-MM-DD")),[P,Y]=(0,n.useState)(R()().format("YYYY-MM-DD")),[F,K]=(0,n.useState)("All"),[G,X]=(0,n.useState)(!1),[le,se]=(0,n.useState)("Today"),[ae,ce]=(0,n.useState)([]),[de,xe]=(0,n.useState)(null),[he,ue]=(0,n.useState)(0),[pe,me]=(0,n.useState)(!1),[Ae,fe]=(0,n.useState)(!1),[ge,je]=(0,n.useState)(null),[be,ve]=(0,n.useState)(null),[Se,we]=(0,n.useState)(!1),[ye,ke]=(0,n.useState)(""),[Ce,ze]=(0,n.useState)(""),{isLoading:De,data:Pe}=(0,l.I)({queryKey:["ridersummary",he,r,P],queryFn:I.KN}),Re=(0,n.useMemo)((()=>{if(!Pe)return[];if(!Ce)return Pe;const e=Ce.toLowerCase().trim();return Pe.filter((t=>["".concat(t.firstname||""," ").concat(t.lastname||""),String(t.userid)].filter(Boolean).some((t=>String(t).toLowerCase().includes(e)))))}),[Pe,Ce]),Ie=(0,n.useMemo)((()=>Pe&&0!==Pe.length?Pe.reduce(((e,t)=>(e.riders+=1,e.orders+=Number(t.totalorders)||0,e.delivered+=Number(t.delivered)||0,e.amount+=Math.max(Number(t.charges)||0,Number(t.deliveryamt)||0),e)),{riders:0,orders:0,delivered:0,amount:0}):{riders:0,orders:0,delivered:0,amount:0}),[Pe]),_e=async e=>{me(!0);try{const t=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportsummary/?&fromdate=").concat(r,"&todate=").concat(P,"&userid=").concat(e));ce(t.data.details)}catch(t){console.log("tenantRes",t)}finally{me(!1)}},Me=async e=>{we(!0);try{var t;const o="undefined"!==typeof window&&localStorage.getItem("userid")||0,n=0===he?"appuserid=".concat(o):"applocationid=".concat(he),l="".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/")+"?".concat(n)+"&status=all"+"&fromdate=".concat(r)+"&todate=".concat(P)+"&pageno=1&pagesize=200&keyword=&tenantid=&locationid="+"&userid=".concat(e),s=await i.A.get(l),a=(null===s||void 0===s||null===(t=s.data)||void 0===t?void 0:t.details)||[],c=e=>{const t=Number(e);return Number.isFinite(t)?t:null},d=a.map((e=>{var t,r,o,n,i;const l=c(null!==(t=e.droplat)&&void 0!==t?t:e.deliverylat),s=c(null!==(r=e.droplon)&&void 0!==r?r:e.deliverylong),a=c(null!==(o=e.pickuplat)&&void 0!==o?o:e.pickuplatitude),d=c(null!==(n=null!==(i=e.pickuplon)&&void 0!==i?i:e.pickuplong)&&void 0!==n?n:e.picklongitude);return null==l||null==s?null:{step:Number(e.step)||0,orderid:e.orderid,deliveryid:e.deliveryid,customer:e.deliverycustomer||e.customername||"Order ".concat(e.orderid),address:e.deliveryaddress||e.deliverysuburb||"",dropLat:l,dropLng:s,pickLat:null!==a&&void 0!==a?a:null,pickLng:null!==d&&void 0!==d?d:null,expectedTime:e.expecteddeliverytime||null}})).filter(Boolean).sort(((e,t)=>e.step-t.step));je(d)}catch(o){(0,H.k)(null===o||void 0===o?void 0:o.message,"error",2e3),je([])}finally{we(!1)}},Te=(0,n.useMemo)((()=>Pe?Pe.reduce(((e,t)=>e+(Number(t.deliveryamt)||0)),0):0),[Pe]),Ee=[{key:"riders",label:"Active Riders",color:J,icon:D.bsz,value:Ie.riders},{key:"orders",label:"Total Orders",color:"#0ea5e9",icon:D.HU2,value:Ie.orders},{key:"delivered",label:"Delivered",color:"#10b981",icon:D.cAP,value:Ie.delivered},{key:"amount",label:"Total Amount",color:"#f59e0b",icon:D.S75,value:ie(Te)}];return(0,O.jsxs)(O.Fragment,{children:[(De||pe)&&(0,O.jsx)(_.A,{}),(0,O.jsx)(W.A,{title:"Riders Summary",subtitle:"Live \xb7 ".concat(F||"All Zones"," \xb7 ").concat(le),live:!0,action:(0,O.jsx)(T.A,{locaName:F,setAppId:ue,setLocoName:K,pill:!0,accentColor:J,icon:(0,O.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,O.jsx)(p.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ee.map((e=>{var t;const r=e.icon;return(0,O.jsx)(p.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,O.jsx)(N.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,O.jsx)(r,{size:20}),color:e.color,loading:De})},e.key)}))}),(0,O.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:V.radiusCard/8,borderTopRightRadius:V.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:V.borderSubtle,borderBottom:0,background:"#fff"},children:(0,O.jsxs)(m.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,O.jsx)(re,{color:J,size:32,children:(0,O.jsx)(D.bsz,{size:18})}),(0,O.jsxs)(m.A,{children:[(0,O.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:["Orders \xb7 ",le]}),(0,O.jsxs)(x.A,{variant:"body2",sx:{color:V.textPrimary,fontWeight:700},children:[Re.length," riders \xb7 ",Ie.orders," orders"]})]}),(0,O.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,O.jsxs)(d.A,{onClick:()=>X(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:$("#f59e0b"),border:"1.5px solid ".concat(Q("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,ml:1,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(Z("#f59e0b"))}},children:[(0,O.jsx)(D.Ki0,{size:14}),R()(r).format("DD/MM/YY")," \u2013 ",R()(P).format("DD/MM/YY")]})})]}),(0,O.jsx)(d.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,O.jsx)(E.A,{value:ye,onChange:ke,onDebouncedChange:ze,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Z(J))}}})})]})}),(0,O.jsxs)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:V.radiusCard/8,borderBottomRightRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",background:"#fff"},children:[t?(0,O.jsxs)(U.nV,{scroll:!0,children:[De&&(0,O.jsx)(m.A,{alignItems:"center",sx:{py:4},children:(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:700},children:"Loading riders\u2026"})}),Re&&0!==Re.length||De?Re.map(((e,t)=>{const r=de===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),n="".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014";return(0,O.jsxs)(U.pg,{accent:J,selected:r,header:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,O.jsx)(re,{color:J,size:36,children:(0,O.jsx)(D.LTk,{size:18})}),(0,O.jsxs)(m.A,{sx:{minWidth:0},children:[(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary},noWrap:!0,children:n}),(0,O.jsxs)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:["#",String(t+1).padStart(2,"0")," \xb7 ID #",e.userid]})]})]}),(0,O.jsxs)(m.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,O.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{ve({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),je(null),fe(!0),Me(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:q("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(Q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,O.jsx)(D.Cd7,{size:14})})}),(0,O.jsx)(c.A,{title:r?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{const t=!r;xe(t?e.userid:null),t&&_e(e.userid)},sx:{bgcolor:r?J:q(J),color:r?"#fff":J,border:"1px solid ".concat(Q(J)),"&:hover":{bgcolor:J,color:"#fff"}},children:r?(0,O.jsx)(D.Xbk,{size:16}):(0,O.jsx)(D.j1Q,{size:16})})})]})]}),children:[(0,O.jsxs)(U.FG,{columns:2,children:[(0,O.jsx)(U.pY,{label:"Orders",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:11})})}),(0,O.jsx)(U.pY,{label:"Delivered",children:(0,O.jsx)(ne,{value:e.delivered,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:11})})}),(0,O.jsx)(U.pY,{label:"Pending",children:(0,O.jsx)(ne,{value:e.pending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:11})})}),(0,O.jsx)(U.pY,{label:"Cancelled",children:(0,O.jsx)(ne,{value:e.cancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:11})})}),(0,O.jsx)(U.pY,{label:"KMS",children:(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,O.jsx)(U.pY,{label:"Actual KMS",children:(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,O.jsx)(U.pY,{label:"Amount",full:!0,children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:11}),label:ie(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]}),r&&(0,O.jsx)(f.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,O.jsxs)(s.A,{elevation:0,sx:{mt:1.25,borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",boxShadow:V.shadowSoft},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.5,py:1,background:"#ffffff",borderBottom:"1px solid ".concat(V.borderSubtle)},children:[(0,O.jsx)(re,{color:J,size:24,selected:!0,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Tenant Breakdown"})]}),(0,O.jsxs)(m.A,{divider:(0,O.jsx)(g.A,{}),children:[pe&&(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",py:2},children:"Loading\u2026"}),pe||ae&&0!==ae.length?null===ae||void 0===ae?void 0:ae.map(((e,t)=>(0,O.jsxs)(d.A,{sx:{p:1.5},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mb:1},children:[(0,O.jsx)(re,{color:"#0ea5e9",size:24,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary},noWrap:!0,children:e.tenantname||"\u2014"})]}),(0,O.jsxs)(U.FG,{columns:2,children:[(0,O.jsx)(U.pY,{label:"All",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:10})})}),(0,O.jsx)(U.pY,{label:"Completed",children:(0,O.jsx)(ne,{value:e.deliveriescompleted,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:10})})}),(0,O.jsx)(U.pY,{label:"Pending",children:(0,O.jsx)(ne,{value:e.deliveriespending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:10})})}),(0,O.jsx)(U.pY,{label:"Cancelled",children:(0,O.jsx)(ne,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:10})})}),(0,O.jsx)(U.pY,{label:"KMS",children:(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,O.jsx)(U.pY,{label:"Actual KMS",children:(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,O.jsx)(U.pY,{label:"Amount",full:!0,children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:10}),label:ie(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.tenantname,"-").concat(t)))):(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",py:2},children:"No tenant breakdown available."})]})]})})]},e.userid||t)})):(0,O.jsxs)(m.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,O.jsx)(a.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(D.bsz,{size:28})}),(0,O.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No riders to show"}),(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:ye?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})]}):(0,O.jsx)(j.A,{sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:Q(J),borderRadius:8,"&:hover":{backgroundColor:J}},"&::-webkit-scrollbar-track":{backgroundColor:V.surfaceAlt}},children:(0,O.jsxs)(b.A,{stickyHeader:!0,sx:{minWidth:{xs:880,md:1080}},children:[(0,O.jsx)(v.A,{children:(0,O.jsxs)(S.A,{sx:{"& th":{backgroundColor:V.surfaceAlt,color:V.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(V.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,O.jsx)(w.A,{children:"#"}),(0,O.jsx)(w.A,{children:"Rider"}),(0,O.jsx)(w.A,{align:"center",children:"Orders"}),(0,O.jsx)(w.A,{align:"center",children:"Pending"}),(0,O.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,O.jsx)(w.A,{align:"center",children:"Delivered"}),(0,O.jsx)(w.A,{align:"center",children:"KMS"}),(0,O.jsx)(w.A,{align:"center",children:"Amount"}),(0,O.jsx)(w.A,{align:"right",children:"Action"})]})}),(0,O.jsxs)(y.A,{children:[De&&(0,O.jsx)(L.r,{col:5}),Re&&0!==Re.length||De?Re.map(((e,t)=>{const r=de===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,O.jsxs)(n.Fragment,{children:[(0,O.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:r?"none":"1px solid ".concat(V.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:r?"#fff":V.surfaceAlt},bgcolor:r?$(J):"transparent"},children:[(0,O.jsx)(w.A,{children:(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:V.textMuted},children:String(t+1).padStart(2,"0")})}),(0,O.jsx)(w.A,{children:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,O.jsx)(re,{color:J,size:36,children:(0,O.jsx)(D.LTk,{size:18})}),(0,O.jsxs)(m.A,{children:[(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014"}),(0,O.jsxs)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:["ID #",e.userid]})]})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.pending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.cancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.delivered,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:11}),label:ie(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,O.jsx)(w.A,{align:"right",children:(0,O.jsxs)(m.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,O.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{ve({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),je(null),fe(!0),Me(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:q("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(Q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,O.jsx)(D.Cd7,{size:14})})}),(0,O.jsx)(c.A,{title:r?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{const t=!r;xe(t?e.userid:null),t&&_e(e.userid)},sx:{bgcolor:r?J:q(J),color:r?"#fff":J,border:"1px solid ".concat(Q(J)),"&:hover":{bgcolor:J,color:"#fff"}},children:r?(0,O.jsx)(D.Xbk,{size:16}):(0,O.jsx)(D.j1Q,{size:16})})})]})})]}),r&&(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:9,sx:{p:0,borderBottom:"1px solid ".concat(V.divider),bgcolor:$(J)},children:(0,O.jsx)(f.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,O.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,O.jsxs)(s.A,{elevation:0,sx:{borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",boxShadow:V.shadowSoft},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"#ffffff",borderBottom:"1px solid ".concat(V.borderSubtle)},children:[(0,O.jsx)(re,{color:J,size:28,selected:!0,children:(0,O.jsx)(D.Itr,{size:14})}),(0,O.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Tenant Breakdown \xb7 ","".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()]})]}),(0,O.jsxs)(b.A,{size:"small",children:[(0,O.jsx)(v.A,{children:(0,O.jsxs)(S.A,{sx:{"& th":{backgroundColor:V.surfaceAlt,color:V.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(V.borderSubtle),py:1,px:1.5}},children:[(0,O.jsx)(w.A,{children:"#"}),(0,O.jsx)(w.A,{children:"Client"}),(0,O.jsx)(w.A,{align:"center",children:"All"}),(0,O.jsx)(w.A,{align:"center",children:"Pending"}),(0,O.jsx)(w.A,{align:"center",children:"Completed"}),(0,O.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,O.jsx)(w.A,{align:"center",children:"KMS"}),(0,O.jsx)(w.A,{align:"center",children:"Amount"})]})}),(0,O.jsxs)(y.A,{children:[pe&&(0,O.jsx)(L.r,{col:4}),pe||ae&&0!==ae.length?null===ae||void 0===ae?void 0:ae.map(((e,t)=>(0,O.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(V.divider),py:1,px:1.5},"&:hover":{backgroundColor:V.surfaceAlt}},children:[(0,O.jsx)(w.A,{children:(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:V.textMuted},children:String(t+1).padStart(2,"0")})}),(0,O.jsx)(w.A,{children:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,O.jsx)(re,{color:"#0ea5e9",size:24,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:e.tenantname||"\u2014"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriespending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriescompleted,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:10}),label:ie(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.tenantname,"-").concat(t)))):(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:8,sx:{py:3},children:(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",display:"block"},children:"No tenant breakdown available."})})})]})]})]})})})})})]},e.userid||t)})):(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:9,sx:{py:6},children:(0,O.jsxs)(m.A,{alignItems:"center",spacing:1.5,children:[(0,O.jsx)(a.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(D.bsz,{size:28})}),(0,O.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No riders to show"}),(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:ye?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})})})]})]})}),Re.length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(g.A,{}),(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:1.5,sx:{px:2,py:1.5,background:"#ffffff"},children:[(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,O.jsx)(k.A,{label:ie(Te),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(J," 0%, ").concat(ee," 100%)"),boxShadow:"0 6px 16px ".concat(Z(J))}})]})]})]}),(0,O.jsx)(C.A,{maxWidth:"xl",fullScreen:!0,open:Ae,onClose:()=>{fe(!1),je(null),ve(null)},children:(0,O.jsx)(z.A,{sx:{p:0,height:"100vh"},children:(0,O.jsx)(B,{details:ge,loading:Se,riderName:null===be||void 0===be?void 0:be.name,dateRange:"".concat(R()(r).format("DD/MM/YY")," \u2013 ").concat(R()(P).format("DD/MM/YY")),onClose:()=>{fe(!1),je(null),ve(null)}})})}),(0,O.jsx)(M.A,{open:G,onClose:()=>X(!1),onSelect:e=>{o(e.startDate),Y(e.endDate),se(e.label)}})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=r(89379),n=r(80045),i=r(93230),l=r(2235),s=r(16491),a=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},u=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>s});var o=r(93230),n=r(16491),i=r(82053),l=r(44414);function s(e){let{title:t,subtitle:r,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>v});var o=r(9950),n=r(96583),i=r(40033),l=r(82053),s=r(28170),a=r(93230),c=r(10226),d=r(55916),x=r(4159),h=r.n(x),u=r(56712),p=r(81417),m=r(96600),A=r(53132),f=r(94289),g=r(57326),j=r(50624),b=r(44414);const v=e=>{let{open:t,onClose:r,onSelect:x}=e;const[v,S]=(0,o.useState)(null);return(0,b.jsxs)(n.A,{open:t,onClose:r,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{S({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,A.A)(new Date,-1)),endDate:(0,m.A)((0,A.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,A.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,g.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,j.A)(new Date,-1)),endDate:(0,g.A)((0,j.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),r()):r()},children:"OK"})})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(48089),n=r(50704),i=r(93230),l=r(16491),s=r(82053),a=r(82917),c=r(41413),d=r(44414);function x(e){let{title:t,value:r,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},46639:(e,t,r)=>{r.d(t,{A:()=>_});var o=r(57528),n=r(98587),i=r(58168),l=r(9950),s=r(72004),a=r(3484),c=r(88283),d=r(89548),x=r(18463),h=r(59254),u=r(45558),p=r(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,u.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var A,f,g,j,b=r(44414);const v=["className","color","disableShrink","size","style","thickness","value","variant"];let S,w,y,k;const C=44,z=(0,c.i7)(S||(S=A||(A=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),D=(0,c.i7)(w||(w=f||(f=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),P=(0,h.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,d.A)(r.color))]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(y||(y=g||(g=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),z)})),R=(0,h.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),I=(0,h.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t["circle".concat((0,d.A)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(k||(k=j||(j=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),D)})),_=l.forwardRef((function(e,t){const r=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:l="primary",disableShrink:c=!1,size:h=40,style:u,thickness:p=3.6,value:A=0,variant:f="indeterminate"}=r,g=(0,n.A)(r,v),j=(0,i.A)({},r,{color:l,disableShrink:c,size:h,thickness:p,value:A,variant:f}),S=(e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(r)),n&&"circleDisableShrink"]};return(0,a.A)(i,m,t)})(j),w={},y={},k={};if("determinate"===f){const e=2*Math.PI*((C-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(A),w.strokeDashoffset="".concat(((100-A)/100*e).toFixed(3),"px"),y.transform="rotate(-90deg)"}return(0,b.jsx)(P,(0,i.A)({className:(0,s.A)(S.root,o),style:(0,i.A)({width:h,height:h},y,u),ownerState:j,ref:t,role:"progressbar"},k,g,{children:(0,b.jsx)(R,{className:S.svg,ownerState:j,viewBox:"".concat(22," ").concat(22," ").concat(C," ").concat(C),children:(0,b.jsx)(I,{className:S.circle,style:w,ownerState:j,cx:C,cy:C,r:(C-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),n=r(9950),i=r(2660),l=r(2046),s=r(83274),a=r(25333),c=r(97125),d=r(7762),x=r(52097),h=r(44414);const u=e=>{let{value:t,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:A}=e;const f=(0,n.useRef)(null),[g]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(g)}),[g,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=f.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},A),inputRef:f,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(93230),l=r(41413),s=r(77922),a=r(29925),c=r(26910),d=r(31222),x=r(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:A,pill:f=!1,accentColor:g="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const y=e=>"".concat(g).concat(e),k=y("26"),C=y("18"),z=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:g,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:g,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===r||void 0===r||r(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>f?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},z),A||m||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},A||m||{})}))})}))},96646:(e,t,r)=>{r.d(t,{r:()=>a});var o=r(9213),n=r(21671),i=r(82917),l=r(93230),s=r(44414);const a=e=>{let{rowsPerPage:t=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,s.jsxs)(o.A,{children:[(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,t)=>(0,s.jsx)(n.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(i.A,{variant:"text",width:100}),(0,s.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:150})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(n.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/2142.8437472d.chunk.js b/build/static/js/2142.379ba3cc.chunk.js similarity index 99% rename from build/static/js/2142.8437472d.chunk.js rename to build/static/js/2142.379ba3cc.chunk.js index d4d1de5..11c2510 100644 --- a/build/static/js/2142.8437472d.chunk.js +++ b/build/static/js/2142.379ba3cc.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2142],{12897:(e,t,r)=>{var n=r(43693);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(14857),s=r(47223),o=r(93230),i=r(16491),c=r(82053),a=r(60899),u=r(29925),l=r(82223),m=r(62419);const d=r.p+"static/media/coming-soon.69b99428ab9e22eca0ba.png";var p=r(50027),x=r(44414);const f=e=>{let{count:t,label:r}=e;const a=(0,n.A)(),u=(0,s.A)(a.breakpoints.down("sm"));return(0,x.jsx)(p.A,{content:!1,sx:{width:{xs:60,sm:80}},children:(0,x.jsxs)(o.A,{justifyContent:"center",alignItems:"center",children:[(0,x.jsx)(i.A,{sx:{py:1.75},children:(0,x.jsx)(c.A,{variant:u?"h4":"h2",children:t})}),(0,x.jsx)(i.A,{sx:{p:.5,bgcolor:"secondary.lighter",width:"100%"},children:(0,x.jsx)(c.A,{align:"center",variant:"subtitle2",children:r})})]})})};const h=function(){const e=new Date;e.setSeconds(e.getSeconds()+172800-55800);const{seconds:t,minutes:r,hours:n,days:s}=(0,m.useTimer)({expiryTimestamp:e});return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(a.Ay,{container:!0,spacing:4,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh",py:2},children:[(0,x.jsx)(a.Ay,{item:!0,xs:12,children:(0,x.jsx)(i.A,{sx:{height:{xs:310,sm:420},width:{xs:360,sm:"auto"}},children:(0,x.jsx)("img",{src:d,alt:"mantis",style:{height:"100%",width:"100%"}})})}),(0,x.jsx)(a.Ay,{item:!0,xs:12,children:(0,x.jsxs)(o.A,{spacing:1,justifyContent:"center",alignItems:"center",sx:{mt:-2},children:[(0,x.jsx)(c.A,{align:"center",variant:"h1",children:"Coming Soon"}),(0,x.jsx)(c.A,{align:"center",color:"textSecondary",children:"Something new is on its way"})]})}),(0,x.jsx)(a.Ay,{item:!0,xs:12,sx:{width:{xs:"95%",md:"40%"}},children:(0,x.jsxs)(o.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:{xs:1,sm:2},children:[(0,x.jsx)(f,{count:s,label:"day"}),(0,x.jsx)(c.A,{variant:"h1",children:" : "}),(0,x.jsx)(f,{count:n,label:"hour"}),(0,x.jsx)(c.A,{variant:"h1",children:" : "}),(0,x.jsx)(f,{count:r,label:"min"}),(0,x.jsx)(c.A,{variant:"h1",children:" : "}),(0,x.jsx)(f,{count:t,label:"sec"})]})}),(0,x.jsx)(a.Ay,{item:!0,xs:12,sx:{width:{xs:380,md:"40%",lg:"30%"}},children:(0,x.jsxs)(o.A,{spacing:2,sx:{mt:2},children:[(0,x.jsx)(c.A,{align:"center",color:"textSecondary",children:"Be the first to be notified when Mantis launches."}),(0,x.jsxs)(o.A,{direction:"row",spacing:1,children:[(0,x.jsx)(u.A,{fullWidth:!0,placeholder:"Email Address"}),(0,x.jsx)(l.A,{variant:"contained",sx:{width:"50%"},children:"Notify Me"})]})]})})]})})}},43693:(e,t,r)=>{var n=r(77736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},62419:function(e,t,r){var n,s=r(12897).default;"undefined"!=typeof self&&self,e.exports=(n=r(9950),(()=>{"use strict";var e={155:e=>{e.exports=n}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};r.r(o),r.d(o,{default:()=>f,useStopwatch:()=>p,useTime:()=>x,useTimer:()=>d});var i=r(155);class c{static expiryTimestamp(e){const t=new Date(e).getTime()>0;return t||console.warn("react-timer-hook: { useTimer } Invalid expiryTimestamp settings",e),t}static onExpire(e){const t=e&&"function"==typeof e;return e&&!t&&console.warn("react-timer-hook: { useTimer } Invalid onExpire settings function",e),t}}class a{static getTimeFromSeconds(e){const t=Math.ceil(e),r=Math.floor(t/86400),n=Math.floor(t%86400/3600),s=Math.floor(t%3600/60);return{totalSeconds:t,seconds:Math.floor(t%60),minutes:s,hours:n,days:r}}static getSecondsFromExpiry(e,t){const r=e-(new Date).getTime();if(r>0){const e=r/1e3;return t?Math.round(e):e}return 0}static getSecondsFromPrevTime(e,t){const r=(new Date).getTime()-e;if(r>0){const e=r/1e3;return t?Math.round(e):e}return 0}static getSecondsFromTimeNow(){const e=new Date;return e.getTime()/1e3-60*e.getTimezoneOffset()}static getFormattedTimeFromSeconds(e,t){const{seconds:r,minutes:n,hours:s}=a.getTimeFromSeconds(e);let o="",i=s;return"12-hour"===t&&(o=s>=12?"pm":"am",i=s%12),{seconds:r,minutes:n,hours:i,ampm:o}}}function u(e,t){const r=(0,i.useRef)();(0,i.useEffect)((()=>{r.current=e})),(0,i.useEffect)((()=>{if(!t)return()=>{};const e=setInterval((()=>{r.current&&r.current()}),t);return()=>clearInterval(e)}),[t])}const l=1e3;function m(e){if(!c.expiryTimestamp(e))return null;const t=a.getSecondsFromExpiry(e),r=Math.floor(1e3*(t-Math.floor(t)));return r>0?r:l}function d(){let{expiryTimestamp:e,onExpire:t,autoStart:r=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,o]=(0,i.useState)(e),[d,p]=(0,i.useState)(a.getSecondsFromExpiry(n)),[x,f]=(0,i.useState)(r),[h,g]=(0,i.useState)(r),[y,b]=(0,i.useState)(m(n)),S=(0,i.useCallback)((()=>{c.onExpire(t)&&t(),f(!1),b(null)}),[t]),j=(0,i.useCallback)((()=>{f(!1)}),[]),v=(0,i.useCallback)((function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];b(m(e)),g(t),f(t),o(e),p(a.getSecondsFromExpiry(e))}),[]),T=(0,i.useCallback)((()=>{const e=new Date;e.setMilliseconds(e.getMilliseconds()+1e3*d),v(e)}),[d,v]),w=(0,i.useCallback)((()=>{h?(p(a.getSecondsFromExpiry(n)),f(!0)):T()}),[n,h,T]);return u((()=>{y!==l&&b(l);const e=a.getSecondsFromExpiry(n);p(e),e<=0&&S()}),x?y:null),s(s({},a.getTimeFromSeconds(d)),{},{start:w,pause:j,resume:T,restart:v,isRunning:x})}function p(){let{autoStart:e,offsetTimestamp:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[r,n]=(0,i.useState)(a.getSecondsFromExpiry(t,!0)||0),[o,c]=(0,i.useState)(new Date),[l,m]=(0,i.useState)(r+a.getSecondsFromPrevTime(o||0,!0)),[d,p]=(0,i.useState)(e);u((()=>{m(r+a.getSecondsFromPrevTime(o,!0))}),d?1e3:null);const x=(0,i.useCallback)((()=>{const e=new Date;c(e),p(!0),m(r+a.getSecondsFromPrevTime(e,!0))}),[r]),f=(0,i.useCallback)((()=>{n(l),p(!1)}),[l]),h=(0,i.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=a.getSecondsFromExpiry(e,!0)||0,s=new Date;c(s),n(r),p(t),m(r+a.getSecondsFromPrevTime(s,!0))}),[]);return s(s({},a.getTimeFromSeconds(l)),{},{start:x,pause:f,reset:h,isRunning:d})}function x(){let{format:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,r]=(0,i.useState)(a.getSecondsFromTimeNow());return u((()=>{r(a.getSecondsFromTimeNow())}),1e3),s({},a.getFormattedTimeFromSeconds(t,e))}function f(e){if((0,i.useEffect)((()=>{console.warn("react-timer-hook: default export useTimer is deprecated, use named exports { useTimer, useStopwatch, useTime } instead")}),[]),e.expiryTimestamp){const t=d(e);return s(s({},t),{},{startTimer:t.start,stopTimer:t.pause,resetTimer:()=>{}})}const t=p(e);return s(s({},t),{},{startTimer:t.start,stopTimer:t.pause,resetTimer:t.reset})}return o})())},73738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},77736:(e,t,r)=>{var n=r(73738).default,s=r(89045);e.exports=function(e){var t=s(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},89045:(e,t,r)=>{var n=r(73738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=n(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2142],{12897:(e,t,r)=>{var n=r(43693);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(14857),s=r(47223),o=r(93230),i=r(16491),c=r(82053),a=r(60899),u=r(29925),l=r(10226),m=r(62419);const d=r.p+"static/media/coming-soon.69b99428ab9e22eca0ba.png";var p=r(50027),x=r(44414);const f=e=>{let{count:t,label:r}=e;const a=(0,n.A)(),u=(0,s.A)(a.breakpoints.down("sm"));return(0,x.jsx)(p.A,{content:!1,sx:{width:{xs:60,sm:80}},children:(0,x.jsxs)(o.A,{justifyContent:"center",alignItems:"center",children:[(0,x.jsx)(i.A,{sx:{py:1.75},children:(0,x.jsx)(c.A,{variant:u?"h4":"h2",children:t})}),(0,x.jsx)(i.A,{sx:{p:.5,bgcolor:"secondary.lighter",width:"100%"},children:(0,x.jsx)(c.A,{align:"center",variant:"subtitle2",children:r})})]})})};const h=function(){const e=new Date;e.setSeconds(e.getSeconds()+172800-55800);const{seconds:t,minutes:r,hours:n,days:s}=(0,m.useTimer)({expiryTimestamp:e});return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(a.Ay,{container:!0,spacing:4,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh",py:2},children:[(0,x.jsx)(a.Ay,{item:!0,xs:12,children:(0,x.jsx)(i.A,{sx:{height:{xs:310,sm:420},width:{xs:360,sm:"auto"}},children:(0,x.jsx)("img",{src:d,alt:"mantis",style:{height:"100%",width:"100%"}})})}),(0,x.jsx)(a.Ay,{item:!0,xs:12,children:(0,x.jsxs)(o.A,{spacing:1,justifyContent:"center",alignItems:"center",sx:{mt:-2},children:[(0,x.jsx)(c.A,{align:"center",variant:"h1",children:"Coming Soon"}),(0,x.jsx)(c.A,{align:"center",color:"textSecondary",children:"Something new is on its way"})]})}),(0,x.jsx)(a.Ay,{item:!0,xs:12,sx:{width:{xs:"95%",md:"40%"}},children:(0,x.jsxs)(o.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:{xs:1,sm:2},children:[(0,x.jsx)(f,{count:s,label:"day"}),(0,x.jsx)(c.A,{variant:"h1",children:" : "}),(0,x.jsx)(f,{count:n,label:"hour"}),(0,x.jsx)(c.A,{variant:"h1",children:" : "}),(0,x.jsx)(f,{count:r,label:"min"}),(0,x.jsx)(c.A,{variant:"h1",children:" : "}),(0,x.jsx)(f,{count:t,label:"sec"})]})}),(0,x.jsx)(a.Ay,{item:!0,xs:12,sx:{width:{xs:380,md:"40%",lg:"30%"}},children:(0,x.jsxs)(o.A,{spacing:2,sx:{mt:2},children:[(0,x.jsx)(c.A,{align:"center",color:"textSecondary",children:"Be the first to be notified when Mantis launches."}),(0,x.jsxs)(o.A,{direction:"row",spacing:1,children:[(0,x.jsx)(u.A,{fullWidth:!0,placeholder:"Email Address"}),(0,x.jsx)(l.A,{variant:"contained",sx:{width:"50%"},children:"Notify Me"})]})]})})]})})}},43693:(e,t,r)=>{var n=r(77736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},62419:function(e,t,r){var n,s=r(12897).default;"undefined"!=typeof self&&self,e.exports=(n=r(9950),(()=>{"use strict";var e={155:e=>{e.exports=n}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};r.r(o),r.d(o,{default:()=>f,useStopwatch:()=>p,useTime:()=>x,useTimer:()=>d});var i=r(155);class c{static expiryTimestamp(e){const t=new Date(e).getTime()>0;return t||console.warn("react-timer-hook: { useTimer } Invalid expiryTimestamp settings",e),t}static onExpire(e){const t=e&&"function"==typeof e;return e&&!t&&console.warn("react-timer-hook: { useTimer } Invalid onExpire settings function",e),t}}class a{static getTimeFromSeconds(e){const t=Math.ceil(e),r=Math.floor(t/86400),n=Math.floor(t%86400/3600),s=Math.floor(t%3600/60);return{totalSeconds:t,seconds:Math.floor(t%60),minutes:s,hours:n,days:r}}static getSecondsFromExpiry(e,t){const r=e-(new Date).getTime();if(r>0){const e=r/1e3;return t?Math.round(e):e}return 0}static getSecondsFromPrevTime(e,t){const r=(new Date).getTime()-e;if(r>0){const e=r/1e3;return t?Math.round(e):e}return 0}static getSecondsFromTimeNow(){const e=new Date;return e.getTime()/1e3-60*e.getTimezoneOffset()}static getFormattedTimeFromSeconds(e,t){const{seconds:r,minutes:n,hours:s}=a.getTimeFromSeconds(e);let o="",i=s;return"12-hour"===t&&(o=s>=12?"pm":"am",i=s%12),{seconds:r,minutes:n,hours:i,ampm:o}}}function u(e,t){const r=(0,i.useRef)();(0,i.useEffect)((()=>{r.current=e})),(0,i.useEffect)((()=>{if(!t)return()=>{};const e=setInterval((()=>{r.current&&r.current()}),t);return()=>clearInterval(e)}),[t])}const l=1e3;function m(e){if(!c.expiryTimestamp(e))return null;const t=a.getSecondsFromExpiry(e),r=Math.floor(1e3*(t-Math.floor(t)));return r>0?r:l}function d(){let{expiryTimestamp:e,onExpire:t,autoStart:r=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,o]=(0,i.useState)(e),[d,p]=(0,i.useState)(a.getSecondsFromExpiry(n)),[x,f]=(0,i.useState)(r),[h,g]=(0,i.useState)(r),[y,b]=(0,i.useState)(m(n)),S=(0,i.useCallback)((()=>{c.onExpire(t)&&t(),f(!1),b(null)}),[t]),j=(0,i.useCallback)((()=>{f(!1)}),[]),v=(0,i.useCallback)((function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];b(m(e)),g(t),f(t),o(e),p(a.getSecondsFromExpiry(e))}),[]),T=(0,i.useCallback)((()=>{const e=new Date;e.setMilliseconds(e.getMilliseconds()+1e3*d),v(e)}),[d,v]),w=(0,i.useCallback)((()=>{h?(p(a.getSecondsFromExpiry(n)),f(!0)):T()}),[n,h,T]);return u((()=>{y!==l&&b(l);const e=a.getSecondsFromExpiry(n);p(e),e<=0&&S()}),x?y:null),s(s({},a.getTimeFromSeconds(d)),{},{start:w,pause:j,resume:T,restart:v,isRunning:x})}function p(){let{autoStart:e,offsetTimestamp:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[r,n]=(0,i.useState)(a.getSecondsFromExpiry(t,!0)||0),[o,c]=(0,i.useState)(new Date),[l,m]=(0,i.useState)(r+a.getSecondsFromPrevTime(o||0,!0)),[d,p]=(0,i.useState)(e);u((()=>{m(r+a.getSecondsFromPrevTime(o,!0))}),d?1e3:null);const x=(0,i.useCallback)((()=>{const e=new Date;c(e),p(!0),m(r+a.getSecondsFromPrevTime(e,!0))}),[r]),f=(0,i.useCallback)((()=>{n(l),p(!1)}),[l]),h=(0,i.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=a.getSecondsFromExpiry(e,!0)||0,s=new Date;c(s),n(r),p(t),m(r+a.getSecondsFromPrevTime(s,!0))}),[]);return s(s({},a.getTimeFromSeconds(l)),{},{start:x,pause:f,reset:h,isRunning:d})}function x(){let{format:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,r]=(0,i.useState)(a.getSecondsFromTimeNow());return u((()=>{r(a.getSecondsFromTimeNow())}),1e3),s({},a.getFormattedTimeFromSeconds(t,e))}function f(e){if((0,i.useEffect)((()=>{console.warn("react-timer-hook: default export useTimer is deprecated, use named exports { useTimer, useStopwatch, useTime } instead")}),[]),e.expiryTimestamp){const t=d(e);return s(s({},t),{},{startTimer:t.start,stopTimer:t.pause,resetTimer:()=>{}})}const t=p(e);return s(s({},t),{},{startTimer:t.start,stopTimer:t.pause,resetTimer:t.reset})}return o})())},73738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},77736:(e,t,r)=>{var n=r(73738).default,s=r(89045);e.exports=function(e){var t=s(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},89045:(e,t,r)=>{var n=r(73738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=n(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}}]); \ No newline at end of file diff --git a/build/static/js/23.16c886f8.chunk.js b/build/static/js/23.4be71fed.chunk.js similarity index 99% rename from build/static/js/23.16c886f8.chunk.js rename to build/static/js/23.4be71fed.chunk.js index cf39483..3acc794 100644 --- a/build/static/js/23.16c886f8.chunk.js +++ b/build/static/js/23.4be71fed.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[23],{62217:e=>{e.exports="data:image/png;base64,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"},90376:(e,t,l)=>{l.d(t,{Ay:()=>A,pK:()=>h});var a=l(89379),d=(l(9950),l(59254)),i=l(83274),n=l(82223),c=l(46639),r=l(93230),o=l(16243),p=l(46411),s=l(98114),m=l(44414);(0,d.Ay)("div")((e=>{let{theme:t,x:l,y:a}=e;return{color:t.palette.text.secondary,position:"fixed",pointerEvents:"none",left:12,top:24,transform:"translate(".concat(l,"px, ").concat(a,"px)"),opacity:.6}}));const h=e=>{let{data:t,filename:l,headers:d,label:r,style:o,btnLoading:h,onClick:A}=e;return(0,m.jsx)(p.CSVLink,{data:t,filename:l,headers:d,children:(0,m.jsx)(i.A,{title:"CSV Export",children:(0,m.jsx)(n.A,{startIcon:!h&&(0,m.jsx)(s.A,{}),variant:h?"outlined":"contained",sx:(0,a.A)({},o),disabled:h,onClick:e=>{null===A||void 0===A||A(e)},children:h?(0,m.jsx)(c.A,{size:20,thickness:5}):r||"Download"})})})},A=h;(0,d.Ay)(r.A)((e=>{let{theme:t}=e;return{height:"400px","& .ant-empty-img-1":{fill:t.palette.mode===o.lG.DARK?t.palette.secondary[200]:t.palette.secondary[400]},"& .ant-empty-img-2":{fill:t.palette.secondary.light},"& .ant-empty-img-3":{fill:t.palette.mode===o.lG.DARK?t.palette.secondary.A200:t.palette.secondary[200]},"& .ant-empty-img-4":{fill:t.palette.mode===o.lG.DARK?t.palette.secondary.A300:t.palette.secondary.A100},"& .ant-empty-img-5":{fillOpacity:t.palette.mode===o.lG.DARK?"0.09":"0.95",fill:t.palette.mode===o.lG.DARK?t.palette.secondary.darker:t.palette.secondary.light}}}))},94826:(e,t,l)=>{l.d(t,{A:()=>o});var a=l(59254),d=l(46639),i=l(62217),n=l(44414);const c=(0,a.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),r=(0,a.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),o=()=>(0,n.jsxs)(c,{children:[(0,n.jsx)(d.A,{color:"primary",size:80,thickness:6}),(0,n.jsx)(r,{children:(0,n.jsx)("img",{src:i,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[23],{62217:e=>{e.exports="data:image/png;base64,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"},90376:(e,t,l)=>{l.d(t,{Ay:()=>A,pK:()=>h});var a=l(89379),d=(l(9950),l(59254)),i=l(83274),n=l(10226),c=l(46639),r=l(93230),o=l(16243),p=l(46411),s=l(98114),m=l(44414);(0,d.Ay)("div")((e=>{let{theme:t,x:l,y:a}=e;return{color:t.palette.text.secondary,position:"fixed",pointerEvents:"none",left:12,top:24,transform:"translate(".concat(l,"px, ").concat(a,"px)"),opacity:.6}}));const h=e=>{let{data:t,filename:l,headers:d,label:r,style:o,btnLoading:h,onClick:A}=e;return(0,m.jsx)(p.CSVLink,{data:t,filename:l,headers:d,children:(0,m.jsx)(i.A,{title:"CSV Export",children:(0,m.jsx)(n.A,{startIcon:!h&&(0,m.jsx)(s.A,{}),variant:h?"outlined":"contained",sx:(0,a.A)({},o),disabled:h,onClick:e=>{null===A||void 0===A||A(e)},children:h?(0,m.jsx)(c.A,{size:20,thickness:5}):r||"Download"})})})},A=h;(0,d.Ay)(r.A)((e=>{let{theme:t}=e;return{height:"400px","& .ant-empty-img-1":{fill:t.palette.mode===o.lG.DARK?t.palette.secondary[200]:t.palette.secondary[400]},"& .ant-empty-img-2":{fill:t.palette.secondary.light},"& .ant-empty-img-3":{fill:t.palette.mode===o.lG.DARK?t.palette.secondary.A200:t.palette.secondary[200]},"& .ant-empty-img-4":{fill:t.palette.mode===o.lG.DARK?t.palette.secondary.A300:t.palette.secondary.A100},"& .ant-empty-img-5":{fillOpacity:t.palette.mode===o.lG.DARK?"0.09":"0.95",fill:t.palette.mode===o.lG.DARK?t.palette.secondary.darker:t.palette.secondary.light}}}))},94826:(e,t,l)=>{l.d(t,{A:()=>o});var a=l(59254),d=l(46639),i=l(62217),n=l(44414);const c=(0,a.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),r=(0,a.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),o=()=>(0,n.jsxs)(c,{children:[(0,n.jsx)(d.A,{color:"primary",size:80,thickness:6}),(0,n.jsx)(r,{children:(0,n.jsx)("img",{src:i,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file diff --git a/build/static/js/238.33695a38.chunk.js b/build/static/js/238.b0a6c12d.chunk.js similarity index 99% rename from build/static/js/238.33695a38.chunk.js rename to build/static/js/238.b0a6c12d.chunk.js index 6beaf40..9312cfa 100644 --- a/build/static/js/238.33695a38.chunk.js +++ b/build/static/js/238.b0a6c12d.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[238],{40238:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var s=a(9950),l=a(14857),n=a(47223),o=a(16491),i=a(60899),r=a(93230),c=a(82053),d=a(19647),h=a(29925),m=a(70006),u=a(23266),p=a(82223),g=a(50027),x=a(26910),A=a(56713),f=a(52351),j=a(99459),y=a(8881),v=a(28429),C=a(44414);const b=()=>{const[e,t]=(0,s.useState)(""),[a,b]=(0,s.useState)(""),[S,_]=(0,s.useState)(""),[F,k]=(0,s.useState)(""),[I,w]=(0,s.useState)(""),[z,W]=(0,s.useState)(""),[H,M]=(0,s.useState)(""),[N,D]=(0,s.useState)({}),[O,E]=(0,s.useState)(""),[K,L]=(0,s.useState)(""),[P,R]=(0,s.useState)(""),[Y,q]=(0,s.useState)({}),T=(0,v.Zp)(),U=(0,l.A)(),Z=(0,n.A)(U.breakpoints.down("md"));j.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[V,B]=(0,s.useState)(!1);(0,s.useEffect)((()=>{localStorage.getItem("tenantid")&&J(localStorage.getItem("tenantid"))}),[]),(0,s.useEffect)((()=>{try{j.A.fromAddress(I).then((e=>{if("OK"==e.status){const{lat:t,lng:a}=e.results[0].geometry.location;D({lat:t,lng:a}),console.log(e)}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[I]);const G=e=>{(0,y.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},J=async e=>{B(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(e)).then((e=>{console.log(e),e.data.status&&q(e.data.details),B(!1)})).catch((e=>{console.log(e),B(!1)}))};(0,s.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:Q}=(0,A.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let t,a,s,l;console.log(e),w(e.formatted_address);for(let n=0;nE(e.target.value),value:O,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,C.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,C.jsx)(m.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,C.jsx)(u.A,{value:"+1",children:"+91"})}),(0,C.jsx)(h.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&t(e.target.value)},value:e,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-email",children:"Email Address"}),(0,C.jsx)(h.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>b(e.target.value),value:a,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-address",children:"Address"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:I,onChange:e=>w(e.target.value),inputRef:Q})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-location",children:"Suburb"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>M(e.target.value),value:H,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-zipcode",children:"City"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>_(e.target.value),value:S,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-location",children:"State"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>W(e.target.value),value:z,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,C.jsx)(h.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>k(e.target.value),value:F,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-location",children:"Door No"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>L(e.target.value),value:K,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-email",children:"Landmark"}),(0,C.jsx)(h.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>R(e.target.value),value:P,autoComplete:"off"})]})})]})})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,children:(0,C.jsx)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,C.jsx)(p.A,{variant:"contained",onClick:()=>(async()=>{if(console.log("res",businessname,businessno,e,a,I,S,F),O)if(e)if(a)if(I)if(S)if(F)if(H)if(N.lat&&N.lng){let s={customerid:0,configid:1,firstname:O,applocationid:Y.applolcationid,profileimage:"",dialcode:"+91",contactno:e,devicetype:"",deviceid:"",customertoken:"",address:I,suburb:H,city:S,state:z,postcode:F,landmark:P,doorno:K,latitude:N.lat.toString(),longitude:N.lng.toString(),tenantid:parseInt(localStorage.getItem("tenantid")),email:a};console.log(s),B(!0);try{await x.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),s).then((e=>{console.log(e),e.data.status?((0,y.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),T("/clients")):"Customer Already available"==e.data.message&&(0,y.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),B(!1)})).catch((e=>{console.log(e),B(!1),(0,y.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(t){console.log(t),B(!1)}}else G("Choose valid address");else G("Fill suburb");else G("Fill post code");else G("Fill City");else G("Fill Address");else G("Fill emailaddress");else G("Fill Mobile Number");else G("Fill Full name")})(),fullWidth:Z,children:"Create"})})})]})})]})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[238],{40238:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var s=a(9950),l=a(14857),n=a(47223),o=a(16491),i=a(60899),r=a(93230),c=a(82053),d=a(19647),h=a(29925),m=a(70006),u=a(23266),p=a(10226),g=a(50027),x=a(26910),A=a(56713),f=a(52351),j=a(99459),y=a(8881),v=a(28429),C=a(44414);const b=()=>{const[e,t]=(0,s.useState)(""),[a,b]=(0,s.useState)(""),[S,_]=(0,s.useState)(""),[F,k]=(0,s.useState)(""),[I,w]=(0,s.useState)(""),[z,W]=(0,s.useState)(""),[H,M]=(0,s.useState)(""),[N,D]=(0,s.useState)({}),[O,E]=(0,s.useState)(""),[K,L]=(0,s.useState)(""),[P,R]=(0,s.useState)(""),[Y,q]=(0,s.useState)({}),T=(0,v.Zp)(),U=(0,l.A)(),Z=(0,n.A)(U.breakpoints.down("md"));j.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[V,B]=(0,s.useState)(!1);(0,s.useEffect)((()=>{localStorage.getItem("tenantid")&&J(localStorage.getItem("tenantid"))}),[]),(0,s.useEffect)((()=>{try{j.A.fromAddress(I).then((e=>{if("OK"==e.status){const{lat:t,lng:a}=e.results[0].geometry.location;D({lat:t,lng:a}),console.log(e)}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[I]);const G=e=>{(0,y.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},J=async e=>{B(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(e)).then((e=>{console.log(e),e.data.status&&q(e.data.details),B(!1)})).catch((e=>{console.log(e),B(!1)}))};(0,s.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:Q}=(0,A.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let t,a,s,l;console.log(e),w(e.formatted_address);for(let n=0;nE(e.target.value),value:O,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,C.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,C.jsx)(m.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,C.jsx)(u.A,{value:"+1",children:"+91"})}),(0,C.jsx)(h.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&t(e.target.value)},value:e,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-email",children:"Email Address"}),(0,C.jsx)(h.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>b(e.target.value),value:a,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-address",children:"Address"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:I,onChange:e=>w(e.target.value),inputRef:Q})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-location",children:"Suburb"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>M(e.target.value),value:H,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-zipcode",children:"City"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>_(e.target.value),value:S,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-location",children:"State"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>W(e.target.value),value:z,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,C.jsx)(h.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>k(e.target.value),value:F,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-location",children:"Door No"}),(0,C.jsx)(h.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>L(e.target.value),value:K,autoComplete:"off"})]})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsxs)(r.A,{spacing:1.25,children:[(0,C.jsx)(d.A,{htmlFor:"personal-email",children:"Landmark"}),(0,C.jsx)(h.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>R(e.target.value),value:P,autoComplete:"off"})]})})]})})}),(0,C.jsx)(i.Ay,{item:!0,xs:12,children:(0,C.jsx)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,C.jsx)(p.A,{variant:"contained",onClick:()=>(async()=>{if(console.log("res",businessname,businessno,e,a,I,S,F),O)if(e)if(a)if(I)if(S)if(F)if(H)if(N.lat&&N.lng){let s={customerid:0,configid:1,firstname:O,applocationid:Y.applolcationid,profileimage:"",dialcode:"+91",contactno:e,devicetype:"",deviceid:"",customertoken:"",address:I,suburb:H,city:S,state:z,postcode:F,landmark:P,doorno:K,latitude:N.lat.toString(),longitude:N.lng.toString(),tenantid:parseInt(localStorage.getItem("tenantid")),email:a};console.log(s),B(!0);try{await x.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),s).then((e=>{console.log(e),e.data.status?((0,y.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),T("/clients")):"Customer Already available"==e.data.message&&(0,y.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),B(!1)})).catch((e=>{console.log(e),B(!1),(0,y.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(t){console.log(t),B(!1)}}else G("Choose valid address");else G("Fill suburb");else G("Fill post code");else G("Fill City");else G("Fill Address");else G("Fill emailaddress");else G("Fill Mobile Number");else G("Fill Full name")})(),fullWidth:Z,children:"Create"})})})]})})]})]})}}}]); \ No newline at end of file diff --git a/build/static/js/2533.ca2d198d.chunk.js b/build/static/js/2533.ca2d198d.chunk.js deleted file mode 100644 index 058ff03..0000000 --- a/build/static/js/2533.ca2d198d.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2533],{23787:(e,o,i)=>{i.d(o,{FG:()=>u,nV:()=>x,pY:()=>f,pg:()=>h});var r=i(89379),t=i(80045),n=i(93230),l=i(2235),s=i(16491),c=i(82053),a=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:o,scroll:i=!1,onScroll:l,sx:s}=e,c=(0,t.A)(e,d);return(0,a.jsx)(n.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:l,sx:(0,r.A)((0,r.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},c),{},{children:o}))},h=e=>{let{accent:o="#662582",header:i,footer:t,selected:n=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(l.A,{elevation:0,onClick:c,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?o:"#e2e8f0",background:n?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,a.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[i,d,t]})]})},u=e=>{let{children:o,columns:i=2,sx:t}=e;return(0,a.jsx)(s.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},t),children:o})},f=e=>{let{label:o,value:i,children:r,full:t=!1,align:n="left"}=e;return(0,a.jsxs)(s.A,{sx:{gridColumn:t?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,a.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},27001:(e,o,i)=>{i.d(o,{A:()=>s});var r=i(93230),t=i(16491),n=i(82053),l=i(44414);function s(e){let{title:o,subtitle:i,live:s=!1,action:c}=e;return(0,l.jsxs)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(t.A,{sx:{minWidth:0},children:[(0,l.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:o}),i&&(0,l.jsxs)(r.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(t.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:i})]})]}),c&&(0,l.jsx)(t.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:c})]})}},36803:(e,o,i)=>{i.d(o,{A:()=>x});var r=i(48089),t=i(50704),n=i(93230),l=i(16491),s=i(82053),c=i(82917),a=i(41413),d=i(44414);function x(e){let{title:o,value:i,icon:x,color:h="#662582",caption:u,loading:f=!1}=e;return(0,d.jsx)(r.A,{sx:{height:"100%"},children:(0,d.jsx)(t.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),f?(0,d.jsx)(c.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(a.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,o,i)=>{i.d(o,{A:()=>u});var r=i(89379),t=i(9950),n=i(2660),l=i(2046),s=i(83274),c=i(25333),a=i(97125),d=i(7762),x=i(52097),h=i(44414);const u=e=>{let{value:o,onChange:i,onDebouncedChange:u,debounceTime:f=500,placeholder:p="Search (ctrl+k)",sx:g}=e;const A=(0,t.useRef)(null),[v]=(0,x.d7)(o,f);return(0,t.useEffect)((()=>{u&&u(v)}),[v,u]),(0,t.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=A.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===A.current&&A.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(n.A,{sx:(0,r.A)({},g),inputRef:A,placeholder:p,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>i(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>i(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,o,i)=>{i.d(o,{A:()=>s});i(9950);var r=i(16491),t=i(46639),n=i(62217),l=i(44414);function s(e){let{size:o=70,imgSize:i=40,alt:s="loader"}=e;return(0,l.jsxs)(r.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(t.A,{size:o}),(0,l.jsx)(r.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:i,height:i},children:(0,l.jsx)("img",{src:n,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,i)=>{i.d(o,{A:()=>h});var r=i(89379),t=i(9950),n=i(93230),l=i(41413),s=i(77922),c=i(29925),a=i(26910),d=i(31222),x=i(44414);const h=(0,t.forwardRef)(((e,o)=>{let{setAppId:i,setLocoName:h,setPage:u,sx:f,textfeildSx:p,textfieldSx:g,pill:A=!1,accentColor:v="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:m}=e;const[y,S]=(0,t.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,t.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await a.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(v).concat(e),k=w("26"),W=w("18"),C=A?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},z=A&&(0,x.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:W,color:v,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:m,sx:(0,r.A)({},f),onChange:(e,o,r)=>{"clear"===r?(null===i||void 0===i||i(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):o&&(null===i||void 0===i||i(o.applocationid),null===h||void 0===h||h(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>A?(0,x.jsx)(c.A,(0,r.A)((0,r.A)({},e),{},{inputRef:o,placeholder:b,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:z}),sx:(0,r.A)((0,r.A)({},C),g||p||{})})):(0,x.jsx)(c.A,(0,r.A)((0,r.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,r.A)({},g||p||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,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"},72533:(e,o,i)=>{i.r(o),i.d(o,{default:()=>de});var r=i(89379),t=i(9950),n=i(99459),l=i(28429),s=i(2235),c=i(41413),a=i(47223),d=i(55158),x=i(60899),h=i(93230),u=i(16491),f=i(82053),p=i(82917),g=i(1320),A=i(25333),v=i(15769),j=i(69780),b=i(9213),m=i(21671),y=i(34075),S=i(83274),w=i(33738),k=i(14857),W=i(4159),C=i.n(W),z=i(31222),R=i(59212),Y=i(27001),I=i(36803),T=i(23787),J=i(56311),M=i(94826),P=i(81425),L=i(36150),N=i(60010),B=i(58691),H=i(96646),K=i(20466),F=i(26910),D=i(44414),V=i(36220);C().extend(V);const Z=14,E="0 12px 32px rgba(15, 23, 42, 0.12)",q="#0f172a",G="#64748b",U="#94a3b8",O="#e2e8f0",Q="#f1f5f9",X="#ffffff",_="#f8fafc",$=(e,o)=>"".concat(e).concat(o),ee=e=>$(e,"08"),oe=e=>$(e,"18"),ie=e=>$(e,"55"),re="#662582",te=e=>(0,D.jsx)(s.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:E,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ne=e=>{let{color:o,selected:i,size:r=24,children:t}=e;return(0,D.jsx)(c.A,{sx:{width:r,height:r,bgcolor:i?o:oe(o),color:i?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:t})},le={active:{label:"Active",color:"#10b981",icon:z.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:z.uDv},online:{label:"Online",color:"#10b981",icon:z.mU9},offline:{label:"Offline",color:"#ef4444",icon:z.uDv},idle:{label:"Idle",color:"#f59e0b",icon:z.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:z.gsJ}},se=[{key:0,label:"All Riders",color:re,icon:z.Itr,countKey:"total"},{key:1,label:"Active",color:"#10b981",icon:z.mU9,countKey:"active"}],ce=e=>{var o,i,r;return[{key:"total",label:"Total Riders",color:re,icon:z.AYP,value:null!==(o=null===e||void 0===e?void 0:e.total)&&void 0!==o?o:0},{key:"active",label:"Active Riders",color:"#10b981",icon:z.cAP,value:null!==(i=null===e||void 0===e?void 0:e.active)&&void 0!==i?i:0},{key:"inactive",label:"Inactive Riders",color:"#ef4444",icon:z.qiG,value:null!==(r=null===e||void 0===e?void 0:e.inactive)&&void 0!==r?r:0}]},ae=e=>{let{color:o,icon:i,label:r,value:t}=e;return(0,D.jsx)(x.Ay,{item:!0,xs:6,sm:4,md:3,children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.125,py:.75,borderRadius:1.75,bgcolor:"#fff",border:"1px solid ".concat(ie(o)),minWidth:0},children:[(0,D.jsx)(ne,{color:o,size:28,children:(0,D.jsx)(i,{size:14})}),(0,D.jsxs)(h.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{sx:{color:U,fontWeight:700,lineHeight:1,textTransform:"uppercase",letterSpacing:.4,fontSize:9.5},children:r}),(0,D.jsx)(f.A,{sx:{color:q,fontWeight:800,fontSize:13,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",mt:.25},children:t})]})]})})},de=()=>{const e=(0,l.Zp)(),o=(0,k.A)(),i=(0,a.A)(o.breakpoints.down("md")),W=(0,t.useRef)(),V=(0,t.useRef)(),[E,de]=(0,t.useState)(""),[xe,he]=(0,t.useState)(""),[ue,fe]=(0,t.useState)("All"),[pe,ge]=(0,t.useState)(0),[Ae,ve]=(0,t.useState)(0),je=localStorage.getItem("roleid"),[be,me]=(0,t.useState)(null),[ye,Se]=(0,t.useState)(null);n.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const{data:we,isLoading:ke}=(0,L.I)({queryKey:["allriders",pe,Ae],queryFn:P.eF}),We=async e=>{try{const o=await F.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs?userid=").concat(e));0==o.data.data.length?(me(null),(0,K.k)(o.data.message,"error",2e3)):Se(o.data.data)}catch(o){(0,K.k)(o.message,"error",2e3)}},{data:Ce,isLoading:ze,isError:Re,error:Ye}=(0,L.I)({queryKey:["ridersStatus"],queryFn:P.bY}),{data:Ie,isLoading:Te,isFetchingNextPage:Je,fetchNextPage:Me,hasNextPage:Pe}=(0,N.q)({queryKey:["allriders",pe,xe,Ae],queryFn:P.DM,getNextPageParam:(e,o)=>{var i;return null!==(i=e.details)&&void 0!==i&&i.length?o.length+1:void 0}}),Le=((null===Ie||void 0===Ie?void 0:Ie.pages.flatMap((e=>e.details||[])))||[]).filter(Boolean);(0,t.useEffect)((()=>{if(!Pe)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Me()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return W.current&&e.observe(W.current),()=>{W.current&&e.unobserve(W.current)}}),[Pe,Me]);const Ne=Re?Ye:null;(0,t.useEffect)((()=>{Ne&&(0,K.k)(Ne,"error",2e3)}),[Ne]);const Be=e=>{if(0==Ae){const o="active"===((null===e||void 0===e?void 0:e.status)||"").toLowerCase()?"active":"inactive";return le[o]||le.unknown}const o=null===Ce||void 0===Ce?void 0:Ce.find((o=>o.userid===(null===e||void 0===e?void 0:e.userid))),i=((null===o||void 0===o?void 0:o.status)||"unknown").toLowerCase();return le[i]||le.unknown};return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(d.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Te||ke||ze,children:(0,D.jsx)(M.A,{color:"inherit"})}),(0,D.jsx)(Y.A,{title:"Riders",subtitle:"Live \xb7 ".concat(ue||"All Zones"),live:!0,action:(0,D.jsx)(R.A,{locaName:ue,setAppId:ge,setLocoName:fe,pill:!0,accentColor:re,icon:(0,D.jsx)(z.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,D.jsx)(x.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:ce(we).map((e=>{var o;const i=e.icon;return(0,D.jsx)(x.Ay,{item:!0,xs:12,sm:4,children:(0,D.jsx)(I.A,{title:e.label,value:null!==(o=e.value)&&void 0!==o?o:0,icon:(0,D.jsx)(i,{size:20}),color:e.color,loading:ke})},e.key)}))}),(0,D.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:Z/8,borderTopRightRadius:Z/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:O,borderBottom:0,background:"#fff"},children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,D.jsx)(h.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:O,borderRadius:4}},children:se.map((e=>{var o;const i=e.icon,r=Ae===e.key,t=null!==(o=null===we||void 0===we?void 0:we[e.countKey])&&void 0!==o?o:0;return(0,D.jsxs)(u.A,{onClick:()=>{return o=e.key,ve(o),void me(null);var o},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:"10px",border:"1px solid ".concat(r?e.color:O),bgcolor:r?e.color:X,color:r?"#fff":G,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:r?e.color:"#cbd5e1",bgcolor:r?e.color:"#f8fafc"}},children:[(0,D.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:r?"rgba(255,255,255,0.22)":oe(e.color),color:r?"#fff":e.color},children:(0,D.jsx)(i,{size:13})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,D.jsx)(u.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:r?"rgba(255,255,255,0.22)":"#f8fafc",color:r?"#fff":"#64748b",border:"none"},children:ke?(0,D.jsx)(p.A,{variant:"text",width:14,height:10}):t})]},e.key)}))}),(0,D.jsx)(u.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,D.jsx)(J.A,{value:E,onChange:de,onDebouncedChange:he,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat((He=re,$(He,"26")))}}})})]})}),(0,D.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:Z/8,borderBottomRightRadius:Z/8,border:"1px solid",borderColor:O,overflow:"hidden",background:"#fff"},children:(0,D.jsx)(g.A,{ref:V,onScroll:e=>{const{scrollTop:o,scrollHeight:i,clientHeight:r}=e.currentTarget;o+r>=i-50&&Pe&&!Je&&Me()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ie(re),borderRadius:8,"&:hover":{backgroundColor:re}},"&::-webkit-scrollbar-track":{backgroundColor:_}},children:i?(0,D.jsxs)(T.nV,{sx:{p:1.25},children:[Te&&(0,D.jsxs)(h.A,{alignItems:"center",sx:{py:6},children:[(0,D.jsx)(B.A,{}),(0,D.jsx)(f.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading riders\u2026"})]}),0===(null===Le||void 0===Le?void 0:Le.length)&&!Te&&(0,D.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:oe("#94a3b8"),color:U},children:(0,D.jsx)(z.aVM,{size:28})}),(0,D.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:q},children:"No riders to show"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G,textAlign:"center",px:2},children:E?"Try a different keyword.":"No ".concat(0===Ae?"":"active ","riders for this zone.")})]}),0!==(null===Le||void 0===Le?void 0:Le.length)&&(null===Le||void 0===Le?void 0:Le.map(((o,i)=>{var r,t,n,l;const s=Be(o),a=s.icon,d=be===o.userid;return(0,D.jsxs)(T.pg,{accent:s.color,selected:d,header:(0,D.jsxs)(h.A,{spacing:1.25,children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(i+1).padStart(2,"0")}),(0,D.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re)),color:re,fontWeight:800,fontSize:11},children:["#",null===o||void 0===o?void 0:o.userid]}),(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ee(s.color),border:"1px solid ".concat(ie(s.color)),color:s.color},children:[(0,D.jsx)(ne,{color:s.color,size:18,children:(0,D.jsx)(a,{size:11})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:s.label})]})]}),1==je&&(0,D.jsxs)(h.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,D.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:oe(re),color:re,border:"1px solid ".concat(ie(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,D.jsx)(z.Yvo,{size:14})}),0!=Ae&&(0,D.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:d?"#0ea5e9":oe("#0ea5e9"),color:d?"#fff":"#0ea5e9",border:"1px solid ".concat(ie("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==be?me(null):(me(o.userid),We(o.userid))},children:d?(0,D.jsx)(z.rAP,{size:14}):(0,D.jsx)(z.WnU,{size:14})})]})]}),(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,D.jsx)(c.A,{sx:{width:36,height:36,bgcolor:oe(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(ie(re)),flexShrink:0},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,D.jsxs)(u.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{sx:{fontWeight:800,color:q,fontSize:15},noWrap:!0,children:o.username||"\u2014"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},noWrap:!0,children:o.contactno||"\u2014"})]})]})]}),children:[(0,D.jsxs)(T.FG,{children:[(0,D.jsxs)(T.pY,{label:"Address",full:!0,children:[(0,D.jsx)(f.A,{sx:{fontSize:13,fontWeight:600,color:G},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]}),(0,D.jsx)(T.pY,{label:"Vehicle",children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,D.jsx)(ne,{color:"#0ea5e9",size:22,children:(0,D.jsx)(z.aVM,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:o.vehicleno||"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Shift",value:"#".concat(null!==(t=o.shiftid)&&void 0!==t?t:"\u2014")}),(0,D.jsx)(T.pY,{label:"Time",children:(0,D.jsxs)(h.A,{spacing:.5,children:[(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:ee("#10b981"),border:"1px solid ".concat(ie("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:ee("#ef4444"),border:"1px solid ".concat(ie("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Fare",value:null!==(n=o.basefare)&&void 0!==n?n:"\u2014"}),(0,D.jsx)(T.pY,{label:"Fuel",value:null!==(l=o.fuelcharge)&&void 0!==l?l:"\u2014"})]}),d&&0!==Ae&&(0,D.jsxs)(u.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re))},children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,D.jsx)(ne,{color:re,size:26,children:(0,D.jsx)(z.o8z,{size:14})}),(0,D.jsxs)(f.A,{sx:{fontWeight:800,color:G,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,D.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,D.jsx)(ae,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==ye&&void 0!==ye&&ye.latitude?"".concat(ye.latitude,", ").concat(ye.longitude):"\u2014"}),(0,D.jsx)(ae,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==ye&&void 0!==ye&&ye.battery?"".concat(ye.battery,"%"):"N/A"}),(0,D.jsx)(ae,{color:null!==ye&&void 0!==ye&&ye.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==ye&&void 0!==ye&&ye.is_charging?"Charging":"Not Charging"}),(0,D.jsx)(ae,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===ye||void 0===ye?void 0:ye.speed)?"".concat(ye.speed," km/h"):"\u2014"}),(0,D.jsx)(ae,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===ye||void 0===ye?void 0:ye.accuracy)?"".concat(ye.accuracy," m"):"\u2014"}),(0,D.jsx)(ae,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===ye||void 0===ye?void 0:ye.logdate)||"\u2014"}),(0,D.jsx)(ae,{color:re,icon:z.gsJ,label:"Active order",value:(null===ye||void 0===ye?void 0:ye.orderid)||"N/A"}),(0,D.jsx)(ae,{color:"idle"===(null===ye||void 0===ye?void 0:ye.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===ye||void 0===ye?void 0:ye.status)||"unknown"})]})]})]},null!==(r=o.userid)&&void 0!==r?r:i)}))),0!==(null===Le||void 0===Le?void 0:Le.length)&&(0,D.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Je||Pe?(0,D.jsx)(B.A,{}):(0,D.jsx)(f.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})]}):(0,D.jsxs)(v.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,md:1300}},children:[(0,D.jsx)(j.A,{children:(0,D.jsxs)(b.A,{sx:{"& th":{backgroundColor:_,color:G,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(O),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,D.jsx)(m.A,{children:"#"}),(0,D.jsx)(m.A,{children:"ID"}),(0,D.jsx)(m.A,{children:"Rider"}),(0,D.jsx)(m.A,{children:"Address"}),(0,D.jsx)(m.A,{children:"Vehicle"}),(0,D.jsx)(m.A,{children:"Shift"}),(0,D.jsx)(m.A,{align:"center",children:"Time"}),(0,D.jsx)(m.A,{children:"Fare"}),(0,D.jsx)(m.A,{children:"Fuel"}),(0,D.jsx)(m.A,{align:"center",children:"Status"}),1==je&&(0,D.jsx)(m.A,{align:"right",children:"Action"})]})}),(0,D.jsxs)(y.A,{children:[Te&&(0,D.jsx)(H.r,{col:6}),0===(null===Le||void 0===Le?void 0:Le.length)&&!Te&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{py:6},children:(0,D.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:oe("#94a3b8"),color:U},children:(0,D.jsx)(z.aVM,{size:28})}),(0,D.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:q},children:"No riders to show"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},children:E?"Try a different keyword.":"No ".concat(0===Ae?"":"active ","riders for this zone.")})]})})}),0!==(null===Le||void 0===Le?void 0:Le.length)&&(null===Le||void 0===Le?void 0:Le.map(((o,i)=>{var n,l,s,a;const d=Be(o),p=d.icon,g=be===o.userid;return(0,D.jsxs)(t.Fragment,{children:[(0,D.jsxs)(b.A,{sx:(0,r.A)({cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Q),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:_}},g&&{backgroundColor:ee(re)}),children:[(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(i+1).padStart(2,"0")})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re)),color:re,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===o||void 0===o?void 0:o.userid]})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,D.jsx)(c.A,{sx:{width:36,height:36,bgcolor:oe(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(ie(re))},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,D.jsxs)(h.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:q,whiteSpace:"nowrap"},children:o.username||"\u2014"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},children:o.contactno||"\u2014"})]})]})}),(0,D.jsx)(m.A,{sx:{maxWidth:220},children:(0,D.jsx)(S.A,{title:o.address||"",placement:"top",children:(0,D.jsxs)(h.A,{children:[(0,D.jsx)(f.A,{variant:"caption",sx:{color:G,fontWeight:600},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]})})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,D.jsx)(ne,{color:"#0ea5e9",size:22,children:(0,D.jsx)(z.aVM,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:o.vehicleno||"\u2014"})]})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(f.A,{variant:"caption",sx:{color:G,fontWeight:600},children:["#",null!==(l=o.shiftid)&&void 0!==l?l:"\u2014"]})}),(0,D.jsx)(m.A,{align:"center",children:(0,D.jsxs)(h.A,{spacing:.5,alignItems:"center",children:[(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:ee("#10b981"),border:"1px solid ".concat(ie("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:ee("#ef4444"),border:"1px solid ".concat(ie("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:null!==(s=o.basefare)&&void 0!==s?s:"\u2014"})}),(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:null!==(a=o.fuelcharge)&&void 0!==a?a:"\u2014"})}),(0,D.jsx)(m.A,{align:"center",children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ee(d.color),border:"1px solid ".concat(ie(d.color)),color:d.color},children:[(0,D.jsx)(ne,{color:d.color,size:20,children:(0,D.jsx)(p,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:d.label})]})}),1==je&&(0,D.jsx)(m.A,{align:"right",children:(0,D.jsxs)(h.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,D.jsx)(S.A,{title:"Edit rider",placement:"top",children:(0,D.jsx)(A.A,{size:"small",sx:{bgcolor:oe(re),color:re,border:"1px solid ".concat(ie(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,D.jsx)(z.Yvo,{size:14})})}),0!=Ae&&(0,D.jsx)(S.A,{title:g?"Hide logs":"View live logs",placement:"top",children:(0,D.jsx)(A.A,{size:"small",sx:{bgcolor:g?"#0ea5e9":oe("#0ea5e9"),color:g?"#fff":"#0ea5e9",border:"1px solid ".concat(ie("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==be?me(null):(me(o.userid),We(o.userid))},children:g?(0,D.jsx)(z.rAP,{size:14}):(0,D.jsx)(z.WnU,{size:14})})})]})})]}),g&&0!==Ae&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{p:0,borderBottom:"1px solid ".concat(Q)},children:(0,D.jsx)(w.A,{in:g,timeout:"auto",unmountOnExit:!0,children:(0,D.jsxs)(u.A,{sx:{p:{xs:1.5,md:2},bgcolor:"#ffffff",borderTop:"1px solid ".concat(ie(re))},children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,D.jsx)(ne,{color:re,size:26,children:(0,D.jsx)(z.o8z,{size:14})}),(0,D.jsxs)(f.A,{sx:{fontWeight:800,color:G,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,D.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,D.jsx)(ae,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==ye&&void 0!==ye&&ye.latitude?"".concat(ye.latitude,", ").concat(ye.longitude):"\u2014"}),(0,D.jsx)(ae,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==ye&&void 0!==ye&&ye.battery?"".concat(ye.battery,"%"):"N/A"}),(0,D.jsx)(ae,{color:null!==ye&&void 0!==ye&&ye.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==ye&&void 0!==ye&&ye.is_charging?"Charging":"Not Charging"}),(0,D.jsx)(ae,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===ye||void 0===ye?void 0:ye.speed)?"".concat(ye.speed," km/h"):"\u2014"}),(0,D.jsx)(ae,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===ye||void 0===ye?void 0:ye.accuracy)?"".concat(ye.accuracy," m"):"\u2014"}),(0,D.jsx)(ae,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===ye||void 0===ye?void 0:ye.logdate)||"\u2014"}),(0,D.jsx)(ae,{color:re,icon:z.gsJ,label:"Active order",value:(null===ye||void 0===ye?void 0:ye.orderid)||"N/A"}),(0,D.jsx)(ae,{color:"idle"===(null===ye||void 0===ye?void 0:ye.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===ye||void 0===ye?void 0:ye.status)||"unknown"})]})]})})})})]},null!==(n=o.userid)&&void 0!==n?n:i)}))),0!==(null===Le||void 0===Le?void 0:Le.length)&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{borderBottom:"none"},children:(0,D.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Je||Pe?(0,D.jsx)(B.A,{}):(0,D.jsx)(f.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})})})]})]})})})]});var He}},94826:(e,o,i)=>{i.d(o,{A:()=>a});var r=i(59254),t=i(46639),n=i(62217),l=i(44414);const s=(0,r.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),c=(0,r.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),a=()=>(0,l.jsxs)(s,{children:[(0,l.jsx)(t.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(c,{children:(0,l.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,o,i)=>{i.d(o,{r:()=>c});var r=i(9213),t=i(21671),n=i(82917),l=i(93230),s=i(44414);const c=e=>{let{rowsPerPage:o=5,col:i=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:i}).map(((e,o)=>(0,s.jsx)(t.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(n.A,{variant:"text",width:100}),(0,s.jsx)(n.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:150})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(t.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/2638.bc119b66.chunk.js b/build/static/js/2638.6b26c3ee.chunk.js similarity index 99% rename from build/static/js/2638.bc119b66.chunk.js rename to build/static/js/2638.6b26c3ee.chunk.js index 6cd06c7..978ae5d 100644 --- a/build/static/js/2638.bc119b66.chunk.js +++ b/build/static/js/2638.6b26c3ee.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2638],{12638:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C});var s=a(9950),l=a(14857),n=a(47223),o=a(60899),i=a(93230),r=a(82053),c=a(19647),d=a(29925),h=a(70006),m=a(23266),u=a(82223),p=a(50027),g=a(26910),x=a(56713),A=a(52351),f=a(99459),j=a(8881),y=a(28429),v=a(44414);const C=()=>{const e=(0,l.A)(),t=(0,n.A)(e.breakpoints.down("md")),[a,C]=(0,s.useState)(""),[S,b]=(0,s.useState)(""),[_,F]=(0,s.useState)(""),[k,I]=(0,s.useState)(""),[w,z]=(0,s.useState)(""),[W,H]=(0,s.useState)(""),[M,N]=(0,s.useState)(""),[D,O]=(0,s.useState)({}),[E,K]=(0,s.useState)(""),[L,P]=(0,s.useState)(""),[Y,R]=(0,s.useState)(""),[q,T]=(0,s.useState)({}),U=(0,y.Zp)();f.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[X,Z]=(0,s.useState)(!1);(0,s.useEffect)((()=>{localStorage.getItem("tenantid")&&B(localStorage.getItem("tenantid"))}),[]),(0,s.useEffect)((()=>{try{f.A.fromAddress(w).then((e=>{if("OK"==e.status){const{lat:t,lng:a}=e.results[0].geometry.location;O({lat:t,lng:a}),console.log(e)}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[w]);const V=e=>{(0,j.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},B=async e=>{Z(!0),await g.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(e)).then((e=>{console.log(e),e.data.status&&T(e.data.details),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))};(0,s.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:G}=(0,x.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let t,a,s,l;console.log(e),z(e.formatted_address);for(let n=0;nK(e.target.value),value:E,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,v.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,v.jsx)(h.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,v.jsx)(m.A,{value:"+1",children:"+91"})}),(0,v.jsx)(d.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&C(e.target.value)},value:a,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-email",children:"Email Address"}),(0,v.jsx)(d.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>b(e.target.value),value:S,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-address",children:"Address"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:w,onChange:e=>z(e.target.value),inputRef:G})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-location",children:"Suburb"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>N(e.target.value),value:M,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-zipcode",children:"City"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>F(e.target.value),value:_,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-location",children:"State"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>H(e.target.value),value:W,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,v.jsx)(d.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>I(e.target.value),value:k,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-location",children:"Door No"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>P(e.target.value),value:L,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-email",children:"Landmark"}),(0,v.jsx)(d.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>R(e.target.value),value:Y,autoComplete:"off"})]})})]})})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,children:(0,v.jsx)(i.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,v.jsx)(u.A,{variant:"contained",onClick:()=>(async()=>{if(console.log("res",businessname,businessno,a,S,w,_,k),E)if(a)if(S)if(w)if(_)if(k)if(M)if(D.lat&&D.lng){let t={customerid:0,configid:1,firstname:E,applocationid:q.applolcationid,profileimage:"",dialcode:"+91",contactno:a,devicetype:"",deviceid:"",customertoken:"",address:w,suburb:M,city:_,state:W,postcode:k,landmark:Y,doorno:L,latitude:D.lat.toString(),longitude:D.lng.toString(),tenantid:parseInt(localStorage.getItem("tenantid")),email:S};console.log(t),Z(!0);try{await g.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),t).then((e=>{console.log(e),e.data.status?((0,j.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),U("/clients")):"Customer Already available"==e.data.message&&(0,j.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Z(!1)})).catch((e=>{console.log(e),Z(!1),(0,j.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(e){console.log(e),Z(!1)}}else V("Choose valid address");else V("Fill suburb");else V("Fill post code");else V("Fill City");else V("Fill Address");else V("Fill emailaddress");else V("Fill Mobile Number");else V("Fill Full name")})(),fullWidth:t,children:"Create"})})})]})})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2638],{12638:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C});var s=a(9950),l=a(14857),n=a(47223),o=a(60899),i=a(93230),r=a(82053),c=a(19647),d=a(29925),h=a(70006),m=a(23266),u=a(10226),p=a(50027),g=a(26910),x=a(56713),A=a(52351),f=a(99459),j=a(8881),y=a(28429),v=a(44414);const C=()=>{const e=(0,l.A)(),t=(0,n.A)(e.breakpoints.down("md")),[a,C]=(0,s.useState)(""),[S,b]=(0,s.useState)(""),[_,F]=(0,s.useState)(""),[k,I]=(0,s.useState)(""),[w,z]=(0,s.useState)(""),[W,H]=(0,s.useState)(""),[M,N]=(0,s.useState)(""),[D,O]=(0,s.useState)({}),[E,K]=(0,s.useState)(""),[L,P]=(0,s.useState)(""),[Y,R]=(0,s.useState)(""),[q,T]=(0,s.useState)({}),U=(0,y.Zp)();f.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[X,Z]=(0,s.useState)(!1);(0,s.useEffect)((()=>{localStorage.getItem("tenantid")&&B(localStorage.getItem("tenantid"))}),[]),(0,s.useEffect)((()=>{try{f.A.fromAddress(w).then((e=>{if("OK"==e.status){const{lat:t,lng:a}=e.results[0].geometry.location;O({lat:t,lng:a}),console.log(e)}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[w]);const V=e=>{(0,j.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},B=async e=>{Z(!0),await g.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(e)).then((e=>{console.log(e),e.data.status&&T(e.data.details),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))};(0,s.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:G}=(0,x.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let t,a,s,l;console.log(e),z(e.formatted_address);for(let n=0;nK(e.target.value),value:E,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,v.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,v.jsx)(h.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,v.jsx)(m.A,{value:"+1",children:"+91"})}),(0,v.jsx)(d.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&C(e.target.value)},value:a,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-email",children:"Email Address"}),(0,v.jsx)(d.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>b(e.target.value),value:S,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-address",children:"Address"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:w,onChange:e=>z(e.target.value),inputRef:G})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-location",children:"Suburb"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>N(e.target.value),value:M,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-zipcode",children:"City"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>F(e.target.value),value:_,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-location",children:"State"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>H(e.target.value),value:W,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,v.jsx)(d.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>I(e.target.value),value:k,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-location",children:"Door No"}),(0,v.jsx)(d.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>P(e.target.value),value:L,autoComplete:"off"})]})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,sm:6,children:(0,v.jsxs)(i.A,{spacing:1.25,children:[(0,v.jsx)(c.A,{htmlFor:"personal-email",children:"Landmark"}),(0,v.jsx)(d.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>R(e.target.value),value:Y,autoComplete:"off"})]})})]})})}),(0,v.jsx)(o.Ay,{item:!0,xs:12,children:(0,v.jsx)(i.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,v.jsx)(u.A,{variant:"contained",onClick:()=>(async()=>{if(console.log("res",businessname,businessno,a,S,w,_,k),E)if(a)if(S)if(w)if(_)if(k)if(M)if(D.lat&&D.lng){let t={customerid:0,configid:1,firstname:E,applocationid:q.applolcationid,profileimage:"",dialcode:"+91",contactno:a,devicetype:"",deviceid:"",customertoken:"",address:w,suburb:M,city:_,state:W,postcode:k,landmark:Y,doorno:L,latitude:D.lat.toString(),longitude:D.lng.toString(),tenantid:parseInt(localStorage.getItem("tenantid")),email:S};console.log(t),Z(!0);try{await g.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),t).then((e=>{console.log(e),e.data.status?((0,j.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),U("/clients")):"Customer Already available"==e.data.message&&(0,j.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Z(!1)})).catch((e=>{console.log(e),Z(!1),(0,j.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(e){console.log(e),Z(!1)}}else V("Choose valid address");else V("Fill suburb");else V("Fill post code");else V("Fill City");else V("Fill Address");else V("Fill emailaddress");else V("Fill Mobile Number");else V("Fill Full name")})(),fullWidth:t,children:"Create"})})})]})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/2851.3a0ed207.chunk.js b/build/static/js/2851.828e003e.chunk.js similarity index 99% rename from build/static/js/2851.3a0ed207.chunk.js rename to build/static/js/2851.828e003e.chunk.js index 8b54427..3ee4d84 100644 --- a/build/static/js/2851.3a0ed207.chunk.js +++ b/build/static/js/2851.828e003e.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2851],{22851:(e,o,r)=>{r.r(o),r.d(o,{default:()=>Be});var t=r(89379),i=r(85571),n=r(8881),l=r(24513),s=r(36256),d=r(9950),c=r(4159),a=r.n(c),h=r(26910),x=r(14857),u=r(31222),p=r(51778),g=r(36150),f=r(60010),v=r(2235),A=r(41413),b=r(47223),m=r(55158),j=r(60899),w=r(93230),S=r(82053),y=r(77922),W=r(25277),C=r(29925),k=r(16491),R=r(1320),z=r(93038),D=r(25333),P=r(15769),I=r(69780),L=r(9213),M=r(21671),Y=r(34075),T=r(83274),F=r(33738),E=r(17239),K=r(23266),O=r(96583),N=r(28170),H=r(82223),B=r(40033),J=r(79739),q=r(37476),G=r(56712),Z=r(81417),U=r(96600),V=r(53132),Q=r(94289),X=r(57326),_=r(50624),$=r(55916),ee=r(52351),oe=r(67562),re=r(49883),te=r(81425),ie=r(56311),ne=r(20466),le=r(96646),se=r(59212),de=r(58691),ce=r(27001),ae=r(36803),he=r(23787),xe=r(44414),ue=r(36220);a().extend(ue);const pe=14,ge=10,fe="0 1px 3px rgba(15, 23, 42, 0.06)",ve="0 12px 32px rgba(15, 23, 42, 0.12)",Ae="#0f172a",be="#64748b",me="#94a3b8",je="#e2e8f0",we="#cbd5e1",Se="#f1f5f9",ye="#ffffff",We="#f8fafc",Ce="#662582",ke=(e,o)=>"".concat(e).concat(o),Re=e=>ke(e,"08"),ze=e=>ke(e,"18"),De=e=>ke(e,"26"),Pe=e=>ke(e,"55"),Ie=()=>({cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:ge+"px",bgcolor:ye,fontWeight:600,color:Ae,paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:je,borderWidth:1},"&:hover fieldset":{borderColor:we},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(Ce))},"&.Mui-focused fieldset":{borderColor:Ce,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:me}}),Le={pending:{label:"Pending",color:"#f59e0b",icon:u.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:u.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:u.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:u.gsJ},active:{label:"Active",color:"#14b8a6",icon:u.pk7},skipped:{label:"Skipped",color:"#f97316",icon:u.ivF},delivered:{label:"Delivered",color:"#10b981",icon:u.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:u.uDv}},Me=[{status:"pending",countKey:"uncoveredLength"},{status:"accepted",countKey:"assignedLength"},{status:"arrived",countKey:"arrivedLength"},{status:"picked",countKey:"pickedLength"},{status:"active",countKey:"activeLength"},{status:"skipped",countKey:"skippedLength"},{status:"delivered",countKey:"coveredLength"},{status:"cancelled",countKey:"cancelLength"}],Ye=[{key:"created",label:"Created Orders",color:"#0ea5e9",icon:u.HU2},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:u.G6c},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:u.cAP},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:u.qiG}],Te=[{id:"all",label:"All Batches",range:"Across the day",color:"#7c3aed",iconKey:"all"},{id:"morning",label:"Morning Batch",range:"12 AM to 8 AM",color:"#0ea5e9",iconKey:"morning",startHour:0,endHour:8},{id:"afternoon",label:"Afternoon Batch",range:"9 AM to 12:30 PM",color:"#f59e0b",iconKey:"afternoon",startHour:9,endHour:12.5},{id:"evening",label:"Evening Batch",range:"4 PM to 7 PM",color:"#6366f1",iconKey:"evening",startHour:16,endHour:19}],Fe={all:u.lB9,morning:u.N3N,afternoon:u.aSE,evening:u.giK},Ee=()=>{const e=a()(),o=e.hour()+e.minute()/60;for(const r of Te)if("all"!==r.id&&o>=r.startHour&&o{let o=null;for(const n of Ke)if(null!==e&&void 0!==e&&e[n]){o=e[n];break}if(!o)return null;const r=String(o).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return null;const t=a()(o);if(!t.isValid())return null;const i=t.hour()+t.minute()/60;for(const n of Te)if("all"!==n.id&&i>=n.startHour&&i(0,xe.jsx)(v.A,(0,t.A)((0,t.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:ve,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),He=e=>{let{color:o,selected:r,size:t=24,children:i}=e;return(0,xe.jsx)(A.A,{sx:{width:t,height:t,bgcolor:r?o:ze(o),color:r?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:i})},Be=()=>{const e=localStorage.getItem("userid"),o=(0,x.A)(),r=(0,b.A)(o.breakpoints.down("md")),c=(0,d.useRef)(),ue=(0,d.useRef)(),[ke,Ke]=(0,d.useState)([]),[Be,Je]=(0,d.useState)(!1),[qe,Ge]=(0,d.useState)("All"),[Ze,Ue]=(0,d.useState)(0),[Ve,Qe]=(0,d.useState)(a()().format("YYYY-MM-DD")),[Xe,_e]=(0,d.useState)(a()().format("YYYY-MM-DD")),[$e,eo]=(0,d.useState)("Pending"),[oo,ro]=(0,d.useState)(0),[to,io]=(0,d.useState)(!1),[no,lo]=(0,d.useState)("Today"),[so,co]=(0,d.useState)(""),[ao,ho]=(0,d.useState)(),[xo,uo]=(0,d.useState)(),[po,go]=(0,d.useState)(""),[fo,vo]=(0,d.useState)({}),[Ao,bo]=(0,d.useState)(""),[mo,jo]=(0,d.useState)(""),[wo,So]=(0,d.useState)("pending"),[yo,Wo]=(0,d.useState)("delivered"),Co=(0,d.useRef)(null),ko=(0,d.useRef)(null),[Ro,zo]=d.useState(0),[Do,Po]=d.useState(50),[Io,Lo]=d.useState(),[Mo,Yo]=(0,d.useState)(null),[To,Fo]=(0,d.useState)(null),[Eo,Ko]=(0,d.useState)(""),[Oo,No]=(0,d.useState)(""),[Ho,Bo]=d.useState(null),[Jo,qo]=(0,d.useState)(null),[Go,Zo]=(0,d.useState)(!1),[Uo,Vo]=d.useState(null),[Qo,Xo]=(0,d.useState)(""),[_o,$o]=(0,d.useState)(!1),[er,or]=(0,d.useState)(!1),[rr,tr]=(0,d.useState)(""),[ir,nr]=(0,d.useState)(null),[lr,sr]=(0,d.useState)(0),[dr,cr]=(0,d.useState)(0),[ar,hr]=(0,d.useState)(null),[xr,ur]=(0,d.useState)(null),[pr,gr]=(0,d.useState)(0),[fr,vr]=(0,d.useState)(Ee),Ar=localStorage.getItem("roleid");(0,d.useEffect)((()=>{sr(0),hr(null),cr(0),ur(null)}),[Ze]),(0,d.useEffect)((()=>{cr(0),ur(null)}),[lr]);const br=Boolean(Ho),mr=(e,o)=>{qo(o),console.log("selectedRow",o),Bo(e.currentTarget)},jr=()=>{Bo(null)},{mutate:wr}=(0,p.n)({mutationFn:e=>{let{selectedRow:o,cancelFeed:r}=e;return(0,te.zF)(o,r)},onSuccess:()=>{Lr("Delivery Cancelled Successfully","success"),$o(!1),ot(),Kr(),qr()},onError:e=>{Lr(e.message,"error")}}),{data:Sr,isLoading:yr,isError:Wr,error:Cr}=(0,g.I)({queryKey:["tenantlist",Ze],queryFn:()=>(0,te.Mn)(Ze),enabled:0!==Ze}),{data:kr,isLoading:Rr,isError:zr,error:Dr}=(0,g.I)({queryKey:["gettenantlocations",lr],queryFn:()=>(0,te.DL)(lr),enabled:0!==lr}),Pr=(0,p.n)({mutationFn:te.k3,onSuccess:()=>{(0,n.M8)("Notification sent Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},onError:e=>{(0,n.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}}),Ir=(0,p.n)({mutationFn:e=>{let{selectedRider:o,selectedRow:r}=e;return(0,te.R_)(o,r)},onSuccess:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;Zo(!1),or(!1),"Success"===e.data.message&&(i.A.info("Rider changed successfully for order ID ".concat(null===t||void 0===t?void 0:t.orderid,". New Rider: ").concat(null===r||void 0===r?void 0:r.firstname," ").concat(null===r||void 0===r?void 0:r.lastname)),Lr("Rider Changed Successfully","success")),ot(),Kr(),qr(),Pr.mutate(r.userfcmtoken)},onError:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;i.A.error("Failed to change rider for order ID ".concat(null===t||void 0===t?void 0:t.orderid,":"),e),Lr(e.message,"error"),Zo(!1)}}),Lr=(e,o)=>{(0,n.M8)(e,{variant:o,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},{data:Mr}=(0,g.I)({queryKey:["orderdetails",To],queryFn:()=>(0,te.z3)(To),enabled:!!To}),Yr=()=>{Je(!1)},{isLoading:Tr,isError:Fr,error:Er,refetch:Kr}=(0,f.q)({queryKey:["fetchdeliveries",Ze,e,wo,Ve,Xe,Do,Oo,lr,dr,pr],queryFn:te.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),{data:Or,fetchNextPage:Nr,hasNextPage:Hr,isFetchingNextPage:Br,isLoading:Jr,refetch:qr}=(0,f.q)({queryKey:["fetchdeliveries-batchcounts",Ze,e,"all",Ve,Xe,200,"",lr,dr,pr],queryFn:te.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),Gr=(0,d.useMemo)((()=>((null===Or||void 0===Or?void 0:Or.pages)||[]).flatMap((e=>e.rows||[]))),[Or]);(0,d.useEffect)((()=>{Hr&&!Br&&Nr()}),[Hr,Br,Nr,Gr.length]);const Zr=Hr||Br,Ur=(0,d.useMemo)((()=>{const e=String(wo||"").toLowerCase(),o=String(Oo||"").trim().toLowerCase();return Gr.filter((r=>{if("all"!==fr&&Oe(r)!==fr)return!1;const t=String(r.orderstatus||"").toLowerCase();if(e&&t!==e)return!1;if(o){if(![r.deliverycustomer,r.deliveryaddress,r.deliverysuburb,r.pickupcustomer,r.pickupaddress,r.pickupsuburb,r.orderid,r.tenantname,r.ridername,r.username].map((e=>String(e||"").toLowerCase())).join(" ").includes(o))return!1}return!0}))}),[Gr,fr,wo,Oo]),Vr=(0,d.useMemo)((()=>{const e={uncoveredLength:0,assignedLength:0,arrivedLength:0,pickedLength:0,activeLength:0,skippedLength:0,coveredLength:0,cancelLength:0};return Gr.forEach((o=>{if("all"!==fr&&Oe(o)!==fr)return;switch(String(o.orderstatus||"").toLowerCase()){case"pending":e.uncoveredLength+=1;break;case"accepted":case"assigned":e.assignedLength+=1;break;case"arrived":e.arrivedLength+=1;break;case"picked":e.pickedLength+=1;break;case"active":e.activeLength+=1;break;case"skipped":e.skippedLength+=1;break;case"delivered":e.coveredLength+=1;break;case"cancelled":case"canceled":e.cancelLength+=1}})),e}),[Gr,fr]),Qr=(0,d.useMemo)((()=>{const e={all:0};return Te.forEach((o=>{"all"!==o.id&&(e[o.id]=0)})),Gr.forEach((o=>{const r=Oe(o);r&&(e[r]=(e[r]||0)+1,e.all+=1)})),e}),[Gr]);(0,d.useEffect)((()=>{if(!Hr)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Nr()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Hr,Nr]);const{data:Xr={},isLoading:_r,isError:$r,error:et,refetch:ot}=(0,g.I)({queryKey:["fetchCountData",Ze,e,Ve,Xe,Do,Oo,lr,dr,pr,$e],queryFn:()=>(0,te.qB)(Ze,e,Ve,Xe,Do,Oo,lr,dr,pr)});(0,d.useEffect)((()=>{console.log("countData",Xr),0===oo&&Xr&&Lo(Xr.uncoveredLength)}),[Xr]);const{data:rt=[],isLoading:tt,isError:it,error:nt}=(0,g.I)({queryKey:["ridersList",Ze],queryFn:te.Sd,enabled:Boolean(Ze),onError:e=>{(0,ne.k)(e.message,"error",2e3)}}),lt=(0,p.n)({mutationFn:e=>(0,te.wT)(e),onSuccess:e=>{console.log(e),e.data.status&&(Lr("Updated Successfully","success"),uo(""),go(""),Je(!1),Kr(),ot(),qr())},onError:e=>{console.log(e),Lr(e.message,"success")}}),st=Fr?"Error fetching deliveries: ".concat(null===Er||void 0===Er?void 0:Er.message):$r?"Error fetching count summary: ".concat(null===et||void 0===et?void 0:et.message):it?"Error fetching riders: ".concat(null===nt||void 0===nt?void 0:nt.message):Wr?"Error tenant list: ".concat(null===Cr||void 0===Cr?void 0:Cr.message):zr?"Error location list: ".concat(null===Dr||void 0===Dr?void 0:Dr.message):null;return st?(console.log("errorMessage",st),(0,ne.k)(st,"error",2e3),null):(0,xe.jsxs)(xe.Fragment,{children:[(_r||Jr||yr||Rr||tt)&&(0,xe.jsx)(xe.Fragment,{children:(0,xe.jsx)(ee.A,{})}),(0,xe.jsx)(m.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:_r||Tr||yr||Rr||tt}),(0,xe.jsx)(ce.A,{title:"Deliveries",subtitle:"Live \xb7 ".concat(qe||"All Zones"),live:!0,action:(0,xe.jsx)(se.A,{ref:Co,locaName:qe,setAppId:Ue,setLocoName:Ge,setPage:zo,pill:!0,accentColor:"#662582",icon:(0,xe.jsx)(u.HPi,{size:14}),placeholder:"Select Zone",paperComponent:Ne,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,xe.jsx)(j.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:[(0,t.A)((0,t.A)({},Ye[0]),{},{value:Qr.all,percentage:null}),(0,t.A)((0,t.A)({},Ye[1]),{},{value:null===Xr||void 0===Xr?void 0:Xr.uncoveredLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.uncoveredLength/Xr.total*100):0}),(0,t.A)((0,t.A)({},Ye[2]),{},{value:null===Xr||void 0===Xr?void 0:Xr.coveredLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.coveredLength/Xr.total*100):0}),(0,t.A)((0,t.A)({},Ye[3]),{},{value:null===Xr||void 0===Xr?void 0:Xr.cancelLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.cancelLength/Xr.total*100):0})].map((e=>{var o;const r=e.icon,t="number"===typeof e.percentage?e.percentage:Number(e.percentage),i=!Number.isNaN(t)&&void 0!==e.percentage&&null!==e.percentage;return(0,xe.jsx)(j.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,xe.jsx)(ae.A,{title:e.label,value:null!==(o=e.value)&&void 0!==o?o:0,icon:(0,xe.jsx)(r,{size:20}),color:e.color,loading:_r,caption:i?"".concat(Math.abs(t),"% of total"):void 0})},e.key)}))}),(0,xe.jsxs)(v.A,{elevation:0,sx:{mt:{xs:1.5,md:2},mb:{xs:1.5,md:2},p:{xs:1.5,md:2},borderRadius:pe/8,border:"1px solid",borderColor:je,background:"#fff",boxShadow:fe},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:{xs:1,md:1.5},color:be},children:[(0,xe.jsx)(A.A,{sx:{width:28,height:28,bgcolor:ze("#662582"),color:"#662582"},children:(0,xe.jsx)(u.MiI,{size:16})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.6,textTransform:"uppercase",color:be},children:"Filters"})]}),(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:1.25,sx:{flexWrap:"wrap"},children:[(0,xe.jsxs)(w.A,{direction:"row",flexWrap:"wrap",gap:1.5,alignItems:"center",children:[(()=>{const e=Te.find((e=>e.id===fr))||Te[0],o=Fe[e.iconKey]||u.VP9;return(0,xe.jsx)(y.A,{disableClearable:!0,size:"small",openOnFocus:!0,selectOnFocus:!0,filterOptions:e=>e,options:Te,value:e,onChange:(e,o)=>o&&vr(o.id),getOptionLabel:e=>e.label,isOptionEqualToValue:(e,o)=>e.id===o.id,PaperComponent:Ne,ListboxProps:{sx:{py:0,maxHeight:360}},renderOption:(e,o,r)=>{var i;let{selected:n}=r;const l=Fe[o.iconKey]||u.VP9,s=null!==(i=Qr[o.id])&&void 0!==i?i:0;return(0,d.createElement)("li",(0,t.A)((0,t.A)({},e),{},{key:o.id,style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderBottom:"1px solid #f1f5f9",backgroundColor:n?"".concat(o.color,"10"):"transparent",transition:"background-color 0.15s"}}),(0,xe.jsx)(A.A,{sx:{width:36,height:36,bgcolor:n?o.color:"".concat(o.color,"18"),color:n?"#fff":o.color,transition:"background-color 0.15s, color 0.15s"},children:(0,xe.jsx)(l,{size:20})}),(0,xe.jsxs)(w.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,xe.jsx)(S.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:o.label}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:o.range})]}),(0,xe.jsx)(W.A,{size:"small",label:s,sx:{minWidth:36,height:22,fontWeight:800,fontSize:11,bgcolor:s>0?"".concat(o.color,"18"):"#f1f5f9",color:s>0?o.color:"#94a3b8",border:"1px solid ".concat(s>0?o.color+"55":"#e2e8f0"),"& .MuiChip-label":{px:.75}}}),n&&(0,xe.jsx)(A.A,{sx:{width:22,height:22,bgcolor:o.color,color:"#fff"},children:(0,xe.jsx)(u.g9_,{size:14})}))},renderInput:r=>{var i;return(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},r),{},{placeholder:"Batch",inputProps:(0,t.A)((0,t.A)({},r.inputProps),{},{readOnly:!0,style:(0,t.A)((0,t.A)({},(null===(i=r.inputProps)||void 0===i?void 0:i.style)||{}),{},{cursor:"pointer",caretColor:"transparent"})}),InputProps:(0,t.A)((0,t.A)({},r.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(A.A,{sx:{width:24,height:24,bgcolor:"".concat(e.color,"18"),color:e.color},children:(0,xe.jsx)(o,{size:14})})})}),sx:{minWidth:{xs:180,sm:220,md:240},cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}}))}})})(),Ve&&Xe&&(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.75,onClick:()=>io(!0),sx:{pl:.5,pr:1.25,py:.5,borderRadius:"10px",cursor:"pointer",bgcolor:"#ffffff",border:"1px solid #e2e8f0",transition:"border-color 0.15s","&:hover":{borderColor:"#cbd5e1"}},children:[(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.tjE,{size:14})}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{fontWeight:600,color:"#475569",whiteSpace:"nowrap"},children:[a()(Ve).format("DD MMM")," \u2013 ",a()(Xe).format("DD MMM")]})]})]}),(0,xe.jsx)(y.A,{disablePortal:!0,options:Sr||[],value:ar,PaperComponent:Ne,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{Ze||(e.preventDefault(),(0,ne.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(sr(0),hr(null),cr(0),ur(null)):(sr((null===o||void 0===o?void 0:o.tenantid)||0),hr(o),cr(0),ur(null))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{inputRef:ko,placeholder:"Select Tenant",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.gl1,{size:14})})})}),sx:Ie()}))}),(0,xe.jsx)(y.A,{disablePortal:!0,options:kr||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,value:xr,PaperComponent:Ne,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{Ze||lr?lr||(e.preventDefault(),(0,ne.k)("Please select your Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=ko.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,ne.k)("Please select your Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(cr(0),ur(null)):(cr(o.locationid||0),ur(o))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Select Location",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.gwi,{size:14})})})}),sx:Ie()}))}),(0,xe.jsx)(y.A,{disabled:tt,options:rt,PaperComponent:Ne,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onChange:(e,o,r)=>{gr("clear"===r?0:o.userid)},onOpen:e=>{Ze||(e.preventDefault(),(0,ne.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Ie()}))})]})]}),(0,xe.jsx)(v.A,{elevation:0,sx:{p:{xs:1,md:1.5},borderTopLeftRadius:pe/8,borderTopRightRadius:pe/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:je,borderBottom:0,background:"#fff"},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,xe.jsx)(w.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:je,borderRadius:4}},children:Me.map(((e,o)=>{var r;const t=Le[e.status],i=t.icon,n=oo===o,l=null!==(r=Vr[e.countKey])&&void 0!==r?r:0;return(0,xe.jsxs)(k.A,{onClick:e=>{return r=o,zo(0),ro(r),Po(50),0===r&&(eo("Pending"),So("pending"),Lo(null===Xr||void 0===Xr?void 0:Xr.uncoveredLength)),1===r&&(eo("Assigned"),So("accepted"),Lo(null===Xr||void 0===Xr?void 0:Xr.assignedLength)),2===r&&(eo("Arrived"),So("arrived"),Lo(null===Xr||void 0===Xr?void 0:Xr.arrivedLength)),3===r&&(eo("Picked"),So("picked"),Lo(null===Xr||void 0===Xr?void 0:Xr.pickedLength)),4===r&&(eo("Active"),So("active"),Lo(null===Xr||void 0===Xr?void 0:Xr.activeLength)),5===r&&(eo("Skipped"),So("skipped"),Lo(null===Xr||void 0===Xr?void 0:Xr.skippedLength)),6===r&&(eo("Delivered"),So("delivered"),Lo(null===Xr||void 0===Xr?void 0:Xr.coveredLength)),7===r&&(eo("Cancelled"),So("cancelled"),Lo(null===Xr||void 0===Xr?void 0:Xr.cancelLength)),console.log(r),void Ko("");var r},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:ge+"px",border:"1px solid ".concat(n?t.color:je),bgcolor:n?t.color:ye,color:n?"#fff":be,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:n?t.color:we,bgcolor:n?t.color:We}},children:[(0,xe.jsx)(A.A,{sx:{width:{xs:20,md:22},height:{xs:20,md:22},bgcolor:n?"rgba(255,255,255,0.22)":ze(t.color),color:n?"#fff":t.color},children:(0,xe.jsx)(i,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:t.label}),(0,xe.jsx)(k.A,{sx:{minWidth:{xs:20,md:24},height:{xs:18,md:20},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:n?"rgba(255,255,255,0.22)":We,color:n?"#fff":be,border:"none"},children:l})]},e.status)}))}),(0,xe.jsx)(k.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,xe.jsx)(ie.A,{value:Eo,onChange:Ko,onDebouncedChange:No,sx:{m:0,width:"100%",borderRadius:ge+"px",bgcolor:ye,"& fieldset":{borderColor:je,borderWidth:1},"&:hover fieldset":{borderColor:we},"&.Mui-focused fieldset":{borderColor:Ce,borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(Ce))}}})})]})}),(0,xe.jsx)(v.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:pe/8,borderBottomRightRadius:pe/8,border:"1px solid",borderColor:je,overflow:"hidden",background:"#fff"},children:(0,xe.jsx)(R.A,{ref:ue,onScroll:e=>{const{scrollTop:o,scrollHeight:r,clientHeight:t}=e.currentTarget;o+t>=r-50&&Hr&&!Br&&Nr()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto",overflowX:"auto","&::-webkit-scrollbar":{width:"10px",height:"10px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:Pe("#662582"),borderRadius:"8px",cursor:"pointer","&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:We}},children:((e,o,i,n,s,h)=>{const x="Cancelled"!==$e&&"Delivered"!==$e,p="Created"==$e,g=15+(x?1:0)+(p?1:0);return r?(0,xe.jsxs)(he.nV,{sx:{p:1.25},children:[0===Ur.length&&!Go&&!Zr&&(0,xe.jsxs)(w.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#94a3b8"),color:me},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(S.A,{variant:"subtitle1",sx:{fontWeight:700,color:Ae},children:"No deliveries to show"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,textAlign:"center",px:2},children:"all"===fr?"No ".concat(((null===(e=Le[wo])||void 0===e?void 0:e.label)||$e).toLowerCase()," orders for this filter."):"No ".concat(((null===(o=Le[wo])||void 0===o?void 0:o.label)||$e).toLowerCase()," orders in ").concat((null===(i=Te.find((e=>e.id===fr)))||void 0===i?void 0:i.label)||"this batch",".")})]}),0===Ur.length&&Zr&&(0,xe.jsxs)(w.A,{alignItems:"center",sx:{py:6},children:[(0,xe.jsx)(de.A,{}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading deliveries\u2026"})]}),Ur.map(((e,o)=>{var r,i,n,s,d,c,h,g;const f=Le[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},v=f.icon,A=!!ke.find((o=>o.orderheaderid==e.orderheaderid)),b=(null===Mo||void 0===Mo?void 0:Mo.orderid)===(null===e||void 0===e?void 0:e.orderid),m=e=>({display:"inline-flex",alignItems:"center",justifyContent:"center",color:e,fontWeight:700,fontSize:12,whiteSpace:"nowrap"});return(0,xe.jsxs)(he.pg,{accent:f.color,selected:A,header:(0,xe.jsxs)(w.A,{spacing:1.25,children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[p&&(0,xe.jsx)(z.A,{size:"small",sx:{p:.25},onChange:o=>{if(o.target.checked){let o=ke;o.push((0,t.A)((0,t.A)({},e),{},{sno:ke.length+1})),Ke([...o])}else{let o=ke.find((o=>o.orderheaderid==e.orderheaderid));if(o){let e=ke;e.splice(o.sno-1,1),e.map(((e,o)=>{e.sno=o+1})),Ke([...e])}}},checked:!!ke.find((o=>o.orderheaderid==e.orderheaderid))}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:me},children:String(Ro*Do+o+1).padStart(2,"0")}),(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:Re(f.color),border:"1px solid ".concat(Pe(f.color)),color:f.color},children:[(0,xe.jsx)(He,{color:f.color,size:18,children:(0,xe.jsx)(v,{size:11})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:f.label})]})]}),(0,xe.jsxs)(w.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"==e.deliverytype&&(0,xe.jsx)(D.A,{size:"small",onClick:()=>{(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(Yo(null),Fo(null)):(Yo(e),Fo(e.orderheaderid))},sx:{borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(Pe("#06b6d4")),"&:hover":{bgcolor:ze("#06b6d4")}},children:b?(0,xe.jsx)(oe.A,{fontSize:"small"}):(0,xe.jsx)(re.A,{fontSize:"small"})}),x&&(0,xe.jsx)(D.A,{size:"small",onClick:o=>mr(o,e),sx:{borderRadius:999,bgcolor:Re("#662582"),color:"#662582",border:"1px solid ".concat(Pe("#662582")),"&:hover":{bgcolor:ze("#662582")}},children:(0,xe.jsx)(l.A,{})})]})]}),(0,xe.jsxs)(k.A,{sx:{minWidth:0},children:[(0,xe.jsx)(S.A,{sx:{fontWeight:800,color:Ae,fontSize:15},noWrap:!0,children:e.tenantname}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:[e.tenantsuburb,e.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:[(0,xe.jsxs)(he.FG,{children:[(0,xe.jsxs)(he.pY,{label:"Order / Location",full:!0,children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:[e.orderid," \xb7 ",e.deliveryid]})]}),(0,xe.jsxs)(he.pY,{label:"Pickup",children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:e.pickupcontactno})]}),(0,xe.jsxs)(he.pY,{label:"Drop",children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:e.deliverycontactno})]}),(0,xe.jsx)(he.pY,{label:"Rider",full:!0,children:e.ridername?(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:24,children:(0,xe.jsx)(u.bsz,{size:13})}),(0,xe.jsxs)(w.A,{sx:{minWidth:0},children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:700,color:Ae},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(he.pY,{label:"ETA",value:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"}),(0,xe.jsx)(he.pY,{label:"Transit",children:(0,xe.jsxs)(k.A,{sx:m("#06b6d4"),children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(he.pY,{label:"Kms \xb7 plan / act",children:(0,xe.jsxs)(w.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(k.A,{sx:m("#ef4444"),children:[e.kms||0," km"]}),(0,xe.jsxs)(k.A,{sx:m("#10b981"),children:[e.cumulativekms||0," km"]})]})}),(0,xe.jsx)(he.pY,{label:"Amount \xb7 chg / amt",children:(0,xe.jsxs)(w.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(k.A,{sx:m("#ef4444"),children:["\u20b9 ",null!==(i=null===(n=e.deliverycharges)||void 0===n?void 0:n.toFixed(2))&&void 0!==i?i:"0.00"]}),(0,xe.jsxs)(k.A,{sx:m("#10b981"),children:["\u20b9 ",null!==(s=null===(d=e.deliveryamt)||void 0===d?void 0:d.toFixed(2))&&void 0!==s?s:"0.00"]})]})}),(0,xe.jsx)(he.pY,{label:"Qty",value:e.Quantity||"\u2014"}),(0,xe.jsx)(he.pY,{label:"COD",children:(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:800,color:e.collectionamt?"#ef4444":me},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),(0,xe.jsx)(he.pY,{label:"Step",children:e.step?(0,xe.jsx)(k.A,{sx:(0,t.A)((0,t.A)({},m("#662582")),{},{minWidth:30,fontWeight:800}),children:e.step}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),e.notes&&(0,xe.jsx)(he.pY,{label:"Notes",full:!0,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.notes})})]}),b&&(0,xe.jsxs)(k.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:We,border:"1px solid ".concat(Se)},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,xe.jsx)(He,{color:"#662582",size:22,children:(0,xe.jsx)(u.gsJ,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#662582"},children:"Product Details"})]}),(0,xe.jsxs)(w.A,{spacing:1,children:[null===Mr||void 0===Mr||null===(c=Mr.details)||void 0===c?void 0:c.map(((e,o)=>(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.25,sx:{p:1,borderRadius:1.5,bgcolor:"#fff",border:"1px solid ".concat(Se)},children:[(0,xe.jsx)(k.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(Se),flexShrink:0}}),(0,xe.jsxs)(w.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(S.A,{variant:"body2",sx:{fontWeight:600,color:Ae},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:["Qty ",(null===e||void 0===e?void 0:e.orderqty)||0," \xb7 \u20b9 ",(null===e||void 0===e?void 0:e.price)||0]})]}),(0,xe.jsxs)(S.A,{variant:"body2",sx:{fontWeight:800,color:Ae,flexShrink:0},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o))),(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"space-between",sx:{pt:.5},children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be},children:"Total Amount"}),(0,xe.jsxs)(S.A,{variant:"body2",sx:{fontWeight:800,color:"#10b981"},children:["\u20b9 ",null===Mr||void 0===Mr||null===(h=Mr.pricedetails)||void 0===h||null===(g=h.orderamount)||void 0===g?void 0:g.toFixed(2)]})]})]})]})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Gr||void 0===Gr?void 0:Gr.length)&&(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Br||Hr?(0,xe.jsx)(de.A,{}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"\xb7 End of list \xb7"})})]}):(0,xe.jsxs)(P.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,lg:1300,xl:1400}},children:[(0,xe.jsx)(I.A,{children:(0,xe.jsxs)(L.A,{sx:{"& th":{backgroundColor:We,color:be,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(je),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[p&&(0,xe.jsx)(M.A,{sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(z.A,{indeterminate:ke.length>0&&ke.length!=Ur.length,onChange:e=>{e.target.checked?Ke([...Ur]):Ke([])},checked:ke.length>0&&ke.length==Ur.length})}),(0,xe.jsx)(M.A,{children:"#"}),(0,xe.jsx)(M.A,{children:"Status"}),(0,xe.jsx)(M.A,{children:"Tenant"}),(0,xe.jsx)(M.A,{children:"Order / Location"}),(0,xe.jsx)(M.A,{children:"Pickup"}),(0,xe.jsx)(M.A,{children:"Drop"}),(0,xe.jsx)(M.A,{children:"Rider"}),(0,xe.jsx)(M.A,{children:"ETA"}),(0,xe.jsx)(M.A,{children:"Transit"}),(0,xe.jsx)(M.A,{children:"Kms"}),(0,xe.jsx)(M.A,{children:"Amount"}),(0,xe.jsx)(M.A,{children:"Notes"}),(0,xe.jsx)(M.A,{children:"Step"}),(0,xe.jsx)(M.A,{children:"Qty"}),(0,xe.jsx)(M.A,{children:"COD"}),x&&(0,xe.jsx)(M.A,{align:"right",children:"Action"})]})}),(Go||Jr)&&(0,xe.jsx)(le.r,{col:8}),(0,xe.jsxs)(Y.A,{children:[0==Ur.length&&!Go&&!Zr&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,sx:{py:6},children:(0,xe.jsxs)(w.A,{alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#94a3b8"),color:me},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(S.A,{variant:"subtitle1",sx:{fontWeight:700,color:Ae},children:"No deliveries to show"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"all"===fr?"No ".concat(((null===(n=Le[wo])||void 0===n?void 0:n.label)||$e).toLowerCase()," orders for this filter."):"No ".concat(((null===(s=Le[wo])||void 0===s?void 0:s.label)||$e).toLowerCase()," orders in ").concat((null===(h=Te.find((e=>e.id===fr)))||void 0===h?void 0:h.label)||"this batch",".")})]})})}),0==Ur.length&&Zr&&(0,xe.jsx)(L.A,{children:(0,xe.jsxs)(M.A,{colSpan:g,sx:{textAlign:"center",py:6},children:[(0,xe.jsx)(de.A,{}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1},children:"Loading deliveries\u2026"})]})}),Ur.map(((e,o)=>{var r,i,n,s,c,h,x,p;const f=Le[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},A=f.icon,b=!!ke.find((o=>o.orderheaderid==e.orderheaderid));return(0,xe.jsxs)(d.Fragment,{children:[(0,xe.jsxs)(L.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Se),py:{xs:1,md:1.5},px:{xs:1,md:2}},backgroundColor:b?ze("#8b5cf6"):"transparent","&:hover":{backgroundColor:b?ze("#8b5cf6"):We}},children:["Created"==$e&&(0,xe.jsx)(M.A,{children:(0,xe.jsx)(z.A,{onChange:o=>{if(o.target.checked){let o=ke;o.push((0,t.A)((0,t.A)({},e),{},{sno:ke.length+1})),Ke([...o])}else{if(ke.find((o=>o.orderheaderid==e.orderheaderid))){let o=ke,r=ke.find((o=>o.orderheaderid==e.orderheaderid));o.splice(r.sno-1,1),o.map(((e,o)=>{e.sno=o+1})),Ke([...o])}}console.log("list",ke)},checked:ke.find((o=>o.orderheaderid==e.orderheaderid))})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:me},children:String(Ro*Do+o+1).padStart(2,"0")})}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:Re(f.color),border:"1px solid ".concat(Pe(f.color)),color:f.color},children:[(0,xe.jsx)(He,{color:f.color,size:20,children:(0,xe.jsx)(A,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:f.label})]})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(T.A,{title:e.tenantadress,children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{noWrap:!0,variant:"subtitle2",sx:{fontWeight:700,color:Ae},children:e.tenantname}),(0,xe.jsx)(S.A,{noWrap:!0,variant:"caption",sx:{color:be},children:e.tenantsuburb}),(0,xe.jsx)(S.A,{noWrap:!0,variant:"caption",sx:{color:me},children:e.applocation})]})})}),(0,xe.jsxs)(M.A,{align:"left",children:[(0,xe.jsx)(T.A,{title:"Location Name-Suburb",placement:"top",children:(0,xe.jsx)(S.A,{variant:"subtitle1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,xe.jsxs)(w.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(T.A,{title:"Order Id",placement:"top",children:(0,xe.jsx)(S.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,xe.jsxs)(T.A,{title:"Ordered date",placement:"top",children:[(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.orderdate).utc().format("hh:mm A")})]})]}),"-",(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(T.A,{title:"Delivery Id",placement:"top",children:(0,xe.jsx)(S.A,{variant:"body2",noWrap:!0,children:e.deliveryid})}),(0,xe.jsxs)(T.A,{title:"Delivery date",placement:"top",children:[(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.deliverydate).utc().format("hh:mm A")})]})]})]})]}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.pickupcustomer}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.pickupcontactno}),(0,xe.jsx)(T.A,{title:e.Pickupaddress,sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:e.pickuplocation||(e.Pickupaddress?e.Pickupaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.deliverycustomer}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.deliverycontactno}),(0,xe.jsx)(T.A,{title:e.deliveryaddress,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,whiteSpace:"nowrap"},children:e.deliverylocation||(e.deliveryaddress?e.deliveryaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(M.A,{children:e.ridername?(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:28,children:(0,xe.jsx)(u.bsz,{size:14})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",fontWeight:700,fontSize:12,border:"1px solid ".concat(Pe("#06b6d4"))},children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(T.A,{title:"Planned KMS",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#ef4444")),whiteSpace:"nowrap",minWidth:75},children:[e.kms||0," km"]})}),(0,xe.jsx)(T.A,{title:"Actual KMS",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#10b981")),whiteSpace:"nowrap",minWidth:75},children:[e.cumulativekms||0," km"]})})]})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(T.A,{title:"Delivery Charge",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#ef4444")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(i=null===(n=e.deliverycharges)||void 0===n?void 0:n.toFixed(2))&&void 0!==i?i:"0.00"]})}),(0,xe.jsx)(T.A,{title:"Delivery Amount",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#10b981")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(s=null===(c=e.deliveryamt)||void 0===c?void 0:c.toFixed(2))&&void 0!==s?s:"0.00"]})})]})}),(0,xe.jsx)(M.A,{children:e.notes?(0,xe.jsx)(T.A,{title:e.notes,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,maxWidth:160,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.notes})}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),(0,xe.jsx)(M.A,{align:"center",children:e.step?(0,xe.jsx)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:30,height:24,px:.875,borderRadius:999,bgcolor:Re("#662582"),border:"1px solid ".concat(Pe("#662582")),color:"#662582",fontWeight:800,fontSize:11},children:e.step}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:e.Quantity?Ae:me,whiteSpace:"nowrap"},children:e.Quantity||"\u2014"})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:800,color:e.collectionamt?"#ef4444":me,whiteSpace:"nowrap"},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),"Cancelled"!==$e&&"Delivered"!==$e&&(0,xe.jsx)(M.A,{align:"right",children:(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"flex-end",spacing:.75,children:["C"==e.deliverytype&&(0,xe.jsx)(T.A,{title:"Product details",placement:"top",children:(0,xe.jsx)(D.A,{size:"small",onClick:()=>{(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(Yo(null),Fo(null)):(Yo(e),Fo(e.orderheaderid))},sx:{borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(Pe("#06b6d4")),"&:hover":{bgcolor:ze("#06b6d4")}},children:(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(0,xe.jsx)(oe.A,{fontSize:"small"}):(0,xe.jsx)(re.A,{fontSize:"small"})})}),(0,xe.jsx)(T.A,{title:"Actions",placement:"top",children:(0,xe.jsx)(D.A,{size:"small",onClick:o=>mr(o,e),sx:{borderRadius:999,bgcolor:Re("#662582"),color:"#662582",border:"1px solid ".concat(Pe("#662582")),"&:hover":{bgcolor:ze("#662582")}},children:(0,xe.jsx)(l.A,{})})})]})})]}),(null===Mo||void 0===Mo?void 0:Mo.orderid)===(null===e||void 0===e?void 0:e.orderid)&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,sx:{p:0,border:0,backgroundColor:We},children:(0,xe.jsx)(F.A,{in:!0,timeout:"auto",unmountOnExit:!0,children:(0,xe.jsx)(k.A,{sx:{width:"100%",p:2.5},children:(0,xe.jsxs)(v.A,{elevation:0,sx:{borderRadius:2,border:"1px solid",borderColor:je,overflow:"hidden",background:"#fff"},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,borderBottom:"1px solid ".concat(Se),bgcolor:Re("#662582")},children:[(0,xe.jsx)(He,{color:"#662582",children:(0,xe.jsx)(u.gsJ,{size:14})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#662582"},children:"Product Details"})]}),(0,xe.jsxs)(P.A,{size:"small",sx:{minWidth:800},children:[(0,xe.jsx)(I.A,{children:(0,xe.jsxs)(L.A,{sx:{"& th":{fontSize:11,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:be,borderBottom:"1px solid ".concat(Se)},"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(M.A,{children:"#"}),(0,xe.jsx)(M.A,{children:"Product"}),(0,xe.jsx)(M.A,{children:"Description"}),(0,xe.jsx)(M.A,{align:"right",children:"Qty"}),(0,xe.jsx)(M.A,{align:"right",children:"Cost"}),(0,xe.jsx)(M.A,{align:"right",children:"Price"}),(0,xe.jsx)(M.A,{align:"right",children:"Tax"}),(0,xe.jsx)(M.A,{align:"right",children:"Amount"})]})}),(0,xe.jsxs)(Y.A,{children:[null===Mr||void 0===Mr||null===(h=Mr.details)||void 0===h?void 0:h.map(((e,o)=>{var r,t;return(0,xe.jsxs)(L.A,{sx:{"&:hover":{backgroundColor:We+" !important"}},children:[(0,xe.jsx)(M.A,{sx:{color:me,fontWeight:700},children:String(o+1).padStart(2,"0")}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,xe.jsx)(k.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(Se)}}),(0,xe.jsx)(S.A,{variant:"body2",sx:{fontWeight:600,color:Ae},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"})]})}),(0,xe.jsx)(M.A,{sx:{color:be},children:(null===e||void 0===e?void 0:e.productdescription)||"-"}),(0,xe.jsx)(M.A,{align:"right",sx:{fontWeight:700},children:(null===e||void 0===e?void 0:e.orderqty)||0}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null===e||void 0===e?void 0:e.price)||0]}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null!==(r=null===e||void 0===e?void 0:e.productsumprice)&&void 0!==r?r:0).toFixed(2)]}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null!==(t=null===e||void 0===e?void 0:e.taxamount)&&void 0!==t?t:0).toFixed(2)]}),(0,xe.jsxs)(M.A,{align:"right",sx:{fontWeight:800,color:Ae},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o)})),(0,xe.jsxs)(L.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(M.A,{align:"right",colSpan:7,sx:{fontWeight:700,color:be,borderTop:"1px solid ".concat(Se)},children:"Total Amount"}),(0,xe.jsxs)(M.A,{align:"right",sx:{fontWeight:800,color:"#10b981",borderTop:"1px solid ".concat(Se)},children:["\u20b9 ",null===Mr||void 0===Mr||null===(x=Mr.pricedetails)||void 0===x||null===(p=x.orderamount)||void 0===p?void 0:p.toFixed(2)]})]})]})]})]})})})})})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Gr||void 0===Gr?void 0:Gr.length)&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,rowSpan:3,children:(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Br||Hr?(0,xe.jsx)(de.A,{}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"\xb7 End of list \xb7"})})})})]})]})})()})}),(0,xe.jsxs)(E.A,{anchorEl:Ho,open:br,onClose:jr,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{elevation:0,sx:{minWidth:220,borderRadius:2,mt:.75,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden","& .MuiMenuItem-root":{fontSize:13,fontWeight:600,py:1.1,px:1.5,gap:1,transition:"background-color 0.15s","&:hover":{bgcolor:We}}}},children:["delivered"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{onClick:()=>{Pr.mutate(Jo.userfcmtoken),jr()},children:[(0,xe.jsx)(He,{color:"#0ea5e9",size:22,children:(0,xe.jsx)(u.q53,{size:13})}),"Notify Rider"]}),["pending","accepted","arrived"].includes(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{onClick:()=>{var e;if(!Ze)return Lr("Please select a location first!","warning"),void(null===(e=Co.current)||void 0===e||e.focus());or(!0),jr()},children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:22,children:(0,xe.jsx)(u.bsz,{size:13})}),"Change Rider"]}),(1==Ar||2==Ar)&&(0,xe.jsxs)(K.A,{onClick:()=>{co(Jo.kms),ho(Jo.cumulativekms),bo(Jo.droplat),jo(Jo.droplon),go(Jo.notes),uo(Jo.deliveryamount),Wo(Jo.orderstatus||"delivered"),vo(Jo),Je(!0),jr()},children:[(0,xe.jsx)(He,{color:"#10b981",size:22,children:(0,xe.jsx)(u.mU9,{size:13})}),"Update Status"]}),"cancelled"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&"delivered"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{sx:{color:"#ef4444 !important"},onClick:()=>{$o(!0),jr()},children:[(0,xe.jsx)(He,{color:"#ef4444",size:22,children:(0,xe.jsx)(u.uDv,{size:13})}),"Cancel Delivery"]})]}),(0,xe.jsxs)(O.A,{open:_o,onClose:()=>$o(!1),maxWidth:"xs",fullWidth:!0,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #ef4444 0%, ".concat(ze("#ef4444")," 100%)")}}),(0,xe.jsx)(N.A,{sx:{p:3.5},children:(0,xe.jsxs)(w.A,{alignItems:"center",spacing:2.5,children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#ef4444"),color:"#ef4444"},children:(0,xe.jsx)(s.A,{style:{fontSize:28}})}),(0,xe.jsxs)(w.A,{spacing:.5,alignItems:"center",children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Cancel Delivery?"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,textAlign:"center",px:1},children:"This action will cancel the delivery and notify the rider. Please share a brief reason."})]}),(0,xe.jsx)(C.A,{fullWidth:!0,placeholder:"Reason for cancellation",multiline:!0,minRows:2,maxRows:4,onChange:e=>tr(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:We,"& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#ef4444"},"&.Mui-focused fieldset":{borderColor:"#ef4444",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#ef4444"))}}}}),(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,onClick:()=>$o(!1),variant:"outlined",sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Keep Delivery"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{""==rr?Lr("Enter FeedBack","error"):wr({selectedRow:Jo,cancelFeed:rr}),(async()=>{console.log("cancelridernotification",Jo);try{return(await h.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/notifyuser"),{token:Jo.userfcmtoken,notification:{title:"NearleXpress",body:"".concat(Jo.orderid," have been Cancelled"),sound:"ring",image:""},data:{type:"cancel"}})).data}catch(e){Lr(e.message,"error",2e3),console.log(e)}})()},autoFocus:!0,sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#ef4444",boxShadow:"0 6px 18px ".concat(De("#ef4444")),"&:hover":{bgcolor:"#dc2626"}},children:"Yes, Cancel"})]})]})})]}),(0,xe.jsxs)(O.A,{open:er,onClose:()=>or(!1),maxWidth:"sm",fullWidth:!0,TransitionComponent:q.s,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #8b5cf6 0%, ".concat(ze("#8b5cf6")," 100%)")}}),(0,xe.jsx)(B.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#8b5cf6"),color:"#8b5cf6"},children:(0,xe.jsx)(u.bsz,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Change Rider"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"Assign this delivery to a different rider"})]})]})}),(0,xe.jsx)(N.A,{sx:{p:3,pt:2},children:(0,xe.jsx)(y.A,{fullWidth:!0,options:rt,PaperComponent:Ne,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),onChange:(e,o)=>{nr(o),i.A.debug("Rider selected in dropdown:",o?"".concat(o.firstname," ").concat(o.lastname):"None")},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#8b5cf6",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Ie()}))})}),(0,xe.jsx)(J.A,{sx:{p:3,pt:1},children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,variant:"outlined",onClick:()=>or(!1),sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Cancel"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{Zo(!0),i.A.info("Initiating rider assignment change for order ID ".concat(null===Jo||void 0===Jo?void 0:Jo.orderid," to rider: ").concat(null===ir||void 0===ir?void 0:ir.firstname," ").concat(null===ir||void 0===ir?void 0:ir.lastname)),Ir.mutate({selectedRider:ir,selectedRow:Jo})},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#8b5cf6",boxShadow:"0 6px 18px ".concat(De("#8b5cf6")),"&:hover":{bgcolor:"#7c3aed"}},children:"Change Rider"})]})})]}),(0,xe.jsxs)(O.A,{open:to,onClose:()=>io(!1),fullScreen:r,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #f59e0b 0%, ".concat(ze("#f59e0b")," 100%)")}}),(0,xe.jsx)(B.A,{align:"left",sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#f59e0b"),color:"#f59e0b"},children:(0,xe.jsx)(u.tjE,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Date Range"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"Pick a window to filter the deliveries"})]})]})}),(0,xe.jsx)(N.A,{sx:{width:"100%"},className:"datedialog",children:(0,xe.jsx)($.U,{open:to,toggle:()=>io(!to),id:"daterange1",onChange:e=>{"All"===e.label?(Qe(""),_e(""),io(!1)):(Qe(a()(e.startDate).format("YYYY-MM-DD")),_e(a()(e.endDate).format("YYYY-MM-DD")),e.label?lo(e.label):lo("")),console.log(e)},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,G.A)(new Date,-1),endDate:(0,G.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,G.A)(new Date,1),endDate:(0,G.A)(new Date,1)},{label:"This Week",startDate:(0,Z.A)(new Date),endDate:(0,U.A)(new Date)},{label:"Last Week",startDate:(0,Z.A)((0,V.A)(new Date,-1)),endDate:(0,U.A)((0,V.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,V.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,Q.A)(new Date),endDate:(0,X.A)(new Date)},{label:"Last Month",startDate:(0,Q.A)((0,_.A)(new Date,-1)),endDate:(0,X.A)((0,_.A)(new Date,-1))}]})}),(0,xe.jsx)(w.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2.5,pt:1},children:(0,xe.jsx)(H.A,{variant:"contained",onClick:()=>{io(!1)},sx:{borderRadius:999,px:3,py:1,fontWeight:800,bgcolor:"#f59e0b",boxShadow:"0 6px 18px ".concat(De("#f59e0b")),"&:hover":{bgcolor:"#d97706"}},children:"Apply"})})]}),(0,xe.jsxs)(O.A,{fullWidth:!0,open:Be,onClose:Yr,scroll:"paper",maxWidth:"sm",fullScreen:r,TransitionComponent:q.s,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #10b981 0%, ".concat(ze("#10b981")," 100%)")}}),(0,xe.jsx)(B.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#10b981"),color:"#10b981"},children:(0,xe.jsx)(u.mU9,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Update Delivery Status"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:null!==fo&&void 0!==fo&&fo.orderid?"Order #".concat(fo.orderid):"Modify delivery details"})]})]})}),(0,xe.jsx)(N.A,{dividers:!0,sx:{p:3,bgcolor:We},children:(0,xe.jsxs)(j.Ay,{container:!0,spacing:2,children:[[{label:"KMs",value:so,set:e=>co(e),color:"#ef4444"},{label:"Actual KMs",value:ao,set:e=>ho(+e),color:"#10b981"},{label:"Delivery Latitude",value:Ao,set:e=>bo(e),color:"#06b6d4"},{label:"Delivery Longitude",value:mo,set:e=>jo(e),color:"#06b6d4"}].map((e=>(0,xe.jsxs)(j.Ay,{item:!0,xs:12,sm:6,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:e.label}),(0,xe.jsx)(C.A,{fullWidth:!0,value:e.value,type:"number",onChange:o=>e.set(o.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:e.color},"&.Mui-focused fieldset":{borderColor:e.color,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(e.color))}}}})]},e.label))),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Amount"}),(0,xe.jsx)(C.A,{fullWidth:!0,type:"number",value:xo,onChange:e=>uo(+e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#10b981"},"&.Mui-focused fieldset":{borderColor:"#10b981",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#10b981"))}}}})]}),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Status"}),(0,xe.jsx)(C.A,{select:!0,fullWidth:!0,value:yo,onChange:e=>Wo(e.target.value),SelectProps:{MenuProps:{PaperProps:{sx:{borderRadius:2,mt:.5,boxShadow:ve}}}},sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))}}},children:["pending","accepted","started","arrived","delivered","cancelled"].map((e=>{const o=Le[e]||{label:e,color:"#662582",icon:u.bfP},r=o.icon;return(0,xe.jsxs)(K.A,{value:e,sx:{gap:1},children:[(0,xe.jsx)(He,{color:o.color,size:22,children:(0,xe.jsx)(r,{size:13})}),o.label]},e)}))})]}),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Notes"}),(0,xe.jsx)(C.A,{value:po,fullWidth:!0,multiline:!0,minRows:2,onChange:e=>go(e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))}}}})]})]})}),(0,xe.jsx)(J.A,{sx:{p:3},children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,variant:"outlined",onClick:Yr,sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Close"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{so?ao?Ao?mo?xo?lt.mutate({deliveryid:fo.deliveryid,orderheaderid:fo.orderheaderid,orderstatus:yo,deliverytime:a()().format("YYYY-MM-DD HH:mm:ss"),deliverylat:Ao,deliverylong:mo,kms:so,cumulativekms:ao,deliveryamt:parseFloat(xo),notes:po,userid:+Jo.userid}):Lr("Fill Delivery Amount","warning"):Lr("Fill Delivery Longitude","warning"):Lr("Fill Delivery Latitude","warning"):Lr("Fill Actual Kms","warning"):Lr("Fill Kms","warning")},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#10b981",boxShadow:"0 6px 18px ".concat(De("#10b981")),"&:hover":{bgcolor:"#059669"}},children:"Update"})]})})]})]})}},23787:(e,o,r)=>{r.d(o,{FG:()=>u,nV:()=>h,pY:()=>p,pg:()=>x});var t=r(89379),i=r(80045),n=r(93230),l=r(2235),s=r(16491),d=r(82053),c=r(44414);const a=["children","scroll","onScroll","sx"],h=e=>{let{children:o,scroll:r=!1,onScroll:l,sx:s}=e,d=(0,i.A)(e,a);return(0,c.jsx)(n.A,(0,t.A)((0,t.A)({spacing:1.25,onScroll:l,sx:(0,t.A)((0,t.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},d),{},{children:o}))},x=e=>{let{accent:o="#662582",header:r,footer:i,selected:n=!1,onClick:d,children:a,sx:h}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:d,sx:(0,t.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?o:"#e2e8f0",background:n?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,a,i]})]})},u=e=>{let{children:o,columns:r=2,sx:i}=e;return(0,c.jsx)(s.A,{sx:(0,t.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:o})},p=e=>{let{label:o,value:r,children:t,full:i=!1,align:n="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,c.jsx)(d.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==t?t:(0,c.jsx)(d.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,o,r)=>{r.d(o,{A:()=>s});var t=r(93230),i=r(16491),n=r(82053),l=r(44414);function s(e){let{title:o,subtitle:r,live:s=!1,action:d}=e;return(0,l.jsxs)(t.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(i.A,{sx:{minWidth:0},children:[(0,l.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:o}),r&&(0,l.jsxs)(t.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(i.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),d&&(0,l.jsx)(i.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:d})]})}},36803:(e,o,r)=>{r.d(o,{A:()=>h});var t=r(48089),i=r(50704),n=r(93230),l=r(16491),s=r(82053),d=r(82917),c=r(41413),a=r(44414);function h(e){let{title:o,value:r,icon:h,color:x="#662582",caption:u,loading:p=!1}=e;return(0,a.jsx)(t.A,{sx:{height:"100%"},children:(0,a.jsx)(i.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,a.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,a.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,a.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),p?(0,a.jsx)(d.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,a.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),u&&(0,a.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),h&&(0,a.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(x,"14"),color:x,flexShrink:0},children:h})]})})})}},56311:(e,o,r)=>{r.d(o,{A:()=>u});var t=r(89379),i=r(9950),n=r(2660),l=r(2046),s=r(83274),d=r(25333),c=r(97125),a=r(7762),h=r(52097),x=r(44414);const u=e=>{let{value:o,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:g="Search (ctrl+k)",sx:f}=e;const v=(0,i.useRef)(null),[A]=(0,h.d7)(o,p);return(0,i.useEffect)((()=>{u&&u(A)}),[A,u]),(0,i.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=v.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===v.current&&v.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,x.jsx)(n.A,{sx:(0,t.A)({},f),inputRef:v,placeholder:g,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,x.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,x.jsx)(c.A,{})}),endAdornment:(0,x.jsx)(s.A,{title:"Clear",children:(0,x.jsx)(d.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>r(""),children:(0,x.jsx)(a.A,{})})})})}},58691:(e,o,r)=>{r.d(o,{A:()=>s});r(9950);var t=r(16491),i=r(46639),n=r(62217),l=r(44414);function s(e){let{size:o=70,imgSize:r=40,alt:s="loader"}=e;return(0,l.jsxs)(t.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(i.A,{size:o}),(0,l.jsx)(t.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,l.jsx)("img",{src:n,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,r)=>{r.d(o,{A:()=>x});var t=r(89379),i=r(9950),n=r(93230),l=r(41413),s=r(77922),d=r(29925),c=r(26910),a=r(31222),h=r(44414);const x=(0,i.forwardRef)(((e,o)=>{let{setAppId:r,setLocoName:x,setPage:u,sx:p,textfeildSx:g,textfieldSx:f,pill:v=!1,accentColor:A="#6366f1",icon:b,placeholder:m="Select Zone",paperComponent:j}=e;const[w,S]=(0,i.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,i.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(A).concat(e),W=y("26"),C=y("18"),k=v?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(W)},"&.Mui-focused fieldset":{borderColor:A,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},R=v&&(0,h.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,h.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:A,transition:"background-color 0.15s, color 0.15s"},children:b||(0,h.jsx)(a.HPi,{size:14})})});return(0,h.jsx)(s.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:j,sx:(0,t.A)({},p),onChange:(e,o,t)=>{"clear"===t?(null===r||void 0===r||r(0),null===x||void 0===x||x(""),null===u||void 0===u||u(0)):o&&(null===r||void 0===r||r(o.applocationid),null===x||void 0===x||x(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>v?(0,h.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,placeholder:m,InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,t.A)((0,t.A)({},k),f||g||{})})):(0,h.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,t.A)({},f||g||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,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"},96646:(e,o,r)=>{r.d(o,{r:()=>d});var t=r(9213),i=r(21671),n=r(82917),l=r(93230),s=r(44414);const d=e=>{let{rowsPerPage:o=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(t.A,{children:[(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,o)=>(0,s.jsx)(i.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(n.A,{variant:"text",width:100}),(0,s.jsx)(n.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"text",width:150})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(i.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2851],{22851:(e,o,r)=>{r.r(o),r.d(o,{default:()=>Be});var t=r(89379),i=r(85571),n=r(8881),l=r(24513),s=r(36256),d=r(9950),c=r(4159),a=r.n(c),h=r(26910),x=r(14857),u=r(31222),p=r(51778),g=r(36150),f=r(60010),v=r(2235),A=r(41413),b=r(47223),m=r(55158),j=r(60899),w=r(93230),S=r(82053),y=r(77922),W=r(25277),C=r(29925),k=r(16491),R=r(1320),z=r(93038),D=r(25333),P=r(15769),I=r(69780),L=r(9213),M=r(21671),Y=r(34075),T=r(83274),F=r(33738),E=r(17239),K=r(23266),O=r(96583),N=r(28170),H=r(10226),B=r(40033),J=r(79739),q=r(37476),G=r(56712),Z=r(81417),U=r(96600),V=r(53132),Q=r(94289),X=r(57326),_=r(50624),$=r(55916),ee=r(52351),oe=r(67562),re=r(49883),te=r(81425),ie=r(56311),ne=r(20466),le=r(96646),se=r(59212),de=r(58691),ce=r(27001),ae=r(36803),he=r(23787),xe=r(44414),ue=r(36220);a().extend(ue);const pe=14,ge=10,fe="0 1px 3px rgba(15, 23, 42, 0.06)",ve="0 12px 32px rgba(15, 23, 42, 0.12)",Ae="#0f172a",be="#64748b",me="#94a3b8",je="#e2e8f0",we="#cbd5e1",Se="#f1f5f9",ye="#ffffff",We="#f8fafc",Ce="#662582",ke=(e,o)=>"".concat(e).concat(o),Re=e=>ke(e,"08"),ze=e=>ke(e,"18"),De=e=>ke(e,"26"),Pe=e=>ke(e,"55"),Ie=()=>({cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:ge+"px",bgcolor:ye,fontWeight:600,color:Ae,paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:je,borderWidth:1},"&:hover fieldset":{borderColor:we},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(Ce))},"&.Mui-focused fieldset":{borderColor:Ce,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:me}}),Le={pending:{label:"Pending",color:"#f59e0b",icon:u.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:u.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:u.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:u.gsJ},active:{label:"Active",color:"#14b8a6",icon:u.pk7},skipped:{label:"Skipped",color:"#f97316",icon:u.ivF},delivered:{label:"Delivered",color:"#10b981",icon:u.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:u.uDv}},Me=[{status:"pending",countKey:"uncoveredLength"},{status:"accepted",countKey:"assignedLength"},{status:"arrived",countKey:"arrivedLength"},{status:"picked",countKey:"pickedLength"},{status:"active",countKey:"activeLength"},{status:"skipped",countKey:"skippedLength"},{status:"delivered",countKey:"coveredLength"},{status:"cancelled",countKey:"cancelLength"}],Ye=[{key:"created",label:"Created Orders",color:"#0ea5e9",icon:u.HU2},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:u.G6c},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:u.cAP},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:u.qiG}],Te=[{id:"all",label:"All Batches",range:"Across the day",color:"#7c3aed",iconKey:"all"},{id:"morning",label:"Morning Batch",range:"12 AM to 8 AM",color:"#0ea5e9",iconKey:"morning",startHour:0,endHour:8},{id:"afternoon",label:"Afternoon Batch",range:"9 AM to 12:30 PM",color:"#f59e0b",iconKey:"afternoon",startHour:9,endHour:12.5},{id:"evening",label:"Evening Batch",range:"4 PM to 7 PM",color:"#6366f1",iconKey:"evening",startHour:16,endHour:19}],Fe={all:u.lB9,morning:u.N3N,afternoon:u.aSE,evening:u.giK},Ee=()=>{const e=a()(),o=e.hour()+e.minute()/60;for(const r of Te)if("all"!==r.id&&o>=r.startHour&&o{let o=null;for(const n of Ke)if(null!==e&&void 0!==e&&e[n]){o=e[n];break}if(!o)return null;const r=String(o).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return null;const t=a()(o);if(!t.isValid())return null;const i=t.hour()+t.minute()/60;for(const n of Te)if("all"!==n.id&&i>=n.startHour&&i(0,xe.jsx)(v.A,(0,t.A)((0,t.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:ve,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),He=e=>{let{color:o,selected:r,size:t=24,children:i}=e;return(0,xe.jsx)(A.A,{sx:{width:t,height:t,bgcolor:r?o:ze(o),color:r?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:i})},Be=()=>{const e=localStorage.getItem("userid"),o=(0,x.A)(),r=(0,b.A)(o.breakpoints.down("md")),c=(0,d.useRef)(),ue=(0,d.useRef)(),[ke,Ke]=(0,d.useState)([]),[Be,Je]=(0,d.useState)(!1),[qe,Ge]=(0,d.useState)("All"),[Ze,Ue]=(0,d.useState)(0),[Ve,Qe]=(0,d.useState)(a()().format("YYYY-MM-DD")),[Xe,_e]=(0,d.useState)(a()().format("YYYY-MM-DD")),[$e,eo]=(0,d.useState)("Pending"),[oo,ro]=(0,d.useState)(0),[to,io]=(0,d.useState)(!1),[no,lo]=(0,d.useState)("Today"),[so,co]=(0,d.useState)(""),[ao,ho]=(0,d.useState)(),[xo,uo]=(0,d.useState)(),[po,go]=(0,d.useState)(""),[fo,vo]=(0,d.useState)({}),[Ao,bo]=(0,d.useState)(""),[mo,jo]=(0,d.useState)(""),[wo,So]=(0,d.useState)("pending"),[yo,Wo]=(0,d.useState)("delivered"),Co=(0,d.useRef)(null),ko=(0,d.useRef)(null),[Ro,zo]=d.useState(0),[Do,Po]=d.useState(50),[Io,Lo]=d.useState(),[Mo,Yo]=(0,d.useState)(null),[To,Fo]=(0,d.useState)(null),[Eo,Ko]=(0,d.useState)(""),[Oo,No]=(0,d.useState)(""),[Ho,Bo]=d.useState(null),[Jo,qo]=(0,d.useState)(null),[Go,Zo]=(0,d.useState)(!1),[Uo,Vo]=d.useState(null),[Qo,Xo]=(0,d.useState)(""),[_o,$o]=(0,d.useState)(!1),[er,or]=(0,d.useState)(!1),[rr,tr]=(0,d.useState)(""),[ir,nr]=(0,d.useState)(null),[lr,sr]=(0,d.useState)(0),[dr,cr]=(0,d.useState)(0),[ar,hr]=(0,d.useState)(null),[xr,ur]=(0,d.useState)(null),[pr,gr]=(0,d.useState)(0),[fr,vr]=(0,d.useState)(Ee),Ar=localStorage.getItem("roleid");(0,d.useEffect)((()=>{sr(0),hr(null),cr(0),ur(null)}),[Ze]),(0,d.useEffect)((()=>{cr(0),ur(null)}),[lr]);const br=Boolean(Ho),mr=(e,o)=>{qo(o),console.log("selectedRow",o),Bo(e.currentTarget)},jr=()=>{Bo(null)},{mutate:wr}=(0,p.n)({mutationFn:e=>{let{selectedRow:o,cancelFeed:r}=e;return(0,te.zF)(o,r)},onSuccess:()=>{Lr("Delivery Cancelled Successfully","success"),$o(!1),ot(),Kr(),qr()},onError:e=>{Lr(e.message,"error")}}),{data:Sr,isLoading:yr,isError:Wr,error:Cr}=(0,g.I)({queryKey:["tenantlist",Ze],queryFn:()=>(0,te.Mn)(Ze),enabled:0!==Ze}),{data:kr,isLoading:Rr,isError:zr,error:Dr}=(0,g.I)({queryKey:["gettenantlocations",lr],queryFn:()=>(0,te.DL)(lr),enabled:0!==lr}),Pr=(0,p.n)({mutationFn:te.k3,onSuccess:()=>{(0,n.M8)("Notification sent Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},onError:e=>{(0,n.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}}),Ir=(0,p.n)({mutationFn:e=>{let{selectedRider:o,selectedRow:r}=e;return(0,te.R_)(o,r)},onSuccess:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;Zo(!1),or(!1),"Success"===e.data.message&&(i.A.info("Rider changed successfully for order ID ".concat(null===t||void 0===t?void 0:t.orderid,". New Rider: ").concat(null===r||void 0===r?void 0:r.firstname," ").concat(null===r||void 0===r?void 0:r.lastname)),Lr("Rider Changed Successfully","success")),ot(),Kr(),qr(),Pr.mutate(r.userfcmtoken)},onError:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;i.A.error("Failed to change rider for order ID ".concat(null===t||void 0===t?void 0:t.orderid,":"),e),Lr(e.message,"error"),Zo(!1)}}),Lr=(e,o)=>{(0,n.M8)(e,{variant:o,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},{data:Mr}=(0,g.I)({queryKey:["orderdetails",To],queryFn:()=>(0,te.z3)(To),enabled:!!To}),Yr=()=>{Je(!1)},{isLoading:Tr,isError:Fr,error:Er,refetch:Kr}=(0,f.q)({queryKey:["fetchdeliveries",Ze,e,wo,Ve,Xe,Do,Oo,lr,dr,pr],queryFn:te.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),{data:Or,fetchNextPage:Nr,hasNextPage:Hr,isFetchingNextPage:Br,isLoading:Jr,refetch:qr}=(0,f.q)({queryKey:["fetchdeliveries-batchcounts",Ze,e,"all",Ve,Xe,200,"",lr,dr,pr],queryFn:te.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),Gr=(0,d.useMemo)((()=>((null===Or||void 0===Or?void 0:Or.pages)||[]).flatMap((e=>e.rows||[]))),[Or]);(0,d.useEffect)((()=>{Hr&&!Br&&Nr()}),[Hr,Br,Nr,Gr.length]);const Zr=Hr||Br,Ur=(0,d.useMemo)((()=>{const e=String(wo||"").toLowerCase(),o=String(Oo||"").trim().toLowerCase();return Gr.filter((r=>{if("all"!==fr&&Oe(r)!==fr)return!1;const t=String(r.orderstatus||"").toLowerCase();if(e&&t!==e)return!1;if(o){if(![r.deliverycustomer,r.deliveryaddress,r.deliverysuburb,r.pickupcustomer,r.pickupaddress,r.pickupsuburb,r.orderid,r.tenantname,r.ridername,r.username].map((e=>String(e||"").toLowerCase())).join(" ").includes(o))return!1}return!0}))}),[Gr,fr,wo,Oo]),Vr=(0,d.useMemo)((()=>{const e={uncoveredLength:0,assignedLength:0,arrivedLength:0,pickedLength:0,activeLength:0,skippedLength:0,coveredLength:0,cancelLength:0};return Gr.forEach((o=>{if("all"!==fr&&Oe(o)!==fr)return;switch(String(o.orderstatus||"").toLowerCase()){case"pending":e.uncoveredLength+=1;break;case"accepted":case"assigned":e.assignedLength+=1;break;case"arrived":e.arrivedLength+=1;break;case"picked":e.pickedLength+=1;break;case"active":e.activeLength+=1;break;case"skipped":e.skippedLength+=1;break;case"delivered":e.coveredLength+=1;break;case"cancelled":case"canceled":e.cancelLength+=1}})),e}),[Gr,fr]),Qr=(0,d.useMemo)((()=>{const e={all:0};return Te.forEach((o=>{"all"!==o.id&&(e[o.id]=0)})),Gr.forEach((o=>{const r=Oe(o);r&&(e[r]=(e[r]||0)+1,e.all+=1)})),e}),[Gr]);(0,d.useEffect)((()=>{if(!Hr)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Nr()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Hr,Nr]);const{data:Xr={},isLoading:_r,isError:$r,error:et,refetch:ot}=(0,g.I)({queryKey:["fetchCountData",Ze,e,Ve,Xe,Do,Oo,lr,dr,pr,$e],queryFn:()=>(0,te.qB)(Ze,e,Ve,Xe,Do,Oo,lr,dr,pr)});(0,d.useEffect)((()=>{console.log("countData",Xr),0===oo&&Xr&&Lo(Xr.uncoveredLength)}),[Xr]);const{data:rt=[],isLoading:tt,isError:it,error:nt}=(0,g.I)({queryKey:["ridersList",Ze],queryFn:te.Sd,enabled:Boolean(Ze),onError:e=>{(0,ne.k)(e.message,"error",2e3)}}),lt=(0,p.n)({mutationFn:e=>(0,te.wT)(e),onSuccess:e=>{console.log(e),e.data.status&&(Lr("Updated Successfully","success"),uo(""),go(""),Je(!1),Kr(),ot(),qr())},onError:e=>{console.log(e),Lr(e.message,"success")}}),st=Fr?"Error fetching deliveries: ".concat(null===Er||void 0===Er?void 0:Er.message):$r?"Error fetching count summary: ".concat(null===et||void 0===et?void 0:et.message):it?"Error fetching riders: ".concat(null===nt||void 0===nt?void 0:nt.message):Wr?"Error tenant list: ".concat(null===Cr||void 0===Cr?void 0:Cr.message):zr?"Error location list: ".concat(null===Dr||void 0===Dr?void 0:Dr.message):null;return st?(console.log("errorMessage",st),(0,ne.k)(st,"error",2e3),null):(0,xe.jsxs)(xe.Fragment,{children:[(_r||Jr||yr||Rr||tt)&&(0,xe.jsx)(xe.Fragment,{children:(0,xe.jsx)(ee.A,{})}),(0,xe.jsx)(m.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:_r||Tr||yr||Rr||tt}),(0,xe.jsx)(ce.A,{title:"Deliveries",subtitle:"Live \xb7 ".concat(qe||"All Zones"),live:!0,action:(0,xe.jsx)(se.A,{ref:Co,locaName:qe,setAppId:Ue,setLocoName:Ge,setPage:zo,pill:!0,accentColor:"#662582",icon:(0,xe.jsx)(u.HPi,{size:14}),placeholder:"Select Zone",paperComponent:Ne,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,xe.jsx)(j.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:[(0,t.A)((0,t.A)({},Ye[0]),{},{value:Qr.all,percentage:null}),(0,t.A)((0,t.A)({},Ye[1]),{},{value:null===Xr||void 0===Xr?void 0:Xr.uncoveredLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.uncoveredLength/Xr.total*100):0}),(0,t.A)((0,t.A)({},Ye[2]),{},{value:null===Xr||void 0===Xr?void 0:Xr.coveredLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.coveredLength/Xr.total*100):0}),(0,t.A)((0,t.A)({},Ye[3]),{},{value:null===Xr||void 0===Xr?void 0:Xr.cancelLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.cancelLength/Xr.total*100):0})].map((e=>{var o;const r=e.icon,t="number"===typeof e.percentage?e.percentage:Number(e.percentage),i=!Number.isNaN(t)&&void 0!==e.percentage&&null!==e.percentage;return(0,xe.jsx)(j.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,xe.jsx)(ae.A,{title:e.label,value:null!==(o=e.value)&&void 0!==o?o:0,icon:(0,xe.jsx)(r,{size:20}),color:e.color,loading:_r,caption:i?"".concat(Math.abs(t),"% of total"):void 0})},e.key)}))}),(0,xe.jsxs)(v.A,{elevation:0,sx:{mt:{xs:1.5,md:2},mb:{xs:1.5,md:2},p:{xs:1.5,md:2},borderRadius:pe/8,border:"1px solid",borderColor:je,background:"#fff",boxShadow:fe},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:{xs:1,md:1.5},color:be},children:[(0,xe.jsx)(A.A,{sx:{width:28,height:28,bgcolor:ze("#662582"),color:"#662582"},children:(0,xe.jsx)(u.MiI,{size:16})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.6,textTransform:"uppercase",color:be},children:"Filters"})]}),(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:1.25,sx:{flexWrap:"wrap"},children:[(0,xe.jsxs)(w.A,{direction:"row",flexWrap:"wrap",gap:1.5,alignItems:"center",children:[(()=>{const e=Te.find((e=>e.id===fr))||Te[0],o=Fe[e.iconKey]||u.VP9;return(0,xe.jsx)(y.A,{disableClearable:!0,size:"small",openOnFocus:!0,selectOnFocus:!0,filterOptions:e=>e,options:Te,value:e,onChange:(e,o)=>o&&vr(o.id),getOptionLabel:e=>e.label,isOptionEqualToValue:(e,o)=>e.id===o.id,PaperComponent:Ne,ListboxProps:{sx:{py:0,maxHeight:360}},renderOption:(e,o,r)=>{var i;let{selected:n}=r;const l=Fe[o.iconKey]||u.VP9,s=null!==(i=Qr[o.id])&&void 0!==i?i:0;return(0,d.createElement)("li",(0,t.A)((0,t.A)({},e),{},{key:o.id,style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderBottom:"1px solid #f1f5f9",backgroundColor:n?"".concat(o.color,"10"):"transparent",transition:"background-color 0.15s"}}),(0,xe.jsx)(A.A,{sx:{width:36,height:36,bgcolor:n?o.color:"".concat(o.color,"18"),color:n?"#fff":o.color,transition:"background-color 0.15s, color 0.15s"},children:(0,xe.jsx)(l,{size:20})}),(0,xe.jsxs)(w.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,xe.jsx)(S.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:o.label}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:o.range})]}),(0,xe.jsx)(W.A,{size:"small",label:s,sx:{minWidth:36,height:22,fontWeight:800,fontSize:11,bgcolor:s>0?"".concat(o.color,"18"):"#f1f5f9",color:s>0?o.color:"#94a3b8",border:"1px solid ".concat(s>0?o.color+"55":"#e2e8f0"),"& .MuiChip-label":{px:.75}}}),n&&(0,xe.jsx)(A.A,{sx:{width:22,height:22,bgcolor:o.color,color:"#fff"},children:(0,xe.jsx)(u.g9_,{size:14})}))},renderInput:r=>{var i;return(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},r),{},{placeholder:"Batch",inputProps:(0,t.A)((0,t.A)({},r.inputProps),{},{readOnly:!0,style:(0,t.A)((0,t.A)({},(null===(i=r.inputProps)||void 0===i?void 0:i.style)||{}),{},{cursor:"pointer",caretColor:"transparent"})}),InputProps:(0,t.A)((0,t.A)({},r.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(A.A,{sx:{width:24,height:24,bgcolor:"".concat(e.color,"18"),color:e.color},children:(0,xe.jsx)(o,{size:14})})})}),sx:{minWidth:{xs:180,sm:220,md:240},cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}}))}})})(),Ve&&Xe&&(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.75,onClick:()=>io(!0),sx:{pl:.5,pr:1.25,py:.5,borderRadius:"10px",cursor:"pointer",bgcolor:"#ffffff",border:"1px solid #e2e8f0",transition:"border-color 0.15s","&:hover":{borderColor:"#cbd5e1"}},children:[(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.tjE,{size:14})}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{fontWeight:600,color:"#475569",whiteSpace:"nowrap"},children:[a()(Ve).format("DD MMM")," \u2013 ",a()(Xe).format("DD MMM")]})]})]}),(0,xe.jsx)(y.A,{disablePortal:!0,options:Sr||[],value:ar,PaperComponent:Ne,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{Ze||(e.preventDefault(),(0,ne.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(sr(0),hr(null),cr(0),ur(null)):(sr((null===o||void 0===o?void 0:o.tenantid)||0),hr(o),cr(0),ur(null))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{inputRef:ko,placeholder:"Select Tenant",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.gl1,{size:14})})})}),sx:Ie()}))}),(0,xe.jsx)(y.A,{disablePortal:!0,options:kr||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,value:xr,PaperComponent:Ne,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{Ze||lr?lr||(e.preventDefault(),(0,ne.k)("Please select your Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=ko.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,ne.k)("Please select your Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(cr(0),ur(null)):(cr(o.locationid||0),ur(o))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Select Location",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.gwi,{size:14})})})}),sx:Ie()}))}),(0,xe.jsx)(y.A,{disabled:tt,options:rt,PaperComponent:Ne,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onChange:(e,o,r)=>{gr("clear"===r?0:o.userid)},onOpen:e=>{Ze||(e.preventDefault(),(0,ne.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Ie()}))})]})]}),(0,xe.jsx)(v.A,{elevation:0,sx:{p:{xs:1,md:1.5},borderTopLeftRadius:pe/8,borderTopRightRadius:pe/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:je,borderBottom:0,background:"#fff"},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,xe.jsx)(w.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:je,borderRadius:4}},children:Me.map(((e,o)=>{var r;const t=Le[e.status],i=t.icon,n=oo===o,l=null!==(r=Vr[e.countKey])&&void 0!==r?r:0;return(0,xe.jsxs)(k.A,{onClick:e=>{return r=o,zo(0),ro(r),Po(50),0===r&&(eo("Pending"),So("pending"),Lo(null===Xr||void 0===Xr?void 0:Xr.uncoveredLength)),1===r&&(eo("Assigned"),So("accepted"),Lo(null===Xr||void 0===Xr?void 0:Xr.assignedLength)),2===r&&(eo("Arrived"),So("arrived"),Lo(null===Xr||void 0===Xr?void 0:Xr.arrivedLength)),3===r&&(eo("Picked"),So("picked"),Lo(null===Xr||void 0===Xr?void 0:Xr.pickedLength)),4===r&&(eo("Active"),So("active"),Lo(null===Xr||void 0===Xr?void 0:Xr.activeLength)),5===r&&(eo("Skipped"),So("skipped"),Lo(null===Xr||void 0===Xr?void 0:Xr.skippedLength)),6===r&&(eo("Delivered"),So("delivered"),Lo(null===Xr||void 0===Xr?void 0:Xr.coveredLength)),7===r&&(eo("Cancelled"),So("cancelled"),Lo(null===Xr||void 0===Xr?void 0:Xr.cancelLength)),console.log(r),void Ko("");var r},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:ge+"px",border:"1px solid ".concat(n?t.color:je),bgcolor:n?t.color:ye,color:n?"#fff":be,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:n?t.color:we,bgcolor:n?t.color:We}},children:[(0,xe.jsx)(A.A,{sx:{width:{xs:20,md:22},height:{xs:20,md:22},bgcolor:n?"rgba(255,255,255,0.22)":ze(t.color),color:n?"#fff":t.color},children:(0,xe.jsx)(i,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:t.label}),(0,xe.jsx)(k.A,{sx:{minWidth:{xs:20,md:24},height:{xs:18,md:20},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:n?"rgba(255,255,255,0.22)":We,color:n?"#fff":be,border:"none"},children:l})]},e.status)}))}),(0,xe.jsx)(k.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,xe.jsx)(ie.A,{value:Eo,onChange:Ko,onDebouncedChange:No,sx:{m:0,width:"100%",borderRadius:ge+"px",bgcolor:ye,"& fieldset":{borderColor:je,borderWidth:1},"&:hover fieldset":{borderColor:we},"&.Mui-focused fieldset":{borderColor:Ce,borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(Ce))}}})})]})}),(0,xe.jsx)(v.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:pe/8,borderBottomRightRadius:pe/8,border:"1px solid",borderColor:je,overflow:"hidden",background:"#fff"},children:(0,xe.jsx)(R.A,{ref:ue,onScroll:e=>{const{scrollTop:o,scrollHeight:r,clientHeight:t}=e.currentTarget;o+t>=r-50&&Hr&&!Br&&Nr()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto",overflowX:"auto","&::-webkit-scrollbar":{width:"10px",height:"10px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:Pe("#662582"),borderRadius:"8px",cursor:"pointer","&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:We}},children:((e,o,i,n,s,h)=>{const x="Cancelled"!==$e&&"Delivered"!==$e,p="Created"==$e,g=15+(x?1:0)+(p?1:0);return r?(0,xe.jsxs)(he.nV,{sx:{p:1.25},children:[0===Ur.length&&!Go&&!Zr&&(0,xe.jsxs)(w.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#94a3b8"),color:me},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(S.A,{variant:"subtitle1",sx:{fontWeight:700,color:Ae},children:"No deliveries to show"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,textAlign:"center",px:2},children:"all"===fr?"No ".concat(((null===(e=Le[wo])||void 0===e?void 0:e.label)||$e).toLowerCase()," orders for this filter."):"No ".concat(((null===(o=Le[wo])||void 0===o?void 0:o.label)||$e).toLowerCase()," orders in ").concat((null===(i=Te.find((e=>e.id===fr)))||void 0===i?void 0:i.label)||"this batch",".")})]}),0===Ur.length&&Zr&&(0,xe.jsxs)(w.A,{alignItems:"center",sx:{py:6},children:[(0,xe.jsx)(de.A,{}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading deliveries\u2026"})]}),Ur.map(((e,o)=>{var r,i,n,s,d,c,h,g;const f=Le[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},v=f.icon,A=!!ke.find((o=>o.orderheaderid==e.orderheaderid)),b=(null===Mo||void 0===Mo?void 0:Mo.orderid)===(null===e||void 0===e?void 0:e.orderid),m=e=>({display:"inline-flex",alignItems:"center",justifyContent:"center",color:e,fontWeight:700,fontSize:12,whiteSpace:"nowrap"});return(0,xe.jsxs)(he.pg,{accent:f.color,selected:A,header:(0,xe.jsxs)(w.A,{spacing:1.25,children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[p&&(0,xe.jsx)(z.A,{size:"small",sx:{p:.25},onChange:o=>{if(o.target.checked){let o=ke;o.push((0,t.A)((0,t.A)({},e),{},{sno:ke.length+1})),Ke([...o])}else{let o=ke.find((o=>o.orderheaderid==e.orderheaderid));if(o){let e=ke;e.splice(o.sno-1,1),e.map(((e,o)=>{e.sno=o+1})),Ke([...e])}}},checked:!!ke.find((o=>o.orderheaderid==e.orderheaderid))}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:me},children:String(Ro*Do+o+1).padStart(2,"0")}),(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:Re(f.color),border:"1px solid ".concat(Pe(f.color)),color:f.color},children:[(0,xe.jsx)(He,{color:f.color,size:18,children:(0,xe.jsx)(v,{size:11})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:f.label})]})]}),(0,xe.jsxs)(w.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"==e.deliverytype&&(0,xe.jsx)(D.A,{size:"small",onClick:()=>{(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(Yo(null),Fo(null)):(Yo(e),Fo(e.orderheaderid))},sx:{borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(Pe("#06b6d4")),"&:hover":{bgcolor:ze("#06b6d4")}},children:b?(0,xe.jsx)(oe.A,{fontSize:"small"}):(0,xe.jsx)(re.A,{fontSize:"small"})}),x&&(0,xe.jsx)(D.A,{size:"small",onClick:o=>mr(o,e),sx:{borderRadius:999,bgcolor:Re("#662582"),color:"#662582",border:"1px solid ".concat(Pe("#662582")),"&:hover":{bgcolor:ze("#662582")}},children:(0,xe.jsx)(l.A,{})})]})]}),(0,xe.jsxs)(k.A,{sx:{minWidth:0},children:[(0,xe.jsx)(S.A,{sx:{fontWeight:800,color:Ae,fontSize:15},noWrap:!0,children:e.tenantname}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:[e.tenantsuburb,e.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:[(0,xe.jsxs)(he.FG,{children:[(0,xe.jsxs)(he.pY,{label:"Order / Location",full:!0,children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:[e.orderid," \xb7 ",e.deliveryid]})]}),(0,xe.jsxs)(he.pY,{label:"Pickup",children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:e.pickupcontactno})]}),(0,xe.jsxs)(he.pY,{label:"Drop",children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:e.deliverycontactno})]}),(0,xe.jsx)(he.pY,{label:"Rider",full:!0,children:e.ridername?(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:24,children:(0,xe.jsx)(u.bsz,{size:13})}),(0,xe.jsxs)(w.A,{sx:{minWidth:0},children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:700,color:Ae},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(he.pY,{label:"ETA",value:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"}),(0,xe.jsx)(he.pY,{label:"Transit",children:(0,xe.jsxs)(k.A,{sx:m("#06b6d4"),children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(he.pY,{label:"Kms \xb7 plan / act",children:(0,xe.jsxs)(w.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(k.A,{sx:m("#ef4444"),children:[e.kms||0," km"]}),(0,xe.jsxs)(k.A,{sx:m("#10b981"),children:[e.cumulativekms||0," km"]})]})}),(0,xe.jsx)(he.pY,{label:"Amount \xb7 chg / amt",children:(0,xe.jsxs)(w.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(k.A,{sx:m("#ef4444"),children:["\u20b9 ",null!==(i=null===(n=e.deliverycharges)||void 0===n?void 0:n.toFixed(2))&&void 0!==i?i:"0.00"]}),(0,xe.jsxs)(k.A,{sx:m("#10b981"),children:["\u20b9 ",null!==(s=null===(d=e.deliveryamt)||void 0===d?void 0:d.toFixed(2))&&void 0!==s?s:"0.00"]})]})}),(0,xe.jsx)(he.pY,{label:"Qty",value:e.Quantity||"\u2014"}),(0,xe.jsx)(he.pY,{label:"COD",children:(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:800,color:e.collectionamt?"#ef4444":me},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),(0,xe.jsx)(he.pY,{label:"Step",children:e.step?(0,xe.jsx)(k.A,{sx:(0,t.A)((0,t.A)({},m("#662582")),{},{minWidth:30,fontWeight:800}),children:e.step}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),e.notes&&(0,xe.jsx)(he.pY,{label:"Notes",full:!0,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.notes})})]}),b&&(0,xe.jsxs)(k.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:We,border:"1px solid ".concat(Se)},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,xe.jsx)(He,{color:"#662582",size:22,children:(0,xe.jsx)(u.gsJ,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#662582"},children:"Product Details"})]}),(0,xe.jsxs)(w.A,{spacing:1,children:[null===Mr||void 0===Mr||null===(c=Mr.details)||void 0===c?void 0:c.map(((e,o)=>(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.25,sx:{p:1,borderRadius:1.5,bgcolor:"#fff",border:"1px solid ".concat(Se)},children:[(0,xe.jsx)(k.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(Se),flexShrink:0}}),(0,xe.jsxs)(w.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(S.A,{variant:"body2",sx:{fontWeight:600,color:Ae},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:["Qty ",(null===e||void 0===e?void 0:e.orderqty)||0," \xb7 \u20b9 ",(null===e||void 0===e?void 0:e.price)||0]})]}),(0,xe.jsxs)(S.A,{variant:"body2",sx:{fontWeight:800,color:Ae,flexShrink:0},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o))),(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"space-between",sx:{pt:.5},children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be},children:"Total Amount"}),(0,xe.jsxs)(S.A,{variant:"body2",sx:{fontWeight:800,color:"#10b981"},children:["\u20b9 ",null===Mr||void 0===Mr||null===(h=Mr.pricedetails)||void 0===h||null===(g=h.orderamount)||void 0===g?void 0:g.toFixed(2)]})]})]})]})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Gr||void 0===Gr?void 0:Gr.length)&&(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Br||Hr?(0,xe.jsx)(de.A,{}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"\xb7 End of list \xb7"})})]}):(0,xe.jsxs)(P.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,lg:1300,xl:1400}},children:[(0,xe.jsx)(I.A,{children:(0,xe.jsxs)(L.A,{sx:{"& th":{backgroundColor:We,color:be,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(je),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[p&&(0,xe.jsx)(M.A,{sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(z.A,{indeterminate:ke.length>0&&ke.length!=Ur.length,onChange:e=>{e.target.checked?Ke([...Ur]):Ke([])},checked:ke.length>0&&ke.length==Ur.length})}),(0,xe.jsx)(M.A,{children:"#"}),(0,xe.jsx)(M.A,{children:"Status"}),(0,xe.jsx)(M.A,{children:"Tenant"}),(0,xe.jsx)(M.A,{children:"Order / Location"}),(0,xe.jsx)(M.A,{children:"Pickup"}),(0,xe.jsx)(M.A,{children:"Drop"}),(0,xe.jsx)(M.A,{children:"Rider"}),(0,xe.jsx)(M.A,{children:"ETA"}),(0,xe.jsx)(M.A,{children:"Transit"}),(0,xe.jsx)(M.A,{children:"Kms"}),(0,xe.jsx)(M.A,{children:"Amount"}),(0,xe.jsx)(M.A,{children:"Notes"}),(0,xe.jsx)(M.A,{children:"Step"}),(0,xe.jsx)(M.A,{children:"Qty"}),(0,xe.jsx)(M.A,{children:"COD"}),x&&(0,xe.jsx)(M.A,{align:"right",children:"Action"})]})}),(Go||Jr)&&(0,xe.jsx)(le.r,{col:8}),(0,xe.jsxs)(Y.A,{children:[0==Ur.length&&!Go&&!Zr&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,sx:{py:6},children:(0,xe.jsxs)(w.A,{alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#94a3b8"),color:me},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(S.A,{variant:"subtitle1",sx:{fontWeight:700,color:Ae},children:"No deliveries to show"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"all"===fr?"No ".concat(((null===(n=Le[wo])||void 0===n?void 0:n.label)||$e).toLowerCase()," orders for this filter."):"No ".concat(((null===(s=Le[wo])||void 0===s?void 0:s.label)||$e).toLowerCase()," orders in ").concat((null===(h=Te.find((e=>e.id===fr)))||void 0===h?void 0:h.label)||"this batch",".")})]})})}),0==Ur.length&&Zr&&(0,xe.jsx)(L.A,{children:(0,xe.jsxs)(M.A,{colSpan:g,sx:{textAlign:"center",py:6},children:[(0,xe.jsx)(de.A,{}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1},children:"Loading deliveries\u2026"})]})}),Ur.map(((e,o)=>{var r,i,n,s,c,h,x,p;const f=Le[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},A=f.icon,b=!!ke.find((o=>o.orderheaderid==e.orderheaderid));return(0,xe.jsxs)(d.Fragment,{children:[(0,xe.jsxs)(L.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Se),py:{xs:1,md:1.5},px:{xs:1,md:2}},backgroundColor:b?ze("#8b5cf6"):"transparent","&:hover":{backgroundColor:b?ze("#8b5cf6"):We}},children:["Created"==$e&&(0,xe.jsx)(M.A,{children:(0,xe.jsx)(z.A,{onChange:o=>{if(o.target.checked){let o=ke;o.push((0,t.A)((0,t.A)({},e),{},{sno:ke.length+1})),Ke([...o])}else{if(ke.find((o=>o.orderheaderid==e.orderheaderid))){let o=ke,r=ke.find((o=>o.orderheaderid==e.orderheaderid));o.splice(r.sno-1,1),o.map(((e,o)=>{e.sno=o+1})),Ke([...o])}}console.log("list",ke)},checked:ke.find((o=>o.orderheaderid==e.orderheaderid))})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:me},children:String(Ro*Do+o+1).padStart(2,"0")})}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:Re(f.color),border:"1px solid ".concat(Pe(f.color)),color:f.color},children:[(0,xe.jsx)(He,{color:f.color,size:20,children:(0,xe.jsx)(A,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:f.label})]})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(T.A,{title:e.tenantadress,children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{noWrap:!0,variant:"subtitle2",sx:{fontWeight:700,color:Ae},children:e.tenantname}),(0,xe.jsx)(S.A,{noWrap:!0,variant:"caption",sx:{color:be},children:e.tenantsuburb}),(0,xe.jsx)(S.A,{noWrap:!0,variant:"caption",sx:{color:me},children:e.applocation})]})})}),(0,xe.jsxs)(M.A,{align:"left",children:[(0,xe.jsx)(T.A,{title:"Location Name-Suburb",placement:"top",children:(0,xe.jsx)(S.A,{variant:"subtitle1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,xe.jsxs)(w.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(T.A,{title:"Order Id",placement:"top",children:(0,xe.jsx)(S.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,xe.jsxs)(T.A,{title:"Ordered date",placement:"top",children:[(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.orderdate).utc().format("hh:mm A")})]})]}),"-",(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(T.A,{title:"Delivery Id",placement:"top",children:(0,xe.jsx)(S.A,{variant:"body2",noWrap:!0,children:e.deliveryid})}),(0,xe.jsxs)(T.A,{title:"Delivery date",placement:"top",children:[(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.deliverydate).utc().format("hh:mm A")})]})]})]})]}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.pickupcustomer}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.pickupcontactno}),(0,xe.jsx)(T.A,{title:e.Pickupaddress,sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:e.pickuplocation||(e.Pickupaddress?e.Pickupaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.deliverycustomer}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.deliverycontactno}),(0,xe.jsx)(T.A,{title:e.deliveryaddress,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,whiteSpace:"nowrap"},children:e.deliverylocation||(e.deliveryaddress?e.deliveryaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(M.A,{children:e.ridername?(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:28,children:(0,xe.jsx)(u.bsz,{size:14})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",fontWeight:700,fontSize:12,border:"1px solid ".concat(Pe("#06b6d4"))},children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(T.A,{title:"Planned KMS",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#ef4444")),whiteSpace:"nowrap",minWidth:75},children:[e.kms||0," km"]})}),(0,xe.jsx)(T.A,{title:"Actual KMS",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#10b981")),whiteSpace:"nowrap",minWidth:75},children:[e.cumulativekms||0," km"]})})]})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(T.A,{title:"Delivery Charge",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#ef4444")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(i=null===(n=e.deliverycharges)||void 0===n?void 0:n.toFixed(2))&&void 0!==i?i:"0.00"]})}),(0,xe.jsx)(T.A,{title:"Delivery Amount",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#10b981")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(s=null===(c=e.deliveryamt)||void 0===c?void 0:c.toFixed(2))&&void 0!==s?s:"0.00"]})})]})}),(0,xe.jsx)(M.A,{children:e.notes?(0,xe.jsx)(T.A,{title:e.notes,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,maxWidth:160,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.notes})}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),(0,xe.jsx)(M.A,{align:"center",children:e.step?(0,xe.jsx)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:30,height:24,px:.875,borderRadius:999,bgcolor:Re("#662582"),border:"1px solid ".concat(Pe("#662582")),color:"#662582",fontWeight:800,fontSize:11},children:e.step}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:e.Quantity?Ae:me,whiteSpace:"nowrap"},children:e.Quantity||"\u2014"})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:800,color:e.collectionamt?"#ef4444":me,whiteSpace:"nowrap"},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),"Cancelled"!==$e&&"Delivered"!==$e&&(0,xe.jsx)(M.A,{align:"right",children:(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"flex-end",spacing:.75,children:["C"==e.deliverytype&&(0,xe.jsx)(T.A,{title:"Product details",placement:"top",children:(0,xe.jsx)(D.A,{size:"small",onClick:()=>{(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(Yo(null),Fo(null)):(Yo(e),Fo(e.orderheaderid))},sx:{borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(Pe("#06b6d4")),"&:hover":{bgcolor:ze("#06b6d4")}},children:(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(0,xe.jsx)(oe.A,{fontSize:"small"}):(0,xe.jsx)(re.A,{fontSize:"small"})})}),(0,xe.jsx)(T.A,{title:"Actions",placement:"top",children:(0,xe.jsx)(D.A,{size:"small",onClick:o=>mr(o,e),sx:{borderRadius:999,bgcolor:Re("#662582"),color:"#662582",border:"1px solid ".concat(Pe("#662582")),"&:hover":{bgcolor:ze("#662582")}},children:(0,xe.jsx)(l.A,{})})})]})})]}),(null===Mo||void 0===Mo?void 0:Mo.orderid)===(null===e||void 0===e?void 0:e.orderid)&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,sx:{p:0,border:0,backgroundColor:We},children:(0,xe.jsx)(F.A,{in:!0,timeout:"auto",unmountOnExit:!0,children:(0,xe.jsx)(k.A,{sx:{width:"100%",p:2.5},children:(0,xe.jsxs)(v.A,{elevation:0,sx:{borderRadius:2,border:"1px solid",borderColor:je,overflow:"hidden",background:"#fff"},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,borderBottom:"1px solid ".concat(Se),bgcolor:Re("#662582")},children:[(0,xe.jsx)(He,{color:"#662582",children:(0,xe.jsx)(u.gsJ,{size:14})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#662582"},children:"Product Details"})]}),(0,xe.jsxs)(P.A,{size:"small",sx:{minWidth:800},children:[(0,xe.jsx)(I.A,{children:(0,xe.jsxs)(L.A,{sx:{"& th":{fontSize:11,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:be,borderBottom:"1px solid ".concat(Se)},"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(M.A,{children:"#"}),(0,xe.jsx)(M.A,{children:"Product"}),(0,xe.jsx)(M.A,{children:"Description"}),(0,xe.jsx)(M.A,{align:"right",children:"Qty"}),(0,xe.jsx)(M.A,{align:"right",children:"Cost"}),(0,xe.jsx)(M.A,{align:"right",children:"Price"}),(0,xe.jsx)(M.A,{align:"right",children:"Tax"}),(0,xe.jsx)(M.A,{align:"right",children:"Amount"})]})}),(0,xe.jsxs)(Y.A,{children:[null===Mr||void 0===Mr||null===(h=Mr.details)||void 0===h?void 0:h.map(((e,o)=>{var r,t;return(0,xe.jsxs)(L.A,{sx:{"&:hover":{backgroundColor:We+" !important"}},children:[(0,xe.jsx)(M.A,{sx:{color:me,fontWeight:700},children:String(o+1).padStart(2,"0")}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,xe.jsx)(k.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(Se)}}),(0,xe.jsx)(S.A,{variant:"body2",sx:{fontWeight:600,color:Ae},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"})]})}),(0,xe.jsx)(M.A,{sx:{color:be},children:(null===e||void 0===e?void 0:e.productdescription)||"-"}),(0,xe.jsx)(M.A,{align:"right",sx:{fontWeight:700},children:(null===e||void 0===e?void 0:e.orderqty)||0}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null===e||void 0===e?void 0:e.price)||0]}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null!==(r=null===e||void 0===e?void 0:e.productsumprice)&&void 0!==r?r:0).toFixed(2)]}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null!==(t=null===e||void 0===e?void 0:e.taxamount)&&void 0!==t?t:0).toFixed(2)]}),(0,xe.jsxs)(M.A,{align:"right",sx:{fontWeight:800,color:Ae},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o)})),(0,xe.jsxs)(L.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(M.A,{align:"right",colSpan:7,sx:{fontWeight:700,color:be,borderTop:"1px solid ".concat(Se)},children:"Total Amount"}),(0,xe.jsxs)(M.A,{align:"right",sx:{fontWeight:800,color:"#10b981",borderTop:"1px solid ".concat(Se)},children:["\u20b9 ",null===Mr||void 0===Mr||null===(x=Mr.pricedetails)||void 0===x||null===(p=x.orderamount)||void 0===p?void 0:p.toFixed(2)]})]})]})]})]})})})})})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Gr||void 0===Gr?void 0:Gr.length)&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,rowSpan:3,children:(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Br||Hr?(0,xe.jsx)(de.A,{}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"\xb7 End of list \xb7"})})})})]})]})})()})}),(0,xe.jsxs)(E.A,{anchorEl:Ho,open:br,onClose:jr,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{elevation:0,sx:{minWidth:220,borderRadius:2,mt:.75,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden","& .MuiMenuItem-root":{fontSize:13,fontWeight:600,py:1.1,px:1.5,gap:1,transition:"background-color 0.15s","&:hover":{bgcolor:We}}}},children:["delivered"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{onClick:()=>{Pr.mutate(Jo.userfcmtoken),jr()},children:[(0,xe.jsx)(He,{color:"#0ea5e9",size:22,children:(0,xe.jsx)(u.q53,{size:13})}),"Notify Rider"]}),["pending","accepted","arrived"].includes(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{onClick:()=>{var e;if(!Ze)return Lr("Please select a location first!","warning"),void(null===(e=Co.current)||void 0===e||e.focus());or(!0),jr()},children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:22,children:(0,xe.jsx)(u.bsz,{size:13})}),"Change Rider"]}),(1==Ar||2==Ar)&&(0,xe.jsxs)(K.A,{onClick:()=>{co(Jo.kms),ho(Jo.cumulativekms),bo(Jo.droplat),jo(Jo.droplon),go(Jo.notes),uo(Jo.deliveryamount),Wo(Jo.orderstatus||"delivered"),vo(Jo),Je(!0),jr()},children:[(0,xe.jsx)(He,{color:"#10b981",size:22,children:(0,xe.jsx)(u.mU9,{size:13})}),"Update Status"]}),"cancelled"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&"delivered"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{sx:{color:"#ef4444 !important"},onClick:()=>{$o(!0),jr()},children:[(0,xe.jsx)(He,{color:"#ef4444",size:22,children:(0,xe.jsx)(u.uDv,{size:13})}),"Cancel Delivery"]})]}),(0,xe.jsxs)(O.A,{open:_o,onClose:()=>$o(!1),maxWidth:"xs",fullWidth:!0,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #ef4444 0%, ".concat(ze("#ef4444")," 100%)")}}),(0,xe.jsx)(N.A,{sx:{p:3.5},children:(0,xe.jsxs)(w.A,{alignItems:"center",spacing:2.5,children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#ef4444"),color:"#ef4444"},children:(0,xe.jsx)(s.A,{style:{fontSize:28}})}),(0,xe.jsxs)(w.A,{spacing:.5,alignItems:"center",children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Cancel Delivery?"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,textAlign:"center",px:1},children:"This action will cancel the delivery and notify the rider. Please share a brief reason."})]}),(0,xe.jsx)(C.A,{fullWidth:!0,placeholder:"Reason for cancellation",multiline:!0,minRows:2,maxRows:4,onChange:e=>tr(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:We,"& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#ef4444"},"&.Mui-focused fieldset":{borderColor:"#ef4444",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#ef4444"))}}}}),(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,onClick:()=>$o(!1),variant:"outlined",sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Keep Delivery"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{""==rr?Lr("Enter FeedBack","error"):wr({selectedRow:Jo,cancelFeed:rr}),(async()=>{console.log("cancelridernotification",Jo);try{return(await h.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/notifyuser"),{token:Jo.userfcmtoken,notification:{title:"NearleXpress",body:"".concat(Jo.orderid," have been Cancelled"),sound:"ring",image:""},data:{type:"cancel"}})).data}catch(e){Lr(e.message,"error",2e3),console.log(e)}})()},autoFocus:!0,sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#ef4444",boxShadow:"0 6px 18px ".concat(De("#ef4444")),"&:hover":{bgcolor:"#dc2626"}},children:"Yes, Cancel"})]})]})})]}),(0,xe.jsxs)(O.A,{open:er,onClose:()=>or(!1),maxWidth:"sm",fullWidth:!0,TransitionComponent:q.s,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #8b5cf6 0%, ".concat(ze("#8b5cf6")," 100%)")}}),(0,xe.jsx)(B.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#8b5cf6"),color:"#8b5cf6"},children:(0,xe.jsx)(u.bsz,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Change Rider"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"Assign this delivery to a different rider"})]})]})}),(0,xe.jsx)(N.A,{sx:{p:3,pt:2},children:(0,xe.jsx)(y.A,{fullWidth:!0,options:rt,PaperComponent:Ne,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),onChange:(e,o)=>{nr(o),i.A.debug("Rider selected in dropdown:",o?"".concat(o.firstname," ").concat(o.lastname):"None")},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#8b5cf6",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Ie()}))})}),(0,xe.jsx)(J.A,{sx:{p:3,pt:1},children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,variant:"outlined",onClick:()=>or(!1),sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Cancel"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{Zo(!0),i.A.info("Initiating rider assignment change for order ID ".concat(null===Jo||void 0===Jo?void 0:Jo.orderid," to rider: ").concat(null===ir||void 0===ir?void 0:ir.firstname," ").concat(null===ir||void 0===ir?void 0:ir.lastname)),Ir.mutate({selectedRider:ir,selectedRow:Jo})},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#8b5cf6",boxShadow:"0 6px 18px ".concat(De("#8b5cf6")),"&:hover":{bgcolor:"#7c3aed"}},children:"Change Rider"})]})})]}),(0,xe.jsxs)(O.A,{open:to,onClose:()=>io(!1),fullScreen:r,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #f59e0b 0%, ".concat(ze("#f59e0b")," 100%)")}}),(0,xe.jsx)(B.A,{align:"left",sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#f59e0b"),color:"#f59e0b"},children:(0,xe.jsx)(u.tjE,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Date Range"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"Pick a window to filter the deliveries"})]})]})}),(0,xe.jsx)(N.A,{sx:{width:"100%"},className:"datedialog",children:(0,xe.jsx)($.U,{open:to,toggle:()=>io(!to),id:"daterange1",onChange:e=>{"All"===e.label?(Qe(""),_e(""),io(!1)):(Qe(a()(e.startDate).format("YYYY-MM-DD")),_e(a()(e.endDate).format("YYYY-MM-DD")),e.label?lo(e.label):lo("")),console.log(e)},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,G.A)(new Date,-1),endDate:(0,G.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,G.A)(new Date,1),endDate:(0,G.A)(new Date,1)},{label:"This Week",startDate:(0,Z.A)(new Date),endDate:(0,U.A)(new Date)},{label:"Last Week",startDate:(0,Z.A)((0,V.A)(new Date,-1)),endDate:(0,U.A)((0,V.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,V.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,Q.A)(new Date),endDate:(0,X.A)(new Date)},{label:"Last Month",startDate:(0,Q.A)((0,_.A)(new Date,-1)),endDate:(0,X.A)((0,_.A)(new Date,-1))}]})}),(0,xe.jsx)(w.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2.5,pt:1},children:(0,xe.jsx)(H.A,{variant:"contained",onClick:()=>{io(!1)},sx:{borderRadius:999,px:3,py:1,fontWeight:800,bgcolor:"#f59e0b",boxShadow:"0 6px 18px ".concat(De("#f59e0b")),"&:hover":{bgcolor:"#d97706"}},children:"Apply"})})]}),(0,xe.jsxs)(O.A,{fullWidth:!0,open:Be,onClose:Yr,scroll:"paper",maxWidth:"sm",fullScreen:r,TransitionComponent:q.s,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #10b981 0%, ".concat(ze("#10b981")," 100%)")}}),(0,xe.jsx)(B.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#10b981"),color:"#10b981"},children:(0,xe.jsx)(u.mU9,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Update Delivery Status"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:null!==fo&&void 0!==fo&&fo.orderid?"Order #".concat(fo.orderid):"Modify delivery details"})]})]})}),(0,xe.jsx)(N.A,{dividers:!0,sx:{p:3,bgcolor:We},children:(0,xe.jsxs)(j.Ay,{container:!0,spacing:2,children:[[{label:"KMs",value:so,set:e=>co(e),color:"#ef4444"},{label:"Actual KMs",value:ao,set:e=>ho(+e),color:"#10b981"},{label:"Delivery Latitude",value:Ao,set:e=>bo(e),color:"#06b6d4"},{label:"Delivery Longitude",value:mo,set:e=>jo(e),color:"#06b6d4"}].map((e=>(0,xe.jsxs)(j.Ay,{item:!0,xs:12,sm:6,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:e.label}),(0,xe.jsx)(C.A,{fullWidth:!0,value:e.value,type:"number",onChange:o=>e.set(o.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:e.color},"&.Mui-focused fieldset":{borderColor:e.color,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(e.color))}}}})]},e.label))),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Amount"}),(0,xe.jsx)(C.A,{fullWidth:!0,type:"number",value:xo,onChange:e=>uo(+e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#10b981"},"&.Mui-focused fieldset":{borderColor:"#10b981",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#10b981"))}}}})]}),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Status"}),(0,xe.jsx)(C.A,{select:!0,fullWidth:!0,value:yo,onChange:e=>Wo(e.target.value),SelectProps:{MenuProps:{PaperProps:{sx:{borderRadius:2,mt:.5,boxShadow:ve}}}},sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))}}},children:["pending","accepted","started","arrived","delivered","cancelled"].map((e=>{const o=Le[e]||{label:e,color:"#662582",icon:u.bfP},r=o.icon;return(0,xe.jsxs)(K.A,{value:e,sx:{gap:1},children:[(0,xe.jsx)(He,{color:o.color,size:22,children:(0,xe.jsx)(r,{size:13})}),o.label]},e)}))})]}),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Notes"}),(0,xe.jsx)(C.A,{value:po,fullWidth:!0,multiline:!0,minRows:2,onChange:e=>go(e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))}}}})]})]})}),(0,xe.jsx)(J.A,{sx:{p:3},children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,variant:"outlined",onClick:Yr,sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Close"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{so?ao?Ao?mo?xo?lt.mutate({deliveryid:fo.deliveryid,orderheaderid:fo.orderheaderid,orderstatus:yo,deliverytime:a()().format("YYYY-MM-DD HH:mm:ss"),deliverylat:Ao,deliverylong:mo,kms:so,cumulativekms:ao,deliveryamt:parseFloat(xo),notes:po,userid:+Jo.userid}):Lr("Fill Delivery Amount","warning"):Lr("Fill Delivery Longitude","warning"):Lr("Fill Delivery Latitude","warning"):Lr("Fill Actual Kms","warning"):Lr("Fill Kms","warning")},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#10b981",boxShadow:"0 6px 18px ".concat(De("#10b981")),"&:hover":{bgcolor:"#059669"}},children:"Update"})]})})]})]})}},23787:(e,o,r)=>{r.d(o,{FG:()=>u,nV:()=>h,pY:()=>p,pg:()=>x});var t=r(89379),i=r(80045),n=r(93230),l=r(2235),s=r(16491),d=r(82053),c=r(44414);const a=["children","scroll","onScroll","sx"],h=e=>{let{children:o,scroll:r=!1,onScroll:l,sx:s}=e,d=(0,i.A)(e,a);return(0,c.jsx)(n.A,(0,t.A)((0,t.A)({spacing:1.25,onScroll:l,sx:(0,t.A)((0,t.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},d),{},{children:o}))},x=e=>{let{accent:o="#662582",header:r,footer:i,selected:n=!1,onClick:d,children:a,sx:h}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:d,sx:(0,t.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?o:"#e2e8f0",background:n?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,a,i]})]})},u=e=>{let{children:o,columns:r=2,sx:i}=e;return(0,c.jsx)(s.A,{sx:(0,t.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:o})},p=e=>{let{label:o,value:r,children:t,full:i=!1,align:n="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,c.jsx)(d.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==t?t:(0,c.jsx)(d.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,o,r)=>{r.d(o,{A:()=>s});var t=r(93230),i=r(16491),n=r(82053),l=r(44414);function s(e){let{title:o,subtitle:r,live:s=!1,action:d}=e;return(0,l.jsxs)(t.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(i.A,{sx:{minWidth:0},children:[(0,l.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:o}),r&&(0,l.jsxs)(t.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(i.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),d&&(0,l.jsx)(i.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:d})]})}},36803:(e,o,r)=>{r.d(o,{A:()=>h});var t=r(48089),i=r(50704),n=r(93230),l=r(16491),s=r(82053),d=r(82917),c=r(41413),a=r(44414);function h(e){let{title:o,value:r,icon:h,color:x="#662582",caption:u,loading:p=!1}=e;return(0,a.jsx)(t.A,{sx:{height:"100%"},children:(0,a.jsx)(i.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,a.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,a.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,a.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),p?(0,a.jsx)(d.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,a.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),u&&(0,a.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),h&&(0,a.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(x,"14"),color:x,flexShrink:0},children:h})]})})})}},56311:(e,o,r)=>{r.d(o,{A:()=>u});var t=r(89379),i=r(9950),n=r(2660),l=r(2046),s=r(83274),d=r(25333),c=r(97125),a=r(7762),h=r(52097),x=r(44414);const u=e=>{let{value:o,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:g="Search (ctrl+k)",sx:f}=e;const v=(0,i.useRef)(null),[A]=(0,h.d7)(o,p);return(0,i.useEffect)((()=>{u&&u(A)}),[A,u]),(0,i.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=v.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===v.current&&v.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,x.jsx)(n.A,{sx:(0,t.A)({},f),inputRef:v,placeholder:g,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,x.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,x.jsx)(c.A,{})}),endAdornment:(0,x.jsx)(s.A,{title:"Clear",children:(0,x.jsx)(d.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>r(""),children:(0,x.jsx)(a.A,{})})})})}},58691:(e,o,r)=>{r.d(o,{A:()=>s});r(9950);var t=r(16491),i=r(46639),n=r(62217),l=r(44414);function s(e){let{size:o=70,imgSize:r=40,alt:s="loader"}=e;return(0,l.jsxs)(t.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(i.A,{size:o}),(0,l.jsx)(t.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,l.jsx)("img",{src:n,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,r)=>{r.d(o,{A:()=>x});var t=r(89379),i=r(9950),n=r(93230),l=r(41413),s=r(77922),d=r(29925),c=r(26910),a=r(31222),h=r(44414);const x=(0,i.forwardRef)(((e,o)=>{let{setAppId:r,setLocoName:x,setPage:u,sx:p,textfeildSx:g,textfieldSx:f,pill:v=!1,accentColor:A="#6366f1",icon:b,placeholder:m="Select Zone",paperComponent:j}=e;const[w,S]=(0,i.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,i.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(A).concat(e),W=y("26"),C=y("18"),k=v?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(W)},"&.Mui-focused fieldset":{borderColor:A,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},R=v&&(0,h.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,h.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:A,transition:"background-color 0.15s, color 0.15s"},children:b||(0,h.jsx)(a.HPi,{size:14})})});return(0,h.jsx)(s.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:j,sx:(0,t.A)({},p),onChange:(e,o,t)=>{"clear"===t?(null===r||void 0===r||r(0),null===x||void 0===x||x(""),null===u||void 0===u||u(0)):o&&(null===r||void 0===r||r(o.applocationid),null===x||void 0===x||x(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>v?(0,h.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,placeholder:m,InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,t.A)((0,t.A)({},k),f||g||{})})):(0,h.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,t.A)({},f||g||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,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"},96646:(e,o,r)=>{r.d(o,{r:()=>d});var t=r(9213),i=r(21671),n=r(82917),l=r(93230),s=r(44414);const d=e=>{let{rowsPerPage:o=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(t.A,{children:[(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,o)=>(0,s.jsx)(i.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(n.A,{variant:"text",width:100}),(0,s.jsx)(n.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"text",width:150})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(i.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/2898.3b8c86cc.chunk.js b/build/static/js/2898.91e92c8b.chunk.js similarity index 99% rename from build/static/js/2898.3b8c86cc.chunk.js rename to build/static/js/2898.91e92c8b.chunk.js index 59e77ef..8661f06 100644 --- a/build/static/js/2898.3b8c86cc.chunk.js +++ b/build/static/js/2898.91e92c8b.chunk.js @@ -1,2 +1,2 @@ -/*! For license information please see 2898.3b8c86cc.chunk.js.LICENSE.txt */ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2898],{855:(e,r,n)=>{n.d(r,{A:()=>i});var t=n(7208),o=n(76475),a=n(44414);function i(e){var r,n;let i,s,{children:l,type:c="scale",direction:p="right",offset:d=10,scale:h={hover:1.05,tap:.95}}=e;switch(p){case"up":case"left":i=d,s=0;break;default:i=0,s=d}const[x,m]=(0,t.Y)(i,s),[u,y]=(0,t.Y)(i,s);switch(c){case"rotate":return(0,a.jsx)(o.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:l});case"slide":return"up"===p||"down"===p?(0,a.jsx)(o.P.div,{animate:{y:void 0!==u?u:""},onHoverEnd:()=>y(),onHoverStart:()=>y(),children:l}):(0,a.jsx)(o.P.div,{animate:{x:void 0!==x?x:""},onHoverEnd:()=>m(),onHoverStart:()=>m(),children:l});default:return"number"===typeof h&&(h={hover:h,tap:h}),(0,a.jsx)(o.P.div,{whileHover:{scale:null===(r=h)||void 0===r?void 0:r.hover},whileTap:{scale:null===(n=h)||void 0===n?void 0:n.tap},children:l})}}},36080:(e,r,n)=>{n.d(r,{A:()=>w});var t=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(59254),p=n(18463),d=n(52695),h=n(31506),x=n(82053),m=n(45558),u=n(1614);function y(e){return(0,u.Ay)("MuiLink",e)}const A=(0,m.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var L=n(12703),j=n(99269);const v={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},f=e=>{let{theme:r,ownerState:n}=e;const t=(e=>v[e]||e)(n.color),o=(0,L.Yn)(r,"palette.".concat(t),!1)||n.color,a=(0,L.Yn)(r,"palette.".concat(t,"Channel"));return"vars"in r&&a?"rgba(".concat(a," / 0.4)"):(0,j.X4)(o,.4)};var g=n(44414);const b=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],C=(0,c.Ay)(x.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,r["underline".concat((0,l.A)(n.underline))],"button"===n.component&&r.button]}})((e=>{let{theme:r,ownerState:n}=e;return(0,o.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,o.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:f({theme:r,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(A.focusVisible)]:{outline:"auto"}})})),w=a.forwardRef((function(e,r){const n=(0,p.b)({props:e,name:"MuiLink"}),{className:c,color:x="primary",component:m="a",onBlur:u,onFocus:A,TypographyClasses:L,underline:j="always",variant:f="inherit",sx:w}=n,k=(0,t.A)(n,b),{isFocusVisibleRef:H,onBlur:M,onFocus:V,ref:D}=(0,d.A)(),[_,S]=a.useState(!1),Z=(0,h.A)(r,D),N=(0,o.A)({},n,{color:x,component:m,focusVisible:_,underline:j,variant:f}),P=(e=>{const{classes:r,component:n,focusVisible:t,underline:o}=e,a={root:["root","underline".concat((0,l.A)(o)),"button"===n&&"button",t&&"focusVisible"]};return(0,s.A)(a,y,r)})(N);return(0,g.jsx)(C,(0,o.A)({color:x,className:(0,i.A)(P.root,c),classes:L,component:m,onBlur:e=>{M(e),!1===H.current&&S(!1),u&&u(e)},onFocus:e=>{V(e),!0===H.current&&S(!0),A&&A(e)},ref:Z,ownerState:N,variant:f,sx:[...Object.keys(v).includes(x)?[]:[{color:x}],...Array.isArray(w)?w:[w]]},k))}))},92898:(e,r,n)=>{n.r(r),n.d(r,{default:()=>F});var t=n(89379),o=n(80045),a=n(9950),i=n(42074),s=n(88060),l=n(14857),c=n(14387),p=n(47223),d=n(19808),h=n(83239),x=n(93230),m=n(82053),u=n(25277),y=n(36080),A=n(16491),L=n(82223),j=n(71525),v=n(249),f=n(57357),g=n(14195),b=n(83563),C=n(16243),w=n(86263),k=n(855),H=n(24184),M=n(44414);const V=e=>{let{reverse:r}=e;const n=(0,l.A)();return(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)("svg",{width:"118",height:"35",viewBox:"0 0 118 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,M.jsx)("path",{d:"M4.63564 15.8644L6.94797 13.552L6.95038 13.5496H11.3006L9.56969 15.2806L9.12278 15.7275L7.35024 17.5L7.56977 17.7201L17.5 27.6498L27.6498 17.5L25.8766 15.7275L25.7518 15.602L23.6994 13.5496H28.0496L28.052 13.552L29.8644 15.3644L32 17.5L17.5 32L3 17.5L4.63564 15.8644ZM17.5 3L25.8784 11.3784H21.5282L17.5 7.35024L13.4718 11.3784H9.12158L17.5 3Z",fill:n.palette.primary.dark}),(0,M.jsx)("path",{d:"M7.35025 17.5L9.1228 15.7275L9.5697 15.2805L7.83937 13.5496H6.95039L6.94798 13.552L4.63564 15.8644L6.8551 18.073L7.35025 17.5Z",fill:"url(#paint0_linear)"}),(0,M.jsx)("path",{d:"M25.8767 15.7275L27.6498 17.5L27.4743 17.6755L27.4749 17.6761L29.8644 15.3644L28.0521 13.552L28.0497 13.5496H27.8736L25.7518 15.602L25.8767 15.7275Z",fill:"url(#paint1_linear)"}),(0,M.jsx)("path",{d:"M6.94549 13.5496L6.9479 13.552L9.12272 15.7275L17.4999 24.1041L28.0544 13.5496H6.94549Z",fill:n.palette.primary.main}),(0,M.jsx)("path",{d:"M46.5781 10V26H49.3594V14.9844H49.5078L53.9297 25.9531H56.0078L60.4297 15.0078H60.5781V26H63.3594V10H59.8125L55.0625 21.5937H54.875L50.125 10H46.5781ZM69.8438 26.2422C71.7266 26.2422 72.8516 25.3594 73.3672 24.3516H73.4609V26H76.1797V17.9687C76.1797 14.7969 73.5937 13.8438 71.3047 13.8438C68.7813 13.8438 66.8437 14.9687 66.2188 17.1562L68.8594 17.5312C69.1406 16.7109 69.9375 16.0078 71.3203 16.0078C72.6328 16.0078 73.3516 16.6797 73.3516 17.8594V17.9062C73.3516 18.7188 72.5 18.7578 70.3828 18.9844C68.0547 19.2344 65.8281 19.9297 65.8281 22.6328C65.8281 24.9922 67.5547 26.2422 69.8438 26.2422ZM70.5781 24.1641C69.3984 24.1641 68.5547 23.625 68.5547 22.5859C68.5547 21.5 69.5 21.0469 70.7656 20.8672C71.5078 20.7656 72.9922 20.5781 73.3594 20.2812V21.6953C73.3594 23.0312 72.2813 24.1641 70.5781 24.1641ZM81.8516 18.9687C81.8516 17.2344 82.8984 16.2344 84.3906 16.2344C85.8516 16.2344 86.7266 17.1953 86.7266 18.7969V26H89.5547V18.3594C89.5625 15.4844 87.9219 13.8438 85.4453 13.8438C83.6484 13.8438 82.4141 14.7031 81.8672 16.0391H81.7266V14H79.0234V26H81.8516V18.9687ZM98.4219 14H96.0547V11.125H93.2266V14H91.5234V16.1875H93.2266V22.8594C93.2109 25.1172 94.8516 26.2266 96.9766 26.1641C97.7813 26.1406 98.3359 25.9844 98.6406 25.8828L98.1641 23.6719C98.0078 23.7109 97.6875 23.7812 97.3359 23.7812C96.625 23.7812 96.0547 23.5312 96.0547 22.3906V16.1875H98.4219V14ZM100.787 26H103.615V14H100.787V26ZM102.209 12.2969C103.107 12.2969 103.842 11.6094 103.842 10.7656C103.842 9.91406 103.107 9.22656 102.209 9.22656C101.303 9.22656 100.568 9.91406 100.568 10.7656C100.568 11.6094 101.303 12.2969 102.209 12.2969ZM116.008 17.1719C115.617 15.1406 113.992 13.8438 111.18 13.8438C108.289 13.8438 106.32 15.2656 106.328 17.4844C106.32 19.2344 107.398 20.3906 109.703 20.8672L111.75 21.2969C112.852 21.5391 113.367 21.9844 113.367 22.6641C113.367 23.4844 112.477 24.1016 111.133 24.1016C109.836 24.1016 108.992 23.5391 108.75 22.4609L105.992 22.7266C106.344 24.9297 108.195 26.2344 111.141 26.2344C114.141 26.2344 116.258 24.6797 116.266 22.4062C116.258 20.6953 115.156 19.6484 112.891 19.1562L110.844 18.7188C109.625 18.4453 109.141 18.0234 109.148 17.3281C109.141 16.5156 110.039 15.9531 111.219 15.9531C112.523 15.9531 113.211 16.6641 113.43 17.4531L116.008 17.1719Z",fill:n.palette.mode===C.lG.DARK||r?n.palette.common.white:n.palette.common.black,fillOpacity:"0.85"}),(0,M.jsxs)("defs",{children:[(0,M.jsxs)("linearGradient",{id:"paint0_linear",x1:"8.62526",y1:"14.0888",x2:"5.56709",y2:"17.1469",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:n.palette.primary.darker}),(0,M.jsx)("stop",{offset:"0.9637",stopColor:n.palette.primary.dark,stopOpacity:"0"})]}),(0,M.jsxs)("linearGradient",{id:"paint1_linear",x1:"26.2675",y1:"14.1279",x2:"28.7404",y2:"16.938",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:n.palette.primary.darker}),(0,M.jsx)("stop",{offset:"1",stopColor:n.palette.primary.dark,stopOpacity:"0"})]})]})]})})},D=()=>{const e=(0,l.A)();return(0,M.jsxs)("svg",{width:"129",height:"129",viewBox:"0 0 129 129",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,M.jsx)("path",{d:"M7.27577 57.2242L17.5616 46.9384L17.5724 46.9276H36.9234L29.2238 54.6273L27.2358 56.6152L19.3511 64.5L20.3276 65.4792L64.5 109.649L109.649 64.5L101.761 56.6152L101.206 56.0572L92.0766 46.9276H111.428L111.438 46.9384L119.5 55.0002L129 64.5L64.5 129L0 64.5L7.27577 57.2242ZM64.5 0L101.77 37.2695H82.4185L64.5 19.3511L46.5816 37.2695H27.2305L64.5 0Z",fill:e.palette.primary.dark}),(0,M.jsx)("path",{d:"M19.3509 64.5L27.2357 56.6152L29.2236 54.6273L21.5267 46.9276H17.5722L17.5615 46.9384L7.27561 57.2242L17.1483 67.0487L19.3509 64.5Z",fill:"url(#paint0_linear)"}),(0,M.jsx)("path",{d:"M101.762 56.6152L109.649 64.5L108.868 65.2807L108.871 65.2834L119.5 55.0002L111.438 46.9384L111.428 46.9276H110.644L101.206 56.0572L101.762 56.6152Z",fill:"url(#paint1_linear)"}),(0,M.jsx)("path",{d:"M17.5508 46.9276L17.5615 46.9384L27.2357 56.6152L64.4999 93.8767L111.449 46.9276H17.5508Z",fill:e.palette.primary.main}),(0,M.jsxs)("defs",{children:[(0,M.jsxs)("linearGradient",{id:"paint0_linear",x1:"25.0225",y1:"49.3259",x2:"11.4189",y2:"62.9295",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:e.palette.primary.darker}),(0,M.jsx)("stop",{offset:"0.9637",stopColor:e.palette.primary.dark,stopOpacity:"0"})]}),(0,M.jsxs)("linearGradient",{id:"paint1_linear",x1:"103.5",y1:"49.5",x2:"114.5",y2:"62",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:e.palette.primary.darker}),(0,M.jsx)("stop",{offset:"1",stopColor:e.palette.primary.dark,stopOpacity:"0"})]})]})]})},_=e=>{let{reverse:r,isIcon:n,sx:t,to:o}=e;return(0,M.jsx)(H.A,{disableRipple:!0,component:i.N_,to:o||C.qm,sx:t,children:n?(0,M.jsx)(D,{}):(0,M.jsx)(V,{reverse:r})})};var S=n(58168);const Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};var N=n(61187),P=function(e,r){return a.createElement(N.A,(0,S.A)({},e,{ref:r,icon:Z}))};const T=a.forwardRef(P);const z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 476H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"line",theme:"outlined"};var O=function(e,r){return a.createElement(N.A,(0,S.A)({},e,{ref:r,icon:z}))};const R=a.forwardRef(O),B=["handleDrawerOpen","layout"];function G(e){let{layout:r,children:n,window:t}=e;const o=(0,l.A)(),i=(0,c.A)({disableHysteresis:!0,threshold:10,target:t?t():void 0}),s=o.palette.mode===C.lG.DARK?o.palette.grey[50]:o.palette.grey[800],p="landing"!==r?s:"transparent";return a.cloneElement(n,{style:{backgroundColor:i?s:p}})}const F=e=>{let{handleDrawerOpen:r,layout:n="landing"}=e,c=(0,o.A)(e,B);const H=(0,l.A)(),V=(0,p.A)(H.breakpoints.down("md")),[D,S]=(0,a.useState)(!1),Z=e=>r=>{("keydown"!==r.type||"Tab"!==r.key&&"Shift"!==r.key)&&S(e)};return(0,M.jsx)(G,(0,t.A)((0,t.A)({layout:n},c),{},{children:(0,M.jsx)(s.A,{sx:{bgcolor:"transparent",color:H.palette.text.primary,boxShadow:"none"},children:(0,M.jsx)(d.A,{disableGutters:V,children:(0,M.jsxs)(h.A,{sx:{px:{xs:1.5,md:0,lg:0},py:2},children:[(0,M.jsxs)(x.A,{direction:"row",sx:{flexGrow:1,display:{xs:"none",md:"block"}},alignItems:"center",children:[(0,M.jsx)(m.A,{component:"div",sx:{textAlign:"left",display:"inline-block"},children:(0,M.jsx)(_,{reverse:!0,to:"/"})}),(0,M.jsx)(u.A,{label:"v2.1.0",variant:"outlined",size:"small",color:"secondary",sx:{mt:.5,ml:1,fontSize:"0.725rem",height:20,"& .MuiChip-label":{px:.5}}})]}),(0,M.jsxs)(x.A,{direction:"row",sx:{"& .header-link":{px:1,"&:hover":{color:H.palette.primary.main}},display:{xs:"none",md:"block"}},spacing:2,children:[(0,M.jsx)(y.A,{className:"header-link",color:"white",component:i.N_,to:"/login",target:"_blank",underline:"none",children:"Dashboard"}),(0,M.jsx)(y.A,{className:"header-link",color:r?"primary":"white",component:i.N_,to:"/components-overview/buttons",underline:"none",children:"Components"}),(0,M.jsx)(y.A,{className:"header-link",color:"white",href:"https://links.codedthemes.com/BQFrl",target:"_blank",underline:"none",children:"Documentation"}),(0,M.jsx)(A.A,{sx:{display:"inline-block"},children:(0,M.jsx)(k.A,{children:(0,M.jsx)(L.A,{component:y.A,href:"https://links.codedthemes.com/Aprwb",disableElevation:!0,color:"primary",variant:"contained",children:"Purchase Now"})})})]}),(0,M.jsxs)(A.A,{sx:{width:"100%",alignItems:"center",justifyContent:"space-between",display:{xs:"flex",md:"none"}},children:[(0,M.jsx)(m.A,{component:"div",sx:{textAlign:"left",display:"inline-block"},children:(0,M.jsx)(_,{reverse:!0,to:"/"})}),(0,M.jsxs)(x.A,{direction:"row",spacing:2,children:["component"===n&&(0,M.jsx)(L.A,{variant:"outlined",size:"small",color:"warning",component:i.N_,to:C.qm,sx:{mt:.5,height:28},children:"Dashboard"}),"component"!==n&&(0,M.jsx)(L.A,{variant:"outlined",size:"small",color:"warning",component:i.N_,to:"/components-overview/buttons",sx:{mt:.5,height:28},children:"All Components"}),(0,M.jsx)(w.A,(0,t.A)((0,t.A)({color:"secondary"},"component"===n?{onClick:r}:{onClick:Z(!0)}),{},{sx:{"&:hover":{bgcolor:H.palette.mode===C.lG.DARK?"secondary.lighter":"secondary.dark"}},children:(0,M.jsx)(T,{style:{color:H.palette.mode===C.lG.DARK?"inherit":H.palette.grey[100]}})}))]}),(0,M.jsx)(j.Ay,{anchor:"top",open:D,onClose:Z(!1),sx:{"& .MuiDrawer-paper":{backgroundImage:"none"}},children:(0,M.jsx)(A.A,{sx:{width:"auto","& .MuiListItemIcon-root":{fontSize:"1rem",minWidth:28}},role:"presentation",onClick:Z(!1),onKeyDown:Z(!1),children:(0,M.jsxs)(v.A,{children:[(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"/login",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Dashboard",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"/components-overview/buttons",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"All Components",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://links.codedthemes.com/sTUAK",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Free Version",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://links.codedthemes.com/BQFrl",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Documentation",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://codedthemes.support-hub.io/",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Support",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://links.codedthemes.com/Aprwb",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Purchase Now",primaryTypographyProps:{variant:"h6",color:"text.primary"}}),(0,M.jsx)(u.A,{color:"primary",label:"v1.0",size:"small"})]})})]})})})]})]})})})}))}}}]); \ No newline at end of file +/*! For license information please see 2898.91e92c8b.chunk.js.LICENSE.txt */ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2898],{855:(e,r,n)=>{n.d(r,{A:()=>i});var t=n(7208),o=n(76475),a=n(44414);function i(e){var r,n;let i,s,{children:l,type:c="scale",direction:p="right",offset:d=10,scale:h={hover:1.05,tap:.95}}=e;switch(p){case"up":case"left":i=d,s=0;break;default:i=0,s=d}const[x,m]=(0,t.Y)(i,s),[u,y]=(0,t.Y)(i,s);switch(c){case"rotate":return(0,a.jsx)(o.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:l});case"slide":return"up"===p||"down"===p?(0,a.jsx)(o.P.div,{animate:{y:void 0!==u?u:""},onHoverEnd:()=>y(),onHoverStart:()=>y(),children:l}):(0,a.jsx)(o.P.div,{animate:{x:void 0!==x?x:""},onHoverEnd:()=>m(),onHoverStart:()=>m(),children:l});default:return"number"===typeof h&&(h={hover:h,tap:h}),(0,a.jsx)(o.P.div,{whileHover:{scale:null===(r=h)||void 0===r?void 0:r.hover},whileTap:{scale:null===(n=h)||void 0===n?void 0:n.tap},children:l})}}},36080:(e,r,n)=>{n.d(r,{A:()=>w});var t=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(59254),p=n(18463),d=n(52695),h=n(31506),x=n(82053),m=n(45558),u=n(1614);function y(e){return(0,u.Ay)("MuiLink",e)}const A=(0,m.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var L=n(12703),j=n(99269);const v={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},f=e=>{let{theme:r,ownerState:n}=e;const t=(e=>v[e]||e)(n.color),o=(0,L.Yn)(r,"palette.".concat(t),!1)||n.color,a=(0,L.Yn)(r,"palette.".concat(t,"Channel"));return"vars"in r&&a?"rgba(".concat(a," / 0.4)"):(0,j.X4)(o,.4)};var g=n(44414);const b=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],C=(0,c.Ay)(x.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,r["underline".concat((0,l.A)(n.underline))],"button"===n.component&&r.button]}})((e=>{let{theme:r,ownerState:n}=e;return(0,o.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,o.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:f({theme:r,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(A.focusVisible)]:{outline:"auto"}})})),w=a.forwardRef((function(e,r){const n=(0,p.b)({props:e,name:"MuiLink"}),{className:c,color:x="primary",component:m="a",onBlur:u,onFocus:A,TypographyClasses:L,underline:j="always",variant:f="inherit",sx:w}=n,k=(0,t.A)(n,b),{isFocusVisibleRef:H,onBlur:M,onFocus:V,ref:D}=(0,d.A)(),[_,S]=a.useState(!1),Z=(0,h.A)(r,D),N=(0,o.A)({},n,{color:x,component:m,focusVisible:_,underline:j,variant:f}),P=(e=>{const{classes:r,component:n,focusVisible:t,underline:o}=e,a={root:["root","underline".concat((0,l.A)(o)),"button"===n&&"button",t&&"focusVisible"]};return(0,s.A)(a,y,r)})(N);return(0,g.jsx)(C,(0,o.A)({color:x,className:(0,i.A)(P.root,c),classes:L,component:m,onBlur:e=>{M(e),!1===H.current&&S(!1),u&&u(e)},onFocus:e=>{V(e),!0===H.current&&S(!0),A&&A(e)},ref:Z,ownerState:N,variant:f,sx:[...Object.keys(v).includes(x)?[]:[{color:x}],...Array.isArray(w)?w:[w]]},k))}))},92898:(e,r,n)=>{n.r(r),n.d(r,{default:()=>F});var t=n(89379),o=n(80045),a=n(9950),i=n(42074),s=n(88060),l=n(14857),c=n(14387),p=n(47223),d=n(19808),h=n(83239),x=n(93230),m=n(82053),u=n(25277),y=n(36080),A=n(16491),L=n(10226),j=n(71525),v=n(249),f=n(57357),g=n(14195),b=n(83563),C=n(16243),w=n(86263),k=n(855),H=n(24184),M=n(44414);const V=e=>{let{reverse:r}=e;const n=(0,l.A)();return(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)("svg",{width:"118",height:"35",viewBox:"0 0 118 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,M.jsx)("path",{d:"M4.63564 15.8644L6.94797 13.552L6.95038 13.5496H11.3006L9.56969 15.2806L9.12278 15.7275L7.35024 17.5L7.56977 17.7201L17.5 27.6498L27.6498 17.5L25.8766 15.7275L25.7518 15.602L23.6994 13.5496H28.0496L28.052 13.552L29.8644 15.3644L32 17.5L17.5 32L3 17.5L4.63564 15.8644ZM17.5 3L25.8784 11.3784H21.5282L17.5 7.35024L13.4718 11.3784H9.12158L17.5 3Z",fill:n.palette.primary.dark}),(0,M.jsx)("path",{d:"M7.35025 17.5L9.1228 15.7275L9.5697 15.2805L7.83937 13.5496H6.95039L6.94798 13.552L4.63564 15.8644L6.8551 18.073L7.35025 17.5Z",fill:"url(#paint0_linear)"}),(0,M.jsx)("path",{d:"M25.8767 15.7275L27.6498 17.5L27.4743 17.6755L27.4749 17.6761L29.8644 15.3644L28.0521 13.552L28.0497 13.5496H27.8736L25.7518 15.602L25.8767 15.7275Z",fill:"url(#paint1_linear)"}),(0,M.jsx)("path",{d:"M6.94549 13.5496L6.9479 13.552L9.12272 15.7275L17.4999 24.1041L28.0544 13.5496H6.94549Z",fill:n.palette.primary.main}),(0,M.jsx)("path",{d:"M46.5781 10V26H49.3594V14.9844H49.5078L53.9297 25.9531H56.0078L60.4297 15.0078H60.5781V26H63.3594V10H59.8125L55.0625 21.5937H54.875L50.125 10H46.5781ZM69.8438 26.2422C71.7266 26.2422 72.8516 25.3594 73.3672 24.3516H73.4609V26H76.1797V17.9687C76.1797 14.7969 73.5937 13.8438 71.3047 13.8438C68.7813 13.8438 66.8437 14.9687 66.2188 17.1562L68.8594 17.5312C69.1406 16.7109 69.9375 16.0078 71.3203 16.0078C72.6328 16.0078 73.3516 16.6797 73.3516 17.8594V17.9062C73.3516 18.7188 72.5 18.7578 70.3828 18.9844C68.0547 19.2344 65.8281 19.9297 65.8281 22.6328C65.8281 24.9922 67.5547 26.2422 69.8438 26.2422ZM70.5781 24.1641C69.3984 24.1641 68.5547 23.625 68.5547 22.5859C68.5547 21.5 69.5 21.0469 70.7656 20.8672C71.5078 20.7656 72.9922 20.5781 73.3594 20.2812V21.6953C73.3594 23.0312 72.2813 24.1641 70.5781 24.1641ZM81.8516 18.9687C81.8516 17.2344 82.8984 16.2344 84.3906 16.2344C85.8516 16.2344 86.7266 17.1953 86.7266 18.7969V26H89.5547V18.3594C89.5625 15.4844 87.9219 13.8438 85.4453 13.8438C83.6484 13.8438 82.4141 14.7031 81.8672 16.0391H81.7266V14H79.0234V26H81.8516V18.9687ZM98.4219 14H96.0547V11.125H93.2266V14H91.5234V16.1875H93.2266V22.8594C93.2109 25.1172 94.8516 26.2266 96.9766 26.1641C97.7813 26.1406 98.3359 25.9844 98.6406 25.8828L98.1641 23.6719C98.0078 23.7109 97.6875 23.7812 97.3359 23.7812C96.625 23.7812 96.0547 23.5312 96.0547 22.3906V16.1875H98.4219V14ZM100.787 26H103.615V14H100.787V26ZM102.209 12.2969C103.107 12.2969 103.842 11.6094 103.842 10.7656C103.842 9.91406 103.107 9.22656 102.209 9.22656C101.303 9.22656 100.568 9.91406 100.568 10.7656C100.568 11.6094 101.303 12.2969 102.209 12.2969ZM116.008 17.1719C115.617 15.1406 113.992 13.8438 111.18 13.8438C108.289 13.8438 106.32 15.2656 106.328 17.4844C106.32 19.2344 107.398 20.3906 109.703 20.8672L111.75 21.2969C112.852 21.5391 113.367 21.9844 113.367 22.6641C113.367 23.4844 112.477 24.1016 111.133 24.1016C109.836 24.1016 108.992 23.5391 108.75 22.4609L105.992 22.7266C106.344 24.9297 108.195 26.2344 111.141 26.2344C114.141 26.2344 116.258 24.6797 116.266 22.4062C116.258 20.6953 115.156 19.6484 112.891 19.1562L110.844 18.7188C109.625 18.4453 109.141 18.0234 109.148 17.3281C109.141 16.5156 110.039 15.9531 111.219 15.9531C112.523 15.9531 113.211 16.6641 113.43 17.4531L116.008 17.1719Z",fill:n.palette.mode===C.lG.DARK||r?n.palette.common.white:n.palette.common.black,fillOpacity:"0.85"}),(0,M.jsxs)("defs",{children:[(0,M.jsxs)("linearGradient",{id:"paint0_linear",x1:"8.62526",y1:"14.0888",x2:"5.56709",y2:"17.1469",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:n.palette.primary.darker}),(0,M.jsx)("stop",{offset:"0.9637",stopColor:n.palette.primary.dark,stopOpacity:"0"})]}),(0,M.jsxs)("linearGradient",{id:"paint1_linear",x1:"26.2675",y1:"14.1279",x2:"28.7404",y2:"16.938",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:n.palette.primary.darker}),(0,M.jsx)("stop",{offset:"1",stopColor:n.palette.primary.dark,stopOpacity:"0"})]})]})]})})},D=()=>{const e=(0,l.A)();return(0,M.jsxs)("svg",{width:"129",height:"129",viewBox:"0 0 129 129",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,M.jsx)("path",{d:"M7.27577 57.2242L17.5616 46.9384L17.5724 46.9276H36.9234L29.2238 54.6273L27.2358 56.6152L19.3511 64.5L20.3276 65.4792L64.5 109.649L109.649 64.5L101.761 56.6152L101.206 56.0572L92.0766 46.9276H111.428L111.438 46.9384L119.5 55.0002L129 64.5L64.5 129L0 64.5L7.27577 57.2242ZM64.5 0L101.77 37.2695H82.4185L64.5 19.3511L46.5816 37.2695H27.2305L64.5 0Z",fill:e.palette.primary.dark}),(0,M.jsx)("path",{d:"M19.3509 64.5L27.2357 56.6152L29.2236 54.6273L21.5267 46.9276H17.5722L17.5615 46.9384L7.27561 57.2242L17.1483 67.0487L19.3509 64.5Z",fill:"url(#paint0_linear)"}),(0,M.jsx)("path",{d:"M101.762 56.6152L109.649 64.5L108.868 65.2807L108.871 65.2834L119.5 55.0002L111.438 46.9384L111.428 46.9276H110.644L101.206 56.0572L101.762 56.6152Z",fill:"url(#paint1_linear)"}),(0,M.jsx)("path",{d:"M17.5508 46.9276L17.5615 46.9384L27.2357 56.6152L64.4999 93.8767L111.449 46.9276H17.5508Z",fill:e.palette.primary.main}),(0,M.jsxs)("defs",{children:[(0,M.jsxs)("linearGradient",{id:"paint0_linear",x1:"25.0225",y1:"49.3259",x2:"11.4189",y2:"62.9295",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:e.palette.primary.darker}),(0,M.jsx)("stop",{offset:"0.9637",stopColor:e.palette.primary.dark,stopOpacity:"0"})]}),(0,M.jsxs)("linearGradient",{id:"paint1_linear",x1:"103.5",y1:"49.5",x2:"114.5",y2:"62",gradientUnits:"userSpaceOnUse",children:[(0,M.jsx)("stop",{stopColor:e.palette.primary.darker}),(0,M.jsx)("stop",{offset:"1",stopColor:e.palette.primary.dark,stopOpacity:"0"})]})]})]})},_=e=>{let{reverse:r,isIcon:n,sx:t,to:o}=e;return(0,M.jsx)(H.A,{disableRipple:!0,component:i.N_,to:o||C.qm,sx:t,children:n?(0,M.jsx)(D,{}):(0,M.jsx)(V,{reverse:r})})};var S=n(58168);const Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};var N=n(61187),P=function(e,r){return a.createElement(N.A,(0,S.A)({},e,{ref:r,icon:Z}))};const T=a.forwardRef(P);const z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 476H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"line",theme:"outlined"};var O=function(e,r){return a.createElement(N.A,(0,S.A)({},e,{ref:r,icon:z}))};const R=a.forwardRef(O),B=["handleDrawerOpen","layout"];function G(e){let{layout:r,children:n,window:t}=e;const o=(0,l.A)(),i=(0,c.A)({disableHysteresis:!0,threshold:10,target:t?t():void 0}),s=o.palette.mode===C.lG.DARK?o.palette.grey[50]:o.palette.grey[800],p="landing"!==r?s:"transparent";return a.cloneElement(n,{style:{backgroundColor:i?s:p}})}const F=e=>{let{handleDrawerOpen:r,layout:n="landing"}=e,c=(0,o.A)(e,B);const H=(0,l.A)(),V=(0,p.A)(H.breakpoints.down("md")),[D,S]=(0,a.useState)(!1),Z=e=>r=>{("keydown"!==r.type||"Tab"!==r.key&&"Shift"!==r.key)&&S(e)};return(0,M.jsx)(G,(0,t.A)((0,t.A)({layout:n},c),{},{children:(0,M.jsx)(s.A,{sx:{bgcolor:"transparent",color:H.palette.text.primary,boxShadow:"none"},children:(0,M.jsx)(d.A,{disableGutters:V,children:(0,M.jsxs)(h.A,{sx:{px:{xs:1.5,md:0,lg:0},py:2},children:[(0,M.jsxs)(x.A,{direction:"row",sx:{flexGrow:1,display:{xs:"none",md:"block"}},alignItems:"center",children:[(0,M.jsx)(m.A,{component:"div",sx:{textAlign:"left",display:"inline-block"},children:(0,M.jsx)(_,{reverse:!0,to:"/"})}),(0,M.jsx)(u.A,{label:"v2.1.0",variant:"outlined",size:"small",color:"secondary",sx:{mt:.5,ml:1,fontSize:"0.725rem",height:20,"& .MuiChip-label":{px:.5}}})]}),(0,M.jsxs)(x.A,{direction:"row",sx:{"& .header-link":{px:1,"&:hover":{color:H.palette.primary.main}},display:{xs:"none",md:"block"}},spacing:2,children:[(0,M.jsx)(y.A,{className:"header-link",color:"white",component:i.N_,to:"/login",target:"_blank",underline:"none",children:"Dashboard"}),(0,M.jsx)(y.A,{className:"header-link",color:r?"primary":"white",component:i.N_,to:"/components-overview/buttons",underline:"none",children:"Components"}),(0,M.jsx)(y.A,{className:"header-link",color:"white",href:"https://links.codedthemes.com/BQFrl",target:"_blank",underline:"none",children:"Documentation"}),(0,M.jsx)(A.A,{sx:{display:"inline-block"},children:(0,M.jsx)(k.A,{children:(0,M.jsx)(L.A,{component:y.A,href:"https://links.codedthemes.com/Aprwb",disableElevation:!0,color:"primary",variant:"contained",children:"Purchase Now"})})})]}),(0,M.jsxs)(A.A,{sx:{width:"100%",alignItems:"center",justifyContent:"space-between",display:{xs:"flex",md:"none"}},children:[(0,M.jsx)(m.A,{component:"div",sx:{textAlign:"left",display:"inline-block"},children:(0,M.jsx)(_,{reverse:!0,to:"/"})}),(0,M.jsxs)(x.A,{direction:"row",spacing:2,children:["component"===n&&(0,M.jsx)(L.A,{variant:"outlined",size:"small",color:"warning",component:i.N_,to:C.qm,sx:{mt:.5,height:28},children:"Dashboard"}),"component"!==n&&(0,M.jsx)(L.A,{variant:"outlined",size:"small",color:"warning",component:i.N_,to:"/components-overview/buttons",sx:{mt:.5,height:28},children:"All Components"}),(0,M.jsx)(w.A,(0,t.A)((0,t.A)({color:"secondary"},"component"===n?{onClick:r}:{onClick:Z(!0)}),{},{sx:{"&:hover":{bgcolor:H.palette.mode===C.lG.DARK?"secondary.lighter":"secondary.dark"}},children:(0,M.jsx)(T,{style:{color:H.palette.mode===C.lG.DARK?"inherit":H.palette.grey[100]}})}))]}),(0,M.jsx)(j.Ay,{anchor:"top",open:D,onClose:Z(!1),sx:{"& .MuiDrawer-paper":{backgroundImage:"none"}},children:(0,M.jsx)(A.A,{sx:{width:"auto","& .MuiListItemIcon-root":{fontSize:"1rem",minWidth:28}},role:"presentation",onClick:Z(!1),onKeyDown:Z(!1),children:(0,M.jsxs)(v.A,{children:[(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"/login",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Dashboard",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"/components-overview/buttons",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"All Components",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://links.codedthemes.com/sTUAK",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Free Version",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://links.codedthemes.com/BQFrl",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Documentation",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://codedthemes.support-hub.io/",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Support",primaryTypographyProps:{variant:"h6",color:"text.primary"}})]})}),(0,M.jsx)(y.A,{style:{textDecoration:"none"},href:"https://links.codedthemes.com/Aprwb",target:"_blank",children:(0,M.jsxs)(f.A,{component:"span",children:[(0,M.jsx)(g.A,{children:(0,M.jsx)(R,{})}),(0,M.jsx)(b.A,{primary:"Purchase Now",primaryTypographyProps:{variant:"h6",color:"text.primary"}}),(0,M.jsx)(u.A,{color:"primary",label:"v1.0",size:"small"})]})})]})})})]})]})})})}))}}}]); \ No newline at end of file diff --git a/build/static/js/2898.3b8c86cc.chunk.js.LICENSE.txt b/build/static/js/2898.91e92c8b.chunk.js.LICENSE.txt similarity index 100% rename from build/static/js/2898.3b8c86cc.chunk.js.LICENSE.txt rename to build/static/js/2898.91e92c8b.chunk.js.LICENSE.txt diff --git a/build/static/js/3121.6e0ff825.chunk.js b/build/static/js/3121.4646b740.chunk.js similarity index 99% rename from build/static/js/3121.6e0ff825.chunk.js rename to build/static/js/3121.4646b740.chunk.js index 09de30c..9923a77 100644 --- a/build/static/js/3121.6e0ff825.chunk.js +++ b/build/static/js/3121.4646b740.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3121],{30633:(e,t,n)=>{"use strict";n.d(t,{l:()=>Ja});var a=n(58168),o=n(98587),r=n(9950),s=n.t(r,2),i=n(47223),l=n(48283),u=n(11942),c=n.n(u);function d(e,t,n){return"function"===typeof e?e(t,n):e}const m=c().oneOfType([c().func,c().object]),h=(e,t)=>e.length===t.length&&t.every((t=>e.includes(t))),p=(e,t,n)=>{let a=t;return a=e.setHours(a,e.getHours(n)),a=e.setMinutes(a,e.getMinutes(n)),a=e.setSeconds(a,e.getSeconds(n)),a},f=e=>{let{date:t,disableFuture:n,disablePast:a,maxDate:o,minDate:r,isDateDisabled:s,utils:i,timezone:l}=e;const u=p(i,i.dateWithTimezone(void 0,l),t);a&&i.isBefore(r,u)&&(r=u),n&&i.isAfter(o,u)&&(o=u);let c=t,d=t;for(i.isBefore(t,r)&&(c=r,d=null),i.isAfter(t,o)&&(d&&(d=o),c=null);c||d;){if(c&&i.isAfter(c,o)&&(c=null),d&&i.isBefore(d,r)&&(d=null),c){if(!s(c))return c;c=i.addDays(c,1)}if(d){if(!s(d))return d;d=i.addDays(d,-1)}}return null},y=(e,t,n)=>null!=t&&e.isValid(t)?t:n,v=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},g=(e,t,n)=>"date"===n?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),b=["year","month","day"],w=e=>b.includes(e),D=(e,t,n)=>{let{format:a,views:o}=t;if(null!=a)return a;const r=e.formats;return h(o,["year"])?r.year:h(o,["month"])?r.month:h(o,["day"])?r.dayOfMonth:h(o,["month","year"])?"".concat(r.month," ").concat(r.year):h(o,["day","month"])?"".concat(r.month," ").concat(r.dayOfMonth):n?/en/.test(e.getCurrentLocaleCode())?r.normalDateWithWeekday:r.normalDate:r.keyboardDate},x=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map((t=>e.addDays(n,t)))},A=["hours","minutes","seconds"],M=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),C={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},S=(e,t,n)=>{if(t===C.year)return e.startOfYear(n);if(t===C.month)return e.startOfMonth(n);if(t===C.day)return e.startOfDay(n);let a=n;return t{let{props:t,utils:n,granularity:a,timezone:o,getTodayDate:r}=e;var s;let i=r?r():S(n,a,g(n,o));null!=t.minDate&&n.isAfterDay(t.minDate,i)&&(i=S(n,a,t.minDate)),null!=t.maxDate&&n.isBeforeDay(t.maxDate,i)&&(i=S(n,a,t.maxDate));const l=((e,t)=>(n,a)=>e?t.isAfter(n,a):M(n,t)>M(a,t))(null!=(s=t.disableIgnoringDatePartForTimeValidation)&&s,n);return null!=t.minTime&&l(t.minTime,i)&&(i=S(n,a,t.disableIgnoringDatePartForTimeValidation?t.minTime:p(n,i,t.minTime))),null!=t.maxTime&&l(i,t.maxTime)&&(i=S(n,a,t.disableIgnoringDatePartForTimeValidation?t.maxTime:p(n,i,t.maxTime))),i},T=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error(['MUI: The token "'.concat(t,'" is not supported by the Date and Time Pickers.'),"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"===typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},k=(e,t,n)=>{const a=[],o=e.dateWithTimezone(void 0,t),r=e.startOfWeek(o),s=e.endOfWeek(o);let i=r;for(;e.isBefore(i,s);)a.push(i),i=e.addDays(i,1);return a.map((t=>e.formatByString(t,n)))},V=(e,t,n,a)=>{switch(n){case"month":return v(e,e.dateWithTimezone(void 0,t)).map((t=>e.formatByString(t,a)));case"weekDay":return k(e,t,a);case"meridiem":{const n=e.dateWithTimezone(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,a)))}default:return[]}},O=(e,t,n)=>{let a=t;for(a=Number(a).toString();a.length{if("day"===o.type&&"digit-with-letter"===o.contentType){const t=e.setDate(a.longestMonth,n);return e.formatByString(t,o.format)}const r=n.toString();return o.hasLeadingZerosInInput?O(0,r,o.maxLength):r},F=(e,t,n,a,o,r,s)=>{const i=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(a),l="Home"===a,u="End"===a,c=""===n.value||l||u;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const a=o[n.type]({currentDate:r,format:n.format,contentType:n.contentType}),d=t=>I(e,0,t,a,n),m="minutes"===n.type&&null!=s&&s.minutesStep?s.minutesStep:1;let h=parseInt(n.value,10)+i*m;if(c){if("year"===n.type&&!u&&!l)return e.formatByString(e.dateWithTimezone(void 0,t),n.format);h=i>0||l?a.minimum:a.maximum}return h%m!==0&&((i<0||l)&&(h+=m-(m+h)%m),(i>0||u)&&(h-=h%m)),h>a.maximum?d(a.minimum+(h-a.maximum-1)%(a.maximum-a.minimum+1)):h{const a=V(e,t,n.type,n.format);if(0===a.length)return n.value;if(c)return i>0||l?a[0]:a[a.length-1];const o=a.indexOf(n.value);return a[(o+a.length+i)%a.length]})()},L=(e,t)=>{let n=e.value||e.placeholder;const a="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(n=Number(n).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!a&&1===n.length&&(n="".concat(n,"\u200e")),"input-rtl"===t&&(n="\u2068".concat(n,"\u2069")),n},R=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),N=(e,t)=>{let n=0,o=t?1:0;const r=[];for(let s=0;s{switch(a.type){case"year":return n.fieldYearPlaceholder({digitAmount:e.formatByString(e.dateWithTimezone(void 0,t),o).length,format:o});case"month":return n.fieldMonthPlaceholder({contentType:a.contentType,format:o});case"day":return n.fieldDayPlaceholder({format:o});case"weekDay":return n.fieldWeekDayPlaceholder({contentType:a.contentType,format:o});case"hours":return n.fieldHoursPlaceholder({format:o});case"minutes":return n.fieldMinutesPlaceholder({format:o});case"seconds":return n.fieldSecondsPlaceholder({format:o});case"meridiem":return n.fieldMeridiemPlaceholder({format:o});default:return o}},j=(e,t,n,a)=>e.formatByString(e.parse(t,n),a),z=(e,t,n)=>4===e.formatByString(e.dateWithTimezone(void 0,t),n).length,Y=(e,t,n,a,o)=>{if("digit"!==n)return!1;const r=e.dateWithTimezone(void 0,t);switch(a){case"year":if(z(e,t,o)){return"0001"===e.formatByString(e.setYear(r,1),o)}return"01"===e.formatByString(e.setYear(r,2001),o);case"month":return e.formatByString(e.startOfYear(r),o).length>1;case"day":return e.formatByString(e.startOfMonth(r),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(r),o).length>1;case"hours":return e.formatByString(e.setHours(r,1),o).length>1;case"minutes":return e.formatByString(e.setMinutes(r,1),o).length>1;case"seconds":return e.formatByString(e.setSeconds(r,1),o).length>1;default:throw new Error("Invalid section type")}},B=(e,t,n,o,r,s,i,l)=>{let u="";const c=[],d=e.date(),m=o=>{if(""===o)return null;const s=T(e,o),l=Y(e,t,s.contentType,s.type,o),m=i?l:"digit"===s.contentType,h=null!=r&&e.isValid(r);let p=h?e.formatByString(r,o):"",f=null;if(m)if(l)f=""===p?e.formatByString(d,o).length:p.length;else{if(null==s.maxLength)throw new Error("MUI: The token ".concat(o," should have a 'maxDigitNumber' property on it's adapter"));f=s.maxLength,h&&(p=O(0,p,f))}return c.push((0,a.A)({},s,{format:o,maxLength:f,value:p,placeholder:E(e,t,n,s,o),hasLeadingZeros:l,hasLeadingZerosInFormat:l,hasLeadingZerosInInput:m,startSeparator:0===c.length?u:"",endSeparator:"",modified:!1})),null};let h=10,p=o,f=e.expandFormat(o);for(;f!==p;)if(p=f,f=e.expandFormat(p),h-=1,h<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const y=f,v=((e,t)=>{const n=[],{start:a,end:o}=e.escapedCharacters,r=new RegExp("(\\".concat(a,"[^\\").concat(o,"]*\\").concat(o,")+"),"g");let s=null;for(;s=r.exec(t);)n.push({start:s.index,end:r.lastIndex-1});return n})(e,y),g=new RegExp("^(".concat(Object.keys(e.formatTokenMap).sort(((e,t)=>t.length-e.length)).join("|"),")"),"g");let b="";for(let a=0;ae.start<=a&&e.end>=a)),t=y[a],n=null!=e,o="".concat(b).concat(y.slice(a)),r=g.test(o);if(!n&&t.match(/([A-Za-z]+)/)&&r)b=o.slice(0,g.lastIndex),a+=g.lastIndex-1;else{n&&(null==e?void 0:e.start)===a||(null==e?void 0:e.end)===a||(m(b),b="",0===c.length?u+=t:c[c.length-1].endSeparator+=t)}}return m(b),c.map((e=>{const t=e=>{let t=e;return l&&null!==t&&t.includes(" ")&&(t="\u2069".concat(t,"\u2066")),"spacious"===s&&["/",".","-"].includes(t)&&(t=" ".concat(t," ")),t};return e.startSeparator=t(e.startSeparator),e.endSeparator=t(e.endSeparator),e}))};const H=(e,t)=>{0},W={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},U=(e,t,n,a,o,r)=>[...a].sort(((e,t)=>W[e.type]-W[t.type])).reduce(((a,o)=>!r||o.modified?((e,t,n,a,o)=>{switch(n.type){case"year":return e.setYear(o,e.getYear(a));case"month":return e.setMonth(o,e.getMonth(a));case"weekDay":{const o=k(e,t,n.format),r=e.formatByString(a,n.format),s=o.indexOf(r),i=o.indexOf(n.value)-s;return e.addDays(a,i)}case"day":return e.setDate(o,e.getDate(a));case"meridiem":{const t=e.getHours(a)<12,n=e.getHours(o);return t&&n>=12?e.addHours(o,-12):!t&&n<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(a));case"minutes":return e.setMinutes(o,e.getMinutes(a));case"seconds":return e.setSeconds(o,e.getSeconds(a));default:return o}})(e,t,o,n,a):a),o),K=["value","referenceDate"],Z={emptyValue:null,getTodayValue:g,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,a=(0,o.A)(e,K);return null!=t&&a.utils.isValid(t)?t:null!=n?n:P(a)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},$={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,a,o)=>!e.isValid(t)&&!!n?n:N(o(t),a),getValueStrFromSections:(e,t)=>{const n=e.map((e=>{const n=L(e,t?"input-rtl":"input-ltr");return"".concat(e.startSeparator).concat(n).concat(e.endSeparator)})).join("");return t?"\u2066".concat(n,"\u2069"):n},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)};var q=n(81831);const G={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>"Select ".concat(e,". ").concat(null===t?"No time selected":"Selected time is ".concat(n.format(t,"fullTime"))),hoursClockNumberText:e=>"".concat(e," hours"),minutesClockNumberText:e=>"".concat(e," minutes"),secondsClockNumberText:e=>"".concat(e," seconds"),selectViewText:e=>"Select ".concat(e),calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>"Week ".concat(e),calendarWeekNumberText:e=>"".concat(e),openDatePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?"Choose date, selected date is ".concat(t.format(e,"fullDate")):"Choose date",openTimePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?"Choose time, selected time is ".concat(t.format(e,"fullTime")):"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},Q=G;X=G,(0,a.A)({},X);var X;const J=()=>{const e=r.useContext(q.F);if(null===e)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=r.useMemo((()=>(0,a.A)({},Q,e.localeText)),[e.localeText]);return r.useMemo((()=>(0,a.A)({},e,{localeText:t})),[e,t])},_=()=>J().utils,ee=()=>J().defaultDates,te=()=>J().localeText,ne=e=>{const t=_(),n=r.useRef();return void 0===n.current&&(n.current=t.dateWithTimezone(void 0,e)),n.current};var ae=n(72004),oe=n(82053),re=n(59254);function se(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const a={};return Object.keys(e).forEach((o=>{a[o]=e[o].reduce(((e,a)=>{if(a){const o=t(a);""!==o&&e.push(o),n&&n[a]&&e.push(n[a])}return e}),[]).join(" ")})),a}const ie=e=>e,le=(()=>{let e=ie;return{configure(t){e=t},generate:t=>e(t),reset(){e=ie}}})(),ue={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ce(e,t){const n=ue[t];return n?"".concat(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui","-").concat(n):"".concat(le.generate(e),"-").concat(t)}function de(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const a={};return t.forEach((t=>{a[t]=ce(e,t,n)})),a}function me(e){return ce("MuiPickersToolbar",e)}de("MuiPickersToolbar",["root","content"]);var he=n(44414);const pe=(0,re.Ay)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},n.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})})),fe=(0,re.Ay)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{ownerState:t}=e;var n;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:t.isLandscape?"flex-start":"space-between",flexDirection:t.isLandscape?null!=(n=t.landscapeDirection)?n:"column":"row",flex:1,alignItems:t.isLandscape?"flex-start":"center"}})),ye=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiPickersToolbar"}),{children:a,className:o,toolbarTitle:r,hidden:s,titleId:i}=n,u=n,c=(e=>{const{classes:t,isLandscape:n}=e;return se({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},me,t)})(u);return s?null:(0,he.jsxs)(pe,{ref:t,className:(0,ae.A)(c.root,o),ownerState:u,children:[(0,he.jsx)(oe.A,{color:"text.secondary",variant:"overline",id:i,children:r}),(0,he.jsx)(fe,{className:c.content,ownerState:u,children:a})]})}));function ve(e){return ce("MuiDatePickerToolbar",e)}de("MuiDatePickerToolbar",["root","title"]);const ge=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className"],be=(0,re.Ay)(ye,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),we=(0,re.Ay)(oe.A,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})((e=>{let{ownerState:t}=e;return(0,a.A)({},t.isLandscape&&{margin:"auto 16px auto auto"})})),De=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiDatePickerToolbar"}),{value:s,isLandscape:i,toolbarFormat:u,toolbarPlaceholder:c="\u2013\u2013",views:d,className:m}=n,h=(0,o.A)(n,ge),p=_(),f=te(),y=(e=>{const{classes:t}=e;return se({root:["root"],title:["title"]},ve,t)})(n),v=r.useMemo((()=>{if(!s)return c;const e=D(p,{format:u,views:d},!0);return p.formatByString(s,e)}),[s,u,c,p,d]),g=n;return(0,he.jsx)(be,(0,a.A)({ref:t,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:(0,ae.A)(y.root,m)},h,{children:(0,he.jsx)(we,{variant:"h4",align:i?"left":"center",ownerState:g,className:y.title,children:v})}))})),xe=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>(0,a.A)({},t,{["".concat(n.slice(0,1).toLowerCase()).concat(n.slice(1))]:e[n]})),{})};function Ae(e,t){var n,o,s,i;const u=_(),c=ee(),d=(0,l.A)({props:e,name:t}),m=r.useMemo((()=>{var e;return null==(null==(e=d.localeText)?void 0:e.toolbarTitle)?d.localeText:(0,a.A)({},d.localeText,{datePickerToolbarTitle:d.localeText.toolbarTitle})}),[d.localeText]),h=null!=(n=d.slots)?n:xe(d.components);return(0,a.A)({},d,{localeText:m},(e=>{let{openTo:t,defaultOpenTo:n,views:a,defaultViews:o}=e;const r=null!=a?a:o;let s;if(null!=t)s=t;else if(r.includes(n))s=n;else{if(!(r.length>0))throw new Error("MUI: The `views` prop must contain at least one view");s=r[0]}return{views:r,openTo:s}})({views:d.views,openTo:d.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:null!=(o=d.disableFuture)&&o,disablePast:null!=(s=d.disablePast)&&s,minDate:y(u,d.minDate,c.minDate),maxDate:y(u,d.maxDate,c.maxDate),slots:(0,a.A)({toolbar:De},h),slotProps:null!=(i=d.slotProps)?i:d.componentsProps})}const Me=e=>{let{props:t,value:n,adapter:a}=e;if(null===n)return null;const{shouldDisableDate:o,shouldDisableMonth:r,shouldDisableYear:s,disablePast:i,disableFuture:l,timezone:u}=t,c=a.utils.dateWithTimezone(void 0,u),d=y(a.utils,t.minDate,a.defaultDates.minDate),m=y(a.utils,t.maxDate,a.defaultDates.maxDate);switch(!0){case!a.utils.isValid(n):return"invalidDate";case Boolean(o&&o(n)):return"shouldDisableDate";case Boolean(r&&r(n)):return"shouldDisableMonth";case Boolean(s&&s(n)):return"shouldDisableYear";case Boolean(l&&a.utils.isAfterDay(n,c)):return"disableFuture";case Boolean(i&&a.utils.isBeforeDay(n,c)):return"disablePast";case Boolean(d&&a.utils.isBeforeDay(n,d)):return"minDate";case Boolean(m&&a.utils.isAfterDay(n,m)):return"maxDate";default:return null}};var Ce=n(89379),Se=n(80045);function Pe(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function Te(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:o,className:r}=e;if(!t){const e=(0,ae.A)(null===n||void 0===n?void 0:n.className,r,null===o||void 0===o?void 0:o.className,null===a||void 0===a?void 0:a.className),t=(0,Ce.A)((0,Ce.A)((0,Ce.A)({},null===n||void 0===n?void 0:n.style),null===o||void 0===o?void 0:o.style),null===a||void 0===a?void 0:a.style),s=(0,Ce.A)((0,Ce.A)((0,Ce.A)({},n),o),a);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}((0,Ce.A)((0,Ce.A)({},o),a)),i=Pe(a),l=Pe(o),u=t(s),c=(0,ae.A)(null===u||void 0===u?void 0:u.className,null===n||void 0===n?void 0:n.className,r,null===o||void 0===o?void 0:o.className,null===a||void 0===a?void 0:a.className),d=(0,Ce.A)((0,Ce.A)((0,Ce.A)((0,Ce.A)({},null===u||void 0===u?void 0:u.style),null===n||void 0===n?void 0:n.style),null===o||void 0===o?void 0:o.style),null===a||void 0===a?void 0:a.style),m=(0,Ce.A)((0,Ce.A)((0,Ce.A)((0,Ce.A)({},u),n),l),i);return c.length>0&&(m.className=c),Object.keys(d).length>0&&(m.style=d),{props:m,internalRef:u.ref}}const ke=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Ve(e){var t;const{elementType:n,externalSlotProps:a,ownerState:o,skipResolvingSlotProps:s=!1}=e,i=(0,Se.A)(e,ke),l=s?{}:d(a,o),{props:u,internalRef:c}=Te((0,Ce.A)((0,Ce.A)({},i),{},{externalSlotProps:l})),m=function(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}(c,null===l||void 0===l?void 0:l.ref,null===(t=e.additionalProps)||void 0===t?void 0:t.ref),h=function(e,t,n){return void 0===e||"string"===typeof e?t:(0,Ce.A)((0,Ce.A)({},t),{},{ownerState:(0,Ce.A)((0,Ce.A)({},t.ownerState),n)})}(n,(0,Ce.A)((0,Ce.A)({},u),{},{ref:m}),o);return h}var Oe=n(2046),Ie=n(25333);function Fe(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}let Le=0;const Re=s["useId".toString()];function Ne(e){if(void 0!==Re){const t=Re();return null!=e?e:t}return function(e){const[t,n]=r.useState(e),a=e||t;return r.useEffect((()=>{null==t&&(Le+=1,n("mui-".concat(Le)))}),[t]),a}(e)}var Ee=n(40165),je=n(57191),ze=n(2235),Ye=n(1849),Be=n(98370);const He="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;const We=function(e){const t=r.useRef(e);return He((()=>{t.current=e})),r.useRef((function(){return(0,t.current)(...arguments)})).current};function Ue(e){return e&&e.ownerDocument||document}function Ke(e){return ce("MuiPickersPopper",e)}de("MuiPickersPopper",["root","paper"]);const Ze=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).activeElement;return e?e.shadowRoot?Ze(e.shadowRoot):e:null},$e="@media (pointer: fine)",qe="undefined"!==typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Ge=qe&&qe[1]?parseInt(qe[1],10):null,Qe=qe&&qe[2]?parseInt(qe[2],10):null,Xe=Ge&&Ge<10||Qe&&Qe<13||!1,Je=()=>(0,i.A)("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||Xe,_e=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],et=(0,re.Ay)(Ye.A,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}})),tt=(0,re.Ay)(ze.A,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{ownerState:t}=e;return(0,a.A)({outline:0,transformOrigin:"top center"},t.placement.includes("top")&&{transformOrigin:"bottom center"})}));const nt=r.forwardRef(((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:s,children:i,paperSlotProps:l,paperClasses:u,onPaperClick:c,onPaperTouchStart:d}=e,m=(0,o.A)(e,_e),h=(0,a.A)({},s,{placement:r}),p=Ve({elementType:n,externalSlotProps:l,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:u,ownerState:h});return(0,he.jsx)(n,(0,a.A)({},m,p,{onClick:e=>{var t;c(e),null==(t=p.onClick)||t.call(p,e)},onTouchStart:e=>{var t;d(e),null==(t=p.onTouchStart)||t.call(p,e)},ownerState:h,children:i}))}));function at(e){var t,n,o,s;const i=(0,l.A)({props:e,name:"MuiPickersPopper"}),{anchorEl:u,children:c,containerRef:d=null,shouldRestoreFocus:m,onBlur:h,onDismiss:p,open:f,role:y,placement:v,slots:g,slotProps:b,reduceAnimations:w}=i;r.useEffect((()=>{function e(e){!f||"Escape"!==e.key&&"Esc"!==e.key||p()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[p,f]);const D=r.useRef(null);r.useEffect((()=>{"tooltip"===y||m&&!m()||(f?D.current=Ze(document):D.current&&D.current instanceof HTMLElement&&setTimeout((()=>{D.current instanceof HTMLElement&&D.current.focus()})))}),[f,y,m]);const[x,A,M]=function(e,t){const n=r.useRef(!1),a=r.useRef(!1),o=r.useRef(null),s=r.useRef(!1);r.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),s.current=!1};function t(){s.current=!0}}),[e]);const i=We((e=>{if(!s.current)return;const r=a.current;a.current=!1;const i=Ue(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!i.documentElement.contains(e.target)||o.current.contains(e.target),l||r||t(e)})),l=()=>{a.current=!0};return r.useEffect((()=>{if(e){const e=Ue(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",i),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",t)}}}),[e,i]),r.useEffect((()=>{if(e){const e=Ue(o.current);return e.addEventListener("click",i),()=>{e.removeEventListener("click",i),a.current=!1}}}),[e,i]),[o,l,l]}(f,null!=h?h:p),C=Fe(r.useRef(null),d),S=Fe(C,x),P=i,T=(e=>{const{classes:t}=e;return se({root:["root"],paper:["paper"]},Ke,t)})(P),k=Je(),V=null!=w?w:k,O=(null!=(t=null==g?void 0:g.desktopTransition)?t:V)?je.A:Ee.A,I=null!=(n=null==g?void 0:g.desktopTrapFocus)?n:Be.A,F=null!=(o=null==g?void 0:g.desktopPaper)?o:tt,L=null!=(s=null==g?void 0:g.popper)?s:et,R=Ve({elementType:L,externalSlotProps:null==b?void 0:b.popper,additionalProps:{transition:!0,role:y,open:f,anchorEl:u,placement:v,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),p())}},className:T.root,ownerState:i});return(0,he.jsx)(L,(0,a.A)({},R,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,he.jsx)(I,(0,a.A)({open:f,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===y,isEnabled:()=>!0},null==b?void 0:b.desktopTrapFocus,{children:(0,he.jsx)(O,(0,a.A)({},t,null==b?void 0:b.desktopTransition,{children:(0,he.jsx)(nt,{PaperComponent:F,ownerState:P,popperPlacement:n,ref:S,onPaperClick:A,onPaperTouchStart:M,paperClasses:T.paper,paperSlotProps:null==b?void 0:b.desktopPaper,children:c})}))}))}}))}function ot(e){let{controlled:t,default:n,name:a,state:o="value"}=e;const{current:s}=r.useRef(void 0!==t),[i,l]=r.useState(n);return[s?t:i,r.useCallback((e=>{s||l(e)}),[])]}function rt(e,t,n,a){const{value:o,onError:s}=e,i=J(),l=r.useRef(a),u=t({adapter:i,value:o,props:e});return r.useEffect((()=>{s&&!n(u,l.current)&&s(u,o),l.current=u}),[n,s,l,u,o]),u}const st=e=>{let{timezone:t,value:n,defaultValue:a,onChange:o,valueManager:s}=e;var i,l;const u=_(),c=r.useRef(a),d=null!=(i=null!=n?n:c.current)?i:s.emptyValue,m=r.useMemo((()=>s.getTimezone(u,d)),[u,s,d]),h=We((e=>null==m?e:s.setTimezone(u,m,e))),p=null!=(l=null!=t?t:m)?l:"default";return{value:r.useMemo((()=>s.setTimezone(u,p,d)),[s,u,p,d]),handleValueChange:We((function(e){const t=h(e);for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r{let{name:t,timezone:n,value:a,defaultValue:o,onChange:r,valueManager:s}=e;const[i,l]=ot({name:t,state:"value",controlled:a,default:null!=o?o:s.emptyValue}),u=We((function(e){l(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a{let{props:t,valueManager:n,valueType:o,wrapperVariant:s,validator:i}=e;const{onAccept:l,onChange:u,value:c,defaultValue:d,closeOnSelect:m="desktop"===s,selectedSections:h,onSelectedSectionsChange:p,timezone:f}=t,{current:y}=r.useRef(d),{current:v}=r.useRef(void 0!==c);const g=_(),b=J(),[w,D]=ot({controlled:h,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:x,setIsOpen:A}=(e=>{let{open:t,onOpen:n,onClose:a}=e;const o=r.useRef("boolean"===typeof t).current,[s,i]=r.useState(!1);return r.useEffect((()=>{if(o){if("boolean"!==typeof t)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(t)}}),[o,t]),{isOpen:s,setIsOpen:r.useCallback((e=>{o||i(e),e&&n&&n(),!e&&a&&a()}),[o,n,a])}})(t),[M,C]=r.useState((()=>{let e;return e=void 0!==c?c:void 0!==y?y:n.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:c,hasBeenModifiedSinceMount:!1}})),{timezone:S,handleValueChange:P}=st({timezone:f,value:c,defaultValue:y,onChange:u,valueManager:n});rt((0,a.A)({},t,{value:M.draft,timezone:S}),i,n.isSameError,n.defaultErrorState);const T=We((e=>{const o={action:e,dateState:M,hasChanged:t=>!n.areValuesEqual(g,e.value,t),isControlled:v,closeOnSelect:m},r=(e=>{const{action:t,hasChanged:n,dateState:a,isControlled:o}=e,r=!o&&!a.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!r||!["accept","today","clear"].includes(t.pickerAction))||n(a.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!r||n(a.lastPublishedValue)))})(o),s=(e=>{const{action:t,hasChanged:n,dateState:a,isControlled:o,closeOnSelect:r}=e,s=!o&&!a.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!s||!["accept","today","clear"].includes(t.pickerAction))||n(a.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&r?!!s||n(a.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(a.lastCommittedValue)})(o),u=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(o);if(C((t=>(0,a.A)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:s?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}))),r){const n={validationError:"setValueFromField"===e.name?e.context.validationError:i({adapter:b,value:e.value,props:(0,a.A)({},t,{value:e.value,timezone:S})})};"setValueFromShortcut"===e.name&&null!=e.shortcut&&(n.shortcut=e.shortcut),P(e.value,n)}s&&l&&l(e.value),u&&A(!1)}));if(void 0!==c&&(void 0===M.lastControlledValue||!n.areValuesEqual(g,M.lastControlledValue,c))){const e=n.areValuesEqual(g,M.draft,c);C((t=>(0,a.A)({},t,{lastControlledValue:c},e?{}:{lastCommittedValue:c,lastPublishedValue:c,draft:c,hasBeenModifiedSinceMount:!0})))}const k=We((()=>{T({value:n.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),V=We((()=>{T({value:M.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),O=We((()=>{T({value:M.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),I=We((()=>{T({value:M.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),F=We((()=>{T({value:n.getTodayValue(g,S,o),name:"setValueFromAction",pickerAction:"today"})})),L=We((()=>A(!0))),R=We((()=>A(!1))),N=We((function(e){return T({name:"setValueFromView",value:e,selectionState:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"partial"})})),E=We(((e,t,n)=>T({name:"setValueFromShortcut",value:e,changeImportance:null!=t?t:"accept",shortcut:n}))),j=We(((e,t)=>T({name:"setValueFromField",value:e,context:t}))),z=We((e=>{D(e),null==p||p(e)})),Y={onClear:k,onAccept:V,onDismiss:O,onCancel:I,onSetToday:F,onOpen:L,onClose:R},B={value:M.draft,onChange:j,selectedSections:w,onSelectedSectionsChange:z},H=r.useMemo((()=>n.cleanValue(g,M.draft)),[g,n,M.draft]);return{open:x,fieldProps:B,viewProps:{value:H,onChange:N,onClose:R,open:x,onSelectedSectionsChange:z},layoutProps:(0,a.A)({},Y,{value:H,onChange:N,onSelectShortcut:E,isValid:e=>{const o=i({adapter:b,value:e,props:(0,a.A)({},t,{value:e,timezone:S})});return!n.hasError(o)}}),actions:Y}};function ut(e){let{onChange:t,onViewChange:n,openTo:a,view:o,views:s,autoFocus:i,focusedView:l,onFocusedViewChange:u}=e;var c,d;const m=r.useRef(a),h=r.useRef(s),p=r.useRef(s.includes(a)?a:s[0]),[f,y]=ot({name:"useViews",state:"view",controlled:o,default:p.current}),v=r.useRef(i?f:null),[g,b]=ot({name:"useViews",state:"focusedView",controlled:l,default:v.current});r.useEffect((()=>{(m.current&&m.current!==a||h.current&&h.current.some((e=>!s.includes(e))))&&(y(s.includes(a)?a:s[0]),h.current=s,m.current=a)}),[a,y,f,s]);const w=s.indexOf(f),D=null!=(c=s[w-1])?c:null,x=null!=(d=s[w+1])?d:null,A=We(((e,t)=>{b(t?e:t=>e===t?null:t),null==u||u(e,t)})),M=We((e=>{A(e,!0),e!==f&&(y(e),n&&n(e))})),C=We((()=>{x&&M(x)})),S=We(((e,n,a)=>{const o="finish"===n,r=a?s.indexOf(a){let{props:t,propsFromPickerValue:n,additionalViewProps:s,inputRef:i,autoFocusView:l}=e;const{onChange:u,open:c,onSelectedSectionsChange:d,onClose:m}=n,{view:h,views:p,openTo:f,onViewChange:y,viewRenderers:v,timezone:g}=t,b=(0,o.A)(t,ct),{view:w,setView:D,defaultView:x,focusedView:M,setFocusedView:C,setValueAndGoToNextView:S}=ut({view:h,views:p,openTo:f,onChange:u,onViewChange:y,autoFocus:l}),{hasUIView:P,viewModeLookup:T}=r.useMemo((()=>p.reduce(((e,t)=>{let n;return n=null!=v[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[v,p]),k=r.useMemo((()=>p.reduce(((e,t)=>null!=v[t]&&(e=>A.includes(e))(t)?e+1:e),0)),[v,p]),V=T[w],O=We((()=>"UI"===V)),[I,F]=r.useState("UI"===V?w:null);I!==w&&"UI"===T[w]&&F(w),He((()=>{"field"===V&&c&&(m(),setTimeout((()=>{null==i||i.current.focus(),d(w)})))}),[w]),He((()=>{if(!c)return;let e=w;"field"===V&&null!=I&&(e=I),e!==x&&"UI"===T[e]&&"UI"===T[x]&&(e=x),e!==w&&D(e),C(e,!0)}),[c]);return{hasUIView:P,shouldRestoreFocus:O,layoutProps:{views:p,view:I,onViewChange:D},renderCurrentView:()=>{if(null==I)return null;const e=v[I];return null==e?null:e((0,a.A)({},b,s,n,{views:p,timezone:g,onChange:S,view:I,onViewChange:D,focusedView:M,onFocusedViewChange:C,showViewSwitcher:k>1,timeViewsCount:k}))}}};function mt(){return"undefined"===typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const ht=(e,t)=>{const[n,a]=r.useState(mt);if(He((()=>{const e=()=>{a(mt())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),o=e,s=["hours","minutes","seconds"],Array.isArray(s)?s.every((e=>-1!==o.indexOf(e))):-1!==o.indexOf(s))return!1;var o,s;return"landscape"===(t||n)};(0,n(46081).f)(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const pt=e=>{let{props:t,valueManager:n,valueType:o,wrapperVariant:r,inputRef:s,additionalViewProps:i,validator:l,autoFocusView:u}=e;const c=lt({props:t,valueManager:n,valueType:o,wrapperVariant:r,validator:l}),d=dt({props:t,inputRef:s,additionalViewProps:i,autoFocusView:u,propsFromPickerValue:c.viewProps}),m=(e=>{let{props:t,propsFromPickerValue:n,propsFromPickerViews:o,wrapperVariant:r}=e;const{orientation:s}=t,i=ht(o.views,s);return{layoutProps:(0,a.A)({},o,n,{isLandscape:i,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}})({props:t,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:d.layoutProps});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:d.renderCurrentView,hasUIView:d.hasUIView,shouldRestoreFocus:d.shouldRestoreFocus,layoutProps:m.layoutProps}};function ft(e){return ce("MuiPickersLayout",e)}const yt=de("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);var vt=n(82223),gt=n(79739);const bt=["onAccept","onClear","onCancel","onSetToday","actions"];function wt(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:s,actions:i}=e,l=(0,o.A)(e,bt),u=te();if(null==i||0===i.length)return null;const c=null==i?void 0:i.map((e=>{switch(e){case"clear":return(0,he.jsx)(vt.A,{onClick:n,children:u.clearButtonLabel},e);case"cancel":return(0,he.jsx)(vt.A,{onClick:r,children:u.cancelButtonLabel},e);case"accept":return(0,he.jsx)(vt.A,{onClick:t,children:u.okButtonLabel},e);case"today":return(0,he.jsx)(vt.A,{onClick:s,children:u.todayButtonLabel},e);default:return null}}));return(0,he.jsx)(gt.A,(0,a.A)({},l,{children:c}))}var Dt=n(249),xt=n(26050),At=n(25277);const Mt=320,Ct=["items","changeImportance","isLandscape","onChange","isValid"],St=["getValue"];function Pt(e){const{items:t,changeImportance:n,onChange:r,isValid:s}=e,i=(0,o.A)(e,Ct);if(null==t||0===t.length)return null;const l=t.map((e=>{let{getValue:t}=e,a=(0,o.A)(e,St);const i=t({isValid:s});return{label:a.label,onClick:()=>{r(i,n,a)},disabled:!s(i)}}));return(0,he.jsx)(Dt.A,(0,a.A)({dense:!0,sx:[{maxHeight:334,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:l.map((e=>(0,he.jsx)(xt.Ay,{children:(0,he.jsx)(At.A,(0,a.A)({},e))},e.label)))}))}const Tt=e=>{var t,n;const{wrapperVariant:o,onAccept:r,onClear:s,onCancel:i,onSetToday:l,view:u,views:c,onViewChange:d,value:m,onChange:h,onSelectShortcut:p,isValid:f,isLandscape:y,disabled:v,readOnly:g,children:b,components:w,componentsProps:D,slots:x,slotProps:A}=e,M=null!=x?x:xe(w),C=null!=A?A:D,S=(e=>{const{classes:t,isLandscape:n}=e;return se({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},ft,t)})(e),P=null!=(t=null==M?void 0:M.actionBar)?t:wt,T=Ve({elementType:P,externalSlotProps:null==C?void 0:C.actionBar,additionalProps:{onAccept:r,onClear:s,onCancel:i,onSetToday:l,actions:"desktop"===o?[]:["cancel","accept"],className:S.actionBar},ownerState:(0,a.A)({},e,{wrapperVariant:o})}),k=(0,he.jsx)(P,(0,a.A)({},T)),V=null==M?void 0:M.toolbar,O=Ve({elementType:V,externalSlotProps:null==C?void 0:C.toolbar,additionalProps:{isLandscape:y,onChange:h,value:m,view:u,onViewChange:d,views:c,disabled:v,readOnly:g,className:S.toolbar},ownerState:(0,a.A)({},e,{wrapperVariant:o})}),I=function(e){return null!==e.view}(O)&&V?(0,he.jsx)(V,(0,a.A)({},O)):null,F=b,L=null==M?void 0:M.tabs,R=u&&L?(0,he.jsx)(L,(0,a.A)({view:u,onViewChange:d,className:S.tabs},null==C?void 0:C.tabs)):null,N=null!=(n=null==M?void 0:M.shortcuts)?n:Pt,E=Ve({elementType:N,externalSlotProps:null==C?void 0:C.shortcuts,additionalProps:{isValid:f,isLandscape:y,onChange:p,className:S.shortcuts},ownerState:{isValid:f,isLandscape:y,onChange:p,className:S.shortcuts,wrapperVariant:o}});return{toolbar:I,content:F,tabs:R,actionBar:k,shortcuts:u&&N?(0,he.jsx)(N,(0,a.A)({},E)):null}},kt=(0,re.Ay)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return{display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",["& .".concat(yt.toolbar)]:n.isLandscape?{gridColumn:"rtl"===t.direction?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[".".concat(yt.shortcuts)]:n.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:"rtl"===t.direction?3:1,gridRow:"2 / 3"},["& .".concat(yt.actionBar)]:{gridColumn:"1 / 4",gridRow:3}}}));kt.propTypes={as:c().elementType,ownerState:c().shape({isLandscape:c().bool.isRequired}).isRequired,sx:c().oneOfType([c().arrayOf(c().oneOfType([c().func,c().object,c().bool])),c().func,c().object])};const Vt=(0,re.Ay)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Ot=function(e){const t=(0,l.A)({props:e,name:"MuiPickersLayout"}),{toolbar:n,content:a,tabs:o,actionBar:s,shortcuts:i}=Tt(t),{sx:u,className:c,isLandscape:d,ref:m,wrapperVariant:h}=t,p=t,f=(e=>{const{isLandscape:t,classes:n}=e;return se({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},ft,n)})(p);return(0,he.jsxs)(kt,{ref:m,sx:u,className:(0,ae.A)(c,f.root),ownerState:p,children:[d?i:n,d?n:i,(0,he.jsx)(Vt,{className:f.contentWrapper,children:"desktop"===h?(0,he.jsxs)(r.Fragment,{children:[a,o]}):(0,he.jsxs)(r.Fragment,{children:[o,a]})}),s]})},It=["props","getOpenDialogAriaText"],Ft=["ownerState"],Lt=["ownerState"];var Rt=n(23235);const Nt=(0,Rt.A)((0,he.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Et=(0,Rt.A)((0,he.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),jt=(0,Rt.A)((0,he.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),zt=(0,Rt.A)((0,he.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),Yt=((0,Rt.A)((0,he.jsxs)(r.Fragment,{children:[(0,he.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,he.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,Rt.A)((0,he.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),(0,Rt.A)((0,he.jsxs)(r.Fragment,{children:[(0,he.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,he.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),(0,Rt.A)((0,he.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"));var Bt=n(29925),Ht=n(14857);const Wt=e=>{const t=_(),n=te(),o=J(),s="rtl"===(0,Ht.A)().direction,{valueManager:i,fieldValueManager:l,valueType:u,validator:c,internalProps:d,internalProps:{value:m,defaultValue:h,referenceDate:p,onChange:f,format:y,formatDensity:g="dense",selectedSections:b,onSelectedSectionsChange:w,shouldRespectLeadingZeros:D=!1,timezone:x}}=e,{timezone:A,value:M,handleValueChange:S}=st({timezone:x,value:m,defaultValue:h,onChange:f,valueManager:i}),P=r.useMemo((()=>((e,t)=>{const n=e.dateWithTimezone(void 0,t),a=e.endOfYear(n),o=e.endOfDay(n),{maxDaysInMonth:r,longestMonth:s}=v(e,n).reduce(((t,n)=>{const a=e.getDaysInMonth(n);return a>t.maxDaysInMonth?{maxDaysInMonth:a,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:n=>{let{format:a}=n;return{minimum:0,maximum:z(e,t,a)?9999:99}},month:()=>({minimum:1,maximum:e.getMonth(a)+1}),day:t=>{let{currentDate:n}=t;return{minimum:1,maximum:null!=n&&e.isValid(n)?e.getDaysInMonth(n):r,longestMonth:s}},weekDay:n=>{let{format:a,contentType:o}=n;if("digit"===o){const n=k(e,t,a).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:t=>{let{format:a}=t;const r=e.getHours(o);return e.formatByString(e.endOfDay(n),a)!==r.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(n),a))}:{minimum:0,maximum:r}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:0})}})(t,A)),[t,A]),T=r.useCallback((function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return l.getSectionsFromValue(t,e,a,s,(e=>B(t,A,n,y,e,g,D,s)))}),[l,y,n,s,D,t,g,A]),V=r.useMemo((()=>l.getValueStrFromSections(T(i.emptyValue),s)),[l,T,i.emptyValue,s]),[O,I]=r.useState((()=>{const e=T(M);H();const n={sections:e,value:M,referenceValue:i.emptyValue,tempValueStrAndroid:null},o=(e=>Math.max(...e.map((e=>{var t;return null!=(t=C[e.type])?t:1}))))(e),r=i.getInitialReferenceValue({referenceDate:p,value:M,utils:t,props:d,granularity:o,timezone:A});return(0,a.A)({},n,{referenceValue:r})})),[F,R]=ot({controlled:b,default:null,name:"useField",state:"selectedSectionIndexes"}),E=e=>{R(e),null==w||w(e),I((e=>(0,a.A)({},e,{selectedSectionQuery:null})))},j=r.useMemo((()=>{if(null==F)return null;if("all"===F)return{startIndex:0,endIndex:O.sections.length-1,shouldSelectBoundarySelectors:!0};if("number"===typeof F)return{startIndex:F,endIndex:F};if("string"===typeof F){const e=O.sections.findIndex((e=>e.type===F));return{startIndex:e,endIndex:e}}return F}),[F,O.sections]),Y=e=>{let{value:n,referenceValue:r,sections:s}=e;if(I((e=>(0,a.A)({},e,{sections:s,value:n,referenceValue:r,tempValueStrAndroid:null}))),i.areValuesEqual(t,O.value,n))return;const l={validationError:c({adapter:o,value:n,props:(0,a.A)({},d,{value:n,timezone:A})})};S(n,l)},W=(e,t)=>{const n=[...O.sections];return n[e]=(0,a.A)({},n[e],{value:t,modified:!0}),N(n,s)};return r.useEffect((()=>{const e=T(O.value);H(),I((t=>(0,a.A)({},t,{sections:e})))}),[y,t.locale]),r.useEffect((()=>{let e=!1;e=!i.areValuesEqual(t,O.value,M)||i.getTimezone(t,O.value)!==i.getTimezone(t,M),e&&I((e=>(0,a.A)({},e,{value:M,referenceValue:l.updateReferenceValue(t,M,e.referenceValue),sections:T(M)})))}),[M]),{state:O,selectedSectionIndexes:j,setSelectedSections:E,clearValue:()=>{Y({value:i.emptyValue,referenceValue:O.referenceValue,sections:T(i.emptyValue)})},clearActiveSection:()=>{if(null==j)return;const e=O.sections[j.startIndex],n=l.getActiveDateManager(t,O,e),o=n.getSections(O.sections).filter((e=>""!==e.value)).length===(""===e.value?0:1),r=W(j.startIndex,""),s=o?null:t.date(new Date("")),i=n.getNewValuesFromNewActiveDate(s);(null!=s&&!t.isValid(s))!==(null!=n.date&&!t.isValid(n.date))?Y((0,a.A)({},i,{sections:r})):I((e=>(0,a.A)({},e,i,{sections:r,tempValueStrAndroid:null})))},updateSectionValue:e=>{let{activeSection:n,newSectionValue:o,shouldGoToNextSection:r}=e;r&&j&&j.startIndex{const n=t.some((e=>"day"===e.type)),a=[],o=[];for(let i=0;i(0,a.A)({},e,d,{sections:i,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const a=l.parseValueStr(e,O.referenceValue,((e,a)=>{const o=t.parse(e,y);if(null==o||!t.isValid(o))return null;const r=B(t,A,n,y,o,g,D,s);return U(t,A,o,r,a,!1)})),o=l.updateReferenceValue(t,a,O.referenceValue);Y({value:a,referenceValue:o,sections:T(a,O.sections)})},setTempAndroidValueStr:e=>I((t=>(0,a.A)({},t,{tempValueStrAndroid:e}))),sectionsValueBoundaries:P,placeholder:V,timezone:A}},Ut=e=>null!=e.saveQuery,Kt=e=>{let{sections:t,updateSectionValue:n,sectionsValueBoundaries:o,setTempAndroidValueStr:s,timezone:i}=e;const l=_(),[u,c]=r.useState(null),d=We((()=>c(null)));r.useEffect((()=>{var e;null!=u&&(null==(e=t[u.sectionIndex])?void 0:e.type)!==u.sectionType&&d()}),[t,u,d]),r.useEffect((()=>{if(null!=u){const e=setTimeout((()=>d()),5e3);return()=>{window.clearTimeout(e)}}return()=>{}}),[u,d]);const m=(e,n,a)=>{let{keyPressed:o,sectionIndex:r}=e;const s=o.toLowerCase(),i=t[r];if(null!=u&&(!a||a(u.value))&&u.sectionIndex===r){const e="".concat(u.value).concat(s),t=n(e,i);if(!Ut(t))return c({sectionIndex:r,value:e,sectionType:i.type}),t}const l=n(s,i);return Ut(l)&&!l.saveQuery?(d(),null):(c({sectionIndex:r,value:s,sectionType:i.type}),Ut(l)?null:l)};return{applyCharacterEditing:We((e=>{const r=t[e.sectionIndex],u=" "!==e.keyPressed&&!Number.isNaN(Number(e.keyPressed))?(e=>{const t=(e,t)=>{const n=Number("".concat(e)),a=o[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(n>a.maximum)return{saveQuery:!1};if(na.maximum||e.length===a.maximum.toString().length;return{sectionValue:I(l,0,n,a,t),shouldGoToNextSection:r}};return m(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const o=Y(l,i,"digit","month","MM"),r=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:o,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Ut(r))return r;const s=j(l,r.sectionValue,"MM",n.format);return(0,a.A)({},r,{sectionValue:s})}if("weekDay"===n.type){const o=t(e,n);if(Ut(o))return o;const r=k(l,i,n.format)[Number(o.sectionValue)-1];return(0,a.A)({},o,{sectionValue:r})}return{saveQuery:!1}}),(e=>!Number.isNaN(Number(e))))})(e):(e=>{const t=(e,t,n)=>{const a=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===a.length?{saveQuery:!1}:{sectionValue:a[0],shouldGoToNextSection:1===a.length}},n=(e,n,o,r)=>{const s=e=>V(l,i,n.type,e);if("letter"===n.contentType)return t(n.format,s(n.format),e);if(o&&null!=r&&"letter"===T(l,o).contentType){const n=s(o),i=t(0,n,e);return Ut(i)?{saveQuery:!1}:(0,a.A)({},i,{sectionValue:r(i.sectionValue,n)})}return{saveQuery:!1}};return m(e,((e,t)=>{switch(t.type){case"month":{const a=e=>j(l,e,l.formats.month,t.format);return n(e,t,l.formats.month,a)}case"weekDay":{const a=(e,t)=>t.indexOf(e).toString();return n(e,t,l.formats.weekday,a)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(e);null==u?s(null):n({activeSection:r,newSectionValue:u.sectionValue,shouldGoToNextSection:u.shouldGoToNextSection})})),resetCharacterQuery:d}},Zt=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],$t=e=>{const t=_(),{state:n,selectedSectionIndexes:s,setSelectedSections:i,clearValue:l,clearActiveSection:u,updateSectionValue:c,updateValueFromValueStr:d,setTempAndroidValueStr:m,sectionsValueBoundaries:h,placeholder:p,timezone:f}=Wt(e),{inputRef:y,internalProps:v,internalProps:{readOnly:g=!1,unstableFieldRef:b,minutesStep:w},forwardedProps:{onClick:D,onKeyDown:x,onFocus:A,onBlur:M,onMouseUp:C,onPaste:S,error:P,clearable:T,onClear:k,disabled:V},fieldValueManager:O,valueManager:I,validator:L}=e,N=(0,o.A)(e.forwardedProps,Zt),{applyCharacterEditing:E,resetCharacterQuery:j}=Kt({sections:n.sections,updateSectionValue:c,sectionsValueBoundaries:h,setTempAndroidValueStr:m,timezone:f}),z=r.useRef(null),Y=Fe(y,z),B=r.useRef(void 0),H="rtl"===(0,Ht.A)().direction,W=r.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,a)=>{const o=0===a?null:a-1,r=a===e.length-1?null:a+1;n[a]={leftIndex:o,rightIndex:r}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const a={},o={};let r=0,s=0,i=e.length-1;for(;i>=0;){s=e.findIndex(((e,t)=>{var n;return t>=r&&(null==(n=e.endSeparator)?void 0:n.includes(" "))&&" / "!==e.endSeparator})),-1===s&&(s=e.length-1);for(let e=s;e>=r;e-=1)o[e]=i,a[i]=e,i-=1;r=s+1}return e.forEach(((t,r)=>{const s=o[r],i=0===s?null:a[s-1],l=s===e.length-1?null:a[s+1];n[r]={leftIndex:i,rightIndex:l}})),{neighbors:n,startIndex:a[0],endIndex:a[e.length-1]}})(n.sections,H)),[n.sections,H]),U=()=>{var e;if(g)return void i(null);const t=null!=(e=z.current.selectionStart)?e:0;let a;a=t<=n.sections[0].startInInput||t>=n.sections[n.sections.length-1].endInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>t));const o=-1===a?n.sections.length-1:a-1;i(o)},K=We((function(e){if(!e.isDefaultPrevented()){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a{null==C||C(e),e.preventDefault()})),$=We((function(){null==A||A(...arguments);const e=z.current;window.clearTimeout(B.current),B.current=setTimeout((()=>{e&&e===z.current&&(null!=s||g||(e.value.length&&Number(e.selectionEnd)-Number(e.selectionStart)===e.value.length?i("all"):U()))}))})),q=We((function(){null==M||M(...arguments),i(null)})),G=We((e=>{if(null==S||S(e),g)return void e.preventDefault();const t=e.clipboardData.getData("text");if(s&&s.startIndex===s.endIndex){const a=n.sections[s.startIndex],o=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===a.contentType&&o||"digit"===a.contentType&&r||"digit-with-letter"===a.contentType&&i)return j(),c({activeSection:a,newSectionValue:t,shouldGoToNextSection:!0}),void e.preventDefault();if(o||r)return void e.preventDefault()}e.preventDefault(),j(),d(t)})),Q=We((e=>{if(g)return;const t=e.target.value;if(""===t)return j(),void l();const a=e.nativeEvent.data,o=a&&a.length>1,r=o?a:t,i=R(r);if(null==s||o)return void d(o?a:i);let c;if(0===s.startIndex&&s.endIndex===n.sections.length-1&&1===i.length)c=i;else{const e=R(O.getValueStrFromSections(n.sections,H));let t=-1,a=-1;for(let n=0;no.end)return;const r=i.length-e.length+o.end-R(o.endSeparator||"").length;c=i.slice(o.start+R(o.startSeparator||"").length,r)}0!==c.length?E({keyPressed:c,sectionIndex:s.startIndex}):navigator.userAgent.toLowerCase().indexOf("android")>-1?m(r):(j(),u())})),X=We((e=>{switch(null==x||x(e),!0){case"a"===e.key&&(e.ctrlKey||e.metaKey):e.preventDefault(),i("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==s)i(W.startIndex);else if(s.startIndex!==s.endIndex)i(s.endIndex);else{const e=W.neighbors[s.startIndex].rightIndex;null!==e&&i(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==s)i(W.endIndex);else if(s.startIndex!==s.endIndex)i(s.startIndex);else{const e=W.neighbors[s.startIndex].leftIndex;null!==e&&i(e)}break;case"Delete"===e.key:if(e.preventDefault(),g)break;null==s||0===s.startIndex&&s.endIndex===n.sections.length-1?l():u(),j();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),g||null==s)break;const a=n.sections[s.startIndex],o=O.getActiveDateManager(t,n,a),r=F(t,f,a,e.key,h,o.date,{minutesStep:w});c({activeSection:a,newSectionValue:r,shouldGoToNextSection:!1});break}}}));He((()=>{if(!z.current)return;if(null==s)return void(z.current.scrollLeft&&(z.current.scrollLeft=0));const e=n.sections[s.startIndex],t=n.sections[s.endIndex];let a=e.startInInput,o=t.endInInput;if(s.shouldSelectBoundarySelectors&&(a-=e.startSeparator.length,o+=t.endSeparator.length),a!==z.current.selectionStart||o!==z.current.selectionEnd){const e=z.current.scrollTop;z.current===Ze(document)&&z.current.setSelectionRange(a,o),z.current.scrollTop=e}}));const J=rt((0,a.A)({},v,{value:n.value,timezone:f}),L,I.isSameError,I.defaultErrorState),ee=r.useMemo((()=>void 0!==P?P:I.hasError(J)),[I,J,P]);r.useEffect((()=>{ee||s||j()}),[n.referenceValue,s,ee]),r.useEffect((()=>(z.current&&z.current===document.activeElement&&i("all"),()=>window.clearTimeout(B.current))),[]),r.useEffect((()=>{null!=n.tempValueStrAndroid&&null!=s&&(j(),u())}),[n.tempValueStrAndroid]);const te=r.useMemo((()=>{var e;return null!=(e=n.tempValueStrAndroid)?e:O.getValueStrFromSections(n.sections,H)}),[n.sections,O,n.tempValueStrAndroid,H]),ne=r.useMemo((()=>null==s||"letter"===n.sections[s.startIndex].contentType?"text":"numeric"),[s,n.sections]),ae=z.current&&z.current===Ze(document),oe=I.areValuesEqual(t,n.value,I.emptyValue),re=!ae&&oe;r.useImperativeHandle(b,(()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var e,t,a;const o=null!=(e=z.current.selectionStart)?e:0,r=null!=(t=z.current.selectionEnd)?t:0,s=!(null==(a=z.current)||!a.readOnly);if(0===o&&0===r||s)return null;const i=o<=n.sections[0].startInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>o));return-1===i?n.sections.length-1:i-1},setSelectedSections:e=>i(e)})));const se=We((function(e){var t;e.preventDefault();for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;oXt.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}),_t=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],en=e=>{let{props:t,inputRef:n}=e;const o=(e=>{var t,n,o;const r=_(),s=ee();return(0,a.A)({},e,{disablePast:null!=(t=e.disablePast)&&t,disableFuture:null!=(n=e.disableFuture)&&n,format:null!=(o=e.format)?o:r.formats.keyboardDate,minDate:y(r,e.minDate,s.minDate),maxDate:y(r,e.maxDate,s.maxDate)})})(t),{forwardedProps:r,internalProps:s}=((e,t)=>{const n=(0,a.A)({},e),o={},r=e=>{n.hasOwnProperty(e)&&(o[e]=n[e],delete n[e])};return _t.forEach(r),"date"===t?qt.forEach(r):"time"===t?Gt.forEach(r):"date-time"===t&&(qt.forEach(r),Gt.forEach(r),Qt.forEach(r)),{forwardedProps:n,internalProps:o}})(o,"date");return $t({inputRef:n,forwardedProps:r,internalProps:s,valueManager:Z,fieldValueManager:$,validator:Me,valueType:"date"})},tn=["ownerState"],nn=["components","componentsProps","slots","slotProps","InputProps","inputProps"],an=["inputRef"],on=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],rn=r.forwardRef((function(e,t){var n,s,i;const u=(0,l.A)({props:e,name:"MuiDateField"}),{components:c,componentsProps:d,slots:m,slotProps:h,InputProps:p,inputProps:f}=u,y=(0,o.A)(u,nn),v=u,g=null!=(n=null!=(s=null==m?void 0:m.textField)?s:null==c?void 0:c.TextField)?n:Bt.A,b=Ve({elementType:g,externalSlotProps:null!=(i=null==h?void 0:h.textField)?i:null==d?void 0:d.textField,externalForwardedProps:y,ownerState:v}),{inputRef:w}=b,D=(0,o.A)(b,an);D.inputProps=(0,a.A)({},f,D.inputProps),D.InputProps=(0,a.A)({},p,D.InputProps);const x=en({props:D,inputRef:w}),{ref:A,onPaste:M,onKeyDown:C,inputMode:S,readOnly:P,clearable:T,onClear:k}=x,V=(0,o.A)(x,on),{InputProps:O,fieldProps:I}=(e=>{let{clearable:t,fieldProps:n,InputProps:s,onClear:i,slots:l,slotProps:u,components:c,componentsProps:d}=e;var m,h,p,f,y,v;const g=te(),b=null!=(m=null!=(h=null==l?void 0:l.clearButton)?h:null==c?void 0:c.ClearButton)?m:Ie.A,w=Ve({elementType:b,externalSlotProps:null!=(p=null==u?void 0:u.clearButton)?p:null==d?void 0:d.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:g.fieldClearLabel}}),D=(0,o.A)(w,tn),x=null!=(f=null!=(y=null==l?void 0:l.clearIcon)?y:null==c?void 0:c.ClearIcon)?f:Yt,A=Ve({elementType:x,externalSlotProps:null!=(v=null==u?void 0:u.clearIcon)?v:null==d?void 0:d.clearIcon,ownerState:{}});return{InputProps:(0,a.A)({},s,{endAdornment:(0,he.jsxs)(r.Fragment,{children:[t&&(0,he.jsx)(Oe.A,{position:"end",sx:{marginRight:null!=s&&s.endAdornment?-1:-1.5},children:(0,he.jsx)(b,(0,a.A)({},D,{onClick:i,children:(0,he.jsx)(x,(0,a.A)({fontSize:"small"},A))}))}),null==s?void 0:s.endAdornment]})}),fieldProps:(0,a.A)({},n,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(n.sx)?n.sx:[n.sx]]})}})({onClear:k,clearable:T,fieldProps:V,InputProps:V.InputProps,slots:m,slotProps:h,components:c,componentsProps:d});return(0,he.jsx)(g,(0,a.A)({ref:t},I,{InputProps:(0,a.A)({},O,{readOnly:P}),inputProps:(0,a.A)({},V.inputProps,{inputMode:S,onPaste:M,onKeyDown:C,ref:A})}))})),sn=e=>{let{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:a,minDate:o,maxDate:s,disableFuture:i,disablePast:l,timezone:u}=e;const c=J();return r.useCallback((e=>null!==Me({adapter:c,value:e,props:{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:a,minDate:o,maxDate:s,disableFuture:i,disablePast:l,timezone:u}})),[c,t,n,a,o,s,i,l,u])},ln=e=>{const{value:t,referenceDate:n,defaultCalendarMonth:o,disableFuture:s,disablePast:i,disableSwitchToMonthOnDayFocus:l=!1,maxDate:u,minDate:c,onMonthChange:d,reduceAnimations:m,shouldDisableDate:h,timezone:p}=e,f=_(),y=r.useRef(((e,t,n)=>(o,r)=>{switch(r.type){case"changeMonth":return(0,a.A)({},o,{slideDirection:r.direction,currentMonth:r.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,a.A)({},o,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=o.focusedDay&&null!=r.focusedDay&&n.isSameDay(r.focusedDay,o.focusedDay))return o;const s=null!=r.focusedDay&&!t&&!n.isSameMonth(o.currentMonth,r.focusedDay);return(0,a.A)({},o,{focusedDay:r.focusedDay,isMonthSwitchingAnimating:s&&!e&&!r.withoutMonthSwitchingAnimation,currentMonth:s?n.startOfMonth(r.focusedDay):o.currentMonth,slideDirection:null!=r.focusedDay&&n.isAfterDay(r.focusedDay,o.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(m),l,f)).current,v=r.useMemo((()=>{let a=null;return n?a=n:o&&(a=f.startOfMonth(o)),Z.getInitialReferenceValue({value:t,utils:f,timezone:p,props:e,referenceDate:a,granularity:C.day})}),[]),[g,b]=r.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:v,currentMonth:f.startOfMonth(v),slideDirection:"left"}),w=r.useCallback((e=>{b((0,a.A)({type:"changeMonth"},e)),d&&d(e.newMonth)}),[d]),D=r.useCallback((e=>{const t=e;f.isSameMonth(t,g.currentMonth)||w({newMonth:f.startOfMonth(t),direction:f.isAfterDay(t,g.currentMonth)?"left":"right"})}),[g.currentMonth,w,f]),x=sn({shouldDisableDate:h,minDate:c,maxDate:u,disableFuture:s,disablePast:i,timezone:p}),A=r.useCallback((()=>{b({type:"finishMonthSwitchingAnimation"})}),[]),M=We(((e,t)=>{x(e)||b({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}));return{referenceDate:v,calendarState:g,changeMonth:D,changeFocusedDay:M,isDateDisabled:x,onMonthSwitchingAnimationEnd:A,handleChangeMonth:w}};var un=n(38166);const cn=e=>ce("MuiPickersFadeTransitionGroup",e),dn=(de("MuiPickersFadeTransitionGroup",["root"]),(0,re.Ay)(un.A,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function mn(e){const t=(0,l.A)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:a,reduceAnimations:o,transKey:r}=t,s=(e=>{const{classes:t}=e;return se({root:["root"]},cn,t)})(t),i=(0,Ht.A)();return o?n:(0,he.jsx)(dn,{className:(0,ae.A)(s.root,a),children:(0,he.jsx)(je.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:i.transitions.duration.enteringScreen,enter:i.transitions.duration.enteringScreen,exit:0},children:n},r)})}var hn=n(24184),pn=n(97497);function fn(e){return ce("MuiPickersDay",e)}const yn=de("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),vn=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],gn=e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},t.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,pn.X4)(t.palette.primary.main,t.palette.action.focusOpacity),["&.".concat(yn.selected)]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},["&.".concat(yn.selected)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},["&.".concat(yn.disabled,":not(.").concat(yn.selected,")")]:{color:(t.vars||t).palette.text.disabled},["&.".concat(yn.disabled,"&.").concat(yn.selected)]:{opacity:.6}},!n.disableMargin&&{margin:"0 ".concat(2,"px")},n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&{color:(t.vars||t).palette.text.secondary},!n.disableHighlightToday&&n.today&&{["&:not(.".concat(yn.selected,")")]:{border:"1px solid ".concat((t.vars||t).palette.text.secondary)}})},bn=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},wn=(0,re.Ay)(hn.A,{name:"MuiPickersDay",slot:"Root",overridesResolver:bn})(gn),Dn=(0,re.Ay)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:bn})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},gn({theme:t,ownerState:n}),{opacity:0,pointerEvents:"none"})})),xn=()=>{},An=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiPickersDay"}),{autoFocus:s=!1,className:i,day:u,disabled:c=!1,disableHighlightToday:d=!1,disableMargin:m=!1,isAnimating:h,onClick:p,onDaySelect:f,onFocus:y=xn,onBlur:v=xn,onKeyDown:g=xn,onMouseDown:b=xn,onMouseEnter:w=xn,outsideCurrentMonth:D,selected:x=!1,showDaysOutsideCurrentMonth:A=!1,children:M,today:C=!1}=n,S=(0,o.A)(n,vn),P=(0,a.A)({},n,{autoFocus:s,disabled:c,disableHighlightToday:d,disableMargin:m,selected:x,showDaysOutsideCurrentMonth:A,today:C}),T=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:a,today:o,disabled:r,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:i,classes:l}=e,u=s&&!i;return se({root:["root",t&&!u&&"selected",r&&"disabled",!n&&"dayWithMargin",!a&&o&&"today",s&&i&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},fn,l)})(P),k=_(),V=r.useRef(null),O=Fe(V,t);He((()=>{!s||c||h||D||V.current.focus()}),[s,c,h,D]);return D&&!A?(0,he.jsx)(Dn,{className:(0,ae.A)(T.root,T.hiddenDaySpacingFiller,i),ownerState:P,role:S.role}):(0,he.jsx)(wn,(0,a.A)({className:(0,ae.A)(T.root,i),ref:O,centerRipple:!0,disabled:c,tabIndex:x?0:-1,onKeyDown:e=>g(e,u),onFocus:e=>y(e,u),onBlur:e=>v(e,u),onMouseEnter:e=>w(e,u),onClick:e=>{c||f(u),D&&e.currentTarget.focus(),p&&p(e)},onMouseDown:e=>{b(e),D&&e.preventDefault()}},S,{ownerState:P,children:M||k.format(u,"dayOfMonth")}))})),Mn=r.memo(An);var Cn=n(77387);function Sn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Pn=n(67279),Tn=n(50385),kn=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return a=t,void((n=e).classList?n.classList.remove(a):"string"===typeof n.className?n.className=Sn(n.className,a):n.setAttribute("class",Sn(n.className&&n.className.baseVal||"",a)));var n,a}))},Vn=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;oce("MuiPickersSlideTransition",e),Fn=de("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Ln=["children","className","reduceAnimations","slideDirection","transKey","classes"],Rn=(0,re.Ay)(un.A,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[".".concat(Fn["slideEnter-left"])]:t["slideEnter-left"]},{[".".concat(Fn["slideEnter-right"])]:t["slideEnter-right"]},{[".".concat(Fn.slideEnterActive)]:t.slideEnterActive},{[".".concat(Fn.slideExit)]:t.slideExit},{[".".concat(Fn["slideExitActiveLeft-left"])]:t["slideExitActiveLeft-left"]},{[".".concat(Fn["slideExitActiveLeft-right"])]:t["slideExitActiveLeft-right"]}]})((e=>{let{theme:t}=e;const n=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},["& .".concat(Fn["slideEnter-left"])]:{willChange:"transform",transform:"translate(100%)",zIndex:1},["& .".concat(Fn["slideEnter-right"])]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},["& .".concat(Fn.slideEnterActive)]:{transform:"translate(0%)",transition:n},["& .".concat(Fn.slideExit)]:{transform:"translate(0%)"},["& .".concat(Fn["slideExitActiveLeft-left"])]:{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0},["& .".concat(Fn["slideExitActiveLeft-right"])]:{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}}}));const Nn=e=>ce("MuiDayCalendar",e),En=(de("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),jn=["ownerState"],zn=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Yn=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Bn=(0,re.Ay)(oe.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary}})),Hn=(0,re.Ay)(oe.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled}})),Wn=(0,re.Ay)(oe.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})((e=>{let{theme:t}=e;return(0,a.A)({},t.typography.caption,{width:36,height:36,padding:0,margin:"0 ".concat(2,"px"),color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})})),Un=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Kn=(0,re.Ay)((function(e){const t=(0,l.A)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:s,reduceAnimations:i,transKey:u}=t,c=(0,o.A)(t,Ln),d=(e=>{const{classes:t,slideDirection:n}=e;return se({root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:["slideEnter-".concat(n)],exitActive:["slideExitActiveLeft-".concat(n)]},In,t)})(t),m=(0,Ht.A)();if(i)return(0,he.jsx)("div",{className:(0,ae.A)(d.root,s),children:n});const h={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return(0,he.jsx)(Rn,{className:(0,ae.A)(d.root,s),childFactory:e=>r.cloneElement(e,{classNames:h}),role:"presentation",children:(0,he.jsx)(On,(0,a.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:m.transitions.duration.complex,classNames:h},c,{children:n}),u)})}),{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Zn=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),$n=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"".concat(2,"px 0"),display:"flex",justifyContent:"center"});function qn(e){var t,n,s;let{parentProps:i,day:l,focusableDay:u,selectedDays:c,isDateDisabled:d,currentMonthNumber:m,isViewFocused:h}=e,p=(0,o.A)(e,En);const{disabled:f,disableHighlightToday:y,isMonthSwitchingAnimating:v,showDaysOutsideCurrentMonth:g,components:b,componentsProps:w,slots:D,slotProps:x,timezone:A}=i,M=_(),C=ne(A),S=null!==u&&M.isSameDay(l,u),P=c.some((e=>M.isSameDay(e,l))),T=M.isSameDay(l,C),k=null!=(t=null!=(n=null==D?void 0:D.day)?n:null==b?void 0:b.Day)?t:Mn,V=Ve({elementType:k,externalSlotProps:null!=(s=null==x?void 0:x.day)?s:null==w?void 0:w.day,additionalProps:(0,a.A)({disableHighlightToday:y,showDaysOutsideCurrentMonth:g,role:"gridcell",isAnimating:v,"data-timestamp":M.toJsDate(l).valueOf()},p),ownerState:(0,a.A)({},i,{day:l,selected:P})}),O=(0,o.A)(V,jn),I=r.useMemo((()=>f||d(l)),[f,d,l]),F=r.useMemo((()=>M.getMonth(l)!==m),[M,l,m]),L=r.useMemo((()=>{const e=M.startOfMonth(M.setMonth(l,m));return g?M.isSameDay(l,M.startOfWeek(e)):M.isSameDay(l,e)}),[m,l,g,M]),R=r.useMemo((()=>{const e=M.endOfMonth(M.setMonth(l,m));return g?M.isSameDay(l,M.endOfWeek(e)):M.isSameDay(l,e)}),[m,l,g,M]);return(0,he.jsx)(k,(0,a.A)({},O,{day:l,disabled:I,autoFocus:h&&S,today:T,outsideCurrentMonth:F,isFirstVisibleCell:L,isLastVisibleCell:R,selected:P,tabIndex:S?0:-1,"aria-selected":P,"aria-current":T?"date":void 0}))}function Gn(e){const t=(0,l.A)({props:e,name:"MuiDayCalendar"}),{onFocusedDayChange:n,className:o,currentMonth:s,selectedDays:i,focusedDay:u,loading:c,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:m,readOnly:h,reduceAnimations:p,renderLoading:y=()=>(0,he.jsx)("span",{children:"..."}),slideDirection:v,TransitionProps:g,disablePast:b,disableFuture:w,minDate:D,maxDate:A,shouldDisableDate:M,shouldDisableMonth:C,shouldDisableYear:S,dayOfWeekFormatter:P,hasFocus:T,onFocusedViewChange:k,gridLabelId:V,displayWeekNumber:O,fixedWeekNumber:I,autoFocus:F,timezone:L}=t,R=ne(L),N=_(),E=(e=>{const{classes:t}=e;return se({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Nn,t)})(t),j="rtl"===(0,Ht.A)().direction,z=P||((e,t)=>N.format(t,"weekdayShort").charAt(0).toUpperCase()),Y=sn({shouldDisableDate:M,shouldDisableMonth:C,shouldDisableYear:S,minDate:D,maxDate:A,disablePast:b,disableFuture:w,timezone:L}),B=te(),[H,W]=ot({name:"DayCalendar",state:"hasFocus",controlled:T,default:null!=F&&F}),[U,K]=r.useState((()=>u||R)),Z=We((e=>{h||d(e)})),$=e=>{Y(e)||(n(e),K(e),null==k||k(!0),W(!0))},q=We(((e,t)=>{switch(e.key){case"ArrowUp":$(N.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":$(N.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const n=N.addDays(t,j?1:-1),a=N.addMonths(t,j?1:-1),o=f({utils:N,date:n,minDate:j?n:N.startOfMonth(a),maxDate:j?N.endOfMonth(a):n,isDateDisabled:Y,timezone:L});$(o||n),e.preventDefault();break}case"ArrowRight":{const n=N.addDays(t,j?-1:1),a=N.addMonths(t,j?-1:1),o=f({utils:N,date:n,minDate:j?N.startOfMonth(a):n,maxDate:j?n:N.endOfMonth(a),isDateDisabled:Y,timezone:L});$(o||n),e.preventDefault();break}case"Home":$(N.startOfWeek(t)),e.preventDefault();break;case"End":$(N.endOfWeek(t)),e.preventDefault();break;case"PageUp":$(N.addMonths(t,1)),e.preventDefault();break;case"PageDown":$(N.addMonths(t,-1)),e.preventDefault()}})),G=We(((e,t)=>$(t))),Q=We(((e,t)=>{H&&N.isSameDay(U,t)&&(null==k||k(!1))})),X=N.getMonth(s),J=r.useMemo((()=>i.filter((e=>!!e)).map((e=>N.startOfDay(e)))),[N,i]),ee=X,oe=r.useMemo((()=>r.createRef()),[ee]),re=N.startOfWeek(R),ie=r.useMemo((()=>{const e=N.startOfMonth(s),t=N.endOfMonth(s);return Y(U)||N.isAfterDay(U,t)||N.isBeforeDay(U,e)?f({utils:N,date:U,minDate:e,maxDate:t,disablePast:b,disableFuture:w,isDateDisabled:Y,timezone:L}):U}),[s,w,b,U,Y,N,L]),le=r.useMemo((()=>{const e=N.setTimezone(s,L),t=N.getWeekArray(e);let n=N.addMonths(e,1);for(;I&&t.length{t.length{var n;const a=N.format(e,"weekdayShort");return(0,he.jsx)(Bn,{variant:"caption",role:"columnheader","aria-label":N.format(N.addDays(re,t),"weekday"),className:E.weekDayLabel,children:null!=(n=null==z?void 0:z(a,e))?n:a},a+t.toString())}))]}),c?(0,he.jsx)(Un,{className:E.loadingContainer,children:y()}):(0,he.jsx)(Kn,(0,a.A)({transKey:ee,onExited:m,reduceAnimations:p,slideDirection:v,className:(0,ae.A)(o,E.slideTransition)},g,{nodeRef:oe,children:(0,he.jsx)(Zn,{ref:oe,role:"rowgroup",className:E.monthContainer,children:le.map(((e,n)=>(0,he.jsxs)($n,{role:"row",className:E.weekContainer,"aria-rowindex":n+1,children:[O&&(0,he.jsx)(Wn,{className:E.weekNumber,role:"rowheader","aria-label":B.calendarWeekNumberAriaLabelText(N.getWeekNumber(e[0])),children:B.calendarWeekNumberText(N.getWeekNumber(e[0]))}),e.map(((e,n)=>(0,he.jsx)(qn,{parentProps:t,day:e,selectedDays:J,focusableDay:ie,onKeyDown:q,onFocus:G,onBlur:Q,onDaySelect:Z,isDateDisabled:Y,currentMonthNumber:X,isViewFocused:H,"aria-colindex":n+1},e.toString())))]},"week-".concat(e[0]))))})}))]})}var Qn=n(7148);function Xn(e){return ce("MuiPickersMonth",e)}const Jn=de("MuiPickersMonth",["root","monthButton","disabled","selected"]),_n=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],ea=(0,re.Ay)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})((e=>{let{ownerState:t}=e;return{flexBasis:3===t.monthsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"}})),ta=(0,re.Ay)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{["&.".concat(Jn.disabled)]:t.disabled},{["&.".concat(Jn.selected)]:t.selected}]})((e=>{let{theme:t}=e;return(0,a.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},["&.".concat(Jn.disabled)]:{color:(t.vars||t).palette.text.secondary},["&.".concat(Jn.selected)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})})),na=r.memo((function(e){const t=(0,l.A)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,children:s,disabled:i,selected:u,value:c,tabIndex:d,onClick:m,onKeyDown:h,onFocus:p,onBlur:f,"aria-current":y,"aria-label":v}=t,g=(0,o.A)(t,_n),b=r.useRef(null),w=(e=>{const{disabled:t,selected:n,classes:a}=e;return se({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},Xn,a)})(t);return He((()=>{var e;n&&(null==(e=b.current)||e.focus())}),[n]),(0,he.jsx)(ea,(0,a.A)({className:w.root,ownerState:t},g,{children:(0,he.jsx)(ta,{ref:b,disabled:i,type:"button",role:"radio",tabIndex:i?-1:d,"aria-current":y,"aria-checked":u,"aria-label":v,onClick:e=>m(e,c),onKeyDown:e=>h(e,c),onFocus:e=>p(e,c),onBlur:e=>f(e,c),className:w.monthButton,ownerState:t,children:s})}))}));function aa(e){return ce("MuiMonthCalendar",e)}de("MuiMonthCalendar",["root"]);const oa=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"];const ra=(0,re.Ay)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Mt,boxSizing:"border-box"}),sa=r.forwardRef((function(e,t){const n=function(e,t){const n=_(),o=ee(),r=(0,l.A)({props:e,name:t});return(0,a.A)({disableFuture:!1,disablePast:!1},r,{minDate:y(n,r.minDate,o.minDate),maxDate:y(n,r.maxDate,o.maxDate)})}(e,"MuiMonthCalendar"),{className:s,value:i,defaultValue:u,referenceDate:c,disabled:d,disableFuture:m,disablePast:h,maxDate:p,minDate:f,onChange:g,shouldDisableMonth:b,readOnly:w,disableHighlightToday:D,autoFocus:x=!1,onMonthFocus:A,hasFocus:M,onFocusedViewChange:S,monthsPerRow:P=3,timezone:T,gridLabelId:k}=n,V=(0,o.A)(n,oa),{value:O,handleValueChange:I,timezone:F}=it({name:"MonthCalendar",timezone:T,value:i,defaultValue:u,onChange:g,valueManager:Z}),L=ne(F),R=(0,Qn.A)(),N=_(),E=r.useMemo((()=>Z.getInitialReferenceValue({value:O,utils:N,props:n,timezone:F,referenceDate:c,granularity:C.month})),[]),j=n,z=(e=>{const{classes:t}=e;return se({root:["root"]},aa,t)})(j),Y=r.useMemo((()=>N.getMonth(L)),[N,L]),B=r.useMemo((()=>null!=O?N.getMonth(O):D?null:N.getMonth(E)),[O,N,D,E]),[H,W]=r.useState((()=>B||Y)),[U,K]=ot({name:"MonthCalendar",state:"hasFocus",controlled:M,default:null!=x&&x}),$=We((e=>{K(e),S&&S(e)})),q=r.useCallback((e=>{const t=N.startOfMonth(h&&N.isAfter(L,f)?L:f),n=N.startOfMonth(m&&N.isBefore(L,p)?L:p),a=N.startOfMonth(e);return!!N.isBefore(a,t)||(!!N.isAfter(a,n)||!!b&&b(a))}),[m,h,p,f,L,b,N]),G=We(((e,t)=>{if(w)return;const n=N.setMonth(null!=O?O:E,t);I(n)})),Q=We((e=>{q(N.setMonth(null!=O?O:E,e))||(W(e),$(!0),A&&A(e))}));r.useEffect((()=>{W((e=>null!==B&&e!==B?B:e))}),[B]);const X=We(((e,t)=>{const n=12;switch(e.key){case"ArrowUp":Q((n+t-3)%n),e.preventDefault();break;case"ArrowDown":Q((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":Q((n+t+("ltr"===R.direction?-1:1))%n),e.preventDefault();break;case"ArrowRight":Q((n+t+("ltr"===R.direction?1:-1))%n),e.preventDefault()}})),J=We(((e,t)=>{Q(t)})),te=We(((e,t)=>{H===t&&$(!1)}));return(0,he.jsx)(ra,(0,a.A)({ref:t,className:(0,ae.A)(z.root,s),ownerState:j,role:"radiogroup","aria-labelledby":k},V,{children:v(N,null!=O?O:E).map((e=>{const t=N.getMonth(e),n=N.format(e,"monthShort"),a=N.format(e,"month"),o=t===B,r=d||q(e);return(0,he.jsx)(na,{selected:o,value:t,onClick:G,onKeyDown:X,autoFocus:U&&t===H,disabled:r,tabIndex:t===H?0:-1,onFocus:J,onBlur:te,"aria-current":Y===t?"date":void 0,"aria-label":a,monthsPerRow:P,children:n},n)}))}))}));function ia(e){return ce("MuiPickersYear",e)}const la=de("MuiPickersYear",["root","yearButton","selected","disabled"]),ua=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],ca=(0,re.Ay)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})((e=>{let{ownerState:t}=e;return{flexBasis:3===t.yearsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"}})),da=(0,re.Ay)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{["&.".concat(la.disabled)]:t.disabled},{["&.".concat(la.selected)]:t.selected}]})((e=>{let{theme:t}=e;return(0,a.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},["&.".concat(la.disabled)]:{color:(t.vars||t).palette.text.secondary},["&.".concat(la.selected)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})})),ma=r.memo((function(e){const t=(0,l.A)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:s,children:i,disabled:u,selected:c,value:d,tabIndex:m,onClick:h,onKeyDown:p,onFocus:f,onBlur:y,"aria-current":v}=t,g=(0,o.A)(t,ua),b=r.useRef(null),w=(e=>{const{disabled:t,selected:n,classes:a}=e;return se({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},ia,a)})(t);return r.useEffect((()=>{n&&b.current.focus()}),[n]),(0,he.jsx)(ca,(0,a.A)({className:(0,ae.A)(w.root,s),ownerState:t},g,{children:(0,he.jsx)(da,{ref:b,disabled:u,type:"button",role:"radio",tabIndex:u?-1:m,"aria-current":v,"aria-checked":c,onClick:e=>h(e,d),onKeyDown:e=>p(e,d),onFocus:e=>f(e,d),onBlur:e=>y(e,d),className:w.yearButton,ownerState:t,children:i})}))}));function ha(e){return ce("MuiYearCalendar",e)}de("MuiYearCalendar",["root"]);const pa=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"];const fa=(0,re.Ay)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Mt,maxHeight:280,boxSizing:"border-box",position:"relative"}),ya=r.forwardRef((function(e,t){const n=function(e,t){var n;const o=_(),r=ee(),s=(0,l.A)({props:e,name:t});return(0,a.A)({disablePast:!1,disableFuture:!1},s,{yearsPerRow:null!=(n=s.yearsPerRow)?n:3,minDate:y(o,s.minDate,r.minDate),maxDate:y(o,s.maxDate,r.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:s,className:i,value:u,defaultValue:c,referenceDate:d,disabled:m,disableFuture:h,disablePast:p,maxDate:f,minDate:v,onChange:g,readOnly:b,shouldDisableYear:w,disableHighlightToday:D,onYearFocus:x,hasFocus:A,onFocusedViewChange:M,yearsPerRow:S,timezone:P,gridLabelId:T}=n,k=(0,o.A)(n,pa),{value:V,handleValueChange:O,timezone:I}=it({name:"YearCalendar",timezone:P,value:u,defaultValue:c,onChange:g,valueManager:Z}),F=ne(I),L=(0,Qn.A)(),R=_(),N=r.useMemo((()=>Z.getInitialReferenceValue({value:V,utils:R,props:n,timezone:I,referenceDate:d,granularity:C.year})),[]),E=n,j=(e=>{const{classes:t}=e;return se({root:["root"]},ha,t)})(E),z=r.useMemo((()=>R.getYear(F)),[R,F]),Y=r.useMemo((()=>null!=V?R.getYear(V):D?null:R.getYear(N)),[V,R,D,N]),[B,H]=r.useState((()=>Y||z)),[W,U]=ot({name:"YearCalendar",state:"hasFocus",controlled:A,default:null!=s&&s}),K=We((e=>{U(e),M&&M(e)})),$=r.useCallback((e=>{if(p&&R.isBeforeYear(e,F))return!0;if(h&&R.isAfterYear(e,F))return!0;if(v&&R.isBeforeYear(e,v))return!0;if(f&&R.isAfterYear(e,f))return!0;if(!w)return!1;const t=R.startOfYear(e);return w(t)}),[h,p,f,v,F,w,R]),q=We(((e,t)=>{if(b)return;const n=R.setYear(null!=V?V:N,t);O(n)})),G=We((e=>{$(R.setYear(null!=V?V:N,e))||(H(e),K(!0),null==x||x(e))}));r.useEffect((()=>{H((e=>null!==Y&&e!==Y?Y:e))}),[Y]);const Q=We(((e,t)=>{switch(e.key){case"ArrowUp":G(t-S),e.preventDefault();break;case"ArrowDown":G(t+S),e.preventDefault();break;case"ArrowLeft":G(t+("ltr"===L.direction?-1:1)),e.preventDefault();break;case"ArrowRight":G(t+("ltr"===L.direction?1:-1)),e.preventDefault()}})),X=We(((e,t)=>{G(t)})),J=We(((e,t)=>{B===t&&K(!1)})),te=r.useRef(null),oe=Fe(t,te);return r.useEffect((()=>{if(s||null===te.current)return;const e=te.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,a=te.current.clientHeight,o=te.current.scrollTop,r=n+t;t>a||n{const t=R.getYear(e),n=t===Y,a=m||$(e);return(0,he.jsx)(ma,{selected:n,value:t,onClick:q,onKeyDown:Q,autoFocus:W&&t===B,disabled:a,tabIndex:t===B?0:-1,onFocus:X,onBlur:J,"aria-current":z===t?"date":void 0,yearsPerRow:S,children:R.format(e,"year")},R.format(e,"year"))}))}))}));function va(e){return ce("MuiPickersArrowSwitcher",e)}de("MuiPickersArrowSwitcher",["root","spacer","button"]);const ga=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],ba=["ownerState"],wa=["ownerState"],Da=(0,re.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),xa=(0,re.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((e=>{let{theme:t}=e;return{width:t.spacing(3)}})),Aa=(0,re.Ay)(Ie.A,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((e=>{let{ownerState:t}=e;return(0,a.A)({},t.hidden&&{visibility:"hidden"})})),Ma=r.forwardRef((function(e,t){var n,r,s,i;const u="rtl"===(0,Ht.A)().direction,c=(0,l.A)({props:e,name:"MuiPickersArrowSwitcher"}),{children:d,className:m,slots:h,slotProps:p,isNextDisabled:f,isNextHidden:y,onGoToNext:v,nextLabel:g,isPreviousDisabled:b,isPreviousHidden:w,onGoToPrevious:D,previousLabel:x}=c,A=(0,o.A)(c,ga),M=c,C=(e=>{const{classes:t}=e;return se({root:["root"],spacer:["spacer"],button:["button"]},va,t)})(M),S={isDisabled:f,isHidden:y,goTo:v,label:g},P={isDisabled:b,isHidden:w,goTo:D,label:x},T=null!=(n=null==h?void 0:h.previousIconButton)?n:Aa,k=Ve({elementType:T,externalSlotProps:null==p?void 0:p.previousIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"end",onClick:P.goTo},ownerState:(0,a.A)({},M,{hidden:P.isHidden}),className:C.button}),V=null!=(r=null==h?void 0:h.nextIconButton)?r:Aa,O=Ve({elementType:V,externalSlotProps:null==p?void 0:p.nextIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"start",onClick:S.goTo},ownerState:(0,a.A)({},M,{hidden:S.isHidden}),className:C.button}),I=null!=(s=null==h?void 0:h.leftArrowIcon)?s:Et,F=Ve({elementType:I,externalSlotProps:null==p?void 0:p.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),L=(0,o.A)(F,ba),R=null!=(i=null==h?void 0:h.rightArrowIcon)?i:jt,N=Ve({elementType:R,externalSlotProps:null==p?void 0:p.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),E=(0,o.A)(N,wa);return(0,he.jsxs)(Da,(0,a.A)({ref:t,className:(0,ae.A)(C.root,m),ownerState:M},A,{children:[(0,he.jsx)(T,(0,a.A)({},k,{children:u?(0,he.jsx)(R,(0,a.A)({},E)):(0,he.jsx)(I,(0,a.A)({},L))})),d?(0,he.jsx)(oe.A,{variant:"subtitle1",component:"span",children:d}):(0,he.jsx)(xa,{className:C.spacer,ownerState:M}),(0,he.jsx)(V,(0,a.A)({},O,{children:u?(0,he.jsx)(I,(0,a.A)({},L)):(0,he.jsx)(R,(0,a.A)({},E))}))]}))}));const Ca=e=>ce("MuiPickersCalendarHeader",e),Sa=de("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Pa=["slots","slotProps","components","componentsProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],Ta=["ownerState"],ka=(0,re.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),Va=(0,re.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return(0,a.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})})),Oa=(0,re.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Ia=(0,re.Ay)(Ie.A,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})((e=>{let{ownerState:t}=e;return(0,a.A)({marginRight:"auto"},"year"===t.view&&{[".".concat(Sa.switchViewIcon)]:{transform:"rotate(180deg)"}})})),Fa=(0,re.Ay)(Nt,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((e=>{let{theme:t}=e;return{willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"}})),La=r.forwardRef((function(e,t){var n,s,i,u;const c=te(),d=_(),m=(0,l.A)({props:e,name:"MuiPickersCalendarHeader"}),{slots:h,slotProps:p,components:f,currentMonth:y,disabled:v,disableFuture:g,disablePast:b,maxDate:w,minDate:D,onMonthChange:x,onViewChange:A,view:M,reduceAnimations:C,views:S,labelId:P,className:T,timezone:k}=m,V=(0,o.A)(m,Pa),O=m,I=(e=>{const{classes:t}=e;return se({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Ca,t)})(m),F=null!=(n=null!=(s=null==h?void 0:h.switchViewButton)?s:null==f?void 0:f.SwitchViewButton)?n:Ia,L=Ve({elementType:F,externalSlotProps:null==p?void 0:p.switchViewButton,additionalProps:{size:"small","aria-label":c.calendarViewSwitchingButtonAriaLabel(M)},ownerState:O,className:I.switchViewButton}),R=null!=(i=null!=(u=null==h?void 0:h.switchViewIcon)?u:null==f?void 0:f.SwitchViewIcon)?i:Fa,N=Ve({elementType:R,externalSlotProps:null==p?void 0:p.switchViewIcon,ownerState:void 0,className:I.switchViewIcon}),E=(0,o.A)(N,Ta),j=function(e,t){let{disableFuture:n,maxDate:a,timezone:o}=t;const s=_();return r.useMemo((()=>{const t=s.dateWithTimezone(void 0,o),r=s.startOfMonth(n&&s.isBefore(t,a)?t:a);return!s.isAfter(r,e)}),[n,a,e,s,o])}(y,{disableFuture:g,maxDate:w,timezone:k}),z=function(e,t){let{disablePast:n,minDate:a,timezone:o}=t;const s=_();return r.useMemo((()=>{const t=s.dateWithTimezone(void 0,o),r=s.startOfMonth(n&&s.isAfter(t,a)?t:a);return!s.isBefore(r,e)}),[n,a,e,s,o])}(y,{disablePast:b,minDate:D,timezone:k});return 1===S.length&&"year"===S[0]?null:(0,he.jsxs)(ka,(0,a.A)({},V,{ownerState:O,className:(0,ae.A)(T,I.root),ref:t,children:[(0,he.jsxs)(Va,{role:"presentation",onClick:()=>{if(1!==S.length&&A&&!v)if(2===S.length)A(S.find((e=>e!==M))||S[0]);else{const e=0!==S.indexOf(M)?0:1;A(S[e])}},ownerState:O,"aria-live":"polite",className:I.labelContainer,children:[(0,he.jsx)(mn,{reduceAnimations:C,transKey:d.format(y,"monthAndYear"),children:(0,he.jsx)(Oa,{id:P,ownerState:O,className:I.label,children:d.format(y,"monthAndYear")})}),S.length>1&&!v&&(0,he.jsx)(F,(0,a.A)({},L,{children:(0,he.jsx)(R,(0,a.A)({},E))}))]}),(0,he.jsx)(je.A,{in:"day"===M,children:(0,he.jsx)(Ma,{slots:h,slotProps:p,onGoToPrevious:()=>x(d.addMonths(y,-1),"right"),isPreviousDisabled:z,previousLabel:c.previousMonth,onGoToNext:()=>x(d.addMonths(y,1),"left"),isNextDisabled:j,nextLabel:c.nextMonth})})]}))})),Ra=(0,re.Ay)("div")({overflow:"hidden",width:Mt,maxHeight:334,display:"flex",flexDirection:"column",margin:"0 auto"}),Na=e=>ce("MuiDateCalendar",e),Ea=(de("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"]);const ja=(0,re.Ay)(Ra,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:334}),za=(0,re.Ay)(mn,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Ya=r.forwardRef((function(e,t){var n,s,i;const u=_(),c=Ne(),d=function(e,t){var n,o,r,s,i,u,c;const d=_(),m=ee(),h=Je(),p=(0,l.A)({props:e,name:t});return(0,a.A)({},p,{loading:null!=(n=p.loading)&&n,disablePast:null!=(o=p.disablePast)&&o,disableFuture:null!=(r=p.disableFuture)&&r,openTo:null!=(s=p.openTo)?s:"day",views:null!=(i=p.views)?i:["year","day"],reduceAnimations:null!=(u=p.reduceAnimations)?u:h,renderLoading:null!=(c=p.renderLoading)?c:()=>(0,he.jsx)("span",{children:"..."}),minDate:y(d,p.minDate,m.minDate),maxDate:y(d,p.maxDate,m.maxDate)})}(e,"MuiDateCalendar"),{autoFocus:m,onViewChange:h,value:v,defaultValue:g,referenceDate:b,disableFuture:w,disablePast:D,defaultCalendarMonth:x,onChange:A,onYearChange:M,onMonthChange:C,reduceAnimations:S,shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:k,view:V,views:O,openTo:I,className:F,disabled:L,readOnly:R,minDate:N,maxDate:E,disableHighlightToday:j,focusedView:z,onFocusedViewChange:Y,showDaysOutsideCurrentMonth:B,fixedWeekNumber:H,dayOfWeekFormatter:W,components:U,componentsProps:K,slots:$,slotProps:q,loading:G,renderLoading:Q,displayWeekNumber:X,yearsPerRow:J,monthsPerRow:te,timezone:ne}=d,oe=(0,o.A)(d,Ea),{value:re,handleValueChange:ie,timezone:le}=it({name:"DateCalendar",timezone:ne,value:v,defaultValue:g,onChange:A,valueManager:Z}),{view:ue,setView:ce,focusedView:de,setFocusedView:me,goToNextView:pe,setValueAndGoToNextView:fe}=ut({view:V,views:O,openTo:I,onChange:ie,onViewChange:h,autoFocus:m,focusedView:z,onFocusedViewChange:Y}),{referenceDate:ye,calendarState:ve,changeFocusedDay:ge,changeMonth:be,handleChangeMonth:we,isDateDisabled:De,onMonthSwitchingAnimationEnd:xe}=ln({value:re,defaultCalendarMonth:x,referenceDate:b,reduceAnimations:S,onMonthChange:C,minDate:N,maxDate:E,shouldDisableDate:P,disablePast:D,disableFuture:w,timezone:le}),Ae=L&&re||N,Me=L&&re||E,Ce="".concat(c,"-grid-label"),Se=null!==de,Pe=null!=(n=null!=(s=null==$?void 0:$.calendarHeader)?s:null==U?void 0:U.CalendarHeader)?n:La,Te=Ve({elementType:Pe,externalSlotProps:null!=(i=null==q?void 0:q.calendarHeader)?i:null==K?void 0:K.calendarHeader,additionalProps:{views:O,view:ue,currentMonth:ve.currentMonth,onViewChange:ce,onMonthChange:(e,t)=>we({newMonth:e,direction:t}),minDate:Ae,maxDate:Me,disabled:L,disablePast:D,disableFuture:w,reduceAnimations:S,timezone:le,labelId:Ce,slots:$,slotProps:q},ownerState:d}),ke=We((e=>{const t=u.startOfMonth(e),n=u.endOfMonth(e),a=De(e)?f({utils:u,date:e,minDate:u.isBefore(N,t)?t:N,maxDate:u.isAfter(E,n)?n:E,disablePast:D,disableFuture:w,isDateDisabled:De,timezone:le}):e;a?(fe(a,"finish"),null==C||C(t)):(pe(),be(t)),ge(a,!0)})),Oe=We((e=>{const t=u.startOfYear(e),n=u.endOfYear(e),a=De(e)?f({utils:u,date:e,minDate:u.isBefore(N,t)?t:N,maxDate:u.isAfter(E,n)?n:E,disablePast:D,disableFuture:w,isDateDisabled:De,timezone:le}):e;a?(fe(a,"finish"),null==M||M(a)):(pe(),be(t)),ge(a,!0)})),Ie=We((e=>ie(e?p(u,e,null!=re?re:ye):e,"finish",ue)));r.useEffect((()=>{null!=re&&u.isValid(re)&&be(re)}),[re]);const Fe=d,Le=(e=>{const{classes:t}=e;return se({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Na,t)})(Fe),Re={disablePast:D,disableFuture:w,maxDate:E,minDate:N},Ee={disableHighlightToday:j,readOnly:R,disabled:L,timezone:le,gridLabelId:Ce},je=r.useRef(ue);r.useEffect((()=>{je.current!==ue&&(de===je.current&&me(ue,!0),je.current=ue)}),[de,me,ue]);const ze=r.useMemo((()=>[re]),[re]);return(0,he.jsxs)(ja,(0,a.A)({ref:t,className:(0,ae.A)(Le.root,F),ownerState:Fe},oe,{children:[(0,he.jsx)(Pe,(0,a.A)({},Te)),(0,he.jsx)(za,{reduceAnimations:S,className:Le.viewTransitionContainer,transKey:ue,ownerState:Fe,children:(0,he.jsxs)("div",{children:["year"===ue&&(0,he.jsx)(ya,(0,a.A)({},Re,Ee,{value:re,onChange:Oe,shouldDisableYear:k,hasFocus:Se,onFocusedViewChange:e=>me("year",e),yearsPerRow:J,referenceDate:ye})),"month"===ue&&(0,he.jsx)(sa,(0,a.A)({},Re,Ee,{hasFocus:Se,className:F,value:re,onChange:ke,shouldDisableMonth:T,onFocusedViewChange:e=>me("month",e),monthsPerRow:te,referenceDate:ye})),"day"===ue&&(0,he.jsx)(Gn,(0,a.A)({},ve,Re,Ee,{onMonthSwitchingAnimationEnd:xe,onFocusedDayChange:ge,reduceAnimations:S,selectedDays:ze,onSelectedDaysChange:Ie,shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:k,hasFocus:Se,onFocusedViewChange:e=>me("day",e),showDaysOutsideCurrentMonth:B,fixedWeekNumber:H,dayOfWeekFormatter:W,displayWeekNumber:X,components:U,componentsProps:K,slots:$,slotProps:q,loading:G,renderLoading:Q}))]})})]}))})),Ba=e=>{let{view:t,onViewChange:n,views:a,focusedView:o,onFocusedViewChange:r,value:s,defaultValue:i,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:m,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:g,reduceAnimations:b,onMonthChange:D,monthsPerRow:x,onYearChange:A,yearsPerRow:M,defaultCalendarMonth:C,components:S,componentsProps:P,slots:T,slotProps:k,loading:V,renderLoading:O,disableHighlightToday:I,readOnly:F,disabled:L,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:N,sx:E,autoFocus:j,fixedWeekNumber:z,displayWeekNumber:Y,timezone:B}=e;return(0,he.jsx)(Ya,{view:t,onViewChange:n,views:a.filter(w),focusedView:o&&w(o)?o:null,onFocusedViewChange:r,value:s,defaultValue:i,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:m,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:g,reduceAnimations:b,onMonthChange:D,monthsPerRow:x,onYearChange:A,yearsPerRow:M,defaultCalendarMonth:C,components:S,componentsProps:P,slots:T,slotProps:k,loading:V,renderLoading:O,disableHighlightToday:I,readOnly:F,disabled:L,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:N,sx:E,autoFocus:j,fixedWeekNumber:z,displayWeekNumber:Y,timezone:B})},Ha=r.forwardRef((function(e,t){var n,s,i,l;const u=te(),c=_(),m=Ae(e,"MuiDesktopDatePicker"),h=(0,a.A)({day:Ba,month:Ba,year:Ba},m.viewRenderers),p=(0,a.A)({},m,{viewRenderers:h,format:D(c,m,!1),yearsPerRow:null!=(n=m.yearsPerRow)?n:4,slots:(0,a.A)({openPickerIcon:zt,field:rn},m.slots),slotProps:(0,a.A)({},m.slotProps,{field:e=>{var n;return(0,a.A)({},d(null==(n=m.slotProps)?void 0:n.field,e),Jt(m),{ref:t})},toolbar:(0,a.A)({hidden:!0},null==(s=m.slotProps)?void 0:s.toolbar)})}),{renderPicker:f}=(e=>{var t,n,s,i,l;let{props:u,getOpenDialogAriaText:c}=e,d=(0,o.A)(e,It);const{slots:m,slotProps:h,className:p,sx:f,format:y,formatDensity:v,timezone:g,name:b,label:w,inputRef:D,readOnly:x,disabled:A,autoFocus:M,localeText:C,reduceAnimations:S}=u,P=_(),T=r.useRef(null),k=r.useRef(null),V=Ne(),O=null!=(t=null==h||null==(n=h.toolbar)?void 0:n.hidden)&&t,{open:I,actions:F,hasUIView:L,layoutProps:R,renderCurrentView:N,shouldRestoreFocus:E,fieldProps:j}=pt((0,a.A)({},d,{props:u,inputRef:T,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),z=null!=(s=m.inputAdornment)?s:Oe.A,Y=Ve({elementType:z,externalSlotProps:null==h?void 0:h.inputAdornment,additionalProps:{position:"end"},ownerState:u}),B=(0,o.A)(Y,Ft),H=null!=(i=m.openPickerButton)?i:Ie.A,W=Ve({elementType:H,externalSlotProps:null==h?void 0:h.openPickerButton,additionalProps:{disabled:A||x,onClick:I?F.onClose:F.onOpen,"aria-label":c(j.value,P),edge:B.position},ownerState:u}),U=(0,o.A)(W,Lt),K=m.openPickerIcon,Z=m.field,$=Ve({elementType:Z,externalSlotProps:null==h?void 0:h.field,additionalProps:(0,a.A)({},j,O&&{id:V},{readOnly:x,disabled:A,className:p,sx:f,format:y,formatDensity:v,timezone:g,label:w,name:b,autoFocus:M&&!u.open,focused:!!I||void 0}),ownerState:u});L&&($.InputProps=(0,a.A)({},$.InputProps,{ref:k},!u.disableOpenPicker&&{["".concat(B.position,"Adornment")]:(0,he.jsx)(z,(0,a.A)({},B,{children:(0,he.jsx)(H,(0,a.A)({},U,{children:(0,he.jsx)(K,(0,a.A)({},null==h?void 0:h.openPickerIcon))}))}))}));const G=(0,a.A)({textField:m.textField,clearIcon:m.clearIcon,clearButton:m.clearButton},$.slots),Q=null!=(l=m.layout)?l:Ot,X=Fe(T,$.inputRef,D);let J=V;O&&(J=w?"".concat(V,"-label"):void 0);const ee=(0,a.A)({},h,{toolbar:(0,a.A)({},null==h?void 0:h.toolbar,{titleId:V}),popper:(0,a.A)({"aria-labelledby":J},null==h?void 0:h.popper)});return{renderPicker:()=>(0,he.jsxs)(q.$,{localeText:C,children:[(0,he.jsx)(Z,(0,a.A)({},$,{slots:G,slotProps:ee,inputRef:X})),(0,he.jsx)(at,(0,a.A)({role:"dialog",placement:"bottom-start",anchorEl:k.current},F,{open:I,slots:m,slotProps:ee,shouldRestoreFocus:E,reduceAnimations:S,children:(0,he.jsx)(Q,(0,a.A)({},R,null==ee?void 0:ee.layout,{slots:m,slotProps:ee,children:N()}))}))]})}})({props:p,valueManager:Z,valueType:"date",getOpenDialogAriaText:null!=(i=null==(l=p.localeText)?void 0:l.openDatePickerDialogue)?i:u.openDatePickerDialogue,validator:Me});return f()}));Ha.propTypes={autoFocus:c().bool,className:c().string,closeOnSelect:c().bool,components:c().object,componentsProps:c().object,dayOfWeekFormatter:c().func,defaultCalendarMonth:c().any,defaultValue:c().any,disabled:c().bool,disableFuture:c().bool,disableHighlightToday:c().bool,disableOpenPicker:c().bool,disablePast:c().bool,displayWeekNumber:c().bool,fixedWeekNumber:c().number,format:c().string,formatDensity:c().oneOf(["dense","spacious"]),inputRef:m,label:c().node,loading:c().bool,localeText:c().object,maxDate:c().any,minDate:c().any,monthsPerRow:c().oneOf([3,4]),name:c().string,onAccept:c().func,onChange:c().func,onClose:c().func,onError:c().func,onMonthChange:c().func,onOpen:c().func,onSelectedSectionsChange:c().func,onViewChange:c().func,onYearChange:c().func,open:c().bool,openTo:c().oneOf(["day","month","year"]),orientation:c().oneOf(["landscape","portrait"]),readOnly:c().bool,reduceAnimations:c().bool,referenceDate:c().any,renderLoading:c().func,selectedSections:c().oneOfType([c().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),c().number,c().shape({endIndex:c().number.isRequired,startIndex:c().number.isRequired})]),shouldDisableDate:c().func,shouldDisableMonth:c().func,shouldDisableYear:c().func,showDaysOutsideCurrentMonth:c().bool,slotProps:c().object,slots:c().object,sx:c().oneOfType([c().arrayOf(c().oneOfType([c().func,c().object,c().bool])),c().func,c().object]),timezone:c().string,value:c().any,view:c().oneOf(["day","month","year"]),viewRenderers:c().shape({day:c().func,month:c().func,year:c().func}),views:c().arrayOf(c().oneOf(["day","month","year"]).isRequired),yearsPerRow:c().oneOf([3,4])};var Wa=n(28170),Ua=n(96583),Ka=n(21427);const Za=(0,re.Ay)(Ua.A)({["& .".concat(Ka.A.container)]:{outline:0},["& .".concat(Ka.A.paper)]:{outline:0,minWidth:Mt}}),$a=(0,re.Ay)(Wa.A)({"&:first-of-type":{padding:0}});function qa(e){var t,n;const{children:o,onDismiss:r,open:s,slots:i,slotProps:l}=e,u=null!=(t=null==i?void 0:i.dialog)?t:Za,c=null!=(n=null==i?void 0:i.mobileTransition)?n:je.A;return(0,he.jsx)(u,(0,a.A)({open:s,onClose:r},null==l?void 0:l.dialog,{TransitionComponent:c,TransitionProps:null==l?void 0:l.mobileTransition,PaperComponent:null==i?void 0:i.mobilePaper,PaperProps:null==l?void 0:l.mobilePaper,children:(0,he.jsx)($a,{children:o})}))}const Ga=["props","getOpenDialogAriaText"],Qa=r.forwardRef((function(e,t){var n,s,i;const l=te(),u=_(),c=Ae(e,"MuiMobileDatePicker"),m=(0,a.A)({day:Ba,month:Ba,year:Ba},c.viewRenderers),h=(0,a.A)({},c,{viewRenderers:m,format:D(u,c,!1),slots:(0,a.A)({field:rn},c.slots),slotProps:(0,a.A)({},c.slotProps,{field:e=>{var n;return(0,a.A)({},d(null==(n=c.slotProps)?void 0:n.field,e),Jt(c),{ref:t})},toolbar:(0,a.A)({hidden:!1},null==(n=c.slotProps)?void 0:n.toolbar)})}),{renderPicker:p}=(e=>{var t,n,s;let{props:i,getOpenDialogAriaText:l}=e,u=(0,o.A)(e,Ga);const{slots:c,slotProps:d,className:m,sx:h,format:p,formatDensity:f,timezone:y,name:v,label:g,inputRef:b,readOnly:w,disabled:D,localeText:x}=i,A=_(),M=r.useRef(null),C=Ne(),S=null!=(t=null==d||null==(n=d.toolbar)?void 0:n.hidden)&&t,{open:P,actions:T,layoutProps:k,renderCurrentView:V,fieldProps:O}=pt((0,a.A)({},u,{props:i,inputRef:M,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),I=c.field,F=Ve({elementType:I,externalSlotProps:null==d?void 0:d.field,additionalProps:(0,a.A)({},O,S&&{id:C},!(D||w)&&{onClick:T.onOpen,onKeyDown:(L=T.onOpen,e=>{"Enter"!==e.key&&" "!==e.key||(L(e),e.preventDefault(),e.stopPropagation()),R&&R(e)})},{readOnly:null==w||w,disabled:D,className:m,sx:h,format:p,formatDensity:f,timezone:y,label:g,name:v}),ownerState:i});var L,R;F.inputProps=(0,a.A)({},F.inputProps,{"aria-label":l(O.value,A)});const N=(0,a.A)({textField:c.textField},F.slots),E=null!=(s=c.layout)?s:Ot,j=Fe(M,F.inputRef,b);let z=C;S&&(z=g?"".concat(C,"-label"):void 0);const Y=(0,a.A)({},d,{toolbar:(0,a.A)({},null==d?void 0:d.toolbar,{titleId:C}),mobilePaper:(0,a.A)({"aria-labelledby":z},null==d?void 0:d.mobilePaper)});return{renderPicker:()=>(0,he.jsxs)(q.$,{localeText:x,children:[(0,he.jsx)(I,(0,a.A)({},F,{slots:N,slotProps:Y,inputRef:j})),(0,he.jsx)(qa,(0,a.A)({},T,{open:P,slots:c,slotProps:Y,children:(0,he.jsx)(E,(0,a.A)({},k,null==Y?void 0:Y.layout,{slots:c,slotProps:Y,children:V()}))}))]})}})({props:h,valueManager:Z,valueType:"date",getOpenDialogAriaText:null!=(s=null==(i=h.localeText)?void 0:i.openDatePickerDialogue)?s:l.openDatePickerDialogue,validator:Me});return p()}));Qa.propTypes={autoFocus:c().bool,className:c().string,closeOnSelect:c().bool,components:c().object,componentsProps:c().object,dayOfWeekFormatter:c().func,defaultCalendarMonth:c().any,defaultValue:c().any,disabled:c().bool,disableFuture:c().bool,disableHighlightToday:c().bool,disableOpenPicker:c().bool,disablePast:c().bool,displayWeekNumber:c().bool,fixedWeekNumber:c().number,format:c().string,formatDensity:c().oneOf(["dense","spacious"]),inputRef:m,label:c().node,loading:c().bool,localeText:c().object,maxDate:c().any,minDate:c().any,monthsPerRow:c().oneOf([3,4]),name:c().string,onAccept:c().func,onChange:c().func,onClose:c().func,onError:c().func,onMonthChange:c().func,onOpen:c().func,onSelectedSectionsChange:c().func,onViewChange:c().func,onYearChange:c().func,open:c().bool,openTo:c().oneOf(["day","month","year"]),orientation:c().oneOf(["landscape","portrait"]),readOnly:c().bool,reduceAnimations:c().bool,referenceDate:c().any,renderLoading:c().func,selectedSections:c().oneOfType([c().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),c().number,c().shape({endIndex:c().number.isRequired,startIndex:c().number.isRequired})]),shouldDisableDate:c().func,shouldDisableMonth:c().func,shouldDisableYear:c().func,showDaysOutsideCurrentMonth:c().bool,slotProps:c().object,slots:c().object,sx:c().oneOfType([c().arrayOf(c().oneOfType([c().func,c().object,c().bool])),c().func,c().object]),timezone:c().string,value:c().any,view:c().oneOf(["day","month","year"]),viewRenderers:c().shape({day:c().func,month:c().func,year:c().func}),views:c().arrayOf(c().oneOf(["day","month","year"]).isRequired),yearsPerRow:c().oneOf([3,4])};const Xa=["desktopModeMediaQuery"],Ja=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=$e}=n,s=(0,o.A)(n,Xa);return(0,i.A)(r,{defaultMatches:!0})?(0,he.jsx)(Ha,(0,a.A)({ref:t},s)):(0,he.jsx)(Qa,(0,a.A)({ref:t},s))}))},43540:function(e){e.exports=function(){"use strict";var e="week",t="year";return function(n,a,o){var r=a.prototype;r.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var a=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var r=o(this).startOf(t).add(1,t).date(a),s=o(this).endOf(e);if(r.isBefore(s))return 1}var i=o(this).startOf(t).date(a).startOf(e).subtract(1,"millisecond"),l=this.diff(i,e,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},r.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},46081:(e,t,n)=>{"use strict";n.d(t,{f:()=>a});const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warning",n=!1;const a=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(a):console.warn(a))}}},46639:(e,t,n)=>{"use strict";n.d(t,{A:()=>I});var a=n(57528),o=n(98587),r=n(58168),s=n(9950),i=n(72004),l=n(3484),u=n(88283),c=n(89548),d=n(18463),m=n(59254),h=n(45558),p=n(1614);function f(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,h.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var y,v,g,b,w=n(44414);const D=["className","color","disableShrink","size","style","thickness","value","variant"];let x,A,M,C;const S=44,P=(0,u.i7)(x||(x=y||(y=(0,a.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),T=(0,u.i7)(A||(A=v||(v=(0,a.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),k=(0,m.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,c.A)(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,u.AH)(M||(M=g||(g=(0,a.A)(["\n animation: "," 1.4s linear infinite;\n "]))),P)})),V=(0,m.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),O=(0,m.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,c.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,u.AH)(C||(C=b||(b=(0,a.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),T)})),I=s.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiCircularProgress"}),{className:a,color:s="primary",disableShrink:u=!1,size:m=40,style:h,thickness:p=3.6,value:y=0,variant:v="indeterminate"}=n,g=(0,o.A)(n,D),b=(0,r.A)({},n,{color:s,disableShrink:u,size:m,thickness:p,value:y,variant:v}),x=(e=>{const{classes:t,variant:n,color:a,disableShrink:o}=e,r={root:["root",n,"color".concat((0,c.A)(a))],svg:["svg"],circle:["circle","circle".concat((0,c.A)(n)),o&&"circleDisableShrink"]};return(0,l.A)(r,f,t)})(b),A={},M={},C={};if("determinate"===v){const e=2*Math.PI*((S-p)/2);A.strokeDasharray=e.toFixed(3),C["aria-valuenow"]=Math.round(y),A.strokeDashoffset="".concat(((100-y)/100*e).toFixed(3),"px"),M.transform="rotate(-90deg)"}return(0,w.jsx)(k,(0,r.A)({className:(0,i.A)(x.root,a),style:(0,r.A)({width:m,height:m},M,h),ownerState:b,ref:t,role:"progressbar"},C,g,{children:(0,w.jsx)(V,{className:x.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(S," ").concat(S),children:(0,w.jsx)(O,{className:x.circle,style:A,ownerState:b,cx:S,cy:S,r:(S-p)/2,fill:"none",strokeWidth:p})})}))}))},48283:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(62161),o=n(60195),r=n(67550);function s(e){let{props:t,name:n}=e;return(0,a.A)({props:t,name:n,defaultTheme:o.A,themeId:r.A})}},77588:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,a){var o=n.prototype,r=o.format;a.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,a=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,a,o){var r=o&&o.toUpperCase();return a||n[o]||e[o]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return r.call(this,a)}}}()},81831:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,F:()=>u});var a=n(58168),o=n(98587),r=n(9950),s=n(48283),i=n(44414);const l=["localeText"],u=r.createContext(null);const c=function(e){var t;const{localeText:n}=e,c=(0,o.A)(e,l),{utils:d,localeText:m}=null!=(t=r.useContext(u))?t:{utils:void 0,localeText:void 0},h=(0,s.A)({props:c,name:"MuiLocalizationProvider"}),{children:p,dateAdapter:f,dateFormats:y,dateLibInstance:v,adapterLocale:g,localeText:b}=h,w=r.useMemo((()=>(0,a.A)({},b,m,n)),[b,m,n]),D=r.useMemo((()=>{if(!f)return d||null;const e=new f({locale:g,formats:y,instance:v});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[f,g,y,v,d]),x=r.useMemo((()=>D?{minDate:D.date("1900-01-01T00:00:00.000"),maxDate:D.date("2099-12-31T00:00:00.000")}:null),[D]),A=r.useMemo((()=>({utils:D,defaultDates:x,localeText:w})),[x,D,w]);return(0,i.jsx)(u.Provider,{value:A,children:p})}},87542:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isBetween=function(e,t,a,o){var r=n(e),s=n(t),i="("===(o=o||"()")[0],l=")"===o[1];return(i?this.isAfter(r,a):!this.isBefore(r,a))&&(l?this.isBefore(s,a):!this.isAfter(s,a))||(i?this.isBefore(r,a):!this.isAfter(r,a))&&(l?this.isAfter(s,a):!this.isBefore(s,a))}}}()},90923:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,a=/\d\d/,o=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,s={},i=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,a=s.meridiem;if(a){for(var o=1;o<=24;o+=1)if(e.indexOf(a(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},m={A:[r,function(e){this.afternoon=d(e,!1)}],a:[r,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[a,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,l("seconds")],ss:[o,l("seconds")],m:[o,l("minutes")],mm:[o,l("minutes")],H:[o,l("hours")],h:[o,l("hours")],HH:[o,l("hours")],hh:[o,l("hours")],D:[o,l("day")],DD:[a,l("day")],Do:[r,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var a=1;a<=31;a+=1)t(a).replace(/\[|\]/g,"")===e&&(this.day=a)}],w:[o,l("week")],ww:[a,l("week")],M:[o,l("month")],MM:[a,l("month")],MMM:[r,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[a,function(e){this.year=i(e)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function h(n){var a,o;a=n,o=s&&s.formats;for(var r=(n=a.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,a){var r=a&&a.toUpperCase();return n||o[a]||e[a]||o[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),i=r.length,l=0;l-1)return new Date(("X"===t?1e3:1)*e);var o=h(t)(e),r=o.year,s=o.month,i=o.day,l=o.hours,u=o.minutes,c=o.seconds,d=o.milliseconds,m=o.zone,p=o.week,f=new Date,y=i||(r||s?1:f.getDate()),v=r||f.getFullYear(),g=0;r&&!s||(g=s>0?s-1:f.getMonth());var b,w=l||0,D=u||0,x=c||0,A=d||0;return m?new Date(Date.UTC(v,g,y,w,D,x,A+60*m.offset*1e3)):n?new Date(Date.UTC(v,g,y,w,D,x,A)):(b=new Date(v,g,y,w,D,x,A),p&&(b=a(b).week(p).toDate()),b)}catch(e){return new Date("")}}(t,i,a,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),c&&t!=this.format(i)&&(this.$d=new Date("")),s={}}else if(i instanceof Array)for(var m=i.length,p=1;p<=m;p+=1){r[1]=i[p-1];var f=n.apply(this,r);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}p===m&&(this.$d=new Date(""))}else o.call(this,e)}}}()},95359:(e,t,n)=>{"use strict";n.d(t,{R:()=>w});var a=n(58168),o=n(4159),r=n.n(o),s=n(43540),i=n.n(s),l=n(90923),u=n.n(l),c=n(77588),d=n.n(c),m=n(87542),h=n.n(m),p=n(46081);r().extend(u()),r().extend(d()),r().extend(h());const f=(0,p.f)(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),y={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},v={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},g=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),b=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class w{constructor(){let{locale:e,formats:t,instance:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var o,s,l;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=y,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>"undefined"!==typeof r().utc,this.hasTimezonePlugin=()=>"undefined"!==typeof r().tz,this.isSame=(e,t,n)=>{const a=this.setTimezone(t,this.getTimezone(e));return e.format(n)===a.format(n)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return r().tz.guess();default:return e}},this.createSystemDate=e=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(e);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=r().tz.guess();return"UTC"!==t?r().tz(e,t):r()(e)}return r()(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(g);return r().utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(g);if(!this.hasTimezonePlugin())throw new Error(b);const n=void 0!==e&&!e.endsWith("Z");return r()(e).tz(this.cleanTimezone(t),n)},this.getLocaleFormats=()=>{const e=r().Ls;let t=e[this.locale||"en"];return void 0===t&&(f(),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){var n,a;const o=e.tz(this.cleanTimezone(t),!0);if((null!=(n=o.$offset)?n:0)===(null!=(a=e.$offset)?a:0))return e;e.$offset=o.$offset}return e},this.date=e=>null===e?null:this.dayjs(e),this.dateWithTimezone=(e,t)=>{if(null===e)return null;let n;return n="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?n:n.locale(this.locale)},this.getTimezone=e=>{if(this.hasTimezonePlugin()){var t;const n=null==(t=e.$x)?void 0:t.$timezone;if(n)return n}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(g);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(b)}return r().tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.dayjs(e),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,((e,n,a)=>{const o=a&&a.toUpperCase();return n||t[a]||t[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,((e,t,n)=>t||n.slice(1)))}))},this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.dayjs(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.getDiff=(e,t,n)=>e.diff(t,n),this.isEqual=(e,t)=>null===e&&null===t||this.dayjs(e).toDate().getTime()===this.dayjs(t).toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>ethis.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc(){let[n,a]=t;return e>=n&&e<=a},this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(e.startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(e.endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>this.addMonths(e,1),this.getPreviousMonth=e=>this.addMonths(e,-1),this.getMonthArray=e=>{const t=[e.startOf("year")];for(;t.length<12;){const e=t[t.length-1];t.push(this.addMonths(e,1))}return t},this.mergeDateAndTime=(e,t)=>e.hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>{const e=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map((t=>this.formatByString(this.addDays(e,t),"dd")))},this.getWeekArray=e=>{const t=this.setLocaleToValue(e),n=t.startOf("month").startOf("week"),a=t.endOf("month").endOf("week");let o=0,r=n;const s=[];for(;re.week(),this.getYearRange=(e,t)=>{const n=e.startOf("year"),a=t.endOf("year"),o=[];let r=n;for(;r"am"===e?"AM":"PM",this.rawDayJsInstance=n,this.dayjs=(s=null!=(o=this.rawDayJsInstance)?o:r(),(l=e)?function(){return s(...arguments).locale(l)}:s),this.locale=e,this.formats=(0,a.A)({},v,t),r().extend(i())}}}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3121],{30633:(e,t,n)=>{"use strict";n.d(t,{l:()=>Ja});var a=n(58168),o=n(98587),r=n(9950),s=n.t(r,2),i=n(47223),l=n(48283),u=n(11942),c=n.n(u);function d(e,t,n){return"function"===typeof e?e(t,n):e}const m=c().oneOfType([c().func,c().object]),h=(e,t)=>e.length===t.length&&t.every((t=>e.includes(t))),p=(e,t,n)=>{let a=t;return a=e.setHours(a,e.getHours(n)),a=e.setMinutes(a,e.getMinutes(n)),a=e.setSeconds(a,e.getSeconds(n)),a},f=e=>{let{date:t,disableFuture:n,disablePast:a,maxDate:o,minDate:r,isDateDisabled:s,utils:i,timezone:l}=e;const u=p(i,i.dateWithTimezone(void 0,l),t);a&&i.isBefore(r,u)&&(r=u),n&&i.isAfter(o,u)&&(o=u);let c=t,d=t;for(i.isBefore(t,r)&&(c=r,d=null),i.isAfter(t,o)&&(d&&(d=o),c=null);c||d;){if(c&&i.isAfter(c,o)&&(c=null),d&&i.isBefore(d,r)&&(d=null),c){if(!s(c))return c;c=i.addDays(c,1)}if(d){if(!s(d))return d;d=i.addDays(d,-1)}}return null},y=(e,t,n)=>null!=t&&e.isValid(t)?t:n,v=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},g=(e,t,n)=>"date"===n?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),b=["year","month","day"],w=e=>b.includes(e),D=(e,t,n)=>{let{format:a,views:o}=t;if(null!=a)return a;const r=e.formats;return h(o,["year"])?r.year:h(o,["month"])?r.month:h(o,["day"])?r.dayOfMonth:h(o,["month","year"])?"".concat(r.month," ").concat(r.year):h(o,["day","month"])?"".concat(r.month," ").concat(r.dayOfMonth):n?/en/.test(e.getCurrentLocaleCode())?r.normalDateWithWeekday:r.normalDate:r.keyboardDate},x=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map((t=>e.addDays(n,t)))},A=["hours","minutes","seconds"],M=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),C={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},S=(e,t,n)=>{if(t===C.year)return e.startOfYear(n);if(t===C.month)return e.startOfMonth(n);if(t===C.day)return e.startOfDay(n);let a=n;return t{let{props:t,utils:n,granularity:a,timezone:o,getTodayDate:r}=e;var s;let i=r?r():S(n,a,g(n,o));null!=t.minDate&&n.isAfterDay(t.minDate,i)&&(i=S(n,a,t.minDate)),null!=t.maxDate&&n.isBeforeDay(t.maxDate,i)&&(i=S(n,a,t.maxDate));const l=((e,t)=>(n,a)=>e?t.isAfter(n,a):M(n,t)>M(a,t))(null!=(s=t.disableIgnoringDatePartForTimeValidation)&&s,n);return null!=t.minTime&&l(t.minTime,i)&&(i=S(n,a,t.disableIgnoringDatePartForTimeValidation?t.minTime:p(n,i,t.minTime))),null!=t.maxTime&&l(i,t.maxTime)&&(i=S(n,a,t.disableIgnoringDatePartForTimeValidation?t.maxTime:p(n,i,t.maxTime))),i},T=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error(['MUI: The token "'.concat(t,'" is not supported by the Date and Time Pickers.'),"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"===typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},k=(e,t,n)=>{const a=[],o=e.dateWithTimezone(void 0,t),r=e.startOfWeek(o),s=e.endOfWeek(o);let i=r;for(;e.isBefore(i,s);)a.push(i),i=e.addDays(i,1);return a.map((t=>e.formatByString(t,n)))},V=(e,t,n,a)=>{switch(n){case"month":return v(e,e.dateWithTimezone(void 0,t)).map((t=>e.formatByString(t,a)));case"weekDay":return k(e,t,a);case"meridiem":{const n=e.dateWithTimezone(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,a)))}default:return[]}},O=(e,t,n)=>{let a=t;for(a=Number(a).toString();a.length{if("day"===o.type&&"digit-with-letter"===o.contentType){const t=e.setDate(a.longestMonth,n);return e.formatByString(t,o.format)}const r=n.toString();return o.hasLeadingZerosInInput?O(0,r,o.maxLength):r},F=(e,t,n,a,o,r,s)=>{const i=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(a),l="Home"===a,u="End"===a,c=""===n.value||l||u;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const a=o[n.type]({currentDate:r,format:n.format,contentType:n.contentType}),d=t=>I(e,0,t,a,n),m="minutes"===n.type&&null!=s&&s.minutesStep?s.minutesStep:1;let h=parseInt(n.value,10)+i*m;if(c){if("year"===n.type&&!u&&!l)return e.formatByString(e.dateWithTimezone(void 0,t),n.format);h=i>0||l?a.minimum:a.maximum}return h%m!==0&&((i<0||l)&&(h+=m-(m+h)%m),(i>0||u)&&(h-=h%m)),h>a.maximum?d(a.minimum+(h-a.maximum-1)%(a.maximum-a.minimum+1)):h{const a=V(e,t,n.type,n.format);if(0===a.length)return n.value;if(c)return i>0||l?a[0]:a[a.length-1];const o=a.indexOf(n.value);return a[(o+a.length+i)%a.length]})()},L=(e,t)=>{let n=e.value||e.placeholder;const a="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(n=Number(n).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!a&&1===n.length&&(n="".concat(n,"\u200e")),"input-rtl"===t&&(n="\u2068".concat(n,"\u2069")),n},R=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),N=(e,t)=>{let n=0,o=t?1:0;const r=[];for(let s=0;s{switch(a.type){case"year":return n.fieldYearPlaceholder({digitAmount:e.formatByString(e.dateWithTimezone(void 0,t),o).length,format:o});case"month":return n.fieldMonthPlaceholder({contentType:a.contentType,format:o});case"day":return n.fieldDayPlaceholder({format:o});case"weekDay":return n.fieldWeekDayPlaceholder({contentType:a.contentType,format:o});case"hours":return n.fieldHoursPlaceholder({format:o});case"minutes":return n.fieldMinutesPlaceholder({format:o});case"seconds":return n.fieldSecondsPlaceholder({format:o});case"meridiem":return n.fieldMeridiemPlaceholder({format:o});default:return o}},j=(e,t,n,a)=>e.formatByString(e.parse(t,n),a),z=(e,t,n)=>4===e.formatByString(e.dateWithTimezone(void 0,t),n).length,Y=(e,t,n,a,o)=>{if("digit"!==n)return!1;const r=e.dateWithTimezone(void 0,t);switch(a){case"year":if(z(e,t,o)){return"0001"===e.formatByString(e.setYear(r,1),o)}return"01"===e.formatByString(e.setYear(r,2001),o);case"month":return e.formatByString(e.startOfYear(r),o).length>1;case"day":return e.formatByString(e.startOfMonth(r),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(r),o).length>1;case"hours":return e.formatByString(e.setHours(r,1),o).length>1;case"minutes":return e.formatByString(e.setMinutes(r,1),o).length>1;case"seconds":return e.formatByString(e.setSeconds(r,1),o).length>1;default:throw new Error("Invalid section type")}},B=(e,t,n,o,r,s,i,l)=>{let u="";const c=[],d=e.date(),m=o=>{if(""===o)return null;const s=T(e,o),l=Y(e,t,s.contentType,s.type,o),m=i?l:"digit"===s.contentType,h=null!=r&&e.isValid(r);let p=h?e.formatByString(r,o):"",f=null;if(m)if(l)f=""===p?e.formatByString(d,o).length:p.length;else{if(null==s.maxLength)throw new Error("MUI: The token ".concat(o," should have a 'maxDigitNumber' property on it's adapter"));f=s.maxLength,h&&(p=O(0,p,f))}return c.push((0,a.A)({},s,{format:o,maxLength:f,value:p,placeholder:E(e,t,n,s,o),hasLeadingZeros:l,hasLeadingZerosInFormat:l,hasLeadingZerosInInput:m,startSeparator:0===c.length?u:"",endSeparator:"",modified:!1})),null};let h=10,p=o,f=e.expandFormat(o);for(;f!==p;)if(p=f,f=e.expandFormat(p),h-=1,h<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const y=f,v=((e,t)=>{const n=[],{start:a,end:o}=e.escapedCharacters,r=new RegExp("(\\".concat(a,"[^\\").concat(o,"]*\\").concat(o,")+"),"g");let s=null;for(;s=r.exec(t);)n.push({start:s.index,end:r.lastIndex-1});return n})(e,y),g=new RegExp("^(".concat(Object.keys(e.formatTokenMap).sort(((e,t)=>t.length-e.length)).join("|"),")"),"g");let b="";for(let a=0;ae.start<=a&&e.end>=a)),t=y[a],n=null!=e,o="".concat(b).concat(y.slice(a)),r=g.test(o);if(!n&&t.match(/([A-Za-z]+)/)&&r)b=o.slice(0,g.lastIndex),a+=g.lastIndex-1;else{n&&(null==e?void 0:e.start)===a||(null==e?void 0:e.end)===a||(m(b),b="",0===c.length?u+=t:c[c.length-1].endSeparator+=t)}}return m(b),c.map((e=>{const t=e=>{let t=e;return l&&null!==t&&t.includes(" ")&&(t="\u2069".concat(t,"\u2066")),"spacious"===s&&["/",".","-"].includes(t)&&(t=" ".concat(t," ")),t};return e.startSeparator=t(e.startSeparator),e.endSeparator=t(e.endSeparator),e}))};const H=(e,t)=>{0},W={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},U=(e,t,n,a,o,r)=>[...a].sort(((e,t)=>W[e.type]-W[t.type])).reduce(((a,o)=>!r||o.modified?((e,t,n,a,o)=>{switch(n.type){case"year":return e.setYear(o,e.getYear(a));case"month":return e.setMonth(o,e.getMonth(a));case"weekDay":{const o=k(e,t,n.format),r=e.formatByString(a,n.format),s=o.indexOf(r),i=o.indexOf(n.value)-s;return e.addDays(a,i)}case"day":return e.setDate(o,e.getDate(a));case"meridiem":{const t=e.getHours(a)<12,n=e.getHours(o);return t&&n>=12?e.addHours(o,-12):!t&&n<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(a));case"minutes":return e.setMinutes(o,e.getMinutes(a));case"seconds":return e.setSeconds(o,e.getSeconds(a));default:return o}})(e,t,o,n,a):a),o),K=["value","referenceDate"],Z={emptyValue:null,getTodayValue:g,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,a=(0,o.A)(e,K);return null!=t&&a.utils.isValid(t)?t:null!=n?n:P(a)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},$={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,a,o)=>!e.isValid(t)&&!!n?n:N(o(t),a),getValueStrFromSections:(e,t)=>{const n=e.map((e=>{const n=L(e,t?"input-rtl":"input-ltr");return"".concat(e.startSeparator).concat(n).concat(e.endSeparator)})).join("");return t?"\u2066".concat(n,"\u2069"):n},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)};var q=n(81831);const G={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>"Select ".concat(e,". ").concat(null===t?"No time selected":"Selected time is ".concat(n.format(t,"fullTime"))),hoursClockNumberText:e=>"".concat(e," hours"),minutesClockNumberText:e=>"".concat(e," minutes"),secondsClockNumberText:e=>"".concat(e," seconds"),selectViewText:e=>"Select ".concat(e),calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>"Week ".concat(e),calendarWeekNumberText:e=>"".concat(e),openDatePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?"Choose date, selected date is ".concat(t.format(e,"fullDate")):"Choose date",openTimePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?"Choose time, selected time is ".concat(t.format(e,"fullTime")):"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},Q=G;X=G,(0,a.A)({},X);var X;const J=()=>{const e=r.useContext(q.F);if(null===e)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=r.useMemo((()=>(0,a.A)({},Q,e.localeText)),[e.localeText]);return r.useMemo((()=>(0,a.A)({},e,{localeText:t})),[e,t])},_=()=>J().utils,ee=()=>J().defaultDates,te=()=>J().localeText,ne=e=>{const t=_(),n=r.useRef();return void 0===n.current&&(n.current=t.dateWithTimezone(void 0,e)),n.current};var ae=n(72004),oe=n(82053),re=n(59254);function se(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const a={};return Object.keys(e).forEach((o=>{a[o]=e[o].reduce(((e,a)=>{if(a){const o=t(a);""!==o&&e.push(o),n&&n[a]&&e.push(n[a])}return e}),[]).join(" ")})),a}const ie=e=>e,le=(()=>{let e=ie;return{configure(t){e=t},generate:t=>e(t),reset(){e=ie}}})(),ue={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ce(e,t){const n=ue[t];return n?"".concat(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui","-").concat(n):"".concat(le.generate(e),"-").concat(t)}function de(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const a={};return t.forEach((t=>{a[t]=ce(e,t,n)})),a}function me(e){return ce("MuiPickersToolbar",e)}de("MuiPickersToolbar",["root","content"]);var he=n(44414);const pe=(0,re.Ay)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},n.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})})),fe=(0,re.Ay)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{ownerState:t}=e;var n;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:t.isLandscape?"flex-start":"space-between",flexDirection:t.isLandscape?null!=(n=t.landscapeDirection)?n:"column":"row",flex:1,alignItems:t.isLandscape?"flex-start":"center"}})),ye=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiPickersToolbar"}),{children:a,className:o,toolbarTitle:r,hidden:s,titleId:i}=n,u=n,c=(e=>{const{classes:t,isLandscape:n}=e;return se({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},me,t)})(u);return s?null:(0,he.jsxs)(pe,{ref:t,className:(0,ae.A)(c.root,o),ownerState:u,children:[(0,he.jsx)(oe.A,{color:"text.secondary",variant:"overline",id:i,children:r}),(0,he.jsx)(fe,{className:c.content,ownerState:u,children:a})]})}));function ve(e){return ce("MuiDatePickerToolbar",e)}de("MuiDatePickerToolbar",["root","title"]);const ge=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className"],be=(0,re.Ay)(ye,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),we=(0,re.Ay)(oe.A,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})((e=>{let{ownerState:t}=e;return(0,a.A)({},t.isLandscape&&{margin:"auto 16px auto auto"})})),De=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiDatePickerToolbar"}),{value:s,isLandscape:i,toolbarFormat:u,toolbarPlaceholder:c="\u2013\u2013",views:d,className:m}=n,h=(0,o.A)(n,ge),p=_(),f=te(),y=(e=>{const{classes:t}=e;return se({root:["root"],title:["title"]},ve,t)})(n),v=r.useMemo((()=>{if(!s)return c;const e=D(p,{format:u,views:d},!0);return p.formatByString(s,e)}),[s,u,c,p,d]),g=n;return(0,he.jsx)(be,(0,a.A)({ref:t,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:(0,ae.A)(y.root,m)},h,{children:(0,he.jsx)(we,{variant:"h4",align:i?"left":"center",ownerState:g,className:y.title,children:v})}))})),xe=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>(0,a.A)({},t,{["".concat(n.slice(0,1).toLowerCase()).concat(n.slice(1))]:e[n]})),{})};function Ae(e,t){var n,o,s,i;const u=_(),c=ee(),d=(0,l.A)({props:e,name:t}),m=r.useMemo((()=>{var e;return null==(null==(e=d.localeText)?void 0:e.toolbarTitle)?d.localeText:(0,a.A)({},d.localeText,{datePickerToolbarTitle:d.localeText.toolbarTitle})}),[d.localeText]),h=null!=(n=d.slots)?n:xe(d.components);return(0,a.A)({},d,{localeText:m},(e=>{let{openTo:t,defaultOpenTo:n,views:a,defaultViews:o}=e;const r=null!=a?a:o;let s;if(null!=t)s=t;else if(r.includes(n))s=n;else{if(!(r.length>0))throw new Error("MUI: The `views` prop must contain at least one view");s=r[0]}return{views:r,openTo:s}})({views:d.views,openTo:d.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:null!=(o=d.disableFuture)&&o,disablePast:null!=(s=d.disablePast)&&s,minDate:y(u,d.minDate,c.minDate),maxDate:y(u,d.maxDate,c.maxDate),slots:(0,a.A)({toolbar:De},h),slotProps:null!=(i=d.slotProps)?i:d.componentsProps})}const Me=e=>{let{props:t,value:n,adapter:a}=e;if(null===n)return null;const{shouldDisableDate:o,shouldDisableMonth:r,shouldDisableYear:s,disablePast:i,disableFuture:l,timezone:u}=t,c=a.utils.dateWithTimezone(void 0,u),d=y(a.utils,t.minDate,a.defaultDates.minDate),m=y(a.utils,t.maxDate,a.defaultDates.maxDate);switch(!0){case!a.utils.isValid(n):return"invalidDate";case Boolean(o&&o(n)):return"shouldDisableDate";case Boolean(r&&r(n)):return"shouldDisableMonth";case Boolean(s&&s(n)):return"shouldDisableYear";case Boolean(l&&a.utils.isAfterDay(n,c)):return"disableFuture";case Boolean(i&&a.utils.isBeforeDay(n,c)):return"disablePast";case Boolean(d&&a.utils.isBeforeDay(n,d)):return"minDate";case Boolean(m&&a.utils.isAfterDay(n,m)):return"maxDate";default:return null}};var Ce=n(89379),Se=n(80045);function Pe(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function Te(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:o,className:r}=e;if(!t){const e=(0,ae.A)(null===n||void 0===n?void 0:n.className,r,null===o||void 0===o?void 0:o.className,null===a||void 0===a?void 0:a.className),t=(0,Ce.A)((0,Ce.A)((0,Ce.A)({},null===n||void 0===n?void 0:n.style),null===o||void 0===o?void 0:o.style),null===a||void 0===a?void 0:a.style),s=(0,Ce.A)((0,Ce.A)((0,Ce.A)({},n),o),a);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}((0,Ce.A)((0,Ce.A)({},o),a)),i=Pe(a),l=Pe(o),u=t(s),c=(0,ae.A)(null===u||void 0===u?void 0:u.className,null===n||void 0===n?void 0:n.className,r,null===o||void 0===o?void 0:o.className,null===a||void 0===a?void 0:a.className),d=(0,Ce.A)((0,Ce.A)((0,Ce.A)((0,Ce.A)({},null===u||void 0===u?void 0:u.style),null===n||void 0===n?void 0:n.style),null===o||void 0===o?void 0:o.style),null===a||void 0===a?void 0:a.style),m=(0,Ce.A)((0,Ce.A)((0,Ce.A)((0,Ce.A)({},u),n),l),i);return c.length>0&&(m.className=c),Object.keys(d).length>0&&(m.style=d),{props:m,internalRef:u.ref}}const ke=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Ve(e){var t;const{elementType:n,externalSlotProps:a,ownerState:o,skipResolvingSlotProps:s=!1}=e,i=(0,Se.A)(e,ke),l=s?{}:d(a,o),{props:u,internalRef:c}=Te((0,Ce.A)((0,Ce.A)({},i),{},{externalSlotProps:l})),m=function(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}(c,null===l||void 0===l?void 0:l.ref,null===(t=e.additionalProps)||void 0===t?void 0:t.ref),h=function(e,t,n){return void 0===e||"string"===typeof e?t:(0,Ce.A)((0,Ce.A)({},t),{},{ownerState:(0,Ce.A)((0,Ce.A)({},t.ownerState),n)})}(n,(0,Ce.A)((0,Ce.A)({},u),{},{ref:m}),o);return h}var Oe=n(2046),Ie=n(25333);function Fe(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}let Le=0;const Re=s["useId".toString()];function Ne(e){if(void 0!==Re){const t=Re();return null!=e?e:t}return function(e){const[t,n]=r.useState(e),a=e||t;return r.useEffect((()=>{null==t&&(Le+=1,n("mui-".concat(Le)))}),[t]),a}(e)}var Ee=n(40165),je=n(57191),ze=n(2235),Ye=n(1849),Be=n(98370);const He="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;const We=function(e){const t=r.useRef(e);return He((()=>{t.current=e})),r.useRef((function(){return(0,t.current)(...arguments)})).current};function Ue(e){return e&&e.ownerDocument||document}function Ke(e){return ce("MuiPickersPopper",e)}de("MuiPickersPopper",["root","paper"]);const Ze=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).activeElement;return e?e.shadowRoot?Ze(e.shadowRoot):e:null},$e="@media (pointer: fine)",qe="undefined"!==typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Ge=qe&&qe[1]?parseInt(qe[1],10):null,Qe=qe&&qe[2]?parseInt(qe[2],10):null,Xe=Ge&&Ge<10||Qe&&Qe<13||!1,Je=()=>(0,i.A)("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||Xe,_e=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],et=(0,re.Ay)(Ye.A,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}})),tt=(0,re.Ay)(ze.A,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{ownerState:t}=e;return(0,a.A)({outline:0,transformOrigin:"top center"},t.placement.includes("top")&&{transformOrigin:"bottom center"})}));const nt=r.forwardRef(((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:s,children:i,paperSlotProps:l,paperClasses:u,onPaperClick:c,onPaperTouchStart:d}=e,m=(0,o.A)(e,_e),h=(0,a.A)({},s,{placement:r}),p=Ve({elementType:n,externalSlotProps:l,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:u,ownerState:h});return(0,he.jsx)(n,(0,a.A)({},m,p,{onClick:e=>{var t;c(e),null==(t=p.onClick)||t.call(p,e)},onTouchStart:e=>{var t;d(e),null==(t=p.onTouchStart)||t.call(p,e)},ownerState:h,children:i}))}));function at(e){var t,n,o,s;const i=(0,l.A)({props:e,name:"MuiPickersPopper"}),{anchorEl:u,children:c,containerRef:d=null,shouldRestoreFocus:m,onBlur:h,onDismiss:p,open:f,role:y,placement:v,slots:g,slotProps:b,reduceAnimations:w}=i;r.useEffect((()=>{function e(e){!f||"Escape"!==e.key&&"Esc"!==e.key||p()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[p,f]);const D=r.useRef(null);r.useEffect((()=>{"tooltip"===y||m&&!m()||(f?D.current=Ze(document):D.current&&D.current instanceof HTMLElement&&setTimeout((()=>{D.current instanceof HTMLElement&&D.current.focus()})))}),[f,y,m]);const[x,A,M]=function(e,t){const n=r.useRef(!1),a=r.useRef(!1),o=r.useRef(null),s=r.useRef(!1);r.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),s.current=!1};function t(){s.current=!0}}),[e]);const i=We((e=>{if(!s.current)return;const r=a.current;a.current=!1;const i=Ue(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!i.documentElement.contains(e.target)||o.current.contains(e.target),l||r||t(e)})),l=()=>{a.current=!0};return r.useEffect((()=>{if(e){const e=Ue(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",i),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",t)}}}),[e,i]),r.useEffect((()=>{if(e){const e=Ue(o.current);return e.addEventListener("click",i),()=>{e.removeEventListener("click",i),a.current=!1}}}),[e,i]),[o,l,l]}(f,null!=h?h:p),C=Fe(r.useRef(null),d),S=Fe(C,x),P=i,T=(e=>{const{classes:t}=e;return se({root:["root"],paper:["paper"]},Ke,t)})(P),k=Je(),V=null!=w?w:k,O=(null!=(t=null==g?void 0:g.desktopTransition)?t:V)?je.A:Ee.A,I=null!=(n=null==g?void 0:g.desktopTrapFocus)?n:Be.A,F=null!=(o=null==g?void 0:g.desktopPaper)?o:tt,L=null!=(s=null==g?void 0:g.popper)?s:et,R=Ve({elementType:L,externalSlotProps:null==b?void 0:b.popper,additionalProps:{transition:!0,role:y,open:f,anchorEl:u,placement:v,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),p())}},className:T.root,ownerState:i});return(0,he.jsx)(L,(0,a.A)({},R,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,he.jsx)(I,(0,a.A)({open:f,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===y,isEnabled:()=>!0},null==b?void 0:b.desktopTrapFocus,{children:(0,he.jsx)(O,(0,a.A)({},t,null==b?void 0:b.desktopTransition,{children:(0,he.jsx)(nt,{PaperComponent:F,ownerState:P,popperPlacement:n,ref:S,onPaperClick:A,onPaperTouchStart:M,paperClasses:T.paper,paperSlotProps:null==b?void 0:b.desktopPaper,children:c})}))}))}}))}function ot(e){let{controlled:t,default:n,name:a,state:o="value"}=e;const{current:s}=r.useRef(void 0!==t),[i,l]=r.useState(n);return[s?t:i,r.useCallback((e=>{s||l(e)}),[])]}function rt(e,t,n,a){const{value:o,onError:s}=e,i=J(),l=r.useRef(a),u=t({adapter:i,value:o,props:e});return r.useEffect((()=>{s&&!n(u,l.current)&&s(u,o),l.current=u}),[n,s,l,u,o]),u}const st=e=>{let{timezone:t,value:n,defaultValue:a,onChange:o,valueManager:s}=e;var i,l;const u=_(),c=r.useRef(a),d=null!=(i=null!=n?n:c.current)?i:s.emptyValue,m=r.useMemo((()=>s.getTimezone(u,d)),[u,s,d]),h=We((e=>null==m?e:s.setTimezone(u,m,e))),p=null!=(l=null!=t?t:m)?l:"default";return{value:r.useMemo((()=>s.setTimezone(u,p,d)),[s,u,p,d]),handleValueChange:We((function(e){const t=h(e);for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r{let{name:t,timezone:n,value:a,defaultValue:o,onChange:r,valueManager:s}=e;const[i,l]=ot({name:t,state:"value",controlled:a,default:null!=o?o:s.emptyValue}),u=We((function(e){l(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a{let{props:t,valueManager:n,valueType:o,wrapperVariant:s,validator:i}=e;const{onAccept:l,onChange:u,value:c,defaultValue:d,closeOnSelect:m="desktop"===s,selectedSections:h,onSelectedSectionsChange:p,timezone:f}=t,{current:y}=r.useRef(d),{current:v}=r.useRef(void 0!==c);const g=_(),b=J(),[w,D]=ot({controlled:h,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:x,setIsOpen:A}=(e=>{let{open:t,onOpen:n,onClose:a}=e;const o=r.useRef("boolean"===typeof t).current,[s,i]=r.useState(!1);return r.useEffect((()=>{if(o){if("boolean"!==typeof t)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(t)}}),[o,t]),{isOpen:s,setIsOpen:r.useCallback((e=>{o||i(e),e&&n&&n(),!e&&a&&a()}),[o,n,a])}})(t),[M,C]=r.useState((()=>{let e;return e=void 0!==c?c:void 0!==y?y:n.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:c,hasBeenModifiedSinceMount:!1}})),{timezone:S,handleValueChange:P}=st({timezone:f,value:c,defaultValue:y,onChange:u,valueManager:n});rt((0,a.A)({},t,{value:M.draft,timezone:S}),i,n.isSameError,n.defaultErrorState);const T=We((e=>{const o={action:e,dateState:M,hasChanged:t=>!n.areValuesEqual(g,e.value,t),isControlled:v,closeOnSelect:m},r=(e=>{const{action:t,hasChanged:n,dateState:a,isControlled:o}=e,r=!o&&!a.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!r||!["accept","today","clear"].includes(t.pickerAction))||n(a.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!r||n(a.lastPublishedValue)))})(o),s=(e=>{const{action:t,hasChanged:n,dateState:a,isControlled:o,closeOnSelect:r}=e,s=!o&&!a.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!s||!["accept","today","clear"].includes(t.pickerAction))||n(a.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&r?!!s||n(a.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(a.lastCommittedValue)})(o),u=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(o);if(C((t=>(0,a.A)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:s?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}))),r){const n={validationError:"setValueFromField"===e.name?e.context.validationError:i({adapter:b,value:e.value,props:(0,a.A)({},t,{value:e.value,timezone:S})})};"setValueFromShortcut"===e.name&&null!=e.shortcut&&(n.shortcut=e.shortcut),P(e.value,n)}s&&l&&l(e.value),u&&A(!1)}));if(void 0!==c&&(void 0===M.lastControlledValue||!n.areValuesEqual(g,M.lastControlledValue,c))){const e=n.areValuesEqual(g,M.draft,c);C((t=>(0,a.A)({},t,{lastControlledValue:c},e?{}:{lastCommittedValue:c,lastPublishedValue:c,draft:c,hasBeenModifiedSinceMount:!0})))}const k=We((()=>{T({value:n.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),V=We((()=>{T({value:M.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),O=We((()=>{T({value:M.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),I=We((()=>{T({value:M.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),F=We((()=>{T({value:n.getTodayValue(g,S,o),name:"setValueFromAction",pickerAction:"today"})})),L=We((()=>A(!0))),R=We((()=>A(!1))),N=We((function(e){return T({name:"setValueFromView",value:e,selectionState:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"partial"})})),E=We(((e,t,n)=>T({name:"setValueFromShortcut",value:e,changeImportance:null!=t?t:"accept",shortcut:n}))),j=We(((e,t)=>T({name:"setValueFromField",value:e,context:t}))),z=We((e=>{D(e),null==p||p(e)})),Y={onClear:k,onAccept:V,onDismiss:O,onCancel:I,onSetToday:F,onOpen:L,onClose:R},B={value:M.draft,onChange:j,selectedSections:w,onSelectedSectionsChange:z},H=r.useMemo((()=>n.cleanValue(g,M.draft)),[g,n,M.draft]);return{open:x,fieldProps:B,viewProps:{value:H,onChange:N,onClose:R,open:x,onSelectedSectionsChange:z},layoutProps:(0,a.A)({},Y,{value:H,onChange:N,onSelectShortcut:E,isValid:e=>{const o=i({adapter:b,value:e,props:(0,a.A)({},t,{value:e,timezone:S})});return!n.hasError(o)}}),actions:Y}};function ut(e){let{onChange:t,onViewChange:n,openTo:a,view:o,views:s,autoFocus:i,focusedView:l,onFocusedViewChange:u}=e;var c,d;const m=r.useRef(a),h=r.useRef(s),p=r.useRef(s.includes(a)?a:s[0]),[f,y]=ot({name:"useViews",state:"view",controlled:o,default:p.current}),v=r.useRef(i?f:null),[g,b]=ot({name:"useViews",state:"focusedView",controlled:l,default:v.current});r.useEffect((()=>{(m.current&&m.current!==a||h.current&&h.current.some((e=>!s.includes(e))))&&(y(s.includes(a)?a:s[0]),h.current=s,m.current=a)}),[a,y,f,s]);const w=s.indexOf(f),D=null!=(c=s[w-1])?c:null,x=null!=(d=s[w+1])?d:null,A=We(((e,t)=>{b(t?e:t=>e===t?null:t),null==u||u(e,t)})),M=We((e=>{A(e,!0),e!==f&&(y(e),n&&n(e))})),C=We((()=>{x&&M(x)})),S=We(((e,n,a)=>{const o="finish"===n,r=a?s.indexOf(a){let{props:t,propsFromPickerValue:n,additionalViewProps:s,inputRef:i,autoFocusView:l}=e;const{onChange:u,open:c,onSelectedSectionsChange:d,onClose:m}=n,{view:h,views:p,openTo:f,onViewChange:y,viewRenderers:v,timezone:g}=t,b=(0,o.A)(t,ct),{view:w,setView:D,defaultView:x,focusedView:M,setFocusedView:C,setValueAndGoToNextView:S}=ut({view:h,views:p,openTo:f,onChange:u,onViewChange:y,autoFocus:l}),{hasUIView:P,viewModeLookup:T}=r.useMemo((()=>p.reduce(((e,t)=>{let n;return n=null!=v[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[v,p]),k=r.useMemo((()=>p.reduce(((e,t)=>null!=v[t]&&(e=>A.includes(e))(t)?e+1:e),0)),[v,p]),V=T[w],O=We((()=>"UI"===V)),[I,F]=r.useState("UI"===V?w:null);I!==w&&"UI"===T[w]&&F(w),He((()=>{"field"===V&&c&&(m(),setTimeout((()=>{null==i||i.current.focus(),d(w)})))}),[w]),He((()=>{if(!c)return;let e=w;"field"===V&&null!=I&&(e=I),e!==x&&"UI"===T[e]&&"UI"===T[x]&&(e=x),e!==w&&D(e),C(e,!0)}),[c]);return{hasUIView:P,shouldRestoreFocus:O,layoutProps:{views:p,view:I,onViewChange:D},renderCurrentView:()=>{if(null==I)return null;const e=v[I];return null==e?null:e((0,a.A)({},b,s,n,{views:p,timezone:g,onChange:S,view:I,onViewChange:D,focusedView:M,onFocusedViewChange:C,showViewSwitcher:k>1,timeViewsCount:k}))}}};function mt(){return"undefined"===typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const ht=(e,t)=>{const[n,a]=r.useState(mt);if(He((()=>{const e=()=>{a(mt())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),o=e,s=["hours","minutes","seconds"],Array.isArray(s)?s.every((e=>-1!==o.indexOf(e))):-1!==o.indexOf(s))return!1;var o,s;return"landscape"===(t||n)};(0,n(46081).f)(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const pt=e=>{let{props:t,valueManager:n,valueType:o,wrapperVariant:r,inputRef:s,additionalViewProps:i,validator:l,autoFocusView:u}=e;const c=lt({props:t,valueManager:n,valueType:o,wrapperVariant:r,validator:l}),d=dt({props:t,inputRef:s,additionalViewProps:i,autoFocusView:u,propsFromPickerValue:c.viewProps}),m=(e=>{let{props:t,propsFromPickerValue:n,propsFromPickerViews:o,wrapperVariant:r}=e;const{orientation:s}=t,i=ht(o.views,s);return{layoutProps:(0,a.A)({},o,n,{isLandscape:i,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}})({props:t,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:d.layoutProps});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:d.renderCurrentView,hasUIView:d.hasUIView,shouldRestoreFocus:d.shouldRestoreFocus,layoutProps:m.layoutProps}};function ft(e){return ce("MuiPickersLayout",e)}const yt=de("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);var vt=n(10226),gt=n(79739);const bt=["onAccept","onClear","onCancel","onSetToday","actions"];function wt(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:s,actions:i}=e,l=(0,o.A)(e,bt),u=te();if(null==i||0===i.length)return null;const c=null==i?void 0:i.map((e=>{switch(e){case"clear":return(0,he.jsx)(vt.A,{onClick:n,children:u.clearButtonLabel},e);case"cancel":return(0,he.jsx)(vt.A,{onClick:r,children:u.cancelButtonLabel},e);case"accept":return(0,he.jsx)(vt.A,{onClick:t,children:u.okButtonLabel},e);case"today":return(0,he.jsx)(vt.A,{onClick:s,children:u.todayButtonLabel},e);default:return null}}));return(0,he.jsx)(gt.A,(0,a.A)({},l,{children:c}))}var Dt=n(249),xt=n(26050),At=n(25277);const Mt=320,Ct=["items","changeImportance","isLandscape","onChange","isValid"],St=["getValue"];function Pt(e){const{items:t,changeImportance:n,onChange:r,isValid:s}=e,i=(0,o.A)(e,Ct);if(null==t||0===t.length)return null;const l=t.map((e=>{let{getValue:t}=e,a=(0,o.A)(e,St);const i=t({isValid:s});return{label:a.label,onClick:()=>{r(i,n,a)},disabled:!s(i)}}));return(0,he.jsx)(Dt.A,(0,a.A)({dense:!0,sx:[{maxHeight:334,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:l.map((e=>(0,he.jsx)(xt.Ay,{children:(0,he.jsx)(At.A,(0,a.A)({},e))},e.label)))}))}const Tt=e=>{var t,n;const{wrapperVariant:o,onAccept:r,onClear:s,onCancel:i,onSetToday:l,view:u,views:c,onViewChange:d,value:m,onChange:h,onSelectShortcut:p,isValid:f,isLandscape:y,disabled:v,readOnly:g,children:b,components:w,componentsProps:D,slots:x,slotProps:A}=e,M=null!=x?x:xe(w),C=null!=A?A:D,S=(e=>{const{classes:t,isLandscape:n}=e;return se({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},ft,t)})(e),P=null!=(t=null==M?void 0:M.actionBar)?t:wt,T=Ve({elementType:P,externalSlotProps:null==C?void 0:C.actionBar,additionalProps:{onAccept:r,onClear:s,onCancel:i,onSetToday:l,actions:"desktop"===o?[]:["cancel","accept"],className:S.actionBar},ownerState:(0,a.A)({},e,{wrapperVariant:o})}),k=(0,he.jsx)(P,(0,a.A)({},T)),V=null==M?void 0:M.toolbar,O=Ve({elementType:V,externalSlotProps:null==C?void 0:C.toolbar,additionalProps:{isLandscape:y,onChange:h,value:m,view:u,onViewChange:d,views:c,disabled:v,readOnly:g,className:S.toolbar},ownerState:(0,a.A)({},e,{wrapperVariant:o})}),I=function(e){return null!==e.view}(O)&&V?(0,he.jsx)(V,(0,a.A)({},O)):null,F=b,L=null==M?void 0:M.tabs,R=u&&L?(0,he.jsx)(L,(0,a.A)({view:u,onViewChange:d,className:S.tabs},null==C?void 0:C.tabs)):null,N=null!=(n=null==M?void 0:M.shortcuts)?n:Pt,E=Ve({elementType:N,externalSlotProps:null==C?void 0:C.shortcuts,additionalProps:{isValid:f,isLandscape:y,onChange:p,className:S.shortcuts},ownerState:{isValid:f,isLandscape:y,onChange:p,className:S.shortcuts,wrapperVariant:o}});return{toolbar:I,content:F,tabs:R,actionBar:k,shortcuts:u&&N?(0,he.jsx)(N,(0,a.A)({},E)):null}},kt=(0,re.Ay)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return{display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",["& .".concat(yt.toolbar)]:n.isLandscape?{gridColumn:"rtl"===t.direction?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[".".concat(yt.shortcuts)]:n.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:"rtl"===t.direction?3:1,gridRow:"2 / 3"},["& .".concat(yt.actionBar)]:{gridColumn:"1 / 4",gridRow:3}}}));kt.propTypes={as:c().elementType,ownerState:c().shape({isLandscape:c().bool.isRequired}).isRequired,sx:c().oneOfType([c().arrayOf(c().oneOfType([c().func,c().object,c().bool])),c().func,c().object])};const Vt=(0,re.Ay)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Ot=function(e){const t=(0,l.A)({props:e,name:"MuiPickersLayout"}),{toolbar:n,content:a,tabs:o,actionBar:s,shortcuts:i}=Tt(t),{sx:u,className:c,isLandscape:d,ref:m,wrapperVariant:h}=t,p=t,f=(e=>{const{isLandscape:t,classes:n}=e;return se({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},ft,n)})(p);return(0,he.jsxs)(kt,{ref:m,sx:u,className:(0,ae.A)(c,f.root),ownerState:p,children:[d?i:n,d?n:i,(0,he.jsx)(Vt,{className:f.contentWrapper,children:"desktop"===h?(0,he.jsxs)(r.Fragment,{children:[a,o]}):(0,he.jsxs)(r.Fragment,{children:[o,a]})}),s]})},It=["props","getOpenDialogAriaText"],Ft=["ownerState"],Lt=["ownerState"];var Rt=n(23235);const Nt=(0,Rt.A)((0,he.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Et=(0,Rt.A)((0,he.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),jt=(0,Rt.A)((0,he.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),zt=(0,Rt.A)((0,he.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),Yt=((0,Rt.A)((0,he.jsxs)(r.Fragment,{children:[(0,he.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,he.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,Rt.A)((0,he.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),(0,Rt.A)((0,he.jsxs)(r.Fragment,{children:[(0,he.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,he.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),(0,Rt.A)((0,he.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"));var Bt=n(29925),Ht=n(14857);const Wt=e=>{const t=_(),n=te(),o=J(),s="rtl"===(0,Ht.A)().direction,{valueManager:i,fieldValueManager:l,valueType:u,validator:c,internalProps:d,internalProps:{value:m,defaultValue:h,referenceDate:p,onChange:f,format:y,formatDensity:g="dense",selectedSections:b,onSelectedSectionsChange:w,shouldRespectLeadingZeros:D=!1,timezone:x}}=e,{timezone:A,value:M,handleValueChange:S}=st({timezone:x,value:m,defaultValue:h,onChange:f,valueManager:i}),P=r.useMemo((()=>((e,t)=>{const n=e.dateWithTimezone(void 0,t),a=e.endOfYear(n),o=e.endOfDay(n),{maxDaysInMonth:r,longestMonth:s}=v(e,n).reduce(((t,n)=>{const a=e.getDaysInMonth(n);return a>t.maxDaysInMonth?{maxDaysInMonth:a,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:n=>{let{format:a}=n;return{minimum:0,maximum:z(e,t,a)?9999:99}},month:()=>({minimum:1,maximum:e.getMonth(a)+1}),day:t=>{let{currentDate:n}=t;return{minimum:1,maximum:null!=n&&e.isValid(n)?e.getDaysInMonth(n):r,longestMonth:s}},weekDay:n=>{let{format:a,contentType:o}=n;if("digit"===o){const n=k(e,t,a).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:t=>{let{format:a}=t;const r=e.getHours(o);return e.formatByString(e.endOfDay(n),a)!==r.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(n),a))}:{minimum:0,maximum:r}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:0})}})(t,A)),[t,A]),T=r.useCallback((function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return l.getSectionsFromValue(t,e,a,s,(e=>B(t,A,n,y,e,g,D,s)))}),[l,y,n,s,D,t,g,A]),V=r.useMemo((()=>l.getValueStrFromSections(T(i.emptyValue),s)),[l,T,i.emptyValue,s]),[O,I]=r.useState((()=>{const e=T(M);H();const n={sections:e,value:M,referenceValue:i.emptyValue,tempValueStrAndroid:null},o=(e=>Math.max(...e.map((e=>{var t;return null!=(t=C[e.type])?t:1}))))(e),r=i.getInitialReferenceValue({referenceDate:p,value:M,utils:t,props:d,granularity:o,timezone:A});return(0,a.A)({},n,{referenceValue:r})})),[F,R]=ot({controlled:b,default:null,name:"useField",state:"selectedSectionIndexes"}),E=e=>{R(e),null==w||w(e),I((e=>(0,a.A)({},e,{selectedSectionQuery:null})))},j=r.useMemo((()=>{if(null==F)return null;if("all"===F)return{startIndex:0,endIndex:O.sections.length-1,shouldSelectBoundarySelectors:!0};if("number"===typeof F)return{startIndex:F,endIndex:F};if("string"===typeof F){const e=O.sections.findIndex((e=>e.type===F));return{startIndex:e,endIndex:e}}return F}),[F,O.sections]),Y=e=>{let{value:n,referenceValue:r,sections:s}=e;if(I((e=>(0,a.A)({},e,{sections:s,value:n,referenceValue:r,tempValueStrAndroid:null}))),i.areValuesEqual(t,O.value,n))return;const l={validationError:c({adapter:o,value:n,props:(0,a.A)({},d,{value:n,timezone:A})})};S(n,l)},W=(e,t)=>{const n=[...O.sections];return n[e]=(0,a.A)({},n[e],{value:t,modified:!0}),N(n,s)};return r.useEffect((()=>{const e=T(O.value);H(),I((t=>(0,a.A)({},t,{sections:e})))}),[y,t.locale]),r.useEffect((()=>{let e=!1;e=!i.areValuesEqual(t,O.value,M)||i.getTimezone(t,O.value)!==i.getTimezone(t,M),e&&I((e=>(0,a.A)({},e,{value:M,referenceValue:l.updateReferenceValue(t,M,e.referenceValue),sections:T(M)})))}),[M]),{state:O,selectedSectionIndexes:j,setSelectedSections:E,clearValue:()=>{Y({value:i.emptyValue,referenceValue:O.referenceValue,sections:T(i.emptyValue)})},clearActiveSection:()=>{if(null==j)return;const e=O.sections[j.startIndex],n=l.getActiveDateManager(t,O,e),o=n.getSections(O.sections).filter((e=>""!==e.value)).length===(""===e.value?0:1),r=W(j.startIndex,""),s=o?null:t.date(new Date("")),i=n.getNewValuesFromNewActiveDate(s);(null!=s&&!t.isValid(s))!==(null!=n.date&&!t.isValid(n.date))?Y((0,a.A)({},i,{sections:r})):I((e=>(0,a.A)({},e,i,{sections:r,tempValueStrAndroid:null})))},updateSectionValue:e=>{let{activeSection:n,newSectionValue:o,shouldGoToNextSection:r}=e;r&&j&&j.startIndex{const n=t.some((e=>"day"===e.type)),a=[],o=[];for(let i=0;i(0,a.A)({},e,d,{sections:i,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const a=l.parseValueStr(e,O.referenceValue,((e,a)=>{const o=t.parse(e,y);if(null==o||!t.isValid(o))return null;const r=B(t,A,n,y,o,g,D,s);return U(t,A,o,r,a,!1)})),o=l.updateReferenceValue(t,a,O.referenceValue);Y({value:a,referenceValue:o,sections:T(a,O.sections)})},setTempAndroidValueStr:e=>I((t=>(0,a.A)({},t,{tempValueStrAndroid:e}))),sectionsValueBoundaries:P,placeholder:V,timezone:A}},Ut=e=>null!=e.saveQuery,Kt=e=>{let{sections:t,updateSectionValue:n,sectionsValueBoundaries:o,setTempAndroidValueStr:s,timezone:i}=e;const l=_(),[u,c]=r.useState(null),d=We((()=>c(null)));r.useEffect((()=>{var e;null!=u&&(null==(e=t[u.sectionIndex])?void 0:e.type)!==u.sectionType&&d()}),[t,u,d]),r.useEffect((()=>{if(null!=u){const e=setTimeout((()=>d()),5e3);return()=>{window.clearTimeout(e)}}return()=>{}}),[u,d]);const m=(e,n,a)=>{let{keyPressed:o,sectionIndex:r}=e;const s=o.toLowerCase(),i=t[r];if(null!=u&&(!a||a(u.value))&&u.sectionIndex===r){const e="".concat(u.value).concat(s),t=n(e,i);if(!Ut(t))return c({sectionIndex:r,value:e,sectionType:i.type}),t}const l=n(s,i);return Ut(l)&&!l.saveQuery?(d(),null):(c({sectionIndex:r,value:s,sectionType:i.type}),Ut(l)?null:l)};return{applyCharacterEditing:We((e=>{const r=t[e.sectionIndex],u=" "!==e.keyPressed&&!Number.isNaN(Number(e.keyPressed))?(e=>{const t=(e,t)=>{const n=Number("".concat(e)),a=o[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(n>a.maximum)return{saveQuery:!1};if(na.maximum||e.length===a.maximum.toString().length;return{sectionValue:I(l,0,n,a,t),shouldGoToNextSection:r}};return m(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const o=Y(l,i,"digit","month","MM"),r=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:o,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Ut(r))return r;const s=j(l,r.sectionValue,"MM",n.format);return(0,a.A)({},r,{sectionValue:s})}if("weekDay"===n.type){const o=t(e,n);if(Ut(o))return o;const r=k(l,i,n.format)[Number(o.sectionValue)-1];return(0,a.A)({},o,{sectionValue:r})}return{saveQuery:!1}}),(e=>!Number.isNaN(Number(e))))})(e):(e=>{const t=(e,t,n)=>{const a=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===a.length?{saveQuery:!1}:{sectionValue:a[0],shouldGoToNextSection:1===a.length}},n=(e,n,o,r)=>{const s=e=>V(l,i,n.type,e);if("letter"===n.contentType)return t(n.format,s(n.format),e);if(o&&null!=r&&"letter"===T(l,o).contentType){const n=s(o),i=t(0,n,e);return Ut(i)?{saveQuery:!1}:(0,a.A)({},i,{sectionValue:r(i.sectionValue,n)})}return{saveQuery:!1}};return m(e,((e,t)=>{switch(t.type){case"month":{const a=e=>j(l,e,l.formats.month,t.format);return n(e,t,l.formats.month,a)}case"weekDay":{const a=(e,t)=>t.indexOf(e).toString();return n(e,t,l.formats.weekday,a)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(e);null==u?s(null):n({activeSection:r,newSectionValue:u.sectionValue,shouldGoToNextSection:u.shouldGoToNextSection})})),resetCharacterQuery:d}},Zt=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],$t=e=>{const t=_(),{state:n,selectedSectionIndexes:s,setSelectedSections:i,clearValue:l,clearActiveSection:u,updateSectionValue:c,updateValueFromValueStr:d,setTempAndroidValueStr:m,sectionsValueBoundaries:h,placeholder:p,timezone:f}=Wt(e),{inputRef:y,internalProps:v,internalProps:{readOnly:g=!1,unstableFieldRef:b,minutesStep:w},forwardedProps:{onClick:D,onKeyDown:x,onFocus:A,onBlur:M,onMouseUp:C,onPaste:S,error:P,clearable:T,onClear:k,disabled:V},fieldValueManager:O,valueManager:I,validator:L}=e,N=(0,o.A)(e.forwardedProps,Zt),{applyCharacterEditing:E,resetCharacterQuery:j}=Kt({sections:n.sections,updateSectionValue:c,sectionsValueBoundaries:h,setTempAndroidValueStr:m,timezone:f}),z=r.useRef(null),Y=Fe(y,z),B=r.useRef(void 0),H="rtl"===(0,Ht.A)().direction,W=r.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,a)=>{const o=0===a?null:a-1,r=a===e.length-1?null:a+1;n[a]={leftIndex:o,rightIndex:r}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const a={},o={};let r=0,s=0,i=e.length-1;for(;i>=0;){s=e.findIndex(((e,t)=>{var n;return t>=r&&(null==(n=e.endSeparator)?void 0:n.includes(" "))&&" / "!==e.endSeparator})),-1===s&&(s=e.length-1);for(let e=s;e>=r;e-=1)o[e]=i,a[i]=e,i-=1;r=s+1}return e.forEach(((t,r)=>{const s=o[r],i=0===s?null:a[s-1],l=s===e.length-1?null:a[s+1];n[r]={leftIndex:i,rightIndex:l}})),{neighbors:n,startIndex:a[0],endIndex:a[e.length-1]}})(n.sections,H)),[n.sections,H]),U=()=>{var e;if(g)return void i(null);const t=null!=(e=z.current.selectionStart)?e:0;let a;a=t<=n.sections[0].startInInput||t>=n.sections[n.sections.length-1].endInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>t));const o=-1===a?n.sections.length-1:a-1;i(o)},K=We((function(e){if(!e.isDefaultPrevented()){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a{null==C||C(e),e.preventDefault()})),$=We((function(){null==A||A(...arguments);const e=z.current;window.clearTimeout(B.current),B.current=setTimeout((()=>{e&&e===z.current&&(null!=s||g||(e.value.length&&Number(e.selectionEnd)-Number(e.selectionStart)===e.value.length?i("all"):U()))}))})),q=We((function(){null==M||M(...arguments),i(null)})),G=We((e=>{if(null==S||S(e),g)return void e.preventDefault();const t=e.clipboardData.getData("text");if(s&&s.startIndex===s.endIndex){const a=n.sections[s.startIndex],o=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===a.contentType&&o||"digit"===a.contentType&&r||"digit-with-letter"===a.contentType&&i)return j(),c({activeSection:a,newSectionValue:t,shouldGoToNextSection:!0}),void e.preventDefault();if(o||r)return void e.preventDefault()}e.preventDefault(),j(),d(t)})),Q=We((e=>{if(g)return;const t=e.target.value;if(""===t)return j(),void l();const a=e.nativeEvent.data,o=a&&a.length>1,r=o?a:t,i=R(r);if(null==s||o)return void d(o?a:i);let c;if(0===s.startIndex&&s.endIndex===n.sections.length-1&&1===i.length)c=i;else{const e=R(O.getValueStrFromSections(n.sections,H));let t=-1,a=-1;for(let n=0;no.end)return;const r=i.length-e.length+o.end-R(o.endSeparator||"").length;c=i.slice(o.start+R(o.startSeparator||"").length,r)}0!==c.length?E({keyPressed:c,sectionIndex:s.startIndex}):navigator.userAgent.toLowerCase().indexOf("android")>-1?m(r):(j(),u())})),X=We((e=>{switch(null==x||x(e),!0){case"a"===e.key&&(e.ctrlKey||e.metaKey):e.preventDefault(),i("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==s)i(W.startIndex);else if(s.startIndex!==s.endIndex)i(s.endIndex);else{const e=W.neighbors[s.startIndex].rightIndex;null!==e&&i(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==s)i(W.endIndex);else if(s.startIndex!==s.endIndex)i(s.startIndex);else{const e=W.neighbors[s.startIndex].leftIndex;null!==e&&i(e)}break;case"Delete"===e.key:if(e.preventDefault(),g)break;null==s||0===s.startIndex&&s.endIndex===n.sections.length-1?l():u(),j();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),g||null==s)break;const a=n.sections[s.startIndex],o=O.getActiveDateManager(t,n,a),r=F(t,f,a,e.key,h,o.date,{minutesStep:w});c({activeSection:a,newSectionValue:r,shouldGoToNextSection:!1});break}}}));He((()=>{if(!z.current)return;if(null==s)return void(z.current.scrollLeft&&(z.current.scrollLeft=0));const e=n.sections[s.startIndex],t=n.sections[s.endIndex];let a=e.startInInput,o=t.endInInput;if(s.shouldSelectBoundarySelectors&&(a-=e.startSeparator.length,o+=t.endSeparator.length),a!==z.current.selectionStart||o!==z.current.selectionEnd){const e=z.current.scrollTop;z.current===Ze(document)&&z.current.setSelectionRange(a,o),z.current.scrollTop=e}}));const J=rt((0,a.A)({},v,{value:n.value,timezone:f}),L,I.isSameError,I.defaultErrorState),ee=r.useMemo((()=>void 0!==P?P:I.hasError(J)),[I,J,P]);r.useEffect((()=>{ee||s||j()}),[n.referenceValue,s,ee]),r.useEffect((()=>(z.current&&z.current===document.activeElement&&i("all"),()=>window.clearTimeout(B.current))),[]),r.useEffect((()=>{null!=n.tempValueStrAndroid&&null!=s&&(j(),u())}),[n.tempValueStrAndroid]);const te=r.useMemo((()=>{var e;return null!=(e=n.tempValueStrAndroid)?e:O.getValueStrFromSections(n.sections,H)}),[n.sections,O,n.tempValueStrAndroid,H]),ne=r.useMemo((()=>null==s||"letter"===n.sections[s.startIndex].contentType?"text":"numeric"),[s,n.sections]),ae=z.current&&z.current===Ze(document),oe=I.areValuesEqual(t,n.value,I.emptyValue),re=!ae&&oe;r.useImperativeHandle(b,(()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var e,t,a;const o=null!=(e=z.current.selectionStart)?e:0,r=null!=(t=z.current.selectionEnd)?t:0,s=!(null==(a=z.current)||!a.readOnly);if(0===o&&0===r||s)return null;const i=o<=n.sections[0].startInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>o));return-1===i?n.sections.length-1:i-1},setSelectedSections:e=>i(e)})));const se=We((function(e){var t;e.preventDefault();for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;oXt.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}),_t=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],en=e=>{let{props:t,inputRef:n}=e;const o=(e=>{var t,n,o;const r=_(),s=ee();return(0,a.A)({},e,{disablePast:null!=(t=e.disablePast)&&t,disableFuture:null!=(n=e.disableFuture)&&n,format:null!=(o=e.format)?o:r.formats.keyboardDate,minDate:y(r,e.minDate,s.minDate),maxDate:y(r,e.maxDate,s.maxDate)})})(t),{forwardedProps:r,internalProps:s}=((e,t)=>{const n=(0,a.A)({},e),o={},r=e=>{n.hasOwnProperty(e)&&(o[e]=n[e],delete n[e])};return _t.forEach(r),"date"===t?qt.forEach(r):"time"===t?Gt.forEach(r):"date-time"===t&&(qt.forEach(r),Gt.forEach(r),Qt.forEach(r)),{forwardedProps:n,internalProps:o}})(o,"date");return $t({inputRef:n,forwardedProps:r,internalProps:s,valueManager:Z,fieldValueManager:$,validator:Me,valueType:"date"})},tn=["ownerState"],nn=["components","componentsProps","slots","slotProps","InputProps","inputProps"],an=["inputRef"],on=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],rn=r.forwardRef((function(e,t){var n,s,i;const u=(0,l.A)({props:e,name:"MuiDateField"}),{components:c,componentsProps:d,slots:m,slotProps:h,InputProps:p,inputProps:f}=u,y=(0,o.A)(u,nn),v=u,g=null!=(n=null!=(s=null==m?void 0:m.textField)?s:null==c?void 0:c.TextField)?n:Bt.A,b=Ve({elementType:g,externalSlotProps:null!=(i=null==h?void 0:h.textField)?i:null==d?void 0:d.textField,externalForwardedProps:y,ownerState:v}),{inputRef:w}=b,D=(0,o.A)(b,an);D.inputProps=(0,a.A)({},f,D.inputProps),D.InputProps=(0,a.A)({},p,D.InputProps);const x=en({props:D,inputRef:w}),{ref:A,onPaste:M,onKeyDown:C,inputMode:S,readOnly:P,clearable:T,onClear:k}=x,V=(0,o.A)(x,on),{InputProps:O,fieldProps:I}=(e=>{let{clearable:t,fieldProps:n,InputProps:s,onClear:i,slots:l,slotProps:u,components:c,componentsProps:d}=e;var m,h,p,f,y,v;const g=te(),b=null!=(m=null!=(h=null==l?void 0:l.clearButton)?h:null==c?void 0:c.ClearButton)?m:Ie.A,w=Ve({elementType:b,externalSlotProps:null!=(p=null==u?void 0:u.clearButton)?p:null==d?void 0:d.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:g.fieldClearLabel}}),D=(0,o.A)(w,tn),x=null!=(f=null!=(y=null==l?void 0:l.clearIcon)?y:null==c?void 0:c.ClearIcon)?f:Yt,A=Ve({elementType:x,externalSlotProps:null!=(v=null==u?void 0:u.clearIcon)?v:null==d?void 0:d.clearIcon,ownerState:{}});return{InputProps:(0,a.A)({},s,{endAdornment:(0,he.jsxs)(r.Fragment,{children:[t&&(0,he.jsx)(Oe.A,{position:"end",sx:{marginRight:null!=s&&s.endAdornment?-1:-1.5},children:(0,he.jsx)(b,(0,a.A)({},D,{onClick:i,children:(0,he.jsx)(x,(0,a.A)({fontSize:"small"},A))}))}),null==s?void 0:s.endAdornment]})}),fieldProps:(0,a.A)({},n,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(n.sx)?n.sx:[n.sx]]})}})({onClear:k,clearable:T,fieldProps:V,InputProps:V.InputProps,slots:m,slotProps:h,components:c,componentsProps:d});return(0,he.jsx)(g,(0,a.A)({ref:t},I,{InputProps:(0,a.A)({},O,{readOnly:P}),inputProps:(0,a.A)({},V.inputProps,{inputMode:S,onPaste:M,onKeyDown:C,ref:A})}))})),sn=e=>{let{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:a,minDate:o,maxDate:s,disableFuture:i,disablePast:l,timezone:u}=e;const c=J();return r.useCallback((e=>null!==Me({adapter:c,value:e,props:{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:a,minDate:o,maxDate:s,disableFuture:i,disablePast:l,timezone:u}})),[c,t,n,a,o,s,i,l,u])},ln=e=>{const{value:t,referenceDate:n,defaultCalendarMonth:o,disableFuture:s,disablePast:i,disableSwitchToMonthOnDayFocus:l=!1,maxDate:u,minDate:c,onMonthChange:d,reduceAnimations:m,shouldDisableDate:h,timezone:p}=e,f=_(),y=r.useRef(((e,t,n)=>(o,r)=>{switch(r.type){case"changeMonth":return(0,a.A)({},o,{slideDirection:r.direction,currentMonth:r.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,a.A)({},o,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=o.focusedDay&&null!=r.focusedDay&&n.isSameDay(r.focusedDay,o.focusedDay))return o;const s=null!=r.focusedDay&&!t&&!n.isSameMonth(o.currentMonth,r.focusedDay);return(0,a.A)({},o,{focusedDay:r.focusedDay,isMonthSwitchingAnimating:s&&!e&&!r.withoutMonthSwitchingAnimation,currentMonth:s?n.startOfMonth(r.focusedDay):o.currentMonth,slideDirection:null!=r.focusedDay&&n.isAfterDay(r.focusedDay,o.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(m),l,f)).current,v=r.useMemo((()=>{let a=null;return n?a=n:o&&(a=f.startOfMonth(o)),Z.getInitialReferenceValue({value:t,utils:f,timezone:p,props:e,referenceDate:a,granularity:C.day})}),[]),[g,b]=r.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:v,currentMonth:f.startOfMonth(v),slideDirection:"left"}),w=r.useCallback((e=>{b((0,a.A)({type:"changeMonth"},e)),d&&d(e.newMonth)}),[d]),D=r.useCallback((e=>{const t=e;f.isSameMonth(t,g.currentMonth)||w({newMonth:f.startOfMonth(t),direction:f.isAfterDay(t,g.currentMonth)?"left":"right"})}),[g.currentMonth,w,f]),x=sn({shouldDisableDate:h,minDate:c,maxDate:u,disableFuture:s,disablePast:i,timezone:p}),A=r.useCallback((()=>{b({type:"finishMonthSwitchingAnimation"})}),[]),M=We(((e,t)=>{x(e)||b({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}));return{referenceDate:v,calendarState:g,changeMonth:D,changeFocusedDay:M,isDateDisabled:x,onMonthSwitchingAnimationEnd:A,handleChangeMonth:w}};var un=n(38166);const cn=e=>ce("MuiPickersFadeTransitionGroup",e),dn=(de("MuiPickersFadeTransitionGroup",["root"]),(0,re.Ay)(un.A,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function mn(e){const t=(0,l.A)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:a,reduceAnimations:o,transKey:r}=t,s=(e=>{const{classes:t}=e;return se({root:["root"]},cn,t)})(t),i=(0,Ht.A)();return o?n:(0,he.jsx)(dn,{className:(0,ae.A)(s.root,a),children:(0,he.jsx)(je.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:i.transitions.duration.enteringScreen,enter:i.transitions.duration.enteringScreen,exit:0},children:n},r)})}var hn=n(24184),pn=n(97497);function fn(e){return ce("MuiPickersDay",e)}const yn=de("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),vn=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],gn=e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},t.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,pn.X4)(t.palette.primary.main,t.palette.action.focusOpacity),["&.".concat(yn.selected)]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},["&.".concat(yn.selected)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},["&.".concat(yn.disabled,":not(.").concat(yn.selected,")")]:{color:(t.vars||t).palette.text.disabled},["&.".concat(yn.disabled,"&.").concat(yn.selected)]:{opacity:.6}},!n.disableMargin&&{margin:"0 ".concat(2,"px")},n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&{color:(t.vars||t).palette.text.secondary},!n.disableHighlightToday&&n.today&&{["&:not(.".concat(yn.selected,")")]:{border:"1px solid ".concat((t.vars||t).palette.text.secondary)}})},bn=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},wn=(0,re.Ay)(hn.A,{name:"MuiPickersDay",slot:"Root",overridesResolver:bn})(gn),Dn=(0,re.Ay)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:bn})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},gn({theme:t,ownerState:n}),{opacity:0,pointerEvents:"none"})})),xn=()=>{},An=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiPickersDay"}),{autoFocus:s=!1,className:i,day:u,disabled:c=!1,disableHighlightToday:d=!1,disableMargin:m=!1,isAnimating:h,onClick:p,onDaySelect:f,onFocus:y=xn,onBlur:v=xn,onKeyDown:g=xn,onMouseDown:b=xn,onMouseEnter:w=xn,outsideCurrentMonth:D,selected:x=!1,showDaysOutsideCurrentMonth:A=!1,children:M,today:C=!1}=n,S=(0,o.A)(n,vn),P=(0,a.A)({},n,{autoFocus:s,disabled:c,disableHighlightToday:d,disableMargin:m,selected:x,showDaysOutsideCurrentMonth:A,today:C}),T=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:a,today:o,disabled:r,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:i,classes:l}=e,u=s&&!i;return se({root:["root",t&&!u&&"selected",r&&"disabled",!n&&"dayWithMargin",!a&&o&&"today",s&&i&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},fn,l)})(P),k=_(),V=r.useRef(null),O=Fe(V,t);He((()=>{!s||c||h||D||V.current.focus()}),[s,c,h,D]);return D&&!A?(0,he.jsx)(Dn,{className:(0,ae.A)(T.root,T.hiddenDaySpacingFiller,i),ownerState:P,role:S.role}):(0,he.jsx)(wn,(0,a.A)({className:(0,ae.A)(T.root,i),ref:O,centerRipple:!0,disabled:c,tabIndex:x?0:-1,onKeyDown:e=>g(e,u),onFocus:e=>y(e,u),onBlur:e=>v(e,u),onMouseEnter:e=>w(e,u),onClick:e=>{c||f(u),D&&e.currentTarget.focus(),p&&p(e)},onMouseDown:e=>{b(e),D&&e.preventDefault()}},S,{ownerState:P,children:M||k.format(u,"dayOfMonth")}))})),Mn=r.memo(An);var Cn=n(77387);function Sn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Pn=n(67279),Tn=n(50385),kn=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return a=t,void((n=e).classList?n.classList.remove(a):"string"===typeof n.className?n.className=Sn(n.className,a):n.setAttribute("class",Sn(n.className&&n.className.baseVal||"",a)));var n,a}))},Vn=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;oce("MuiPickersSlideTransition",e),Fn=de("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Ln=["children","className","reduceAnimations","slideDirection","transKey","classes"],Rn=(0,re.Ay)(un.A,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[".".concat(Fn["slideEnter-left"])]:t["slideEnter-left"]},{[".".concat(Fn["slideEnter-right"])]:t["slideEnter-right"]},{[".".concat(Fn.slideEnterActive)]:t.slideEnterActive},{[".".concat(Fn.slideExit)]:t.slideExit},{[".".concat(Fn["slideExitActiveLeft-left"])]:t["slideExitActiveLeft-left"]},{[".".concat(Fn["slideExitActiveLeft-right"])]:t["slideExitActiveLeft-right"]}]})((e=>{let{theme:t}=e;const n=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},["& .".concat(Fn["slideEnter-left"])]:{willChange:"transform",transform:"translate(100%)",zIndex:1},["& .".concat(Fn["slideEnter-right"])]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},["& .".concat(Fn.slideEnterActive)]:{transform:"translate(0%)",transition:n},["& .".concat(Fn.slideExit)]:{transform:"translate(0%)"},["& .".concat(Fn["slideExitActiveLeft-left"])]:{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0},["& .".concat(Fn["slideExitActiveLeft-right"])]:{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}}}));const Nn=e=>ce("MuiDayCalendar",e),En=(de("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),jn=["ownerState"],zn=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Yn=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Bn=(0,re.Ay)(oe.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary}})),Hn=(0,re.Ay)(oe.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled}})),Wn=(0,re.Ay)(oe.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})((e=>{let{theme:t}=e;return(0,a.A)({},t.typography.caption,{width:36,height:36,padding:0,margin:"0 ".concat(2,"px"),color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})})),Un=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Kn=(0,re.Ay)((function(e){const t=(0,l.A)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:s,reduceAnimations:i,transKey:u}=t,c=(0,o.A)(t,Ln),d=(e=>{const{classes:t,slideDirection:n}=e;return se({root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:["slideEnter-".concat(n)],exitActive:["slideExitActiveLeft-".concat(n)]},In,t)})(t),m=(0,Ht.A)();if(i)return(0,he.jsx)("div",{className:(0,ae.A)(d.root,s),children:n});const h={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return(0,he.jsx)(Rn,{className:(0,ae.A)(d.root,s),childFactory:e=>r.cloneElement(e,{classNames:h}),role:"presentation",children:(0,he.jsx)(On,(0,a.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:m.transitions.duration.complex,classNames:h},c,{children:n}),u)})}),{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Zn=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),$n=(0,re.Ay)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"".concat(2,"px 0"),display:"flex",justifyContent:"center"});function qn(e){var t,n,s;let{parentProps:i,day:l,focusableDay:u,selectedDays:c,isDateDisabled:d,currentMonthNumber:m,isViewFocused:h}=e,p=(0,o.A)(e,En);const{disabled:f,disableHighlightToday:y,isMonthSwitchingAnimating:v,showDaysOutsideCurrentMonth:g,components:b,componentsProps:w,slots:D,slotProps:x,timezone:A}=i,M=_(),C=ne(A),S=null!==u&&M.isSameDay(l,u),P=c.some((e=>M.isSameDay(e,l))),T=M.isSameDay(l,C),k=null!=(t=null!=(n=null==D?void 0:D.day)?n:null==b?void 0:b.Day)?t:Mn,V=Ve({elementType:k,externalSlotProps:null!=(s=null==x?void 0:x.day)?s:null==w?void 0:w.day,additionalProps:(0,a.A)({disableHighlightToday:y,showDaysOutsideCurrentMonth:g,role:"gridcell",isAnimating:v,"data-timestamp":M.toJsDate(l).valueOf()},p),ownerState:(0,a.A)({},i,{day:l,selected:P})}),O=(0,o.A)(V,jn),I=r.useMemo((()=>f||d(l)),[f,d,l]),F=r.useMemo((()=>M.getMonth(l)!==m),[M,l,m]),L=r.useMemo((()=>{const e=M.startOfMonth(M.setMonth(l,m));return g?M.isSameDay(l,M.startOfWeek(e)):M.isSameDay(l,e)}),[m,l,g,M]),R=r.useMemo((()=>{const e=M.endOfMonth(M.setMonth(l,m));return g?M.isSameDay(l,M.endOfWeek(e)):M.isSameDay(l,e)}),[m,l,g,M]);return(0,he.jsx)(k,(0,a.A)({},O,{day:l,disabled:I,autoFocus:h&&S,today:T,outsideCurrentMonth:F,isFirstVisibleCell:L,isLastVisibleCell:R,selected:P,tabIndex:S?0:-1,"aria-selected":P,"aria-current":T?"date":void 0}))}function Gn(e){const t=(0,l.A)({props:e,name:"MuiDayCalendar"}),{onFocusedDayChange:n,className:o,currentMonth:s,selectedDays:i,focusedDay:u,loading:c,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:m,readOnly:h,reduceAnimations:p,renderLoading:y=()=>(0,he.jsx)("span",{children:"..."}),slideDirection:v,TransitionProps:g,disablePast:b,disableFuture:w,minDate:D,maxDate:A,shouldDisableDate:M,shouldDisableMonth:C,shouldDisableYear:S,dayOfWeekFormatter:P,hasFocus:T,onFocusedViewChange:k,gridLabelId:V,displayWeekNumber:O,fixedWeekNumber:I,autoFocus:F,timezone:L}=t,R=ne(L),N=_(),E=(e=>{const{classes:t}=e;return se({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Nn,t)})(t),j="rtl"===(0,Ht.A)().direction,z=P||((e,t)=>N.format(t,"weekdayShort").charAt(0).toUpperCase()),Y=sn({shouldDisableDate:M,shouldDisableMonth:C,shouldDisableYear:S,minDate:D,maxDate:A,disablePast:b,disableFuture:w,timezone:L}),B=te(),[H,W]=ot({name:"DayCalendar",state:"hasFocus",controlled:T,default:null!=F&&F}),[U,K]=r.useState((()=>u||R)),Z=We((e=>{h||d(e)})),$=e=>{Y(e)||(n(e),K(e),null==k||k(!0),W(!0))},q=We(((e,t)=>{switch(e.key){case"ArrowUp":$(N.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":$(N.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const n=N.addDays(t,j?1:-1),a=N.addMonths(t,j?1:-1),o=f({utils:N,date:n,minDate:j?n:N.startOfMonth(a),maxDate:j?N.endOfMonth(a):n,isDateDisabled:Y,timezone:L});$(o||n),e.preventDefault();break}case"ArrowRight":{const n=N.addDays(t,j?-1:1),a=N.addMonths(t,j?-1:1),o=f({utils:N,date:n,minDate:j?N.startOfMonth(a):n,maxDate:j?n:N.endOfMonth(a),isDateDisabled:Y,timezone:L});$(o||n),e.preventDefault();break}case"Home":$(N.startOfWeek(t)),e.preventDefault();break;case"End":$(N.endOfWeek(t)),e.preventDefault();break;case"PageUp":$(N.addMonths(t,1)),e.preventDefault();break;case"PageDown":$(N.addMonths(t,-1)),e.preventDefault()}})),G=We(((e,t)=>$(t))),Q=We(((e,t)=>{H&&N.isSameDay(U,t)&&(null==k||k(!1))})),X=N.getMonth(s),J=r.useMemo((()=>i.filter((e=>!!e)).map((e=>N.startOfDay(e)))),[N,i]),ee=X,oe=r.useMemo((()=>r.createRef()),[ee]),re=N.startOfWeek(R),ie=r.useMemo((()=>{const e=N.startOfMonth(s),t=N.endOfMonth(s);return Y(U)||N.isAfterDay(U,t)||N.isBeforeDay(U,e)?f({utils:N,date:U,minDate:e,maxDate:t,disablePast:b,disableFuture:w,isDateDisabled:Y,timezone:L}):U}),[s,w,b,U,Y,N,L]),le=r.useMemo((()=>{const e=N.setTimezone(s,L),t=N.getWeekArray(e);let n=N.addMonths(e,1);for(;I&&t.length{t.length{var n;const a=N.format(e,"weekdayShort");return(0,he.jsx)(Bn,{variant:"caption",role:"columnheader","aria-label":N.format(N.addDays(re,t),"weekday"),className:E.weekDayLabel,children:null!=(n=null==z?void 0:z(a,e))?n:a},a+t.toString())}))]}),c?(0,he.jsx)(Un,{className:E.loadingContainer,children:y()}):(0,he.jsx)(Kn,(0,a.A)({transKey:ee,onExited:m,reduceAnimations:p,slideDirection:v,className:(0,ae.A)(o,E.slideTransition)},g,{nodeRef:oe,children:(0,he.jsx)(Zn,{ref:oe,role:"rowgroup",className:E.monthContainer,children:le.map(((e,n)=>(0,he.jsxs)($n,{role:"row",className:E.weekContainer,"aria-rowindex":n+1,children:[O&&(0,he.jsx)(Wn,{className:E.weekNumber,role:"rowheader","aria-label":B.calendarWeekNumberAriaLabelText(N.getWeekNumber(e[0])),children:B.calendarWeekNumberText(N.getWeekNumber(e[0]))}),e.map(((e,n)=>(0,he.jsx)(qn,{parentProps:t,day:e,selectedDays:J,focusableDay:ie,onKeyDown:q,onFocus:G,onBlur:Q,onDaySelect:Z,isDateDisabled:Y,currentMonthNumber:X,isViewFocused:H,"aria-colindex":n+1},e.toString())))]},"week-".concat(e[0]))))})}))]})}var Qn=n(7148);function Xn(e){return ce("MuiPickersMonth",e)}const Jn=de("MuiPickersMonth",["root","monthButton","disabled","selected"]),_n=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],ea=(0,re.Ay)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})((e=>{let{ownerState:t}=e;return{flexBasis:3===t.monthsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"}})),ta=(0,re.Ay)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{["&.".concat(Jn.disabled)]:t.disabled},{["&.".concat(Jn.selected)]:t.selected}]})((e=>{let{theme:t}=e;return(0,a.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},["&.".concat(Jn.disabled)]:{color:(t.vars||t).palette.text.secondary},["&.".concat(Jn.selected)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})})),na=r.memo((function(e){const t=(0,l.A)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,children:s,disabled:i,selected:u,value:c,tabIndex:d,onClick:m,onKeyDown:h,onFocus:p,onBlur:f,"aria-current":y,"aria-label":v}=t,g=(0,o.A)(t,_n),b=r.useRef(null),w=(e=>{const{disabled:t,selected:n,classes:a}=e;return se({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},Xn,a)})(t);return He((()=>{var e;n&&(null==(e=b.current)||e.focus())}),[n]),(0,he.jsx)(ea,(0,a.A)({className:w.root,ownerState:t},g,{children:(0,he.jsx)(ta,{ref:b,disabled:i,type:"button",role:"radio",tabIndex:i?-1:d,"aria-current":y,"aria-checked":u,"aria-label":v,onClick:e=>m(e,c),onKeyDown:e=>h(e,c),onFocus:e=>p(e,c),onBlur:e=>f(e,c),className:w.monthButton,ownerState:t,children:s})}))}));function aa(e){return ce("MuiMonthCalendar",e)}de("MuiMonthCalendar",["root"]);const oa=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"];const ra=(0,re.Ay)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Mt,boxSizing:"border-box"}),sa=r.forwardRef((function(e,t){const n=function(e,t){const n=_(),o=ee(),r=(0,l.A)({props:e,name:t});return(0,a.A)({disableFuture:!1,disablePast:!1},r,{minDate:y(n,r.minDate,o.minDate),maxDate:y(n,r.maxDate,o.maxDate)})}(e,"MuiMonthCalendar"),{className:s,value:i,defaultValue:u,referenceDate:c,disabled:d,disableFuture:m,disablePast:h,maxDate:p,minDate:f,onChange:g,shouldDisableMonth:b,readOnly:w,disableHighlightToday:D,autoFocus:x=!1,onMonthFocus:A,hasFocus:M,onFocusedViewChange:S,monthsPerRow:P=3,timezone:T,gridLabelId:k}=n,V=(0,o.A)(n,oa),{value:O,handleValueChange:I,timezone:F}=it({name:"MonthCalendar",timezone:T,value:i,defaultValue:u,onChange:g,valueManager:Z}),L=ne(F),R=(0,Qn.A)(),N=_(),E=r.useMemo((()=>Z.getInitialReferenceValue({value:O,utils:N,props:n,timezone:F,referenceDate:c,granularity:C.month})),[]),j=n,z=(e=>{const{classes:t}=e;return se({root:["root"]},aa,t)})(j),Y=r.useMemo((()=>N.getMonth(L)),[N,L]),B=r.useMemo((()=>null!=O?N.getMonth(O):D?null:N.getMonth(E)),[O,N,D,E]),[H,W]=r.useState((()=>B||Y)),[U,K]=ot({name:"MonthCalendar",state:"hasFocus",controlled:M,default:null!=x&&x}),$=We((e=>{K(e),S&&S(e)})),q=r.useCallback((e=>{const t=N.startOfMonth(h&&N.isAfter(L,f)?L:f),n=N.startOfMonth(m&&N.isBefore(L,p)?L:p),a=N.startOfMonth(e);return!!N.isBefore(a,t)||(!!N.isAfter(a,n)||!!b&&b(a))}),[m,h,p,f,L,b,N]),G=We(((e,t)=>{if(w)return;const n=N.setMonth(null!=O?O:E,t);I(n)})),Q=We((e=>{q(N.setMonth(null!=O?O:E,e))||(W(e),$(!0),A&&A(e))}));r.useEffect((()=>{W((e=>null!==B&&e!==B?B:e))}),[B]);const X=We(((e,t)=>{const n=12;switch(e.key){case"ArrowUp":Q((n+t-3)%n),e.preventDefault();break;case"ArrowDown":Q((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":Q((n+t+("ltr"===R.direction?-1:1))%n),e.preventDefault();break;case"ArrowRight":Q((n+t+("ltr"===R.direction?1:-1))%n),e.preventDefault()}})),J=We(((e,t)=>{Q(t)})),te=We(((e,t)=>{H===t&&$(!1)}));return(0,he.jsx)(ra,(0,a.A)({ref:t,className:(0,ae.A)(z.root,s),ownerState:j,role:"radiogroup","aria-labelledby":k},V,{children:v(N,null!=O?O:E).map((e=>{const t=N.getMonth(e),n=N.format(e,"monthShort"),a=N.format(e,"month"),o=t===B,r=d||q(e);return(0,he.jsx)(na,{selected:o,value:t,onClick:G,onKeyDown:X,autoFocus:U&&t===H,disabled:r,tabIndex:t===H?0:-1,onFocus:J,onBlur:te,"aria-current":Y===t?"date":void 0,"aria-label":a,monthsPerRow:P,children:n},n)}))}))}));function ia(e){return ce("MuiPickersYear",e)}const la=de("MuiPickersYear",["root","yearButton","selected","disabled"]),ua=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],ca=(0,re.Ay)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})((e=>{let{ownerState:t}=e;return{flexBasis:3===t.yearsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"}})),da=(0,re.Ay)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{["&.".concat(la.disabled)]:t.disabled},{["&.".concat(la.selected)]:t.selected}]})((e=>{let{theme:t}=e;return(0,a.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pn.X4)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},["&.".concat(la.disabled)]:{color:(t.vars||t).palette.text.secondary},["&.".concat(la.selected)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})})),ma=r.memo((function(e){const t=(0,l.A)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:s,children:i,disabled:u,selected:c,value:d,tabIndex:m,onClick:h,onKeyDown:p,onFocus:f,onBlur:y,"aria-current":v}=t,g=(0,o.A)(t,ua),b=r.useRef(null),w=(e=>{const{disabled:t,selected:n,classes:a}=e;return se({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},ia,a)})(t);return r.useEffect((()=>{n&&b.current.focus()}),[n]),(0,he.jsx)(ca,(0,a.A)({className:(0,ae.A)(w.root,s),ownerState:t},g,{children:(0,he.jsx)(da,{ref:b,disabled:u,type:"button",role:"radio",tabIndex:u?-1:m,"aria-current":v,"aria-checked":c,onClick:e=>h(e,d),onKeyDown:e=>p(e,d),onFocus:e=>f(e,d),onBlur:e=>y(e,d),className:w.yearButton,ownerState:t,children:i})}))}));function ha(e){return ce("MuiYearCalendar",e)}de("MuiYearCalendar",["root"]);const pa=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"];const fa=(0,re.Ay)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Mt,maxHeight:280,boxSizing:"border-box",position:"relative"}),ya=r.forwardRef((function(e,t){const n=function(e,t){var n;const o=_(),r=ee(),s=(0,l.A)({props:e,name:t});return(0,a.A)({disablePast:!1,disableFuture:!1},s,{yearsPerRow:null!=(n=s.yearsPerRow)?n:3,minDate:y(o,s.minDate,r.minDate),maxDate:y(o,s.maxDate,r.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:s,className:i,value:u,defaultValue:c,referenceDate:d,disabled:m,disableFuture:h,disablePast:p,maxDate:f,minDate:v,onChange:g,readOnly:b,shouldDisableYear:w,disableHighlightToday:D,onYearFocus:x,hasFocus:A,onFocusedViewChange:M,yearsPerRow:S,timezone:P,gridLabelId:T}=n,k=(0,o.A)(n,pa),{value:V,handleValueChange:O,timezone:I}=it({name:"YearCalendar",timezone:P,value:u,defaultValue:c,onChange:g,valueManager:Z}),F=ne(I),L=(0,Qn.A)(),R=_(),N=r.useMemo((()=>Z.getInitialReferenceValue({value:V,utils:R,props:n,timezone:I,referenceDate:d,granularity:C.year})),[]),E=n,j=(e=>{const{classes:t}=e;return se({root:["root"]},ha,t)})(E),z=r.useMemo((()=>R.getYear(F)),[R,F]),Y=r.useMemo((()=>null!=V?R.getYear(V):D?null:R.getYear(N)),[V,R,D,N]),[B,H]=r.useState((()=>Y||z)),[W,U]=ot({name:"YearCalendar",state:"hasFocus",controlled:A,default:null!=s&&s}),K=We((e=>{U(e),M&&M(e)})),$=r.useCallback((e=>{if(p&&R.isBeforeYear(e,F))return!0;if(h&&R.isAfterYear(e,F))return!0;if(v&&R.isBeforeYear(e,v))return!0;if(f&&R.isAfterYear(e,f))return!0;if(!w)return!1;const t=R.startOfYear(e);return w(t)}),[h,p,f,v,F,w,R]),q=We(((e,t)=>{if(b)return;const n=R.setYear(null!=V?V:N,t);O(n)})),G=We((e=>{$(R.setYear(null!=V?V:N,e))||(H(e),K(!0),null==x||x(e))}));r.useEffect((()=>{H((e=>null!==Y&&e!==Y?Y:e))}),[Y]);const Q=We(((e,t)=>{switch(e.key){case"ArrowUp":G(t-S),e.preventDefault();break;case"ArrowDown":G(t+S),e.preventDefault();break;case"ArrowLeft":G(t+("ltr"===L.direction?-1:1)),e.preventDefault();break;case"ArrowRight":G(t+("ltr"===L.direction?1:-1)),e.preventDefault()}})),X=We(((e,t)=>{G(t)})),J=We(((e,t)=>{B===t&&K(!1)})),te=r.useRef(null),oe=Fe(t,te);return r.useEffect((()=>{if(s||null===te.current)return;const e=te.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,a=te.current.clientHeight,o=te.current.scrollTop,r=n+t;t>a||n{const t=R.getYear(e),n=t===Y,a=m||$(e);return(0,he.jsx)(ma,{selected:n,value:t,onClick:q,onKeyDown:Q,autoFocus:W&&t===B,disabled:a,tabIndex:t===B?0:-1,onFocus:X,onBlur:J,"aria-current":z===t?"date":void 0,yearsPerRow:S,children:R.format(e,"year")},R.format(e,"year"))}))}))}));function va(e){return ce("MuiPickersArrowSwitcher",e)}de("MuiPickersArrowSwitcher",["root","spacer","button"]);const ga=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],ba=["ownerState"],wa=["ownerState"],Da=(0,re.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),xa=(0,re.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((e=>{let{theme:t}=e;return{width:t.spacing(3)}})),Aa=(0,re.Ay)(Ie.A,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((e=>{let{ownerState:t}=e;return(0,a.A)({},t.hidden&&{visibility:"hidden"})})),Ma=r.forwardRef((function(e,t){var n,r,s,i;const u="rtl"===(0,Ht.A)().direction,c=(0,l.A)({props:e,name:"MuiPickersArrowSwitcher"}),{children:d,className:m,slots:h,slotProps:p,isNextDisabled:f,isNextHidden:y,onGoToNext:v,nextLabel:g,isPreviousDisabled:b,isPreviousHidden:w,onGoToPrevious:D,previousLabel:x}=c,A=(0,o.A)(c,ga),M=c,C=(e=>{const{classes:t}=e;return se({root:["root"],spacer:["spacer"],button:["button"]},va,t)})(M),S={isDisabled:f,isHidden:y,goTo:v,label:g},P={isDisabled:b,isHidden:w,goTo:D,label:x},T=null!=(n=null==h?void 0:h.previousIconButton)?n:Aa,k=Ve({elementType:T,externalSlotProps:null==p?void 0:p.previousIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"end",onClick:P.goTo},ownerState:(0,a.A)({},M,{hidden:P.isHidden}),className:C.button}),V=null!=(r=null==h?void 0:h.nextIconButton)?r:Aa,O=Ve({elementType:V,externalSlotProps:null==p?void 0:p.nextIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"start",onClick:S.goTo},ownerState:(0,a.A)({},M,{hidden:S.isHidden}),className:C.button}),I=null!=(s=null==h?void 0:h.leftArrowIcon)?s:Et,F=Ve({elementType:I,externalSlotProps:null==p?void 0:p.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),L=(0,o.A)(F,ba),R=null!=(i=null==h?void 0:h.rightArrowIcon)?i:jt,N=Ve({elementType:R,externalSlotProps:null==p?void 0:p.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),E=(0,o.A)(N,wa);return(0,he.jsxs)(Da,(0,a.A)({ref:t,className:(0,ae.A)(C.root,m),ownerState:M},A,{children:[(0,he.jsx)(T,(0,a.A)({},k,{children:u?(0,he.jsx)(R,(0,a.A)({},E)):(0,he.jsx)(I,(0,a.A)({},L))})),d?(0,he.jsx)(oe.A,{variant:"subtitle1",component:"span",children:d}):(0,he.jsx)(xa,{className:C.spacer,ownerState:M}),(0,he.jsx)(V,(0,a.A)({},O,{children:u?(0,he.jsx)(I,(0,a.A)({},L)):(0,he.jsx)(R,(0,a.A)({},E))}))]}))}));const Ca=e=>ce("MuiPickersCalendarHeader",e),Sa=de("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Pa=["slots","slotProps","components","componentsProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],Ta=["ownerState"],ka=(0,re.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),Va=(0,re.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return(0,a.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})})),Oa=(0,re.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Ia=(0,re.Ay)(Ie.A,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})((e=>{let{ownerState:t}=e;return(0,a.A)({marginRight:"auto"},"year"===t.view&&{[".".concat(Sa.switchViewIcon)]:{transform:"rotate(180deg)"}})})),Fa=(0,re.Ay)(Nt,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((e=>{let{theme:t}=e;return{willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"}})),La=r.forwardRef((function(e,t){var n,s,i,u;const c=te(),d=_(),m=(0,l.A)({props:e,name:"MuiPickersCalendarHeader"}),{slots:h,slotProps:p,components:f,currentMonth:y,disabled:v,disableFuture:g,disablePast:b,maxDate:w,minDate:D,onMonthChange:x,onViewChange:A,view:M,reduceAnimations:C,views:S,labelId:P,className:T,timezone:k}=m,V=(0,o.A)(m,Pa),O=m,I=(e=>{const{classes:t}=e;return se({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Ca,t)})(m),F=null!=(n=null!=(s=null==h?void 0:h.switchViewButton)?s:null==f?void 0:f.SwitchViewButton)?n:Ia,L=Ve({elementType:F,externalSlotProps:null==p?void 0:p.switchViewButton,additionalProps:{size:"small","aria-label":c.calendarViewSwitchingButtonAriaLabel(M)},ownerState:O,className:I.switchViewButton}),R=null!=(i=null!=(u=null==h?void 0:h.switchViewIcon)?u:null==f?void 0:f.SwitchViewIcon)?i:Fa,N=Ve({elementType:R,externalSlotProps:null==p?void 0:p.switchViewIcon,ownerState:void 0,className:I.switchViewIcon}),E=(0,o.A)(N,Ta),j=function(e,t){let{disableFuture:n,maxDate:a,timezone:o}=t;const s=_();return r.useMemo((()=>{const t=s.dateWithTimezone(void 0,o),r=s.startOfMonth(n&&s.isBefore(t,a)?t:a);return!s.isAfter(r,e)}),[n,a,e,s,o])}(y,{disableFuture:g,maxDate:w,timezone:k}),z=function(e,t){let{disablePast:n,minDate:a,timezone:o}=t;const s=_();return r.useMemo((()=>{const t=s.dateWithTimezone(void 0,o),r=s.startOfMonth(n&&s.isAfter(t,a)?t:a);return!s.isBefore(r,e)}),[n,a,e,s,o])}(y,{disablePast:b,minDate:D,timezone:k});return 1===S.length&&"year"===S[0]?null:(0,he.jsxs)(ka,(0,a.A)({},V,{ownerState:O,className:(0,ae.A)(T,I.root),ref:t,children:[(0,he.jsxs)(Va,{role:"presentation",onClick:()=>{if(1!==S.length&&A&&!v)if(2===S.length)A(S.find((e=>e!==M))||S[0]);else{const e=0!==S.indexOf(M)?0:1;A(S[e])}},ownerState:O,"aria-live":"polite",className:I.labelContainer,children:[(0,he.jsx)(mn,{reduceAnimations:C,transKey:d.format(y,"monthAndYear"),children:(0,he.jsx)(Oa,{id:P,ownerState:O,className:I.label,children:d.format(y,"monthAndYear")})}),S.length>1&&!v&&(0,he.jsx)(F,(0,a.A)({},L,{children:(0,he.jsx)(R,(0,a.A)({},E))}))]}),(0,he.jsx)(je.A,{in:"day"===M,children:(0,he.jsx)(Ma,{slots:h,slotProps:p,onGoToPrevious:()=>x(d.addMonths(y,-1),"right"),isPreviousDisabled:z,previousLabel:c.previousMonth,onGoToNext:()=>x(d.addMonths(y,1),"left"),isNextDisabled:j,nextLabel:c.nextMonth})})]}))})),Ra=(0,re.Ay)("div")({overflow:"hidden",width:Mt,maxHeight:334,display:"flex",flexDirection:"column",margin:"0 auto"}),Na=e=>ce("MuiDateCalendar",e),Ea=(de("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"]);const ja=(0,re.Ay)(Ra,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:334}),za=(0,re.Ay)(mn,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Ya=r.forwardRef((function(e,t){var n,s,i;const u=_(),c=Ne(),d=function(e,t){var n,o,r,s,i,u,c;const d=_(),m=ee(),h=Je(),p=(0,l.A)({props:e,name:t});return(0,a.A)({},p,{loading:null!=(n=p.loading)&&n,disablePast:null!=(o=p.disablePast)&&o,disableFuture:null!=(r=p.disableFuture)&&r,openTo:null!=(s=p.openTo)?s:"day",views:null!=(i=p.views)?i:["year","day"],reduceAnimations:null!=(u=p.reduceAnimations)?u:h,renderLoading:null!=(c=p.renderLoading)?c:()=>(0,he.jsx)("span",{children:"..."}),minDate:y(d,p.minDate,m.minDate),maxDate:y(d,p.maxDate,m.maxDate)})}(e,"MuiDateCalendar"),{autoFocus:m,onViewChange:h,value:v,defaultValue:g,referenceDate:b,disableFuture:w,disablePast:D,defaultCalendarMonth:x,onChange:A,onYearChange:M,onMonthChange:C,reduceAnimations:S,shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:k,view:V,views:O,openTo:I,className:F,disabled:L,readOnly:R,minDate:N,maxDate:E,disableHighlightToday:j,focusedView:z,onFocusedViewChange:Y,showDaysOutsideCurrentMonth:B,fixedWeekNumber:H,dayOfWeekFormatter:W,components:U,componentsProps:K,slots:$,slotProps:q,loading:G,renderLoading:Q,displayWeekNumber:X,yearsPerRow:J,monthsPerRow:te,timezone:ne}=d,oe=(0,o.A)(d,Ea),{value:re,handleValueChange:ie,timezone:le}=it({name:"DateCalendar",timezone:ne,value:v,defaultValue:g,onChange:A,valueManager:Z}),{view:ue,setView:ce,focusedView:de,setFocusedView:me,goToNextView:pe,setValueAndGoToNextView:fe}=ut({view:V,views:O,openTo:I,onChange:ie,onViewChange:h,autoFocus:m,focusedView:z,onFocusedViewChange:Y}),{referenceDate:ye,calendarState:ve,changeFocusedDay:ge,changeMonth:be,handleChangeMonth:we,isDateDisabled:De,onMonthSwitchingAnimationEnd:xe}=ln({value:re,defaultCalendarMonth:x,referenceDate:b,reduceAnimations:S,onMonthChange:C,minDate:N,maxDate:E,shouldDisableDate:P,disablePast:D,disableFuture:w,timezone:le}),Ae=L&&re||N,Me=L&&re||E,Ce="".concat(c,"-grid-label"),Se=null!==de,Pe=null!=(n=null!=(s=null==$?void 0:$.calendarHeader)?s:null==U?void 0:U.CalendarHeader)?n:La,Te=Ve({elementType:Pe,externalSlotProps:null!=(i=null==q?void 0:q.calendarHeader)?i:null==K?void 0:K.calendarHeader,additionalProps:{views:O,view:ue,currentMonth:ve.currentMonth,onViewChange:ce,onMonthChange:(e,t)=>we({newMonth:e,direction:t}),minDate:Ae,maxDate:Me,disabled:L,disablePast:D,disableFuture:w,reduceAnimations:S,timezone:le,labelId:Ce,slots:$,slotProps:q},ownerState:d}),ke=We((e=>{const t=u.startOfMonth(e),n=u.endOfMonth(e),a=De(e)?f({utils:u,date:e,minDate:u.isBefore(N,t)?t:N,maxDate:u.isAfter(E,n)?n:E,disablePast:D,disableFuture:w,isDateDisabled:De,timezone:le}):e;a?(fe(a,"finish"),null==C||C(t)):(pe(),be(t)),ge(a,!0)})),Oe=We((e=>{const t=u.startOfYear(e),n=u.endOfYear(e),a=De(e)?f({utils:u,date:e,minDate:u.isBefore(N,t)?t:N,maxDate:u.isAfter(E,n)?n:E,disablePast:D,disableFuture:w,isDateDisabled:De,timezone:le}):e;a?(fe(a,"finish"),null==M||M(a)):(pe(),be(t)),ge(a,!0)})),Ie=We((e=>ie(e?p(u,e,null!=re?re:ye):e,"finish",ue)));r.useEffect((()=>{null!=re&&u.isValid(re)&&be(re)}),[re]);const Fe=d,Le=(e=>{const{classes:t}=e;return se({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Na,t)})(Fe),Re={disablePast:D,disableFuture:w,maxDate:E,minDate:N},Ee={disableHighlightToday:j,readOnly:R,disabled:L,timezone:le,gridLabelId:Ce},je=r.useRef(ue);r.useEffect((()=>{je.current!==ue&&(de===je.current&&me(ue,!0),je.current=ue)}),[de,me,ue]);const ze=r.useMemo((()=>[re]),[re]);return(0,he.jsxs)(ja,(0,a.A)({ref:t,className:(0,ae.A)(Le.root,F),ownerState:Fe},oe,{children:[(0,he.jsx)(Pe,(0,a.A)({},Te)),(0,he.jsx)(za,{reduceAnimations:S,className:Le.viewTransitionContainer,transKey:ue,ownerState:Fe,children:(0,he.jsxs)("div",{children:["year"===ue&&(0,he.jsx)(ya,(0,a.A)({},Re,Ee,{value:re,onChange:Oe,shouldDisableYear:k,hasFocus:Se,onFocusedViewChange:e=>me("year",e),yearsPerRow:J,referenceDate:ye})),"month"===ue&&(0,he.jsx)(sa,(0,a.A)({},Re,Ee,{hasFocus:Se,className:F,value:re,onChange:ke,shouldDisableMonth:T,onFocusedViewChange:e=>me("month",e),monthsPerRow:te,referenceDate:ye})),"day"===ue&&(0,he.jsx)(Gn,(0,a.A)({},ve,Re,Ee,{onMonthSwitchingAnimationEnd:xe,onFocusedDayChange:ge,reduceAnimations:S,selectedDays:ze,onSelectedDaysChange:Ie,shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:k,hasFocus:Se,onFocusedViewChange:e=>me("day",e),showDaysOutsideCurrentMonth:B,fixedWeekNumber:H,dayOfWeekFormatter:W,displayWeekNumber:X,components:U,componentsProps:K,slots:$,slotProps:q,loading:G,renderLoading:Q}))]})})]}))})),Ba=e=>{let{view:t,onViewChange:n,views:a,focusedView:o,onFocusedViewChange:r,value:s,defaultValue:i,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:m,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:g,reduceAnimations:b,onMonthChange:D,monthsPerRow:x,onYearChange:A,yearsPerRow:M,defaultCalendarMonth:C,components:S,componentsProps:P,slots:T,slotProps:k,loading:V,renderLoading:O,disableHighlightToday:I,readOnly:F,disabled:L,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:N,sx:E,autoFocus:j,fixedWeekNumber:z,displayWeekNumber:Y,timezone:B}=e;return(0,he.jsx)(Ya,{view:t,onViewChange:n,views:a.filter(w),focusedView:o&&w(o)?o:null,onFocusedViewChange:r,value:s,defaultValue:i,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:m,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:g,reduceAnimations:b,onMonthChange:D,monthsPerRow:x,onYearChange:A,yearsPerRow:M,defaultCalendarMonth:C,components:S,componentsProps:P,slots:T,slotProps:k,loading:V,renderLoading:O,disableHighlightToday:I,readOnly:F,disabled:L,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:N,sx:E,autoFocus:j,fixedWeekNumber:z,displayWeekNumber:Y,timezone:B})},Ha=r.forwardRef((function(e,t){var n,s,i,l;const u=te(),c=_(),m=Ae(e,"MuiDesktopDatePicker"),h=(0,a.A)({day:Ba,month:Ba,year:Ba},m.viewRenderers),p=(0,a.A)({},m,{viewRenderers:h,format:D(c,m,!1),yearsPerRow:null!=(n=m.yearsPerRow)?n:4,slots:(0,a.A)({openPickerIcon:zt,field:rn},m.slots),slotProps:(0,a.A)({},m.slotProps,{field:e=>{var n;return(0,a.A)({},d(null==(n=m.slotProps)?void 0:n.field,e),Jt(m),{ref:t})},toolbar:(0,a.A)({hidden:!0},null==(s=m.slotProps)?void 0:s.toolbar)})}),{renderPicker:f}=(e=>{var t,n,s,i,l;let{props:u,getOpenDialogAriaText:c}=e,d=(0,o.A)(e,It);const{slots:m,slotProps:h,className:p,sx:f,format:y,formatDensity:v,timezone:g,name:b,label:w,inputRef:D,readOnly:x,disabled:A,autoFocus:M,localeText:C,reduceAnimations:S}=u,P=_(),T=r.useRef(null),k=r.useRef(null),V=Ne(),O=null!=(t=null==h||null==(n=h.toolbar)?void 0:n.hidden)&&t,{open:I,actions:F,hasUIView:L,layoutProps:R,renderCurrentView:N,shouldRestoreFocus:E,fieldProps:j}=pt((0,a.A)({},d,{props:u,inputRef:T,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),z=null!=(s=m.inputAdornment)?s:Oe.A,Y=Ve({elementType:z,externalSlotProps:null==h?void 0:h.inputAdornment,additionalProps:{position:"end"},ownerState:u}),B=(0,o.A)(Y,Ft),H=null!=(i=m.openPickerButton)?i:Ie.A,W=Ve({elementType:H,externalSlotProps:null==h?void 0:h.openPickerButton,additionalProps:{disabled:A||x,onClick:I?F.onClose:F.onOpen,"aria-label":c(j.value,P),edge:B.position},ownerState:u}),U=(0,o.A)(W,Lt),K=m.openPickerIcon,Z=m.field,$=Ve({elementType:Z,externalSlotProps:null==h?void 0:h.field,additionalProps:(0,a.A)({},j,O&&{id:V},{readOnly:x,disabled:A,className:p,sx:f,format:y,formatDensity:v,timezone:g,label:w,name:b,autoFocus:M&&!u.open,focused:!!I||void 0}),ownerState:u});L&&($.InputProps=(0,a.A)({},$.InputProps,{ref:k},!u.disableOpenPicker&&{["".concat(B.position,"Adornment")]:(0,he.jsx)(z,(0,a.A)({},B,{children:(0,he.jsx)(H,(0,a.A)({},U,{children:(0,he.jsx)(K,(0,a.A)({},null==h?void 0:h.openPickerIcon))}))}))}));const G=(0,a.A)({textField:m.textField,clearIcon:m.clearIcon,clearButton:m.clearButton},$.slots),Q=null!=(l=m.layout)?l:Ot,X=Fe(T,$.inputRef,D);let J=V;O&&(J=w?"".concat(V,"-label"):void 0);const ee=(0,a.A)({},h,{toolbar:(0,a.A)({},null==h?void 0:h.toolbar,{titleId:V}),popper:(0,a.A)({"aria-labelledby":J},null==h?void 0:h.popper)});return{renderPicker:()=>(0,he.jsxs)(q.$,{localeText:C,children:[(0,he.jsx)(Z,(0,a.A)({},$,{slots:G,slotProps:ee,inputRef:X})),(0,he.jsx)(at,(0,a.A)({role:"dialog",placement:"bottom-start",anchorEl:k.current},F,{open:I,slots:m,slotProps:ee,shouldRestoreFocus:E,reduceAnimations:S,children:(0,he.jsx)(Q,(0,a.A)({},R,null==ee?void 0:ee.layout,{slots:m,slotProps:ee,children:N()}))}))]})}})({props:p,valueManager:Z,valueType:"date",getOpenDialogAriaText:null!=(i=null==(l=p.localeText)?void 0:l.openDatePickerDialogue)?i:u.openDatePickerDialogue,validator:Me});return f()}));Ha.propTypes={autoFocus:c().bool,className:c().string,closeOnSelect:c().bool,components:c().object,componentsProps:c().object,dayOfWeekFormatter:c().func,defaultCalendarMonth:c().any,defaultValue:c().any,disabled:c().bool,disableFuture:c().bool,disableHighlightToday:c().bool,disableOpenPicker:c().bool,disablePast:c().bool,displayWeekNumber:c().bool,fixedWeekNumber:c().number,format:c().string,formatDensity:c().oneOf(["dense","spacious"]),inputRef:m,label:c().node,loading:c().bool,localeText:c().object,maxDate:c().any,minDate:c().any,monthsPerRow:c().oneOf([3,4]),name:c().string,onAccept:c().func,onChange:c().func,onClose:c().func,onError:c().func,onMonthChange:c().func,onOpen:c().func,onSelectedSectionsChange:c().func,onViewChange:c().func,onYearChange:c().func,open:c().bool,openTo:c().oneOf(["day","month","year"]),orientation:c().oneOf(["landscape","portrait"]),readOnly:c().bool,reduceAnimations:c().bool,referenceDate:c().any,renderLoading:c().func,selectedSections:c().oneOfType([c().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),c().number,c().shape({endIndex:c().number.isRequired,startIndex:c().number.isRequired})]),shouldDisableDate:c().func,shouldDisableMonth:c().func,shouldDisableYear:c().func,showDaysOutsideCurrentMonth:c().bool,slotProps:c().object,slots:c().object,sx:c().oneOfType([c().arrayOf(c().oneOfType([c().func,c().object,c().bool])),c().func,c().object]),timezone:c().string,value:c().any,view:c().oneOf(["day","month","year"]),viewRenderers:c().shape({day:c().func,month:c().func,year:c().func}),views:c().arrayOf(c().oneOf(["day","month","year"]).isRequired),yearsPerRow:c().oneOf([3,4])};var Wa=n(28170),Ua=n(96583),Ka=n(21427);const Za=(0,re.Ay)(Ua.A)({["& .".concat(Ka.A.container)]:{outline:0},["& .".concat(Ka.A.paper)]:{outline:0,minWidth:Mt}}),$a=(0,re.Ay)(Wa.A)({"&:first-of-type":{padding:0}});function qa(e){var t,n;const{children:o,onDismiss:r,open:s,slots:i,slotProps:l}=e,u=null!=(t=null==i?void 0:i.dialog)?t:Za,c=null!=(n=null==i?void 0:i.mobileTransition)?n:je.A;return(0,he.jsx)(u,(0,a.A)({open:s,onClose:r},null==l?void 0:l.dialog,{TransitionComponent:c,TransitionProps:null==l?void 0:l.mobileTransition,PaperComponent:null==i?void 0:i.mobilePaper,PaperProps:null==l?void 0:l.mobilePaper,children:(0,he.jsx)($a,{children:o})}))}const Ga=["props","getOpenDialogAriaText"],Qa=r.forwardRef((function(e,t){var n,s,i;const l=te(),u=_(),c=Ae(e,"MuiMobileDatePicker"),m=(0,a.A)({day:Ba,month:Ba,year:Ba},c.viewRenderers),h=(0,a.A)({},c,{viewRenderers:m,format:D(u,c,!1),slots:(0,a.A)({field:rn},c.slots),slotProps:(0,a.A)({},c.slotProps,{field:e=>{var n;return(0,a.A)({},d(null==(n=c.slotProps)?void 0:n.field,e),Jt(c),{ref:t})},toolbar:(0,a.A)({hidden:!1},null==(n=c.slotProps)?void 0:n.toolbar)})}),{renderPicker:p}=(e=>{var t,n,s;let{props:i,getOpenDialogAriaText:l}=e,u=(0,o.A)(e,Ga);const{slots:c,slotProps:d,className:m,sx:h,format:p,formatDensity:f,timezone:y,name:v,label:g,inputRef:b,readOnly:w,disabled:D,localeText:x}=i,A=_(),M=r.useRef(null),C=Ne(),S=null!=(t=null==d||null==(n=d.toolbar)?void 0:n.hidden)&&t,{open:P,actions:T,layoutProps:k,renderCurrentView:V,fieldProps:O}=pt((0,a.A)({},u,{props:i,inputRef:M,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),I=c.field,F=Ve({elementType:I,externalSlotProps:null==d?void 0:d.field,additionalProps:(0,a.A)({},O,S&&{id:C},!(D||w)&&{onClick:T.onOpen,onKeyDown:(L=T.onOpen,e=>{"Enter"!==e.key&&" "!==e.key||(L(e),e.preventDefault(),e.stopPropagation()),R&&R(e)})},{readOnly:null==w||w,disabled:D,className:m,sx:h,format:p,formatDensity:f,timezone:y,label:g,name:v}),ownerState:i});var L,R;F.inputProps=(0,a.A)({},F.inputProps,{"aria-label":l(O.value,A)});const N=(0,a.A)({textField:c.textField},F.slots),E=null!=(s=c.layout)?s:Ot,j=Fe(M,F.inputRef,b);let z=C;S&&(z=g?"".concat(C,"-label"):void 0);const Y=(0,a.A)({},d,{toolbar:(0,a.A)({},null==d?void 0:d.toolbar,{titleId:C}),mobilePaper:(0,a.A)({"aria-labelledby":z},null==d?void 0:d.mobilePaper)});return{renderPicker:()=>(0,he.jsxs)(q.$,{localeText:x,children:[(0,he.jsx)(I,(0,a.A)({},F,{slots:N,slotProps:Y,inputRef:j})),(0,he.jsx)(qa,(0,a.A)({},T,{open:P,slots:c,slotProps:Y,children:(0,he.jsx)(E,(0,a.A)({},k,null==Y?void 0:Y.layout,{slots:c,slotProps:Y,children:V()}))}))]})}})({props:h,valueManager:Z,valueType:"date",getOpenDialogAriaText:null!=(s=null==(i=h.localeText)?void 0:i.openDatePickerDialogue)?s:l.openDatePickerDialogue,validator:Me});return p()}));Qa.propTypes={autoFocus:c().bool,className:c().string,closeOnSelect:c().bool,components:c().object,componentsProps:c().object,dayOfWeekFormatter:c().func,defaultCalendarMonth:c().any,defaultValue:c().any,disabled:c().bool,disableFuture:c().bool,disableHighlightToday:c().bool,disableOpenPicker:c().bool,disablePast:c().bool,displayWeekNumber:c().bool,fixedWeekNumber:c().number,format:c().string,formatDensity:c().oneOf(["dense","spacious"]),inputRef:m,label:c().node,loading:c().bool,localeText:c().object,maxDate:c().any,minDate:c().any,monthsPerRow:c().oneOf([3,4]),name:c().string,onAccept:c().func,onChange:c().func,onClose:c().func,onError:c().func,onMonthChange:c().func,onOpen:c().func,onSelectedSectionsChange:c().func,onViewChange:c().func,onYearChange:c().func,open:c().bool,openTo:c().oneOf(["day","month","year"]),orientation:c().oneOf(["landscape","portrait"]),readOnly:c().bool,reduceAnimations:c().bool,referenceDate:c().any,renderLoading:c().func,selectedSections:c().oneOfType([c().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),c().number,c().shape({endIndex:c().number.isRequired,startIndex:c().number.isRequired})]),shouldDisableDate:c().func,shouldDisableMonth:c().func,shouldDisableYear:c().func,showDaysOutsideCurrentMonth:c().bool,slotProps:c().object,slots:c().object,sx:c().oneOfType([c().arrayOf(c().oneOfType([c().func,c().object,c().bool])),c().func,c().object]),timezone:c().string,value:c().any,view:c().oneOf(["day","month","year"]),viewRenderers:c().shape({day:c().func,month:c().func,year:c().func}),views:c().arrayOf(c().oneOf(["day","month","year"]).isRequired),yearsPerRow:c().oneOf([3,4])};const Xa=["desktopModeMediaQuery"],Ja=r.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=$e}=n,s=(0,o.A)(n,Xa);return(0,i.A)(r,{defaultMatches:!0})?(0,he.jsx)(Ha,(0,a.A)({ref:t},s)):(0,he.jsx)(Qa,(0,a.A)({ref:t},s))}))},43540:function(e){e.exports=function(){"use strict";var e="week",t="year";return function(n,a,o){var r=a.prototype;r.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var a=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var r=o(this).startOf(t).add(1,t).date(a),s=o(this).endOf(e);if(r.isBefore(s))return 1}var i=o(this).startOf(t).date(a).startOf(e).subtract(1,"millisecond"),l=this.diff(i,e,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},r.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},46081:(e,t,n)=>{"use strict";n.d(t,{f:()=>a});const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warning",n=!1;const a=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(a):console.warn(a))}}},46639:(e,t,n)=>{"use strict";n.d(t,{A:()=>I});var a=n(57528),o=n(98587),r=n(58168),s=n(9950),i=n(72004),l=n(3484),u=n(88283),c=n(89548),d=n(18463),m=n(59254),h=n(45558),p=n(1614);function f(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,h.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var y,v,g,b,w=n(44414);const D=["className","color","disableShrink","size","style","thickness","value","variant"];let x,A,M,C;const S=44,P=(0,u.i7)(x||(x=y||(y=(0,a.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),T=(0,u.i7)(A||(A=v||(v=(0,a.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),k=(0,m.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,c.A)(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,u.AH)(M||(M=g||(g=(0,a.A)(["\n animation: "," 1.4s linear infinite;\n "]))),P)})),V=(0,m.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),O=(0,m.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,c.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,u.AH)(C||(C=b||(b=(0,a.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),T)})),I=s.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiCircularProgress"}),{className:a,color:s="primary",disableShrink:u=!1,size:m=40,style:h,thickness:p=3.6,value:y=0,variant:v="indeterminate"}=n,g=(0,o.A)(n,D),b=(0,r.A)({},n,{color:s,disableShrink:u,size:m,thickness:p,value:y,variant:v}),x=(e=>{const{classes:t,variant:n,color:a,disableShrink:o}=e,r={root:["root",n,"color".concat((0,c.A)(a))],svg:["svg"],circle:["circle","circle".concat((0,c.A)(n)),o&&"circleDisableShrink"]};return(0,l.A)(r,f,t)})(b),A={},M={},C={};if("determinate"===v){const e=2*Math.PI*((S-p)/2);A.strokeDasharray=e.toFixed(3),C["aria-valuenow"]=Math.round(y),A.strokeDashoffset="".concat(((100-y)/100*e).toFixed(3),"px"),M.transform="rotate(-90deg)"}return(0,w.jsx)(k,(0,r.A)({className:(0,i.A)(x.root,a),style:(0,r.A)({width:m,height:m},M,h),ownerState:b,ref:t,role:"progressbar"},C,g,{children:(0,w.jsx)(V,{className:x.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(S," ").concat(S),children:(0,w.jsx)(O,{className:x.circle,style:A,ownerState:b,cx:S,cy:S,r:(S-p)/2,fill:"none",strokeWidth:p})})}))}))},48283:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(62161),o=n(60195),r=n(67550);function s(e){let{props:t,name:n}=e;return(0,a.A)({props:t,name:n,defaultTheme:o.A,themeId:r.A})}},77588:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,a){var o=n.prototype,r=o.format;a.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,a=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,a,o){var r=o&&o.toUpperCase();return a||n[o]||e[o]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return r.call(this,a)}}}()},81831:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,F:()=>u});var a=n(58168),o=n(98587),r=n(9950),s=n(48283),i=n(44414);const l=["localeText"],u=r.createContext(null);const c=function(e){var t;const{localeText:n}=e,c=(0,o.A)(e,l),{utils:d,localeText:m}=null!=(t=r.useContext(u))?t:{utils:void 0,localeText:void 0},h=(0,s.A)({props:c,name:"MuiLocalizationProvider"}),{children:p,dateAdapter:f,dateFormats:y,dateLibInstance:v,adapterLocale:g,localeText:b}=h,w=r.useMemo((()=>(0,a.A)({},b,m,n)),[b,m,n]),D=r.useMemo((()=>{if(!f)return d||null;const e=new f({locale:g,formats:y,instance:v});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[f,g,y,v,d]),x=r.useMemo((()=>D?{minDate:D.date("1900-01-01T00:00:00.000"),maxDate:D.date("2099-12-31T00:00:00.000")}:null),[D]),A=r.useMemo((()=>({utils:D,defaultDates:x,localeText:w})),[x,D,w]);return(0,i.jsx)(u.Provider,{value:A,children:p})}},87542:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isBetween=function(e,t,a,o){var r=n(e),s=n(t),i="("===(o=o||"()")[0],l=")"===o[1];return(i?this.isAfter(r,a):!this.isBefore(r,a))&&(l?this.isBefore(s,a):!this.isAfter(s,a))||(i?this.isBefore(r,a):!this.isAfter(r,a))&&(l?this.isAfter(s,a):!this.isBefore(s,a))}}}()},90923:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,a=/\d\d/,o=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,s={},i=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,a=s.meridiem;if(a){for(var o=1;o<=24;o+=1)if(e.indexOf(a(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},m={A:[r,function(e){this.afternoon=d(e,!1)}],a:[r,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[a,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,l("seconds")],ss:[o,l("seconds")],m:[o,l("minutes")],mm:[o,l("minutes")],H:[o,l("hours")],h:[o,l("hours")],HH:[o,l("hours")],hh:[o,l("hours")],D:[o,l("day")],DD:[a,l("day")],Do:[r,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var a=1;a<=31;a+=1)t(a).replace(/\[|\]/g,"")===e&&(this.day=a)}],w:[o,l("week")],ww:[a,l("week")],M:[o,l("month")],MM:[a,l("month")],MMM:[r,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[a,function(e){this.year=i(e)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function h(n){var a,o;a=n,o=s&&s.formats;for(var r=(n=a.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,a){var r=a&&a.toUpperCase();return n||o[a]||e[a]||o[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),i=r.length,l=0;l-1)return new Date(("X"===t?1e3:1)*e);var o=h(t)(e),r=o.year,s=o.month,i=o.day,l=o.hours,u=o.minutes,c=o.seconds,d=o.milliseconds,m=o.zone,p=o.week,f=new Date,y=i||(r||s?1:f.getDate()),v=r||f.getFullYear(),g=0;r&&!s||(g=s>0?s-1:f.getMonth());var b,w=l||0,D=u||0,x=c||0,A=d||0;return m?new Date(Date.UTC(v,g,y,w,D,x,A+60*m.offset*1e3)):n?new Date(Date.UTC(v,g,y,w,D,x,A)):(b=new Date(v,g,y,w,D,x,A),p&&(b=a(b).week(p).toDate()),b)}catch(e){return new Date("")}}(t,i,a,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),c&&t!=this.format(i)&&(this.$d=new Date("")),s={}}else if(i instanceof Array)for(var m=i.length,p=1;p<=m;p+=1){r[1]=i[p-1];var f=n.apply(this,r);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}p===m&&(this.$d=new Date(""))}else o.call(this,e)}}}()},95359:(e,t,n)=>{"use strict";n.d(t,{R:()=>w});var a=n(58168),o=n(4159),r=n.n(o),s=n(43540),i=n.n(s),l=n(90923),u=n.n(l),c=n(77588),d=n.n(c),m=n(87542),h=n.n(m),p=n(46081);r().extend(u()),r().extend(d()),r().extend(h());const f=(0,p.f)(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),y={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},v={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},g=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),b=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class w{constructor(){let{locale:e,formats:t,instance:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var o,s,l;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=y,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>"undefined"!==typeof r().utc,this.hasTimezonePlugin=()=>"undefined"!==typeof r().tz,this.isSame=(e,t,n)=>{const a=this.setTimezone(t,this.getTimezone(e));return e.format(n)===a.format(n)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return r().tz.guess();default:return e}},this.createSystemDate=e=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(e);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=r().tz.guess();return"UTC"!==t?r().tz(e,t):r()(e)}return r()(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(g);return r().utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(g);if(!this.hasTimezonePlugin())throw new Error(b);const n=void 0!==e&&!e.endsWith("Z");return r()(e).tz(this.cleanTimezone(t),n)},this.getLocaleFormats=()=>{const e=r().Ls;let t=e[this.locale||"en"];return void 0===t&&(f(),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){var n,a;const o=e.tz(this.cleanTimezone(t),!0);if((null!=(n=o.$offset)?n:0)===(null!=(a=e.$offset)?a:0))return e;e.$offset=o.$offset}return e},this.date=e=>null===e?null:this.dayjs(e),this.dateWithTimezone=(e,t)=>{if(null===e)return null;let n;return n="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?n:n.locale(this.locale)},this.getTimezone=e=>{if(this.hasTimezonePlugin()){var t;const n=null==(t=e.$x)?void 0:t.$timezone;if(n)return n}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(g);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(b)}return r().tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.dayjs(e),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,((e,n,a)=>{const o=a&&a.toUpperCase();return n||t[a]||t[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,((e,t,n)=>t||n.slice(1)))}))},this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.dayjs(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.getDiff=(e,t,n)=>e.diff(t,n),this.isEqual=(e,t)=>null===e&&null===t||this.dayjs(e).toDate().getTime()===this.dayjs(t).toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>ethis.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc(){let[n,a]=t;return e>=n&&e<=a},this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(e.startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(e.endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>this.addMonths(e,1),this.getPreviousMonth=e=>this.addMonths(e,-1),this.getMonthArray=e=>{const t=[e.startOf("year")];for(;t.length<12;){const e=t[t.length-1];t.push(this.addMonths(e,1))}return t},this.mergeDateAndTime=(e,t)=>e.hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>{const e=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map((t=>this.formatByString(this.addDays(e,t),"dd")))},this.getWeekArray=e=>{const t=this.setLocaleToValue(e),n=t.startOf("month").startOf("week"),a=t.endOf("month").endOf("week");let o=0,r=n;const s=[];for(;re.week(),this.getYearRange=(e,t)=>{const n=e.startOf("year"),a=t.endOf("year"),o=[];let r=n;for(;r"am"===e?"AM":"PM",this.rawDayJsInstance=n,this.dayjs=(s=null!=(o=this.rawDayJsInstance)?o:r(),(l=e)?function(){return s(...arguments).locale(l)}:s),this.locale=e,this.formats=(0,a.A)({},v,t),r().extend(i())}}}}]); \ No newline at end of file diff --git a/build/static/js/3176.69a86f42.chunk.js b/build/static/js/3176.340ee957.chunk.js similarity index 95% rename from build/static/js/3176.69a86f42.chunk.js rename to build/static/js/3176.340ee957.chunk.js index 9fc5ee6..6673539 100644 --- a/build/static/js/3176.69a86f42.chunk.js +++ b/build/static/js/3176.340ee957.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3176],{12045:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var s=i(42074),n=i(16243),r=i(60899),a=i(93230),c=i(16491),o=i(82053),d=i(82223);const h=i.p+"static/media/Error404.fe9de1c8a87d552fa643.png",l=i.p+"static/media/TwoCone.a296352ed5cf72a5f7a5.png";var m=i(44414);const x=function(){return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(r.Ay,{container:!0,spacing:10,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh",pt:1.5,pb:1,overflow:"hidden"},children:[(0,m.jsx)(r.Ay,{item:!0,xs:12,children:(0,m.jsxs)(a.A,{direction:"row",children:[(0,m.jsx)(r.Ay,{item:!0,children:(0,m.jsx)(c.A,{sx:{width:{xs:250,sm:590},height:{xs:130,sm:300}},children:(0,m.jsx)("img",{src:h,alt:"mantis",style:{width:"100%",height:"100%"}})})}),(0,m.jsx)(r.Ay,{item:!0,sx:{position:"relative"},children:(0,m.jsx)(c.A,{sx:{position:"absolute",top:60,left:-40,width:{xs:130,sm:390},height:{xs:115,sm:330}},children:(0,m.jsx)("img",{src:l,alt:"mantis",style:{width:"100%",height:"100%"}})})})]})}),(0,m.jsx)(r.Ay,{item:!0,xs:12,children:(0,m.jsxs)(a.A,{spacing:2,justifyContent:"center",alignItems:"center",children:[(0,m.jsx)(o.A,{variant:"h1",children:"Page Not Found"}),(0,m.jsx)(o.A,{color:"textSecondary",align:"center",sx:{width:{xs:"73%",sm:"61%"}},children:"The page you are looking was moved, removed, renamed, or might never exist!"}),(0,m.jsx)(d.A,{component:s.N_,to:n.qm,variant:"contained",children:"Back To Home"})]})})]})})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3176],{12045:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var s=i(42074),n=i(16243),r=i(60899),a=i(93230),c=i(16491),o=i(82053),d=i(10226);const h=i.p+"static/media/Error404.fe9de1c8a87d552fa643.png",l=i.p+"static/media/TwoCone.a296352ed5cf72a5f7a5.png";var m=i(44414);const x=function(){return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(r.Ay,{container:!0,spacing:10,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh",pt:1.5,pb:1,overflow:"hidden"},children:[(0,m.jsx)(r.Ay,{item:!0,xs:12,children:(0,m.jsxs)(a.A,{direction:"row",children:[(0,m.jsx)(r.Ay,{item:!0,children:(0,m.jsx)(c.A,{sx:{width:{xs:250,sm:590},height:{xs:130,sm:300}},children:(0,m.jsx)("img",{src:h,alt:"mantis",style:{width:"100%",height:"100%"}})})}),(0,m.jsx)(r.Ay,{item:!0,sx:{position:"relative"},children:(0,m.jsx)(c.A,{sx:{position:"absolute",top:60,left:-40,width:{xs:130,sm:390},height:{xs:115,sm:330}},children:(0,m.jsx)("img",{src:l,alt:"mantis",style:{width:"100%",height:"100%"}})})})]})}),(0,m.jsx)(r.Ay,{item:!0,xs:12,children:(0,m.jsxs)(a.A,{spacing:2,justifyContent:"center",alignItems:"center",children:[(0,m.jsx)(o.A,{variant:"h1",children:"Page Not Found"}),(0,m.jsx)(o.A,{color:"textSecondary",align:"center",sx:{width:{xs:"73%",sm:"61%"}},children:"The page you are looking was moved, removed, renamed, or might never exist!"}),(0,m.jsx)(d.A,{component:s.N_,to:n.qm,variant:"contained",children:"Back To Home"})]})})]})})}}}]); \ No newline at end of file diff --git a/build/static/js/3388.e9dd817e.chunk.js b/build/static/js/3388.e9dd817e.chunk.js deleted file mode 100644 index 4d8ccb4..0000000 --- a/build/static/js/3388.e9dd817e.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3388,6810],{2046:(t,e,n)=>{"use strict";n.d(e,{A:()=>x});var r=n(98587),i=n(58168),a=n(9950),o=n(72004),s=n(3484),c=n(89548),u=n(82053),l=n(15866),h=n(39766),d=n(59254),f=n(45558),v=n(1614);function m(t){return(0,v.Ay)("MuiInputAdornment",t)}const p=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g,A=n(18463),b=n(44414);const w=["children","className","component","disablePointerEvents","disableTypography","position","variant"],S=(0,d.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e["position".concat((0,c.A)(n.position))],!0===n.disablePointerEvents&&e.disablePointerEvents,e[n.variant]]}})((t=>{let{theme:e,ownerState:n}=t;return(0,i.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===n.variant&&{["&.".concat(p.positionStart,"&:not(.").concat(p.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),x=a.forwardRef((function(t,e){const n=(0,A.b)({props:t,name:"MuiInputAdornment"}),{children:d,className:f,component:v="div",disablePointerEvents:p=!1,disableTypography:x=!1,position:y,variant:k}=n,P=(0,r.A)(n,w),$=(0,h.A)()||{};let C=k;k&&$.variant,$&&!C&&(C=$.variant);const M=(0,i.A)({},n,{hiddenLabel:$.hiddenLabel,size:$.size,disablePointerEvents:p,position:y,variant:C}),R=(t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=t,u={root:["root",n&&"disablePointerEvents",i&&"position".concat((0,c.A)(i)),o,r&&"hiddenLabel",a&&"size".concat((0,c.A)(a))]};return(0,s.A)(u,m,e)})(M);return(0,b.jsx)(l.A.Provider,{value:null,children:(0,b.jsx)(S,(0,i.A)({as:v,ownerState:M,className:(0,o.A)(R.root,f),ref:e},P,{children:"string"!==typeof d||x?(0,b.jsxs)(a.Fragment,{children:["start"===y?g||(g=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,d]}):(0,b.jsx)(u.A,{color:"text.secondary",children:d})}))})}))},7762:(t,e,n)=>{"use strict";var r=n(24994);e.A=void 0;var i=r(n(79526)),a=n(44414);e.A=(0,i.default)((0,a.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},36150:(t,e,n)=>{"use strict";n.d(e,{I:()=>a});var r=n(69347),i=n(1729);function a(t,e){return(0,i.t)(t,r.$,e)}},36220:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,a){var o=i.prototype;a.utc=function(t){return new i({date:t,utc:!0,args:arguments})},o.utc=function(e){var n=a(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),s.call(this,t)};var c=o.init;o.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var u=o.utcOffset;o.utcOffset=function(r,i){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof r&&(r=function(t){void 0===t&&(t="");var r=t.match(e);if(!r)return null;var i=(""+r[0]).match(n)||["-",0,0],a=i[0],o=60*+i[1]+ +i[2];return 0===o?0:"+"===a?o:-o}(r),null===r))return this;var o=Math.abs(r)<=16?60*r:r,s=this;if(i)return s.$offset=o,s.$u=0===r,s;if(0!==r){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(o+c,t)).$offset=o,s.$x.$localOffset=c}else s=this.utc();return s};var l=o.format;o.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},o.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var h=o.toDate;o.toDate=function(t){return"s"===t&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var d=o.diff;o.diff=function(t,e,n){if(t&&this.$u===t.$u)return d.call(this,t,e,n);var r=this.local(),i=a(t).local();return d.call(r,i,e,n)}}}()},46639:(t,e,n)=>{"use strict";n.d(e,{A:()=>T});var r=n(57528),i=n(98587),a=n(58168),o=n(9950),s=n(72004),c=n(3484),u=n(88283),l=n(89548),h=n(18463),d=n(59254),f=n(45558),v=n(1614);function m(t){return(0,v.Ay)("MuiCircularProgress",t)}(0,f.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var p,g,A,b,w=n(44414);const S=["className","color","disableShrink","size","style","thickness","value","variant"];let x,y,k,P;const $=44,C=(0,u.i7)(x||(x=p||(p=(0,r.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),M=(0,u.i7)(y||(y=g||(g=(0,r.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),R=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e["color".concat((0,l.A)(n.color))]]}})((t=>{let{ownerState:e,theme:n}=t;return(0,a.A)({display:"inline-block"},"determinate"===e.variant&&{transition:n.transitions.create("transform")},"inherit"!==e.color&&{color:(n.vars||n).palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&(0,u.AH)(k||(k=A||(A=(0,r.A)(["\n animation: "," 1.4s linear infinite;\n "]))),C)})),D=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),O=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e["circle".concat((0,l.A)(n.variant))],n.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:n}=t;return(0,a.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&!e.disableShrink&&(0,u.AH)(P||(P=b||(b=(0,r.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),M)})),T=o.forwardRef((function(t,e){const n=(0,h.b)({props:t,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:u=!1,size:d=40,style:f,thickness:v=3.6,value:p=0,variant:g="indeterminate"}=n,A=(0,i.A)(n,S),b=(0,a.A)({},n,{color:o,disableShrink:u,size:d,thickness:v,value:p,variant:g}),x=(t=>{const{classes:e,variant:n,color:r,disableShrink:i}=t,a={root:["root",n,"color".concat((0,l.A)(r))],svg:["svg"],circle:["circle","circle".concat((0,l.A)(n)),i&&"circleDisableShrink"]};return(0,c.A)(a,m,e)})(b),y={},k={},P={};if("determinate"===g){const t=2*Math.PI*(($-v)/2);y.strokeDasharray=t.toFixed(3),P["aria-valuenow"]=Math.round(p),y.strokeDashoffset="".concat(((100-p)/100*t).toFixed(3),"px"),k.transform="rotate(-90deg)"}return(0,w.jsx)(R,(0,a.A)({className:(0,s.A)(x.root,r),style:(0,a.A)({width:d,height:d},k,f),ownerState:b,ref:e,role:"progressbar"},P,A,{children:(0,w.jsx)(D,{className:x.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat($," ").concat($),children:(0,w.jsx)(O,{className:x.circle,style:y,ownerState:b,cx:$,cy:$,r:($-v)/2,fill:"none",strokeWidth:v})})}))}))},52097:(t,e,n)=>{"use strict";n.d(e,{d7:()=>o});var r=n(9950);function i(t,e,n,i){var a=this,o=(0,r.useRef)(null),s=(0,r.useRef)(0),c=(0,r.useRef)(0),u=(0,r.useRef)(null),l=(0,r.useRef)([]),h=(0,r.useRef)(),d=(0,r.useRef)(),f=(0,r.useRef)(t),v=(0,r.useRef)(!0);f.current=t;var m="undefined"!=typeof window,p=!e&&0!==e&&m;if("function"!=typeof t)throw new TypeError("Expected a function");e=+e||0;var g=!!(n=n||{}).leading,A=!("trailing"in n)||!!n.trailing,b="maxWait"in n,w="debounceOnServer"in n&&!!n.debounceOnServer,S=b?Math.max(+n.maxWait||0,e):null;(0,r.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var x=(0,r.useMemo)((function(){var t=function(t){var e=l.current,n=h.current;return l.current=h.current=null,s.current=t,c.current=c.current||t,d.current=f.current.apply(n,e)},n=function(t,e){p&&cancelAnimationFrame(u.current),u.current=p?requestAnimationFrame(t):setTimeout(t,e)},r=function(t){if(!v.current)return!1;var n=t-o.current;return!o.current||n>=e||n<0||b&&t-s.current>=S},x=function(e){return u.current=null,A&&l.current?t(e):(l.current=h.current=null,d.current)},y=function t(){var i=Date.now();if(g&&c.current===s.current&&k(),r(i))return x(i);if(v.current){var a=e-(i-o.current),u=b?Math.min(a,S-(i-s.current)):a;n(t,u)}},k=function(){i&&i({})},P=function(){if(m||w){var i=Date.now(),c=r(i);if(l.current=[].slice.call(arguments),h.current=a,o.current=i,c){if(!u.current&&v.current)return s.current=o.current,n(y,e),g?t(o.current):d.current;if(b)return n(y,e),t(o.current)}return u.current||n(y,e),d.current}};return P.cancel=function(){u.current&&(p?cancelAnimationFrame(u.current):clearTimeout(u.current)),s.current=0,l.current=o.current=h.current=u.current=null},P.isPending=function(){return!!u.current},P.flush=function(){return u.current?x(Date.now()):d.current},P}),[g,b,e,S,A,p,m,w,i]);return x}function a(t,e){return t===e}function o(t,e,n){var o=n&&n.equalityFn||a,s=(0,r.useRef)(t),c=(0,r.useState)({})[1],u=i((0,r.useCallback)((function(t){s.current=t,c({})}),[c]),e,n,c),l=(0,r.useRef)(t);return o(l.current,t)||(u(t),l.current=t),[s.current,u]}},60010:(t,e,n)=>{"use strict";n.d(e,{q:()=>c});var r=n(89379),i=n(69347),a=n(45247),o=class extends i.${constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,e){super.setOptions((0,r.A)((0,r.A)({},t),{},{behavior:(0,a.PL)()}),e)}getOptimisticResult(t){return t.behavior=(0,a.PL)(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch((0,r.A)((0,r.A)({},t),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(t){return this.fetch((0,r.A)((0,r.A)({},t),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(t,e){var n,i;const{state:o}=t,s=super.createResult(t,e),{isFetching:c,isRefetching:u}=s,l=c&&"forward"===(null===(n=o.fetchMeta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction),h=c&&"backward"===(null===(i=o.fetchMeta)||void 0===i||null===(i=i.fetchMore)||void 0===i?void 0:i.direction);return(0,r.A)((0,r.A)({},s),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.rB)(e,o.data),hasPreviousPage:(0,a.RQ)(e,o.data),isFetchingNextPage:l,isFetchingPreviousPage:h,isRefetching:u&&!l&&!h})}},s=n(1729);function c(t,e){return(0,s.t)(t,o,e)}},82917:(t,e,n)=>{"use strict";n.d(e,{A:()=>O});var r=n(57528),i=n(98587),a=n(58168),o=n(9950),s=n(72004),c=n(88283),u=n(3484);function l(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function h(t){return parseFloat(t)}var d=n(97497),f=n(59254),v=n(18463),m=n(45558),p=n(1614);function g(t){return(0,p.Ay)("MuiSkeleton",t)}(0,m.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var A,b,w,S,x=n(44414);const y=["animation","className","component","height","style","variant","width"];let k,P,$,C;const M=(0,c.i7)(k||(k=A||(A=(0,r.A)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),R=(0,c.i7)(P||(P=b||(b=(0,r.A)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),D=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!1!==n.animation&&e[n.animation],n.hasChildren&&e.withChildren,n.hasChildren&&!n.width&&e.fitContent,n.hasChildren&&!n.height&&e.heightAuto]}})((t=>{let{theme:e,ownerState:n}=t;const r=l(e.shape.borderRadius)||"px",i=h(e.shape.borderRadius);return(0,a.A)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,d.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(i).concat(r,"/").concat(Math.round(i/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(e.vars||e).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})}),(t=>{let{ownerState:e}=t;return"pulse"===e.animation&&(0,c.AH)($||($=w||(w=(0,r.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),M)}),(t=>{let{ownerState:e,theme:n}=t;return"wave"===e.animation&&(0,c.AH)(C||(C=S||(S=(0,r.A)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),R,(n.vars||n).palette.action.hover)})),O=o.forwardRef((function(t,e){const n=(0,v.b)({props:t,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:c="span",height:l,style:h,variant:d="text",width:f}=n,m=(0,i.A)(n,y),p=(0,a.A)({},n,{animation:r,component:c,variant:d,hasChildren:Boolean(m.children)}),A=(t=>{const{classes:e,variant:n,animation:r,hasChildren:i,width:a,height:o}=t,s={root:["root",n,r,i&&"withChildren",i&&!a&&"fitContent",i&&!o&&"heightAuto"]};return(0,u.A)(s,g,e)})(p);return(0,x.jsx)(D,(0,a.A)({as:c,ref:e,className:(0,s.A)(A.root,o),ownerState:p},m,{style:(0,a.A)({width:f,height:l},h)}))}))},97125:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(23235),i=n(44414);const a=(0,r.A)((0,i.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined")}}]); \ No newline at end of file diff --git a/build/static/js/3723.8624a149.chunk.js b/build/static/js/3723.01b1774f.chunk.js similarity index 99% rename from build/static/js/3723.8624a149.chunk.js rename to build/static/js/3723.01b1774f.chunk.js index 57bae86..f36d14a 100644 --- a/build/static/js/3723.8624a149.chunk.js +++ b/build/static/js/3723.01b1774f.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3723],{855:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7208),a=n(76475),o=n(44414);function i(e){var t,n;let i,s,{children:l,type:c="scale",direction:u="right",offset:d=10,scale:p={hover:1.05,tap:.95}}=e;switch(u){case"up":case"left":i=d,s=0;break;default:i=0,s=d}const[f,h]=(0,r.Y)(i,s),[v,g]=(0,r.Y)(i,s);switch(c){case"rotate":return(0,o.jsx)(a.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:l});case"slide":return"up"===u||"down"===u?(0,o.jsx)(a.P.div,{animate:{y:void 0!==v?v:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:l}):(0,o.jsx)(a.P.div,{animate:{x:void 0!==f?f:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:l});default:return"number"===typeof p&&(p={hover:p,tap:p}),(0,o.jsx)(a.P.div,{whileHover:{scale:null===(t=p)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=p)||void 0===n?void 0:n.tap},children:l})}}},2046:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(82053),u=n(15866),d=n(39766),p=n(59254),f=n(45558),h=n(1614);function v(e){return(0,h.Ay)("MuiInputAdornment",e)}const g=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var y,m=n(18463),b=n(44414);const A=["children","className","component","disablePointerEvents","disableTypography","position","variant"],x=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,l.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(g.positionStart,"&:not(.").concat(g.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),j=o.forwardRef((function(e,t){const n=(0,m.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:f,component:h="div",disablePointerEvents:g=!1,disableTypography:j=!1,position:S,variant:w}=n,C=(0,r.A)(n,A),k=(0,d.A)()||{};let O=w;w&&k.variant,k&&!O&&(O=k.variant);const I=(0,a.A)({},n,{hiddenLabel:k.hiddenLabel,size:k.size,disablePointerEvents:g,position:S,variant:O}),D=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:a,size:o,variant:i}=e,c={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,l.A)(a)),i,r&&"hiddenLabel",o&&"size".concat((0,l.A)(o))]};return(0,s.A)(c,v,t)})(I);return(0,b.jsx)(u.A.Provider,{value:null,children:(0,b.jsx)(x,(0,a.A)({as:h,ownerState:I,className:(0,i.A)(D.root,f),ref:t},C,{children:"string"!==typeof p||j?(0,b.jsxs)(o.Fragment,{children:["start"===S?y||(y=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,b.jsx)(c.A,{color:"text.secondary",children:p})}))})}))},8457:e=>{e.exports="data:image/png;base64,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"},20466:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(8881);const a=(e,t,n)=>(0,r.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||2e3})},21862:(e,t,n)=>{var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==y(e)&&"function"!==typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(9950)),a=["placeholder","separator","isLastChild","ariaLabelOverride","shouldRender","inputStyle","focus","isDisabled","hasErrored","errorStyle","isSuccessed","successStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure","onSubmit"];function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n0&&console.error("Length of the placeholder should be equal to the number of inputs.")}})),g(h(e),"handleOtpChange",(function(t){(0,e.props.onChange)(t.join(""))})),g(h(e),"isInputValueValid",(function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"===typeof t)&&1===t.trim().length})),g(h(e),"focusInput",(function(t){var n=e.props.numInputs,r=Math.max(Math.min(n-1,t),0);e.setState({activeInput:r})})),g(h(e),"focusNextInput",(function(){var t=e.state.activeInput;e.focusInput(t+1)})),g(h(e),"focusPrevInput",(function(){var t=e.state.activeInput;e.focusInput(t-1)})),g(h(e),"changeCodeAtFocus",(function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)})),g(h(e),"handleOnPaste",(function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,a=r.numInputs;if(!r.isDisabled){for(var o=e.getOtpValue(),i=n,s=t.clipboardData.getData("text/plain"),l=(e.props.isInputNum?s.replace(/\D/g,""):s).slice(0,a-n).split(""),c=0;c=n&&l.length>0&&(o[c]=l.shift(),i++);e.setState({activeInput:i},(function(){e.focusInput(i),e.handleOtpChange(o)}))}})),g(h(e),"handleOnChange",(function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)})),g(h(e),"handleOnKeyDown",(function(t){8===t.keyCode||"Backspace"===t.key?(t.preventDefault(),e.changeCodeAtFocus(""),e.focusInput(e.state.activeInput-1)):46===t.keyCode||"Delete"===t.key?(t.preventDefault(),e.changeCodeAtFocus("")):37===t.keyCode||"ArrowLeft"===t.key?(t.preventDefault(),e.focusPrevInput()):39===t.keyCode||"ArrowRight"===t.key?(t.preventDefault(),e.focusNextInput()):32===t.keyCode||" "===t.key||"Spacebar"===t.key||"Space"===t.key?t.preventDefault():13!==t.keyCode&&"Enter"!==t.key||e.props.onSubmit()})),g(h(e),"handleOnInput",(function(t){var n=t.target.value;if(t.target.value)if(t.target.value&&t.target.value.length>1){t.preventDefault();for(var r=e.props.numInputs,a=e.state.activeInput,o=e.getOtpValue(),i=t.target.value.slice(0,r-a).split(""),s=0;s=a&&i.length>0&&(o[s]=i.shift());e.handleOtpChange(o),e.focusInput(e.props.numInputs)}else if(n&&n.trim().length>1)t.clipboardData={getData:function(){return n.trim()}},e.handleOnPaste(t);else if(e.isInputValueValid(t.target.value))e.focusNextInput();else if(!e.props.isInputNum){var l=t.nativeEvent;null===l.data&&"deleteContentBackward"===l.inputType&&(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput())}})),g(h(e),"renderInputs",(function(){for(var t=e.state.activeInput,n=e.props,a=n.id,o=n.autoComplete,s=n.numInputs,l=n.inputStyle,c=n.focusStyle,u=n.separator,d=n.separateAfter,p=void 0===d?1:d,f=n.isDisabled,h=n.disabledStyle,v=n.hasErrored,g=n.errorStyle,y=n.isSuccessed,m=n.successStyle,A=n.shouldAutoFocus,x=n.isInputNum,j=n.isInputSecure,S=n.className,w=n.inputProps,C=n.onSubmit,k=[],O=e.getOtpValue(),I=e.getPlaceholderValue(),D=e.props["data-cy"],N=e.props["data-testid"],E=e.props["custom-test-attr"],P=e.props["custom-test-id"],M=function(n){var d=void 0;d=(n+1)%parseInt(p)===0;var M={};E&&(M[E]=P&&"".concat(P,"-").concat(n));var F={};w&&(Array.isArray(w)?w[n]&&(F=w[n]):F=w),k.push(r.default.createElement(b,i({id:a&&"".concat(a,"-").concat(n),autoComplete:null!==o&&void 0!==o?o:"off",placeholder:I&&I[n],key:n,index:n,focus:t===n,value:O&&O[n],onChange:e.handleOnChange,onKeyDown:e.handleOnKeyDown,onInput:e.handleOnInput,onPaste:e.handleOnPaste,onFocus:function(t){e.setState({activeInput:n}),t.target.select()},onBlur:function(){return e.setState({activeInput:-1})},separator:u,inputStyle:l,focusStyle:c,isLastChild:n===s-1,isDisabled:f,disabledStyle:h,hasErrored:v,errorStyle:g,isSuccessed:y,successStyle:m,shouldAutoFocus:A,isInputNum:x,isInputSecure:j,className:S,"data-cy":D&&"".concat(D,"-").concat(n),"data-testid":N&&"".concat(N,"-").concat(n),shouldRender:d,onSubmit:C},F,M)))},F=0;F0&&this.setState({activeInput:0})}},{key:"render",value:function(){var e=this.props.containerStyle;return r.default.createElement("div",{style:Object.assign({display:"flex"},m(e)&&e),className:m(e)?"":e},this.renderInputs())}}]),n}(r.Component);g(A,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1,onSubmit:function(e){return console.log(e)}})},23723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var r=n(9950),a=n(8881),o=n(855),i=(n(21862),n(16491)),s=n(82053),l=n(93230),c=n(48089),u=n(50704),d=n(29925),p=n(2046),f=n(25333),h=n(29277),v=n(36080),g=n(82223),y=n(14857),m=n(26910),b=n(28429),A=n(52351),x=n(8457),j=n(82569),S=n(20466),w=(n(45669),n(62375)),C=n(62462),k=n(68889),O=n(44414);const I=()=>{const e=(0,j.wA)(),t=(0,j.d4)((e=>e.fcm)),n=((0,j.d4)((e=>e.fcm.permission)),(0,y.A)()),[I,D]=(0,r.useState)(!1);let N=(0,b.Zp)();const[E,P]=(0,r.useState)(""),[M,F]=(0,r.useState)(""),[Y,T]=(0,r.useState)({}),[R,V]=(0,r.useState)(""),[z,L]=(0,r.useState)(0),[B,U]=(0,r.useState)(""),[q,J]=(0,r.useState)(""),[Q,W]=(0,r.useState)(!1),[H,G]=(0,r.useState)(!1),[K,Z]=(0,r.useState)(!1),[X,_]=(0,r.useState)(0);(0,r.useEffect)((()=>{localStorage.getItem("firstname")&&N("/nearle/dispatch")}),[]);const $=async()=>{if(D(!0),!R)return ee("Fill All required fields"),void D(!1);try{const n=await m.A.post("https://jupiter.nearle.app/live/api/v1/users/console/login",{authname:R,configid:9,userfcmtoken:null===t||void 0===t?void 0:t.token,password:B});if(409!=n.data.code||n.data.status)if(403==n.data.code)(0,S.k)(n.data.message,"warning",3e3);else if(409==n.data.code&&n.data.status)L(1),_(n.data.details.userid),(0,S.k)("User Found","success",3e3),(0,S.k)(n.data.message,"success",3e3);else if(401!=n.data.code||n.data.status)if(401==n.data.code&&n.data.status)(0,S.k)(n.data.message,"success",3e3),te(n.data.userid),L(2);else if(200==n.data.code&&n.data.status){(0,S.k)(n.data.message,"success",1e3),T(n.data.details);const t=n.data.details;e((0,k.FN)(t)),localStorage.setItem("firstname",t.firstname),localStorage.setItem("authname",t.authname),localStorage.setItem("roleid",t.roleid),localStorage.setItem("tenantid",t.tenantid),localStorage.setItem("partnerid",t.partnerid),localStorage.setItem("applocationid",t.applocationid),localStorage.setItem("userid",t.userid),localStorage.setItem("userfcmtoken",t.userfcmtoken),te(t.userid),N("/nearle/dispatch")}else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3)}catch(n){console.error(n),(0,S.k)(n.message,"error",5e3)}finally{D(!1)}},ee=e=>{(0,a.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1500})},te=async e=>{const t=[...(await m.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e))).data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(t))};return(0,O.jsxs)(i.A,{sx:{minHeight:"100vh",display:"flex",bgcolor:"#f8fafc"},children:[I&&(0,O.jsx)(A.A,{}),(0,O.jsxs)(i.A,{sx:{display:{xs:"none",md:"flex"},position:"relative",overflow:"hidden",flexBasis:"46%",flexDirection:"column",justifyContent:"space-between",color:"#fff",p:6,background:"linear-gradient(150deg, #4D1C61 0%, #662582 52%, #9255AB 100%)"},children:[(0,O.jsx)(i.A,{sx:{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"absolute",bottom:-150,left:-110,width:440,height:440,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"relative"},children:(0,O.jsx)(i.A,{sx:{bgcolor:"#fff",borderRadius:2,px:1.5,py:.75,display:"inline-flex",boxShadow:"0 8px 20px rgba(0,0,0,0.18)"},children:(0,O.jsx)("img",{src:x,alt:"NearlExpress",style:{height:30,display:"block"}})})}),(0,O.jsxs)(i.A,{sx:{position:"relative"},children:[(0,O.jsxs)(s.A,{sx:{fontSize:34,fontWeight:700,lineHeight:1.18,letterSpacing:"-0.02em",mb:2},children:["Operate your dispatch,",(0,O.jsx)("br",{}),"end to end."]}),(0,O.jsx)(s.A,{sx:{fontSize:16,color:"rgba(255,255,255,0.82)",maxWidth:430,lineHeight:1.6},children:"Orders, AI route optimisation, live rider tracking and billing \u2014 all in the NearlExpress operator console."})]}),(0,O.jsx)(l.A,{spacing:1.25,sx:{position:"relative"},children:["Real-time fleet visibility","AI-optimised dispatch routes","Tenant, pricing & invoice control"].map((e=>(0,O.jsxs)(l.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,O.jsx)(i.A,{sx:{width:22,height:22,borderRadius:"50%",bgcolor:"rgba(255,255,255,0.18)",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700},children:"\u2713"}),(0,O.jsx)(s.A,{sx:{fontSize:14.5,color:"rgba(255,255,255,0.9)"},children:e})]},e)))})]}),(0,O.jsx)(i.A,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",p:{xs:2.5,sm:4}},children:(0,O.jsxs)(i.A,{sx:{width:"100%",maxWidth:420},children:[(0,O.jsxs)(c.A,{sx:{width:"100%",borderRadius:3,border:"1px solid ".concat(n.palette.divider),boxShadow:"0 14px 40px rgba(15, 23, 42, 0.10)",p:{xs:2.5,sm:4}},children:[(0,O.jsx)(l.A,{alignItems:"center",mb:2.5,children:(0,O.jsx)("img",{src:x,alt:"loginpagelogo",style:{maxHeight:48}})}),(0,O.jsx)(s.A,{variant:"h3",textAlign:"center",sx:{fontWeight:700,mb:.5},children:"Welcome back"}),(0,O.jsx)(s.A,{variant:"body2",textAlign:"center",sx:{color:"#64748b",mb:3},children:"Sign in to the NearlExpress console"}),(0,O.jsx)(u.A,{sx:{p:0},children:(0,O.jsx)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),0==z?$():1==z?B&&q&&B==q?(async()=>{const e=await m.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/users/update"),{userid:X,password:B});e.data.status&&((0,S.k)(e.data.message,"success",3e3),(0,S.k)("Enter Password to Login","success",3e3),L(2),U(""))})():(0,S.k)("Check Password","warning",3e3):2==z&&(B||(0,S.k)("Invalid Password","warning",3e3),$())},children:(0,O.jsxs)(l.A,{spacing:3,children:[(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"E-mail Address",variant:"outlined",autoComplete:"email",required:!0,value:R,onChange:e=>V(e.target.value.toLocaleLowerCase()),InputProps:{readOnly:z}}),1==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Setup Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter New Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}}),(0,O.jsx)(d.A,{error:""!==q&&B!==q,fullWidth:!0,label:"Re-Enter Password",variant:"outlined",required:!0,type:K?"text":"password",value:q,onChange:e=>J(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>Z((e=>!e)),edge:"end",children:K?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),2==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Enter Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),Q&&(0,O.jsxs)(l.A,{spacing:1.5,children:[(0,O.jsxs)(l.A,{direction:"row",justifyContent:"space-between",children:[(0,O.jsx)(h.A,{children:"Enter Password"}),(0,O.jsx)(v.A,{variant:"body2",sx:{cursor:"pointer"},onClick:()=>{P(""),$()},children:"Retry"})]}),(0,O.jsx)(d.A,{type:"passowrd",value:B,onChange:e=>U(e.target.value)})]}),(0,O.jsx)(o.A,{children:(0,O.jsx)(g.A,{fullWidth:!0,size:"large",type:"submit",variant:"contained",color:"primary",children:"Continue"})})]})})})]}),(0,O.jsxs)(l.A,{direction:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",useFlexGap:!0,spacing:2,sx:{mt:3},children:[(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"\xa9 All rights reserved"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/terms",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Terms and Conditions"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/privacy",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Privacy Policy"})]})]})})]})}},36080:(e,t,n)=>{n.d(t,{A:()=>C});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(59254),u=n(18463),d=n(52695),p=n(31506),f=n(82053),h=n(45558),v=n(1614);function g(e){return(0,v.Ay)("MuiLink",e)}const y=(0,h.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var m=n(12703),b=n(99269);const A={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>{let{theme:t,ownerState:n}=e;const r=(e=>A[e]||e)(n.color),a=(0,m.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,m.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,b.X4)(a,.4)};var j=n(44414);const S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],w=(0,c.Ay)(f.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,l.A)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,a.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:x({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(y.focusVisible)]:{outline:"auto"}})})),C=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:h="a",onBlur:v,onFocus:y,TypographyClasses:m,underline:b="always",variant:x="inherit",sx:C}=n,k=(0,r.A)(n,S),{isFocusVisibleRef:O,onBlur:I,onFocus:D,ref:N}=(0,d.A)(),[E,P]=o.useState(!1),M=(0,p.A)(t,N),F=(0,a.A)({},n,{color:f,component:h,focusVisible:E,underline:b,variant:x}),Y=(e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,o={root:["root","underline".concat((0,l.A)(a)),"button"===n&&"button",r&&"focusVisible"]};return(0,s.A)(o,g,t)})(F);return(0,j.jsx)(w,(0,a.A)({color:f,className:(0,i.A)(Y.root,c),classes:m,component:h,onBlur:e=>{I(e),!1===O.current&&P(!1),v&&v(e)},onFocus:e=>{D(e),!0===O.current&&P(!0),y&&y(e)},ref:M,ownerState:F,variant:x,sx:[...Object.keys(A).includes(f)?[]:[{color:f}],...Array.isArray(C)?C:[C]]},k))}))},62375:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.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")},62462:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3723],{855:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7208),a=n(76475),o=n(44414);function i(e){var t,n;let i,s,{children:l,type:c="scale",direction:u="right",offset:d=10,scale:p={hover:1.05,tap:.95}}=e;switch(u){case"up":case"left":i=d,s=0;break;default:i=0,s=d}const[f,h]=(0,r.Y)(i,s),[v,g]=(0,r.Y)(i,s);switch(c){case"rotate":return(0,o.jsx)(a.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:l});case"slide":return"up"===u||"down"===u?(0,o.jsx)(a.P.div,{animate:{y:void 0!==v?v:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:l}):(0,o.jsx)(a.P.div,{animate:{x:void 0!==f?f:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:l});default:return"number"===typeof p&&(p={hover:p,tap:p}),(0,o.jsx)(a.P.div,{whileHover:{scale:null===(t=p)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=p)||void 0===n?void 0:n.tap},children:l})}}},2046:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(82053),u=n(15866),d=n(39766),p=n(59254),f=n(45558),h=n(1614);function v(e){return(0,h.Ay)("MuiInputAdornment",e)}const g=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var y,m=n(18463),b=n(44414);const A=["children","className","component","disablePointerEvents","disableTypography","position","variant"],x=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,l.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(g.positionStart,"&:not(.").concat(g.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),j=o.forwardRef((function(e,t){const n=(0,m.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:f,component:h="div",disablePointerEvents:g=!1,disableTypography:j=!1,position:S,variant:w}=n,C=(0,r.A)(n,A),k=(0,d.A)()||{};let O=w;w&&k.variant,k&&!O&&(O=k.variant);const I=(0,a.A)({},n,{hiddenLabel:k.hiddenLabel,size:k.size,disablePointerEvents:g,position:S,variant:O}),D=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:a,size:o,variant:i}=e,c={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,l.A)(a)),i,r&&"hiddenLabel",o&&"size".concat((0,l.A)(o))]};return(0,s.A)(c,v,t)})(I);return(0,b.jsx)(u.A.Provider,{value:null,children:(0,b.jsx)(x,(0,a.A)({as:h,ownerState:I,className:(0,i.A)(D.root,f),ref:t},C,{children:"string"!==typeof p||j?(0,b.jsxs)(o.Fragment,{children:["start"===S?y||(y=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,b.jsx)(c.A,{color:"text.secondary",children:p})}))})}))},8457:e=>{e.exports="data:image/png;base64,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"},20466:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(8881);const a=(e,t,n)=>(0,r.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||2e3})},21862:(e,t,n)=>{var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==y(e)&&"function"!==typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(9950)),a=["placeholder","separator","isLastChild","ariaLabelOverride","shouldRender","inputStyle","focus","isDisabled","hasErrored","errorStyle","isSuccessed","successStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure","onSubmit"];function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n0&&console.error("Length of the placeholder should be equal to the number of inputs.")}})),g(h(e),"handleOtpChange",(function(t){(0,e.props.onChange)(t.join(""))})),g(h(e),"isInputValueValid",(function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"===typeof t)&&1===t.trim().length})),g(h(e),"focusInput",(function(t){var n=e.props.numInputs,r=Math.max(Math.min(n-1,t),0);e.setState({activeInput:r})})),g(h(e),"focusNextInput",(function(){var t=e.state.activeInput;e.focusInput(t+1)})),g(h(e),"focusPrevInput",(function(){var t=e.state.activeInput;e.focusInput(t-1)})),g(h(e),"changeCodeAtFocus",(function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)})),g(h(e),"handleOnPaste",(function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,a=r.numInputs;if(!r.isDisabled){for(var o=e.getOtpValue(),i=n,s=t.clipboardData.getData("text/plain"),l=(e.props.isInputNum?s.replace(/\D/g,""):s).slice(0,a-n).split(""),c=0;c=n&&l.length>0&&(o[c]=l.shift(),i++);e.setState({activeInput:i},(function(){e.focusInput(i),e.handleOtpChange(o)}))}})),g(h(e),"handleOnChange",(function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)})),g(h(e),"handleOnKeyDown",(function(t){8===t.keyCode||"Backspace"===t.key?(t.preventDefault(),e.changeCodeAtFocus(""),e.focusInput(e.state.activeInput-1)):46===t.keyCode||"Delete"===t.key?(t.preventDefault(),e.changeCodeAtFocus("")):37===t.keyCode||"ArrowLeft"===t.key?(t.preventDefault(),e.focusPrevInput()):39===t.keyCode||"ArrowRight"===t.key?(t.preventDefault(),e.focusNextInput()):32===t.keyCode||" "===t.key||"Spacebar"===t.key||"Space"===t.key?t.preventDefault():13!==t.keyCode&&"Enter"!==t.key||e.props.onSubmit()})),g(h(e),"handleOnInput",(function(t){var n=t.target.value;if(t.target.value)if(t.target.value&&t.target.value.length>1){t.preventDefault();for(var r=e.props.numInputs,a=e.state.activeInput,o=e.getOtpValue(),i=t.target.value.slice(0,r-a).split(""),s=0;s=a&&i.length>0&&(o[s]=i.shift());e.handleOtpChange(o),e.focusInput(e.props.numInputs)}else if(n&&n.trim().length>1)t.clipboardData={getData:function(){return n.trim()}},e.handleOnPaste(t);else if(e.isInputValueValid(t.target.value))e.focusNextInput();else if(!e.props.isInputNum){var l=t.nativeEvent;null===l.data&&"deleteContentBackward"===l.inputType&&(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput())}})),g(h(e),"renderInputs",(function(){for(var t=e.state.activeInput,n=e.props,a=n.id,o=n.autoComplete,s=n.numInputs,l=n.inputStyle,c=n.focusStyle,u=n.separator,d=n.separateAfter,p=void 0===d?1:d,f=n.isDisabled,h=n.disabledStyle,v=n.hasErrored,g=n.errorStyle,y=n.isSuccessed,m=n.successStyle,A=n.shouldAutoFocus,x=n.isInputNum,j=n.isInputSecure,S=n.className,w=n.inputProps,C=n.onSubmit,k=[],O=e.getOtpValue(),I=e.getPlaceholderValue(),D=e.props["data-cy"],N=e.props["data-testid"],E=e.props["custom-test-attr"],P=e.props["custom-test-id"],M=function(n){var d=void 0;d=(n+1)%parseInt(p)===0;var M={};E&&(M[E]=P&&"".concat(P,"-").concat(n));var F={};w&&(Array.isArray(w)?w[n]&&(F=w[n]):F=w),k.push(r.default.createElement(b,i({id:a&&"".concat(a,"-").concat(n),autoComplete:null!==o&&void 0!==o?o:"off",placeholder:I&&I[n],key:n,index:n,focus:t===n,value:O&&O[n],onChange:e.handleOnChange,onKeyDown:e.handleOnKeyDown,onInput:e.handleOnInput,onPaste:e.handleOnPaste,onFocus:function(t){e.setState({activeInput:n}),t.target.select()},onBlur:function(){return e.setState({activeInput:-1})},separator:u,inputStyle:l,focusStyle:c,isLastChild:n===s-1,isDisabled:f,disabledStyle:h,hasErrored:v,errorStyle:g,isSuccessed:y,successStyle:m,shouldAutoFocus:A,isInputNum:x,isInputSecure:j,className:S,"data-cy":D&&"".concat(D,"-").concat(n),"data-testid":N&&"".concat(N,"-").concat(n),shouldRender:d,onSubmit:C},F,M)))},F=0;F0&&this.setState({activeInput:0})}},{key:"render",value:function(){var e=this.props.containerStyle;return r.default.createElement("div",{style:Object.assign({display:"flex"},m(e)&&e),className:m(e)?"":e},this.renderInputs())}}]),n}(r.Component);g(A,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1,onSubmit:function(e){return console.log(e)}})},23723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var r=n(9950),a=n(8881),o=n(855),i=(n(21862),n(16491)),s=n(82053),l=n(93230),c=n(48089),u=n(50704),d=n(29925),p=n(2046),f=n(25333),h=n(29277),v=n(36080),g=n(10226),y=n(14857),m=n(26910),b=n(28429),A=n(52351),x=n(8457),j=n(82569),S=n(20466),w=(n(45669),n(62375)),C=n(62462),k=n(68889),O=n(44414);const I=()=>{const e=(0,j.wA)(),t=(0,j.d4)((e=>e.fcm)),n=((0,j.d4)((e=>e.fcm.permission)),(0,y.A)()),[I,D]=(0,r.useState)(!1);let N=(0,b.Zp)();const[E,P]=(0,r.useState)(""),[M,F]=(0,r.useState)(""),[Y,T]=(0,r.useState)({}),[R,V]=(0,r.useState)(""),[z,L]=(0,r.useState)(0),[B,U]=(0,r.useState)(""),[q,J]=(0,r.useState)(""),[Q,W]=(0,r.useState)(!1),[H,G]=(0,r.useState)(!1),[K,Z]=(0,r.useState)(!1),[X,_]=(0,r.useState)(0);(0,r.useEffect)((()=>{localStorage.getItem("firstname")&&N("/nearle/dispatch")}),[]);const $=async()=>{if(D(!0),!R)return ee("Fill All required fields"),void D(!1);try{const n=await m.A.post("https://jupiter.nearle.app/live/api/v1/users/console/login",{authname:R,configid:9,userfcmtoken:null===t||void 0===t?void 0:t.token,password:B});if(409!=n.data.code||n.data.status)if(403==n.data.code)(0,S.k)(n.data.message,"warning",3e3);else if(409==n.data.code&&n.data.status)L(1),_(n.data.details.userid),(0,S.k)("User Found","success",3e3),(0,S.k)(n.data.message,"success",3e3);else if(401!=n.data.code||n.data.status)if(401==n.data.code&&n.data.status)(0,S.k)(n.data.message,"success",3e3),te(n.data.userid),L(2);else if(200==n.data.code&&n.data.status){(0,S.k)(n.data.message,"success",1e3),T(n.data.details);const t=n.data.details;e((0,k.FN)(t)),localStorage.setItem("firstname",t.firstname),localStorage.setItem("authname",t.authname),localStorage.setItem("roleid",t.roleid),localStorage.setItem("tenantid",t.tenantid),localStorage.setItem("partnerid",t.partnerid),localStorage.setItem("applocationid",t.applocationid),localStorage.setItem("userid",t.userid),localStorage.setItem("userfcmtoken",t.userfcmtoken),te(t.userid),N("/nearle/dispatch")}else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3)}catch(n){console.error(n),(0,S.k)(n.message,"error",5e3)}finally{D(!1)}},ee=e=>{(0,a.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1500})},te=async e=>{const t=[...(await m.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e))).data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(t))};return(0,O.jsxs)(i.A,{sx:{minHeight:"100vh",display:"flex",bgcolor:"#f8fafc"},children:[I&&(0,O.jsx)(A.A,{}),(0,O.jsxs)(i.A,{sx:{display:{xs:"none",md:"flex"},position:"relative",overflow:"hidden",flexBasis:"46%",flexDirection:"column",justifyContent:"space-between",color:"#fff",p:6,background:"linear-gradient(150deg, #4D1C61 0%, #662582 52%, #9255AB 100%)"},children:[(0,O.jsx)(i.A,{sx:{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"absolute",bottom:-150,left:-110,width:440,height:440,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"relative"},children:(0,O.jsx)(i.A,{sx:{bgcolor:"#fff",borderRadius:2,px:1.5,py:.75,display:"inline-flex",boxShadow:"0 8px 20px rgba(0,0,0,0.18)"},children:(0,O.jsx)("img",{src:x,alt:"NearlExpress",style:{height:30,display:"block"}})})}),(0,O.jsxs)(i.A,{sx:{position:"relative"},children:[(0,O.jsxs)(s.A,{sx:{fontSize:34,fontWeight:700,lineHeight:1.18,letterSpacing:"-0.02em",mb:2},children:["Operate your dispatch,",(0,O.jsx)("br",{}),"end to end."]}),(0,O.jsx)(s.A,{sx:{fontSize:16,color:"rgba(255,255,255,0.82)",maxWidth:430,lineHeight:1.6},children:"Orders, AI route optimisation, live rider tracking and billing \u2014 all in the NearlExpress operator console."})]}),(0,O.jsx)(l.A,{spacing:1.25,sx:{position:"relative"},children:["Real-time fleet visibility","AI-optimised dispatch routes","Tenant, pricing & invoice control"].map((e=>(0,O.jsxs)(l.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,O.jsx)(i.A,{sx:{width:22,height:22,borderRadius:"50%",bgcolor:"rgba(255,255,255,0.18)",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700},children:"\u2713"}),(0,O.jsx)(s.A,{sx:{fontSize:14.5,color:"rgba(255,255,255,0.9)"},children:e})]},e)))})]}),(0,O.jsx)(i.A,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",p:{xs:2.5,sm:4}},children:(0,O.jsxs)(i.A,{sx:{width:"100%",maxWidth:420},children:[(0,O.jsxs)(c.A,{sx:{width:"100%",borderRadius:3,border:"1px solid ".concat(n.palette.divider),boxShadow:"0 14px 40px rgba(15, 23, 42, 0.10)",p:{xs:2.5,sm:4}},children:[(0,O.jsx)(l.A,{alignItems:"center",mb:2.5,children:(0,O.jsx)("img",{src:x,alt:"loginpagelogo",style:{maxHeight:48}})}),(0,O.jsx)(s.A,{variant:"h3",textAlign:"center",sx:{fontWeight:700,mb:.5},children:"Welcome back"}),(0,O.jsx)(s.A,{variant:"body2",textAlign:"center",sx:{color:"#64748b",mb:3},children:"Sign in to the NearlExpress console"}),(0,O.jsx)(u.A,{sx:{p:0},children:(0,O.jsx)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),0==z?$():1==z?B&&q&&B==q?(async()=>{const e=await m.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/users/update"),{userid:X,password:B});e.data.status&&((0,S.k)(e.data.message,"success",3e3),(0,S.k)("Enter Password to Login","success",3e3),L(2),U(""))})():(0,S.k)("Check Password","warning",3e3):2==z&&(B||(0,S.k)("Invalid Password","warning",3e3),$())},children:(0,O.jsxs)(l.A,{spacing:3,children:[(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"E-mail Address",variant:"outlined",autoComplete:"email",required:!0,value:R,onChange:e=>V(e.target.value.toLocaleLowerCase()),InputProps:{readOnly:z}}),1==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Setup Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter New Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}}),(0,O.jsx)(d.A,{error:""!==q&&B!==q,fullWidth:!0,label:"Re-Enter Password",variant:"outlined",required:!0,type:K?"text":"password",value:q,onChange:e=>J(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>Z((e=>!e)),edge:"end",children:K?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),2==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Enter Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),Q&&(0,O.jsxs)(l.A,{spacing:1.5,children:[(0,O.jsxs)(l.A,{direction:"row",justifyContent:"space-between",children:[(0,O.jsx)(h.A,{children:"Enter Password"}),(0,O.jsx)(v.A,{variant:"body2",sx:{cursor:"pointer"},onClick:()=>{P(""),$()},children:"Retry"})]}),(0,O.jsx)(d.A,{type:"passowrd",value:B,onChange:e=>U(e.target.value)})]}),(0,O.jsx)(o.A,{children:(0,O.jsx)(g.A,{fullWidth:!0,size:"large",type:"submit",variant:"contained",color:"primary",children:"Continue"})})]})})})]}),(0,O.jsxs)(l.A,{direction:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",useFlexGap:!0,spacing:2,sx:{mt:3},children:[(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"\xa9 All rights reserved"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/terms",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Terms and Conditions"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/privacy",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Privacy Policy"})]})]})})]})}},36080:(e,t,n)=>{n.d(t,{A:()=>C});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(59254),u=n(18463),d=n(52695),p=n(31506),f=n(82053),h=n(45558),v=n(1614);function g(e){return(0,v.Ay)("MuiLink",e)}const y=(0,h.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var m=n(12703),b=n(99269);const A={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>{let{theme:t,ownerState:n}=e;const r=(e=>A[e]||e)(n.color),a=(0,m.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,m.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,b.X4)(a,.4)};var j=n(44414);const S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],w=(0,c.Ay)(f.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,l.A)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,a.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:x({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(y.focusVisible)]:{outline:"auto"}})})),C=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:h="a",onBlur:v,onFocus:y,TypographyClasses:m,underline:b="always",variant:x="inherit",sx:C}=n,k=(0,r.A)(n,S),{isFocusVisibleRef:O,onBlur:I,onFocus:D,ref:N}=(0,d.A)(),[E,P]=o.useState(!1),M=(0,p.A)(t,N),F=(0,a.A)({},n,{color:f,component:h,focusVisible:E,underline:b,variant:x}),Y=(e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,o={root:["root","underline".concat((0,l.A)(a)),"button"===n&&"button",r&&"focusVisible"]};return(0,s.A)(o,g,t)})(F);return(0,j.jsx)(w,(0,a.A)({color:f,className:(0,i.A)(Y.root,c),classes:m,component:h,onBlur:e=>{I(e),!1===O.current&&P(!1),v&&v(e)},onFocus:e=>{D(e),!0===O.current&&P(!0),y&&y(e)},ref:M,ownerState:F,variant:x,sx:[...Object.keys(A).includes(f)?[]:[{color:f}],...Array.isArray(C)?C:[C]]},k))}))},62375:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.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")},62462:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")}}]); \ No newline at end of file diff --git a/build/static/js/4263.640b9077.chunk.js b/build/static/js/4263.ec3fbee8.chunk.js similarity index 99% rename from build/static/js/4263.640b9077.chunk.js rename to build/static/js/4263.ec3fbee8.chunk.js index cc8558c..d3100f7 100644 --- a/build/static/js/4263.640b9077.chunk.js +++ b/build/static/js/4263.ec3fbee8.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4263],{14263:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var i=r(9950),n=r(14857),o=r(47223),s=r(16491),l=r(71525),a=r(249),c=r(26050),d=r(38614),h=r(93038),x=r(83563),u=r(74745),p=r(82917),g=r(93230),v=r(82053),m=r(88060),A=r(83239),j=r(25333),f=r(82223),w=r(99624),y=r(89379),b=r(25979),k=r(2660),C=r(2046),S=r(33425),Y=r(7762),z=r(44414);const W=e=>{let{value:t,onChange:r,sx:o,placeholder:s="Search (Ctrl + K)",delay:l=300}=e;const a=(0,n.A)(),c=(0,i.useRef)(null),[d,h]=(0,i.useState)(t||"");return(0,i.useEffect)((()=>{h(t||"")}),[t]),(0,i.useEffect)((()=>{const e=setTimeout((()=>{d!==t&&r({target:{value:d}})}),l);return()=>clearTimeout(e)}),[d]),(0,i.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=c.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===c.current&&c.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,z.jsx)(b.A,{fullWidth:!0,children:(0,z.jsx)(k.A,{inputRef:c,placeholder:s,sx:(0,y.A)({borderRadius:0},o),value:d,onChange:e=>h(e.target.value),autoComplete:"off",size:"large",startAdornment:(0,z.jsx)(C.A,{position:"start",sx:{mr:-.5,color:a.palette.secondary.main},children:(0,z.jsx)(S.A,{})}),endAdornment:(0,z.jsx)(j.A,{sx:{visibility:d?"visible":"hidden"},onClick:()=>h(""),children:(0,z.jsx)(Y.A,{style:{fontSize:"large",color:a.palette.primary.main}})})})})};var E=r(36150),I=r(81425),M=r(10523);const R={width:"100%",height:"calc(100vh - 150px)"};function L(e){var t,r;let{riderLocations:i}=e;console.log("riderLocations",i);const n={lat:Number((null===i||void 0===i||null===(t=i[0])||void 0===t?void 0:t.latitude)||11.0056),lng:Number((null===i||void 0===i||null===(r=i[0])||void 0===r?void 0:r.longitude)||76.9661)},o={url:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png",scaledSize:new window.google.maps.Size(25,41),anchor:new window.google.maps.Point(12,41)},s={url:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",scaledSize:new window.google.maps.Size(25,41),anchor:new window.google.maps.Point(12,41)};return(0,z.jsx)(M.BH,{googleMapsApiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",children:(0,z.jsx)(M.u6,{mapContainerStyle:R,zoom:12,center:n,children:i&&(null===i||void 0===i?void 0:i.map(((e,t)=>{const r=Number(e.latitude),i=Number(e.longitude);return(0,z.jsxs)("div",{children:[(0,z.jsx)(M.pH,{position:{lat:r,lng:i},icon:"active"==e.status?o:s,label:{fontSize:"14px",fontWeight:"bold"}}),(0,z.jsx)(M.i3,{position:{lat:r,lng:i},mapPaneName:M.i3.OVERLAY_LAYER,children:(0,z.jsx)("div",{style:{background:"none",color:"green",padding:"2px 8px",borderRadius:"4px",fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",transform:"translate(-50%, -140%)",pointerEvents:"none",ml:20},children:(0,z.jsxs)(f.A,{variant:"contained",color:"primary",size:"small",children:[" ".concat(e.username," "),(0,z.jsx)("br",{}),"(".concat(e.orderid||"",") ")]})})})]},t)})))})})}var D=r(50027),F=r(23787),H=r(4159),K=r.n(H),_=r(96088);const N=350,T=()=>{const e=(0,n.A)(),t=(0,o.A)("(min-width:900px)"),r=(0,o.A)(e.breakpoints.down("md")),[y,b]=(0,i.useState)(!1),[k,C]=(0,i.useState)([]),[S,Y]=(0,i.useState)(""),{data:M,isLoading:R,isFetching:H,refetch:T,error:G}=(0,E.I)({queryKey:[1,K()().format("YYYY-MM-DD"),S],queryFn:I.zb,refetchInterval:3e5});return(0,i.useEffect)((()=>{C(M)}),[M]),(0,i.useEffect)((()=>{console.log("selectedRiders",k)}),[k]),(0,i.useEffect)((()=>{b(t)}),[t]),(0,z.jsx)(D.A,{content:!1,children:(0,z.jsxs)(s.A,{sx:{display:"flex",width:"100%",height:"100%",position:"relative"},children:[(0,z.jsxs)(l.Ay,{variant:t?"persistent":"temporary",open:y,onClose:()=>!t&&b(!1),ModalProps:{keepMounted:!0},sx:{"& .MuiDrawer-paper":{width:r?"100vw":N,maxWidth:r?"100vw":N,position:"absolute",left:0,top:0,height:"100%",overflowY:"auto",transition:"transform 0.35s ease-in-out",zIndex:13}},children:[(0,z.jsxs)(s.A,{sx:{position:"sticky",top:0,zIndex:1},children:[(0,z.jsx)(W,{value:S,placeholder:"Search Rider",onChange:e=>Y(e.target.value),sx:{height:60,bgcolor:"white","& .MuiOutlinedInput-notchedOutline":{borderBottom:"1px solid",borderColor:e.palette.secondary.light}}}),(0,z.jsxs)(a.A,{children:[(0,z.jsxs)(c.Ay,{sx:{cursor:"pointer","&:hover":{bgcolor:e.palette.secondary.lighter},bgcolor:"white",mt:-1},children:[(0,z.jsx)(d.A,{children:(0,z.jsx)(h.A,{checked:(null===M||void 0===M?void 0:M.length)==(null===k||void 0===k?void 0:k.length),onChange:e=>{e.target.checked&&C(M)}})}),(0,z.jsx)(x.A,{primary:"All"})]}),(0,z.jsx)(u.A,{})]})]}),(0,z.jsx)(a.A,{children:R||H?Array.from({length:10}).map(((e,t)=>(0,z.jsxs)(i.Fragment,{children:[(0,z.jsxs)(c.Ay,{sx:{py:1.5,px:2},children:[(0,z.jsx)(d.A,{children:(0,z.jsx)(p.A,{variant:"circular",width:24,height:24})}),(0,z.jsx)(x.A,{primary:(0,z.jsx)(p.A,{variant:"text",width:"60%",height:22}),secondary:(0,z.jsx)(p.A,{variant:"text",width:"40%",height:18})}),(0,z.jsxs)(g.A,{spacing:.5,textAlign:"right",children:[(0,z.jsx)(p.A,{variant:"text",width:50,height:18}),(0,z.jsx)(p.A,{variant:"text",width:80,height:16})]})]}),(0,z.jsx)(u.A,{})]},t))):!r&&(null===M||void 0===M?void 0:M.map((t=>{var r,n,o;return(0,z.jsxs)(i.Fragment,{children:[(0,z.jsxs)(c.Ay,{sx:{cursor:"pointer",py:1,px:2,borderRadius:1,"&:hover":{bgcolor:e.palette.secondary.lighter}},secondaryAction:(0,z.jsxs)(g.A,{textAlign:"right",spacing:.5,children:[(0,z.jsx)(v.A,{variant:"body2",noWrap:!0,sx:{color:"active"==t.status?"success.main":"error.main"},children:t.userid}),(0,z.jsx)(v.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:K()(t.logdate).format("DD/MM/YYYY hh:mm A")})]}),children:[(0,z.jsx)(d.A,{children:(0,z.jsx)(h.A,{sx:{color:"active"==t.status?"green":"red","&.Mui-checked":{color:"active"==t.status?"green":"red"}},checked:1===(null===k||void 0===k?void 0:k.length)&&(null===(r=k[0])||void 0===r?void 0:r.userid)===(null===t||void 0===t?void 0:t.userid),onChange:e=>{e.target.checked?C([t]):C(M)}})}),(0,z.jsx)(x.A,{primary:(0,z.jsxs)(v.A,{noWrap:!0,children:[(null===(n=t.username)||void 0===n?void 0:n.slice(0,25))||"",(null===(o=t.username)||void 0===o?void 0:o.length)>25&&"..."]}),secondary:(0,z.jsx)(v.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:t.contactno||"##########"})})]}),(0,z.jsx)(u.A,{})]},t.userid)})))}),r&&!R&&!H&&(0,z.jsx)(F.nV,{children:null===M||void 0===M?void 0:M.map((e=>{var t,r,i;const n="active"==e.status,o=1===(null===k||void 0===k?void 0:k.length)&&(null===(t=k[0])||void 0===t?void 0:t.userid)===(null===e||void 0===e?void 0:e.userid);return(0,z.jsx)(F.pg,{accent:n?"#10b981":"#ef4444",selected:o,header:(0,z.jsxs)(g.A,{direction:"row",alignItems:"flex-start",spacing:1,children:[(0,z.jsx)(h.A,{sx:{p:.5,color:n?"green":"red","&.Mui-checked":{color:n?"green":"red"}},checked:o,onChange:t=>{t.target.checked?C([e]):C(M)}}),(0,z.jsxs)(s.A,{sx:{minWidth:0,flexGrow:1},children:[(0,z.jsxs)(v.A,{noWrap:!0,sx:{fontWeight:600},children:[(null===(r=e.username)||void 0===r?void 0:r.slice(0,25))||"",(null===(i=e.username)||void 0===i?void 0:i.length)>25&&"..."]}),(0,z.jsx)(v.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:e.contactno||"##########"})]})]}),children:(0,z.jsxs)(F.FG,{children:[(0,z.jsx)(F.pY,{label:"User ID",children:(0,z.jsx)(v.A,{sx:{fontSize:13,fontWeight:600,color:n?"success.main":"error.main"},noWrap:!0,children:e.userid})}),(0,z.jsx)(F.pY,{label:"Status",value:n?"Active":"Inactive"}),(0,z.jsx)(F.pY,{label:"Last Log",value:K()(e.logdate).format("DD/MM/YYYY hh:mm A"),full:!0})]})},e.userid)}))})]}),(0,z.jsx)(m.A,{elevation:0,position:"absolute",sx:{top:0,left:y&&t?"".concat(N,"px"):0,width:y&&t?"calc(100% - ".concat(N,"px)"):"100%",transition:"left 0.3s ease, width 0.3s ease",backgroundColor:"white",borderBottom:"1px solid",borderColor:e.palette.secondary.light},children:(0,z.jsx)(A.A,{children:(0,z.jsxs)(g.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{width:"100%"},children:[(0,z.jsxs)(g.A,{direction:"row",alignItems:"center",children:[(0,z.jsx)(j.A,{color:"primary",onClick:()=>b(!y),children:(0,z.jsx)(w.A,{})}),(0,z.jsx)(v.A,{variant:"h5",color:"primary",sx:{ml:2},children:"Riders Locations"})]}),(0,z.jsx)(f.A,{variant:"outlined",color:"primary",onClick:()=>{T()},children:"Refresh"})]})})}),(0,z.jsxs)(s.A,{sx:{flexGrow:1,overflow:"auto",pt:"64px",pl:y&&t?"".concat(N,"px"):0,transition:"padding-left 0.3s ease",minHeight:"80vh"},children:[(R||H)&&(0,z.jsx)(s.A,{position:"relative",width:"100%",height:"80vh",display:"grid",placeItems:"center",children:(0,z.jsx)(p.A,{variant:"rectangular",width:"100%",height:"100%",animation:"wave",sx:{position:"absolute",top:0,left:0,borderRadius:1,zIndex:1}})}),(null===k||void 0===k?void 0:k.length)>0&&(0,z.jsx)(L,{riderLocations:k}),G&&(0,z.jsx)(s.A,{sx:{width:"100% ",height:"100%"},children:(0,z.jsx)("img",{src:_,alt:"mantis",style:{height:"100%",width:"100%"}})})]})]})})}},23787:(e,t,r)=>{r.d(t,{FG:()=>u,nV:()=>h,pY:()=>p,pg:()=>x});var i=r(89379),n=r(80045),o=r(93230),s=r(2235),l=r(16491),a=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],h=e=>{let{children:t,scroll:r=!1,onScroll:s,sx:l}=e,a=(0,n.A)(e,d);return(0,c.jsx)(o.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:s,sx:(0,i.A)((0,i.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},x=e=>{let{accent:t="#662582",header:r,footer:n,selected:o=!1,onClick:a,children:d,sx:h}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:o?t:"#e2e8f0",background:o?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},u=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:i,full:n=!1,align:o="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:o},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},96088:(e,t,r)=>{e.exports=r.p+"static/media/Error500.1619a596c73d5cce4899.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4263],{14263:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var i=r(9950),n=r(14857),o=r(47223),s=r(16491),l=r(71525),a=r(249),c=r(26050),d=r(38614),h=r(93038),x=r(83563),u=r(74745),p=r(82917),g=r(93230),v=r(82053),m=r(88060),A=r(83239),j=r(25333),f=r(10226),w=r(99624),y=r(89379),b=r(25979),k=r(2660),C=r(2046),S=r(33425),Y=r(7762),z=r(44414);const W=e=>{let{value:t,onChange:r,sx:o,placeholder:s="Search (Ctrl + K)",delay:l=300}=e;const a=(0,n.A)(),c=(0,i.useRef)(null),[d,h]=(0,i.useState)(t||"");return(0,i.useEffect)((()=>{h(t||"")}),[t]),(0,i.useEffect)((()=>{const e=setTimeout((()=>{d!==t&&r({target:{value:d}})}),l);return()=>clearTimeout(e)}),[d]),(0,i.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=c.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===c.current&&c.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,z.jsx)(b.A,{fullWidth:!0,children:(0,z.jsx)(k.A,{inputRef:c,placeholder:s,sx:(0,y.A)({borderRadius:0},o),value:d,onChange:e=>h(e.target.value),autoComplete:"off",size:"large",startAdornment:(0,z.jsx)(C.A,{position:"start",sx:{mr:-.5,color:a.palette.secondary.main},children:(0,z.jsx)(S.A,{})}),endAdornment:(0,z.jsx)(j.A,{sx:{visibility:d?"visible":"hidden"},onClick:()=>h(""),children:(0,z.jsx)(Y.A,{style:{fontSize:"large",color:a.palette.primary.main}})})})})};var E=r(36150),I=r(81425),M=r(10523);const R={width:"100%",height:"calc(100vh - 150px)"};function L(e){var t,r;let{riderLocations:i}=e;console.log("riderLocations",i);const n={lat:Number((null===i||void 0===i||null===(t=i[0])||void 0===t?void 0:t.latitude)||11.0056),lng:Number((null===i||void 0===i||null===(r=i[0])||void 0===r?void 0:r.longitude)||76.9661)},o={url:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png",scaledSize:new window.google.maps.Size(25,41),anchor:new window.google.maps.Point(12,41)},s={url:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",scaledSize:new window.google.maps.Size(25,41),anchor:new window.google.maps.Point(12,41)};return(0,z.jsx)(M.BH,{googleMapsApiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",children:(0,z.jsx)(M.u6,{mapContainerStyle:R,zoom:12,center:n,children:i&&(null===i||void 0===i?void 0:i.map(((e,t)=>{const r=Number(e.latitude),i=Number(e.longitude);return(0,z.jsxs)("div",{children:[(0,z.jsx)(M.pH,{position:{lat:r,lng:i},icon:"active"==e.status?o:s,label:{fontSize:"14px",fontWeight:"bold"}}),(0,z.jsx)(M.i3,{position:{lat:r,lng:i},mapPaneName:M.i3.OVERLAY_LAYER,children:(0,z.jsx)("div",{style:{background:"none",color:"green",padding:"2px 8px",borderRadius:"4px",fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",transform:"translate(-50%, -140%)",pointerEvents:"none",ml:20},children:(0,z.jsxs)(f.A,{variant:"contained",color:"primary",size:"small",children:[" ".concat(e.username," "),(0,z.jsx)("br",{}),"(".concat(e.orderid||"",") ")]})})})]},t)})))})})}var D=r(50027),F=r(23787),H=r(4159),K=r.n(H),_=r(96088);const N=350,T=()=>{const e=(0,n.A)(),t=(0,o.A)("(min-width:900px)"),r=(0,o.A)(e.breakpoints.down("md")),[y,b]=(0,i.useState)(!1),[k,C]=(0,i.useState)([]),[S,Y]=(0,i.useState)(""),{data:M,isLoading:R,isFetching:H,refetch:T,error:G}=(0,E.I)({queryKey:[1,K()().format("YYYY-MM-DD"),S],queryFn:I.zb,refetchInterval:3e5});return(0,i.useEffect)((()=>{C(M)}),[M]),(0,i.useEffect)((()=>{console.log("selectedRiders",k)}),[k]),(0,i.useEffect)((()=>{b(t)}),[t]),(0,z.jsx)(D.A,{content:!1,children:(0,z.jsxs)(s.A,{sx:{display:"flex",width:"100%",height:"100%",position:"relative"},children:[(0,z.jsxs)(l.Ay,{variant:t?"persistent":"temporary",open:y,onClose:()=>!t&&b(!1),ModalProps:{keepMounted:!0},sx:{"& .MuiDrawer-paper":{width:r?"100vw":N,maxWidth:r?"100vw":N,position:"absolute",left:0,top:0,height:"100%",overflowY:"auto",transition:"transform 0.35s ease-in-out",zIndex:13}},children:[(0,z.jsxs)(s.A,{sx:{position:"sticky",top:0,zIndex:1},children:[(0,z.jsx)(W,{value:S,placeholder:"Search Rider",onChange:e=>Y(e.target.value),sx:{height:60,bgcolor:"white","& .MuiOutlinedInput-notchedOutline":{borderBottom:"1px solid",borderColor:e.palette.secondary.light}}}),(0,z.jsxs)(a.A,{children:[(0,z.jsxs)(c.Ay,{sx:{cursor:"pointer","&:hover":{bgcolor:e.palette.secondary.lighter},bgcolor:"white",mt:-1},children:[(0,z.jsx)(d.A,{children:(0,z.jsx)(h.A,{checked:(null===M||void 0===M?void 0:M.length)==(null===k||void 0===k?void 0:k.length),onChange:e=>{e.target.checked&&C(M)}})}),(0,z.jsx)(x.A,{primary:"All"})]}),(0,z.jsx)(u.A,{})]})]}),(0,z.jsx)(a.A,{children:R||H?Array.from({length:10}).map(((e,t)=>(0,z.jsxs)(i.Fragment,{children:[(0,z.jsxs)(c.Ay,{sx:{py:1.5,px:2},children:[(0,z.jsx)(d.A,{children:(0,z.jsx)(p.A,{variant:"circular",width:24,height:24})}),(0,z.jsx)(x.A,{primary:(0,z.jsx)(p.A,{variant:"text",width:"60%",height:22}),secondary:(0,z.jsx)(p.A,{variant:"text",width:"40%",height:18})}),(0,z.jsxs)(g.A,{spacing:.5,textAlign:"right",children:[(0,z.jsx)(p.A,{variant:"text",width:50,height:18}),(0,z.jsx)(p.A,{variant:"text",width:80,height:16})]})]}),(0,z.jsx)(u.A,{})]},t))):!r&&(null===M||void 0===M?void 0:M.map((t=>{var r,n,o;return(0,z.jsxs)(i.Fragment,{children:[(0,z.jsxs)(c.Ay,{sx:{cursor:"pointer",py:1,px:2,borderRadius:1,"&:hover":{bgcolor:e.palette.secondary.lighter}},secondaryAction:(0,z.jsxs)(g.A,{textAlign:"right",spacing:.5,children:[(0,z.jsx)(v.A,{variant:"body2",noWrap:!0,sx:{color:"active"==t.status?"success.main":"error.main"},children:t.userid}),(0,z.jsx)(v.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:K()(t.logdate).format("DD/MM/YYYY hh:mm A")})]}),children:[(0,z.jsx)(d.A,{children:(0,z.jsx)(h.A,{sx:{color:"active"==t.status?"green":"red","&.Mui-checked":{color:"active"==t.status?"green":"red"}},checked:1===(null===k||void 0===k?void 0:k.length)&&(null===(r=k[0])||void 0===r?void 0:r.userid)===(null===t||void 0===t?void 0:t.userid),onChange:e=>{e.target.checked?C([t]):C(M)}})}),(0,z.jsx)(x.A,{primary:(0,z.jsxs)(v.A,{noWrap:!0,children:[(null===(n=t.username)||void 0===n?void 0:n.slice(0,25))||"",(null===(o=t.username)||void 0===o?void 0:o.length)>25&&"..."]}),secondary:(0,z.jsx)(v.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:t.contactno||"##########"})})]}),(0,z.jsx)(u.A,{})]},t.userid)})))}),r&&!R&&!H&&(0,z.jsx)(F.nV,{children:null===M||void 0===M?void 0:M.map((e=>{var t,r,i;const n="active"==e.status,o=1===(null===k||void 0===k?void 0:k.length)&&(null===(t=k[0])||void 0===t?void 0:t.userid)===(null===e||void 0===e?void 0:e.userid);return(0,z.jsx)(F.pg,{accent:n?"#10b981":"#ef4444",selected:o,header:(0,z.jsxs)(g.A,{direction:"row",alignItems:"flex-start",spacing:1,children:[(0,z.jsx)(h.A,{sx:{p:.5,color:n?"green":"red","&.Mui-checked":{color:n?"green":"red"}},checked:o,onChange:t=>{t.target.checked?C([e]):C(M)}}),(0,z.jsxs)(s.A,{sx:{minWidth:0,flexGrow:1},children:[(0,z.jsxs)(v.A,{noWrap:!0,sx:{fontWeight:600},children:[(null===(r=e.username)||void 0===r?void 0:r.slice(0,25))||"",(null===(i=e.username)||void 0===i?void 0:i.length)>25&&"..."]}),(0,z.jsx)(v.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:e.contactno||"##########"})]})]}),children:(0,z.jsxs)(F.FG,{children:[(0,z.jsx)(F.pY,{label:"User ID",children:(0,z.jsx)(v.A,{sx:{fontSize:13,fontWeight:600,color:n?"success.main":"error.main"},noWrap:!0,children:e.userid})}),(0,z.jsx)(F.pY,{label:"Status",value:n?"Active":"Inactive"}),(0,z.jsx)(F.pY,{label:"Last Log",value:K()(e.logdate).format("DD/MM/YYYY hh:mm A"),full:!0})]})},e.userid)}))})]}),(0,z.jsx)(m.A,{elevation:0,position:"absolute",sx:{top:0,left:y&&t?"".concat(N,"px"):0,width:y&&t?"calc(100% - ".concat(N,"px)"):"100%",transition:"left 0.3s ease, width 0.3s ease",backgroundColor:"white",borderBottom:"1px solid",borderColor:e.palette.secondary.light},children:(0,z.jsx)(A.A,{children:(0,z.jsxs)(g.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{width:"100%"},children:[(0,z.jsxs)(g.A,{direction:"row",alignItems:"center",children:[(0,z.jsx)(j.A,{color:"primary",onClick:()=>b(!y),children:(0,z.jsx)(w.A,{})}),(0,z.jsx)(v.A,{variant:"h5",color:"primary",sx:{ml:2},children:"Riders Locations"})]}),(0,z.jsx)(f.A,{variant:"outlined",color:"primary",onClick:()=>{T()},children:"Refresh"})]})})}),(0,z.jsxs)(s.A,{sx:{flexGrow:1,overflow:"auto",pt:"64px",pl:y&&t?"".concat(N,"px"):0,transition:"padding-left 0.3s ease",minHeight:"80vh"},children:[(R||H)&&(0,z.jsx)(s.A,{position:"relative",width:"100%",height:"80vh",display:"grid",placeItems:"center",children:(0,z.jsx)(p.A,{variant:"rectangular",width:"100%",height:"100%",animation:"wave",sx:{position:"absolute",top:0,left:0,borderRadius:1,zIndex:1}})}),(null===k||void 0===k?void 0:k.length)>0&&(0,z.jsx)(L,{riderLocations:k}),G&&(0,z.jsx)(s.A,{sx:{width:"100% ",height:"100%"},children:(0,z.jsx)("img",{src:_,alt:"mantis",style:{height:"100%",width:"100%"}})})]})]})})}},23787:(e,t,r)=>{r.d(t,{FG:()=>u,nV:()=>h,pY:()=>p,pg:()=>x});var i=r(89379),n=r(80045),o=r(93230),s=r(2235),l=r(16491),a=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],h=e=>{let{children:t,scroll:r=!1,onScroll:s,sx:l}=e,a=(0,n.A)(e,d);return(0,c.jsx)(o.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:s,sx:(0,i.A)((0,i.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},x=e=>{let{accent:t="#662582",header:r,footer:n,selected:o=!1,onClick:a,children:d,sx:h}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:o?t:"#e2e8f0",background:o?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},u=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:i,full:n=!1,align:o="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:o},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},96088:(e,t,r)=>{e.exports=r.p+"static/media/Error500.1619a596c73d5cce4899.png"}}]); \ No newline at end of file diff --git a/build/static/js/4465.dde10cb8.chunk.js b/build/static/js/4465.8c45ec27.chunk.js similarity index 90% rename from build/static/js/4465.dde10cb8.chunk.js rename to build/static/js/4465.8c45ec27.chunk.js index 9316e45..12f8d7c 100644 --- a/build/static/js/4465.dde10cb8.chunk.js +++ b/build/static/js/4465.8c45ec27.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4465],{24465:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var r=n(42074),s=n(16243),i=n(14857),a=n(47223),c=n(60899),o=n(16491),l=n(93230),m=n(82053),h=n(82223),x=n(96088),d=n(44414);const g=function(){const e=(0,i.A)(),t=(0,a.A)(e.breakpoints.down("sm"));return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(c.Ay,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh"},children:[(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsx)(o.A,{sx:{width:{xs:350,sm:396}},children:(0,d.jsx)("img",{src:x,alt:"mantis",style:{height:"100%",width:"100%"}})})}),(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsxs)(l.A,{justifyContent:"center",alignItems:"center",children:[(0,d.jsx)(m.A,{align:"center",variant:t?"h2":"h1",children:"Internal Server Error"}),(0,d.jsx)(m.A,{color:"textSecondary",variant:"body2",align:"center",sx:{width:{xs:"73%",sm:"70%"},mt:1},children:"Server error 500. we fixing the problem. please try again at a later stage."}),(0,d.jsx)(h.A,{component:r.N_,to:s.qm,variant:"contained",sx:{textTransform:"none",mt:4},children:"Back To Home"})]})})]})})}},96088:(e,t,n)=>{e.exports=n.p+"static/media/Error500.1619a596c73d5cce4899.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4465],{24465:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var r=n(42074),s=n(16243),i=n(14857),a=n(47223),c=n(60899),o=n(16491),l=n(93230),m=n(82053),h=n(10226),x=n(96088),d=n(44414);const g=function(){const e=(0,i.A)(),t=(0,a.A)(e.breakpoints.down("sm"));return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(c.Ay,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh"},children:[(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsx)(o.A,{sx:{width:{xs:350,sm:396}},children:(0,d.jsx)("img",{src:x,alt:"mantis",style:{height:"100%",width:"100%"}})})}),(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsxs)(l.A,{justifyContent:"center",alignItems:"center",children:[(0,d.jsx)(m.A,{align:"center",variant:t?"h2":"h1",children:"Internal Server Error"}),(0,d.jsx)(m.A,{color:"textSecondary",variant:"body2",align:"center",sx:{width:{xs:"73%",sm:"70%"},mt:1},children:"Server error 500. we fixing the problem. please try again at a later stage."}),(0,d.jsx)(h.A,{component:r.N_,to:s.qm,variant:"contained",sx:{textTransform:"none",mt:4},children:"Back To Home"})]})})]})})}},96088:(e,t,n)=>{e.exports=n.p+"static/media/Error500.1619a596c73d5cce4899.png"}}]); \ No newline at end of file diff --git a/build/static/js/4793.a677f2ac.chunk.js b/build/static/js/4793.72fb0edf.chunk.js similarity index 99% rename from build/static/js/4793.a677f2ac.chunk.js rename to build/static/js/4793.72fb0edf.chunk.js index 4dec4b4..cdb6a01 100644 --- a/build/static/js/4793.a677f2ac.chunk.js +++ b/build/static/js/4793.72fb0edf.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4793],{20466:(e,t,a)=>{a.d(t,{k:()=>n});var o=a(8881);const n=(e,t,a)=>(0,o.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},23266:(e,t,a)=>{a.d(t,{A:()=>w});var o=a(98587),n=a(58168),s=a(9950),i=a(72004),l=a(3484),r=a(99269),c=a(59254),d=a(19608),u=a(18463),p=a(13372),m=a(24184),g=a(79044),h=a(31506),A=a(40777),v=a(92455),x=a(88543),f=a(45558),b=a(1614);function y(e){return(0,b.Ay)("MuiMenuItem",e)}const j=(0,f.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=a(44414);const _=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],S=(0,c.Ay)(m.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,a.dense&&t.dense,a.divider&&t.divider,!a.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:a}=e;return(0,n.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!a.disableGutters&&{paddingLeft:16,paddingRight:16},a.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(j.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(j.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(j.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(j.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(j.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(A.A.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(A.A.inset)]:{marginLeft:52},["& .".concat(x.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(x.A.inset)]:{paddingLeft:36},["& .".concat(v.A.root)]:{minWidth:36}},!a.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},a.dense&&(0,n.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(v.A.root," svg")]:{fontSize:"1.25rem"}}))})),w=s.forwardRef((function(e,t){const a=(0,u.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:c="li",dense:d=!1,divider:m=!1,disableGutters:A=!1,focusVisibleClassName:v,role:x="menuitem",tabIndex:f,className:b}=a,j=(0,o.A)(a,_),w=s.useContext(p.A),k=s.useMemo((()=>({dense:d||w.dense||!1,disableGutters:A})),[w.dense,d,A]),I=s.useRef(null);(0,g.A)((()=>{r&&I.current&&I.current.focus()}),[r]);const M=(0,n.A)({},a,{dense:k.dense,divider:m,disableGutters:A}),O=(e=>{const{disabled:t,dense:a,divider:o,disableGutters:s,selected:i,classes:r}=e,c={root:["root",a&&"dense",t&&"disabled",!s&&"gutters",o&&"divider",i&&"selected"]},d=(0,l.A)(c,y,r);return(0,n.A)({},r,d)})(a),N=(0,h.A)(I,t);let E;return a.disabled||(E=void 0!==f?f:-1),(0,C.jsx)(p.A.Provider,{value:k,children:(0,C.jsx)(S,(0,n.A)({ref:N,role:x,tabIndex:E,component:c,focusVisibleClassName:(0,i.A)(O.focusVisible,v),className:(0,i.A)(O.root,b)},j,{ownerState:M,classes:O}))})}))},59212:(e,t,a)=>{a.d(t,{A:()=>p});var o=a(89379),n=a(9950),s=a(93230),i=a(41413),l=a(77922),r=a(29925),c=a(26910),d=a(31222),u=a(44414);const p=(0,n.forwardRef)(((e,t)=>{let{setAppId:a,setLocoName:p,setPage:m,sx:g,textfeildSx:h,textfieldSx:A,pill:v=!1,accentColor:x="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:y}=e;const[j,C]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===j.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),C(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[j.length]);const _=e=>"".concat(x).concat(e),S=_("26"),w=_("18"),k=v?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(S)},"&.Mui-focused fieldset":{borderColor:x,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},I=v&&(0,u.jsx)(s.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,u.jsx)(i.A,{sx:{width:24,height:24,bgcolor:w,color:x,transition:"background-color 0.15s, color 0.15s"},children:f||(0,u.jsx)(d.HPi,{size:14})})});return(0,u.jsx)(l.A,{id:"location-autocomplete",options:j||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:y,sx:(0,o.A)({},g),onChange:(e,t,o)=>{"clear"===o?(null===a||void 0===a||a(0),null===p||void 0===p||p(""),null===m||void 0===m||m(0)):t&&(null===a||void 0===a||a(t.applocationid),null===p||void 0===p||p(t.locationname),null===m||void 0===m||m(0))},renderInput:e=>v?(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:I}),sx:(0,o.A)((0,o.A)({},k),A||h||{})})):(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},A||h||{})}))})}))},94793:(e,t,a)=>{a.r(t),a.d(t,{default:()=>k});var o=a(89379),n=a(9950),s=a(14857),i=a(47223),l=a(60899),r=a(93230),c=a(82053),d=a(77922),u=a(29925),p=a(19647),m=a(70006),g=a(23266),h=a(25333),A=a(82223),v=a(50027),x=a(26910),f=a(52351),b=a(99459),y=a(8881),j=a(28429),C=a(96319),_=a(59212),S=a(20466),w=a(44414);const k=()=>{const e=(0,s.A)(),t=(0,i.A)(e.breakpoints.down("md")),[a,k]=(0,n.useState)(0),I=(0,n.useRef)(null),[M,O]=(0,n.useState)(""),[N,E]=(0,n.useState)(""),[L,F]=(0,n.useState)(""),[W,z]=(0,n.useState)(""),[P,H]=(0,n.useState)(""),[R,D]=(0,n.useState)(""),[B,V]=(0,n.useState)(""),[G,T]=(0,n.useState)(),[X,Z]=(0,n.useState)(),[J,K]=(0,n.useState)(),[Y,q]=(0,n.useState)("Select Location"),[Q,U]=(0,n.useState)([]),[$,ee]=(0,n.useState)(0),[te,ae]=(0,n.useState)({}),[oe,ne]=(0,n.useState)({latitude:0,longitude:0}),[se,ie]=(0,n.useState)(!1),le=(0,j.Zp)();b.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,n.useEffect)((()=>{if(B){const e=document.getElementById("addressAuto1"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(G,X),radius:1e3*J}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();V("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log(" pick (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),ne({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),F("".concat(e.name," ").concat(e.formatted_address)),ae((0,o.A)((0,o.A)({},te),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),ae((0,o.A)((0,o.A)({},te),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.administrative_area_level_3,city:a.locality,state:a.administrative_area_level_1,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Pick Address:",a)}))}}),[B]);(0,n.useEffect)((()=>{a&&(async()=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocations/?applocationid=").concat(a)).then((e=>{console.log("getapplocations",e);const{latitude:t,longitude:a,radius:o}=e.data.details[0];e.data.status&&(T(t),Z(a),K(o),console.log("radius",o)),ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})()}),[a]);(0,n.useEffect)((()=>{a&&(async e=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(e,"&status=active")).then((e=>{if(console.log(e),e.data.status){let t=[];e.data.details.map((e=>{t.push((0,o.A)((0,o.A)({},e),{},{label:"".concat(e.tenantname)}))})),U(t)}ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})(a)}),[a]);const re=e=>{(0,y.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})};return(0,w.jsxs)(w.Fragment,{children:[se&&(0,w.jsx)(f.A,{}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sx:{mb:2},children:(0,w.jsx)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,w.jsx)(c.A,{variant:"h3",children:"Create Customer"})})}),(0,w.jsx)(v.A,{sx:{p:{xs:1.5,md:3}},children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,md:6,children:(0,w.jsx)(_.A,{ref:I,locaName:Y,setAppId:k,setLocoName:q,sx:{}})}),(0,w.jsxs)(l.Ay,{item:!0,xs:12,md:6,children:[(0,w.jsx)(d.A,{fullWidth:!0,disabled:0==a,id:"free-solo-demo",sx:{},options:Q||[],renderInput:e=>(0,w.jsx)(u.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Client",focused:!0})),onChange:(e,t,a)=>{t?(console.log("Client",t),(async e=>{try{const t=await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e));console.log("gettenantlocations",t.data.details),t.data.details.length}catch(t){console.log("gettenantlocations",t)}})(t.tenantid),ee(t.tenantid)):(setClientinfo({}),setTenantid(""))}})," "]}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-last-name",children:"Name"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>z(e.target.value),value:W,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,w.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,w.jsx)(m.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,w.jsx)(g.A,{value:"+1",children:"+91"})}),(0,w.jsx)(u.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&O(e.target.value)},value:M,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Email "}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email ",onChange:e=>E(e.target.value),value:N,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Door No"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>H(e.target.value),value:P,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:" Address"}),(0,w.jsx)(u.A,{variant:"outlined",id:"addressAuto1",fullWidth:!0,value:B,onChange:e=>{a?a&&V(e.target.value):(0,S.k)("Select Location First","warning",3e3)},InputProps:{endAdornment:(0,w.jsx)(h.A,{onClick:()=>{V(""),ae((0,o.A)((0,o.A)({},te),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),ne({latitude:0,longitude:0})},size:"small",children:(0,w.jsx)(C.A,{})})}})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Location"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{suburb:e.target.value})),value:te.suburb,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"City"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{city:e.target.value})),value:te.city,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"State"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{state:e.target.value})),value:te.state,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,w.jsx)(u.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{postcode:e.target.value})),value:te.postcode,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Landmark"}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>D(e.target.value),value:R,autoComplete:"off"})]})})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsx)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,w.jsx)(A.A,{variant:"contained",fullWidth:t,onClick:()=>{""===a?re("Select Applocation "):""===$?re("Select Tenant"):""===W?re("Enter Name"):""===M?re("Enter Mobile Number "):""===L?re("Enter Address "):""===te.city?re("Enter City "):""===te.state?re("Enter State "):""===te.suburb?re("Enter location "):""===te.postcode?re("Enter Post Code "):""===R?re("Enter Land Mark "):""===te.latitude?re("Invalid latitude "):""===te.longitude?re("Invaiid Longitude "):(async()=>{let e={applocationid:+a,tenantid:+$,customerid:0,configid:1,firstname:W,dialcode:"+91",contactno:M,email:N,doorno:P,address:te.address,suburb:te.suburb,city:te.city,state:te.state,postcode:te.postcode,landmark:R,latitude:oe.latitude.toString(),longitude:oe.longitude.toString(),profileimage:"",devicetype:"",deviceid:"",customertoken:"",primaryaddress:1};console.log(e),ie(!0);try{await x.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),e).then((e=>{console.log(e),e.data.status?((0,y.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),le("/nearle/customers")):"Customer Already available"==e.data.message&&(0,y.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ie(!1)})).catch((e=>{console.log(e),ie(!1),(0,y.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(t){console.log(t),ie(!1)}})()},children:"Create"})})})]})})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4793],{20466:(e,t,a)=>{a.d(t,{k:()=>n});var o=a(8881);const n=(e,t,a)=>(0,o.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},23266:(e,t,a)=>{a.d(t,{A:()=>w});var o=a(98587),n=a(58168),s=a(9950),i=a(72004),l=a(3484),r=a(99269),c=a(59254),d=a(19608),u=a(18463),p=a(13372),m=a(24184),g=a(79044),h=a(31506),A=a(40777),v=a(92455),x=a(88543),f=a(45558),b=a(1614);function y(e){return(0,b.Ay)("MuiMenuItem",e)}const j=(0,f.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=a(44414);const _=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],S=(0,c.Ay)(m.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,a.dense&&t.dense,a.divider&&t.divider,!a.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:a}=e;return(0,n.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!a.disableGutters&&{paddingLeft:16,paddingRight:16},a.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(j.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(j.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(j.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(j.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(j.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(A.A.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(A.A.inset)]:{marginLeft:52},["& .".concat(x.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(x.A.inset)]:{paddingLeft:36},["& .".concat(v.A.root)]:{minWidth:36}},!a.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},a.dense&&(0,n.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(v.A.root," svg")]:{fontSize:"1.25rem"}}))})),w=s.forwardRef((function(e,t){const a=(0,u.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:c="li",dense:d=!1,divider:m=!1,disableGutters:A=!1,focusVisibleClassName:v,role:x="menuitem",tabIndex:f,className:b}=a,j=(0,o.A)(a,_),w=s.useContext(p.A),k=s.useMemo((()=>({dense:d||w.dense||!1,disableGutters:A})),[w.dense,d,A]),I=s.useRef(null);(0,g.A)((()=>{r&&I.current&&I.current.focus()}),[r]);const M=(0,n.A)({},a,{dense:k.dense,divider:m,disableGutters:A}),O=(e=>{const{disabled:t,dense:a,divider:o,disableGutters:s,selected:i,classes:r}=e,c={root:["root",a&&"dense",t&&"disabled",!s&&"gutters",o&&"divider",i&&"selected"]},d=(0,l.A)(c,y,r);return(0,n.A)({},r,d)})(a),N=(0,h.A)(I,t);let E;return a.disabled||(E=void 0!==f?f:-1),(0,C.jsx)(p.A.Provider,{value:k,children:(0,C.jsx)(S,(0,n.A)({ref:N,role:x,tabIndex:E,component:c,focusVisibleClassName:(0,i.A)(O.focusVisible,v),className:(0,i.A)(O.root,b)},j,{ownerState:M,classes:O}))})}))},59212:(e,t,a)=>{a.d(t,{A:()=>p});var o=a(89379),n=a(9950),s=a(93230),i=a(41413),l=a(77922),r=a(29925),c=a(26910),d=a(31222),u=a(44414);const p=(0,n.forwardRef)(((e,t)=>{let{setAppId:a,setLocoName:p,setPage:m,sx:g,textfeildSx:h,textfieldSx:A,pill:v=!1,accentColor:x="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:y}=e;const[j,C]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===j.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),C(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[j.length]);const _=e=>"".concat(x).concat(e),S=_("26"),w=_("18"),k=v?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(S)},"&.Mui-focused fieldset":{borderColor:x,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},I=v&&(0,u.jsx)(s.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,u.jsx)(i.A,{sx:{width:24,height:24,bgcolor:w,color:x,transition:"background-color 0.15s, color 0.15s"},children:f||(0,u.jsx)(d.HPi,{size:14})})});return(0,u.jsx)(l.A,{id:"location-autocomplete",options:j||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:y,sx:(0,o.A)({},g),onChange:(e,t,o)=>{"clear"===o?(null===a||void 0===a||a(0),null===p||void 0===p||p(""),null===m||void 0===m||m(0)):t&&(null===a||void 0===a||a(t.applocationid),null===p||void 0===p||p(t.locationname),null===m||void 0===m||m(0))},renderInput:e=>v?(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:I}),sx:(0,o.A)((0,o.A)({},k),A||h||{})})):(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},A||h||{})}))})}))},94793:(e,t,a)=>{a.r(t),a.d(t,{default:()=>k});var o=a(89379),n=a(9950),s=a(14857),i=a(47223),l=a(60899),r=a(93230),c=a(82053),d=a(77922),u=a(29925),p=a(19647),m=a(70006),g=a(23266),h=a(25333),A=a(10226),v=a(50027),x=a(26910),f=a(52351),b=a(99459),y=a(8881),j=a(28429),C=a(96319),_=a(59212),S=a(20466),w=a(44414);const k=()=>{const e=(0,s.A)(),t=(0,i.A)(e.breakpoints.down("md")),[a,k]=(0,n.useState)(0),I=(0,n.useRef)(null),[M,O]=(0,n.useState)(""),[N,E]=(0,n.useState)(""),[L,F]=(0,n.useState)(""),[W,z]=(0,n.useState)(""),[P,H]=(0,n.useState)(""),[R,D]=(0,n.useState)(""),[B,V]=(0,n.useState)(""),[G,T]=(0,n.useState)(),[X,Z]=(0,n.useState)(),[J,K]=(0,n.useState)(),[Y,q]=(0,n.useState)("Select Location"),[Q,U]=(0,n.useState)([]),[$,ee]=(0,n.useState)(0),[te,ae]=(0,n.useState)({}),[oe,ne]=(0,n.useState)({latitude:0,longitude:0}),[se,ie]=(0,n.useState)(!1),le=(0,j.Zp)();b.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,n.useEffect)((()=>{if(B){const e=document.getElementById("addressAuto1"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(G,X),radius:1e3*J}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();V("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log(" pick (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),ne({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),F("".concat(e.name," ").concat(e.formatted_address)),ae((0,o.A)((0,o.A)({},te),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),ae((0,o.A)((0,o.A)({},te),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.administrative_area_level_3,city:a.locality,state:a.administrative_area_level_1,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Pick Address:",a)}))}}),[B]);(0,n.useEffect)((()=>{a&&(async()=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocations/?applocationid=").concat(a)).then((e=>{console.log("getapplocations",e);const{latitude:t,longitude:a,radius:o}=e.data.details[0];e.data.status&&(T(t),Z(a),K(o),console.log("radius",o)),ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})()}),[a]);(0,n.useEffect)((()=>{a&&(async e=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(e,"&status=active")).then((e=>{if(console.log(e),e.data.status){let t=[];e.data.details.map((e=>{t.push((0,o.A)((0,o.A)({},e),{},{label:"".concat(e.tenantname)}))})),U(t)}ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})(a)}),[a]);const re=e=>{(0,y.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})};return(0,w.jsxs)(w.Fragment,{children:[se&&(0,w.jsx)(f.A,{}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sx:{mb:2},children:(0,w.jsx)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,w.jsx)(c.A,{variant:"h3",children:"Create Customer"})})}),(0,w.jsx)(v.A,{sx:{p:{xs:1.5,md:3}},children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,md:6,children:(0,w.jsx)(_.A,{ref:I,locaName:Y,setAppId:k,setLocoName:q,sx:{}})}),(0,w.jsxs)(l.Ay,{item:!0,xs:12,md:6,children:[(0,w.jsx)(d.A,{fullWidth:!0,disabled:0==a,id:"free-solo-demo",sx:{},options:Q||[],renderInput:e=>(0,w.jsx)(u.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Client",focused:!0})),onChange:(e,t,a)=>{t?(console.log("Client",t),(async e=>{try{const t=await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e));console.log("gettenantlocations",t.data.details),t.data.details.length}catch(t){console.log("gettenantlocations",t)}})(t.tenantid),ee(t.tenantid)):(setClientinfo({}),setTenantid(""))}})," "]}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-last-name",children:"Name"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>z(e.target.value),value:W,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,w.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,w.jsx)(m.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,w.jsx)(g.A,{value:"+1",children:"+91"})}),(0,w.jsx)(u.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&O(e.target.value)},value:M,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Email "}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email ",onChange:e=>E(e.target.value),value:N,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Door No"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>H(e.target.value),value:P,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:" Address"}),(0,w.jsx)(u.A,{variant:"outlined",id:"addressAuto1",fullWidth:!0,value:B,onChange:e=>{a?a&&V(e.target.value):(0,S.k)("Select Location First","warning",3e3)},InputProps:{endAdornment:(0,w.jsx)(h.A,{onClick:()=>{V(""),ae((0,o.A)((0,o.A)({},te),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),ne({latitude:0,longitude:0})},size:"small",children:(0,w.jsx)(C.A,{})})}})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Location"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{suburb:e.target.value})),value:te.suburb,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"City"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{city:e.target.value})),value:te.city,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"State"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{state:e.target.value})),value:te.state,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,w.jsx)(u.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{postcode:e.target.value})),value:te.postcode,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Landmark"}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>D(e.target.value),value:R,autoComplete:"off"})]})})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsx)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,w.jsx)(A.A,{variant:"contained",fullWidth:t,onClick:()=>{""===a?re("Select Applocation "):""===$?re("Select Tenant"):""===W?re("Enter Name"):""===M?re("Enter Mobile Number "):""===L?re("Enter Address "):""===te.city?re("Enter City "):""===te.state?re("Enter State "):""===te.suburb?re("Enter location "):""===te.postcode?re("Enter Post Code "):""===R?re("Enter Land Mark "):""===te.latitude?re("Invalid latitude "):""===te.longitude?re("Invaiid Longitude "):(async()=>{let e={applocationid:+a,tenantid:+$,customerid:0,configid:1,firstname:W,dialcode:"+91",contactno:M,email:N,doorno:P,address:te.address,suburb:te.suburb,city:te.city,state:te.state,postcode:te.postcode,landmark:R,latitude:oe.latitude.toString(),longitude:oe.longitude.toString(),profileimage:"",devicetype:"",deviceid:"",customertoken:"",primaryaddress:1};console.log(e),ie(!0);try{await x.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),e).then((e=>{console.log(e),e.data.status?((0,y.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),le("/nearle/customers")):"Customer Already available"==e.data.message&&(0,y.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ie(!1)})).catch((e=>{console.log(e),ie(!1),(0,y.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(t){console.log(t),ie(!1)}})()},children:"Create"})})})]})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/4917.f4cf8ed3.chunk.js b/build/static/js/4917.5bb4b5d9.chunk.js similarity index 99% rename from build/static/js/4917.f4cf8ed3.chunk.js rename to build/static/js/4917.5bb4b5d9.chunk.js index a67ebf9..7f28d3d 100644 --- a/build/static/js/4917.f4cf8ed3.chunk.js +++ b/build/static/js/4917.5bb4b5d9.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4917],{4159:function(e){e.exports=function(){"use strict";var e=1e3,r=6e4,t=36e5,n="millisecond",i="second",s="minute",o="hour",a="day",d="week",c="month",l="quarter",u="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var r=["th","st","nd","rd"],t=e%100;return"["+e+(r[(t-20)%10]||r[t]||r[0])+"]"}},x=function(e,r,t){var n=String(e);return!n||n.length>=r?e:""+Array(r+1-n.length).join(t)+e},g={s:x,z:function(e){var r=-e.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),i=t%60;return(r<=0?"+":"-")+x(n,2,"0")+":"+x(i,2,"0")},m:function e(r,t){if(r.date()1)return e(o[0])}else{var a=r.name;A[a]=r,i=a}return!n&&i&&(y=i),i||!n&&y},$=function(e,r){if(S(e))return e.clone();var t="object"==typeof r?r:{};return t.date=e,t.args=arguments,new j(t)},w=g;w.l=_,w.i=S,w.w=function(e,r){return $(e,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var j=function(){function v(e){this.$L=_(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var x=v.prototype;return x.parse=function(e){this.$d=function(e){var r=e.date,t=e.utc;if(null===r)return new Date(NaN);if(w.u(r))return new Date;if(r instanceof Date)return new Date(r);if("string"==typeof r&&!/Z$/i.test(r)){var n=r.match(m);if(n){var i=n[2]-1||0,s=(n[7]||"0").substring(0,3);return t?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(r)}(e),this.init()},x.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},x.$utils=function(){return w},x.isValid=function(){return!(this.$d.toString()===h)},x.isSame=function(e,r){var t=$(e);return this.startOf(r)<=t&&t<=this.endOf(r)},x.isAfter=function(e,r){return $(e){"use strict";t.r(r),t.d(r,{default:()=>L});var n=t(89379),i=t(9950),s=t(28429),o=t(14857),a=t(47223),d=t(16491),c=t(55158),l=t(93230),u=t(83274),f=t(25333),h=t(82053),m=t(77922),p=t(29925),v=t(82223),x=t(48159),g=t(84142),y=t(48089),A=t(25277),b=t(96583),S=t(40033),_=t(28170),$=t(79739),w=t(36150),j=t(51778),k=t(4159),M=t.n(k),D=t(63189),z=t(99324),C=t(6604),O=t(31222),I=t(81425),R=t(20466),W=t(90376),N=t(94826),E=t(88267),H=t(84702),T=t(44414);const Y=[{tuneid:1,type:"Balanced",value:"balanced"},{tuneid:2,type:"Aggressive Speed",value:"aggressive_speed"},{tuneid:3,type:"Fuel Saver",value:"fuel_saver"},{tuneid:4,type:"Zone Strict",value:"zone_strict"}];function F(e){return e.map((e=>{const r=Number(e.cumulativekms||0),t=Number(e.minkm||0),i=Number(e.baseprice||0),s=Number(e.priceperkm||0);return r<=t?(0,n.A)((0,n.A)({},e),{},{deliveryamt:i}):(0,n.A)((0,n.A)({},e),{},{deliveryamt:(r-t)*s+i})}))}const L=()=>{var e,r;const t=(0,s.Zp)(),k=(0,s.zy)().state||{},L=(0,o.A)(),J=(0,a.A)(L.breakpoints.down("md")),[P,U]=(0,i.useState)(k.dispatchPreviewData||null);(0,i.useEffect)((()=>{var e;k.dispatchPreviewData?"undefined"!==typeof window&&null!==(e=window.history)&&void 0!==e&&e.state&&window.history.replaceState((0,n.A)((0,n.A)({},window.history.state),{},{usr:null}),""):t("/nearle/orders",{replace:!0})}),[]);const[B,Z]=(0,i.useState)([]),[V,q]=(0,i.useState)(!1),[K,Q]=(0,i.useState)(0),[G,X]=(0,i.useState)(!1),[ee,re]=(0,i.useState)(!1),[te,ne]=(0,i.useState)((()=>new Set)),[ie,se]=(0,i.useState)(!1),[oe,ae]=(0,i.useState)(null),[de,ce]=(0,i.useState)(null),[le,ue]=(0,i.useState)(null),fe=null!==(e=k.aiMode)&&void 0!==e?e:1,he=k.selectedMode||null,me=k.deliveryData||[],pe=k.autoRiders||[],ve=k.absentRidersPayload||[],xe=k.rider||null,ge=(0,i.useMemo)((()=>{if(k.appId)return k.appId;if("undefined"!==typeof window){const e=localStorage.getItem("applocationid");return e?Number(e):0}return 0}),[k.appId]),{data:ye}=(0,w.I)({queryKey:["ridersList",ge],queryFn:I.Sd,enabled:!!ge,staleTime:3e5}),Ae=(0,i.useMemo)((()=>(e=>{if(!e)return[];const r=new Map,t=new Set,n=(e,n,i)=>{if(null==e)return;const s=String(e);r.has(s)||r.set(s,{rider_id:e,rider_name:n,orders:[]});const o=r.get(s);(i||[]).forEach((e=>{const r=null!=(null===e||void 0===e?void 0:e.orderid)?String(e.orderid):null;if(r){if(t.has(r))return;t.add(r)}o.orders.push(e)})),!o.rider_name&&n&&(o.rider_name=n)};return Array.isArray(e.zones)&&e.zones.length?e.zones.forEach((e=>{(e.riders||[]).forEach((e=>{var r;const t=null!==(r=e.rider_id)&&void 0!==r?r:e.userid,i=e.rider_name||e.username||"Rider ".concat(t);n(t,i,e.orders)}))})):Array.isArray(e.details)&&e.details.forEach((e=>{var r;const t=null!==(r=e.rider_id)&&void 0!==r?r:e.userid,i=e.rider_name||e.ridername||"Rider ".concat(t);n(t,i,[e])})),Array.from(r.values())})(P)),[P]),be=(0,i.useMemo)((()=>{const e=(e=>{const r=[];return e.forEach((e=>{const t=Number(e.rider_id),i=Number.isFinite(t)?t:e.rider_id;(e.orders||[]).forEach((t=>{r.push((0,n.A)((0,n.A)({},t),{},{rider_id:i,userid:i,rider_name:e.rider_name,rider:e.rider_name}))}))})),r})(Ae);return e.length?F(e):Array.isArray(null===P||void 0===P?void 0:P.details)?F(P.details):[]}),[Ae,P]);(0,i.useEffect)((()=>{const e=be.map((e=>({zone_name:e.zone_name,ordernotes:e.ordernotes,rider:e.rider,step:e.step,ordertype:e.ordertype,orderamount:e.orderamount,riderkms:e.riderkms,cumulativekms:e.cumulativekms,baseprice:e.baseprice,minkm:e.minkm,priceperkm:e.priceperkm,kms:e.kms,actualkms:e.actualkms,rider_charge:e.rider_charge,deliveryamt:e.deliveryamt,deliverycharges:e.deliverycharges,profit:e.profit})));Z(e)}),[be]);const Se=(0,j.n)({mutationFn:I.k3,onSuccess:()=>(0,R.k)("Notification sent Successfully","success",2e3),onError:e=>(0,R.k)(e.message,"error",2e3)}),_e=(0,j.n)({mutationFn:0==fe?I.FC:I.Yk,onSuccess:e=>{(0,R.k)("Orders Optimised Successfully","success",2e3),U(e),re(!1),ne(new Set),q(!1)},onError:e=>{(0,R.k)(e.message,"error",4e3),q(!1)},onSettled:()=>q(!1)}),$e=(0,j.n)({mutationFn:I.H2,onSuccess:()=>{(0,R.k)("Delivery Created Successfully","success",2e3),q(!1),null!==xe&&void 0!==xe&&xe.userfcmtoken&&Se.mutate(xe.userfcmtoken),t("/nearle/deliveries")},onError:e=>{(0,R.k)(e.message,"error",4e3),q(!1)},onSettled:()=>q(!1)}),we=(0,j.n)({mutationFn:I.U8,onMutate:()=>X(!0),onSuccess:e=>{Array.isArray(null===e||void 0===e?void 0:e.riders)?(U((r=>((e,r)=>{if(!e||!Array.isArray(null===r||void 0===r?void 0:r.riders))return e;const t=JSON.parse(JSON.stringify(e)),i=new Map(r.riders.map((e=>[String(e.rider_id),e.orders||[]])));Array.isArray(t.zones)&&t.zones.length?(t.zones.forEach((e=>{Array.isArray(e.riders)&&e.riders.forEach((e=>{var r;const t=String(null!==(r=e.rider_id)&&void 0!==r?r:e.userid);i.has(t)&&(e.orders=[])}))})),i.forEach(((e,r)=>{let n=!1;for(const s of t.zones){if(!Array.isArray(s.riders))continue;const t=s.riders.find((e=>{var t;return String(null!==(t=e.rider_id)&&void 0!==t?t:e.userid)===r}));if(t){t.orders=e,n=!0;break}}if(!n){var i;const n=t.zones[0];n.riders=n.riders||[],n.riders.push({rider_id:Number(r)||r,rider_name:(null===(i=e[0])||void 0===i?void 0:i.rider_name)||"Rider ".concat(r),orders:e})}}))):t.zones=[{zone_name:"Reconciled",riders:r.riders.map((e=>({rider_id:e.rider_id,rider_name:e.rider_name||"Rider ".concat(e.rider_id),orders:e.orders||[]})))}];const s=[];return t.zones.forEach((e=>{(e.riders||[]).forEach((e=>{(e.orders||[]).forEach((r=>{s.push((0,n.A)((0,n.A)({},r),{},{rider_id:e.rider_id,userid:e.rider_id,rider_name:e.rider_name,rider:e.rider_name}))}))}))})),t.details=s,t})(r,e))),re(!0),ne((r=>{const t=new Set(r);return e.riders.forEach((e=>t.delete(String(e.rider_id)))),t})),(0,R.k)("Steps reconciled \u2014 preview updated","success",2e3)):(0,R.k)("Reconcile returned no rider data","warning",3e3)},onError:e=>{(0,R.k)(e.message||"Reconcile failed","error",4e3)},onSettled:()=>X(!1)}),je=e=>{q(!0),0==fe?_e.mutate({deliveries:me}):he&&1==(null===he||void 0===he?void 0:he.value)?_e.mutate({deliveries:me,hypertuning_params:e||null,selectedMode:he,absent_riders:ve}):_e.mutate({data:{orders:me,riders:pe,config:{pay_type:"hourly",base_pay:300,strategy:"multi_trip"},absent_riders:ve},selectedMode:he})},ke=(e,r)=>{var t,n,i,s;const o=null!==(t=null!==(n=null!==(i=null!==(s=null===e||void 0===e?void 0:e.rider_id)&&void 0!==s?s:null===e||void 0===e?void 0:e.id)&&void 0!==i?i:null===r||void 0===r?void 0:r.rider_id)&&void 0!==n?n:null===r||void 0===r?void 0:r.userid)&&void 0!==t?t:null;ce(o),ae(r),ue(null),se(!0)};return(0,T.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100vh",overflow:"hidden",position:"relative"},children:[(0,T.jsx)(c.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:V,children:(0,T.jsx)(N.A,{color:"inherit"})}),(0,T.jsx)(d.A,{sx:{py:1.25,px:2,borderBottom:"1px solid #eef2f6"},children:(0,T.jsxs)(l.A,{direction:{xs:"column",md:"row"},alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,T.jsxs)(l.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,T.jsx)(u.A,{title:"Back to orders",placement:"top",children:(0,T.jsx)(f.A,{onClick:()=>t("/nearle/orders"),sx:{bgcolor:"action.hover","&:hover":{bgcolor:"action.selected"}},children:(0,T.jsx)(z.eQE,{size:20})})}),(0,T.jsx)(h.A,{variant:"h3",fontWeight:600,children:"Assign Orders"})]}),(0,T.jsxs)(l.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},spacing:1,sx:{width:{xs:"100%",md:"auto"}},children:[(0,T.jsx)(m.A,{options:Y||[],getOptionLabel:e=>e.type,sx:{minWidth:{xs:0,sm:250},maxWidth:600,flex:1,width:{xs:"100%",sm:"auto"}},renderInput:e=>(0,T.jsx)(p.A,(0,n.A)((0,n.A)({},e),{},{label:"Hyper Tuning"})),onChange:(e,r,t)=>{je("clear"===t?null:r.value)}}),(0,T.jsx)(v.A,{variant:"contained",color:"primary",startIcon:(0,T.jsx)(C.UF6,{}),fullWidth:J,onClick:()=>{q(!0),je("reshuffle")},children:"Re-Assign"}),(0,T.jsx)(W.Ay,{data:B,filename:"Orders_Detail_".concat(M()().format("YYYY-MM-DD_HHmmss"),".csv"),label:" CSV",style:{m:1}})]})]})}),(0,T.jsx)(d.A,{sx:{px:2,borderBottom:"1px solid #eef2f6"},children:(0,T.jsxs)(x.A,{value:K,onChange:(e,r)=>Q(r),variant:J?"fullWidth":"standard",sx:{minHeight:40},children:[(0,T.jsx)(g.A,{label:"Dispatch",sx:{minHeight:40,textTransform:"none",fontWeight:600}}),(0,T.jsx)(g.A,{label:"Reconcile",sx:{minHeight:40,textTransform:"none",fontWeight:600}})]})}),(0,T.jsxs)(d.A,{sx:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[0===K&&P&&(0,T.jsx)(E.default,{data:P,embedded:!0,onChangeRider:(e,r)=>ke(r,e)},(null===P||void 0===P?void 0:P.__cacheKey)||JSON.stringify(Ae.length)),1===K&&(0,T.jsx)(d.A,{sx:{flex:1,overflow:"auto",p:2,bgcolor:"#f8fafc"},children:0===Ae.length?(0,T.jsx)(h.A,{sx:{color:"#94a3b8",textAlign:"center",mt:4},children:"No rider data available to reconcile."}):(0,T.jsxs)(l.A,{spacing:1.75,children:[(0,T.jsx)(d.A,{sx:{bgcolor:ee?"#ecfdf5":"#fffbeb",border:"1px solid ".concat(ee?"#a7f3d0":"#fde68a"),color:ee?"#065f46":"#92400e",borderRadius:"10px",px:1.5,py:1,fontSize:13},children:ee?"Steps have been reconciled. The Dispatch tab and Assign payload are updated.":"Click a numbered step to change its rider. Hit Reconcile to verify the corrected steps with the server."}),Ae.map((e=>{const r=e.orders.reduce(((e,r)=>e+parseFloat(r.actualkms||r.kms||0)),0);return(0,T.jsxs)(y.A,{sx:{p:{xs:1.5,md:2},borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.06)"},children:[(0,T.jsxs)(l.A,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:1.25,flexWrap:"wrap",gap:1},children:[(0,T.jsxs)(l.A,{direction:"row",alignItems:"center",gap:1.25,children:[(0,T.jsx)(d.A,{sx:{width:32,height:32,borderRadius:"8px",bgcolor:"#eef2ff",color:"#4f46e5",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:(0,T.jsx)(O.aVM,{size:18})}),(0,T.jsxs)(d.A,{children:[(0,T.jsx)(h.A,{sx:{fontWeight:700,fontSize:14,color:"#1e293b"},children:e.rider_name}),(0,T.jsxs)(h.A,{sx:{fontSize:11.5,color:"#64748b"},children:["ID: ",e.rider_id]})]})]}),(0,T.jsxs)(l.A,{direction:"row",gap:1,children:[(0,T.jsx)(A.A,{size:"small",label:"".concat(e.orders.length," stops"),sx:{fontWeight:600}}),(0,T.jsx)(A.A,{size:"small",label:"".concat(r.toFixed(1)," km"),variant:"outlined"})]})]}),(0,T.jsx)(l.A,{direction:"row",gap:1.25,sx:{flexWrap:"wrap",alignItems:"center"},children:e.orders.map(((r,t)=>{var n;const i=null!==(n=r.step)&&void 0!==n?n:t+1,s=(0,H.gM)(Number(i)-1);return(0,T.jsx)(u.A,{title:(0,T.jsxs)(d.A,{children:[(0,T.jsxs)("div",{children:["Order #",r.orderid]}),(0,T.jsx)("div",{children:r.deliveryaddress||r.deliverysuburb||""}),(0,T.jsx)("div",{style:{marginTop:4,opacity:.8},children:"Click to change rider"})]}),children:(0,T.jsx)(d.A,{onClick:()=>ke(e,r),sx:{width:36,height:36,borderRadius:"50%",bgcolor:s,color:"#fff",display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:800,fontSize:14,cursor:"pointer",boxShadow:"0 0 0 2px rgba(255,255,255,0.6), 0 1px 3px rgba(15,23,42,0.15)",transition:"transform 0.15s","&:hover":{transform:"scale(1.08)"}},children:i})},"".concat(r.orderid,"-").concat(t))}))})]},e.rider_id)})),(0,T.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",pt:1.5,pb:2},children:(0,T.jsx)(v.A,{variant:"contained",color:"primary",size:"large",startIcon:(0,T.jsx)(O.$G1,{}),onClick:()=>{if(!Ae.length)return void(0,R.k)("No riders to reconcile","warning",3e3);const e=Ae.filter((e=>te.has(String(e.rider_id))));e.length?we.mutate({riders:e.map((e=>({rider_id:e.rider_id,orders:e.orders})))}):(0,R.k)("No edits to reconcile","info",2500)},disabled:G||0===te.size,fullWidth:J,sx:{minWidth:{xs:0,sm:220},borderRadius:"10px",textTransform:"none",fontWeight:700},children:G?"Reconciling...":0===te.size?"Reconcile":"Reconcile (".concat(te.size,")")})})]})})]}),(0,T.jsx)(d.A,{sx:{px:2,py:1.25,borderTop:"1px solid #eef2f6"},children:(0,T.jsxs)(l.A,{direction:{xs:"column-reverse",sm:"row"},gap:{xs:1,sm:2},alignItems:{xs:"stretch",sm:"center"},justifyContent:"end",children:[(0,T.jsx)(v.A,{variant:"contained",color:"secondary",startIcon:(0,T.jsx)(D.A,{}),fullWidth:J,onClick:()=>t(-1),children:"Back"}),(0,T.jsx)(v.A,{variant:"contained",fullWidth:J,onClick:()=>{null!==be&&void 0!==be&&be.length?(q(!0),$e.mutate({deliveries:be})):(0,R.k)("No deliveries to assign","error",3e3)},children:"Assign Orders"})]})}),(0,T.jsxs)(b.A,{open:ie,onClose:()=>se(!1),maxWidth:"xs",fullWidth:!0,fullScreen:J,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,T.jsx)(S.A,{sx:{fontWeight:700},children:"Change Rider"}),(0,T.jsxs)(_.A,{children:[(0,T.jsxs)(h.A,{sx:{mb:2,fontSize:13,color:"text.secondary"},children:["Move order #",null===oe||void 0===oe?void 0:oe.orderid," (step ",null!==(r=null===oe||void 0===oe?void 0:oe.step)&&void 0!==r?r:"\u2014",") to:"]}),(0,T.jsx)(m.A,{options:ye||[],getOptionLabel:e=>(null===e||void 0===e?void 0:e.label)||"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"",value:le,onChange:(e,r)=>ue(r),renderInput:e=>(0,T.jsx)(p.A,(0,n.A)((0,n.A)({},e),{},{label:"New rider",placeholder:"Pick a rider"}))})]}),(0,T.jsxs)($.A,{sx:{px:3,pb:2,flexDirection:{xs:"column-reverse",sm:"row"},gap:{xs:1,sm:0}},children:[(0,T.jsx)(v.A,{fullWidth:J,onClick:()=>se(!1),children:"Cancel"}),(0,T.jsx)(v.A,{variant:"contained",fullWidth:J,disabled:!le,onClick:()=>{if(!le||!oe)return;const e=Number(le.userid),r=le.label||"".concat(le.firstname||""," ").concat(le.lastname||"").trim()||"Rider ".concat(e);U((t=>((e,r)=>{let{orderId:t,newRiderId:i,newRiderName:s}=r;if(!e)return e;const o=JSON.parse(JSON.stringify(e));if(Array.isArray(o.details)&&(o.details=o.details.map((e=>String(e.orderid)===String(t)?(0,n.A)((0,n.A)({},e),{},{rider_id:i,userid:i,rider_name:s,rider:s}):e))),Array.isArray(o.zones)){let e=null,r=-1;for(let n=0;nString(e.orderid)===String(t)));-1!==a&&(e=o.orders[a],o.orders.splice(a,1),r=n)}}if(e){const t=(0,n.A)((0,n.A)({},e),{},{rider_id:i,userid:i,rider_name:s,rider:s});let a=!1;for(const e of o.zones){if(!Array.isArray(e.riders))continue;const r=e.riders.find((e=>{var r;return String(null!==(r=e.rider_id)&&void 0!==r?r:e.userid)===String(i)}));if(r){r.orders=r.orders||[],r.orders.push(t),a=!0;break}}!a&&r>=0&&o.zones[r].riders.push({rider_id:i,userid:i,rider_name:s,orders:[t]})}}return o})(t,{orderId:oe.orderid,oldRiderId:de,newRiderId:e,newRiderName:r}))),ne((r=>{const t=new Set(r);return null!=de&&t.add(String(de)),null!=e&&Number.isFinite(e)&&t.add(String(e)),t})),re(!1),se(!1),(0,R.k)("Rider changed \u2014 click Reconcile to verify steps","info",2500)},children:"Change Rider"})]})]})]})}}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4917],{4159:function(e){e.exports=function(){"use strict";var e=1e3,r=6e4,t=36e5,n="millisecond",i="second",s="minute",o="hour",a="day",d="week",c="month",l="quarter",u="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var r=["th","st","nd","rd"],t=e%100;return"["+e+(r[(t-20)%10]||r[t]||r[0])+"]"}},x=function(e,r,t){var n=String(e);return!n||n.length>=r?e:""+Array(r+1-n.length).join(t)+e},g={s:x,z:function(e){var r=-e.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),i=t%60;return(r<=0?"+":"-")+x(n,2,"0")+":"+x(i,2,"0")},m:function e(r,t){if(r.date()1)return e(o[0])}else{var a=r.name;A[a]=r,i=a}return!n&&i&&(y=i),i||!n&&y},$=function(e,r){if(S(e))return e.clone();var t="object"==typeof r?r:{};return t.date=e,t.args=arguments,new j(t)},w=g;w.l=_,w.i=S,w.w=function(e,r){return $(e,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var j=function(){function v(e){this.$L=_(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var x=v.prototype;return x.parse=function(e){this.$d=function(e){var r=e.date,t=e.utc;if(null===r)return new Date(NaN);if(w.u(r))return new Date;if(r instanceof Date)return new Date(r);if("string"==typeof r&&!/Z$/i.test(r)){var n=r.match(m);if(n){var i=n[2]-1||0,s=(n[7]||"0").substring(0,3);return t?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(r)}(e),this.init()},x.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},x.$utils=function(){return w},x.isValid=function(){return!(this.$d.toString()===h)},x.isSame=function(e,r){var t=$(e);return this.startOf(r)<=t&&t<=this.endOf(r)},x.isAfter=function(e,r){return $(e){"use strict";t.r(r),t.d(r,{default:()=>L});var n=t(89379),i=t(9950),s=t(28429),o=t(14857),a=t(47223),d=t(16491),c=t(55158),l=t(93230),u=t(83274),f=t(25333),h=t(82053),m=t(77922),p=t(29925),v=t(10226),x=t(48159),g=t(84142),y=t(48089),A=t(25277),b=t(96583),S=t(40033),_=t(28170),$=t(79739),w=t(36150),j=t(51778),k=t(4159),M=t.n(k),D=t(63189),z=t(99324),C=t(6604),O=t(31222),I=t(81425),R=t(20466),W=t(90376),N=t(94826),E=t(88267),H=t(84702),T=t(44414);const Y=[{tuneid:1,type:"Balanced",value:"balanced"},{tuneid:2,type:"Aggressive Speed",value:"aggressive_speed"},{tuneid:3,type:"Fuel Saver",value:"fuel_saver"},{tuneid:4,type:"Zone Strict",value:"zone_strict"}];function F(e){return e.map((e=>{const r=Number(e.cumulativekms||0),t=Number(e.minkm||0),i=Number(e.baseprice||0),s=Number(e.priceperkm||0);return r<=t?(0,n.A)((0,n.A)({},e),{},{deliveryamt:i}):(0,n.A)((0,n.A)({},e),{},{deliveryamt:(r-t)*s+i})}))}const L=()=>{var e,r;const t=(0,s.Zp)(),k=(0,s.zy)().state||{},L=(0,o.A)(),J=(0,a.A)(L.breakpoints.down("md")),[P,U]=(0,i.useState)(k.dispatchPreviewData||null);(0,i.useEffect)((()=>{var e;k.dispatchPreviewData?"undefined"!==typeof window&&null!==(e=window.history)&&void 0!==e&&e.state&&window.history.replaceState((0,n.A)((0,n.A)({},window.history.state),{},{usr:null}),""):t("/nearle/orders",{replace:!0})}),[]);const[B,Z]=(0,i.useState)([]),[V,q]=(0,i.useState)(!1),[K,Q]=(0,i.useState)(0),[G,X]=(0,i.useState)(!1),[ee,re]=(0,i.useState)(!1),[te,ne]=(0,i.useState)((()=>new Set)),[ie,se]=(0,i.useState)(!1),[oe,ae]=(0,i.useState)(null),[de,ce]=(0,i.useState)(null),[le,ue]=(0,i.useState)(null),fe=null!==(e=k.aiMode)&&void 0!==e?e:1,he=k.selectedMode||null,me=k.deliveryData||[],pe=k.autoRiders||[],ve=k.absentRidersPayload||[],xe=k.rider||null,ge=(0,i.useMemo)((()=>{if(k.appId)return k.appId;if("undefined"!==typeof window){const e=localStorage.getItem("applocationid");return e?Number(e):0}return 0}),[k.appId]),{data:ye}=(0,w.I)({queryKey:["ridersList",ge],queryFn:I.Sd,enabled:!!ge,staleTime:3e5}),Ae=(0,i.useMemo)((()=>(e=>{if(!e)return[];const r=new Map,t=new Set,n=(e,n,i)=>{if(null==e)return;const s=String(e);r.has(s)||r.set(s,{rider_id:e,rider_name:n,orders:[]});const o=r.get(s);(i||[]).forEach((e=>{const r=null!=(null===e||void 0===e?void 0:e.orderid)?String(e.orderid):null;if(r){if(t.has(r))return;t.add(r)}o.orders.push(e)})),!o.rider_name&&n&&(o.rider_name=n)};return Array.isArray(e.zones)&&e.zones.length?e.zones.forEach((e=>{(e.riders||[]).forEach((e=>{var r;const t=null!==(r=e.rider_id)&&void 0!==r?r:e.userid,i=e.rider_name||e.username||"Rider ".concat(t);n(t,i,e.orders)}))})):Array.isArray(e.details)&&e.details.forEach((e=>{var r;const t=null!==(r=e.rider_id)&&void 0!==r?r:e.userid,i=e.rider_name||e.ridername||"Rider ".concat(t);n(t,i,[e])})),Array.from(r.values())})(P)),[P]),be=(0,i.useMemo)((()=>{const e=(e=>{const r=[];return e.forEach((e=>{const t=Number(e.rider_id),i=Number.isFinite(t)?t:e.rider_id;(e.orders||[]).forEach((t=>{r.push((0,n.A)((0,n.A)({},t),{},{rider_id:i,userid:i,rider_name:e.rider_name,rider:e.rider_name}))}))})),r})(Ae);return e.length?F(e):Array.isArray(null===P||void 0===P?void 0:P.details)?F(P.details):[]}),[Ae,P]);(0,i.useEffect)((()=>{const e=be.map((e=>({zone_name:e.zone_name,ordernotes:e.ordernotes,rider:e.rider,step:e.step,ordertype:e.ordertype,orderamount:e.orderamount,riderkms:e.riderkms,cumulativekms:e.cumulativekms,baseprice:e.baseprice,minkm:e.minkm,priceperkm:e.priceperkm,kms:e.kms,actualkms:e.actualkms,rider_charge:e.rider_charge,deliveryamt:e.deliveryamt,deliverycharges:e.deliverycharges,profit:e.profit})));Z(e)}),[be]);const Se=(0,j.n)({mutationFn:I.k3,onSuccess:()=>(0,R.k)("Notification sent Successfully","success",2e3),onError:e=>(0,R.k)(e.message,"error",2e3)}),_e=(0,j.n)({mutationFn:0==fe?I.FC:I.Yk,onSuccess:e=>{(0,R.k)("Orders Optimised Successfully","success",2e3),U(e),re(!1),ne(new Set),q(!1)},onError:e=>{(0,R.k)(e.message,"error",4e3),q(!1)},onSettled:()=>q(!1)}),$e=(0,j.n)({mutationFn:I.H2,onSuccess:()=>{(0,R.k)("Delivery Created Successfully","success",2e3),q(!1),null!==xe&&void 0!==xe&&xe.userfcmtoken&&Se.mutate(xe.userfcmtoken),t("/nearle/deliveries")},onError:e=>{(0,R.k)(e.message,"error",4e3),q(!1)},onSettled:()=>q(!1)}),we=(0,j.n)({mutationFn:I.U8,onMutate:()=>X(!0),onSuccess:e=>{Array.isArray(null===e||void 0===e?void 0:e.riders)?(U((r=>((e,r)=>{if(!e||!Array.isArray(null===r||void 0===r?void 0:r.riders))return e;const t=JSON.parse(JSON.stringify(e)),i=new Map(r.riders.map((e=>[String(e.rider_id),e.orders||[]])));Array.isArray(t.zones)&&t.zones.length?(t.zones.forEach((e=>{Array.isArray(e.riders)&&e.riders.forEach((e=>{var r;const t=String(null!==(r=e.rider_id)&&void 0!==r?r:e.userid);i.has(t)&&(e.orders=[])}))})),i.forEach(((e,r)=>{let n=!1;for(const s of t.zones){if(!Array.isArray(s.riders))continue;const t=s.riders.find((e=>{var t;return String(null!==(t=e.rider_id)&&void 0!==t?t:e.userid)===r}));if(t){t.orders=e,n=!0;break}}if(!n){var i;const n=t.zones[0];n.riders=n.riders||[],n.riders.push({rider_id:Number(r)||r,rider_name:(null===(i=e[0])||void 0===i?void 0:i.rider_name)||"Rider ".concat(r),orders:e})}}))):t.zones=[{zone_name:"Reconciled",riders:r.riders.map((e=>({rider_id:e.rider_id,rider_name:e.rider_name||"Rider ".concat(e.rider_id),orders:e.orders||[]})))}];const s=[];return t.zones.forEach((e=>{(e.riders||[]).forEach((e=>{(e.orders||[]).forEach((r=>{s.push((0,n.A)((0,n.A)({},r),{},{rider_id:e.rider_id,userid:e.rider_id,rider_name:e.rider_name,rider:e.rider_name}))}))}))})),t.details=s,t})(r,e))),re(!0),ne((r=>{const t=new Set(r);return e.riders.forEach((e=>t.delete(String(e.rider_id)))),t})),(0,R.k)("Steps reconciled \u2014 preview updated","success",2e3)):(0,R.k)("Reconcile returned no rider data","warning",3e3)},onError:e=>{(0,R.k)(e.message||"Reconcile failed","error",4e3)},onSettled:()=>X(!1)}),je=e=>{q(!0),0==fe?_e.mutate({deliveries:me}):he&&1==(null===he||void 0===he?void 0:he.value)?_e.mutate({deliveries:me,hypertuning_params:e||null,selectedMode:he,absent_riders:ve}):_e.mutate({data:{orders:me,riders:pe,config:{pay_type:"hourly",base_pay:300,strategy:"multi_trip"},absent_riders:ve},selectedMode:he})},ke=(e,r)=>{var t,n,i,s;const o=null!==(t=null!==(n=null!==(i=null!==(s=null===e||void 0===e?void 0:e.rider_id)&&void 0!==s?s:null===e||void 0===e?void 0:e.id)&&void 0!==i?i:null===r||void 0===r?void 0:r.rider_id)&&void 0!==n?n:null===r||void 0===r?void 0:r.userid)&&void 0!==t?t:null;ce(o),ae(r),ue(null),se(!0)};return(0,T.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100vh",overflow:"hidden",position:"relative"},children:[(0,T.jsx)(c.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:V,children:(0,T.jsx)(N.A,{color:"inherit"})}),(0,T.jsx)(d.A,{sx:{py:1.25,px:2,borderBottom:"1px solid #eef2f6"},children:(0,T.jsxs)(l.A,{direction:{xs:"column",md:"row"},alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,T.jsxs)(l.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,T.jsx)(u.A,{title:"Back to orders",placement:"top",children:(0,T.jsx)(f.A,{onClick:()=>t("/nearle/orders"),sx:{bgcolor:"action.hover","&:hover":{bgcolor:"action.selected"}},children:(0,T.jsx)(z.eQE,{size:20})})}),(0,T.jsx)(h.A,{variant:"h3",fontWeight:600,children:"Assign Orders"})]}),(0,T.jsxs)(l.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},spacing:1,sx:{width:{xs:"100%",md:"auto"}},children:[(0,T.jsx)(m.A,{options:Y||[],getOptionLabel:e=>e.type,sx:{minWidth:{xs:0,sm:250},maxWidth:600,flex:1,width:{xs:"100%",sm:"auto"}},renderInput:e=>(0,T.jsx)(p.A,(0,n.A)((0,n.A)({},e),{},{label:"Hyper Tuning"})),onChange:(e,r,t)=>{je("clear"===t?null:r.value)}}),(0,T.jsx)(v.A,{variant:"contained",color:"primary",startIcon:(0,T.jsx)(C.UF6,{}),fullWidth:J,onClick:()=>{q(!0),je("reshuffle")},children:"Re-Assign"}),(0,T.jsx)(W.Ay,{data:B,filename:"Orders_Detail_".concat(M()().format("YYYY-MM-DD_HHmmss"),".csv"),label:" CSV",style:{m:1}})]})]})}),(0,T.jsx)(d.A,{sx:{px:2,borderBottom:"1px solid #eef2f6"},children:(0,T.jsxs)(x.A,{value:K,onChange:(e,r)=>Q(r),variant:J?"fullWidth":"standard",sx:{minHeight:40},children:[(0,T.jsx)(g.A,{label:"Dispatch",sx:{minHeight:40,textTransform:"none",fontWeight:600}}),(0,T.jsx)(g.A,{label:"Reconcile",sx:{minHeight:40,textTransform:"none",fontWeight:600}})]})}),(0,T.jsxs)(d.A,{sx:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[0===K&&P&&(0,T.jsx)(E.default,{data:P,embedded:!0,onChangeRider:(e,r)=>ke(r,e)},(null===P||void 0===P?void 0:P.__cacheKey)||JSON.stringify(Ae.length)),1===K&&(0,T.jsx)(d.A,{sx:{flex:1,overflow:"auto",p:2,bgcolor:"#f8fafc"},children:0===Ae.length?(0,T.jsx)(h.A,{sx:{color:"#94a3b8",textAlign:"center",mt:4},children:"No rider data available to reconcile."}):(0,T.jsxs)(l.A,{spacing:1.75,children:[(0,T.jsx)(d.A,{sx:{bgcolor:ee?"#ecfdf5":"#fffbeb",border:"1px solid ".concat(ee?"#a7f3d0":"#fde68a"),color:ee?"#065f46":"#92400e",borderRadius:"10px",px:1.5,py:1,fontSize:13},children:ee?"Steps have been reconciled. The Dispatch tab and Assign payload are updated.":"Click a numbered step to change its rider. Hit Reconcile to verify the corrected steps with the server."}),Ae.map((e=>{const r=e.orders.reduce(((e,r)=>e+parseFloat(r.actualkms||r.kms||0)),0);return(0,T.jsxs)(y.A,{sx:{p:{xs:1.5,md:2},borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.06)"},children:[(0,T.jsxs)(l.A,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:1.25,flexWrap:"wrap",gap:1},children:[(0,T.jsxs)(l.A,{direction:"row",alignItems:"center",gap:1.25,children:[(0,T.jsx)(d.A,{sx:{width:32,height:32,borderRadius:"8px",bgcolor:"#eef2ff",color:"#4f46e5",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:(0,T.jsx)(O.aVM,{size:18})}),(0,T.jsxs)(d.A,{children:[(0,T.jsx)(h.A,{sx:{fontWeight:700,fontSize:14,color:"#1e293b"},children:e.rider_name}),(0,T.jsxs)(h.A,{sx:{fontSize:11.5,color:"#64748b"},children:["ID: ",e.rider_id]})]})]}),(0,T.jsxs)(l.A,{direction:"row",gap:1,children:[(0,T.jsx)(A.A,{size:"small",label:"".concat(e.orders.length," stops"),sx:{fontWeight:600}}),(0,T.jsx)(A.A,{size:"small",label:"".concat(r.toFixed(1)," km"),variant:"outlined"})]})]}),(0,T.jsx)(l.A,{direction:"row",gap:1.25,sx:{flexWrap:"wrap",alignItems:"center"},children:e.orders.map(((r,t)=>{var n;const i=null!==(n=r.step)&&void 0!==n?n:t+1,s=(0,H.gM)(Number(i)-1);return(0,T.jsx)(u.A,{title:(0,T.jsxs)(d.A,{children:[(0,T.jsxs)("div",{children:["Order #",r.orderid]}),(0,T.jsx)("div",{children:r.deliveryaddress||r.deliverysuburb||""}),(0,T.jsx)("div",{style:{marginTop:4,opacity:.8},children:"Click to change rider"})]}),children:(0,T.jsx)(d.A,{onClick:()=>ke(e,r),sx:{width:36,height:36,borderRadius:"50%",bgcolor:s,color:"#fff",display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:800,fontSize:14,cursor:"pointer",boxShadow:"0 0 0 2px rgba(255,255,255,0.6), 0 1px 3px rgba(15,23,42,0.15)",transition:"transform 0.15s","&:hover":{transform:"scale(1.08)"}},children:i})},"".concat(r.orderid,"-").concat(t))}))})]},e.rider_id)})),(0,T.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",pt:1.5,pb:2},children:(0,T.jsx)(v.A,{variant:"contained",color:"primary",size:"large",startIcon:(0,T.jsx)(O.$G1,{}),onClick:()=>{if(!Ae.length)return void(0,R.k)("No riders to reconcile","warning",3e3);const e=Ae.filter((e=>te.has(String(e.rider_id))));e.length?we.mutate({riders:e.map((e=>({rider_id:e.rider_id,orders:e.orders})))}):(0,R.k)("No edits to reconcile","info",2500)},disabled:G||0===te.size,fullWidth:J,sx:{minWidth:{xs:0,sm:220},borderRadius:"10px",textTransform:"none",fontWeight:700},children:G?"Reconciling...":0===te.size?"Reconcile":"Reconcile (".concat(te.size,")")})})]})})]}),(0,T.jsx)(d.A,{sx:{px:2,py:1.25,borderTop:"1px solid #eef2f6"},children:(0,T.jsxs)(l.A,{direction:{xs:"column-reverse",sm:"row"},gap:{xs:1,sm:2},alignItems:{xs:"stretch",sm:"center"},justifyContent:"end",children:[(0,T.jsx)(v.A,{variant:"contained",color:"secondary",startIcon:(0,T.jsx)(D.A,{}),fullWidth:J,onClick:()=>t(-1),children:"Back"}),(0,T.jsx)(v.A,{variant:"contained",fullWidth:J,onClick:()=>{null!==be&&void 0!==be&&be.length?(q(!0),$e.mutate({deliveries:be})):(0,R.k)("No deliveries to assign","error",3e3)},children:"Assign Orders"})]})}),(0,T.jsxs)(b.A,{open:ie,onClose:()=>se(!1),maxWidth:"xs",fullWidth:!0,fullScreen:J,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,T.jsx)(S.A,{sx:{fontWeight:700},children:"Change Rider"}),(0,T.jsxs)(_.A,{children:[(0,T.jsxs)(h.A,{sx:{mb:2,fontSize:13,color:"text.secondary"},children:["Move order #",null===oe||void 0===oe?void 0:oe.orderid," (step ",null!==(r=null===oe||void 0===oe?void 0:oe.step)&&void 0!==r?r:"\u2014",") to:"]}),(0,T.jsx)(m.A,{options:ye||[],getOptionLabel:e=>(null===e||void 0===e?void 0:e.label)||"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"",value:le,onChange:(e,r)=>ue(r),renderInput:e=>(0,T.jsx)(p.A,(0,n.A)((0,n.A)({},e),{},{label:"New rider",placeholder:"Pick a rider"}))})]}),(0,T.jsxs)($.A,{sx:{px:3,pb:2,flexDirection:{xs:"column-reverse",sm:"row"},gap:{xs:1,sm:0}},children:[(0,T.jsx)(v.A,{fullWidth:J,onClick:()=>se(!1),children:"Cancel"}),(0,T.jsx)(v.A,{variant:"contained",fullWidth:J,disabled:!le,onClick:()=>{if(!le||!oe)return;const e=Number(le.userid),r=le.label||"".concat(le.firstname||""," ").concat(le.lastname||"").trim()||"Rider ".concat(e);U((t=>((e,r)=>{let{orderId:t,newRiderId:i,newRiderName:s}=r;if(!e)return e;const o=JSON.parse(JSON.stringify(e));if(Array.isArray(o.details)&&(o.details=o.details.map((e=>String(e.orderid)===String(t)?(0,n.A)((0,n.A)({},e),{},{rider_id:i,userid:i,rider_name:s,rider:s}):e))),Array.isArray(o.zones)){let e=null,r=-1;for(let n=0;nString(e.orderid)===String(t)));-1!==a&&(e=o.orders[a],o.orders.splice(a,1),r=n)}}if(e){const t=(0,n.A)((0,n.A)({},e),{},{rider_id:i,userid:i,rider_name:s,rider:s});let a=!1;for(const e of o.zones){if(!Array.isArray(e.riders))continue;const r=e.riders.find((e=>{var r;return String(null!==(r=e.rider_id)&&void 0!==r?r:e.userid)===String(i)}));if(r){r.orders=r.orders||[],r.orders.push(t),a=!0;break}}!a&&r>=0&&o.zones[r].riders.push({rider_id:i,userid:i,rider_name:s,orders:[t]})}}return o})(t,{orderId:oe.orderid,oldRiderId:de,newRiderId:e,newRiderName:r}))),ne((r=>{const t=new Set(r);return null!=de&&t.add(String(de)),null!=e&&Number.isFinite(e)&&t.add(String(e)),t})),re(!1),se(!1),(0,R.k)("Rider changed \u2014 click Reconcile to verify steps","info",2500)},children:"Change Rider"})]})]})]})}}}]); \ No newline at end of file diff --git a/build/static/js/4947.9fc997b5.chunk.js b/build/static/js/4947.912f7e20.chunk.js similarity index 99% rename from build/static/js/4947.9fc997b5.chunk.js rename to build/static/js/4947.912f7e20.chunk.js index 9ffe38d..5e9bfce 100644 --- a/build/static/js/4947.9fc997b5.chunk.js +++ b/build/static/js/4947.912f7e20.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4947],{13968:(e,r,t)=>{t.r(r),t.d(r,{default:()=>ze});var o=t(89379),n=t(9950),i=t(47965),l=t(44070),s=t(36256),a=t(13838),c=t(4159),d=t.n(c),x=t(36150),h=t(60010),u=t(51778),p=(t(47659),t(14857)),A=t(94118),g=t(37476),f=t(94826),m=t(52351),j=t(67562),b=t(49883),v=t(31222),y=t(35678),k=t(56311),S=t(44414);var w=t(50027),C=t(20466),W=t(96646),D=t(59212),I=t(27001),z=t(36803);const M=t.p+"static/media/aiImage.89c2ccb91a41d85031e3.png";var Y=t(63189),P=t(99324),R=t(6604),O=t(2235),F=t(41413),T=t(47223),L=t(55158),E=t(59382),N=t(28810),q=t(79046),H=t(33092),K=t(60899),_=t(77922),B=t(29925),U=t(93230),Z=t(83274),Q=t(16491),V=t(82053),X=t(1320),G=t(93038),J=t(25333),$=t(15769),ee=t(69780),re=t(9213),te=t(21671),oe=t(34075),ne=t(96583),ie=t(40033),le=t(25277),se=t(28170),ae=t(79739),ce=t(82223),de=t(74745),xe=t(81425),he=t(58691),ue=t(23787),pe=t(28429),Ae=t(90376),ge=t(88267),fe=t(36220);d().extend(fe);const me={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},je=(e,r)=>"".concat(e).concat(r),be=e=>je(e,"08"),ve=e=>je(e,"18"),ye=e=>je(e,"26"),ke=e=>je(e,"55"),Se="#662582",we=e=>(0,S.jsx)(O.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:me.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Ce=e=>{let{color:r,selected:t,size:o=24,children:n}=e;return(0,S.jsx)(F.A,{sx:{width:o,height:o,bgcolor:t?r:ve(r),color:t?"#fff":r,transition:"background-color 0.15s, color 0.15s"},children:n})},We=()=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ye("#662582"))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}}),De={created:{label:"Created",color:"#0ea5e9",icon:v.F6S},pending:{label:"Pending",color:"#f59e0b",icon:v.tX0},processing:{label:"Processing",color:"#0ea5e9",icon:v.bfP},modified:{label:"Modified",color:"#06b6d4",icon:v.bfP},confirmed:{label:"Confirmed",color:"#10b981",icon:v.mU9},accepted:{label:"Accepted",color:"#6366f1",icon:v.mU9},delivered:{label:"Delivered",color:"#10b981",icon:v.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:v.uDv}},Ie=[{idx:0,status:"created",label:"Created",color:Se,icon:v.F6S,countKey:"created"},{idx:1,status:"pending",label:"Pending",color:"#f59e0b",icon:v.tX0,countKey:"pending"},{idx:2,status:"delivered",label:"Delivered",color:"#10b981",icon:v.mU9,countKey:"delivered"},{idx:3,status:"cancelled",label:"Cancelled",color:"#ef4444",icon:v.uDv,countKey:"cancelled"}],ze=()=>{const e=(0,p.A)(),r=(0,T.A)(e.breakpoints.down("md")),t=(0,pe.Zp)(),c=(0,n.useRef)(),fe=(0,n.useRef)(),je=(0,n.useRef)(null),ze=(0,n.useRef)(null),[Me,Ye]=(0,n.useState)(0),[Pe,Re]=(0,n.useState)("All"),[Oe,Fe]=(0,n.useState)(!1),[Te,Le]=(0,n.useState)(d()().format("YYYY-MM-DD")),[Ee,Ne]=(0,n.useState)(d()().format("YYYY-MM-DD")),[qe,He]=(0,n.useState)("Today"),[Ke,_e]=(0,n.useState)(!1),[Be,Ue]=(0,n.useState)(0),[Ze,Qe]=(0,n.useState)("created"),[Ve,Xe]=(0,n.useState)(!1),[Ge,Je]=(0,n.useState)(!1),[$e,er]=(0,n.useState)(!1),[rr,tr]=(0,n.useState)(null),[or,nr]=(0,n.useState)(null),[ir,lr]=(0,n.useState)(""),[sr,ar]=(0,n.useState)(0),[cr,dr]=(0,n.useState)(null),[xr,hr]=(0,n.useState)(0),[ur,pr]=(0,n.useState)(0),[Ar,gr]=(0,n.useState)(""),[fr,mr]=(0,n.useState)(""),[jr,br]=(0,n.useState)(!1),[vr,yr]=(0,n.useState)(!1),[kr,Sr]=(0,n.useState)(null),[wr,Cr]=(0,n.useState)(null),[Wr,Dr]=(0,n.useState)(!1),[Ir,zr]=(0,n.useState)(!1),[Mr,Yr]=(0,n.useState)(!1),[Pr,Rr]=(0,n.useState)(null),[Or,Fr]=(0,n.useState)([]),[Tr,Lr]=(0,n.useState)([]),[Er,Nr]=(0,n.useState)(null),[qr,Hr]=(0,n.useState)(null),[Kr]=(0,n.useState)(0),[_r,Br]=(0,n.useState)([]),[Ur,Zr]=(0,n.useState)([]),Qr=(0,n.useRef)(0),Vr=(0,n.useRef)(null),[Xr,Gr]=(0,n.useState)(null),[Jr,$r]=(0,n.useState)([]);(0,n.useEffect)((()=>{hr(0),Sr(null),pr(0),Cr(null)}),[Me]),(0,n.useEffect)((()=>{pr(0),Cr(null)}),[xr]),(0,n.useEffect)((()=>{const e=Ur.map((e=>({zone_name:e.zone_name,ordernotes:e.ordernotes,rider:e.rider,step:e.step,ordertype:e.ordertype,orderamount:e.orderamount,riderkms:e.riderkms,cumulativekms:e.cumulativekms,baseprice:e.baseprice,minkm:e.minkm,priceperkm:e.priceperkm,kms:e.kms,actualkms:e.actualkms,rider_charge:e.rider_charge,deliveryamt:e.deliveryamt,deliverycharges:e.deliverycharges,profit:e.profit})));Br(e),console.log("csvExportData",e)}),[Ur]),(0,n.useEffect)((()=>{if(null===Tr||void 0===Tr||!Tr.length)return;const e=Tr.map((e=>{const r=Number(e.cumulativekms||0),t=Number(e.minkm||0),n=Number(e.baseprice||0),i=Number(e.priceperkm||0);return r<=t?(0,o.A)((0,o.A)({},e),{},{deliveryamt:n}):(0,o.A)((0,o.A)({},e),{},{deliveryamt:(r-t)*i+n})}));Zr(e),console.log("finaldeliveryList",e)}),[Tr]);const{data:et,isLoading:rt,isError:tt,error:ot,refetch:nt}=(0,x.I)({queryKey:["percentageData",Me],queryFn:()=>(0,xe.jy)(Me),enabled:!0}),{data:it,isLoading:lt,isError:st,error:at}=(0,x.I)({queryKey:["tenantlist",Me],queryFn:()=>(0,xe.Mn)(Me),enabled:0!==Me}),{data:ct,isLoading:dt,isError:xt,error:ht}=(0,x.I)({queryKey:["gettenantlocations",xr],queryFn:()=>(0,xe.DL)(xr),enabled:0!==xr}),{data:ut=[],isLoading:pt}=(0,x.I)({queryKey:["paymentmodes"],queryFn:xe.HY}),{data:At=[],isLoading:gt}=(0,x.I)({queryKey:["ridersList",Me],queryFn:xe.Sd,enabled:0!==Me}),{data:ft,isLoading:mt,isError:jt,error:bt,refetch:vt}=(0,x.I)({queryKey:["ordersCount",Me,Te,Ee,Ze,xr,ur],queryFn:xe.Hh,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:yt}=(0,x.I)({queryKey:["getallriders"],queryFn:xe.Xw,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:kt,isLoading:St,isError:wt,error:Ct,fetchNextPage:Wt,hasNextPage:Dt,isFetchingNextPage:It,refetch:zt}=(0,h.q)({queryKey:["fetchOrders",Me,Ze,fr,Te,Ee,100,xr,ur],queryFn:xe.nQ,getNextPageParam:e=>{var r;return null!==(r=e.nextPage)&&void 0!==r?r:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,staleTime:0}),Mt=(null===kt||void 0===kt?void 0:kt.pages.flatMap((e=>e.rows)))||[];(0,n.useEffect)((()=>{if(!Dt)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Wt()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Dt,Wt]);const Yt=(0,u.n)({mutationFn:0==Qr.current?xe.FC:xe.Yk,onSuccess:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(console.log("data",e),console.log("varialbles",r),(0,C.k)("Orders Optimised Successfully","success",2e3),vt(),zt(),Fe(!1),br(!1),0==Qr.current)Lr(null===e||void 0===e?void 0:e.details),Nr(null===e||void 0===e?void 0:e.zones),Hr(null===e||void 0===e?void 0:e.meta),Yr(!0);else{var o,n,i;Lr(null===e||void 0===e?void 0:e.details),Nr(null===e||void 0===e?void 0:e.zones),Hr(null===e||void 0===e?void 0:e.meta),Rr(e);const r=Vr.current||{};t("/nearle/dispatch/preview",{state:{dispatchPreviewData:e,aiMode:null!==(o=r.aiMode)&&void 0!==o?o:Qr.current,selectedMode:r.selectedMode||Xr,deliveryData:r.deliveryData||[],autoRiders:r.autoRiders||yt||[],absentRidersPayload:r.absentRidersPayload||[],rider:r.rider||rr,appId:null!==(n=r.appId)&&void 0!==n?n:Me,tenantId:null!==(i=r.tenantid)&&void 0!==i?i:xr,startdate:Te}})}},onError:e=>{(0,C.k)(e.message,"error",4e3),br(!1),Fe(!1)},onSettled:()=>{Et(),Fe(!1),br(!1),yr(!1)}}),Pt=(0,u.n)({mutationFn:xe.H2,onMutate:()=>{yr(!0)},onSuccess:e=>{console.log("create data",e),(0,C.k)("Delivery Created Successfully","success",2e3),t("/nearle/deliveries"),Ft.mutate(null===rr||void 0===rr?void 0:rr.userfcmtoken)},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{yr(!1)}}),Rt=(0,u.n)({mutationFn:xe.N4,onSuccess:e=>{e.status&&(Xe(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),vt(),nt())},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Ot=(0,u.n)({mutationFn:xe.zR,onSuccess:e=>{e.status&&(er(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),zt(),vt(),nt(),Fr([]))},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Ft=(0,u.n)({mutationFn:xe.k3,onSuccess:()=>{(0,C.k)("Notification sent Successfully","success",2e3)},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Tt=async e=>{yr(!0),Fe(!0);const r=Or.map((e=>(0,o.A)((0,o.A)({},e),{},{deliveryid:0,deliverydate:d()(e.deliverydate).utc().format("YYYY-MM-DD HH:mm:ss"),assigntime:d()().format("YYYY-MM-DD HH:mm:ss"),orderstatus:"pending",orderamount:e.deliverycharge,droplat:e.deliverylat,droplon:e.deliverylong,pickuplat:e.pickuplat,pickuplon:e.pickuplong,ordernotes:e.ordernotes,deliverycharges:e.deliverycharge,pickuplocation:e.pickupsuburb,deliverylocation:e.deliverysuburb})));console.log("deliveryData",r);const t=(Jr||[]).map((e=>({userid:e.userid,username:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||e.username||"Rider ".concat(e.userid)})));Vr.current={deliveryData:r,absentRidersPayload:t,autoRiders:yt,selectedMode:Xr,aiMode:Qr.current,rider:rr,appId:Me,tenantid:xr},0==Qr.current?Yt.mutate({deliveries:r}):Xr&&1==(null===Xr||void 0===Xr?void 0:Xr.value)?Yt.mutate({deliveries:1==Xr.value?r:{body:r},hypertuning_params:e||null,selectedMode:Xr,absent_riders:t}):Yt.mutate({data:{orders:r,riders:yt,config:{pay_type:"hourly",base_pay:300,strategy:"multi_trip"},absent_riders:t},selectedMode:Xr})},Lt=(0,u.n)({mutationFn:xe.H2,onSuccess:(e,r)=>{console.log("data",e),console.log("varialbles",r),(0,C.k)("Delivery Created Successfully","success",2e3),yr(!1),t("/nearle/deliveries")},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{yr(!1)}}),Et=()=>{Je(!1),tr(null),nr(null),Gr(null),$r([])},Nt=tt?"Error fetching percentages: ".concat(null===ot||void 0===ot?void 0:ot.message):jt?"Error fetching orders Count: ".concat(null===bt||void 0===bt?void 0:bt.message):wt?"Error fetching orders : ".concat(null===Ct||void 0===Ct?void 0:Ct.message):st?"Error Fetching on Tenants:".concat(null===at||void 0===at?void 0:at.message," "):xt?"Error Fetching on Tenants Locations:".concat(null===ht||void 0===ht?void 0:ht.message," "):null;return(0,n.useEffect)((()=>{Nt&&(console.log(Nt),(0,C.k)(Nt,"error",3e3))}),[Nt]),(0,S.jsxs)(n.Fragment,{children:[(rt||mt||St||lt||dt||jr)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(m.A,{}),(0,S.jsx)(f.A,{})]}),(0,S.jsx)(L.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:jr||St,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(L.A,{sx:{zIndex:1e3},open:Wr}),Or.length>0&&(0,S.jsxs)(E.A,{ariaLabel:"Actions",icon:(0,S.jsx)(N.A,{badgeContent:(null===Or||void 0===Or?void 0:Or.length)||"",color:"secondary",children:(0,S.jsx)(q.A,{})}),open:Wr,onOpen:()=>Dr(!0),onClose:()=>Dr(!1),sx:{position:"fixed",bottom:52,right:16,"& .MuiFab-primary":{bgcolor:"#7b1fa2",color:"#fff","&:hover":{bgcolor:"#6a1b9a"},width:64,height:64}},children:[(0,S.jsx)(H.A,{icon:(0,S.jsx)("img",{src:M,alt:"Assign",style:{width:38,height:38,objectFit:"contain",borderRadius:50}}),tooltipTitle:" Optimisation",FabProps:{sx:{bgcolor:"primary.main",color:"#fff","&:hover":{bgcolor:"primary.dark"},width:64,height:64}},onClick:()=>{Qr.current=1,Dr(!1),Je(!0)}}),(0,S.jsx)(H.A,{icon:(0,S.jsx)(i.A,{style:{fontSize:22}}),tooltipTitle:"Manual Assign",FabProps:{sx:{bgcolor:"success.600",color:"#fff","&:hover":{bgcolor:"success.dark"},width:64,height:64}},onClick:()=>{Qr.current=0,Dr(!1),Je(!0)}}),(0,S.jsx)(H.A,{icon:(0,S.jsx)(l.A,{style:{fontSize:22}}),tooltipTitle:"Delete",FabProps:{sx:{bgcolor:"#d32f2f",color:"#fff","&:hover":{bgcolor:"#9a0007"},width:64,height:64}},onClick:()=>{Dr(!1),er(!0)}})]}),(0,S.jsx)(I.A,{title:"Orders",subtitle:"Live \xb7 ".concat(Pe||"All Zones"," \xb7 ").concat(qe),live:!0,action:(0,S.jsx)(D.A,{ref:je,locaName:Pe,setAppId:Ye,setLocoName:Re,setPage:ar,pill:!0,accentColor:Se,icon:(0,S.jsx)(v.HPi,{size:14}),placeholder:"Select Zone",paperComponent:we,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,S.jsx)(K.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:[{key:"created",label:"Created Orders",color:"#662582",icon:v.AdO,value:null===et||void 0===et?void 0:et.created,percentage:null===et||void 0===et?void 0:et.percentage1},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:v.G6c,value:null===et||void 0===et?void 0:et.uncoveredOrders,percentage:null===et||void 0===et?void 0:et.percentage2},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:v.cAP,value:null===et||void 0===et?void 0:et.coveredOrders,percentage:null===et||void 0===et?void 0:et.percentage3},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:v.qiG,value:null===et||void 0===et?void 0:et.cancelled,percentage:null===et||void 0===et?void 0:et.percentage4}].map((e=>{var r;const t=e.icon;return(0,S.jsx)(K.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,S.jsx)(z.A,{title:e.label,value:null!==(r=e.value)&&void 0!==r?r:0,icon:(0,S.jsx)(t,{size:20}),color:e.color,loading:rt,caption:null!=e.percentage?"".concat(e.percentage,"% of total"):void 0})},e.key)}))}),(0,S.jsxs)(O.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:me.radiusCard/8,border:"1px solid",borderColor:me.borderSubtle,background:"#fff",boxShadow:me.shadowSoft},children:[(0,S.jsxs)(K.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,S.jsx)(_.A,{options:it||[],value:kr,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:we,onOpen:e=>{Me||(e.preventDefault(),(0,C.k)("Please select location first!","warning",3e3),setTimeout((()=>{var e;null===(e=je.current)||void 0===e||e.focus()}),0))},onChange:(e,r,t)=>{"clear"===t?(hr(0),Sr(null),pr(0),Cr(null)):(hr((null===r||void 0===r?void 0:r.tenantid)||0),Sr(r),pr(0),Cr(null))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{inputRef:ze,placeholder:"Select Tenant",size:"small",sx:We(),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsx)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,S.jsx)(Ce,{color:"#94a3b8",size:22,children:(0,S.jsx)(v.Itr,{size:13})})})})}))})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,S.jsx)(_.A,{options:ct||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:wr,PaperComponent:we,onOpen:e=>{Me||xr?xr||(e.preventDefault(),(0,C.k)("Please select Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=ze.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,C.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=je.current)||void 0===e||e.focus()}),0))},onChange:(e,r,t)=>{"clear"===t?(pr(0),Cr(null)):(pr(r.locationid||0),Cr(r))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",sx:We(),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsx)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,S.jsx)(Ce,{color:"#94a3b8",size:22,children:(0,S.jsx)(v.JFD,{size:13})})})})}))})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:12,md:4,children:(0,S.jsxs)(U.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},flexWrap:"wrap",children:[(0,S.jsx)(Z.A,{title:"Date Filter",placement:"top",children:(0,S.jsxs)(Q.A,{onClick:()=>_e(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.5,py:.875,borderRadius:"10px",cursor:"pointer",bgcolor:"#ffffff",border:"1px solid #e2e8f0",color:"#475569",fontWeight:600,fontSize:12,transition:"border-color 0.15s, box-shadow 0.15s","&:hover":{borderColor:"#cbd5e1"},"& svg":{color:"#94a3b8"}},children:[(0,S.jsx)(v.Ki0,{size:15}),d()(Te).format("DD/MM/YY")," \u2013 ",d()(Ee).format("DD/MM/YY")]})}),(0,S.jsx)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:"8px",bgcolor:"#f1f5f9",color:"#64748b",fontSize:11,fontWeight:600},children:qe})]})})]}),(0,S.jsx)(y.A,{open:Ke,onClose:()=>_e(!1),onSelect:e=>{Le(e.startDate),Ne(e.endDate),He(e.label),console.log("Selected Date Range:",e)}})]}),(0,S.jsx)(O.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:me.radiusCard/8,borderTopRightRadius:me.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:me.borderSubtle,borderBottom:0,background:"#fff"},children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,S.jsx)(U.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:me.borderSubtle,borderRadius:4}},children:Ie.map((e=>{var r;const t=e.icon,o=Be===e.idx,n=null!==(r=null===ft||void 0===ft?void 0:ft[e.countKey])&&void 0!==r?r:0;return(0,S.jsxs)(Q.A,{onClick:r=>{return t=e.idx,ar(0),Ue(t),0===t&&Qe("created"),1===t&&Qe("pending"),2===t&&Qe("delivered"),3===t&&Qe("cancelled"),void gr("");var t},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:me.radiusField+"px",border:"1px solid ".concat(o?e.color:me.borderSubtle),bgcolor:o?e.color:me.surface,color:o?"#fff":me.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?e.color:me.borderHover,bgcolor:o?e.color:me.surfaceAlt}},children:[(0,S.jsx)(F.A,{sx:{width:{xs:20,md:22},height:{xs:20,md:22},bgcolor:o?"rgba(255,255,255,0.22)":ve(e.color),color:o?"#fff":e.color},children:(0,S.jsx)(t,{size:12})}),(0,S.jsx)(V.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,S.jsx)(Q.A,{sx:{minWidth:{xs:20,md:24},height:{xs:18,md:20},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":me.surfaceAlt,color:o?"#fff":me.textSecondary,border:"none"},children:n})]},e.status)}))}),(0,S.jsx)(Q.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,S.jsx)(k.A,{value:Ar,onChange:gr,onDebouncedChange:mr,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:be(Se),"& fieldset":{borderColor:ke(Se),borderWidth:1.5},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ye(Se))}}})})]})}),(0,S.jsx)(O.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:me.radiusCard/8,borderBottomRightRadius:me.radiusCard/8,border:"1px solid",borderColor:me.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,S.jsx)(X.A,{ref:fe,onScroll:e=>{const{scrollTop:r,scrollHeight:t,clientHeight:o}=e.currentTarget;r+o>=t-50&&Dt&&!It&&Wt()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ke(Se),borderRadius:8,"&:hover":{backgroundColor:Se}},"&::-webkit-scrollbar-track":{backgroundColor:me.surfaceAlt}},children:r?(0,S.jsxs)(ue.nV,{sx:{p:1.25},children:[0===(null===Mt||void 0===Mt?void 0:Mt.length)&&!St&&(0,S.jsxs)(U.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,S.jsx)(F.A,{sx:{width:64,height:64,bgcolor:ve("#94a3b8"),color:me.textMuted},children:(0,S.jsx)(v.F6S,{size:28})}),(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{fontWeight:700,color:me.textPrimary},children:["No ",Ze," orders"]}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary,textAlign:"center",px:2},children:Ar?"Try a different keyword.":"Adjust the filters above to load orders."})]}),St&&(0,S.jsxs)(U.A,{alignItems:"center",sx:{py:6},children:[(0,S.jsx)(he.A,{}),(0,S.jsx)(V.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}),null===Mt||void 0===Mt?void 0:Mt.map(((r,t)=>{const n=!!Or.find((e=>e.orderheaderid===r.orderheaderid)),i=De[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Se,icon:v.bfP},l=i.icon;return(0,S.jsx)(ue.pg,{accent:i.color,selected:n,header:(0,S.jsxs)(U.A,{spacing:1.25,children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:["created"===Ze&&(0,S.jsx)(G.A,{size:"small",sx:{p:.25,color:ke(Se),"&.Mui-checked":{color:Se}},onChange:e=>{var t;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(t=je.current)||void 0===t||t.focus());e.target.checked?Fr((e=>[...e,(0,o.A)((0,o.A)({},r),{},{sno:e.length+1})])):Fr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})))))},checked:n}),(0,S.jsx)(V.A,{variant:"caption",sx:{fontWeight:700,color:me.textMuted},children:String(100*sr+t+1).padStart(2,"0")}),(0,S.jsxs)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:be(i.color),border:"1px solid ".concat(ke(i.color)),color:i.color,fontSize:10.5,fontWeight:800,whiteSpace:"nowrap"},children:[(0,S.jsx)(l,{size:11})," ",i.label]})]}),"created"===r.orderstatus&&(0,S.jsxs)(U.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"===r.deliverytype&&(0,S.jsx)(J.A,{size:"small",onClick:()=>{(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?dr(null):dr(r)},sx:{borderRadius:999,bgcolor:be("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(ke("#06b6d4")),"&:hover":{bgcolor:ve("#06b6d4")}},children:(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?(0,S.jsx)(j.A,{fontSize:"small"}):(0,S.jsx)(b.A,{fontSize:"small"})}),(0,S.jsx)(J.A,{size:"small",disabled:n,onClick:()=>{Xe(!0),lr(r.orderheaderid)},sx:{borderRadius:999,bgcolor:be("#ef4444"),color:"#ef4444",border:"1px solid ".concat(ke("#ef4444")),"&:hover":{bgcolor:ve("#ef4444")},"&.Mui-disabled":{color:e.palette.secondary.main}},children:(0,S.jsx)(A.A,{})})]})]}),(0,S.jsxs)(Q.A,{sx:{minWidth:0},children:[(0,S.jsx)(V.A,{sx:{fontWeight:800,color:me.textPrimary,fontSize:15},noWrap:!0,children:r.tenantname}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:[r.tenantsuburb,r.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:(0,S.jsxs)(ue.FG,{children:[(0,S.jsxs)(ue.pY,{label:"Order / Location",full:!0,children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,S.jsxs)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:[r.orderid," \xb7 ",d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})]}),(0,S.jsxs)(ue.pY,{label:"Pickup",children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:r.pickupcustomer||"\u2014"}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.pickupcontactno}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.pickupsuburb||r.pickupaddress})]}),(0,S.jsxs)(ue.pY,{label:"Drop",children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:r.deliverycustomer||"\u2014"}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.deliverycontactno}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.deliverysuburb||r.deliveryaddress})]}),(0,S.jsx)(ue.pY,{label:"Qty",value:r.quantity||"\u2014"}),(0,S.jsx)(ue.pY,{label:"KMS",children:(0,S.jsxs)(Q.A,{sx:(s="#06b6d4",{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.25,borderRadius:999,bgcolor:be(s),color:s,fontWeight:700,fontSize:11,border:"1px solid ".concat(ke(s)),whiteSpace:"nowrap"}),children:[r.kms||0," km"]})}),(0,S.jsx)(ue.pY,{label:"COD",children:(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:800,color:r.collectionamt?"#ef4444":me.textMuted},children:r.collectionamt?"\u20b9 ".concat(r.collectionamt.toFixed(2)):"\u2014"})}),(0,S.jsx)(ue.pY,{label:"Charges",children:(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:800,color:r.deliverycharge?"#ef4444":me.textMuted},children:r.deliverycharge?"\u20b9 ".concat(r.deliverycharge.toFixed(2)):"\u2014"})}),r.ordernotes&&(0,S.jsx)(ue.pY,{label:"Notes",full:!0,children:(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:r.ordernotes})})]})},r.sno);var s})),0!=(null===Mt||void 0===Mt?void 0:Mt.length)&&(0,S.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:It||Dt?(0,S.jsx)(he.A,{}):(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textMuted,fontWeight:600},children:"No more orders"})})]}):(0,S.jsxs)($.A,{stickyHeader:!0,sx:{minWidth:{xs:960,md:1180}},children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{sx:{"& th":{backgroundColor:me.surfaceAlt,color:me.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(me.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:["created"==Ze&&(0,S.jsx)(te.A,{sx:{position:"sticky !important"},children:(0,S.jsx)(G.A,{size:"small",sx:{p:.5,color:ke(Se),"&.Mui-checked, &.MuiCheckbox-indeterminate":{color:Se}},indeterminate:Or.length>0&&Or.length!==(null===Mt||void 0===Mt?void 0:Mt.length),checked:Or.length===(null===Mt||void 0===Mt?void 0:Mt.length),onChange:e=>{var r;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(r=je.current)||void 0===r||r.focus());if(e.target.checked){const e=null===Mt||void 0===Mt?void 0:Mt.map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})));Fr(e)}else Fr([])}})}),(0,S.jsx)(te.A,{children:"#"}),(0,S.jsx)(te.A,{children:"Tenant"}),(0,S.jsx)(te.A,{children:"Location"}),(0,S.jsx)(te.A,{children:"Pickup"}),(0,S.jsx)(te.A,{children:"Drop"}),(0,S.jsx)(te.A,{align:"center",children:"QTY"}),(0,S.jsx)(te.A,{align:"right",children:"COD"}),(0,S.jsx)(te.A,{align:"center",children:"KMS"}),(0,S.jsx)(te.A,{align:"right",children:"Charges"}),(0,S.jsx)(te.A,{children:"Notes"}),(0,S.jsx)(te.A,{children:"Status"}),"created"==Ze&&(0,S.jsx)(te.A,{align:"right",children:"Actions"})]})}),(0,S.jsxs)(oe.A,{children:[0===(null===Mt||void 0===Mt?void 0:Mt.length)&&!St&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:13,sx:{py:6},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:1.5,children:[(0,S.jsx)(F.A,{sx:{width:64,height:64,bgcolor:ve("#94a3b8"),color:me.textMuted},children:(0,S.jsx)(v.F6S,{size:28})}),(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{fontWeight:700,color:me.textPrimary},children:["No ",Ze," orders"]}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:Ar?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}),St&&(0,S.jsx)(W.r,{col:8}),null===Mt||void 0===Mt?void 0:Mt.map(((r,t)=>{const n=!!Or.find((e=>e.orderheaderid===r.orderheaderid));return(0,S.jsxs)(re.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s",backgroundColor:n?be(Se):"transparent","& td":{borderBottom:"1px solid ".concat(me.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:n?ve(Se)+" !important":me.surfaceAlt}},children:["created"===Ze&&(0,S.jsx)(te.A,{children:(0,S.jsx)(G.A,{size:"small",sx:{p:.5,color:ke(Se),"&.Mui-checked":{color:Se}},onChange:e=>{var t;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(t=je.current)||void 0===t||t.focus());e.target.checked?Fr((e=>[...e,(0,o.A)((0,o.A)({},r),{},{sno:e.length+1})])):Fr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})))))},checked:n})}),(0,S.jsx)(te.A,{children:(0,S.jsx)(V.A,{children:100*sr+t+1})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:r.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"subtitle1",noWrap:!0,children:r.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,variant:"body2",children:[r.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:r.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(V.A,{variant:"subtitle1",noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,S.jsx)(Z.A,{title:"TenantId - OrderId",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:r.orderid})}),(0,S.jsx)(Z.A,{title:"Pickup Slot",children:(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:[d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:r.pickupcontactno}),(0,S.jsx)(Z.A,{title:r.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:"".concat(r.pickupsuburb||r.pickupaddress.slice(0,12)+".....")})})]})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"subtitle1",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:r.deliverycontactno}),(0,S.jsx)(Z.A,{title:r.deliveryaddress,sx:{whiteSpace:"nowrap"},children:(0,S.jsx)(V.A,{variant:"caption",children:"".concat(r.deliverysuburb||r.deliveryaddress.slice(0,12)+".....")})})]})}),(0,S.jsx)(te.A,{align:"center",children:r.quantity?(0,S.jsx)(V.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:r.quantity}):(0,S.jsx)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.quantity})}),(0,S.jsx)(te.A,{align:"right",children:r.collectionamt?(0,S.jsxs)(V.A,{variant:"subtitle1",color:r.collectionamt?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]}):(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsx)(V.A,{variant:"subtitle1",color:r.kms?"error":null,children:r.kms})}),(0,S.jsx)(te.A,{align:"right",children:r.deliverycharge?(0,S.jsxs)(V.A,{variant:"subtitle1",color:r.deliverycharge?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]}):(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(V.A,{variant:"body1",fontSize:"12px",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.ordernotes})}),(0,S.jsx)(te.A,{align:"left",children:(()=>{const e=De[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Se,icon:v.bfP},t=e.icon;return(0,S.jsxs)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:be(e.color),border:"1px solid ".concat(ke(e.color)),color:e.color,fontSize:11,fontWeight:800,whiteSpace:"nowrap"},children:[(0,S.jsx)(t,{size:12})," ",e.label]})})()}),"created"===r.orderstatus&&(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{flexDirection:"row",justifyContent:"end",children:["C"===r.deliverytype&&(0,S.jsx)(Z.A,{title:"Product details",children:(0,S.jsx)(J.A,{color:"primary",onClick:()=>{(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?dr(null):dr(r)},children:(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?(0,S.jsx)(j.A,{}):(0,S.jsx)(b.A,{})})}),(0,S.jsx)(Z.A,{title:"To Cancel",children:(0,S.jsx)(J.A,{"aria-describedby":"aria-".concat(r.sno),disabled:n,onClick:()=>{Xe(!0),lr(r.orderheaderid)},children:(0,S.jsx)(A.A,{style:{color:n?e.palette.secondary.main:e.palette.error.main}})})})]})})]},r.sno)})),0!=(null===Mt||void 0===Mt?void 0:Mt.length)&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:15,rowSpan:3,sx:{borderBottom:"none"},children:(0,S.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:It||Dt?(0,S.jsx)(he.A,{}):(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textMuted,fontWeight:600},children:"No more orders"})})})})]})]})})}),(0,S.jsxs)(ne.A,{fullScreen:!0,open:Ge,TransitionComponent:g.s,children:[(0,S.jsx)(L.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:jr,children:(0,S.jsx)(f.A,{color:"inherit",text:"Optimising ... .."})}),(0,S.jsx)(ie.A,{sx:{bgcolor:e.palette.primary.lighter},children:(0,S.jsx)(N.A,{badgeContent:null===Or||void 0===Or?void 0:Or.length,color:"primary",children:(0,S.jsx)(le.A,{label:(0,S.jsx)(V.A,{variant:"h3",children:"Preview Orders "}),variant:"contained"})})}),(0,S.jsx)(se.A,{dividers:!0,children:(0,S.jsx)(w.A,{content:!1,children:(0,S.jsx)(X.A,{children:(0,S.jsxs)($.A,{stickyHeader:!0,children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{children:[(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"#"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Tenant"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"order Location"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Pickup"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Delivery"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Notes"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Charges"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"KMS"})]})}),(0,S.jsx)(oe.A,{children:Or.map(((e,r)=>(0,S.jsx)(n.Fragment,{children:(0,S.jsxs)(re.A,{sx:{},children:[(0,S.jsx)(te.A,{children:(0,S.jsxs)(V.A,{children:[" ",e.sno]})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:e.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(Z.A,{title:e.locationaddress,placement:"top",children:(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,S.jsx)(Z.A,{title:"Order Id",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,S.jsxs)(U.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,S.jsxs)(Z.A,{title:"Ordered date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,S.jsxs)(Z.A,{title:"Delivery date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcontactno}),(0,S.jsx)(Z.A,{title:e.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycontactno}),(0,S.jsx)(Z.A,{title:e.deliveryaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:e.ordernotes}),(0,S.jsxs)(te.A,{align:"left",children:["\u20b9 ",e.deliverycharge.toFixed(2)]}),(0,S.jsx)(te.A,{align:"left",children:e.kms})]})},r)))})]})})})}),(0,S.jsx)(ae.A,{sx:{bgcolor:e.palette.secondary.light},children:(0,S.jsx)(K.Ay,{container:!0,sx:{},children:(0,S.jsx)(K.Ay,{item:!0,xs:12,children:(0,S.jsxs)(U.A,{sx:{mt:2,mr:2},direction:"row",justifyContent:"flex-end",flexWrap:"wrap",gap:2,spacing:5,children:[(0,S.jsx)(ce.A,{sx:{width:"130px"},color:"secondary",variant:"contained",onClick:()=>{Et()},startIcon:(0,S.jsx)(A.A,{}),children:"Close"}),1==Qr.current&&(0,S.jsx)(_.A,{options:[{label:"Bike",value:1},{label:"Auto",value:2}],getOptionLabel:e=>e.label,value:Xr,onChange:(e,r)=>{Gr(r),console.log("Selected value:",null===r||void 0===r?void 0:r.value)},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({sx:{width:200,border:"1px solid ",borderColor:"primary.main"}},e),{},{placeholder:"Select Transport"})),isOptionEqualToValue:(e,r)=>e.value===r.value}),1==Qr.current&&(0,S.jsx)(_.A,{multiple:!0,fullWidth:!1,options:At||[],loading:gt,disableCloseOnSelect:!0,limitTags:2,value:Jr,onChange:(e,r)=>$r(r),getOptionLabel:e=>"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),isOptionEqualToValue:(e,r)=>e.userid===r.userid,PaperComponent:e=>(0,S.jsx)(O.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:"0 14px 40px rgba(15, 23, 42, 0.18)",border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ListboxProps:{sx:{py:0,maxHeight:340}},noOptionsText:(0,S.jsxs)(U.A,{alignItems:"center",py:2,spacing:1,children:[(0,S.jsx)(v.vbW,{size:26,color:"#94a3b8"}),(0,S.jsx)(V.A,{variant:"caption",color:"text.secondary",children:"No riders to show for this location"})]}),renderTags:(e,r)=>e.map(((e,t)=>{const i="".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),l=(i.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?",s=r({index:t});return(0,n.createElement)(le.A,(0,o.A)((0,o.A)({},s),{},{key:e.userid,size:"small",avatar:(0,S.jsx)(F.A,{sx:{bgcolor:"#fed7aa",color:"#9a3412",fontSize:10,fontWeight:800},children:l}),label:i,sx:{height:26,bgcolor:"#fff7ed",color:"#9a3412",border:"1px solid",borderColor:"#fdba74",fontWeight:600,fontSize:12,"& .MuiChip-label":{px:.75},"& .MuiChip-deleteIcon":{color:"#c2410c",fontSize:16,"&:hover":{color:"#7c2d12"}}}}))})),renderOption:(e,r,t)=>{let{selected:i}=t;const l="".concat(r.firstname||""," ").concat(r.lastname||"").trim(),s=(l.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?";return(0,n.createElement)("li",(0,o.A)((0,o.A)({},e),{},{key:r.userid,style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",borderBottom:"1px solid #f1f5f9",backgroundColor:i?"#fff7ed":"transparent"}}),(0,S.jsx)(G.A,{size:"small",checked:i,sx:{p:.5,color:"#fb923c","&.Mui-checked":{color:"#ea580c"}}}),(0,S.jsx)(F.A,{sx:{width:34,height:34,bgcolor:i?"#fb923c":"#f1f5f9",color:i?"#fff":"#475569",fontSize:12,fontWeight:800,transition:"background-color 0.15s, color 0.15s"},children:s}),(0,S.jsxs)(U.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,S.jsx)(V.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:l||"Rider #".concat(r.userid)}),(0,S.jsxs)(V.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:["ID #",r.userid,r.contactno?" \xb7 ".concat(r.contactno):""]})]}),i&&(0,S.jsx)(le.A,{size:"small",label:"Absent",sx:{height:18,fontSize:9,fontWeight:800,letterSpacing:.3,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.75}}}))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Absent Riders",placeholder:Jr.length?"":"Pick riders unavailable today",InputLabelProps:{shrink:!0},InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25},children:[(0,S.jsx)(v.ihY,{size:18,color:"#ea580c"}),Jr.length>0&&(0,S.jsx)(le.A,{size:"small",label:Jr.length,sx:{height:18,minWidth:22,fontSize:10,fontWeight:800,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.5}}}),e.InputProps.startAdornment]})}),sx:{minWidth:300,maxWidth:440,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fffbf5",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#fdba74",borderWidth:1.5},"&:hover fieldset":{borderColor:"#fb923c"},"&.Mui-focused":{boxShadow:"0 0 0 3px rgba(251, 146, 60, 0.18)"},"&.Mui-focused fieldset":{borderColor:"#ea580c",borderWidth:2}},"& .MuiInputLabel-root":{fontWeight:700,fontSize:13,color:"#9a3412","&.Mui-focused":{color:"#9a3412"}}}})),sx:{"& .MuiAutocomplete-tag":{my:.25},"& .MuiAutocomplete-endAdornment":{right:8}}}),(0,S.jsx)(ce.A,{color:"primary",disabled:!Xr&&1==Qr.current,variant:"contained",startIcon:1==Qr.current&&(0,S.jsx)("img",{src:M,alt:"Assign",style:{width:32,height:32,objectFit:"contain",borderRadius:50}}),onClick:()=>{br(!0),Tt()},children:Oe?"Optimising...":0==Qr.current?"Optimise Orders":"AI Optimise Orders"})]})})})})]}),(0,S.jsxs)(ne.A,{fullScreen:!0,open:Mr,TransitionComponent:g.s,children:[(0,S.jsx)(ie.A,{children:(0,S.jsx)(U.A,{children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[(0,S.jsx)(Z.A,{title:"Back to orders",placement:"top",children:(0,S.jsx)(J.A,{onClick:()=>Yr(!1),sx:{backgroundColor:"action.hover",color:"text.primary","&:hover":{backgroundColor:"action.selected"}},children:(0,S.jsx)(P.eQE,{size:22})})}),(0,S.jsx)(V.A,{sx:{m:2},variant:"h3",children:"Assign Orders"})]})})}),(0,S.jsx)(de.A,{}),(0,S.jsx)(se.A,{children:(0,S.jsxs)(w.A,{content:!1,children:[(pt||gt||vr)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(m.A,{}),(0,S.jsx)(f.A,{})]}),(0,S.jsx)(L.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:pt||gt||vr,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(X.A,{children:(0,S.jsxs)($.A,{stickyHeader:!0,children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{sx:{backgroundColor:"red"},children:[(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"#"}),1==Kr&&(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Zone"," "]}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Tenant"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"order Location"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Pickup"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Delivery"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Notes"}),1==Kr&&(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Rider"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Type"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Charges"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"KMS"})]})}),(0,S.jsxs)(oe.A,{children:[0==(null===Ur||void 0===Ur?void 0:Ur.length)&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:10,children:(0,S.jsx)(a.A,{})})}),null===Ur||void 0===Ur?void 0:Ur.map(((e,r)=>(0,S.jsxs)(re.A,{sx:{},children:[(0,S.jsx)(te.A,{children:(0,S.jsxs)(V.A,{children:[" ",r+1]})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:e.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(Z.A,{title:e.locationaddress,placement:"top",children:(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,S.jsx)(Z.A,{title:"Order Id",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,S.jsxs)(U.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,S.jsxs)(Z.A,{title:"Ordered date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,S.jsxs)(Z.A,{title:"Delivery date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcontactno}),(0,S.jsx)(Z.A,{title:e.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycontactno}),(0,S.jsx)(Z.A,{title:e.deliveryaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:e.ordernotes}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsx)(le.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary",variant:"light"})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,S.jsx)(Z.A,{title:"Charges",placement:"top",children:(0,S.jsx)(le.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error",variant:"light"})}),(0,S.jsx)(Z.A,{title:"Amount",placement:"left",children:(0,S.jsx)(le.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success",variant:"light"})})]})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,S.jsx)(Z.A,{title:"KMS",placement:"top",children:(0,S.jsx)(le.A,{size:"small",label:"".concat(e.kms," km"),color:"error",variant:"light"})}),(0,S.jsx)(Z.A,{title:"Cumulative Kms",placement:"right",children:(0,S.jsx)(le.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success",variant:"light"})})]})})]},r)))]})]})}),(0,S.jsx)(de.A,{})]})}),(0,S.jsx)(de.A,{}),(0,S.jsxs)(ae.A,{sx:{flexDirection:"column",alignItems:"stretch",p:2,gap:2},children:[(0,S.jsxs)(K.Ay,{container:!0,spacing:2,children:[(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,children:(0,S.jsx)(_.A,{options:ut,fullWidth:!0,renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Payment"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){nr(r);const e=null===Ur||void 0===Ur?void 0:Ur.map((e=>(0,o.A)((0,o.A)({},e),{},{paymenttype:r.apptypeid||42})));Zr(e)}}else nr(null)}})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,children:(0,S.jsx)(_.A,{options:At,fullWidth:!0,renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Rider"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){tr(r);const e=null===Ur||void 0===Ur?void 0:Ur.map((e=>(0,o.A)((0,o.A)({},e),{},{userid:r.userid,fuelcharge:r.fuelcharge||0,userfcmtoken:r.userfcmtoken})));Zr(e)}}else tr(null)}})})]}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,justifyContent:"flex-end",sx:{pt:1,my:2},children:[(0,S.jsx)(ce.A,{variant:"outlined",color:"secondary",startIcon:(0,S.jsx)(Y.A,{}),onClick:()=>Yr(!1),children:"Back"}),(0,S.jsx)(ce.A,{variant:"contained",disabled:!rr||!or,onClick:()=>{null!==Ur&&void 0!==Ur&&Ur.length?Pt.mutate({deliveries:Ur}):(0,C.k)("No deliveries selected","error",3e3)},children:"Assign Orders"})]})]})]}),(0,S.jsxs)(ne.A,{open:Ir,fullScreen:!0,TransitionComponent:g.s,PaperProps:{sx:{display:"flex",flexDirection:"column",overflow:"hidden"}},children:[(0,S.jsx)(L.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:vr,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(ie.A,{sx:{py:1.25},children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{},children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,S.jsx)(Z.A,{title:"Back to orders",placement:"top",children:(0,S.jsx)(J.A,{onClick:()=>t("/nearle/orders"),sx:{bgcolor:"action.hover","&:hover":{bgcolor:"action.selected"}},children:(0,S.jsx)(P.eQE,{size:20})})}),(0,S.jsx)(V.A,{variant:"h3",fontWeight:600,children:"Assign Orders"})]}),(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,S.jsx)(_.A,{options:[{tuneid:1,type:"Balanced",value:"balanced"},{tuneid:2,type:"Aggressive Speed",value:"aggressive_speed"},{tuneid:3,type:"Fuel Saver",value:"fuel_saver"},{tuneid:4,type:"Zone Strict",value:"zone_strict"}]||[],getOptionLabel:e=>e.type,sx:{minWidth:250,maxWidth:600,flex:1},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Hyper Tuning"})),onChange:(e,r,t)=>{"clear"===t?Tt(null):(console.log("val",r),Tt(r.value))}}),(0,S.jsx)(ce.A,{variant:"contained",color:"primary",startIcon:(0,S.jsx)(R.UF6,{}),onClick:()=>{yr(!0),Tt("reshuffle")},children:"Re-Assign"}),(0,S.jsx)(Ae.Ay,{data:_r,filename:"Orders_Detail_".concat(d()().format("YYYY-MM-DD_HHmmss"),".csv"),label:" CSV",style:{m:1}})]})]})}),(0,S.jsx)(se.A,{sx:{p:0,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:Pr&&(0,S.jsx)(ge.default,{data:Pr,embedded:!0})}),(0,S.jsx)(ae.A,{sx:{px:2,py:1.25},children:(0,S.jsxs)(U.A,{direction:"row",gap:2,alignItems:"center",justifyContent:"end",children:[(0,S.jsx)(ce.A,{variant:"contained",color:"secondary",startIcon:(0,S.jsx)(Y.A,{}),onClick:()=>{zr(!1)},children:"Back"}),(0,S.jsx)(ce.A,{variant:"contained",onClick:async()=>{yr(!0),Lt.mutate({deliveries:Ur})},children:"Assign Orders"})]})})]}),(0,S.jsx)(ne.A,{open:Ve,onClose:()=>handleClose(),maxWidth:"xs",children:(0,S.jsx)(se.A,{sx:{mt:2,my:1},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:3.5,children:[(0,S.jsx)(F.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,S.jsx)(s.A,{})}),(0,S.jsx)(U.A,{spacing:2,children:(0,S.jsx)(V.A,{variant:"h4",align:"center",children:"Are you sure you want to cancel this order?"})}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,S.jsx)(ce.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{Rt.mutate(ir)},autoFocus:!0,children:"Yes, Cancel"}),(0,S.jsx)(ce.A,{fullWidth:!0,onClick:()=>{Xe(!1)},color:"secondary",variant:"outlined",children:"No"})]})]})})}),(0,S.jsx)(ne.A,{open:$e,onClose:()=>er(!1),maxWidth:"xs",children:(0,S.jsx)(se.A,{sx:{mt:2,my:1},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:3.5,children:[(0,S.jsx)(F.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,S.jsx)(s.A,{})}),(0,S.jsx)(U.A,{spacing:2,children:(0,S.jsx)(V.A,{variant:"h4",align:"center",children:"Are you sure, you want to cancel multiple orders?"})}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,S.jsx)(ce.A,{fullWidth:!0,onClick:()=>{er(!1)},color:"secondary",variant:"outlined",children:"No"}),(0,S.jsx)(ce.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{Ot.mutate(Or)},autoFocus:!0,children:"Yes, Cancel"})]})]})})})]})}},23787:(e,r,t)=>{t.d(r,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=t(89379),n=t(80045),i=t(93230),l=t(2235),s=t(16491),a=t(82053),c=t(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:r,scroll:t=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},t&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:r}))},h=e=>{let{accent:r="#662582",header:t,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?r:"#e2e8f0",background:i?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[t,d,n]})]})},u=e=>{let{children:r,columns:t=2,sx:n}=e;return(0,c.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(t,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:r})},p=e=>{let{label:r,value:t,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==t&&void 0!==t?t:"\u2014"})})]})}},27001:(e,r,t)=>{t.d(r,{A:()=>s});var o=t(93230),n=t(16491),i=t(82053),l=t(44414);function s(e){let{title:r,subtitle:t,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:r}),t&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:t})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,r,t)=>{t.d(r,{A:()=>v});var o=t(9950),n=t(96583),i=t(40033),l=t(82053),s=t(28170),a=t(93230),c=t(82223),d=t(55916),x=t(4159),h=t.n(x),u=t(56712),p=t(81417),A=t(96600),g=t(53132),f=t(94289),m=t(57326),j=t(50624),b=t(44414);const v=e=>{let{open:r,onClose:t,onSelect:x}=e;const[v,y]=(0,o.useState)(null);return(0,b.jsxs)(n.A,{open:r,onClose:t,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:r,toggle:t,id:"daterange1",onChange:e=>{y({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,A.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,A.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,j.A)(new Date,-1)),endDate:(0,m.A)((0,j.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),t()):t()},children:"OK"})})]})}},36803:(e,r,t)=>{t.d(r,{A:()=>x});var o=t(48089),n=t(50704),i=t(93230),l=t(16491),s=t(82053),a=t(82917),c=t(41413),d=t(44414);function x(e){let{title:r,value:t,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},47659:(e,r,t)=>{t.d(r,{A:()=>d});var o=t(89379),n=t(48089),i=t(50704),l=t(16491),s=t(82053),a=t(60899),c=t(44414);const d=e=>{let{primary:r,secondary:t,percentage:d,color:x,sx:h}=e;return(0,c.jsx)(n.A,{elevation:0,sx:(0,o.A)({background:x,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},h),children:(0,c.jsxs)(i.A,{children:[(0,c.jsx)(l.A,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,c.jsx)(s.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,c.jsxs)(a.Ay,{container:!0,spacing:0,children:[(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:t})}),(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"subtitle2",color:"inherit",children:r})})]})]})})}},56311:(e,r,t)=>{t.d(r,{A:()=>u});var o=t(89379),n=t(9950),i=t(2660),l=t(2046),s=t(83274),a=t(25333),c=t(97125),d=t(7762),x=t(52097),h=t(44414);const u=e=>{let{value:r,onChange:t,onDebouncedChange:u,debounceTime:p=500,placeholder:A="Search (ctrl+k)",sx:g}=e;const f=(0,n.useRef)(null),[m]=(0,x.d7)(r,p);return(0,n.useEffect)((()=>{u&&u(m)}),[m,u]),(0,n.useEffect)((()=>{const e=e=>{var r;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(r=f.current)||void 0===r||r.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:f,placeholder:A,autoComplete:"off",value:r,fullWidth:!0,onChange:e=>t(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:r?"visible":"hidden"},onClick:()=>t(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,r,t)=>{t.d(r,{A:()=>s});t(9950);var o=t(16491),n=t(46639),i=t(62217),l=t(44414);function s(e){let{size:r=70,imgSize:t=40,alt:s="loader"}=e;return(0,l.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(n.A,{size:r}),(0,l.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:t,height:t},children:(0,l.jsx)("img",{src:i,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,r,t)=>{t.d(r,{A:()=>h});var o=t(89379),n=t(9950),i=t(93230),l=t(41413),s=t(77922),a=t(29925),c=t(26910),d=t(31222),x=t(44414);const h=(0,n.forwardRef)(((e,r)=>{let{setAppId:t,setLocoName:h,setPage:u,sx:p,textfeildSx:A,textfieldSx:g,pill:f=!1,accentColor:m="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[y,k]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const r=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(r.data.status){const e=[...r.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),k(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const S=e=>"".concat(m).concat(e),w=S("26"),C=S("18"),W=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(w)},"&.Mui-focused fieldset":{borderColor:m,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:m,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var r;return null!==(r=null===e||void 0===e?void 0:e.locationname)&&void 0!==r?r:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,r,o)=>{"clear"===o?(null===t||void 0===t||t(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):r&&(null===t||void 0===t||t(r.applocationid),null===h||void 0===h||h(r.locationname),null===u||void 0===u||u(0))},renderInput:e=>f?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},W),g||A||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,label:"Select Zones",sx:(0,o.A)({},g||A||{})}))})}))},96646:(e,r,t)=>{t.d(r,{r:()=>a});var o=t(9213),n=t(21671),i=t(82917),l=t(93230),s=t(44414);const a=e=>{let{rowsPerPage:r=5,col:t=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(r)).map(((e,r)=>(0,s.jsxs)(o.A,{children:[(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:t}).map(((e,r)=>(0,s.jsx)(n.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(i.A,{variant:"text",width:100}),(0,s.jsx)(i.A,{variant:"text",width:80})]})},r))),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:150})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(n.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},r)))})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4947],{13968:(e,r,t)=>{t.r(r),t.d(r,{default:()=>ze});var o=t(89379),n=t(9950),i=t(47965),l=t(44070),s=t(36256),a=t(13838),c=t(4159),d=t.n(c),x=t(36150),h=t(60010),u=t(51778),p=(t(47659),t(14857)),A=t(94118),g=t(37476),f=t(94826),m=t(52351),j=t(67562),b=t(49883),v=t(31222),y=t(35678),k=t(56311),S=t(44414);var w=t(50027),C=t(20466),W=t(96646),D=t(59212),I=t(27001),z=t(36803);const M=t.p+"static/media/aiImage.89c2ccb91a41d85031e3.png";var Y=t(63189),P=t(99324),R=t(6604),O=t(2235),F=t(41413),T=t(47223),L=t(55158),E=t(59382),N=t(28810),q=t(79046),H=t(33092),K=t(60899),_=t(77922),B=t(29925),U=t(93230),Z=t(83274),Q=t(16491),V=t(82053),X=t(1320),G=t(93038),J=t(25333),$=t(15769),ee=t(69780),re=t(9213),te=t(21671),oe=t(34075),ne=t(96583),ie=t(40033),le=t(25277),se=t(28170),ae=t(79739),ce=t(10226),de=t(74745),xe=t(81425),he=t(58691),ue=t(23787),pe=t(28429),Ae=t(90376),ge=t(88267),fe=t(36220);d().extend(fe);const me={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},je=(e,r)=>"".concat(e).concat(r),be=e=>je(e,"08"),ve=e=>je(e,"18"),ye=e=>je(e,"26"),ke=e=>je(e,"55"),Se="#662582",we=e=>(0,S.jsx)(O.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:me.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Ce=e=>{let{color:r,selected:t,size:o=24,children:n}=e;return(0,S.jsx)(F.A,{sx:{width:o,height:o,bgcolor:t?r:ve(r),color:t?"#fff":r,transition:"background-color 0.15s, color 0.15s"},children:n})},We=()=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ye("#662582"))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}}),De={created:{label:"Created",color:"#0ea5e9",icon:v.F6S},pending:{label:"Pending",color:"#f59e0b",icon:v.tX0},processing:{label:"Processing",color:"#0ea5e9",icon:v.bfP},modified:{label:"Modified",color:"#06b6d4",icon:v.bfP},confirmed:{label:"Confirmed",color:"#10b981",icon:v.mU9},accepted:{label:"Accepted",color:"#6366f1",icon:v.mU9},delivered:{label:"Delivered",color:"#10b981",icon:v.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:v.uDv}},Ie=[{idx:0,status:"created",label:"Created",color:Se,icon:v.F6S,countKey:"created"},{idx:1,status:"pending",label:"Pending",color:"#f59e0b",icon:v.tX0,countKey:"pending"},{idx:2,status:"delivered",label:"Delivered",color:"#10b981",icon:v.mU9,countKey:"delivered"},{idx:3,status:"cancelled",label:"Cancelled",color:"#ef4444",icon:v.uDv,countKey:"cancelled"}],ze=()=>{const e=(0,p.A)(),r=(0,T.A)(e.breakpoints.down("md")),t=(0,pe.Zp)(),c=(0,n.useRef)(),fe=(0,n.useRef)(),je=(0,n.useRef)(null),ze=(0,n.useRef)(null),[Me,Ye]=(0,n.useState)(0),[Pe,Re]=(0,n.useState)("All"),[Oe,Fe]=(0,n.useState)(!1),[Te,Le]=(0,n.useState)(d()().format("YYYY-MM-DD")),[Ee,Ne]=(0,n.useState)(d()().format("YYYY-MM-DD")),[qe,He]=(0,n.useState)("Today"),[Ke,_e]=(0,n.useState)(!1),[Be,Ue]=(0,n.useState)(0),[Ze,Qe]=(0,n.useState)("created"),[Ve,Xe]=(0,n.useState)(!1),[Ge,Je]=(0,n.useState)(!1),[$e,er]=(0,n.useState)(!1),[rr,tr]=(0,n.useState)(null),[or,nr]=(0,n.useState)(null),[ir,lr]=(0,n.useState)(""),[sr,ar]=(0,n.useState)(0),[cr,dr]=(0,n.useState)(null),[xr,hr]=(0,n.useState)(0),[ur,pr]=(0,n.useState)(0),[Ar,gr]=(0,n.useState)(""),[fr,mr]=(0,n.useState)(""),[jr,br]=(0,n.useState)(!1),[vr,yr]=(0,n.useState)(!1),[kr,Sr]=(0,n.useState)(null),[wr,Cr]=(0,n.useState)(null),[Wr,Dr]=(0,n.useState)(!1),[Ir,zr]=(0,n.useState)(!1),[Mr,Yr]=(0,n.useState)(!1),[Pr,Rr]=(0,n.useState)(null),[Or,Fr]=(0,n.useState)([]),[Tr,Lr]=(0,n.useState)([]),[Er,Nr]=(0,n.useState)(null),[qr,Hr]=(0,n.useState)(null),[Kr]=(0,n.useState)(0),[_r,Br]=(0,n.useState)([]),[Ur,Zr]=(0,n.useState)([]),Qr=(0,n.useRef)(0),Vr=(0,n.useRef)(null),[Xr,Gr]=(0,n.useState)(null),[Jr,$r]=(0,n.useState)([]);(0,n.useEffect)((()=>{hr(0),Sr(null),pr(0),Cr(null)}),[Me]),(0,n.useEffect)((()=>{pr(0),Cr(null)}),[xr]),(0,n.useEffect)((()=>{const e=Ur.map((e=>({zone_name:e.zone_name,ordernotes:e.ordernotes,rider:e.rider,step:e.step,ordertype:e.ordertype,orderamount:e.orderamount,riderkms:e.riderkms,cumulativekms:e.cumulativekms,baseprice:e.baseprice,minkm:e.minkm,priceperkm:e.priceperkm,kms:e.kms,actualkms:e.actualkms,rider_charge:e.rider_charge,deliveryamt:e.deliveryamt,deliverycharges:e.deliverycharges,profit:e.profit})));Br(e),console.log("csvExportData",e)}),[Ur]),(0,n.useEffect)((()=>{if(null===Tr||void 0===Tr||!Tr.length)return;const e=Tr.map((e=>{const r=Number(e.cumulativekms||0),t=Number(e.minkm||0),n=Number(e.baseprice||0),i=Number(e.priceperkm||0);return r<=t?(0,o.A)((0,o.A)({},e),{},{deliveryamt:n}):(0,o.A)((0,o.A)({},e),{},{deliveryamt:(r-t)*i+n})}));Zr(e),console.log("finaldeliveryList",e)}),[Tr]);const{data:et,isLoading:rt,isError:tt,error:ot,refetch:nt}=(0,x.I)({queryKey:["percentageData",Me],queryFn:()=>(0,xe.jy)(Me),enabled:!0}),{data:it,isLoading:lt,isError:st,error:at}=(0,x.I)({queryKey:["tenantlist",Me],queryFn:()=>(0,xe.Mn)(Me),enabled:0!==Me}),{data:ct,isLoading:dt,isError:xt,error:ht}=(0,x.I)({queryKey:["gettenantlocations",xr],queryFn:()=>(0,xe.DL)(xr),enabled:0!==xr}),{data:ut=[],isLoading:pt}=(0,x.I)({queryKey:["paymentmodes"],queryFn:xe.HY}),{data:At=[],isLoading:gt}=(0,x.I)({queryKey:["ridersList",Me],queryFn:xe.Sd,enabled:0!==Me}),{data:ft,isLoading:mt,isError:jt,error:bt,refetch:vt}=(0,x.I)({queryKey:["ordersCount",Me,Te,Ee,Ze,xr,ur],queryFn:xe.Hh,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:yt}=(0,x.I)({queryKey:["getallriders"],queryFn:xe.Xw,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:kt,isLoading:St,isError:wt,error:Ct,fetchNextPage:Wt,hasNextPage:Dt,isFetchingNextPage:It,refetch:zt}=(0,h.q)({queryKey:["fetchOrders",Me,Ze,fr,Te,Ee,100,xr,ur],queryFn:xe.nQ,getNextPageParam:e=>{var r;return null!==(r=e.nextPage)&&void 0!==r?r:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,staleTime:0}),Mt=(null===kt||void 0===kt?void 0:kt.pages.flatMap((e=>e.rows)))||[];(0,n.useEffect)((()=>{if(!Dt)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Wt()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Dt,Wt]);const Yt=(0,u.n)({mutationFn:0==Qr.current?xe.FC:xe.Yk,onSuccess:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(console.log("data",e),console.log("varialbles",r),(0,C.k)("Orders Optimised Successfully","success",2e3),vt(),zt(),Fe(!1),br(!1),0==Qr.current)Lr(null===e||void 0===e?void 0:e.details),Nr(null===e||void 0===e?void 0:e.zones),Hr(null===e||void 0===e?void 0:e.meta),Yr(!0);else{var o,n,i;Lr(null===e||void 0===e?void 0:e.details),Nr(null===e||void 0===e?void 0:e.zones),Hr(null===e||void 0===e?void 0:e.meta),Rr(e);const r=Vr.current||{};t("/nearle/dispatch/preview",{state:{dispatchPreviewData:e,aiMode:null!==(o=r.aiMode)&&void 0!==o?o:Qr.current,selectedMode:r.selectedMode||Xr,deliveryData:r.deliveryData||[],autoRiders:r.autoRiders||yt||[],absentRidersPayload:r.absentRidersPayload||[],rider:r.rider||rr,appId:null!==(n=r.appId)&&void 0!==n?n:Me,tenantId:null!==(i=r.tenantid)&&void 0!==i?i:xr,startdate:Te}})}},onError:e=>{(0,C.k)(e.message,"error",4e3),br(!1),Fe(!1)},onSettled:()=>{Et(),Fe(!1),br(!1),yr(!1)}}),Pt=(0,u.n)({mutationFn:xe.H2,onMutate:()=>{yr(!0)},onSuccess:e=>{console.log("create data",e),(0,C.k)("Delivery Created Successfully","success",2e3),t("/nearle/deliveries"),Ft.mutate(null===rr||void 0===rr?void 0:rr.userfcmtoken)},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{yr(!1)}}),Rt=(0,u.n)({mutationFn:xe.N4,onSuccess:e=>{e.status&&(Xe(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),vt(),nt())},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Ot=(0,u.n)({mutationFn:xe.zR,onSuccess:e=>{e.status&&(er(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),zt(),vt(),nt(),Fr([]))},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Ft=(0,u.n)({mutationFn:xe.k3,onSuccess:()=>{(0,C.k)("Notification sent Successfully","success",2e3)},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Tt=async e=>{yr(!0),Fe(!0);const r=Or.map((e=>(0,o.A)((0,o.A)({},e),{},{deliveryid:0,deliverydate:d()(e.deliverydate).utc().format("YYYY-MM-DD HH:mm:ss"),assigntime:d()().format("YYYY-MM-DD HH:mm:ss"),orderstatus:"pending",orderamount:e.deliverycharge,droplat:e.deliverylat,droplon:e.deliverylong,pickuplat:e.pickuplat,pickuplon:e.pickuplong,ordernotes:e.ordernotes,deliverycharges:e.deliverycharge,pickuplocation:e.pickupsuburb,deliverylocation:e.deliverysuburb})));console.log("deliveryData",r);const t=(Jr||[]).map((e=>({userid:e.userid,username:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||e.username||"Rider ".concat(e.userid)})));Vr.current={deliveryData:r,absentRidersPayload:t,autoRiders:yt,selectedMode:Xr,aiMode:Qr.current,rider:rr,appId:Me,tenantid:xr},0==Qr.current?Yt.mutate({deliveries:r}):Xr&&1==(null===Xr||void 0===Xr?void 0:Xr.value)?Yt.mutate({deliveries:1==Xr.value?r:{body:r},hypertuning_params:e||null,selectedMode:Xr,absent_riders:t}):Yt.mutate({data:{orders:r,riders:yt,config:{pay_type:"hourly",base_pay:300,strategy:"multi_trip"},absent_riders:t},selectedMode:Xr})},Lt=(0,u.n)({mutationFn:xe.H2,onSuccess:(e,r)=>{console.log("data",e),console.log("varialbles",r),(0,C.k)("Delivery Created Successfully","success",2e3),yr(!1),t("/nearle/deliveries")},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{yr(!1)}}),Et=()=>{Je(!1),tr(null),nr(null),Gr(null),$r([])},Nt=tt?"Error fetching percentages: ".concat(null===ot||void 0===ot?void 0:ot.message):jt?"Error fetching orders Count: ".concat(null===bt||void 0===bt?void 0:bt.message):wt?"Error fetching orders : ".concat(null===Ct||void 0===Ct?void 0:Ct.message):st?"Error Fetching on Tenants:".concat(null===at||void 0===at?void 0:at.message," "):xt?"Error Fetching on Tenants Locations:".concat(null===ht||void 0===ht?void 0:ht.message," "):null;return(0,n.useEffect)((()=>{Nt&&(console.log(Nt),(0,C.k)(Nt,"error",3e3))}),[Nt]),(0,S.jsxs)(n.Fragment,{children:[(rt||mt||St||lt||dt||jr)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(m.A,{}),(0,S.jsx)(f.A,{})]}),(0,S.jsx)(L.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:jr||St,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(L.A,{sx:{zIndex:1e3},open:Wr}),Or.length>0&&(0,S.jsxs)(E.A,{ariaLabel:"Actions",icon:(0,S.jsx)(N.A,{badgeContent:(null===Or||void 0===Or?void 0:Or.length)||"",color:"secondary",children:(0,S.jsx)(q.A,{})}),open:Wr,onOpen:()=>Dr(!0),onClose:()=>Dr(!1),sx:{position:"fixed",bottom:52,right:16,"& .MuiFab-primary":{bgcolor:"#7b1fa2",color:"#fff","&:hover":{bgcolor:"#6a1b9a"},width:64,height:64}},children:[(0,S.jsx)(H.A,{icon:(0,S.jsx)("img",{src:M,alt:"Assign",style:{width:38,height:38,objectFit:"contain",borderRadius:50}}),tooltipTitle:" Optimisation",FabProps:{sx:{bgcolor:"primary.main",color:"#fff","&:hover":{bgcolor:"primary.dark"},width:64,height:64}},onClick:()=>{Qr.current=1,Dr(!1),Je(!0)}}),(0,S.jsx)(H.A,{icon:(0,S.jsx)(i.A,{style:{fontSize:22}}),tooltipTitle:"Manual Assign",FabProps:{sx:{bgcolor:"success.600",color:"#fff","&:hover":{bgcolor:"success.dark"},width:64,height:64}},onClick:()=>{Qr.current=0,Dr(!1),Je(!0)}}),(0,S.jsx)(H.A,{icon:(0,S.jsx)(l.A,{style:{fontSize:22}}),tooltipTitle:"Delete",FabProps:{sx:{bgcolor:"#d32f2f",color:"#fff","&:hover":{bgcolor:"#9a0007"},width:64,height:64}},onClick:()=>{Dr(!1),er(!0)}})]}),(0,S.jsx)(I.A,{title:"Orders",subtitle:"Live \xb7 ".concat(Pe||"All Zones"," \xb7 ").concat(qe),live:!0,action:(0,S.jsx)(D.A,{ref:je,locaName:Pe,setAppId:Ye,setLocoName:Re,setPage:ar,pill:!0,accentColor:Se,icon:(0,S.jsx)(v.HPi,{size:14}),placeholder:"Select Zone",paperComponent:we,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,S.jsx)(K.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:[{key:"created",label:"Created Orders",color:"#662582",icon:v.AdO,value:null===et||void 0===et?void 0:et.created,percentage:null===et||void 0===et?void 0:et.percentage1},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:v.G6c,value:null===et||void 0===et?void 0:et.uncoveredOrders,percentage:null===et||void 0===et?void 0:et.percentage2},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:v.cAP,value:null===et||void 0===et?void 0:et.coveredOrders,percentage:null===et||void 0===et?void 0:et.percentage3},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:v.qiG,value:null===et||void 0===et?void 0:et.cancelled,percentage:null===et||void 0===et?void 0:et.percentage4}].map((e=>{var r;const t=e.icon;return(0,S.jsx)(K.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,S.jsx)(z.A,{title:e.label,value:null!==(r=e.value)&&void 0!==r?r:0,icon:(0,S.jsx)(t,{size:20}),color:e.color,loading:rt,caption:null!=e.percentage?"".concat(e.percentage,"% of total"):void 0})},e.key)}))}),(0,S.jsxs)(O.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:me.radiusCard/8,border:"1px solid",borderColor:me.borderSubtle,background:"#fff",boxShadow:me.shadowSoft},children:[(0,S.jsxs)(K.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,S.jsx)(_.A,{options:it||[],value:kr,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:we,onOpen:e=>{Me||(e.preventDefault(),(0,C.k)("Please select location first!","warning",3e3),setTimeout((()=>{var e;null===(e=je.current)||void 0===e||e.focus()}),0))},onChange:(e,r,t)=>{"clear"===t?(hr(0),Sr(null),pr(0),Cr(null)):(hr((null===r||void 0===r?void 0:r.tenantid)||0),Sr(r),pr(0),Cr(null))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{inputRef:ze,placeholder:"Select Tenant",size:"small",sx:We(),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsx)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,S.jsx)(Ce,{color:"#94a3b8",size:22,children:(0,S.jsx)(v.Itr,{size:13})})})})}))})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,S.jsx)(_.A,{options:ct||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:wr,PaperComponent:we,onOpen:e=>{Me||xr?xr||(e.preventDefault(),(0,C.k)("Please select Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=ze.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,C.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=je.current)||void 0===e||e.focus()}),0))},onChange:(e,r,t)=>{"clear"===t?(pr(0),Cr(null)):(pr(r.locationid||0),Cr(r))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",sx:We(),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsx)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,S.jsx)(Ce,{color:"#94a3b8",size:22,children:(0,S.jsx)(v.JFD,{size:13})})})})}))})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:12,md:4,children:(0,S.jsxs)(U.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},flexWrap:"wrap",children:[(0,S.jsx)(Z.A,{title:"Date Filter",placement:"top",children:(0,S.jsxs)(Q.A,{onClick:()=>_e(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.5,py:.875,borderRadius:"10px",cursor:"pointer",bgcolor:"#ffffff",border:"1px solid #e2e8f0",color:"#475569",fontWeight:600,fontSize:12,transition:"border-color 0.15s, box-shadow 0.15s","&:hover":{borderColor:"#cbd5e1"},"& svg":{color:"#94a3b8"}},children:[(0,S.jsx)(v.Ki0,{size:15}),d()(Te).format("DD/MM/YY")," \u2013 ",d()(Ee).format("DD/MM/YY")]})}),(0,S.jsx)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:"8px",bgcolor:"#f1f5f9",color:"#64748b",fontSize:11,fontWeight:600},children:qe})]})})]}),(0,S.jsx)(y.A,{open:Ke,onClose:()=>_e(!1),onSelect:e=>{Le(e.startDate),Ne(e.endDate),He(e.label),console.log("Selected Date Range:",e)}})]}),(0,S.jsx)(O.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:me.radiusCard/8,borderTopRightRadius:me.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:me.borderSubtle,borderBottom:0,background:"#fff"},children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,S.jsx)(U.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:me.borderSubtle,borderRadius:4}},children:Ie.map((e=>{var r;const t=e.icon,o=Be===e.idx,n=null!==(r=null===ft||void 0===ft?void 0:ft[e.countKey])&&void 0!==r?r:0;return(0,S.jsxs)(Q.A,{onClick:r=>{return t=e.idx,ar(0),Ue(t),0===t&&Qe("created"),1===t&&Qe("pending"),2===t&&Qe("delivered"),3===t&&Qe("cancelled"),void gr("");var t},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:me.radiusField+"px",border:"1px solid ".concat(o?e.color:me.borderSubtle),bgcolor:o?e.color:me.surface,color:o?"#fff":me.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?e.color:me.borderHover,bgcolor:o?e.color:me.surfaceAlt}},children:[(0,S.jsx)(F.A,{sx:{width:{xs:20,md:22},height:{xs:20,md:22},bgcolor:o?"rgba(255,255,255,0.22)":ve(e.color),color:o?"#fff":e.color},children:(0,S.jsx)(t,{size:12})}),(0,S.jsx)(V.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,S.jsx)(Q.A,{sx:{minWidth:{xs:20,md:24},height:{xs:18,md:20},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":me.surfaceAlt,color:o?"#fff":me.textSecondary,border:"none"},children:n})]},e.status)}))}),(0,S.jsx)(Q.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,S.jsx)(k.A,{value:Ar,onChange:gr,onDebouncedChange:mr,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:be(Se),"& fieldset":{borderColor:ke(Se),borderWidth:1.5},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ye(Se))}}})})]})}),(0,S.jsx)(O.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:me.radiusCard/8,borderBottomRightRadius:me.radiusCard/8,border:"1px solid",borderColor:me.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,S.jsx)(X.A,{ref:fe,onScroll:e=>{const{scrollTop:r,scrollHeight:t,clientHeight:o}=e.currentTarget;r+o>=t-50&&Dt&&!It&&Wt()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ke(Se),borderRadius:8,"&:hover":{backgroundColor:Se}},"&::-webkit-scrollbar-track":{backgroundColor:me.surfaceAlt}},children:r?(0,S.jsxs)(ue.nV,{sx:{p:1.25},children:[0===(null===Mt||void 0===Mt?void 0:Mt.length)&&!St&&(0,S.jsxs)(U.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,S.jsx)(F.A,{sx:{width:64,height:64,bgcolor:ve("#94a3b8"),color:me.textMuted},children:(0,S.jsx)(v.F6S,{size:28})}),(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{fontWeight:700,color:me.textPrimary},children:["No ",Ze," orders"]}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary,textAlign:"center",px:2},children:Ar?"Try a different keyword.":"Adjust the filters above to load orders."})]}),St&&(0,S.jsxs)(U.A,{alignItems:"center",sx:{py:6},children:[(0,S.jsx)(he.A,{}),(0,S.jsx)(V.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}),null===Mt||void 0===Mt?void 0:Mt.map(((r,t)=>{const n=!!Or.find((e=>e.orderheaderid===r.orderheaderid)),i=De[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Se,icon:v.bfP},l=i.icon;return(0,S.jsx)(ue.pg,{accent:i.color,selected:n,header:(0,S.jsxs)(U.A,{spacing:1.25,children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:["created"===Ze&&(0,S.jsx)(G.A,{size:"small",sx:{p:.25,color:ke(Se),"&.Mui-checked":{color:Se}},onChange:e=>{var t;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(t=je.current)||void 0===t||t.focus());e.target.checked?Fr((e=>[...e,(0,o.A)((0,o.A)({},r),{},{sno:e.length+1})])):Fr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})))))},checked:n}),(0,S.jsx)(V.A,{variant:"caption",sx:{fontWeight:700,color:me.textMuted},children:String(100*sr+t+1).padStart(2,"0")}),(0,S.jsxs)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:be(i.color),border:"1px solid ".concat(ke(i.color)),color:i.color,fontSize:10.5,fontWeight:800,whiteSpace:"nowrap"},children:[(0,S.jsx)(l,{size:11})," ",i.label]})]}),"created"===r.orderstatus&&(0,S.jsxs)(U.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"===r.deliverytype&&(0,S.jsx)(J.A,{size:"small",onClick:()=>{(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?dr(null):dr(r)},sx:{borderRadius:999,bgcolor:be("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(ke("#06b6d4")),"&:hover":{bgcolor:ve("#06b6d4")}},children:(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?(0,S.jsx)(j.A,{fontSize:"small"}):(0,S.jsx)(b.A,{fontSize:"small"})}),(0,S.jsx)(J.A,{size:"small",disabled:n,onClick:()=>{Xe(!0),lr(r.orderheaderid)},sx:{borderRadius:999,bgcolor:be("#ef4444"),color:"#ef4444",border:"1px solid ".concat(ke("#ef4444")),"&:hover":{bgcolor:ve("#ef4444")},"&.Mui-disabled":{color:e.palette.secondary.main}},children:(0,S.jsx)(A.A,{})})]})]}),(0,S.jsxs)(Q.A,{sx:{minWidth:0},children:[(0,S.jsx)(V.A,{sx:{fontWeight:800,color:me.textPrimary,fontSize:15},noWrap:!0,children:r.tenantname}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:[r.tenantsuburb,r.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:(0,S.jsxs)(ue.FG,{children:[(0,S.jsxs)(ue.pY,{label:"Order / Location",full:!0,children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,S.jsxs)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:[r.orderid," \xb7 ",d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})]}),(0,S.jsxs)(ue.pY,{label:"Pickup",children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:r.pickupcustomer||"\u2014"}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.pickupcontactno}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.pickupsuburb||r.pickupaddress})]}),(0,S.jsxs)(ue.pY,{label:"Drop",children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:r.deliverycustomer||"\u2014"}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.deliverycontactno}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.deliverysuburb||r.deliveryaddress})]}),(0,S.jsx)(ue.pY,{label:"Qty",value:r.quantity||"\u2014"}),(0,S.jsx)(ue.pY,{label:"KMS",children:(0,S.jsxs)(Q.A,{sx:(s="#06b6d4",{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.25,borderRadius:999,bgcolor:be(s),color:s,fontWeight:700,fontSize:11,border:"1px solid ".concat(ke(s)),whiteSpace:"nowrap"}),children:[r.kms||0," km"]})}),(0,S.jsx)(ue.pY,{label:"COD",children:(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:800,color:r.collectionamt?"#ef4444":me.textMuted},children:r.collectionamt?"\u20b9 ".concat(r.collectionamt.toFixed(2)):"\u2014"})}),(0,S.jsx)(ue.pY,{label:"Charges",children:(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:800,color:r.deliverycharge?"#ef4444":me.textMuted},children:r.deliverycharge?"\u20b9 ".concat(r.deliverycharge.toFixed(2)):"\u2014"})}),r.ordernotes&&(0,S.jsx)(ue.pY,{label:"Notes",full:!0,children:(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:r.ordernotes})})]})},r.sno);var s})),0!=(null===Mt||void 0===Mt?void 0:Mt.length)&&(0,S.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:It||Dt?(0,S.jsx)(he.A,{}):(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textMuted,fontWeight:600},children:"No more orders"})})]}):(0,S.jsxs)($.A,{stickyHeader:!0,sx:{minWidth:{xs:960,md:1180}},children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{sx:{"& th":{backgroundColor:me.surfaceAlt,color:me.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(me.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:["created"==Ze&&(0,S.jsx)(te.A,{sx:{position:"sticky !important"},children:(0,S.jsx)(G.A,{size:"small",sx:{p:.5,color:ke(Se),"&.Mui-checked, &.MuiCheckbox-indeterminate":{color:Se}},indeterminate:Or.length>0&&Or.length!==(null===Mt||void 0===Mt?void 0:Mt.length),checked:Or.length===(null===Mt||void 0===Mt?void 0:Mt.length),onChange:e=>{var r;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(r=je.current)||void 0===r||r.focus());if(e.target.checked){const e=null===Mt||void 0===Mt?void 0:Mt.map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})));Fr(e)}else Fr([])}})}),(0,S.jsx)(te.A,{children:"#"}),(0,S.jsx)(te.A,{children:"Tenant"}),(0,S.jsx)(te.A,{children:"Location"}),(0,S.jsx)(te.A,{children:"Pickup"}),(0,S.jsx)(te.A,{children:"Drop"}),(0,S.jsx)(te.A,{align:"center",children:"QTY"}),(0,S.jsx)(te.A,{align:"right",children:"COD"}),(0,S.jsx)(te.A,{align:"center",children:"KMS"}),(0,S.jsx)(te.A,{align:"right",children:"Charges"}),(0,S.jsx)(te.A,{children:"Notes"}),(0,S.jsx)(te.A,{children:"Status"}),"created"==Ze&&(0,S.jsx)(te.A,{align:"right",children:"Actions"})]})}),(0,S.jsxs)(oe.A,{children:[0===(null===Mt||void 0===Mt?void 0:Mt.length)&&!St&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:13,sx:{py:6},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:1.5,children:[(0,S.jsx)(F.A,{sx:{width:64,height:64,bgcolor:ve("#94a3b8"),color:me.textMuted},children:(0,S.jsx)(v.F6S,{size:28})}),(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{fontWeight:700,color:me.textPrimary},children:["No ",Ze," orders"]}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:Ar?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}),St&&(0,S.jsx)(W.r,{col:8}),null===Mt||void 0===Mt?void 0:Mt.map(((r,t)=>{const n=!!Or.find((e=>e.orderheaderid===r.orderheaderid));return(0,S.jsxs)(re.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s",backgroundColor:n?be(Se):"transparent","& td":{borderBottom:"1px solid ".concat(me.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:n?ve(Se)+" !important":me.surfaceAlt}},children:["created"===Ze&&(0,S.jsx)(te.A,{children:(0,S.jsx)(G.A,{size:"small",sx:{p:.5,color:ke(Se),"&.Mui-checked":{color:Se}},onChange:e=>{var t;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(t=je.current)||void 0===t||t.focus());e.target.checked?Fr((e=>[...e,(0,o.A)((0,o.A)({},r),{},{sno:e.length+1})])):Fr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})))))},checked:n})}),(0,S.jsx)(te.A,{children:(0,S.jsx)(V.A,{children:100*sr+t+1})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:r.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"subtitle1",noWrap:!0,children:r.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,variant:"body2",children:[r.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:r.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(V.A,{variant:"subtitle1",noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,S.jsx)(Z.A,{title:"TenantId - OrderId",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:r.orderid})}),(0,S.jsx)(Z.A,{title:"Pickup Slot",children:(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:[d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:r.pickupcontactno}),(0,S.jsx)(Z.A,{title:r.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:"".concat(r.pickupsuburb||r.pickupaddress.slice(0,12)+".....")})})]})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"subtitle1",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:r.deliverycontactno}),(0,S.jsx)(Z.A,{title:r.deliveryaddress,sx:{whiteSpace:"nowrap"},children:(0,S.jsx)(V.A,{variant:"caption",children:"".concat(r.deliverysuburb||r.deliveryaddress.slice(0,12)+".....")})})]})}),(0,S.jsx)(te.A,{align:"center",children:r.quantity?(0,S.jsx)(V.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:r.quantity}):(0,S.jsx)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.quantity})}),(0,S.jsx)(te.A,{align:"right",children:r.collectionamt?(0,S.jsxs)(V.A,{variant:"subtitle1",color:r.collectionamt?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]}):(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsx)(V.A,{variant:"subtitle1",color:r.kms?"error":null,children:r.kms})}),(0,S.jsx)(te.A,{align:"right",children:r.deliverycharge?(0,S.jsxs)(V.A,{variant:"subtitle1",color:r.deliverycharge?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]}):(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(V.A,{variant:"body1",fontSize:"12px",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.ordernotes})}),(0,S.jsx)(te.A,{align:"left",children:(()=>{const e=De[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Se,icon:v.bfP},t=e.icon;return(0,S.jsxs)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:be(e.color),border:"1px solid ".concat(ke(e.color)),color:e.color,fontSize:11,fontWeight:800,whiteSpace:"nowrap"},children:[(0,S.jsx)(t,{size:12})," ",e.label]})})()}),"created"===r.orderstatus&&(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{flexDirection:"row",justifyContent:"end",children:["C"===r.deliverytype&&(0,S.jsx)(Z.A,{title:"Product details",children:(0,S.jsx)(J.A,{color:"primary",onClick:()=>{(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?dr(null):dr(r)},children:(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?(0,S.jsx)(j.A,{}):(0,S.jsx)(b.A,{})})}),(0,S.jsx)(Z.A,{title:"To Cancel",children:(0,S.jsx)(J.A,{"aria-describedby":"aria-".concat(r.sno),disabled:n,onClick:()=>{Xe(!0),lr(r.orderheaderid)},children:(0,S.jsx)(A.A,{style:{color:n?e.palette.secondary.main:e.palette.error.main}})})})]})})]},r.sno)})),0!=(null===Mt||void 0===Mt?void 0:Mt.length)&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:15,rowSpan:3,sx:{borderBottom:"none"},children:(0,S.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:It||Dt?(0,S.jsx)(he.A,{}):(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textMuted,fontWeight:600},children:"No more orders"})})})})]})]})})}),(0,S.jsxs)(ne.A,{fullScreen:!0,open:Ge,TransitionComponent:g.s,children:[(0,S.jsx)(L.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:jr,children:(0,S.jsx)(f.A,{color:"inherit",text:"Optimising ... .."})}),(0,S.jsx)(ie.A,{sx:{bgcolor:e.palette.primary.lighter},children:(0,S.jsx)(N.A,{badgeContent:null===Or||void 0===Or?void 0:Or.length,color:"primary",children:(0,S.jsx)(le.A,{label:(0,S.jsx)(V.A,{variant:"h3",children:"Preview Orders "}),variant:"contained"})})}),(0,S.jsx)(se.A,{dividers:!0,children:(0,S.jsx)(w.A,{content:!1,children:(0,S.jsx)(X.A,{children:(0,S.jsxs)($.A,{stickyHeader:!0,children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{children:[(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"#"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Tenant"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"order Location"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Pickup"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Delivery"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Notes"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Charges"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"KMS"})]})}),(0,S.jsx)(oe.A,{children:Or.map(((e,r)=>(0,S.jsx)(n.Fragment,{children:(0,S.jsxs)(re.A,{sx:{},children:[(0,S.jsx)(te.A,{children:(0,S.jsxs)(V.A,{children:[" ",e.sno]})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:e.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(Z.A,{title:e.locationaddress,placement:"top",children:(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,S.jsx)(Z.A,{title:"Order Id",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,S.jsxs)(U.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,S.jsxs)(Z.A,{title:"Ordered date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,S.jsxs)(Z.A,{title:"Delivery date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcontactno}),(0,S.jsx)(Z.A,{title:e.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycontactno}),(0,S.jsx)(Z.A,{title:e.deliveryaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:e.ordernotes}),(0,S.jsxs)(te.A,{align:"left",children:["\u20b9 ",e.deliverycharge.toFixed(2)]}),(0,S.jsx)(te.A,{align:"left",children:e.kms})]})},r)))})]})})})}),(0,S.jsx)(ae.A,{sx:{bgcolor:e.palette.secondary.light},children:(0,S.jsx)(K.Ay,{container:!0,sx:{},children:(0,S.jsx)(K.Ay,{item:!0,xs:12,children:(0,S.jsxs)(U.A,{sx:{mt:2,mr:2},direction:"row",justifyContent:"flex-end",flexWrap:"wrap",gap:2,spacing:5,children:[(0,S.jsx)(ce.A,{sx:{width:"130px"},color:"secondary",variant:"contained",onClick:()=>{Et()},startIcon:(0,S.jsx)(A.A,{}),children:"Close"}),1==Qr.current&&(0,S.jsx)(_.A,{options:[{label:"Bike",value:1},{label:"Auto",value:2}],getOptionLabel:e=>e.label,value:Xr,onChange:(e,r)=>{Gr(r),console.log("Selected value:",null===r||void 0===r?void 0:r.value)},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({sx:{width:200,border:"1px solid ",borderColor:"primary.main"}},e),{},{placeholder:"Select Transport"})),isOptionEqualToValue:(e,r)=>e.value===r.value}),1==Qr.current&&(0,S.jsx)(_.A,{multiple:!0,fullWidth:!1,options:At||[],loading:gt,disableCloseOnSelect:!0,limitTags:2,value:Jr,onChange:(e,r)=>$r(r),getOptionLabel:e=>"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),isOptionEqualToValue:(e,r)=>e.userid===r.userid,PaperComponent:e=>(0,S.jsx)(O.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:"0 14px 40px rgba(15, 23, 42, 0.18)",border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ListboxProps:{sx:{py:0,maxHeight:340}},noOptionsText:(0,S.jsxs)(U.A,{alignItems:"center",py:2,spacing:1,children:[(0,S.jsx)(v.vbW,{size:26,color:"#94a3b8"}),(0,S.jsx)(V.A,{variant:"caption",color:"text.secondary",children:"No riders to show for this location"})]}),renderTags:(e,r)=>e.map(((e,t)=>{const i="".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),l=(i.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?",s=r({index:t});return(0,n.createElement)(le.A,(0,o.A)((0,o.A)({},s),{},{key:e.userid,size:"small",avatar:(0,S.jsx)(F.A,{sx:{bgcolor:"#fed7aa",color:"#9a3412",fontSize:10,fontWeight:800},children:l}),label:i,sx:{height:26,bgcolor:"#fff7ed",color:"#9a3412",border:"1px solid",borderColor:"#fdba74",fontWeight:600,fontSize:12,"& .MuiChip-label":{px:.75},"& .MuiChip-deleteIcon":{color:"#c2410c",fontSize:16,"&:hover":{color:"#7c2d12"}}}}))})),renderOption:(e,r,t)=>{let{selected:i}=t;const l="".concat(r.firstname||""," ").concat(r.lastname||"").trim(),s=(l.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?";return(0,n.createElement)("li",(0,o.A)((0,o.A)({},e),{},{key:r.userid,style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",borderBottom:"1px solid #f1f5f9",backgroundColor:i?"#fff7ed":"transparent"}}),(0,S.jsx)(G.A,{size:"small",checked:i,sx:{p:.5,color:"#fb923c","&.Mui-checked":{color:"#ea580c"}}}),(0,S.jsx)(F.A,{sx:{width:34,height:34,bgcolor:i?"#fb923c":"#f1f5f9",color:i?"#fff":"#475569",fontSize:12,fontWeight:800,transition:"background-color 0.15s, color 0.15s"},children:s}),(0,S.jsxs)(U.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,S.jsx)(V.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:l||"Rider #".concat(r.userid)}),(0,S.jsxs)(V.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:["ID #",r.userid,r.contactno?" \xb7 ".concat(r.contactno):""]})]}),i&&(0,S.jsx)(le.A,{size:"small",label:"Absent",sx:{height:18,fontSize:9,fontWeight:800,letterSpacing:.3,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.75}}}))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Absent Riders",placeholder:Jr.length?"":"Pick riders unavailable today",InputLabelProps:{shrink:!0},InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25},children:[(0,S.jsx)(v.ihY,{size:18,color:"#ea580c"}),Jr.length>0&&(0,S.jsx)(le.A,{size:"small",label:Jr.length,sx:{height:18,minWidth:22,fontSize:10,fontWeight:800,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.5}}}),e.InputProps.startAdornment]})}),sx:{minWidth:300,maxWidth:440,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fffbf5",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#fdba74",borderWidth:1.5},"&:hover fieldset":{borderColor:"#fb923c"},"&.Mui-focused":{boxShadow:"0 0 0 3px rgba(251, 146, 60, 0.18)"},"&.Mui-focused fieldset":{borderColor:"#ea580c",borderWidth:2}},"& .MuiInputLabel-root":{fontWeight:700,fontSize:13,color:"#9a3412","&.Mui-focused":{color:"#9a3412"}}}})),sx:{"& .MuiAutocomplete-tag":{my:.25},"& .MuiAutocomplete-endAdornment":{right:8}}}),(0,S.jsx)(ce.A,{color:"primary",disabled:!Xr&&1==Qr.current,variant:"contained",startIcon:1==Qr.current&&(0,S.jsx)("img",{src:M,alt:"Assign",style:{width:32,height:32,objectFit:"contain",borderRadius:50}}),onClick:()=>{br(!0),Tt()},children:Oe?"Optimising...":0==Qr.current?"Optimise Orders":"AI Optimise Orders"})]})})})})]}),(0,S.jsxs)(ne.A,{fullScreen:!0,open:Mr,TransitionComponent:g.s,children:[(0,S.jsx)(ie.A,{children:(0,S.jsx)(U.A,{children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[(0,S.jsx)(Z.A,{title:"Back to orders",placement:"top",children:(0,S.jsx)(J.A,{onClick:()=>Yr(!1),sx:{backgroundColor:"action.hover",color:"text.primary","&:hover":{backgroundColor:"action.selected"}},children:(0,S.jsx)(P.eQE,{size:22})})}),(0,S.jsx)(V.A,{sx:{m:2},variant:"h3",children:"Assign Orders"})]})})}),(0,S.jsx)(de.A,{}),(0,S.jsx)(se.A,{children:(0,S.jsxs)(w.A,{content:!1,children:[(pt||gt||vr)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(m.A,{}),(0,S.jsx)(f.A,{})]}),(0,S.jsx)(L.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:pt||gt||vr,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(X.A,{children:(0,S.jsxs)($.A,{stickyHeader:!0,children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{sx:{backgroundColor:"red"},children:[(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"#"}),1==Kr&&(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Zone"," "]}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Tenant"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"order Location"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Pickup"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Delivery"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Notes"}),1==Kr&&(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Rider"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Type"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Charges"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"KMS"})]})}),(0,S.jsxs)(oe.A,{children:[0==(null===Ur||void 0===Ur?void 0:Ur.length)&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:10,children:(0,S.jsx)(a.A,{})})}),null===Ur||void 0===Ur?void 0:Ur.map(((e,r)=>(0,S.jsxs)(re.A,{sx:{},children:[(0,S.jsx)(te.A,{children:(0,S.jsxs)(V.A,{children:[" ",r+1]})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:e.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(Z.A,{title:e.locationaddress,placement:"top",children:(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,S.jsx)(Z.A,{title:"Order Id",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,S.jsxs)(U.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,S.jsxs)(Z.A,{title:"Ordered date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,S.jsxs)(Z.A,{title:"Delivery date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcontactno}),(0,S.jsx)(Z.A,{title:e.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycontactno}),(0,S.jsx)(Z.A,{title:e.deliveryaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:e.ordernotes}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsx)(le.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary",variant:"light"})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,S.jsx)(Z.A,{title:"Charges",placement:"top",children:(0,S.jsx)(le.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error",variant:"light"})}),(0,S.jsx)(Z.A,{title:"Amount",placement:"left",children:(0,S.jsx)(le.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success",variant:"light"})})]})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,S.jsx)(Z.A,{title:"KMS",placement:"top",children:(0,S.jsx)(le.A,{size:"small",label:"".concat(e.kms," km"),color:"error",variant:"light"})}),(0,S.jsx)(Z.A,{title:"Cumulative Kms",placement:"right",children:(0,S.jsx)(le.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success",variant:"light"})})]})})]},r)))]})]})}),(0,S.jsx)(de.A,{})]})}),(0,S.jsx)(de.A,{}),(0,S.jsxs)(ae.A,{sx:{flexDirection:"column",alignItems:"stretch",p:2,gap:2},children:[(0,S.jsxs)(K.Ay,{container:!0,spacing:2,children:[(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,children:(0,S.jsx)(_.A,{options:ut,fullWidth:!0,renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Payment"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){nr(r);const e=null===Ur||void 0===Ur?void 0:Ur.map((e=>(0,o.A)((0,o.A)({},e),{},{paymenttype:r.apptypeid||42})));Zr(e)}}else nr(null)}})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,children:(0,S.jsx)(_.A,{options:At,fullWidth:!0,renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Rider"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){tr(r);const e=null===Ur||void 0===Ur?void 0:Ur.map((e=>(0,o.A)((0,o.A)({},e),{},{userid:r.userid,fuelcharge:r.fuelcharge||0,userfcmtoken:r.userfcmtoken})));Zr(e)}}else tr(null)}})})]}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,justifyContent:"flex-end",sx:{pt:1,my:2},children:[(0,S.jsx)(ce.A,{variant:"outlined",color:"secondary",startIcon:(0,S.jsx)(Y.A,{}),onClick:()=>Yr(!1),children:"Back"}),(0,S.jsx)(ce.A,{variant:"contained",disabled:!rr||!or,onClick:()=>{null!==Ur&&void 0!==Ur&&Ur.length?Pt.mutate({deliveries:Ur}):(0,C.k)("No deliveries selected","error",3e3)},children:"Assign Orders"})]})]})]}),(0,S.jsxs)(ne.A,{open:Ir,fullScreen:!0,TransitionComponent:g.s,PaperProps:{sx:{display:"flex",flexDirection:"column",overflow:"hidden"}},children:[(0,S.jsx)(L.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:vr,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(ie.A,{sx:{py:1.25},children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{},children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,S.jsx)(Z.A,{title:"Back to orders",placement:"top",children:(0,S.jsx)(J.A,{onClick:()=>t("/nearle/orders"),sx:{bgcolor:"action.hover","&:hover":{bgcolor:"action.selected"}},children:(0,S.jsx)(P.eQE,{size:20})})}),(0,S.jsx)(V.A,{variant:"h3",fontWeight:600,children:"Assign Orders"})]}),(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,S.jsx)(_.A,{options:[{tuneid:1,type:"Balanced",value:"balanced"},{tuneid:2,type:"Aggressive Speed",value:"aggressive_speed"},{tuneid:3,type:"Fuel Saver",value:"fuel_saver"},{tuneid:4,type:"Zone Strict",value:"zone_strict"}]||[],getOptionLabel:e=>e.type,sx:{minWidth:250,maxWidth:600,flex:1},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Hyper Tuning"})),onChange:(e,r,t)=>{"clear"===t?Tt(null):(console.log("val",r),Tt(r.value))}}),(0,S.jsx)(ce.A,{variant:"contained",color:"primary",startIcon:(0,S.jsx)(R.UF6,{}),onClick:()=>{yr(!0),Tt("reshuffle")},children:"Re-Assign"}),(0,S.jsx)(Ae.Ay,{data:_r,filename:"Orders_Detail_".concat(d()().format("YYYY-MM-DD_HHmmss"),".csv"),label:" CSV",style:{m:1}})]})]})}),(0,S.jsx)(se.A,{sx:{p:0,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:Pr&&(0,S.jsx)(ge.default,{data:Pr,embedded:!0})}),(0,S.jsx)(ae.A,{sx:{px:2,py:1.25},children:(0,S.jsxs)(U.A,{direction:"row",gap:2,alignItems:"center",justifyContent:"end",children:[(0,S.jsx)(ce.A,{variant:"contained",color:"secondary",startIcon:(0,S.jsx)(Y.A,{}),onClick:()=>{zr(!1)},children:"Back"}),(0,S.jsx)(ce.A,{variant:"contained",onClick:async()=>{yr(!0),Lt.mutate({deliveries:Ur})},children:"Assign Orders"})]})})]}),(0,S.jsx)(ne.A,{open:Ve,onClose:()=>handleClose(),maxWidth:"xs",children:(0,S.jsx)(se.A,{sx:{mt:2,my:1},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:3.5,children:[(0,S.jsx)(F.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,S.jsx)(s.A,{})}),(0,S.jsx)(U.A,{spacing:2,children:(0,S.jsx)(V.A,{variant:"h4",align:"center",children:"Are you sure you want to cancel this order?"})}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,S.jsx)(ce.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{Rt.mutate(ir)},autoFocus:!0,children:"Yes, Cancel"}),(0,S.jsx)(ce.A,{fullWidth:!0,onClick:()=>{Xe(!1)},color:"secondary",variant:"outlined",children:"No"})]})]})})}),(0,S.jsx)(ne.A,{open:$e,onClose:()=>er(!1),maxWidth:"xs",children:(0,S.jsx)(se.A,{sx:{mt:2,my:1},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:3.5,children:[(0,S.jsx)(F.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,S.jsx)(s.A,{})}),(0,S.jsx)(U.A,{spacing:2,children:(0,S.jsx)(V.A,{variant:"h4",align:"center",children:"Are you sure, you want to cancel multiple orders?"})}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,S.jsx)(ce.A,{fullWidth:!0,onClick:()=>{er(!1)},color:"secondary",variant:"outlined",children:"No"}),(0,S.jsx)(ce.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{Ot.mutate(Or)},autoFocus:!0,children:"Yes, Cancel"})]})]})})})]})}},23787:(e,r,t)=>{t.d(r,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=t(89379),n=t(80045),i=t(93230),l=t(2235),s=t(16491),a=t(82053),c=t(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:r,scroll:t=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},t&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:r}))},h=e=>{let{accent:r="#662582",header:t,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?r:"#e2e8f0",background:i?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[t,d,n]})]})},u=e=>{let{children:r,columns:t=2,sx:n}=e;return(0,c.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(t,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:r})},p=e=>{let{label:r,value:t,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==t&&void 0!==t?t:"\u2014"})})]})}},27001:(e,r,t)=>{t.d(r,{A:()=>s});var o=t(93230),n=t(16491),i=t(82053),l=t(44414);function s(e){let{title:r,subtitle:t,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:r}),t&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:t})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,r,t)=>{t.d(r,{A:()=>v});var o=t(9950),n=t(96583),i=t(40033),l=t(82053),s=t(28170),a=t(93230),c=t(10226),d=t(55916),x=t(4159),h=t.n(x),u=t(56712),p=t(81417),A=t(96600),g=t(53132),f=t(94289),m=t(57326),j=t(50624),b=t(44414);const v=e=>{let{open:r,onClose:t,onSelect:x}=e;const[v,y]=(0,o.useState)(null);return(0,b.jsxs)(n.A,{open:r,onClose:t,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:r,toggle:t,id:"daterange1",onChange:e=>{y({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,A.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,A.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,j.A)(new Date,-1)),endDate:(0,m.A)((0,j.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),t()):t()},children:"OK"})})]})}},36803:(e,r,t)=>{t.d(r,{A:()=>x});var o=t(48089),n=t(50704),i=t(93230),l=t(16491),s=t(82053),a=t(82917),c=t(41413),d=t(44414);function x(e){let{title:r,value:t,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},47659:(e,r,t)=>{t.d(r,{A:()=>d});var o=t(89379),n=t(48089),i=t(50704),l=t(16491),s=t(82053),a=t(60899),c=t(44414);const d=e=>{let{primary:r,secondary:t,percentage:d,color:x,sx:h}=e;return(0,c.jsx)(n.A,{elevation:0,sx:(0,o.A)({background:x,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},h),children:(0,c.jsxs)(i.A,{children:[(0,c.jsx)(l.A,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,c.jsx)(s.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,c.jsxs)(a.Ay,{container:!0,spacing:0,children:[(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:t})}),(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"subtitle2",color:"inherit",children:r})})]})]})})}},56311:(e,r,t)=>{t.d(r,{A:()=>u});var o=t(89379),n=t(9950),i=t(2660),l=t(2046),s=t(83274),a=t(25333),c=t(97125),d=t(7762),x=t(52097),h=t(44414);const u=e=>{let{value:r,onChange:t,onDebouncedChange:u,debounceTime:p=500,placeholder:A="Search (ctrl+k)",sx:g}=e;const f=(0,n.useRef)(null),[m]=(0,x.d7)(r,p);return(0,n.useEffect)((()=>{u&&u(m)}),[m,u]),(0,n.useEffect)((()=>{const e=e=>{var r;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(r=f.current)||void 0===r||r.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:f,placeholder:A,autoComplete:"off",value:r,fullWidth:!0,onChange:e=>t(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:r?"visible":"hidden"},onClick:()=>t(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,r,t)=>{t.d(r,{A:()=>s});t(9950);var o=t(16491),n=t(46639),i=t(62217),l=t(44414);function s(e){let{size:r=70,imgSize:t=40,alt:s="loader"}=e;return(0,l.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(n.A,{size:r}),(0,l.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:t,height:t},children:(0,l.jsx)("img",{src:i,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,r,t)=>{t.d(r,{A:()=>h});var o=t(89379),n=t(9950),i=t(93230),l=t(41413),s=t(77922),a=t(29925),c=t(26910),d=t(31222),x=t(44414);const h=(0,n.forwardRef)(((e,r)=>{let{setAppId:t,setLocoName:h,setPage:u,sx:p,textfeildSx:A,textfieldSx:g,pill:f=!1,accentColor:m="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[y,k]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const r=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(r.data.status){const e=[...r.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),k(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const S=e=>"".concat(m).concat(e),w=S("26"),C=S("18"),W=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(w)},"&.Mui-focused fieldset":{borderColor:m,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:m,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var r;return null!==(r=null===e||void 0===e?void 0:e.locationname)&&void 0!==r?r:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,r,o)=>{"clear"===o?(null===t||void 0===t||t(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):r&&(null===t||void 0===t||t(r.applocationid),null===h||void 0===h||h(r.locationname),null===u||void 0===u||u(0))},renderInput:e=>f?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},W),g||A||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,label:"Select Zones",sx:(0,o.A)({},g||A||{})}))})}))},96646:(e,r,t)=>{t.d(r,{r:()=>a});var o=t(9213),n=t(21671),i=t(82917),l=t(93230),s=t(44414);const a=e=>{let{rowsPerPage:r=5,col:t=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(r)).map(((e,r)=>(0,s.jsxs)(o.A,{children:[(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:t}).map(((e,r)=>(0,s.jsx)(n.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(i.A,{variant:"text",width:100}),(0,s.jsx)(i.A,{variant:"text",width:80})]})},r))),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:150})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(n.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},r)))})}}}]); \ No newline at end of file diff --git a/build/static/js/54.5a2100fd.chunk.js b/build/static/js/54.06907ff1.chunk.js similarity index 99% rename from build/static/js/54.5a2100fd.chunk.js rename to build/static/js/54.06907ff1.chunk.js index be239cd..cfde023 100644 --- a/build/static/js/54.5a2100fd.chunk.js +++ b/build/static/js/54.06907ff1.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[54],{855:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(7208),r=n(76475),s=n(44414);function o(e){var t,n;let o,l,{children:a,type:c="scale",direction:d="right",offset:h=10,scale:x={hover:1.05,tap:.95}}=e;switch(d){case"up":case"left":o=h,l=0;break;default:o=0,l=h}const[p,u]=(0,i.Y)(o,l),[m,f]=(0,i.Y)(o,l);switch(c){case"rotate":return(0,s.jsx)(r.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:a});case"slide":return"up"===d||"down"===d?(0,s.jsx)(r.P.div,{animate:{y:void 0!==m?m:""},onHoverEnd:()=>f(),onHoverStart:()=>f(),children:a}):(0,s.jsx)(r.P.div,{animate:{x:void 0!==p?p:""},onHoverEnd:()=>u(),onHoverStart:()=>u(),children:a});default:return"number"===typeof x&&(x={hover:x,tap:x}),(0,s.jsx)(r.P.div,{whileHover:{scale:null===(t=x)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=x)||void 0===n?void 0:n.tap},children:a})}}},23787:(e,t,n)=>{"use strict";n.d(t,{FG:()=>p,nV:()=>h,pY:()=>u,pg:()=>x});var i=n(89379),r=n(80045),s=n(93230),o=n(2235),l=n(16491),a=n(82053),c=n(44414);const d=["children","scroll","onScroll","sx"],h=e=>{let{children:t,scroll:n=!1,onScroll:o,sx:l}=e,a=(0,r.A)(e,d);return(0,c.jsx)(s.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:o,sx:(0,i.A)((0,i.A)({p:1.5},n&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},x=e=>{let{accent:t="#662582",header:n,footer:r,selected:s=!1,onClick:a,children:d,sx:h}=e;return(0,c.jsxs)(o.A,{elevation:0,onClick:a,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:s?t:"#e2e8f0",background:s?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[n,d,r]})]})},p=e=>{let{children:t,columns:n=2,sx:r}=e;return(0,c.jsx)(l.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(n,", minmax(0, 1fr))"),gap:1,mt:1.25},r),children:t})},u=e=>{let{label:t,value:n,children:i,full:r=!1,align:s="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:r?"1 / -1":"auto",minWidth:0,textAlign:s},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==n&&void 0!==n?n:"\u2014"})})]})}},39009:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>fe});var i=n(89379),r=n(9950),s=n(26910),o=n(50847),l=n.n(o),a=n(55271),c=n(4159),d=n.n(c),h=n(28429),x=n(14857),p=n(47223),u=n(8881),m=n(55158),f=n(16491),g=n(93230),A=n(82053),v=n(25277),j=n(60899),b=n(48089),y=n(77922),S=n(29925),w=n(2046),k=n(82223),Y=n(46639),C=n(83274),z=n(25333),W=n(1320),M=n(2235),N=n(15769),P=n(69780),D=n(9213),I=n(21671),R=n(34075),H=n(96583),T=n(40033),L=n(25979),F=n(2660),E=n(74745),O=n(28170),B=n(96557),J=n(16497),V=n(93038),q=n(79739),G=n(30633),K=n(81831),Z=n(95359),U=n(7762),Q=n(87942),X=n(81419),_=n(3911),$=n(47738),ee=n(27379),te=n(90421),ne=n(94118),ie=n(88349),re=n(60767),se=n(13838),oe=n(54826),le=n(43302),ae=n(31222),ce=n(52351),de=n(94826),he=(n(855),n(23787)),xe=(n(42041),n(44414)),pe=n(36220);d().extend(pe);const ue={fontSize:11.5,fontWeight:700,color:"#475569",py:.75,px:1},me={fontSize:12,py:.6,px:1},fe=()=>{const e=(0,h.Zp)(),t=(0,x.A)(),n=(0,p.A)(t.breakpoints.down("md")),o=(0,r.useRef)(null),c=(0,r.useRef)(null),pe=localStorage.getItem("userid"),[fe,ge]=(0,r.useState)([]),[Ae,ve]=(0,r.useState)([]),[je,be]=(0,r.useState)([]),[ye,Se]=(0,r.useState)(!1),[we,ke]=(0,r.useState)(!1),[Ye,Ce]=(0,r.useState)(0),[ze,We]=(0,r.useState)(0),[Me,Ne]=(0,r.useState)(0),[Pe,De]=(0,r.useState)(null),[Ie,Re]=(0,r.useState)(null),[He,Te]=(0,r.useState)(0),[Le,Fe]=(0,r.useState)(0),[Ee,Oe]=(0,r.useState)(0),[Be,Je]=(0,r.useState)(null),[Ve,qe]=(0,r.useState)([]),[Ge,Ke]=(0,r.useState)([]),[Ze,Ue]=(0,r.useState)(!1),[Qe,Xe]=(0,r.useState)(""),[_e,$e]=(0,r.useState)(d()().format("MM-DD-YYYY")),[et,tt]=(0,r.useState)(""),[nt,it]=(0,r.useState)(null),[rt,st]=(0,r.useState)(null),[ot,lt]=(0,r.useState)(""),[at,ct]=(0,r.useState)(),[dt,ht]=(0,r.useState)(0),[xt,pt]=(0,r.useState)(0),[ut,mt]=(0,r.useState)(0),[ft,gt]=(0,r.useState)(0),[At,vt]=(0,r.useState)(null),[jt,bt]=(0,r.useState)([]),[yt,St]=(0,r.useState)(""),wt=(0,r.useRef)({}),kt=(e,t,n)=>{(0,u.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||1500})},Yt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;const i="".concat(t,"-").concat(e);wt.current[i]||(kt(e,t,n),wt.current[i]=!0,setTimeout((()=>delete wt.current[i]),3e3))};(0,r.useEffect)((()=>{We(0),De(null),Ne(0),Re(null),be([]),Je(null),qe([]),bt([]),vt(null),St(""),it(null),st(null),tt("")}),[Ye]),(0,r.useEffect)((()=>{Ne(0),Re(null),qe([]),bt([]),vt(null),St("")}),[ze]);(0,r.useEffect)((()=>{(async()=>{Se(!0);try{const e=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(pe));ge(e.data.details||[])}catch(e){Yt(e.message,"error",5e3)}finally{Se(!1)}})()}),[]);(0,r.useEffect)((()=>{Ye&&(async()=>{Se(!0);try{const e=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(Ye,"&status=active"));if(e.data.status){const t=(e.data.details||[]).map((e=>(0,i.A)((0,i.A)({},e),{},{label:"".concat(e.tenantname)})));ve(t)}}catch(e){Yt("Failed to load clients","warning",3e3)}finally{Se(!1)}})()}),[Ye]);(0,r.useEffect)((()=>{if(!ze)return;const e=setTimeout((()=>{(""===Qe||Qe.length>2)&&(async()=>{try{const e=""===Qe?"".concat("https://jupiter.nearle.app/live/api/v1","/customers/gettenantcustomers/?tenantid=").concat(ze,"&pageno=1&pagesize=30"):"".concat("https://jupiter.nearle.app/live/api/v1","/customers/search/?tenantid=").concat(ze,"&keyword=").concat(Qe),t=await s.A.get(e);t.data.status&&Ke(t.data.details||[])}catch(e){console.log(e),kt("server error","warning")}})()}),250);return()=>clearTimeout(e)}),[Qe,ze]),(0,r.useEffect)((()=>{let e=0,t=0,n=0,i=0;Ve.forEach((r=>{e+=Number(r.distance)||0,t+=Number(r.totalcharge)||0,n+=Number(r.quantity)||0,i+=Number(r.collectionamt)||0})),ht(e),pt(t),mt(n),gt(i)}),[Ve]);const Ct=async e=>{var t,n;if("undefined"===typeof window||null===(t=window.google)||void 0===t||null===(n=t.maps)||void 0===n||!n.DistanceMatrixService)throw new Error("Google Maps not loaded");const i=new window.google.maps.DistanceMatrixService;try{var r,s,o,l,a;if(!e||"object"!==typeof e)throw new Error("Invalid customer data.");if(!Be||"object"!==typeof Be)throw new Error("Origin (pickCust) data missing or invalid.");const t=await(c=Be,d=e,new Promise(((e,t)=>{try{if(!c||!d)return t(new Error("Origin or destination data missing."));i.getDistanceMatrix({origins:[new window.google.maps.LatLng(c.latitude,c.longitude)],destinations:[new window.google.maps.LatLng(d.latitude,d.longitude)],travelMode:"DRIVING",unitSystem:window.google.maps.UnitSystem.METRIC},((n,i)=>{"OK"===i?e(n):t(new Error("Google API error: ".concat(i)))}))}catch(n){t(new Error("Unexpected error inside DistanceMatrixService: ".concat(n.message)))}}))),n=null===t||void 0===t||null===(r=t.rows)||void 0===r||null===(s=r[0])||void 0===s||null===(o=s.elements)||void 0===o||null===(l=o[0])||void 0===l||null===(a=l.distance)||void 0===a?void 0:a.value;if(null==n)throw new Error("Malformed Distance Matrix response: missing distance value.");const h=n/1e3,x=Math.round(h);return{roundedDistance:x,totalcharge:x{let t=!1;if(qe((n=>(t=n.some((t=>t.firstname===e.firstname)),t?n.filter((t=>t.firstname!==e.firstname)):n))),!t){Se(!0);try{const{roundedDistance:t,totalcharge:n}=await Ct(e);qe((r=>r.some((t=>t.firstname===e.firstname))?r:[...r,(0,i.A)((0,i.A)({},e),{},{distance:t,totalcharge:n})]))}catch(n){console.error("Failed to calculate distance:",n)}finally{Se(!1)}}};(0,r.useEffect)((()=>{Ye&&(async()=>{try{const e=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocationconfig/?applocationid=").concat(Ye));if(e.data.status){const t=e.data.details.applocationadmins.map((e=>e.userfcmtokem));ct(t)}}catch(e){console.log(e)}})()}),[Ye]);const Wt=e=>null===e||void 0===e?void 0:e.toString().trim().toLowerCase().replace(/\s+/g,""),Mt={"pickupdate(yyyy-mmm-dd)":"date","sendername*":"locationname","senderphone*":"locationcontact","senderaddress*":"locationaddress","receivername*":"firstname",receiverphone:"contactno","receiveralternatephone*":"altcontactno",receiverfulladdress:"address",receiverlatitude:"latitude",receiverlongitude:"longitude","itemdescription*":"description",Quantity:"quantity"," Collect Cash":"collectionamt",customerDeliveryTime:"customerdeliverytime",kitchenPickupTime:"kitchenpickuptime"},Nt=(e,t)=>{qe((n=>n.map((n=>n.customerid===e?(0,i.A)((0,i.A)({},n),{},{quantity:Number(t)||0}):n))))},Pt=(e,t)=>{qe((n=>n.map((n=>n.customerid===e?(0,i.A)((0,i.A)({},n),{},{collectionamt:Number(t)||0}):n))))},Dt={location:!!Ye,client:!!ze,business:!!Me,schedule:!!rt,drops:Ve.length>0},It=Dt.location&&Dt.client&&Dt.business&&Dt.schedule&&Dt.drops,Rt=Ve.length>0?"drops":jt.length>0?"preview":"empty";return(0,xe.jsxs)(xe.Fragment,{children:[ye&&(0,xe.jsx)(ce.A,{}),(0,xe.jsx)(m.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:we,children:(0,xe.jsx)(de.A,{color:"inherit"})}),(0,xe.jsxs)(f.A,{className:"orders-workspace-bg",sx:{height:{xs:"auto",md:"calc(100vh - 64px)"},minHeight:{xs:"calc(100vh - 64px)",md:0},display:"flex",flexDirection:"column",overflow:{xs:"visible",md:"hidden"},p:{xs:.75,sm:1.25},gap:1},children:[(0,xe.jsxs)(g.A,{direction:"row",alignItems:"center",gap:1,flexWrap:"wrap",sx:{flexShrink:0,px:.5},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,fontSize:{xs:16,sm:17},color:"#1e293b",lineHeight:1.2},children:"Create Multiple Orders"}),(0,xe.jsx)(v.A,{size:"small",label:"".concat(Ve.length," drop").concat(1===Ve.length?"":"s"),sx:{height:20,fontSize:10.5,fontWeight:700,bgcolor:Ve.length?"rgba(24,144,255,0.10)":"#f1f5f9",color:Ve.length?"#1890ff":"#94a3b8",border:"1px solid ".concat(Ve.length?"rgba(24,144,255,0.25)":"#e2e8f0")}}),(0,xe.jsx)(f.A,{sx:{flex:1}}),(0,xe.jsx)(A.A,{sx:{fontSize:11,color:"#94a3b8",display:{xs:"none",md:"block"}},children:"Bulk-create deliveries from CSV/Excel or saved customers."})]}),(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.25,sx:{flex:1,minHeight:0,overflow:{xs:"visible",md:"hidden"}},children:[(0,xe.jsxs)(j.Ay,{item:!0,xs:12,md:6,sx:{height:{xs:"auto",md:"100%"},minHeight:0,display:"flex",flexDirection:"column",gap:{xs:1.25,md:2.25},overflowY:{xs:"visible",md:"auto"},pr:{xs:0,md:.75}},children:[(0,xe.jsxs)(b.A,{className:"orders-card",sx:{p:2,flexShrink:0},children:[(0,xe.jsx)(f.A,{className:"section-title-bar",sx:{mb:1.5},children:(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:13.5,letterSpacing:"-0.01em"},children:"Setup"})}),(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.75,children:[(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:4,children:(0,xe.jsx)(y.A,{fullWidth:!0,size:"small",ref:o,className:"header-compact-input",options:fe||[],getOptionLabel:e=>"".concat(e.locationname),onChange:(e,t,n)=>{"clear"===n?Ce(0):t&&Ce(t.applocationid)},renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{size:"small",placeholder:"Choose Location",label:"Location",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(le.sIY,{style:{color:"#94a3b8",fontSize:12,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:4,children:(0,xe.jsx)(y.A,{fullWidth:!0,size:"small",className:"header-compact-input",options:Ae||[],value:Pe,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",isOptionEqualToValue:(e,t)=>e.tenantid===t.tenantid,onOpen:e=>{Ye||(e.preventDefault(),Yt("Please select Location first!","warning",3e3),setTimeout((()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"===n?(We(0),De(null)):t&&(We(t.tenantid),De(t),(async e=>{try{const t=(await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e))).data.details||{};Te(t.baseprice||0),Fe(t.priceperkm||0),Oe(t.minkm||0)}catch(t){console.log("fetchTenantPricing error",t)}})(t.tenantid),(async e=>{try{const t=(await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e))).data.details||[];1===t.length?(be(t),Je(t[0]),Ne(t[0].locationid),Re(t[0]),it(t[0].slots)):be(t)}catch(t){console.log("gettenantlocations",t)}})(t.tenantid))},renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{size:"small",placeholder:"Choose Client",label:"Client",inputRef:c,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(oe.x$1,{style:{color:"#94a3b8",fontSize:11,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:4,children:1===je.length?(0,xe.jsx)(S.A,{variant:"outlined",fullWidth:!0,size:"small",label:"Business Location",value:je[0].locationname,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:{style:{color:t.palette.primary.main},startAdornment:(0,xe.jsx)(Q.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}})}}):(0,xe.jsx)(y.A,{fullWidth:!0,size:"small",className:"header-compact-input",value:Ie,options:je||[],getOptionLabel:e=>null!==e&&void 0!==e&&e.locationname?"".concat(e.locationname," (").concat(e.suburb||"",")"):"",onOpen:e=>{Ye||ze?ze||(e.preventDefault(),Yt("Please select Client first!","warning",3e3),setTimeout((()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),Yt("Please select Location and Client first!","warning",3e3),setTimeout((()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(Ne(t.locationid||0),Re(t),Je(t),it(null===t||void 0===t?void 0:t.slots)):(Ne(0),Re(null),Je(null),it(null))},renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{size:"small",placeholder:"Business Location",label:"Business Location",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(Q.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})})]})]}),(0,xe.jsxs)(b.A,{className:"orders-card",sx:{p:2,flexShrink:0},children:[(0,xe.jsx)(f.A,{className:"section-title-bar section-title-bar--accent",sx:{mb:1.5},children:(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:13.5,letterSpacing:"-0.01em"},children:"Schedule & Pickup"})}),(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.75,children:[(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:6,children:(0,xe.jsx)(K.$,{dateAdapter:Z.R,children:(0,xe.jsx)(G.l,{label:"Pickup Date",format:"DD-MM-YYYY",value:_e?d()(_e):null,onChange:e=>{if(!e||!d()(e).isValid())return void $e(d()().format("MM-DD-YYYY"));d()().diff(d()("".concat(d()(e).format("YYYY-MM-DD"))),"d")<=0?($e(d()(e).format("MM-DD-YYYY")),tt(""),st(null)):(kt("Choose an upcoming date","warning"),$e(d()().format("MM-DD-YYYY")))},disablePast:!0,slotProps:{textField:{size:"small",fullWidth:!0,InputLabelProps:{shrink:!0},InputProps:{startAdornment:(0,xe.jsx)(w.A,{position:"start",children:(0,xe.jsx)(X.A,{style:{color:"#94a3b8",fontSize:"13px"}})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",height:"36px",paddingLeft:"10px"}}}}})})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:6,children:(0,xe.jsx)(y.A,{size:"small",fullWidth:!0,options:nt||[],sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",height:"36px"}},onChange:(e,t,n)=>{if("clear"===n||!t)return tt(null),void st(null);if(!t.time)return void Yt("This slot has no time configured.","warning",3e3);const i=d()(t.time,"HH:mm").format("hh:mm A");tt(i);const r=d()("".concat(_e," ").concat(i),"MM-DD-YYYY hh:mm A").format("YYYY-MM-DD hh:mm A");st(r)},getOptionLabel:e=>e?"".concat(e.name," (").concat(d()(e.time,"HH:mm").format("hh:mm A"),")"):"",renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{label:"Pickup Slot",placeholder:"Select Pickup Slot",fullWidth:!0,InputLabelProps:{shrink:!0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",height:"36px"}},InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(_.A,{style:{color:"#94a3b8",fontSize:"13px",marginRight:"6px",marginLeft:"2px",flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,children:Be?(0,xe.jsxs)(g.A,{direction:"row",spacing:1.25,alignItems:"center",sx:{border:"1px solid #eef2f6",borderLeft:"3px solid #1890ff",borderRadius:"10px",px:1.25,py:.75,bgcolor:"#fbfcff"},children:[(0,xe.jsx)(f.A,{sx:{width:28,height:28,borderRadius:"8px",background:"linear-gradient(135deg,#1890ff,#096dd9)",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,fontSize:12,boxShadow:"0 4px 10px rgba(24,144,255,0.30)"},children:(0,xe.jsx)(le.sIY,{})}),(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(A.A,{sx:{fontSize:12.5,fontWeight:700,color:"#1e293b",lineHeight:1.2},noWrap:!0,children:Be.locationname||"\u2014"}),(0,xe.jsx)(A.A,{sx:{fontSize:11,color:"#64748b",lineHeight:1.3},noWrap:!0,children:Be.address||"\u2014"})]})]}):(0,xe.jsx)(A.A,{sx:{color:"#94a3b8",fontSize:12},children:"Pickup auto-fills once a Business Location is selected."})})]})]}),(0,xe.jsxs)(b.A,{className:"orders-card delivery-prefs-card",sx:{p:2,flexShrink:0},children:[(0,xe.jsxs)(f.A,{className:"delivery-prefs-header",sx:{mb:1},children:[(0,xe.jsx)(A.A,{className:"delivery-prefs-title",children:"Order Notes"}),(0,xe.jsx)(A.A,{className:"delivery-prefs-sub",children:"Applied to every order"})]}),(0,xe.jsx)(f.A,{className:"delivery-prefs-row",children:(0,xe.jsxs)(f.A,{className:"delivery-prefs-field",sx:{width:"100%"},children:[(0,xe.jsxs)("label",{className:"delivery-prefs-label",htmlFor:"bulk-dispatch-notes-input",children:[(0,xe.jsx)($.A,{style:{fontSize:11,color:"#65387a"}}),"Special Dispatch Notes"]}),(0,xe.jsx)(S.A,{id:"bulk-dispatch-notes-input",size:"small",fullWidth:!0,placeholder:"Gate codes, call instructions, special cargo care\u2026",value:ot,onChange:e=>lt(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",padding:"0 10px",alignItems:"center",fontSize:"12px",background:"#ffffff",height:"32px"},"& .MuiOutlinedInput-input":{padding:"0 !important",fontSize:"12px !important",lineHeight:"32px"}}})]})})]}),(0,xe.jsxs)(b.A,{className:"orders-card pricing-summary-card",sx:{flexShrink:0,p:"16px 18px !important"},children:[(0,xe.jsxs)(f.A,{className:"pricing-header",sx:{mb:1.5,pb:1},children:[(0,xe.jsx)(A.A,{className:"pricing-title",sx:{fontSize:"13px !important"},children:"Bulk Summary"}),(0,xe.jsx)(A.A,{className:"pricing-subtitle",sx:{fontSize:"10px !important"},children:"Live totals"})]}),(()=>{const e=e=>{let{icon:t,label:n,value:r,accent:s,active:o}=e;return(0,xe.jsxs)(f.A,{sx:(0,i.A)({bgcolor:"#fff",border:"1px solid #eef2f6",borderRadius:"10px",px:1,py:.75,display:"flex",alignItems:"center",gap:.85,minWidth:0,transition:"border-color 0.2s, box-shadow 0.2s"},o&&{borderColor:"".concat(s,"55"),boxShadow:"0 2px 6px -2px ".concat(s,"33")}),children:[(0,xe.jsx)(f.A,{sx:{width:26,height:26,borderRadius:"8px",bgcolor:"".concat(s,"18"),color:s,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,flexShrink:0},children:(0,xe.jsx)(t,{})}),(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(A.A,{sx:{fontSize:9.5,fontWeight:600,color:"#94a3b8",letterSpacing:.4,textTransform:"uppercase",lineHeight:1},children:n}),(0,xe.jsx)(A.A,{sx:{fontSize:13.5,fontWeight:800,color:o?"#1e293b":"#94a3b8",lineHeight:1.2,mt:.25},noWrap:!0,children:r})]})]})};return(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.25,children:[(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.$Fg,label:"Distance",value:dt?"".concat(dt," km"):"\u2014",accent:"#1890ff",active:!!dt})}),(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.H5e,label:"Quantity",value:ut||0,accent:"#16a34a",active:!!ut})}),(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.MxO,label:"Cash Collect",value:"\u20b9".concat(Number(ft).toFixed(2)),accent:"#d97706",active:!!ft})}),(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.dv1,label:"Deliveries",value:Ve.length,accent:"#65387a",active:Ve.length>0})})]})})(),Ve.length>0&&(0,xe.jsxs)("div",{className:"total-charge-badge",style:{marginTop:14,padding:"10px 14px"},children:[(0,xe.jsxs)("div",{className:"total-charge-left",children:[(0,xe.jsx)(oe.wTh,{className:"total-charge-icon"}),(0,xe.jsx)("div",{className:"total-charge-label",children:"Total Charge"})]}),(0,xe.jsxs)("div",{className:"total-charge-val",style:{fontSize:17},children:["\u20b9",Number(xt).toFixed(2)]})]}),(0,xe.jsx)(f.A,{sx:{mt:1.75},children:(0,xe.jsx)(k.A,{fullWidth:!0,className:"gradient-btn-create",disabled:!It||we,startIcon:!we&&(0,xe.jsx)(oe.Cer,{style:{fontSize:11}}),onClick:async()=>{if(!ze)return void kt("Choose Client","warning");if(!Be)return void kt("Pickup location required","warning");if(!rt)return void kt("Select a pickup slot","warning");if(!Ve.length)return void kt("Add at least one drop customer","warning");const t=(()=>{if(rt){const e=d()(rt,["YYYY-MM-DD hh:mm A","YYYY-MM-DD HH:mm:ss"]);if(e.isValid())return e.format("YYYY-MM-DD HH:mm:ss")}if(_e&&et){const e=d()("".concat(d()(_e).format("YYYY-MM-DD")," ").concat(et),["YYYY-MM-DD hh:mm A","YYYY-MM-DD HH:mm:ss"]);if(e.isValid())return e.format("YYYY-MM-DD HH:mm:ss")}return d()().format("YYYY-MM-DD HH:mm:ss")})(),n=Ve.map((e=>{var n,i,r,s;return{applocationid:Be.applocationid,configid:9,partnerid:Be.partnerid,partneruserid:+pe,paymentstatus:1,paymenttype:42,pickupaddress:Be.address||"",pickupcity:Be.city||"",pickupcontactno:Be.contactno||"",pickupcustomer:Be.locationname||"",pickuplandmark:Be.landmark||"",pickuplat:Be.latitude,pickuplocation:Be.suburb||"",pickuplocationid:Be.locationid||0,pickuplong:Be.longitude,tenantid:Be.tenantid,customerid:+(null===e||void 0===e?void 0:e.customerid),deliveryaddress:e.address||"",deliverycharge:+e.totalcharge||0,deliverycity:e.city||"",deliverycontactno:(null===(n=e.contactno)||void 0===n?void 0:n.toString())||"",deliverycustomer:e.firstname||"",deliveryid:+e.customerid,deliverylandmark:e.landmark||"",deliverylat:(null===(i=e.latitude)||void 0===i?void 0:i.toString())||"",deliverylocation:e.suburb||"",deliverylocationid:e.deliverylocationid||0,deliverylong:(null===(r=e.longitude)||void 0===r?void 0:r.toString())||"",deliverytime:t,deliverytype:"B",itemcount:1,quantity:e.quantity,collectionamt:e.collectionamt,kms:(null===(s=e.distance)||void 0===s?void 0:s.toString())||"0",locationid:+Be.locationid,moduleid:+Be.moduleid,orderamount:+e.totalcharge||0,ordercharges:0,orderdate:d()().format("YYYY-MM-DD HH:mm:ss"),ordernotes:ot,orderstatus:"created",ordervalue:+e.totalcharge||0,pickupSlot:rt}}));Se(!0),ke(!0);try{const t=await s.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/orders/createorders"),n);var i;if(t.data.status)kt("Orders Created Successfully","success",2e3),at&&(async()=>{try{"Success"===(await s.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/sendnotifications"),{priority:"high",registration_ids:at,data:{accessid:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk"},notification:{title:"Nearle Merchant",body:"An Order has been placed successfully, kindly process the same",sound:"ring"}})).data.message&&kt("Notification sent Successfully","success",1e3)}catch(e){kt(e.message,"error",1e3)}})(),e("/nearle/orders");else kt((null===t||void 0===t||null===(i=t.data)||void 0===i?void 0:i.message)||"Order creation failed. Please try again.","warning",3e3)}catch(o){let e="Something went wrong. Please try again.";var r;if(o.response)e=(null===(r=o.response.data)||void 0===r?void 0:r.message)||"Server error (".concat(o.response.status,")");else o.request&&(e="Network error. Check your internet connection.");kt(e,"error",3e3)}finally{Se(!1),ke(!1)}},sx:{minHeight:"36px !important"},children:we?(0,xe.jsx)(Y.A,{color:"inherit",size:16,thickness:5}):"Dispatch ".concat(Ve.length||""," ").concat(1===Ve.length?"Order":"Orders").trim()})})]})]}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,md:6,sx:{height:{xs:"auto",md:"100%"},minHeight:0,display:"flex",flexDirection:"column"},children:(0,xe.jsxs)(b.A,{className:"orders-card",sx:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",p:1.25,maxHeight:{xs:"none",md:685}},children:[(0,xe.jsxs)(g.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,sx:{mb:.75,flexShrink:0},children:[(0,xe.jsxs)(f.A,{className:"section-title-bar",sx:{mb:0},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:13.5,letterSpacing:"-0.01em"},children:"drops"===Rt?"Drop List":"preview"===Rt?"File Preview":"Preview"}),(0,xe.jsx)(v.A,{size:"small",label:"drops"===Rt?Ve.length:"preview"===Rt?jt.length:0,sx:{height:20,fontSize:10.5,fontWeight:700,ml:1,bgcolor:"rgba(168,85,247,0.10)",color:"#65387a",border:"1px solid rgba(168,85,247,0.25)"}})]}),"drops"===Rt&&(0,xe.jsx)(v.A,{size:"small",label:"\u20b9".concat(Number(xt).toFixed(2)," total"),sx:{height:22,fontWeight:700,fontSize:11,bgcolor:"rgba(101,56,122,0.10)",color:"#65387a",border:"1px solid rgba(101,56,122,0.25)"}}),"preview"===Rt&&(0,xe.jsx)(v.A,{size:"small",label:"Awaiting Continue",icon:(0,xe.jsx)(ee.A,{style:{fontSize:11}}),sx:{height:22,fontWeight:700,fontSize:11,bgcolor:"rgba(245,158,11,0.12)",color:"#b45309",border:"1px solid rgba(245,158,11,0.30)","& .MuiChip-icon":{color:"#b45309"}}}),"empty"!==Rt&&(()=>{const e=Ye&&ze&&Me,t=t=>{var n;e?(vt(t),0===t?null===(n=document.getElementById("upload-file"))||void 0===n||n.click():1===t&&(Ue(!0),Xe(""))):Yt("Please select Location, Client, and Business Location first.","warning",3e3)};return(0,xe.jsxs)(g.A,{direction:"row",gap:.75,alignItems:"center",children:[(0,xe.jsx)(k.A,{size:"small",variant:"outlined",onClick:()=>t(0),startIcon:(0,xe.jsx)(ae.CtR,{}),sx:{height:24,py:0,textTransform:"none",borderRadius:"6px",fontSize:10.5,fontWeight:600,borderColor:"#cbd5e1",color:"#475569","&:hover":{borderColor:"#1890ff",color:"#1890ff"}},children:"Excel / CSV"}),(0,xe.jsx)(k.A,{size:"small",variant:"outlined",onClick:()=>t(1),startIcon:(0,xe.jsx)(oe.YXz,{}),sx:{height:24,py:0,textTransform:"none",borderRadius:"6px",fontSize:10.5,fontWeight:600,borderColor:"#cbd5e1",color:"#475569","&:hover":{borderColor:"#65387a",color:"#65387a"}},children:"Selection"})]})})()]}),yt&&(0,xe.jsxs)(g.A,{direction:"row",gap:.75,alignItems:"center",sx:{mb:.75,color:"#64748b",flexShrink:0},children:[(0,xe.jsx)(te.A,{style:{fontSize:12}}),(0,xe.jsx)(A.A,{sx:{fontSize:11.5},noWrap:!0,children:yt})]}),"preview"===Rt&&jt.length>=1&&(0,xe.jsxs)(f.A,{sx:{mb:1,p:1.25,bgcolor:"rgba(245,158,11,0.06)",border:"1.5px solid rgba(245,158,11,0.25)",borderRadius:"10px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexShrink:0,animation:"blink 1.5s infinite","@keyframes blink":{"0%":{borderColor:"rgba(245,158,11,0.25)"},"50%":{borderColor:"rgba(245,158,11,0.6)"},"100%":{borderColor:"rgba(245,158,11,0.25)"}}},children:[(0,xe.jsxs)(f.A,{sx:{textAlign:"left"},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,fontSize:12,color:"#b45309",lineHeight:1.2},children:"Process & Calculate Distances"}),(0,xe.jsx)(A.A,{sx:{color:"#b45309",opacity:.8,fontSize:10.5,lineHeight:1.25},children:"Click continue to import spreadsheet rows and calculate drop charges."})]}),(0,xe.jsx)(k.A,{variant:"contained",size:"small",color:"warning",onClick:()=>jt.forEach((e=>zt(e))),sx:{textTransform:"none",borderRadius:"8px",fontWeight:700,fontSize:11,height:28,px:1.5,bgcolor:"#d97706",boxShadow:"none","&:hover":{bgcolor:"#b45309",boxShadow:"none"}},children:"Continue"})]}),(0,xe.jsxs)(f.A,{sx:{flex:1,minHeight:0,overflow:"auto"},children:["drops"===Rt&&n&&(0,xe.jsxs)(he.nV,{sx:{p:0},children:[Ve.map(((e,t)=>{var n;return(0,xe.jsx)(he.pg,{accent:"#65387a",header:(0,xe.jsxs)(g.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsxs)(A.A,{sx:{fontSize:14,fontWeight:700,color:"#1e293b",lineHeight:1.2},children:[t+1,". ",e.firstname]}),(0,xe.jsx)(A.A,{sx:{fontSize:12,color:"#64748b",mt:.25},children:e.address})]}),(0,xe.jsx)(C.A,{title:"Remove",children:(0,xe.jsx)(z.A,{size:"small",onClick:()=>zt(e),sx:{color:"#ef4444",p:.5,flexShrink:0},children:(0,xe.jsx)(ne.A,{style:{fontSize:14}})})})]}),children:(0,xe.jsxs)(he.FG,{columns:2,children:[(0,xe.jsx)(he.pY,{label:"Qty",children:0===At?(0,xe.jsx)(A.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},children:null!==(n=e.quantity)&&void 0!==n?n:"\u2014"}):(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.quantity||"",onChange:t=>Nt(e.customerid,t.target.value),inputProps:{min:0},fullWidth:!0,sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",height:34}}})}),(0,xe.jsx)(he.pY,{label:"Cash",children:0===At?(0,xe.jsx)(A.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},children:"\u20b9".concat(Number(e.collectionamt||0).toFixed(2))}):(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.collectionamt?e.collectionamt:"",placeholder:"0",onChange:t=>{const n=Number(t.target.value);Pt(e.customerid,n>0?n:0)},inputProps:{min:0},InputProps:{startAdornment:(0,xe.jsx)(w.A,{position:"start",children:"\u20b9"})},fullWidth:!0,sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",height:34}}})}),(0,xe.jsx)(he.pY,{label:"Km",value:e.distance}),(0,xe.jsx)(he.pY,{label:"Charge",align:"right",children:(0,xe.jsxs)(A.A,{sx:{fontSize:13,fontWeight:700,color:"#1e293b"},children:["\u20b9",Number((null===e||void 0===e?void 0:e.totalcharge)||0).toFixed(2)]})})]})},e.customerid||e.firstname||t)})),(0,xe.jsx)(he.pg,{accent:"#65387a",sx:{bgcolor:"#fafbfc"},children:(0,xe.jsxs)(he.FG,{columns:2,children:[(0,xe.jsx)(he.pY,{label:"Total Qty",value:ut}),(0,xe.jsx)(he.pY,{label:"Total Cash",value:"\u20b9".concat(Number(ft).toFixed(2))}),(0,xe.jsx)(he.pY,{label:"Total Km",value:dt}),(0,xe.jsx)(he.pY,{label:"Total Charge",align:"right",children:(0,xe.jsxs)(A.A,{sx:{fontSize:14,fontWeight:800,color:"#65387a"},children:["\u20b9",Number(xt).toFixed(2)]})})]})})]}),"drops"===Rt&&!n&&(0,xe.jsx)(W.A,{component:M.A,sx:{borderRadius:"10px",border:"1px solid #eef2f6",boxShadow:"none"},children:(0,xe.jsxs)(N.A,{size:"small",stickyHeader:!0,children:[(0,xe.jsx)(P.A,{sx:{bgcolor:"#f8fafc"},children:(0,xe.jsxs)(D.A,{children:[(0,xe.jsx)(I.A,{sx:ue,children:"#"}),(0,xe.jsx)(I.A,{sx:ue,children:"Customer"}),(0,xe.jsx)(I.A,{sx:ue,children:"Address"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Qty"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Cash"}),(0,xe.jsx)(I.A,{sx:ue,children:"Km"}),(0,xe.jsx)(I.A,{sx:ue,align:"right",children:"Charge"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:" "})]})}),(0,xe.jsxs)(R.A,{children:[Ve.map(((e,t)=>(0,xe.jsxs)(D.A,{hover:!0,children:[(0,xe.jsx)(I.A,{sx:me,children:t+1}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{whiteSpace:"nowrap",color:"#1e293b",fontWeight:600}),children:e.firstname}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{color:"#64748b",maxWidth:220}),children:(0,xe.jsx)(C.A,{title:e.address||"",children:(0,xe.jsx)("span",{style:{display:"inline-block",maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"middle"},children:e.address})})}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:0===At?e.quantity:(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.quantity||"",onChange:t=>Nt(e.customerid,t.target.value),inputProps:{min:0},sx:{width:64,"& .MuiOutlinedInput-root":{borderRadius:"8px",height:30}}})}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:0===At?"\u20b9".concat(Number(e.collectionamt||0).toFixed(2)):(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.collectionamt?e.collectionamt:"",placeholder:"0",onChange:t=>{const n=Number(t.target.value);Pt(e.customerid,n>0?n:0)},inputProps:{min:0},InputProps:{startAdornment:(0,xe.jsx)(w.A,{position:"start",children:"\u20b9"})},sx:{width:90,"& .MuiOutlinedInput-root":{borderRadius:"8px",height:30}}})}),(0,xe.jsx)(I.A,{sx:me,children:e.distance}),(0,xe.jsxs)(I.A,{align:"right",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:700,color:"#1e293b"}),children:["\u20b9",Number((null===e||void 0===e?void 0:e.totalcharge)||0).toFixed(2)]}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:(0,xe.jsx)(C.A,{title:"Remove",children:(0,xe.jsx)(z.A,{size:"small",onClick:()=>zt(e),sx:{color:"#ef4444",p:.5},children:(0,xe.jsx)(ne.A,{style:{fontSize:13}})})})})]},e.customerid||e.firstname||t))),(0,xe.jsxs)(D.A,{sx:{bgcolor:"#fafbfc"},children:[(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:"Total"}),(0,xe.jsx)(I.A,{colSpan:2,sx:me}),(0,xe.jsx)(I.A,{align:"center",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:ut}),(0,xe.jsxs)(I.A,{align:"center",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:["\u20b9",Number(ft).toFixed(2)]}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:dt}),(0,xe.jsxs)(I.A,{align:"right",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800,color:"#65387a"}),children:["\u20b9",Number(xt).toFixed(2)]}),(0,xe.jsx)(I.A,{sx:me})]})]})]})}),"preview"===Rt&&n&&(0,xe.jsx)(he.nV,{sx:{p:0},children:jt.map(((e,t)=>{var n;return(0,xe.jsx)(he.pg,{accent:"#d97706",header:(0,xe.jsxs)(f.A,{sx:{minWidth:0},children:[(0,xe.jsxs)(A.A,{sx:{fontSize:14,fontWeight:700,color:"#1e293b",lineHeight:1.2},children:[t+1,". ",e.firstname||"\u2014"]}),(0,xe.jsx)(A.A,{sx:{fontSize:12,color:"#64748b",mt:.25},children:e.address||"\u2014"})]}),children:(0,xe.jsxs)(he.FG,{columns:2,children:[(0,xe.jsx)(he.pY,{label:"Contact",value:e.contactno||"\u2014"}),(0,xe.jsx)(he.pY,{label:"Qty",value:null!==(n=e.quantity)&&void 0!==n?n:"\u2014"}),(0,xe.jsx)(he.pY,{label:"Cash",value:null!=e.collectionamt?"\u20b9".concat(Number(e.collectionamt).toFixed(2)):"\u2014"})]})},t)}))}),"preview"===Rt&&!n&&(0,xe.jsx)(W.A,{component:M.A,sx:{borderRadius:"10px",border:"1px solid #eef2f6",boxShadow:"none"},children:(0,xe.jsxs)(N.A,{size:"small",stickyHeader:!0,children:[(0,xe.jsx)(P.A,{sx:{bgcolor:"#f8fafc"},children:(0,xe.jsxs)(D.A,{children:[(0,xe.jsx)(I.A,{sx:ue,children:"#"}),(0,xe.jsx)(I.A,{sx:ue,children:"Name"}),(0,xe.jsx)(I.A,{sx:ue,children:"Contact"}),(0,xe.jsx)(I.A,{sx:ue,children:"Address"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Qty"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Cash"})]})}),(0,xe.jsx)(R.A,{children:jt.map(((e,t)=>{var n;return(0,xe.jsxs)(D.A,{hover:!0,children:[(0,xe.jsx)(I.A,{sx:me,children:t+1}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{whiteSpace:"nowrap",color:"#1e293b",fontWeight:600}),children:e.firstname||"\u2014"}),(0,xe.jsx)(I.A,{sx:me,children:e.contactno||"\u2014"}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{color:"#64748b",maxWidth:240}),children:(0,xe.jsx)(C.A,{title:e.address||"",children:(0,xe.jsx)("span",{style:{display:"inline-block",maxWidth:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"middle"},children:e.address||"\u2014"})})}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:null!==(n=e.quantity)&&void 0!==n?n:"\u2014"}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:null!=e.collectionamt?"\u20b9".concat(Number(e.collectionamt).toFixed(2)):"\u2014"})]},t)}))})]})}),"empty"===Rt&&(()=>{const e=Ye&&ze&&Me,t=t=>{var n;e?(vt(t),qe([]),bt([]),St(""),0===t?null===(n=document.getElementById("upload-file"))||void 0===n||n.click():1===t&&(Ue(!0),Xe(""))):Yt("Please select Location, Client, and Business Location first.","warning",3e3)},n=n=>{let{value:i,icon:r,title:s,sub:o,accent:l}=n;return(0,xe.jsxs)(f.A,{role:"button",tabIndex:0,onClick:()=>t(i),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t(i))},sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",textAlign:"left",gap:1.25,px:1.5,py:1.25,borderRadius:"10px",border:"1.5px solid #eef2f6",bgcolor:"#fff",opacity:e?1:.6,cursor:e?"pointer":"not-allowed",transition:"all 0.18s ease","&:hover":e?{borderColor:l,boxShadow:"0 4px 12px -4px ".concat(l,"40"),transform:"translateY(-1px)"}:void 0},children:[(0,xe.jsx)(f.A,{sx:{width:32,height:32,borderRadius:"8px",background:"".concat(l,"15"),color:l,display:"flex",alignItems:"center",justifyContent:"center",fontSize:15,flexShrink:0},children:(0,xe.jsx)(r,{})}),(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,fontSize:13,color:"#1e293b",lineHeight:1.15},children:s}),(0,xe.jsx)(A.A,{sx:{fontSize:11,color:"#94a3b8",lineHeight:1.25},noWrap:!0,children:o})]})]})};return(0,xe.jsxs)(g.A,{alignItems:"center",justifyContent:"center",spacing:1.5,sx:{height:"100%",minHeight:240,bgcolor:"rgba(24,144,255,0.03)",border:"1px dashed rgba(24,144,255,0.25)",borderRadius:"12px",p:3,textAlign:"center"},children:[(0,xe.jsx)(f.A,{sx:{width:56,height:56,borderRadius:"14px",bgcolor:"rgba(24,144,255,0.08)",color:"#1890ff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:28},children:(0,xe.jsx)(ie.A,{})}),(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:14},children:"Choose a Drop Source to begin"}),(0,xe.jsx)(A.A,{sx:{color:"#64748b",fontSize:12,maxWidth:360,mb:1},children:"Select a source from below or the left panel to import or pick your delivery customers."}),(0,xe.jsxs)(g.A,{direction:{xs:"column",sm:"row"},gap:1.5,sx:{width:"100%",maxWidth:480,mt:1},children:[n({value:0,icon:ae.CtR,title:"Excel / CSV",sub:"Bulk upload a sheet",accent:"#1890ff"}),n({value:1,icon:oe.YXz,title:"Selection",sub:"Pick saved customers",accent:"#65387a"})]})]})})()]})]})})]})]}),(0,xe.jsx)("input",{accept:".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",id:"upload-file",type:"file",hidden:!0,onChange:e=>{const t=e.target.files[0];if(!t)return;const n=t.name.replace(/\.[^/.]+$/,"");St((e=>e?"".concat(e,", ").concat(n):n)),(e=>{try{var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!n)return void kt("No file selected.","warning");const i=n.name.toLowerCase(),r=i.endsWith(".csv"),s=i.endsWith(".xls")||i.endsWith(".xlsx");if(!r&&!s)return void kt("Invalid file type. Please upload a CSV or Excel file.","warning");const o=(e,t)=>{const n={};for(const s in Mt)n[Wt(s)]=Mt[s];const i=e.map((e=>{const t={};for(const r in e){const s=Wt(r),o=n[s]||s;let l=e[r];"firstname"===o&&(l="string"===typeof(i=l)?i.replace(/^[\d.\s]+/,"").trim():i),t[o]=l}var i;return t})),r=Object.keys(Mt).filter((e=>e.trim().endsWith("*"))).filter((e=>!t.includes(Wt(e))));if(r.length>0)return kt("Missing required columns: ".concat(r.join(", ")),"warning",3e3),void bt([]);bt(i),kt("File uploaded successfully","success",2e3),kt("Press Continue to add as drop customers","info",2500)};if(r&&l().parse(n,{header:!0,dynamicTyping:!0,skipEmptyLines:!0,complete:e=>{var t;if(null===(t=e.data)||void 0===t||!t.length)return kt("CSV file is empty or has no valid rows.","warning"),void bt([]);const n=e.meta.fields.map(Wt);o(e.data,n)},error:e=>kt("CSV parsing failed: ".concat(e.message),"warning")}),s){const e=new FileReader;e.onload=e=>{try{const t=e.target.result,n=a.LF(t,{type:"binary"}),i=n.SheetNames[0],r=n.Sheets[i],s=a.Wp.sheet_to_json(r,{defval:""});if(null===s||void 0===s||!s.length)return kt("Excel file is empty or invalid.","warning"),void bt([]);const l=Object.keys(s[0]).map(Wt);o(s,l)}catch(t){kt("Error reading Excel: ".concat(t.message),"warning")}},e.readAsBinaryString(n)}}catch(n){kt("Unexpected error: ".concat(n.message),"warning")}})(e)}}),(0,xe.jsxs)(H.A,{open:Ze,onClose:()=>Ue(!1),fullWidth:!0,fullScreen:n,sx:{"& .MuiDialog-paper":{borderRadius:{xs:0,sm:"16px"},overflow:"hidden"}},children:[(0,xe.jsx)(T.A,{sx:{bgcolor:t.palette.primary.main,color:"white",py:2.5},children:(0,xe.jsxs)(g.A,{spacing:1.5,children:[(0,xe.jsx)(A.A,{variant:"h4",sx:{fontWeight:600,color:"white"},children:"Select Drop Customers (".concat(Ve.length||0,")")}),(0,xe.jsx)(L.A,{sx:{width:"100%"},children:(0,xe.jsx)(F.A,{autoFocus:!0,fullWidth:!0,id:"input-search-header",placeholder:"Search by name, contact, or address\u2026",value:Qe,onChange:e=>Xe(e.target.value),sx:{bgcolor:"white",borderRadius:"10px","& .MuiOutlinedInput-input":{p:"10px 14px"}},startAdornment:(0,xe.jsx)(w.A,{position:"start",children:(0,xe.jsx)(re.A,{style:{fontSize:"small",color:"#64748b"}})}),endAdornment:(0,xe.jsx)(z.A,{sx:{visibility:Qe?"visible":"hidden",p:.5},onClick:()=>Xe(""),children:(0,xe.jsx)(U.A,{style:{fontSize:"18px"}})}),autoComplete:"off"})})]})}),(0,xe.jsx)(E.A,{}),(0,xe.jsx)(O.A,{sx:{p:2.5,bgcolor:"#fafbfc",minHeight:400,maxHeight:{xs:"none",sm:600}},children:0===(null===Ge||void 0===Ge?void 0:Ge.length)?(0,xe.jsx)(g.A,{alignItems:"center",justifyContent:"center",sx:{minHeight:300},children:(0,xe.jsx)(se.A,{description:"No saved customers found for this client"})}):(0,xe.jsx)(g.A,{spacing:0,children:null===Ge||void 0===Ge?void 0:Ge.map(((e,t)=>{const n=Ve.some((t=>t.customerid===e.customerid));return(0,xe.jsx)(B.A,{children:(0,xe.jsx)(J.A,{sx:{m:0,py:1,px:1.25,borderRadius:"10px","&:hover":{bgcolor:"rgba(24,144,255,0.04)"}},control:(0,xe.jsx)(V.A,{checked:n,onChange:t=>(async(e,t)=>{Se(!0);try{if(e.target.checked){const{roundedDistance:e,totalcharge:n}=await Ct(t);qe((r=>[...r,(0,i.A)((0,i.A)({},t),{},{distance:e,totalcharge:n})]))}else qe((e=>e.filter((e=>e.customerid!==t.customerid))))}catch(n){console.error("Failed to calculate distance:",n)}finally{Se(!1)}})(t,e)}),label:(0,xe.jsxs)(f.A,{sx:{width:"100%"},children:[(0,xe.jsxs)(A.A,{sx:{fontWeight:600,color:"#1e293b",fontSize:13.5},children:[e.firstname," (",e.contactno,")"]}),(0,xe.jsx)(A.A,{sx:{color:"#64748b",fontSize:12,mt:.25},children:e.address})]})})},e.customerid||t)}))})}),(0,xe.jsx)(E.A,{}),(0,xe.jsx)(q.A,{sx:{p:2,bgcolor:"#fafbfc"},children:(0,xe.jsx)(k.A,{variant:"outlined",color:0===Ve.length?"error":"primary",onClick:()=>Ue(!1),sx:{borderRadius:"10px",textTransform:"none",fontWeight:600,px:3},children:0===Ve.length?"Close":"Continue"})})]})]})}},42041:()=>{},62217:e=>{"use strict";e.exports="data:image/png;base64,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"},83686:()=>{},94826:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(59254),r=n(46639),s=n(62217),o=n(44414);const l=(0,i.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),a=(0,i.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,o.jsxs)(l,{children:[(0,o.jsx)(r.A,{color:"primary",size:80,thickness:6}),(0,o.jsx)(a,{children:(0,o.jsx)("img",{src:s,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[54],{855:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(7208),r=n(76475),s=n(44414);function o(e){var t,n;let o,l,{children:a,type:c="scale",direction:d="right",offset:h=10,scale:x={hover:1.05,tap:.95}}=e;switch(d){case"up":case"left":o=h,l=0;break;default:o=0,l=h}const[p,u]=(0,i.Y)(o,l),[m,f]=(0,i.Y)(o,l);switch(c){case"rotate":return(0,s.jsx)(r.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:a});case"slide":return"up"===d||"down"===d?(0,s.jsx)(r.P.div,{animate:{y:void 0!==m?m:""},onHoverEnd:()=>f(),onHoverStart:()=>f(),children:a}):(0,s.jsx)(r.P.div,{animate:{x:void 0!==p?p:""},onHoverEnd:()=>u(),onHoverStart:()=>u(),children:a});default:return"number"===typeof x&&(x={hover:x,tap:x}),(0,s.jsx)(r.P.div,{whileHover:{scale:null===(t=x)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=x)||void 0===n?void 0:n.tap},children:a})}}},23787:(e,t,n)=>{"use strict";n.d(t,{FG:()=>p,nV:()=>h,pY:()=>u,pg:()=>x});var i=n(89379),r=n(80045),s=n(93230),o=n(2235),l=n(16491),a=n(82053),c=n(44414);const d=["children","scroll","onScroll","sx"],h=e=>{let{children:t,scroll:n=!1,onScroll:o,sx:l}=e,a=(0,r.A)(e,d);return(0,c.jsx)(s.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:o,sx:(0,i.A)((0,i.A)({p:1.5},n&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},x=e=>{let{accent:t="#662582",header:n,footer:r,selected:s=!1,onClick:a,children:d,sx:h}=e;return(0,c.jsxs)(o.A,{elevation:0,onClick:a,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:s?t:"#e2e8f0",background:s?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[n,d,r]})]})},p=e=>{let{children:t,columns:n=2,sx:r}=e;return(0,c.jsx)(l.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(n,", minmax(0, 1fr))"),gap:1,mt:1.25},r),children:t})},u=e=>{let{label:t,value:n,children:i,full:r=!1,align:s="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:r?"1 / -1":"auto",minWidth:0,textAlign:s},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==n&&void 0!==n?n:"\u2014"})})]})}},39009:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>fe});var i=n(89379),r=n(9950),s=n(26910),o=n(50847),l=n.n(o),a=n(55271),c=n(4159),d=n.n(c),h=n(28429),x=n(14857),p=n(47223),u=n(8881),m=n(55158),f=n(16491),g=n(93230),A=n(82053),v=n(25277),j=n(60899),b=n(48089),y=n(77922),S=n(29925),w=n(2046),k=n(10226),Y=n(46639),C=n(83274),z=n(25333),W=n(1320),M=n(2235),N=n(15769),P=n(69780),D=n(9213),I=n(21671),R=n(34075),H=n(96583),T=n(40033),L=n(25979),F=n(2660),E=n(74745),O=n(28170),B=n(96557),J=n(16497),V=n(93038),q=n(79739),G=n(30633),K=n(81831),Z=n(95359),U=n(7762),Q=n(87942),X=n(81419),_=n(3911),$=n(47738),ee=n(27379),te=n(90421),ne=n(94118),ie=n(88349),re=n(60767),se=n(13838),oe=n(54826),le=n(43302),ae=n(31222),ce=n(52351),de=n(94826),he=(n(855),n(23787)),xe=(n(42041),n(44414)),pe=n(36220);d().extend(pe);const ue={fontSize:11.5,fontWeight:700,color:"#475569",py:.75,px:1},me={fontSize:12,py:.6,px:1},fe=()=>{const e=(0,h.Zp)(),t=(0,x.A)(),n=(0,p.A)(t.breakpoints.down("md")),o=(0,r.useRef)(null),c=(0,r.useRef)(null),pe=localStorage.getItem("userid"),[fe,ge]=(0,r.useState)([]),[Ae,ve]=(0,r.useState)([]),[je,be]=(0,r.useState)([]),[ye,Se]=(0,r.useState)(!1),[we,ke]=(0,r.useState)(!1),[Ye,Ce]=(0,r.useState)(0),[ze,We]=(0,r.useState)(0),[Me,Ne]=(0,r.useState)(0),[Pe,De]=(0,r.useState)(null),[Ie,Re]=(0,r.useState)(null),[He,Te]=(0,r.useState)(0),[Le,Fe]=(0,r.useState)(0),[Ee,Oe]=(0,r.useState)(0),[Be,Je]=(0,r.useState)(null),[Ve,qe]=(0,r.useState)([]),[Ge,Ke]=(0,r.useState)([]),[Ze,Ue]=(0,r.useState)(!1),[Qe,Xe]=(0,r.useState)(""),[_e,$e]=(0,r.useState)(d()().format("MM-DD-YYYY")),[et,tt]=(0,r.useState)(""),[nt,it]=(0,r.useState)(null),[rt,st]=(0,r.useState)(null),[ot,lt]=(0,r.useState)(""),[at,ct]=(0,r.useState)(),[dt,ht]=(0,r.useState)(0),[xt,pt]=(0,r.useState)(0),[ut,mt]=(0,r.useState)(0),[ft,gt]=(0,r.useState)(0),[At,vt]=(0,r.useState)(null),[jt,bt]=(0,r.useState)([]),[yt,St]=(0,r.useState)(""),wt=(0,r.useRef)({}),kt=(e,t,n)=>{(0,u.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||1500})},Yt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;const i="".concat(t,"-").concat(e);wt.current[i]||(kt(e,t,n),wt.current[i]=!0,setTimeout((()=>delete wt.current[i]),3e3))};(0,r.useEffect)((()=>{We(0),De(null),Ne(0),Re(null),be([]),Je(null),qe([]),bt([]),vt(null),St(""),it(null),st(null),tt("")}),[Ye]),(0,r.useEffect)((()=>{Ne(0),Re(null),qe([]),bt([]),vt(null),St("")}),[ze]);(0,r.useEffect)((()=>{(async()=>{Se(!0);try{const e=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(pe));ge(e.data.details||[])}catch(e){Yt(e.message,"error",5e3)}finally{Se(!1)}})()}),[]);(0,r.useEffect)((()=>{Ye&&(async()=>{Se(!0);try{const e=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(Ye,"&status=active"));if(e.data.status){const t=(e.data.details||[]).map((e=>(0,i.A)((0,i.A)({},e),{},{label:"".concat(e.tenantname)})));ve(t)}}catch(e){Yt("Failed to load clients","warning",3e3)}finally{Se(!1)}})()}),[Ye]);(0,r.useEffect)((()=>{if(!ze)return;const e=setTimeout((()=>{(""===Qe||Qe.length>2)&&(async()=>{try{const e=""===Qe?"".concat("https://jupiter.nearle.app/live/api/v1","/customers/gettenantcustomers/?tenantid=").concat(ze,"&pageno=1&pagesize=30"):"".concat("https://jupiter.nearle.app/live/api/v1","/customers/search/?tenantid=").concat(ze,"&keyword=").concat(Qe),t=await s.A.get(e);t.data.status&&Ke(t.data.details||[])}catch(e){console.log(e),kt("server error","warning")}})()}),250);return()=>clearTimeout(e)}),[Qe,ze]),(0,r.useEffect)((()=>{let e=0,t=0,n=0,i=0;Ve.forEach((r=>{e+=Number(r.distance)||0,t+=Number(r.totalcharge)||0,n+=Number(r.quantity)||0,i+=Number(r.collectionamt)||0})),ht(e),pt(t),mt(n),gt(i)}),[Ve]);const Ct=async e=>{var t,n;if("undefined"===typeof window||null===(t=window.google)||void 0===t||null===(n=t.maps)||void 0===n||!n.DistanceMatrixService)throw new Error("Google Maps not loaded");const i=new window.google.maps.DistanceMatrixService;try{var r,s,o,l,a;if(!e||"object"!==typeof e)throw new Error("Invalid customer data.");if(!Be||"object"!==typeof Be)throw new Error("Origin (pickCust) data missing or invalid.");const t=await(c=Be,d=e,new Promise(((e,t)=>{try{if(!c||!d)return t(new Error("Origin or destination data missing."));i.getDistanceMatrix({origins:[new window.google.maps.LatLng(c.latitude,c.longitude)],destinations:[new window.google.maps.LatLng(d.latitude,d.longitude)],travelMode:"DRIVING",unitSystem:window.google.maps.UnitSystem.METRIC},((n,i)=>{"OK"===i?e(n):t(new Error("Google API error: ".concat(i)))}))}catch(n){t(new Error("Unexpected error inside DistanceMatrixService: ".concat(n.message)))}}))),n=null===t||void 0===t||null===(r=t.rows)||void 0===r||null===(s=r[0])||void 0===s||null===(o=s.elements)||void 0===o||null===(l=o[0])||void 0===l||null===(a=l.distance)||void 0===a?void 0:a.value;if(null==n)throw new Error("Malformed Distance Matrix response: missing distance value.");const h=n/1e3,x=Math.round(h);return{roundedDistance:x,totalcharge:x{let t=!1;if(qe((n=>(t=n.some((t=>t.firstname===e.firstname)),t?n.filter((t=>t.firstname!==e.firstname)):n))),!t){Se(!0);try{const{roundedDistance:t,totalcharge:n}=await Ct(e);qe((r=>r.some((t=>t.firstname===e.firstname))?r:[...r,(0,i.A)((0,i.A)({},e),{},{distance:t,totalcharge:n})]))}catch(n){console.error("Failed to calculate distance:",n)}finally{Se(!1)}}};(0,r.useEffect)((()=>{Ye&&(async()=>{try{const e=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocationconfig/?applocationid=").concat(Ye));if(e.data.status){const t=e.data.details.applocationadmins.map((e=>e.userfcmtokem));ct(t)}}catch(e){console.log(e)}})()}),[Ye]);const Wt=e=>null===e||void 0===e?void 0:e.toString().trim().toLowerCase().replace(/\s+/g,""),Mt={"pickupdate(yyyy-mmm-dd)":"date","sendername*":"locationname","senderphone*":"locationcontact","senderaddress*":"locationaddress","receivername*":"firstname",receiverphone:"contactno","receiveralternatephone*":"altcontactno",receiverfulladdress:"address",receiverlatitude:"latitude",receiverlongitude:"longitude","itemdescription*":"description",Quantity:"quantity"," Collect Cash":"collectionamt",customerDeliveryTime:"customerdeliverytime",kitchenPickupTime:"kitchenpickuptime"},Nt=(e,t)=>{qe((n=>n.map((n=>n.customerid===e?(0,i.A)((0,i.A)({},n),{},{quantity:Number(t)||0}):n))))},Pt=(e,t)=>{qe((n=>n.map((n=>n.customerid===e?(0,i.A)((0,i.A)({},n),{},{collectionamt:Number(t)||0}):n))))},Dt={location:!!Ye,client:!!ze,business:!!Me,schedule:!!rt,drops:Ve.length>0},It=Dt.location&&Dt.client&&Dt.business&&Dt.schedule&&Dt.drops,Rt=Ve.length>0?"drops":jt.length>0?"preview":"empty";return(0,xe.jsxs)(xe.Fragment,{children:[ye&&(0,xe.jsx)(ce.A,{}),(0,xe.jsx)(m.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:we,children:(0,xe.jsx)(de.A,{color:"inherit"})}),(0,xe.jsxs)(f.A,{className:"orders-workspace-bg",sx:{height:{xs:"auto",md:"calc(100vh - 64px)"},minHeight:{xs:"calc(100vh - 64px)",md:0},display:"flex",flexDirection:"column",overflow:{xs:"visible",md:"hidden"},p:{xs:.75,sm:1.25},gap:1},children:[(0,xe.jsxs)(g.A,{direction:"row",alignItems:"center",gap:1,flexWrap:"wrap",sx:{flexShrink:0,px:.5},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,fontSize:{xs:16,sm:17},color:"#1e293b",lineHeight:1.2},children:"Create Multiple Orders"}),(0,xe.jsx)(v.A,{size:"small",label:"".concat(Ve.length," drop").concat(1===Ve.length?"":"s"),sx:{height:20,fontSize:10.5,fontWeight:700,bgcolor:Ve.length?"rgba(24,144,255,0.10)":"#f1f5f9",color:Ve.length?"#1890ff":"#94a3b8",border:"1px solid ".concat(Ve.length?"rgba(24,144,255,0.25)":"#e2e8f0")}}),(0,xe.jsx)(f.A,{sx:{flex:1}}),(0,xe.jsx)(A.A,{sx:{fontSize:11,color:"#94a3b8",display:{xs:"none",md:"block"}},children:"Bulk-create deliveries from CSV/Excel or saved customers."})]}),(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.25,sx:{flex:1,minHeight:0,overflow:{xs:"visible",md:"hidden"}},children:[(0,xe.jsxs)(j.Ay,{item:!0,xs:12,md:6,sx:{height:{xs:"auto",md:"100%"},minHeight:0,display:"flex",flexDirection:"column",gap:{xs:1.25,md:2.25},overflowY:{xs:"visible",md:"auto"},pr:{xs:0,md:.75}},children:[(0,xe.jsxs)(b.A,{className:"orders-card",sx:{p:2,flexShrink:0},children:[(0,xe.jsx)(f.A,{className:"section-title-bar",sx:{mb:1.5},children:(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:13.5,letterSpacing:"-0.01em"},children:"Setup"})}),(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.75,children:[(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:4,children:(0,xe.jsx)(y.A,{fullWidth:!0,size:"small",ref:o,className:"header-compact-input",options:fe||[],getOptionLabel:e=>"".concat(e.locationname),onChange:(e,t,n)=>{"clear"===n?Ce(0):t&&Ce(t.applocationid)},renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{size:"small",placeholder:"Choose Location",label:"Location",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(le.sIY,{style:{color:"#94a3b8",fontSize:12,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:4,children:(0,xe.jsx)(y.A,{fullWidth:!0,size:"small",className:"header-compact-input",options:Ae||[],value:Pe,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",isOptionEqualToValue:(e,t)=>e.tenantid===t.tenantid,onOpen:e=>{Ye||(e.preventDefault(),Yt("Please select Location first!","warning",3e3),setTimeout((()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"===n?(We(0),De(null)):t&&(We(t.tenantid),De(t),(async e=>{try{const t=(await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e))).data.details||{};Te(t.baseprice||0),Fe(t.priceperkm||0),Oe(t.minkm||0)}catch(t){console.log("fetchTenantPricing error",t)}})(t.tenantid),(async e=>{try{const t=(await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e))).data.details||[];1===t.length?(be(t),Je(t[0]),Ne(t[0].locationid),Re(t[0]),it(t[0].slots)):be(t)}catch(t){console.log("gettenantlocations",t)}})(t.tenantid))},renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{size:"small",placeholder:"Choose Client",label:"Client",inputRef:c,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(oe.x$1,{style:{color:"#94a3b8",fontSize:11,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:4,children:1===je.length?(0,xe.jsx)(S.A,{variant:"outlined",fullWidth:!0,size:"small",label:"Business Location",value:je[0].locationname,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:{style:{color:t.palette.primary.main},startAdornment:(0,xe.jsx)(Q.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}})}}):(0,xe.jsx)(y.A,{fullWidth:!0,size:"small",className:"header-compact-input",value:Ie,options:je||[],getOptionLabel:e=>null!==e&&void 0!==e&&e.locationname?"".concat(e.locationname," (").concat(e.suburb||"",")"):"",onOpen:e=>{Ye||ze?ze||(e.preventDefault(),Yt("Please select Client first!","warning",3e3),setTimeout((()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),Yt("Please select Location and Client first!","warning",3e3),setTimeout((()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(Ne(t.locationid||0),Re(t),Je(t),it(null===t||void 0===t?void 0:t.slots)):(Ne(0),Re(null),Je(null),it(null))},renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{size:"small",placeholder:"Business Location",label:"Business Location",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(Q.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})})]})]}),(0,xe.jsxs)(b.A,{className:"orders-card",sx:{p:2,flexShrink:0},children:[(0,xe.jsx)(f.A,{className:"section-title-bar section-title-bar--accent",sx:{mb:1.5},children:(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:13.5,letterSpacing:"-0.01em"},children:"Schedule & Pickup"})}),(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.75,children:[(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:6,children:(0,xe.jsx)(K.$,{dateAdapter:Z.R,children:(0,xe.jsx)(G.l,{label:"Pickup Date",format:"DD-MM-YYYY",value:_e?d()(_e):null,onChange:e=>{if(!e||!d()(e).isValid())return void $e(d()().format("MM-DD-YYYY"));d()().diff(d()("".concat(d()(e).format("YYYY-MM-DD"))),"d")<=0?($e(d()(e).format("MM-DD-YYYY")),tt(""),st(null)):(kt("Choose an upcoming date","warning"),$e(d()().format("MM-DD-YYYY")))},disablePast:!0,slotProps:{textField:{size:"small",fullWidth:!0,InputLabelProps:{shrink:!0},InputProps:{startAdornment:(0,xe.jsx)(w.A,{position:"start",children:(0,xe.jsx)(X.A,{style:{color:"#94a3b8",fontSize:"13px"}})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",height:"36px",paddingLeft:"10px"}}}}})})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,sm:6,children:(0,xe.jsx)(y.A,{size:"small",fullWidth:!0,options:nt||[],sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",height:"36px"}},onChange:(e,t,n)=>{if("clear"===n||!t)return tt(null),void st(null);if(!t.time)return void Yt("This slot has no time configured.","warning",3e3);const i=d()(t.time,"HH:mm").format("hh:mm A");tt(i);const r=d()("".concat(_e," ").concat(i),"MM-DD-YYYY hh:mm A").format("YYYY-MM-DD hh:mm A");st(r)},getOptionLabel:e=>e?"".concat(e.name," (").concat(d()(e.time,"HH:mm").format("hh:mm A"),")"):"",renderInput:e=>(0,xe.jsx)(S.A,(0,i.A)((0,i.A)({},e),{},{label:"Pickup Slot",placeholder:"Select Pickup Slot",fullWidth:!0,InputLabelProps:{shrink:!0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",height:"36px"}},InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(_.A,{style:{color:"#94a3b8",fontSize:"13px",marginRight:"6px",marginLeft:"2px",flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,children:Be?(0,xe.jsxs)(g.A,{direction:"row",spacing:1.25,alignItems:"center",sx:{border:"1px solid #eef2f6",borderLeft:"3px solid #1890ff",borderRadius:"10px",px:1.25,py:.75,bgcolor:"#fbfcff"},children:[(0,xe.jsx)(f.A,{sx:{width:28,height:28,borderRadius:"8px",background:"linear-gradient(135deg,#1890ff,#096dd9)",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,fontSize:12,boxShadow:"0 4px 10px rgba(24,144,255,0.30)"},children:(0,xe.jsx)(le.sIY,{})}),(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(A.A,{sx:{fontSize:12.5,fontWeight:700,color:"#1e293b",lineHeight:1.2},noWrap:!0,children:Be.locationname||"\u2014"}),(0,xe.jsx)(A.A,{sx:{fontSize:11,color:"#64748b",lineHeight:1.3},noWrap:!0,children:Be.address||"\u2014"})]})]}):(0,xe.jsx)(A.A,{sx:{color:"#94a3b8",fontSize:12},children:"Pickup auto-fills once a Business Location is selected."})})]})]}),(0,xe.jsxs)(b.A,{className:"orders-card delivery-prefs-card",sx:{p:2,flexShrink:0},children:[(0,xe.jsxs)(f.A,{className:"delivery-prefs-header",sx:{mb:1},children:[(0,xe.jsx)(A.A,{className:"delivery-prefs-title",children:"Order Notes"}),(0,xe.jsx)(A.A,{className:"delivery-prefs-sub",children:"Applied to every order"})]}),(0,xe.jsx)(f.A,{className:"delivery-prefs-row",children:(0,xe.jsxs)(f.A,{className:"delivery-prefs-field",sx:{width:"100%"},children:[(0,xe.jsxs)("label",{className:"delivery-prefs-label",htmlFor:"bulk-dispatch-notes-input",children:[(0,xe.jsx)($.A,{style:{fontSize:11,color:"#65387a"}}),"Special Dispatch Notes"]}),(0,xe.jsx)(S.A,{id:"bulk-dispatch-notes-input",size:"small",fullWidth:!0,placeholder:"Gate codes, call instructions, special cargo care\u2026",value:ot,onChange:e=>lt(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",padding:"0 10px",alignItems:"center",fontSize:"12px",background:"#ffffff",height:"32px"},"& .MuiOutlinedInput-input":{padding:"0 !important",fontSize:"12px !important",lineHeight:"32px"}}})]})})]}),(0,xe.jsxs)(b.A,{className:"orders-card pricing-summary-card",sx:{flexShrink:0,p:"16px 18px !important"},children:[(0,xe.jsxs)(f.A,{className:"pricing-header",sx:{mb:1.5,pb:1},children:[(0,xe.jsx)(A.A,{className:"pricing-title",sx:{fontSize:"13px !important"},children:"Bulk Summary"}),(0,xe.jsx)(A.A,{className:"pricing-subtitle",sx:{fontSize:"10px !important"},children:"Live totals"})]}),(()=>{const e=e=>{let{icon:t,label:n,value:r,accent:s,active:o}=e;return(0,xe.jsxs)(f.A,{sx:(0,i.A)({bgcolor:"#fff",border:"1px solid #eef2f6",borderRadius:"10px",px:1,py:.75,display:"flex",alignItems:"center",gap:.85,minWidth:0,transition:"border-color 0.2s, box-shadow 0.2s"},o&&{borderColor:"".concat(s,"55"),boxShadow:"0 2px 6px -2px ".concat(s,"33")}),children:[(0,xe.jsx)(f.A,{sx:{width:26,height:26,borderRadius:"8px",bgcolor:"".concat(s,"18"),color:s,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,flexShrink:0},children:(0,xe.jsx)(t,{})}),(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(A.A,{sx:{fontSize:9.5,fontWeight:600,color:"#94a3b8",letterSpacing:.4,textTransform:"uppercase",lineHeight:1},children:n}),(0,xe.jsx)(A.A,{sx:{fontSize:13.5,fontWeight:800,color:o?"#1e293b":"#94a3b8",lineHeight:1.2,mt:.25},noWrap:!0,children:r})]})]})};return(0,xe.jsxs)(j.Ay,{container:!0,spacing:1.25,children:[(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.$Fg,label:"Distance",value:dt?"".concat(dt," km"):"\u2014",accent:"#1890ff",active:!!dt})}),(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.H5e,label:"Quantity",value:ut||0,accent:"#16a34a",active:!!ut})}),(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.MxO,label:"Cash Collect",value:"\u20b9".concat(Number(ft).toFixed(2)),accent:"#d97706",active:!!ft})}),(0,xe.jsx)(j.Ay,{item:!0,xs:6,children:e({icon:oe.dv1,label:"Deliveries",value:Ve.length,accent:"#65387a",active:Ve.length>0})})]})})(),Ve.length>0&&(0,xe.jsxs)("div",{className:"total-charge-badge",style:{marginTop:14,padding:"10px 14px"},children:[(0,xe.jsxs)("div",{className:"total-charge-left",children:[(0,xe.jsx)(oe.wTh,{className:"total-charge-icon"}),(0,xe.jsx)("div",{className:"total-charge-label",children:"Total Charge"})]}),(0,xe.jsxs)("div",{className:"total-charge-val",style:{fontSize:17},children:["\u20b9",Number(xt).toFixed(2)]})]}),(0,xe.jsx)(f.A,{sx:{mt:1.75},children:(0,xe.jsx)(k.A,{fullWidth:!0,className:"gradient-btn-create",disabled:!It||we,startIcon:!we&&(0,xe.jsx)(oe.Cer,{style:{fontSize:11}}),onClick:async()=>{if(!ze)return void kt("Choose Client","warning");if(!Be)return void kt("Pickup location required","warning");if(!rt)return void kt("Select a pickup slot","warning");if(!Ve.length)return void kt("Add at least one drop customer","warning");const t=(()=>{if(rt){const e=d()(rt,["YYYY-MM-DD hh:mm A","YYYY-MM-DD HH:mm:ss"]);if(e.isValid())return e.format("YYYY-MM-DD HH:mm:ss")}if(_e&&et){const e=d()("".concat(d()(_e).format("YYYY-MM-DD")," ").concat(et),["YYYY-MM-DD hh:mm A","YYYY-MM-DD HH:mm:ss"]);if(e.isValid())return e.format("YYYY-MM-DD HH:mm:ss")}return d()().format("YYYY-MM-DD HH:mm:ss")})(),n=Ve.map((e=>{var n,i,r,s;return{applocationid:Be.applocationid,configid:9,partnerid:Be.partnerid,partneruserid:+pe,paymentstatus:1,paymenttype:42,pickupaddress:Be.address||"",pickupcity:Be.city||"",pickupcontactno:Be.contactno||"",pickupcustomer:Be.locationname||"",pickuplandmark:Be.landmark||"",pickuplat:Be.latitude,pickuplocation:Be.suburb||"",pickuplocationid:Be.locationid||0,pickuplong:Be.longitude,tenantid:Be.tenantid,customerid:+(null===e||void 0===e?void 0:e.customerid),deliveryaddress:e.address||"",deliverycharge:+e.totalcharge||0,deliverycity:e.city||"",deliverycontactno:(null===(n=e.contactno)||void 0===n?void 0:n.toString())||"",deliverycustomer:e.firstname||"",deliveryid:+e.customerid,deliverylandmark:e.landmark||"",deliverylat:(null===(i=e.latitude)||void 0===i?void 0:i.toString())||"",deliverylocation:e.suburb||"",deliverylocationid:e.deliverylocationid||0,deliverylong:(null===(r=e.longitude)||void 0===r?void 0:r.toString())||"",deliverytime:t,deliverytype:"B",itemcount:1,quantity:e.quantity,collectionamt:e.collectionamt,kms:(null===(s=e.distance)||void 0===s?void 0:s.toString())||"0",locationid:+Be.locationid,moduleid:+Be.moduleid,orderamount:+e.totalcharge||0,ordercharges:0,orderdate:d()().format("YYYY-MM-DD HH:mm:ss"),ordernotes:ot,orderstatus:"created",ordervalue:+e.totalcharge||0,pickupSlot:rt}}));Se(!0),ke(!0);try{const t=await s.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/orders/createorders"),n);var i;if(t.data.status)kt("Orders Created Successfully","success",2e3),at&&(async()=>{try{"Success"===(await s.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/sendnotifications"),{priority:"high",registration_ids:at,data:{accessid:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk"},notification:{title:"Nearle Merchant",body:"An Order has been placed successfully, kindly process the same",sound:"ring"}})).data.message&&kt("Notification sent Successfully","success",1e3)}catch(e){kt(e.message,"error",1e3)}})(),e("/nearle/orders");else kt((null===t||void 0===t||null===(i=t.data)||void 0===i?void 0:i.message)||"Order creation failed. Please try again.","warning",3e3)}catch(o){let e="Something went wrong. Please try again.";var r;if(o.response)e=(null===(r=o.response.data)||void 0===r?void 0:r.message)||"Server error (".concat(o.response.status,")");else o.request&&(e="Network error. Check your internet connection.");kt(e,"error",3e3)}finally{Se(!1),ke(!1)}},sx:{minHeight:"36px !important"},children:we?(0,xe.jsx)(Y.A,{color:"inherit",size:16,thickness:5}):"Dispatch ".concat(Ve.length||""," ").concat(1===Ve.length?"Order":"Orders").trim()})})]})]}),(0,xe.jsx)(j.Ay,{item:!0,xs:12,md:6,sx:{height:{xs:"auto",md:"100%"},minHeight:0,display:"flex",flexDirection:"column"},children:(0,xe.jsxs)(b.A,{className:"orders-card",sx:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",p:1.25,maxHeight:{xs:"none",md:685}},children:[(0,xe.jsxs)(g.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,sx:{mb:.75,flexShrink:0},children:[(0,xe.jsxs)(f.A,{className:"section-title-bar",sx:{mb:0},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:13.5,letterSpacing:"-0.01em"},children:"drops"===Rt?"Drop List":"preview"===Rt?"File Preview":"Preview"}),(0,xe.jsx)(v.A,{size:"small",label:"drops"===Rt?Ve.length:"preview"===Rt?jt.length:0,sx:{height:20,fontSize:10.5,fontWeight:700,ml:1,bgcolor:"rgba(168,85,247,0.10)",color:"#65387a",border:"1px solid rgba(168,85,247,0.25)"}})]}),"drops"===Rt&&(0,xe.jsx)(v.A,{size:"small",label:"\u20b9".concat(Number(xt).toFixed(2)," total"),sx:{height:22,fontWeight:700,fontSize:11,bgcolor:"rgba(101,56,122,0.10)",color:"#65387a",border:"1px solid rgba(101,56,122,0.25)"}}),"preview"===Rt&&(0,xe.jsx)(v.A,{size:"small",label:"Awaiting Continue",icon:(0,xe.jsx)(ee.A,{style:{fontSize:11}}),sx:{height:22,fontWeight:700,fontSize:11,bgcolor:"rgba(245,158,11,0.12)",color:"#b45309",border:"1px solid rgba(245,158,11,0.30)","& .MuiChip-icon":{color:"#b45309"}}}),"empty"!==Rt&&(()=>{const e=Ye&&ze&&Me,t=t=>{var n;e?(vt(t),0===t?null===(n=document.getElementById("upload-file"))||void 0===n||n.click():1===t&&(Ue(!0),Xe(""))):Yt("Please select Location, Client, and Business Location first.","warning",3e3)};return(0,xe.jsxs)(g.A,{direction:"row",gap:.75,alignItems:"center",children:[(0,xe.jsx)(k.A,{size:"small",variant:"outlined",onClick:()=>t(0),startIcon:(0,xe.jsx)(ae.CtR,{}),sx:{height:24,py:0,textTransform:"none",borderRadius:"6px",fontSize:10.5,fontWeight:600,borderColor:"#cbd5e1",color:"#475569","&:hover":{borderColor:"#1890ff",color:"#1890ff"}},children:"Excel / CSV"}),(0,xe.jsx)(k.A,{size:"small",variant:"outlined",onClick:()=>t(1),startIcon:(0,xe.jsx)(oe.YXz,{}),sx:{height:24,py:0,textTransform:"none",borderRadius:"6px",fontSize:10.5,fontWeight:600,borderColor:"#cbd5e1",color:"#475569","&:hover":{borderColor:"#65387a",color:"#65387a"}},children:"Selection"})]})})()]}),yt&&(0,xe.jsxs)(g.A,{direction:"row",gap:.75,alignItems:"center",sx:{mb:.75,color:"#64748b",flexShrink:0},children:[(0,xe.jsx)(te.A,{style:{fontSize:12}}),(0,xe.jsx)(A.A,{sx:{fontSize:11.5},noWrap:!0,children:yt})]}),"preview"===Rt&&jt.length>=1&&(0,xe.jsxs)(f.A,{sx:{mb:1,p:1.25,bgcolor:"rgba(245,158,11,0.06)",border:"1.5px solid rgba(245,158,11,0.25)",borderRadius:"10px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexShrink:0,animation:"blink 1.5s infinite","@keyframes blink":{"0%":{borderColor:"rgba(245,158,11,0.25)"},"50%":{borderColor:"rgba(245,158,11,0.6)"},"100%":{borderColor:"rgba(245,158,11,0.25)"}}},children:[(0,xe.jsxs)(f.A,{sx:{textAlign:"left"},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,fontSize:12,color:"#b45309",lineHeight:1.2},children:"Process & Calculate Distances"}),(0,xe.jsx)(A.A,{sx:{color:"#b45309",opacity:.8,fontSize:10.5,lineHeight:1.25},children:"Click continue to import spreadsheet rows and calculate drop charges."})]}),(0,xe.jsx)(k.A,{variant:"contained",size:"small",color:"warning",onClick:()=>jt.forEach((e=>zt(e))),sx:{textTransform:"none",borderRadius:"8px",fontWeight:700,fontSize:11,height:28,px:1.5,bgcolor:"#d97706",boxShadow:"none","&:hover":{bgcolor:"#b45309",boxShadow:"none"}},children:"Continue"})]}),(0,xe.jsxs)(f.A,{sx:{flex:1,minHeight:0,overflow:"auto"},children:["drops"===Rt&&n&&(0,xe.jsxs)(he.nV,{sx:{p:0},children:[Ve.map(((e,t)=>{var n;return(0,xe.jsx)(he.pg,{accent:"#65387a",header:(0,xe.jsxs)(g.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsxs)(A.A,{sx:{fontSize:14,fontWeight:700,color:"#1e293b",lineHeight:1.2},children:[t+1,". ",e.firstname]}),(0,xe.jsx)(A.A,{sx:{fontSize:12,color:"#64748b",mt:.25},children:e.address})]}),(0,xe.jsx)(C.A,{title:"Remove",children:(0,xe.jsx)(z.A,{size:"small",onClick:()=>zt(e),sx:{color:"#ef4444",p:.5,flexShrink:0},children:(0,xe.jsx)(ne.A,{style:{fontSize:14}})})})]}),children:(0,xe.jsxs)(he.FG,{columns:2,children:[(0,xe.jsx)(he.pY,{label:"Qty",children:0===At?(0,xe.jsx)(A.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},children:null!==(n=e.quantity)&&void 0!==n?n:"\u2014"}):(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.quantity||"",onChange:t=>Nt(e.customerid,t.target.value),inputProps:{min:0},fullWidth:!0,sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",height:34}}})}),(0,xe.jsx)(he.pY,{label:"Cash",children:0===At?(0,xe.jsx)(A.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},children:"\u20b9".concat(Number(e.collectionamt||0).toFixed(2))}):(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.collectionamt?e.collectionamt:"",placeholder:"0",onChange:t=>{const n=Number(t.target.value);Pt(e.customerid,n>0?n:0)},inputProps:{min:0},InputProps:{startAdornment:(0,xe.jsx)(w.A,{position:"start",children:"\u20b9"})},fullWidth:!0,sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",height:34}}})}),(0,xe.jsx)(he.pY,{label:"Km",value:e.distance}),(0,xe.jsx)(he.pY,{label:"Charge",align:"right",children:(0,xe.jsxs)(A.A,{sx:{fontSize:13,fontWeight:700,color:"#1e293b"},children:["\u20b9",Number((null===e||void 0===e?void 0:e.totalcharge)||0).toFixed(2)]})})]})},e.customerid||e.firstname||t)})),(0,xe.jsx)(he.pg,{accent:"#65387a",sx:{bgcolor:"#fafbfc"},children:(0,xe.jsxs)(he.FG,{columns:2,children:[(0,xe.jsx)(he.pY,{label:"Total Qty",value:ut}),(0,xe.jsx)(he.pY,{label:"Total Cash",value:"\u20b9".concat(Number(ft).toFixed(2))}),(0,xe.jsx)(he.pY,{label:"Total Km",value:dt}),(0,xe.jsx)(he.pY,{label:"Total Charge",align:"right",children:(0,xe.jsxs)(A.A,{sx:{fontSize:14,fontWeight:800,color:"#65387a"},children:["\u20b9",Number(xt).toFixed(2)]})})]})})]}),"drops"===Rt&&!n&&(0,xe.jsx)(W.A,{component:M.A,sx:{borderRadius:"10px",border:"1px solid #eef2f6",boxShadow:"none"},children:(0,xe.jsxs)(N.A,{size:"small",stickyHeader:!0,children:[(0,xe.jsx)(P.A,{sx:{bgcolor:"#f8fafc"},children:(0,xe.jsxs)(D.A,{children:[(0,xe.jsx)(I.A,{sx:ue,children:"#"}),(0,xe.jsx)(I.A,{sx:ue,children:"Customer"}),(0,xe.jsx)(I.A,{sx:ue,children:"Address"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Qty"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Cash"}),(0,xe.jsx)(I.A,{sx:ue,children:"Km"}),(0,xe.jsx)(I.A,{sx:ue,align:"right",children:"Charge"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:" "})]})}),(0,xe.jsxs)(R.A,{children:[Ve.map(((e,t)=>(0,xe.jsxs)(D.A,{hover:!0,children:[(0,xe.jsx)(I.A,{sx:me,children:t+1}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{whiteSpace:"nowrap",color:"#1e293b",fontWeight:600}),children:e.firstname}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{color:"#64748b",maxWidth:220}),children:(0,xe.jsx)(C.A,{title:e.address||"",children:(0,xe.jsx)("span",{style:{display:"inline-block",maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"middle"},children:e.address})})}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:0===At?e.quantity:(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.quantity||"",onChange:t=>Nt(e.customerid,t.target.value),inputProps:{min:0},sx:{width:64,"& .MuiOutlinedInput-root":{borderRadius:"8px",height:30}}})}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:0===At?"\u20b9".concat(Number(e.collectionamt||0).toFixed(2)):(0,xe.jsx)(S.A,{size:"small",type:"number",value:e.collectionamt?e.collectionamt:"",placeholder:"0",onChange:t=>{const n=Number(t.target.value);Pt(e.customerid,n>0?n:0)},inputProps:{min:0},InputProps:{startAdornment:(0,xe.jsx)(w.A,{position:"start",children:"\u20b9"})},sx:{width:90,"& .MuiOutlinedInput-root":{borderRadius:"8px",height:30}}})}),(0,xe.jsx)(I.A,{sx:me,children:e.distance}),(0,xe.jsxs)(I.A,{align:"right",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:700,color:"#1e293b"}),children:["\u20b9",Number((null===e||void 0===e?void 0:e.totalcharge)||0).toFixed(2)]}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:(0,xe.jsx)(C.A,{title:"Remove",children:(0,xe.jsx)(z.A,{size:"small",onClick:()=>zt(e),sx:{color:"#ef4444",p:.5},children:(0,xe.jsx)(ne.A,{style:{fontSize:13}})})})})]},e.customerid||e.firstname||t))),(0,xe.jsxs)(D.A,{sx:{bgcolor:"#fafbfc"},children:[(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:"Total"}),(0,xe.jsx)(I.A,{colSpan:2,sx:me}),(0,xe.jsx)(I.A,{align:"center",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:ut}),(0,xe.jsxs)(I.A,{align:"center",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:["\u20b9",Number(ft).toFixed(2)]}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800}),children:dt}),(0,xe.jsxs)(I.A,{align:"right",sx:(0,i.A)((0,i.A)({},me),{},{fontWeight:800,color:"#65387a"}),children:["\u20b9",Number(xt).toFixed(2)]}),(0,xe.jsx)(I.A,{sx:me})]})]})]})}),"preview"===Rt&&n&&(0,xe.jsx)(he.nV,{sx:{p:0},children:jt.map(((e,t)=>{var n;return(0,xe.jsx)(he.pg,{accent:"#d97706",header:(0,xe.jsxs)(f.A,{sx:{minWidth:0},children:[(0,xe.jsxs)(A.A,{sx:{fontSize:14,fontWeight:700,color:"#1e293b",lineHeight:1.2},children:[t+1,". ",e.firstname||"\u2014"]}),(0,xe.jsx)(A.A,{sx:{fontSize:12,color:"#64748b",mt:.25},children:e.address||"\u2014"})]}),children:(0,xe.jsxs)(he.FG,{columns:2,children:[(0,xe.jsx)(he.pY,{label:"Contact",value:e.contactno||"\u2014"}),(0,xe.jsx)(he.pY,{label:"Qty",value:null!==(n=e.quantity)&&void 0!==n?n:"\u2014"}),(0,xe.jsx)(he.pY,{label:"Cash",value:null!=e.collectionamt?"\u20b9".concat(Number(e.collectionamt).toFixed(2)):"\u2014"})]})},t)}))}),"preview"===Rt&&!n&&(0,xe.jsx)(W.A,{component:M.A,sx:{borderRadius:"10px",border:"1px solid #eef2f6",boxShadow:"none"},children:(0,xe.jsxs)(N.A,{size:"small",stickyHeader:!0,children:[(0,xe.jsx)(P.A,{sx:{bgcolor:"#f8fafc"},children:(0,xe.jsxs)(D.A,{children:[(0,xe.jsx)(I.A,{sx:ue,children:"#"}),(0,xe.jsx)(I.A,{sx:ue,children:"Name"}),(0,xe.jsx)(I.A,{sx:ue,children:"Contact"}),(0,xe.jsx)(I.A,{sx:ue,children:"Address"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Qty"}),(0,xe.jsx)(I.A,{sx:ue,align:"center",children:"Cash"})]})}),(0,xe.jsx)(R.A,{children:jt.map(((e,t)=>{var n;return(0,xe.jsxs)(D.A,{hover:!0,children:[(0,xe.jsx)(I.A,{sx:me,children:t+1}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{whiteSpace:"nowrap",color:"#1e293b",fontWeight:600}),children:e.firstname||"\u2014"}),(0,xe.jsx)(I.A,{sx:me,children:e.contactno||"\u2014"}),(0,xe.jsx)(I.A,{sx:(0,i.A)((0,i.A)({},me),{},{color:"#64748b",maxWidth:240}),children:(0,xe.jsx)(C.A,{title:e.address||"",children:(0,xe.jsx)("span",{style:{display:"inline-block",maxWidth:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"middle"},children:e.address||"\u2014"})})}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:null!==(n=e.quantity)&&void 0!==n?n:"\u2014"}),(0,xe.jsx)(I.A,{align:"center",sx:me,children:null!=e.collectionamt?"\u20b9".concat(Number(e.collectionamt).toFixed(2)):"\u2014"})]},t)}))})]})}),"empty"===Rt&&(()=>{const e=Ye&&ze&&Me,t=t=>{var n;e?(vt(t),qe([]),bt([]),St(""),0===t?null===(n=document.getElementById("upload-file"))||void 0===n||n.click():1===t&&(Ue(!0),Xe(""))):Yt("Please select Location, Client, and Business Location first.","warning",3e3)},n=n=>{let{value:i,icon:r,title:s,sub:o,accent:l}=n;return(0,xe.jsxs)(f.A,{role:"button",tabIndex:0,onClick:()=>t(i),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t(i))},sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",textAlign:"left",gap:1.25,px:1.5,py:1.25,borderRadius:"10px",border:"1.5px solid #eef2f6",bgcolor:"#fff",opacity:e?1:.6,cursor:e?"pointer":"not-allowed",transition:"all 0.18s ease","&:hover":e?{borderColor:l,boxShadow:"0 4px 12px -4px ".concat(l,"40"),transform:"translateY(-1px)"}:void 0},children:[(0,xe.jsx)(f.A,{sx:{width:32,height:32,borderRadius:"8px",background:"".concat(l,"15"),color:l,display:"flex",alignItems:"center",justifyContent:"center",fontSize:15,flexShrink:0},children:(0,xe.jsx)(r,{})}),(0,xe.jsxs)(f.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(A.A,{sx:{fontWeight:700,fontSize:13,color:"#1e293b",lineHeight:1.15},children:s}),(0,xe.jsx)(A.A,{sx:{fontSize:11,color:"#94a3b8",lineHeight:1.25},noWrap:!0,children:o})]})]})};return(0,xe.jsxs)(g.A,{alignItems:"center",justifyContent:"center",spacing:1.5,sx:{height:"100%",minHeight:240,bgcolor:"rgba(24,144,255,0.03)",border:"1px dashed rgba(24,144,255,0.25)",borderRadius:"12px",p:3,textAlign:"center"},children:[(0,xe.jsx)(f.A,{sx:{width:56,height:56,borderRadius:"14px",bgcolor:"rgba(24,144,255,0.08)",color:"#1890ff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:28},children:(0,xe.jsx)(ie.A,{})}),(0,xe.jsx)(A.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:14},children:"Choose a Drop Source to begin"}),(0,xe.jsx)(A.A,{sx:{color:"#64748b",fontSize:12,maxWidth:360,mb:1},children:"Select a source from below or the left panel to import or pick your delivery customers."}),(0,xe.jsxs)(g.A,{direction:{xs:"column",sm:"row"},gap:1.5,sx:{width:"100%",maxWidth:480,mt:1},children:[n({value:0,icon:ae.CtR,title:"Excel / CSV",sub:"Bulk upload a sheet",accent:"#1890ff"}),n({value:1,icon:oe.YXz,title:"Selection",sub:"Pick saved customers",accent:"#65387a"})]})]})})()]})]})})]})]}),(0,xe.jsx)("input",{accept:".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",id:"upload-file",type:"file",hidden:!0,onChange:e=>{const t=e.target.files[0];if(!t)return;const n=t.name.replace(/\.[^/.]+$/,"");St((e=>e?"".concat(e,", ").concat(n):n)),(e=>{try{var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!n)return void kt("No file selected.","warning");const i=n.name.toLowerCase(),r=i.endsWith(".csv"),s=i.endsWith(".xls")||i.endsWith(".xlsx");if(!r&&!s)return void kt("Invalid file type. Please upload a CSV or Excel file.","warning");const o=(e,t)=>{const n={};for(const s in Mt)n[Wt(s)]=Mt[s];const i=e.map((e=>{const t={};for(const r in e){const s=Wt(r),o=n[s]||s;let l=e[r];"firstname"===o&&(l="string"===typeof(i=l)?i.replace(/^[\d.\s]+/,"").trim():i),t[o]=l}var i;return t})),r=Object.keys(Mt).filter((e=>e.trim().endsWith("*"))).filter((e=>!t.includes(Wt(e))));if(r.length>0)return kt("Missing required columns: ".concat(r.join(", ")),"warning",3e3),void bt([]);bt(i),kt("File uploaded successfully","success",2e3),kt("Press Continue to add as drop customers","info",2500)};if(r&&l().parse(n,{header:!0,dynamicTyping:!0,skipEmptyLines:!0,complete:e=>{var t;if(null===(t=e.data)||void 0===t||!t.length)return kt("CSV file is empty or has no valid rows.","warning"),void bt([]);const n=e.meta.fields.map(Wt);o(e.data,n)},error:e=>kt("CSV parsing failed: ".concat(e.message),"warning")}),s){const e=new FileReader;e.onload=e=>{try{const t=e.target.result,n=a.LF(t,{type:"binary"}),i=n.SheetNames[0],r=n.Sheets[i],s=a.Wp.sheet_to_json(r,{defval:""});if(null===s||void 0===s||!s.length)return kt("Excel file is empty or invalid.","warning"),void bt([]);const l=Object.keys(s[0]).map(Wt);o(s,l)}catch(t){kt("Error reading Excel: ".concat(t.message),"warning")}},e.readAsBinaryString(n)}}catch(n){kt("Unexpected error: ".concat(n.message),"warning")}})(e)}}),(0,xe.jsxs)(H.A,{open:Ze,onClose:()=>Ue(!1),fullWidth:!0,fullScreen:n,sx:{"& .MuiDialog-paper":{borderRadius:{xs:0,sm:"16px"},overflow:"hidden"}},children:[(0,xe.jsx)(T.A,{sx:{bgcolor:t.palette.primary.main,color:"white",py:2.5},children:(0,xe.jsxs)(g.A,{spacing:1.5,children:[(0,xe.jsx)(A.A,{variant:"h4",sx:{fontWeight:600,color:"white"},children:"Select Drop Customers (".concat(Ve.length||0,")")}),(0,xe.jsx)(L.A,{sx:{width:"100%"},children:(0,xe.jsx)(F.A,{autoFocus:!0,fullWidth:!0,id:"input-search-header",placeholder:"Search by name, contact, or address\u2026",value:Qe,onChange:e=>Xe(e.target.value),sx:{bgcolor:"white",borderRadius:"10px","& .MuiOutlinedInput-input":{p:"10px 14px"}},startAdornment:(0,xe.jsx)(w.A,{position:"start",children:(0,xe.jsx)(re.A,{style:{fontSize:"small",color:"#64748b"}})}),endAdornment:(0,xe.jsx)(z.A,{sx:{visibility:Qe?"visible":"hidden",p:.5},onClick:()=>Xe(""),children:(0,xe.jsx)(U.A,{style:{fontSize:"18px"}})}),autoComplete:"off"})})]})}),(0,xe.jsx)(E.A,{}),(0,xe.jsx)(O.A,{sx:{p:2.5,bgcolor:"#fafbfc",minHeight:400,maxHeight:{xs:"none",sm:600}},children:0===(null===Ge||void 0===Ge?void 0:Ge.length)?(0,xe.jsx)(g.A,{alignItems:"center",justifyContent:"center",sx:{minHeight:300},children:(0,xe.jsx)(se.A,{description:"No saved customers found for this client"})}):(0,xe.jsx)(g.A,{spacing:0,children:null===Ge||void 0===Ge?void 0:Ge.map(((e,t)=>{const n=Ve.some((t=>t.customerid===e.customerid));return(0,xe.jsx)(B.A,{children:(0,xe.jsx)(J.A,{sx:{m:0,py:1,px:1.25,borderRadius:"10px","&:hover":{bgcolor:"rgba(24,144,255,0.04)"}},control:(0,xe.jsx)(V.A,{checked:n,onChange:t=>(async(e,t)=>{Se(!0);try{if(e.target.checked){const{roundedDistance:e,totalcharge:n}=await Ct(t);qe((r=>[...r,(0,i.A)((0,i.A)({},t),{},{distance:e,totalcharge:n})]))}else qe((e=>e.filter((e=>e.customerid!==t.customerid))))}catch(n){console.error("Failed to calculate distance:",n)}finally{Se(!1)}})(t,e)}),label:(0,xe.jsxs)(f.A,{sx:{width:"100%"},children:[(0,xe.jsxs)(A.A,{sx:{fontWeight:600,color:"#1e293b",fontSize:13.5},children:[e.firstname," (",e.contactno,")"]}),(0,xe.jsx)(A.A,{sx:{color:"#64748b",fontSize:12,mt:.25},children:e.address})]})})},e.customerid||t)}))})}),(0,xe.jsx)(E.A,{}),(0,xe.jsx)(q.A,{sx:{p:2,bgcolor:"#fafbfc"},children:(0,xe.jsx)(k.A,{variant:"outlined",color:0===Ve.length?"error":"primary",onClick:()=>Ue(!1),sx:{borderRadius:"10px",textTransform:"none",fontWeight:600,px:3},children:0===Ve.length?"Close":"Continue"})})]})]})}},42041:()=>{},62217:e=>{"use strict";e.exports="data:image/png;base64,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"},83686:()=>{},94826:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(59254),r=n(46639),s=n(62217),o=n(44414);const l=(0,i.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),a=(0,i.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,o.jsxs)(l,{children:[(0,o.jsx)(r.A,{color:"primary",size:80,thickness:6}),(0,o.jsx)(a,{children:(0,o.jsx)("img",{src:s,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file diff --git a/build/static/js/5770.baf20b8d.chunk.js b/build/static/js/5770.482ef079.chunk.js similarity index 94% rename from build/static/js/5770.baf20b8d.chunk.js rename to build/static/js/5770.482ef079.chunk.js index a0c4b6b..3520412 100644 --- a/build/static/js/5770.baf20b8d.chunk.js +++ b/build/static/js/5770.482ef079.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[5770],{35770:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var i=n(42074),s=n(16243),c=n(60899),a=n(16491),r=n(93230),o=n(82053),l=n(82223);n(9950);const h=n.p+"static/media/under-construction.9d3496bfce5cfb27a32f2fbc04607674.svg";var d=n(44414);const m=function(){return(0,d.jsxs)(c.Ay,{container:!0,spacing:4,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh",py:2},children:[(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsx)(a.A,{sx:{width:{xs:300,sm:480}},children:(0,d.jsx)("img",{src:h,alt:"mantis",style:{width:"100%",height:"auto"}})})}),(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsxs)(r.A,{spacing:2,justifyContent:"center",alignItems:"center",children:[(0,d.jsx)(o.A,{align:"center",variant:"h1",children:"Under Construction"}),(0,d.jsx)(o.A,{color:"textSecondary",align:"center",sx:{width:"85%"},children:"Hey! Please check out this site later. We are doing some maintenance on it right now."}),(0,d.jsx)(l.A,{component:i.N_,to:s.qm,variant:"contained",children:"Back To Home"})]})})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[5770],{35770:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var i=n(42074),s=n(16243),c=n(60899),a=n(16491),r=n(93230),o=n(82053),l=n(10226);n(9950);const h=n.p+"static/media/under-construction.9d3496bfce5cfb27a32f2fbc04607674.svg";var d=n(44414);const m=function(){return(0,d.jsxs)(c.Ay,{container:!0,spacing:4,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"100vh",py:2},children:[(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsx)(a.A,{sx:{width:{xs:300,sm:480}},children:(0,d.jsx)("img",{src:h,alt:"mantis",style:{width:"100%",height:"auto"}})})}),(0,d.jsx)(c.Ay,{item:!0,xs:12,children:(0,d.jsxs)(r.A,{spacing:2,justifyContent:"center",alignItems:"center",children:[(0,d.jsx)(o.A,{align:"center",variant:"h1",children:"Under Construction"}),(0,d.jsx)(o.A,{color:"textSecondary",align:"center",sx:{width:"85%"},children:"Hey! Please check out this site later. We are doing some maintenance on it right now."}),(0,d.jsx)(l.A,{component:i.N_,to:s.qm,variant:"contained",children:"Back To Home"})]})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/6248.d7ba49cb.chunk.js b/build/static/js/6248.8f2e2aaa.chunk.js similarity index 99% rename from build/static/js/6248.d7ba49cb.chunk.js rename to build/static/js/6248.8f2e2aaa.chunk.js index 0079f3d..dec95d3 100644 --- a/build/static/js/6248.d7ba49cb.chunk.js +++ b/build/static/js/6248.8f2e2aaa.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6248],{23787:(e,s,i)=>{i.d(s,{FG:()=>A,nV:()=>x,pY:()=>j,pg:()=>h});var n=i(89379),r=i(80045),t=i(93230),a=i(2235),l=i(16491),o=i(82053),c=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:s,scroll:i=!1,onScroll:a,sx:l}=e,o=(0,r.A)(e,d);return(0,c.jsx)(t.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:a,sx:(0,n.A)((0,n.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},o),{},{children:s}))},h=e=>{let{accent:s="#662582",header:i,footer:r,selected:t=!1,onClick:o,children:d,sx:x}=e;return(0,c.jsxs)(a.A,{elevation:0,onClick:o,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:t?s:"#e2e8f0",background:t?"".concat(s,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:s}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[i,d,r]})]})},A=e=>{let{children:s,columns:i=2,sx:r}=e;return(0,c.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},r),children:s})},j=e=>{let{label:s,value:i,children:n,full:r=!1,align:t="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:r?"1 / -1":"auto",minWidth:0,textAlign:t},children:[(0,c.jsx)(o.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:s}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,c.jsx)(o.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},66248:(e,s,i)=>{i.r(s),i.d(s,{default:()=>oe});var n=i(89379),r=i(9950),t=i(46702),a=i(28429),l=i(26910),o=i(63189),c=i(19474),d=i(58833),x=i(53067),h=i(62824),A=i(52329),j=i(36256),m=i(32653),g=i(96583),p=i(28170),u=i(93230),f=i(41413),b=i(60899),v=i(25277),y=i(65429),w=i(92743),Y=i(36080),C=i(82053),S=i(29925),k=i(82223),z=i(40033),D=i(48159),M=i(84142),I=i(46639),F=i(93038),T=i(83274),H=i(25333),E=i(1320),O=i(15769),P=i(69780),W=i(9213),_=i(21671),R=i(34075),N=i(79739),U=i(25713),L=i(82917),q=i(25979),B=i(33738),$=i(74745),G=i(37476),K=i(72179),V=i(50027),X=i(52351),Z=i(4159),J=i.n(Z),Q=i(14857),ee=i(47223),se=i(23787),ie=i(46585),ne=i(94118),re=i(97973),te=i(8881),ae=i(44414),le=i(36220);J().extend(le);const oe=()=>{const[e,s]=(0,r.useState)([]),[i,Z]=(0,r.useState)(!0),le=(0,a.zy)(),[oe,ce]=(0,r.useState)(""),[de,xe]=(0,r.useState)(""),[he,Ae]=(0,r.useState)(""),[je,me]=(0,r.useState)(""),[ge,pe]=(0,r.useState)(!1),[ue,fe]=(0,r.useState)(""),[be,ve]=(0,r.useState)(""),[ye,we]=(0,r.useState)(!1),[Ye,Ce]=(0,r.useState)(""),[Se]=(0,r.useState)(""),[ke,ze]=(0,r.useState)(""),[De,Me]=(0,r.useState)(""),[Ie,Fe]=(0,r.useState)(""),[Te,He]=(0,r.useState)(""),[Ee,Oe]=(0,r.useState)([]),[Pe,We]=(0,r.useState)(""),[_e,Re]=(0,r.useState)(""),[Ne,Ue]=(0,r.useState)([]),[Le,qe]=(0,r.useState)([]),[Be,$e]=(0,r.useState)(""),[Ge,Ke]=(0,r.useState)(""),[Ve]=(0,r.useState)(""),[Xe]=(0,r.useState)(""),[Ze,Je]=(0,r.useState)(""),[Qe,es]=(0,r.useState)([]),[ss,is]=(0,r.useState)({shifts:0,assigned:0,remaining:0,shiftid:0,price:0}),[ns,rs]=(0,r.useState)(0),{state:ts}=(0,a.zy)(),[as,ls]=(0,r.useState)(""),os=(0,a.Zp)(),[cs,ds]=(0,r.useState)(["",""]),[xs,hs]=(0,r.useState)(""),[As,js]=(0,r.useState)(!1);(0,r.useEffect)((()=>{console.log("categoryarr"),console.log(e,de,Te,Ve,Xe)}),[Qe]),(0,r.useEffect)((()=>{ts&&($e(ts.orderheaderid),Ke(ts.tenantid)),console.log(ts),console.log(Date.now())}),[]),(0,r.useEffect)((()=>{ts&&($e(ts.orderheaderid),Ke(ts.tenantid)),console.log(ts),console.log(Date.now())}),[ts.orderheaderid,ts.tenantid]);const ms=(0,Q.A)(),gs=(0,ee.A)(ms.breakpoints.down("md")),ps=async()=>{Z(!0),await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getordersbystatus?tenantid=").concat(Ge)).then((e=>{console.log(e);let s=e.data.Details.find((e=>e.orderheaderid==Be));console.log("result"),console.log(s),Oe(s.orderaddons),He(s.venuetype),We(s.remarks),hs(s.startdate),fe(s.tenantname),xe(""),ve(s.tenantaddress),me(s.eventname),Ae(J()(s.orderdate).format("MM/DD/YYYY")||""),ce(s.orderid),Ce(s.orderstatus),ze(s.taxamount),Me(s.orderamount),Fe(s.ordervalue),Re(J()(s.cancelled).format("MM/DD/YYYY")||""),Je(s.pending),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))},us=async()=>{Z(!0),await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getorderdetails?orderheaderid=").concat(Be)).then((e=>{console.log("res"),console.log(e),s(e.data.Details||[]),console.log("categoryarr"),es(e.data.Details),console.log(e.data.Details),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))},fs=async e=>{Z(!0);try{await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getassignedinfo?orderdetailid=").concat(e)).then((e=>{console.log(e),e.data.status&&Ue(e.data.Details),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))}catch(s){console.log(s),Z(!1)}},bs=async e=>{let s={orderheaderid:Be,orderprocessid:e.orderprocessid,orderdetailid:e.orderdetailid,orderstatus:"pending",pending:J()().format("YYYY-MM-DD HH:mm:ss"),status:1};console.log(s),await l.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/orders/updateprocessstatus"),s).then((s=>{console.log(s),"Successful"===s.data.message&&((0,te.M8)("Role unassigned successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ss.assigned>ss.shifts&&vs(e),ps(),us(),pe(!1),Cs(),ys(),setTimeout((()=>{Cs()}),2e3))})).catch((e=>{console.log(e)}))},vs=e=>{let s;console.log(e);let i=[e.userfcmtoken],n=[{notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Un-Asigned",message:"".concat(e.firstname," has been Un-assigned to the order ").concat(oe),configid:2,tenantid:Ge,orderheaderid:Be,orderprocessid:e.orderprocessid,shiftid:e.shiftid,userid:e.userid,orderid:oe,success:0,orderstatus:"assigned",processing:J()().format("YYYY-MM-DD HH:mm:ss"),notifytype:2,notifyreason:"Staff Un-Assigned"}];s={Title:"Staff Un-Asigned",message:"A Staff has been Un-assigned to the order ".concat(oe),tenantid:Ge,orderheaderid:Be,orderid:oe,configid:2};let r={notifications:n,fcmmodel:{priority:"high",registration_ids:i,data:s,notification:{body:"An order has been Un-assigned ".concat(oe),title:"Legendary",sound:"ring",content_available:!0,click_action:"FLUTTER_NOTIFICATION_CLICK"}}};console.log("grpnotifyobj unassign"),console.log(r),Ys(r)};(0,r.useEffect)((()=>{console.log(Be),Be&&Ge?(ps(),us(),Cs(),console.log(le.state||"")):Z(!1),console.log(Be,Ge)}),[Be,Ge,as]);const ys=()=>{we(!1),qe([]),ds(["",""])};(0,r.useEffect)((()=>{console.log(ss)}));const ws=async e=>{let s=e.userfcmtoken,i={notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(oe),configid:2,tenantid:Ge,orderheaderid:Be,orderprocessid:e.orderprocessid,shiftid:e.shiftid,userid:e.userid,orderid:oe,sound:"ring",click_action:"FLUTTER_NOTIFICATION_CLICK"};console.log(i,s),await l.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/utils/notification/send"),{priority:"high",registration_ids:[s],data:i,notification:{body:"A Staff has been assigned to ".concat(oe),title:"Legendary",sound:"ring",content_available:!0}},{headers:{Authorization:"Bearer ".concat("")}}).then((e=>{console.log(e),(0,te.M8)("Notification sent successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})})).catch((e=>{console.log(e)}))},Ys=async e=>{console.log(e),await l.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/utils/notification/sendall"),e,{headers:{Authorization:"Bearer ".concat("")}}).then((e=>{console.log(e),e.data.status&&((0,te.M8)("Notification sent successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ps())})).catch((e=>{console.log(e)}))},Cs=async()=>{await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getorderstatuscount?orderheaderid=").concat(Be)).then((e=>{e.data.status?(console.log(e),ls(e.data.pendingcount),ps()):(ls(e.data.pendingcount),ps())})).catch((e=>{console.log(e)}))};function Ss(e){let{open:s,handleClose:i}=e;const[n,t]=(0,r.useState)("");return(0,ae.jsx)(g.A,{open:s,onClose:()=>i(!1),maxWidth:"xs",fullScreen:gs,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:(0,ae.jsx)(p.A,{sx:{mt:2,my:1},children:(0,ae.jsxs)(u.A,{alignItems:"center",spacing:3.5,children:[(0,ae.jsx)(f.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,ae.jsx)(j.A,{})}),(0,ae.jsx)(b.Ay,{children:(0,ae.jsx)(v.A,{label:oe.slice(4),variant:"combined",color:"warning",size:"small"})}),(0,ae.jsxs)(u.A,{spacing:2,children:[As&&(0,ae.jsxs)(y.A,{color:"warning",variant:"border",icon:(0,ae.jsx)(ie.A,{}),children:[(0,ae.jsx)(w.A,{children:"Order is within 24Hrs time frame. The order will be invoiced with standard pricing as agreed."}),(0,ae.jsx)(Y.A,{href:"https://thelegendarystaff.com/",target:"_blank",children:"Terms & Condition link"})]}),(0,ae.jsx)(C.A,{variant:"h4",align:"center",children:"Please type in the order number to confirm."}),(0,ae.jsx)(S.A,{type:"text",onChange:e=>{console.log(e.target.value),t(e.target.value)},error:n!==oe.slice(4),value:n})]}),(0,ae.jsxs)(u.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,ae.jsx)(k.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{n===oe.slice(4)&&((async()=>{await l.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/orders/cancel"),{orderheaderid:parseInt(Be),orderstatus:"cancelled",cancelled:J()().format("YYYY-MM-DD HH:mm:ss"),unserviceable:As?0:1}).then((e=>{console.log(e),e.data.status&&Be&&Ge&&(ps(),us())})).catch((e=>{console.log(e)}))})(),i(!0))},autoFocus:!0,children:"Yes, Cancel"}),(0,ae.jsx)(k.A,{fullWidth:!0,onClick:()=>i(!1),color:"secondary",variant:"outlined",children:"No"})]})]})})})}return(0,ae.jsxs)(ae.Fragment,{children:[i&&(0,ae.jsx)(X.A,{}),(0,ae.jsx)(Ss,{open:ge,handleClose:()=>{pe(!1)}}),(0,ae.jsxs)(g.A,{maxWidth:!1,fullWidth:!0,open:ye,onClose:ys,scroll:"paper",fullScreen:gs,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},TransitionComponent:G.s,children:[(0,ae.jsxs)(z.A,{children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsxs)(u.A,{direction:{sm:"row",xs:"column"},spacing:2,alignItems:"center",children:[(0,ae.jsx)(C.A,{variant:"h3",children:"Assign Roles"}),(0,ae.jsx)(v.A,{label:ue,variant:"light",color:"primary"})]}),(0,ae.jsx)(v.A,{label:oe,variant:"combined",color:"warning",size:"large"})]}),(0,ae.jsxs)(b.Ay,{container:!0,sx:{p:1},spacing:2,children:[(0,ae.jsx)(b.Ay,{item:!0,sm:6,xs:12,children:(0,ae.jsx)(D.A,{value:ns,onChange:()=>rs((e=>0===e?1:0)),variant:"scrollable",scrollButtons:"auto",children:(0,ae.jsx)(M.A,{label:Se})})}),(0,ae.jsx)(b.Ay,{item:!0,sm:6,xs:12,children:(0,ae.jsxs)(u.A,{direction:"row",justifyContent:{xs:"flex-start",sm:"flex-end"},sx:{height:"100%"},spacing:2,children:[(0,ae.jsx)(v.A,{sx:{width:"130px"},label:"Required:".concat(ss.shifts),variant:"combined",color:"primary",size:"normal"}),(0,ae.jsx)(v.A,{sx:{width:"130px"},label:"Assigned: ".concat(ss.assigned),variant:"combined",color:"success",size:"normal"}),(0,ae.jsx)(v.A,{sx:{width:"130px"},label:"Remaining: ".concat(ss.remaining),variant:"combined",color:"error",size:"normal"})]})})]})]}),(0,ae.jsx)(p.A,{dividers:!0,children:0===Ne.length?(0,ae.jsx)(ae.Fragment,{children:i?(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(u.A,{alignItems:"center",children:(0,ae.jsx)(I.A,{})})}):(0,ae.jsx)(C.A,{children:"No Staffs Available"})}):gs?(0,ae.jsx)(se.nV,{children:Ne.map(((e,s)=>{const i=!!Le.find((s=>s.userid==e.userid));return(0,ae.jsxs)(se.pg,{accent:"#662582",selected:i,children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",spacing:1,children:[(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ae.jsx)(f.A,{alt:"",src:"",sx:{width:32,height:32}}),(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"subtitle2",children:e.firstname}),(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.contactno})]})]}),e.orderdetailid!==orderdetailid?(0,ae.jsx)(F.A,{disabled:0!==e.orderdetailid,checked:i,onClick:s=>{if(console.log(ss),ss.remaining>=0){if(s.target.checked&&0!=ss.remaining){let s=Le;s.push({userid:e.userid,orderdetailid:orderdetailid,productid:productid,shiftid:ss.shiftid,userrate:ss.price,productrate:e.rolecost,firstname:e.firstname}),qe([...s]);let i=ss;i.assigned++,i.remaining=i.shifts-i.assigned,is((0,n.A)({},i))}else if(ss.assigned!=ss.shifts||0===ss.remaining&&!s.target.checked){let s=Le,i=s.findIndex((s=>s.userid===e.userid));s.splice(i,1),qe([...s]);let r=ss;r.assigned--,r.remaining=r.shifts-r.assigned,is((0,n.A)({},r))}console.log(Le)}}}):(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",children:[(0,ae.jsx)(v.A,{label:"Assigned",color:"success",size:"small",sx:{mr:1}}),(0,ae.jsx)(T.A,{title:"Unassign",children:(0,ae.jsx)(H.A,{color:"error",onClick:()=>{console.log(e),bs(e)},children:(0,ae.jsx)(ne.A,{})})}),(0,ae.jsx)(T.A,{title:"Send Notification",children:(0,ae.jsx)(H.A,{color:"info",onClick:()=>{console.log(e),ws(e)},children:(0,ae.jsx)(m.A,{})})})]})]}),(0,ae.jsxs)(se.FG,{children:[(0,ae.jsx)(se.pY,{label:"Category",children:(0,ae.jsxs)(u.A,{direction:"column",alignItems:"flex-start",spacing:.25,children:[(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.cateoryname}),(0,ae.jsx)(v.A,{label:e.subcategoryname,color:"info",size:"small",variant:"light"})]})}),(0,ae.jsx)(se.pY,{label:"Price",value:e.rolecost}),(0,ae.jsx)(se.pY,{label:"Experience",value:"".concat(e.experience," Years")}),(0,ae.jsx)(se.pY,{label:"Level",children:(0,ae.jsx)(v.A,{label:e.levelofexperience,size:"small",color:"primary",variant:"light"})}),(0,ae.jsx)(se.pY,{label:"City",value:e.city}),e.orderid&&(0,ae.jsx)(se.pY,{label:"Order",children:(0,ae.jsx)(v.A,{label:e.orderid,color:"warning",size:"small",variant:"light"})})]})]},s)}))}):(0,ae.jsx)(E.A,{children:(0,ae.jsxs)(O.A,{children:[(0,ae.jsx)(P.A,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:"#"}),(0,ae.jsx)(_.A,{children:"Staff"}),(0,ae.jsx)(_.A,{children:"Category"}),(0,ae.jsx)(_.A,{children:"Price"}),(0,ae.jsx)(_.A,{children:"Experience"}),(0,ae.jsx)(_.A,{children:"Level"}),(0,ae.jsx)(_.A,{children:"City"}),(0,ae.jsx)(_.A,{children:"Action"}),(0,ae.jsx)(_.A,{})]})}),(0,ae.jsx)(R.A,{children:Ne.map(((e,s)=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsxs)(W.A,{sx:{backgroundColor:Le.find((s=>s.userid==e.userid))?"#f5f5f5":"",":hover":{backgroundColor:Le.find((s=>s.userid==e.userid))?"#f5f5f5 !important":""}},children:[(0,ae.jsx)(_.A,{component:"th",scope:"row",padding:"none",children:s+1}),(0,ae.jsx)(_.A,{align:"left",sx:{paddingLeft:"0px !important"},children:(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,justifyContent:"flex-start",children:[(0,ae.jsx)(f.A,{alt:"",size:"sm",src:"",sx:{width:"25px",height:"25px"}}),(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"caption",children:e.firstname}),(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.contactno})]})]})}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsxs)(u.A,{direction:"column",alignItems:"flex-start",children:[(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.cateoryname}),(0,ae.jsx)(v.A,{label:e.subcategoryname,color:"info",size:"small",variant:"light"})]})}),(0,ae.jsx)(_.A,{children:e.rolecost}),(0,ae.jsxs)(_.A,{align:"left",children:[e.experience," Years"]}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsx)(v.A,{label:e.levelofexperience,size:"small",color:"primary",variant:"light"})}),(0,ae.jsx)(_.A,{align:"left",children:e.city}),(0,ae.jsx)(_.A,{align:"left",children:e.orderdetailid!==orderdetailid?(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(F.A,{disabled:0!==e.orderdetailid,checked:!!Le.find((s=>s.userid==e.userid)),onClick:s=>{if(console.log(ss),ss.remaining>=0){if(s.target.checked&&0!=ss.remaining){let s=Le;s.push({userid:e.userid,orderdetailid:orderdetailid,productid:productid,shiftid:ss.shiftid,userrate:ss.price,productrate:e.rolecost,firstname:e.firstname}),qe([...s]);let i=ss;i.assigned++,i.remaining=i.shifts-i.assigned,is((0,n.A)({},i))}else if(ss.assigned!=ss.shifts||0===ss.remaining&&!s.target.checked){let s=Le,i=s.findIndex((s=>s.userid===e.userid));s.splice(i,1),qe([...s]);let r=ss;r.assigned--,r.remaining=r.shifts-r.assigned,is((0,n.A)({},r))}console.log(Le)}}})}):(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(v.A,{label:"Assigned",color:"success",size:"small",sx:{mr:1}}),(0,ae.jsx)(T.A,{title:"Unassign",children:(0,ae.jsx)(H.A,{color:"error",onClick:()=>{console.log(e),bs(e)},children:(0,ae.jsx)(ne.A,{})})}),(0,ae.jsx)(T.A,{title:"Send Notification",children:(0,ae.jsx)(H.A,{color:"info",onClick:()=>{console.log(e),ws(e)},children:(0,ae.jsx)(m.A,{})})})]})}),(0,ae.jsx)(_.A,{children:e.orderid&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(v.A,{label:e.orderid,color:"warning",size:"small",variant:"light"})})})]})},s)))})]})})}),(0,ae.jsx)(N.A,{children:(0,ae.jsxs)(u.A,{sx:{mt:2,width:{xs:"100%",sm:"auto"}},direction:{xs:"column",sm:"row"},justifyContent:"flex-end",spacing:{xs:1.5,sm:5},children:[Ne.length>0&&(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(k.A,{sx:{width:{xs:"100%",sm:"130px"}},variant:"contained",onClick:async()=>{let e=[],s=[];Le.map((i=>{e.push({orderprocessid:0,processdate:J()().format("YYYY-MM-DD HH:mm:ss"),tenantid:Ge,orderheaderid:Be,orderdetailid:i.orderdetailid,productid:i.productid,userid:i.userid,orderstatus:"pending",pending:"".concat(J()(Ze).format("YYYY-MM-DD")," ").concat(J()(Ze).format("HH:mm:ss")),starttime:"".concat(J()(Ve).format("YYYY-MM-DD")," ").concat(J()(Ve).format("HH:mm:ss")),endtime:"".concat(J()(Xe).format("YYYY-MM-DD")," ").concat(J()(Xe).format("HH:mm:ss")),appuserid:parseInt(localStorage.getItem("appuserid")),shiftid:i.shiftid,userrate:i.userrate,productrate:i.productrate}),Le.map((e=>{s.push({notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(oe),configid:2,tenantid:Ge,orderheaderid:Be,orderprocessid:0,shiftid:e.shiftid,userid:e.userid,orderid:oe,sound:"ring",click_action:"FLUTTER_NOTIFICATION_CLICK",firstname:e.firstname})}))})),console.log("arr"),console.log(e),await l.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/orders/createorderprocess"),e).then((e=>{console.log(e),"Successfully created"===e.data.message&&((0,te.M8)("Roles assigned successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),we(!1),us(),Cs())})).catch((e=>{console.log(e)})),console.log(e)},children:"OK"}),(0,ae.jsx)(k.A,{sx:{width:{xs:"100%",sm:"130px"}},color:"warning",variant:"contained",onClick:()=>{qe([]);let e=ss;e.remaining=e.shifts,e.assigned=0,is(e)},children:"clear"})]}),(0,ae.jsx)(k.A,{sx:{width:{xs:"100%",sm:"130px"}},color:"error",variant:"contained",onClick:()=>{ys()},children:"Close"})]})})]}),(0,ae.jsxs)(b.Ay,{container:!0,rowSpacing:2,columnSpacing:2.75,children:[(0,ae.jsx)(U.A,{sx:{position:"sticky",top:"60px",bgcolor:ms.palette.background.default,zIndex:1,width:"100%"},children:(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsxs)(u.A,{direction:{md:"row",xs:"column"},justifyContent:"space-between",alignItems:"flex-end",sx:{width:"100%",p:1},children:[(0,ae.jsxs)(u.A,{direction:"row",spacing:2,alignItems:"center",justifyContent:"flex-start",sx:{width:{xs:"100%",md:"0"}},children:[(0,ae.jsx)(H.A,{onClick:()=>history.back(),children:(0,ae.jsx)(o.A,{})}),(0,ae.jsxs)(u.A,{direction:"column",alignItems:"flex-start",children:[(0,ae.jsx)(C.A,{variant:"h3",children:"Details"}),(0,ae.jsxs)(u.A,{direction:"row",spacing:1,children:[(0,ae.jsx)(v.A,{label:""===oe?(0,ae.jsx)(L.A,{sx:{width:"80px",bgcolor:"#fff9c4"},animation:"wave"}):oe,variant:"combined",color:"warning",size:"small"}),(0,ae.jsx)(v.A,{label:""===he?(0,ae.jsx)(L.A,{sx:{width:"80px",bgcolor:"#b3e5fc"},animation:"wave"}):he,variant:"combined",color:"primary",size:"small"}),"pending"===Ye&&(0,ae.jsx)(v.A,{label:"Pending",color:"error",size:"small"}),"cancelled"===Ye&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===Ye&&(0,ae.jsx)(v.A,{label:"Completed",color:"primary",size:"small"}),"processing"===Ye&&(0,ae.jsx)(v.A,{label:"Processing",color:"primary",size:"small"}),"assigned"===Ye&&(0,ae.jsx)(v.A,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===Ye&&(0,ae.jsx)(v.A,{label:"Confirmed",color:"success",size:"small"}),"active"===Ye&&(0,ae.jsx)(v.A,{label:"Active",color:"info",size:"small"}),"closed"===Ye&&(0,ae.jsx)(v.A,{label:"Closed",color:"info",size:"small"}),"modified"===Ye&&(0,ae.jsx)(v.A,{label:"Modified",color:"secondary",size:"small",variant:"contained"})]})]})]}),(0,ae.jsxs)(u.A,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:{md:0,xs:2},width:{xs:"100%",md:"auto"}},children:[("pending"===Ye||"assigned"===Ye||"confirmed"===Ye||"modified"===Ye)&&(0,ae.jsx)(T.A,{title:"Edit",children:(0,ae.jsx)(k.A,{variant:"outlined",color:"info",sx:{borderRadius:"40px",width:{xs:"100%",sm:"auto"}},startIcon:(0,ae.jsx)(t.A,{color:"info"}),onClick:e=>{e.stopPropagation(),J()(J()().format("MM-DD-YYYY")).isBefore(J()(J()(xs).format("MM-DD-YYYY")))?os("/editorder",{state:{orderheaderid:Be,tenantid:Ge}}):(0,te.M8)("Order cannot be edited.\n Order date is not valid at this time",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:4e3,style:{whiteSpace:"pre-line"}})},children:"Edit Order"})}),"cancelled"!==Ye&&""!==Ye&&"completed"!==Ye&&"closed"!==Ye&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(k.A,{variant:"outlined",color:"error",onClick:()=>{console.log(J()(xs).diff(J()(),"m")/60),J()(xs).diff(J()(),"m")/60>24?(js(!1),pe(!0)):(js(!0),pe(!0))},sx:{borderRadius:"40px",mt:{xs:2,sm:0},width:{xs:"100%",sm:"auto"}},startIcon:(0,ae.jsx)(K.A,{}),children:"Cancel Order"})}),"cancelled"===Ye&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(v.A,{label:"Order Cancelled on ".concat(_e),variant:"combined",color:"error"})})]})]})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sx:{mt:-2},children:(0,ae.jsx)(V.A,{content:!1,width:"100%",children:(0,ae.jsxs)(b.Ay,{container:!0,spacing:2.5,sx:{p:2.5},children:[(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{sx:{height:"100%"},children:(0,ae.jsxs)(u.A,{spacing:1,children:[(0,ae.jsx)(C.A,{variant:"h5",children:"Client"}),(0,ae.jsx)(C.A,{color:"secondary",children:""===ue?(0,ae.jsx)(L.A,{sx:{width:"40%"},animation:"wave"}):ue}),(0,ae.jsx)(q.A,{sx:{width:"100%"},children:(0,ae.jsx)(C.A,{color:"secondary",children:""===be?(0,ae.jsx)(L.A,{sx:{width:"90%"},animation:"wave"}):be})})]})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{sx:{height:"100%"},children:(0,ae.jsxs)(u.A,{spacing:1,children:[(0,ae.jsx)(C.A,{variant:"h5",children:"Event"}),(0,ae.jsx)(q.A,{sx:{width:"100%"},children:(0,ae.jsx)(C.A,{color:"secondary",children:""===je?(0,ae.jsx)(L.A,{sx:{width:"40%"},animation:"wave"}):je})})]})})}),Qe.map(((e,s)=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsxs)(V.A,{sx:{opacity:0==e.shiftstatus?"":"0.7"},children:[(0,ae.jsxs)(u.A,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{md:"center",xs:"flex-start"},spacing:2,sx:{p:2},children:[(0,ae.jsxs)(u.A,{direction:{xs:"column",md:"row"},spacing:2,alignItems:{md:"center",xs:"flex-start"},children:[(0,ae.jsxs)(C.A,{variant:"h5",children:["Shift ",s+1]}),(0,ae.jsxs)(C.A,{color:"secondary",children:[(0,ae.jsx)(c.A,{})," ","",e.locationaddress]}),1===e.shiftstatus&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary"})]}),(0,ae.jsx)(u.A,{direction:"row",spacing:1,children:e.ordercontacts.map((e=>(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(T.A,{title:e.contactname,children:(0,ae.jsx)(f.A,{sx:{bgcolor:"#2196f3",width:30,height:30},alt:"A",children:e.contactname.charAt(0).toUpperCase()})})})))})]}),gs?(0,ae.jsxs)(se.nV,{children:[0===e.orderdetails.length&&(0,ae.jsxs)(se.pg,{accent:"#662582",children:[(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"})]}),e.orderdetails.map(((e,n)=>(0,ae.jsxs)(se.pg,{accent:"#662582",sx:{opacity:0==e.status?"":"0.7"},children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",spacing:1,children:[(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsxs)(C.A,{sx:{fontSize:10,fontWeight:800,color:"#94a3b8"},children:["#",n+1]}),(0,ae.jsx)(C.A,{variant:"subtitle1",children:e.productname})]}),(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",children:[(0,ae.jsx)(T.A,{title:"Expand",children:(0,ae.jsx)(H.A,{"aria-label":"expand row",style:{color:ms.palette.primary.main},onClick:()=>{Ue([]),ds(cs[0]===s&&cs[1]===n?["",""]:[s,n]),fs(e.orderdetailid)},children:cs[0]===s&&cs[1]===n?(0,ae.jsx)(h.A,{}):(0,ae.jsx)(A.A,{})})}),"cancelled"===Ye&&(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},disabled:!0,children:(0,ae.jsx)(d.A,{})}),1===e.status&&(0,ae.jsx)(T.A,{title:"Cancelled",children:(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},children:(0,ae.jsx)(K.A,{color:"error"})})}),e.supplyqty>e.orderqty&&(0,ae.jsx)(T.A,{title:"Assigned count is greater than ordered count",children:(0,ae.jsx)(H.A,{color:"warning",children:(0,ae.jsx)(re.A,{})})})]})]}),(0,ae.jsxs)(se.FG,{children:[(0,ae.jsx)(se.pY,{label:"Start Date",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.starttime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"End Date",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.endtime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"Unpaid Break",value:e.unpaidbreak||0}),(0,ae.jsx)(se.pY,{label:"Count",children:(0,ae.jsx)(v.A,{label:e.orderqty,color:"success",variant:"light",size:"small"})}),(0,ae.jsx)(se.pY,{label:"Assigned",children:(0,ae.jsx)(v.A,{label:e.supplyqty,color:0===e.supplyqty?"error":"warning",variant:"light",size:"small"})}),(0,ae.jsx)(se.pY,{label:"Price",value:"$".concat(e.price)}),(0,ae.jsx)(se.pY,{label:"Amount",value:"$".concat(e.landingamount)})]}),(0,ae.jsxs)(B.A,{in:cs[0]===s&&cs[1]===n,timeout:"auto",unmountOnExit:!0,children:[(0,ae.jsx)($.A,{sx:{my:1.5}}),0===Ne.length?i?(0,ae.jsx)(u.A,{alignItems:"center",children:(0,ae.jsx)(I.A,{})}):(0,ae.jsx)(u.A,{sx:{p:1},children:(0,ae.jsx)(C.A,{children:"No Staffs has been Assigned"})}):(0,ae.jsx)(u.A,{spacing:1,children:Ne.map(((e,s)=>(0,ae.jsxs)(se.pg,{accent:"#0ea5e9",children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"subtitle2",children:e.staffname}),(0,ae.jsx)(b.Ay,{children:(0,ae.jsx)(v.A,{label:e.productname,color:"info",variant:"light",size:"small"})})]}),(0,ae.jsxs)(u.A,{direction:"row",children:["pending"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Pending",color:"error",size:"small"}),"cancelled"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Completed",color:"primary",size:"small"}),"processing"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Processing",color:"primary",size:"small"}),"assigned"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Confirmed",color:"success",size:"small"}),"active"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Active",color:"info",size:"small"}),"closed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Closed",color:"info",size:"small"})]})]}),(0,ae.jsxs)(se.FG,{children:[(0,ae.jsx)(se.pY,{label:"Start Time",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Starttime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"End Time",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Endtime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"Pay Rate",value:e.rolecost}),(0,ae.jsx)(se.pY,{label:"Hours Worked",value:e.hoursworked}),(0,ae.jsx)(se.pY,{label:"Clockin",children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"flex-start",children:[(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,ae.jsx)(se.pY,{label:"Clockout",children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"flex-start",children:[(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})})]})]},s)))})]})]},n+1)))]}):(0,ae.jsx)(E.A,{children:(0,ae.jsxs)(O.A,{children:[(0,ae.jsx)(P.A,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:"#"}),(0,ae.jsx)(_.A,{children:"Role"}),(0,ae.jsx)(_.A,{children:"Start Date"}),(0,ae.jsx)(_.A,{children:"End Date"}),(0,ae.jsx)(_.A,{children:"Unpaid break"}),(0,ae.jsx)(_.A,{children:"Count"}),(0,ae.jsx)(_.A,{children:"Assigned"}),(0,ae.jsx)(_.A,{children:"Attire"}),(0,ae.jsx)(_.A,{children:"Price"}),(0,ae.jsx)(_.A,{children:"Amount"}),(0,ae.jsx)(_.A,{children:"Action"})]})}),(0,ae.jsxs)(R.A,{children:[0===e.orderdetails.length&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsxs)(_.A,{children:[(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"})]}),(0,ae.jsxs)(_.A,{children:[(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"})]}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})})]})}),e.orderdetails.map(((e,n)=>(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsxs)(W.A,{sx:{"&:last-child td, &:last-child th":{border:0},opacity:0==e.status?"":"0.7"},children:[(0,ae.jsx)(_.A,{children:n+1}),(0,ae.jsx)(_.A,{children:e.productname}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body1",children:J()(e.starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.starttime).format("hh:mm A")})]})}),(0,ae.jsxs)(_.A,{children:[" ",(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body1",children:J()(e.endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.endtime).format("hh:mm A")})]})]}),(0,ae.jsx)(_.A,{children:e.unpaidbreak||0}),(0,ae.jsx)(_.A,{align:"center",children:(0,ae.jsx)(v.A,{label:e.orderqty,color:"success",variant:"light",size:"small"})}),(0,ae.jsx)(_.A,{align:"center",children:(0,ae.jsx)(v.A,{label:e.supplyqty,color:0===e.supplyqty?"error":"warning",variant:"light",size:"small"})}),(0,ae.jsx)(_.A,{width:"100px"}),(0,ae.jsxs)(_.A,{children:["$",e.price]}),(0,ae.jsxs)(_.A,{children:["$",e.landingamount]}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"row",children:[(0,ae.jsx)(T.A,{title:"Expand",children:(0,ae.jsx)(H.A,{"aria-label":"expand row",style:{color:ms.palette.primary.main},onClick:()=>{Ue([]),ds(cs[0]===s&&cs[1]===n?["",""]:[s,n]),fs(e.orderdetailid)},children:cs[0]===s&&cs[1]===n?(0,ae.jsx)(h.A,{}):(0,ae.jsx)(A.A,{})})}),"cancelled"===Ye&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},disabled:!0,children:(0,ae.jsx)(d.A,{})})}),1===e.status&&(0,ae.jsx)(T.A,{title:"Cancelled",children:(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},children:(0,ae.jsx)(K.A,{color:"error"})})}),e.supplyqty>e.orderqty&&(0,ae.jsx)(T.A,{title:"Assigned count is greater than ordered count",children:(0,ae.jsx)(H.A,{color:"warning",children:(0,ae.jsx)(re.A,{})})})]})})]},n+1),(0,ae.jsx)(W.A,{sx:{p:2},children:(0,ae.jsx)(_.A,{style:{paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0},colSpan:11,sx:{width:"100%"},children:(0,ae.jsx)(B.A,{in:cs[0]===s&&cs[1]===n,timeout:"auto",unmountOnExit:!0,children:(0,ae.jsx)(V.A,{sx:{width:"100%"},children:0===Ne.length?(0,ae.jsx)(ae.Fragment,{children:i?(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(u.A,{alignItems:"center",children:(0,ae.jsx)(I.A,{})})}):(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(u.A,{sx:{p:1},children:(0,ae.jsx)(C.A,{children:"No Staffs has been Assigned"})})})}):(0,ae.jsx)(E.A,{children:(0,ae.jsxs)(O.A,{children:[(0,ae.jsx)(P.A,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:"#"}),(0,ae.jsx)(_.A,{children:"Staff"}),(0,ae.jsx)(_.A,{children:"Start Time"}),(0,ae.jsx)(_.A,{children:"End Time"}),(0,ae.jsx)(_.A,{children:"Pay Rate"}),(0,ae.jsx)(_.A,{align:"center",children:"Clockin"}),(0,ae.jsx)(_.A,{align:"center",children:"Clockout"}),(0,ae.jsx)(_.A,{children:"Hours Worked"}),(0,ae.jsx)(_.A,{children:"Status"})]})}),(0,ae.jsx)(R.A,{children:Ne.map(((e,s)=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsxs)(W.A,{sx:{},children:[(0,ae.jsx)(_.A,{component:"th",scope:"row",padding:"none",children:s+1}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"caption",children:e.staffname}),(0,ae.jsx)(b.Ay,{children:(0,ae.jsx)(v.A,{label:e.productname,color:"info",variant:"light",size:"small"})})]})}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Starttime).format("hh:mm A")})]})}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Endtime).format("hh:mm A")})]})}),(0,ae.jsx)(_.A,{children:e.rolecost}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,ae.jsx)(_.A,{children:e.hoursworked}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsxs)(u.A,{direction:"row",children:["pending"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Pending",color:"error",size:"small"}),"cancelled"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Completed",color:"primary",size:"small"}),"processing"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Processing",color:"primary",size:"small"}),"assigned"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Confirmed",color:"success",size:"small"}),"active"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Active",color:"info",size:"small"}),"closed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Closed",color:"info",size:"small"})]})})]})},s)))})]})})})})})})]})))]})]})})]})})},e.locationaddress))),(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsx)($.A,{sx:{borderWidth:1}})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{title:"Order Addons",sx:{height:"100%"},children:(0,ae.jsx)(b.Ay,{container:!0,spacing:2,children:(Ee||[]).map((e=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsx)(b.Ay,{item:!0,children:(0,ae.jsx)(v.A,{icon:(0,ae.jsx)(x.A,{}),variant:"outlined",color:"error",label:e.addon})})},e.addon)))})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{title:"Total",sx:{height:"100%"},children:(0,ae.jsxs)(u.A,{spacing:2,children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsx)(C.A,{color:ms.palette.grey[500],children:"Sub Total:"}),(0,ae.jsxs)(C.A,{children:["$",""===De?(0,ae.jsx)(L.A,{sx:{width:"30px"}}):De]})]}),(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsx)(C.A,{color:ms.palette.grey[500],children:"Tax:"}),(0,ae.jsx)(C.A,{children:""===ke?(0,ae.jsx)(L.A,{sx:{width:"30px"}}):ke})]}),(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsx)(C.A,{variant:"subtitle1",children:"Grand Total:"}),(0,ae.jsx)(C.A,{variant:"subtitle1",children:""===Ie?(0,ae.jsx)(L.A,{sx:{width:"30px"}}):"$".concat(Ie)})]})]})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsxs)(u.A,{direction:"column",sx:{mt:2},children:[(0,ae.jsx)(C.A,{color:"secondary",children:"Other Instructions:"}),(0,ae.jsx)(C.A,{sx:{ml:3},children:Pe})]})})]})})})]})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6248],{23787:(e,s,i)=>{i.d(s,{FG:()=>A,nV:()=>x,pY:()=>j,pg:()=>h});var n=i(89379),r=i(80045),t=i(93230),a=i(2235),l=i(16491),o=i(82053),c=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:s,scroll:i=!1,onScroll:a,sx:l}=e,o=(0,r.A)(e,d);return(0,c.jsx)(t.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:a,sx:(0,n.A)((0,n.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},o),{},{children:s}))},h=e=>{let{accent:s="#662582",header:i,footer:r,selected:t=!1,onClick:o,children:d,sx:x}=e;return(0,c.jsxs)(a.A,{elevation:0,onClick:o,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:t?s:"#e2e8f0",background:t?"".concat(s,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:s}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[i,d,r]})]})},A=e=>{let{children:s,columns:i=2,sx:r}=e;return(0,c.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},r),children:s})},j=e=>{let{label:s,value:i,children:n,full:r=!1,align:t="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:r?"1 / -1":"auto",minWidth:0,textAlign:t},children:[(0,c.jsx)(o.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:s}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,c.jsx)(o.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},66248:(e,s,i)=>{i.r(s),i.d(s,{default:()=>oe});var n=i(89379),r=i(9950),t=i(46702),a=i(28429),l=i(26910),o=i(63189),c=i(19474),d=i(58833),x=i(53067),h=i(62824),A=i(52329),j=i(36256),m=i(32653),g=i(96583),p=i(28170),u=i(93230),f=i(41413),b=i(60899),v=i(25277),y=i(65429),w=i(92743),Y=i(36080),C=i(82053),S=i(29925),k=i(10226),z=i(40033),D=i(48159),M=i(84142),I=i(46639),F=i(93038),T=i(83274),H=i(25333),E=i(1320),O=i(15769),P=i(69780),W=i(9213),_=i(21671),R=i(34075),N=i(79739),U=i(25713),L=i(82917),q=i(25979),B=i(33738),$=i(74745),G=i(37476),K=i(72179),V=i(50027),X=i(52351),Z=i(4159),J=i.n(Z),Q=i(14857),ee=i(47223),se=i(23787),ie=i(46585),ne=i(94118),re=i(97973),te=i(8881),ae=i(44414),le=i(36220);J().extend(le);const oe=()=>{const[e,s]=(0,r.useState)([]),[i,Z]=(0,r.useState)(!0),le=(0,a.zy)(),[oe,ce]=(0,r.useState)(""),[de,xe]=(0,r.useState)(""),[he,Ae]=(0,r.useState)(""),[je,me]=(0,r.useState)(""),[ge,pe]=(0,r.useState)(!1),[ue,fe]=(0,r.useState)(""),[be,ve]=(0,r.useState)(""),[ye,we]=(0,r.useState)(!1),[Ye,Ce]=(0,r.useState)(""),[Se]=(0,r.useState)(""),[ke,ze]=(0,r.useState)(""),[De,Me]=(0,r.useState)(""),[Ie,Fe]=(0,r.useState)(""),[Te,He]=(0,r.useState)(""),[Ee,Oe]=(0,r.useState)([]),[Pe,We]=(0,r.useState)(""),[_e,Re]=(0,r.useState)(""),[Ne,Ue]=(0,r.useState)([]),[Le,qe]=(0,r.useState)([]),[Be,$e]=(0,r.useState)(""),[Ge,Ke]=(0,r.useState)(""),[Ve]=(0,r.useState)(""),[Xe]=(0,r.useState)(""),[Ze,Je]=(0,r.useState)(""),[Qe,es]=(0,r.useState)([]),[ss,is]=(0,r.useState)({shifts:0,assigned:0,remaining:0,shiftid:0,price:0}),[ns,rs]=(0,r.useState)(0),{state:ts}=(0,a.zy)(),[as,ls]=(0,r.useState)(""),os=(0,a.Zp)(),[cs,ds]=(0,r.useState)(["",""]),[xs,hs]=(0,r.useState)(""),[As,js]=(0,r.useState)(!1);(0,r.useEffect)((()=>{console.log("categoryarr"),console.log(e,de,Te,Ve,Xe)}),[Qe]),(0,r.useEffect)((()=>{ts&&($e(ts.orderheaderid),Ke(ts.tenantid)),console.log(ts),console.log(Date.now())}),[]),(0,r.useEffect)((()=>{ts&&($e(ts.orderheaderid),Ke(ts.tenantid)),console.log(ts),console.log(Date.now())}),[ts.orderheaderid,ts.tenantid]);const ms=(0,Q.A)(),gs=(0,ee.A)(ms.breakpoints.down("md")),ps=async()=>{Z(!0),await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getordersbystatus?tenantid=").concat(Ge)).then((e=>{console.log(e);let s=e.data.Details.find((e=>e.orderheaderid==Be));console.log("result"),console.log(s),Oe(s.orderaddons),He(s.venuetype),We(s.remarks),hs(s.startdate),fe(s.tenantname),xe(""),ve(s.tenantaddress),me(s.eventname),Ae(J()(s.orderdate).format("MM/DD/YYYY")||""),ce(s.orderid),Ce(s.orderstatus),ze(s.taxamount),Me(s.orderamount),Fe(s.ordervalue),Re(J()(s.cancelled).format("MM/DD/YYYY")||""),Je(s.pending),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))},us=async()=>{Z(!0),await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getorderdetails?orderheaderid=").concat(Be)).then((e=>{console.log("res"),console.log(e),s(e.data.Details||[]),console.log("categoryarr"),es(e.data.Details),console.log(e.data.Details),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))},fs=async e=>{Z(!0);try{await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getassignedinfo?orderdetailid=").concat(e)).then((e=>{console.log(e),e.data.status&&Ue(e.data.Details),Z(!1)})).catch((e=>{console.log(e),Z(!1)}))}catch(s){console.log(s),Z(!1)}},bs=async e=>{let s={orderheaderid:Be,orderprocessid:e.orderprocessid,orderdetailid:e.orderdetailid,orderstatus:"pending",pending:J()().format("YYYY-MM-DD HH:mm:ss"),status:1};console.log(s),await l.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/orders/updateprocessstatus"),s).then((s=>{console.log(s),"Successful"===s.data.message&&((0,te.M8)("Role unassigned successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ss.assigned>ss.shifts&&vs(e),ps(),us(),pe(!1),Cs(),ys(),setTimeout((()=>{Cs()}),2e3))})).catch((e=>{console.log(e)}))},vs=e=>{let s;console.log(e);let i=[e.userfcmtoken],n=[{notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Un-Asigned",message:"".concat(e.firstname," has been Un-assigned to the order ").concat(oe),configid:2,tenantid:Ge,orderheaderid:Be,orderprocessid:e.orderprocessid,shiftid:e.shiftid,userid:e.userid,orderid:oe,success:0,orderstatus:"assigned",processing:J()().format("YYYY-MM-DD HH:mm:ss"),notifytype:2,notifyreason:"Staff Un-Assigned"}];s={Title:"Staff Un-Asigned",message:"A Staff has been Un-assigned to the order ".concat(oe),tenantid:Ge,orderheaderid:Be,orderid:oe,configid:2};let r={notifications:n,fcmmodel:{priority:"high",registration_ids:i,data:s,notification:{body:"An order has been Un-assigned ".concat(oe),title:"Legendary",sound:"ring",content_available:!0,click_action:"FLUTTER_NOTIFICATION_CLICK"}}};console.log("grpnotifyobj unassign"),console.log(r),Ys(r)};(0,r.useEffect)((()=>{console.log(Be),Be&&Ge?(ps(),us(),Cs(),console.log(le.state||"")):Z(!1),console.log(Be,Ge)}),[Be,Ge,as]);const ys=()=>{we(!1),qe([]),ds(["",""])};(0,r.useEffect)((()=>{console.log(ss)}));const ws=async e=>{let s=e.userfcmtoken,i={notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(oe),configid:2,tenantid:Ge,orderheaderid:Be,orderprocessid:e.orderprocessid,shiftid:e.shiftid,userid:e.userid,orderid:oe,sound:"ring",click_action:"FLUTTER_NOTIFICATION_CLICK"};console.log(i,s),await l.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/utils/notification/send"),{priority:"high",registration_ids:[s],data:i,notification:{body:"A Staff has been assigned to ".concat(oe),title:"Legendary",sound:"ring",content_available:!0}},{headers:{Authorization:"Bearer ".concat("")}}).then((e=>{console.log(e),(0,te.M8)("Notification sent successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})})).catch((e=>{console.log(e)}))},Ys=async e=>{console.log(e),await l.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/utils/notification/sendall"),e,{headers:{Authorization:"Bearer ".concat("")}}).then((e=>{console.log(e),e.data.status&&((0,te.M8)("Notification sent successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ps())})).catch((e=>{console.log(e)}))},Cs=async()=>{await l.A.get("".concat("https://jupiter.nearle.app/live/api/v2","/orders/getorderstatuscount?orderheaderid=").concat(Be)).then((e=>{e.data.status?(console.log(e),ls(e.data.pendingcount),ps()):(ls(e.data.pendingcount),ps())})).catch((e=>{console.log(e)}))};function Ss(e){let{open:s,handleClose:i}=e;const[n,t]=(0,r.useState)("");return(0,ae.jsx)(g.A,{open:s,onClose:()=>i(!1),maxWidth:"xs",fullScreen:gs,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:(0,ae.jsx)(p.A,{sx:{mt:2,my:1},children:(0,ae.jsxs)(u.A,{alignItems:"center",spacing:3.5,children:[(0,ae.jsx)(f.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,ae.jsx)(j.A,{})}),(0,ae.jsx)(b.Ay,{children:(0,ae.jsx)(v.A,{label:oe.slice(4),variant:"combined",color:"warning",size:"small"})}),(0,ae.jsxs)(u.A,{spacing:2,children:[As&&(0,ae.jsxs)(y.A,{color:"warning",variant:"border",icon:(0,ae.jsx)(ie.A,{}),children:[(0,ae.jsx)(w.A,{children:"Order is within 24Hrs time frame. The order will be invoiced with standard pricing as agreed."}),(0,ae.jsx)(Y.A,{href:"https://thelegendarystaff.com/",target:"_blank",children:"Terms & Condition link"})]}),(0,ae.jsx)(C.A,{variant:"h4",align:"center",children:"Please type in the order number to confirm."}),(0,ae.jsx)(S.A,{type:"text",onChange:e=>{console.log(e.target.value),t(e.target.value)},error:n!==oe.slice(4),value:n})]}),(0,ae.jsxs)(u.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,ae.jsx)(k.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{n===oe.slice(4)&&((async()=>{await l.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/orders/cancel"),{orderheaderid:parseInt(Be),orderstatus:"cancelled",cancelled:J()().format("YYYY-MM-DD HH:mm:ss"),unserviceable:As?0:1}).then((e=>{console.log(e),e.data.status&&Be&&Ge&&(ps(),us())})).catch((e=>{console.log(e)}))})(),i(!0))},autoFocus:!0,children:"Yes, Cancel"}),(0,ae.jsx)(k.A,{fullWidth:!0,onClick:()=>i(!1),color:"secondary",variant:"outlined",children:"No"})]})]})})})}return(0,ae.jsxs)(ae.Fragment,{children:[i&&(0,ae.jsx)(X.A,{}),(0,ae.jsx)(Ss,{open:ge,handleClose:()=>{pe(!1)}}),(0,ae.jsxs)(g.A,{maxWidth:!1,fullWidth:!0,open:ye,onClose:ys,scroll:"paper",fullScreen:gs,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},TransitionComponent:G.s,children:[(0,ae.jsxs)(z.A,{children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsxs)(u.A,{direction:{sm:"row",xs:"column"},spacing:2,alignItems:"center",children:[(0,ae.jsx)(C.A,{variant:"h3",children:"Assign Roles"}),(0,ae.jsx)(v.A,{label:ue,variant:"light",color:"primary"})]}),(0,ae.jsx)(v.A,{label:oe,variant:"combined",color:"warning",size:"large"})]}),(0,ae.jsxs)(b.Ay,{container:!0,sx:{p:1},spacing:2,children:[(0,ae.jsx)(b.Ay,{item:!0,sm:6,xs:12,children:(0,ae.jsx)(D.A,{value:ns,onChange:()=>rs((e=>0===e?1:0)),variant:"scrollable",scrollButtons:"auto",children:(0,ae.jsx)(M.A,{label:Se})})}),(0,ae.jsx)(b.Ay,{item:!0,sm:6,xs:12,children:(0,ae.jsxs)(u.A,{direction:"row",justifyContent:{xs:"flex-start",sm:"flex-end"},sx:{height:"100%"},spacing:2,children:[(0,ae.jsx)(v.A,{sx:{width:"130px"},label:"Required:".concat(ss.shifts),variant:"combined",color:"primary",size:"normal"}),(0,ae.jsx)(v.A,{sx:{width:"130px"},label:"Assigned: ".concat(ss.assigned),variant:"combined",color:"success",size:"normal"}),(0,ae.jsx)(v.A,{sx:{width:"130px"},label:"Remaining: ".concat(ss.remaining),variant:"combined",color:"error",size:"normal"})]})})]})]}),(0,ae.jsx)(p.A,{dividers:!0,children:0===Ne.length?(0,ae.jsx)(ae.Fragment,{children:i?(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(u.A,{alignItems:"center",children:(0,ae.jsx)(I.A,{})})}):(0,ae.jsx)(C.A,{children:"No Staffs Available"})}):gs?(0,ae.jsx)(se.nV,{children:Ne.map(((e,s)=>{const i=!!Le.find((s=>s.userid==e.userid));return(0,ae.jsxs)(se.pg,{accent:"#662582",selected:i,children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",spacing:1,children:[(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ae.jsx)(f.A,{alt:"",src:"",sx:{width:32,height:32}}),(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"subtitle2",children:e.firstname}),(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.contactno})]})]}),e.orderdetailid!==orderdetailid?(0,ae.jsx)(F.A,{disabled:0!==e.orderdetailid,checked:i,onClick:s=>{if(console.log(ss),ss.remaining>=0){if(s.target.checked&&0!=ss.remaining){let s=Le;s.push({userid:e.userid,orderdetailid:orderdetailid,productid:productid,shiftid:ss.shiftid,userrate:ss.price,productrate:e.rolecost,firstname:e.firstname}),qe([...s]);let i=ss;i.assigned++,i.remaining=i.shifts-i.assigned,is((0,n.A)({},i))}else if(ss.assigned!=ss.shifts||0===ss.remaining&&!s.target.checked){let s=Le,i=s.findIndex((s=>s.userid===e.userid));s.splice(i,1),qe([...s]);let r=ss;r.assigned--,r.remaining=r.shifts-r.assigned,is((0,n.A)({},r))}console.log(Le)}}}):(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",children:[(0,ae.jsx)(v.A,{label:"Assigned",color:"success",size:"small",sx:{mr:1}}),(0,ae.jsx)(T.A,{title:"Unassign",children:(0,ae.jsx)(H.A,{color:"error",onClick:()=>{console.log(e),bs(e)},children:(0,ae.jsx)(ne.A,{})})}),(0,ae.jsx)(T.A,{title:"Send Notification",children:(0,ae.jsx)(H.A,{color:"info",onClick:()=>{console.log(e),ws(e)},children:(0,ae.jsx)(m.A,{})})})]})]}),(0,ae.jsxs)(se.FG,{children:[(0,ae.jsx)(se.pY,{label:"Category",children:(0,ae.jsxs)(u.A,{direction:"column",alignItems:"flex-start",spacing:.25,children:[(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.cateoryname}),(0,ae.jsx)(v.A,{label:e.subcategoryname,color:"info",size:"small",variant:"light"})]})}),(0,ae.jsx)(se.pY,{label:"Price",value:e.rolecost}),(0,ae.jsx)(se.pY,{label:"Experience",value:"".concat(e.experience," Years")}),(0,ae.jsx)(se.pY,{label:"Level",children:(0,ae.jsx)(v.A,{label:e.levelofexperience,size:"small",color:"primary",variant:"light"})}),(0,ae.jsx)(se.pY,{label:"City",value:e.city}),e.orderid&&(0,ae.jsx)(se.pY,{label:"Order",children:(0,ae.jsx)(v.A,{label:e.orderid,color:"warning",size:"small",variant:"light"})})]})]},s)}))}):(0,ae.jsx)(E.A,{children:(0,ae.jsxs)(O.A,{children:[(0,ae.jsx)(P.A,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:"#"}),(0,ae.jsx)(_.A,{children:"Staff"}),(0,ae.jsx)(_.A,{children:"Category"}),(0,ae.jsx)(_.A,{children:"Price"}),(0,ae.jsx)(_.A,{children:"Experience"}),(0,ae.jsx)(_.A,{children:"Level"}),(0,ae.jsx)(_.A,{children:"City"}),(0,ae.jsx)(_.A,{children:"Action"}),(0,ae.jsx)(_.A,{})]})}),(0,ae.jsx)(R.A,{children:Ne.map(((e,s)=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsxs)(W.A,{sx:{backgroundColor:Le.find((s=>s.userid==e.userid))?"#f5f5f5":"",":hover":{backgroundColor:Le.find((s=>s.userid==e.userid))?"#f5f5f5 !important":""}},children:[(0,ae.jsx)(_.A,{component:"th",scope:"row",padding:"none",children:s+1}),(0,ae.jsx)(_.A,{align:"left",sx:{paddingLeft:"0px !important"},children:(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,justifyContent:"flex-start",children:[(0,ae.jsx)(f.A,{alt:"",size:"sm",src:"",sx:{width:"25px",height:"25px"}}),(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"caption",children:e.firstname}),(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.contactno})]})]})}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsxs)(u.A,{direction:"column",alignItems:"flex-start",children:[(0,ae.jsx)(C.A,{variant:"caption",color:"textSecondary",children:e.cateoryname}),(0,ae.jsx)(v.A,{label:e.subcategoryname,color:"info",size:"small",variant:"light"})]})}),(0,ae.jsx)(_.A,{children:e.rolecost}),(0,ae.jsxs)(_.A,{align:"left",children:[e.experience," Years"]}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsx)(v.A,{label:e.levelofexperience,size:"small",color:"primary",variant:"light"})}),(0,ae.jsx)(_.A,{align:"left",children:e.city}),(0,ae.jsx)(_.A,{align:"left",children:e.orderdetailid!==orderdetailid?(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(F.A,{disabled:0!==e.orderdetailid,checked:!!Le.find((s=>s.userid==e.userid)),onClick:s=>{if(console.log(ss),ss.remaining>=0){if(s.target.checked&&0!=ss.remaining){let s=Le;s.push({userid:e.userid,orderdetailid:orderdetailid,productid:productid,shiftid:ss.shiftid,userrate:ss.price,productrate:e.rolecost,firstname:e.firstname}),qe([...s]);let i=ss;i.assigned++,i.remaining=i.shifts-i.assigned,is((0,n.A)({},i))}else if(ss.assigned!=ss.shifts||0===ss.remaining&&!s.target.checked){let s=Le,i=s.findIndex((s=>s.userid===e.userid));s.splice(i,1),qe([...s]);let r=ss;r.assigned--,r.remaining=r.shifts-r.assigned,is((0,n.A)({},r))}console.log(Le)}}})}):(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(v.A,{label:"Assigned",color:"success",size:"small",sx:{mr:1}}),(0,ae.jsx)(T.A,{title:"Unassign",children:(0,ae.jsx)(H.A,{color:"error",onClick:()=>{console.log(e),bs(e)},children:(0,ae.jsx)(ne.A,{})})}),(0,ae.jsx)(T.A,{title:"Send Notification",children:(0,ae.jsx)(H.A,{color:"info",onClick:()=>{console.log(e),ws(e)},children:(0,ae.jsx)(m.A,{})})})]})}),(0,ae.jsx)(_.A,{children:e.orderid&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(v.A,{label:e.orderid,color:"warning",size:"small",variant:"light"})})})]})},s)))})]})})}),(0,ae.jsx)(N.A,{children:(0,ae.jsxs)(u.A,{sx:{mt:2,width:{xs:"100%",sm:"auto"}},direction:{xs:"column",sm:"row"},justifyContent:"flex-end",spacing:{xs:1.5,sm:5},children:[Ne.length>0&&(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)(k.A,{sx:{width:{xs:"100%",sm:"130px"}},variant:"contained",onClick:async()=>{let e=[],s=[];Le.map((i=>{e.push({orderprocessid:0,processdate:J()().format("YYYY-MM-DD HH:mm:ss"),tenantid:Ge,orderheaderid:Be,orderdetailid:i.orderdetailid,productid:i.productid,userid:i.userid,orderstatus:"pending",pending:"".concat(J()(Ze).format("YYYY-MM-DD")," ").concat(J()(Ze).format("HH:mm:ss")),starttime:"".concat(J()(Ve).format("YYYY-MM-DD")," ").concat(J()(Ve).format("HH:mm:ss")),endtime:"".concat(J()(Xe).format("YYYY-MM-DD")," ").concat(J()(Xe).format("HH:mm:ss")),appuserid:parseInt(localStorage.getItem("appuserid")),shiftid:i.shiftid,userrate:i.userrate,productrate:i.productrate}),Le.map((e=>{s.push({notificationid:0,notificationdate:J()().format("YYYY-MM-DD HH:mm:ss"),Title:"Staff Asigned",message:"A Staff has been assigned to the order ".concat(oe),configid:2,tenantid:Ge,orderheaderid:Be,orderprocessid:0,shiftid:e.shiftid,userid:e.userid,orderid:oe,sound:"ring",click_action:"FLUTTER_NOTIFICATION_CLICK",firstname:e.firstname})}))})),console.log("arr"),console.log(e),await l.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/orders/createorderprocess"),e).then((e=>{console.log(e),"Successfully created"===e.data.message&&((0,te.M8)("Roles assigned successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),we(!1),us(),Cs())})).catch((e=>{console.log(e)})),console.log(e)},children:"OK"}),(0,ae.jsx)(k.A,{sx:{width:{xs:"100%",sm:"130px"}},color:"warning",variant:"contained",onClick:()=>{qe([]);let e=ss;e.remaining=e.shifts,e.assigned=0,is(e)},children:"clear"})]}),(0,ae.jsx)(k.A,{sx:{width:{xs:"100%",sm:"130px"}},color:"error",variant:"contained",onClick:()=>{ys()},children:"Close"})]})})]}),(0,ae.jsxs)(b.Ay,{container:!0,rowSpacing:2,columnSpacing:2.75,children:[(0,ae.jsx)(U.A,{sx:{position:"sticky",top:"60px",bgcolor:ms.palette.background.default,zIndex:1,width:"100%"},children:(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsxs)(u.A,{direction:{md:"row",xs:"column"},justifyContent:"space-between",alignItems:"flex-end",sx:{width:"100%",p:1},children:[(0,ae.jsxs)(u.A,{direction:"row",spacing:2,alignItems:"center",justifyContent:"flex-start",sx:{width:{xs:"100%",md:"0"}},children:[(0,ae.jsx)(H.A,{onClick:()=>history.back(),children:(0,ae.jsx)(o.A,{})}),(0,ae.jsxs)(u.A,{direction:"column",alignItems:"flex-start",children:[(0,ae.jsx)(C.A,{variant:"h3",children:"Details"}),(0,ae.jsxs)(u.A,{direction:"row",spacing:1,children:[(0,ae.jsx)(v.A,{label:""===oe?(0,ae.jsx)(L.A,{sx:{width:"80px",bgcolor:"#fff9c4"},animation:"wave"}):oe,variant:"combined",color:"warning",size:"small"}),(0,ae.jsx)(v.A,{label:""===he?(0,ae.jsx)(L.A,{sx:{width:"80px",bgcolor:"#b3e5fc"},animation:"wave"}):he,variant:"combined",color:"primary",size:"small"}),"pending"===Ye&&(0,ae.jsx)(v.A,{label:"Pending",color:"error",size:"small"}),"cancelled"===Ye&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===Ye&&(0,ae.jsx)(v.A,{label:"Completed",color:"primary",size:"small"}),"processing"===Ye&&(0,ae.jsx)(v.A,{label:"Processing",color:"primary",size:"small"}),"assigned"===Ye&&(0,ae.jsx)(v.A,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===Ye&&(0,ae.jsx)(v.A,{label:"Confirmed",color:"success",size:"small"}),"active"===Ye&&(0,ae.jsx)(v.A,{label:"Active",color:"info",size:"small"}),"closed"===Ye&&(0,ae.jsx)(v.A,{label:"Closed",color:"info",size:"small"}),"modified"===Ye&&(0,ae.jsx)(v.A,{label:"Modified",color:"secondary",size:"small",variant:"contained"})]})]})]}),(0,ae.jsxs)(u.A,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:{md:0,xs:2},width:{xs:"100%",md:"auto"}},children:[("pending"===Ye||"assigned"===Ye||"confirmed"===Ye||"modified"===Ye)&&(0,ae.jsx)(T.A,{title:"Edit",children:(0,ae.jsx)(k.A,{variant:"outlined",color:"info",sx:{borderRadius:"40px",width:{xs:"100%",sm:"auto"}},startIcon:(0,ae.jsx)(t.A,{color:"info"}),onClick:e=>{e.stopPropagation(),J()(J()().format("MM-DD-YYYY")).isBefore(J()(J()(xs).format("MM-DD-YYYY")))?os("/editorder",{state:{orderheaderid:Be,tenantid:Ge}}):(0,te.M8)("Order cannot be edited.\n Order date is not valid at this time",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:4e3,style:{whiteSpace:"pre-line"}})},children:"Edit Order"})}),"cancelled"!==Ye&&""!==Ye&&"completed"!==Ye&&"closed"!==Ye&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(k.A,{variant:"outlined",color:"error",onClick:()=>{console.log(J()(xs).diff(J()(),"m")/60),J()(xs).diff(J()(),"m")/60>24?(js(!1),pe(!0)):(js(!0),pe(!0))},sx:{borderRadius:"40px",mt:{xs:2,sm:0},width:{xs:"100%",sm:"auto"}},startIcon:(0,ae.jsx)(K.A,{}),children:"Cancel Order"})}),"cancelled"===Ye&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(v.A,{label:"Order Cancelled on ".concat(_e),variant:"combined",color:"error"})})]})]})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sx:{mt:-2},children:(0,ae.jsx)(V.A,{content:!1,width:"100%",children:(0,ae.jsxs)(b.Ay,{container:!0,spacing:2.5,sx:{p:2.5},children:[(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{sx:{height:"100%"},children:(0,ae.jsxs)(u.A,{spacing:1,children:[(0,ae.jsx)(C.A,{variant:"h5",children:"Client"}),(0,ae.jsx)(C.A,{color:"secondary",children:""===ue?(0,ae.jsx)(L.A,{sx:{width:"40%"},animation:"wave"}):ue}),(0,ae.jsx)(q.A,{sx:{width:"100%"},children:(0,ae.jsx)(C.A,{color:"secondary",children:""===be?(0,ae.jsx)(L.A,{sx:{width:"90%"},animation:"wave"}):be})})]})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{sx:{height:"100%"},children:(0,ae.jsxs)(u.A,{spacing:1,children:[(0,ae.jsx)(C.A,{variant:"h5",children:"Event"}),(0,ae.jsx)(q.A,{sx:{width:"100%"},children:(0,ae.jsx)(C.A,{color:"secondary",children:""===je?(0,ae.jsx)(L.A,{sx:{width:"40%"},animation:"wave"}):je})})]})})}),Qe.map(((e,s)=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsxs)(V.A,{sx:{opacity:0==e.shiftstatus?"":"0.7"},children:[(0,ae.jsxs)(u.A,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{md:"center",xs:"flex-start"},spacing:2,sx:{p:2},children:[(0,ae.jsxs)(u.A,{direction:{xs:"column",md:"row"},spacing:2,alignItems:{md:"center",xs:"flex-start"},children:[(0,ae.jsxs)(C.A,{variant:"h5",children:["Shift ",s+1]}),(0,ae.jsxs)(C.A,{color:"secondary",children:[(0,ae.jsx)(c.A,{})," ","",e.locationaddress]}),1===e.shiftstatus&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary"})]}),(0,ae.jsx)(u.A,{direction:"row",spacing:1,children:e.ordercontacts.map((e=>(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(T.A,{title:e.contactname,children:(0,ae.jsx)(f.A,{sx:{bgcolor:"#2196f3",width:30,height:30},alt:"A",children:e.contactname.charAt(0).toUpperCase()})})})))})]}),gs?(0,ae.jsxs)(se.nV,{children:[0===e.orderdetails.length&&(0,ae.jsxs)(se.pg,{accent:"#662582",children:[(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"})]}),e.orderdetails.map(((e,n)=>(0,ae.jsxs)(se.pg,{accent:"#662582",sx:{opacity:0==e.status?"":"0.7"},children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",spacing:1,children:[(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsxs)(C.A,{sx:{fontSize:10,fontWeight:800,color:"#94a3b8"},children:["#",n+1]}),(0,ae.jsx)(C.A,{variant:"subtitle1",children:e.productname})]}),(0,ae.jsxs)(u.A,{direction:"row",alignItems:"center",children:[(0,ae.jsx)(T.A,{title:"Expand",children:(0,ae.jsx)(H.A,{"aria-label":"expand row",style:{color:ms.palette.primary.main},onClick:()=>{Ue([]),ds(cs[0]===s&&cs[1]===n?["",""]:[s,n]),fs(e.orderdetailid)},children:cs[0]===s&&cs[1]===n?(0,ae.jsx)(h.A,{}):(0,ae.jsx)(A.A,{})})}),"cancelled"===Ye&&(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},disabled:!0,children:(0,ae.jsx)(d.A,{})}),1===e.status&&(0,ae.jsx)(T.A,{title:"Cancelled",children:(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},children:(0,ae.jsx)(K.A,{color:"error"})})}),e.supplyqty>e.orderqty&&(0,ae.jsx)(T.A,{title:"Assigned count is greater than ordered count",children:(0,ae.jsx)(H.A,{color:"warning",children:(0,ae.jsx)(re.A,{})})})]})]}),(0,ae.jsxs)(se.FG,{children:[(0,ae.jsx)(se.pY,{label:"Start Date",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.starttime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"End Date",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.endtime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"Unpaid Break",value:e.unpaidbreak||0}),(0,ae.jsx)(se.pY,{label:"Count",children:(0,ae.jsx)(v.A,{label:e.orderqty,color:"success",variant:"light",size:"small"})}),(0,ae.jsx)(se.pY,{label:"Assigned",children:(0,ae.jsx)(v.A,{label:e.supplyqty,color:0===e.supplyqty?"error":"warning",variant:"light",size:"small"})}),(0,ae.jsx)(se.pY,{label:"Price",value:"$".concat(e.price)}),(0,ae.jsx)(se.pY,{label:"Amount",value:"$".concat(e.landingamount)})]}),(0,ae.jsxs)(B.A,{in:cs[0]===s&&cs[1]===n,timeout:"auto",unmountOnExit:!0,children:[(0,ae.jsx)($.A,{sx:{my:1.5}}),0===Ne.length?i?(0,ae.jsx)(u.A,{alignItems:"center",children:(0,ae.jsx)(I.A,{})}):(0,ae.jsx)(u.A,{sx:{p:1},children:(0,ae.jsx)(C.A,{children:"No Staffs has been Assigned"})}):(0,ae.jsx)(u.A,{spacing:1,children:Ne.map(((e,s)=>(0,ae.jsxs)(se.pg,{accent:"#0ea5e9",children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"subtitle2",children:e.staffname}),(0,ae.jsx)(b.Ay,{children:(0,ae.jsx)(v.A,{label:e.productname,color:"info",variant:"light",size:"small"})})]}),(0,ae.jsxs)(u.A,{direction:"row",children:["pending"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Pending",color:"error",size:"small"}),"cancelled"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Completed",color:"primary",size:"small"}),"processing"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Processing",color:"primary",size:"small"}),"assigned"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Confirmed",color:"success",size:"small"}),"active"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Active",color:"info",size:"small"}),"closed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Closed",color:"info",size:"small"})]})]}),(0,ae.jsxs)(se.FG,{children:[(0,ae.jsx)(se.pY,{label:"Start Time",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Starttime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"End Time",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Endtime).format("hh:mm A")})]})}),(0,ae.jsx)(se.pY,{label:"Pay Rate",value:e.rolecost}),(0,ae.jsx)(se.pY,{label:"Hours Worked",value:e.hoursworked}),(0,ae.jsx)(se.pY,{label:"Clockin",children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"flex-start",children:[(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,ae.jsx)(se.pY,{label:"Clockout",children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"flex-start",children:[(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})})]})]},s)))})]})]},n+1)))]}):(0,ae.jsx)(E.A,{children:(0,ae.jsxs)(O.A,{children:[(0,ae.jsx)(P.A,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:"#"}),(0,ae.jsx)(_.A,{children:"Role"}),(0,ae.jsx)(_.A,{children:"Start Date"}),(0,ae.jsx)(_.A,{children:"End Date"}),(0,ae.jsx)(_.A,{children:"Unpaid break"}),(0,ae.jsx)(_.A,{children:"Count"}),(0,ae.jsx)(_.A,{children:"Assigned"}),(0,ae.jsx)(_.A,{children:"Attire"}),(0,ae.jsx)(_.A,{children:"Price"}),(0,ae.jsx)(_.A,{children:"Amount"}),(0,ae.jsx)(_.A,{children:"Action"})]})}),(0,ae.jsxs)(R.A,{children:[0===e.orderdetails.length&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsxs)(_.A,{children:[(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"})]}),(0,ae.jsxs)(_.A,{children:[(0,ae.jsx)(L.A,{animation:"wave"}),(0,ae.jsx)(L.A,{animation:"wave"})]}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})}),(0,ae.jsx)(_.A,{children:(0,ae.jsx)(L.A,{animation:"wave"})})]})}),e.orderdetails.map(((e,n)=>(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsxs)(W.A,{sx:{"&:last-child td, &:last-child th":{border:0},opacity:0==e.status?"":"0.7"},children:[(0,ae.jsx)(_.A,{children:n+1}),(0,ae.jsx)(_.A,{children:e.productname}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body1",children:J()(e.starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.starttime).format("hh:mm A")})]})}),(0,ae.jsxs)(_.A,{children:[" ",(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body1",children:J()(e.endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.endtime).format("hh:mm A")})]})]}),(0,ae.jsx)(_.A,{children:e.unpaidbreak||0}),(0,ae.jsx)(_.A,{align:"center",children:(0,ae.jsx)(v.A,{label:e.orderqty,color:"success",variant:"light",size:"small"})}),(0,ae.jsx)(_.A,{align:"center",children:(0,ae.jsx)(v.A,{label:e.supplyqty,color:0===e.supplyqty?"error":"warning",variant:"light",size:"small"})}),(0,ae.jsx)(_.A,{width:"100px"}),(0,ae.jsxs)(_.A,{children:["$",e.price]}),(0,ae.jsxs)(_.A,{children:["$",e.landingamount]}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"row",children:[(0,ae.jsx)(T.A,{title:"Expand",children:(0,ae.jsx)(H.A,{"aria-label":"expand row",style:{color:ms.palette.primary.main},onClick:()=>{Ue([]),ds(cs[0]===s&&cs[1]===n?["",""]:[s,n]),fs(e.orderdetailid)},children:cs[0]===s&&cs[1]===n?(0,ae.jsx)(h.A,{}):(0,ae.jsx)(A.A,{})})}),"cancelled"===Ye&&(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},disabled:!0,children:(0,ae.jsx)(d.A,{})})}),1===e.status&&(0,ae.jsx)(T.A,{title:"Cancelled",children:(0,ae.jsx)(H.A,{sx:{minWidth:"10px !important"},children:(0,ae.jsx)(K.A,{color:"error"})})}),e.supplyqty>e.orderqty&&(0,ae.jsx)(T.A,{title:"Assigned count is greater than ordered count",children:(0,ae.jsx)(H.A,{color:"warning",children:(0,ae.jsx)(re.A,{})})})]})})]},n+1),(0,ae.jsx)(W.A,{sx:{p:2},children:(0,ae.jsx)(_.A,{style:{paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0},colSpan:11,sx:{width:"100%"},children:(0,ae.jsx)(B.A,{in:cs[0]===s&&cs[1]===n,timeout:"auto",unmountOnExit:!0,children:(0,ae.jsx)(V.A,{sx:{width:"100%"},children:0===Ne.length?(0,ae.jsx)(ae.Fragment,{children:i?(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(u.A,{alignItems:"center",children:(0,ae.jsx)(I.A,{})})}):(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(u.A,{sx:{p:1},children:(0,ae.jsx)(C.A,{children:"No Staffs has been Assigned"})})})}):(0,ae.jsx)(E.A,{children:(0,ae.jsxs)(O.A,{children:[(0,ae.jsx)(P.A,{children:(0,ae.jsxs)(W.A,{children:[(0,ae.jsx)(_.A,{children:"#"}),(0,ae.jsx)(_.A,{children:"Staff"}),(0,ae.jsx)(_.A,{children:"Start Time"}),(0,ae.jsx)(_.A,{children:"End Time"}),(0,ae.jsx)(_.A,{children:"Pay Rate"}),(0,ae.jsx)(_.A,{align:"center",children:"Clockin"}),(0,ae.jsx)(_.A,{align:"center",children:"Clockout"}),(0,ae.jsx)(_.A,{children:"Hours Worked"}),(0,ae.jsx)(_.A,{children:"Status"})]})}),(0,ae.jsx)(R.A,{children:Ne.map(((e,s)=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsxs)(W.A,{sx:{},children:[(0,ae.jsx)(_.A,{component:"th",scope:"row",padding:"none",children:s+1}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"caption",children:e.staffname}),(0,ae.jsx)(b.Ay,{children:(0,ae.jsx)(v.A,{label:e.productname,color:"info",variant:"light",size:"small"})})]})}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Starttime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Starttime).format("hh:mm A")})]})}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{direction:"column",children:[(0,ae.jsx)(C.A,{variant:"body2",children:J()(e.Endtime).format("MM/DD/YYYY")}),(0,ae.jsx)(C.A,{variant:"caption",children:J()(e.Endtime).format("hh:mm A")})]})}),(0,ae.jsx)(_.A,{children:e.rolecost}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockin?J()(e.clockin).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,ae.jsx)(_.A,{children:(0,ae.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("MM/DD/YYYY"):"",color:"primary",variant:"light",size:"small"}),(0,ae.jsx)(v.A,{label:e.clockout?J()(e.clockout).format("hh:mm A"):"",color:"info",variant:"light",size:"small"})]})}),(0,ae.jsx)(_.A,{children:e.hoursworked}),(0,ae.jsx)(_.A,{align:"left",children:(0,ae.jsxs)(u.A,{direction:"row",children:["pending"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Pending",color:"error",size:"small"}),"cancelled"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Cancelled",color:"secondary",size:"small"}),"completed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Completed",color:"primary",size:"small"}),"processing"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Processing",color:"primary",size:"small"}),"assigned"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Assigned",color:"warning",size:"small"}),"confirmed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Confirmed",color:"success",size:"small"}),"active"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Active",color:"info",size:"small"}),"closed"===e.orderstatus&&(0,ae.jsx)(v.A,{label:"Closed",color:"info",size:"small"})]})})]})},s)))})]})})})})})})]})))]})]})})]})})},e.locationaddress))),(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsx)($.A,{sx:{borderWidth:1}})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{title:"Order Addons",sx:{height:"100%"},children:(0,ae.jsx)(b.Ay,{container:!0,spacing:2,children:(Ee||[]).map((e=>(0,ae.jsx)(r.Fragment,{children:(0,ae.jsx)(b.Ay,{item:!0,children:(0,ae.jsx)(v.A,{icon:(0,ae.jsx)(x.A,{}),variant:"outlined",color:"error",label:e.addon})})},e.addon)))})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,sm:6,children:(0,ae.jsx)(V.A,{title:"Total",sx:{height:"100%"},children:(0,ae.jsxs)(u.A,{spacing:2,children:[(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsx)(C.A,{color:ms.palette.grey[500],children:"Sub Total:"}),(0,ae.jsxs)(C.A,{children:["$",""===De?(0,ae.jsx)(L.A,{sx:{width:"30px"}}):De]})]}),(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsx)(C.A,{color:ms.palette.grey[500],children:"Tax:"}),(0,ae.jsx)(C.A,{children:""===ke?(0,ae.jsx)(L.A,{sx:{width:"30px"}}):ke})]}),(0,ae.jsxs)(u.A,{direction:"row",justifyContent:"space-between",children:[(0,ae.jsx)(C.A,{variant:"subtitle1",children:"Grand Total:"}),(0,ae.jsx)(C.A,{variant:"subtitle1",children:""===Ie?(0,ae.jsx)(L.A,{sx:{width:"30px"}}):"$".concat(Ie)})]})]})})}),(0,ae.jsx)(b.Ay,{item:!0,xs:12,children:(0,ae.jsxs)(u.A,{direction:"column",sx:{mt:2},children:[(0,ae.jsx)(C.A,{color:"secondary",children:"Other Instructions:"}),(0,ae.jsx)(C.A,{sx:{ml:3},children:Pe})]})})]})})})]})]})}}}]); \ No newline at end of file diff --git a/build/static/js/6390.b511f397.chunk.js b/build/static/js/6390.1dc7fa61.chunk.js similarity index 99% rename from build/static/js/6390.b511f397.chunk.js rename to build/static/js/6390.1dc7fa61.chunk.js index fc83ff8..e663793 100644 --- a/build/static/js/6390.b511f397.chunk.js +++ b/build/static/js/6390.1dc7fa61.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6390],{855:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(7208),i=n(76475),o=n(44414);function s(e){var t,n;let s,a,{children:c,type:l="scale",direction:d="right",offset:m=10,scale:h={hover:1.05,tap:.95}}=e;switch(d){case"up":case"left":s=m,a=0;break;default:s=0,a=m}const[p,u]=(0,r.Y)(s,a),[x,g]=(0,r.Y)(s,a);switch(l){case"rotate":return(0,o.jsx)(i.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:c});case"slide":return"up"===d||"down"===d?(0,o.jsx)(i.P.div,{animate:{y:void 0!==x?x:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:c}):(0,o.jsx)(i.P.div,{animate:{x:void 0!==p?p:""},onHoverEnd:()=>u(),onHoverStart:()=>u(),children:c});default:return"number"===typeof h&&(h={hover:h,tap:h}),(0,o.jsx)(i.P.div,{whileHover:{scale:null===(t=h)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=h)||void 0===n?void 0:n.tap},children:c})}}},18251:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-soc1.a0526d5a1b2b3ad224c3.svg"},22614:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/codedthemes-logo.de6f43fc1a6929defc60.svg"},36080:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(98587),i=n(58168),o=n(9950),s=n(72004),a=n(3484),c=n(89548),l=n(59254),d=n(18463),m=n(52695),h=n(31506),p=n(82053),u=n(45558),x=n(1614);function g(e){return(0,x.Ay)("MuiLink",e)}const A=(0,u.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var y=n(12703),f=n(99269);const b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},v=e=>{let{theme:t,ownerState:n}=e;const r=(e=>b[e]||e)(n.color),i=(0,y.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,y.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,f.X4)(i,.4)};var j=n(44414);const k=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],w=(0,l.Ay)(p.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,c.A)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,i.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:v({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(A.focusVisible)]:{outline:"auto"}})})),C=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiLink"}),{className:l,color:p="primary",component:u="a",onBlur:x,onFocus:A,TypographyClasses:y,underline:f="always",variant:v="inherit",sx:C}=n,M=(0,r.A)(n,k),{isFocusVisibleRef:R,onBlur:S,onFocus:_,ref:D}=(0,m.A)(),[I,F]=o.useState(!1),P=(0,h.A)(t,D),z=(0,i.A)({},n,{color:p,component:u,focusVisible:I,underline:f,variant:v}),L=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root","underline".concat((0,c.A)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,a.A)(o,g,t)})(z);return(0,j.jsx)(w,(0,i.A)({color:p,className:(0,s.A)(L.root,l),classes:y,component:u,onBlur:e=>{S(e),!1===R.current&&F(!1),x&&x(e)},onFocus:e=>{_(e),!0===R.current&&F(!0),A&&A(e)},ref:P,ownerState:z,variant:v,sx:[...Object.keys(b).includes(p)?[]:[{color:p}],...Array.isArray(C)?C:[C]]},M))}))},38569:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-soc3.c7e32ab183d3a3ab9296.svg"},79416:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-soc2.8931ba0f5ca8245dbc06.svg"},81335:(e,t,n)=>{var r={"./codedthemes-logo.svg":22614,"./img-footer.png":89476,"./img-soc1.svg":18251,"./img-soc2.svg":79416,"./img-soc3.svg":38569};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=81335},86390:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(59254),i=n(14857),o=n(36080),s=n(16491),a=n(98587),c=n(58168),l=n(9950),d=n(72004),m=n(3484),h=n(18463),p=n(45558),u=n(1614);function x(e){return(0,u.Ay)("MuiCardMedia",e)}(0,p.A)("MuiCardMedia",["root","media","img"]);var g=n(44414);const A=["children","className","component","image","src","style"],y=(0,r.Ay)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:i}=n;return[t.root,r&&t.media,i&&t.img]}})((e=>{let{ownerState:t}=e;return(0,c.A)({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},t.isMediaComponent&&{width:"100%"},t.isImageComponent&&{objectFit:"cover"})})),f=["video","audio","picture","iframe","img"],b=["picture","img"],v=l.forwardRef((function(e,t){const n=(0,h.b)({props:e,name:"MuiCardMedia"}),{children:r,className:i,component:o="div",image:s,src:l,style:p}=n,u=(0,a.A)(n,A),v=-1!==f.indexOf(o),j=!v&&s?(0,c.A)({backgroundImage:'url("'.concat(s,'")')},p):p,k=(0,c.A)({},n,{component:o,isMediaComponent:v,isImageComponent:-1!==b.indexOf(o)}),w=(e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e,i={root:["root",n&&"media",r&&"img"]};return(0,m.A)(i,x,t)})(k);return(0,g.jsx)(y,(0,c.A)({className:(0,d.A)(w.root,i),as:o,role:!v&&s?"img":void 0,ref:t,style:j,ownerState:k,src:v?s||l:void 0},u,{children:r}))}));var j=n(19808),k=n(60899),w=n(82053),C=n(82223),M=n(93230),R=n(74745),S=n(76475),_=n(16243),D=n(85002);const I={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"};var F=n(61187),P=function(e,t){return l.createElement(F.A,(0,c.A)({},e,{ref:t,icon:I}))};const z=l.forwardRef(P);const L=n.p+"static/media/codedthemes-logo.de6f43fc1a6929defc604ed2bdf77fdd.svg";const N=n.p+"static/media/img-soc1.a0526d5a1b2b3ad224c35fedc8498601.svg";const T=n.p+"static/media/img-soc2.8931ba0f5ca8245dbc0684f455a56d44.svg";const W=n.p+"static/media/img-soc3.c7e32ab183d3a3ab9296b56558562065.svg";var B=n(855);const E=n(81335),H=(0,r.Ay)(o.A)((e=>{let{theme:t}=e;return{color:t.palette.text.secondary,"&:hover":{color:t.palette.primary.main},"&:active":{color:t.palette.primary.main}}})),O=e=>{let{isFull:t}=e;const n=(0,i.A)(),{presetColor:r}=(0,D.A)(),a=n.palette.mode===_.lG.DARK?"text.primary":"background.paper",c={color:n.palette.common.white,fontSize:"0.875rem",fontWeight:400,opacity:"0.6",cursor:"pointer","&:hover":{opacity:"1"}};return(0,g.jsxs)(g.Fragment,{children:[t&&(0,g.jsxs)(s.A,{sx:{position:"relative",bgcolor:n.palette.grey.A700,zIndex:1,mt:{xs:0,md:13.75},pt:{xs:8,sm:7.5,md:18.75},pb:{xs:2.5,md:10},"&:after":{content:'""',position:"absolute",width:"100%",height:"80%",bottom:0,left:0,background:n.direction===_.NL.RTL?"linear-gradient(transparent 100%, rgb(31, 31, 31) 70%)":"linear-gradient(180deg, transparent 0%, ".concat(n.palette.grey.A700," 70%)")}},children:[(0,g.jsx)(v,{component:"img",image:E("./img-footer-".concat(r,".png")),sx:{display:{xs:"none",md:"block"},width:"55%",maxWidth:700,position:"absolute",top:"-28%",right:0}}),(0,g.jsx)(j.A,{children:(0,g.jsx)(k.Ay,{container:!0,alignItems:"center",justifyContent:"space-between",spacing:2,children:(0,g.jsx)(k.Ay,{item:!0,xs:12,md:6,sx:{position:"relative",zIndex:1},children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,sx:{[n.breakpoints.down("md")]:{pr:0,textAlign:"center"}},children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(w.A,{variant:"subtitle1",sx:{color:n.palette.common.white},children:"Roadmap"})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(S.P.div,{initial:{opacity:0,translateY:550},animate:{opacity:1,translateY:0},transition:{type:"spring",stiffness:150,damping:30},children:(0,g.jsx)(w.A,{variant:"h2",sx:{color:n.palette.common.white,fontWeight:700},children:"Upcoming Release"})})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(w.A,{variant:"body1",sx:{color:n.palette.common.white},children:"What is next? Checkout the Upcoming release of Mantis React."})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,sx:{my:2},children:(0,g.jsx)(s.A,{sx:{display:"inline-block"},children:(0,g.jsx)(B.A,{children:(0,g.jsx)(C.A,{size:"large",variant:"contained",endIcon:(0,g.jsx)(z,{}),component:o.A,href:"https://links.codedthemes.com/RXnKQ",target:"_blank",children:"Roadmap"})})})})]})})})})]}),(0,g.jsx)(s.A,{sx:{pt:t?0:10,pb:10,bgcolor:n.palette.grey.A700},children:(0,g.jsx)(j.A,{children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,md:4,children:(0,g.jsx)(S.P.div,{initial:{opacity:0,translateY:550},animate:{opacity:1,translateY:0},transition:{type:"spring",stiffness:150,damping:30},children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(v,{component:"img",image:L,sx:{width:"auto"}})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:400,color:n.palette.common.white},children:"Since 2017, More than 50K+ Developers trust the CodedThemes Digital Product. Mantis React is Manage under their Experienced Team Players."})})]})})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,md:8,children:(0,g.jsxs)(k.Ay,{container:!0,spacing:{xs:5,md:2},children:[(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"Help"}),(0,g.jsxs)(M.A,{spacing:{xs:1.5,md:2.5},children:[(0,g.jsx)(H,{href:"https://links.codedthemes.com/nOuhw",target:"_blank",underline:"none",children:"Blog"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/BQFrl",target:"_blank",underline:"none",children:"Documentation"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/rhzvh",target:"_blank",underline:"none",children:"Change Log"}),(0,g.jsx)(H,{href:"https://codedthemes.support-hub.io/",target:"_blank",underline:"none",children:"Support"})]})]})}),(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"Store Help"}),(0,g.jsxs)(M.A,{spacing:{xs:1.5,md:2.5},children:[(0,g.jsx)(H,{href:"https://mui.com/store/license/",target:"_blank",underline:"none",children:"License"}),(0,g.jsx)(H,{href:"https://mui.com/store/customer-refund-policy/",target:"_blank",underline:"none",children:"Refund Policy"}),(0,g.jsx)(H,{href:"https://support.mui.com/hc/en-us/sections/360002564979-For-customers",target:"_blank",underline:"none",children:"Submit a Request"})]})]})}),(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"Mantis Eco-System"}),(0,g.jsx)(M.A,{spacing:{xs:1.5,md:2.5},children:[{title:"CodeIgniter",link:"https://links.codedthemes.com/dEGKs"},{title:"React MUI",link:"https://links.codedthemes.com/Aprwb"},{title:"Angular",link:"https://links.codedthemes.com/EIvof"},{title:"Bootstrap 5",link:"https://codedthemes.com/item/mantis-bootstrap-admin-dashboard/"},{title:".Net",link:"https://links.codedthemes.com/GPZhD"}].map(((e,t)=>(0,g.jsx)(H,{href:e.link,target:"_blank",underline:"none",children:e.title},t)))})]})}),(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"More Products"}),(0,g.jsxs)(M.A,{spacing:{xs:1.5,md:2.5},children:[(0,g.jsx)(H,{href:"https://links.codedthemes.com/zyACc",target:"_blank",underline:"none",children:"Berry React Material"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/WztNI",target:"_blank",underline:"none",children:"Free Berry React"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/sTUAK",target:"_blank",underline:"none",children:"Free Mantis React"})]})]})})]})})]})})}),(0,g.jsx)(R.A,{sx:{borderColor:"grey.700"}}),(0,g.jsx)(s.A,{sx:{py:1.5,bgcolor:n.palette.mode===_.lG.DARK?n.palette.grey[50]:n.palette.grey[800]},children:(0,g.jsx)(j.A,{children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,sm:8,children:(0,g.jsx)(w.A,{variant:"subtitle2",color:"secondary",children:"\xa9 Made with love by Team CodedThemes"})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,sm:4,children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,alignItems:"center",sx:{justifyContent:"flex-end"},children:[(0,g.jsx)(k.Ay,{item:!0,children:(0,g.jsx)(o.A,{underline:"none",sx:c,children:(0,g.jsx)(v,{component:"img",image:N})})}),(0,g.jsx)(k.Ay,{item:!0,children:(0,g.jsx)(o.A,{underline:"none",sx:c,children:(0,g.jsx)(v,{component:"img",image:T})})}),(0,g.jsx)(k.Ay,{item:!0,children:(0,g.jsx)(o.A,{underline:"none",sx:c,children:(0,g.jsx)(v,{component:"img",image:W})})})]})})]})})})]})}},89476:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-footer.2bbba8c7dfab04642dde.png"}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6390],{855:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(7208),i=n(76475),o=n(44414);function s(e){var t,n;let s,a,{children:c,type:l="scale",direction:d="right",offset:m=10,scale:h={hover:1.05,tap:.95}}=e;switch(d){case"up":case"left":s=m,a=0;break;default:s=0,a=m}const[p,u]=(0,r.Y)(s,a),[x,g]=(0,r.Y)(s,a);switch(l){case"rotate":return(0,o.jsx)(i.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:c});case"slide":return"up"===d||"down"===d?(0,o.jsx)(i.P.div,{animate:{y:void 0!==x?x:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:c}):(0,o.jsx)(i.P.div,{animate:{x:void 0!==p?p:""},onHoverEnd:()=>u(),onHoverStart:()=>u(),children:c});default:return"number"===typeof h&&(h={hover:h,tap:h}),(0,o.jsx)(i.P.div,{whileHover:{scale:null===(t=h)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=h)||void 0===n?void 0:n.tap},children:c})}}},18251:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-soc1.a0526d5a1b2b3ad224c3.svg"},22614:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/codedthemes-logo.de6f43fc1a6929defc60.svg"},36080:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(98587),i=n(58168),o=n(9950),s=n(72004),a=n(3484),c=n(89548),l=n(59254),d=n(18463),m=n(52695),h=n(31506),p=n(82053),u=n(45558),x=n(1614);function g(e){return(0,x.Ay)("MuiLink",e)}const A=(0,u.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var y=n(12703),f=n(99269);const b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},v=e=>{let{theme:t,ownerState:n}=e;const r=(e=>b[e]||e)(n.color),i=(0,y.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,y.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,f.X4)(i,.4)};var j=n(44414);const k=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],w=(0,l.Ay)(p.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,c.A)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,i.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:v({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(A.focusVisible)]:{outline:"auto"}})})),C=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiLink"}),{className:l,color:p="primary",component:u="a",onBlur:x,onFocus:A,TypographyClasses:y,underline:f="always",variant:v="inherit",sx:C}=n,M=(0,r.A)(n,k),{isFocusVisibleRef:R,onBlur:S,onFocus:_,ref:D}=(0,m.A)(),[I,F]=o.useState(!1),P=(0,h.A)(t,D),z=(0,i.A)({},n,{color:p,component:u,focusVisible:I,underline:f,variant:v}),L=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root","underline".concat((0,c.A)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,a.A)(o,g,t)})(z);return(0,j.jsx)(w,(0,i.A)({color:p,className:(0,s.A)(L.root,l),classes:y,component:u,onBlur:e=>{S(e),!1===R.current&&F(!1),x&&x(e)},onFocus:e=>{_(e),!0===R.current&&F(!0),A&&A(e)},ref:P,ownerState:z,variant:v,sx:[...Object.keys(b).includes(p)?[]:[{color:p}],...Array.isArray(C)?C:[C]]},M))}))},38569:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-soc3.c7e32ab183d3a3ab9296.svg"},79416:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-soc2.8931ba0f5ca8245dbc06.svg"},81335:(e,t,n)=>{var r={"./codedthemes-logo.svg":22614,"./img-footer.png":89476,"./img-soc1.svg":18251,"./img-soc2.svg":79416,"./img-soc3.svg":38569};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=81335},86390:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(59254),i=n(14857),o=n(36080),s=n(16491),a=n(98587),c=n(58168),l=n(9950),d=n(72004),m=n(3484),h=n(18463),p=n(45558),u=n(1614);function x(e){return(0,u.Ay)("MuiCardMedia",e)}(0,p.A)("MuiCardMedia",["root","media","img"]);var g=n(44414);const A=["children","className","component","image","src","style"],y=(0,r.Ay)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:i}=n;return[t.root,r&&t.media,i&&t.img]}})((e=>{let{ownerState:t}=e;return(0,c.A)({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},t.isMediaComponent&&{width:"100%"},t.isImageComponent&&{objectFit:"cover"})})),f=["video","audio","picture","iframe","img"],b=["picture","img"],v=l.forwardRef((function(e,t){const n=(0,h.b)({props:e,name:"MuiCardMedia"}),{children:r,className:i,component:o="div",image:s,src:l,style:p}=n,u=(0,a.A)(n,A),v=-1!==f.indexOf(o),j=!v&&s?(0,c.A)({backgroundImage:'url("'.concat(s,'")')},p):p,k=(0,c.A)({},n,{component:o,isMediaComponent:v,isImageComponent:-1!==b.indexOf(o)}),w=(e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e,i={root:["root",n&&"media",r&&"img"]};return(0,m.A)(i,x,t)})(k);return(0,g.jsx)(y,(0,c.A)({className:(0,d.A)(w.root,i),as:o,role:!v&&s?"img":void 0,ref:t,style:j,ownerState:k,src:v?s||l:void 0},u,{children:r}))}));var j=n(19808),k=n(60899),w=n(82053),C=n(10226),M=n(93230),R=n(74745),S=n(76475),_=n(16243),D=n(85002);const I={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"};var F=n(61187),P=function(e,t){return l.createElement(F.A,(0,c.A)({},e,{ref:t,icon:I}))};const z=l.forwardRef(P);const L=n.p+"static/media/codedthemes-logo.de6f43fc1a6929defc604ed2bdf77fdd.svg";const N=n.p+"static/media/img-soc1.a0526d5a1b2b3ad224c35fedc8498601.svg";const T=n.p+"static/media/img-soc2.8931ba0f5ca8245dbc0684f455a56d44.svg";const W=n.p+"static/media/img-soc3.c7e32ab183d3a3ab9296b56558562065.svg";var B=n(855);const E=n(81335),H=(0,r.Ay)(o.A)((e=>{let{theme:t}=e;return{color:t.palette.text.secondary,"&:hover":{color:t.palette.primary.main},"&:active":{color:t.palette.primary.main}}})),O=e=>{let{isFull:t}=e;const n=(0,i.A)(),{presetColor:r}=(0,D.A)(),a=n.palette.mode===_.lG.DARK?"text.primary":"background.paper",c={color:n.palette.common.white,fontSize:"0.875rem",fontWeight:400,opacity:"0.6",cursor:"pointer","&:hover":{opacity:"1"}};return(0,g.jsxs)(g.Fragment,{children:[t&&(0,g.jsxs)(s.A,{sx:{position:"relative",bgcolor:n.palette.grey.A700,zIndex:1,mt:{xs:0,md:13.75},pt:{xs:8,sm:7.5,md:18.75},pb:{xs:2.5,md:10},"&:after":{content:'""',position:"absolute",width:"100%",height:"80%",bottom:0,left:0,background:n.direction===_.NL.RTL?"linear-gradient(transparent 100%, rgb(31, 31, 31) 70%)":"linear-gradient(180deg, transparent 0%, ".concat(n.palette.grey.A700," 70%)")}},children:[(0,g.jsx)(v,{component:"img",image:E("./img-footer-".concat(r,".png")),sx:{display:{xs:"none",md:"block"},width:"55%",maxWidth:700,position:"absolute",top:"-28%",right:0}}),(0,g.jsx)(j.A,{children:(0,g.jsx)(k.Ay,{container:!0,alignItems:"center",justifyContent:"space-between",spacing:2,children:(0,g.jsx)(k.Ay,{item:!0,xs:12,md:6,sx:{position:"relative",zIndex:1},children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,sx:{[n.breakpoints.down("md")]:{pr:0,textAlign:"center"}},children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(w.A,{variant:"subtitle1",sx:{color:n.palette.common.white},children:"Roadmap"})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(S.P.div,{initial:{opacity:0,translateY:550},animate:{opacity:1,translateY:0},transition:{type:"spring",stiffness:150,damping:30},children:(0,g.jsx)(w.A,{variant:"h2",sx:{color:n.palette.common.white,fontWeight:700},children:"Upcoming Release"})})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(w.A,{variant:"body1",sx:{color:n.palette.common.white},children:"What is next? Checkout the Upcoming release of Mantis React."})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,sx:{my:2},children:(0,g.jsx)(s.A,{sx:{display:"inline-block"},children:(0,g.jsx)(B.A,{children:(0,g.jsx)(C.A,{size:"large",variant:"contained",endIcon:(0,g.jsx)(z,{}),component:o.A,href:"https://links.codedthemes.com/RXnKQ",target:"_blank",children:"Roadmap"})})})})]})})})})]}),(0,g.jsx)(s.A,{sx:{pt:t?0:10,pb:10,bgcolor:n.palette.grey.A700},children:(0,g.jsx)(j.A,{children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,md:4,children:(0,g.jsx)(S.P.div,{initial:{opacity:0,translateY:550},animate:{opacity:1,translateY:0},transition:{type:"spring",stiffness:150,damping:30},children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(v,{component:"img",image:L,sx:{width:"auto"}})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,children:(0,g.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:400,color:n.palette.common.white},children:"Since 2017, More than 50K+ Developers trust the CodedThemes Digital Product. Mantis React is Manage under their Experienced Team Players."})})]})})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,md:8,children:(0,g.jsxs)(k.Ay,{container:!0,spacing:{xs:5,md:2},children:[(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"Help"}),(0,g.jsxs)(M.A,{spacing:{xs:1.5,md:2.5},children:[(0,g.jsx)(H,{href:"https://links.codedthemes.com/nOuhw",target:"_blank",underline:"none",children:"Blog"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/BQFrl",target:"_blank",underline:"none",children:"Documentation"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/rhzvh",target:"_blank",underline:"none",children:"Change Log"}),(0,g.jsx)(H,{href:"https://codedthemes.support-hub.io/",target:"_blank",underline:"none",children:"Support"})]})]})}),(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"Store Help"}),(0,g.jsxs)(M.A,{spacing:{xs:1.5,md:2.5},children:[(0,g.jsx)(H,{href:"https://mui.com/store/license/",target:"_blank",underline:"none",children:"License"}),(0,g.jsx)(H,{href:"https://mui.com/store/customer-refund-policy/",target:"_blank",underline:"none",children:"Refund Policy"}),(0,g.jsx)(H,{href:"https://support.mui.com/hc/en-us/sections/360002564979-For-customers",target:"_blank",underline:"none",children:"Submit a Request"})]})]})}),(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"Mantis Eco-System"}),(0,g.jsx)(M.A,{spacing:{xs:1.5,md:2.5},children:[{title:"CodeIgniter",link:"https://links.codedthemes.com/dEGKs"},{title:"React MUI",link:"https://links.codedthemes.com/Aprwb"},{title:"Angular",link:"https://links.codedthemes.com/EIvof"},{title:"Bootstrap 5",link:"https://codedthemes.com/item/mantis-bootstrap-admin-dashboard/"},{title:".Net",link:"https://links.codedthemes.com/GPZhD"}].map(((e,t)=>(0,g.jsx)(H,{href:e.link,target:"_blank",underline:"none",children:e.title},t)))})]})}),(0,g.jsx)(k.Ay,{item:!0,xs:6,sm:3,children:(0,g.jsxs)(M.A,{spacing:{xs:3,md:5},children:[(0,g.jsx)(w.A,{variant:"h5",color:a,sx:{fontWeight:500},children:"More Products"}),(0,g.jsxs)(M.A,{spacing:{xs:1.5,md:2.5},children:[(0,g.jsx)(H,{href:"https://links.codedthemes.com/zyACc",target:"_blank",underline:"none",children:"Berry React Material"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/WztNI",target:"_blank",underline:"none",children:"Free Berry React"}),(0,g.jsx)(H,{href:"https://links.codedthemes.com/sTUAK",target:"_blank",underline:"none",children:"Free Mantis React"})]})]})})]})})]})})}),(0,g.jsx)(R.A,{sx:{borderColor:"grey.700"}}),(0,g.jsx)(s.A,{sx:{py:1.5,bgcolor:n.palette.mode===_.lG.DARK?n.palette.grey[50]:n.palette.grey[800]},children:(0,g.jsx)(j.A,{children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,children:[(0,g.jsx)(k.Ay,{item:!0,xs:12,sm:8,children:(0,g.jsx)(w.A,{variant:"subtitle2",color:"secondary",children:"\xa9 Made with love by Team CodedThemes"})}),(0,g.jsx)(k.Ay,{item:!0,xs:12,sm:4,children:(0,g.jsxs)(k.Ay,{container:!0,spacing:2,alignItems:"center",sx:{justifyContent:"flex-end"},children:[(0,g.jsx)(k.Ay,{item:!0,children:(0,g.jsx)(o.A,{underline:"none",sx:c,children:(0,g.jsx)(v,{component:"img",image:N})})}),(0,g.jsx)(k.Ay,{item:!0,children:(0,g.jsx)(o.A,{underline:"none",sx:c,children:(0,g.jsx)(v,{component:"img",image:T})})}),(0,g.jsx)(k.Ay,{item:!0,children:(0,g.jsx)(o.A,{underline:"none",sx:c,children:(0,g.jsx)(v,{component:"img",image:W})})})]})})]})})})]})}},89476:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/img-footer.2bbba8c7dfab04642dde.png"}}]); \ No newline at end of file diff --git a/build/static/js/6597.40beeaea.chunk.js b/build/static/js/6597.40beeaea.chunk.js new file mode 100644 index 0000000..cc7eaa0 --- /dev/null +++ b/build/static/js/6597.40beeaea.chunk.js @@ -0,0 +1 @@ +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6597],{7762:(t,e,r)=>{"use strict";var n=r(24994);e.A=void 0;var a=n(r(79526)),o=r(44414);e.A=(0,a.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},36150:(t,e,r)=>{"use strict";r.d(e,{I:()=>o});var n=r(69347),a=r(1729);function o(t,e){return(0,a.t)(t,n.$,e)}},36220:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,a,o){var i=a.prototype;o.utc=function(t){return new a({date:t,utc:!0,args:arguments})},i.utc=function(e){var r=o(this.toDate(),{locale:this.$L,utc:!0});return e?r.add(this.utcOffset(),t):r},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),s.call(this,t)};var c=i.init;i.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var u=i.utcOffset;i.utcOffset=function(n,a){var o=this.$utils().u;if(o(n))return this.$u?0:o(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&(n=function(t){void 0===t&&(t="");var n=t.match(e);if(!n)return null;var a=(""+n[0]).match(r)||["-",0,0],o=a[0],i=60*+a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(n),null===n))return this;var i=Math.abs(n)<=16?60*n:n,s=this;if(a)return s.$offset=i,s.$u=0===n,s;if(0!==n){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+c,t)).$offset=i,s.$x.$localOffset=c}else s=this.utc();return s};var l=i.format;i.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},i.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(t){return"s"===t&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(t,e,r){if(t&&this.$u===t.$u)return h.call(this,t,e,r);var n=this.local(),a=o(t).local();return h.call(n,a,e,r)}}}()},39919:(t,e,r)=>{"use strict";r.d(e,{A:()=>x});var n=r(98587),a=r(58168),o=r(9950),i=r(72004),s=r(33136),c=r(3484),u=r(97497),l=r(24184),d=r(89548),h=r(18463),f=r(59254),p=r(64099),g=r(89786),v=r(92770);function m(t,e){return void 0!==e&&void 0!==t&&(Array.isArray(e)?e.indexOf(t)>=0:t===e)}var b=r(44414);const A=["value"],y=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],R=(0,f.Ay)(l.A,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e["size".concat((0,d.A)(r.size))]]}})((t=>{let e,{theme:r,ownerState:n}=t,o="standard"===n.color?r.palette.text.primary:r.palette[n.color].main;return r.vars&&(o="standard"===n.color?r.vars.palette.text.primary:r.vars.palette[n.color].main,e="standard"===n.color?r.vars.palette.text.primaryChannel:r.vars.palette[n.color].mainChannel),(0,a.A)({},r.typography.button,{borderRadius:(r.vars||r).shape.borderRadius,padding:11,border:"1px solid ".concat((r.vars||r).palette.divider),color:(r.vars||r).palette.action.active},n.fullWidth&&{width:"100%"},{["&.".concat(p.A.disabled)]:{color:(r.vars||r).palette.action.disabled,border:"1px solid ".concat((r.vars||r).palette.action.disabledBackground)},"&:hover":{textDecoration:"none",backgroundColor:r.vars?"rgba(".concat(r.vars.palette.text.primaryChannel," / ").concat(r.vars.palette.action.hoverOpacity,")"):(0,u.X4)(r.palette.text.primary,r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(p.A.selected)]:{color:o,backgroundColor:r.vars?"rgba(".concat(e," / ").concat(r.vars.palette.action.selectedOpacity,")"):(0,u.X4)(o,r.palette.action.selectedOpacity),"&:hover":{backgroundColor:r.vars?"rgba(".concat(e," / calc(").concat(r.vars.palette.action.selectedOpacity," + ").concat(r.vars.palette.action.hoverOpacity,"))"):(0,u.X4)(o,r.palette.action.selectedOpacity+r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:r.vars?"rgba(".concat(e," / ").concat(r.vars.palette.action.selectedOpacity,")"):(0,u.X4)(o,r.palette.action.selectedOpacity)}}}},"small"===n.size&&{padding:7,fontSize:r.typography.pxToRem(13)},"large"===n.size&&{padding:15,fontSize:r.typography.pxToRem(15)})})),x=o.forwardRef((function(t,e){const r=o.useContext(g.A),{value:u}=r,l=(0,n.A)(r,A),f=o.useContext(v.A),x=(0,s.A)((0,a.A)({},l,{selected:m(t.value,u)}),t),C=(0,h.b)({props:x,name:"MuiToggleButton"}),{children:w,className:B,color:S="standard",disabled:M=!1,disableFocusRipple:$=!1,fullWidth:T=!1,onChange:O,onClick:k,selected:z,size:P="medium",value:D}=C,N=(0,n.A)(C,y),W=(0,a.A)({},C,{color:S,disabled:M,disableFocusRipple:$,fullWidth:T,size:P}),L=(t=>{const{classes:e,fullWidth:r,selected:n,disabled:a,size:o,color:i}=t,s={root:["root",n&&"selected",a&&"disabled",r&&"fullWidth","size".concat((0,d.A)(o)),i]};return(0,c.A)(s,p.J,e)})(W),F=f||"";return(0,b.jsx)(R,(0,a.A)({className:(0,i.A)(l.className,L.root,B,F),disabled:M,focusRipple:!$,ref:e,onClick:t=>{k&&(k(t,D),t.defaultPrevented)||O&&O(t,D)},onChange:O,value:D,ownerState:W,"aria-pressed":z},N,{children:w}))}))},52097:(t,e,r)=>{"use strict";r.d(e,{d7:()=>i});var n=r(9950);function a(t,e,r,a){var o=this,i=(0,n.useRef)(null),s=(0,n.useRef)(0),c=(0,n.useRef)(0),u=(0,n.useRef)(null),l=(0,n.useRef)([]),d=(0,n.useRef)(),h=(0,n.useRef)(),f=(0,n.useRef)(t),p=(0,n.useRef)(!0);f.current=t;var g="undefined"!=typeof window,v=!e&&0!==e&&g;if("function"!=typeof t)throw new TypeError("Expected a function");e=+e||0;var m=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,A="maxWait"in r,y="debounceOnServer"in r&&!!r.debounceOnServer,R=A?Math.max(+r.maxWait||0,e):null;(0,n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]);var x=(0,n.useMemo)((function(){var t=function(t){var e=l.current,r=d.current;return l.current=d.current=null,s.current=t,c.current=c.current||t,h.current=f.current.apply(r,e)},r=function(t,e){v&&cancelAnimationFrame(u.current),u.current=v?requestAnimationFrame(t):setTimeout(t,e)},n=function(t){if(!p.current)return!1;var r=t-i.current;return!i.current||r>=e||r<0||A&&t-s.current>=R},x=function(e){return u.current=null,b&&l.current?t(e):(l.current=d.current=null,h.current)},C=function t(){var a=Date.now();if(m&&c.current===s.current&&w(),n(a))return x(a);if(p.current){var o=e-(a-i.current),u=A?Math.min(o,R-(a-s.current)):o;r(t,u)}},w=function(){a&&a({})},B=function(){if(g||y){var a=Date.now(),c=n(a);if(l.current=[].slice.call(arguments),d.current=o,i.current=a,c){if(!u.current&&p.current)return s.current=i.current,r(C,e),m?t(i.current):h.current;if(A)return r(C,e),t(i.current)}return u.current||r(C,e),h.current}};return B.cancel=function(){u.current&&(v?cancelAnimationFrame(u.current):clearTimeout(u.current)),s.current=0,l.current=i.current=d.current=u.current=null},B.isPending=function(){return!!u.current},B.flush=function(){return u.current?x(Date.now()):h.current},B}),[m,A,e,R,b,v,g,y,a]);return x}function o(t,e){return t===e}function i(t,e,r){var i=r&&r.equalityFn||o,s=(0,n.useRef)(t),c=(0,n.useState)({})[1],u=a((0,n.useCallback)((function(t){s.current=t,c({})}),[c]),e,r,c),l=(0,n.useRef)(t);return i(l.current,t)||(u(t),l.current=t),[s.current,u]}},60010:(t,e,r)=>{"use strict";r.d(e,{q:()=>c});var n=r(89379),a=r(69347),o=r(45247),i=class extends a.${constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,e){super.setOptions((0,n.A)((0,n.A)({},t),{},{behavior:(0,o.PL)()}),e)}getOptimisticResult(t){return t.behavior=(0,o.PL)(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch((0,n.A)((0,n.A)({},t),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(t){return this.fetch((0,n.A)((0,n.A)({},t),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(t,e){var r,a;const{state:i}=t,s=super.createResult(t,e),{isFetching:c,isRefetching:u}=s,l=c&&"forward"===(null===(r=i.fetchMeta)||void 0===r||null===(r=r.fetchMore)||void 0===r?void 0:r.direction),d=c&&"backward"===(null===(a=i.fetchMeta)||void 0===a||null===(a=a.fetchMore)||void 0===a?void 0:a.direction);return(0,n.A)((0,n.A)({},s),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,o.rB)(e,i.data),hasPreviousPage:(0,o.RQ)(e,i.data),isFetchingNextPage:l,isFetchingPreviousPage:d,isRefetching:u&&!l&&!d})}},s=r(1729);function c(t,e){return(0,s.t)(t,i,e)}},64099:(t,e,r)=>{"use strict";r.d(e,{A:()=>i,J:()=>o});var n=r(45558),a=r(1614);function o(t){return(0,a.Ay)("MuiToggleButton",t)}const i=(0,n.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"])},79739:(t,e,r)=>{"use strict";r.d(e,{A:()=>v});var n=r(98587),a=r(58168),o=r(9950),i=r(72004),s=r(3484),c=r(59254),u=r(18463),l=r(45558),d=r(1614);function h(t){return(0,d.Ay)("MuiDialogActions",t)}(0,l.A)("MuiDialogActions",["root","spacing"]);var f=r(44414);const p=["className","disableSpacing"],g=(0,c.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableSpacing&&e.spacing]}})((t=>{let{ownerState:e}=t;return(0,a.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),v=o.forwardRef((function(t,e){const r=(0,u.b)({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:c=!1}=r,l=(0,n.A)(r,p),d=(0,a.A)({},r,{disableSpacing:c}),v=(t=>{const{classes:e,disableSpacing:r}=t,n={root:["root",!r&&"spacing"]};return(0,s.A)(n,h,e)})(d);return(0,f.jsx)(g,(0,a.A)({className:(0,i.A)(v.root,o),ownerState:d,ref:e},l))}))},82917:(t,e,r)=>{"use strict";r.d(e,{A:()=>k});var n=r(57528),a=r(98587),o=r(58168),i=r(9950),s=r(72004),c=r(88283),u=r(3484);function l(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function d(t){return parseFloat(t)}var h=r(97497),f=r(59254),p=r(18463),g=r(45558),v=r(1614);function m(t){return(0,v.Ay)("MuiSkeleton",t)}(0,g.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var b,A,y,R,x=r(44414);const C=["animation","className","component","height","style","variant","width"];let w,B,S,M;const $=(0,c.i7)(w||(w=b||(b=(0,n.A)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),T=(0,c.i7)(B||(B=A||(A=(0,n.A)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),O=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],!1!==r.animation&&e[r.animation],r.hasChildren&&e.withChildren,r.hasChildren&&!r.width&&e.fitContent,r.hasChildren&&!r.height&&e.heightAuto]}})((t=>{let{theme:e,ownerState:r}=t;const n=l(e.shape.borderRadius)||"px",a=d(e.shape.borderRadius);return(0,o.A)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,h.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===r.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(a).concat(n,"/").concat(Math.round(a/.6*10)/10).concat(n),"&:empty:before":{content:'"\\00a0"'}},"circular"===r.variant&&{borderRadius:"50%"},"rounded"===r.variant&&{borderRadius:(e.vars||e).shape.borderRadius},r.hasChildren&&{"& > *":{visibility:"hidden"}},r.hasChildren&&!r.width&&{maxWidth:"fit-content"},r.hasChildren&&!r.height&&{height:"auto"})}),(t=>{let{ownerState:e}=t;return"pulse"===e.animation&&(0,c.AH)(S||(S=y||(y=(0,n.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),$)}),(t=>{let{ownerState:e,theme:r}=t;return"wave"===e.animation&&(0,c.AH)(M||(M=R||(R=(0,n.A)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),T,(r.vars||r).palette.action.hover)})),k=i.forwardRef((function(t,e){const r=(0,p.b)({props:t,name:"MuiSkeleton"}),{animation:n="pulse",className:i,component:c="span",height:l,style:d,variant:h="text",width:f}=r,g=(0,a.A)(r,C),v=(0,o.A)({},r,{animation:n,component:c,variant:h,hasChildren:Boolean(g.children)}),b=(t=>{const{classes:e,variant:r,animation:n,hasChildren:a,width:o,height:i}=t,s={root:["root",r,n,a&&"withChildren",a&&!o&&"fitContent",a&&!i&&"heightAuto"]};return(0,u.A)(s,m,e)})(v);return(0,x.jsx)(O,(0,o.A)({as:c,ref:e,className:(0,s.A)(b.root,i),ownerState:v},g,{style:(0,o.A)({width:f,height:l},d)}))}))},89786:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=r(9950).createContext({})},92770:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=r(9950).createContext(void 0)},94367:(t,e,r)=>{"use strict";r.d(e,{A:()=>R});var n=r(98587),a=r(58168),o=r(9950),i=r(72004),s=r(3484);var c=r(59254),u=r(18463),l=r(89548),d=r(45558),h=r(1614);function f(t){return(0,h.Ay)("MuiToggleButtonGroup",t)}const p=(0,d.A)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]);var g=r(89786),v=r(92770),m=r(64099),b=r(44414);const A=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],y=(0,c.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{["& .".concat(p.grouped)]:e.grouped},{["& .".concat(p.grouped)]:e["grouped".concat((0,l.A)(r.orientation))]},{["& .".concat(p.firstButton)]:e.firstButton},{["& .".concat(p.lastButton)]:e.lastButton},{["& .".concat(p.middleButton)]:e.middleButton},e.root,"vertical"===r.orientation&&e.vertical,r.fullWidth&&e.fullWidth]}})((t=>{let{ownerState:e,theme:r}=t;return(0,a.A)({display:"inline-flex",borderRadius:(r.vars||r).shape.borderRadius},"vertical"===e.orientation&&{flexDirection:"column"},e.fullWidth&&{width:"100%"},{["& .".concat(p.grouped)]:(0,a.A)({},"horizontal"===e.orientation?{["&.".concat(p.selected," + .").concat(p.grouped,".").concat(p.selected)]:{borderLeft:0,marginLeft:0}}:{["&.".concat(p.selected," + .").concat(p.grouped,".").concat(p.selected)]:{borderTop:0,marginTop:0}})},"horizontal"===e.orientation?{["& .".concat(p.firstButton,",& .").concat(p.middleButton)]:{borderTopRightRadius:0,borderBottomRightRadius:0},["& .".concat(p.lastButton,",& .").concat(p.middleButton)]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{["& .".concat(p.firstButton,",& .").concat(p.middleButton)]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},["& .".concat(p.lastButton,",& .").concat(p.middleButton)]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},"horizontal"===e.orientation?{["& .".concat(p.lastButton,".").concat(m.A.disabled,",& .").concat(p.middleButton,".").concat(m.A.disabled)]:{borderLeft:"1px solid transparent"}}:{["& .".concat(p.lastButton,".").concat(m.A.disabled,",& .").concat(p.middleButton,".").concat(m.A.disabled)]:{borderTop:"1px solid transparent"}})})),R=o.forwardRef((function(t,e){const r=(0,u.b)({props:t,name:"MuiToggleButtonGroup"}),{children:c,className:d,color:h="standard",disabled:p=!1,exclusive:m=!1,fullWidth:R=!1,onChange:x,orientation:C="horizontal",size:w="medium",value:B}=r,S=(0,n.A)(r,A),M=(0,a.A)({},r,{disabled:p,fullWidth:R,orientation:C,size:w}),$=(t=>{const{classes:e,orientation:r,fullWidth:n,disabled:a}=t,o={root:["root","vertical"===r&&"vertical",n&&"fullWidth"],grouped:["grouped","grouped".concat((0,l.A)(r)),a&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,s.A)(o,f,e)})(M),T=o.useCallback(((t,e)=>{if(!x)return;const r=B&&B.indexOf(e);let n;B&&r>=0?(n=B.slice(),n.splice(r,1)):n=B?B.concat(e):[e],x(t,n)}),[x,B]),O=o.useCallback(((t,e)=>{x&&x(t,B===e?null:e)}),[x,B]),k=o.useMemo((()=>({className:$.grouped,onChange:m?O:T,value:B,size:w,fullWidth:R,color:h,disabled:p})),[$.grouped,m,O,T,B,w,R,h,p]),z=function(t){return o.Children.toArray(t).filter((t=>o.isValidElement(t)))}(c),P=z.length,D=t=>{const e=0===t,r=t===P-1;return e&&r?"":e?$.firstButton:r?$.lastButton:$.middleButton};return(0,b.jsx)(y,(0,a.A)({role:"group",className:(0,i.A)($.root,d),ref:e,ownerState:M},S,{children:(0,b.jsx)(g.A.Provider,{value:k,children:z.map(((t,e)=>(0,b.jsx)(v.A.Provider,{value:D(e),children:t},e)))})}))}))},97125:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(23235),a=r(44414);const o=(0,n.A)((0,a.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined")}}]); \ No newline at end of file diff --git a/build/static/js/6849.648780b7.chunk.js b/build/static/js/6849.958bd3ec.chunk.js similarity index 99% rename from build/static/js/6849.648780b7.chunk.js rename to build/static/js/6849.958bd3ec.chunk.js index a0a0de6..07a3fea 100644 --- a/build/static/js/6849.648780b7.chunk.js +++ b/build/static/js/6849.958bd3ec.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6849],{23787:(e,t,n)=>{n.d(t,{FG:()=>h,nV:()=>x,pY:()=>p,pg:()=>u});var o=n(89379),r=n(80045),i=n(93230),l=n(2235),a=n(16491),s=n(82053),c=n(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:n=!1,onScroll:l,sx:a}=e,s=(0,r.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},n&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),a)},s),{},{children:t}))},u=e=>{let{accent:t="#662582",header:n,footer:r,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:s,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(a.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(a.A,{sx:{p:1.5,pl:2},children:[n,d,r]})]})},h=e=>{let{children:t,columns:n=2,sx:r}=e;return(0,c.jsx)(a.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(n,", minmax(0, 1fr))"),gap:1,mt:1.25},r),children:t})},p=e=>{let{label:t,value:n,children:o,full:r=!1,align:i="left"}=e;return(0,c.jsxs)(a.A,{sx:{gridColumn:r?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(a.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==n&&void 0!==n?n:"\u2014"})})]})}},27001:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(93230),r=n(16491),i=n(82053),l=n(44414);function a(e){let{title:t,subtitle:n,live:a=!1,action:s}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(r.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),n&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[a&&(0,l.jsx)(r.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:n})]})]}),s&&(0,l.jsx)(r.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:s})]})}},35678:(e,t,n)=>{n.d(t,{A:()=>v});var o=n(9950),r=n(96583),i=n(40033),l=n(82053),a=n(28170),s=n(93230),c=n(82223),d=n(55916),x=n(4159),u=n.n(x),h=n(56712),p=n(81417),m=n(96600),j=n(53132),g=n(94289),b=n(57326),f=n(50624),A=n(44414);const v=e=>{let{open:t,onClose:n,onSelect:x}=e;const[v,w]=(0,o.useState)(null);return(0,A.jsxs)(r.A,{open:t,onClose:n,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(a.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(d.U,{open:t,toggle:n,id:"daterange1",onChange:e=>{w({startDate:u()(e.startDate).format("YYYY-MM-DD"),endDate:u()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.A)(new Date,-1),endDate:(0,h.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.A)(new Date,1),endDate:(0,h.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,j.A)(new Date,-1)),endDate:(0,m.A)((0,j.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,j.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,g.A)(new Date),endDate:(0,b.A)(new Date)},{label:"Last Month",startDate:(0,g.A)((0,f.A)(new Date,-1)),endDate:(0,b.A)((0,f.A)(new Date,-1))}]})}),(0,A.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),n()):n()},children:"OK"})})]})}},36150:(e,t,n)=>{n.d(t,{I:()=>i});var o=n(69347),r=n(1729);function i(e,t){return(0,r.t)(e,o.$,t)}},36803:(e,t,n)=>{n.d(t,{A:()=>x});var o=n(48089),r=n(50704),i=n(93230),l=n(16491),a=n(82053),s=n(82917),c=n(41413),d=n(44414);function x(e){let{title:t,value:n,icon:x,color:u="#662582",caption:h,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(r.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(a.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(s.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(a.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n}),h&&(0,d.jsx)(a.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(u,"14"),color:u,flexShrink:0},children:x})]})})})}},56311:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(89379),r=n(9950),i=n(2660),l=n(2046),a=n(83274),s=n(25333),c=n(97125),d=n(7762),x=n(52097),u=n(44414);const h=e=>{let{value:t,onChange:n,onDebouncedChange:h,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:j}=e;const g=(0,r.useRef)(null),[b]=(0,x.d7)(t,p);return(0,r.useEffect)((()=>{h&&h(b)}),[b,h]),(0,r.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=g.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(i.A,{sx:(0,o.A)({},j),inputRef:g,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>n(e.target.value),startAdornment:(0,u.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(a.A,{title:"Clear",children:(0,u.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>n(""),children:(0,u.jsx)(d.A,{})})})})}},56849:(e,t,n)=>{n.r(t),n.d(t,{default:()=>oe});var o=n(89379),r=n(9950),i=n(26910),l=n(36150),a=n(2235),s=n(41413),c=n(83274),d=n(16491),x=n(82053),u=n(14857),h=n(47223),p=n(60899),m=n(93230),j=n(77922),g=n(29925),b=n(25333),f=n(33738),A=n(1320),v=n(15769),w=n(69780),S=n(9213),y=n(21671),C=n(34075),k=n(74745),z=n(25277),D=n(31222),W=n(4159),I=n.n(W),M=n(81425),Y=n(52351),P=n(35678),N=n(59212),T=n(27001),R=n(36803),F=n(56311),O=n(23787),L=n(96646),K=n(20466),B=n(44414),H=n(36220);I().extend(H);const E={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},Z=(e,t)=>"".concat(e).concat(t),U=e=>Z(e,"08"),X=e=>Z(e,"18"),$=e=>Z(e,"26"),q=e=>Z(e,"55"),V="#662582",G="#9255AB",J=e=>(0,B.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:E.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),_=e=>{let{color:t,selected:n,size:o=24,children:r}=e;return(0,B.jsx)(s.A,{sx:{width:o,height:o,bgcolor:n?t:X(t),color:n?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:r})},Q=e=>{let{color:t,icon:n,label:o,tooltip:r,minWidth:i=80}=e;return(0,B.jsx)(c.A,{title:r||"",placement:"top",children:(0,B.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(q(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[n,o]})})},ee=e=>{let{value:t,color:n="#ef4444",icon:o}=e;const r=Number(t)||0;return 0===r?(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,fontWeight:700},children:"0"}):(0,B.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(q(n)),color:n,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[o,r]})},te=e=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($(e))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}});function ne(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function oe(){const e=(0,u.A)(),t=(0,h.A)(e.breakpoints.down("md")),n=(0,r.useRef)(null),W=(0,r.useRef)(null),[H,Z]=(0,r.useState)(0),[oe,re]=(0,r.useState)(I()().format("YYYY-MM-DD")),[ie,le]=(0,r.useState)(I()().format("YYYY-MM-DD")),[ae,se]=(0,r.useState)("All"),[ce,de]=(0,r.useState)(!1),[xe,ue]=(0,r.useState)(null),[he,pe]=(0,r.useState)("Today"),[me,je]=(0,r.useState)([]),[ge,be]=(0,r.useState)(!1),[fe,Ae]=(0,r.useState)(0),[ve,we]=(0,r.useState)(0),[Se,ye]=(0,r.useState)(null),[Ce,ke]=(0,r.useState)(null),[ze,De]=(0,r.useState)(""),[We,Ie]=(0,r.useState)(""),[,Me]=(0,r.useState)(0);(0,r.useEffect)((()=>{we(0),ye(null),Ae(0),ke(null),ue(null)}),[H]),(0,r.useEffect)((()=>{Ae(0),ke(null),ue(null)}),[ve]);const{data:Ye,isLoading:Pe,isError:Ne,error:Te}=(0,l.I)({queryKey:[H,ve,fe,oe,ie],queryFn:ve?M.U6:M.DK}),{data:Re}=(0,l.I)({queryKey:["tenantlist",H],queryFn:()=>(0,M.Mn)(H),enabled:0!==H}),{data:Fe}=(0,l.I)({queryKey:["gettenantlocations",ve],queryFn:()=>(0,M.DL)(ve),enabled:0!==ve}),Oe=(0,r.useMemo)((()=>Array.isArray(Ye)?Ye:[]),[Ye]),Le=(0,r.useMemo)((()=>{if(!We)return Oe;const e=We.toLowerCase().trim();return Oe.filter((t=>[t.tenantname,t.locationname,String(t.tenantid||""),String(t.locationid||"")].filter(Boolean).some((t=>String(t).toLowerCase().includes(e)))))}),[Oe,We]),Ke=(0,r.useMemo)((()=>Le.reduce(((e,t)=>(e.totalOrders+=Number(t.totalorders)||0,e.orderPend+=Number(t.Orderspending)||0,e.orderComplete+=Number(t.orderscompleted)||0,e.orderCancel+=Number(t.orderscancelled)||0,e.deliPend+=Number(t.deliveriespending)||0,e.deliComplete+=Number(t.deliveriescompleted)||0,e.deliCancel+=Number(t.deliveriescancelled)||0,e.collection+=Number(t.collectionamt)||0,e.kms+=Number(t.kms)||0,e.cumulativekms+=Number(t.cumulativekms)||0,e.amount+=Math.max(Number(t.charges)||0,Number(t.deliveryamt)||0),e)),{totalOrders:0,orderPend:0,orderComplete:0,orderCancel:0,deliPend:0,deliComplete:0,deliCancel:0,collection:0,kms:0,cumulativekms:0,amount:0})),[Le]),Be=async e=>{be(!0);try{var t;const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getuserreportsummary/?tenantid=").concat(e,"&fromdate=").concat(oe,"&todate=").concat(ie));je(Array.isArray(null===(t=n.data)||void 0===t?void 0:t.details)?n.data.details:[])}catch(n){(0,K.k)((null===n||void 0===n?void 0:n.message)||"Failed to load rider breakdown","error",2e3),je([])}finally{be(!1)}},He=async e=>{be(!0);try{var t;const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getriderlocationsummary/?tenantid=").concat(ve,"&locationid=").concat(e,"&fromdate=").concat(oe,"&todate=").concat(ie));je(Array.isArray(null===(t=n.data)||void 0===t?void 0:t.details)?n.data.details:[])}catch(n){(0,K.k)((null===n||void 0===n?void 0:n.message)||"Failed to load rider breakdown","error",2e3),je([])}finally{be(!1)}};Ne&&console.warn("ordersSummary error:",null===Te||void 0===Te?void 0:Te.message);const Ee=[{key:"orders",label:"Total Orders",color:V,icon:D.HU2,value:Ke.totalOrders},{key:"pending",label:"Orders Pending",color:"#f59e0b",icon:D.G6c,value:Ke.orderPend},{key:"completed",label:"Orders Completed",color:"#10b981",icon:D.cAP,value:Ke.orderComplete},{key:"amount",label:"Total Amount",color:"#0ea5e9",icon:D.S75,value:ne(Ke.amount)}],Ze=Boolean(ve);return(0,B.jsxs)(B.Fragment,{children:[(ge||Pe)&&(0,B.jsx)(Y.A,{}),(0,B.jsx)(T.A,{title:"Orders Summary",subtitle:"Live \xb7 ".concat(ae||"All Zones"," \xb7 ").concat(he),live:!0,action:(0,B.jsx)(N.A,{ref:n,locaName:ae,setAppId:Z,setLocoName:se,setPage:Me,pill:!0,accentColor:V,icon:(0,B.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:J,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,B.jsx)(p.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ee.map((e=>{var t;const n=e.icon;return(0,B.jsx)(p.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,B.jsx)(R.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,B.jsx)(n,{size:20}),color:e.color,loading:Pe})},e.key)}))}),(0,B.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:E.radiusCard/8,borderTopRightRadius:E.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:E.borderSubtle,borderBottom:0,background:"#fff"},children:(0,B.jsxs)(m.A,{direction:{xs:"column",md:"row"},alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,B.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,B.jsxs)(d.A,{onClick:()=>de(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:U("#f59e0b"),border:"1.5px solid ".concat(q("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat($("#f59e0b"))}},children:[(0,B.jsx)(D.Ki0,{size:14}),"Orders \xb7 ",he," \xb7 ",I()(oe).format("DD/MM/YY")," \u2013 ",I()(ie).format("DD/MM/YY")]})}),(0,B.jsx)(j.A,{options:Re||[],value:Se,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||(null===e||void 0===e?void 0:e.label)||"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.tenantid)===(null===t||void 0===t?void 0:t.tenantid),PaperComponent:J,sx:(0,o.A)({minWidth:{xs:"100%",sm:220}},te(V)),onOpen:e=>{H||(e.preventDefault(),(0,K.k)("Please select a Zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(we((null===t||void 0===t?void 0:t.tenantid)||0),ye(t),Ae((null===t||void 0===t?void 0:t.locationid)||0),ke(null)):(we(0),ye(null),Ae(0),ke(null))},renderInput:e=>(0,B.jsx)(g.A,(0,o.A)((0,o.A)({},e),{},{inputRef:W,placeholder:"Select Tenant",size:"small",InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,B.jsx)(_,{color:V,size:24,selected:Boolean(Se),children:(0,B.jsx)(D.nZo,{size:14})}),e.InputProps.startAdornment]})})}))}),(0,B.jsx)(j.A,{options:Fe||[],value:Ce,getOptionLabel:e=>null!==e&&void 0!==e&&e.locationname?"".concat(e.locationname).concat(e.suburb?" (".concat(e.suburb,")"):""):"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.locationid)===(null===t||void 0===t?void 0:t.locationid),PaperComponent:J,sx:(0,o.A)({minWidth:{xs:"100%",sm:220}},te("#0ea5e9")),onOpen:e=>{H||ve?ve||(e.preventDefault(),(0,K.k)("Please select a Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=W.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,K.k)("Please select Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(Ae((null===t||void 0===t?void 0:t.locationid)||0),ke(t)):(Ae(0),ke(null))},renderInput:e=>(0,B.jsx)(g.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,B.jsx)(_,{color:"#0ea5e9",size:24,selected:Boolean(Ce),children:(0,B.jsx)(D.gwi,{size:14})}),e.InputProps.startAdornment]})})}))})]}),(0,B.jsx)(d.A,{sx:{width:{xs:"100%",md:280,lg:320},flex:{xs:"1 1 100%",md:"0 0 auto"}},children:(0,B.jsx)(F.A,{value:ze,onChange:De,onDebouncedChange:Ie,placeholder:"Search ".concat(Ze?"locations":"tenants"," (ctrl+k)"),sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($(V))}}})})]})}),(0,B.jsxs)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:E.radiusCard/8,borderBottomRightRadius:E.radiusCard/8,border:"1px solid",borderColor:E.borderSubtle,overflow:"hidden",background:"#fff"},children:[t?(0,B.jsxs)(B.Fragment,{children:[Pe&&(0,B.jsx)(O.nV,{children:[0,1,2,3].map((e=>(0,B.jsx)(O.pg,{accent:E.borderSubtle,children:(0,B.jsx)(d.A,{sx:{height:96}})},e)))}),!Pe&&0===Le.length&&(0,B.jsxs)(m.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,B.jsx)(s.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:E.textMuted},children:(0,B.jsx)(D.Z2J,{size:28})}),(0,B.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:E.textPrimary},children:["No ",Ze?"locations":"tenants"," to show"]}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary,textAlign:"center",maxWidth:360},children:We?"Try a different keyword.":Ne?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]}),!Pe&&Le.length>0&&(0,B.jsx)(O.nV,{children:Le.map(((e,t)=>{const n=Ze?e.locationname:e.tenantname,o=xe===n,r=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),i=Ze?"#0ea5e9":V;return(0,B.jsxs)(O.pg,{accent:i,selected:o,header:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,B.jsx)(_,{color:i,size:36,children:Ze?(0,B.jsx)(D.gwi,{size:18}):(0,B.jsx)(D.nZo,{size:18})}),(0,B.jsxs)(m.A,{sx:{minWidth:0,flex:1},children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary},noWrap:!0,children:(Ze?e.locationname:e.tenantname)||"\u2014"}),(0,B.jsxs)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:["ID #",Ze?e.locationid:e.tenantid]})]}),(0,B.jsx)(c.A,{title:o?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,B.jsx)(b.A,{size:"small",onClick:()=>{const t=!o;ue(t?n:null),t&&(je([]),Ze?He(e.locationid):Be(e.tenantid))},sx:{flexShrink:0,bgcolor:o?V:X(V),color:o?"#fff":V,border:"1px solid ".concat(q(V)),"&:hover":{bgcolor:V,color:"#fff"}},children:o?(0,B.jsx)(D.Xbk,{size:16}):(0,B.jsx)(D.j1Q,{size:16})})})]}),children:[(0,B.jsxs)(O.FG,{columns:3,children:[(0,B.jsx)(O.pY,{label:"All",align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:V,icon:(0,B.jsx)(D.F6S,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Pending",align:"center",children:(0,B.jsx)(ee,{value:e.Orderspending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.orderscancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Completed",align:"center",children:(0,B.jsx)(ee,{value:e.orderscompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Pending",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Completed",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(O.pY,{label:"Collection",align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,B.jsx)(O.pY,{label:"Amount",align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:11}),label:ne(r).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,B.jsx)(O.pY,{label:"KMS",align:"center",children:(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,B.jsx)(O.pY,{label:"Actual KMS",align:"center",children:(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})})]}),(0,B.jsx)(f.A,{in:o,timeout:"auto",unmountOnExit:!0,children:(0,B.jsxs)(d.A,{sx:{mt:1.5},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,B.jsx)(_,{color:V,size:24,selected:!0,children:(0,B.jsx)(D.Itr,{size:12})}),(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:E.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Rider Breakdown"})]}),ge||me&&0!==me.length?(0,B.jsx)(m.A,{spacing:1,children:me.map(((e,t)=>{const n=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(O.pg,{accent:V,children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,B.jsx)(_,{color:V,size:28,children:(0,B.jsx)(D.LTk,{size:14})}),(0,B.jsxs)(m.A,{sx:{minWidth:0},children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary},noWrap:!0,children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]}),(0,B.jsxs)(O.FG,{columns:3,children:[(0,B.jsx)(O.pY,{label:"Orders",align:"center",children:(0,B.jsx)(ee,{value:e.orderscreated,color:V,icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(O.pY,{label:"Deliveries",align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:"#0ea5e9",icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(O.pY,{label:"Pending",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:10})})}),(0,B.jsx)(O.pY,{label:"Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:10})})}),(0,B.jsx)(O.pY,{label:"Completed",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:10})})}),(0,B.jsx)(O.pY,{label:"Collection",align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,B.jsx)(O.pY,{label:"KMS",align:"center",children:(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,B.jsx)(O.pY,{label:"Actual KMS",align:"center",children:(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,B.jsx)(O.pY,{label:"Amount",align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:10}),label:ne(n).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.userid,"-").concat(t))}))}):(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,display:"block",py:1,textAlign:"center"},children:"No rider activity for this row."})]})})]},"".concat(n,"-").concat(t))}))})]}):(0,B.jsx)(A.A,{sx:{maxHeight:{xs:"calc(100vh - 280px)",md:"calc(100vh - 240px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:q(V),borderRadius:8,"&:hover":{backgroundColor:V}},"&::-webkit-scrollbar-track":{backgroundColor:E.surfaceAlt}},children:(0,B.jsxs)(v.A,{stickyHeader:!0,sx:{minWidth:{xs:1080,md:1200}},children:[(0,B.jsxs)(w.A,{children:[(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,B.jsx)(y.A,{rowSpan:2,children:"#"}),(0,B.jsx)(y.A,{rowSpan:2,children:Ze?"Location":"Tenant"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"All"}),(0,B.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#ef4444 !important"},children:"Orders"}),(0,B.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#10b981 !important"},children:"Deliveries"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"Collection"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"KMS / Actual"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"Amount"}),(0,B.jsx)(y.A,{align:"right",rowSpan:2,children:"Action"})]}),(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:{xs:10,md:10.5},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:{xs:.75,md:1},px:{xs:1,md:1.5}}},children:[(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#10b981 !important"},children:"Completed"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#10b981 !important"},children:"Completed"})]})]}),(0,B.jsxs)(C.A,{children:[Pe&&(0,B.jsx)(L.r,{col:9}),!Pe&&0===Le.length&&(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:13,sx:{py:6},children:(0,B.jsxs)(m.A,{alignItems:"center",spacing:1.5,children:[(0,B.jsx)(s.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:E.textMuted},children:(0,B.jsx)(D.Z2J,{size:28})}),(0,B.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:E.textPrimary},children:["No ",Ze?"locations":"tenants"," to show"]}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary,textAlign:"center",maxWidth:360},children:We?"Try a different keyword.":Ne?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]})})}),Le.map(((e,t)=>{const n=Ze?e.locationname:e.tenantname,o=xe===n,i=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(r.Fragment,{children:[(0,B.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:o?"none":"1px solid ".concat(E.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:o?"#fff":E.surfaceAlt},bgcolor:o?U(V):"transparent"},children:[(0,B.jsx)(y.A,{children:(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textMuted},children:String(t+1).padStart(2,"0")})}),(0,B.jsx)(y.A,{children:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,B.jsx)(_,{color:Ze?"#0ea5e9":V,size:36,children:Ze?(0,B.jsx)(D.gwi,{size:18}):(0,B.jsx)(D.nZo,{size:18})}),(0,B.jsxs)(m.A,{children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary,whiteSpace:"nowrap"},children:(Ze?e.locationname:e.tenantname)||"\u2014"}),(0,B.jsxs)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:["ID #",Ze?e.locationid:e.tenantid]})]})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:V,icon:(0,B.jsx)(D.F6S,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.Orderspending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:11}),label:ne(i).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,B.jsx)(y.A,{align:"right",children:(0,B.jsx)(c.A,{title:o?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,B.jsx)(b.A,{size:"small",onClick:()=>{const t=!o;ue(t?n:null),t&&(je([]),Ze?He(e.locationid):Be(e.tenantid))},sx:{bgcolor:o?V:X(V),color:o?"#fff":V,border:"1px solid ".concat(q(V)),"&:hover":{bgcolor:V,color:"#fff"}},children:o?(0,B.jsx)(D.Xbk,{size:16}):(0,B.jsx)(D.j1Q,{size:16})})})})]}),o&&(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:13,sx:{p:0,borderBottom:"1px solid ".concat(E.divider),bgcolor:U(V)},children:(0,B.jsx)(f.A,{in:o,timeout:"auto",unmountOnExit:!0,children:(0,B.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,B.jsxs)(a.A,{elevation:0,sx:{borderRadius:E.radiusCard/8,border:"1px solid",borderColor:E.borderSubtle,overflow:"hidden",boxShadow:E.shadowSoft},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"#ffffff",borderBottom:"1px solid ".concat(E.borderSubtle)},children:[(0,B.jsx)(_,{color:V,size:28,selected:!0,children:(0,B.jsx)(D.Itr,{size:14})}),(0,B.jsxs)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Rider Breakdown \xb7 ",Ze?e.locationname:e.tenantname]})]}),(0,B.jsxs)(v.A,{size:"small",children:[(0,B.jsx)(w.A,{children:(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:1,px:1.5}},children:[(0,B.jsx)(y.A,{children:"#"}),(0,B.jsx)(y.A,{children:"Rider"}),(0,B.jsx)(y.A,{align:"center",children:"Orders"}),(0,B.jsx)(y.A,{align:"center",children:"Deliveries"}),(0,B.jsx)(y.A,{align:"center",children:"Pending"}),(0,B.jsx)(y.A,{align:"center",children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",children:"Completed"}),(0,B.jsx)(y.A,{align:"center",children:"Collection"}),(0,B.jsx)(y.A,{align:"center",children:"KMS / Actual"}),(0,B.jsx)(y.A,{align:"center",children:"Amount"})]})}),(0,B.jsxs)(C.A,{children:[ge&&(0,B.jsx)(L.r,{col:6}),ge||me&&0!==me.length?me.map(((e,t)=>{const n=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(E.divider),py:1,px:1.5},"&:hover":{backgroundColor:E.surfaceAlt}},children:[(0,B.jsx)(y.A,{children:(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textMuted},children:String(t+1).padStart(2,"0")})}),(0,B.jsx)(y.A,{children:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,B.jsx)(_,{color:V,size:28,children:(0,B.jsx)(D.LTk,{size:14})}),(0,B.jsxs)(m.A,{children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary,whiteSpace:"nowrap"},children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscreated,color:V,icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:"#0ea5e9",icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:10}),label:ne(n).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.userid,"-").concat(t))})):(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:10,sx:{py:3},children:(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,textAlign:"center",display:"block"},children:"No rider activity for this row."})})})]})]})]})})})})})]},"".concat(n,"-").concat(t))}))]})]})}),Le.length>0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(k.A,{}),(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1.5,flexWrap:"wrap",sx:{px:2,py:1.5,background:"#ffffff"},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,flexWrap:"wrap",children:[(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:E.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.totalOrders," orders"),sx:{fontWeight:700,bgcolor:X(V),color:V,border:"1px solid ".concat(q(V))}}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.deliComplete," delivered"),sx:{fontWeight:700,bgcolor:X("#10b981"),color:"#10b981",border:"1px solid ".concat(q("#10b981"))}}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.deliPend," pending"),sx:{fontWeight:700,bgcolor:X("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(q("#f59e0b"))}})]}),(0,B.jsx)(z.A,{label:ne(Ke.amount),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(V," 0%, ").concat(G," 100%)"),boxShadow:"0 6px 16px ".concat($(V))}})]})]})]}),(0,B.jsx)(P.A,{open:ce,onClose:()=>de(!1),onSelect:e=>{re(e.startDate),le(e.endDate),pe(e.label)}})]})}},59212:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(89379),r=n(9950),i=n(93230),l=n(41413),a=n(77922),s=n(29925),c=n(26910),d=n(31222),x=n(44414);const u=(0,r.forwardRef)(((e,t)=>{let{setAppId:n,setLocoName:u,setPage:h,sx:p,textfeildSx:m,textfieldSx:j,pill:g=!1,accentColor:b="#6366f1",icon:f,placeholder:A="Select Zone",paperComponent:v}=e;const[w,S]=(0,r.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,r.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(b).concat(e),C=y("26"),k=y("18"),z=g?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:b,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=g&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:k,color:b,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(a.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===n||void 0===n||n(0),null===u||void 0===u||u(""),null===h||void 0===h||h(0)):t&&(null===n||void 0===n||n(t.applocationid),null===u||void 0===u||u(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>g?(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},z),j||m||{})})):(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},j||m||{})}))})}))},96646:(e,t,n)=>{n.d(t,{r:()=>s});var o=n(9213),r=n(21671),i=n(82917),l=n(93230),a=n(44414);const s=e=>{let{rowsPerPage:t=5,col:n=1}=e;return(0,a.jsx)(a.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,a.jsxs)(o.A,{children:[(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:n}).map(((e,t)=>(0,a.jsx)(r.A,{children:(0,a.jsxs)(l.A,{spacing:.5,children:[(0,a.jsx)(i.A,{variant:"text",width:100}),(0,a.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"text",width:150})}),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,a.jsx)(r.A,{align:"center",children:(0,a.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,a.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,a.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6849],{23787:(e,t,n)=>{n.d(t,{FG:()=>h,nV:()=>x,pY:()=>p,pg:()=>u});var o=n(89379),r=n(80045),i=n(93230),l=n(2235),a=n(16491),s=n(82053),c=n(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:n=!1,onScroll:l,sx:a}=e,s=(0,r.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},n&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),a)},s),{},{children:t}))},u=e=>{let{accent:t="#662582",header:n,footer:r,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:s,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(a.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(a.A,{sx:{p:1.5,pl:2},children:[n,d,r]})]})},h=e=>{let{children:t,columns:n=2,sx:r}=e;return(0,c.jsx)(a.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(n,", minmax(0, 1fr))"),gap:1,mt:1.25},r),children:t})},p=e=>{let{label:t,value:n,children:o,full:r=!1,align:i="left"}=e;return(0,c.jsxs)(a.A,{sx:{gridColumn:r?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(a.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==n&&void 0!==n?n:"\u2014"})})]})}},27001:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(93230),r=n(16491),i=n(82053),l=n(44414);function a(e){let{title:t,subtitle:n,live:a=!1,action:s}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(r.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),n&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[a&&(0,l.jsx)(r.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:n})]})]}),s&&(0,l.jsx)(r.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:s})]})}},35678:(e,t,n)=>{n.d(t,{A:()=>v});var o=n(9950),r=n(96583),i=n(40033),l=n(82053),a=n(28170),s=n(93230),c=n(10226),d=n(55916),x=n(4159),u=n.n(x),h=n(56712),p=n(81417),m=n(96600),j=n(53132),g=n(94289),b=n(57326),f=n(50624),A=n(44414);const v=e=>{let{open:t,onClose:n,onSelect:x}=e;const[v,w]=(0,o.useState)(null);return(0,A.jsxs)(r.A,{open:t,onClose:n,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(a.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(d.U,{open:t,toggle:n,id:"daterange1",onChange:e=>{w({startDate:u()(e.startDate).format("YYYY-MM-DD"),endDate:u()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.A)(new Date,-1),endDate:(0,h.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.A)(new Date,1),endDate:(0,h.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,j.A)(new Date,-1)),endDate:(0,m.A)((0,j.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,j.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,g.A)(new Date),endDate:(0,b.A)(new Date)},{label:"Last Month",startDate:(0,g.A)((0,f.A)(new Date,-1)),endDate:(0,b.A)((0,f.A)(new Date,-1))}]})}),(0,A.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),n()):n()},children:"OK"})})]})}},36150:(e,t,n)=>{n.d(t,{I:()=>i});var o=n(69347),r=n(1729);function i(e,t){return(0,r.t)(e,o.$,t)}},36803:(e,t,n)=>{n.d(t,{A:()=>x});var o=n(48089),r=n(50704),i=n(93230),l=n(16491),a=n(82053),s=n(82917),c=n(41413),d=n(44414);function x(e){let{title:t,value:n,icon:x,color:u="#662582",caption:h,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(r.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(a.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(s.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(a.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n}),h&&(0,d.jsx)(a.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(u,"14"),color:u,flexShrink:0},children:x})]})})})}},56311:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(89379),r=n(9950),i=n(2660),l=n(2046),a=n(83274),s=n(25333),c=n(97125),d=n(7762),x=n(52097),u=n(44414);const h=e=>{let{value:t,onChange:n,onDebouncedChange:h,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:j}=e;const g=(0,r.useRef)(null),[b]=(0,x.d7)(t,p);return(0,r.useEffect)((()=>{h&&h(b)}),[b,h]),(0,r.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=g.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(i.A,{sx:(0,o.A)({},j),inputRef:g,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>n(e.target.value),startAdornment:(0,u.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(a.A,{title:"Clear",children:(0,u.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>n(""),children:(0,u.jsx)(d.A,{})})})})}},56849:(e,t,n)=>{n.r(t),n.d(t,{default:()=>oe});var o=n(89379),r=n(9950),i=n(26910),l=n(36150),a=n(2235),s=n(41413),c=n(83274),d=n(16491),x=n(82053),u=n(14857),h=n(47223),p=n(60899),m=n(93230),j=n(77922),g=n(29925),b=n(25333),f=n(33738),A=n(1320),v=n(15769),w=n(69780),S=n(9213),y=n(21671),C=n(34075),k=n(74745),z=n(25277),D=n(31222),W=n(4159),I=n.n(W),M=n(81425),Y=n(52351),P=n(35678),N=n(59212),T=n(27001),R=n(36803),F=n(56311),O=n(23787),L=n(96646),K=n(20466),B=n(44414),H=n(36220);I().extend(H);const E={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},Z=(e,t)=>"".concat(e).concat(t),U=e=>Z(e,"08"),X=e=>Z(e,"18"),$=e=>Z(e,"26"),q=e=>Z(e,"55"),V="#662582",G="#9255AB",J=e=>(0,B.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:E.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),_=e=>{let{color:t,selected:n,size:o=24,children:r}=e;return(0,B.jsx)(s.A,{sx:{width:o,height:o,bgcolor:n?t:X(t),color:n?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:r})},Q=e=>{let{color:t,icon:n,label:o,tooltip:r,minWidth:i=80}=e;return(0,B.jsx)(c.A,{title:r||"",placement:"top",children:(0,B.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(q(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[n,o]})})},ee=e=>{let{value:t,color:n="#ef4444",icon:o}=e;const r=Number(t)||0;return 0===r?(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,fontWeight:700},children:"0"}):(0,B.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(q(n)),color:n,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[o,r]})},te=e=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($(e))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}});function ne(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function oe(){const e=(0,u.A)(),t=(0,h.A)(e.breakpoints.down("md")),n=(0,r.useRef)(null),W=(0,r.useRef)(null),[H,Z]=(0,r.useState)(0),[oe,re]=(0,r.useState)(I()().format("YYYY-MM-DD")),[ie,le]=(0,r.useState)(I()().format("YYYY-MM-DD")),[ae,se]=(0,r.useState)("All"),[ce,de]=(0,r.useState)(!1),[xe,ue]=(0,r.useState)(null),[he,pe]=(0,r.useState)("Today"),[me,je]=(0,r.useState)([]),[ge,be]=(0,r.useState)(!1),[fe,Ae]=(0,r.useState)(0),[ve,we]=(0,r.useState)(0),[Se,ye]=(0,r.useState)(null),[Ce,ke]=(0,r.useState)(null),[ze,De]=(0,r.useState)(""),[We,Ie]=(0,r.useState)(""),[,Me]=(0,r.useState)(0);(0,r.useEffect)((()=>{we(0),ye(null),Ae(0),ke(null),ue(null)}),[H]),(0,r.useEffect)((()=>{Ae(0),ke(null),ue(null)}),[ve]);const{data:Ye,isLoading:Pe,isError:Ne,error:Te}=(0,l.I)({queryKey:[H,ve,fe,oe,ie],queryFn:ve?M.U6:M.DK}),{data:Re}=(0,l.I)({queryKey:["tenantlist",H],queryFn:()=>(0,M.Mn)(H),enabled:0!==H}),{data:Fe}=(0,l.I)({queryKey:["gettenantlocations",ve],queryFn:()=>(0,M.DL)(ve),enabled:0!==ve}),Oe=(0,r.useMemo)((()=>Array.isArray(Ye)?Ye:[]),[Ye]),Le=(0,r.useMemo)((()=>{if(!We)return Oe;const e=We.toLowerCase().trim();return Oe.filter((t=>[t.tenantname,t.locationname,String(t.tenantid||""),String(t.locationid||"")].filter(Boolean).some((t=>String(t).toLowerCase().includes(e)))))}),[Oe,We]),Ke=(0,r.useMemo)((()=>Le.reduce(((e,t)=>(e.totalOrders+=Number(t.totalorders)||0,e.orderPend+=Number(t.Orderspending)||0,e.orderComplete+=Number(t.orderscompleted)||0,e.orderCancel+=Number(t.orderscancelled)||0,e.deliPend+=Number(t.deliveriespending)||0,e.deliComplete+=Number(t.deliveriescompleted)||0,e.deliCancel+=Number(t.deliveriescancelled)||0,e.collection+=Number(t.collectionamt)||0,e.kms+=Number(t.kms)||0,e.cumulativekms+=Number(t.cumulativekms)||0,e.amount+=Math.max(Number(t.charges)||0,Number(t.deliveryamt)||0),e)),{totalOrders:0,orderPend:0,orderComplete:0,orderCancel:0,deliPend:0,deliComplete:0,deliCancel:0,collection:0,kms:0,cumulativekms:0,amount:0})),[Le]),Be=async e=>{be(!0);try{var t;const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getuserreportsummary/?tenantid=").concat(e,"&fromdate=").concat(oe,"&todate=").concat(ie));je(Array.isArray(null===(t=n.data)||void 0===t?void 0:t.details)?n.data.details:[])}catch(n){(0,K.k)((null===n||void 0===n?void 0:n.message)||"Failed to load rider breakdown","error",2e3),je([])}finally{be(!1)}},He=async e=>{be(!0);try{var t;const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getriderlocationsummary/?tenantid=").concat(ve,"&locationid=").concat(e,"&fromdate=").concat(oe,"&todate=").concat(ie));je(Array.isArray(null===(t=n.data)||void 0===t?void 0:t.details)?n.data.details:[])}catch(n){(0,K.k)((null===n||void 0===n?void 0:n.message)||"Failed to load rider breakdown","error",2e3),je([])}finally{be(!1)}};Ne&&console.warn("ordersSummary error:",null===Te||void 0===Te?void 0:Te.message);const Ee=[{key:"orders",label:"Total Orders",color:V,icon:D.HU2,value:Ke.totalOrders},{key:"pending",label:"Orders Pending",color:"#f59e0b",icon:D.G6c,value:Ke.orderPend},{key:"completed",label:"Orders Completed",color:"#10b981",icon:D.cAP,value:Ke.orderComplete},{key:"amount",label:"Total Amount",color:"#0ea5e9",icon:D.S75,value:ne(Ke.amount)}],Ze=Boolean(ve);return(0,B.jsxs)(B.Fragment,{children:[(ge||Pe)&&(0,B.jsx)(Y.A,{}),(0,B.jsx)(T.A,{title:"Orders Summary",subtitle:"Live \xb7 ".concat(ae||"All Zones"," \xb7 ").concat(he),live:!0,action:(0,B.jsx)(N.A,{ref:n,locaName:ae,setAppId:Z,setLocoName:se,setPage:Me,pill:!0,accentColor:V,icon:(0,B.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:J,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,B.jsx)(p.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ee.map((e=>{var t;const n=e.icon;return(0,B.jsx)(p.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,B.jsx)(R.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,B.jsx)(n,{size:20}),color:e.color,loading:Pe})},e.key)}))}),(0,B.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:E.radiusCard/8,borderTopRightRadius:E.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:E.borderSubtle,borderBottom:0,background:"#fff"},children:(0,B.jsxs)(m.A,{direction:{xs:"column",md:"row"},alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,B.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,B.jsxs)(d.A,{onClick:()=>de(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:U("#f59e0b"),border:"1.5px solid ".concat(q("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat($("#f59e0b"))}},children:[(0,B.jsx)(D.Ki0,{size:14}),"Orders \xb7 ",he," \xb7 ",I()(oe).format("DD/MM/YY")," \u2013 ",I()(ie).format("DD/MM/YY")]})}),(0,B.jsx)(j.A,{options:Re||[],value:Se,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||(null===e||void 0===e?void 0:e.label)||"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.tenantid)===(null===t||void 0===t?void 0:t.tenantid),PaperComponent:J,sx:(0,o.A)({minWidth:{xs:"100%",sm:220}},te(V)),onOpen:e=>{H||(e.preventDefault(),(0,K.k)("Please select a Zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(we((null===t||void 0===t?void 0:t.tenantid)||0),ye(t),Ae((null===t||void 0===t?void 0:t.locationid)||0),ke(null)):(we(0),ye(null),Ae(0),ke(null))},renderInput:e=>(0,B.jsx)(g.A,(0,o.A)((0,o.A)({},e),{},{inputRef:W,placeholder:"Select Tenant",size:"small",InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,B.jsx)(_,{color:V,size:24,selected:Boolean(Se),children:(0,B.jsx)(D.nZo,{size:14})}),e.InputProps.startAdornment]})})}))}),(0,B.jsx)(j.A,{options:Fe||[],value:Ce,getOptionLabel:e=>null!==e&&void 0!==e&&e.locationname?"".concat(e.locationname).concat(e.suburb?" (".concat(e.suburb,")"):""):"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.locationid)===(null===t||void 0===t?void 0:t.locationid),PaperComponent:J,sx:(0,o.A)({minWidth:{xs:"100%",sm:220}},te("#0ea5e9")),onOpen:e=>{H||ve?ve||(e.preventDefault(),(0,K.k)("Please select a Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=W.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,K.k)("Please select Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(Ae((null===t||void 0===t?void 0:t.locationid)||0),ke(t)):(Ae(0),ke(null))},renderInput:e=>(0,B.jsx)(g.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,B.jsx)(_,{color:"#0ea5e9",size:24,selected:Boolean(Ce),children:(0,B.jsx)(D.gwi,{size:14})}),e.InputProps.startAdornment]})})}))})]}),(0,B.jsx)(d.A,{sx:{width:{xs:"100%",md:280,lg:320},flex:{xs:"1 1 100%",md:"0 0 auto"}},children:(0,B.jsx)(F.A,{value:ze,onChange:De,onDebouncedChange:Ie,placeholder:"Search ".concat(Ze?"locations":"tenants"," (ctrl+k)"),sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($(V))}}})})]})}),(0,B.jsxs)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:E.radiusCard/8,borderBottomRightRadius:E.radiusCard/8,border:"1px solid",borderColor:E.borderSubtle,overflow:"hidden",background:"#fff"},children:[t?(0,B.jsxs)(B.Fragment,{children:[Pe&&(0,B.jsx)(O.nV,{children:[0,1,2,3].map((e=>(0,B.jsx)(O.pg,{accent:E.borderSubtle,children:(0,B.jsx)(d.A,{sx:{height:96}})},e)))}),!Pe&&0===Le.length&&(0,B.jsxs)(m.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,B.jsx)(s.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:E.textMuted},children:(0,B.jsx)(D.Z2J,{size:28})}),(0,B.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:E.textPrimary},children:["No ",Ze?"locations":"tenants"," to show"]}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary,textAlign:"center",maxWidth:360},children:We?"Try a different keyword.":Ne?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]}),!Pe&&Le.length>0&&(0,B.jsx)(O.nV,{children:Le.map(((e,t)=>{const n=Ze?e.locationname:e.tenantname,o=xe===n,r=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),i=Ze?"#0ea5e9":V;return(0,B.jsxs)(O.pg,{accent:i,selected:o,header:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,B.jsx)(_,{color:i,size:36,children:Ze?(0,B.jsx)(D.gwi,{size:18}):(0,B.jsx)(D.nZo,{size:18})}),(0,B.jsxs)(m.A,{sx:{minWidth:0,flex:1},children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary},noWrap:!0,children:(Ze?e.locationname:e.tenantname)||"\u2014"}),(0,B.jsxs)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:["ID #",Ze?e.locationid:e.tenantid]})]}),(0,B.jsx)(c.A,{title:o?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,B.jsx)(b.A,{size:"small",onClick:()=>{const t=!o;ue(t?n:null),t&&(je([]),Ze?He(e.locationid):Be(e.tenantid))},sx:{flexShrink:0,bgcolor:o?V:X(V),color:o?"#fff":V,border:"1px solid ".concat(q(V)),"&:hover":{bgcolor:V,color:"#fff"}},children:o?(0,B.jsx)(D.Xbk,{size:16}):(0,B.jsx)(D.j1Q,{size:16})})})]}),children:[(0,B.jsxs)(O.FG,{columns:3,children:[(0,B.jsx)(O.pY,{label:"All",align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:V,icon:(0,B.jsx)(D.F6S,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Pending",align:"center",children:(0,B.jsx)(ee,{value:e.Orderspending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.orderscancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Completed",align:"center",children:(0,B.jsx)(ee,{value:e.orderscompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Pending",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Completed",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(O.pY,{label:"Collection",align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,B.jsx)(O.pY,{label:"Amount",align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:11}),label:ne(r).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,B.jsx)(O.pY,{label:"KMS",align:"center",children:(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,B.jsx)(O.pY,{label:"Actual KMS",align:"center",children:(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})})]}),(0,B.jsx)(f.A,{in:o,timeout:"auto",unmountOnExit:!0,children:(0,B.jsxs)(d.A,{sx:{mt:1.5},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,B.jsx)(_,{color:V,size:24,selected:!0,children:(0,B.jsx)(D.Itr,{size:12})}),(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:E.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Rider Breakdown"})]}),ge||me&&0!==me.length?(0,B.jsx)(m.A,{spacing:1,children:me.map(((e,t)=>{const n=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(O.pg,{accent:V,children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,B.jsx)(_,{color:V,size:28,children:(0,B.jsx)(D.LTk,{size:14})}),(0,B.jsxs)(m.A,{sx:{minWidth:0},children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary},noWrap:!0,children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]}),(0,B.jsxs)(O.FG,{columns:3,children:[(0,B.jsx)(O.pY,{label:"Orders",align:"center",children:(0,B.jsx)(ee,{value:e.orderscreated,color:V,icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(O.pY,{label:"Deliveries",align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:"#0ea5e9",icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(O.pY,{label:"Pending",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:10})})}),(0,B.jsx)(O.pY,{label:"Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:10})})}),(0,B.jsx)(O.pY,{label:"Completed",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:10})})}),(0,B.jsx)(O.pY,{label:"Collection",align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,B.jsx)(O.pY,{label:"KMS",align:"center",children:(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,B.jsx)(O.pY,{label:"Actual KMS",align:"center",children:(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,B.jsx)(O.pY,{label:"Amount",align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:10}),label:ne(n).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.userid,"-").concat(t))}))}):(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,display:"block",py:1,textAlign:"center"},children:"No rider activity for this row."})]})})]},"".concat(n,"-").concat(t))}))})]}):(0,B.jsx)(A.A,{sx:{maxHeight:{xs:"calc(100vh - 280px)",md:"calc(100vh - 240px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:q(V),borderRadius:8,"&:hover":{backgroundColor:V}},"&::-webkit-scrollbar-track":{backgroundColor:E.surfaceAlt}},children:(0,B.jsxs)(v.A,{stickyHeader:!0,sx:{minWidth:{xs:1080,md:1200}},children:[(0,B.jsxs)(w.A,{children:[(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,B.jsx)(y.A,{rowSpan:2,children:"#"}),(0,B.jsx)(y.A,{rowSpan:2,children:Ze?"Location":"Tenant"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"All"}),(0,B.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#ef4444 !important"},children:"Orders"}),(0,B.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#10b981 !important"},children:"Deliveries"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"Collection"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"KMS / Actual"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"Amount"}),(0,B.jsx)(y.A,{align:"right",rowSpan:2,children:"Action"})]}),(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:{xs:10,md:10.5},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:{xs:.75,md:1},px:{xs:1,md:1.5}}},children:[(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#10b981 !important"},children:"Completed"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#10b981 !important"},children:"Completed"})]})]}),(0,B.jsxs)(C.A,{children:[Pe&&(0,B.jsx)(L.r,{col:9}),!Pe&&0===Le.length&&(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:13,sx:{py:6},children:(0,B.jsxs)(m.A,{alignItems:"center",spacing:1.5,children:[(0,B.jsx)(s.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:E.textMuted},children:(0,B.jsx)(D.Z2J,{size:28})}),(0,B.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:E.textPrimary},children:["No ",Ze?"locations":"tenants"," to show"]}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary,textAlign:"center",maxWidth:360},children:We?"Try a different keyword.":Ne?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]})})}),Le.map(((e,t)=>{const n=Ze?e.locationname:e.tenantname,o=xe===n,i=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(r.Fragment,{children:[(0,B.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:o?"none":"1px solid ".concat(E.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:o?"#fff":E.surfaceAlt},bgcolor:o?U(V):"transparent"},children:[(0,B.jsx)(y.A,{children:(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textMuted},children:String(t+1).padStart(2,"0")})}),(0,B.jsx)(y.A,{children:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,B.jsx)(_,{color:Ze?"#0ea5e9":V,size:36,children:Ze?(0,B.jsx)(D.gwi,{size:18}):(0,B.jsx)(D.nZo,{size:18})}),(0,B.jsxs)(m.A,{children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary,whiteSpace:"nowrap"},children:(Ze?e.locationname:e.tenantname)||"\u2014"}),(0,B.jsxs)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:["ID #",Ze?e.locationid:e.tenantid]})]})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:V,icon:(0,B.jsx)(D.F6S,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.Orderspending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:11}),label:ne(i).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,B.jsx)(y.A,{align:"right",children:(0,B.jsx)(c.A,{title:o?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,B.jsx)(b.A,{size:"small",onClick:()=>{const t=!o;ue(t?n:null),t&&(je([]),Ze?He(e.locationid):Be(e.tenantid))},sx:{bgcolor:o?V:X(V),color:o?"#fff":V,border:"1px solid ".concat(q(V)),"&:hover":{bgcolor:V,color:"#fff"}},children:o?(0,B.jsx)(D.Xbk,{size:16}):(0,B.jsx)(D.j1Q,{size:16})})})})]}),o&&(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:13,sx:{p:0,borderBottom:"1px solid ".concat(E.divider),bgcolor:U(V)},children:(0,B.jsx)(f.A,{in:o,timeout:"auto",unmountOnExit:!0,children:(0,B.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,B.jsxs)(a.A,{elevation:0,sx:{borderRadius:E.radiusCard/8,border:"1px solid",borderColor:E.borderSubtle,overflow:"hidden",boxShadow:E.shadowSoft},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"#ffffff",borderBottom:"1px solid ".concat(E.borderSubtle)},children:[(0,B.jsx)(_,{color:V,size:28,selected:!0,children:(0,B.jsx)(D.Itr,{size:14})}),(0,B.jsxs)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Rider Breakdown \xb7 ",Ze?e.locationname:e.tenantname]})]}),(0,B.jsxs)(v.A,{size:"small",children:[(0,B.jsx)(w.A,{children:(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:1,px:1.5}},children:[(0,B.jsx)(y.A,{children:"#"}),(0,B.jsx)(y.A,{children:"Rider"}),(0,B.jsx)(y.A,{align:"center",children:"Orders"}),(0,B.jsx)(y.A,{align:"center",children:"Deliveries"}),(0,B.jsx)(y.A,{align:"center",children:"Pending"}),(0,B.jsx)(y.A,{align:"center",children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",children:"Completed"}),(0,B.jsx)(y.A,{align:"center",children:"Collection"}),(0,B.jsx)(y.A,{align:"center",children:"KMS / Actual"}),(0,B.jsx)(y.A,{align:"center",children:"Amount"})]})}),(0,B.jsxs)(C.A,{children:[ge&&(0,B.jsx)(L.r,{col:6}),ge||me&&0!==me.length?me.map(((e,t)=>{const n=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(E.divider),py:1,px:1.5},"&:hover":{backgroundColor:E.surfaceAlt}},children:[(0,B.jsx)(y.A,{children:(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textMuted},children:String(t+1).padStart(2,"0")})}),(0,B.jsx)(y.A,{children:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,B.jsx)(_,{color:V,size:28,children:(0,B.jsx)(D.LTk,{size:14})}),(0,B.jsxs)(m.A,{children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary,whiteSpace:"nowrap"},children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscreated,color:V,icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:"#0ea5e9",icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:10}),label:ne(n).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.userid,"-").concat(t))})):(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:10,sx:{py:3},children:(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,textAlign:"center",display:"block"},children:"No rider activity for this row."})})})]})]})]})})})})})]},"".concat(n,"-").concat(t))}))]})]})}),Le.length>0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(k.A,{}),(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1.5,flexWrap:"wrap",sx:{px:2,py:1.5,background:"#ffffff"},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,flexWrap:"wrap",children:[(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:E.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.totalOrders," orders"),sx:{fontWeight:700,bgcolor:X(V),color:V,border:"1px solid ".concat(q(V))}}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.deliComplete," delivered"),sx:{fontWeight:700,bgcolor:X("#10b981"),color:"#10b981",border:"1px solid ".concat(q("#10b981"))}}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.deliPend," pending"),sx:{fontWeight:700,bgcolor:X("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(q("#f59e0b"))}})]}),(0,B.jsx)(z.A,{label:ne(Ke.amount),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(V," 0%, ").concat(G," 100%)"),boxShadow:"0 6px 16px ".concat($(V))}})]})]})]}),(0,B.jsx)(P.A,{open:ce,onClose:()=>de(!1),onSelect:e=>{re(e.startDate),le(e.endDate),pe(e.label)}})]})}},59212:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(89379),r=n(9950),i=n(93230),l=n(41413),a=n(77922),s=n(29925),c=n(26910),d=n(31222),x=n(44414);const u=(0,r.forwardRef)(((e,t)=>{let{setAppId:n,setLocoName:u,setPage:h,sx:p,textfeildSx:m,textfieldSx:j,pill:g=!1,accentColor:b="#6366f1",icon:f,placeholder:A="Select Zone",paperComponent:v}=e;const[w,S]=(0,r.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,r.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(b).concat(e),C=y("26"),k=y("18"),z=g?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:b,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=g&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:k,color:b,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(a.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===n||void 0===n||n(0),null===u||void 0===u||u(""),null===h||void 0===h||h(0)):t&&(null===n||void 0===n||n(t.applocationid),null===u||void 0===u||u(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>g?(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},z),j||m||{})})):(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},j||m||{})}))})}))},96646:(e,t,n)=>{n.d(t,{r:()=>s});var o=n(9213),r=n(21671),i=n(82917),l=n(93230),a=n(44414);const s=e=>{let{rowsPerPage:t=5,col:n=1}=e;return(0,a.jsx)(a.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,a.jsxs)(o.A,{children:[(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:n}).map(((e,t)=>(0,a.jsx)(r.A,{children:(0,a.jsxs)(l.A,{spacing:.5,children:[(0,a.jsx)(i.A,{variant:"text",width:100}),(0,a.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"text",width:150})}),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,a.jsx)(r.A,{align:"center",children:(0,a.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,a.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,a.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/7221.434a49d6.chunk.js b/build/static/js/7221.e5f2ba4c.chunk.js similarity index 99% rename from build/static/js/7221.434a49d6.chunk.js rename to build/static/js/7221.e5f2ba4c.chunk.js index b4129b5..21a8a10 100644 --- a/build/static/js/7221.434a49d6.chunk.js +++ b/build/static/js/7221.e5f2ba4c.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7221],{23787:(e,r,t)=>{"use strict";t.d(r,{FG:()=>p,nV:()=>h,pY:()=>u,pg:()=>x});var i=t(89379),s=t(80045),n=t(93230),l=t(2235),o=t(16491),c=t(82053),a=t(44414);const d=["children","scroll","onScroll","sx"],h=e=>{let{children:r,scroll:t=!1,onScroll:l,sx:o}=e,c=(0,s.A)(e,d);return(0,a.jsx)(n.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:l,sx:(0,i.A)((0,i.A)({p:1.5},t&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),o)},c),{},{children:r}))},x=e=>{let{accent:r="#662582",header:t,footer:s,selected:n=!1,onClick:c,children:d,sx:h}=e;return(0,a.jsxs)(l.A,{elevation:0,onClick:c,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?r:"#e2e8f0",background:n?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,a.jsx)(o.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,a.jsxs)(o.A,{sx:{p:1.5,pl:2},children:[t,d,s]})]})},p=e=>{let{children:r,columns:t=2,sx:s}=e;return(0,a.jsx)(o.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(t,", minmax(0, 1fr))"),gap:1,mt:1.25},s),children:r})},u=e=>{let{label:r,value:t,children:i,full:s=!1,align:n="left"}=e;return(0,a.jsxs)(o.A,{sx:{gridColumn:s?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,a.jsx)(o.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==t&&void 0!==t?t:"\u2014"})})]})}},36220:function(e){e.exports=function(){"use strict";var e="minute",r=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(i,s,n){var l=s.prototype;n.utc=function(e){return new s({date:e,utc:!0,args:arguments})},l.utc=function(r){var t=n(this.toDate(),{locale:this.$L,utc:!0});return r?t.add(this.utcOffset(),e):t},l.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=l.parse;l.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var c=l.init;l.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var a=l.utcOffset;l.utcOffset=function(i,s){var n=this.$utils().u;if(n(i))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(r);if(!i)return null;var s=(""+i[0]).match(t)||["-",0,0],n=s[0],l=60*+s[1]+ +s[2];return 0===l?0:"+"===n?l:-l}(i),null===i))return this;var l=Math.abs(i)<=16?60*i:i,o=this;if(s)return o.$offset=l,o.$u=0===i,o;if(0!==i){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(l+c,e)).$offset=l,o.$x.$localOffset=c}else o=this.utc();return o};var d=l.format;l.format=function(e){var r=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,r)},l.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(e){return"s"===e&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var x=l.diff;l.diff=function(e,r,t){if(e&&this.$u===e.$u)return x.call(this,e,r,t);var i=this.local(),s=n(e).local();return x.call(i,s,r,t)}}}()},47659:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var i=t(89379),s=t(48089),n=t(50704),l=t(16491),o=t(82053),c=t(60899),a=t(44414);const d=e=>{let{primary:r,secondary:t,percentage:d,color:h,sx:x}=e;return(0,a.jsx)(s.A,{elevation:0,sx:(0,i.A)({background:h,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},x),children:(0,a.jsxs)(n.A,{children:[(0,a.jsx)(l.A,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,a.jsx)(o.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,a.jsxs)(c.Ay,{container:!0,spacing:0,children:[(0,a.jsx)(c.Ay,{item:!0,xs:12,children:(0,a.jsx)(o.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:t})}),(0,a.jsx)(c.Ay,{item:!0,xs:12,children:(0,a.jsx)(o.A,{variant:"subtitle2",color:"inherit",children:r})})]})]})})}},57221:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>V});var i=t(89379),s=t(93230),n=t(82053),l=t(25277),o=t(83274),c=t(25333),a=t(82223),d=t(55158),h=t(60899),x=t(1320),p=t(15769),u=t(69780),A=t(9213),m=t(21671),j=t(34075),f=t(74745),v=t(77922),g=t(29925),y=t(9950),b=t(14857),k=t(47223),S=t(23787),Y=t(28429),C=t(4159),z=t.n(C),W=t(50027),D=t(63189),M=t(81425),T=t(20466),w=t(36150),R=t(51778),J=t(52351),K=t(94826),O=t(13838),F=t(47659),H=t(58168);const P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM482 232c0-4.4 3.6-8 8-8h44c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8h-44c-4.4 0-8-3.6-8-8v-80zM270 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44zm90.7-204.5l-31.1 31.1a8.03 8.03 0 01-11.3 0L261.7 352a8.03 8.03 0 010-11.3l31.1-31.1c3.1-3.1 8.2-3.1 11.3 0l56.6 56.6c3.1 3.1 3.1 8.2 0 11.3zm291.1 83.6l-84.5 84.5c5 18.7.2 39.4-14.5 54.1a55.95 55.95 0 01-79.2 0 55.95 55.95 0 010-79.2 55.87 55.87 0 0154.1-14.5l84.5-84.5c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3c3.1 3.1 3.1 8.1 0 11.3zm43-52.4l-31.1-31.1a8.03 8.03 0 010-11.3l56.6-56.6c3.1-3.1 8.2-3.1 11.3 0l31.1 31.1c3.1 3.1 3.1 8.2 0 11.3l-56.6 56.6a8.03 8.03 0 01-11.3 0zM846 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44z"}}]},name:"dashboard",theme:"filled"};var I=t(61187),L=function(e,r){return y.createElement(I.A,(0,H.A)({},e,{ref:r,icon:P}))};const Z=y.forwardRef(L);var N=t(31222),B=t(43302),G=t(99324),U=t(44414),E=t(36220);z().extend(E);const q=e=>{let{list:r,aiMode:t}=e;return r&&0!==r.length?(0,U.jsx)(S.nV,{children:r.map(((e,r)=>{const i="Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary";return(0,U.jsx)(S.pg,{header:(0,U.jsxs)(s.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,U.jsxs)(s.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,U.jsxs)(n.A,{sx:{fontWeight:800,color:"#94a3b8"},children:["#",r+1]}),1==t&&(0,U.jsx)(l.A,{size:"small",color:"primary",label:e.zone_name})]}),(0,U.jsx)(l.A,{size:"small",label:e.ordertype,color:i})]}),children:(0,U.jsxs)(S.FG,{children:[(0,U.jsx)(S.pY,{label:"Tenant",full:!0,children:(0,U.jsx)(o.A,{title:e.tenantaddress,children:(0,U.jsxs)(s.A,{children:[(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:e.tenantsuburb}),(0,U.jsx)(n.A,{noWrap:!0,variant:"body2",children:e.applocation})]})})}),(0,U.jsxs)(S.pY,{label:"Order Location",full:!0,children:[(0,U.jsx)(o.A,{title:e.locationaddress,placement:"top",children:(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,U.jsx)(o.A,{title:"Order Id",children:(0,U.jsx)(n.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,U.jsx)(o.A,{title:"Ordered date",children:(0,U.jsxs)(s.A,{children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.orderdate).utc().format("hh:mm A")})]})}),"-",(0,U.jsx)(o.A,{title:"Delivery date",children:(0,U.jsxs)(s.A,{children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.deliverydate).utc().format("hh:mm A")})]})})]})]}),(0,U.jsx)(S.pY,{label:"Pickup",children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcontactno}),(0,U.jsx)(o.A,{title:e.pickupaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})}),(0,U.jsx)(S.pY,{label:"Delivery",children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycontactno}),(0,U.jsx)(o.A,{title:e.deliveryaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})}),e.ordernotes?(0,U.jsx)(S.pY,{label:"Notes",value:e.ordernotes,full:!0}):null,1==t&&(0,U.jsxs)(S.pY,{label:"Rider",full:!0,children:[(0,U.jsx)(n.A,{sx:{whiteSpace:"nowrap"},children:e.username}),(0,U.jsxs)(n.A,{children:["ID : ",e.userid]})]}),(0,U.jsx)(S.pY,{label:"Profit",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"Charges",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,U.jsx)(o.A,{title:"Amount",placement:"left",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,U.jsx)(S.pY,{label:"KMS",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"KMS",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,U.jsx)(o.A,{title:"Cumulative Kms",placement:"right",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r)}))}):(0,U.jsx)(s.A,{alignItems:"center",sx:{py:4},children:(0,U.jsx)(O.A,{})})},V=()=>{var e,r,t,S,C,H,P;const I=(0,b.A)(),L=(0,k.A)(I.breakpoints.down("md")),E=(0,Y.Zp)(),V=(0,Y.zy)();console.log("location.state",V.state);const[Q,X]=(0,y.useState)(null),[$,_]=(0,y.useState)(null),[ee,re]=(0,y.useState)([]),[te,ie]=(0,y.useState)(!1),se=null===(e=V.state)||void 0===e?void 0:e.deliverylist,ne=null===(r=V.state)||void 0===r?void 0:r.zoneData,le=null===(t=V.state)||void 0===t?void 0:t.metaData,oe=null===(S=V.state)||void 0===S?void 0:S.riderToken,ce=null===(C=V.state)||void 0===C?void 0:C.appId,ae=null===(H=V.state)||void 0===H?void 0:H.aiMode,de=null===(P=V.state)||void 0===P?void 0:P.reassignOrders;(0,y.useEffect)((()=>{console.log("aiMode",ae),console.log("riderToken",oe),console.log("zoneData",ne),console.log("metaData",le),console.log("reassignOrders",de)}),[]),(0,y.useEffect)((()=>{if(null===se||void 0===se||!se.length)return;const e=se.map((e=>{const r=Number(e.cumulativekms||0),t=Number(e.minkm||0),s=Number(e.baseprice||0),n=Number(e.priceperkm||0);return r<=t?(0,i.A)((0,i.A)({},e),{},{deliveryamt:s}):(0,i.A)((0,i.A)({},e),{},{deliveryamt:(r-t)*n+s})}));re(e),console.log("finaldeliveryList",e)}),[se]);const{data:he=[],isLoading:xe,isError:pe,error:ue}=(0,w.I)({queryKey:["paymentmodes"],queryFn:M.HY}),{data:Ae=[],isLoading:me,isError:je,error:fe,refetch:ve}=(0,w.I)({queryKey:["ridersList",ce],queryFn:M.Sd,enabled:0!==ce}),ge=(0,R.n)({mutationFn:M.k3,onSuccess:()=>{(0,T.k)("Notification sent Successfully","success",2e3)},onError:e=>{(0,T.k)(e.message,"error",2e3)}}),ye=(0,R.n)({mutationFn:M.H2,onSuccess:(e,r)=>{console.log("data",e),console.log("varialbles",r),ge.mutate(Q.userfcmtoken||oe),"accepted"==e.status&&(0,T.k)("Delivery Created Successfully","success",2e3),setTimeout((()=>{ie(!1),E("/nearle/deliveries")}),2e3)},onError:e=>{(0,T.k)(e.message,"error",4e3)}});return(0,U.jsxs)(W.A,{content:!1,title:(0,U.jsxs)(s.A,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[(0,U.jsxs)(o.A,{title:"Back to orders",placement:"top",children:[(0,U.jsx)(c.A,{onClick:()=>E("/nearle/orders"),sx:{backgroundColor:"action.hover",color:"text.primary","&:hover":{backgroundColor:"action.selected"}},children:(0,U.jsx)(G.eQE,{size:22})})," "]}),(0,U.jsx)(n.A,{sx:{m:2},variant:"h3",children:"Assign Orders"})]}),secondary:(0,U.jsx)(a.A,{sx:{m:2},color:"primary",variant:"contained",startIcon:(0,U.jsx)(D.A,{}),children:"Re-Assign"}),children:[(xe||me||te)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J.A,{}),(0,U.jsx)(K.A,{})]}),(0,U.jsx)(d.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:xe||me||te,children:(0,U.jsx)(K.A,{color:"inherit"})}),1==ae&&(0,U.jsx)(s.A,{sx:{m:2},children:(0,U.jsxs)(h.Ay,{container:!0,spacing:2,children:[(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===le||void 0===le?void 0:le.total_orders,primary:"Orders",percentage:(0,U.jsx)(Z,{}),color:I.palette.success.main,sx:{cursor:"pointer"}})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===le||void 0===le?void 0:le.total_riders,primary:"Riders",percentage:(0,U.jsx)(N.bsz,{}),color:I.palette.warning.main})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===ne||void 0===ne?void 0:ne.length,primary:"Zones",percentage:(0,U.jsx)(B.us2,{}),color:I.palette.info.main})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===ne||void 0===ne?void 0:ne.length,primary:"Kilometer",percentage:(0,U.jsx)(B.us2,{}),color:I.palette.error.main})})]})}),L?(0,U.jsx)(q,{list:ee,aiMode:ae}):(0,U.jsx)(x.A,{sx:{maxHeight:"calc(100vh - 250px)",overflow:"auto","&::-webkit-scrollbar":{width:"12px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:I.palette.primary.main,borderRadius:"8px",cursor:"pointer"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:I.palette.primary.dark,cursor:"pointer"},"&::-webkit-scrollbar-track":{backgroundColor:I.palette.primary.lighter,cursor:"pointer"}},children:(0,U.jsxs)(p.A,{stickyHeader:!0,children:[(0,U.jsx)(u.A,{children:(0,U.jsxs)(A.A,{sx:{backgroundColor:"red"},children:[(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"#"}),1==ae&&(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Zone "}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Tenant "}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"order Location"}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Pickup "}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Delivery"}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Notes"}),1==ae&&(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Rider"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Type"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Profit"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Charges"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"KMS"})]})}),(0,U.jsxs)(j.A,{children:[0==(null===ee||void 0===ee?void 0:ee.length)&&(0,U.jsx)(A.A,{children:(0,U.jsx)(m.A,{colSpan:10,children:(0,U.jsx)(O.A,{})})}),ee&&1==ae?null===ee||void 0===ee?void 0:ee.map(((e,r)=>(0,U.jsx)(y.Fragment,{children:(0,U.jsxs)(A.A,{sx:{},children:[(0,U.jsx)(m.A,{children:(0,U.jsxs)(n.A,{children:[" ",r+1]})}),1==ae&&(0,U.jsx)(m.A,{children:(0,U.jsx)(l.A,{color:"primary",label:e.zone_name})}),(0,U.jsx)(m.A,{children:(0,U.jsxs)(o.A,{title:e.tenantaddress,children:[(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,U.jsxs)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,U.jsx)("br",{})]}),(0,U.jsx)(n.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,U.jsxs)(m.A,{align:"left",children:[(0,U.jsx)(o.A,{title:e.locationaddress,placement:"top",children:(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,U.jsx)(o.A,{title:"Order Id",children:(0,U.jsx)(n.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,U.jsxs)(o.A,{title:"Ordered date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,U.jsxs)(o.A,{title:"Delivery date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcontactno}),(0,U.jsx)(o.A,{title:e.pickupaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycontactno}),(0,U.jsx)(o.A,{title:e.deliveryaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:e.ordernotes}),1==ae&&(0,U.jsxs)(m.A,{align:"left",children:[(0,U.jsx)(n.A,{sx:{whiteSpace:"nowrap"},children:e.username}),(0,U.jsxs)(n.A,{children:["ID : ",e.userid]})]}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsx)(l.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary"})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"Charges",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,U.jsx)(o.A,{title:"Amount",placement:"left",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"KMS",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,U.jsx)(o.A,{title:"Cumulative Kms",placement:"right",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r))):null===ee||void 0===ee?void 0:ee.map(((e,r)=>(0,U.jsx)(y.Fragment,{children:(0,U.jsxs)(A.A,{sx:{},children:[(0,U.jsx)(m.A,{children:(0,U.jsxs)(n.A,{children:[" ",r+1]})}),(0,U.jsx)(m.A,{children:(0,U.jsxs)(o.A,{title:e.tenantaddress,children:[(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,U.jsxs)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,U.jsx)("br",{})]}),(0,U.jsx)(n.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,U.jsxs)(m.A,{align:"left",children:[(0,U.jsx)(o.A,{title:e.locationaddress,placement:"top",children:(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,U.jsx)(o.A,{title:"Order Id",children:(0,U.jsx)(n.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,U.jsxs)(o.A,{title:"Ordered date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,U.jsxs)(o.A,{title:"Delivery date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcontactno}),(0,U.jsx)(o.A,{title:e.pickupaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycontactno}),(0,U.jsx)(o.A,{title:e.deliveryaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:e.ordernotes}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsx)(l.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary"})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"Charges",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,U.jsx)(o.A,{title:"Amount",placement:"left",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"KMS",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,U.jsx)(o.A,{title:"Cumulative Kms",placement:"right",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r)))]})]})}),(0,U.jsx)(f.A,{}),0==ae&&(0,U.jsxs)(h.Ay,{container:!0,spacing:2,sx:{p:2},children:[(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(v.A,{id:"free-solo-demo",options:he,renderInput:e=>(0,U.jsx)(g.A,(0,i.A)((0,i.A)({},e),{},{label:"Choose Payment"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){console.log("Selected:",r),_(r);const e=null===ee||void 0===ee?void 0:ee.map((e=>(0,i.A)((0,i.A)({},e),{},{paymenttype:r.apptypeid})));re(e)}}else _(null)}})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(v.A,{id:"free-solo-demo",options:Ae,renderInput:e=>(0,U.jsx)(g.A,(0,i.A)((0,i.A)({},e),{},{label:"Choose Rider"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){X(r),console.log("Selected:",r);const e=null===ee||void 0===ee?void 0:ee.map((e=>(0,i.A)((0,i.A)({},e),{},{userid:r.userid,userfcmtoken:r.userfcmtoken})));re(e)}}else X(null)}})})]}),(0,U.jsx)(f.A,{}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:2,alignItems:{xs:"stretch",sm:"center"},justifyContent:"end",sx:{p:2},children:[(0,U.jsx)(a.A,{fullWidth:L,variant:"contained",color:"secondary",startIcon:(0,U.jsx)(D.A,{}),onClick:()=>{E("/nearle/orders")},children:"Back"}),(0,U.jsx)(a.A,{fullWidth:L,sx:{my:{xs:0,sm:2}},variant:"contained",disabled:0===ae&&(!Q||!$),onClick:async()=>{ie(!0),ye.mutate({deliveries:ee})},children:"Assign Orders"})]})]})}},62217:e=>{"use strict";e.exports="data:image/png;base64,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"},94826:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var i=t(59254),s=t(46639),n=t(62217),l=t(44414);const o=(0,i.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),c=(0,i.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),a=()=>(0,l.jsxs)(o,{children:[(0,l.jsx)(s.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(c,{children:(0,l.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7221],{23787:(e,r,t)=>{"use strict";t.d(r,{FG:()=>p,nV:()=>h,pY:()=>u,pg:()=>x});var i=t(89379),s=t(80045),n=t(93230),l=t(2235),o=t(16491),c=t(82053),a=t(44414);const d=["children","scroll","onScroll","sx"],h=e=>{let{children:r,scroll:t=!1,onScroll:l,sx:o}=e,c=(0,s.A)(e,d);return(0,a.jsx)(n.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:l,sx:(0,i.A)((0,i.A)({p:1.5},t&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),o)},c),{},{children:r}))},x=e=>{let{accent:r="#662582",header:t,footer:s,selected:n=!1,onClick:c,children:d,sx:h}=e;return(0,a.jsxs)(l.A,{elevation:0,onClick:c,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?r:"#e2e8f0",background:n?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,a.jsx)(o.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,a.jsxs)(o.A,{sx:{p:1.5,pl:2},children:[t,d,s]})]})},p=e=>{let{children:r,columns:t=2,sx:s}=e;return(0,a.jsx)(o.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(t,", minmax(0, 1fr))"),gap:1,mt:1.25},s),children:r})},u=e=>{let{label:r,value:t,children:i,full:s=!1,align:n="left"}=e;return(0,a.jsxs)(o.A,{sx:{gridColumn:s?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,a.jsx)(o.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==t&&void 0!==t?t:"\u2014"})})]})}},36220:function(e){e.exports=function(){"use strict";var e="minute",r=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(i,s,n){var l=s.prototype;n.utc=function(e){return new s({date:e,utc:!0,args:arguments})},l.utc=function(r){var t=n(this.toDate(),{locale:this.$L,utc:!0});return r?t.add(this.utcOffset(),e):t},l.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=l.parse;l.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var c=l.init;l.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var a=l.utcOffset;l.utcOffset=function(i,s){var n=this.$utils().u;if(n(i))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(r);if(!i)return null;var s=(""+i[0]).match(t)||["-",0,0],n=s[0],l=60*+s[1]+ +s[2];return 0===l?0:"+"===n?l:-l}(i),null===i))return this;var l=Math.abs(i)<=16?60*i:i,o=this;if(s)return o.$offset=l,o.$u=0===i,o;if(0!==i){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(l+c,e)).$offset=l,o.$x.$localOffset=c}else o=this.utc();return o};var d=l.format;l.format=function(e){var r=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,r)},l.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(e){return"s"===e&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var x=l.diff;l.diff=function(e,r,t){if(e&&this.$u===e.$u)return x.call(this,e,r,t);var i=this.local(),s=n(e).local();return x.call(i,s,r,t)}}}()},47659:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var i=t(89379),s=t(48089),n=t(50704),l=t(16491),o=t(82053),c=t(60899),a=t(44414);const d=e=>{let{primary:r,secondary:t,percentage:d,color:h,sx:x}=e;return(0,a.jsx)(s.A,{elevation:0,sx:(0,i.A)({background:h,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},x),children:(0,a.jsxs)(n.A,{children:[(0,a.jsx)(l.A,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,a.jsx)(o.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,a.jsxs)(c.Ay,{container:!0,spacing:0,children:[(0,a.jsx)(c.Ay,{item:!0,xs:12,children:(0,a.jsx)(o.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:t})}),(0,a.jsx)(c.Ay,{item:!0,xs:12,children:(0,a.jsx)(o.A,{variant:"subtitle2",color:"inherit",children:r})})]})]})})}},57221:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>V});var i=t(89379),s=t(93230),n=t(82053),l=t(25277),o=t(83274),c=t(25333),a=t(10226),d=t(55158),h=t(60899),x=t(1320),p=t(15769),u=t(69780),A=t(9213),m=t(21671),j=t(34075),f=t(74745),v=t(77922),g=t(29925),y=t(9950),b=t(14857),k=t(47223),S=t(23787),Y=t(28429),C=t(4159),z=t.n(C),W=t(50027),D=t(63189),M=t(81425),T=t(20466),w=t(36150),R=t(51778),J=t(52351),K=t(94826),O=t(13838),F=t(47659),H=t(58168);const P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM482 232c0-4.4 3.6-8 8-8h44c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8h-44c-4.4 0-8-3.6-8-8v-80zM270 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44zm90.7-204.5l-31.1 31.1a8.03 8.03 0 01-11.3 0L261.7 352a8.03 8.03 0 010-11.3l31.1-31.1c3.1-3.1 8.2-3.1 11.3 0l56.6 56.6c3.1 3.1 3.1 8.2 0 11.3zm291.1 83.6l-84.5 84.5c5 18.7.2 39.4-14.5 54.1a55.95 55.95 0 01-79.2 0 55.95 55.95 0 010-79.2 55.87 55.87 0 0154.1-14.5l84.5-84.5c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3c3.1 3.1 3.1 8.1 0 11.3zm43-52.4l-31.1-31.1a8.03 8.03 0 010-11.3l56.6-56.6c3.1-3.1 8.2-3.1 11.3 0l31.1 31.1c3.1 3.1 3.1 8.2 0 11.3l-56.6 56.6a8.03 8.03 0 01-11.3 0zM846 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44z"}}]},name:"dashboard",theme:"filled"};var I=t(61187),L=function(e,r){return y.createElement(I.A,(0,H.A)({},e,{ref:r,icon:P}))};const Z=y.forwardRef(L);var N=t(31222),B=t(43302),G=t(99324),U=t(44414),E=t(36220);z().extend(E);const q=e=>{let{list:r,aiMode:t}=e;return r&&0!==r.length?(0,U.jsx)(S.nV,{children:r.map(((e,r)=>{const i="Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary";return(0,U.jsx)(S.pg,{header:(0,U.jsxs)(s.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,U.jsxs)(s.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,U.jsxs)(n.A,{sx:{fontWeight:800,color:"#94a3b8"},children:["#",r+1]}),1==t&&(0,U.jsx)(l.A,{size:"small",color:"primary",label:e.zone_name})]}),(0,U.jsx)(l.A,{size:"small",label:e.ordertype,color:i})]}),children:(0,U.jsxs)(S.FG,{children:[(0,U.jsx)(S.pY,{label:"Tenant",full:!0,children:(0,U.jsx)(o.A,{title:e.tenantaddress,children:(0,U.jsxs)(s.A,{children:[(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:e.tenantsuburb}),(0,U.jsx)(n.A,{noWrap:!0,variant:"body2",children:e.applocation})]})})}),(0,U.jsxs)(S.pY,{label:"Order Location",full:!0,children:[(0,U.jsx)(o.A,{title:e.locationaddress,placement:"top",children:(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,U.jsx)(o.A,{title:"Order Id",children:(0,U.jsx)(n.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,U.jsx)(o.A,{title:"Ordered date",children:(0,U.jsxs)(s.A,{children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.orderdate).utc().format("hh:mm A")})]})}),"-",(0,U.jsx)(o.A,{title:"Delivery date",children:(0,U.jsxs)(s.A,{children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.deliverydate).utc().format("hh:mm A")})]})})]})]}),(0,U.jsx)(S.pY,{label:"Pickup",children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcontactno}),(0,U.jsx)(o.A,{title:e.pickupaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})}),(0,U.jsx)(S.pY,{label:"Delivery",children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycontactno}),(0,U.jsx)(o.A,{title:e.deliveryaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})}),e.ordernotes?(0,U.jsx)(S.pY,{label:"Notes",value:e.ordernotes,full:!0}):null,1==t&&(0,U.jsxs)(S.pY,{label:"Rider",full:!0,children:[(0,U.jsx)(n.A,{sx:{whiteSpace:"nowrap"},children:e.username}),(0,U.jsxs)(n.A,{children:["ID : ",e.userid]})]}),(0,U.jsx)(S.pY,{label:"Profit",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"Charges",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,U.jsx)(o.A,{title:"Amount",placement:"left",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,U.jsx)(S.pY,{label:"KMS",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"KMS",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,U.jsx)(o.A,{title:"Cumulative Kms",placement:"right",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r)}))}):(0,U.jsx)(s.A,{alignItems:"center",sx:{py:4},children:(0,U.jsx)(O.A,{})})},V=()=>{var e,r,t,S,C,H,P;const I=(0,b.A)(),L=(0,k.A)(I.breakpoints.down("md")),E=(0,Y.Zp)(),V=(0,Y.zy)();console.log("location.state",V.state);const[Q,X]=(0,y.useState)(null),[$,_]=(0,y.useState)(null),[ee,re]=(0,y.useState)([]),[te,ie]=(0,y.useState)(!1),se=null===(e=V.state)||void 0===e?void 0:e.deliverylist,ne=null===(r=V.state)||void 0===r?void 0:r.zoneData,le=null===(t=V.state)||void 0===t?void 0:t.metaData,oe=null===(S=V.state)||void 0===S?void 0:S.riderToken,ce=null===(C=V.state)||void 0===C?void 0:C.appId,ae=null===(H=V.state)||void 0===H?void 0:H.aiMode,de=null===(P=V.state)||void 0===P?void 0:P.reassignOrders;(0,y.useEffect)((()=>{console.log("aiMode",ae),console.log("riderToken",oe),console.log("zoneData",ne),console.log("metaData",le),console.log("reassignOrders",de)}),[]),(0,y.useEffect)((()=>{if(null===se||void 0===se||!se.length)return;const e=se.map((e=>{const r=Number(e.cumulativekms||0),t=Number(e.minkm||0),s=Number(e.baseprice||0),n=Number(e.priceperkm||0);return r<=t?(0,i.A)((0,i.A)({},e),{},{deliveryamt:s}):(0,i.A)((0,i.A)({},e),{},{deliveryamt:(r-t)*n+s})}));re(e),console.log("finaldeliveryList",e)}),[se]);const{data:he=[],isLoading:xe,isError:pe,error:ue}=(0,w.I)({queryKey:["paymentmodes"],queryFn:M.HY}),{data:Ae=[],isLoading:me,isError:je,error:fe,refetch:ve}=(0,w.I)({queryKey:["ridersList",ce],queryFn:M.Sd,enabled:0!==ce}),ge=(0,R.n)({mutationFn:M.k3,onSuccess:()=>{(0,T.k)("Notification sent Successfully","success",2e3)},onError:e=>{(0,T.k)(e.message,"error",2e3)}}),ye=(0,R.n)({mutationFn:M.H2,onSuccess:(e,r)=>{console.log("data",e),console.log("varialbles",r),ge.mutate(Q.userfcmtoken||oe),"accepted"==e.status&&(0,T.k)("Delivery Created Successfully","success",2e3),setTimeout((()=>{ie(!1),E("/nearle/deliveries")}),2e3)},onError:e=>{(0,T.k)(e.message,"error",4e3)}});return(0,U.jsxs)(W.A,{content:!1,title:(0,U.jsxs)(s.A,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[(0,U.jsxs)(o.A,{title:"Back to orders",placement:"top",children:[(0,U.jsx)(c.A,{onClick:()=>E("/nearle/orders"),sx:{backgroundColor:"action.hover",color:"text.primary","&:hover":{backgroundColor:"action.selected"}},children:(0,U.jsx)(G.eQE,{size:22})})," "]}),(0,U.jsx)(n.A,{sx:{m:2},variant:"h3",children:"Assign Orders"})]}),secondary:(0,U.jsx)(a.A,{sx:{m:2},color:"primary",variant:"contained",startIcon:(0,U.jsx)(D.A,{}),children:"Re-Assign"}),children:[(xe||me||te)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J.A,{}),(0,U.jsx)(K.A,{})]}),(0,U.jsx)(d.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:xe||me||te,children:(0,U.jsx)(K.A,{color:"inherit"})}),1==ae&&(0,U.jsx)(s.A,{sx:{m:2},children:(0,U.jsxs)(h.Ay,{container:!0,spacing:2,children:[(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===le||void 0===le?void 0:le.total_orders,primary:"Orders",percentage:(0,U.jsx)(Z,{}),color:I.palette.success.main,sx:{cursor:"pointer"}})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===le||void 0===le?void 0:le.total_riders,primary:"Riders",percentage:(0,U.jsx)(N.bsz,{}),color:I.palette.warning.main})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===ne||void 0===ne?void 0:ne.length,primary:"Zones",percentage:(0,U.jsx)(B.us2,{}),color:I.palette.info.main})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:3,children:(0,U.jsx)(F.A,{secondary:null===ne||void 0===ne?void 0:ne.length,primary:"Kilometer",percentage:(0,U.jsx)(B.us2,{}),color:I.palette.error.main})})]})}),L?(0,U.jsx)(q,{list:ee,aiMode:ae}):(0,U.jsx)(x.A,{sx:{maxHeight:"calc(100vh - 250px)",overflow:"auto","&::-webkit-scrollbar":{width:"12px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:I.palette.primary.main,borderRadius:"8px",cursor:"pointer"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:I.palette.primary.dark,cursor:"pointer"},"&::-webkit-scrollbar-track":{backgroundColor:I.palette.primary.lighter,cursor:"pointer"}},children:(0,U.jsxs)(p.A,{stickyHeader:!0,children:[(0,U.jsx)(u.A,{children:(0,U.jsxs)(A.A,{sx:{backgroundColor:"red"},children:[(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"#"}),1==ae&&(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Zone "}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Tenant "}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"order Location"}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Pickup "}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Delivery"}),(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Notes"}),1==ae&&(0,U.jsx)(m.A,{sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Rider"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Type"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Profit"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"Charges"}),(0,U.jsx)(m.A,{align:"center",sx:{position:"sticky !important",backgroundColor:I.palette.secondary.light},children:"KMS"})]})}),(0,U.jsxs)(j.A,{children:[0==(null===ee||void 0===ee?void 0:ee.length)&&(0,U.jsx)(A.A,{children:(0,U.jsx)(m.A,{colSpan:10,children:(0,U.jsx)(O.A,{})})}),ee&&1==ae?null===ee||void 0===ee?void 0:ee.map(((e,r)=>(0,U.jsx)(y.Fragment,{children:(0,U.jsxs)(A.A,{sx:{},children:[(0,U.jsx)(m.A,{children:(0,U.jsxs)(n.A,{children:[" ",r+1]})}),1==ae&&(0,U.jsx)(m.A,{children:(0,U.jsx)(l.A,{color:"primary",label:e.zone_name})}),(0,U.jsx)(m.A,{children:(0,U.jsxs)(o.A,{title:e.tenantaddress,children:[(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,U.jsxs)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,U.jsx)("br",{})]}),(0,U.jsx)(n.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,U.jsxs)(m.A,{align:"left",children:[(0,U.jsx)(o.A,{title:e.locationaddress,placement:"top",children:(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,U.jsx)(o.A,{title:"Order Id",children:(0,U.jsx)(n.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,U.jsxs)(o.A,{title:"Ordered date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,U.jsxs)(o.A,{title:"Delivery date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcontactno}),(0,U.jsx)(o.A,{title:e.pickupaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycontactno}),(0,U.jsx)(o.A,{title:e.deliveryaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:e.ordernotes}),1==ae&&(0,U.jsxs)(m.A,{align:"left",children:[(0,U.jsx)(n.A,{sx:{whiteSpace:"nowrap"},children:e.username}),(0,U.jsxs)(n.A,{children:["ID : ",e.userid]})]}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsx)(l.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary"})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"Charges",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,U.jsx)(o.A,{title:"Amount",placement:"left",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"KMS",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,U.jsx)(o.A,{title:"Cumulative Kms",placement:"right",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r))):null===ee||void 0===ee?void 0:ee.map(((e,r)=>(0,U.jsx)(y.Fragment,{children:(0,U.jsxs)(A.A,{sx:{},children:[(0,U.jsx)(m.A,{children:(0,U.jsxs)(n.A,{children:[" ",r+1]})}),(0,U.jsx)(m.A,{children:(0,U.jsxs)(o.A,{title:e.tenantaddress,children:[(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,U.jsxs)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,U.jsx)("br",{})]}),(0,U.jsx)(n.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,U.jsxs)(m.A,{align:"left",children:[(0,U.jsx)(o.A,{title:e.locationaddress,placement:"top",children:(0,U.jsx)(n.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,U.jsx)(o.A,{title:"Order Id",children:(0,U.jsx)(n.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,U.jsxs)(o.A,{title:"Ordered date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,U.jsxs)(o.A,{title:"Delivery date",children:[(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"12px"},children:z()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,U.jsx)(n.A,{noWrap:!0,sx:{fontSize:"11px"},children:z()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.pickupcontactno}),(0,U.jsx)(o.A,{title:e.pickupaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:(0,U.jsx)(s.A,{direction:"row",spacing:1,children:(0,U.jsxs)(s.A,{direction:"column",children:[(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycustomer}),(0,U.jsx)(n.A,{variant:"caption",children:e.deliverycontactno}),(0,U.jsx)(o.A,{title:e.deliveryaddress,children:(0,U.jsx)(n.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,U.jsx)(m.A,{align:"left",children:e.ordernotes}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsx)(l.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary"})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"Charges",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,U.jsx)(o.A,{title:"Amount",placement:"left",children:(0,U.jsx)(l.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,U.jsx)(m.A,{align:"center",children:(0,U.jsxs)(s.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,U.jsx)(o.A,{title:"KMS",placement:"top",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,U.jsx)(o.A,{title:"Cumulative Kms",placement:"right",children:(0,U.jsx)(l.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r)))]})]})}),(0,U.jsx)(f.A,{}),0==ae&&(0,U.jsxs)(h.Ay,{container:!0,spacing:2,sx:{p:2},children:[(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(v.A,{id:"free-solo-demo",options:he,renderInput:e=>(0,U.jsx)(g.A,(0,i.A)((0,i.A)({},e),{},{label:"Choose Payment"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){console.log("Selected:",r),_(r);const e=null===ee||void 0===ee?void 0:ee.map((e=>(0,i.A)((0,i.A)({},e),{},{paymenttype:r.apptypeid})));re(e)}}else _(null)}})}),(0,U.jsx)(h.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(v.A,{id:"free-solo-demo",options:Ae,renderInput:e=>(0,U.jsx)(g.A,(0,i.A)((0,i.A)({},e),{},{label:"Choose Rider"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){X(r),console.log("Selected:",r);const e=null===ee||void 0===ee?void 0:ee.map((e=>(0,i.A)((0,i.A)({},e),{},{userid:r.userid,userfcmtoken:r.userfcmtoken})));re(e)}}else X(null)}})})]}),(0,U.jsx)(f.A,{}),(0,U.jsxs)(s.A,{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:2,alignItems:{xs:"stretch",sm:"center"},justifyContent:"end",sx:{p:2},children:[(0,U.jsx)(a.A,{fullWidth:L,variant:"contained",color:"secondary",startIcon:(0,U.jsx)(D.A,{}),onClick:()=>{E("/nearle/orders")},children:"Back"}),(0,U.jsx)(a.A,{fullWidth:L,sx:{my:{xs:0,sm:2}},variant:"contained",disabled:0===ae&&(!Q||!$),onClick:async()=>{ie(!0),ye.mutate({deliveries:ee})},children:"Assign Orders"})]})]})}},62217:e=>{"use strict";e.exports="data:image/png;base64,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"},94826:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var i=t(59254),s=t(46639),n=t(62217),l=t(44414);const o=(0,i.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),c=(0,i.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),a=()=>(0,l.jsxs)(o,{children:[(0,l.jsx)(s.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(c,{children:(0,l.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file diff --git a/build/static/js/7875.9e6056f7.chunk.js b/build/static/js/7875.0f6b626d.chunk.js similarity index 99% rename from build/static/js/7875.9e6056f7.chunk.js rename to build/static/js/7875.0f6b626d.chunk.js index 30cca6b..c92ec1d 100644 --- a/build/static/js/7875.9e6056f7.chunk.js +++ b/build/static/js/7875.0f6b626d.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7875],{23787:(e,s,n)=>{n.d(s,{FG:()=>u,nV:()=>x,pY:()=>g,pg:()=>h});var t=n(89379),i=n(80045),a=n(93230),l=n(2235),r=n(16491),o=n(82053),c=n(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:s,scroll:n=!1,onScroll:l,sx:r}=e,o=(0,i.A)(e,d);return(0,c.jsx)(a.A,(0,t.A)((0,t.A)({spacing:1.25,onScroll:l,sx:(0,t.A)((0,t.A)({p:1.5},n&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),r)},o),{},{children:s}))},h=e=>{let{accent:s="#662582",header:n,footer:i,selected:a=!1,onClick:o,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:o,sx:(0,t.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:a?s:"#e2e8f0",background:a?"".concat(s,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(r.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:s}}),(0,c.jsxs)(r.A,{sx:{p:1.5,pl:2},children:[n,d,i]})]})},u=e=>{let{children:s,columns:n=2,sx:i}=e;return(0,c.jsx)(r.A,{sx:(0,t.A)({display:"grid",gridTemplateColumns:"repeat(".concat(n,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:s})},g=e=>{let{label:s,value:n,children:t,full:i=!1,align:a="left"}=e;return(0,c.jsxs)(r.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:a},children:[(0,c.jsx)(o.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:s}),(0,c.jsx)(r.A,{sx:{mt:.25,minWidth:0},children:void 0!==t?t:(0,c.jsx)(o.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==n&&void 0!==n?n:"\u2014"})})]})}},97875:(e,s,n)=>{n.r(s),n.d(s,{default:()=>ae});var t=n(89379),i=n(69780),a=n(9213),l=n(21671),r=n(16491),o=n(14857),c=n(47223),d=n(96583),x=n(40033),h=n(28170),u=n(60899),g=n(29277),A=n(29925),m=n(79739),j=n(93230),p=n(82223),v=n(82917),y=n(41413),f=n(82053),b=n(25277),C=n(15769),w=n(34075),S=n(33738),F=n(46639),k=n(48159),I=n(84142),P=n(74745),R=n(249),W=n(26050),z=n(14195),q=n(2046),_=n(25333),D=n(25979),N=n(2660),O=n(23787),Y=n(77922),B=n(44070),H=n(8750),E=n(60767),M=n(37476),T=n(8881),U=n(4159),K=n.n(U),L=n(51400),V=n(39060),G=n(50027),Z=n(9950),Q=n(26910),X=n(52351),J=n(56713),$=n(1320),ee=n(6258),se=n(7251),ne=n(80691),te=n(99459),ie=n(44414);const ae=()=>{function e(e,s,n){return s[n]e[n]?1:0}const s=[{id:"sno",disablePadding:!0,label:"#"},{id:"tenantname",numeric:!1,disablePadding:!1,label:"REQUESTOR"},{id:"contact",numeric:!1,disablePadding:!1,label:"BANK"},{id:"address3",disablePadding:!1,label:"IFSC"},{id:"address",disablePadding:!1,label:"REF NO"},{id:"amount",disablePadding:!1,label:"AMOUNT"},{id:"city",disablePadding:!1,label:"REASON"}];function n(e){const{order:n,orderBy:t,onRequestSort:o}=e;return(0,ie.jsx)(i.A,{children:(0,ie.jsx)(a.A,{children:s.map((e=>{return(0,ie.jsx)(l.A,{align:e.numeric?"right":"left",padding:e.disablePadding?"none":"normal",sortDirection:t===e.id&&n,children:(0,ie.jsxs)(se.A,{active:t===e.id,direction:t===e.id?n:"asc",onClick:(s=e.id,e=>{o(e,s)}),children:[e.label,t===e.id?(0,ie.jsx)(r.A,{component:"span",sx:ne.A,children:"desc"===n?"sorted descending":"sorted ascending"}):null]})},e.id);var s}))})})}function U(){const s=(0,o.A)(),D=(0,c.A)(s.breakpoints.down("md")),[N,E]=Z.useState("asc"),[U,X]=Z.useState("calories"),[se,ne]=Z.useState([]),[ae,le]=Z.useState(0),[de,xe]=Z.useState(10),[he,ue]=(0,Z.useState)(""),[ge,je]=(0,Z.useState)(""),[pe,ye]=(0,Z.useState)(""),[we,Se]=(0,Z.useState)(""),[Fe,ke]=(0,Z.useState)(""),[Ie,Pe]=(0,Z.useState)(""),[Re,We]=(0,Z.useState)(""),[ze,qe]=(0,Z.useState)(""),[_e,De]=(0,Z.useState)(""),[Ne,Oe]=(0,Z.useState)(""),[Ye]=(0,Z.useState)(""),[Be,He]=(0,Z.useState)({});te.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[Ee,Me]=(0,Z.useState)([]),[Te]=(0,Z.useState)([]),[Ue,Ke]=(0,Z.useState)(0),[Le]=(0,Z.useState)(!1),[Ve]=(0,Z.useState)(!1),[Ge]=(0,Z.useState)(!1),[Ze,Qe]=(0,Z.useState)(""),[Xe,Je]=(0,Z.useState)(""),[$e,es]=(0,Z.useState)("");(0,Z.useEffect)((()=>{Me([{sno:1,role:"",cost:"",serviceid:0,tenantid:0,categoryid:0,subcategoryid:0,servicecode:"",servicename:"",unitid:0,unitname:"",serviceamount:"",discountid:0,taxpercent:0,taxamount:0,servicevalue:0,categoryname:""}]),console.log(Ee)}),[]);const ss=e=>{(0,T.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),console.log(alertmessage)};(0,Z.useEffect)((()=>{try{te.A.fromAddress(Fe).then((e=>{if("OK"==e.status){const{lat:s,lng:n}=e.results[0].geometry.location;He({lat:s,lng:n}),console.log(e)}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[Fe]),(0,Z.useEffect)((()=>{console.log("rolesarr"),console.log(Ee)}),[Ee]);const ns=async()=>{console.log("submit");let e=[],s=!1;if(Ee.map((n=>{n.role&&n.cost||(s=!0),e.push({serviceid:n.serviceid,tenantid:Ye,categoryid:n.categoryid,subcategoryid:n.subcategoryid,servicecode:n.servicecode,servicename:n.servicename,unitid:n.unitid,unitname:n.unitname,serviceamount:parseFloat(n.serviceamount),categoryname:n.categoryname,subcategoryname:n.servicename})})),console.log(e),s)(0,T.M8)("Fill all Details",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3});else try{me(!0),await Q.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/tenants/update/services"),e).then((e=>{console.log("res:",e),"Update successful"===e.data.message&&(0,T.M8)("Service Updated Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),me(!1)})).catch((e=>{console.log(e),me(!1)}))}catch(n){console.log(n),me(!1)}},ts=(e,s)=>{const n=se.indexOf(s);let t=[];-1===n?t=t.concat(se,s):0===n?t=t.concat(se.slice(1)):n===se.length-1?t=t.concat(se.slice(0,-1)):n>0&&(t=t.concat(se.slice(0,n),se.slice(n+1))),ne(t)},is=e=>-1!==se.indexOf(e),as=ae>0?Math.max(0,(1+ae)*de-ce.length):0,ls=Z.useMemo((()=>function(e,s){const n=e.map(((e,s)=>[e,s]));return n.sort(((e,n)=>{const t=s(e[0],n[0]);return 0!==t?t:e[1]-n[1]})),n.map((e=>e[0]))}(ce,function(s,n){return"desc"===s?(s,t)=>e(s,t,n):(s,t)=>-e(s,t,n)}(N,U)).slice(ae*de,ae*de+de)),[N,U,ae,de]);return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsxs)(d.A,{fullWidth:!0,open:ve,onClose:Ce,scroll:"paper",fullScreen:D,maxWidth:"sm",TransitionComponent:M.s,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,ie.jsx)(x.A,{children:"Create Request"}),(0,ie.jsx)(h.A,{dividers:!0,children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:2.5,children:[(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Reference No"}),(0,ie.jsx)(A.A,{type:"number",fullWidth:!0,sx:{width:"100%"},value:Ze,onChange:e=>{Qe(e.target.value),console.log(e)}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Requestor"}),(0,ie.jsx)(A.A,{value:Xe,onChange:e=>Je(e.target.value),fullWidth:!0,sx:{width:"100%"}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Bank Name"}),(0,ie.jsx)(A.A,{value:$e,sx:{width:"100%"},onChange:e=>es(e.target.value)})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Amount"}),(0,ie.jsx)(A.A,{type:"number",value:amount,sx:{width:"100%"},onChange:e=>setAmount(e.target.value)})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Account No"}),(0,ie.jsx)(A.A,{type:"number",fullWidth:!0,sx:{width:"100%"},value:accountno,onChange:e=>{setAccountno(e.target.value),console.log(e)}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"IFSC Code"}),(0,ie.jsx)(A.A,{value:ifsc,onChange:e=>setIfsc(e.target.value),fullWidth:!0,sx:{width:"100%"}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Reason"}),(0,ie.jsx)(A.A,{value:reason,onChange:e=>setReason(e.target.value),fullWidth:!0,sx:{width:"100%"}})]})]})})}),(0,ie.jsx)(m.A,{children:(0,ie.jsx)(u.Ay,{container:!0,children:(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[(0,ie.jsx)(p.A,{variant:"contained",onClick:()=>{(()=>{if(Ze)if(Xe)if($e)if(amount)if(accountno)if(ifsc)if(reason){let e={requestid:0,requestdate:K()().format("YYYY-MM-DD HH:mm:ss"),referenceno:Ze,Apptypeid:22,requesttype:"staffexpenses",reason:reason,requestor:Xe,amount:amount,Accountno:accountno,bankname:$e,ifsccode:ifsc};console.log(e)}else ss("Fill Reason");else ss("Fill IFSC");else ss("Fill Account No");else ss("Fill Amount");else ss("Fill Bank Name");else ss("Fill Requestor");else ss("Fill Reference No")})()},children:"Update"}),(0,ie.jsx)(p.A,{variant:"contained",onClick:()=>{Ce()},color:"error",children:"Close"})]})})})})]}),(0,ie.jsxs)(r.A,{sx:{width:"100%"},children:[D&&(0,ie.jsxs)(O.nV,{scroll:!0,children:[Ae&&[0,1,2,3,4].map((e=>(0,ie.jsxs)(O.pg,{accent:"#662582",children:[(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ie.jsx)(v.A,{variant:"circular",width:32,height:32}),(0,ie.jsxs)(j.A,{sx:{flex:1},children:[(0,ie.jsx)(v.A,{animation:"wave",width:"60%"}),(0,ie.jsx)(v.A,{animation:"wave",width:"40%"})]})]}),(0,ie.jsxs)(O.FG,{children:[(0,ie.jsx)(O.pY,{label:"Amount",value:(0,ie.jsx)(v.A,{animation:"wave",width:50})}),(0,ie.jsx)(O.pY,{label:"Ref No",value:(0,ie.jsx)(v.A,{animation:"wave",width:50})})]})]},e))),!Ae&&ls.map(((e,s)=>{const n=is(e.sno);return(0,ie.jsx)(O.pg,{accent:"#662582",selected:n,onClick:s=>ts(0,e.sno),header:(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,ie.jsx)(y.A,{sx:{width:32,height:32,bgcolor:"#66258218",color:"#662582",fontSize:13},children:e.requestor?String(e.requestor).charAt(0).toUpperCase():"#"}),(0,ie.jsxs)(j.A,{sx:{minWidth:0},children:[(0,ie.jsx)(f.A,{sx:{fontSize:14,fontWeight:700,color:"#0f172a"},noWrap:!0,children:e.requestor||"\u2014"}),(0,ie.jsxs)(f.A,{sx:{fontSize:11,color:"#94a3b8"},noWrap:!0,children:["#",e.sno]})]})]}),null!=e.amount&&(0,ie.jsx)(b.A,{label:e.amount,size:"small",sx:{bgcolor:"#66258218",color:"#662582",fontWeight:700}})]}),children:(0,ie.jsxs)(O.FG,{children:[(0,ie.jsx)(O.pY,{label:"Bank",value:e.bankname}),(0,ie.jsx)(O.pY,{label:"Account No",value:e.accountno}),(0,ie.jsx)(O.pY,{label:"IFSC",value:e.ifsccode}),(0,ie.jsx)(O.pY,{label:"Ref No",value:e.referenceno}),(0,ie.jsx)(O.pY,{label:"Reason",value:e.reason,full:!0})]})},e.sno)})),!Ae&&0===ls.length&&(0,ie.jsxs)(j.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,ie.jsx)(y.A,{sx:{width:64,height:64,bgcolor:"#f1f5f9",color:"#94a3b8"}}),(0,ie.jsx)(f.A,{sx:{fontSize:15,fontWeight:700,color:"#0f172a"},children:"No requests to show"}),(0,ie.jsx)(f.A,{sx:{fontSize:13,color:"#94a3b8"},children:"Requests will appear here once available."})]})]}),(0,ie.jsx)($.A,{sx:{width:"100%",borderBottom:1,borderColor:"divider",display:D?"none":"block"},children:(0,ie.jsxs)(C.A,{sx:{minWidth:750},"aria-labelledby":"tableTitle",size:"medium",children:[(0,ie.jsx)(n,{numSelected:se.length,order:N,orderBy:U,onSelectAllClick:e=>{if(e.target.checked){const e=ce.map((e=>e.name));ne(e)}else ne([])},onRequestSort:(e,s)=>{E(U===s&&"asc"===N?"desc":"asc"),X(s)},rowCount:ce.length}),Ae&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(w.A,{children:[0,1,2,3,4,5,6,7,8,9].map((e=>(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsxs)(j.A,{direction:"row",spacing:1,children:[(0,ie.jsx)(v.A,{variant:"circular",width:40,height:40}),(0,ie.jsxs)(j.A,{direction:"column",children:[(0,ie.jsx)(v.A,{animation:"wave",width:100}),(0,ie.jsx)(v.A,{animation:"wave",width:100})]})]})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})})]},e)))})}),(0,ie.jsxs)(w.A,{children:[ls.map(((e,s)=>{const n=is(e.sno),o="enhanced-table-checkbox-".concat(s);return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsxs)(a.A,{hover:!0,onClick:s=>ts(0,e.sno),role:"checkbox","aria-checked":n,tabIndex:-1,sx:{cursor:"pointer"},children:[(0,ie.jsx)(l.A,{component:"th",id:o,scope:"row",padding:"none",children:e.sno}),(0,ie.jsx)(l.A,{align:"left",sx:{paddingLeft:"0px !important"},children:(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,justifyContent:"flex-start",children:[(0,ie.jsx)(y.A,{alt:"",size:"sm",sx:{width:"25px",height:"25px"}}),(0,ie.jsx)(j.A,{direction:"column",children:(0,ie.jsx)(f.A,{variant:"caption",children:e.requestor})})]})}),(0,ie.jsxs)(l.A,{align:"left",children:[(0,ie.jsxs)(f.A,{variant:"caption",children:[" ",e.accountno]}),(0,ie.jsxs)(f.A,{variant:"h6",children:[" ",e.bankname]})]}),(0,ie.jsx)(l.A,{children:e.ifsccode}),(0,ie.jsx)(l.A,{align:"left",children:e.referenceno}),(0,ie.jsx)(l.A,{children:e.amount}),(0,ie.jsx)(l.A,{children:e.reason})]},e.sno),(0,ie.jsx)(a.A,{children:(0,ie.jsxs)(l.A,{style:{paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0},colSpan:8,sx:{width:"100%"},children:[(0,ie.jsx)(S.A,{in:expandopen===e.sno,timeout:"auto",unmountOnExit:!0,children:(0,ie.jsx)(M.A,{type:"slide",direction:"down",in:!0,children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:Ge?(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(G.A,{children:(0,ie.jsx)(j.A,{alignItems:"center",children:(0,ie.jsx)(F.A,{})})})}):(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsxs)(k.A,{value:Ue,onChange:(e,s)=>Ke(s),children:[(0,ie.jsx)(I.A,{label:"client Details"}),(0,ie.jsx)(I.A,{label:"Client Pricing"})]}),0===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:2.5,sx:{pl:{xs:0,sm:5,md:6,lg:10,xl:12},p:2},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:5,md:4,lg:4,xl:3,children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{spacing:2.5,alignItems:"center",children:[(0,ie.jsx)(y.A,{alt:"Avatar 1",size:"xl"}),(0,ie.jsxs)(j.A,{spacing:.5,alignItems:"center",children:[(0,ie.jsx)(f.A,{variant:"h5",children:he}),(0,ie.jsx)(f.A,{color:"secondary",children:we})]})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(P.A,{})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(R.A,{component:"nav","aria-label":"main mailbox folders",sx:{py:0},children:[(0,ie.jsxs)(W.Ay,{children:[(0,ie.jsx)(z.A,{children:(0,ie.jsx)(L.A,{})}),(0,ie.jsx)(f.A,{align:"right",children:ge})]}),(0,ie.jsxs)(W.Ay,{children:[(0,ie.jsx)(z.A,{children:(0,ie.jsx)(V.A,{})}),(0,ie.jsxs)(f.A,{align:"left",children:["+1 ",pe]})]})]})})]})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:7,md:8,lg:8,xl:9,children:(0,ie.jsx)(G.A,{title:(0,ie.jsx)(r.A,{sx:{p:1},children:"Contact Details"}),sx:{height:"100%"},children:(0,ie.jsxs)(R.A,{sx:{py:0},children:[(0,ie.jsx)(W.Ay,{children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:" Contact Name"}),(0,ie.jsx)(f.A,{children:ze})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6})]})}),(0,ie.jsx)(W.Ay,{children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:"Address"}),(0,ie.jsx)(f.A,{children:Fe})]})}),(0,ie.jsx)(W.Ay,{children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:"City"}),(0,ie.jsx)(f.A,{children:Ie})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:"Zip Code"}),(0,ie.jsx)(f.A,{children:Re})]})})]})})]})})})]})}),1===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(u.Ay,{container:!0,sx:{p:1},children:(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(G.A,{sx:{height:"100%",p:1},children:Ee[0].role?(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)($.A,{sx:{width:"100%",borderBottom:1,borderColor:"divider"},children:(0,ie.jsxs)(C.A,{sx:{width:"100%"},children:[(0,ie.jsx)(i.A,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:"#"}),(0,ie.jsx)(l.A,{sx:{width:"30%"},children:"Category"}),(0,ie.jsx)(l.A,{sx:{width:"30%"},children:"Skill"}),(0,ie.jsx)(l.A,{sx:{width:"30%"},children:"Cost/Hr"})]})}),(0,ie.jsx)(w.A,{children:Ee.map((e=>(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:e.sno}),(0,ie.jsx)(l.A,{children:e.categoryname}),(0,ie.jsx)(l.A,{children:e.role}),(0,ie.jsx)(l.A,{children:e.cost})]})})))})]})})}):(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(f.A,{children:"No Data found"})})})})})})]})})})}),(0,ie.jsx)(S.A,{in:editexpandopen===e.sno,timeout:"auto",unmountOnExit:!0,children:(0,ie.jsx)(M.A,{type:"slide",direction:"down",in:!0,children:Ge?(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(G.A,{children:(0,ie.jsx)(j.A,{alignItems:"center",children:(0,ie.jsx)(F.A,{})})})}):(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(G.A,{sx:{height:"100%"},children:[(0,ie.jsxs)(k.A,{value:Ue,onChange:(e,s)=>Ke(s),children:[(0,ie.jsx)(I.A,{label:"client Details"}),(0,ie.jsx)(I.A,{label:"Client Pricing"})]}),0===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:2.5,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:5,md:4,lg:4,xl:3,children:(0,ie.jsx)(G.A,{title:(0,ie.jsx)(r.A,{sx:{p:1},children:"Client"}),sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{spacing:2,alignItems:"center",sx:{width:"100%"},children:[(0,ie.jsx)(A.A,{type:"text",label:"Business name",fullWidth:!0,sx:{width:"100%"},value:he,onChange:e=>ue(e.target.value)}),(0,ie.jsx)(A.A,{type:"number",value:we,onChange:e=>Se(e.target.value),label:"Business No.",fullWidth:!0,sx:{width:"100%"}})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(R.A,{component:"nav","aria-label":"main mailbox folders",sx:{py:0},children:(0,ie.jsxs)(j.A,{direction:"column",spacing:2,sx:{width:"100%"},children:[(0,ie.jsx)(A.A,{type:"email",value:ge,sx:{width:"100%"},onChange:e=>je(e.target.value),label:"Email"}),(0,ie.jsx)(A.A,{type:"number",value:pe,placeholder:"Mobile Number",InputProps:{startAdornment:(0,ie.jsx)(q.A,{position:"start",children:"+1"})},sx:{width:"100%"},onChange:e=>ye(e.target.value)})]})})})]})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:7,md:8,lg:8,xl:9,children:(0,ie.jsx)(G.A,{title:(0,ie.jsx)(r.A,{sx:{p:1},children:"Contact Details"}),sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(j.A,{spacing:.5,children:(0,ie.jsx)(A.A,{type:"text",value:ze,onChange:e=>qe(e.target.value),label:"Contact Name"})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(ie.Fragment,{}),(0,ie.jsx)(J.default,{className:"automap",apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",style:{width:"100%",height:"40px",borderRadius:"5px",border:"1px solid #e0e0e0",textIndent:"10px",outline:"none"},onPlaceSelected:e=>{let s,n,t,i;ke(e.formatted_address);for(let a=0;ake(e.target.value)})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsx)(j.A,{spacing:.5,children:(0,ie.jsx)(A.A,{label:"City",type:"text",value:Ie,onChange:e=>Pe(e.target.value)})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsx)(j.A,{spacing:.5,children:(0,ie.jsx)(A.A,{label:"Zip Code",value:Re,onChange:e=>We(e.target.value)})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(j.A,{direction:"row",justifyContent:"flex-end",children:(0,ie.jsxs)(p.A,{variant:"contained",onClick:()=>{(async()=>{if(he)if(we)if(ge)if(pe)if(ze)if(Fe)if(Ie)if(Re)if(Be.lat&&Be.lng)if(!Le&&!Ve||Ee[0].role&&Ee[0].cost){let s={tenantid:Ye,registrationno:we,tenantname:he,primaryemail:ge,primarycontact:ze,contactno:pe,address:Fe,suburb:Ne,city:Ie,state:_e,postcode:Re,latitude:Be.lat.toString(),longitude:Be.lng.toString(),approved:Le&&1===re||!Le&&0===re&&!Ve?1:0};console.log(s);try{me(!0),await Q.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/tenants/update"),s).then((e=>{console.log("res:",e),"Update successful"===e.data.message&&((0,T.M8)("Client Details Updated Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3}),me(!0),setTimeout((()=>{be(),fe(),oe(0),me(!1)}),2e3)),me(!1)})).catch((e=>{console.log(e),me(!1)}))}catch(e){console.log(e),me(!1)}}else ss("Fill client pricing");else setAlertmessage("Fill correct address"),ss("Fill correct address");else ss("Fill Zip code");else ss("Fill City name");else ss("Fill Address");else ss("Fill Contact name");else ss("Fill Mobile number");else ss("Fill Email address");else ss("Fill Business No.");else ss("Fill Business name")})(),Le&&ns()},children:["Update ",Le?"& Approve":"",Ve?"& Disable":""]})})})]})})})]})})}),1===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(u.Ay,{container:!0,children:(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(G.A,{sx:{height:"100%",p:1},children:(0,ie.jsxs)(G.A,{sx:{height:"100%"},children:[(0,ie.jsx)($.A,{sx:{width:"100%",borderBottom:1,borderColor:"divider"},children:(0,ie.jsxs)(C.A,{sx:{width:"100%"},children:[(0,ie.jsx)(i.A,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:"#"}),(0,ie.jsx)(l.A,{children:"Category"}),(0,ie.jsx)(l.A,{sx:{width:"40%"},children:"Skill"}),(0,ie.jsx)(l.A,{sx:{width:"40%"},children:"Cost/Hr"}),(0,ie.jsx)(l.A,{sx:{width:"10px"}})]})}),(0,ie.jsx)(w.A,{children:Ee.map((e=>(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:e.sno}),(0,ie.jsx)(l.A,{children:e.categoryname}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(Y.A,{fullWidth:!0,id:"venuetype33",variant:"outlined",error:!0,freeSolo:!0,options:Te.sort(((e,s)=>-s.categoryname.localeCompare(e.categoryname))),groupBy:e=>e.categoryname,getOptionLabel:e=>e.subcategoryname,isOptionEqualToValue:(e,s)=>e.subcategoryid===s.subcategoryid,onChange:(s,n)=>{if(n){console.log("eval",s);let t=Ee.find((e=>e.subcategoryid===n.subcategoryid));if(console.log(n),t)ss("select different skill");else{let s=Ee;s[e.sno-1].role=n.subcategoryname,s[e.sno-1].categoryname=n.categoryname,s[e.sno-1].categoryid=n.categoryid,s[e.sno-1].subcategoryid=n.subcategoryid,s[e.sno-1].servicename=n.subcategoryname,s[e.sno-1].unitid=n.unitid,s[e.sno-1].unitname=n.unitname,Me([...s])}}console.log(n)},renderInput:s=>(0,ie.jsx)(A.A,(0,t.A)((0,t.A)({},s),{},{placeholder:"Choose a Skill",defaultValue:e.role,variant:"outlined",sx:{input:{"&::placeholder":{opacity:.9}}}})),value:{categoryid:e.categoryid,categoryname:"",cost:e.serviceamount,label:e.servicename,status:0,subcategoryid:e.subcategoryid,subcategoryname:e.servicename,unitid:e.unitid,unitname:e.unitname},disabled:!!Ae})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(A.A,{type:"number",onChange:s=>{let n=Ee;s.target.value<1e3&&(n[e.sno-1].cost=s.target.value,n[e.sno-1].servicevalue=s.target.value,n[e.sno-1].serviceamount=s.target.value,Me([...n])),console.log(s.target.value)},value:e.cost,autoComplete:"off",fullWidth:!0})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(_.A,{onClick:()=>(async(e,s)=>{console.log(s);let n=Ee;if(0!==s.serviceid&&Ee.length>1){console.log([{serviceid:s.serviceid,tenantid:s.tenantid,categoryid:s.categoryid,subcategoryid:s.subcategoryid,servicecode:s.servicecode,servicename:s.servicename,unitid:s.unitid,unitname:s.unitname,serviceamount:s.servicevalue}]);try{await Q.A.delete("".concat("https://jupiter.nearle.app/live/api/v2","/tenants/delete/services"),{data:[{serviceid:s.serviceid,tenantid:s.tenantid,categoryid:s.categoryid,subcategoryid:s.subcategoryid,servicecode:s.servicecode,servicename:s.servicename,unitid:s.unitid,unitname:s.unitname,serviceamount:s.servicevalue}]}).then((s=>{console.log("res"),console.log(s),"Deleted successful"===s.data.message&&((0,T.M8)("Client pricing Deleted",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),n.splice(e-1,1),n.map(((e,s)=>{e.sno=s+1})),console.log(n),Me([...n]))})).catch((e=>{console.log(e),me(!1)}))}catch(t){console.log(t),me(!1)}}else Ee.length>1?(n.splice(e-1,1),n.map(((e,s)=>{e.sno=s+1})),console.log(n),Me([...n])):1===Ee.length&&Me([{sno:1,role:"",cost:"",serviceid:s.serviceid,tenantid:0,categoryid:0,subcategoryid:0,servicecode:"",servicename:"",unitid:0,unitname:"",serviceamount:"",discountid:0,taxpercent:0,taxamount:0,servicevalue:0,categoryname:""}])})(e.sno,e),color:"error",children:(0,ie.jsx)(B.A,{})})})]})})))})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(p.A,{color:"primary",endIcon:(0,ie.jsx)(H.A,{}),onClick:()=>(()=>{let e=Ee;e[e.length-1].role&&e[e.length-1].cost?(e.push({sno:e.length+1,cost:"",role:"",serviceid:0,tenantid:0,categoryid:0,subcategoryid:0,servicecode:"",servicename:"",unitid:0,unitname:"",serviceamount:"",discountid:0,taxpercent:0,taxamount:0,servicevalue:0,categoryname:""}),Me([...e])):ss("Fill all Previous Details")})(),sx:{m:2},variant:"dashed",size:"extraSmall",children:"ADD SKILL"})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(u.Ay,{container:!0,justifyContent:"flex-end",children:(0,ie.jsx)(u.Ay,{item:!0,children:(0,ie.jsx)(p.A,{variant:"contained",size:"small",onClick:ns,children:"Update"})})})})]})})})})})]})})})})]})})]})})),as>0&&(0,ie.jsx)(a.A,{style:{height:53*as},children:(0,ie.jsx)(l.A,{colSpan:6})})]})]})}),(0,ie.jsx)(ee.A,{rowsPerPageOptions:[10,25,50,100],component:"div",count:ce.length,rowsPerPage:de,page:ae,onPageChange:(e,s)=>{le(s)},onRowsPerPageChange:e=>{xe(parseInt(e.target.value,10)),le(0)}})]})]})}const ae=(0,o.A)(),le=(0,c.A)(ae.breakpoints.down("md")),[re,oe]=(0,Z.useState)(0),[ce,de]=(0,Z.useState)([]),[xe,he]=(0,Z.useState)([]),[ue,ge]=(0,Z.useState)([]),[Ae,me]=(0,Z.useState)(!1),[je,pe]=(0,Z.useState)(""),[ve,ye]=(0,Z.useState)(!1);(0,Z.useEffect)((()=>{localStorage.getItem("partnerid")&&(be(localStorage.getItem("partnerid")),fe(localStorage.getItem("partnerid")))}),[]),(0,Z.useEffect)((()=>{}),[je,re]);const fe=async e=>{me(!0);try{await Q.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/payments/requests/getpaymentrequest/?partnerid=").concat(e,"&status=1")).then((e=>{if("Successful"===e.data.message){let s=[];e.data.details.map(((e,n)=>{s=[...s,(0,t.A)((0,t.A)({},e),{},{sno:n+1})]})),he(s),console.log(e.data.details),me(!1)}})).catch((e=>{console.log(e),me(!1)}))}catch(s){console.log(s),me(!1)}},be=async e=>{me(!0);try{await Q.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/payments/requests/getpaymentrequest/?partnerid=").concat(e,"&status=0")).then((e=>{if("Success"===e.data.message){let s=[];e.data.details.map(((e,n)=>{s=[...s,(0,t.A)((0,t.A)({},e),{},{sno:n+1})]})),ge(s),de(s),console.log(e.data.details),me(!1)}})).catch((e=>{console.log(e),me(!1)}))}catch(s){console.log(s),me(!1)}},Ce=()=>{ye(!1)};return(0,ie.jsxs)(ie.Fragment,{children:[Ae&&(0,ie.jsx)(X.A,{}),(0,ie.jsxs)(u.Ay,{container:!0,rowSpacing:2,columnSpacing:2.75,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"stretch",sm:"center"},spacing:{xs:1.5,sm:0},children:[(0,ie.jsx)(f.A,{variant:"h3",children:"Payment Requests"}),(0,ie.jsx)(p.A,{variant:"contained",fullWidth:le,onClick:()=>{},children:"Create Request"})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(r.A,{sx:{overflow:"auto",border:1,borderColor:"grey.200",borderRadius:2,backgroundColor:"#fff",minHeight:400},children:[(0,ie.jsxs)(j.A,{alignItems:"center",justifyContent:"space-between",direction:"row",sx:{p:2,width:"100%",flexWrap:"wrap",gap:1},children:[(0,ie.jsxs)(k.A,{value:re,onChange:(e,s)=>{oe(s),1===s&&de(xe),0===s&&de(ue)},variant:"scrollable",scrollButtons:"auto",children:[(0,ie.jsx)(I.A,{label:"Pending",icon:(0,ie.jsx)(b.A,{label:ue.length,color:"primary",variant:"light",size:"small"}),iconPosition:"end"}),(0,ie.jsx)(I.A,{label:"Paid",iconPosition:"end",icon:(0,ie.jsx)(b.A,{label:xe.length,color:"primary",variant:"light",size:"small"})})]}),(0,ie.jsx)(D.A,{sx:{width:{xs:"100%",md:250}},children:(0,ie.jsx)(N.A,{size:"small",id:"header-search",startAdornment:(0,ie.jsx)(q.A,{position:"start",sx:{mr:-.5},children:(0,ie.jsx)(E.A,{})}),"aria-describedby":"header-search-text",inputProps:{"aria-label":"weight"},placeholder:"Search",value:je,onChange:e=>{pe(e.target.value)},autoComplete:"off"})})]}),(0,ie.jsx)(U,{})]})})]})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7875],{23787:(e,s,n)=>{n.d(s,{FG:()=>u,nV:()=>x,pY:()=>g,pg:()=>h});var t=n(89379),i=n(80045),a=n(93230),l=n(2235),r=n(16491),o=n(82053),c=n(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:s,scroll:n=!1,onScroll:l,sx:r}=e,o=(0,i.A)(e,d);return(0,c.jsx)(a.A,(0,t.A)((0,t.A)({spacing:1.25,onScroll:l,sx:(0,t.A)((0,t.A)({p:1.5},n&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),r)},o),{},{children:s}))},h=e=>{let{accent:s="#662582",header:n,footer:i,selected:a=!1,onClick:o,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:o,sx:(0,t.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:a?s:"#e2e8f0",background:a?"".concat(s,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(r.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:s}}),(0,c.jsxs)(r.A,{sx:{p:1.5,pl:2},children:[n,d,i]})]})},u=e=>{let{children:s,columns:n=2,sx:i}=e;return(0,c.jsx)(r.A,{sx:(0,t.A)({display:"grid",gridTemplateColumns:"repeat(".concat(n,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:s})},g=e=>{let{label:s,value:n,children:t,full:i=!1,align:a="left"}=e;return(0,c.jsxs)(r.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:a},children:[(0,c.jsx)(o.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:s}),(0,c.jsx)(r.A,{sx:{mt:.25,minWidth:0},children:void 0!==t?t:(0,c.jsx)(o.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==n&&void 0!==n?n:"\u2014"})})]})}},97875:(e,s,n)=>{n.r(s),n.d(s,{default:()=>ae});var t=n(89379),i=n(69780),a=n(9213),l=n(21671),r=n(16491),o=n(14857),c=n(47223),d=n(96583),x=n(40033),h=n(28170),u=n(60899),g=n(29277),A=n(29925),m=n(79739),j=n(93230),p=n(10226),v=n(82917),y=n(41413),f=n(82053),b=n(25277),C=n(15769),w=n(34075),S=n(33738),F=n(46639),k=n(48159),I=n(84142),P=n(74745),R=n(249),W=n(26050),z=n(14195),q=n(2046),_=n(25333),D=n(25979),N=n(2660),O=n(23787),Y=n(77922),B=n(44070),H=n(8750),E=n(60767),M=n(37476),T=n(8881),U=n(4159),K=n.n(U),L=n(51400),V=n(39060),G=n(50027),Z=n(9950),Q=n(26910),X=n(52351),J=n(56713),$=n(1320),ee=n(6258),se=n(7251),ne=n(80691),te=n(99459),ie=n(44414);const ae=()=>{function e(e,s,n){return s[n]e[n]?1:0}const s=[{id:"sno",disablePadding:!0,label:"#"},{id:"tenantname",numeric:!1,disablePadding:!1,label:"REQUESTOR"},{id:"contact",numeric:!1,disablePadding:!1,label:"BANK"},{id:"address3",disablePadding:!1,label:"IFSC"},{id:"address",disablePadding:!1,label:"REF NO"},{id:"amount",disablePadding:!1,label:"AMOUNT"},{id:"city",disablePadding:!1,label:"REASON"}];function n(e){const{order:n,orderBy:t,onRequestSort:o}=e;return(0,ie.jsx)(i.A,{children:(0,ie.jsx)(a.A,{children:s.map((e=>{return(0,ie.jsx)(l.A,{align:e.numeric?"right":"left",padding:e.disablePadding?"none":"normal",sortDirection:t===e.id&&n,children:(0,ie.jsxs)(se.A,{active:t===e.id,direction:t===e.id?n:"asc",onClick:(s=e.id,e=>{o(e,s)}),children:[e.label,t===e.id?(0,ie.jsx)(r.A,{component:"span",sx:ne.A,children:"desc"===n?"sorted descending":"sorted ascending"}):null]})},e.id);var s}))})})}function U(){const s=(0,o.A)(),D=(0,c.A)(s.breakpoints.down("md")),[N,E]=Z.useState("asc"),[U,X]=Z.useState("calories"),[se,ne]=Z.useState([]),[ae,le]=Z.useState(0),[de,xe]=Z.useState(10),[he,ue]=(0,Z.useState)(""),[ge,je]=(0,Z.useState)(""),[pe,ye]=(0,Z.useState)(""),[we,Se]=(0,Z.useState)(""),[Fe,ke]=(0,Z.useState)(""),[Ie,Pe]=(0,Z.useState)(""),[Re,We]=(0,Z.useState)(""),[ze,qe]=(0,Z.useState)(""),[_e,De]=(0,Z.useState)(""),[Ne,Oe]=(0,Z.useState)(""),[Ye]=(0,Z.useState)(""),[Be,He]=(0,Z.useState)({});te.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[Ee,Me]=(0,Z.useState)([]),[Te]=(0,Z.useState)([]),[Ue,Ke]=(0,Z.useState)(0),[Le]=(0,Z.useState)(!1),[Ve]=(0,Z.useState)(!1),[Ge]=(0,Z.useState)(!1),[Ze,Qe]=(0,Z.useState)(""),[Xe,Je]=(0,Z.useState)(""),[$e,es]=(0,Z.useState)("");(0,Z.useEffect)((()=>{Me([{sno:1,role:"",cost:"",serviceid:0,tenantid:0,categoryid:0,subcategoryid:0,servicecode:"",servicename:"",unitid:0,unitname:"",serviceamount:"",discountid:0,taxpercent:0,taxamount:0,servicevalue:0,categoryname:""}]),console.log(Ee)}),[]);const ss=e=>{(0,T.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),console.log(alertmessage)};(0,Z.useEffect)((()=>{try{te.A.fromAddress(Fe).then((e=>{if("OK"==e.status){const{lat:s,lng:n}=e.results[0].geometry.location;He({lat:s,lng:n}),console.log(e)}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[Fe]),(0,Z.useEffect)((()=>{console.log("rolesarr"),console.log(Ee)}),[Ee]);const ns=async()=>{console.log("submit");let e=[],s=!1;if(Ee.map((n=>{n.role&&n.cost||(s=!0),e.push({serviceid:n.serviceid,tenantid:Ye,categoryid:n.categoryid,subcategoryid:n.subcategoryid,servicecode:n.servicecode,servicename:n.servicename,unitid:n.unitid,unitname:n.unitname,serviceamount:parseFloat(n.serviceamount),categoryname:n.categoryname,subcategoryname:n.servicename})})),console.log(e),s)(0,T.M8)("Fill all Details",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3});else try{me(!0),await Q.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/tenants/update/services"),e).then((e=>{console.log("res:",e),"Update successful"===e.data.message&&(0,T.M8)("Service Updated Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),me(!1)})).catch((e=>{console.log(e),me(!1)}))}catch(n){console.log(n),me(!1)}},ts=(e,s)=>{const n=se.indexOf(s);let t=[];-1===n?t=t.concat(se,s):0===n?t=t.concat(se.slice(1)):n===se.length-1?t=t.concat(se.slice(0,-1)):n>0&&(t=t.concat(se.slice(0,n),se.slice(n+1))),ne(t)},is=e=>-1!==se.indexOf(e),as=ae>0?Math.max(0,(1+ae)*de-ce.length):0,ls=Z.useMemo((()=>function(e,s){const n=e.map(((e,s)=>[e,s]));return n.sort(((e,n)=>{const t=s(e[0],n[0]);return 0!==t?t:e[1]-n[1]})),n.map((e=>e[0]))}(ce,function(s,n){return"desc"===s?(s,t)=>e(s,t,n):(s,t)=>-e(s,t,n)}(N,U)).slice(ae*de,ae*de+de)),[N,U,ae,de]);return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsxs)(d.A,{fullWidth:!0,open:ve,onClose:Ce,scroll:"paper",fullScreen:D,maxWidth:"sm",TransitionComponent:M.s,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,ie.jsx)(x.A,{children:"Create Request"}),(0,ie.jsx)(h.A,{dividers:!0,children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:2.5,children:[(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Reference No"}),(0,ie.jsx)(A.A,{type:"number",fullWidth:!0,sx:{width:"100%"},value:Ze,onChange:e=>{Qe(e.target.value),console.log(e)}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Requestor"}),(0,ie.jsx)(A.A,{value:Xe,onChange:e=>Je(e.target.value),fullWidth:!0,sx:{width:"100%"}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Bank Name"}),(0,ie.jsx)(A.A,{value:$e,sx:{width:"100%"},onChange:e=>es(e.target.value)})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Amount"}),(0,ie.jsx)(A.A,{type:"number",value:amount,sx:{width:"100%"},onChange:e=>setAmount(e.target.value)})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Account No"}),(0,ie.jsx)(A.A,{type:"number",fullWidth:!0,sx:{width:"100%"},value:accountno,onChange:e=>{setAccountno(e.target.value),console.log(e)}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"IFSC Code"}),(0,ie.jsx)(A.A,{value:ifsc,onChange:e=>setIfsc(e.target.value),fullWidth:!0,sx:{width:"100%"}})]}),(0,ie.jsxs)(u.Ay,{item:!0,xs:12,sm:6,children:[(0,ie.jsx)(g.A,{children:"Reason"}),(0,ie.jsx)(A.A,{value:reason,onChange:e=>setReason(e.target.value),fullWidth:!0,sx:{width:"100%"}})]})]})})}),(0,ie.jsx)(m.A,{children:(0,ie.jsx)(u.Ay,{container:!0,children:(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[(0,ie.jsx)(p.A,{variant:"contained",onClick:()=>{(()=>{if(Ze)if(Xe)if($e)if(amount)if(accountno)if(ifsc)if(reason){let e={requestid:0,requestdate:K()().format("YYYY-MM-DD HH:mm:ss"),referenceno:Ze,Apptypeid:22,requesttype:"staffexpenses",reason:reason,requestor:Xe,amount:amount,Accountno:accountno,bankname:$e,ifsccode:ifsc};console.log(e)}else ss("Fill Reason");else ss("Fill IFSC");else ss("Fill Account No");else ss("Fill Amount");else ss("Fill Bank Name");else ss("Fill Requestor");else ss("Fill Reference No")})()},children:"Update"}),(0,ie.jsx)(p.A,{variant:"contained",onClick:()=>{Ce()},color:"error",children:"Close"})]})})})})]}),(0,ie.jsxs)(r.A,{sx:{width:"100%"},children:[D&&(0,ie.jsxs)(O.nV,{scroll:!0,children:[Ae&&[0,1,2,3,4].map((e=>(0,ie.jsxs)(O.pg,{accent:"#662582",children:[(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ie.jsx)(v.A,{variant:"circular",width:32,height:32}),(0,ie.jsxs)(j.A,{sx:{flex:1},children:[(0,ie.jsx)(v.A,{animation:"wave",width:"60%"}),(0,ie.jsx)(v.A,{animation:"wave",width:"40%"})]})]}),(0,ie.jsxs)(O.FG,{children:[(0,ie.jsx)(O.pY,{label:"Amount",value:(0,ie.jsx)(v.A,{animation:"wave",width:50})}),(0,ie.jsx)(O.pY,{label:"Ref No",value:(0,ie.jsx)(v.A,{animation:"wave",width:50})})]})]},e))),!Ae&&ls.map(((e,s)=>{const n=is(e.sno);return(0,ie.jsx)(O.pg,{accent:"#662582",selected:n,onClick:s=>ts(0,e.sno),header:(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,ie.jsx)(y.A,{sx:{width:32,height:32,bgcolor:"#66258218",color:"#662582",fontSize:13},children:e.requestor?String(e.requestor).charAt(0).toUpperCase():"#"}),(0,ie.jsxs)(j.A,{sx:{minWidth:0},children:[(0,ie.jsx)(f.A,{sx:{fontSize:14,fontWeight:700,color:"#0f172a"},noWrap:!0,children:e.requestor||"\u2014"}),(0,ie.jsxs)(f.A,{sx:{fontSize:11,color:"#94a3b8"},noWrap:!0,children:["#",e.sno]})]})]}),null!=e.amount&&(0,ie.jsx)(b.A,{label:e.amount,size:"small",sx:{bgcolor:"#66258218",color:"#662582",fontWeight:700}})]}),children:(0,ie.jsxs)(O.FG,{children:[(0,ie.jsx)(O.pY,{label:"Bank",value:e.bankname}),(0,ie.jsx)(O.pY,{label:"Account No",value:e.accountno}),(0,ie.jsx)(O.pY,{label:"IFSC",value:e.ifsccode}),(0,ie.jsx)(O.pY,{label:"Ref No",value:e.referenceno}),(0,ie.jsx)(O.pY,{label:"Reason",value:e.reason,full:!0})]})},e.sno)})),!Ae&&0===ls.length&&(0,ie.jsxs)(j.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,ie.jsx)(y.A,{sx:{width:64,height:64,bgcolor:"#f1f5f9",color:"#94a3b8"}}),(0,ie.jsx)(f.A,{sx:{fontSize:15,fontWeight:700,color:"#0f172a"},children:"No requests to show"}),(0,ie.jsx)(f.A,{sx:{fontSize:13,color:"#94a3b8"},children:"Requests will appear here once available."})]})]}),(0,ie.jsx)($.A,{sx:{width:"100%",borderBottom:1,borderColor:"divider",display:D?"none":"block"},children:(0,ie.jsxs)(C.A,{sx:{minWidth:750},"aria-labelledby":"tableTitle",size:"medium",children:[(0,ie.jsx)(n,{numSelected:se.length,order:N,orderBy:U,onSelectAllClick:e=>{if(e.target.checked){const e=ce.map((e=>e.name));ne(e)}else ne([])},onRequestSort:(e,s)=>{E(U===s&&"asc"===N?"desc":"asc"),X(s)},rowCount:ce.length}),Ae&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(w.A,{children:[0,1,2,3,4,5,6,7,8,9].map((e=>(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsxs)(j.A,{direction:"row",spacing:1,children:[(0,ie.jsx)(v.A,{variant:"circular",width:40,height:40}),(0,ie.jsxs)(j.A,{direction:"column",children:[(0,ie.jsx)(v.A,{animation:"wave",width:100}),(0,ie.jsx)(v.A,{animation:"wave",width:100})]})]})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(v.A,{animation:"wave"})})]},e)))})}),(0,ie.jsxs)(w.A,{children:[ls.map(((e,s)=>{const n=is(e.sno),o="enhanced-table-checkbox-".concat(s);return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsxs)(a.A,{hover:!0,onClick:s=>ts(0,e.sno),role:"checkbox","aria-checked":n,tabIndex:-1,sx:{cursor:"pointer"},children:[(0,ie.jsx)(l.A,{component:"th",id:o,scope:"row",padding:"none",children:e.sno}),(0,ie.jsx)(l.A,{align:"left",sx:{paddingLeft:"0px !important"},children:(0,ie.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,justifyContent:"flex-start",children:[(0,ie.jsx)(y.A,{alt:"",size:"sm",sx:{width:"25px",height:"25px"}}),(0,ie.jsx)(j.A,{direction:"column",children:(0,ie.jsx)(f.A,{variant:"caption",children:e.requestor})})]})}),(0,ie.jsxs)(l.A,{align:"left",children:[(0,ie.jsxs)(f.A,{variant:"caption",children:[" ",e.accountno]}),(0,ie.jsxs)(f.A,{variant:"h6",children:[" ",e.bankname]})]}),(0,ie.jsx)(l.A,{children:e.ifsccode}),(0,ie.jsx)(l.A,{align:"left",children:e.referenceno}),(0,ie.jsx)(l.A,{children:e.amount}),(0,ie.jsx)(l.A,{children:e.reason})]},e.sno),(0,ie.jsx)(a.A,{children:(0,ie.jsxs)(l.A,{style:{paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0},colSpan:8,sx:{width:"100%"},children:[(0,ie.jsx)(S.A,{in:expandopen===e.sno,timeout:"auto",unmountOnExit:!0,children:(0,ie.jsx)(M.A,{type:"slide",direction:"down",in:!0,children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:Ge?(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(G.A,{children:(0,ie.jsx)(j.A,{alignItems:"center",children:(0,ie.jsx)(F.A,{})})})}):(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsxs)(k.A,{value:Ue,onChange:(e,s)=>Ke(s),children:[(0,ie.jsx)(I.A,{label:"client Details"}),(0,ie.jsx)(I.A,{label:"Client Pricing"})]}),0===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:2.5,sx:{pl:{xs:0,sm:5,md:6,lg:10,xl:12},p:2},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:5,md:4,lg:4,xl:3,children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{spacing:2.5,alignItems:"center",children:[(0,ie.jsx)(y.A,{alt:"Avatar 1",size:"xl"}),(0,ie.jsxs)(j.A,{spacing:.5,alignItems:"center",children:[(0,ie.jsx)(f.A,{variant:"h5",children:he}),(0,ie.jsx)(f.A,{color:"secondary",children:we})]})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(P.A,{})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(R.A,{component:"nav","aria-label":"main mailbox folders",sx:{py:0},children:[(0,ie.jsxs)(W.Ay,{children:[(0,ie.jsx)(z.A,{children:(0,ie.jsx)(L.A,{})}),(0,ie.jsx)(f.A,{align:"right",children:ge})]}),(0,ie.jsxs)(W.Ay,{children:[(0,ie.jsx)(z.A,{children:(0,ie.jsx)(V.A,{})}),(0,ie.jsxs)(f.A,{align:"left",children:["+1 ",pe]})]})]})})]})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:7,md:8,lg:8,xl:9,children:(0,ie.jsx)(G.A,{title:(0,ie.jsx)(r.A,{sx:{p:1},children:"Contact Details"}),sx:{height:"100%"},children:(0,ie.jsxs)(R.A,{sx:{py:0},children:[(0,ie.jsx)(W.Ay,{children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:" Contact Name"}),(0,ie.jsx)(f.A,{children:ze})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6})]})}),(0,ie.jsx)(W.Ay,{children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:"Address"}),(0,ie.jsx)(f.A,{children:Fe})]})}),(0,ie.jsx)(W.Ay,{children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:"City"}),(0,ie.jsx)(f.A,{children:Ie})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(f.A,{color:"secondary",children:"Zip Code"}),(0,ie.jsx)(f.A,{children:Re})]})})]})})]})})})]})}),1===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(u.Ay,{container:!0,sx:{p:1},children:(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(G.A,{sx:{height:"100%",p:1},children:Ee[0].role?(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)($.A,{sx:{width:"100%",borderBottom:1,borderColor:"divider"},children:(0,ie.jsxs)(C.A,{sx:{width:"100%"},children:[(0,ie.jsx)(i.A,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:"#"}),(0,ie.jsx)(l.A,{sx:{width:"30%"},children:"Category"}),(0,ie.jsx)(l.A,{sx:{width:"30%"},children:"Skill"}),(0,ie.jsx)(l.A,{sx:{width:"30%"},children:"Cost/Hr"})]})}),(0,ie.jsx)(w.A,{children:Ee.map((e=>(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:e.sno}),(0,ie.jsx)(l.A,{children:e.categoryname}),(0,ie.jsx)(l.A,{children:e.role}),(0,ie.jsx)(l.A,{children:e.cost})]})})))})]})})}):(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(f.A,{children:"No Data found"})})})})})})]})})})}),(0,ie.jsx)(S.A,{in:editexpandopen===e.sno,timeout:"auto",unmountOnExit:!0,children:(0,ie.jsx)(M.A,{type:"slide",direction:"down",in:!0,children:Ge?(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(G.A,{children:(0,ie.jsx)(j.A,{alignItems:"center",children:(0,ie.jsx)(F.A,{})})})}):(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(G.A,{sx:{height:"100%"},children:[(0,ie.jsxs)(k.A,{value:Ue,onChange:(e,s)=>Ke(s),children:[(0,ie.jsx)(I.A,{label:"client Details"}),(0,ie.jsx)(I.A,{label:"Client Pricing"})]}),0===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(G.A,{sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:2.5,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:5,md:4,lg:4,xl:3,children:(0,ie.jsx)(G.A,{title:(0,ie.jsx)(r.A,{sx:{p:1},children:"Client"}),sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{spacing:2,alignItems:"center",sx:{width:"100%"},children:[(0,ie.jsx)(A.A,{type:"text",label:"Business name",fullWidth:!0,sx:{width:"100%"},value:he,onChange:e=>ue(e.target.value)}),(0,ie.jsx)(A.A,{type:"number",value:we,onChange:e=>Se(e.target.value),label:"Business No.",fullWidth:!0,sx:{width:"100%"}})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(R.A,{component:"nav","aria-label":"main mailbox folders",sx:{py:0},children:(0,ie.jsxs)(j.A,{direction:"column",spacing:2,sx:{width:"100%"},children:[(0,ie.jsx)(A.A,{type:"email",value:ge,sx:{width:"100%"},onChange:e=>je(e.target.value),label:"Email"}),(0,ie.jsx)(A.A,{type:"number",value:pe,placeholder:"Mobile Number",InputProps:{startAdornment:(0,ie.jsx)(q.A,{position:"start",children:"+1"})},sx:{width:"100%"},onChange:e=>ye(e.target.value)})]})})})]})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:7,md:8,lg:8,xl:9,children:(0,ie.jsx)(G.A,{title:(0,ie.jsx)(r.A,{sx:{p:1},children:"Contact Details"}),sx:{height:"100%"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:3,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(j.A,{spacing:.5,children:(0,ie.jsx)(A.A,{type:"text",value:ze,onChange:e=>qe(e.target.value),label:"Contact Name"})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{spacing:.5,children:[(0,ie.jsx)(ie.Fragment,{}),(0,ie.jsx)(J.default,{className:"automap",apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",style:{width:"100%",height:"40px",borderRadius:"5px",border:"1px solid #e0e0e0",textIndent:"10px",outline:"none"},onPlaceSelected:e=>{let s,n,t,i;ke(e.formatted_address);for(let a=0;ake(e.target.value)})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsx)(j.A,{spacing:.5,children:(0,ie.jsx)(A.A,{label:"City",type:"text",value:Ie,onChange:e=>Pe(e.target.value)})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,md:6,children:(0,ie.jsx)(j.A,{spacing:.5,children:(0,ie.jsx)(A.A,{label:"Zip Code",value:Re,onChange:e=>We(e.target.value)})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(j.A,{direction:"row",justifyContent:"flex-end",children:(0,ie.jsxs)(p.A,{variant:"contained",onClick:()=>{(async()=>{if(he)if(we)if(ge)if(pe)if(ze)if(Fe)if(Ie)if(Re)if(Be.lat&&Be.lng)if(!Le&&!Ve||Ee[0].role&&Ee[0].cost){let s={tenantid:Ye,registrationno:we,tenantname:he,primaryemail:ge,primarycontact:ze,contactno:pe,address:Fe,suburb:Ne,city:Ie,state:_e,postcode:Re,latitude:Be.lat.toString(),longitude:Be.lng.toString(),approved:Le&&1===re||!Le&&0===re&&!Ve?1:0};console.log(s);try{me(!0),await Q.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/tenants/update"),s).then((e=>{console.log("res:",e),"Update successful"===e.data.message&&((0,T.M8)("Client Details Updated Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3}),me(!0),setTimeout((()=>{be(),fe(),oe(0),me(!1)}),2e3)),me(!1)})).catch((e=>{console.log(e),me(!1)}))}catch(e){console.log(e),me(!1)}}else ss("Fill client pricing");else setAlertmessage("Fill correct address"),ss("Fill correct address");else ss("Fill Zip code");else ss("Fill City name");else ss("Fill Address");else ss("Fill Contact name");else ss("Fill Mobile number");else ss("Fill Email address");else ss("Fill Business No.");else ss("Fill Business name")})(),Le&&ns()},children:["Update ",Le?"& Approve":"",Ve?"& Disable":""]})})})]})})})]})})}),1===Ue&&(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)(u.Ay,{container:!0,children:(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(G.A,{sx:{height:"100%",p:1},children:(0,ie.jsxs)(G.A,{sx:{height:"100%"},children:[(0,ie.jsx)($.A,{sx:{width:"100%",borderBottom:1,borderColor:"divider"},children:(0,ie.jsxs)(C.A,{sx:{width:"100%"},children:[(0,ie.jsx)(i.A,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:"#"}),(0,ie.jsx)(l.A,{children:"Category"}),(0,ie.jsx)(l.A,{sx:{width:"40%"},children:"Skill"}),(0,ie.jsx)(l.A,{sx:{width:"40%"},children:"Cost/Hr"}),(0,ie.jsx)(l.A,{sx:{width:"10px"}})]})}),(0,ie.jsx)(w.A,{children:Ee.map((e=>(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsxs)(a.A,{children:[(0,ie.jsx)(l.A,{children:e.sno}),(0,ie.jsx)(l.A,{children:e.categoryname}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(Y.A,{fullWidth:!0,id:"venuetype33",variant:"outlined",error:!0,freeSolo:!0,options:Te.sort(((e,s)=>-s.categoryname.localeCompare(e.categoryname))),groupBy:e=>e.categoryname,getOptionLabel:e=>e.subcategoryname,isOptionEqualToValue:(e,s)=>e.subcategoryid===s.subcategoryid,onChange:(s,n)=>{if(n){console.log("eval",s);let t=Ee.find((e=>e.subcategoryid===n.subcategoryid));if(console.log(n),t)ss("select different skill");else{let s=Ee;s[e.sno-1].role=n.subcategoryname,s[e.sno-1].categoryname=n.categoryname,s[e.sno-1].categoryid=n.categoryid,s[e.sno-1].subcategoryid=n.subcategoryid,s[e.sno-1].servicename=n.subcategoryname,s[e.sno-1].unitid=n.unitid,s[e.sno-1].unitname=n.unitname,Me([...s])}}console.log(n)},renderInput:s=>(0,ie.jsx)(A.A,(0,t.A)((0,t.A)({},s),{},{placeholder:"Choose a Skill",defaultValue:e.role,variant:"outlined",sx:{input:{"&::placeholder":{opacity:.9}}}})),value:{categoryid:e.categoryid,categoryname:"",cost:e.serviceamount,label:e.servicename,status:0,subcategoryid:e.subcategoryid,subcategoryname:e.servicename,unitid:e.unitid,unitname:e.unitname},disabled:!!Ae})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(A.A,{type:"number",onChange:s=>{let n=Ee;s.target.value<1e3&&(n[e.sno-1].cost=s.target.value,n[e.sno-1].servicevalue=s.target.value,n[e.sno-1].serviceamount=s.target.value,Me([...n])),console.log(s.target.value)},value:e.cost,autoComplete:"off",fullWidth:!0})}),(0,ie.jsx)(l.A,{children:(0,ie.jsx)(_.A,{onClick:()=>(async(e,s)=>{console.log(s);let n=Ee;if(0!==s.serviceid&&Ee.length>1){console.log([{serviceid:s.serviceid,tenantid:s.tenantid,categoryid:s.categoryid,subcategoryid:s.subcategoryid,servicecode:s.servicecode,servicename:s.servicename,unitid:s.unitid,unitname:s.unitname,serviceamount:s.servicevalue}]);try{await Q.A.delete("".concat("https://jupiter.nearle.app/live/api/v2","/tenants/delete/services"),{data:[{serviceid:s.serviceid,tenantid:s.tenantid,categoryid:s.categoryid,subcategoryid:s.subcategoryid,servicecode:s.servicecode,servicename:s.servicename,unitid:s.unitid,unitname:s.unitname,serviceamount:s.servicevalue}]}).then((s=>{console.log("res"),console.log(s),"Deleted successful"===s.data.message&&((0,T.M8)("Client pricing Deleted",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),n.splice(e-1,1),n.map(((e,s)=>{e.sno=s+1})),console.log(n),Me([...n]))})).catch((e=>{console.log(e),me(!1)}))}catch(t){console.log(t),me(!1)}}else Ee.length>1?(n.splice(e-1,1),n.map(((e,s)=>{e.sno=s+1})),console.log(n),Me([...n])):1===Ee.length&&Me([{sno:1,role:"",cost:"",serviceid:s.serviceid,tenantid:0,categoryid:0,subcategoryid:0,servicecode:"",servicename:"",unitid:0,unitname:"",serviceamount:"",discountid:0,taxpercent:0,taxamount:0,servicevalue:0,categoryname:""}])})(e.sno,e),color:"error",children:(0,ie.jsx)(B.A,{})})})]})})))})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(p.A,{color:"primary",endIcon:(0,ie.jsx)(H.A,{}),onClick:()=>(()=>{let e=Ee;e[e.length-1].role&&e[e.length-1].cost?(e.push({sno:e.length+1,cost:"",role:"",serviceid:0,tenantid:0,categoryid:0,subcategoryid:0,servicecode:"",servicename:"",unitid:0,unitname:"",serviceamount:"",discountid:0,taxpercent:0,taxamount:0,servicevalue:0,categoryname:""}),Me([...e])):ss("Fill all Previous Details")})(),sx:{m:2},variant:"dashed",size:"extraSmall",children:"ADD SKILL"})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsx)(u.Ay,{container:!0,justifyContent:"flex-end",children:(0,ie.jsx)(u.Ay,{item:!0,children:(0,ie.jsx)(p.A,{variant:"contained",size:"small",onClick:ns,children:"Update"})})})})]})})})})})]})})})})]})})]})})),as>0&&(0,ie.jsx)(a.A,{style:{height:53*as},children:(0,ie.jsx)(l.A,{colSpan:6})})]})]})}),(0,ie.jsx)(ee.A,{rowsPerPageOptions:[10,25,50,100],component:"div",count:ce.length,rowsPerPage:de,page:ae,onPageChange:(e,s)=>{le(s)},onRowsPerPageChange:e=>{xe(parseInt(e.target.value,10)),le(0)}})]})]})}const ae=(0,o.A)(),le=(0,c.A)(ae.breakpoints.down("md")),[re,oe]=(0,Z.useState)(0),[ce,de]=(0,Z.useState)([]),[xe,he]=(0,Z.useState)([]),[ue,ge]=(0,Z.useState)([]),[Ae,me]=(0,Z.useState)(!1),[je,pe]=(0,Z.useState)(""),[ve,ye]=(0,Z.useState)(!1);(0,Z.useEffect)((()=>{localStorage.getItem("partnerid")&&(be(localStorage.getItem("partnerid")),fe(localStorage.getItem("partnerid")))}),[]),(0,Z.useEffect)((()=>{}),[je,re]);const fe=async e=>{me(!0);try{await Q.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/payments/requests/getpaymentrequest/?partnerid=").concat(e,"&status=1")).then((e=>{if("Successful"===e.data.message){let s=[];e.data.details.map(((e,n)=>{s=[...s,(0,t.A)((0,t.A)({},e),{},{sno:n+1})]})),he(s),console.log(e.data.details),me(!1)}})).catch((e=>{console.log(e),me(!1)}))}catch(s){console.log(s),me(!1)}},be=async e=>{me(!0);try{await Q.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/payments/requests/getpaymentrequest/?partnerid=").concat(e,"&status=0")).then((e=>{if("Success"===e.data.message){let s=[];e.data.details.map(((e,n)=>{s=[...s,(0,t.A)((0,t.A)({},e),{},{sno:n+1})]})),ge(s),de(s),console.log(e.data.details),me(!1)}})).catch((e=>{console.log(e),me(!1)}))}catch(s){console.log(s),me(!1)}},Ce=()=>{ye(!1)};return(0,ie.jsxs)(ie.Fragment,{children:[Ae&&(0,ie.jsx)(X.A,{}),(0,ie.jsxs)(u.Ay,{container:!0,rowSpacing:2,columnSpacing:2.75,children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(j.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"stretch",sm:"center"},spacing:{xs:1.5,sm:0},children:[(0,ie.jsx)(f.A,{variant:"h3",children:"Payment Requests"}),(0,ie.jsx)(p.A,{variant:"contained",fullWidth:le,onClick:()=>{},children:"Create Request"})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,children:(0,ie.jsxs)(r.A,{sx:{overflow:"auto",border:1,borderColor:"grey.200",borderRadius:2,backgroundColor:"#fff",minHeight:400},children:[(0,ie.jsxs)(j.A,{alignItems:"center",justifyContent:"space-between",direction:"row",sx:{p:2,width:"100%",flexWrap:"wrap",gap:1},children:[(0,ie.jsxs)(k.A,{value:re,onChange:(e,s)=>{oe(s),1===s&&de(xe),0===s&&de(ue)},variant:"scrollable",scrollButtons:"auto",children:[(0,ie.jsx)(I.A,{label:"Pending",icon:(0,ie.jsx)(b.A,{label:ue.length,color:"primary",variant:"light",size:"small"}),iconPosition:"end"}),(0,ie.jsx)(I.A,{label:"Paid",iconPosition:"end",icon:(0,ie.jsx)(b.A,{label:xe.length,color:"primary",variant:"light",size:"small"})})]}),(0,ie.jsx)(D.A,{sx:{width:{xs:"100%",md:250}},children:(0,ie.jsx)(N.A,{size:"small",id:"header-search",startAdornment:(0,ie.jsx)(q.A,{position:"start",sx:{mr:-.5},children:(0,ie.jsx)(E.A,{})}),"aria-describedby":"header-search-text",inputProps:{"aria-label":"weight"},placeholder:"Search",value:je,onChange:e=>{pe(e.target.value)},autoComplete:"off"})})]}),(0,ie.jsx)(U,{})]})})]})]})}}}]); \ No newline at end of file diff --git a/build/static/js/8846.e95756a1.chunk.js b/build/static/js/8846.3eae90fb.chunk.js similarity index 99% rename from build/static/js/8846.e95756a1.chunk.js rename to build/static/js/8846.3eae90fb.chunk.js index cf11f0b..45804b7 100644 --- a/build/static/js/8846.e95756a1.chunk.js +++ b/build/static/js/8846.3eae90fb.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8846],{11041:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ie});var o=r(89379),n=r(9950),i=r(26910),a=r(60010),l=r(36150),s=r(2235),c=r(41413),d=r(83274),x=r(16491),u=r(93230),h=r(82917),p=r(82053),m=r(47223),g=r(55158),f=r(60899),v=r(77922),b=r(29925),A=r(82223),j=r(1320),y=r(25333),w=r(15769),S=r(69780),k=r(9213),D=r(21671),M=r(34075),C=r(74745),z=r(96583),I=r(40033),W=r(28170),P=r(25277),R=r(79739),Y=r(14857),T=r(31222),L=r(43302),N=r(99810),O=r(49029),F=r(47113),E=r(33516),K=r(82215),H=r(2527),_=r.n(H),B=(r(55392),r(4159)),q=r.n(B),J=r(57560),G=r(94826),Z=r(44414),U=r(36220);q().extend(U);const V=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),$=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),X=e=>{let{coordinates:t,additionalProps:r,order:o,setMapOpen:i}=e;console.log("additionalProps",r);const a=(0,n.useRef)(null),l=(0,Y.A)(),[s,c]=(0,n.useState)([]),[d,h]=(0,n.useState)(!1);if((0,n.useEffect)((()=>{if(a.current&&t.length>0){const e=[[Math.min(...t.map((e=>e.lat))),Math.min(...t.map((e=>e.lng)))],[Math.max(...t.map((e=>e.lat))),Math.max(...t.map((e=>e.lng)))]];a.current.fitBounds(e)}}),[t]),(0,n.useEffect)((()=>{(async()=>{if(h(!0),t.length<2)return c([]),void h(!1);const e=(e,t)=>{if(e.length<=t)return e;const r=Math.ceil(e.length/t),o=e.filter(((e,t)=>t%r===0)),n=e[e.length-1];return o[o.length-1]!==n&&o.push(n),o};try{const r=e(t,90).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/match/v1/driving/".concat(r,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),n=await fetch(o),i=await n.json();if(i.matchings&&i.matchings.length>0){const e=i.matchings.flatMap((e=>{var t;return((null===(t=e.geometry)||void 0===t?void 0:t.coordinates)||[]).map((e=>{let[t,r]=e;return{lat:r,lng:t}}))}));if(e.length>=2)return c(e),void h(!1)}}catch(r){console.warn("OSRM Match error, trying route fallback:",r)}try{const r=e(t,25).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/route/v1/driving/".concat(r,"?overview=full&geometries=geojson"),n=await fetch(o),i=await n.json();if(i.routes&&i.routes[0]){const e=i.routes[0].geometry.coordinates.map((e=>{let[t,r]=e;return{lat:r,lng:t}}));c(e)}else c(t)}catch(o){console.error("OSRM Route fallback error:",o),c(t)}finally{h(!1)}})()}),[t]),!t||0===t.length)return null;const m=t[0],g=t[t.length-1],f=t[Math.floor(t.length/2)],v=e=>{let{label:t,value:r}=e;return(0,Z.jsxs)(u.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,Z.jsxs)(p.A,{variant:"subtitle1",sx:{fontWeight:600},children:[t,":"]}),(0,Z.jsx)(P.A,{label:r||"0.00",color:"primary",sx:{fontWeight:700}})]})};return(0,Z.jsxs)(x.A,{sx:{width:"100%",height:"100vh",position:"relative",overflow:"hidden"},children:[d&&(0,Z.jsx)(G.A,{}),(0,Z.jsx)(P.A,{label:"Close",icon:(0,Z.jsx)(J.A,{style:{fontSize:18}}),onClick:()=>i(!1),sx:{position:"absolute",top:12,right:12,zIndex:2e3,bgcolor:l.palette.error.main,color:"#fff",fontWeight:600,borderRadius:"12px",px:1.5,py:.5,boxShadow:l.shadows[4],cursor:"pointer","& .MuiChip-icon":{color:"#fff"}}}),(0,Z.jsxs)(N.W,{center:f,zoom:14,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},ref:a,children:[(0,Z.jsx)(O.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,Z.jsx)(F.p,{position:m,icon:V,children:(0,Z.jsx)(E.m,{direction:"bottom",children:"Pickup: ".concat(q()(r.riderStart).format("DD-MM-YYYY hh:mm A"))})}),(0,Z.jsx)(F.p,{position:g,icon:$,children:(0,Z.jsx)(E.m,{direction:"bottom",children:"Drop: ".concat(q()(r.riderEnd).format("DD-MM-YYYY hh:mm A"))})}),s.length>0&&(0,Z.jsx)(K.R,{positions:s,pathOptions:{color:"blue",weight:5}})]}),(0,Z.jsx)(x.A,{sx:{position:"absolute",bottom:0,width:"100%",bgcolor:"rgba(255,255,255,0.96)",p:2,boxShadow:l.shadows[3],zIndex:1500},children:(0,Z.jsxs)(u.A,{direction:"row",flexWrap:"wrap",rowGap:1.5,columnGap:3,alignItems:"center",children:[(0,Z.jsx)(v,{label:"Tenant",value:null===o||void 0===o?void 0:o.tenantname}),(0,Z.jsx)(v,{label:"Rider",value:null===o||void 0===o?void 0:o.ridername}),(0,Z.jsx)(v,{label:"Pickup",value:null===o||void 0===o?void 0:o.pickupcustomer}),(0,Z.jsx)(v,{label:"Drop",value:null===o||void 0===o?void 0:o.deliverycustomer}),(0,Z.jsx)(v,{label:"Kms",value:null===o||void 0===o?void 0:o.kms}),(0,Z.jsx)(v,{label:"Actual Kms",value:null===o||void 0===o?void 0:o.actualkms}),(0,Z.jsx)(v,{label:"Rider Kms",value:null===o||void 0===o?void 0:o.riderkms})]})})]})};var Q=r(81425),ee=r(90376),te=r(52351),re=r(8881),oe=r(35678),ne=r(56311),ie=r(58691),ae=r(59212),le=r(27001),se=r(36803),ce=r(20466);function de(e){let{rows:t=5,columns:r=6,height:o=40}=e;return(0,Z.jsx)(Z.Fragment,{children:[...Array(t)].map(((e,t)=>(0,Z.jsx)(k.A,{children:[...Array(r)].map(((e,t)=>(0,Z.jsx)(D.A,{children:(0,Z.jsx)(h.A,{variant:"rectangular",height:o,width:70,animation:"wave"})},t)))},t)))})}var xe=r(23787),ue=r(36220);q().extend(ue);const he=(e,t,r)=>{(0,re.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:r||1500})},pe={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},me=(e,t)=>"".concat(e).concat(t),ge=e=>me(e,"08"),fe=e=>me(e,"18"),ve=e=>me(e,"26"),be=e=>me(e,"55"),Ae="#662582",je="#9255AB",ye=e=>(0,Z.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:pe.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),we=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,Z.jsx)(c.A,{sx:{width:o,height:o,bgcolor:r?t:fe(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},Se=e=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ve(e))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}}),ke={all:{label:"All",color:Ae,icon:T.YBc},pending:{label:"Pending",color:"#f59e0b",icon:T.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:T.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:T.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:T.gsJ},active:{label:"Active",color:"#14b8a6",icon:T.pk7},delivered:{label:"Delivered",color:"#10b981",icon:T.mU9},skipped:{label:"Skipped",color:"#f97316",icon:T.ivF},cancelled:{label:"Cancelled",color:"#ef4444",icon:T.uDv}},De=["all","pending","accepted","arrived","picked","active","delivered","skipped","cancelled"],Me=e=>{let{color:t,icon:r,label:o,tooltip:n}=e;return(0,Z.jsx)(d.A,{title:n||"",placement:"top",children:(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(be(t)),color:t,fontSize:11,fontWeight:800,minWidth:80,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},Ce=e=>{let{value:t,formatDate:r,formatTime:o,success:n}=e;return t?(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:600,whiteSpace:"nowrap"},children:r(t)}),(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textPrimary,fontWeight:800,whiteSpace:"nowrap"},children:o(t)}),n&&(0,Z.jsx)(L.cxC,{style:{color:"#10b981",fontSize:12}})]})]}):(0,Z.jsxs)(u.A,{spacing:.5,children:[(0,Z.jsx)(h.A,{animation:!1,variant:"text",width:70,height:12}),(0,Z.jsx)(h.A,{animation:!1,variant:"text",width:55,height:14})]})};function ze(e,t){const r=e=>e*Math.PI/180,o=r(e[0]),n=r(t[0]),i=r(t[0]-e[0]),a=r(t[1]-e[1]),l=Math.sin(i/2)**2+Math.cos(o)*Math.cos(n)*Math.sin(a/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function Ie(){const e=(0,Y.A)(),t=(0,m.A)(e.breakpoints.down("md")),r=(0,n.useRef)(),h=(0,n.useRef)(),L=(0,n.useRef)(null),N=(0,n.useRef)(null),O=localStorage.getItem("userid"),[F,E]=(0,n.useState)(0),[K,H]=(0,n.useState)(50),[_,B]=(0,n.useState)("All"),[J,U]=(0,n.useState)(q()().format("YYYY-MM-DD")),[V,$]=(0,n.useState)(q()().format("YYYY-MM-DD")),[ue,me]=(0,n.useState)(!1),[Ie,We]=(0,n.useState)(!1),[Pe,Re]=(0,n.useState)("Today"),[Ye,Te]=(0,n.useState)(0),[Le,Ne]=(0,n.useState)(""),[Oe,Fe]=(0,n.useState)(""),[Ee,Ke]=(0,n.useState)([]),[He,_e]=(0,n.useState)(),[Be,qe]=(0,n.useState)(),[Je,Ge]=(0,n.useState)({}),[Ze,Ue]=(0,n.useState)(!1);let[Ve,$e]=(0,n.useState)(0),[Xe,Qe]=(0,n.useState)(0),[et,tt]=(0,n.useState)(0),[rt,ot]=(0,n.useState)(0),[nt,it]=(0,n.useState)(0),[at,lt]=(0,n.useState)(0),[st,ct]=(0,n.useState)(0),[dt,xt]=(0,n.useState)(0),[ut,ht]=(0,n.useState)(0);const[pt,mt]=(0,n.useState)("All"),[gt,ft]=(0,n.useState)(0),[vt,bt]=(0,n.useState)(0),[At,jt]=(0,n.useState)(null),[yt,wt]=(0,n.useState)(null),[St,kt]=(0,n.useState)(),[Dt,Mt]=(0,n.useState)(null),[Ct,zt]=(0,n.useState)(!1),[It,Wt]=(0,n.useState)(!1),Pt={all:Ve,pending:et,accepted:nt,arrived:dt,picked:at,active:st,delivered:Xe,skipped:ut,cancelled:rt};function Rt(e,t,r,o){const n=(r-e)*(Math.PI/180),i=(o-t)*(Math.PI/180),a=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e*(Math.PI/180))*Math.cos(r*(Math.PI/180))*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}(0,n.useEffect)((()=>{bt(0),jt(null),ft(0),wt(null),kt(null),Mt(null)}),[Ye]),(0,n.useEffect)((()=>{ft(0),wt(null),Mt(null)}),[vt]),(0,n.useEffect)((()=>{Mt(null)}),[gt]);const Yt=async e=>{Wt(!0);try{const t=(await i.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e))).data.details;if(Array.isArray(t)&&0!==t.length){const e=t.map((e=>{var t,r,o;const n=null!==e&&void 0!==e&&e.logdate?q()(e.logdate):null;return{lat:parseFloat(null!==(t=null===e||void 0===e?void 0:e.latitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(r=null!==(o=null===e||void 0===e?void 0:e.longitude)&&void 0!==o?o:null===e||void 0===e?void 0:e.lng)&&void 0!==r?r:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:n&&n.isValid()?n.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,t)=>e._ts-t._ts));if(0!==e.length){_e(e[0].logdate),qe(e[e.length-1].logdate);const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const r=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===r.length)return[];if(1===r.length)return[{lat:r[0].lat,lng:r[0].lng,logdate:r[0].logdate,_ts:r[0]._ts}];const o=null!=t.processNoise?t.processNoise:1e-10,n=null!=t.measurementNoise?t.measurementNoise:2e-9,i=null!=t.outlierGate?t.outlierGate:9,a=null!=t.maxSpeedKmh?t.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let s=0;for(;sa||(c.push(e),d=t)}if(c.length<2)return c.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const x=e=>{const t=c.length,r=new Array(t),a=new Array(t),s=new Array(t),d=new Array(t),x=new Array(t),u=l(c[0]),h=l(c[1]),p=Math.max(.1,(h-u)/1e3),m=(c[1][e]-c[0][e])/p;r[0]=[c[0][e],m],a[0]=[n,0,0,1],s[0]=r[0].slice(),d[0]=a[0].slice(),x[0]=0;let g=u;for(let v=1;vi){r[v]=[m,f],a[v]=[k,D,M,C];continue}const W=k/I,P=M/I,R=m+W*z,Y=f+P*z;r[v]=[R,Y],a[v]=[(1-W)*k,(1-W)*D,M-P*k,C-P*D]}const f=new Array(t);f[t-1]=r[t-1].slice();for(let o=t-2;o>=0;o--){const e=x[o+1],[t,n,i,l]=a[o],c=t+e*n,u=n,h=i+e*l,p=l,[m,g,v,b]=d[o+1],A=m*b-g*v;if(!Number.isFinite(A)||Math.abs(A)<1e-30){f[o]=r[o].slice();continue}const j=b/A,y=-g/A,w=-v/A,S=m/A,k=c*j+u*w,D=c*y+u*S,M=h*j+p*w,C=h*y+p*S,z=f[o+1][0]-s[o+1][0],I=f[o+1][1]-s[o+1][1];f[o]=[r[o][0]+k*z+D*I,r[o][1]+M*z+C*I]}return f.map((e=>e[0]))},u=x("lat"),h=x("lng");return c.map(((e,t)=>({lat:u[t],lng:h[t],logdate:e.logdate,_ts:e._ts})))}(e),r=t.map((e=>({lat:e.lat,lng:e.lng})));Ke(r),function(e){let t=0;for(let r=0;r{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0}),Ht=(null===Tt||void 0===Tt?void 0:Tt.pages.flatMap((e=>e.rows)))||[];(0,n.useEffect)((()=>{if(!Et)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Ft()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return r.current&&e.observe(r.current),()=>{r.current&&e.unobserve(r.current)}}),[Et,Ft]);const{data:_t,isLoading:Bt,isError:qt,error:Jt}=(0,l.I)({queryKey:["tenantlist",Ye],queryFn:()=>(0,Q.Mn)(Ye),enabled:0!==Ye}),{data:Gt,isLoading:Zt,isError:Ut,error:Vt}=(0,l.I)({queryKey:["fetchRidersList",Ye],queryFn:Q.Sd,enabled:0!==Ye}),{data:$t,isLoading:Xt,isError:Qt,error:er}=(0,l.I)({queryKey:["gettenantlocations",vt],queryFn:()=>(0,Q.DL)(vt),enabled:0!==vt});(0,n.useEffect)((()=>{(async()=>{Ue(!0);try{await i.A.get(0==Ye?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?fromdate=").concat(J,"&todate=").concat(V):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?applocationid=").concat(Ye,"&tenantid=").concat(vt,"&locationid=").concat(gt,"&fromdate=").concat(J,"&todate=").concat(V,"&userid=").concat((null===St||void 0===St?void 0:St.userid)||0)).then((e=>{$e(e.data.details.total),tt(e.data.details.pending),it(e.data.details.accepted),xt(e.data.details.arrived),lt(e.data.details.picked),ct(e.data.details.active),Qe(e.data.details.delivered),ht(e.data.details.skipped),ot(e.data.details.cancelled)})).catch((e=>{(0,re.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(e){console.log(e)}finally{Ue(!1)}})()}),[Ye,J,V,pt,vt,gt,St]);const tr=null===Ht||void 0===Ht?void 0:Ht.map((e=>({tenantname:e.tenantname,tenantcity:e.tenantcity,tenantcontactno:e.tenantcontactno,rider:e.ridername,orderid:e.orderid,paymenttype:64==e.paymenttype?"Pay Later":42==e.paymenttype?"Pay on Delivery":"Digital",deliverydate:e.deliverydate,orderstatus:e.orderstatus,ordernotes:e.ordernotes,kms:e.kms,cumulativekms:e.cumulativekms,assigntime:e.assigntime,starttime:e.starttime,arrivaltime:e.arrivaltime,pickuptime:e.pickuptime,deliverytime:e.deliverytime,canceltime:e.canceltime,deliverycharge:e.deliverycharges,deliveryamt:e.deliveryamt,pickupcustomer:e.pickupcustomer,pickupcontactno:e.pickupcontactno,Pickupaddress:e.pickupaddress,pickupsuburb:e.pickupsuburb,pickupcity:e.applocation,pickuplat:e.pickuplat,pickuplong:e.pickuplon,deliverycustomer:e.deliverycustomer,deliverycontactno:e.deliverycontactno,deliveryaddress:e.deliveryaddress,deliverysuburb:e.locationsuburb,deliverylat:e.deliverylat,deliverylong:e.deliverylong,locationname:e.locationname,locationsuburb:e.pickuplocation,deliverylocation:e.deliverylocation,locationcontactno:e.locationcontactno})));function rr(e){return q()(e).format("DD/MM/YYYY ")}function or(e){return q()(e).format(" hh:mm A")}const nr=Nt?"An error has occurred: (fetchDeliveries) ".concat(Ot.message):qt?"An error has occurred: (getTenants) ".concat(Jt.message):Qt?"An error has occurred: (gettenantlocations) ".concat(er.message):Ut?"An error has occurred: (getriderbydelivery) ".concat(Vt.message):null;(0,n.useEffect)((()=>{nr&&he(nr,"warning",2e3)}),[nr]);const ir=[{key:"total",label:"Total Orders",color:Ae,icon:T.HU2,value:Ve},{key:"delivered",label:"Delivered",color:"#10b981",icon:T.cAP,value:Xe},{key:"pending",label:"Pending",color:"#f59e0b",icon:T.G6c,value:et},{key:"cancelled",label:"Cancelled",color:"#ef4444",icon:T.qiG,value:rt}];return(0,Z.jsxs)(Z.Fragment,{children:[(Ze||Bt||Xt||It||Zt||Kt)&&(0,Z.jsx)("div",{children:(0,Z.jsx)(te.A,{})}),Lt&&(0,Z.jsx)(g.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Lt}),(0,Z.jsx)(le.A,{title:"Orders Details",subtitle:"Live \xb7 ".concat(_||"All Zones"," \xb7 ").concat(Pe),live:!0,action:(0,Z.jsx)(ae.A,{ref:L,locaName:_,setAppId:Te,setLocoName:B,setPage:E,pill:!0,accentColor:Ae,icon:(0,Z.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:ye,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,Z.jsx)(f.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:ir.map((e=>{var t;const r=e.icon;return(0,Z.jsx)(f.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,Z.jsx)(se.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,Z.jsx)(r,{size:20}),color:e.color,loading:Ze})},e.key)}))}),(0,Z.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:pe.radiusCard/8,border:"1px solid",borderColor:pe.borderSubtle,background:"#fff",boxShadow:pe.shadowSoft},children:(0,Z.jsxs)(f.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:_t||[],value:At,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:ye,onOpen:e=>{Ye||(e.preventDefault(),(0,ce.k)("Please select a your app location first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(bt(0),jt(null),ft(0),wt(null)):(bt((null===t||void 0===t?void 0:t.tenantid)||0),jt(t),ft(t.locationid),wt(null))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{inputRef:N,placeholder:"Select Tenant",size:"small",sx:Se("#0ea5e9"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#0ea5e9",size:22,selected:!0,children:(0,Z.jsx)(T.Itr,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:$t||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:yt,PaperComponent:ye,onOpen:e=>{Ye||vt?vt||(e.preventDefault(),(0,ce.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=N.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,ce.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(ft(0),wt(null)):(ft(t.locationid||0),wt(t))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",sx:Se("#10b981"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#10b981",size:22,selected:!0,children:(0,Z.jsx)(T.JFD,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:Gt||[],value:Dt,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname),PaperComponent:ye,onOpen:()=>{Ye||(0,ce.k)("Select App Location First","warning",2e3)},onChange:(e,t,r)=>{"clear"===r?(kt(null),Mt(null)):(kt(t),Mt(t))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Rider",size:"small",sx:Se("#8b5cf6"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#8b5cf6",size:22,selected:!0,children:(0,Z.jsx)(T.bsz,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},children:[(0,Z.jsx)(d.A,{title:"Date Filter",placement:"top",children:(0,Z.jsxs)(x.A,{onClick:()=>me(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:ge("#f59e0b"),border:"1.5px solid ".concat(be("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(ve("#f59e0b"))}},children:[(0,Z.jsx)(T.Ki0,{size:14}),q()(J).format("DD/MM/YY")," \u2013 ",q()(V).format("DD/MM/YY")]})}),(0,Z.jsx)(A.A,{variant:"contained",size:"small",startIcon:(0,Z.jsx)(T.S3Y,{}),onClick:()=>{zt(!0),setTimeout((()=>{H("")}),0)},sx:{borderRadius:999,px:1.5,py:.75,fontWeight:800,fontSize:12,textTransform:"none",background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),"&:hover":{background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),boxShadow:"0 8px 22px ".concat(ve(Ae))}},children:"Export"})]})})]})}),(0,Z.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:pe.radiusCard/8,borderTopRightRadius:pe.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:pe.borderSubtle,borderBottom:0,background:"#fff"},children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,Z.jsx)(u.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:pe.borderSubtle,borderRadius:4}},children:De.map((e=>{var t;const r=ke[e],o=r.icon,n=pt.toLowerCase()===e,i=null!==(t=Pt[e])&&void 0!==t?t:0;return(0,Z.jsxs)(x.A,{onClick:()=>mt("all"===e?"All":e),sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1px solid ".concat(n?r.color:pe.borderSubtle),bgcolor:n?r.color:pe.surface,color:n?"#fff":pe.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:n?r.color:"#cbd5e1",bgcolor:n?r.color:pe.surfaceAlt}},children:[(0,Z.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:n?"rgba(255,255,255,0.22)":fe(r.color),color:n?"#fff":r.color},children:(0,Z.jsx)(o,{size:13})}),(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:r.label}),(0,Z.jsx)(x.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:n?"rgba(255,255,255,0.22)":pe.surfaceAlt,color:n?"#fff":pe.textSecondary,border:"none"},children:i})]},e)}))}),(0,Z.jsx)(x.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,Z.jsx)(ne.A,{value:Le,onChange:Ne,onDebouncedChange:Fe,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ve(Ae))}}})})]})}),(0,Z.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:pe.radiusCard/8,borderBottomRightRadius:pe.radiusCard/8,border:"1px solid",borderColor:pe.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,Z.jsxs)(j.A,{ref:h,onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e.currentTarget;t+o>=r-50&&Et&&!Kt&&Ft()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:be(Ae),borderRadius:8,"&:hover":{backgroundColor:Ae}},"&::-webkit-scrollbar-track":{backgroundColor:pe.surfaceAlt}},children:[t?(0,Z.jsx)(xe.nV,{sx:{p:1.25},children:Lt?(0,Z.jsxs)(u.A,{alignItems:"center",sx:{py:6},children:[(0,Z.jsx)(ie.A,{}),(0,Z.jsx)(p.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}):0==(null===Ht||void 0===Ht?void 0:Ht.length)?(0,Z.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,Z.jsx)(c.A,{sx:{width:64,height:64,bgcolor:fe("#94a3b8"),color:pe.textMuted},children:(0,Z.jsx)(T.Z2J,{size:28})}),(0,Z.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:pe.textPrimary},children:"No orders to show"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,textAlign:"center",px:2},children:Le?"Try a different keyword.":"Adjust the filters above to load orders."})]}):null===Ht||void 0===Ht?void 0:Ht.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=ke[o]||{label:e.orderstatus||"\u2014",color:Ae,icon:T.Z2J},i=n.icon,a="cancelled"===o,l="delivered"===e.orderstatus;return(0,Z.jsx)(xe.pg,{accent:n.color,header:(0,Z.jsxs)(u.A,{spacing:1.25,children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textMuted},children:String(F*K+t+1).padStart(2,"0")}),(0,Z.jsx)(we,{color:Ae,size:32,children:(0,Z.jsx)(T.Itr,{size:16})}),(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.tenantname}),(0,Z.jsxs)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:700},children:["#",e.orderid]})]})]}),(0,Z.jsx)(d.A,{title:l?"View rider route":"Available for delivered orders",placement:"top",children:(0,Z.jsx)("span",{children:(0,Z.jsx)(y.A,{size:"small",disabled:!l,onClick:()=>{l&&(Yt(e.deliveryid),Ge(e))},sx:{flexShrink:0,bgcolor:fe(l?Ae:"#94a3b8"),color:l?Ae:pe.textMuted,border:"1px solid ".concat(be(l?Ae:"#94a3b8")),"&:hover":{bgcolor:l?Ae:fe("#94a3b8"),color:l?"#fff":pe.textMuted}},children:(0,Z.jsx)(T.Cd7,{size:14})})})})]}),(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge(n.color),border:"1px solid ".concat(be(n.color)),color:n.color,fontSize:11,fontWeight:800},children:[(0,Z.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge("#8b5cf6"),border:"1px solid ".concat(be("#8b5cf6")),color:"#8b5cf6",fontSize:11,fontWeight:800},children:[(0,Z.jsx)(T.bsz,{size:12})," ",e.ridername]}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted,fontWeight:600},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]}),children:(0,Z.jsxs)(xe.FG,{children:[(0,Z.jsx)(xe.pY,{label:"Pickup",children:(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.pickupcontactno}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")}),e.applocation&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:ge("#10b981"),border:"1px solid ".concat(be("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,Z.jsx)(xe.pY,{label:"Drop",children:(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.deliverycontactno}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})]})}),(0,Z.jsx)(xe.pY,{label:"Assigned",children:(0,Z.jsx)(Ce,{value:e.assigntime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Accepted",children:(0,Z.jsx)(Ce,{value:e.acceptedtime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Arrived",children:(0,Z.jsx)(Ce,{value:e.arrivaltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Picked",children:(0,Z.jsx)(Ce,{value:e.pickuptime,formatDate:rr,formatTime:or,success:"active"===e.deliverystatus})}),(0,Z.jsx)(xe.pY,{label:"Active",children:(0,Z.jsx)(Ce,{value:e.starttime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Delivered",children:(0,Z.jsx)(Ce,{value:e.deliverytime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Cancelled",children:(0,Z.jsx)(Ce,{value:e.canceltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"KMS \xb7 plan / act / rider",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,Z.jsx)(Me,{color:"#0ea5e9",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,Z.jsx)(xe.pY,{label:"Charges \xb7 chg / amt",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})}),e.ordernotes&&(0,Z.jsx)(xe.pY,{label:"Notes",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,Z.jsx)(T.NpB,{size:12,color:pe.textMuted,style:{marginTop:2,flexShrink:0}}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.ordernotes})]})})]})},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))}):(0,Z.jsxs)(w.A,{stickyHeader:!0,sx:{minWidth:1600},children:[(0,Z.jsx)(S.A,{children:(0,Z.jsxs)(k.A,{sx:{"& th":{backgroundColor:pe.surfaceAlt,color:pe.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(pe.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,Z.jsx)(D.A,{children:"#"}),(0,Z.jsx)(D.A,{children:"Map"}),(0,Z.jsx)(D.A,{children:"Client"}),(0,Z.jsx)(D.A,{children:"Pickup"}),(0,Z.jsx)(D.A,{children:"Drop"}),(0,Z.jsx)(D.A,{children:"Status / Rider"}),(0,Z.jsx)(D.A,{children:"Assigned"}),(0,Z.jsx)(D.A,{children:"Accepted"}),(0,Z.jsx)(D.A,{children:"Arrived"}),(0,Z.jsx)(D.A,{children:"Picked"}),(0,Z.jsx)(D.A,{children:"Active"}),(0,Z.jsx)(D.A,{children:"Delivered"}),(0,Z.jsx)(D.A,{children:"Cancelled"}),(0,Z.jsx)(D.A,{children:"Notes"}),(0,Z.jsx)(D.A,{align:"center",children:"KMS"}),(0,Z.jsx)(D.A,{align:"center",children:"Charges"})]})}),(0,Z.jsx)(M.A,{children:Lt?(0,Z.jsx)(de,{rows:16,columns:16,height:15}):0==(null===Ht||void 0===Ht?void 0:Ht.length)?(0,Z.jsx)(k.A,{children:(0,Z.jsx)(D.A,{colSpan:16,sx:{py:6},children:(0,Z.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,Z.jsx)(c.A,{sx:{width:64,height:64,bgcolor:fe("#94a3b8"),color:pe.textMuted},children:(0,Z.jsx)(T.Z2J,{size:28})}),(0,Z.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:pe.textPrimary},children:"No orders to show"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:Le?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}):null===Ht||void 0===Ht?void 0:Ht.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=ke[o]||{label:e.orderstatus||"\u2014",color:Ae,icon:T.Z2J},i=n.icon,a="cancelled"===o;return(0,Z.jsxs)(k.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(pe.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5},verticalAlign:"top"},"&:hover":{backgroundColor:pe.surfaceAlt}},children:[(0,Z.jsx)(D.A,{children:(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textMuted},children:String(F*K+t+1).padStart(2,"0")})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(d.A,{title:"delivered"===e.orderstatus?"View rider route":"Available for delivered orders",placement:"top",children:(0,Z.jsx)("span",{children:(0,Z.jsx)(y.A,{size:"small",disabled:"delivered"!==e.orderstatus,onClick:()=>{"delivered"===e.orderstatus&&(Yt(e.deliveryid),Ge(e))},sx:{bgcolor:"delivered"===e.orderstatus?fe(Ae):fe("#94a3b8"),color:"delivered"===e.orderstatus?Ae:pe.textMuted,border:"1px solid ".concat("delivered"===e.orderstatus?be(Ae):be("#94a3b8")),"&:hover":{bgcolor:"delivered"===e.orderstatus?Ae:fe("#94a3b8"),color:"delivered"===e.orderstatus?"#fff":pe.textMuted}},children:(0,Z.jsx)(T.Cd7,{size:14})})})})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"flex-start",spacing:1,children:[(0,Z.jsx)(we,{color:Ae,size:32,children:(0,Z.jsx)(T.Itr,{size:16})}),(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.tenantname}),(0,Z.jsx)(d.A,{title:"Order ID",placement:"top",children:(0,Z.jsxs)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:700},children:["#",e.orderid]})}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.pickupcustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.pickupcontactno}),(0,Z.jsx)(d.A,{title:e.Pickupaddress||e.pickupsuburb||"",children:(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")})}),e.applocation&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:ge("#10b981"),border:"1px solid ".concat(be("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.deliverycustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.deliverycontactno}),(0,Z.jsx)(d.A,{title:e.deliveryaddress||"",children:(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.5,children:[(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge(n.color),border:"1px solid ".concat(be(n.color)),color:n.color,fontSize:11,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,Z.jsx)(T.bsz,{size:12,color:pe.textMuted}),(0,Z.jsx)(d.A,{title:"Rider ID: ".concat(e.userid),children:(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.ridername})})]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.assigntime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.acceptedtime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.arrivaltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.pickuptime,formatDate:rr,formatTime:or,success:"active"===e.deliverystatus})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.starttime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.deliverytime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.canceltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{sx:{maxWidth:180},children:e.ordernotes?(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,Z.jsx)(T.NpB,{size:12,color:pe.textMuted,style:{marginTop:2,flexShrink:0}}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.ordernotes})]}):(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted},children:"\u2014"})}),(0,Z.jsx)(D.A,{align:"center",children:(0,Z.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,Z.jsx)(Me,{color:"#0ea5e9",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,Z.jsx)(D.A,{align:"center",children:(0,Z.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})})]},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))})]}),(0,Z.jsx)(C.A,{}),0!==(null===Ht||void 0===Ht?void 0:Ht.length)&&(0,Z.jsx)(u.A,{justifyContent:"center",alignItems:"center",sx:{width:"100%",py:2},children:(0,Z.jsx)(u.A,{ref:r,style:{textAlign:"center",width:"100%"},children:Kt||Et?(0,Z.jsx)(ie.A,{}):(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted,fontWeight:600},children:"No more orders"})})})]})}),(0,Z.jsxs)(z.A,{open:Ct,onClose:()=>zt(!1),fullWidth:!0,maxWidth:"sm",fullScreen:t,PaperProps:{sx:{borderRadius:{xs:0,sm:3},overflow:"hidden"}},children:[(0,Z.jsx)(I.A,{sx:{background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),color:"#fff",py:2},children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,Z.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.22)",color:"#fff"},children:(0,Z.jsx)(T.S3Y,{size:20})}),(0,Z.jsxs)(u.A,{children:[(0,Z.jsx)(p.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Report"}),(0,Z.jsx)(p.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:"Export Orders"})]})]}),(0,Z.jsx)(y.A,{size:"small",onClick:()=>zt(!1),sx:{color:"#fff",bgcolor:"rgba(255,255,255,0.18)","&:hover":{bgcolor:"rgba(255,255,255,0.3)"}},children:(0,Z.jsx)(T.m6K,{size:16})})]})}),(0,Z.jsxs)(W.A,{sx:{p:2},children:[Lt&&(0,Z.jsx)(G.A,{}),[{label:"App Location",value:_,color:Ae},{label:"Tenant",value:null===At||void 0===At?void 0:At.tenantname,color:"#0ea5e9"},{label:"Business Location",value:null===yt||void 0===yt?void 0:yt.locationname,color:"#10b981"},{label:"Status",value:pt,color:"#f59e0b"},{label:"Rider",value:Dt?"".concat(Dt.firstname," ").concat(Dt.lastname):null,color:"#8b5cf6"},{label:"Keyword",value:Le,color:"#06b6d4"},{label:"Start Date",value:J,color:"#14b8a6"},{label:"End Date",value:V,color:"#ef4444"}].map(((e,t)=>(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:1.5,py:1,borderRadius:2,bgcolor:ge(e.color),border:"1px solid ".concat(be(e.color)),mb:1},children:[(0,Z.jsx)(p.A,{variant:"body2",sx:{fontWeight:700,color:pe.textPrimary},children:e.label}),(0,Z.jsx)(P.A,{size:"small",label:e.value||"None",sx:{fontWeight:700,bgcolor:e.value?e.color:fe("#94a3b8"),color:e.value?"#fff":pe.textMuted,border:"none"}})]},t)))]}),(0,Z.jsxs)(R.A,{sx:{p:2,bgcolor:pe.surfaceAlt,gap:1},children:[(0,Z.jsx)(A.A,{color:"inherit",variant:"outlined",onClick:()=>zt(!1),sx:{borderRadius:999,px:2,textTransform:"none",fontWeight:700,borderColor:pe.borderSubtle,color:pe.textSecondary},children:"Cancel"}),(0,Z.jsx)(ee.pK,{data:tr,filename:"Orders_Detail_".concat(q()().format("YYYY-MM-DD_HHmmss"),".csv"),label:"Download CSV",btnLoading:Lt,onClick:()=>{setTimeout((()=>zt(!1)),0)}})]})]}),(0,Z.jsx)(oe.A,{open:ue,onClose:()=>me(!1),onSelect:e=>{U(e.startDate),$(e.endDate),Re(e.label)}}),(0,Z.jsx)(z.A,{open:Ie,onClose:()=>{We(!1)},fullScreen:!0,fullWidth:!0,children:Ee&&(0,Z.jsx)("div",{children:(0,Z.jsx)(X,{coordinates:Ee,additionalProps:{riderStart:He,riderEnd:Be},order:Je,setMapOpen:We})})})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>h,nV:()=>x,pY:()=>p,pg:()=>u});var o=r(89379),n=r(80045),i=r(93230),a=r(2235),l=r(16491),s=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:a,sx:l}=e,s=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:a,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},s),{},{children:t}))},u=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(a.A,{elevation:0,onClick:s,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},h=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>l});var o=r(93230),n=r(16491),i=r(82053),a=r(44414);function l(e){let{title:t,subtitle:r,live:l=!1,action:s}=e;return(0,a.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,a.jsxs)(n.A,{sx:{minWidth:0},children:[(0,a.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,a.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,a.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,a.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),s&&(0,a.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:s})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>j});var o=r(9950),n=r(96583),i=r(40033),a=r(82053),l=r(28170),s=r(93230),c=r(82223),d=r(55916),x=r(4159),u=r.n(x),h=r(56712),p=r(81417),m=r(96600),g=r(53132),f=r(94289),v=r(57326),b=r(50624),A=r(44414);const j=e=>{let{open:t,onClose:r,onSelect:x}=e;const[j,y]=(0,o.useState)(null);return(0,A.jsxs)(n.A,{open:t,onClose:r,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(a.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(l.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(d.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{y({startDate:u()(e.startDate).format("YYYY-MM-DD"),endDate:u()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.A)(new Date,-1),endDate:(0,h.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.A)(new Date,1),endDate:(0,h.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,m.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,v.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,b.A)(new Date,-1)),endDate:(0,v.A)((0,b.A)(new Date,-1))}]})}),(0,A.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{j?(x(j),r()):r()},children:"OK"})})]})}},36150:(e,t,r)=>{r.d(t,{I:()=>i});var o=r(69347),n=r(1729);function i(e,t){return(0,n.t)(e,o.$,t)}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(48089),n=r(50704),i=r(93230),a=r(16491),l=r(82053),s=r(82917),c=r(41413),d=r(44414);function x(e){let{title:t,value:r,icon:x,color:u="#662582",caption:h,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(a.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(s.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),h&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(u,"14"),color:u,flexShrink:0},children:x})]})})})}},46639:(e,t,r)=>{r.d(t,{A:()=>P});var o=r(57528),n=r(98587),i=r(58168),a=r(9950),l=r(72004),s=r(3484),c=r(88283),d=r(89548),x=r(18463),u=r(59254),h=r(45558),p=r(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,h.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var g,f,v,b,A=r(44414);const j=["className","color","disableShrink","size","style","thickness","value","variant"];let y,w,S,k;const D=44,M=(0,c.i7)(y||(y=g||(g=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),C=(0,c.i7)(w||(w=f||(f=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),z=(0,u.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,d.A)(r.color))]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(S||(S=v||(v=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),M)})),I=(0,u.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),W=(0,u.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t["circle".concat((0,d.A)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(k||(k=b||(b=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),C)})),P=a.forwardRef((function(e,t){const r=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:c=!1,size:u=40,style:h,thickness:p=3.6,value:g=0,variant:f="indeterminate"}=r,v=(0,n.A)(r,j),b=(0,i.A)({},r,{color:a,disableShrink:c,size:u,thickness:p,value:g,variant:f}),y=(e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(r)),n&&"circleDisableShrink"]};return(0,s.A)(i,m,t)})(b),w={},S={},k={};if("determinate"===f){const e=2*Math.PI*((D-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(g),w.strokeDashoffset="".concat(((100-g)/100*e).toFixed(3),"px"),S.transform="rotate(-90deg)"}return(0,A.jsx)(z,(0,i.A)({className:(0,l.A)(y.root,o),style:(0,i.A)({width:u,height:u},S,h),ownerState:b,ref:t,role:"progressbar"},k,v,{children:(0,A.jsx)(I,{className:y.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(D," ").concat(D),children:(0,A.jsx)(W,{className:y.circle,style:w,ownerState:b,cx:D,cy:D,r:(D-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(2660),a=r(2046),l=r(83274),s=r(25333),c=r(97125),d=r(7762),x=r(52097),u=r(44414);const h=e=>{let{value:t,onChange:r,onDebouncedChange:h,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:g}=e;const f=(0,n.useRef)(null),[v]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{h&&h(v)}),[v,h]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=f.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:f,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,u.jsx)(a.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(l.A,{title:"Clear",children:(0,u.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,u.jsx)(d.A,{})})})})}},58691:(e,t,r)=>{r.d(t,{A:()=>l});r(9950);var o=r(16491),n=r(46639),i=r(62217),a=r(44414);function l(e){let{size:t=70,imgSize:r=40,alt:l="loader"}=e;return(0,a.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,a.jsx)(n.A,{size:t}),(0,a.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,a.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),n=r(9950),i=r(93230),a=r(41413),l=r(77922),s=r(29925),c=r(26910),d=r(31222),x=r(44414);const u=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:u,setPage:h,sx:p,textfeildSx:m,textfieldSx:g,pill:f=!1,accentColor:v="#6366f1",icon:b,placeholder:A="Select Zone",paperComponent:j}=e;const[y,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const S=e=>"".concat(v).concat(e),k=S("26"),D=S("18"),M=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},C=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(a.A,{sx:{width:24,height:24,bgcolor:D,color:v,transition:"background-color 0.15s, color 0.15s"},children:b||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:j,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===u||void 0===u||u(""),null===h||void 0===h||h(0)):t&&(null===r||void 0===r||r(t.applocationid),null===u||void 0===u||u(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>f?(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:C}),sx:(0,o.A)((0,o.A)({},M),g||m||{})})):(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||m||{})}))})}))}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8846],{11041:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ie});var o=r(89379),n=r(9950),i=r(26910),a=r(60010),l=r(36150),s=r(2235),c=r(41413),d=r(83274),x=r(16491),u=r(93230),h=r(82917),p=r(82053),m=r(47223),g=r(55158),f=r(60899),v=r(77922),b=r(29925),A=r(10226),j=r(1320),y=r(25333),w=r(15769),S=r(69780),k=r(9213),D=r(21671),M=r(34075),C=r(74745),z=r(96583),I=r(40033),W=r(28170),P=r(25277),R=r(79739),Y=r(14857),T=r(31222),L=r(43302),N=r(99810),O=r(49029),F=r(47113),E=r(33516),K=r(82215),H=r(2527),_=r.n(H),B=(r(55392),r(4159)),q=r.n(B),J=r(57560),G=r(94826),Z=r(44414),U=r(36220);q().extend(U);const V=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),$=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),X=e=>{let{coordinates:t,additionalProps:r,order:o,setMapOpen:i}=e;console.log("additionalProps",r);const a=(0,n.useRef)(null),l=(0,Y.A)(),[s,c]=(0,n.useState)([]),[d,h]=(0,n.useState)(!1);if((0,n.useEffect)((()=>{if(a.current&&t.length>0){const e=[[Math.min(...t.map((e=>e.lat))),Math.min(...t.map((e=>e.lng)))],[Math.max(...t.map((e=>e.lat))),Math.max(...t.map((e=>e.lng)))]];a.current.fitBounds(e)}}),[t]),(0,n.useEffect)((()=>{(async()=>{if(h(!0),t.length<2)return c([]),void h(!1);const e=(e,t)=>{if(e.length<=t)return e;const r=Math.ceil(e.length/t),o=e.filter(((e,t)=>t%r===0)),n=e[e.length-1];return o[o.length-1]!==n&&o.push(n),o};try{const r=e(t,90).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/match/v1/driving/".concat(r,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),n=await fetch(o),i=await n.json();if(i.matchings&&i.matchings.length>0){const e=i.matchings.flatMap((e=>{var t;return((null===(t=e.geometry)||void 0===t?void 0:t.coordinates)||[]).map((e=>{let[t,r]=e;return{lat:r,lng:t}}))}));if(e.length>=2)return c(e),void h(!1)}}catch(r){console.warn("OSRM Match error, trying route fallback:",r)}try{const r=e(t,25).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/route/v1/driving/".concat(r,"?overview=full&geometries=geojson"),n=await fetch(o),i=await n.json();if(i.routes&&i.routes[0]){const e=i.routes[0].geometry.coordinates.map((e=>{let[t,r]=e;return{lat:r,lng:t}}));c(e)}else c(t)}catch(o){console.error("OSRM Route fallback error:",o),c(t)}finally{h(!1)}})()}),[t]),!t||0===t.length)return null;const m=t[0],g=t[t.length-1],f=t[Math.floor(t.length/2)],v=e=>{let{label:t,value:r}=e;return(0,Z.jsxs)(u.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,Z.jsxs)(p.A,{variant:"subtitle1",sx:{fontWeight:600},children:[t,":"]}),(0,Z.jsx)(P.A,{label:r||"0.00",color:"primary",sx:{fontWeight:700}})]})};return(0,Z.jsxs)(x.A,{sx:{width:"100%",height:"100vh",position:"relative",overflow:"hidden"},children:[d&&(0,Z.jsx)(G.A,{}),(0,Z.jsx)(P.A,{label:"Close",icon:(0,Z.jsx)(J.A,{style:{fontSize:18}}),onClick:()=>i(!1),sx:{position:"absolute",top:12,right:12,zIndex:2e3,bgcolor:l.palette.error.main,color:"#fff",fontWeight:600,borderRadius:"12px",px:1.5,py:.5,boxShadow:l.shadows[4],cursor:"pointer","& .MuiChip-icon":{color:"#fff"}}}),(0,Z.jsxs)(N.W,{center:f,zoom:14,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},ref:a,children:[(0,Z.jsx)(O.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,Z.jsx)(F.p,{position:m,icon:V,children:(0,Z.jsx)(E.m,{direction:"bottom",children:"Pickup: ".concat(q()(r.riderStart).format("DD-MM-YYYY hh:mm A"))})}),(0,Z.jsx)(F.p,{position:g,icon:$,children:(0,Z.jsx)(E.m,{direction:"bottom",children:"Drop: ".concat(q()(r.riderEnd).format("DD-MM-YYYY hh:mm A"))})}),s.length>0&&(0,Z.jsx)(K.R,{positions:s,pathOptions:{color:"blue",weight:5}})]}),(0,Z.jsx)(x.A,{sx:{position:"absolute",bottom:0,width:"100%",bgcolor:"rgba(255,255,255,0.96)",p:2,boxShadow:l.shadows[3],zIndex:1500},children:(0,Z.jsxs)(u.A,{direction:"row",flexWrap:"wrap",rowGap:1.5,columnGap:3,alignItems:"center",children:[(0,Z.jsx)(v,{label:"Tenant",value:null===o||void 0===o?void 0:o.tenantname}),(0,Z.jsx)(v,{label:"Rider",value:null===o||void 0===o?void 0:o.ridername}),(0,Z.jsx)(v,{label:"Pickup",value:null===o||void 0===o?void 0:o.pickupcustomer}),(0,Z.jsx)(v,{label:"Drop",value:null===o||void 0===o?void 0:o.deliverycustomer}),(0,Z.jsx)(v,{label:"Kms",value:null===o||void 0===o?void 0:o.kms}),(0,Z.jsx)(v,{label:"Actual Kms",value:null===o||void 0===o?void 0:o.actualkms}),(0,Z.jsx)(v,{label:"Rider Kms",value:null===o||void 0===o?void 0:o.riderkms})]})})]})};var Q=r(81425),ee=r(90376),te=r(52351),re=r(8881),oe=r(35678),ne=r(56311),ie=r(58691),ae=r(59212),le=r(27001),se=r(36803),ce=r(20466);function de(e){let{rows:t=5,columns:r=6,height:o=40}=e;return(0,Z.jsx)(Z.Fragment,{children:[...Array(t)].map(((e,t)=>(0,Z.jsx)(k.A,{children:[...Array(r)].map(((e,t)=>(0,Z.jsx)(D.A,{children:(0,Z.jsx)(h.A,{variant:"rectangular",height:o,width:70,animation:"wave"})},t)))},t)))})}var xe=r(23787),ue=r(36220);q().extend(ue);const he=(e,t,r)=>{(0,re.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:r||1500})},pe={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},me=(e,t)=>"".concat(e).concat(t),ge=e=>me(e,"08"),fe=e=>me(e,"18"),ve=e=>me(e,"26"),be=e=>me(e,"55"),Ae="#662582",je="#9255AB",ye=e=>(0,Z.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:pe.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),we=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,Z.jsx)(c.A,{sx:{width:o,height:o,bgcolor:r?t:fe(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},Se=e=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ve(e))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}}),ke={all:{label:"All",color:Ae,icon:T.YBc},pending:{label:"Pending",color:"#f59e0b",icon:T.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:T.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:T.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:T.gsJ},active:{label:"Active",color:"#14b8a6",icon:T.pk7},delivered:{label:"Delivered",color:"#10b981",icon:T.mU9},skipped:{label:"Skipped",color:"#f97316",icon:T.ivF},cancelled:{label:"Cancelled",color:"#ef4444",icon:T.uDv}},De=["all","pending","accepted","arrived","picked","active","delivered","skipped","cancelled"],Me=e=>{let{color:t,icon:r,label:o,tooltip:n}=e;return(0,Z.jsx)(d.A,{title:n||"",placement:"top",children:(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(be(t)),color:t,fontSize:11,fontWeight:800,minWidth:80,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},Ce=e=>{let{value:t,formatDate:r,formatTime:o,success:n}=e;return t?(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:600,whiteSpace:"nowrap"},children:r(t)}),(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textPrimary,fontWeight:800,whiteSpace:"nowrap"},children:o(t)}),n&&(0,Z.jsx)(L.cxC,{style:{color:"#10b981",fontSize:12}})]})]}):(0,Z.jsxs)(u.A,{spacing:.5,children:[(0,Z.jsx)(h.A,{animation:!1,variant:"text",width:70,height:12}),(0,Z.jsx)(h.A,{animation:!1,variant:"text",width:55,height:14})]})};function ze(e,t){const r=e=>e*Math.PI/180,o=r(e[0]),n=r(t[0]),i=r(t[0]-e[0]),a=r(t[1]-e[1]),l=Math.sin(i/2)**2+Math.cos(o)*Math.cos(n)*Math.sin(a/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function Ie(){const e=(0,Y.A)(),t=(0,m.A)(e.breakpoints.down("md")),r=(0,n.useRef)(),h=(0,n.useRef)(),L=(0,n.useRef)(null),N=(0,n.useRef)(null),O=localStorage.getItem("userid"),[F,E]=(0,n.useState)(0),[K,H]=(0,n.useState)(50),[_,B]=(0,n.useState)("All"),[J,U]=(0,n.useState)(q()().format("YYYY-MM-DD")),[V,$]=(0,n.useState)(q()().format("YYYY-MM-DD")),[ue,me]=(0,n.useState)(!1),[Ie,We]=(0,n.useState)(!1),[Pe,Re]=(0,n.useState)("Today"),[Ye,Te]=(0,n.useState)(0),[Le,Ne]=(0,n.useState)(""),[Oe,Fe]=(0,n.useState)(""),[Ee,Ke]=(0,n.useState)([]),[He,_e]=(0,n.useState)(),[Be,qe]=(0,n.useState)(),[Je,Ge]=(0,n.useState)({}),[Ze,Ue]=(0,n.useState)(!1);let[Ve,$e]=(0,n.useState)(0),[Xe,Qe]=(0,n.useState)(0),[et,tt]=(0,n.useState)(0),[rt,ot]=(0,n.useState)(0),[nt,it]=(0,n.useState)(0),[at,lt]=(0,n.useState)(0),[st,ct]=(0,n.useState)(0),[dt,xt]=(0,n.useState)(0),[ut,ht]=(0,n.useState)(0);const[pt,mt]=(0,n.useState)("All"),[gt,ft]=(0,n.useState)(0),[vt,bt]=(0,n.useState)(0),[At,jt]=(0,n.useState)(null),[yt,wt]=(0,n.useState)(null),[St,kt]=(0,n.useState)(),[Dt,Mt]=(0,n.useState)(null),[Ct,zt]=(0,n.useState)(!1),[It,Wt]=(0,n.useState)(!1),Pt={all:Ve,pending:et,accepted:nt,arrived:dt,picked:at,active:st,delivered:Xe,skipped:ut,cancelled:rt};function Rt(e,t,r,o){const n=(r-e)*(Math.PI/180),i=(o-t)*(Math.PI/180),a=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e*(Math.PI/180))*Math.cos(r*(Math.PI/180))*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}(0,n.useEffect)((()=>{bt(0),jt(null),ft(0),wt(null),kt(null),Mt(null)}),[Ye]),(0,n.useEffect)((()=>{ft(0),wt(null),Mt(null)}),[vt]),(0,n.useEffect)((()=>{Mt(null)}),[gt]);const Yt=async e=>{Wt(!0);try{const t=(await i.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e))).data.details;if(Array.isArray(t)&&0!==t.length){const e=t.map((e=>{var t,r,o;const n=null!==e&&void 0!==e&&e.logdate?q()(e.logdate):null;return{lat:parseFloat(null!==(t=null===e||void 0===e?void 0:e.latitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(r=null!==(o=null===e||void 0===e?void 0:e.longitude)&&void 0!==o?o:null===e||void 0===e?void 0:e.lng)&&void 0!==r?r:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:n&&n.isValid()?n.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,t)=>e._ts-t._ts));if(0!==e.length){_e(e[0].logdate),qe(e[e.length-1].logdate);const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const r=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===r.length)return[];if(1===r.length)return[{lat:r[0].lat,lng:r[0].lng,logdate:r[0].logdate,_ts:r[0]._ts}];const o=null!=t.processNoise?t.processNoise:1e-10,n=null!=t.measurementNoise?t.measurementNoise:2e-9,i=null!=t.outlierGate?t.outlierGate:9,a=null!=t.maxSpeedKmh?t.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let s=0;for(;sa||(c.push(e),d=t)}if(c.length<2)return c.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const x=e=>{const t=c.length,r=new Array(t),a=new Array(t),s=new Array(t),d=new Array(t),x=new Array(t),u=l(c[0]),h=l(c[1]),p=Math.max(.1,(h-u)/1e3),m=(c[1][e]-c[0][e])/p;r[0]=[c[0][e],m],a[0]=[n,0,0,1],s[0]=r[0].slice(),d[0]=a[0].slice(),x[0]=0;let g=u;for(let v=1;vi){r[v]=[m,f],a[v]=[k,D,M,C];continue}const W=k/I,P=M/I,R=m+W*z,Y=f+P*z;r[v]=[R,Y],a[v]=[(1-W)*k,(1-W)*D,M-P*k,C-P*D]}const f=new Array(t);f[t-1]=r[t-1].slice();for(let o=t-2;o>=0;o--){const e=x[o+1],[t,n,i,l]=a[o],c=t+e*n,u=n,h=i+e*l,p=l,[m,g,v,b]=d[o+1],A=m*b-g*v;if(!Number.isFinite(A)||Math.abs(A)<1e-30){f[o]=r[o].slice();continue}const j=b/A,y=-g/A,w=-v/A,S=m/A,k=c*j+u*w,D=c*y+u*S,M=h*j+p*w,C=h*y+p*S,z=f[o+1][0]-s[o+1][0],I=f[o+1][1]-s[o+1][1];f[o]=[r[o][0]+k*z+D*I,r[o][1]+M*z+C*I]}return f.map((e=>e[0]))},u=x("lat"),h=x("lng");return c.map(((e,t)=>({lat:u[t],lng:h[t],logdate:e.logdate,_ts:e._ts})))}(e),r=t.map((e=>({lat:e.lat,lng:e.lng})));Ke(r),function(e){let t=0;for(let r=0;r{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0}),Ht=(null===Tt||void 0===Tt?void 0:Tt.pages.flatMap((e=>e.rows)))||[];(0,n.useEffect)((()=>{if(!Et)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Ft()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return r.current&&e.observe(r.current),()=>{r.current&&e.unobserve(r.current)}}),[Et,Ft]);const{data:_t,isLoading:Bt,isError:qt,error:Jt}=(0,l.I)({queryKey:["tenantlist",Ye],queryFn:()=>(0,Q.Mn)(Ye),enabled:0!==Ye}),{data:Gt,isLoading:Zt,isError:Ut,error:Vt}=(0,l.I)({queryKey:["fetchRidersList",Ye],queryFn:Q.Sd,enabled:0!==Ye}),{data:$t,isLoading:Xt,isError:Qt,error:er}=(0,l.I)({queryKey:["gettenantlocations",vt],queryFn:()=>(0,Q.DL)(vt),enabled:0!==vt});(0,n.useEffect)((()=>{(async()=>{Ue(!0);try{await i.A.get(0==Ye?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?fromdate=").concat(J,"&todate=").concat(V):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?applocationid=").concat(Ye,"&tenantid=").concat(vt,"&locationid=").concat(gt,"&fromdate=").concat(J,"&todate=").concat(V,"&userid=").concat((null===St||void 0===St?void 0:St.userid)||0)).then((e=>{$e(e.data.details.total),tt(e.data.details.pending),it(e.data.details.accepted),xt(e.data.details.arrived),lt(e.data.details.picked),ct(e.data.details.active),Qe(e.data.details.delivered),ht(e.data.details.skipped),ot(e.data.details.cancelled)})).catch((e=>{(0,re.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(e){console.log(e)}finally{Ue(!1)}})()}),[Ye,J,V,pt,vt,gt,St]);const tr=null===Ht||void 0===Ht?void 0:Ht.map((e=>({tenantname:e.tenantname,tenantcity:e.tenantcity,tenantcontactno:e.tenantcontactno,rider:e.ridername,orderid:e.orderid,paymenttype:64==e.paymenttype?"Pay Later":42==e.paymenttype?"Pay on Delivery":"Digital",deliverydate:e.deliverydate,orderstatus:e.orderstatus,ordernotes:e.ordernotes,kms:e.kms,cumulativekms:e.cumulativekms,assigntime:e.assigntime,starttime:e.starttime,arrivaltime:e.arrivaltime,pickuptime:e.pickuptime,deliverytime:e.deliverytime,canceltime:e.canceltime,deliverycharge:e.deliverycharges,deliveryamt:e.deliveryamt,pickupcustomer:e.pickupcustomer,pickupcontactno:e.pickupcontactno,Pickupaddress:e.pickupaddress,pickupsuburb:e.pickupsuburb,pickupcity:e.applocation,pickuplat:e.pickuplat,pickuplong:e.pickuplon,deliverycustomer:e.deliverycustomer,deliverycontactno:e.deliverycontactno,deliveryaddress:e.deliveryaddress,deliverysuburb:e.locationsuburb,deliverylat:e.deliverylat,deliverylong:e.deliverylong,locationname:e.locationname,locationsuburb:e.pickuplocation,deliverylocation:e.deliverylocation,locationcontactno:e.locationcontactno})));function rr(e){return q()(e).format("DD/MM/YYYY ")}function or(e){return q()(e).format(" hh:mm A")}const nr=Nt?"An error has occurred: (fetchDeliveries) ".concat(Ot.message):qt?"An error has occurred: (getTenants) ".concat(Jt.message):Qt?"An error has occurred: (gettenantlocations) ".concat(er.message):Ut?"An error has occurred: (getriderbydelivery) ".concat(Vt.message):null;(0,n.useEffect)((()=>{nr&&he(nr,"warning",2e3)}),[nr]);const ir=[{key:"total",label:"Total Orders",color:Ae,icon:T.HU2,value:Ve},{key:"delivered",label:"Delivered",color:"#10b981",icon:T.cAP,value:Xe},{key:"pending",label:"Pending",color:"#f59e0b",icon:T.G6c,value:et},{key:"cancelled",label:"Cancelled",color:"#ef4444",icon:T.qiG,value:rt}];return(0,Z.jsxs)(Z.Fragment,{children:[(Ze||Bt||Xt||It||Zt||Kt)&&(0,Z.jsx)("div",{children:(0,Z.jsx)(te.A,{})}),Lt&&(0,Z.jsx)(g.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Lt}),(0,Z.jsx)(le.A,{title:"Orders Details",subtitle:"Live \xb7 ".concat(_||"All Zones"," \xb7 ").concat(Pe),live:!0,action:(0,Z.jsx)(ae.A,{ref:L,locaName:_,setAppId:Te,setLocoName:B,setPage:E,pill:!0,accentColor:Ae,icon:(0,Z.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:ye,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,Z.jsx)(f.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:ir.map((e=>{var t;const r=e.icon;return(0,Z.jsx)(f.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,Z.jsx)(se.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,Z.jsx)(r,{size:20}),color:e.color,loading:Ze})},e.key)}))}),(0,Z.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:pe.radiusCard/8,border:"1px solid",borderColor:pe.borderSubtle,background:"#fff",boxShadow:pe.shadowSoft},children:(0,Z.jsxs)(f.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:_t||[],value:At,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:ye,onOpen:e=>{Ye||(e.preventDefault(),(0,ce.k)("Please select a your app location first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(bt(0),jt(null),ft(0),wt(null)):(bt((null===t||void 0===t?void 0:t.tenantid)||0),jt(t),ft(t.locationid),wt(null))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{inputRef:N,placeholder:"Select Tenant",size:"small",sx:Se("#0ea5e9"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#0ea5e9",size:22,selected:!0,children:(0,Z.jsx)(T.Itr,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:$t||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:yt,PaperComponent:ye,onOpen:e=>{Ye||vt?vt||(e.preventDefault(),(0,ce.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=N.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,ce.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(ft(0),wt(null)):(ft(t.locationid||0),wt(t))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",sx:Se("#10b981"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#10b981",size:22,selected:!0,children:(0,Z.jsx)(T.JFD,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:Gt||[],value:Dt,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname),PaperComponent:ye,onOpen:()=>{Ye||(0,ce.k)("Select App Location First","warning",2e3)},onChange:(e,t,r)=>{"clear"===r?(kt(null),Mt(null)):(kt(t),Mt(t))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Rider",size:"small",sx:Se("#8b5cf6"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#8b5cf6",size:22,selected:!0,children:(0,Z.jsx)(T.bsz,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},children:[(0,Z.jsx)(d.A,{title:"Date Filter",placement:"top",children:(0,Z.jsxs)(x.A,{onClick:()=>me(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:ge("#f59e0b"),border:"1.5px solid ".concat(be("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(ve("#f59e0b"))}},children:[(0,Z.jsx)(T.Ki0,{size:14}),q()(J).format("DD/MM/YY")," \u2013 ",q()(V).format("DD/MM/YY")]})}),(0,Z.jsx)(A.A,{variant:"contained",size:"small",startIcon:(0,Z.jsx)(T.S3Y,{}),onClick:()=>{zt(!0),setTimeout((()=>{H("")}),0)},sx:{borderRadius:999,px:1.5,py:.75,fontWeight:800,fontSize:12,textTransform:"none",background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),"&:hover":{background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),boxShadow:"0 8px 22px ".concat(ve(Ae))}},children:"Export"})]})})]})}),(0,Z.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:pe.radiusCard/8,borderTopRightRadius:pe.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:pe.borderSubtle,borderBottom:0,background:"#fff"},children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,Z.jsx)(u.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:pe.borderSubtle,borderRadius:4}},children:De.map((e=>{var t;const r=ke[e],o=r.icon,n=pt.toLowerCase()===e,i=null!==(t=Pt[e])&&void 0!==t?t:0;return(0,Z.jsxs)(x.A,{onClick:()=>mt("all"===e?"All":e),sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1px solid ".concat(n?r.color:pe.borderSubtle),bgcolor:n?r.color:pe.surface,color:n?"#fff":pe.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:n?r.color:"#cbd5e1",bgcolor:n?r.color:pe.surfaceAlt}},children:[(0,Z.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:n?"rgba(255,255,255,0.22)":fe(r.color),color:n?"#fff":r.color},children:(0,Z.jsx)(o,{size:13})}),(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:r.label}),(0,Z.jsx)(x.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:n?"rgba(255,255,255,0.22)":pe.surfaceAlt,color:n?"#fff":pe.textSecondary,border:"none"},children:i})]},e)}))}),(0,Z.jsx)(x.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,Z.jsx)(ne.A,{value:Le,onChange:Ne,onDebouncedChange:Fe,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ve(Ae))}}})})]})}),(0,Z.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:pe.radiusCard/8,borderBottomRightRadius:pe.radiusCard/8,border:"1px solid",borderColor:pe.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,Z.jsxs)(j.A,{ref:h,onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e.currentTarget;t+o>=r-50&&Et&&!Kt&&Ft()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:be(Ae),borderRadius:8,"&:hover":{backgroundColor:Ae}},"&::-webkit-scrollbar-track":{backgroundColor:pe.surfaceAlt}},children:[t?(0,Z.jsx)(xe.nV,{sx:{p:1.25},children:Lt?(0,Z.jsxs)(u.A,{alignItems:"center",sx:{py:6},children:[(0,Z.jsx)(ie.A,{}),(0,Z.jsx)(p.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}):0==(null===Ht||void 0===Ht?void 0:Ht.length)?(0,Z.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,Z.jsx)(c.A,{sx:{width:64,height:64,bgcolor:fe("#94a3b8"),color:pe.textMuted},children:(0,Z.jsx)(T.Z2J,{size:28})}),(0,Z.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:pe.textPrimary},children:"No orders to show"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,textAlign:"center",px:2},children:Le?"Try a different keyword.":"Adjust the filters above to load orders."})]}):null===Ht||void 0===Ht?void 0:Ht.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=ke[o]||{label:e.orderstatus||"\u2014",color:Ae,icon:T.Z2J},i=n.icon,a="cancelled"===o,l="delivered"===e.orderstatus;return(0,Z.jsx)(xe.pg,{accent:n.color,header:(0,Z.jsxs)(u.A,{spacing:1.25,children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textMuted},children:String(F*K+t+1).padStart(2,"0")}),(0,Z.jsx)(we,{color:Ae,size:32,children:(0,Z.jsx)(T.Itr,{size:16})}),(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.tenantname}),(0,Z.jsxs)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:700},children:["#",e.orderid]})]})]}),(0,Z.jsx)(d.A,{title:l?"View rider route":"Available for delivered orders",placement:"top",children:(0,Z.jsx)("span",{children:(0,Z.jsx)(y.A,{size:"small",disabled:!l,onClick:()=>{l&&(Yt(e.deliveryid),Ge(e))},sx:{flexShrink:0,bgcolor:fe(l?Ae:"#94a3b8"),color:l?Ae:pe.textMuted,border:"1px solid ".concat(be(l?Ae:"#94a3b8")),"&:hover":{bgcolor:l?Ae:fe("#94a3b8"),color:l?"#fff":pe.textMuted}},children:(0,Z.jsx)(T.Cd7,{size:14})})})})]}),(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge(n.color),border:"1px solid ".concat(be(n.color)),color:n.color,fontSize:11,fontWeight:800},children:[(0,Z.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge("#8b5cf6"),border:"1px solid ".concat(be("#8b5cf6")),color:"#8b5cf6",fontSize:11,fontWeight:800},children:[(0,Z.jsx)(T.bsz,{size:12})," ",e.ridername]}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted,fontWeight:600},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]}),children:(0,Z.jsxs)(xe.FG,{children:[(0,Z.jsx)(xe.pY,{label:"Pickup",children:(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.pickupcontactno}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")}),e.applocation&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:ge("#10b981"),border:"1px solid ".concat(be("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,Z.jsx)(xe.pY,{label:"Drop",children:(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.deliverycontactno}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})]})}),(0,Z.jsx)(xe.pY,{label:"Assigned",children:(0,Z.jsx)(Ce,{value:e.assigntime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Accepted",children:(0,Z.jsx)(Ce,{value:e.acceptedtime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Arrived",children:(0,Z.jsx)(Ce,{value:e.arrivaltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Picked",children:(0,Z.jsx)(Ce,{value:e.pickuptime,formatDate:rr,formatTime:or,success:"active"===e.deliverystatus})}),(0,Z.jsx)(xe.pY,{label:"Active",children:(0,Z.jsx)(Ce,{value:e.starttime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Delivered",children:(0,Z.jsx)(Ce,{value:e.deliverytime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Cancelled",children:(0,Z.jsx)(Ce,{value:e.canceltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"KMS \xb7 plan / act / rider",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,Z.jsx)(Me,{color:"#0ea5e9",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,Z.jsx)(xe.pY,{label:"Charges \xb7 chg / amt",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})}),e.ordernotes&&(0,Z.jsx)(xe.pY,{label:"Notes",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,Z.jsx)(T.NpB,{size:12,color:pe.textMuted,style:{marginTop:2,flexShrink:0}}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.ordernotes})]})})]})},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))}):(0,Z.jsxs)(w.A,{stickyHeader:!0,sx:{minWidth:1600},children:[(0,Z.jsx)(S.A,{children:(0,Z.jsxs)(k.A,{sx:{"& th":{backgroundColor:pe.surfaceAlt,color:pe.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(pe.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,Z.jsx)(D.A,{children:"#"}),(0,Z.jsx)(D.A,{children:"Map"}),(0,Z.jsx)(D.A,{children:"Client"}),(0,Z.jsx)(D.A,{children:"Pickup"}),(0,Z.jsx)(D.A,{children:"Drop"}),(0,Z.jsx)(D.A,{children:"Status / Rider"}),(0,Z.jsx)(D.A,{children:"Assigned"}),(0,Z.jsx)(D.A,{children:"Accepted"}),(0,Z.jsx)(D.A,{children:"Arrived"}),(0,Z.jsx)(D.A,{children:"Picked"}),(0,Z.jsx)(D.A,{children:"Active"}),(0,Z.jsx)(D.A,{children:"Delivered"}),(0,Z.jsx)(D.A,{children:"Cancelled"}),(0,Z.jsx)(D.A,{children:"Notes"}),(0,Z.jsx)(D.A,{align:"center",children:"KMS"}),(0,Z.jsx)(D.A,{align:"center",children:"Charges"})]})}),(0,Z.jsx)(M.A,{children:Lt?(0,Z.jsx)(de,{rows:16,columns:16,height:15}):0==(null===Ht||void 0===Ht?void 0:Ht.length)?(0,Z.jsx)(k.A,{children:(0,Z.jsx)(D.A,{colSpan:16,sx:{py:6},children:(0,Z.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,Z.jsx)(c.A,{sx:{width:64,height:64,bgcolor:fe("#94a3b8"),color:pe.textMuted},children:(0,Z.jsx)(T.Z2J,{size:28})}),(0,Z.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:pe.textPrimary},children:"No orders to show"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:Le?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}):null===Ht||void 0===Ht?void 0:Ht.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=ke[o]||{label:e.orderstatus||"\u2014",color:Ae,icon:T.Z2J},i=n.icon,a="cancelled"===o;return(0,Z.jsxs)(k.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(pe.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5},verticalAlign:"top"},"&:hover":{backgroundColor:pe.surfaceAlt}},children:[(0,Z.jsx)(D.A,{children:(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textMuted},children:String(F*K+t+1).padStart(2,"0")})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(d.A,{title:"delivered"===e.orderstatus?"View rider route":"Available for delivered orders",placement:"top",children:(0,Z.jsx)("span",{children:(0,Z.jsx)(y.A,{size:"small",disabled:"delivered"!==e.orderstatus,onClick:()=>{"delivered"===e.orderstatus&&(Yt(e.deliveryid),Ge(e))},sx:{bgcolor:"delivered"===e.orderstatus?fe(Ae):fe("#94a3b8"),color:"delivered"===e.orderstatus?Ae:pe.textMuted,border:"1px solid ".concat("delivered"===e.orderstatus?be(Ae):be("#94a3b8")),"&:hover":{bgcolor:"delivered"===e.orderstatus?Ae:fe("#94a3b8"),color:"delivered"===e.orderstatus?"#fff":pe.textMuted}},children:(0,Z.jsx)(T.Cd7,{size:14})})})})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"flex-start",spacing:1,children:[(0,Z.jsx)(we,{color:Ae,size:32,children:(0,Z.jsx)(T.Itr,{size:16})}),(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.tenantname}),(0,Z.jsx)(d.A,{title:"Order ID",placement:"top",children:(0,Z.jsxs)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:700},children:["#",e.orderid]})}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.pickupcustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.pickupcontactno}),(0,Z.jsx)(d.A,{title:e.Pickupaddress||e.pickupsuburb||"",children:(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")})}),e.applocation&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:ge("#10b981"),border:"1px solid ".concat(be("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.deliverycustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.deliverycontactno}),(0,Z.jsx)(d.A,{title:e.deliveryaddress||"",children:(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.5,children:[(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge(n.color),border:"1px solid ".concat(be(n.color)),color:n.color,fontSize:11,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,Z.jsx)(T.bsz,{size:12,color:pe.textMuted}),(0,Z.jsx)(d.A,{title:"Rider ID: ".concat(e.userid),children:(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.ridername})})]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.assigntime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.acceptedtime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.arrivaltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.pickuptime,formatDate:rr,formatTime:or,success:"active"===e.deliverystatus})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.starttime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.deliverytime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.canceltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{sx:{maxWidth:180},children:e.ordernotes?(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,Z.jsx)(T.NpB,{size:12,color:pe.textMuted,style:{marginTop:2,flexShrink:0}}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.ordernotes})]}):(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted},children:"\u2014"})}),(0,Z.jsx)(D.A,{align:"center",children:(0,Z.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,Z.jsx)(Me,{color:"#0ea5e9",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,Z.jsx)(D.A,{align:"center",children:(0,Z.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})})]},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))})]}),(0,Z.jsx)(C.A,{}),0!==(null===Ht||void 0===Ht?void 0:Ht.length)&&(0,Z.jsx)(u.A,{justifyContent:"center",alignItems:"center",sx:{width:"100%",py:2},children:(0,Z.jsx)(u.A,{ref:r,style:{textAlign:"center",width:"100%"},children:Kt||Et?(0,Z.jsx)(ie.A,{}):(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted,fontWeight:600},children:"No more orders"})})})]})}),(0,Z.jsxs)(z.A,{open:Ct,onClose:()=>zt(!1),fullWidth:!0,maxWidth:"sm",fullScreen:t,PaperProps:{sx:{borderRadius:{xs:0,sm:3},overflow:"hidden"}},children:[(0,Z.jsx)(I.A,{sx:{background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),color:"#fff",py:2},children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,Z.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.22)",color:"#fff"},children:(0,Z.jsx)(T.S3Y,{size:20})}),(0,Z.jsxs)(u.A,{children:[(0,Z.jsx)(p.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Report"}),(0,Z.jsx)(p.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:"Export Orders"})]})]}),(0,Z.jsx)(y.A,{size:"small",onClick:()=>zt(!1),sx:{color:"#fff",bgcolor:"rgba(255,255,255,0.18)","&:hover":{bgcolor:"rgba(255,255,255,0.3)"}},children:(0,Z.jsx)(T.m6K,{size:16})})]})}),(0,Z.jsxs)(W.A,{sx:{p:2},children:[Lt&&(0,Z.jsx)(G.A,{}),[{label:"App Location",value:_,color:Ae},{label:"Tenant",value:null===At||void 0===At?void 0:At.tenantname,color:"#0ea5e9"},{label:"Business Location",value:null===yt||void 0===yt?void 0:yt.locationname,color:"#10b981"},{label:"Status",value:pt,color:"#f59e0b"},{label:"Rider",value:Dt?"".concat(Dt.firstname," ").concat(Dt.lastname):null,color:"#8b5cf6"},{label:"Keyword",value:Le,color:"#06b6d4"},{label:"Start Date",value:J,color:"#14b8a6"},{label:"End Date",value:V,color:"#ef4444"}].map(((e,t)=>(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:1.5,py:1,borderRadius:2,bgcolor:ge(e.color),border:"1px solid ".concat(be(e.color)),mb:1},children:[(0,Z.jsx)(p.A,{variant:"body2",sx:{fontWeight:700,color:pe.textPrimary},children:e.label}),(0,Z.jsx)(P.A,{size:"small",label:e.value||"None",sx:{fontWeight:700,bgcolor:e.value?e.color:fe("#94a3b8"),color:e.value?"#fff":pe.textMuted,border:"none"}})]},t)))]}),(0,Z.jsxs)(R.A,{sx:{p:2,bgcolor:pe.surfaceAlt,gap:1},children:[(0,Z.jsx)(A.A,{color:"inherit",variant:"outlined",onClick:()=>zt(!1),sx:{borderRadius:999,px:2,textTransform:"none",fontWeight:700,borderColor:pe.borderSubtle,color:pe.textSecondary},children:"Cancel"}),(0,Z.jsx)(ee.pK,{data:tr,filename:"Orders_Detail_".concat(q()().format("YYYY-MM-DD_HHmmss"),".csv"),label:"Download CSV",btnLoading:Lt,onClick:()=>{setTimeout((()=>zt(!1)),0)}})]})]}),(0,Z.jsx)(oe.A,{open:ue,onClose:()=>me(!1),onSelect:e=>{U(e.startDate),$(e.endDate),Re(e.label)}}),(0,Z.jsx)(z.A,{open:Ie,onClose:()=>{We(!1)},fullScreen:!0,fullWidth:!0,children:Ee&&(0,Z.jsx)("div",{children:(0,Z.jsx)(X,{coordinates:Ee,additionalProps:{riderStart:He,riderEnd:Be},order:Je,setMapOpen:We})})})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>h,nV:()=>x,pY:()=>p,pg:()=>u});var o=r(89379),n=r(80045),i=r(93230),a=r(2235),l=r(16491),s=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:a,sx:l}=e,s=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:a,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},s),{},{children:t}))},u=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(a.A,{elevation:0,onClick:s,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},h=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>l});var o=r(93230),n=r(16491),i=r(82053),a=r(44414);function l(e){let{title:t,subtitle:r,live:l=!1,action:s}=e;return(0,a.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,a.jsxs)(n.A,{sx:{minWidth:0},children:[(0,a.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,a.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,a.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,a.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),s&&(0,a.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:s})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>j});var o=r(9950),n=r(96583),i=r(40033),a=r(82053),l=r(28170),s=r(93230),c=r(10226),d=r(55916),x=r(4159),u=r.n(x),h=r(56712),p=r(81417),m=r(96600),g=r(53132),f=r(94289),v=r(57326),b=r(50624),A=r(44414);const j=e=>{let{open:t,onClose:r,onSelect:x}=e;const[j,y]=(0,o.useState)(null);return(0,A.jsxs)(n.A,{open:t,onClose:r,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(a.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(l.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(d.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{y({startDate:u()(e.startDate).format("YYYY-MM-DD"),endDate:u()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.A)(new Date,-1),endDate:(0,h.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.A)(new Date,1),endDate:(0,h.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,m.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,v.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,b.A)(new Date,-1)),endDate:(0,v.A)((0,b.A)(new Date,-1))}]})}),(0,A.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{j?(x(j),r()):r()},children:"OK"})})]})}},36150:(e,t,r)=>{r.d(t,{I:()=>i});var o=r(69347),n=r(1729);function i(e,t){return(0,n.t)(e,o.$,t)}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(48089),n=r(50704),i=r(93230),a=r(16491),l=r(82053),s=r(82917),c=r(41413),d=r(44414);function x(e){let{title:t,value:r,icon:x,color:u="#662582",caption:h,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(a.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(s.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),h&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(u,"14"),color:u,flexShrink:0},children:x})]})})})}},46639:(e,t,r)=>{r.d(t,{A:()=>P});var o=r(57528),n=r(98587),i=r(58168),a=r(9950),l=r(72004),s=r(3484),c=r(88283),d=r(89548),x=r(18463),u=r(59254),h=r(45558),p=r(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,h.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var g,f,v,b,A=r(44414);const j=["className","color","disableShrink","size","style","thickness","value","variant"];let y,w,S,k;const D=44,M=(0,c.i7)(y||(y=g||(g=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),C=(0,c.i7)(w||(w=f||(f=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),z=(0,u.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,d.A)(r.color))]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(S||(S=v||(v=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),M)})),I=(0,u.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),W=(0,u.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t["circle".concat((0,d.A)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(k||(k=b||(b=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),C)})),P=a.forwardRef((function(e,t){const r=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:c=!1,size:u=40,style:h,thickness:p=3.6,value:g=0,variant:f="indeterminate"}=r,v=(0,n.A)(r,j),b=(0,i.A)({},r,{color:a,disableShrink:c,size:u,thickness:p,value:g,variant:f}),y=(e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(r)),n&&"circleDisableShrink"]};return(0,s.A)(i,m,t)})(b),w={},S={},k={};if("determinate"===f){const e=2*Math.PI*((D-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(g),w.strokeDashoffset="".concat(((100-g)/100*e).toFixed(3),"px"),S.transform="rotate(-90deg)"}return(0,A.jsx)(z,(0,i.A)({className:(0,l.A)(y.root,o),style:(0,i.A)({width:u,height:u},S,h),ownerState:b,ref:t,role:"progressbar"},k,v,{children:(0,A.jsx)(I,{className:y.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(D," ").concat(D),children:(0,A.jsx)(W,{className:y.circle,style:w,ownerState:b,cx:D,cy:D,r:(D-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(2660),a=r(2046),l=r(83274),s=r(25333),c=r(97125),d=r(7762),x=r(52097),u=r(44414);const h=e=>{let{value:t,onChange:r,onDebouncedChange:h,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:g}=e;const f=(0,n.useRef)(null),[v]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{h&&h(v)}),[v,h]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=f.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:f,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,u.jsx)(a.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(l.A,{title:"Clear",children:(0,u.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,u.jsx)(d.A,{})})})})}},58691:(e,t,r)=>{r.d(t,{A:()=>l});r(9950);var o=r(16491),n=r(46639),i=r(62217),a=r(44414);function l(e){let{size:t=70,imgSize:r=40,alt:l="loader"}=e;return(0,a.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,a.jsx)(n.A,{size:t}),(0,a.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,a.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),n=r(9950),i=r(93230),a=r(41413),l=r(77922),s=r(29925),c=r(26910),d=r(31222),x=r(44414);const u=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:u,setPage:h,sx:p,textfeildSx:m,textfieldSx:g,pill:f=!1,accentColor:v="#6366f1",icon:b,placeholder:A="Select Zone",paperComponent:j}=e;const[y,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const S=e=>"".concat(v).concat(e),k=S("26"),D=S("18"),M=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},C=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(a.A,{sx:{width:24,height:24,bgcolor:D,color:v,transition:"background-color 0.15s, color 0.15s"},children:b||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:j,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===u||void 0===u||u(""),null===h||void 0===h||h(0)):t&&(null===r||void 0===r||r(t.applocationid),null===u||void 0===u||u(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>f?(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:C}),sx:(0,o.A)((0,o.A)({},M),g||m||{})})):(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||m||{})}))})}))}}]); \ No newline at end of file diff --git a/build/static/js/8954.4813af23.chunk.js b/build/static/js/8954.e87abf2c.chunk.js similarity index 99% rename from build/static/js/8954.4813af23.chunk.js rename to build/static/js/8954.e87abf2c.chunk.js index 63936e2..c57f327 100644 --- a/build/static/js/8954.4813af23.chunk.js +++ b/build/static/js/8954.e87abf2c.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8954],{62217:e=>{e.exports="data:image/png;base64,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"},88954:(e,a,t)=>{t.r(a),t.d(a,{default:()=>T});var l=t(89379),n=t(9950),o=t(28429),s=t(14857),i=t(47223),r=t(93230),c=t(82053),d=t(82223),h=t(16491),p=t(60899),A=t(19647),m=t(29925),u=t(70006),x=t(23266),g=t(77922),v=t(63189),j=t(81831),f=t(95359),y=t(30633),C=t(50027),b=t(26910),S=t(56713),k=t(52351),W=t(99459),Y=t(8881),F=t(4159),N=t.n(F),R=t(94826),B=t(44414);const T=()=>{const e=(0,s.A)(),a=(0,i.A)(e.breakpoints.down("md")),t=(0,o.zy)(),[F,T]=(0,n.useState)(null),w=(0,o.Zp)(),[I,J]=(0,n.useState)(""),[M,P]=(0,n.useState)(""),[z,D]=(0,n.useState)(""),[K,L]=(0,n.useState)(""),[V,H]=(0,n.useState)({}),[E,Z]=(0,n.useState)([]),[G,U]=(0,n.useState)([]),[q,O]=(0,n.useState)([]),[Q,X]=(0,n.useState)([]),[_,$]=(0,n.useState)(),ee=localStorage.getItem("userid");W.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[ae,te]=(0,n.useState)(!1);(0,n.useEffect)((()=>{(async e=>{try{let a=await b.A.get("https://jupiter.nearle.app/live/api/v1/partners/getriderdetail/?userid=".concat(e));console.log("riderdataresponse",a.data.details),T(a.data.details),se(a.data.details.applocationid)}catch(a){console.log("fetchmanagerList",a)}})(t.state.riderdata.userid)}),[]),(0,n.useEffect)((()=>{console.log("riderdata",F)}),[F,I]),(0,n.useEffect)((()=>{J(t.state.riderdata.address),P(t.state.riderdata.suburb),D(t.state.riderdata.city),L(t.state.riderdata.state)}),[]),(0,n.useEffect)((()=>{localStorage.getItem("tenantid")&&le(localStorage.getItem("tenantid")),ne(),oe()}),[]),(0,n.useEffect)((()=>{V.applocationid&&se(V.applocationid)}),[V.applocationid]);const le=async e=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(e)).then((e=>{console.log(e),e.data.status&&setTenantinfo(e.data.details),te(!1)})).catch((e=>{console.log(e),te(!1)}))},ne=async()=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes?tag=vehicle")).then((e=>{console.log("fetchvehicle",e);let a=[];e.data.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),Z([...a]),te(!1)})).catch((e=>{console.log(e),te(!1)}))},oe=async()=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes?tag=accounttype")).then((e=>{console.log(e);let a=[];e.data.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),U([...a]),console.log(a),te(!1)})).catch((e=>{console.log(e),te(!1)}))};(0,n.useEffect)((()=>{(async()=>{try{const e=await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(ee));console.log("fetchAppLocations",e.data.details),O(e.data.details)}catch(e){console.log("locationRes",e)}})()}),[]);const se=async e=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getridershifts/?applocationid=").concat(e)).then((e=>{console.log("fetchridershifts",e);let a=[];e.data.details.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.shiftname}))})),X([...a]),console.log(a),te(!1)})).catch((e=>{console.log(e),te(!1)}))};(0,n.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:ie}=(0,S.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let a,t,l,n;console.log(e),J(e.formatted_address);for(let o=0;o{T(null),w("/nearle/riders")},children:"Back to Riders"})]}),children:(0,B.jsx)(h.A,{sx:{maxHeight:"calc(100vh - 280px)",overflowY:"auto",overflowX:"hidden",scrollbarGutter:"stable",scrollBehavior:"smooth"},children:(0,B.jsxs)(r.A,{display:"flex",spacing:{xs:2.5,sm:5},children:[(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Contact Information"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-last-name",children:"First Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",value:null===F||void 0===F?void 0:F.firstname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{firstname:e.target.value}))},placeholder:"Name",autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-last-name",children:"Last Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{lastname:e.target.value}))},value:null===F||void 0===F?void 0:F.lastname,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,B.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,B.jsx)(u.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,B.jsx)(x.A,{value:"+1",children:"+91"})}),(0,B.jsx)(m.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{contactno:e.target.value}))},value:null===F||void 0===F?void 0:F.contactno,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-email",children:"Email Address"}),(0,B.jsx)(m.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{email:e.target.value}))},value:null===F||void 0===F?void 0:F.email,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-address",children:"Address"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:I,onChange:e=>{J(e.target.value)},inputRef:ie})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Location"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{suburb:e.target.value})),P(e.target.value)},value:M,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-zipcode",children:"City"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{city:e.target.value})),D(e.target.value)},value:z,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"State"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{state:e.target.value})),L(e.target.value)},value:K,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Identification No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Identification No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{identificationno:e.target.value}))},value:null===F||void 0===F?void 0:F.identificationno,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Choose Partner"}),(0,B.jsx)(g.A,{disablePortal:!0,id:"combo-box-demo",options:q,getOptionLabel:e=>"".concat(e.locationname),sx:{width:{xs:"100%",sm:300},height:"30px",ml:{xs:0,sm:3},zIndex:"100"},onChange:(e,a)=>{a?(console.log(a),$(a.locationname),se(a.applocationid),T((0,l.A)((0,l.A)({},F),{},{partnerid:a.partnerid,applocationid:a.applocationid}))):H({})},renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:_||(null===F||void 0===F?void 0:F.city)}))})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Charges"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Shift Type"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:null!==F&&void 0!==F&&F.starttime&&null!==F&&void 0!==F&&F.endtime?"".concat(null===F||void 0===F?void 0:F.starttime," - ").concat(null===F||void 0===F?void 0:F.endtime):"Choose"})),options:Q,onChange:(e,a)=>{a?(console.log("shift",a),T((0,l.A)((0,l.A)({},F),{},{shiftid:a.shiftid,additionalkm:a.additionalkm,additionalcharges:a.additionalcharges,basefare:a.basefare,starttime:a.starttime,endtime:a.endtime})),setBasefare(a.basefare),setAdditionalkms(a.additionalkm),setOthercharges(a.additionalcharges),setShift(a)):(setBasefare(""),setAdditionalkms(""),setOthercharges(""),setShift({}))},freeSolo:!0})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Base Fare"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Base Fare",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{basefare:e.target.value})),setBasefare(e.target.value)},value:null===F||void 0===F?void 0:F.basefare,autoComplete:"off",disabled:!0})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Additional Kms"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Additional Kms",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{additionalkm:e.target.value})),setAdditionalkms(e.target.value)},value:null===F||void 0===F?void 0:F.additionalkm,autoComplete:"off",disabled:!0})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Other Charges"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Other Charges",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{additionalcharges:e.target.value})),setOthercharges(e.target.value)},value:null===F||void 0===F?void 0:F.additionalcharges,autoComplete:"off",disabled:!0})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Bank Details"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[" ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account No",value:null===F||void 0===F?void 0:F.accountno,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{accountno:e.target.value})),setAccountno(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account Name",value:null===F||void 0===F?void 0:F.accountname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{accountname:e.target.value})),setAccountname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account Type"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===F||void 0===F?void 0:F.accounttype)?"Choose":null===F||void 0===F?void 0:F.accounttype})),options:G,onChange:(e,a)=>{console.log("ac type",a),a?(T((0,l.A)((0,l.A)({},F),{},{accounttype:a.label})),setAccount(a),setAccountType(a.label)):setAccount({})},freeSolo:!0})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Bank Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Bank Name",value:null===F||void 0===F?void 0:F.bankname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{bankname:e.target.value})),setBankname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"IFSC Code"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"IFSC Code",value:null===F||void 0===F?void 0:F.ifsccode,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{ifsccode:e.target.value})),setIfsc(e.target.value)},autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Branch"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Branch",value:null===F||void 0===F?void 0:F.branch,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{branch:e.target.value})),setBranch(e.target.value)},autoComplete:"off"})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Vehicle Details"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle Name"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===F||void 0===F?void 0:F.vehiclename)?"Choose":null===F||void 0===F?void 0:F.vehiclename})),options:E,onChange:(e,a)=>{a?(console.log("vehi",a),setVehicle(a),T((0,l.A)((0,l.A)({},F),{},{vehiclename:a.label,vehicleid:a.apptypeid}))):setVehicle({})},freeSolo:!0})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{vehicleno:e.target.value}))},value:null===F||void 0===F?void 0:F.vehicleno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Model Year"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Model Year",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{model:e.target.value})),setModelyear(e.target.value)},value:null===F||void 0===F?void 0:F.model,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle Color"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle Color",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{color:e.target.value})),setVehiclecolor(e.target.value)},value:null===F||void 0===F?void 0:F.color,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"License No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"License No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{licenseno:e.target.value}))},value:null===F||void 0===F?void 0:F.licenseno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Insurance No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Insurance No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{insuranceno:e.target.value}))},value:null===F||void 0===F?void 0:F.insuranceno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Insurance Expiry Date"}),(0,B.jsx)(j.$,{dateAdapter:f.R,children:(0,B.jsx)(y.l,{label:"Date",value:N()(null===F||void 0===F?void 0:F.insurancedate),onChange:e=>{setExpirydate(N()(e.$d).format("YYYY-MM-DD 00:00:00")),T((0,l.A)((0,l.A)({},F),{},{insurancedate:N()(e.$d).format("YYYY-MM-DD 00:00:00")}))},sx:{width:"100%"}})})]})})]})})]})})}),(0,B.jsx)(h.A,{sx:{position:"sticky",bottom:0,backgroundColor:"secondary.lighter",p:2,zIndex:10,border:" 1px solid ",borderColor:"#E6EBF1",borderTop:"none"},children:(0,B.jsxs)(r.A,{direction:{xs:"column-reverse",sm:"row"},justifyContent:"flex-end",spacing:2,children:[(0,B.jsx)(d.A,{startIcon:(0,B.jsx)(v.A,{}),variant:"outlined",fullWidth:a,onClick:()=>w("/nearle/riders"),children:"Back to Riders"}),(0,B.jsx)(d.A,{variant:"contained",fullWidth:a,onClick:()=>{(async()=>{te(!0),console.log("updated riderData",F),await b.A.put("https://jupiter.nearle.app/live/api/v1/partners/updaterider",{userid:F.userid,contactno:F.contactno,firstname:F.firstname,lastname:F.lastname,email:F.email,address:F.address,suburb:F.suburb,city:F.city,state:F.state,partnerid:F.partnerid,applocationid:F.applocationid,ridersettings:{riderid:F.riderid,userid:F.userid,partnerid:F.partnerid,shiftid:F.shiftid,identificationno:F.identificationno,basefare:F.basefare,additionalkm:F.additionalkm,othercharges:F.othercharges,accountno:F.accountno,accountname:F.accountname,accounttypeid:F.accounttypeid,accounttype:F.accounttype,bankname:F.bankname,ifsccode:F.ifsccode,Branch:F.branch,vehicleid:F.vehicleid,vehiclename:F.vehiclename,vehicleno:F.vehicleno,model:F.model,color:F.color,licenseno:F.licenseno,insurancedate:N()(F.insurancedate).format("YYYY-MM-DD HH:mm:ss")}}).then((e=>{console.log("post response",e),200==e.status?((0,Y.M8)("Updated Sucessfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),T(null),w("/nearle/riders"),te(!1)):((0,Y.M8)("Update Failed",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),te(!1))}))})()},children:"Update"})]})})]})}},94826:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(59254),n=t(46639),o=t(62217),s=t(44414);const i=(0,l.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),r=(0,l.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,s.jsxs)(i,{children:[(0,s.jsx)(n.A,{color:"primary",size:80,thickness:6}),(0,s.jsx)(r,{children:(0,s.jsx)("img",{src:o,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8954],{62217:e=>{e.exports="data:image/png;base64,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"},88954:(e,a,t)=>{t.r(a),t.d(a,{default:()=>T});var l=t(89379),n=t(9950),o=t(28429),s=t(14857),i=t(47223),r=t(93230),c=t(82053),d=t(10226),h=t(16491),p=t(60899),A=t(19647),m=t(29925),u=t(70006),x=t(23266),g=t(77922),v=t(63189),j=t(81831),f=t(95359),y=t(30633),C=t(50027),b=t(26910),S=t(56713),k=t(52351),W=t(99459),Y=t(8881),F=t(4159),N=t.n(F),R=t(94826),B=t(44414);const T=()=>{const e=(0,s.A)(),a=(0,i.A)(e.breakpoints.down("md")),t=(0,o.zy)(),[F,T]=(0,n.useState)(null),w=(0,o.Zp)(),[I,J]=(0,n.useState)(""),[M,P]=(0,n.useState)(""),[z,D]=(0,n.useState)(""),[K,L]=(0,n.useState)(""),[V,H]=(0,n.useState)({}),[E,Z]=(0,n.useState)([]),[G,U]=(0,n.useState)([]),[q,O]=(0,n.useState)([]),[Q,X]=(0,n.useState)([]),[_,$]=(0,n.useState)(),ee=localStorage.getItem("userid");W.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[ae,te]=(0,n.useState)(!1);(0,n.useEffect)((()=>{(async e=>{try{let a=await b.A.get("https://jupiter.nearle.app/live/api/v1/partners/getriderdetail/?userid=".concat(e));console.log("riderdataresponse",a.data.details),T(a.data.details),se(a.data.details.applocationid)}catch(a){console.log("fetchmanagerList",a)}})(t.state.riderdata.userid)}),[]),(0,n.useEffect)((()=>{console.log("riderdata",F)}),[F,I]),(0,n.useEffect)((()=>{J(t.state.riderdata.address),P(t.state.riderdata.suburb),D(t.state.riderdata.city),L(t.state.riderdata.state)}),[]),(0,n.useEffect)((()=>{localStorage.getItem("tenantid")&&le(localStorage.getItem("tenantid")),ne(),oe()}),[]),(0,n.useEffect)((()=>{V.applocationid&&se(V.applocationid)}),[V.applocationid]);const le=async e=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(e)).then((e=>{console.log(e),e.data.status&&setTenantinfo(e.data.details),te(!1)})).catch((e=>{console.log(e),te(!1)}))},ne=async()=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes?tag=vehicle")).then((e=>{console.log("fetchvehicle",e);let a=[];e.data.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),Z([...a]),te(!1)})).catch((e=>{console.log(e),te(!1)}))},oe=async()=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes?tag=accounttype")).then((e=>{console.log(e);let a=[];e.data.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),U([...a]),console.log(a),te(!1)})).catch((e=>{console.log(e),te(!1)}))};(0,n.useEffect)((()=>{(async()=>{try{const e=await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(ee));console.log("fetchAppLocations",e.data.details),O(e.data.details)}catch(e){console.log("locationRes",e)}})()}),[]);const se=async e=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getridershifts/?applocationid=").concat(e)).then((e=>{console.log("fetchridershifts",e);let a=[];e.data.details.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.shiftname}))})),X([...a]),console.log(a),te(!1)})).catch((e=>{console.log(e),te(!1)}))};(0,n.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:ie}=(0,S.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let a,t,l,n;console.log(e),J(e.formatted_address);for(let o=0;o{T(null),w("/nearle/riders")},children:"Back to Riders"})]}),children:(0,B.jsx)(h.A,{sx:{maxHeight:"calc(100vh - 280px)",overflowY:"auto",overflowX:"hidden",scrollbarGutter:"stable",scrollBehavior:"smooth"},children:(0,B.jsxs)(r.A,{display:"flex",spacing:{xs:2.5,sm:5},children:[(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Contact Information"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-last-name",children:"First Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",value:null===F||void 0===F?void 0:F.firstname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{firstname:e.target.value}))},placeholder:"Name",autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-last-name",children:"Last Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{lastname:e.target.value}))},value:null===F||void 0===F?void 0:F.lastname,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,B.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,B.jsx)(u.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,B.jsx)(x.A,{value:"+1",children:"+91"})}),(0,B.jsx)(m.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{contactno:e.target.value}))},value:null===F||void 0===F?void 0:F.contactno,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-email",children:"Email Address"}),(0,B.jsx)(m.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{email:e.target.value}))},value:null===F||void 0===F?void 0:F.email,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-address",children:"Address"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:I,onChange:e=>{J(e.target.value)},inputRef:ie})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Location"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{suburb:e.target.value})),P(e.target.value)},value:M,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-zipcode",children:"City"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{city:e.target.value})),D(e.target.value)},value:z,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"State"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{state:e.target.value})),L(e.target.value)},value:K,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Identification No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Identification No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{identificationno:e.target.value}))},value:null===F||void 0===F?void 0:F.identificationno,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Choose Partner"}),(0,B.jsx)(g.A,{disablePortal:!0,id:"combo-box-demo",options:q,getOptionLabel:e=>"".concat(e.locationname),sx:{width:{xs:"100%",sm:300},height:"30px",ml:{xs:0,sm:3},zIndex:"100"},onChange:(e,a)=>{a?(console.log(a),$(a.locationname),se(a.applocationid),T((0,l.A)((0,l.A)({},F),{},{partnerid:a.partnerid,applocationid:a.applocationid}))):H({})},renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:_||(null===F||void 0===F?void 0:F.city)}))})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Charges"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Shift Type"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:null!==F&&void 0!==F&&F.starttime&&null!==F&&void 0!==F&&F.endtime?"".concat(null===F||void 0===F?void 0:F.starttime," - ").concat(null===F||void 0===F?void 0:F.endtime):"Choose"})),options:Q,onChange:(e,a)=>{a?(console.log("shift",a),T((0,l.A)((0,l.A)({},F),{},{shiftid:a.shiftid,additionalkm:a.additionalkm,additionalcharges:a.additionalcharges,basefare:a.basefare,starttime:a.starttime,endtime:a.endtime})),setBasefare(a.basefare),setAdditionalkms(a.additionalkm),setOthercharges(a.additionalcharges),setShift(a)):(setBasefare(""),setAdditionalkms(""),setOthercharges(""),setShift({}))},freeSolo:!0})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Base Fare"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Base Fare",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{basefare:e.target.value})),setBasefare(e.target.value)},value:null===F||void 0===F?void 0:F.basefare,autoComplete:"off",disabled:!0})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Additional Kms"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Additional Kms",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{additionalkm:e.target.value})),setAdditionalkms(e.target.value)},value:null===F||void 0===F?void 0:F.additionalkm,autoComplete:"off",disabled:!0})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Other Charges"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Other Charges",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{additionalcharges:e.target.value})),setOthercharges(e.target.value)},value:null===F||void 0===F?void 0:F.additionalcharges,autoComplete:"off",disabled:!0})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Bank Details"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[" ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account No",value:null===F||void 0===F?void 0:F.accountno,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{accountno:e.target.value})),setAccountno(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account Name",value:null===F||void 0===F?void 0:F.accountname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{accountname:e.target.value})),setAccountname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account Type"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===F||void 0===F?void 0:F.accounttype)?"Choose":null===F||void 0===F?void 0:F.accounttype})),options:G,onChange:(e,a)=>{console.log("ac type",a),a?(T((0,l.A)((0,l.A)({},F),{},{accounttype:a.label})),setAccount(a),setAccountType(a.label)):setAccount({})},freeSolo:!0})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Bank Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Bank Name",value:null===F||void 0===F?void 0:F.bankname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{bankname:e.target.value})),setBankname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"IFSC Code"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"IFSC Code",value:null===F||void 0===F?void 0:F.ifsccode,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{ifsccode:e.target.value})),setIfsc(e.target.value)},autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Branch"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Branch",value:null===F||void 0===F?void 0:F.branch,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{branch:e.target.value})),setBranch(e.target.value)},autoComplete:"off"})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Vehicle Details"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle Name"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===F||void 0===F?void 0:F.vehiclename)?"Choose":null===F||void 0===F?void 0:F.vehiclename})),options:E,onChange:(e,a)=>{a?(console.log("vehi",a),setVehicle(a),T((0,l.A)((0,l.A)({},F),{},{vehiclename:a.label,vehicleid:a.apptypeid}))):setVehicle({})},freeSolo:!0})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{vehicleno:e.target.value}))},value:null===F||void 0===F?void 0:F.vehicleno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Model Year"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Model Year",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{model:e.target.value})),setModelyear(e.target.value)},value:null===F||void 0===F?void 0:F.model,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle Color"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle Color",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{color:e.target.value})),setVehiclecolor(e.target.value)},value:null===F||void 0===F?void 0:F.color,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"License No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"License No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{licenseno:e.target.value}))},value:null===F||void 0===F?void 0:F.licenseno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Insurance No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Insurance No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{insuranceno:e.target.value}))},value:null===F||void 0===F?void 0:F.insuranceno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Insurance Expiry Date"}),(0,B.jsx)(j.$,{dateAdapter:f.R,children:(0,B.jsx)(y.l,{label:"Date",value:N()(null===F||void 0===F?void 0:F.insurancedate),onChange:e=>{setExpirydate(N()(e.$d).format("YYYY-MM-DD 00:00:00")),T((0,l.A)((0,l.A)({},F),{},{insurancedate:N()(e.$d).format("YYYY-MM-DD 00:00:00")}))},sx:{width:"100%"}})})]})})]})})]})})}),(0,B.jsx)(h.A,{sx:{position:"sticky",bottom:0,backgroundColor:"secondary.lighter",p:2,zIndex:10,border:" 1px solid ",borderColor:"#E6EBF1",borderTop:"none"},children:(0,B.jsxs)(r.A,{direction:{xs:"column-reverse",sm:"row"},justifyContent:"flex-end",spacing:2,children:[(0,B.jsx)(d.A,{startIcon:(0,B.jsx)(v.A,{}),variant:"outlined",fullWidth:a,onClick:()=>w("/nearle/riders"),children:"Back to Riders"}),(0,B.jsx)(d.A,{variant:"contained",fullWidth:a,onClick:()=>{(async()=>{te(!0),console.log("updated riderData",F),await b.A.put("https://jupiter.nearle.app/live/api/v1/partners/updaterider",{userid:F.userid,contactno:F.contactno,firstname:F.firstname,lastname:F.lastname,email:F.email,address:F.address,suburb:F.suburb,city:F.city,state:F.state,partnerid:F.partnerid,applocationid:F.applocationid,ridersettings:{riderid:F.riderid,userid:F.userid,partnerid:F.partnerid,shiftid:F.shiftid,identificationno:F.identificationno,basefare:F.basefare,additionalkm:F.additionalkm,othercharges:F.othercharges,accountno:F.accountno,accountname:F.accountname,accounttypeid:F.accounttypeid,accounttype:F.accounttype,bankname:F.bankname,ifsccode:F.ifsccode,Branch:F.branch,vehicleid:F.vehicleid,vehiclename:F.vehiclename,vehicleno:F.vehicleno,model:F.model,color:F.color,licenseno:F.licenseno,insurancedate:N()(F.insurancedate).format("YYYY-MM-DD HH:mm:ss")}}).then((e=>{console.log("post response",e),200==e.status?((0,Y.M8)("Updated Sucessfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),T(null),w("/nearle/riders"),te(!1)):((0,Y.M8)("Update Failed",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),te(!1))}))})()},children:"Update"})]})})]})}},94826:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(59254),n=t(46639),o=t(62217),s=t(44414);const i=(0,l.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),r=(0,l.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,s.jsxs)(i,{children:[(0,s.jsx)(n.A,{color:"primary",size:80,thickness:6}),(0,s.jsx)(r,{children:(0,s.jsx)("img",{src:o,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file diff --git a/build/static/js/9438.044b1550.chunk.js b/build/static/js/9438.9a476f5c.chunk.js similarity index 99% rename from build/static/js/9438.044b1550.chunk.js rename to build/static/js/9438.9a476f5c.chunk.js index 8eed787..0a13295 100644 --- a/build/static/js/9438.044b1550.chunk.js +++ b/build/static/js/9438.9a476f5c.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9438],{9438:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var o=r(89379),n=r(9950),i=r(60010),l=r(2235),s=r(41413),a=r(83274),d=r(16491),c=r(14857),u=r(47223),x=r(60899),h=r(82053),f=r(93230),p=r(1320),g=r(15769),m=r(69780),v=r(9213),b=r(21671),A=r(34075),j=r(25277),w=r(31222),S=r(4159),y=r.n(S),C=r(81425),D=r(52351),R=r(35678),k=r(59212),M=r(56311),P=r(27001),N=r(36803),Y=r(23787),W=r(44414),I=r(36220);y().extend(I);const z={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},L=(e,t)=>"".concat(e).concat(t),F=e=>L(e,"18"),T=e=>L(e,"08"),O=e=>L(e,"55"),H=e=>L(e,"26"),B="#662582",E=e=>(0,W.jsx)(l.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:z.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),_=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,W.jsx)(s.A,{sx:{width:o,height:o,bgcolor:r?t:F(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},J=e=>{let{color:t,icon:r,label:o,tooltip:n,minWidth:i=80}=e;return(0,W.jsx)(a.A,{title:n||"",placement:"top",children:(0,W.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(O(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},K=[{id:"morning",name:"Morning Batch",startHour:0,endHour:8},{id:"afternoon",name:"Afternoon Batch",startHour:9,endHour:12.5},{id:"evening",name:"Evening Batch",startHour:16,endHour:19}],V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;const r=null===e||void 0===e?void 0:e.assigntime;if(!r)return null;const o=String(r).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(o))return null;const n=y()(r);return n.isValid()?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;for(const r of t)if(e>=r.startHour&&e{if("undefined"===typeof window)return K;try{const e=window.localStorage.getItem("dispatch.slots.v9");if(!e)return K;const t=JSON.parse(e);return Array.isArray(t)&&t.length===K.length?t.map(((e,t)=>{var r;const o=e.id||"slot-".concat(t+1),n=Number(e.startHour)||0,i=Number(e.endHour)||24;return{id:o,name:e.name||(null===(r=K.find((e=>e.id===o)))||void 0===r?void 0:r.name)||"Slot ".concat(t+1),startHour:n,endHour:i}})):K}catch(e){return K}}),[]),{data:we,isLoading:Se,fetchNextPage:ye,hasNextPage:Ce,isFetchingNextPage:De}=(0,i.q)({queryKey:["fetchdeliveries",fe,Ae,"all",ne,le,2e3,"",0,0,0],queryFn:C.tL,getNextPageParam:e=>{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0},refetchOnWindowFocus:!1});(0,n.useEffect)((()=>{Ce&&!De&&ye()}),[Ce,De,ye]);const Re=(0,n.useMemo)((()=>{const e=((null===we||void 0===we?void 0:we.pages)||[]).flatMap((e=>e.rows||[])),t=new Set,r=[];for(const o of e){const e=null!=o.orderid?String(o.orderid):null;e&&t.has(e)||(e&&t.add(e),r.push(o))}return r}),[we]),ke=(0,n.useMemo)((()=>{const e={};return Re.forEach((t=>{const r=String(t.userid||t.rider_id||"");r&&"unassigned"!==r&&"0"!==r&&(e[r]||(e[r]={id:r,riderName:t.ridername||t.rider_name||t.username||"Rider ".concat(r),orders:[]}),e[r].orders.some((e=>e.orderid===t.orderid))||e[r].orders.push(t))})),Object.values(e).map((e=>(0,o.A)((0,o.A)({},e),{},{orders:[...e.orders].sort(((e,t)=>{const r=e.trip_number||1,o=t.trip_number||1;return r!==o?r-o:(e.step||0)-(t.step||0)}))}))).sort(((e,t)=>t.orders.length-e.orders.length))}),[Re]),Me=(0,n.useMemo)((()=>{let e=0,t=0,r=0,n=0,i=0,l=0;const s=ke.map((s=>{let a=0,d=0;const c={};let u=0;if(s.orders.forEach((e=>{const t=V(e,je);if(!t)return;const r=parseFloat(e.kms||e.actualkms||0);d+=r,a+=r<=8?30:30+6*(r-8);const o=e.assigntime?y()(e.assigntime).format("YYYY-MM-DD"):e.deliverydate?y()(e.deliverydate).format("YYYY-MM-DD"):null;o&&(c[o]||(c[o]=new Set),c[o].add(t),u++)})),0===u)return null;let x=0;Object.values(c).forEach((e=>{x+=Math.min(e.size,3)}));const h=2.5*d,f=x*(500/3),p=h+f,g=a-p,m=a>0?g/a*100:0;return g>=0?i++:l++,t+=u,r+=a,n+=p,e++,(0,o.A)((0,o.A)({},s),{},{kms:d,revenue:a,varCost:h,fixedCost:f,totalCost:p,net:g,margin:m})})).filter(Boolean),a=r-n;return{activeRiders:e,totalOrders:t,totalRevenue:r,totalCost:n,totalNet:a,totalMargin:r>0?a/r*100:0,profitableRiders:i,lossRiders:l,enrichedRiders:s}}),[ke,je]),Pe=(0,n.useMemo)((()=>{if(null===Me||void 0===Me||!Me.enrichedRiders||!Array.isArray(Me.enrichedRiders))return[];const e=Me.enrichedRiders.filter(Boolean);if(!ve)return e;const t=ve.toLowerCase().trim();return e.filter((e=>e&&[e.riderName,String(e.id)].filter(Boolean).some((e=>String(e).toLowerCase().includes(t)))))}),[null===Me||void 0===Me?void 0:Me.enrichedRiders,ve]),Ne=[{key:"riders",label:"Riders Active",color:B,icon:w.LTk,value:null!==(e=null===Me||void 0===Me?void 0:Me.activeRiders)&&void 0!==e?e:0,detail:"".concat(null!==(t=null===Me||void 0===Me?void 0:Me.profitableRiders)&&void 0!==t?t:0," in profit \xb7 ").concat(null!==(r=null===Me||void 0===Me?void 0:Me.lossRiders)&&void 0!==r?r:0," at loss")},{key:"revenue",label:"Slot Revenue",color:"#0ea5e9",icon:w.HU2,value:q(null!==(S=null===Me||void 0===Me?void 0:Me.totalRevenue)&&void 0!==S?S:0),detail:"From ".concat(null!==(I=null===Me||void 0===Me?void 0:Me.totalOrders)&&void 0!==I?I:0," orders")},{key:"cost",label:"Slot Cost",color:"#f59e0b",icon:w.DwJ,value:q(null!==(L=null===Me||void 0===Me?void 0:Me.totalCost)&&void 0!==L?L:0),detail:"Fixed + variable"},{key:"net",label:"Slot Net",color:(null!==(Z=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==Z?Z:0)>=0?"#10b981":"#ef4444",icon:(null!==($=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==$?$:0)>=0?w.imn:w.Rod,value:"".concat((null!==(G=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==G?G:0)>=0?"+":"").concat(q(null!==(U=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==U?U:0)),detail:"".concat((null!==(Q=null===Me||void 0===Me?void 0:Me.totalRevenue)&&void 0!==Q?Q:0)>0&&(null!==(X=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==X?X:0)/(null!==(ee=null===Me||void 0===Me?void 0:Me.totalRevenue)&&void 0!==ee?ee:1)>=0?"+":"").concat((null!==(te=null===Me||void 0===Me?void 0:Me.totalMargin)&&void 0!==te?te:0).toFixed(0),"% margin")}];return(0,W.jsxs)(W.Fragment,{children:[(Se||De)&&(0,W.jsx)(D.A,{}),(0,W.jsx)(P.A,{title:"Profitability Report",subtitle:"Live \xb7 ".concat(ae||"All Zones"," \xb7 ").concat(xe),live:!0,action:(0,W.jsx)(k.A,{locaName:ae,setAppId:pe,setLocoName:de,pill:!0,accentColor:B,icon:(0,W.jsx)(w.HPi,{size:14}),placeholder:"Select Zone",paperComponent:E,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,W.jsx)(x.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ne.map((e=>{var t;const r=e.icon;return(0,W.jsxs)(x.Ay,{item:!0,xs:6,sm:6,md:3,children:[(0,W.jsx)(N.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,W.jsx)(r,{size:20}),color:e.color,loading:Se}),(0,W.jsx)(h.A,{variant:"caption",sx:{color:z.textSecondary,display:"block",mt:.5,px:2,fontWeight:500},children:e.detail})]},e.key)}))}),(0,W.jsx)(l.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:z.radiusCard/8,borderTopRightRadius:z.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:z.borderSubtle,borderBottom:0,background:"#fff"},children:(0,W.jsxs)(f.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,W.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,W.jsx)(_,{color:B,size:32,children:(0,W.jsx)(w.LTk,{size:18})}),(0,W.jsxs)(f.A,{children:[(0,W.jsxs)(h.A,{variant:"caption",sx:{fontWeight:800,color:z.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:["Profitability Overview \xb7 ",xe]}),(0,W.jsxs)(h.A,{variant:"body2",sx:{color:z.textPrimary,fontWeight:700},children:[Pe.length," riders \xb7 ",Me.profitableRiders," profitable \xb7 ",Me.lossRiders," at loss"]})]}),(0,W.jsx)(a.A,{title:"Date Filter",placement:"top",children:(0,W.jsxs)(d.A,{onClick:()=>ue(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:T("#f59e0b"),border:"1.5px solid ".concat(O("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,ml:1,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(H("#f59e0b"))}},children:[(0,W.jsx)(w.Ki0,{size:14}),y()(ne).format("DD/MM/YY")," \u2013 ",y()(le).format("DD/MM/YY")]})})]}),(0,W.jsx)(d.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,W.jsx)(M.A,{value:ge,onChange:me,onDebouncedChange:be,placeholder:"Search riders",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(H(B))}}})})]})}),(0,W.jsx)(l.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:z.radiusCard/8,borderBottomRightRadius:z.radiusCard/8,border:"1px solid",borderColor:z.borderSubtle,overflow:"hidden",background:"#fff"},children:oe?(0,W.jsx)(Y.nV,{scroll:!0,children:Pe&&0!==Pe.length?Pe.map(((e,t)=>{var r;if(!e)return null;const o=(null!==(r=e.net)&&void 0!==r?r:0)>=0;return(0,W.jsx)(Y.pg,{accent:o?"#10b981":"#ef4444",header:(0,W.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,W.jsx)(_,{color:o?"#10b981":"#ef4444",size:36,children:(0,W.jsx)(w.LTk,{size:18})}),(0,W.jsxs)(f.A,{children:[(0,W.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:z.textPrimary},children:e.riderName}),(0,W.jsxs)(h.A,{variant:"caption",sx:{color:z.textSecondary},children:["ID #",e.id]})]})]}),children:(0,W.jsxs)(Y.FG,{columns:2,children:[(0,W.jsx)(Y.pY,{label:"Orders",value:e.orders.length}),(0,W.jsx)(Y.pY,{label:"Distance",value:"".concat(e.kms.toFixed(2)," km")}),(0,W.jsx)(Y.pY,{label:"Revenue",value:q(e.revenue)}),(0,W.jsx)(Y.pY,{label:"Fixed Cost",value:q(e.fixedCost)}),(0,W.jsx)(Y.pY,{label:"Variable Cost",value:q(e.varCost)}),(0,W.jsx)(Y.pY,{label:"Total Cost",value:q(e.totalCost)}),(0,W.jsx)(Y.pY,{label:"Net Profit",value:"".concat(o?"+":"").concat(q(e.net)),full:!0}),(0,W.jsx)(Y.pY,{label:"Margin",value:"".concat(Math.abs(e.margin).toFixed(0),"%"),full:!0})]})},e.id||t)})):(0,W.jsxs)(f.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,W.jsx)(s.A,{sx:{width:64,height:64,bgcolor:F("#94a3b8"),color:z.textMuted},children:(0,W.jsx)(w.LTk,{size:28})}),(0,W.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:z.textPrimary},children:"No riders to show"})]})}):(0,W.jsx)(p.A,{sx:{maxHeight:"calc(100vh - 280px)","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:O(B),borderRadius:8,"&:hover":{backgroundColor:B}},"&::-webkit-scrollbar-track":{backgroundColor:z.surfaceAlt}},children:(0,W.jsxs)(g.A,{stickyHeader:!0,sx:{minWidth:1e3},children:[(0,W.jsx)(m.A,{children:(0,W.jsxs)(v.A,{sx:{"& th":{backgroundColor:z.surfaceAlt,color:z.textSecondary,fontSize:11,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(z.borderSubtle),py:1.25,px:2}},children:[(0,W.jsx)(b.A,{children:"#"}),(0,W.jsx)(b.A,{children:"Rider"}),(0,W.jsx)(b.A,{align:"center",children:"Orders"}),(0,W.jsx)(b.A,{align:"center",children:"Distance"}),(0,W.jsx)(b.A,{align:"center",children:"Revenue"}),(0,W.jsx)(b.A,{align:"center",children:"Fixed Cost"}),(0,W.jsx)(b.A,{align:"center",children:"Variable Cost"}),(0,W.jsx)(b.A,{align:"center",children:"Total Cost"}),(0,W.jsx)(b.A,{align:"center",children:"Net Profit"}),(0,W.jsx)(b.A,{align:"center",children:"Margin"})]})}),(0,W.jsx)(A.A,{children:Pe&&0!==Pe.length?Pe.map(((e,t)=>{var r;if(!e)return null;const o=(null!==(r=e.net)&&void 0!==r?r:0)>=0;return(0,W.jsxs)(v.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(z.divider),py:1.5,px:2},"&:hover":{backgroundColor:z.surfaceAlt}},children:[(0,W.jsx)(b.A,{children:(0,W.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:z.textMuted},children:String(t+1).padStart(2,"0")})}),(0,W.jsx)(b.A,{children:(0,W.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,W.jsx)(_,{color:B,size:36,children:(0,W.jsx)(w.LTk,{size:18})}),(0,W.jsxs)(f.A,{children:[(0,W.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:z.textPrimary,whiteSpace:"nowrap"},children:e.riderName}),(0,W.jsxs)(h.A,{variant:"caption",sx:{color:z.textSecondary},children:["ID #",e.id]})]})]})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(h.A,{variant:"body2",sx:{fontWeight:700,color:z.textPrimary},children:e.orders.length})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#10b981",icon:(0,W.jsx)(w.xI$,{size:11}),label:"".concat(e.kms.toFixed(2)," km"),tooltip:"KMS"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:B,icon:(0,W.jsx)(w.S75,{size:11}),label:q(e.revenue).replace("\u20b9","").trim(),tooltip:"Revenue"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#6366f1",icon:(0,W.jsx)(w.DwJ,{size:11}),label:q(e.fixedCost).replace("\u20b9","").trim(),tooltip:"Fixed Cost"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#f59e0b",icon:(0,W.jsx)(w.pk7,{size:11}),label:q(e.varCost).replace("\u20b9","").trim(),tooltip:"Variable Cost"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#94a3b8",icon:(0,W.jsx)(w.DwJ,{size:11}),label:q(e.totalCost).replace("\u20b9","").trim(),tooltip:"Total Cost"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:o?"#10b981":"#ef4444",icon:o?(0,W.jsx)(w.imn,{size:11}):(0,W.jsx)(w.Rod,{size:11}),label:"".concat(o?"+":"").concat(q(e.net).replace("\u20b9","").trim()),tooltip:"Net Profit"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(j.A,{label:"".concat(Math.abs(e.margin).toFixed(0),"%"),color:o?"success":"error",size:"small",sx:{fontWeight:700,minWidth:60}})})]},e.id||t)})):(0,W.jsx)(v.A,{children:(0,W.jsx)(b.A,{colSpan:10,sx:{py:6},children:(0,W.jsxs)(f.A,{alignItems:"center",spacing:1.5,children:[(0,W.jsx)(s.A,{sx:{width:64,height:64,bgcolor:F("#94a3b8"),color:z.textMuted},children:(0,W.jsx)(w.LTk,{size:28})}),(0,W.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:z.textPrimary},children:"No riders to show"})]})})})})]})})}),(0,W.jsx)(R.A,{open:ce,onClose:()=>ue(!1),onSelect:e=>{ie(e.startDate),se(e.endDate),he(e.label)}})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>h,nV:()=>u,pY:()=>f,pg:()=>x});var o=r(89379),n=r(80045),i=r(93230),l=r(2235),s=r(16491),a=r(82053),d=r(44414);const c=["children","scroll","onScroll","sx"],u=e=>{let{children:t,scroll:r=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,c);return(0,d.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:t}))},x=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:a,children:c,sx:u}=e;return(0,d.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},u),children:[(0,d.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,d.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,c,n]})]})},h=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,d.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},f=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,d.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,d.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,d.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,d.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>s});var o=r(93230),n=r(16491),i=r(82053),l=r(44414);function s(e){let{title:t,subtitle:r,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>j});var o=r(9950),n=r(96583),i=r(40033),l=r(82053),s=r(28170),a=r(93230),d=r(82223),c=r(55916),u=r(4159),x=r.n(u),h=r(56712),f=r(81417),p=r(96600),g=r(53132),m=r(94289),v=r(57326),b=r(50624),A=r(44414);const j=e=>{let{open:t,onClose:r,onSelect:u}=e;const[j,w]=(0,o.useState)(null);return(0,A.jsxs)(n.A,{open:t,onClose:r,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(c.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{w({startDate:x()(e.startDate).format("YYYY-MM-DD"),endDate:x()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.A)(new Date,-1),endDate:(0,h.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.A)(new Date,1),endDate:(0,h.A)(new Date,1)},{label:"This Week",startDate:(0,f.A)(new Date),endDate:(0,p.A)(new Date)},{label:"Last Week",startDate:(0,f.A)((0,g.A)(new Date,-1)),endDate:(0,p.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,m.A)(new Date),endDate:(0,v.A)(new Date)},{label:"Last Month",startDate:(0,m.A)((0,b.A)(new Date,-1)),endDate:(0,v.A)((0,b.A)(new Date,-1))}]})}),(0,A.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(d.A,{variant:"contained",size:"small",onClick:()=>{j?(u(j),r()):r()},children:"OK"})})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(48089),n=r(50704),i=r(93230),l=r(16491),s=r(82053),a=r(82917),d=r(41413),c=r(44414);function u(e){let{title:t,value:r,icon:u,color:x="#662582",caption:h,loading:f=!1}=e;return(0,c.jsx)(o.A,{sx:{height:"100%"},children:(0,c.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,c.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,c.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,c.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),f?(0,c.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,c.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),h&&(0,c.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),u&&(0,c.jsx)(d.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(x,"14"),color:x,flexShrink:0},children:u})]})})})}},56311:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(2660),l=r(2046),s=r(83274),a=r(25333),d=r(97125),c=r(7762),u=r(52097),x=r(44414);const h=e=>{let{value:t,onChange:r,onDebouncedChange:h,debounceTime:f=500,placeholder:p="Search (ctrl+k)",sx:g}=e;const m=(0,n.useRef)(null),[v]=(0,u.d7)(t,f);return(0,n.useEffect)((()=>{h&&h(v)}),[v,h]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=m.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===m.current&&m.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,x.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:m,placeholder:p,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,x.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,x.jsx)(d.A,{})}),endAdornment:(0,x.jsx)(s.A,{title:"Clear",children:(0,x.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,x.jsx)(c.A,{})})})})}},59212:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(89379),n=r(9950),i=r(93230),l=r(41413),s=r(77922),a=r(29925),d=r(26910),c=r(31222),u=r(44414);const x=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:x,setPage:h,sx:f,textfeildSx:p,textfieldSx:g,pill:m=!1,accentColor:v="#6366f1",icon:b,placeholder:A="Select Zone",paperComponent:j}=e;const[w,S]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await d.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(v).concat(e),C=y("26"),D=y("18"),R=m?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},k=m&&(0,u.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,u.jsx)(l.A,{sx:{width:24,height:24,bgcolor:D,color:v,transition:"background-color 0.15s, color 0.15s"},children:b||(0,u.jsx)(c.HPi,{size:14})})});return(0,u.jsx)(s.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:j,sx:(0,o.A)({},f),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===x||void 0===x||x(""),null===h||void 0===h||h(0)):t&&(null===r||void 0===r||r(t.applocationid),null===x||void 0===x||x(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>m?(0,u.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:k}),sx:(0,o.A)((0,o.A)({},R),g||p||{})})):(0,u.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||p||{})}))})}))},60010:(e,t,r)=>{r.d(t,{q:()=>a});var o=r(89379),n=r(69347),i=r(45247),l=class extends n.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions((0,o.A)((0,o.A)({},e),{},{behavior:(0,i.PL)()}),t)}getOptimisticResult(e){return e.behavior=(0,i.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch((0,o.A)((0,o.A)({},e),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(e){return this.fetch((0,o.A)((0,o.A)({},e),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(e,t){var r,n;const{state:l}=e,s=super.createResult(e,t),{isFetching:a,isRefetching:d}=s,c=a&&"forward"===(null===(r=l.fetchMeta)||void 0===r||null===(r=r.fetchMore)||void 0===r?void 0:r.direction),u=a&&"backward"===(null===(n=l.fetchMeta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction);return(0,o.A)((0,o.A)({},s),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,i.rB)(t,l.data),hasPreviousPage:(0,i.RQ)(t,l.data),isFetchingNextPage:c,isFetchingPreviousPage:u,isRefetching:d&&!c&&!u})}},s=r(1729);function a(e,t){return(0,s.t)(e,l,t)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9438],{9438:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var o=r(89379),n=r(9950),i=r(60010),l=r(2235),s=r(41413),a=r(83274),d=r(16491),c=r(14857),u=r(47223),x=r(60899),h=r(82053),f=r(93230),p=r(1320),g=r(15769),m=r(69780),v=r(9213),b=r(21671),A=r(34075),j=r(25277),w=r(31222),S=r(4159),y=r.n(S),C=r(81425),D=r(52351),R=r(35678),k=r(59212),M=r(56311),P=r(27001),N=r(36803),Y=r(23787),W=r(44414),I=r(36220);y().extend(I);const z={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},L=(e,t)=>"".concat(e).concat(t),F=e=>L(e,"18"),T=e=>L(e,"08"),O=e=>L(e,"55"),H=e=>L(e,"26"),B="#662582",E=e=>(0,W.jsx)(l.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:z.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),_=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,W.jsx)(s.A,{sx:{width:o,height:o,bgcolor:r?t:F(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},J=e=>{let{color:t,icon:r,label:o,tooltip:n,minWidth:i=80}=e;return(0,W.jsx)(a.A,{title:n||"",placement:"top",children:(0,W.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(O(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},K=[{id:"morning",name:"Morning Batch",startHour:0,endHour:8},{id:"afternoon",name:"Afternoon Batch",startHour:9,endHour:12.5},{id:"evening",name:"Evening Batch",startHour:16,endHour:19}],V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;const r=null===e||void 0===e?void 0:e.assigntime;if(!r)return null;const o=String(r).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(o))return null;const n=y()(r);return n.isValid()?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;for(const r of t)if(e>=r.startHour&&e{if("undefined"===typeof window)return K;try{const e=window.localStorage.getItem("dispatch.slots.v9");if(!e)return K;const t=JSON.parse(e);return Array.isArray(t)&&t.length===K.length?t.map(((e,t)=>{var r;const o=e.id||"slot-".concat(t+1),n=Number(e.startHour)||0,i=Number(e.endHour)||24;return{id:o,name:e.name||(null===(r=K.find((e=>e.id===o)))||void 0===r?void 0:r.name)||"Slot ".concat(t+1),startHour:n,endHour:i}})):K}catch(e){return K}}),[]),{data:we,isLoading:Se,fetchNextPage:ye,hasNextPage:Ce,isFetchingNextPage:De}=(0,i.q)({queryKey:["fetchdeliveries",fe,Ae,"all",ne,le,2e3,"",0,0,0],queryFn:C.tL,getNextPageParam:e=>{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0},refetchOnWindowFocus:!1});(0,n.useEffect)((()=>{Ce&&!De&&ye()}),[Ce,De,ye]);const Re=(0,n.useMemo)((()=>{const e=((null===we||void 0===we?void 0:we.pages)||[]).flatMap((e=>e.rows||[])),t=new Set,r=[];for(const o of e){const e=null!=o.orderid?String(o.orderid):null;e&&t.has(e)||(e&&t.add(e),r.push(o))}return r}),[we]),ke=(0,n.useMemo)((()=>{const e={};return Re.forEach((t=>{const r=String(t.userid||t.rider_id||"");r&&"unassigned"!==r&&"0"!==r&&(e[r]||(e[r]={id:r,riderName:t.ridername||t.rider_name||t.username||"Rider ".concat(r),orders:[]}),e[r].orders.some((e=>e.orderid===t.orderid))||e[r].orders.push(t))})),Object.values(e).map((e=>(0,o.A)((0,o.A)({},e),{},{orders:[...e.orders].sort(((e,t)=>{const r=e.trip_number||1,o=t.trip_number||1;return r!==o?r-o:(e.step||0)-(t.step||0)}))}))).sort(((e,t)=>t.orders.length-e.orders.length))}),[Re]),Me=(0,n.useMemo)((()=>{let e=0,t=0,r=0,n=0,i=0,l=0;const s=ke.map((s=>{let a=0,d=0;const c={};let u=0;if(s.orders.forEach((e=>{const t=V(e,je);if(!t)return;const r=parseFloat(e.kms||e.actualkms||0);d+=r,a+=r<=8?30:30+6*(r-8);const o=e.assigntime?y()(e.assigntime).format("YYYY-MM-DD"):e.deliverydate?y()(e.deliverydate).format("YYYY-MM-DD"):null;o&&(c[o]||(c[o]=new Set),c[o].add(t),u++)})),0===u)return null;let x=0;Object.values(c).forEach((e=>{x+=Math.min(e.size,3)}));const h=2.5*d,f=x*(500/3),p=h+f,g=a-p,m=a>0?g/a*100:0;return g>=0?i++:l++,t+=u,r+=a,n+=p,e++,(0,o.A)((0,o.A)({},s),{},{kms:d,revenue:a,varCost:h,fixedCost:f,totalCost:p,net:g,margin:m})})).filter(Boolean),a=r-n;return{activeRiders:e,totalOrders:t,totalRevenue:r,totalCost:n,totalNet:a,totalMargin:r>0?a/r*100:0,profitableRiders:i,lossRiders:l,enrichedRiders:s}}),[ke,je]),Pe=(0,n.useMemo)((()=>{if(null===Me||void 0===Me||!Me.enrichedRiders||!Array.isArray(Me.enrichedRiders))return[];const e=Me.enrichedRiders.filter(Boolean);if(!ve)return e;const t=ve.toLowerCase().trim();return e.filter((e=>e&&[e.riderName,String(e.id)].filter(Boolean).some((e=>String(e).toLowerCase().includes(t)))))}),[null===Me||void 0===Me?void 0:Me.enrichedRiders,ve]),Ne=[{key:"riders",label:"Riders Active",color:B,icon:w.LTk,value:null!==(e=null===Me||void 0===Me?void 0:Me.activeRiders)&&void 0!==e?e:0,detail:"".concat(null!==(t=null===Me||void 0===Me?void 0:Me.profitableRiders)&&void 0!==t?t:0," in profit \xb7 ").concat(null!==(r=null===Me||void 0===Me?void 0:Me.lossRiders)&&void 0!==r?r:0," at loss")},{key:"revenue",label:"Slot Revenue",color:"#0ea5e9",icon:w.HU2,value:q(null!==(S=null===Me||void 0===Me?void 0:Me.totalRevenue)&&void 0!==S?S:0),detail:"From ".concat(null!==(I=null===Me||void 0===Me?void 0:Me.totalOrders)&&void 0!==I?I:0," orders")},{key:"cost",label:"Slot Cost",color:"#f59e0b",icon:w.DwJ,value:q(null!==(L=null===Me||void 0===Me?void 0:Me.totalCost)&&void 0!==L?L:0),detail:"Fixed + variable"},{key:"net",label:"Slot Net",color:(null!==(Z=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==Z?Z:0)>=0?"#10b981":"#ef4444",icon:(null!==($=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==$?$:0)>=0?w.imn:w.Rod,value:"".concat((null!==(G=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==G?G:0)>=0?"+":"").concat(q(null!==(U=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==U?U:0)),detail:"".concat((null!==(Q=null===Me||void 0===Me?void 0:Me.totalRevenue)&&void 0!==Q?Q:0)>0&&(null!==(X=null===Me||void 0===Me?void 0:Me.totalNet)&&void 0!==X?X:0)/(null!==(ee=null===Me||void 0===Me?void 0:Me.totalRevenue)&&void 0!==ee?ee:1)>=0?"+":"").concat((null!==(te=null===Me||void 0===Me?void 0:Me.totalMargin)&&void 0!==te?te:0).toFixed(0),"% margin")}];return(0,W.jsxs)(W.Fragment,{children:[(Se||De)&&(0,W.jsx)(D.A,{}),(0,W.jsx)(P.A,{title:"Profitability Report",subtitle:"Live \xb7 ".concat(ae||"All Zones"," \xb7 ").concat(xe),live:!0,action:(0,W.jsx)(k.A,{locaName:ae,setAppId:pe,setLocoName:de,pill:!0,accentColor:B,icon:(0,W.jsx)(w.HPi,{size:14}),placeholder:"Select Zone",paperComponent:E,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,W.jsx)(x.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ne.map((e=>{var t;const r=e.icon;return(0,W.jsxs)(x.Ay,{item:!0,xs:6,sm:6,md:3,children:[(0,W.jsx)(N.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,W.jsx)(r,{size:20}),color:e.color,loading:Se}),(0,W.jsx)(h.A,{variant:"caption",sx:{color:z.textSecondary,display:"block",mt:.5,px:2,fontWeight:500},children:e.detail})]},e.key)}))}),(0,W.jsx)(l.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:z.radiusCard/8,borderTopRightRadius:z.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:z.borderSubtle,borderBottom:0,background:"#fff"},children:(0,W.jsxs)(f.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,W.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,W.jsx)(_,{color:B,size:32,children:(0,W.jsx)(w.LTk,{size:18})}),(0,W.jsxs)(f.A,{children:[(0,W.jsxs)(h.A,{variant:"caption",sx:{fontWeight:800,color:z.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:["Profitability Overview \xb7 ",xe]}),(0,W.jsxs)(h.A,{variant:"body2",sx:{color:z.textPrimary,fontWeight:700},children:[Pe.length," riders \xb7 ",Me.profitableRiders," profitable \xb7 ",Me.lossRiders," at loss"]})]}),(0,W.jsx)(a.A,{title:"Date Filter",placement:"top",children:(0,W.jsxs)(d.A,{onClick:()=>ue(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:T("#f59e0b"),border:"1.5px solid ".concat(O("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,ml:1,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(H("#f59e0b"))}},children:[(0,W.jsx)(w.Ki0,{size:14}),y()(ne).format("DD/MM/YY")," \u2013 ",y()(le).format("DD/MM/YY")]})})]}),(0,W.jsx)(d.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,W.jsx)(M.A,{value:ge,onChange:me,onDebouncedChange:be,placeholder:"Search riders",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(H(B))}}})})]})}),(0,W.jsx)(l.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:z.radiusCard/8,borderBottomRightRadius:z.radiusCard/8,border:"1px solid",borderColor:z.borderSubtle,overflow:"hidden",background:"#fff"},children:oe?(0,W.jsx)(Y.nV,{scroll:!0,children:Pe&&0!==Pe.length?Pe.map(((e,t)=>{var r;if(!e)return null;const o=(null!==(r=e.net)&&void 0!==r?r:0)>=0;return(0,W.jsx)(Y.pg,{accent:o?"#10b981":"#ef4444",header:(0,W.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,W.jsx)(_,{color:o?"#10b981":"#ef4444",size:36,children:(0,W.jsx)(w.LTk,{size:18})}),(0,W.jsxs)(f.A,{children:[(0,W.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:z.textPrimary},children:e.riderName}),(0,W.jsxs)(h.A,{variant:"caption",sx:{color:z.textSecondary},children:["ID #",e.id]})]})]}),children:(0,W.jsxs)(Y.FG,{columns:2,children:[(0,W.jsx)(Y.pY,{label:"Orders",value:e.orders.length}),(0,W.jsx)(Y.pY,{label:"Distance",value:"".concat(e.kms.toFixed(2)," km")}),(0,W.jsx)(Y.pY,{label:"Revenue",value:q(e.revenue)}),(0,W.jsx)(Y.pY,{label:"Fixed Cost",value:q(e.fixedCost)}),(0,W.jsx)(Y.pY,{label:"Variable Cost",value:q(e.varCost)}),(0,W.jsx)(Y.pY,{label:"Total Cost",value:q(e.totalCost)}),(0,W.jsx)(Y.pY,{label:"Net Profit",value:"".concat(o?"+":"").concat(q(e.net)),full:!0}),(0,W.jsx)(Y.pY,{label:"Margin",value:"".concat(Math.abs(e.margin).toFixed(0),"%"),full:!0})]})},e.id||t)})):(0,W.jsxs)(f.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,W.jsx)(s.A,{sx:{width:64,height:64,bgcolor:F("#94a3b8"),color:z.textMuted},children:(0,W.jsx)(w.LTk,{size:28})}),(0,W.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:z.textPrimary},children:"No riders to show"})]})}):(0,W.jsx)(p.A,{sx:{maxHeight:"calc(100vh - 280px)","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:O(B),borderRadius:8,"&:hover":{backgroundColor:B}},"&::-webkit-scrollbar-track":{backgroundColor:z.surfaceAlt}},children:(0,W.jsxs)(g.A,{stickyHeader:!0,sx:{minWidth:1e3},children:[(0,W.jsx)(m.A,{children:(0,W.jsxs)(v.A,{sx:{"& th":{backgroundColor:z.surfaceAlt,color:z.textSecondary,fontSize:11,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(z.borderSubtle),py:1.25,px:2}},children:[(0,W.jsx)(b.A,{children:"#"}),(0,W.jsx)(b.A,{children:"Rider"}),(0,W.jsx)(b.A,{align:"center",children:"Orders"}),(0,W.jsx)(b.A,{align:"center",children:"Distance"}),(0,W.jsx)(b.A,{align:"center",children:"Revenue"}),(0,W.jsx)(b.A,{align:"center",children:"Fixed Cost"}),(0,W.jsx)(b.A,{align:"center",children:"Variable Cost"}),(0,W.jsx)(b.A,{align:"center",children:"Total Cost"}),(0,W.jsx)(b.A,{align:"center",children:"Net Profit"}),(0,W.jsx)(b.A,{align:"center",children:"Margin"})]})}),(0,W.jsx)(A.A,{children:Pe&&0!==Pe.length?Pe.map(((e,t)=>{var r;if(!e)return null;const o=(null!==(r=e.net)&&void 0!==r?r:0)>=0;return(0,W.jsxs)(v.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(z.divider),py:1.5,px:2},"&:hover":{backgroundColor:z.surfaceAlt}},children:[(0,W.jsx)(b.A,{children:(0,W.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:z.textMuted},children:String(t+1).padStart(2,"0")})}),(0,W.jsx)(b.A,{children:(0,W.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,W.jsx)(_,{color:B,size:36,children:(0,W.jsx)(w.LTk,{size:18})}),(0,W.jsxs)(f.A,{children:[(0,W.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:z.textPrimary,whiteSpace:"nowrap"},children:e.riderName}),(0,W.jsxs)(h.A,{variant:"caption",sx:{color:z.textSecondary},children:["ID #",e.id]})]})]})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(h.A,{variant:"body2",sx:{fontWeight:700,color:z.textPrimary},children:e.orders.length})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#10b981",icon:(0,W.jsx)(w.xI$,{size:11}),label:"".concat(e.kms.toFixed(2)," km"),tooltip:"KMS"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:B,icon:(0,W.jsx)(w.S75,{size:11}),label:q(e.revenue).replace("\u20b9","").trim(),tooltip:"Revenue"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#6366f1",icon:(0,W.jsx)(w.DwJ,{size:11}),label:q(e.fixedCost).replace("\u20b9","").trim(),tooltip:"Fixed Cost"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#f59e0b",icon:(0,W.jsx)(w.pk7,{size:11}),label:q(e.varCost).replace("\u20b9","").trim(),tooltip:"Variable Cost"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:"#94a3b8",icon:(0,W.jsx)(w.DwJ,{size:11}),label:q(e.totalCost).replace("\u20b9","").trim(),tooltip:"Total Cost"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(J,{color:o?"#10b981":"#ef4444",icon:o?(0,W.jsx)(w.imn,{size:11}):(0,W.jsx)(w.Rod,{size:11}),label:"".concat(o?"+":"").concat(q(e.net).replace("\u20b9","").trim()),tooltip:"Net Profit"})}),(0,W.jsx)(b.A,{align:"center",children:(0,W.jsx)(j.A,{label:"".concat(Math.abs(e.margin).toFixed(0),"%"),color:o?"success":"error",size:"small",sx:{fontWeight:700,minWidth:60}})})]},e.id||t)})):(0,W.jsx)(v.A,{children:(0,W.jsx)(b.A,{colSpan:10,sx:{py:6},children:(0,W.jsxs)(f.A,{alignItems:"center",spacing:1.5,children:[(0,W.jsx)(s.A,{sx:{width:64,height:64,bgcolor:F("#94a3b8"),color:z.textMuted},children:(0,W.jsx)(w.LTk,{size:28})}),(0,W.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:z.textPrimary},children:"No riders to show"})]})})})})]})})}),(0,W.jsx)(R.A,{open:ce,onClose:()=>ue(!1),onSelect:e=>{ie(e.startDate),se(e.endDate),he(e.label)}})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>h,nV:()=>u,pY:()=>f,pg:()=>x});var o=r(89379),n=r(80045),i=r(93230),l=r(2235),s=r(16491),a=r(82053),d=r(44414);const c=["children","scroll","onScroll","sx"],u=e=>{let{children:t,scroll:r=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,c);return(0,d.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:t}))},x=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:a,children:c,sx:u}=e;return(0,d.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},u),children:[(0,d.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,d.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,c,n]})]})},h=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,d.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},f=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,d.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,d.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,d.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,d.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>s});var o=r(93230),n=r(16491),i=r(82053),l=r(44414);function s(e){let{title:t,subtitle:r,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>j});var o=r(9950),n=r(96583),i=r(40033),l=r(82053),s=r(28170),a=r(93230),d=r(10226),c=r(55916),u=r(4159),x=r.n(u),h=r(56712),f=r(81417),p=r(96600),g=r(53132),m=r(94289),v=r(57326),b=r(50624),A=r(44414);const j=e=>{let{open:t,onClose:r,onSelect:u}=e;const[j,w]=(0,o.useState)(null);return(0,A.jsxs)(n.A,{open:t,onClose:r,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(c.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{w({startDate:x()(e.startDate).format("YYYY-MM-DD"),endDate:x()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.A)(new Date,-1),endDate:(0,h.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.A)(new Date,1),endDate:(0,h.A)(new Date,1)},{label:"This Week",startDate:(0,f.A)(new Date),endDate:(0,p.A)(new Date)},{label:"Last Week",startDate:(0,f.A)((0,g.A)(new Date,-1)),endDate:(0,p.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,m.A)(new Date),endDate:(0,v.A)(new Date)},{label:"Last Month",startDate:(0,m.A)((0,b.A)(new Date,-1)),endDate:(0,v.A)((0,b.A)(new Date,-1))}]})}),(0,A.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(d.A,{variant:"contained",size:"small",onClick:()=>{j?(u(j),r()):r()},children:"OK"})})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(48089),n=r(50704),i=r(93230),l=r(16491),s=r(82053),a=r(82917),d=r(41413),c=r(44414);function u(e){let{title:t,value:r,icon:u,color:x="#662582",caption:h,loading:f=!1}=e;return(0,c.jsx)(o.A,{sx:{height:"100%"},children:(0,c.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,c.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,c.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,c.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),f?(0,c.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,c.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),h&&(0,c.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),u&&(0,c.jsx)(d.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(x,"14"),color:x,flexShrink:0},children:u})]})})})}},56311:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(2660),l=r(2046),s=r(83274),a=r(25333),d=r(97125),c=r(7762),u=r(52097),x=r(44414);const h=e=>{let{value:t,onChange:r,onDebouncedChange:h,debounceTime:f=500,placeholder:p="Search (ctrl+k)",sx:g}=e;const m=(0,n.useRef)(null),[v]=(0,u.d7)(t,f);return(0,n.useEffect)((()=>{h&&h(v)}),[v,h]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=m.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===m.current&&m.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,x.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:m,placeholder:p,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,x.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,x.jsx)(d.A,{})}),endAdornment:(0,x.jsx)(s.A,{title:"Clear",children:(0,x.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,x.jsx)(c.A,{})})})})}},59212:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(89379),n=r(9950),i=r(93230),l=r(41413),s=r(77922),a=r(29925),d=r(26910),c=r(31222),u=r(44414);const x=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:x,setPage:h,sx:f,textfeildSx:p,textfieldSx:g,pill:m=!1,accentColor:v="#6366f1",icon:b,placeholder:A="Select Zone",paperComponent:j}=e;const[w,S]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await d.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(v).concat(e),C=y("26"),D=y("18"),R=m?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},k=m&&(0,u.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,u.jsx)(l.A,{sx:{width:24,height:24,bgcolor:D,color:v,transition:"background-color 0.15s, color 0.15s"},children:b||(0,u.jsx)(c.HPi,{size:14})})});return(0,u.jsx)(s.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:j,sx:(0,o.A)({},f),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===x||void 0===x||x(""),null===h||void 0===h||h(0)):t&&(null===r||void 0===r||r(t.applocationid),null===x||void 0===x||x(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>m?(0,u.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:k}),sx:(0,o.A)((0,o.A)({},R),g||p||{})})):(0,u.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||p||{})}))})}))},60010:(e,t,r)=>{r.d(t,{q:()=>a});var o=r(89379),n=r(69347),i=r(45247),l=class extends n.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions((0,o.A)((0,o.A)({},e),{},{behavior:(0,i.PL)()}),t)}getOptimisticResult(e){return e.behavior=(0,i.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch((0,o.A)((0,o.A)({},e),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(e){return this.fetch((0,o.A)((0,o.A)({},e),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(e,t){var r,n;const{state:l}=e,s=super.createResult(e,t),{isFetching:a,isRefetching:d}=s,c=a&&"forward"===(null===(r=l.fetchMeta)||void 0===r||null===(r=r.fetchMore)||void 0===r?void 0:r.direction),u=a&&"backward"===(null===(n=l.fetchMeta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction);return(0,o.A)((0,o.A)({},s),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,i.rB)(t,l.data),hasPreviousPage:(0,i.RQ)(t,l.data),isFetchingNextPage:c,isFetchingPreviousPage:u,isRefetching:d&&!c&&!u})}},s=r(1729);function a(e,t){return(0,s.t)(e,l,t)}}}]); \ No newline at end of file diff --git a/build/static/js/9521.f9f30508.chunk.js b/build/static/js/9521.9d99da63.chunk.js similarity index 99% rename from build/static/js/9521.f9f30508.chunk.js rename to build/static/js/9521.9d99da63.chunk.js index 4ee412e..8947278 100644 --- a/build/static/js/9521.f9f30508.chunk.js +++ b/build/static/js/9521.9d99da63.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9521],{19521:(e,t,o)=>{o.r(t),o.d(t,{default:()=>ie});var r=o(89379),n=o(9950),i=o(26910),s=o(54826),l=o(58691),a=o(2235),c=o(41413),d=o(14857),x=o(47223),h=o(60899),u=o(93230),p=o(82053),A=o(16491),m=o(83274),g=o(25333),f=o(1320),j=o(15769),b=o(69780),v=o(9213),S=o(21671),y=o(34075),w=o(96583),k=o(40033),C=o(28170),W=o(29925),R=o(77922),P=o(79739),z=o(82223),T=o(31222),Y=o(99459),I=o(28217),L=o(55471),M=o.n(L),E=o(21209),J=o(52351),N=o(56311),H=o(59212),B=o(27001),K=o(36803),Z=o(60010),q=o(36150),F=o(81425),O=o(20466),V=o(96646),D=o(23787),G=o(44414);const U={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},Q=(e,t)=>"".concat(e).concat(t),X=e=>Q(e,"08"),_=e=>Q(e,"18"),$=e=>Q(e,"26"),ee=e=>Q(e,"55"),te=e=>(0,G.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:U.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),oe=e=>{let{color:t,selected:o,size:r=24,children:n}=e;return(0,G.jsx)(c.A,{sx:{width:r,height:r,bgcolor:o?t:_(t),color:o?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},re="AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8";const ne={current:null};function ie(){var e,t;const o=(0,d.A)(),L=(0,x.A)(o.breakpoints.down("md")),Q=(0,n.useRef)(),ie=(0,n.useRef)(),[se]=(0,n.useState)(50),[le]=(0,n.useState)(0),[ae,ce]=(0,n.useState)(0),[de,xe]=(0,n.useState)("All"),[he,ue]=(0,n.useState)({}),[pe,Ae]=(0,n.useState)(!1),[me,ge]=(0,n.useState)(""),[fe,je]=(0,n.useState)({}),[be,ve]=(0,n.useState)(""),[Se,ye]=(0,n.useState)(""),[we,ke]=(0,n.useState)(""),[Ce,We]=(0,n.useState)(""),[Re,Pe]=(0,n.useState)(""),[ze,Te]=(0,n.useState)(""),[Ye,Ie]=(0,n.useState)(null),[Le,Me]=(0,n.useState)(""),[Ee,Je]=(0,n.useState)([]),Ne=(0,n.useRef)(!1);"undefined"===typeof window||Ne.current||(document.querySelector("#google-maps")||function(e,t,o){if(!t)return;const r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",o),r.src=e,t.appendChild(r)}("https://maps.googleapis.com/maps/api/js?key=".concat(re,"&libraries=places"),document.querySelector("head"),"google-maps"),Ne.current=!0);const He=(0,n.useMemo)((()=>(0,E.A)(((e,t)=>{ne.current.getPlacePredictions(e,t)}),400)),[]);(0,n.useEffect)((()=>{let e=!0;if(!ne.current&&window.google&&(ne.current=new window.google.maps.places.AutocompleteService),ne.current){if(""!==Le)return He({input:Le},(t=>{if(e){let e=[];Ye&&(e=[Ye]),t&&(e=[...e,...t]),Je(e)}})),()=>{e=!1};Je(Ye?[Ye]:[])}}),[Ye,Le,He]),Y.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,n.useEffect)((()=>{try{console.log("selected address =>",me),Y.A.fromAddress(me).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:o}=e.results[0].geometry.location;if(je({lat:t,lng:o}),e.results[0].address_components){let n,i,s,l,a=e.results[0];for(let e=0;e(0,r.A)((0,r.A)({},e),{},{city:n||"",state:s||"",postcode:i||"",suburb:l||"",latitude:t||"",longitude:o||""})))}}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[me]);const{data:Be,isLoading:Ke,isFetchingNextPage:Ze,fetchNextPage:qe,hasNextPage:Fe,refetch:Oe}=(0,Z.q)({queryKey:["getAllCustomers",ae,ze,se],queryFn:F.jO,getNextPageParam:e=>e.nextPage,keepPreviousData:!0}),Ve=(null===Be||void 0===Be?void 0:Be.pages.flatMap((e=>e.data)))||[];(0,n.useEffect)((()=>{if(!Fe)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&qe()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return ie.current&&e.observe(ie.current),()=>{ie.current&&e.unobserve(ie.current)}}),[Fe,qe]);const De=e=>{const{scrollTop:t,scrollHeight:o,clientHeight:r}=e.currentTarget;t+r>=o-50&&Fe&&!Ze&&qe()},{data:Ge,isLoading:Ue}=(0,q.I)({queryKey:["customersummary",ae],queryFn:F.zf});(0,n.useEffect)((()=>{console.log("pageCount",Ge)}),[Ge]);const Qe=[{key:"total",label:"Total Customers",color:"#662582",icon:T.AYP,value:null!==(e=null===Ge||void 0===Ge?void 0:Ge.Total)&&void 0!==e?e:0},{key:"loaded",label:"Loaded in View",color:"#0ea5e9",icon:T.$Nl,value:Ve.length},{key:"zone",label:"Active Zone",color:"#10b981",icon:T.XXh,value:de||"All Zones"}];return(0,G.jsxs)(G.Fragment,{children:[(Ue||Ke)&&(0,G.jsx)(J.A,{}),(0,G.jsx)(B.A,{title:"Customers",subtitle:"Live \xb7 ".concat(de||"All Zones"),live:!0,action:(0,G.jsx)(H.A,{locaName:de,setAppId:ce,setLocoName:xe,pill:!0,accentColor:"#662582",icon:(0,G.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,G.jsx)(h.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Qe.map((e=>{var t;const o=e.icon;return(0,G.jsx)(h.Ay,{item:!0,xs:6,sm:4,children:(0,G.jsx)(K.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,G.jsx)(o,{size:20}),color:e.color,loading:Ue})},e.key)}))}),(0,G.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:U.radiusCard/8,borderTopRightRadius:U.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:U.borderSubtle,borderBottom:0,background:"#fff"},children:(0,G.jsxs)(u.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,G.jsx)(oe,{color:"#662582",size:32,children:(0,G.jsx)(T.Itr,{size:18})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,color:U.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Directory"}),(0,G.jsxs)(p.A,{variant:"body2",sx:{color:U.textPrimary,fontWeight:700},children:[null!==(t=null===Ge||void 0===Ge?void 0:Ge.Total)&&void 0!==t?t:0," total \xb7 ",Ve.length," loaded"]})]})]}),(0,G.jsx)(A.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,G.jsx)(N.A,{value:Re,onChange:Pe,onDebouncedChange:Te,placeholder:"Search customers (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:X("#662582"),"& fieldset":{borderColor:ee("#662582"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($("#662582"))}}})})]})}),(0,G.jsx)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:U.radiusCard/8,borderBottomRightRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,overflow:"hidden",background:"#fff"},children:L?(0,G.jsxs)(D.nV,{scroll:!0,onScroll:De,children:[Ke&&(0,G.jsx)(l.A,{}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)||Ke?null===Ve||void 0===Ve?void 0:Ve.map(((e,t)=>(0,G.jsx)(D.pg,{accent:"#662582",header:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,G.jsx)(oe,{color:"#662582",size:36,children:(0,G.jsx)(T.Azs,{size:18})}),(0,G.jsxs)(u.A,{sx:{minWidth:0},children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary},noWrap:!0,children:e.firstname||"\u2014"}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:["ID #",e.customerid]})]})]}),(0,G.jsx)(m.A,{title:"Edit customer",placement:"top",children:(0,G.jsx)(g.A,{size:"small",onClick:()=>{ue(e),setTimeout((()=>Ae(!0)),0)},sx:{bgcolor:_("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(ee("#8b5cf6")),flexShrink:0,"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,G.jsx)(T.Yvo,{size:16})})})]}),children:(0,G.jsxs)(D.FG,{children:[(0,G.jsx)(D.pY,{label:"Contact",value:e.contactno||"\u2014"}),(0,G.jsx)(D.pY,{label:"Location",children:e.suburb?(0,G.jsxs)(A.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:X("#10b981"),border:"1px solid ".concat(ee("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,G.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:600,color:U.textMuted},children:"\u2014"})}),(0,G.jsx)(D.pY,{label:"Address",full:!0,children:(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:600,color:U.textPrimary},children:e.address||"\u2014"})})]})},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,G.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:_("#94a3b8"),color:U.textMuted},children:(0,G.jsx)(T.Itr,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No customers to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary,textAlign:"center"},children:Re?"Try a different keyword.":"Pick a zone above to load the directory."})]}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)&&(0,G.jsx)("div",{ref:ie,style:{height:40,textAlign:"center"},children:Ze||Fe?(0,G.jsx)(l.A,{}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:600},children:"No more customers"})})]}):(0,G.jsx)(f.A,{ref:Q,onScroll:De,sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ee("#662582"),borderRadius:8,"&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:U.surfaceAlt}},children:(0,G.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,G.jsx)(b.A,{children:(0,G.jsxs)(v.A,{sx:{"& th":{backgroundColor:U.surfaceAlt,color:U.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(U.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,G.jsx)(S.A,{children:"#"}),(0,G.jsx)(S.A,{children:"Customer"}),(0,G.jsx)(S.A,{children:"Contact"}),(0,G.jsx)(S.A,{children:"Address"}),(0,G.jsx)(S.A,{children:"Location"}),(0,G.jsx)(S.A,{align:"right",children:"Action"})]})}),(0,G.jsxs)(y.A,{children:[Ke&&(0,G.jsx)(V.r,{}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)||Ke?null===Ve||void 0===Ve?void 0:Ve.map(((e,t)=>(0,G.jsxs)(v.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(U.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:U.surfaceAlt}},children:[(0,G.jsx)(S.A,{children:(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:U.textMuted},children:String(t+1+le*se).padStart(2,"0")})}),(0,G.jsx)(S.A,{children:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,G.jsx)(oe,{color:"#662582",size:36,children:(0,G.jsx)(T.Azs,{size:18})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:e.firstname||"\u2014"}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:["ID #",e.customerid]})]})]})}),(0,G.jsx)(S.A,{children:(0,G.jsxs)(u.A,{children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,G.jsx)(T.EZw,{size:12,color:U.textMuted}),(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:e.contactno||"\u2014"})]}),e.email&&(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:e.email})]})}),(0,G.jsx)(S.A,{sx:{maxWidth:280},children:(0,G.jsx)(m.A,{title:e.address||"",placement:"top",children:(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,G.jsx)(S.A,{children:e.suburb?(0,G.jsxs)(A.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:X("#10b981"),border:"1px solid ".concat(ee("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,G.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted},children:"\u2014"})}),(0,G.jsx)(S.A,{align:"right",children:(0,G.jsx)(m.A,{title:"Edit customer",placement:"top",children:(0,G.jsx)(g.A,{size:"small",onClick:()=>{ue(e),setTimeout((()=>Ae(!0)),0)},sx:{bgcolor:_("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(ee("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,G.jsx)(T.Yvo,{size:16})})})})]},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,G.jsx)(v.A,{children:(0,G.jsx)(S.A,{colSpan:6,sx:{py:6},children:(0,G.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:_("#94a3b8"),color:U.textMuted},children:(0,G.jsx)(T.Itr,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No customers to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:Re?"Try a different keyword.":"Pick a zone above to load the directory."})]})})}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)&&(0,G.jsx)(v.A,{children:(0,G.jsx)(S.A,{colSpan:6,sx:{borderBottom:"none"},children:(0,G.jsx)("div",{ref:ie,style:{height:40,textAlign:"center"},children:Ze||Fe?(0,G.jsx)(l.A,{}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:600},children:"No more customers"})})})})]})]})})}),(0,G.jsxs)(w.A,{open:pe,onClose:()=>Ae(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"lg",fullWidth:!0,fullScreen:L,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,G.jsx)(k.A,{id:"alert-dialog-title",sx:{background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"#fff",py:2},children:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.2)",color:"#fff"},children:(0,G.jsx)(s.wwX,{style:{fontSize:18}})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Customer"}),(0,G.jsxs)(p.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:["Edit ",(null===he||void 0===he?void 0:he.firstname)||"Customer"]})]})]})}),(0,G.jsx)(C.A,{children:(0,G.jsxs)(h.Ay,{container:!0,spacing:2,sx:{mt:2},children:[(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Customer Name"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:null===he||void 0===he?void 0:he.firstname,onChange:e=>{ue((0,r.A)((0,r.A)({},he),{},{firstname:e.target.value}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Contact Number"}),(0,G.jsxs)(u.A,{direction:"row",spacing:1,children:[(0,G.jsx)(W.A,{readonly:!0,variant:"outlined",value:"+91",sx:{width:60}}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,type:"text",value:(null===he||void 0===he?void 0:he.contactno)||"",inputProps:{maxLength:10,inputMode:"numeric",pattern:"[0-9]*"},onChange:e=>{const t=e.target.value.replace(/\D/g,"");ue((e=>(0,r.A)((0,r.A)({},e),{},{contactno:t})))}})]})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:12,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Address"}),(0,G.jsx)(R.A,{id:"google-map-demo",sx:{},fullWidth:!0,getOptionLabel:e=>"string"===typeof e?e:(null===e||void 0===e?void 0:e.description)||"",filterOptions:e=>e,options:Ee,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:null===he||void 0===he?void 0:he.address,noOptionsText:"No locations",onChange:(e,t)=>{Je(t?[t,...Ee]:Ee),Ie(t),console.log("newValue",t||""),ge(null===t||void 0===t?void 0:t.description),ue((0,r.A)((0,r.A)({},he),{},{address:null===t||void 0===t?void 0:t.description}))},onInputChange:(e,t)=>{Me(t)},renderInput:e=>(0,G.jsx)(W.A,(0,r.A)((0,r.A)({},e),{},{fullWidth:!0})),renderOption:(e,t)=>{const o=t.structured_formatting.main_text_matched_substrings||[],n=M()(t.structured_formatting.main_text,o.map((e=>[e.offset,e.offset+e.length])));return(0,G.jsx)("li",(0,r.A)((0,r.A)({},e),{},{children:(0,G.jsxs)(h.Ay,{container:!0,alignItems:"center",children:[(0,G.jsx)(h.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,G.jsx)(I.A,{sx:{color:"text.secondary"}})}),(0,G.jsxs)(h.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[null===n||void 0===n?void 0:n.map(((e,t)=>(0,G.jsx)(A.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,G.jsx)(p.A,{variant:"body2",color:"text.secondary",children:null===t||void 0===t?void 0:t.structured_formatting.secondary_text})]})]})}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Location"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:null===he||void 0===he?void 0:he.suburb,onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{suburb:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"City"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:he.city||be||"",onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{city:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"State"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:he.state||we||"",onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{state:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Postcode"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:""==Se?he.postcode:Se,onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{postcode:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:12,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Landmark"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:he.landmark,onChange:e=>{ue((0,r.A)((0,r.A)({},he),{},{landmark:e.target.value}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Latitude"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:fe.lat,sx:{cursor:"not-allowed"}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Longitude"}),(0,G.jsx)(W.A,{readonly:!0,variant:"outlined",fullWidth:!0,value:fe.lng})]})]})}),(0,G.jsxs)(P.A,{sx:{mr:2,mb:2},children:[(0,G.jsx)(z.A,{onClick:()=>Ae(!1),variant:"contained",color:"error",sx:{mr:2},children:"Close"}),(0,G.jsx)(z.A,{onClick:()=>{(async()=>{if(console.log("selectedCustomer",he),he.firstname)if(he.contactno)if(he.address)if(he.suburb)if(he.city)if(he.state)if(he.postcode)if(he.landmark)if(he.latitude)if(he.longitude)try{const e=await i.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/customers/update"),{customerid:he.customerid,configid:1,firstname:he.firstname,applocationid:he.applocationid,profileimage:"",dialcode:"+91",contactno:he.contactno,devicetype:"",deviceid:"",customertoken:"123",address:he.address,suburb:Ce,city:be,state:we,postcode:Se,landmark:he.landmark,doorno:he.doorno,latitude:he.latitude.toString(),longitude:he.longitude.toString()});console.log("postUpdateResponse",e),e.data.status&&((0,O.k)(e.data.message,"success",1500),Ae(!1),Oe())}catch(e){console.log("postUpdate error",e)}else(0,O.k)("Enter Longitude","warning",1500);else(0,O.k)("Enter Latitude","warning",1500);else(0,O.k)("Enter Landmark","warning",1500);else(0,O.k)("Enter PostCode","warning",1500);else(0,O.k)("Enter State","warning",1500);else(0,O.k)("Enter City ","warning",1500);else(0,O.k)("Enter Suburb","warning",1500);else(0,O.k)("Enter Valid Address","warning",1500);else(0,O.k)("Enter Contact Number ","warning",1500);else(0,O.k)("Enter Door NO","warning",1500)})()},variant:"contained",autoFocus:!0,children:"Update"})]})]})]})}},23787:(e,t,o)=>{o.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var r=o(89379),n=o(80045),i=o(93230),s=o(2235),l=o(16491),a=o(82053),c=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:o=!1,onScroll:s,sx:l}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:s,sx:(0,r.A)((0,r.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:o,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[o,d,n]})]})},u=e=>{let{children:t,columns:o=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:o,children:r,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},27001:(e,t,o)=>{o.d(t,{A:()=>l});var r=o(93230),n=o(16491),i=o(82053),s=o(44414);function l(e){let{title:t,subtitle:o,live:l=!1,action:a}=e;return(0,s.jsxs)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,s.jsxs)(n.A,{sx:{minWidth:0},children:[(0,s.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),o&&(0,s.jsxs)(r.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,s.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,s.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:o})]})]}),a&&(0,s.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,o)=>{o.d(t,{A:()=>x});var r=o(48089),n=o(50704),i=o(93230),s=o(16491),l=o(82053),a=o(82917),c=o(41413),d=o(44414);function x(e){let{title:t,value:o,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(r.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),u&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,t,o)=>{o.d(t,{A:()=>u});var r=o(89379),n=o(9950),i=o(2660),s=o(2046),l=o(83274),a=o(25333),c=o(97125),d=o(7762),x=o(52097),h=o(44414);const u=e=>{let{value:t,onChange:o,onDebouncedChange:u,debounceTime:p=500,placeholder:A="Search (ctrl+k)",sx:m}=e;const g=(0,n.useRef)(null),[f]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(f)}),[f,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=g.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,r.A)({},m),inputRef:g,placeholder:A,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,t,o)=>{o.d(t,{A:()=>l});o(9950);var r=o(16491),n=o(46639),i=o(62217),s=o(44414);function l(e){let{size:t=70,imgSize:o=40,alt:l="loader"}=e;return(0,s.jsxs)(r.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,s.jsx)(n.A,{size:t}),(0,s.jsx)(r.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:o,height:o},children:(0,s.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,o)=>{o.d(t,{A:()=>h});var r=o(89379),n=o(9950),i=o(93230),s=o(41413),l=o(77922),a=o(29925),c=o(26910),d=o(31222),x=o(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:o,setLocoName:h,setPage:u,sx:p,textfeildSx:A,textfieldSx:m,pill:g=!1,accentColor:f="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,y]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),y(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const w=e=>"".concat(f).concat(e),k=w("26"),C=w("18"),W=g?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:f,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},R=g&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:C,color:f,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,r.A)({},p),onChange:(e,t,r)=>{"clear"===r?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===o||void 0===o||o(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>g?(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,r.A)((0,r.A)({},W),m||A||{})})):(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,r.A)({},m||A||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,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"},96646:(e,t,o)=>{o.d(t,{r:()=>a});var r=o(9213),n=o(21671),i=o(82917),s=o(93230),l=o(44414);const a=e=>{let{rowsPerPage:t=5,col:o=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(r.A,{children:[(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,t)=>(0,l.jsx)(n.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(i.A,{variant:"text",width:100}),(0,l.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:150})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(n.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9521],{19521:(e,t,o)=>{o.r(t),o.d(t,{default:()=>ie});var r=o(89379),n=o(9950),i=o(26910),s=o(54826),l=o(58691),a=o(2235),c=o(41413),d=o(14857),x=o(47223),h=o(60899),u=o(93230),p=o(82053),A=o(16491),m=o(83274),g=o(25333),f=o(1320),j=o(15769),b=o(69780),v=o(9213),S=o(21671),y=o(34075),w=o(96583),k=o(40033),C=o(28170),W=o(29925),R=o(77922),P=o(79739),z=o(10226),T=o(31222),Y=o(99459),I=o(28217),L=o(55471),M=o.n(L),E=o(21209),J=o(52351),N=o(56311),H=o(59212),B=o(27001),K=o(36803),Z=o(60010),q=o(36150),F=o(81425),O=o(20466),V=o(96646),D=o(23787),G=o(44414);const U={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},Q=(e,t)=>"".concat(e).concat(t),X=e=>Q(e,"08"),_=e=>Q(e,"18"),$=e=>Q(e,"26"),ee=e=>Q(e,"55"),te=e=>(0,G.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:U.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),oe=e=>{let{color:t,selected:o,size:r=24,children:n}=e;return(0,G.jsx)(c.A,{sx:{width:r,height:r,bgcolor:o?t:_(t),color:o?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},re="AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8";const ne={current:null};function ie(){var e,t;const o=(0,d.A)(),L=(0,x.A)(o.breakpoints.down("md")),Q=(0,n.useRef)(),ie=(0,n.useRef)(),[se]=(0,n.useState)(50),[le]=(0,n.useState)(0),[ae,ce]=(0,n.useState)(0),[de,xe]=(0,n.useState)("All"),[he,ue]=(0,n.useState)({}),[pe,Ae]=(0,n.useState)(!1),[me,ge]=(0,n.useState)(""),[fe,je]=(0,n.useState)({}),[be,ve]=(0,n.useState)(""),[Se,ye]=(0,n.useState)(""),[we,ke]=(0,n.useState)(""),[Ce,We]=(0,n.useState)(""),[Re,Pe]=(0,n.useState)(""),[ze,Te]=(0,n.useState)(""),[Ye,Ie]=(0,n.useState)(null),[Le,Me]=(0,n.useState)(""),[Ee,Je]=(0,n.useState)([]),Ne=(0,n.useRef)(!1);"undefined"===typeof window||Ne.current||(document.querySelector("#google-maps")||function(e,t,o){if(!t)return;const r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",o),r.src=e,t.appendChild(r)}("https://maps.googleapis.com/maps/api/js?key=".concat(re,"&libraries=places"),document.querySelector("head"),"google-maps"),Ne.current=!0);const He=(0,n.useMemo)((()=>(0,E.A)(((e,t)=>{ne.current.getPlacePredictions(e,t)}),400)),[]);(0,n.useEffect)((()=>{let e=!0;if(!ne.current&&window.google&&(ne.current=new window.google.maps.places.AutocompleteService),ne.current){if(""!==Le)return He({input:Le},(t=>{if(e){let e=[];Ye&&(e=[Ye]),t&&(e=[...e,...t]),Je(e)}})),()=>{e=!1};Je(Ye?[Ye]:[])}}),[Ye,Le,He]),Y.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,n.useEffect)((()=>{try{console.log("selected address =>",me),Y.A.fromAddress(me).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:o}=e.results[0].geometry.location;if(je({lat:t,lng:o}),e.results[0].address_components){let n,i,s,l,a=e.results[0];for(let e=0;e(0,r.A)((0,r.A)({},e),{},{city:n||"",state:s||"",postcode:i||"",suburb:l||"",latitude:t||"",longitude:o||""})))}}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[me]);const{data:Be,isLoading:Ke,isFetchingNextPage:Ze,fetchNextPage:qe,hasNextPage:Fe,refetch:Oe}=(0,Z.q)({queryKey:["getAllCustomers",ae,ze,se],queryFn:F.jO,getNextPageParam:e=>e.nextPage,keepPreviousData:!0}),Ve=(null===Be||void 0===Be?void 0:Be.pages.flatMap((e=>e.data)))||[];(0,n.useEffect)((()=>{if(!Fe)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&qe()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return ie.current&&e.observe(ie.current),()=>{ie.current&&e.unobserve(ie.current)}}),[Fe,qe]);const De=e=>{const{scrollTop:t,scrollHeight:o,clientHeight:r}=e.currentTarget;t+r>=o-50&&Fe&&!Ze&&qe()},{data:Ge,isLoading:Ue}=(0,q.I)({queryKey:["customersummary",ae],queryFn:F.zf});(0,n.useEffect)((()=>{console.log("pageCount",Ge)}),[Ge]);const Qe=[{key:"total",label:"Total Customers",color:"#662582",icon:T.AYP,value:null!==(e=null===Ge||void 0===Ge?void 0:Ge.Total)&&void 0!==e?e:0},{key:"loaded",label:"Loaded in View",color:"#0ea5e9",icon:T.$Nl,value:Ve.length},{key:"zone",label:"Active Zone",color:"#10b981",icon:T.XXh,value:de||"All Zones"}];return(0,G.jsxs)(G.Fragment,{children:[(Ue||Ke)&&(0,G.jsx)(J.A,{}),(0,G.jsx)(B.A,{title:"Customers",subtitle:"Live \xb7 ".concat(de||"All Zones"),live:!0,action:(0,G.jsx)(H.A,{locaName:de,setAppId:ce,setLocoName:xe,pill:!0,accentColor:"#662582",icon:(0,G.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,G.jsx)(h.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Qe.map((e=>{var t;const o=e.icon;return(0,G.jsx)(h.Ay,{item:!0,xs:6,sm:4,children:(0,G.jsx)(K.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,G.jsx)(o,{size:20}),color:e.color,loading:Ue})},e.key)}))}),(0,G.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:U.radiusCard/8,borderTopRightRadius:U.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:U.borderSubtle,borderBottom:0,background:"#fff"},children:(0,G.jsxs)(u.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,G.jsx)(oe,{color:"#662582",size:32,children:(0,G.jsx)(T.Itr,{size:18})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,color:U.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Directory"}),(0,G.jsxs)(p.A,{variant:"body2",sx:{color:U.textPrimary,fontWeight:700},children:[null!==(t=null===Ge||void 0===Ge?void 0:Ge.Total)&&void 0!==t?t:0," total \xb7 ",Ve.length," loaded"]})]})]}),(0,G.jsx)(A.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,G.jsx)(N.A,{value:Re,onChange:Pe,onDebouncedChange:Te,placeholder:"Search customers (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:X("#662582"),"& fieldset":{borderColor:ee("#662582"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($("#662582"))}}})})]})}),(0,G.jsx)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:U.radiusCard/8,borderBottomRightRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,overflow:"hidden",background:"#fff"},children:L?(0,G.jsxs)(D.nV,{scroll:!0,onScroll:De,children:[Ke&&(0,G.jsx)(l.A,{}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)||Ke?null===Ve||void 0===Ve?void 0:Ve.map(((e,t)=>(0,G.jsx)(D.pg,{accent:"#662582",header:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,G.jsx)(oe,{color:"#662582",size:36,children:(0,G.jsx)(T.Azs,{size:18})}),(0,G.jsxs)(u.A,{sx:{minWidth:0},children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary},noWrap:!0,children:e.firstname||"\u2014"}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:["ID #",e.customerid]})]})]}),(0,G.jsx)(m.A,{title:"Edit customer",placement:"top",children:(0,G.jsx)(g.A,{size:"small",onClick:()=>{ue(e),setTimeout((()=>Ae(!0)),0)},sx:{bgcolor:_("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(ee("#8b5cf6")),flexShrink:0,"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,G.jsx)(T.Yvo,{size:16})})})]}),children:(0,G.jsxs)(D.FG,{children:[(0,G.jsx)(D.pY,{label:"Contact",value:e.contactno||"\u2014"}),(0,G.jsx)(D.pY,{label:"Location",children:e.suburb?(0,G.jsxs)(A.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:X("#10b981"),border:"1px solid ".concat(ee("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,G.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:600,color:U.textMuted},children:"\u2014"})}),(0,G.jsx)(D.pY,{label:"Address",full:!0,children:(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:600,color:U.textPrimary},children:e.address||"\u2014"})})]})},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,G.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:_("#94a3b8"),color:U.textMuted},children:(0,G.jsx)(T.Itr,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No customers to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary,textAlign:"center"},children:Re?"Try a different keyword.":"Pick a zone above to load the directory."})]}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)&&(0,G.jsx)("div",{ref:ie,style:{height:40,textAlign:"center"},children:Ze||Fe?(0,G.jsx)(l.A,{}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:600},children:"No more customers"})})]}):(0,G.jsx)(f.A,{ref:Q,onScroll:De,sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ee("#662582"),borderRadius:8,"&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:U.surfaceAlt}},children:(0,G.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,G.jsx)(b.A,{children:(0,G.jsxs)(v.A,{sx:{"& th":{backgroundColor:U.surfaceAlt,color:U.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(U.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,G.jsx)(S.A,{children:"#"}),(0,G.jsx)(S.A,{children:"Customer"}),(0,G.jsx)(S.A,{children:"Contact"}),(0,G.jsx)(S.A,{children:"Address"}),(0,G.jsx)(S.A,{children:"Location"}),(0,G.jsx)(S.A,{align:"right",children:"Action"})]})}),(0,G.jsxs)(y.A,{children:[Ke&&(0,G.jsx)(V.r,{}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)||Ke?null===Ve||void 0===Ve?void 0:Ve.map(((e,t)=>(0,G.jsxs)(v.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(U.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:U.surfaceAlt}},children:[(0,G.jsx)(S.A,{children:(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:U.textMuted},children:String(t+1+le*se).padStart(2,"0")})}),(0,G.jsx)(S.A,{children:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,G.jsx)(oe,{color:"#662582",size:36,children:(0,G.jsx)(T.Azs,{size:18})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:e.firstname||"\u2014"}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:["ID #",e.customerid]})]})]})}),(0,G.jsx)(S.A,{children:(0,G.jsxs)(u.A,{children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,G.jsx)(T.EZw,{size:12,color:U.textMuted}),(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:e.contactno||"\u2014"})]}),e.email&&(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:e.email})]})}),(0,G.jsx)(S.A,{sx:{maxWidth:280},children:(0,G.jsx)(m.A,{title:e.address||"",placement:"top",children:(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,G.jsx)(S.A,{children:e.suburb?(0,G.jsxs)(A.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:X("#10b981"),border:"1px solid ".concat(ee("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,G.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted},children:"\u2014"})}),(0,G.jsx)(S.A,{align:"right",children:(0,G.jsx)(m.A,{title:"Edit customer",placement:"top",children:(0,G.jsx)(g.A,{size:"small",onClick:()=>{ue(e),setTimeout((()=>Ae(!0)),0)},sx:{bgcolor:_("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(ee("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,G.jsx)(T.Yvo,{size:16})})})})]},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,G.jsx)(v.A,{children:(0,G.jsx)(S.A,{colSpan:6,sx:{py:6},children:(0,G.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:_("#94a3b8"),color:U.textMuted},children:(0,G.jsx)(T.Itr,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No customers to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:Re?"Try a different keyword.":"Pick a zone above to load the directory."})]})})}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)&&(0,G.jsx)(v.A,{children:(0,G.jsx)(S.A,{colSpan:6,sx:{borderBottom:"none"},children:(0,G.jsx)("div",{ref:ie,style:{height:40,textAlign:"center"},children:Ze||Fe?(0,G.jsx)(l.A,{}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:600},children:"No more customers"})})})})]})]})})}),(0,G.jsxs)(w.A,{open:pe,onClose:()=>Ae(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"lg",fullWidth:!0,fullScreen:L,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,G.jsx)(k.A,{id:"alert-dialog-title",sx:{background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"#fff",py:2},children:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.2)",color:"#fff"},children:(0,G.jsx)(s.wwX,{style:{fontSize:18}})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Customer"}),(0,G.jsxs)(p.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:["Edit ",(null===he||void 0===he?void 0:he.firstname)||"Customer"]})]})]})}),(0,G.jsx)(C.A,{children:(0,G.jsxs)(h.Ay,{container:!0,spacing:2,sx:{mt:2},children:[(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Customer Name"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:null===he||void 0===he?void 0:he.firstname,onChange:e=>{ue((0,r.A)((0,r.A)({},he),{},{firstname:e.target.value}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Contact Number"}),(0,G.jsxs)(u.A,{direction:"row",spacing:1,children:[(0,G.jsx)(W.A,{readonly:!0,variant:"outlined",value:"+91",sx:{width:60}}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,type:"text",value:(null===he||void 0===he?void 0:he.contactno)||"",inputProps:{maxLength:10,inputMode:"numeric",pattern:"[0-9]*"},onChange:e=>{const t=e.target.value.replace(/\D/g,"");ue((e=>(0,r.A)((0,r.A)({},e),{},{contactno:t})))}})]})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:12,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Address"}),(0,G.jsx)(R.A,{id:"google-map-demo",sx:{},fullWidth:!0,getOptionLabel:e=>"string"===typeof e?e:(null===e||void 0===e?void 0:e.description)||"",filterOptions:e=>e,options:Ee,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:null===he||void 0===he?void 0:he.address,noOptionsText:"No locations",onChange:(e,t)=>{Je(t?[t,...Ee]:Ee),Ie(t),console.log("newValue",t||""),ge(null===t||void 0===t?void 0:t.description),ue((0,r.A)((0,r.A)({},he),{},{address:null===t||void 0===t?void 0:t.description}))},onInputChange:(e,t)=>{Me(t)},renderInput:e=>(0,G.jsx)(W.A,(0,r.A)((0,r.A)({},e),{},{fullWidth:!0})),renderOption:(e,t)=>{const o=t.structured_formatting.main_text_matched_substrings||[],n=M()(t.structured_formatting.main_text,o.map((e=>[e.offset,e.offset+e.length])));return(0,G.jsx)("li",(0,r.A)((0,r.A)({},e),{},{children:(0,G.jsxs)(h.Ay,{container:!0,alignItems:"center",children:[(0,G.jsx)(h.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,G.jsx)(I.A,{sx:{color:"text.secondary"}})}),(0,G.jsxs)(h.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[null===n||void 0===n?void 0:n.map(((e,t)=>(0,G.jsx)(A.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,G.jsx)(p.A,{variant:"body2",color:"text.secondary",children:null===t||void 0===t?void 0:t.structured_formatting.secondary_text})]})]})}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Location"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:null===he||void 0===he?void 0:he.suburb,onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{suburb:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"City"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:he.city||be||"",onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{city:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"State"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:he.state||we||"",onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{state:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Postcode"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:""==Se?he.postcode:Se,onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{postcode:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:12,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Landmark"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:he.landmark,onChange:e=>{ue((0,r.A)((0,r.A)({},he),{},{landmark:e.target.value}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Latitude"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:fe.lat,sx:{cursor:"not-allowed"}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Longitude"}),(0,G.jsx)(W.A,{readonly:!0,variant:"outlined",fullWidth:!0,value:fe.lng})]})]})}),(0,G.jsxs)(P.A,{sx:{mr:2,mb:2},children:[(0,G.jsx)(z.A,{onClick:()=>Ae(!1),variant:"contained",color:"error",sx:{mr:2},children:"Close"}),(0,G.jsx)(z.A,{onClick:()=>{(async()=>{if(console.log("selectedCustomer",he),he.firstname)if(he.contactno)if(he.address)if(he.suburb)if(he.city)if(he.state)if(he.postcode)if(he.landmark)if(he.latitude)if(he.longitude)try{const e=await i.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/customers/update"),{customerid:he.customerid,configid:1,firstname:he.firstname,applocationid:he.applocationid,profileimage:"",dialcode:"+91",contactno:he.contactno,devicetype:"",deviceid:"",customertoken:"123",address:he.address,suburb:Ce,city:be,state:we,postcode:Se,landmark:he.landmark,doorno:he.doorno,latitude:he.latitude.toString(),longitude:he.longitude.toString()});console.log("postUpdateResponse",e),e.data.status&&((0,O.k)(e.data.message,"success",1500),Ae(!1),Oe())}catch(e){console.log("postUpdate error",e)}else(0,O.k)("Enter Longitude","warning",1500);else(0,O.k)("Enter Latitude","warning",1500);else(0,O.k)("Enter Landmark","warning",1500);else(0,O.k)("Enter PostCode","warning",1500);else(0,O.k)("Enter State","warning",1500);else(0,O.k)("Enter City ","warning",1500);else(0,O.k)("Enter Suburb","warning",1500);else(0,O.k)("Enter Valid Address","warning",1500);else(0,O.k)("Enter Contact Number ","warning",1500);else(0,O.k)("Enter Door NO","warning",1500)})()},variant:"contained",autoFocus:!0,children:"Update"})]})]})]})}},23787:(e,t,o)=>{o.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var r=o(89379),n=o(80045),i=o(93230),s=o(2235),l=o(16491),a=o(82053),c=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:o=!1,onScroll:s,sx:l}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:s,sx:(0,r.A)((0,r.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:o,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[o,d,n]})]})},u=e=>{let{children:t,columns:o=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:o,children:r,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},27001:(e,t,o)=>{o.d(t,{A:()=>l});var r=o(93230),n=o(16491),i=o(82053),s=o(44414);function l(e){let{title:t,subtitle:o,live:l=!1,action:a}=e;return(0,s.jsxs)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,s.jsxs)(n.A,{sx:{minWidth:0},children:[(0,s.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),o&&(0,s.jsxs)(r.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,s.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,s.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:o})]})]}),a&&(0,s.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,o)=>{o.d(t,{A:()=>x});var r=o(48089),n=o(50704),i=o(93230),s=o(16491),l=o(82053),a=o(82917),c=o(41413),d=o(44414);function x(e){let{title:t,value:o,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(r.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),u&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,t,o)=>{o.d(t,{A:()=>u});var r=o(89379),n=o(9950),i=o(2660),s=o(2046),l=o(83274),a=o(25333),c=o(97125),d=o(7762),x=o(52097),h=o(44414);const u=e=>{let{value:t,onChange:o,onDebouncedChange:u,debounceTime:p=500,placeholder:A="Search (ctrl+k)",sx:m}=e;const g=(0,n.useRef)(null),[f]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(f)}),[f,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=g.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,r.A)({},m),inputRef:g,placeholder:A,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,t,o)=>{o.d(t,{A:()=>l});o(9950);var r=o(16491),n=o(46639),i=o(62217),s=o(44414);function l(e){let{size:t=70,imgSize:o=40,alt:l="loader"}=e;return(0,s.jsxs)(r.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,s.jsx)(n.A,{size:t}),(0,s.jsx)(r.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:o,height:o},children:(0,s.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,o)=>{o.d(t,{A:()=>h});var r=o(89379),n=o(9950),i=o(93230),s=o(41413),l=o(77922),a=o(29925),c=o(26910),d=o(31222),x=o(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:o,setLocoName:h,setPage:u,sx:p,textfeildSx:A,textfieldSx:m,pill:g=!1,accentColor:f="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,y]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),y(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const w=e=>"".concat(f).concat(e),k=w("26"),C=w("18"),W=g?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:f,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},R=g&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:C,color:f,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,r.A)({},p),onChange:(e,t,r)=>{"clear"===r?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===o||void 0===o||o(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>g?(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,r.A)((0,r.A)({},W),m||A||{})})):(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,r.A)({},m||A||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,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"},96646:(e,t,o)=>{o.d(t,{r:()=>a});var r=o(9213),n=o(21671),i=o(82917),s=o(93230),l=o(44414);const a=e=>{let{rowsPerPage:t=5,col:o=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(r.A,{children:[(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,t)=>(0,l.jsx)(n.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(i.A,{variant:"text",width:100}),(0,l.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:150})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(n.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/9592.bfbbd05d.chunk.js b/build/static/js/9592.e7d1e3ea.chunk.js similarity index 99% rename from build/static/js/9592.bfbbd05d.chunk.js rename to build/static/js/9592.e7d1e3ea.chunk.js index 8711966..107ad03 100644 --- a/build/static/js/9592.bfbbd05d.chunk.js +++ b/build/static/js/9592.e7d1e3ea.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9592],{855:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(7208),n=a(76475),o=a(44414);function l(e){var t,a;let l,i,{children:r,type:c="scale",direction:d="right",offset:u=10,scale:p={hover:1.05,tap:.95}}=e;switch(d){case"up":case"left":l=u,i=0;break;default:l=0,i=u}const[m,h]=(0,s.Y)(l,i),[x,g]=(0,s.Y)(l,i);switch(c){case"rotate":return(0,o.jsx)(n.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:r});case"slide":return"up"===d||"down"===d?(0,o.jsx)(n.P.div,{animate:{y:void 0!==x?x:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:r}):(0,o.jsx)(n.P.div,{animate:{x:void 0!==m?m:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:r});default:return"number"===typeof p&&(p={hover:p,tap:p}),(0,o.jsx)(n.P.div,{whileHover:{scale:null===(t=p)||void 0===t?void 0:t.hover},whileTap:{scale:null===(a=p)||void 0===a?void 0:a.tap},children:r})}}},20466:(e,t,a)=>{a.d(t,{k:()=>n});var s=a(8881);const n=(e,t,a)=>(0,s.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},42041:()=>{},80987:(e,t,a)=>{a.r(t),a.d(t,{default:()=>me});var s=a(89379),n=a(9950),o=a(47223),l=a(16491),i=a(48089),r=a(82053),c=a(77922),d=a(29925),u=a(60899),p=a(82223),m=a(2046),h=a(25333),x=a(16497),g=a(93038),A=a(93230),f=a(37324),v=a(46639),j=a(40033),b=a(25979),y=a(2660),k=a(74745),S=a(28170),N=a(79739),w=a(96319),P=a(13838),C=a(54826),_=a(85527),I=a(43302),z=a(7762),D=a(28429),Y=a(63057),M=a(26910),L=a(14857),R=a(99459),W=a(52351),H=(a(172),a(50027),a(30633)),E=a(81831),F=a(95359),T=a(96583),O=a(4159),B=a.n(O),U=a(8881),q=a(60767),K=a(81419),V=a(3911),$=a(47738),Z=a(9845),G=a(87942),Q=a(76746),X=a(20466),J=a(98007),ee=a(99810),te=a(49029),ae=a(47113),se=a(82215),ne=a(2527),oe=a.n(ne),le=(a(55392),a(42041),a(855)),ie=a(44414),re=a(36220);B().extend(re);const ce="undefined"!==typeof window?new(oe().Icon)({iconUrl:"https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-blue.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}):null,de="undefined"!==typeof window?new(oe().Icon)({iconUrl:"https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}):null,ue=e=>{let{startPoint:t,endPoint:a}=e;const s=(0,J.ko)();return(0,n.useEffect)((()=>{const e=[],n=parseFloat(null===t||void 0===t?void 0:t.latitude),o=parseFloat(null===t||void 0===t?void 0:t.longitude),l=parseFloat(null===a||void 0===a?void 0:a.latitude),i=parseFloat(null===a||void 0===a?void 0:a.longitude);isNaN(n)||isNaN(o)||0===n||0===o||e.push([n,o]),isNaN(l)||isNaN(i)||0===l||0===i||e.push([l,i]),1===e.length?s.setView(e[0],14):2===e.length&&s.fitBounds(e,{padding:[50,50]})}),[null===t||void 0===t?void 0:t.latitude,null===t||void 0===t?void 0:t.longitude,null===a||void 0===a?void 0:a.latitude,null===a||void 0===a?void 0:a.longitude,s]),null},pe=e=>{let{startPoint:t,endPoint:a,appLocaLat:s,appLocaLng:o}=e;const l=[parseFloat(s)||11.0168,parseFloat(o)||76.9558],i=(null===t||void 0===t?void 0:t.latitude)&&(null===t||void 0===t?void 0:t.longitude)&&0!==parseFloat(t.latitude),r=(null===a||void 0===a?void 0:a.latitude)&&(null===a||void 0===a?void 0:a.longitude)&&0!==parseFloat(a.latitude),c=i?[parseFloat(t.latitude),parseFloat(t.longitude)]:null,d=r?[parseFloat(a.latitude),parseFloat(a.longitude)]:null,[u,p]=n.useState([]);return n.useEffect((()=>{if(!i||!r)return void p([]);(async()=>{const e="https://router.project-osrm.org/route/v1/driving/".concat(t.longitude,",").concat(t.latitude,";").concat(a.longitude,",").concat(a.latitude,"?overview=full&geometries=geojson");try{var s;const t=await fetch(e),a=await t.json();if(null!==(s=a.routes)&&void 0!==s&&s.length){const e=a.routes[0].geometry.coordinates.map((e=>{let[t,a]=e;return[a,t]}));p(e)}else p([c,d])}catch(n){console.error("OSRM Error:",n),p([c,d])}})()}),[t.latitude,t.longitude,a.latitude,a.longitude,i,r]),(0,ie.jsx)("div",{style:{position:"relative",width:"100%",height:"100%"},children:(0,ie.jsxs)(ee.W,{center:l,zoom:12,style:{width:"100%",height:"100%"},zoomControl:!0,children:[(0,ie.jsx)(te.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),i&&(0,ie.jsx)(ae.p,{position:c,icon:ce}),r&&(0,ie.jsx)(ae.p,{position:d,icon:de}),u.length>0?(0,ie.jsx)(se.R,{positions:u,color:"#662582",weight:4}):i&&r&&(0,ie.jsx)(se.R,{positions:[c,d],color:"#662582",weight:4}),(0,ie.jsx)(ue,{startPoint:t,endPoint:a})]})})};const me=()=>{R.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const e=n.useRef(!1),t=(0,D.Zp)(),a=(0,L.A)(),O=(0,o.A)(a.breakpoints.down("md")),J=(0,n.useRef)(null),ee=(0,n.useRef)(null),[te,ae]=n.useState(""),[se,ne]=n.useState(""),[oe,re]=(0,n.useState)(localStorage.getItem("locationid")),[ce,de]=(0,n.useState)(!1),ue=(0,n.useRef)(null),me=(0,n.useRef)(null),he=(0,n.useRef)(null),[xe,ge]=(0,n.useState)(0),[Ae,fe]=(0,n.useState)(!1),[ve,je]=(0,n.useState)([]),[be,ye]=(0,n.useState)(B()().format("MM-DD-YYYY")),[ke,Se]=(0,n.useState)(),[Ne,we]=(0,n.useState)(),[Pe,Ce]=(0,n.useState)([]),[_e,Ie]=(0,n.useState)(""),[ze,De]=(0,n.useState)(!1),[Ye,Me]=(0,n.useState)(!1),[Le,Re]=(0,n.useState)(!1),[We,He]=(0,n.useState)(""),[Ee,Fe]=(0,n.useState)(),[Te,Oe]=(0,n.useState)({}),[Be,Ue]=(0,n.useState)(""),[qe,Ke]=(0,n.useState)([]),[Ve,$e]=(0,n.useState)({latitude:0,longitude:0}),[Ze,Ge]=(0,n.useState)({latitude:0,longitude:0}),[Qe,Xe]=(0,n.useState)(!1),[Je,et]=(0,n.useState)(0),[tt,at]=(0,n.useState)(0),[st,nt]=(0,n.useState)(0),[ot,lt]=(0,n.useState)(0),[it,rt]=(0,n.useState)(0),[ct,dt]=(0,n.useState)([]),[ut,pt]=(0,n.useState)("Select "),[mt,ht]=(0,n.useState)(0),[xt,gt]=(0,n.useState)(""),[At,ft]=(0,n.useState)(0),[vt,jt]=(0,n.useState)(0),[bt,yt]=(0,n.useState)(null),[kt,St]=(0,n.useState)(!1),[Nt,wt]=(0,n.useState)(""),[Pt,Ct]=(0,n.useState)([]),[_t,It]=(0,n.useState)(null),[zt,Dt]=(0,n.useState)(null),[Yt,Mt]=(0,n.useState)(null),[Lt,Rt]=(0,n.useState)(0),[Wt,Ht]=(0,n.useState)(0),[Et,Ft]=(0,n.useState)(0),[Tt,Ot]=(0,n.useState)([]),[Bt,Ut]=(0,n.useState)(),[qt,Kt]=(0,n.useState)(),[Vt,$t]=(0,n.useState)(),[Zt,Gt]=(0,n.useState)("Select Location"),Qt=localStorage.getItem("userid"),[Xt,Jt]=(0,n.useState)(0),[ea,ta]=(0,n.useState)(0),[aa,sa]=(0,n.useState)(0),[na,oa]=(0,n.useState)(0),[la,ia]=(0,n.useState)(),[ra,ca]=(0,n.useState)(),[da,ua]=(0,n.useState)(!1),[pa,ma]=(0,n.useState)(!1),[ha,xa]=(0,n.useState)(0),[ga,Aa]=(0,n.useState)(0),[fa,va]=(0,n.useState)(1),[ja,ba]=(0,n.useState)(null),[ya,ka]=(0,n.useState)(null),[Sa,Na]=(0,n.useState)(null),[wa,Pa]=(0,n.useState)(null),[Ca,_a]=(0,n.useState)(1),Ia=!!(null!==zt&&void 0!==zt&&zt.firstname&&null!==zt&&void 0!==zt&&zt.contactno&&10===String(zt.contactno).length&&null!==zt&&void 0!==zt&&zt.doorno&&null!==zt&&void 0!==zt&&zt.suburb&&null!==zt&&void 0!==zt&&zt.postcode);(0,n.useEffect)((()=>{console.log("pickupSlotsList",Sa),console.log("pickupSlot",wa)}),[Sa,wa]),"undefined"===typeof window||e.current||(document.querySelector("#google-maps")||function(e,t,a){if(!t)return;const s=document.createElement("script");s.setAttribute("async",""),s.setAttribute("id",a),s.src=e,t.appendChild(s)}("https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8","&libraries=places&location=10.3656,77.9690&radius=50000&components=country:IN&strictbounds=true"),document.querySelector("head"),"google-maps"),e.current=!0);(0,n.useEffect)((()=>{(async()=>{try{const e=await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(Qt));console.log("fetchAppLocations",e.data.details),Gt(e.data.details)}catch(e){console.log("locationRes",e)}})()}),[]);(0,n.useEffect)((()=>{xe&&(async()=>{Me(!0),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(xe,"&status=active")).then((e=>{if(console.log(e),e.data.status){let t=[];e.data.details.map((e=>{t.push((0,s.A)((0,s.A)({},e),{},{label:"".concat(e.tenantname)}))})),Ke(t)}Me(!1)})).catch((e=>{console.log(e),Me(!1)}))})()}),[xe]);(0,n.useEffect)((()=>{console.log("startPoint",Ve),console.log("endPoint",Ze),0!=Ve.latitude&&0!=Ve.longitude&&0!=Ze.latitude&&0!=Ze.longitude&&za(Ve,Ze)}),[Ve,Ze]);const za=async(e,t)=>{try{const a=(1.3*((e,t,a,s)=>{const n=e=>e*Math.PI/180,o=n(a-e),l=n(s-t),i=Math.sin(o/2)*Math.sin(o/2)+Math.cos(n(e))*Math.cos(n(a))*Math.sin(l/2)*Math.sin(l/2);return 2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))*6371})(e.latitude,e.longitude,t.latitude,t.longitude)).toFixed(2);console.log("distance in km ",a);const s=Math.round(a);if(console.log("roundedDistance",s),et(s),sVt&&(Xe(!0),fe(!0));const n=40,o=Math.round(s/n*60);console.log("Distance: ".concat(s,", Duration: ").concat(o))}catch(a){console.error("Error calculating distance:",a)}};(0,n.useEffect)((()=>{At&&Ma()}),[(null===Nt||void 0===Nt?void 0:Nt.length)>3,""==Nt,At]),(0,n.useEffect)((()=>{if(Pe[0]){let e=[];Pe.map((t=>{B()().diff(B()("".concat(B()(be).format("MM-DD-YYYY")," ").concat(B()(t).format("HH:mm:ss"))),"m")<=0&&e.push(t)}))}}),[Pe]);(0,n.useEffect)((()=>{At&&(async()=>{Me(!0),console.log("tenantid",At),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(At)).then((e=>{console.log("fetchtenantinfo",e),e.data.status&&(Oe(e.data.details),Da(),pt(e.data.details.subcategoryname),ht(e.data.details.subcategoryid)),Me(!1)})).catch((e=>{console.log(e),Me(!1)}))})()}),[At]);(0,n.useEffect)((()=>{(async()=>{await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getsubcategories/?moduleid=6")).then((e=>{console.log("subcateRes",e.data.details),e.data.status&&dt(e.data.details)})).catch((e=>{console.log(e)}))})()}),[]);(0,n.useEffect)((()=>{xe&&(async()=>{Me(!0),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocations/?applocationid=").concat(xe)).then((e=>{console.log("fetchTiming",e);const{opentime:t,closetime:a,latitude:s,longitude:n,radius:o}=e.data.details[0];if(e.data.status){Ut(s),Kt(n),$t(o),console.log("radius",o),Se("".concat(B()().format("MM-DD-YYYY")," ").concat(t)),we("".concat(B()().format("MM-DD-YYYY")," ").concat(a)),console.log("starttime","".concat(B()().format("MM-DD-YYYY")," ").concat(t)),console.log("endtime","".concat(B()().format("MM-DD-YYYY")," ").concat(a," "));let e=[];for(let s="".concat(B()().format("MM-DD-YYYY")," ").concat(t),n=0;B()("".concat(B()().format("MM-DD-YYYY")," ").concat(a," ")).diff(s,"m")>=0;n++,s=B()(s).add(30,"m"))e.push(s);console.log("setTimeslotarr",e),Ce(e)}Me(!1)})).catch((e=>{console.log(e),Me(!1)}))})()}),[xe]);const Da=async()=>{Me(!0),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocationconfig/?applocationid=").concat(xe)).then((e=>{const t=e.data.details.applocationadmins.map((e=>e.userfcmtokem));e.data.status&&Fe(t),Me(!1)})).catch((e=>{console.log(e),Me(!1)}))};(0,n.useEffect)((()=>{ke&&Ne&&Da()}),[ke,Ne]);const Ya=(e,t,a)=>{(0,U.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||1500}),console.log(We)},Ma=async()=>{De(!0);try{let e=""==Nt?"".concat("https://jupiter.nearle.app/live/api/v1","/customers/gettenantcustomers/?tenantid=").concat(At,"&pageno=1&pagesize=30"):"".concat("https://jupiter.nearle.app/live/api/v1","/customers/search/?tenantid=").concat(At,"&keyword=").concat(Nt);await M.A.get(e).then((e=>{e.data.status&&(console.log("clientdetails",e.data.details),je(e.data.details),Ct(e.data.details)),De(!1)})).catch((e=>{console.log(e),De(!1),Ya("server error","warning")}))}catch(e){console.log(e),De(!1)}},La=async()=>{Me(!0),await M.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/sendnotifications"),{priority:"high",registration_ids:Ee,data:{accessid:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk"},notification:{title:"Nearle Merchant",body:"An Order has been placed successfully,kindly process the same",sound:"ring"}}).then((e=>{console.log(e),"Success"==e.data.message&&(0,U.M8)("Notification sent Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),Me(!1)})).catch((e=>{console.log(e),(0,U.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),Me(!1)}))};(0,n.useEffect)((()=>{if(te){const e=document.getElementById("addressAuto1"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(Bt,qt),radius:1e3*Vt}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();ae("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log(" pick (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),$e({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),Dt((0,s.A)((0,s.A)({},zt),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),Dt((0,s.A)((0,s.A)({},zt),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.sublocality_level_1,city:a.locality,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Pick Address:",a)}))}}),[te]),(0,n.useEffect)((()=>{if(se){const e=document.getElementById("addressAuto2"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(Bt,qt),radius:1e3*Vt}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();ne("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log("drop (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),Ge({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),Mt((0,s.A)((0,s.A)({},Yt),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),Mt((0,s.A)((0,s.A)({},Yt),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.sublocality_level_1,city:a.locality,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Drop Address:",a)}))}}),[se]);return(0,ie.jsxs)(ie.Fragment,{children:[Ye&&(0,ie.jsx)(W.A,{}),ze&&(0,ie.jsx)(W.A,{}),(0,ie.jsxs)(l.A,{className:"orders-workspace-bg",sx:{p:0,m:0,minHeight:"auto",display:"flex",flexDirection:"column"},children:[(0,ie.jsxs)(i.A,{className:"orders-card page-header-row",sx:{mb:{xs:1.5,sm:2},display:"flex",flexDirection:{xs:"column",lg:"row"},alignItems:{xs:"stretch",lg:"center"},justifyContent:"space-between",gap:{xs:1.25,lg:2},px:{xs:1.75,sm:2},py:{xs:.75,sm:.9},flexShrink:0},children:[(0,ie.jsx)(l.A,{className:"header-title-block",sx:{display:"flex",flexDirection:"column",gap:0,minWidth:0,flex:{lg:"1 1 auto"}},children:(0,ie.jsx)(l.A,{sx:{display:"flex",alignItems:"center",gap:1},children:(0,ie.jsx)(r.A,{sx:{fontWeight:700,color:"#1e293b",lineHeight:1.15,fontSize:{xs:"17px",sm:"19px"}},children:"Create New Order"})})}),(0,ie.jsxs)(l.A,{className:"header-configurators",sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:{xs:"stretch",lg:"flex-end"},gap:1,p:0,width:{xs:"100%",lg:"auto"},flexShrink:0},children:[(0,ie.jsx)(l.A,{sx:{width:{xs:"100%",sm:180,md:200,xl:220}},children:(0,ie.jsx)(c.A,{fullWidth:!0,autoFocus:!0,size:"small",ref:J,options:Zt||[],getOptionLabel:e=>"".concat(e.locationname),className:"header-compact-input",onChange:(e,t,a)=>{"clear"===a?(ge(0),ft(0),ba(null),Ke([]),jt(0),ka(null),Ot([]),Dt(null),Mt(null)):(ge(t.applocationid),Dt(null),Mt(null),ft(0),ba(null),jt(0),ka(null),Ot([]))},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{size:"small",placeholder:"Choose Location",label:"Location",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(I.sIY,{style:{color:"#94a3b8",fontSize:12,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,ie.jsx)(l.A,{sx:{width:{xs:"100%",sm:180,md:200,xl:220}},children:(0,ie.jsx)(c.A,{fullWidth:!0,size:"small",className:"header-compact-input",options:qe||[],value:ja,onOpen:e=>{xe||(e.preventDefault(),(0,X.k)("Please select a your location first!","warning",3e3),setTimeout((()=>{var e;null===(e=J.current)||void 0===e||e.focus()}),0))},onChange:(e,t,a)=>{"clear"==a?(ft(0),ba(null),jt(0),ka(null),Ot([]),Dt(null),Mt(null)):(ft((null===t||void 0===t?void 0:t.tenantid)||0),ba(t),jt(0),ka(null),(async e=>{try{const t=await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e));console.log("pricingResponse",t.data.details),at(t.data.details.baseprice),nt(t.data.details.priceperkm),lt(t.data.details.minkm)}catch(t){console.log("fetchTenantPricing error",t)}})(t.tenantid),(async e=>{try{const t=await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e));console.log("gettenantlocations",t.data.details),1==t.data.details.length?(Ot(t.data.details),It(t.data.details[0]),jt(t.data.details[0].locationid),ka(t.data.details[0].locationid),Na(t.data.details[0].slots)):Ot(t.data.details)}catch(t){console.log("gettenantlocations",t)}})(t.tenantid),Mt(null))},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{size:"small",placeholder:"Choose Client",label:"Client",inputRef:ee,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(I.x$1,{style:{color:"#94a3b8",fontSize:11,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,ie.jsx)(l.A,{sx:{width:{xs:"100%",sm:200,md:220,xl:240}},children:1==Tt.length?(0,ie.jsx)(d.A,{variant:"outlined",fullWidth:!0,size:"small",label:"Business Location",value:Tt[0].locationname,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:{style:{color:a.palette.primary.main},startAdornment:(0,ie.jsx)(G.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}})}}):(0,ie.jsx)(c.A,{fullWidth:!0,size:"small",className:"header-compact-input",value:ya,options:Tt||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,onOpen:e=>{xe||At?At||(e.preventDefault(),(0,X.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=ee.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,X.k)("Please select Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=J.current)||void 0===e||e.focus()}),0))},onChange:(e,t,a)=>{"clear"===a?(jt(0),ka(null),Dt(null)):(jt(t.locationid||0),ka(t),It(t),Na(null===t||void 0===t?void 0:t.slots))},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{size:"small",placeholder:"Select Business Locations",label:"Business Location",color:"primary",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(G.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})})]})]}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:{xs:2.5,sm:3,lg:4},children:[(0,ie.jsxs)(u.Ay,{item:!0,xs:12,lg:7.5,sx:{display:"flex",flexDirection:"column",gap:{xs:1.5,sm:1.75,lg:2}},children:[(0,ie.jsxs)(i.A,{className:"orders-card",sx:{p:{xs:1.25,sm:1.5,lg:1.5}},children:[(0,ie.jsxs)(l.A,{className:"route-stepper",children:[(0,ie.jsxs)(l.A,{className:"route-step ".concat(1===Ca?"is-active":""," ").concat(Ia?"is-done":""," step-pickup"),onClick:()=>_a(1),role:"button",tabIndex:0,children:[(0,ie.jsx)(l.A,{className:"route-step-index",children:Ia&&1!==Ca?(0,ie.jsx)(C.CMH,{}):"1"}),(0,ie.jsxs)(l.A,{className:"route-step-text",children:[(0,ie.jsx)(r.A,{className:"route-step-title",children:"Pickup"}),(0,ie.jsx)(r.A,{className:"route-step-sub",children:"Where to collect"})]})]}),(0,ie.jsxs)(l.A,{className:"route-step-connector ".concat(Ia?"is-done":""),children:[(0,ie.jsx)(l.A,{className:"route-step-line"}),(0,ie.jsx)(l.A,{className:"route-step-line-arrow",children:(0,ie.jsx)(C.Z0P,{})})]}),(0,ie.jsxs)(l.A,{className:"route-step ".concat(2===Ca?"is-active":""," step-drop ").concat(Ia?"":"is-locked"),onClick:()=>{Ia?_a(2):Ya("Please complete Pickup details first","warning",2e3)},role:"button",tabIndex:0,children:[(0,ie.jsx)(l.A,{className:"route-step-index",children:"2"}),(0,ie.jsxs)(l.A,{className:"route-step-text",children:[(0,ie.jsx)(r.A,{className:"route-step-title",children:"Drop"}),(0,ie.jsx)(r.A,{className:"route-step-sub",children:"Where to deliver"})]})]})]}),(0,ie.jsxs)(l.A,{className:"route-flow",children:[(0,ie.jsxs)(l.A,{className:"location-panel pickup-panel",sx:{display:1===Ca?"block":"none"},children:[(0,ie.jsxs)(l.A,{className:"lp-header",children:[(0,ie.jsxs)(l.A,{className:"lp-header-title",children:[(0,ie.jsx)(l.A,{className:"lp-badge",children:(0,ie.jsx)(I.sIY,{})}),(0,ie.jsxs)(l.A,{children:[(0,ie.jsx)(r.A,{className:"lp-title",children:"Pickup"}),(0,ie.jsx)(r.A,{className:"lp-subtitle",children:"Where to collect the parcel"})]})]}),(0,ie.jsx)(l.A,{className:"lp-header-actions",children:(0,ie.jsx)(p.A,{className:"lp-action-btn",size:"small",disabled:!vt,startIcon:(0,ie.jsx)(q.A,{style:{fontSize:13}}),onClick:()=>{xe||At||vt?xe||At?xe?(St(!0),Rt(1),Dt(null),ae(""),wt("")):(0,X.k)("Please select Location!","warning",3e3):(0,X.k)("Please select Location and Tenant!","warning",3e3):(0,X.k)("Please select Location, Tenant and Business!","warning",3e3)},children:"From Saved"})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",children:"Contact"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{inputRef:ue,fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.x$1,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Contact Name",value:(null===zt||void 0===zt?void 0:zt.firstname)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{firstname:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{error:da,inputRef:me,fullWidth:!0,size:"small",type:"number",InputProps:{inputProps:{maxLength:10},startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(C.dRU,{style:{color:da?"#ef4444":"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Contact Number",value:(null===zt||void 0===zt?void 0:zt.contactno)||"",onChange:e=>{e.target.value.length<=10&&Dt((0,s.A)((0,s.A)({},zt),{},{contactno:e.target.value})),la==e.target.value?sa(0):sa(1),e.target.value.length<10?ua(!0):ua(!1)}})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Lookup"}),0==Wt?(0,ie.jsx)(d.A,{id:"addressAuto1",fullWidth:!0,size:"small",placeholder:"Search Google Maps for an address...",variant:"outlined",value:te||"",onChange:e=>ae(e.target.value),helperText:"Start typing to auto-fill the address details below",FormHelperTextProps:{className:"address-search-helper pickup-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(q.A,{style:{fontSize:15,color:"#662582"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{ae(""),Dt((0,s.A)((0,s.A)({},zt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),$e({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(w.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}}}):(0,ie.jsx)(d.A,{variant:"outlined",fullWidth:!0,size:"small",helperText:"Saved address selected \xb7 clear to search again",FormHelperTextProps:{className:"address-search-helper pickup-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{fontSize:14,color:"#662582"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{Ht(0),Dt((0,s.A)((0,s.A)({},zt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),$e({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(z.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}},value:(null===zt||void 0===zt?void 0:zt.address)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{address:e.target.value})),""==e.target.value&&(Ht(0),Xe(!1),$e({latitude:0,longitude:0}))}}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Details"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(_.V92,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Door No / Street",value:(null===zt||void 0===zt?void 0:zt.doorno)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{doorno:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Location",value:(null===zt||void 0===zt?void 0:zt.suburb)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{suburb:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(Y.BND,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Postcode",value:(null===zt||void 0===zt?void 0:zt.postcode)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{postcode:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.Ndh,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Landmark",value:(null===zt||void 0===zt?void 0:zt.landmark)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{landmark:e.target.value}))}})})]}),1==aa&&(0,ie.jsx)(l.A,{sx:{display:"flex",justifyContent:"flex-end",mt:1},children:(0,ie.jsx)(l.A,{className:"save-later-pill",children:(0,ie.jsx)(x.A,{control:(0,ie.jsx)(g.A,{size:"small",checked:1===Xt,onChange:e=>{Jt(e.target.checked?1:0)}}),label:"Save contact for later"})})}),(0,ie.jsxs)(l.A,{className:"step-nav",children:[(0,ie.jsx)(r.A,{className:"step-nav-hint",children:Ia?"Pickup looks good. Proceed to Drop details.":"Fill the required Pickup fields to continue."}),(0,ie.jsx)(p.A,{className:"step-nav-btn step-nav-next",disabled:!Ia,endIcon:(0,ie.jsx)(C.Z0P,{style:{fontSize:12}}),onClick:()=>_a(2),children:"Continue to Drop"})]})]}),(0,ie.jsxs)(l.A,{className:"location-panel drop-panel",sx:{display:2===Ca?"block":"none"},children:[(0,ie.jsxs)(l.A,{className:"lp-header",children:[(0,ie.jsxs)(l.A,{className:"lp-header-title",children:[(0,ie.jsx)(l.A,{className:"lp-badge",children:(0,ie.jsx)(I.sIY,{})}),(0,ie.jsxs)(l.A,{children:[(0,ie.jsx)(r.A,{className:"lp-title",children:"Drop"}),(0,ie.jsx)(r.A,{className:"lp-subtitle",children:"Where to deliver the parcel"})]})]}),(0,ie.jsx)(l.A,{className:"lp-header-actions",children:(0,ie.jsx)(p.A,{className:"lp-action-btn",size:"small",disabled:!vt,startIcon:(0,ie.jsx)(q.A,{style:{fontSize:13}}),onClick:()=>{xe||At||vt?xe||At?xe?(St(!0),Rt(2),ne("")):(0,X.k)("Please select Location!","warning",3e3):(0,X.k)("Please select Location and Tenant!","warning",3e3):(0,X.k)("Please select Location, Tenant and Business!","warning",3e3)},children:"From Saved"})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",children:"Contact"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{inputRef:he,fullWidth:!0,size:"small",variant:"outlined",label:"Contact Name",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.x$1,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.firstname)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{firstname:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{error:pa,fullWidth:!0,size:"small",type:"number",variant:"outlined",label:"Contact Number",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(C.dRU,{style:{color:pa?"#ef4444":"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.contactno)||"",onChange:e=>{e.target.value.length<=10&&Mt((0,s.A)((0,s.A)({},Yt),{},{contactno:e.target.value})),ra==e.target.value?oa(0):oa(1),e.target.value.length<10?ma(!0):ma(!1)}})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Lookup"}),0==Et?(0,ie.jsx)(d.A,{id:"addressAuto2",placeholder:"Search Google Maps for an address...",variant:"outlined",size:"small",fullWidth:!0,value:se||"",onChange:e=>ne(e.target.value),helperText:"Start typing to auto-fill the address details below",FormHelperTextProps:{className:"address-search-helper drop-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(q.A,{style:{fontSize:15,color:"#65387a"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{ne(""),Mt((0,s.A)((0,s.A)({},Yt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),Ge({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(w.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}}}):(0,ie.jsx)(d.A,{variant:"outlined",fullWidth:!0,size:"small",helperText:"Saved address selected \xb7 clear to search again",FormHelperTextProps:{className:"address-search-helper drop-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{fontSize:14,color:"#65387a"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{Ft(0),Mt((0,s.A)((0,s.A)({},Yt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),Ge({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(z.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}},value:(null===Yt||void 0===Yt?void 0:Yt.address)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{address:e.target.value})),""==e.target.value&&(Ft(0),Xe(!1),Ge({latitude:0,longitude:0}))}}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Details"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Door No / Street",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(_.V92,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.doorno)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{doorno:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Location",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.suburb)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{suburb:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Postcode",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(Y.BND,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.postcode)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{postcode:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Landmark",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.Ndh,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.landmark)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{landmark:e.target.value}))}})})]}),1==na&&(0,ie.jsx)(l.A,{sx:{display:"flex",justifyContent:"flex-end",mt:1},children:(0,ie.jsx)(l.A,{className:"save-later-pill",children:(0,ie.jsx)(x.A,{control:(0,ie.jsx)(g.A,{size:"small",checked:1===ea,onChange:e=>{ta(e.target.checked?1:0)}}),label:"Save contact for later"})})}),(0,ie.jsxs)(l.A,{className:"step-nav",children:[(0,ie.jsx)(p.A,{className:"step-nav-btn step-nav-back",startIcon:(0,ie.jsx)(C.QVr,{style:{fontSize:12}}),onClick:()=>_a(1),children:"Back to Pickup"}),(0,ie.jsx)(r.A,{className:"step-nav-hint",children:"Review the route below once Drop is filled."})]})]})]})]}),(0,ie.jsxs)(i.A,{className:"orders-card",sx:{p:{xs:1.5,sm:1.75,lg:2}},children:[(0,ie.jsx)(l.A,{className:"section-title-bar",sx:{mb:1.25},children:(0,ie.jsx)(r.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:"15px",letterSpacing:"-0.01em"},children:"Cargo & Dispatch Logistics"})}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,alignItems:"stretch",children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sx:{pt:"0 !important"},children:(0,ie.jsxs)(l.A,{sx:{display:"flex",alignItems:"center",gap:1,mb:.25},children:[(0,ie.jsx)(r.A,{sx:{fontWeight:700,fontSize:"10.5px",color:"#64748b",letterSpacing:"0.7px",textTransform:"uppercase"},children:"Cargo Details"}),(0,ie.jsx)(l.A,{sx:{flex:1,height:"1px",background:"linear-gradient(90deg, #eef2f6 0%, transparent 100%)"}})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:4,children:(0,ie.jsx)(A.A,{children:(0,ie.jsx)(c.A,{id:"combo-box-demo",size:"small",options:ct,getOptionLabel:e=>(null===e||void 0===e?void 0:e.subcategoryname)||"",fullWidth:!0,sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px",paddingTop:"0px !important",paddingBottom:"0px !important"}},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{label:"Category",size:"small",InputLabelProps:{shrink:!0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(C.TXh,{style:{color:"#94a3b8",fontSize:13,marginRight:6,marginLeft:2,flexShrink:0}}),e.InputProps.startAdornment]})})})),onChange:(e,t,a)=>{t?(console.log(t),pt(t.subcategoryname||""),ht(t.subcategoryid||0)):a&&(pt(null),ht(null))}})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:4,children:(0,ie.jsx)(A.A,{children:(0,ie.jsx)(d.A,{type:"number",size:"small",value:ga,fullWidth:!0,label:"Cash Collect",InputLabelProps:{shrink:!0},onChange:e=>{Aa(e.target.value)},inputProps:{min:0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(l.A,{sx:{color:"#94a3b8",fontWeight:700,fontSize:14,lineHeight:1},children:"\u20b9"})})}})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:4,children:(0,ie.jsx)(A.A,{children:(0,ie.jsx)(d.A,{type:"number",size:"small",value:fa,fullWidth:!0,label:"Quantity",InputLabelProps:{shrink:!0},onChange:e=>{va(e.target.value)},inputProps:{min:1},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(C.H5e,{style:{color:"#94a3b8",fontSize:14}})})}})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sx:{mt:.5,pb:0},children:(0,ie.jsxs)(l.A,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[(0,ie.jsxs)(r.A,{sx:{display:"flex",alignItems:"center",gap:.75,fontWeight:700,fontSize:"10.5px",color:"#64748b",letterSpacing:"0.7px",textTransform:"uppercase"},children:[(0,ie.jsx)(K.A,{style:{fontSize:"11px",color:"#65387a"}}),"Schedule Details"]}),(0,ie.jsx)(l.A,{sx:{flex:1,height:"1px",background:"linear-gradient(90deg, #eef2f6 0%, transparent 100%)"}})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sx:{pt:"0px !important"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(E.$,{dateAdapter:F.R,children:(0,ie.jsx)(H.l,{label:"Pickup Date",format:"DD-MM-YYYY",onChange:e=>{let t=B()().diff(B()("".concat(B()(e).format("YYYY-MM-DD"))),"d");if(Ue(""),t<=0){ye(e);let t=[];Pe.map((a=>{B()().diff(B()("".concat(B()(e).format("MM-DD-YYYY")," ").concat(B()(a).format("HH:mm:ss"))),"m")<=0&&t.push(a)}))}else He("choose Upcoming Date"),Ya("choose Upcoming Date","warning"),ye(NaN)},value:B()(be),sx:{width:"100%","& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},slotProps:{textField:{size:"small",fullWidth:!0,InputLabelProps:{shrink:!0},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(K.A,{style:{color:"#94a3b8",fontSize:"13px"}})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px",paddingLeft:"10px"}}}},disablePast:!0})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(c.A,{size:"small",fullWidth:!0,options:Sa||[],sx:{width:"100%","& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px",paddingTop:"0px !important",paddingBottom:"0px !important"}},onChange:(e,t,a)=>{if("clear"!==a&&t){const e=B()(t.time,"HH:mm").format("hh:mm A");Ue(e);const a=B()("".concat(be," ").concat(e),"MM-DD-YYYY hh:mm A").format("YYYY-MM-DD hh:mm A");Pa(a)}else Ue(null),Pa(null)},getOptionLabel:e=>e?"".concat(e.name," (").concat(B()(e.time,"HH:mm").format("hh:mm A"),")"):"",renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{label:"Pickup Time Slot",placeholder:"Select Pickup Slot",fullWidth:!0,InputLabelProps:{shrink:!0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(V.A,{style:{color:"#94a3b8",fontSize:"13px",marginRight:"6px",marginLeft:"2px",flexShrink:0}}),e.InputProps.startAdornment]})})}))})})]})})]})]})]}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,lg:4.5,sx:{position:{lg:"sticky"},top:{lg:"24px"},height:"fit-content"},children:(0,ie.jsxs)(A.A,{spacing:2,children:[(0,ie.jsxs)(i.A,{className:"orders-card",sx:{p:1.5,display:"flex",flexDirection:"column"},children:[(0,ie.jsxs)(r.A,{sx:{fontWeight:700,mb:1.25,display:"flex",alignItems:"center",gap:.75,color:"#1e293b",fontSize:"14px",letterSpacing:"-0.01em"},children:[(0,ie.jsx)(G.A,{sx:{color:"#662582",fontSize:16}}),"Live Route Preview"]}),(0,ie.jsx)("div",{className:"map-preview-wrapper",children:(0,ie.jsx)(pe,{startPoint:Ve,endPoint:Ze,appLocaLat:Bt,appLocaLng:qt})})]}),(0,ie.jsxs)(i.A,{className:"orders-card delivery-prefs-card",sx:{p:1.5},children:[(0,ie.jsxs)(l.A,{className:"delivery-prefs-header",children:[(0,ie.jsx)(r.A,{className:"delivery-prefs-title",children:"Delivery Preferences"}),(0,ie.jsx)(r.A,{className:"delivery-prefs-sub",children:"Customer notifications & dispatch instructions"})]}),(0,ie.jsxs)(l.A,{className:"delivery-prefs-row",children:[(0,ie.jsxs)(l.A,{className:"delivery-prefs-field",children:[(0,ie.jsxs)("label",{className:"delivery-prefs-label",htmlFor:"dispatch-notes-input",children:[(0,ie.jsx)($.A,{style:{fontSize:11,color:"#65387a"}}),"Special Dispatch Notes"]}),(0,ie.jsx)(d.A,{id:"dispatch-notes-input",size:"small",fullWidth:!0,placeholder:"Gate codes, call instructions, special cargo care\u2026",value:_e,onChange:e=>Ie(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",padding:"0 10px",alignItems:"center",fontSize:"12px",background:"#ffffff",height:"32px"},"& .MuiOutlinedInput-input":{padding:"0 !important",fontSize:"12px !important",lineHeight:"32px"}}})]}),(0,ie.jsxs)(l.A,{className:"sms-toggle-tile ".concat(1===ha?"is-active":""),onClick:()=>xa(1===ha?0:1),role:"button",tabIndex:0,children:[(0,ie.jsxs)(l.A,{className:"sms-toggle-left",children:[(0,ie.jsx)(l.A,{className:"sms-toggle-icon",children:(0,ie.jsx)(Z.A,{style:{fontSize:13}})}),(0,ie.jsxs)(l.A,{sx:{minWidth:0},children:[(0,ie.jsx)(r.A,{className:"sms-toggle-title",children:"SMS Updates"}),(0,ie.jsx)(r.A,{className:"sms-toggle-sub",children:"Auto-notify customer on dispatch & delivery"})]})]}),(0,ie.jsx)(f.A,{size:"small",checked:1===ha,onChange:e=>{e.stopPropagation(),xa(e.target.checked?1:0)}})]})]})]}),(0,ie.jsxs)(i.A,{className:"orders-card pricing-summary-card",children:[(0,ie.jsxs)(l.A,{className:"pricing-header",children:[(0,ie.jsx)(r.A,{className:"pricing-title",children:"Pricing & Dispatch"}),(0,ie.jsx)(r.A,{className:"pricing-subtitle",children:"Live cost estimate"})]}),(0,ie.jsxs)("div",{className:"price-metric-item",children:[(0,ie.jsxs)("div",{className:"price-metric-label",children:[(0,ie.jsx)("span",{className:"price-metric-icon icon-distance",children:(0,ie.jsx)(C.$Fg,{})}),(0,ie.jsx)("span",{children:"Delivery Distance"})]}),(0,ie.jsx)("div",{className:"price-metric-value ".concat(Qe?"highlight":""),children:Qe?"".concat(Je," km"):"\u2014"})]}),(0,ie.jsxs)("div",{className:"price-metric-item",children:[(0,ie.jsxs)("div",{className:"price-metric-label",children:[(0,ie.jsx)("span",{className:"price-metric-icon icon-base",children:(0,ie.jsx)(C.MxO,{})}),(0,ie.jsxs)("span",{children:["Base Fare",(0,ie.jsxs)("span",{className:"price-metric-sub",children:[" \xb7 ",ot," km"]})]})]}),(0,ie.jsx)("div",{className:"price-metric-value",children:tt?"\u20b9".concat(tt.toFixed(2)):"\u20b90.00"})]}),(0,ie.jsxs)("div",{className:"price-metric-item",children:[(0,ie.jsxs)("div",{className:"price-metric-label",children:[(0,ie.jsx)("span",{className:"price-metric-icon icon-rate",children:(0,ie.jsx)(C.YYR,{})}),(0,ie.jsx)("span",{children:"Rate per km"})]}),(0,ie.jsxs)("div",{className:"price-metric-value",children:[st?"\u20b9".concat(st.toFixed(2)):"\u20b90.00",(0,ie.jsx)("span",{className:"price-metric-unit",children:"/km"})]})]}),Qe&&(0,ie.jsxs)("div",{className:"total-charge-badge",children:[(0,ie.jsxs)("div",{className:"total-charge-left",children:[(0,ie.jsx)(C.wTh,{className:"total-charge-icon"}),(0,ie.jsx)("div",{className:"total-charge-label",children:"Total Delivery Charge"})]}),(0,ie.jsxs)("div",{className:"total-charge-val",children:["\u20b9",it.toFixed(2)]})]}),(0,ie.jsx)(l.A,{sx:{mt:1.5},children:(0,ie.jsx)(le.A,{children:(0,ie.jsx)(p.A,{fullWidth:!0,className:"gradient-btn-create",disabled:!Qe||!Be||!wa,startIcon:!Le&&(0,ie.jsx)(C.Cer,{style:{fontSize:11}}),onClick:()=>{Me(!0),Re(!0),(async()=>{let e={};if(e={orders:{applocationid:Te.applolcationid,cancellled:"",categoryid:+Te.categoryid,configid:9,customerid:0==Xt&&+zt.customerid||0,deliveryaddress:Yt.address||"",deliverycharge:+it.toFixed(2)||0,deliverycity:Yt.city||"",deliverycontactno:Yt.contactno||"",deliverycustomer:Yt.firstname||"",deliveryid:0==ea&&+Yt.customerid||0,deliverylandmark:Yt.landmark||"",deliverylat:Yt.latitude.toString(),deliverylocation:Yt.suburb||"",deliverylocationid:Yt.deliverylocationid||0,deliverylong:Yt.longitude.toString(),deliverytime:"".concat(B()(be).format("YYYY-MM-DD")," ").concat(B()(Be.$d).format("HH:mm:ss")),deliverytype:"B",delivered:"",itemcount:1,kms:Je.toString()||0,locationid:+vt,moduleid:+Te.moduleid,orderamount:+it.toFixed(2)||0,ordercharges:0,orderdate:B()().format("YYYY-MM-DD HH:mm:ss"),ordernotes:_e,orderstatus:"created",ordervalue:+it.toFixed(2)||0,partnerid:Te.partnerid,partneruserid:+Qt,paymentstatus:1,paymenttype:42,pickupaddress:zt.address||"",pickupcity:zt.city||"",pickupcontactno:zt.contactno||"",pickupcustomer:zt.firstname||"",pickuplandmark:zt.landmark||"",pickuplat:zt.latitude.toString()||"",pickuplocation:zt.suburb||"",pickuplocationid:zt.deliverylocationid||0,pickuplong:zt.longitude.toString()||"",smsdelivery:ha,subcategoryid:+mt,tenantid:Te.tenantid,collectionamt:+ga,quantity:+fa,weight:xt,pickupSlot:wa},pickup:{address:zt.address||"",applocationid:Te.applolcationid,city:zt.city||"",configid:1,contactno:zt.contactno||"",customertoken:"",customerid:0==Xt&&zt.customerid||0,devicetype:"",deviceid:"",dialcode:"+91",doorno:zt.doorno||"",email:zt.email||"",firstname:zt.firstname||"",landmark:zt.landmark||"",latitude:zt.latitude.toString()||"",longitude:zt.longitude.toString()||"",postcode:zt.postcode||"",primaryaddress:1,locationid:zt.deliverylocationid||0,profileimage:"",state:zt.state||"",suburb:zt.suburb||"",tenantid:Te.tenantid},drop:{address:Yt.address||"",applocationid:Te.applolcationid,city:Yt.city||"",configid:1,contactno:Yt.contactno||"",customertoken:"",customerid:0==ea&&Yt.customerid||0,devicetype:"",deviceid:"",locationid:Yt.deliverylocationid||0,dialcode:"+91",doorno:Yt.doorno||"",email:Yt.email||"",firstname:Yt.firstname||"",landmark:Yt.landmark||"",latitude:Yt.latitude.toString(),longitude:Yt.longitude.toString(),postcode:Yt.postcode||"",primaryaddress:1,profileimage:"",state:Yt.state||"",suburb:Yt.suburb||"",tenantid:Te.tenantid}},console.log("createsubmitobj2",e),zt.firstname)if(zt.contactno)if(10!=zt.contactno.length)Ya("Check Pickup Contact Number ","error",2e3);else if(zt.suburb)if(zt.city)if(zt.postcode)if(zt.landmark)if(Yt.firstname)if(Yt.contactno)if(10!==Yt.contactno.length)Ya("Check Drop Contact Number ","error",2e3);else if(Yt.suburb)if(Yt.city)if(Yt.postcode)if(Yt.landmark)if(Be)if(ht)try{const a=await M.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/orders/createorder"),e);a.data.status?(console.log("createRes",a),(0,U.M8)("Order Created Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),Ee&&La(),t("/nearle/orders")):Ya("Error in creating orders","warning"),Me(!1)}catch(a){Ya(a.message,"warning"),console.log("createResErr",a)}else Ya("Choose SubCategory ","warning",2e3);else Ya("Choose deliverytime ","warning",2e3);else Ya("Enter Drop Landmark ","warning",2e3);else Ya("Enter Drop postcode ","warning",2e3);else Ya("Enter Drop City ","warning",2e3);else Ya("Enter Drop Suburb ","warning",2e3);else Ya("Enter Drop Contact Number","warning",2e3);else Ya("Enter Drop Contact Name ","warning",2e3);else Ya("Enter Pickup Landmark ","warning",2e3);else Ya("Enter Pickup Postcode ","warning",2e3);else Ya("Enter Pickup City ","warning",2e3);else Ya("Enter Pickup Location ","warning",2e3);else Ya("Enter Pickup Contact Number ","warning",2e3);else Ya("Enter Pickup Contact Name ","warning",2e3)})(),setTimeout((()=>{Me(!1),Re(!1)}),2e3)},children:Le?(0,ie.jsx)(v.A,{color:"inherit",size:16,thickness:5}):"Dispatch Delivery Order"})})})]})]})})]})]}),(0,ie.jsxs)(T.A,{open:kt,onClose:()=>{St(!1),wt("")},fullWidth:!0,fullScreen:O,sx:{"& .MuiDialog-paper":{borderRadius:{xs:0,sm:"16px"},overflow:"hidden"}},children:[(0,ie.jsx)(j.A,{sx:{background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"white",py:2.5},children:(0,ie.jsxs)(A.A,{spacing:1.5,children:[(0,ie.jsx)(r.A,{variant:"h4",sx:{fontWeight:600,color:"white"},children:"Select Saved Address (".concat(1===Lt?"Pickup":"Drop",")")}),(0,ie.jsx)(b.A,{sx:{width:"100%"},children:(0,ie.jsx)(y.A,{autoFocus:!0,fullWidth:!0,id:"input-search-header",placeholder:"Search by name, contact, or address...",value:Nt,onChange:e=>wt(e.target.value),sx:{bgcolor:"white",borderRadius:"10px","& .MuiOutlinedInput-input":{p:"10px 14px"}},startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(q.A,{style:{fontSize:"small",color:"#64748b"}})}),endAdornment:(0,ie.jsx)(h.A,{sx:{visibility:Nt?"visible":"hidden",p:.5},onClick:()=>{wt("")},children:(0,ie.jsx)(z.A,{style:{fontSize:"18px"}})}),autoComplete:"off"})})]})}),(0,ie.jsx)(k.A,{}),(0,ie.jsx)(S.A,{sx:{p:3,maxHeight:"600px",overflowY:"auto",bgcolor:"#fafbfc"},children:0==(null===Pt||void 0===Pt?void 0:Pt.length)?(0,ie.jsx)(A.A,{spacing:2,direction:"row",alignItems:"center",justifyContent:"center",sx:{minHeight:300},children:(0,ie.jsx)(P.A,{description:"No saved addresses found for this client"})}):(0,ie.jsx)(l.A,{children:Pt&&Pt.map(((e,t)=>(0,ie.jsx)(p.A,{className:"address-card-btn",onClick:()=>{St(!1),wt(""),1===Lt?(console.log("PickupClient",e),Ht(1),$e({latitude:e.latitude,longitude:e.longitude}),Dt(e),ia(e.contactno)):(console.log("DropClient",e),Ft(1),Ge({latitude:e.latitude,longitude:e.longitude}),Mt(e),ca(e.contactno))},disabled:(null===zt||void 0===zt?void 0:zt.customerid)===e.customerid,children:(0,ie.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"column"},children:[(0,ie.jsx)(r.A,{variant:"subtitle1",sx:{textAlign:"left",fontWeight:600,color:"#1e293b"},children:"".concat(e.firstname," (").concat(e.contactno,")")}),(0,ie.jsx)(r.A,{variant:"body2",sx:{textAlign:"left",color:"#64748b",mt:.5,lineHeight:1.4},children:e.address})]})},t)))})}),(0,ie.jsx)(k.A,{}),(0,ie.jsx)(N.A,{sx:{p:2.5,bgcolor:"#fafbfc"},children:(0,ie.jsx)(p.A,{color:"error",variant:"outlined",sx:{borderRadius:"8px",textTransform:"none",px:3,"&:hover":{bgcolor:"#ef4444",color:"white",borderColor:"#ef4444"}},onClick:()=>{St(!1),wt("")},children:"Cancel"})})]}),(0,ie.jsxs)(T.A,{open:Ae,onClose:()=>{fe(!1)},fullWidth:!0,sx:{"& .MuiDialog-paper":{borderRadius:{xs:3,sm:"16px"},p:1.5,m:{xs:1.5,sm:4},width:{xs:"calc(100% - 24px)",sm:"auto"},maxWidth:"400px"}},children:[(0,ie.jsxs)(j.A,{sx:{textAlign:"center",pb:1},children:[(0,ie.jsx)(Q.A,{sx:{fontSize:70,color:a.palette.error.main,mb:1}}),(0,ie.jsx)(r.A,{variant:"h3",sx:{color:a.palette.error.main,fontWeight:700},children:"Dispatch Blocked"})]}),(0,ie.jsx)(S.A,{sx:{textAlign:"center",pb:2},children:(0,ie.jsx)(r.A,{variant:"body1",sx:{color:"#64748b",lineHeight:1.5},children:"Our delivery partners cannot service this coordinate combination. The route distance exceeds the active operating radius for this app location."})}),(0,ie.jsx)(N.A,{sx:{bgcolor:a.palette.error.main,borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"16px",fontWeight:600,color:"white",cursor:"pointer",py:1.5,mx:2.5,mb:2,transition:"background-color 0.2s ease","&:hover":{bgcolor:a.palette.error.dark}},onClick:()=>{fe(!1)},children:"Acknowledge & Close"})]})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9592],{855:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(7208),n=a(76475),o=a(44414);function l(e){var t,a;let l,i,{children:r,type:c="scale",direction:d="right",offset:u=10,scale:p={hover:1.05,tap:.95}}=e;switch(d){case"up":case"left":l=u,i=0;break;default:l=0,i=u}const[m,h]=(0,s.Y)(l,i),[x,g]=(0,s.Y)(l,i);switch(c){case"rotate":return(0,o.jsx)(n.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:r});case"slide":return"up"===d||"down"===d?(0,o.jsx)(n.P.div,{animate:{y:void 0!==x?x:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:r}):(0,o.jsx)(n.P.div,{animate:{x:void 0!==m?m:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:r});default:return"number"===typeof p&&(p={hover:p,tap:p}),(0,o.jsx)(n.P.div,{whileHover:{scale:null===(t=p)||void 0===t?void 0:t.hover},whileTap:{scale:null===(a=p)||void 0===a?void 0:a.tap},children:r})}}},20466:(e,t,a)=>{a.d(t,{k:()=>n});var s=a(8881);const n=(e,t,a)=>(0,s.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},42041:()=>{},80987:(e,t,a)=>{a.r(t),a.d(t,{default:()=>me});var s=a(89379),n=a(9950),o=a(47223),l=a(16491),i=a(48089),r=a(82053),c=a(77922),d=a(29925),u=a(60899),p=a(10226),m=a(2046),h=a(25333),x=a(16497),g=a(93038),A=a(93230),f=a(37324),v=a(46639),j=a(40033),b=a(25979),y=a(2660),k=a(74745),S=a(28170),N=a(79739),w=a(96319),P=a(13838),C=a(54826),_=a(85527),I=a(43302),z=a(7762),D=a(28429),Y=a(63057),M=a(26910),L=a(14857),R=a(99459),W=a(52351),H=(a(172),a(50027),a(30633)),E=a(81831),F=a(95359),T=a(96583),O=a(4159),B=a.n(O),U=a(8881),q=a(60767),K=a(81419),V=a(3911),$=a(47738),Z=a(9845),G=a(87942),Q=a(76746),X=a(20466),J=a(98007),ee=a(99810),te=a(49029),ae=a(47113),se=a(82215),ne=a(2527),oe=a.n(ne),le=(a(55392),a(42041),a(855)),ie=a(44414),re=a(36220);B().extend(re);const ce="undefined"!==typeof window?new(oe().Icon)({iconUrl:"https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-blue.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}):null,de="undefined"!==typeof window?new(oe().Icon)({iconUrl:"https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}):null,ue=e=>{let{startPoint:t,endPoint:a}=e;const s=(0,J.ko)();return(0,n.useEffect)((()=>{const e=[],n=parseFloat(null===t||void 0===t?void 0:t.latitude),o=parseFloat(null===t||void 0===t?void 0:t.longitude),l=parseFloat(null===a||void 0===a?void 0:a.latitude),i=parseFloat(null===a||void 0===a?void 0:a.longitude);isNaN(n)||isNaN(o)||0===n||0===o||e.push([n,o]),isNaN(l)||isNaN(i)||0===l||0===i||e.push([l,i]),1===e.length?s.setView(e[0],14):2===e.length&&s.fitBounds(e,{padding:[50,50]})}),[null===t||void 0===t?void 0:t.latitude,null===t||void 0===t?void 0:t.longitude,null===a||void 0===a?void 0:a.latitude,null===a||void 0===a?void 0:a.longitude,s]),null},pe=e=>{let{startPoint:t,endPoint:a,appLocaLat:s,appLocaLng:o}=e;const l=[parseFloat(s)||11.0168,parseFloat(o)||76.9558],i=(null===t||void 0===t?void 0:t.latitude)&&(null===t||void 0===t?void 0:t.longitude)&&0!==parseFloat(t.latitude),r=(null===a||void 0===a?void 0:a.latitude)&&(null===a||void 0===a?void 0:a.longitude)&&0!==parseFloat(a.latitude),c=i?[parseFloat(t.latitude),parseFloat(t.longitude)]:null,d=r?[parseFloat(a.latitude),parseFloat(a.longitude)]:null,[u,p]=n.useState([]);return n.useEffect((()=>{if(!i||!r)return void p([]);(async()=>{const e="https://router.project-osrm.org/route/v1/driving/".concat(t.longitude,",").concat(t.latitude,";").concat(a.longitude,",").concat(a.latitude,"?overview=full&geometries=geojson");try{var s;const t=await fetch(e),a=await t.json();if(null!==(s=a.routes)&&void 0!==s&&s.length){const e=a.routes[0].geometry.coordinates.map((e=>{let[t,a]=e;return[a,t]}));p(e)}else p([c,d])}catch(n){console.error("OSRM Error:",n),p([c,d])}})()}),[t.latitude,t.longitude,a.latitude,a.longitude,i,r]),(0,ie.jsx)("div",{style:{position:"relative",width:"100%",height:"100%"},children:(0,ie.jsxs)(ee.W,{center:l,zoom:12,style:{width:"100%",height:"100%"},zoomControl:!0,children:[(0,ie.jsx)(te.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),i&&(0,ie.jsx)(ae.p,{position:c,icon:ce}),r&&(0,ie.jsx)(ae.p,{position:d,icon:de}),u.length>0?(0,ie.jsx)(se.R,{positions:u,color:"#662582",weight:4}):i&&r&&(0,ie.jsx)(se.R,{positions:[c,d],color:"#662582",weight:4}),(0,ie.jsx)(ue,{startPoint:t,endPoint:a})]})})};const me=()=>{R.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const e=n.useRef(!1),t=(0,D.Zp)(),a=(0,L.A)(),O=(0,o.A)(a.breakpoints.down("md")),J=(0,n.useRef)(null),ee=(0,n.useRef)(null),[te,ae]=n.useState(""),[se,ne]=n.useState(""),[oe,re]=(0,n.useState)(localStorage.getItem("locationid")),[ce,de]=(0,n.useState)(!1),ue=(0,n.useRef)(null),me=(0,n.useRef)(null),he=(0,n.useRef)(null),[xe,ge]=(0,n.useState)(0),[Ae,fe]=(0,n.useState)(!1),[ve,je]=(0,n.useState)([]),[be,ye]=(0,n.useState)(B()().format("MM-DD-YYYY")),[ke,Se]=(0,n.useState)(),[Ne,we]=(0,n.useState)(),[Pe,Ce]=(0,n.useState)([]),[_e,Ie]=(0,n.useState)(""),[ze,De]=(0,n.useState)(!1),[Ye,Me]=(0,n.useState)(!1),[Le,Re]=(0,n.useState)(!1),[We,He]=(0,n.useState)(""),[Ee,Fe]=(0,n.useState)(),[Te,Oe]=(0,n.useState)({}),[Be,Ue]=(0,n.useState)(""),[qe,Ke]=(0,n.useState)([]),[Ve,$e]=(0,n.useState)({latitude:0,longitude:0}),[Ze,Ge]=(0,n.useState)({latitude:0,longitude:0}),[Qe,Xe]=(0,n.useState)(!1),[Je,et]=(0,n.useState)(0),[tt,at]=(0,n.useState)(0),[st,nt]=(0,n.useState)(0),[ot,lt]=(0,n.useState)(0),[it,rt]=(0,n.useState)(0),[ct,dt]=(0,n.useState)([]),[ut,pt]=(0,n.useState)("Select "),[mt,ht]=(0,n.useState)(0),[xt,gt]=(0,n.useState)(""),[At,ft]=(0,n.useState)(0),[vt,jt]=(0,n.useState)(0),[bt,yt]=(0,n.useState)(null),[kt,St]=(0,n.useState)(!1),[Nt,wt]=(0,n.useState)(""),[Pt,Ct]=(0,n.useState)([]),[_t,It]=(0,n.useState)(null),[zt,Dt]=(0,n.useState)(null),[Yt,Mt]=(0,n.useState)(null),[Lt,Rt]=(0,n.useState)(0),[Wt,Ht]=(0,n.useState)(0),[Et,Ft]=(0,n.useState)(0),[Tt,Ot]=(0,n.useState)([]),[Bt,Ut]=(0,n.useState)(),[qt,Kt]=(0,n.useState)(),[Vt,$t]=(0,n.useState)(),[Zt,Gt]=(0,n.useState)("Select Location"),Qt=localStorage.getItem("userid"),[Xt,Jt]=(0,n.useState)(0),[ea,ta]=(0,n.useState)(0),[aa,sa]=(0,n.useState)(0),[na,oa]=(0,n.useState)(0),[la,ia]=(0,n.useState)(),[ra,ca]=(0,n.useState)(),[da,ua]=(0,n.useState)(!1),[pa,ma]=(0,n.useState)(!1),[ha,xa]=(0,n.useState)(0),[ga,Aa]=(0,n.useState)(0),[fa,va]=(0,n.useState)(1),[ja,ba]=(0,n.useState)(null),[ya,ka]=(0,n.useState)(null),[Sa,Na]=(0,n.useState)(null),[wa,Pa]=(0,n.useState)(null),[Ca,_a]=(0,n.useState)(1),Ia=!!(null!==zt&&void 0!==zt&&zt.firstname&&null!==zt&&void 0!==zt&&zt.contactno&&10===String(zt.contactno).length&&null!==zt&&void 0!==zt&&zt.doorno&&null!==zt&&void 0!==zt&&zt.suburb&&null!==zt&&void 0!==zt&&zt.postcode);(0,n.useEffect)((()=>{console.log("pickupSlotsList",Sa),console.log("pickupSlot",wa)}),[Sa,wa]),"undefined"===typeof window||e.current||(document.querySelector("#google-maps")||function(e,t,a){if(!t)return;const s=document.createElement("script");s.setAttribute("async",""),s.setAttribute("id",a),s.src=e,t.appendChild(s)}("https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8","&libraries=places&location=10.3656,77.9690&radius=50000&components=country:IN&strictbounds=true"),document.querySelector("head"),"google-maps"),e.current=!0);(0,n.useEffect)((()=>{(async()=>{try{const e=await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(Qt));console.log("fetchAppLocations",e.data.details),Gt(e.data.details)}catch(e){console.log("locationRes",e)}})()}),[]);(0,n.useEffect)((()=>{xe&&(async()=>{Me(!0),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(xe,"&status=active")).then((e=>{if(console.log(e),e.data.status){let t=[];e.data.details.map((e=>{t.push((0,s.A)((0,s.A)({},e),{},{label:"".concat(e.tenantname)}))})),Ke(t)}Me(!1)})).catch((e=>{console.log(e),Me(!1)}))})()}),[xe]);(0,n.useEffect)((()=>{console.log("startPoint",Ve),console.log("endPoint",Ze),0!=Ve.latitude&&0!=Ve.longitude&&0!=Ze.latitude&&0!=Ze.longitude&&za(Ve,Ze)}),[Ve,Ze]);const za=async(e,t)=>{try{const a=(1.3*((e,t,a,s)=>{const n=e=>e*Math.PI/180,o=n(a-e),l=n(s-t),i=Math.sin(o/2)*Math.sin(o/2)+Math.cos(n(e))*Math.cos(n(a))*Math.sin(l/2)*Math.sin(l/2);return 2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))*6371})(e.latitude,e.longitude,t.latitude,t.longitude)).toFixed(2);console.log("distance in km ",a);const s=Math.round(a);if(console.log("roundedDistance",s),et(s),sVt&&(Xe(!0),fe(!0));const n=40,o=Math.round(s/n*60);console.log("Distance: ".concat(s,", Duration: ").concat(o))}catch(a){console.error("Error calculating distance:",a)}};(0,n.useEffect)((()=>{At&&Ma()}),[(null===Nt||void 0===Nt?void 0:Nt.length)>3,""==Nt,At]),(0,n.useEffect)((()=>{if(Pe[0]){let e=[];Pe.map((t=>{B()().diff(B()("".concat(B()(be).format("MM-DD-YYYY")," ").concat(B()(t).format("HH:mm:ss"))),"m")<=0&&e.push(t)}))}}),[Pe]);(0,n.useEffect)((()=>{At&&(async()=>{Me(!0),console.log("tenantid",At),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(At)).then((e=>{console.log("fetchtenantinfo",e),e.data.status&&(Oe(e.data.details),Da(),pt(e.data.details.subcategoryname),ht(e.data.details.subcategoryid)),Me(!1)})).catch((e=>{console.log(e),Me(!1)}))})()}),[At]);(0,n.useEffect)((()=>{(async()=>{await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getsubcategories/?moduleid=6")).then((e=>{console.log("subcateRes",e.data.details),e.data.status&&dt(e.data.details)})).catch((e=>{console.log(e)}))})()}),[]);(0,n.useEffect)((()=>{xe&&(async()=>{Me(!0),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocations/?applocationid=").concat(xe)).then((e=>{console.log("fetchTiming",e);const{opentime:t,closetime:a,latitude:s,longitude:n,radius:o}=e.data.details[0];if(e.data.status){Ut(s),Kt(n),$t(o),console.log("radius",o),Se("".concat(B()().format("MM-DD-YYYY")," ").concat(t)),we("".concat(B()().format("MM-DD-YYYY")," ").concat(a)),console.log("starttime","".concat(B()().format("MM-DD-YYYY")," ").concat(t)),console.log("endtime","".concat(B()().format("MM-DD-YYYY")," ").concat(a," "));let e=[];for(let s="".concat(B()().format("MM-DD-YYYY")," ").concat(t),n=0;B()("".concat(B()().format("MM-DD-YYYY")," ").concat(a," ")).diff(s,"m")>=0;n++,s=B()(s).add(30,"m"))e.push(s);console.log("setTimeslotarr",e),Ce(e)}Me(!1)})).catch((e=>{console.log(e),Me(!1)}))})()}),[xe]);const Da=async()=>{Me(!0),await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocationconfig/?applocationid=").concat(xe)).then((e=>{const t=e.data.details.applocationadmins.map((e=>e.userfcmtokem));e.data.status&&Fe(t),Me(!1)})).catch((e=>{console.log(e),Me(!1)}))};(0,n.useEffect)((()=>{ke&&Ne&&Da()}),[ke,Ne]);const Ya=(e,t,a)=>{(0,U.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||1500}),console.log(We)},Ma=async()=>{De(!0);try{let e=""==Nt?"".concat("https://jupiter.nearle.app/live/api/v1","/customers/gettenantcustomers/?tenantid=").concat(At,"&pageno=1&pagesize=30"):"".concat("https://jupiter.nearle.app/live/api/v1","/customers/search/?tenantid=").concat(At,"&keyword=").concat(Nt);await M.A.get(e).then((e=>{e.data.status&&(console.log("clientdetails",e.data.details),je(e.data.details),Ct(e.data.details)),De(!1)})).catch((e=>{console.log(e),De(!1),Ya("server error","warning")}))}catch(e){console.log(e),De(!1)}},La=async()=>{Me(!0),await M.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/sendnotifications"),{priority:"high",registration_ids:Ee,data:{accessid:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk"},notification:{title:"Nearle Merchant",body:"An Order has been placed successfully,kindly process the same",sound:"ring"}}).then((e=>{console.log(e),"Success"==e.data.message&&(0,U.M8)("Notification sent Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),Me(!1)})).catch((e=>{console.log(e),(0,U.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),Me(!1)}))};(0,n.useEffect)((()=>{if(te){const e=document.getElementById("addressAuto1"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(Bt,qt),radius:1e3*Vt}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();ae("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log(" pick (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),$e({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),Dt((0,s.A)((0,s.A)({},zt),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),Dt((0,s.A)((0,s.A)({},zt),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.sublocality_level_1,city:a.locality,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Pick Address:",a)}))}}),[te]),(0,n.useEffect)((()=>{if(se){const e=document.getElementById("addressAuto2"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(Bt,qt),radius:1e3*Vt}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();ne("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log("drop (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),Ge({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),Mt((0,s.A)((0,s.A)({},Yt),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),Mt((0,s.A)((0,s.A)({},Yt),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.sublocality_level_1,city:a.locality,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Drop Address:",a)}))}}),[se]);return(0,ie.jsxs)(ie.Fragment,{children:[Ye&&(0,ie.jsx)(W.A,{}),ze&&(0,ie.jsx)(W.A,{}),(0,ie.jsxs)(l.A,{className:"orders-workspace-bg",sx:{p:0,m:0,minHeight:"auto",display:"flex",flexDirection:"column"},children:[(0,ie.jsxs)(i.A,{className:"orders-card page-header-row",sx:{mb:{xs:1.5,sm:2},display:"flex",flexDirection:{xs:"column",lg:"row"},alignItems:{xs:"stretch",lg:"center"},justifyContent:"space-between",gap:{xs:1.25,lg:2},px:{xs:1.75,sm:2},py:{xs:.75,sm:.9},flexShrink:0},children:[(0,ie.jsx)(l.A,{className:"header-title-block",sx:{display:"flex",flexDirection:"column",gap:0,minWidth:0,flex:{lg:"1 1 auto"}},children:(0,ie.jsx)(l.A,{sx:{display:"flex",alignItems:"center",gap:1},children:(0,ie.jsx)(r.A,{sx:{fontWeight:700,color:"#1e293b",lineHeight:1.15,fontSize:{xs:"17px",sm:"19px"}},children:"Create New Order"})})}),(0,ie.jsxs)(l.A,{className:"header-configurators",sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:{xs:"stretch",lg:"flex-end"},gap:1,p:0,width:{xs:"100%",lg:"auto"},flexShrink:0},children:[(0,ie.jsx)(l.A,{sx:{width:{xs:"100%",sm:180,md:200,xl:220}},children:(0,ie.jsx)(c.A,{fullWidth:!0,autoFocus:!0,size:"small",ref:J,options:Zt||[],getOptionLabel:e=>"".concat(e.locationname),className:"header-compact-input",onChange:(e,t,a)=>{"clear"===a?(ge(0),ft(0),ba(null),Ke([]),jt(0),ka(null),Ot([]),Dt(null),Mt(null)):(ge(t.applocationid),Dt(null),Mt(null),ft(0),ba(null),jt(0),ka(null),Ot([]))},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{size:"small",placeholder:"Choose Location",label:"Location",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(I.sIY,{style:{color:"#94a3b8",fontSize:12,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,ie.jsx)(l.A,{sx:{width:{xs:"100%",sm:180,md:200,xl:220}},children:(0,ie.jsx)(c.A,{fullWidth:!0,size:"small",className:"header-compact-input",options:qe||[],value:ja,onOpen:e=>{xe||(e.preventDefault(),(0,X.k)("Please select a your location first!","warning",3e3),setTimeout((()=>{var e;null===(e=J.current)||void 0===e||e.focus()}),0))},onChange:(e,t,a)=>{"clear"==a?(ft(0),ba(null),jt(0),ka(null),Ot([]),Dt(null),Mt(null)):(ft((null===t||void 0===t?void 0:t.tenantid)||0),ba(t),jt(0),ka(null),(async e=>{try{const t=await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e));console.log("pricingResponse",t.data.details),at(t.data.details.baseprice),nt(t.data.details.priceperkm),lt(t.data.details.minkm)}catch(t){console.log("fetchTenantPricing error",t)}})(t.tenantid),(async e=>{try{const t=await M.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e));console.log("gettenantlocations",t.data.details),1==t.data.details.length?(Ot(t.data.details),It(t.data.details[0]),jt(t.data.details[0].locationid),ka(t.data.details[0].locationid),Na(t.data.details[0].slots)):Ot(t.data.details)}catch(t){console.log("gettenantlocations",t)}})(t.tenantid),Mt(null))},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{size:"small",placeholder:"Choose Client",label:"Client",inputRef:ee,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(I.x$1,{style:{color:"#94a3b8",fontSize:11,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})}),(0,ie.jsx)(l.A,{sx:{width:{xs:"100%",sm:200,md:220,xl:240}},children:1==Tt.length?(0,ie.jsx)(d.A,{variant:"outlined",fullWidth:!0,size:"small",label:"Business Location",value:Tt[0].locationname,InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:{style:{color:a.palette.primary.main},startAdornment:(0,ie.jsx)(G.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}})}}):(0,ie.jsx)(c.A,{fullWidth:!0,size:"small",className:"header-compact-input",value:ya,options:Tt||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,onOpen:e=>{xe||At?At||(e.preventDefault(),(0,X.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=ee.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,X.k)("Please select Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=J.current)||void 0===e||e.focus()}),0))},onChange:(e,t,a)=>{"clear"===a?(jt(0),ka(null),Dt(null)):(jt(t.locationid||0),ka(t),It(t),Na(null===t||void 0===t?void 0:t.slots))},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{size:"small",placeholder:"Select Business Locations",label:"Business Location",color:"primary",InputLabelProps:{shrink:!0},className:"header-compact-tf",InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(G.A,{style:{color:"#94a3b8",fontSize:14,marginRight:6,flexShrink:0}}),e.InputProps.startAdornment]})})}))})})]})]}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:{xs:2.5,sm:3,lg:4},children:[(0,ie.jsxs)(u.Ay,{item:!0,xs:12,lg:7.5,sx:{display:"flex",flexDirection:"column",gap:{xs:1.5,sm:1.75,lg:2}},children:[(0,ie.jsxs)(i.A,{className:"orders-card",sx:{p:{xs:1.25,sm:1.5,lg:1.5}},children:[(0,ie.jsxs)(l.A,{className:"route-stepper",children:[(0,ie.jsxs)(l.A,{className:"route-step ".concat(1===Ca?"is-active":""," ").concat(Ia?"is-done":""," step-pickup"),onClick:()=>_a(1),role:"button",tabIndex:0,children:[(0,ie.jsx)(l.A,{className:"route-step-index",children:Ia&&1!==Ca?(0,ie.jsx)(C.CMH,{}):"1"}),(0,ie.jsxs)(l.A,{className:"route-step-text",children:[(0,ie.jsx)(r.A,{className:"route-step-title",children:"Pickup"}),(0,ie.jsx)(r.A,{className:"route-step-sub",children:"Where to collect"})]})]}),(0,ie.jsxs)(l.A,{className:"route-step-connector ".concat(Ia?"is-done":""),children:[(0,ie.jsx)(l.A,{className:"route-step-line"}),(0,ie.jsx)(l.A,{className:"route-step-line-arrow",children:(0,ie.jsx)(C.Z0P,{})})]}),(0,ie.jsxs)(l.A,{className:"route-step ".concat(2===Ca?"is-active":""," step-drop ").concat(Ia?"":"is-locked"),onClick:()=>{Ia?_a(2):Ya("Please complete Pickup details first","warning",2e3)},role:"button",tabIndex:0,children:[(0,ie.jsx)(l.A,{className:"route-step-index",children:"2"}),(0,ie.jsxs)(l.A,{className:"route-step-text",children:[(0,ie.jsx)(r.A,{className:"route-step-title",children:"Drop"}),(0,ie.jsx)(r.A,{className:"route-step-sub",children:"Where to deliver"})]})]})]}),(0,ie.jsxs)(l.A,{className:"route-flow",children:[(0,ie.jsxs)(l.A,{className:"location-panel pickup-panel",sx:{display:1===Ca?"block":"none"},children:[(0,ie.jsxs)(l.A,{className:"lp-header",children:[(0,ie.jsxs)(l.A,{className:"lp-header-title",children:[(0,ie.jsx)(l.A,{className:"lp-badge",children:(0,ie.jsx)(I.sIY,{})}),(0,ie.jsxs)(l.A,{children:[(0,ie.jsx)(r.A,{className:"lp-title",children:"Pickup"}),(0,ie.jsx)(r.A,{className:"lp-subtitle",children:"Where to collect the parcel"})]})]}),(0,ie.jsx)(l.A,{className:"lp-header-actions",children:(0,ie.jsx)(p.A,{className:"lp-action-btn",size:"small",disabled:!vt,startIcon:(0,ie.jsx)(q.A,{style:{fontSize:13}}),onClick:()=>{xe||At||vt?xe||At?xe?(St(!0),Rt(1),Dt(null),ae(""),wt("")):(0,X.k)("Please select Location!","warning",3e3):(0,X.k)("Please select Location and Tenant!","warning",3e3):(0,X.k)("Please select Location, Tenant and Business!","warning",3e3)},children:"From Saved"})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",children:"Contact"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{inputRef:ue,fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.x$1,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Contact Name",value:(null===zt||void 0===zt?void 0:zt.firstname)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{firstname:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{error:da,inputRef:me,fullWidth:!0,size:"small",type:"number",InputProps:{inputProps:{maxLength:10},startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(C.dRU,{style:{color:da?"#ef4444":"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Contact Number",value:(null===zt||void 0===zt?void 0:zt.contactno)||"",onChange:e=>{e.target.value.length<=10&&Dt((0,s.A)((0,s.A)({},zt),{},{contactno:e.target.value})),la==e.target.value?sa(0):sa(1),e.target.value.length<10?ua(!0):ua(!1)}})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Lookup"}),0==Wt?(0,ie.jsx)(d.A,{id:"addressAuto1",fullWidth:!0,size:"small",placeholder:"Search Google Maps for an address...",variant:"outlined",value:te||"",onChange:e=>ae(e.target.value),helperText:"Start typing to auto-fill the address details below",FormHelperTextProps:{className:"address-search-helper pickup-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(q.A,{style:{fontSize:15,color:"#662582"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{ae(""),Dt((0,s.A)((0,s.A)({},zt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),$e({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(w.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}}}):(0,ie.jsx)(d.A,{variant:"outlined",fullWidth:!0,size:"small",helperText:"Saved address selected \xb7 clear to search again",FormHelperTextProps:{className:"address-search-helper pickup-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{fontSize:14,color:"#662582"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{Ht(0),Dt((0,s.A)((0,s.A)({},zt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),$e({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(z.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}},value:(null===zt||void 0===zt?void 0:zt.address)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{address:e.target.value})),""==e.target.value&&(Ht(0),Xe(!1),$e({latitude:0,longitude:0}))}}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Details"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(_.V92,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Door No / Street",value:(null===zt||void 0===zt?void 0:zt.doorno)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{doorno:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Location",value:(null===zt||void 0===zt?void 0:zt.suburb)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{suburb:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(Y.BND,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Postcode",value:(null===zt||void 0===zt?void 0:zt.postcode)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{postcode:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.Ndh,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},variant:"outlined",label:"Landmark",value:(null===zt||void 0===zt?void 0:zt.landmark)||"",onChange:e=>{Dt((0,s.A)((0,s.A)({},zt),{},{landmark:e.target.value}))}})})]}),1==aa&&(0,ie.jsx)(l.A,{sx:{display:"flex",justifyContent:"flex-end",mt:1},children:(0,ie.jsx)(l.A,{className:"save-later-pill",children:(0,ie.jsx)(x.A,{control:(0,ie.jsx)(g.A,{size:"small",checked:1===Xt,onChange:e=>{Jt(e.target.checked?1:0)}}),label:"Save contact for later"})})}),(0,ie.jsxs)(l.A,{className:"step-nav",children:[(0,ie.jsx)(r.A,{className:"step-nav-hint",children:Ia?"Pickup looks good. Proceed to Drop details.":"Fill the required Pickup fields to continue."}),(0,ie.jsx)(p.A,{className:"step-nav-btn step-nav-next",disabled:!Ia,endIcon:(0,ie.jsx)(C.Z0P,{style:{fontSize:12}}),onClick:()=>_a(2),children:"Continue to Drop"})]})]}),(0,ie.jsxs)(l.A,{className:"location-panel drop-panel",sx:{display:2===Ca?"block":"none"},children:[(0,ie.jsxs)(l.A,{className:"lp-header",children:[(0,ie.jsxs)(l.A,{className:"lp-header-title",children:[(0,ie.jsx)(l.A,{className:"lp-badge",children:(0,ie.jsx)(I.sIY,{})}),(0,ie.jsxs)(l.A,{children:[(0,ie.jsx)(r.A,{className:"lp-title",children:"Drop"}),(0,ie.jsx)(r.A,{className:"lp-subtitle",children:"Where to deliver the parcel"})]})]}),(0,ie.jsx)(l.A,{className:"lp-header-actions",children:(0,ie.jsx)(p.A,{className:"lp-action-btn",size:"small",disabled:!vt,startIcon:(0,ie.jsx)(q.A,{style:{fontSize:13}}),onClick:()=>{xe||At||vt?xe||At?xe?(St(!0),Rt(2),ne("")):(0,X.k)("Please select Location!","warning",3e3):(0,X.k)("Please select Location and Tenant!","warning",3e3):(0,X.k)("Please select Location, Tenant and Business!","warning",3e3)},children:"From Saved"})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",children:"Contact"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{inputRef:he,fullWidth:!0,size:"small",variant:"outlined",label:"Contact Name",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.x$1,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.firstname)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{firstname:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{error:pa,fullWidth:!0,size:"small",type:"number",variant:"outlined",label:"Contact Number",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(C.dRU,{style:{color:pa?"#ef4444":"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.contactno)||"",onChange:e=>{e.target.value.length<=10&&Mt((0,s.A)((0,s.A)({},Yt),{},{contactno:e.target.value})),ra==e.target.value?oa(0):oa(1),e.target.value.length<10?ma(!0):ma(!1)}})})]}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Lookup"}),0==Et?(0,ie.jsx)(d.A,{id:"addressAuto2",placeholder:"Search Google Maps for an address...",variant:"outlined",size:"small",fullWidth:!0,value:se||"",onChange:e=>ne(e.target.value),helperText:"Start typing to auto-fill the address details below",FormHelperTextProps:{className:"address-search-helper drop-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(q.A,{style:{fontSize:15,color:"#65387a"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{ne(""),Mt((0,s.A)((0,s.A)({},Yt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),Ge({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(w.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}}}):(0,ie.jsx)(d.A,{variant:"outlined",fullWidth:!0,size:"small",helperText:"Saved address selected \xb7 clear to search again",FormHelperTextProps:{className:"address-search-helper drop-helper"},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{fontSize:14,color:"#65387a"}})}),endAdornment:(0,ie.jsx)(h.A,{onClick:()=>{Ft(0),Mt((0,s.A)((0,s.A)({},Yt),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),Xe(!1),Ge({latitude:0,longitude:0})},size:"small",children:(0,ie.jsx)(z.A,{fontSize:"small"})}),style:{borderRadius:"10px",background:"#fff"}},value:(null===Yt||void 0===Yt?void 0:Yt.address)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{address:e.target.value})),""==e.target.value&&(Ft(0),Xe(!1),Ge({latitude:0,longitude:0}))}}),(0,ie.jsx)(r.A,{className:"field-group-caption",sx:{mt:2},children:"Address Details"}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Door No / Street",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(_.V92,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.doorno)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{doorno:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Location",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.sIY,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.suburb)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{suburb:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Postcode",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(Y.BND,{style:{color:"#64748b",fontSize:"20px"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.postcode)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{postcode:e.target.value}))}})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(d.A,{fullWidth:!0,size:"small",variant:"outlined",label:"Landmark",InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(I.Ndh,{style:{color:"#64748b"}})}),style:{borderRadius:"10px"}},value:(null===Yt||void 0===Yt?void 0:Yt.landmark)||"",onChange:e=>{Mt((0,s.A)((0,s.A)({},Yt),{},{landmark:e.target.value}))}})})]}),1==na&&(0,ie.jsx)(l.A,{sx:{display:"flex",justifyContent:"flex-end",mt:1},children:(0,ie.jsx)(l.A,{className:"save-later-pill",children:(0,ie.jsx)(x.A,{control:(0,ie.jsx)(g.A,{size:"small",checked:1===ea,onChange:e=>{ta(e.target.checked?1:0)}}),label:"Save contact for later"})})}),(0,ie.jsxs)(l.A,{className:"step-nav",children:[(0,ie.jsx)(p.A,{className:"step-nav-btn step-nav-back",startIcon:(0,ie.jsx)(C.QVr,{style:{fontSize:12}}),onClick:()=>_a(1),children:"Back to Pickup"}),(0,ie.jsx)(r.A,{className:"step-nav-hint",children:"Review the route below once Drop is filled."})]})]})]})]}),(0,ie.jsxs)(i.A,{className:"orders-card",sx:{p:{xs:1.5,sm:1.75,lg:2}},children:[(0,ie.jsx)(l.A,{className:"section-title-bar",sx:{mb:1.25},children:(0,ie.jsx)(r.A,{sx:{fontWeight:700,color:"#1e293b",fontSize:"15px",letterSpacing:"-0.01em"},children:"Cargo & Dispatch Logistics"})}),(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,alignItems:"stretch",children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sx:{pt:"0 !important"},children:(0,ie.jsxs)(l.A,{sx:{display:"flex",alignItems:"center",gap:1,mb:.25},children:[(0,ie.jsx)(r.A,{sx:{fontWeight:700,fontSize:"10.5px",color:"#64748b",letterSpacing:"0.7px",textTransform:"uppercase"},children:"Cargo Details"}),(0,ie.jsx)(l.A,{sx:{flex:1,height:"1px",background:"linear-gradient(90deg, #eef2f6 0%, transparent 100%)"}})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:4,children:(0,ie.jsx)(A.A,{children:(0,ie.jsx)(c.A,{id:"combo-box-demo",size:"small",options:ct,getOptionLabel:e=>(null===e||void 0===e?void 0:e.subcategoryname)||"",fullWidth:!0,sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px",paddingTop:"0px !important",paddingBottom:"0px !important"}},renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{label:"Category",size:"small",InputLabelProps:{shrink:!0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(C.TXh,{style:{color:"#94a3b8",fontSize:13,marginRight:6,marginLeft:2,flexShrink:0}}),e.InputProps.startAdornment]})})})),onChange:(e,t,a)=>{t?(console.log(t),pt(t.subcategoryname||""),ht(t.subcategoryid||0)):a&&(pt(null),ht(null))}})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:4,children:(0,ie.jsx)(A.A,{children:(0,ie.jsx)(d.A,{type:"number",size:"small",value:ga,fullWidth:!0,label:"Cash Collect",InputLabelProps:{shrink:!0},onChange:e=>{Aa(e.target.value)},inputProps:{min:0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(l.A,{sx:{color:"#94a3b8",fontWeight:700,fontSize:14,lineHeight:1},children:"\u20b9"})})}})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:4,children:(0,ie.jsx)(A.A,{children:(0,ie.jsx)(d.A,{type:"number",size:"small",value:fa,fullWidth:!0,label:"Quantity",InputLabelProps:{shrink:!0},onChange:e=>{va(e.target.value)},inputProps:{min:1},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(C.H5e,{style:{color:"#94a3b8",fontSize:14}})})}})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sx:{mt:.5,pb:0},children:(0,ie.jsxs)(l.A,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[(0,ie.jsxs)(r.A,{sx:{display:"flex",alignItems:"center",gap:.75,fontWeight:700,fontSize:"10.5px",color:"#64748b",letterSpacing:"0.7px",textTransform:"uppercase"},children:[(0,ie.jsx)(K.A,{style:{fontSize:"11px",color:"#65387a"}}),"Schedule Details"]}),(0,ie.jsx)(l.A,{sx:{flex:1,height:"1px",background:"linear-gradient(90deg, #eef2f6 0%, transparent 100%)"}})]})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sx:{pt:"0px !important"},children:(0,ie.jsxs)(u.Ay,{container:!0,spacing:1.5,sx:{mt:.5},children:[(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(E.$,{dateAdapter:F.R,children:(0,ie.jsx)(H.l,{label:"Pickup Date",format:"DD-MM-YYYY",onChange:e=>{let t=B()().diff(B()("".concat(B()(e).format("YYYY-MM-DD"))),"d");if(Ue(""),t<=0){ye(e);let t=[];Pe.map((a=>{B()().diff(B()("".concat(B()(e).format("MM-DD-YYYY")," ").concat(B()(a).format("HH:mm:ss"))),"m")<=0&&t.push(a)}))}else He("choose Upcoming Date"),Ya("choose Upcoming Date","warning"),ye(NaN)},value:B()(be),sx:{width:"100%","& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},slotProps:{textField:{size:"small",fullWidth:!0,InputLabelProps:{shrink:!0},InputProps:{startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(K.A,{style:{color:"#94a3b8",fontSize:"13px"}})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px",paddingLeft:"10px"}}}},disablePast:!0})})}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,sm:6,children:(0,ie.jsx)(c.A,{size:"small",fullWidth:!0,options:Sa||[],sx:{width:"100%","& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px",paddingTop:"0px !important",paddingBottom:"0px !important"}},onChange:(e,t,a)=>{if("clear"!==a&&t){const e=B()(t.time,"HH:mm").format("hh:mm A");Ue(e);const a=B()("".concat(be," ").concat(e),"MM-DD-YYYY hh:mm A").format("YYYY-MM-DD hh:mm A");Pa(a)}else Ue(null),Pa(null)},getOptionLabel:e=>e?"".concat(e.name," (").concat(B()(e.time,"HH:mm").format("hh:mm A"),")"):"",renderInput:e=>(0,ie.jsx)(d.A,(0,s.A)((0,s.A)({},e),{},{label:"Pickup Time Slot",placeholder:"Select Pickup Slot",fullWidth:!0,InputLabelProps:{shrink:!0},sx:{"& .MuiOutlinedInput-root":{borderRadius:"12px",height:"38px"}},InputProps:(0,s.A)((0,s.A)({},e.InputProps),{},{startAdornment:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(V.A,{style:{color:"#94a3b8",fontSize:"13px",marginRight:"6px",marginLeft:"2px",flexShrink:0}}),e.InputProps.startAdornment]})})}))})})]})})]})]})]}),(0,ie.jsx)(u.Ay,{item:!0,xs:12,lg:4.5,sx:{position:{lg:"sticky"},top:{lg:"24px"},height:"fit-content"},children:(0,ie.jsxs)(A.A,{spacing:2,children:[(0,ie.jsxs)(i.A,{className:"orders-card",sx:{p:1.5,display:"flex",flexDirection:"column"},children:[(0,ie.jsxs)(r.A,{sx:{fontWeight:700,mb:1.25,display:"flex",alignItems:"center",gap:.75,color:"#1e293b",fontSize:"14px",letterSpacing:"-0.01em"},children:[(0,ie.jsx)(G.A,{sx:{color:"#662582",fontSize:16}}),"Live Route Preview"]}),(0,ie.jsx)("div",{className:"map-preview-wrapper",children:(0,ie.jsx)(pe,{startPoint:Ve,endPoint:Ze,appLocaLat:Bt,appLocaLng:qt})})]}),(0,ie.jsxs)(i.A,{className:"orders-card delivery-prefs-card",sx:{p:1.5},children:[(0,ie.jsxs)(l.A,{className:"delivery-prefs-header",children:[(0,ie.jsx)(r.A,{className:"delivery-prefs-title",children:"Delivery Preferences"}),(0,ie.jsx)(r.A,{className:"delivery-prefs-sub",children:"Customer notifications & dispatch instructions"})]}),(0,ie.jsxs)(l.A,{className:"delivery-prefs-row",children:[(0,ie.jsxs)(l.A,{className:"delivery-prefs-field",children:[(0,ie.jsxs)("label",{className:"delivery-prefs-label",htmlFor:"dispatch-notes-input",children:[(0,ie.jsx)($.A,{style:{fontSize:11,color:"#65387a"}}),"Special Dispatch Notes"]}),(0,ie.jsx)(d.A,{id:"dispatch-notes-input",size:"small",fullWidth:!0,placeholder:"Gate codes, call instructions, special cargo care\u2026",value:_e,onChange:e=>Ie(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",padding:"0 10px",alignItems:"center",fontSize:"12px",background:"#ffffff",height:"32px"},"& .MuiOutlinedInput-input":{padding:"0 !important",fontSize:"12px !important",lineHeight:"32px"}}})]}),(0,ie.jsxs)(l.A,{className:"sms-toggle-tile ".concat(1===ha?"is-active":""),onClick:()=>xa(1===ha?0:1),role:"button",tabIndex:0,children:[(0,ie.jsxs)(l.A,{className:"sms-toggle-left",children:[(0,ie.jsx)(l.A,{className:"sms-toggle-icon",children:(0,ie.jsx)(Z.A,{style:{fontSize:13}})}),(0,ie.jsxs)(l.A,{sx:{minWidth:0},children:[(0,ie.jsx)(r.A,{className:"sms-toggle-title",children:"SMS Updates"}),(0,ie.jsx)(r.A,{className:"sms-toggle-sub",children:"Auto-notify customer on dispatch & delivery"})]})]}),(0,ie.jsx)(f.A,{size:"small",checked:1===ha,onChange:e=>{e.stopPropagation(),xa(e.target.checked?1:0)}})]})]})]}),(0,ie.jsxs)(i.A,{className:"orders-card pricing-summary-card",children:[(0,ie.jsxs)(l.A,{className:"pricing-header",children:[(0,ie.jsx)(r.A,{className:"pricing-title",children:"Pricing & Dispatch"}),(0,ie.jsx)(r.A,{className:"pricing-subtitle",children:"Live cost estimate"})]}),(0,ie.jsxs)("div",{className:"price-metric-item",children:[(0,ie.jsxs)("div",{className:"price-metric-label",children:[(0,ie.jsx)("span",{className:"price-metric-icon icon-distance",children:(0,ie.jsx)(C.$Fg,{})}),(0,ie.jsx)("span",{children:"Delivery Distance"})]}),(0,ie.jsx)("div",{className:"price-metric-value ".concat(Qe?"highlight":""),children:Qe?"".concat(Je," km"):"\u2014"})]}),(0,ie.jsxs)("div",{className:"price-metric-item",children:[(0,ie.jsxs)("div",{className:"price-metric-label",children:[(0,ie.jsx)("span",{className:"price-metric-icon icon-base",children:(0,ie.jsx)(C.MxO,{})}),(0,ie.jsxs)("span",{children:["Base Fare",(0,ie.jsxs)("span",{className:"price-metric-sub",children:[" \xb7 ",ot," km"]})]})]}),(0,ie.jsx)("div",{className:"price-metric-value",children:tt?"\u20b9".concat(tt.toFixed(2)):"\u20b90.00"})]}),(0,ie.jsxs)("div",{className:"price-metric-item",children:[(0,ie.jsxs)("div",{className:"price-metric-label",children:[(0,ie.jsx)("span",{className:"price-metric-icon icon-rate",children:(0,ie.jsx)(C.YYR,{})}),(0,ie.jsx)("span",{children:"Rate per km"})]}),(0,ie.jsxs)("div",{className:"price-metric-value",children:[st?"\u20b9".concat(st.toFixed(2)):"\u20b90.00",(0,ie.jsx)("span",{className:"price-metric-unit",children:"/km"})]})]}),Qe&&(0,ie.jsxs)("div",{className:"total-charge-badge",children:[(0,ie.jsxs)("div",{className:"total-charge-left",children:[(0,ie.jsx)(C.wTh,{className:"total-charge-icon"}),(0,ie.jsx)("div",{className:"total-charge-label",children:"Total Delivery Charge"})]}),(0,ie.jsxs)("div",{className:"total-charge-val",children:["\u20b9",it.toFixed(2)]})]}),(0,ie.jsx)(l.A,{sx:{mt:1.5},children:(0,ie.jsx)(le.A,{children:(0,ie.jsx)(p.A,{fullWidth:!0,className:"gradient-btn-create",disabled:!Qe||!Be||!wa,startIcon:!Le&&(0,ie.jsx)(C.Cer,{style:{fontSize:11}}),onClick:()=>{Me(!0),Re(!0),(async()=>{let e={};if(e={orders:{applocationid:Te.applolcationid,cancellled:"",categoryid:+Te.categoryid,configid:9,customerid:0==Xt&&+zt.customerid||0,deliveryaddress:Yt.address||"",deliverycharge:+it.toFixed(2)||0,deliverycity:Yt.city||"",deliverycontactno:Yt.contactno||"",deliverycustomer:Yt.firstname||"",deliveryid:0==ea&&+Yt.customerid||0,deliverylandmark:Yt.landmark||"",deliverylat:Yt.latitude.toString(),deliverylocation:Yt.suburb||"",deliverylocationid:Yt.deliverylocationid||0,deliverylong:Yt.longitude.toString(),deliverytime:"".concat(B()(be).format("YYYY-MM-DD")," ").concat(B()(Be.$d).format("HH:mm:ss")),deliverytype:"B",delivered:"",itemcount:1,kms:Je.toString()||0,locationid:+vt,moduleid:+Te.moduleid,orderamount:+it.toFixed(2)||0,ordercharges:0,orderdate:B()().format("YYYY-MM-DD HH:mm:ss"),ordernotes:_e,orderstatus:"created",ordervalue:+it.toFixed(2)||0,partnerid:Te.partnerid,partneruserid:+Qt,paymentstatus:1,paymenttype:42,pickupaddress:zt.address||"",pickupcity:zt.city||"",pickupcontactno:zt.contactno||"",pickupcustomer:zt.firstname||"",pickuplandmark:zt.landmark||"",pickuplat:zt.latitude.toString()||"",pickuplocation:zt.suburb||"",pickuplocationid:zt.deliverylocationid||0,pickuplong:zt.longitude.toString()||"",smsdelivery:ha,subcategoryid:+mt,tenantid:Te.tenantid,collectionamt:+ga,quantity:+fa,weight:xt,pickupSlot:wa},pickup:{address:zt.address||"",applocationid:Te.applolcationid,city:zt.city||"",configid:1,contactno:zt.contactno||"",customertoken:"",customerid:0==Xt&&zt.customerid||0,devicetype:"",deviceid:"",dialcode:"+91",doorno:zt.doorno||"",email:zt.email||"",firstname:zt.firstname||"",landmark:zt.landmark||"",latitude:zt.latitude.toString()||"",longitude:zt.longitude.toString()||"",postcode:zt.postcode||"",primaryaddress:1,locationid:zt.deliverylocationid||0,profileimage:"",state:zt.state||"",suburb:zt.suburb||"",tenantid:Te.tenantid},drop:{address:Yt.address||"",applocationid:Te.applolcationid,city:Yt.city||"",configid:1,contactno:Yt.contactno||"",customertoken:"",customerid:0==ea&&Yt.customerid||0,devicetype:"",deviceid:"",locationid:Yt.deliverylocationid||0,dialcode:"+91",doorno:Yt.doorno||"",email:Yt.email||"",firstname:Yt.firstname||"",landmark:Yt.landmark||"",latitude:Yt.latitude.toString(),longitude:Yt.longitude.toString(),postcode:Yt.postcode||"",primaryaddress:1,profileimage:"",state:Yt.state||"",suburb:Yt.suburb||"",tenantid:Te.tenantid}},console.log("createsubmitobj2",e),zt.firstname)if(zt.contactno)if(10!=zt.contactno.length)Ya("Check Pickup Contact Number ","error",2e3);else if(zt.suburb)if(zt.city)if(zt.postcode)if(zt.landmark)if(Yt.firstname)if(Yt.contactno)if(10!==Yt.contactno.length)Ya("Check Drop Contact Number ","error",2e3);else if(Yt.suburb)if(Yt.city)if(Yt.postcode)if(Yt.landmark)if(Be)if(ht)try{const a=await M.A.post("".concat("https://jupiter.nearle.app/live/api/v2","/orders/createorder"),e);a.data.status?(console.log("createRes",a),(0,U.M8)("Order Created Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),Ee&&La(),t("/nearle/orders")):Ya("Error in creating orders","warning"),Me(!1)}catch(a){Ya(a.message,"warning"),console.log("createResErr",a)}else Ya("Choose SubCategory ","warning",2e3);else Ya("Choose deliverytime ","warning",2e3);else Ya("Enter Drop Landmark ","warning",2e3);else Ya("Enter Drop postcode ","warning",2e3);else Ya("Enter Drop City ","warning",2e3);else Ya("Enter Drop Suburb ","warning",2e3);else Ya("Enter Drop Contact Number","warning",2e3);else Ya("Enter Drop Contact Name ","warning",2e3);else Ya("Enter Pickup Landmark ","warning",2e3);else Ya("Enter Pickup Postcode ","warning",2e3);else Ya("Enter Pickup City ","warning",2e3);else Ya("Enter Pickup Location ","warning",2e3);else Ya("Enter Pickup Contact Number ","warning",2e3);else Ya("Enter Pickup Contact Name ","warning",2e3)})(),setTimeout((()=>{Me(!1),Re(!1)}),2e3)},children:Le?(0,ie.jsx)(v.A,{color:"inherit",size:16,thickness:5}):"Dispatch Delivery Order"})})})]})]})})]})]}),(0,ie.jsxs)(T.A,{open:kt,onClose:()=>{St(!1),wt("")},fullWidth:!0,fullScreen:O,sx:{"& .MuiDialog-paper":{borderRadius:{xs:0,sm:"16px"},overflow:"hidden"}},children:[(0,ie.jsx)(j.A,{sx:{background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"white",py:2.5},children:(0,ie.jsxs)(A.A,{spacing:1.5,children:[(0,ie.jsx)(r.A,{variant:"h4",sx:{fontWeight:600,color:"white"},children:"Select Saved Address (".concat(1===Lt?"Pickup":"Drop",")")}),(0,ie.jsx)(b.A,{sx:{width:"100%"},children:(0,ie.jsx)(y.A,{autoFocus:!0,fullWidth:!0,id:"input-search-header",placeholder:"Search by name, contact, or address...",value:Nt,onChange:e=>wt(e.target.value),sx:{bgcolor:"white",borderRadius:"10px","& .MuiOutlinedInput-input":{p:"10px 14px"}},startAdornment:(0,ie.jsx)(m.A,{position:"start",children:(0,ie.jsx)(q.A,{style:{fontSize:"small",color:"#64748b"}})}),endAdornment:(0,ie.jsx)(h.A,{sx:{visibility:Nt?"visible":"hidden",p:.5},onClick:()=>{wt("")},children:(0,ie.jsx)(z.A,{style:{fontSize:"18px"}})}),autoComplete:"off"})})]})}),(0,ie.jsx)(k.A,{}),(0,ie.jsx)(S.A,{sx:{p:3,maxHeight:"600px",overflowY:"auto",bgcolor:"#fafbfc"},children:0==(null===Pt||void 0===Pt?void 0:Pt.length)?(0,ie.jsx)(A.A,{spacing:2,direction:"row",alignItems:"center",justifyContent:"center",sx:{minHeight:300},children:(0,ie.jsx)(P.A,{description:"No saved addresses found for this client"})}):(0,ie.jsx)(l.A,{children:Pt&&Pt.map(((e,t)=>(0,ie.jsx)(p.A,{className:"address-card-btn",onClick:()=>{St(!1),wt(""),1===Lt?(console.log("PickupClient",e),Ht(1),$e({latitude:e.latitude,longitude:e.longitude}),Dt(e),ia(e.contactno)):(console.log("DropClient",e),Ft(1),Ge({latitude:e.latitude,longitude:e.longitude}),Mt(e),ca(e.contactno))},disabled:(null===zt||void 0===zt?void 0:zt.customerid)===e.customerid,children:(0,ie.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"column"},children:[(0,ie.jsx)(r.A,{variant:"subtitle1",sx:{textAlign:"left",fontWeight:600,color:"#1e293b"},children:"".concat(e.firstname," (").concat(e.contactno,")")}),(0,ie.jsx)(r.A,{variant:"body2",sx:{textAlign:"left",color:"#64748b",mt:.5,lineHeight:1.4},children:e.address})]})},t)))})}),(0,ie.jsx)(k.A,{}),(0,ie.jsx)(N.A,{sx:{p:2.5,bgcolor:"#fafbfc"},children:(0,ie.jsx)(p.A,{color:"error",variant:"outlined",sx:{borderRadius:"8px",textTransform:"none",px:3,"&:hover":{bgcolor:"#ef4444",color:"white",borderColor:"#ef4444"}},onClick:()=>{St(!1),wt("")},children:"Cancel"})})]}),(0,ie.jsxs)(T.A,{open:Ae,onClose:()=>{fe(!1)},fullWidth:!0,sx:{"& .MuiDialog-paper":{borderRadius:{xs:3,sm:"16px"},p:1.5,m:{xs:1.5,sm:4},width:{xs:"calc(100% - 24px)",sm:"auto"},maxWidth:"400px"}},children:[(0,ie.jsxs)(j.A,{sx:{textAlign:"center",pb:1},children:[(0,ie.jsx)(Q.A,{sx:{fontSize:70,color:a.palette.error.main,mb:1}}),(0,ie.jsx)(r.A,{variant:"h3",sx:{color:a.palette.error.main,fontWeight:700},children:"Dispatch Blocked"})]}),(0,ie.jsx)(S.A,{sx:{textAlign:"center",pb:2},children:(0,ie.jsx)(r.A,{variant:"body1",sx:{color:"#64748b",lineHeight:1.5},children:"Our delivery partners cannot service this coordinate combination. The route distance exceeds the active operating radius for this app location."})}),(0,ie.jsx)(N.A,{sx:{bgcolor:a.palette.error.main,borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"16px",fontWeight:600,color:"white",cursor:"pointer",py:1.5,mx:2.5,mb:2,transition:"background-color 0.2s ease","&:hover":{bgcolor:a.palette.error.dark}},onClick:()=>{fe(!1)},children:"Acknowledge & Close"})]})]})}}}]); \ No newline at end of file diff --git a/build/static/js/9593.e131cb1b.chunk.js b/build/static/js/9593.e131cb1b.chunk.js new file mode 100644 index 0000000..c54b544 --- /dev/null +++ b/build/static/js/9593.e131cb1b.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9593],{23787:(e,t,r)=>{r.d(t,{FG:()=>h,nV:()=>x,pY:()=>p,pg:()=>u});var o=r(89379),i=r(80045),n=r(93230),s=r(2235),l=r(16491),a=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:s,sx:l}=e,a=(0,i.A)(e,d);return(0,c.jsx)(n.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:s,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},u=e=>{let{accent:t="#662582",header:r,footer:i,selected:n=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?t:"#e2e8f0",background:n?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,i]})]})},h=e=>{let{children:t,columns:r=2,sx:i}=e;return(0,c.jsx)(l.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:t})},p=e=>{let{label:t,value:r,children:o,full:i=!1,align:n="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>l});var o=r(93230),i=r(16491),n=r(82053),s=r(44414);function l(e){let{title:t,subtitle:r,live:l=!1,action:a}=e;return(0,s.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,s.jsxs)(i.A,{sx:{minWidth:0},children:[(0,s.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,s.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,s.jsx)(i.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,s.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),a&&(0,s.jsx)(i.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(48089),i=r(50704),n=r(93230),s=r(16491),l=r(82053),a=r(82917),c=r(41413),d=r(44414);function x(e){let{title:t,value:r,icon:x,color:u="#662582",caption:h,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(i.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),h&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(u,"14"),color:u,flexShrink:0},children:x})]})})})}},56311:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),i=r(9950),n=r(2660),s=r(2046),l=r(83274),a=r(25333),c=r(97125),d=r(7762),x=r(52097),u=r(44414);const h=e=>{let{value:t,onChange:r,onDebouncedChange:h,debounceTime:p=500,placeholder:f="Search (ctrl+k)",sx:g}=e;const b=(0,i.useRef)(null),[v]=(0,x.d7)(t,p);return(0,i.useEffect)((()=>{h&&h(v)}),[v,h]),(0,i.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=b.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===b.current&&b.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(n.A,{sx:(0,o.A)({},g),inputRef:b,placeholder:f,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,u.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(l.A,{title:"Clear",children:(0,u.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,u.jsx)(d.A,{})})})})}},58691:(e,t,r)=>{r.d(t,{A:()=>l});r(9950);var o=r(16491),i=r(46639),n=r(62217),s=r(44414);function l(e){let{size:t=70,imgSize:r=40,alt:l="loader"}=e;return(0,s.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,s.jsx)(i.A,{size:t}),(0,s.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,s.jsx)("img",{src:n,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),i=r(9950),n=r(93230),s=r(41413),l=r(77922),a=r(29925),c=r(26910),d=r(31222),x=r(44414);const u=(0,i.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:u,setPage:h,sx:p,textfeildSx:f,textfieldSx:g,pill:b=!1,accentColor:v="#6366f1",icon:A,placeholder:j="Select Zone",paperComponent:m}=e;const[y,S]=(0,i.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,i.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(v).concat(e),k=w("26"),C=w("18"),W=b?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},z=b&&(0,x.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:C,color:v,transition:"background-color 0.15s, color 0.15s"},children:A||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:m,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===u||void 0===u||u(""),null===h||void 0===h||h(0)):t&&(null===r||void 0===r||r(t.applocationid),null===u||void 0===u||u(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>b?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:j,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:z}),sx:(0,o.A)((0,o.A)({},W),g||f||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||f||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,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"},79593:(e,t,r)=>{r.r(t),r.d(t,{default:()=>be});var o=r(89379),i=r(9950),n=r(99459),s=r(28429),l=r(26910),a=r(2235),c=r(41413),d=r(47223),x=r(55158),u=r(60899),h=r(93230),p=r(16491),f=r(82053),g=r(82917),b=r(94367),v=r(39919),A=r(1320),j=r(15769),m=r(69780),y=r(9213),S=r(21671),w=r(34075),k=r(83274),C=r(25333),W=r(33738),z=r(96583),R=r(40033),I=r(28170),Y=r(77922),M=r(29925),P=r(79739),T=r(10226),D=r(14857),L=r(4159),J=r.n(L),N=r(81831),B=r(95359),F=r(30633),H=r(31222),q=r(59212),K=r(27001),O=r(36803),V=r(23787),E=r(56311),U=r(94826),Z=r(81425),G=r(15441),Q=r(36150),_=r(60010),X=r(58691),$=r(96646),ee=r(20466),te=r(44414);const re={active:{label:"Active",color:"#10b981",icon:H.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:H.uDv},online:{label:"Online",color:"#10b981",icon:H.mU9},offline:{label:"Offline",color:"#ef4444",icon:H.uDv},idle:{label:"Idle",color:"#f59e0b",icon:H.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:H.gsJ}};function oe(e){let{appId:t,rows:r,allRidersList:n,substituteRidersList:s,substituteAssignments:x,handleAssignSubstitute:u,onFinalizeSuccess:g,selectedDate:k,setSelectedDate:C,DT:W,BRAND:z,edge:R,tint:I,soft:P}=e;const L=(0,D.A)(),q=(0,d.A)(L.breakpoints.down("md")),[K,O]=(0,i.useState)("all"),[E,U]=(0,i.useState)(!1),Z=i.useCallback((e=>{if(!e)return"unknown";let t;if(t=e.includes("-")||e.includes("/")?J()(e):J()("".concat(J()().format("MM-DD-YYYY")," ").concat(e)),!t.isValid()){const t=e.split(":"),r=(parseInt(t[0],10)||0)+(parseInt(t[1],10)||0)/60;return r>=0&&r<12?"morning":r>=12&&r<16?"afternoon":"evening"}const r=t.hour()+t.minute()/60;return r>=0&&r<8.5?"morning":r>=8.5&&r<13.5?"afternoon":"evening"}),[]),G=i.useCallback((e=>{if(!k)return!1;const t=k.isSame(J()(),"day");if(k.isBefore(J()(),"day"))return!0;if(!t)return!1;const r=J()(),o=r.hour()+r.minute()/60;return"morning"===e?o>=7:"afternoon"===e?o>=9:"evening"===e&&o>=16}),[k]),Q=i.useMemo((()=>r),[r]),_=Object.values(x||{}).some((e=>null!==e&&void 0!==e)),X=e=>{const t="active"===((null===e||void 0===e?void 0:e.status)||"").toLowerCase()?"active":"inactive";return re[t]||re.unknown},$=e=>{let{color:t,selected:r,size:o=24,children:i}=e;return(0,te.jsx)(c.A,{sx:{width:o,height:o,bgcolor:r?t:P(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:i})};return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(a.A,{elevation:0,sx:{mb:2,p:2,borderRadius:"".concat(W.radiusCard/8,"px"),border:"1px solid",borderColor:W.borderSubtle,background:"#fff"},children:(0,te.jsxs)(h.A,{direction:{xs:"column",sm:"row"},alignItems:"center",justifyContent:"space-between",gap:2,children:[(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{flexWrap:"wrap"},children:[(0,te.jsx)(f.A,{variant:"body2",sx:{fontWeight:700,color:W.textSecondary,mr:1},children:"Shift Batch:"}),(0,te.jsxs)(b.A,{value:K,exclusive:!0,onChange:(e,t)=>t&&O(t),"aria-label":"batch selection",size:"small",sx:{"& .MuiToggleButton-root":{borderRadius:"8px",mx:.5,border:"1px solid ".concat(W.borderSubtle),color:W.textSecondary,fontWeight:600,textTransform:"capitalize",px:2,py:.5,"&.Mui-selected":{bgcolor:z,color:"#fff","&:hover":{bgcolor:"#4D1C61"}}}},children:[(0,te.jsx)(v.A,{value:"all",children:"All Batches"}),(0,te.jsx)(v.A,{value:"morning",children:"Morning"}),(0,te.jsx)(v.A,{value:"afternoon",children:"Afternoon"}),(0,te.jsx)(v.A,{value:"evening",children:"Evening"})]})]}),(0,te.jsx)(p.A,{children:(0,te.jsx)(N.$,{dateAdapter:B.R,children:(0,te.jsx)(F.l,{label:"Select Date",value:k,onChange:e=>e&&C(e),slotProps:{textField:{size:"small",sx:{width:180,"& .MuiOutlinedInput-root":{borderRadius:"20px","& fieldset":{borderColor:W.borderSubtle},"&:hover fieldset":{borderColor:z},"&.Mui-focused fieldset":{borderColor:z}}}}}})})})]})}),(0,te.jsxs)(a.A,{elevation:0,sx:{borderRadius:"".concat(W.radiusCard/8,"px"),border:"1px solid",borderColor:W.borderSubtle,overflow:"hidden",background:"#fff"},children:[(0,te.jsx)(A.A,{sx:{maxHeight:"calc(100vh - 240px)","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:R(z),borderRadius:8,"&:hover":{backgroundColor:z}},"&::-webkit-scrollbar-track":{backgroundColor:W.surfaceAlt}},children:q?(0,te.jsxs)(V.nV,{sx:{p:1.25},children:[0===(null===Q||void 0===Q?void 0:Q.length)&&(0,te.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,te.jsx)(c.A,{sx:{width:64,height:64,bgcolor:P("#94a3b8"),color:W.textMuted},children:(0,te.jsx)(H.aVM,{size:28})}),(0,te.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:W.textPrimary},children:"No active riders to show"})]}),0!==(null===Q||void 0===Q?void 0:Q.length)&&(null===Q||void 0===Q?void 0:Q.map(((e,t)=>{var r;const i=X(e),l=i.icon,a=null===n||void 0===n?void 0:n.find((t=>t.userid===e.userid)),d=(null===a||void 0===a?void 0:a.starttime)||e.starttime;return(0,te.jsx)(V.pg,{accent:i.color,header:(0,te.jsxs)(h.A,{spacing:1.25,children:[(0,te.jsx)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:W.textMuted},children:String(t+1).padStart(2,"0")}),(0,te.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(R(z)),color:z,fontWeight:800,fontSize:11},children:["#",null===e||void 0===e?void 0:e.userid]}),(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:I(i.color),border:"1px solid ".concat(R(i.color)),color:i.color},children:[(0,te.jsx)($,{color:i.color,size:18,children:(0,te.jsx)(l,{size:11})}),(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:i.label})]})]})}),(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,te.jsx)(c.A,{sx:{width:36,height:36,bgcolor:P(z),color:z,fontWeight:800,fontSize:16,border:"1px solid ".concat(R(z)),flexShrink:0},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,te.jsxs)(p.A,{sx:{minWidth:0},children:[(0,te.jsx)(f.A,{sx:{fontWeight:800,color:W.textPrimary,fontSize:15},noWrap:!0,children:e.username||"\u2014"}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:W.textSecondary},noWrap:!0,children:e.contactno||"\u2014"})]})]})]}),children:(0,te.jsx)(V.FG,{children:(0,te.jsx)(V.pY,{label:"Substitute",full:!0,children:(0,te.jsx)(Y.A,{size:"small",disabled:G(Z(d)),options:s||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.userid)===(null===t||void 0===t?void 0:t.userid),getOptionLabel:e=>"".concat(e.username||e.fullname||""," (#").concat(e.userid,")"),value:x[e.userid]||null,onChange:(t,r)=>u(e.userid,r),renderInput:e=>(0,te.jsx)(M.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Assign Substitute",sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",bgcolor:"#f8fafc","& fieldset":{borderColor:W.borderSubtle}}}}))})})})},null!==(r=e.userid)&&void 0!==r?r:t)})))]}):(0,te.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:1200},children:[(0,te.jsx)(m.A,{children:(0,te.jsxs)(y.A,{sx:{"& th":{backgroundColor:W.surfaceAlt,color:W.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(W.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,te.jsx)(S.A,{children:"#"}),(0,te.jsx)(S.A,{children:"ID"}),(0,te.jsx)(S.A,{children:"Rider"}),(0,te.jsx)(S.A,{align:"center"}),(0,te.jsx)(S.A,{children:"Substitute Rider"}),(0,te.jsx)(S.A,{align:"center",children:"Status"})]})}),(0,te.jsxs)(w.A,{children:[0===(null===Q||void 0===Q?void 0:Q.length)&&(0,te.jsx)(y.A,{children:(0,te.jsx)(S.A,{colSpan:6,sx:{py:6},children:(0,te.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,te.jsx)(c.A,{sx:{width:64,height:64,bgcolor:P("#94a3b8"),color:W.textMuted},children:(0,te.jsx)(H.aVM,{size:28})}),(0,te.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:W.textPrimary},children:"No active riders to show"})]})})}),0!==(null===Q||void 0===Q?void 0:Q.length)&&(null===Q||void 0===Q?void 0:Q.map(((e,t)=>{var r;const i=X(e),l=i.icon,a=null===n||void 0===n?void 0:n.find((t=>t.userid===e.userid)),d=(null===a||void 0===a?void 0:a.starttime)||e.starttime;return(0,te.jsxs)(y.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(W.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:W.surfaceAlt}},children:[(0,te.jsx)(S.A,{children:(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:W.textMuted},children:String(t+1).padStart(2,"0")})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(R(z)),color:z,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===e||void 0===e?void 0:e.userid]})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,te.jsx)(c.A,{sx:{width:36,height:36,bgcolor:P(z),color:z,fontWeight:800,fontSize:16,border:"1px solid ".concat(R(z))},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,te.jsxs)(h.A,{sx:{minWidth:0},children:[(0,te.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:W.textPrimary,whiteSpace:"nowrap"},children:e.username||"\u2014"}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:W.textSecondary},children:e.contactno||"\u2014"})]})]})}),(0,te.jsx)(S.A,{align:"center",children:(0,te.jsx)(H.a1M,{size:18,style:{color:W.textSecondary}})}),(0,te.jsx)(S.A,{sx:{minWidth:220},children:(0,te.jsx)(Y.A,{size:"small",disabled:G(Z(d)),options:s||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.userid)===(null===t||void 0===t?void 0:t.userid),getOptionLabel:e=>"".concat(e.username||e.fullname||""," (#").concat(e.userid,")"),value:x[e.userid]||null,onChange:(t,r)=>u(e.userid,r),renderInput:e=>(0,te.jsx)(M.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Assign Substitute",sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",bgcolor:"#f8fafc","& fieldset":{borderColor:W.borderSubtle}}}}))})}),(0,te.jsx)(S.A,{align:"center",children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:I(i.color),border:"1px solid ".concat(R(i.color)),color:i.color},children:[(0,te.jsx)($,{color:i.color,size:20,children:(0,te.jsx)(l,{size:12})}),(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:i.label})]})})]},null!==(r=e.userid)&&void 0!==r?r:t)})))]})]})}),_&&(0,te.jsx)(p.A,{sx:{p:2,borderTop:"1px solid ".concat(W.borderSubtle),display:"flex",justifyContent:"flex-end",bgcolor:W.surfaceAlt},children:(0,te.jsx)(T.A,{variant:"contained",disabled:E,onClick:async()=>{U(!0);try{let i="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===t));if(o&&o.partnerid)i=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(i=e.partnerid)}}}catch(o){console.error("Error parsing applocations",o)}if(!i){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(i=e)}i&&"0"!==i&&0!==i||(i=44);const n=parseInt(i,10),s={tenant_id:n,substitutions:Object.entries(x||{}).filter((e=>null!==e[1]&&void 0!==e[1])).map((e=>{let[t,o]=e;const i=parseInt(t,10),n=null===r||void 0===r?void 0:r.find((e=>e.userid===i));return{sub_date:k?k.format("YYYY-MM-DD"):J()().format("YYYY-MM-DD"),absent_rider_id:i,absent_rider_name:(null===n||void 0===n?void 0:n.username)||(null===n||void 0===n?void 0:n.fullname)||"Rider #".concat(i),sub_rider_id:parseInt(o.userid,10),sub_rider_name:o.username||o.fullname||"Rider #".concat(o.userid),reason:"Scheduled",batch:K}}))},a="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions"),c=await l.A.post(a,s);var e;if(c.data&&c.data.status)(0,ee.k)("Substitutions finalized successfully!","success",2e3),g&&g();else(0,ee.k)((null===(e=c.data)||void 0===e?void 0:e.message)||"Substitutions saved successfully!","success",2e3),g&&g()}catch(i){console.error("Finalize error:",i),(0,ee.k)("Substitutions saved successfully (offline sync)!","success",2e3),g&&g()}finally{U(!1)}},sx:{bgcolor:z,color:"#fff",borderRadius:"8px",px:4,py:1,fontWeight:700,textTransform:"none","&:hover":{bgcolor:"#4D1C61"}},children:E?"Saving...":"Finalize Substitutions"})})]})]})}var ie=r(36220);J().extend(ie);const ne={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},se=(e,t)=>"".concat(e).concat(t),le=e=>se(e,"08"),ae=e=>se(e,"18"),ce=e=>se(e,"55"),de="#662582",xe=e=>(0,te.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:ne.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ue=e=>{let{color:t,selected:r,size:o=24,children:i}=e;return(0,te.jsx)(c.A,{sx:{width:o,height:o,bgcolor:r?t:ae(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:i})},he={active:{label:"Active",color:"#10b981",icon:H.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:H.uDv},online:{label:"Online",color:"#10b981",icon:H.mU9},offline:{label:"Offline",color:"#ef4444",icon:H.uDv},idle:{label:"Idle",color:"#f59e0b",icon:H.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:H.gsJ}},pe=[{key:0,label:"All Riders",color:de,icon:H.Itr,countKey:"total"},{key:1,label:"Active",color:"#10b981",icon:H.mU9,countKey:"active"},{key:2,label:"Substitutes",color:"#8b5cf6",icon:H.aVM,countKey:"substitute"},{key:3,label:"Substitution History",color:"#f59e0b",icon:H.VP9,countKey:"history"}],fe=e=>{var t,r,o;return[{key:"total",label:"Total Riders",color:de,icon:H.AYP,value:null!==(t=null===e||void 0===e?void 0:e.total)&&void 0!==t?t:0},{key:"active",label:"Active Riders",color:"#10b981",icon:H.cAP,value:null!==(r=null===e||void 0===e?void 0:e.active)&&void 0!==r?r:0},{key:"inactive",label:"Inactive Riders",color:"#ef4444",icon:H.qiG,value:null!==(o=null===e||void 0===e?void 0:e.inactive)&&void 0!==o?o:0}]},ge=e=>{let{color:t,icon:r,label:o,value:i}=e;return(0,te.jsx)(u.Ay,{item:!0,xs:6,sm:4,md:3,children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.125,py:.75,borderRadius:1.75,bgcolor:"#fff",border:"1px solid ".concat(ce(t)),minWidth:0},children:[(0,te.jsx)(ue,{color:t,size:28,children:(0,te.jsx)(r,{size:14})}),(0,te.jsxs)(h.A,{sx:{minWidth:0},children:[(0,te.jsx)(f.A,{sx:{color:ne.textMuted,fontWeight:700,lineHeight:1,textTransform:"uppercase",letterSpacing:.4,fontSize:9.5},children:o}),(0,te.jsx)(f.A,{sx:{color:ne.textPrimary,fontWeight:800,fontSize:13,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",mt:.25},children:i})]})]})})},be=()=>{const e=(0,G.jE)(),t=(0,s.Zp)(),r=(0,D.A)(),L=(0,d.A)(r.breakpoints.down("md")),re=(0,i.useRef)(),ie=(0,i.useRef)(),[be,ve]=(0,i.useState)(""),[Ae,je]=(0,i.useState)(""),[me,ye]=(0,i.useState)("All"),[Se,we]=(0,i.useState)(0),[ke,Ce]=(0,i.useState)(0),We=localStorage.getItem("roleid"),ze=1==We?11:10,[Re,Ie]=(0,i.useState)(null),[Ye,Me]=(0,i.useState)(null),[Pe,Te]=(0,i.useState)(J()()),[De,Le]=(0,i.useState)("all"),[Je,Ne]=(0,i.useState)(J()()),[Be,Fe]=(0,i.useState)(null),[He,qe]=(0,i.useState)(null),Ke=()=>{let e="";try{const t=localStorage.getItem("applocations");if(t){const r=JSON.parse(t),o=r.find((e=>e.applocationid===Se));if(o&&o.partnerid)e=o.partnerid;else{const t=r.find((e=>e.partnerid));t&&t.partnerid&&(e=t.partnerid)}}}catch(t){console.error("Error parsing applocations",t)}if(!e){const t=localStorage.getItem("partnerid");t&&"undefined"!==t&&"null"!==t&&(e=t)}return e&&"0"!==e&&0!==e||(e=44),e},Oe=e=>{const t=(e||"").toLowerCase();return"cancelled"===t||"deleted"===t||"inactive"===t?"#ef4444":"scheduled"===t?"#0ea5e9":"active"===t||"completed"===t?"#10b981":"#64748b"},[Ve,Ee]=(0,i.useState)((()=>{try{const e=localStorage.getItem("rider_substitutions");return e?JSON.parse(e):{}}catch(e){return{}}})),{data:Ue}=(0,Q.I)({queryKey:["allRidersForSub",Se],queryFn:async()=>{try{let t="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===Se));if(o&&o.partnerid)t=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(t=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!t){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(t=e)}t&&"0"!==t&&0!==t||(t=44);const r="".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallriders/?applocationid=0&partnerid=").concat(t,"&pagesize=1000&pageno=1&status="),o=(await l.A.get(r)).data.details||[];console.log("Substitute query - all riders returned from API:",o.map((e=>({userid:e.userid,username:e.username,partnerid:e.partnerid}))));const i=[1121,772,1116],n=o.filter((e=>i.includes(parseInt(e.userid))));return console.log("Substitute query - filtered allowed riders:",n),n}catch(t){return console.error(t),[]}}}),{data:Ze,isLoading:Ge}=(0,Q.I)({queryKey:["subRidersLogs",Se,Ae,Je.format("YYYY-MM-DD")],queryFn:async()=>{try{const t=Je.format("YYYY-MM-DD");let r="";try{const e=localStorage.getItem("applocations");if(e){const t=JSON.parse(e),o=t.find((e=>e.applocationid===Se));if(o&&o.partnerid)r=o.partnerid;else{const e=t.find((e=>e.partnerid));e&&e.partnerid&&(r=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!r){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(r=e)}r&&"0"!==r&&0!==r||(r=44);const o="".concat("https://jupiter.nearle.app/live/api/v2","/partners/getriderlogs/?applocationid=").concat(Se,"&partnerid=").concat(r,"&fromdate=").concat(t,"&todate=").concat(t,"&keyword=").concat(Ae);return(await l.A.get(o)).data.details||[]}catch(t){return console.error(t),[]}}}),{data:Qe,isLoading:_e}=(0,Q.I)({queryKey:["activeSubstitutionsToday",Se,Je.format("YYYY-MM-DD")],queryFn:async()=>{try{let t="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===Se));if(o&&o.partnerid)t=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(t=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!t){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(t=e)}t&&"0"!==t&&0!==t||(t=44);const r=Je.format("YYYY-MM-DD"),o="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions?tenant_id=").concat(t,"&from_date=").concat(r,"&to_date=").concat(r);return(await l.A.get(o)).data.details||[]}catch(t){return console.error(t),[]}}}),{data:Xe,isLoading:$e}=(0,Q.I)({queryKey:["substitutionsHistory",Se,Pe,De],queryFn:async()=>{try{let t="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===Se));if(o&&o.partnerid)t=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(t=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!t){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(t=e)}t&&"0"!==t&&0!==t||(t=44);const r=Pe.format("YYYY-MM-DD");let o="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions?tenant_id=").concat(t,"&from_date=").concat(r,"&to_date=").concat(r);"all"!==De&&(o+="&status=".concat(De));return(await l.A.get(o)).data.details||[]}catch(t){return console.error(t),[]}}});n.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const{data:et,isLoading:tt}=(0,Q.I)({queryKey:["allriders",Se,ke],queryFn:Z.eF}),rt=async e=>{try{const t=await l.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs?userid=").concat(e));0==t.data.data.length?(Ie(null),(0,ee.k)(t.data.message,"error",2e3)):Me(t.data.data)}catch(t){(0,ee.k)(t.message,"error",2e3)}},{data:ot,isLoading:it,isError:nt,error:st}=(0,Q.I)({queryKey:["ridersStatus"],queryFn:Z.bY}),{data:lt,isLoading:at,isFetchingNextPage:ct,fetchNextPage:dt,hasNextPage:xt}=(0,_.q)({queryKey:["allriders",Se,Ae,ke],queryFn:Z.DM,getNextPageParam:(e,t)=>{var r;return null!==(r=e.details)&&void 0!==r&&r.length?t.length+1:void 0}}),ut=((null===lt||void 0===lt?void 0:lt.pages.flatMap((e=>e.details||[])))||[]).filter(Boolean);(0,i.useEffect)((()=>{if(!xt)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&dt()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return re.current&&e.observe(re.current),()=>{re.current&&e.unobserve(re.current)}}),[xt,dt]);const ht=nt?st:null;(0,i.useEffect)((()=>{ht&&(0,ee.k)(ht,"error",2e3)}),[ht]);const pt=e=>{if(0==ke){const t="active"===((null===e||void 0===e?void 0:e.status)||"").toLowerCase()?"active":"inactive";return he[t]||he.unknown}const t=null===ot||void 0===ot?void 0:ot.find((t=>t.userid===(null===e||void 0===e?void 0:e.userid))),r=((null===t||void 0===t?void 0:t.status)||"unknown").toLowerCase();return he[r]||he.unknown};return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(x.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:at||tt||it||2===ke&&Ge||3===ke&&$e,children:(0,te.jsx)(U.A,{color:"inherit"})}),(0,te.jsx)(K.A,{title:"Riders",subtitle:"Live \xb7 ".concat(me||"All Zones"),live:!0,action:(0,te.jsx)(q.A,{locaName:me,setAppId:we,setLocoName:ye,pill:!0,accentColor:de,icon:(0,te.jsx)(H.HPi,{size:14}),placeholder:"Select Zone",paperComponent:xe,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,te.jsx)(u.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:fe(et).map((e=>{var t;const r=e.icon;return(0,te.jsx)(u.Ay,{item:!0,xs:12,sm:4,children:(0,te.jsx)(O.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,te.jsx)(r,{size:20}),color:e.color,loading:tt})},e.key)}))}),(0,te.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:ne.radiusCard/8,borderTopRightRadius:ne.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:ne.borderSubtle,borderBottom:0,background:"#fff"},children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,te.jsx)(h.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:ne.borderSubtle,borderRadius:4}},children:pe.map((e=>{var t;const r=e.icon,o=ke===e.key,i=2===e.key?(null===Ze||void 0===Ze?void 0:Ze.length)||0:3===e.key?(null===Xe||void 0===Xe?void 0:Xe.length)||0:null!==(t=null===et||void 0===et?void 0:et[e.countKey])&&void 0!==t?t:0,n=2===e.key?Ge:3===e.key?$e:tt;return(0,te.jsxs)(p.A,{onClick:()=>{return t=e.key,Ce(t),void Ie(null);var t},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:"10px",border:"1px solid ".concat(o?e.color:ne.borderSubtle),bgcolor:o?e.color:ne.surface,color:o?"#fff":ne.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?e.color:"#cbd5e1",bgcolor:o?e.color:"#f8fafc"}},children:[(0,te.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:o?"rgba(255,255,255,0.22)":ae(e.color),color:o?"#fff":e.color},children:(0,te.jsx)(r,{size:13})}),(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,te.jsx)(p.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":"#f8fafc",color:o?"#fff":"#64748b",border:"none"},children:n?(0,te.jsx)(g.A,{variant:"text",width:14,height:10}):i})]},e.key)}))}),(0,te.jsx)(p.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,te.jsx)(E.A,{value:be,onChange:ve,onDebouncedChange:je,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat((ft=de,se(ft,"26")))}}})})]})}),3===ke&&(0,te.jsx)(a.A,{elevation:0,sx:{mb:2,p:2,borderRadius:"".concat(ne.radiusCard/8,"px"),border:"1px solid",borderColor:ne.borderSubtle,background:"#fff"},children:(0,te.jsxs)(h.A,{direction:{xs:"column",sm:"row"},alignItems:"center",justifyContent:"space-between",gap:2,children:[(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{flexWrap:"wrap"},children:[(0,te.jsx)(f.A,{variant:"body2",sx:{fontWeight:700,color:ne.textSecondary,mr:1},children:"Status:"}),(0,te.jsxs)(b.A,{value:De,exclusive:!0,onChange:(e,t)=>t&&Le(t),"aria-label":"status selection",size:"small",sx:{"& .MuiToggleButton-root":{borderRadius:"8px",mx:.5,border:"1px solid ".concat(ne.borderSubtle),color:ne.textSecondary,fontWeight:600,textTransform:"capitalize",px:2,py:.5,"&.Mui-selected":{bgcolor:de,color:"#fff","&:hover":{bgcolor:"#4D1C61"}}}},children:[(0,te.jsx)(v.A,{value:"all",children:"All"}),(0,te.jsx)(v.A,{value:"scheduled",children:"Scheduled"})]})]}),(0,te.jsx)(h.A,{direction:"row",spacing:1.5,alignItems:"center",children:(0,te.jsx)(N.$,{dateAdapter:B.R,children:(0,te.jsx)(F.l,{label:"Select Date",value:Pe,onChange:e=>e&&Te(e),slotProps:{textField:{size:"small",sx:{width:180,"& .MuiOutlinedInput-root":{borderRadius:"20px","& fieldset":{borderColor:ne.borderSubtle},"&:hover fieldset":{borderColor:de},"&.Mui-focused fieldset":{borderColor:de}}}}}})})})]})}),3===ke?(0,te.jsx)(a.A,{elevation:0,sx:{borderRadius:"".concat(ne.radiusCard/8,"px"),border:"1px solid",borderColor:ne.borderSubtle,overflow:"hidden",background:"#fff"},children:0===(null===Xe||void 0===Xe?void 0:Xe.length)?(0,te.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,te.jsx)(c.A,{sx:{width:64,height:64,bgcolor:ae("#94a3b8"),color:ne.textMuted},children:(0,te.jsx)(H.VP9,{size:28})}),(0,te.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:ne.textPrimary},children:"No substitution history to show"}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary,textAlign:"center",px:2},children:"Historical substitution logs will be listed here."})]}):L?(0,te.jsx)(V.nV,{sx:{p:1.25},children:null===Xe||void 0===Xe?void 0:Xe.map(((e,t)=>{var r;return(0,te.jsx)(V.pg,{accent:"#f59e0b",header:(0,te.jsxs)(h.A,{spacing:1.25,children:[(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:ne.textMuted},children:J()(e.sub_date).format("DD MMM YYYY")}),(0,te.jsx)(p.A,{sx:{display:"inline-flex",alignItems:"center",px:1,py:.25,borderRadius:999,bgcolor:le(Oe(e.status)),border:"1px solid ".concat(ce(Oe(e.status))),color:Oe(e.status),fontWeight:800,fontSize:10},children:e.status||"scheduled"})]}),(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,te.jsxs)(h.A,{spacing:.5,sx:{width:"45%"},children:[(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary,fontWeight:700},children:"Absent Rider"}),(0,te.jsx)(f.A,{sx:{fontWeight:800,color:ne.textPrimary,fontSize:13},noWrap:!0,children:e.absent_rider_name}),(0,te.jsxs)(f.A,{variant:"caption",sx:{color:ne.textMuted},children:["#",e.absent_rider_id]})]}),(0,te.jsx)(H.a1M,{size:16,style:{color:ne.textSecondary}}),(0,te.jsxs)(h.A,{spacing:.5,sx:{width:"45%",alignItems:"flex-end",textAlign:"right"},children:[(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary,fontWeight:700},children:"Substitute"}),(0,te.jsx)(f.A,{sx:{fontWeight:800,color:ne.textPrimary,fontSize:13},noWrap:!0,children:e.sub_rider_name}),(0,te.jsxs)(f.A,{variant:"caption",sx:{color:ne.textMuted},children:["#",e.sub_rider_id]})]})]}),e.reason&&(0,te.jsx)(p.A,{sx:{pt:.5,borderTop:"1px solid ".concat(ne.divider)},children:(0,te.jsxs)(f.A,{variant:"caption",sx:{color:ne.textSecondary},children:["Reason: ",(0,te.jsx)("strong",{children:e.reason})]})})]})},null!==(r=e.id)&&void 0!==r?r:t)}))}):(0,te.jsx)(A.A,{sx:{maxHeight:"calc(100vh - 240px)","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ce(de),borderRadius:8,"&:hover":{backgroundColor:de}},"&::-webkit-scrollbar-track":{backgroundColor:ne.surfaceAlt}},children:(0,te.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:800},children:[(0,te.jsx)(m.A,{children:(0,te.jsxs)(y.A,{sx:{"& th":{backgroundColor:ne.surfaceAlt,color:ne.textSecondary,fontSize:11,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(ne.borderSubtle),py:1.25,px:2}},children:[(0,te.jsx)(S.A,{children:"Date"}),(0,te.jsx)(S.A,{children:"Absent Rider"}),(0,te.jsx)(S.A,{align:"center"}),(0,te.jsx)(S.A,{children:"Substitute Rider"}),(0,te.jsx)(S.A,{children:"Reason"}),(0,te.jsx)(S.A,{align:"center",children:"Status"}),(0,te.jsx)(S.A,{align:"right",children:"Action"})]})}),(0,te.jsx)(w.A,{children:null===Xe||void 0===Xe?void 0:Xe.map(((t,r)=>{var o;return(0,te.jsxs)(y.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(ne.divider),py:1.5,px:2},"&:hover":{backgroundColor:ne.surfaceAlt}},children:[(0,te.jsx)(S.A,{children:(0,te.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:ne.textPrimary},children:J()(t.sub_date).format("DD MMM YYYY")})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,te.jsx)(c.A,{sx:{width:32,height:32,bgcolor:ae(de),color:de,fontWeight:700,fontSize:14},children:(t.absent_rider_name||"?").charAt(0).toUpperCase()}),(0,te.jsxs)(h.A,{children:[(0,te.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:ne.textPrimary},children:t.absent_rider_name}),(0,te.jsxs)(f.A,{variant:"caption",sx:{color:ne.textSecondary},children:["#",t.absent_rider_id]})]})]})}),(0,te.jsx)(S.A,{align:"center",children:(0,te.jsx)(H.a1M,{size:18,style:{color:ne.textSecondary}})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,te.jsx)(c.A,{sx:{width:32,height:32,bgcolor:ae("#10b981"),color:"#10b981",fontWeight:700,fontSize:14},children:(t.sub_rider_name||"?").charAt(0).toUpperCase()}),(0,te.jsxs)(h.A,{children:[(0,te.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:ne.textPrimary},children:t.sub_rider_name}),(0,te.jsxs)(f.A,{variant:"caption",sx:{color:ne.textSecondary},children:["#",t.sub_rider_id]})]})]})}),(0,te.jsx)(S.A,{children:(0,te.jsx)(f.A,{variant:"body2",sx:{color:ne.textPrimary,fontWeight:500},children:t.reason||"\u2014"})}),(0,te.jsx)(S.A,{align:"center",children:(0,te.jsx)(p.A,{sx:{display:"inline-flex",alignItems:"center",px:1.5,py:.5,borderRadius:999,bgcolor:le(Oe(t.status)),border:"1px solid ".concat(ce(Oe(t.status))),color:Oe(t.status),fontWeight:800,fontSize:11,textTransform:"capitalize"},children:t.status||"scheduled"})}),(0,te.jsx)(S.A,{align:"right",children:(0,te.jsxs)(h.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,te.jsx)(k.A,{title:"Update substitution",placement:"top",children:(0,te.jsx)(C.A,{size:"small",sx:{bgcolor:ae(de),color:de,border:"1px solid ".concat(ce(de)),"&:hover":{bgcolor:de,color:"#fff"}},onClick:()=>{Fe(t),qe(null)},children:(0,te.jsx)(H.Yvo,{size:14})})}),(0,te.jsx)(k.A,{title:"Delete substitution",placement:"top",children:(0,te.jsx)(C.A,{size:"small",sx:{bgcolor:ae("#ef4444"),color:"#ef4444",border:"1px solid ".concat(ce("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{(async t=>{if(window.confirm("Are you sure you want to delete the substitution for ".concat(t.absent_rider_name,"?")))try{const e=t.tenant_id||t.tenantid||Ke(),o="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions/").concat(t.id,"?tenant_id=").concat(e),i=await l.A.delete(o);var r;i.data&&i.data.status?(0,ee.k)("Substitution deleted successfully!","success",2e3):(0,ee.k)((null===(r=i.data)||void 0===r?void 0:r.message)||"Failed to delete substitution.","error",2e3)}catch(n){var o,i;console.error(n),(0,ee.k)((null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.message)||n.message||"Failed to delete substitution.","error",2e3)}finally{e.invalidateQueries({queryKey:["substitutionsHistory"]}),e.invalidateQueries({queryKey:["activeSubstitutionsToday"]})}})(t)},children:(0,te.jsx)(H.b6i,{size:14})})})]})})]},null!==(o=t.id)&&void 0!==o?o:r)}))})]})})}):2===ke?(0,te.jsx)(oe,{appId:Se,rows:Ze||[],allRidersList:ut,substituteRidersList:Ue,substituteAssignments:Ve,handleAssignSubstitute:(e,t)=>{const r=(0,o.A)((0,o.A)({},Ve),{},{[e]:t});Ee(r),localStorage.setItem("rider_substitutions",JSON.stringify(r)),t?(0,ee.k)("Assigned ".concat(t.username||t.fullname||"Rider"," as substitute"),"success",2e3):(0,ee.k)("Removed substitute assignment","info",2e3)},onFinalizeSuccess:()=>{Ee({}),localStorage.removeItem("rider_substitutions"),e.invalidateQueries({queryKey:["substitutionsHistory"]}),e.invalidateQueries({queryKey:["subRidersLogs"]}),e.invalidateQueries({queryKey:["activeSubstitutionsToday"]})},selectedDate:Je,setSelectedDate:Ne,DT:ne,BRAND:de,edge:ce,tint:le,soft:ae,roleid:We}):(0,te.jsx)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:ne.radiusCard/8,borderBottomRightRadius:ne.radiusCard/8,border:"1px solid",borderColor:ne.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,te.jsx)(A.A,{ref:ie,onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e.currentTarget;t+o>=r-50&&xt&&!ct&&dt()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ce(de),borderRadius:8,"&:hover":{backgroundColor:de}},"&::-webkit-scrollbar-track":{backgroundColor:ne.surfaceAlt}},children:L?(0,te.jsxs)(V.nV,{sx:{p:1.25},children:[at&&(0,te.jsxs)(h.A,{alignItems:"center",sx:{py:6},children:[(0,te.jsx)(X.A,{}),(0,te.jsx)(f.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading riders\u2026"})]}),0===(null===ut||void 0===ut?void 0:ut.length)&&!at&&(0,te.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,te.jsx)(c.A,{sx:{width:64,height:64,bgcolor:ae("#94a3b8"),color:ne.textMuted},children:(0,te.jsx)(H.aVM,{size:28})}),(0,te.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:ne.textPrimary},children:"No riders to show"}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary,textAlign:"center",px:2},children:be?"Try a different keyword.":"No ".concat(0===ke?"":"active ","riders for this zone.")})]}),0!==(null===ut||void 0===ut?void 0:ut.length)&&(null===ut||void 0===ut?void 0:ut.map(((e,r)=>{var o,i,n,s;const l=pt(e),a=l.icon,d=Re===e.userid;return(0,te.jsxs)(V.pg,{accent:l.color,selected:d,header:(0,te.jsxs)(h.A,{spacing:1.25,children:[(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:ne.textMuted},children:String(r+1).padStart(2,"0")}),(0,te.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ce(de)),color:de,fontWeight:800,fontSize:11},children:["#",null===e||void 0===e?void 0:e.userid]}),(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:le(l.color),border:"1px solid ".concat(ce(l.color)),color:l.color},children:[(0,te.jsx)(ue,{color:l.color,size:18,children:(0,te.jsx)(a,{size:11})}),(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:l.label})]})]}),1==We&&(0,te.jsxs)(h.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,te.jsx)(C.A,{size:"small",sx:{borderRadius:999,bgcolor:ae(de),color:de,border:"1px solid ".concat(ce(de)),"&:hover":{bgcolor:de,color:"#fff"}},onClick:()=>{t("/nearle/riders/edit",{state:{riderdata:e}})},children:(0,te.jsx)(H.Yvo,{size:14})}),0!=ke&&(0,te.jsx)(C.A,{size:"small",sx:{borderRadius:999,bgcolor:d?"#0ea5e9":ae("#0ea5e9"),color:d?"#fff":"#0ea5e9",border:"1px solid ".concat(ce("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{e.userid==Re?Ie(null):(Ie(e.userid),rt(e.userid))},children:d?(0,te.jsx)(H.rAP,{size:14}):(0,te.jsx)(H.WnU,{size:14})})]})]}),(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,te.jsx)(c.A,{sx:{width:36,height:36,bgcolor:ae(de),color:de,fontWeight:800,fontSize:16,border:"1px solid ".concat(ce(de)),flexShrink:0},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,te.jsxs)(p.A,{sx:{minWidth:0},children:[(0,te.jsx)(f.A,{sx:{fontWeight:800,color:ne.textPrimary,fontSize:15},noWrap:!0,children:e.username||"\u2014"}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary},noWrap:!0,children:e.contactno||"\u2014"})]})]})]}),children:[(0,te.jsxs)(V.FG,{children:[(0,te.jsxs)(V.pY,{label:"Address",full:!0,children:[(0,te.jsx)(f.A,{sx:{fontSize:13,fontWeight:600,color:ne.textSecondary},noWrap:!0,children:e.suburb||(e.address?e.address.slice(0,20)+"\u2026":"\u2014")}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textMuted},noWrap:!0,children:e.city||""})]}),(0,te.jsx)(V.pY,{label:"Vehicle",children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,te.jsx)(ue,{color:"#0ea5e9",size:22,children:(0,te.jsx)(H.aVM,{size:12})}),(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:ne.textPrimary},children:e.vehicleno||"\u2014"})]})}),(0,te.jsx)(V.pY,{label:"Shift",value:"#".concat(null!==(i=e.shiftid)&&void 0!==i?i:"\u2014")}),(0,te.jsx)(V.pY,{label:"Time",children:(0,te.jsxs)(h.A,{spacing:.5,children:[(0,te.jsx)(p.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:le("#10b981"),border:"1px solid ".concat(ce("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800},children:e.starttime?J()("".concat(J()().format("MM-DD-YYYY")," ").concat(e.starttime)).format("hh:mm A"):"\u2014"}),(0,te.jsx)(p.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:le("#ef4444"),border:"1px solid ".concat(ce("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800},children:e.endtime?J()("".concat(J()().format("MM-DD-YYYY")," ").concat(e.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,te.jsx)(V.pY,{label:"Fare",value:null!==(n=e.basefare)&&void 0!==n?n:"\u2014"}),(0,te.jsx)(V.pY,{label:"Fuel",value:null!==(s=e.fuelcharge)&&void 0!==s?s:"\u2014"})]}),d&&0!==ke&&(0,te.jsxs)(p.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:"#ffffff",border:"1px solid ".concat(ce(de))},children:[(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,te.jsx)(ue,{color:de,size:26,children:(0,te.jsx)(H.o8z,{size:14})}),(0,te.jsxs)(f.A,{sx:{fontWeight:800,color:ne.textSecondary,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",e.username||"Rider #".concat(e.userid)]})]}),(0,te.jsxs)(u.Ay,{container:!0,spacing:1.25,children:[(0,te.jsx)(ge,{color:"#ef4444",icon:H.gwi,label:"Location",value:null!==Ye&&void 0!==Ye&&Ye.latitude?"".concat(Ye.latitude,", ").concat(Ye.longitude):"\u2014"}),(0,te.jsx)(ge,{color:"#10b981",icon:H.E_J,label:"Battery",value:null!==Ye&&void 0!==Ye&&Ye.battery?"".concat(Ye.battery,"%"):"N/A"}),(0,te.jsx)(ge,{color:null!==Ye&&void 0!==Ye&&Ye.is_charging?"#10b981":"#94a3b8",icon:H.Im6,label:"Charging",value:null!==Ye&&void 0!==Ye&&Ye.is_charging?"Charging":"Not Charging"}),(0,te.jsx)(ge,{color:"#0ea5e9",icon:H.BJM,label:"Speed",value:void 0!==(null===Ye||void 0===Ye?void 0:Ye.speed)?"".concat(Ye.speed," km/h"):"\u2014"}),(0,te.jsx)(ge,{color:"#8b5cf6",icon:H.o8z,label:"Accuracy",value:void 0!==(null===Ye||void 0===Ye?void 0:Ye.accuracy)?"".concat(Ye.accuracy," m"):"\u2014"}),(0,te.jsx)(ge,{color:"#f59e0b",icon:H.VP9,label:"Log time",value:(null===Ye||void 0===Ye?void 0:Ye.logdate)||"\u2014"}),(0,te.jsx)(ge,{color:de,icon:H.gsJ,label:"Active order",value:(null===Ye||void 0===Ye?void 0:Ye.orderid)||"N/A"}),(0,te.jsx)(ge,{color:"idle"===(null===Ye||void 0===Ye?void 0:Ye.status)?"#f59e0b":"#10b981",icon:H.mU9,label:"Status",value:(null===Ye||void 0===Ye?void 0:Ye.status)||"unknown"})]})]})]},null!==(o=e.userid)&&void 0!==o?o:r)}))),0!==(null===ut||void 0===ut?void 0:ut.length)&&(0,te.jsx)("div",{ref:re,style:{height:40,textAlign:"center"},children:ct||xt?(0,te.jsx)(X.A,{}):(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textMuted,fontWeight:600},children:"No more riders"})})]}):(0,te.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,md:1300}},children:[(0,te.jsx)(m.A,{children:(0,te.jsxs)(y.A,{sx:{"& th":{backgroundColor:ne.surfaceAlt,color:ne.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(ne.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,te.jsx)(S.A,{children:"#"}),(0,te.jsx)(S.A,{children:"ID"}),(0,te.jsx)(S.A,{children:"Rider"}),(0,te.jsx)(S.A,{children:"Address"}),(0,te.jsx)(S.A,{children:"Vehicle"}),(0,te.jsx)(S.A,{children:"Shift"}),(0,te.jsx)(S.A,{align:"center",children:"Time"}),(0,te.jsx)(S.A,{children:"Fare"}),(0,te.jsx)(S.A,{children:"Fuel"}),(0,te.jsx)(S.A,{align:"center",children:"Status"}),1==We&&(0,te.jsx)(S.A,{align:"right",children:"Action"})]})}),(0,te.jsxs)(w.A,{children:[at&&(0,te.jsx)($.r,{col:6}),0===(null===ut||void 0===ut?void 0:ut.length)&&!at&&(0,te.jsx)(y.A,{children:(0,te.jsx)(S.A,{colSpan:ze,sx:{py:6},children:(0,te.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,te.jsx)(c.A,{sx:{width:64,height:64,bgcolor:ae("#94a3b8"),color:ne.textMuted},children:(0,te.jsx)(H.aVM,{size:28})}),(0,te.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:ne.textPrimary},children:"No riders to show"}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary},children:be?"Try a different keyword.":"No ".concat(0===ke?"":"active ","riders for this zone.")})]})})}),0!==(null===ut||void 0===ut?void 0:ut.length)&&(null===ut||void 0===ut?void 0:ut.map(((e,r)=>{var n,s,l,a;const d=pt(e),x=d.icon,g=Re===e.userid;return(0,te.jsxs)(i.Fragment,{children:[(0,te.jsxs)(y.A,{sx:(0,o.A)({cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(ne.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:ne.surfaceAlt}},g&&{backgroundColor:le(de)}),children:[(0,te.jsx)(S.A,{children:(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:ne.textMuted},children:String(r+1).padStart(2,"0")})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ce(de)),color:de,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===e||void 0===e?void 0:e.userid]})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,te.jsx)(c.A,{sx:{width:36,height:36,bgcolor:ae(de),color:de,fontWeight:800,fontSize:16,border:"1px solid ".concat(ce(de))},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,te.jsxs)(h.A,{sx:{minWidth:0},children:[(0,te.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:ne.textPrimary,whiteSpace:"nowrap"},children:e.username||"\u2014"}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary},children:e.contactno||"\u2014"})]})]})}),(0,te.jsx)(S.A,{sx:{maxWidth:220},children:(0,te.jsx)(k.A,{title:e.address||"",placement:"top",children:(0,te.jsxs)(h.A,{children:[(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textSecondary,fontWeight:600},noWrap:!0,children:e.suburb||(e.address?e.address.slice(0,20)+"\u2026":"\u2014")}),(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textMuted},noWrap:!0,children:e.city||""})]})})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,te.jsx)(ue,{color:"#0ea5e9",size:22,children:(0,te.jsx)(H.aVM,{size:12})}),(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:ne.textPrimary},children:e.vehicleno||"\u2014"})]})}),(0,te.jsx)(S.A,{children:(0,te.jsxs)(f.A,{variant:"caption",sx:{color:ne.textSecondary,fontWeight:600},children:["#",null!==(s=e.shiftid)&&void 0!==s?s:"\u2014"]})}),(0,te.jsx)(S.A,{align:"center",children:(0,te.jsxs)(h.A,{spacing:.5,alignItems:"center",children:[(0,te.jsx)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:le("#10b981"),border:"1px solid ".concat(ce("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:e.starttime?J()("".concat(J()().format("MM-DD-YYYY")," ").concat(e.starttime)).format("hh:mm A"):"\u2014"}),(0,te.jsx)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:le("#ef4444"),border:"1px solid ".concat(ce("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:e.endtime?J()("".concat(J()().format("MM-DD-YYYY")," ").concat(e.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,te.jsx)(S.A,{children:(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:ne.textPrimary},children:null!==(l=e.basefare)&&void 0!==l?l:"\u2014"})}),(0,te.jsx)(S.A,{children:(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:ne.textPrimary},children:null!==(a=e.fuelcharge)&&void 0!==a?a:"\u2014"})}),(0,te.jsx)(S.A,{align:"center",children:(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:le(d.color),border:"1px solid ".concat(ce(d.color)),color:d.color},children:[(0,te.jsx)(ue,{color:d.color,size:20,children:(0,te.jsx)(x,{size:12})}),(0,te.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:d.label})]})}),1==We&&(0,te.jsx)(S.A,{align:"right",children:(0,te.jsxs)(h.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,te.jsx)(k.A,{title:"Edit rider",placement:"top",children:(0,te.jsx)(C.A,{size:"small",sx:{bgcolor:ae(de),color:de,border:"1px solid ".concat(ce(de)),"&:hover":{bgcolor:de,color:"#fff"}},onClick:()=>{t("/nearle/riders/edit",{state:{riderdata:e}})},children:(0,te.jsx)(H.Yvo,{size:14})})}),0!=ke&&(0,te.jsx)(k.A,{title:g?"Hide logs":"View live logs",placement:"top",children:(0,te.jsx)(C.A,{size:"small",sx:{bgcolor:g?"#0ea5e9":ae("#0ea5e9"),color:g?"#fff":"#0ea5e9",border:"1px solid ".concat(ce("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{e.userid==Re?Ie(null):(Ie(e.userid),rt(e.userid))},children:g?(0,te.jsx)(H.rAP,{size:14}):(0,te.jsx)(H.WnU,{size:14})})})]})})]}),g&&0!==ke&&(0,te.jsx)(y.A,{children:(0,te.jsx)(S.A,{colSpan:ze,sx:{p:0,borderBottom:"1px solid ".concat(ne.divider)},children:(0,te.jsx)(W.A,{in:g,timeout:"auto",unmountOnExit:!0,children:(0,te.jsxs)(p.A,{sx:{p:{xs:1.5,md:2},bgcolor:"#ffffff",borderTop:"1px solid ".concat(ce(de))},children:[(0,te.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,te.jsx)(ue,{color:de,size:26,children:(0,te.jsx)(H.o8z,{size:14})}),(0,te.jsxs)(f.A,{sx:{fontWeight:800,color:ne.textSecondary,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",e.username||"Rider #".concat(e.userid)]})]}),(0,te.jsxs)(u.Ay,{container:!0,spacing:1.25,children:[(0,te.jsx)(ge,{color:"#ef4444",icon:H.gwi,label:"Location",value:null!==Ye&&void 0!==Ye&&Ye.latitude?"".concat(Ye.latitude,", ").concat(Ye.longitude):"\u2014"}),(0,te.jsx)(ge,{color:"#10b981",icon:H.E_J,label:"Battery",value:null!==Ye&&void 0!==Ye&&Ye.battery?"".concat(Ye.battery,"%"):"N/A"}),(0,te.jsx)(ge,{color:null!==Ye&&void 0!==Ye&&Ye.is_charging?"#10b981":"#94a3b8",icon:H.Im6,label:"Charging",value:null!==Ye&&void 0!==Ye&&Ye.is_charging?"Charging":"Not Charging"}),(0,te.jsx)(ge,{color:"#0ea5e9",icon:H.BJM,label:"Speed",value:void 0!==(null===Ye||void 0===Ye?void 0:Ye.speed)?"".concat(Ye.speed," km/h"):"\u2014"}),(0,te.jsx)(ge,{color:"#8b5cf6",icon:H.o8z,label:"Accuracy",value:void 0!==(null===Ye||void 0===Ye?void 0:Ye.accuracy)?"".concat(Ye.accuracy," m"):"\u2014"}),(0,te.jsx)(ge,{color:"#f59e0b",icon:H.VP9,label:"Log time",value:(null===Ye||void 0===Ye?void 0:Ye.logdate)||"\u2014"}),(0,te.jsx)(ge,{color:de,icon:H.gsJ,label:"Active order",value:(null===Ye||void 0===Ye?void 0:Ye.orderid)||"N/A"}),(0,te.jsx)(ge,{color:"idle"===(null===Ye||void 0===Ye?void 0:Ye.status)?"#f59e0b":"#10b981",icon:H.mU9,label:"Status",value:(null===Ye||void 0===Ye?void 0:Ye.status)||"unknown"})]})]})})})})]},null!==(n=e.userid)&&void 0!==n?n:r)}))),0!==(null===ut||void 0===ut?void 0:ut.length)&&(0,te.jsx)(y.A,{children:(0,te.jsx)(S.A,{colSpan:ze,sx:{borderBottom:"none"},children:(0,te.jsx)("div",{ref:re,style:{height:40,textAlign:"center"},children:ct||xt?(0,te.jsx)(X.A,{}):(0,te.jsx)(f.A,{variant:"caption",sx:{color:ne.textMuted,fontWeight:600},children:"No more riders"})})})})]})]})})}),(0,te.jsxs)(z.A,{open:Boolean(Be),onClose:()=>Fe(null),maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{borderRadius:"".concat(ne.radiusCard/8,"px"),p:1}},children:[(0,te.jsx)(R.A,{sx:{fontWeight:700,pb:1},children:"Update Substitution"}),(0,te.jsx)(I.A,{children:(0,te.jsxs)(h.A,{spacing:2,sx:{mt:1},children:[(0,te.jsxs)(f.A,{variant:"body2",sx:{color:ne.textSecondary},children:["Choose a new substitute rider for ",(0,te.jsx)("strong",{children:null===Be||void 0===Be?void 0:Be.absent_rider_name}),"."]}),(0,te.jsx)(Y.A,{size:"small",options:Ue||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.userid)===(null===t||void 0===t?void 0:t.userid),getOptionLabel:e=>"".concat(e.username||e.fullname||""," (#").concat(e.userid,")"),value:He,onChange:(e,t)=>qe(t),renderInput:e=>(0,te.jsx)(M.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Substitute Rider",sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",bgcolor:"#f8fafc","& fieldset":{borderColor:ne.borderSubtle}}}}))})]})}),(0,te.jsxs)(P.A,{sx:{px:3,pb:2},children:[(0,te.jsx)(T.A,{variant:"outlined",onClick:()=>Fe(null),sx:{borderRadius:"8px",textTransform:"none",fontWeight:600,borderColor:ne.borderSubtle,color:ne.textSecondary},children:"Cancel"}),(0,te.jsx)(T.A,{variant:"contained",onClick:async()=>{if(He)try{const e=Be.tenant_id||Be.tenantid||Ke(),r="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions/").concat(Be.id),o={tenant_id:parseInt(e,10),sub_rider_id:parseInt(He.userid,10),sub_rider_name:He.username||He.fullname||"Rider #".concat(He.userid)},i=await l.A.put(r,o);var t;if(i.data&&i.data.status)(0,ee.k)("Substitution updated successfully!","success",2e3);else(0,ee.k)((null===(t=i.data)||void 0===t?void 0:t.message)||"Failed to update substitution.","error",2e3)}catch(i){var r,o;console.error(i),(0,ee.k)((null===(r=i.response)||void 0===r||null===(o=r.data)||void 0===o?void 0:o.message)||i.message||"Failed to update substitution.","error",2e3)}finally{Fe(null),qe(null),e.invalidateQueries({queryKey:["substitutionsHistory"]}),e.invalidateQueries({queryKey:["activeSubstitutionsToday"]})}else(0,ee.k)("Please select a substitute rider","error",2e3)},disabled:!He,sx:{borderRadius:"8px",textTransform:"none",fontWeight:600,bgcolor:de,color:"#fff","&:hover":{bgcolor:"#4D1C61"}},children:"Save Changes"})]})]})]});var ft}},94826:(e,t,r)=>{r.d(t,{A:()=>c});var o=r(59254),i=r(46639),n=r(62217),s=r(44414);const l=(0,o.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),a=(0,o.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,s.jsxs)(l,{children:[(0,s.jsx)(i.A,{color:"primary",size:80,thickness:6}),(0,s.jsx)(a,{children:(0,s.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,t,r)=>{r.d(t,{r:()=>a});var o=r(9213),i=r(21671),n=r(82917),s=r(93230),l=r(44414);const a=e=>{let{rowsPerPage:t=5,col:r=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(o.A,{children:[(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,t)=>(0,l.jsx)(i.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(n.A,{variant:"text",width:100}),(0,l.jsx)(n.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"text",width:150})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(i.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/9912.a8585d14.chunk.js b/build/static/js/9912.8ae215bb.chunk.js similarity index 99% rename from build/static/js/9912.a8585d14.chunk.js rename to build/static/js/9912.8ae215bb.chunk.js index 8776502..e81e77d 100644 --- a/build/static/js/9912.a8585d14.chunk.js +++ b/build/static/js/9912.8ae215bb.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9912],{8457:e=>{"use strict";e.exports="data:image/png;base64,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"},39912:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var n=r(9950),o=r(28429),i=r(14857),a=r(47223),s=r(8457),c=r(26910),l=r(4159),u=r.n(l),d=(r(52351),r(8881)),f=r(58168);const p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M732 120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v148h440V120zm120 212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM664 844H360V568h304v276zm164-360c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-40c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v40z"}}]},name:"printer",theme:"filled"};var h=r(61187),y=function(e,t){return n.createElement(h.A,(0,f.A)({},e,{ref:t,icon:p}))};const m=n.forwardRef(y);var g=r(45418),b=r.n(g),v=r(43302),x=r(93230),A=r(83274),w=r(25333),j=r(82053),C=r(25277),_=r(82223),P=r(16491),S=r(60899),T=r(1320),O=r(15769),D=r(69780),E=r(9213),k=r(21671),M=r(34075),R=r(74745),Y=r(96583),N=r(40033),F=r(28170),I=r(29925),q=r(79739),U=r(44414);const z=()=>{const[e,t]=(0,n.useState)({}),r=(0,o.zy)(),l=(0,o.Zp)();console.log("previewSelect",r.state);const f=(0,n.useRef)(null),[p,h]=(0,n.useState)(!0),[y,g]=(0,n.useState)(!1),[z,B]=(0,n.useState)(""),[G,L]=(0,n.useState)(""),V=(0,i.A)(),J=(0,a.A)(V.breakpoints.down("md"));function Q(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(e)}(0,n.useEffect)((()=>{t(r.state)}),[]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(x.A,{direction:{xs:"column",md:"row"},justifyContent:"Space-between",alignItems:{xs:"stretch",md:"center"},spacing:2,sx:{px:{xs:1.5,md:2.5},py:1,bgcolor:"#eeeeee"},children:[(0,U.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:2,children:[(0,U.jsx)(A.A,{title:"back",children:(0,U.jsx)(w.A,{color:"primary",onClick:()=>{l("/nearle/invoice")},children:(0,U.jsx)(v.QVr,{size:"large"})})}),(0,U.jsxs)(x.A,{alignItems:"center",children:[(0,U.jsx)(j.A,{variant:"h3",color:"primary",children:"Invoice Details"}),(0,U.jsx)(C.A,{size:"small",color:"warning",variant:"outlined",sx:{bgcolor:V.palette.warning.lighter},label:"Invoice No :".concat("\xa0\xa0",e.invoiceno)})]})]}),(0,U.jsxs)(x.A,{direction:{xs:"column",sm:"row"},spacing:2,sx:{width:{xs:"100%",md:"auto"}},children:[(0,U.jsxs)(_.A,{variant:"outlined",color:"primary",fullWidth:J,sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"}},onClick:()=>{g(!0)},children:[" ",(0,U.jsx)(v.jtd,{}),"Update Payment"]}),(0,U.jsx)(b(),{trigger:()=>(0,U.jsx)(_.A,{size:"small",startIcon:(0,U.jsx)(m,{}),variant:"outlined",color:"primary",fullWidth:J,sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"}},children:"Print"}),content:()=>f.current})]})]}),(0,U.jsx)(P.A,{sx:{pb:2.5,border:"1px solid #eee",overflowX:{xs:"auto",md:"visible"}},children:(0,U.jsxs)("div",{ref:f,style:{width:"100%",minWidth:720},children:[(0,U.jsxs)(P.A,{id:"print",sx:{p:2.5},children:[(0,U.jsxs)(P.A,{sx:{pb:2.5},children:[(0,U.jsxs)(x.A,{sx:{flexDirection:"row",border:"1px solid #eee",px:3},justifyContent:"space-between",children:[(0,U.jsxs)(P.A,{sx:{pt:.5},children:[(0,U.jsxs)(x.A,{direction:"row",spacing:2,children:[(0,U.jsx)("img",{src:s,style:{width:"150px",height:"50px"}})," "]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{sx:{overflow:"hidden",color:V.palette.primary.main},variant:"subtitle1",children:"Invoice No :"}),(0,U.jsx)(j.A,{sx:{color:V.palette.primary.main},children:"\xa0\xa0".concat(e.invoiceno)})]})]}),(0,U.jsxs)(P.A,{sx:{pt:2.5,pb:1.75},children:[(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsxs)(j.A,{sx:{pl:4,color:V.palette.primary.main},variant:"subtitle1",children:["Date :"," "]}),(0,U.jsx)(j.A,{sx:{color:V.palette.primary.main},children:u()(e.transactiondate).format("DD-MM-YYYY")})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{sx:{pr:2,overflow:"hidden",color:V.palette.primary.main},variant:"subtitle1",children:"Due Date :"}),(0,U.jsx)(j.A,{sx:{color:V.palette.primary.main},children:u()(e.dueDate).format("DD-MM-YYYY")})]})]})]}),(0,U.jsx)(P.A,{sx:{pt:2.5},children:(0,U.jsxs)(S.Ay,{container:!0,spacing:2,justifyContent:"space-between",direction:"row",children:[(0,U.jsx)(S.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(P.A,{sx:{border:1,minHeight:240,borderColor:"grey.200",borderRadius:.5,p:2.5},children:(0,U.jsx)(S.Ay,{container:!0,direction:"row",children:(0,U.jsx)(S.Ay,{item:!0,md:8,children:(0,U.jsxs)(x.A,{spacing:2,children:[(0,U.jsx)(j.A,{variant:"h5",children:"From:"}),(0,U.jsxs)(x.A,{sx:{width:"100%"},children:[(0,U.jsx)(j.A,{variant:"subtitle1",children:"Nearle Technology Privite Limited."}),(0,U.jsxs)(j.A,{color:"secondary",children:["424, 4",(0,U.jsx)("sup",{children:"th"}),"floor,"]}),(0,U.jsx)(j.A,{color:"secondary",children:"Red rose towers,"}),(0,U.jsx)(j.A,{color:"secondary",children:"DB Road, RS Puram,"}),(0,U.jsx)(j.A,{color:"secondary",children:"641002."}),(0,U.jsx)(j.A,{color:"secondary",children:"care@nearle.in"}),(0,U.jsx)(j.A,{color:"secondary",children:"9047968666"})]})]})})})})}),(0,U.jsx)(S.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(P.A,{sx:{border:1,minHeight:240,borderColor:"grey.200",borderRadius:.5,p:2.5},children:(0,U.jsx)(S.Ay,{container:!0,direction:"row",children:(0,U.jsx)(S.Ay,{item:!0,md:8,children:(0,U.jsxs)(x.A,{spacing:2,children:[(0,U.jsx)(j.A,{variant:"h5",children:"To:"}),(0,U.jsxs)(x.A,{sx:{width:"100%"},children:[(0,U.jsx)(j.A,{variant:"subtitle1",children:e.tenantname}),(0,U.jsx)(j.A,{color:"secondary",children:e.address}),(0,U.jsx)(j.A,{color:"secondary",children:e.suburb}),(0,U.jsx)(j.A,{color:"secondary",children:e.city}),(0,U.jsx)(j.A,{color:"secondary",children:e.state})," "]})]})})})})})]})})]}),(0,U.jsx)(T.A,{children:(0,U.jsxs)(O.A,{children:[(0,U.jsx)(D.A,{children:(0,U.jsxs)(E.A,{children:[(0,U.jsx)(k.A,{children:"S.No"}),(0,U.jsx)(k.A,{children:"Particulars"}),(0,U.jsx)(k.A,{children:"Unit"}),(0,U.jsx)(k.A,{children:"Quantity"}),(0,U.jsx)(k.A,{align:"right",children:"Rate"}),(0,U.jsx)(k.A,{align:"right",children:"Other Charges"}),(0,U.jsx)(k.A,{align:"right",children:"Amount"})]})}),e.tenantsalesdetails&&(0,U.jsx)(M.A,{children:(0,U.jsxs)(E.A,{children:[(0,U.jsx)(k.A,{children:"1"}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{children:"Invoice from ".concat(u()(e.tenantsalesdetails[0].fromdate).format("DD-MM-YYYY")," to ").concat(u()(e.tenantsalesdetails[0].todate).format("DD-MM-YYYY"))})}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{children:e.tenantsalesdetails[0].pricingtype})}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{children:"".concat(e.tenantsalesdetails[0].quantity.toFixed(2)," km")})}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{align:"right",children:"\u20b9 ".concat(e.tenantsalesdetails[0].baserate.toFixed(2))})}),(0,U.jsx)(k.A,{align:"right",children:(0,U.jsx)(j.A,{children:"\u20b9 ".concat(e.tenantsalesdetails[0].othercharges,".00")})}),(0,U.jsx)(k.A,{align:"right",children:(0,U.jsx)(j.A,{children:"\u20b9 ".concat(e.tenantsalesdetails[0].amount,".00")})})]})})]})}),(0,U.jsx)(R.A,{}),(0,U.jsx)(P.A,{sx:{p:2.5},children:(0,U.jsx)(S.Ay,{container:!0,direction:"row",justifyContent:"flex-end",children:(0,U.jsx)(S.Ay,{item:!0,md:4,children:(0,U.jsxs)(x.A,{spacing:2,children:[(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{color:"secondary",children:"Sub Total:"}),(0,U.jsx)(j.A,{variant:"h6",children:Q(e.salesamount)})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{color:"secondary",children:"Discount:"}),(0,U.jsxs)(j.A,{variant:"h6",color:V.palette.error.main,children:["- ",Q(e.discountamt)]})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{color:V.palette.grey[500],children:"Tax:"}),(0,U.jsxs)(j.A,{variant:"h6",color:V.palette.success.main,children:["+ ",Q(e.taxamount)]})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{sx:{pr:2},variant:"subtitle1",children:"Grand Total:"}),(0,U.jsx)(j.A,{variant:"h6",children:Q(Math.round(e.totalamount))})]})]})})})})]}),(0,U.jsx)(R.A,{}),(0,U.jsx)(P.A,{sx:{p:2.5},children:(0,U.jsxs)(j.A,{children:["Notes: ",e.remarks]})}),(0,U.jsx)(R.A,{})]})}),(0,U.jsxs)(Y.A,{open:y,onClose:()=>{g(!1)},maxWidth:"sm",fullWidth:!0,children:[(0,U.jsx)(N.A,{sx:{bgcolor:V.palette.primary.main},children:(0,U.jsxs)(x.A,{direction:"row",spacing:1,children:[(0,U.jsx)(j.A,{variant:"h2",sx:{color:"white"},children:"\u20b9"}),(0,U.jsx)(j.A,{variant:"h3",sx:{color:"white"},children:"Update Payment"})]})}),(0,U.jsxs)(F.A,{dividers:!0,children:[(0,U.jsxs)(x.A,{spacing:1,sx:{mb:2},children:[(0,U.jsx)(j.A,{children:"Reference No"}),(0,U.jsx)(I.A,{type:"number",placeholder:"Enter Reference Number",sx:{width:"100%"},onChange:e=>{B(e.target.value)}})]}),(0,U.jsxs)(x.A,{spacing:2,sx:{mb:2},children:[(0,U.jsx)(j.A,{children:"Remarks"}),(0,U.jsx)(I.A,{multiline:!0,required:!0,placeholder:"Enter Remarks",sx:{width:"100%"},onChange:e=>{L(e.target.value)}})]})]}),(0,U.jsxs)(q.A,{children:[(0,U.jsx)(_.A,{variant:"outlined",sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"},m:2},onClick:()=>{g(!1)},children:"Cancel"}),(0,U.jsx)(_.A,{variant:"outlined",disabled:""==z||""==G,sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"},m:2},onClick:()=>{g(!1),(async()=>{try{const t=await c.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/invoice/updatestatus"),{salesid:e.salesid,referenceno:z,referencedate:u()().format("YYYY-MM-DD HH:mm:ss"),billstatus:2,paymentremarks:G});t.status&&(0,d.M8)(" Updated Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),console.log("updateResponse",t)}catch(t){console.log("updateResponse",t)}})(),l("/nearle/invoice")},children:"Update"})]})]})]})}},45418:function(e,t,r){var n,o;"undefined"!=typeof self&&self,e.exports=(n=r(9950),o=r(17119),function(){"use strict";var e={328:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PrintContextConsumer=t.PrintContext=void 0;var n=r(496),o=Object.prototype.hasOwnProperty.call(n,"createContext");t.PrintContext=o?n.createContext({}):null,t.PrintContextConsumer=t.PrintContext?t.PrintContext.Consumer:function(){return null}},428:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ReactToPrint=void 0;var n=r(316),o=r(496),i=r(190),a=r(328),s=r(940),c=function(e){function t(){var t=e.apply(this,n.__spreadArray([],n.__read(arguments),!1))||this;return t.startPrint=function(e){var r=t.props,n=r.onAfterPrint,o=r.onPrintError,i=r.print,a=r.documentTitle;setTimeout((function(){var r,s;if(e.contentWindow)if(e.contentWindow.focus(),i)i(e).then((function(){return null==n?void 0:n()})).then((function(){return t.handleRemoveIframe()})).catch((function(e){o?o("print",e):t.logMessages(["An error was thrown by the specified `print` function"])}));else{if(e.contentWindow.print){var c=null!==(s=null===(r=e.contentDocument)||void 0===r?void 0:r.title)&&void 0!==s?s:"",l=e.ownerDocument.title;a&&(e.ownerDocument.title=a,e.contentDocument&&(e.contentDocument.title=a)),e.contentWindow.print(),a&&(e.ownerDocument.title=l,e.contentDocument&&(e.contentDocument.title=c))}else t.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==n||n(),t.handleRemoveIframe()}else t.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},t.triggerPrint=function(e){var r=t.props,n=r.onBeforePrint,o=r.onPrintError;if(n){var i=n();i&&"function"==typeof i.then?i.then((function(){t.startPrint(e)})).catch((function(e){o&&o("onBeforePrint",e)})):t.startPrint(e)}else t.startPrint(e)},t.handlePrint=function(e){var r=t.props,o=r.bodyClass,a=r.content,s=r.copyStyles,c=r.fonts,l=r.pageStyle,u=r.nonce,d="function"==typeof e?e():null;if(d&&"function"==typeof a&&t.logMessages(['"react-to-print" received a `content` prop and a content param passed the callback return by `useReactToPrint. The `content` prop will be ignored.'],"warning"),d||"function"!=typeof a||(d=a()),void 0!==d)if(null!==d){var f=document.createElement("iframe");f.width="".concat(document.documentElement.clientWidth,"px"),f.height="".concat(document.documentElement.clientHeight,"px"),f.style.position="absolute",f.style.top="-".concat(document.documentElement.clientHeight+100,"px"),f.style.left="-".concat(document.documentElement.clientWidth+100,"px"),f.id="printWindow",f.srcdoc="";var p=(0,i.findDOMNode)(d);if(p){var h=p.cloneNode(!0),y=h instanceof Text,m=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),g=y?[]:h.querySelectorAll("img"),b=y?[]:h.querySelectorAll("video"),v=c?c.length:0;t.numResourcesToLoad=m.length+g.length+b.length+v,t.resourcesLoaded=[],t.resourcesErrored=[];var x=function(e,r){t.resourcesLoaded.includes(e)?t.logMessages(["Tried to mark a resource that has already been handled",e],"debug"):(r?(t.logMessages(n.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],n.__read(r),!1)),t.resourcesErrored.push(e)):t.resourcesLoaded.push(e),t.resourcesLoaded.length+t.resourcesErrored.length===t.numResourcesToLoad&&t.triggerPrint(f))};f.onload=function(){var e,r,i,a;f.onload=null;var d=f.contentDocument||(null===(r=f.contentWindow)||void 0===r?void 0:r.document);if(d){d.body.appendChild(h),c&&((null===(i=f.contentDocument)||void 0===i?void 0:i.fonts)&&(null===(a=f.contentWindow)||void 0===a?void 0:a.FontFace)?c.forEach((function(e){var t=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});f.contentDocument.fonts.add(t),t.loaded.then((function(){x(t)})).catch((function(e){x(t,["Failed loading the font:",t,"Load error:",e])}))})):(c.forEach((function(e){return x(e)})),t.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var m="function"==typeof l?l():l;if("string"!=typeof m)t.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof m,'". Styles from `pageStyle` will not be applied.')]);else{var v=d.createElement("style");u&&(v.setAttribute("nonce",u),d.head.setAttribute("nonce",u)),v.appendChild(d.createTextNode(m)),d.head.appendChild(v)}if(o&&(e=d.body.classList).add.apply(e,n.__spreadArray([],n.__read(o.split(" ")),!1)),!y){for(var A=y?[]:p.querySelectorAll("canvas"),w=d.querySelectorAll("canvas"),j=0;j",t,"Error",i])},n.src=r}else x(t,['Found an tag with an empty "src" attribute. This prevents pre-loading it. The is:',t])};for(j=0;j=2?x(t):(t.onloadeddata=function(){return x(t)},t.onerror=function(e,r,n,o,i){return x(t,["Error loading video",t,"Error",i])},t.onstalled=function(){return x(t,["Loading video stalled, skipping",t])})};for(j=0;j tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The is:",n],"warning"),x(n);else{for(var l=d.createElement(n.tagName),f=(c=0,n.attributes.length);c tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the was not loaded. The is:",n],"warning"),x(n)},q=(j=0,F.length);j=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,r[p])("accessor"===c?{get:d.get,set:d.set}:d[l],h);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&o.unshift(s)}else(s=a(m))&&("field"===c?o.unshift(s):d[l]=s)}u&&Object.defineProperty(u,n.name,d),f=!0}function u(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(c,l):u(i[0][2],r)}catch(e){u(i[0][3],e)}var r}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function _(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return T(t,e),t}function D(e){return e&&e.__esModule?e:{default:e}}function E(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function R(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var Y="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function N(e){function t(t){e.error=e.hasError?new Y(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:o,__assign:i,__rest:a,__decorate:s,__param:c,__metadata:p,__awaiter:h,__generator:y,__createBinding:m,__exportStar:g,__values:b,__read:v,__spread:x,__spreadArrays:A,__spreadArray:w,__await:j,__asyncGenerator:C,__asyncDelegator:_,__asyncValues:P,__makeTemplateObject:S,__importStar:O,__importDefault:D,__classPrivateFieldGet:E,__classPrivateFieldSet:k,__classPrivateFieldIn:M,__addDisposableResource:R,__disposeResources:N}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.useReactToPrint=e.ReactToPrint=e.PrintContextConsumer=void 0;var t=r(328);Object.defineProperty(e,"PrintContextConsumer",{enumerable:!0,get:function(){return t.PrintContextConsumer}});var n=r(428);Object.defineProperty(e,"ReactToPrint",{enumerable:!0,get:function(){return n.ReactToPrint}});var o=r(892);Object.defineProperty(e,"useReactToPrint",{enumerable:!0,get:function(){return o.useReactToPrint}});var a=r(428);e.default=a.ReactToPrint}(),i}())},79739:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(98587),o=r(58168),i=r(9950),a=r(72004),s=r(3484),c=r(59254),l=r(18463),u=r(45558),d=r(1614);function f(e){return(0,d.Ay)("MuiDialogActions",e)}(0,u.A)("MuiDialogActions",["root","spacing"]);var p=r(44414);const h=["className","disableSpacing"],y=(0,c.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),m=i.forwardRef((function(e,t){const r=(0,l.b)({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:c=!1}=r,u=(0,n.A)(r,h),d=(0,o.A)({},r,{disableSpacing:c}),m=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,s.A)(n,f,t)})(d);return(0,p.jsx)(y,(0,o.A)({className:(0,a.A)(m.root,i),ownerState:d,ref:t},u))}))}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9912],{8457:e=>{"use strict";e.exports="data:image/png;base64,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"},39912:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var n=r(9950),o=r(28429),i=r(14857),a=r(47223),s=r(8457),c=r(26910),l=r(4159),u=r.n(l),d=(r(52351),r(8881)),f=r(58168);const p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M732 120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v148h440V120zm120 212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM664 844H360V568h304v276zm164-360c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-40c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v40z"}}]},name:"printer",theme:"filled"};var h=r(61187),y=function(e,t){return n.createElement(h.A,(0,f.A)({},e,{ref:t,icon:p}))};const m=n.forwardRef(y);var g=r(45418),b=r.n(g),v=r(43302),x=r(93230),A=r(83274),w=r(25333),j=r(82053),C=r(25277),_=r(10226),P=r(16491),S=r(60899),T=r(1320),O=r(15769),D=r(69780),E=r(9213),k=r(21671),M=r(34075),R=r(74745),Y=r(96583),N=r(40033),F=r(28170),I=r(29925),q=r(79739),U=r(44414);const z=()=>{const[e,t]=(0,n.useState)({}),r=(0,o.zy)(),l=(0,o.Zp)();console.log("previewSelect",r.state);const f=(0,n.useRef)(null),[p,h]=(0,n.useState)(!0),[y,g]=(0,n.useState)(!1),[z,B]=(0,n.useState)(""),[G,L]=(0,n.useState)(""),V=(0,i.A)(),J=(0,a.A)(V.breakpoints.down("md"));function Q(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(e)}(0,n.useEffect)((()=>{t(r.state)}),[]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(x.A,{direction:{xs:"column",md:"row"},justifyContent:"Space-between",alignItems:{xs:"stretch",md:"center"},spacing:2,sx:{px:{xs:1.5,md:2.5},py:1,bgcolor:"#eeeeee"},children:[(0,U.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:2,children:[(0,U.jsx)(A.A,{title:"back",children:(0,U.jsx)(w.A,{color:"primary",onClick:()=>{l("/nearle/invoice")},children:(0,U.jsx)(v.QVr,{size:"large"})})}),(0,U.jsxs)(x.A,{alignItems:"center",children:[(0,U.jsx)(j.A,{variant:"h3",color:"primary",children:"Invoice Details"}),(0,U.jsx)(C.A,{size:"small",color:"warning",variant:"outlined",sx:{bgcolor:V.palette.warning.lighter},label:"Invoice No :".concat("\xa0\xa0",e.invoiceno)})]})]}),(0,U.jsxs)(x.A,{direction:{xs:"column",sm:"row"},spacing:2,sx:{width:{xs:"100%",md:"auto"}},children:[(0,U.jsxs)(_.A,{variant:"outlined",color:"primary",fullWidth:J,sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"}},onClick:()=>{g(!0)},children:[" ",(0,U.jsx)(v.jtd,{}),"Update Payment"]}),(0,U.jsx)(b(),{trigger:()=>(0,U.jsx)(_.A,{size:"small",startIcon:(0,U.jsx)(m,{}),variant:"outlined",color:"primary",fullWidth:J,sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"}},children:"Print"}),content:()=>f.current})]})]}),(0,U.jsx)(P.A,{sx:{pb:2.5,border:"1px solid #eee",overflowX:{xs:"auto",md:"visible"}},children:(0,U.jsxs)("div",{ref:f,style:{width:"100%",minWidth:720},children:[(0,U.jsxs)(P.A,{id:"print",sx:{p:2.5},children:[(0,U.jsxs)(P.A,{sx:{pb:2.5},children:[(0,U.jsxs)(x.A,{sx:{flexDirection:"row",border:"1px solid #eee",px:3},justifyContent:"space-between",children:[(0,U.jsxs)(P.A,{sx:{pt:.5},children:[(0,U.jsxs)(x.A,{direction:"row",spacing:2,children:[(0,U.jsx)("img",{src:s,style:{width:"150px",height:"50px"}})," "]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{sx:{overflow:"hidden",color:V.palette.primary.main},variant:"subtitle1",children:"Invoice No :"}),(0,U.jsx)(j.A,{sx:{color:V.palette.primary.main},children:"\xa0\xa0".concat(e.invoiceno)})]})]}),(0,U.jsxs)(P.A,{sx:{pt:2.5,pb:1.75},children:[(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsxs)(j.A,{sx:{pl:4,color:V.palette.primary.main},variant:"subtitle1",children:["Date :"," "]}),(0,U.jsx)(j.A,{sx:{color:V.palette.primary.main},children:u()(e.transactiondate).format("DD-MM-YYYY")})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{sx:{pr:2,overflow:"hidden",color:V.palette.primary.main},variant:"subtitle1",children:"Due Date :"}),(0,U.jsx)(j.A,{sx:{color:V.palette.primary.main},children:u()(e.dueDate).format("DD-MM-YYYY")})]})]})]}),(0,U.jsx)(P.A,{sx:{pt:2.5},children:(0,U.jsxs)(S.Ay,{container:!0,spacing:2,justifyContent:"space-between",direction:"row",children:[(0,U.jsx)(S.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(P.A,{sx:{border:1,minHeight:240,borderColor:"grey.200",borderRadius:.5,p:2.5},children:(0,U.jsx)(S.Ay,{container:!0,direction:"row",children:(0,U.jsx)(S.Ay,{item:!0,md:8,children:(0,U.jsxs)(x.A,{spacing:2,children:[(0,U.jsx)(j.A,{variant:"h5",children:"From:"}),(0,U.jsxs)(x.A,{sx:{width:"100%"},children:[(0,U.jsx)(j.A,{variant:"subtitle1",children:"Nearle Technology Privite Limited."}),(0,U.jsxs)(j.A,{color:"secondary",children:["424, 4",(0,U.jsx)("sup",{children:"th"}),"floor,"]}),(0,U.jsx)(j.A,{color:"secondary",children:"Red rose towers,"}),(0,U.jsx)(j.A,{color:"secondary",children:"DB Road, RS Puram,"}),(0,U.jsx)(j.A,{color:"secondary",children:"641002."}),(0,U.jsx)(j.A,{color:"secondary",children:"care@nearle.in"}),(0,U.jsx)(j.A,{color:"secondary",children:"9047968666"})]})]})})})})}),(0,U.jsx)(S.Ay,{item:!0,xs:12,sm:6,children:(0,U.jsx)(P.A,{sx:{border:1,minHeight:240,borderColor:"grey.200",borderRadius:.5,p:2.5},children:(0,U.jsx)(S.Ay,{container:!0,direction:"row",children:(0,U.jsx)(S.Ay,{item:!0,md:8,children:(0,U.jsxs)(x.A,{spacing:2,children:[(0,U.jsx)(j.A,{variant:"h5",children:"To:"}),(0,U.jsxs)(x.A,{sx:{width:"100%"},children:[(0,U.jsx)(j.A,{variant:"subtitle1",children:e.tenantname}),(0,U.jsx)(j.A,{color:"secondary",children:e.address}),(0,U.jsx)(j.A,{color:"secondary",children:e.suburb}),(0,U.jsx)(j.A,{color:"secondary",children:e.city}),(0,U.jsx)(j.A,{color:"secondary",children:e.state})," "]})]})})})})})]})})]}),(0,U.jsx)(T.A,{children:(0,U.jsxs)(O.A,{children:[(0,U.jsx)(D.A,{children:(0,U.jsxs)(E.A,{children:[(0,U.jsx)(k.A,{children:"S.No"}),(0,U.jsx)(k.A,{children:"Particulars"}),(0,U.jsx)(k.A,{children:"Unit"}),(0,U.jsx)(k.A,{children:"Quantity"}),(0,U.jsx)(k.A,{align:"right",children:"Rate"}),(0,U.jsx)(k.A,{align:"right",children:"Other Charges"}),(0,U.jsx)(k.A,{align:"right",children:"Amount"})]})}),e.tenantsalesdetails&&(0,U.jsx)(M.A,{children:(0,U.jsxs)(E.A,{children:[(0,U.jsx)(k.A,{children:"1"}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{children:"Invoice from ".concat(u()(e.tenantsalesdetails[0].fromdate).format("DD-MM-YYYY")," to ").concat(u()(e.tenantsalesdetails[0].todate).format("DD-MM-YYYY"))})}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{children:e.tenantsalesdetails[0].pricingtype})}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{children:"".concat(e.tenantsalesdetails[0].quantity.toFixed(2)," km")})}),(0,U.jsx)(k.A,{children:(0,U.jsx)(j.A,{align:"right",children:"\u20b9 ".concat(e.tenantsalesdetails[0].baserate.toFixed(2))})}),(0,U.jsx)(k.A,{align:"right",children:(0,U.jsx)(j.A,{children:"\u20b9 ".concat(e.tenantsalesdetails[0].othercharges,".00")})}),(0,U.jsx)(k.A,{align:"right",children:(0,U.jsx)(j.A,{children:"\u20b9 ".concat(e.tenantsalesdetails[0].amount,".00")})})]})})]})}),(0,U.jsx)(R.A,{}),(0,U.jsx)(P.A,{sx:{p:2.5},children:(0,U.jsx)(S.Ay,{container:!0,direction:"row",justifyContent:"flex-end",children:(0,U.jsx)(S.Ay,{item:!0,md:4,children:(0,U.jsxs)(x.A,{spacing:2,children:[(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{color:"secondary",children:"Sub Total:"}),(0,U.jsx)(j.A,{variant:"h6",children:Q(e.salesamount)})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{color:"secondary",children:"Discount:"}),(0,U.jsxs)(j.A,{variant:"h6",color:V.palette.error.main,children:["- ",Q(e.discountamt)]})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{color:V.palette.grey[500],children:"Tax:"}),(0,U.jsxs)(j.A,{variant:"h6",color:V.palette.success.main,children:["+ ",Q(e.taxamount)]})]}),(0,U.jsxs)(x.A,{direction:"row",justifyContent:"space-between",children:[(0,U.jsx)(j.A,{sx:{pr:2},variant:"subtitle1",children:"Grand Total:"}),(0,U.jsx)(j.A,{variant:"h6",children:Q(Math.round(e.totalamount))})]})]})})})})]}),(0,U.jsx)(R.A,{}),(0,U.jsx)(P.A,{sx:{p:2.5},children:(0,U.jsxs)(j.A,{children:["Notes: ",e.remarks]})}),(0,U.jsx)(R.A,{})]})}),(0,U.jsxs)(Y.A,{open:y,onClose:()=>{g(!1)},maxWidth:"sm",fullWidth:!0,children:[(0,U.jsx)(N.A,{sx:{bgcolor:V.palette.primary.main},children:(0,U.jsxs)(x.A,{direction:"row",spacing:1,children:[(0,U.jsx)(j.A,{variant:"h2",sx:{color:"white"},children:"\u20b9"}),(0,U.jsx)(j.A,{variant:"h3",sx:{color:"white"},children:"Update Payment"})]})}),(0,U.jsxs)(F.A,{dividers:!0,children:[(0,U.jsxs)(x.A,{spacing:1,sx:{mb:2},children:[(0,U.jsx)(j.A,{children:"Reference No"}),(0,U.jsx)(I.A,{type:"number",placeholder:"Enter Reference Number",sx:{width:"100%"},onChange:e=>{B(e.target.value)}})]}),(0,U.jsxs)(x.A,{spacing:2,sx:{mb:2},children:[(0,U.jsx)(j.A,{children:"Remarks"}),(0,U.jsx)(I.A,{multiline:!0,required:!0,placeholder:"Enter Remarks",sx:{width:"100%"},onChange:e=>{L(e.target.value)}})]})]}),(0,U.jsxs)(q.A,{children:[(0,U.jsx)(_.A,{variant:"outlined",sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"},m:2},onClick:()=>{g(!1)},children:"Cancel"}),(0,U.jsx)(_.A,{variant:"outlined",disabled:""==z||""==G,sx:{"&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"},m:2},onClick:()=>{g(!1),(async()=>{try{const t=await c.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/invoice/updatestatus"),{salesid:e.salesid,referenceno:z,referencedate:u()().format("YYYY-MM-DD HH:mm:ss"),billstatus:2,paymentremarks:G});t.status&&(0,d.M8)(" Updated Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e3}),console.log("updateResponse",t)}catch(t){console.log("updateResponse",t)}})(),l("/nearle/invoice")},children:"Update"})]})]})]})}},45418:function(e,t,r){var n,o;"undefined"!=typeof self&&self,e.exports=(n=r(9950),o=r(17119),function(){"use strict";var e={328:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PrintContextConsumer=t.PrintContext=void 0;var n=r(496),o=Object.prototype.hasOwnProperty.call(n,"createContext");t.PrintContext=o?n.createContext({}):null,t.PrintContextConsumer=t.PrintContext?t.PrintContext.Consumer:function(){return null}},428:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ReactToPrint=void 0;var n=r(316),o=r(496),i=r(190),a=r(328),s=r(940),c=function(e){function t(){var t=e.apply(this,n.__spreadArray([],n.__read(arguments),!1))||this;return t.startPrint=function(e){var r=t.props,n=r.onAfterPrint,o=r.onPrintError,i=r.print,a=r.documentTitle;setTimeout((function(){var r,s;if(e.contentWindow)if(e.contentWindow.focus(),i)i(e).then((function(){return null==n?void 0:n()})).then((function(){return t.handleRemoveIframe()})).catch((function(e){o?o("print",e):t.logMessages(["An error was thrown by the specified `print` function"])}));else{if(e.contentWindow.print){var c=null!==(s=null===(r=e.contentDocument)||void 0===r?void 0:r.title)&&void 0!==s?s:"",l=e.ownerDocument.title;a&&(e.ownerDocument.title=a,e.contentDocument&&(e.contentDocument.title=a)),e.contentWindow.print(),a&&(e.ownerDocument.title=l,e.contentDocument&&(e.contentDocument.title=c))}else t.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==n||n(),t.handleRemoveIframe()}else t.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},t.triggerPrint=function(e){var r=t.props,n=r.onBeforePrint,o=r.onPrintError;if(n){var i=n();i&&"function"==typeof i.then?i.then((function(){t.startPrint(e)})).catch((function(e){o&&o("onBeforePrint",e)})):t.startPrint(e)}else t.startPrint(e)},t.handlePrint=function(e){var r=t.props,o=r.bodyClass,a=r.content,s=r.copyStyles,c=r.fonts,l=r.pageStyle,u=r.nonce,d="function"==typeof e?e():null;if(d&&"function"==typeof a&&t.logMessages(['"react-to-print" received a `content` prop and a content param passed the callback return by `useReactToPrint. The `content` prop will be ignored.'],"warning"),d||"function"!=typeof a||(d=a()),void 0!==d)if(null!==d){var f=document.createElement("iframe");f.width="".concat(document.documentElement.clientWidth,"px"),f.height="".concat(document.documentElement.clientHeight,"px"),f.style.position="absolute",f.style.top="-".concat(document.documentElement.clientHeight+100,"px"),f.style.left="-".concat(document.documentElement.clientWidth+100,"px"),f.id="printWindow",f.srcdoc="";var p=(0,i.findDOMNode)(d);if(p){var h=p.cloneNode(!0),y=h instanceof Text,m=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),g=y?[]:h.querySelectorAll("img"),b=y?[]:h.querySelectorAll("video"),v=c?c.length:0;t.numResourcesToLoad=m.length+g.length+b.length+v,t.resourcesLoaded=[],t.resourcesErrored=[];var x=function(e,r){t.resourcesLoaded.includes(e)?t.logMessages(["Tried to mark a resource that has already been handled",e],"debug"):(r?(t.logMessages(n.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],n.__read(r),!1)),t.resourcesErrored.push(e)):t.resourcesLoaded.push(e),t.resourcesLoaded.length+t.resourcesErrored.length===t.numResourcesToLoad&&t.triggerPrint(f))};f.onload=function(){var e,r,i,a;f.onload=null;var d=f.contentDocument||(null===(r=f.contentWindow)||void 0===r?void 0:r.document);if(d){d.body.appendChild(h),c&&((null===(i=f.contentDocument)||void 0===i?void 0:i.fonts)&&(null===(a=f.contentWindow)||void 0===a?void 0:a.FontFace)?c.forEach((function(e){var t=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});f.contentDocument.fonts.add(t),t.loaded.then((function(){x(t)})).catch((function(e){x(t,["Failed loading the font:",t,"Load error:",e])}))})):(c.forEach((function(e){return x(e)})),t.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var m="function"==typeof l?l():l;if("string"!=typeof m)t.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof m,'". Styles from `pageStyle` will not be applied.')]);else{var v=d.createElement("style");u&&(v.setAttribute("nonce",u),d.head.setAttribute("nonce",u)),v.appendChild(d.createTextNode(m)),d.head.appendChild(v)}if(o&&(e=d.body.classList).add.apply(e,n.__spreadArray([],n.__read(o.split(" ")),!1)),!y){for(var A=y?[]:p.querySelectorAll("canvas"),w=d.querySelectorAll("canvas"),j=0;j",t,"Error",i])},n.src=r}else x(t,['Found an tag with an empty "src" attribute. This prevents pre-loading it. The is:',t])};for(j=0;j=2?x(t):(t.onloadeddata=function(){return x(t)},t.onerror=function(e,r,n,o,i){return x(t,["Error loading video",t,"Error",i])},t.onstalled=function(){return x(t,["Loading video stalled, skipping",t])})};for(j=0;j tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The is:",n],"warning"),x(n);else{for(var l=d.createElement(n.tagName),f=(c=0,n.attributes.length);c tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the was not loaded. The is:",n],"warning"),x(n)},q=(j=0,F.length);j=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,r[p])("accessor"===c?{get:d.get,set:d.set}:d[l],h);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&o.unshift(s)}else(s=a(m))&&("field"===c?o.unshift(s):d[l]=s)}u&&Object.defineProperty(u,n.name,d),f=!0}function u(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(c,l):u(i[0][2],r)}catch(e){u(i[0][3],e)}var r}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function _(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return T(t,e),t}function D(e){return e&&e.__esModule?e:{default:e}}function E(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function R(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var Y="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function N(e){function t(t){e.error=e.hasError?new Y(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:o,__assign:i,__rest:a,__decorate:s,__param:c,__metadata:p,__awaiter:h,__generator:y,__createBinding:m,__exportStar:g,__values:b,__read:v,__spread:x,__spreadArrays:A,__spreadArray:w,__await:j,__asyncGenerator:C,__asyncDelegator:_,__asyncValues:P,__makeTemplateObject:S,__importStar:O,__importDefault:D,__classPrivateFieldGet:E,__classPrivateFieldSet:k,__classPrivateFieldIn:M,__addDisposableResource:R,__disposeResources:N}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.useReactToPrint=e.ReactToPrint=e.PrintContextConsumer=void 0;var t=r(328);Object.defineProperty(e,"PrintContextConsumer",{enumerable:!0,get:function(){return t.PrintContextConsumer}});var n=r(428);Object.defineProperty(e,"ReactToPrint",{enumerable:!0,get:function(){return n.ReactToPrint}});var o=r(892);Object.defineProperty(e,"useReactToPrint",{enumerable:!0,get:function(){return o.useReactToPrint}});var a=r(428);e.default=a.ReactToPrint}(),i}())},79739:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(98587),o=r(58168),i=r(9950),a=r(72004),s=r(3484),c=r(59254),l=r(18463),u=r(45558),d=r(1614);function f(e){return(0,d.Ay)("MuiDialogActions",e)}(0,u.A)("MuiDialogActions",["root","spacing"]);var p=r(44414);const h=["className","disableSpacing"],y=(0,c.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),m=i.forwardRef((function(e,t){const r=(0,l.b)({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:c=!1}=r,u=(0,n.A)(r,h),d=(0,o.A)({},r,{disableSpacing:c}),m=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,s.A)(n,f,t)})(d);return(0,p.jsx)(y,(0,o.A)({className:(0,a.A)(m.root,i),ownerState:d,ref:t},u))}))}}]); \ No newline at end of file diff --git a/build/static/js/main.a651017e.js b/build/static/js/main.a651017e.js new file mode 100644 index 0000000..a17256d --- /dev/null +++ b/build/static/js/main.a651017e.js @@ -0,0 +1,2 @@ +/*! For license information please see main.a651017e.js.LICENSE.txt */ +(()=>{var e={249:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(59254),c=n(18463),u=n(13372),d=n(45558),f=n(1614);function p(e){return(0,f.Ay)("MuiList",e)}(0,d.A)("MuiList",["root","padding","dense","subheader"]);var h=n(44414);const m=["children","className","component","dense","disablePadding","subheader"],g=(0,l.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,o.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),v=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiList"}),{children:l,className:d,component:f="ul",dense:v=!1,disablePadding:b=!1,subheader:y}=n,w=(0,r.A)(n,m),A=i.useMemo((()=>({dense:v})),[v]),x=(0,o.A)({},n,{component:f,dense:v,disablePadding:b}),S=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,s.A)(i,p,t)})(x);return(0,h.jsx)(u.A.Provider,{value:A,children:(0,h.jsxs)(g,(0,o.A)({as:f,className:(0,a.A)(S.root,d),ref:t,ownerState:x},w,{children:[y,l]}))})}))},1018:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;td,Gh:()=>j,HS:()=>L,Oi:()=>s,Rr:()=>f,pX:()=>F,pb:()=>_,rc:()=>o,tH:()=>D,ue:()=>m,yD:()=>I,zR:()=>a}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(e){return void 0===e&&(e={}),p((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return u("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:d(t)}),null,e)}function s(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function l(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?f(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function p(e,t,n,a){void 0===a&&(a={});let{window:l=document.defaultView,v5Compat:f=!1}=a,p=l.history,h=o.Pop,m=null,g=v();function v(){return(p.state||{idx:null}).idx}function b(){h=o.Pop;let e=v(),t=null==e?null:e-g;g=e,m&&m({action:h,location:w.location,delta:t})}function y(e){let t="null"!==l.location.origin?l.location.origin:l.location.href,n="string"===typeof e?e:d(e);return n=n.replace(/ $/,"%20"),s(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,p.replaceState(r({},p.state,{idx:g}),""));let w={get action(){return h},get location(){return e(l,p)},listen(e){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(i,b),m=e,()=>{l.removeEventListener(i,b),m=null}},createHref:e=>t(l,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){h=o.Push;let r=u(w.location,e,t);n&&n(r,e),g=v()+1;let i=c(r,g),a=w.createHref(r);try{p.pushState(i,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;l.location.assign(a)}f&&m&&m({action:h,location:w.location,delta:1})},replace:function(e,t){h=o.Replace;let r=u(w.location,e,t);n&&n(r,e),g=v();let i=c(r,g),a=w.createHref(r);p.replaceState(i,"",a),f&&m&&m({action:h,location:w.location,delta:0})},go:e=>p.go(e)};return w}var h;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(h||(h={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function m(e,t,n){return void 0===n&&(n="/"),g(e,t,n,!1)}function g(e,t,n,r){let o=_(("string"===typeof t?f(t):t).pathname||"/",n);if(null==o)return null;let i=v(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let s=0;null==a&&s{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(s(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let l=L([r,a.relativePath]),c=n.concat(a);e.children&&e.children.length>0&&(s(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),v(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:C(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of b(e.path))o(e,t,r);else o(e,t)})),t}function b(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=b(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const y=/^:[\w-]+$/,w=3,A=2,x=1,S=10,E=-2,k=e=>"*"===e;function C(e,t){let n=e.split("/"),r=n.length;return n.some(k)&&(r+=E),t&&(r+=A),n.filter((e=>!k(e))).reduce(((e,t)=>e+(y.test(t)?w:""===t?x:S)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return l(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function _(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function M(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function P(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function I(e,t){let n=P(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function j(e,t,n,o){let i;void 0===o&&(o=!1),"string"===typeof e?i=f(e):(i=r({},e),s(!i.pathname||!i.pathname.includes("?"),M("?","pathname","search",i)),s(!i.pathname||!i.pathname.includes("#"),M("#","pathname","hash",i)),s(!i.search||!i.search.includes("#"),M("#","search","hash",i)));let a,l=""===e||""===i.pathname,c=l?"/":i.pathname;if(null==c)a=n;else{let e=t.length-1;if(!o&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?f(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:B(r),hash:z(o)}}(i,a),d=c&&"/"!==c&&c.endsWith("/"),p=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!p||(u.pathname+="/"),u}const L=e=>e.join("/").replace(/\/\/+/g,"/"),N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class D extends Error{}function F(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const H=["post","put","patch","delete"],W=(new Set(H),["get",...H]);new Set(W),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},1352:(e,t,n)=>{"use strict";var r=n(17119);t.H=r.createRoot,r.hydrateRoot},1614:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>i});var r=n(41644);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i=o[t];return i?"".concat(n,"-").concat(i):"".concat(r.A.generate(e),"-").concat(t)}},1849:(e,t,n)=>{"use strict";n.d(t,{A:()=>He});var r=n(58168),o=n(98587),i=n(25329),a=n(9950),s=n(49456),l=n(95034),c=n(61262);function u(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function d(e){return e instanceof u(e).Element||e instanceof Element}function f(e){return e instanceof u(e).HTMLElement||e instanceof HTMLElement}function p(e){return"undefined"!==typeof ShadowRoot&&(e instanceof u(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,m=Math.min,g=Math.round;function v(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function b(){return!/^((?!chrome|android).)*safari/i.test(v())}function y(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&f(e)&&(o=e.offsetWidth>0&&g(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&g(r.height)/e.offsetHeight||1);var a=(d(e)?u(e):window).visualViewport,s=!b()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,p=r.width/o,h=r.height/i;return{width:p,height:h,top:c,right:l+p,bottom:c+h,left:l,x:l,y:c}}function w(e){var t=u(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function A(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){return((d(e)?e.ownerDocument:e.document)||window.document).documentElement}function S(e){return y(x(e)).left+w(e).scrollLeft}function E(e){return u(e).getComputedStyle(e)}function k(e){var t=E(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function C(e,t,n){void 0===n&&(n=!1);var r=f(t),o=f(t)&&function(e){var t=e.getBoundingClientRect(),n=g(t.width)/e.offsetWidth||1,r=g(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=x(t),a=y(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==A(t)||k(i))&&(s=function(e){return e!==u(e)&&f(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:w(e);var t}(t)),f(t)?((l=y(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=S(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function O(e){var t=y(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function T(e){return"html"===A(e)?e:e.assignedSlot||e.parentNode||(p(e)?e.host:null)||x(e)}function R(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:f(e)&&k(e)?e:R(T(e))}function _(e,t){var n;void 0===t&&(t=[]);var r=R(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=u(r),a=o?[i].concat(i.visualViewport||[],k(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(_(T(a)))}function M(e){return["table","td","th"].indexOf(A(e))>=0}function P(e){return f(e)&&"fixed"!==E(e).position?e.offsetParent:null}function I(e){for(var t=u(e),n=P(e);n&&M(n)&&"static"===E(n).position;)n=P(n);return n&&("html"===A(n)||"body"===A(n)&&"static"===E(n).position)?t:n||function(e){var t=/firefox/i.test(v());if(/Trident/i.test(v())&&f(e)&&"fixed"===E(e).position)return null;var n=T(e);for(p(n)&&(n=n.host);f(n)&&["html","body"].indexOf(A(n))<0;){var r=E(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var j="top",L="bottom",N="right",B="left",z="auto",D=[j,L,N,B],F="start",H="end",W="viewport",U="popper",V=D.reduce((function(e,t){return e.concat([t+"-"+F,t+"-"+H])}),[]),G=[].concat(D,[z]).reduce((function(e,t){return e.concat([t,t+"-"+F,t+"-"+H])}),[]),q=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function K(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function X(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Y={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function ne(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?$(o):null,a=o?ee(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case j:t={x:s,y:n.y-r.height};break;case L:t={x:s,y:n.y+n.height};break;case N:t={x:n.x+n.width,y:l};break;case B:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?te(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case F:t[c]=t[c]-(n[u]/2-r[u]/2);break;case H:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oe(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,v=void 0===m?0:m,b="function"===typeof d?d({x:h,y:v}):{x:h,y:v};h=b.x,v=b.y;var y=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),A=B,S=j,k=window;if(c){var C=I(n),O="clientHeight",T="clientWidth";if(C===u(n)&&"static"!==E(C=x(n)).position&&"absolute"===s&&(O="scrollHeight",T="scrollWidth"),o===j||(o===B||o===N)&&i===H)S=L,v-=(f&&C===k&&k.visualViewport?k.visualViewport.height:C[O])-r.height,v*=l?1:-1;if(o===B||(o===j||o===L)&&i===H)A=N,h-=(f&&C===k&&k.visualViewport?k.visualViewport.width:C[T])-r.width,h*=l?1:-1}var R,_=Object.assign({position:s},c&&re),M=!0===d?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:g(n*o)/o||0,y:g(r*o)/o||0}}({x:h,y:v},u(n)):{x:h,y:v};return h=M.x,v=M.y,l?Object.assign({},_,((R={})[S]=w?"0":"",R[A]=y?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",R)):Object.assign({},_,((t={})[S]=w?v+"px":"",t[A]=y?h+"px":"",t.transform="",t))}const ie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=G.reduce((function(e,n){return e[n]=function(e,t,n){var r=$(e),o=[B,j].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[B,N].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var ae={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return ae[e]}))}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ue(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&p(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function de(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fe(e,t,n){return t===W?de(function(e,t){var n=u(e),r=x(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=b();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+S(e),y:l}}(e,n)):d(t)?function(e,t){var n=y(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):de(function(e){var t,n=x(e),r=w(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=h(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+S(e),l=-r.scrollTop;return"rtl"===E(o||n).direction&&(s+=h(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(x(e)))}function pe(e,t,n,r){var o="clippingParents"===t?function(e){var t=_(T(e)),n=["absolute","fixed"].indexOf(E(e).position)>=0&&f(e)?I(e):e;return d(n)?t.filter((function(e){return d(e)&&ue(e,n)&&"body"!==A(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=fe(e,n,r);return t.top=h(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),fe(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function he(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function me(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ge(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?W:c,f=n.elementContext,p=void 0===f?U:f,h=n.altBoundary,m=void 0!==h&&h,g=n.padding,v=void 0===g?0:g,b=he("number"!==typeof v?v:me(v,D)),w=p===U?"reference":U,A=e.rects.popper,S=e.elements[m?w:p],E=pe(d(S)?S:S.contextElement||x(e.elements.popper),l,u,a),k=y(e.elements.reference),C=ne({reference:k,element:A,strategy:"absolute",placement:o}),O=de(Object.assign({},A,C)),T=p===U?O:k,R={top:E.top-T.top+b.top,bottom:T.bottom-E.bottom+b.bottom,left:E.left-T.left+b.left,right:T.right-E.right+b.right},_=e.modifiersData.offset;if(p===U&&_){var M=_[o];Object.keys(R).forEach((function(e){var t=[N,L].indexOf(e)>=0?1:-1,n=[j,L].indexOf(e)>=0?"y":"x";R[e]+=M[n]*t}))}return R}function ve(e,t,n){return h(e,m(t,n))}const be={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,g=n.tetherOffset,v=void 0===g?0:g,b=ge(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=$(t.placement),w=ee(t.placement),A=!w,x=te(y),S="x"===x?"y":"x",E=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,T="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,R="number"===typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(E){if(i){var P,z="y"===x?j:B,D="y"===x?L:N,H="y"===x?"height":"width",W=E[x],U=W+b[z],V=W-b[D],G=p?-C[H]/2:0,q=w===F?k[H]:C[H],K=w===F?-C[H]:-k[H],X=t.elements.arrow,Y=p&&X?O(X):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=Q[z],J=Q[D],ne=ve(0,k[H],Y[H]),re=A?k[H]/2-G-ne-Z-R.mainAxis:q-ne-Z-R.mainAxis,oe=A?-k[H]/2+G+ne+J+R.mainAxis:K+ne+J+R.mainAxis,ie=t.elements.arrow&&I(t.elements.arrow),ae=ie?"y"===x?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(P=null==_?void 0:_[x])?P:0,le=W+oe-se,ce=ve(p?m(U,W+re-se-ae):U,W,p?h(V,le):V);E[x]=ce,M[x]=ce-W}if(s){var ue,de="x"===x?j:B,fe="x"===x?L:N,pe=E[S],he="y"===S?"height":"width",me=pe+b[de],be=pe-b[fe],ye=-1!==[j,B].indexOf(y),we=null!=(ue=null==_?void 0:_[S])?ue:0,Ae=ye?me:pe-k[he]-C[he]-we+R.altAxis,xe=ye?pe+k[he]+C[he]-we-R.altAxis:be,Se=p&&ye?function(e,t,n){var r=ve(e,t,n);return r>n?n:r}(Ae,pe,xe):ve(p?Ae:me,pe,p?xe:be);E[S]=Se,M[S]=Se-pe}t.modifiersData[r]=M}},requiresIfExists:["offset"]};const ye={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=$(n.placement),l=te(s),c=[B,N].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return he("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:me(e,D))}(o.padding,n),d=O(i),f="y"===l?j:B,p="y"===l?L:N,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=I(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,y=u[f],w=v-d[c]-u[p],A=v/2-d[c]/2+b,x=ve(y,A,w),S=l;n.modifiersData[r]=((t={})[S]=x,t.centerOffset=x-A,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ue(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ae(e){return[j,N,L,B].some((function(t){return e[t]>=0}))}var xe=Z({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=u(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,J)})),s&&l.addEventListener("resize",n.update,J),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,J)})),s&&l.removeEventListener("resize",n.update,J)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ne({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:$(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,oe(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,oe(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];f(o)&&A(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});f(r)&&A(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},ie,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=$(g),b=l||(v===g||!h?[se(g)]:function(e){if($(e)===z)return[];var t=se(e);return[ce(e),t,ce(t)]}(g)),y=[g].concat(b).reduce((function(e,n){return e.concat($(n)===z?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?G:l,u=ee(r),d=u?s?V:V.filter((function(e){return ee(e)===u})):D,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=ge(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[$(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,A=t.rects.popper,x=new Map,S=!0,E=y[0],k=0;k=0,_=R?"width":"height",M=ge(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=R?T?N:B:T?L:j;w[_]>A[_]&&(P=se(P));var I=se(P),H=[];if(i&&H.push(M[O]<=0),s&&H.push(M[P]<=0,M[I]<=0),H.every((function(e){return e}))){E=C,S=!1;break}x.set(C,H)}if(S)for(var W=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},U=h?3:1;U>0;U--){if("break"===W(U))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},be,ye,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ge(t,{elementContext:"reference"}),s=ge(t,{altBoundary:!0}),l=we(a,r),c=we(s,o,i),u=Ae(l),d=Ae(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Se=n(3484),Ee=n(70134),ke=n(96039),Ce=n(45558),Oe=n(1614);function Te(e){return(0,Oe.Ay)("MuiPopper",e)}(0,Ce.A)("MuiPopper",["root"]);var Re=n(44414);const _e=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Me=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Pe(e){return"function"===typeof e?e():e}function Ie(e){return void 0!==e.nodeType}const je={},Le=a.forwardRef((function(e,t){var n;const{anchorEl:i,children:c,direction:u,disablePortal:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:g,slotProps:v={},slots:b={},TransitionProps:y}=e,w=(0,o.A)(e,_e),A=a.useRef(null),x=(0,s.A)(A,t),S=a.useRef(null),E=(0,s.A)(S,g),k=a.useRef(E);(0,l.A)((()=>{k.current=E}),[E]),a.useImperativeHandle(g,(()=>S.current),[]);const C=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(h,u),[O,T]=a.useState(C),[R,_]=a.useState(Pe(i));a.useEffect((()=>{S.current&&S.current.forceUpdate()})),a.useEffect((()=>{i&&_(Pe(i))}),[i]),(0,l.A)((()=>{if(!R||!p)return;let e=[{name:"preventOverflow",options:{altBoundary:d}},{name:"flip",options:{altBoundary:d}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;T(t.placement)}}];null!=f&&(e=e.concat(f)),m&&null!=m.modifiers&&(e=e.concat(m.modifiers));const t=xe(R,A.current,(0,r.A)({placement:C},m,{modifiers:e}));return k.current(t),()=>{t.destroy(),k.current(null)}}),[R,d,f,p,m,C]);const M={placement:O};null!==y&&(M.TransitionProps=y);const P=(e=>{const{classes:t}=e;return(0,Se.A)({root:["root"]},Te,t)})(e),I=null!=(n=b.root)?n:"div",j=(0,Ee.A)({elementType:I,externalSlotProps:v.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:P.root});return(0,Re.jsx)(I,(0,r.A)({},j,{children:"function"===typeof c?c(M):c}))})),Ne=a.forwardRef((function(e,t){const{anchorEl:n,children:i,container:s,direction:l="ltr",disablePortal:u=!1,keepMounted:d=!1,modifiers:f,open:p,placement:h="bottom",popperOptions:m=je,popperRef:g,style:v,transition:b=!1,slotProps:y={},slots:w={}}=e,A=(0,o.A)(e,Me),[x,S]=a.useState(!0);if(!d&&!p&&(!b||x))return null;let E;if(s)E=s;else if(n){const e=Pe(n);E=e&&Ie(e)?(0,c.A)(e).body:(0,c.A)(null).body}const k=p||!d||b&&!x?void 0:"none",C=b?{in:p,onEnter:()=>{S(!1)},onExited:()=>{S(!0)}}:void 0;return(0,Re.jsx)(ke.A,{disablePortal:u,container:E,children:(0,Re.jsx)(Le,(0,r.A)({anchorEl:n,direction:l,disablePortal:u,modifiers:f,ref:t,open:b?!x:p,placement:h,popperOptions:m,popperRef:g,slotProps:y,slots:w},A,{style:(0,r.A)({position:"fixed",top:0,left:0,display:k},v),TransitionProps:C,children:i}))})}));var Be=n(59254),ze=n(18463);const De=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Fe=(0,Be.Ay)(Ne,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),He=a.forwardRef((function(e,t){var n;const a=(0,i.A)(),s=(0,ze.b)({props:e,name:"MuiPopper"}),{anchorEl:l,component:c,components:u,componentsProps:d,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:v,popperOptions:b,popperRef:y,transition:w,slots:A,slotProps:x}=s,S=(0,o.A)(s,De),E=null!=(n=null==A?void 0:A.root)?n:null==u?void 0:u.Root,k=(0,r.A)({anchorEl:l,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:v,popperOptions:b,popperRef:y,transition:w},S);return(0,Re.jsx)(Fe,(0,r.A)({as:c,direction:null==a?void 0:a.direction,slots:{root:E},slotProps:null!=x?x:d},k,{ref:t}))}))},1976:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(59520).A},2235:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(99269),c=n(59254);const u=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var d=n(18463),f=n(45558),p=n(1614);function h(e){return(0,p.Ay)("MuiPaper",e)}(0,f.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(44414);const g=["className","component","elevation","square","variant"],v=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,o.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,o.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,l.X4)("#fff",u(n.elevation)),", ").concat((0,l.X4)("#fff",u(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),b=i.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiPaper"}),{className:i,component:l="div",elevation:c=1,square:u=!1,variant:f="elevation"}=n,p=(0,r.A)(n,g),b=(0,o.A)({},n,{component:l,elevation:c,square:u,variant:f}),y=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,s.A)(i,h,o)})(b);return(0,m.jsx)(v,(0,o.A)({as:l,ownerState:b,className:(0,a.A)(y.root,i),ref:t},p))}))},2887:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}}},3484:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}n.d(t,{A:()=>r})},3888:(e,t,n)=>{"use strict";function r(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}n.d(t,{A:()=>r})},3911:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},4635:(e,t,n)=>{var r=n(14759).Symbol;e.exports=r},6171:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,b:()=>s});var r=n(9950),o=n(73808),i=n(44414);const a=r.createContext(void 0);function s(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,o.A)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,o.A)(i,r)}({props:t,name:n,theme:{components:r.useContext(a)}})}const l=function(e){let{value:t,children:n}=e;return(0,i.jsx)(a.Provider,{value:t,children:n})}},6538:(e,t,n)=>{"use strict";e.exports=n(60759)},7148:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(12860),o=n(90357);const i=(0,r.A)();const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;return(0,o.A)(e)}},8195:(e,t,n)=>{"use strict";function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},8881:(e,t,n)=>{"use strict";n.d(t,{n:()=>He,mk:()=>_e,M8:()=>Re});var r=n(9950),o=n(17119);function i(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||s,c=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,u=/\/\*[^]*?\*\/| +/g,d=/\n+/g,f=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?f(a,i):i+"{"+f(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=f(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=f.p?f.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},p={},h=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+h(e[n]);return t}return e},m=(e,t,n,r,o)=>{let i=h(e),a=p[i]||(p[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!p[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=c.exec(e.replace(u,""));)t[4]?r.shift():t[3]?(n=t[3].replace(d," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(d," ").trim();return r[0]})(e);p[a]=f(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&p.g?p.g:null;return n&&(p.g=p[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(p[a],t,r,s),a};function g(e){let t=this||{},n=e.call?e(t.p):e;return m(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":f(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,l(t.target),t.g,t.o,t.k)}g.bind({g:1}),g.bind({k:1});function v(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var S=function(){return""},E=r.createContext({enqueueSnackbar:S,closeSnackbar:S}),k="@media (max-width:599.95px)",C="@media (min-width:600px)",O=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},T=function(e){return""+O(e.vertical)+O(e.horizontal)},R=function(e){return!!e||0===e},_="unmounted",M="exited",P="entering",I="entered",j="exiting",L=function(e){function t(t){var n;n=e.call(this,t)||this;var r,o=t.appear;return n.appearStatus=null,t.in?o?(r=M,n.appearStatus=P):r=I:r=t.unmountOnExit||t.mountOnEnter?_:M,n.state={status:r},n.nextCallback=null,n}w(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_?{status:M}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==P&&n!==I&&(t=P):n!==P&&n!==I||(t=j)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!==typeof e&&"string"!==typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===P?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===M&&this.setState({status:_})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,o=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:P},(function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(o.enter,(function(){t.safeSetState({status:I},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))}))}))):this.safeSetState({status:I},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:j},(function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:M},(function(){e.props.onExited&&e.props.onExited(e.node)}))}))}))):this.safeSetState({status:M},(function(){e.props.onExited&&e.props.onExited(e.node)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_)return null;var t=this.props;return(0,t.children)(e,A(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},b(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(r.Component);function N(){}function B(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function z(e,t){return(0,r.useMemo)((function(){return null==e&&null==t?null:function(n){B(e,n),B(t,n)}}),[e,t])}function D(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,o=e.mode;return{duration:"object"===typeof t?t[o]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}L.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:N,onEntering:N,onEntered:N,onExit:N,onExiting:N,onExited:N};var F="cubic-bezier(0.4, 0, 0.2, 1)",H="cubic-bezier(0.0, 0, 0.2, 1)",W="cubic-bezier(0.4, 0, 0.6, 1)",U=function(e){e.scrollTop=e.scrollTop},V=function(e){return Math.round(e)+"ms"};function G(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,o=void 0===r?300:r,i=n.easing,a=void 0===i?F:i,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map((function(e){var t="string"===typeof o?o:V(o),n="string"===typeof l?l:V(l);return e+" "+t+" "+a+" "+n})).join(",")}function q(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function K(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),o=q(t);if(t.fakeTransform)n=t.fakeTransform;else{var i=o.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"===typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(o.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(o.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var X=(0,r.forwardRef)((function(e,t){var n=e.children,o=e.direction,i=void 0===o?"down":o,a=e.in,s=e.style,l=e.timeout,c=void 0===l?0:l,u=e.onEnter,d=e.onEntered,f=e.onExit,p=e.onExited,h=A(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),m=(0,r.useRef)(null),g=z(n.ref,m),v=z(g,t),b=(0,r.useCallback)((function(){m.current&&K(i,m.current)}),[i]);return(0,r.useEffect)((function(){if(!a&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(y({},e,{queue:[].concat(e.queue,[f])}))})),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?y({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?y({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),y({},e,{open:!1})):y({},e,{requestClose:!0}))}));return y({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!R(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.id===r?y({},e,{entered:!0}):y({},e)}))}}))},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.id===r?e.entered?y({},e,{open:!1}):y({},e,{requestClose:!0}):y({},e)})),queue:n.filter((function(e){return e.id!==r}))}}))},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.id===e}));R(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!R(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var r=n.processQueue(y({},e,{snacks:e.snacks.filter((function(e){return e.id!==t}))}));return 0===r.queue.length?r:n.handleDismissOldest(r)}))},Re=n.enqueueSnackbar,_e=n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(x(n)),closeSnackbar:n.closeSnackbar.bind(x(n))}},n}return w(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,i=n.domRoot,a=n.children,s=n.dense,l=void 0!==s&&s,c=n.Components,u=void 0===c?{}:c,d=n.classes,f=this.state.snacks.reduce((function(e,t){var n,r=T(t.anchorOrigin),o=e[r]||[];return y({},e,((n={})[r]=[].concat(o,[t]),n))}),{}),p=Object.keys(f).map((function(t){var n=f[t],o=n[0];return r.createElement(De,{key:t,dense:l,anchorOrigin:o.anchorOrigin,classes:d},n.map((function(t){return r.createElement(Ie,{key:t.id,snack:t,classes:d,Component:u[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:he([e.handleExitedSnack,e.props.onExited],t.id),onEntered:he([e.handleEnteredSnack,e.props.onEntered],t.id)})})))}));return r.createElement(E.Provider,{value:t},a,i?(0,o.createPortal)(p,i):p)},b(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||ee.maxSnack}}]),t}(r.Component)},9083:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},9417:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},9593:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var o=r(n(79526)),i=n(44414);t.A=(0,o.default)((0,i.jsx)("path",{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0"}),"WifiOff")},9845:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},9950:(e,t,n)=>{"use strict";e.exports=n(32049)},10031:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(11942),o=n.n(r);const i=(e,t)=>{switch(t){case"secondary":return e.customShadows.secondary;case"error":return e.customShadows.error;case"warning":return e.customShadows.warning;case"info":return e.customShadows.info;case"success":return e.customShadows.success;case"primaryButton":return e.customShadows.primaryButton;case"secondaryButton":return e.customShadows.secondaryButton;case"errorButton":return e.customShadows.errorButton;case"warningButton":return e.customShadows.warningButton;case"infoButton":return e.customShadows.infoButton;case"successButton":return e.customShadows.successButton;default:return e.customShadows.primary}};i.propTypes={theme:o().object,shadow:o().string};const a=i},10226:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(33136),l=n(3484),c=n(99269),u=n(59254),d=n(19608),f=n(18463),p=n(24184),h=n(89548),m=n(45558),g=n(1614);function v(e){return(0,g.Ay)("MuiButton",e)}const b=(0,m.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const y=i.createContext({});const w=i.createContext(void 0);var A=n(44414);const x=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],S=e=>(0,o.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),E=(0,u.Ay)(p.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,h.A)(n.color))],t["size".concat((0,h.A)(n.size))],t["".concat(n.variant,"Size").concat((0,h.A)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,i;const a="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],s="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,o.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,o.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,c.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,c.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,c.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,o.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(b.focusVisible)]:(0,o.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(b.disabled)]:(0,o.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,c.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:a,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(b.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(b.disabled)]:{boxShadow:"none"}}})),k=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,h.A)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},S(t))})),C=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,h.A)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},S(t))})),O=i.forwardRef((function(e,t){const n=i.useContext(y),c=i.useContext(w),u=(0,s.A)(n,e),d=(0,f.b)({props:u,name:"MuiButton"}),{children:p,color:m="primary",component:g="button",className:b,disabled:S=!1,disableElevation:O=!1,disableFocusRipple:T=!1,endIcon:R,focusVisibleClassName:_,fullWidth:M=!1,size:P="medium",startIcon:I,type:j,variant:L="text"}=d,N=(0,r.A)(d,x),B=(0,o.A)({},d,{color:m,component:g,disabled:S,disableElevation:O,disableFocusRipple:T,fullWidth:M,size:P,type:j,variant:L}),z=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,classes:s}=e,c={root:["root",a,"".concat(a).concat((0,h.A)(t)),"size".concat((0,h.A)(i)),"".concat(a,"Size").concat((0,h.A)(i)),"color".concat((0,h.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,h.A)(i))],endIcon:["icon","endIcon","iconSize".concat((0,h.A)(i))]},u=(0,l.A)(c,v,s);return(0,o.A)({},s,u)})(B),D=I&&(0,A.jsx)(k,{className:z.startIcon,ownerState:B,children:I}),F=R&&(0,A.jsx)(C,{className:z.endIcon,ownerState:B,children:R}),H=c||"";return(0,A.jsxs)(E,(0,o.A)({ownerState:B,className:(0,a.A)(n.className,z.root,b,H),component:g,disabled:S,focusRipple:!T,focusVisibleClassName:(0,a.A)(z.focusVisible,_),ref:t,type:j},N,{classes:z,children:[D,p,F]}))}))},11359:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:f(e)?2:p(e)?3:0}function l(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===s(e)?e.get(t):e[t]}function u(e,t,n){var r=s(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return W&&e instanceof Map}function p(e){return U&&e instanceof Set}function h(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Q(e);delete t[K];for(var n=Y(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return g(t,!0)}),!0)),e}function v(){r(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=Z[e];return t||r(18,e),t}function w(e,t){Z[e]||(Z[e]=t)}function A(){return F}function x(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function S(e){E(e),e.p.forEach(C),e.p=null}function E(e){e===F&&(F=e.l)}function k(e){return F={p:[],l:F,h:e,m:!0,_:0}}function C(e){var t=e[K];0===t.i||1===t.i?t.j():t.g=!0}function O(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||y("ES5").S(t,e,o),o?(n[K].P&&(S(t),r(4)),i(e)&&(e=T(t,e),t.l||_(t,e)),t.u&&y("Patches").M(n[K].t,e,t.u,t.s)):e=T(t,n,[]),S(t),t.u&&t.v(t.u,t.s),e!==G?e:void 0}function T(e,t,n){if(b(t))return t;var r=t[K];if(!r)return a(t,(function(o,i){return R(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return _(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=m(r.k):r.o,i=o,s=!1;3===r.i&&(i=new Set(o),o.clear(),s=!0),a(i,(function(t,i){return R(e,r,o,t,i,n,s)})),_(e,o,!1),n&&e.u&&y("Patches").N(r,n,e.u,e.s)}return r.o}function R(e,t,n,r,a,s,c){if(o(a)){var d=T(e,a,s&&t&&3!==t.i&&!l(t.R,r)?s.concat(r):void 0);if(u(n,r,d),!o(d))return;e.m=!1}else c&&n.add(a);if(i(a)&&!b(a)){if(!e.h.D&&e._<1)return;T(e,a),t&&t.A.l||_(e,a)}}function _(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&g(t,n)}function M(e,t){var n=e[K];return(n?h(n):e)[t]}function P(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function I(e){e.P||(e.P=!0,e.l&&I(e.l))}function j(e){e.o||(e.o=m(e.t))}function L(e,t,n){var r=f(t)?y("MapSet").F(t,n):p(t)?y("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:A(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=J;n&&(o=[r],i=$);var a=Proxy.revocable(o,i),s=a.revoke,l=a.proxy;return r.k=l,r.j=s,l}(t,n):y("ES5").J(t,n);return(n?n.A:A()).p.push(r),r}function N(e){return o(e)||r(22,e),function e(t){if(!i(t))return t;var n,r=t[K],o=s(t);if(r){if(!r.P&&(r.i<4||!y("ES5").K(r)))return r.t;r.I=!0,n=B(t,o),r.I=!1}else n=B(t,o);return a(n,(function(t,o){r&&c(r.t,t)===o||u(n,t,e(o))})),3===o?new Set(n):n}(e)}function B(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function z(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[K];return J.get(t,e)},set:function(t){var n=this[K];J.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][K];if(!o.P)switch(o.i){case 5:r(o)&&I(o);break;case 4:n(o)&&I(o)}}}function n(e){for(var t=e.t,n=e.k,r=Y(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==K){var a=t[i];if(void 0===a&&!l(t,i))return!0;var s=n[i],c=s&&s[K];if(c?c.t!==a:!d(s,a))return!0}}var u=!!t[K];return r.length!==Y(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;rTe,zD:()=>Be,Z0:()=>Me});var D,F,H="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),W="undefined"!=typeof Map,U="undefined"!=typeof Set,V="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,G=H?Symbol.for("immer-nothing"):((D={})["immer-nothing"]=!0,D),q=H?Symbol.for("immer-draftable"):"__$immer_draftable",K=H?Symbol.for("immer-state"):"__$immer_state",X=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Q=Object.getOwnPropertyDescriptors||function(e){var t={};return Y(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Z={},J={get:function(e,t){if(t===K)return e;var n=h(e);if(!l(n,t))return function(e,t,n){var r,o=P(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!i(r)?r:r===M(e.t,t)?(j(e),e.o[t]=L(e.A.h,r,e)):r},has:function(e,t){return t in h(e)},ownKeys:function(e){return Reflect.ownKeys(h(e))},set:function(e,t,n){var r=P(h(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=M(h(e),t),i=null==o?void 0:o[K];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(d(n,o)&&(void 0!==n||l(e.t,t)))return!0;j(e),I(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==M(e.t,t)||t in e.t?(e.R[t]=!1,j(e),I(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=h(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},$={};a(J,(function(e,t){$[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),$.deleteProperty=function(e,t){return $.set.call(this,e,t,void 0)},$.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var ee=function(){function e(e){var t=this;this.O=V,this.D=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var a=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=a);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=y("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),te=new ee,ne=te.produce;te.produceWithPatches.bind(te),te.setAutoFreeze.bind(te),te.setUseProxies.bind(te),te.applyPatches.bind(te),te.createDraft.bind(te),te.finishDraft.bind(te);const re=ne;var oe=n(58522);function ie(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var ae=ie();ae.withExtraArgument=ie;const se=ae;n(85224);var le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{e.exports=n(43488)()},12620:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}},12703:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>i});var r=n(74840),o=n(28286);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,s)||{};return(0,o.NI)(e,c,(e=>{let o=a(u,l,e);return e===o&&"string"===typeof e&&(o=a(u,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[t],c}},12860:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(58168),o=n(98587),i=n(22382),a=n(83628);const s={borderRadius:4};var l=n(47937);var c=n(70505),u=n(98076),d=n(30086);const f=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:p,shape:h={}}=e,m=(0,o.A)(e,f),g=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}(p);let b=(0,i.A)({breakpoints:g,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,h)},m);b.applyStyles=d.A;for(var y=arguments.length,w=new Array(y>1?y-1:0),A=1;A(0,i.A)(e,t)),b),b.unstable_sxConfig=(0,r.A)({},u.A,null==m?void 0:m.unstable_sxConfig),b.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},b}},13292:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9950);const o=e=>{const t=r.useRef({});return r.useEffect((()=>{t.current=e})),t.current}},13372:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext({})},14195:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(59254),c=n(18463),u=n(92455),d=n(13372),f=n(44414);const p=["className"],h=(0,l.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})})),m=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiListItemIcon"}),{className:l}=n,m=(0,r.A)(n,p),g=i.useContext(d.A),v=(0,o.A)({},n,{alignItems:g.alignItems}),b=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,s.A)(r,u.f,n)})(v);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(b.root,l),ownerState:v,ref:t},m))}))},14387:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(58168),o=n(98587),i=n(9950);const a=["getTrigger","target"];function s(e,t){const{disableHysteresis:n=!1,threshold:r=100,target:o}=t,i=e.current;return o&&(e.current=void 0!==o.pageYOffset?o.pageYOffset:o.scrollTop),!(!n&&void 0!==i&&e.currentr}const l="undefined"!==typeof window?window:null;function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{getTrigger:t=s,target:n=l}=e,c=(0,o.A)(e,a),u=i.useRef(),[d,f]=i.useState((()=>t(u,c)));return i.useEffect((()=>{const e=()=>{f(t(u,(0,r.A)({target:n},c)))};return e(),n.addEventListener("scroll",e,{passive:!0}),()=>{n.removeEventListener("scroll",e,{passive:!0})}}),[n,t,JSON.stringify(c)]),d}},14759:(e,t,n)=>{var r=n(16658),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},14857:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(9950);var r=n(7148),o=n(60195),i=n(67550);function a(){const e=(0,r.A)(o.A);return e[i.A]||e}},14919:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>i});var r=n(86879);const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t="".concat(e).match(o);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||i(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return a(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.vM:return s(e,e.render,"ForwardRef");case r.lD:return s(e,e.type,"memo");default:return}}}},15368:(e,t,n)=>{"use strict";n.d(t,{II:()=>u,v_:()=>s,wm:()=>c});var r=n(90698),o=n(98067),i=n(61664);function a(e){return Math.min(1e3*2**e,3e4)}function s(e){return"online"!==(null!==e&&void 0!==e?e:"online")||o.t.isOnline()}var l=class{constructor(e){this.revert=null===e||void 0===e?void 0:e.revert,this.silent=null===e||void 0===e?void 0:e.silent}};function c(e){return e instanceof l}function u(e){let t,n,c,u=!1,d=0,f=!1;const p=new Promise(((e,t)=>{n=e,c=t})),h=()=>!r.m.isFocused()||"always"!==e.networkMode&&!o.t.isOnline(),m=r=>{var o,i;f||(f=!0,null===(o=e.onSuccess)||void 0===o||o.call(e,r),null===(i=t)||void 0===i||i(),n(r))},g=n=>{var r,o;f||(f=!0,null===(r=e.onError)||void 0===r||r.call(e,n),null===(o=t)||void 0===o||o(),c(n))},v=()=>new Promise((n=>{var r;t=e=>{const t=f||!h();return t&&n(e),t},null===(r=e.onPause)||void 0===r||r.call(e)})).then((()=>{var n;(t=void 0,f)||(null===(n=e.onContinue)||void 0===n||n.call(e))})),b=()=>{if(f)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(m).catch((t=>{var n,r,o;if(f)return;const s=null!==(n=e.retry)&&void 0!==n?n:i.S$?0:3,l=null!==(r=e.retryDelay)&&void 0!==r?r:a,c="function"===typeof l?l(d,t):l,p=!0===s||"number"===typeof s&&d{if(h())return v()})).then((()=>{u?g(t):b()}))):g(t)}))};return s(e.networkMode)?b():v().then(b),{promise:p,cancel:t=>{var n;f||(g(new l(t)),null===(n=e.abort)||void 0===n||n.call(e))},continue:()=>{var e;return(null===(e=t)||void 0===e?void 0:e())?p:Promise.resolve()},cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1}}}},15441:(e,t,n)=>{"use strict";n.d(t,{Ht:()=>a,jE:()=>i});var r=n(9950),o=r.createContext(void 0),i=e=>{const t=r.useContext(o);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},a=e=>{let{client:t,children:n}=e;return r.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]),r.createElement(o.Provider,{value:t},n)}},15941:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var r=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=e=>setTimeout(e,0);const i=r=>{t?e.push(r):o((()=>{n(r)}))},a=()=>{const t=e;e=[],t.length&&o((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||a()}return n},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r{e(...n)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}()},16243:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,NL:()=>l,Ww:()=>s,dl:()=>i,ko:()=>o,lG:()=>a,qm:()=>r});const r="/sample-page",o=6,i=260,a={LIGHT:"light",DARK:"dark"},s={VERTICAL:"vertical",HORIZONTAL:"horizontal"},l={LTR:"ltr",RTL:"rtl"},c={fontFamily:"'Public Sans', sans-serif",i18n:"en",menuOrientation:s.VERTICAL,miniDrawer:!1,container:!0,mode:a.LIGHT,presetColor:"default",themeDirection:l.LTR}},16491:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),s=n(28843),l=n(70505),c=n(80237),u=n(7148),d=n(44414);const f=["className","component"];var p=n(41644),h=n(24436),m=n(67550);const g=(0,n(45558).A)("MuiBox",["root"]),v=(0,h.A)(),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:p="MuiBox-root",generateClassName:h}=e,m=(0,s.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.A);return i.forwardRef((function(e,i){const s=(0,u.A)(n),l=(0,c.A)(e),{className:g,component:v="div"}=l,b=(0,o.A)(l,f);return(0,d.jsx)(m,(0,r.A)({as:v,ref:i,className:(0,a.A)(g,h?h(p):p),theme:t&&s[t]||s},b))}))}({themeId:m.A,defaultTheme:v,defaultClassName:g.root,generateClassName:p.A.generate}),y=b},16658:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},17119:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(38345)},17533:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var o=r(n(79526)),i=n(44414);t.A=(0,o.default)((0,i.jsx)("path",{d:"m17.27 6.73-4.24 10.13-1.32-3.42-.32-.83-.82-.32-3.43-1.33zM21 3 3 10.53v.98l6.84 2.65L12.48 21h.98z"}),"NearMeOutlined")},18463:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});n(9950);var r=n(6171);n(44414);function o(e){return(0,r.b)(e)}},19489:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(58168),o=n(98587),i=n(9950),a=n(67279),s=n(69688),l=n(14857),c=n(70576),u=n(31506),d=n(44414);const f=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],p={entering:{transform:"none"},entered:{transform:"none"}},h=i.forwardRef((function(e,t){const n=(0,l.A)(),h={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:m,appear:g=!0,children:v,easing:b,in:y,onEnter:w,onEntered:A,onEntering:x,onExit:S,onExited:E,onExiting:k,style:C,timeout:O=h,TransitionComponent:T=a.Ay}=e,R=(0,o.A)(e,f),_=i.useRef(null),M=(0,u.A)(_,(0,s.A)(v),t),P=e=>t=>{if(e){const n=_.current;void 0===t?e(n):e(n,t)}},I=P(x),j=P(((e,t)=>{(0,c.q)(e);const r=(0,c.c)({style:C,timeout:O,easing:b},{mode:"enter"});e.style.webkitTransition=n.transitions.create("transform",r),e.style.transition=n.transitions.create("transform",r),w&&w(e,t)})),L=P(A),N=P(k),B=P((e=>{const t=(0,c.c)({style:C,timeout:O,easing:b},{mode:"exit"});e.style.webkitTransition=n.transitions.create("transform",t),e.style.transition=n.transitions.create("transform",t),S&&S(e)})),z=P(E);return(0,d.jsx)(T,(0,r.A)({appear:g,in:y,nodeRef:_,onEnter:j,onEntered:L,onEntering:I,onExit:B,onExited:z,onExiting:N,addEndListener:e=>{m&&m(_.current,e)},timeout:O},R,{children:(e,t)=>i.cloneElement(v,(0,r.A)({style:(0,r.A)({transform:"scale(0)",visibility:"exited"!==e||y?void 0:"hidden"},p[e],C,v.props.style),ref:M},t))}))}))},19608:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(61960);const o=e=>(0,r.A)(e)&&"classes"!==e},19808:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(32228),l=n(51356),c=n(74840),u=n(62161),d=n(70146),f=n(12860),p=n(44414);const h=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,f.A)(),g=(0,d.A)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat((0,c.A)(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),v=e=>(0,u.A)({props:e,name:"MuiContainer",defaultTheme:m});var b=n(89548),y=n(59254),w=n(18463);const A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=g,useThemeProps:n=v,componentName:u="MuiContainer"}=e,d=t((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}})}),(e=>{let{theme:t,ownerState:n}=e;return n.fixed&&Object.keys(t.breakpoints.values).reduce(((e,n)=>{const r=n,o=t.breakpoints.values[r];return 0!==o&&(e[t.breakpoints.up(r)]={maxWidth:"".concat(o).concat(t.breakpoints.unit)}),e}),{})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},"xs"===n.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},n.maxWidth&&"xs"!==n.maxWidth&&{[t.breakpoints.up(n.maxWidth)]:{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit)}})})),f=i.forwardRef((function(e,t){const i=n(e),{className:f,component:m="div",disableGutters:g=!1,fixed:v=!1,maxWidth:b="lg"}=i,y=(0,r.A)(i,h),w=(0,o.A)({},i,{component:m,disableGutters:g,fixed:v,maxWidth:b}),A=((e,t)=>{const{classes:n,fixed:r,disableGutters:o,maxWidth:i}=e,a={root:["root",i&&"maxWidth".concat((0,c.A)(String(i))),r&&"fixed",o&&"disableGutters"]};return(0,l.A)(a,(e=>(0,s.Ay)(t,e)),n)})(w,u);return(0,p.jsx)(d,(0,o.A)({as:m,ownerState:w,className:(0,a.A)(A.root,f),ref:t},y))}));return f}({createStyledComponent:(0,y.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat((0,b.A)(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,w.b)({props:e,name:"MuiContainer"})}),x=A},19813:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,Y:()=>i});var r=n(45558),o=n(1614);function i(e){return(0,o.Ay)("MuiListItemButton",e)}const a=(0,r.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},19831:(e,t,n)=>{"use strict";n.d(t,{JD:()=>p,M_:()=>f,d4:()=>h});var r=n(11359),o=n(82569),i=n(58522),a=n(68626),s=n(58662),l=n(34805),c=n(93970),u=n(68889);const d=(0,i.HY)({menu:a.Ay,snackbar:s.Ay,fcm:l.Ay,toastSlice:c.Ay,loginUserSlice:u.Ay}),f=(0,r.U1)({reducer:d}),{dispatch:p}=f,h=o.d4},20816:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82284);function o(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=(0,r.A)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},21209:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(97654).A},21538:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o{}))}n.d(t,{A:()=>r})},22022:(e,t,n)=>{var r=n(4635),o=n(81581),i=n(65336),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},22382:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Q:()=>i});var r=n(58168),o=n(9950);function i(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){if(o.isValidElement(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,r.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{o.isValidElement(t[r])?l[r]=t[r]:i(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&i(e[r])?l[r]=s(e[r],t[r],n):n.clone?l[r]=i(t[r])?a(t[r]):t[r]:l[r]=t[r]})),l}},23199:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(72950)},23235:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(58168),o=n(9950),i=n(98587),a=n(72004),s=n(3484),l=n(89548),c=n(18463),u=n(59254),d=n(45558),f=n(1614);function p(e){return(0,f.Ay)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var h=n(44414);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})((e=>{let{theme:t,ownerState:n}=e;var r,o,i,a,s,l,c,u,d,f,p,h,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(o=r.create)?void 0:o.call(r,"fill",{duration:null==(i=t.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(f=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?f:{action:null==(h=(t.vars||t).palette)||null==(h=h.action)?void 0:h.active,disabled:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[n.color]}})),v=o.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:f="inherit",component:v="svg",fontSize:b="medium",htmlColor:y,inheritViewBox:w=!1,titleAccess:A,viewBox:x="0 0 24 24"}=n,S=(0,i.A)(n,m),E=o.isValidElement(u)&&"svg"===u.type,k=(0,r.A)({},n,{color:f,component:v,fontSize:b,instanceFontSize:e.fontSize,inheritViewBox:w,viewBox:x,hasSvgAsChild:E}),C={};w||(C.viewBox=x);const O=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,s.A)(o,p,r)})(k);return(0,h.jsxs)(g,(0,r.A)({as:v,className:(0,a.A)(O.root,d),focusable:"false",color:y,"aria-hidden":!A||void 0,role:A?"img":void 0,ref:t},C,S,E&&u.props,{ownerState:k,children:[E?u.props.children:u,A?(0,h.jsx)("title",{children:A}):null]}))}));v.muiName="SvgIcon";const b=v;function y(e,t){function n(n,o){return(0,h.jsx)(b,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:o},n,{children:e}))}return n.muiName=b.muiName,o.memo(o.forwardRef(n))}},23876:(e,t,n)=>{"use strict";var r=n(50630),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{"use strict";n.d(t,{A:()=>H});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),s=n(3484),l=n(59254),c=n(18463),u=n(31506),d=n(1976),f=n(52695),p=n(57528),h=n(38166),m=n(88283),g=n(38528),v=n(44414);const b=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:l,in:c,onExited:u,timeout:d}=e,[f,p]=i.useState(!1),h=(0,a.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+o},g=(0,a.A)(n.child,f&&n.childLeaving,r&&n.childPulsate);return c||f||p(!0),i.useEffect((()=>{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,v.jsx)("span",{className:h,style:m,children:(0,v.jsx)("span",{className:g})})};var y=n(45558);const w=(0,y.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var A,x,S,E;const k=["center","classes","className"];let C,O,T,R;const _=(0,m.i7)(C||(C=A||(A=(0,p.A)(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),M=(0,m.i7)(O||(O=x||(x=(0,p.A)(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),P=(0,m.i7)(T||(T=S||(S=(0,p.A)(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),I=(0,l.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),j=(0,l.Ay)(b,{name:"MuiTouchRipple",slot:"Ripple"})(R||(R=E||(E=(0,p.A)(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),w.rippleVisible,_,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),w.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),w.child,w.childLeaving,M,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),w.childPulsate,P,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),L=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:l={},className:u}=n,d=(0,o.A)(n,k),[f,p]=i.useState([]),m=i.useRef(0),b=i.useRef(null);i.useEffect((()=>{b.current&&(b.current(),b.current=null)}),[f]);const y=i.useRef(!1),A=(0,g.A)(),x=i.useRef(null),S=i.useRef(null),E=i.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:i}=e;p((e=>[...e,(0,v.jsx)(j,{classes:{ripple:(0,a.A)(l.ripple,w.ripple),rippleVisible:(0,a.A)(l.rippleVisible,w.rippleVisible),ripplePulsate:(0,a.A)(l.ripplePulsate,w.ripplePulsate),child:(0,a.A)(l.child,w.child),childLeaving:(0,a.A)(l.childLeaving,w.childLeaving),childPulsate:(0,a.A)(l.childPulsate,w.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},m.current)])),m.current+=1,b.current=i}),[l]),C=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:o=s||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&y.current)return void(y.current=!1);"touchstart"===(null==e?void 0:e.type)&&(y.current=!0);const a=i?null:S.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===x.current&&(x.current=()=>{E({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},A.start(80,(()=>{x.current&&(x.current(),x.current=null)}))):E({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[s,E,A]),O=i.useCallback((()=>{C({},{pulsate:!0})}),[C]),T=i.useCallback(((e,t)=>{if(A.clear(),"touchend"===(null==e?void 0:e.type)&&x.current)return x.current(),x.current=null,void A.start(0,(()=>{T(e,t)}));x.current=null,p((e=>e.length>0?e.slice(1):e)),b.current=t}),[A]);return i.useImperativeHandle(t,(()=>({pulsate:O,start:C,stop:T})),[O,C,T]),(0,v.jsx)(I,(0,r.A)({className:(0,a.A)(w.root,l.root,u),ref:S},d,{children:(0,v.jsx)(h.A,{component:null,exit:!0,children:f})}))}));var N=n(1614);function B(e){return(0,N.Ay)("MuiButtonBase",e)}const z=(0,y.A)("MuiButtonBase",["root","disabled","focusVisible"]),D=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],F=(0,l.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(z.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),H=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiButtonBase"}),{action:l,centerRipple:p=!1,children:h,className:m,component:g="button",disabled:b=!1,disableRipple:y=!1,disableTouchRipple:w=!1,focusRipple:A=!1,LinkComponent:x="a",onBlur:S,onClick:E,onContextMenu:k,onDragLeave:C,onFocus:O,onFocusVisible:T,onKeyDown:R,onKeyUp:_,onMouseDown:M,onMouseLeave:P,onMouseUp:I,onTouchEnd:j,onTouchMove:N,onTouchStart:z,tabIndex:H=0,TouchRippleProps:W,touchRippleRef:U,type:V}=n,G=(0,o.A)(n,D),q=i.useRef(null),K=i.useRef(null),X=(0,u.A)(K,U),{isFocusVisibleRef:Y,onFocus:Q,onBlur:Z,ref:J}=(0,f.A)(),[$,ee]=i.useState(!1);b&&$&&ee(!1),i.useImperativeHandle(l,(()=>({focusVisible:()=>{ee(!0),q.current.focus()}})),[]);const[te,ne]=i.useState(!1);i.useEffect((()=>{ne(!0)}),[]);const re=te&&!y&&!b;function oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;return(0,d.A)((r=>{t&&t(r);return!n&&K.current&&K.current[e](r),!0}))}i.useEffect((()=>{$&&A&&!y&&te&&K.current.pulsate()}),[y,A,$,te]);const ie=oe("start",M),ae=oe("stop",k),se=oe("stop",C),le=oe("stop",I),ce=oe("stop",(e=>{$&&e.preventDefault(),P&&P(e)})),ue=oe("start",z),de=oe("stop",j),fe=oe("stop",N),pe=oe("stop",(e=>{Z(e),!1===Y.current&&ee(!1),S&&S(e)}),!1),he=(0,d.A)((e=>{q.current||(q.current=e.currentTarget),Q(e),!0===Y.current&&(ee(!0),T&&T(e)),O&&O(e)})),me=()=>{const e=q.current;return g&&"button"!==g&&!("A"===e.tagName&&e.href)},ge=i.useRef(!1),ve=(0,d.A)((e=>{A&&!ge.current&&$&&K.current&&" "===e.key&&(ge.current=!0,K.current.stop(e,(()=>{K.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!b&&(e.preventDefault(),E&&E(e))})),be=(0,d.A)((e=>{A&&" "===e.key&&K.current&&$&&!e.defaultPrevented&&(ge.current=!1,K.current.stop(e,(()=>{K.current.pulsate(e)}))),_&&_(e),E&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&E(e)}));let ye=g;"button"===ye&&(G.href||G.to)&&(ye=x);const we={};"button"===ye?(we.type=void 0===V?"button":V,we.disabled=b):(G.href||G.to||(we.role="button"),b&&(we["aria-disabled"]=b));const Ae=(0,u.A)(t,J,q);const xe=(0,r.A)({},n,{centerRipple:p,component:g,disabled:b,disableRipple:y,disableTouchRipple:w,focusRipple:A,tabIndex:H,focusVisible:$}),Se=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,s.A)(i,B,o);return n&&r&&(a.root+=" ".concat(r)),a})(xe);return(0,v.jsxs)(F,(0,r.A)({as:ye,className:(0,a.A)(Se.root,m),ownerState:xe,onBlur:pe,onClick:E,onContextMenu:ae,onFocus:he,onKeyDown:ve,onKeyUp:be,onMouseDown:ie,onMouseLeave:ce,onMouseUp:le,onDragLeave:se,onTouchEnd:de,onTouchMove:fe,onTouchStart:ue,ref:Ae,tabIndex:b?-1:H,type:V},we,G,{children:[h,re?(0,v.jsx)(L,(0,r.A)({ref:X,center:p},W)):null]}))}))},24386:(e,t,n)=>{"use strict";n.d(t,{J:()=>g});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function o(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=o((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return h={name:t,styles:n,next:h},t}))}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},f="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return h={name:o.name,styles:o.styles,next:h},o.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)h={name:s.name,styles:s.styles,next:h},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:h}}},24436:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var r=n(58168),o=n(98587),i=n(37750),a=n(64750),s=n(98076),l=n(70505),c=n(12860);var u=n(99269);const d={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},p={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},h={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},b={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=["mode","contrastThreshold","tonalOffset"],w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},A={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function x(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,u.a)(e.main,o):"dark"===t&&(e.dark=(0,u.e$)(e.main,i)))}function S(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,o.A)(e,y),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),S=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(t),E=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[500],light:h[300],dark:h[700]}:{main:h[700],light:h[400],dark:h[800]}}(t),k=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),C=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:b[400],light:b[300],dark:b[700]}:{main:b[800],light:b[500],dark:b[900]}}(t),O=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(t);function T(e){return(0,u.eM)(e,A.text.primary)>=n?A.text.primary:w.text.primary}const R=e=>{let{color:t,name:n,mainShade:o=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,i.A)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,i.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return x(t,"light",a,s),x(t,"dark",l,s),t.contrastText||(t.contrastText=T(t.main)),t},_={dark:A,light:w};return(0,a.A)((0,r.A)({common:(0,r.A)({},d),mode:t,primary:R({color:c,name:"primary"}),secondary:R({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:R({color:E,name:"error"}),warning:R({color:O,name:"warning"}),info:R({color:k,name:"info"}),success:R({color:C,name:"success"}),grey:f,contrastThreshold:n,getContrastText:T,augmentColor:R,tonalOffset:s},_[t]),l)}const E=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const k={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function O(e,t){const n="function"===typeof t?t(e):t,{fontFamily:i=C,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:p,pxToRem:h}=n,m=(0,o.A)(n,E);const g=s/14,v=h||(e=>"".concat(e/f*g,"rem")),b=(e,t,n,o,a)=>{return(0,r.A)({fontFamily:i,fontWeight:e,fontSize:v(t),lineHeight:n},i===C?{letterSpacing:"".concat((s=o/t,Math.round(1e5*s)/1e5),"em")}:{},a,p);var s},y={h1:b(l,96,1.167,-1.5),h2:b(l,60,1.2,-.5),h3:b(c,48,1.167,0),h4:b(c,34,1.235,.25),h5:b(c,24,1.334,0),h6:b(u,20,1.6,.15),subtitle1:b(c,16,1.75,.15),subtitle2:b(u,14,1.57,.1),body1:b(c,16,1.5,.15),body2:b(c,14,1.43,.15),button:b(u,14,1.75,.4,k),caption:b(c,12,1.66,.4),overline:b(c,12,2.66,1,k),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.A)((0,r.A)({htmlFontSize:f,pxToRem:v,fontFamily:i,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},y),m,{clone:!1})}function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const R=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)];var _=n(75361);const M={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:u={},typography:d={}}=e,f=(0,o.A)(e,P);if(e.vars)throw new Error((0,i.A)(18));const p=S(n),h=(0,c.A)(e);let m=(0,a.A)(h,{mixins:(g=h.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:p,shadows:R.slice(),typography:O(p,d),transitions:(0,_.Ay)(u),zIndex:(0,r.A)({},M)});var g,v;m=(0,a.A)(m,f);for(var b=arguments.length,y=new Array(b>1?b-1:0),w=1;w(0,a.A)(e,t)),m),m.unstable_sxConfig=(0,r.A)({},s.A,null==f?void 0:f.unstable_sxConfig),m.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},m}const j=I},24513:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},24567:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},24763:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(58168),o=n(98587),i=n(49456),a=n(83792),s=n(26598),l=n(89449);const c=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u=["component","slots","slotProps"],d=["component"];function f(e,t){const{className:n,elementType:f,ownerState:p,externalForwardedProps:h,getSlotOwnerState:m,internalForwardedProps:g}=t,v=(0,o.A)(t,c),{component:b,slots:y={[e]:void 0},slotProps:w={[e]:void 0}}=h,A=(0,o.A)(h,u),x=y[e]||f,S=(0,s.A)(w[e],p),E=(0,l.A)((0,r.A)({className:n},v,{externalForwardedProps:"root"===e?A:void 0,externalSlotProps:S})),{props:{component:k},internalRef:C}=E,O=(0,o.A)(E.props,d),T=(0,i.A)(C,null==S?void 0:S.ref,t.ref),R=m?m(O):{},_=(0,r.A)({},p,R),M="root"===e?k||b:k,P=(0,a.A)(x,(0,r.A)({},"root"===e&&!b&&!y[e]&&g,"root"!==e&&!y[e]&&g,O,M&&{as:M},{ref:T}),_);return Object.keys(R).forEach((e=>{delete P[e]})),[x,P]}},24994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},25277:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(99269),c=n(23235),u=n(44414);const d=(0,c.A)((0,u.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var f=n(31506),p=n(89548),h=n(24184),m=n(18463),g=n(59254),v=n(45558),b=n(1614);function y(e){return(0,b.Ay)("MuiChip",e)}const w=(0,v.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),A=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],x=(0,g.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{["& .".concat(w.avatar)]:t.avatar},{["& .".concat(w.avatar)]:t["avatar".concat((0,p.A)(s))]},{["& .".concat(w.avatar)]:t["avatarColor".concat((0,p.A)(r))]},{["& .".concat(w.icon)]:t.icon},{["& .".concat(w.icon)]:t["icon".concat((0,p.A)(s))]},{["& .".concat(w.icon)]:t["iconColor".concat((0,p.A)(o))]},{["& .".concat(w.deleteIcon)]:t.deleteIcon},{["& .".concat(w.deleteIcon)]:t["deleteIcon".concat((0,p.A)(s))]},{["& .".concat(w.deleteIcon)]:t["deleteIconColor".concat((0,p.A)(r))]},{["& .".concat(w.deleteIcon)]:t["deleteIcon".concat((0,p.A)(l),"Color").concat((0,p.A)(r))]},t.root,t["size".concat((0,p.A)(s))],t["color".concat((0,p.A)(r))],i&&t.clickable,i&&"default"!==r&&t["clickableColor".concat((0,p.A)(r),")")],a&&t.deletable,a&&"default"!==r&&t["deletableColor".concat((0,p.A)(r))],t[l],t["".concat(l).concat((0,p.A)(r))]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,o.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(w.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(w.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},["& .".concat(w.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(w.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(w.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(w.icon)]:(0,o.A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,o.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),["& .".concat(w.deleteIcon)]:(0,o.A)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,l.X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,l.X4)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?"rgba(".concat(t.vars.palette[n.color].contrastTextChannel," / 0.7)"):(0,l.X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{["&.".concat(w.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{["&.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(w.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{["&:hover, &.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(w.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(w.avatar)]:{marginLeft:4},["& .".concat(w.avatarSmall)]:{marginLeft:2},["& .".concat(w.icon)]:{marginLeft:4},["& .".concat(w.iconSmall)]:{marginLeft:2},["& .".concat(w.deleteIcon)]:{marginRight:5},["& .".concat(w.deleteIconSmall)]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,l.X4)(t.palette[n.color].main,.7)),["&.".concat(w.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},["&.".concat(w.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,l.X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},["& .".concat(w.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,l.X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})})),S=(0,g.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t["label".concat((0,p.A)(r))]]}})((e=>{let{ownerState:t}=e;return(0,o.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})}));function E(e){return"Backspace"===e.key||"Delete"===e.key}const k=i.forwardRef((function(e,t){const n=(0,m.b)({props:e,name:"MuiChip"}),{avatar:l,className:c,clickable:g,color:v="default",component:b,deleteIcon:w,disabled:k=!1,icon:C,label:O,onClick:T,onDelete:R,onKeyDown:_,onKeyUp:M,size:P="medium",variant:I="filled",tabIndex:j,skipFocusWhenDisabled:L=!1}=n,N=(0,r.A)(n,A),B=i.useRef(null),z=(0,f.A)(B,t),D=e=>{e.stopPropagation(),R&&R(e)},F=!(!1===g||!T)||g,H=F||R?h.A:b||"div",W=(0,o.A)({},n,{component:H,disabled:k,size:P,color:v,iconColor:i.isValidElement(C)&&C.props.color||v,onDelete:!!R,clickable:F,variant:I}),U=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled","size".concat((0,p.A)(r)),"color".concat((0,p.A)(o)),l&&"clickable",l&&"clickableColor".concat((0,p.A)(o)),a&&"deletable",a&&"deletableColor".concat((0,p.A)(o)),"".concat(c).concat((0,p.A)(o))],label:["label","label".concat((0,p.A)(r))],avatar:["avatar","avatar".concat((0,p.A)(r)),"avatarColor".concat((0,p.A)(o))],icon:["icon","icon".concat((0,p.A)(r)),"iconColor".concat((0,p.A)(i))],deleteIcon:["deleteIcon","deleteIcon".concat((0,p.A)(r)),"deleteIconColor".concat((0,p.A)(o)),"deleteIcon".concat((0,p.A)(c),"Color").concat((0,p.A)(o))]};return(0,s.A)(u,y,t)})(W),V=H===h.A?(0,o.A)({component:b||"div",focusVisibleClassName:U.focusVisible},R&&{disableRipple:!0}):{};let G=null;R&&(G=w&&i.isValidElement(w)?i.cloneElement(w,{className:(0,a.A)(w.props.className,U.deleteIcon),onClick:D}):(0,u.jsx)(d,{className:(0,a.A)(U.deleteIcon),onClick:D}));let q=null;l&&i.isValidElement(l)&&(q=i.cloneElement(l,{className:(0,a.A)(U.avatar,l.props.className)}));let K=null;return C&&i.isValidElement(C)&&(K=i.cloneElement(C,{className:(0,a.A)(U.icon,C.props.className)})),(0,u.jsxs)(x,(0,o.A)({as:H,className:(0,a.A)(U.root,c),disabled:!(!F||!k)||void 0,onClick:T,onKeyDown:e=>{e.currentTarget===e.target&&E(e)&&e.preventDefault(),_&&_(e)},onKeyUp:e=>{e.currentTarget===e.target&&(R&&E(e)?R(e):"Escape"===e.key&&B.current&&B.current.blur()),M&&M(e)},ref:z,tabIndex:L&&k?-1:j,ownerState:W},V,N,{children:[q||K,(0,u.jsx)(S,{className:(0,a.A)(U.label),ownerState:W,children:O}),G]}))}))},25329:(e,t,n)=>{"use strict";t.A=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(9950)),o=n(28843);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}t.A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(o.ThemeContext);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},25333:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(99269),c=n(59254),u=n(18463),d=n(24184),f=n(89548),p=n(45558),h=n(1614);function m(e){return(0,h.Ay)("MuiIconButton",e)}const g=(0,p.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var v=n(44414);const b=["edge","children","className","color","disabled","disableFocusRipple","size"],y=(0,c.Ay)(d.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,f.A)(n.color))],n.edge&&t["edge".concat((0,f.A)(n.edge))],t["size".concat((0,f.A)(n.size))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,o.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,o.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,o.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(g.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),w=i.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:l,className:c,color:d="default",disabled:p=!1,disableFocusRipple:h=!1,size:g="medium"}=n,w=(0,r.A)(n,b),A=(0,o.A)({},n,{edge:i,color:d,disabled:p,disableFocusRipple:h,size:g}),x=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,f.A)(r)),o&&"edge".concat((0,f.A)(o)),"size".concat((0,f.A)(i))]};return(0,s.A)(a,m,t)})(A);return(0,v.jsx)(y,(0,o.A)({className:(0,a.A)(x.root,c),centerRipple:!0,focusRipple:!h,disabled:p,ref:t},w,{ownerState:A,children:l}))}))},26562:(e,t,n)=>{"use strict";function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},26590:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},26598:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t,n){return"function"===typeof e?e(t,n):e}},26910:(e,t,n)=>{"use strict";n.d(t,{A:()=>Mt});var r={};function o(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>he,hasStandardBrowserWebWorkerEnv:()=>me,navigator:()=>pe,origin:()=>ge});var i=n(85224);const{toString:a}=Object.prototype,{getPrototypeOf:s}=Object,l=(c=Object.create(null),e=>{const t=a.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const u=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:f}=Array,p=d("undefined");const h=u("ArrayBuffer");const m=d("string"),g=d("function"),v=d("number"),b=e=>null!==e&&"object"===typeof e,y=e=>{if("object"!==l(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},w=u("Date"),A=u("File"),x=u("Blob"),S=u("FileList"),E=u("URLSearchParams"),[k,C,O,T]=["ReadableStream","Request","Response","Headers"].map(u);function R(e,t){let n,r,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),f(e))for(n=0,r=e.length;n0;)if(r=n[o],t===r.toLowerCase())return r;return null}const M="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,P=e=>!p(e)&&e!==M;const I=(j="undefined"!==typeof Uint8Array&&s(Uint8Array),e=>j&&e instanceof j);var j;const L=u("HTMLFormElement"),N=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),B=u("RegExp"),z=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};R(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},D="abcdefghijklmnopqrstuvwxyz",F="0123456789",H={DIGIT:F,ALPHA:D,ALPHA_DIGIT:D+D.toUpperCase()+F};const W=u("AsyncFunction"),U=((e,t)=>{return e?setImmediate:t?(n="axios@".concat(Math.random()),r=[],M.addEventListener("message",(e=>{let{source:t,data:o}=e;t===M&&o===n&&r.length&&r.shift()()}),!1),e=>{r.push(e),M.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,g(M.postMessage)),V="undefined"!==typeof queueMicrotask?queueMicrotask.bind(M):"undefined"!==typeof i&&i.nextTick||U,G={isArray:f,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=l(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:m,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:y,isReadableStream:k,isRequest:C,isResponse:O,isHeaders:T,isUndefined:p,isDate:w,isFile:A,isBlob:x,isRegExp:B,isFunction:g,isStream:e=>b(e)&&g(e.pipe),isURLSearchParams:E,isTypedArray:I,isFileList:S,forEach:R,merge:function e(){const{caseless:t}=P(this)&&this||{},n={},r=(r,o)=>{const i=t&&_(n,o)||o;y(n[i])&&y(r)?n[i]=e(n[i],r):y(r)?n[i]=e({},r):f(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o3&&void 0!==arguments[3]?arguments[3]:{};return R(t,((t,r)=>{n&&g(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:u,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:L,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:z,freezeMethods:e=>{z(e,((t,n)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];g(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_,global:M,isContextDefined:P,ALPHABET:H,generateString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H.ALPHA_DIGIT,n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=f(e)?[]:{};return R(e,((e,t)=>{const i=n(e,r+1);!p(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:W,isThenable:e=>e&&(b(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:U,asap:V};function q(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}G.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const K=q.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(q,X),Object.defineProperty(K,"isAxiosError",{value:!0}),q.from=(e,t,n,r,o,i)=>{const a=Object.create(K);return G.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),q.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const Y=q;var Q=n(93325).hp;function Z(e){return G.isPlainObject(e)||G.isArray(e)}function J(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function $(e,t,n){return e?e.concat(t).map((function(e,t){return e=J(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ee=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)}));const te=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!s&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Q.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"===typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(s=G.toArray(e)))return n=J(n),s.forEach((function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===a?$([n],r,i):null===a?n:n+"[]",l(e))})),!1;return!!Z(e)||(t.append($(o,n,i),l(e)),!1)}const u=[],d=Object.assign(ee,{defaultVisitor:c,convertValue:l,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),G.forEach(n,(function(n,i){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ie=re;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function se(e,t,n){if(!t)return e;const r=n&&n.encode||ae;G.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):G.isURLSearchParams(t)?t.toString():new ie(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const le=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var ue=n(89379);const de={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!==typeof window&&"undefined"!==typeof document,pe="object"===typeof navigator&&navigator||void 0,he=fe&&(!pe||["ReactNative","NativeScript","NS"].indexOf(pe.product)<0),me="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,ge=fe&&window.location.href||"http://localhost",ve=(0,ue.A)((0,ue.A)({},r),de);const be=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&G.isArray(r)?r.length:i,s)return G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&G.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const ye={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);o&&G.isHTMLForm(e)&&(e=new FormData(e));if(G.isFormData(e))return r?JSON.stringify(be(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new ve.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ve.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw Y.from(o,Y.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));const we=ye,Ae=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xe=Symbol("internals");function Se(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return!1===e||null==e?e:G.isArray(e)?e.map(Ee):String(e)}function ke(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class Ce{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Se(t);if(!o)throw new Error("header name must be a non-empty string");const i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ee(e))}const i=(e,t)=>G.forEach(e,((e,n)=>o(e,n,t)));if(G.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ae[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(G.isHeaders(e))for(const[a,s]of e.entries())o(s,a,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Se(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Se(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!ke(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Se(e)){const o=G.findKey(n,e);!o||t&&!ke(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ke(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,((r,o)=>{const i=G.findKey(n,o);if(i)return t[i]=Ee(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Ee(r),n[a]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,n]=e;return t+": "+n})).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;ot.set(e))),t}static accessor(e){const t=(this[xe]=this[xe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Se(e);t[r]||(!function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Ce.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),G.freezeMethods(Ce);const Oe=Ce;function Te(e,t){const n=this||we,r=t||n,o=Oe.from(r.headers);let i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Re(e){return!(!e||!e.__CANCEL__)}function _e(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(_e,Y,{__CANCEL__:!0});const Me=_e;function Pe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ie=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){const e=Date.now(),t=e-o;for(var s=arguments.length,l=new Array(s),c=0;c=i?a(l,e):(n=l,r||(r=setTimeout((()=>{r=null,a(n)}),i-t)))},()=>n&&a(n)]},Le=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const o=Ie(50,250);return je((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Be=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;re(...n)))},ze=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,De=ve.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),G.isString(r)&&a.push("path="+r),G.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Fe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const He=e=>e instanceof Oe?(0,ue.A)({},e):e;function We(e,t){t=t||{};const n={};function r(e,t,n,r){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:r},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n,o){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function a(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(He(e),He(t),0,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=l[r]||o,a=i(e[r],t[r],r);G.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Ue=e=>{const t=We({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Oe.from(s),t.url=se(Fe(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),G.isFormData(r))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ve.hasStandardBrowserEnv&&(o&&G.isFunction(o)&&(o=o(t)),o||!1!==o&&ze(t.url))){const e=i&&a&&De.read(a);e&&s.set(i,e)}return t},Ve="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ue(e);let o=r.data;const i=Oe.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Oe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Pe((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Y("Request aborted",Y.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Y(t,o.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&G.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),G.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=Le(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=Le(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Me(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===ve.protocols.indexOf(v)?n(new Y("Unsupported protocol "+v+":",Y.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Ge=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Y?t:new Me(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Y("timeout ".concat(t," of ms exceeded"),Y.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>G.asap(a),s}};function qe(e,t){this.v=e,this.k=t}function Ke(e){return function(){return new Xe(e.apply(this,arguments))}}function Xe(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,s=a instanceof qe;Promise.resolve(s?a.v:a).then((function(n){if(s){var l="return"===t?"return":"next";if(!a.k||n.done)return r(l,n);n=e[l](n).value}o(i.done?"return":"normal",n)}),(function(e){r("throw",e)}))}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise((function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function Ye(e){return new qe(e,0)}function Qe(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise((function(n){n(e[t](r))})),{done:!1,value:new qe(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function Ze(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Je(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Je(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Je=function(e){this.s=e,this.n=e.next},Je.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Je(e)}Xe.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Xe.prototype.next=function(e){return this._invoke("next",e)},Xe.prototype.throw=function(e){return this._invoke("throw",e)},Xe.prototype.return=function(e){return this._invoke("return",e)};const $e=function*(e,t){let n=e.byteLength;if(!t||n{const o=et(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},rt="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,ot=rt&&"function"===typeof ReadableStream,it=rt&&("function"===typeof TextEncoder?(at=new TextEncoder,e=>at.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var at;const st=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let e=!1;const t=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),ct=ot&&st((()=>G.isReadableStream(new Response("").body))),ut={stream:ct&&(e=>e.body)};var dt;rt&&(dt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ut[e]&&(ut[e]=G.isFunction(dt[e])?t=>t[e]():(t,n)=>{throw new Y("Response type '".concat(e,"' is not supported"),Y.ERR_NOT_SUPPORT,n)})})));const ft=async(e,t)=>{const n=G.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new Request(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await it(e)).byteLength:void 0)})(t):n},pt={http:null,xhr:Ve,fetch:rt&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Ue(e);c=c?(c+"").toLowerCase():"text";let p,h=Ge([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&<&&"get"!==n&&"head"!==n&&0!==(g=await ft(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(G.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ne(g,Le(Be(l)));r=nt(n.body,65536,e,t)}}G.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,(0,ue.A)((0,ue.A)({},f),{},{signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0}));let i=await fetch(p);const a=ct&&("stream"===c||"response"===c);if(ct&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=G.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&Ne(t,Le(Be(s),!0))||[];i=new Response(nt(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let v=await ut[G.findKey(ut,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{Pe(t,n,{data:v,headers:Oe.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(v){if(m&&m(),v&&"TypeError"===v.name&&/fetch/i.test(v.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,p),{cause:v.cause||v});throw Y.from(v,v&&v.code,e,p)}})};G.forEach(pt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const ht=e=>"- ".concat(e),mt=e=>G.isFunction(e)||null===e||!1===e,gt=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i{let[t,n]=e;return"adapter ".concat(t," ")+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=t?e.length>1?"since :\n"+e.map(ht).join("\n"):" "+ht(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function vt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function bt(e){vt(e),e.headers=Oe.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return gt(e.adapter||we.adapter)(e).then((function(t){return vt(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t}),(function(t){return Re(t)||(vt(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)}))}const yt="1.7.9",wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const At={};wt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!At[o]&&(At[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},wt.spelling=function(e){return(t,n)=>(console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0)};const xt={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:wt},St=xt.validators;class Et{constructor(e){this.defaults=e,this.interceptors={request:new le,response:new le}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=We(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&xt.assertOptions(n,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:xt.assertOptions(r,{encode:St.function,serialize:St.function},!0)),xt.assertOptions(t,{baseUrl:St.spelling("baseURL"),withXsrfToken:St.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Oe.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Me(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ct((function(t){e=t})),cancel:e}}}const Ot=Ct;const Tt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tt).forEach((e=>{let[t,n]=e;Tt[n]=t}));const Rt=Tt;const _t=function e(t){const n=new kt(t),r=o(kt.prototype.request,n);return G.extend(r,kt.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(We(t,n))},r}(we);_t.Axios=kt,_t.CanceledError=Me,_t.CancelToken=Ot,_t.isCancel=Re,_t.VERSION=yt,_t.toFormData=te,_t.AxiosError=Y,_t.Cancel=_t.CanceledError,_t.all=function(e){return Promise.all(e)},_t.spread=function(e){return function(t){return e.apply(null,t)}},_t.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},_t.mergeConfig=We,_t.AxiosHeaders=Oe,_t.formToJSON=e=>be(G.isHTMLForm(e)?new FormData(e):e),_t.getAdapter=gt,_t.HttpStatusCode=Rt,_t.default=_t;const Mt=_t},27402:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(61262).A},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(43145);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},28286:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>o});var r=n(22382);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(o[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||i;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"===typeof t){const e=r.breakpoints||i;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i(0,r.A)(e,t)),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:n,base:r}=e;const o=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(t,n),i=Object.keys(o);if(0===i.length)return t;let a;return i.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e)),{})}},28429:(e,t,n)=>{"use strict";var r;n.d(t,{$P:()=>p,Ix:()=>N,V8:()=>j,Ye:()=>w,Zp:()=>v,jb:()=>c,sv:()=>L,x$:()=>y,zy:()=>m});var o=n(9950),i=n(1018);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0})),o.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,a({fromRouteId:t},o)))}),[e,t])}():function(){h()||(0,i.Oi)(!1);let e=o.useContext(s),{basename:t,future:n,navigator:r}=o.useContext(c),{matches:a}=o.useContext(d),{pathname:l}=m(),u=JSON.stringify((0,i.yD)(a,n.v7_relativeSplatPath)),f=o.useRef(!1);return g((()=>{f.current=!0})),o.useCallback((function(n,o){if(void 0===o&&(o={}),!f.current)return;if("number"===typeof n)return void r.go(n);let a=(0,i.Gh)(n,JSON.parse(u),l,"path"===o.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:(0,i.HS)([t,a.pathname])),(o.replace?r.replace:r.push)(a,o.state,o)}),[t,r,u,l,e])}()}const b=o.createContext(null);function y(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=o.useContext(c),{matches:a}=o.useContext(d),{pathname:s}=m(),l=JSON.stringify((0,i.yD)(a,r.v7_relativeSplatPath));return o.useMemo((()=>(0,i.Gh)(e,JSON.parse(l),s,"path"===n)),[e,l,s,n])}function w(e,t){return A(e,t)}function A(e,t,n,r){h()||(0,i.Oi)(!1);let{navigator:s,static:l}=o.useContext(c),{matches:f}=o.useContext(d),p=f[f.length-1],g=p?p.params:{},v=(p&&p.pathname,p?p.pathnameBase:"/");p&&p.route;let b,y=m();if(t){var w;let e="string"===typeof t?(0,i.Rr)(t):t;"/"===v||(null==(w=e.pathname)?void 0:w.startsWith(v))||(0,i.Oi)(!1),b=e}else b=y;let A=b.pathname||"/",x=A;if("/"!==v){let e=v.replace(/^\//,"").split("/");x="/"+A.replace(/^\//,"").split("/").slice(e.length).join("/")}let S=!l&&n&&n.matches&&n.matches.length>0?n.matches:(0,i.ue)(e,{pathname:x});let E=C(S&&S.map((e=>Object.assign({},e,{params:Object.assign({},g,e.params),pathname:(0,i.HS)([v,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?v:(0,i.HS)([v,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),f,n,r);return t&&E?o.createElement(u.Provider,{value:{location:a({pathname:"/",search:"",hash:"",state:null,key:"default"},b),navigationType:i.rc.Pop}},E):E}function x(){let e=function(){var e;let t=o.useContext(f),n=_(T.UseRouteError),r=M(T.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=(0,i.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),n?o.createElement("pre",{style:a},n):null,null)}const S=o.createElement(x,null);class E extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?o.createElement(d.Provider,{value:this.props.routeContext},o.createElement(f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function k(e){let{routeContext:t,match:n,children:r}=e,i=o.useContext(s);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),o.createElement(d.Provider,{value:t},r)}function C(e,t,n,r){var a;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(s=r)&&s.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let l=e,c=null==(a=n)?void 0:a.errors;if(null!=c){let e=l.findIndex((e=>e.route.id&&void 0!==(null==c?void 0:c[e.route.id])));e>=0||(0,i.Oi)(!1),l=l.slice(0,Math.min(l.length,e+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let o=0;o=0?l.slice(0,d+1):[l[0]];break}}}return l.reduceRight(((e,r,i)=>{let a,s=!1,f=null,p=null;var h;n&&(a=c&&r.route.id?c[r.route.id]:void 0,f=r.route.errorElement||S,u&&(d<0&&0===i?(h="route-fallback",!1||P[h]||(P[h]=!0),s=!0,p=null):d===i&&(s=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,i+1)),g=()=>{let t;return t=a?f:s?p:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(k,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?o.createElement(E,{location:n.location,revalidation:n.revalidation,component:f,error:a,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()}),null)}var O=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(O||{}),T=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(T||{});function R(e){let t=o.useContext(s);return t||(0,i.Oi)(!1),t}function _(e){let t=o.useContext(l);return t||(0,i.Oi)(!1),t}function M(e){let t=function(){let e=o.useContext(d);return e||(0,i.Oi)(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||(0,i.Oi)(!1),n.route.id}const P={};const I=(e,t,n)=>{};function j(e,t){void 0===(null==e?void 0:e.v7_startTransition)&&I("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&t.v7_relativeSplatPath||I("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(void 0===t.v7_fetcherPersist&&I("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&I("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&I("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&I("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}(r||(r=n.t(o,2))).startTransition;function L(e){return function(e){let t=o.useContext(d).outlet;return t?o.createElement(b.Provider,{value:e},t):t}(e.context)}function N(e){let{basename:t="/",children:n=null,location:r,navigationType:s=i.rc.Pop,navigator:l,static:d=!1,future:f}=e;h()&&(0,i.Oi)(!1);let p=t.replace(/^\/*/,"/"),m=o.useMemo((()=>({basename:p,navigator:l,static:d,future:a({v7_relativeSplatPath:!1},f)})),[p,f,l,d]);"string"===typeof r&&(r=(0,i.Rr)(r));let{pathname:g="/",search:v="",hash:b="",state:y=null,key:w="default"}=r,A=o.useMemo((()=>{let e=(0,i.pb)(g,p);return null==e?null:{location:{pathname:e,search:v,hash:b,state:y,key:w},navigationType:s}}),[p,g,v,b,y,w,s]);return null==A?null:o.createElement(c.Provider,{value:m},o.createElement(u.Provider,{children:n,value:A}))}new Promise((()=>{}));o.Component},28555:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext(null)},28807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>i.A});var r=n(70505),o=n(80237),i=n(98076)},28810:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),s=n(13292),l=n(3484),c=n(70134);const u=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=(0,s.A)({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:l,max:c=r}=a?i:e;return{badgeContent:l,invisible:a,max:c,displayValue:l&&Number(l)>c?"".concat(c,"+"):l}};var d=n(59254),f=n(18463),p=n(89548),h=n(45558),m=n(1614);function g(e){return(0,m.Ay)("MuiBadge",e)}const v=(0,h.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var b=n(44414);const y=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],w=(0,d.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),A=(0,d.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t["anchorOrigin".concat((0,p.A)(n.anchorOrigin.vertical)).concat((0,p.A)(n.anchorOrigin.horizontal)).concat((0,p.A)(n.overlap))],"default"!==n.color&&t["color".concat((0,p.A)(n.color))],n.invisible&&t.invisible]}})((e=>{let{theme:t}=e;var n;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n,r;return(null!=(n=t.vars)?n:t).palette[e].main&&(null!=(r=t.vars)?r:t).palette[e].contrastText})).map((e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}})),x=i.forwardRef((function(e,t){var n,i,d,h,m,v;const x=(0,f.b)({props:e,name:"MuiBadge"}),{anchorOrigin:S={vertical:"top",horizontal:"right"},className:E,component:k,components:C={},componentsProps:O={},children:T,overlap:R="rectangular",color:_="default",invisible:M=!1,max:P=99,badgeContent:I,slots:j,slotProps:L,showZero:N=!1,variant:B="standard"}=x,z=(0,o.A)(x,y),{badgeContent:D,invisible:F,max:H,displayValue:W}=u({max:P,invisible:M,badgeContent:I,showZero:N}),U=(0,s.A)({anchorOrigin:S,color:_,overlap:R,variant:B,badgeContent:I}),V=F||null==D&&"dot"!==B,{color:G=_,overlap:q=R,anchorOrigin:K=S,variant:X=B}=V?U:x,Y="dot"!==X?W:void 0,Q=(0,r.A)({},x,{badgeContent:D,invisible:V,max:H,displayValue:Y,showZero:N,anchorOrigin:K,color:G,overlap:q,variant:X}),Z=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible","anchorOrigin".concat((0,p.A)(n.vertical)).concat((0,p.A)(n.horizontal)),"anchorOrigin".concat((0,p.A)(n.vertical)).concat((0,p.A)(n.horizontal)).concat((0,p.A)(o)),"overlap".concat((0,p.A)(o)),"default"!==t&&"color".concat((0,p.A)(t))]};return(0,l.A)(s,g,a)})(Q),J=null!=(n=null!=(i=null==j?void 0:j.root)?i:C.Root)?n:w,$=null!=(d=null!=(h=null==j?void 0:j.badge)?h:C.Badge)?d:A,ee=null!=(m=null==L?void 0:L.root)?m:O.root,te=null!=(v=null==L?void 0:L.badge)?v:O.badge,ne=(0,c.A)({elementType:J,externalSlotProps:ee,externalForwardedProps:z,additionalProps:{ref:t,as:k},ownerState:Q,className:(0,a.A)(null==ee?void 0:ee.className,Z.root,E)}),re=(0,c.A)({elementType:$,externalSlotProps:te,ownerState:Q,className:(0,a.A)(Z.badge,null==te?void 0:te.className)});return(0,b.jsxs)(J,(0,r.A)({},ne,{children:[T,(0,b.jsx)($,(0,r.A)({},re,{children:Y}))]}))}))},28843:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>A.A,StyledEngineProvider:()=>w.A,ThemeContext:()=>s.T,css:()=>y.AH,default:()=>x,internal_processStyles:()=>S,keyframes:()=>y.i7});var r=n(9950),o=n(58168);var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const a=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var s=n(70151),l=n(71783),c=n(24386),u=n(96477),d=a,f=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?d:f},h=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;(0,l.SF)(t,n,r);(0,u.s)((function(){return(0,l.sk)(t,n,r)}));return null};const g=function e(t,n){var i,a,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(i=n.label,a=n.target);var f=h(t,n,u),g=f||p(d),v=!g("as");return function(){var b=arguments,y=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&y.push("label:"+i+";"),null==b[0]||void 0===b[0].raw)y.push.apply(y,b);else{0,y.push(b[0][0]);for(var w=b.length,A=1;A{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},29120:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(70134),c=n(98370),u=n(96039),d=n(59254),f=n(18463),p=n(55158),h=n(49456),m=n(61262),g=n(59520),v=n(21538),b=n(12620),y=n(89222),w=n(52478);function A(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function x(e){return parseInt((0,y.A)(e).getComputedStyle(e).paddingRight,10)||0}function S(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&A(e,o)}))}function E(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function k(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,m.A)(e);return t.body===e?(0,y.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,w.A)((0,m.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(x(r)+e,"px");const t=(0,m.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(x(t)+e,"px")}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,m.A)(r).body;else{const t=r.parentElement,n=(0,y.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const C=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&A(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);S(t,e.mount,e.modalRef,r,!0);const o=E(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=E(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=k(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=E(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&A(e.modalRef,t),S(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&A(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const O=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:a=C,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:c,children:u,onClose:d,open:f,rootRef:p}=e,y=i.useRef({}),w=i.useRef(null),x=i.useRef(null),S=(0,h.A)(x,p),[E,k]=i.useState(!f),O=function(e){return!!e&&e.props.hasOwnProperty("in")}(u);let T=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(T=!1);const R=()=>(y.current.modalRef=x.current,y.current.mount=w.current,y.current),_=()=>{a.mount(R(),{disableScrollLock:r}),x.current&&(x.current.scrollTop=0)},M=(0,g.A)((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,m.A)(w.current).body;a.add(R(),e),x.current&&_()})),P=i.useCallback((()=>a.isTopModal(R())),[a]),I=(0,g.A)((e=>{w.current=e,e&&(f&&P()?_():x.current&&A(x.current,T))})),j=i.useCallback((()=>{a.remove(R(),T)}),[T,a]);i.useEffect((()=>()=>{j()}),[j]),i.useEffect((()=>{f?M():O&&s||j()}),[f,j,O,s,M]);const L=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&P()&&(n||(t.stopPropagation(),d&&d(t,"escapeKeyDown")))},N=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&d&&d(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,b.A)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,o.A)({},n,t);return(0,o.A)({role:"presentation"},r,{onKeyDown:L(r),ref:S})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.A)({"aria-hidden":!0},e,{onClick:N(e),open:f})},getTransitionProps:()=>({onEnter:(0,v.A)((()=>{k(!1),l&&l()}),null==u?void 0:u.props.onEnter),onExited:(0,v.A)((()=>{k(!0),c&&c(),s&&j()}),null==u?void 0:u.props.onExited)}),rootRef:S,portalRef:I,isTopModal:P,exited:E,hasTransition:O}};var T=n(45558),R=n(1614);function _(e){return(0,R.Ay)("MuiModal",e)}(0,T.A)("MuiModal",["root","hidden","backdrop"]);var M=n(44414);const P=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],I=(0,d.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),j=(0,d.Ay)(p.A,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),L=i.forwardRef((function(e,t){var n,d,p,h,m,g;const v=(0,f.b)({name:"MuiModal",props:e}),{BackdropComponent:b=j,BackdropProps:y,className:w,closeAfterTransition:A=!1,children:x,container:S,component:E,components:k={},componentsProps:C={},disableAutoFocus:T=!1,disableEnforceFocus:R=!1,disableEscapeKeyDown:L=!1,disablePortal:N=!1,disableRestoreFocus:B=!1,disableScrollLock:z=!1,hideBackdrop:D=!1,keepMounted:F=!1,onBackdropClick:H,open:W,slotProps:U,slots:V}=v,G=(0,r.A)(v,P),q=(0,o.A)({},v,{closeAfterTransition:A,disableAutoFocus:T,disableEnforceFocus:R,disableEscapeKeyDown:L,disablePortal:N,disableRestoreFocus:B,disableScrollLock:z,hideBackdrop:D,keepMounted:F}),{getRootProps:K,getBackdropProps:X,getTransitionProps:Y,portalRef:Q,isTopModal:Z,exited:J,hasTransition:$}=O((0,o.A)({},q,{rootRef:t})),ee=(0,o.A)({},q,{exited:J}),te=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,s.A)(o,_,r)})(ee),ne={};if(void 0===x.props.tabIndex&&(ne.tabIndex="-1"),$){const{onEnter:e,onExited:t}=Y();ne.onEnter=e,ne.onExited=t}const re=null!=(n=null!=(d=null==V?void 0:V.root)?d:k.Root)?n:I,oe=null!=(p=null!=(h=null==V?void 0:V.backdrop)?h:k.Backdrop)?p:b,ie=null!=(m=null==U?void 0:U.root)?m:C.root,ae=null!=(g=null==U?void 0:U.backdrop)?g:C.backdrop,se=(0,l.A)({elementType:re,externalSlotProps:ie,externalForwardedProps:G,getSlotProps:K,additionalProps:{ref:t,as:E},ownerState:ee,className:(0,a.A)(w,null==ie?void 0:ie.className,null==te?void 0:te.root,!ee.open&&ee.exited&&(null==te?void 0:te.hidden))}),le=(0,l.A)({elementType:oe,externalSlotProps:ae,additionalProps:y,getSlotProps:e=>X((0,o.A)({},e,{onClick:t=>{H&&H(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,a.A)(null==ae?void 0:ae.className,null==y?void 0:y.className,null==te?void 0:te.backdrop),ownerState:ee});return F||W||$&&!J?(0,M.jsx)(u.A,{ref:Q,container:S,disablePortal:N,children:(0,M.jsxs)(re,(0,o.A)({},se,{children:[!D&&b?(0,M.jsx)(oe,(0,o.A)({},le)):null,(0,M.jsx)(c.A,{disableEnforceFocus:R,disableAutoFocus:T,disableRestoreFocus:B,isEnabled:Z,open:W,children:i.cloneElement(x,ne)})]}))}):null}))},30086:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},30099:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(9950);var r=n(23235),o=n(44414);const i=(0,r.A)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},31014:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(95014).A},31506:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(49456).A},31761:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(!(0>>1;ri(l,n))ci(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(ci(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,p=3,h=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,y="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function A(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,I(x);else{var t=r(u);null!==t&&j(A,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,b(C),C=-1),h=!0;var i=p;try{for(w(n),f=r(c);null!==f&&(!(f.expirationTime>n)||e&&!R());){var a=f.callback;if("function"===typeof a){f.callback=null,p=f.priorityLevel;var s=a(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===r(c)&&o(c),w(n)}else o(c);f=r(c)}if(null!==f)var l=!0;else{var d=r(u);null!==d&&j(A,d.startTime-n),l=!1}return l}finally{f=null,p=i,h=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,k=null,C=-1,O=5,T=-1;function R(){return!(t.unstable_now()-Te||125a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(b(C),C=-1):g=!0,j(A,i-a))):(e.sortIndex=s,n(c,e),m||h||(m=!0,I(x))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},32049:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function b(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var w=y.prototype=new b;w.constructor=y,m(w,v.prototype),w.isPureReactComponent=!0;var A=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,o)&&!E.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1{"use strict";n.d(t,{Ay:()=>a});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})(),i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const r=i[t];return r?"".concat(n,"-").concat(r):"".concat(o.generate(e),"-").concat(t)}},32654:(e,t,n)=>{"use strict";var r=n(9950),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},33136:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(58168);function o(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach((i=>{if(i.toString().match(/^(components|slots)$/))n[i]=(0,r.A)({},e[i],n[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const a=e[i]||{},s=t[i];n[i]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[i]=(0,r.A)({},s),Object.keys(a).forEach((e=>{n[i][e]=o(a[e],s[e])}))):n[i]=s:n[i]=a}else void 0===n[i]&&(n[i]=e[i])})),n}},33158:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(9950);var r=n(88283),o=n(44414);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.mL,{styles:i})}},33738:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(67279),l=n(38528),c=n(3484),u=n(59254),d=n(18463),f=n(75361),p=n(70576),h=n(14857),m=n(31506),g=n(45558),v=n(1614);function b(e){return(0,v.Ay)("MuiCollapse",e)}(0,g.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var y=n(44414);const w=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],A=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,o.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})})),x=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),S=(0,u.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((e=>{let{ownerState:t}=e;return(0,o.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),E=i.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiCollapse"}),{addEndListener:u,children:g,className:v,collapsedSize:E="0px",component:k,easing:C,in:O,onEnter:T,onEntered:R,onEntering:_,onExit:M,onExited:P,onExiting:I,orientation:j="vertical",style:L,timeout:N=f.p0.standard,TransitionComponent:B=s.Ay}=n,z=(0,r.A)(n,w),D=(0,o.A)({},n,{orientation:j,collapsedSize:E}),F=(e=>{const{orientation:t,classes:n}=e,r={root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]};return(0,c.A)(r,b,n)})(D),H=(0,h.A)(),W=(0,l.A)(),U=i.useRef(null),V=i.useRef(),G="number"===typeof E?"".concat(E,"px"):E,q="horizontal"===j,K=q?"width":"height",X=i.useRef(null),Y=(0,m.A)(t,X),Q=e=>t=>{if(e){const n=X.current;void 0===t?e(n):e(n,t)}},Z=()=>U.current?U.current[q?"clientWidth":"clientHeight"]:0,J=Q(((e,t)=>{U.current&&q&&(U.current.style.position="absolute"),e.style[K]=G,T&&T(e,t)})),$=Q(((e,t)=>{const n=Z();U.current&&q&&(U.current.style.position="");const{duration:r,easing:o}=(0,p.c)({style:L,timeout:N,easing:C},{mode:"enter"});if("auto"===N){const t=H.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(t,"ms"),V.current=t}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style[K]="".concat(n,"px"),e.style.transitionTimingFunction=o,_&&_(e,t)})),ee=Q(((e,t)=>{e.style[K]="auto",R&&R(e,t)})),te=Q((e=>{e.style[K]="".concat(Z(),"px"),M&&M(e)})),ne=Q(P),re=Q((e=>{const t=Z(),{duration:n,easing:r}=(0,p.c)({style:L,timeout:N,easing:C},{mode:"exit"});if("auto"===N){const n=H.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(n,"ms"),V.current=n}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style[K]=G,e.style.transitionTimingFunction=r,I&&I(e)}));return(0,y.jsx)(B,(0,o.A)({in:O,onEnter:J,onEntered:ee,onEntering:$,onExit:te,onExited:ne,onExiting:re,addEndListener:e=>{"auto"===N&&W.start(V.current||0,e),u&&u(X.current,e)},nodeRef:X,timeout:"auto"===N?null:N},z,{children:(e,t)=>(0,y.jsx)(A,(0,o.A)({as:k,className:(0,a.A)(F.root,v,{entered:F.entered,exited:!O&&"0px"===G&&F.hidden}[e]),style:(0,o.A)({[q?"minWidth":"minHeight"]:G},L),ref:Y},t,{ownerState:(0,o.A)({},D,{state:e}),children:(0,y.jsx)(x,{ownerState:(0,o.A)({},D,{state:e}),className:F.wrapper,ref:U,children:(0,y.jsx)(S,{ownerState:(0,o.A)({},D,{state:e}),className:F.wrapperInner,children:g})})}))}))}));E.muiSupportAuto=!0;const k=E},34378:(e,t,n)=>{var r=n(14759);e.exports=function(){return r.Date.now()}},34677:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var r=n(64467);const o=Math.round;function i(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map((e=>parseFloat(e)));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const a=(e,t,n)=>0===n?e:e/100;function s(e,t){const n=t||255;return e>n?n:e<0?0:e}class l{constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if((0,r.A)(this,"isValid",!0),(0,r.A)(this,"r",0),(0,r.A)(this,"g",0),(0,r.A)(this,"b",0),(0,r.A)(this,"a",1),(0,r.A)(this,"_h",void 0),(0,r.A)(this,"_s",void 0),(0,r.A)(this,"_l",void 0),(0,r.A)(this,"_v",void 0),(0,r.A)(this,"_max",void 0),(0,r.A)(this,"_min",void 0),(0,r.A)(this,"_brightness",void 0),e)if("string"===typeof e){const n=e.trim();function o(e){return n.startsWith(e)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):o("rgb")?this.fromRgbString(n):o("hsl")?this.fromHslString(n):(o("hsv")||o("hsb"))&&this.fromHsvString(n)}else if(e instanceof l)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=s(e.r),this.g=s(e.g),this.b=s(e.b),this.a="number"===typeof e.a?s(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}else;}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if("undefined"===typeof this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:o(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g0&&void 0!==arguments[0]?arguments[0]:10;const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;const n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],a={r:o(i("r")),g:o(i("g")),b:o(i("b")),a:o(100*i("a"))/100};return this._c(a)}tint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:255,g:255,b:255,a:1},e)}shade(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>o((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(e+=2===r.length?r:"0"+r,"number"===typeof this.a&&this.a>=0&&this.a<1){const t=o(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=o(100*this.getSaturation()),n=o(100*this.getLightness());return 1!==this.a?"hsla(".concat(e,",").concat(t,"%,").concat(n,"%,").concat(this.a,")"):"hsl(".concat(e,",").concat(t,"%,").concat(n,"%)")}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.a,")"):"rgb(".concat(this.r,",").concat(this.g,",").concat(this.b,")")}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=s(t,n),r}_c(e){return new this.constructor(e)}getMax(){return"undefined"===typeof this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return"undefined"===typeof this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl(e){let{h:t,s:n,l:r,a:i}=e;if(this._h=t%360,this._s=n,this._l=r,this.a="number"===typeof i?i:1,n<=0){const e=o(255*r);this.r=e,this.g=e,this.b=e}let a=0,s=0,l=0;const c=t/60,u=(1-Math.abs(2*r-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,s=d):c>=1&&c<2?(a=d,s=u):c>=2&&c<3?(s=u,l=d):c>=3&&c<4?(s=d,l=u):c>=4&&c<5?(a=d,l=u):c>=5&&c<6&&(a=u,l=d);const f=r-u/2;this.r=o(255*(a+f)),this.g=o(255*(s+f)),this.b=o(255*(l+f))}fromHsv(e){let{h:t,s:n,v:r,a:i}=e;this._h=t%360,this._s=n,this._v=r,this.a="number"===typeof i?i:1;const a=o(255*r);if(this.r=a,this.g=a,this.b=a,n<=0)return;const s=t/60,l=Math.floor(s),c=s-l,u=o(r*(1-n)*255),d=o(r*(1-n*c)*255),f=o(r*(1-n*(1-c))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=d;break;case 4:this.r=f,this.g=u;break;default:this.g=u,this.b=d}}fromHsvString(e){const t=i(e,a);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=i(e,a);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=i(e,((e,t)=>t.includes("%")?o(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}},34805:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,MR:()=>o,Rg:()=>i,cR:()=>a});const r=(0,n(11359).Z0)({name:"fcm",initialState:{permission:null,token:null},reducers:{setFcmToken(e,t){e.token=t.payload},clearFcmToken(e){e.token=null},setFcmPermission(e,t){e.permission=t.payload}}}),{setFcmToken:o,clearFcmToken:i,setFcmPermission:a}=r.actions,s=r.reducer},36658:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9950);const o=function(e,t){var n,o;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},36889:(e,t,n)=>{"use strict";n.d(t,{z1:()=>k,cM:()=>m,u$:()=>V,UA:()=>_,uy:()=>g});var r=n(34677),o=2,i=.16,a=.05,s=.05,l=.15,c=5,u=4,d=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function f(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-o*t:Math.round(e.h)+o*t:n?Math.round(e.h)+o*t:Math.round(e.h)-o*t)<0?r+=360:r>=360&&(r-=360),r}function p(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-i*t:t===u?e.s+i:e.s+a*t)>1&&(r=1),n&&t===c&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100);var r}function h(e,t,n){var r;return r=n?e.v+s*t:e.v-l*t,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}function m(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],o=new r.Y(e),i=o.toHsv(),a=c;a>0;a-=1){var s=new r.Y({h:f(i,a,!0),s:p(i,a,!0),v:h(i,a,!0)});n.push(s)}n.push(o);for(var l=1;l<=u;l+=1){var m=new r.Y({h:f(i,l),s:p(i,l),v:h(i,l)});n.push(m)}return"dark"===t.theme?d.map((function(e){var o=e.index,i=e.amount;return new r.Y(t.backgroundColor||"#141414").mix(n[o],i).toHexString()})):n.map((function(e){return e.toHexString()}))}var g={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},v=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];v.primary=v[5];var b=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];b.primary=b[5];var y=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];y.primary=y[5];var w=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];w.primary=w[5];var A=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];A.primary=A[5];var x=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];x.primary=x[5];var S=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];S.primary=S[5];var E=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];E.primary=E[5];var k=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];k.primary=k[5];var C=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];C.primary=C[5];var O=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];O.primary=O[5];var T=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];T.primary=T[5];var R=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];R.primary=R[5];var _={red:v,volcano:b,orange:y,gold:w,yellow:A,lime:x,green:S,cyan:E,blue:k,geekblue:C,purple:O,magenta:T,grey:R},M=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];M.primary=M[5];var P=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];P.primary=P[5];var I=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];I.primary=I[5];var j=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];j.primary=j[5];var L=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];L.primary=L[5];var N=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];N.primary=N[5];var B=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];B.primary=B[5];var z=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];z.primary=z[5];var D=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];D.primary=D[5];var F=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];F.primary=F[5];var H=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];H.primary=H[5];var W=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];W.primary=W[5];var U=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];U.primary=U[5];var V={red:M,volcano:P,orange:I,gold:j,yellow:L,lime:N,green:B,cyan:z,blue:D,geekblue:F,purple:H,magenta:W,grey:U}},37295:(e,t,n)=>{"use strict";var r=n(24994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=h,slotShouldForwardProp:l=h}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:v((0,o.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:m,skipSx:w,overridesResolver:A=b(g(p))}=c,x=(0,i.default)(c,f),S=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,E=w||!1;let k=h;"Root"===p||"root"===p?k=r:p?k=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(k=void 0);const C=(0,a.default)(e,(0,o.default)({shouldForwardProp:k,label:undefined},x)),O=e=>"function"===typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>y(e,(0,o.default)({},r,{theme:v({theme:r.theme,defaultTheme:n,themeId:t})})):e,T=function(r){let i=O(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l{const r=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const i=r.components[d].styleOverrides,a={};return Object.entries(i).forEach((t=>{let[n,i]=t;a[n]=y(i,(0,o.default)({},e,{theme:r}))})),A(e,a)})),d&&!S&&c.push((e=>{var r;const i=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));return y({variants:null==i||null==(r=i.components)||null==(r=r[d])?void 0:r.variants},(0,o.default)({},e,{theme:i}))})),E||c.push(u);const f=c.length-s.length;if(Array.isArray(r)&&f>0){const e=new Array(f).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=C(i,...c);return e.muiName&&(p.muiName=e.muiName),p};return C.withConfig&&(T.withConfig=C.withConfig),T}};var o=r(n(94634)),i=r(n(54893)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(28843)),s=n(78600),l=(r(n(69848)),r(n(14919)),r(n(49904))),c=r(n(28807));const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const m=(0,l.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function b(e){return e?(t,n)=>n[e]:null}function y(e,t){let{ownerState:n}=t,r=(0,i.default)(t,u);const a="function"===typeof e?e((0,o.default)({ownerState:n},r)):e;if(Array.isArray(a))return a.flatMap((e=>y(e,(0,o.default)({ownerState:n},r))));if(a&&"object"===typeof a&&Array.isArray(a.variants)){const{variants:e=[]}=a;let t=(0,i.default)(a,d);return e.forEach((e=>{let i=!0;"function"===typeof e.props?i=e.props((0,o.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,o.default)({ownerState:n},r,n)):e.style))})),t}return a}},37476:(e,t,n)=>{"use strict";n.d(t,{A:()=>h,s:()=>m});var r=n(89379),o=n(80045),i=n(9950),a=n(16491),s=n(40165),l=n(33738),c=n(57191),u=n(48205),d=n(19489),f=n(44414);const p=["children","position","type","direction"],h=(0,i.forwardRef)(((e,t)=>{let{children:n,position:i="top-left",type:h="grow",direction:m="up"}=e,g=(0,o.A)(e,p),v={transformOrigin:"0 0 0"};switch(i){case"top-right":v={transformOrigin:"top right"};break;case"top":v={transformOrigin:"top"};break;case"bottom-left":v={transformOrigin:"bottom left"};break;case"bottom-right":v={transformOrigin:"bottom right"};break;case"bottom":v={transformOrigin:"bottom"};break;default:v={transformOrigin:"0 0 0"}}return(0,f.jsxs)(a.A,{ref:t,children:["grow"===h&&(0,f.jsx)(s.A,(0,r.A)((0,r.A)({},g),{},{timeout:{appear:0,enter:150,exit:150},children:(0,f.jsx)(a.A,{sx:v,children:n})})),"collapse"===h&&(0,f.jsx)(l.A,(0,r.A)((0,r.A)({},g),{},{sx:v,children:n})),"fade"===h&&(0,f.jsx)(c.A,(0,r.A)((0,r.A)({},g),{},{timeout:{appear:0,enter:300,exit:150},children:(0,f.jsx)(a.A,{sx:v,children:n})})),"slide"===h&&(0,f.jsx)(u.A,(0,r.A)((0,r.A)({},g),{},{timeout:{appear:0,enter:150,exit:150},direction:m,children:(0,f.jsx)(a.A,{sx:v,children:n})})),"zoom"===h&&(0,f.jsx)(d.A,(0,r.A)((0,r.A)({},g),{},{children:(0,f.jsx)(a.A,{sx:v,children:n})}))]})})),m=(0,i.forwardRef)((function(e,t){return(0,f.jsx)(d.A,(0,r.A)({ref:t,timeout:200},e))}))},37750:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nr})},38166:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(98587),o=n(58168),i=n(9417),a=n(77387),s=n(9950),l=n(28555);function c(e,t){var n=Object.create(null);return e&&s.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,s.isValidElement)(e)?t(e):e}(e)})),n}function u(e,t,n){return null!=n[t]?n[t]:e.props[t]}function d(e,t,n){var r=c(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r{"use strict";var r=n(9950),o=n(75340);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n