PageSourceSearch

https://portal.loyalsnap.com/assets/ConsentUrlCheckResult-7qPs9Qh5.js

js loyalsnap.com collected 2026-09-30 05:16:09 UTC 5,438 bytes, 2 lines download raw bytes

1import{s as e}from"./chunk-Bj-mKKzh.js";import{A as t,G as n,U as r,W as i,g as a,m as o,p as s}from"./Paper-CT95-TX0.js";import{n as c,t as l}from"./jsx-runtime-CcNMceED.js";import{n as u,t as d}from"./Box-Bs33tbRX.js";import{t as f}from"./Stack-DK-Tauj2.js";import{t as p}from"./ListItem-mB5Ep50R.js";import{t as m}from"./CircularProgress-QnWXNmfn.js";import{t as h}from"./List-CCeJ2SRl.js";import{t as g}from"./Button-CA33sIkU.js";import{f as _,z as v}from"./chunk-1-DI_let5B.js";import{t as y}from"./Alert-mXhLjf31.js";import{t as b}from"./Icon-CuO8RMu3.js";import{i as x}from"./StudioTime-BreBaoUT.js";import{t as S}from"./validation-B0ixKDM5.js";function C(e){return i(`MuiAlertTitle`,e)}r(`MuiAlertTitle`,[`root`]);var w=e(c(),1),T=l(),E=e=>{let{classes:n}=e;return t({root:[`root`]},C,n)},D=a(u,{name:`MuiAlertTitle`,slot:`Root`})(o(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),O=w.forwardRef(function(e,t){let r=s({props:e,name:`MuiAlertTitle`}),{className:i,...a}=r,o=r;return(0,T.jsx)(D,{gutterBottom:!0,component:`div`,ownerState:o,ref:t,className:n(E(o).root,i),...a})}),k=function(e){return e.PASSED=`passed`,e.FAILED=`failed`,e.UNVERIFIABLE=`unverifiable`,e}({}),A=function(e){return e.BLOCKED_HOST=`blocked_host`,e.UNREACHABLE=`unreachable`,e.TIMEOUT=`timeout`,e.HTTP_ERROR=`http_error`,e.TOO_MANY_REDIRECTS=`too_many_redirects`,e.EMPTY_CONTENT=`empty_content`,e}({}),j={[A.BLOCKED_HOST]:`That address isn't a public web page.`,[A.UNREACHABLE]:`We couldn't reach that address.`,[A.TIMEOUT]:`The page took too long to respond.`,[A.HTTP_ERROR]:`The page returned an error, so it may have moved.`,[A.TOO_MANY_REDIRECTS]:`The address redirected too many times.`,[A.EMPTY_CONTENT]:`The page had no readable text, which usually means it builds itself in the browser.`},M={[k.PASSED]:`success`,[k.FAILED]:`warning`,[k.UNVERIFIABLE]:`info`},N=class e{static toCheckableUrl=e=>{let t=S.normalizeUrl(e);return S.isUrl(t)?t:null};static getStatusSeverity=e=>M[e];static getStatusHeadline=t=>{let n=t.missingRequirements.length;return t.status===k.PASSED?`Your pages include everything carriers look for.`:t.status===k.UNVERIFIABLE?e.getUnreadablePages(t).length===0?`These pages haven't been checked yet.`:`We couldn't read one of your pages, so this needs a manual check.`:n===1?`Your pages are missing 1 thing carriers require.`:`Your pages are missing ${n} things carriers require.`};static getUnreadablePages=e=>[e.privacyPolicy,e.terms].filter(e=>!!e&&e.status===k.UNVERIFIABLE);static getFailureReasonLabel=e=>e.failureReason?j[e.failureReason]:`We couldn't read that page.`;static buildRemediationText=e=>[`Mobile carriers require the following on our privacy policy or terms page before`,`we can send text messages:`,``,...e.map((e,t)=>`${t+1}. ${e.label}\n   ${e.guidance}`)].join(`
2`)},P=({requirements:e})=>(0,T.jsx)(h,{dense:!0,disablePadding:!0,sx:{mt:.5},children:e.map(e=>(0,T.jsxs)(p,{disableGutters:!0,sx:{display:`block`,py:.5},children:[(0,T.jsx)(u,{variant:`body2`,sx:{fontWeight:600},children:e.label}),(0,T.jsx)(u,{variant:`body2`,children:e.guidance})]},e.key))}),F=({requirements:e})=>{let[t,n]=(0,w.useState)(!1),r=async()=>{await navigator.clipboard.writeText(N.buildRemediationText(e)),n(!0)};return(0,T.jsx)(g,{size:`small`,variant:`outlined`,startIcon:(0,T.jsx)(b,{Component:v,fontSize:`small`}),onClick:()=>void r(),children:t?`Copied`:`Copy for your web developer`})},I=({result:e})=>(0,T.jsx)(h,{dense:!0,disablePadding:!0,sx:{mt:.5},children:N.getUnreadablePages(e).map(e=>(0,T.jsxs)(p,{disableGutters:!0,sx:{display:`block`,py:.5},children:[(0,T.jsx)(u,{variant:`body2`,sx:{wordBreak:`break-all`},children:e.url}),(0,T.jsx)(u,{variant:`body2`,children:N.getFailureReasonLabel(e)})]},e.url))}),L=({result:e,onRecheck:t})=>{let n=e.privacyPolicy?.checkedTime??e.terms?.checkedTime;return n?(0,T.jsxs)(f,{direction:`row`,spacing:1,sx:{alignItems:`center`,mt:1,flexWrap:`wrap`},children:[(0,T.jsxs)(u,{variant:`caption`,children:[`Checked `,(0,T.jsx)(x,{value:n,formatStr:`PPp`})]}
2),t&&(0,T.jsx)(g,{size:`small`,onClick:t,children:`Re-check`})]}):null},R=({result:e,isChecking:t,error:n,onRecheck:r})=>{let i={role:`status`,"aria-live":`polite`};if(t)return(0,T.jsxs)(f,{direction:`row`,spacing:1,sx:{alignItems:`center`,mt:1},...i,children:[(0,T.jsx)(m,{size:16}),(0,T.jsx)(u,{variant:`body2`,children:`Checking your pages...`})]});if(n)return(0,T.jsx)(y,{severity:`info`,sx:{mt:1},...i,children:`We couldn't check these pages right now. You can save and try again later.`});if(!e)return null;let a=e.status===k.PASSED,o=N.getUnreadablePages(e).length>0;return(0,T.jsx)(d,{sx:{mt:1},...i,children:(0,T.jsxs)(y,{severity:N.getStatusSeverity(e.status),icon:a?(0,T.jsx)(b,{Component:_,fontSize:`small`}):void 0,children:[(0,T.jsx)(O,{sx:{mb:0},children:N.getStatusHeadline(e)}),e.status===k.FAILED&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(u,{variant:`body2`,sx:{mt:.5},children:`You can still save these URLs, but carriers are likely to reject your text registration until your pages cover the following.`}),(0,T.jsx)(P,{requirements:e.missingRequirements}),(0,T.jsx)(F,{requirements:e.missingRequirements})]}),o&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(u,{variant:`body2`,sx:{mt:.5},children:`You can still save these URLs. Someone will need to check the page b
2y hand.`}),(0,T.jsx)(I,{result:e})]}),(0,T.jsx)(L,{result:e,onRecheck:r})]})})};export{N as n,O as r,R as t};

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.