@rtstic.dev/pulse 0.0.93 → 0.0.94

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.
@@ -1 +1 @@
1
- "use strict";(()=>{function y(){return{firstName:sessionStorage.getItem("ty_firstName")??"",lastName:sessionStorage.getItem("ty_lastName")??"",email:sessionStorage.getItem("ty_email")??"",showCalendar:sessionStorage.getItem("ty_showCalendar")==="true",calendarName:sessionStorage.getItem("ty_calendarName")??"",embedUrl:sessionStorage.getItem("ty_embedUrl")??"",flow:sessionStorage.getItem("ty_flow")??""}}function f(){let e=window.Termly?.getConsentState();return e?e.analytics===!0&&e.advertising===!0:!1}function i(){let e=document.querySelector("[hs-calender-block]");e&&(e.setAttribute("hs-calender-block-active","false"),e.innerHTML=""),document.querySelectorAll("[hs-thankyou-block-active]").forEach(t=>t.setAttribute("hs-thankyou-block-active","true"))}function r(e){let t=document.querySelector("[hs-calender-block]");if(!t)return;let o=f();if(!e.showCalendar||!e.embedUrl||!o){i();return}t.setAttribute("hs-calender-block-active","true"),t.innerHTML="",document.querySelectorAll("[hs-thankyou-block-active]").forEach(d=>d.setAttribute("hs-thankyou-block-active","false"));let n=new URLSearchParams;e.firstName&&n.set("firstName",e.firstName),e.lastName&&n.set("lastName",e.lastName),e.email&&n.set("email",e.email);let m=e.embedUrl.includes("?")?"&":"?",u=n.toString()?`${e.embedUrl}${m}${n.toString()}`:e.embedUrl,a=document.createElement("div");a.className="meetings-iframe-container",a.setAttribute("data-src",u),t.appendChild(a);let l="https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js",c=document.querySelector(`script[src="${l}"]`);c&&c.remove();let s=document.createElement("script");s.type="text/javascript",s.src=l,t.appendChild(s)}function h(){let e=sessionStorage.getItem("ty_flow")??"";e&&document.querySelectorAll("[hs-thankyou-flow]").forEach(t=>{let o=t.getAttribute("hs-thankyou-flow");t.setAttribute("form-flow-active",o===e?"true":"false")})}document.addEventListener("DOMContentLoaded",()=>{let e=y();console.log("1. DOMContentLoaded - data:",e),h(),i(),console.log("2. after showThankYou - blocks:",Array.from(document.querySelectorAll("[hs-thankyou-block-active]")).map(t=>t.getAttribute("hs-thankyou-block-active"))),window.Termly?.on("initialized",()=>{console.log("3. Termly initialized event fired"),setTimeout(()=>{console.log("4. consent state at initialized:",window.Termly?.getConsentState()),r(e),console.log("5. after loadCalendar at initialized - blocks:",Array.from(document.querySelectorAll("[hs-thankyou-block-active]")).map(t=>t.getAttribute("hs-thankyou-block-active")))},300)}),window.Termly?.on("consent",()=>{console.log("6. Termly consent event fired"),setTimeout(()=>{console.log("7. consent state at consent:",window.Termly?.getConsentState()),r(e),console.log("8. after loadCalendar at consent - blocks:",Array.from(document.querySelectorAll("[hs-thankyou-block-active]")).map(t=>t.getAttribute("hs-thankyou-block-active")))},300)}),setTimeout(()=>{console.log("9. fallback timeout - consent state:",window.Termly?.getConsentState()),window.Termly?.getConsentState()&&r(e),console.log("10. after fallback loadCalendar - blocks:",Array.from(document.querySelectorAll("[hs-thankyou-block-active]")).map(o=>o.getAttribute("hs-thankyou-block-active")))},500)});})();
1
+ "use strict";(()=>{function f(){return{firstName:sessionStorage.getItem("ty_firstName")??"",lastName:sessionStorage.getItem("ty_lastName")??"",email:sessionStorage.getItem("ty_email")??"",showCalendar:sessionStorage.getItem("ty_showCalendar")==="true",calendarName:sessionStorage.getItem("ty_calendarName")??"",embedUrl:sessionStorage.getItem("ty_embedUrl")??"",flow:sessionStorage.getItem("ty_flow")??""}}function y(){let e=window.Termly?.getConsentState();return e?e.analytics===!0&&e.advertising===!0:!1}function l(){let e=document.querySelector("[hs-calender-block]");e&&(e.setAttribute("hs-calender-block-active","false"),e.innerHTML=""),document.querySelectorAll("[hs-thankyou-block-active]").forEach(t=>t.setAttribute("hs-thankyou-block-active","true"))}function a(e){let t=document.querySelector("[hs-calender-block]");if(!t)return;let s=y();if(!e.showCalendar||!e.embedUrl||!s){l();return}t.setAttribute("hs-calender-block-active","true"),t.innerHTML="",document.querySelectorAll("[hs-thankyou-block-active]").forEach(d=>d.setAttribute("hs-thankyou-block-active","false"));let n=new URLSearchParams;e.firstName&&n.set("firstName",e.firstName),e.lastName&&n.set("lastName",e.lastName),e.email&&n.set("email",e.email);let m=e.embedUrl.includes("?")?"&":"?",u=n.toString()?`${e.embedUrl}${m}${n.toString()}`:e.embedUrl,o=document.createElement("div");o.className="meetings-iframe-container",o.setAttribute("data-src",u),t.appendChild(o);let i="https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js",c=document.querySelector(`script[src="${i}"]`);c&&c.remove();let r=document.createElement("script");r.type="text/javascript",r.src=i,t.appendChild(r)}function h(){let e=sessionStorage.getItem("ty_flow")??"";e&&document.querySelectorAll("[hs-thankyou-flow]").forEach(t=>{let s=t.getAttribute("hs-thankyou-flow");t.setAttribute("form-flow-active",s===e?"true":"false")})}document.addEventListener("DOMContentLoaded",()=>{let e=f();h(),l(),window.Termly?.on("initialized",()=>{setTimeout(()=>a(e),300)}),window.Termly?.on("consent",()=>{setTimeout(()=>a(e),300)}),setTimeout(()=>{window.Termly?.getConsentState()&&a(e)},500)});})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtstic.dev/pulse",
3
- "version": "0.0.93",
3
+ "version": "0.0.94",
4
4
  "description": "pulse website",
5
5
  "license": "license-of-your-project",
6
6
  "keywords": [],