PageSourceSearch

https://pawtenant.com/assets/trackEvent-R0tboxkh.js

js pawtenant.com collected 2026-10-04 06:59:57 UTC 3,861 bytes, 2 lines download raw bytes

1import{supabase as p}from"./supabaseClient-C9iBvT0j.js";import{getSessionId as m}from"./visitorSession-CV6xAcGN.js";import{h as y,k}from"./index-B9Oci0v6.js";const o=!1,d=new Set;function g(e,t){if(!t)return!1;const n=`${e}|${t}`;return d.has(n)?!0:(d.add(n),!1)}function i(e){let t=null;try{t=y()}catch{t=null}let n=null;try{n=k()}catch{n=null}let r=null;try{r=typeof window<"u"&&window.location?window.location.href:null}catch{r=null}return{ts:new Date().toISOString(),channel:n??null,source:t?.utm_source??null,campaign:t?.utm_campaign??null,medium:t?.utm_medium??null,gclid:t?.gclid??null,fbclid:t?.fbclid??null,referrer:t?.referrer??null,landing_url:t?.landing_url??null,page_url:r,...e??{}}}function c(e,t,n){try{if(typeof window>"u"||!e||typeof e!="string"||g(e,n))return;let r=null;try{r=m()}catch{r=null}const l=typeof t.page_url=="string"?t.page_url:null,s={p_session_id:r,p_event_name:e,p_page_url:l,p_props:t};try{Promise.resolve(p.rpc("record_event",s)).then(({error:a})=>{}).catch(a=>{})}catch{}}catch{}}function _(e,t,n){try{if(typeof window>"u"||!e||!n||g(e,n))return;let r=null;try{r=m()}catch{r=null}const l=typeof t.page_url=="string"?t.page_url:null,s={p_session_id:r,p_event_name:e,p_page_url:l,p_props:t};try{Promise.resolve(p.rpc("record_event_once",s)).then(({error:a})=>{}).catch(a=>{})}catch{}}catch{}}function f(e,t){c(e,i(t))}function S(e){f("page_view",e)}function P(e,t){f("cta_click",{cta:e,...t??{}})}function b(e,t,n){f("assessment_step_view",{step:e,letter_type:t})}function x(e,t,n){c("assessment_completed",i({confirmation_id:e,letter_type:t,...n??{}}),e)}function E(e,t){c("payment_attempted",i({confirmation_id:e,...t??{}}))}function F(e,t){_("payment_success",i({confirmation_id:e,...t??{}}),e)}function V(e){const t=(e?.type??"").toLowerCase(),n=(e?.code??"").toLowerCase();return t==="validation_error"?"validation_failed":n==="card_declined"||n==="expired_card"||n==="incorrect_cvc"||n==="incorrect_number"||n==="insufficient_funds"?"card_declined":n==="authentication_required"||n==="payment_intent_authentication_failure"?"authentication_required":n==="processing_error"||t==="api_error"?"processing_error":n==="payment_intent_unexpected_state"||n==="resource_missing"||n==="expired_session"?"session_expired":t==="card_error"?"card_declined":"unknown"}function A(e,t,n){_("assessment_submitted",i({confirmation_id:e,letter_type:t}),e)}function R(e,t){e&&c("customer_portal_viewed",i({confirmation_id:e}),e)}function $(e,t){e&&c("checkout_viewed",i({confirmation_id:e,...t??{}}),e)}function O(e,t){e&&_("payment_fields_completed",i({confirmation_id:e,complete:!0,...t??{}}),e)}function q(e,t,n){c("payment_failed",i({confirmation_id:e,category:t}))}function D(e,t,n){c("package_change_opened",i({confirmation_id:e,letter_type:t}))}function L(e,t,n){e&&c("package_screen_viewed",i({confirmation_id:e,letter_type:t,...n??{}}),e)}function U(e,t,n){c("package_selected",i({confirmation_id:e,package_key:t,...n??{}}))}function Y(e,t,n){c("plan_changed",i({confirmation_id:e,plan:t,...n??{}}))}function j(e,t,n){c("recovery_click",i({stage:e,confirmation_id:null,...n??{}}),`${e}|`)}function h(e,t,n){c("recovery_conversion",i({stage:e,confirmation_id:t,...n??{}}),`${e}|${t}`)}const u="pt_recovery_attribution";function G(e,t){if(!e||typeof localStorage>"u")return!1;let n=null;try{n=localStorage.getItem(u)}catch{n=null}if(!n)return!1;let r=null;try{r=JSON.parse(n)}catch{r=null}if(!r||!r.stage){try{localStorage.removeItem(u)}catch{}return!1}try{h(r.stage,e,{discount_code:r.discount_code??null,clicked_at:r.clicked_at??null,flag_confirmation_id:r.confirmation_id??null,...t??{}})}catch{}try{localStorage.removeItem(u)}catch{}return!0}export{R as a,D as b,b as c,U as d,Y as e,A as f,x as g,F as h,G as i,L as j,P as k,j as l,f as m,$ as n,O as o,E as p,q,V as r,S as t};
2//# sourceMappingURL=trackEvent-R0tboxkh.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.