"use strict";(self.webpackChunkmarketplace=self.webpackChunkmarketplace||[]).push([[723],{584:(e,t,o)=>{o.r(t),o.d(t,{default:()=>A});var n=o(552),i=o(2);const a="js-sticker",r=()=>{const e=document.querySelector(`.${a}`);if(e){if(e.classList.contains(`${a}-observable`)&&i.A.get("showed_sticker_hint"))return;o.e(756).then(o.bind(o,436)).then((e=>{e.default.mount();const t=document.querySelector(`.${a}-observable`);t&&(t.addEventListener("toggle",(({detail:e})=>{"closed"===e.state&&i.A.set("showed_sticker_hint",new Date,86400)})),t.classList.contains("is-active")||new n.A(".js-ondemand-sticker",(()=>{if(!t.classList.contains("is-active")){const t=document.querySelector(`.${a}-lid`);e.default.toggle({target:t})}}),{isFullyVisible:!0}))}))}else o.e(776).then(o.bind(o,596)).then((e=>{e.default.mount()}))},s="[data-animation]",l=e=>{if("IntersectionObserver"in window){new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>0?e.classList.add("s-animated","s-heart-beat"):e.classList.remove("s-animated","s-heart-beat")}))})).observe(e)}},c=()=>{const e=document.querySelectorAll(s);0!==e.length&&e.forEach((e=>{l(e)}))},d=e=>{const t=e.target.closest('[data-module="ufb-button"]');if(!t)return;const o=t.closest('[data-module="ufb-group"]');if(!o)return;const n=document.createElement("div");n.classList.add("c-ufb__alert"),n.textContent="Obrigado pelo feedback!",o.innerHTML="",o.appendChild(n)},u=()=>{document.addEventListener("click",d)};function f(e,t){for(var o=0;oe.length)&&(t=e.length);for(var o=0,n=new Array(t);o0&&this.registerTriggers.apply(this,h(i)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,o,n;return t=e,o=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,o=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:null;this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation?this.modal.addEventListener("animationend",(function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()}),!1):this.setFocusToFirstNode(),this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var o=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(o),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){e.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(e)}},{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(v);return Array.apply(void 0,h(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var o=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));o.length>0&&o[0].focus(),0===o.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var o=t.indexOf(document.activeElement);e.shiftKey&&0===o&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&o===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}],o&&f(t.prototype,o),n&&f(t,n),e}(),b=null,y=function(e){if(!document.getElementById(e))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'')),!1},w=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",''))}(e),!t)return!0;for(var o in t)y(o);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),o=h(document.querySelectorAll("[".concat(t.openTrigger,"]"))),n=function(e,t){var o=[];return e.forEach((function(e){var n=e.attributes[t].value;void 0===o[n]&&(o[n]=[]),o[n].push(e)})),o}(o,t.openTrigger);if(!0!==t.debugMode||!1!==w(o,n))for(var i in n){var a=n[i];t.targetModal=i,t.triggers=h(a),b=new g(t)}},show:function(e,t){var o=t||{};o.targetModal=e,!0===o.debugMode&&!1===y(e)||(b&&b.removeEventListeners(),(b=new g(o)).showModal())},close:function(e){e?b.closeModalById(e):b.closeModal()}});window.MicroModal=p;const k=p,E=(e,t)=>{t.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,detail:{state:e},cancelable:!0}))},A={mount:()=>{setTimeout((()=>r()),0),setTimeout((()=>c()),0),setTimeout((()=>u()),0),setTimeout((()=>{document.querySelector('[role="dialog"]')&&k.init({disableScroll:!0,awaitOpenAnimation:!0,awaitCloseAnimation:!0,onShow:e=>{E("opened",e)},onClose:e=>{E("closed",e)}})}),0),setTimeout((()=>{new n.A('[data-loader="disclosure"]',(()=>{o.e(672).then(o.bind(o,180)).then((e=>{e.default.mount()}))}))}),0),setTimeout((()=>{new n.A('[data-loader="player"]',(()=>{o.e(88).then(o.bind(o,508)).then((e=>{e.default.mount()}))}))}),0),setTimeout((()=>{new n.A('[data-loader="yotpo"]',(()=>{const e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//staticw2.yotpo.com/7hXKQUgH8FdKl608dz84cZKV4veMAwb2Oc84VfNO/widget.js";const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}))}),0)}}}}]); //# sourceMappingURL=apply-page.190d9852ca341de9ff1d.js.map