PageSourceSearch

https://getbadge.app/assets/StartChatPage-BiZCLx7v.js

js getbadge.app collected 2026-10-04 23:00:37 UTC 7,704 bytes, 1 lines download raw bytes

1import{w as T,v as D,x as L,a as o}from"./chunk-LFPYN7LY-DOVomWd4.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{u as $}from"./index-QPiJHbmZ.js";import{a as W}from"./requests-dqPv5jI2.js";import{g as k,f as z,j as O,h as S,i as M,k as w}from"./analytics-Goc4IYkO.js";import{r as q,B as b}from"./refStorage-C9tbtpqX.js";import{A as C}from"./AppStoreButton-BMqyCnkH.js";import{Q as v}from"./browser-B2aC3kr2.js";import{A as d}from"./appUrls-CZ9Luv50.js";import{b as Q}from"./bagde-logo-384-trans-DFT_xsgO.js";import{s as r}from"./StartChatPage.module-C6lRKKng.js";import"./module-QZZgjtq8.js";import"./theme-Bk4WtWLM.js";const F={width:"28px",height:"28px",borderRadius:"50%",backgroundColor:"#46e5a1",color:"#000",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.875rem",fontWeight:700,flexShrink:0},E={color:"#ffffff",fontSize:"1.125rem",fontWeight:700,margin:0,lineHeight:1.2},u={width:"22px",height:"22px",borderRadius:"50%",border:"1px solid rgba(255,255,255,0.25)",backgroundColor:"transparent",color:"rgba(255,255,255,0.6)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.75rem",fontWeight:600,flexShrink:0},g={color:"rgba(255,255,255,0.65)",fontSize:"0.9375rem",fontWeight:500,margin:0,lineHeight:1.2},U={display:"flex",flexDirection:"column",gap:"10px",marginTop:"4px",paddingTop:"16px",borderTop:"1px solid rgba(255,255,255,0.08)"},P={display:"flex",flexWrap:"nowrap",gap:"0.375rem",justifyContent:"center",margin:"0.25rem 0 1rem"},c={fontSize:"0.625rem",color:"rgba(255,255,255,0.7)",border:"1px solid rgba(255,255,255,0.15)",borderRadius:"999px",padding:"0.1875rem 0.5rem",whiteSpace:"nowrap",flexShrink:0},I={fontSize:"0.8125rem",fontWeight:600,color:"#46e5a1",margin:"0 0 4px"},A={display:"flex",flexDirection:"column",gap:"16px",textAlign:"left",maxWidth:"420px",margin:"0 auto",width:"100%"},oe=()=>[{title:"Badge - Get Started"},{name:"description",content:"Check if you already have peer reviews"}],G=()=>{const p=D(),a=$(),[m]=L(),s=m.get("token"),B=m.get("identifier")??"",h=m.get("session_token"),R=m.get("is_existing_user")==="true",[t]=o.useState(h?{session_token:h,is_existing_user:R}:null),[n,f]=o.useState("desktop"),[x,y]=o.useState("");o.useEffect(()=>{const i=navigator.userAgent.toLowerCase();/iphone|ipad|ipod/.test(i)?f("ios"):/android/.test(i)?f("android"):f("desktop")},[]),o.useEffect(()=>{q.captureFromUrl()},[]),o.useEffect(()=>{!h&&!s&&p("/")},[h,s,p]),o.useEffect(()=>{v.toDataURL(d.DESKTOP_BASE,{width:200,margin:2,color:{dark:"#000000",light:"#FFFFFF"}}).then(y).catch(()=>{})},[]);const[j,N]=o.useState(null);return o.useEffect(()=>{s&&W.attribution.resolveToken(s).then(i=>{const l=(i==null?void 0:i.data)??i;if(l!=null&&l.feedback_preview&&N(l.feedback_preview),l!=null&&l.target_user_id){a.identify(String(l.target_user_id),{source:"cold_outreach"});const _=k();a.capture("outreach_link_clicked",{token:s,page:"start_chat",utm_source:_.utm_source,utm_medium:_.utm_medium,utm_campaign:_.utm_campaign})}}).catch(()=>{})},[s]),o.useEffect(()=>{if(!s)return;const i=`${d.MOBILE_BASE}?token=${encodeURIComponent(s)}`;v.toDataURL(i,{width:200,margin:2,color:{dark:"#000000",light:"#FFFFFF"}}).then(y).catch(()=>{})},[s]),o.useEffect(()=>{if(!(t!=null&&t.session_token))return;const i=`${d.DESKTOP_BASE}?session_token=${t.session_token}`;v.toDataURL(i,{width:200,margin:2,color:{dark:"#000000",light:"#FFFFFF"}}).then(y).catch(()=>{})},[t==null?void 0:t.session_token]),o.useEffect(()=>{if(z(a,{source_cta:"hero",device_type:n,view_type:"page",has_token:!!s,token_value:s}),s){const i=k();O(a,{token_value:s,referrer:document.referrer||"",utm_source:i.utm_source,utm_medium:i.utm_medium,utm_campaign:i.utm_campaign,page:"start_chat"})}t?S(a,{device_type:n,is_existing_user:!!t.is_existing_user,method:t.is_existing_user?"open_app_button":n==="desktop"?"qr_code":"app_store_button"}):s&&S(a,{device_type:n,is_existing_user:!1,method:n==="desktop"?"qr_code":"app_store_button"})},[a]),e.jsxs("div",{className:r.page,children:[e.jsxs("div",{className:r.header,children:[e.jsx("button",{className:r.backButton,onClick:()=>{M(a,{close_method:"back_button",had_phone_input:!1,was_submitted:!!t,device_type:n}),p("/")},children:"←"}),e.jsx("img",{src:Q,alt:"Badge",className:r.logo,onClick:()=>p("/"),style:{cursor:"pointer"}})]}),e.jsx("div",{className:r.content,children:s&&!t?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:r.resultTitle,children:"Unlock your peer review."}),e.jsx("div",{className:r.reviewCard,children:e.jsx(b,{reviewSnippet:j?{visible_text:j}:void 0})}),e.jsxs("div",{style:P,children:[e.jsx("span",{style:c,children:"Anonymous"}),e.jsx("span",{style:c,children:"Verified colleagues"}),e.jsx("span",{style:c,children:"AI summarized"})]}),e.jsxs("div",{style:A,children:[e.jsx("p",{style:I,children:"Step 1 of 3 · ~2 min to unlock"}),e.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"flex-start"},children:[e.jsx("div",{style:F,children:"1"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("h3",{style:E,children:"Install the Badge app"}),e.jsx("div",{className:r.downloadSection,children:n==="desktop"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:r.downloadLabel,children:"Scan to download the app"}),x&&e.jsx("img",{src:x,alt:"QR Code",style:{width:"200px",height:"200px",borderRadius:"12px"}})]}):e.jsx("div",{onClick:()=>w(a,{device_type:n,is_existing_user:!1,method:"app_store_button"}),children:e.jsx(C,{deviceType:n,downloadUrl:`${d.MOBILE_BASE}?token=${encodeURIComponent(s)}`,isMobileScreen:!0})})})]})]}),e.jsxs("div",{style:U,children:[e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsx("div",{style:u,children:"2"}),e.jsx("h3",{style:g,children:"Give your first anonymous review to any colleague"})]}),e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsx("div",{style:u,children:"3"}),e.jsx("h3",{style:g,children:"Unlock your review"})]})]})]})]}):t?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:r.resultTitle,children:"Unlock your peer review."}),e.jsx("div",{className:r.reviewCard,children:e.jsx(b,{reviewSnippet:(t==null?void 0:t.review_snippet)??void 0})}),e.jsxs("div",{style:P,children:[e.jsx("span",{style:c,children:"Anonymous"}),e.jsx("span",{style:c,children:"Verified colleagues"}),e.jsx("span",{style:c,children:"AI summarized"})]}),e.jsxs("div",{style:A,children:[e.jsx("p",{style:I,children:"Step 1 of 3 · ~2 min to unlock"}),e.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"flex-start"},children:[e.jsx("div",{style:F,children:"1"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("h3",{style:E,children:"Install the Badge app"}),e.jsx("div",{className:r.downloadSection,children:n==="desktop"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:r.downloadLabel,children:"Scan to download the app"}),x&&e.jsx("img",{src:x,alt:"QR Code",style:{width:"200px",height:"200px",borderRadius:"12px"}})]}):e.jsx("div",{onClick:()=>w(a,{device_type:n,is_existing_user:!1,method:"app_store_button"}),children:e.jsx(C,{deviceType:n,downloadUrl:t!=null&&t.session_token?`${d.MOBILE_BASE}?session_token=${t.session_token}&identifier=${encodeURIComponent(B)}`:d.MOBILE_BASE,isMobileScreen:!0})})})]})]}),e.jsxs("div",{style:U,children:[e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsx("div",{style:u,children:"2"}),e.jsx("h3",{style:g,children:"Give your first anonymous review to any colleague"})]}),e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsx("div",{style:u,children:"3"}),e.jsx("h3",{style:g,children:"Unlock your review"})]})]})]})]}):null})]})},ae=T(G);export{ae as default,oe as meta};

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.