PageSourceSearch

https://bandhanguru.com/static/js/2908.266dc6a5.chunk.js

js bandhanguru.com collected 2026-10-04 03:15:09 UTC 6,622 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkbandhan_guru_web=self.webpackChunkbandhan_guru_web||[]).push([[2908],{2908(e,n,i){i.r(n),i.d(n,{default:()=>F});var t,o,s,r,a,d,l,p,c,v,f,h,x,u=i(7528),y=i(5043),g=i(5464),w=i(4117),b=i(9581),m=i(7726),j=i(5594),A=i(579);const P=g.Ay.div(t||(t=(0,u.A)(["\n  padding: 24px 30px;\n  min-height: 100vh;\n  background: #f8f9fa;\n"]))),V=g.Ay.h1(o||(o=(0,u.A)(["\n  font-family: 'Playfair Display', serif;\n  font-size: 28px;\n  color: #e9af66;\n  margin: 0 0 8px;\n"]))),k=g.Ay.p(s||(s=(0,u.A)(["\n  font-family: 'Poppins', sans-serif;\n  font-size: 14px;\n  color: #6b7280;\n  margin: 0 0 24px;\n"]))),T=g.Ay.div(r||(r=(0,u.A)(["\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n  gap: 16px;\n  margin-bottom: 24px;\n"]))),S=g.Ay.div(a||(a=(0,u.A)(["\n  background: #fff;\n  border-radius: 14px;\n  padding: 18px 20px;\n  border: 1px solid #f0e6d6;\n"]))),z=g.Ay.div(d||(d=(0,u.A)(["\n  font-family: 'Playfair Display', serif;\n  font-size: 28px;\n  color: #e9af66;\n"]))),_=g.Ay.div(l||(l=(0,u.A)(["\n  font-family: 'Poppins', sans-serif;\n  font-size: 12px;\n  color: #6b7280;\n  text-transform: uppercase;\n  letter-spacing: 0.04em;\n  margin-top: 4px;\n"]))),C=g.Ay.div(p||(p=(0,u.A)(["\n  display: inline-flex;\n  background: #fff;\n  border: 1px solid #f0e6d6;\n  border-radius: 999px;\n  overflow: hidden;\n  margin-bottom: 20px;\n"]))),q=g.Ay.button(c||(c=(0,u.A)(["\n  border: none;\n  background: ",";\n  color: ",";\n  padding: 10px 22px;\n  font-family: 'Poppins', sans-serif;\n  font-size: 13px;\n  font-weight: 600;\n  cursor: pointer;\n"])),e=>{let{$active:n}=e;return n?"#e9af66":"transparent"},e=>{let{$active:n}=e;return n?"#fff":"#b8823f"}),M=g.Ay.div(v||(v=(0,u.A)(["\n  background: #fff;\n  border-radius: 14px;\n  padding: 20px;\n"]))),D=g.Ay.table(f||(f=(0,u.A)(["\n  width: 100%;\n  border-collapse: collapse;\n  font-family: 'Poppins', sans-serif;\n  font-size: 14px;\n\n  th, td {\n    text-align: left;\n    padding: 12px 8px;\n    border-bottom: 1px solid #f3f4f6;\n  }\n\n  th {\n    color: #9ca3af;\n    font-weight: 600;\n    font-size: 12px;\n    text-transform: uppercase;\n  }\n"]))),N=g.Ay.p(h||(h=(0,u.A)(["\n  font-family: 'Poppins', sans-serif;\n  color: #6b7280;\n  text-align: center;\n  padding: 32px;\n"]))),$=g.Ay.div(x||(x=(0,u.A)(["\n  display: flex;\n  gap: 8px;\n  margin-top: 16px;\n  justify-content: flex-end;\n  align-items: center;\n  font-family: 'Poppins', sans-serif;\n  font-size: 13px;\n\n  button {\n    border: 1px solid #e5e7eb;\n    background: #fff;\n    border-radius: 8px;\n    padding: 6px 12px;\n    cursor: pointer;\n  }\n\n  button:disabled {\n    opacity: 0.5;\n    cursor: not-allowed;\n  }\n"]))),G=e=>{var n,i,t;return(null===(n=e.viewer)||void 0===n?void 0:n.name)||(null===(i=e.viewer)||void 0===i?void 0:i.shop_name)||e.viewerName||(null===(t=e.viewerId)||void 0===t?void 0:t.name)||("guest"===e.viewerType?"Guest visitor":e.viewerType||"Guest")},I=e=>{var n,i;return(null===(n=e.viewer)||void 0===n?void 0:n.mobile_number)||e.viewerMobile||(null===(i=e.viewerId)||void 0===i?void 0:i.mobile_number)||"\u2014"},F=()=>{const{t:e}=(0,w.Bd)(),[n,i]=(0,y.useState)("visitors"),[t,o]=(0,y.useState)([]),[s,r]=(0,y.useState)({totalViews:0,uniqueViewers:0,viewsToday:0}),[a,d]=(0,y.useState)(!0),[l,p]=(0,y.useState)(null),[c,v]=(0,y.useState)({page:1,totalPages:1,total:0}),f=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;try{var t,s;d(!0);const n="contacts"===i?"/vendor/phone-views":"/vendor/profile/viewers",r=await m.A.get(n,{params:{page:e,limit:20}});o((null===(t=r.data)||void 0===t?void 0:t.data)||[]),v((null===(s=r.data)||void 0===s?void 0:s.pagination)||{page:1,totalPages:1,total:0}),p(null)}catch(l){var r,a;p((null===(r=l.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.message)||"Failed to load visitor data")}finally{d(!1)}};(0,y.useEffect)(()=>{(async()=>{try{var e;const n=await m.A.get("/vendor/profile/views");r((null===(e=n.data)||void 0===e?void 0:e.data)||{totalViews:0,uniqueViewers:0,viewsToday:0})}catch(n){}})(),f(1,"visitors")},[]);const h=e=>{i(e),f(1,e)};return(0,A.jsxs)(P,{children:[(0,A.jsx)(V,{children:e("vendorPhoneViews.insightsTitle","Visitor Insights")}),(0,A.jsx)(k,{children:e("vendorPhoneViews.insightsSubtitle","See who visited your profile, how many times it was viewed, and which parties revealed your contact number.")}),(0,A.jsxs)(T,{children:[(0,A.jsxs)(S,{children:[(0,A.jsx)(z,{children:s.totalViews||0}),(0,A.jsx)(_,{children:e("vendorPhoneViews.totalViews","Total profile views")})]}),(0,A.jsxs)(S,{children:[(0,A.jsx)(z,{children:s.uniqueViewers||0}),(0,A.jsx)(_,{children:e("vendorPhoneViews.uniqueVisitors","Unique visitors")})]}),(0,A.jsxs)(S,{children:[(0,A.jsx)(z,{children:s.viewsToday||0}
1),(0,A.jsx)(_,{children:e("vendorPhoneViews.viewsToday","Views today")})]})]}),(0,A.jsxs)(C,{children:[(0,A.jsx)(q,{type:"button",$active:"visitors"===n,onClick:()=>h("visitors"),children:e("vendorPhoneViews.profileVisitors","Profile visitors")}),(0,A.jsx)(q,{type:"button",$active:"contacts"===n,onClick:()=>h("contacts"),children:e("vendorPhoneViews.contactLog","Contact log")})]}),(0,A.jsx)(M,{children:a?(0,A.jsx)(j.A,{}):l?(0,A.jsx)(N,{children:l}):0===t.length?(0,A.jsx)(N,{children:"contacts"===n?e("vendorPhoneViews.empty","No phone views yet."):e("vendorPhoneViews.emptyVisitors","No profile visitors yet.")}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(D,{children:[(0,A.jsx)("thead",{children:(0,A.jsxs)("tr",{children:[(0,A.jsx)("th",{children:e("vendorPhoneViews.party","Party")}),(0,A.jsx)("th",{children:e("vendorPhoneViews.mobile","Mobile")}),(0,A.jsx)("th",{children:"contacts"===n?e("vendorPhoneViews.source","Source"):e("vendorPhoneViews.viewerType","Type")}),(0,A.jsx)("th",{children:e("vendorPhoneViews.date","Date")})]})}),(0,A.jsx)("tbody",{children:t.map(e=>(0,A.jsxs)("tr",{children:[(0,A.jsx)("td",{children:G(e)}),(0,A.jsx)("td",{children:I(e)}),(0,A.jsx)("td",{children:"contacts"===n?e.source||"profile":e.viewerType||"guest"}),(0,A.jsx)("td",{children:e.createdAt?(0,b.GP)(new Date(e.createdAt),"dd MMM yyyy, HH:mm"):"\u2014"})]},e._id))})]}),c.totalPages>1&&(0,A.jsxs)($,{children:[(0,A.jsx)("button",{type:"button",disabled:c.page<=1,onClick:()=>f(c.page-1),children:"Prev"}),(0,A.jsxs)("span",{children:[c.page," / ",c.totalPages]}),(0,A.jsx)("button",{type:"button",disabled:c.page>=c.totalPages,onClick:()=>f(c.page+1),children:"Next"})]})]})})]})}}}]);
2//# sourceMappingURL=2908.266dc6a5.chunk.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.