From 207ddb1e533cd144fac98fe61fcb7fd1b727f195 Mon Sep 17 00:00:00 2001 From: Jamie Emerson Date: Wed, 19 Jun 2024 09:30:11 -0700 Subject: [PATCH] default widget image alt to null --- dist/pathfora.js | 1 + dist/pathfora.min.js | 2 +- src/rollup/widgets/construct-widget-layout.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/pathfora.js b/dist/pathfora.js index 3c451bb..840c88b 100644 --- a/dist/pathfora.js +++ b/dist/pathfora.js @@ -2729,6 +2729,7 @@ var widgetImage = document$1.createElement('img'); widgetImage.src = config.image; widgetImage.className = 'pf-widget-img'; + widgetImage.alt = ''; if (config.layout === 'button') ; else if (config.layout === 'modal' || config.layout === 'inline') { widgetContent.appendChild(widgetImage); } else { diff --git a/dist/pathfora.min.js b/dist/pathfora.min.js index e36e846..9ac4769 100644 --- a/dist/pathfora.min.js +++ b/dist/pathfora.min.js @@ -1 +1 @@ -!function(){"use strict";function a(o){return o.generic={className:"pathfora",branding:!1,responsive:!0,headline:"",themes:{dark:{background:"#333",headline:"#fefefe",text:"#aaa",close:"#888",actionText:"#fff",actionBackground:"#444",cancelText:"#888",cancelBackground:"#333"},light:{background:"#f1f1f1",headline:"#444",text:"#888",close:"#bbb",actionText:"#444",actionBackground:"#fff",cancelText:"#bbb",cancelBackground:"#f1f1f1"}},displayConditions:{showOnInit:!0,showOnExitIntent:!1,showDelay:0,hideAfter:0,displayWhenElementVisible:"",scrollPercentageToDisplay:0}},o.message={layout:"modal",position:"",variant:"1",okMessage:"Confirm",cancelMessage:"Cancel",okShow:!0,cancelShow:!0},o.subscription={layout:"modal",position:"",variant:"1",placeholders:{email:"Email"},okMessage:"Confirm",cancelMessage:"Cancel",okShow:!0,cancelShow:!0},o.form={layout:"modal",position:"",variant:"1",placeholders:{name:"Name",title:"Title",email:"Email",message:"Message",company:"Company",phone:"Phone Number",country:"Country",referralEmail:"Referral Email"},required:{name:!0,email:!0},fields:{company:!1,phone:!1,country:!1,referralEmail:!1},okMessage:"Send",okShow:!0,cancelMessage:"Cancel",cancelShow:!0},o.sitegate={layout:"modal",position:"",variant:"1",placeholders:{name:"Name",title:"Title",email:"Email",message:"Message",company:"Company",phone:"Phone Number",country:"Country",referralEmail:"Referral Email"},required:{name:!0,email:!0},fields:{message:!1,phone:!1,country:!1,referralEmail:!1},okMessage:"Submit",okShow:!0,cancelShow:!1,showForm:!0},o}function l(o){return o.delayedWidgets={},o.openedWidgets=[],o.initializedWidgets=[],o.prioritizedWidgets=[],o.readyWidgets=[],o.triggeredWidgets={},o}function p(o){return o.pageViews=0,o.timeSpentOnPage=0,o.closedWidgets=[],o.completedActions=[],o.cancelledActions=[],o.displayedWidgets=[],o.abTestingGroups=[],o}function o(){for(var o=[],t=0;t

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}},q=window.document;function f(o){var t,e=this,i=q.documentElement.doScroll,n="DOMContentLoaded";(i?/^loaded|^c/:/^loaded|^i|^c/).test(q.readyState)?(e.DOMLoaded=!0,o()):q.addEventListener(n,t=function(){q.removeEventListener(n,t),e.DOMLoaded=!0,o()})}function M(o){return String(o).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function E(o,t){var e=new RegExp(["(^|\\b)",M(t.split(" ").join("|")),"(\\b|$)"].join(""),"gi");o.className=o.className.replace(e," ")}function K(o,t){E(o,t),o.className=[o.className,t].join(" ")}function T(o,t){return new RegExp("(^| )"+M(t)+"( |$)","gi").test(o.className)}function I(t){try{return decodeURIComponent(t)}catch(o){return t}}function k(o){var t=q.cookie,e=t.match("(^|;)\\s*"+encodeURIComponent(M(o))+"\\s*=\\s*([^;]+)");return null==e&&(e=t.match("(^|;)\\s*"+M(o)+"\\s*=\\s*([^;]+)")),null==e?null:I(e.pop())}function t(o,t,e){var i;i=e?"; expires="+e.toUTCString():"; expires=0",q.cookie=[encodeURIComponent(o),"=",encodeURIComponent(t),i,"; path = /"].join("")}function N(o){t(o,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"))}var B="$",U="@",z="PATHFORA";function F(o){try{return JSON.parse(o)}catch(o){}}function V(o){return Boolean(o[U])&&Date.parse(o[U])>5]&1<<(31&n)))?l.push("%",s(v>>4),s(15&v)):l.push(c))}return l.join("")}function $(o,t){for(var e in t)t.hasOwnProperty(e)&&"object"==typeof t[e]&&null!==t[e]&&!Array.isArray(t[e])?t.hasOwnProperty(e)&&(void 0===o[e]&&(o[e]={}),$(o[e],t[e])):t.hasOwnProperty(e)&&(o[e]=t[e])}function X(o,t,e){for(var i=o,n=t.split("."),a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g.test(o)}var io={addClass:K,hasClass:T,removeClass:E,readCookie:k,saveCookie:t,deleteCookie:N,updateLegacyCookies:function(){function o(o){return 0===o.trim().indexOf(i[n])}function t(o){var t=o.trim().split("=");if(2===t.length){var e=t[0],i=t[1];N(e),Z(e,I(i))}}function e(o){var t=sessionStorage.getItem(o);J(t)&&(sessionStorage.removeItem(o),sessionStorage.setItem(encodeURIComponent(o),encodeURIComponent(t)))}var i=[b,L,w,P,G,x,r,O],n=0;for(n=0;n=o.global.duration&&v():v()}if((p=p||0)>=o.widget.session)return!1;if(d){if(e=d.split("|"),i=parseInt(e[0],10),void 0!==e[1]){if(0=o.widget.total&&void 0===o.widget.duration)return!1;if(0=o.global.session)return!1;if(0=o.global.total)&&!(u>=o.global.total&&void 0===o.global.duration)}function ro(o,t){var e,i,n,a;if("object"==typeof jstag&&window.jstag.send(t.censorTrackingKeys?(n=o,a=t.censorTrackingKeys,Object.keys(n).filter(function(t){return!a.some(function(o){return"string"==typeof o?t===o:o.test(t)})}).reduce(function(o,t){return o[t]=n[t],o},{})):o),!0===window.pathfora.enableGA&&"function"==typeof window.ga&&"function"==typeof window.ga.getAll){e=o["pf-widget-action"]||o["pf-widget-event"],i=window.ga.getAll();for(var l=0;l*'),l.appendChild(a)),(!0===o.required||"date"===o.type||"email"===o.type)&&(K(l,"pf-form-required"),e.setAttribute(!0===o.required?"data-required":"data-validate","true"),o.label)){var v=q.createElement("div");v.className="pf-required-flag",v.innerHTML=!0===o.required?"required":"invalid";var f=q.createElement("span");v.appendChild(f),l.appendChild(v)}if(o.placeholder){if("select"===o.type){var m=q.createElement("option");m.setAttribute("value",""),m.innerHTML=o.placeholder,e.appendChild(m)}else e.placeholder=o.placeholder;o.label||e.setAttribute("aria-label",o.placeholder)}if(o.values)for(i=0;ii.display.descriptionLimit&&-1!==i.display.descriptionLimit&&(v=(v=v.substring(0,i.display.descriptionLimit)).substring(0,v.lastIndexOf(" "))+"..."),r.innerHTML=v,l.appendChild(r)}e.appendChild(l)}}(e,o),t=o,e.className=["pf-widget ","pf-"+t.type," pf-widget-"+t.layout,t.position?" pf-position-"+t.position:"",t.pushDown?" pf-has-push-down":"",t.origin?" pf-origin-"+t.origin:""," pf-widget-variant-"+t.variant,t.theme?" pf-theme-"+t.theme:"",t.className?" "+t.className:"",t.branding?" pf-widget-has-branding":"",t.responsive?"":" pf-mobile-hide"].join(""),So(e,o),function(o,t){switch(t.theme){case"custom":t.colors&&Co(o,t.colors);break;case"none":break;default:t.theme&&Co(o,s.generic.themes[t.theme])}}(e,o),e}function Mo(o,t){if("inline"===o.layout||"modal"===o.layout&&o.recommend){var e=t.querySelector(".pf-content-unit");e&&(t.offsetWidth=i&&E(e,"stack"))}}function Eo(o){function t(t){for(var o=0;o=o.length)){var i=o[t],n=s[i.type],a=s.generic;if($(i,a),$(i,n),$(i,i.config),!(H.initializedWidgets.indexOf(i.id)<0))throw new Error("Cannot add two widgets with the same id");H.initializedWidgets.push(i.id),i.success&&(i.formStates||(i.formStates={}),i.formStates.success||(i.formStates.success=i.success)),xo(i,l,function(){Ro(i,l,function(){if(l.initializeWidget(i,e),e&&e.priority===W){if(H.prioritizedWidgets.length&&H.prioritizedWidgets[0].id===i.id)return;p(o,t+1,e)}})}),e&&e.priority===W||p(o,t+1,e)}};p(o,0,t)}function Wo(o,t,e,i){if(!e||!e.length)return!0;var n,a,l=oo(o,t),p=!1;"function"==typeof l&&(l=(a=l.toString()).substring(a.indexOf("{")+1,a.lastIndexOf("}")),n=a.match(/(function.+\()(.+(?=\)))(.+$)/),p=!0);for(var r=0;r
x
'),t.close();var e=t.documentElement.scrollHeight>t.body.scrollHeight;return o.parentNode.removeChild(o),Vo=e?document.documentElement:document.body}(),t=o.scrollTop,e=o.scrollHeight,i=o.clientHeight;return n<=t/(e-i)*100}}}function Zo(o,t){var e,i=o.displayConditions;if(o.watchers=[],o.listeners=[],o.expiration=new Date,o.expiration.setDate(o.expiration.getDate()+365),("sitegate"!==o.type||"true"!==Y(L+o.id))&&!0!==o.hiddenViaABTests){if(o.pushDown){if("bar"!==o.layout||"top-fixed"!==o.position&&"top-absolute"!==o.position)throw new Error("Only top positioned bar widgets may have a pushDown property");K(q.querySelector(o.pushDown),"pf-push-down")}var n,a,l,p,r,u,s,d,c,v,f,m,g,h,w,y,b,S,C,A,M,E,T,I,k,N,B;o.valid=o.valid&&function(o,t){for(var e,i=!0,n=0;nnew Date(n.end_at).getTime()&&(a=!1),a)),i.pageVisits&&(o.valid=o.valid&&(p=i.pageVisits,Y(O)>=p)),i.hideAfterAction&&(o.valid=o.valid&&(r=i.hideAfterAction,u=o,d=!0,c=Date.now(),v=Y(P+u.id),f=Y(G+u.id),m=Y(x+u.id),r.confirm&&v&&(s=v.split("|"),parseInt(s[0],10)>=r.confirm.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.cancel.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.closed.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=q.body.offsetHeight;return k.elem.offsetTop-window.innerHeight/2<=o||t}},o.watchers.push(e),Fo(o)),i.scrollPercentageToDisplay&&(e=jo(i.scrollPercentageToDisplay),o.watchers.push(e),Fo(o)),i.manualTrigger&&(N=i.manualTrigger,e={check:function(){return!!(N&&H.triggeredWidgets[B.id]||H.triggeredWidgets["*"])}},(B=o).watchers.push(e),H.readyWidgets.push(o),Io(o)),0!==o.watchers.length||i.showOnExitIntent||o.valid&&Eo(o)}}function Jo(o){return o.id=to(),Ao(o)}function Yo(){var o,t,e=H.openedWidgets,i=H.delayedWidgets;for(var n in e.forEach(function(o){var t=q.getElementById(o.id);for(var e in E(t,"opened"),t.parentNode.removeChild(t),o.listeners)if(o.listeners.hasOwnProperty(e)){var i=o.listeners[e];i.target.removeEventListener(i.type,i.fn)}}),i)i.hasOwnProperty(n)&&(o=n,(t=H.delayedWidgets[o])&&(clearTimeout(t),delete H.delayedWidgets[o]));zo.removeAll(),l(H),p(v),a(s),this.callbacks=[],this.acctid=""}function _o(o,t){var e={valid:!0,type:o};if(!t)throw new Error("Config object is missing");if(!(e.config=t).id)throw new Error("All widgets must have an id value");return e.id=t.id,e}function Qo(o){return _o("message",o)}function $o(o){return _o("subscription",o)}function Xo(o){return _o("form",o)}function ot(o){return _o("sitegate",o)}function tt(o){o.forEach(function(o){var t=o.type,e=Y(o.cookieId),i=0,n=new Date;e=e||Math.random(),n.setDate(n.getDate()+365),Z(o.cookieId,e,n);for(var a=0;a<1&&!(e<=(a+=t.groups[i]));)i++;if(o.groups.forEach(function(o,t){o.forEach(function(o){if(void 0!==o.abTestingGroup)throw new Error("Widget #"+o.config.id+" is defined in more than one AB test.");o.abTestingGroup=t,o.hiddenViaABTests=i===t})}),void 0!==v.abTestingGroups[o.id])throw new Error("AB test with ID="+o.id+" has been already defined.");v.abTestingGroups[o.id]=i})}function et(o){return function(o){var t={};if(!o)throw new Error("Config object is missing");if(t.id=o.id,t.cookieId=r+o.id,t.groups=o.groups,!d[o.type])throw new Error("Unknown AB testing type: "+o.type);return t.type=d[o.type],t}(o)}function it(o){var t={},e=q.querySelectorAll("["+o+"]");this.elements=this.elements.concat(e);for(var i=0;i

",inline:"

",modal:"",slideout:"

"},sitegate:{modal:""},message:{bar:"

",button:"",inline:"

",modal:"",slideout:"

"},includes:{},form:{inline:"

",modal:"",slideout:"

"},assets:{lytics:"lytics"}},q=window.document;function f(o){var t,e=this,i=q.documentElement.doScroll,n="DOMContentLoaded";(i?/^loaded|^c/:/^loaded|^i|^c/).test(q.readyState)?(e.DOMLoaded=!0,o()):q.addEventListener(n,t=function(){q.removeEventListener(n,t),e.DOMLoaded=!0,o()})}function M(o){return String(o).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function E(o,t){var e=new RegExp(["(^|\\b)",M(t.split(" ").join("|")),"(\\b|$)"].join(""),"gi");o.className=o.className.replace(e," ")}function K(o,t){E(o,t),o.className=[o.className,t].join(" ")}function T(o,t){return new RegExp("(^| )"+M(t)+"( |$)","gi").test(o.className)}function I(t){try{return decodeURIComponent(t)}catch(o){return t}}function k(o){var t=q.cookie,e=t.match("(^|;)\\s*"+encodeURIComponent(M(o))+"\\s*=\\s*([^;]+)");return null==e&&(e=t.match("(^|;)\\s*"+M(o)+"\\s*=\\s*([^;]+)")),null==e?null:I(e.pop())}function t(o,t,e){var i;i=e?"; expires="+e.toUTCString():"; expires=0",q.cookie=[encodeURIComponent(o),"=",encodeURIComponent(t),i,"; path = /"].join("")}function N(o){t(o,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"))}var B="$",U="@",z="PATHFORA";function F(o){try{return JSON.parse(o)}catch(o){}}function V(o){return Boolean(o[U])&&Date.parse(o[U])>5]&1<<(31&n)))?l.push("%",s(v>>4),s(15&v)):l.push(c))}return l.join("")}function $(o,t){for(var e in t)t.hasOwnProperty(e)&&"object"==typeof t[e]&&null!==t[e]&&!Array.isArray(t[e])?t.hasOwnProperty(e)&&(void 0===o[e]&&(o[e]={}),$(o[e],t[e])):t.hasOwnProperty(e)&&(o[e]=t[e])}function X(o,t,e){for(var i=o,n=t.split("."),a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g.test(o)}var io={addClass:K,hasClass:T,removeClass:E,readCookie:k,saveCookie:t,deleteCookie:N,updateLegacyCookies:function(){function o(o){return 0===o.trim().indexOf(i[n])}function t(o){var t=o.trim().split("=");if(2===t.length){var e=t[0],i=t[1];N(e),Z(e,I(i))}}function e(o){var t=sessionStorage.getItem(o);J(t)&&(sessionStorage.removeItem(o),sessionStorage.setItem(encodeURIComponent(o),encodeURIComponent(t)))}var i=[b,L,w,P,G,x,r,O],n=0;for(n=0;n=o.global.duration&&v():v()}if((p=p||0)>=o.widget.session)return!1;if(d){if(e=d.split("|"),i=parseInt(e[0],10),void 0!==e[1]){if(0=o.widget.total&&void 0===o.widget.duration)return!1;if(0=o.global.session)return!1;if(0=o.global.total)&&!(u>=o.global.total&&void 0===o.global.duration)}function ro(o,t){var e,i,n,a;if("object"==typeof jstag&&window.jstag.send(t.censorTrackingKeys?(n=o,a=t.censorTrackingKeys,Object.keys(n).filter(function(t){return!a.some(function(o){return"string"==typeof o?t===o:o.test(t)})}).reduce(function(o,t){return o[t]=n[t],o},{})):o),!0===window.pathfora.enableGA&&"function"==typeof window.ga&&"function"==typeof window.ga.getAll){e=o["pf-widget-action"]||o["pf-widget-event"],i=window.ga.getAll();for(var l=0;l*'),l.appendChild(a)),(!0===o.required||"date"===o.type||"email"===o.type)&&(K(l,"pf-form-required"),e.setAttribute(!0===o.required?"data-required":"data-validate","true"),o.label)){var v=q.createElement("div");v.className="pf-required-flag",v.innerHTML=!0===o.required?"required":"invalid";var f=q.createElement("span");v.appendChild(f),l.appendChild(v)}if(o.placeholder){if("select"===o.type){var m=q.createElement("option");m.setAttribute("value",""),m.innerHTML=o.placeholder,e.appendChild(m)}else e.placeholder=o.placeholder;o.label||e.setAttribute("aria-label",o.placeholder)}if(o.values)for(i=0;ii.display.descriptionLimit&&-1!==i.display.descriptionLimit&&(v=(v=v.substring(0,i.display.descriptionLimit)).substring(0,v.lastIndexOf(" "))+"..."),r.innerHTML=v,l.appendChild(r)}e.appendChild(l)}}(e,o),t=o,e.className=["pf-widget ","pf-"+t.type," pf-widget-"+t.layout,t.position?" pf-position-"+t.position:"",t.pushDown?" pf-has-push-down":"",t.origin?" pf-origin-"+t.origin:""," pf-widget-variant-"+t.variant,t.theme?" pf-theme-"+t.theme:"",t.className?" "+t.className:"",t.branding?" pf-widget-has-branding":"",t.responsive?"":" pf-mobile-hide"].join(""),So(e,o),function(o,t){switch(t.theme){case"custom":t.colors&&Co(o,t.colors);break;case"none":break;default:t.theme&&Co(o,s.generic.themes[t.theme])}}(e,o),e}function Mo(o,t){if("inline"===o.layout||"modal"===o.layout&&o.recommend){var e=t.querySelector(".pf-content-unit");e&&(t.offsetWidth=i&&E(e,"stack"))}}function Eo(o){function t(t){for(var o=0;o=o.length)){var i=o[t],n=s[i.type],a=s.generic;if($(i,a),$(i,n),$(i,i.config),!(H.initializedWidgets.indexOf(i.id)<0))throw new Error("Cannot add two widgets with the same id");H.initializedWidgets.push(i.id),i.success&&(i.formStates||(i.formStates={}),i.formStates.success||(i.formStates.success=i.success)),xo(i,l,function(){Ro(i,l,function(){if(l.initializeWidget(i,e),e&&e.priority===W){if(H.prioritizedWidgets.length&&H.prioritizedWidgets[0].id===i.id)return;p(o,t+1,e)}})}),e&&e.priority===W||p(o,t+1,e)}};p(o,0,t)}function Wo(o,t,e,i){if(!e||!e.length)return!0;var n,a,l=oo(o,t),p=!1;"function"==typeof l&&(l=(a=l.toString()).substring(a.indexOf("{")+1,a.lastIndexOf("}")),n=a.match(/(function.+\()(.+(?=\)))(.+$)/),p=!0);for(var r=0;r
x
'),t.close();var e=t.documentElement.scrollHeight>t.body.scrollHeight;return o.parentNode.removeChild(o),Vo=e?document.documentElement:document.body}(),t=o.scrollTop,e=o.scrollHeight,i=o.clientHeight;return n<=t/(e-i)*100}}}function Zo(o,t){var e,i=o.displayConditions;if(o.watchers=[],o.listeners=[],o.expiration=new Date,o.expiration.setDate(o.expiration.getDate()+365),("sitegate"!==o.type||"true"!==Y(L+o.id))&&!0!==o.hiddenViaABTests){if(o.pushDown){if("bar"!==o.layout||"top-fixed"!==o.position&&"top-absolute"!==o.position)throw new Error("Only top positioned bar widgets may have a pushDown property");K(q.querySelector(o.pushDown),"pf-push-down")}var n,a,l,p,r,u,s,d,c,v,f,m,g,h,w,y,b,S,C,A,M,E,T,I,k,N,B;o.valid=o.valid&&function(o,t){for(var e,i=!0,n=0;nnew Date(n.end_at).getTime()&&(a=!1),a)),i.pageVisits&&(o.valid=o.valid&&(p=i.pageVisits,Y(O)>=p)),i.hideAfterAction&&(o.valid=o.valid&&(r=i.hideAfterAction,u=o,d=!0,c=Date.now(),v=Y(P+u.id),f=Y(G+u.id),m=Y(x+u.id),r.confirm&&v&&(s=v.split("|"),parseInt(s[0],10)>=r.confirm.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.cancel.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=r.closed.hideCount&&(d=!1),void 0!==s[1]&&Math.abs(s[1]-c)/1e3=q.body.offsetHeight;return k.elem.offsetTop-window.innerHeight/2<=o||t}},o.watchers.push(e),Fo(o)),i.scrollPercentageToDisplay&&(e=jo(i.scrollPercentageToDisplay),o.watchers.push(e),Fo(o)),i.manualTrigger&&(N=i.manualTrigger,e={check:function(){return!!(N&&H.triggeredWidgets[B.id]||H.triggeredWidgets["*"])}},(B=o).watchers.push(e),H.readyWidgets.push(o),Io(o)),0!==o.watchers.length||i.showOnExitIntent||o.valid&&Eo(o)}}function Jo(o){return o.id=to(),Ao(o)}function Yo(){var o,t,e=H.openedWidgets,i=H.delayedWidgets;for(var n in e.forEach(function(o){var t=q.getElementById(o.id);for(var e in E(t,"opened"),t.parentNode.removeChild(t),o.listeners)if(o.listeners.hasOwnProperty(e)){var i=o.listeners[e];i.target.removeEventListener(i.type,i.fn)}}),i)i.hasOwnProperty(n)&&(o=n,(t=H.delayedWidgets[o])&&(clearTimeout(t),delete H.delayedWidgets[o]));zo.removeAll(),l(H),p(v),a(s),this.callbacks=[],this.acctid=""}function _o(o,t){var e={valid:!0,type:o};if(!t)throw new Error("Config object is missing");if(!(e.config=t).id)throw new Error("All widgets must have an id value");return e.id=t.id,e}function Qo(o){return _o("message",o)}function $o(o){return _o("subscription",o)}function Xo(o){return _o("form",o)}function ot(o){return _o("sitegate",o)}function tt(o){o.forEach(function(o){var t=o.type,e=Y(o.cookieId),i=0,n=new Date;e=e||Math.random(),n.setDate(n.getDate()+365),Z(o.cookieId,e,n);for(var a=0;a<1&&!(e<=(a+=t.groups[i]));)i++;if(o.groups.forEach(function(o,t){o.forEach(function(o){if(void 0!==o.abTestingGroup)throw new Error("Widget #"+o.config.id+" is defined in more than one AB test.");o.abTestingGroup=t,o.hiddenViaABTests=i===t})}),void 0!==v.abTestingGroups[o.id])throw new Error("AB test with ID="+o.id+" has been already defined.");v.abTestingGroups[o.id]=i})}function et(o){return function(o){var t={};if(!o)throw new Error("Config object is missing");if(t.id=o.id,t.cookieId=r+o.id,t.groups=o.groups,!d[o.type])throw new Error("Unknown AB testing type: "+o.type);return t.type=d[o.type],t}(o)}function it(o){var t={},e=q.querySelectorAll("["+o+"]");this.elements=this.elements.concat(e);for(var i=0;i