PageSourceSearch

https://clickhouse-docs.vercel.app/docs/_astro/Feedback.astro_astro_type_script_index_0_lang.bK4GpIem.js

js clickhouse-docs.vercel.app collected 2026-10-03 05:16:36 UTC 2,216 bytes, 1 lines download raw bytes

1import{s as e}from"./client.BaTlgF4n.js";var t=`https://sql-clickhouse.clickhouse.com`,n=`INSERT INTO docs_feedback.feedback FORMAT JSONEachRow`;function r(){let e=(document.cookie.split(`;`).map(e=>e.trim()).find(e=>e.startsWith(`_ga=`))?.slice(4))?.split(`.`).slice(-2);return e?.length===2?e.join(`-`):`anonymous`}function i(e,t=``,n=``){return{page_url:window.location.href,date:new Date().toISOString().replace(`T`,` `).slice(0,19),sentiment:e,reason:t,google_id:r(),comment:n}}async function a(e,r=``,a=``){let o=new URL(t);o.searchParams.set(`query`,n);let s=await fetch(o,{method:`POST`,headers:{"Content-Type":`text/plain`,"x-clickhouse-user":`docs_feedback`,"x-clickhouse-key":``},body:`${JSON.stringify(i(e,r,a))}\n`});if(!s.ok)throw Error(`Feedback submission failed with status ${s.status}`)}e(`[data-ch-feedback]`,e=>{let t=e.querySelector(`[data-ch-feedback-positive]`),n=e.querySelector(`[data-ch-feedback-negative]`),r=e.querySelector(`[data-ch-feedback-form]`),i=e.querySelector(`[data-popover-content]`),o=e.querySelector(`[data-ch-feedback-close]`),s=e.querySelector(`[data-ch-feedback-question]`),c=e.querySelector(`[data-ch-feedback-status]`),l=r?.querySelector(`[type=submit]`);if(!t||!n||!r||!i||!o||!s||!c||!l)return()=>{};let u=new AbortController,{signal:d}=u,f=!1,p=!1,m=e=>{for(let r of[t,n]){let t=r===e;r.toggleAttribute(`data-selected`,t),r.setAttribute(`aria-pressed`,String(t))}},h=()=>{let e=f||p;t.disabled=e,n.disabled=e,l.disabled=e},g=()=>{f=!0,p=!1,h(),s.textContent=e.dataset.thankYouLabel??`Thanks for your feedback!`,c.textContent=``,i.matches(`:popover-open`)&&i.hidePopover()},_=()=>{p=!1,h(),c.textContent=e.dataset.errorLabel??`Feedback could not be sent. Please try again.`},v=(t,n=``,r=``)=>{f||p||(p=!0,h(),c.textContent=e.dataset.submittingLabel??`Sending…`,a(t,n,r).then(g,_))};return t.addEventListener(`click`,()=>{f||p||(m(t),v(`Positive`))},{signal:d}),n.addEventListener(`click`,()=>{!f&&!p&&m(n)},{signal:d}),o.addEventListener(`click`,()=>i.hidePopover(),{signal:d}),r.addEventListener(`submit`,e=>{if(e.preventDefault(),f||p)return;let t=new FormData(r);v(`Negative`,String(t.get(`reason`)??``),String(t.get(`comment`)??``))},{signal:d}),()=>u.abort()});

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.