@tanay-wispr/webflow-package 4.10.5 → 4.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global.js +1 -1
- package/package.json +1 -1
package/dist/global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{function f(){try{let e=document.createElement("canvas"),
|
|
1
|
+
"use strict";(()=>{function f(){try{let e=document.createElement("canvas"),i=e.getContext("webgl")||e.getContext("experimental-webgl");if(i){let a=i.getExtension("WEBGL_debug_renderer_info");if(!a)return"mac_unknown";let s=i.getParameter(a.UNMASKED_RENDERER_WEBGL);console.log(`WebGL Renderer: ${s}`);let c=String(s||"").toLowerCase();return c.includes("apple")?"mac_m1":c.includes("intel")||c.includes("amd")||c.includes("nvidia")?"mac_intel":"mac_unknown"}}catch{}return"mac_unknown"}var m=async()=>{try{let e=await navigator.userAgentData.getHighEntropyValues(["architecture","platform"]);return e.platform==="macOS"?e.architecture==="arm"?"mac_m1":"mac_intel":e.platform}catch{let{userAgent:e}=navigator;return e.includes("Macintosh")?f():e.includes("Windows")?"Windows":e.includes("Linux")?"Linux":/iPhone|iPad|iPod/.test(e)?"iOS":/Android/.test(e)?"Android":"Unknown"}};(async()=>{let e=await m();console.log("Platform: "+e),window.userPlatform=e})();document.addEventListener("DOMContentLoaded",async()=>{let e=(t,o,n=30)=>{let r="";if(n){let d=new Date;d.setTime(d.getTime()+n*24*60*60*1e3),r="; expires="+d.toUTCString()}let{hostname:l}=window.location,u;l.includes("wisprflow.ai")?u=".wisprflow.ai":u=l,document.cookie=t+"="+encodeURIComponent(o)+r+"; path=/; domain="+u+"; SameSite=Lax"},i=()=>{let o=document.cookie.split(";").find(n=>n.trim().startsWith("trial_promo="));return o&&o.trim().split("=")[1]==="3mo"},a=()=>new Promise(t=>{let o=0,n=50;function r(){if(o>=n){console.warn("PostHog not fully ready after max attempts, proceeding with limited functionality"),t(!1);return}if(o++,typeof posthog<"u"&&typeof posthog.getFeatureFlag=="function"&&posthog.get_distinct_id&&typeof posthog.get_distinct_id=="function")try{setTimeout(()=>t(!0),50)}catch(l){console.error("Error getting distinct ID:",l),setTimeout(r,100)}else setTimeout(r,100)}r()});window.wisprUtils={waitForPostHog:a,setCookie:e};let s=i();console.log("Next Play User:",s),document.querySelectorAll("[nav-link]").forEach(function(t){t.addEventListener("click",()=>(posthog.capture("nav_click",{nav_item:t.getAttribute("nav-link")}),!0))}),document.querySelectorAll("[cta]").forEach(function(t){t.addEventListener("click",()=>(posthog.capture("cta_click",{title:t.innerText,cta_location:t.getAttribute("cta_location"),cta_type:t.getAttribute("cta_type"),href:t.getAttribute("href")||"NO_HREF_FOUND",device_type:window.userPlatform}),!0))}),document.querySelectorAll("[web-demo-open]").forEach(function(t){t.addEventListener("click",()=>(posthog.capture("web_demo_open",{title:t.innerText,device_type:window.userPlatform,source:t.getAttribute("cta_location")}),!0))}),document.querySelectorAll("[web-demo-close]").forEach(function(t){t.addEventListener("click",()=>(posthog.capture("web_demo_close",{device_type:window.userPlatform}),!0))}),document.querySelectorAll("[app-download]").forEach(function(t){let o=t.id,n=o==="nav-download"?"nav":o==="footer-download"?"footer":t.getAttribute("cta_location")||"pricing";t.href="https://wisprflow.onelink.me/PguH/lw5h199m",t.addEventListener("click",()=>(posthog.capture("download_page_redirect",{source:n,device_type:window.userPlatform}),!0))})});})();
|