PageSourceSearch

https://tbxunfiltered.com/assets/TipForm-DyL03VUO.js

js tbxunfiltered.com collected 2026-10-09 22:40:33 UTC 6,468 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{i as t,r as n}from"./framework-CXnKph_e.js";var r=e(t(),1),i=n(),a=10*1024*1024;async function o(e,t){let n=await e.text();if(e.ok)return``;try{return JSON.parse(n).error||t}catch{return e.status===413||/payload too large|request entity too large/i.test(n)?`That attachment is too large for the website. Please choose a file that is 10 MB or smaller.`:n.trim()||t}}function s(){let[e,t]=(0,r.useState)(!1),[n,s]=(0,r.useState)(`idle`),[c,l]=(0,r.useState)(``),u=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let e=()=>t(!0);return window.addEventListener(`open-tbx-tip-form`,e),()=>window.removeEventListener(`open-tbx-tip-form`,e)},[]),(0,r.useEffect)(()=>{if(!e)return;document.body.style.overflow=`hidden`;let n=e=>e.key===`Escape`&&t(!1);return window.addEventListener(`keydown`,n),window.setTimeout(()=>u.current?.querySelector(`input`)?.focus(),50),()=>{document.body.style.overflow=``,window.removeEventListener(`keydown`,n)}},[e]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`button`,{className:`floating-tip`,type:`button`,onClick:()=>{s(`idle`),t(!0)},children:[(0,i.jsx)(`span`,{children:`◆`}),(0,i.jsx)(`strong`,{children:`SHARE A TIP`}),(0,i.jsx)(`small`,{children:`CONFIDENTIAL INQUIRY`})]}),e&&(0,i.jsx)(`div`,{className:`tip-modal`,role:`presentation`,onMouseDown:e=>e.target===e.currentTarget&&t(!1),children:(0,i.jsxs)(`div`,{className:`tip-dialog`,ref:u,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tip-form-title`,children:[(0,i.jsx)(`button`,{className:`tip-close`,type:`button`,onClick:()=>t(!1),"aria-label":`Close tip form`,children:`×`}),(0,i.jsxs)(`div`,{className:`tip-form-intro`,children:[(0,i.jsx)(`span`,{className:`tip-file`,children:`TBX // CONFIDENTIAL INQUIRY`}),(0,i.jsxs)(`h2`,{id:`tip-form-title`,children:[`Have information`,(0,i.jsx)(`br`,{}),(0,i.jsx)(`em`,{children:`we should examine?`})]}),(0,i.jsx)(`p`,{children:`Share the details, context, and source material you believe deserve a closer look.`}),(0,i.jsxs)(`div`,{className:`tip-warning`,children:[(0,i.jsx)(`strong`,{children:`This is not law enforcement.`}),` For emergencies or immediate danger, call 911. Contact the appropriate investigating agency with evidence related to an active case.`]})]}),n===`success`?(0,i.jsxs)(`div`,{className:`tip-success`,children:[(0,i.jsx)(`span`,{children:`✓`}),(0,i.jsx)(`h3`,{children:`Your tip has been saved.`}),(0,i.jsx)(`p`,{children:`Your information has been saved securely and emailed directly to the TBX team at [email protected].`}),(0,i.jsx)(`button`,{className:`button button-primary`,type:`button`,onClick:()=>t(!1),children:`CLOSE`})]}):(0,i.jsxs)(`form`,{className:`tip-form`,onSubmit:async e=>{e.preventDefault(),s(`sending`),l(``);let t=e.currentTarget,n=new FormData(t),r=n.get(`attachment`);if(r instanceof File&&r.size>a){s(`error`),l(`That attachment is too large. Please choose a file that is 10 MB or smaller.`);return}try{let e=await o(await fetch(`/api/tips`,{method:`POST`,body:n}),`Submission failed`);if(e)throw Error(e);s(`success`)}catch(e){l(e instanceof Error?e.message:`Please try again.`),s(`error`)}},children:[(0,i.jsxs)(`div`,{className:`tip-fields two`,children:[(0,i.jsxs)(`label`,{children:[(0,i.jsxs)(`span`,{children:[`Your name `,(0,i.jsx)(`i`,{children:`optional`})]}),(0,i.jsx)(`input`,{name:`name`,autoComplete:`name`,placeholder:`Name or alias`})]}),(0,i.jsxs)(`label`,{children:[(0,i.jsx)(`span`,{children:`Your email`}),(0,i.jsx)(`input`,{name:`email`,type:`email`,autoComplete:`email`,placeholder:`[email protected]`,required:!0})]})]}),(0,i.jsxs)(`div`,{className:`tip-fields two`,children:[(0,i.jsxs)(`label`,{children:[(0,i.jsx)(`span`,{children:`Type of information`}),(0,i.jsxs)(`select`,{name:`category`,defaultValue:``,required:!0,children:[(0,i.jsx)(`option`,{value:``,disabled:!0,children:`Select one`}),(0,i.jsx)(`option`,{children:`Case information`}),(0,i.jsx)(`option`,{children:`Document or source`}),(0,i.jsx)(`option`,{children:`Show follow-up`}),(0,i.jsx)(`option`,{children:`Guest or expert lead`}),(0,i.jsx)(`option`,{children:`Correction`}),(0,i.jsx)(`option`,{children:`Other`})]})]}),(0,i.jsxs)(`label`,{children:[(0,i.jsx)(`span`,{children:`Subject`}),(0,i.jsx)(`input`,{name:`subject`,placeholder:`What is this about?`,maxLength:180,required:!0})]})]}),(0,i.jsxs)(`label`,{children:[(0,i.jsx)(`span`,{children:`What should we know?`}),(0,i.jsx)(`textarea`,{name:`tipText`,rows:7,minLength:20,maxLength:6e3,placeholder:`Describe what you know, how you know it, and any context that could help us evaluate it...`,required:!0})]}),(0,i.jsxs)(`label`,{children:[(0,i.jsxs)(`span`,{children:[`Supporting link `,(0,i.jsx)(`i`,{children:`optional`})]}),(0,i.jsx)(`input`,{name:`sourceUrl`,type:`text`,inputMode:`url`,autoCapitalize:`none`,autoCorrect:`off`,placeholder:`A website or social-media link`})]}),(0,i.jsxs)(`label`,{className:`file-upload`,children:[(0,i.jsxs)(`span`,{children:[`Attach supporting material `,(0,i.jsx)(`i`,{children:`optional`})]}),(0,i.jsx)(`input`,{name:`attachment`,type:`file`,accept:`.pdf,.txt,.doc,.docx,.jpg,.jpeg,.png,.gif,.webp,.heic,.heif,.mp3,.m4a,.wav,.mp4,.mov`}),(0,i.jsx)(`small`,{children:`DOCUMENT, PHOTO, AUDIO, OR SHORT VIDEO · MAXIMUM 10 MB`})]}),(0,i.jsx)(`input`,{className:`honey`,name:`company`,tabIndex:-1,autoComplete:`off`,"aria-hidden":`true`}),(0,i.jsxs)(`label`,{className:`check`,children:[(0,i.jsx)(`input`,{type:`checkbox`,required:!0}),(0,i.jsx)(`span`,{children:`I understand TBX Unfiltered is an independent media program—not law enforcement—and that submitting information does not guarantee publication or a response.`})]}),(0,i.jsxs)(`label`,{className:`check`,children:[(0,i.jsx)(`input`,{type:`checkbox`,name:`updatesConsent`,value:`yes`}),(0,i.jsx)(`span`,{children:`Yes, I’d also like occasional TBX show updates by email. I can unsubscribe at any time.`})]}),(0,i.jsxs)(`p`,{className:`tip-privacy`,children:[`Your email will be used to follow up about this submission. Marketing updates are optional. See our `,(0,i.jsx)(`a`,{href:`/privacy`,target:`_blank`,children:`Privacy Notice`}),`.`]}),n===`error`&&(0,i.jsx)(`p`,{className:`tip-error`,role:`alert`,children:c}),(0,i.jsxs)(`button`,{className:`tip-submit`,type:`submit`,disabled:n===`sending`,children:[(0,i.jsx)(`span`,{children:n===`sending`?`SECURING SUBMISSION...`:`SUBMIT TIP`}),(0,i.jsx)(`b`,{children:`→`})]})]})]})})]})}export{s as default};

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.