1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57122],{76454:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});const i=(0,t(85772).Z)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},91314:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});const i=(0,t(85772).Z)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},52221:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return N}});var i=t(5979),l=t(89634),a=t.n(l),o=t(52983),s=t(29151),r=(t(91326),t(98290)),c=t(40728),d=t(91314),u=t(76454),v=t(85772);const p=(0,v.Z)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);var m=t(93932);const x=(0,v.Z)("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);var f=t(92054),g=t(28812),h=t.n(g),y=t(62055),b=t(97458);function k(e){var n,t,i=e.label,l=e.value,a=e.icon,o=e.iconBg,s=e.isCurrency,d=void 0!==s&&s,u=e.isLoading,v=void 0!==u&&u;return(0,b.jsxs)(c.Zb,{className:"flex flex-row items-center gap-3 p-3 md:p-4 shadow-sm",children:[(0,b.jsx)("div",{className:(0,r.cn)("flex items-center justify-center h-10 w-10 md:h-12 md:w-12 rounded-full shrink-0",o),children:a}),(0,b.jsxs)("div",{className:"flex flex-col min-w-0",children:[v?(0,b.jsx)("div",{className:"h-5 w-14 bg-muted animate-pulse rounded"}):(0,b.jsx)("span",{className:"text-lg md:text-xl font-bold truncate",children:d?(t=l,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(t)):(n=l,new Intl.NumberFormat("en-US").format(n))}),(0,b.jsx)("span",{className:"text-[11px] md:text-xs text-muted-foreground leading-tight",children:i})]})]})}function j(e){var n,t,i,l,a,o,s,c,v,f=e.stats,g=e.isLoading,h="h-5 w-5";return(0,b.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-2 md:gap-3 px-3 md:px-4 pt-3 md:pt-4 pb-10",children:[(0,b.jsx)(k,{label:"Total Applications",value:null!==(n=null===f||void 0===f?void 0:f.total)&&void 0!==n?n:0,icon:(0,b.jsx)(d.Z,{className:(0,r.cn)(h,"text-blue-600")}),iconBg:"bg-blue-100",isLoading:g}),(0,b.jsx)(k,{label:"Total Approved",value:null!==(t=null===f||void 0===f||null===(i=f.approved)||void 0===i?void 0:i.count)&&void 0!==t?t:0,icon:(0,b.jsx)(u.Z,{className:(0,r.cn)(h,"text-emerald-600")}),iconBg:"bg-emerald-100",isLoading:g}),(0,b.jsx)(k,{label:"Approved Value",value:null!==(l=null===f||void 0===f||null===(a=f.approved)||void 0===a?void 0:a.value)&&void 0!==l?l:0,icon:(0,b.jsx)(p,{className:(0,r.cn)(h,"text-emerald-600")}),iconBg:"bg-emerald-100",isCurrency:!0,isLoading:g}),(0,b.jsx)(k,{label:"Total Declined",value:null!==(o=null===f||void 0===f||null===(s=f.declined)||void 0===s?void 0:s.count)&&void 0!==o?o:0,icon:(0,b.jsx)(m.Z,{className:(0,r.cn)(h,"text-red-500")}),iconBg:"bg-red-100",isLoading:g}),(0,b.jsx)(k,{label:"Declined Value",value:null!==(c=null===f||void 0===f||null===(v=f.declined)||void 0===v?void 0:v.value)&&void 0!==c?c:0,icon:(0,b.jsx)(x,{className:(0,r.cn)(h,"text-red-500")}),iconBg:"bg-red-100",isCurrency:!0,isLoading:g})]})}function w(){var e=(0,y.v9)((function(e){return e.user})),n=(0,f.Z)("auth_token"),t=(0,o.useState)(null),l=t[0],r=t[1],c=(0,o.useState)(!0),d=c[0],u=c[1];return(0,o.useEffect)((function(){var t=function(){var t=(0,i.Z)(a().mark((function t(){var i,l;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,h().get("".concat("https://api.famunera.com/private/v1/","/financing/stats"),{headers:{Authorization:"Bearer ".concat((null===e||void 0===e?void 0:e.token)||(null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.token))}});case 4:l=t.sent,r(l.data),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),console.error(t.t0);case 11:return t.prev=11,u(!1),t.finish(11);case 14:case"end":return t.stop()}}),t,null,[[1,8,11,14]])}
1)));return function(){return t.apply(this,arguments)}}();t()}),[]),(0,b.jsxs)(s.s_,{className:"container !px-0 overflow-auto",children:[(0,b.jsx)(s.V9,{title:"Analytics"}),(0,b.jsx)(s.N,{children:(0,b.jsx)(j,{stats:l,isLoading:d})})]})}w.layout="sell";var N=w},78078:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/financing/analytics",function(){return t(52221)}])}},function(e){e.O(0,[91326,37986,49774,92888,40179],(function(){return n=78078,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.