(()=>{var t,n;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function a(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:null;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.cacheKeyPrefix=n},n=[{key:"isNumber",value:function(t){return!isNaN(parseFloat(t))&&!isNaN(t-0)}},{key:"isDate",value:function(t){return t instanceof Date&&!isNaN(t.valueOf())}},{key:"put",value:function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=new Date,o=null;if(this.isNumber(e)){var r=new Date;r.setSeconds(r.getSeconds()+e),o=r.toISOString()}this.isDate(e)&&(o=e.toISOString());var i={value:n,createdAt:a,expiresAt:o};return this.cacheKeyPrefix&&(t=this.cacheKeyPrefix+t),localStorage.setItem(t,JSON.stringify(i)),n}},{key:"delete",value:function(t){return this.cacheKeyPrefix&&(t=this.cacheKeyPrefix+t),localStorage.removeItem(t)}},{key:"remember",value:function(t,n,e){var a=this.get(t);if(a)return a;this.put(t,1,n);var o=e();return this.put(t,o,n)}},{key:"rememberForever",value:function(t,n){return this.remember(t,null,n)}},{key:"get",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.cacheKeyPrefix&&(t=this.cacheKeyPrefix+t);var e=localStorage.getItem(t);if(!e)return n;var a=JSON.parse(e);return a.expiresAt&&a.expiresAt<(new Date).toISOString()?n:a.value}}],n&&a(t.prototype,n),e&&a(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,e}(),i=new URL(document.getElementById("script__top_menu_products_empreender").src),c=Object.fromEntries(i.searchParams);function s(){var t,n,e,a=null===(t=document.querySelector(".container--lojas-apps-1669642789"))||void 0===t?void 0:t.getAttribute("data-paises-criar-conta");null===(n=document.querySelector(".header-modal-script-1669642789"))||void 0===n||n.getAttribute("data-nameKey");a&&(a=a.split(","));return(null===(e=a)||void 0===e?void 0:e.length)>0?'\n\t\t
\n\t\t\t\n\t\t\t\n\t\t
\n\t\t'):'\n\t\t
\n\t\t\t\n\t\t
\n\t\t'}function p(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{null===n?EmpreenderTrack(t):EmpreenderTrack(t,n)}catch(t){console.log("error EmpreenderTrack",t)}}(c=c||{}).app=null===(t=c.app)||void 0===t?void 0:t.replace(/\s/g,""),window.empreenderPlusRegistrarConversao=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";(new r).remember("plus-cache-conversao",21600,(function(){return function(t,n){fetch("https://app.empreender.plus/api/v1/conversao/html/".concat(t)).then((function(t){return t.json()})).then((function(t){var e=t.data.html_iframes;console.log("executou",t.data),document.querySelector(n).insertAdjacentHTML("beforeend",e)})).catch((function(t){return console.log({err:t})}))}(t,n),1}))},window.closeModal1669642789=function(){document.querySelector(".overlay-modal-1669642789").style.display="none"},window.replaceCreateAccountBlock1669642789=function(){document.querySelector(".container_criar_conta---1669642789").innerHTML=s()},window.addModalContent1669642789=function(t){var n=t.getAttribute("data-image"),e=t.getAttribute("data-key"),a='\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
Selecione uma conta abaixo
\n\t\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\n\t\t
\n\t\t
\n\n\t\t
\n\t\t');document.querySelector(".modal--contas-container-1669642789").innerHTML=a,window.empreenderPlusApiMethods.buscarContasDosApps(),document.querySelector(".overlay-modal-1669642789").style.display="flex"},window.empreenderPlusApiInstancia=function(t){var n={RASTREIO:"",LANDINGPAGE:"",W:"",DROPI:"","365ARTES":"",WHATSLY:"",LILY:"",OVNI:"",AUTOMAGICO:"",CHEGUEI:"",DIJITAL:"",WIDGETINSTA:"",WIDGETTIK:"",FRETEHERO:""};function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t&&(document.querySelector(t).style.pointerEvents="all")}function a(){var e={method:"POST",credentials:"include",body:JSON.stringify({acao:"buscarAppsPlus"})};function a(t){if(t){var e={value:t,date:(new Date).toString()};localStorage.setItem("buscarAppsDoPlus1669642789",JSON.stringify(e))}var a="";null==t||t.forEach((function(t){var e;a+='
').concat(null!==(e=n[t.nome_key])&&void 0!==e?e:''),"
")})),document.querySelector(".container--apps-icons-1669642789").innerHTML=a}null!=t&&t.headers&&(e.headers=t.headers);try{var o=JSON.parse(localStorage.getItem("buscarAppsDoPlus1669642789"));if(o.date&&o.value){var r=new Date(o.date),i=(new Date).getTime()-r.getTime();if(i<12e5)return a(o.value),!0}}catch(t){}fetch(t.caminhoParaRepassarRequestAoPlus,e).then((function(t){return t.json()})).then((function(t){a(t.data)})).catch((function(t){return console.log({err:t})}))}window.empreenderPlusApiMethods={buscarAppsDoPlus:a,buscarContasDosApps:function(){var n={method:"POST",credentials:"include",body:JSON.stringify({acao:"buscarContasDoApp",nome_key:document.querySelector(".header-modal-script-1669642789").dataset.namekey})};null!=t&&t.headers&&(n.headers=t.headers);var e="";fetch(t.caminhoParaRepassarRequestAoPlus,n).then((function(t){return t.json()})).then((function(t){var n;t.data.contas.forEach((function(n){var a,o,r,i,c,s;e+='
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t(').concat(n.chave_empreender,')\n\t\t\t\t\t\t\t\t').concat(n.nome.split(" ")[0],'\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t').concat((a=new Date(1e3*(null==n?void 0:n.inclusao_segundos)),o=new Date,r=a.getTime(),i=o.getTime(),Math.abs(r-i)/864e5>=2?"":"Novo"),'\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\tEntrar >\n\t\t\t\t\t\t
\n\t\t\t\t\t
')})),document.querySelector(".container_escolher_apps---1669642789").innerHTML=e,n=document.querySelector(".container_criar_conta---1669642789"),document.querySelector(".container_escolher_apps---1669642789").children.length>0?n.innerHTML='':n.innerHTML=s()})).catch((function(t){return console.log({err:t})}))},logarConta:function(n){var e={method:"POST",credentials:"include",body:JSON.stringify({acao:"logarConta",id_conta:n.getAttribute("data-conta-id")})};null!=t&&t.headers&&(e.headers=t.headers),fetch(t.caminhoParaRepassarRequestAoPlus,e).then((function(t){return t.json()})).then((function(t){var n,e;p("login",{method:"Empreender+Banner_"+(null!==(n=null===(e=document.querySelector(".header-modal-script-1669642789"))||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.namekey)&&void 0!==n?n:"")}),setTimeout((function(){window.location.href=t.data.link_magico_redirecionar}),500)})).catch((function(t){return console.log({err:t})}))},criarConta:function(){var n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t&&(document.querySelector(t).style.pointerEvents="none")}(a);var o={acao:"criarConta",nome_key:document.querySelector(".header-modal-script-1669642789").getAttribute("data-namekey")},r=null===(n=document.querySelector(".select--paises-script-plus-1669642789"))||void 0===n?void 0:n.value;r&&(o.pais=r),null!=t&&t.afiliado&&(o.afiliado=t.afiliado);var i={method:"POST",credentials:"include",body:JSON.stringify(o)};null!=t&&t.headers&&(i.headers=t.headers),fetch(t.caminhoParaRepassarRequestAoPlus,i).then((function(t){return t.json()})).then((function(t){var n,o;p("sign_up",{method:"Empreender+Banner_"+(null!==(n=null===(o=document.querySelector(".header-modal-script-1669642789"))||void 0===o||null===(o=o.dataset)||void 0===o?void 0:o.namekey)&&void 0!==n?n:"")}),window.empreenderPlusApiMethods.buscarContasDosApps(),setTimeout((function(){e(a)}),2e3)})).catch((function(t){e(a),console.log({err:t})}))},verifyIfLoggedinBeforeRedirect:function(n){var e={method:"POST",credentials:"include",body:JSON.stringify({acao:"logarConta",next_link:n})};null!=t&&t.headers&&(e.headers=t.headers),fetch(t.caminhoParaRepassarRequestAoPlus,e).then((function(t){return t.json()})).then((function(t){p("login",{method:"Empreender+Banner_auth_redirect"}),setTimeout((function(){var e,a;window.location.href=null!==(e=null==t||null===(a=t.data)||void 0===a?void 0:a.link_magico_redirecionar)&&void 0!==e?e:n}),500)})).catch((function(t){console.log({err:t}),window.location.href=n}))}},a(),document.querySelector(".modal--contas-container-1669642789").addEventListener("click",(function(t){t.stopPropagation()})),document.querySelector(".overlay-modal-1669642789").addEventListener("click",(function(t){t.stopPropagation(),window.closeModal1669642789()})),console.log('window["empreenderPlusApiMethods"]',window.empreenderPlusApiMethods)};var l=!1;window.handlePlusMenuOpenClose1669642789=function(t){l=!l};var d,m,u=function(){document.addEventListener("click",(function(t){try{document.querySelector(".empreender--plus--logo-1669642789").contains(t.target)&&l?document.querySelector(".plus--menu--1669642789").style.display="block":(l=!1,document.querySelector(".plus--menu--1669642789").style.display="none")}catch(t){var n=document.querySelector(".plus--menu--1669642789");n&&(n.style.display="none")}}))};window.initProdutosEmpreenderTopMenu=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=function(){window.open("https://bit.ly/3FqDJor","_blank")};!function(t){var e=null;if(e=c.insert?document.querySelector(".".concat(c.insert)):document.querySelector("body")){c.insert?e.innerHTML=t:e.insertAdjacentHTML("afterbegin",t),document.querySelector(".plus--logo-1669642789").addEventListener("click",n);var a;(a=document.querySelector(".container--apps-icons-1669642789")).addEventListener("wheel",(function(t){t.preventDefault(),a.scrollLeft+=t.deltaY}))}else console.log(c.insert+" not found")}('\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t'.concat('\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t','\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n\t\t
\n\t\t\t\n\t\t
\n\t')),t&&window.empreenderPlusApiInstancia(t)},null!==(n=c)&&void 0!==n&&n.dontWaitLoad?(window.initProdutosEmpreenderTopMenu(),u()):document.addEventListener("DOMContentLoaded",(function(){window.initProdutosEmpreenderTopMenu(),u()})),d="#1B1B1B",m="#2C2F38",document.head.insertAdjacentHTML("beforeend","'))})();