PageSourceSearch

https://www.pabbly.com/_astro/pabbly-video-section.astro_astro_type_script_index_0_lang.G2lUCeN1.js

js pabbly.com collected 2026-09-24 08:26:27 UTC 4,493 bytes, 1 lines download raw bytes

1function A(e){if(!e)return"";if(e.includes("youtube.com/embed"))return e;let s="";return e.includes("youtube.com/watch?v=")?s=e.split("v=")[1]?.split("&")[0]:e.includes("youtu.be/")?s=e.split("youtu.be/")[1]?.split("?")[0]:e.includes("youtube.com/embed/")&&(s=e.split("embed/")[1]?.split("?")[0]),s?`https://www.youtube.com/embed/${s}?autoplay=1`:e}let m=!1;function M(){const e=document.getElementById("pabbly-video-modal"),s=document.getElementById("pabbly-video-iframe"),a=document.getElementById("pabbly-close-video-modal"),d=document.querySelectorAll(".video-card");function i(o){if(!o)return;const u=A(o);s&&(s.src=u),e&&(e.style.display="flex",e.classList.remove("hidden"),document.body.style.overflow="hidden")}function f(){e&&(e.style.display="none",e.classList.add("hidden"),document.body.style.overflow=""),s&&(s.src="")}d.forEach(o=>{o.addEventListener("click",()=>{if(m)return;const u=o.getAttribute("data-video-url");i(u)})}),a&&a.addEventListener("click",f),e&&e.addEventListener("click",o=>{o.target===e&&f()}),document.addEventListener("keydown",o=>{o.key==="Escape"&&e&&e.style.display!=="none"&&f()})}function T(){const e=document.getElementById("pabbly-video-track"),s=document.querySelectorAll(".pabbly-video-dot"),a=document.getElementById("pabbly-video-prev"),d=document.getElementById("pabbly-video-next");if(!e)return;let i=0;function f(){return window.innerWidth<641?1:3}function o(){return Math.max(1,e.children.length-f()+1)}function u(){const t=o();s.forEach((n,r)=>{n.style.display=r<t?"":"none"})}function E(){const t=e.closest(".pabbly-video-carousel-wrapper"),n=e.querySelector(".video-card");if(!t||!n)return;const r=n.getBoundingClientRect(),g=r.top-t.getBoundingClientRect().top+r.height/2;a&&(a.style.top=`${g}px`),d&&(d.style.top=`${g}px`)}function k(){const t=o()-1;a&&(a.disabled=i<=0),d&&(d.disabled=i>=t)}function c(t=!1){e.children.length!==0&&requestAnimationFrame(()=>{const n=e.children[0];if(!n)return;const r=n.offsetWidth,g=window.getComputedStyle(e),B=parseFloat(g.gap)||(window.innerWidth>=768?24:16),D=i*(r+B);t?(e.style.transition="none",e.style.transform=`translateX(-${D}px)`,setTimeout(()=>{e.style.transition=""},50)):e.style.transform=`translateX(-${D}
1px)`,k(),s.forEach((w,C)=>{C===i?(w.classList.remove("bg-gray-300","w-2","h-2","md:w-2.5","md:h-2.5"),w.classList.add("bg-[#006DF9]","w-6","md:w-8")):(w.classList.remove("bg-[#006DF9]","w-6","md:w-8"),w.classList.add("bg-gray-300","w-2","h-2","md:w-2.5","md:h-2.5"))})})}let L;function y(){clearInterval(L),L=setInterval(()=>{i=(i+1)%o(),c()},5e3)}s.forEach((t,n)=>{t.addEventListener("click",()=>{i=n,c(),y()})});function S(t){const n=o()-1;i=Math.min(Math.max(i+t,0),n),c(),y()}a&&a.addEventListener("click",()=>S(-1)),d&&d.addEventListener("click",()=>S(1)),y(),e.addEventListener("mouseenter",()=>{clearInterval(L)}),e.addEventListener("mouseleave",()=>{y()});let I;window.addEventListener("resize",()=>{clearTimeout(I),I=setTimeout(()=>{i=0,u(),E(),c(!0)},250)});let p=0,v=0,l=!1,x=0,b=0,h=0;e.addEventListener("touchstart",t=>{p=t.touches[0].clientX,v=p,l=!0,h=new DOMMatrix(window.getComputedStyle(e).transform).m41},{passive:!0}),e.addEventListener("touchmove",t=>{if(!l)return;v=t.touches[0].clientX;const n=v-p;Math.abs(n)>5&&(m=!0),e.style.transition="none",e.style.transform=`translateX(${h+n}px)`},{passive:!0}),e.addEventListener("touchend",()=>{if(!l)return;l=!1;const t=v-p,n=50;if(e.style.transition="",Math.abs(t)>n){const r=o();t>0&&i>0?i--:t<0&&i<r-1&&i++}c(),setTimeout(()=>{m=!1},0)});function X(){if(!l)return;l=!1,e.style.cursor="",document.body.style.userSelect="",e.style.transition="";const t=b-x,n=50,r=o();Math.abs(t)>n&&(t>0&&i>0?i--:t<0&&i<r-1&&i++),c(),setTimeout(()=>{m=!1},0)}e.addEventListener("mousedown",t=>{if(t.button!==0)return;l=!0,x=t.clientX,b=t.clientX,h=new DOMMatrix(window.getComputedStyle(e).transform).m41,e.style.cursor="grabbing",document.body.style.userSelect="none",t.preventDefault()}),document.addEventListener("mousemove",t=>{if(!l)return;b=t.clientX;const n=b-x;Math.abs(n)>5&&(m=!0),e.style.transition="none",e.style.transform=`translateX(${h+n}px)`}),document.addEventListener("mouseup",X),window.addEventListener("blur",X),e.querySelectorAll("img").forEach(t=>{t.addEventListener("dragstart",n=>n.preventDefault())}),u(),E(),c(),e.querySelectorAll("img").forEach(t=>{t.complete||t.addEventListener("load",E,{once:!0})})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{T(),M()}):(T(),M());

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.