1import{l as j,c as K,a as Y}from"./metaAcquisition.CjA-T93g.js";const I=1,k=Object.freeze({PAGE_VIEWED:"webapp_view_marketing_page",CTA_CLICKED:"webapp_act_marketing_cta_click"}),O="clara_canonical_acquisition_session:v1",W=1800*1e3,B="entry_marketing_event_id",H="entry_marketing_occurred_at_ms",R="entry_marketing_destination_flow_id",b=/^[a-z0-9][a-z0-9_-]{0,63}$/,Q=/^[A-Za-z0-9][A-Za-z0-9_-]{7,99}$/,J=/^[A-Za-z0-9._~:@/+ -]{1,100}$/,X=/^[A-Za-z][A-Za-z0-9_]{0,39}$/,ee=["firebase_","google_","ga_"],te=new Set(["app.heyitsclara.com","app-stg.heyitsclara.com","clara-web-app-stg.pages.dev"]),S="__claraCanonicalAcquisitionV1",L=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],ne=["analytics_schema_version","event_id","marketing_session_id","event_sequence","page_view_id","landing_page_id","landing_page_version","landing_page_path","page_template","locale","traffic_channel","traffic_source","traffic_medium","referring_domain","cta_id","cta_role","cta_location","cta_destination","destination_flow_id","funnel_start_expected","business_category","offer_id","experiment_id","experiment_variant","utm_source","utm_medium","utm_campaign"];function E(e,t){return Array.from(e).slice(0,t).join("")}function ie(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function l(e,t=100){if(typeof e!="string")return;const n=e.replace(/[\u0000-\u001f\u007f]/g," ").replace(/\s+/g," ").trim();return n?E(n,t):void 0}function a(e,t){const i=(l(e,200)?.toLowerCase()??"").replace(/[^a-z0-9_-]+/g,"_").replace(/^[_-]+|[_-]+$/g,"").replace(/_{2,}/g,"_");return b.test(i)?i:i?`${i.slice(0,54).replace(/[_-]+$/g,"")||"item"}_${ie(i)}`.slice(0,64):t}function re(e){const t=l(e,32);return t&&/^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$/.test(t)?t:"1.0.0"}function M(e){const t=l(e,32);return!!(t&&/^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$/.test(t))}function V(e){const t=l(e,100);if(!(!t||t.includes("{{")||!J.test(t)))return t}function U(e){const t=V(e);if(!(!t||t.includes("@")||/(?:[a-z]+:\/\/|^www\.)/i.test(t)||/^\+[\d ()-]{6,}$/.test(t)))return t}function F(e){const t=l(e,300)??"/";try{return E(new URL(t,"https://heyitsclara.com").pathname,100)}catch{return"/"}}function ae(e){if(!e)return"$direct";try{const t=new URL(e).hostname.toLowerCase().replace(/^www\./,"");return/^[a-z0-9.-]{1,100}$/.test(t)?t:"$direct"}catch{return"$direct"}}function se(e=Date.now){return`acq-${e().toString(36)}-${Math.random().toString(36).slice(2,14)}`}function oe(){try{const e=globalThis.crypto?.randomUUID?.();if(e)return e}catch{}return se()}function ce(e){try{const t=e?.getElementById?.("clara-canonical-acquisition-context")?.textContent;return t?JSON.parse(t):{}}catch{return{}}}function _e({url:e,referrer:t="",config:n={}}){const i=new URL(e,"https://heyitsclara.com"),r=F(n.pathname??i.pathname),d=a(n.locale??j(r),"us"),c=a(n.landing_page_id,""),A=a(`${d}_${r.split("/").filter(Boolean).slice(1).join("_")||"home"}`,`${d}_page`),m=a(n.page_template??K(r),"landing"),h={};for(const w of["utm_source","utm_medium","utm_campaign","utm_term","utm_content"]){const u=V(i.searchParams.get(w));u&&(h[w]=u)}const p=Y(i.href,t);return{landing_page_id:c||A,landing_page_version:re(n.landing_page_version),landing_page_path:r,page_template:m,page_metadata_quality:c&&M(n.landing_page_version)?"explicit":"derived",locale:d,traffic_channel:a(p.traffic_channel,"direct"),traffic_source:a(p.traffic_source,"direct"),traffic_medium:a(p.traffic_medium,"direct"),referring_domain:ae(t),...a(n.business_category,"")?{business_category:a(n.business_category,"")}:{},...a(n.offer_id,"")?{offer_id:a(n.offer_id,"")}:{},...a(n.experiment_id,"")?{experiment_id:a(n.experiment_id,"")}:{},...a(n.experiment_variant,"")?{experiment_variant:a(n.experiment_variant,"")}:{},...h}}function $(e,t="captured_at_session_start"){const n={session_context_quality:t,session_entry_page_id:e.landing_page_id,session_entry_page_version:e.landing_page_version,session_entry_page_path:e.landing_page_path,session_entry_page_template:e.page_template,session_entry_referring_domain:e.referring_domain,session_traffic_channel:e.traffic_channel,session_traffic_source:e.traffic_source,session_traffic_medium:e.traffic_medium};for(const i of L){const r=U(e[i]);r!==void 0&&(n[`session_${i}`]=r)}return n}function de(e){if(!e||typeof e!="object"||!new Set(["captured_at_session_start","backfilled_current_page"]).has(e.session_context_quality)||!b.test(e.session_entry_page_id??"")||!M(e.session_entry_page_version)||F(e.session_entry_page_path)!==e.session_entry_page_path||!b.test(e.session_entry_page_template??"")||!/^(?:\$direct|[a-z0-9.-]{1,100})$/.test(e.session_entry_referring_domain??""))return;for(const n of["session_traffic_channel","session_traffic_source","session_traffic_medium"])if(!b.test(e[n]??""))return;const t={session_context_quality:e.session_context_quality,session_entry_page_id:e.session_entry_page_id,session_entry_page_version:e.session_entry_page_version,session_entry_page_path:e.session_entry_page_path,session_entry_page_template:e.session_entry_page_template,session_entry_referring_domain:e.session_entry_referring_domain,session_traffic_channel:e.session_traffic_channel,session_traffic_source:e.session_traffic_source,session_traffic_medium:e.session_traffic_medium};for(const n of L){const i=e[`session_${n}`];if(i!==void 0&&U(i)!==i)return;i!==void 0&&(t[`session_${n}`]=i)}return t}function D(e,t){return!!(e&&e.persistence_schema_version===I&&Q.test(e.marketing_session_id??"")&&Number.isInteger(e.next_event_sequence)&&e.next_event_sequence>0&&Number.isFinite(e.last_activity_at_ms)&&e.last_activity_at_ms<=t+6e4&&t-e.last_activity_at_ms<=W)}function q(e,t,n,i){try{const r=JSON.parse(e?.getItem?.(O)??"null");if(D(r,t)){const d=de(r.session_context);return{persistence_schema_version:I,marketing_session_id:r.marketing_session_id,next_event_sequence:r.next_event_sequence,last_activity_at_ms:r.last_activity_at_ms,session_context:d??$(i,"backfilled_current_page")}}}catch{}return{persistence_schema_version:I,marketing_session_id:n(),next_event_sequence:1,last_activity_at_ms:t,session_context:$(i)}}function ue(e,t){try{e?.setItem?.(O,JSON.stringify(t))}catch{}}function fe(e){const t={};for(const n of ne){if(Object.keys(t).length>=25)break;const i=e[n];i===void 0||!X.test(n)||ee.some(r=>n.startsWith(r))||!["string","number","boolean"].includes(typeof i)||(t[n]=typeof i=="string"?E(i,100):i)}return t}function z(e,t,n,i){try{n?.(e,t)}catch{}try{i?.("event",e,fe(t))}catch{}}function le(e){try{if(typeof globalThis.queueMicrotask=="function"){globalThis.queueMicrotask(e);return}Promise.resolve().then(e).catch(()=>{})}catch{e()}}function C(e){return te.has(e)||e.endsWith(".clara-web-app-stg.pages.dev")}function pe(e,t){const n=l(e?.getAttribute?.("data-ph-destination"),100),i=e?.getAttribute?.("href");if(n)return n;if(!i)return"in_page_action";
1try{const r=new URL(i,t);return C(r.hostname)?r.pathname||"/":r.hostname==="app.adjust.com"||r.hostname.includes("apple.com")?"app_store":r.hostname.includes("play.google.com")?"play_store":r.protocol==="tel:"?"phone_call":E(r.hostname+r.pathname,100)}catch{return"unknown"}}function ge(e,t){const n=a(e?.getAttribute?.("data-ph-onboarding-flow")??e?.getAttribute?.("data-ph-destination"),"");if(n&&/^flow[a-z0-9_-]*$/.test(n))return n;const i=e?.getAttribute?.("href");if(i)try{const r=new URL(i,t);return C(r.hostname)&&a(r.pathname.match(/\/(?:start|join)\/([^/?#]+)/)?.[1],"")||void 0}catch{return}}function me(e){const t=a(e?.getAttribute?.("data-ph-cta-role"),"");if(t)return t;const n=e?.getAttribute?.("data-ph-location")??"";return/sign[_-]?in/i.test(n)?"sign_in":/appstore|playstore|download/i.test(n)?"download":"unspecified"}function he(e,t){const n=e?.getAttribute?.("href");if(!n)return!1;try{const i=new URL(n,t);return C(i.hostname)?i.pathname==="/"||/\/(?:start|join)\/[^/?#]+\/?$/.test(i.pathname):!1}catch{return!1}}function ye(e,t,n){const i=e?.getAttribute?.("href");if(!i)return!1;try{const r=new URL(i,n);return!C(r.hostname)||r.pathname.startsWith("/sign-in")?!1:(r.searchParams.set(B,t.event_id),r.searchParams.set(H,String(t.occurred_at_ms)),t.destination_flow_id?r.searchParams.set(R,t.destination_flow_id):r.searchParams.delete(R),e.setAttribute("href",r.toString()),!0)}catch{return!1}}function Ae(e={}){const t=e.window??globalThis.window,n=e.document??globalThis.document,r=(e.location??t?.location)?.href??"https://heyitsclara.com/",d=e.referrer??n?.referrer??"";let c=e.storage;if(c===void 0)try{c=t?.sessionStorage}catch{c=void 0}const A=e.now??Date.now,m=e.createId??oe,h=e.posthogCapture??((o,f)=>t?.posthog?.capture?.(o,f)),p=e.gtag??((...o)=>t?.gtag?.(...o)),w=e.config??ce(n),u=_e({url:r,referrer:d,config:w});let _=q(c,A(),m,u),v=!1,g;function T(o={}){const f=A();let s=o;D(_,f)||(_=q(c,f,m,u),g=void 0,s={...o},delete s.page_view_id);const x=_.next_event_sequence;return _.next_event_sequence+=1,_.last_activity_at_ms=f,ue(c,_),{analytics_schema_version:I,event_id:m(),marketing_session_id:_.marketing_session_id,event_sequence:x,occurred_at_ms:f,...u,..._.session_context,...s}}function N(o){try{const s=o?.target?.closest?.('[data-ph-event="cta_clicked"]');if(!s)return;const x=a(s.getAttribute("data-ph-location"),"unspecified"),Z=a(s.getAttribute("data-ph-cta-id"),x),P=ge(s,r),y=T({page_view_id:g,cta_id:Z,cta_role:me(s),cta_location:x,cta_text:l(s.innerText??s.textContent??s.getAttribute("aria-label"),80)??"",cta_destination:pe(s,r),...P?{destination_flow_id:P}:{},...a(s.getAttribute("data-ph-business-category"),"")?{business_category:a(s.getAttribute("data-ph-business-category"),"")}:{},...a(s.getAttribute("data-ph-offer-id"),"")?{offer_id:a(s.getAttribute("data-ph-offer-id"),"")}:{},...a(s.getAttribute("data-ph-experiment-id"),"")?{experiment_id:a(s.getAttribute("data-ph-experiment-id"),"")}:{},...a(s.getAttribute("data-ph-experiment-variant"),"")?{experiment_variant:a(s.getAttribute("data-ph-experiment-variant"),"")}:{}});return y.funnel_start_expected=he(s,r),y.entry_handoff_applied=ye(s,y,r),le(()=>{z(k.CTA_CLICKED,y,h,p)}),y}catch{return}}function G(){if(v)return g;v=!0;const o=T();g=o.event_id,o.page_view_id=g,z(k.PAGE_VIEWED,o,h,p);try{n?.addEventListener?.("click",N)}catch{}return g}return{start:G,handleClick:N,getPageContext:()=>({...u})}}function we(e={}){const t=e.window??globalThis.window;if(t?.[S])return t[S];const n=Ae(e);try{t&&(t[S]=n)}catch{}return n.start(),n}we();
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.