PageSourceSearch

https://towmatic.ai/static/js/5146.a3212598.chunk.js

js towmatic.ai collected 2026-09-25 03:33:52 UTC 7,200 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[5146],{75146(e,a,t){t.r(a),t.d(a,{DemoPage:()=>h,default:()=>b});var n=t(65043),s=t(49367),l=t(45685),r=t(78082),o=t(89379),i=t(44687),m=t(22024),d=t(85692),c=t(70579);const u=[["AL","Alabama"],["AZ","Arizona"],["AR","Arkansas"],["CA","California"],["CO","Colorado"],["CT","Connecticut"],["DE","Delaware"],["FL","Florida"],["GA","Georgia"],["ID","Idaho"],["IL","Illinois"],["IN","Indiana"],["IA","Iowa"],["KS","Kansas"],["KY","Kentucky"],["LA","Louisiana"],["ME","Maine"],["MD","Maryland"],["MA","Massachusetts"],["MI","Michigan"],["MN","Minnesota"],["MS","Mississippi"],["MO","Missouri"],["MT","Montana"],["NE","Nebraska"],["NV","Nevada"],["NH","New Hampshire"],["NJ","New Jersey"],["NM","New Mexico"],["NY","New York"],["NC","North Carolina"],["ND","North Dakota"],["OH","Ohio"],["OK","Oklahoma"],["OR","Oregon"],["PA","Pennsylvania"],["RI","Rhode Island"],["SC","South Carolina"],["SD","South Dakota"],["TN","Tennessee"],["TX","Texas"],["UT","Utah"],["VT","Vermont"],["VA","Virginia"],["WA","Washington"],["WV","West Virginia"],["WI","Wisconsin"],["WY","Wyoming"]],x=new Set(u.map(e=>{let[a]=e;return a})),p=e=>{let{onUnlocked:a}=e;const t=(0,r.useDemoStore)(e=>
1e.setAccess),[s,l]=(0,n.useState)({name:"",email:"",company_name:"",phone:"",state:""}),[p,h]=(0,n.useState)(!1),[b,g]=(0,n.useState)(""),f=n.useMemo(()=>{try{return(new URLSearchParams(window.location.search).get("ref")||"direct").slice(0,60)}catch(e){return"direct"}},[]),y=e=>a=>l((0,o.A)((0,o.A)({},s),{},{[e]:a.target.value}));return(0,c.jsx)("div",{className:"min-h-screen w-full bg-neutral-950 text-neutral-100 flex items-center justify-center px-4 py-8",children:(0,c.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-neutral-800 bg-neutral-900/80 p-6 sm:p-8 shadow-2xl backdrop-blur","data-testid":"demo-access-form",children:[(0,c.jsxs)("div",{className:"mb-5 sm:mb-6 flex items-center gap-2",children:[(0,c.jsx)("span",{className:"inline-flex h-2 w-2 rounded-full bg-emerald-400 animate-pulse"}),(0,c.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-widest text-emerald-300",children:"Interactive Demo"})]}),(0,c.jsx)("h1",{className:"text-2xl sm:text-3xl font-semibold leading-tight",children:"Take Towmatic for a spin"}),(0,c.jsx)("p",{className:"mt-2 text-xs sm:text-sm text-neutral-400",children:"See how a real tow booking flows through your dashboard \u2014 instant SMS, driver push, dispatch confirmation. No signup required."}),(0,c.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),g("");const n=[];if(s.name.trim()||n.push("Name"),s.email.trim()||n.push("Email"),s.company_name.trim()||n.push("Company"),x.has(s.state)||n.push("State"),n.length)g("Please enter your ".concat(n.join(", "),"."));else{h(!0);try{i.demoLeadsAPI&&await i.demoLeadsAPI.capture({kind:"lead",name:s.name.trim(),email:s.email.trim(),company_name:s.company_name.trim(),phone:s.phone.trim(),state:s.state,entry_ref:f,referrer:document.referrer,user_agent:navigator.userAgent}),t({name:s.name.trim(),email:s.email.trim(),company_name:s.company_name.trim(),phone:s.phone.trim(),state:s.state}),a&&a()}catch(o){var l,r;const e=(null===o||void 0===o||null===(l=o.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.detail)||(null===o||void 0===o?void 0:o.message)||"Something went wrong capturing your info \u2014 but the demo is unlocked.";g(String(e)),t({name:s.name.trim(),email:s.email.trim(),company_name:s.company_name.trim(),phone:s.phone.trim(),state:s.state}),a&&a()}finally{h(!1)}}},className:"mt-6 space-y-3",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"mb-1 block text-xs font-medium text-neutral-300",children:"Name *"}),(0,c.jsx)("input",{type:"text",value:s.name,onChange:y("name"),placeholder:"Your name",className:"w-full rounded-lg border border-neutral-700 bg-neutral-950 px-3 py-2 text-sm text-neutral-100 outline-none placeholder:text-neutral-600 focus:border-emerald-400","data-testid":"demo-access-name",autoFocus:!0})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"mb-1 block text-xs font-medium text-neutral-300",children:"Work Email *"}),(0,c.jsx)("input",{type:"email",value:s.email,onChange:y("email"),placeholder:"[email protected]",className:"w-full rounded-lg border border-neutral-700 bg-neutral-950 px-3 py-2 text-sm text-neutral-100 outline-none placeholder:text-neutral-600 focus:border-emerald-400","data-testid":"demo-access-email"})]}),(0,c.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"mb-1 block text-xs font-medium text-neutral-300",children:"Company *"}),(0,c.jsx)("input",{type:"text",value:s.company_name,onChange:y("company_name"),placeholder:"Your towing company",className:"w-full rounded-lg border border-neutral-700 bg-neutral-950 px-3 py-2 text-sm text-neutral-100 outline-none placeholder:text-neutral-600 focus:border-emerald-400","data-testid":"demo-access-company",required:!0})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"mb-1 block text-xs font-medium text-neutral-300",children:"State *"}),(0,c.jsxs)("select",{value:s.state,onChange:y("state"),className:"w-full rounded-lg border border-neutral-700 bg-neutral-950 px-3 py-2 text-sm text-neutral-100 outline-none focus:border-emerald-400 appearance-none","data-testid":"demo-access-state",required:!0,children:[(0,c.jsx)("option",{value:"",disabled:!0,children:"Select\u2026"}),u.map(e=>{let[a,t]=e;return(0,c.jsxs)("option",{value:a,children:[a," \u2014 ",t]},a)})]})]})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"mb-1 block text-xs font-medium text-neutral-300",children:"Phone"}),(0,c.jsx)("input",{type:"tel",value:s.phone,onChange:y("phone"),placeholder:"Optional",className:"w-full rounded-lg border border-neutral-700 bg-neutral-950 px-3 py-2 text-sm text-neutral-100 outline-none placeholder:text-neutral-600 focus:border-emerald-400","data-testid":"demo-access-phone"})]}),b&&(0,c.jsx)("div",{className:"text-xs text-rose-400","data-testid":"demo-access-error",children:b}),(0,c.jsxs)("button",{type:"submit",disabled:p,className:"mt-2 inline-flex w-full items-center justify-center gap-2 rounded-lg bg-emerald-500 px-4 py-2.5 text-sm font-semibold text-neutral-950 shadow-lg transition hover:bg-emerald-400 disabled:opacity-60","data-testid":"demo-access-submit",children:[p?(0,c.jsx)(m.A,{className:"animate-spin",size:16}):null,p?"Unlocking\u2026":"Launch Demo",!p&&(0,c.jsx)(d.A,{size:16})]}),(0,c.jsx)("p",{className:"pt-2 text-[10px] leading-relaxed text-neutral-500",children:"By continuing, you agree we may contact you about Towmatic. No real dispatches will be sent \u2014 this is a fully-offline sandbox."})]})]})})},h=()=>{const e=(0,r.useDemoStore)(e=>e.access),a=(0,l.Zp)();return(0,n.useEffect)(()=>{e&&a("/demo/dashboard",{replace:!0})},[e,a]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(s.mg,{children:[(0,c.jsx)("title",{children:"Interactive Demo \u2014 Towmatic"}),(0,c.jsx)("meta",{name:"robots",content:"noindex"})]}),(0,c.jsx)(p,{onUnlocked:()=>a("/demo/dashboard",{replace:!0})})]})},b=h}}]);
2//# sourceMappingURL=5146.a3212598.chunk.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.