iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://static.vocstatic.com/widgets/4.4.0/ev-em.min.js
/** * @license ev-em.js v3.4.4 eugenDev ev-engagements tags are getting the templates in a sequence * (c) 2015-2024 Evolok, Inc. https://www.evolok.com/ * * License: MIT */ var runtime=function(a){"use strict";var u,t=Object.prototype,h=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",e=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function i(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{i({},"")}catch(t){i=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var o,i,a,c,r=r&&r.prototype instanceof d?r:d,r=Object.create(r.prototype),n=new j(n||[]);return r._invoke=(o=t,i=e,a=n,c=l,function(t,r){if(c===p)throw new Error("Generator is already running");if(c===y){if("throw"===t)throw r;return k()}for(a.method=t,a.arg=r;;){var e=a.delegate;if(e){var n=function t(r,e){var n=r.iterator[e.method];if(n===u){if(e.delegate=null,"throw"===e.method){if(r.iterator.return&&(e.method="return",e.arg=u,t(r,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var n=f(n,r.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,v;n=n.arg;if(!n)return e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v;{if(!n.done)return n;e[r.resultName]=n.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=u)}e.delegate=null;return v}(e,a);if(n){if(n===v)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===l)throw c=y,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=p;n=f(o,i,a);if("normal"===n.type){if(c=a.done?y:s,n.arg!==v)return{value:n.arg,done:a.done}}else"throw"===n.type&&(c=y,a.method="throw",a.arg=n.arg)}}),r}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}a.wrap=c;var l="suspendedStart",s="suspendedYield",p="executing",y="completed",v={};function d(){}function g(){}function m(){}var w={};w[n]=function(){return this};r=Object.getPrototypeOf,r=r&&r(r(O([])));r&&r!==t&&h.call(r,n)&&(w=r);var L=m.prototype=d.prototype=Object.create(w);function x(t){["next","throw","return"].forEach(function(r){i(t,r,function(t){return this._invoke(r,t)})})}function b(a,c){var r;this._invoke=function(e,n){function t(){return new c(function(t,r){!function r(t,e,n,o){t=f(a[t],a,e);if("throw"!==t.type){var i=t.arg;return(e=i.value)&&"object"==typeof e&&h.call(e,"__await")?c.resolve(e.__await).then(function(t){r("next",t,n,o)},function(t){r("throw",t,n,o)}):c.resolve(e).then(function(t){i.value=t,n(i)},function(t){return r("throw",t,n,o)})}o(t.arg)}(e,n,t,r)})}return r=r?r.then(t,t):t()}}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(r){if(r){var t=r[n];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,t=function t(){for(;++e=e.length?{done:!0}:{done:!1,value:e[o++]}},e:(r=function(e){throw e},i.toString=function(){return r.toString()},i),f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e){return r.apply(this,arguments)}var a,s,c=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:(s=function(e){l=!0,a=e},u.toString=function(){return s.toString()},u),f:function(){try{c||null==n.return||n.return()}finally{if(l)throw a}}};function u(e){return s.apply(this,arguments)}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"+JSON.stringify(e,null,3).replace(/&/g,"&").replace(/\\"/g,""").replace(//g,">").replace(/^( *)("[\w]+": )?("[^"]*"|[\w.+-]*)?([,[{])?$/gm,Z.Em.replacer)+""},replacer:function(e,t,n,r,o){t=t||"";return n&&(t=t+""+n.replace(/[": ]/g,"")+": "),(t=r?t+('"'==r[0]?"":"")+r+"":t)+(o||"")},segment:function(t,n,r){Z.Em.assert(t,"Parameters should not be empty!"),Z.Em.assert(n,"Success callback should not be empty!"),Z.Em.assert(r,"Error callback should not be empty!");var t=C("/segment",function(e){var t,n="";for(t in e=JSON.parse(e))""!==n&&(n+="&"),n+=t+"="+encodeURIComponent(e[t]);return n}(t)),o=new XMLHttpRequest;o.open("GET",t,!0),o.withCredentials=!0,o.onload=function(){var e;200<=o.status&&o.status<400?(e=JSON.parse(o.responseText),a.resolve(e),n(e)):r&&r(o.status,o.responseText)},o.onerror=function(){e?r(e):r(0,"unknown connection error")},o.send()},assert:function(e,t){if(!e){if(t=t||"Assertion failed","undefined"!=typeof Error)throw new Error(t);throw t}},getUrl:function(){return ee.url},showMeteredContent:function(){var e=document.getElementsByClassName("ev-meter-content");[].forEach.call(e,function(e){e.style.display="block"})},hideMeteredContent:function(){var e=document.getElementsByClassName("ev-meter-content");[].forEach.call(e,function(e){e.style.display="none"})}},setTimeout(function(){g()},4e3);var E=";SameSite=None; Secure";function v(e,t,n){if(!ee.sidCookieDomain)throw new Error("Please specify sidCookieDomain in the config!",!0);var r=new Date;n=1460,r.setDate(r.getDate()+n),(i=w())&&i<13?(document.cookie=e+"="+escape(t)+";time="+new Date+";expires="+r.toUTCString()+";path=/; domain="+ee.sidCookieDomain+"; Secure",console.log(e+"="+escape(t)+";time="+new Date+";expires="+r.toUTCString()+";path=/; domain="+ee.sidCookieDomain+"; Secure")):(document.cookie=e+"="+escape(t)+";time="+new Date+";expires="+r.toUTCString()+";path=/; domain="+ee.sidCookieDomain+E,console.log(e+"="+escape(t)+";time="+new Date+";expires="+r.toUTCString()+";path=/; domain="+ee.sidCookieDomain+E))}function b(e){return""!==te(e)&&"undefined"!==te(e)&&te(e)}function S(e){return""!==ne(e,"localStorage")&&"undefined"!==ne(e,"localStorage")&&ne(e,"localStorage")}function w(){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return null!=e&&(e=[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||0,10)],parseFloat(e.join(".")))}function ne(e,t){var n=document.cookie.indexOf(e+"=");if("localStorage"==t){if("undefined"==typeof localStorage)return 0\n
\n
\n
\n
\n ').concat(this.widgetResponse.content,'\n
\n
\n
\n
\n
\n '),this.renderContent()}},{key:"setInlineContent",value:function(){this.innerHTML='\n
\n
\n ').concat(this.widgetResponse.content,"\n
\n
"),this.renderContent()}},{key:"renderContent",value:function(){this.publishRenderedEvents();for(var e=document.querySelectorAll("script[data-ev-engagement]"),t=0;t\n
\n '.concat(e.thumbnailUrl?'\n \n '):"",'\n
\n \n\x3c!--
This is aa sen
--\x3e\n\n \n ')}),this.innerHTML='\n
\n '.concat(o,"\n
");case 13:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})}]),n}()),window.customElements.define("ev-em-profile-when",function(){_inherits(t,_wrapNativeSuper(HTMLElement));var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.apply(this,arguments)}return _createClass(t,[{key:"connectedCallback",value:function(){this.displayStyle=this.getAttribute("display-style")||"block";var e=this;for(this.customHtml=this.innerHTML;this.firstChild;)this.removeChild(this.firstChild);Z.Em.on(Z.Em.Event.PROFILE_ACCESS_RENDER_STATUS,this.initRenderElement.bind(this)),Z.Em.on(Z.Em.Event.GET_PROFILE_DATA_SUCCESS,function(){e.resetHtml("LoggedIn")}),Z.Event&&Z.Event.on(Z.Event.LOGOUT_ACTION,function(){e.resetHtml("LoggedOut")})}},{key:"resetHtml",value:function(e){this.responseState=e,this.responseState===this.state&&(this.style.display=this.displayStyle),this.responseState!==this.state&&(this.style.display="none");e=this.customHtml;for(this.tempFullHtmlStr=this.innerHTML;this.firstChild;)this.removeChild(this.firstChild);this.setCustomHtmlVar(),this.tempFullHtmlStr=this.tempFullHtmlStr.replace(e,this.customHtml),this.insertAdjacentHTML("beforeend",this.tempFullHtmlStr)}},{key:"setCustomHtmlVar",value:function(){if(this.userProfileData=sessionStorage.getItem("evolok:ev_profile"),this.userProfileData=JSON.parse(JSON.parse(this.userProfileData)),this.userProfileData){if(!this.customHtml&&this.innerHTML&&this.firstChild)for(this.customHtml=this.innerHTML;this.firstChild;)this.removeChild(this.firstChild);for(var n=this.customHtml,e=[],t=0,r=Object.entries(this.userProfileData);tt&&(t=e.clientHeight)});for(var o=0;o\n \n \n '),this.style.display="none",this.querySelector(".share-article-btn").addEventListener("click",this.openShareArticleModal.bind(this))}},{key:"storeArticleData",value:function(e){console.log(e.detail),this.articleUrl=e.detail.articleUrl,this.articleId=e.detail.articleId}},{key:"openShareArticleModal",value:function(){console.log("share article button clicked");var e={result:"ALLOW_ACCESS",sessionId:te("ev_sid")||ne("ev_sid","localStorage"),activeMeter:{count:this.widgetCount,max:100},articleSharingEvent:!0,articleUrl:this.articleUrl,articleId:this.articleId};Z.Em.paywallAndNotifierEvents(e)}}]),t}()),window.customElements.define("ev-share-article",function(){_inherits(t,_wrapNativeSuper(HTMLElement));var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.apply(this,arguments)}return _createClass(t,[{key:"connectedCallback",value:function(){Z.Em.on(Z.Em.Event.ARTICLE_URL,this.storeArticleUrl.bind(this));var e=this.getAttribute("hide-email-input");this.hideEmailInput=null!=e&&"true"===e;e=this.getAttribute("email-label-text");this.emailLabelText=e||"Recipient Email";e=this.getAttribute("share-button-text");this.shareButtonText=e||"Share",this.innerHTML='\n
\n
\n \n \n
\n\n \n\n
"),this.querySelector(".share-submit-btn").addEventListener("click",this.shareArticle.bind(this))}},{key:"storeArticleUrl",value:function(e){this.articleUrl=e.detail.articleUrl,this.articleId=e.detail.articleId}},{key:"shareArticle",value:function(){var e=document.querySelector("#ev-article-share-email").value;Z.Em.shareArticle({articleUrl:this.articleUrl,articleId:this.articleId,email:e})}}]),t}()),Z.Em.on(Z.Em.Event.AD_AUTHORIZE,function(e){u=e,h.authorizeData=e.detail})}(window.EV);