var socialProofConfig = {"_id":"memrM8jee6TjQmnGH","name":"fit for life","messages":[{"text":"\"Fit for Life hat mir geholfen, meine Fitnessziele zu erreichen.\" - Max, 25","image":"https://static.convertlink.io/socialProof/image/SuKjawNzLN8Jty2jt.jpg"},{"text":"\"Die Produkttests von Fit for Life sind so unabhängig, dass ich mich darauf verlassen kann, dass sie fair und objektiv sind.\" - Anna, 30","image":"https://static.convertlink.io/socialProof/image/bgsJqGGkmuKteXHoJ.jpg"},{"text":"\"Die Workouts von Fit for Life sind so effektiv, dass ich in kürzester Zeit Ergebnisse gesehen habe.\" - Katharina, 37","image":"https://static.convertlink.io/socialProof/image/fozAETeQShigm9jnr.jpg"},{"text":"\"Die Produkttests von Fit for Life sind so unabhängig, dass ich mich darauf verlassen kann, dass sie fair und objektiv sind.\" - Heiko, 44","image":"https://static.convertlink.io/socialProof/image/8Woq2KG8PGNkx2DWL.jpg"},{"text":"\"Ich habe mit Fit for Life so viel Spaß, dass ich mich immer darauf freue, zu trainieren.\" - Markus, 38","image":"https://static.convertlink.io/socialProof/image/MmcuouJ88E3iqMHNe.jpg"},{"text":"\"Die Produkttests von Fit for Life sind so informativ, dass ich alles über die Produkte erfahren kann, was ich brauche, um eine fundierte Entscheidung zu treffen. DANKE!\" - Bedir, 31","image":"https://static.convertlink.io/socialProof/image/Z8AzvfdkLWi24oYE7.jpg"},{"text":"\"Fit for Life ist die beste Fitness-Seite die ich kenne. Alles da um fit zu werden\"- Tatjana, 41","image":"https://static.convertlink.io/socialProof/image/ef2kXYSt83onkARFh.jpg"},{"text":"\"Ich habe mit den Produkten von Fit for Life in 6 Monaten 10 kg Muskelmasse aufgebaut!\" - Nils, 28","image":"https://static.convertlink.io/socialProof/image/jRQYajns4cLMgFdCc.jpg"},{"text":"\"Die Produkttests von Fit for Life sind so hilfreich, dass sie mir dabei geholfen haben, die richtigen Produkte für meine Bedürfnisse zu finden.\" - Marlene, 48","image":"https://static.convertlink.io/socialProof/image/4HT7t9CmGexT8PXec.jpg"},{"text":"\"Die Infos und Pläne von Fit for Life sind so hochwertig, dass ich sie jedem empfehlen würde.\" - Jakob, 35","image":"https://static.convertlink.io/socialProof/image/8g2zDMNBaLJQPZ7yF.jpg"}],"style":{},"displayTime":8,"initialWaitTime":5,"waitTime":4,"createdAt":"2023-08-28T14:05:31.465Z","userId":"w2oZAvLsmfwgFEMRQ"};function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var MODE_TIMEOUT=0,MODE_INTERVAL=1,fnStacks=new Map,runArray=new Set,rafStarted=!1,startId=0;function getTimeStamp(){return(new Date).getTime()}function executeFn(t){var e=t.fn,n=t.args;e.apply(void 0,_toConsumableArray(n))}function runFunction(){0!==runArray.size&&(runArray.forEach(executeFn),runArray.clear())}var checkTick=function(a){return function(t,e){var n=t.nextTick,o=t.ms,i=t.mode;0<=a-n&&(runArray.add(t),i===MODE_TIMEOUT?fnStacks.delete(e):fnStacks.set(e,Object.assign({},t,{nextTick:n+o})))}};function loop(){var t=getTimeStamp();fnStacks.forEach(checkTick(t)),runFunction(),0!==fnStacks.size?window.requestAnimationFrame(loop):rafStarted=!1}function addId(t){var e=t.fn,n=t.ms,o=void 0===n?0:n,i=t.args,a=t.mode;if(!e)return null;var r=startId;return fnStacks.set(r,{fn:e,ms:o,nextTick:getTimeStamp()+o,args:i,mode:a}),rafStarted||(rafStarted=!0,window.requestAnimationFrame(loop)),startId+=1,r}function removeId(t){fnStacks.has(t)&&fnStacks.delete(t),0===fnStacks.size&&(rafStarted=!1)}var initialNotificationShown,shuffledNotifications,showNotificationContainer,rafSetTimeout=function(t,e){for(var n=arguments.length,o=Array(2<n?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return addId({fn:t,ms:1<arguments.length&&void 0!==e?e:0,args:o,mode:MODE_TIMEOUT})},rafClearTimeout=removeId,rafSetInterval=function(t,e){for(var n=arguments.length,o=Array(2<n?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return addId({fn:t,ms:1<arguments.length&&void 0!==e?e:0,args:o,mode:MODE_INTERVAL})},rafClearInterval=removeId;function shuffle(t){for(var e=t.length;0<e;){var n=Math.floor(Math.random()*e),o=t[--e];t[e]=t[n],t[n]=o}return t}function asyncLoop(t,e,n){var o=0,i=!1,a={next:function(){i||(o<t?(o++,e(a)):(i=!0,n()))},iteration:function(){return o-1},break:function(){i=!0,n()}};return a.next(),a}function fadeOut(e){e&&(e.style.opacity=1,function t(){(e.style.opacity-=.1)<0?e.style.display="none":requestAnimationFrame(t)}())}function fadeIn(n,t,o){n&&(n.style.opacity=0,n.style.display="block",function t(){var e=parseFloat(n.style.opacity);1<(e+=.1)?"function"==typeof o&&o():(n.style.opacity=e,requestAnimationFrame(t))}())}socialProofConfig&&socialProofConfig.messages&&socialProofConfig.messages.length&&(initialNotificationShown=!1,shuffledNotifications=shuffle(Array.from(socialProofConfig.messages)),(showNotificationContainer=function(t){asyncLoop(t.length,function(f){!function(e){e.closing=!1;var t,n=socialProofConfig.displayTime||5,o=socialProofConfig.initialWaitTime||socialProofConfig.waitTime||2;initialNotificationShown?t=socialProofConfig.waitTime||2:(t=o,initialNotificationShown=!0);var i,a=document.createElement("div");a.className="cl-social-proof-message",a.style.borderRadius="100px",a.style.backgroundColor="#fff",a.style.position="fixed",a.style.zIndex="999",a.style.left="15px",a.style.bottom="15px",a.style.border="1px solid #ddd",a.style.boxSizing="border-box",a.style.padding="10px 15px",a.style.width="265px",a.style.maxWidth="100%",a.style.color="#666",a.style.clear="both",a.style.fontFamily="sans-serif",a.style.fontSize="13px",a.style.display="none",e.image&&((i=document.createElement("div")).style.backgroundImage="url("+e.image+")",i.style.backgroundRepeat="no-repeat",i.style.backgroundPosition="center",i.style.backgroundSize="cover",i.style.borderRadius="100px",i.style.float="left",i.style.marginRight="15px",i.style.width="40px",i.style.height="40px",a.appendChild(i));var r,s=document.createElement("div");s.innerHTML=e.text||"",s.style.fontWeight="bold",a.appendChild(s),e.time&&((r=document.createElement("div")).innerHTML=e.time||"",r.style.color="#999",r.style.fontSize="12px",r.style.marginTop="4px",a.appendChild(r));var l=document.createElement("button");l.style.backgroundColor="transparent",l.style.border="none",l.style.position="absolute",l.style.top="10px",l.style.right="10px",l.style.cursor="pointer",l.innerHTML="&times;",l.style.color="#999",l.style.top="50%",l.style.marginTop="-8px",l.addEventListener("click",function(t){t.preventDefault(),a&&!e.closing&&(e.closing=!0,fadeOut(a,100),f.next())}),a.appendChild(l),rafSetTimeout(function(){document.body.appendChild(a),a&&!e.closing&&"hidden"!==document.visibilityState&&fadeIn(a,300,function(){rafSetTimeout(function(){a&&!e.closing&&(fadeOut(a,100),rafSetTimeout(function(){a.parentNode.removeChild(a)},100),f.next())},1e3*n)})},1e3*t)}(t[f.iteration()])},function(){showNotificationContainer(shuffledNotifications)})})(shuffledNotifications));