1jQuery(document).ready(function($) { 2 'use strict'; 3 4 handleCoverBgImage($); 5 logoInTheMiddle($); 6 handleBgColor($); 7 setTransitionForCreativeTopItems($, 0); 8 handleHmbMenu($); 9 handleQuotes($); 10 runMasonryGallery($); 11 runMasonryBlog($); 12 runMasonryBlog($); 13 stickyMenu($); 14 hiddenIcons($); 15 backToTop($); 16 clickOnSearchIcon($); 17 handleMobile($); 18 handleVideoImageContainer($); 19 handleAlbumImageContainer($); 20 handleArtistImageContainer($); 21 justifiedGallery($); 22 ajaxVcCfResponsive($); 23 runUnslider($); 24 handleParallax($); 25 handleGoToNextSection($); 26 hanldeJsLinks($); 27 imageOverText($); 28 setTimeout(function(){ 29 setContentHeight($); 30 }, 800); 31 wavePlayer($); 32 customPageMenuStyle($); 33 wooImageGallery($); 34 eventsScdCat($); 35 woo_gallery($); 36 footerWidgetsAlgnMobile($); 37 triggerMobileIcons($); 38 scrollTopDown($); 39 40 41 $(window).scroll(function() { 42 stickyMenu($); 43 customPageMenuStyle($); 44 }); 45 46 $('.vc_tta-panel-heading').click(function(){ 47 setTimeout(function(){ 48 handleVideoImageContainer($); 49 }, 400); 50 }); 51 52 $(window).on("debouncedresize", function(event) { 53 runMasonryGallery($); 54 runMasonryBlog($); 55 handleVideoImageContainer($); 56 handleAlbumImageContainer($); 57 ajaxVcCfResponsive($); 58 setTimeout(function(){ 59 setContentHeight($); 60 }, 400); 61 handleCenteredMenu($); 62 handleArtistImageContainer($); 63 woo_gallery($); 64 footerWidgetsAlgnMobile($); 65 }); 66}); 67 68function scrollTopDown($) { 69 if (!$('header').hasClass('lc_sticky_menu_st')) { 70 return; 71 } 72 73 var previousScrollTop = $(window).scrollTop(); 74 75 $(window).scroll(function() { 76 var currentScrollTop = $(window).scrollTop(); 77 if ($('.mobile_navigation_container').hasClass('mobile_menu_opened')) { 78 previousScrollTop = currentScrollTop; 79 return; 80 } 81 82 if (currentScrollTop > previousScrollTop) { 83 /*scroll down*/ 84 disableSticky($); 85 } else if (currentScrollTop < previousScrollTop) { 86 /*scroll up*/ 87 enableSticky($); 88 } 89 90 previousScrollTop = currentScrollTop; 91 }); 92} 93 94function runMasonryGallery($) { 95 if (!$('.lc_masonry_container').length) { 96 return; 97 } 98 99 var $grid = $('.lc_masonry_container').imagesLoaded( function() { 100 101 var items_on_row = get_masonry_items_on_row_responsive($grid.data('itemsonrow'), $grid.width()); 102 var gap_size = $grid.data('gapsize'); 103 104 105 brick_width = ($grid.width() - (items_on_row - 1) * gap_size) / items_on_row; 106 $grid.find('.brick-size').css('width', brick_width); 107 $grid.find('.lc_single_gallery_brick').css({ 108 'margin-bottom' : gap_size + 'px', 109 'width' : brick_width + 'px', 110 }); 111 112 113 $grid.find('.lc_single_gallery_brick').each(function(){ 114 var brick_height = Math.ceil($(this).find('img').height()); 115 if ($(this).hasClass("swp_equal_height_style")) { 116 var brick_height = parseFloat(Math.ceil($(this).find('img').width()) / 1.9); 117 } 118 $(this).css("height", brick_height); 119 }); 120 121 $grid.bricksLayout({ 122 itemSelector: '.lc_masonry_brick', 123 //percentPosition: true, 124 columnWidth: brick_width, 125 gutter: gap_size 126 }); 127 }); 128} 129 130function get_masonry_items_on_row_responsive($itemsonrow, $parent_width) { 131 if (768 > $parent_width) { 132 return 2; 133 } 134 if (912 > $parent_width) { 135 return 3; 136 } 137 138 return $itemsonrow; 139} 140 141function runMasonryBlog($) { 142 if (!$('.lc_blog_masonry_container').length) { 143 return; 144 } 145 146 var $grid = $('.lc_blog_masonry_container').imagesLoaded( function() { 147 if ($grid.hasClass('js-swp-processed')) { 148 return; 149 } 150 151 var default_width = $('.blog-brick-size').width(); 152 var default_height = 3/4 * default_width; 153 var is_grid_layout = false; 154 var no_portrait_allowed = false; 155 var fixed_content_height_mobile = 1.6; 156 157 if ($grid.hasClass("grid_container")) { 158 is_grid_layout = true; 159 } 160 161 if (default_width < 300) { 162 if ($('.blog-brick-size').parent().width() > 550) { 163 $('.blog-brick-size').removeClass('brick3'); 164 $('.blog-brick-size').addClass('brick2'); 165 default_width = $('.blog-brick-size').width(); 166 } else { 167 default_width = $('.blog-brick-size').parent().width(); 168 } 169 default_height = 3/4 * default_width; 170 } 171 172 if ((2 * default_width - $grid.width()) > 1) { 173 no_portrait_allowed = true; 174 } 175 176 $('.lc_blog_masonry_brick').each(function(){ 177 178 if ($(this).hasClass('has_thumbnail')) { 179 180 var $image = $(this).find('img.lc_masonry_thumbnail_image'); 181 var img_src = $image.attr("src"); 182 183 var $cover_div = $(this).find(".brick_cover_bg_image"); 184 $cover_div.addClass("lc_cover_bg"); 185 $cover_div.css("background-image", "url("+img_src+")"); 186 187 var imageObj = new Image(); 188 imageObj.src = $image.attr("src"); 189 190 if (is_grid_layout || no_portrait_allowed) { 191 $(this).css("width", default_width); 192 $(this).css("height", default_height); 193 if (default_width < 380) { 194 $(this).css("height", fixed_content_height_mobile * default_height); 195 } 196 } else {
197 if (imageObj.naturalWidth / imageObj.naturalHeight >= 1.6) { 198 $(this).addClass("landscape_brick"); 199 $(this).css("width", 2*default_width); 200 $(this).css("height", default_height); 201 } else if (imageObj.naturalHeight / imageObj.naturalWidth >= 1.5) { 202 $(this).addClass("portrait_brick"); 203 $(this).css("width", default_width); 204 $(this).css("height", 2*default_height); 205 } else { 206 $(this).css("width", default_width); 207 $(this).css("height", default_height); 208 } 209 } 210 } else { 211 $(this).css("width", default_width); 212 $(this).css("height", default_height); 213 if (default_width < 380) { 214 $(this).css("height", fixed_content_height_mobile * default_height); 215 } 216 } 217 }); 218 219 220 $grid.bricksLayout({ 221 itemSelector: '.lc_blog_masonry_brick', 222 percentPosition: true, 223 columnWidth: '.blog-brick-size', 224 }); 225 $grid.fadeTo("400", 1); 226 $grid.addClass('js-swp-processed'); 227 }); 228} 229 230function handleQuotes($) { 231 $('blockquote').each(function(){ 232 $(this).prepend($('<i class="fas fa-quote-right" aria-hidden="true"></i>')); 233 }); 234} 235 236function handleCoverBgImage($) { 237 $( ".lc_swp_background_image" ).each(function() { 238 var imgSrc = $(this).data("bgimage"); 239 var bg_position = "center center"; 240 241 if ($(this).hasClass('swp_align_bg_img')) { 242 bg_position = "center " + $(this).data('valign'); 243 } 244 245 $(this).css("background-image", "url("+imgSrc+")"); 246 $(this).css("background-position", bg_position); 247 $(this).css("background-repeat", "no-repeat"); 248 $(this).css("background-size","cover"); 249 }); 250} 251 252function handleBgColor($) { 253 $( ".lc_swp_overlay" ).each(function() { 254 var bgColor = $(this).data("color"); 255 256 $(this).parent().css("position", "relative"); 257 258 $(this).css({ 259 "background-color" : bgColor, 260 "position" : "absolute" 261 }); 262 }); 263 264 $( ".lc_swp_bg_color" ).each(function() { 265 var bgColor = $(this).data("color"); 266 $(this).css("background-color", bgColor) 267 }); 268} 269 270function handleHmbMenu($) { 271 $( ".hmb_menu" ).hover( 272 function() { 273 $(this).find('.hmb_line').addClass('hover'); 274 }, function() { 275 $(this).find('.hmb_line').removeClass('hover'); 276 } 277 ); 278 279 $('.hmb_menu').click(function() { 280 $(this).find('.hmb_line').toggleClass('click'); 281 282 if ($(this).hasClass('hmb_creative')) { 283 $('.nav_creative_container').toggleClass('visible_container'); 284 285 var resetValues = $('.nav_creative_container .creative_menu ul.menu > li').hasClass('menu_item_visible') ? 1 : 0; 286 setTransitionForCreativeTopItems($, resetValues); 287 $('.nav_creative_container .creative_menu ul.menu > li').toggleClass('menu_item_visible'); 288 } 289 290 if ($(this).hasClass('hmb_mobile')) { 291 if ($('header').hasClass('sticky_enabled')) { 292 $("body").animate({ scrollTop: 0 }, 400, function(){ 293 showMobileMenuContainer($); 294 }); 295 } else { 296 showMobileMenuContainer($); 297 } 298 } 299 }); 300 301 /*close creative on click on menu item*/ 302 $('nav.creative_menu.close_on_click').find('a').click(function() { 303 $('.nav_creative_container').toggleClass('visible_container'); 304 var resetValues = $('.nav_creative_container .creative_menu ul.menu > li').hasClass('menu_item_visible') ? 1 : 0; 305 setTransitionForCreativeTopItems($, resetValues); 306 $('.nav_creative_container .creative_menu ul.menu > li').toggleClass('menu_item_visible'); 307 $('.hmb_line.click').removeClass('click'); 308 }); 309} 310 311var setTransitionForCreativeTopItems = function($, resetValues) { 312 if (!$(".nav_creative_container").length) { 313 return; 314 } 315 316 if (resetValues == 1) { 317 $('.nav_creative_container .creative_menu ul.menu > li').each(function(){ 318 $(this).css({ 319 "-webkit-transition-delay" : "0s", 320 "-moz-transition-delay" : "0s", 321 "transition-delay" : "0s" 322 }); 323 }) 324 325 return; 326 } 327 328 var start_delay = 2; 329 var elt_duration = ""; 330 $('.nav_creative_container .creative_menu ul.menu > li').each(function(){ 331 start_delay += 1; 332 if (start_delay < 10) { 333 elt_duration = "0."+start_delay+"s"; 334 } else { 335 elt_duration = start_delay/10+"s"; 336 } 337 338 $(this).css({ 339 "-webkit-transition-delay" : elt_duration, 340 "-moz-transition-delay" : elt_duration, 341 "transition-delay" : elt_duration 342 }); 343 }); 344} 345 346var showMobileMenuContainer = function($) { 347 $('.mobile_navigation_container').toggle(); 348 $('.mobile_navigation_container').toggleClass('mobile_menu_opened'); 349} 350 351function setContentHeight($) { 352 if (!$('#lc_swp_content').length) { 353 return; 354 } 355 if ($('body').hasClass('page-template-template-visual-composer') || 356 $('body').hasClass('page-template-template-elementor')) { 357 if ($('.lc_copy_area').length) { 358 $('.lc_copy_area').css("opacity", "1"); 359 } 360 return; 361 } 362 $('#lc_swp_content').css("min-height", ""); 363 364 var totalHeight = $('#lc_swp_wrapper').height(); 365 if ($('#heading_area').length > 0) { 366 totalHeight -= $('#heading_area').height(); 367 } 368 if ($('#footer_sidebars').length) { 369 totalHeight -= $('#footer_sidebars').height(); 370 } 371 372 if ($('.lc_copy_area ').length) { 373 totalHeight -= $('.lc_copy_area').height(); 374 } 375 376 var minContentHeight = $('#lc_swp_content').data("minheight"); 377 if ($('#lc_swp_content').length) { 378 if (totalHeight > minContentHeight) { 379 $('#lc_swp_content').css('min-height', totalHeight); 380 } 381 } 382 383 if ($('.lc_copy_area').length) { 384 $('.lc_copy_area').css("opacity", "1"); 385 } 386} 387 388function stickyMenu($) { 389 if (!$('header').hasClass('lc_sticky_menu')) { 390 return; 391 } 392 if ($('.mobile_navigation_container').hasClass('mobile_menu_opened')) { 393 return; 394 } 395
396 var triggerSticky = 10; 397 if ($(window).scrollTop() > triggerSticky) { 398 enableSticky($); 399 } else { 400 disableSticky($); 401 } 402} 403 404function hiddenIcons($) { 405 $('.lc-open-socials-in-menu').click(function(){ 406 $('.lc_social_icons_hidden').toggleClass('show_icons'); 407 }) 408} 409 410var enableSticky = function($) { 411 if ($('header').hasClass('sticky_enabled')) { 412 return; 413 } 414 415 //$('header').css("visibility", "hidden") 416 $('header').addClass('sticky_enabled'); 417 $('header').css("visibility", "visible"); 418} 419 420var disableSticky = function($) { 421 var element = $('header'); 422 if ($(element).hasClass('sticky_enabled')) { 423 $(element).removeClass('sticky_enabled'); 424 425 if(0 == $(element).attr("class").length) { 426 $(element).removeAttr("class"); 427 } 428 } 429} 430 431var backToTop = function($) { 432 if (!$('.lc_back_to_top_btn').length) { 433 return; 434 } 435 436 var backToTopEl = $('.lc_back_to_top_btn'); 437 $(backToTopEl).click(function(){ 438 $("html, body").animate({ scrollTop: 0 }, "slow"); 439 }); 440 441 $(window).scroll(function() { 442 if ($(window).scrollTop() < 200) { 443 $(backToTopEl).hide(); 444 } else { 445 $(backToTopEl).show('slow'); 446 } 447 }); 448} 449 450var clickOnSearchIcon = function($) { 451 $('.trigger_global_search').click(function(){ 452 $('#lc_global_search').show(); 453 $('#lc_global_search').find('input').focus(); 454 }); 455 456 $('.close_search_form').click(function(){ 457 $('#lc_global_search').hide(); 458 }); 459 460 $(document).keyup(function(e) { 461 /* escape key maps to keycode `27`*/ 462 if (e.keyCode == 27) { 463 $('#lc_global_search').hide(); 464 } 465 }); 466} 467 468var triggerMobileIcons = function($) { 469 $('.swp_show_mobile_socials').click(function(){ 470 $('.social_profiles_mobile').toggle(); 471 }); 472} 473 474var handleMobile = function($) { 475 $('nav.mobile_navigation').find('ul li.menu-item-has-children > a').click(function(event){ 476 var links_to = $(this).attr("href"); 477 var elt_fin = $(this).offset().left + $(this).width() + parseInt($(this).css("padding-right")) + parseInt($(this).css("padding-left")); 478 var AFTER_WIDTH = 100; 479 480 if ((event.offsetX > elt_fin - AFTER_WIDTH) || 481 ("#" == links_to)) { 482 event.preventDefault(); 483 $(this).parent().find('> ul').toggle('300'); 484 } 485 }); 486 /*close menu on anchor links*/ 487 $('nav.mobile_navigation').find("a").click(function(){ 488 var links_to = $(this).attr("href"); 489 if ((links_to.indexOf("#") > -1) && (("#" != links_to)) ) { 490 $('.hmb_menu.hmb_mobile').trigger("click"); 491 } 492 }); 493 $('nav.creative_menu').find("a").click(function(){ 494 var links_to = $(this).attr("href"); 495 if ((links_to.indexOf("#") > -1) && (("#" != links_to)) ) { 496 $('.hmb_menu.hmb_creative').trigger("click"); 497 } 498 }); 499} 500 501var handleVideoImageContainer = function($) { 502 if (!$('.video_image_container').length) { 503 return; 504 } 505 506 $('.video_image_container').each(function() { 507 var no_px_width = parseFloat($(this).css('width')); 508 $(this).css("height", no_px_width * 9/16); 509 $(this).parent().parent().css("opacity", 1); 510 }); 511} 512 513var handleAlbumImageContainer = function($) { 514 if (!$('.album_image_container').length) { 515 return; 516 } 517 518 $('.album_image_container').each(function() { 519 var no_px_width = parseFloat($(this).css('width')); 520 $(this).css("height", no_px_width); 521 $(this).parent().parent().css("opacity", 1); 522 }); 523 524 $('.single_album_item').each(function(){ 525 var album_title = $(this).find('.album_title'); 526 var distance = album_title.innerHeight() + 39 - parseInt(album_title.css("padding-bottom")); 527 album_title.css("padding-bottom", distance); 528 }); 529} 530 531function handleArtistImageContainer($) { 532 $('.artist_img_container').each(function() { 533 var no_px_width = parseFloat($(this).css('width')); 534 //$(this).css("height", no_px_width * 5/4); 535 $(this).css("height", no_px_width * 1.1); 536 $(this).parent().parent().css("opacity", 1); 537 }); 538} 539 540var justifiedGallery = function($) { 541 if (!$('.lc_swp_justified_gallery').length) { 542 return; 543 } 544 545 $(".lc_swp_justified_gallery").each(function() { 546 var rowHeight = $(this).data("rheight"); 547 if (!$.isNumeric(rowHeight)) { 548 rowHeight = 180; 549 } 550 551 $(this).justifiedGallery({ 552 rowHeight: rowHeight, 553 lastRow: 'justify', 554 margins: 0, 555 captions: false, 556 imagesAnimationDuration: 400 557 }); 558 559 $(this).find("img").fadeTo("600", 0.6); 560 $(this).parent().find('.view_more_justified_gallery').fadeTo("400", 1); 561 }); 562 563 setTimeout(function(){ 564 $('.img_box').find("img").addClass("transition4"); 565 }, 600); 566 567} 568 569var ajaxVcCfResponsive = function($) { 570 if (!$(".vc_lc_contactform").length) { 571 return; 572 } 573 574 var containerWidth = $(".vc_lc_contactform").width(); 575 if (containerWidth <= 768) { 576 $(".vc_lc_contactform").find(".vc_lc_element").removeClass("three_on_row"); 577 } else { 578 $(".vc_lc_contactform").find(".three_on_row_layout").addClass("three_on_row"); 579 } 580} 581 582var runUnslider = function($) { 583 $('.lc_reviews_slider').not('.js-swp-processed').each(function(){ 584 var slide_speed = 400; 585 var slide_delay = 4000; 586 587 if (typeof $(this).parent().data('slidespeed') !== 'undefined') { 588 slide_speed = $(this).parent().data('slidespeed'); 589 } 590 if (typeof $(this).parent().data('slidedelay') !== 'undefined') { 591 slide_delay = $(this).parent().data('slidedelay'); 592 } 593 594 $(this).unslider({ 595 arrows: { 596 prev: '<a class="unslider-arrow prev"><i class="fas fa-angle-left" aria-hidden="true"></i></a>', 597 next: '<a class="unslider-arrow next"><i class="fas fa-angle-right" aria-hidden="true"></i></a>', 598 }, 599 autoplay: true, 600 delay: slide_delay, 601 speed: slide_speed 602 }); 603 604 $(this).addClass('js-swp-processed'); 605 }); 606 607 608} 609 610var handleParallax = function($) { 611 $( ".lc_swp_parallax" ).each(function() { 612 if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { 613 $(this).addClass("ai_swp_no_scroll"); 614 } else { 615 $(this).css("background-position", "50% 0"); 616 var $parallaxObject = $(this); 617 618 $(window).scroll(function() { 619 var yPos = -($(window).scrollTop() / $parallaxObject.data("pspeed")); 620 var newCoord = '50% '+ yPos + 'px'; 621 622 $parallaxObject.css("background-position", newCoord); 623 }); 624 } 625 }); 626} 627 628var handleGoToNextSection = function($) { 629 if (!$('.goto_next_section').length) { 630 return; 631 } 632 633 var animateIcon = function(targetElement, speed){ 634 $(targetElement).css({'padding-top':'0px'}); 635 $(targetElement).css({'opacity':'1'}); 636 $(targetElement).animate( 637 { 638 'padding-top' : "25px", 639 "opacity" : "0" 640 }, 641 { 642 duration: speed, 643 complete: function(){ 644 animateIcon($('.goto_next_section i'), speed); 645 } 646 } 647 ); 648 }; 649 setTimeout(function(){ 650 animateIcon($('.goto_next_section i'), 2000); 651 }, 3000); 652 653 $('.goto_next_section').click(function(){ 654 var $nextRow = $(this).parents('.vc_row').next(); 655 if($nextRow.length) { 656 $('html, body').animate({ 657 scrollTop: $nextRow.offset().top 658 }, 1200); 659 } 660 }); 661 662} 663 664var hanldeJsLinks = function($) { 665 if (!$('.lc_js_link').length) { 666 return; 667 } 668 669 $('.lc_js_link').click(function(event) { 670 event.preventDefault(); 671 var newLocation = $(this).data("href"); 672 var newWin = ''; 673 if ($(this).data("target")) { 674 newWin = $(this).data("target"); 675 } 676 window.open(newLocation, newWin); 677 }); 678} 679 680var logoInTheMiddle = function($) { 681 if (!$('.centered_menu').length) { 682 return; 683 } 684 685 var middleMenuPosition = Math.ceil($(".header_inner.centered_menu ul.menu > li").length / 2); 686 $(".header_inner.centered_menu ul.menu > li:nth-child(" + middleMenuPosition + ")").after('<li class="logo_menu_item"></li>'); 687 $('#logo').detach().appendTo('li.logo_menu_item'); 688 $('#logo').css("opacity", "1"); 689 $(".header_inner.centered_menu").animate({ opacity: 1 }, "slow"); 690 691 /*center menu to the screen*/ 692 handleCenteredMenu($); 693} 694 695var handleCenteredMenu = function($) { 696 if (!$('nav.centered_menu').length) { 697 return; 698 } 699 700 /* recalculate based on items length [[[ */
701 var leftWidth =0; 702 var rightWidth =0; 703 var logoMenuItem = $( 'nav.centered_menu .logo_menu_item' ); 704 logoMenuItem.prevAll( '.menu-item' ).each( function() { 705 leftWidth += $(this).width(); 706 } ); 707 logoMenuItem.nextAll('.menu-item').each(function(){ 708 rightWidth += $(this).width(); 709 }); 710 $( 'nav.centered_menu').css('margin-left', (rightWidth - leftWidth)/2); 711 /* ]]] */ 712 713 //var classic_icons_correnction = 0 - $('.classic_header_icons.centered_menu').outerWidth(); 714 //$('.classic_header_icons.centered_menu').css("margin-right", classic_icons_correnction); 715} 716 717function imageOverText($) { 718 if (!$('.swp_image_over_text').length) { 719 return; 720 } 721 722 $('.swp_image_over_text').each(function() { 723 var databg = $(this).data("bgimage"); 724 $(this).css("background", "url(" + databg + ") center center no-repeat"); 725 } ); 726} 727 728function wavePlayer($) { 729 $('.lc_wave_player_container').each(function(){ 730 var $player = $(this); 731 var $play_btn = $player.find('.fa-play-circle'); 732 var $pause_btn = $player.find('.fa-pause-circle'); 733 var $fwd_btn = $player.find('.fa-step-forward'); 734 var $bkw_btn = $player.find('.fa-step-backward'); 735 var $progress_bar = $player.find('.progress_bar'); 736 var $first_song = $player.find('.wave_player_entry').first(); 737 var $last_song = $player.find('.wave_player_entry').last(); 738 var wave_col = $player.data('wavecol'); 739 var wave_prog_col = $player.data('waveprogcol'); 740 var lazy_load = $player.data("lazyload"); 741 742 var wave_id = $player.find('.lc_waveform').attr('id'); 743 744 /*set the colors*/ 745 $progress_bar.css("background-color", wave_col); 746 747 var wavesurfer = WaveSurfer.create({ 748 container: '#' + wave_id, 749 hideScrollbar : true, 750 normalize : false, 751 waveColor : wave_col, 752 progressColor: wave_prog_col, 753 cursorColor: "transparent", 754 pixelRatio : 1, 755 minPxPerSec: 50, 756 barWidth: 1, 757 height: 50 758 }); 759 760 761 /*load the 1st song*/ 762 if ("no" == lazy_load) { 763 wavesurfer.load($first_song.data('mediafile')); 764 $first_song.addClass("loaded_for_play"); 765 wavesurfer.on('ready', function () { 766 $progress_bar.hide(); 767 }); 768 } 769 770 wavesurfer.on('loading', function(progress_amount) { 771 if ("none" == $progress_bar.css("display")) { 772 $progress_bar.show(); 773 } 774 $progress_bar.css("width", progress_amount + "%"); 775 }); 776 777 $play_btn.click(function() { 778 if ("yes" == lazy_load) { 779 if (!$player.find('.wave_player_entry.now_playing').length) { 780 wavesurfer.load($first_song.data('mediafile')); 781 $first_song.addClass("now_playing"); 782 playOnReady(); 783 return; 784 } 785 786 $play_btn.hide(); 787 $pause_btn.show(); 788 wavesurfer.play(); 789 } else { 790 if ($player.find('.wave_player_entry.loaded_for_play').length) { 791 $first_song.removeClass("loaded_for_play"); 792 $first_song.addClass("now_playing"); 793 wavesurfer.play(); 794 $progress_bar.hide(); 795 $play_btn.hide(); 796 $pause_btn.show(); 797 } 798 799 $play_btn.hide(); 800 $pause_btn.show(); 801 wavesurfer.play(); 802 } 803 }); 804 805 $pause_btn.click(function() { 806 $play_btn.show(); 807 $pause_btn.hide(); 808 wavesurfer.pause(); 809 }); 810 $fwd_btn.click(function() { 811 var $crt_elt = $player.find('.wave_player_entry.now_playing'); 812 var $next_elt = $crt_elt.next(); 813 if (!$next_elt.length) { 814 $next_elt = $first_song; 815 } 816 $crt_elt.removeClass('now_playing'); 817 $next_elt.addClass('now_playing'); 818 wavesurfer.load($next_elt.data('mediafile')); 819 playOnReady(); 820 }); 821 $bkw_btn.click(function() { 822 var $crt_elt = $player.find('.wave_player_entry.now_playing'); 823 var $prev_elt = $crt_elt.prev(); 824 if (!$prev_elt.length) { 825 $prev_elt = $last_song; 826 } 827 $crt_elt.removeClass('now_playing'); 828 $prev_elt.addClass('now_playing'); 829 wavesurfer.load($prev_elt.data('mediafile')); 830 playOnReady(); 831 }); 832 833 wavesurfer.on('finish', function () { 834 /*play next song*/ 835 var $crt_elt = $player.find('.wave_player_entry.now_playing'); 836 var $next_elt = $crt_elt.next(); 837 if (!$next_elt.length) { 838 $next_elt = $first_song; 839 } 840 $crt_elt.removeClass('now_playing'); 841 $next_elt.addClass('now_playing'); 842 wavesurfer.load($next_elt.data('mediafile')); 843 playOnReady(); 844 }); 845 846 function playOnReady() { 847 wavesurfer.on('ready', function () { 848 $progress_bar.hide(); 849 wavesurfer.play(); 850 $play_btn.hide(); 851 $pause_btn.show(); 852 }); 853 } 854 855 /*progressColor, waveColor, maxCanvasWidth, hideScrollbar*/ 856 $player.find('.wave_song_details').click(function(){ 857 if (wavesurfer.isPlaying()) { 858 wavesurfer.stop(); 859 /*wavesurfer.empty();*/ 860 } 861 wavesurfer.load($(this).parent().data('mediafile')); 862 $player.find('.wave_player_entry.now_playing').removeClass('now_playing'); 863 $(this).parent().addClass('now_playing'); 864 865 wavesurfer.on('ready', function () { 866 wavesurfer.play(); 867 $play_btn.hide(); 868 $pause_btn.show(); 869 }); 870 }); 871 }); 872} 873 874function customPageMenuStyle($) { 875 /*no custom styling on sticky menu*/ 876 if ($('header#lc_page_header').hasClass('sticky_enabled')) { 877 /*logo*/ 878 if ($('#logo').find('.cust_page_logo').length) { 879 $('#logo').find('.cust_page_logo').hide(); 880 $('#logo').find('.global_logo').show(); 881 } 882 883 if ($('header#lc_page_header').hasClass('cust_page_menu_style')) { 884 $('header#lc_page_header').removeAttr("style"); 885 886 /*creative*/ 887 $('header#lc_page_header').find(".hmb_line").removeAttr("style"); 888 $('header#lc_page_header').find(".creative_header_icon > a").removeAttr("style"); 889 $('header#lc_page_header').find(".creative_header_icon > .lnr-magnifier").removeAttr("style"); 890 891 /*classic*/ 892 $('header#lc_page_header').find(".classic_header_icon > a").removeAttr("style"); 893 $('header#lc_page_header').find(".classic_header_icon > .lnr-magnifier").removeAttr("style"); 894 $('header#lc_page_header').find(".classic_menu > ul > li:not(.current-menu-parent):not(.current-menu-item) > a").removeAttr("style"); 895 896 /*centered*/ 897 $('header#lc_page_header').find(".lc_social_profile > a").removeAttr("style"); 898 } 899 900 return; 901 } 902 903 if ($('#logo').find('.cust_page_logo').length) { 904 $('#logo').find('.cust_page_logo').css("display", "block"); 905 $('#logo').find('.global_logo').hide(); 906 } 907 908 if ($('header#lc_page_header').hasClass('cust_page_menu_style')) { 909 var menu_bg = $('header#lc_page_header').data("menubg"); 910 var menu_col = $('header#lc_page_header').data("menucol"); 911 912 if (menu_bg && (menu_bg != "")) { 913 $('header#lc_page_header').css("background-color", menu_bg); 914 } 915 if (menu_col && (menu_col != "")) { 916 /*creative*/ 917 $('header#lc_page_header').find(".hmb_line").not('.mobile_hmb_line').css("background-color", menu_col); 918 $('header#lc_page_header').find(".creative_header_icon > a").not('.mobile_menu_icon').css("color", menu_col); 919 $('header#lc_page_header').find(".creative_header_icon > .lnr-magnifier").not('.lnr_mobile').css("color", menu_col); 920 921 /*classic*/ 922 $('header#lc_page_header').find(".classic_header_icon > a").css("color", menu_col); 923 $('header#lc_page_header').find(".classic_header_icon > .lnr-magnifier").not('.lnr_mobile').css("color", menu_col); 924 $('header#lc_page_header').find(".classic_menu > ul > li:not(.current-menu-parent):not(.current-menu-item) > a").css("color", menu_col); 925 926 /*centered*/ 927 $('header#lc_page_header').find(".lc_social_profile > a").css("color", menu_col); 928 } 929 } 930} 931 932function wooImageGallery($) { 933 $('.woocommerce-product-gallery').find('a').attr("data-lightbox", "swp_product_gallery"); 934} 935 936function eventsScdCat($) { 937 $('ul.events_list.vc_events_element.show_cat_on_top').each(function(){ 938 var parent = $(this).parent(); 939 var term_container = parent.find('.swp_events_scd_cat'); 940 941 var terms = []; 942 $(this).find('li.single_event_list').each(function(){ 943 var newel = $(this).data("terms"); 944 var term_arr = newel.split("|"); 945 946 term_arr.forEach(function(single_term) { 947 single_term = single_term.trim(); 948 if (($.inArray(single_term, terms) == -1) && (single_term != "")) { 949 terms.push(single_term); 950 } 951 }); 952 }); 953
954 terms.forEach(function(single_term) { 955 term_container.append('<span class="swp_event_scd_single_cat">' + single_term +'</span>'); 956 }); 957 958 $('.swp_event_scd_single_cat').click(function() { 959 if ($(this).hasClass("swp_event_scd_cat_all")) { 960 parent.find('li.single_event_list').show(); 961 } else { 962 var cat_val = $(this).text(); 963 parent.find('li.single_event_list').hide(); 964 965 parent.find('.single_event_list').each(function(){ 966 var el_terms = $(this).data("terms"); 967 if (-1 != el_terms.search(cat_val)) { 968 $(this).show(); 969 } 970 }); 971 } 972 }); 973 }); 974} 975 976function woo_gallery($) { 977 if (!$('.swp_woo_prod_img_pos_left').length) { 978 return; 979 } 980 981 if ($('.swp_woo_prod_img_pos_left .woocommerce-product-gallery__image').length < 2) { 982 return; 983 } 984 985 if ($(window).width() < 1024) { 986 $('.swp_woo_prod_img_pos_left .woocommerce-product-gallery__image:first-child').removeClass("woo-gallery-left-show-on-right"); 987 $('.swp_woo_prod_img_pos_left .woocommerce-product-gallery__image:nth-child(n+2)').removeClass("woo-gallery-left-show-on-left"); 988 return; 989 } 990 991 $('.swp_woo_prod_img_pos_left .woocommerce-product-gallery__image:first-child').addClass("woo-gallery-left-show-on-right"); 992 $('.swp_woo_prod_img_pos_left .woocommerce-product-gallery__image:nth-child(n+2)').addClass("woo-gallery-left-show-on-left"); 993} 994 995function footerWidgetsAlgnMobile($) { 996 if (!$('#footer_sidebar2').length) { 997 return; 998 } 999 $('#footer_sidebar2').removeAttr("style"); 1000 if ($(window).width() <= 480) { 1001 return; 1002 } 1003 if ($('#footer_sidebar1').outerHeight() > $('#footer_sidebar2').outerHeight()) { 1004 $('#footer_sidebar2').css("height", $('#footer_sidebar1').outerHeight()); 1005 } 1006} 1007 1008 /*bricksLayout*/ 1009!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],(function(i){return e(t,i)})):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,(function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,o=void 0===n?function(){}:function(t){n.error(t)};function r(n,r,a){function h(t,e,i){var r,s="$()."+n+'("'+e+'")';return t.each((function(t,h){var u=a.data(h,n);if(u){var d=u[e];if(d&&"_"!=e.charAt(0)){var l=d.apply(u,i);r=void 0===r?l:r}else o(s+" is not a valid method")}else o(n+" not initialized. Cannot call methods, i.e. "+s)})),void 0!==r?r:t}function u(t,e){t.each((function(t,i){var o=a.data(i,n);o?(o.option(e),o._init()):(o=new r(i,e),a.data(i,n,o))}))}(a=a||e||t.jQuery)&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[n]=function(t){if("string"==typeof t){var e=i.call(arguments,1);return h(this,t,e)}return u(this,t),this},s(a))}function s(t){!t||t&&t.bridget||(t.bridget=r)}return s(e||t.jQuery),r})),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o];n&&n[r]&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t})), function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,(function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],n=i.length;function o(t){var i=getComputedStyle(t);return i||e("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}var r,s=!1;function a(e){if(function(){if(!s){s=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),a.isBoxSizeOuter=r,i.removeChild(e)}}(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var h=o(e);if("none"==h.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<n;e++)t[i[e]]=0;return t}();var u={};u.width=e.offsetWidth,u.height=e.offsetHeight;for(var d=u.isBorderBox="border-box"==h.boxSizing,l=0;l<n;l++){var c=i[l],f=h[c],m=parseFloat(f);u[c]=isNaN(m)?0:m}var p=u.paddingLeft+u.paddingRight,g=u.paddingTop+u.paddingBottom,y=u.marginLeft+u.marginRight,v=u.marginTop+u.marginBottom,_=u.borderLeftWidth+u.borderRightWidth,z=u.borderTopWidth+u.borderBottomWidth,E=d&&r,b=t(h.width);!1!==b&&(u.width=b+(E?0:p+_));var x=t(h.height);return!1!==x&&(u.height=x+(E?0:g+z)),u.innerWidth=u.width-(p+_),u.innerHe
vendor: 6,428 bytes, line 1009
1009ight=u.height-(g+z),u.outerWidth=u.width+y,u.outerHeight=u.height+v,u}}return a})),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}})),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],(function(i){return e(t,i)})):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,(function(t,e){var i={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},n=Array.prototype.slice;i.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach((function(t){if(HTMLElement,n){e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}else o.push(t)})),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout((function(){n.apply(r,e),delete r[o]}),i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,(function(t,e,i){return e+"-"+i})).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady((function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach((function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(e){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+e))}var a=new e(t,i);l&&l.data(t,n,a)}))}))},i})),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,(function(t,e){"use strict";var i=document.documentElement.style,n="string"==typeof i.transition?"transition":"WebkitTransition",o="string"==typeof i.transform?"transform":"WebkitTransform",r={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],s={transform:o,transition:n,transitionDuration:n+"Duration",transitionProperty:n+"Property",transitionDelay:n+"Delay"};function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var h=a.prototype=Object.create(t.prototype);h.constructor=a,h._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},h.getSize=function(){this.size=e(this.element)},h.css=function(t){var e=this.element.style;for(var i in t){e[s[i]||i]=t[i]}},h.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},h.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},h.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},h.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},h._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),!o||this.isTransitioning){var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},h.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},h.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},h.moveTo=h._transitionTo,h.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},h._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},h.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);this.element.offsetHeight;null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var u="opacity,"+o.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}));h.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:u,transitionDuration:t,transitionDelay:this.staggerDelay||0}
vendor: 4,738 bytes, lines 1009-1010
1009),this.element.addEventListener(r,this,!1)}},h.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},h.onotransitionend=function(t){this.ontransitionend(t)};var d={"-webkit-transform":"transform"};h.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=d[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd)e.onEnd[i].call(this),delete e.onEnd[i];this.emitEvent("transitionEnd",[this])}},h.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(r,this,!1),this.isTransitioning=!1},h._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var l={transitionProperty:"",transitionDuration:"",transitionDelay:""};return h.removeTransitionStyles=function(){this.css(l)},h.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},h.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},h.remove=function(){n&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},h.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},h.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},h.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},h.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},h.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},h.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a})), 1010function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],(function(i,n,o,r){return e(t,i,n,o,r)})):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,(function(t,e,i,n,o){"use strict";var r=t.console,s=t.jQuery,a=function(){},h=0,u={};function d(t,e){var i=n.getQueryElement(t);if(i){this.element=i,s&&(this.$element=s(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++h;this.element.outlayerGUID=o,u[o]=this,this._create(),this._getOption("initLayout")&&this.layout()}else r&&r.error("Bad element for "+this.constructor.namespace+": "+(i||t))}d.namespace="outlayer",d.Item=o,d.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var l=d.prototype;function c(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}n.extend(l,e.prototype),l.option=function(t){n.extend(this.options,t)},l._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},d.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},l._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},l.reloadItems=function(){this.items=this._itemize(this.element.children)},l._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=new i(e[o],this);n.push(r)}return n},l._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},l.getItemElements=function(){return this.items.map((function(t){return t.element}))},l.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0}
vendor: 7,898 bytes, line 1010
1010,l._init=l.layout,l._resetLayout=function(){this.getSize()},l.getSize=function(){this.size=i(this.element)},l._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},l.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},l._getItemsForLayout=function(t){return t.filter((function(t){return!t.isIgnored}))},l._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach((function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)}),this),this._processLayoutQueue(i)}},l._getItemLayoutPosition=function(){return{x:0,y:0}},l._processLayoutQueue=function(t){this.updateStagger(),t.forEach((function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)}),this)},l.updateStagger=function(){var t=this.options.stagger;if(null!=t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;return(i=parseFloat(i))*(f[n]||1)}(t),this.stagger;this.stagger=0},l._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},l._postLayout=function(){this.resizeContainer()},l.resizeContainer=function(){if(this._getOption("resizeContainer")){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},l._getContainerSize=a,l._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},l._emitCompleteOnItems=function(t,e){var i=this;function n(){i.dispatchEvent(t+"Complete",null,[e])}var o=e.length;if(e&&o){var r=0;e.forEach((function(e){e.once(t,s)}))}else n();function s(){++r==o&&n()}},l.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),s)if(this.$element=this.$element||s(this.element),e){var o=s.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},l.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},l.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},l.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},l.unstamp=function(t){(t=this._find(t))&&t.forEach((function(t){n.removeFrom(this.stamps,t),this.unignore(t)}),this)},l._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},l._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},l._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},l._manageStamp=a,l._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t);return{left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom}},l.handleEvent=n.handleEvent,l.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},l.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},l.onresize=function(){this.resize()},n.debounceMethod(d,"onresize",100),l.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},l.needsResizeLayout=function(){var t=i(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},l.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},l.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},l.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},l.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach((function(t,i){t.stagger(i*e),t.reveal()}))}},l.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach((function(t,i){t.stagger(i*e),t.hide()}))}},l.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},l.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},l.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},l.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach((function(t){var i=this.getItem(t);i&&e.push(i)}),this),e},l.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach((function(t){t.remove(),n.removeFrom(this.items,t)}),this)},l.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach((function(t){t.destroy()})),this.unbindResize();var e=this.element.outlayerGUID;delete u[e],delete this.element.outlayerGUID,s&&s.removeData(this.element,this.constructor.namespace)},d.data=function(t){var e=(t=n.getQueryElement(t))&&t.outlayerGUID;return e&&u[e]},d.create=function(t,e){var i=c(d);return i.defaults=n.extend({},d.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},d.compatOptions),i.namespace=t,i.data=d.data,i.Item=c(o),n.htmlInit(i,t),s&&s.bridget&&s.bridget(t,i),i};var f={ms:1,s:1e3};return d.Item=o,d})),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.BricksLayout=e(t.Outlayer,t.getSize)}(window,(function(t,e){var i=t.create("bricksLayout");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n;r=Math[s&&s<1?"round":"floor"](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth);i=Math.min(i,this.cols);for(var n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](i,t),o={x:this.columnWidth*n.col,y:n.y},r=n.y+t.size.outerHeight,s=i+n.col,a=n.col;a<s;a++)this.colYs[a]=r;return o},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols;i=t>1&&i+t>this.cols?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft")?
vendor: 725 bytes, line 1010
1010n.left:n.right,r=o+i.outerWidth,s=Math.floor(o/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var h=(this._getOption("originTop")?n.top:n.bottom)+i.outerHeight,u=s;u<=a;u++)this.colYs[u]=Math.max(h,this.colYs[u])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}));
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.