PageSourceSearch

https://trains.fyi/_next/static/chunks/pages/feedback-430038bae5790e24.js

js trains.fyi collected 2026-09-24 09:54:47 UTC 8,530 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8949],{372:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(14232);let r=a.forwardRef(function({title:e,titleId:t,...s},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},37249:(e,t,s)=>{"use strict";s.d(t,{A:()=>x});var a=s(37876),r=s(14232),l=s(372),i=s(25620),n=s(21081),o=s(45434),d=s(12921),c=s(1300);let u=function({getUser:e,writeFeedback:t,writeGuestFeedback:s,timestamp:a}){let r=!1;return async({message:l,isPremium:i=!1,pagePath:n="",email:o=""})=>{if(r)throw Error("A message is already being sent.");let d=e(),c=d?.email||("string"==typeof o?o.trim():"");if((!d?.uid||!d.email)&&(c.length>254||!/^[^\s@<>]+@[^\s@<>]+\.[^\s@<>]+$/.test(c)))throw Error("Enter a valid email address.");let u="string"==typeof l?l.trim():"";if(!u)throw Error("Write a message before sending.");if(Array.from(u).length>1e3)throw Error("Keep your message to 1,000 characters.");r=!0;try{if(!d?.uid)return void await s({message:u,email:c,pagePath:n});await t({userId:d.uid,email:c,displayName:d.displayName||null,message:u,isPremium:!0===i,appVersion:"web",platform:"web",createdAt:a(),pagePath:n})}finally{r=!1}}}({getUser:()=>c.j.currentUser,writeFeedback:e=>(0,o.gS)((0,o.rJ)(c.db,"feedback"),e),writeGuestFeedback:async e=>{await (0,d.Qg)((0,d.Uz)(c.A,"us-central1"),"submitGuestFeedback",{timeout:3e4})(e)},timestamp:o.O5}),m="trainsfyi-feedback-draft";function x(){let{user:e,loading:t}=(0,i.A)(),{isPremium:s}=(0,n.x)(),[o,d]=(0,r.useState)(""),[c,x]=(0,r.useState)(""),[h,f]=(0,r.useState)(!1),[b,g]=(0,r.useState)(!1),[p,y]=(0,r.useState)(!1),[w,v]=(0,r.useState)(""),j=(0,r.useRef)(!1),k=(0,r.useId)();async function N(e){if(e.preventDefault(),!j.current&&!t&&o.trim()){j.current=!0,g(!0),v("");try{await u({message:o,email:c,isPremium:s,pagePath:window.location.pathname});try{sessionStorage.removeItem(m)}catch{}d(""),y(!0)}catch(e){v(e?.code==="functions/resource-exhausted"?"Too many messages. Please try again in 15 minutes.":"Couldn’t send your message. Please check your connection and try again. Your draft is still here.")}finally{j.current=!1,g(!1)}}}return(0,r.useEffect)(()=>{try{d(sessionStorage.getItem(m)||"")}catch{}f(!0)},[]),p?(0,a.jsxs)("div",{role:"status",className:"py-5 text-center",children:[(0,a.jsx)(l.A,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-emerald-600"}),(0,a.jsx)("h2",{className:"mt-4 text-lg font-semibold text-slate-950",children:"Thanks for the feedback!"}),(0,a.jsx)("p",{className:"mt-2 text-sm leading-6 text-slate-600",children:"I’ll take a look and get back to you if needed."}),(0,a.jsx)("button",{type:"button",onClick:()=>y(!1),className:"mt-5 rounded-lg px-3 py-2 text-sm font-semibold text-blue-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:"Send another message"})]}):(0,a.jsxs)("form",{onSubmit:N,className:"space-y-4","aria-busy":b,children:[(0,a.jsx)("p",{className:"text-sm leading-6 text-slate-600",children:"Got a bug, suggestion, or anything else? I read every message."}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:`${k}-message`,className:"block text-sm font-semibold text-slate-900",children:"Your message"}),(0,a.jsx)("textarea",{id:`${k}-message`,required:!0,value:o,disabled:!h||b,onChange:e=>(function(e){let t=Array.from(e).slice(0,1e3).join("");d(t);try{sessionStorage.setItem(m,t)}catch{}})(e.target.value),rows:6,placeholder:"What’s on your mind?","aria-describedby":`${k}-count`,className:"mt-2 block w-full resize-y rounded-xl border-slate-300 text-base focus:border-blue-600 focus:ring-blue-600 disabled:opacity-60"}),(0,a.jsxs)("p",{id:`${k}-count`,className:"mt-2 text-right text-xs tabular-nums text-slate-500",children:[Array.from(o).length,"/",1e3]})]}),w&&(0,a.jsx)("p",{role:"alert",className:"rounded-lg bg-red-50 p-3 text-sm leading-6 text-red-800",children:w}),!t&&!e?.email&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:`${k}-email`,className:"block text-sm font-semibold text-slate-900",children:"Your email"}),(0,a.jsx)("input",{id:`${k}-email`,type:"email",autoComplete:"email",required:!0,maxLength:254,value:c,disabled:b,onChange:e=>x(e.target.value),className:"mt-2 block w-full rounded-xl border-slate-300 text-base focus:border-blue-600 focus:ring-blue-600 disabled:opacity-60"}),(0,a.jsx)("p",{className:"mt-2 text-xs leading-5 text-slate-500",children:"So we can reply to your message."})]}),e?.email&&(0,a.jsxs)("p",{className:"text-xs leading-5 text-slate-500",children:["Reply to ",e.email]}),(0,a.jsx)("button",{type:"submit",disabled:!h||t||b||!o.trim(),className:"min-h-11 w-full rounded-xl bg-blue-800 px-4 py-3 text-sm font-semibold text-white hover:bg-blue-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600 disabled:cursor-not-allowed disabled:opacity-50",children:b?"Sending…":"Send message"})]})}},49915:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(37876),r=s(60570),l=s(48230),i=s.n(l);function n({pages:e}){return(0,a.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,a.jsxs)("ol",{role:"list",className:"flex items-center space-x-4 pt-6",children:[(0,a.jsx)("li",{children:(0,a.jsx)("div",{children:(0,a.jsxs)(i(),{href:"/",className:"text-gray-400 hover:text-gray-500",children:[(0,a.jsx)(r.A,{"aria-hidden":"true",className:"h-5 w-5 flex-shrink-0"}),(0,a.jsx)("span",{className:"sr-only",children:"Home"})]})})}),e.map(e=>(0,a.jsx)("li",{children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("svg",{fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true",className:"h-5 w-5 flex-shrink-0 text-gray-300",children:(0,a.jsx)("path",{d:"M5.555 17.776l8-16 .894.448-8 16-.894-.448z"})}),(0,a.jsx)(i(),{href:e.href,"aria-current":e.current?"page":void 0,className:"ml-4 text-sm font-medium text-gray-500 hover:text-gray-700",children:e.name})]})},e.name))]})})}},60570:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(14232);let r=a.forwardRef(function({title:e,titleId:t,...s},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M9.293 2.293a1 1 0 0 1 1.414 0l7 7A1 1 0 0 1 17 11h-1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-6H3a1 1 0 0 1-.707-1.707l7-7Z",clipRule:"evenodd"}))})},60880:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(37876),r=s(49915),l=s(85392),i=s(74),n=s(37249),o=s(93408);function d(){return(0,a.jsxs)("div",{className:"min-h-screen bg-slate-50",children:[(0,a.jsx)(o.A,{title:"Send feedback | trains.fyi",description:"Send a message, report a problem, or suggest an improvement to trains.fyi.",canonical:"/feedback/"}),(0,a.jsx)(i.A,{}),(0,a.jsxs)("main",{className:"mx-auto max-w-7xl px-6 pb-20 pt-4 lg:px-8",children:[(0,a.jsx)(r.A,{pages:[{name:"Send feedback",href:"/feedback/"}]}),(0,a.jsxs)("section",{className:"mx-auto mt-10 max-w-xl rounded-2xl border border-slate-200 bg-white p-6 shadow-sm sm:p-10",children:[(0,a.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-blue-700",children:"Let’s make trains.fyi better"}),(0,a.jsx)("h1",{className:"mb-6 mt-3 text-3xl font-semibold tracking-tight text-slate-950",children:"Send feedback"}),(0,a.jsx)(n.A,{})]})]}),(0,a.jsx)(l.A,{})]})}},63164:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/feedback",function(){return s(60880)}])},77808:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(14232);let r=a.forwardRef(function({title:e,titleId:t,...s},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"}))})}},e=>{e.O(0,[6701,3927,2325,3990,8447,5392,636,6593,8792],()=>e(e.s=63164)),_N_E=e.O()}]);

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.