PageSourceSearch

https://mactiler.com/js/main.js?v=cfab2a5f

js mactiler.com collected 2026-09-25 10:27:22 UTC 12,783 bytes, 1 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){const e=document.querySelector(".loader"),t=setTimeout(()=>{e&&(console.log("Loader timeout reached, hiding loader."),e.classList.add("hidden"))},3e3),o=()=>{e&&!e.classList.contains("hidden")&&(e.classList.add("hidden"),clearTimeout(t))},n=window.matchMedia("(max-width: 767px)").matches,a=n?document.querySelector(".hero-video-mobile"):document.querySelector(".hero-media-desktop");a?(a.load(),a.addEventListener("canplay",()=>{console.log((n?"Mobile":"Desktop")+" video can play."),o(),a.play().catch(e=>{console.warn("Video autoplay prevented:",e)})},{once:!0}),a.addEventListener("error",e=>{console.warn("Video failed to load:",e),o()},{once:!0}),a.readyState>=3&&(o(),a.play().catch(e=>{console.warn("Video autoplay prevented:",e)}))):o();const c=document.querySelector(".hamburger"),s=document.querySelector(".nav-menu");if(c&&s){const e=document.querySelector(".navbar");c.addEventListener("click",function(){c.classList.toggle("active"),s.classList.toggle("active");const t=s.classList.contains("active");c.setAttribute("aria-expanded",t),t&&e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect(),o=document.getElementById("bf-banner"),n=t.bottom-(o?o.offsetHeight:0),a=(s.getAttribute("style")||"").split(";").filter(e=>!e.includes("top")&&!e.includes("max-height")&&e.trim()).join("; ");s.setAttribute("style",`${a}; top: ${n}px !important; max-height: calc(100vh - ${n}px) !important;`)})}),document.querySelectorAll(".nav-link").forEach(e=>{e.addEventListener("click",t=>{e.classList.contains("lang-menu-toggle")||c&&s&&(c.classList.remove("active"),s.classList.remove("active"),c.setAttribute("aria-expanded","false"))})})}const r=document.querySelector(".lang-menu-toggle"),i=document.querySelector(".mobile-lang-grid");r&&i&&r.addEventListener("click",function(){const e="true"===r.getAttribute("aria-expanded");r.setAttribute("aria-expanded",!e),i.classList.toggle("show")}),document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();const t=document.querySelector(this.getAttribute("href"));t&&t.scrollIntoView({behavior:"smooth",block:"start"})})});const l=document.querySelectorAll(".tab-btn"),d=document.querySelectorAll(".tab-panel");function u(){return window.innerWidth<=1024}function m(){const e=document.querySelector(".layout-categories"),t=document.querySelectorAll(".layout-category");if(!e||0===t.length)return;let o=document.querySelector(".category-tabs");if(!o&&u()){o=document.createElement("div"),o.className="category-tabs";const n=["Split","Multi","Stack"];t.forEach((e,t)=>{const a=e.querySelector(".category-title");if(a){const e=document.createElement("button");e.className="category-tab"+(0===t?" active":""),e.textContent=n[t]||a.textContent,e.dataset.categoryIndex=t,o.appendChild(e)}}),e.insertBefore(o,e.firstChild)}u()&&t.forEach((e,t)=>{e.classList.toggle("active",0===t)});const n=document.querySelectorAll(".category-tab");n.forEach(e=>{e.addEventListener("click",function(){const e=parseInt(this.dataset.categoryIndex);n.forEach(e=>e.classList.remove("active")),this.classList.add("active"),t.forEach((t,o)=>{t.classList.toggle("active",o===e)})})})}l.length>0&&l.forEach(e=>{e&&e.addEventListener("click",function(){const e=this.getAttribute("data-tab");console.log("Tab clicked:",e),l.forEach(e=>{e&&e.classList&&(e.classList.remove("active"),e.setAttribute&&e.setAttribute("aria-selected","false"))}),d.forEach(e=>{e&&e.classList&&e.classList.remove("active")}),this.classList.add("active"),this.setAttribute("aria-selected","true");const t=document.getElementById(e);t?(t.classList.add("active"),console.log("Panel activated:",e)):console.error("Panel not found:",e)})}),u()&&m(),window.addEventListener("resize",function(){const e=document.querySelector(".category-tabs"),t=document.querySelectorAll(".layout-category");u()?e||m():(e&&e.remove(),t.forEach(e=>{e.classList.remove("active"),e.style.display=""}))});const g=document.querySelectorAll(".faq-category-tab"),y=document.querySelectorAll(".faq-category-content");
1g.forEach(e=>{e.addEventListener("click",function(){const e=this.getAttribute("data-category");g.forEach(e=>{e.classList.remove("active"),e.style.background="white",e.style.color="#6B7280",e.style.border="1.5px solid #E5E7EB"}),this.classList.add("active"),this.style.background="#007AFF",this.style.color="white",this.style.border="none",y.forEach(e=>{e.style.display="none"});const t=document.getElementById(`faq-${e}`);t&&(t.style.display="block")})});document.querySelectorAll(".faq-item").forEach(e=>{const t=e.querySelector(".faq-question"),o=e.querySelector(".faq-answer");t.addEventListener("click",function(){const t=e.classList.contains("active"),n=e.closest(".faq-category-content");n&&n.querySelectorAll(".faq-item").forEach(e=>{e.classList.remove("active");e.querySelector(".faq-answer").style.maxHeight="0"}),t||(e.classList.add("active"),o.style.maxHeight=o.scrollHeight+"px")})});const h=document.querySelector(".navbar"),f=document.getElementById("stickyCta"),v=document.querySelector(".hero"),p=document.getElementById("trial");window.addEventListener("scroll",function(){const e=window.scrollY;if(e>50?(h.style.backgroundColor="rgba(255, 255, 255, 0.98)",h.style.borderBottomColor="rgba(0, 0, 0, 0.15)"):(h.style.backgroundColor="rgba(255, 255, 255, 0.95)",h.style.borderBottomColor="rgba(0, 0, 0, 0.1)"),v&&f){const t=v.offsetTop+v.offsetHeight,o=e+window.innerHeight;let n=!1;if(p){const t=p.offsetTop,a=t+p.offsetHeight;n=o>t+100&&e<a}e>t-200&&!n?f.classList.add("show"):f.classList.remove("show")}});const b=new IntersectionObserver(function(e){e.forEach(e=>{e.isIntersecting&&(e.target.style.opacity="1",e.target.style.transform="translateY(0)")})},{threshold:.1,rootMargin:"0px 0px -50px 0px"});document.querySelectorAll(".feature-card, .testimonial-card, .pas-item, .hero-content, .hero-visual").forEach(e=>{e.style.opacity="0",e.style.transform="translateY(30px)",e.style.transition="opacity 0.6s ease, transform 0.6s ease",b.observe(e)});document.querySelectorAll(".feature-card").forEach((e,t)=>{e.style.transitionDelay=.1*t+"s"});document.querySelectorAll(".testimonial-card").forEach((e,t)=>{e.style.transitionDelay=.1*t+"s"}),document.querySelectorAll(".btn").forEach(e=>{e.addEventListener("mouseenter",function(){this.style.transform="translateY(-2px)"}),e.addEventListener("mouseleave",function(){this.style.transform="translateY(0)"})});const w=document.querySelectorAll('video, img[src*=".gif"]'),E=new IntersectionObserver(function(e){e.forEach(e=>{if(e.isIntersecting){const t=e.target;if(t&&"VIDEO"===t.tagName){const e=t.play();void 0!==e&&e.catch(e=>{console.warn("Video autoplay prevented:",e)})}E.unobserve(t)}})});function L(e,t={}){console.log("Event tracked:",e,t)}function S(e){document.querySelectorAll(".demo-step").forEach(e=>{e.classList.remove("active")}),document.querySelectorAll(".demo-btn").forEach(e=>{e.classList.remove("active")});const t=document.getElementById(`step${e}`),o=document.querySelectorAll(".demo-btn")[e-1];t&&t.classList.add("active"),o&&o.classList.add("active")}w.forEach(e=>{e&&E.observe(e)}),document.querySelectorAll(".btn").forEach(e=>{e.addEventListener("click",function(e){if(this.href&&this.href.includes("#purchase")||this.href.includes("#buy")){e.preventDefault();const t=this.textContent;this.textContent="Processing...",this.style.opacity="0.7",this.style.pointerEvents="none",setTimeout(()=>{this.textContent=t,this.style.opacity="1",this.style.pointerEvents="auto",alert("This would redirect to the payment processor. Demo only!")},1e3)}})}),document.querySelectorAll(".btn").forEach(e=>{e.addEventListener("click",function(){L("button_click",{button_text:this.textContent.trim(),location:this.closest("section")?.className||"unknown"})})}),document.querySelectorAll(".faq-question").forEach(e=>{e.addEventListener("click",function(){L("faq_interaction",{question:this.textContent.replace("+","").trim()})})}),document.querySelectorAll(".tab-btn").forEach(e=>{e.addEventListener("click",function(){L("tab_click",{tab_name:this.textContent.trim()})})}),document.querySelectorAll('a[href*="MacTiler-latest.dmg"], a[href*="/download/"]').forEach(e
1=>{e.addEventListener("click",function(e){const t=this.closest("section")?.id||this.closest("nav")?.className||"unknown",o=this.textContent.trim();void 0!==window.gtag?(window.gtag("event","download_click",{event_category:"engagement",event_label:"MacTiler DMG Download",location:t,button_text:o,value:1,transport_type:"beacon"}),console.log("Download tracked:",t,o)):(window.loadGtagOnce(),setTimeout(()=>{void 0!==window.gtag&&(window.gtag("event","download_click",{event_category:"engagement",event_label:"MacTiler DMG Download",location:t,button_text:o,value:1,transport_type:"beacon"}),console.log("Download tracked (delayed):",t,o))},100)),L("download_click",{location:t,button_text:o})})}),document.querySelectorAll('.checkout-btn, a[href*="polar.sh"]').forEach(e=>{e.addEventListener("click",function(e){const t=this.textContent.trim(),o=void 0!==window.gtag;let n=this.getAttribute("data-tier")||"unknown",a=parseFloat(this.getAttribute("data-price"))||0;if("unknown"!==n)try{localStorage.setItem("mactiler_purchase_tier",n),localStorage.setItem("mactiler_purchase_price",a),localStorage.setItem("mactiler_purchase_timestamp",Date.now())}catch(e){console.warn("localStorage not available:",e)}"personal"===n?n="Personal":"family"===n?n="Family Pack":"business"===n&&(n="Business Pack"),o?(window.gtag("event","purchase_intent",{event_category:"ecommerce",event_label:n,button_text:t,tier:n,price:a,value:a,currency:"USD",transport_type:"beacon"}),console.log("Purchase intent tracked:",n,a)):(window.loadGtagOnce(),setTimeout(()=>{void 0!==window.gtag&&(window.gtag("event","purchase_intent",{event_category:"ecommerce",event_label:n,button_text:t,tier:n,price:a,value:a,currency:"USD",transport_type:"beacon"}),console.log("Purchase intent tracked (delayed):",n,a))},100)),L("purchase_click",{tier:n,price:a,button_text:t})})}),window.showStep=S;let q=1;document.querySelector(".demo-showcase")&&setInterval(()=>{q=1===q?2:1,S(q)},4e3);const A=document.getElementById("earlyAccessForm"),k=document.getElementById("successMessage");A&&A.addEventListener("submit",function(e){e.preventDefault();const t=document.getElementById("email").value.trim();if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return void alert("Please enter a valid email address.");const o=A.querySelector(".btn-early-access");o.textContent="Joining...",o.disabled=!0,setTimeout(()=>{A.style.display="none",k.style.display="block","undefined"!=typeof gtag&&gtag("event","early_access_signup",{event_category:"engagement",event_label:"email_signup"}),localStorage.setItem("mactilerpro_early_access",JSON.stringify({email:t,timestamp:(new Date).toISOString()})),console.log("Early access signup:",t)},1500)});const _=document.getElementById("cookieBanner"),x=document.getElementById("cookieAccept"),I="mactiler_cookie_consent";x&&x.addEventListener("click",function(){const e={accepted:!0,timestamp:(new Date).toISOString()};localStorage.setItem(I,JSON.stringify(e)),_.classList.remove("show")}),localStorage.getItem(I)||setTimeout(()=>{_.classList.add("show")},1e3);const C=document.getElementById("EMAIL");let B=!1;C&&C.addEventListener("focus",function(){if(B)return;console.log("Loading reCAPTCHA...");const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render=6Ld6nN4rAAAAAOo03AZYBX0-U2Ru5XICJectKZIJ&hl=en",e.async=!0,e.defer=!0,document.head.appendChild(e),B=!0},{once:!0});const D=document.getElementById("EMAIL"),T=document.getElementById("submit-button");function G(){const e=D.value.trim(),t=function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}(e);T.disabled=!t,e.length>0?D.style.borderColor=t?"#28a745":"#dc3545":D.style.borderColor=""}D&&T&&(D.addEventListener("input",G),D.addEventListener("paste",()=>{setTimeout(G,10)}),G()),console.log("MacTiler landing page initialized successfully!")});let gtagLoaded=!1;function loadGtagOnce(){if(gtagLoaded)return;if(document.querySelector('script[src*="googletagmanager.com/gtag"]'))return void(gtagLoaded=!0);gtagLoaded=!0,console.log("User interaction detected, loading GTM..."),window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config","G-JBP3TGDNEW");const e=document.createElement("script");
1e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=G-JBP3TGDNEW",document.head.appendChild(e)}window.loadGtagOnce=loadGtagOnce;const interactionEventsForGtag=["scroll","mousemove","click","touchstart"];interactionEventsForGtag.forEach(e=>{window.addEventListener(e,loadGtagOnce,{once:!0,passive:!0})});

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.