vendor: 1,788 bytes, lines 1-45
1/******/ (() => { // webpackBootstrap 2/******/ var __webpack_modules__ = ({ 3 4/***/ "./app/assets/js/modules sync recursive (.*)\\.loader\\.js$": 5/*!*******************************************************!*\ 6 !*** ./app/assets/js/modules/ sync (.*)\.loader\.js$ ***! 7 \*******************************************************/ 8/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 9 10var map = { 11 "./accordion.loader.js": "./app/assets/js/modules/accordion.loader.js", 12 "./billboard.loader.js": "./app/assets/js/modules/billboard.loader.js", 13 "./blockHeader.loader.js": "./app/assets/js/modules/blockHeader.loader.js", 14 "./details.loader.js": "./app/assets/js/modules/details.loader.js", 15 "./header.loader.js": "./app/assets/js/modules/header.loader.js", 16 "./hero.loader.js": "./app/assets/js/modules/hero.loader.js", 17 "./media-slider.loader.js": "./app/assets/js/modules/media-slider.loader.js", 18 "./pastperf.loader.js": "./app/assets/js/modules/pastperf.loader.js", 19 "./preformancePosts.loader.js": "./app/assets/js/modules/preformancePosts.loader.js", 20 "./workPosts.loader.js": "./app/assets/js/modules/workPosts.loader.js", 21 "./workStickyNav.loader.js": "./app/assets/js/modules/workStickyNav.loader.js" 22}; 23 24 25function webpackContext(req) { 26 var id = webpackContextResolve(req); 27 return __webpack_require__(id); 28} 29function webpackContextResolve(req) { 30 if(!__webpack_require__.o(map, req)) { 31 var e = new Error("Cannot find module '" + req + "'"); 32 e.code = 'MODULE_NOT_FOUND'; 33 throw e; 34 } 35 return map[req]; 36} 37webpackContext.keys = function webpackContextKeys() { 38 return Object.keys(map); 39}; 40webpackContext.resolve = webpackContextResolve; 41module.exports = webpackContext; 42webpackContext.id = "./app/assets/js/modules sync recursive (.*)\\.loader\\.js$"; 43 44/***/ }), 45
vendor: 91,745 bytes, lines 46-3092
46/***/ "./node_modules/@accessible360/accessible-slick/slick/slick.js": 47/*!*********************************************************************!*\ 48 !*** ./node_modules/@accessible360/accessible-slick/slick/slick.js ***! 49 \*********************************************************************/ 50/***/ ((module, exports, __webpack_require__) => { 51 52var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* 53 (accessible) 54 _ _ _ _ 55 ___| (_) ___| | __ (_)___ 56/ __| | |/ __| |/ / | / __| 57\__ \ | | (__| < _ | \__ \ 58|___/_|_|\___|_|\_(_)/ |___/ 59 |__/ 60 61 Version: [email protected] 62 Author: Jason Webb (Accessible360) 63 Website: https://accessible360.com 64 Docs: https://accessible360.github.io/accessible-slick 65 Repo: https://github.com/Accessible360/accessible-slick 66 Issues: https://github.com/Accessible360/accessible-slick/issues 67 68 */ 69/* global window, document, define, jQuery, setInterval, clearInterval */ 70;(function(factory) { 71 'use strict'; 72 if (true) { 73 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "jquery")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 74 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 75 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 76 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 77 } else {} 78 79}(function($) { 80 'use strict'; 81 var Slick = window.Slick || {}; 82 83 Slick = (function() { 84 85 var instanceUid = 0; 86 87 function Slick(element, settings) { 88 89 var _ = this, dataSettings; 90 91 _.defaults = { 92 adaptiveHeight: false, 93 appendArrows: $(element), 94 appendDots: $(element), 95 arrows: true, 96 arrowsPlacement: null, 97 asNavFor: null, 98 prevArrow: '<button class="slick-prev" type="button">' 99 + '<span class="slick-prev-icon" aria-hidden="true"></span>' 100 + '<span class="slick-sr-only">Previous</span>' 101 + '</button>', 102 nextArrow: '<button class="slick-next" type="button">' 103 + '<span class="slick-next-icon" aria-hidden="true"></span>' 104 + '<span class="slick-sr-only">Next</span>' 105 + '</button>', 106 autoplay: false, 107 autoplaySpeed: 3000, 108 centerMode: false, 109 centerPadding: '50px', 110 cssEase: 'ease', 111 customPaging: function(slider, i) { 112 return $('<button type="button">' 113 + '<span class="slick-dot-icon" aria-hidden="true"></span>' 114 + '<span class="slick-sr-only">Go to slide ' + (i+1) + '</span>' 115 + '</button>'); 116 }, 117 dots: false, 118 dotsClass: 'slick-dots', 119 draggable: true, 120 easing: 'linear', 121 edgeFriction: 0.35, 122 fade: false, 123 infinite: true, 124 initialSlide: 0, 125 instructionsText: null, 126 lazyLoad: 'ondemand', 127 mobileFirst: false, 128 playIcon: '<span class="slick-play-icon" aria-hidden="true"></span>', 129 pauseIcon: '<span class="slick-pause-icon" aria-hidden="true"></span>', 130 pauseOnHover: true, 131 pauseOnFocus: true, 132 pauseOnDotsHover: false, 133 regionLabel: 'carousel', 134 respondTo: 'window', 135 responsive: null, 136 rows: 1, 137 rtl: false, 138 slide: '', 139 slidesPerRow: 1, 140 slidesToShow: 1, 141 slidesToScroll: 1, 142 speed: 500, 143 swipe: true, 144 swipeToSlide: false, 145 touchMove: true, 146 touchThreshold: 5, 147 useAutoplayToggleButton: true, 148 useCSS: true, 149 useGroupRole: true, 150 useTransform: true, 151 variableWidth: false, 152 vertical: false, 153 verticalSwiping: false, 154 waitForAnimate: true, 155 zIndex: 1000 156 }; 157 158 _.initials = { 159 animating: false, 160 dragging: false, 161 autoPlayTimer: null, 162 currentDirection: 0, 163 currentLeft: null, 164 currentSlide: 0, 165 direction: 1, 166 $dots: null, 167 $instructionsText: null, 168 listWidth: null, 169 listHeight: null, 170 loadIndex: 0, 171 $nextArrow: null, 172 $pauseButton: null, 173 $pauseIcon: null, 174 $playIcon: null, 175 $prevArrow: null, 176 scrolling: false, 177 slideCount: null, 178 slideWidth: null, 179 $slideTrack: null, 180 $slides: null, 181 sliding: false, 182 slideOffset: 0, 183 swipeLeft: null, 184 swiping: false, 185 $list: null, 186 touchObject: {}, 187 transformsEnabled: false, 188 unslicked: false 189 }; 190 191 $.extend(_, _.initials); 192 193 _.activeBreakpoint = null; 194 _.animType = null; 195 _.animProp = null; 196 _.breakpoints = []; 197 _.breakpointSettings = []; 198 _.cssTransitions = false; 199 _.focussed = false; 200 _.interrupted = false; 201 _.hidden = 'hidden'; 202 _.paused = true; 203 _.positionProp = null; 204 _.respondTo = null; 205 _.rowCount = 1; 206 _.shouldClick = true; 207 _.$slider = $(element); 208 _.$slidesCache = null; 209 _.transformType = null; 210 _.transitionType = null; 211 _.visibilityChange = 'visibilitychange'; 212 _.windowWidth = 0; 213 _.windowTimer = null; 214 215 dataSettings = $(element).data('slick') || {}; 216 217 _.options = $.extend({}, _.defaults, settings, dataSettings); 218 219 _.currentSlide = _.options.initialSlide; 220 221 _.originalSettings = _.options; 222 223 if (typeof document.mozHidden !== 'undefined') { 224 _.hidden = 'mozHidden'; 225 _.visibilityChange = 'mozvisibilitychange'; 226 } else if (typeof document.webkitHidden !== 'undefined') { 227 _.hidden = 'webkitHidden'; 228 _.visibilityChange = 'webkitvisibilitychange'; 229 } 230 231 _.autoPlay = $.proxy(_.autoPlay, _); 232 _.autoPlayClear = $.proxy(_.autoPlayClear, _); 233 _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); 234 _.autoPlayToggleHandler = $.proxy(_.autoPlayToggleHandler, _); 235 _.changeSlide = $.proxy(_.changeSlide, _); 236 _.clickHandler = $.proxy(_.clickHandler, _); 237 _.selectHandler = $.proxy(_.selectHandler, _); 238 _.setPosition = $.proxy(_.setPosition, _); 239 _.swipeHandler = $.proxy(_.swipeHandler, _); 240 _.dragHandler = $.proxy(_.dragHandler, _); 241 242 _.instanceUid = instanceUid++; 243 244 // A simple way to check for HTML strings 245 // Strict HTML recognition (must start with <) 246 // Extracted from jQuery v1.11 source 247 _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; 248 249 250 _.registerBreakpoints(); 251 _.init(true); 252 253 } 254 255 return Slick; 256 257 }()); 258 259 Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) { 260 261 var _ = this; 262 263 if (typeof(index) === 'boolean') { 264 addBefore = index; 265 index = null; 266 } else if (index < 0 || (index >= _.slideCount)) { 267 return false; 268 } 269 270 _.unload(); 271 272 if (typeof(index) === 'number') { 273 if (index === 0 && _.$slides.length === 0) { 274 $(markup).appendTo(_.$slideTrack); 275 } else if (addBefore) { 276 $(markup).insertBefore(_.$slides.eq(index)); 277 } else { 278 $(markup).insertAfter(_.$slides.eq(index)); 279 } 280 } else { 281 if (addBefore === true) { 282 $(markup).prependTo(_.$slideTrack); 283 } else { 284 $(markup).appendTo(_.$slideTrack); 285 } 286 } 287 288 _.$slides = _.$slideTrack.children(this.options.slide); 289 290 _.$slideTrack.children(this.options.slide).detach(); 291 292 _.$slideTrack.append(_.$slides); 293 294 _.$slides.each(function(index, element) { 295 $(element).attr('data-slick-index', index); 296 $(element).attr('role', 'group'); 297 $(element).attr('aria-label', 'slide ' + index); 298 }); 299 300 _.$slidesCache = _.$slides; 301 302 _.reinit(); 303 304 }; 305 306 Slick.prototype.animateHeight = function() { 307 var _ = this; 308 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 309 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 310 _.$list.animate({ 311 height: targetHeight 312 }, _.options.speed); 313 } 314 }; 315 316 Slick.prototype.animateSlide = function(targetLeft, callback) { 317 318 var animProps = {}, 319 _ = this; 320 321 _.animateHeight(); 322 323 if (_.options.rtl === true && _.options.vertical === false) { 324 targetLeft = -targetLeft; 325 } 326 if (_.transformsEnabled === false) { 327 if (_.options.vertical === false) { 328 _.$slideTrack.animate({ 329 left: targetLeft 330 }, _.options.speed, _.options.easing, callback); 331 } else { 332 _.$slideTrack.animate({ 333 top: targetLeft 334 }, _.options.speed, _.options.easing, callback); 335 } 336 337 } else { 338 339 if (_.cssTransitions === false) { 340 if (_.options.rtl === true) { 341 _.currentLeft = -(_.currentLeft); 342 } 343 $({ 344 animStart: _.currentLeft 345 }).animate({ 346 animStart: targetLeft 347 }, { 348 duration: _.options.speed, 349 easing: _.options.easing, 350 step: function(now) { 351 now = Math.ceil(now); 352 if (_.options.vertical === false) { 353 animProps[_.animType] = 'translate(' + 354 now + 'px, 0px)'; 355 _.$slideTrack.css(animProps); 356 } else { 357 animProps[_.animType] = 'translate(0px,' + 358 now + 'px)'; 359 _.$slideTrack.css(animProps); 360 } 361 }, 362 complete: function() { 363 if (callback) { 364 callback.call(); 365 } 366 } 367 }); 368 369 } else { 370 371 _.applyTransition(); 372 targetLeft = Math.ceil(targetLeft); 373 374 if (_.options.vertical === false) { 375 animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)'; 376 } else { 377 animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)'; 378 } 379 _.$slideTrack.css(animProps); 380 381 if (callback) { 382 setTimeout(function() { 383 384 _.disableTransition(); 385 386 callback.call(); 387 }, _.options.speed); 388 } 389 390 } 391 392 } 393 394 }; 395 396 Slick.prototype.getNavTarget = function() { 397 398 var _ = this, 399 asNavFor = _.options.asNavFor; 400 401 if ( asNavFor && asNavFor !== null ) { 402 asNavFor = $(asNavFor).not(_.$slider); 403 } 404 405 return asNavFor; 406 407 }; 408 409 Slick.prototype.asNavFor = function(index) { 410 411 var _ = this, 412 asNavFor = _.getNavTarget(); 413 414 if ( asNavFor !== null && typeof asNavFor === 'object' ) { 415 asNavFor.each(function() { 416 var target = $(this).slick('getSlick'); 417 if(!target.unslicked) { 418 target.slideHandler(index, true); 419 } 420 }); 421 } 422 423 }; 424 425 Slick.prototype.applyTransition = function(slide) { 426 427 var _ = this, 428 transition = {}; 429 430 if (_.options.fade === false) { 431 transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase; 432 } else { 433 transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase; 434 } 435 436 if (_.options.fade === false) { 437 _.$slideTrack.css(transition); 438 } else { 439 _.$slides.eq(slide).css(transition); 440 } 441 442 }; 443 444 Slick.prototype.autoPlay = function() { 445 446 var _ = this; 447 448 _.autoPlayClear(); 449 450 if ( _.slideCount > _.options.slidesToShow ) { 451 _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed ); 452 } 453 454 }; 455 456 Slick.prototype.autoPlayClear = function() { 457 458 var _ = this; 459 460 if (_.autoPlayTimer) { 461 clearInterval(_.autoPlayTimer); 462 } 463 464 }; 465 466 Slick.prototype.autoPlayIterator = function() { 467 468 var _ = this, 469 slideTo = _.currentSlide + _.options.slidesToScroll; 470 471 if ( !_.paused && !_.interrupted && !_.focussed ) { 472 473 if ( _.options.infinite === false ) { 474 475 if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) { 476 _.direction = 0; 477 } 478 479 else if ( _.direction === 0 ) { 480 481 slideTo = _.currentSlide - _.options.slidesToScroll; 482 483 if ( _.currentSlide - 1 === 0 ) { 484 _.direction = 1; 485 } 486 487 } 488 489 } 490 491 _.slideHandler( slideTo ); 492 493 } 494 495 }; 496 497 Slick.prototype.autoPlayToggleHandler = function() { 498 var _ = this; 499 500 if(_.paused) { 501 _.$playIcon.css('display', 'none'); 502 _.$pauseIcon.css('display', 'inline'); 503 504 _.$pauseButton.find('.slick-play-text').attr('style', 'display: none'); 505 _.$pauseButton.find('.slick-pause-text').removeAttr('style'); 506 507 _.slickPlay(); 508 } else { 509 _.$playIcon.css('display', 'inline'); 510 _.$pauseIcon.css('display', 'none'); 511 512 _.$pauseButton.find('.slick-play-text').removeAttr('style'); 513 _.$pauseButton.find('.slick-pause-text').attr('style', 'display: none'); 514 515 _.slickPause(); 516 } 517 }; 518 519 Slick.prototype.buildArrows = function() { 520 521 var _ = this; 522 523 if (_.options.arrows === true ) { 524 525 _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow'); 526 _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow'); 527 528 if( _.slideCount > _.options.slidesToShow ) { 529 530 if (_.htmlExpr.test(_.options.prevArrow)) { 531 if(_.options.arrowsPlacement != null) { 532 switch(_.options.arrowsPlacement) { 533 case 'beforeSlides': 534 case 'split': 535 console.log('test'); 536 _.$prevArrow.prependTo(_.options.appendArrows); 537 break; 538 539 case 'afterSlides': 540 _.$prevArrow.appendTo(_.options.appendArrows); 541 break; 542 } 543 544 } else { 545 _.$prevArrow.prependTo(_.options.appendArrows); 546 } 547 } 548 549 if (_.htmlExpr.test(_.options.nextArrow)) { 550 if(_.options.arrowsPlacement != null) { 551 switch(_.options.arrowsPlacement) { 552 case 'beforeSlides': 553 console.log('test2'); 554 _.$prevArrow.after(_.$nextArrow); 555 break; 556 557 case 'afterSlides': 558 case 'split': 559 _.$nextArrow.appendTo(_.options.appendArrows); 560 } 561 } else { 562 _.$nextArrow.appendTo(_.options.appendArrows); 563 } 564 } 565 566 if (_.options.infinite !== true) { 567 _.$prevArrow 568 .addClass('slick-disabled') 569 .prop('disabled', true); 570 } 571 572 } else { 573 574 _.$prevArrow.add( _.$nextArrow ) 575 576 .addClass('slick-hidden') 577 .prop('disabled', true); 578 } 579 580 } 581 582 }; 583 584 Slick.prototype.buildDots = function() { 585 586 var _ = this, 587 i, dot; 588 589 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 590 591 _.$slider.addClass('slick-dotted'); 592 593 dot = $('<ul />').addClass(_.options.dotsClass); 594 595 for (i = 0; i <= _.getDotCount(); i += 1) { 596 dot.append($('<li />').append(_.options.customPaging.call(this, _, i))); 597 } 598 599 _.$dots = dot.appendTo(_.options.appendDots); 600 601 _.$dots.find('li').first().addClass('slick-active'); 602 603 } 604 605 }; 606 607 Slick.prototype.buildOut = function() { 608 609 var _ = this; 610 611 _.$slides = 612 _.$slider 613 .children( _.options.slide + ':not(.slick-cloned)') 614 .addClass('slick-slide'); 615 616 _.slideCount = _.$slides.length; 617 618 _.$slides.each(function(index, element) { 619 $(element) 620 .attr('data-slick-index', index) 621 .data('originalStyling', $(element).attr('style') || ''); 622 623 if(_.options.useGroupRole) { 624 $(element) 625 .attr('role', 'group') 626 .attr('aria-label', 'slide ' + (index + 1)); 627 } 628 }); 629 630 _.$slider.addClass('slick-slider'); 631 632 _.$slider.attr('role', 'region'); 633 _.$slider.attr('aria-label', _.options.regionLabel); 634 635 _.$slideTrack = (_.slideCount === 0) ? 636 $('<div class="slick-track"/>').appendTo(_.$slider) : 637 _.$slides.wrapAll('<div class="slick-track"/>').parent(); 638 639 _.$list = _.$slideTrack.wrap( 640 '<div class="slick-list"/>').parent(); 641 _.$slideTrack.css('opacity', 0); 642 643 if (_.options.centerMode === true || _.options.swipeToSlide === true) { 644 _.options.slidesToScroll = 1; 645 } 646 647 $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading'); 648 649 _.setupInfinite(); 650 651 _.buildArrows(); 652 653 _.buildDots(); 654 655 _.updateDots(); 656 657 658 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 659 660 if (_.options.draggable === true) { 661 _.$list.addClass('draggable'); 662 } 663 664 if ( _.options.autoplay && _.options.useAutoplayToggleButton ) { 665 _.$pauseIcon = $(_.options.pauseIcon).attr('aria-hidden', true); 666 _.$playIcon = $(_.options.playIcon).attr('aria-hidden', true); 667 668 _.$pauseButton = $('<button type="button" class="slick-autoplay-toggle-button">'); 669 _.$pauseButton.append(_.$pauseIcon); 670 _.$pauseButton.append(_.$playIcon.css('display', 'none')); 671 _.$pauseButton.append($('<span class="slick-pause-text slick-sr-only">Pause</span>')); 672 _.$pauseButton.append($('<span class="slick-play-text slick-sr-only" style="display: none">Play</span>')); 673 674 _.$pauseButton.prependTo(_.$slider); 675 } 676 677 if((_.options.instructionsText != null && _.options.instructionsText != '')) { 678 _.$instructionsText = $('<p class="slick-instructions slick-sr-only">' + _.options.instructionsText + '</p>'); 679 _.$instructionsText.prependTo(_.$slider); 680 } 681 682 }; 683 684 Slick.prototype.buildRows = function() { 685 686 var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection; 687 688 newSlides = document.createDocumentFragment(); 689 originalSlides = _.$slider.children(); 690 691 if(_.options.rows > 0) { 692 693 slidesPerSection = _.options.slidesPerRow * _.options.rows; 694 numOfSlides = Math.ceil( 695 originalSlides.length / slidesPerSection 696 ); 697 698 for(a = 0; a < numOfSlides; a++){ 699 var slide = document.createElement('div'); 700 for(b = 0; b < _.options.rows; b++) { 701 var row = document.createElement('div'); 702 for(c = 0; c < _.options.slidesPerRow; c++) { 703 var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c)); 704 if (originalSlides.get(target)) { 705 row.appendChild(originalSlides.get(target)); 706 } 707 } 708 slide.appendChild(row); 709 } 710 newSlides.appendChild(slide); 711 } 712 713 _.$slider.empty().append(newSlides); 714 _.$slider.children().children().children() 715 .css({ 716 'width':(100 / _.options.slidesPerRow) + '%', 717 'display': 'inline-block' 718 }); 719 720 } 721 722 }; 723 724 Slick.prototype.checkResponsive = function(initial, forceUpdate) { 725 726 var _ = this, 727 breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false; 728 var sliderWidth = _.$slider.width(); 729 var windowWidth = window.innerWidth || $(window).width(); 730 731 if (_.respondTo === 'window') { 732 respondToWidth = windowWidth; 733 } else if (_.respondTo === 'slider') { 734 respondToWidth = sliderWidth; 735 } else if (_.respondTo === 'min') { 736 respondToWidth = Math.min(windowWidth, sliderWidth); 737 } 738 739 if ( _.options.responsive && 740 _.options.responsive.length && 741 _.options.responsive !== null) { 742 743 targetBreakpoint = null; 744 745 for (breakpoint in _.breakpoints) { 746 if (_.breakpoints.hasOwnProperty(breakpoint)) { 747 if (_.originalSettings.mobileFirst === false) { 748 if (respondToWidth < _.breakpoints[breakpoint]) { 749 targetBreakpoint = _.breakpoints[breakpoint]; 750 } 751 } else { 752 if (respondToWidth > _.breakpoints[breakpoint]) { 753 targetBreakpoint = _.breakpoints[breakpoint]; 754 } 755 } 756 } 757 } 758 759 if (targetBreakpoint !== null) { 760 if (_.activeBreakpoint !== null) { 761 if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { 762 _.activeBreakpoint = 763 targetBreakpoint; 764 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 765 _.unslick(targetBreakpoint); 766 } else { 767 _.options = $.extend({}, _.originalSettings, 768 _.breakpointSettings[ 769 targetBreakpoint]); 770 if (initial === true) { 771 _.currentSlide = _.options.initialSlide; 772 } 773 _.refresh(initial); 774 } 775 triggerBreakpoint = targetBreakpoint; 776 } 777 } else { 778 _.activeBreakpoint = targetBreakpoint; 779 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 780 _.unslick(targetBreakpoint); 781 } else { 782 _.options = $.extend({}, _.originalSettings, 783 _.breakpointSettings[ 784 targetBreakpoint]); 785 if (initial === true) { 786 _.currentSlide = _.options.initialSlide; 787 } 788 _.refresh(initial); 789 } 790 triggerBreakpoint = targetBreakpoint; 791 } 792 } else { 793 if (_.activeBreakpoint !== null) { 794 _.activeBreakpoint = null; 795 _.options = _.originalSettings; 796 if (initial === true) { 797 _.currentSlide = _.options.initialSlide; 798 } 799 _.refresh(initial); 800 triggerBreakpoint = targetBreakpoint; 801 } 802 } 803 804 // only trigger breakpoints during an actual break. not on initialize. 805 if( !initial && triggerBreakpoint !== false ) { 806 _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); 807 } 808 } 809 810 }; 811 812 Slick.prototype.changeSlide = function(event, dontAnimate) { 813 814 var _ = this, 815 $target = $(event.currentTarget), 816 indexOffset, slideOffset, unevenOffset; 817 818 // If target is a link, prevent default action. 819 if($target.is('a')) { 820 event.preventDefault(); 821 } 822 823 // If target is not the <li> element (ie: a child), find the <li>. 824 if(!$target.is('li')) { 825 $target = $target.closest('li'); 826 } 827 828 unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0); 829 indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; 830 831 switch (event.data.message) { 832 833 case 'previous': 834 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; 835 if (_.slideCount > _.options.slidesToShow) { 836 _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); 837 } 838 break; 839 840 case 'next': 841 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset; 842 if (_.slideCount > _.options.slidesToShow) { 843 _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); 844 } 845 break; 846 847 case 'index': 848 var index = event.data.index === 0 ? 0 : 849 event.data.index || $target.index() * _.options.slidesToScroll; 850 851 _.slideHandler(_.checkNavigable(index), false, dontAnimate); 852 $target.children().trigger('focus'); 853 break; 854 855 default: 856 return; 857 } 858 859 }; 860 861 Slick.prototype.checkNavigable = function(index) { 862 863 var _ = this, 864 navigables, prevNavigable; 865 866 navigables = _.getNavigableIndexes(); 867 prevNavigable = 0; 868 if (index > navigables[navigables.length - 1]) { 869 index = navigables[navigables.length - 1]; 870 } else { 871 for (var n in navigables) { 872 if (index < navigables[n]) { 873 index = prevNavigable; 874 break; 875 } 876 prevNavigable = navigables[n]; 877 } 878 } 879 880 return index; 881 }; 882 883 Slick.prototype.cleanUpEvents = function() { 884 885 var _ = this; 886 887 if(_.options.autoplay && _.options.useAutoplayToggleButton) { 888 _.$pauseButton.off('click.slick', _.autoPlayToggleHandler); 889 } 890 891 if (_.options.dots && _.$dots !== null) { 892 893 $('li', _.$dots) 894 .off('click.slick', _.changeSlide) 895 .off('mouseenter.slick', $.proxy(_.interrupt, _, true)) 896 .off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 897 } 898 899 _.$slider.off('focus.slick blur.slick'); 900 901 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 902 _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide); 903 _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide); 904 } 905 906 _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); 907 _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); 908 _.$list.off('touchend.slick mouseup.slick', _.swipeHandler); 909 _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); 910 911 _.$list.off('click.slick', _.clickHandler); 912 913 $(document).off(_.visibilityChange, _.visibility); 914 915 _.cleanUpSlideEvents(); 916 917 $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); 918 919 $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); 920 921 $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); 922 923 $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); 924 925 }; 926 927 Slick.prototype.cleanUpSlideEvents = function() { 928 929 var _ = this; 930 931 _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true)); 932 _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 933 934 }; 935 936 Slick.prototype.cleanUpRows = function() { 937 938 var _ = this, originalSlides; 939 940 if(_.options.rows > 0) { 941 originalSlides = _.$slides.children().children(); 942 originalSlides.removeAttr('style'); 943 _.$slider.empty().append(originalSlides); 944 } 945 946 }; 947 948 Slick.prototype.clickHandler = function(event) { 949 950 var _ = this; 951 952 if (_.shouldClick === false) { 953 event.stopImmediatePropagation(); 954 event.stopPropagation(); 955 event.preventDefault(); 956 } 957 958 }; 959 960 Slick.prototype.destroy = function(refresh) { 961 962 var _ = this; 963 964 _.autoPlayClear(); 965 966 _.touchObject = {}; 967 968 _.cleanUpEvents(); 969 970 $('.slick-cloned', _.$slider).detach(); 971 972 if(_.options.autoplay && _.options.useAutoplayToggleButton) { 973 _.$pauseButton.remove(); 974 } 975 976 if (_.$dots) { 977 _.$dots.remove(); 978 } 979 980 if ( _.$prevArrow && _.$prevArrow.length ) { 981 982 _.$prevArrow 983 .removeClass('slick-disabled slick-arrow slick-hidden') 984 .prop('disabled', false) 985 .css('display',''); 986 987 if ( _.htmlExpr.test( _.options.prevArrow )) { 988 _.$prevArrow.remove(); 989 } 990 } 991 992 if ( _.$nextArrow && _.$nextArrow.length ) { 993 994 _.$nextArrow 995 .removeClass('slick-disabled slick-arrow slick-hidden') 996 .prop('disabled', false) 997 .css('display',''); 998 999 if ( _.htmlExpr.test( _.options.nextArrow )) { 1000 _.$nextArrow.remove(); 1001 } 1002 } 1003 1004 1005 if (_.$slides) { 1006 1007 _.$slides 1008 .removeClass('slick-slide slick-active slick-center slick-visible slick-current') 1009 .removeAttr('aria-hidden') 1010 .removeAttr('data-slick-index') 1011 .each(function(){ 1012 $(this).attr('style', $(this).data('originalStyling')); 1013 }); 1014 1015 _.$slideTrack.children(this.options.slide).detach(); 1016 1017 _.$slideTrack.detach(); 1018 1019 _.$list.detach(); 1020 1021 _.$slider.append(_.$slides); 1022 } 1023 1024 _.cleanUpRows(); 1025 1026 _.$slider.removeClass('slick-slider'); 1027 _.$slider.removeClass('slick-initialized'); 1028 _.$slider.removeClass('slick-dotted'); 1029 1030 _.unslicked = true; 1031 1032 if(!refresh) { 1033 _.$slider.trigger('destroy', [_]); 1034 } 1035 1036 }; 1037 1038 Slick.prototype.disableTransition = function(slide) { 1039 1040 var _ = this, 1041 transition = {}; 1042 1043 transition[_.transitionType] = ''; 1044 1045 if (_.options.fade === false) { 1046 _.$slideTrack.css(transition); 1047 } else { 1048 _.$slides.eq(slide).css(transition); 1049 } 1050 1051 }; 1052 1053 Slick.prototype.fadeSlide = function(slideIndex, callback) { 1054 1055 var _ = this; 1056 1057 if (_.cssTransitions === false) { 1058 1059 _.$slides.eq(slideIndex).css({ 1060 zIndex: _.options.zIndex 1061 }); 1062 1063 _.$slides.eq(slideIndex).animate({ 1064 opacity: 1 1065 }, _.options.speed, _.options.easing, callback); 1066 1067 } else { 1068 1069 _.applyTransition(slideIndex); 1070 1071 _.$slides.eq(slideIndex).css({ 1072 opacity: 1, 1073 zIndex: _.options.zIndex 1074 }); 1075 1076 if (callback) { 1077 setTimeout(function() { 1078 1079 _.disableTransition(slideIndex); 1080 1081 callback.call(); 1082 }, _.options.speed); 1083 } 1084 1085 } 1086 1087 }; 1088 1089 Slick.prototype.fadeSlideOut = function(slideIndex) { 1090 1091 var _ = this; 1092 1093 if (_.cssTransitions === false) { 1094 1095 _.$slides.eq(slideIndex).animate({ 1096 opacity: 0, 1097 zIndex: _.options.zIndex - 2 1098 }, _.options.speed, _.options.easing); 1099 1100 } else { 1101 1102 _.applyTransition(slideIndex); 1103 1104 _.$slides.eq(slideIndex).css({ 1105 opacity: 0, 1106 zIndex: _.options.zIndex - 2 1107 }); 1108 1109 } 1110 1111 }; 1112 1113 Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) { 1114 1115 var _ = this; 1116 1117 if (filter !== null) { 1118 1119 _.$slidesCache = _.$slides; 1120 1121 _.unload(); 1122 1123 _.$slideTrack.children(this.options.slide).detach(); 1124 1125 _.$slidesCache.filter(filter).appendTo(_.$slideTrack); 1126 1127 _.reinit(); 1128 1129 } 1130 1131 }; 1132 1133 Slick.prototype.focusHandler = function() { 1134 1135 var _ = this; 1136 1137 // If any child element receives focus within the slider we need to pause the autoplay 1138 _.$slider 1139 .off('focus.slick blur.slick') 1140 .on( 1141 'focus.slick', 1142 '*', 1143 function(event) { 1144 var $sf = $(this); 1145 1146 setTimeout(function() { 1147 if( _.options.pauseOnFocus ) { 1148 if ($sf.is(':focus')) { 1149 _.focussed = true; 1150 _.autoPlay(); 1151 } 1152 } 1153 }, 0); 1154 } 1155 ).on( 1156 'blur.slick', 1157 '*', 1158 function(event) { 1159 var $sf = $(this); 1160 1161 // When a blur occurs on any elements within the slider we become unfocused 1162 if( _.options.pauseOnFocus ) { 1163 _.focussed = false; 1164 _.autoPlay(); 1165 } 1166 } 1167 ); 1168 }; 1169 1170 Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() { 1171 1172 var _ = this; 1173 return _.currentSlide; 1174 1175 }; 1176 1177 Slick.prototype.getDotCount = function() { 1178 1179 var _ = this; 1180 1181 var breakPoint = 0; 1182 var counter = 0; 1183 var pagerQty = 0; 1184 1185 if (_.options.infinite === true) { 1186 if (_.slideCount <= _.options.slidesToShow) { 1187 ++pagerQty; 1188 } else { 1189 while (breakPoint < _.slideCount) { 1190 ++pagerQty; 1191 breakPoint = counter + _.options.slidesToScroll; 1192 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 1193 } 1194 } 1195 } else if (_.options.centerMode === true) { 1196 pagerQty = _.slideCount; 1197 } else if(!_.options.asNavFor) { 1198 pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); 1199 }else { 1200 while (breakPoint < _.slideCount) { 1201 ++pagerQty; 1202 breakPoint = counter + _.options.slidesToScroll; 1203 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 1204 } 1205 } 1206 1207 return pagerQty - 1; 1208 1209 }; 1210 1211 Slick.prototype.getLeft = function(slideIndex) { 1212 1213 var _ = this, 1214 targetLeft, 1215 verticalHeight, 1216 verticalOffset = 0, 1217 targetSlide, 1218 coef; 1219 1220 _.slideOffset = 0; 1221 verticalHeight = _.$slides.first().outerHeight(true); 1222 1223 if (_.options.infinite === true) { 1224 if (_.slideCount > _.options.slidesToShow) { 1225 _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1; 1226 coef = -1 1227 1228 if (_.options.vertical === true && _.options.centerMode === true) { 1229 if (_.options.slidesToShow === 2) { 1230 coef = -1.5; 1231 } else if (_.options.slidesToShow === 1) { 1232 coef = -2 1233 } 1234 } 1235 verticalOffset = (verticalHeight * _.options.slidesToShow) * coef; 1236 } 1237 if (_.slideCount % _.options.slidesToScroll !== 0) { 1238 if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { 1239 if (slideIndex > _.slideCount) { 1240 _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1; 1241 verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1; 1242 } else { 1243 _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1; 1244 verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1; 1245 } 1246 } 1247 } 1248 } else { 1249 if (slideIndex + _.options.slidesToShow > _.slideCount) { 1250 _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth; 1251 verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight; 1252 } 1253 } 1254 1255 if (_.slideCount <= _.options.slidesToShow) { 1256 _.slideOffset = 0; 1257 verticalOffset = 0; 1258 } 1259 1260 if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) { 1261 _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2); 1262 } else if (_.options.centerMode === true && _.options.infinite === true) { 1263 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; 1264 } else if (_.options.centerMode === true) { 1265 _.slideOffset = 0; 1266 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2); 1267 } 1268 1269 if (_.options.vertical === false) { 1270 targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset; 1271 } else { 1272 targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset; 1273 } 1274 1275 if (_.options.variableWidth === true) { 1276 1277 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 1278 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 1279 } else { 1280 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); 1281 } 1282 1283 if (_.options.rtl === true) { 1284 if (targetSlide[0]) { 1285 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 1286 } else { 1287 targetLeft = 0; 1288 } 1289 } else { 1290 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 1291 } 1292 1293 if (_.options.centerMode === true) { 1294 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 1295 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 1296 } else { 1297 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); 1298 } 1299 1300 if (_.options.rtl === true) { 1301 if (targetSlide[0]) { 1302 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 1303 } else { 1304 targetLeft = 0; 1305 } 1306 } else { 1307 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 1308 } 1309 1310 targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; 1311 } 1312 } 1313 1314 return targetLeft; 1315 1316 }; 1317 1318 Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) { 1319 1320 var _ = this; 1321 1322 return _.options[option]; 1323 1324 }; 1325 1326 Slick.prototype.getNavigableIndexes = function() { 1327 1328 var _ = this, 1329 breakPoint = 0, 1330 counter = 0, 1331 indexes = [], 1332 max; 1333 1334 if (_.options.infinite === false) { 1335 max = _.slideCount; 1336 } else { 1337 breakPoint = _.options.slidesToScroll * -1; 1338 counter = _.options.slidesToScroll * -1; 1339 max = _.slideCount * 2; 1340 } 1341 1342 while (breakPoint < max) { 1343 indexes.push(breakPoint); 1344 breakPoint = counter + _.options.slidesToScroll; 1345 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 1346 } 1347 1348 return indexes; 1349 1350 }; 1351 1352 Slick.prototype.getSlick = function() { 1353 1354 return this; 1355 1356 }; 1357 1358 Slick.prototype.getSlideCount = function() { 1359 1360 var _ = this, 1361 slidesTraversed, swipedSlide, swipeTarget, centerOffset; 1362 1363 centerOffset = _.options.centerMode === true ? Math.floor(_.$list.width() / 2) : 0; 1364 swipeTarget = (_.swipeLeft * -1) + centerOffset; 1365 1366 if (_.options.swipeToSlide === true) { 1367 1368 _.$slideTrack.find('.slick-slide').each(function(index, slide) { 1369 1370 var slideOuterWidth, slideOffset, slideRightBoundary; 1371 slideOuterWidth = $(slide).outerWidth(); 1372 slideOffset = slide.offsetLeft; 1373 if (_.options.centerMode !== true) { 1374 slideOffset += (slideOuterWidth / 2); 1375 } 1376 1377 slideRightBoundary = slideOffset + (slideOuterWidth); 1378 1379 if (swipeTarget < slideRightBoundary) { 1380 swipedSlide = slide; 1381 return false; 1382 } 1383 }); 1384 1385 slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1; 1386 1387 return slidesTraversed; 1388 1389 } else { 1390 return _.options.slidesToScroll; 1391 } 1392 1393 }; 1394 1395 Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) { 1396 1397 var _ = this; 1398 1399 _.changeSlide({ 1400 data: { 1401 message: 'index', 1402 index: parseInt(slide) 1403 } 1404 }, dontAnimate); 1405 1406 }; 1407 1408 Slick.prototype.init = function(creation) { 1409 1410 var _ = this; 1411 1412 if (!$(_.$slider).hasClass('slick-initialized')) { 1413 1414 $(_.$slider).addClass('slick-initialized'); 1415 1416 _.buildRows(); 1417 _.buildOut(); 1418 _.setProps(); 1419 _.startLoad(); 1420 _.loadSlider(); 1421 _.initializeEvents(); 1422 _.updateArrows(); 1423 _.updateDots(); 1424 _.checkResponsive(true); 1425 _.focusHandler(); 1426 1427 } 1428 1429 if (creation) { 1430 _.$slider.trigger('init', [_]); 1431 } 1432 1433 if ( _.options.autoplay ) { 1434 1435 _.paused = false; 1436 _.autoPlay(); 1437 1438 } 1439 1440 _.updateSlideVisibility(); 1441 1442 if(_.options.accessibility != undefined) { 1443 console.warn('accessibility setting is no longer supported.') 1444 } 1445 1446 if(_.options.focusOnChange != undefined) { 1447 console.warn('focusOnChange is no longer supported.'); 1448 } 1449 1450 if(_.options.focusOnSelect != undefined) { 1451 console.warn('focusOnSelect is no longer supported.'); 1452 } 1453 1454 }; 1455 1456 Slick.prototype.initArrowEvents = function() { 1457 1458 var _ = this; 1459 1460 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 1461 _.$prevArrow 1462 .off('click.slick') 1463 .on('click.slick', { 1464 message: 'previous' 1465 }, _.changeSlide); 1466 _.$nextArrow 1467 .off('click.slick') 1468 .on('click.slick', { 1469 message: 'next' 1470 }, _.changeSlide); 1471 } 1472 1473 }; 1474 1475 Slick.prototype.initDotEvents = function() { 1476 1477 var _ = this; 1478 1479 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 1480 $('li', _.$dots).on('click.slick', { 1481 message: 'index' 1482 }, _.changeSlide); 1483 } 1484 1485 if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) { 1486 1487 $('li', _.$dots) 1488 .on('mouseenter.slick', $.proxy(_.interrupt, _, true)) 1489 .on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 1490 1491 } 1492 1493 }; 1494 1495 Slick.prototype.initSlideEvents = function() { 1496 1497 var _ = this; 1498 1499 if ( _.options.pauseOnHover ) { 1500 1501 _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true)); 1502 _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 1503 1504 } 1505 1506 }; 1507 1508 Slick.prototype.initializeEvents = function() { 1509 1510 var _ = this; 1511 1512 _.initArrowEvents(); 1513 1514 _.initDotEvents(); 1515 _.initSlideEvents(); 1516 1517 if(_.options.autoplay && _.options.useAutoplayToggleButton) { 1518 _.$pauseButton.on('click.slick', _.autoPlayToggleHandler); 1519 } 1520 1521 _.$list.on('touchstart.slick mousedown.slick', { 1522 action: 'start' 1523 }, _.swipeHandler); 1524 _.$list.on('touchmove.slick mousemove.slick', { 1525 action: 'move' 1526 }, _.swipeHandler); 1527 _.$list.on('touchend.slick mouseup.slick', { 1528 action: 'end' 1529 }, _.swipeHandler); 1530 _.$list.on('touchcancel.slick mouseleave.slick', { 1531 action: 'end' 1532 }, _.swipeHandler); 1533 1534 _.$list.on('click.slick', _.clickHandler); 1535 1536 $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); 1537 1538 $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); 1539 1540 $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); 1541 1542 $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); 1543 1544 $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); 1545 $(_.setPosition); 1546 1547 }; 1548 1549 Slick.prototype.initUI = function() { 1550 1551 var _ = this; 1552 1553 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 1554 1555 _.$prevArrow.show(); 1556 _.$nextArrow.show(); 1557 1558 } 1559 1560 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 1561 1562 _.$dots.show(); 1563 1564 } 1565 1566 }; 1567 1568 Slick.prototype.lazyLoad = function() { 1569 1570 var _ = this, 1571 loadRange, cloneRange, rangeStart, rangeEnd; 1572 1573 function loadImages(imagesScope) { 1574 1575 $('img[data-lazy]', imagesScope).each(function() { 1576 1577 var image = $(this), 1578 imageSource = $(this).attr('data-lazy'), 1579 imageSrcSet = $(this).attr('data-srcset'), 1580 imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'), 1581 imageToLoad = document.createElement('img'); 1582 1583 imageToLoad.onload = function() { 1584 1585 image 1586 .animate({ opacity: 0 }, 100, function() { 1587 1588 if (imageSrcSet) { 1589 image 1590 .attr('srcset', imageSrcSet ); 1591 1592 if (imageSizes) { 1593 image 1594 .attr('sizes', imageSizes ); 1595 } 1596 } 1597 1598 image 1599 .attr('src', imageSource) 1600 .animate({ opacity: 1 }, 200, function() { 1601 image 1602 .removeAttr('data-lazy data-srcset data-sizes') 1603 .removeClass('slick-loading'); 1604 }); 1605 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 1606 }); 1607 1608 }; 1609 1610 imageToLoad.onerror = function() { 1611 1612 image 1613 .removeAttr( 'data-lazy' ) 1614 .removeClass( 'slick-loading' ) 1615 .addClass( 'slick-lazyload-error' ); 1616 1617 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 1618 1619 }; 1620 1621 imageToLoad.src = imageSource; 1622 1623 }); 1624 1625 } 1626 1627 if (_.options.centerMode === true) { 1628 if (_.options.infinite === true) { 1629 rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); 1630 rangeEnd = rangeStart + _.options.slidesToShow + 2; 1631 } else { 1632 rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); 1633 rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; 1634 } 1635 } else { 1636 rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; 1637 rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); 1638 if (_.options.fade === true) { 1639 if (rangeStart > 0) rangeStart--; 1640 if (rangeEnd <= _.slideCount) rangeEnd++; 1641 } 1642 } 1643 1644 loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); 1645 1646 if (_.options.lazyLoad === 'anticipated') { 1647 var prevSlide = rangeStart - 1, 1648 nextSlide = rangeEnd, 1649 $slides = _.$slider.find('.slick-slide'); 1650 1651 for (var i = 0; i < _.options.slidesToScroll; i++) { 1652 if (prevSlide < 0) prevSlide = _.slideCount - 1; 1653 loadRange = loadRange.add($slides.eq(prevSlide)); 1654 loadRange = loadRange.add($slides.eq(nextSlide)); 1655 prevSlide--; 1656 nextSlide++; 1657 } 1658 } 1659 1660 loadImages(loadRange); 1661 1662 if (_.slideCount <= _.options.slidesToShow) { 1663 cloneRange = _.$slider.find('.slick-slide'); 1664 loadImages(cloneRange); 1665 } else 1666 if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { 1667 cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); 1668 loadImages(cloneRange); 1669 } else if (_.currentSlide === 0) { 1670 cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1); 1671 loadImages(cloneRange); 1672 } 1673 1674 }; 1675 1676 Slick.prototype.loadSlider = function() { 1677 1678 var _ = this; 1679 1680 _.setPosition(); 1681 1682 _.$slideTrack.css({ 1683 opacity: 1 1684 }); 1685 1686 _.$slider.removeClass('slick-loading'); 1687 1688 _.initUI(); 1689 1690 if (_.options.lazyLoad === 'progressive') { 1691 _.progressiveLazyLoad(); 1692 } 1693 1694 }; 1695 1696 Slick.prototype.next = Slick.prototype.slickNext = function() { 1697 1698 var _ = this; 1699 1700 _.changeSlide({ 1701 data: { 1702 message: 'next' 1703 } 1704 }); 1705 1706 }; 1707 1708 Slick.prototype.orientationChange = function() { 1709 1710 var _ = this; 1711 1712 _.checkResponsive(); 1713 _.setPosition(); 1714 1715 }; 1716 1717 Slick.prototype.pause = Slick.prototype.slickPause = function() { 1718 1719 var _ = this; 1720 1721 _.autoPlayClear(); 1722 _.paused = true; 1723 1724 }; 1725 1726 Slick.prototype.play = Slick.prototype.slickPlay = function() { 1727 1728 var _ = this; 1729 1730 _.autoPlay(); 1731 _.options.autoplay = true; 1732 _.paused = false; 1733 _.focussed = false; 1734 _.interrupted = false; 1735 1736 }; 1737 1738 Slick.prototype.postSlide = function(index) { 1739 1740 var _ = this; 1741 1742 if( !_.unslicked ) { 1743 1744 _.$slider.trigger('afterChange', [_, index]); 1745 1746 _.animating = false; 1747 1748 if (_.slideCount > _.options.slidesToShow) { 1749 _.setPosition(); 1750 } 1751 1752 _.swipeLeft = null; 1753 1754 if ( _.options.autoplay ) { 1755 _.autoPlay(); 1756 } 1757 1758 _.updateSlideVisibility(); 1759 1760 } 1761 1762 }; 1763 1764 Slick.prototype.prev = Slick.prototype.slickPrev = function() { 1765 1766 var _ = this; 1767 1768 _.changeSlide({ 1769 data: { 1770 message: 'previous' 1771 } 1772 }); 1773 1774 }; 1775 1776 Slick.prototype.preventDefault = function(event) { 1777 1778 event.preventDefault(); 1779 1780 }; 1781 1782 Slick.prototype.progressiveLazyLoad = function( tryCount ) { 1783 1784 tryCount = tryCount || 1; 1785 1786 var _ = this, 1787 $imgsToLoad = $( 'img[data-lazy]', _.$slider ), 1788 image, 1789 imageSource, 1790 imageSrcSet, 1791 imageSizes, 1792 imageToLoad; 1793 1794 if ( $imgsToLoad.length ) { 1795 1796 image = $imgsToLoad.first(); 1797 imageSource = image.attr('data-lazy'); 1798 imageSrcSet = image.attr('data-srcset'); 1799 imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes'); 1800 imageToLoad = document.createElement('img'); 1801 1802 imageToLoad.onload = function() { 1803 1804 if (imageSrcSet) { 1805 image 1806 .attr('srcset', imageSrcSet ); 1807 1808 if (imageSizes) { 1809 image 1810 .attr('sizes', imageSizes ); 1811 } 1812 } 1813 1814 image 1815 .attr( 'src', imageSource ) 1816 .removeAttr('data-lazy data-srcset data-sizes') 1817 .removeClass('slick-loading'); 1818 1819 if ( _.options.adaptiveHeight === true ) { 1820 _.setPosition(); 1821 } 1822 1823 _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]); 1824 _.progressiveLazyLoad(); 1825 1826 }; 1827 1828 imageToLoad.onerror = function() { 1829 1830 if ( tryCount < 3 ) { 1831 1832 /** 1833 * try to load the image 3 times, 1834 * leave a slight delay so we don't get 1835 * servers blocking the request. 1836 */ 1837 setTimeout( function() { 1838 _.progressiveLazyLoad( tryCount + 1 ); 1839 }, 500 ); 1840 1841 } else { 1842 1843 image 1844 .removeAttr( 'data-lazy' ) 1845 .removeClass( 'slick-loading' ) 1846 .addClass( 'slick-lazyload-error' ); 1847 1848 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 1849 1850 _.progressiveLazyLoad(); 1851 1852 } 1853 1854 }; 1855 1856 imageToLoad.src = imageSource; 1857 1858 } else { 1859 1860 _.$slider.trigger('allImagesLoaded', [ _ ]); 1861 1862 } 1863 1864 }; 1865 1866 Slick.prototype.refresh = function( initializing ) { 1867 1868 var _ = this, currentSlide, lastVisibleIndex; 1869 1870 lastVisibleIndex = _.slideCount - _.options.slidesToShow; 1871 1872 // in non-infinite sliders, we don't want to go past the 1873 // last visible index. 1874 if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) { 1875 _.currentSlide = lastVisibleIndex; 1876 } 1877 1878 // if less slides than to show, go to start. 1879 if ( _.slideCount <= _.options.slidesToShow ) { 1880 _.currentSlide = 0; 1881 1882 } 1883 1884 currentSlide = _.currentSlide; 1885 1886 _.destroy(true); 1887 1888 $.extend(_, _.initials, { currentSlide: currentSlide }); 1889 1890 _.init(); 1891 1892 if( !initializing ) { 1893 1894 _.changeSlide({ 1895 data: { 1896 message: 'index', 1897 index: currentSlide 1898 } 1899 }, false); 1900 1901 } 1902 1903 }; 1904 1905 Slick.prototype.registerBreakpoints = function() { 1906 1907 var _ = this, breakpoint, currentBreakpoint, l, 1908 responsiveSettings = _.options.responsive || null; 1909 1910 if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) { 1911 1912 _.respondTo = _.options.respondTo || 'window'; 1913 1914 for ( breakpoint in responsiveSettings ) { 1915 1916 l = _.breakpoints.length-1; 1917 1918 if (responsiveSettings.hasOwnProperty(breakpoint)) { 1919 currentBreakpoint = responsiveSettings[breakpoint].breakpoint; 1920 1921 // loop through the breakpoints and cut out any existing 1922 // ones with the same breakpoint number, we don't want dupes. 1923 while( l >= 0 ) { 1924 if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) { 1925 _.breakpoints.splice(l,1); 1926 } 1927 l--; 1928 } 1929 1930 _.breakpoints.push(currentBreakpoint); 1931 _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; 1932 1933 } 1934 1935 } 1936 1937 _.breakpoints.sort(function(a, b) { 1938 return ( _.options.mobileFirst ) ? a-b : b-a; 1939 }); 1940 1941 } 1942 1943 }; 1944 1945 Slick.prototype.reinit = function() { 1946 1947 var _ = this; 1948 1949 _.$slides = 1950 _.$slideTrack 1951 .children(_.options.slide) 1952 .addClass('slick-slide'); 1953 1954 _.slideCount = _.$slides.length; 1955 1956 if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) { 1957 _.currentSlide = _.currentSlide - _.options.slidesToScroll; 1958 } 1959 1960 if (_.slideCount <= _.options.slidesToShow) { 1961 _.currentSlide = 0; 1962 } 1963 1964 _.registerBreakpoints(); 1965 1966 _.setProps(); 1967 _.setupInfinite(); 1968 _.buildArrows(); 1969 _.updateArrows(); 1970 _.initArrowEvents(); 1971 _.buildDots(); 1972 _.updateDots(); 1973 _.initDotEvents(); 1974 _.cleanUpSlideEvents(); 1975 _.initSlideEvents(); 1976 1977 _.checkResponsive(false, true); 1978 1979 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 1980 1981 _.setPosition(); 1982 _.focusHandler(); 1983 1984 _.paused = !_.options.autoplay; 1985 _.autoPlay(); 1986 1987 _.$slider.trigger('reInit', [_]); 1988 1989 }; 1990 1991 Slick.prototype.resize = function() { 1992 1993 var _ = this; 1994 1995 if ($(window).width() !== _.windowWidth) { 1996 clearTimeout(_.windowDelay); 1997 _.windowDelay = window.setTimeout(function() { 1998 _.windowWidth = $(window).width(); 1999 _.checkResponsive(); 2000 if( !_.unslicked ) { _.setPosition(); } 2001 }, 50); 2002 } 2003 }; 2004 2005 Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) { 2006 2007 var _ = this; 2008 2009 if (typeof(index) === 'boolean') { 2010 removeBefore = index; 2011 index = removeBefore === true ? 0 : _.slideCount - 1; 2012 } else { 2013 index = removeBefore === true ? --index : index; 2014 } 2015 2016 if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) { 2017 return false; 2018 } 2019 2020 _.unload(); 2021 2022 if (removeAll === true) { 2023 _.$slideTrack.children().remove(); 2024 } else { 2025 _.$slideTrack.children(this.options.slide).eq(index).remove(); 2026 } 2027 2028 _.$slides = _.$slideTrack.children(this.options.slide); 2029 2030 _.$slideTrack.children(this.options.slide).detach(); 2031 2032 _.$slideTrack.append(_.$slides); 2033 2034 _.$slidesCache = _.$slides; 2035 2036 _.reinit(); 2037 2038 }; 2039 2040 Slick.prototype.setCSS = function(position) { 2041 2042 var _ = this, 2043 positionProps = {}, 2044 x, y; 2045 2046 if (_.options.rtl === true) { 2047 position = -position; 2048 } 2049 x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px'; 2050 y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px'; 2051 2052 positionProps[_.positionProp] = position; 2053 2054 if (_.transformsEnabled === false) { 2055 _.$slideTrack.css(positionProps); 2056 } else { 2057 positionProps = {}; 2058 if (_.cssTransitions === false) { 2059 positionProps[_.animType] = 'translate(' + x + ', ' + y + ')'; 2060 _.$slideTrack.css(positionProps); 2061 } else { 2062 positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)'; 2063 _.$slideTrack.css(positionProps); 2064 } 2065 } 2066 2067 }; 2068 2069 Slick.prototype.setDimensions = function() { 2070 2071 var _ = this; 2072 2073 if (_.options.vertical === false) { 2074 if (_.options.centerMode === true) { 2075 _.$list.css({ 2076 padding: ('0px ' + _.options.centerPadding) 2077 }); 2078 } 2079 } else { 2080 _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); 2081 if (_.options.centerMode === true) { 2082 _.$list.css({ 2083 padding: (_.options.centerPadding + ' 0px') 2084 }); 2085 } 2086 } 2087 2088 _.listWidth = _.$list.width(); 2089 _.listHeight = _.$list.height(); 2090 2091 2092 if (_.options.vertical === false && _.options.variableWidth === false) { 2093 _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); 2094 _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length))); 2095 2096 } else if (_.options.variableWidth === true) { 2097 _.$slideTrack.width(5000 * _.slideCount); 2098 } else { 2099 _.slideWidth = Math.ceil(_.listWidth); 2100 _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length))); 2101 } 2102 2103 var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width(); 2104 if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset); 2105 2106 }; 2107 2108 Slick.prototype.setFade = function() { 2109 2110 var _ = this, 2111 targetLeft; 2112 2113 _.$slides.each(function(index, element) { 2114 targetLeft = (_.slideWidth * index) * -1; 2115 if (_.options.rtl === true) { 2116 $(element).css({ 2117 position: 'relative', 2118 right: targetLeft, 2119 top: 0, 2120 zIndex: _.options.zIndex - 2, 2121 opacity: 0 2122 }); 2123 } else { 2124 $(element).css({ 2125 position: 'relative', 2126 left: targetLeft, 2127 top: 0, 2128 zIndex: _.options.zIndex - 2, 2129 opacity: 0 2130 }); 2131 } 2132 }); 2133 2134 _.$slides.eq(_.currentSlide).css({ 2135 zIndex: _.options.zIndex - 1, 2136 opacity: 1 2137 }); 2138 2139 }; 2140 2141 Slick.prototype.setHeight = function() { 2142 2143 var _ = this; 2144 2145 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 2146 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 2147 _.$list.css('height', targetHeight); 2148 } 2149 2150 }; 2151 2152 Slick.prototype.setOption = 2153 Slick.prototype.slickSetOption = function() { 2154 2155 /** 2156 * accepts arguments in format of: 2157 * 2158 * - for changing a single option's value: 2159 * .slick("setOption", option, value, refresh ) 2160 * 2161 * - for changing a set of responsive options: 2162 * .slick("setOption", 'responsive', [{}, ...], refresh ) 2163 * 2164 * - for updating multiple values at once (not responsive) 2165 * .slick("setOption", { 'option': value, ... }, refresh ) 2166 */ 2167 2168 var _ = this, l, item, option, value, refresh = false, type; 2169 2170 if( $.type( arguments[0] ) === 'object' ) { 2171 2172 option = arguments[0]; 2173 refresh = arguments[1]; 2174 type = 'multiple'; 2175 2176 } else if ( $.type( arguments[0] ) === 'string' ) { 2177 2178 option = arguments[0]; 2179 value = arguments[1]; 2180 refresh = arguments[2]; 2181 2182 if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) { 2183 2184 type = 'responsive'; 2185 2186 } else if ( typeof arguments[1] !== 'undefined' ) { 2187 2188 type = 'single'; 2189 2190 } 2191 2192 } 2193 2194 if ( type === 'single' ) { 2195 2196 _.options[option] = value; 2197 2198 2199 } else if ( type === 'multiple' ) { 2200 2201 $.each( option , function( opt, val ) { 2202 2203 _.options[opt] = val; 2204 2205 }); 2206 2207 2208 } else if ( type === 'responsive' ) { 2209 2210 for ( item in value ) { 2211 2212 if( $.type( _.options.responsive ) !== 'array' ) { 2213 2214 _.options.responsive = [ value[item] ]; 2215 2216 } else { 2217 2218 l = _.options.responsive.length-1; 2219 2220 // loop through the responsive object and splice out duplicates. 2221 while( l >= 0 ) { 2222 2223 if( _.options.responsive[l].breakpoint === value[item].breakpoint ) { 2224 2225 _.options.responsive.splice(l,1); 2226 2227 } 2228 2229 l--; 2230 2231 } 2232 2233 _.options.responsive.push( value[item] ); 2234 2235 } 2236 2237 } 2238 2239 } 2240 2241 if ( refresh ) { 2242 2243 _.unload(); 2244 _.reinit(); 2245 2246 } 2247 2248 }; 2249 2250 Slick.prototype.setPosition = function() { 2251 2252 var _ = this; 2253 2254 _.setDimensions(); 2255 2256 _.setHeight(); 2257 2258 if (_.options.fade === false) { 2259 _.setCSS(_.getLeft(_.currentSlide)); 2260 } else { 2261 _.setFade(); 2262 } 2263 2264 _.$slider.trigger('setPosition', [_]); 2265 2266 }; 2267 2268 Slick.prototype.setProps = function() { 2269 2270 var _ = this, 2271 bodyStyle = document.body.style; 2272 2273 _.positionProp = _.options.vertical === true ? 'top' : 'left'; 2274 2275 if (_.positionProp === 'top') { 2276 _.$slider.addClass('slick-vertical'); 2277 } else { 2278 _.$slider.removeClass('slick-vertical'); 2279 } 2280 2281 if (bodyStyle.WebkitTransition !== undefined || 2282 bodyStyle.MozTransition !== undefined || 2283 bodyStyle.msTransition !== undefined) { 2284 if (_.options.useCSS === true) { 2285 _.cssTransitions = true; 2286 } 2287 } 2288 2289 if ( _.options.fade ) { 2290 if ( typeof _.options.zIndex === 'number' ) { 2291 if( _.options.zIndex < 3 ) { 2292 _.options.zIndex = 3; 2293 } 2294 } else { 2295 _.options.zIndex = _.defaults.zIndex; 2296 } 2297 } 2298 2299 if (bodyStyle.OTransform !== undefined) { 2300 _.animType = 'OTransform'; 2301 _.transformType = '-o-transform'; 2302 _.transitionType = 'OTransition'; 2303 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 2304 } 2305 if (bodyStyle.MozTransform !== undefined) { 2306 _.animType = 'MozTransform'; 2307 _.transformType = '-moz-transform'; 2308 _.transitionType = 'MozTransition'; 2309 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false; 2310 } 2311 if (bodyStyle.webkitTransform !== undefined) { 2312 _.animType = 'webkitTransform'; 2313 _.transformType = '-webkit-transform'; 2314 _.transitionType = 'webkitTransition'; 2315 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 2316 } 2317 if (bodyStyle.msTransform !== undefined) { 2318 _.animType = 'msTransform'; 2319 _.transformType = '-ms-transform'; 2320 _.transitionType = 'msTransition'; 2321 if (bodyStyle.msTransform === undefined) _.animType = false; 2322 } 2323 if (bodyStyle.transform !== undefined && _.animType !== false) { 2324 _.animType = 'transform'; 2325 _.transformType = 'transform'; 2326 _.transitionType = 'transition'; 2327 } 2328 _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false); 2329 }; 2330 2331 2332 Slick.prototype.setSlideClasses = function(index) { 2333 2334 var _ = this, 2335 centerOffset, allSlides, indexOffset, remainder; 2336 2337 allSlides = _.$slider 2338 .find('.slick-slide') 2339 .removeClass('slick-active slick-center slick-current') 2340 .attr('aria-hidden', 'true') 2341 .attr('aria-label', function() { 2342 return $(this).attr('aria-label').replace(' (centered)', ''); 2343 }); 2344 2345 _.$slides 2346 .eq(index) 2347 .addClass('slick-current'); 2348 2349 if (_.options.centerMode === true) { 2350 2351 var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0; 2352 2353 centerOffset = Math.floor(_.options.slidesToShow / 2); 2354 2355 if (_.options.infinite === true) { 2356 2357 if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) { 2358 _.$slides 2359 .slice(index - centerOffset + evenCoef, index + centerOffset + 1) 2360 .addClass('slick-active') 2361 .removeAttr('aria-hidden'); 2362 2363 } else { 2364 2365 indexOffset = _.options.slidesToShow + index; 2366 allSlides 2367 .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2) 2368 .addClass('slick-active') 2369 .removeAttr('aria-hidden'); 2370 2371 } 2372 2373 if (index === 0) { 2374 2375 allSlides 2376 .eq( _.options.slidesToShow + _.slideCount + 1 ) 2377 .addClass('slick-center') 2378 .attr('aria-label', function() { 2379 return $(this).attr('aria-label') + ' (centered)'; 2380 }); 2381 2382 } else if (index === _.slideCount - 1) { 2383 2384 allSlides 2385 .eq(_.options.slidesToShow) 2386 .addClass('slick-center') 2387 .attr('aria-label', function() { 2388 return $(this).attr('aria-label') + ' (centered)'; 2389 }); 2390 2391 } 2392 2393 } 2394 2395 _.$slides 2396 .eq(index) 2397 .addClass('slick-center') 2398 .attr('aria-label', function() { 2399 return $(this).attr('aria-label') + ' (centered)'; 2400 }); 2401 2402 } else { 2403 2404 if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) { 2405 2406 _.$slides 2407 .slice(index, index + _.options.slidesToShow) 2408 .addClass('slick-active') 2409 .removeAttr('aria-hidden'); 2410 2411 } else if (allSlides.length <= _.options.slidesToShow) { 2412 2413 allSlides 2414 .addClass('slick-active') 2415 .removeAttr('aria-hidden'); 2416 2417 } else { 2418 2419 remainder = _.slideCount % _.options.slidesToShow; 2420 indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; 2421 2422 if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) { 2423 2424 allSlides 2425 .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder) 2426 .addClass('slick-active') 2427 .removeAttr('aria-hidden'); 2428 2429 } else { 2430 2431 allSlides 2432 .slice(indexOffset, indexOffset + _.options.slidesToShow) 2433 .addClass('slick-active') 2434 .removeAttr('aria-hidden'); 2435 2436 } 2437 2438 } 2439 2440 } 2441 2442 if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') { 2443 _.lazyLoad(); 2444 } 2445 }; 2446 2447 Slick.prototype.setupInfinite = function() { 2448 2449 var _ = this, 2450 i, slideIndex, infiniteCount; 2451 2452 if (_.options.fade === true) { 2453 _.options.centerMode = false; 2454 } 2455 2456 if (_.options.infinite === true && _.options.fade === false) { 2457 2458 slideIndex = null; 2459 2460 if (_.slideCount > _.options.slidesToShow) { 2461 2462 if (_.options.centerMode === true) { 2463 infiniteCount = _.options.slidesToShow + 1; 2464 } else { 2465 infiniteCount = _.options.slidesToShow; 2466 } 2467 2468 for (i = _.slideCount; i > (_.slideCount - 2469 infiniteCount); i -= 1) { 2470 slideIndex = i - 1; 2471 $(_.$slides[slideIndex]).clone(true).attr('id', '') 2472 .attr('data-slick-index', slideIndex - _.slideCount) 2473 .prependTo(_.$slideTrack).addClass('slick-cloned'); 2474 } 2475 for (i = 0; i < infiniteCount + _.slideCount; i += 1) { 2476 slideIndex = i; 2477 $(_.$slides[slideIndex]).clone(true).attr('id', '') 2478 .attr('data-slick-index', slideIndex + _.slideCount) 2479 .appendTo(_.$slideTrack).addClass('slick-cloned'); 2480 } 2481 _.$slideTrack.find('.slick-cloned').find('[id]').each(function() { 2482 $(this).attr('id', ''); 2483 }); 2484 2485 } 2486 2487 } 2488 2489 }; 2490 2491 Slick.prototype.interrupt = function( toggle ) { 2492 2493 var _ = this; 2494 2495 if( !toggle ) { 2496 _.autoPlay(); 2497 } 2498 _.interrupted = toggle; 2499 2500 }; 2501 2502 Slick.prototype.selectHandler = function(event) { 2503 2504 var _ = this; 2505 2506 var targetElement = 2507 $(event.target).is('.slick-slide') ? 2508 $(event.target) : 2509 $(event.target).parents('.slick-slide'); 2510 2511 var index = parseInt(targetElement.attr('data-slick-index')); 2512 2513 if (!index) index = 0; 2514 2515 if (_.slideCount <= _.options.slidesToShow) { 2516 2517 _.slideHandler(index, false, true); 2518 return; 2519 2520 } 2521 2522 _.slideHandler(index); 2523 2524 }; 2525 2526 Slick.prototype.slideHandler = function(index, sync, dontAnimate) { 2527 2528 var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null, 2529 _ = this, navTarget; 2530 2531 sync = sync || false; 2532 2533 if (_.animating === true && _.options.waitForAnimate === true) { 2534 return; 2535 } 2536 2537 if (_.options.fade === true && _.currentSlide === index) { 2538 return; 2539 } 2540 2541 if (sync === false) { 2542 _.asNavFor(index); 2543 } 2544 2545 targetSlide = index; 2546 targetLeft = _.getLeft(targetSlide); 2547 slideLeft = _.getLeft(_.currentSlide); 2548 2549 _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; 2550 2551 if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { 2552 if (_.options.fade === false) { 2553 targetSlide = _.currentSlide; 2554 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 2555 _.animateSlide(slideLeft, function() { 2556 _.postSlide(targetSlide); 2557 }); 2558 } else { 2559 _.postSlide(targetSlide); 2560 } 2561 } 2562 return; 2563 } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) { 2564 if (_.options.fade === false) { 2565 targetSlide = _.currentSlide; 2566 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 2567 _.animateSlide(slideLeft, function() { 2568 _.postSlide(targetSlide); 2569 }); 2570 } else { 2571 _.postSlide(targetSlide); 2572 } 2573 } 2574 return; 2575 } 2576 2577 if ( _.options.autoplay ) { 2578 clearInterval(_.autoPlayTimer); 2579 } 2580 2581 if (targetSlide < 0) { 2582 if (_.slideCount % _.options.slidesToScroll !== 0) { 2583 animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll); 2584 } else { 2585 animSlide = _.slideCount + targetSlide; 2586 } 2587 } else if (targetSlide >= _.slideCount) { 2588 if (_.slideCount % _.options.slidesToScroll !== 0) { 2589 animSlide = 0; 2590 } else { 2591 animSlide = targetSlide - _.slideCount; 2592 } 2593 } else { 2594 animSlide = targetSlide; 2595 } 2596 2597 _.animating = true; 2598 2599 _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); 2600 2601 oldSlide = _.currentSlide; 2602 _.currentSlide = animSlide; 2603 2604 _.setSlideClasses(_.currentSlide); 2605 2606 if ( _.options.asNavFor ) { 2607 2608 navTarget = _.getNavTarget(); 2609 navTarget = navTarget.slick('getSlick'); 2610 2611 if ( navTarget.slideCount <= navTarget.options.slidesToShow ) { 2612 navTarget.setSlideClasses(_.currentSlide); 2613 } 2614 2615 } 2616 2617 _.updateDots(); 2618 _.updateArrows(); 2619 2620 if (_.options.fade === true) { 2621 if (dontAnimate !== true) { 2622 2623 _.fadeSlideOut(oldSlide); 2624 2625 _.fadeSlide(animSlide, function() { 2626 _.postSlide(animSlide); 2627 }); 2628 2629 } else { 2630 _.postSlide(animSlide); 2631 } 2632 _.animateHeight(); 2633 return; 2634 } 2635 2636 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 2637 _.animateSlide(targetLeft, function() { 2638 _.postSlide(animSlide); 2639 }); 2640 } else { 2641 _.postSlide(animSlide); 2642 } 2643 2644 }; 2645 2646 Slick.prototype.startLoad = function() { 2647 2648 var _ = this; 2649 2650 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 2651 2652 _.$prevArrow.hide(); 2653 _.$nextArrow.hide(); 2654 2655 } 2656 2657 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 2658 2659 _.$dots.hide(); 2660 2661 } 2662 2663 _.$slider.addClass('slick-loading'); 2664 2665 }; 2666 2667 Slick.prototype.swipeDirection = function() { 2668 2669 var xDist, yDist, r, swipeAngle, _ = this; 2670 2671 xDist = _.touchObject.startX - _.touchObject.curX; 2672 yDist = _.touchObject.startY - _.touchObject.curY; 2673 r = Math.atan2(yDist, xDist); 2674 2675 swipeAngle = Math.round(r * 180 / Math.PI); 2676 if (swipeAngle < 0) { 2677 swipeAngle = 360 - Math.abs(swipeAngle); 2678 } 2679 2680 if ((swipeAngle <= 45) && (swipeAngle >= 0)) { 2681 return (_.options.rtl === false ? 'left' : 'right'); 2682 } 2683 if ((swipeAngle <= 360) && (swipeAngle >= 315)) { 2684 return (_.options.rtl === false ? 'left' : 'right'); 2685 } 2686 if ((swipeAngle >= 135) && (swipeAngle <= 225)) { 2687 return (_.options.rtl === false ? 'right' : 'left'); 2688 } 2689 if (_.options.verticalSwiping === true) { 2690 if ((swipeAngle >= 35) && (swipeAngle <= 135)) { 2691 return 'down'; 2692 } else { 2693 return 'up'; 2694 } 2695 } 2696 2697 return 'vertical'; 2698 2699 }; 2700 2701 Slick.prototype.swipeEnd = function(event) { 2702 2703 var _ = this, 2704 slideCount, 2705 direction; 2706 2707 _.dragging = false; 2708 _.swiping = false; 2709 2710 if (_.scrolling) { 2711 _.scrolling = false; 2712 return false; 2713 } 2714 2715 _.interrupted = false; 2716 _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true; 2717 2718 if ( _.touchObject.curX === undefined ) { 2719 return false; 2720 } 2721 2722 if ( _.touchObject.edgeHit === true ) { 2723 _.$slider.trigger('edge', [_, _.swipeDirection() ]); 2724 } 2725 2726 if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) { 2727 2728 direction = _.swipeDirection(); 2729 2730 switch ( direction ) { 2731 2732 case 'left': 2733 case 'down': 2734 2735 slideCount = 2736 _.options.swipeToSlide ? 2737 _.checkNavigable( _.currentSlide + _.getSlideCount() ) : 2738 _.currentSlide + _.getSlideCount(); 2739 2740 _.currentDirection = 0; 2741 2742 break; 2743 2744 case 'right': 2745 case 'up': 2746 2747 slideCount = 2748 _.options.swipeToSlide ? 2749 _.checkNavigable( _.currentSlide - _.getSlideCount() ) : 2750 _.currentSlide - _.getSlideCount(); 2751 2752 _.currentDirection = 1; 2753 2754 break; 2755 2756 default: 2757 2758 2759 } 2760 2761 if( direction != 'vertical' ) { 2762 2763 _.slideHandler( slideCount ); 2764 _.touchObject = {}; 2765 _.$slider.trigger('swipe', [_, direction ]); 2766 2767 } 2768 2769 } else { 2770 2771 if ( _.touchObject.startX !== _.touchObject.curX ) { 2772 2773 _.slideHandler( _.currentSlide ); 2774 _.touchObject = {}; 2775 2776 } 2777 2778 } 2779 2780 }; 2781 2782 Slick.prototype.swipeHandler = function(event) { 2783 2784 var _ = this; 2785 2786 if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) { 2787 return; 2788 } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) { 2789 return; 2790 } 2791 2792 _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? 2793 event.originalEvent.touches.length : 1; 2794 2795 _.touchObject.minSwipe = _.listWidth / _.options 2796 .touchThreshold; 2797 2798 if (_.options.verticalSwiping === true) { 2799 _.touchObject.minSwipe = _.listHeight / _.options 2800 .touchThreshold; 2801 } 2802 2803 switch (event.data.action) { 2804 2805 case 'start': 2806 _.swipeStart(event); 2807 break; 2808 2809 case 'move': 2810 _.swipeMove(event); 2811 break; 2812 2813 case 'end': 2814 _.swipeEnd(event); 2815 break; 2816 2817 } 2818 2819 }; 2820 2821 Slick.prototype.swipeMove = function(event) { 2822 2823 var _ = this, 2824 edgeWasHit = false, 2825 curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength; 2826 2827 touches = event.originalEvent !== undefined ? event.originalEvent.touches : null; 2828 2829 if (!_.dragging || _.scrolling || touches && touches.length !== 1) { 2830 return false; 2831 } 2832 2833 curLeft = _.getLeft(_.currentSlide); 2834 2835 _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX; 2836 _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY; 2837 2838 _.touchObject.swipeLength = Math.round(Math.sqrt( 2839 Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); 2840 2841 verticalSwipeLength = Math.round(Math.sqrt( 2842 Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); 2843 2844 if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) { 2845 _.scrolling = true; 2846 return false; 2847 } 2848 2849 if (_.options.verticalSwiping === true) { 2850 _.touchObject.swipeLength = verticalSwipeLength; 2851 } 2852 2853 swipeDirection = _.swipeDirection(); 2854 2855 if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) { 2856 _.swiping = true; 2857 event.preventDefault(); 2858 } 2859 2860 positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); 2861 if (_.options.verticalSwiping === true) { 2862 positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; 2863 } 2864 2865 2866 swipeLength = _.touchObject.swipeLength; 2867 2868 _.touchObject.edgeHit = false; 2869 2870 if (_.options.infinite === false) { 2871 if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) { 2872 swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; 2873 _.touchObject.edgeHit = true; 2874 } 2875 } 2876 2877 if (_.options.vertical === false) { 2878 _.swipeLeft = curLeft + swipeLength * positionOffset; 2879 } else { 2880 _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset; 2881 } 2882 if (_.options.verticalSwiping === true) { 2883 _.swipeLeft = curLeft + swipeLength * positionOffset; 2884 } 2885 2886 if (_.options.fade === true || _.options.touchMove === false) { 2887 return false; 2888 } 2889 2890 if (_.animating === true) { 2891 _.swipeLeft = null; 2892 return false; 2893 } 2894 2895 _.setCSS(_.swipeLeft); 2896 2897 }; 2898 2899 Slick.prototype.swipeStart = function(event) { 2900 2901 var _ = this, 2902 touches; 2903 2904 _.interrupted = true; 2905 2906 if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { 2907 _.touchObject = {}; 2908 return false; 2909 } 2910 2911 if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) { 2912 touches = event.originalEvent.touches[0]; 2913 } 2914 2915 _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX; 2916 _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY; 2917 2918 _.dragging = true; 2919 2920 }; 2921 2922 Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() { 2923 2924 var _ = this; 2925 2926 if (_.$slidesCache !== null) { 2927 2928 _.unload(); 2929 2930 _.$slideTrack.children(this.options.slide).detach(); 2931 2932 _.$slidesCache.appendTo(_.$slideTrack); 2933 2934 _.reinit(); 2935 2936 } 2937 2938 }; 2939 2940 Slick.prototype.unload = function() { 2941 2942 var _ = this; 2943 2944 $('.slick-cloned', _.$slider).remove(); 2945 2946 if (_.$dots) { 2947 _.$dots.remove(); 2948 } 2949 2950 if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { 2951 _.$prevArrow.remove(); 2952 } 2953 2954 if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { 2955 _.$nextArrow.remove(); 2956 } 2957 2958 _.$slides 2959 .removeClass('slick-slide slick-active slick-visible slick-current') 2960 .attr('aria-hidden', 'true') 2961 .css('width', ''); 2962 2963 }; 2964 2965 Slick.prototype.unslick = function(fromBreakpoint) { 2966 2967 var _ = this; 2968 _.$slider.trigger('unslick', [_, fromBreakpoint]); 2969 _.destroy(); 2970 2971 }; 2972 2973 Slick.prototype.updateArrows = function() { 2974 2975 var _ = this, 2976 centerOffset; 2977 2978 centerOffset = Math.floor(_.options.slidesToShow / 2); 2979 2980 if ( _.options.arrows === true && 2981 _.slideCount > _.options.slidesToShow && 2982 !_.options.infinite ) { 2983 2984 _.$prevArrow.removeClass('slick-disabled').prop('disabled', false); 2985 _.$nextArrow.removeClass('slick-disabled').prop('disabled', false); 2986 2987 if (_.currentSlide === 0) { 2988 2989 _.$prevArrow.addClass('slick-disabled').prop('disabled', true); 2990 _.$nextArrow.removeClass('slick-disabled').prop('disabled', false); 2991 2992 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { 2993 2994 _.$nextArrow.addClass('slick-disabled').prop('disabled', true); 2995 _.$prevArrow.removeClass('slick-disabled').prop('disabled', false); 2996 2997 } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { 2998 2999 _.$nextArrow.addClass('slick-disabled').prop('disabled', true); 3000 _.$prevArrow.removeClass('slick-disabled').prop('disabled', false); 3001 3002 } 3003 3004 } 3005 3006 }; 3007 3008 Slick.prototype.updateDots = function() { 3009 3010 var _ = this; 3011 3012 if (_.$dots !== null) { 3013 3014 _.$dots 3015 .find('li') 3016 .removeClass('slick-active') 3017 .find('button') 3018 .removeAttr('aria-current') 3019 .end() 3020 .end(); 3021 3022 _.$dots 3023 .find('li') 3024 .eq(Math.floor(_.currentSlide / _.options.slidesToScroll)) 3025 .addClass('slick-active') 3026 .find('button') 3027 .attr('aria-current', true) 3028 .end() 3029 .end(); 3030 3031 } 3032 3033 }; 3034 3035 Slick.prototype.updateSlideVisibility = function() { 3036 var _ = this; 3037 3038 _.$slideTrack 3039 .find('.slick-slide') 3040 .attr('aria-hidden', 'true') 3041 .find('a, input, button, select') 3042 .attr('tabindex', '-1'); 3043 3044 _.$slideTrack 3045 .find('.slick-active') 3046 .removeAttr('aria-hidden') 3047 .find('a, input, button, select') 3048 .removeAttr('tabindex'); 3049 } 3050 3051 Slick.prototype.visibility = function() { 3052 3053 var _ = this; 3054 3055 if ( _.options.autoplay ) { 3056 3057 if ( document[_.hidden] ) { 3058 3059 _.interrupted = true; 3060 3061 } else { 3062 3063 _.interrupted = false; 3064 3065 } 3066 3067 } 3068 3069 }; 3070 3071 $.fn.slick = function() { 3072 var _ = this, 3073 opt = arguments[0], 3074 args = Array.prototype.slice.call(arguments, 1), 3075 l = _.length, 3076 i, 3077 ret; 3078 for (i = 0; i < l; i++) { 3079 if (typeof opt == 'object' || typeof opt == 'undefined') 3080 _[i].slick = new Slick(_[i], opt); 3081 else 3082 ret = _[i].slick[opt].apply(_[i].slick, args); 3083 if (typeof ret != 'undefined') return ret; 3084 } 3085 return _; 3086 }; 3087 3088})); 3089 3090 3091/***/ }), 3092
3093/***/ "./app/assets/js/app.js": 3094/*!******************************!*\ 3095 !*** ./app/assets/js/app.js ***! 3096 \******************************/ 3097/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3098 3099"use strict"; 3100__webpack_require__.r(__webpack_exports__); 3101/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3102/* harmony export */ requireAll: () => (/* binding */ requireAll) 3103/* harmony export */ }); 3104/************************* 3105 * 3106 * jQuery 3107 * 3108 *********************** */ 3109if (typeof jQuery !== 'undefined') { 3110 window.$ = window.jQuery = $ = jQuery.noConflict(); 3111} 3112function requireAll(r) { 3113 r.keys().forEach(r); 3114} 3115requireAll(__webpack_require__("./app/assets/js/modules sync recursive (.*)\\.loader\\.js$")); 3116$(document).ready(function ($) { 3117 $(document).on('nfFormReady', function () { 3118 if (window.nfMessagingLoaded) return; 3119 window.nfMessagingLoaded = true; 3120 if ($('.sendingmessage').length) { 3121 $('.sendingmessage').appendTo('body'); 3122 } 3123 var ninjaFormSuccessMessaging = Marionette.Object.extend({ 3124 initialize: function initialize() { 3125 var formsChannel = Backbone.Radio.channel('forms'); 3126 var fieldsChannel = Backbone.Radio.channel('fields'); 3127 this.listenTo(formsChannel, 'submit:response', this.actionSubmit); 3128 this.listenTo(fieldsChannel, 'add:error', this.hideProcessing); 3129 $(document).on('click', '.nf-field-element input[type="submit"], .nf-field-element input[type="button"]', this.showProcessing.bind(this)); 3130 }, 3131 showProcessing: function showProcessing() { 3132 if (this.loaderTimer) clearTimeout(this.loaderTimer); 3133 this.loaderTimer = setTimeout(function () { 3134 var formHasErrors = $('.nf-error-wrap').text().trim().length > 0; 3135 if (!formHasErrors) { 3136 $('.sendingmessage').addClass('show').fadeIn(); 3137 } 3138 }, 100); 3139 }, 3140 hideProcessing: function hideProcessing() { 3141 if (this.loaderTimer) clearTimeout(this.loaderTimer); 3142 $('.sendingmessage').removeClass('show').hide(); 3143 }, 3144 actionSubmit: function actionSubmit(response) { 3145 var _this = this; 3146 if (response.errors && Object.keys(response.errors).length > 0) { 3147 this.hideProcessing(); 3148 return; 3149 } 3150 setTimeout(function () { 3151 $('.sendingmessage').fadeOut(400, function () { 3152 _this.hideProcessing(); 3153 $('.nf-form-layout').hide(); 3154 $('.intro-block').hide(); 3155 var $nfSuccessBox = $('.nf-response-msg'); 3156 var imgSrc = $nfSuccessBox.find('img').attr('src'); 3157 var headingText = $nfSuccessBox.find('h2').not(':has(img)').first().text(); 3158 var paragraphHtml = $nfSuccessBox.find('p').not(':has(img)').first().html(); 3159 if (!headingText) headingText = 'We’ve received your message'; 3160 if (!paragraphHtml) paragraphHtml = 'Thanks for getting in touch.'; 3161 var customSuccessHtml = "\n <div class=\"successMessage show\" style=\"display: flex;\">\n <div class=\"circle\">\n ".concat(imgSrc ? "<img src=\"".concat(imgSrc, "\" alt=\"Success icon\">") : '', "\n </div>\n <h2 class=\"heading\">").concat(headingText, "</h2>\n <p>").concat(paragraphHtml, "</p>\n </div>\n "); 3162 $nfSuccessBox.html(customSuccessHtml).show(); 3163 }); 3164 if (response.data && response.data.actions && response.data.actions.redirect) { 3165 window.location.href = response.data.actions.redirect; 3166 } 3167 }, 3000); 3168 } 3169 }); 3170 new ninjaFormSuccessMessaging(); 3171 }); 3172}); 3173 3174/***/ }), 3175
3176/***/ "./app/assets/js/modules/accordion.loader.js": 3177/*!***************************************************!*\ 3178 !*** ./app/assets/js/modules/accordion.loader.js ***! 3179 \***************************************************/ 3180/***/ (() => { 3181 3182(function ($) { 3183 $(document).ready(function () { 3184 // Find all accordion triggers 3185 $('.accordion-trigger').on('click', function (e) { 3186 e.preventDefault(); 3187 var $this = $(this); 3188 var $content = $this.parent('h3').next('.accordion-content'); 3189 var isExpanded = $this.attr('aria-expanded') === 'true'; 3190 3191 // Toggle the ARIA attribute 3192 $this.attr('aria-expanded', !isExpanded); 3193 3194 // --- THIS IS THE FIX --- 3195 // We must manually control slideUp/slideDown 3196 // to work correctly with the [hidden] attribute. 3197 3198 if (isExpanded) { 3199 // It's currently open, so we are CLOSING it. 3200 // Animate it sliding up... 3201 $content.slideUp(300, function () { 3202 // ...then add the 'hidden' attribute after it's invisible. 3203 $content.attr('hidden', true); 3204 }); 3205 } else { 3206 // It's currently closed, so we are OPENING it. 3207 // We MUST remove 'hidden' first... 3208 $content.removeAttr('hidden'); 3209 // ...then animate it sliding down. 3210 $content.slideDown(300); 3211 } 3212 3213 // We no longer use slideToggle() as it conflicts with the 'hidden' attribute. 3214 }); 3215 }); 3216})(jQuery); 3217 3218/***/ }), 3219
3220/***/ "./app/assets/js/modules/billboard.loader.js": 3221/*!***************************************************!*\ 3222 !*** ./app/assets/js/modules/billboard.loader.js ***! 3223 \***************************************************/ 3224/***/ (() => { 3225 3226jQuery(document).ready(function ($) { 3227 var playerElement = $('.video')[0]; 3228 var desktopPlayer = playerElement ? new Vimeo.Player(playerElement) : null; 3229 var $toggleIcon = $('.fa-pause'); 3230 function togglePlayPause() { 3231 if (desktopPlayer) { 3232 desktopPlayer.getPaused().then(function (isPaused) { 3233 if (isPaused) { 3234 desktopPlayer.play(); 3235 $toggleIcon.removeClass('fa-play').addClass('fa-pause'); 3236 } else { 3237 desktopPlayer.pause(); 3238 $toggleIcon.removeClass('fa-pause').addClass('fa-play'); 3239 } 3240 }); 3241 } 3242 } 3243 $toggleIcon.on('click', togglePlayPause); 3244}); 3245 3246/***/ }), 3247
3248/***/ "./app/assets/js/modules/blockHeader.loader.js": 3249/*!*****************************************************!*\ 3250 !*** ./app/assets/js/modules/blockHeader.loader.js ***! 3251 \*****************************************************/ 3252/***/ (() => { 3253 3254jQuery(document).ready(function ($) { 3255 function adjustMediaHeightWordy() { 3256 if ($('.header-block .wrapper').hasClass('wordy')) { 3257 var contentHeight = $('.content').outerHeight(); 3258 var mediaHeight; 3259 if ($(window).width() >= 992) { 3260 mediaHeight = contentHeight + 88 + 88; 3261 } else { 3262 mediaHeight = contentHeight + 30 + 30; 3263 } 3264 $('.media').css('min-height', mediaHeight); 3265 $('.media img').css('min-height', mediaHeight); 3266 } 3267 } 3268 adjustMediaHeightWordy(); 3269 $(window).resize(function () { 3270 adjustMediaHeightWordy(); 3271 }); 3272}); 3273jQuery(document).ready(function ($) { 3274 function adjustMediaHeightConcise() { 3275 if ($('.header-block .wrapper').hasClass('no-media')) { 3276 var contentHeight = $('.content').outerHeight(); 3277 var mediaHeight; 3278 if ($(window).width() >= 992) { 3279 mediaHeight = contentHeight + 120 + 120; 3280 } else { 3281 mediaHeight = contentHeight + 30 + 30; 3282 } 3283 $('.media').css('min-height', mediaHeight); 3284 } 3285 } 3286 adjustMediaHeightConcise(); 3287 $(window).resize(function () { 3288 adjustMediaHeightConcise(); 3289 }); 3290}); 3291 3292/***/ }), 3293
3294/***/ "./app/assets/js/modules/details.loader.js": 3295/*!*************************************************!*\ 3296 !*** ./app/assets/js/modules/details.loader.js ***! 3297 \*************************************************/ 3298/***/ (() => { 3299 3300$(document).ready(function () { 3301 function debounce(func, wait, immediate) { 3302 var timeout; 3303 return function () { 3304 var context = this, 3305 args = arguments; 3306 var later = function later() { 3307 timeout = null; 3308 if (!immediate) func.apply(context, args); 3309 }; 3310 var callNow = immediate && !timeout; 3311 clearTimeout(timeout); 3312 timeout = setTimeout(later, wait); 3313 if (callNow) func.apply(context, args); 3314 }; 3315 } 3316 ; 3317 function checkHrWidths() { 3318 $('.copy-block .copy .content .credit-list .credit').each(function () { 3319 var $hr = $(this).find('hr'); 3320 var $castDivs = $(this).find('.cast div'); 3321 if ($hr.length && $castDivs.length) { 3322 var isCurrentlyAuto = $(this).hasClass('width-auto'); 3323 if ($hr.width() < 4) { 3324 if (!isCurrentlyAuto) { 3325 $castDivs.css('width', 'auto'); 3326 $(this).addClass('width-auto'); 3327 } 3328 } else { 3329 if (isCurrentlyAuto) { 3330 $castDivs.css('width', ''); 3331 $(this).removeClass('width-auto'); 3332 } 3333 } 3334 } 3335 }); 3336 } 3337 checkHrWidths(); 3338 var debouncedCheckHrWidths = debounce(checkHrWidths, 100); 3339 $(window).resize(debouncedCheckHrWidths); 3340}); 3341 3342/***/ }), 3343
3344/***/ "./app/assets/js/modules/header.loader.js": 3345/*!************************************************!*\ 3346 !*** ./app/assets/js/modules/header.loader.js ***! 3347 \************************************************/ 3348/***/ (() => { 3349 3350jQuery(document).ready(function ($) { 3351 $('.hamburger').click(function () { 3352 $('#header nav').toggleClass('active'); 3353 $(this).toggleClass('active'); 3354 $('body').toggleClass('mobile-nav-open'); 3355 if ($('#header nav .right').is(':visible')) { 3356 $('#header nav .right').stop(true, true).slideUp(100); 3357 } else { 3358 $('#header nav .right').stop(true, true).slideDown(300); 3359 } 3360 var expanded = $(this).attr('aria-expanded') === 'true' || false; 3361 $(this).attr('aria-expanded', !expanded); 3362 }); 3363}); 3364jQuery(document).ready(function ($) { 3365 if ($(window).width() < 992) { 3366 $('#header .menu-item-has-children > a').on('click', function (e) { 3367 e.preventDefault(); 3368 $(this).toggleClass('active'); 3369 var $submenu = $(this).siblings('.sub-menu'); 3370 if ($submenu.is(':visible')) { 3371 $submenu.slideUp(200); 3372 } else { 3373 $('.menu-item-has-children .sub-menu').slideUp(200); 3374 $submenu.slideDown(200); 3375 } 3376 }); 3377 } 3378}); 3379jQuery(document).ready(function ($) { 3380 if ($(window).width() > 992) { 3381 $('.search-form-nav .search-button').on('click', function (e) { 3382 e.preventDefault(); 3383 var $form = $(this).closest('.search-form-nav'); 3384 var $input = $form.find('input[type="search"]'); 3385 var searchValue = $input.val().trim(); 3386 if (searchValue === '') { 3387 $form.toggleClass('active'); 3388 } else if ($form.hasClass('active')) { 3389 $form.submit(); 3390 } else { 3391 $form.addClass('active'); 3392 } 3393 }); 3394 } else { 3395 $('.search-form-nav .search-button').on('click', function (e) { 3396 var $form = $(this).closest('.search-form-nav'); 3397 $form.submit(); 3398 }); 3399 } 3400}); 3401 3402/***/ }), 3403
3404/***/ "./app/assets/js/modules/hero.loader.js": 3405/*!**********************************************!*\ 3406 !*** ./app/assets/js/modules/hero.loader.js ***! 3407 \**********************************************/ 3408/***/ (() => { 3409 3410jQuery(document).ready(function ($) { 3411 // Check if the desktop and mobile players exist 3412 var desktopPlayerElement = $('.video-desktop')[0]; 3413 var mobilePlayerElement = $('.video-mobile')[0]; 3414 3415 // Initialize players only if the elements are found 3416 var desktopPlayer = desktopPlayerElement ? new Vimeo.Player(desktopPlayerElement) : null; 3417 var mobilePlayer = mobilePlayerElement ? new Vimeo.Player(mobilePlayerElement) : null; 3418 var $toggleIcon = $('.fa-pause'); 3419 function togglePlayPause() { 3420 if (desktopPlayer) { 3421 desktopPlayer.getPaused().then(function (isPaused) { 3422 if (isPaused) { 3423 desktopPlayer.play(); 3424 if (mobilePlayer) mobilePlayer.play(); 3425 $toggleIcon.removeClass('fa-play').addClass('fa-pause'); 3426 } else { 3427 desktopPlayer.pause(); 3428 if (mobilePlayer) mobilePlayer.pause(); 3429 $toggleIcon.removeClass('fa-pause').addClass('fa-play'); 3430 } 3431 }); 3432 } 3433 } 3434 $toggleIcon.on('click', togglePlayPause); 3435}); 3436 3437/***/ }), 3438
3439/***/ "./app/assets/js/modules/media-slider.loader.js": 3440/*!******************************************************!*\ 3441 !*** ./app/assets/js/modules/media-slider.loader.js ***! 3442 \******************************************************/ 3443/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3444 3445"use strict"; 3446__webpack_require__.r(__webpack_exports__); 3447/* harmony import */ var _accessible360_accessible_slick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @accessible360/accessible-slick */ "./node_modules/@accessible360/accessible-slick/slick/slick.js"); 3448/* harmony import */ var _accessible360_accessible_slick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_accessible360_accessible_slick__WEBPACK_IMPORTED_MODULE_0__); 3449 3450jQuery(document).ready(function ($) { 3451 var slideCount = jQuery('.gallery > div').length; 3452 var slickOptions = { 3453 centerMode: true, 3454 //centerPadding: '0vw', 3455 slidesToShow: 3, 3456 slidesToScroll: 1, 3457 // dots: true, 3458 dots: slideCount <= 5, 3459 arrows: false, 3460 infinite: true, 3461 regionLabel: 'Image Gallery Carousel', 3462 initialSlide: 1, 3463 adaptiveHeight: true, 3464 customPaging: function customPaging(slider, i) { 3465 //custom buttons/dots 3466 var ico = ""; 3467 if ($(slider.$slides[i]).find('.videoframe').length == 1) { 3468 ico = "video"; 3469 } 3470 var linkto = $(slider.$slides[i]).data('slickIndex') + 1; 3471 return '<button type="button"><span class="slick-dot-icon ' + ico + '" aria-hidden="true"></span><span class="slick-sr-only">Go to Slide ' + linkto + '</span></button>'; 3472 }, 3473 responsive: [{ 3474 breakpoint: 992, 3475 settings: { 3476 slidesToShow: 1, 3477 slidesToScroll: 1, 3478 centerMode: false, 3479 centerPadding: '2vw', 3480 adaptiveHeight: true 3481 } 3482 }] 3483 }; 3484 if (slideCount <= 3) { 3485 // slickOptions.centerMode = false; 3486 slickOptions.slidesToShow = 1; 3487 console.log("first"); 3488 } 3489 3490 // Initialize Slick with our final, dynamic options 3491 jQuery('.gallery').slick(slickOptions); 3492 $('.btn-prev').on('click', function () { 3493 $('.gallery').slick('slickPrev'); 3494 }); 3495 $('.btn-next').on('click', function () { 3496 $('.gallery').slick('slickNext'); 3497 }); 3498 jQuery('.gallery').on('beforeChange', function () { 3499 // pause videos when slide changes 3500 var allIframes = document.getElementsByTagName("iframe"); 3501 for (var i = 0; i < allIframes.length; i++) { 3502 if (allIframes[i].src == null || allIframes[i].src.indexOf("player.vimeo.com") == -1) { 3503 continue; 3504 } 3505 var player = new Vimeo.Player(allIframes[i]); 3506 player.pause(); 3507 } 3508 }); 3509 3510 // Fix: recalculate slide positions after orientation change. 3511 // A short delay is required to allow the browser to finish 3512 // repainting at the new dimensions before Slick measures the layout. 3513 var orientationTimer; 3514 $(window).on('orientationchange', function () { 3515 clearTimeout(orientationTimer); 3516 orientationTimer = setTimeout(function () { 3517 jQuery('.gallery').slick('setPosition'); 3518 }, 300); 3519 }); 3520}); 3521 3522/***/ }), 3523
3524/***/ "./app/assets/js/modules/pastperf.loader.js": 3525/*!**************************************************!*\ 3526 !*** ./app/assets/js/modules/pastperf.loader.js ***! 3527 \**************************************************/ 3528/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3529 3530"use strict"; 3531__webpack_require__.r(__webpack_exports__); 3532/* harmony import */ var _accessible360_accessible_slick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @accessible360/accessible-slick */ "./node_modules/@accessible360/accessible-slick/slick/slick.js"); 3533/* harmony import */ var _accessible360_accessible_slick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_accessible360_accessible_slick__WEBPACK_IMPORTED_MODULE_0__); 3534 3535 3536jQuery(document).ready(function ($) { 3537 // Slide nav width 3538 // let slidenavwidth = $('.perfnav li').length * 40; 3539 // $('.perfnav').css('width', slidenavwidth + "px"); 3540 3541 // Initialize 3rd slide opacity 3542 $('.perflisting').on('init afterChange', function () { 3543 $('.perflisting .slick-slide.slick-active').each(function (index) { 3544 $(this).removeClass('shaded'); 3545 if (index == 2) { 3546 $(this).addClass('shaded'); 3547 } 3548 }); 3549 }); 3550 3551 // Initialize performance listing carousel 3552 $('.perflisting').slick({ 3553 slidesToShow: 3, 3554 slidesToScroll: 1, 3555 arrows: true, 3556 dots: false, 3557 infinite: false, 3558 instructionsText: 'Changing this current slide of this carousel will change the current slide of the performance data carousel that follows.', 3559 regionLabel: 'Main performance carousel', 3560 prevArrow: '<button class="slick-prev" aria-label="Previous slide"><i class="fa-light fa-arrow-left" aria-hidden="true"></i></button>', 3561 nextArrow: '<button class="slick-next" aria-label="Next slide"><i class="fa-light fa-arrow-right" aria-hidden="true"></i></button>', 3562 appendArrows: $('.perflisting').parent(), 3563 responsive: [{ 3564 breakpoint: 992, 3565 settings: { 3566 slidesToShow: 1, 3567 slidesToScroll: 1, 3568 centerMode: false 3569 } 3570 }] 3571 }); 3572 3573 // Add placeholder slide so last item doesn't show with lowered opacity 3574 $('.perflisting').slick('slickAdd', '<p class="placeholder"> </p>'); 3575 3576 // Initialize perfnav carousel WITHOUT asNavFor 3577 $('.perfnav').slick({ 3578 slidesToShow: $('.perfnav li').length, 3579 slidesToScroll: 1, 3580 dots: false, 3581 centerMode: false, 3582 arrows: false, 3583 infinite: false, 3584 instructionsText: 'Changing the current slide of this carousel will change the current slide of the preceding main performance carousel.', 3585 regionLabel: 'Performance date carousel' 3586 }); 3587 3588 // Track current active year 3589 var currentYearInView = ''; 3590 3591 // Update year nav when sliding 3592 $('.perflisting').on('afterChange', function () { 3593 var firstVisibleYear = ''; 3594 3595 // Find the year of the first fully visible card 3596 $('.perflisting .slick-slide').each(function () { 3597 if ($(this).hasClass('slick-active')) { 3598 firstVisibleYear = $(this).find('.premier').text().trim().split(' ')[2]; 3599 return false; // Stop at the first visible card 3600 } 3601 }); 3602 3603 // Only update nav if year has changed 3604 if (firstVisibleYear && firstVisibleYear !== currentYearInView) { 3605 currentYearInView = firstVisibleYear; 3606 3607 // Find and add active state to the corresponding year 3608 $('.perfnav .slick-slide').removeClass('slick-current slick-active'); 3609 $('.perfnav .slick-slide').each(function () { 3610 var navYear = $(this).text().trim(); 3611 if (navYear === currentYearInView) { 3612 $(this).addClass('slick-current slick-active'); 3613 $('.perfnav').slick('slickGoTo', $(this).data('slickIndex')); 3614 return false; 3615 } 3616 }); 3617 } 3618 }); 3619 3620 // Nav click: Move to the first slide of the clicked year 3621 $('.perfnav .slick-slide').click(function (e) { 3622 e.preventDefault(); 3623 var clickedYear = $(this).text().trim(); 3624 var targetSlide = 0; 3625 var maxSlide = $('.perflisting .perfitem').length - $('.perflisting').slick('slickGetOption', 'slidesToShow') + 1; 3626 // Find the first slide matching the clicked year 3627 $('.perflisting .perfitem').each(function (index) { 3628 var slideYear = $(this).find('.premier').text().trim().split(' ')[2]; 3629 if (slideYear === clickedYear) { 3630 targetSlide = index; 3631 return false; // Stop at the first match 3632 } 3633 }); 3634 3635 // Move the main slider and sync nav 3636 $('.perflisting').slick('slickGoTo', targetSlide > maxSlide ? maxSlide : targetSlide); 3637 $('.perfnav .slick-slide').removeClass('slick-current slick-active'); // Remove from all 3638 $(this).addClass('slick-current slick-active'); 3639 }); 3640 3641 // Set active class to first year nav on load 3642 $('.perfnav .slick-slide').first().addClass('slick-current slick-active'); 3643}); 3644 3645/***/ }), 3646
3647/***/ "./app/assets/js/modules/preformancePosts.loader.js": 3648/*!**********************************************************!*\ 3649 !*** ./app/assets/js/modules/preformancePosts.loader.js ***! 3650 \**********************************************************/ 3651/***/ (() => { 3652 3653(function ($) { 3654 var container = $('.performance-posts-block .upcoming-cards'); 3655 var loadMoreButton = $('.performance-posts-block #load-more'); 3656 if (container.length) { 3657 var currentPage = 1; 3658 var fetchPosts = function fetchPosts() { 3659 var append = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; 3660 var posts_per_page = 6; // 3 = posts_per_page - TODO: chnage for staging 3661 var filters = { 3662 sort: $('#sort-filter').val(), 3663 location: $('#location-filter').val(), 3664 date: $('#date-filter').val(), 3665 type: $('#type-filter').val(), 3666 keyword: $('#keyword-filter').val(), 3667 cache_bust: new Date().getTime(), 3668 page: currentPage, 3669 posts_per_page: posts_per_page 3670 }; 3671 $.ajax({ 3672 url: '/wp-json/custom/v1/filter-performance', 3673 method: 'GET', 3674 data: filters, 3675 beforeSend: function beforeSend() { 3676 return loadMoreButton.prop('disabled', true).text('Loading...'); 3677 }, 3678 success: function success(response) { 3679 var posts = response.posts; 3680 console.log(response.posts); 3681 var totalPosts = response.total_posts || 0; 3682 if (!append) { 3683 container.empty(); 3684 } 3685 if (posts.length > 0) { 3686 var parsePostDate = function parsePostDate(post) { 3687 if (!post.date || post.date.toLowerCase() === 'tbc') return 'TBC'; 3688 return new Date(post.date); // Convert the date string into a Date object 3689 }; 3690 3691 // posts.sort((a, b) => { 3692 // const dateA = parsePostDate(a); 3693 // const dateB = parsePostDate(b); 3694 // 3695 // if (dateA === 'TBC') return 1; 3696 // if (dateB === 'TBC') return -1; 3697 // if (!dateA || !dateB) return 0; 3698 // return dateA - dateB; 3699 // }); 3700 3701 var validPosts = posts.filter(function (post) { 3702 var parsedDate = parsePostDate(post); 3703 return parsedDate === 'TBC' || parsedDate && parsedDate >= new Date(); 3704 }); 3705 if (validPosts.length > 0) { 3706 validPosts.forEach(function (post) { 3707 return renderPost(post); 3708 }); 3709 if (currentPage * posts_per_page < totalPosts) { 3710 loadMoreButton.show(); 3711 } else { 3712 loadMoreButton.hide(); 3713 } 3714 } else { 3715 var _themeData, _themeData2, _themeData3; 3716 var noResultsImg = (_themeData = themeData) === null || _themeData === void 0 || (_themeData = _themeData.noResults) === null || _themeData === void 0 ? void 0 : _themeData.image.url; 3717 var noResultsHeading = (_themeData2 = themeData) === null || _themeData2 === void 0 || (_themeData2 = _themeData2.noResults) === null || _themeData2 === void 0 ? void 0 : _themeData2.heading; 3718 var noResultsSub = (_themeData3 = themeData) === null || _themeData3 === void 0 || (_themeData3 = _themeData3.noResults) === null || _themeData3 === void 0 ? void 0 : _themeData3.sub; 3719 3720 // 3. Render 3721 container.html("\n <div class=\"no-posts-message\">\n <div class=\"image-container\">\n <img src=\"".concat(noResultsImg, "\" alt=\"Search not found illustration\">\n </div>\n <h2>").concat(noResultsHeading, "</h2>\n <p>").concat(noResultsSub, "</p>\n </div>")); 3722 loadMoreButton.hide(); 3723 } 3724 } else if (!append) { 3725 var _themeData4, _themeData5, _themeData6; 3726 var _noResultsImg = (_themeData4 = themeData) === null || _themeData4 === void 0 || (_themeData4 = _themeData4.no
3726Results) === null || _themeData4 === void 0 ? void 0 : _themeData4.image.url; 3727 var _noResultsHeading = (_themeData5 = themeData) === null || _themeData5 === void 0 || (_themeData5 = _themeData5.noResults) === null || _themeData5 === void 0 ? void 0 : _themeData5.heading; 3728 var _noResultsSub = (_themeData6 = themeData) === null || _themeData6 === void 0 || (_themeData6 = _themeData6.noResults) === null || _themeData6 === void 0 ? void 0 : _themeData6.sub; 3729 3730 // 3. Render 3731 container.html("\n <div class=\"no-posts-message\">\n <div class=\"image-container\">\n <img src=\"".concat(_noResultsImg, "\" alt=\"Search not found illustration\">\n </div>\n <h2>").concat(_noResultsHeading, "</h2>\n <p>").concat(_noResultsSub, "</p>\n </div>")); 3732 loadMoreButton.hide(); 3733 } 3734 3735 // display results only on search page 3736 var urlParams = new URLSearchParams(window.location.search); 3737 if (urlParams.has('s')) { 3738 var resultsSummary = $('.results-summary'); 3739 if (posts.length > 0) { 3740 var start = (currentPage - 1) * posts_per_page + posts.length; 3741 resultsSummary.html("Showing ".concat(start, " of ").concat(totalPosts, " results")).show(); 3742 } else { 3743 resultsSummary.hide(); 3744 } 3745 } 3746 loadMoreButton.prop('disabled', false).text('Browse more'); 3747 }, 3748 error: function error() { 3749 loadMoreButton.prop('disabled', false).text('Browse more'); 3750 alert('Something went wrong while fetching posts.'); 3751 } 3752 }); 3753 }; 3754 var renderPost = function renderPost(post) { 3755 var postCard = "\n <li class=\"card\">\n <a href=\"".concat(post.url, "\" class=\"feature\">\n <img src=\"").concat(post.img || '/wp-content/themes/twyla-tharp/app/assets/images/placeholder.webp', "\" alt=\"").concat(post.title, "\">\n <div class=\"date\">\n ").concat(post.date && post.date.toLowerCase() !== 'tbc' ? "<span class=\"day\">".concat(new Date(post.date).getDate(), "</span>") : '', "\n ").concat(post.date && post.date.toLowerCase() !== 'tbc' ? "<span class=\"month\">".concat(new Date(post.date).toLocaleString('default', { 3756 month: 'long' 3757 }), "</span>") : '', "\n </div>\n </a>\n\n <div class=\"copy\">\n <h3 class=\"title\">").concat(post.title, "</h3>\n <div class=\"meta\">\n ").concat(post.location ? "<span class=\"location\">".concat(post.location, "</span>") : '', "\n ").concat(post.date ? "<span class=\"date\">".concat(post.date, "</span>") : '', "\n </div>\n </div>\n </li>\n "); 3758 container.append(postCard); 3759 }; 3760 $('#sort-filter, #location-filter, #date-filter, #type-filter').on('change', function () { 3761 currentPage = 1; 3762 fetchPosts(false); 3763 }); 3764 $('#keyword-filter').on('keyup', function (e) { 3765 var searchQuery = $(this).val().trim(); 3766 if (searchQuery === '') { 3767 currentPage = 1; 3768 fetchPosts(false); 3769 } else if (e.key === 'Enter' || e.which === 13) { 3770 currentPage = 1; 3771 fetchPosts(false); 3772 } 3773 }); 3774 $('.fa-magnifying-glass').on('click', function () { 3775 currentPage = 1; 3776 fetchPosts(false); 3777 });
3778 loadMoreButton.on('click', function () { 3779 currentPage++; 3780 fetchPosts(true); 3781 }); 3782 fetchPosts(false); 3783 } 3784})(jQuery); 3785 3786/***/ }), 3787
3788/***/ "./app/assets/js/modules/workPosts.loader.js": 3789/*!***************************************************!*\ 3790 !*** ./app/assets/js/modules/workPosts.loader.js ***! 3791 \***************************************************/ 3792/***/ (() => { 3793 3794(function ($) { 3795 var container = $('.work-posts-block .post-cards'); 3796 var loadMoreButton = $('.work-posts-block #load-more'); 3797 if (container.length) { 3798 var currentPage = 1; 3799 var fetchPosts = function fetchPosts() { 3800 var append = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; 3801 var posts_per_page = 24; // 3 = posts_per_page - TODO: chnage for staging 3802 var filters = { 3803 sort: $('#sort-filter').val(), 3804 location: $('#location-filter').val(), 3805 year: $('#year-filter').val(), 3806 keyword: $('#keyword-filter').val(), 3807 cache_bust: new Date().getTime(), 3808 page: currentPage, 3809 posts_per_page: posts_per_page 3810 }; 3811 $.ajax({ 3812 url: '/wp-json/custom/v1/filter-works', 3813 method: 'GET', 3814 data: filters, 3815 beforeSend: function beforeSend() { 3816 return loadMoreButton.prop('disabled', true).text('Loading...'); 3817 }, 3818 success: function success(response) { 3819 var posts = response.posts; 3820 var totalPosts = response.total_posts || 0; 3821 if (!append) { 3822 container.empty(); 3823 } 3824 if (posts.length > 0) { 3825 posts.forEach(function (post) { 3826 return renderPost(post); 3827 }); 3828 3829 // Show or hide load more btn based on totalPosts and current page 3830 if (currentPage * posts_per_page < totalPosts) { 3831 loadMoreButton.show(); 3832 } else { 3833 loadMoreButton.hide(); 3834 } 3835 } else if (!append) { 3836 var _themeData, _themeData2, _themeData3; 3837 var noResultsImg = (_themeData = themeData) === null || _themeData === void 0 || (_themeData = _themeData.noResults) === null || _themeData === void 0 ? void 0 : _themeData.image.url; 3838 var noResultsHeading = (_themeData2 = themeData) === null || _themeData2 === void 0 || (_themeData2 = _themeData2.noResults) === null || _themeData2 === void 0 ? void 0 : _themeData2.heading; 3839 var noResultsSub = (_themeData3 = themeData) === null || _themeData3 === void 0 || (_themeData3 = _themeData3.noResults) === null || _themeData3 === void 0 ? void 0 : _themeData3.sub; 3840 3841 // 3. Render 3842 container.html("\n <div class=\"no-posts-message\">\n <div class=\"image-container\">\n <img src=\"".concat(noResultsImg, "\" alt=\"Search not found illustration\">\n </div>\n <h2>").concat(noResultsHeading, "</h2>\n <p>").concat(noResultsSub, "</p>\n </div>")); 3843 3844 // 4. Force hide the button 3845 loadMoreButton.hide(); 3846 } 3847 3848 // display results only on search page 3849 var urlParams = new URLSearchParams(window.location.search); 3850 if (urlParams.has('s')) { 3851 var resultsSummary = $('.results-summary'); 3852 if (posts.length > 0) { 3853 var start = (currentPage - 1) * posts_per_page + posts.length; 3854 resultsSummary.html("Showing ".concat(start, " of ").concat(totalPosts, " results")).show(); 3855 } else { 3856 resultsSummary.hide(); 3857 } 3858 } 3859 loadMoreButton.prop('disabled', false).text('Browse more'); 3860 }, 3861 error: function error() { 3862 loadMoreButton.prop('disabled', false).text('Browse more'); 3863 alert('Something went wrong while fetching posts.'); 3864 } 3865 }); 3866 }; 3867 var renderPost = function renderPost(post) { 3868 // UPDATED: Now receives a single string URL, not an object 3869 var imageUrl = post.img || '/wp-content/themes/twyla-tharp/app/assets/images/placeholder.webp'; 3870 var postCard = "\n <li class=\"post-card\">\n <a href=\"".concat(post.url, "\">\n <div class=\"image-wrapper\">\n <img src=\"").concat(imageUrl, "\" alt=\"").concat(post.title, "\">\n <div class=\"circle\"></div>\n <div class=\"circle one\"></div>\n <div class=\"circle two\"></div>\n </div>\n <h3>").concat(post.title, "</h3>\n <div class=\"year-location\"> \n ").concat(post.year ? "<p>".concat(post.year, "</p>") : '', "\n </div>\n </a>\n </li>\n "); 3871 container.append(postCard); 3872 }; 3873 $('#sort-filter, #location-filter, #year-filter').on('change', function () { 3874 currentPage = 1; 3875 fetchPosts(false); 3876 }); 3877 $('#keyword-filter').on('keyup', function (e) { 3878 var searchQuery = $(this).val().trim(); 3879 if (searchQuery === '') { 3880 currentPage = 1; 3881 fetchPosts(false); 3882 } else if (e.key === 'Enter' || e.which === 13) { 3883 currentPage = 1; 3884 fetchPosts(false); 3885 } 3886 }); 3887 $('.fa-magnifying-glass').on('click', function () { 3888 currentPage = 1; 3889 fetchPosts(false); 3890 });
3891 loadMoreButton.on('click', function () { 3892 currentPage++; 3893 fetchPosts(true); 3894 }); 3895 fetchPosts(false); 3896 } 3897})(jQuery); 3898 3899// mobile fixed nav toggle 3900$(document).ready(function () { 3901 $('.filters-toggle').on('click', function () { 3902 var filters = $('.filters'); 3903 filters.toggleClass('filter-mobile-active'); 3904 var isExpanded = $(this).attr('aria-expanded') === 'true'; 3905 $(this).attr('aria-expanded', !isExpanded); 3906 var toggleIcon = $(this).find('.toggle-icon'); 3907 toggleIcon.text(toggleIcon.text() === '+' ? '-' : '+'); 3908 }); 3909 $('.filters').on('change', '#sort-filter, #location-filter, #year-filter, #type-filter', function () { 3910 $('.filters').removeClass('filter-mobile-active'); 3911 updateToggleState(); 3912 }); 3913 $('.filters').on('click', '.fa-magnifying-glass', function () { 3914 $('.filters').removeClass('filter-mobile-active'); 3915 updateToggleState(); 3916 }); 3917 $('#keyword-filter').on('keypress', function (e) { 3918 if (e.which === 13) { 3919 e.preventDefault(); 3920 $('.filters').removeClass('filter-mobile-active'); 3921 updateToggleState(); 3922 } 3923 }); 3924 function updateToggleState() { 3925 var toggleButton = $('.filters-toggle'); 3926 toggleButton.attr('aria-expanded', 'false'); 3927 toggleButton.find('.toggle-icon').text('+'); 3928 } 3929}); 3930 3931// card animation logic 3932$(document).ready(function () { 3933 // Proximity distance in px 3934 var buffer = 300; 3935 3936 // Mouse Move - Detect if cursor is near the card and assign direction class 3937 $(document).on('mousemove', function (event) { 3938 $('.image-wrapper').each(function () { 3939 var wrapper = $(this); 3940 var circle = wrapper.find('.circle'); 3941 var proximityDirection = getProximityDirection(wrapper[0], event); 3942 if (proximityDirection) { 3943 circle.removeClass('from-top from-bottom from-left from-right'); 3944 circle.addClass("from-".concat(proximityDirection)); 3945 } 3946 }); 3947 }); 3948 3949 // Mouse enter - Assign direction class 3950 $(document).on('mouseenter', '.image-wrapper', function (event) { 3951 var wrapper = $(this); 3952 var circle = wrapper.find('.circle'); 3953 var fallbackDirection = getCursorDirection(wrapper[0], event); 3954 circle.removeClass('from-top from-bottom from-left from-right'); 3955 circle.addClass("from-".concat(fallbackDirection)); 3956 setTimeout(function () { 3957 circle.removeClass("from-".concat(fallbackDirection)).addClass('active'); 3958 }, 10); 3959 }); 3960 3961 // Mouse Leave - Detect exit direction 3962 $(document).on('mouseleave', '.image-wrapper', function (event) { 3963 var wrapper = $(this); 3964 var circle = wrapper.find('.circle'); 3965 var exitDirection = getCursorDirection(wrapper[0], event); 3966 circle.removeClass('active from-top from-bottom from-left from-right'); 3967 circle.addClass("from-".concat(exitDirection)); 3968 }); 3969 3970 // proximity function 3971 function getProximityDirection(wrapper, event) { 3972 var _wrapper$getBoundingC = wrapper.getBoundingClientRect(), 3973 width = _wrapper$getBoundingC.width, 3974 height = _wrapper$getBoundingC.height, 3975 top = _wrapper$getBoundingC.top, 3976 left = _wrapper$getBoundingC.left; 3977 var mouseX = event.clientX; 3978 var mouseY = event.clientY; 3979 3980 // Check if the mouse is close to the card 3981 var isNearTop = mouseY >= top - buffer && mouseY <= top && mouseX >= left && mouseX <= left + width; 3982 var isNearBottom = mouseY >= top + height && mouseY <= top + height + buffer && mouseX >= left && mouseX <= left + width; 3983 var isNearLeft = mouseX >= left - buffer && mouseX <= left && mouseY >= top && mouseY <= top + height; 3984 var isNearRight = mouseX >= left + width && mouseX <= left + width + buffer && mouseY >= top && mouseY <= top + height; 3985 if (isNearTop) return 'top'; 3986 if (isNearBottom) return 'bottom'; 3987 if (isNearLeft) return 'left'; 3988 if (isNearRight) return 'right'; 3989 return null; 3990 } 3991 3992 // Detect cursor position, calculate distance and return correct side 3993 function getCursorDirection(wrapper, event) { 3994 var _wrapper$getBoundingC2 = wrapper.getBoundingClientRect(), 3995 width = _wrapper$getBoundingC2.width, 3996 height = _wrapper$getBoundingC2.height, 3997 top = _wrapper$getBoundingC2.top, 3998 left = _wrapper$getBoundingC2.left; 3999 var mouseX = event.clientX; 4000 var mouseY = event.clientY; 4001 var distanceToTop = Math.abs(mouseY - top); 4002 var distanceToBottom = Math.abs(mouseY - (top + height)); 4003 var distanceToLeft = Math.abs(mouseX - left); 4004 var distanceToRight = Math.abs(mouseX - (left + width)); 4005 var minDistance = Math.min(distanceToTop, distanceToBottom, distanceToLeft, distanceToRight); 4006 if (minDistance === distanceToTop) return 'top'; 4007 if (minDistance === distanceToBottom) return 'bottom'; 4008 if (minDistance === distanceToLeft) return 'left'; 4009 return 'right'; 4010 } 4011}); 4012$(document).ready(function () { 4013 var $filtersContainer = $('.work-posts-block .filters-container, .performance-posts-block .filters-container'); 4014 if ($filtersContainer.length) { 4015 var stickyTop = $filtersContainer.offset().top; 4016 var hideThresholdTop = 300; 4017 var hideThresholdBottom = 300; 4018 var breakpoint = 992; 4019 var updateStickyState = function updateStickyState() { 4020 var containerRect = $filtersContainer[0].getBoundingClientRect(); 4021 if (containerRect.top <= 145) { 4022 $filtersContainer.addClass('active'); 4023 } else { 4024 $filtersContainer.removeClass('active'); 4025 } 4026 }; 4027 var updateVisibilityState = function updateVisibilityState() { 4028 var windowWidth = $(window).width(); 4029 var scrollTop = $(window).scrollTop(); 4030 var scrollHeight = $(document).height(); 4031 var windowHeight = $(window).height(); 4032 4033 // Check if screen width is <= 992px 4034 if (windowWidth <= breakpoint) { 4035 // Hide when scroll is within 500px from the top 4036 if (scrollTop < hideThresholdTop) { 4037 $filtersContainer.addClass('hidden'); 4038 } 4039 // Hide when within 500px from the bottom 4040 else if (scrollTop + windowHeight >= scrollHeight - hideThresholdBottom) { 4041 $filtersContainer.addClass('hidden'); 4042 } 4043 // Otherwise, make it visible 4044 else { 4045 $filtersContainer.removeClass('hidden'); 4046 } 4047 } else { 4048 // Always show the container on wider screens 4049 $filtersContainer.removeClass('hidden'); 4050 } 4051 }; 4052 updateStickyState(); 4053 updateVisibilityState(); 4054 $(window).on('scroll', function () { 4055 updateStickyState(); 4056 updateVisibilityState(); 4057 }); 4058 } 4059}); 4060 4061/***/ }), 4062
4063/***/ "./app/assets/js/modules/workStickyNav.loader.js": 4064/*!*******************************************************!*\ 4065 !*** ./app/assets/js/modules/workStickyNav.loader.js ***! 4066 \*******************************************************/ 4067/***/ (() => { 4068 4069$(document).ready(function () { 4070 if ($("body").hasClass("single-works")) { 4071 var $headerBlock = $(".header-block"); 4072 if (!$headerBlock.length) return; 4073 var $headerTitleElement = $headerBlock.find(".title h1"); 4074 var headerTitle = $headerTitleElement.length ? $headerTitleElement.text().trim() : ""; 4075 var truncatedTitle = headerTitle.length > 30 ? headerTitle.slice(0, 30) + '...' : headerTitle; 4076 var $stickyNav = $("\n <div class=\"work-sticky-nav\">\n <div class=\"container\">\n <div class=\"content-wrapper\">\n <p class=\"nav-title\">".concat(truncatedTitle, " <span class=\"toggle-icon\">+</span></p>\n <ul></ul>\n </div>\n </div>\n </div>\n ")); 4077 $headerBlock.after($stickyNav); 4078 var $navList = $stickyNav.find("ul"); 4079 4080 // Define section configuration 4081 var sectionConfigs = { 4082 "intro-block": { 4083 id: "introduction", 4084 text: "Introduction", 4085 single: true 4086 }, 4087 "gallery-block": { 4088 id: "gallery", 4089 text: "Gallery", 4090 single: true 4091 }, 4092 "copy-block": { 4093 idPrefix: "details-", 4094 textExtractor: ".heading .title", 4095 single: false 4096 }, 4097 "pastperf-block": { 4098 id: "past-performances", 4099 text: "Past Performances", 4100 single: true 4101 }, 4102 "upcomingperf-block": { 4103 id: "upcoming-performances", 4104 text: "Upcoming Performances", 4105 single: true 4106 }, 4107 "related-performances-block": { 4108 id: "past-performance", 4109 text: "Past Performances", 4110 single: true 4111 } 4112 }; 4113 4114 // Find all sections in DOM order 4115 var sectionSelectors = Object.keys(sectionConfigs).map(function (cls) { 4116 return '.' + cls; 4117 }).join(', '); 4118 var $allSections = $(sectionSelectors); 4119 4120 // Track which copy-blocks we've seen for numbering 4121 var copyBlockIndex = 0; 4122 $allSections.each(function () { 4123 var $element = $(this); 4124 4125 // Find which section type this is 4126 var sectionClass = null; 4127 for (var _i = 0, _Object$keys = Object.keys(sectionConfigs); _i < _Object$keys.length; _i++) { 4128 var cls = _Object$keys[_i]; 4129 if ($element.hasClass(cls)) { 4130 sectionClass = cls; 4131 break; 4132 } 4133 } 4134 if (!sectionClass) return; 4135 var config = sectionConfigs[sectionClass]; 4136 4137 // Skip if this is a duplicate of a single-instance section 4138 if (config.single && $element.prevAll('.' + sectionClass).length > 0) { 4139 return; 4140 } 4141 var linkText = config.text; 4142 var sectionId = config.id; 4143 4144 // Handle copy-blocks with dynamic text and numbering 4145 if (sectionClass === 'copy-block') { 4146 copyBlockIndex++; 4147 if (config.textExtractor) { 4148 var $textElement = $element.find(config.textExtractor); 4149 linkText = $textElement.length ? $textElement.text().trim() : "Details ".concat(copyBlockIndex); 4150 sectionId = $textElement.length ? $textElement.text().trim().toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9\-]/g, '') : "".concat(config.idPrefix).concat(copyBlockIndex); 4151 } else { 4152 sectionId = "".concat(config.idPrefix).concat(copyBlockIndex); 4153 } 4154 } 4155 4156 // Set the ID on the element 4157 $element.attr("id", sectionId); 4158 4159 // Add to navigation 4160 var $navItem = $("<li><a href=\"#".concat(sectionId, "\">").concat(linkText, "</a></li>")); 4161 $navList.append($navItem); 4162 }); 4163 } 4164}); 4165$(document).ready(function () { 4166 var $stickyNav = $('.work-sticky-nav'); 4167 var $headerBlock = $('.header-block'); 4168 var $wpAdminBar = $('#wpadminbar'); 4169 var $mainNav = $('#header'); 4170 var $footer = $('footer'); 4171 if ($stickyNav.length) { 4172 var stickyThreshold = $headerBlock.length ? $headerBlock.outerHeight() : 0; 4173 var updateStickyState = function updateStickyState() { 4174 var scrollTop = $(window).scrollTop(); 4175 var windowHeight = $(window).height(); 4176 var windowWidth = $(window).width(); 4177 var footerTop = $footer.length ? $footer.offset().top : $(document).height(); 4178 var isFooterVisible = scrollTop + windowHeight >= footerTop; 4179 var hideBecauseOfFooter = isFooterVisible && windowWidth < 992; 4180 if (scrollTop >= stickyThreshold && !hideBecauseOfFooter) { 4181 $stickyNav.addClass('visible'); 4182 } else { 4183 $stickyNav.removeClass('visible'); 4184 } 4185 }; 4186 updateStickyState(); 4187 $(window).on('scroll', updateStickyState); 4188 $(window).on('resize', updateStickyState); 4189 var adminBarHeight = $wpAdminBar.length ? $wpAdminBar.outerHeight() : 0; 4190 var mainNavHeight = $mainNav.length ? $mainNav.outerHeight() : 0; 4191 var totalOffset = adminBarHeight + mainNavHeight + 100; 4192 $stickyNav.find('a').on('click', function (e) { 4193 e.preventDefault(); 4194 var targetId = $(this).attr('href'); 4195 var $target = $(targetId); 4196 if ($target.length) { 4197 var offset = $(window).width() < 992 ? 160 : totalOffset; 4198 $('html, body').animate({ 4199 scrollTop: $target.offset().top - offset 4200 }, 300); 4201 } 4202 }); 4203 } 4204}); 4205$(document).ready(function () { 4206 $('.work-sticky-nav .nav-title').on('click', function () { 4207 if ($(window).width() < 992) { 4208 var $this = $(this); 4209 var isExpanded = $this.attr('aria-expanded') === 'true'; 4210 $(".work-sticky-nav").toggleClass('active'); 4211 $this.attr('aria-expanded', !isExpanded); 4212 var $toggleIcon = $this.find('.toggle-icon'); 4213 $toggleIcon.text($toggleIcon.text() === '+' ? '-' : '+'); 4214 } 4215 }); 4216 $('.work-sticky-nav').on('click', 'a', function () { 4217 if ($(window).width() < 992) { 4218 $(".work-sticky-nav").removeClass('active'); 4219 var $toggleIcon = $('.work-sticky-nav .nav-title .toggle-icon'); 4220 $toggleIcon.text('+'); 4221 $('.work-sticky-nav .nav-title').attr('aria-expanded', false); 4222 } 4223 }); 4224}); 4225 4226/***/ }), 4227
4228/***/ "./app/assets/scss/app.scss": 4229/*!**********************************!*\ 4230 !*** ./app/assets/scss/app.scss ***! 4231 \**********************************/ 4232/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4233 4234"use strict"; 4235__webpack_require__.r(__webpack_exports__); 4236// extracted by mini-css-extract-plugin 4237 4238 4239/***/ }), 4240
4241/***/ "./app/assets/scss/editor.scss": 4242/*!*************************************!*\ 4243 !*** ./app/assets/scss/editor.scss ***! 4244 \*************************************/ 4245/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4246 4247"use strict"; 4248__webpack_require__.r(__webpack_exports__); 4249// extracted by mini-css-extract-plugin 4250 4251 4252/***/ })
vendor: 7,266 bytes, lines 4252-4433
4252, 4253 4254/***/ "jquery": 4255/*!*************************!*\ 4256 !*** external "jQuery" ***! 4257 \*************************/ 4258/***/ ((module) => { 4259 4260"use strict"; 4261module.exports = jQuery; 4262 4263/***/ }) 4264 4265/******/ }); 4266/************************************************************************/ 4267/******/ // The module cache 4268/******/ var __webpack_module_cache__ = {}; 4269/******/ 4270/******/ // The require function 4271/******/ function __webpack_require__(moduleId) { 4272/******/ // Check if module is in cache 4273/******/ var cachedModule = __webpack_module_cache__[moduleId]; 4274/******/ if (cachedModule !== undefined) { 4275/******/ return cachedModule.exports; 4276/******/ } 4277/******/ // Create a new module (and put it into the cache) 4278/******/ var module = __webpack_module_cache__[moduleId] = { 4279/******/ // no module.id needed 4280/******/ // no module.loaded needed 4281/******/ exports: {} 4282/******/ }; 4283/******/ 4284/******/ // Execute the module function 4285/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 4286/******/ 4287/******/ // Return the exports of the module 4288/******/ return module.exports; 4289/******/ } 4290/******/ 4291/******/ // expose the modules object (__webpack_modules__) 4292/******/ __webpack_require__.m = __webpack_modules__; 4293/******/ 4294/************************************************************************/ 4295/******/ /* webpack/runtime/chunk loaded */ 4296/******/ (() => { 4297/******/ var deferred = []; 4298/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { 4299/******/ if(chunkIds) { 4300/******/ priority = priority || 0; 4301/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; 4302/******/ deferred[i] = [chunkIds, fn, priority]; 4303/******/ return; 4304/******/ } 4305/******/ var notFulfilled = Infinity; 4306/******/ for (var i = 0; i < deferred.length; i++) { 4307/******/ var [chunkIds, fn, priority] = deferred[i]; 4308/******/ var fulfilled = true; 4309/******/ for (var j = 0; j < chunkIds.length; j++) { 4310/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { 4311/******/ chunkIds.splice(j--, 1); 4312/******/ } else { 4313/******/ fulfilled = false; 4314/******/ if(priority < notFulfilled) notFulfilled = priority; 4315/******/ } 4316/******/ } 4317/******/ if(fulfilled) { 4318/******/ deferred.splice(i--, 1) 4319/******/ var r = fn(); 4320/******/ if (r !== undefined) result = r; 4321/******/ } 4322/******/ } 4323/******/ return result; 4324/******/ }; 4325/******/ })(); 4326/******/ 4327/******/ /* webpack/runtime/compat get default export */ 4328/******/ (() => { 4329/******/ // getDefaultExport function for compatibility with non-harmony modules 4330/******/ __webpack_require__.n = (module) => { 4331/******/ var getter = module && module.__esModule ? 4332/******/ () => (module['default']) : 4333/******/ () => (module); 4334/******/ __webpack_require__.d(getter, { a: getter }); 4335/******/ return getter; 4336/******/ }; 4337/******/ })(); 4338/******/ 4339/******/ /* webpack/runtime/define property getters */ 4340/******/ (() => { 4341/******/ // define getter functions for harmony exports 4342/******/ __webpack_require__.d = (exports, definition) => { 4343/******/ for(var key in definition) { 4344/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 4345/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 4346/******/ } 4347/******/ } 4348/******/ }; 4349/******/ })(); 4350/******/ 4351/******/ /* webpack/runtime/hasOwnProperty shorthand */ 4352/******/ (() => { 4353/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 4354/******/ })(); 4355/******/ 4356/******/ /* webpack/runtime/make namespace object */ 4357/******/ (() => { 4358/******/ // define __esModule on exports 4359/******/ __webpack_require__.r = (exports) => { 4360/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 4361/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 4362/******/ } 4363/******/ Object.defineProperty(exports, '__esModule', { value: true }); 4364/******/ }; 4365/******/ })(); 4366/******/ 4367/******/ /* webpack/runtime/jsonp chunk loading */ 4368/******/ (() => { 4369/******/ // no baseURI 4370/******/ 4371/******/ // object to store loaded and loading chunks 4372/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 4373/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded 4374/******/ var installedChunks = { 4375/******/ "/js/app": 0, 4376/******/ "css/editor": 0, 4377/******/ "css/app": 0 4378/******/ }; 4379/******/ 4380/******/ // no chunk on demand loading 4381/******/ 4382/******/ // no prefetching 4383/******/ 4384/******/ // no preloaded 4385/******/ 4386/******/ // no HMR 4387/******/ 4388/******/ // no HMR manifest 4389/******/ 4390/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); 4391/******/ 4392/******/ // install a JSONP callback for chunk loading 4393/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { 4394/******/ var [chunkIds, moreModules, runtime] = data; 4395/******/ // add "moreModules" to the modules object, 4396/******/ // then flag all "chunkIds" as loaded and fire callback 4397/******/ var moduleId, chunkId, i = 0; 4398/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { 4399/******/ for(moduleId in moreModules) { 4400/******/ if(__webpack_require__.o(moreModules, moduleId)) { 4401/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; 4402/******/ } 4403/******/ } 4404/******/ if(runtime) var result = runtime(__webpack_require__); 4405/******/ } 4406/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); 4407/******/ for(;i < chunkIds.length; i++) { 4408/******/ chunkId = chunkIds[i]; 4409/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { 4410/******/ installedChunks[chunkId][0](); 4411/******/ } 4412/******/ installedChunks[chunkId] = 0; 4413/******/ } 4414/******/ return __webpack_require__.O(result); 4415/******/ } 4416/******/ 4417/******/ var chunkLoadingGlobal = self["webpackChunktwyla_tharp"] = self["webpackChunktwyla_tharp"] || []; 4418/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); 4419/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); 4420/******/ })(); 4421/******/ 4422/************************************************************************/ 4423/******/ 4424/******/ // startup 4425/******/ // Load entry module and return exports 4426/******/ // This entry module depends on other loaded chunks and execution need to be delayed 4427/******/ __webpack_require__.O(undefined, ["css/editor","css/app"], () => (__webpack_require__("./app/assets/js/app.js"))) 4428/******/ __webpack_require__.O(undefined, ["css/editor","css/app"], () => (__webpack_require__("./app/assets/scss/app.scss"))) 4429/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["css/editor","css/app"], () => (__webpack_require__("./app/assets/scss/editor.scss"))) 4430/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); 4431/******/ 4432/******/ })() 4433;
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.