PageSourceSearch

https://dashboard.voo.chat/assets/firebase-visitors-BU80Ek-f.js

js voo.chat collected 2026-10-06 16:15:48 UTC 2,717 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/firebase-chat-DhDNQD80.js","assets/index-zHIJQHEM.js","assets/firestore-utils-D5WDLgr6.js"])))=>i.map(i=>d[i]);
2import{a1 as S,a2 as f,ak as _,S as h,a9 as d,aV as g,ae as V,aU as A,aa as w,ad as p,T as C}from"./index-zHIJQHEM.js";import{c as D}from"./firestore-utils-D5WDLgr6.js";const L={active:1,idle:2},a={no_action:0,started:1,ended:2};function m(t){return t===3?a.ended:t===a.no_action||t===a.started||t===a.ended?t:a.no_action}function b(t,e){return{id:t,...e,chatStatus:m(typeof e.chatStatus=="number"?e.chatStatus:void 0)}}const T=()=>V(p,"visitors"),M=A,y=t=>w(p,"visitors",t);function P(t,e,s){if(t.length===0)return()=>{};const r=D(t).map(n=>{const c=S(T(),f("propertyId","in",n),f("status","==",e),f("isBanned","==",!1));return _(c,o=>{const l=o.docChanges().map(u=>({type:u.type,visitor:b(u.doc.id,u.doc.data())}));l.length>0&&s(l)},o=>console.error("Visitor listener error:",o))});return()=>r.forEach(n=>n())}const N=120*1e3,E=120*1e3;function i(t){if(!t)return null;if(typeof t=="object"&&t!==null&&"toDate"in t){const e=t.toDate?.();return e?e.getTime():null}if(typeof t=="object"&&t!==null&&"seconds"in t){const e=t.seconds;return typeof e=="number"?e*1e3:null}if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isNaN(e)?null:e}return null}function O(t,e=Date.now()){const s=i(t.session_created)??i(t.lastActivity);return s===null?0:Math.max(0,e-s)}function j(t,e=Date.now()){if(t.isBanned)return!1;const s=m(t.chatStatus);if(s===a.started||s===a.ended)return!1;const r=i(t.lastActivity);if(r!==null)return e-r<=N;const n=i(t.session_created);return n!==null?e-n<=E:!1}async function k({visitorId:t,reason:e,bannedByName:s,bannedById:r,visitor:n}){if(await h(M(t),{id:t,city:n.city??null,stateProv:n.stateProv??null,countryCode:n.countryCode??null,countryName:n.countryName??null,ipAddress:n.ipAddress??null,name:n.name??n.visitor_default??null,propertyId:n.propertyId,session:n.session??null,reason:e,bannedByName:s,bannedById:r,createdAt:C()},{merge:!0}),await d(y(t),{chatStatus:a.no_action,isNewMessage:!1,isBanned:!0}),n.session){const{recordActivity:c}=await g(async()=>{const{recordActivity:o}=await import("./firebase-chat-DhDNQD80.js");return{recordActivity:o}},__vite__mapDeps([0,1,2]));await c(`${n.name??n.visitor_default??"Visitor"} banned by ${s}`,r,t,n.session).catch(()=>{})}}async function x(t,e){await d(y(t),e)}function G(t){if(!t||t.length!==2)return"🏳️";const e=t.toUpperCase().split("").map(s=>127397+s.charCodeAt(0));return String.fromCodePoint(...e)}export{a as C,L as V,k as b,G as c,j as i,P as l,b as m,m as n,x as u,O as v};

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.