PageSourceSearch

https://lemontaps.com/assets/index-CgGx02WB.js

js lemontaps.com collected 2026-09-24 22:35:44 UTC 6,515 bytes, 2 lines download raw bytes

1import{b5 as oe,bf as re,aF as a,aQ as ce,bx as de,bK as D,aD as ye,dx as fe,dy as ge,aT as xe,bB as ue,bE as pe,bC as me,bD as he,aC as e,aV as be,bM as De,aG as r,aK as we,b7 as Y,ba as c,aJ as p,b9 as Z,aZ as je,dB as Ae}from"./index-BCi1utNp.js";import{w as Ce}from"./withNav-V2C3ZfWp.js";import{g as w,a as X,b as ee,S as n}from"./helpers-BVVZ15Qi.js";import{u as Se,U as ke}from"./UnitSelector-CH06X2cb.js";import{C as ve}from"./CalendarTodayOutlined-DdP8-i8y.js";import{S as Te}from"./SupervisedUserCircleOutlined-BZeTlSP9.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},g=new t.Error().stack;g&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[g]="7065b694-5115-46d4-a1d0-d3c07785950d",t._sentryDebugIdIdentifier="sentry-dbid-7065b694-5115-46d4-a1d0-d3c07785950d")}catch{}const Ie=()=>{var E,R,L,U,B,F,M,_,P,N,O,$,z,K,V,q,G,H,J,Q;const{t,activeLanguage:g}=oe(),{formatDate:d}=re(),j=a.useRef(d);j.current=d;const{notify:A}=ce(),{isFeatureAllowed:C}=de(),y=C(D.ANALYTICS_MD),m=C(D.UNITS),[te,S]=a.useState(!1),{getAccessTokenSilently:k}=ye(),[s,h]=a.useState({raw:{contactsCollected:0,contactsSaved:0,fileClicksIndividual:[],fileClicksTotal:0,linkClicksIndividual:[],linkClicksTotal:0,profileEdits:0,profileShares:0},savings:{cards:0,co2:0,energy:0,flyers:0,water:0,wood:0}}),[v,f]=a.useState(!1),[i,se]=a.useState({startDate:fe(),endDate:ge()}),T=a.useRef(i),[ie,ae]=a.useState(!1),[ne,I]=a.useState(w(i,d));xe(te,"md-analytics-toast");const{units:x,selectedUnit:u,setSelectedUnit:le}=Se();a.useEffect(()=>{I(w(T.current,d))},[g,d]);const b=a.useCallback(l=>{S(!0),ue(k,o=>me.get(he.API_BASE_URL+"data/theme-summary",{params:{startDate:X(i==null?void 0:i.startDate),endDate:ee(i==null?void 0:i.endDate),unitId:m?l==null?void 0:l.id:""},headers:{Authorization:`Bearer ${o}`}}),[pe.READ.THEME_PROFILES]).then(o=>{var W;(W=o.data)!=null&&W.success&&(h(o.data.data),T.current=i,I(w(i,j.current)))}).catch(o=>{A.error(t("error.general"))}).finally(()=>S(!1))},[i,k,t,m,A]);return a.useEffect(()=>{y&&b(u)},[b,y,u]),a.useEffect(()=>{y||h({raw:{contactsCollected:1250,contactsSaved:870,fileClicksIndividual:[],fileClicksTotal:910,linkClicksIndividual:[],linkClicksTotal:1210,profileEdits:140,profileShares:320},savings:{cards:2500,co2:1250,energy:3500,flyers:5e3,water:28e3,wood:750}})},[y,h]),e.jsx(be,{maxWidth:"l",children:e.jsxs(De,{text:t("upgradeTeaser.feature.mdAnalytics"),condition:!y,children:[e.jsxs(r,{display:"flex",justifyContent:"end",mb:2,gap:1,children:[e.jsx(we,{variant:"outlined",color:"primary",size:"large",startIcon:e.jsx(ve,{}),onClick:()=>f(!0),children:t(ne)}),m&&(x!=null&&x.length)?e.jsx(ke,{selectedUnit:u,onChange:l=>{le(l)},units:x,requiredFeature:D.UNITS,sx:{width:"30%"}}):null]}),e.jsxs(r,{children:[e.jsxs(Y,{sx:{mb:2},children:[e.jsxs(c,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(r,{sx:{backgroundColor:"secondary.main",p:.5,borderRadius:"50%",height:"3.2rem",width:"3.2rem",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Te,{sx:{color:"white"}})}),e.jsxs(r,{children:[e.jsx(p,{component:"h2",variant:"h3",ml:"1rem",children:t("mdAnalytics.networking.title")}),e.jsx(p,{variant:"body2",ml:"1rem",children:t("mdAnalytics.networking.subtitle")})]})]}),e.jsx(Z,{}),e.jsxs(c,{children:[e.jsxs(r,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:1.6,mb:1.6},children:[e.jsx(n,{title:t("mdAnalytics.networking.shares"),body:(R=(E=s==null?void 0:s.raw)==null?void 0:E.profileShares)==null?void 0:R.toString(),tooltip:t("mdAnalytics.tooltips.shares")}),e.jsx(n,{title:t("mdAnalytics.networking.contacts"),body:(U=(L=s==null?void 0:s.raw)==null?void 0:L.contactsCollected)==null?void 0:U.toString(),tooltip:t("mdAnalytics.tooltips.contacts")}),e.jsx(n,{title:t("mdAnalytics.networking.edits"),body:(F=(B=s==null?void 0:s.raw)==null?void 0:B.profileEdits)==null?void 0:F.toString(),tooltip:t("mdAnalytics.tooltips.edits")})]}),e.jsxs(r,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:1.6},children:[e.jsx(n,{title:t("mdAnalytics.networking.vcards"),body:(_=(M=s==null?void 0:s.raw)==null?void 0:M.contactsSaved)==null?void 0:_.toString(),tooltip:t("mdAnalytics.tooltips.vcards")}),e.jsx(n,{title:t("mdAnalytics.networking.links"),body:((N=(P=s==null?void 0:s.raw)==null?void 0:P.linkClicksTotal)==null?void 0:N.toString())||"0",tooltip:t("mdAnalytics.tooltips.links")}),e.jsx(n,{title:t("mdAnalytics.networking.files"),body:(($=(O=s==null?void 0:s.raw)==null?void 0:O.fileClicksTotal)==null?void 0:$.toString())||"0",tooltip:t("mdAnalytics.tooltips.files")})]})]})]}),e.jsxs(Y,{children:[e.jsx(c,{sx:{display:"flex",alignItems:"center"},children:e.jsx(p,{component:"h2",variant:"h3",children:t("mdAnalytics.saves.title")})}),e.jsx(Z,{}),e.jsxs(c,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-evenly",gap:1.6},children:[e.jsx(n,{title:t("mdAnalytics.saves.cards"),body:(K=(z=s==null?void 0:s.savings)==null?void 0:z.cards)==null?void 0:K.toString(),tooltip:t("mdAnalytics.tooltips.cards")}),e.jsx(n,{title:t("mdAnalytics.saves.flyers"),body:(q=(V=s==null?void 0:s.savings)==null?void 0:V.flyers)==null?void 0:q.toString(),tooltip:t("mdAnalytics.tooltips.flyers")})]}),e.jsx(c,{children:e.jsx(p,{component:"div",variant:"h3",children:t("mdAnalytics.saves.subtitle")})}),e.jsx(c,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:1.6},children:e.jsxs(e.Fragment,{children:[e.jsx(n,{title:t("mdAnalytics.saves.wood"),body:`${Math.ceil(((G=s==null?void 0:s.savings)==null?void 0:G.wood)||0)}kg`}),e.jsx(n,{title:t("mdAnalytics.saves.water"),body:`${Math.ceil(((H=s==null?void 0:s.savings)==null?void 0:H.water)||0)}l`}),e.jsx(n,{title:t("mdAnalytics.saves.energy"),body:`${Math.ceil(((J=s==null?void 0:s.savings)==null?void 0:J.energy)||0)}kwh`}
1),e.jsx(n,{title:t("mdAnalytics.saves.co2"),body:`${Math.ceil(((Q=s==null?void 0:s.savings)==null?void 0:Q.co2)||0)}kg`})]})})]})]}),e.jsx(je,{open:v,onClose:()=>f(!1),confirmAction:{onClick:()=>{b(u),f(!1)},text:t("apply"),disabled:!ie},onCancel:()=>f(!1),withActionDivider:!0,size:"lg",children:e.jsx(Ae,{setValue:l=>se(o=>((o.startDate!==l.startDate||o.endDate!==l.endDate)&&ae(!0),{startDate:X(l.startDate||o.startDate),endDate:ee(l.endDate||o.endDate)})),open:v,setOpen:f,initialDateRange:i,disableFuture:!0})})]})})},Me=Ce(Ie,{tTitle:"mdAnalytics.title"},{});export{Me as default};
2//# sourceMappingURL=index-CgGx02WB.js.map

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.