From 5e40b80a3f20fb05a8de547831155a3ba4ccf789 Mon Sep 17 00:00:00 2001 From: dharaneesh-r Date: Tue, 16 Jun 2026 19:59:52 +0530 Subject: [PATCH] updates on the build file regarding the changes on the profitablity page create under the report section --- build/asset-manifest.json | 37 ++++++++++--------- build/index.html | 2 +- build/static/js/1131.dfafaa40.chunk.js | 1 - build/static/js/191.a343f9f5.chunk.js | 1 + build/static/js/2548.501e5a58.chunk.js | 1 - build/static/js/3257.74ffd204.chunk.js | 1 - build/static/js/3305.21ce5369.chunk.js | 1 - build/static/js/3388.e9dd817e.chunk.js | 1 + build/static/js/348.a1db66c5.chunk.js | 1 + build/static/js/3624.15d722f0.chunk.js | 1 - build/static/js/3624.9b94bbb8.chunk.js | 1 + build/static/js/436.b7322d7b.chunk.js | 1 + ...826a6b.chunk.js => 4486.23cac129.chunk.js} | 2 +- build/static/js/4542.c6c7874f.chunk.js | 1 + build/static/js/4813.fb867d55.chunk.js | 1 - build/static/js/4894.cfa4d36d.chunk.js | 1 + build/static/js/5116.88b8f8cf.chunk.js | 2 + ...txt => 5116.88b8f8cf.chunk.js.LICENSE.txt} | 0 build/static/js/523.8639a532.chunk.js | 2 - ...65290c.chunk.js => 5260.ffe264e4.chunk.js} | 2 +- build/static/js/5766.994fb72c.chunk.js | 1 + build/static/js/6150.41b0a8b5.chunk.js | 1 - build/static/js/6467.116b66d0.chunk.js | 1 - build/static/js/6810.2e79aa63.chunk.js | 1 + build/static/js/6849.2250b254.chunk.js | 1 - build/static/js/6849.648780b7.chunk.js | 1 + build/static/js/7099.f09d5814.chunk.js | 1 - build/static/js/7809.56441bc3.chunk.js | 1 - ...c19cd6.chunk.js => 8846.e95756a1.chunk.js} | 2 +- build/static/js/9027.574b1256.chunk.js | 1 + build/static/js/9438.463ad394.chunk.js | 1 + .../js/{main.d099bb12.js => main.60cfeca9.js} | 4 +- ...CENSE.txt => main.60cfeca9.js.LICENSE.txt} | 0 33 files changed, 39 insertions(+), 37 deletions(-) delete mode 100644 build/static/js/1131.dfafaa40.chunk.js create mode 100644 build/static/js/191.a343f9f5.chunk.js delete mode 100644 build/static/js/2548.501e5a58.chunk.js delete mode 100644 build/static/js/3257.74ffd204.chunk.js delete mode 100644 build/static/js/3305.21ce5369.chunk.js create mode 100644 build/static/js/3388.e9dd817e.chunk.js create mode 100644 build/static/js/348.a1db66c5.chunk.js delete mode 100644 build/static/js/3624.15d722f0.chunk.js create mode 100644 build/static/js/3624.9b94bbb8.chunk.js create mode 100644 build/static/js/436.b7322d7b.chunk.js rename build/static/js/{7537.36826a6b.chunk.js => 4486.23cac129.chunk.js} (66%) create mode 100644 build/static/js/4542.c6c7874f.chunk.js delete mode 100644 build/static/js/4813.fb867d55.chunk.js create mode 100644 build/static/js/4894.cfa4d36d.chunk.js create mode 100644 build/static/js/5116.88b8f8cf.chunk.js rename build/static/js/{523.8639a532.chunk.js.LICENSE.txt => 5116.88b8f8cf.chunk.js.LICENSE.txt} (100%) delete mode 100644 build/static/js/523.8639a532.chunk.js rename build/static/js/{5260.2165290c.chunk.js => 5260.ffe264e4.chunk.js} (89%) create mode 100644 build/static/js/5766.994fb72c.chunk.js delete mode 100644 build/static/js/6150.41b0a8b5.chunk.js delete mode 100644 build/static/js/6467.116b66d0.chunk.js create mode 100644 build/static/js/6810.2e79aa63.chunk.js delete mode 100644 build/static/js/6849.2250b254.chunk.js create mode 100644 build/static/js/6849.648780b7.chunk.js delete mode 100644 build/static/js/7099.f09d5814.chunk.js delete mode 100644 build/static/js/7809.56441bc3.chunk.js rename build/static/js/{8846.90c19cd6.chunk.js => 8846.e95756a1.chunk.js} (84%) create mode 100644 build/static/js/9027.574b1256.chunk.js create mode 100644 build/static/js/9438.463ad394.chunk.js rename build/static/js/{main.d099bb12.js => main.60cfeca9.js} (72%) rename build/static/js/{main.d099bb12.js.LICENSE.txt => main.60cfeca9.js.LICENSE.txt} (100%) diff --git a/build/asset-manifest.json b/build/asset-manifest.json index dc5e484..5433bf3 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/static/css/main.b85b0dd8.css", - "main.js": "/static/js/main.d099bb12.js", + "main.js": "/static/js/main.60cfeca9.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", @@ -26,17 +26,18 @@ "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.2250b254.chunk.js": "/static/js/6849.2250b254.chunk.js", + "static/js/6849.648780b7.chunk.js": "/static/js/6849.648780b7.chunk.js", "static/css/8846.d6bfd15f.chunk.css": "/static/css/8846.d6bfd15f.chunk.css", - "static/js/8846.90c19cd6.chunk.js": "/static/js/8846.90c19cd6.chunk.js", + "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.463ad394.chunk.js": "/static/js/9438.463ad394.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/2548.501e5a58.chunk.js": "/static/js/2548.501e5a58.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/5260.2165290c.chunk.js": "/static/js/5260.2165290c.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", @@ -44,43 +45,43 @@ "static/js/1222.97f70748.chunk.js": "/static/js/1222.97f70748.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/6150.41b0a8b5.chunk.js": "/static/js/6150.41b0a8b5.chunk.js", + "static/js/191.a343f9f5.chunk.js": "/static/js/191.a343f9f5.chunk.js", "static/js/7980.893651c1.chunk.js": "/static/js/7980.893651c1.chunk.js", "static/js/3565.5749e522.chunk.js": "/static/js/3565.5749e522.chunk.js", "static/js/9459.5f509ca8.chunk.js": "/static/js/9459.5f509ca8.chunk.js", "static/js/62.8be6503f.chunk.js": "/static/js/62.8be6503f.chunk.js", + "static/js/9826.07f60dc6.chunk.js": "/static/js/9826.07f60dc6.chunk.js", "static/js/3302.c5347b25.chunk.js": "/static/js/3302.c5347b25.chunk.js", "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/9826.07f60dc6.chunk.js": "/static/js/9826.07f60dc6.chunk.js", "static/js/2075.9858b66a.chunk.js": "/static/js/2075.9858b66a.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/7809.56441bc3.chunk.js": "/static/js/7809.56441bc3.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", "static/js/5527.2024fea7.chunk.js": "/static/js/5527.2024fea7.chunk.js", "static/js/3680.460c3cd4.chunk.js": "/static/js/3680.460c3cd4.chunk.js", - "static/js/523.8639a532.chunk.js": "/static/js/523.8639a532.chunk.js", + "static/js/5116.88b8f8cf.chunk.js": "/static/js/5116.88b8f8cf.chunk.js", "static/js/6651.ada8ee90.chunk.js": "/static/js/6651.ada8ee90.chunk.js", "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/6467.116b66d0.chunk.js": "/static/js/6467.116b66d0.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/3305.21ce5369.chunk.js": "/static/js/3305.21ce5369.chunk.js", - "static/js/1131.dfafaa40.chunk.js": "/static/js/1131.dfafaa40.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", - "static/js/3257.74ffd204.chunk.js": "/static/js/3257.74ffd204.chunk.js", - "static/js/4813.fb867d55.chunk.js": "/static/js/4813.fb867d55.chunk.js", - "static/js/7099.f09d5814.chunk.js": "/static/js/7099.f09d5814.chunk.js", - "static/js/7537.36826a6b.chunk.js": "/static/js/7537.36826a6b.chunk.js", + "static/js/4894.cfa4d36d.chunk.js": "/static/js/4894.cfa4d36d.chunk.js", + "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/css/3624.a25a9ba8.chunk.css": "/static/css/3624.a25a9ba8.chunk.css", - "static/js/3624.15d722f0.chunk.js": "/static/js/3624.15d722f0.chunk.js", + "static/js/3624.9b94bbb8.chunk.js": "/static/js/3624.9b94bbb8.chunk.js", "static/js/23.16c886f8.chunk.js": "/static/js/23.16c886f8.chunk.js", "static/css/6509.ab611cf0.chunk.css": "/static/css/6509.ab611cf0.chunk.css", "static/media/aiImage.png": "/static/media/aiImage.89c2ccb91a41d85031e3.png", @@ -98,6 +99,6 @@ }, "entrypoints": [ "static/css/main.b85b0dd8.css", - "static/js/main.d099bb12.js" + "static/js/main.60cfeca9.js" ] } \ No newline at end of file diff --git a/build/index.html b/build/index.html index 97a7b91..cf2039d 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/1131.dfafaa40.chunk.js b/build/static/js/1131.dfafaa40.chunk.js deleted file mode 100644 index 0c4c89b..0000000 --- a/build/static/js/1131.dfafaa40.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1131,4813],{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")},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/191.a343f9f5.chunk.js b/build/static/js/191.a343f9f5.chunk.js new file mode 100644 index 0000000..ad2bbd0 --- /dev/null +++ b/build/static/js/191.a343f9f5.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[191],{1729:(t,e,s)=>{s.d(e,{t:()=>u});var i=s(9950),n=s(15941),r=s(45904),a=s(15441),h=s(30618),o=s(80958),l=s(73895);function u(t,e,s){const u=(0,a.jE)(s),c=(0,h.w)(),d=(0,r.h)(),A=u.defaultQueryOptions(t);A._optimisticResults=c?"isRestoring":"optimistic",(0,l.tu)(A),(0,o.LJ)(A,d),(0,o.wZ)(d);const[p]=i.useState((()=>new e(u,A))),f=p.getOptimisticResult(A);if(i.useSyncExternalStore(i.useCallback((t=>{const e=c?()=>{}:p.subscribe(n.j.batchCalls(t));return p.updateResult(),e}),[p,c]),(()=>p.getCurrentResult()),(()=>p.getCurrentResult())),i.useEffect((()=>{p.setOptions(A,{listeners:!1})}),[A,p]),(0,l.EU)(A,f))throw(0,l.iL)(A,p,d);if((0,o.$1)({result:f,errorResetBoundary:d,throwOnError:A.throwOnError,query:u.getQueryCache().get(A.queryHash)}))throw f.error;return A.notifyOnChangeProps?f:p.trackResult(f)}},20454:(t,e,s)=>{function i(t){if(null==t)throw new TypeError("Cannot destructure "+t)}s.d(e,{A:()=>i})},30618:(t,e,s)=>{s.d(e,{w:()=>r});var i=s(9950),n=i.createContext(!1),r=()=>i.useContext(n);n.Provider},45904:(t,e,s)=>{s.d(e,{h:()=>a});var i=s(9950);function n(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var r=i.createContext(n()),a=()=>i.useContext(r)},69347:(t,e,s)=>{s.d(e,{$:()=>q});var i,n,r,a,h,o,l,u,c,d,A,p,f,v,w,b,y,g,R,O,k,C,m,S=s(89379),W=s(20454),U=s(39790),E=s(55149),M=s(83568),F=s(64137),L=s(53167),Q=s(61664),T=s(15941),D=s(90698),P=s(95732),j=s(15368),q=(i=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,h=new WeakMap,o=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,A=new WeakMap,p=new WeakMap,f=new WeakMap,v=new WeakMap,w=new WeakSet,b=new WeakSet,y=new WeakSet,g=new WeakSet,R=new WeakSet,O=new WeakSet,k=new WeakSet,C=new WeakSet,m=new WeakSet,class extends P.Q{constructor(t,e){super(),(0,U.A)(this,m),(0,U.A)(this,C),(0,U.A)(this,k),(0,U.A)(this,O),(0,U.A)(this,R),(0,U.A)(this,g),(0,U.A)(this,y),(0,U.A)(this,b),(0,U.A)(this,w),(0,E.A)(this,i,{writable:!0,value:void 0}),(0,E.A)(this,n,{writable:!0,value:void 0}),(0,E.A)(this,r,{writable:!0,value:void 0}),(0,E.A)(this,a,{writable:!0,value:void 0}),(0,E.A)(this,h,{writable:!0,value:void 0}),(0,E.A)(this,o,{writable:!0,value:void 0}),(0,E.A)(this,l,{writable:!0,value:void 0}),(0,E.A)(this,u,{writable:!0,value:void 0}),(0,E.A)(this,c,{writable:!0,value:void 0}),(0,E.A)(this,d,{writable:!0,value:void 0}),(0,E.A)(this,A,{writable:!0,value:void 0}),(0,E.A)(this,p,{writable:!0,value:void 0}),(0,E.A)(this,f,{writable:!0,value:void 0}),(0,E.A)(this,v,{writable:!0,value:new Set}),this.options=e,(0,L.A)(this,i,t),(0,L.A)(this,l,null),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&((0,F.A)(this,n).addObserver(this),Z((0,F.A)(this,n),this.options)?(0,M.A)(this,w,I).call(this):this.updateResult(),(0,M.A)(this,R,B).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return H((0,F.A)(this,n),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return H((0,F.A)(this,n),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,(0,M.A)(this,O,K).call(this),(0,M.A)(this,k,z).call(this),(0,F.A)(this,n).removeObserver(this)}setOptions(t,e){const s=this.options,r=(0,F.A)(this,n);if(this.options=(0,F.A)(this,i).defaultQueryOptions(t),(0,Q.f8)(s,this.options)||(0,F.A)(this,i).getQueryCache().notify({type:"observerOptionsUpdated",query:(0,F.A)(this,n),observer:this}),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),(0,M.A)(this,C,G).call(this);const a=this.hasListeners();a&&N((0,F.A)(this,n),r,this.options,s)&&(0,M.A)(this,w,I).call(this),this.updateResult(e),!a||(0,F.A)(this,n)===r&&this.options.enabled===s.enabled&&this.options.staleTime===s.staleTime||(0,M.A)(this,b,_).call(this);const h=(0,M.A)(this,y,x).call(this);!a||(0,F.A)(this,n)===r&&this.options.enabled===s.enabled&&h===(0,F.A)(this,f)||(0,M.A)(this,g,$).call(this,h)}getOptimisticResult(t){const e=(0,F.A)(this,i).getQueryCache().build((0,F.A)(this,i),t),s=this.createResult(e,t);return function(t,e){if(!(0,Q.f8)(t.getCurrentResult(),e))return!0;return!1}(this,s)&&((0,L.A)(this,a,s),(0,L.A)(this,o,this.options),(0,L.A)(this,h,(0,F.A)(this,n).state)),s}getCurrentResult(){return(0,F.A)(this,a)}trackResult(t){const e={};return Object.keys(t).forEach((s=>{Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:()=>((0,F.A)(this,v).add(s),t[s])})})),e}getCurrentQuery(){return(0,F.A)(this,n)}refetch(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign({},((0,W.A)(t),t));return this.fetch((0,S.A)({},e))}fetchOptimistic(t){const e=(0,F.A)(this,i).defaultQueryOptions(t),s=(0,F.A)(this,i).getQueryCache().build((0,F.A)(this,i),e);return s.isFetchingOptimistic=!0,s.fetch().then((()=>this.createResult(s,e)))}fetch(t){var e;return(0,M.A)(this,w,I).call(this,(0,S.A)((0,S.A)({},t),{},{cancelRefetch:null===(e=t.cancelRefetch)||void 0===e||e})).then((()=>(this.updateResult(),(0,F.A)(this,a))))}createResult(t,e){const s=(0,F.A)(this,n),i=this.options,A=(0,F.A)(this,a),p=(0,F.A)(this,h),f=(0,F.A)(this,o),v=t!==s?t.state:(0,F.A)(this,r),{state:w}=t;let b,{error:y,errorUpdatedAt:g,fetchStatus:R,status:O}=w,k=!1;if(e._optimisticResults){const n=this.hasListeners(),r=!n&&Z(t,e),a=n&&N(t,s,e,i);(r||a)&&(R=(0,j.v_)(t.options.networkMode)?"fetching":"paused",w.dataUpdatedAt||(O="pending")),"isRestoring"===e._optimisticResults&&(R="idle")}if(e.select&&"undefined"!==typeof w.data)if(A&&w.data===(null===p||void 0===p?void 0:p.data)&&e.select===(0,F.A)(this,u))b=(0,F.A)(this,c);else try{(0,L.A)(this,u,e.select),b=e.select(w.data),b=(0,Q.pl)(null===A||void 0===A?void 0:A.data,b,e),(0,L.A)(this,c,b),(0,L.A)(this,l,null)}catch(E){(0,L.A)(this,l,E)}else b=w.data;if("undefined"!==typeof e.placeholderData&&"undefined"===typeof b&&"pending"===O){let t;var C;if(null!==A&&void 0!==A&&A.isPlaceholderData&&e.placeholderData===(null===f||void 0===f?void 0:f.placeholderData))t=A.data;else if(t="function"===typeof e.placeholderData?e.placeholderData(null===(C=(0,F.A)(this,d))||void 0===C?void 0:C.state.data,(0,F.A)(this,d)):e.placeholderData,e.select&&"undefined"!==typeof t)try{t=e.select(t),(0,L.A)(this,l,null)}catch(E){(0,L.A)(this,l,E)}"undefined"!==typeof t&&(O="success",b=(0,Q.pl)(null===A||void 0===A?void 0:A.data,t,e),k=!0)}(0,F.A)(this,l)&&(y=(0,F.A)(this,l),b=(0,F.A)(this,c),g=Date.now(),O="error");const m="fetching"===R,S="pending"===O,W="error"===O,U=S&&m;return{status:O,fetchStatus:R,isPending:S,isSuccess:"success"===O,isError:W,isInitialLoading:U,isLoading:U,data:b,dataUpdatedAt:w.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>v.dataUpdateCount||w.errorUpdateCount>v.errorUpdateCount,isFetching:m,isRefetching:m&&!S,isLoadingError:W&&0===w.dataUpdatedAt,isPaused:"paused"===R,isPlaceholderData:k,isRefetchError:W&&0!==w.dataUpdatedAt,isStale:V(t,e),refetch:this.refetch}}updateResult(t){const e=(0,F.A)(this,a),s=this.createResult((0,F.A)(this,n),this.options);if((0,L.A)(this,h,(0,F.A)(this,n).state),(0,L.A)(this,o,this.options),void 0!==(0,F.A)(this,h).data&&(0,L.A)(this,d,(0,F.A)(this,n)),(0,Q.f8)(s,e))return;(0,L.A)(this,a,s);const i={};!1!==(null===t||void 0===t?void 0:t.listeners)&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,s="function"===typeof t?t():t;if("all"===s||!s&&!(0,F.A)(this,v).size)return!0;const i=new Set(null!==s&&void 0!==s?s:(0,F.A)(this,v));return this.options.throwOnError&&i.add("error"),Object.keys((0,F.A)(this,a)).some((t=>{const s=t;return(0,F.A)(this,a)[s]!==e[s]&&i.has(s)}))})()&&(i.listeners=!0),(0,M.A)(this,m,J).call(this,(0,S.A)((0,S.A)({},i),t))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&(0,M.A)(this,R,B).call(this)}});function I(t){(0,M.A)(this,C,G).call(this);let e=(0,F.A)(this,n).fetch(this.options,t);return null!==t&&void 0!==t&&t.throwOnError||(e=e.catch(Q.lQ)),e}function _(){if((0,M.A)(this,O,K).call(this),Q.S$||(0,F.A)(this,a).isStale||!(0,Q.gn)(this.options.staleTime))return;const t=(0,Q.j3)((0,F.A)(this,a).dataUpdatedAt,this.options.staleTime)+1;(0,L.A)(this,A,setTimeout((()=>{(0,F.A)(this,a).isStale||this.updateResult()}),t))}function x(){var t;return null!==(t="function"===typeof this.options.refetchInterval?this.options.refetchInterval((0,F.A)(this,n)):this.options.refetchInterval)&&void 0!==t&&t}function $(t){(0,M.A)(this,k,z).call(this),(0,L.A)(this,f,t),!Q.S$&&!1!==this.options.enabled&&(0,Q.gn)((0,F.A)(this,f))&&0!==(0,F.A)(this,f)&&(0,L.A)(this,p,setInterval((()=>{(this.options.refetchIntervalInBackground||D.m.isFocused())&&(0,M.A)(this,w,I).call(this)}),(0,F.A)(this,f)))}function B(){(0,M.A)(this,b,_).call(this),(0,M.A)(this,g,$).call(this,(0,M.A)(this,y,x).call(this))}function K(){(0,F.A)(this,A)&&(clearTimeout((0,F.A)(this,A)),(0,L.A)(this,A,void 0))}function z(){(0,F.A)(this,p)&&(clearInterval((0,F.A)(this,p)),(0,L.A)(this,p,void 0))}function G(){const t=(0,F.A)(this,i).getQueryCache().build((0,F.A)(this,i),this.options);if(t===(0,F.A)(this,n))return;const e=(0,F.A)(this,n);(0,L.A)(this,n,t),(0,L.A)(this,r,t.state),this.hasListeners()&&(null===e||void 0===e||e.removeObserver(this),t.addObserver(this))}function J(t){T.j.batch((()=>{t.listeners&&this.listeners.forEach((t=>{t((0,F.A)(this,a))})),(0,F.A)(this,i).getQueryCache().notify({query:(0,F.A)(this,n),type:"observerResultsUpdated"})}))}function Z(t,e){return function(t,e){return!1!==e.enabled&&!t.state.dataUpdatedAt&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||t.state.dataUpdatedAt>0&&H(t,e,e.refetchOnMount)}function H(t,e,s){if(!1!==e.enabled){const i="function"===typeof s?s(t):s;return"always"===i||!1!==i&&V(t,e)}return!1}function N(t,e,s,i){return!1!==s.enabled&&(t!==e||!1===i.enabled)&&(!s.suspense||"error"!==t.state.status)&&V(t,s)}function V(t,e){return t.isStaleByTime(e.staleTime)}},73895:(t,e,s)=>{s.d(e,{EU:()=>r,iL:()=>a,nE:()=>n,tu:()=>i});var i=t=>{t.suspense&&"number"!==typeof t.staleTime&&(t.staleTime=1e3)},n=(t,e)=>t.isLoading&&t.isFetching&&!e,r=(t,e)=>(null===t||void 0===t?void 0:t.suspense)&&e.isPending,a=(t,e,s)=>e.fetchOptimistic(t).catch((()=>{s.clearReset()}))},80958:(t,e,s)=>{s.d(e,{$1:()=>h,LJ:()=>r,wZ:()=>a});var i=s(9950),n=s(98986),r=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},a=t=>{i.useEffect((()=>{t.clearReset()}),[t])},h=t=>{let{result:e,errorResetBoundary:s,throwOnError:i,query:r}=t;return e.isError&&!s.isReset()&&!e.isFetching&&r&&(0,n.G)(i,[e.error,r])}},98986:(t,e,s)=>{function i(t,e){return"function"===typeof t?t(...e):!!t}s.d(e,{G:()=>i})}}]); \ No newline at end of file diff --git a/build/static/js/2548.501e5a58.chunk.js b/build/static/js/2548.501e5a58.chunk.js deleted file mode 100644 index c411c96..0000000 --- a/build/static/js/2548.501e5a58.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2548],{4159:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,s=36e5,i="millisecond",n="second",r="minute",a="hour",u="day",o="week",c="month",h="quarter",l="year",f="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,A={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(t){var e=["th","st","nd","rd"],s=t%100;return"["+t+(e[(s-20)%10]||e[s]||e[0])+"]"}},m=function(t,e,s){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(s)+t},$={s:m,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),i=Math.floor(s/60),n=s%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(n,2,"0")},m:function t(e,s){if(e.date()1)return t(a[0])}else{var u=e.name;y[u]=e,n=u}return!i&&n&&(b=n),n||!i&&b},O=function(t,e){if(w(t))return t.clone();var s="object"==typeof e?e:{};return s.date=t,s.args=arguments,new k(s)},S=$;S.l=M,S.i=w,S.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var k=function(){function A(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[g]=!0}var m=A.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,s=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(p);if(i){var n=i[2]-1||0,r=(i[7]||"0").substring(0,3);return s?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var s=O(t);return this.startOf(e)<=s&&s<=this.endOf(e)},m.isAfter=function(t,e){return O(t){"use strict";s.d(e,{m:()=>u});var i=s(464),n=s(69995),r=s(2527),a=s(9950);const u=(0,i.wk)((function(t,e){const s=new r.Tooltip(t,e.overlayContainer);return(0,n.Q)(s,e)}),(function(t,e,s,i){let{position:n}=s;(0,a.useEffect)((function(){const s=e.overlayContainer;if(null==s)return;const{instance:r}=t,a=t=>{t.tooltip===r&&(null!=n&&r.setLatLng(n),r.update(),i(!0))},u=t=>{t.tooltip===r&&i(!1)};return s.on({tooltipopen:a,tooltipclose:u}),s.bindTooltip(r),function(){s.off({tooltipopen:a,tooltipclose:u}),null!=s._map&&s.unbindTooltip()}}),[t,e,i,n])}))},36687:(t,e,s)=>{"use strict";s.d(e,{E:()=>T});var i,n,r,a,u,o,c,h,l,f,d,p=s(80045),v=s(9950),A=s(39790),m=s(55149),$=s(64137),b=s(83568),y=s(53167),g=s(15941),w=s(69347),M=s(95732),O=s(61664);function S(t,e){return t.filter((t=>!e.includes(t)))}var k=(i=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakMap,o=new WeakMap,c=new WeakSet,h=new WeakSet,l=new WeakSet,f=new WeakSet,d=new WeakSet,class extends M.Q{constructor(t,e,s){super(),(0,A.A)(this,d),(0,A.A)(this,f),(0,A.A)(this,l),(0,A.A)(this,h),(0,A.A)(this,c),(0,m.A)(this,i,{writable:!0,value:void 0}),(0,m.A)(this,n,{writable:!0,value:void 0}),(0,m.A)(this,r,{writable:!0,value:void 0}),(0,m.A)(this,a,{writable:!0,value:void 0}),(0,m.A)(this,u,{writable:!0,value:void 0}),(0,m.A)(this,o,{writable:!0,value:void 0}),(0,y.A)(this,i,t),(0,y.A)(this,r,[]),(0,y.A)(this,a,[]),(0,b.A)(this,c,D).call(this,[]),this.setQueries(e,s)}onSubscribe(){1===this.listeners.size&&(0,$.A)(this,a).forEach((t=>{t.subscribe((e=>{(0,b.A)(this,f,E).call(this,t,e)}))}))}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,(0,$.A)(this,a).forEach((t=>{t.destroy()}))}setQueries(t,e,s){(0,y.A)(this,r,t),(0,y.A)(this,u,e),g.j.batch((()=>{const t=(0,$.A)(this,a),e=(0,b.A)(this,l,P).call(this,(0,$.A)(this,r));e.forEach((t=>t.observer.setOptions(t.defaultedQueryOptions,s)));const i=e.map((t=>t.observer)),n=i.map((t=>t.getCurrentResult())),u=i.some(((e,s)=>e!==t[s]));(t.length!==i.length||u)&&((0,y.A)(this,a,i),(0,b.A)(this,c,D).call(this,n),this.hasListeners()&&(S(t,i).forEach((t=>{t.destroy()})),S(i,t).forEach((t=>{t.subscribe((e=>{(0,b.A)(this,f,E).call(this,t,e)}))})),(0,b.A)(this,d,x).call(this)))}))}getCurrentResult(){return(0,$.A)(this,o)}getQueries(){return(0,$.A)(this,a).map((t=>t.getCurrentQuery()))}getObservers(){return(0,$.A)(this,a)}getOptimisticResult(t,e){const s=(0,b.A)(this,l,P).call(this,t),i=s.map((t=>t.observer.getOptimisticResult(t.defaultedQueryOptions)));return[i,t=>(0,b.A)(this,h,C).call(this,null!==t&&void 0!==t?t:i,e),()=>s.map(((t,e)=>{const s=i[e];return t.defaultedQueryOptions.notifyOnChangeProps?s:t.observer.trackResult(s)}))]}});function D(t){var e;(0,y.A)(this,n,t),(0,y.A)(this,o,(0,b.A)(this,h,C).call(this,t,null===(e=(0,$.A)(this,u))||void 0===e?void 0:e.combine))}function C(t,e){return e?(0,O.BH)((0,$.A)(this,o),e(t)):t}function P(t){const e=(0,$.A)(this,a),s=new Map(e.map((t=>[t.options.queryHash,t]))),n=t.map((t=>(0,$.A)(this,i).defaultQueryOptions(t))),r=n.flatMap((t=>{const e=s.get(t.queryHash);return null!=e?[{defaultedQueryOptions:t,observer:e}]:[]})),u=new Set(r.map((t=>t.defaultedQueryOptions.queryHash))),o=n.filter((t=>!u.has(t.queryHash))),c=t=>{const e=(0,$.A)(this,i).defaultQueryOptions(t),s=(0,$.A)(this,a).find((t=>t.options.queryHash===e.queryHash));return null!==s&&void 0!==s?s:new w.$((0,$.A)(this,i),e)},h=o.map((t=>({defaultedQueryOptions:t,observer:c(t)})));return r.concat(h).sort(((t,e)=>n.indexOf(t.defaultedQueryOptions)-n.indexOf(e.defaultedQueryOptions)))}function E(t,e){const s=(0,$.A)(this,a).indexOf(t);-1!==s&&((0,b.A)(this,c,D).call(this,function(t,e,s){const i=t.slice(0);return i[e]=s,i}((0,$.A)(this,n),s,e)),(0,b.A)(this,d,x).call(this))}function x(){g.j.batch((()=>{this.listeners.forEach((t=>{t((0,$.A)(this,n))}))}))}var W=s(15441),_=s(30618),Q=s(45904),L=s(80958),R=s(73895);const H=["queries"];function T(t,e){let{queries:s}=t,i=(0,p.A)(t,H);const n=(0,W.jE)(e),r=(0,_.w)(),a=(0,Q.h)(),u=v.useMemo((()=>s.map((t=>{const e=n.defaultQueryOptions(t);return e._optimisticResults=r?"isRestoring":"optimistic",e}))),[s,n,r]);u.forEach((t=>{(0,R.tu)(t),(0,L.LJ)(t,a)})),(0,L.wZ)(a);const[o]=v.useState((()=>new k(n,u,i))),[c,h,l]=o.getOptimisticResult(u,i.combine);v.useSyncExternalStore(v.useCallback((t=>r?()=>{}:o.subscribe(g.j.batchCalls(t))),[o,r]),(()=>o.getCurrentResult()),(()=>o.getCurrentResult())),v.useEffect((()=>{o.setQueries(u,i,{listeners:!1})}),[u,i,o]);const f=c.some(((t,e)=>(0,R.EU)(u[e],t)))?c.flatMap(((t,e)=>{const s=u[e];if(s){const e=new w.$(n,s);if((0,R.EU)(s,t))return(0,R.iL)(s,e,a);(0,R.nE)(t,r)&&(0,R.iL)(s,e,a)}return[]})):[];if(f.length>0)throw Promise.all(f);const d=c.find(((t,e)=>{const s=u[e];return s&&(0,L.$1)({result:t,errorResetBoundary:a,throwOnError:s.throwOnError,query:n.getQueryCache().get(s.queryHash)})}));if(null!==d&&void 0!==d&&d.error)throw d.error;return h(l())}},37119:(t,e,s)=>{"use strict";s.d(e,{p:()=>r});var i=s(464),n=s(2527);const r=(0,i.T7)((function(t){return new n.Control.Zoom(t)}))},48513:(t,e,s)=>{"use strict";s.d(e,{z:()=>u});var i=s(464),n=s(69995),r=s(2527),a=s(9950);const u=(0,i.wk)((function(t,e){const s=new r.Popup(t,e.overlayContainer);return(0,n.Q)(s,e)}),(function(t,e,s,i){let{position:n}=s;(0,a.useEffect)((function(){const{instance:s}=t;function r(t){t.popup===s&&(s.update(),i(!0))}function a(t){t.popup===s&&i(!1)}return e.map.on({popupopen:r,popupclose:a}),null==e.overlayContainer?(null!=n&&s.setLatLng(n),s.openOn(e.map)):e.overlayContainer.bindPopup(s),function(){var t;e.map.off({popupopen:r,popupclose:a}),null===(t=e.overlayContainer)||void 0===t||t.unbindPopup(),e.map.removeLayer(s)}}),[t,e,i,n])}))},51778:(t,e,s)=>{"use strict";s.d(e,{n:()=>S});var i,n,r,a,u,o,c=s(89379),h=s(9950),l=s(39790),f=s(55149),d=s(64137),p=s(83568),v=s(53167),A=s(92750),m=s(15941),$=s(95732),b=s(61664),y=(i=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakSet,o=new WeakSet,class extends $.Q{constructor(t,e){super(),(0,l.A)(this,o),(0,l.A)(this,u),(0,f.A)(this,i,{writable:!0,value:void 0}),(0,f.A)(this,n,{writable:!0,value:void 0}),(0,f.A)(this,r,{writable:!0,value:void 0}),(0,f.A)(this,a,{writable:!0,value:void 0}),(0,v.A)(this,n,void 0),(0,v.A)(this,i,t),this.setOptions(e),this.bindMethods(),(0,p.A)(this,u,g).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const s=this.options;this.options=(0,d.A)(this,i).defaultMutationOptions(t),(0,b.f8)(s,this.options)||(0,d.A)(this,i).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,d.A)(this,r),observer:this}),null===(e=(0,d.A)(this,r))||void 0===e||e.setOptions(this.options),null!==s&&void 0!==s&&s.mutationKey&&this.options.mutationKey&&(0,b.EN)(s.mutationKey)!==(0,b.EN)(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var t;this.hasListeners()||(null===(t=(0,d.A)(this,r))||void 0===t||t.removeObserver(this))}onMutationUpdate(t){(0,p.A)(this,u,g).call(this),(0,p.A)(this,o,w).call(this,t)}getCurrentResult(){return(0,d.A)(this,n)}reset(){var t;null===(t=(0,d.A)(this,r))||void 0===t||t.removeObserver(this),(0,v.A)(this,r,void 0),(0,p.A)(this,u,g).call(this),(0,p.A)(this,o,w).call(this)}mutate(t,e){var s;return(0,v.A)(this,a,e),null===(s=(0,d.A)(this,r))||void 0===s||s.removeObserver(this),(0,v.A)(this,r,(0,d.A)(this,i).getMutationCache().build((0,d.A)(this,i),this.options)),(0,d.A)(this,r).addObserver(this),(0,d.A)(this,r).execute(t)}});function g(){var t,e;const s=null!==(t=null===(e=(0,d.A)(this,r))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,A.$)();(0,v.A)(this,n,(0,c.A)((0,c.A)({},s),{},{isPending:"pending"===s.status,isSuccess:"success"===s.status,isError:"error"===s.status,isIdle:"idle"===s.status,mutate:this.mutate,reset:this.reset}))}function w(t){m.j.batch((()=>{if((0,d.A)(this,a)&&this.hasListeners()){const l=(0,d.A)(this,n).variables,f=(0,d.A)(this,n).context;var e,s,i,r;if("success"===(null===t||void 0===t?void 0:t.type))null===(e=(s=(0,d.A)(this,a)).onSuccess)||void 0===e||e.call(s,t.data,l,f),null===(i=(r=(0,d.A)(this,a)).onSettled)||void 0===i||i.call(r,t.data,null,l,f);else if("error"===(null===t||void 0===t?void 0:t.type)){var u,o,c,h;null===(u=(o=(0,d.A)(this,a)).onError)||void 0===u||u.call(o,t.error,l,f),null===(c=(h=(0,d.A)(this,a)).onSettled)||void 0===c||c.call(h,void 0,t.error,l,f)}}this.listeners.forEach((t=>{t((0,d.A)(this,n))}))}))}var M=s(15441),O=s(98986);function S(t,e){const s=(0,M.jE)(e),[i]=h.useState((()=>new y(s,t)));h.useEffect((()=>{i.setOptions(t)}),[i,t]);const n=h.useSyncExternalStore(h.useCallback((t=>i.subscribe(m.j.batchCalls(t))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),r=h.useCallback(((t,e)=>{i.mutate(t,e).catch(k)}),[i]);if(n.error&&(0,O.G)(i.options.throwOnError,[n.error]))throw n.error;return(0,c.A)((0,c.A)({},n),{},{mutate:r,mutateAsync:n.mutate})}function k(){}},60010:(t,e,s)=>{"use strict";s.d(e,{q:()=>o});var i=s(89379),n=s(69347),r=s(45247),a=class extends n.${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,i.A)((0,i.A)({},t),{},{behavior:(0,r.PL)()}),e)}getOptimisticResult(t){return t.behavior=(0,r.PL)(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(t,e){var s,n;const{state:a}=t,u=super.createResult(t,e),{isFetching:o,isRefetching:c}=u,h=o&&"forward"===(null===(s=a.fetchMeta)||void 0===s||null===(s=s.fetchMore)||void 0===s?void 0:s.direction),l=o&&"backward"===(null===(n=a.fetchMeta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction);return(0,i.A)((0,i.A)({},u),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.rB)(e,a.data),hasPreviousPage:(0,r.RQ)(e,a.data),isFetchingNextPage:h,isFetchingPreviousPage:l,isRefetching:c&&!h&&!l})}},u=s(1729);function o(t,e){return(0,u.t)(t,a,e)}},98007:(t,e,s)=>{"use strict";s.d(e,{ko:()=>n});var i=s(3388);s(9950);function n(){return(0,i.U$)().map}}}]); \ No newline at end of file diff --git a/build/static/js/3257.74ffd204.chunk.js b/build/static/js/3257.74ffd204.chunk.js deleted file mode 100644 index c702f90..0000000 --- a/build/static/js/3257.74ffd204.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3257],{46639:(t,e,s)=>{s.d(e,{A:()=>E});var i=s(57528),r=s(98587),a=s(58168),n=s(9950),o=s(72004),c=s(3484),l=s(88283),h=s(89548),u=s(18463),d=s(59254),v=s(45558),A=s(1614);function f(t){return(0,A.Ay)("MuiCircularProgress",t)}(0,v.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var p,m,g,b,k=s(44414);const S=["className","color","disableShrink","size","style","thickness","value","variant"];let w,y,x,P;const M=44,C=(0,l.i7)(w||(w=p||(p=(0,i.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),R=(0,l.i7)(y||(y=m||(m=(0,i.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"])))),N=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[e.root,e[s.variant],e["color".concat((0,h.A)(s.color))]]}})((t=>{let{ownerState:e,theme:s}=t;return(0,a.A)({display:"inline-block"},"determinate"===e.variant&&{transition:s.transitions.create("transform")},"inherit"!==e.color&&{color:(s.vars||s).palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&(0,l.AH)(x||(x=g||(g=(0,i.A)(["\n animation: "," 1.4s linear infinite;\n "]))),C)})),O=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),D=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[e.circle,e["circle".concat((0,h.A)(s.variant))],s.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:s}=t;return(0,a.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:s.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&!e.disableShrink&&(0,l.AH)(P||(P=b||(b=(0,i.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),R)})),E=n.forwardRef((function(t,e){const s=(0,u.b)({props:t,name:"MuiCircularProgress"}),{className:i,color:n="primary",disableShrink:l=!1,size:d=40,style:v,thickness:A=3.6,value:p=0,variant:m="indeterminate"}=s,g=(0,r.A)(s,S),b=(0,a.A)({},s,{color:n,disableShrink:l,size:d,thickness:A,value:p,variant:m}),w=(t=>{const{classes:e,variant:s,color:i,disableShrink:r}=t,a={root:["root",s,"color".concat((0,h.A)(i))],svg:["svg"],circle:["circle","circle".concat((0,h.A)(s)),r&&"circleDisableShrink"]};return(0,c.A)(a,f,e)})(b),y={},x={},P={};if("determinate"===m){const t=2*Math.PI*((M-A)/2);y.strokeDasharray=t.toFixed(3),P["aria-valuenow"]=Math.round(p),y.strokeDashoffset="".concat(((100-p)/100*t).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,k.jsx)(N,(0,a.A)({className:(0,o.A)(w.root,i),style:(0,a.A)({width:d,height:d},x,v),ownerState:b,ref:e,role:"progressbar"},P,g,{children:(0,k.jsx)(O,{className:w.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(M," ").concat(M),children:(0,k.jsx)(D,{className:w.circle,style:y,ownerState:b,cx:M,cy:M,r:(M-A)/2,fill:"none",strokeWidth:A})})}))}))},51778:(t,e,s)=>{s.d(e,{n:()=>P});var i,r,a,n,o,c,l=s(89379),h=s(9950),u=s(39790),d=s(55149),v=s(64137),A=s(83568),f=s(53167),p=s(92750),m=s(15941),g=s(95732),b=s(61664),k=(i=new WeakMap,r=new WeakMap,a=new WeakMap,n=new WeakMap,o=new WeakSet,c=new WeakSet,class extends g.Q{constructor(t,e){super(),(0,u.A)(this,c),(0,u.A)(this,o),(0,d.A)(this,i,{writable:!0,value:void 0}),(0,d.A)(this,r,{writable:!0,value:void 0}),(0,d.A)(this,a,{writable:!0,value:void 0}),(0,d.A)(this,n,{writable:!0,value:void 0}),(0,f.A)(this,r,void 0),(0,f.A)(this,i,t),this.setOptions(e),this.bindMethods(),(0,A.A)(this,o,S).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const s=this.options;this.options=(0,v.A)(this,i).defaultMutationOptions(t),(0,b.f8)(s,this.options)||(0,v.A)(this,i).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,v.A)(this,a),observer:this}),null===(e=(0,v.A)(this,a))||void 0===e||e.setOptions(this.options),null!==s&&void 0!==s&&s.mutationKey&&this.options.mutationKey&&(0,b.EN)(s.mutationKey)!==(0,b.EN)(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var t;this.hasListeners()||(null===(t=(0,v.A)(this,a))||void 0===t||t.removeObserver(this))}onMutationUpdate(t){(0,A.A)(this,o,S).call(this),(0,A.A)(this,c,w).call(this,t)}getCurrentResult(){return(0,v.A)(this,r)}reset(){var t;null===(t=(0,v.A)(this,a))||void 0===t||t.removeObserver(this),(0,f.A)(this,a,void 0),(0,A.A)(this,o,S).call(this),(0,A.A)(this,c,w).call(this)}mutate(t,e){var s;return(0,f.A)(this,n,e),null===(s=(0,v.A)(this,a))||void 0===s||s.removeObserver(this),(0,f.A)(this,a,(0,v.A)(this,i).getMutationCache().build((0,v.A)(this,i),this.options)),(0,v.A)(this,a).addObserver(this),(0,v.A)(this,a).execute(t)}});function S(){var t,e;const s=null!==(t=null===(e=(0,v.A)(this,a))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,p.$)();(0,f.A)(this,r,(0,l.A)((0,l.A)({},s),{},{isPending:"pending"===s.status,isSuccess:"success"===s.status,isError:"error"===s.status,isIdle:"idle"===s.status,mutate:this.mutate,reset:this.reset}))}function w(t){m.j.batch((()=>{if((0,v.A)(this,n)&&this.hasListeners()){const u=(0,v.A)(this,r).variables,d=(0,v.A)(this,r).context;var e,s,i,a;if("success"===(null===t||void 0===t?void 0:t.type))null===(e=(s=(0,v.A)(this,n)).onSuccess)||void 0===e||e.call(s,t.data,u,d),null===(i=(a=(0,v.A)(this,n)).onSettled)||void 0===i||i.call(a,t.data,null,u,d);else if("error"===(null===t||void 0===t?void 0:t.type)){var o,c,l,h;null===(o=(c=(0,v.A)(this,n)).onError)||void 0===o||o.call(c,t.error,u,d),null===(l=(h=(0,v.A)(this,n)).onSettled)||void 0===l||l.call(h,void 0,t.error,u,d)}}this.listeners.forEach((t=>{t((0,v.A)(this,r))}))}))}var y=s(15441),x=s(98986);function P(t,e){const s=(0,y.jE)(e),[i]=h.useState((()=>new k(s,t)));h.useEffect((()=>{i.setOptions(t)}),[i,t]);const r=h.useSyncExternalStore(h.useCallback((t=>i.subscribe(m.j.batchCalls(t))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),a=h.useCallback(((t,e)=>{i.mutate(t,e).catch(M)}),[i]);if(r.error&&(0,x.G)(i.options.throwOnError,[r.error]))throw r.error;return(0,l.A)((0,l.A)({},r),{},{mutate:a,mutateAsync:r.mutate})}function M(){}},60010:(t,e,s)=>{s.d(e,{q:()=>c});var i=s(89379),r=s(69347),a=s(45247),n=class extends r.${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,i.A)((0,i.A)({},t),{},{behavior:(0,a.PL)()}),e)}getOptimisticResult(t){return t.behavior=(0,a.PL)(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(t,e){var s,r;const{state:n}=t,o=super.createResult(t,e),{isFetching:c,isRefetching:l}=o,h=c&&"forward"===(null===(s=n.fetchMeta)||void 0===s||null===(s=s.fetchMore)||void 0===s?void 0:s.direction),u=c&&"backward"===(null===(r=n.fetchMeta)||void 0===r||null===(r=r.fetchMore)||void 0===r?void 0:r.direction);return(0,i.A)((0,i.A)({},o),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.rB)(e,n.data),hasPreviousPage:(0,a.RQ)(e,n.data),isFetchingNextPage:h,isFetchingPreviousPage:u,isRefetching:l&&!h&&!u})}},o=s(1729);function c(t,e){return(0,o.t)(t,n,e)}},79739:(t,e,s)=>{s.d(e,{A:()=>p});var i=s(98587),r=s(58168),a=s(9950),n=s(72004),o=s(3484),c=s(59254),l=s(18463),h=s(45558),u=s(1614);function d(t){return(0,u.Ay)("MuiDialogActions",t)}(0,h.A)("MuiDialogActions",["root","spacing"]);var v=s(44414);const A=["className","disableSpacing"],f=(0,c.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[e.root,!s.disableSpacing&&e.spacing]}})((t=>{let{ownerState:e}=t;return(0,r.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),p=a.forwardRef((function(t,e){const s=(0,l.b)({props:t,name:"MuiDialogActions"}),{className:a,disableSpacing:c=!1}=s,h=(0,i.A)(s,A),u=(0,r.A)({},s,{disableSpacing:c}),p=(t=>{const{classes:e,disableSpacing:s}=t,i={root:["root",!s&&"spacing"]};return(0,o.A)(i,d,e)})(u);return(0,v.jsx)(f,(0,r.A)({className:(0,n.A)(p.root,a),ownerState:u,ref:e},h))}))}}]); \ No newline at end of file diff --git a/build/static/js/3305.21ce5369.chunk.js b/build/static/js/3305.21ce5369.chunk.js deleted file mode 100644 index 35861de..0000000 --- a/build/static/js/3305.21ce5369.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3305],{2046:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});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 p(e){return(0,v.Ay)("MuiInputAdornment",e)}const m=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g,A=n(18463),b=n(44414);const x=["children","className","component","disablePointerEvents","disableTypography","position","variant"],w=(0,d.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,c.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(m.positionStart,"&:not(.").concat(m.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),k=a.forwardRef((function(e,t){const n=(0,A.b)({props:e,name:"MuiInputAdornment"}),{children:d,className:f,component:v="div",disablePointerEvents:m=!1,disableTypography:k=!1,position:y,variant:S}=n,P=(0,r.A)(n,x),R=(0,h.A)()||{};let M=S;S&&R.variant,R&&!M&&(M=R.variant);const C=(0,i.A)({},n,{hiddenLabel:R.hiddenLabel,size:R.size,disablePointerEvents:m,position:y,variant:M}),N=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e,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,p,t)})(C);return(0,b.jsx)(l.A.Provider,{value:null,children:(0,b.jsx)(w,(0,i.A)({as:v,ownerState:C,className:(0,o.A)(N.root,f),ref:t},P,{children:"string"!==typeof d||k?(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})}))})}))},28217:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414);t.A=(0,i.default)((0,a.jsx)("path",{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-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn")},46639:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});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 p(e){return(0,v.Ay)("MuiCircularProgress",e)}(0,f.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m,g,A,b,x=n(44414);const w=["className","color","disableShrink","size","style","thickness","value","variant"];let k,y,S,P;const R=44,M=(0,u.i7)(k||(k=m||(m=(0,r.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),C=(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"])))),N=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,l.A)(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,a.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)(S||(S=A||(A=(0,r.A)(["\n animation: "," 1.4s linear infinite;\n "]))),M)})),E=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),F=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,l.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,a.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)(P||(P=b||(b=(0,r.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),C)})),j=o.forwardRef((function(e,t){const n=(0,h.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:u=!1,size:d=40,style:f,thickness:v=3.6,value:m=0,variant:g="indeterminate"}=n,A=(0,i.A)(n,w),b=(0,a.A)({},n,{color:o,disableShrink:u,size:d,thickness:v,value:m,variant:g}),k=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,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,p,t)})(b),y={},S={},P={};if("determinate"===g){const e=2*Math.PI*((R-v)/2);y.strokeDasharray=e.toFixed(3),P["aria-valuenow"]=Math.round(m),y.strokeDashoffset="".concat(((100-m)/100*e).toFixed(3),"px"),S.transform="rotate(-90deg)"}return(0,x.jsx)(N,(0,a.A)({className:(0,s.A)(k.root,r),style:(0,a.A)({width:d,height:d},S,f),ownerState:b,ref:t,role:"progressbar"},P,A,{children:(0,x.jsx)(E,{className:k.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(R," ").concat(R),children:(0,x.jsx)(F,{className:k.circle,style:y,ownerState:b,cx:R,cy:R,r:(R-v)/2,fill:"none",strokeWidth:v})})}))}))},52097:(e,t,n)=>{"use strict";n.d(t,{d7:()=>o});var r=n(9950);function i(e,t,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)(e),v=(0,r.useRef)(!0);f.current=e;var p="undefined"!=typeof window,m=!t&&0!==t&&p;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,A=!("trailing"in n)||!!n.trailing,b="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,w=b?Math.max(+n.maxWait||0,t):null;(0,r.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var k=(0,r.useMemo)((function(){var e=function(e){var t=l.current,n=h.current;return l.current=h.current=null,s.current=e,c.current=c.current||e,d.current=f.current.apply(n,t)},n=function(e,t){m&&cancelAnimationFrame(u.current),u.current=m?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!v.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||b&&e-s.current>=w},k=function(t){return u.current=null,A&&l.current?e(t):(l.current=h.current=null,d.current)},y=function e(){var i=Date.now();if(g&&c.current===s.current&&S(),r(i))return k(i);if(v.current){var a=t-(i-o.current),u=b?Math.min(a,w-(i-s.current)):a;n(e,u)}},S=function(){i&&i({})},P=function(){if(p||x){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,t),g?e(o.current):d.current;if(b)return n(y,t),e(o.current)}return u.current||n(y,t),d.current}};return P.cancel=function(){u.current&&(m?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?k(Date.now()):d.current},P}),[g,b,t,w,A,m,p,x,i]);return k}function a(e,t){return e===t}function o(e,t,n){var o=n&&n.equalityFn||a,s=(0,r.useRef)(e),c=(0,r.useState)({})[1],u=i((0,r.useCallback)((function(e){s.current=e,c({})}),[c]),t,n,c),l=(0,r.useRef)(e);return o(l.current,e)||(u(e),l.current=e),[s.current,u]}},55471:function(e){e.exports=(()=>{return e={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach(((r,i)=>{const a=r[0],o=r[1];n.push({text:e.slice(a,o),highlight:!0}),i===t.length-1?o{"use strict";n.d(t,{q:()=>c});var r=n(89379),i=n(69347),a=n(45247),o=class extends i.${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,r.A)((0,r.A)({},e),{},{behavior:(0,a.PL)()}),t)}getOptimisticResult(e){return e.behavior=(0,a.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch((0,r.A)((0,r.A)({},e),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(e){return this.fetch((0,r.A)((0,r.A)({},e),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(e,t){var n,i;const{state:o}=e,s=super.createResult(e,t),{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)(t,o.data),hasPreviousPage:(0,a.RQ)(t,o.data),isFetchingNextPage:l,isFetchingPreviousPage:h,isRefetching:u&&!l&&!h})}},s=n(1729);function c(e,t){return(0,s.t)(e,o,t)}},82917:(e,t,n)=>{"use strict";n.d(t,{A:()=>F});var r=n(57528),i=n(98587),a=n(58168),o=n(9950),s=n(72004),c=n(88283),u=n(3484);function l(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function h(e){return parseFloat(e)}var d=n(97497),f=n(59254),v=n(18463),p=n(45558),m=n(1614);function g(e){return(0,m.Ay)("MuiSkeleton",e)}(0,p.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var A,b,x,w,k=n(44414);const y=["animation","className","component","height","style","variant","width"];let S,P,R,M;const C=(0,c.i7)(S||(S=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"])))),N=(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"])))),E=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((e=>{let{theme:t,ownerState:n}=e;const r=l(t.shape.borderRadius)||"px",i=h(t.shape.borderRadius);return(0,a.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,d.X4)(t.palette.text.primary,"light"===t.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:(t.vars||t).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})}),(e=>{let{ownerState:t}=e;return"pulse"===t.animation&&(0,c.AH)(R||(R=x||(x=(0,r.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),C)}),(e=>{let{ownerState:t,theme:n}=e;return"wave"===t.animation&&(0,c.AH)(M||(M=w||(w=(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 "]))),N,(n.vars||n).palette.action.hover)})),F=o.forwardRef((function(e,t){const n=(0,v.b)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:c="span",height:l,style:h,variant:d="text",width:f}=n,p=(0,i.A)(n,y),m=(0,a.A)({},n,{animation:r,component:c,variant:d,hasChildren:Boolean(p.children)}),A=(e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:a,height:o}=e,s={root:["root",n,r,i&&"withChildren",i&&!a&&"fitContent",i&&!o&&"heightAuto"]};return(0,u.A)(s,g,t)})(m);return(0,k.jsx)(E,(0,a.A)({as:c,ref:t,className:(0,s.A)(A.root,o),ownerState:m},p,{style:(0,a.A)({width:f,height:l},h)}))}))},97125:(e,t,n)=>{"use strict";n.d(t,{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/3388.e9dd817e.chunk.js b/build/static/js/3388.e9dd817e.chunk.js new file mode 100644 index 0000000..4d8ccb4 --- /dev/null +++ b/build/static/js/3388.e9dd817e.chunk.js @@ -0,0 +1 @@ +(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/348.a1db66c5.chunk.js b/build/static/js/348.a1db66c5.chunk.js new file mode 100644 index 0000000..6d4cbe9 --- /dev/null +++ b/build/static/js/348.a1db66c5.chunk.js @@ -0,0 +1 @@ +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[348],{2046:(t,e,n)=>{"use strict";n.d(e,{A:()=>C});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),d=n(39766),f=n(59254),p=n(45558),v=n(1614);function h(t){return(0,v.Ay)("MuiInputAdornment",t)}const m=(0,p.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g,b=n(18463),A=n(44414);const y=["children","className","component","disablePointerEvents","disableTypography","position","variant"],$=(0,f.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(m.positionStart,"&:not(.").concat(m.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),C=a.forwardRef((function(t,e){const n=(0,b.b)({props:t,name:"MuiInputAdornment"}),{children:f,className:p,component:v="div",disablePointerEvents:m=!1,disableTypography:C=!1,position:x,variant:S}=n,O=(0,r.A)(n,y),M=(0,d.A)()||{};let w=S;S&&M.variant,M&&!w&&(w=M.variant);const T=(0,i.A)({},n,{hiddenLabel:M.hiddenLabel,size:M.size,disablePointerEvents:m,position:x,variant:w}),D=(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,h,e)})(T);return(0,A.jsx)(l.A.Provider,{value:null,children:(0,A.jsx)($,(0,i.A)({as:v,ownerState:T,className:(0,o.A)(D.root,p),ref:e},O,{children:"string"!==typeof f||C?(0,A.jsxs)(a.Fragment,{children:["start"===x?g||(g=(0,A.jsx)("span",{className:"notranslate",children:"\u200b"})):null,f]}):(0,A.jsx)(u.A,{color:"text.secondary",children:f})}))})}))},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")},23266:(t,e,n)=>{"use strict";n.d(e,{A:()=>M});var r=n(98587),i=n(58168),a=n(9950),o=n(72004),s=n(3484),c=n(99269),u=n(59254),l=n(19608),d=n(18463),f=n(13372),p=n(24184),v=n(79044),h=n(31506),m=n(40777),g=n(92455),b=n(88543),A=n(45558),y=n(1614);function $(t){return(0,y.Ay)("MuiMenuItem",t)}const C=(0,A.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var x=n(44414);const S=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],O=(0,u.Ay)(p.A,{shouldForwardProp:t=>(0,l.A)(t)||"classes"===t,name:"MuiMenuItem",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]}})((t=>{let{theme:e,ownerState:n}=t;return(0,i.A)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((e.vars||e).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(C.selected)]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / ").concat(e.vars.palette.action.selectedOpacity,")"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),["&.".concat(C.focusVisible)]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / calc(").concat(e.vars.palette.action.selectedOpacity," + ").concat(e.vars.palette.action.focusOpacity,"))"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&.".concat(C.selected,":hover")]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / calc(").concat(e.vars.palette.action.selectedOpacity," + ").concat(e.vars.palette.action.hoverOpacity,"))"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / ").concat(e.vars.palette.action.selectedOpacity,")"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&.".concat(C.focusVisible)]:{backgroundColor:(e.vars||e).palette.action.focus},["&.".concat(C.disabled)]:{opacity:(e.vars||e).palette.action.disabledOpacity},["& + .".concat(m.A.root)]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},["& + .".concat(m.A.inset)]:{marginLeft:52},["& .".concat(b.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(b.A.inset)]:{paddingLeft:36},["& .".concat(g.A.root)]:{minWidth:36}},!n.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,i.A)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{["& .".concat(g.A.root," svg")]:{fontSize:"1.25rem"}}))})),M=a.forwardRef((function(t,e){const n=(0,d.b)({props:t,name:"MuiMenuItem"}),{autoFocus:c=!1,component:u="li",dense:l=!1,divider:p=!1,disableGutters:m=!1,focusVisibleClassName:g,role:b="menuitem",tabIndex:A,className:y}=n,C=(0,r.A)(n,S),M=a.useContext(f.A),w=a.useMemo((()=>({dense:l||M.dense||!1,disableGutters:m})),[M.dense,l,m]),T=a.useRef(null);(0,v.A)((()=>{c&&T.current&&T.current.focus()}),[c]);const D=(0,i.A)({},n,{dense:w.dense,divider:p,disableGutters:m}),R=(t=>{const{disabled:e,dense:n,divider:r,disableGutters:a,selected:o,classes:c}=t,u={root:["root",n&&"dense",e&&"disabled",!a&&"gutters",r&&"divider",o&&"selected"]},l=(0,s.A)(u,$,c);return(0,i.A)({},c,l)})(n),I=(0,h.A)(T,e);let k;return n.disabled||(k=void 0!==A?A:-1),(0,x.jsx)(f.A.Provider,{value:w,children:(0,x.jsx)(O,(0,i.A)({ref:I,role:b,tabIndex:k,component:u,focusVisibleClassName:(0,o.A)(R.focusVisible,g),className:(0,o.A)(R.root,y)},C,{ownerState:D,classes:R}))})}))},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 d=o.toDate;o.toDate=function(t){return"s"===t&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=o.diff;o.diff=function(t,e,n){if(t&&this.$u===t.$u)return f.call(this,t,e,n);var r=this.local(),i=a(t).local();return f.call(r,i,e,n)}}}()},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)([]),d=(0,r.useRef)(),f=(0,r.useRef)(),p=(0,r.useRef)(t),v=(0,r.useRef)(!0);p.current=t;var h="undefined"!=typeof window,m=!e&&0!==e&&h;if("function"!=typeof t)throw new TypeError("Expected a function");e=+e||0;var g=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,A="maxWait"in n,y="debounceOnServer"in n&&!!n.debounceOnServer,$=A?Math.max(+n.maxWait||0,e):null;(0,r.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var C=(0,r.useMemo)((function(){var t=function(t){var e=l.current,n=d.current;return l.current=d.current=null,s.current=t,c.current=c.current||t,f.current=p.current.apply(n,e)},n=function(t,e){m&&cancelAnimationFrame(u.current),u.current=m?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||A&&t-s.current>=$},C=function(e){return u.current=null,b&&l.current?t(e):(l.current=d.current=null,f.current)},x=function t(){var i=Date.now();if(g&&c.current===s.current&&S(),r(i))return C(i);if(v.current){var a=e-(i-o.current),u=A?Math.min(a,$-(i-s.current)):a;n(t,u)}},S=function(){i&&i({})},O=function(){if(h||y){var i=Date.now(),c=r(i);if(l.current=[].slice.call(arguments),d.current=a,o.current=i,c){if(!u.current&&v.current)return s.current=o.current,n(x,e),g?t(o.current):f.current;if(A)return n(x,e),t(o.current)}return u.current||n(x,e),f.current}};return O.cancel=function(){u.current&&(m?cancelAnimationFrame(u.current):clearTimeout(u.current)),s.current=0,l.current=o.current=d.current=u.current=null},O.isPending=function(){return!!u.current},O.flush=function(){return u.current?C(Date.now()):f.current},O}),[g,A,e,$,b,m,h,y,i]);return C}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]}},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/3624.15d722f0.chunk.js b/build/static/js/3624.15d722f0.chunk.js deleted file mode 100644 index 3037b56..0000000 --- a/build/static/js/3624.15d722f0.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3624],{84702:(e,s,a)=>{a.d(s,{Cx:()=>i,IE:()=>d,L0:()=>o,Ys:()=>r,Z3:()=>l,d1:()=>u,gM:()=>c,yP:()=>n});const t={created:{label:"Created",bg:"#3b82f6",fg:"#fff"},pending:{label:"Pending",bg:"#f59e0b",fg:"#fff"},accepted:{label:"Accepted",bg:"#8b5cf6",fg:"#fff"},arrived:{label:"Arrived",bg:"#ea580c",fg:"#fff"},picked:{label:"Picked",bg:"#0ea5e9",fg:"#fff"},active:{label:"Active",bg:"#0ea5e9",fg:"#fff"},delivered:{label:"Delivered",bg:"#22c55e",fg:"#fff"},skipped:{label:"Skipped",bg:"#94a3b8",fg:"#fff"},cancelled:{label:"Cancelled",bg:"#ef4444",fg:"#fff"}},i=e=>t[String(e||"").toLowerCase()]||{label:e||"Unknown",bg:"#64748b",fg:"#fff"},r=new Set(["delivered"]),n=new Set(["cancelled","skipped"]),l=["#2563eb","#dc2626","#16a34a","#ea580c","#9333ea","#0891b2","#ca8a04","#db2777","#0f766e","#7c3aed","#65a30d","#0284c7","#b91c1c","#15803d","#a16207","#86198f"],c=e=>l[(e%l.length+l.length)%l.length],d=e=>{if(null==e)return"";const s=["th","st","nd","rd"],a=e%100;return e+(s[(a-20)%10]||s[a]||s[0])},o=e=>{const s=String((null===e||void 0===e?void 0:e.orderstatus)||"").toLowerCase();return!r.has(s)&&!n.has(s)},u=e=>{if(!Array.isArray(e)||!e.length)return null;return[...e].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find(o)||null}},88267:(e,s,a)=>{a.r(s),a.d(s,{default:()=>Fe});var t=a(80045),i=a(89379),r=a(9950),n=a(98007),l=a(47113),c=a(82215),d=a(99810),o=a(49029),u=a(33516),m=a(48513),p=a(37119),h=a(2527),v=a.n(h);a(55392);v().PolylineOffset={translatePoint:(e,s,a)=>v().point(e.x+s*Math.cos(a),e.y+s*Math.sin(a)),offsetPointLine(e,s){const a=e.length;if(a<2)throw new Error("Line should be defined by at least 2 points");let t,i=e[0];const r=Math.PI/2,n=[];for(let l=1;l=0&&l<=1&&c>=0&&c<=1?v().point(e.x+c*i.x,e.y+c*i.y):null},segmentAsVector:(e,s)=>v().point(s.x-e.x,s.y-e.y),joinLineSegments(e){const s=[];let a=e[0].offset;s.push(a[0]);for(let t=1;te.latLngToLayerPoint(s)));return this.offsetPoints(t,a).map((s=>e.layerPointToLatLng(s)))}};const x=v().Polyline.prototype._projectLatlngs;v().Polyline.prototype._projectLatlngs=function(e,s,a){const t=this.options.offset;if(!t||"number"!==typeof t)return x.call(this,e,s,a);if(!(e[0]instanceof v().LatLng)){for(let t=0;tthis._map.latLngToLayerPoint(e))),r=v().PolylineOffset.offsetPoints(i,t);for(let n=0;n0?o/t*100:0}}function A(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null==e?"\u2014":"\u20b9".concat(parseFloat(e).toFixed(s))}function z(e){return e&&e.trim().split(/\s+/).slice(0,2).map((e=>{var s;return null!==(s=e[0])&&void 0!==s?s:""})).join("").toUpperCase()||"?"}function P(e){let{status:s}=e;const a=function(e){var s;return null!==(s=w[String(null!==e&&void 0!==e?e:"").toLowerCase()])&&void 0!==s?s:F}(s);return(0,_.jsxs)("span",{className:"order-status-pill",style:{background:a.bg,color:a.color,borderColor:a.border},children:[(0,_.jsx)("span",{className:"order-status-dot","aria-hidden":"true"}),a.label]})}function E(e){var s,a,t,i,r,n,l,c,d,o;let{order:u}=e;const m=null!==(s=null!==(a=null!==(t=null!==(i=u.customername)&&void 0!==i?i:u.customer_name)&&void 0!==t?t:u.deliverycustomer)&&void 0!==a?a:u.pickupcustomer)&&void 0!==s?s:"Unknown customer",p=null!==(r=null!==(n=null!==(l=u.customerphone)&&void 0!==l?l:u.phone)&&void 0!==n?n:u.mobile)&&void 0!==r?r:"",h=null!==(c=null!==(d=null!==(o=u.locationname)&&void 0!==o?o:u.kitchenname)&&void 0!==d?d:u.kitchenName)&&void 0!==c?c:"";return(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"customer-name",title:m,children:m}),p&&(0,_.jsx)("div",{className:"customer-phone",children:p}),h&&(0,_.jsxs)("div",{className:"customer-location",children:[(0,_.jsx)(S.gwi,{size:12,"aria-hidden":"true"}),h]})]})}function D(e){let{orders:s,getRevenue:a}=e;return null!==s&&void 0!==s&&s.length?(0,_.jsx)("div",{className:"orders-table-container",children:(0,_.jsxs)("table",{className:"orders-table",role:"table",children:[(0,_.jsx)("thead",{children:(0,_.jsxs)("tr",{children:[(0,_.jsx)("th",{scope:"col",children:"Customer"}),(0,_.jsx)("th",{scope:"col",children:"Status"}),(0,_.jsx)("th",{scope:"col",children:"Distance"}),(0,_.jsx)("th",{scope:"col",style:{textAlign:"right"},children:"Revenue"})]})}),(0,_.jsx)("tbody",{children:s.map(((e,s)=>{var t,i,r,n;const l=parseFloat(null!==(t=null!==(i=e.kms)&&void 0!==i?i:e.actualkms)&&void 0!==t?t:0),c=a(e);return(0,_.jsxs)("tr",{children:[(0,_.jsx)("td",{children:(0,_.jsx)(E,{order:e})}),(0,_.jsx)("td",{children:(0,_.jsx)(P,{status:null!==(n=e.orderstatus)&&void 0!==n?n:e.status})}),(0,_.jsxs)("td",{children:[(0,_.jsx)("span",{className:"distance-value",children:l.toFixed(1)}),(0,_.jsx)("span",{className:"distance-unit",children:"km"})]}),(0,_.jsx)("td",{style:{textAlign:"right"},children:(0,_.jsx)("span",{className:"revenue-amount",children:A(c)})})]},"".concat(null!==(r=e.orderid)&&void 0!==r?r:"order","-").concat(s))}))})]})}):(0,_.jsxs)("div",{className:"orders-empty-state",role:"status",children:[(0,_.jsx)(S.q8i,{size:24,"aria-hidden":"true"}),(0,_.jsx)("p",{className:"orders-empty-message",children:"No orders assigned to this rider yet."})]})}function L(e){var s,a,t,i;let{rider:r,metrics:n}=e;const{varCost:l,fixedCost:c,kms:d,net:o,margin:u}=n,m=o>=0,p=[{icon:(0,_.jsx)(S.DwJ,{size:16}),iconClass:"cost-tile-icon--fixed",label:"Fixed cost",amount:A(c,2),amountClass:"",footnote:"Salary (per slot)"},{icon:(0,_.jsx)(S.pk7,{size:16}),iconClass:"cost-tile-icon--variable",label:"Variable cost",amount:A(l,2),amountClass:"",footnote:"".concat(d.toFixed(1)," km \xd7 \u20b9").concat(2.5,"/km")},{icon:m?(0,_.jsx)(S.imn,{size:16}):(0,_.jsx)(S.Rod,{size:16}),iconClass:m?"cost-tile-icon--profit":"cost-tile-icon--loss",label:m?"Net profit":"Net loss",amount:"".concat(m?"+":"").concat(A(o,2)),amountClass:m?"cost-tile-amount--profit":"cost-tile-amount--loss",footnote:"".concat(Math.abs(u).toFixed(0),"% margin")}];return(0,_.jsx)("div",{className:"rider-detail-panel","aria-label":"Rider cost breakdown",children:(0,_.jsxs)("div",{className:"rider-detail-inner",children:[(0,_.jsx)("div",{className:"cost-breakdown-grid",children:p.map((e=>(0,_.jsxs)("div",{className:"cost-tile",children:[(0,_.jsx)("div",{className:"cost-tile-icon ".concat(e.iconClass),"aria-hidden":"true",children:e.icon}),(0,_.jsxs)("div",{className:"cost-tile-content",children:[(0,_.jsx)("span",{className:"cost-tile-label",children:e.label}),(0,_.jsx)("span",{className:"cost-tile-amount ".concat(e.amountClass),children:e.amount}),(0,_.jsx)("span",{className:"cost-tile-footnote",children:e.footnote})]})]},e.label)))}),(0,_.jsxs)("div",{className:"revenue-breakdown",children:[(0,_.jsxs)("div",{className:"revenue-breakdown-header",children:[(0,_.jsxs)("div",{className:"revenue-breakdown-title",children:[(0,_.jsx)(S.q8i,{size:14,"aria-hidden":"true"}),"Revenue Breakdown"]}),(0,_.jsxs)("span",{className:"revenue-breakdown-count",children:[null!==(s=null===(a=r.orders)||void 0===a?void 0:a.length)&&void 0!==s?s:0," order",1!==(null!==(t=null===(i=r.orders)||void 0===i?void 0:i.length)&&void 0!==t?t:0)?"s":""]})]}),(0,_.jsx)(D,{orders:r.orders,getRevenue:M})]})]})})}function q(e){var s,a,t,i;let{rider:r,metrics:n,isExpanded:l,isFocused:c,onToggle:d,onFocus:o}=e;const{revenue:u,kms:m,totalCost:p,net:h,margin:v}=n,x=h>=0,j="".concat((f=Math.abs(v),g=0,N=100,Math.min(Math.max(f,g),N)),"%");var f,g,N;const b=null!==(s=null===(a=r.orders)||void 0===a?void 0:a.length)&&void 0!==s?s:0,y=null!==(t=null!==(i=r.riderName)&&void 0!==i?i:r.username)&&void 0!==t?t:"Rider #".concat(r.id),k=["rider-profitability-card",x?"rider-profitability-card--profitable":"rider-profitability-card--unprofitable",c?"rider-profitability-card--selected":""].filter(Boolean).join(" ");function w(){d(r.id),!c&&o&&o(r)}return(0,_.jsxs)("div",{className:k,"aria-label":"Rider: ".concat(y),children:[(0,_.jsxs)("div",{className:"rider-card-header",role:"button",tabIndex:0,"aria-expanded":l,onClick:w,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),w())},children:[(0,_.jsx)("div",{className:"rider-avatar","aria-hidden":"true",children:z(y)}),(0,_.jsxs)("div",{className:"rider-identity",children:[(0,_.jsx)("div",{className:"rider-name",title:y,children:y}),(0,_.jsxs)("div",{className:"rider-order-summary",children:[b," order",1!==b?"s":"",(0,_.jsx)("span",{className:"rider-order-summary-separator",children:"\xb7"}),m.toFixed(1)," km total"]})]}),(0,_.jsxs)("div",{className:"rider-metrics-row","aria-hidden":"true",children:[(0,_.jsxs)("div",{className:"rider-metric",children:[(0,_.jsx)("span",{className:"rider-metric-label",children:"Revenue"}),(0,_.jsx)("span",{className:"rider-metric-amount rider-metric-amount--revenue",children:A(u)})]}),(0,_.jsxs)("div",{className:"rider-metric",children:[(0,_.jsx)("span",{className:"rider-metric-label",children:"Cost"}),(0,_.jsx)("span",{className:"rider-metric-amount rider-metric-amount--cost",children:A(p)})]}),(0,_.jsxs)("div",{className:"rider-net-profit-column",children:[(0,_.jsxs)("div",{className:"rider-metric",children:[(0,_.jsx)("span",{className:"rider-metric-label",children:"Net"}),(0,_.jsxs)("span",{className:"rider-metric-amount ".concat(x?"rider-metric-amount--net-profit":"rider-metric-amount--net-loss"),children:[x?"+":"",A(h)]})]}),(0,_.jsx)("div",{className:"rider-margin-bar",children:(0,_.jsx)("div",{className:"rider-margin-bar-fill ".concat(x?"rider-margin-bar-fill--profit":"rider-margin-bar-fill--loss"),style:{width:j},role:"presentation"})})]})]}),(0,_.jsx)("div",{className:"rider-expand-toggle ".concat(l?"rider-expand-toggle--open":""),"aria-hidden":"true",children:(0,_.jsx)(S.j1Q,{size:22})})]}),l&&(0,_.jsx)(L,{rider:r,metrics:n})]})}function R(e){let{riders:s=[],totalDailyProfit:a=0,focusedRider:t=null,handleRiderFocus:n}=e;const[l,c]=(0,r.useState)({}),[d,o]=(0,r.useState)("profit-asc"),u=(0,r.useCallback)((e=>{c((s=>(0,i.A)((0,i.A)({},s),{},{[e]:!s[e]})))}),[]),m=(0,r.useMemo)((()=>s.map((e=>(0,i.A)((0,i.A)({},e),{},{_m:C(e)})))),[s]),p=m.reduce(((e,s)=>e+s._m.revenue),0),h=m.reduce(((e,s)=>e+s._m.totalCost),0),v=m.reduce(((e,s)=>e+s._m.net),0),x=m.filter((e=>e._m.net>=0)).length,j=m.length-x,f=a>=0,g=v>=0,N=m,b=(0,r.useMemo)((()=>{const e=[...N];return"profit-asc"===d?e.sort(((e,s)=>e._m.net-s._m.net)):"profit-desc"===d?e.sort(((e,s)=>s._m.net-e._m.net)):"name-asc"===d?e.sort(((e,s)=>{var a,t,i,r;const n=(null!==(a=null!==(t=e.riderName)&&void 0!==t?t:e.username)&&void 0!==a?a:"Rider #".concat(e.id)).toLowerCase(),l=(null!==(i=null!==(r=s.riderName)&&void 0!==r?r:s.username)&&void 0!==i?i:"Rider #".concat(s.id)).toLowerCase();return n.localeCompare(l)})):"orders-desc"===d&&e.sort(((e,s)=>{var a,t,i,r;return(null!==(a=null===(t=s.orders)||void 0===t?void 0:t.length)&&void 0!==a?a:0)-(null!==(i=null===(r=e.orders)||void 0===r?void 0:r.length)&&void 0!==i?i:0)})),e}),[N,d]);return(0,_.jsxs)("div",{className:"profitability-dashboard",role:"region","aria-label":"Profitability overview",children:[(0,_.jsxs)("header",{className:"profitability-header",children:[(0,_.jsxs)("div",{className:"profitability-header-left",children:[(0,_.jsx)("div",{className:"profitability-header-icon","aria-hidden":"true",children:(0,_.jsx)(S.rgL,{size:18})}),(0,_.jsxs)("div",{children:[(0,_.jsx)("h2",{className:"profitability-header-title",children:"Profitability Overview"}),(0,_.jsxs)("p",{className:"profitability-header-subtitle",children:[(0,_.jsxs)("span",{children:[m.length," rider",1!==m.length?"s":""]}),(0,_.jsx)("span",{className:"profitability-header-dot"}),(0,_.jsxs)("span",{style:{color:"var(--profit-green)"},children:[x," profitable"]}),(0,_.jsx)("span",{className:"profitability-header-dot"}),(0,_.jsxs)("span",{style:{color:"var(--loss-red)"},children:[j," at loss"]})]})]})]}),(0,_.jsxs)("div",{className:"profitability-kpi-group",children:[(0,_.jsxs)("div",{className:"profitability-kpi-chip ".concat(f?"profitability-kpi-chip--profit":"profitability-kpi-chip--loss"),children:[(0,_.jsx)("div",{className:"profitability-kpi-chip-icon","aria-hidden":"true",children:f?(0,_.jsx)(S.imn,{}):(0,_.jsx)(S.Rod,{})}),(0,_.jsxs)("div",{className:"profitability-kpi-chip-content",children:[(0,_.jsxs)("span",{className:"profitability-kpi-chip-label",children:["Daily ",f?"profit":"loss"]}),(0,_.jsx)("span",{className:"profitability-kpi-chip-amount",children:A(Math.abs(a))})]})]}),(0,_.jsxs)("div",{className:"profitability-kpi-chip ".concat(g?"profitability-kpi-chip--profit":"profitability-kpi-chip--loss"),children:[(0,_.jsx)("div",{className:"profitability-kpi-chip-icon","aria-hidden":"true",children:g?(0,_.jsx)(S.imn,{}):(0,_.jsx)(S.Rod,{})}),(0,_.jsxs)("div",{className:"profitability-kpi-chip-content",children:[(0,_.jsxs)("span",{className:"profitability-kpi-chip-label",children:["Slot ",g?"profit":"loss"]}),(0,_.jsx)("span",{className:"profitability-kpi-chip-amount",children:A(Math.abs(v))})]})]})]})]}),(0,_.jsxs)("div",{className:"profitability-summary-row",role:"group","aria-label":"Slot summary",children:[(0,_.jsxs)("div",{className:"profitability-summary-card profitability-summary-card--primary",children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Riders Active"}),(0,_.jsx)("span",{className:"profitability-summary-value",children:m.length}),(0,_.jsxs)("span",{className:"profitability-summary-detail",children:[x," in profit \xb7 ",j," at loss"]})]}),(0,_.jsxs)("div",{className:"profitability-summary-card profitability-summary-card--primary",children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Slot Revenue"}),(0,_.jsx)("span",{className:"profitability-summary-value",children:A(p)}),(0,_.jsxs)("span",{className:"profitability-summary-detail",children:["From ",m.reduce(((e,s)=>{var a,t;return e+(null!==(a=null===(t=s.orders)||void 0===t?void 0:t.length)&&void 0!==a?a:0)}),0)," orders"]})]}),(0,_.jsxs)("div",{className:"profitability-summary-card profitability-summary-card--loss",children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Slot Cost"}),(0,_.jsx)("span",{className:"profitability-summary-value profitability-summary-value--loss",children:A(h)}),(0,_.jsx)("span",{className:"profitability-summary-detail",children:"Fixed + variable"})]}),(0,_.jsxs)("div",{className:"profitability-summary-card ".concat(g?"card-profit":"card-loss"),children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Slot Net"}),(0,_.jsxs)("span",{className:"profitability-summary-value ".concat(g?"net-positive":"net-negative"),children:[g?"+":"",A(v)]}),(0,_.jsx)("span",{className:"profitability-summary-detail ".concat(p>0?v/p>=0?"margin-positive":"margin-negative":""),children:p>0?"".concat(v/p>=0?"+":"").concat((v/p*100).toFixed(0),"% margin"):"0% margin"})]})]}),(0,_.jsxs)("div",{className:"rider-profitability-feed",role:"list","aria-label":"Rider cards",children:[(0,_.jsx)("div",{className:"rider-feed-heading","aria-hidden":"true",children:"Riders List"}),0===b.length?(0,_.jsxs)("div",{className:"profitability-empty-state",role:"status",children:[(0,_.jsx)(S._pN,{size:32,"aria-hidden":"true"}),(0,_.jsx)("p",{className:"profitability-empty-message",children:"No riders matching the filters."})]}):b.map((e=>(0,_.jsx)("div",{role:"listitem",children:(0,_.jsx)(q,{rider:e,metrics:e._m,isExpanded:!!l[e.id],isFocused:(null===t||void 0===t?void 0:t.id)===e.id,onToggle:u,onFocus:n})},e.id)))]})]})}var I=a(84702);const O=e=>{let{visibleRiders:s,riders:a,focusedStop:t,handleRiderFocus:i,setFocusedStop:r,calculateEstMeters:n,getRiderColor:l,formatMeters:c}=e;const d=s.map((e=>(0,I.d1)(e.orders))).filter(Boolean).sort(((e,s)=>String(e.rider_name||e.ridername||"").localeCompare(String(s.rider_name||s.ridername||""))));if(0===d.length)return(0,_.jsxs)("div",{className:"empty-slot",children:[(0,_.jsx)("div",{className:"empty-slot-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsx)("div",{className:"empty-slot-title",children:"No active deliveries"}),(0,_.jsx)("div",{className:"empty-slot-sub",children:"No deliveries are currently in progress for this slot"})]});return(0,_.jsx)("div",{className:"adcard-list",children:d.map(((e,s)=>{const d=e.rider_id,o=a.find((e=>String(e.id)===String(d))),u=l(d),m=(0,I.Cx)(e.orderstatus),p=parseFloat(e.droplat||e.deliverylat),h=parseFloat(e.droplon||e.deliverylong),v=Number.isFinite(p)&&Number.isFinite(h),x=n(d,e),j=e.deliverycustomer||e.customername||"Order #".concat(e.orderid),f=e.deliverysuburb||e.deliveryaddress||e.zone_name||"",g=e.rider_name||e.ridername||"Unassigned",N=v&&t&&String(t.orderid)===String(e.orderid),b=g.split(/\s+/).filter(Boolean).slice(0,2).map((e=>e[0])).join("").toUpperCase()||"\u2022";return(0,_.jsxs)("div",{className:"adcard".concat(N?" is-active":""),style:{"--ad-accent":u,animationDelay:"".concat(.05*s,"s")},onClick:()=>{o&&i(o),v&&r({orderid:e.orderid,lat:p,lon:h})},children:[(0,_.jsxs)("div",{className:"adcard-top",children:[(0,_.jsx)("div",{className:"adcard-avatar",style:{background:u},children:b}),(0,_.jsxs)("div",{className:"adcard-titles",children:[(0,_.jsx)("div",{className:"adcard-customer",title:j,children:j}),(0,_.jsxs)("div",{className:"adcard-rider",title:g,children:[(0,_.jsx)(S.aVM,{style:{fontSize:13,flexShrink:0}}),(0,_.jsx)("span",{className:"adcard-tx",children:g})]})]}),(0,_.jsx)("span",{className:"adcard-status",style:{background:"".concat(m.bg,"1a"),color:m.bg},title:m.label,children:m.label})]}),f&&(0,_.jsxs)("div",{className:"adcard-addr",children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.gwi,{})}),(0,_.jsx)("span",{className:"adcard-tx adcard-addr-tx",title:f,children:f})]}),(0,_.jsxs)("div",{className:"adcard-foot",children:[e.pickupcustomer?(0,_.jsxs)("span",{className:"adcard-pickup",title:e.pickupcustomer,children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.NtI,{})}),(0,_.jsx)("span",{className:"adcard-tx",children:e.pickupcustomer})]}):(0,_.jsx)("span",{}),(0,_.jsxs)("span",{className:"adcard-metrics",children:[(0,_.jsxs)("span",{className:"adcard-m adcard-m-km",title:"Trip distance",children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.xI$,{})}),parseFloat(e.actualkms||e.kms||0).toFixed(1)," km"]}),null!==x&&(0,_.jsxs)("span",{className:"adcard-m adcard-m-eta",title:"Estimated distance to drop location",children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.HPi,{})}),c(x)]})]})]})]},e.orderid)}))})};var T=a(81425),H=a(14857),Y=a(47223);const V=function(e){let{focusedRider:s,compareDeltas:a,compareSummary:t,actualOrdered:i,focusedCompareStep:n,setFocusedCompareStep:l,sequenceOpen:c,setSequenceOpen:d,expandedSeqGroups:o,setExpandedSeqGroups:u,onClose:m}=e;const p=(0,H.A)(),h=(0,Y.A)(p.breakpoints.down("md")),v=(0,r.useMemo)((()=>{const e=t,r=e.onTime+e.late,n=s.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),l=n<0,c=a.filter((e=>e.anomaly)),d=a.filter((e=>I.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,o=a.filter((e=>I.yP.has(String(e.orderstatus||"").toLowerCase()))).length,u=null==e.kmDeltaPct?"":e.kmDeltaPct>25?"is-over":e.kmDeltaPct<-5?"is-under":"",m=a.length||1,p=e.onTime+e.late||1,h=Math.round(d/m*60+e.onTime/p*25+(m-e.anomalies)/m*15),v=h>=85?"#16a34a":h>=65?"#f59e0b":"#dc2626",x=h>=85?"Excellent":h>=65?"Acceptable":"Needs review",j=a.filter((e=>e.actualTs)),f=j.reduce(((e,s)=>!e||s.actualTs.isBefore(e)?s.actualTs:e),null),g=j.reduce(((e,s)=>!e||s.actualTs.isAfter(e)?s.actualTs:e),null),N=f&&g?Math.max(0,g.diff(f,"minute")):0,b=a.length>1?Math.round(N/(a.length-1)):0,y=N>0?(e.actualKm/(N/60)).toFixed(1):null,k=a.filter((e=>!e.isLoading&&e.coordsCount>0)),S=k.filter((e=>null!=e.timeDeltaMin&&!e.anomaly)).sort(((e,s)=>e.timeDeltaMin-s.timeDeltaMin))[0]||null,_=k.filter((e=>e.anomaly)).sort(((e,s)=>{const a=Math.abs(e.kmDeltaPct||0)+(e.timeDeltaMin>0?e.timeDeltaMin:0);return Math.abs(s.kmDeltaPct||0)+(s.timeDeltaMin>0?s.timeDeltaMin:0)-a}))[0]||null,w=i.filter(((e,s)=>{var a;const t=null===(a=e.order)||void 0===a?void 0:a.step;return null!=t&&t!==s+1})),F=[];w.forEach((e=>{var s;const a=null===(s=e.order)||void 0===s?void 0:s.step,t=i.findIndex((s=>s.sequenceStep===e.sequenceStep))+1,r=t-a,n=F[F.length-1];n&&n.delta===r&&n.lastActualPos+1===t?(n.items.push({d:e,planned:a,actualPos:t,delta:r}),n.lastActualPos=t):F.push({delta:r,items:[{d:e,planned:a,actualPos:t,delta:r}],lastActualPos:t})}));const M={};s.orders.forEach((e=>{const s=e.trip_number||1;M[s]||(M[s]=[]),M[s].push(e)}));const C=Object.entries(M).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,a]=e;return{tNum:s,count:a.length,plannedKm:a.reduce(((e,s)=>e+parseFloat(s.kms||0)),0),actualKm:a.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:a.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),delivered:a.filter((e=>I.Ys.has(String(e.orderstatus||"").toLowerCase()))).length}}));return{sum:e,totalSteps:r,totalProfit:n,isLoss:l,deviations:c,delivered:d,skipped:o,stepDeltaPct:u,score:h,scoreColor:v,scoreLabel:x,firstDelivery:f,lastDelivery:g,activeMin:N,avgPerStop:b,avgSpeed:y,bestStep:S,worstStep:_,outOfOrderSteps:w,seqRuns:F,tripList:C}}),[s,a,t,i]),x=null!=n?a.find((e=>e.sequenceStep===n)):null,j=e=>{l((s=>s===e?null:e))},f=function(e){let s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{d:a,planned:t,actualPos:i,delta:r}=e;return(0,_.jsxs)("li",{className:"cdp-seq-diff".concat(n===a.sequenceStep?" is-focused":"").concat(s?"":" is-nested"),onClick:()=>j(a.sequenceStep),children:[(0,_.jsx)("span",{className:"cdp-seq-diff-num",style:{background:(0,I.gM)((t||a.sequenceStep)-1)},children:t||a.sequenceStep}),(0,_.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,_.jsx)("div",{className:"cdp-seq-diff-title",children:a.deliverycustomer||"Step ".concat(t||a.sequenceStep)}),(0,_.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Visited ",(0,_.jsx)("strong",{children:(0,I.IE)(i)})," ","\xb7 planned ",(0,_.jsx)("strong",{children:(0,I.IE)(t)})]})]}),(0,_.jsx)("span",{className:"cdp-seq-diff-tag",children:r>0?"+".concat(r):"".concat(r)})]},"diff-".concat(a.sequenceStep))},{sum:g,totalSteps:N,totalProfit:b,isLoss:y,deviations:k,delivered:w,skipped:F,stepDeltaPct:M,score:C,scoreColor:A,scoreLabel:z,firstDelivery:P,lastDelivery:E,activeMin:D,avgPerStop:L,avgSpeed:q,bestStep:R,worstStep:O,outOfOrderSteps:T,seqRuns:V,tripList:B}=v;return(0,_.jsxs)("aside",{id:"compare-data-panel",className:"compare-data-panel".concat(h?" cdp-is-mobile":""),children:[(0,_.jsxs)("div",{className:"cdp-head",children:[(0,_.jsxs)("div",{className:"cdp-head-title",children:[(0,_.jsx)("span",{className:"cdp-rider-dot",style:{background:s.color}}),(0,_.jsxs)("div",{className:"cdp-head-text",children:[(0,_.jsx)("div",{className:"cdp-rider-name",children:s.riderName}),(0,_.jsx)("div",{className:"cdp-head-badge",children:"PLANNED vs ACTUAL"})]})]}),(0,_.jsx)("button",{type:"button",className:"cdp-close",onClick:m,title:"Exit compare","aria-label":"Exit compare",children:(0,_.jsx)(S.m6K,{})})]}),(0,_.jsxs)("div",{className:"cdp-scroll",children:[(0,_.jsx)("section",{className:"cdp-section cdp-score-section",children:(0,_.jsxs)("div",{className:"cdp-score-wrap",children:[(0,_.jsx)("div",{className:"cdp-score-ring",style:{background:"conic-gradient(".concat(A," ").concat(3.6*C,"deg, rgba(15,23,42,0.08) 0deg)")},children:(0,_.jsxs)("div",{className:"cdp-score-inner",children:[(0,_.jsx)("div",{className:"cdp-score-value",style:{color:A},children:C}),(0,_.jsx)("div",{className:"cdp-score-unit",children:"/100"})]})}),(0,_.jsxs)("div",{className:"cdp-score-body",children:[(0,_.jsx)("div",{className:"cdp-score-label",style:{color:A},children:z}),(0,_.jsx)("div",{className:"cdp-score-title",children:"Compliance score"}),(0,_.jsxs)("div",{className:"cdp-score-sub",children:[w,"/",a.length," delivered",g.anomalies>0?" \xb7 ".concat(g.anomalies," deviation").concat(g.anomalies>1?"s":""):"",g.late>0?" \xb7 ".concat(g.late," late"):"",F>0?" \xb7 ".concat(F," skipped"):""]})]})]})}),(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.Zs6,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Day overview"})]}),(0,_.jsxs)("div",{className:"cdp-tiles",children:[(0,_.jsxs)("div",{className:"cdp-tile",children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[(0,_.jsx)(S.xI$,{})," Distance"]}),(0,_.jsxs)("div",{className:"cdp-tile-value",children:[g.actualKm.toFixed(1),(0,_.jsx)("span",{className:"cdp-tile-unit",children:"km"})]}),(0,_.jsxs)("div",{className:"cdp-tile-sub",children:["planned ",g.plannedKm.toFixed(1)," km"]})]}),(0,_.jsxs)("div",{className:"cdp-tile".concat(g.anomalies>0?" is-warn":""),children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[(0,_.jsx)(S.Wux,{})," Deviation"]}),(0,_.jsx)("div",{className:"cdp-tile-value ".concat(M),children:null!=g.kmDeltaPct?"".concat(g.kmDeltaPct>0?"+":"").concat(g.kmDeltaPct.toFixed(0),"%"):"\u2014"}),(0,_.jsx)("div",{className:"cdp-tile-sub",children:g.anomalies>0?"".concat(g.anomalies," flagged"):"within plan"})]}),(0,_.jsxs)("div",{className:"cdp-tile".concat(g.late>0?" is-warn":""),children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[(0,_.jsx)(S.VP9,{})," On-time"]}),(0,_.jsxs)("div",{className:"cdp-tile-value",children:[g.onTime,N>0&&(0,_.jsxs)("span",{className:"cdp-tile-unit",children:["/",N]})]}),(0,_.jsx)("div",{className:"cdp-tile-sub",children:g.late>0?"".concat(g.late," late"):"all on schedule"})]}),(0,_.jsxs)("div",{className:"cdp-tile ".concat(y?"is-loss":"is-gain"),children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[y?(0,_.jsx)(S.Rod,{}):(0,_.jsx)(S.imn,{})," ",y?"Loss":"Profit"]}),(0,_.jsxs)("div",{className:"cdp-tile-value",children:[y?"-":"","\u20b9",Math.abs(b).toFixed(0)]}),(0,_.jsxs)("div",{className:"cdp-tile-sub",children:[s.orders.length," ",1===s.orders.length?"order":"orders"," \xb7 ",w," delivered"]})]})]})]}),a.length>0&&(0,_.jsxs)("section",{className:"cdp-section cdp-seq-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head cdp-section-head-clickable",onClick:()=>d((e=>!e)),role:"button","aria-expanded":c,title:c?"Collapse route sequence":"Expand route sequence",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.$G1,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Route sequence"}),(0,_.jsx)("span",{className:"cdp-seq-status".concat(T.length>0?" is-warn":" is-good"),children:T.length>0?"".concat(T.length," out of order"):"In order"}),(0,_.jsx)("span",{className:"cdp-seq-toggle".concat(c?" is-open":""),children:(0,_.jsx)(S.j1Q,{})})]}),c&&(0,_.jsx)("div",{className:"cdp-seq",children:T.length>0?(0,_.jsx)("ul",{className:"cdp-seq-diffs",children:V.map(((e,s)=>{if(1===e.items.length)return f(e.items[0]);const a=e.items[0],t=e.items[e.items.length-1],i=o.has(s),l=e.delta>0?"+".concat(e.delta):"".concat(e.delta),c=e.items.some((e=>e.d.sequenceStep===n));return(0,_.jsxs)(r.Fragment,{children:[(0,_.jsxs)("li",{className:"cdp-seq-diff is-group".concat(i?" is-expanded":"").concat(c?" is-focused":""),onClick:()=>{return e=s,void u((s=>{const a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a}));var e},"aria-expanded":i,children:[(0,_.jsxs)("span",{className:"cdp-seq-group-num",children:[(0,_.jsx)("span",{className:"cdp-seq-group-num-bg",style:{background:"linear-gradient(135deg, ".concat((0,I.gM)((a.planned||1)-1),", ").concat((0,I.gM)((t.planned||1)-1),")")}}),(0,_.jsxs)("span",{className:"cdp-seq-group-num-label",children:[e.items.length,"\xd7"]})]}),(0,_.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,_.jsxs)("div",{className:"cdp-seq-diff-title",children:[e.items.length," consecutive steps shifted"," ",(0,_.jsx)("span",{className:"cdp-seq-group-delta",children:l})]}),(0,_.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Planned ",(0,I.IE)(a.planned),"\u2013",(0,I.IE)(t.planned)," ","visited"," ",(0,_.jsxs)("strong",{children:[(0,I.IE)(a.actualPos),"\u2013",(0,I.IE)(t.actualPos)]})]})]}),(0,_.jsx)("span",{className:"cdp-seq-diff-tag",children:l}),(0,_.jsx)("span",{className:"cdp-seq-group-toggle".concat(i?" is-open":""),"aria-hidden":"true",children:(0,_.jsx)(S.j1Q,{})})]}),i&&(0,_.jsx)("li",{className:"cdp-seq-group-children-wrap",children:(0,_.jsx)("ul",{className:"cdp-seq-group-children",children:e.items.map((e=>f(e,!1)))})})]},"run-".concat(s,"-").concat(a.d.sequenceStep))}))}):(0,_.jsxs)("div",{className:"cdp-seq-good",children:[(0,_.jsx)(S.mU9,{})," Rider followed the planned route in order."]})})]}),(P||E)&&(0,_.jsxs)("section",{className:"cdp-section cdp-timing-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.pWE,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Timing"}),D>0&&(0,_.jsxs)("span",{className:"cdp-timing-active-tag",children:[(0,_.jsx)("span",{className:"cdp-timing-active-pulse"}),"Day window"]})]}),(0,_.jsxs)("div",{className:"cdp-timing-clock",children:[(0,_.jsxs)("div",{className:"cdp-clock-card is-start",children:[(0,_.jsxs)("div",{className:"cdp-clock-label",children:[(0,_.jsx)(S.WVj,{})," First delivery"]}),(0,_.jsxs)("div",{className:"cdp-clock-face",children:[(0,_.jsx)("span",{className:"cdp-clock-time",children:P?P.format("hh:mm"):"\u2014"}),(0,_.jsx)("span",{className:"cdp-clock-period",children:P?P.format("A"):""})]}),(0,_.jsx)("div",{className:"cdp-clock-caption",children:"Started"})]}),(0,_.jsxs)("div",{className:"cdp-clock-track","aria-hidden":"true",children:[(0,_.jsx)("span",{className:"cdp-clock-track-line"}),(0,_.jsx)("span",{className:"cdp-clock-track-dot is-start"}),(0,_.jsx)("span",{className:"cdp-clock-track-dot is-end"}),(0,_.jsxs)("div",{className:"cdp-clock-duration",children:[(0,_.jsx)("span",{className:"cdp-clock-duration-icon",children:(0,_.jsx)(S.DZH,{})}),(0,_.jsx)("span",{className:"cdp-clock-duration-val",children:D>0?D>=60?"".concat(Math.floor(D/60),"h ").concat(D%60,"m"):"".concat(D,"m"):"\u2014"}),(0,_.jsx)("span",{className:"cdp-clock-duration-sub",children:"active"})]})]}),(0,_.jsxs)("div",{className:"cdp-clock-card is-end",children:[(0,_.jsxs)("div",{className:"cdp-clock-label",children:[(0,_.jsx)(S.mU9,{})," Last delivery"]}),(0,_.jsxs)("div",{className:"cdp-clock-face",children:[(0,_.jsx)("span",{className:"cdp-clock-time",children:E?E.format("hh:mm"):"\u2014"}),(0,_.jsx)("span",{className:"cdp-clock-period",children:E?E.format("A"):""})]}),(0,_.jsx)("div",{className:"cdp-clock-caption",children:"Finished"})]})]}),(0,_.jsxs)("div",{className:"cdp-timing-stats",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,_.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,_.jsx)(S.VP9,{})}),(0,_.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-value",children:[L>0?"".concat(L):"\u2014",L>0&&(0,_.jsx)("span",{className:"cdp-timing-stat-unit",children:"min"})]}),(0,_.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg / stop"})]})]}),a.length>0&&(0,_.jsxs)("div",{className:"cdp-timing-stat-viz cdp-stops-dots","aria-hidden":"true",children:[Array.from({length:Math.min(a.length,12)}).map(((e,s)=>(0,_.jsx)("span",{className:"cdp-stop-dot"},"dot-".concat(s)))),(0,_.jsxs)("span",{className:"cdp-timing-stat-viz-label",children:[a.length," stop",1===a.length?"":"s"]})]})]}),null!=q&&(0,_.jsxs)("div",{className:"cdp-timing-stat",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,_.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,_.jsx)(S.BJM,{})}),(0,_.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-value",children:[q,(0,_.jsx)("span",{className:"cdp-timing-stat-unit",children:"km/h"})]}),(0,_.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg speed"})]})]}),(0,_.jsxs)("div",{className:"cdp-timing-stat-viz cdp-speed-gauge","aria-hidden":"true",children:[(0,_.jsx)("div",{className:"cdp-speed-gauge-track",children:(0,_.jsx)("div",{className:"cdp-speed-gauge-fill",style:{width:"".concat(Math.min(100,parseFloat(q)/60*100),"%")}})}),(0,_.jsxs)("div",{className:"cdp-speed-gauge-scale",children:[(0,_.jsx)("span",{children:"0"}),(0,_.jsx)("span",{children:"30"}),(0,_.jsx)("span",{children:"60 km/h"})]})]})]})]})]}),(R||O)&&(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.SeC,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Highlights"})]}),(0,_.jsxs)("div",{className:"cdp-highlights",children:[R&&(0,_.jsxs)("div",{className:"cdp-highlight is-best",onClick:()=>j(R.sequenceStep),role:"button",title:"Focus this step",children:[(0,_.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,_.jsxs)("div",{className:"cdp-highlight-content",children:[(0,_.jsxs)("div",{className:"cdp-highlight-top",children:[(0,_.jsxs)("span",{className:"cdp-highlight-label",children:[(0,_.jsx)("span",{className:"cdp-highlight-chip",children:(0,_.jsx)(S.mU9,{})}),"Fastest stop"]}),(0,_.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,I.gM)(R.sequenceStep-1)},children:["Step ",R.sequenceStep]})]}),(0,_.jsx)("div",{className:"cdp-highlight-title",children:R.deliverycustomer||"Step ".concat(R.sequenceStep)}),(0,_.jsx)("div",{className:"cdp-highlight-meta",children:(0,_.jsx)("span",{className:"cdp-highlight-pill is-good",children:null!=R.timeDeltaMin?0===R.timeDeltaMin?"On schedule":"".concat(R.timeDeltaMin>0?"+":"").concat(R.timeDeltaMin," min vs plan"):"On schedule"})})]})]}),O&&(0,_.jsxs)("div",{className:"cdp-highlight is-worst",onClick:()=>j(O.sequenceStep),role:"button",title:"Focus this step",children:[(0,_.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,_.jsxs)("div",{className:"cdp-highlight-content",children:[(0,_.jsxs)("div",{className:"cdp-highlight-top",children:[(0,_.jsxs)("span",{className:"cdp-highlight-label",children:[(0,_.jsx)("span",{className:"cdp-highlight-chip",children:(0,_.jsx)(S.Wux,{})}),"Biggest deviation"]}),(0,_.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,I.gM)(O.sequenceStep-1)},children:["Step ",O.sequenceStep]})]}),(0,_.jsx)("div",{className:"cdp-highlight-title",children:O.deliverycustomer||"Step ".concat(O.sequenceStep)}),(0,_.jsxs)("div",{className:"cdp-highlight-meta",children:[null!=O.kmDeltaPct&&(0,_.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:[O.kmDeltaPct>0?"+":"",O.kmDeltaPct.toFixed(0),"% route"]}),null!=O.timeDeltaMin&&O.timeDeltaMin>0&&(0,_.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:["+",O.timeDeltaMin,"m late"]})]})]})]})]})]}),B.length>1&&(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.$G1,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Trips (",B.length,")"]})]}),(0,_.jsx)("div",{className:"cdp-trips",children:B.map((e=>{const s=e.profit<0;return(0,_.jsxs)("div",{className:"cdp-trip",children:[(0,_.jsxs)("div",{className:"cdp-trip-head",children:[(0,_.jsxs)("span",{className:"cdp-trip-badge",children:["Trip ",e.tNum]}),(0,_.jsxs)("span",{className:"cdp-trip-meta",children:[e.delivered,"/",e.count," delivered"]})]}),(0,_.jsxs)("div",{className:"cdp-trip-stats",children:[(0,_.jsxs)("span",{title:"Distance",children:[(0,_.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",(0,_.jsxs)("small",{children:[" / ",e.plannedKm.toFixed(1)]})]}),(0,_.jsxs)("span",{className:s?"is-over":"",title:s?"Loss":"Profit",children:[(0,_.jsx)(S.ohY,{}),s?"-":"","\u20b9",Math.abs(e.profit).toFixed(0)]})]})]},"trip-".concat(e.tNum))}))})]}),x&&(e=>{const s=(0,I.gM)(x.sequenceStep-1),a=x.kmDelta>=0?"+":"",t=x.anomaly?"is-over":x.kmDelta<-.1?"is-under":"",i=null!=x.timeDeltaMin?x.timeDeltaMin>10?"is-over":x.timeDeltaMin<-2?"is-under":"":"",r=(0,I.Cx)(x.orderstatus),n=parseFloat((null===(e=x.order)||void 0===e?void 0:e.profit)||0);return(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.$G1,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Step ",x.sequenceStep," details"]}),(0,_.jsx)("button",{type:"button",className:"cdp-section-clear",onClick:()=>l(null),title:"Clear step focus",children:"Show all"})]}),(0,_.jsxs)("div",{className:"compare-delta".concat(x.anomaly?" is-anomaly":""),children:[(0,_.jsxs)("div",{className:"compare-delta-title",children:[(0,_.jsx)("span",{className:"compare-delta-step-badge",style:{background:s},children:x.sequenceStep}),(0,_.jsxs)("div",{className:"compare-delta-title-text",children:[(0,_.jsx)("div",{className:"compare-delta-title-main",children:x.deliverycustomer||"Step ".concat(x.sequenceStep)}),(0,_.jsxs)("div",{className:"compare-delta-title-sub",children:[x.pickupcustomer?"from ".concat(x.pickupcustomer," \xb7 "):"","Order #",x.orderid]})]}),x.orderstatus&&(0,_.jsx)("span",{className:"compare-delta-status",style:{background:r.bg,color:r.fg},children:r.label})]}),(0,_.jsxs)("div",{className:"compare-delta-grid",children:[(0,_.jsxs)("div",{className:"compare-delta-cell".concat(x.anomaly?" is-anomaly":""),children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:"Distance"}),(0,_.jsxs)("span",{className:"compare-delta-cell-val",children:[x.actualKm.toFixed(2)," ",(0,_.jsx)("span",{className:"compare-delta-cell-unit",children:"km"})]}),(0,_.jsxs)("span",{className:"compare-delta-cell-sub",children:["planned ",x.plannedKm.toFixed(2)," km"]})]}),(0,_.jsxs)("div",{className:"compare-delta-cell",children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:"\u0394 Route"}),(0,_.jsxs)("span",{className:"compare-delta-cell-val ".concat(t),children:[a,x.kmDelta.toFixed(2)," km"]}),(0,_.jsx)("span",{className:"compare-delta-cell-sub",children:null!=x.kmDeltaPct?"".concat(a).concat(x.kmDeltaPct.toFixed(0),"% vs plan"):"no planned km"})]}),(0,_.jsxs)("div",{className:"compare-delta-cell",children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:"Time"}),(0,_.jsx)("span",{className:"compare-delta-cell-val ".concat(i),children:null!=x.timeDeltaMin?"".concat(x.timeDeltaMin>0?"+":"").concat(x.timeDeltaMin," min"):"\u2014"}),(0,_.jsx)("span",{className:"compare-delta-cell-sub",children:x.actualTs&&x.expectedTs?"".concat(x.actualTs.format("HH:mm")," vs ").concat(x.expectedTs.format("HH:mm")):x.actualTs?"delivered ".concat(x.actualTs.format("HH:mm")):"in flight"})]}),!Number.isNaN(n)&&0!==n&&(0,_.jsxs)("div",{className:"compare-delta-cell".concat(n<0?" is-anomaly":""),children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:n<0?"Loss":"Profit"}),(0,_.jsxs)("span",{className:"compare-delta-cell-val ".concat(n<0?"is-over":"is-under"),children:[n<0?"-":"","\u20b9",Math.abs(n).toFixed(0)]}),(0,_.jsx)("span",{className:"compare-delta-cell-sub",children:"order revenue"})]})]})]})]})})(),k.length>0&&(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon cdp-icon-warn",children:(0,_.jsx)(S.ItP,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Deviations (",k.length,")"]})]}),(0,_.jsx)("ul",{className:"cdp-dev-list",children:k.map((e=>{const s=(0,I.gM)(e.sequenceStep-1),a=e.kmDelta>=0?"+":"";return(0,_.jsxs)("li",{className:"cdp-dev-item".concat(n===e.sequenceStep?" is-focused":""),onClick:()=>j(e.sequenceStep),children:[(0,_.jsx)("span",{className:"cdp-dev-num",style:{background:s},children:e.sequenceStep}),(0,_.jsxs)("div",{className:"cdp-dev-body",children:[(0,_.jsx)("div",{className:"cdp-dev-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,_.jsxs)("div",{className:"cdp-dev-meta",children:[null!=e.kmDeltaPct&&(0,_.jsxs)("span",{className:"cdp-dev-chip is-over",children:[a,e.kmDeltaPct.toFixed(0),"% route"]}),null!=e.timeDeltaMin&&e.timeDeltaMin>10&&(0,_.jsxs)("span",{className:"cdp-dev-chip is-over",children:["+",e.timeDeltaMin,"m late"]})]})]})]},"dev-".concat(e.sequenceStep))}))})]}),(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.EgJ,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Steps (",a.length,")"]}),(0,_.jsxs)("span",{className:"cdp-section-sub",children:[w,"/",a.length," delivered"]})]}),(0,_.jsx)("ul",{className:"cdp-step-list",children:a.map((e=>{var s;const a=(0,I.gM)(e.sequenceStep-1),t=String(e.orderstatus||"").toLowerCase(),i=I.Ys.has(t),r=I.yP.has(t),l=i&&!e.anomaly,c=n===e.sequenceStep,d=(0,I.Cx)(e.orderstatus),o=parseFloat((null===(s=e.order)||void 0===s?void 0:s.profit)||0),u=e.kmDelta>=0?"+":"",m=null!=e.timeDeltaMin?e.timeDeltaMin>10?"is-over":e.timeDeltaMin<-2?"is-under":"":"",p=["cdp-step",c?"is-focused":"",e.anomaly?"is-anomaly":"",l?"is-correct":"",r?"is-skipped":"",e.isLoading?"is-loading":""].filter(Boolean).join(" ");return(0,_.jsxs)("li",{className:p,onClick:()=>j(e.sequenceStep),children:[(0,_.jsxs)("span",{className:"cdp-step-num",style:{background:a},children:[e.sequenceStep,l&&(0,_.jsx)("span",{className:"cdp-step-check",children:(0,_.jsx)(S.mU9,{})}),e.anomaly&&(0,_.jsx)("span",{className:"cdp-step-flag",children:(0,_.jsx)(S.ItP,{})})]}),(0,_.jsxs)("div",{className:"cdp-step-body",children:[(0,_.jsxs)("div",{className:"cdp-step-title-row",children:[(0,_.jsx)("span",{className:"cdp-step-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),e.orderstatus&&(0,_.jsx)("span",{className:"cdp-step-status",style:{background:d.bg,color:d.fg},children:d.label})]}),(0,_.jsxs)("div",{className:"cdp-step-sub",children:[e.pickupcustomer?"from ".concat(e.pickupcustomer," \xb7 "):"","Order #",e.orderid]}),(0,_.jsxs)("div",{className:"cdp-step-deltas",children:[(0,_.jsxs)("span",{className:"cdp-step-delta",title:"Distance",children:[(0,_.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",e.plannedKm>0&&(0,_.jsxs)("small",{className:e.anomaly?"is-over":"",children:[" ",u,e.kmDelta.toFixed(1)]})]}),(0,_.jsxs)("span",{className:"cdp-step-delta ".concat(m),title:"Delivery time",children:[(0,_.jsx)(S.VP9,{}),e.actualTs?e.actualTs.format("HH:mm"):"\u2014",null!=e.timeDeltaMin&&(0,_.jsxs)("small",{children:[" ",e.timeDeltaMin>0?"+":"",e.timeDeltaMin,"m"]})]}),!Number.isNaN(o)&&0!==o&&(0,_.jsxs)("span",{className:"cdp-step-delta".concat(o<0?" is-over":""),title:o<0?"Loss":"Profit",children:[(0,_.jsx)(S.ohY,{}),o<0?"-":"","\u20b9",Math.abs(o).toFixed(0)]})]})]})]},"step-".concat(e.sequenceStep))}))})]})]})]})};var B=a(85571);const K=["_ts"],U="#662582",G="#10b981",J=e=>{const s=parseFloat(e);return Number.isFinite(s)?s:NaN},W=e=>{if(!e)return"";const s=String(e).trim();if(!s)return"";if(s.includes(",")){const e=s.split(",").map((e=>e.trim())).filter(Boolean);return 0===e.length?s:e.length<=2?e.join(", "):e.slice(-2).join(", ")}const a=s.split(/\s+/).filter(Boolean),t=a.length>6?a.slice(-6).join(" "):s;return t.length>40?"".concat(t.slice(0,40).trim(),"\u2026"):t},$=e=>Number.isFinite(J(e.droplat||e.deliverylat))&&Number.isFinite(J(e.droplon||e.deliverylong)),Z=e=>e.pickuplat||e.pickuplatitude||e.pickup_lat,X=e=>e.pickuplong||e.pickuplongitude||e.picklongitude||e.pickup_lon,Q=e=>Number.isFinite(J(Z(e)))&&Number.isFinite(J(X(e))),ee=[{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}],se="dispatch.slots.v9",ae=["dispatch.slots.v1","dispatch.slots.v2","dispatch.slots.v3","dispatch.slots.v4","dispatch.slots.v5","dispatch.slots.v6","dispatch.slots.v7","dispatch.slots.v8"],te=(e,s)=>"Slot ".concat(e+1," \xb7 ").concat(ie(s)),ie=e=>{const s=Math.floor(e),a=Math.round(60*(e-s)),t=(s+11)%12+1,i=s>=12&&s<24?"PM":"AM";if(0===a)return"".concat(t," ").concat(i);const r=String(a).padStart(2,"0");return"".concat(t,":").concat(r," ").concat(i)},re=(e,s)=>s>=24?"After ".concat(ie(e)):"".concat(ie(e),"\u2013").concat(ie(s)),ne=ee.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{label:e.name||te(s,e.startHour),range:re(e.startHour,e.endHour)}))),le=(e,s)=>{for(const a of s)if(e>=a.startHour&&e2&&void 0!==arguments[2]?arguments[2]:ne;const a=((e,s)=>{const a=ce.find((e=>e.id===s))||ce[0];for(const t of a.keys)if(null!==e&&void 0!==e&&e[t])return e[t];return null})(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all");if(!a)return null;const t=String(a).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))return null;const i=f()(a);return i.isValid()?le(i.hour()+i.minute()/60,s):null};function oe(e){let{targetRef:s}=e;const a=(0,n.ko)();return(0,r.useEffect)((()=>(s.current=a,()=>{s.current=null})),[a]),null}function ue(e){let{trigger:s}=e;const a=(0,n.ko)();return(0,r.useEffect)((()=>{const e=[0,60,120,200,300,380].map((e=>setTimeout((()=>a.invalidateSize({animate:!1})),e)));return()=>e.forEach(clearTimeout)}),[s,a]),null}function me(e,s){const a=e=>e*Math.PI/180,t=a(e[0]),i=a(s[0]),r=a(s[0]-e[0]),n=a(s[1]-e[1]),l=Math.sin(r/2)**2+Math.cos(t)*Math.cos(i)*Math.sin(n/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function pe(e){if(!Array.isArray(e)||e.length<2)return 0;let s=0;for(let a=1;a{let a=0,t=1/0;for(let i=0;i{const a=Math.max(s,i);t.push(e.slice(i,a+1)),i=a})),t}const ve=e=>{if(!e)return null;const s=f()(e);return s.isValid()?s.format("HH:mm:ss"):String(e)},xe=[{key:"assigntime",label:"Assigned"},{key:"acceptedtime",label:"Accepted"},{key:"arrivaltime",label:"Arrived"},{key:"pickuptime",label:"Pickup"},{key:"starttime",label:"Started"},{key:"deliverytime",label:"Delivered",final:!0}],je=e=>{const s=e.filter($);if(!s.length)return[];const a=e.find(Q),t=[];return a&&t.push([J(Z(a)),J(X(a))]),s.forEach((e=>t.push([J(e.droplat||e.deliverylat),J(e.droplon||e.deliverylong)]))),t},fe=(e,s,a)=>{if(!a||0===a.length)return"".concat(e,"-").concat(s);const t=a.map((e=>"".concat(e[0].toFixed(5),",").concat(e[1].toFixed(5)))).join("|");return"".concat(e,"-").concat(s,"-").concat(t)};delete v().Icon.Default.prototype._getIconUrl,v().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png"});const ge=["#0055FF","#00D82C","#FF6B00","#9D00FF","#FF00A8","#00C2B2","#FF9900","#FF0000"],Ne=e=>{const s=String(null!==e&&void 0!==e?e:"");if(!s)return ge[0];let a=0;for(let t=0;t>>0;return ge[a%ge.length]},be=e=>{let{focusedItem:s,viewMode:a,orders:t,kitchens:i,locationKey:l}=e;const c=(0,n.ko)(),d=(0,r.useRef)(""),o=(0,r.useMemo)((()=>{const e=null!=l?"loc:".concat(l,"|"):"",r=e=>{let s=0,a=0,t=0;for(const i of e)Number.isFinite(i[0])&&Number.isFinite(i[1])&&(s+=i[0],a+=i[1],t+=1);return 0===t?"0":"".concat((s/t).toFixed(1),",").concat((a/t).toFixed(1))};if(s){var n,c,d;const a=null!==(n=null!==(c=null!==(d=s.id)&&void 0!==d?d:s.kitchenName)&&void 0!==c?c:s.name)&&void 0!==n?n:null!=s.lat?"".concat(s.lat,",").concat(s.lon):"item",t=s.orders?s.orders.length:0;return"".concat(e,"f|").concat(a,"|").concat(t)}const o=(i||[]).map((e=>[e.lat,e.lon])),u=r(o);if("kitchens"===a){const s=o.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1]))).length;return"".concat(e,"k|").concat(s,"|").concat(u)}if("all"===a){const s=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));return"".concat(e,"a|").concat(s.length,"|").concat(r(s))}return"".concat(e,"m|").concat(a||"","|").concat(o.length,"|").concat(u)}),[s,a,t,i,l]);return(0,r.useEffect)((()=>{if(d.current===o)return;let e=[];s?s.orders?(e=s.orders.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),s.orders.forEach((s=>e.push([J(Z(s)),J(X(s))])))):e=[[s.lat,s.lon]]:"kitchens"===a?(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])))):"all"===a?e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])):(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]))));const r=e.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1])));if(r.length>0){const e=v().latLngBounds(r);if(e.isValid()){1===r.length||e.getNorthEast().equals(e.getSouthWest())?c.setView(r[0],15,{animate:!0,duration:.6}):c.flyToBounds(e,{padding:[60,60],duration:.6,maxZoom:16}),d.current=o}}else;}),[o,s,a,t,i,c]),null},ye=e=>{let{target:s,icon:a,duration:t=950,zIndexOffset:i,eventHandlers:n,children:c,markerRef:d}=e;const o=(0,r.useRef)(null),u=(0,r.useRef)(null),m=(0,r.useRef)(s),p=(0,r.useRef)(null),h=Array.isArray(s)?Number(s[0]):NaN,x=Array.isArray(s)?Number(s[1]):NaN;return(0,r.useEffect)((()=>{const e=o.current;if(!e||!Number.isFinite(h)||!Number.isFinite(x))return;const s=v().latLng(h,x),a=e.getLatLng();if(!a)return void e.setLatLng(s);const i=s.lat-a.lat,r=s.lng-a.lng;if(Math.abs(i)<1e-6&&Math.abs(r)<1e-6)return void e.setLatLng(s);let n=!1;try{n=a.distanceTo(s)>2e3}catch(g){n=!1}if(n)return e.setLatLng(s),void(p.current=performance.now());u.current&&cancelAnimationFrame(u.current);const l=performance.now(),c=null==p.current?t:l-p.current,d=Math.max(800,Math.min(32e3,c));p.current=l;const m=a.lat,j=a.lng,f=s=>{const a=Math.min(1,(s-l)/d);e.setLatLng([m+i*a,j+r*a]),a<1&&(u.current=requestAnimationFrame(f))};return u.current=requestAnimationFrame(f),()=>{u.current&&cancelAnimationFrame(u.current)}}),[h,x,t]),(0,r.useEffect)((()=>()=>{u.current&&cancelAnimationFrame(u.current)}),[]),(0,_.jsx)(l.p,{ref:e=>{o.current=e,"function"===typeof d?d(e):d&&(d.current=e)},position:m.current,icon:a,zIndexOffset:i,eventHandlers:n,children:c})},ke=e=>{let{children:s}=e;return(0,_.jsx)("span",{className:"ico-inline",style:{display:"inline-flex",alignItems:"center",verticalAlign:"-2px",marginRight:4},children:s})},Se=[{key:"morning",label:"Morning",timeRange:"12:00 AM \u2013 8:00 AM",sub:"Early shift orders",color:"#f59e0b",bg:"#fffbeb",border:"#fde68a"},{key:"afternoon",label:"Noon",timeRange:"9:00 AM \u2013 12:30 PM",sub:"Lunch rush window",color:"#10b981",bg:"#ecfdf5",border:"#a7f3d0"},{key:"evening",label:"Evening",timeRange:"4:00 PM \u2013 7:00 PM",sub:"Dinner & end-of-day",color:"#6366f1",bg:"#eef2ff",border:"#c7d2fe"}],_e=e=>{if(null==e)return"\u2014";if("number"===typeof e)return e.toLocaleString("en-IN");const s=parseFloat(e);return Number.isFinite(s)?s.toLocaleString("en-IN"):String(e)},we=e=>{if(!e||"string"!==typeof e)return null;const s=e.split(":").map(Number);if(s.length<2||s.some((e=>!Number.isFinite(e))))return null;const[a,t,i=0]=s;return 3600*a+60*t+i},Fe=e=>{let{data:s,embedded:a=!1,selectedRiderId:n,onRiderSelect:h,pulseOrderId:x,onChangeRider:j}=e;const w=null!==s&&void 0!==s&&s.zones&&s.zones.length>0?"zones":"riders",[F,M]=(0,r.useState)(w),[C,A]=(0,r.useState)("live"),[z,P]=(0,r.useState)({}),[E,D]=(0,r.useState)(null),[L,q]=(0,r.useState)(null),[H,Y]=(0,r.useState)(null);(0,r.useEffect)((()=>{if(!H)return;const e=e=>{"Escape"===e.key&&Y(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[H]);const ie=(0,g.n)({mutationFn:T.W0,onMutate:e=>D(e.batch),onSuccess:(e,s)=>{P((a=>(0,i.A)((0,i.A)({},a),{},{[s.batch]:{data:e,fetchedAt:f()().format("HH:mm:ss")}})))},onSettled:()=>D(null)}),ce=e=>{q(e);const s=z[e];s&&s.data&&!1!==s.data.success||ie.mutate({batch:e,tenantId:916})},Fe=15e3,Me=(0,r.useRef)(null);(0,r.useEffect)((()=>{Me.current=E}),[E]),(0,r.useEffect)((()=>{if("analysis"!==C)return;if(!L)return;const e=setInterval((()=>{Me.current||"undefined"!==typeof document&&document.hidden||ie.mutate({batch:L,tenantId:916})}),Fe);return()=>clearInterval(e)}),[C,L]);const[Ce,Ae]=(0,r.useState)(new Set),[ze,Pe]=(0,r.useState)(null),[Ee,De]=(0,r.useState)(null),[Le,qe]=(0,r.useState)(null),[Re,Ie]=(0,r.useState)(null),[Oe,Te]=(0,r.useState)("planned"),He=(0,r.useRef)({}),Ye=(0,r.useRef)(new Set),Ve=(0,r.useRef)(new Set),Be=(0,r.useRef)(new Map),Ke=((0,r.useRef)(null),(0,r.useRef)(null)),[Ue,Ge]=(0,r.useState)(null),Je=void 0!==n,[We,$e]=(0,r.useState)(""),{data:Ze}=(0,N.I)({queryKey:["appLocations"],queryFn:T.aL,staleTime:3e5}),Xe="undefined"!==typeof window?localStorage.getItem("applocationid"):null,[Qe,es]=(0,r.useState)(null!=Xe?Number(Xe):0),[ss,as]=(0,r.useState)(!1),ts=(0,r.useRef)(null),[is,rs]=(0,r.useState)("assigned"),[ns,ls]=(0,r.useState)(!1),cs=(0,r.useRef)(null),[ds,os]=(0,r.useState)((()=>{if("undefined"===typeof window)return ne;try{const e=window.localStorage.getItem(se);if(!e)return ne;const s=JSON.parse(e);return Array.isArray(s)&&s.length===ee.length?s.map(((e,s)=>{const a=e.id||"slot-".concat(s+1),t=Number(e.startHour)||0,i=Number(e.endHour)||24,r=ne.find((e=>e.id===a));return{id:a,startHour:t,endHour:i,label:(null===r||void 0===r?void 0:r.name)||te(s,t),range:re(t,i)}})):ne}catch(e){return ne}})),us=ds,[ms,ps]=(0,r.useState)(!1),hs=(0,r.useRef)(null);(0,r.useEffect)((()=>{if("undefined"!==typeof window)try{ae.forEach((e=>window.localStorage.removeItem(e)))}catch(e){}}),[]);const vs=(0,r.useRef)(!1);(0,r.useEffect)((()=>{if(vs.current){if("undefined"!==typeof window)try{window.localStorage.setItem(se,JSON.stringify(ds.map((e=>{let{id:s,startHour:a,endHour:t}=e;return{id:s,startHour:a,endHour:t}}))))}catch(e){}}else vs.current=!0}),[ds]),(0,r.useEffect)((()=>{if(!ss)return;const e=e=>{ts.current&&!ts.current.contains(e.target)&&as(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[ss]),(0,r.useEffect)((()=>{if(!ns)return;const e=e=>{cs.current&&!cs.current.contains(e.target)&&ls(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[ns]),(0,r.useEffect)((()=>{if(!ms)return;const e=e=>{hs.current&&!hs.current.contains(e.target)&&ps(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[ms]);const[xs,js]=(0,r.useState)(null),[fs,gs]=(0,r.useState)(""),{data:Ns,isFetching:bs,isError:ys,error:ks}=(0,N.I)({queryKey:["riderPeriodicLog",xs],queryFn:()=>(0,T.ne)(xs),enabled:"rider-info"===F&&null!=xs,refetchInterval:"rider-info"===F&&null!=xs&&15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),Ss=(0,r.useMemo)((()=>{const e=parseFloat(null===Ns||void 0===Ns?void 0:Ns.latitude),s=parseFloat(null===Ns||void 0===Ns?void 0:Ns.longitude);return Number.isFinite(e)&&Number.isFinite(s)?{lat:e.toFixed(4),lon:s.toFixed(4)}:null}),[null===Ns||void 0===Ns?void 0:Ns.latitude,null===Ns||void 0===Ns?void 0:Ns.longitude]),{data:_s}=(0,N.I)({queryKey:["reverseGeocode",null===Ss||void 0===Ss?void 0:Ss.lat,null===Ss||void 0===Ss?void 0:Ss.lon],queryFn:async()=>{const e=await fetch("https://nominatim.openstreetmap.org/reverse?lat=".concat(Ss.lat,"&lon=").concat(Ss.lon,"&format=json&zoom=16&addressdetails=1"),{headers:{Accept:"application/json"}});if(!e.ok)return null;const s=await e.json(),a=(null===s||void 0===s?void 0:s.address)||{};return{area:a.suburb||a.neighbourhood||a.village||a.hamlet||a.city_district||a.town||a.city||a.county||a.state||"",display:(null===s||void 0===s?void 0:s.display_name)||""}},enabled:"rider-info"===F&&!!Ss,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}),ws=(0,r.useMemo)((()=>{if(!Ze)return null;const e=Ze.find((e=>String(e.applocationid)===String(Qe)));return(null===e||void 0===e?void 0:e.locationname)||null}),[Ze,Qe]),[Fs,Ms]=(0,r.useState)({}),Cs=(0,r.useRef)({}),[As,zs]=(0,r.useState)({}),Ps=(0,r.useRef)({}),[Es,Ds]=(0,r.useState)(!1),[Ls,qs]=(0,r.useState)([]),[Rs,Is]=(0,r.useState)({}),Os=(0,r.useRef)(!1),[Ts,Hs]=(0,r.useState)(f()().format("YYYY-MM-DD")),[Ys,Vs]=(0,r.useState)(!1),[Bs,Ks]=(0,r.useState)((()=>f()(Ts).isValid()?f()(Ts).startOf("month"):f()().startOf("month"))),Us=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(!Ys)return;const e=e=>{Us.current&&(Us.current.contains(e.target)||Vs(!1))},s=e=>{"Escape"===e.key&&Vs(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}}),[Ys]),(0,r.useEffect)((()=>{if(Ys){const e=f()(Ts);e.isValid()&&Ks(e.startOf("month"))}}),[Ys,Ts]);const[Gs,Js]=(0,r.useState)(!1),[Ws,$s]=(0,r.useState)("combined"),[Zs,Xs]=(0,r.useState)(!0),[Qs,ea]=(0,r.useState)(!0),[sa,aa]=(0,r.useState)((()=>new Set)),ta=(0,r.useRef)(!1),[ia,ra]=(0,r.useState)(!1),na=(0,r.useRef)(!1),la=(0,r.useRef)(!1),[ca,da]=(0,r.useState)(!1),[oa,ua]=(0,r.useState)(null),ma=(0,r.useRef)(null),pa=(0,r.useRef)(null);pa.current||(pa.current=v().canvas({padding:1.5,tolerance:5}));const{data:ha}=(0,N.I)({queryKey:[Qe,Ts,""],queryFn:T.zb,refetchInterval:15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),va=(0,r.useMemo)((()=>(ha||[]).map((e=>{var s;const a=parseFloat(null===e||void 0===e?void 0:e.latitude),t=parseFloat(null===e||void 0===e?void 0:e.longitude);return Number.isFinite(a)&&Number.isFinite(t)?{id:String(null!==(s=e.userid)&&void 0!==s?s:""),userid:e.userid,username:e.username||"Rider #".concat(e.userid),status:String(e.status||"").toLowerCase(),contactno:e.contactno,orderid:e.orderid,logdate:e.logdate,lat:a,lon:t}:null})).filter(Boolean)),[ha]),xa=(0,r.useMemo)((()=>new Set(va.filter((e=>"active"===e.status)).map((e=>String(e.id))))),[va]),[ja,fa]=(0,r.useState)((()=>{const e=f()();return le(e.hour()+e.minute()/60,ne)||ne[0].id}));(0,r.useEffect)((()=>{var e;"all"!==ja&&(us.some((e=>e.id===ja))||fa((null===(e=us[0])||void 0===e?void 0:e.id)||"all"))}),[us,ja]);const ga=(0,r.useRef)(null),Na=!s,ba="undefined"!==typeof window&&localStorage.getItem("userid")||0,{data:ya,isFetching:ka,isError:Sa,fetchNextPage:_a,hasNextPage:wa,isFetchingNextPage:Fa}=(0,b.q)({queryKey:["dispatchDeliveries",Qe,ba,"all",Ts,Ts,50,"",0,0,0],queryFn:T.tL,getNextPageParam:e=>{var s;return null!==(s=e.nextPage)&&void 0!==s?s:void 0},enabled:Na,refetchInterval:"all"===F&&15e3,refetchIntervalInBackground:!1});(0,r.useEffect)((()=>{Na&&wa&&!Fa&&_a()}),[Na,wa,Fa,_a]);const Ma=(0,r.useMemo)((()=>{const e=((null===ya||void 0===ya?void 0:ya.pages)||[]).flatMap((e=>e.rows||[])),s=new Set,a=[];for(const t of e){const e=null!=t.orderid?String(t.orderid):null;e&&s.has(e)||(e&&s.add(e),a.push(t))}return a}),[ya]),Ca=(0,r.useMemo)((()=>{const e=new Map;return Ma.forEach((s=>{const a=String(s.userid||s.rider_id||"");a&&"unassigned"!==a&&"0"!==a&&(e.has(a)||e.set(a,{id:a,riderName:s.ridername||s.rider_name||s.username||"Rider ".concat(a)}))})),Array.from(e.values()).sort(((e,s)=>String(e.riderName).localeCompare(String(s.riderName))))}),[Ma]),Aa=(0,r.useMemo)((()=>{const e={all:Ma.length};return us.forEach((s=>{e[s.id]=0})),Ma.forEach((s=>{const a=de(s,is,us);a&&(e[a]=(e[a]||0)+1)})),e}),[Ma,is,us]),za=(0,r.useMemo)((()=>"all"===ja?Ma:Ma.filter((e=>de(e,is,us)===ja))),[Ma,ja,is,us]),Pa=(0,r.useMemo)((()=>{let e=0;const s={};return Ma.forEach((e=>{const a=de(e,is,us);if(!a||"all"===a)return;const t=String(e.userid||e.rider_id||"unassigned");if("unassigned"===t||"0"===t)return;s[a]||(s[a]={}),s[a][t]||(s[a][t]={revenue:0,kms:0});const i=parseFloat(e.kms||e.actualkms||0);s[a][t].kms+=i,s[a][t].revenue+=i<=8?30:30+6*(i-8)})),Object.values(s).forEach((s=>{Object.values(s).forEach((s=>{const a=2.5*s.kms+166.67;e+=s.revenue-a}))})),e}),[Ma,is,us]),Ea=(0,r.useMemo)((()=>{if(!Na)return null;if(!za.length)return{code:200,zone_summary:[],zones:[]};const e=e=>String(e||"").trim(),s={};za.forEach((a=>{const t=e(a.deliverysuburb)||e(a.locationsuburb)||e(a.zone_name)||"Unzoned",i=t.toLowerCase(),r=String(a.userid||a.rider_id||"unassigned"),n=a.ridername||a.rider_name||a.username||("unassigned"===r?"Unassigned":"Rider ".concat(r));s[i]||(s[i]={zone_name:t,riders:{}}),s[i].riders[r]||(s[i].riders[r]={rider_id:r,rider_name:n,orders:[]}),s[i].riders[r].orders.push(a)}));const a=Object.values(s).map((e=>{const s=Object.values(e.riders).map((e=>{const s=[...e.orders].sort(((e,s)=>f()(e.deliverydate||e.assigntime||0).valueOf()-f()(s.deliverydate||s.assigntime||0).valueOf()));return(0,i.A)((0,i.A)({},e),{},{orders:s.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{trip_number:e.trip_number||1,step:e.step||s+1})))})}));return{zone_name:e.zone_name,riders:s}}));return{code:200,zone_summary:a.map((e=>{const s=e.riders.flatMap((e=>e.orders)),a=s.filter((e=>e.userid||e.rider_id)).length;return{zone_name:e.zone_name,total_orders:s.length,assigned_orders:a,unassigned_orders_count:s.length-a,active_riders_count:e.riders.filter((e=>"unassigned"!==e.rider_id)).length,total_delivery_kms:s.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),total_profit:s.reduce(((e,s)=>e+parseFloat(s.profit||0)),0)}})),zones:a}}),[Na,za]),Da=(0,r.useMemo)((()=>{const e=s||Ea||{zones:[],zone_summary:[]},a=e.zones||[],t={};(e.zone_summary||[]).forEach((e=>{t[e.zone_name]=e}));const i=(e,s)=>{const a={};return e.forEach((e=>{const t=s(e);t&&(a[t]=(a[t]||0)+1)})),Object.entries(a).map((e=>{let[s,a]=e;return{name:s,count:a}})).sort(((e,s)=>s.count-e.count))};return a.map((e=>{var s,a,r,n;const l=t[e.zone_name]||{},c=(e.riders||[]).flatMap((e=>e.orders||[])),d=(e.riders||[]).filter((e=>e.rider_id&&"unassigned"!==e.rider_id)).length,o=i(c,(e=>e.deliverysuburb||e.locationsuburb)),u=i(c,(e=>e.pickupcustomer||e.kitchen_key)),m={};return c.forEach((e=>{const s=String(e.orderstatus||"unknown").toLowerCase();m[s]=(m[s]||0)+1})),{id:e.zone_name,name:e.zone_name,riders:e.riders||[],orders:c,totalOrders:null!==(s=l.total_orders)&&void 0!==s?s:c.length,activeRidersCount:null!==(a=l.active_riders_count)&&void 0!==a?a:d,totalKms:null!==(r=l.total_delivery_kms)&&void 0!==r?r:c.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),totalProfit:null!==(n=l.total_profit)&&void 0!==n?n:c.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),suburbs:o,kitchens:u,statusCounts:m}}))}),[s,Ea]),{riders:La,kitchens:qa,allOrders:Ra,stats:Ia}=(0,r.useMemo)((()=>{const e=s||Ea||{zones:[],zone_summary:[]},a=[];(e.zones||[]).forEach((e=>{(e.riders||[]).forEach((s=>{s.orders.forEach((t=>{a.push((0,i.A)((0,i.A)({},t),{},{zone_name:e.zone_name,rider_name:s.rider_name,rider_id:s.rider_id}))}))}))}));const t={};(e.zones||[]).forEach((e=>{(e.riders||[]).forEach((e=>{const s=e.rider_id;s&&"unassigned"!==s&&(t[s]||(t[s]={id:s,riderName:e.rider_name||e.username||s,orders:[],color:ge[Object.keys(t).length%ge.length]}))}))})),a.forEach((e=>{const s=e.rider_id||e.userid||"unknown";"unassigned"!==s&&(t[s]||(t[s]={id:s,riderName:e.rider_name||e.username||e.rider||s,orders:[],color:ge[Object.keys(t).length%ge.length]}),t[s].orders.some((s=>s.orderid===e.orderid))||t[s].orders.push(e))}));const r={};a.forEach((e=>{const s=e.pickupcustomer||e.kitchen_key||"Unknown",a=s.toLowerCase().trim();r[a]?!Number.isFinite(r[a].lat)&&Q(e)&&(r[a].lat=J(Z(e)),r[a].lon=J(X(e))):r[a]={id:a,kitchenName:s,lat:J(Z(e)),lon:J(X(e)),orders:[],riders:new Set},r[a].orders.push(e),e.rider_id&&r[a].riders.add(e.rider_id)}));const n=a.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),l=a.reduce(((e,s)=>e+parseFloat(s.profit||0)),0);return{riders:Object.values(t).map((e=>(0,i.A)((0,i.A)({},e),{},{orders:[...e.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)}))}))).sort(((e,s)=>s.orders.length-e.orders.length)),kitchens:Object.values(r).sort(((e,s)=>s.orders.length-e.orders.length)),allOrders:a,stats:{totalOrders:a.length,totalKms:n,totalProfit:l,totalRiders:Object.keys(t).length}}}),[s,Ea]),Oa=Je?n&&La.find((e=>e.id===n))||null:ze,Ta="all"===F,Ha=(0,r.useMemo)((()=>Ta?Ra.filter((e=>xa.has(String(e.rider_id)))):Ra),[Ta,Ra,xa]),Ya=(0,r.useMemo)((()=>new Set((Ta?Ha:[]).filter(I.L0).map((e=>String(e.rider_id))))),[Ta,Ha]),Va=(0,r.useMemo)((()=>Ta?La.filter((e=>Ya.has(String(e.id)))):La),[Ta,La,Ya]),Ba=(0,r.useMemo)((()=>Ta?va.filter((e=>"active"===e.status&&Ya.has(String(e.id)))).map((e=>[e.lat,e.lon])):[]),[Ta,va,Ya]),Ka=(0,r.useMemo)((()=>Ta?Ha.filter(I.L0).length:0),[Ta,Ha]),Ua=(0,r.useCallback)((e=>{h&&h(e?e.id:null),Je||Pe(e),Ie(null)}),[Je,h]),Ga=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=Oa?Oa.id:null;e!==Ga.current&&(Oa?B.A.info("Focused rider changed to: ".concat(Oa.riderName," (").concat(Oa.orders.length," orders)")):B.A.info("Focused rider reset to: None"),Ga.current=e)}),[Oa]),(0,r.useEffect)((()=>{Re?B.A.info("Focused order updated: ID ".concat(Re.orderid)):B.A.debug("Focused order selection cleared")}),[Re]);const Ja=(0,r.useRef)(0);(0,r.useEffect)((()=>{Ra&&Ra.length!==Ja.current&&(B.A.info("Orders database updated: ".concat(Ra.length," orders actively tracked")),Ja.current=Ra.length)}),[Ra]);const Wa=(0,r.useRef)(0);(0,r.useEffect)((()=>{va&&va.length!==Wa.current&&(B.A.info("Live riders list updated: ".concat(va.length," active riders mapped")),Wa.current=va.length)}),[va]);const $a=(0,r.useMemo)((()=>{if(Oa)return{orders:Oa.orders.length,riders:1,km:Oa.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:Oa.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Rider"};if(Ee)return{orders:Ee.orders.length,riders:Ee.riders.size,km:Ee.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:Ee.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Kitchen"};if(Ta){const e=Ra.filter(I.L0);return{orders:e.length,riders:Va.length,km:e.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:e.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Active Fleet"}}return{orders:Ia.totalOrders,riders:Ia.totalRiders,km:Ia.totalKms,profit:Ia.totalProfit,label:"Total Fleet"}}),[Oa,Ee,Ta,Ha,Va,Ia]),Za=(0,r.useMemo)((()=>{if(!Oa)return[];const e=new Set;return Oa.orders.forEach((s=>{null!=s.deliveryid&&""!==s.deliveryid&&0!==s.deliveryid&&e.add(String(s.deliveryid))})),Array.from(e)}),[Oa]),Xa=(0,y.E)({queries:Za.map((e=>({queryKey:["deliveryLogs",e],queryFn:async()=>{var s,a;const i=await k.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e));return function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const a=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===a.length)return[];if(1===a.length)return[{lat:a[0].lat,lng:a[0].lng,logdate:a[0].logdate,_ts:a[0]._ts}];const t=null!=s.processNoise?s.processNoise:1e-10,i=null!=s.measurementNoise?s.measurementNoise:2e-9,r=null!=s.outlierGate?s.outlierGate:9,n=null!=s.maxSpeedKmh?s.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let c=0;for(;cn||(d.push(e),o=s)}if(d.length<2)return d.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const u=e=>{const s=d.length,a=new Array(s),n=new Array(s),c=new Array(s),o=new Array(s),u=new Array(s),m=l(d[0]),p=l(d[1]),h=Math.max(.1,(p-m)/1e3),v=(d[1][e]-d[0][e])/h;a[0]=[d[0][e],v],n[0]=[i,0,0,1],c[0]=a[0].slice(),o[0]=n[0].slice(),u[0]=0;let x=m;for(let f=1;fr){a[f]=[v,j],n[f]=[_,w,F,M];continue}const z=_/A,P=F/A,E=v+z*C,D=j+P*C;a[f]=[E,D],n[f]=[(1-z)*_,(1-z)*w,F-P*_,M-P*w]}const j=new Array(s);j[s-1]=a[s-1].slice();for(let t=s-2;t>=0;t--){const e=u[t+1],[s,i,r,l]=n[t],d=s+e*i,m=i,p=r+e*l,h=l,[v,x,f,g]=o[t+1],N=v*g-x*f;if(!Number.isFinite(N)||Math.abs(N)<1e-30){j[t]=a[t].slice();continue}const b=g/N,y=-x/N,k=-f/N,S=v/N,_=d*b+m*k,w=d*y+m*S,F=p*b+h*k,M=p*y+h*S,C=j[t+1][0]-c[t+1][0],A=j[t+1][1]-c[t+1][1];j[t]=[a[t][0]+_*C+w*A,a[t][1]+F*C+M*A]}return j.map((e=>e[0]))},m=u("lat"),p=u("lng");return d.map(((e,s)=>({lat:m[s],lng:p[s],logdate:e.logdate,_ts:e._ts})))}(([null===i||void 0===i||null===(s=i.data)||void 0===s?void 0:s.details,null===i||void 0===i||null===(a=i.data)||void 0===a?void 0:a.data,null===i||void 0===i?void 0:i.data,i].find((e=>Array.isArray(e)))||[]).map((e=>{var s,a,t;const i=null!==e&&void 0!==e&&e.logdate?f()(e.logdate):null;return{lat:parseFloat(null!==(s=null===e||void 0===e?void 0:e.latitude)&&void 0!==s?s:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(a=null!==(t=null===e||void 0===e?void 0:e.longitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lng)&&void 0!==a?a:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:i&&i.isValid()?i.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,s)=>e._ts-s._ts))).map((e=>{let{_ts:s}=e;return(0,t.A)(e,K)}))},enabled:Gs&&null!=Oa,staleTime:3e5,refetchOnWindowFocus:!1,retry:1})))}),Qa=(0,r.useMemo)((()=>{if(!Oa)return[];const e=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=f()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER};return Oa.orders.filter((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)).sort(((s,a)=>{const t=e(s)-e(a);return 0!==t?t:(s.step||0)-(a.step||0)})).map(((e,s)=>{const a=Za.indexOf(String(e.deliveryid)),t=a>=0?Xa[a]:null;return{sequenceStep:s+1,orderid:e.orderid,deliveryid:e.deliveryid,deliverycustomer:e.deliverycustomer,pickupcustomer:e.pickupcustomer,step:e.step,tripNumber:e.trip_number||1,deliverytime:e.deliverytime||e.expecteddeliverytime,kms:parseFloat(e.actualkms||e.kms||0)||0,profit:parseFloat(e.profit||0)||0,orderstatus:e.orderstatus,isLoading:(null===t||void 0===t?void 0:t.isLoading)||(null===t||void 0===t?void 0:t.isFetching),isError:null===t||void 0===t?void 0:t.isError,coords:(null===t||void 0===t?void 0:t.data)||[]}}))}),[Oa,Za,Xa]),et=(0,r.useMemo)((()=>Oa?Qa.map((e=>{const s=Oa.orders.find((s=>String(s.deliveryid)===String(e.deliveryid))),a=parseFloat((null===s||void 0===s?void 0:s.kms)||0)||0,t=As[e.deliveryid];let i=0;Array.isArray(t)&&t.length>=2?i=pe(t):null!=(null===s||void 0===s?void 0:s.actualkms)&&""!==s.actualkms?i=parseFloat(s.actualkms)||0:e.coords.length>=2&&(i=pe(e.coords.map((e=>[e.lat,e.lng]))));const r=i-a,n=a>0?r/a*100:null,l=null!==s&&void 0!==s&&s.expecteddeliverytime?f()(s.expecteddeliverytime):null,c=null!==s&&void 0!==s&&s.deliverytime?f()(s.deliverytime):null,d=null!==l&&void 0!==l&&l.isValid()&&null!==c&&void 0!==c&&c.isValid()?c.diff(l,"minute"):null,o=a>0&&i>1.25*a||null!=d&&d>15;return{sequenceStep:e.sequenceStep,deliveryid:e.deliveryid,orderid:e.orderid,order:s,plannedKm:a,actualKm:i,kmDelta:r,kmDeltaPct:n,expectedTs:null!==l&&void 0!==l&&l.isValid()?l:null,actualTs:null!==c&&void 0!==c&&c.isValid()?c:null,timeDeltaMin:d,anomaly:o,orderstatus:e.orderstatus,deliverycustomer:e.deliverycustomer,pickupcustomer:null===s||void 0===s?void 0:s.pickupcustomer,isLoading:e.isLoading,coordsCount:e.coords.length}})):[]),[Qa,Oa,As]),st=(0,r.useMemo)((()=>{if(0===et.length)return{plannedKm:0,actualKm:0,kmDeltaPct:null,anomalies:0,late:0,onTime:0};const e=et.filter((e=>!e.isLoading&&e.coordsCount>0)),s=e.reduce(((e,s)=>e+s.plannedKm),0),a=e.reduce(((e,s)=>e+s.actualKm),0);return{plannedKm:s,actualKm:a,kmDeltaPct:s>0?(a-s)/s*100:null,anomalies:e.filter((e=>e.anomaly)).length,late:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin>5)).length,onTime:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin<=5)).length}}),[et]),at=(0,r.useMemo)((()=>[...et].sort(((e,s)=>{var a,t;return((null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep)-((null===(t=s.order)||void 0===t?void 0:t.step)||s.sequenceStep)}))),[et]),tt=(0,r.useMemo)((()=>[...et].sort(((e,s)=>e.sequenceStep-s.sequenceStep))),[et]),it=(0,r.useMemo)((()=>{if(!Gs||!oa||!Oa)return null;const e=Qa.find((e=>e.sequenceStep===oa));if(!e)return null;const s=Oa.orders.find((s=>String(s.deliveryid)===String(e.deliveryid)));return s?{orders:[s],id:"cmp-step-".concat(oa,"-").concat(s.orderid)}:null}),[Gs,oa,Oa,Qa]);(0,r.useEffect)((()=>{ua(null),aa(new Set),$s("combined")}),[Gs,null===Oa||void 0===Oa?void 0:Oa.id]),(0,r.useEffect)((()=>{!Oa&&Gs&&Js(!1)}),[Oa,Gs]),(0,r.useEffect)((()=>{ta.current&&Oa&&(ta.current=!1,Js(!0))}),[Oa]),(0,r.useEffect)((()=>{Gs&&!la.current?(na.current=ia,ra(!0),da(!1)):!Gs&&la.current&&ra(na.current),la.current=Gs}),[Gs]);const rt=(0,r.useCallback)((async(e,s,a)=>{if(a.length<2)return;const t=fe(e,s,a);if(void 0!==Cs.current[t])return;Cs.current[t]=null,Ms((e=>(0,i.A)((0,i.A)({},e),{},{[t]:null})));const r=a.map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),n="https://router.project-osrm.org/route/v1/driving/".concat(r,"?overview=full&geometries=geojson");try{const e=await fetch(n),s=await e.json();if(s.routes&&s.routes[0]){const e=s.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));Cs.current[t]=e,Ms((s=>(0,i.A)((0,i.A)({},s),{},{[t]:e})))}else Cs.current[t]=!1,Ms((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}catch(l){console.error("OSRM Fetch error:",l),Cs.current[t]=!1,Ms((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}}),[]);(0,r.useEffect)((()=>{Cs.current={},Ms({}),Ps.current={},zs({})}),[Ts,ja]);const nt=(0,r.useCallback)((async(e,s)=>{if(void 0!==Ps.current[e])return;if(!Array.isArray(s)||s.length<2)return;Ps.current[e]=null,zs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:null})));const a=s=>{Ps.current[e]=s,zs((a=>(0,i.A)((0,i.A)({},a),{},{[e]:s})))},t=()=>{Ps.current[e]=!1,zs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:!1})))},r=(e,s)=>{if(e.length<=s)return e;const a=Math.ceil(e.length/s),t=e.filter(((e,s)=>s%a===0)),i=e[e.length-1];return t[t.length-1]!==i&&t.push(i),t};try{const e=r(s,90).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),t="https://router.project-osrm.org/match/v1/driving/".concat(e,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),i=await fetch(t),n=await i.json();if(n.matchings&&n.matchings.length>0){const e=n.matchings.flatMap((e=>{var s;return((null===(s=e.geometry)||void 0===s?void 0:s.coordinates)||[]).map((e=>[e[1],e[0]]))}));if(e.length>=2)return void a(e)}}catch(n){console.warn("OSRM Match error, trying route fallback:",n)}try{const e=r(s,25).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),i="https://router.project-osrm.org/route/v1/driving/".concat(e,"?overview=full&geometries=geojson"),n=await fetch(i),l=await n.json();if(l.routes&&l.routes[0]){const e=l.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));if(e.length>=2)return void a(e)}t()}catch(n){console.error("OSRM Route fallback error:",n),t()}}),[]);(0,r.useEffect)((()=>{Gs&&Oa&&Qa.forEach((e=>{if(!e.deliveryid||e.coords.length<2)return;const s=e.coords.map((e=>[e.lat,e.lng]));nt(e.deliveryid,s)}))}),[Qa,Gs,Oa,nt]),(0,r.useEffect)((()=>{Os.current=Es}),[Es]),(0,r.useEffect)((()=>{if(a)return;const e=()=>{const e=new Date;$e([e.getHours(),e.getMinutes(),e.getSeconds()].map((e=>String(e).padStart(2,"0"))).join(":"))},s=setInterval(e,1e3);return e(),()=>clearInterval(s)}),[a]),(0,r.useEffect)((()=>{Ae(new Set(La.map((e=>e.id))))}),[La]),(0,r.useEffect)((()=>{La.forEach((e=>{if(!Ce.has(e.id))return;if(Oa&&Oa.id!==e.id)return;const s={};if(e.orders.forEach((e=>{const a=e.trip_number||1;s[a]||(s[a]=[]),s[a].push(e)})),Object.entries(s).forEach((s=>{let[a,t]=s;const i=[...t].sort(((e,s)=>(e.step||0)-(s.step||0))),r=je(i);r.length>=2&&rt(e.id,a,r)})),Ta){const s=(0,I.d1)(e.orders);if(s){const a=va.find((s=>String(s.id)===String(e.id))),t=a&&Number.isFinite(a.lat)&&Number.isFinite(a.lon)?[a.lat,a.lon]:Q(s)?[J(Z(s)),J(X(s))]:null,i=J(s.droplat||s.deliverylat),r=J(s.droplon||s.deliverylong);t&&Number.isFinite(i)&&Number.isFinite(r)&&rt(e.id,"active-".concat(s.orderid),[t,[i,r]])}}}))}),[La,Ce,Oa,Ta,va,rt]);const lt=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(!Na)return;const e=()=>{const e=f()();return e.hour()+e.minute()/60};null===lt.current&&(lt.current=e());const s=setInterval((()=>{const s=e(),a=le(lt.current,us),t=le(s,us);lt.current=s,t&&t!==a&&fa((e=>e===a?t:e))}),3e4);return()=>clearInterval(s)}),[Na,us]),(0,r.useEffect)((()=>{Ie(null)}),[null===Ee||void 0===Ee?void 0:Ee.id]),(0,r.useEffect)((()=>{const e=ga.current;e&&"function"===typeof e.scrollIntoView&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[ja]);const ct=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return v().divIcon({className:"",iconSize:s?[56,56]:[46,46],iconAnchor:s?[28,28]:[23,23],popupAnchor:[0,s?-30:-24],html:'
').concat((e||"K").charAt(0).toUpperCase(),"
")})},dt=e=>{var s;return(null===(s=La.find((s=>s.id===e)))||void 0===s?void 0:s.color)||"#475569"},ot=(e,s)=>{if(!e||!s||!$(s))return null;const a=va.find((s=>String(s.id)===String(e)));if(!a)return null;const t=J(s.droplat||s.deliverylat),i=J(s.droplon||s.deliverylong);if(!Number.isFinite(t)||!Number.isFinite(i))return null;const r=me([a.lat,a.lon],[t,i]);return Math.round(1e3*r)},ut=e=>null===e||void 0===e?"":e>=1e3?"".concat((e/1e3).toFixed(1)," km"):"".concat(e," m");return(0,_.jsxs)("div",{className:"dispatch-container".concat(a?" embedded":"").concat(Gs?" compare-open":""),children:[!a&&(0,_.jsxs)("div",{id:"hdr",children:[(0,_.jsxs)("div",{className:"logo",children:[(0,_.jsx)("div",{className:"logo-badge",children:"D"}),(0,_.jsx)("div",{className:"logo-name",children:"Dispatch"}),Ze&&Ze.length>0&&(0,_.jsxs)("div",{className:"logo-city-wrap",ref:ts,children:[(0,_.jsxs)("button",{type:"button",className:"logo-city ".concat(ss?"open":""),onClick:()=>as((e=>!e)),"aria-haspopup":"listbox","aria-expanded":ss,title:"Switch hub",children:[(0,_.jsx)(S.JFD,{}),(0,_.jsx)("span",{className:"logo-city-text",children:ws||"All locations"}),(0,_.jsx)(S.j1Q,{className:"logo-city-caret"})]}),ss&&(0,_.jsx)("div",{className:"logo-city-menu",role:"listbox",children:Ze.map((e=>{const s=String(e.applocationid)===String(Qe);return(0,_.jsxs)("button",{type:"button",role:"option","aria-selected":s,className:"logo-city-option ".concat(s?"active":""),onClick:()=>(e=>{if(B.A.info("Switching hub/location ID:",e),es(Number(e)),as(!1),"undefined"!==typeof window)try{localStorage.setItem("applocationid",String(e))}catch(s){}Ua(null),De(null),qe(null)})(e.applocationid),children:[(0,_.jsx)(S.JFD,{className:"logo-city-option-icon"}),(0,_.jsx)("span",{children:e.locationname}),s&&(0,_.jsx)("span",{className:"logo-city-option-check",children:"\u2713"})]},e.applocationid)}))})]}),(0,_.jsxs)("div",{id:"dispatch-top-tabs",className:"dtt-inline",children:[(0,_.jsxs)("button",{type:"button",className:"dtt-tab ".concat("live"===C?"active":""),onClick:()=>A("live"),children:[(0,_.jsx)("span",{className:"dtt-icon",children:(0,_.jsx)(S.Cd7,{})}),"Live"]}),(0,_.jsxs)("button",{type:"button",className:"dtt-tab ".concat("analysis"===C?"active":""),onClick:()=>A("analysis"),children:[(0,_.jsx)("span",{className:"dtt-icon",children:(0,_.jsx)(S.DX0,{})}),"Analysis"]})]})]}),(0,_.jsxs)("div",{className:"hdr-stats",children:[(()=>{const e=$a.profit<0,s=Math.abs($a.profit);return(0,_.jsxs)("span",{className:"strat-stat ".concat(e?"strat-stat-loss":"strat-stat-profit"),title:"".concat(e?"Loss":"Profit"," (").concat($a.label,")"),children:[(0,_.jsx)("span",{className:"strat-stat-icon",children:e?(0,_.jsx)(S.Rod,{}):(0,_.jsx)(S.imn,{})}),(0,_.jsx)("span",{className:"strat-stat-label",children:e?"Loss":"Profit"}),(0,_.jsxs)("span",{className:"strat-stat-value",children:[e?"-":"","\u20b9",s.toFixed(0)]})]})})(),Na&&(0,_.jsxs)(_.Fragment,{children:[ka&&(0,_.jsxs)("span",{className:"live-status",children:[(0,_.jsx)("span",{className:"live-dot"})," Loading ",Ma.length?"\xb7 ".concat(Ma.length," loaded"):""]}),!ka&&!Sa&&(0,_.jsxs)("span",{className:"live-status live-status-ready",children:[(0,_.jsx)("span",{className:"live-dot ready"})," ",za.length," orders",(0,_.jsxs)("span",{className:"live-status-sub",children:[" / ",Ma.length," total"]})]}),Sa&&(0,_.jsxs)("span",{className:"live-status live-status-error",children:[(0,_.jsx)("span",{className:"live-dot error"})," Failed to load"]}),(()=>{const e=f()().startOf("day"),s=e.format("YYYY-MM-DD"),a=f()(Ts),t=Ts===s,i=a.isAfter(e,"day"),r=s=>{if(!s)return;const a=s.format("YYYY-MM-DD");a!==Ts?s.isAfter(e,"day")||(Hs(a),Ua(null),De(null),qe(null),Vs(!1)):Vs(!1)},n=Bs.startOf("month"),l=n.subtract(n.day(),"day"),c=Array.from({length:42},((e,s)=>l.add(s,"day"))),d=!Bs.add(1,"month").startOf("month").isAfter(e,"month");return(0,_.jsxs)("div",{className:"date-chip".concat(t?" is-today":"").concat(Ys?" is-open":""),ref:Us,children:[(0,_.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>r(a.subtract(1,"day")),"aria-label":"Previous day",title:"Previous day",children:(0,_.jsx)(S.E_E,{})}),(0,_.jsxs)("button",{type:"button",className:"date-chip-main",onClick:()=>Vs((e=>!e)),"aria-haspopup":"dialog","aria-expanded":Ys,children:[(0,_.jsx)("span",{className:"date-chip-icon","aria-hidden":"true",children:(0,_.jsx)(S.dDC,{})}),(0,_.jsxs)("span",{className:"date-chip-text",children:[(0,_.jsxs)("span",{className:"date-chip-label",children:["Date",t&&(0,_.jsx)("span",{className:"date-chip-today-pill",children:"Today"})]}),(0,_.jsx)("span",{className:"date-chip-value",children:a.isValid()?a.format("ddd, MMM D, YYYY"):"\u2014"})]}),(0,_.jsx)("span",{className:"date-chip-chevron".concat(Ys?" is-open":""),"aria-hidden":"true",children:(0,_.jsx)(S.j1Q,{})})]}),(0,_.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>{t||i||r(a.add(1,"day"))},disabled:t||i,"aria-label":"Next day",title:t?"You're viewing today":"Next day",children:(0,_.jsx)(S.xVu,{})}),Ys&&(0,_.jsxs)("div",{className:"date-cal-popover",role:"dialog","aria-label":"Pick a date",children:[(0,_.jsxs)("div",{className:"date-cal-header",children:[(0,_.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>Ks((e=>e.subtract(1,"month"))),"aria-label":"Previous month",children:(0,_.jsx)(S.E_E,{})}),(0,_.jsx)("div",{className:"date-cal-title",children:Bs.format("MMMM YYYY")}),(0,_.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>{const s=Bs.add(1,"month");s.startOf("month").isAfter(e,"month")||Ks(s)},disabled:!d,"aria-label":"Next month",children:(0,_.jsx)(S.xVu,{})})]}),(0,_.jsx)("div",{className:"date-cal-weekdays",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>(0,_.jsx)("div",{className:"date-cal-weekday",children:e},e)))}),(0,_.jsx)("div",{className:"date-cal-grid",children:c.map((a=>{const t=a.month()===Bs.month(),i=a.format("YYYY-MM-DD")===Ts,n=a.format("YYYY-MM-DD")===s,l=a.isAfter(e,"day"),c=["date-cal-day",!t&&"is-other-month",i&&"is-selected",n&&"is-today",l&&"is-disabled"].filter(Boolean).join(" ");return(0,_.jsx)("button",{type:"button",className:c,disabled:l,onClick:()=>r(a),"aria-current":n?"date":void 0,"aria-pressed":i,children:a.date()},a.format("YYYY-MM-DD"))}))}),(0,_.jsxs)("div",{className:"date-cal-presets",children:[(0,_.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>r(e),children:"Today"}),(0,_.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>r(e.subtract(1,"day")),children:"Yesterday"}),(0,_.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>r(e.subtract(7,"day")),children:"\u22127 days"})]})]})]})})()]})]}),(0,_.jsx)("div",{id:"clock",children:We})]}),(a||"live"===C)&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{id:"strat-row",children:[(0,_.jsxs)("button",{className:"sbt ".concat("kitchens"===F?"active":""),onClick:()=>{B.A.info("View mode changed: By Location"),M("kitchens"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.JFD,{})})," By Location"]}),(0,_.jsxs)("button",{className:"sbt ".concat("zones"===F?"active":""),onClick:()=>{B.A.info("View mode changed: By Zone"),M("zones"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.Cd7,{})})," By Zone"]}),(0,_.jsxs)("button",{className:"sbt ".concat("riders"===F?"active":""),onClick:()=>{B.A.info("View mode changed: By Rider"),M("riders"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.bsz,{})})," By Rider"]}),(0,_.jsxs)("button",{className:"sbt ".concat("all"===F?"active":""),onClick:()=>{B.A.info("View mode changed: All Active Routes"),M("all"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.Zs6,{})}),"Active"]}),(0,_.jsxs)("button",{type:"button",className:"sbt sbt-profitability ".concat("profitability"===F?"active":""),onClick:()=>{B.A.info("View mode changed: Profitability"),M("profitability"),Ua(null),De(null),qe(null)},title:"View overall and rider profitability",children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.H4F,{})})," Profitability"]}),(0,_.jsxs)("button",{type:"button",className:"sbt sbt-rider-info ".concat("rider-info"===F?"active":""),onClick:()=>{M("rider-info"),Ua(null),De(null),qe(null)},title:"Live GPS / battery / status snapshot for a rider",children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.k4P,{})})," Rider Info"]})]}),Na&&"rider-info"!==F&&(0,_.jsxs)("div",{id:"batch-row",children:[(0,_.jsx)("span",{className:"batch-label",children:"Batch"}),(0,_.jsx)("div",{className:"batch-scroll",children:us.map((e=>{var s;const a=ja===e.id;return(0,_.jsxs)("button",{ref:a?ga:null,className:"batch-btn batch-slot ".concat(a?"active":""),onClick:()=>{fa(e.id),Ua(null),De(null),qe(null)},title:"".concat(e.label," (").concat(e.range,")"),children:[(0,_.jsx)("span",{className:"batch-btn-label",children:e.label}),(0,_.jsx)("span",{className:"batch-btn-count",children:null!==(s=Aa[e.id])&&void 0!==s?s:0})]},e.id)}))})]}),"profitability"===F?(0,_.jsx)(R,{riders:La,handleRiderFocus:Ua,focusedRider:Oa,totalDailyProfit:Pa}):"rider-info"===F?(0,_.jsxs)("div",{className:"rider-info-mode",children:[(0,_.jsxs)("div",{className:"ri-sidebar",children:[(0,_.jsxs)("div",{className:"ri-sb-head",children:[(0,_.jsx)("div",{className:"ri-sb-title",children:"Riders"}),(0,_.jsxs)("div",{className:"ri-sb-sub",children:[Ca.length," ",1===Ca.length?"rider":"riders"," today"]})]}),(0,_.jsxs)("div",{className:"ri-search",children:[(0,_.jsx)(S.gZ7,{className:"ri-search-icon"}),(0,_.jsx)("input",{type:"text",className:"ri-search-input",placeholder:"Search by name or ID",value:fs,onChange:e=>gs(e.target.value)})]}),(()=>{const e=fs.trim().toLowerCase(),s=Ca.filter((s=>!e||(String(s.riderName||"").toLowerCase().includes(e)||String(s.id).includes(e))));return 0===s.length?(0,_.jsx)("div",{className:"ri-empty",children:fs?'No riders match "'.concat(fs,'"'):"No riders have orders today"}):(0,_.jsx)("div",{className:"ri-rider-list",children:s.map((e=>{const s=String(xs)===String(e.id);return(0,_.jsxs)("button",{type:"button",className:"ri-rider-item ".concat(s?"active":""),onClick:()=>js(e.id),children:[(0,_.jsx)("span",{className:"ri-rider-dot",style:{background:Ne(e.id)}}),(0,_.jsxs)("span",{className:"ri-rider-info-block",children:[(0,_.jsx)("span",{className:"ri-rider-name",children:e.riderName}),(0,_.jsxs)("span",{className:"ri-rider-meta",children:["#",e.id]})]}),(0,_.jsx)("span",{className:"ri-rider-arrow",children:"\u2192"})]},e.id)}))})})()]}),(0,_.jsx)("div",{className:"ri-main",children:null==xs?(0,_.jsxs)("div",{className:"ri-placeholder",children:[(0,_.jsx)("div",{className:"ri-placeholder-icon",children:(0,_.jsx)(S.k4P,{})}),(0,_.jsx)("div",{className:"ri-placeholder-title",children:"Pick a rider"}),(0,_.jsx)("div",{className:"ri-placeholder-sub",children:"Select a rider from the list on the left to see their live GPS, battery, connection, and current order snapshot."})]}):(0,_.jsxs)(_.Fragment,{children:[bs&&!Ns&&(0,_.jsx)("div",{className:"ri-loading",children:"Loading rider snapshot\u2026"}),ys&&(0,_.jsxs)("div",{className:"ri-error",children:["Couldn't load this rider's log. ",(null===ks||void 0===ks?void 0:ks.message)||""]}),Ns&&(()=>{const e=Ns,s=parseFloat(e.latitude),a=parseFloat(e.longitude),t=Number.isFinite(s)&&Number.isFinite(a),i=parseInt(String(e.battery||"").replace("%",""),10),r=Number.isFinite(i)&&i<=20,n=parseFloat(e.speed),c=String(e.status||"").toLowerCase();return(0,_.jsxs)("div",{className:"ri-snapshot",children:[(0,_.jsxs)("div",{className:"ri-snap-head",children:[(0,_.jsx)("div",{className:"ri-snap-name",children:e.username||"Rider #".concat(e.userid)}),(0,_.jsxs)("div",{className:"ri-snap-meta",children:[(0,_.jsxs)("span",{children:["#",e.userid]}),e.status&&(0,_.jsx)("span",{className:"ri-status ri-status-".concat(c),children:e.status}),(0,_.jsxs)("span",{className:"ri-live ".concat(bs?"is-refetching":""),children:[(0,_.jsx)("span",{className:"ri-live-dot"}),bs?"Updating\u2026":"Live"]})]}),e.logdate&&(0,_.jsxs)("div",{className:"ri-snap-time",children:[(0,_.jsx)(S.VP9,{})," Last seen ",e.logdate]})]}),(0,_.jsxs)("div",{className:"ri-snap-grid",children:[(0,_.jsxs)("div",{className:"ri-stat ".concat(r?"ri-stat-warn":""),children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.wZm,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Battery"}),(0,_.jsxs)("div",{className:"ri-stat-value",children:[e.battery||"\u2014",e.is_charging&&(0,_.jsx)("span",{className:"ri-stat-tag",children:"Charging"})]})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.Xh5,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Connection"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.connection||"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.HPi,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"GPS Accuracy"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.accuracy?"".concat(e.accuracy," m"):"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.o8z,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Location Service"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.location_service||"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.BJM,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Speed"}),(0,_.jsx)("div",{className:"ri-stat-value",children:Number.isFinite(n)?"".concat(n.toFixed(2)," km/h"):"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.bqQ,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Heading"}),(0,_.jsx)("div",{className:"ri-stat-value",children:null!=e.heading?"".concat(e.heading,"\xb0"):"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.pSF,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"App State"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.is_background?"Background":"Foreground"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Current Order"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.orderid||"\u2014"})]})]})]}),t&&(0,_.jsxs)("div",{className:"ri-map-section",children:[(0,_.jsxs)("div",{className:"ri-coords-label",children:[(0,_.jsx)(S.gwi,{})," ",s.toFixed(6),", ",a.toFixed(6)]}),(0,_.jsx)("div",{className:"ri-map",children:(0,_.jsxs)(d.W,{center:[s,a],zoom:13,scrollWheelZoom:!1,style:{height:"100%",width:"100%"},children:[(0,_.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,_.jsxs)(l.p,{position:[s,a],children:[(0,_.jsx)(u.m,{direction:"top",offset:[0,-10],permanent:!0,className:"ri-area-banner",children:(null===_s||void 0===_s?void 0:_s.area)||"Locating area\u2026"}),(0,_.jsxs)(m.z,{children:[(0,_.jsx)("div",{style:{fontWeight:700,marginBottom:2},children:e.username||"Rider #".concat(e.userid)}),(null===_s||void 0===_s?void 0:_s.area)&&(0,_.jsx)("div",{style:{fontSize:12,color:"#0f172a",marginBottom:4},children:_s.area}),(0,_.jsx)("div",{style:{fontSize:11,color:"#64748b"},children:e.logdate?"Last seen ".concat(e.logdate):"".concat(s.toFixed(6),", ").concat(a.toFixed(6))})]})]})]},"".concat(e.userid,"-").concat(s,"-").concat(a))})]})]})})()]})})]}):(0,_.jsxs)("div",{id:"body",className:"".concat(ia?"sidebar-collapsed":""," ").concat(Gs?"compare-mode":""," ").concat(Gs&&ca?"compare-data-collapsed":"").trim(),children:[(0,_.jsx)("button",{type:"button",className:"sidebar-toggle-tab".concat(ia?" is-collapsed":""),onClick:()=>ra((e=>!e)),title:ia?"Show sidebar":"Hide sidebar","aria-label":ia?"Show sidebar":"Hide sidebar",children:ia?(0,_.jsx)(S.xVu,{}):(0,_.jsx)(S.E_E,{})}),Gs&&Oa&&(0,_.jsx)("button",{type:"button",className:"compare-data-toggle-tab".concat(ca?" is-collapsed":""),onClick:()=>da((e=>!e)),title:ca?"Show details panel":"Hide details panel","aria-label":ca?"Show details panel":"Hide details panel",children:ca?(0,_.jsx)(S.E_E,{}):(0,_.jsx)(S.xVu,{})}),(0,_.jsxs)("div",{id:"sidebar",children:[!Oa&&(0,_.jsxs)("div",{className:"sb-header",children:[(0,_.jsxs)("div",{className:"sb-header-top",children:[(0,_.jsxs)("div",{className:"sb-header-title",children:[(0,_.jsx)("span",{className:"sb-title-bar","aria-hidden":"true"}),(0,_.jsx)("span",{className:"sb-title-text",children:"RIDER DISPATCH"})]}),(0,_.jsxs)("span",{className:"sb-header-scope",title:$a.label,children:[(0,_.jsx)("span",{className:"sb-scope-dot"}),$a.label]})]}),(0,_.jsxs)("div",{className:"sb-header-tiles",children:[(0,_.jsxs)("div",{className:"sb-tile sb-tile-orders",children:[(0,_.jsx)("span",{className:"sb-tile-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsxs)("div",{className:"sb-tile-body",children:[(0,_.jsx)("div",{className:"sb-tile-value",children:$a.orders}),(0,_.jsx)("div",{className:"sb-tile-label",children:1===$a.orders?"Order":"Orders"})]})]}),(0,_.jsxs)("div",{className:"sb-tile sb-tile-riders",children:[(0,_.jsx)("span",{className:"sb-tile-icon",children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{className:"sb-tile-body",children:[(0,_.jsx)("div",{className:"sb-tile-value",children:$a.riders}),(0,_.jsx)("div",{className:"sb-tile-label",children:1===$a.riders?"Rider":"Riders"})]})]})]})]}),Oa||Ee?(0,_.jsxs)("div",{id:"route-detail",children:[(0,_.jsxs)("button",{className:"rd-back",onClick:()=>{Ua(null),De(null)},children:["\u2190 Back to ",Le?Le.name:"list"]}),Oa?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"rd-rider-name",style:{color:Oa.color},children:Oa.riderName}),(()=>{const e=Oa.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),s=Oa.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),a=s<0;return(0,_.jsxs)("div",{className:"rd-stats-grid",children:[(0,_.jsxs)("div",{className:"rd-stat rd-stat-orders",children:[(0,_.jsx)("div",{className:"rd-stat-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsx)("div",{className:"rd-stat-value",children:Oa.orders.length}),(0,_.jsx)("div",{className:"rd-stat-label",children:"Orders"})]}),(0,_.jsxs)("div",{className:"rd-stat rd-stat-distance",children:[(0,_.jsx)("div",{className:"rd-stat-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsxs)("div",{className:"rd-stat-value",children:[e.toFixed(1),(0,_.jsx)("span",{className:"rd-stat-unit",children:"km"})]}),(0,_.jsx)("div",{className:"rd-stat-label",children:"Distance"})]}),(0,_.jsxs)("div",{className:"rd-stat rd-stat-profit ".concat(a?"is-loss":"is-gain"),children:[(0,_.jsx)("div",{className:"rd-stat-icon",children:a?(0,_.jsx)(S.Rod,{}):(0,_.jsx)(S.imn,{})}),(0,_.jsxs)("div",{className:"rd-stat-value",children:[a?"-":"","\u20b9",Math.abs(s).toFixed(0)]}),(0,_.jsx)("div",{className:"rd-stat-label",children:a?"Loss":"Profit"})]})]})})(),(()=>{const e={};Oa.orders.forEach((s=>{const a=s.trip_number||1;e[a]||(e[a]=[]),e[a].push(s)}));const s=[...Oa.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)})),a=s?s.orderid:null,t=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=f()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER},i="time"===Oe;let n=null;return Object.entries(e).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,l]=e;const c=i?[...l].sort(((e,s)=>{const a=t(e)-t(s);return 0!==a?a:(e.step||0)-(s.step||0)})):l;return(0,_.jsxs)("div",{className:"trip-block",children:[(0,_.jsxs)("div",{className:"trip-header",style:{background:"".concat(Oa.color,"12"),borderColor:"".concat(Oa.color,"30")},children:[(0,_.jsxs)("span",{className:"th-badge",style:{background:Oa.color},children:["Trip ",s]}),(0,_.jsxs)("span",{className:"trip-stats",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),l.length," stops"]}),(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),l.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]})]}),(0,_.jsxs)("div",{className:"trip-sort-toggle",role:"group","aria-label":"Sort stops by","data-mode":i?"time":"planned",children:[(0,_.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"":"is-active"),"aria-pressed":!i,onClick:()=>Te("planned"),title:"Sort stops by planned step (dispatched order)",children:[(0,_.jsx)(S.EgJ,{"aria-hidden":"true"}),(0,_.jsx)("span",{children:"Planned"})]}),(0,_.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"is-active":""),"aria-pressed":i,onClick:()=>Te("time"),title:"Sort stops by completion time (which delivery was done first)",children:[(0,_.jsx)(S.VP9,{"aria-hidden":"true"}),(0,_.jsx)("span",{children:"By time"})]})]})]}),(0,_.jsx)("div",{className:"zone-order-grid",children:c.map(((e,t)=>{const l=(e.kitchen_key||e.pickupcustomer||"Unknown").toLowerCase().trim(),c=null!==n&&l!==n;n=l;const d=Re&&Re.orderid===e.orderid,o=a&&e.orderid===a,u=parseFloat(e.droplat||e.deliverylat),m=parseFloat(e.droplon||e.deliverylong),p=Number.isFinite(u)&&Number.isFinite(m),h=(0,I.Cx)(e.orderstatus),v=parseFloat(e.profit||0),x=v<0,f=ot(Oa.id,e),g=e.step||t+1,N=i&&!e.deliverytime;return(0,_.jsxs)(r.Fragment,{children:[c&&(0,_.jsxs)("div",{className:"kitchen-transition",children:[(0,_.jsx)("span",{className:"kt-ico",children:(0,_.jsx)(S.$G1,{})})," Switch to ",(0,_.jsx)("strong",{children:e.pickupcustomer})]}),(0,_.jsxs)("div",{className:"zone-order-card ".concat(p?"clickable":""," ").concat(d?"active":""," ").concat(o?"going-on":""," ").concat(N?"is-pending-time":""),role:p?"button":void 0,tabIndex:p?0:void 0,onClick:p?()=>Ie(d?null:{orderid:e.orderid,lat:u,lon:m}):void 0,onKeyDown:p?s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),Ie(d?null:{orderid:e.orderid,lat:u,lon:m}))}:void 0,title:p?d?"Click to show full trip":"Show ".concat(e.deliverycustomer||"order #".concat(e.orderid)," on map"):void 0,children:[(0,_.jsxs)("div",{className:"zone-order-card-head",children:[(0,_.jsx)("div",{className:"zone-order-num",title:"Planned step ".concat(e.step||t+1),children:g}),(0,_.jsx)("div",{className:"zone-order-id-block",children:(0,_.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]})}),(()=>{const s=ve(e.deliverytime),a=ve(e.expecteddeliverytime),t=!I.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==f;return e.orderstatus||s||a||t?(0,_.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,_.jsx)("span",{className:"zone-order-status",style:{background:h.bg,color:h.fg},children:h.label}),(s||a)&&(0,_.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,_.jsx)(S.VP9,{}),s||a]}),t&&(0,_.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,_.jsx)(S.HPi,{}),ut(f)]})]}):null})(),j&&(0,_.jsx)("button",{type:"button",className:"zone-order-change-rider",title:"Change rider",onClick:s=>{s.stopPropagation(),j(e,Oa)},children:(0,_.jsx)(S.$G1,{})})]}),(0,_.jsxs)("div",{className:"zone-order-customer",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,_.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),e.deliverysuburb||W(e.deliveryaddress)]}),e.ordernotes&&(0,_.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.dKO,{})}),e.ordernotes]}),(0,_.jsxs)("div",{className:"zone-order-stats",children:[(0,_.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,_.jsxs)("span",{className:"zone-order-chip ".concat(x?"is-loss":"is-profit"),title:"Profit",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),x?"-":"","\u20b9",Math.abs(v).toFixed(0)]}),null!=e.deliverycharge&&(0,_.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,_.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,_.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||s," \xb7 S",e.step||t+1]})]})]})]},e.orderid)}))})]},s)}))})()]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"rd-rider-name",style:{color:"#f59e0b"},children:Ee.kitchenName}),(0,_.jsxs)("div",{className:"rd-rider-sub",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gsJ,{})}),Ee.orders.length," orders"]}),(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.aVM,{})}),Ee.riders.size," riders"]})]}),(0,_.jsxs)("div",{className:"zone-detail-section",children:[(0,_.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,_.jsxs)("span",{className:"section-count",children:["(",Ee.orders.length,")"]})]}),0===Ee.orders.length?(0,_.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders for this kitchen."}):(0,_.jsx)("div",{className:"zone-order-grid",children:Ee.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),r=Re&&Re.orderid===e.orderid,n=(0,I.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?La.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?ot(d,e):null;return(0,_.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(r?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Ie(r?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,_.jsxs)("div",{className:"zone-order-card-head",children:[(0,_.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,_.jsxs)("div",{className:"zone-order-id-block",children:[(0,_.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,_.jsxs)("div",{className:"zone-order-rider",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ve(e.deliverytime),a=ve(e.expecteddeliverytime),t=!I.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,_.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,_.jsx)("span",{className:"zone-order-status",style:{background:n.bg,color:n.fg},children:n.label}),(s||a)&&(0,_.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,_.jsx)(S.VP9,{}),s||a]}),t&&(0,_.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,_.jsx)(S.HPi,{}),ut(p)]})]}):null})()]}),(0,_.jsxs)("div",{className:"zone-order-customer",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,_.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),e.deliverysuburb||W(e.deliveryaddress)]}),e.ordernotes&&(0,_.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.dKO,{})}),e.ordernotes]}),(0,_.jsxs)("div",{className:"zone-order-stats",children:[(0,_.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,_.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,_.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,_.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,_.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]})]}):Le?(0,_.jsxs)("div",{id:"route-detail",children:[(0,_.jsx)("button",{className:"rd-back",onClick:()=>qe(null),children:"\u2190 Back to zones"}),(0,_.jsx)("div",{className:"rd-rider-name",style:{color:"#3b82f6"},children:Le.name}),(0,_.jsx)("div",{className:"rd-rider-sub",children:(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gsJ,{})}),Le.totalOrders," ",1===Le.totalOrders?"order":"orders"]})}),(0,_.jsxs)("div",{className:"zone-detail-section",children:[(0,_.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,_.jsxs)("span",{className:"section-count",children:["(",Le.orders.length,")"]})]}),0===Le.orders.length?(0,_.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders in this zone."}):(0,_.jsx)("div",{className:"zone-order-grid",children:Le.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),r=Re&&Re.orderid===e.orderid,n=(0,I.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?La.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?ot(d,e):null;return(0,_.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(r?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Ie(r?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,_.jsxs)("div",{className:"zone-order-card-head",children:[(0,_.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,_.jsxs)("div",{className:"zone-order-id-block",children:[(0,_.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,_.jsxs)("div",{className:"zone-order-rider",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ve(e.deliverytime),a=ve(e.expecteddeliverytime),t=!I.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,_.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,_.jsx)("span",{className:"zone-order-status",style:{background:n.bg,color:n.fg},children:n.label}),(s||a)&&(0,_.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,_.jsx)(S.VP9,{}),s||a]}),t&&(0,_.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,_.jsx)(S.HPi,{}),ut(p)]})]}):null})()]}),(0,_.jsxs)("div",{className:"zone-order-customer",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,_.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),e.deliverysuburb||W(e.deliveryaddress)]}),e.ordernotes&&(0,_.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.dKO,{})}),e.ordernotes]}),(0,_.jsxs)("div",{className:"zone-order-stats",children:[(0,_.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,_.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,_.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,_.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,_.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]}):(0,_.jsxs)("div",{id:"riders-panel",children:[!(Ta&&0===Ka)&&(0,_.jsx)("div",{className:"ph",children:"zones"===F?"Zone dispatch":"kitchens"===F?"Kitchen dispatch":Ta?"Active rider dispatch":"Rider dispatch"}),(0,_.jsx)("div",{id:"rider-cards",children:0!==Ra.length||ka?"zones"===F?Da.map(((e,s)=>{const a=e.statusCounts.delivered||0,t=e.totalProfit<0;return(0,_.jsxs)("div",{className:"rcard zone-card",onClick:()=>qe(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,_.jsxs)("div",{className:"zone-card-header",children:[(0,_.jsx)("div",{className:"zone-card-emoji",children:(0,_.jsx)(S.Cd7,{})}),(0,_.jsxs)("div",{className:"zone-card-titles",children:[(0,_.jsx)("div",{className:"zone-card-name",children:e.name}),(0,_.jsxs)("div",{className:"zone-card-sub",children:[e.activeRidersCount," ",1===e.activeRidersCount?"rider":"riders"," \xb7 ",e.totalOrders," ",1===e.totalOrders?"order":"orders"]})]}),(0,_.jsx)("span",{className:"zone-card-arrow","aria-hidden":"true",children:"\u2192"})]}),e.totalOrders>0&&(0,_.jsxs)("div",{className:"zone-progress-row",children:[(0,_.jsx)("div",{className:"zone-status-bar",title:Object.entries(e.statusCounts).map((e=>{let[s,a]=e;return"".concat((0,I.Cx)(s).label,": ").concat(a)})).join(" \xb7 "),children:Object.entries(e.statusCounts).map((s=>{let[a,t]=s;const i=(0,I.Cx)(a),r=t/e.totalOrders*100;return(0,_.jsx)("div",{className:"zone-status-seg",style:{width:"".concat(r,"%"),background:i.bg}},a)}))}),(0,_.jsxs)("div",{className:"zone-progress-label",children:[a,"/",e.totalOrders]})]}),(0,_.jsxs)("div",{className:"zone-stat-pills",children:[(0,_.jsxs)("span",{className:"zone-stat-pill",title:"Areas covered",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.gwi,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:e.suburbs.length}),(0,_.jsx)("span",{className:"zone-stat-label",children:1===e.suburbs.length?"area":"areas"})]}),(0,_.jsxs)("span",{className:"zone-stat-pill",title:"Total distance",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:e.totalKms.toFixed(1)}),(0,_.jsx)("span",{className:"zone-stat-label",children:"km"})]}),(0,_.jsxs)("span",{className:"zone-stat-pill",title:"Kitchens",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.NtI,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:e.kitchens.length}),(0,_.jsx)("span",{className:"zone-stat-label",children:1===e.kitchens.length?"kitchen":"kitchens"})]}),(0,_.jsxs)("span",{className:"zone-stat-pill ".concat(t?"profit-negative":"profit-positive"),title:"Total profit",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.ohY,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:t?"-\u20b9".concat(Math.abs(e.totalProfit).toFixed(0)):"\u20b9".concat(e.totalProfit.toFixed(0))})]})]}),e.suburbs.length>0&&(0,_.jsxs)("div",{className:"zone-card-suburbs",children:[(0,_.jsx)("span",{className:"zone-card-suburbs-text",children:e.suburbs.slice(0,3).map((e=>e.name)).join(" \xb7 ")}),e.suburbs.length>3&&(0,_.jsxs)("span",{className:"zone-card-suburbs-more",children:["+",e.suburbs.length-3]})]})]},e.id)})):"kitchens"===F?qa.map(((e,s)=>(0,_.jsxs)("div",{className:"rcard",onClick:()=>De(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,_.jsxs)("div",{className:"rcard-top",children:[(0,_.jsx)("div",{className:"rcard-emo",style:{background:"#f59e0b18",borderColor:"#f59e0b50",color:"#f59e0b"},children:(0,_.jsx)(S.NtI,{})}),(0,_.jsxs)("div",{className:"rcard-info",children:[(0,_.jsx)("div",{className:"rcard-name",children:e.kitchenName}),(0,_.jsxs)("div",{className:"rcard-zone",children:[e.riders.size," riders \xb7 ",(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,_.jsx)("div",{className:"rcard-badge",style:{background:"#f59e0b18",color:"#f59e0b"},children:e.orders.length})]}),(0,_.jsx)("div",{className:"bar-bg",children:(0,_.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,e.orders.length/20*100),"%"),background:"#f59e0b"}})}),(0,_.jsxs)("div",{className:"rcard-meta",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),(0,_.jsxs)("span",{children:[e.riders.size," riders"]})]}),(0,_.jsx)("div",{className:"step-ids",children:Array.from(e.riders).slice(0,10).map((e=>{var s;return(0,_.jsx)("span",{className:"step-id",style:{color:dt(e)},children:null===(s=La.find((s=>s.id===e)))||void 0===s?void 0:s.riderName.split(" ")[0]},e)}))})]},e.id))):Ta?(0,_.jsx)(O,{visibleRiders:Va,riders:La,focusedStop:Re,handleRiderFocus:Ua,setFocusedStop:Ie,calculateEstMeters:ot,getRiderColor:dt,formatMeters:ut}):Va.map(((e,s)=>{var a;const t=e.orders.length,i=e.orders.filter((e=>I.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,r=t>0&&i>=t,n=e.orders.find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)})),l=n?ot(e.id,n):null;return(0,_.jsxs)("div",{className:"rcard",onClick:()=>Ua(e),style:{animationDelay:"".concat(.05*s,"s"),borderLeft:"3px solid ".concat(e.color)},children:[(0,_.jsxs)("div",{className:"rcard-top",children:[(0,_.jsx)("div",{className:"rcard-emo",style:{background:"#f1f5f9",borderColor:"#e2e8f0",color:"#64748b"},children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{className:"rcard-info",children:[(0,_.jsx)("div",{className:"rcard-name",children:e.riderName}),(0,_.jsxs)("div",{className:"rcard-zone",children:[(null===(a=e.orders[0])||void 0===a?void 0:a.zone_name)||ws||"Local"," \xb7 ",new Set(e.orders.map((e=>e.trip_number||1))).size," trips"]})]}),(0,_.jsxs)("div",{className:"rcard-badge ".concat(r?"is-done":""),style:r?void 0:{background:"#f1f5f9",color:"#475569"},title:"".concat(i," delivered of ").concat(t," total"),children:[i,"/",t]})]}),(0,_.jsx)("div",{className:"bar-bg",children:(0,_.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,t/15*100),"%"),background:e.color}})}),(0,_.jsxs)("div",{className:"rcard-meta",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),null!==l&&(0,_.jsxs)("span",{className:"rcard-est-meters",title:"Estimated distance to next drop location",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.HPi,{})}),ut(l)," to drop"]}),(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,_.jsx)("div",{className:"step-ids",children:e.orders.slice(0,15).map((e=>(0,_.jsxs)("span",{className:"step-id",children:["S",e.step]},e.orderid)))})]},e.id)})):(e=>{const s=null===(e=us.find((e=>e.id===ja)))||void 0===e?void 0:e.label,a=Na&&Ma.length>0;return(0,_.jsxs)("div",{className:"empty-slot",children:[(0,_.jsx)("div",{className:"empty-slot-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsx)("div",{className:"empty-slot-title",children:s?"No orders in ".concat(s):"No orders"}),(0,_.jsx)("div",{className:"empty-slot-sub",children:a?"".concat(Ma.length," order").concat(1===Ma.length?"":"s"," exist in other slots today"):"No deliveries found for this date"})]})})()})]})]}),(0,_.jsxs)("div",{id:"map-wrap",className:"".concat("kitchens"===F?"view-mode-kitchens":""," ").concat(Gs?"compare-split":"").trim(),children:[(0,_.jsxs)(d.W,{center:[11.022,76.982],zoom:12,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},zoomControl:!1,renderer:pa.current,inertia:!0,inertiaDeceleration:2400,inertiaMaxSpeed:2e3,wheelDebounceTime:20,wheelPxPerZoomLevel:80,zoomSnap:.25,children:[(0,_.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,_.jsx)(p.p,{position:"bottomright"}),Gs&&(0,_.jsx)(oe,{targetRef:ma}),(0,_.jsx)(ue,{trigger:"".concat(ia,"|").concat(Gs,"|").concat(ca)}),(0,_.jsx)(be,{focusedItem:it||(Oa||Ee)&&Re||Oa||Ee||Le,viewMode:F,orders:Ha,kitchens:qa,locationKey:Qe,extraPoints:Ba}),qa.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).filter((e=>!Oa||e.riders.has(Oa.id))).map(((e,s)=>(0,_.jsx)(l.p,{position:[e.lat,e.lon],icon:ct(e.kitchenName,(null===Ee||void 0===Ee?void 0:Ee.id)===e.id),zIndexOffset:(null===Ee||void 0===Ee?void 0:Ee.id)===e.id?4e3:2e3,eventHandlers:{click:()=>De(e),mouseover:e=>e.target.openPopup(),mouseout:e=>e.target.closePopup()},children:(0,_.jsxs)(m.z,{className:"kitchen-popup",maxWidth:220,minWidth:200,autoPan:!0,autoPanPadding:[20,20],children:[(0,_.jsx)("div",{className:"kp-header",children:"KITCHEN"}),(0,_.jsx)("div",{className:"kp-name",children:e.kitchenName}),(0,_.jsxs)("div",{className:"kp-stat",children:[(0,_.jsx)("span",{className:"kp-stat-lbl",children:"Orders"}),(0,_.jsx)("span",{className:"kp-stat-val",children:e.orders.length})]})]})},"k-".concat(s)))),(()=>{if(Gs&&Oa&&"actual"===Ws)return null;let e=Ra;Le&&(e=Le.orders),Ee&&(e=Ee.orders),Oa&&(e=Oa.orders),e=e.filter($);const s=Gs&&Oa?new Map(Qa.map((e=>[String(e.deliveryid),e.sequenceStep]))):null;return e.map(((a,t)=>{const i=a.rider_id,r=!i||Ce.has(i);let n,c=dt(i);if(s&&i===Oa.id&&null!=a.deliveryid){const e=s.get(String(a.deliveryid));e&&(c=(0,I.gM)(e-1),n=e)}const d=!!Oa||!!Ee,o=(0,I.Cx)(a.orderstatus),u="delivered"===String(a.orderstatus||"").toLowerCase(),m=x&&String(x)===String(a.orderid),p=a.orderstatus?'\n \n \n ').concat(u?'':"","\n "):"",h=d?(()=>{const s=n||a.step||e.indexOf(a)+1,t=32;return v().divIcon({className:"",iconSize:[t,t],iconAnchor:[16,16],popupAnchor:[0,-28],html:'
9?12:14,"px;opacity:").concat(r?1:.75,'">').concat(s>0?s:"").concat(p,"
")})})():v().divIcon({className:"",iconSize:[24,30],iconAnchor:[2,30],popupAnchor:[10,-25],html:'
').concat(p,"
")});return(0,_.jsx)(l.p,{position:[parseFloat(a.droplat||a.deliverylat),parseFloat(a.droplon||a.deliverylong)],icon:h,zIndexOffset:i?100:0,ref:e=>{e?He.current[String(a.orderid)]=e:delete He.current[String(a.orderid)]},eventHandlers:{click:()=>{const e=String(a.orderid);Ye.current.has(e)?(Ye.current.delete(e),Ge(null)):(Ye.current.add(e),Ge(a))}}},"".concat(a.orderid,"-").concat(d?"num":"flag"))}))})(),(()=>{const e=Gs&&Oa&&"actual"===Ws;if(Es)return e?[]:Ls.map(((e,s)=>(0,_.jsx)(c.R,{positions:[e.from,e.to],pathOptions:{color:e.color,weight:6,opacity:.9,lineJoin:"round",lineCap:"round"}},s)));const s=[],a=Le?new Set(Le.riders.map((e=>String(e.rider_id)))):null;return e||Va.forEach((e=>{const t=Ce.has(e.id);if(Oa&&Oa.id!==e.id)return;if(Ee&&!Ee.riders.has(e.id))return;if(a&&!a.has(String(e.id)))return;const i=Ta?(0,I.d1)(e.orders):null,n=Ta?i?[i]:[]:e.orders;if(Ta&&0===n.length)return;const l={};n.forEach((e=>{const s=e.trip_number||1;l[s]||(l[s]=[]),l[s].push(e)})),Object.entries(l).forEach((a=>{let[i,n]=a;const l=Ee?n.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===Ee.id)):n;if(0===l.length)return;const d=[...n].sort(((e,s)=>(e.step||0)-(s.step||0))),o=je(d),u=fe(e.id,i,o),m=Fs[u],p=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),h=Ta?p[0]:null;let v=null;if(Ta&&h){const s=va.find((s=>String(s.id)===String(e.id))),a=s&&Number.isFinite(s.lat)&&Number.isFinite(s.lon)?[s.lat,s.lon]:Q(h)?[J(Z(h)),J(X(h))]:null,t=J(h.droplat||h.deliverylat),i=J(h.droplon||h.deliverylong);a&&Number.isFinite(t)&&Number.isFinite(i)&&(v=[a,[t,i]])}const x=Ta?h&&v?Fs[fe(e.id,"active-".concat(h.orderid),v)]:void 0:m,j=Array.isArray(x)&&x.length>=2,f=!1===x;if(!Ta&&!j&&!f)return;const g=j?x:Ta?v:je(p);if(!g||g.length<2)return;const N=t?1:.1,b="kitchens"===F||Ee?7:6,y=Gs&&Oa&&e.id===Oa.id,k=f?"8 6":y&&"combined"===Ws?"6 5":void 0;if(Gs&&Oa&&e.id===Oa.id){const a=new Map(Qa.map((e=>[String(e.deliveryid),e.sequenceStep]))),t=p.filter($),r=t.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));let n;if(j)n=he(g,r);else{const e=g.length>r.length;n=[];for(let s=0;s=g.length||t>=g.length?n.push([]):n.push([g[a],g[t]])}}const l="combined"===Ws?5:0;return s.push((0,_.jsx)(c.R,{positions:g,pathOptions:{color:"#ffffff",weight:b+4,opacity:.5*N,lineJoin:"round",lineCap:"round",offset:l}},"".concat(e.id,"-").concat(i,"-halo"))),void n.forEach(((r,n)=>{if(!r||r.length<2)return;const d=t[n],o=d?a.get(String(d.deliveryid)):null,u="combined"===Ws?U:o?(0,I.gM)(o-1):e.color,m=null!=oa&&oa===o,p=m?b+1.5:b,h=m?1:oa?.5*N:N;s.push((0,_.jsx)(c.R,{positions:r,pathOptions:{color:u,weight:p,opacity:h,lineJoin:"round",lineCap:"round",dashArray:k,offset:l}},"".concat(e.id,"-").concat(i,"-step-").concat(n,"-").concat((null===d||void 0===d?void 0:d.deliveryid)||n)))}))}s.push((0,_.jsxs)(r.Fragment,{children:[(0,_.jsx)(c.R,{positions:g,pathOptions:{color:"#ffffff",weight:b+4,opacity:.5*N,lineJoin:"round",lineCap:"round"}}),(0,_.jsx)(c.R,{positions:g,pathOptions:{color:e.color,weight:b,opacity:N,lineJoin:"round",lineCap:"round",dashArray:k}})]},"".concat(e.id,"-").concat(i)))}))})),s})(),va.filter((e=>Ta?"active"===e.status&&Ya.has(String(e.id)):La.some((s=>String(s.id)===String(e.id))))).filter((e=>!Oa||String(Oa.id)===String(e.id))).map((e=>{var s;const a="active"===e.status,t=a?"#16a34a":"#dc2626",r=La.find((s=>String(s.id)===String(e.id))),n=null===r||void 0===r||null===(s=r.orders)||void 0===s?void 0:s.slice().sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)})),c=n?n.deliverysuburb||W(n.deliveryaddress):null,d=(e.username||"").replace(/[<>&"']/g,""),o=e.orderid?String(e.orderid).replace(/[<>&"']/g,""):"",u="".concat(Ta?"bike":"pin","|").concat(t,"|").concat(d,"|").concat(o,"|").concat(a?1:0);let p=Be.current.get(e.id);if(!p||p.sig!==u){p={sig:u,icon:Ta?v().divIcon({className:"",iconSize:[160,44],iconAnchor:[22,22],popupAnchor:[0,-22],html:'
\n \n \n \n \n ').concat(d).concat(o?" #".concat(o,""):"","\n
")}):v().divIcon({className:"",iconSize:[140,56],iconAnchor:[12,41],popupAnchor:[58,-40],html:'
\n
\n
').concat(d).concat(o?" #".concat(o,""):"","
\n
")})},Be.current.set(e.id,p)}const h=p.icon,x={click:s=>{const a=String(e.id);Ve.current.has(a)?(Ve.current.delete(a),s.target.closePopup()):(Ve.current.add(a),s.target.openPopup());const t=La.find((e=>String(e.id)===a));t&&Ua(t)},popupclose:()=>{Ve.current.delete(String(e.id))}},j=Ta?ye:l.p,g=Ta?{target:[e.lat,e.lon],duration:15e3}:{position:[e.lat,e.lon]};return(0,_.jsx)(j,(0,i.A)((0,i.A)({},g),{},{icon:h,zIndexOffset:2500,eventHandlers:x,children:(0,_.jsxs)(m.z,{maxWidth:260,autoPan:!0,autoPanPadding:[20,20],className:"dispatch-popup live-rider-popup",children:[(0,_.jsx)("div",{className:"pu-hdr-live",children:(0,_.jsxs)("div",{className:"pu-hdr-left",children:[(0,_.jsx)("span",{className:"pu-live-indicator",style:{"--pulse-color":t},children:(0,_.jsx)("span",{className:"pu-live-dot"})}),(0,_.jsx)("span",{className:"pu-hdr-title",children:"LIVE GPS"})]})}),(0,_.jsxs)("div",{className:"pu-rider-profile",children:[(0,_.jsx)("div",{className:"pu-avatar",style:{backgroundColor:"".concat(t,"12"),color:t},children:(0,_.jsx)(S.bsz,{})}),(0,_.jsxs)("div",{className:"pu-rider-info-text",children:[(0,_.jsxs)("div",{className:"pu-rider-name-row",children:[(0,_.jsx)("span",{className:"pu-rider-name",children:e.username||"Rider #".concat(e.id)}),e.status&&(0,_.jsx)("span",{className:"pu-status-badge ".concat("active"===e.status.toLowerCase()?"active":"idle"),children:e.status})]}),(0,_.jsxs)("div",{className:"pu-rider-meta",children:["Rider ID: #",e.id]})]})]}),(0,_.jsxs)("div",{className:"pu-body-content",children:[e.orderid&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Active Order"}),(0,_.jsxs)("span",{className:"pu-info-value pu-order-badge",children:["#",e.orderid]})]}),n&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Next Stop"}),(0,_.jsxs)("span",{className:"pu-info-value",style:{color:"#4f46e5"},children:["#",n.step||"?"," \xb7 ",n.deliverycustomer||"\u2014"]})]}),c&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Next Location"}),(0,_.jsx)("span",{className:"pu-info-value",title:n.deliveryaddress||c,children:c})]}),(null===n||void 0===n?void 0:n.pickupcustomer)&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Pickup"}),(0,_.jsx)("span",{className:"pu-info-value",title:n.pickupcustomer,children:n.pickupcustomer})]}),e.contactno&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Phone"}),(0,_.jsx)("a",{href:"tel:".concat(e.contactno),className:"pu-info-value pu-phone-link",children:e.contactno})]}),e.logdate&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Last Seen"}),(0,_.jsxs)("span",{className:"pu-info-value pu-time-stamp",children:[(0,_.jsx)(S.VP9,{className:"inline-icon"})," ",f()(e.logdate).isValid()?f()(e.logdate).format("hh:mm:ss A"):e.logdate]})]}),(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Position"}),(0,_.jsxs)("span",{className:"pu-info-value pu-coordinates",children:[e.lat.toFixed(5),", ",e.lon.toFixed(5)]})]})]})]})}),"live-".concat(e.id))})),Gs&&Oa&&"planned"!==Ws&&Qa.map(((e,s)=>{var a,t;if(0===e.coords.length)return null;const i=(0,I.gM)(s),n="combined"===Ws?G:i,d=[e.coords[0].lat,e.coords[0].lng],o=[e.coords[e.coords.length-1].lat,e.coords[e.coords.length-1].lng],m=As[e.deliveryid],p=Array.isArray(m)&&m.length>=2?m:e.coords.map((e=>[e.lat,e.lng]));let h=p,x=!0;if(Es){const s=Rs[e.sequenceStep]||0;s<2?x=!1:h=p.slice(0,Math.min(s,p.length))}const j=oa===e.sequenceStep,g=String(e.orderstatus||"").toLowerCase(),N=I.Ys.has(g),b=I.yP.has(g),y=et.find((s=>s.sequenceStep===e.sequenceStep)),k=!(null===y||void 0===y||!y.anomaly),w=null===Oa||void 0===Oa||null===(a=Oa.orders)||void 0===a?void 0:a.find((s=>null!=s.deliveryid&&String(s.deliveryid)===String(e.deliveryid))),F=(0,I.Cx)(e.orderstatus),M=(e.orderstatus&&'\n \n \n ').concat(N?'':"","\n "),["compare-step-pin"]);j&&M.push("is-focused"),N&&M.push("is-delivered"),b&&M.push("is-skipped"),k&&M.push("is-anomaly");const C='
')+''.concat(e.sequenceStep,"")+(N?'':"")+"
",A=v().divIcon({className:"",iconSize:[36,36],iconAnchor:[18,18],popupAnchor:[0,-22],html:C}),z=1===e.sequenceStep,P=z?v().divIcon({className:"",iconSize:[40,40],iconAnchor:[20,20],html:'
')+'
'}):null,E="combined"===Ws?-5:0;return(0,_.jsxs)(r.Fragment,{children:[x&&(0,_.jsx)(c.R,{positions:h,pathOptions:{color:"#ffffff",weight:j?11:9,opacity:j?.75:.55,lineJoin:"round",lineCap:"round",offset:E}}),x&&(0,_.jsx)(c.R,{positions:h,pathOptions:{color:n,weight:j?6.5:5,opacity:j?1:oa?.55:.95,lineJoin:"round",lineCap:"round",offset:E}}),z&&(0,_.jsx)(l.p,{position:d,icon:P,zIndexOffset:j?900:100,eventHandlers:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),ua((s=>s===e.sequenceStep?null:e.sequenceStep))}},children:(0,_.jsx)(u.m,{direction:"top",offset:[0,-12],opacity:1,className:"compare-tooltip",children:(0,_.jsxs)("div",{className:"cmp-tip",children:[(0,_.jsxs)("div",{className:"cmp-tip-header",children:[(0,_.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:(0,_.jsx)(S.zPd,{})}),(0,_.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,_.jsx)("div",{className:"cmp-tip-title",children:e.pickupcustomer||"Pickup"}),(0,_.jsx)("div",{className:"cmp-tip-sub",children:null!==(t=e.coords[0])&&void 0!==t&&t.logdate?"Picked up \xb7 ".concat(f()(e.coords[0].logdate).format("hh:mm A")):"Rider trip origin"})]})]}),(0,_.jsx)("div",{className:"cmp-tip-action",children:"Click for step 1 details"})]})})}),(0,_.jsx)(l.p,{position:o,icon:A,zIndexOffset:j?1e3:200,eventHandlers:w?{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),ua((s=>s===e.sequenceStep?null:e.sequenceStep)),Ke.current&&(clearTimeout(Ke.current),Ke.current=null);const a=String(w.orderid);Ye.current.has(a)?(Ye.current.delete(a),Ge(null)):(Ye.current.add(a),Ge(w))}}:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),ua((s=>s===e.sequenceStep?null:e.sequenceStep)),w&&s.target&&"function"===typeof s.target.openPopup&&s.target.openPopup()}},children:!w&&(0,_.jsx)(u.m,{direction:"top",offset:[0,-20],opacity:1,className:"compare-tooltip",children:(()=>{const s=(0,I.Cx)(e.orderstatus);return(0,_.jsxs)("div",{className:"cmp-tip",children:[(0,_.jsxs)("div",{className:"cmp-tip-header",children:[(0,_.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:e.sequenceStep}),(0,_.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,_.jsx)("div",{className:"cmp-tip-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,_.jsx)("div",{className:"cmp-tip-sub",children:e.deliverytime?"Delivered ".concat(f()(e.deliverytime).format("hh:mm A")):"".concat(e.coords.length," GPS pings")})]}),e.orderstatus&&(0,_.jsx)("span",{className:"cmp-tip-tag",style:{background:s.bg,color:s.fg},children:s.label})]}),k&&(0,_.jsx)("div",{className:"cmp-tip-anomaly",children:"Deviation flagged \u2014 see details below"}),(0,_.jsx)("div",{className:"cmp-tip-action",children:j?"Click to deselect":"Click for details"})]})})()})})]},"actual-".concat(e.deliveryid))}))]}),Gs&&Oa&&(0,_.jsxs)("div",{className:"compare-view-switcher",role:"group","aria-label":"Compare view layer",children:[(0,_.jsx)("button",{type:"button",className:"actual"===Ws?"is-active":"",onClick:()=>$s("actual"),title:"Show only the rider's actual GPS trail",children:"Actual"}),(0,_.jsx)("button",{type:"button",className:"planned"===Ws?"is-active":"",onClick:()=>$s("planned"),title:"Show only the dispatched planned route",children:"Planned"}),(0,_.jsx)("button",{type:"button",className:"combined"===Ws?"is-active":"",onClick:()=>$s("combined"),title:"Overlay planned (dashed) and actual (solid) on one map",children:"Combined"})]}),(0,_.jsx)("div",{id:"ov-tl"}),(0,_.jsxs)("div",{id:"ov-br",children:[(0,_.jsxs)("button",{className:"sbt ".concat(Es?"active":""),onClick:()=>{if(Es)return Ds(!1),qs([]),void Is({});Ds(!0),qs([]),Is({});const e=Gs&&Oa,s=e?new Map(Qa.map((e=>[String(e.deliveryid),e.sequenceStep]))):null,a=[];if(La.forEach((t=>{if(!Ce.has(t.id))return;if(Oa&&Oa.id!==t.id)return;if(Ee&&!Ee.riders.has(t.id))return;const i={};t.orders.forEach((e=>{const s=e.trip_number||1;i[s]||(i[s]=[]),i[s].push(e)})),Object.entries(i).forEach((i=>{let[r,n]=i;const l=Ee?n.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===Ee.id)):n;if(0===l.length)return;const c=[...n].sort(((e,s)=>(e.step||0)-(s.step||0))),d=je(c),o=fe(t.id,r,d),u=Fs[o],m=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),p=je(m),h="kitchens"===F||Ee,v=u||p;if(v.length<2)return;let x=()=>t.color;if(e&&t.id===Oa.id){const e=m.filter($).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),a=u?he(u,e):(()=>{const s=p.length>e.length,a=[];for(let t=0;t=p.length||i>=p.length?a.push([]):a.push([p[e],p[i]])}return a})(),i=[];let r=0;a.forEach(((e,s)=>{const a=Math.max(0,((null===e||void 0===e?void 0:e.length)||0)-1);for(let t=0;t{const a=i[e];if(null==a)return t.color;const r=m.filter($)[a],n=r?s.get(String(r.deliveryid)):null;return n?(0,I.gM)(n-1):t.color}}for(let e=0;ee.delay-s.delay)),a.forEach(((e,s)=>{setTimeout((()=>{qs((s=>[...s,e])),s===a.length-1&&setTimeout((()=>{Ds(!1),Is({})}),1e3)}),e.delay)})),e&&Qa.length>0){const e=[...Qa],s=e.map((e=>{const s=As[e.deliveryid];return Array.isArray(s)&&s.length>=2?s:e.coords.map((e=>[e.lat,e.lng]))})),t=a.length>0?a[a.length-1].delay:800*e.length,i=Math.max(t,600*e.length),r=i/Math.max(1,e.length),n=Date.now(),l=()=>{if(!Os.current)return;const a=Date.now()-n,t={};e.forEach(((e,i)=>{const n=s[i];if(!n||n.length<2)return;const l=i*r;if(a>=l+r)t[e.sequenceStep]=n.length;else if(a>=l){const s=(a-l)/r;t[e.sequenceStep]=Math.max(2,Math.ceil(s*n.length))}})),Is(t),a{if(Gs)Js(!1);else{if(!Oa){const e=La.find((e=>(e.orders||[]).some((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)))),s=La.find((e=>e.orders&&e.orders.length>0)),a=e||s;if(a&&(Ua(a),Je))return void(ta.current=!0)}Js(!0)}},title:Oa?"Compare planned vs. actual route for ".concat(Oa.riderName):"Compare planned vs. actual route (will focus the first rider)",style:{boxShadow:"var(--shadow-lg)",background:Gs?"linear-gradient(135deg, #662582, #9255AB)":"#fff",marginLeft:8,color:Gs?"#fff":void 0},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.$G1,{})}),Gs?"Exit Compare":"Compare"]})]})]}),Gs&&Oa&&(0,_.jsx)("div",{id:"compare-map-wrap",children:(()=>{const e=Qa.length,s=Qa.filter((e=>e.coords.length>0)).length,a=Qa.filter((e=>e.isLoading)).length,t=e>0?Math.round(s/e*100):0,i=e>0&&s===e&&0===a,n=null!=oa?et.find((e=>e.sequenceStep===oa)):null;return(0,_.jsxs)("div",{className:"compare-header-v2",children:[(0,_.jsxs)("div",{className:"compare-header-row",children:[(0,_.jsxs)("div",{className:"compare-title",children:[(0,_.jsx)("span",{className:"compare-title-dot",style:{background:Oa.color}}),(0,_.jsx)("span",{className:"compare-title-name",children:Oa.riderName}),(0,_.jsx)("span",{className:"compare-title-badge",children:"ACTUAL vs PLANNED"})]}),(0,_.jsxs)("div",{className:"compare-header-tools",children:[null!=oa&&(0,_.jsxs)("button",{type:"button",className:"compare-overall-btn",onClick:()=>ua(null),title:"Zoom out to the whole day",children:[(0,_.jsx)(S.Zs6,{})," Overall"]}),(0,_.jsx)("button",{type:"button",className:"compare-timeline-toggle".concat(Qs?" is-open":""),onClick:()=>ea((e=>!e)),title:Qs?"Hide planned/actual timeline":"Show planned/actual timeline","aria-expanded":Qs,children:(0,_.jsx)(S.j1Q,{})})]})]}),Qs&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"compare-timeline-wrap",children:[(0,_.jsxs)("div",{className:"compare-timeline-container",children:[(0,_.jsxs)("div",{className:"compare-timeline-labels",children:[(0,_.jsx)("div",{className:"compare-timeline-label",children:"Planned"}),(0,_.jsx)("div",{className:"compare-timeline-label",children:"Actual"})]}),(0,_.jsxs)("div",{className:"compare-timeline-scrollable",children:[(0,_.jsx)("div",{className:"compare-timeline-track is-planned",children:at.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=I.Ys.has(t),n=I.yP.has(t),l=oa===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,I.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",n&&"is-skipped",!i&&!n&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,_.jsxs)(r.Fragment,{children:[s>0&&(0,_.jsx)("span",{className:"compare-step-spacer"}),(0,_.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>ua((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Planned Step ".concat(o)+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.expectedTs?" \xb7 ".concat(e.expectedTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,_.jsx)("span",{className:"compare-step-circle",children:c?(0,_.jsx)("span",{className:"compare-step-spin"}):o}),e.expectedTs&&(0,_.jsx)("span",{className:"compare-step-tick",children:e.expectedTs.format("HH:mm")})]})]},"step-p-".concat(e.deliveryid))}))}),(0,_.jsx)("div",{className:"compare-timeline-track is-actual",children:tt.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=I.Ys.has(t),n=I.yP.has(t),l=oa===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,I.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",n&&"is-skipped",!i&&!n&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,_.jsxs)(r.Fragment,{children:[s>0&&(0,_.jsx)("span",{className:"compare-step-spacer"}),(0,_.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>ua((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Actual Visit ".concat(s+1," (Planned Step ").concat(o,")")+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.actualTs?" \xb7 ".concat(e.actualTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,_.jsx)("span",{className:"compare-step-circle",children:c?(0,_.jsx)("span",{className:"compare-step-spin"}):o}),e.actualTs&&(0,_.jsx)("span",{className:"compare-step-tick",children:e.actualTs.format("HH:mm")}),e.anomaly&&(0,_.jsx)("span",{className:"compare-step-flag",title:"Deviation flagged"})]})]},"step-a-".concat(e.deliveryid))}))})]})]}),(0,_.jsxs)("div",{className:"compare-progress-strip",children:[(0,_.jsx)("div",{className:"compare-progress-bar-wrap",children:(0,_.jsx)("div",{className:"compare-progress-bar-fill".concat(i?" is-done":""),style:{width:"".concat(t,"%")}})}),(0,_.jsx)("span",{className:"compare-progress-text",children:a>0?"Loading GPS\u2026 ".concat(s,"/").concat(e):"".concat(s,"/").concat(e," tracks")})]})]}),(()=>{const e="combined"===Ws,s=n?(0,I.gM)(n.sequenceStep-1):"linear-gradient(90deg, ".concat(I.Z3.slice(0,6).join(", "),")"),a=e?U:s,t=e?G:s;return(0,_.jsxs)("div",{className:"compare-legend",children:[(0,_.jsxs)("span",{className:"compare-legend-item",children:[(0,_.jsx)("span",{className:"compare-legend-swatch is-step-color is-dashed",style:{background:a}}),"Planned (dashed)"]}),(0,_.jsxs)("span",{className:"compare-legend-item",children:[(0,_.jsx)("span",{className:"compare-legend-swatch is-step-color",style:{background:t}}),"Actual GPS (solid)"]}),(0,_.jsx)("span",{className:"compare-legend-note",children:"Kalman-smoothed GPS \xb7 OSRM road-snapped"})]})})()]})]})})()}),Gs&&Oa&&(0,_.jsx)(V,{focusedRider:Oa,compareDeltas:et,compareSummary:st,actualOrdered:tt,focusedCompareStep:oa,setFocusedCompareStep:ua,sequenceOpen:Zs,setSequenceOpen:Xs,expandedSeqGroups:sa,setExpandedSeqGroups:aa,onClose:()=>Js(!1)})]}),Ue&&(0,_.jsx)("div",{className:"dispatch-popup-center",role:"dialog","aria-label":"Order ".concat(Ue.orderid," details"),onMouseEnter:()=>{Ke.current&&(clearTimeout(Ke.current),Ke.current=null)},onMouseLeave:()=>{(e=>{if(!e)return!1;if(Ye.current.has(String(e.orderid)))return!0;if(Gs&&Oa&&null!=e.deliveryid){const s=Qa.find((s=>String(s.deliveryid)===String(e.deliveryid)));if(s&&oa===s.sequenceStep)return!0}return!1})(Ue)||(Ke.current&&clearTimeout(Ke.current),Ke.current=setTimeout((()=>{Ge(null),Ke.current=null}),200))},children:(0,_.jsxs)("div",{className:"dispatch-popup-card dispatch-popup",children:[(0,_.jsx)("button",{type:"button",className:"dispatch-popup-center-close","aria-label":"Close order details",onClick:()=>{Ye.current.delete(String(Ue.orderid)),Ge(null)},children:"\xd7"}),(e=>{const s=(0,I.Cx)(e.orderstatus),a=e.rider_id||e.userid,t=I.Ys.has(String(e.orderstatus||"").toLowerCase()),i=t?null:ot(a,e);return(0,_.jsxs)("div",{style:{height:"100%",width:"100%"},children:[(0,_.jsxs)("div",{className:"pu-header",children:[(0,_.jsxs)("div",{className:"pu-header-top",children:[(0,_.jsxs)("div",{className:"pu-id",children:["ORDER #",e.orderid]}),e.orderstatus&&(0,_.jsx)("span",{className:"pu-status-chip",style:{background:s.bg,color:s.fg},children:s.label})]}),(0,_.jsxs)("div",{className:"pu-rider",children:[(0,_.jsx)(S.aVM,{})," ",(0,_.jsx)("span",{children:e.rider_name||e.ridername||"Unassigned"})]}),(e.deliverycustomer||e.customername)&&(0,_.jsxs)("div",{className:"pu-customer",title:e.deliverycustomer||e.customername,children:[(0,_.jsx)(S.u9F,{}),(0,_.jsx)("span",{children:e.deliverycustomer||e.customername})]}),null!=e.deliveryid&&(0,_.jsxs)("div",{className:"pu-delivery-id",children:["Delivery #",e.deliveryid]})]}),(0,_.jsxs)("div",{className:"pu-body",children:[xe.some((s=>e[s.key]))&&(0,_.jsxs)("div",{className:"pu-section",children:[(0,_.jsx)("div",{className:"pu-section-label",children:"Timeline"}),(0,_.jsx)("div",{className:"pu-timeline",children:xe.map((s=>{const a=ve(e[s.key]);return a?(0,_.jsxs)("div",{className:"pu-tl-row ".concat(s.final?"delivered":""),children:[(0,_.jsx)("span",{className:"pu-tl-dot"}),(0,_.jsx)("span",{className:"pu-tl-label",children:s.label}),(0,_.jsx)("span",{className:"pu-tl-time",children:a})]},s.key):null}))})]}),(0,_.jsxs)("div",{className:"pu-section",children:[(0,_.jsx)("div",{className:"pu-section-label",children:"Details"}),(0,_.jsxs)("div",{className:"pu-details-grid",children:[(e.pickupcustomer||e.locationname||e.pickuplocation)&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.NtI,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Pickup"}),(0,_.jsx)("div",{className:"pu-detail-value",title:e.pickupcustomer||e.locationname||e.pickuplocation,children:e.pickupcustomer||e.locationname||e.pickuplocation})]})]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.JFD,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Drop"}),(0,_.jsx)("div",{className:"pu-detail-value",title:e.deliveryaddress||e.deliverysuburb,children:e.deliverysuburb||W(e.deliveryaddress)})]})]}),e.zone_name&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.Cd7,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Zone"}),(0,_.jsx)("div",{className:"pu-detail-value",title:e.zone_name,children:e.zone_name})]})]}),(e.rider_id||e.userid)&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Rider ID"}),(0,_.jsxs)("div",{className:"pu-detail-value",children:["#",e.rider_id||e.userid]})]})]})]}),(null!=e.kms||null!=e.actualkms||!t&&null!=e.riderkms||null!==i)&&(0,_.jsxs)("div",{className:"pu-distance-row",children:[null!=e.kms&&""!==e.kms&&(0,_.jsxs)("div",{className:"pu-distance-chip",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Planned"}),(0,_.jsxs)("span",{className:"pu-distance-value",children:[e.kms," km"]})]}),null!=e.actualkms&&""!==e.actualkms&&(0,_.jsxs)("div",{className:"pu-distance-chip",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Actual"}),(0,_.jsxs)("span",{className:"pu-distance-value",children:[e.actualkms," km"]})]}),!t&&null!=e.riderkms&&""!==e.riderkms&&(0,_.jsxs)("div",{className:"pu-distance-chip",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.bsz,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Rider"}),(0,_.jsxs)("span",{className:"pu-distance-value",children:[parseFloat(e.riderkms).toFixed(2)," km"]})]}),null!==i&&(0,_.jsxs)("div",{className:"pu-distance-chip pu-est-meters",title:"Estimated distance to drop location",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.HPi,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Est. to Drop"}),(0,_.jsx)("span",{className:"pu-distance-value",children:ut(i)})]})]})]})]})]})})(Ue)]})})]}),!a&&"analysis"===C&&(0,_.jsxs)("div",{id:"dispatch-analysis",children:[(0,_.jsx)("div",{className:"da-picker-row",children:Se.map((e=>{var s;const a=z[e.key],t=E===e.key,i=!1===(null===a||void 0===a||null===(s=a.data)||void 0===s?void 0:s.success),r=i?"#fee2e2":a?"".concat(e.color,"22"):"#f1f5f9",n=i?"#dc2626":a?e.color:"#64748b",l=t?"Loading\u2026":i?"! Failed":a?"\u2713 ".concat(a.fetchedAt):"Fetch",c=L===e.key;return(0,_.jsxs)("button",{type:"button",className:"da-picker ".concat(a?"has-data":""," ").concat(t?"is-loading":""," ").concat(c?"is-active":""),onClick:()=>!t&&ce(e.key),style:{borderColor:c?e.color:i?"#fecaca":a?e.border:"#e2e8f0",background:i?"#fef2f2":a?e.bg:"#ffffff",boxShadow:c?"0 0 0 2px ".concat(e.color,"33"):void 0},disabled:t,children:[(0,_.jsxs)("div",{className:"da-picker-head",children:[(0,_.jsx)("div",{className:"da-picker-badge",style:{background:"".concat(e.color,"22"),color:e.color},children:e.label[0]}),(0,_.jsxs)("div",{className:"da-picker-meta",children:[(0,_.jsx)("div",{className:"da-picker-name",children:e.label}),(0,_.jsx)("div",{className:"da-picker-range",children:e.timeRange})]}),(0,_.jsx)("span",{className:"da-picker-status",style:{background:r,color:n},children:l})]}),(0,_.jsx)("div",{className:"da-picker-sub",children:e.sub})]},e.key)}))}),((e,s,a)=>{if(!L)return(0,_.jsx)("div",{className:"da-empty",children:"Pick a batch above to view its efficiency analysis."});const t=Se.find((e=>e.key===L)),r=z[L],n=E===L;if(n&&!r)return(0,_.jsxs)("div",{className:"da-empty",children:["Loading ",t.label," batch\u2026"]});if(!r)return null;const l=r.data||{};var c,d;if(!1===l.success)return(0,_.jsxs)("div",{className:"da-result-card da-result-card-error",style:{borderColor:"#fecaca",borderTopColor:"#ef4444"},children:[(0,_.jsxs)("div",{className:"da-result-head",children:[(0,_.jsxs)("div",{children:[(0,_.jsxs)("div",{className:"da-result-title",children:[t.label," Batch"]}),(0,_.jsxs)("div",{className:"da-result-sub",children:[t.timeRange," \xb7 Fetched at ",r.fetchedAt]})]}),(0,_.jsx)("button",{type:"button",className:"da-result-refresh",title:"Retry",onClick:()=>ce(L),disabled:n,style:{background:"#fee2e2",color:"#dc2626"},children:(0,_.jsx)(S.joZ,{})})]}),(0,_.jsxs)("div",{className:"da-error",children:[(0,_.jsxs)("div",{className:"da-error-title",children:[(0,_.jsx)(S.ItP,{}),(0,_.jsx)("span",{children:(null===l||void 0===l||null===(c=l.error)||void 0===c?void 0:c.code)||"Request failed"})]}),(0,_.jsx)("div",{className:"da-error-msg",children:(null===l||void 0===l||null===(d=l.error)||void 0===d?void 0:d.message)||"The server returned an error."}),(null===l||void 0===l?void 0:l.request_id)&&(0,_.jsxs)("div",{className:"da-error-meta",children:["request_id: ",l.request_id]})]})]});const o=l.fleet_summary||{},u=Array.isArray(l.rider_timelines)?l.rider_timelines:[],m=Array.isArray(l.substitution_opportunities)?l.substitution_opportunities:[],p=l.top_recommendation,h=!(!p||!p.idle_rider_name&&!p.idle_rider_id),v=!!(p&&p.action&&"none"!==p.action&&h),x=l.window||{},j=(e,s)=>{const a=String(null!==e&&void 0!==e?e:"").trim();if(!a)return s||"\u2014";const t="string"===typeof s&&/^Rider\s+\d+$/i.test(s.trim()),i=Array.isArray(La)?La.find((e=>String(e.id)===a)):null;if(i&&i.riderName)return i.riderName;const r=Array.isArray(Ca)?Ca.find((e=>String(e.id)===a)):null;return r&&r.riderName?r.riderName:!t&&s?s:"Rider ".concat(a)},f=we(o.fleet_start),g=we(o.fleet_done),N=null!=f&&null!=g&&g>f?g-f:null,b=parseFloat(o.avg_utilisation_pct),y=Number.isFinite(b)?b:null,k=null==y?"unknown":y>=85?"good":y>=70?"ok":"low",w="good"===k?"#10b981":"ok"===k?"#f59e0b":"low"===k?"#ef4444":"#94a3b8",F=(e=>{let{assessment:s,spreadMin:a,stdev:t}=e;const i=String(s||"").toLowerCase();return/high imbalance|severe|critical/.test(i)||/imbalance|recommend/.test(i)||null!=a&&a>30||null!=t&&t>1?"warn":/balanced|excellent|good/.test(i)?"success":"info"})({assessment:null===p||void 0===p?void 0:p.fleet_balance_assessment,spreadMin:parseFloat(o.finish_time_spread_minutes),stdev:parseFloat(o.load_balance_stdev)}),M=u.map((e=>{const s=we(e.started_at),a=we(e.finished_at);let t=0,r=100;null!=f&&N&&(null!=s&&(t=Math.max(0,Math.min(100,(s-f)/N*100))),null!=a&&(r=Math.max(0,Math.min(100,(a-f)/N*100))));const n=Math.max(0,r-t),l=parseFloat(e.active_minutes),c=parseFloat(e.idle_minutes),d=(Number.isFinite(l)?l:0)+(Number.isFinite(c)?c:0),o=d>0?l/d*100:y,u=null==o?"unknown":o>=85?"good":o>=70?"ok":"low",m="good"===u?"#10b981":"ok"===u?"#f59e0b":"low"===u?"#ef4444":"#94a3b8",p=j(e.userid,e.name);return(0,i.A)((0,i.A)({},e),{},{displayName:p,_startPct:t,_endPct:r,_activePct:n,_riderUtilPct:o,_riderColor:m})}));return M.sort(((e,s)=>(we(s.finished_at)||0)-(we(e.finished_at)||0))),(0,_.jsxs)("div",{className:"da-detail",children:[(0,_.jsxs)("div",{className:"da-detail-head",style:{borderTopColor:t.color,background:t.bg},children:[(0,_.jsxs)("div",{children:[(0,_.jsxs)("div",{className:"da-detail-title",children:[t.label," Batch",(0,_.jsxs)("span",{className:"da-detail-sub-inline",children:[l.date?" \xb7 ".concat(l.date):"",x.from&&x.to?" \xb7 ".concat(x.from," \u2013 ").concat(x.to):""]})]}),(0,_.jsxs)("div",{className:"da-detail-sub",children:["Fetched at ",r.fetchedAt," \xb7 Input deliveries: ",null!==(e=l.input_delivery_count)&&void 0!==e?e:"\u2014"]})]}),(0,_.jsxs)("div",{className:"da-detail-actions",children:[(0,_.jsxs)("span",{className:"da-live-tag ".concat(n?"is-active":""),title:"Auto-refreshing every ".concat(Math.round(15),"s"),children:[(0,_.jsx)("span",{className:"da-live-dot"}),"Live \xb7 ",Math.round(15),"s"]}),(0,_.jsx)("button",{type:"button",className:"da-result-refresh",title:"Refresh now",onClick:()=>{P((e=>{const s=(0,i.A)({},e);return delete s[L],s})),ie.mutate({batch:L,tenantId:916})},disabled:n,style:{background:"".concat(t.color,"22"),color:t.color},children:(0,_.jsx)(S.joZ,{})})]})]}),(0,_.jsx)("div",{className:"da-section",children:(0,_.jsxs)("div",{className:"da-hero-row",children:[(0,_.jsxs)("div",{className:"da-hero-card",children:[(0,_.jsx)("div",{className:"da-hero-icon",style:{background:"#6625821f",color:"#662582"},children:(0,_.jsx)(S.aEx,{})}),(0,_.jsx)("div",{className:"da-hero-value",children:_e(o.total_orders)}),(0,_.jsx)("div",{className:"da-hero-label",children:"Total Orders"}),null!=l.input_delivery_count&&l.input_delivery_count!==o.total_orders&&(0,_.jsxs)("div",{className:"da-hero-sub",children:[l.input_delivery_count," input"]})]}),(0,_.jsxs)("div",{className:"da-hero-card",children:[(0,_.jsx)("div",{className:"da-hero-icon",style:{background:"#0ea5e91f",color:"#0ea5e9"},children:(0,_.jsx)(S.GQB,{})}),(0,_.jsx)("div",{className:"da-hero-value",children:_e(o.total_riders)}),(0,_.jsx)("div",{className:"da-hero-label",children:"Active Riders"}),null!=o.orders_per_rider_avg&&(0,_.jsxs)("div",{className:"da-hero-sub",children:[o.orders_per_rider_avg," avg orders / rider"]})]}),(0,_.jsxs)("div",{className:"da-hero-card",children:[(0,_.jsx)("div",{className:"da-hero-icon",style:{background:"#8b5cf61f",color:"#8b5cf6"},children:(0,_.jsx)(S.XT0,{})}),(0,_.jsxs)("div",{className:"da-hero-value",children:[null!=o.total_duration_minutes?"".concat(o.total_duration_minutes):"\u2014",null!=o.total_duration_minutes&&(0,_.jsx)("span",{className:"da-hero-unit",children:" min"})]}),(0,_.jsx)("div",{className:"da-hero-label",children:"Fleet Window"}),o.fleet_start&&o.fleet_done&&(0,_.jsxs)("div",{className:"da-hero-sub",children:[o.fleet_start," \u2192 ",o.fleet_done]})]})]})}),(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsx)("div",{className:"da-section-label",children:"Fleet Health"}),(0,_.jsxs)("div",{className:"da-health-row",children:[(0,_.jsxs)("div",{className:"da-health-card",children:[(0,_.jsx)("div",{className:"da-ring",style:{"--ring-color":w,"--ring-pct":null!=y?Math.max(0,Math.min(100,y)):0},children:(0,_.jsxs)("span",{className:"da-ring-num",children:[null!=y?"".concat(y.toFixed(0)):"\u2014",null!=y&&(0,_.jsx)("span",{className:"da-ring-unit",children:"%"})]})}),(0,_.jsxs)("div",{className:"da-health-meta",children:[(0,_.jsx)("div",{className:"da-health-label",children:"Avg Utilisation"}),(0,_.jsx)("div",{className:"da-health-sub",style:{color:w},children:"good"===k?"Strong":"ok"===k?"Moderate":"low"===k?"Low":"\u2014"})]})]}),(0,_.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,_.jsx)("div",{className:"da-health-value",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev).toFixed(2):"\u2014"}),(0,_.jsx)("div",{className:"da-health-label",children:"Load Balance \u03c3"}),(0,_.jsx)("div",{className:"da-health-sub",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev)>1?"Uneven workload":"Workload balanced":"Stdev of orders / rider"})]}),(0,_.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,_.jsxs)("div",{className:"da-health-value",children:[null!=o.finish_time_spread_minutes?"".concat(o.finish_time_spread_minutes):"\u2014",null!=o.finish_time_spread_minutes&&(0,_.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,_.jsx)("div",{className:"da-health-label",children:"Finish Spread"}),(0,_.jsx)("div",{className:"da-health-sub",children:null!=o.finish_time_stdev_minutes?"\u03c3 ".concat(parseFloat(o.finish_time_stdev_minutes).toFixed(1)," min"):"First \u2192 last finish"})]}),(0,_.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,_.jsxs)("div",{className:"da-health-value",children:[null!=o.avg_active_minutes?"".concat(parseFloat(o.avg_active_minutes).toFixed(0)):"\u2014",null!=o.avg_active_minutes&&(0,_.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,_.jsx)("div",{className:"da-health-label",children:"Avg Active"}),(0,_.jsx)("div",{className:"da-health-sub",children:"Per rider, this batch"})]})]})]}),(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsx)("div",{className:"da-section-label",children:"Top Recommendation"}),v?(0,_.jsxs)("div",{className:"da-rec-banner is-action",children:[(0,_.jsx)("div",{className:"da-rec-banner-icon",children:(0,_.jsx)(S.DX0,{})}),(0,_.jsxs)("div",{className:"da-rec-banner-body",children:[(0,_.jsxs)("div",{className:"da-rec-head",children:[(0,_.jsx)("div",{className:"da-rec-action",children:(0,_.jsx)("span",{children:(p.action||"recommendation").replaceAll("_"," ")})}),null!=p.fleet_improvement_minutes&&(0,_.jsxs)("span",{className:"da-rec-improve",style:p.fleet_improvement_minutes>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:[p.fleet_improvement_minutes>0?"\u2191":"\u2022"," Fleet improves by ",p.fleet_improvement_minutes," min"]})]}),(0,_.jsxs)("div",{className:"da-rec-line",children:[(0,_.jsx)("strong",{children:j(p.idle_rider_id,p.idle_rider_name)}),p.primary_kitchen&&(0,_.jsxs)(_.Fragment,{children:[" \xb7 primary kitchen ",(0,_.jsx)("strong",{children:p.primary_kitchen})]}),p.second_kitchen&&(0,_.jsxs)(_.Fragment,{children:[" \u2192 also serve ",(0,_.jsx)("strong",{children:p.second_kitchen})," after ",p.second_kitchen_dispatch_after||"\u2014"]})]}),p.description&&(0,_.jsx)("div",{className:"da-rec-desc",children:p.description}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,_.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment}),(null===(s=p.activate_when)||void 0===s||null===(a=s.rules)||void 0===a?void 0:a.length)>0&&(0,_.jsxs)("div",{className:"da-rec-rules",children:[(0,_.jsxs)("div",{className:"da-rec-rules-head",children:["Activate when (",p.activate_when.condition||"AND","):"]}),p.activate_when.rules.map(((e,s)=>(0,_.jsxs)("div",{className:"da-rec-rule",children:[(0,_.jsxs)("code",{children:[e.field," ",e.operator," ",e.value]}),e.reason&&(0,_.jsxs)("span",{className:"da-rec-rule-why",children:[" \u2014 ",e.reason]})]},s)))]})]})]}):(0,_.jsxs)("div",{className:"da-rec-banner is-".concat(F),children:[(0,_.jsx)("div",{className:"da-rec-banner-icon",children:"warn"===F?(0,_.jsx)(S.Wux,{}):"success"===F?(0,_.jsx)(S.mU9,{}):(0,_.jsx)(S.DX0,{})}),(0,_.jsxs)("div",{className:"da-rec-banner-body",children:[(0,_.jsx)("div",{className:"da-rec-action",children:(0,_.jsx)("span",{children:"warn"===F?"Fleet imbalance detected \u2014 no feasible substitution":"success"===F?"Fleet ran balanced \u2014 no reassignment needed":"No action recommended"})}),(null===p||void 0===p?void 0:p.reason)&&(0,_.jsx)("div",{className:"da-rec-desc",children:p.reason}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,_.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment})]})]})]}),M.length>0&&(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsxs)("div",{className:"da-section-label",children:["Rider Timelines ",(0,_.jsxs)("span",{className:"da-section-count",children:["(",M.length,")"]}),(0,_.jsx)("span",{className:"da-section-hint",children:"Sorted by latest finish \u2014 bottleneck riders first"})]}),(0,_.jsxs)("div",{className:"da-gantt-axis",children:[(0,_.jsx)("span",{children:o.fleet_start||"\u2014"}),(0,_.jsx)("span",{className:"da-gantt-axis-mid",children:null!=o.total_duration_minutes?"".concat(o.total_duration_minutes," min batch"):"Batch window"}),(0,_.jsx)("span",{children:o.fleet_done||"\u2014"})]}),(0,_.jsx)("div",{className:"da-timeline-list",children:M.map((e=>{var s,a,t;const i="active"===String(e.status||"").toLowerCase(),r=null!==(s=e.completed_orders)&&void 0!==s?s:e.order_count,n=null!==(a=e.pending_orders)&&void 0!==a?a:0,l=null!=r&&e.order_count>0?Math.max(0,Math.min(100,r/e.order_count*100)):0,c=null!=e.idle_minutes&&e.idle_minutes>30,d=null!=e.kitchen_confidence&&e.kitchen_confidence<.7;return(0,_.jsxs)("div",{className:"da-timeline-card",children:[(0,_.jsxs)("div",{className:"da-timeline-top",children:[(0,_.jsxs)("div",{className:"da-timeline-name",children:[(0,_.jsx)(S.aVM,{style:{color:e._riderColor}}),(0,_.jsx)("span",{title:e.name&&e.name!==e.displayName?"API name: ".concat(e.name):void 0,children:e.displayName}),(0,_.jsxs)("span",{className:"da-timeline-id",children:["#",e.userid]})]}),(0,_.jsx)("span",{className:"da-pill ".concat(i?"is-active":"is-idle"),children:e.status})]}),(0,_.jsxs)("div",{className:"da-gantt-row",children:[(0,_.jsxs)("div",{className:"da-gantt-track",title:"".concat(e.started_at," \u2192 ").concat(e.finished_at),children:[(0,_.jsxs)("div",{className:"da-gantt-fill",style:{left:"".concat(e._startPct,"%"),width:"".concat(Math.max(2,e._activePct),"%"),background:e._riderColor},children:[(0,_.jsx)("span",{className:"da-gantt-fill-start",children:e.started_at}),(0,_.jsx)("span",{className:"da-gantt-fill-end",children:e.finished_at})]}),e._endPct<99&&(0,_.jsx)("div",{className:"da-gantt-idle",style:{left:"".concat(e._endPct,"%"),width:"".concat(100-e._endPct,"%")},title:"Idle ".concat(e.idle_minutes," min after finishing")})]}),(0,_.jsx)("span",{className:"da-gantt-util",style:{background:"".concat(e._riderColor,"22"),color:e._riderColor},title:"Per-rider utilisation: ".concat(null!=e._riderUtilPct?e._riderUtilPct.toFixed(0):"\u2014","%"),children:null!=e._riderUtilPct?"".concat(e._riderUtilPct.toFixed(0),"%"):"\u2014"})]}),(0,_.jsxs)("div",{className:"da-timeline-mid",children:[e.kitchen?(0,_.jsxs)("span",{className:"da-chip",title:null!=e.kitchen_confidence?"Kitchen confidence: ".concat((100*e.kitchen_confidence).toFixed(0),"%"):void 0,children:[(0,_.jsx)(S.NtI,{})," ",e.kitchen,null!=e.kitchen_confidence&&(0,_.jsx)("span",{className:"da-conf-dot ".concat(d?"is-low":"is-ok"),"aria-label":"Confidence ".concat((100*e.kitchen_confidence).toFixed(0),"%")})]}):(0,_.jsxs)("span",{className:"da-chip",style:{background:"#f8fafc",color:"#64748b",borderColor:"#e2e8f0",borderStyle:"dashed"},title:"Solver did not identify a primary kitchen for this rider",children:[(0,_.jsx)(S.NtI,{})," Unassigned"]}),(0,_.jsxs)("span",{className:"da-chip da-chip-orders",title:"Completed ".concat(r," of ").concat(e.order_count),children:[(0,_.jsx)(S.gsJ,{}),(0,_.jsxs)("span",{className:"da-orders-label",children:[r,"/",e.order_count]}),(0,_.jsx)("span",{className:"da-orders-bar",children:(0,_.jsx)("span",{className:"da-orders-bar-fill",style:{width:"".concat(l,"%")}})}),n>0&&(0,_.jsxs)("span",{className:"da-orders-pending",children:[n," pending"]})]}),null!=e.pace_orders_per_hour&&(0,_.jsxs)("span",{className:"da-chip",title:"Delivery pace this batch",children:[(0,_.jsx)(S.BJM,{})," ",parseFloat(e.pace_orders_per_hour).toFixed(1)," / hr"]}),null!=e.active_minutes&&(0,_.jsxs)("span",{className:"da-chip",title:"Time actively delivering",children:[(0,_.jsx)(S.pWE,{})," ",parseFloat(e.active_minutes).toFixed(0)," min active"]}),(0,_.jsxs)("span",{className:"da-chip",style:c?{background:"#fef3c7",color:"#92400e",borderColor:"#fde68a"}:void 0,title:"Idle time after this rider finished \u2014 fleet kept running",children:[(0,_.jsx)(S.VP9,{})," ",null!==(t=e.idle_minutes)&&void 0!==t?t:0," min idle"]}),null!=e.free_window_minutes&&(0,_.jsxs)("span",{className:"da-chip",style:e.free_window_minutes>=30?{background:"#ecfdf5",color:"#065f46",borderColor:"#a7f3d0"}:e.free_window_minutes>0?{background:"#fefce8",color:"#854d0e",borderColor:"#fde68a"}:{background:"#fef2f2",color:"#991b1b",borderColor:"#fecaca"},title:"Free window before the next batch \u2014 capacity available for a follow-up run",children:[(0,_.jsx)(S.pWE,{})," ",parseFloat(e.free_window_minutes).toFixed(0)," min free"]})]})]},e.userid)}))})]}),m.length>0&&(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsxs)("div",{className:"da-section-label",children:["Substitution Opportunities ",(0,_.jsxs)("span",{className:"da-section-count",children:["(",m.length,")"]})]}),(0,_.jsx)("div",{className:"da-sub-list",children:m.map(((e,s)=>{var a;const t=e.idle_rider||{},i=e.most_relieved_rider||{},r=null!==(a=e.fleet_improvement_minutes)&&void 0!==a?a:0;return(0,_.jsxs)("div",{className:"da-sub-card",children:[(0,_.jsxs)("div",{className:"da-sub-head",children:[(0,_.jsxs)("div",{className:"da-sub-title",children:[(0,_.jsx)("strong",{children:j(t.userid,t.name)})," ","covers ",(0,_.jsx)("strong",{children:e.target_kitchen})]}),(0,_.jsxs)("span",{className:"da-sub-improve",style:r>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:["Fleet ",r>0?"\u2191":"\u2022"," ",r," min"]})]}),(0,_.jsxs)("div",{className:"da-sub-meta",children:[(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.xI$,{})," ",e.travel_to_kitchen_km," km"]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.pWE,{})," ",e.travel_to_kitchen_minutes," min travel"]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.VP9,{})," arrives ",e.arrive_at_kitchen]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.gsJ,{})," ",e.total_orders_transferred," orders"]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.xI$,{})," +",e.extra_km_for_idle_rider," km for idle rider"]})]}),(i.name||null!=i.userid)&&(0,_.jsxs)("div",{className:"da-sub-relieved",children:[(0,_.jsx)(S.imn,{}),"Most relieved: ",(0,_.jsx)("strong",{children:j(i.userid,i.name)})," ","(",i.original_finish," \u2192 ",i.new_finish,", saves"," ",i.time_saved_minutes," min)"]}),Array.isArray(e.orders_to_transfer)&&e.orders_to_transfer.length>0&&(0,_.jsxs)("div",{className:"da-sub-transfers",children:[(0,_.jsx)("div",{className:"da-sub-transfers-head",children:"Orders transferred"}),e.orders_to_transfer.map((e=>{var s;const a=null!==(s=e.improvement_minutes)&&void 0!==s?s:0;return(0,_.jsxs)("div",{className:"da-transfer-row",children:[(0,_.jsxs)("span",{className:"da-transfer-id",children:["#",e.deliveryid]}),(0,_.jsxs)("span",{className:"da-transfer-from",children:["from ",j(e.from_rider_id||e.from_userid,e.from_rider_name)]}),(0,_.jsxs)("span",{className:"da-transfer-time",children:[e.original_delivery_time," \u2192 ",e.estimated_delivery_time]}),(0,_.jsxs)("span",{className:"da-transfer-imp",style:a>0?{background:"#dcfce7",color:"#166534"}:a<0?{background:"#fee2e2",color:"#991b1b"}:{background:"#f1f5f9",color:"#475569"},children:[a>0?"+":"",a," min"]})]},e.deliveryid)}))]})]},s)}))})]})]})})()]}),H&&(0,_.jsx)("div",{className:"da-pos-modal-backdrop",role:"dialog","aria-modal":"true","aria-label":"Last known position of ".concat(H.name),onClick:e=>{e.target===e.currentTarget&&Y(null)},children:(0,_.jsxs)("div",{className:"da-pos-modal-card",children:[(0,_.jsxs)("div",{className:"da-pos-modal-head",children:[(0,_.jsxs)("div",{className:"da-pos-modal-title-wrap",children:[(0,_.jsx)("div",{className:"da-pos-modal-avatar",style:{background:"".concat(H.color||"#662582","22"),color:H.color||"#662582"},children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"da-pos-modal-title",children:H.name}),(0,_.jsxs)("div",{className:"da-pos-modal-sub",children:["#",H.userid,H.kitchen&&(0,_.jsxs)(_.Fragment,{children:[" \xb7 ",H.kitchen]}),H.finished_at&&(0,_.jsxs)(_.Fragment,{children:[" \xb7 finished ",H.finished_at]})]})]})]}),(0,_.jsxs)("div",{className:"da-pos-modal-actions",children:[(0,_.jsx)("span",{className:"da-pill ".concat("active"===String(H.status||"").toLowerCase()?"is-active":"is-idle"),children:H.status||"\u2014"}),(0,_.jsx)("button",{type:"button",className:"da-pos-modal-close","aria-label":"Close",onClick:()=>Y(null),children:(0,_.jsx)(S.m6K,{})})]})]}),(0,_.jsx)("div",{className:"da-pos-modal-map",children:(0,_.jsxs)(d.W,{center:[H.lat,H.lon],zoom:13,scrollWheelZoom:!0,style:{width:"100%",height:"100%"},whenReady:e=>{const s=e.target;requestAnimationFrame((()=>s.invalidateSize())),setTimeout((()=>s.invalidateSize()),260)},children:[(0,_.jsx)(o.e,{attribution:'\xa9 OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,_.jsx)(l.p,{position:[H.lat,H.lon],children:(0,_.jsxs)(m.z,{children:[(0,_.jsx)("strong",{children:H.name}),(0,_.jsx)("br",{}),H.lat.toFixed(6),", ",H.lon.toFixed(6)]})})]},"".concat(H.userid,"-").concat(H.lat,"-").concat(H.lon))}),(0,_.jsxs)("div",{className:"da-pos-modal-foot",children:[(0,_.jsxs)("div",{className:"da-pos-modal-coord",children:[(0,_.jsx)(S.gwi,{}),(0,_.jsxs)("span",{children:[(0,_.jsx)("strong",{children:"Lat:"})," ",H.lat.toFixed(6),(0,_.jsx)("span",{className:"da-pos-modal-sep",children:"\xb7"}),(0,_.jsx)("strong",{children:"Lon:"})," ",H.lon.toFixed(6)]})]}),(0,_.jsx)("button",{type:"button",className:"da-pos-modal-copy",onClick:()=>{var e,s;const a="".concat(H.lat.toFixed(6),", ").concat(H.lon.toFixed(6));null!==(e=navigator)&&void 0!==e&&null!==(s=e.clipboard)&&void 0!==s&&s.writeText&&navigator.clipboard.writeText(a)},title:"Copy coordinates",children:"Copy"})]})]})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/3624.9b94bbb8.chunk.js b/build/static/js/3624.9b94bbb8.chunk.js new file mode 100644 index 0000000..a956053 --- /dev/null +++ b/build/static/js/3624.9b94bbb8.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3624],{84702:(e,s,a)=>{a.d(s,{Cx:()=>i,IE:()=>d,L0:()=>o,Ys:()=>r,Z3:()=>l,d1:()=>u,gM:()=>c,yP:()=>n});const t={created:{label:"Created",bg:"#3b82f6",fg:"#fff"},pending:{label:"Pending",bg:"#f59e0b",fg:"#fff"},accepted:{label:"Accepted",bg:"#8b5cf6",fg:"#fff"},arrived:{label:"Arrived",bg:"#ea580c",fg:"#fff"},picked:{label:"Picked",bg:"#0ea5e9",fg:"#fff"},active:{label:"Active",bg:"#0ea5e9",fg:"#fff"},delivered:{label:"Delivered",bg:"#22c55e",fg:"#fff"},skipped:{label:"Skipped",bg:"#94a3b8",fg:"#fff"},cancelled:{label:"Cancelled",bg:"#ef4444",fg:"#fff"}},i=e=>t[String(e||"").toLowerCase()]||{label:e||"Unknown",bg:"#64748b",fg:"#fff"},r=new Set(["delivered"]),n=new Set(["cancelled","skipped"]),l=["#2563eb","#dc2626","#16a34a","#ea580c","#9333ea","#0891b2","#ca8a04","#db2777","#0f766e","#7c3aed","#65a30d","#0284c7","#b91c1c","#15803d","#a16207","#86198f"],c=e=>l[(e%l.length+l.length)%l.length],d=e=>{if(null==e)return"";const s=["th","st","nd","rd"],a=e%100;return e+(s[(a-20)%10]||s[a]||s[0])},o=e=>{const s=String((null===e||void 0===e?void 0:e.orderstatus)||"").toLowerCase();return!r.has(s)&&!n.has(s)},u=e=>{if(!Array.isArray(e)||!e.length)return null;return[...e].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find(o)||null}},88267:(e,s,a)=>{a.r(s),a.d(s,{default:()=>Fe});var t=a(80045),i=a(89379),r=a(9950),n=a(98007),l=a(47113),c=a(82215),d=a(99810),o=a(49029),u=a(33516),m=a(48513),p=a(37119),h=a(2527),v=a.n(h);a(55392);v().PolylineOffset={translatePoint:(e,s,a)=>v().point(e.x+s*Math.cos(a),e.y+s*Math.sin(a)),offsetPointLine(e,s){const a=e.length;if(a<2)throw new Error("Line should be defined by at least 2 points");let t,i=e[0];const r=Math.PI/2,n=[];for(let l=1;l=0&&l<=1&&c>=0&&c<=1?v().point(e.x+c*i.x,e.y+c*i.y):null},segmentAsVector:(e,s)=>v().point(s.x-e.x,s.y-e.y),joinLineSegments(e){const s=[];let a=e[0].offset;s.push(a[0]);for(let t=1;te.latLngToLayerPoint(s)));return this.offsetPoints(t,a).map((s=>e.layerPointToLatLng(s)))}};const x=v().Polyline.prototype._projectLatlngs;v().Polyline.prototype._projectLatlngs=function(e,s,a){const t=this.options.offset;if(!t||"number"!==typeof t)return x.call(this,e,s,a);if(!(e[0]instanceof v().LatLng)){for(let t=0;tthis._map.latLngToLayerPoint(e))),r=v().PolylineOffset.offsetPoints(i,t);for(let n=0;n0?c/t*100:0}}function A(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null==e?"\u2014":"\u20b9".concat(parseFloat(e).toFixed(s))}function z(e){return e&&e.trim().split(/\s+/).slice(0,2).map((e=>{var s;return null!==(s=e[0])&&void 0!==s?s:""})).join("").toUpperCase()||"?"}function P(e){let{status:s}=e;const a=function(e){var s;return null!==(s=w[String(null!==e&&void 0!==e?e:"").toLowerCase()])&&void 0!==s?s:F}(s);return(0,_.jsxs)("span",{className:"order-status-pill",style:{background:a.bg,color:a.color,borderColor:a.border},children:[(0,_.jsx)("span",{className:"order-status-dot","aria-hidden":"true"}),a.label]})}function E(e){var s,a,t,i,r,n,l,c,d,o;let{order:u}=e;const m=null!==(s=null!==(a=null!==(t=null!==(i=u.customername)&&void 0!==i?i:u.customer_name)&&void 0!==t?t:u.deliverycustomer)&&void 0!==a?a:u.pickupcustomer)&&void 0!==s?s:"Unknown customer",p=null!==(r=null!==(n=null!==(l=u.customerphone)&&void 0!==l?l:u.phone)&&void 0!==n?n:u.mobile)&&void 0!==r?r:"",h=null!==(c=null!==(d=null!==(o=u.locationname)&&void 0!==o?o:u.kitchenname)&&void 0!==d?d:u.kitchenName)&&void 0!==c?c:"";return(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"customer-name",title:m,children:m}),p&&(0,_.jsx)("div",{className:"customer-phone",children:p}),h&&(0,_.jsxs)("div",{className:"customer-location",children:[(0,_.jsx)(S.gwi,{size:12,"aria-hidden":"true"}),h]})]})}function D(e){let{orders:s,getRevenue:a}=e;return null!==s&&void 0!==s&&s.length?(0,_.jsx)("div",{className:"orders-table-container",children:(0,_.jsxs)("table",{className:"orders-table",role:"table",children:[(0,_.jsx)("thead",{children:(0,_.jsxs)("tr",{children:[(0,_.jsx)("th",{scope:"col",children:"Customer"}),(0,_.jsx)("th",{scope:"col",children:"Status"}),(0,_.jsx)("th",{scope:"col",children:"Distance"}),(0,_.jsx)("th",{scope:"col",style:{textAlign:"right"},children:"Revenue"})]})}),(0,_.jsx)("tbody",{children:s.map(((e,s)=>{var t,i,r,n;const l=parseFloat(null!==(t=null!==(i=e.kms)&&void 0!==i?i:e.actualkms)&&void 0!==t?t:0),c=a(e);return(0,_.jsxs)("tr",{children:[(0,_.jsx)("td",{children:(0,_.jsx)(E,{order:e})}),(0,_.jsx)("td",{children:(0,_.jsx)(P,{status:null!==(n=e.orderstatus)&&void 0!==n?n:e.status})}),(0,_.jsxs)("td",{children:[(0,_.jsx)("span",{className:"distance-value",children:l.toFixed(1)}),(0,_.jsx)("span",{className:"distance-unit",children:"km"})]}),(0,_.jsx)("td",{style:{textAlign:"right"},children:(0,_.jsx)("span",{className:"revenue-amount",children:A(c)})})]},"".concat(null!==(r=e.orderid)&&void 0!==r?r:"order","-").concat(s))}))})]})}):(0,_.jsxs)("div",{className:"orders-empty-state",role:"status",children:[(0,_.jsx)(S.q8i,{size:24,"aria-hidden":"true"}),(0,_.jsx)("p",{className:"orders-empty-message",children:"No orders assigned to this rider yet."})]})}function L(e){var s,a,t,i;let{rider:r,metrics:n}=e;const{varCost:l,fixedCost:c,kms:d,net:o,margin:u}=n,m=o>=0,p=[{icon:(0,_.jsx)(S.DwJ,{size:16}),iconClass:"cost-tile-icon--fixed",label:"Fixed cost",amount:A(c,2),amountClass:"",footnote:"Salary (per slot)"},{icon:(0,_.jsx)(S.pk7,{size:16}),iconClass:"cost-tile-icon--variable",label:"Variable cost",amount:A(l,2),amountClass:"",footnote:"".concat(d.toFixed(1)," km \xd7 \u20b9").concat(2.5,"/km")},{icon:m?(0,_.jsx)(S.imn,{size:16}):(0,_.jsx)(S.Rod,{size:16}),iconClass:m?"cost-tile-icon--profit":"cost-tile-icon--loss",label:m?"Net profit":"Net loss",amount:"".concat(m?"+":"").concat(A(o,2)),amountClass:m?"cost-tile-amount--profit":"cost-tile-amount--loss",footnote:"".concat(Math.abs(u).toFixed(0),"% margin")}];return(0,_.jsx)("div",{className:"rider-detail-panel","aria-label":"Rider cost breakdown",children:(0,_.jsxs)("div",{className:"rider-detail-inner",children:[(0,_.jsx)("div",{className:"cost-breakdown-grid",children:p.map((e=>(0,_.jsxs)("div",{className:"cost-tile",children:[(0,_.jsx)("div",{className:"cost-tile-icon ".concat(e.iconClass),"aria-hidden":"true",children:e.icon}),(0,_.jsxs)("div",{className:"cost-tile-content",children:[(0,_.jsx)("span",{className:"cost-tile-label",children:e.label}),(0,_.jsx)("span",{className:"cost-tile-amount ".concat(e.amountClass),children:e.amount}),(0,_.jsx)("span",{className:"cost-tile-footnote",children:e.footnote})]})]},e.label)))}),(0,_.jsxs)("div",{className:"revenue-breakdown",children:[(0,_.jsxs)("div",{className:"revenue-breakdown-header",children:[(0,_.jsxs)("div",{className:"revenue-breakdown-title",children:[(0,_.jsx)(S.q8i,{size:14,"aria-hidden":"true"}),"Revenue Breakdown"]}),(0,_.jsxs)("span",{className:"revenue-breakdown-count",children:[null!==(s=null===(a=r.orders)||void 0===a?void 0:a.length)&&void 0!==s?s:0," order",1!==(null!==(t=null===(i=r.orders)||void 0===i?void 0:i.length)&&void 0!==t?t:0)?"s":""]})]}),(0,_.jsx)(D,{orders:r.orders,getRevenue:M})]})]})})}function q(e){var s,a,t,i;let{rider:r,metrics:n,isExpanded:l,isFocused:c,onToggle:d,onFocus:o}=e;const{revenue:u,kms:m,totalCost:p,net:h,margin:v}=n,x=h>=0,j="".concat((f=Math.abs(v),g=0,N=100,Math.min(Math.max(f,g),N)),"%");var f,g,N;const b=null!==(s=null===(a=r.orders)||void 0===a?void 0:a.length)&&void 0!==s?s:0,y=null!==(t=null!==(i=r.riderName)&&void 0!==i?i:r.username)&&void 0!==t?t:"Rider #".concat(r.id),k=["rider-profitability-card",x?"rider-profitability-card--profitable":"rider-profitability-card--unprofitable",c?"rider-profitability-card--selected":""].filter(Boolean).join(" ");function w(){d(r.id),!c&&o&&o(r)}return(0,_.jsxs)("div",{className:k,"aria-label":"Rider: ".concat(y),children:[(0,_.jsxs)("div",{className:"rider-card-header",role:"button",tabIndex:0,"aria-expanded":l,onClick:w,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),w())},children:[(0,_.jsx)("div",{className:"rider-avatar","aria-hidden":"true",children:z(y)}),(0,_.jsxs)("div",{className:"rider-identity",children:[(0,_.jsx)("div",{className:"rider-name",title:y,children:y}),(0,_.jsxs)("div",{className:"rider-order-summary",children:[b," order",1!==b?"s":"",(0,_.jsx)("span",{className:"rider-order-summary-separator",children:"\xb7"}),m.toFixed(1)," km total"]})]}),(0,_.jsxs)("div",{className:"rider-metrics-row","aria-hidden":"true",children:[(0,_.jsxs)("div",{className:"rider-metric",children:[(0,_.jsx)("span",{className:"rider-metric-label",children:"Revenue"}),(0,_.jsx)("span",{className:"rider-metric-amount rider-metric-amount--revenue",children:A(u)})]}),(0,_.jsxs)("div",{className:"rider-metric",children:[(0,_.jsx)("span",{className:"rider-metric-label",children:"Cost"}),(0,_.jsx)("span",{className:"rider-metric-amount rider-metric-amount--cost",children:A(p)})]}),(0,_.jsxs)("div",{className:"rider-net-profit-column",children:[(0,_.jsxs)("div",{className:"rider-metric",children:[(0,_.jsx)("span",{className:"rider-metric-label",children:"Net"}),(0,_.jsxs)("span",{className:"rider-metric-amount ".concat(x?"rider-metric-amount--net-profit":"rider-metric-amount--net-loss"),children:[x?"+":"",A(h)]})]}),(0,_.jsx)("div",{className:"rider-margin-bar",children:(0,_.jsx)("div",{className:"rider-margin-bar-fill ".concat(x?"rider-margin-bar-fill--profit":"rider-margin-bar-fill--loss"),style:{width:j},role:"presentation"})})]})]}),(0,_.jsx)("div",{className:"rider-expand-toggle ".concat(l?"rider-expand-toggle--open":""),"aria-hidden":"true",children:(0,_.jsx)(S.j1Q,{size:22})})]}),l&&(0,_.jsx)(L,{rider:r,metrics:n})]})}function R(e){let{riders:s=[],totalDailyProfit:a=0,focusedRider:t=null,handleRiderFocus:n}=e;const[l,c]=(0,r.useState)({}),[d,o]=(0,r.useState)("profit-asc"),u=(0,r.useCallback)((e=>{c((s=>(0,i.A)((0,i.A)({},s),{},{[e]:!s[e]})))}),[]),m=(0,r.useMemo)((()=>s.map((e=>(0,i.A)((0,i.A)({},e),{},{_m:C(e)})))),[s]),p=m.reduce(((e,s)=>e+s._m.revenue),0),h=m.reduce(((e,s)=>e+s._m.totalCost),0),v=m.reduce(((e,s)=>e+s._m.net),0),x=m.filter((e=>e._m.net>=0)).length,j=m.length-x,f=a>=0,g=v>=0,N=m,b=(0,r.useMemo)((()=>{const e=[...N];return"profit-asc"===d?e.sort(((e,s)=>e._m.net-s._m.net)):"profit-desc"===d?e.sort(((e,s)=>s._m.net-e._m.net)):"name-asc"===d?e.sort(((e,s)=>{var a,t,i,r;const n=(null!==(a=null!==(t=e.riderName)&&void 0!==t?t:e.username)&&void 0!==a?a:"Rider #".concat(e.id)).toLowerCase(),l=(null!==(i=null!==(r=s.riderName)&&void 0!==r?r:s.username)&&void 0!==i?i:"Rider #".concat(s.id)).toLowerCase();return n.localeCompare(l)})):"orders-desc"===d&&e.sort(((e,s)=>{var a,t,i,r;return(null!==(a=null===(t=s.orders)||void 0===t?void 0:t.length)&&void 0!==a?a:0)-(null!==(i=null===(r=e.orders)||void 0===r?void 0:r.length)&&void 0!==i?i:0)})),e}),[N,d]);return(0,_.jsxs)("div",{className:"profitability-dashboard",role:"region","aria-label":"Profitability overview",children:[(0,_.jsxs)("header",{className:"profitability-header",children:[(0,_.jsxs)("div",{className:"profitability-header-left",children:[(0,_.jsx)("div",{className:"profitability-header-icon","aria-hidden":"true",children:(0,_.jsx)(S.rgL,{size:18})}),(0,_.jsxs)("div",{children:[(0,_.jsx)("h2",{className:"profitability-header-title",children:"Profitability Overview"}),(0,_.jsxs)("p",{className:"profitability-header-subtitle",children:[(0,_.jsxs)("span",{children:[m.length," rider",1!==m.length?"s":""]}),(0,_.jsx)("span",{className:"profitability-header-dot"}),(0,_.jsxs)("span",{style:{color:"var(--profit-green)"},children:[x," profitable"]}),(0,_.jsx)("span",{className:"profitability-header-dot"}),(0,_.jsxs)("span",{style:{color:"var(--loss-red)"},children:[j," at loss"]})]})]})]}),(0,_.jsxs)("div",{className:"profitability-kpi-group",children:[(0,_.jsxs)("div",{className:"profitability-kpi-chip ".concat(f?"profitability-kpi-chip--profit":"profitability-kpi-chip--loss"),children:[(0,_.jsx)("div",{className:"profitability-kpi-chip-icon","aria-hidden":"true",children:f?(0,_.jsx)(S.imn,{}):(0,_.jsx)(S.Rod,{})}),(0,_.jsxs)("div",{className:"profitability-kpi-chip-content",children:[(0,_.jsxs)("span",{className:"profitability-kpi-chip-label",children:["Daily ",f?"profit":"loss"]}),(0,_.jsx)("span",{className:"profitability-kpi-chip-amount",children:A(Math.abs(a))})]})]}),(0,_.jsxs)("div",{className:"profitability-kpi-chip ".concat(g?"profitability-kpi-chip--profit":"profitability-kpi-chip--loss"),children:[(0,_.jsx)("div",{className:"profitability-kpi-chip-icon","aria-hidden":"true",children:g?(0,_.jsx)(S.imn,{}):(0,_.jsx)(S.Rod,{})}),(0,_.jsxs)("div",{className:"profitability-kpi-chip-content",children:[(0,_.jsxs)("span",{className:"profitability-kpi-chip-label",children:["Slot ",g?"profit":"loss"]}),(0,_.jsx)("span",{className:"profitability-kpi-chip-amount",children:A(Math.abs(v))})]})]})]})]}),(0,_.jsxs)("div",{className:"profitability-summary-row",role:"group","aria-label":"Slot summary",children:[(0,_.jsxs)("div",{className:"profitability-summary-card profitability-summary-card--primary",children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Riders Active"}),(0,_.jsx)("span",{className:"profitability-summary-value",children:m.length}),(0,_.jsxs)("span",{className:"profitability-summary-detail",children:[x," in profit \xb7 ",j," at loss"]})]}),(0,_.jsxs)("div",{className:"profitability-summary-card profitability-summary-card--primary",children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Slot Revenue"}),(0,_.jsx)("span",{className:"profitability-summary-value",children:A(p)}),(0,_.jsxs)("span",{className:"profitability-summary-detail",children:["From ",m.reduce(((e,s)=>{var a,t;return e+(null!==(a=null===(t=s.orders)||void 0===t?void 0:t.length)&&void 0!==a?a:0)}),0)," orders"]})]}),(0,_.jsxs)("div",{className:"profitability-summary-card profitability-summary-card--loss",children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Slot Cost"}),(0,_.jsx)("span",{className:"profitability-summary-value profitability-summary-value--loss",children:A(h)}),(0,_.jsx)("span",{className:"profitability-summary-detail",children:"Fixed + variable"})]}),(0,_.jsxs)("div",{className:"profitability-summary-card ".concat(g?"card-profit":"card-loss"),children:[(0,_.jsx)("span",{className:"profitability-summary-label",children:"Slot Net"}),(0,_.jsxs)("span",{className:"profitability-summary-value ".concat(g?"net-positive":"net-negative"),children:[g?"+":"",A(v)]}),(0,_.jsx)("span",{className:"profitability-summary-detail ".concat(p>0?v/p>=0?"margin-positive":"margin-negative":""),children:p>0?"".concat(v/p>=0?"+":"").concat((v/p*100).toFixed(0),"% margin"):"0% margin"})]})]}),(0,_.jsxs)("div",{className:"rider-profitability-feed",role:"list","aria-label":"Rider cards",children:[(0,_.jsx)("div",{className:"rider-feed-heading","aria-hidden":"true",children:"Riders List"}),0===b.length?(0,_.jsxs)("div",{className:"profitability-empty-state",role:"status",children:[(0,_.jsx)(S._pN,{size:32,"aria-hidden":"true"}),(0,_.jsx)("p",{className:"profitability-empty-message",children:"No riders matching the filters."})]}):b.map((e=>(0,_.jsx)("div",{role:"listitem",children:(0,_.jsx)(q,{rider:e,metrics:e._m,isExpanded:!!l[e.id],isFocused:(null===t||void 0===t?void 0:t.id)===e.id,onToggle:u,onFocus:n})},e.id)))]})]})}var I=a(84702);const O=e=>{let{visibleRiders:s,riders:a,focusedStop:t,handleRiderFocus:i,setFocusedStop:r,calculateEstMeters:n,getRiderColor:l,formatMeters:c}=e;const d=s.map((e=>(0,I.d1)(e.orders))).filter(Boolean).sort(((e,s)=>String(e.rider_name||e.ridername||"").localeCompare(String(s.rider_name||s.ridername||""))));if(0===d.length)return(0,_.jsxs)("div",{className:"empty-slot",children:[(0,_.jsx)("div",{className:"empty-slot-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsx)("div",{className:"empty-slot-title",children:"No active deliveries"}),(0,_.jsx)("div",{className:"empty-slot-sub",children:"No deliveries are currently in progress for this slot"})]});return(0,_.jsx)("div",{className:"adcard-list",children:d.map(((e,s)=>{const d=e.rider_id,o=a.find((e=>String(e.id)===String(d))),u=l(d),m=(0,I.Cx)(e.orderstatus),p=parseFloat(e.droplat||e.deliverylat),h=parseFloat(e.droplon||e.deliverylong),v=Number.isFinite(p)&&Number.isFinite(h),x=n(d,e),j=e.deliverycustomer||e.customername||"Order #".concat(e.orderid),f=e.deliverysuburb||e.deliveryaddress||e.zone_name||"",g=e.rider_name||e.ridername||"Unassigned",N=v&&t&&String(t.orderid)===String(e.orderid),b=g.split(/\s+/).filter(Boolean).slice(0,2).map((e=>e[0])).join("").toUpperCase()||"\u2022";return(0,_.jsxs)("div",{className:"adcard".concat(N?" is-active":""),style:{"--ad-accent":u,animationDelay:"".concat(.05*s,"s")},onClick:()=>{o&&i(o),v&&r({orderid:e.orderid,lat:p,lon:h})},children:[(0,_.jsxs)("div",{className:"adcard-top",children:[(0,_.jsx)("div",{className:"adcard-avatar",style:{background:u},children:b}),(0,_.jsxs)("div",{className:"adcard-titles",children:[(0,_.jsx)("div",{className:"adcard-customer",title:j,children:j}),(0,_.jsxs)("div",{className:"adcard-rider",title:g,children:[(0,_.jsx)(S.aVM,{style:{fontSize:13,flexShrink:0}}),(0,_.jsx)("span",{className:"adcard-tx",children:g})]})]}),(0,_.jsx)("span",{className:"adcard-status",style:{background:"".concat(m.bg,"1a"),color:m.bg},title:m.label,children:m.label})]}),f&&(0,_.jsxs)("div",{className:"adcard-addr",children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.gwi,{})}),(0,_.jsx)("span",{className:"adcard-tx adcard-addr-tx",title:f,children:f})]}),(0,_.jsxs)("div",{className:"adcard-foot",children:[e.pickupcustomer?(0,_.jsxs)("span",{className:"adcard-pickup",title:e.pickupcustomer,children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.NtI,{})}),(0,_.jsx)("span",{className:"adcard-tx",children:e.pickupcustomer})]}):(0,_.jsx)("span",{}),(0,_.jsxs)("span",{className:"adcard-metrics",children:[(0,_.jsxs)("span",{className:"adcard-m adcard-m-km",title:"Trip distance",children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.xI$,{})}),parseFloat(e.actualkms||e.kms||0).toFixed(1)," km"]}),null!==x&&(0,_.jsxs)("span",{className:"adcard-m adcard-m-eta",title:"Estimated distance to drop location",children:[(0,_.jsx)("span",{className:"adcard-ic",children:(0,_.jsx)(S.HPi,{})}),c(x)]})]})]})]},e.orderid)}))})};var T=a(81425),H=a(14857),Y=a(47223);const V=function(e){let{focusedRider:s,compareDeltas:a,compareSummary:t,actualOrdered:i,focusedCompareStep:n,setFocusedCompareStep:l,sequenceOpen:c,setSequenceOpen:d,expandedSeqGroups:o,setExpandedSeqGroups:u,onClose:m}=e;const p=(0,H.A)(),h=(0,Y.A)(p.breakpoints.down("md")),v=(0,r.useMemo)((()=>{const e=t,r=e.onTime+e.late,n=s.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),l=n<0,c=a.filter((e=>e.anomaly)),d=a.filter((e=>I.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,o=a.filter((e=>I.yP.has(String(e.orderstatus||"").toLowerCase()))).length,u=null==e.kmDeltaPct?"":e.kmDeltaPct>25?"is-over":e.kmDeltaPct<-5?"is-under":"",m=a.length||1,p=e.onTime+e.late||1,h=Math.round(d/m*60+e.onTime/p*25+(m-e.anomalies)/m*15),v=h>=85?"#16a34a":h>=65?"#f59e0b":"#dc2626",x=h>=85?"Excellent":h>=65?"Acceptable":"Needs review",j=a.filter((e=>e.actualTs)),f=j.reduce(((e,s)=>!e||s.actualTs.isBefore(e)?s.actualTs:e),null),g=j.reduce(((e,s)=>!e||s.actualTs.isAfter(e)?s.actualTs:e),null),N=f&&g?Math.max(0,g.diff(f,"minute")):0,b=a.length>1?Math.round(N/(a.length-1)):0,y=N>0?(e.actualKm/(N/60)).toFixed(1):null,k=a.filter((e=>!e.isLoading&&e.coordsCount>0)),S=k.filter((e=>null!=e.timeDeltaMin&&!e.anomaly)).sort(((e,s)=>e.timeDeltaMin-s.timeDeltaMin))[0]||null,_=k.filter((e=>e.anomaly)).sort(((e,s)=>{const a=Math.abs(e.kmDeltaPct||0)+(e.timeDeltaMin>0?e.timeDeltaMin:0);return Math.abs(s.kmDeltaPct||0)+(s.timeDeltaMin>0?s.timeDeltaMin:0)-a}))[0]||null,w=i.filter(((e,s)=>{var a;const t=null===(a=e.order)||void 0===a?void 0:a.step;return null!=t&&t!==s+1})),F=[];w.forEach((e=>{var s;const a=null===(s=e.order)||void 0===s?void 0:s.step,t=i.findIndex((s=>s.sequenceStep===e.sequenceStep))+1,r=t-a,n=F[F.length-1];n&&n.delta===r&&n.lastActualPos+1===t?(n.items.push({d:e,planned:a,actualPos:t,delta:r}),n.lastActualPos=t):F.push({delta:r,items:[{d:e,planned:a,actualPos:t,delta:r}],lastActualPos:t})}));const M={};s.orders.forEach((e=>{const s=e.trip_number||1;M[s]||(M[s]=[]),M[s].push(e)}));const C=Object.entries(M).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,a]=e;return{tNum:s,count:a.length,plannedKm:a.reduce(((e,s)=>e+parseFloat(s.kms||0)),0),actualKm:a.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:a.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),delivered:a.filter((e=>I.Ys.has(String(e.orderstatus||"").toLowerCase()))).length}}));return{sum:e,totalSteps:r,totalProfit:n,isLoss:l,deviations:c,delivered:d,skipped:o,stepDeltaPct:u,score:h,scoreColor:v,scoreLabel:x,firstDelivery:f,lastDelivery:g,activeMin:N,avgPerStop:b,avgSpeed:y,bestStep:S,worstStep:_,outOfOrderSteps:w,seqRuns:F,tripList:C}}),[s,a,t,i]),x=null!=n?a.find((e=>e.sequenceStep===n)):null,j=e=>{l((s=>s===e?null:e))},f=function(e){let s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{d:a,planned:t,actualPos:i,delta:r}=e;return(0,_.jsxs)("li",{className:"cdp-seq-diff".concat(n===a.sequenceStep?" is-focused":"").concat(s?"":" is-nested"),onClick:()=>j(a.sequenceStep),children:[(0,_.jsx)("span",{className:"cdp-seq-diff-num",style:{background:(0,I.gM)((t||a.sequenceStep)-1)},children:t||a.sequenceStep}),(0,_.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,_.jsx)("div",{className:"cdp-seq-diff-title",children:a.deliverycustomer||"Step ".concat(t||a.sequenceStep)}),(0,_.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Visited ",(0,_.jsx)("strong",{children:(0,I.IE)(i)})," ","\xb7 planned ",(0,_.jsx)("strong",{children:(0,I.IE)(t)})]})]}),(0,_.jsx)("span",{className:"cdp-seq-diff-tag",children:r>0?"+".concat(r):"".concat(r)})]},"diff-".concat(a.sequenceStep))},{sum:g,totalSteps:N,totalProfit:b,isLoss:y,deviations:k,delivered:w,skipped:F,stepDeltaPct:M,score:C,scoreColor:A,scoreLabel:z,firstDelivery:P,lastDelivery:E,activeMin:D,avgPerStop:L,avgSpeed:q,bestStep:R,worstStep:O,outOfOrderSteps:T,seqRuns:V,tripList:B}=v;return(0,_.jsxs)("aside",{id:"compare-data-panel",className:"compare-data-panel".concat(h?" cdp-is-mobile":""),children:[(0,_.jsxs)("div",{className:"cdp-head",children:[(0,_.jsxs)("div",{className:"cdp-head-title",children:[(0,_.jsx)("span",{className:"cdp-rider-dot",style:{background:s.color}}),(0,_.jsxs)("div",{className:"cdp-head-text",children:[(0,_.jsx)("div",{className:"cdp-rider-name",children:s.riderName}),(0,_.jsx)("div",{className:"cdp-head-badge",children:"PLANNED vs ACTUAL"})]})]}),(0,_.jsx)("button",{type:"button",className:"cdp-close",onClick:m,title:"Exit compare","aria-label":"Exit compare",children:(0,_.jsx)(S.m6K,{})})]}),(0,_.jsxs)("div",{className:"cdp-scroll",children:[(0,_.jsx)("section",{className:"cdp-section cdp-score-section",children:(0,_.jsxs)("div",{className:"cdp-score-wrap",children:[(0,_.jsx)("div",{className:"cdp-score-ring",style:{background:"conic-gradient(".concat(A," ").concat(3.6*C,"deg, rgba(15,23,42,0.08) 0deg)")},children:(0,_.jsxs)("div",{className:"cdp-score-inner",children:[(0,_.jsx)("div",{className:"cdp-score-value",style:{color:A},children:C}),(0,_.jsx)("div",{className:"cdp-score-unit",children:"/100"})]})}),(0,_.jsxs)("div",{className:"cdp-score-body",children:[(0,_.jsx)("div",{className:"cdp-score-label",style:{color:A},children:z}),(0,_.jsx)("div",{className:"cdp-score-title",children:"Compliance score"}),(0,_.jsxs)("div",{className:"cdp-score-sub",children:[w,"/",a.length," delivered",g.anomalies>0?" \xb7 ".concat(g.anomalies," deviation").concat(g.anomalies>1?"s":""):"",g.late>0?" \xb7 ".concat(g.late," late"):"",F>0?" \xb7 ".concat(F," skipped"):""]})]})]})}),(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.Zs6,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Day overview"})]}),(0,_.jsxs)("div",{className:"cdp-tiles",children:[(0,_.jsxs)("div",{className:"cdp-tile",children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[(0,_.jsx)(S.xI$,{})," Distance"]}),(0,_.jsxs)("div",{className:"cdp-tile-value",children:[g.actualKm.toFixed(1),(0,_.jsx)("span",{className:"cdp-tile-unit",children:"km"})]}),(0,_.jsxs)("div",{className:"cdp-tile-sub",children:["planned ",g.plannedKm.toFixed(1)," km"]})]}),(0,_.jsxs)("div",{className:"cdp-tile".concat(g.anomalies>0?" is-warn":""),children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[(0,_.jsx)(S.Wux,{})," Deviation"]}),(0,_.jsx)("div",{className:"cdp-tile-value ".concat(M),children:null!=g.kmDeltaPct?"".concat(g.kmDeltaPct>0?"+":"").concat(g.kmDeltaPct.toFixed(0),"%"):"\u2014"}),(0,_.jsx)("div",{className:"cdp-tile-sub",children:g.anomalies>0?"".concat(g.anomalies," flagged"):"within plan"})]}),(0,_.jsxs)("div",{className:"cdp-tile".concat(g.late>0?" is-warn":""),children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[(0,_.jsx)(S.VP9,{})," On-time"]}),(0,_.jsxs)("div",{className:"cdp-tile-value",children:[g.onTime,N>0&&(0,_.jsxs)("span",{className:"cdp-tile-unit",children:["/",N]})]}),(0,_.jsx)("div",{className:"cdp-tile-sub",children:g.late>0?"".concat(g.late," late"):"all on schedule"})]}),(0,_.jsxs)("div",{className:"cdp-tile ".concat(y?"is-loss":"is-gain"),children:[(0,_.jsxs)("div",{className:"cdp-tile-label",children:[y?(0,_.jsx)(S.Rod,{}):(0,_.jsx)(S.imn,{})," ",y?"Loss":"Profit"]}),(0,_.jsxs)("div",{className:"cdp-tile-value",children:[y?"-":"","\u20b9",Math.abs(b).toFixed(0)]}),(0,_.jsxs)("div",{className:"cdp-tile-sub",children:[s.orders.length," ",1===s.orders.length?"order":"orders"," \xb7 ",w," delivered"]})]})]})]}),a.length>0&&(0,_.jsxs)("section",{className:"cdp-section cdp-seq-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head cdp-section-head-clickable",onClick:()=>d((e=>!e)),role:"button","aria-expanded":c,title:c?"Collapse route sequence":"Expand route sequence",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.$G1,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Route sequence"}),(0,_.jsx)("span",{className:"cdp-seq-status".concat(T.length>0?" is-warn":" is-good"),children:T.length>0?"".concat(T.length," out of order"):"In order"}),(0,_.jsx)("span",{className:"cdp-seq-toggle".concat(c?" is-open":""),children:(0,_.jsx)(S.j1Q,{})})]}),c&&(0,_.jsx)("div",{className:"cdp-seq",children:T.length>0?(0,_.jsx)("ul",{className:"cdp-seq-diffs",children:V.map(((e,s)=>{if(1===e.items.length)return f(e.items[0]);const a=e.items[0],t=e.items[e.items.length-1],i=o.has(s),l=e.delta>0?"+".concat(e.delta):"".concat(e.delta),c=e.items.some((e=>e.d.sequenceStep===n));return(0,_.jsxs)(r.Fragment,{children:[(0,_.jsxs)("li",{className:"cdp-seq-diff is-group".concat(i?" is-expanded":"").concat(c?" is-focused":""),onClick:()=>{return e=s,void u((s=>{const a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a}));var e},"aria-expanded":i,children:[(0,_.jsxs)("span",{className:"cdp-seq-group-num",children:[(0,_.jsx)("span",{className:"cdp-seq-group-num-bg",style:{background:"linear-gradient(135deg, ".concat((0,I.gM)((a.planned||1)-1),", ").concat((0,I.gM)((t.planned||1)-1),")")}}),(0,_.jsxs)("span",{className:"cdp-seq-group-num-label",children:[e.items.length,"\xd7"]})]}),(0,_.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,_.jsxs)("div",{className:"cdp-seq-diff-title",children:[e.items.length," consecutive steps shifted"," ",(0,_.jsx)("span",{className:"cdp-seq-group-delta",children:l})]}),(0,_.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Planned ",(0,I.IE)(a.planned),"\u2013",(0,I.IE)(t.planned)," ","visited"," ",(0,_.jsxs)("strong",{children:[(0,I.IE)(a.actualPos),"\u2013",(0,I.IE)(t.actualPos)]})]})]}),(0,_.jsx)("span",{className:"cdp-seq-diff-tag",children:l}),(0,_.jsx)("span",{className:"cdp-seq-group-toggle".concat(i?" is-open":""),"aria-hidden":"true",children:(0,_.jsx)(S.j1Q,{})})]}),i&&(0,_.jsx)("li",{className:"cdp-seq-group-children-wrap",children:(0,_.jsx)("ul",{className:"cdp-seq-group-children",children:e.items.map((e=>f(e,!1)))})})]},"run-".concat(s,"-").concat(a.d.sequenceStep))}))}):(0,_.jsxs)("div",{className:"cdp-seq-good",children:[(0,_.jsx)(S.mU9,{})," Rider followed the planned route in order."]})})]}),(P||E)&&(0,_.jsxs)("section",{className:"cdp-section cdp-timing-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.pWE,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Timing"}),D>0&&(0,_.jsxs)("span",{className:"cdp-timing-active-tag",children:[(0,_.jsx)("span",{className:"cdp-timing-active-pulse"}),"Day window"]})]}),(0,_.jsxs)("div",{className:"cdp-timing-clock",children:[(0,_.jsxs)("div",{className:"cdp-clock-card is-start",children:[(0,_.jsxs)("div",{className:"cdp-clock-label",children:[(0,_.jsx)(S.WVj,{})," First delivery"]}),(0,_.jsxs)("div",{className:"cdp-clock-face",children:[(0,_.jsx)("span",{className:"cdp-clock-time",children:P?P.format("hh:mm"):"\u2014"}),(0,_.jsx)("span",{className:"cdp-clock-period",children:P?P.format("A"):""})]}),(0,_.jsx)("div",{className:"cdp-clock-caption",children:"Started"})]}),(0,_.jsxs)("div",{className:"cdp-clock-track","aria-hidden":"true",children:[(0,_.jsx)("span",{className:"cdp-clock-track-line"}),(0,_.jsx)("span",{className:"cdp-clock-track-dot is-start"}),(0,_.jsx)("span",{className:"cdp-clock-track-dot is-end"}),(0,_.jsxs)("div",{className:"cdp-clock-duration",children:[(0,_.jsx)("span",{className:"cdp-clock-duration-icon",children:(0,_.jsx)(S.DZH,{})}),(0,_.jsx)("span",{className:"cdp-clock-duration-val",children:D>0?D>=60?"".concat(Math.floor(D/60),"h ").concat(D%60,"m"):"".concat(D,"m"):"\u2014"}),(0,_.jsx)("span",{className:"cdp-clock-duration-sub",children:"active"})]})]}),(0,_.jsxs)("div",{className:"cdp-clock-card is-end",children:[(0,_.jsxs)("div",{className:"cdp-clock-label",children:[(0,_.jsx)(S.mU9,{})," Last delivery"]}),(0,_.jsxs)("div",{className:"cdp-clock-face",children:[(0,_.jsx)("span",{className:"cdp-clock-time",children:E?E.format("hh:mm"):"\u2014"}),(0,_.jsx)("span",{className:"cdp-clock-period",children:E?E.format("A"):""})]}),(0,_.jsx)("div",{className:"cdp-clock-caption",children:"Finished"})]})]}),(0,_.jsxs)("div",{className:"cdp-timing-stats",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,_.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,_.jsx)(S.VP9,{})}),(0,_.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-value",children:[L>0?"".concat(L):"\u2014",L>0&&(0,_.jsx)("span",{className:"cdp-timing-stat-unit",children:"min"})]}),(0,_.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg / stop"})]})]}),a.length>0&&(0,_.jsxs)("div",{className:"cdp-timing-stat-viz cdp-stops-dots","aria-hidden":"true",children:[Array.from({length:Math.min(a.length,12)}).map(((e,s)=>(0,_.jsx)("span",{className:"cdp-stop-dot"},"dot-".concat(s)))),(0,_.jsxs)("span",{className:"cdp-timing-stat-viz-label",children:[a.length," stop",1===a.length?"":"s"]})]})]}),null!=q&&(0,_.jsxs)("div",{className:"cdp-timing-stat",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,_.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,_.jsx)(S.BJM,{})}),(0,_.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,_.jsxs)("div",{className:"cdp-timing-stat-value",children:[q,(0,_.jsx)("span",{className:"cdp-timing-stat-unit",children:"km/h"})]}),(0,_.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg speed"})]})]}),(0,_.jsxs)("div",{className:"cdp-timing-stat-viz cdp-speed-gauge","aria-hidden":"true",children:[(0,_.jsx)("div",{className:"cdp-speed-gauge-track",children:(0,_.jsx)("div",{className:"cdp-speed-gauge-fill",style:{width:"".concat(Math.min(100,parseFloat(q)/60*100),"%")}})}),(0,_.jsxs)("div",{className:"cdp-speed-gauge-scale",children:[(0,_.jsx)("span",{children:"0"}),(0,_.jsx)("span",{children:"30"}),(0,_.jsx)("span",{children:"60 km/h"})]})]})]})]})]}),(R||O)&&(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.SeC,{})}),(0,_.jsx)("span",{className:"cdp-section-title",children:"Highlights"})]}),(0,_.jsxs)("div",{className:"cdp-highlights",children:[R&&(0,_.jsxs)("div",{className:"cdp-highlight is-best",onClick:()=>j(R.sequenceStep),role:"button",title:"Focus this step",children:[(0,_.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,_.jsxs)("div",{className:"cdp-highlight-content",children:[(0,_.jsxs)("div",{className:"cdp-highlight-top",children:[(0,_.jsxs)("span",{className:"cdp-highlight-label",children:[(0,_.jsx)("span",{className:"cdp-highlight-chip",children:(0,_.jsx)(S.mU9,{})}),"Fastest stop"]}),(0,_.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,I.gM)(R.sequenceStep-1)},children:["Step ",R.sequenceStep]})]}),(0,_.jsx)("div",{className:"cdp-highlight-title",children:R.deliverycustomer||"Step ".concat(R.sequenceStep)}),(0,_.jsx)("div",{className:"cdp-highlight-meta",children:(0,_.jsx)("span",{className:"cdp-highlight-pill is-good",children:null!=R.timeDeltaMin?0===R.timeDeltaMin?"On schedule":"".concat(R.timeDeltaMin>0?"+":"").concat(R.timeDeltaMin," min vs plan"):"On schedule"})})]})]}),O&&(0,_.jsxs)("div",{className:"cdp-highlight is-worst",onClick:()=>j(O.sequenceStep),role:"button",title:"Focus this step",children:[(0,_.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,_.jsxs)("div",{className:"cdp-highlight-content",children:[(0,_.jsxs)("div",{className:"cdp-highlight-top",children:[(0,_.jsxs)("span",{className:"cdp-highlight-label",children:[(0,_.jsx)("span",{className:"cdp-highlight-chip",children:(0,_.jsx)(S.Wux,{})}),"Biggest deviation"]}),(0,_.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,I.gM)(O.sequenceStep-1)},children:["Step ",O.sequenceStep]})]}),(0,_.jsx)("div",{className:"cdp-highlight-title",children:O.deliverycustomer||"Step ".concat(O.sequenceStep)}),(0,_.jsxs)("div",{className:"cdp-highlight-meta",children:[null!=O.kmDeltaPct&&(0,_.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:[O.kmDeltaPct>0?"+":"",O.kmDeltaPct.toFixed(0),"% route"]}),null!=O.timeDeltaMin&&O.timeDeltaMin>0&&(0,_.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:["+",O.timeDeltaMin,"m late"]})]})]})]})]})]}),B.length>1&&(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.$G1,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Trips (",B.length,")"]})]}),(0,_.jsx)("div",{className:"cdp-trips",children:B.map((e=>{const s=e.profit<0;return(0,_.jsxs)("div",{className:"cdp-trip",children:[(0,_.jsxs)("div",{className:"cdp-trip-head",children:[(0,_.jsxs)("span",{className:"cdp-trip-badge",children:["Trip ",e.tNum]}),(0,_.jsxs)("span",{className:"cdp-trip-meta",children:[e.delivered,"/",e.count," delivered"]})]}),(0,_.jsxs)("div",{className:"cdp-trip-stats",children:[(0,_.jsxs)("span",{title:"Distance",children:[(0,_.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",(0,_.jsxs)("small",{children:[" / ",e.plannedKm.toFixed(1)]})]}),(0,_.jsxs)("span",{className:s?"is-over":"",title:s?"Loss":"Profit",children:[(0,_.jsx)(S.ohY,{}),s?"-":"","\u20b9",Math.abs(e.profit).toFixed(0)]})]})]},"trip-".concat(e.tNum))}))})]}),x&&(e=>{const s=(0,I.gM)(x.sequenceStep-1),a=x.kmDelta>=0?"+":"",t=x.anomaly?"is-over":x.kmDelta<-.1?"is-under":"",i=null!=x.timeDeltaMin?x.timeDeltaMin>10?"is-over":x.timeDeltaMin<-2?"is-under":"":"",r=(0,I.Cx)(x.orderstatus),n=parseFloat((null===(e=x.order)||void 0===e?void 0:e.profit)||0);return(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.$G1,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Step ",x.sequenceStep," details"]}),(0,_.jsx)("button",{type:"button",className:"cdp-section-clear",onClick:()=>l(null),title:"Clear step focus",children:"Show all"})]}),(0,_.jsxs)("div",{className:"compare-delta".concat(x.anomaly?" is-anomaly":""),children:[(0,_.jsxs)("div",{className:"compare-delta-title",children:[(0,_.jsx)("span",{className:"compare-delta-step-badge",style:{background:s},children:x.sequenceStep}),(0,_.jsxs)("div",{className:"compare-delta-title-text",children:[(0,_.jsx)("div",{className:"compare-delta-title-main",children:x.deliverycustomer||"Step ".concat(x.sequenceStep)}),(0,_.jsxs)("div",{className:"compare-delta-title-sub",children:[x.pickupcustomer?"from ".concat(x.pickupcustomer," \xb7 "):"","Order #",x.orderid]})]}),x.orderstatus&&(0,_.jsx)("span",{className:"compare-delta-status",style:{background:r.bg,color:r.fg},children:r.label})]}),(0,_.jsxs)("div",{className:"compare-delta-grid",children:[(0,_.jsxs)("div",{className:"compare-delta-cell".concat(x.anomaly?" is-anomaly":""),children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:"Distance"}),(0,_.jsxs)("span",{className:"compare-delta-cell-val",children:[x.actualKm.toFixed(2)," ",(0,_.jsx)("span",{className:"compare-delta-cell-unit",children:"km"})]}),(0,_.jsxs)("span",{className:"compare-delta-cell-sub",children:["planned ",x.plannedKm.toFixed(2)," km"]})]}),(0,_.jsxs)("div",{className:"compare-delta-cell",children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:"\u0394 Route"}),(0,_.jsxs)("span",{className:"compare-delta-cell-val ".concat(t),children:[a,x.kmDelta.toFixed(2)," km"]}),(0,_.jsx)("span",{className:"compare-delta-cell-sub",children:null!=x.kmDeltaPct?"".concat(a).concat(x.kmDeltaPct.toFixed(0),"% vs plan"):"no planned km"})]}),(0,_.jsxs)("div",{className:"compare-delta-cell",children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:"Time"}),(0,_.jsx)("span",{className:"compare-delta-cell-val ".concat(i),children:null!=x.timeDeltaMin?"".concat(x.timeDeltaMin>0?"+":"").concat(x.timeDeltaMin," min"):"\u2014"}),(0,_.jsx)("span",{className:"compare-delta-cell-sub",children:x.actualTs&&x.expectedTs?"".concat(x.actualTs.format("HH:mm")," vs ").concat(x.expectedTs.format("HH:mm")):x.actualTs?"delivered ".concat(x.actualTs.format("HH:mm")):"in flight"})]}),!Number.isNaN(n)&&0!==n&&(0,_.jsxs)("div",{className:"compare-delta-cell".concat(n<0?" is-anomaly":""),children:[(0,_.jsx)("span",{className:"compare-delta-cell-label",children:n<0?"Loss":"Profit"}),(0,_.jsxs)("span",{className:"compare-delta-cell-val ".concat(n<0?"is-over":"is-under"),children:[n<0?"-":"","\u20b9",Math.abs(n).toFixed(0)]}),(0,_.jsx)("span",{className:"compare-delta-cell-sub",children:"order revenue"})]})]})]})]})})(),k.length>0&&(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon cdp-icon-warn",children:(0,_.jsx)(S.ItP,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Deviations (",k.length,")"]})]}),(0,_.jsx)("ul",{className:"cdp-dev-list",children:k.map((e=>{const s=(0,I.gM)(e.sequenceStep-1),a=e.kmDelta>=0?"+":"";return(0,_.jsxs)("li",{className:"cdp-dev-item".concat(n===e.sequenceStep?" is-focused":""),onClick:()=>j(e.sequenceStep),children:[(0,_.jsx)("span",{className:"cdp-dev-num",style:{background:s},children:e.sequenceStep}),(0,_.jsxs)("div",{className:"cdp-dev-body",children:[(0,_.jsx)("div",{className:"cdp-dev-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,_.jsxs)("div",{className:"cdp-dev-meta",children:[null!=e.kmDeltaPct&&(0,_.jsxs)("span",{className:"cdp-dev-chip is-over",children:[a,e.kmDeltaPct.toFixed(0),"% route"]}),null!=e.timeDeltaMin&&e.timeDeltaMin>10&&(0,_.jsxs)("span",{className:"cdp-dev-chip is-over",children:["+",e.timeDeltaMin,"m late"]})]})]})]},"dev-".concat(e.sequenceStep))}))})]}),(0,_.jsxs)("section",{className:"cdp-section",children:[(0,_.jsxs)("div",{className:"cdp-section-head",children:[(0,_.jsx)("span",{className:"cdp-section-icon",children:(0,_.jsx)(S.EgJ,{})}),(0,_.jsxs)("span",{className:"cdp-section-title",children:["Steps (",a.length,")"]}),(0,_.jsxs)("span",{className:"cdp-section-sub",children:[w,"/",a.length," delivered"]})]}),(0,_.jsx)("ul",{className:"cdp-step-list",children:a.map((e=>{var s;const a=(0,I.gM)(e.sequenceStep-1),t=String(e.orderstatus||"").toLowerCase(),i=I.Ys.has(t),r=I.yP.has(t),l=i&&!e.anomaly,c=n===e.sequenceStep,d=(0,I.Cx)(e.orderstatus),o=parseFloat((null===(s=e.order)||void 0===s?void 0:s.profit)||0),u=e.kmDelta>=0?"+":"",m=null!=e.timeDeltaMin?e.timeDeltaMin>10?"is-over":e.timeDeltaMin<-2?"is-under":"":"",p=["cdp-step",c?"is-focused":"",e.anomaly?"is-anomaly":"",l?"is-correct":"",r?"is-skipped":"",e.isLoading?"is-loading":""].filter(Boolean).join(" ");return(0,_.jsxs)("li",{className:p,onClick:()=>j(e.sequenceStep),children:[(0,_.jsxs)("span",{className:"cdp-step-num",style:{background:a},children:[e.sequenceStep,l&&(0,_.jsx)("span",{className:"cdp-step-check",children:(0,_.jsx)(S.mU9,{})}),e.anomaly&&(0,_.jsx)("span",{className:"cdp-step-flag",children:(0,_.jsx)(S.ItP,{})})]}),(0,_.jsxs)("div",{className:"cdp-step-body",children:[(0,_.jsxs)("div",{className:"cdp-step-title-row",children:[(0,_.jsx)("span",{className:"cdp-step-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),e.orderstatus&&(0,_.jsx)("span",{className:"cdp-step-status",style:{background:d.bg,color:d.fg},children:d.label})]}),(0,_.jsxs)("div",{className:"cdp-step-sub",children:[e.pickupcustomer?"from ".concat(e.pickupcustomer," \xb7 "):"","Order #",e.orderid]}),(0,_.jsxs)("div",{className:"cdp-step-deltas",children:[(0,_.jsxs)("span",{className:"cdp-step-delta",title:"Distance",children:[(0,_.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",e.plannedKm>0&&(0,_.jsxs)("small",{className:e.anomaly?"is-over":"",children:[" ",u,e.kmDelta.toFixed(1)]})]}),(0,_.jsxs)("span",{className:"cdp-step-delta ".concat(m),title:"Delivery time",children:[(0,_.jsx)(S.VP9,{}),e.actualTs?e.actualTs.format("HH:mm"):"\u2014",null!=e.timeDeltaMin&&(0,_.jsxs)("small",{children:[" ",e.timeDeltaMin>0?"+":"",e.timeDeltaMin,"m"]})]}),!Number.isNaN(o)&&0!==o&&(0,_.jsxs)("span",{className:"cdp-step-delta".concat(o<0?" is-over":""),title:o<0?"Loss":"Profit",children:[(0,_.jsx)(S.ohY,{}),o<0?"-":"","\u20b9",Math.abs(o).toFixed(0)]})]})]})]},"step-".concat(e.sequenceStep))}))})]})]})]})};var B=a(85571);const K=["_ts"],U="#662582",G="#10b981",J=e=>{const s=parseFloat(e);return Number.isFinite(s)?s:NaN},W=e=>{if(!e)return"";const s=String(e).trim();if(!s)return"";if(s.includes(",")){const e=s.split(",").map((e=>e.trim())).filter(Boolean);return 0===e.length?s:e.length<=2?e.join(", "):e.slice(-2).join(", ")}const a=s.split(/\s+/).filter(Boolean),t=a.length>6?a.slice(-6).join(" "):s;return t.length>40?"".concat(t.slice(0,40).trim(),"\u2026"):t},$=e=>Number.isFinite(J(e.droplat||e.deliverylat))&&Number.isFinite(J(e.droplon||e.deliverylong)),Z=e=>e.pickuplat||e.pickuplatitude||e.pickup_lat,X=e=>e.pickuplong||e.pickuplongitude||e.picklongitude||e.pickup_lon,Q=e=>Number.isFinite(J(Z(e)))&&Number.isFinite(J(X(e))),ee=[{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}],se="dispatch.slots.v9",ae=["dispatch.slots.v1","dispatch.slots.v2","dispatch.slots.v3","dispatch.slots.v4","dispatch.slots.v5","dispatch.slots.v6","dispatch.slots.v7","dispatch.slots.v8"],te=(e,s)=>"Slot ".concat(e+1," \xb7 ").concat(ie(s)),ie=e=>{const s=Math.floor(e),a=Math.round(60*(e-s)),t=(s+11)%12+1,i=s>=12&&s<24?"PM":"AM";if(0===a)return"".concat(t," ").concat(i);const r=String(a).padStart(2,"0");return"".concat(t,":").concat(r," ").concat(i)},re=(e,s)=>s>=24?"After ".concat(ie(e)):"".concat(ie(e),"\u2013").concat(ie(s)),ne=ee.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{label:e.name||te(s,e.startHour),range:re(e.startHour,e.endHour)}))),le=(e,s)=>{for(const a of s)if(e>=a.startHour&&e2&&void 0!==arguments[2]?arguments[2]:ne;const a=((e,s)=>{const a=ce.find((e=>e.id===s))||ce[0];for(const t of a.keys)if(null!==e&&void 0!==e&&e[t])return e[t];return null})(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all");if(!a)return null;const t=String(a).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))return null;const i=f()(a);return i.isValid()?le(i.hour()+i.minute()/60,s):null};function oe(e){let{targetRef:s}=e;const a=(0,n.ko)();return(0,r.useEffect)((()=>(s.current=a,()=>{s.current=null})),[a]),null}function ue(e){let{trigger:s}=e;const a=(0,n.ko)();return(0,r.useEffect)((()=>{const e=[0,60,120,200,300,380].map((e=>setTimeout((()=>a.invalidateSize({animate:!1})),e)));return()=>e.forEach(clearTimeout)}),[s,a]),null}function me(e,s){const a=e=>e*Math.PI/180,t=a(e[0]),i=a(s[0]),r=a(s[0]-e[0]),n=a(s[1]-e[1]),l=Math.sin(r/2)**2+Math.cos(t)*Math.cos(i)*Math.sin(n/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function pe(e){if(!Array.isArray(e)||e.length<2)return 0;let s=0;for(let a=1;a{let a=0,t=1/0;for(let i=0;i{const a=Math.max(s,i);t.push(e.slice(i,a+1)),i=a})),t}const ve=e=>{if(!e)return null;const s=f()(e);return s.isValid()?s.format("HH:mm:ss"):String(e)},xe=[{key:"assigntime",label:"Assigned"},{key:"acceptedtime",label:"Accepted"},{key:"arrivaltime",label:"Arrived"},{key:"pickuptime",label:"Pickup"},{key:"starttime",label:"Started"},{key:"deliverytime",label:"Delivered",final:!0}],je=e=>{const s=e.filter($);if(!s.length)return[];const a=e.find(Q),t=[];return a&&t.push([J(Z(a)),J(X(a))]),s.forEach((e=>t.push([J(e.droplat||e.deliverylat),J(e.droplon||e.deliverylong)]))),t},fe=(e,s,a)=>{if(!a||0===a.length)return"".concat(e,"-").concat(s);const t=a.map((e=>"".concat(e[0].toFixed(5),",").concat(e[1].toFixed(5)))).join("|");return"".concat(e,"-").concat(s,"-").concat(t)};delete v().Icon.Default.prototype._getIconUrl,v().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png"});const ge=["#0055FF","#00D82C","#FF6B00","#9D00FF","#FF00A8","#00C2B2","#FF9900","#FF0000"],Ne=e=>{const s=String(null!==e&&void 0!==e?e:"");if(!s)return ge[0];let a=0;for(let t=0;t>>0;return ge[a%ge.length]},be=e=>{let{focusedItem:s,viewMode:a,orders:t,kitchens:i,locationKey:l}=e;const c=(0,n.ko)(),d=(0,r.useRef)(""),o=(0,r.useMemo)((()=>{const e=null!=l?"loc:".concat(l,"|"):"",r=e=>{let s=0,a=0,t=0;for(const i of e)Number.isFinite(i[0])&&Number.isFinite(i[1])&&(s+=i[0],a+=i[1],t+=1);return 0===t?"0":"".concat((s/t).toFixed(1),",").concat((a/t).toFixed(1))};if(s){var n,c,d;const a=null!==(n=null!==(c=null!==(d=s.id)&&void 0!==d?d:s.kitchenName)&&void 0!==c?c:s.name)&&void 0!==n?n:null!=s.lat?"".concat(s.lat,",").concat(s.lon):"item",t=s.orders?s.orders.length:0;return"".concat(e,"f|").concat(a,"|").concat(t)}const o=(i||[]).map((e=>[e.lat,e.lon])),u=r(o);if("kitchens"===a){const s=o.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1]))).length;return"".concat(e,"k|").concat(s,"|").concat(u)}if("all"===a){const s=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));return"".concat(e,"a|").concat(s.length,"|").concat(r(s))}return"".concat(e,"m|").concat(a||"","|").concat(o.length,"|").concat(u)}),[s,a,t,i,l]);return(0,r.useEffect)((()=>{if(d.current===o)return;let e=[];s?s.orders?(e=s.orders.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),s.orders.forEach((s=>e.push([J(Z(s)),J(X(s))])))):e=[[s.lat,s.lon]]:"kitchens"===a?(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])))):"all"===a?e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])):(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]))));const r=e.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1])));if(r.length>0){const e=v().latLngBounds(r);if(e.isValid()){1===r.length||e.getNorthEast().equals(e.getSouthWest())?c.setView(r[0],15,{animate:!0,duration:.6}):c.flyToBounds(e,{padding:[60,60],duration:.6,maxZoom:16}),d.current=o}}else;}),[o,s,a,t,i,c]),null},ye=e=>{let{target:s,icon:a,duration:t=950,zIndexOffset:i,eventHandlers:n,children:c,markerRef:d}=e;const o=(0,r.useRef)(null),u=(0,r.useRef)(null),m=(0,r.useRef)(s),p=(0,r.useRef)(null),h=Array.isArray(s)?Number(s[0]):NaN,x=Array.isArray(s)?Number(s[1]):NaN;return(0,r.useEffect)((()=>{const e=o.current;if(!e||!Number.isFinite(h)||!Number.isFinite(x))return;const s=v().latLng(h,x),a=e.getLatLng();if(!a)return void e.setLatLng(s);const i=s.lat-a.lat,r=s.lng-a.lng;if(Math.abs(i)<1e-6&&Math.abs(r)<1e-6)return void e.setLatLng(s);let n=!1;try{n=a.distanceTo(s)>2e3}catch(g){n=!1}if(n)return e.setLatLng(s),void(p.current=performance.now());u.current&&cancelAnimationFrame(u.current);const l=performance.now(),c=null==p.current?t:l-p.current,d=Math.max(800,Math.min(32e3,c));p.current=l;const m=a.lat,j=a.lng,f=s=>{const a=Math.min(1,(s-l)/d);e.setLatLng([m+i*a,j+r*a]),a<1&&(u.current=requestAnimationFrame(f))};return u.current=requestAnimationFrame(f),()=>{u.current&&cancelAnimationFrame(u.current)}}),[h,x,t]),(0,r.useEffect)((()=>()=>{u.current&&cancelAnimationFrame(u.current)}),[]),(0,_.jsx)(l.p,{ref:e=>{o.current=e,"function"===typeof d?d(e):d&&(d.current=e)},position:m.current,icon:a,zIndexOffset:i,eventHandlers:n,children:c})},ke=e=>{let{children:s}=e;return(0,_.jsx)("span",{className:"ico-inline",style:{display:"inline-flex",alignItems:"center",verticalAlign:"-2px",marginRight:4},children:s})},Se=[{key:"morning",label:"Morning",timeRange:"12:00 AM \u2013 8:00 AM",sub:"Early shift orders",color:"#f59e0b",bg:"#fffbeb",border:"#fde68a"},{key:"afternoon",label:"Noon",timeRange:"9:00 AM \u2013 12:30 PM",sub:"Lunch rush window",color:"#10b981",bg:"#ecfdf5",border:"#a7f3d0"},{key:"evening",label:"Evening",timeRange:"4:00 PM \u2013 7:00 PM",sub:"Dinner & end-of-day",color:"#6366f1",bg:"#eef2ff",border:"#c7d2fe"}],_e=e=>{if(null==e)return"\u2014";if("number"===typeof e)return e.toLocaleString("en-IN");const s=parseFloat(e);return Number.isFinite(s)?s.toLocaleString("en-IN"):String(e)},we=e=>{if(!e||"string"!==typeof e)return null;const s=e.split(":").map(Number);if(s.length<2||s.some((e=>!Number.isFinite(e))))return null;const[a,t,i=0]=s;return 3600*a+60*t+i},Fe=e=>{let{data:s,embedded:a=!1,selectedRiderId:n,onRiderSelect:h,pulseOrderId:x,onChangeRider:j}=e;const w=null!==s&&void 0!==s&&s.zones&&s.zones.length>0?"zones":"riders",[F,M]=(0,r.useState)(w),[C,A]=(0,r.useState)("live"),[z,P]=(0,r.useState)({}),[E,D]=(0,r.useState)(null),[L,q]=(0,r.useState)(null),[H,Y]=(0,r.useState)(null);(0,r.useEffect)((()=>{if(!H)return;const e=e=>{"Escape"===e.key&&Y(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[H]);const ie=(0,g.n)({mutationFn:T.W0,onMutate:e=>D(e.batch),onSuccess:(e,s)=>{P((a=>(0,i.A)((0,i.A)({},a),{},{[s.batch]:{data:e,fetchedAt:f()().format("HH:mm:ss")}})))},onSettled:()=>D(null)}),ce=e=>{q(e);const s=z[e];s&&s.data&&!1!==s.data.success||ie.mutate({batch:e,tenantId:916})},Fe=15e3,Me=(0,r.useRef)(null);(0,r.useEffect)((()=>{Me.current=E}),[E]),(0,r.useEffect)((()=>{if("analysis"!==C)return;if(!L)return;const e=setInterval((()=>{Me.current||"undefined"!==typeof document&&document.hidden||ie.mutate({batch:L,tenantId:916})}),Fe);return()=>clearInterval(e)}),[C,L]);const[Ce,Ae]=(0,r.useState)(new Set),[ze,Pe]=(0,r.useState)(null),[Ee,De]=(0,r.useState)(null),[Le,qe]=(0,r.useState)(null),[Re,Ie]=(0,r.useState)(null),[Oe,Te]=(0,r.useState)("planned"),He=(0,r.useRef)({}),Ye=(0,r.useRef)(new Set),Ve=(0,r.useRef)(new Set),Be=(0,r.useRef)(new Map),Ke=((0,r.useRef)(null),(0,r.useRef)(null)),[Ue,Ge]=(0,r.useState)(null),Je=void 0!==n,[We,$e]=(0,r.useState)(""),{data:Ze}=(0,N.I)({queryKey:["appLocations"],queryFn:T.aL,staleTime:3e5}),Xe="undefined"!==typeof window?localStorage.getItem("applocationid"):null,[Qe,es]=(0,r.useState)(null!=Xe?Number(Xe):0),[ss,as]=(0,r.useState)(!1),ts=(0,r.useRef)(null),[is,rs]=(0,r.useState)("assigned"),[ns,ls]=(0,r.useState)(!1),cs=(0,r.useRef)(null),[ds,os]=(0,r.useState)((()=>{if("undefined"===typeof window)return ne;try{const e=window.localStorage.getItem(se);if(!e)return ne;const s=JSON.parse(e);return Array.isArray(s)&&s.length===ee.length?s.map(((e,s)=>{const a=e.id||"slot-".concat(s+1),t=Number(e.startHour)||0,i=Number(e.endHour)||24,r=ne.find((e=>e.id===a));return{id:a,startHour:t,endHour:i,label:(null===r||void 0===r?void 0:r.name)||te(s,t),range:re(t,i)}})):ne}catch(e){return ne}})),us=ds,[ms,ps]=(0,r.useState)(!1),hs=(0,r.useRef)(null);(0,r.useEffect)((()=>{if("undefined"!==typeof window)try{ae.forEach((e=>window.localStorage.removeItem(e)))}catch(e){}}),[]);const vs=(0,r.useRef)(!1);(0,r.useEffect)((()=>{if(vs.current){if("undefined"!==typeof window)try{window.localStorage.setItem(se,JSON.stringify(ds.map((e=>{let{id:s,startHour:a,endHour:t}=e;return{id:s,startHour:a,endHour:t}}))))}catch(e){}}else vs.current=!0}),[ds]),(0,r.useEffect)((()=>{if(!ss)return;const e=e=>{ts.current&&!ts.current.contains(e.target)&&as(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[ss]),(0,r.useEffect)((()=>{if(!ns)return;const e=e=>{cs.current&&!cs.current.contains(e.target)&&ls(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[ns]),(0,r.useEffect)((()=>{if(!ms)return;const e=e=>{hs.current&&!hs.current.contains(e.target)&&ps(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[ms]);const[xs,js]=(0,r.useState)(null),[fs,gs]=(0,r.useState)(""),{data:Ns,isFetching:bs,isError:ys,error:ks}=(0,N.I)({queryKey:["riderPeriodicLog",xs],queryFn:()=>(0,T.ne)(xs),enabled:"rider-info"===F&&null!=xs,refetchInterval:"rider-info"===F&&null!=xs&&15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),Ss=(0,r.useMemo)((()=>{const e=parseFloat(null===Ns||void 0===Ns?void 0:Ns.latitude),s=parseFloat(null===Ns||void 0===Ns?void 0:Ns.longitude);return Number.isFinite(e)&&Number.isFinite(s)?{lat:e.toFixed(4),lon:s.toFixed(4)}:null}),[null===Ns||void 0===Ns?void 0:Ns.latitude,null===Ns||void 0===Ns?void 0:Ns.longitude]),{data:_s}=(0,N.I)({queryKey:["reverseGeocode",null===Ss||void 0===Ss?void 0:Ss.lat,null===Ss||void 0===Ss?void 0:Ss.lon],queryFn:async()=>{const e=await fetch("https://nominatim.openstreetmap.org/reverse?lat=".concat(Ss.lat,"&lon=").concat(Ss.lon,"&format=json&zoom=16&addressdetails=1"),{headers:{Accept:"application/json"}});if(!e.ok)return null;const s=await e.json(),a=(null===s||void 0===s?void 0:s.address)||{};return{area:a.suburb||a.neighbourhood||a.village||a.hamlet||a.city_district||a.town||a.city||a.county||a.state||"",display:(null===s||void 0===s?void 0:s.display_name)||""}},enabled:"rider-info"===F&&!!Ss,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}),ws=(0,r.useMemo)((()=>{if(!Ze)return null;const e=Ze.find((e=>String(e.applocationid)===String(Qe)));return(null===e||void 0===e?void 0:e.locationname)||null}),[Ze,Qe]),[Fs,Ms]=(0,r.useState)({}),Cs=(0,r.useRef)({}),[As,zs]=(0,r.useState)({}),Ps=(0,r.useRef)({}),[Es,Ds]=(0,r.useState)(!1),[Ls,qs]=(0,r.useState)([]),[Rs,Is]=(0,r.useState)({}),Os=(0,r.useRef)(!1),[Ts,Hs]=(0,r.useState)(f()().format("YYYY-MM-DD")),[Ys,Vs]=(0,r.useState)(!1),[Bs,Ks]=(0,r.useState)((()=>f()(Ts).isValid()?f()(Ts).startOf("month"):f()().startOf("month"))),Us=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(!Ys)return;const e=e=>{Us.current&&(Us.current.contains(e.target)||Vs(!1))},s=e=>{"Escape"===e.key&&Vs(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}}),[Ys]),(0,r.useEffect)((()=>{if(Ys){const e=f()(Ts);e.isValid()&&Ks(e.startOf("month"))}}),[Ys,Ts]);const[Gs,Js]=(0,r.useState)(!1),[Ws,$s]=(0,r.useState)("combined"),[Zs,Xs]=(0,r.useState)(!0),[Qs,ea]=(0,r.useState)(!0),[sa,aa]=(0,r.useState)((()=>new Set)),ta=(0,r.useRef)(!1),[ia,ra]=(0,r.useState)(!1),na=(0,r.useRef)(!1),la=(0,r.useRef)(!1),[ca,da]=(0,r.useState)(!1),[oa,ua]=(0,r.useState)(null),ma=(0,r.useRef)(null),pa=(0,r.useRef)(null);pa.current||(pa.current=v().canvas({padding:1.5,tolerance:5}));const{data:ha}=(0,N.I)({queryKey:[Qe,Ts,""],queryFn:T.zb,refetchInterval:15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),va=(0,r.useMemo)((()=>(ha||[]).map((e=>{var s;const a=parseFloat(null===e||void 0===e?void 0:e.latitude),t=parseFloat(null===e||void 0===e?void 0:e.longitude);return Number.isFinite(a)&&Number.isFinite(t)?{id:String(null!==(s=e.userid)&&void 0!==s?s:""),userid:e.userid,username:e.username||"Rider #".concat(e.userid),status:String(e.status||"").toLowerCase(),contactno:e.contactno,orderid:e.orderid,logdate:e.logdate,lat:a,lon:t}:null})).filter(Boolean)),[ha]),xa=(0,r.useMemo)((()=>new Set(va.filter((e=>"active"===e.status)).map((e=>String(e.id))))),[va]),[ja,fa]=(0,r.useState)((()=>{const e=f()();return le(e.hour()+e.minute()/60,ne)||ne[0].id}));(0,r.useEffect)((()=>{var e;"all"!==ja&&(us.some((e=>e.id===ja))||fa((null===(e=us[0])||void 0===e?void 0:e.id)||"all"))}),[us,ja]);const ga=(0,r.useRef)(null),Na=!s,ba="undefined"!==typeof window&&localStorage.getItem("userid")||0,{data:ya,isFetching:ka,isError:Sa,fetchNextPage:_a,hasNextPage:wa,isFetchingNextPage:Fa}=(0,b.q)({queryKey:["dispatchDeliveries",Qe,ba,"all",Ts,Ts,50,"",0,0,0],queryFn:T.tL,getNextPageParam:e=>{var s;return null!==(s=e.nextPage)&&void 0!==s?s:void 0},enabled:Na,refetchInterval:"all"===F&&15e3,refetchIntervalInBackground:!1});(0,r.useEffect)((()=>{Na&&wa&&!Fa&&_a()}),[Na,wa,Fa,_a]);const Ma=(0,r.useMemo)((()=>{const e=((null===ya||void 0===ya?void 0:ya.pages)||[]).flatMap((e=>e.rows||[])),s=new Set,a=[];for(const t of e){const e=null!=t.orderid?String(t.orderid):null;e&&s.has(e)||(e&&s.add(e),a.push(t))}return a}),[ya]),Ca=(0,r.useMemo)((()=>{const e=new Map;return Ma.forEach((s=>{const a=String(s.userid||s.rider_id||"");a&&"unassigned"!==a&&"0"!==a&&(e.has(a)||e.set(a,{id:a,riderName:s.ridername||s.rider_name||s.username||"Rider ".concat(a)}))})),Array.from(e.values()).sort(((e,s)=>String(e.riderName).localeCompare(String(s.riderName))))}),[Ma]),Aa=(0,r.useMemo)((()=>{const e={all:Ma.length};return us.forEach((s=>{e[s.id]=0})),Ma.forEach((s=>{const a=de(s,is,us);a&&(e[a]=(e[a]||0)+1)})),e}),[Ma,is,us]),za=(0,r.useMemo)((()=>"all"===ja?Ma:Ma.filter((e=>de(e,is,us)===ja))),[Ma,ja,is,us]),Pa=(0,r.useMemo)((()=>{let e=0;const s={};return Ma.forEach((e=>{const a=de(e,is,us);if(!a||"all"===a)return;const t=String(e.userid||e.rider_id||"unassigned");if("unassigned"===t||"0"===t)return;s[a]||(s[a]={}),s[a][t]||(s[a][t]={revenue:0,kms:0});const i=parseFloat(e.kms||e.actualkms||0);s[a][t].kms+=i,s[a][t].revenue+=i<=8?30:30+6*(i-8)})),Object.values(s).forEach((s=>{Object.values(s).forEach((s=>{const a=2.5*s.kms+166.67;e+=s.revenue-a}))})),e}),[Ma,is,us]),Ea=(0,r.useMemo)((()=>{if(!Na)return null;if(!za.length)return{code:200,zone_summary:[],zones:[]};const e=e=>String(e||"").trim(),s={};za.forEach((a=>{const t=e(a.deliverysuburb)||e(a.locationsuburb)||e(a.zone_name)||"Unzoned",i=t.toLowerCase(),r=String(a.userid||a.rider_id||"unassigned"),n=a.ridername||a.rider_name||a.username||("unassigned"===r?"Unassigned":"Rider ".concat(r));s[i]||(s[i]={zone_name:t,riders:{}}),s[i].riders[r]||(s[i].riders[r]={rider_id:r,rider_name:n,orders:[]}),s[i].riders[r].orders.push(a)}));const a=Object.values(s).map((e=>{const s=Object.values(e.riders).map((e=>{const s=[...e.orders].sort(((e,s)=>f()(e.deliverydate||e.assigntime||0).valueOf()-f()(s.deliverydate||s.assigntime||0).valueOf()));return(0,i.A)((0,i.A)({},e),{},{orders:s.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{trip_number:e.trip_number||1,step:e.step||s+1})))})}));return{zone_name:e.zone_name,riders:s}}));return{code:200,zone_summary:a.map((e=>{const s=e.riders.flatMap((e=>e.orders)),a=s.filter((e=>e.userid||e.rider_id)).length;return{zone_name:e.zone_name,total_orders:s.length,assigned_orders:a,unassigned_orders_count:s.length-a,active_riders_count:e.riders.filter((e=>"unassigned"!==e.rider_id)).length,total_delivery_kms:s.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),total_profit:s.reduce(((e,s)=>e+parseFloat(s.profit||0)),0)}})),zones:a}}),[Na,za]),Da=(0,r.useMemo)((()=>{const e=s||Ea||{zones:[],zone_summary:[]},a=e.zones||[],t={};(e.zone_summary||[]).forEach((e=>{t[e.zone_name]=e}));const i=(e,s)=>{const a={};return e.forEach((e=>{const t=s(e);t&&(a[t]=(a[t]||0)+1)})),Object.entries(a).map((e=>{let[s,a]=e;return{name:s,count:a}})).sort(((e,s)=>s.count-e.count))};return a.map((e=>{var s,a,r,n;const l=t[e.zone_name]||{},c=(e.riders||[]).flatMap((e=>e.orders||[])),d=(e.riders||[]).filter((e=>e.rider_id&&"unassigned"!==e.rider_id)).length,o=i(c,(e=>e.deliverysuburb||e.locationsuburb)),u=i(c,(e=>e.pickupcustomer||e.kitchen_key)),m={};return c.forEach((e=>{const s=String(e.orderstatus||"unknown").toLowerCase();m[s]=(m[s]||0)+1})),{id:e.zone_name,name:e.zone_name,riders:e.riders||[],orders:c,totalOrders:null!==(s=l.total_orders)&&void 0!==s?s:c.length,activeRidersCount:null!==(a=l.active_riders_count)&&void 0!==a?a:d,totalKms:null!==(r=l.total_delivery_kms)&&void 0!==r?r:c.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),totalProfit:null!==(n=l.total_profit)&&void 0!==n?n:c.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),suburbs:o,kitchens:u,statusCounts:m}}))}),[s,Ea]),{riders:La,kitchens:qa,allOrders:Ra,stats:Ia}=(0,r.useMemo)((()=>{const e=s||Ea||{zones:[],zone_summary:[]},a=[];(e.zones||[]).forEach((e=>{(e.riders||[]).forEach((s=>{s.orders.forEach((t=>{a.push((0,i.A)((0,i.A)({},t),{},{zone_name:e.zone_name,rider_name:s.rider_name,rider_id:s.rider_id}))}))}))}));const t={};(e.zones||[]).forEach((e=>{(e.riders||[]).forEach((e=>{const s=e.rider_id;s&&"unassigned"!==s&&(t[s]||(t[s]={id:s,riderName:e.rider_name||e.username||s,orders:[],color:ge[Object.keys(t).length%ge.length]}))}))})),a.forEach((e=>{const s=e.rider_id||e.userid||"unknown";"unassigned"!==s&&(t[s]||(t[s]={id:s,riderName:e.rider_name||e.username||e.rider||s,orders:[],color:ge[Object.keys(t).length%ge.length]}),t[s].orders.some((s=>s.orderid===e.orderid))||t[s].orders.push(e))}));const r={};a.forEach((e=>{const s=e.pickupcustomer||e.kitchen_key||"Unknown",a=s.toLowerCase().trim();r[a]?!Number.isFinite(r[a].lat)&&Q(e)&&(r[a].lat=J(Z(e)),r[a].lon=J(X(e))):r[a]={id:a,kitchenName:s,lat:J(Z(e)),lon:J(X(e)),orders:[],riders:new Set},r[a].orders.push(e),e.rider_id&&r[a].riders.add(e.rider_id)}));const n=a.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),l=a.reduce(((e,s)=>e+parseFloat(s.profit||0)),0);return{riders:Object.values(t).map((e=>(0,i.A)((0,i.A)({},e),{},{orders:[...e.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)}))}))).sort(((e,s)=>s.orders.length-e.orders.length)),kitchens:Object.values(r).sort(((e,s)=>s.orders.length-e.orders.length)),allOrders:a,stats:{totalOrders:a.length,totalKms:n,totalProfit:l,totalRiders:Object.keys(t).length}}}),[s,Ea]),Oa=Je?n&&La.find((e=>e.id===n))||null:ze,Ta="all"===F,Ha=(0,r.useMemo)((()=>Ta?Ra.filter((e=>xa.has(String(e.rider_id)))):Ra),[Ta,Ra,xa]),Ya=(0,r.useMemo)((()=>new Set((Ta?Ha:[]).filter(I.L0).map((e=>String(e.rider_id))))),[Ta,Ha]),Va=(0,r.useMemo)((()=>Ta?La.filter((e=>Ya.has(String(e.id)))):La),[Ta,La,Ya]),Ba=(0,r.useMemo)((()=>Ta?va.filter((e=>"active"===e.status&&Ya.has(String(e.id)))).map((e=>[e.lat,e.lon])):[]),[Ta,va,Ya]),Ka=(0,r.useMemo)((()=>Ta?Ha.filter(I.L0).length:0),[Ta,Ha]),Ua=(0,r.useCallback)((e=>{h&&h(e?e.id:null),Je||Pe(e),Ie(null)}),[Je,h]),Ga=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=Oa?Oa.id:null;e!==Ga.current&&(Oa?B.A.info("Focused rider changed to: ".concat(Oa.riderName," (").concat(Oa.orders.length," orders)")):B.A.info("Focused rider reset to: None"),Ga.current=e)}),[Oa]),(0,r.useEffect)((()=>{Re?B.A.info("Focused order updated: ID ".concat(Re.orderid)):B.A.debug("Focused order selection cleared")}),[Re]);const Ja=(0,r.useRef)(0);(0,r.useEffect)((()=>{Ra&&Ra.length!==Ja.current&&(B.A.info("Orders database updated: ".concat(Ra.length," orders actively tracked")),Ja.current=Ra.length)}),[Ra]);const Wa=(0,r.useRef)(0);(0,r.useEffect)((()=>{va&&va.length!==Wa.current&&(B.A.info("Live riders list updated: ".concat(va.length," active riders mapped")),Wa.current=va.length)}),[va]);const $a=(0,r.useMemo)((()=>{if(Oa)return{orders:Oa.orders.length,riders:1,km:Oa.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:Oa.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Rider"};if(Ee)return{orders:Ee.orders.length,riders:Ee.riders.size,km:Ee.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:Ee.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Kitchen"};if(Ta){const e=Ra.filter(I.L0);return{orders:e.length,riders:Va.length,km:e.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:e.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Active Fleet"}}return{orders:Ia.totalOrders,riders:Ia.totalRiders,km:Ia.totalKms,profit:Ia.totalProfit,label:"Total Fleet"}}),[Oa,Ee,Ta,Ha,Va,Ia]),Za=(0,r.useMemo)((()=>{if(!Oa)return[];const e=new Set;return Oa.orders.forEach((s=>{null!=s.deliveryid&&""!==s.deliveryid&&0!==s.deliveryid&&e.add(String(s.deliveryid))})),Array.from(e)}),[Oa]),Xa=(0,y.E)({queries:Za.map((e=>({queryKey:["deliveryLogs",e],queryFn:async()=>{var s,a;const i=await k.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e));return function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const a=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===a.length)return[];if(1===a.length)return[{lat:a[0].lat,lng:a[0].lng,logdate:a[0].logdate,_ts:a[0]._ts}];const t=null!=s.processNoise?s.processNoise:1e-10,i=null!=s.measurementNoise?s.measurementNoise:2e-9,r=null!=s.outlierGate?s.outlierGate:9,n=null!=s.maxSpeedKmh?s.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let c=0;for(;cn||(d.push(e),o=s)}if(d.length<2)return d.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const u=e=>{const s=d.length,a=new Array(s),n=new Array(s),c=new Array(s),o=new Array(s),u=new Array(s),m=l(d[0]),p=l(d[1]),h=Math.max(.1,(p-m)/1e3),v=(d[1][e]-d[0][e])/h;a[0]=[d[0][e],v],n[0]=[i,0,0,1],c[0]=a[0].slice(),o[0]=n[0].slice(),u[0]=0;let x=m;for(let f=1;fr){a[f]=[v,j],n[f]=[_,w,F,M];continue}const z=_/A,P=F/A,E=v+z*C,D=j+P*C;a[f]=[E,D],n[f]=[(1-z)*_,(1-z)*w,F-P*_,M-P*w]}const j=new Array(s);j[s-1]=a[s-1].slice();for(let t=s-2;t>=0;t--){const e=u[t+1],[s,i,r,l]=n[t],d=s+e*i,m=i,p=r+e*l,h=l,[v,x,f,g]=o[t+1],N=v*g-x*f;if(!Number.isFinite(N)||Math.abs(N)<1e-30){j[t]=a[t].slice();continue}const b=g/N,y=-x/N,k=-f/N,S=v/N,_=d*b+m*k,w=d*y+m*S,F=p*b+h*k,M=p*y+h*S,C=j[t+1][0]-c[t+1][0],A=j[t+1][1]-c[t+1][1];j[t]=[a[t][0]+_*C+w*A,a[t][1]+F*C+M*A]}return j.map((e=>e[0]))},m=u("lat"),p=u("lng");return d.map(((e,s)=>({lat:m[s],lng:p[s],logdate:e.logdate,_ts:e._ts})))}(([null===i||void 0===i||null===(s=i.data)||void 0===s?void 0:s.details,null===i||void 0===i||null===(a=i.data)||void 0===a?void 0:a.data,null===i||void 0===i?void 0:i.data,i].find((e=>Array.isArray(e)))||[]).map((e=>{var s,a,t;const i=null!==e&&void 0!==e&&e.logdate?f()(e.logdate):null;return{lat:parseFloat(null!==(s=null===e||void 0===e?void 0:e.latitude)&&void 0!==s?s:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(a=null!==(t=null===e||void 0===e?void 0:e.longitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lng)&&void 0!==a?a:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:i&&i.isValid()?i.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,s)=>e._ts-s._ts))).map((e=>{let{_ts:s}=e;return(0,t.A)(e,K)}))},enabled:Gs&&null!=Oa,staleTime:3e5,refetchOnWindowFocus:!1,retry:1})))}),Qa=(0,r.useMemo)((()=>{if(!Oa)return[];const e=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=f()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER};return Oa.orders.filter((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)).sort(((s,a)=>{const t=e(s)-e(a);return 0!==t?t:(s.step||0)-(a.step||0)})).map(((e,s)=>{const a=Za.indexOf(String(e.deliveryid)),t=a>=0?Xa[a]:null;return{sequenceStep:s+1,orderid:e.orderid,deliveryid:e.deliveryid,deliverycustomer:e.deliverycustomer,pickupcustomer:e.pickupcustomer,step:e.step,tripNumber:e.trip_number||1,deliverytime:e.deliverytime||e.expecteddeliverytime,kms:parseFloat(e.actualkms||e.kms||0)||0,profit:parseFloat(e.profit||0)||0,orderstatus:e.orderstatus,isLoading:(null===t||void 0===t?void 0:t.isLoading)||(null===t||void 0===t?void 0:t.isFetching),isError:null===t||void 0===t?void 0:t.isError,coords:(null===t||void 0===t?void 0:t.data)||[]}}))}),[Oa,Za,Xa]),et=(0,r.useMemo)((()=>Oa?Qa.map((e=>{const s=Oa.orders.find((s=>String(s.deliveryid)===String(e.deliveryid))),a=parseFloat((null===s||void 0===s?void 0:s.kms)||0)||0,t=As[e.deliveryid];let i=0;Array.isArray(t)&&t.length>=2?i=pe(t):null!=(null===s||void 0===s?void 0:s.actualkms)&&""!==s.actualkms?i=parseFloat(s.actualkms)||0:e.coords.length>=2&&(i=pe(e.coords.map((e=>[e.lat,e.lng]))));const r=i-a,n=a>0?r/a*100:null,l=null!==s&&void 0!==s&&s.expecteddeliverytime?f()(s.expecteddeliverytime):null,c=null!==s&&void 0!==s&&s.deliverytime?f()(s.deliverytime):null,d=null!==l&&void 0!==l&&l.isValid()&&null!==c&&void 0!==c&&c.isValid()?c.diff(l,"minute"):null,o=a>0&&i>1.25*a||null!=d&&d>15;return{sequenceStep:e.sequenceStep,deliveryid:e.deliveryid,orderid:e.orderid,order:s,plannedKm:a,actualKm:i,kmDelta:r,kmDeltaPct:n,expectedTs:null!==l&&void 0!==l&&l.isValid()?l:null,actualTs:null!==c&&void 0!==c&&c.isValid()?c:null,timeDeltaMin:d,anomaly:o,orderstatus:e.orderstatus,deliverycustomer:e.deliverycustomer,pickupcustomer:null===s||void 0===s?void 0:s.pickupcustomer,isLoading:e.isLoading,coordsCount:e.coords.length}})):[]),[Qa,Oa,As]),st=(0,r.useMemo)((()=>{if(0===et.length)return{plannedKm:0,actualKm:0,kmDeltaPct:null,anomalies:0,late:0,onTime:0};const e=et.filter((e=>!e.isLoading&&e.coordsCount>0)),s=e.reduce(((e,s)=>e+s.plannedKm),0),a=e.reduce(((e,s)=>e+s.actualKm),0);return{plannedKm:s,actualKm:a,kmDeltaPct:s>0?(a-s)/s*100:null,anomalies:e.filter((e=>e.anomaly)).length,late:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin>5)).length,onTime:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin<=5)).length}}),[et]),at=(0,r.useMemo)((()=>[...et].sort(((e,s)=>{var a,t;return((null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep)-((null===(t=s.order)||void 0===t?void 0:t.step)||s.sequenceStep)}))),[et]),tt=(0,r.useMemo)((()=>[...et].sort(((e,s)=>e.sequenceStep-s.sequenceStep))),[et]),it=(0,r.useMemo)((()=>{if(!Gs||!oa||!Oa)return null;const e=Qa.find((e=>e.sequenceStep===oa));if(!e)return null;const s=Oa.orders.find((s=>String(s.deliveryid)===String(e.deliveryid)));return s?{orders:[s],id:"cmp-step-".concat(oa,"-").concat(s.orderid)}:null}),[Gs,oa,Oa,Qa]);(0,r.useEffect)((()=>{ua(null),aa(new Set),$s("combined")}),[Gs,null===Oa||void 0===Oa?void 0:Oa.id]),(0,r.useEffect)((()=>{!Oa&&Gs&&Js(!1)}),[Oa,Gs]),(0,r.useEffect)((()=>{ta.current&&Oa&&(ta.current=!1,Js(!0))}),[Oa]),(0,r.useEffect)((()=>{Gs&&!la.current?(na.current=ia,ra(!0),da(!1)):!Gs&&la.current&&ra(na.current),la.current=Gs}),[Gs]);const rt=(0,r.useCallback)((async(e,s,a)=>{if(a.length<2)return;const t=fe(e,s,a);if(void 0!==Cs.current[t])return;Cs.current[t]=null,Ms((e=>(0,i.A)((0,i.A)({},e),{},{[t]:null})));const r=a.map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),n="https://router.project-osrm.org/route/v1/driving/".concat(r,"?overview=full&geometries=geojson");try{const e=await fetch(n),s=await e.json();if(s.routes&&s.routes[0]){const e=s.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));Cs.current[t]=e,Ms((s=>(0,i.A)((0,i.A)({},s),{},{[t]:e})))}else Cs.current[t]=!1,Ms((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}catch(l){console.error("OSRM Fetch error:",l),Cs.current[t]=!1,Ms((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}}),[]);(0,r.useEffect)((()=>{Cs.current={},Ms({}),Ps.current={},zs({})}),[Ts,ja]);const nt=(0,r.useCallback)((async(e,s)=>{if(void 0!==Ps.current[e])return;if(!Array.isArray(s)||s.length<2)return;Ps.current[e]=null,zs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:null})));const a=s=>{Ps.current[e]=s,zs((a=>(0,i.A)((0,i.A)({},a),{},{[e]:s})))},t=()=>{Ps.current[e]=!1,zs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:!1})))},r=(e,s)=>{if(e.length<=s)return e;const a=Math.ceil(e.length/s),t=e.filter(((e,s)=>s%a===0)),i=e[e.length-1];return t[t.length-1]!==i&&t.push(i),t};try{const e=r(s,90).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),t="https://router.project-osrm.org/match/v1/driving/".concat(e,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),i=await fetch(t),n=await i.json();if(n.matchings&&n.matchings.length>0){const e=n.matchings.flatMap((e=>{var s;return((null===(s=e.geometry)||void 0===s?void 0:s.coordinates)||[]).map((e=>[e[1],e[0]]))}));if(e.length>=2)return void a(e)}}catch(n){console.warn("OSRM Match error, trying route fallback:",n)}try{const e=r(s,25).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),i="https://router.project-osrm.org/route/v1/driving/".concat(e,"?overview=full&geometries=geojson"),n=await fetch(i),l=await n.json();if(l.routes&&l.routes[0]){const e=l.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));if(e.length>=2)return void a(e)}t()}catch(n){console.error("OSRM Route fallback error:",n),t()}}),[]);(0,r.useEffect)((()=>{Gs&&Oa&&Qa.forEach((e=>{if(!e.deliveryid||e.coords.length<2)return;const s=e.coords.map((e=>[e.lat,e.lng]));nt(e.deliveryid,s)}))}),[Qa,Gs,Oa,nt]),(0,r.useEffect)((()=>{Os.current=Es}),[Es]),(0,r.useEffect)((()=>{if(a)return;const e=()=>{const e=new Date;$e([e.getHours(),e.getMinutes(),e.getSeconds()].map((e=>String(e).padStart(2,"0"))).join(":"))},s=setInterval(e,1e3);return e(),()=>clearInterval(s)}),[a]),(0,r.useEffect)((()=>{Ae(new Set(La.map((e=>e.id))))}),[La]),(0,r.useEffect)((()=>{La.forEach((e=>{if(!Ce.has(e.id))return;if(Oa&&Oa.id!==e.id)return;const s={};if(e.orders.forEach((e=>{const a=e.trip_number||1;s[a]||(s[a]=[]),s[a].push(e)})),Object.entries(s).forEach((s=>{let[a,t]=s;const i=[...t].sort(((e,s)=>(e.step||0)-(s.step||0))),r=je(i);r.length>=2&&rt(e.id,a,r)})),Ta){const s=(0,I.d1)(e.orders);if(s){const a=va.find((s=>String(s.id)===String(e.id))),t=a&&Number.isFinite(a.lat)&&Number.isFinite(a.lon)?[a.lat,a.lon]:Q(s)?[J(Z(s)),J(X(s))]:null,i=J(s.droplat||s.deliverylat),r=J(s.droplon||s.deliverylong);t&&Number.isFinite(i)&&Number.isFinite(r)&&rt(e.id,"active-".concat(s.orderid),[t,[i,r]])}}}))}),[La,Ce,Oa,Ta,va,rt]);const lt=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(!Na)return;const e=()=>{const e=f()();return e.hour()+e.minute()/60};null===lt.current&&(lt.current=e());const s=setInterval((()=>{const s=e(),a=le(lt.current,us),t=le(s,us);lt.current=s,t&&t!==a&&fa((e=>e===a?t:e))}),3e4);return()=>clearInterval(s)}),[Na,us]),(0,r.useEffect)((()=>{Ie(null)}),[null===Ee||void 0===Ee?void 0:Ee.id]),(0,r.useEffect)((()=>{const e=ga.current;e&&"function"===typeof e.scrollIntoView&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[ja]);const ct=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return v().divIcon({className:"",iconSize:s?[56,56]:[46,46],iconAnchor:s?[28,28]:[23,23],popupAnchor:[0,s?-30:-24],html:'
').concat((e||"K").charAt(0).toUpperCase(),"
")})},dt=e=>{var s;return(null===(s=La.find((s=>s.id===e)))||void 0===s?void 0:s.color)||"#475569"},ot=(e,s)=>{if(!e||!s||!$(s))return null;const a=va.find((s=>String(s.id)===String(e)));if(!a)return null;const t=J(s.droplat||s.deliverylat),i=J(s.droplon||s.deliverylong);if(!Number.isFinite(t)||!Number.isFinite(i))return null;const r=me([a.lat,a.lon],[t,i]);return Math.round(1e3*r)},ut=e=>null===e||void 0===e?"":e>=1e3?"".concat((e/1e3).toFixed(1)," km"):"".concat(e," m");return(0,_.jsxs)("div",{className:"dispatch-container".concat(a?" embedded":"").concat(Gs?" compare-open":""),children:[!a&&(0,_.jsxs)("div",{id:"hdr",children:[(0,_.jsxs)("div",{className:"logo",children:[(0,_.jsx)("div",{className:"logo-badge",children:"D"}),(0,_.jsx)("div",{className:"logo-name",children:"Dispatch"}),Ze&&Ze.length>0&&(0,_.jsxs)("div",{className:"logo-city-wrap",ref:ts,children:[(0,_.jsxs)("button",{type:"button",className:"logo-city ".concat(ss?"open":""),onClick:()=>as((e=>!e)),"aria-haspopup":"listbox","aria-expanded":ss,title:"Switch hub",children:[(0,_.jsx)(S.JFD,{}),(0,_.jsx)("span",{className:"logo-city-text",children:ws||"All locations"}),(0,_.jsx)(S.j1Q,{className:"logo-city-caret"})]}),ss&&(0,_.jsx)("div",{className:"logo-city-menu",role:"listbox",children:Ze.map((e=>{const s=String(e.applocationid)===String(Qe);return(0,_.jsxs)("button",{type:"button",role:"option","aria-selected":s,className:"logo-city-option ".concat(s?"active":""),onClick:()=>(e=>{if(B.A.info("Switching hub/location ID:",e),es(Number(e)),as(!1),"undefined"!==typeof window)try{localStorage.setItem("applocationid",String(e))}catch(s){}Ua(null),De(null),qe(null)})(e.applocationid),children:[(0,_.jsx)(S.JFD,{className:"logo-city-option-icon"}),(0,_.jsx)("span",{children:e.locationname}),s&&(0,_.jsx)("span",{className:"logo-city-option-check",children:"\u2713"})]},e.applocationid)}))})]}),(0,_.jsxs)("div",{id:"dispatch-top-tabs",className:"dtt-inline",children:[(0,_.jsxs)("button",{type:"button",className:"dtt-tab ".concat("live"===C?"active":""),onClick:()=>A("live"),children:[(0,_.jsx)("span",{className:"dtt-icon",children:(0,_.jsx)(S.Cd7,{})}),"Live"]}),(0,_.jsxs)("button",{type:"button",className:"dtt-tab ".concat("analysis"===C?"active":""),onClick:()=>A("analysis"),children:[(0,_.jsx)("span",{className:"dtt-icon",children:(0,_.jsx)(S.DX0,{})}),"Analysis"]})]})]}),(0,_.jsxs)("div",{className:"hdr-stats",children:[(()=>{const e=$a.profit<0,s=Math.abs($a.profit);return(0,_.jsxs)("span",{className:"strat-stat ".concat(e?"strat-stat-loss":"strat-stat-profit"),title:"".concat(e?"Loss":"Profit"," (").concat($a.label,")"),children:[(0,_.jsx)("span",{className:"strat-stat-icon",children:e?(0,_.jsx)(S.Rod,{}):(0,_.jsx)(S.imn,{})}),(0,_.jsx)("span",{className:"strat-stat-label",children:e?"Loss":"Profit"}),(0,_.jsxs)("span",{className:"strat-stat-value",children:[e?"-":"","\u20b9",s.toFixed(0)]})]})})(),Na&&(0,_.jsxs)(_.Fragment,{children:[ka&&(0,_.jsxs)("span",{className:"live-status",children:[(0,_.jsx)("span",{className:"live-dot"})," Loading ",Ma.length?"\xb7 ".concat(Ma.length," loaded"):""]}),!ka&&!Sa&&(0,_.jsxs)("span",{className:"live-status live-status-ready",children:[(0,_.jsx)("span",{className:"live-dot ready"})," ",za.length," orders",(0,_.jsxs)("span",{className:"live-status-sub",children:[" / ",Ma.length," total"]})]}),Sa&&(0,_.jsxs)("span",{className:"live-status live-status-error",children:[(0,_.jsx)("span",{className:"live-dot error"})," Failed to load"]}),(()=>{const e=f()().startOf("day"),s=e.format("YYYY-MM-DD"),a=f()(Ts),t=Ts===s,i=a.isAfter(e,"day"),r=s=>{if(!s)return;const a=s.format("YYYY-MM-DD");a!==Ts?s.isAfter(e,"day")||(Hs(a),Ua(null),De(null),qe(null),Vs(!1)):Vs(!1)},n=Bs.startOf("month"),l=n.subtract(n.day(),"day"),c=Array.from({length:42},((e,s)=>l.add(s,"day"))),d=!Bs.add(1,"month").startOf("month").isAfter(e,"month");return(0,_.jsxs)("div",{className:"date-chip".concat(t?" is-today":"").concat(Ys?" is-open":""),ref:Us,children:[(0,_.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>r(a.subtract(1,"day")),"aria-label":"Previous day",title:"Previous day",children:(0,_.jsx)(S.E_E,{})}),(0,_.jsxs)("button",{type:"button",className:"date-chip-main",onClick:()=>Vs((e=>!e)),"aria-haspopup":"dialog","aria-expanded":Ys,children:[(0,_.jsx)("span",{className:"date-chip-icon","aria-hidden":"true",children:(0,_.jsx)(S.dDC,{})}),(0,_.jsxs)("span",{className:"date-chip-text",children:[(0,_.jsxs)("span",{className:"date-chip-label",children:["Date",t&&(0,_.jsx)("span",{className:"date-chip-today-pill",children:"Today"})]}),(0,_.jsx)("span",{className:"date-chip-value",children:a.isValid()?a.format("ddd, MMM D, YYYY"):"\u2014"})]}),(0,_.jsx)("span",{className:"date-chip-chevron".concat(Ys?" is-open":""),"aria-hidden":"true",children:(0,_.jsx)(S.j1Q,{})})]}),(0,_.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>{t||i||r(a.add(1,"day"))},disabled:t||i,"aria-label":"Next day",title:t?"You're viewing today":"Next day",children:(0,_.jsx)(S.xVu,{})}),Ys&&(0,_.jsxs)("div",{className:"date-cal-popover",role:"dialog","aria-label":"Pick a date",children:[(0,_.jsxs)("div",{className:"date-cal-header",children:[(0,_.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>Ks((e=>e.subtract(1,"month"))),"aria-label":"Previous month",children:(0,_.jsx)(S.E_E,{})}),(0,_.jsx)("div",{className:"date-cal-title",children:Bs.format("MMMM YYYY")}),(0,_.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>{const s=Bs.add(1,"month");s.startOf("month").isAfter(e,"month")||Ks(s)},disabled:!d,"aria-label":"Next month",children:(0,_.jsx)(S.xVu,{})})]}),(0,_.jsx)("div",{className:"date-cal-weekdays",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>(0,_.jsx)("div",{className:"date-cal-weekday",children:e},e)))}),(0,_.jsx)("div",{className:"date-cal-grid",children:c.map((a=>{const t=a.month()===Bs.month(),i=a.format("YYYY-MM-DD")===Ts,n=a.format("YYYY-MM-DD")===s,l=a.isAfter(e,"day"),c=["date-cal-day",!t&&"is-other-month",i&&"is-selected",n&&"is-today",l&&"is-disabled"].filter(Boolean).join(" ");return(0,_.jsx)("button",{type:"button",className:c,disabled:l,onClick:()=>r(a),"aria-current":n?"date":void 0,"aria-pressed":i,children:a.date()},a.format("YYYY-MM-DD"))}))}),(0,_.jsxs)("div",{className:"date-cal-presets",children:[(0,_.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>r(e),children:"Today"}),(0,_.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>r(e.subtract(1,"day")),children:"Yesterday"}),(0,_.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>r(e.subtract(7,"day")),children:"\u22127 days"})]})]})]})})()]})]}),(0,_.jsx)("div",{id:"clock",children:We})]}),(a||"live"===C)&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{id:"strat-row",children:[(0,_.jsxs)("button",{className:"sbt ".concat("kitchens"===F?"active":""),onClick:()=>{B.A.info("View mode changed: By Location"),M("kitchens"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.JFD,{})})," By Location"]}),(0,_.jsxs)("button",{className:"sbt ".concat("zones"===F?"active":""),onClick:()=>{B.A.info("View mode changed: By Zone"),M("zones"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.Cd7,{})})," By Zone"]}),(0,_.jsxs)("button",{className:"sbt ".concat("riders"===F?"active":""),onClick:()=>{B.A.info("View mode changed: By Rider"),M("riders"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.bsz,{})})," By Rider"]}),(0,_.jsxs)("button",{className:"sbt ".concat("all"===F?"active":""),onClick:()=>{B.A.info("View mode changed: All Active Routes"),M("all"),Ua(null),De(null),qe(null)},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.Zs6,{})}),"Active"]}),(0,_.jsxs)("button",{type:"button",className:"sbt sbt-profitability ".concat("profitability"===F?"active":""),onClick:()=>{B.A.info("View mode changed: Profitability"),M("profitability"),Ua(null),De(null),qe(null)},title:"View overall and rider profitability",children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.H4F,{})})," Profitability"]}),(0,_.jsxs)("button",{type:"button",className:"sbt sbt-rider-info ".concat("rider-info"===F?"active":""),onClick:()=>{M("rider-info"),Ua(null),De(null),qe(null)},title:"Live GPS / battery / status snapshot for a rider",children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.k4P,{})})," Rider Info"]})]}),Na&&"rider-info"!==F&&(0,_.jsxs)("div",{id:"batch-row",children:[(0,_.jsx)("span",{className:"batch-label",children:"Batch"}),(0,_.jsx)("div",{className:"batch-scroll",children:us.map((e=>{var s;const a=ja===e.id;return(0,_.jsxs)("button",{ref:a?ga:null,className:"batch-btn batch-slot ".concat(a?"active":""),onClick:()=>{fa(e.id),Ua(null),De(null),qe(null)},title:"".concat(e.label," (").concat(e.range,")"),children:[(0,_.jsx)("span",{className:"batch-btn-label",children:e.label}),(0,_.jsx)("span",{className:"batch-btn-count",children:null!==(s=Aa[e.id])&&void 0!==s?s:0})]},e.id)}))})]}),"profitability"===F?(0,_.jsx)(R,{riders:La,handleRiderFocus:Ua,focusedRider:Oa,totalDailyProfit:Pa}):"rider-info"===F?(0,_.jsxs)("div",{className:"rider-info-mode",children:[(0,_.jsxs)("div",{className:"ri-sidebar",children:[(0,_.jsxs)("div",{className:"ri-sb-head",children:[(0,_.jsx)("div",{className:"ri-sb-title",children:"Riders"}),(0,_.jsxs)("div",{className:"ri-sb-sub",children:[Ca.length," ",1===Ca.length?"rider":"riders"," today"]})]}),(0,_.jsxs)("div",{className:"ri-search",children:[(0,_.jsx)(S.gZ7,{className:"ri-search-icon"}),(0,_.jsx)("input",{type:"text",className:"ri-search-input",placeholder:"Search by name or ID",value:fs,onChange:e=>gs(e.target.value)})]}),(()=>{const e=fs.trim().toLowerCase(),s=Ca.filter((s=>!e||(String(s.riderName||"").toLowerCase().includes(e)||String(s.id).includes(e))));return 0===s.length?(0,_.jsx)("div",{className:"ri-empty",children:fs?'No riders match "'.concat(fs,'"'):"No riders have orders today"}):(0,_.jsx)("div",{className:"ri-rider-list",children:s.map((e=>{const s=String(xs)===String(e.id);return(0,_.jsxs)("button",{type:"button",className:"ri-rider-item ".concat(s?"active":""),onClick:()=>js(e.id),children:[(0,_.jsx)("span",{className:"ri-rider-dot",style:{background:Ne(e.id)}}),(0,_.jsxs)("span",{className:"ri-rider-info-block",children:[(0,_.jsx)("span",{className:"ri-rider-name",children:e.riderName}),(0,_.jsxs)("span",{className:"ri-rider-meta",children:["#",e.id]})]}),(0,_.jsx)("span",{className:"ri-rider-arrow",children:"\u2192"})]},e.id)}))})})()]}),(0,_.jsx)("div",{className:"ri-main",children:null==xs?(0,_.jsxs)("div",{className:"ri-placeholder",children:[(0,_.jsx)("div",{className:"ri-placeholder-icon",children:(0,_.jsx)(S.k4P,{})}),(0,_.jsx)("div",{className:"ri-placeholder-title",children:"Pick a rider"}),(0,_.jsx)("div",{className:"ri-placeholder-sub",children:"Select a rider from the list on the left to see their live GPS, battery, connection, and current order snapshot."})]}):(0,_.jsxs)(_.Fragment,{children:[bs&&!Ns&&(0,_.jsx)("div",{className:"ri-loading",children:"Loading rider snapshot\u2026"}),ys&&(0,_.jsxs)("div",{className:"ri-error",children:["Couldn't load this rider's log. ",(null===ks||void 0===ks?void 0:ks.message)||""]}),Ns&&(()=>{const e=Ns,s=parseFloat(e.latitude),a=parseFloat(e.longitude),t=Number.isFinite(s)&&Number.isFinite(a),i=parseInt(String(e.battery||"").replace("%",""),10),r=Number.isFinite(i)&&i<=20,n=parseFloat(e.speed),c=String(e.status||"").toLowerCase();return(0,_.jsxs)("div",{className:"ri-snapshot",children:[(0,_.jsxs)("div",{className:"ri-snap-head",children:[(0,_.jsx)("div",{className:"ri-snap-name",children:e.username||"Rider #".concat(e.userid)}),(0,_.jsxs)("div",{className:"ri-snap-meta",children:[(0,_.jsxs)("span",{children:["#",e.userid]}),e.status&&(0,_.jsx)("span",{className:"ri-status ri-status-".concat(c),children:e.status}),(0,_.jsxs)("span",{className:"ri-live ".concat(bs?"is-refetching":""),children:[(0,_.jsx)("span",{className:"ri-live-dot"}),bs?"Updating\u2026":"Live"]})]}),e.logdate&&(0,_.jsxs)("div",{className:"ri-snap-time",children:[(0,_.jsx)(S.VP9,{})," Last seen ",e.logdate]})]}),(0,_.jsxs)("div",{className:"ri-snap-grid",children:[(0,_.jsxs)("div",{className:"ri-stat ".concat(r?"ri-stat-warn":""),children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.wZm,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Battery"}),(0,_.jsxs)("div",{className:"ri-stat-value",children:[e.battery||"\u2014",e.is_charging&&(0,_.jsx)("span",{className:"ri-stat-tag",children:"Charging"})]})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.Xh5,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Connection"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.connection||"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.HPi,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"GPS Accuracy"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.accuracy?"".concat(e.accuracy," m"):"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.o8z,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Location Service"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.location_service||"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.BJM,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Speed"}),(0,_.jsx)("div",{className:"ri-stat-value",children:Number.isFinite(n)?"".concat(n.toFixed(2)," km/h"):"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.bqQ,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Heading"}),(0,_.jsx)("div",{className:"ri-stat-value",children:null!=e.heading?"".concat(e.heading,"\xb0"):"\u2014"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.pSF,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"App State"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.is_background?"Background":"Foreground"})]})]}),(0,_.jsxs)("div",{className:"ri-stat",children:[(0,_.jsx)("div",{className:"ri-stat-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsxs)("div",{className:"ri-stat-body",children:[(0,_.jsx)("div",{className:"ri-stat-label",children:"Current Order"}),(0,_.jsx)("div",{className:"ri-stat-value",children:e.orderid||"\u2014"})]})]})]}),t&&(0,_.jsxs)("div",{className:"ri-map-section",children:[(0,_.jsxs)("div",{className:"ri-coords-label",children:[(0,_.jsx)(S.gwi,{})," ",s.toFixed(6),", ",a.toFixed(6)]}),(0,_.jsx)("div",{className:"ri-map",children:(0,_.jsxs)(d.W,{center:[s,a],zoom:13,scrollWheelZoom:!1,style:{height:"100%",width:"100%"},children:[(0,_.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,_.jsxs)(l.p,{position:[s,a],children:[(0,_.jsx)(u.m,{direction:"top",offset:[0,-10],permanent:!0,className:"ri-area-banner",children:(null===_s||void 0===_s?void 0:_s.area)||"Locating area\u2026"}),(0,_.jsxs)(m.z,{children:[(0,_.jsx)("div",{style:{fontWeight:700,marginBottom:2},children:e.username||"Rider #".concat(e.userid)}),(null===_s||void 0===_s?void 0:_s.area)&&(0,_.jsx)("div",{style:{fontSize:12,color:"#0f172a",marginBottom:4},children:_s.area}),(0,_.jsx)("div",{style:{fontSize:11,color:"#64748b"},children:e.logdate?"Last seen ".concat(e.logdate):"".concat(s.toFixed(6),", ").concat(a.toFixed(6))})]})]})]},"".concat(e.userid,"-").concat(s,"-").concat(a))})]})]})})()]})})]}):(0,_.jsxs)("div",{id:"body",className:"".concat(ia?"sidebar-collapsed":""," ").concat(Gs?"compare-mode":""," ").concat(Gs&&ca?"compare-data-collapsed":"").trim(),children:[(0,_.jsx)("button",{type:"button",className:"sidebar-toggle-tab".concat(ia?" is-collapsed":""),onClick:()=>ra((e=>!e)),title:ia?"Show sidebar":"Hide sidebar","aria-label":ia?"Show sidebar":"Hide sidebar",children:ia?(0,_.jsx)(S.xVu,{}):(0,_.jsx)(S.E_E,{})}),Gs&&Oa&&(0,_.jsx)("button",{type:"button",className:"compare-data-toggle-tab".concat(ca?" is-collapsed":""),onClick:()=>da((e=>!e)),title:ca?"Show details panel":"Hide details panel","aria-label":ca?"Show details panel":"Hide details panel",children:ca?(0,_.jsx)(S.E_E,{}):(0,_.jsx)(S.xVu,{})}),(0,_.jsxs)("div",{id:"sidebar",children:[!Oa&&(0,_.jsxs)("div",{className:"sb-header",children:[(0,_.jsxs)("div",{className:"sb-header-top",children:[(0,_.jsxs)("div",{className:"sb-header-title",children:[(0,_.jsx)("span",{className:"sb-title-bar","aria-hidden":"true"}),(0,_.jsx)("span",{className:"sb-title-text",children:"RIDER DISPATCH"})]}),(0,_.jsxs)("span",{className:"sb-header-scope",title:$a.label,children:[(0,_.jsx)("span",{className:"sb-scope-dot"}),$a.label]})]}),(0,_.jsxs)("div",{className:"sb-header-tiles",children:[(0,_.jsxs)("div",{className:"sb-tile sb-tile-orders",children:[(0,_.jsx)("span",{className:"sb-tile-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsxs)("div",{className:"sb-tile-body",children:[(0,_.jsx)("div",{className:"sb-tile-value",children:$a.orders}),(0,_.jsx)("div",{className:"sb-tile-label",children:1===$a.orders?"Order":"Orders"})]})]}),(0,_.jsxs)("div",{className:"sb-tile sb-tile-riders",children:[(0,_.jsx)("span",{className:"sb-tile-icon",children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{className:"sb-tile-body",children:[(0,_.jsx)("div",{className:"sb-tile-value",children:$a.riders}),(0,_.jsx)("div",{className:"sb-tile-label",children:1===$a.riders?"Rider":"Riders"})]})]})]})]}),Oa||Ee?(0,_.jsxs)("div",{id:"route-detail",children:[(0,_.jsxs)("button",{className:"rd-back",onClick:()=>{Ua(null),De(null)},children:["\u2190 Back to ",Le?Le.name:"list"]}),Oa?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"rd-rider-name",style:{color:Oa.color},children:Oa.riderName}),(()=>{const e=Oa.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),s=Oa.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),a=s<0;return(0,_.jsxs)("div",{className:"rd-stats-grid",children:[(0,_.jsxs)("div",{className:"rd-stat rd-stat-orders",children:[(0,_.jsx)("div",{className:"rd-stat-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsx)("div",{className:"rd-stat-value",children:Oa.orders.length}),(0,_.jsx)("div",{className:"rd-stat-label",children:"Orders"})]}),(0,_.jsxs)("div",{className:"rd-stat rd-stat-distance",children:[(0,_.jsx)("div",{className:"rd-stat-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsxs)("div",{className:"rd-stat-value",children:[e.toFixed(1),(0,_.jsx)("span",{className:"rd-stat-unit",children:"km"})]}),(0,_.jsx)("div",{className:"rd-stat-label",children:"Distance"})]}),(0,_.jsxs)("div",{className:"rd-stat rd-stat-profit ".concat(a?"is-loss":"is-gain"),children:[(0,_.jsx)("div",{className:"rd-stat-icon",children:a?(0,_.jsx)(S.Rod,{}):(0,_.jsx)(S.imn,{})}),(0,_.jsxs)("div",{className:"rd-stat-value",children:[a?"-":"","\u20b9",Math.abs(s).toFixed(0)]}),(0,_.jsx)("div",{className:"rd-stat-label",children:a?"Loss":"Profit"})]})]})})(),(()=>{const e={};Oa.orders.forEach((s=>{const a=s.trip_number||1;e[a]||(e[a]=[]),e[a].push(s)}));const s=[...Oa.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)})),a=s?s.orderid:null,t=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=f()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER},i="time"===Oe;let n=null;return Object.entries(e).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,l]=e;const c=i?[...l].sort(((e,s)=>{const a=t(e)-t(s);return 0!==a?a:(e.step||0)-(s.step||0)})):l;return(0,_.jsxs)("div",{className:"trip-block",children:[(0,_.jsxs)("div",{className:"trip-header",style:{background:"".concat(Oa.color,"12"),borderColor:"".concat(Oa.color,"30")},children:[(0,_.jsxs)("span",{className:"th-badge",style:{background:Oa.color},children:["Trip ",s]}),(0,_.jsxs)("span",{className:"trip-stats",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),l.length," stops"]}),(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),l.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]})]}),(0,_.jsxs)("div",{className:"trip-sort-toggle",role:"group","aria-label":"Sort stops by","data-mode":i?"time":"planned",children:[(0,_.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"":"is-active"),"aria-pressed":!i,onClick:()=>Te("planned"),title:"Sort stops by planned step (dispatched order)",children:[(0,_.jsx)(S.EgJ,{"aria-hidden":"true"}),(0,_.jsx)("span",{children:"Planned"})]}),(0,_.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"is-active":""),"aria-pressed":i,onClick:()=>Te("time"),title:"Sort stops by completion time (which delivery was done first)",children:[(0,_.jsx)(S.VP9,{"aria-hidden":"true"}),(0,_.jsx)("span",{children:"By time"})]})]})]}),(0,_.jsx)("div",{className:"zone-order-grid",children:c.map(((e,t)=>{const l=(e.kitchen_key||e.pickupcustomer||"Unknown").toLowerCase().trim(),c=null!==n&&l!==n;n=l;const d=Re&&Re.orderid===e.orderid,o=a&&e.orderid===a,u=parseFloat(e.droplat||e.deliverylat),m=parseFloat(e.droplon||e.deliverylong),p=Number.isFinite(u)&&Number.isFinite(m),h=(0,I.Cx)(e.orderstatus),v=parseFloat(e.profit||0),x=v<0,f=ot(Oa.id,e),g=e.step||t+1,N=i&&!e.deliverytime;return(0,_.jsxs)(r.Fragment,{children:[c&&(0,_.jsxs)("div",{className:"kitchen-transition",children:[(0,_.jsx)("span",{className:"kt-ico",children:(0,_.jsx)(S.$G1,{})})," Switch to ",(0,_.jsx)("strong",{children:e.pickupcustomer})]}),(0,_.jsxs)("div",{className:"zone-order-card ".concat(p?"clickable":""," ").concat(d?"active":""," ").concat(o?"going-on":""," ").concat(N?"is-pending-time":""),role:p?"button":void 0,tabIndex:p?0:void 0,onClick:p?()=>Ie(d?null:{orderid:e.orderid,lat:u,lon:m}):void 0,onKeyDown:p?s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),Ie(d?null:{orderid:e.orderid,lat:u,lon:m}))}:void 0,title:p?d?"Click to show full trip":"Show ".concat(e.deliverycustomer||"order #".concat(e.orderid)," on map"):void 0,children:[(0,_.jsxs)("div",{className:"zone-order-card-head",children:[(0,_.jsx)("div",{className:"zone-order-num",title:"Planned step ".concat(e.step||t+1),children:g}),(0,_.jsx)("div",{className:"zone-order-id-block",children:(0,_.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]})}),(()=>{const s=ve(e.deliverytime),a=ve(e.expecteddeliverytime),t=!I.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==f;return e.orderstatus||s||a||t?(0,_.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,_.jsx)("span",{className:"zone-order-status",style:{background:h.bg,color:h.fg},children:h.label}),(s||a)&&(0,_.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,_.jsx)(S.VP9,{}),s||a]}),t&&(0,_.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,_.jsx)(S.HPi,{}),ut(f)]})]}):null})(),j&&(0,_.jsx)("button",{type:"button",className:"zone-order-change-rider",title:"Change rider",onClick:s=>{s.stopPropagation(),j(e,Oa)},children:(0,_.jsx)(S.$G1,{})})]}),(0,_.jsxs)("div",{className:"zone-order-customer",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,_.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),e.deliverysuburb||W(e.deliveryaddress)]}),e.ordernotes&&(0,_.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.dKO,{})}),e.ordernotes]}),(0,_.jsxs)("div",{className:"zone-order-stats",children:[(0,_.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,_.jsxs)("span",{className:"zone-order-chip ".concat(x?"is-loss":"is-profit"),title:"Profit",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),x?"-":"","\u20b9",Math.abs(v).toFixed(0)]}),null!=e.deliverycharge&&(0,_.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,_.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,_.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||s," \xb7 S",e.step||t+1]})]})]})]},e.orderid)}))})]},s)}))})()]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"rd-rider-name",style:{color:"#f59e0b"},children:Ee.kitchenName}),(0,_.jsxs)("div",{className:"rd-rider-sub",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gsJ,{})}),Ee.orders.length," orders"]}),(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.aVM,{})}),Ee.riders.size," riders"]})]}),(0,_.jsxs)("div",{className:"zone-detail-section",children:[(0,_.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,_.jsxs)("span",{className:"section-count",children:["(",Ee.orders.length,")"]})]}),0===Ee.orders.length?(0,_.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders for this kitchen."}):(0,_.jsx)("div",{className:"zone-order-grid",children:Ee.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),r=Re&&Re.orderid===e.orderid,n=(0,I.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?La.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?ot(d,e):null;return(0,_.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(r?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Ie(r?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,_.jsxs)("div",{className:"zone-order-card-head",children:[(0,_.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,_.jsxs)("div",{className:"zone-order-id-block",children:[(0,_.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,_.jsxs)("div",{className:"zone-order-rider",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ve(e.deliverytime),a=ve(e.expecteddeliverytime),t=!I.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,_.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,_.jsx)("span",{className:"zone-order-status",style:{background:n.bg,color:n.fg},children:n.label}),(s||a)&&(0,_.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,_.jsx)(S.VP9,{}),s||a]}),t&&(0,_.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,_.jsx)(S.HPi,{}),ut(p)]})]}):null})()]}),(0,_.jsxs)("div",{className:"zone-order-customer",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,_.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),e.deliverysuburb||W(e.deliveryaddress)]}),e.ordernotes&&(0,_.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.dKO,{})}),e.ordernotes]}),(0,_.jsxs)("div",{className:"zone-order-stats",children:[(0,_.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,_.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,_.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,_.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,_.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]})]}):Le?(0,_.jsxs)("div",{id:"route-detail",children:[(0,_.jsx)("button",{className:"rd-back",onClick:()=>qe(null),children:"\u2190 Back to zones"}),(0,_.jsx)("div",{className:"rd-rider-name",style:{color:"#3b82f6"},children:Le.name}),(0,_.jsx)("div",{className:"rd-rider-sub",children:(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gsJ,{})}),Le.totalOrders," ",1===Le.totalOrders?"order":"orders"]})}),(0,_.jsxs)("div",{className:"zone-detail-section",children:[(0,_.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,_.jsxs)("span",{className:"section-count",children:["(",Le.orders.length,")"]})]}),0===Le.orders.length?(0,_.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders in this zone."}):(0,_.jsx)("div",{className:"zone-order-grid",children:Le.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),r=Re&&Re.orderid===e.orderid,n=(0,I.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?La.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?ot(d,e):null;return(0,_.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(r?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Ie(r?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,_.jsxs)("div",{className:"zone-order-card-head",children:[(0,_.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,_.jsxs)("div",{className:"zone-order-id-block",children:[(0,_.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,_.jsxs)("div",{className:"zone-order-rider",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ve(e.deliverytime),a=ve(e.expecteddeliverytime),t=!I.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,_.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,_.jsx)("span",{className:"zone-order-status",style:{background:n.bg,color:n.fg},children:n.label}),(s||a)&&(0,_.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,_.jsx)(S.VP9,{}),s||a]}),t&&(0,_.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,_.jsx)(S.HPi,{}),ut(p)]})]}):null})()]}),(0,_.jsxs)("div",{className:"zone-order-customer",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,_.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.gwi,{})}),e.deliverysuburb||W(e.deliveryaddress)]}),e.ordernotes&&(0,_.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.dKO,{})}),e.ordernotes]}),(0,_.jsxs)("div",{className:"zone-order-stats",children:[(0,_.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,_.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,_.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,_.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,_.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]}):(0,_.jsxs)("div",{id:"riders-panel",children:[!(Ta&&0===Ka)&&(0,_.jsx)("div",{className:"ph",children:"zones"===F?"Zone dispatch":"kitchens"===F?"Kitchen dispatch":Ta?"Active rider dispatch":"Rider dispatch"}),(0,_.jsx)("div",{id:"rider-cards",children:0!==Ra.length||ka?"zones"===F?Da.map(((e,s)=>{const a=e.statusCounts.delivered||0,t=e.totalProfit<0;return(0,_.jsxs)("div",{className:"rcard zone-card",onClick:()=>qe(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,_.jsxs)("div",{className:"zone-card-header",children:[(0,_.jsx)("div",{className:"zone-card-emoji",children:(0,_.jsx)(S.Cd7,{})}),(0,_.jsxs)("div",{className:"zone-card-titles",children:[(0,_.jsx)("div",{className:"zone-card-name",children:e.name}),(0,_.jsxs)("div",{className:"zone-card-sub",children:[e.activeRidersCount," ",1===e.activeRidersCount?"rider":"riders"," \xb7 ",e.totalOrders," ",1===e.totalOrders?"order":"orders"]})]}),(0,_.jsx)("span",{className:"zone-card-arrow","aria-hidden":"true",children:"\u2192"})]}),e.totalOrders>0&&(0,_.jsxs)("div",{className:"zone-progress-row",children:[(0,_.jsx)("div",{className:"zone-status-bar",title:Object.entries(e.statusCounts).map((e=>{let[s,a]=e;return"".concat((0,I.Cx)(s).label,": ").concat(a)})).join(" \xb7 "),children:Object.entries(e.statusCounts).map((s=>{let[a,t]=s;const i=(0,I.Cx)(a),r=t/e.totalOrders*100;return(0,_.jsx)("div",{className:"zone-status-seg",style:{width:"".concat(r,"%"),background:i.bg}},a)}))}),(0,_.jsxs)("div",{className:"zone-progress-label",children:[a,"/",e.totalOrders]})]}),(0,_.jsxs)("div",{className:"zone-stat-pills",children:[(0,_.jsxs)("span",{className:"zone-stat-pill",title:"Areas covered",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.gwi,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:e.suburbs.length}),(0,_.jsx)("span",{className:"zone-stat-label",children:1===e.suburbs.length?"area":"areas"})]}),(0,_.jsxs)("span",{className:"zone-stat-pill",title:"Total distance",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:e.totalKms.toFixed(1)}),(0,_.jsx)("span",{className:"zone-stat-label",children:"km"})]}),(0,_.jsxs)("span",{className:"zone-stat-pill",title:"Kitchens",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.NtI,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:e.kitchens.length}),(0,_.jsx)("span",{className:"zone-stat-label",children:1===e.kitchens.length?"kitchen":"kitchens"})]}),(0,_.jsxs)("span",{className:"zone-stat-pill ".concat(t?"profit-negative":"profit-positive"),title:"Total profit",children:[(0,_.jsx)("span",{className:"zone-stat-icon",children:(0,_.jsx)(S.ohY,{})}),(0,_.jsx)("span",{className:"zone-stat-value",children:t?"-\u20b9".concat(Math.abs(e.totalProfit).toFixed(0)):"\u20b9".concat(e.totalProfit.toFixed(0))})]})]}),e.suburbs.length>0&&(0,_.jsxs)("div",{className:"zone-card-suburbs",children:[(0,_.jsx)("span",{className:"zone-card-suburbs-text",children:e.suburbs.slice(0,3).map((e=>e.name)).join(" \xb7 ")}),e.suburbs.length>3&&(0,_.jsxs)("span",{className:"zone-card-suburbs-more",children:["+",e.suburbs.length-3]})]})]},e.id)})):"kitchens"===F?qa.map(((e,s)=>(0,_.jsxs)("div",{className:"rcard",onClick:()=>De(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,_.jsxs)("div",{className:"rcard-top",children:[(0,_.jsx)("div",{className:"rcard-emo",style:{background:"#f59e0b18",borderColor:"#f59e0b50",color:"#f59e0b"},children:(0,_.jsx)(S.NtI,{})}),(0,_.jsxs)("div",{className:"rcard-info",children:[(0,_.jsx)("div",{className:"rcard-name",children:e.kitchenName}),(0,_.jsxs)("div",{className:"rcard-zone",children:[e.riders.size," riders \xb7 ",(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,_.jsx)("div",{className:"rcard-badge",style:{background:"#f59e0b18",color:"#f59e0b"},children:e.orders.length})]}),(0,_.jsx)("div",{className:"bar-bg",children:(0,_.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,e.orders.length/20*100),"%"),background:"#f59e0b"}})}),(0,_.jsxs)("div",{className:"rcard-meta",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),(0,_.jsxs)("span",{children:[e.riders.size," riders"]})]}),(0,_.jsx)("div",{className:"step-ids",children:Array.from(e.riders).slice(0,10).map((e=>{var s;return(0,_.jsx)("span",{className:"step-id",style:{color:dt(e)},children:null===(s=La.find((s=>s.id===e)))||void 0===s?void 0:s.riderName.split(" ")[0]},e)}))})]},e.id))):Ta?(0,_.jsx)(O,{visibleRiders:Va,riders:La,focusedStop:Re,handleRiderFocus:Ua,setFocusedStop:Ie,calculateEstMeters:ot,getRiderColor:dt,formatMeters:ut}):Va.map(((e,s)=>{var a;const t=e.orders.length,i=e.orders.filter((e=>I.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,r=t>0&&i>=t,n=e.orders.find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)})),l=n?ot(e.id,n):null;return(0,_.jsxs)("div",{className:"rcard",onClick:()=>Ua(e),style:{animationDelay:"".concat(.05*s,"s"),borderLeft:"3px solid ".concat(e.color)},children:[(0,_.jsxs)("div",{className:"rcard-top",children:[(0,_.jsx)("div",{className:"rcard-emo",style:{background:"#f1f5f9",borderColor:"#e2e8f0",color:"#64748b"},children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{className:"rcard-info",children:[(0,_.jsx)("div",{className:"rcard-name",children:e.riderName}),(0,_.jsxs)("div",{className:"rcard-zone",children:[(null===(a=e.orders[0])||void 0===a?void 0:a.zone_name)||ws||"Local"," \xb7 ",new Set(e.orders.map((e=>e.trip_number||1))).size," trips"]})]}),(0,_.jsxs)("div",{className:"rcard-badge ".concat(r?"is-done":""),style:r?void 0:{background:"#f1f5f9",color:"#475569"},title:"".concat(i," delivered of ").concat(t," total"),children:[i,"/",t]})]}),(0,_.jsx)("div",{className:"bar-bg",children:(0,_.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,t/15*100),"%"),background:e.color}})}),(0,_.jsxs)("div",{className:"rcard-meta",children:[(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),null!==l&&(0,_.jsxs)("span",{className:"rcard-est-meters",title:"Estimated distance to next drop location",children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.HPi,{})}),ut(l)," to drop"]}),(0,_.jsxs)("span",{children:[(0,_.jsx)(ke,{children:(0,_.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,_.jsx)("div",{className:"step-ids",children:e.orders.slice(0,15).map((e=>(0,_.jsxs)("span",{className:"step-id",children:["S",e.step]},e.orderid)))})]},e.id)})):(e=>{const s=null===(e=us.find((e=>e.id===ja)))||void 0===e?void 0:e.label,a=Na&&Ma.length>0;return(0,_.jsxs)("div",{className:"empty-slot",children:[(0,_.jsx)("div",{className:"empty-slot-icon",children:(0,_.jsx)(S.gsJ,{})}),(0,_.jsx)("div",{className:"empty-slot-title",children:s?"No orders in ".concat(s):"No orders"}),(0,_.jsx)("div",{className:"empty-slot-sub",children:a?"".concat(Ma.length," order").concat(1===Ma.length?"":"s"," exist in other slots today"):"No deliveries found for this date"})]})})()})]})]}),(0,_.jsxs)("div",{id:"map-wrap",className:"".concat("kitchens"===F?"view-mode-kitchens":""," ").concat(Gs?"compare-split":"").trim(),children:[(0,_.jsxs)(d.W,{center:[11.022,76.982],zoom:12,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},zoomControl:!1,renderer:pa.current,inertia:!0,inertiaDeceleration:2400,inertiaMaxSpeed:2e3,wheelDebounceTime:20,wheelPxPerZoomLevel:80,zoomSnap:.25,children:[(0,_.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,_.jsx)(p.p,{position:"bottomright"}),Gs&&(0,_.jsx)(oe,{targetRef:ma}),(0,_.jsx)(ue,{trigger:"".concat(ia,"|").concat(Gs,"|").concat(ca)}),(0,_.jsx)(be,{focusedItem:it||(Oa||Ee)&&Re||Oa||Ee||Le,viewMode:F,orders:Ha,kitchens:qa,locationKey:Qe,extraPoints:Ba}),qa.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).filter((e=>!Oa||e.riders.has(Oa.id))).map(((e,s)=>(0,_.jsx)(l.p,{position:[e.lat,e.lon],icon:ct(e.kitchenName,(null===Ee||void 0===Ee?void 0:Ee.id)===e.id),zIndexOffset:(null===Ee||void 0===Ee?void 0:Ee.id)===e.id?4e3:2e3,eventHandlers:{click:()=>De(e),mouseover:e=>e.target.openPopup(),mouseout:e=>e.target.closePopup()},children:(0,_.jsxs)(m.z,{className:"kitchen-popup",maxWidth:220,minWidth:200,autoPan:!0,autoPanPadding:[20,20],children:[(0,_.jsx)("div",{className:"kp-header",children:"KITCHEN"}),(0,_.jsx)("div",{className:"kp-name",children:e.kitchenName}),(0,_.jsxs)("div",{className:"kp-stat",children:[(0,_.jsx)("span",{className:"kp-stat-lbl",children:"Orders"}),(0,_.jsx)("span",{className:"kp-stat-val",children:e.orders.length})]})]})},"k-".concat(s)))),(()=>{if(Gs&&Oa&&"actual"===Ws)return null;let e=Ra;Le&&(e=Le.orders),Ee&&(e=Ee.orders),Oa&&(e=Oa.orders),e=e.filter($);const s=Gs&&Oa?new Map(Qa.map((e=>[String(e.deliveryid),e.sequenceStep]))):null;return e.map(((a,t)=>{const i=a.rider_id,r=!i||Ce.has(i);let n,c=dt(i);if(s&&i===Oa.id&&null!=a.deliveryid){const e=s.get(String(a.deliveryid));e&&(c=(0,I.gM)(e-1),n=e)}const d=!!Oa||!!Ee,o=(0,I.Cx)(a.orderstatus),u="delivered"===String(a.orderstatus||"").toLowerCase(),m=x&&String(x)===String(a.orderid),p=a.orderstatus?'\n \n \n ').concat(u?'':"","\n "):"",h=d?(()=>{const s=n||a.step||e.indexOf(a)+1,t=32;return v().divIcon({className:"",iconSize:[t,t],iconAnchor:[16,16],popupAnchor:[0,-28],html:'
9?12:14,"px;opacity:").concat(r?1:.75,'">').concat(s>0?s:"").concat(p,"
")})})():v().divIcon({className:"",iconSize:[24,30],iconAnchor:[2,30],popupAnchor:[10,-25],html:'
').concat(p,"
")});return(0,_.jsx)(l.p,{position:[parseFloat(a.droplat||a.deliverylat),parseFloat(a.droplon||a.deliverylong)],icon:h,zIndexOffset:i?100:0,ref:e=>{e?He.current[String(a.orderid)]=e:delete He.current[String(a.orderid)]},eventHandlers:{click:()=>{const e=String(a.orderid);Ye.current.has(e)?(Ye.current.delete(e),Ge(null)):(Ye.current.add(e),Ge(a))}}},"".concat(a.orderid,"-").concat(d?"num":"flag"))}))})(),(()=>{const e=Gs&&Oa&&"actual"===Ws;if(Es)return e?[]:Ls.map(((e,s)=>(0,_.jsx)(c.R,{positions:[e.from,e.to],pathOptions:{color:e.color,weight:6,opacity:.9,lineJoin:"round",lineCap:"round"}},s)));const s=[],a=Le?new Set(Le.riders.map((e=>String(e.rider_id)))):null;return e||Va.forEach((e=>{const t=Ce.has(e.id);if(Oa&&Oa.id!==e.id)return;if(Ee&&!Ee.riders.has(e.id))return;if(a&&!a.has(String(e.id)))return;const i=Ta?(0,I.d1)(e.orders):null,n=Ta?i?[i]:[]:e.orders;if(Ta&&0===n.length)return;const l={};n.forEach((e=>{const s=e.trip_number||1;l[s]||(l[s]=[]),l[s].push(e)})),Object.entries(l).forEach((a=>{let[i,n]=a;const l=Ee?n.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===Ee.id)):n;if(0===l.length)return;const d=[...n].sort(((e,s)=>(e.step||0)-(s.step||0))),o=je(d),u=fe(e.id,i,o),m=Fs[u],p=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),h=Ta?p[0]:null;let v=null;if(Ta&&h){const s=va.find((s=>String(s.id)===String(e.id))),a=s&&Number.isFinite(s.lat)&&Number.isFinite(s.lon)?[s.lat,s.lon]:Q(h)?[J(Z(h)),J(X(h))]:null,t=J(h.droplat||h.deliverylat),i=J(h.droplon||h.deliverylong);a&&Number.isFinite(t)&&Number.isFinite(i)&&(v=[a,[t,i]])}const x=Ta?h&&v?Fs[fe(e.id,"active-".concat(h.orderid),v)]:void 0:m,j=Array.isArray(x)&&x.length>=2,f=!1===x;if(!Ta&&!j&&!f)return;const g=j?x:Ta?v:je(p);if(!g||g.length<2)return;const N=t?1:.1,b="kitchens"===F||Ee?7:6,y=Gs&&Oa&&e.id===Oa.id,k=f?"8 6":y&&"combined"===Ws?"6 5":void 0;if(Gs&&Oa&&e.id===Oa.id){const a=new Map(Qa.map((e=>[String(e.deliveryid),e.sequenceStep]))),t=p.filter($),r=t.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));let n;if(j)n=he(g,r);else{const e=g.length>r.length;n=[];for(let s=0;s=g.length||t>=g.length?n.push([]):n.push([g[a],g[t]])}}const l="combined"===Ws?5:0;return s.push((0,_.jsx)(c.R,{positions:g,pathOptions:{color:"#ffffff",weight:b+4,opacity:.5*N,lineJoin:"round",lineCap:"round",offset:l}},"".concat(e.id,"-").concat(i,"-halo"))),void n.forEach(((r,n)=>{if(!r||r.length<2)return;const d=t[n],o=d?a.get(String(d.deliveryid)):null,u="combined"===Ws?U:o?(0,I.gM)(o-1):e.color,m=null!=oa&&oa===o,p=m?b+1.5:b,h=m?1:oa?.5*N:N;s.push((0,_.jsx)(c.R,{positions:r,pathOptions:{color:u,weight:p,opacity:h,lineJoin:"round",lineCap:"round",dashArray:k,offset:l}},"".concat(e.id,"-").concat(i,"-step-").concat(n,"-").concat((null===d||void 0===d?void 0:d.deliveryid)||n)))}))}s.push((0,_.jsxs)(r.Fragment,{children:[(0,_.jsx)(c.R,{positions:g,pathOptions:{color:"#ffffff",weight:b+4,opacity:.5*N,lineJoin:"round",lineCap:"round"}}),(0,_.jsx)(c.R,{positions:g,pathOptions:{color:e.color,weight:b,opacity:N,lineJoin:"round",lineCap:"round",dashArray:k}})]},"".concat(e.id,"-").concat(i)))}))})),s})(),va.filter((e=>Ta?"active"===e.status&&Ya.has(String(e.id)):La.some((s=>String(s.id)===String(e.id))))).filter((e=>!Oa||String(Oa.id)===String(e.id))).map((e=>{var s;const a="active"===e.status,t=a?"#16a34a":"#dc2626",r=La.find((s=>String(s.id)===String(e.id))),n=null===r||void 0===r||null===(s=r.orders)||void 0===s?void 0:s.slice().sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!I.Ys.has(s)&&!I.yP.has(s)})),c=n?n.deliverysuburb||W(n.deliveryaddress):null,d=(e.username||"").replace(/[<>&"']/g,""),o=e.orderid?String(e.orderid).replace(/[<>&"']/g,""):"",u="".concat(Ta?"bike":"pin","|").concat(t,"|").concat(d,"|").concat(o,"|").concat(a?1:0);let p=Be.current.get(e.id);if(!p||p.sig!==u){p={sig:u,icon:Ta?v().divIcon({className:"",iconSize:[160,44],iconAnchor:[22,22],popupAnchor:[0,-22],html:'
\n \n \n \n \n ').concat(d).concat(o?" #".concat(o,""):"","\n
")}):v().divIcon({className:"",iconSize:[140,56],iconAnchor:[12,41],popupAnchor:[58,-40],html:'
\n
\n
').concat(d).concat(o?" #".concat(o,""):"","
\n
")})},Be.current.set(e.id,p)}const h=p.icon,x={click:s=>{const a=String(e.id);Ve.current.has(a)?(Ve.current.delete(a),s.target.closePopup()):(Ve.current.add(a),s.target.openPopup());const t=La.find((e=>String(e.id)===a));t&&Ua(t)},popupclose:()=>{Ve.current.delete(String(e.id))}},j=Ta?ye:l.p,g=Ta?{target:[e.lat,e.lon],duration:15e3}:{position:[e.lat,e.lon]};return(0,_.jsx)(j,(0,i.A)((0,i.A)({},g),{},{icon:h,zIndexOffset:2500,eventHandlers:x,children:(0,_.jsxs)(m.z,{maxWidth:260,autoPan:!0,autoPanPadding:[20,20],className:"dispatch-popup live-rider-popup",children:[(0,_.jsx)("div",{className:"pu-hdr-live",children:(0,_.jsxs)("div",{className:"pu-hdr-left",children:[(0,_.jsx)("span",{className:"pu-live-indicator",style:{"--pulse-color":t},children:(0,_.jsx)("span",{className:"pu-live-dot"})}),(0,_.jsx)("span",{className:"pu-hdr-title",children:"LIVE GPS"})]})}),(0,_.jsxs)("div",{className:"pu-rider-profile",children:[(0,_.jsx)("div",{className:"pu-avatar",style:{backgroundColor:"".concat(t,"12"),color:t},children:(0,_.jsx)(S.bsz,{})}),(0,_.jsxs)("div",{className:"pu-rider-info-text",children:[(0,_.jsxs)("div",{className:"pu-rider-name-row",children:[(0,_.jsx)("span",{className:"pu-rider-name",children:e.username||"Rider #".concat(e.id)}),e.status&&(0,_.jsx)("span",{className:"pu-status-badge ".concat("active"===e.status.toLowerCase()?"active":"idle"),children:e.status})]}),(0,_.jsxs)("div",{className:"pu-rider-meta",children:["Rider ID: #",e.id]})]})]}),(0,_.jsxs)("div",{className:"pu-body-content",children:[e.orderid&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Active Order"}),(0,_.jsxs)("span",{className:"pu-info-value pu-order-badge",children:["#",e.orderid]})]}),n&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Next Stop"}),(0,_.jsxs)("span",{className:"pu-info-value",style:{color:"#4f46e5"},children:["#",n.step||"?"," \xb7 ",n.deliverycustomer||"\u2014"]})]}),c&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Next Location"}),(0,_.jsx)("span",{className:"pu-info-value",title:n.deliveryaddress||c,children:c})]}),(null===n||void 0===n?void 0:n.pickupcustomer)&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Pickup"}),(0,_.jsx)("span",{className:"pu-info-value",title:n.pickupcustomer,children:n.pickupcustomer})]}),e.contactno&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Phone"}),(0,_.jsx)("a",{href:"tel:".concat(e.contactno),className:"pu-info-value pu-phone-link",children:e.contactno})]}),e.logdate&&(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Last Seen"}),(0,_.jsxs)("span",{className:"pu-info-value pu-time-stamp",children:[(0,_.jsx)(S.VP9,{className:"inline-icon"})," ",f()(e.logdate).isValid()?f()(e.logdate).format("hh:mm:ss A"):e.logdate]})]}),(0,_.jsxs)("div",{className:"pu-info-row",children:[(0,_.jsx)("span",{className:"pu-info-label",children:"Position"}),(0,_.jsxs)("span",{className:"pu-info-value pu-coordinates",children:[e.lat.toFixed(5),", ",e.lon.toFixed(5)]})]})]})]})}),"live-".concat(e.id))})),Gs&&Oa&&"planned"!==Ws&&Qa.map(((e,s)=>{var a,t;if(0===e.coords.length)return null;const i=(0,I.gM)(s),n="combined"===Ws?G:i,d=[e.coords[0].lat,e.coords[0].lng],o=[e.coords[e.coords.length-1].lat,e.coords[e.coords.length-1].lng],m=As[e.deliveryid],p=Array.isArray(m)&&m.length>=2?m:e.coords.map((e=>[e.lat,e.lng]));let h=p,x=!0;if(Es){const s=Rs[e.sequenceStep]||0;s<2?x=!1:h=p.slice(0,Math.min(s,p.length))}const j=oa===e.sequenceStep,g=String(e.orderstatus||"").toLowerCase(),N=I.Ys.has(g),b=I.yP.has(g),y=et.find((s=>s.sequenceStep===e.sequenceStep)),k=!(null===y||void 0===y||!y.anomaly),w=null===Oa||void 0===Oa||null===(a=Oa.orders)||void 0===a?void 0:a.find((s=>null!=s.deliveryid&&String(s.deliveryid)===String(e.deliveryid))),F=(0,I.Cx)(e.orderstatus),M=(e.orderstatus&&'\n \n \n ').concat(N?'':"","\n "),["compare-step-pin"]);j&&M.push("is-focused"),N&&M.push("is-delivered"),b&&M.push("is-skipped"),k&&M.push("is-anomaly");const C='
')+''.concat(e.sequenceStep,"")+(N?'':"")+"
",A=v().divIcon({className:"",iconSize:[36,36],iconAnchor:[18,18],popupAnchor:[0,-22],html:C}),z=1===e.sequenceStep,P=z?v().divIcon({className:"",iconSize:[40,40],iconAnchor:[20,20],html:'
')+'
'}):null,E="combined"===Ws?-5:0;return(0,_.jsxs)(r.Fragment,{children:[x&&(0,_.jsx)(c.R,{positions:h,pathOptions:{color:"#ffffff",weight:j?11:9,opacity:j?.75:.55,lineJoin:"round",lineCap:"round",offset:E}}),x&&(0,_.jsx)(c.R,{positions:h,pathOptions:{color:n,weight:j?6.5:5,opacity:j?1:oa?.55:.95,lineJoin:"round",lineCap:"round",offset:E}}),z&&(0,_.jsx)(l.p,{position:d,icon:P,zIndexOffset:j?900:100,eventHandlers:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),ua((s=>s===e.sequenceStep?null:e.sequenceStep))}},children:(0,_.jsx)(u.m,{direction:"top",offset:[0,-12],opacity:1,className:"compare-tooltip",children:(0,_.jsxs)("div",{className:"cmp-tip",children:[(0,_.jsxs)("div",{className:"cmp-tip-header",children:[(0,_.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:(0,_.jsx)(S.zPd,{})}),(0,_.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,_.jsx)("div",{className:"cmp-tip-title",children:e.pickupcustomer||"Pickup"}),(0,_.jsx)("div",{className:"cmp-tip-sub",children:null!==(t=e.coords[0])&&void 0!==t&&t.logdate?"Picked up \xb7 ".concat(f()(e.coords[0].logdate).format("hh:mm A")):"Rider trip origin"})]})]}),(0,_.jsx)("div",{className:"cmp-tip-action",children:"Click for step 1 details"})]})})}),(0,_.jsx)(l.p,{position:o,icon:A,zIndexOffset:j?1e3:200,eventHandlers:w?{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),ua((s=>s===e.sequenceStep?null:e.sequenceStep)),Ke.current&&(clearTimeout(Ke.current),Ke.current=null);const a=String(w.orderid);Ye.current.has(a)?(Ye.current.delete(a),Ge(null)):(Ye.current.add(a),Ge(w))}}:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),ua((s=>s===e.sequenceStep?null:e.sequenceStep)),w&&s.target&&"function"===typeof s.target.openPopup&&s.target.openPopup()}},children:!w&&(0,_.jsx)(u.m,{direction:"top",offset:[0,-20],opacity:1,className:"compare-tooltip",children:(()=>{const s=(0,I.Cx)(e.orderstatus);return(0,_.jsxs)("div",{className:"cmp-tip",children:[(0,_.jsxs)("div",{className:"cmp-tip-header",children:[(0,_.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:e.sequenceStep}),(0,_.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,_.jsx)("div",{className:"cmp-tip-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,_.jsx)("div",{className:"cmp-tip-sub",children:e.deliverytime?"Delivered ".concat(f()(e.deliverytime).format("hh:mm A")):"".concat(e.coords.length," GPS pings")})]}),e.orderstatus&&(0,_.jsx)("span",{className:"cmp-tip-tag",style:{background:s.bg,color:s.fg},children:s.label})]}),k&&(0,_.jsx)("div",{className:"cmp-tip-anomaly",children:"Deviation flagged \u2014 see details below"}),(0,_.jsx)("div",{className:"cmp-tip-action",children:j?"Click to deselect":"Click for details"})]})})()})})]},"actual-".concat(e.deliveryid))}))]}),Gs&&Oa&&(0,_.jsxs)("div",{className:"compare-view-switcher",role:"group","aria-label":"Compare view layer",children:[(0,_.jsx)("button",{type:"button",className:"actual"===Ws?"is-active":"",onClick:()=>$s("actual"),title:"Show only the rider's actual GPS trail",children:"Actual"}),(0,_.jsx)("button",{type:"button",className:"planned"===Ws?"is-active":"",onClick:()=>$s("planned"),title:"Show only the dispatched planned route",children:"Planned"}),(0,_.jsx)("button",{type:"button",className:"combined"===Ws?"is-active":"",onClick:()=>$s("combined"),title:"Overlay planned (dashed) and actual (solid) on one map",children:"Combined"})]}),(0,_.jsx)("div",{id:"ov-tl"}),(0,_.jsxs)("div",{id:"ov-br",children:[(0,_.jsxs)("button",{className:"sbt ".concat(Es?"active":""),onClick:()=>{if(Es)return Ds(!1),qs([]),void Is({});Ds(!0),qs([]),Is({});const e=Gs&&Oa,s=e?new Map(Qa.map((e=>[String(e.deliveryid),e.sequenceStep]))):null,a=[];if(La.forEach((t=>{if(!Ce.has(t.id))return;if(Oa&&Oa.id!==t.id)return;if(Ee&&!Ee.riders.has(t.id))return;const i={};t.orders.forEach((e=>{const s=e.trip_number||1;i[s]||(i[s]=[]),i[s].push(e)})),Object.entries(i).forEach((i=>{let[r,n]=i;const l=Ee?n.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===Ee.id)):n;if(0===l.length)return;const c=[...n].sort(((e,s)=>(e.step||0)-(s.step||0))),d=je(c),o=fe(t.id,r,d),u=Fs[o],m=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),p=je(m),h="kitchens"===F||Ee,v=u||p;if(v.length<2)return;let x=()=>t.color;if(e&&t.id===Oa.id){const e=m.filter($).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),a=u?he(u,e):(()=>{const s=p.length>e.length,a=[];for(let t=0;t=p.length||i>=p.length?a.push([]):a.push([p[e],p[i]])}return a})(),i=[];let r=0;a.forEach(((e,s)=>{const a=Math.max(0,((null===e||void 0===e?void 0:e.length)||0)-1);for(let t=0;t{const a=i[e];if(null==a)return t.color;const r=m.filter($)[a],n=r?s.get(String(r.deliveryid)):null;return n?(0,I.gM)(n-1):t.color}}for(let e=0;ee.delay-s.delay)),a.forEach(((e,s)=>{setTimeout((()=>{qs((s=>[...s,e])),s===a.length-1&&setTimeout((()=>{Ds(!1),Is({})}),1e3)}),e.delay)})),e&&Qa.length>0){const e=[...Qa],s=e.map((e=>{const s=As[e.deliveryid];return Array.isArray(s)&&s.length>=2?s:e.coords.map((e=>[e.lat,e.lng]))})),t=a.length>0?a[a.length-1].delay:800*e.length,i=Math.max(t,600*e.length),r=i/Math.max(1,e.length),n=Date.now(),l=()=>{if(!Os.current)return;const a=Date.now()-n,t={};e.forEach(((e,i)=>{const n=s[i];if(!n||n.length<2)return;const l=i*r;if(a>=l+r)t[e.sequenceStep]=n.length;else if(a>=l){const s=(a-l)/r;t[e.sequenceStep]=Math.max(2,Math.ceil(s*n.length))}})),Is(t),a{if(Gs)Js(!1);else{if(!Oa){const e=La.find((e=>(e.orders||[]).some((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)))),s=La.find((e=>e.orders&&e.orders.length>0)),a=e||s;if(a&&(Ua(a),Je))return void(ta.current=!0)}Js(!0)}},title:Oa?"Compare planned vs. actual route for ".concat(Oa.riderName):"Compare planned vs. actual route (will focus the first rider)",style:{boxShadow:"var(--shadow-lg)",background:Gs?"linear-gradient(135deg, #662582, #9255AB)":"#fff",marginLeft:8,color:Gs?"#fff":void 0},children:[(0,_.jsx)("span",{className:"sbt-icon",children:(0,_.jsx)(S.$G1,{})}),Gs?"Exit Compare":"Compare"]})]})]}),Gs&&Oa&&(0,_.jsx)("div",{id:"compare-map-wrap",children:(()=>{const e=Qa.length,s=Qa.filter((e=>e.coords.length>0)).length,a=Qa.filter((e=>e.isLoading)).length,t=e>0?Math.round(s/e*100):0,i=e>0&&s===e&&0===a,n=null!=oa?et.find((e=>e.sequenceStep===oa)):null;return(0,_.jsxs)("div",{className:"compare-header-v2",children:[(0,_.jsxs)("div",{className:"compare-header-row",children:[(0,_.jsxs)("div",{className:"compare-title",children:[(0,_.jsx)("span",{className:"compare-title-dot",style:{background:Oa.color}}),(0,_.jsx)("span",{className:"compare-title-name",children:Oa.riderName}),(0,_.jsx)("span",{className:"compare-title-badge",children:"ACTUAL vs PLANNED"})]}),(0,_.jsxs)("div",{className:"compare-header-tools",children:[null!=oa&&(0,_.jsxs)("button",{type:"button",className:"compare-overall-btn",onClick:()=>ua(null),title:"Zoom out to the whole day",children:[(0,_.jsx)(S.Zs6,{})," Overall"]}),(0,_.jsx)("button",{type:"button",className:"compare-timeline-toggle".concat(Qs?" is-open":""),onClick:()=>ea((e=>!e)),title:Qs?"Hide planned/actual timeline":"Show planned/actual timeline","aria-expanded":Qs,children:(0,_.jsx)(S.j1Q,{})})]})]}),Qs&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"compare-timeline-wrap",children:[(0,_.jsxs)("div",{className:"compare-timeline-container",children:[(0,_.jsxs)("div",{className:"compare-timeline-labels",children:[(0,_.jsx)("div",{className:"compare-timeline-label",children:"Planned"}),(0,_.jsx)("div",{className:"compare-timeline-label",children:"Actual"})]}),(0,_.jsxs)("div",{className:"compare-timeline-scrollable",children:[(0,_.jsx)("div",{className:"compare-timeline-track is-planned",children:at.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=I.Ys.has(t),n=I.yP.has(t),l=oa===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,I.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",n&&"is-skipped",!i&&!n&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,_.jsxs)(r.Fragment,{children:[s>0&&(0,_.jsx)("span",{className:"compare-step-spacer"}),(0,_.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>ua((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Planned Step ".concat(o)+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.expectedTs?" \xb7 ".concat(e.expectedTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,_.jsx)("span",{className:"compare-step-circle",children:c?(0,_.jsx)("span",{className:"compare-step-spin"}):o}),e.expectedTs&&(0,_.jsx)("span",{className:"compare-step-tick",children:e.expectedTs.format("HH:mm")})]})]},"step-p-".concat(e.deliveryid))}))}),(0,_.jsx)("div",{className:"compare-timeline-track is-actual",children:tt.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=I.Ys.has(t),n=I.yP.has(t),l=oa===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,I.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",n&&"is-skipped",!i&&!n&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,_.jsxs)(r.Fragment,{children:[s>0&&(0,_.jsx)("span",{className:"compare-step-spacer"}),(0,_.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>ua((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Actual Visit ".concat(s+1," (Planned Step ").concat(o,")")+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.actualTs?" \xb7 ".concat(e.actualTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,_.jsx)("span",{className:"compare-step-circle",children:c?(0,_.jsx)("span",{className:"compare-step-spin"}):o}),e.actualTs&&(0,_.jsx)("span",{className:"compare-step-tick",children:e.actualTs.format("HH:mm")}),e.anomaly&&(0,_.jsx)("span",{className:"compare-step-flag",title:"Deviation flagged"})]})]},"step-a-".concat(e.deliveryid))}))})]})]}),(0,_.jsxs)("div",{className:"compare-progress-strip",children:[(0,_.jsx)("div",{className:"compare-progress-bar-wrap",children:(0,_.jsx)("div",{className:"compare-progress-bar-fill".concat(i?" is-done":""),style:{width:"".concat(t,"%")}})}),(0,_.jsx)("span",{className:"compare-progress-text",children:a>0?"Loading GPS\u2026 ".concat(s,"/").concat(e):"".concat(s,"/").concat(e," tracks")})]})]}),(()=>{const e="combined"===Ws,s=n?(0,I.gM)(n.sequenceStep-1):"linear-gradient(90deg, ".concat(I.Z3.slice(0,6).join(", "),")"),a=e?U:s,t=e?G:s;return(0,_.jsxs)("div",{className:"compare-legend",children:[(0,_.jsxs)("span",{className:"compare-legend-item",children:[(0,_.jsx)("span",{className:"compare-legend-swatch is-step-color is-dashed",style:{background:a}}),"Planned (dashed)"]}),(0,_.jsxs)("span",{className:"compare-legend-item",children:[(0,_.jsx)("span",{className:"compare-legend-swatch is-step-color",style:{background:t}}),"Actual GPS (solid)"]}),(0,_.jsx)("span",{className:"compare-legend-note",children:"Kalman-smoothed GPS \xb7 OSRM road-snapped"})]})})()]})]})})()}),Gs&&Oa&&(0,_.jsx)(V,{focusedRider:Oa,compareDeltas:et,compareSummary:st,actualOrdered:tt,focusedCompareStep:oa,setFocusedCompareStep:ua,sequenceOpen:Zs,setSequenceOpen:Xs,expandedSeqGroups:sa,setExpandedSeqGroups:aa,onClose:()=>Js(!1)})]}),Ue&&(0,_.jsx)("div",{className:"dispatch-popup-center",role:"dialog","aria-label":"Order ".concat(Ue.orderid," details"),onMouseEnter:()=>{Ke.current&&(clearTimeout(Ke.current),Ke.current=null)},onMouseLeave:()=>{(e=>{if(!e)return!1;if(Ye.current.has(String(e.orderid)))return!0;if(Gs&&Oa&&null!=e.deliveryid){const s=Qa.find((s=>String(s.deliveryid)===String(e.deliveryid)));if(s&&oa===s.sequenceStep)return!0}return!1})(Ue)||(Ke.current&&clearTimeout(Ke.current),Ke.current=setTimeout((()=>{Ge(null),Ke.current=null}),200))},children:(0,_.jsxs)("div",{className:"dispatch-popup-card dispatch-popup",children:[(0,_.jsx)("button",{type:"button",className:"dispatch-popup-center-close","aria-label":"Close order details",onClick:()=>{Ye.current.delete(String(Ue.orderid)),Ge(null)},children:"\xd7"}),(e=>{const s=(0,I.Cx)(e.orderstatus),a=e.rider_id||e.userid,t=I.Ys.has(String(e.orderstatus||"").toLowerCase()),i=t?null:ot(a,e);return(0,_.jsxs)("div",{style:{height:"100%",width:"100%"},children:[(0,_.jsxs)("div",{className:"pu-header",children:[(0,_.jsxs)("div",{className:"pu-header-top",children:[(0,_.jsxs)("div",{className:"pu-id",children:["ORDER #",e.orderid]}),e.orderstatus&&(0,_.jsx)("span",{className:"pu-status-chip",style:{background:s.bg,color:s.fg},children:s.label})]}),(0,_.jsxs)("div",{className:"pu-rider",children:[(0,_.jsx)(S.aVM,{})," ",(0,_.jsx)("span",{children:e.rider_name||e.ridername||"Unassigned"})]}),(e.deliverycustomer||e.customername)&&(0,_.jsxs)("div",{className:"pu-customer",title:e.deliverycustomer||e.customername,children:[(0,_.jsx)(S.u9F,{}),(0,_.jsx)("span",{children:e.deliverycustomer||e.customername})]}),null!=e.deliveryid&&(0,_.jsxs)("div",{className:"pu-delivery-id",children:["Delivery #",e.deliveryid]})]}),(0,_.jsxs)("div",{className:"pu-body",children:[xe.some((s=>e[s.key]))&&(0,_.jsxs)("div",{className:"pu-section",children:[(0,_.jsx)("div",{className:"pu-section-label",children:"Timeline"}),(0,_.jsx)("div",{className:"pu-timeline",children:xe.map((s=>{const a=ve(e[s.key]);return a?(0,_.jsxs)("div",{className:"pu-tl-row ".concat(s.final?"delivered":""),children:[(0,_.jsx)("span",{className:"pu-tl-dot"}),(0,_.jsx)("span",{className:"pu-tl-label",children:s.label}),(0,_.jsx)("span",{className:"pu-tl-time",children:a})]},s.key):null}))})]}),(0,_.jsxs)("div",{className:"pu-section",children:[(0,_.jsx)("div",{className:"pu-section-label",children:"Details"}),(0,_.jsxs)("div",{className:"pu-details-grid",children:[(e.pickupcustomer||e.locationname||e.pickuplocation)&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.NtI,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Pickup"}),(0,_.jsx)("div",{className:"pu-detail-value",title:e.pickupcustomer||e.locationname||e.pickuplocation,children:e.pickupcustomer||e.locationname||e.pickuplocation})]})]}),(e.deliverysuburb||e.deliveryaddress)&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.JFD,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Drop"}),(0,_.jsx)("div",{className:"pu-detail-value",title:e.deliveryaddress||e.deliverysuburb,children:e.deliverysuburb||W(e.deliveryaddress)})]})]}),e.zone_name&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.Cd7,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Zone"}),(0,_.jsx)("div",{className:"pu-detail-value",title:e.zone_name,children:e.zone_name})]})]}),(e.rider_id||e.userid)&&(0,_.jsxs)("div",{className:"pu-detail",children:[(0,_.jsx)("div",{className:"pu-detail-icon",children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{className:"pu-detail-body",children:[(0,_.jsx)("div",{className:"pu-detail-label",children:"Rider ID"}),(0,_.jsxs)("div",{className:"pu-detail-value",children:["#",e.rider_id||e.userid]})]})]})]}),(null!=e.kms||null!=e.actualkms||!t&&null!=e.riderkms||null!==i)&&(0,_.jsxs)("div",{className:"pu-distance-row",children:[null!=e.kms&&""!==e.kms&&(0,_.jsxs)("div",{className:"pu-distance-chip",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Planned"}),(0,_.jsxs)("span",{className:"pu-distance-value",children:[e.kms," km"]})]}),null!=e.actualkms&&""!==e.actualkms&&(0,_.jsxs)("div",{className:"pu-distance-chip",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.xI$,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Actual"}),(0,_.jsxs)("span",{className:"pu-distance-value",children:[e.actualkms," km"]})]}),!t&&null!=e.riderkms&&""!==e.riderkms&&(0,_.jsxs)("div",{className:"pu-distance-chip",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.bsz,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Rider"}),(0,_.jsxs)("span",{className:"pu-distance-value",children:[parseFloat(e.riderkms).toFixed(2)," km"]})]}),null!==i&&(0,_.jsxs)("div",{className:"pu-distance-chip pu-est-meters",title:"Estimated distance to drop location",children:[(0,_.jsx)("span",{className:"pu-distance-icon",children:(0,_.jsx)(S.HPi,{})}),(0,_.jsx)("span",{className:"pu-distance-label",children:"Est. to Drop"}),(0,_.jsx)("span",{className:"pu-distance-value",children:ut(i)})]})]})]})]})]})})(Ue)]})})]}),!a&&"analysis"===C&&(0,_.jsxs)("div",{id:"dispatch-analysis",children:[(0,_.jsx)("div",{className:"da-picker-row",children:Se.map((e=>{var s;const a=z[e.key],t=E===e.key,i=!1===(null===a||void 0===a||null===(s=a.data)||void 0===s?void 0:s.success),r=i?"#fee2e2":a?"".concat(e.color,"22"):"#f1f5f9",n=i?"#dc2626":a?e.color:"#64748b",l=t?"Loading\u2026":i?"! Failed":a?"\u2713 ".concat(a.fetchedAt):"Fetch",c=L===e.key;return(0,_.jsxs)("button",{type:"button",className:"da-picker ".concat(a?"has-data":""," ").concat(t?"is-loading":""," ").concat(c?"is-active":""),onClick:()=>!t&&ce(e.key),style:{borderColor:c?e.color:i?"#fecaca":a?e.border:"#e2e8f0",background:i?"#fef2f2":a?e.bg:"#ffffff",boxShadow:c?"0 0 0 2px ".concat(e.color,"33"):void 0},disabled:t,children:[(0,_.jsxs)("div",{className:"da-picker-head",children:[(0,_.jsx)("div",{className:"da-picker-badge",style:{background:"".concat(e.color,"22"),color:e.color},children:e.label[0]}),(0,_.jsxs)("div",{className:"da-picker-meta",children:[(0,_.jsx)("div",{className:"da-picker-name",children:e.label}),(0,_.jsx)("div",{className:"da-picker-range",children:e.timeRange})]}),(0,_.jsx)("span",{className:"da-picker-status",style:{background:r,color:n},children:l})]}),(0,_.jsx)("div",{className:"da-picker-sub",children:e.sub})]},e.key)}))}),((e,s,a)=>{if(!L)return(0,_.jsx)("div",{className:"da-empty",children:"Pick a batch above to view its efficiency analysis."});const t=Se.find((e=>e.key===L)),r=z[L],n=E===L;if(n&&!r)return(0,_.jsxs)("div",{className:"da-empty",children:["Loading ",t.label," batch\u2026"]});if(!r)return null;const l=r.data||{};var c,d;if(!1===l.success)return(0,_.jsxs)("div",{className:"da-result-card da-result-card-error",style:{borderColor:"#fecaca",borderTopColor:"#ef4444"},children:[(0,_.jsxs)("div",{className:"da-result-head",children:[(0,_.jsxs)("div",{children:[(0,_.jsxs)("div",{className:"da-result-title",children:[t.label," Batch"]}),(0,_.jsxs)("div",{className:"da-result-sub",children:[t.timeRange," \xb7 Fetched at ",r.fetchedAt]})]}),(0,_.jsx)("button",{type:"button",className:"da-result-refresh",title:"Retry",onClick:()=>ce(L),disabled:n,style:{background:"#fee2e2",color:"#dc2626"},children:(0,_.jsx)(S.joZ,{})})]}),(0,_.jsxs)("div",{className:"da-error",children:[(0,_.jsxs)("div",{className:"da-error-title",children:[(0,_.jsx)(S.ItP,{}),(0,_.jsx)("span",{children:(null===l||void 0===l||null===(c=l.error)||void 0===c?void 0:c.code)||"Request failed"})]}),(0,_.jsx)("div",{className:"da-error-msg",children:(null===l||void 0===l||null===(d=l.error)||void 0===d?void 0:d.message)||"The server returned an error."}),(null===l||void 0===l?void 0:l.request_id)&&(0,_.jsxs)("div",{className:"da-error-meta",children:["request_id: ",l.request_id]})]})]});const o=l.fleet_summary||{},u=Array.isArray(l.rider_timelines)?l.rider_timelines:[],m=Array.isArray(l.substitution_opportunities)?l.substitution_opportunities:[],p=l.top_recommendation,h=!(!p||!p.idle_rider_name&&!p.idle_rider_id),v=!!(p&&p.action&&"none"!==p.action&&h),x=l.window||{},j=(e,s)=>{const a=String(null!==e&&void 0!==e?e:"").trim();if(!a)return s||"\u2014";const t="string"===typeof s&&/^Rider\s+\d+$/i.test(s.trim()),i=Array.isArray(La)?La.find((e=>String(e.id)===a)):null;if(i&&i.riderName)return i.riderName;const r=Array.isArray(Ca)?Ca.find((e=>String(e.id)===a)):null;return r&&r.riderName?r.riderName:!t&&s?s:"Rider ".concat(a)},f=we(o.fleet_start),g=we(o.fleet_done),N=null!=f&&null!=g&&g>f?g-f:null,b=parseFloat(o.avg_utilisation_pct),y=Number.isFinite(b)?b:null,k=null==y?"unknown":y>=85?"good":y>=70?"ok":"low",w="good"===k?"#10b981":"ok"===k?"#f59e0b":"low"===k?"#ef4444":"#94a3b8",F=(e=>{let{assessment:s,spreadMin:a,stdev:t}=e;const i=String(s||"").toLowerCase();return/high imbalance|severe|critical/.test(i)||/imbalance|recommend/.test(i)||null!=a&&a>30||null!=t&&t>1?"warn":/balanced|excellent|good/.test(i)?"success":"info"})({assessment:null===p||void 0===p?void 0:p.fleet_balance_assessment,spreadMin:parseFloat(o.finish_time_spread_minutes),stdev:parseFloat(o.load_balance_stdev)}),M=u.map((e=>{const s=we(e.started_at),a=we(e.finished_at);let t=0,r=100;null!=f&&N&&(null!=s&&(t=Math.max(0,Math.min(100,(s-f)/N*100))),null!=a&&(r=Math.max(0,Math.min(100,(a-f)/N*100))));const n=Math.max(0,r-t),l=parseFloat(e.active_minutes),c=parseFloat(e.idle_minutes),d=(Number.isFinite(l)?l:0)+(Number.isFinite(c)?c:0),o=d>0?l/d*100:y,u=null==o?"unknown":o>=85?"good":o>=70?"ok":"low",m="good"===u?"#10b981":"ok"===u?"#f59e0b":"low"===u?"#ef4444":"#94a3b8",p=j(e.userid,e.name);return(0,i.A)((0,i.A)({},e),{},{displayName:p,_startPct:t,_endPct:r,_activePct:n,_riderUtilPct:o,_riderColor:m})}));return M.sort(((e,s)=>(we(s.finished_at)||0)-(we(e.finished_at)||0))),(0,_.jsxs)("div",{className:"da-detail",children:[(0,_.jsxs)("div",{className:"da-detail-head",style:{borderTopColor:t.color,background:t.bg},children:[(0,_.jsxs)("div",{children:[(0,_.jsxs)("div",{className:"da-detail-title",children:[t.label," Batch",(0,_.jsxs)("span",{className:"da-detail-sub-inline",children:[l.date?" \xb7 ".concat(l.date):"",x.from&&x.to?" \xb7 ".concat(x.from," \u2013 ").concat(x.to):""]})]}),(0,_.jsxs)("div",{className:"da-detail-sub",children:["Fetched at ",r.fetchedAt," \xb7 Input deliveries: ",null!==(e=l.input_delivery_count)&&void 0!==e?e:"\u2014"]})]}),(0,_.jsxs)("div",{className:"da-detail-actions",children:[(0,_.jsxs)("span",{className:"da-live-tag ".concat(n?"is-active":""),title:"Auto-refreshing every ".concat(Math.round(15),"s"),children:[(0,_.jsx)("span",{className:"da-live-dot"}),"Live \xb7 ",Math.round(15),"s"]}),(0,_.jsx)("button",{type:"button",className:"da-result-refresh",title:"Refresh now",onClick:()=>{P((e=>{const s=(0,i.A)({},e);return delete s[L],s})),ie.mutate({batch:L,tenantId:916})},disabled:n,style:{background:"".concat(t.color,"22"),color:t.color},children:(0,_.jsx)(S.joZ,{})})]})]}),(0,_.jsx)("div",{className:"da-section",children:(0,_.jsxs)("div",{className:"da-hero-row",children:[(0,_.jsxs)("div",{className:"da-hero-card",children:[(0,_.jsx)("div",{className:"da-hero-icon",style:{background:"#6625821f",color:"#662582"},children:(0,_.jsx)(S.aEx,{})}),(0,_.jsx)("div",{className:"da-hero-value",children:_e(o.total_orders)}),(0,_.jsx)("div",{className:"da-hero-label",children:"Total Orders"}),null!=l.input_delivery_count&&l.input_delivery_count!==o.total_orders&&(0,_.jsxs)("div",{className:"da-hero-sub",children:[l.input_delivery_count," input"]})]}),(0,_.jsxs)("div",{className:"da-hero-card",children:[(0,_.jsx)("div",{className:"da-hero-icon",style:{background:"#0ea5e91f",color:"#0ea5e9"},children:(0,_.jsx)(S.GQB,{})}),(0,_.jsx)("div",{className:"da-hero-value",children:_e(o.total_riders)}),(0,_.jsx)("div",{className:"da-hero-label",children:"Active Riders"}),null!=o.orders_per_rider_avg&&(0,_.jsxs)("div",{className:"da-hero-sub",children:[o.orders_per_rider_avg," avg orders / rider"]})]}),(0,_.jsxs)("div",{className:"da-hero-card",children:[(0,_.jsx)("div",{className:"da-hero-icon",style:{background:"#8b5cf61f",color:"#8b5cf6"},children:(0,_.jsx)(S.XT0,{})}),(0,_.jsxs)("div",{className:"da-hero-value",children:[null!=o.total_duration_minutes?"".concat(o.total_duration_minutes):"\u2014",null!=o.total_duration_minutes&&(0,_.jsx)("span",{className:"da-hero-unit",children:" min"})]}),(0,_.jsx)("div",{className:"da-hero-label",children:"Fleet Window"}),o.fleet_start&&o.fleet_done&&(0,_.jsxs)("div",{className:"da-hero-sub",children:[o.fleet_start," \u2192 ",o.fleet_done]})]})]})}),(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsx)("div",{className:"da-section-label",children:"Fleet Health"}),(0,_.jsxs)("div",{className:"da-health-row",children:[(0,_.jsxs)("div",{className:"da-health-card",children:[(0,_.jsx)("div",{className:"da-ring",style:{"--ring-color":w,"--ring-pct":null!=y?Math.max(0,Math.min(100,y)):0},children:(0,_.jsxs)("span",{className:"da-ring-num",children:[null!=y?"".concat(y.toFixed(0)):"\u2014",null!=y&&(0,_.jsx)("span",{className:"da-ring-unit",children:"%"})]})}),(0,_.jsxs)("div",{className:"da-health-meta",children:[(0,_.jsx)("div",{className:"da-health-label",children:"Avg Utilisation"}),(0,_.jsx)("div",{className:"da-health-sub",style:{color:w},children:"good"===k?"Strong":"ok"===k?"Moderate":"low"===k?"Low":"\u2014"})]})]}),(0,_.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,_.jsx)("div",{className:"da-health-value",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev).toFixed(2):"\u2014"}),(0,_.jsx)("div",{className:"da-health-label",children:"Load Balance \u03c3"}),(0,_.jsx)("div",{className:"da-health-sub",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev)>1?"Uneven workload":"Workload balanced":"Stdev of orders / rider"})]}),(0,_.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,_.jsxs)("div",{className:"da-health-value",children:[null!=o.finish_time_spread_minutes?"".concat(o.finish_time_spread_minutes):"\u2014",null!=o.finish_time_spread_minutes&&(0,_.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,_.jsx)("div",{className:"da-health-label",children:"Finish Spread"}),(0,_.jsx)("div",{className:"da-health-sub",children:null!=o.finish_time_stdev_minutes?"\u03c3 ".concat(parseFloat(o.finish_time_stdev_minutes).toFixed(1)," min"):"First \u2192 last finish"})]}),(0,_.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,_.jsxs)("div",{className:"da-health-value",children:[null!=o.avg_active_minutes?"".concat(parseFloat(o.avg_active_minutes).toFixed(0)):"\u2014",null!=o.avg_active_minutes&&(0,_.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,_.jsx)("div",{className:"da-health-label",children:"Avg Active"}),(0,_.jsx)("div",{className:"da-health-sub",children:"Per rider, this batch"})]})]})]}),(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsx)("div",{className:"da-section-label",children:"Top Recommendation"}),v?(0,_.jsxs)("div",{className:"da-rec-banner is-action",children:[(0,_.jsx)("div",{className:"da-rec-banner-icon",children:(0,_.jsx)(S.DX0,{})}),(0,_.jsxs)("div",{className:"da-rec-banner-body",children:[(0,_.jsxs)("div",{className:"da-rec-head",children:[(0,_.jsx)("div",{className:"da-rec-action",children:(0,_.jsx)("span",{children:(p.action||"recommendation").replaceAll("_"," ")})}),null!=p.fleet_improvement_minutes&&(0,_.jsxs)("span",{className:"da-rec-improve",style:p.fleet_improvement_minutes>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:[p.fleet_improvement_minutes>0?"\u2191":"\u2022"," Fleet improves by ",p.fleet_improvement_minutes," min"]})]}),(0,_.jsxs)("div",{className:"da-rec-line",children:[(0,_.jsx)("strong",{children:j(p.idle_rider_id,p.idle_rider_name)}),p.primary_kitchen&&(0,_.jsxs)(_.Fragment,{children:[" \xb7 primary kitchen ",(0,_.jsx)("strong",{children:p.primary_kitchen})]}),p.second_kitchen&&(0,_.jsxs)(_.Fragment,{children:[" \u2192 also serve ",(0,_.jsx)("strong",{children:p.second_kitchen})," after ",p.second_kitchen_dispatch_after||"\u2014"]})]}),p.description&&(0,_.jsx)("div",{className:"da-rec-desc",children:p.description}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,_.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment}),(null===(s=p.activate_when)||void 0===s||null===(a=s.rules)||void 0===a?void 0:a.length)>0&&(0,_.jsxs)("div",{className:"da-rec-rules",children:[(0,_.jsxs)("div",{className:"da-rec-rules-head",children:["Activate when (",p.activate_when.condition||"AND","):"]}),p.activate_when.rules.map(((e,s)=>(0,_.jsxs)("div",{className:"da-rec-rule",children:[(0,_.jsxs)("code",{children:[e.field," ",e.operator," ",e.value]}),e.reason&&(0,_.jsxs)("span",{className:"da-rec-rule-why",children:[" \u2014 ",e.reason]})]},s)))]})]})]}):(0,_.jsxs)("div",{className:"da-rec-banner is-".concat(F),children:[(0,_.jsx)("div",{className:"da-rec-banner-icon",children:"warn"===F?(0,_.jsx)(S.Wux,{}):"success"===F?(0,_.jsx)(S.mU9,{}):(0,_.jsx)(S.DX0,{})}),(0,_.jsxs)("div",{className:"da-rec-banner-body",children:[(0,_.jsx)("div",{className:"da-rec-action",children:(0,_.jsx)("span",{children:"warn"===F?"Fleet imbalance detected \u2014 no feasible substitution":"success"===F?"Fleet ran balanced \u2014 no reassignment needed":"No action recommended"})}),(null===p||void 0===p?void 0:p.reason)&&(0,_.jsx)("div",{className:"da-rec-desc",children:p.reason}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,_.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment})]})]})]}),M.length>0&&(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsxs)("div",{className:"da-section-label",children:["Rider Timelines ",(0,_.jsxs)("span",{className:"da-section-count",children:["(",M.length,")"]}),(0,_.jsx)("span",{className:"da-section-hint",children:"Sorted by latest finish \u2014 bottleneck riders first"})]}),(0,_.jsxs)("div",{className:"da-gantt-axis",children:[(0,_.jsx)("span",{children:o.fleet_start||"\u2014"}),(0,_.jsx)("span",{className:"da-gantt-axis-mid",children:null!=o.total_duration_minutes?"".concat(o.total_duration_minutes," min batch"):"Batch window"}),(0,_.jsx)("span",{children:o.fleet_done||"\u2014"})]}),(0,_.jsx)("div",{className:"da-timeline-list",children:M.map((e=>{var s,a,t;const i="active"===String(e.status||"").toLowerCase(),r=null!==(s=e.completed_orders)&&void 0!==s?s:e.order_count,n=null!==(a=e.pending_orders)&&void 0!==a?a:0,l=null!=r&&e.order_count>0?Math.max(0,Math.min(100,r/e.order_count*100)):0,c=null!=e.idle_minutes&&e.idle_minutes>30,d=null!=e.kitchen_confidence&&e.kitchen_confidence<.7;return(0,_.jsxs)("div",{className:"da-timeline-card",children:[(0,_.jsxs)("div",{className:"da-timeline-top",children:[(0,_.jsxs)("div",{className:"da-timeline-name",children:[(0,_.jsx)(S.aVM,{style:{color:e._riderColor}}),(0,_.jsx)("span",{title:e.name&&e.name!==e.displayName?"API name: ".concat(e.name):void 0,children:e.displayName}),(0,_.jsxs)("span",{className:"da-timeline-id",children:["#",e.userid]})]}),(0,_.jsx)("span",{className:"da-pill ".concat(i?"is-active":"is-idle"),children:e.status})]}),(0,_.jsxs)("div",{className:"da-gantt-row",children:[(0,_.jsxs)("div",{className:"da-gantt-track",title:"".concat(e.started_at," \u2192 ").concat(e.finished_at),children:[(0,_.jsxs)("div",{className:"da-gantt-fill",style:{left:"".concat(e._startPct,"%"),width:"".concat(Math.max(2,e._activePct),"%"),background:e._riderColor},children:[(0,_.jsx)("span",{className:"da-gantt-fill-start",children:e.started_at}),(0,_.jsx)("span",{className:"da-gantt-fill-end",children:e.finished_at})]}),e._endPct<99&&(0,_.jsx)("div",{className:"da-gantt-idle",style:{left:"".concat(e._endPct,"%"),width:"".concat(100-e._endPct,"%")},title:"Idle ".concat(e.idle_minutes," min after finishing")})]}),(0,_.jsx)("span",{className:"da-gantt-util",style:{background:"".concat(e._riderColor,"22"),color:e._riderColor},title:"Per-rider utilisation: ".concat(null!=e._riderUtilPct?e._riderUtilPct.toFixed(0):"\u2014","%"),children:null!=e._riderUtilPct?"".concat(e._riderUtilPct.toFixed(0),"%"):"\u2014"})]}),(0,_.jsxs)("div",{className:"da-timeline-mid",children:[e.kitchen?(0,_.jsxs)("span",{className:"da-chip",title:null!=e.kitchen_confidence?"Kitchen confidence: ".concat((100*e.kitchen_confidence).toFixed(0),"%"):void 0,children:[(0,_.jsx)(S.NtI,{})," ",e.kitchen,null!=e.kitchen_confidence&&(0,_.jsx)("span",{className:"da-conf-dot ".concat(d?"is-low":"is-ok"),"aria-label":"Confidence ".concat((100*e.kitchen_confidence).toFixed(0),"%")})]}):(0,_.jsxs)("span",{className:"da-chip",style:{background:"#f8fafc",color:"#64748b",borderColor:"#e2e8f0",borderStyle:"dashed"},title:"Solver did not identify a primary kitchen for this rider",children:[(0,_.jsx)(S.NtI,{})," Unassigned"]}),(0,_.jsxs)("span",{className:"da-chip da-chip-orders",title:"Completed ".concat(r," of ").concat(e.order_count),children:[(0,_.jsx)(S.gsJ,{}),(0,_.jsxs)("span",{className:"da-orders-label",children:[r,"/",e.order_count]}),(0,_.jsx)("span",{className:"da-orders-bar",children:(0,_.jsx)("span",{className:"da-orders-bar-fill",style:{width:"".concat(l,"%")}})}),n>0&&(0,_.jsxs)("span",{className:"da-orders-pending",children:[n," pending"]})]}),null!=e.pace_orders_per_hour&&(0,_.jsxs)("span",{className:"da-chip",title:"Delivery pace this batch",children:[(0,_.jsx)(S.BJM,{})," ",parseFloat(e.pace_orders_per_hour).toFixed(1)," / hr"]}),null!=e.active_minutes&&(0,_.jsxs)("span",{className:"da-chip",title:"Time actively delivering",children:[(0,_.jsx)(S.pWE,{})," ",parseFloat(e.active_minutes).toFixed(0)," min active"]}),(0,_.jsxs)("span",{className:"da-chip",style:c?{background:"#fef3c7",color:"#92400e",borderColor:"#fde68a"}:void 0,title:"Idle time after this rider finished \u2014 fleet kept running",children:[(0,_.jsx)(S.VP9,{})," ",null!==(t=e.idle_minutes)&&void 0!==t?t:0," min idle"]}),null!=e.free_window_minutes&&(0,_.jsxs)("span",{className:"da-chip",style:e.free_window_minutes>=30?{background:"#ecfdf5",color:"#065f46",borderColor:"#a7f3d0"}:e.free_window_minutes>0?{background:"#fefce8",color:"#854d0e",borderColor:"#fde68a"}:{background:"#fef2f2",color:"#991b1b",borderColor:"#fecaca"},title:"Free window before the next batch \u2014 capacity available for a follow-up run",children:[(0,_.jsx)(S.pWE,{})," ",parseFloat(e.free_window_minutes).toFixed(0)," min free"]})]})]},e.userid)}))})]}),m.length>0&&(0,_.jsxs)("div",{className:"da-section",children:[(0,_.jsxs)("div",{className:"da-section-label",children:["Substitution Opportunities ",(0,_.jsxs)("span",{className:"da-section-count",children:["(",m.length,")"]})]}),(0,_.jsx)("div",{className:"da-sub-list",children:m.map(((e,s)=>{var a;const t=e.idle_rider||{},i=e.most_relieved_rider||{},r=null!==(a=e.fleet_improvement_minutes)&&void 0!==a?a:0;return(0,_.jsxs)("div",{className:"da-sub-card",children:[(0,_.jsxs)("div",{className:"da-sub-head",children:[(0,_.jsxs)("div",{className:"da-sub-title",children:[(0,_.jsx)("strong",{children:j(t.userid,t.name)})," ","covers ",(0,_.jsx)("strong",{children:e.target_kitchen})]}),(0,_.jsxs)("span",{className:"da-sub-improve",style:r>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:["Fleet ",r>0?"\u2191":"\u2022"," ",r," min"]})]}),(0,_.jsxs)("div",{className:"da-sub-meta",children:[(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.xI$,{})," ",e.travel_to_kitchen_km," km"]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.pWE,{})," ",e.travel_to_kitchen_minutes," min travel"]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.VP9,{})," arrives ",e.arrive_at_kitchen]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.gsJ,{})," ",e.total_orders_transferred," orders"]}),(0,_.jsxs)("span",{className:"da-chip",children:[(0,_.jsx)(S.xI$,{})," +",e.extra_km_for_idle_rider," km for idle rider"]})]}),(i.name||null!=i.userid)&&(0,_.jsxs)("div",{className:"da-sub-relieved",children:[(0,_.jsx)(S.imn,{}),"Most relieved: ",(0,_.jsx)("strong",{children:j(i.userid,i.name)})," ","(",i.original_finish," \u2192 ",i.new_finish,", saves"," ",i.time_saved_minutes," min)"]}),Array.isArray(e.orders_to_transfer)&&e.orders_to_transfer.length>0&&(0,_.jsxs)("div",{className:"da-sub-transfers",children:[(0,_.jsx)("div",{className:"da-sub-transfers-head",children:"Orders transferred"}),e.orders_to_transfer.map((e=>{var s;const a=null!==(s=e.improvement_minutes)&&void 0!==s?s:0;return(0,_.jsxs)("div",{className:"da-transfer-row",children:[(0,_.jsxs)("span",{className:"da-transfer-id",children:["#",e.deliveryid]}),(0,_.jsxs)("span",{className:"da-transfer-from",children:["from ",j(e.from_rider_id||e.from_userid,e.from_rider_name)]}),(0,_.jsxs)("span",{className:"da-transfer-time",children:[e.original_delivery_time," \u2192 ",e.estimated_delivery_time]}),(0,_.jsxs)("span",{className:"da-transfer-imp",style:a>0?{background:"#dcfce7",color:"#166534"}:a<0?{background:"#fee2e2",color:"#991b1b"}:{background:"#f1f5f9",color:"#475569"},children:[a>0?"+":"",a," min"]})]},e.deliveryid)}))]})]},s)}))})]})]})})()]}),H&&(0,_.jsx)("div",{className:"da-pos-modal-backdrop",role:"dialog","aria-modal":"true","aria-label":"Last known position of ".concat(H.name),onClick:e=>{e.target===e.currentTarget&&Y(null)},children:(0,_.jsxs)("div",{className:"da-pos-modal-card",children:[(0,_.jsxs)("div",{className:"da-pos-modal-head",children:[(0,_.jsxs)("div",{className:"da-pos-modal-title-wrap",children:[(0,_.jsx)("div",{className:"da-pos-modal-avatar",style:{background:"".concat(H.color||"#662582","22"),color:H.color||"#662582"},children:(0,_.jsx)(S.aVM,{})}),(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"da-pos-modal-title",children:H.name}),(0,_.jsxs)("div",{className:"da-pos-modal-sub",children:["#",H.userid,H.kitchen&&(0,_.jsxs)(_.Fragment,{children:[" \xb7 ",H.kitchen]}),H.finished_at&&(0,_.jsxs)(_.Fragment,{children:[" \xb7 finished ",H.finished_at]})]})]})]}),(0,_.jsxs)("div",{className:"da-pos-modal-actions",children:[(0,_.jsx)("span",{className:"da-pill ".concat("active"===String(H.status||"").toLowerCase()?"is-active":"is-idle"),children:H.status||"\u2014"}),(0,_.jsx)("button",{type:"button",className:"da-pos-modal-close","aria-label":"Close",onClick:()=>Y(null),children:(0,_.jsx)(S.m6K,{})})]})]}),(0,_.jsx)("div",{className:"da-pos-modal-map",children:(0,_.jsxs)(d.W,{center:[H.lat,H.lon],zoom:13,scrollWheelZoom:!0,style:{width:"100%",height:"100%"},whenReady:e=>{const s=e.target;requestAnimationFrame((()=>s.invalidateSize())),setTimeout((()=>s.invalidateSize()),260)},children:[(0,_.jsx)(o.e,{attribution:'\xa9 OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,_.jsx)(l.p,{position:[H.lat,H.lon],children:(0,_.jsxs)(m.z,{children:[(0,_.jsx)("strong",{children:H.name}),(0,_.jsx)("br",{}),H.lat.toFixed(6),", ",H.lon.toFixed(6)]})})]},"".concat(H.userid,"-").concat(H.lat,"-").concat(H.lon))}),(0,_.jsxs)("div",{className:"da-pos-modal-foot",children:[(0,_.jsxs)("div",{className:"da-pos-modal-coord",children:[(0,_.jsx)(S.gwi,{}),(0,_.jsxs)("span",{children:[(0,_.jsx)("strong",{children:"Lat:"})," ",H.lat.toFixed(6),(0,_.jsx)("span",{className:"da-pos-modal-sep",children:"\xb7"}),(0,_.jsx)("strong",{children:"Lon:"})," ",H.lon.toFixed(6)]})]}),(0,_.jsx)("button",{type:"button",className:"da-pos-modal-copy",onClick:()=>{var e,s;const a="".concat(H.lat.toFixed(6),", ").concat(H.lon.toFixed(6));null!==(e=navigator)&&void 0!==e&&null!==(s=e.clipboard)&&void 0!==s&&s.writeText&&navigator.clipboard.writeText(a)},title:"Copy coordinates",children:"Copy"})]})]})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/436.b7322d7b.chunk.js b/build/static/js/436.b7322d7b.chunk.js new file mode 100644 index 0000000..1b259de --- /dev/null +++ b/build/static/js/436.b7322d7b.chunk.js @@ -0,0 +1 @@ +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[436],{2046:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),c=n(3484),s=n(89548),u=n(82053),l=n(15866),d=n(39766),p=n(59254),v=n(45558),m=n(1614);function f(e){return(0,m.Ay)("MuiInputAdornment",e)}const h=(0,v.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g,A=n(18463),b=n(44414);const y=["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,s.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(h.positionStart,"&:not(.").concat(h.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),w=i.forwardRef((function(e,t){const n=(0,A.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:v,component:m="div",disablePointerEvents:h=!1,disableTypography:w=!1,position:C,variant:M}=n,k=(0,r.A)(n,y),L=(0,d.A)()||{};let S=M;M&&L.variant,L&&!S&&(S=L.variant);const R=(0,a.A)({},n,{hiddenLabel:L.hiddenLabel,size:L.size,disablePointerEvents:h,position:C,variant:S}),z=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:a,size:i,variant:o}=e,u={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,s.A)(a)),o,r&&"hiddenLabel",i&&"size".concat((0,s.A)(i))]};return(0,c.A)(u,f,t)})(R);return(0,b.jsx)(l.A.Provider,{value:null,children:(0,b.jsx)(x,(0,a.A)({as:m,ownerState:R,className:(0,o.A)(z.root,v),ref:t},k,{children:"string"!==typeof p||w?(0,b.jsxs)(i.Fragment,{children:["start"===C?g||(g=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,b.jsx)(u.A,{color:"text.secondary",children:p})}))})}))},4729:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),a=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};var o=n(61187),c=function(e,t){return a.createElement(o.A,(0,r.A)({},e,{ref:t,icon:i}))};const s=a.forwardRef(c)},8203:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),a=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm72-112c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48zm400-188h-59.3c-2.6 0-5 1.2-6.5 3.3L763.7 538.1l-49.9-68.8a7.92 7.92 0 00-6.5-3.3H648c-6.5 0-10.3 7.4-6.5 12.7l109.2 150.7a16.1 16.1 0 0026 0l165.8-228.7c3.8-5.3 0-12.7-6.5-12.7zm-44 306h-64.2c-5.5 0-10.6 2.9-13.6 7.5a352.2 352.2 0 01-49.8 62.2A355.92 355.92 0 01651.1 840a355 355 0 01-138.7 27.9c-48.1 0-94.8-9.4-138.7-27.9a355.92 355.92 0 01-113.3-76.3A353.06 353.06 0 01184 650.5c-18.6-43.8-28-90.5-28-138.5s9.4-94.7 28-138.5c17.9-42.4 43.6-80.5 76.4-113.2 32.8-32.7 70.9-58.4 113.3-76.3a355 355 0 01138.7-27.9c48.1 0 94.8 9.4 138.7 27.9 42.4 17.9 80.5 43.6 113.3 76.3 19 19 35.6 39.8 49.8 62.2 2.9 4.7 8.1 7.5 13.6 7.5H892c6 0 9.8-6.3 7.2-11.6C828.8 178.5 684.7 82 517.7 80 278.9 77.2 80.5 272.5 80 511.2 79.5 750.1 273.3 944 512.4 944c169.2 0 315.6-97 386.7-238.4A8 8 0 00892 694z"}}]},name:"issues-close",theme:"outlined"};var o=n(61187),c=function(e,t){return a.createElement(o.A,(0,r.A)({},e,{ref:t,icon:i}))};const s=a.forwardRef(c)},12678:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),a=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var o=n(61187),c=function(e,t){return a.createElement(o.A,(0,r.A)({},e,{ref:t,icon:i}))};const s=a.forwardRef(c)},21636:(e,t,n)=>{"use strict";n.d(t,{h2r:()=>a});var r=n(99230);function a(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"20",height:"16",x:"2",y:"4",rx:"2"}},{tag:"path",attr:{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}}]})(e)}},23266:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),c=n(3484),s=n(99269),u=n(59254),l=n(19608),d=n(18463),p=n(13372),v=n(24184),m=n(79044),f=n(31506),h=n(40777),g=n(92455),A=n(88543),b=n(45558),y=n(1614);function x(e){return(0,y.Ay)("MuiMenuItem",e)}const w=(0,b.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=n(44414);const M=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],k=(0,u.Ay)(v.A,{shouldForwardProp:e=>(0,l.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.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"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.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(w.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,s.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(w.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,s.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(w.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,s.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,s.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(w.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(h.A.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(h.A.inset)]:{marginLeft:52},["& .".concat(A.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(A.A.inset)]:{paddingLeft:36},["& .".concat(g.A.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,a.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(g.A.root," svg")]:{fontSize:"1.25rem"}}))})),L=i.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiMenuItem"}),{autoFocus:s=!1,component:u="li",dense:l=!1,divider:v=!1,disableGutters:h=!1,focusVisibleClassName:g,role:A="menuitem",tabIndex:b,className:y}=n,w=(0,r.A)(n,M),L=i.useContext(p.A),S=i.useMemo((()=>({dense:l||L.dense||!1,disableGutters:h})),[L.dense,l,h]),R=i.useRef(null);(0,m.A)((()=>{s&&R.current&&R.current.focus()}),[s]);const z=(0,a.A)({},n,{dense:S.dense,divider:v,disableGutters:h}),E=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,u={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,c.A)(u,x,s);return(0,a.A)({},s,l)})(n),O=(0,f.A)(R,t);let I;return n.disabled||(I=void 0!==b?b:-1),(0,C.jsx)(p.A.Provider,{value:S,children:(0,C.jsx)(k,(0,a.A)({ref:O,role:A,tabIndex:I,component:u,focusVisibleClassName:(0,o.A)(E.focusVisible,g),className:(0,o.A)(E.root,y)},w,{ownerState:z,classes:E}))})}))},25713:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),c=n(3484),s=n(59254),u=n(18463),l=n(45558),d=n(1614);function p(e){return(0,d.Ay)("MuiCardActions",e)}(0,l.A)("MuiCardActions",["root","spacing"]);var v=n(44414);const m=["disableSpacing","className"],f=(0,s.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),h=i.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:s}=n,l=(0,r.A)(n,m),d=(0,a.A)({},n,{disableSpacing:i}),h=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,c.A)(r,p,t)})(d);return(0,v.jsx)(f,(0,a.A)({className:(0,o.A)(h.root,s),ownerState:d,ref:t},l))}))},28217:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var a=r(n(79526)),i=n(44414);t.A=(0,a.default)((0,i.jsx)("path",{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-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn")},36150:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});var r=n(69347),a=n(1729);function i(e,t){return(0,a.t)(e,r.$,t)}},39174:(e,t,n)=>{"use strict";n.d(t,{PY8:()=>a});var r=n(99230);function a(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2a5 5 0 1 0 5 5 5 5 0 0 0-5-5zm0 8a3 3 0 1 1 3-3 3 3 0 0 1-3 3zm9 11v-1a7 7 0 0 0-7-7h-4a7 7 0 0 0-7 7v1h2v-1a5 5 0 0 1 5-5h4a5 5 0 0 1 5 5v1z"}}]})(e)}},52097:(e,t,n)=>{"use strict";n.d(t,{d7:()=>o});var r=n(9950);function a(e,t,n,a){var i=this,o=(0,r.useRef)(null),c=(0,r.useRef)(0),s=(0,r.useRef)(0),u=(0,r.useRef)(null),l=(0,r.useRef)([]),d=(0,r.useRef)(),p=(0,r.useRef)(),v=(0,r.useRef)(e),m=(0,r.useRef)(!0);v.current=e;var f="undefined"!=typeof window,h=!t&&0!==t&&f;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,A=!("trailing"in n)||!!n.trailing,b="maxWait"in n,y="debounceOnServer"in n&&!!n.debounceOnServer,x=b?Math.max(+n.maxWait||0,t):null;(0,r.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var w=(0,r.useMemo)((function(){var e=function(e){var t=l.current,n=d.current;return l.current=d.current=null,c.current=e,s.current=s.current||e,p.current=v.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(u.current),u.current=h?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!m.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||b&&e-c.current>=x},w=function(t){return u.current=null,A&&l.current?e(t):(l.current=d.current=null,p.current)},C=function e(){var a=Date.now();if(g&&s.current===c.current&&M(),r(a))return w(a);if(m.current){var i=t-(a-o.current),u=b?Math.min(i,x-(a-c.current)):i;n(e,u)}},M=function(){a&&a({})},k=function(){if(f||y){var a=Date.now(),s=r(a);if(l.current=[].slice.call(arguments),d.current=i,o.current=a,s){if(!u.current&&m.current)return c.current=o.current,n(C,t),g?e(o.current):p.current;if(b)return n(C,t),e(o.current)}return u.current||n(C,t),p.current}};return k.cancel=function(){u.current&&(h?cancelAnimationFrame(u.current):clearTimeout(u.current)),c.current=0,l.current=o.current=d.current=u.current=null},k.isPending=function(){return!!u.current},k.flush=function(){return u.current?w(Date.now()):p.current},k}),[g,b,t,x,A,h,f,y,a]);return w}function i(e,t){return e===t}function o(e,t,n){var o=n&&n.equalityFn||i,c=(0,r.useRef)(e),s=(0,r.useState)({})[1],u=a((0,r.useCallback)((function(e){c.current=e,s({})}),[s]),t,n,s),l=(0,r.useRef)(e);return o(l.current,e)||(u(e),l.current=e),[c.current,u]}},55471:function(e){e.exports=(()=>{return e={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach(((r,a)=>{const i=r[0],o=r[1];n.push({text:e.slice(i,o),highlight:!0}),a===t.length-1?o{"use strict";n.d(t,{JXP:()=>i,wnV:()=>a});var r=n(99230);function a(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"}}]})(e)}function i(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"}}]})(e)}},97125:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(23235),a=n(44414);const i=(0,r.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/7537.36826a6b.chunk.js b/build/static/js/4486.23cac129.chunk.js similarity index 66% rename from build/static/js/7537.36826a6b.chunk.js rename to build/static/js/4486.23cac129.chunk.js index 6f23afb..117b314 100644 --- a/build/static/js/7537.36826a6b.chunk.js +++ b/build/static/js/4486.23cac129.chunk.js @@ -1 +1 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7537],{4159:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",s="second",i="minute",a="hour",o="day",c="week",u="month",l="quarter",h="year",f="date",d="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},g={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),s=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(s,2,"0")},m:function t(e,r){if(e.date()1)return t(a[0])}else{var o=e.name;p[o]=e,s=o}return!n&&s&&(S=s),s||!n&&S},w=function(t,e){if(D(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new A(r)},b=g;b.l=k,b.i=D,b.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function v(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[M]=!0}var y=v.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match($);if(n){var s=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return b},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return w(t){"use strict";r.d(e,{A:()=>Y});var n=r(57528),s=r(98587),i=r(58168),a=r(9950),o=r(72004),c=r(3484),u=r(88283),l=r(89548),h=r(18463),f=r(59254),d=r(45558),$=r(1614);function m(t){return(0,$.Ay)("MuiCircularProgress",t)}(0,d.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var v,y,g,S,p=r(44414);const M=["className","color","disableShrink","size","style","thickness","value","variant"];let D,k,w,b;const A=44,x=(0,u.i7)(D||(D=v||(v=(0,n.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),O=(0,u.i7)(k||(k=y||(y=(0,n.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"])))),_=(0,f.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["color".concat((0,l.A)(r.color))]]}})((t=>{let{ownerState:e,theme:r}=t;return(0,i.A)({display:"inline-block"},"determinate"===e.variant&&{transition:r.transitions.create("transform")},"inherit"!==e.color&&{color:(r.vars||r).palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&(0,u.AH)(w||(w=g||(g=(0,n.A)(["\n animation: "," 1.4s linear infinite;\n "]))),x)})),C=(0,f.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),H=(0,f.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e["circle".concat((0,l.A)(r.variant))],r.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:r}=t;return(0,i.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:r.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)(b||(b=S||(S=(0,n.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),O)})),Y=a.forwardRef((function(t,e){const r=(0,h.b)({props:t,name:"MuiCircularProgress"}),{className:n,color:a="primary",disableShrink:u=!1,size:f=40,style:d,thickness:$=3.6,value:v=0,variant:y="indeterminate"}=r,g=(0,s.A)(r,M),S=(0,i.A)({},r,{color:a,disableShrink:u,size:f,thickness:$,value:v,variant:y}),D=(t=>{const{classes:e,variant:r,color:n,disableShrink:s}=t,i={root:["root",r,"color".concat((0,l.A)(n))],svg:["svg"],circle:["circle","circle".concat((0,l.A)(r)),s&&"circleDisableShrink"]};return(0,c.A)(i,m,e)})(S),k={},w={},b={};if("determinate"===y){const t=2*Math.PI*((A-$)/2);k.strokeDasharray=t.toFixed(3),b["aria-valuenow"]=Math.round(v),k.strokeDashoffset="".concat(((100-v)/100*t).toFixed(3),"px"),w.transform="rotate(-90deg)"}return(0,p.jsx)(_,(0,i.A)({className:(0,o.A)(D.root,n),style:(0,i.A)({width:f,height:f},w,d),ownerState:S,ref:e,role:"progressbar"},b,g,{children:(0,p.jsx)(C,{className:D.svg,ownerState:S,viewBox:"".concat(22," ").concat(22," ").concat(A," ").concat(A),children:(0,p.jsx)(H,{className:D.circle,style:k,ownerState:S,cx:A,cy:A,r:(A-$)/2,fill:"none",strokeWidth:$})})}))}))}}]); \ No newline at end of file +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4486],{4159:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",s="second",i="minute",a="hour",o="day",c="week",u="month",l="quarter",h="year",f="date",d="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},g={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),s=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(s,2,"0")},m:function t(e,r){if(e.date()1)return t(a[0])}else{var o=e.name;p[o]=e,s=o}return!n&&s&&(S=s),s||!n&&S},w=function(t,e){if(D(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new A(r)},b=g;b.l=k,b.i=D,b.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function v(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[M]=!0}var y=v.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match($);if(n){var s=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return b},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return w(t){"use strict";r.d(e,{I:()=>i});var n=r(69347),s=r(1729);function i(t,e){return(0,s.t)(t,n.$,e)}},46639:(t,e,r)=>{"use strict";r.d(e,{A:()=>Y});var n=r(57528),s=r(98587),i=r(58168),a=r(9950),o=r(72004),c=r(3484),u=r(88283),l=r(89548),h=r(18463),f=r(59254),d=r(45558),$=r(1614);function m(t){return(0,$.Ay)("MuiCircularProgress",t)}(0,d.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var v,y,g,S,p=r(44414);const M=["className","color","disableShrink","size","style","thickness","value","variant"];let D,k,w,b;const A=44,x=(0,u.i7)(D||(D=v||(v=(0,n.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),O=(0,u.i7)(k||(k=y||(y=(0,n.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"])))),_=(0,f.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["color".concat((0,l.A)(r.color))]]}})((t=>{let{ownerState:e,theme:r}=t;return(0,i.A)({display:"inline-block"},"determinate"===e.variant&&{transition:r.transitions.create("transform")},"inherit"!==e.color&&{color:(r.vars||r).palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&(0,u.AH)(w||(w=g||(g=(0,n.A)(["\n animation: "," 1.4s linear infinite;\n "]))),x)})),C=(0,f.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),H=(0,f.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e["circle".concat((0,l.A)(r.variant))],r.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:r}=t;return(0,i.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:r.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)(b||(b=S||(S=(0,n.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),O)})),Y=a.forwardRef((function(t,e){const r=(0,h.b)({props:t,name:"MuiCircularProgress"}),{className:n,color:a="primary",disableShrink:u=!1,size:f=40,style:d,thickness:$=3.6,value:v=0,variant:y="indeterminate"}=r,g=(0,s.A)(r,M),S=(0,i.A)({},r,{color:a,disableShrink:u,size:f,thickness:$,value:v,variant:y}),D=(t=>{const{classes:e,variant:r,color:n,disableShrink:s}=t,i={root:["root",r,"color".concat((0,l.A)(n))],svg:["svg"],circle:["circle","circle".concat((0,l.A)(r)),s&&"circleDisableShrink"]};return(0,c.A)(i,m,e)})(S),k={},w={},b={};if("determinate"===y){const t=2*Math.PI*((A-$)/2);k.strokeDasharray=t.toFixed(3),b["aria-valuenow"]=Math.round(v),k.strokeDashoffset="".concat(((100-v)/100*t).toFixed(3),"px"),w.transform="rotate(-90deg)"}return(0,p.jsx)(_,(0,i.A)({className:(0,o.A)(D.root,n),style:(0,i.A)({width:f,height:f},w,d),ownerState:S,ref:e,role:"progressbar"},b,g,{children:(0,p.jsx)(C,{className:D.svg,ownerState:S,viewBox:"".concat(22," ").concat(22," ").concat(A," ").concat(A),children:(0,p.jsx)(H,{className:D.circle,style:k,ownerState:S,cx:A,cy:A,r:(A-$)/2,fill:"none",strokeWidth:$})})}))}))}}]); \ No newline at end of file diff --git a/build/static/js/4542.c6c7874f.chunk.js b/build/static/js/4542.c6c7874f.chunk.js new file mode 100644 index 0000000..9ff32d4 --- /dev/null +++ b/build/static/js/4542.c6c7874f.chunk.js @@ -0,0 +1 @@ +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4542],{2046:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});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 p(e){return(0,v.Ay)("MuiInputAdornment",e)}const m=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g,A=n(18463),b=n(44414);const x=["children","className","component","disablePointerEvents","disableTypography","position","variant"],w=(0,d.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,c.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,i.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(m.positionStart,"&:not(.").concat(m.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),k=a.forwardRef((function(e,t){const n=(0,A.b)({props:e,name:"MuiInputAdornment"}),{children:d,className:f,component:v="div",disablePointerEvents:m=!1,disableTypography:k=!1,position:y,variant:S}=n,P=(0,r.A)(n,x),R=(0,h.A)()||{};let M=S;S&&R.variant,R&&!M&&(M=R.variant);const C=(0,i.A)({},n,{hiddenLabel:R.hiddenLabel,size:R.size,disablePointerEvents:m,position:y,variant:M}),N=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e,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,p,t)})(C);return(0,b.jsx)(l.A.Provider,{value:null,children:(0,b.jsx)(w,(0,i.A)({as:v,ownerState:C,className:(0,o.A)(N.root,f),ref:t},P,{children:"string"!==typeof d||k?(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})}))})}))},28217:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(79526)),a=n(44414);t.A=(0,i.default)((0,a.jsx)("path",{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-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn")},36150:(e,t,n)=>{"use strict";n.d(t,{I:()=>a});var r=n(69347),i=n(1729);function a(e,t){return(0,i.t)(e,r.$,t)}},46639:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});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 p(e){return(0,v.Ay)("MuiCircularProgress",e)}(0,f.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m,g,A,b,x=n(44414);const w=["className","color","disableShrink","size","style","thickness","value","variant"];let k,y,S,P;const R=44,M=(0,u.i7)(k||(k=m||(m=(0,r.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),C=(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"])))),N=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,l.A)(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,a.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)(S||(S=A||(A=(0,r.A)(["\n animation: "," 1.4s linear infinite;\n "]))),M)})),E=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),F=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,l.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,a.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)(P||(P=b||(b=(0,r.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),C)})),j=o.forwardRef((function(e,t){const n=(0,h.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:u=!1,size:d=40,style:f,thickness:v=3.6,value:m=0,variant:g="indeterminate"}=n,A=(0,i.A)(n,w),b=(0,a.A)({},n,{color:o,disableShrink:u,size:d,thickness:v,value:m,variant:g}),k=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,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,p,t)})(b),y={},S={},P={};if("determinate"===g){const e=2*Math.PI*((R-v)/2);y.strokeDasharray=e.toFixed(3),P["aria-valuenow"]=Math.round(m),y.strokeDashoffset="".concat(((100-m)/100*e).toFixed(3),"px"),S.transform="rotate(-90deg)"}return(0,x.jsx)(N,(0,a.A)({className:(0,s.A)(k.root,r),style:(0,a.A)({width:d,height:d},S,f),ownerState:b,ref:t,role:"progressbar"},P,A,{children:(0,x.jsx)(E,{className:k.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(R," ").concat(R),children:(0,x.jsx)(F,{className:k.circle,style:y,ownerState:b,cx:R,cy:R,r:(R-v)/2,fill:"none",strokeWidth:v})})}))}))},52097:(e,t,n)=>{"use strict";n.d(t,{d7:()=>o});var r=n(9950);function i(e,t,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)(e),v=(0,r.useRef)(!0);f.current=e;var p="undefined"!=typeof window,m=!t&&0!==t&&p;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,A=!("trailing"in n)||!!n.trailing,b="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,w=b?Math.max(+n.maxWait||0,t):null;(0,r.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var k=(0,r.useMemo)((function(){var e=function(e){var t=l.current,n=h.current;return l.current=h.current=null,s.current=e,c.current=c.current||e,d.current=f.current.apply(n,t)},n=function(e,t){m&&cancelAnimationFrame(u.current),u.current=m?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!v.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||b&&e-s.current>=w},k=function(t){return u.current=null,A&&l.current?e(t):(l.current=h.current=null,d.current)},y=function e(){var i=Date.now();if(g&&c.current===s.current&&S(),r(i))return k(i);if(v.current){var a=t-(i-o.current),u=b?Math.min(a,w-(i-s.current)):a;n(e,u)}},S=function(){i&&i({})},P=function(){if(p||x){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,t),g?e(o.current):d.current;if(b)return n(y,t),e(o.current)}return u.current||n(y,t),d.current}};return P.cancel=function(){u.current&&(m?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?k(Date.now()):d.current},P}),[g,b,t,w,A,m,p,x,i]);return k}function a(e,t){return e===t}function o(e,t,n){var o=n&&n.equalityFn||a,s=(0,r.useRef)(e),c=(0,r.useState)({})[1],u=i((0,r.useCallback)((function(e){s.current=e,c({})}),[c]),t,n,c),l=(0,r.useRef)(e);return o(l.current,e)||(u(e),l.current=e),[s.current,u]}},55471:function(e){e.exports=(()=>{return e={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach(((r,i)=>{const a=r[0],o=r[1];n.push({text:e.slice(a,o),highlight:!0}),i===t.length-1?o{"use strict";n.d(t,{q:()=>c});var r=n(89379),i=n(69347),a=n(45247),o=class extends i.${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,r.A)((0,r.A)({},e),{},{behavior:(0,a.PL)()}),t)}getOptimisticResult(e){return e.behavior=(0,a.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch((0,r.A)((0,r.A)({},e),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(e){return this.fetch((0,r.A)((0,r.A)({},e),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(e,t){var n,i;const{state:o}=e,s=super.createResult(e,t),{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)(t,o.data),hasPreviousPage:(0,a.RQ)(t,o.data),isFetchingNextPage:l,isFetchingPreviousPage:h,isRefetching:u&&!l&&!h})}},s=n(1729);function c(e,t){return(0,s.t)(e,o,t)}},82917:(e,t,n)=>{"use strict";n.d(t,{A:()=>F});var r=n(57528),i=n(98587),a=n(58168),o=n(9950),s=n(72004),c=n(88283),u=n(3484);function l(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function h(e){return parseFloat(e)}var d=n(97497),f=n(59254),v=n(18463),p=n(45558),m=n(1614);function g(e){return(0,m.Ay)("MuiSkeleton",e)}(0,p.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var A,b,x,w,k=n(44414);const y=["animation","className","component","height","style","variant","width"];let S,P,R,M;const C=(0,c.i7)(S||(S=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"])))),N=(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"])))),E=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((e=>{let{theme:t,ownerState:n}=e;const r=l(t.shape.borderRadius)||"px",i=h(t.shape.borderRadius);return(0,a.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,d.X4)(t.palette.text.primary,"light"===t.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:(t.vars||t).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})}),(e=>{let{ownerState:t}=e;return"pulse"===t.animation&&(0,c.AH)(R||(R=x||(x=(0,r.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),C)}),(e=>{let{ownerState:t,theme:n}=e;return"wave"===t.animation&&(0,c.AH)(M||(M=w||(w=(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 "]))),N,(n.vars||n).palette.action.hover)})),F=o.forwardRef((function(e,t){const n=(0,v.b)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:c="span",height:l,style:h,variant:d="text",width:f}=n,p=(0,i.A)(n,y),m=(0,a.A)({},n,{animation:r,component:c,variant:d,hasChildren:Boolean(p.children)}),A=(e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:a,height:o}=e,s={root:["root",n,r,i&&"withChildren",i&&!a&&"fitContent",i&&!o&&"heightAuto"]};return(0,u.A)(s,g,t)})(m);return(0,k.jsx)(E,(0,a.A)({as:c,ref:t,className:(0,s.A)(A.root,o),ownerState:m},p,{style:(0,a.A)({width:f,height:l},h)}))}))},97125:(e,t,n)=>{"use strict";n.d(t,{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/4813.fb867d55.chunk.js b/build/static/js/4813.fb867d55.chunk.js deleted file mode 100644 index 31ba65e..0000000 --- a/build/static/js/4813.fb867d55.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4813],{2046:(n,t,e)=>{e.d(t,{A:()=>S});var r=e(98587),a=e(58168),i=e(9950),o=e(72004),s=e(3484),u=e(89548),c=e(82053),l=e(15866),d=e(39766),h=e(59254),f=e(45558),m=e(1614);function p(n){return(0,m.Ay)("MuiInputAdornment",n)}const v=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var A,g=e(18463),b=e(44414);const w=["children","className","component","disablePointerEvents","disableTypography","position","variant"],y=(0,h.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(n,t)=>{const{ownerState:e}=n;return[t.root,t["position".concat((0,u.A)(e.position))],!0===e.disablePointerEvents&&t.disablePointerEvents,t[e.variant]]}})((n=>{let{theme:t,ownerState:e}=n;return(0,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===e.variant&&{["&.".concat(v.positionStart,"&:not(.").concat(v.hiddenLabel,")")]:{marginTop:16}},"start"===e.position&&{marginRight:8},"end"===e.position&&{marginLeft:8},!0===e.disablePointerEvents&&{pointerEvents:"none"})})),S=i.forwardRef((function(n,t){const e=(0,g.b)({props:n,name:"MuiInputAdornment"}),{children:h,className:f,component:m="div",disablePointerEvents:v=!1,disableTypography:S=!1,position:R,variant:x}=e,C=(0,r.A)(e,w),k=(0,d.A)()||{};let E=x;x&&k.variant,k&&!E&&(E=k.variant);const M=(0,a.A)({},e,{hiddenLabel:k.hiddenLabel,size:k.size,disablePointerEvents:v,position:R,variant:E}),P=(n=>{const{classes:t,disablePointerEvents:e,hiddenLabel:r,position:a,size:i,variant:o}=n,c={root:["root",e&&"disablePointerEvents",a&&"position".concat((0,u.A)(a)),o,r&&"hiddenLabel",i&&"size".concat((0,u.A)(i))]};return(0,s.A)(c,p,t)})(M);return(0,b.jsx)(l.A.Provider,{value:null,children:(0,b.jsx)(y,(0,a.A)({as:m,ownerState:M,className:(0,o.A)(P.root,f),ref:t},C,{children:"string"!==typeof h||S?(0,b.jsxs)(i.Fragment,{children:["start"===R?A||(A=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,h]}):(0,b.jsx)(c.A,{color:"text.secondary",children:h})}))})}))},7762:(n,t,e)=>{var r=e(24994);t.A=void 0;var a=r(e(79526)),i=e(44414);t.A=(0,a.default)((0,i.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")},52097:(n,t,e)=>{e.d(t,{d7:()=>o});var r=e(9950);function a(n,t,e,a){var i=this,o=(0,r.useRef)(null),s=(0,r.useRef)(0),u=(0,r.useRef)(0),c=(0,r.useRef)(null),l=(0,r.useRef)([]),d=(0,r.useRef)(),h=(0,r.useRef)(),f=(0,r.useRef)(n),m=(0,r.useRef)(!0);f.current=n;var p="undefined"!=typeof window,v=!t&&0!==t&&p;if("function"!=typeof n)throw new TypeError("Expected a function");t=+t||0;var A=!!(e=e||{}).leading,g=!("trailing"in e)||!!e.trailing,b="maxWait"in e,w="debounceOnServer"in e&&!!e.debounceOnServer,y=b?Math.max(+e.maxWait||0,t):null;(0,r.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var S=(0,r.useMemo)((function(){var n=function(n){var t=l.current,e=d.current;return l.current=d.current=null,s.current=n,u.current=u.current||n,h.current=f.current.apply(e,t)},e=function(n,t){v&&cancelAnimationFrame(c.current),c.current=v?requestAnimationFrame(n):setTimeout(n,t)},r=function(n){if(!m.current)return!1;var e=n-o.current;return!o.current||e>=t||e<0||b&&n-s.current>=y},S=function(t){return c.current=null,g&&l.current?n(t):(l.current=d.current=null,h.current)},R=function n(){var a=Date.now();if(A&&u.current===s.current&&x(),r(a))return S(a);if(m.current){var i=t-(a-o.current),c=b?Math.min(i,y-(a-s.current)):i;e(n,c)}},x=function(){a&&a({})},C=function(){if(p||w){var a=Date.now(),u=r(a);if(l.current=[].slice.call(arguments),d.current=i,o.current=a,u){if(!c.current&&m.current)return s.current=o.current,e(R,t),A?n(o.current):h.current;if(b)return e(R,t),n(o.current)}return c.current||e(R,t),h.current}};return C.cancel=function(){c.current&&(v?cancelAnimationFrame(c.current):clearTimeout(c.current)),s.current=0,l.current=o.current=d.current=c.current=null},C.isPending=function(){return!!c.current},C.flush=function(){return c.current?S(Date.now()):h.current},C}),[A,b,t,y,g,v,p,w,a]);return S}function i(n,t){return n===t}function o(n,t,e){var o=e&&e.equalityFn||i,s=(0,r.useRef)(n),u=(0,r.useState)({})[1],c=a((0,r.useCallback)((function(n){s.current=n,u({})}),[u]),t,e,u),l=(0,r.useRef)(n);return o(l.current,n)||(c(n),l.current=n),[s.current,c]}},82917:(n,t,e)=>{e.d(t,{A:()=>L});var r=e(57528),a=e(98587),i=e(58168),o=e(9950),s=e(72004),u=e(88283),c=e(3484);function l(n){return String(n).match(/[\d.\-+]*\s*(.*)/)[1]||""}function d(n){return parseFloat(n)}var h=e(97497),f=e(59254),m=e(18463),p=e(45558),v=e(1614);function A(n){return(0,v.Ay)("MuiSkeleton",n)}(0,p.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g,b,w,y,S=e(44414);const R=["animation","className","component","height","style","variant","width"];let x,C,k,E;const M=(0,u.i7)(x||(x=g||(g=(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"])))),P=(0,u.i7)(C||(C=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"])))),j=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(n,t)=>{const{ownerState:e}=n;return[t.root,t[e.variant],!1!==e.animation&&t[e.animation],e.hasChildren&&t.withChildren,e.hasChildren&&!e.width&&t.fitContent,e.hasChildren&&!e.height&&t.heightAuto]}})((n=>{let{theme:t,ownerState:e}=n;const r=l(t.shape.borderRadius)||"px",a=d(t.shape.borderRadius);return(0,i.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,h.X4)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===e.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(a).concat(r,"/").concat(Math.round(a/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===e.variant&&{borderRadius:"50%"},"rounded"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius},e.hasChildren&&{"& > *":{visibility:"hidden"}},e.hasChildren&&!e.width&&{maxWidth:"fit-content"},e.hasChildren&&!e.height&&{height:"auto"})}),(n=>{let{ownerState:t}=n;return"pulse"===t.animation&&(0,u.AH)(k||(k=w||(w=(0,r.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),M)}),(n=>{let{ownerState:t,theme:e}=n;return"wave"===t.animation&&(0,u.AH)(E||(E=y||(y=(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 "]))),P,(e.vars||e).palette.action.hover)})),L=o.forwardRef((function(n,t){const e=(0,m.b)({props:n,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:u="span",height:l,style:d,variant:h="text",width:f}=e,p=(0,a.A)(e,R),v=(0,i.A)({},e,{animation:r,component:u,variant:h,hasChildren:Boolean(p.children)}),g=(n=>{const{classes:t,variant:e,animation:r,hasChildren:a,width:i,height:o}=n,s={root:["root",e,r,a&&"withChildren",a&&!i&&"fitContent",a&&!o&&"heightAuto"]};return(0,c.A)(s,A,t)})(v);return(0,S.jsx)(j,(0,i.A)({as:u,ref:t,className:(0,s.A)(g.root,o),ownerState:v},p,{style:(0,i.A)({width:f,height:l},d)}))}))},97125:(n,t,e)=>{e.d(t,{A:()=>i});var r=e(23235),a=e(44414);const i=(0,r.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/4894.cfa4d36d.chunk.js b/build/static/js/4894.cfa4d36d.chunk.js new file mode 100644 index 0000000..7e3fc9e --- /dev/null +++ b/build/static/js/4894.cfa4d36d.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4894],{36150:(t,e,s)=>{s.d(e,{I:()=>a});var i=s(69347),r=s(1729);function a(t,e){return(0,r.t)(t,i.$,e)}},46639:(t,e,s)=>{s.d(e,{A:()=>E});var i=s(57528),r=s(98587),a=s(58168),n=s(9950),o=s(72004),c=s(3484),l=s(88283),h=s(89548),u=s(18463),d=s(59254),v=s(45558),A=s(1614);function f(t){return(0,A.Ay)("MuiCircularProgress",t)}(0,v.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var p,m,g,b,k=s(44414);const S=["className","color","disableShrink","size","style","thickness","value","variant"];let w,y,x,P;const M=44,C=(0,l.i7)(w||(w=p||(p=(0,i.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),R=(0,l.i7)(y||(y=m||(m=(0,i.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"])))),N=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[e.root,e[s.variant],e["color".concat((0,h.A)(s.color))]]}})((t=>{let{ownerState:e,theme:s}=t;return(0,a.A)({display:"inline-block"},"determinate"===e.variant&&{transition:s.transitions.create("transform")},"inherit"!==e.color&&{color:(s.vars||s).palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&(0,l.AH)(x||(x=g||(g=(0,i.A)(["\n animation: "," 1.4s linear infinite;\n "]))),C)})),O=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),D=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[e.circle,e["circle".concat((0,h.A)(s.variant))],s.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:s}=t;return(0,a.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:s.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&!e.disableShrink&&(0,l.AH)(P||(P=b||(b=(0,i.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),R)})),E=n.forwardRef((function(t,e){const s=(0,u.b)({props:t,name:"MuiCircularProgress"}),{className:i,color:n="primary",disableShrink:l=!1,size:d=40,style:v,thickness:A=3.6,value:p=0,variant:m="indeterminate"}=s,g=(0,r.A)(s,S),b=(0,a.A)({},s,{color:n,disableShrink:l,size:d,thickness:A,value:p,variant:m}),w=(t=>{const{classes:e,variant:s,color:i,disableShrink:r}=t,a={root:["root",s,"color".concat((0,h.A)(i))],svg:["svg"],circle:["circle","circle".concat((0,h.A)(s)),r&&"circleDisableShrink"]};return(0,c.A)(a,f,e)})(b),y={},x={},P={};if("determinate"===m){const t=2*Math.PI*((M-A)/2);y.strokeDasharray=t.toFixed(3),P["aria-valuenow"]=Math.round(p),y.strokeDashoffset="".concat(((100-p)/100*t).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,k.jsx)(N,(0,a.A)({className:(0,o.A)(w.root,i),style:(0,a.A)({width:d,height:d},x,v),ownerState:b,ref:e,role:"progressbar"},P,g,{children:(0,k.jsx)(O,{className:w.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(M," ").concat(M),children:(0,k.jsx)(D,{className:w.circle,style:y,ownerState:b,cx:M,cy:M,r:(M-A)/2,fill:"none",strokeWidth:A})})}))}))},51778:(t,e,s)=>{s.d(e,{n:()=>P});var i,r,a,n,o,c,l=s(89379),h=s(9950),u=s(39790),d=s(55149),v=s(64137),A=s(83568),f=s(53167),p=s(92750),m=s(15941),g=s(95732),b=s(61664),k=(i=new WeakMap,r=new WeakMap,a=new WeakMap,n=new WeakMap,o=new WeakSet,c=new WeakSet,class extends g.Q{constructor(t,e){super(),(0,u.A)(this,c),(0,u.A)(this,o),(0,d.A)(this,i,{writable:!0,value:void 0}),(0,d.A)(this,r,{writable:!0,value:void 0}),(0,d.A)(this,a,{writable:!0,value:void 0}),(0,d.A)(this,n,{writable:!0,value:void 0}),(0,f.A)(this,r,void 0),(0,f.A)(this,i,t),this.setOptions(e),this.bindMethods(),(0,A.A)(this,o,S).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const s=this.options;this.options=(0,v.A)(this,i).defaultMutationOptions(t),(0,b.f8)(s,this.options)||(0,v.A)(this,i).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,v.A)(this,a),observer:this}),null===(e=(0,v.A)(this,a))||void 0===e||e.setOptions(this.options),null!==s&&void 0!==s&&s.mutationKey&&this.options.mutationKey&&(0,b.EN)(s.mutationKey)!==(0,b.EN)(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var t;this.hasListeners()||(null===(t=(0,v.A)(this,a))||void 0===t||t.removeObserver(this))}onMutationUpdate(t){(0,A.A)(this,o,S).call(this),(0,A.A)(this,c,w).call(this,t)}getCurrentResult(){return(0,v.A)(this,r)}reset(){var t;null===(t=(0,v.A)(this,a))||void 0===t||t.removeObserver(this),(0,f.A)(this,a,void 0),(0,A.A)(this,o,S).call(this),(0,A.A)(this,c,w).call(this)}mutate(t,e){var s;return(0,f.A)(this,n,e),null===(s=(0,v.A)(this,a))||void 0===s||s.removeObserver(this),(0,f.A)(this,a,(0,v.A)(this,i).getMutationCache().build((0,v.A)(this,i),this.options)),(0,v.A)(this,a).addObserver(this),(0,v.A)(this,a).execute(t)}});function S(){var t,e;const s=null!==(t=null===(e=(0,v.A)(this,a))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,p.$)();(0,f.A)(this,r,(0,l.A)((0,l.A)({},s),{},{isPending:"pending"===s.status,isSuccess:"success"===s.status,isError:"error"===s.status,isIdle:"idle"===s.status,mutate:this.mutate,reset:this.reset}))}function w(t){m.j.batch((()=>{if((0,v.A)(this,n)&&this.hasListeners()){const u=(0,v.A)(this,r).variables,d=(0,v.A)(this,r).context;var e,s,i,a;if("success"===(null===t||void 0===t?void 0:t.type))null===(e=(s=(0,v.A)(this,n)).onSuccess)||void 0===e||e.call(s,t.data,u,d),null===(i=(a=(0,v.A)(this,n)).onSettled)||void 0===i||i.call(a,t.data,null,u,d);else if("error"===(null===t||void 0===t?void 0:t.type)){var o,c,l,h;null===(o=(c=(0,v.A)(this,n)).onError)||void 0===o||o.call(c,t.error,u,d),null===(l=(h=(0,v.A)(this,n)).onSettled)||void 0===l||l.call(h,void 0,t.error,u,d)}}this.listeners.forEach((t=>{t((0,v.A)(this,r))}))}))}var y=s(15441),x=s(98986);function P(t,e){const s=(0,y.jE)(e),[i]=h.useState((()=>new k(s,t)));h.useEffect((()=>{i.setOptions(t)}),[i,t]);const r=h.useSyncExternalStore(h.useCallback((t=>i.subscribe(m.j.batchCalls(t))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),a=h.useCallback(((t,e)=>{i.mutate(t,e).catch(M)}),[i]);if(r.error&&(0,x.G)(i.options.throwOnError,[r.error]))throw r.error;return(0,l.A)((0,l.A)({},r),{},{mutate:a,mutateAsync:r.mutate})}function M(){}},60010:(t,e,s)=>{s.d(e,{q:()=>c});var i=s(89379),r=s(69347),a=s(45247),n=class extends r.${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,i.A)((0,i.A)({},t),{},{behavior:(0,a.PL)()}),e)}getOptimisticResult(t){return t.behavior=(0,a.PL)(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(t,e){var s,r;const{state:n}=t,o=super.createResult(t,e),{isFetching:c,isRefetching:l}=o,h=c&&"forward"===(null===(s=n.fetchMeta)||void 0===s||null===(s=s.fetchMore)||void 0===s?void 0:s.direction),u=c&&"backward"===(null===(r=n.fetchMeta)||void 0===r||null===(r=r.fetchMore)||void 0===r?void 0:r.direction);return(0,i.A)((0,i.A)({},o),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.rB)(e,n.data),hasPreviousPage:(0,a.RQ)(e,n.data),isFetchingNextPage:h,isFetchingPreviousPage:u,isRefetching:l&&!h&&!u})}},o=s(1729);function c(t,e){return(0,o.t)(t,n,e)}},79739:(t,e,s)=>{s.d(e,{A:()=>p});var i=s(98587),r=s(58168),a=s(9950),n=s(72004),o=s(3484),c=s(59254),l=s(18463),h=s(45558),u=s(1614);function d(t){return(0,u.Ay)("MuiDialogActions",t)}(0,h.A)("MuiDialogActions",["root","spacing"]);var v=s(44414);const A=["className","disableSpacing"],f=(0,c.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[e.root,!s.disableSpacing&&e.spacing]}})((t=>{let{ownerState:e}=t;return(0,r.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),p=a.forwardRef((function(t,e){const s=(0,l.b)({props:t,name:"MuiDialogActions"}),{className:a,disableSpacing:c=!1}=s,h=(0,i.A)(s,A),u=(0,r.A)({},s,{disableSpacing:c}),p=(t=>{const{classes:e,disableSpacing:s}=t,i={root:["root",!s&&"spacing"]};return(0,o.A)(i,d,e)})(u);return(0,v.jsx)(f,(0,r.A)({className:(0,n.A)(p.root,a),ownerState:u,ref:e},h))}))}}]); \ No newline at end of file diff --git a/build/static/js/5116.88b8f8cf.chunk.js b/build/static/js/5116.88b8f8cf.chunk.js new file mode 100644 index 0000000..eac8fc2 --- /dev/null +++ b/build/static/js/5116.88b8f8cf.chunk.js @@ -0,0 +1,2 @@ +/*! For license information please see 5116.88b8f8cf.chunk.js.LICENSE.txt */ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[5116],{10523:(e,t,n)=>{n.d(t,{BH:()=>U,Fu:()=>gt,KD:()=>G,Ro:()=>Lt,i3:()=>nn,pH:()=>pe,u6:()=>C});var s,o,i=n(44414),r=n(9950),a=n(17119);function l(e){return l="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},l(e)}function u(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=l(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}function p(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d=c(o?s:(o=1,s=function(e,t,n,s,o,i,r,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,s,o,i,r,a],p=0;(l=new Error(t.replace(/%s/g,(function(){return u[p++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}})),h=(0,r.createContext)(null);function g(e,t,n,s){var o,i,r={};return o=e,i=(e,o)=>{var i=n[o];i!==t[o]&&(r[o]=i,e(s,i))},Object.keys(o).forEach((e=>i(o[e],e))),r}function m(e,t,n){var s,o,i,r=(s=n,o=function(n,s,o){return"function"===typeof e[o]&&n.push(google.maps.event.addListener(t,s,e[o])),n},i=[],Object.keys(s).reduce((function(e,t){return o(e,s[t],t)}),i));return r}function v(e){google.maps.event.removeListener(e)}function f(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(v)}function y(e){var{updaterMap:t,eventMap:n,prevProps:s,nextProps:o,instance:i}=e,r=m(o,i,n);return g(t,s,o,i),r}var b={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},L={extraMapTypes(e,t){t.forEach((function(t,n){e.mapTypes.set(String(n),t)}))},center(e,t){e.setCenter(t)},clickableIcons(e,t){e.setClickableIcons(t)},heading(e,t){e.setHeading(t)},mapTypeId(e,t){e.setMapTypeId(t)},options(e,t){e.setOptions(t)},streetView(e,t){e.setStreetView(t)},tilt(e,t){e.setTilt(t)},zoom(e,t){e.setZoom(t)}};(0,r.memo)((function(e){var{children:t,options:n,id:s,mapContainerStyle:o,mapContainerClassName:a,center:l,onClick:u,onDblClick:p,onDrag:c,onDragEnd:d,onDragStart:g,onMouseMove:m,onMouseOut:v,onMouseOver:f,onMouseDown:y,onMouseUp:b,onRightClick:L,onCenterChanged:C,onLoad:E,onUnmount:w}=e,[M,x]=(0,r.useState)(null),k=(0,r.useRef)(null),[P,O]=(0,r.useState)(null),[S,D]=(0,r.useState)(null),[I,j]=(0,r.useState)(null),[B,_]=(0,r.useState)(null),[R,T]=(0,r.useState)(null),[U,z]=(0,r.useState)(null),[A,Z]=(0,r.useState)(null),[V,W]=(0,r.useState)(null),[N,H]=(0,r.useState)(null),[F,G]=(0,r.useState)(null),[K,Y]=(0,r.useState)(null),[q,J]=(0,r.useState)(null);return(0,r.useEffect)((()=>{n&&null!==M&&M.setOptions(n)}),[M,n]),(0,r.useEffect)((()=>{null!==M&&"undefined"!==typeof l&&M.setCenter(l)}),[M,l]),(0,r.useEffect)((()=>{M&&p&&(null!==S&&google.maps.event.removeListener(S),D(google.maps.event.addListener(M,"dblclick",p)))}),[p]),(0,r.useEffect)((()=>{M&&d&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(M,"dragend",d)))}),[d]),(0,r.useEffect)((()=>{M&&g&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(M,"dragstart",g)))}),[g]),(0,r.useEffect)((()=>{M&&y&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(M,"mousedown",y)))}),[y]),(0,r.useEffect)((()=>{M&&m&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(M,"mousemove",m)))}),[m]),(0,r.useEffect)((()=>{M&&v&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(M,"mouseout",v)))}),[v]),(0,r.useEffect)((()=>{M&&f&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(M,"mouseover",f)))}),[f]),(0,r.useEffect)((()=>{M&&b&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(M,"mouseup",b)))}),[b]),(0,r.useEffect)((()=>{M&&L&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(M,"rightclick",L)))}),[L]),(0,r.useEffect)((()=>{M&&u&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(M,"click",u)))}),[u]),(0,r.useEffect)((()=>{M&&c&&(null!==q&&google.maps.event.removeListener(q),J(google.maps.event.addListener(M,"drag",c)))}),[c]),(0,r.useEffect)((()=>{M&&C&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(M,"center_changed",C)))}),[u]),(0,r.useEffect)((()=>{var e=null===k.current?null:new google.maps.Map(k.current,n);return x(e),null!==e&&E&&E(e),()=>{null!==e&&w&&w(e)}}),[]),(0,i.jsx)("div",{id:s,ref:k,style:o,className:a,children:(0,i.jsx)(h.Provider,{value:M,children:null!==M?t:null})})}));class C extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{map:null}),p(this,"registeredEvents",[]),p(this,"mapRef",null),p(this,"getInstance",(()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options))),p(this,"panTo",(e=>{var t=this.getInstance();t&&t.panTo(e)})),p(this,"setMapCallback",(()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)})),p(this,"getRef",(e=>{this.mapRef=e}))}componentDidMount(){var e=this.getInstance();this.registeredEvents=y({updaterMap:L,eventMap:b,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)}componentDidUpdate(e){null!==this.state.map&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:L,eventMap:b,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),f(this.registeredEvents))}render(){return(0,i.jsx)("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:(0,i.jsx)(h.Provider,{value:this.state.map,children:null!==this.state.map?this.props.children:null})})}}function E(e,t,n,s,o,i,r){try{var a=e[i](r),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(s,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(s,o){var i=e.apply(t,n);function r(e){E(i,s,o,r,a,"next",e)}function a(e){E(i,s,o,r,a,"throw",e)}r(void 0)}))}}function M(e){var{googleMapsApiKey:t,googleMapsClientId:n,version:s="weekly",language:o,region:i,libraries:r,channel:a,mapIds:l,authReferrerPolicy:u,apiUrl:p="https://maps.googleapis.com"}=e,c=[];return d(t&&n||!(t&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),t?c.push("key=".concat(t)):n&&c.push("client=".concat(n)),s&&c.push("v=".concat(s)),o&&c.push("language=".concat(o)),i&&c.push("region=".concat(i)),r&&r.length&&c.push("libraries=".concat(r.sort().join(","))),a&&c.push("channel=".concat(a)),l&&l.length&&c.push("map_ids=".concat(l.join(","))),u&&c.push("auth_referrer_policy=".concat(u)),c.push("loading=async"),c.push("callback=initMap"),"".concat(p,"/maps/api/js?").concat(c.join("&"))}var x="undefined"!==typeof document;function k(e){var{url:t,id:n,nonce:s}=e;return x?new Promise((function(e,o){var i=document.getElementById(n),r=window;if(i){var a=i.getAttribute("data-state");if(i.src===t&&"error"!==a){if("ready"===a)return e(n);var l=r.initMap,u=i.onerror;return r.initMap=function(){l&&l(),e(n)},void(i.onerror=function(e){u&&u(e),o(e)})}i.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=t,p.id=n,p.async=!0,p.nonce=s||"",p.onerror=function(e){p.setAttribute("data-state","error"),o(e)},r.initMap=function(){p.setAttribute("data-state","ready"),e(n)},document.head.appendChild(p)})).catch((e=>{throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))}function P(e){var t=e.href;return!(!t||0!==t.indexOf("https://fonts.googleapis.com/css?family=Roboto")&&0!==t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text"))||("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",!0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",!0):"style"===e.tagName.toLowerCase()&&!e.styleSheet&&!e.innerHTML)}function O(){var e=document.getElementsByTagName("head")[0];if(e){var t=e.insertBefore.bind(e);e.insertBefore=function(n,s){return P(n)||Reflect.apply(t,e,[n,s]),n};var n=e.appendChild.bind(e);e.appendChild=function(t){return P(t)||Reflect.apply(n,e,[t]),t}}}var S=!1;function D(){return(0,i.jsx)("div",{children:"Loading..."})}var I,j={id:"script-loader",version:"weekly"};class B extends r.PureComponent{constructor(){super(...arguments),p(this,"check",null),p(this,"state",{loaded:!1}),p(this,"cleanupCallback",(()=>{delete window.google.maps,this.injectScript()})),p(this,"isCleaningUp",w((function*(){return new Promise((function(e){if(S){if(x)var t=window.setInterval((function(){S||(window.clearInterval(t),e())}),1)}else e()}))}))),p(this,"cleanup",(()=>{S=!0;var e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"===typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))})),p(this,"injectScript",(()=>{this.props.preventGoogleFontsLoading&&O(),d(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id),k({id:this.props.id,nonce:this.props.nonce,url:M(this.props)}).then((()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))})).catch((e=>{this.props.onError&&this.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",") to \n Otherwise it is a Network issue.\n "))}))})),p(this,"getRef",(e=>{this.check=e}))}componentDidMount(){if(x){if(window.google&&window.google.maps&&!S)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}}componentDidUpdate(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),x&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(x){this.cleanup();window.setTimeout((()=>{this.check||(delete window.google,S=!1)}),1),this.props.onUnmount&&this.props.onUnmount()}}render(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:this.getRef}),this.state.loaded?this.props.children:this.props.loadingElement||(0,i.jsx)(D,{})]})}}function _(e,t){if(null==e)return{};var n,s,o=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.includes(s))continue;n[s]=e[s]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s{v.current=!1}}),[]),(0,r.useEffect)((function(){x&&p&&O()}),[p]),(0,r.useEffect)((function(){f&&d(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[f]);var C=M({version:n,googleMapsApiKey:o,googleMapsClientId:i,language:a,region:l,libraries:u,channel:c,mapIds:h,authReferrerPolicy:g,apiUrl:m});(0,r.useEffect)((function(){function e(){v.current&&(y(!0),I=C)}x&&(window.google&&window.google.maps&&I===C?e():k({id:t,url:C,nonce:s}).then(e).catch((function(e){v.current&&L(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(o||"-",") or Client ID (").concat(i||"-",")\n Otherwise it is a Network issue.\n ")),console.error(e)})))}),[t,C,s]);var E=(0,r.useRef)(void 0);return(0,r.useEffect)((function(){E.current&&u!==E.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),E.current=u}),[u]),{isLoaded:f,loadError:b,url:C}}(a);return(0,r.useEffect)((function(){l&&"function"===typeof n&&n()}),[l,n]),(0,r.useEffect)((function(){u&&"function"===typeof s&&s(u)}),[u,s]),(0,r.useEffect)((function(){return()=>{o&&o()}}),[o]),l?i:t||T}));function z(e,t,n,s){return new(n||(n=Promise))((function(t,o){function i(e){try{a(s.next(e))}catch(t){o(t)}}function r(e){try{a(s.throw(e))}catch(t){o(t)}}function a(e){var s;e.done?t(e.value):(s=e.value,s instanceof n?s:new n((function(e){e(s)}))).then(i,r)}a((s=s.apply(e,[])).next())}))}function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"===typeof SuppressedError&&SuppressedError;var Z,V=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,o,i;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(o=s;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=s;0!==o--;){var r=i[o];if(!e(t[r],n[r]))return!1}return!0}return t!==t&&n!==n},W=A(V),N="__googleMapsScriptId";!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(Z||(Z={}));class H{constructor(e){var{apiKey:t,authReferrerPolicy:n,channel:s,client:o,id:i=N,language:r,libraries:a=[],mapIds:l,nonce:u,region:p,retries:c=3,url:d="https://maps.googleapis.com/maps/api/js",version:h}=e;if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=n,this.channel=s,this.client=o,this.id=i||N,this.language=r,this.libraries=a,this.mapIds=l,this.nonce=u,this.region=p,this.retries=c,this.url=d,this.version=h,H.instance){if(!W(this.options,H.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(H.instance.options)));return H.instance}H.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Z.FAILURE:this.done?Z.SUCCESS:this.loading?Z.LOADING:Z.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){var e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="®ion=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(e+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),e}deleteScript(){var e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))this.callback();else{var n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((e=>!n[e]&&delete n[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{var t,n,s,o="The Google Maps JavaScript API",i="google",r="importLibrary",a="__ib__",l=document,u=window,p=(u=u[i]||(u[i]={})).maps||(u.maps={}),c=new Set,d=new URLSearchParams,h=()=>t||(t=new Promise(((r,u)=>z(this,0,void 0,(function*(){var h;for(s in yield n=l.createElement("script"),n.id=this.id,d.set("libraries",[...c]+""),e)d.set(s.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[s]);d.set("callback",i+".maps."+a),n.src=this.url+"?"+d,p[a]=r,n.onerror=()=>t=u(Error(o+" could not load.")),n.nonce=this.nonce||(null===(h=l.querySelector("script[nonce]"))||void 0===h?void 0:h.nonce)||"",l.head.append(n)})))));p[r]?console.warn(o+" only loads once. Ignoring:",e):p[r]=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;sp[r](e,...n)))}})(n);var s=this.libraries.map((e=>this.importLibrary(e)));s.length||s.push(this.importLibrary("core")),Promise.all(s).then((()=>this.callback()),(e=>{var t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){var t=this.errors.length*Math.pow(2,this.errors.length);console.error("Failed to load Google Maps script, retrying in ".concat(t," ms.")),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}var F=["maps"];function G(e){var{id:t=j.id,version:n=j.version,nonce:s,googleMapsApiKey:o,language:i,region:a,libraries:l=F,preventGoogleFontsLoading:u,mapIds:p,authReferrerPolicy:c}=e,d=(0,r.useRef)(!1),[h,g]=(0,r.useState)(!1),[m,v]=(0,r.useState)(void 0);(0,r.useEffect)((function(){return d.current=!0,()=>{d.current=!1}}),[]);var f=(0,r.useMemo)((()=>new H({id:t,apiKey:o,version:n,libraries:l,language:i||"en",region:a||"US",mapIds:p||[],nonce:s||"",authReferrerPolicy:c||"origin"})),[t,o,n,l,i,a,p,s,c]);(0,r.useEffect)((function(){h||f.load().then((()=>{d.current&&g(!0)})).catch((e=>{v(e)}))}),[]),(0,r.useEffect)((()=>{x&&u&&O()}),[u]);var y=(0,r.useRef)();return(0,r.useEffect)((()=>{y.current&&l!==y.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),y.current=l}),[l]),{isLoaded:h,loadError:m}}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Y(e){for(var t=1;t{null!==i&&i.setMap(o)}),[o]),(0,r.useEffect)((()=>{t&&null!==i&&i.setOptions(t)}),[i,t]),(0,r.useEffect)((()=>{var e=new google.maps.TrafficLayer(Y(Y({},t),{},{map:o}));return a(e),n&&n(e),()=>{null!==i&&(s&&s(i),i.setMap(null))}}),[]),null}));class X extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{trafficLayer:null}),p(this,"setTrafficLayerCallback",(()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)})),p(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(Y(Y({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:J,eventMap:q,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)}componentDidUpdate(e){null!==this.state.trafficLayer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:J,eventMap:q,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),f(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}p(X,"contextType",h);(0,r.memo)((function(e){var{onLoad:t,onUnmount:n}=e,s=(0,r.useContext)(h),[o,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{null!==o&&o.setMap(s)}),[s]),(0,r.useEffect)((()=>{var e=new google.maps.BicyclingLayer;return i(e),e.setMap(s),t&&t(e),()=>{null!==e&&(n&&n(e),e.setMap(null))}}),[]),null}));class $ extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{bicyclingLayer:null}),p(this,"setBicyclingLayerCallback",(()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}))}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState((()=>({bicyclingLayer:e})),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}p($,"contextType",h);(0,r.memo)((function(e){var{onLoad:t,onUnmount:n}=e,s=(0,r.useContext)(h),[o,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{null!==o&&o.setMap(s)}),[s]),(0,r.useEffect)((()=>{var e=new google.maps.TransitLayer;return i(e),e.setMap(s),t&&t(e),()=>{null!==o&&(n&&n(o),o.setMap(null))}}),[]),null}));class Q extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{transitLayer:null}),p(this,"setTransitLayerCallback",(()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}))}componentDidMount(){var e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function te(e){for(var t=1;t{null!==m&&m.setMap(g)}),[g]),(0,r.useEffect)((()=>{t&&null!==m&&m.setOptions(t)}),[m,t]),(0,r.useEffect)((()=>{null!==m&&m.setDrawingMode(null!==n&&void 0!==n?n:null)}),[m,n]),(0,r.useEffect)((()=>{m&&s&&(null!==f&&google.maps.event.removeListener(f),y(google.maps.event.addListener(m,"circlecomplete",s)))}),[m,s]),(0,r.useEffect)((()=>{m&&o&&(null!==b&&google.maps.event.removeListener(b),L(google.maps.event.addListener(m,"markercomplete",o)))}),[m,o]),(0,r.useEffect)((()=>{m&&i&&(null!==C&&google.maps.event.removeListener(C),E(google.maps.event.addListener(m,"overlaycomplete",i)))}),[m,i]),(0,r.useEffect)((()=>{m&&a&&(null!==w&&google.maps.event.removeListener(w),M(google.maps.event.addListener(m,"polygoncomplete",a)))}),[m,a]),(0,r.useEffect)((()=>{m&&l&&(null!==x&&google.maps.event.removeListener(x),k(google.maps.event.addListener(m,"polylinecomplete",l)))}),[m,l]),(0,r.useEffect)((()=>{m&&u&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(m,"rectanglecomplete",u)))}),[m,u]),(0,r.useEffect)((()=>{d(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var e=new google.maps.drawing.DrawingManager(te(te({},t),{},{map:g}));return n&&e.setDrawingMode(n),s&&y(google.maps.event.addListener(e,"circlecomplete",s)),o&&L(google.maps.event.addListener(e,"markercomplete",o)),i&&E(google.maps.event.addListener(e,"overlaycomplete",i)),a&&M(google.maps.event.addListener(e,"polygoncomplete",a)),l&&k(google.maps.event.addListener(e,"polylinecomplete",l)),u&&O(google.maps.event.addListener(e,"rectanglecomplete",u)),v(e),p&&p(e),()=>{null!==m&&(f&&google.maps.event.removeListener(f),b&&google.maps.event.removeListener(b),C&&google.maps.event.removeListener(C),w&&google.maps.event.removeListener(w),x&&google.maps.event.removeListener(x),P&&google.maps.event.removeListener(P),c&&c(m),m.setMap(null))}}),[]),null}));class oe extends r.PureComponent{constructor(e){super(e),p(this,"registeredEvents",[]),p(this,"state",{drawingManager:null}),p(this,"setDrawingManagerCallback",(()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)})),d(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(te(te({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:se,eventMap:ne,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)}componentDidUpdate(e){null!==this.state.drawingManager&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:se,eventMap:ne,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),f(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function re(e){for(var t=1;t{null!==H&&H.setMap(N)}),[N]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==H&&H.setOptions(n)}),[H,n]),(0,r.useEffect)((()=>{"undefined"!==typeof l&&null!==H&&H.setDraggable(l)}),[H,l]),(0,r.useEffect)((()=>{t&&null!==H&&H.setPosition(t)}),[H,t]),(0,r.useEffect)((()=>{"undefined"!==typeof u&&null!==H&&H.setVisible(u)}),[H,u]),(0,r.useEffect)((()=>{null===H||void 0===H||H.setAnimation(p)}),[H,p]),(0,r.useEffect)((()=>{H&&void 0!==c&&H.setClickable(c)}),[H,c]),(0,r.useEffect)((()=>{H&&void 0!==d&&H.setCursor(d)}),[H,d]),(0,r.useEffect)((()=>{H&&void 0!==g&&H.setIcon(g)}),[H,g]),(0,r.useEffect)((()=>{H&&void 0!==m&&H.setLabel(m)}),[H,m]),(0,r.useEffect)((()=>{H&&void 0!==v&&H.setOpacity(v)}),[H,v]),(0,r.useEffect)((()=>{H&&void 0!==f&&H.setShape(f)}),[H,f]),(0,r.useEffect)((()=>{H&&void 0!==y&&H.setTitle(y)}),[H,y]),(0,r.useEffect)((()=>{H&&void 0!==b&&H.setZIndex(b)}),[H,b]),(0,r.useEffect)((()=>{H&&C&&(null!==G&&google.maps.event.removeListener(G),K(google.maps.event.addListener(H,"dblclick",C)))}),[C]),(0,r.useEffect)((()=>{H&&w&&(null!==Y&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(H,"dragend",w)))}),[w]),(0,r.useEffect)((()=>{H&&M&&(null!==J&&google.maps.event.removeListener(J),X(google.maps.event.addListener(H,"dragstart",M)))}),[M]),(0,r.useEffect)((()=>{H&&O&&(null!==$&&google.maps.event.removeListener($),Q(google.maps.event.addListener(H,"mousedown",O)))}),[O]),(0,r.useEffect)((()=>{H&&x&&(null!==ee&&google.maps.event.removeListener(ee),te(google.maps.event.addListener(H,"mouseout",x)))}),[x]),(0,r.useEffect)((()=>{H&&k&&(null!==ne&&google.maps.event.removeListener(ne),se(google.maps.event.addListener(H,"mouseover",k)))}),[k]),(0,r.useEffect)((()=>{H&&P&&(null!==oe&&google.maps.event.removeListener(oe),ie(google.maps.event.addListener(H,"mouseup",P)))}),[P]),(0,r.useEffect)((()=>{H&&S&&(null!==ae&&google.maps.event.removeListener(ae),le(google.maps.event.addListener(H,"rightclick",S)))}),[S]),(0,r.useEffect)((()=>{H&&L&&(null!==pe&&google.maps.event.removeListener(pe),ce(google.maps.event.addListener(H,"click",L)))}),[L]),(0,r.useEffect)((()=>{H&&E&&(null!==de&&google.maps.event.removeListener(de),he(google.maps.event.addListener(H,"drag",E)))}),[E]),(0,r.useEffect)((()=>{H&&D&&(null!==ge&&google.maps.event.removeListener(ge),me(google.maps.event.addListener(H,"clickable_changed",D)))}),[D]),(0,r.useEffect)((()=>{H&&I&&(null!==ve&&google.maps.event.removeListener(ve),fe(google.maps.event.addListener(H,"cursor_changed",I)))}),[I]),(0,r.useEffect)((()=>{H&&j&&(null!==ye&&google.maps.event.removeListener(ye),be(google.maps.event.addListener(H,"animation_changed",j)))}),[j]),(0,r.useEffect)((()=>{H&&B&&(null!==Le&&google.maps.event.removeListener(Le),Ce(google.maps.event.addListener(H,"draggable_changed",B)))}),[B]),(0,r.useEffect)((()=>{H&&_&&(null!==Ee&&google.maps.event.removeListener(Ee),we(google.maps.event.addListener(H,"flat_changed",_)))}),[_]),(0,r.useEffect)((()=>{H&&R&&(null!==Me&&google.maps.event.removeListener(Me),xe(google.maps.event.addListener(H,"icon_changed",R)))}),[R]),(0,r.useEffect)((()=>{H&&T&&(null!==ke&&google.maps.event.removeListener(ke),Pe(google.maps.event.addListener(H,"position_changed",T)))}),[T]),(0,r.useEffect)((()=>{H&&U&&(null!==Oe&&google.maps.event.removeListener(Oe),Se(google.maps.event.addListener(H,"shape_changed",U)))}),[U]),(0,r.useEffect)((()=>{H&&z&&(null!==De&&google.maps.event.removeListener(De),Ie(google.maps.event.addListener(H,"title_changed",z)))}),[z]),(0,r.useEffect)((()=>{H&&A&&(null!==je&&google.maps.event.removeListener(je),Be(google.maps.event.addListener(H,"visible_changed",A)))}),[A]),(0,r.useEffect)((()=>{H&&Z&&(null!==_e&&google.maps.event.removeListener(_e),Re(google.maps.event.addListener(H,"zindex_changed",Z)))}),[Z]),(0,r.useEffect)((()=>{var e=re(re(re({},n||ue),s?ue:{map:N}),{},{position:t}),i=new google.maps.Marker(e);return s?s.addMarker(i,!!o):i.setMap(N),t&&i.setPosition(t),"undefined"!==typeof u&&i.setVisible(u),"undefined"!==typeof l&&i.setDraggable(l),"undefined"!==typeof c&&i.setClickable(c),"string"===typeof d&&i.setCursor(d),g&&i.setIcon(g),"undefined"!==typeof m&&i.setLabel(m),"undefined"!==typeof v&&i.setOpacity(v),f&&i.setShape(f),"string"===typeof y&&i.setTitle(y),"number"===typeof b&&i.setZIndex(b),C&&K(google.maps.event.addListener(i,"dblclick",C)),w&&q(google.maps.event.addListener(i,"dragend",w)),M&&X(google.maps.event.addListener(i,"dragstart",M)),O&&Q(google.maps.event.addListener(i,"mousedown",O)),x&&te(google.maps.event.addListener(i,"mouseout",x)),k&&se(google.maps.event.addListener(i,"mouseover",k)),P&&ie(google.maps.event.addListener(i,"mouseup",P)),S&&le(google.maps.event.addListener(i,"rightclick",S)),L&&ce(google.maps.event.addListener(i,"click",L)),E&&he(google.maps.event.addListener(i,"drag",E)),D&&me(google.maps.event.addListener(i,"clickable_changed",D)),I&&fe(google.maps.event.addListener(i,"cursor_changed",I)),j&&be(google.maps.event.addListener(i,"animation_changed",j)),B&&Ce(google.maps.event.addListener(i,"draggable_changed",B)),_&&we(google.maps.event.addListener(i,"flat_changed",_)),R&&xe(google.maps.event.addListener(i,"icon_changed",R)),T&&Pe(google.maps.event.addListener(i,"position_changed",T)),U&&Se(google.maps.event.addListener(i,"shape_changed",U)),z&&Ie(google.maps.event.addListener(i,"title_changed",z)),A&&Be(google.maps.event.addListener(i,"visible_changed",A)),Z&&Re(google.maps.event.addListener(i,"zindex_changed",Z)),F(i),V&&V(i),()=>{null!==G&&google.maps.event.removeListener(G),null!==Y&&google.maps.event.removeListener(Y),null!==J&&google.maps.event.removeListener(J),null!==$&&google.maps.event.removeListener($),null!==ee&&google.maps.event.removeListener(ee),null!==ne&&google.maps.event.removeListener(ne),null!==oe&&google.maps.event.removeListener(oe),null!==ae&&google.maps.event.removeListener(ae),null!==pe&&google.maps.event.removeListener(pe),null!==ge&&google.maps.event.removeListener(ge),null!==ve&&google.maps.event.removeListener(ve),null!==ye&&google.maps.event.removeListener(ye),null!==Le&&google.maps.event.removeListener(Le),null!==Ee&&google.maps.event.removeListener(Ee),null!==Me&&google.maps.event.removeListener(Me),null!==ke&&google.maps.event.removeListener(ke),null!==De&&google.maps.event.removeListener(De),null!==je&&google.maps.event.removeListener(je),null!==_e&&google.maps.event.removeListener(_e),W&&W(i),s?s.removeMarker(i,!!o):i&&i.setMap(null)}}),[]);var Te=(0,r.useMemo)((()=>a?r.Children.map(a,(e=>{if(!(0,r.isValidElement)(e))return e;var t=e;return(0,r.cloneElement)(t,{anchor:H})})):null),[a,H]);return(0,i.jsx)(i.Fragment,{children:Te})||null}));class pe extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[])}componentDidMount(){var e=this;return w((function*(){var t=re(re(re({},e.props.options||ue),e.props.clusterer?ue:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(t),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=y({updaterMap:le,eventMap:ae,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)}))()}componentDidUpdate(e){this.marker&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:le,eventMap:ae,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),f(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){return(this.props.children?r.Children.map(this.props.children,(e=>{if(!(0,r.isValidElement)(e))return e;var t=e;return(0,r.cloneElement)(t,{anchor:this.marker})})):null)||null}}p(pe,"contextType",h);var ce=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var t=this.cluster.getClusterer();if(google.maps.event.trigger(t,"click",this.cluster),google.maps.event.trigger(t,"clusterclick",this.cluster),t.getZoomOnClick()){var n=t.getMaxZoom(),s=this.cluster.getBounds(),o=t.getMap();null!==o&&"fitBounds"in o&&o.fitBounds(s),this.timeOut=window.setTimeout((function(){var e=t.getMap();if(null!==e){"fitBounds"in e&&e.fitBounds(s);var o=e.getZoom()||0;null!==n&&o>n&&e.setZoom(n+1)}}),100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),null===(e=this.getPanes())||void 0===e||e.overlayMouseTarget.appendChild(this.div);var t=this.getMap();null!==t&&(this.boundsChangedListener=google.maps.event.addListener(t,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),null!==this.timeOut&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=null!==e?"".concat(e.y,"px"):"0",this.div.style.left=null!==e?"".concat(e.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var e,t,n,s,o,i;if(this.div&&this.center){var r=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,a=this.backgroundPosition.split(" "),l=parseInt((null===(e=a[0])||void 0===e?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),u=parseInt((null===(t=a[1])||void 0===t?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(null!==p?"".concat(p.y,"px"):"0","; left: ").concat(null!==p?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var c=document.createElement("img");c.alt=r,c.src=this.url,c.width=this.width,c.height=this.height,c.setAttribute("style","position: absolute; top: ".concat(u,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(c.style.clip="rect(-".concat(u,"px, -").concat(l+this.width,"px, -").concat(u+this.height,", -").concat(l,")"));var d=document.createElement("div");d.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),(null===(n=this.sums)||void 0===n?void 0:n.text)&&(d.innerText="".concat(null===(s=this.sums)||void 0===s?void 0:s.text)),(null===(o=this.sums)||void 0===o?void 0:o.html)&&(d.innerHTML="".concat(null===(i=this.sums)||void 0===i?void 0:i.html)),this.div.innerHTML="",this.div.appendChild(c),this.div.appendChild(d),this.div.title=r,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(e){this.sums=e;var t=this.cluster.getClusterer().getStyles(),n=t[Math.min(t.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},e.prototype.setCenter=function(e){this.center=e},e.prototype.getPosFromLatLng=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return null!==t&&(t.x-=this.anchorIcon[1],t.y-=this.anchorIcon[0]),t},e}(),de=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new ce(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),t=0,n=this.getMarkers();ti)e.getMap()!==this.map&&e.setMap(this.map);else if(on||t0))for(var e=0;e3?new google.maps.LatLngBounds(null===s||void 0===s?void 0:s.getSouthWest(),null===s||void 0===s?void 0:s.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),i=this.getExtendedBounds(o),r=Math.min(e+this.batchSize,this.markers.length),a=e;a{O&&x&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(O,fe.onMouseOut,x)))}),[x]),(0,r.useEffect)((()=>{O&&M&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(O,fe.onMouseOver,M)))}),[M]),(0,r.useEffect)((()=>{O&&C&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(O,fe.onClick,C)))}),[C]),(0,r.useEffect)((()=>{O&&E&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(O,fe.onClusteringBegin,E)))}),[E]),(0,r.useEffect)((()=>{O&&w&&(null!==R&&google.maps.event.removeListener(R),_(google.maps.event.addListener(O,fe.onClusteringEnd,w)))}),[w]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==O&&ye.averageCenter(O,s)}),[O,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==O&&ye.batchSizeIE(O,o)}),[O,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==O&&ye.calculator(O,i)}),[O,i]),(0,r.useEffect)((()=>{"undefined"!==typeof a&&null!==O&&ye.clusterClass(O,a)}),[O,a]),(0,r.useEffect)((()=>{"undefined"!==typeof l&&null!==O&&ye.enableRetinaIcons(O,l)}),[O,l]),(0,r.useEffect)((()=>{"undefined"!==typeof u&&null!==O&&ye.gridSize(O,u)}),[O,u]),(0,r.useEffect)((()=>{"undefined"!==typeof c&&null!==O&&ye.ignoreHidden(O,c)}),[O,c]),(0,r.useEffect)((()=>{"undefined"!==typeof d&&null!==O&&ye.imageExtension(O,d)}),[O,d]),(0,r.useEffect)((()=>{"undefined"!==typeof g&&null!==O&&ye.imagePath(O,g)}),[O,g]),(0,r.useEffect)((()=>{"undefined"!==typeof m&&null!==O&&ye.imageSizes(O,m)}),[O,m]),(0,r.useEffect)((()=>{"undefined"!==typeof v&&null!==O&&ye.maxZoom(O,v)}),[O,v]),(0,r.useEffect)((()=>{"undefined"!==typeof f&&null!==O&&ye.minimumClusterSize(O,f)}),[O,f]),(0,r.useEffect)((()=>{"undefined"!==typeof y&&null!==O&&ye.styles(O,y)}),[O,y]),(0,r.useEffect)((()=>{"undefined"!==typeof b&&null!==O&&ye.title(O,b)}),[O,b]),(0,r.useEffect)((()=>{"undefined"!==typeof L&&null!==O&&ye.zoomOnClick(O,L)}),[O,L]),(0,r.useEffect)((()=>{if(D){var e=function(e){for(var t=1;t{null!==U&&google.maps.event.removeListener(U),null!==A&&google.maps.event.removeListener(A),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),P&&P(t)}}}),[]),null!==O&&t(O)||null}));class Le extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{markerClusterer:null}),p(this,"setClustererCallback",(()=>{null!==this.state.markerClusterer&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)}))}componentDidMount(){if(this.context){var e=new me(this.context,[],this.props.options);this.registeredEvents=y({updaterMap:ye,eventMap:fe,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({markerClusterer:e})),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:ye,eventMap:fe,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),f(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null}}function Ce(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}p(Le,"contextType",h);var Ee=function(){function e(t){void 0===t&&(t={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),"undefined"===typeof t.visible&&("undefined"===typeof t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var e=this;if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),"string"===typeof this.content?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var t=this.getPanes();if(null!==t&&t[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(0!==this.maxWidth&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var n=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-n.left-n.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var s=0,o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"];sr&&(n=g.x+p+l+d-r),this.alignBottom?g.y<-u+h+c?s=g.y+u-h-c:g.y+u+h>a&&(s=g.y+u+h-a):g.y<-u+h?s=g.y+u-h:g.y+c+u+h>a&&(s=g.y+c+u+h-a)),0===n&&0===s||t.panBy(n,s)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.div.style[t]=e[t]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"',this.div.style.filter="alpha(opacity="+100*n+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",null!==this.zIndex&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},e.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var t=this.div.ownerDocument,n=t&&t.defaultView?t.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var s=this.div.currentStyle;s&&(e.top=parseInt(s.borderTopWidth||"",10)||0,e.bottom=parseInt(s.borderBottomWidth||"",10)||0,e.left=parseInt(s.borderLeftWidth||"",10)||0,e.right=parseInt(s.borderRightWidth||"",10)||0)}return e},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection().fromLatLngToDivPixel(this.position);null!==e&&(this.div.style.left=e.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(e.y+this.pixelOffset.height)+"px":this.div.style.top=e.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},e.prototype.setOptions=function(e){void 0===e&&(e={}),"undefined"!==typeof e.boxClass&&(this.boxClass=e.boxClass,this.setBoxStyle()),"undefined"!==typeof e.boxStyle&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),"undefined"!==typeof e.content&&this.setContent(e.content),"undefined"!==typeof e.disableAutoPan&&(this.disableAutoPan=e.disableAutoPan),"undefined"!==typeof e.maxWidth&&(this.maxWidth=e.maxWidth),"undefined"!==typeof e.pixelOffset&&(this.pixelOffset=e.pixelOffset),"undefined"!==typeof e.alignBottom&&(this.alignBottom=e.alignBottom),"undefined"!==typeof e.position&&this.setPosition(e.position),"undefined"!==typeof e.zIndex&&this.setZIndex(e.zIndex),"undefined"!==typeof e.closeBoxMargin&&(this.closeBoxMargin=e.closeBoxMargin),"undefined"!==typeof e.closeBoxURL&&(this.closeBoxURL=e.closeBoxURL),"undefined"!==typeof e.infoBoxClearance&&(this.infoBoxClearance=e.infoBoxClearance),"undefined"!==typeof e.isHidden&&(this.isHidden=e.isHidden),"undefined"!==typeof e.visible&&(this.isHidden=!e.visible),"undefined"!==typeof e.enableEventPropagation&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var e=this.getMap();return"undefined"!==typeof e&&null!==e&&!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(e,t){var n=this;t&&(this.position=t.getPosition(),this.moveListener=google.maps.event.addListener(t,"position_changed",(function(){var e=t.getPosition();n.setPosition(e)})),this.mapListener=google.maps.event.addListener(t,"map_changed",(function(){n.setMap(t.map)}))),this.setMap(e),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,t=this.eventListeners;e{f&&null!==y&&(y.close(),n?y.open(f,n):y.getPosition()&&y.open(f))}),[f,y,n]),(0,r.useEffect)((()=>{s&&null!==y&&y.setOptions(s)}),[y,s]),(0,r.useEffect)((()=>{if(o&&null!==y){var e=o instanceof google.maps.LatLng?o:new google.maps.LatLng(o.lat,o.lng);y.setPosition(e)}}),[o]),(0,r.useEffect)((()=>{"number"===typeof i&&null!==y&&y.setZIndex(i)}),[i]),(0,r.useEffect)((()=>{y&&l&&(null!==L&&google.maps.event.removeListener(L),C(google.maps.event.addListener(y,"closeclick",l)))}),[l]),(0,r.useEffect)((()=>{y&&u&&(null!==E&&google.maps.event.removeListener(E),w(google.maps.event.addListener(y,"domready",u)))}),[u]),(0,r.useEffect)((()=>{y&&p&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(y,"content_changed",p)))}),[p]),(0,r.useEffect)((()=>{y&&c&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(y,"position_changed",c)))}),[c]),(0,r.useEffect)((()=>{y&&g&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(y,"zindex_changed",g)))}),[g]),(0,r.useEffect)((()=>{if(f){var e,t=s||Se,{position:o}=t,i=_(t,we);!o||o instanceof google.maps.LatLng||(e=new google.maps.LatLng(o.lat,o.lng));var r=new Ee(ke(ke({},i),e?{position:e}:{}));D.current=document.createElement("div"),b(r),l&&C(google.maps.event.addListener(r,"closeclick",l)),u&&w(google.maps.event.addListener(r,"domready",u)),p&&x(google.maps.event.addListener(r,"content_changed",p)),c&&P(google.maps.event.addListener(r,"position_changed",c)),g&&S(google.maps.event.addListener(r,"zindex_changed",g)),r.setContent(D.current),n?r.open(f,n):r.getPosition()?r.open(f):d(!1,"You must provide either an anchor or a position prop for ."),m&&m(r)}return()=>{null!==y&&(L&&google.maps.event.removeListener(L),M&&google.maps.event.removeListener(M),E&&google.maps.event.removeListener(E),k&&google.maps.event.removeListener(k),O&&google.maps.event.removeListener(O),v&&v(y),y.close())}}),[]),D.current?(0,a.createPortal)(r.Children.only(t),D.current):null}));class je extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",null),p(this,"state",{infoBox:null}),p(this,"open",((e,t)=>{t?null!==this.context&&e.open(this.context,t):e.getPosition()?null!==this.context&&e.open(this.context):d(!1,"You must provide either an anchor or a position prop for .")})),p(this,"setInfoBoxCallback",(()=>{null!==this.state.infoBox&&null!==this.containerElement&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))}))}componentDidMount(){var e,t=this.props.options||{},{position:n}=t,s=_(t,Me);!n||n instanceof google.maps.LatLng||(e=new google.maps.LatLng(n.lat,n.lng));var o=new Ee(ke(ke({},s),e?{position:e}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=y({updaterMap:Oe,eventMap:Pe,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:t}=this.state;null!==t&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Oe,eventMap:Pe,prevProps:e,nextProps:this.props,instance:t}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:t}=this.state;null!==t&&(e&&e(t),f(this.registeredEvents),t.close())}render(){return this.containerElement?(0,a.createPortal)(r.Children.only(this.props.children),this.containerElement):null}}p(je,"contextType",h);var Be=(Ie||(Ie=1,De=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,o,i;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(o=s;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=s;0!==o--;){var r=i[o];if(!e(t[r],n[r]))return!1}return!0}return t!==t&&n!==n}),De),_e=c(Be),Re=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Te{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");var s=n>>4;if(1!==s)throw new Error("Got v".concat(s," data when expected v").concat(1,"."));var o=Re[15&n];if(!o)throw new Error("Unrecognized array type.");var[i]=new Uint16Array(e,2,1),[r]=new Uint32Array(e,4,1);return new Te(r,i,o,e)}constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Float64Array,s=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var o=Re.indexOf(this.ArrayType),i=2*e*this.ArrayType.BYTES_PER_ELEMENT,r=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-r%8)%8;if(o<0)throw new Error("Unexpected typed array class: ".concat(n,"."));s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+r+a,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+i+r+a),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+r+a,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return Ue(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:o,coords:i,nodeSize:r}=this,a=[0,o.length-1,0],l=[];a.length;){var u=a.pop()||0,p=a.pop()||0,c=a.pop()||0;if(p-c<=r)for(var d=c;d<=p;d++){var h=i[2*d],g=i[2*d+1];h>=e&&h<=n&&g>=t&&g<=s&&l.push(o[d])}else{var m=c+p>>1,v=i[2*m],f=i[2*m+1];v>=e&&v<=n&&f>=t&&f<=s&&l.push(o[m]),(0===u?e<=v:t<=f)&&(a.push(c),a.push(m-1),a.push(1-u)),(0===u?n>=v:s>=f)&&(a.push(m+1),a.push(p),a.push(1-u))}}return l}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:o,nodeSize:i}=this,r=[0,s.length-1,0],a=[],l=n*n;r.length;){var u=r.pop()||0,p=r.pop()||0,c=r.pop()||0;if(p-c<=i)for(var d=c;d<=p;d++)Ve(o[2*d],o[2*d+1],e,t)<=l&&a.push(s[d]);else{var h=c+p>>1,g=o[2*h],m=o[2*h+1];Ve(g,m,e,t)<=l&&a.push(s[h]),(0===u?e-n<=g:t-n<=m)&&(r.push(c),r.push(h-1),r.push(1-u)),(0===u?e+n>=g:t+n>=m)&&(r.push(h+1),r.push(p),r.push(1-u))}}return a}}function Ue(e,t,n,s,o,i){if(!(o-s<=n)){var r=s+o>>1;ze(e,t,r,s,o,i),Ue(e,t,n,s,r-1,1-i),Ue(e,t,n,r+1,o,1-i)}}function ze(e,t,n,s,o,i){for(;o>s;){if(o-s>600){var r=o-s+1,a=n-s+1,l=Math.log(r),u=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*u*(r-u)/r)*(a-r/2<0?-1:1);ze(e,t,n,Math.max(s,Math.floor(n-a*u/r+p)),Math.min(o,Math.floor(n+(r-a)*u/r+p)),i)}var c=t[2*n+i],d=s,h=o;for(Ae(e,t,s,n),t[2*o+i]>c&&Ae(e,t,s,o);dc;)h--}t[2*s+i]===c?Ae(e,t,s,h):Ae(e,t,++h,o),h<=n&&(s=h+1),n<=h&&(o=h-1)}}function Ae(e,t,n,s){Ze(e,n,s),Ze(t,2*n,2*s),Ze(t,2*n+1,2*s+1)}function Ze(e,t,n){var s=e[t];e[t]=e[n],e[n]=s}function Ve(e,t,n,s){var o=e-n,i=t-s;return o*o+i*i}var We,Ne={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},He=Math.fround||(We=new Float32Array(1),e=>(We[0]=+e,We[0]));class Fe{constructor(e){this.options=Object.assign(Object.create(Ne),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:t,minZoom:n,maxZoom:s}=this.options;t&&console.time("total time");var o="prepare ".concat(e.length," points");t&&console.time(o),this.points=e;for(var i=[],r=0;r=n;h--){var g=+Date.now();d=this.trees[h]=this._createTree(this._cluster(d,h)),t&&console.log("z%d: %d clusters in %dms",h,d.numItems,+Date.now()-g)}return t&&console.timeEnd("total time"),this}getClusters(e,t){var n=((e[0]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,e[1])),o=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){var r=this.getClusters([n,s,180,i],t),a=this.getClusters([-180,s,o,i],t);return r.concat(a)}var l=this.trees[this._limitZoom(t)],u=l.range(Ye(n),qe(i),Ye(o),qe(s)),p=l.data,c=[];for(var d of u){var h=this.stride*d;c.push(p[h+5]>1?Ge(p,h,this.clusterProps):this.points[p[h+3]])}return c}getChildren(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),s="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(s);var i=o.data;if(t*this.stride>=i.length)throw new Error(s);var r=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[t*this.stride],l=i[t*this.stride+1],u=o.within(a,l,r),p=[];for(var c of u){var d=c*this.stride;i[d+4]===e&&p.push(i[d+5]>1?Ge(i,d,this.clusterProps):this.points[i[d+3]])}if(0===p.length)throw new Error(s);return p}getLeaves(e,t,n){t=t||10,n=n||0;var s=[];return this._appendLeaves(s,e,t,n,0),s}getTile(e,t,n){var s=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:i,radius:r}=this.options,a=r/i,l=(n-a)/o,u=(n+1+a)/o,p={features:[]};return this._addTileFeatures(s.range((t-a)/o,l,(t+1+a)/o,u),s.data,t,n,o,p),0===t&&this._addTileFeatures(s.range(1-a/o,l,1,u),s.data,o,n,o,p),t===o-1&&this._addTileFeatures(s.range(0,l,a/o,u),s.data,-1,n,o,p),p.features.length?p:null}getClusterExpansionZoom(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,s,o){var i=this.getChildren(t);for(var r of i){var a=r.properties;if(a&&a.cluster?o+a.point_count<=s?o+=a.point_count:o=this._appendLeaves(e,a.cluster_id,n,s,o):o1,u=void 0,p=void 0,c=void 0;if(l)u=Ke(t,a,this.clusterProps),p=t[a],c=t[a+1];else{var d=this.points[t[a+3]];u=d.properties;var[h,g]=d.geometry.coordinates;p=Ye(h),c=qe(g)}var m={type:1,geometry:[[Math.round(this.options.extent*(p*o-n)),Math.round(this.options.extent*(c*o-s))]],tags:u},v=void 0;void 0!==(v=l||this.options.generateId?t[a+3]:this.points[t[a+3]].id)&&(m.id=v),i.features.push(m)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){for(var{radius:n,extent:s,reduce:o,minPoints:i}=this.options,r=n/(s*Math.pow(2,t)),a=e.data,l=[],u=this.stride,p=0;pt&&(m+=a[f+5])}if(m>g&&m>=i){var y=c*g,b=d*g,L=void 0,C=-1,E=(p/u<<5)+(t+1)+this.points.length;for(var w of h){var M=w*u;if(!(a[M+2]<=t)){a[M+2]=t;var x=a[M+5];y+=a[M]*x,b+=a[M+1]*x,a[M+4]=E,o&&(L||(L=this._map(a,p,!0),C=this.clusterProps.length,this.clusterProps.push(L)),o(L,this._map(a,M)))}}a[p+4]=E,l.push(y/m,b/m,1/0,E,-1,m),o&&l.push(C)}else{for(var k=0;k1)for(var P of h){var O=P*u;if(!(a[O+2]<=t)){a[O+2]=t;for(var S=0;S>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){var s=this.clusterProps[e[t+6]];return n?Object.assign({},s):s}var o=this.points[e[t+3]].properties,i=this.options.map(o);return n&&i===o?Object.assign({},i):i}}function Ge(e,t,n){return{type:"Feature",id:e[t+3],properties:Ke(e,t,n),geometry:{type:"Point",coordinates:[(s=e[t],360*(s-.5)),Je(e[t+1])]}};var s}function Ke(e,t,n){var s=e[t+5],o=s>=1e4?"".concat(Math.round(s/1e3),"k"):s>=1e3?"".concat(Math.round(s/100)/10,"k"):s,i=e[t+6],r=-1===i?{}:Object.assign({},n[i]);return Object.assign(r,{cluster:!0,cluster_id:e[t+3],point_count:s,point_count_abbreviated:o})}function Ye(e){return e/360+.5}function qe(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Je(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Xe(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o$e.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&($e.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class et{constructor(e){var{maxZoom:t=16}=e;this.maxZoom=t}noop(e){var{markers:t}=e;return nt(t)}}var tt,nt=e=>e.map((e=>new Qe({position:$e.getPosition(e),markers:[e]})));class st extends et{constructor(e){var{maxZoom:t,radius:n=60}=e,s=Xe(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new Fe(Object.assign({maxZoom:this.maxZoom,radius:n},s))}calculate(e){var t=!1,n={zoom:e.map.getZoom()};if(!_e(e.markers,this.markers)){t=!0,this.markers=[...e.markers];var s=this.markers.map((e=>{var t=$e.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(s)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!_e(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster(e){var{map:t}=e;return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map((e=>this.transformCluster(e)))}transformCluster(e){var{geometry:{coordinates:[t,n]},properties:s}=e;if(s.cluster)return new Qe({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:n,lng:t}});var o=s.marker;return new Qe({markers:[o],position:$e.getPosition(o)})}}class ot{constructor(e,t){this.markers={sum:e.length};var n=t.map((e=>e.count)),s=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:s/t.length,sum:s,min:Math.min(...n),max:Math.max(...n)}}}}class it{render(e,t,n){var{count:s,position:o}=e,i=s>Math.max(10,t.clusters.markers.mean)?"#ff0000":"#0000ff",r='\n\n\n\n').concat(s,"\n"),a="Cluster of ".concat(s," markers"),l=Number(google.maps.Marker.MAX_ZINDEX)+s;if($e.isAdvancedMarkerAvailable(n)){var u=(new DOMParser).parseFromString(r,"image/svg+xml").documentElement;u.setAttribute("transform","translate(0 25)");var p={map:n,position:o,zIndex:l,title:a,content:u};return new google.maps.marker.AdvancedMarkerElement(p)}var c={position:o,zIndex:l,title:a,icon:{url:"data:image/svg+xml;base64,".concat(btoa(r)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}class rt{constructor(){!function(e,t){for(var n in t.prototype)e.prototype[n]=t.prototype[n]}(rt,google.maps.OverlayView)}}!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"}(tt||(tt={}));var at=(e,t,n)=>{n.fitBounds(t.bounds)};class lt extends rt{constructor(e){var{map:t,markers:n=[],algorithmOptions:s={},algorithm:o=new st(s),renderer:i=new it,onClusterClick:r=at}=e;super(),this.markers=[...n],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=r,t&&this.setMap(t)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){var n=this.markers.indexOf(e);return-1!==n&&($e.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){var n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,tt.CLUSTERING_BEGIN,this);var{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||void 0==n){var s=new Set;for(var o of t)1==o.markers.length&&s.add(o.markers[0]);var i=[];for(var r of this.clusters)null!=r.marker&&(1==r.markers.length?s.has(r.marker)||$e.setMap(r.marker,null):i.push(r.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame((()=>i.forEach((e=>$e.setMap(e,null)))))}google.maps.event.trigger(this,tt.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>$e.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){var e=new ot(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>$e.setMap(e,null))),this.onClusterClick&&n.marker.addListener("click",(e=>{google.maps.event.trigger(this,tt.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))),$e.setMap(n.marker,t)}))}}function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function pt(e){for(var t=1;t{if(t&&null===n){var o=new lt(pt(pt({},e),{},{map:t}));s(o)}}),[t]),n}(0,r.memo)((function(e){var{children:t,options:n}=e,s=ct(n);return null!==s?t(s):null}));var dt={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ht={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};(0,r.memo)((function(e){var{children:t,anchor:n,options:s,position:o,zIndex:i,onCloseClick:l,onDomReady:u,onContentChanged:p,onPositionChanged:c,onZindexChanged:g,onLoad:m,onUnmount:v}=e,f=(0,r.useContext)(h),[y,b]=(0,r.useState)(null),[L,C]=(0,r.useState)(null),[E,w]=(0,r.useState)(null),[M,x]=(0,r.useState)(null),[k,P]=(0,r.useState)(null),[O,S]=(0,r.useState)(null),D=(0,r.useRef)(null);return(0,r.useEffect)((()=>{null!==y&&(y.close(),n?y.open(f,n):y.getPosition()&&y.open(f))}),[f,y,n]),(0,r.useEffect)((()=>{s&&null!==y&&y.setOptions(s)}),[y,s]),(0,r.useEffect)((()=>{o&&null!==y&&y.setPosition(o)}),[o]),(0,r.useEffect)((()=>{"number"===typeof i&&null!==y&&y.setZIndex(i)}),[i]),(0,r.useEffect)((()=>{y&&l&&(null!==L&&google.maps.event.removeListener(L),C(google.maps.event.addListener(y,"closeclick",l)))}),[l]),(0,r.useEffect)((()=>{y&&u&&(null!==E&&google.maps.event.removeListener(E),w(google.maps.event.addListener(y,"domready",u)))}),[u]),(0,r.useEffect)((()=>{y&&p&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(y,"content_changed",p)))}),[p]),(0,r.useEffect)((()=>{y&&c&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(y,"position_changed",c)))}),[c]),(0,r.useEffect)((()=>{y&&g&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(y,"zindex_changed",g)))}),[g]),(0,r.useEffect)((()=>{var e=new google.maps.InfoWindow(s);return b(e),D.current=document.createElement("div"),l&&C(google.maps.event.addListener(e,"closeclick",l)),u&&w(google.maps.event.addListener(e,"domready",u)),p&&x(google.maps.event.addListener(e,"content_changed",p)),c&&P(google.maps.event.addListener(e,"position_changed",c)),g&&S(google.maps.event.addListener(e,"zindex_changed",g)),e.setContent(D.current),o&&e.setPosition(o),i&&e.setZIndex(i),n?e.open(f,n):e.getPosition()?e.open(f):d(!1,"You must provide either an anchor (typically render it inside a ) or a position props for ."),m&&m(e),()=>{L&&google.maps.event.removeListener(L),M&&google.maps.event.removeListener(M),E&&google.maps.event.removeListener(E),k&&google.maps.event.removeListener(k),O&&google.maps.event.removeListener(O),v&&v(e),e.close()}}),[]),D.current?(0,a.createPortal)(r.Children.only(t),D.current):null}));class gt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",null),p(this,"state",{infoWindow:null}),p(this,"open",((e,t)=>{t?e.open(this.context,t):e.getPosition()?e.open(this.context):d(!1,"You must provide either an anchor (typically render it inside a ) or a position props for .")})),p(this,"setInfoWindowCallback",(()=>{null!==this.state.infoWindow&&null!==this.containerElement&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))}))}componentDidMount(){var e=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=y({updaterMap:ht,eventMap:dt,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({infoWindow:e})),this.setInfoWindowCallback)}componentDidUpdate(e){null!==this.state.infoWindow&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:ht,eventMap:dt,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){null!==this.state.infoWindow&&(f(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?(0,a.createPortal)(r.Children.only(this.props.children),this.containerElement):null}}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function vt(e){for(var t=1;t{null!==E&&E.setMap(C)}),[C]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==E&&E.setOptions(t)}),[E,t]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==E&&E.setDraggable(n)}),[E,n]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==E&&E.setEditable(s)}),[E,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==E&&E.setVisible(o)}),[E,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==E&&E.setPath(i)}),[E,i]),(0,r.useEffect)((()=>{E&&a&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(E,"dblclick",a)))}),[a]),(0,r.useEffect)((()=>{E&&l&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(E,"dragend",l)))}),[l]),(0,r.useEffect)((()=>{E&&u&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(E,"dragstart",u)))}),[u]),(0,r.useEffect)((()=>{E&&p&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(E,"mousedown",p)))}),[p]),(0,r.useEffect)((()=>{E&&c&&(null!==j&&google.maps.event.removeListener(j),B(google.maps.event.addListener(E,"mousemove",c)))}),[c]),(0,r.useEffect)((()=>{E&&d&&(null!==_&&google.maps.event.removeListener(_),R(google.maps.event.addListener(E,"mouseout",d)))}),[d]),(0,r.useEffect)((()=>{E&&g&&(null!==T&&google.maps.event.removeListener(T),U(google.maps.event.addListener(E,"mouseover",g)))}),[g]),(0,r.useEffect)((()=>{E&&m&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(E,"mouseup",m)))}),[m]),(0,r.useEffect)((()=>{E&&v&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(E,"rightclick",v)))}),[v]),(0,r.useEffect)((()=>{E&&f&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(E,"click",f)))}),[f]),(0,r.useEffect)((()=>{E&&y&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(E,"drag",y)))}),[y]),(0,r.useEffect)((()=>{var e=new google.maps.Polyline(vt(vt({},t||bt),{},{map:C}));return i&&e.setPath(i),"undefined"!==typeof o&&e.setVisible(o),"undefined"!==typeof s&&e.setEditable(s),"undefined"!==typeof n&&e.setDraggable(n),a&&x(google.maps.event.addListener(e,"dblclick",a)),l&&P(google.maps.event.addListener(e,"dragend",l)),u&&S(google.maps.event.addListener(e,"dragstart",u)),p&&I(google.maps.event.addListener(e,"mousedown",p)),c&&B(google.maps.event.addListener(e,"mousemove",c)),d&&R(google.maps.event.addListener(e,"mouseout",d)),g&&U(google.maps.event.addListener(e,"mouseover",g)),m&&A(google.maps.event.addListener(e,"mouseup",m)),v&&V(google.maps.event.addListener(e,"rightclick",v)),f&&N(google.maps.event.addListener(e,"click",f)),y&&F(google.maps.event.addListener(e,"drag",y)),w(e),b&&b(e),()=>{null!==M&&google.maps.event.removeListener(M),null!==k&&google.maps.event.removeListener(k),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==j&&google.maps.event.removeListener(j),null!==_&&google.maps.event.removeListener(_),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),L&&L(e),e.setMap(null)}}),[]),null}));class Lt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{polyline:null}),p(this,"setPolylineCallback",(()=>{null!==this.state.polyline&&this.props.onLoad&&this.props.onLoad(this.state.polyline)}))}componentDidMount(){var e=new google.maps.Polyline(vt(vt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:yt,eventMap:ft,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polyline:e}}),this.setPolylineCallback)}componentDidUpdate(e){null!==this.state.polyline&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:yt,eventMap:ft,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),f(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Et(e){for(var t=1;t{null!==M&&M.setMap(w)}),[w]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==M&&M.setOptions(t)}),[M,t]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==M&&M.setDraggable(n)}),[M,n]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==M&&M.setEditable(s)}),[M,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==M&&M.setVisible(o)}),[M,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==M&&M.setPath(i)}),[M,i]),(0,r.useEffect)((()=>{"undefined"!==typeof a&&null!==M&&M.setPaths(a)}),[M,a]),(0,r.useEffect)((()=>{M&&"function"===typeof l&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(M,"dblclick",l)))}),[l]),(0,r.useEffect)((()=>{M&&(google.maps.event.addListener(M.getPath(),"insert_at",(()=>{null===E||void 0===E||E(M)})),google.maps.event.addListener(M.getPath(),"set_at",(()=>{null===E||void 0===E||E(M)})),google.maps.event.addListener(M.getPath(),"remove_at",(()=>{null===E||void 0===E||E(M)})))}),[M,E]),(0,r.useEffect)((()=>{M&&"function"===typeof u&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(M,"dragend",u)))}),[u]),(0,r.useEffect)((()=>{M&&"function"===typeof p&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(M,"dragstart",p)))}),[p]),(0,r.useEffect)((()=>{M&&"function"===typeof c&&(null!==j&&google.maps.event.removeListener(j),B(google.maps.event.addListener(M,"mousedown",c)))}),[c]),(0,r.useEffect)((()=>{M&&"function"===typeof d&&(null!==_&&google.maps.event.removeListener(_),R(google.maps.event.addListener(M,"mousemove",d)))}),[d]),(0,r.useEffect)((()=>{M&&"function"===typeof g&&(null!==T&&google.maps.event.removeListener(T),U(google.maps.event.addListener(M,"mouseout",g)))}),[g]),(0,r.useEffect)((()=>{M&&"function"===typeof m&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(M,"mouseover",m)))}),[m]),(0,r.useEffect)((()=>{M&&"function"===typeof v&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(M,"mouseup",v)))}),[v]),(0,r.useEffect)((()=>{M&&"function"===typeof f&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(M,"rightclick",f)))}),[f]),(0,r.useEffect)((()=>{M&&"function"===typeof y&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(M,"click",y)))}),[y]),(0,r.useEffect)((()=>{M&&"function"===typeof b&&(null!==G&&google.maps.event.removeListener(G),K(google.maps.event.addListener(M,"drag",b)))}),[b]),(0,r.useEffect)((()=>{var e=new google.maps.Polygon(Et(Et({},t),{},{map:w}));return i&&e.setPath(i),a&&e.setPaths(a),"undefined"!==typeof o&&e.setVisible(o),"undefined"!==typeof s&&e.setEditable(s),"undefined"!==typeof n&&e.setDraggable(n),l&&P(google.maps.event.addListener(e,"dblclick",l)),u&&S(google.maps.event.addListener(e,"dragend",u)),p&&I(google.maps.event.addListener(e,"dragstart",p)),c&&B(google.maps.event.addListener(e,"mousedown",c)),d&&R(google.maps.event.addListener(e,"mousemove",d)),g&&U(google.maps.event.addListener(e,"mouseout",g)),m&&A(google.maps.event.addListener(e,"mouseover",m)),v&&V(google.maps.event.addListener(e,"mouseup",v)),f&&N(google.maps.event.addListener(e,"rightclick",f)),y&&F(google.maps.event.addListener(e,"click",y)),b&&K(google.maps.event.addListener(e,"drag",b)),x(e),L&&L(e),()=>{null!==k&&google.maps.event.removeListener(k),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==j&&google.maps.event.removeListener(j),null!==_&&google.maps.event.removeListener(_),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),null!==H&&google.maps.event.removeListener(H),C&&C(e),e.setMap(null)}}),[]),null}));class xt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[])}componentDidMount(){var e=this.props.options||{};this.polygon=new google.maps.Polygon(e),this.polygon.setMap(this.context),this.registeredEvents=y({updaterMap:Mt,eventMap:wt,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(e){this.polygon&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Mt,eventMap:wt,prevProps:e,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),f(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Pt(e){for(var t=1;t{null!==w&&w.setMap(E)}),[E]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==w&&w.setOptions(t)}),[w,t]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==w&&w.setDraggable(s)}),[w,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==w&&w.setEditable(o)}),[w,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==w&&w.setVisible(i)}),[w,i]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==w&&w.setBounds(n)}),[w,n]),(0,r.useEffect)((()=>{w&&a&&(null!==x&&google.maps.event.removeListener(x),k(google.maps.event.addListener(w,"dblclick",a)))}),[a]),(0,r.useEffect)((()=>{w&&l&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(w,"dragend",l)))}),[l]),(0,r.useEffect)((()=>{w&&u&&(null!==S&&google.maps.event.removeListener(S),D(google.maps.event.addListener(w,"dragstart",u)))}),[u]),(0,r.useEffect)((()=>{w&&p&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"mousedown",p)))}),[p]),(0,r.useEffect)((()=>{w&&c&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(w,"mousemove",c)))}),[c]),(0,r.useEffect)((()=>{w&&d&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(w,"mouseout",d)))}),[d]),(0,r.useEffect)((()=>{w&&g&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(w,"mouseover",g)))}),[g]),(0,r.useEffect)((()=>{w&&m&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(w,"mouseup",m)))}),[m]),(0,r.useEffect)((()=>{w&&v&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(w,"rightclick",v)))}),[v]),(0,r.useEffect)((()=>{w&&f&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(w,"click",f)))}),[f]),(0,r.useEffect)((()=>{w&&y&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(w,"drag",y)))}),[y]),(0,r.useEffect)((()=>{w&&b&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(w,"bounds_changed",b)))}),[b]),(0,r.useEffect)((()=>{var e=new google.maps.Rectangle(Pt(Pt({},t),{},{map:E}));return"undefined"!==typeof i&&e.setVisible(i),"undefined"!==typeof o&&e.setEditable(o),"undefined"!==typeof s&&e.setDraggable(s),"undefined"!==typeof n&&e.setBounds(n),a&&k(google.maps.event.addListener(e,"dblclick",a)),l&&O(google.maps.event.addListener(e,"dragend",l)),u&&D(google.maps.event.addListener(e,"dragstart",u)),p&&j(google.maps.event.addListener(e,"mousedown",p)),c&&_(google.maps.event.addListener(e,"mousemove",c)),d&&T(google.maps.event.addListener(e,"mouseout",d)),g&&z(google.maps.event.addListener(e,"mouseover",g)),m&&Z(google.maps.event.addListener(e,"mouseup",m)),v&&W(google.maps.event.addListener(e,"rightclick",v)),f&&H(google.maps.event.addListener(e,"click",f)),y&&G(google.maps.event.addListener(e,"drag",y)),b&&Y(google.maps.event.addListener(e,"bounds_changed",b)),M(e),L&&L(e),()=>{null!==x&&google.maps.event.removeListener(x),null!==P&&google.maps.event.removeListener(P),null!==S&&google.maps.event.removeListener(S),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),null!==U&&google.maps.event.removeListener(U),null!==A&&google.maps.event.removeListener(A),null!==V&&google.maps.event.removeListener(V),null!==N&&google.maps.event.removeListener(N),null!==F&&google.maps.event.removeListener(F),null!==K&&google.maps.event.removeListener(K),C&&C(e),e.setMap(null)}}),[]),null}));class Dt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{rectangle:null}),p(this,"setRectangleCallback",(()=>{null!==this.state.rectangle&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)}))}componentDidMount(){var e=new google.maps.Rectangle(Pt(Pt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:St,eventMap:Ot,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{rectangle:e}}),this.setRectangleCallback)}componentDidUpdate(e){null!==this.state.rectangle&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:St,eventMap:Ot,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),f(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function jt(e){for(var t=1;t{null!==x&&x.setMap(M)}),[M]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==x&&x.setOptions(t)}),[x,t]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==x&&x.setDraggable(o)}),[x,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==x&&x.setEditable(i)}),[x,i]),(0,r.useEffect)((()=>{"undefined"!==typeof a&&null!==x&&x.setVisible(a)}),[x,a]),(0,r.useEffect)((()=>{"number"===typeof s&&null!==x&&x.setRadius(s)}),[x,s]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==x&&x.setCenter(n)}),[x,n]),(0,r.useEffect)((()=>{x&&l&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(x,"dblclick",l)))}),[l]),(0,r.useEffect)((()=>{x&&u&&(null!==S&&google.maps.event.removeListener(S),D(google.maps.event.addListener(x,"dragend",u)))}),[u]),(0,r.useEffect)((()=>{x&&p&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(x,"dragstart",p)))}),[p]),(0,r.useEffect)((()=>{x&&c&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(x,"mousedown",c)))}),[c]),(0,r.useEffect)((()=>{x&&d&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(x,"mousemove",d)))}),[d]),(0,r.useEffect)((()=>{x&&g&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(x,"mouseout",g)))}),[g]),(0,r.useEffect)((()=>{x&&m&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(x,"mouseover",m)))}),[m]),(0,r.useEffect)((()=>{x&&v&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(x,"mouseup",v)))}),[v]),(0,r.useEffect)((()=>{x&&f&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(x,"rightclick",f)))}),[f]),(0,r.useEffect)((()=>{x&&y&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(x,"click",y)))}),[y]),(0,r.useEffect)((()=>{x&&b&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(x,"drag",b)))}),[b]),(0,r.useEffect)((()=>{x&&L&&(null!==q&&google.maps.event.removeListener(q),J(google.maps.event.addListener(x,"center_changed",L)))}),[y]),(0,r.useEffect)((()=>{x&&C&&(null!==X&&google.maps.event.removeListener(X),$(google.maps.event.addListener(x,"radius_changed",C)))}),[C]),(0,r.useEffect)((()=>{var e=new google.maps.Circle(jt(jt({},t||Rt),{},{map:M}));return"number"===typeof s&&e.setRadius(s),"undefined"!==typeof n&&e.setCenter(n),"number"===typeof s&&e.setRadius(s),"undefined"!==typeof a&&e.setVisible(a),"undefined"!==typeof i&&e.setEditable(i),"undefined"!==typeof o&&e.setDraggable(o),l&&O(google.maps.event.addListener(e,"dblclick",l)),u&&D(google.maps.event.addListener(e,"dragend",u)),p&&j(google.maps.event.addListener(e,"dragstart",p)),c&&_(google.maps.event.addListener(e,"mousedown",c)),d&&T(google.maps.event.addListener(e,"mousemove",d)),g&&z(google.maps.event.addListener(e,"mouseout",g)),m&&Z(google.maps.event.addListener(e,"mouseover",m)),v&&W(google.maps.event.addListener(e,"mouseup",v)),f&&H(google.maps.event.addListener(e,"rightclick",f)),y&&G(google.maps.event.addListener(e,"click",y)),b&&Y(google.maps.event.addListener(e,"drag",b)),L&&J(google.maps.event.addListener(e,"center_changed",L)),C&&$(google.maps.event.addListener(e,"radius_changed",C)),k(e),E&&E(e),()=>{null!==P&&google.maps.event.removeListener(P),null!==S&&google.maps.event.removeListener(S),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),null!==U&&google.maps.event.removeListener(U),null!==A&&google.maps.event.removeListener(A),null!==V&&google.maps.event.removeListener(V),null!==N&&google.maps.event.removeListener(N),null!==F&&google.maps.event.removeListener(F),null!==q&&google.maps.event.removeListener(q),null!==X&&google.maps.event.removeListener(X),w&&w(e),e.setMap(null)}}),[]),null}));class Tt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{circle:null}),p(this,"setCircleCallback",(()=>{null!==this.state.circle&&this.props.onLoad&&this.props.onLoad(this.state.circle)}))}componentDidMount(){var e=new google.maps.Circle(jt(jt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:_t,eventMap:Bt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{circle:e}}),this.setCircleCallback)}componentDidUpdate(e){null!==this.state.circle&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:_t,eventMap:Bt,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){var e;null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),f(this.registeredEvents),null===(e=this.state.circle)||void 0===e||e.setMap(null))}render(){return null}}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function zt(e){for(var t=1;t{null!==L&&L.setMap(b)}),[b]),(0,r.useEffect)((()=>{L&&s&&(null!==E&&google.maps.event.removeListener(E),w(google.maps.event.addListener(L,"dblclick",s)))}),[s]),(0,r.useEffect)((()=>{L&&o&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(L,"mousedown",o)))}),[o]),(0,r.useEffect)((()=>{L&&i&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(L,"mousemove",i)))}),[i]),(0,r.useEffect)((()=>{L&&a&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(L,"mouseout",a)))}),[a]),(0,r.useEffect)((()=>{L&&l&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(L,"mouseover",l)))}),[l]),(0,r.useEffect)((()=>{L&&u&&(null!==j&&google.maps.event.removeListener(j),B(google.maps.event.addListener(L,"mouseup",u)))}),[u]),(0,r.useEffect)((()=>{L&&p&&(null!==_&&google.maps.event.removeListener(_),R(google.maps.event.addListener(L,"rightclick",p)))}),[p]),(0,r.useEffect)((()=>{L&&n&&(null!==T&&google.maps.event.removeListener(T),U(google.maps.event.addListener(L,"click",n)))}),[n]),(0,r.useEffect)((()=>{L&&c&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(L,"addfeature",c)))}),[c]),(0,r.useEffect)((()=>{L&&d&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(L,"removefeature",d)))}),[d]),(0,r.useEffect)((()=>{L&&g&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(L,"removeproperty",g)))}),[g]),(0,r.useEffect)((()=>{L&&m&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(L,"setgeometry",m)))}),[m]),(0,r.useEffect)((()=>{L&&v&&(null!==G&&google.maps.event.removeListener(G),K(google.maps.event.addListener(L,"setproperty",v)))}),[v]),(0,r.useEffect)((()=>{if(null!==b){var e=new google.maps.Data(zt(zt({},t),{},{map:b}));s&&w(google.maps.event.addListener(e,"dblclick",s)),o&&x(google.maps.event.addListener(e,"mousedown",o)),i&&P(google.maps.event.addListener(e,"mousemove",i)),a&&S(google.maps.event.addListener(e,"mouseout",a)),l&&I(google.maps.event.addListener(e,"mouseover",l)),u&&B(google.maps.event.addListener(e,"mouseup",u)),p&&R(google.maps.event.addListener(e,"rightclick",p)),n&&U(google.maps.event.addListener(e,"click",n)),c&&A(google.maps.event.addListener(e,"addfeature",c)),d&&V(google.maps.event.addListener(e,"removefeature",d)),g&&N(google.maps.event.addListener(e,"removeproperty",g)),m&&F(google.maps.event.addListener(e,"setgeometry",m)),v&&K(google.maps.event.addListener(e,"setproperty",v)),C(e),f&&f(e)}return()=>{L&&(null!==E&&google.maps.event.removeListener(E),null!==M&&google.maps.event.removeListener(M),null!==k&&google.maps.event.removeListener(k),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==j&&google.maps.event.removeListener(j),null!==_&&google.maps.event.removeListener(_),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),null!==H&&google.maps.event.removeListener(H),null!==G&&google.maps.event.removeListener(G),y&&y(L),L.setMap(null))}}),[]),null}));class Vt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{data:null}),p(this,"setDataCallback",(()=>{null!==this.state.data&&this.props.onLoad&&this.props.onLoad(this.state.data)}))}componentDidMount(){if(null!==this.context){var e=new google.maps.Data(zt(zt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:Zt,eventMap:At,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({data:e})),this.setDataCallback)}}componentDidUpdate(e){null!==this.state.data&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Zt,eventMap:At,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),f(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Nt(e){for(var t=1;t{null!==this.state.kmlLayer&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)}))}componentDidMount(){var e=new google.maps.KmlLayer(Nt(Nt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:Ft,eventMap:Ht,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{kmlLayer:e}}),this.setKmlLayerCallback)}componentDidUpdate(e){null!==this.state.kmlLayer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Ft,eventMap:Ht,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),f(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}function Kt(e,t){return"function"===typeof t?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function Yt(e,t){return new t(e.lat,e.lng)}function qt(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function Jt(e,t,n,s){return void 0!==n?function(e,t,n){var s=e&&e.fromLatLngToDivPixel(n.getNorthEast()),o=e&&e.fromLatLngToDivPixel(n.getSouthWest());return s&&o?{left:"".concat(o.x+t.x,"px"),top:"".concat(s.y+t.y,"px"),width:"".concat(s.x-o.x-t.x,"px"),height:"".concat(o.y-s.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}(e,t,(o=n,i=google.maps.LatLngBounds,r=qt,o instanceof i?o:r(o,i))):function(e,t,n){var s=e&&e.fromLatLngToDivPixel(n);if(s){var{x:o,y:i}=s;return{left:"".concat(o+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}(e,t,function(e,t,n){return e instanceof t?e:n(e,t)}(s,google.maps.LatLng,Yt));var o,i,r}function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function $t(e,t,n,s,o){class i extends google.maps.OverlayView{constructor(e,t,n,s){super(),this.container=e,this.pane=t,this.position=n,this.bounds=s}onAdd(){var e,t=null===(e=this.getPanes())||void 0===e?void 0:e[this.pane];null===t||void 0===t||t.appendChild(this.container)}draw(){var e=this.getProjection(),t=function(e){for(var t=1;t{var e=document.createElement("div");return e.style.position="absolute",e}),[]),g=(0,r.useMemo)((()=>$t(d,s,t,n,u)),[d,s,t,n]);return(0,r.useEffect)((()=>(null===i||void 0===i||i(g),null===g||void 0===g||g.setMap(c),()=>{null===l||void 0===l||l(g),null===g||void 0===g||g.setMap(null)})),[c,g]),(0,r.useEffect)((()=>{d.style.zIndex="".concat(o)}),[o,d]),a.createPortal(p,d)}));class nn extends r.PureComponent{constructor(e){super(e),p(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),p(this,"updatePane",(()=>{var e=this.props.mapPaneName,t=this.overlayView.getPanes();d(!!e,"OverlayView requires props.mapPaneName but got %s",e),t?this.setState({paneEl:t[e]}):this.setState({paneEl:null})})),p(this,"onAdd",(()=>{var e,t;this.updatePane(),null===(e=(t=this.props).onLoad)||void 0===e||e.call(t,this.overlayView)})),p(this,"onPositionElement",(()=>{var e,t,n,s,o,i,r=this.overlayView.getProjection(),a=function(e){for(var t=1;t{this.onPositionElement()})),p(this,"onRemove",(()=>{var e,t;this.setState((()=>({paneEl:null}))),null===(e=(t=this.props).onUnmount)||void 0===e||e.call(t,this.overlayView)})),this.containerRef=(0,r.createRef)();var t=new google.maps.OverlayView;t.onAdd=this.onAdd,t.draw=this.draw,t.onRemove=this.onRemove,this.overlayView=t}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){var t=en(e.position),n=en(this.props.position),s=tn(e.bounds),o=tn(this.props.bounds);t===n&&s===o||this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var e=this.state.paneEl;return e?a.createPortal((0,i.jsx)("div",{ref:this.containerRef,style:this.state.containerStyle,children:r.Children.only(this.props.children)}),e):null}}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function on(e){for(var t=1;tnew google.maps.GroundOverlay(t,a,s)),[]);return(0,r.useEffect)((()=>{null!==l&&l.setMap(i)}),[i]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==l&&(l.set("url",t),l.setMap(i))}),[l,t]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==l&&l.setOpacity(o?1:0)}),[l,o]),(0,r.useEffect)((()=>{var e=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));"undefined"!==typeof n&&null!==l&&(l.set("bounds",e),l.setMap(i))}),[l,n]),null}));class ln extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{groundOverlay:null}),p(this,"setGroundOverlayCallback",(()=>{null!==this.state.groundOverlay&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)}))}componentDidMount(){d(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,on(on({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:an,eventMap:rn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{groundOverlay:e}}),this.setGroundOverlayCallback)}componentDidUpdate(e){null!==this.state.groundOverlay&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:an,eventMap:rn,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function pn(e){for(var t=1;t{google.maps.visualization||d(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)}),[]),(0,r.useEffect)((()=>{d(!!t,"data property is required in HeatmapLayer %s",t)}),[t]),(0,r.useEffect)((()=>{null!==a&&a.setMap(i)}),[i]),(0,r.useEffect)((()=>{o&&null!==a&&a.setOptions(o)}),[a,o]),(0,r.useEffect)((()=>{var e=new google.maps.visualization.HeatmapLayer(pn(pn({},o),{},{data:t,map:i}));return l(e),n&&n(e),()=>{null!==a&&(s&&s(a),a.setMap(null))}}),[]),null}));class hn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{heatmapLayer:null}),p(this,"setHeatmapLayerCallback",(()=>{null!==this.state.heatmapLayer&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)}))}componentDidMount(){d(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to ? %s',google.maps.visualization),d(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var e=new google.maps.visualization.HeatmapLayer(pn(pn({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=y({updaterMap:dn,eventMap:cn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{heatmapLayer:e}}),this.setHeatmapLayerCallback)}componentDidUpdate(e){f(this.registeredEvents),this.registeredEvents=y({updaterMap:dn,eventMap:cn,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),f(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}p(hn,"contextType",h);var gn={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},mn={register(e,t,n){e.registerPanoProvider(t,n)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class vn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{streetViewPanorama:null}),p(this,"setStreetViewPanoramaCallback",(()=>{null!==this.state.streetViewPanorama&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)}))}componentDidMount(){var e,t,n=null!==(e=null===(t=this.context)||void 0===t?void 0:t.getStreetView())&&void 0!==e?e:null;this.registeredEvents=y({updaterMap:mn,eventMap:gn,prevProps:{},nextProps:this.props,instance:n}),this.setState((()=>({streetViewPanorama:n})),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){null!==this.state.streetViewPanorama&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:mn,eventMap:gn,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),f(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}p(vn,"contextType",h);class fn extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{streetViewService:null}),p(this,"setStreetViewServiceCallback",(()=>{null!==this.state.streetViewService&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)}))}componentDidMount(){var e=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:e}}),this.setStreetViewServiceCallback)}componentWillUnmount(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}p(fn,"contextType",h);r.PureComponent;var yn={onDirectionsChanged:"directions_changed"},bn={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class Ln extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{directionsRenderer:null}),p(this,"setDirectionsRendererCallback",(()=>{null!==this.state.directionsRenderer&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))}))}componentDidMount(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=y({updaterMap:bn,eventMap:yn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{directionsRenderer:e}}),this.setDirectionsRendererCallback)}componentDidUpdate(e){null!==this.state.directionsRenderer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:bn,eventMap:yn,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),f(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}p(Ln,"contextType",h);r.PureComponent;var Cn={onPlacesChanged:"places_changed"},En={bounds(e,t){e.setBounds(t)}};class wn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",(0,r.createRef)()),p(this,"state",{searchBox:null}),p(this,"setSearchBoxCallback",(()=>{null!==this.state.searchBox&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)}))}componentDidMount(){if(d(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(null!==e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=y({updaterMap:En,eventMap:Cn,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{searchBox:t}}),this.setSearchBoxCallback)}}}componentDidUpdate(e){null!==this.state.searchBox&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:En,eventMap:Cn,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),f(this.registeredEvents))}render(){return(0,i.jsx)("div",{ref:this.containerElement,children:r.Children.only(this.props.children)})}}p(wn,"contextType",h);var Mn={onPlaceChanged:"place_changed"},xn={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class kn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",(0,r.createRef)()),p(this,"state",{autocomplete:null}),p(this,"setAutocompleteCallback",(()=>{null!==this.state.autocomplete&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)}))}componentDidMount(){var e;d(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places);var t=null===(e=this.containerElement.current)||void 0===e?void 0:e.querySelector("input");if(t){var n=new google.maps.places.Autocomplete(t,this.props.options);this.registeredEvents=y({updaterMap:xn,eventMap:Mn,prevProps:{},nextProps:this.props,instance:n}),this.setState((()=>({autocomplete:n})),this.setAutocompleteCallback)}}componentDidUpdate(e){f(this.registeredEvents),this.registeredEvents=y({updaterMap:xn,eventMap:Mn,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){null!==this.state.autocomplete&&f(this.registeredEvents)}render(){return(0,i.jsx)("div",{ref:this.containerElement,className:this.props.className,children:r.Children.only(this.props.children)})}}p(kn,"defaultProps",{className:""}),p(kn,"contextType",h)},36150:(e,t,n)=>{n.d(t,{I:()=>i});var s=n(69347),o=n(1729);function i(e,t){return(0,o.t)(e,s.$,t)}}}]); \ No newline at end of file diff --git a/build/static/js/523.8639a532.chunk.js.LICENSE.txt b/build/static/js/5116.88b8f8cf.chunk.js.LICENSE.txt similarity index 100% rename from build/static/js/523.8639a532.chunk.js.LICENSE.txt rename to build/static/js/5116.88b8f8cf.chunk.js.LICENSE.txt diff --git a/build/static/js/523.8639a532.chunk.js b/build/static/js/523.8639a532.chunk.js deleted file mode 100644 index 36f045b..0000000 --- a/build/static/js/523.8639a532.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 523.8639a532.chunk.js.LICENSE.txt */ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[523],{10523:(e,t,n)=>{n.d(t,{BH:()=>U,Fu:()=>gt,KD:()=>G,Ro:()=>Lt,i3:()=>nn,pH:()=>pe,u6:()=>C});var s,o,i=n(44414),r=n(9950),a=n(17119);function l(e){return l="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},l(e)}function u(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=l(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}function p(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d=c(o?s:(o=1,s=function(e,t,n,s,o,i,r,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,s,o,i,r,a],p=0;(l=new Error(t.replace(/%s/g,(function(){return u[p++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}})),h=(0,r.createContext)(null);function g(e,t,n,s){var o,i,r={};return o=e,i=(e,o)=>{var i=n[o];i!==t[o]&&(r[o]=i,e(s,i))},Object.keys(o).forEach((e=>i(o[e],e))),r}function m(e,t,n){var s,o,i,r=(s=n,o=function(n,s,o){return"function"===typeof e[o]&&n.push(google.maps.event.addListener(t,s,e[o])),n},i=[],Object.keys(s).reduce((function(e,t){return o(e,s[t],t)}),i));return r}function v(e){google.maps.event.removeListener(e)}function f(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(v)}function y(e){var{updaterMap:t,eventMap:n,prevProps:s,nextProps:o,instance:i}=e,r=m(o,i,n);return g(t,s,o,i),r}var b={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},L={extraMapTypes(e,t){t.forEach((function(t,n){e.mapTypes.set(String(n),t)}))},center(e,t){e.setCenter(t)},clickableIcons(e,t){e.setClickableIcons(t)},heading(e,t){e.setHeading(t)},mapTypeId(e,t){e.setMapTypeId(t)},options(e,t){e.setOptions(t)},streetView(e,t){e.setStreetView(t)},tilt(e,t){e.setTilt(t)},zoom(e,t){e.setZoom(t)}};(0,r.memo)((function(e){var{children:t,options:n,id:s,mapContainerStyle:o,mapContainerClassName:a,center:l,onClick:u,onDblClick:p,onDrag:c,onDragEnd:d,onDragStart:g,onMouseMove:m,onMouseOut:v,onMouseOver:f,onMouseDown:y,onMouseUp:b,onRightClick:L,onCenterChanged:C,onLoad:E,onUnmount:w}=e,[M,x]=(0,r.useState)(null),k=(0,r.useRef)(null),[P,O]=(0,r.useState)(null),[S,D]=(0,r.useState)(null),[I,j]=(0,r.useState)(null),[B,_]=(0,r.useState)(null),[R,T]=(0,r.useState)(null),[U,z]=(0,r.useState)(null),[A,Z]=(0,r.useState)(null),[V,W]=(0,r.useState)(null),[N,H]=(0,r.useState)(null),[F,G]=(0,r.useState)(null),[K,Y]=(0,r.useState)(null),[q,J]=(0,r.useState)(null);return(0,r.useEffect)((()=>{n&&null!==M&&M.setOptions(n)}),[M,n]),(0,r.useEffect)((()=>{null!==M&&"undefined"!==typeof l&&M.setCenter(l)}),[M,l]),(0,r.useEffect)((()=>{M&&p&&(null!==S&&google.maps.event.removeListener(S),D(google.maps.event.addListener(M,"dblclick",p)))}),[p]),(0,r.useEffect)((()=>{M&&d&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(M,"dragend",d)))}),[d]),(0,r.useEffect)((()=>{M&&g&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(M,"dragstart",g)))}),[g]),(0,r.useEffect)((()=>{M&&y&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(M,"mousedown",y)))}),[y]),(0,r.useEffect)((()=>{M&&m&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(M,"mousemove",m)))}),[m]),(0,r.useEffect)((()=>{M&&v&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(M,"mouseout",v)))}),[v]),(0,r.useEffect)((()=>{M&&f&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(M,"mouseover",f)))}),[f]),(0,r.useEffect)((()=>{M&&b&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(M,"mouseup",b)))}),[b]),(0,r.useEffect)((()=>{M&&L&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(M,"rightclick",L)))}),[L]),(0,r.useEffect)((()=>{M&&u&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(M,"click",u)))}),[u]),(0,r.useEffect)((()=>{M&&c&&(null!==q&&google.maps.event.removeListener(q),J(google.maps.event.addListener(M,"drag",c)))}),[c]),(0,r.useEffect)((()=>{M&&C&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(M,"center_changed",C)))}),[u]),(0,r.useEffect)((()=>{var e=null===k.current?null:new google.maps.Map(k.current,n);return x(e),null!==e&&E&&E(e),()=>{null!==e&&w&&w(e)}}),[]),(0,i.jsx)("div",{id:s,ref:k,style:o,className:a,children:(0,i.jsx)(h.Provider,{value:M,children:null!==M?t:null})})}));class C extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{map:null}),p(this,"registeredEvents",[]),p(this,"mapRef",null),p(this,"getInstance",(()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options))),p(this,"panTo",(e=>{var t=this.getInstance();t&&t.panTo(e)})),p(this,"setMapCallback",(()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)})),p(this,"getRef",(e=>{this.mapRef=e}))}componentDidMount(){var e=this.getInstance();this.registeredEvents=y({updaterMap:L,eventMap:b,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)}componentDidUpdate(e){null!==this.state.map&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:L,eventMap:b,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),f(this.registeredEvents))}render(){return(0,i.jsx)("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:(0,i.jsx)(h.Provider,{value:this.state.map,children:null!==this.state.map?this.props.children:null})})}}function E(e,t,n,s,o,i,r){try{var a=e[i](r),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(s,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(s,o){var i=e.apply(t,n);function r(e){E(i,s,o,r,a,"next",e)}function a(e){E(i,s,o,r,a,"throw",e)}r(void 0)}))}}function M(e){var{googleMapsApiKey:t,googleMapsClientId:n,version:s="weekly",language:o,region:i,libraries:r,channel:a,mapIds:l,authReferrerPolicy:u,apiUrl:p="https://maps.googleapis.com"}=e,c=[];return d(t&&n||!(t&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),t?c.push("key=".concat(t)):n&&c.push("client=".concat(n)),s&&c.push("v=".concat(s)),o&&c.push("language=".concat(o)),i&&c.push("region=".concat(i)),r&&r.length&&c.push("libraries=".concat(r.sort().join(","))),a&&c.push("channel=".concat(a)),l&&l.length&&c.push("map_ids=".concat(l.join(","))),u&&c.push("auth_referrer_policy=".concat(u)),c.push("loading=async"),c.push("callback=initMap"),"".concat(p,"/maps/api/js?").concat(c.join("&"))}var x="undefined"!==typeof document;function k(e){var{url:t,id:n,nonce:s}=e;return x?new Promise((function(e,o){var i=document.getElementById(n),r=window;if(i){var a=i.getAttribute("data-state");if(i.src===t&&"error"!==a){if("ready"===a)return e(n);var l=r.initMap,u=i.onerror;return r.initMap=function(){l&&l(),e(n)},void(i.onerror=function(e){u&&u(e),o(e)})}i.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=t,p.id=n,p.async=!0,p.nonce=s||"",p.onerror=function(e){p.setAttribute("data-state","error"),o(e)},r.initMap=function(){p.setAttribute("data-state","ready"),e(n)},document.head.appendChild(p)})).catch((e=>{throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))}function P(e){var t=e.href;return!(!t||0!==t.indexOf("https://fonts.googleapis.com/css?family=Roboto")&&0!==t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text"))||("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",!0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",!0):"style"===e.tagName.toLowerCase()&&!e.styleSheet&&!e.innerHTML)}function O(){var e=document.getElementsByTagName("head")[0];if(e){var t=e.insertBefore.bind(e);e.insertBefore=function(n,s){return P(n)||Reflect.apply(t,e,[n,s]),n};var n=e.appendChild.bind(e);e.appendChild=function(t){return P(t)||Reflect.apply(n,e,[t]),t}}}var S=!1;function D(){return(0,i.jsx)("div",{children:"Loading..."})}var I,j={id:"script-loader",version:"weekly"};class B extends r.PureComponent{constructor(){super(...arguments),p(this,"check",null),p(this,"state",{loaded:!1}),p(this,"cleanupCallback",(()=>{delete window.google.maps,this.injectScript()})),p(this,"isCleaningUp",w((function*(){return new Promise((function(e){if(S){if(x)var t=window.setInterval((function(){S||(window.clearInterval(t),e())}),1)}else e()}))}))),p(this,"cleanup",(()=>{S=!0;var e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"===typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))})),p(this,"injectScript",(()=>{this.props.preventGoogleFontsLoading&&O(),d(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id),k({id:this.props.id,nonce:this.props.nonce,url:M(this.props)}).then((()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))})).catch((e=>{this.props.onError&&this.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",") to \n Otherwise it is a Network issue.\n "))}))})),p(this,"getRef",(e=>{this.check=e}))}componentDidMount(){if(x){if(window.google&&window.google.maps&&!S)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}}componentDidUpdate(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),x&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(x){this.cleanup();window.setTimeout((()=>{this.check||(delete window.google,S=!1)}),1),this.props.onUnmount&&this.props.onUnmount()}}render(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:this.getRef}),this.state.loaded?this.props.children:this.props.loadingElement||(0,i.jsx)(D,{})]})}}function _(e,t){if(null==e)return{};var n,s,o=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.includes(s))continue;n[s]=e[s]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s{v.current=!1}}),[]),(0,r.useEffect)((function(){x&&p&&O()}),[p]),(0,r.useEffect)((function(){f&&d(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[f]);var C=M({version:n,googleMapsApiKey:o,googleMapsClientId:i,language:a,region:l,libraries:u,channel:c,mapIds:h,authReferrerPolicy:g,apiUrl:m});(0,r.useEffect)((function(){function e(){v.current&&(y(!0),I=C)}x&&(window.google&&window.google.maps&&I===C?e():k({id:t,url:C,nonce:s}).then(e).catch((function(e){v.current&&L(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(o||"-",") or Client ID (").concat(i||"-",")\n Otherwise it is a Network issue.\n ")),console.error(e)})))}),[t,C,s]);var E=(0,r.useRef)(void 0);return(0,r.useEffect)((function(){E.current&&u!==E.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),E.current=u}),[u]),{isLoaded:f,loadError:b,url:C}}(a);return(0,r.useEffect)((function(){l&&"function"===typeof n&&n()}),[l,n]),(0,r.useEffect)((function(){u&&"function"===typeof s&&s(u)}),[u,s]),(0,r.useEffect)((function(){return()=>{o&&o()}}),[o]),l?i:t||T}));function z(e,t,n,s){return new(n||(n=Promise))((function(t,o){function i(e){try{a(s.next(e))}catch(t){o(t)}}function r(e){try{a(s.throw(e))}catch(t){o(t)}}function a(e){var s;e.done?t(e.value):(s=e.value,s instanceof n?s:new n((function(e){e(s)}))).then(i,r)}a((s=s.apply(e,[])).next())}))}function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"===typeof SuppressedError&&SuppressedError;var Z,V=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,o,i;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(o=s;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=s;0!==o--;){var r=i[o];if(!e(t[r],n[r]))return!1}return!0}return t!==t&&n!==n},W=A(V),N="__googleMapsScriptId";!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(Z||(Z={}));class H{constructor(e){var{apiKey:t,authReferrerPolicy:n,channel:s,client:o,id:i=N,language:r,libraries:a=[],mapIds:l,nonce:u,region:p,retries:c=3,url:d="https://maps.googleapis.com/maps/api/js",version:h}=e;if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=n,this.channel=s,this.client=o,this.id=i||N,this.language=r,this.libraries=a,this.mapIds=l,this.nonce=u,this.region=p,this.retries=c,this.url=d,this.version=h,H.instance){if(!W(this.options,H.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(H.instance.options)));return H.instance}H.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Z.FAILURE:this.done?Z.SUCCESS:this.loading?Z.LOADING:Z.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){var e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="®ion=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(e+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),e}deleteScript(){var e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))this.callback();else{var n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((e=>!n[e]&&delete n[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{var t,n,s,o="The Google Maps JavaScript API",i="google",r="importLibrary",a="__ib__",l=document,u=window,p=(u=u[i]||(u[i]={})).maps||(u.maps={}),c=new Set,d=new URLSearchParams,h=()=>t||(t=new Promise(((r,u)=>z(this,0,void 0,(function*(){var h;for(s in yield n=l.createElement("script"),n.id=this.id,d.set("libraries",[...c]+""),e)d.set(s.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[s]);d.set("callback",i+".maps."+a),n.src=this.url+"?"+d,p[a]=r,n.onerror=()=>t=u(Error(o+" could not load.")),n.nonce=this.nonce||(null===(h=l.querySelector("script[nonce]"))||void 0===h?void 0:h.nonce)||"",l.head.append(n)})))));p[r]?console.warn(o+" only loads once. Ignoring:",e):p[r]=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;sp[r](e,...n)))}})(n);var s=this.libraries.map((e=>this.importLibrary(e)));s.length||s.push(this.importLibrary("core")),Promise.all(s).then((()=>this.callback()),(e=>{var t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){var t=this.errors.length*Math.pow(2,this.errors.length);console.error("Failed to load Google Maps script, retrying in ".concat(t," ms.")),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}var F=["maps"];function G(e){var{id:t=j.id,version:n=j.version,nonce:s,googleMapsApiKey:o,language:i,region:a,libraries:l=F,preventGoogleFontsLoading:u,mapIds:p,authReferrerPolicy:c}=e,d=(0,r.useRef)(!1),[h,g]=(0,r.useState)(!1),[m,v]=(0,r.useState)(void 0);(0,r.useEffect)((function(){return d.current=!0,()=>{d.current=!1}}),[]);var f=(0,r.useMemo)((()=>new H({id:t,apiKey:o,version:n,libraries:l,language:i||"en",region:a||"US",mapIds:p||[],nonce:s||"",authReferrerPolicy:c||"origin"})),[t,o,n,l,i,a,p,s,c]);(0,r.useEffect)((function(){h||f.load().then((()=>{d.current&&g(!0)})).catch((e=>{v(e)}))}),[]),(0,r.useEffect)((()=>{x&&u&&O()}),[u]);var y=(0,r.useRef)();return(0,r.useEffect)((()=>{y.current&&l!==y.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),y.current=l}),[l]),{isLoaded:h,loadError:m}}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Y(e){for(var t=1;t{null!==i&&i.setMap(o)}),[o]),(0,r.useEffect)((()=>{t&&null!==i&&i.setOptions(t)}),[i,t]),(0,r.useEffect)((()=>{var e=new google.maps.TrafficLayer(Y(Y({},t),{},{map:o}));return a(e),n&&n(e),()=>{null!==i&&(s&&s(i),i.setMap(null))}}),[]),null}));class X extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{trafficLayer:null}),p(this,"setTrafficLayerCallback",(()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)})),p(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(Y(Y({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:J,eventMap:q,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)}componentDidUpdate(e){null!==this.state.trafficLayer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:J,eventMap:q,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),f(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}p(X,"contextType",h);(0,r.memo)((function(e){var{onLoad:t,onUnmount:n}=e,s=(0,r.useContext)(h),[o,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{null!==o&&o.setMap(s)}),[s]),(0,r.useEffect)((()=>{var e=new google.maps.BicyclingLayer;return i(e),e.setMap(s),t&&t(e),()=>{null!==e&&(n&&n(e),e.setMap(null))}}),[]),null}));class $ extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{bicyclingLayer:null}),p(this,"setBicyclingLayerCallback",(()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}))}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState((()=>({bicyclingLayer:e})),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}p($,"contextType",h);(0,r.memo)((function(e){var{onLoad:t,onUnmount:n}=e,s=(0,r.useContext)(h),[o,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{null!==o&&o.setMap(s)}),[s]),(0,r.useEffect)((()=>{var e=new google.maps.TransitLayer;return i(e),e.setMap(s),t&&t(e),()=>{null!==o&&(n&&n(o),o.setMap(null))}}),[]),null}));class Q extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{transitLayer:null}),p(this,"setTransitLayerCallback",(()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}))}componentDidMount(){var e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function te(e){for(var t=1;t{null!==m&&m.setMap(g)}),[g]),(0,r.useEffect)((()=>{t&&null!==m&&m.setOptions(t)}),[m,t]),(0,r.useEffect)((()=>{null!==m&&m.setDrawingMode(null!==n&&void 0!==n?n:null)}),[m,n]),(0,r.useEffect)((()=>{m&&s&&(null!==f&&google.maps.event.removeListener(f),y(google.maps.event.addListener(m,"circlecomplete",s)))}),[m,s]),(0,r.useEffect)((()=>{m&&o&&(null!==b&&google.maps.event.removeListener(b),L(google.maps.event.addListener(m,"markercomplete",o)))}),[m,o]),(0,r.useEffect)((()=>{m&&i&&(null!==C&&google.maps.event.removeListener(C),E(google.maps.event.addListener(m,"overlaycomplete",i)))}),[m,i]),(0,r.useEffect)((()=>{m&&a&&(null!==w&&google.maps.event.removeListener(w),M(google.maps.event.addListener(m,"polygoncomplete",a)))}),[m,a]),(0,r.useEffect)((()=>{m&&l&&(null!==x&&google.maps.event.removeListener(x),k(google.maps.event.addListener(m,"polylinecomplete",l)))}),[m,l]),(0,r.useEffect)((()=>{m&&u&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(m,"rectanglecomplete",u)))}),[m,u]),(0,r.useEffect)((()=>{d(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var e=new google.maps.drawing.DrawingManager(te(te({},t),{},{map:g}));return n&&e.setDrawingMode(n),s&&y(google.maps.event.addListener(e,"circlecomplete",s)),o&&L(google.maps.event.addListener(e,"markercomplete",o)),i&&E(google.maps.event.addListener(e,"overlaycomplete",i)),a&&M(google.maps.event.addListener(e,"polygoncomplete",a)),l&&k(google.maps.event.addListener(e,"polylinecomplete",l)),u&&O(google.maps.event.addListener(e,"rectanglecomplete",u)),v(e),p&&p(e),()=>{null!==m&&(f&&google.maps.event.removeListener(f),b&&google.maps.event.removeListener(b),C&&google.maps.event.removeListener(C),w&&google.maps.event.removeListener(w),x&&google.maps.event.removeListener(x),P&&google.maps.event.removeListener(P),c&&c(m),m.setMap(null))}}),[]),null}));class oe extends r.PureComponent{constructor(e){super(e),p(this,"registeredEvents",[]),p(this,"state",{drawingManager:null}),p(this,"setDrawingManagerCallback",(()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)})),d(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(te(te({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:se,eventMap:ne,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)}componentDidUpdate(e){null!==this.state.drawingManager&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:se,eventMap:ne,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),f(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function re(e){for(var t=1;t{null!==H&&H.setMap(N)}),[N]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==H&&H.setOptions(n)}),[H,n]),(0,r.useEffect)((()=>{"undefined"!==typeof l&&null!==H&&H.setDraggable(l)}),[H,l]),(0,r.useEffect)((()=>{t&&null!==H&&H.setPosition(t)}),[H,t]),(0,r.useEffect)((()=>{"undefined"!==typeof u&&null!==H&&H.setVisible(u)}),[H,u]),(0,r.useEffect)((()=>{null===H||void 0===H||H.setAnimation(p)}),[H,p]),(0,r.useEffect)((()=>{H&&void 0!==c&&H.setClickable(c)}),[H,c]),(0,r.useEffect)((()=>{H&&void 0!==d&&H.setCursor(d)}),[H,d]),(0,r.useEffect)((()=>{H&&void 0!==g&&H.setIcon(g)}),[H,g]),(0,r.useEffect)((()=>{H&&void 0!==m&&H.setLabel(m)}),[H,m]),(0,r.useEffect)((()=>{H&&void 0!==v&&H.setOpacity(v)}),[H,v]),(0,r.useEffect)((()=>{H&&void 0!==f&&H.setShape(f)}),[H,f]),(0,r.useEffect)((()=>{H&&void 0!==y&&H.setTitle(y)}),[H,y]),(0,r.useEffect)((()=>{H&&void 0!==b&&H.setZIndex(b)}),[H,b]),(0,r.useEffect)((()=>{H&&C&&(null!==G&&google.maps.event.removeListener(G),K(google.maps.event.addListener(H,"dblclick",C)))}),[C]),(0,r.useEffect)((()=>{H&&w&&(null!==Y&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(H,"dragend",w)))}),[w]),(0,r.useEffect)((()=>{H&&M&&(null!==J&&google.maps.event.removeListener(J),X(google.maps.event.addListener(H,"dragstart",M)))}),[M]),(0,r.useEffect)((()=>{H&&O&&(null!==$&&google.maps.event.removeListener($),Q(google.maps.event.addListener(H,"mousedown",O)))}),[O]),(0,r.useEffect)((()=>{H&&x&&(null!==ee&&google.maps.event.removeListener(ee),te(google.maps.event.addListener(H,"mouseout",x)))}),[x]),(0,r.useEffect)((()=>{H&&k&&(null!==ne&&google.maps.event.removeListener(ne),se(google.maps.event.addListener(H,"mouseover",k)))}),[k]),(0,r.useEffect)((()=>{H&&P&&(null!==oe&&google.maps.event.removeListener(oe),ie(google.maps.event.addListener(H,"mouseup",P)))}),[P]),(0,r.useEffect)((()=>{H&&S&&(null!==ae&&google.maps.event.removeListener(ae),le(google.maps.event.addListener(H,"rightclick",S)))}),[S]),(0,r.useEffect)((()=>{H&&L&&(null!==pe&&google.maps.event.removeListener(pe),ce(google.maps.event.addListener(H,"click",L)))}),[L]),(0,r.useEffect)((()=>{H&&E&&(null!==de&&google.maps.event.removeListener(de),he(google.maps.event.addListener(H,"drag",E)))}),[E]),(0,r.useEffect)((()=>{H&&D&&(null!==ge&&google.maps.event.removeListener(ge),me(google.maps.event.addListener(H,"clickable_changed",D)))}),[D]),(0,r.useEffect)((()=>{H&&I&&(null!==ve&&google.maps.event.removeListener(ve),fe(google.maps.event.addListener(H,"cursor_changed",I)))}),[I]),(0,r.useEffect)((()=>{H&&j&&(null!==ye&&google.maps.event.removeListener(ye),be(google.maps.event.addListener(H,"animation_changed",j)))}),[j]),(0,r.useEffect)((()=>{H&&B&&(null!==Le&&google.maps.event.removeListener(Le),Ce(google.maps.event.addListener(H,"draggable_changed",B)))}),[B]),(0,r.useEffect)((()=>{H&&_&&(null!==Ee&&google.maps.event.removeListener(Ee),we(google.maps.event.addListener(H,"flat_changed",_)))}),[_]),(0,r.useEffect)((()=>{H&&R&&(null!==Me&&google.maps.event.removeListener(Me),xe(google.maps.event.addListener(H,"icon_changed",R)))}),[R]),(0,r.useEffect)((()=>{H&&T&&(null!==ke&&google.maps.event.removeListener(ke),Pe(google.maps.event.addListener(H,"position_changed",T)))}),[T]),(0,r.useEffect)((()=>{H&&U&&(null!==Oe&&google.maps.event.removeListener(Oe),Se(google.maps.event.addListener(H,"shape_changed",U)))}),[U]),(0,r.useEffect)((()=>{H&&z&&(null!==De&&google.maps.event.removeListener(De),Ie(google.maps.event.addListener(H,"title_changed",z)))}),[z]),(0,r.useEffect)((()=>{H&&A&&(null!==je&&google.maps.event.removeListener(je),Be(google.maps.event.addListener(H,"visible_changed",A)))}),[A]),(0,r.useEffect)((()=>{H&&Z&&(null!==_e&&google.maps.event.removeListener(_e),Re(google.maps.event.addListener(H,"zindex_changed",Z)))}),[Z]),(0,r.useEffect)((()=>{var e=re(re(re({},n||ue),s?ue:{map:N}),{},{position:t}),i=new google.maps.Marker(e);return s?s.addMarker(i,!!o):i.setMap(N),t&&i.setPosition(t),"undefined"!==typeof u&&i.setVisible(u),"undefined"!==typeof l&&i.setDraggable(l),"undefined"!==typeof c&&i.setClickable(c),"string"===typeof d&&i.setCursor(d),g&&i.setIcon(g),"undefined"!==typeof m&&i.setLabel(m),"undefined"!==typeof v&&i.setOpacity(v),f&&i.setShape(f),"string"===typeof y&&i.setTitle(y),"number"===typeof b&&i.setZIndex(b),C&&K(google.maps.event.addListener(i,"dblclick",C)),w&&q(google.maps.event.addListener(i,"dragend",w)),M&&X(google.maps.event.addListener(i,"dragstart",M)),O&&Q(google.maps.event.addListener(i,"mousedown",O)),x&&te(google.maps.event.addListener(i,"mouseout",x)),k&&se(google.maps.event.addListener(i,"mouseover",k)),P&&ie(google.maps.event.addListener(i,"mouseup",P)),S&&le(google.maps.event.addListener(i,"rightclick",S)),L&&ce(google.maps.event.addListener(i,"click",L)),E&&he(google.maps.event.addListener(i,"drag",E)),D&&me(google.maps.event.addListener(i,"clickable_changed",D)),I&&fe(google.maps.event.addListener(i,"cursor_changed",I)),j&&be(google.maps.event.addListener(i,"animation_changed",j)),B&&Ce(google.maps.event.addListener(i,"draggable_changed",B)),_&&we(google.maps.event.addListener(i,"flat_changed",_)),R&&xe(google.maps.event.addListener(i,"icon_changed",R)),T&&Pe(google.maps.event.addListener(i,"position_changed",T)),U&&Se(google.maps.event.addListener(i,"shape_changed",U)),z&&Ie(google.maps.event.addListener(i,"title_changed",z)),A&&Be(google.maps.event.addListener(i,"visible_changed",A)),Z&&Re(google.maps.event.addListener(i,"zindex_changed",Z)),F(i),V&&V(i),()=>{null!==G&&google.maps.event.removeListener(G),null!==Y&&google.maps.event.removeListener(Y),null!==J&&google.maps.event.removeListener(J),null!==$&&google.maps.event.removeListener($),null!==ee&&google.maps.event.removeListener(ee),null!==ne&&google.maps.event.removeListener(ne),null!==oe&&google.maps.event.removeListener(oe),null!==ae&&google.maps.event.removeListener(ae),null!==pe&&google.maps.event.removeListener(pe),null!==ge&&google.maps.event.removeListener(ge),null!==ve&&google.maps.event.removeListener(ve),null!==ye&&google.maps.event.removeListener(ye),null!==Le&&google.maps.event.removeListener(Le),null!==Ee&&google.maps.event.removeListener(Ee),null!==Me&&google.maps.event.removeListener(Me),null!==ke&&google.maps.event.removeListener(ke),null!==De&&google.maps.event.removeListener(De),null!==je&&google.maps.event.removeListener(je),null!==_e&&google.maps.event.removeListener(_e),W&&W(i),s?s.removeMarker(i,!!o):i&&i.setMap(null)}}),[]);var Te=(0,r.useMemo)((()=>a?r.Children.map(a,(e=>{if(!(0,r.isValidElement)(e))return e;var t=e;return(0,r.cloneElement)(t,{anchor:H})})):null),[a,H]);return(0,i.jsx)(i.Fragment,{children:Te})||null}));class pe extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[])}componentDidMount(){var e=this;return w((function*(){var t=re(re(re({},e.props.options||ue),e.props.clusterer?ue:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(t),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=y({updaterMap:le,eventMap:ae,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)}))()}componentDidUpdate(e){this.marker&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:le,eventMap:ae,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),f(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){return(this.props.children?r.Children.map(this.props.children,(e=>{if(!(0,r.isValidElement)(e))return e;var t=e;return(0,r.cloneElement)(t,{anchor:this.marker})})):null)||null}}p(pe,"contextType",h);var ce=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var t=this.cluster.getClusterer();if(google.maps.event.trigger(t,"click",this.cluster),google.maps.event.trigger(t,"clusterclick",this.cluster),t.getZoomOnClick()){var n=t.getMaxZoom(),s=this.cluster.getBounds(),o=t.getMap();null!==o&&"fitBounds"in o&&o.fitBounds(s),this.timeOut=window.setTimeout((function(){var e=t.getMap();if(null!==e){"fitBounds"in e&&e.fitBounds(s);var o=e.getZoom()||0;null!==n&&o>n&&e.setZoom(n+1)}}),100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),null===(e=this.getPanes())||void 0===e||e.overlayMouseTarget.appendChild(this.div);var t=this.getMap();null!==t&&(this.boundsChangedListener=google.maps.event.addListener(t,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),null!==this.timeOut&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=null!==e?"".concat(e.y,"px"):"0",this.div.style.left=null!==e?"".concat(e.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var e,t,n,s,o,i;if(this.div&&this.center){var r=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,a=this.backgroundPosition.split(" "),l=parseInt((null===(e=a[0])||void 0===e?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),u=parseInt((null===(t=a[1])||void 0===t?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(null!==p?"".concat(p.y,"px"):"0","; left: ").concat(null!==p?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var c=document.createElement("img");c.alt=r,c.src=this.url,c.width=this.width,c.height=this.height,c.setAttribute("style","position: absolute; top: ".concat(u,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(c.style.clip="rect(-".concat(u,"px, -").concat(l+this.width,"px, -").concat(u+this.height,", -").concat(l,")"));var d=document.createElement("div");d.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),(null===(n=this.sums)||void 0===n?void 0:n.text)&&(d.innerText="".concat(null===(s=this.sums)||void 0===s?void 0:s.text)),(null===(o=this.sums)||void 0===o?void 0:o.html)&&(d.innerHTML="".concat(null===(i=this.sums)||void 0===i?void 0:i.html)),this.div.innerHTML="",this.div.appendChild(c),this.div.appendChild(d),this.div.title=r,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(e){this.sums=e;var t=this.cluster.getClusterer().getStyles(),n=t[Math.min(t.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},e.prototype.setCenter=function(e){this.center=e},e.prototype.getPosFromLatLng=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return null!==t&&(t.x-=this.anchorIcon[1],t.y-=this.anchorIcon[0]),t},e}(),de=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new ce(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),t=0,n=this.getMarkers();ti)e.getMap()!==this.map&&e.setMap(this.map);else if(on||t0))for(var e=0;e3?new google.maps.LatLngBounds(null===s||void 0===s?void 0:s.getSouthWest(),null===s||void 0===s?void 0:s.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),i=this.getExtendedBounds(o),r=Math.min(e+this.batchSize,this.markers.length),a=e;a{O&&x&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(O,fe.onMouseOut,x)))}),[x]),(0,r.useEffect)((()=>{O&&M&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(O,fe.onMouseOver,M)))}),[M]),(0,r.useEffect)((()=>{O&&C&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(O,fe.onClick,C)))}),[C]),(0,r.useEffect)((()=>{O&&E&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(O,fe.onClusteringBegin,E)))}),[E]),(0,r.useEffect)((()=>{O&&w&&(null!==R&&google.maps.event.removeListener(R),_(google.maps.event.addListener(O,fe.onClusteringEnd,w)))}),[w]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==O&&ye.averageCenter(O,s)}),[O,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==O&&ye.batchSizeIE(O,o)}),[O,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==O&&ye.calculator(O,i)}),[O,i]),(0,r.useEffect)((()=>{"undefined"!==typeof a&&null!==O&&ye.clusterClass(O,a)}),[O,a]),(0,r.useEffect)((()=>{"undefined"!==typeof l&&null!==O&&ye.enableRetinaIcons(O,l)}),[O,l]),(0,r.useEffect)((()=>{"undefined"!==typeof u&&null!==O&&ye.gridSize(O,u)}),[O,u]),(0,r.useEffect)((()=>{"undefined"!==typeof c&&null!==O&&ye.ignoreHidden(O,c)}),[O,c]),(0,r.useEffect)((()=>{"undefined"!==typeof d&&null!==O&&ye.imageExtension(O,d)}),[O,d]),(0,r.useEffect)((()=>{"undefined"!==typeof g&&null!==O&&ye.imagePath(O,g)}),[O,g]),(0,r.useEffect)((()=>{"undefined"!==typeof m&&null!==O&&ye.imageSizes(O,m)}),[O,m]),(0,r.useEffect)((()=>{"undefined"!==typeof v&&null!==O&&ye.maxZoom(O,v)}),[O,v]),(0,r.useEffect)((()=>{"undefined"!==typeof f&&null!==O&&ye.minimumClusterSize(O,f)}),[O,f]),(0,r.useEffect)((()=>{"undefined"!==typeof y&&null!==O&&ye.styles(O,y)}),[O,y]),(0,r.useEffect)((()=>{"undefined"!==typeof b&&null!==O&&ye.title(O,b)}),[O,b]),(0,r.useEffect)((()=>{"undefined"!==typeof L&&null!==O&&ye.zoomOnClick(O,L)}),[O,L]),(0,r.useEffect)((()=>{if(D){var e=function(e){for(var t=1;t{null!==U&&google.maps.event.removeListener(U),null!==A&&google.maps.event.removeListener(A),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),P&&P(t)}}}),[]),null!==O&&t(O)||null}));class Le extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{markerClusterer:null}),p(this,"setClustererCallback",(()=>{null!==this.state.markerClusterer&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)}))}componentDidMount(){if(this.context){var e=new me(this.context,[],this.props.options);this.registeredEvents=y({updaterMap:ye,eventMap:fe,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({markerClusterer:e})),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:ye,eventMap:fe,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),f(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null}}function Ce(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}p(Le,"contextType",h);var Ee=function(){function e(t){void 0===t&&(t={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),"undefined"===typeof t.visible&&("undefined"===typeof t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var e=this;if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),"string"===typeof this.content?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var t=this.getPanes();if(null!==t&&t[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(0!==this.maxWidth&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var n=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-n.left-n.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var s=0,o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"];sr&&(n=g.x+p+l+d-r),this.alignBottom?g.y<-u+h+c?s=g.y+u-h-c:g.y+u+h>a&&(s=g.y+u+h-a):g.y<-u+h?s=g.y+u-h:g.y+c+u+h>a&&(s=g.y+c+u+h-a)),0===n&&0===s||t.panBy(n,s)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.div.style[t]=e[t]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"',this.div.style.filter="alpha(opacity="+100*n+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",null!==this.zIndex&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},e.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var t=this.div.ownerDocument,n=t&&t.defaultView?t.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var s=this.div.currentStyle;s&&(e.top=parseInt(s.borderTopWidth||"",10)||0,e.bottom=parseInt(s.borderBottomWidth||"",10)||0,e.left=parseInt(s.borderLeftWidth||"",10)||0,e.right=parseInt(s.borderRightWidth||"",10)||0)}return e},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection().fromLatLngToDivPixel(this.position);null!==e&&(this.div.style.left=e.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(e.y+this.pixelOffset.height)+"px":this.div.style.top=e.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},e.prototype.setOptions=function(e){void 0===e&&(e={}),"undefined"!==typeof e.boxClass&&(this.boxClass=e.boxClass,this.setBoxStyle()),"undefined"!==typeof e.boxStyle&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),"undefined"!==typeof e.content&&this.setContent(e.content),"undefined"!==typeof e.disableAutoPan&&(this.disableAutoPan=e.disableAutoPan),"undefined"!==typeof e.maxWidth&&(this.maxWidth=e.maxWidth),"undefined"!==typeof e.pixelOffset&&(this.pixelOffset=e.pixelOffset),"undefined"!==typeof e.alignBottom&&(this.alignBottom=e.alignBottom),"undefined"!==typeof e.position&&this.setPosition(e.position),"undefined"!==typeof e.zIndex&&this.setZIndex(e.zIndex),"undefined"!==typeof e.closeBoxMargin&&(this.closeBoxMargin=e.closeBoxMargin),"undefined"!==typeof e.closeBoxURL&&(this.closeBoxURL=e.closeBoxURL),"undefined"!==typeof e.infoBoxClearance&&(this.infoBoxClearance=e.infoBoxClearance),"undefined"!==typeof e.isHidden&&(this.isHidden=e.isHidden),"undefined"!==typeof e.visible&&(this.isHidden=!e.visible),"undefined"!==typeof e.enableEventPropagation&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var e=this.getMap();return"undefined"!==typeof e&&null!==e&&!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(e,t){var n=this;t&&(this.position=t.getPosition(),this.moveListener=google.maps.event.addListener(t,"position_changed",(function(){var e=t.getPosition();n.setPosition(e)})),this.mapListener=google.maps.event.addListener(t,"map_changed",(function(){n.setMap(t.map)}))),this.setMap(e),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,t=this.eventListeners;e{f&&null!==y&&(y.close(),n?y.open(f,n):y.getPosition()&&y.open(f))}),[f,y,n]),(0,r.useEffect)((()=>{s&&null!==y&&y.setOptions(s)}),[y,s]),(0,r.useEffect)((()=>{if(o&&null!==y){var e=o instanceof google.maps.LatLng?o:new google.maps.LatLng(o.lat,o.lng);y.setPosition(e)}}),[o]),(0,r.useEffect)((()=>{"number"===typeof i&&null!==y&&y.setZIndex(i)}),[i]),(0,r.useEffect)((()=>{y&&l&&(null!==L&&google.maps.event.removeListener(L),C(google.maps.event.addListener(y,"closeclick",l)))}),[l]),(0,r.useEffect)((()=>{y&&u&&(null!==E&&google.maps.event.removeListener(E),w(google.maps.event.addListener(y,"domready",u)))}),[u]),(0,r.useEffect)((()=>{y&&p&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(y,"content_changed",p)))}),[p]),(0,r.useEffect)((()=>{y&&c&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(y,"position_changed",c)))}),[c]),(0,r.useEffect)((()=>{y&&g&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(y,"zindex_changed",g)))}),[g]),(0,r.useEffect)((()=>{if(f){var e,t=s||Se,{position:o}=t,i=_(t,we);!o||o instanceof google.maps.LatLng||(e=new google.maps.LatLng(o.lat,o.lng));var r=new Ee(ke(ke({},i),e?{position:e}:{}));D.current=document.createElement("div"),b(r),l&&C(google.maps.event.addListener(r,"closeclick",l)),u&&w(google.maps.event.addListener(r,"domready",u)),p&&x(google.maps.event.addListener(r,"content_changed",p)),c&&P(google.maps.event.addListener(r,"position_changed",c)),g&&S(google.maps.event.addListener(r,"zindex_changed",g)),r.setContent(D.current),n?r.open(f,n):r.getPosition()?r.open(f):d(!1,"You must provide either an anchor or a position prop for ."),m&&m(r)}return()=>{null!==y&&(L&&google.maps.event.removeListener(L),M&&google.maps.event.removeListener(M),E&&google.maps.event.removeListener(E),k&&google.maps.event.removeListener(k),O&&google.maps.event.removeListener(O),v&&v(y),y.close())}}),[]),D.current?(0,a.createPortal)(r.Children.only(t),D.current):null}));class je extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",null),p(this,"state",{infoBox:null}),p(this,"open",((e,t)=>{t?null!==this.context&&e.open(this.context,t):e.getPosition()?null!==this.context&&e.open(this.context):d(!1,"You must provide either an anchor or a position prop for .")})),p(this,"setInfoBoxCallback",(()=>{null!==this.state.infoBox&&null!==this.containerElement&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))}))}componentDidMount(){var e,t=this.props.options||{},{position:n}=t,s=_(t,Me);!n||n instanceof google.maps.LatLng||(e=new google.maps.LatLng(n.lat,n.lng));var o=new Ee(ke(ke({},s),e?{position:e}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=y({updaterMap:Oe,eventMap:Pe,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:t}=this.state;null!==t&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Oe,eventMap:Pe,prevProps:e,nextProps:this.props,instance:t}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:t}=this.state;null!==t&&(e&&e(t),f(this.registeredEvents),t.close())}render(){return this.containerElement?(0,a.createPortal)(r.Children.only(this.props.children),this.containerElement):null}}p(je,"contextType",h);var Be=(Ie||(Ie=1,De=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,o,i;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(o=s;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=s;0!==o--;){var r=i[o];if(!e(t[r],n[r]))return!1}return!0}return t!==t&&n!==n}),De),_e=c(Be),Re=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Te{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");var s=n>>4;if(1!==s)throw new Error("Got v".concat(s," data when expected v").concat(1,"."));var o=Re[15&n];if(!o)throw new Error("Unrecognized array type.");var[i]=new Uint16Array(e,2,1),[r]=new Uint32Array(e,4,1);return new Te(r,i,o,e)}constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Float64Array,s=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var o=Re.indexOf(this.ArrayType),i=2*e*this.ArrayType.BYTES_PER_ELEMENT,r=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-r%8)%8;if(o<0)throw new Error("Unexpected typed array class: ".concat(n,"."));s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+r+a,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+i+r+a),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+r+a,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return Ue(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:o,coords:i,nodeSize:r}=this,a=[0,o.length-1,0],l=[];a.length;){var u=a.pop()||0,p=a.pop()||0,c=a.pop()||0;if(p-c<=r)for(var d=c;d<=p;d++){var h=i[2*d],g=i[2*d+1];h>=e&&h<=n&&g>=t&&g<=s&&l.push(o[d])}else{var m=c+p>>1,v=i[2*m],f=i[2*m+1];v>=e&&v<=n&&f>=t&&f<=s&&l.push(o[m]),(0===u?e<=v:t<=f)&&(a.push(c),a.push(m-1),a.push(1-u)),(0===u?n>=v:s>=f)&&(a.push(m+1),a.push(p),a.push(1-u))}}return l}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:o,nodeSize:i}=this,r=[0,s.length-1,0],a=[],l=n*n;r.length;){var u=r.pop()||0,p=r.pop()||0,c=r.pop()||0;if(p-c<=i)for(var d=c;d<=p;d++)Ve(o[2*d],o[2*d+1],e,t)<=l&&a.push(s[d]);else{var h=c+p>>1,g=o[2*h],m=o[2*h+1];Ve(g,m,e,t)<=l&&a.push(s[h]),(0===u?e-n<=g:t-n<=m)&&(r.push(c),r.push(h-1),r.push(1-u)),(0===u?e+n>=g:t+n>=m)&&(r.push(h+1),r.push(p),r.push(1-u))}}return a}}function Ue(e,t,n,s,o,i){if(!(o-s<=n)){var r=s+o>>1;ze(e,t,r,s,o,i),Ue(e,t,n,s,r-1,1-i),Ue(e,t,n,r+1,o,1-i)}}function ze(e,t,n,s,o,i){for(;o>s;){if(o-s>600){var r=o-s+1,a=n-s+1,l=Math.log(r),u=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*u*(r-u)/r)*(a-r/2<0?-1:1);ze(e,t,n,Math.max(s,Math.floor(n-a*u/r+p)),Math.min(o,Math.floor(n+(r-a)*u/r+p)),i)}var c=t[2*n+i],d=s,h=o;for(Ae(e,t,s,n),t[2*o+i]>c&&Ae(e,t,s,o);dc;)h--}t[2*s+i]===c?Ae(e,t,s,h):Ae(e,t,++h,o),h<=n&&(s=h+1),n<=h&&(o=h-1)}}function Ae(e,t,n,s){Ze(e,n,s),Ze(t,2*n,2*s),Ze(t,2*n+1,2*s+1)}function Ze(e,t,n){var s=e[t];e[t]=e[n],e[n]=s}function Ve(e,t,n,s){var o=e-n,i=t-s;return o*o+i*i}var We,Ne={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},He=Math.fround||(We=new Float32Array(1),e=>(We[0]=+e,We[0]));class Fe{constructor(e){this.options=Object.assign(Object.create(Ne),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:t,minZoom:n,maxZoom:s}=this.options;t&&console.time("total time");var o="prepare ".concat(e.length," points");t&&console.time(o),this.points=e;for(var i=[],r=0;r=n;h--){var g=+Date.now();d=this.trees[h]=this._createTree(this._cluster(d,h)),t&&console.log("z%d: %d clusters in %dms",h,d.numItems,+Date.now()-g)}return t&&console.timeEnd("total time"),this}getClusters(e,t){var n=((e[0]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,e[1])),o=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){var r=this.getClusters([n,s,180,i],t),a=this.getClusters([-180,s,o,i],t);return r.concat(a)}var l=this.trees[this._limitZoom(t)],u=l.range(Ye(n),qe(i),Ye(o),qe(s)),p=l.data,c=[];for(var d of u){var h=this.stride*d;c.push(p[h+5]>1?Ge(p,h,this.clusterProps):this.points[p[h+3]])}return c}getChildren(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),s="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(s);var i=o.data;if(t*this.stride>=i.length)throw new Error(s);var r=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[t*this.stride],l=i[t*this.stride+1],u=o.within(a,l,r),p=[];for(var c of u){var d=c*this.stride;i[d+4]===e&&p.push(i[d+5]>1?Ge(i,d,this.clusterProps):this.points[i[d+3]])}if(0===p.length)throw new Error(s);return p}getLeaves(e,t,n){t=t||10,n=n||0;var s=[];return this._appendLeaves(s,e,t,n,0),s}getTile(e,t,n){var s=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:i,radius:r}=this.options,a=r/i,l=(n-a)/o,u=(n+1+a)/o,p={features:[]};return this._addTileFeatures(s.range((t-a)/o,l,(t+1+a)/o,u),s.data,t,n,o,p),0===t&&this._addTileFeatures(s.range(1-a/o,l,1,u),s.data,o,n,o,p),t===o-1&&this._addTileFeatures(s.range(0,l,a/o,u),s.data,-1,n,o,p),p.features.length?p:null}getClusterExpansionZoom(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,s,o){var i=this.getChildren(t);for(var r of i){var a=r.properties;if(a&&a.cluster?o+a.point_count<=s?o+=a.point_count:o=this._appendLeaves(e,a.cluster_id,n,s,o):o1,u=void 0,p=void 0,c=void 0;if(l)u=Ke(t,a,this.clusterProps),p=t[a],c=t[a+1];else{var d=this.points[t[a+3]];u=d.properties;var[h,g]=d.geometry.coordinates;p=Ye(h),c=qe(g)}var m={type:1,geometry:[[Math.round(this.options.extent*(p*o-n)),Math.round(this.options.extent*(c*o-s))]],tags:u},v=void 0;void 0!==(v=l||this.options.generateId?t[a+3]:this.points[t[a+3]].id)&&(m.id=v),i.features.push(m)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){for(var{radius:n,extent:s,reduce:o,minPoints:i}=this.options,r=n/(s*Math.pow(2,t)),a=e.data,l=[],u=this.stride,p=0;pt&&(m+=a[f+5])}if(m>g&&m>=i){var y=c*g,b=d*g,L=void 0,C=-1,E=(p/u<<5)+(t+1)+this.points.length;for(var w of h){var M=w*u;if(!(a[M+2]<=t)){a[M+2]=t;var x=a[M+5];y+=a[M]*x,b+=a[M+1]*x,a[M+4]=E,o&&(L||(L=this._map(a,p,!0),C=this.clusterProps.length,this.clusterProps.push(L)),o(L,this._map(a,M)))}}a[p+4]=E,l.push(y/m,b/m,1/0,E,-1,m),o&&l.push(C)}else{for(var k=0;k1)for(var P of h){var O=P*u;if(!(a[O+2]<=t)){a[O+2]=t;for(var S=0;S>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){var s=this.clusterProps[e[t+6]];return n?Object.assign({},s):s}var o=this.points[e[t+3]].properties,i=this.options.map(o);return n&&i===o?Object.assign({},i):i}}function Ge(e,t,n){return{type:"Feature",id:e[t+3],properties:Ke(e,t,n),geometry:{type:"Point",coordinates:[(s=e[t],360*(s-.5)),Je(e[t+1])]}};var s}function Ke(e,t,n){var s=e[t+5],o=s>=1e4?"".concat(Math.round(s/1e3),"k"):s>=1e3?"".concat(Math.round(s/100)/10,"k"):s,i=e[t+6],r=-1===i?{}:Object.assign({},n[i]);return Object.assign(r,{cluster:!0,cluster_id:e[t+3],point_count:s,point_count_abbreviated:o})}function Ye(e){return e/360+.5}function qe(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Je(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Xe(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o$e.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&($e.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class et{constructor(e){var{maxZoom:t=16}=e;this.maxZoom=t}noop(e){var{markers:t}=e;return nt(t)}}var tt,nt=e=>e.map((e=>new Qe({position:$e.getPosition(e),markers:[e]})));class st extends et{constructor(e){var{maxZoom:t,radius:n=60}=e,s=Xe(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new Fe(Object.assign({maxZoom:this.maxZoom,radius:n},s))}calculate(e){var t=!1,n={zoom:e.map.getZoom()};if(!_e(e.markers,this.markers)){t=!0,this.markers=[...e.markers];var s=this.markers.map((e=>{var t=$e.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(s)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!_e(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster(e){var{map:t}=e;return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map((e=>this.transformCluster(e)))}transformCluster(e){var{geometry:{coordinates:[t,n]},properties:s}=e;if(s.cluster)return new Qe({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:n,lng:t}});var o=s.marker;return new Qe({markers:[o],position:$e.getPosition(o)})}}class ot{constructor(e,t){this.markers={sum:e.length};var n=t.map((e=>e.count)),s=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:s/t.length,sum:s,min:Math.min(...n),max:Math.max(...n)}}}}class it{render(e,t,n){var{count:s,position:o}=e,i=s>Math.max(10,t.clusters.markers.mean)?"#ff0000":"#0000ff",r='\n\n\n\n').concat(s,"\n"),a="Cluster of ".concat(s," markers"),l=Number(google.maps.Marker.MAX_ZINDEX)+s;if($e.isAdvancedMarkerAvailable(n)){var u=(new DOMParser).parseFromString(r,"image/svg+xml").documentElement;u.setAttribute("transform","translate(0 25)");var p={map:n,position:o,zIndex:l,title:a,content:u};return new google.maps.marker.AdvancedMarkerElement(p)}var c={position:o,zIndex:l,title:a,icon:{url:"data:image/svg+xml;base64,".concat(btoa(r)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}class rt{constructor(){!function(e,t){for(var n in t.prototype)e.prototype[n]=t.prototype[n]}(rt,google.maps.OverlayView)}}!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"}(tt||(tt={}));var at=(e,t,n)=>{n.fitBounds(t.bounds)};class lt extends rt{constructor(e){var{map:t,markers:n=[],algorithmOptions:s={},algorithm:o=new st(s),renderer:i=new it,onClusterClick:r=at}=e;super(),this.markers=[...n],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=r,t&&this.setMap(t)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){var n=this.markers.indexOf(e);return-1!==n&&($e.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){var n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,tt.CLUSTERING_BEGIN,this);var{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||void 0==n){var s=new Set;for(var o of t)1==o.markers.length&&s.add(o.markers[0]);var i=[];for(var r of this.clusters)null!=r.marker&&(1==r.markers.length?s.has(r.marker)||$e.setMap(r.marker,null):i.push(r.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame((()=>i.forEach((e=>$e.setMap(e,null)))))}google.maps.event.trigger(this,tt.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>$e.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){var e=new ot(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>$e.setMap(e,null))),this.onClusterClick&&n.marker.addListener("click",(e=>{google.maps.event.trigger(this,tt.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))),$e.setMap(n.marker,t)}))}}function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function pt(e){for(var t=1;t{if(t&&null===n){var o=new lt(pt(pt({},e),{},{map:t}));s(o)}}),[t]),n}(0,r.memo)((function(e){var{children:t,options:n}=e,s=ct(n);return null!==s?t(s):null}));var dt={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ht={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};(0,r.memo)((function(e){var{children:t,anchor:n,options:s,position:o,zIndex:i,onCloseClick:l,onDomReady:u,onContentChanged:p,onPositionChanged:c,onZindexChanged:g,onLoad:m,onUnmount:v}=e,f=(0,r.useContext)(h),[y,b]=(0,r.useState)(null),[L,C]=(0,r.useState)(null),[E,w]=(0,r.useState)(null),[M,x]=(0,r.useState)(null),[k,P]=(0,r.useState)(null),[O,S]=(0,r.useState)(null),D=(0,r.useRef)(null);return(0,r.useEffect)((()=>{null!==y&&(y.close(),n?y.open(f,n):y.getPosition()&&y.open(f))}),[f,y,n]),(0,r.useEffect)((()=>{s&&null!==y&&y.setOptions(s)}),[y,s]),(0,r.useEffect)((()=>{o&&null!==y&&y.setPosition(o)}),[o]),(0,r.useEffect)((()=>{"number"===typeof i&&null!==y&&y.setZIndex(i)}),[i]),(0,r.useEffect)((()=>{y&&l&&(null!==L&&google.maps.event.removeListener(L),C(google.maps.event.addListener(y,"closeclick",l)))}),[l]),(0,r.useEffect)((()=>{y&&u&&(null!==E&&google.maps.event.removeListener(E),w(google.maps.event.addListener(y,"domready",u)))}),[u]),(0,r.useEffect)((()=>{y&&p&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(y,"content_changed",p)))}),[p]),(0,r.useEffect)((()=>{y&&c&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(y,"position_changed",c)))}),[c]),(0,r.useEffect)((()=>{y&&g&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(y,"zindex_changed",g)))}),[g]),(0,r.useEffect)((()=>{var e=new google.maps.InfoWindow(s);return b(e),D.current=document.createElement("div"),l&&C(google.maps.event.addListener(e,"closeclick",l)),u&&w(google.maps.event.addListener(e,"domready",u)),p&&x(google.maps.event.addListener(e,"content_changed",p)),c&&P(google.maps.event.addListener(e,"position_changed",c)),g&&S(google.maps.event.addListener(e,"zindex_changed",g)),e.setContent(D.current),o&&e.setPosition(o),i&&e.setZIndex(i),n?e.open(f,n):e.getPosition()?e.open(f):d(!1,"You must provide either an anchor (typically render it inside a ) or a position props for ."),m&&m(e),()=>{L&&google.maps.event.removeListener(L),M&&google.maps.event.removeListener(M),E&&google.maps.event.removeListener(E),k&&google.maps.event.removeListener(k),O&&google.maps.event.removeListener(O),v&&v(e),e.close()}}),[]),D.current?(0,a.createPortal)(r.Children.only(t),D.current):null}));class gt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",null),p(this,"state",{infoWindow:null}),p(this,"open",((e,t)=>{t?e.open(this.context,t):e.getPosition()?e.open(this.context):d(!1,"You must provide either an anchor (typically render it inside a ) or a position props for .")})),p(this,"setInfoWindowCallback",(()=>{null!==this.state.infoWindow&&null!==this.containerElement&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))}))}componentDidMount(){var e=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=y({updaterMap:ht,eventMap:dt,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({infoWindow:e})),this.setInfoWindowCallback)}componentDidUpdate(e){null!==this.state.infoWindow&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:ht,eventMap:dt,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){null!==this.state.infoWindow&&(f(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?(0,a.createPortal)(r.Children.only(this.props.children),this.containerElement):null}}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function vt(e){for(var t=1;t{null!==E&&E.setMap(C)}),[C]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==E&&E.setOptions(t)}),[E,t]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==E&&E.setDraggable(n)}),[E,n]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==E&&E.setEditable(s)}),[E,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==E&&E.setVisible(o)}),[E,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==E&&E.setPath(i)}),[E,i]),(0,r.useEffect)((()=>{E&&a&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(E,"dblclick",a)))}),[a]),(0,r.useEffect)((()=>{E&&l&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(E,"dragend",l)))}),[l]),(0,r.useEffect)((()=>{E&&u&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(E,"dragstart",u)))}),[u]),(0,r.useEffect)((()=>{E&&p&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(E,"mousedown",p)))}),[p]),(0,r.useEffect)((()=>{E&&c&&(null!==j&&google.maps.event.removeListener(j),B(google.maps.event.addListener(E,"mousemove",c)))}),[c]),(0,r.useEffect)((()=>{E&&d&&(null!==_&&google.maps.event.removeListener(_),R(google.maps.event.addListener(E,"mouseout",d)))}),[d]),(0,r.useEffect)((()=>{E&&g&&(null!==T&&google.maps.event.removeListener(T),U(google.maps.event.addListener(E,"mouseover",g)))}),[g]),(0,r.useEffect)((()=>{E&&m&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(E,"mouseup",m)))}),[m]),(0,r.useEffect)((()=>{E&&v&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(E,"rightclick",v)))}),[v]),(0,r.useEffect)((()=>{E&&f&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(E,"click",f)))}),[f]),(0,r.useEffect)((()=>{E&&y&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(E,"drag",y)))}),[y]),(0,r.useEffect)((()=>{var e=new google.maps.Polyline(vt(vt({},t||bt),{},{map:C}));return i&&e.setPath(i),"undefined"!==typeof o&&e.setVisible(o),"undefined"!==typeof s&&e.setEditable(s),"undefined"!==typeof n&&e.setDraggable(n),a&&x(google.maps.event.addListener(e,"dblclick",a)),l&&P(google.maps.event.addListener(e,"dragend",l)),u&&S(google.maps.event.addListener(e,"dragstart",u)),p&&I(google.maps.event.addListener(e,"mousedown",p)),c&&B(google.maps.event.addListener(e,"mousemove",c)),d&&R(google.maps.event.addListener(e,"mouseout",d)),g&&U(google.maps.event.addListener(e,"mouseover",g)),m&&A(google.maps.event.addListener(e,"mouseup",m)),v&&V(google.maps.event.addListener(e,"rightclick",v)),f&&N(google.maps.event.addListener(e,"click",f)),y&&F(google.maps.event.addListener(e,"drag",y)),w(e),b&&b(e),()=>{null!==M&&google.maps.event.removeListener(M),null!==k&&google.maps.event.removeListener(k),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==j&&google.maps.event.removeListener(j),null!==_&&google.maps.event.removeListener(_),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),L&&L(e),e.setMap(null)}}),[]),null}));class Lt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{polyline:null}),p(this,"setPolylineCallback",(()=>{null!==this.state.polyline&&this.props.onLoad&&this.props.onLoad(this.state.polyline)}))}componentDidMount(){var e=new google.maps.Polyline(vt(vt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:yt,eventMap:ft,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polyline:e}}),this.setPolylineCallback)}componentDidUpdate(e){null!==this.state.polyline&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:yt,eventMap:ft,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),f(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Et(e){for(var t=1;t{null!==M&&M.setMap(w)}),[w]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==M&&M.setOptions(t)}),[M,t]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==M&&M.setDraggable(n)}),[M,n]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==M&&M.setEditable(s)}),[M,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==M&&M.setVisible(o)}),[M,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==M&&M.setPath(i)}),[M,i]),(0,r.useEffect)((()=>{"undefined"!==typeof a&&null!==M&&M.setPaths(a)}),[M,a]),(0,r.useEffect)((()=>{M&&"function"===typeof l&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(M,"dblclick",l)))}),[l]),(0,r.useEffect)((()=>{M&&(google.maps.event.addListener(M.getPath(),"insert_at",(()=>{null===E||void 0===E||E(M)})),google.maps.event.addListener(M.getPath(),"set_at",(()=>{null===E||void 0===E||E(M)})),google.maps.event.addListener(M.getPath(),"remove_at",(()=>{null===E||void 0===E||E(M)})))}),[M,E]),(0,r.useEffect)((()=>{M&&"function"===typeof u&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(M,"dragend",u)))}),[u]),(0,r.useEffect)((()=>{M&&"function"===typeof p&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(M,"dragstart",p)))}),[p]),(0,r.useEffect)((()=>{M&&"function"===typeof c&&(null!==j&&google.maps.event.removeListener(j),B(google.maps.event.addListener(M,"mousedown",c)))}),[c]),(0,r.useEffect)((()=>{M&&"function"===typeof d&&(null!==_&&google.maps.event.removeListener(_),R(google.maps.event.addListener(M,"mousemove",d)))}),[d]),(0,r.useEffect)((()=>{M&&"function"===typeof g&&(null!==T&&google.maps.event.removeListener(T),U(google.maps.event.addListener(M,"mouseout",g)))}),[g]),(0,r.useEffect)((()=>{M&&"function"===typeof m&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(M,"mouseover",m)))}),[m]),(0,r.useEffect)((()=>{M&&"function"===typeof v&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(M,"mouseup",v)))}),[v]),(0,r.useEffect)((()=>{M&&"function"===typeof f&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(M,"rightclick",f)))}),[f]),(0,r.useEffect)((()=>{M&&"function"===typeof y&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(M,"click",y)))}),[y]),(0,r.useEffect)((()=>{M&&"function"===typeof b&&(null!==G&&google.maps.event.removeListener(G),K(google.maps.event.addListener(M,"drag",b)))}),[b]),(0,r.useEffect)((()=>{var e=new google.maps.Polygon(Et(Et({},t),{},{map:w}));return i&&e.setPath(i),a&&e.setPaths(a),"undefined"!==typeof o&&e.setVisible(o),"undefined"!==typeof s&&e.setEditable(s),"undefined"!==typeof n&&e.setDraggable(n),l&&P(google.maps.event.addListener(e,"dblclick",l)),u&&S(google.maps.event.addListener(e,"dragend",u)),p&&I(google.maps.event.addListener(e,"dragstart",p)),c&&B(google.maps.event.addListener(e,"mousedown",c)),d&&R(google.maps.event.addListener(e,"mousemove",d)),g&&U(google.maps.event.addListener(e,"mouseout",g)),m&&A(google.maps.event.addListener(e,"mouseover",m)),v&&V(google.maps.event.addListener(e,"mouseup",v)),f&&N(google.maps.event.addListener(e,"rightclick",f)),y&&F(google.maps.event.addListener(e,"click",y)),b&&K(google.maps.event.addListener(e,"drag",b)),x(e),L&&L(e),()=>{null!==k&&google.maps.event.removeListener(k),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==j&&google.maps.event.removeListener(j),null!==_&&google.maps.event.removeListener(_),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),null!==H&&google.maps.event.removeListener(H),C&&C(e),e.setMap(null)}}),[]),null}));class xt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[])}componentDidMount(){var e=this.props.options||{};this.polygon=new google.maps.Polygon(e),this.polygon.setMap(this.context),this.registeredEvents=y({updaterMap:Mt,eventMap:wt,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(e){this.polygon&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Mt,eventMap:wt,prevProps:e,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),f(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Pt(e){for(var t=1;t{null!==w&&w.setMap(E)}),[E]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==w&&w.setOptions(t)}),[w,t]),(0,r.useEffect)((()=>{"undefined"!==typeof s&&null!==w&&w.setDraggable(s)}),[w,s]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==w&&w.setEditable(o)}),[w,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==w&&w.setVisible(i)}),[w,i]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==w&&w.setBounds(n)}),[w,n]),(0,r.useEffect)((()=>{w&&a&&(null!==x&&google.maps.event.removeListener(x),k(google.maps.event.addListener(w,"dblclick",a)))}),[a]),(0,r.useEffect)((()=>{w&&l&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(w,"dragend",l)))}),[l]),(0,r.useEffect)((()=>{w&&u&&(null!==S&&google.maps.event.removeListener(S),D(google.maps.event.addListener(w,"dragstart",u)))}),[u]),(0,r.useEffect)((()=>{w&&p&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"mousedown",p)))}),[p]),(0,r.useEffect)((()=>{w&&c&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(w,"mousemove",c)))}),[c]),(0,r.useEffect)((()=>{w&&d&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(w,"mouseout",d)))}),[d]),(0,r.useEffect)((()=>{w&&g&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(w,"mouseover",g)))}),[g]),(0,r.useEffect)((()=>{w&&m&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(w,"mouseup",m)))}),[m]),(0,r.useEffect)((()=>{w&&v&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(w,"rightclick",v)))}),[v]),(0,r.useEffect)((()=>{w&&f&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(w,"click",f)))}),[f]),(0,r.useEffect)((()=>{w&&y&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(w,"drag",y)))}),[y]),(0,r.useEffect)((()=>{w&&b&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(w,"bounds_changed",b)))}),[b]),(0,r.useEffect)((()=>{var e=new google.maps.Rectangle(Pt(Pt({},t),{},{map:E}));return"undefined"!==typeof i&&e.setVisible(i),"undefined"!==typeof o&&e.setEditable(o),"undefined"!==typeof s&&e.setDraggable(s),"undefined"!==typeof n&&e.setBounds(n),a&&k(google.maps.event.addListener(e,"dblclick",a)),l&&O(google.maps.event.addListener(e,"dragend",l)),u&&D(google.maps.event.addListener(e,"dragstart",u)),p&&j(google.maps.event.addListener(e,"mousedown",p)),c&&_(google.maps.event.addListener(e,"mousemove",c)),d&&T(google.maps.event.addListener(e,"mouseout",d)),g&&z(google.maps.event.addListener(e,"mouseover",g)),m&&Z(google.maps.event.addListener(e,"mouseup",m)),v&&W(google.maps.event.addListener(e,"rightclick",v)),f&&H(google.maps.event.addListener(e,"click",f)),y&&G(google.maps.event.addListener(e,"drag",y)),b&&Y(google.maps.event.addListener(e,"bounds_changed",b)),M(e),L&&L(e),()=>{null!==x&&google.maps.event.removeListener(x),null!==P&&google.maps.event.removeListener(P),null!==S&&google.maps.event.removeListener(S),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),null!==U&&google.maps.event.removeListener(U),null!==A&&google.maps.event.removeListener(A),null!==V&&google.maps.event.removeListener(V),null!==N&&google.maps.event.removeListener(N),null!==F&&google.maps.event.removeListener(F),null!==K&&google.maps.event.removeListener(K),C&&C(e),e.setMap(null)}}),[]),null}));class Dt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{rectangle:null}),p(this,"setRectangleCallback",(()=>{null!==this.state.rectangle&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)}))}componentDidMount(){var e=new google.maps.Rectangle(Pt(Pt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:St,eventMap:Ot,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{rectangle:e}}),this.setRectangleCallback)}componentDidUpdate(e){null!==this.state.rectangle&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:St,eventMap:Ot,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),f(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function jt(e){for(var t=1;t{null!==x&&x.setMap(M)}),[M]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==x&&x.setOptions(t)}),[x,t]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==x&&x.setDraggable(o)}),[x,o]),(0,r.useEffect)((()=>{"undefined"!==typeof i&&null!==x&&x.setEditable(i)}),[x,i]),(0,r.useEffect)((()=>{"undefined"!==typeof a&&null!==x&&x.setVisible(a)}),[x,a]),(0,r.useEffect)((()=>{"number"===typeof s&&null!==x&&x.setRadius(s)}),[x,s]),(0,r.useEffect)((()=>{"undefined"!==typeof n&&null!==x&&x.setCenter(n)}),[x,n]),(0,r.useEffect)((()=>{x&&l&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(x,"dblclick",l)))}),[l]),(0,r.useEffect)((()=>{x&&u&&(null!==S&&google.maps.event.removeListener(S),D(google.maps.event.addListener(x,"dragend",u)))}),[u]),(0,r.useEffect)((()=>{x&&p&&(null!==I&&google.maps.event.removeListener(I),j(google.maps.event.addListener(x,"dragstart",p)))}),[p]),(0,r.useEffect)((()=>{x&&c&&(null!==B&&google.maps.event.removeListener(B),_(google.maps.event.addListener(x,"mousedown",c)))}),[c]),(0,r.useEffect)((()=>{x&&d&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(x,"mousemove",d)))}),[d]),(0,r.useEffect)((()=>{x&&g&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(x,"mouseout",g)))}),[g]),(0,r.useEffect)((()=>{x&&m&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(x,"mouseover",m)))}),[m]),(0,r.useEffect)((()=>{x&&v&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(x,"mouseup",v)))}),[v]),(0,r.useEffect)((()=>{x&&f&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(x,"rightclick",f)))}),[f]),(0,r.useEffect)((()=>{x&&y&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(x,"click",y)))}),[y]),(0,r.useEffect)((()=>{x&&b&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(x,"drag",b)))}),[b]),(0,r.useEffect)((()=>{x&&L&&(null!==q&&google.maps.event.removeListener(q),J(google.maps.event.addListener(x,"center_changed",L)))}),[y]),(0,r.useEffect)((()=>{x&&C&&(null!==X&&google.maps.event.removeListener(X),$(google.maps.event.addListener(x,"radius_changed",C)))}),[C]),(0,r.useEffect)((()=>{var e=new google.maps.Circle(jt(jt({},t||Rt),{},{map:M}));return"number"===typeof s&&e.setRadius(s),"undefined"!==typeof n&&e.setCenter(n),"number"===typeof s&&e.setRadius(s),"undefined"!==typeof a&&e.setVisible(a),"undefined"!==typeof i&&e.setEditable(i),"undefined"!==typeof o&&e.setDraggable(o),l&&O(google.maps.event.addListener(e,"dblclick",l)),u&&D(google.maps.event.addListener(e,"dragend",u)),p&&j(google.maps.event.addListener(e,"dragstart",p)),c&&_(google.maps.event.addListener(e,"mousedown",c)),d&&T(google.maps.event.addListener(e,"mousemove",d)),g&&z(google.maps.event.addListener(e,"mouseout",g)),m&&Z(google.maps.event.addListener(e,"mouseover",m)),v&&W(google.maps.event.addListener(e,"mouseup",v)),f&&H(google.maps.event.addListener(e,"rightclick",f)),y&&G(google.maps.event.addListener(e,"click",y)),b&&Y(google.maps.event.addListener(e,"drag",b)),L&&J(google.maps.event.addListener(e,"center_changed",L)),C&&$(google.maps.event.addListener(e,"radius_changed",C)),k(e),E&&E(e),()=>{null!==P&&google.maps.event.removeListener(P),null!==S&&google.maps.event.removeListener(S),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),null!==U&&google.maps.event.removeListener(U),null!==A&&google.maps.event.removeListener(A),null!==V&&google.maps.event.removeListener(V),null!==N&&google.maps.event.removeListener(N),null!==F&&google.maps.event.removeListener(F),null!==q&&google.maps.event.removeListener(q),null!==X&&google.maps.event.removeListener(X),w&&w(e),e.setMap(null)}}),[]),null}));class Tt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{circle:null}),p(this,"setCircleCallback",(()=>{null!==this.state.circle&&this.props.onLoad&&this.props.onLoad(this.state.circle)}))}componentDidMount(){var e=new google.maps.Circle(jt(jt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:_t,eventMap:Bt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{circle:e}}),this.setCircleCallback)}componentDidUpdate(e){null!==this.state.circle&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:_t,eventMap:Bt,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){var e;null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),f(this.registeredEvents),null===(e=this.state.circle)||void 0===e||e.setMap(null))}render(){return null}}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function zt(e){for(var t=1;t{null!==L&&L.setMap(b)}),[b]),(0,r.useEffect)((()=>{L&&s&&(null!==E&&google.maps.event.removeListener(E),w(google.maps.event.addListener(L,"dblclick",s)))}),[s]),(0,r.useEffect)((()=>{L&&o&&(null!==M&&google.maps.event.removeListener(M),x(google.maps.event.addListener(L,"mousedown",o)))}),[o]),(0,r.useEffect)((()=>{L&&i&&(null!==k&&google.maps.event.removeListener(k),P(google.maps.event.addListener(L,"mousemove",i)))}),[i]),(0,r.useEffect)((()=>{L&&a&&(null!==O&&google.maps.event.removeListener(O),S(google.maps.event.addListener(L,"mouseout",a)))}),[a]),(0,r.useEffect)((()=>{L&&l&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(L,"mouseover",l)))}),[l]),(0,r.useEffect)((()=>{L&&u&&(null!==j&&google.maps.event.removeListener(j),B(google.maps.event.addListener(L,"mouseup",u)))}),[u]),(0,r.useEffect)((()=>{L&&p&&(null!==_&&google.maps.event.removeListener(_),R(google.maps.event.addListener(L,"rightclick",p)))}),[p]),(0,r.useEffect)((()=>{L&&n&&(null!==T&&google.maps.event.removeListener(T),U(google.maps.event.addListener(L,"click",n)))}),[n]),(0,r.useEffect)((()=>{L&&c&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(L,"addfeature",c)))}),[c]),(0,r.useEffect)((()=>{L&&d&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(L,"removefeature",d)))}),[d]),(0,r.useEffect)((()=>{L&&g&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(L,"removeproperty",g)))}),[g]),(0,r.useEffect)((()=>{L&&m&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(L,"setgeometry",m)))}),[m]),(0,r.useEffect)((()=>{L&&v&&(null!==G&&google.maps.event.removeListener(G),K(google.maps.event.addListener(L,"setproperty",v)))}),[v]),(0,r.useEffect)((()=>{if(null!==b){var e=new google.maps.Data(zt(zt({},t),{},{map:b}));s&&w(google.maps.event.addListener(e,"dblclick",s)),o&&x(google.maps.event.addListener(e,"mousedown",o)),i&&P(google.maps.event.addListener(e,"mousemove",i)),a&&S(google.maps.event.addListener(e,"mouseout",a)),l&&I(google.maps.event.addListener(e,"mouseover",l)),u&&B(google.maps.event.addListener(e,"mouseup",u)),p&&R(google.maps.event.addListener(e,"rightclick",p)),n&&U(google.maps.event.addListener(e,"click",n)),c&&A(google.maps.event.addListener(e,"addfeature",c)),d&&V(google.maps.event.addListener(e,"removefeature",d)),g&&N(google.maps.event.addListener(e,"removeproperty",g)),m&&F(google.maps.event.addListener(e,"setgeometry",m)),v&&K(google.maps.event.addListener(e,"setproperty",v)),C(e),f&&f(e)}return()=>{L&&(null!==E&&google.maps.event.removeListener(E),null!==M&&google.maps.event.removeListener(M),null!==k&&google.maps.event.removeListener(k),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==j&&google.maps.event.removeListener(j),null!==_&&google.maps.event.removeListener(_),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),null!==H&&google.maps.event.removeListener(H),null!==G&&google.maps.event.removeListener(G),y&&y(L),L.setMap(null))}}),[]),null}));class Vt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{data:null}),p(this,"setDataCallback",(()=>{null!==this.state.data&&this.props.onLoad&&this.props.onLoad(this.state.data)}))}componentDidMount(){if(null!==this.context){var e=new google.maps.Data(zt(zt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:Zt,eventMap:At,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({data:e})),this.setDataCallback)}}componentDidUpdate(e){null!==this.state.data&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Zt,eventMap:At,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),f(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Nt(e){for(var t=1;t{null!==this.state.kmlLayer&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)}))}componentDidMount(){var e=new google.maps.KmlLayer(Nt(Nt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:Ft,eventMap:Ht,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{kmlLayer:e}}),this.setKmlLayerCallback)}componentDidUpdate(e){null!==this.state.kmlLayer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Ft,eventMap:Ht,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),f(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}function Kt(e,t){return"function"===typeof t?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function Yt(e,t){return new t(e.lat,e.lng)}function qt(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function Jt(e,t,n,s){return void 0!==n?function(e,t,n){var s=e&&e.fromLatLngToDivPixel(n.getNorthEast()),o=e&&e.fromLatLngToDivPixel(n.getSouthWest());return s&&o?{left:"".concat(o.x+t.x,"px"),top:"".concat(s.y+t.y,"px"),width:"".concat(s.x-o.x-t.x,"px"),height:"".concat(o.y-s.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}(e,t,(o=n,i=google.maps.LatLngBounds,r=qt,o instanceof i?o:r(o,i))):function(e,t,n){var s=e&&e.fromLatLngToDivPixel(n);if(s){var{x:o,y:i}=s;return{left:"".concat(o+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}(e,t,function(e,t,n){return e instanceof t?e:n(e,t)}(s,google.maps.LatLng,Yt));var o,i,r}function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function $t(e,t,n,s,o){class i extends google.maps.OverlayView{constructor(e,t,n,s){super(),this.container=e,this.pane=t,this.position=n,this.bounds=s}onAdd(){var e,t=null===(e=this.getPanes())||void 0===e?void 0:e[this.pane];null===t||void 0===t||t.appendChild(this.container)}draw(){var e=this.getProjection(),t=function(e){for(var t=1;t{var e=document.createElement("div");return e.style.position="absolute",e}),[]),g=(0,r.useMemo)((()=>$t(d,s,t,n,u)),[d,s,t,n]);return(0,r.useEffect)((()=>(null===i||void 0===i||i(g),null===g||void 0===g||g.setMap(c),()=>{null===l||void 0===l||l(g),null===g||void 0===g||g.setMap(null)})),[c,g]),(0,r.useEffect)((()=>{d.style.zIndex="".concat(o)}),[o,d]),a.createPortal(p,d)}));class nn extends r.PureComponent{constructor(e){super(e),p(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),p(this,"updatePane",(()=>{var e=this.props.mapPaneName,t=this.overlayView.getPanes();d(!!e,"OverlayView requires props.mapPaneName but got %s",e),t?this.setState({paneEl:t[e]}):this.setState({paneEl:null})})),p(this,"onAdd",(()=>{var e,t;this.updatePane(),null===(e=(t=this.props).onLoad)||void 0===e||e.call(t,this.overlayView)})),p(this,"onPositionElement",(()=>{var e,t,n,s,o,i,r=this.overlayView.getProjection(),a=function(e){for(var t=1;t{this.onPositionElement()})),p(this,"onRemove",(()=>{var e,t;this.setState((()=>({paneEl:null}))),null===(e=(t=this.props).onUnmount)||void 0===e||e.call(t,this.overlayView)})),this.containerRef=(0,r.createRef)();var t=new google.maps.OverlayView;t.onAdd=this.onAdd,t.draw=this.draw,t.onRemove=this.onRemove,this.overlayView=t}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){var t=en(e.position),n=en(this.props.position),s=tn(e.bounds),o=tn(this.props.bounds);t===n&&s===o||this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var e=this.state.paneEl;return e?a.createPortal((0,i.jsx)("div",{ref:this.containerRef,style:this.state.containerStyle,children:r.Children.only(this.props.children)}),e):null}}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function on(e){for(var t=1;tnew google.maps.GroundOverlay(t,a,s)),[]);return(0,r.useEffect)((()=>{null!==l&&l.setMap(i)}),[i]),(0,r.useEffect)((()=>{"undefined"!==typeof t&&null!==l&&(l.set("url",t),l.setMap(i))}),[l,t]),(0,r.useEffect)((()=>{"undefined"!==typeof o&&null!==l&&l.setOpacity(o?1:0)}),[l,o]),(0,r.useEffect)((()=>{var e=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));"undefined"!==typeof n&&null!==l&&(l.set("bounds",e),l.setMap(i))}),[l,n]),null}));class ln extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{groundOverlay:null}),p(this,"setGroundOverlayCallback",(()=>{null!==this.state.groundOverlay&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)}))}componentDidMount(){d(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,on(on({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:an,eventMap:rn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{groundOverlay:e}}),this.setGroundOverlayCallback)}componentDidUpdate(e){null!==this.state.groundOverlay&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:an,eventMap:rn,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function pn(e){for(var t=1;t{google.maps.visualization||d(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)}),[]),(0,r.useEffect)((()=>{d(!!t,"data property is required in HeatmapLayer %s",t)}),[t]),(0,r.useEffect)((()=>{null!==a&&a.setMap(i)}),[i]),(0,r.useEffect)((()=>{o&&null!==a&&a.setOptions(o)}),[a,o]),(0,r.useEffect)((()=>{var e=new google.maps.visualization.HeatmapLayer(pn(pn({},o),{},{data:t,map:i}));return l(e),n&&n(e),()=>{null!==a&&(s&&s(a),a.setMap(null))}}),[]),null}));class hn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{heatmapLayer:null}),p(this,"setHeatmapLayerCallback",(()=>{null!==this.state.heatmapLayer&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)}))}componentDidMount(){d(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to ? %s',google.maps.visualization),d(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var e=new google.maps.visualization.HeatmapLayer(pn(pn({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=y({updaterMap:dn,eventMap:cn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{heatmapLayer:e}}),this.setHeatmapLayerCallback)}componentDidUpdate(e){f(this.registeredEvents),this.registeredEvents=y({updaterMap:dn,eventMap:cn,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),f(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}p(hn,"contextType",h);var gn={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},mn={register(e,t,n){e.registerPanoProvider(t,n)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class vn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{streetViewPanorama:null}),p(this,"setStreetViewPanoramaCallback",(()=>{null!==this.state.streetViewPanorama&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)}))}componentDidMount(){var e,t,n=null!==(e=null===(t=this.context)||void 0===t?void 0:t.getStreetView())&&void 0!==e?e:null;this.registeredEvents=y({updaterMap:mn,eventMap:gn,prevProps:{},nextProps:this.props,instance:n}),this.setState((()=>({streetViewPanorama:n})),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){null!==this.state.streetViewPanorama&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:mn,eventMap:gn,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),f(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}p(vn,"contextType",h);class fn extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{streetViewService:null}),p(this,"setStreetViewServiceCallback",(()=>{null!==this.state.streetViewService&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)}))}componentDidMount(){var e=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:e}}),this.setStreetViewServiceCallback)}componentWillUnmount(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}p(fn,"contextType",h);r.PureComponent;var yn={onDirectionsChanged:"directions_changed"},bn={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class Ln extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{directionsRenderer:null}),p(this,"setDirectionsRendererCallback",(()=>{null!==this.state.directionsRenderer&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))}))}componentDidMount(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=y({updaterMap:bn,eventMap:yn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{directionsRenderer:e}}),this.setDirectionsRendererCallback)}componentDidUpdate(e){null!==this.state.directionsRenderer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:bn,eventMap:yn,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),f(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}p(Ln,"contextType",h);r.PureComponent;var Cn={onPlacesChanged:"places_changed"},En={bounds(e,t){e.setBounds(t)}};class wn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",(0,r.createRef)()),p(this,"state",{searchBox:null}),p(this,"setSearchBoxCallback",(()=>{null!==this.state.searchBox&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)}))}componentDidMount(){if(d(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(null!==e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=y({updaterMap:En,eventMap:Cn,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{searchBox:t}}),this.setSearchBoxCallback)}}}componentDidUpdate(e){null!==this.state.searchBox&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:En,eventMap:Cn,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),f(this.registeredEvents))}render(){return(0,i.jsx)("div",{ref:this.containerElement,children:r.Children.only(this.props.children)})}}p(wn,"contextType",h);var Mn={onPlaceChanged:"place_changed"},xn={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class kn extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",(0,r.createRef)()),p(this,"state",{autocomplete:null}),p(this,"setAutocompleteCallback",(()=>{null!==this.state.autocomplete&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)}))}componentDidMount(){var e;d(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places);var t=null===(e=this.containerElement.current)||void 0===e?void 0:e.querySelector("input");if(t){var n=new google.maps.places.Autocomplete(t,this.props.options);this.registeredEvents=y({updaterMap:xn,eventMap:Mn,prevProps:{},nextProps:this.props,instance:n}),this.setState((()=>({autocomplete:n})),this.setAutocompleteCallback)}}componentDidUpdate(e){f(this.registeredEvents),this.registeredEvents=y({updaterMap:xn,eventMap:Mn,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){null!==this.state.autocomplete&&f(this.registeredEvents)}render(){return(0,i.jsx)("div",{ref:this.containerElement,className:this.props.className,children:r.Children.only(this.props.children)})}}p(kn,"defaultProps",{className:""}),p(kn,"contextType",h)}}]); \ No newline at end of file diff --git a/build/static/js/5260.2165290c.chunk.js b/build/static/js/5260.ffe264e4.chunk.js similarity index 89% rename from build/static/js/5260.2165290c.chunk.js rename to build/static/js/5260.ffe264e4.chunk.js index d3b656f..883f7a9 100644 --- a/build/static/js/5260.2165290c.chunk.js +++ b/build/static/js/5260.ffe264e4.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[5260],{85260:e=>{e.exports=JSON.parse('{"sample-page":"Sample Page","documentation":"Documentation","others":"Others","roadmap":"Roadmap","MENU":"Menu","orders":"Orders","orderspreview":"Orders Preview","deliveries":"Deliveries","tenants":"Tenants","pricing":"Pricing","customers":"Customers","riders":"Riders","reports":"Reports","ordersummary":"Orders Summary","ordersdetails":"Orders Details","riderssummary":"Riders Summary","riderslogs":"Riders Logs","invoice":"Invoice","dispatch":"Dispatch"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[5260],{85260:e=>{e.exports=JSON.parse('{"sample-page":"Sample Page","documentation":"Documentation","others":"Others","roadmap":"Roadmap","MENU":"Menu","orders":"Orders","orderspreview":"Orders Preview","deliveries":"Deliveries","tenants":"Tenants","pricing":"Pricing","customers":"Customers","riders":"Riders","reports":"Reports","ordersummary":"Orders Summary","ordersdetails":"Orders Details","riderssummary":"Riders Summary","riderslogs":"Riders Logs","invoice":"Invoice","dispatch":"Dispatch","profitability":"Profitability"}')}}]); \ No newline at end of file diff --git a/build/static/js/5766.994fb72c.chunk.js b/build/static/js/5766.994fb72c.chunk.js new file mode 100644 index 0000000..af43c03 --- /dev/null +++ b/build/static/js/5766.994fb72c.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[5766],{36150:(t,e,r)=>{r.d(e,{I:()=>n});var s=r(69347),i=r(1729);function n(t,e){return(0,i.t)(t,s.$,e)}},46639:(t,e,r)=>{r.d(e,{A:()=>R});var s=r(57528),i=r(98587),n=r(58168),a=r(9950),o=r(72004),l=r(3484),c=r(88283),h=r(89548),u=r(18463),d=r(59254),v=r(45558),A=r(1614);function m(t){return(0,A.Ay)("MuiCircularProgress",t)}(0,v.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var p,f,k,b,w=r(44414);const y=["className","color","disableShrink","size","style","thickness","value","variant"];let S,g,x,M;const C=44,O=(0,c.i7)(S||(S=p||(p=(0,s.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),E=(0,c.i7)(g||(g=f||(f=(0,s.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,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["color".concat((0,h.A)(r.color))]]}})((t=>{let{ownerState:e,theme:r}=t;return(0,n.A)({display:"inline-block"},"determinate"===e.variant&&{transition:r.transitions.create("transform")},"inherit"!==e.color&&{color:(r.vars||r).palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&(0,c.AH)(x||(x=k||(k=(0,s.A)(["\n animation: "," 1.4s linear infinite;\n "]))),O)})),j=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),D=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e["circle".concat((0,h.A)(r.variant))],r.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:r}=t;return(0,n.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&!e.disableShrink&&(0,c.AH)(M||(M=b||(b=(0,s.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),E)})),R=a.forwardRef((function(t,e){const r=(0,u.b)({props:t,name:"MuiCircularProgress"}),{className:s,color:a="primary",disableShrink:c=!1,size:d=40,style:v,thickness:A=3.6,value:p=0,variant:f="indeterminate"}=r,k=(0,i.A)(r,y),b=(0,n.A)({},r,{color:a,disableShrink:c,size:d,thickness:A,value:p,variant:f}),S=(t=>{const{classes:e,variant:r,color:s,disableShrink:i}=t,n={root:["root",r,"color".concat((0,h.A)(s))],svg:["svg"],circle:["circle","circle".concat((0,h.A)(r)),i&&"circleDisableShrink"]};return(0,l.A)(n,m,e)})(b),g={},x={},M={};if("determinate"===f){const t=2*Math.PI*((C-A)/2);g.strokeDasharray=t.toFixed(3),M["aria-valuenow"]=Math.round(p),g.strokeDashoffset="".concat(((100-p)/100*t).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,w.jsx)(P,(0,n.A)({className:(0,o.A)(S.root,s),style:(0,n.A)({width:d,height:d},x,v),ownerState:b,ref:e,role:"progressbar"},M,k,{children:(0,w.jsx)(j,{className:S.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(C," ").concat(C),children:(0,w.jsx)(D,{className:S.circle,style:g,ownerState:b,cx:C,cy:C,r:(C-A)/2,fill:"none",strokeWidth:A})})}))}))},51778:(t,e,r)=>{r.d(e,{n:()=>M});var s,i,n,a,o,l,c=r(89379),h=r(9950),u=r(39790),d=r(55149),v=r(64137),A=r(83568),m=r(53167),p=r(92750),f=r(15941),k=r(95732),b=r(61664),w=(s=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakSet,l=new WeakSet,class extends k.Q{constructor(t,e){super(),(0,u.A)(this,l),(0,u.A)(this,o),(0,d.A)(this,s,{writable:!0,value:void 0}),(0,d.A)(this,i,{writable:!0,value:void 0}),(0,d.A)(this,n,{writable:!0,value:void 0}),(0,d.A)(this,a,{writable:!0,value:void 0}),(0,m.A)(this,i,void 0),(0,m.A)(this,s,t),this.setOptions(e),this.bindMethods(),(0,A.A)(this,o,y).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const r=this.options;this.options=(0,v.A)(this,s).defaultMutationOptions(t),(0,b.f8)(r,this.options)||(0,v.A)(this,s).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,v.A)(this,n),observer:this}),null===(e=(0,v.A)(this,n))||void 0===e||e.setOptions(this.options),null!==r&&void 0!==r&&r.mutationKey&&this.options.mutationKey&&(0,b.EN)(r.mutationKey)!==(0,b.EN)(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var t;this.hasListeners()||(null===(t=(0,v.A)(this,n))||void 0===t||t.removeObserver(this))}onMutationUpdate(t){(0,A.A)(this,o,y).call(this),(0,A.A)(this,l,S).call(this,t)}getCurrentResult(){return(0,v.A)(this,i)}reset(){var t;null===(t=(0,v.A)(this,n))||void 0===t||t.removeObserver(this),(0,m.A)(this,n,void 0),(0,A.A)(this,o,y).call(this),(0,A.A)(this,l,S).call(this)}mutate(t,e){var r;return(0,m.A)(this,a,e),null===(r=(0,v.A)(this,n))||void 0===r||r.removeObserver(this),(0,m.A)(this,n,(0,v.A)(this,s).getMutationCache().build((0,v.A)(this,s),this.options)),(0,v.A)(this,n).addObserver(this),(0,v.A)(this,n).execute(t)}});function y(){var t,e;const r=null!==(t=null===(e=(0,v.A)(this,n))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,p.$)();(0,m.A)(this,i,(0,c.A)((0,c.A)({},r),{},{isPending:"pending"===r.status,isSuccess:"success"===r.status,isError:"error"===r.status,isIdle:"idle"===r.status,mutate:this.mutate,reset:this.reset}))}function S(t){f.j.batch((()=>{if((0,v.A)(this,a)&&this.hasListeners()){const u=(0,v.A)(this,i).variables,d=(0,v.A)(this,i).context;var e,r,s,n;if("success"===(null===t||void 0===t?void 0:t.type))null===(e=(r=(0,v.A)(this,a)).onSuccess)||void 0===e||e.call(r,t.data,u,d),null===(s=(n=(0,v.A)(this,a)).onSettled)||void 0===s||s.call(n,t.data,null,u,d);else if("error"===(null===t||void 0===t?void 0:t.type)){var o,l,c,h;null===(o=(l=(0,v.A)(this,a)).onError)||void 0===o||o.call(l,t.error,u,d),null===(c=(h=(0,v.A)(this,a)).onSettled)||void 0===c||c.call(h,void 0,t.error,u,d)}}this.listeners.forEach((t=>{t((0,v.A)(this,i))}))}))}var g=r(15441),x=r(98986);function M(t,e){const r=(0,g.jE)(e),[s]=h.useState((()=>new w(r,t)));h.useEffect((()=>{s.setOptions(t)}),[s,t]);const i=h.useSyncExternalStore(h.useCallback((t=>s.subscribe(f.j.batchCalls(t))),[s]),(()=>s.getCurrentResult()),(()=>s.getCurrentResult())),n=h.useCallback(((t,e)=>{s.mutate(t,e).catch(C)}),[s]);if(i.error&&(0,x.G)(s.options.throwOnError,[i.error]))throw i.error;return(0,c.A)((0,c.A)({},i),{},{mutate:n,mutateAsync:i.mutate})}function C(){}},63189:(t,e,r)=>{var s=r(24994);e.A=void 0;var i=s(r(79526)),n=r(44414);e.A=(0,i.default)((0,n.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},99324:(t,e,r)=>{r.d(e,{eQE:()=>i});var s=r(99230);function i(t){return(0,s.k5)({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}}]})(t)}}}]); \ No newline at end of file diff --git a/build/static/js/6150.41b0a8b5.chunk.js b/build/static/js/6150.41b0a8b5.chunk.js deleted file mode 100644 index 094e70c..0000000 --- a/build/static/js/6150.41b0a8b5.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6150],{1729:(t,e,s)=>{s.d(e,{t:()=>u});var i=s(9950),n=s(15941),r=s(45904),a=s(15441),h=s(30618),o=s(80958),l=s(73895);function u(t,e,s){const u=(0,a.jE)(s),c=(0,h.w)(),d=(0,r.h)(),A=u.defaultQueryOptions(t);A._optimisticResults=c?"isRestoring":"optimistic",(0,l.tu)(A),(0,o.LJ)(A,d),(0,o.wZ)(d);const[p]=i.useState((()=>new e(u,A))),f=p.getOptimisticResult(A);if(i.useSyncExternalStore(i.useCallback((t=>{const e=c?()=>{}:p.subscribe(n.j.batchCalls(t));return p.updateResult(),e}),[p,c]),(()=>p.getCurrentResult()),(()=>p.getCurrentResult())),i.useEffect((()=>{p.setOptions(A,{listeners:!1})}),[A,p]),(0,l.EU)(A,f))throw(0,l.iL)(A,p,d);if((0,o.$1)({result:f,errorResetBoundary:d,throwOnError:A.throwOnError,query:u.getQueryCache().get(A.queryHash)}))throw f.error;return A.notifyOnChangeProps?f:p.trackResult(f)}},20454:(t,e,s)=>{function i(t){if(null==t)throw new TypeError("Cannot destructure "+t)}s.d(e,{A:()=>i})},30618:(t,e,s)=>{s.d(e,{w:()=>r});var i=s(9950),n=i.createContext(!1),r=()=>i.useContext(n);n.Provider},36150:(t,e,s)=>{s.d(e,{I:()=>r});var i=s(69347),n=s(1729);function r(t,e){return(0,n.t)(t,i.$,e)}},45904:(t,e,s)=>{s.d(e,{h:()=>a});var i=s(9950);function n(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var r=i.createContext(n()),a=()=>i.useContext(r)},69347:(t,e,s)=>{s.d(e,{$:()=>j});var i,n,r,a,h,o,l,u,c,d,A,p,f,v,w,b,y,g,R,O,k,C,m,S=s(89379),W=s(20454),U=s(39790),E=s(55149),M=s(83568),F=s(64137),L=s(53167),Q=s(61664),T=s(15941),D=s(90698),I=s(95732),P=s(15368),j=(i=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,h=new WeakMap,o=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,A=new WeakMap,p=new WeakMap,f=new WeakMap,v=new WeakMap,w=new WeakSet,b=new WeakSet,y=new WeakSet,g=new WeakSet,R=new WeakSet,O=new WeakSet,k=new WeakSet,C=new WeakSet,m=new WeakSet,class extends I.Q{constructor(t,e){super(),(0,U.A)(this,m),(0,U.A)(this,C),(0,U.A)(this,k),(0,U.A)(this,O),(0,U.A)(this,R),(0,U.A)(this,g),(0,U.A)(this,y),(0,U.A)(this,b),(0,U.A)(this,w),(0,E.A)(this,i,{writable:!0,value:void 0}),(0,E.A)(this,n,{writable:!0,value:void 0}),(0,E.A)(this,r,{writable:!0,value:void 0}),(0,E.A)(this,a,{writable:!0,value:void 0}),(0,E.A)(this,h,{writable:!0,value:void 0}),(0,E.A)(this,o,{writable:!0,value:void 0}),(0,E.A)(this,l,{writable:!0,value:void 0}),(0,E.A)(this,u,{writable:!0,value:void 0}),(0,E.A)(this,c,{writable:!0,value:void 0}),(0,E.A)(this,d,{writable:!0,value:void 0}),(0,E.A)(this,A,{writable:!0,value:void 0}),(0,E.A)(this,p,{writable:!0,value:void 0}),(0,E.A)(this,f,{writable:!0,value:void 0}),(0,E.A)(this,v,{writable:!0,value:new Set}),this.options=e,(0,L.A)(this,i,t),(0,L.A)(this,l,null),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&((0,F.A)(this,n).addObserver(this),Z((0,F.A)(this,n),this.options)?(0,M.A)(this,w,q).call(this):this.updateResult(),(0,M.A)(this,R,B).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return H((0,F.A)(this,n),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return H((0,F.A)(this,n),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,(0,M.A)(this,O,K).call(this),(0,M.A)(this,k,z).call(this),(0,F.A)(this,n).removeObserver(this)}setOptions(t,e){const s=this.options,r=(0,F.A)(this,n);if(this.options=(0,F.A)(this,i).defaultQueryOptions(t),(0,Q.f8)(s,this.options)||(0,F.A)(this,i).getQueryCache().notify({type:"observerOptionsUpdated",query:(0,F.A)(this,n),observer:this}),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),(0,M.A)(this,C,G).call(this);const a=this.hasListeners();a&&N((0,F.A)(this,n),r,this.options,s)&&(0,M.A)(this,w,q).call(this),this.updateResult(e),!a||(0,F.A)(this,n)===r&&this.options.enabled===s.enabled&&this.options.staleTime===s.staleTime||(0,M.A)(this,b,_).call(this);const h=(0,M.A)(this,y,x).call(this);!a||(0,F.A)(this,n)===r&&this.options.enabled===s.enabled&&h===(0,F.A)(this,f)||(0,M.A)(this,g,$).call(this,h)}getOptimisticResult(t){const e=(0,F.A)(this,i).getQueryCache().build((0,F.A)(this,i),t),s=this.createResult(e,t);return function(t,e){if(!(0,Q.f8)(t.getCurrentResult(),e))return!0;return!1}(this,s)&&((0,L.A)(this,a,s),(0,L.A)(this,o,this.options),(0,L.A)(this,h,(0,F.A)(this,n).state)),s}getCurrentResult(){return(0,F.A)(this,a)}trackResult(t){const e={};return Object.keys(t).forEach((s=>{Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:()=>((0,F.A)(this,v).add(s),t[s])})})),e}getCurrentQuery(){return(0,F.A)(this,n)}refetch(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign({},((0,W.A)(t),t));return this.fetch((0,S.A)({},e))}fetchOptimistic(t){const e=(0,F.A)(this,i).defaultQueryOptions(t),s=(0,F.A)(this,i).getQueryCache().build((0,F.A)(this,i),e);return s.isFetchingOptimistic=!0,s.fetch().then((()=>this.createResult(s,e)))}fetch(t){var e;return(0,M.A)(this,w,q).call(this,(0,S.A)((0,S.A)({},t),{},{cancelRefetch:null===(e=t.cancelRefetch)||void 0===e||e})).then((()=>(this.updateResult(),(0,F.A)(this,a))))}createResult(t,e){const s=(0,F.A)(this,n),i=this.options,A=(0,F.A)(this,a),p=(0,F.A)(this,h),f=(0,F.A)(this,o),v=t!==s?t.state:(0,F.A)(this,r),{state:w}=t;let b,{error:y,errorUpdatedAt:g,fetchStatus:R,status:O}=w,k=!1;if(e._optimisticResults){const n=this.hasListeners(),r=!n&&Z(t,e),a=n&&N(t,s,e,i);(r||a)&&(R=(0,P.v_)(t.options.networkMode)?"fetching":"paused",w.dataUpdatedAt||(O="pending")),"isRestoring"===e._optimisticResults&&(R="idle")}if(e.select&&"undefined"!==typeof w.data)if(A&&w.data===(null===p||void 0===p?void 0:p.data)&&e.select===(0,F.A)(this,u))b=(0,F.A)(this,c);else try{(0,L.A)(this,u,e.select),b=e.select(w.data),b=(0,Q.pl)(null===A||void 0===A?void 0:A.data,b,e),(0,L.A)(this,c,b),(0,L.A)(this,l,null)}catch(E){(0,L.A)(this,l,E)}else b=w.data;if("undefined"!==typeof e.placeholderData&&"undefined"===typeof b&&"pending"===O){let t;var C;if(null!==A&&void 0!==A&&A.isPlaceholderData&&e.placeholderData===(null===f||void 0===f?void 0:f.placeholderData))t=A.data;else if(t="function"===typeof e.placeholderData?e.placeholderData(null===(C=(0,F.A)(this,d))||void 0===C?void 0:C.state.data,(0,F.A)(this,d)):e.placeholderData,e.select&&"undefined"!==typeof t)try{t=e.select(t),(0,L.A)(this,l,null)}catch(E){(0,L.A)(this,l,E)}"undefined"!==typeof t&&(O="success",b=(0,Q.pl)(null===A||void 0===A?void 0:A.data,t,e),k=!0)}(0,F.A)(this,l)&&(y=(0,F.A)(this,l),b=(0,F.A)(this,c),g=Date.now(),O="error");const m="fetching"===R,S="pending"===O,W="error"===O,U=S&&m;return{status:O,fetchStatus:R,isPending:S,isSuccess:"success"===O,isError:W,isInitialLoading:U,isLoading:U,data:b,dataUpdatedAt:w.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>v.dataUpdateCount||w.errorUpdateCount>v.errorUpdateCount,isFetching:m,isRefetching:m&&!S,isLoadingError:W&&0===w.dataUpdatedAt,isPaused:"paused"===R,isPlaceholderData:k,isRefetchError:W&&0!==w.dataUpdatedAt,isStale:V(t,e),refetch:this.refetch}}updateResult(t){const e=(0,F.A)(this,a),s=this.createResult((0,F.A)(this,n),this.options);if((0,L.A)(this,h,(0,F.A)(this,n).state),(0,L.A)(this,o,this.options),void 0!==(0,F.A)(this,h).data&&(0,L.A)(this,d,(0,F.A)(this,n)),(0,Q.f8)(s,e))return;(0,L.A)(this,a,s);const i={};!1!==(null===t||void 0===t?void 0:t.listeners)&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,s="function"===typeof t?t():t;if("all"===s||!s&&!(0,F.A)(this,v).size)return!0;const i=new Set(null!==s&&void 0!==s?s:(0,F.A)(this,v));return this.options.throwOnError&&i.add("error"),Object.keys((0,F.A)(this,a)).some((t=>{const s=t;return(0,F.A)(this,a)[s]!==e[s]&&i.has(s)}))})()&&(i.listeners=!0),(0,M.A)(this,m,J).call(this,(0,S.A)((0,S.A)({},i),t))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&(0,M.A)(this,R,B).call(this)}});function q(t){(0,M.A)(this,C,G).call(this);let e=(0,F.A)(this,n).fetch(this.options,t);return null!==t&&void 0!==t&&t.throwOnError||(e=e.catch(Q.lQ)),e}function _(){if((0,M.A)(this,O,K).call(this),Q.S$||(0,F.A)(this,a).isStale||!(0,Q.gn)(this.options.staleTime))return;const t=(0,Q.j3)((0,F.A)(this,a).dataUpdatedAt,this.options.staleTime)+1;(0,L.A)(this,A,setTimeout((()=>{(0,F.A)(this,a).isStale||this.updateResult()}),t))}function x(){var t;return null!==(t="function"===typeof this.options.refetchInterval?this.options.refetchInterval((0,F.A)(this,n)):this.options.refetchInterval)&&void 0!==t&&t}function $(t){(0,M.A)(this,k,z).call(this),(0,L.A)(this,f,t),!Q.S$&&!1!==this.options.enabled&&(0,Q.gn)((0,F.A)(this,f))&&0!==(0,F.A)(this,f)&&(0,L.A)(this,p,setInterval((()=>{(this.options.refetchIntervalInBackground||D.m.isFocused())&&(0,M.A)(this,w,q).call(this)}),(0,F.A)(this,f)))}function B(){(0,M.A)(this,b,_).call(this),(0,M.A)(this,g,$).call(this,(0,M.A)(this,y,x).call(this))}function K(){(0,F.A)(this,A)&&(clearTimeout((0,F.A)(this,A)),(0,L.A)(this,A,void 0))}function z(){(0,F.A)(this,p)&&(clearInterval((0,F.A)(this,p)),(0,L.A)(this,p,void 0))}function G(){const t=(0,F.A)(this,i).getQueryCache().build((0,F.A)(this,i),this.options);if(t===(0,F.A)(this,n))return;const e=(0,F.A)(this,n);(0,L.A)(this,n,t),(0,L.A)(this,r,t.state),this.hasListeners()&&(null===e||void 0===e||e.removeObserver(this),t.addObserver(this))}function J(t){T.j.batch((()=>{t.listeners&&this.listeners.forEach((t=>{t((0,F.A)(this,a))})),(0,F.A)(this,i).getQueryCache().notify({query:(0,F.A)(this,n),type:"observerResultsUpdated"})}))}function Z(t,e){return function(t,e){return!1!==e.enabled&&!t.state.dataUpdatedAt&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||t.state.dataUpdatedAt>0&&H(t,e,e.refetchOnMount)}function H(t,e,s){if(!1!==e.enabled){const i="function"===typeof s?s(t):s;return"always"===i||!1!==i&&V(t,e)}return!1}function N(t,e,s,i){return!1!==s.enabled&&(t!==e||!1===i.enabled)&&(!s.suspense||"error"!==t.state.status)&&V(t,s)}function V(t,e){return t.isStaleByTime(e.staleTime)}},73895:(t,e,s)=>{s.d(e,{EU:()=>r,iL:()=>a,nE:()=>n,tu:()=>i});var i=t=>{t.suspense&&"number"!==typeof t.staleTime&&(t.staleTime=1e3)},n=(t,e)=>t.isLoading&&t.isFetching&&!e,r=(t,e)=>(null===t||void 0===t?void 0:t.suspense)&&e.isPending,a=(t,e,s)=>e.fetchOptimistic(t).catch((()=>{s.clearReset()}))},80958:(t,e,s)=>{s.d(e,{$1:()=>h,LJ:()=>r,wZ:()=>a});var i=s(9950),n=s(98986),r=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},a=t=>{i.useEffect((()=>{t.clearReset()}),[t])},h=t=>{let{result:e,errorResetBoundary:s,throwOnError:i,query:r}=t;return e.isError&&!s.isReset()&&!e.isFetching&&r&&(0,n.G)(i,[e.error,r])}},98986:(t,e,s)=>{function i(t,e){return"function"===typeof t?t(...e):!!t}s.d(e,{G:()=>i})}}]); \ No newline at end of file diff --git a/build/static/js/6467.116b66d0.chunk.js b/build/static/js/6467.116b66d0.chunk.js deleted file mode 100644 index 51c8946..0000000 --- a/build/static/js/6467.116b66d0.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6467],{2046:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),c=n(3484),s=n(89548),u=n(82053),l=n(15866),d=n(39766),p=n(59254),v=n(45558),m=n(1614);function f(e){return(0,m.Ay)("MuiInputAdornment",e)}const h=(0,v.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g,A=n(18463),b=n(44414);const y=["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,s.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(h.positionStart,"&:not(.").concat(h.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),w=i.forwardRef((function(e,t){const n=(0,A.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:v,component:m="div",disablePointerEvents:h=!1,disableTypography:w=!1,position:C,variant:M}=n,k=(0,r.A)(n,y),L=(0,d.A)()||{};let S=M;M&&L.variant,L&&!S&&(S=L.variant);const R=(0,a.A)({},n,{hiddenLabel:L.hiddenLabel,size:L.size,disablePointerEvents:h,position:C,variant:S}),z=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:a,size:i,variant:o}=e,u={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,s.A)(a)),o,r&&"hiddenLabel",i&&"size".concat((0,s.A)(i))]};return(0,c.A)(u,f,t)})(R);return(0,b.jsx)(l.A.Provider,{value:null,children:(0,b.jsx)(x,(0,a.A)({as:m,ownerState:R,className:(0,o.A)(z.root,v),ref:t},k,{children:"string"!==typeof p||w?(0,b.jsxs)(i.Fragment,{children:["start"===C?g||(g=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,b.jsx)(u.A,{color:"text.secondary",children:p})}))})}))},4729:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),a=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};var o=n(61187),c=function(e,t){return a.createElement(o.A,(0,r.A)({},e,{ref:t,icon:i}))};const s=a.forwardRef(c)},8203:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),a=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm72-112c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48zm400-188h-59.3c-2.6 0-5 1.2-6.5 3.3L763.7 538.1l-49.9-68.8a7.92 7.92 0 00-6.5-3.3H648c-6.5 0-10.3 7.4-6.5 12.7l109.2 150.7a16.1 16.1 0 0026 0l165.8-228.7c3.8-5.3 0-12.7-6.5-12.7zm-44 306h-64.2c-5.5 0-10.6 2.9-13.6 7.5a352.2 352.2 0 01-49.8 62.2A355.92 355.92 0 01651.1 840a355 355 0 01-138.7 27.9c-48.1 0-94.8-9.4-138.7-27.9a355.92 355.92 0 01-113.3-76.3A353.06 353.06 0 01184 650.5c-18.6-43.8-28-90.5-28-138.5s9.4-94.7 28-138.5c17.9-42.4 43.6-80.5 76.4-113.2 32.8-32.7 70.9-58.4 113.3-76.3a355 355 0 01138.7-27.9c48.1 0 94.8 9.4 138.7 27.9 42.4 17.9 80.5 43.6 113.3 76.3 19 19 35.6 39.8 49.8 62.2 2.9 4.7 8.1 7.5 13.6 7.5H892c6 0 9.8-6.3 7.2-11.6C828.8 178.5 684.7 82 517.7 80 278.9 77.2 80.5 272.5 80 511.2 79.5 750.1 273.3 944 512.4 944c169.2 0 315.6-97 386.7-238.4A8 8 0 00892 694z"}}]},name:"issues-close",theme:"outlined"};var o=n(61187),c=function(e,t){return a.createElement(o.A,(0,r.A)({},e,{ref:t,icon:i}))};const s=a.forwardRef(c)},12678:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),a=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var o=n(61187),c=function(e,t){return a.createElement(o.A,(0,r.A)({},e,{ref:t,icon:i}))};const s=a.forwardRef(c)},21636:(e,t,n)=>{"use strict";n.d(t,{h2r:()=>a});var r=n(99230);function a(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"20",height:"16",x:"2",y:"4",rx:"2"}},{tag:"path",attr:{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}}]})(e)}},23266:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),c=n(3484),s=n(99269),u=n(59254),l=n(19608),d=n(18463),p=n(13372),v=n(24184),m=n(79044),f=n(31506),h=n(40777),g=n(92455),A=n(88543),b=n(45558),y=n(1614);function x(e){return(0,y.Ay)("MuiMenuItem",e)}const w=(0,b.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=n(44414);const M=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],k=(0,u.Ay)(v.A,{shouldForwardProp:e=>(0,l.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.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"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.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(w.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,s.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(w.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,s.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(w.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,s.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,s.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(w.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(h.A.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(h.A.inset)]:{marginLeft:52},["& .".concat(A.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(A.A.inset)]:{paddingLeft:36},["& .".concat(g.A.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,a.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(g.A.root," svg")]:{fontSize:"1.25rem"}}))})),L=i.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiMenuItem"}),{autoFocus:s=!1,component:u="li",dense:l=!1,divider:v=!1,disableGutters:h=!1,focusVisibleClassName:g,role:A="menuitem",tabIndex:b,className:y}=n,w=(0,r.A)(n,M),L=i.useContext(p.A),S=i.useMemo((()=>({dense:l||L.dense||!1,disableGutters:h})),[L.dense,l,h]),R=i.useRef(null);(0,m.A)((()=>{s&&R.current&&R.current.focus()}),[s]);const z=(0,a.A)({},n,{dense:S.dense,divider:v,disableGutters:h}),E=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,u={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,c.A)(u,x,s);return(0,a.A)({},s,l)})(n),O=(0,f.A)(R,t);let P;return n.disabled||(P=void 0!==b?b:-1),(0,C.jsx)(p.A.Provider,{value:S,children:(0,C.jsx)(k,(0,a.A)({ref:O,role:A,tabIndex:P,component:u,focusVisibleClassName:(0,o.A)(E.focusVisible,g),className:(0,o.A)(E.root,y)},w,{ownerState:z,classes:E}))})}))},25713:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),c=n(3484),s=n(59254),u=n(18463),l=n(45558),d=n(1614);function p(e){return(0,d.Ay)("MuiCardActions",e)}(0,l.A)("MuiCardActions",["root","spacing"]);var v=n(44414);const m=["disableSpacing","className"],f=(0,s.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),h=i.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:s}=n,l=(0,r.A)(n,m),d=(0,a.A)({},n,{disableSpacing:i}),h=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,c.A)(r,p,t)})(d);return(0,v.jsx)(f,(0,a.A)({className:(0,o.A)(h.root,s),ownerState:d,ref:t},l))}))},28217:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var a=r(n(79526)),i=n(44414);t.A=(0,a.default)((0,i.jsx)("path",{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-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn")},39174:(e,t,n)=>{"use strict";n.d(t,{PY8:()=>a});var r=n(99230);function a(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2a5 5 0 1 0 5 5 5 5 0 0 0-5-5zm0 8a3 3 0 1 1 3-3 3 3 0 0 1-3 3zm9 11v-1a7 7 0 0 0-7-7h-4a7 7 0 0 0-7 7v1h2v-1a5 5 0 0 1 5-5h4a5 5 0 0 1 5 5v1z"}}]})(e)}},52097:(e,t,n)=>{"use strict";n.d(t,{d7:()=>o});var r=n(9950);function a(e,t,n,a){var i=this,o=(0,r.useRef)(null),c=(0,r.useRef)(0),s=(0,r.useRef)(0),u=(0,r.useRef)(null),l=(0,r.useRef)([]),d=(0,r.useRef)(),p=(0,r.useRef)(),v=(0,r.useRef)(e),m=(0,r.useRef)(!0);v.current=e;var f="undefined"!=typeof window,h=!t&&0!==t&&f;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,A=!("trailing"in n)||!!n.trailing,b="maxWait"in n,y="debounceOnServer"in n&&!!n.debounceOnServer,x=b?Math.max(+n.maxWait||0,t):null;(0,r.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var w=(0,r.useMemo)((function(){var e=function(e){var t=l.current,n=d.current;return l.current=d.current=null,c.current=e,s.current=s.current||e,p.current=v.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(u.current),u.current=h?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!m.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||b&&e-c.current>=x},w=function(t){return u.current=null,A&&l.current?e(t):(l.current=d.current=null,p.current)},C=function e(){var a=Date.now();if(g&&s.current===c.current&&M(),r(a))return w(a);if(m.current){var i=t-(a-o.current),u=b?Math.min(i,x-(a-c.current)):i;n(e,u)}},M=function(){a&&a({})},k=function(){if(f||y){var a=Date.now(),s=r(a);if(l.current=[].slice.call(arguments),d.current=i,o.current=a,s){if(!u.current&&m.current)return c.current=o.current,n(C,t),g?e(o.current):p.current;if(b)return n(C,t),e(o.current)}return u.current||n(C,t),p.current}};return k.cancel=function(){u.current&&(h?cancelAnimationFrame(u.current):clearTimeout(u.current)),c.current=0,l.current=o.current=d.current=u.current=null},k.isPending=function(){return!!u.current},k.flush=function(){return u.current?w(Date.now()):p.current},k}),[g,b,t,x,A,h,f,y,a]);return w}function i(e,t){return e===t}function o(e,t,n){var o=n&&n.equalityFn||i,c=(0,r.useRef)(e),s=(0,r.useState)({})[1],u=a((0,r.useCallback)((function(e){c.current=e,s({})}),[s]),t,n,s),l=(0,r.useRef)(e);return o(l.current,e)||(u(e),l.current=e),[c.current,u]}},55471:function(e){e.exports=(()=>{return e={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach(((r,a)=>{const i=r[0],o=r[1];n.push({text:e.slice(i,o),highlight:!0}),a===t.length-1?o{"use strict";n.d(t,{JXP:()=>i,wnV:()=>a});var r=n(99230);function a(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"}}]})(e)}function i(e){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"}}]})(e)}},97125:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(23235),a=n(44414);const i=(0,r.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/6810.2e79aa63.chunk.js b/build/static/js/6810.2e79aa63.chunk.js new file mode 100644 index 0000000..33aa927 --- /dev/null +++ b/build/static/js/6810.2e79aa63.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6810],{2046:(n,t,e)=>{e.d(t,{A:()=>S});var r=e(98587),a=e(58168),i=e(9950),o=e(72004),u=e(3484),s=e(89548),c=e(82053),l=e(15866),d=e(39766),h=e(59254),f=e(45558),m=e(1614);function p(n){return(0,m.Ay)("MuiInputAdornment",n)}const v=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var A,g=e(18463),b=e(44414);const w=["children","className","component","disablePointerEvents","disableTypography","position","variant"],y=(0,h.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(n,t)=>{const{ownerState:e}=n;return[t.root,t["position".concat((0,s.A)(e.position))],!0===e.disablePointerEvents&&t.disablePointerEvents,t[e.variant]]}})((n=>{let{theme:t,ownerState:e}=n;return(0,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===e.variant&&{["&.".concat(v.positionStart,"&:not(.").concat(v.hiddenLabel,")")]:{marginTop:16}},"start"===e.position&&{marginRight:8},"end"===e.position&&{marginLeft:8},!0===e.disablePointerEvents&&{pointerEvents:"none"})})),S=i.forwardRef((function(n,t){const e=(0,g.b)({props:n,name:"MuiInputAdornment"}),{children:h,className:f,component:m="div",disablePointerEvents:v=!1,disableTypography:S=!1,position:R,variant:x}=e,C=(0,r.A)(e,w),k=(0,d.A)()||{};let E=x;x&&k.variant,k&&!E&&(E=k.variant);const M=(0,a.A)({},e,{hiddenLabel:k.hiddenLabel,size:k.size,disablePointerEvents:v,position:R,variant:E}),P=(n=>{const{classes:t,disablePointerEvents:e,hiddenLabel:r,position:a,size:i,variant:o}=n,c={root:["root",e&&"disablePointerEvents",a&&"position".concat((0,s.A)(a)),o,r&&"hiddenLabel",i&&"size".concat((0,s.A)(i))]};return(0,u.A)(c,p,t)})(M);return(0,b.jsx)(l.A.Provider,{value:null,children:(0,b.jsx)(y,(0,a.A)({as:m,ownerState:M,className:(0,o.A)(P.root,f),ref:t},C,{children:"string"!==typeof h||S?(0,b.jsxs)(i.Fragment,{children:["start"===R?A||(A=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,h]}):(0,b.jsx)(c.A,{color:"text.secondary",children:h})}))})}))},7762:(n,t,e)=>{var r=e(24994);t.A=void 0;var a=r(e(79526)),i=e(44414);t.A=(0,a.default)((0,i.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:(n,t,e)=>{e.d(t,{I:()=>i});var r=e(69347),a=e(1729);function i(n,t){return(0,a.t)(n,r.$,t)}},52097:(n,t,e)=>{e.d(t,{d7:()=>o});var r=e(9950);function a(n,t,e,a){var i=this,o=(0,r.useRef)(null),u=(0,r.useRef)(0),s=(0,r.useRef)(0),c=(0,r.useRef)(null),l=(0,r.useRef)([]),d=(0,r.useRef)(),h=(0,r.useRef)(),f=(0,r.useRef)(n),m=(0,r.useRef)(!0);f.current=n;var p="undefined"!=typeof window,v=!t&&0!==t&&p;if("function"!=typeof n)throw new TypeError("Expected a function");t=+t||0;var A=!!(e=e||{}).leading,g=!("trailing"in e)||!!e.trailing,b="maxWait"in e,w="debounceOnServer"in e&&!!e.debounceOnServer,y=b?Math.max(+e.maxWait||0,t):null;(0,r.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var S=(0,r.useMemo)((function(){var n=function(n){var t=l.current,e=d.current;return l.current=d.current=null,u.current=n,s.current=s.current||n,h.current=f.current.apply(e,t)},e=function(n,t){v&&cancelAnimationFrame(c.current),c.current=v?requestAnimationFrame(n):setTimeout(n,t)},r=function(n){if(!m.current)return!1;var e=n-o.current;return!o.current||e>=t||e<0||b&&n-u.current>=y},S=function(t){return c.current=null,g&&l.current?n(t):(l.current=d.current=null,h.current)},R=function n(){var a=Date.now();if(A&&s.current===u.current&&x(),r(a))return S(a);if(m.current){var i=t-(a-o.current),c=b?Math.min(i,y-(a-u.current)):i;e(n,c)}},x=function(){a&&a({})},C=function(){if(p||w){var a=Date.now(),s=r(a);if(l.current=[].slice.call(arguments),d.current=i,o.current=a,s){if(!c.current&&m.current)return u.current=o.current,e(R,t),A?n(o.current):h.current;if(b)return e(R,t),n(o.current)}return c.current||e(R,t),h.current}};return C.cancel=function(){c.current&&(v?cancelAnimationFrame(c.current):clearTimeout(c.current)),u.current=0,l.current=o.current=d.current=c.current=null},C.isPending=function(){return!!c.current},C.flush=function(){return c.current?S(Date.now()):h.current},C}),[A,b,t,y,g,v,p,w,a]);return S}function i(n,t){return n===t}function o(n,t,e){var o=e&&e.equalityFn||i,u=(0,r.useRef)(n),s=(0,r.useState)({})[1],c=a((0,r.useCallback)((function(n){u.current=n,s({})}),[s]),t,e,s),l=(0,r.useRef)(n);return o(l.current,n)||(c(n),l.current=n),[u.current,c]}},82917:(n,t,e)=>{e.d(t,{A:()=>L});var r=e(57528),a=e(98587),i=e(58168),o=e(9950),u=e(72004),s=e(88283),c=e(3484);function l(n){return String(n).match(/[\d.\-+]*\s*(.*)/)[1]||""}function d(n){return parseFloat(n)}var h=e(97497),f=e(59254),m=e(18463),p=e(45558),v=e(1614);function A(n){return(0,v.Ay)("MuiSkeleton",n)}(0,p.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g,b,w,y,S=e(44414);const R=["animation","className","component","height","style","variant","width"];let x,C,k,E;const M=(0,s.i7)(x||(x=g||(g=(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"])))),P=(0,s.i7)(C||(C=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"])))),j=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(n,t)=>{const{ownerState:e}=n;return[t.root,t[e.variant],!1!==e.animation&&t[e.animation],e.hasChildren&&t.withChildren,e.hasChildren&&!e.width&&t.fitContent,e.hasChildren&&!e.height&&t.heightAuto]}})((n=>{let{theme:t,ownerState:e}=n;const r=l(t.shape.borderRadius)||"px",a=d(t.shape.borderRadius);return(0,i.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,h.X4)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===e.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(a).concat(r,"/").concat(Math.round(a/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===e.variant&&{borderRadius:"50%"},"rounded"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius},e.hasChildren&&{"& > *":{visibility:"hidden"}},e.hasChildren&&!e.width&&{maxWidth:"fit-content"},e.hasChildren&&!e.height&&{height:"auto"})}),(n=>{let{ownerState:t}=n;return"pulse"===t.animation&&(0,s.AH)(k||(k=w||(w=(0,r.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),M)}),(n=>{let{ownerState:t,theme:e}=n;return"wave"===t.animation&&(0,s.AH)(E||(E=y||(y=(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 "]))),P,(e.vars||e).palette.action.hover)})),L=o.forwardRef((function(n,t){const e=(0,m.b)({props:n,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:s="span",height:l,style:d,variant:h="text",width:f}=e,p=(0,a.A)(e,R),v=(0,i.A)({},e,{animation:r,component:s,variant:h,hasChildren:Boolean(p.children)}),g=(n=>{const{classes:t,variant:e,animation:r,hasChildren:a,width:i,height:o}=n,u={root:["root",e,r,a&&"withChildren",a&&!i&&"fitContent",a&&!o&&"heightAuto"]};return(0,c.A)(u,A,t)})(v);return(0,S.jsx)(j,(0,i.A)({as:s,ref:t,className:(0,u.A)(g.root,o),ownerState:v},p,{style:(0,i.A)({width:f,height:l},d)}))}))},97125:(n,t,e)=>{e.d(t,{A:()=>i});var r=e(23235),a=e(44414);const i=(0,r.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.2250b254.chunk.js b/build/static/js/6849.2250b254.chunk.js deleted file mode 100644 index 2c00e11..0000000 --- a/build/static/js/6849.2250b254.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6849],{23787:(e,t,n)=>{n.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});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}))},h=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]})]})},u=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),h=n.n(x),u=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: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,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"})})]})}},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:h="#662582",caption:u,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}),u&&(0,d.jsx)(a.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,n)=>{n.d(t,{A:()=>u});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),h=n(44414);const u=e=>{let{value:t,onChange:n,onDebouncedChange:u,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)((()=>{u&&u(b)}),[b,u]),(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,h.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,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(a.A,{title:"Clear",children:(0,h.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>n(""),children:(0,h.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),h=n(14857),u=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"),q=e=>Z(e,"26"),$=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($(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($(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(q(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,h.A)(),t=(0,u.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,he]=(0,r.useState)(null),[ue,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),he(null)}),[H]),(0,r.useEffect)((()=>{Ae(0),ke(null),he(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(ue),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($("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(q("#f59e0b"))}},children:[(0,B.jsx)(D.Ki0,{size:14}),"Orders \xb7 ",ue," \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(q(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;he(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($(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:$(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;he(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($(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($(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($("#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($("#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(q(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:()=>h});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 h=(0,r.forwardRef)(((e,t)=>{let{setAppId:n,setLocoName:h,setPage:u,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===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===n||void 0===n||n(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(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/6849.648780b7.chunk.js b/build/static/js/6849.648780b7.chunk.js new file mode 100644 index 0000000..a0a0de6 --- /dev/null +++ b/build/static/js/6849.648780b7.chunk.js @@ -0,0 +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 diff --git a/build/static/js/7099.f09d5814.chunk.js b/build/static/js/7099.f09d5814.chunk.js deleted file mode 100644 index ad4613d..0000000 --- a/build/static/js/7099.f09d5814.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7099],{2046:(t,e,n)=>{"use strict";n.d(e,{A:()=>C});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),s=n(3484),c=n(89548),u=n(82053),l=n(15866),d=n(39766),f=n(59254),p=n(45558),v=n(1614);function h(t){return(0,v.Ay)("MuiInputAdornment",t)}const m=(0,p.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g,b=n(18463),A=n(44414);const y=["children","className","component","disablePointerEvents","disableTypography","position","variant"],$=(0,f.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,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===n.variant&&{["&.".concat(m.positionStart,"&:not(.").concat(m.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),C=i.forwardRef((function(t,e){const n=(0,b.b)({props:t,name:"MuiInputAdornment"}),{children:f,className:p,component:v="div",disablePointerEvents:m=!1,disableTypography:C=!1,position:x,variant:S}=n,O=(0,r.A)(n,y),M=(0,d.A)()||{};let w=S;S&&M.variant,M&&!w&&(w=M.variant);const T=(0,a.A)({},n,{hiddenLabel:M.hiddenLabel,size:M.size,disablePointerEvents:m,position:x,variant:w}),D=(t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:a,size:i,variant:o}=t,u={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,c.A)(a)),o,r&&"hiddenLabel",i&&"size".concat((0,c.A)(i))]};return(0,s.A)(u,h,e)})(T);return(0,A.jsx)(l.A.Provider,{value:null,children:(0,A.jsx)($,(0,a.A)({as:v,ownerState:T,className:(0,o.A)(D.root,p),ref:e},O,{children:"string"!==typeof f||C?(0,A.jsxs)(i.Fragment,{children:["start"===x?g||(g=(0,A.jsx)("span",{className:"notranslate",children:"\u200b"})):null,f]}):(0,A.jsx)(u.A,{color:"text.secondary",children:f})}))})}))},7762:(t,e,n)=>{"use strict";var r=n(24994);e.A=void 0;var a=r(n(79526)),i=n(44414);e.A=(0,a.default)((0,i.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")},23266:(t,e,n)=>{"use strict";n.d(e,{A:()=>M});var r=n(98587),a=n(58168),i=n(9950),o=n(72004),s=n(3484),c=n(99269),u=n(59254),l=n(19608),d=n(18463),f=n(13372),p=n(24184),v=n(79044),h=n(31506),m=n(40777),g=n(92455),b=n(88543),A=n(45558),y=n(1614);function $(t){return(0,y.Ay)("MuiMenuItem",t)}const C=(0,A.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var x=n(44414);const S=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],O=(0,u.Ay)(p.A,{shouldForwardProp:t=>(0,l.A)(t)||"classes"===t,name:"MuiMenuItem",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]}})((t=>{let{theme:e,ownerState:n}=t;return(0,a.A)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((e.vars||e).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(C.selected)]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / ").concat(e.vars.palette.action.selectedOpacity,")"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),["&.".concat(C.focusVisible)]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / calc(").concat(e.vars.palette.action.selectedOpacity," + ").concat(e.vars.palette.action.focusOpacity,"))"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&.".concat(C.selected,":hover")]:{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / calc(").concat(e.vars.palette.action.selectedOpacity," + ").concat(e.vars.palette.action.hoverOpacity,"))"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.primary.mainChannel," / ").concat(e.vars.palette.action.selectedOpacity,")"):(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&.".concat(C.focusVisible)]:{backgroundColor:(e.vars||e).palette.action.focus},["&.".concat(C.disabled)]:{opacity:(e.vars||e).palette.action.disabledOpacity},["& + .".concat(m.A.root)]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},["& + .".concat(m.A.inset)]:{marginLeft:52},["& .".concat(b.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(b.A.inset)]:{paddingLeft:36},["& .".concat(g.A.root)]:{minWidth:36}},!n.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,a.A)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{["& .".concat(g.A.root," svg")]:{fontSize:"1.25rem"}}))})),M=i.forwardRef((function(t,e){const n=(0,d.b)({props:t,name:"MuiMenuItem"}),{autoFocus:c=!1,component:u="li",dense:l=!1,divider:p=!1,disableGutters:m=!1,focusVisibleClassName:g,role:b="menuitem",tabIndex:A,className:y}=n,C=(0,r.A)(n,S),M=i.useContext(f.A),w=i.useMemo((()=>({dense:l||M.dense||!1,disableGutters:m})),[M.dense,l,m]),T=i.useRef(null);(0,v.A)((()=>{c&&T.current&&T.current.focus()}),[c]);const D=(0,a.A)({},n,{dense:w.dense,divider:p,disableGutters:m}),R=(t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:c}=t,u={root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,s.A)(u,$,c);return(0,a.A)({},c,l)})(n),I=(0,h.A)(T,e);let k;return n.disabled||(k=void 0!==A?A:-1),(0,x.jsx)(f.A.Provider,{value:w,children:(0,x.jsx)(O,(0,a.A)({ref:I,role:b,tabIndex:k,component:u,focusVisibleClassName:(0,o.A)(R.focusVisible,g),className:(0,o.A)(R.root,y)},C,{ownerState:D,classes:R}))})}))},36220:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,i){var o=a.prototype;i.utc=function(t){return new a({date:t,utc:!0,args:arguments})},o.utc=function(e){var n=i(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},o.local=function(){return i(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,a){var i=this.$utils().u;if(i(r))return this.$u?0:i(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 a=(""+r[0]).match(n)||["-",0,0],i=a[0],o=60*+a[1]+ +a[2];return 0===o?0:"+"===i?o:-o}(r),null===r))return this;var o=Math.abs(r)<=16?60*r:r,s=this;if(a)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 d=o.toDate;o.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=o.diff;o.diff=function(t,e,n){if(t&&this.$u===t.$u)return f.call(this,t,e,n);var r=this.local(),a=i(t).local();return f.call(r,a,e,n)}}}()},52097:(t,e,n)=>{"use strict";n.d(e,{d7:()=>o});var r=n(9950);function a(t,e,n,a){var i=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)([]),d=(0,r.useRef)(),f=(0,r.useRef)(),p=(0,r.useRef)(t),v=(0,r.useRef)(!0);p.current=t;var h="undefined"!=typeof window,m=!e&&0!==e&&h;if("function"!=typeof t)throw new TypeError("Expected a function");e=+e||0;var g=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,A="maxWait"in n,y="debounceOnServer"in n&&!!n.debounceOnServer,$=A?Math.max(+n.maxWait||0,e):null;(0,r.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var C=(0,r.useMemo)((function(){var t=function(t){var e=l.current,n=d.current;return l.current=d.current=null,s.current=t,c.current=c.current||t,f.current=p.current.apply(n,e)},n=function(t,e){m&&cancelAnimationFrame(u.current),u.current=m?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||A&&t-s.current>=$},C=function(e){return u.current=null,b&&l.current?t(e):(l.current=d.current=null,f.current)},x=function t(){var a=Date.now();if(g&&c.current===s.current&&S(),r(a))return C(a);if(v.current){var i=e-(a-o.current),u=A?Math.min(i,$-(a-s.current)):i;n(t,u)}},S=function(){a&&a({})},O=function(){if(h||y){var a=Date.now(),c=r(a);if(l.current=[].slice.call(arguments),d.current=i,o.current=a,c){if(!u.current&&v.current)return s.current=o.current,n(x,e),g?t(o.current):f.current;if(A)return n(x,e),t(o.current)}return u.current||n(x,e),f.current}};return O.cancel=function(){u.current&&(m?cancelAnimationFrame(u.current):clearTimeout(u.current)),s.current=0,l.current=o.current=d.current=u.current=null},O.isPending=function(){return!!u.current},O.flush=function(){return u.current?C(Date.now()):f.current},O}),[g,A,e,$,b,m,h,y,a]);return C}function i(t,e){return t===e}function o(t,e,n){var o=n&&n.equalityFn||i,s=(0,r.useRef)(t),c=(0,r.useState)({})[1],u=a((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]}},97125:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(23235),a=n(44414);const i=(0,r.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/7809.56441bc3.chunk.js b/build/static/js/7809.56441bc3.chunk.js deleted file mode 100644 index 5d04a9f..0000000 --- a/build/static/js/7809.56441bc3.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7809],{46639:(t,e,r)=>{r.d(e,{A:()=>R});var s=r(57528),i=r(98587),a=r(58168),n=r(9950),o=r(72004),l=r(3484),c=r(88283),h=r(89548),u=r(18463),d=r(59254),v=r(45558),A=r(1614);function m(t){return(0,A.Ay)("MuiCircularProgress",t)}(0,v.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var p,k,f,b,w=r(44414);const y=["className","color","disableShrink","size","style","thickness","value","variant"];let S,g,x,M;const C=44,O=(0,c.i7)(S||(S=p||(p=(0,s.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),E=(0,c.i7)(g||(g=k||(k=(0,s.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,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["color".concat((0,h.A)(r.color))]]}})((t=>{let{ownerState:e,theme:r}=t;return(0,a.A)({display:"inline-block"},"determinate"===e.variant&&{transition:r.transitions.create("transform")},"inherit"!==e.color&&{color:(r.vars||r).palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&(0,c.AH)(x||(x=f||(f=(0,s.A)(["\n animation: "," 1.4s linear infinite;\n "]))),O)})),j=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),D=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e["circle".concat((0,h.A)(r.variant))],r.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:r}=t;return(0,a.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&!e.disableShrink&&(0,c.AH)(M||(M=b||(b=(0,s.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),E)})),R=n.forwardRef((function(t,e){const r=(0,u.b)({props:t,name:"MuiCircularProgress"}),{className:s,color:n="primary",disableShrink:c=!1,size:d=40,style:v,thickness:A=3.6,value:p=0,variant:k="indeterminate"}=r,f=(0,i.A)(r,y),b=(0,a.A)({},r,{color:n,disableShrink:c,size:d,thickness:A,value:p,variant:k}),S=(t=>{const{classes:e,variant:r,color:s,disableShrink:i}=t,a={root:["root",r,"color".concat((0,h.A)(s))],svg:["svg"],circle:["circle","circle".concat((0,h.A)(r)),i&&"circleDisableShrink"]};return(0,l.A)(a,m,e)})(b),g={},x={},M={};if("determinate"===k){const t=2*Math.PI*((C-A)/2);g.strokeDasharray=t.toFixed(3),M["aria-valuenow"]=Math.round(p),g.strokeDashoffset="".concat(((100-p)/100*t).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,w.jsx)(P,(0,a.A)({className:(0,o.A)(S.root,s),style:(0,a.A)({width:d,height:d},x,v),ownerState:b,ref:e,role:"progressbar"},M,f,{children:(0,w.jsx)(j,{className:S.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(C," ").concat(C),children:(0,w.jsx)(D,{className:S.circle,style:g,ownerState:b,cx:C,cy:C,r:(C-A)/2,fill:"none",strokeWidth:A})})}))}))},51778:(t,e,r)=>{r.d(e,{n:()=>M});var s,i,a,n,o,l,c=r(89379),h=r(9950),u=r(39790),d=r(55149),v=r(64137),A=r(83568),m=r(53167),p=r(92750),k=r(15941),f=r(95732),b=r(61664),w=(s=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,o=new WeakSet,l=new WeakSet,class extends f.Q{constructor(t,e){super(),(0,u.A)(this,l),(0,u.A)(this,o),(0,d.A)(this,s,{writable:!0,value:void 0}),(0,d.A)(this,i,{writable:!0,value:void 0}),(0,d.A)(this,a,{writable:!0,value:void 0}),(0,d.A)(this,n,{writable:!0,value:void 0}),(0,m.A)(this,i,void 0),(0,m.A)(this,s,t),this.setOptions(e),this.bindMethods(),(0,A.A)(this,o,y).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const r=this.options;this.options=(0,v.A)(this,s).defaultMutationOptions(t),(0,b.f8)(r,this.options)||(0,v.A)(this,s).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,v.A)(this,a),observer:this}),null===(e=(0,v.A)(this,a))||void 0===e||e.setOptions(this.options),null!==r&&void 0!==r&&r.mutationKey&&this.options.mutationKey&&(0,b.EN)(r.mutationKey)!==(0,b.EN)(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var t;this.hasListeners()||(null===(t=(0,v.A)(this,a))||void 0===t||t.removeObserver(this))}onMutationUpdate(t){(0,A.A)(this,o,y).call(this),(0,A.A)(this,l,S).call(this,t)}getCurrentResult(){return(0,v.A)(this,i)}reset(){var t;null===(t=(0,v.A)(this,a))||void 0===t||t.removeObserver(this),(0,m.A)(this,a,void 0),(0,A.A)(this,o,y).call(this),(0,A.A)(this,l,S).call(this)}mutate(t,e){var r;return(0,m.A)(this,n,e),null===(r=(0,v.A)(this,a))||void 0===r||r.removeObserver(this),(0,m.A)(this,a,(0,v.A)(this,s).getMutationCache().build((0,v.A)(this,s),this.options)),(0,v.A)(this,a).addObserver(this),(0,v.A)(this,a).execute(t)}});function y(){var t,e;const r=null!==(t=null===(e=(0,v.A)(this,a))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,p.$)();(0,m.A)(this,i,(0,c.A)((0,c.A)({},r),{},{isPending:"pending"===r.status,isSuccess:"success"===r.status,isError:"error"===r.status,isIdle:"idle"===r.status,mutate:this.mutate,reset:this.reset}))}function S(t){k.j.batch((()=>{if((0,v.A)(this,n)&&this.hasListeners()){const u=(0,v.A)(this,i).variables,d=(0,v.A)(this,i).context;var e,r,s,a;if("success"===(null===t||void 0===t?void 0:t.type))null===(e=(r=(0,v.A)(this,n)).onSuccess)||void 0===e||e.call(r,t.data,u,d),null===(s=(a=(0,v.A)(this,n)).onSettled)||void 0===s||s.call(a,t.data,null,u,d);else if("error"===(null===t||void 0===t?void 0:t.type)){var o,l,c,h;null===(o=(l=(0,v.A)(this,n)).onError)||void 0===o||o.call(l,t.error,u,d),null===(c=(h=(0,v.A)(this,n)).onSettled)||void 0===c||c.call(h,void 0,t.error,u,d)}}this.listeners.forEach((t=>{t((0,v.A)(this,i))}))}))}var g=r(15441),x=r(98986);function M(t,e){const r=(0,g.jE)(e),[s]=h.useState((()=>new w(r,t)));h.useEffect((()=>{s.setOptions(t)}),[s,t]);const i=h.useSyncExternalStore(h.useCallback((t=>s.subscribe(k.j.batchCalls(t))),[s]),(()=>s.getCurrentResult()),(()=>s.getCurrentResult())),a=h.useCallback(((t,e)=>{s.mutate(t,e).catch(C)}),[s]);if(i.error&&(0,x.G)(s.options.throwOnError,[i.error]))throw i.error;return(0,c.A)((0,c.A)({},i),{},{mutate:a,mutateAsync:i.mutate})}function C(){}},63189:(t,e,r)=>{var s=r(24994);e.A=void 0;var i=s(r(79526)),a=r(44414);e.A=(0,i.default)((0,a.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},99324:(t,e,r)=>{r.d(e,{eQE:()=>i});var s=r(99230);function i(t){return(0,s.k5)({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}}]})(t)}}}]); \ No newline at end of file diff --git a/build/static/js/8846.90c19cd6.chunk.js b/build/static/js/8846.e95756a1.chunk.js similarity index 84% rename from build/static/js/8846.90c19cd6.chunk.js rename to build/static/js/8846.e95756a1.chunk.js index fc12d20..cf11f0b 100644 --- a/build/static/js/8846.90c19cd6.chunk.js +++ b/build/static/js/8846.e95756a1.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"})})]})}},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(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 diff --git a/build/static/js/9027.574b1256.chunk.js b/build/static/js/9027.574b1256.chunk.js new file mode 100644 index 0000000..f5abcd9 --- /dev/null +++ b/build/static/js/9027.574b1256.chunk.js @@ -0,0 +1 @@ +(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9027],{4159:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,s=36e5,i="millisecond",n="second",r="minute",a="hour",u="day",o="week",c="month",h="quarter",l="year",f="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,A={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(t){var e=["th","st","nd","rd"],s=t%100;return"["+t+(e[(s-20)%10]||e[s]||e[0])+"]"}},m=function(t,e,s){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(s)+t},$={s:m,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),i=Math.floor(s/60),n=s%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(n,2,"0")},m:function t(e,s){if(e.date()1)return t(a[0])}else{var u=e.name;y[u]=e,n=u}return!i&&n&&(b=n),n||!i&&b},O=function(t,e){if(w(t))return t.clone();var s="object"==typeof e?e:{};return s.date=t,s.args=arguments,new k(s)},S=$;S.l=M,S.i=w,S.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var k=function(){function A(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[g]=!0}var m=A.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,s=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(p);if(i){var n=i[2]-1||0,r=(i[7]||"0").substring(0,3);return s?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var s=O(t);return this.startOf(e)<=s&&s<=this.endOf(e)},m.isAfter=function(t,e){return O(t){"use strict";s.d(e,{m:()=>u});var i=s(464),n=s(69995),r=s(2527),a=s(9950);const u=(0,i.wk)((function(t,e){const s=new r.Tooltip(t,e.overlayContainer);return(0,n.Q)(s,e)}),(function(t,e,s,i){let{position:n}=s;(0,a.useEffect)((function(){const s=e.overlayContainer;if(null==s)return;const{instance:r}=t,a=t=>{t.tooltip===r&&(null!=n&&r.setLatLng(n),r.update(),i(!0))},u=t=>{t.tooltip===r&&i(!1)};return s.on({tooltipopen:a,tooltipclose:u}),s.bindTooltip(r),function(){s.off({tooltipopen:a,tooltipclose:u}),null!=s._map&&s.unbindTooltip()}}),[t,e,i,n])}))},36150:(t,e,s)=>{"use strict";s.d(e,{I:()=>r});var i=s(69347),n=s(1729);function r(t,e){return(0,n.t)(t,i.$,e)}},36687:(t,e,s)=>{"use strict";s.d(e,{E:()=>T});var i,n,r,a,u,o,c,h,l,f,d,p=s(80045),v=s(9950),A=s(39790),m=s(55149),$=s(64137),b=s(83568),y=s(53167),g=s(15941),w=s(69347),M=s(95732),O=s(61664);function S(t,e){return t.filter((t=>!e.includes(t)))}var k=(i=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakMap,o=new WeakMap,c=new WeakSet,h=new WeakSet,l=new WeakSet,f=new WeakSet,d=new WeakSet,class extends M.Q{constructor(t,e,s){super(),(0,A.A)(this,d),(0,A.A)(this,f),(0,A.A)(this,l),(0,A.A)(this,h),(0,A.A)(this,c),(0,m.A)(this,i,{writable:!0,value:void 0}),(0,m.A)(this,n,{writable:!0,value:void 0}),(0,m.A)(this,r,{writable:!0,value:void 0}),(0,m.A)(this,a,{writable:!0,value:void 0}),(0,m.A)(this,u,{writable:!0,value:void 0}),(0,m.A)(this,o,{writable:!0,value:void 0}),(0,y.A)(this,i,t),(0,y.A)(this,r,[]),(0,y.A)(this,a,[]),(0,b.A)(this,c,D).call(this,[]),this.setQueries(e,s)}onSubscribe(){1===this.listeners.size&&(0,$.A)(this,a).forEach((t=>{t.subscribe((e=>{(0,b.A)(this,f,E).call(this,t,e)}))}))}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,(0,$.A)(this,a).forEach((t=>{t.destroy()}))}setQueries(t,e,s){(0,y.A)(this,r,t),(0,y.A)(this,u,e),g.j.batch((()=>{const t=(0,$.A)(this,a),e=(0,b.A)(this,l,P).call(this,(0,$.A)(this,r));e.forEach((t=>t.observer.setOptions(t.defaultedQueryOptions,s)));const i=e.map((t=>t.observer)),n=i.map((t=>t.getCurrentResult())),u=i.some(((e,s)=>e!==t[s]));(t.length!==i.length||u)&&((0,y.A)(this,a,i),(0,b.A)(this,c,D).call(this,n),this.hasListeners()&&(S(t,i).forEach((t=>{t.destroy()})),S(i,t).forEach((t=>{t.subscribe((e=>{(0,b.A)(this,f,E).call(this,t,e)}))})),(0,b.A)(this,d,x).call(this)))}))}getCurrentResult(){return(0,$.A)(this,o)}getQueries(){return(0,$.A)(this,a).map((t=>t.getCurrentQuery()))}getObservers(){return(0,$.A)(this,a)}getOptimisticResult(t,e){const s=(0,b.A)(this,l,P).call(this,t),i=s.map((t=>t.observer.getOptimisticResult(t.defaultedQueryOptions)));return[i,t=>(0,b.A)(this,h,C).call(this,null!==t&&void 0!==t?t:i,e),()=>s.map(((t,e)=>{const s=i[e];return t.defaultedQueryOptions.notifyOnChangeProps?s:t.observer.trackResult(s)}))]}});function D(t){var e;(0,y.A)(this,n,t),(0,y.A)(this,o,(0,b.A)(this,h,C).call(this,t,null===(e=(0,$.A)(this,u))||void 0===e?void 0:e.combine))}function C(t,e){return e?(0,O.BH)((0,$.A)(this,o),e(t)):t}function P(t){const e=(0,$.A)(this,a),s=new Map(e.map((t=>[t.options.queryHash,t]))),n=t.map((t=>(0,$.A)(this,i).defaultQueryOptions(t))),r=n.flatMap((t=>{const e=s.get(t.queryHash);return null!=e?[{defaultedQueryOptions:t,observer:e}]:[]})),u=new Set(r.map((t=>t.defaultedQueryOptions.queryHash))),o=n.filter((t=>!u.has(t.queryHash))),c=t=>{const e=(0,$.A)(this,i).defaultQueryOptions(t),s=(0,$.A)(this,a).find((t=>t.options.queryHash===e.queryHash));return null!==s&&void 0!==s?s:new w.$((0,$.A)(this,i),e)},h=o.map((t=>({defaultedQueryOptions:t,observer:c(t)})));return r.concat(h).sort(((t,e)=>n.indexOf(t.defaultedQueryOptions)-n.indexOf(e.defaultedQueryOptions)))}function E(t,e){const s=(0,$.A)(this,a).indexOf(t);-1!==s&&((0,b.A)(this,c,D).call(this,function(t,e,s){const i=t.slice(0);return i[e]=s,i}((0,$.A)(this,n),s,e)),(0,b.A)(this,d,x).call(this))}function x(){g.j.batch((()=>{this.listeners.forEach((t=>{t((0,$.A)(this,n))}))}))}var W=s(15441),_=s(30618),Q=s(45904),L=s(80958),R=s(73895);const H=["queries"];function T(t,e){let{queries:s}=t,i=(0,p.A)(t,H);const n=(0,W.jE)(e),r=(0,_.w)(),a=(0,Q.h)(),u=v.useMemo((()=>s.map((t=>{const e=n.defaultQueryOptions(t);return e._optimisticResults=r?"isRestoring":"optimistic",e}))),[s,n,r]);u.forEach((t=>{(0,R.tu)(t),(0,L.LJ)(t,a)})),(0,L.wZ)(a);const[o]=v.useState((()=>new k(n,u,i))),[c,h,l]=o.getOptimisticResult(u,i.combine);v.useSyncExternalStore(v.useCallback((t=>r?()=>{}:o.subscribe(g.j.batchCalls(t))),[o,r]),(()=>o.getCurrentResult()),(()=>o.getCurrentResult())),v.useEffect((()=>{o.setQueries(u,i,{listeners:!1})}),[u,i,o]);const f=c.some(((t,e)=>(0,R.EU)(u[e],t)))?c.flatMap(((t,e)=>{const s=u[e];if(s){const e=new w.$(n,s);if((0,R.EU)(s,t))return(0,R.iL)(s,e,a);(0,R.nE)(t,r)&&(0,R.iL)(s,e,a)}return[]})):[];if(f.length>0)throw Promise.all(f);const d=c.find(((t,e)=>{const s=u[e];return s&&(0,L.$1)({result:t,errorResetBoundary:a,throwOnError:s.throwOnError,query:n.getQueryCache().get(s.queryHash)})}));if(null!==d&&void 0!==d&&d.error)throw d.error;return h(l())}},37119:(t,e,s)=>{"use strict";s.d(e,{p:()=>r});var i=s(464),n=s(2527);const r=(0,i.T7)((function(t){return new n.Control.Zoom(t)}))},48513:(t,e,s)=>{"use strict";s.d(e,{z:()=>u});var i=s(464),n=s(69995),r=s(2527),a=s(9950);const u=(0,i.wk)((function(t,e){const s=new r.Popup(t,e.overlayContainer);return(0,n.Q)(s,e)}),(function(t,e,s,i){let{position:n}=s;(0,a.useEffect)((function(){const{instance:s}=t;function r(t){t.popup===s&&(s.update(),i(!0))}function a(t){t.popup===s&&i(!1)}return e.map.on({popupopen:r,popupclose:a}),null==e.overlayContainer?(null!=n&&s.setLatLng(n),s.openOn(e.map)):e.overlayContainer.bindPopup(s),function(){var t;e.map.off({popupopen:r,popupclose:a}),null===(t=e.overlayContainer)||void 0===t||t.unbindPopup(),e.map.removeLayer(s)}}),[t,e,i,n])}))},51778:(t,e,s)=>{"use strict";s.d(e,{n:()=>S});var i,n,r,a,u,o,c=s(89379),h=s(9950),l=s(39790),f=s(55149),d=s(64137),p=s(83568),v=s(53167),A=s(92750),m=s(15941),$=s(95732),b=s(61664),y=(i=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakSet,o=new WeakSet,class extends $.Q{constructor(t,e){super(),(0,l.A)(this,o),(0,l.A)(this,u),(0,f.A)(this,i,{writable:!0,value:void 0}),(0,f.A)(this,n,{writable:!0,value:void 0}),(0,f.A)(this,r,{writable:!0,value:void 0}),(0,f.A)(this,a,{writable:!0,value:void 0}),(0,v.A)(this,n,void 0),(0,v.A)(this,i,t),this.setOptions(e),this.bindMethods(),(0,p.A)(this,u,g).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const s=this.options;this.options=(0,d.A)(this,i).defaultMutationOptions(t),(0,b.f8)(s,this.options)||(0,d.A)(this,i).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,d.A)(this,r),observer:this}),null===(e=(0,d.A)(this,r))||void 0===e||e.setOptions(this.options),null!==s&&void 0!==s&&s.mutationKey&&this.options.mutationKey&&(0,b.EN)(s.mutationKey)!==(0,b.EN)(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var t;this.hasListeners()||(null===(t=(0,d.A)(this,r))||void 0===t||t.removeObserver(this))}onMutationUpdate(t){(0,p.A)(this,u,g).call(this),(0,p.A)(this,o,w).call(this,t)}getCurrentResult(){return(0,d.A)(this,n)}reset(){var t;null===(t=(0,d.A)(this,r))||void 0===t||t.removeObserver(this),(0,v.A)(this,r,void 0),(0,p.A)(this,u,g).call(this),(0,p.A)(this,o,w).call(this)}mutate(t,e){var s;return(0,v.A)(this,a,e),null===(s=(0,d.A)(this,r))||void 0===s||s.removeObserver(this),(0,v.A)(this,r,(0,d.A)(this,i).getMutationCache().build((0,d.A)(this,i),this.options)),(0,d.A)(this,r).addObserver(this),(0,d.A)(this,r).execute(t)}});function g(){var t,e;const s=null!==(t=null===(e=(0,d.A)(this,r))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,A.$)();(0,v.A)(this,n,(0,c.A)((0,c.A)({},s),{},{isPending:"pending"===s.status,isSuccess:"success"===s.status,isError:"error"===s.status,isIdle:"idle"===s.status,mutate:this.mutate,reset:this.reset}))}function w(t){m.j.batch((()=>{if((0,d.A)(this,a)&&this.hasListeners()){const l=(0,d.A)(this,n).variables,f=(0,d.A)(this,n).context;var e,s,i,r;if("success"===(null===t||void 0===t?void 0:t.type))null===(e=(s=(0,d.A)(this,a)).onSuccess)||void 0===e||e.call(s,t.data,l,f),null===(i=(r=(0,d.A)(this,a)).onSettled)||void 0===i||i.call(r,t.data,null,l,f);else if("error"===(null===t||void 0===t?void 0:t.type)){var u,o,c,h;null===(u=(o=(0,d.A)(this,a)).onError)||void 0===u||u.call(o,t.error,l,f),null===(c=(h=(0,d.A)(this,a)).onSettled)||void 0===c||c.call(h,void 0,t.error,l,f)}}this.listeners.forEach((t=>{t((0,d.A)(this,n))}))}))}var M=s(15441),O=s(98986);function S(t,e){const s=(0,M.jE)(e),[i]=h.useState((()=>new y(s,t)));h.useEffect((()=>{i.setOptions(t)}),[i,t]);const n=h.useSyncExternalStore(h.useCallback((t=>i.subscribe(m.j.batchCalls(t))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),r=h.useCallback(((t,e)=>{i.mutate(t,e).catch(k)}),[i]);if(n.error&&(0,O.G)(i.options.throwOnError,[n.error]))throw n.error;return(0,c.A)((0,c.A)({},n),{},{mutate:r,mutateAsync:n.mutate})}function k(){}},60010:(t,e,s)=>{"use strict";s.d(e,{q:()=>o});var i=s(89379),n=s(69347),r=s(45247),a=class extends n.${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,i.A)((0,i.A)({},t),{},{behavior:(0,r.PL)()}),e)}getOptimisticResult(t){return t.behavior=(0,r.PL)(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(t){return this.fetch((0,i.A)((0,i.A)({},t),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(t,e){var s,n;const{state:a}=t,u=super.createResult(t,e),{isFetching:o,isRefetching:c}=u,h=o&&"forward"===(null===(s=a.fetchMeta)||void 0===s||null===(s=s.fetchMore)||void 0===s?void 0:s.direction),l=o&&"backward"===(null===(n=a.fetchMeta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction);return(0,i.A)((0,i.A)({},u),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.rB)(e,a.data),hasPreviousPage:(0,r.RQ)(e,a.data),isFetchingNextPage:h,isFetchingPreviousPage:l,isRefetching:c&&!h&&!l})}},u=s(1729);function o(t,e){return(0,u.t)(t,a,e)}},98007:(t,e,s)=>{"use strict";s.d(e,{ko:()=>n});var i=s(3388);s(9950);function n(){return(0,i.U$)().map}}}]); \ No newline at end of file diff --git a/build/static/js/9438.463ad394.chunk.js b/build/static/js/9438.463ad394.chunk.js new file mode 100644 index 0000000..c9c0cf1 --- /dev/null +++ b/build/static/js/9438.463ad394.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9438],{9438:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Z});var r=o(89379),n=o(9950),i=o(60010),l=o(2235),s=o(41413),a=o(83274),d=o(16491),c=o(14857),u=o(47223),x=o(60899),h=o(82053),f=o(93230),p=o(1320),g=o(15769),m=o(69780),b=o(9213),v=o(21671),A=o(34075),j=o(25277),w=o(31222),S=o(4159),C=o.n(S),y=o(81425),D=o(52351),R=o(35678),k=o(59212),M=o(56311),P=o(27001),N=o(36803),W=o(23787),Y=o(44414),I=o(36220);C().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"),H=e=>L(e,"55"),O=e=>L(e,"26"),B="#662582",E=e=>(0,Y.jsx)(l.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:z.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),_=e=>{let{color:t,selected:o,size:r=24,children:n}=e;return(0,Y.jsx)(s.A,{sx:{width:r,height:r,bgcolor:o?t:F(t),color:o?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},J=e=>{let{color:t,icon:o,label:r,tooltip:n,minWidth:i=80}=e;return(0,Y.jsx)(a.A,{title:n||"",placement:"top",children:(0,Y.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(H(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[o,r]})})},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 o=null===e||void 0===e?void 0:e.assigntime;if(!o)return null;const r=String(o).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return null;const n=C()(o);return n.isValid()?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;for(const o of t)if(e>=o.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 o;const r=e.id||"slot-".concat(t+1),n=Number(e.startHour)||0,i=Number(e.endHour)||24;return{id:r,name:e.name||(null===(o=K.find((e=>e.id===r)))||void 0===o?void 0:o.name)||"Slot ".concat(t+1),startHour:n,endHour:i}})):K}catch(e){return K}}),[]),{data:we,isLoading:Se,fetchNextPage:Ce,hasNextPage:ye,isFetchingNextPage:De}=(0,i.q)({queryKey:["fetchdeliveries",fe,Ae,"all",ne,le,50,"",0,0,0],queryFn:y.tL,getNextPageParam:e=>{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0},refetchOnWindowFocus:!1});(0,n.useEffect)((()=>{ye&&!De&&Ce()}),[ye,De,Ce]);const Re=(0,n.useMemo)((()=>{const e=((null===we||void 0===we?void 0:we.pages)||[]).flatMap((e=>e.rows||[])),t=new Set,o=[];for(const r of e){const e=null!=r.orderid?String(r.orderid):null;e&&t.has(e)||(e&&t.add(e),o.push(r))}return o}),[we]),ke=(0,n.useMemo)((()=>{const e={};return Re.forEach((t=>{const o=String(t.userid||t.rider_id||"");o&&"unassigned"!==o&&"0"!==o&&(e[o]||(e[o]={id:o,riderName:t.ridername||t.rider_name||t.username||"Rider ".concat(o),orders:[]}),e[o].orders.some((e=>e.orderid===t.orderid))||e[o].orders.push(t))})),Object.values(e).map((e=>(0,r.A)((0,r.A)({},e),{},{orders:[...e.orders].sort(((e,t)=>{const o=e.trip_number||1,r=t.trip_number||1;return o!==r?o-r:(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,o=0,n=0,i=0,l=0;const s=ke.map((s=>{let a=0,d=0;const c=new Set;let u=0;if(s.orders.forEach((e=>{const t=V(e,je);if(!t)return;const o=parseFloat(e.kms||e.actualkms||0);d+=o,a+=o<=8?30:30+6*(o-8);const r=e.assigntime?C()(e.assigntime).format("YYYY-MM-DD"):"unknown";c.add("".concat(r,"_").concat(t)),u++})),0===u)return null;const x=2.5*d,h=166.67*c.size,f=x+h,p=a-f,g=a>0?p/a*100:0;return p>=0?i++:l++,t+=u,o+=a,n+=f,e++,(0,r.A)((0,r.A)({},s),{},{kms:d,revenue:a,varCost:x,fixedCost:h,totalCost:f,net:p,margin:g})})).filter(Boolean),a=o-n;return{activeRiders:e,totalOrders:t,totalRevenue:o,totalCost:n,totalNet:a,totalMargin:o>0?a/o*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(!be)return e;const t=be.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,be]),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!==(o=null===Me||void 0===Me?void 0:Me.lossRiders)&&void 0!==o?o: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,Y.jsxs)(Y.Fragment,{children:[(Se||De)&&(0,Y.jsx)(D.A,{}),(0,Y.jsx)(P.A,{title:"Profitability Report",subtitle:"Live \xb7 ".concat(ae||"All Zones"," \xb7 ").concat(xe),live:!0,action:(0,Y.jsx)(k.A,{locaName:ae,setAppId:pe,setLocoName:de,pill:!0,accentColor:B,icon:(0,Y.jsx)(w.HPi,{size:14}),placeholder:"Select Zone",paperComponent:E,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,Y.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 o=e.icon;return(0,Y.jsxs)(x.Ay,{item:!0,xs:6,sm:6,md:3,children:[(0,Y.jsx)(N.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,Y.jsx)(o,{size:20}),color:e.color,loading:Se}),(0,Y.jsx)(h.A,{variant:"caption",sx:{color:z.textSecondary,display:"block",mt:.5,px:2,fontWeight:500},children:e.detail})]},e.key)}))}),(0,Y.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,Y.jsxs)(f.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,Y.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,Y.jsx)(_,{color:B,size:32,children:(0,Y.jsx)(w.LTk,{size:18})}),(0,Y.jsxs)(f.A,{children:[(0,Y.jsxs)(h.A,{variant:"caption",sx:{fontWeight:800,color:z.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:["Profitability Overview \xb7 ",xe]}),(0,Y.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,Y.jsx)(a.A,{title:"Date Filter",placement:"top",children:(0,Y.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(H("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,ml:1,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(O("#f59e0b"))}},children:[(0,Y.jsx)(w.Ki0,{size:14}),C()(ne).format("DD/MM/YY")," \u2013 ",C()(le).format("DD/MM/YY")]})})]}),(0,Y.jsx)(d.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,Y.jsx)(M.A,{value:ge,onChange:me,onDebouncedChange:ve,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(O(B))}}})})]})}),(0,Y.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:re?(0,Y.jsx)(W.nV,{scroll:!0,children:Pe&&0!==Pe.length?Pe.map(((e,t)=>{var o;if(!e)return null;const r=(null!==(o=e.net)&&void 0!==o?o:0)>=0;return(0,Y.jsx)(W.pg,{accent:r?"#10b981":"#ef4444",header:(0,Y.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,Y.jsx)(_,{color:r?"#10b981":"#ef4444",size:36,children:(0,Y.jsx)(w.LTk,{size:18})}),(0,Y.jsxs)(f.A,{children:[(0,Y.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:z.textPrimary},children:e.riderName}),(0,Y.jsxs)(h.A,{variant:"caption",sx:{color:z.textSecondary},children:["ID #",e.id]})]})]}),children:(0,Y.jsxs)(W.FG,{columns:2,children:[(0,Y.jsx)(W.pY,{label:"Orders",value:e.orders.length}),(0,Y.jsx)(W.pY,{label:"Distance",value:"".concat(e.kms.toFixed(2)," km")}),(0,Y.jsx)(W.pY,{label:"Revenue",value:q(e.revenue)}),(0,Y.jsx)(W.pY,{label:"Fixed Cost",value:q(e.fixedCost)}),(0,Y.jsx)(W.pY,{label:"Variable Cost",value:q(e.varCost)}),(0,Y.jsx)(W.pY,{label:"Total Cost",value:q(e.totalCost)}),(0,Y.jsx)(W.pY,{label:"Net Profit",value:"".concat(r?"+":"").concat(q(e.net)),full:!0}),(0,Y.jsx)(W.pY,{label:"Margin",value:"".concat(Math.abs(e.margin).toFixed(0),"%"),full:!0})]})},e.id||t)})):(0,Y.jsxs)(f.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,Y.jsx)(s.A,{sx:{width:64,height:64,bgcolor:F("#94a3b8"),color:z.textMuted},children:(0,Y.jsx)(w.LTk,{size:28})}),(0,Y.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:z.textPrimary},children:"No riders to show"})]})}):(0,Y.jsx)(p.A,{sx:{maxHeight:"calc(100vh - 280px)","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:H(B),borderRadius:8,"&:hover":{backgroundColor:B}},"&::-webkit-scrollbar-track":{backgroundColor:z.surfaceAlt}},children:(0,Y.jsxs)(g.A,{stickyHeader:!0,sx:{minWidth:1e3},children:[(0,Y.jsx)(m.A,{children:(0,Y.jsxs)(b.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,Y.jsx)(v.A,{children:"#"}),(0,Y.jsx)(v.A,{children:"Rider"}),(0,Y.jsx)(v.A,{align:"center",children:"Orders"}),(0,Y.jsx)(v.A,{align:"center",children:"Distance"}),(0,Y.jsx)(v.A,{align:"center",children:"Revenue"}),(0,Y.jsx)(v.A,{align:"center",children:"Fixed Cost"}),(0,Y.jsx)(v.A,{align:"center",children:"Variable Cost"}),(0,Y.jsx)(v.A,{align:"center",children:"Total Cost"}),(0,Y.jsx)(v.A,{align:"center",children:"Net Profit"}),(0,Y.jsx)(v.A,{align:"center",children:"Margin"})]})}),(0,Y.jsx)(A.A,{children:Pe&&0!==Pe.length?Pe.map(((e,t)=>{var o;if(!e)return null;const r=(null!==(o=e.net)&&void 0!==o?o:0)>=0;return(0,Y.jsxs)(b.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,Y.jsx)(v.A,{children:(0,Y.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:z.textMuted},children:String(t+1).padStart(2,"0")})}),(0,Y.jsx)(v.A,{children:(0,Y.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,Y.jsx)(_,{color:B,size:36,children:(0,Y.jsx)(w.LTk,{size:18})}),(0,Y.jsxs)(f.A,{children:[(0,Y.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:z.textPrimary,whiteSpace:"nowrap"},children:e.riderName}),(0,Y.jsxs)(h.A,{variant:"caption",sx:{color:z.textSecondary},children:["ID #",e.id]})]})]})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(h.A,{variant:"body2",sx:{fontWeight:700,color:z.textPrimary},children:e.orders.length})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(J,{color:"#10b981",icon:(0,Y.jsx)(w.xI$,{size:11}),label:"".concat(e.kms.toFixed(2)," km"),tooltip:"KMS"})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(J,{color:B,icon:(0,Y.jsx)(w.S75,{size:11}),label:q(e.revenue).replace("\u20b9","").trim(),tooltip:"Revenue"})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(J,{color:"#6366f1",icon:(0,Y.jsx)(w.DwJ,{size:11}),label:q(e.fixedCost).replace("\u20b9","").trim(),tooltip:"Fixed Cost"})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(J,{color:"#f59e0b",icon:(0,Y.jsx)(w.pk7,{size:11}),label:q(e.varCost).replace("\u20b9","").trim(),tooltip:"Variable Cost"})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(J,{color:"#94a3b8",icon:(0,Y.jsx)(w.DwJ,{size:11}),label:q(e.totalCost).replace("\u20b9","").trim(),tooltip:"Total Cost"})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(J,{color:r?"#10b981":"#ef4444",icon:r?(0,Y.jsx)(w.imn,{size:11}):(0,Y.jsx)(w.Rod,{size:11}),label:"".concat(r?"+":"").concat(q(e.net).replace("\u20b9","").trim()),tooltip:"Net Profit"})}),(0,Y.jsx)(v.A,{align:"center",children:(0,Y.jsx)(j.A,{label:"".concat(Math.abs(e.margin).toFixed(0),"%"),color:r?"success":"error",size:"small",sx:{fontWeight:700,minWidth:60}})})]},e.id||t)})):(0,Y.jsx)(b.A,{children:(0,Y.jsx)(v.A,{colSpan:10,sx:{py:6},children:(0,Y.jsxs)(f.A,{alignItems:"center",spacing:1.5,children:[(0,Y.jsx)(s.A,{sx:{width:64,height:64,bgcolor:F("#94a3b8"),color:z.textMuted},children:(0,Y.jsx)(w.LTk,{size:28})}),(0,Y.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:z.textPrimary},children:"No riders to show"})]})})})})]})})}),(0,Y.jsx)(R.A,{open:ce,onClose:()=>ue(!1),onSelect:e=>{ie(e.startDate),se(e.endDate),he(e.label)}})]})}},23787:(e,t,o)=>{o.d(t,{FG:()=>h,nV:()=>u,pY:()=>f,pg:()=>x});var r=o(89379),n=o(80045),i=o(93230),l=o(2235),s=o(16491),a=o(82053),d=o(44414);const c=["children","scroll","onScroll","sx"],u=e=>{let{children:t,scroll:o=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,c);return(0,d.jsx)(i.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:l,sx:(0,r.A)((0,r.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:t}))},x=e=>{let{accent:t="#662582",header:o,footer:n,selected:i=!1,onClick:a,children:c,sx:u}=e;return(0,d.jsxs)(l.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"},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:[o,c,n]})]})},h=e=>{let{children:t,columns:o=2,sx:n}=e;return(0,d.jsx)(s.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},f=e=>{let{label:t,value:o,children:r,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!==r?r:(0,d.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:()=>s});var r=o(93230),n=o(16491),i=o(82053),l=o(44414);function s(e){let{title:t,subtitle:o,live:s=!1,action:a}=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)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),o&&(0,l.jsxs)(r.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:o})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,t,o)=>{o.d(t,{A:()=>j});var r=o(9950),n=o(96583),i=o(40033),l=o(82053),s=o(28170),a=o(93230),d=o(82223),c=o(55916),u=o(4159),x=o.n(u),h=o(56712),f=o(81417),p=o(96600),g=o(53132),m=o(94289),b=o(57326),v=o(50624),A=o(44414);const j=e=>{let{open:t,onClose:o,onSelect:u}=e;const[j,w]=(0,r.useState)(null);return(0,A.jsxs)(n.A,{open:t,onClose:o,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:o,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,b.A)(new Date)},{label:"Last Month",startDate:(0,m.A)((0,v.A)(new Date,-1)),endDate:(0,b.A)((0,v.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),o()):o()},children:"OK"})})]})}},36803:(e,t,o)=>{o.d(t,{A:()=>u});var r=o(48089),n=o(50704),i=o(93230),l=o(16491),s=o(82053),a=o(82917),d=o(41413),c=o(44414);function u(e){let{title:t,value:o,icon:u,color:x="#662582",caption:h,loading:f=!1}=e;return(0,c.jsx)(r.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:o}),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,o)=>{o.d(t,{A:()=>h});var r=o(89379),n=o(9950),i=o(2660),l=o(2046),s=o(83274),a=o(25333),d=o(97125),c=o(7762),u=o(52097),x=o(44414);const h=e=>{let{value:t,onChange:o,onDebouncedChange:h,debounceTime:f=500,placeholder:p="Search (ctrl+k)",sx:g}=e;const m=(0,n.useRef)(null),[b]=(0,u.d7)(t,f);return(0,n.useEffect)((()=>{h&&h(b)}),[b,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,r.A)({},g),inputRef:m,placeholder:p,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>o(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:()=>o(""),children:(0,x.jsx)(c.A,{})})})})}},59212:(e,t,o)=>{o.d(t,{A:()=>x});var r=o(89379),n=o(9950),i=o(93230),l=o(41413),s=o(77922),a=o(29925),d=o(26910),c=o(31222),u=o(44414);const x=(0,n.forwardRef)(((e,t)=>{let{setAppId:o,setLocoName:x,setPage:h,sx:f,textfeildSx:p,textfieldSx:g,pill:m=!1,accentColor:b="#6366f1",icon:v,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 C=e=>"".concat(b).concat(e),y=C("26"),D=C("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(y)},"&.Mui-focused fieldset":{borderColor:b,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:b,transition:"background-color 0.15s, color 0.15s"},children:v||(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,r.A)({},f),onChange:(e,t,r)=>{"clear"===r?(null===o||void 0===o||o(0),null===x||void 0===x||x(""),null===h||void 0===h||h(0)):t&&(null===o||void 0===o||o(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,r.A)((0,r.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:k}),sx:(0,r.A)((0,r.A)({},R),g||p||{})})):(0,u.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,r.A)({},g||p||{})}))})}))},60010:(e,t,o)=>{o.d(t,{q:()=>a});var r=o(89379),n=o(69347),i=o(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,r.A)((0,r.A)({},e),{},{behavior:(0,i.PL)()}),t)}getOptimisticResult(e){return e.behavior=(0,i.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch((0,r.A)((0,r.A)({},e),{},{meta:{fetchMore:{direction:"forward"}}}))}fetchPreviousPage(e){return this.fetch((0,r.A)((0,r.A)({},e),{},{meta:{fetchMore:{direction:"backward"}}}))}createResult(e,t){var o,n;const{state:l}=e,s=super.createResult(e,t),{isFetching:a,isRefetching:d}=s,c=a&&"forward"===(null===(o=l.fetchMeta)||void 0===o||null===(o=o.fetchMore)||void 0===o?void 0:o.direction),u=a&&"backward"===(null===(n=l.fetchMeta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction);return(0,r.A)((0,r.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=o(1729);function a(e,t){return(0,s.t)(e,l,t)}}}]); \ No newline at end of file diff --git a/build/static/js/main.d099bb12.js b/build/static/js/main.60cfeca9.js similarity index 72% rename from build/static/js/main.d099bb12.js rename to build/static/js/main.60cfeca9.js index 2442738..a9b9630 100644 --- a/build/static/js/main.d099bb12.js +++ b/build/static/js/main.60cfeca9.js @@ -1,2 +1,2 @@ -/*! For license information please see main.d099bb12.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},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},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