1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { 40/******/ configurable: false, 41/******/ enumerable: true, 42/******/ get: getter 43/******/ }); 44/******/ } 45/******/ }; 46/******/ 47/******/ // getDefaultExport function for compatibility with non-harmony modules 48/******/ __webpack_require__.n = function(module) { 49/******/ var getter = module && module.__esModule ? 50/******/ function getDefault() { return module['default']; } : 51/******/ function getModuleExports() { return module; }; 52/******/ __webpack_require__.d(getter, 'a', getter); 53/******/ return getter; 54/******/ }; 55/******/ 56/******/ // Object.prototype.hasOwnProperty.call 57/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 58/******/ 59/******/ // __webpack_public_path__ 60/******/ __webpack_require__.p = ""; 61/******/ 62/******/ // Load entry module and return exports 63/******/ return __webpack_require__(__webpack_require__.s = 0); 64/******/ }) 65/************************************************************************/ 66/******/ ([ 67/* 0 */ 68/***/ (function(module, exports, __webpack_require__) { 69 70"use strict"; 71 72 73__webpack_require__(1); 74 75__webpack_require__(4); 76 77__webpack_require__(5); 78 79__webpack_require__(6); 80 81/***/ }), 82/* 1 */ 83/***/ (function(module, exports, __webpack_require__) { 84 85"use strict"; 86 87 88__webpack_require__(2); 89 90__webpack_require__(3); 91 92//QUICK BUY VITRINE 93 94$(document).ready(function () { 95 $(".botoesSpot .bt.comprar").on("click", function (e) { 96 if ($(this).siblings(".bt.adicionar").length > 0) { 97 e.preventDefault(); 98 return newTrataModalProduto($(this).siblings(".bt.adicionar")); 99 } 100 }); 101}); 102 103window.newComprarProdutoSpotNovoCarrinho = function (spotComprarElement) { 104 var produtoId = spotComprarElement.attr("data-produtoId"); 105 var produtoVarianteId = spotComprarElement.attr("data-produtoVarianteId"); 106 var imageElement = spotComprarElement.parents("[id^=produto-spot-item-]").find(".spotImg img"); 107 var parametroCompraProduto = '{"ProdutoId":"{0}","StrOpcional":"Selecione","IsAssinatura":false,"DadosProduto":[{"ProdutoComboId":"0","ProdutoVarianteId":"{1}","ComboId":0,"ProdutoId":0,"Atributos":[],"Quantidade":"{2}","ListaPersonalizacoes":[]}],"attrNaoSelecionado":false,"ListaServicos":[],"VerificarServico":false}'; 108 var quantidade = spotComprarElement.parents("[id^=produto-spot-item-]").find("[id^=produto-spot-quantidade]").val(); 109 if (quantidade === undefined) { 110 quantidade = 1; 111 } 112 parametroCompraProduto = parametroCompraProduto.replace("{0}", produtoId); 113 parametroCompraProduto = parametroCompraProduto.replace("{1}", produtoVarianteId); 114 parametroCompraProduto = parametroCompraProduto.replace("{2}", quantidade); 115 116 $.ajax({ 117 type: "POST", 118 url: fbits.ecommerce.urlCarrinho + "Produto/ComprarProduto", 119 data: parametroCompraProduto, 120 async: false, 121 contentType: "application/json; charset=utf-8", 122 dataType: "json", 123 xhrFields: { 124 withCredentials: novoCheckout 125 }, 126 success: function success(data) { 127 if (data.resultadoCompra.StatusRequisicao == 0) { 128 if (jQuery(window).width() > 992) { 129 efeitoSpotComprar(imageElement, $(".carrinho:first")); 130 } else { 131 efeitoSpotComprar(imageElement, $(".carrinho:last")); 132 } 133 } else { 134 showError($(spotComprarElement).parents('[id^="produto-spot-item-"]').find('[id="mensagem-erro-spot"]'), data.resultadoCompra.Mensagem); 135 } 136 window.location.href = fbits.ecommerce.urlCarrinho; 137 }, 138 complete: function complete() { 139 $(spotComprarElement).removeAttr("disabled"); 140 if (atualizarResumoCarrinho) { 141 atualizarResumoCarrinho(); 142 } 143 }, 144 fail: function fail(data) { 145 showError($(spotComprarElement).parents('[id^="produto-spot-item-"]').find('[id="mensagem-erro-spot"]'), "Não foi possivel inserir o produto no carrinho."); 146 } 147 }); 148}; 149window.newTrataModalProduto = function (event) {
150 //var element = document.getElementById(event.context.id); 151 var element = document.querySelector('[data-produtoId="' + event.attr("data-produtoid") + '"]'); 152 if (element.getAttribute("data-produtovarianteid") == "0") { 153 var url = $(element).siblings(".bt.comprar").attr("href"); 154 window.location.href = url; 155 } else { 156 if (novoCheckout) newComprarProdutoSpotNovoCarrinho(event);else comprarProdutoSpot(event); 157 } 158}; 159//END QUICK BUY VITRINE 160 161//------------------------------------------ Gblobal 162var montarGlobal = function montarGlobal() { 163 var lastScrollTop = 0; 164 $(window).scroll(function (event) { 165 var st = $(this).scrollTop(); 166 167 if (st > 50) { 168 $("body").addClass("moving"); 169 if (st > lastScrollTop) { 170 $("body").addClass("moving--down"); 171 } else { 172 $("body").removeClass("moving--down"); 173 } 174 lastScrollTop = st; 175 } else { 176 $("body").removeClass("moving"); 177 } 178 }); 179 180 $(".button-menu").on("click", function () { 181 $("body").addClass("on-menu"); 182 }); 183 184 $(".ico-menu-fecha, .menu").on("click", function (e) { 185 if (e.target == e.currentTarget) { 186 $("body").removeClass("on-menu"); 187 } 188 }); 189}; 190 191$(window).on("load", function () { 192 // Get cookie function 193 if ($(".lgpd-alert").length > 0) { 194 var getCookie = function getCookie(cname) { 195 var name = cname + "="; 196 var decodedCookie = decodeURIComponent(document.cookie); 197 // console.log(decodedCookie); 198 var ca = decodedCookie.split(";"); 199 for (var i = 0; i < ca.length; i++) { 200 var c = ca[i]; 201 while (c.charAt(0) == " ") { 202 c = c.substring(1); 203 } 204 if (c.indexOf(name) == 0) { 205 return c.substring(name.length, c.length); 206 } 207 } 208 return ""; 209 }; 210 211 var defer = function defer(method) { 212 if (window.jQuery) { 213 method(); 214 } else { 215 setTimeout(function () { 216 defer(method); 217 }, 50); 218 } 219 }; 220 //wati for jquery 221 222 223 defer(function () { 224 // call getCokkie function and set into exists variable 225 var exists = getCookie("azureembalagensLGPDCookie"); 226 227 // check if cookie is active 228 if (exists != "true") { 229 jQuery("body").addClass("show-lgpd-alert"); 230 231 jQuery(".lgpd-alert__close").on("click", function (e) { 232 if (e.target === e.currentTarget) { 233 jQuery("body").removeClass("show-lgpd-alert"); 234 window.sessionStorage.setItem("azureembalagensLGPDCookie", 1); 235 document.cookie = "azureembalagensLGPDCookie=true"; 236 } 237 }); 238 } 239 }); 240 } 241}); 242 243//------------------------------------------ Carousel 244var carousel = function carousel() { 245 $(document).ready(function () { 246 if ($(".ruler__wrapper").length > 0) { 247 $(".ruler__wrapper").slick({ 248 arrows: false, 249 slidesToShow: 6, 250 autoplay: true, 251 autoplaySpeed: 2000, 252 responsive: [{ 253 breakpoint: 1660, 254 settings: { 255 slidesToShow: 5, 256 slidesToScroll: 1 257 }, 258 }, { 259 breakpoint: 1300, 260 settings: { 261 slidesToShow: 4, 262 slidesToScroll: 1 263 }, 264 }, { 265 breakpoint: 1100, 266 settings: { 267 slidesToShow: 3, 268 slidesToScroll: 1 269 } 270 }, { 271 breakpoint: 575, 272 settings: { 273 slidesToShow: 1, 274 slidesToScroll: 1 275 } 276 }] 277 }); 278 } 279 }); 280 281 if ($(".fullbanner > div").length > 0) { 282 $(".fullbanner > div").slick({ 283 arrows: false, 284 slidesToShow: 1, 285 slidesToScroll: 1, 286 dots: true, 287 autoplay: true, 288 autoplaySpeed: 3000, 289 responsive: [{ 290 breakpoint: 991, 291 settings: { 292 dots: false 293 } 294 }] 295 }); 296 } 297 298 if ($(".bannerquemsomos > div").length > 0) { 299 $(".bannerquemsomos > div").slick({ 300 arrows: false, 301 slidesToShow: 1, 302 slidesToScroll: 1, 303 dots: true, 304 autoplay: true, 305 autoplaySpeed: 3000 306 }); 307 } 308 309 if ($(".minibanners-centro-lower__wrapper").length > 0) { 310 $(".minibanners-centro-lower__wrapper").slick({ 311 arrows: true, 312 slidesToShow: 3, 313 slidesToScroll: 1, 314 autoplay: false, 315 infinite: false, 316 dots: false, 317 responsive: [{ 318 breakpoint: 1200, 319 settings: { 320 slidesToShow: 2, 321 slidesToScroll: 1, 322 dots: true,
323 arrows: false 324 } 325 }, { 326 breakpoint: 595, 327 settings: { 328 slidesToShow: 1, 329 slidesToScroll: 1, 330 dots: false, 331 arrows: false, 332 autoplay: true, 333 } 334 }] 335 }); 336 } 337 338 if ($(".minibanners-rodape").length > 0) { 339 if (window.innerWidth < 991) { 340 $(".minibanners-rodape").slick({ 341 autoplay: false, 342 infinite: false, 343 slidesToShow: 2, 344 slidesToScroll: 2, 345 dots: true, 346 arrows: false, 347 responsive: [{ 348 breakpoint: 680, 349 settings: { 350 slidesToShow: 1, 351 slidesToScroll: 1, 352 dots: false, 353 autoplay: true, 354 } 355 }] 356 }); 357 } 358 } 359 360 if ($(".minibanners-rodape").length > 0) { 361 if (window.innerWidth >= 991) { 362 $(".minibanners-rodape").slick({ 363 rows: 2, 364 arrows: true, 365 slidesToShow: 4, 366 slidesToScroll: 1, 367 autoplay: false, 368 infinite: false, 369 dots: false 370 }); 371 } 372 } 373 374 if ($(".brands__list").length > 0) { 375 $(".brands__list").slick({ 376 arrows: true, 377 slidesToShow: 6, 378 slidesToScroll: 1, 379 autoplay: true, 380 autoplaySpeed: 3000, 381 responsive: [{ 382 breakpoint: 991, 383 settings: { 384 slidesToShow: 3, 385 slidesToScroll: 1 386 } 387 }] 388 }); 389 } 390 if (window.innerWidth < 1270) { 391 $(document).ready(function () { 392 $(".ruler-footer__wrapper").slick({ 393 arrows: false, 394 slidesToShow: 3, 395 autoplay: true, 396 autoplaySpeed: 2000 397 }); 398 }); 399 } 400 401 if (jQuery(window).width() < 992) { 402 if ($(".minibanners-rodape__wrapper").length > 0) { 403 $(".minibanners-rodape__wrapper").slick({ 404 arrows: false, 405 slidesToShow: 1, 406 slidesToScroll: 1, 407 autoplay: true, 408 autoplaySpeed: 3000 409 }); 410 } 411 if ($(".quem-somos__banner-rodape").length > 0) { 412 $(".quem-somos__banner-rodape").slick({ 413 arrows: false, 414 slidesToShow: 1, 415 slidesToScroll: 1, 416 autoplay: true, 417 autoplaySpeed: 2000 418 }); 419 } 420 } 421 if ($(".categories__list").length > 0) { 422 $(".categories__list").slick({ 423 arrows: true, 424 slidesToShow: 8, 425 slidesToScroll: 8, 426 autoplay: true, 427 autoplaySpeed: 3000, 428 responsive: [{ 429 breakpoint: 991, 430 settings: { 431 slidesToShow: 4, 432 slidesToScroll: 4 433 } 434 }, { 435 breakpoint: 900, 436 settings: { 437 slidesToShow: 3, 438 slidesToScroll: 3 439 } 440 }, { 441 breakpoint: 700, 442 settings: { 443 slidesToShow: 2, 444 slidesToScroll: 3 445 } 446 }, { 447 breakpoint: 500, 448 settings: { 449 slidesToShow: 1, 450 slidesToScroll: 1 451 } 452 }] 453 }); 454 } 455 456 if ($(".produtos-semelhantes #produtos-relacionados ul li").length > 0) { 457 $("#produtos-relacionados ul").slick({ 458 infinite: false, 459 slidesToShow: 3, 460 slidesToScroll: 3, 461 responsive: [{ 462 breakpoint: 991, 463 settings: { 464 slidesToShow: 2, 465 slidesToScroll: 2, 466 dots: true, 467 arrows: false 468 } 469 }] 470 }); 471 } 472 473 // if ($(".produtos-relacionados #produtos-relacionados ul li").length > 0) { 474 // $("#produtos-relacionados ul").slick({ 475 // dots: false, 476 // infinite: false, 477 // speed: "300", 478 // arrows: true, 479 // slidesToShow: 2, 480 // slidesToScroll: 4, 481 // lazyLoad: "ondemand", 482 // responsive: [ 483 // { 484 // breakpoint: 1920, 485 // settings: { 486 // slidesToShow: 4, 487 // slidesToScroll: 4, 488 // }, 489 // }, 490 // { 491 // breakpoint: 1300, 492 // settings: { 493 // slidesToShow: 4, 494 // slidesToScroll: 4, 495 // }, 496 // }, 497 // { 498 // breakpoint: 680, 499 // settings: { 500 // slidesToShow: 3, 501 // slidesToScroll: 3, 502 // }, 503 // }, 504 // { 505 // breakpoint: 530, 506 // settings: { 507 // slidesToShow: 1, 508 // slidesToScroll: 1, 509 // }, 510 // }, 511 // ], 512 // }); 513 // } 514 515 if ($(".detalhe-produto-itens #galeria").length > 0) { 516 $(".detalhe-produto-itens #galeria").slick({ 517 arrows: true, 518 dots: false, 519 slidesToShow: 4, 520 vertical: true, 521 infinite: false, 522 responsive: [{ 523 breakpoint: 991, 524 settings: { 525 slidesToShow: 3, 526 vertical: false 527 } 528 }] 529 }); 530 } 531}; 532//------------------------------------------ Lista 533var montarLista = function montarLista() { 534 $(document).ajaxComplete(function (evt, xhr, settings) { 535 if (settings.url.indexOf("CalculaPrecosQuantidade")) { 536 $(".fbits-componente-listacompra-preco-de").html($(".fbits-componente-listacompra-preco-de").text().replace("De ", "")).addClass("show"); 537 $(".fbits-componente-listacompra-preco-por").html($(".fbits-componente-listacompra-preco-por").text().replace("Por ", "")).addClass("show"); 538 } 539 });
540 // if (jQuery(window).width() < 992) { 541 // if ($('.descricao__produto').length > 0) { 542 // $('.descricao__produto > *:not(h2:first-child)').wrapAll("<div></div>") 543 // $('.descricao__produto h2:first-child').on("click", function () { 544 // $(this).toggleClass("open") 545 // $(this).next().slideToggle() 546 // }) 547 // } 548 // } 549 550 $(".fbits-layout-listacompra").remove(); 551}; 552 553//------------------------------------------ Produto 554var montarProduto = function montarProduto() { 555 $("#imagem-pagina-produto").on("click", ".slick-prev", function () { 556 if ($("#galeria .active").parent().prev().length) { 557 $("#galeria .active").parent().prev().find(">a").click(); 558 } 559 }); 560 $("#imagem-pagina-produto").on("click", ".slick-next", function () { 561 if ($("#galeria .active").parent().next().length) { 562 $("#galeria .active").parent().next().find(">a").click(); 563 } 564 }); 565 $("#imagem-pagina-produto").on("click", ".fake-prev", function () { 566 if ($("#galeria .active").parent().prev().length) { 567 $("#galeria .active").parent().prev().find(">a").click(); 568 } 569 }); 570 $("#imagem-pagina-produto").on("click", ".fake-next", function () { 571 if ($("#galeria .active").parent().next().length) { 572 $("#galeria .active").parent().next().find(">a").click(); 573 } 574 }); 575 576 //Arrumar posição do nome no compre junto 577 if ($("#divGruposProdutoCompreJunto").length > 0) { 578 $("#precoCompreJuntoPorProduto").each(function () { 579 $(this).find("#divFormaPagamento .precoTitle").remove(); 580 $(this).find("#divFormaPagamento").prepend("<div class='precoTitle'>COMPRE OS <strong>2 ITENS</strong></div>"); 581 }); 582 $(".product__comprejunto").show(); 583 } 584 585 //Descricao produto em cascata 586 var infos = $(".produto__info"); 587 var infoContent = $(".produto__info-content"); 588 589 if (infos.length && infoContent.length) { 590 var titles = $(".ui-slider-tabs-list a", infos); 591 var tabs = []; 592 593 titles.each(function () { 594 var id = $(this).attr("href"); 595 var title = $(this).html().replace("h3", "h2"); 596 var content = $(id).html(); 597 598 tabs.push({ 599 title: title, 600 content: content 601 }); 602 }); 603 604 if (tabs.length) {
605 tabs.forEach(function (tab, index) { 606 var isFirstTab = index === 0; 607 var tabContent = "<div class=\"tabs__content " + (isFirstTab ? "first-tab" : "") + "\">\n <div class=\"tabs__content-title\"></div>" + tab.title + tab.content + "\n </div>"; 608 infoContent.append(tabContent); 609 }); 610 $(".tabs__content-title").addClass("open"); 611 } 612 } 613 614 $(".fbits-layout-produto").remove(); 615 616 function productQty(parent) { 617 parent.on("click", "#maisQtd", function (i) { 618 var qtd = $(this).closest(".clear").find(".qtdProduto"); 619 var valor = parseInt(qtd.val()) + 1; 620 qtd.val(valor); 621 }); 622 parent.on("click", "#menosQtd", function () { 623 var qtd = $(this).closest(".clear").find(".qtdProduto"); 624 var valor = parseInt(qtd.val()) - 1; 625 if (valor <= 0) { 626 valor = 0; 627 } else { 628 qtd.val(valor); 629 } 630 }); 631 632 $(parent.find(".qtdProduto")).keyup(function (e) { 633 validar(this, "num"); 634 if ($(this).val() <= 0) { 635 $(this).val(1); 636 } 637 }); 638 } 639 640 function validar(dom, tipo) { 641 switch (tipo) { 642 case "num": 643 var regex = /[A-Za-z]/g; 644 break; 645 case "text": 646 var regex = /\d/g; 647 break; 648 } 649 dom.value = dom.value.replace(regex, ""); 650 } 651 652 productQty($('[id*="produto-variante"]')); 653 654 var $el = $(".product--item"); 655 var offset = $el.position().top + $el.outerHeight(true) - 400; 656 if (jQuery(window).width() < 992) { 657 offset = $el.position().top + $el.outerHeight(true) - 200; 658 } 659 660 jQuery(window).scroll(function () { 661 var currentScroll = jQuery(window).scrollTop(); 662 if (currentScroll > offset) { 663 jQuery("body").addClass("show-floating"); 664 } else { 665 jQuery("body").removeClass("show-floating"); 666 } 667 }); 668 669 $(".product-floating__button").on("click", function () { 670 $(window).scrollTop($(".product--item-container").offset().top - 20); 671 $(".bt.comprarProduto.btn-comprar").click(); 672 }); 673}; 674 675$(document).ready(function () { 676 setTimeout(function () { 677 if (typeof Fbits.Usuario !== "undefined") { 678 if (Fbits.Usuario.IsAuthenticated) { 679 $(".header__customer--auth").show(); 680 $(".header__customer--links").append("<span>Ol\xE1, <strong>" + Fbits.Usuario.Nome.split(" ")[0] + "!</strong></span>"); 681 $(".loginHead").show(); 682 683 $('.header__customer a').attr('href', 'https://checkout.livrariamegafauna.com.br/MinhaConta'); 684 } else { 685 $(".header__customer--not-auth").show(); 686 $(".loginHead").show(); 687 } 688 } 689 }, 200); 690 691 jQuery(".header__search--open").on("click", function () { 692 $(".header__search").addClass("search-open"); 693 }); 694 jQuery(".header__search--close").on("click", function () { 695 $(".header__search").removeClass("search-open"); 696 }); 697 698 if (jQuery(".fbits-categoria .spots-interna.showcase__one").children().length == 0) { 699 var whatsLink = $('a[title="Whatsapp"]').attr("href"); 700 jQuery(".fbits-categoria .spots-interna.showcase__one").append("\n <span class=\"showcase__empty\" >\n <strong>N\xE3o encontrou o que procurava?</strong>\n VERIFIQUE O TERMO BUSCADO OU UTILIZE O MENU DE CATEGORIAS PARA ENCONTRAR O SEU PRODUTO!\n </span>\n "); 701 702 // busca de filtro da home vazia 703 if (window.location.href.indexOf("busca?busca=&") > -1) { 704 $(".busca .topo-categoria").addClass("empty"); 705 } 706 // categoria vazia 707 else { 708 $(".fbits-categoria .button__filter").hide(); 709 } 710 } 711 712 if (jQuery(".fbits-categoria").length) { 713 // Botao limpar filtro 714 var cleanUrl = window.location.href; 715 if ($(".fbits-categoria.busca").length) { 716 cleanUrl = cleanUrl.split("&")[0]; 717 } else { 718 cleanUrl = cleanUrl.split("?")[0]; 719 } 720 721 $(".filtros.filtro-lateral-categoria > ul").append("\n <a class=\"clear-filter\" href=\"" + cleanUrl + "\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\">\n <path id=\"Path_23054\" data-name=\"Path 23054\" d=\"M60.916,51.531a1.04,1.04,0,0,0-1.471,
7210l-3.224,3.225L53,51.531A1.04,1.04,0,1,0,51.526,53l3.224,3.225-3.225,3.225A1.04,1.04,0,1,0,53,60.922L56.221,57.7l3.224,3.225a1.04,1.04,0,1,0,1.471-1.471l-3.225-3.225L60.916,53A1.04,1.04,0,0,0,60.916,51.531Z\" transform=\"translate(-51.221 -51.226)\"/>\n </svg>\n Limpar Filtros\n </a>\n "); 722 723 // Abre fecha filtro 724 $(".fbits-filtro-titulo-pai").on("click", function () { 725 $(this).parent().toggleClass("open"); 726 $(this).next().slideToggle(); 727 }); 728 } 729 730 // Global 731 montarGlobal(); 732 733 if ($("body#bodyProduto, body#bodyListaCompra").length) { 734 //montarLista 735 montarLista(); 736 737 //montarProduto 738 montarProduto(); 739 740 $(document).ajaxComplete(function (evt, xhr, settings) { 741 function montarInput() { 742 if (!$(".montou__input").length) { 743 $(".product__details-variant select#item-quantidade-1").hide().before("<span id='menosQtd'>-</span><input id='item-quantidade-1' value='1' type='text' min='1' max='999' class='qtdProduto'/><span id='maisQtd'>+</span>"); 744 $(".product__details-variant select#item-quantidade-2").hide().before("<span id='menosQtd'>-</span><input id='item-quantidade-1' value='1' type='text' min='1' max='999' class='qtdProduto'/><span id='maisQtd'>+</span>"); 745 $(".product__details-variant select#item-quantidade-1, select#item-quantidade-2").addClass("montou__input"); 746 } 747 } 748 749 montarInput(); 750 751 $(".product__details-variant .optionAtributos").on("click", ".valorAtributo", function () { 752 if ($(".montou__input").length) { 753 $(".montou__input").removeClass("montou__input"); 754 } 755 setTimeout(function () { 756 montarInput(); 757 }, 500); 758 }); 759 760 $("#precoCompreJuntoPorProduto").each(function () { 761 $(this).find("#divFormaPagamento .precoTitle").remove(); 762 $(this).find("#divFormaPagamento").prepend("<div class='precoTitle'>COMPRE OS <strong>2 ITENS</strong></div>"); 763 }); 764 }); 765 } 766 767 //carousel 768 carousel(); 769 770 // jQuery("#formIndica #txtEmailIndicado").attr("placeholder", "E-mail de um amigo"); 771 // jQuery("#formIndica #txtEmailIndicado").attr("value", ""); 772 // jQuery("#formIndica #txtEmailIndicado").attr("onfocus", ""); 773 // jQuery("#formIndica #txtEmailIndicado").attr("onblur", ""); 774 775 // jQuery("#formIndica #txtNomeIndicado").attr("placeholder", "Nome de um amigo"); 776 // jQuery("#formIndica #txtNomeIndicado").attr("value", ""); 777 // jQuery("#formIndica #txtNomeIndicado").attr("onfocus", ""); 778 // jQuery("#formIndica #txtNomeIndicado").attr("onblur", ""); 779 780 // jQuery("#formIndica #txtEmailIndicador").attr("placeholder", "Meu E-mail"); 781 // jQuery("#formIndica #txtEmailIndicador").attr("value", ""); 782 // jQuery("#formIndica #txtEmailIndicador").attr("onfocus", ""); 783 // jQuery("#formIndica #txtEmailIndicador").attr("onblur", ""); 784 785 // jQuery("#formIndica #txtNomeIndicador").attr("placeholder", "Meu Nome"); 786 // jQuery("#formIndica #txtNomeIndicador").attr("value", ""); 787 // jQuery("#formIndica #txtNomeIndicador").attr("onfocus", ""); 788 // jQuery("#formIndica #txtNomeIndicador").attr("onblur", ""); 789 790 // jQuery("#formIndica #txtMensagem").attr("placeholder", "Comentários"); 791 // jQuery("#formIndica #txtMensagem").attr("value", ""); 792 // jQuery("#formIndica #txtMensagem").attr("onfocus", ""); 793 // jQuery("#formIndica #txtMensagem").attr("onblur", ""); 794 795 // jQuery("#formAvaliacao #txtAvaliacaoNome").attr("placeholder", "Meu nome"); 796 // jQuery("#formAvaliacao #txtAvaliacaoNome").attr("value", ""); 797 // jQuery("#formAvaliacao #txtAvaliacaoNome").attr("onfocus", ""); 798 // jQuery("#formAvaliacao #txtAvaliacaoNome").attr("onblur", ""); 799 800 // jQuery("#formAvaliacao #txtAvaliacaoEmail").attr("placeholder", "Meu email"); 801 // jQuery("#formAvaliacao #txtAvaliacaoEmail").attr("value", ""); 802 // jQuery("#formAvaliacao #txtAvaliacaoEmail").attr("onfocus", ""); 803 // jQuery("#formAvaliacao #txtAvaliacaoEmail").attr("onblur", ""); 804 805 // jQuery("#formAvaliacao #txtAvaliacaoDescricao").attr("placeholder", "Comentários"); 806 // jQuery("#formAvaliacao #txtAvaliacaoDescricao").attr("value", ""); 807 // jQuery("#formAvaliacao #txtAvaliacaoDescricao").attr("onfocus", ""); 808 // jQuery("#formAvaliacao #txtAvaliacaoDescricao").attr("onblur", ""); 809 810 jQuery("#txtCEP").attr("placeholder", "Digite o CEP de entrega"); 811 jQuery(".btnCalculaFreteProduto").val("Calcular"); 812 jQuery("#filter-search").attr("placeholder", "Digite o nome do autor"); 813 jQuery("#inputCupom").attr("placeholder", "Cupom de Desconto"); 814 jQuery(".fbits-responsive-carrinho-desconto-input").attr("placeholder", "Cupom de Desconto"); 815 816 jQuery("#txtCalculaFreteProduto").attr("placeholder", "CEP"); 817 818 $(".fbits-calculafrete").show(); 819 820 //muda o botão wishlist de lugar 821 // $(".spot").each(function () { 822 // let spotTitle = $(this).find(".spot__title") 823 // $(this).find(".addListaDesejos").appendTo(spotTitle) 824 // }) 825 826 jQuery(".button__filter").on("click", function () { 827 jQuery("body").addClass("on__fiter-category"); 828 }); 829 830 $(".fbits-filtro-close, .fbits-lateral-categoria").click(function (e) { 831 if (e.target == e.currentTarget) { 832 $("body").removeClass("on__fiter-category"); 833 } 834 }); 835 836 $(document).ajaxComplete(function (event, xhr, settings) { 837 if (settings.url.indexOf("ProdutoModal") >= 0 || settings.url.indexOf("AtualizarProduto")) { 838 // montamedida(); 839 if ($(".modalAdicionar").length > 0) { 840 // Select the node that will be observed for mutations 841 var targetNode = document.querySelector(".modalAdicionar"); 842 843 // Options for the observer (which mutations to observe) 844 var config = { attributes: true, childList: true, subtree: true }; 845 846 // Callback function to execute when mutations are observed 847 var callback = function callback(mutationsList, observer) { 848 $(".modalAdicionar .fbits-componente-imagemvariantethumb .jcarousel").removeClass("jcarou
848sel"); 849 if ($(".modalAdicionar .fbits-componente-imagemvariantethumb #galeria").length > 0) { 850 $(".modalAdicionar .fbits-componente-imagemvariantethumb #galeria").not(".slick-initialized").slick({ 851 arrows: true, 852 dots: false, 853 slidesToShow: 4, 854 mobileFirst: true, 855 useTransform: false, 856 vertical: true, 857 infinite: false 858 }); 859 } 860 }; 861 862 // Create an observer instance linked to the callback function 863 var observer = new MutationObserver(callback); 864 865 // Start observing the target node for configured mutations 866 observer.observe(targetNode, config); 867 } 868 869 if ($(".product--item").length > 0) { 870 $(".product--item .fbits-componente-imagemvariantethumb .jcarousel").removeClass("jcarousel"); 871 $(".product--item #galeria").not(".slick-initialized").slick({ 872 arrows: true, 873 dots: false, 874 slidesToShow: 4, 875 vertical: true, 876 infinite: false, 877 responsive: [{ 878 breakpoint: 991, 879 settings: { 880 slidesToShow: 3, 881 vertical: false 882 } 883 }] 884 }); 885 if ($(".product--item #galeria .active").length == 0) { 886 $(".fbits-produto-imagensMinicarrossel-item:first-child > a").addClass("active"); 887 } 888 $(".product--item .fbits-componente-imagem").find(".fake-prev, .fake-next").remove(); 889 $(".product--item .fbits-componente-imagem").append('<button class="fake-prev"></button><button class="fake-next"></button>'); 890 } 891 892 if ($(".modalAdicionar #menosQtd").length == 0) { 893 var productQty = function productQty(parent) { 894 parent.on("click", "#maisQtd", function (i) { 895 var qtd = $(this).closest(".clear").find(".qtdProduto"); 896 var valor = parseInt(qtd.val()) + 1; 897 qtd.val(valor); 898 }); 899 parent.on("click", "#menosQtd", function () { 900 var qtd = $(this).closest(".clear").find(".qtdProduto"); 901 var valor = parseInt(qtd.val()) - 1; 902 if (valor <= 0) { 903 valor = 0; 904 } else { 905 qtd.val(valor); 906 } 907 }); 908 909 $(parent.find(".qtdProduto")).keyup(function (e) { 910 validar(this, "num"); 911 if ($(this).val() <= 0) { 912 $(this).val(1); 913 } 914 }); 915 }; 916 917 var validar = function validar(dom, tipo) { 918 switch (tipo) { 919 case "num": 920 var regex = /[A-Za-z]/g; 921 break; 922 case "text": 923 var regex = /\d/g; 924 break; 925 } 926 dom.value = dom.value.replace(regex, ""); 927 }; 928 929 $(".produtoInfo select#item-quantidade-1").hide().before("<span id='menosQtd'>-</span><input id='item-quantidade-1' value='1' type='text' min='1' max='999' class='qtdProduto'/><span id='maisQtd'>+</span>"); 930 931 productQty($('.produtoInfo.coluna2 [id*="view-item-quantidade-0-normal"]')); 932 } 933 } 934 }); 935}); 936 937$('#produtos-relacionados').removeClass('jsCarrousel'); 938$('.produtos-relacionados #produtos-relacionados').removeClass('jsCarrousel'); 939$('.fbits-produto-imagens > div').removeClass('jcarousel'); 940 941$(document).on("click", "#bodyProduto .resultado-frete", function (evt) { 942 $(evt.currentTarget).hide(); 943}); 944 945$(document).ajaxComplete(function (event, xhr, settings) { 946 jQuery("#modal-Nome").attr("placeholder", "seu nome"); 947 jQuery("#modal-Email").attr("placeholder", "seu e-mail"); 948}); 949 950var popupEntrada = "\n<h4 class=\"popUp-News__title\">\n RECEBA NOSSAS NOVIDADES\n</h4>\n\n"; 951 952$(document).ajaxComplete(function () { 953 if (jQuery("#popUp-News-Fundo").length > 0) { 954 jQuery("body").addClass("lightbox-entrada"); 955 $(".popUp-News__title, .popUp-News__text").remove(); 956 $("#popUp-News").prepend(popupEntrada); 957 } 958 959 $(document).bind("exitintent", function () { 960 jQuery("body").removeClass("lightbox-entrada"); 961 jQuery("body").addClass("lightbox-saida"); 962 963 jQuery(".bt.adicionar").on("click", function () { 964 jQuery("body").removeClass("lightbox-saida"); 965 }); 966 }); 967 968 jQuery("#fancybox-close, #fancybox-overlay").on("click", function () { 969 setTimeout(function () { 970 jQuery("body").removeClass("lightbox-entrada"); 971 jQuery("body").removeClass("lightbox-saida"); 972 }, 300); 973 }); 974 975 setTimeout(function () { 976 if ($(".modalAdicionar .fbits-componente-imagemvariantethumb #galer
976ia").length > 0) { 977 $(".modalAdicionar .fbits-componente-imagemvariantethumb #galeria").slick("unslick"); 978 $(".modalAdicionar .fbits-componente-imagemvariantethumb #galeria").not(".slick-initialized").slick({ 979 arrows: true, 980 dots: false, 981 slidesToShow: 4, 982 mobileFirst: true, 983 useTransform: false, 984 vertical: true, 985 infinite: false 986 }); 987 } 988 }, 1000); 989}); 990 991$(document).ready(function () { 992 $.each($(".minibanners-rodape a img[title]"), function (indexInArray, valueOfElement) { 993 var title = $(this).attr("title"); 994 995 if (title != "") { 996 var url = "https://recursos.livrariamegafauna.com.br/MediaCenter/" + title + "_texto.png"; 997 $(this).parent().append("<img class=\"minibanners-before\" src=\"" + url + "\" />"); 998 } 999 }); 1000}); 1001 1002$(document).ready(function () { 1003 if ($("#bodyProduto .product__details-topo").length) { 1004 if (window.innerWidth < 992) { 1005 var divParaMover = $("#fbits-avaliacao"); 1006 1007 divParaMover.insertAfter(".product__autor"); 1008 } 1009 } 1010}); 1011 1012$(document).ready(function () { 1013 if ($("#bodyListaCompra .product__details-topo").length) { 1014 if (window.innerWidth < 992) { 1015 var divParaMover = $(".fbits-avaliacao"); 1016 divParaMover.insertAfter(".product__name"); 1017 1018 $(".listacompra-comprarselecionados").insertAfter(".product__price"); 1019 } 1020 } 1021}); 1022 1023$(document).ready(function () { 1024 if ($("#bodyProduto .descricao__produto").length) { 1025 $(".tabs__content").each(function () { 1026 var divElement = $(this).find(".titleBox"); 1027 1028 if ($.trim(divElement.html()) === "") { 1029 divElement.addClass("empty"); 1030 } 1031 }); 1032 } 1033}); 1034 1035$(document).ready(function () { 1036 if (".header .header__wrapper") { 1037 if (window.innerWidth < 991) { 1038 var minicart = $(".header__minicart"); 1039 var search = $(".header__search"); 1040 1041 minicart.appendTo(".header__left"); 1042 search.appendTo(".header__left"); 1043 1044 // Fazer a busca abrir quando clica 1045 1046 1047 $(".headerSearch ").click(function () { 1048 if ($(".inputSearch").width() === 0) { 1049 $(".inputSearch").animate({ width: "260px" }, 500).focus(); 1050 } 1051 }); 1052 1053 $(".inputSearch").blur(function () { 1054 if ($(this).val() === "") { 1055 $(this).animate({ width: "0" }, 500); 1056 } 1057 }); 1058 1059 $(document).click(function (event) { 1060 if (!$(event.target).closest("#searchFormHeader").length) { 1061 $(".inputSearch").animate({ width: "0" }, 500); 1062 } 1063 }); 1064 } 1065 } 1066}); 1067 1068//accordion de avaliar produto 1069$(document).ready(function () { 1070 if ("#bodyProduto .product__avaliar-produto") { 1071 $(".line").click(function () { 1072 var contentContainer = $(this).next(".fbits-indique-avalie"); 1073 1074 contentContainer.slideToggle(); 1075 contentContainer.next().slideToggle(); 1076 }); 1077 } 1078}); 1079 1080//accordion de opinioes sobre o produto 1081$(document).ready(function () { 1082 if ("#bodyProduto .product__opnioes") { 1083 $(".divOpinioes").click(function () { 1084 var contentContainer = $(this).next(".opinioesConteudo"); 1085 1086 contentContainer.slideToggle(); 1087 contentContainer.next().slideToggle(); 1088 }); 1089 } 1090}); 1091 1092//Ler mais do produto 1093$(document).ready(function () { 1094 var lerMaisBotao = $('.produto__info-content .paddingbox span'); 1095 1096 lerMaisBotao.on('click', function () { 1097 $('.produto__info-content #texto-expandido').toggle(); 1098 $(this).text(function (i, text) { 1099 return text === "Ler Mais" ? "Ler Menos" : "Ler Mais"; 1100 }); 1101 }); 1102}); 1103 1104// Formas de pagamento 1105$(document).ready(function () { 1106 if ($(".formas-pagamento").length) { 1107 $(".formas-pagamento .ver-mais").click(function () { 1108 var contentContainer = $(this).siblings(".parcelamentos"); 1109 1110 contentContainer.slideToggle(); 1111 }); 1112 } 1113}); 1114 1115// Paginacao svg 1116$(document).ready(function () { 1117 $('.fbits-paginacao ul li a').each(function () { 1118 if ($(this).text() === '<') { 1119 $(this).html('<svg xmlns="http://www.w3.org/2000/svg" width="15.03" height="44.642" viewBox="0 0 15.03 44.642"><path id="Caminho_23354" data-name="Caminho 23354" d="M0,0,12.074,22.321,0,44.642H3.2L15.03,22.321,3.2,0Z" transform="translate(15.03 44.642) rotate(180)" fill="#b74c2d"/></svg>'); 1120 $(this).parent('li').addClass('seta'); 1121 } else if ($(this).text() === '>') { 1122 $(this).html('<svg xmlns="http://www.w3.org/2000/svg" width="15.03" height="44.642" viewBox="0 0 15.03 44.642">
1122<path id="Caminho_23353" data-name="Caminho 23353" d="M0,0,8.4,15.539l3.669,6.782L0,44.642H3.2L15.03,22.321,3.2,0Z" fill="#b74c2d"/></svg>'); 1123 $(this).parent('li').addClass('seta'); 1124 } 1125 }); 1126}); 1127 1128/***/ }), 1129/* 2 */ 1130/***/ (function(module, exports, __webpack_require__) { 1131 1132"use strict"; 1133 1134 1135$(document).ready(function () { 1136 var lis = $("li.menu-geral, li.menu-geral-filho"); 1137 $(lis).each(function () { 1138 if ($(this).children("ul").length) { 1139 $(this).addClass("has-child"); 1140 } 1141 }); 1142 1143 if (jQuery(window).width() < 992) { 1144 $('.has-child').click(function (e) { 1145 e.stopPropagation(); 1146 $(this).toggleClass("showdropdown"); 1147 $(this).children('ul.filho').slideToggle(); 1148 }); 1149 } 1150 1151 if (jQuery(window).width() > 991) { 1152 $('.menu >li').each(function () { 1153 var $this = $(this); 1154 if ($(this).find('>ul').length) { 1155 $(this).find('>ul').wrap("<div class='menu__dropdown'></div>"); 1156 if (!$(this).hasClass("menu-all")) { 1157 $(this).find('.menu__dropdown').wrapInner("<div class='menu__dropdown--container container-fluid'></div>"); 1158 } 1159 if ($this.hasClass("menu-all") && window.innerWidth > 991) { 1160 $(this).find('.menu__dropdown').wrap("<div class='menu__dropdown--all'></div>"); 1161 } 1162 } 1163 }); 1164 1165 //Verifica se cada uma das LI possuem banner cadastrado 1166 $('li.menu-geral:not(.all)').each(function () { 1167 1168 if ($(this).find('li.menu-imagem').length) { 1169 1170 //Adiciona uma div ao lado da "UL" no sub-nivel 1171 $(this).find('div.menu__dropdown--container').append('<div class="menu__image"></div>'); 1172 1173 //Verifica cada uma dos "a" 1174 $(this).find('li.menu-imagem > a').each(function () { 1175 $(this).parents('.menu__dropdown').find('.menu__image').append($(this)); 1176 }); 1177 1178 //Remove a "LI" de banner remanescente da "UL" do sub-nÃvel 1179 $(this).find('li.menu-imagem').remove(); 1180 } 1181 }); 1182 } 1183 1184 $.each($("li.item:not(.menu-all) div.menu__dropdown--container > ul.filho > li.item"), function (i, val) { 1185 var $this = $(this); 1186 var link = $(this).children("a").attr("href"); 1187 1188 $.each($(this).children("ul"), function (i, val) { 1189 if ($(this).children("li").length > 3) { 1190 $this.find("> ul.filho").append("<a class=\"menu-more\" href=\"" + link + "\">Ver mais</a>"); 1191 } 1192 }); 1193 }); 1194 1195 $.each($(".menu__dropdown--all > .menu__dropdown > ul.filho > li.item"), function (i, val) { 1196 var $this = $(this); 1197 1198 $(this).find(">ul.filho").wrap('<div class="menu__wrapper"></div>'); 1199 1200 $(this).find(".menu__wrapper").append($(this).find(">.menu__wrapper").find("li.menu-image")); 1201 }); 1202 1203 $.each($(".menu-all li.menu-geral-neto"), function () { 1204 var $this = $(this); 1205 var link = $(this).children("a").attr("href"); 1206 1207 $.each($(this).children("ul"), function (i, val) { 1208 if ($(this).children("li").length > 3) { 1209 $this.find("> ul.filho").append("<a class=\"menu-more\" href=\"" + link + "\">Ver mais</a>"); 1210 } 1211 }); 1212 }); 1213 1214 $("navbar.menu").addClass("loaded"); 1215}); 1216 1217/***/ }), 1218/* 3 */ 1219/***/ (function(module, exports, __webpack_require__) { 1220 1221"use strict"; 1222 1223 1224$(document).ready(function () { 1225 //cronometro 1226 var promodate = jQuery('#cronometro').attr('data-promotion'); 1227 var count = new Date(promodate).getTime(); 1228 var d = new Date().getTime(); 1229 1230 console.log(promodate); 1231 console.log(count); 1232 console.log(d); 1233 1234 if (count > d) { 1235 var second = 1000, 1236 minute = second * 60, 1237 hour = minute * 60, 1238 day = hour * 24; 1239 1240 jQuery('#cronometro .cron').append("<span class='days'></span><span class='hours'></span></span><span class='minutes'></span></span><span class='seconds'></span>"); 1241 var data = promodate; 1242 var falta = (new Date(data).getTime() - new Date().getTime()) / 1000; 1243 var segundos = Math.round(falta % 60); 1244 var minutos = Math.round(falta / 60 % 60); 1245 var horas = Math.round(falta / 60 / 60 % 24); 1246 var dias = Math.round(falta / 60 / 60 / 24); 1247 if (segundos == 0) { 1248 segundos = 60; 1249 minutos--; 1250 } 1251 if (minutos == 0) { 1252 minutos = 60; 1253 horas--; 1254 } 1255 if (horas == 0) { 1256 horas = 24; 1257 dias--; 1258 } 1259 segundos--; 1260 jQuery('#cronometro .cron .days').text(dias < 10 ? '0' + dias : dias); 1261 jQuery('#cronometro .cron .hours').text(horas < 10 ? '0' + horas : horas); 1262 jQuery('#cronometro .cron .minutes').text(minutos < 10 ? '0' + minutos : minutos); 1263 jQuery('#cronometro .cron .seconds').text(segundos < 10 ? '0' + segundos : segundos); 1264 1265 $('.showcase-cronometro').addClass('show'); 1266 1267 setInterval(function () { 1268 if (segundos == 0) { 1269 segundos = 60; 1270 minutos--; 1271 } 1272 if (minutos == 0) { 1273 minutos = 60; 1274 horas--; 1275 } 1276 if (horas == 0) { 1277 horas = 24; 1278 dias--; 1279 } 1280 segundos--; 1281 jQuery('#cronometro .cron .days').text(dias < 10 ? '0' + dias : dias); 1282 jQuery('#cronometro .cron .hours').text(horas < 10 ? '0' + horas : horas); 1283 jQuery('#cronometro .cron .minutes').text(minutos < 10 ? '0' + minutos : minutos); 1284 jQuery('#cronometro .cron .seconds').text(segundos < 10 ? '0' + segundos : segundos); 1285 }, 1000); 1286 } else { 1287 console.log("data expirada"); 1288 } 1289}); 1290 1291/***/ }), 1292/* 4 */ 1293/***/ (function(module, exports, __webpack_require__) { 1294 1295"use strict"; 1296 1297 1298$(document).ajaxComplete(function (event, xhr, settings) { 1299 // insere o valor 0 no minicart se estiver vazio 1300 if (jQuery('span.minicart-qtde-itens').text() == "") { 1301 jQuery('span.minicart-qtde-itens').text('0'); 1302 } 1303}); 1304 1305function freteGratis() { 1306 var totalFreeShipping = parseFloat(jQuery('.free-shipping').attr('data-shipping')); 1307 var valueCart = jQuery('.__valor-total-simulado-nao-atacado').length > 0 ? jQuery('.__valor-total-simulado-nao-atacado')[0].innerHTML : '0.00'; 1308 var valueCartNew = valueCart.replace('.', ''); 1309 var totalCart = parseFloat(valueCartNew.replace(',', '.')); 1310 if (totalCart < totalFreeShipping) { 1311 var lackingFreeShipping = totalFreeShipping - totalCart; 1312 var percentFreeShipping = totalCart * 100 / totalFreeShipping; 1313 1314 var htmlShipping = '\n <div class="shipping">\n <div class="shipping__content">
1314\n <span class="shipping__lacking-value">Faltam <strong>R$' + lackingFreeShipping.toFixed(2) + '</strong> para o frete gr\xE1tis</span>\n <div class="shipping__bar shipping__bar--almost"><span class="shipping__percentage" style=\'width:' + percentFreeShipping + '%\'></span></div>\n </div>\n </div>\n '; 1315 } else { 1316 var htmlShipping = '\n <div class="shipping">\n <div class="shipping__content">\n <span class="shipping__lacking-value">Frete gr\xE1tis atingido!</span>\n <div class="shipping__bar"><span class="shipping__percentage" style="width:100%;"></span></div>\n </div>\n </div>\n '; 1317 } 1318 1319 jQuery('.carrinho-cheio .shipping').remove(); 1320 jQuery('.minicart__main .shipping').remove(); 1321 jQuery('.minicart__main iframe').after(htmlShipping); 1322} 1323 1324$(document).ready(function () { 1325 1326 var n = $(".header__minicart"); 1327 1328 $("#minicart .closeCart").click(function (i) { 1329 i.preventDefault(), n.find(".minicart__mask").click(); 1330 }), $(document).on("click", ".header__minicart #fbits-resumo-carrinho, .topo-flutuante__cart", function (i) { 1331 i.preventDefault(), n.find(".minicart__main").prepend('<iframe src="https://checkout.livrariamegafauna.com.br/?minicart=true"></iframe>'), n.find("#minicart").addClass("active"), n.find(".minicart__mask").addClass("show"); 1332 $('body').addClass('on-cart'); 1333 freteGratis(); 1334 }); 1335 1336 n.find(".minicart__mask").on("click", function () { 1337 n.find("#minicart").removeClass("active"), n.find(".minicart__mask").removeClass("show"), atualizaResumo(), setTimeout(function () { 1338 n.find("#minicart iframe").remove(); 1339 }, 300); 1340 $('body').removeClass('on-cart'); 1341 }); 1342}); 1343 1344/***/ }), 1345/* 5 */ 1346/***/ (function(module, exports, __webpack_require__) { 1347 1348"use strict"; 1349 1350 1351if (".filtro-lateral-categoria") { 1352 $(".filtro-lateral-categoria .fbits-filtro-pai .Autor").prepend("<input id=\"filter-search\" type='text' /> "); 1353 1354 // Obtenha o elemento de busca 1355 var searchInput = $("#filter-search"); 1356 1357 // Armazene elementos de nome em um objeto semelhante a um array 1358 var namesFromDOM = $(".Autor .fbits-filtro-filho-item .componente-filtro"); 1359 1360 // Ocultar a lista no inÃcio 1361 $(".fbits-filtro-filho-item").hide(); 1362 1363 // Ouça os eventos do usuário 1364 searchInput.on("keyup", function (event) { 1365 var value = event.target.value.toLowerCase(); 1366 namesFromDOM.each(function () { 1367 var nameElement = $(this); 1368 var name = nameElement.text().toLowerCase(); 1369 1370 if (name.includes(value)) { 1371 nameElement.closest('.fbits-filtro-filho-item').show(); 1372 } else { 1373 nameElement.closest('.fbits-filtro-filho-item').hide(); 1374 } 1375 }); 1376 1377 // Verificar se o campo de busca está vazio e ocultar a lista se estiver 1378 if (value === "") { 1379 $(".fbits-filtro-filho-item").hide(); 1380 } 1381 }); 1382} 1383 1384/***/ }), 1385/* 6 */ 1386/***/ (function(module, exports, __webpack_require__) { 1387 1388"use strict"; 1389 1390 1391var perguntas_frequentes_item = document.querySelectorAll(".perguntas_frequentes_item"); 1392 1393if (perguntas_frequentes_item) { 1394 perguntas_frequentes_item.forEach(function (item) { 1395 var title = item.querySelector(".perguntas_frequentes_title"); 1396 1397 var text = item.querySelector(".perguntas_frequentes_text"); 1398 1399 title.addEventListener("click", function () { 1400 title.classList.toggle("active"); 1401 text.classList.toggle("active"); 1402 }); 1403 }); 1404} 1405 1406/***/ }) 1407/******/ ]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.