PageSourceSearch

https://estimator.faector.nl/apps/webshop/build/js/site/controller/cart-CLCsKxEG.js

js faector.nl collected 2026-10-03 21:41:38 UTC 2,114 bytes, 1 lines download raw bytes

1class y{process(o){o.querySelectorAll("input").forEach(t=>t.addEventListener("change",async a=>{a.preventDefault(),await d(o,a.target)})),o.querySelectorAll("td.remove a").forEach(t=>t.addEventListener("click",async a=>{a.preventDefault(),await s(o,a.target)}))}}async function d(l,o){let t=o.closest("form"),a=t.getAttribute("action");t.querySelectorAll("fieldset p.error").forEach(e=>e.remove());let n=await fetch(a,{method:"POST",body:new FormData(t),headers:{"x-requested-with":"fetch"}});if(l.querySelectorAll("p.error").forEach(e=>e.remove()),l.querySelectorAll("label").forEach(e=>e.classList.remove("error")),l.querySelectorAll("tr").forEach(e=>e.classList.remove("error")),window.history.replaceState({},document.title,window.location.pathname),n.ok){let e=await n.json();o.classList.remove("error"),t.querySelectorAll(".total-incl").forEach(r=>r.textContent=e.totalInclVat),t.querySelectorAll(".total-excl").forEach(r=>r.textContent=e.totalExclVat),t.querySelectorAll(".total-vat").forEach(r=>r.textContent=e.totalVat);
1for(let r in e.products)t.querySelectorAll(`tr[data-product-id="${r}"] .total-incl`).forEach(c=>c.textContent=e.products[r].totalInclVat),t.querySelectorAll(`tr[data-product-id="${r}"] .total-excl`).forEach(c=>c.textContent=e.products[r].totalExclVat),t.querySelectorAll(`tr[data-product-id="${r}"] .total-vat`).forEach(c=>c.textContent=e.products[r].totalVat)}else{let e=await n.json(),r=t.querySelector(`tr[data-product-id="${e.product.id}"]`),c=t.querySelector(`tr[data-product-id="${e.product.id}"] td.amount input`);t.querySelector(`label[for=${c.getAttribute("id")}]`).classList.add("error"),r.classList.add("error");let i=document.createElement("p");i.classList.add("error"),i.textContent=e.message;let u=t.querySelector("table");u.parentNode.insertBefore(i,u)}}async function s(l,o){let t=o.closest("tr"),a=t.querySelector("input");a.value=0,await d(l,a),f(t,400,()=>t.remove())}function f(l,o,t=null){let a=o/1e3;l.style.transition=a+"s",l.style.opacity=0;let n=setInterval(function(){l.style.opacity<=0&&(clearInterval(n),typeof t=="function"&&t())},o)}export{y 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.