PageSourceSearch

https://www.gtmarena.ai/_next/static/chunks/app/pricing-md/page-f809adc8b077201d.js

js gtmarena.ai collected 2026-10-05 13:28:42 UTC 7,256 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39],{3960:(e,r,t)=>{"use strict";t.d(r,{default:()=>u});var a=t(5155),n=t(2115),s=t(2619),l=t.n(s),d=t(6504),o=t(4514),i=t(6588);let c={render:"Reading the page in a real browser",compose:"Writing the pricing.md",cached:"Loading the cached pricing.md"};function u(e){let{initialUrl:r=""}=e,[t,s]=(0,n.useState)(r),[u,m]=(0,n.useState)(!1),[p,x]=(0,n.useState)("idle"),[h,f]=(0,n.useState)(""),[g,b]=(0,n.useState)(null),[y,w]=(0,n.useState)(null),[v,j]=(0,n.useState)("rendered"),N=(0,n.useRef)(""),k=(0,n.useRef)(null),S=(0,n.useRef)(null),C=(0,n.useCallback)(()=>{k.current&&(clearTimeout(k.current),k.current=null),f(N.current)},[]);(0,n.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]),(0,n.useEffect)(()=>{let e=S.current;e&&(e.scrollTop=e.scrollHeight)},[h]);let R=(0,n.useCallback)(async e=>{e.preventDefault(),!u&&t.trim()&&(m(!0),b(null),w(null),f(""),x("render"),N.current="",await (0,i.e)({url:t},e=>{"phase"===e.type?x(e.phase):"delta"===e.type?(N.current+=e.text,k.current||(k.current=setTimeout(()=>{k.current=null,f(N.current)},60))):"done"===e.type?(C(),w({domain:e.domain,markdown:e.markdown,cached:e.cached})):"error"===e.type&&b(e.message)}),C(),m(!1),x("idle"))},[u,t,C]),O=(0,n.useCallback)(()=>{y&&navigator.clipboard.writeText(y.markdown)},[y]),T=(0,n.useCallback)(()=>{if(!y)return;let e=new Blob([y.markdown],{type:"text/markdown"}),r=document.createElement("a");r.href=URL.createObjectURL(e),r.download="pricing.md",r.click(),URL.revokeObjectURL(r.href)},[y]),P=u&&!y,E="idle"===p?"render":p;return(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("form",{onSubmit:R,className:"mx-auto flex max-w-2xl gap-2",children:[(0,a.jsx)("input",{type:"text",value:t,onChange:e=>s(e.target.value),placeholder:"https://vendor.com/pricing","aria-label":"Pricing page URL",className:"flex-1 rounded-md border bg-background px-4 py-3 text-sm outline-none focus:ring-2 focus:ring-primary",disabled:u}),(0,a.jsx)("button",{type:"submit",disabled:u||!t.trim(),className:"rounded-md bg-primary px-5 py-3 text-sm font-medium text-primary-foreground disabled:opacity-50",children:u?"Working":"Generate"})]}),P&&(0,a.jsxs)("div",{className:"mt-6 w-full text-left","aria-live":"polite",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[(0,a.jsxs)("span",{className:"relative inline-flex h-2 w-2",children:[(0,a.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-75"}),(0,a.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-primary"})]}),(0,a.jsx)("span",{children:c[E]}),(0,a.jsx)("span",{className:"text-muted-foreground animate-pulse",children:"..."})]}),(0,a.jsx)("div",{className:"mt-3 h-1 w-full overflow-hidden rounded bg-muted",children:(0,a.jsx)("div",{className:"h-full w-full animate-pulse rounded bg-primary/60"})}),"compose"===E&&h?(0,a.jsx)("div",{ref:S,className:"prose prose-sm dark:prose-invert mt-4 max-h-[32rem] max-w-none overflow-auto scroll-smooth rounded-lg border bg-card px-5 py-4",children:(0,a.jsx)(d.oz,{remarkPlugins:[o.A],children:h})}):(0,a.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"A cold page takes up to a minute. Cached pages are instant."})]}),g&&(0,a.jsx)("p",{className:"mx-auto mt-6 max-w-2xl rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-left",role:"alert",children:g}),y&&(0,a.jsxs)("div",{className:"mt-8 rounded-lg border bg-card text-left",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b px-4 py-3 text-sm",children:[(0,a.jsxs)("span",{className:"font-mono font-medium",children:[y.domain,"/pricing.md"]}),y.cached&&(0,a.jsx)("span",{className:"text-muted-foreground",children:"(cached)"}),(0,a.jsxs)("span",{className:"ml-auto flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"inline-flex overflow-hidden rounded border",children:[(0,a.jsx)("button",{type:"button",onClick:()=>j("rendered"),"aria-pressed":"rendered"===v,className:"px-2.5 py-1 ".concat("rendered"===v?"bg-muted font-medium":"text-muted-foreground hover:bg-muted"),children:"Rendered"}),(0,a.jsx)("button",{type:"button",onClick:()=>j("raw"),"aria-pressed":"raw"===v,className:"px-2.5 py-1 ".concat("raw"===v?"bg-muted font-medium":"text-muted-foreground hover:bg-muted"),children:"Raw"})]}),(0,a.jsx)("button",{type:"button",onClick:O,className:"rounded border px-3 py-1 hover:bg-muted",children:"Copy"}),(0,a.jsx)("button",{type:"button",onClick:T,className:"rounded border px-3 py-1 hover:bg-muted",children:"Download"}),(0,a.jsx)(l(),{href:"/pricing-md/".concat(y.domain),className:"rounded border px-3 py-1 hover:bg-muted",children:"Share link"})]})]}),"rendered"===v?(0,a.jsx)("div",{className:"prose prose-sm dark:prose-invert max-h-[32rem] max-w-none overflow-auto px-5 py-4",children:(0,a.jsx)(d.oz,{remarkPlugins:[o.A],children:y.markdown})}):(0,a.jsx)("pre",{className:"max-h-[32rem] overflow-auto whitespace-pre-wrap px-4 py-4 text-xs leading-relaxed",children:y.markdown})]})]})}},5233:(e,r,t)=>{"use strict";t.d(r,{default:()=>s});
1var a=t(5155),n=t(2115);function s(){let[e,r]=(0,n.useState)(""),[t,s]=(0,n.useState)("idle");async function l(r){if(r.preventDefault(),"busy"===t)return;s("busy");let a=await fetch("/api/pricing-md/email",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e})}).catch(()=>null);s((null==a?void 0:a.ok)?"done":"error")}return"done"===t?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Thanks, you are on the list."}):(0,a.jsxs)("form",{onSubmit:l,className:"flex w-full max-w-md gap-2",children:[(0,a.jsx)("input",{type:"email",required:!0,value:e,onChange:e=>r(e.target.value),placeholder:"[email protected]","aria-label":"Email address",className:"flex-1 rounded-md border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary"}),(0,a.jsx)("button",{type:"submit",className:"rounded-md border px-4 py-2 text-sm hover:bg-muted",disabled:"busy"===t,children:"Notify me"}),"error"===t&&(0,a.jsx)("span",{className:"self-center text-xs text-destructive",children:"Try again"})]})}},6588:(e,r,t)=>{"use strict";async function a(e,r){let t;try{t=await fetch("/api/pricing-md",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}catch(e){r({type:"error",message:"Network error. Please try again."});return}if(!t.ok&&!t.body){var a;let e=await t.json().catch(()=>null);r({type:"error",message:null!=(a=null==e?void 0:e.error)?a:"Something went wrong."});return}if(!t.body)return void r({type:"error",message:"Streaming is not supported here."});let n=t.body.getReader(),s=new TextDecoder,l="";for(;;){let e,{done:t,value:a}=await n.read();if(t)break;for(l+=s.decode(a,{stream:!0});-1!==(e=l.indexOf("\n\n"));){let t=l.slice(0,e);l=l.slice(e+2);let a=t.split("\n").find(e=>e.startsWith("data:"));if(!a)continue;let n=a.slice(5).trim();if(n)try{r(JSON.parse(n))}catch(e){}}}}t.d(r,{e:()=>a})},7076:(e,r,t)=>{Promise.resolve().then(t.bind(t,5233)),Promise.resolve().then(t.bind(t,3960)),Promise.resolve().then(t.t.bind(t,2619,23))}},e=>{e.O(0,[619,84,441,255,358],()=>e(e.s=7076)),_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.