1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { 40/******/ configurable: false, 41/******/ enumerable: true, 42/******/ get: getter 43/******/ }); 44/******/ } 45/******/ }; 46/******/ 47/******/ // getDefaultExport function for compatibility with non-harmony modules 48/******/ __webpack_require__.n = function(module) { 49/******/ var getter = module && module.__esModule ? 50/******/ function getDefault() { return module['default']; } : 51/******/ function getModuleExports() { return module; }; 52/******/ __webpack_require__.d(getter, 'a', getter); 53/******/ return getter; 54/******/ }; 55/******/ 56/******/ // Object.prototype.hasOwnProperty.call 57/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 58/******/ 59/******/ // __webpack_public_path__ 60/******/ __webpack_require__.p = ""; 61/******/ 62/******/ // Load entry module and return exports 63/******/ return __webpack_require__(__webpack_require__.s = 1); 64/******/ }) 65/************************************************************************/ 66/******/ ([ 67/* 0 */ 68/***/ (function(module, __webpack_exports__, __webpack_require__) { 69 70"use strict"; 71/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return $; }); 72/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return $window; }); 73/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return $doc; }); 74/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return $body; }); 75/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return csco; }); 76/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return wndW; }); 77/* unused harmony export wndH */ 78/* unused harmony export docH */ 79/* unused harmony export csThrottleScroll */ 80/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return csGetCookie; }); 81/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return csSetCookie; }); 82// Create csco object. 83var csco = { 84 addAction: function addAction(x, y, z) { 85 return; 86 } 87}; 88 89if ('undefined' !== typeof wp && 'undefined' !== typeof wp.hooks) { 90 csco.addAction = wp.hooks.addAction; 91} 92/** 93 * Window size 94 */ 95 96 97var $ = jQuery; 98var $window = $(window); 99var $doc = $(document); 100var $body = $('body'); 101var wndW = 0; 102var wndH = 0; 103var docH = 0; 104 105function csGetWndSize() { 106 wndW = $window.width(); 107 wndH = $window.height(); 108 docH = $doc.height(); 109} 110 111$window.on('resize load orientationchange', csGetWndSize); 112csGetWndSize(); 113/** 114 * Throttle scroll 115 * thanks: https://jsfiddle.net/mariusc23/s6mLJ/31/ 116 */ 117 118var csHideOnScrollList = []; 119var csDidScroll; 120var csLastST = 0; 121$window.on('scroll load resize orientationchange', function () { 122 if (csHideOnScrollList.length) { 123 csDidScroll = true; 124 } 125}); 126
127function csHasScrolled() { 128 var ST = $window.scrollTop(); 129 var type = null; 130 131 if (ST > csLastST) { 132 type = 'down'; 133 } else if (ST < csLastST) { 134 type = 'up'; 135 } else { 136 type = 'none'; 137 } 138 139 if (ST === 0) { 140 type = 'start'; 141 } else if (ST >= docH - wndH) { 142 type = 'end'; 143 } 144 145 csHideOnScrollList.forEach(function (item) { 146 if (typeof item === 'function') { 147 item(type, ST, csLastST, $window); 148 } 149 }); 150 csLastST = ST; 151} 152 153setInterval(function () { 154 if (csDidScroll) { 155 csDidScroll = false; 156 window.requestAnimationFrame(csHasScrolled); 157 } 158}, 250); 159 160function csThrottleScroll(callback) { 161 csHideOnScrollList.push(callback); 162} 163/** 164 * In Viewport checker 165 */ 166 167 168$.fn.isInViewport = function () { 169 var elementTop = $(this).offset().top; 170 var elementBottom = elementTop + $(this).outerHeight(); 171 var viewportTop = $(window).scrollTop(); 172 var viewportBottom = viewportTop + $(window).height(); 173 return elementBottom > viewportTop && elementTop < viewportBottom; 174}; 175/** 176 * Cookies 177 */ 178 179 180function csGetCookie(name) { 181 var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)")); 182 return matches ? decodeURIComponent(matches[1]) : undefined; 183} 184 185function csSetCookie(name, value) { 186 var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 187 props = { 188 path: '/' 189 }; 190 191 if (props.expires instanceof Date) { 192 props.expires = props.expires.toUTCString(); 193 } 194 195 var updatedCookie = encodeURIComponent(name) + "=" + encodeURIComponent(value); 196 197 for (var optionKey in props) { 198 updatedCookie += "; " + optionKey; 199 var optionValue = props[optionKey]; 200 201 if (optionValue !== true) { 202 updatedCookie += "=" + optionValue; 203 } 204 } 205 206 document.cookie = updatedCookie; 207} 208 209 210 211/***/ }), 212/* 1 */ 213/***/ (function(module, exports, __webpack_require__) { 214 215__webpack_require__(2); 216__webpack_require__(3); 217__webpack_require__(4); 218__webpack_require__(5); 219__webpack_require__(6); 220__webpack_require__(7); 221__webpack_require__(8); 222__webpack_require__(9); 223__webpack_require__(10); 224__webpack_require__(11); 225__webpack_require__(12); 226__webpack_require__(13); 227__webpack_require__(14); 228__webpack_require__(15); 229__webpack_require__(16); 230module.exports = __webpack_require__(17); 231 232 233/***/ }), 234/* 2 */ 235/***/ (function(module, __webpack_exports__, __webpack_require__) { 236 237"use strict"; 238Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 239/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 240 241 242(function () { 243 function initCarousel() { 244 /** 245 * Carousel 246 */ 247 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cp-expert-slider__item').imagesLoaded(function (instance) { 248 var rtl = __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('rtl') ? true : false; 249 var $carousel = []; 250 var $current = []; // Point. 251 252 var point = function point() { 253 var points = [350, 400, 450, 500, 550, 600, 720, 1020, 1200]; 254 var current = 0; 255 256 for (var i in points) { 257 if (window.innerWidth >= points[i]) { 258 current = points[i]; 259 } 260 } 261 262 return current; 263 }; // Loop. 264 265 266 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(instance.elements).each(function (index, el) { 267 var settings = { 268 cellAlign: rtl ? 'right' : 'left', 269 groupCells: false, 270 wrapAround: true, 271 contain: true, 272 autoPlay: false, 273 adaptiveHeight: true, 274 prevNextButtons: false, 275 pageDots: true, 276 rightToLeft: rtl, 277 resize: false, 278 on: { 279 ready: function ready() { 280 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).addClass('is-animate'); 281 } 282 } 283 }; 284 $carousel[index] = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).flickity(settings); // Set current point(); 285 286 $current[index] = point(); // Resize. 287 288 window.onresize = function (event) { 289 if ($current[index] !== point()) { 290 $carousel[index].flickity('destroy'); // Reinit. 291 292 $carousel[index].flickity(settings);
292 // Set current point(); 293 294 $current[index] = point(); 295 } 296 }; 297 298 var container = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parents('.cp-slider'); // Select the previous slide. 299 300 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(container).find('.cp-expert-slider__arrow-previous').on('click', function (event) { 301 event.preventDefault(); 302 var type = rtl ? 'next' : 'previous'; 303 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).flickity(type, true); 304 }); // Select the next slide. 305 306 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(container).find('.cp-expert-slider__arrow-next').on('click', function (event) { 307 event.preventDefault(); 308 var type = rtl ? 'previous' : 'next'; 309 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).flickity(type, true); 310 }); 311 }); 312 }); 313 } 314 315 initCarousel(); 316 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).ready(function () { 317 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document.body).on('post-load', function () { 318 initCarousel(); 319 }); 320 __WEBPACK_IMPORTED_MODULE_0__utility__["g" /* csco */].addAction('canvas.components.serverSideRender.onChange', 'init-carousel', function (props) { 321 if ('canvas/posts' === props.block) { 322 initCarousel(); 323 } 324 }); 325 }); 326})(); 327 328/***/ }), 329/* 3 */ 330/***/ (function(module, __webpack_exports__, __webpack_require__) { 331 332"use strict"; 333Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 334/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 335/** ---------------------------------------------------------------------------- 336 * Comments Dropdown */ 337 338 339(function () { 340 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on('click', '.cs-entry__comments-show button', function (e) { 341 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-entry__comments-collapse').show(); 342 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-entry__comments-show').remove(); 343 }); 344})(); 345 346/***/ }), 347/* 4 */ 348/***/ (function(module, __webpack_exports__, __webpack_require__) { 349 350"use strict"; 351Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 352/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 353/** ---------------------------------------------------------------------------- 354 * Detect Aligment */ 355 356 357(function () { 358 var ticking = false; 359 360 var update = function update() { 361 // Sidebar. 362 // -----------------------------------. 363 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-site-primary').each(function () { 364 var content = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.entry-content'); 365 var sidebar = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-entry__metabar-inner'); // Vars offset. 366 367 var offsetTop = 20; 368 var offsetBottom = -20; // Search elements. 369 370 var elements = []; 371 elements.push('> .alignfull'); 372 elements.push('> .alignwide'); 373 var layouts = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(content).find(elements.join(',')); 374 375 if (0 === sidebar.length) { 376 return; 377 } 378 379 if (0 === layouts.length) { 380 return; 381 } 382 383 var disabled = false; // Get sidebar values. 384 385 var sidebarTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).offset().top; 386 var sidebarHeight = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).outerHeight(true); 387 388 for (var i = 0; i < Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts).length; ++i) { 389 if ('none' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts[i]).css('transform')) { 390 continue; 391 } // Get layout values. 392 393 394 var layoutTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts[i]).offset().top; 395 var layoutHeight = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts[i]).outerHeight(true); // Calc points. 396 397 var pointTop = layoutTop - offsetTop; 398 var pointBottom = layoutTop + layoutHeight + offsetBottom; // Detect sidebar location. 399 400 if (sidebarTop + sidebarHeight >= pointTop && sidebarTop <= pointBottom) { 401 disabled = true; 402 } 403 } 404 405 if (disabled) { 406 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).css('opacity', '0'); 407 } else { 408 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).css('opacity', '1'); 409 } 410 }); // Ticking. 411 412 ticking = false;
413 }; 414 415 var requestTick = function requestTick() { 416 if (!ticking) { 417 window.requestAnimationFrame(update); 418 ticking = true; 419 } 420 }; 421 422 var onProcess = function onProcess() { 423 requestTick(); 424 }; 425 426 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('scroll', onProcess); 427 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('resize', onProcess); 428 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('image-load', onProcess); 429 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('post-load', onProcess); 430})(); 431 432/***/ }), 433/* 5 */ 434/***/ (function(module, __webpack_exports__, __webpack_require__) { 435 436"use strict"; 437Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 438/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 439/** 440 * AJAX Load More. 441 * 442 * Contains functions for AJAX Load More. 443 */ 444 445 446if ('undefined' === typeof window.load_more_query) { 447 window.load_more_query = []; 448} 449/** 450 * Get next posts 451 */ 452 453 454function csco_ajax_get_posts(object) { 455 var container = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).closest('.cs-posts-area'); 456 var settings = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('settings'); 457 var page = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('page'); 458 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('loading', true); // Set button text to Load More. 459 460 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).text(settings.translation.loading); 461 var data = { 462 action: 'csco_ajax_load_more', 463 page: page, 464 posts_per_page: settings.posts_per_page, 465 query_data: settings.query_data, 466 attributes: settings.attributes, 467 options: settings.options, 468 _ajax_nonce: settings.nonce 469 }; // Request Url. 470 471 var csco_pagination_url; 472 473 if ('ajax_restapi' === settings.type) { 474 csco_pagination_url = settings.rest_url; 475 } else { 476 csco_pagination_url = settings.url; 477 } // Send Request. 478 479 480 __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].post(csco_pagination_url, data, function (res) { 481 if (res.success) { 482 // Get the posts. 483 var data = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(res.data.content); // Check if there're any posts. 484 485 if (data.length) { 486 data.imagesLoaded(function () { 487 // Append new posts to list, standard and grid archives. 488 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(container).find('.cs-posts-area__main').append(data); // WP Post Load trigger. 489 490 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document.body).trigger('post-load'); // Reinit Facebook widgets. 491 492 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#fb-root').length) { 493 FB.XFBML.parse(); 494 } // Set button text to Load More. 495 496 497 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).text(settings.translation.load_more); // Increment a page. 498 499 page = page + 1; 500 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('page', page); // Set the loading state. 501 502 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('loading', false); 503 }); 504 } // Remove Button on Posts End. 505 506 507 if (res.data.posts_end || !data.length) { 508 // Remove Load More button. 509 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).remove(); 510 } 511 } else {// console.log(res); 512 } 513 }).fail(function (xhr, textStatus, e) {// console.log(xhr.responseText); 514 }); 515} 516/** 517 * Initialization Load More 518 */ 519 520 521function csco_load_more_init(infinite) { 522 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-posts-area').each(function () { 523 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('init')) { 524 return; 525 } 526 527 var csco_ajax_settings; 528 529 if (typeof csco_ajax_pagination !== 'undefined') { 530 csco_ajax_settings = csco_ajax_pagination; 531 } 532 533 var archive_data = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('posts-area'); 534 535 if (archive_data) { 536 csco_ajax_settings = JSON.parse(window.atob(archive_data)); 537 } 538 539 if (csco_ajax_settings) { 540 if (!infinite && csco_ajax_settings.infinite_load) { 541 return; 542 } // Add load more button. 543 544 545 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).append('<div class="cs-posts-area__pagination"><button class="cs-load-more">' + csco_ajax_settings.translation.load_more + '</button></div>'); // Set load more settings. 546 547 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('settings', csco_ajax_settings); 548 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('page', 2); 549 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('loading', false); 550 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('scrollHandling', { 551 allow: __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].parseJSON(csco_ajax_settings.infinite_load), 552 delay: 400 553 }); 554 } 555 556 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('init', true); 557 }); 558} 559 560csco_load_more_init(true); 561__WEBPACK_IMPORTED_MODULE_0__utility__["g" /* csco */].addAction('canvas.components.serverSideRender.onChange', 'posts-init-loadmore', function (props) { 562 if ('canvas/posts' === props.block) { 563 csco_load_more_init(false); 564 } 565}); // On Scroll Event. 566 567Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scroll(function () { 568 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-posts-area .cs-load-more').each(function () { 569 var loading = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('loading'); 570 var scrollHandling = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('scrollHandling'); 571 572 if ('undefined' === typeof scrollHandling) { 573 return; 574 } 575 576 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).length && !loading && scrollHandling.allow) { 577 scrollHandling.allow = false;
578 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('scrollHandling', scrollHandling); 579 var object = this; 580 setTimeout(function () { 581 var scrollHandling = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('scrollHandling'); 582 583 if ('undefined' === typeof scrollHandling) { 584 return; 585 } 586 587 scrollHandling.allow = true; 588 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('scrollHandling', scrollHandling); 589 }, scrollHandling.delay); 590 var offset = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).offset().top - Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scrollTop(); 591 592 if (4000 > offset) { 593 csco_ajax_get_posts(this); 594 } 595 } 596 }); 597}); // On Click Event. 598 599Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').on('click', '.cs-load-more', function () { 600 var loading = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('loading'); 601 602 if (!loading) { 603 csco_ajax_get_posts(this); 604 } 605}); 606 607/***/ }), 608/* 6 */ 609/***/ (function(module, __webpack_exports__, __webpack_require__) { 610 611"use strict"; 612Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 613/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 614function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 615 616/** 617 * AJAX Auto Load Next Post. 618 * 619 * Contains functions for AJAX Auto Load Next Post. 620 */ 621 622/** 623 * Check if Load Nextpost is defined by the wp_localize_script 624 */ 625 626if (typeof csco_ajax_nextpost !== 'undefined') { 627 var objNextparent = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-site-primary > .cs-site-content'), 628 objNextsect = '.cs-nextpost-section', 629 objNextpost = null, 630 currentNTitle = document.title, 631 currentNLink = window.location.href, 632 loadingNextpost = false, 633 scrollNextpost = { 634 allow: true, 635 reallow: function reallow() { 636 scrollNextpost.allow = true; 637 }, 638 delay: 400 //(milliseconds) adjust to the highest acceptable value 639 640 }; // Init. 641 642 if (csco_ajax_nextpost.next_post) { 643 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextparent).after('<div class="cs-nextpost-inner"></div>'); 644 objNextpost = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-nextpost-inner'); 645 } 646} 647/** 648 * Get next post 649 */ 650 651 652function csco_ajax_get_nextpost() { 653 loadingNextpost = true; // Set class loading. 654 655 var data = { 656 action: 'csco_ajax_load_nextpost', 657 not_in: csco_ajax_nextpost.not_in, 658 current_user: csco_ajax_nextpost.current_user, 659 nonce: csco_ajax_nextpost.nonce, 660 next_post: csco_ajax_nextpost.next_post 661 }; // Request Url. 662 663 var csco_ajax_nextpost_url; 664 665 if ('ajax_restapi' === csco_ajax_nextpost.type) { 666 csco_ajax_nextpost_url = csco_ajax_nextpost.rest_url; 667 } else { 668 csco_ajax_nextpost_url = csco_ajax_nextpost.url; 669 } // Send Request. 670 671 672 __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].post(csco_ajax_nextpost_url, data, function (res) { 673 csco_ajax_nextpost.next_post = false; 674 675 if (res.success) { 676 // Get the posts. 677 var data = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(res.data.content); // Check if there're any posts. 678 679 if (data.length) { 680 // Set the loading state. 681 loadingNextpost = false; // Set not_in. 682 683 csco_ajax_nextpost.not_in = res.data.not_in; // Set next data. 684 685 csco_ajax_nextpost.next_post = res.data.next_post; // Remove loader. 686 687 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextpost).siblings('.cs-nextpost-loading').remove(); // Append new post. 688 689 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextpost).append(data); // Reinit facebook. 690 691 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#fb-root').length) { 692 FB.XFBML.parse(); 693 } 694 695 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document.body).trigger('post-load'); 696 } 697 } else {// console.log(res); 698 } 699 }).fail(function (xhr, textStatus, e) {// console.log(xhr.responseText); 700 }); 701} 702/**
703 * Check if Load Nextpost is defined by the wp_localize_script 704 */ 705 706 707if (typeof csco_ajax_nextpost !== 'undefined') { 708 // On Scroll Event. 709 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scroll(function () { 710 var scrollTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scrollTop(); // Init nextpost. 711 712 if (csco_ajax_nextpost.next_post) { 713 if (objNextpost.length && !loadingNextpost && scrollNextpost.allow) { 714 scrollNextpost.allow = false; 715 setTimeout(scrollNextpost.reallow, scrollNextpost.delay); // Calc current offset. 716 717 var offset = objNextpost.offset().top + objNextpost.innerHeight() - scrollTop; // Load nextpost. 718 719 if (4000 > offset) { 720 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextpost).after('<div class="cs-nextpost-loading"></div>'); 721 csco_ajax_get_nextpost(); 722 } 723 } 724 } // Reset browser data link. 725 726 727 var objFirst = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextsect).first(); 728 729 if (objFirst.length) { 730 var firstTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objFirst).offset().top; // If there has been a change. 731 732 if (scrollTop < firstTop && window.location.href !== currentNLink) { 733 document.title = currentNTitle; 734 window.history.pushState(null, currentNTitle, currentNLink); 735 } 736 } // Set browser data link. 737 738 739 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextsect).each(function (index, elem) { 740 var elemTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).offset().top; 741 var elemHeight = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).innerHeight(); 742 743 if (scrollTop > elemTop && scrollTop < elemTop + elemHeight) { 744 // If there has been a change. 745 if (window.location.href !== Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('url')) { 746 // New title. 747 document.title = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('title'); // New link. 748 749 window.history.pushState(null, Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('title'), Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('url')); // Google Analytics. 750 751 if (typeof gtag === 'function' && _typeof(window.gaData) === 'object') { 752 var trackingId = Object.keys(window.gaData)[0]; 753 754 if (trackingId) { 755 gtag('config', trackingId, { 756 'page_title': Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('title'), 757 'page_location': Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('url') 758 }); 759 gtag('event', 'page_view', { 760 'send_to': trackingId 761 }); 762 } 763 } 764 } 765 } 766 }); 767 }); 768} 769 770/***/ }), 771/* 7 */ 772/***/ (function(module, __webpack_exports__, __webpack_require__) { 773 774"use strict"; 775Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 776/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 777/** ---------------------------------------------------------------------------- 778 * Mega Menu */ 779 780 781(function () { 782 /* 783 * Load Mega Menu Posts 784 */ 785 function cscoLoadMenuPosts(menuItem) { 786 var dataTerm = menuItem.children('a').data('term'), 787 dataPosts = menuItem.children('a').data('posts'), 788 dataNumberposts = menuItem.children('a').data('numberposts'), 789 menuContainer, 790 postsContainer; // Containers. 791 792 if (menuItem.hasClass('cs-mega-menu-term')) { 793 menuContainer = menuItem; 794 postsContainer = menuContainer.find('.cs-mm__posts'); 795 } 796 797 if (menuItem.hasClass('cs-mega-menu-posts')) { 798 menuContainer = menuItem; 799 postsContainer = menuContainer.find('.cs-mm__posts'); 800 } 801 802 if (menuItem.hasClass('cs-mega-menu-child-term')) { 803 menuContainer = menuItem.closest('.sub-menu'); 804 postsContainer = menuContainer.find('.cs-mm__posts[data-term="' + dataTerm + '"]'); 805 } // Check Menu Container. 806 807 808 if (!menuContainer || typeof menuContainer === 'undefined') { 809 return false;
810 } // Check Container. 811 812 813 if (!postsContainer || typeof postsContainer === 'undefined') { 814 return false; 815 } // Set Active. 816 817 818 menuContainer.find('.menu-item, .cs-mm__posts').removeClass('cs-active-item'); 819 menuItem.addClass('cs-active-item'); 820 821 if (postsContainer) { 822 postsContainer.addClass('cs-active-item'); 823 } // Check Loading. 824 825 826 if (menuItem.hasClass('cs-mm-loading') || menuItem.hasClass('loaded')) { 827 return false; 828 } // Create Data. 829 830 831 var data = { 832 'term': dataTerm, 833 'posts': dataPosts, 834 'per_page': dataNumberposts 835 }; 836 837 if ('undefined' === typeof csco_mega_menu) { 838 return; 839 } // Get Results. 840 841 842 __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].ajax({ 843 url: csco_mega_menu.rest_url, 844 type: 'GET', 845 data: data, 846 global: false, 847 async: true, 848 beforeSend: function beforeSend() { 849 menuItem.addClass('cs-mm-loading'); 850 postsContainer.addClass('cs-mm-loading'); 851 }, 852 success: function success(res) { 853 if (res.status && 'success' === res.status) { 854 // Set the loaded state. 855 menuItem.addClass('loaded'); 856 postsContainer.addClass('loaded'); // Check if there're any posts. 857 858 if (res.content && res.content.length) { 859 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(res.content).imagesLoaded(function () { 860 // Append Data. 861 postsContainer.html(res.content); 862 }); 863 } 864 } 865 }, 866 complete: function complete() { 867 // Set the loading state. 868 menuItem.removeClass('cs-mm-loading'); 869 postsContainer.removeClass('cs-mm-loading'); 870 } 871 }); 872 } 873 /* 874 * Get First Tab 875 */ 876 877 878 function cscoGetFirstTab(container) { 879 var firstTab = false; 880 container.find('.cs-mega-menu-child').each(function (index, el) { 881 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).hasClass('cs-mega-menu-child')) { 882 firstTab = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el); 883 return false; 884 } 885 }); 886 return firstTab; 887 } 888 /* 889 * Menu on document ready 890 */ 891 892 893 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).ready(function () { 894 /* 895 * Get Menu Posts on Hover 896 */ 897 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-posts').on('mouseenter', function () { 898 cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this)); 899 }); 900 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-term').on('mouseenter', function () { 901 cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this)); 902 }); 903 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-child').on('mouseenter', function () { 904 cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this)); 905 }); 906 /* 907 * Load First Tab on Mega Menu Hover 908 */ 909 910 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-terms').on('mouseenter', function () { 911 var tab = cscoGetFirstTab(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this)); 912 913 if (tab) { 914 cscoLoadMenuPosts(tab); 915 } 916 }); 917 }); 918 /* 919 * Load First Tab on Navbar Ready. 920 */ 921 922 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document, '.cs-header__nav').ready(function () { 923 var tab = false; // Autoload First Tab. 924 925 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-terms').each(function (index, el) { 926 tab = cscoGetFirstTab(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this)); 927 928 if (tab) { 929 cscoLoadMenuPosts(tab); 930 } 931 }); // Autoload Posts. 932 933 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-posts').each(function (index, el) { 934 cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this)); 935 }); // Autoload Term. 936 937 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-term').each(function (index, el) { 938 cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this)); 939 }); 940 }); 941})(); 942 943/***/ }), 944/* 8 */ 945/***/ (function(module, __webpack_exports__, __webpack_require__) { 946 947"use strict"; 948Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 949/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 950/** ---------------------------------------------------------------------------- 951 * Navigation */ 952 953var cscoNavigation = {}; 954 955(function () { 956 var $this; 957 cscoNavigation = { 958 /** Initialize */ 959 init: function init(e) { 960 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) { 961 return; 962 } 963 964 var headerStretch = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-navbar-smart-enabled .cs-header-stretch'); 965 966 if (headerStretch.length > 0) { 967 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('header-smart-stretch-init'); 968 } 969 970 $this = cscoNavigation; // Init events. 971 972 $this.events(e); 973 }, 974 975 /** Events */ 976 events: function events(e) { 977 // DOM Load 978 document.addEventListener('DOMContentLoaded', function (e) { 979 $this.smartLevels(e); 980 $this.adaptTablet(e); 981 $this.stickyScroll(e); 982 }); // Resize 983 984 window.addEventListener('resize', function (e) { 985 $this.smartLevels(e); 986 $this.adaptTablet(e); 987 $this.stickyScroll(e); 988 }); 989 }, 990 991 /** Smart multi-Level menu */ 992 smartLevels: function smartLevels(e) { 993 var windowWidth = __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].width(); // Reset Calc. 994 995 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner li').removeClass('cs-sm__level'); 996 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner li').removeClass('cs-sm-position-left cs-sm-position-right'); 997 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner li .sub-menu').removeClass('cs-mm__position-init'); // Set Settings. 998 999 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner > li.menu-item').not('.cs-mm').each(function (index, parent) { 1000 var position = 'cs-sm-position-right'; //right 1001 1002 var objPrevWidth = 0; 1003 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(parent).find('.sub-menu').each(function (index, el) { 1004 // Reset child levels. 1005 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parent().next('li').addClass('cs-sm__level'); 1006 1007 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parent().hasClass('cs-sm__level')) { 1008 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parent().removeClass('cs-mm-level'); 1009 position = 'cs-sm-position-right'; //right 1010 1011 objPrevWidth = 0; 1012 } // Find out position items. 1013 1014 1015 var offset = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).offset(); 1016 var objOffset = offset.left; 1017
1018 if ('cs-sm-position-right' === position && Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth() + objOffset > windowWidth) { 1019 position = 'cs-sm-position-left'; 1020 } 1021 1022 if ('cs-sm-position-left' === position && objOffset - (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth() + objPrevWidth) < 0) { 1023 position = 'cs-sm-position-right'; //right 1024 } 1025 1026 objPrevWidth = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth(); 1027 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).addClass('cs-sm-position-init').parent().addClass(position); 1028 }); 1029 }); 1030 }, 1031 1032 /** Adapting nav bar for tablet */ 1033 adaptTablet: function adaptTablet(e) { 1034 // Click outside. 1035 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on('touchstart', function (e) { 1036 if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).closest('.cs-header__nav-inner').length) { 1037 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner .menu-item-has-children').removeClass('submenu-visible'); 1038 } else { 1039 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).parents('.menu-item').siblings().find('.menu-item').removeClass('submenu-visible'); 1040 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).parents('.menu-item').siblings().closest('.menu-item').removeClass('submenu-visible'); 1041 } 1042 }); 1043 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner .menu-item-has-children').each(function (e) { 1044 // Reset class. 1045 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).removeClass('submenu-visible'); // Remove expanded. 1046 1047 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('> a > .expanded').remove(); // Add a caret. 1048 1049 if ('ontouchstart' in document.documentElement) { 1050 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('> a').append('<span class="expanded"></span>'); 1051 } // Check touch device. 1052 1053 1054 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).addClass('ontouchstart' in document.documentElement ? 'touch-device' : ''); 1055 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a .expanded', this).on('touchstart', function (e) { 1056 e.preventDefault(); 1057 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).closest('.menu-item-has-children').toggleClass('submenu-visible'); 1058 }); 1059 1060 if ('#' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).attr('href')) { 1061 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).on('touchstart', function (e) { 1062 e.preventDefault(); 1063 1064 if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).hasClass('expanded')) { 1065 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).closest('.menu-item-has-children').toggleClass('submenu-visible'); 1066 } 1067 }); 1068 } 1069 }); 1070 }, 1071 1072 /** Make nav bar sticky */ 1073 stickyScroll: function stickyScroll(e) { 1074 // Get css variables. 1075 var headerLargeHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')), 1076 headerCompactHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')); // Get header elements. 1077 1078 var wpAdminBar = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#wpadminbar'), 1079 headerSmart = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'), 1080 headerBefore = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header-before'), 1081 headerStretch = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-navbar-smart-enabled .cs-header-stretch'); // Adminbar sizes. 1082 1083 var wpAdminBarHeight; 1084 1085 if (wpAdminBar.length > 0) { 1086 wpAdminBarHeight = wpAdminBar.outerHeight(); 1087 } else { 1088 wpAdminBarHeight = 0; 1089 } // Header smart start position. 1090 1091 1092 var smartStart; 1093 1094 if (headerBefore.length > 0) { 1095 smartStart = headerBefore.offset().top; 1096 } else { 1097 if (headerSmart.length > 0) { 1098 smartStart = headerSmart.offset().top + wpAdminBarHeight; 1099 } else { 1100 smartStart = wpAdminBarHeight; 1101 } 1102 } // Set values to hide. 1103 1104 1105 var scrollPoint = 200, 1106 scrollPrev = 200, 1107 scrollUpAmount = 0; 1108 1109 if (headerStretch.length > 0) { 1110 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('header-smart-stretch-scroll-sticky-scroll-init'); 1111 } else { 1112 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scroll(function () { 1113 var scrolled = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scrollTop(), 1114 headerSmartPosition = headerSmart.length > 0 ? headerSmart.offset().top : 0; 1115 1116 if (scrolled > smartStart + scrollPoint + 10 && scrolled > scrollPrev) { 1117 if (scrolled > smartStart + headerCompactHeight + 200) { 1118 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('sticky-nav-hide'); 1119 } 1120 } else { 1121 if (scrollUpAmount >= scrollPoint || scrolled === 0) { 1122 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('sticky-nav-visible'); 1123 } 1124 } 1125 1126 if (headerSmart.length > 0) { 1127 if (scrolled > smartStart + headerCompactHeight) { 1128 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('nav-stick'); 1129 } else if (headerSmartPosition <= smartStart) { 1130 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('nav-unstick'); 1131 } 1132 } 1133 1134 if (scrolled < scrollPrev) { 1135 scrollUpAmount += scrollPrev - scrolled; 1136 } else { 1137 scrollUpAmount = 0; 1138 } 1139 1140 if (wpAdminBar.length > 0 && __WEBPACK_IMPORTED_MODULE_0__utility__["h" /* wndW */] <= 600 && scrolled >= wpAdminBarHeight) { 1141 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('adminbar-mobile-scrolled', [wpAdminBar, wpAdminBarHeight]); 1142 } else { 1143 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('adminbar-mobile-no-scrolled', [wpAdminBar, wpAdminBarHeight]); 1144 } 1145 1146 scrollPrev = scrolled; 1147 }); 1148 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("sticky-nav-visible", function () { 1149 headerSmart.addClass('cs-header-smart-visible'); 1150 }); 1151 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("sticky-nav-hide", function () { 1152 headerSmart.removeClass("cs-header-smart-visible"); 1153 }); 1154 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("nav-stick", function () { 1155 headerSmart.addClass('cs-scroll-sticky'); 1156 }); 1157 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("nav-unstick", function () { 1158 headerSmart.removeClass('cs-scroll-sticky').removeClass('cs-header-smart-visible'); 1159 }); 1160 } 1161 } 1162 }; 1163})(); // Initialize. 1164 1165 1166cscoNavigation.init(); 1167 1168/***/ }), 1169/* 9 */ 1170/***/ (function(module, __webpack_exports__, __webpack_require__) { 1171 1172"use strict"; 1173Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 1174/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 1175/** ---------------------------------------------------------------------------- 1176 * Offcanvas */ 1177 1178 1179(function () { 1180 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__offcanvas-toggle, .cs-site-overlay, .cs-offcanvas__toggle').on('click', function (e) { 1181 e.preventDefault(); // Transition. 1182 1183 if (!__WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('cs-offcanvas-active')) { 1184 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].addClass('cs-offcanvas-transition'); 1185 } else { 1186 setTimeout(function () { 1187 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].removeClass('cs-offcanvas-transition'); 1188 }, 400); 1189 } // Toogle offcanvas. 1190 1191 1192 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].toggleClass('cs-offcanvas-active'); 1193 }); 1194})(); 1195 1196/***/ }), 1197/* 10 */ 1198/***/ (function(module, __webpack_exports__, __webpack_require__) { 1199 1200"use strict"; 1201Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 1202/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 1203 1204 1205(function () { 1206 var offcanvas = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(".cs-offcanvas"); 1207 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("adminbar-mobile-scrolled", function (event, wpAdminBar, wpAdminBarHeight) { 1208 if (offcanvas.length > 0) { 1209 offcanvas.css("top", 0); 1210 } 1211 }); 1212 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("adminbar-mobile-no-scrolled", function (event, wpAdminBar, wpAdminBarHeight) { 1213 if (offcanvas.length > 0) { 1214 offcanvas.css("top", wpAdminBarHeight); 1215 } 1216 }); 1217})(); 1218 1219/***/ }), 1220/* 11 */ 1221/***/ (function(module, __webpack_exports__, __webpack_require__) { 1222 1223"use strict"; 1224Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 1225/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 1226/** ---------------------------------------------------------------------------- 1227 * Responsive Embeds */ 1228 1229 1230(function () { 1231 /** 1232 * Add max-width & max-height to <iframe> elements, depending on their width & height props. 1233 */ 1234 function initResponsiveEmbeds() { 1235 var proportion, parentWidth; // Loop iframe elements. 1236 1237 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.entry-content').find('iframe').each(function (index, iframe) { 1238 // Don't handle if the parent automatically resizes itself. 1239 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(iframe).closest('div').is('[data-vi
1239deo-start], [data-video-end]')) { 1240 return; 1241 } // Only continue if the iframe has a width & height defined. 1242 1243 1244 if (iframe.width && iframe.height) { 1245 // Calculate the proportion/ratio based on the width & height. 1246 proportion = parseFloat(iframe.width) / parseFloat(iframe.height); // Get the parent element's width. 1247 1248 parentWidth = parseFloat(window.getComputedStyle(iframe.parentElement, null).width.replace('px', '')); // Set the max-width & height. 1249 1250 iframe.style.maxWidth = '100%'; 1251 iframe.style.maxHeight = Math.round(parentWidth / proportion).toString() + 'px'; 1252 } 1253 }); 1254 } // Document ready. 1255 1256 1257 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].ready(function () { 1258 initResponsiveEmbeds(); 1259 }); // Post load. 1260 1261 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].on('post-load', function () { 1262 initResponsiveEmbeds(); 1263 }); // Document resize. 1264 1265 __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].on('resize', function () { 1266 initResponsiveEmbeds(); 1267 }); // Run on initial load. 1268 1269 initResponsiveEmbeds(); 1270})(); 1271 1272/***/ }), 1273/* 12 */ 1274/***/ (function(module, __webpack_exports__, __webpack_require__) { 1275 1276"use strict"; 1277Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 1278/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 1279/** ---------------------------------------------------------------------------- 1280 * Color Scheme Toogle */ 1281 1282var cscoDarkMode = {}; 1283 1284(function () { 1285 var $this; 1286 cscoDarkMode = { 1287 /** Initialize */ 1288 init: function init(e) { 1289 $this = cscoDarkMode; // Init events. 1290 1291 $this.events(e); 1292 }, 1293 1294 /** Events */ 1295 events: function events(e) { 1296 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) { 1297 return; 1298 } // DOM Load 1299 1300 1301 window.addEventListener('load', function (e) { 1302 $this.initMode(e); 1303 }); 1304 window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) { 1305 $this.initMode(e); 1306 }); // Switch 1307 1308 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on('click', '.cs-site-scheme-toggle', function (e) { 1309 $this.changeMode(e); 1310 }); 1311 }, 1312 1313 /** Detect Color Scheme */ 1314 detectColorScheme: function detectColorScheme(color) { 1315 var level = 190; // Set alpha channel. 1316 1317 var alpha = 1; 1318 var rgba = [255, 255, 255]; 1319 var color_rgba = false; // Trim color. 1320 1321 color = color.trim(); // If HEX format. 1322 1323 if ('#' === color[0]) { 1324 // Remove '#' from start. 1325 color = color.replace('#', '').trim(); 1326 1327 if (3 === color.length) { 1328 color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2]; 1329 } 1330 1331 rgba[0] = parseInt(color.substr(0, 2), 16); 1332 rgba[1] = parseInt(color.substr(2, 2), 16); 1333 rgba[2] = parseInt(color.substr(4, 2), 16); 1334 } else if (color_rgba = color.replace(/\s/g, '').match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i)) { 1335 // Convert RGB or RGBA. 1336 rgba[0] = parseInt(color_rgba[1]); 1337 rgba[1] = parseInt(color_rgba[2]); 1338 rgba[2] = parseInt(color_rgba[3]); 1339 1340 if (color_rgba[4] !== undefined) { 1341 alpha = parseFloat(color_rgba[4]); 1342 } 1343 } // Apply alpha channel. 1344 1345 1346 rgba.forEach(function myFunction(channel, key, stack) { 1347 stack[key] = String(channel + Math.ceil((255 - channel) * (1 - alpha))).padStart(2, '0'); 1348 }); // Set default scheme. 1349 1350 var scheme = 'default'; // Get brightness. 1351 1352 var brightness = (rgba[0] * 299 + rgba[1] * 587 + rgba[2] * 114) / 1000; // If color gray. 1353 1354 if (rgba[0] === rgba[1] && rgba[1] === rgba[2]) { 1355 if (brightness < level) { 1356 scheme = 'dark'; 1357 } 1358 } else { 1359 if (brightness < level) { 1360 scheme = 'inverse'; 1361 } 1362 } 1363 1364 return scheme; 1365 }, 1366 1367 /** Set Individual Scheme */ 1368 setIndividualScheme: function setIndividualScheme() { 1369 var list = { 1370 'body': '--cs-color-site-background', 1371 '.cs-topbar': '--cs-color-topbar-background', 1372 '.cs-header': '--cs-color-header-background', 1373 '.cs-header__nav-inner .sub-menu': '--cs-color-submenu-background', 1374 '.cs-header__multi-column-container': '--cs-color-submenu-background', 1375 '.cs-header__widgets': '--cs-color-submenu-background', 1376 '.cs-offcanvas__header': '--cs-color-header-background', 1377 '.cs-search': '--cs-color-search-background', 1378 '.cs-footer': '--cs-color-footer-background' 1379 }; 1380 1381 for (var key in list) { 1382 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(key).length <= 0) { 1383 continue; 1384 } 1385 /* jshint ignore:start */ 1386 1387 1388 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(key).each(function (index, element) { 1389 var color = window.getComputedStyle(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(element)[0]).getPropertyValue(list[key]); 1390 var scheme = $this.detectColorScheme(color); 1391 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(element).attr('data-scheme', scheme); 1392 }); 1393 /* jshint ignore:end */ 1394 } 1395 }, 1396 1397 /** Init Mode */ 1398 initMode: function initMode(e) { 1399 // Get system scheme. 1400 var systemSchema = 'default'; 1401 1402 if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { 1403 systemSchema = 'dark'; 1404 } 1405 1406 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["f" /* csSetCookie */])('_color_system_schema', systemSchema, { 1407 expires: 2592000 1408 }); // Set site scheme. 1409 1410 var siteScheme = 'default'; 1411 1412 switch (csLocalize.siteSchemeMode) { 1413 case 'dark': 1414 siteScheme = 'dark'; 1415 break; 1416 1417 case 'light': 1418 siteScheme = 'default'; 1419 break; 1420 1421 case 'system': 1422 siteScheme = systemSchema; 1423 break; 1424 } 1425 1426 if (csLocalize.siteSchemeToogle) { 1427 if ('default' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["e" /* csGetCookie */])('_color_schema')) { 1428 siteScheme = 'default'; 1429 } 1430 1431 if ('dark' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["e" /* csGetCookie */])('_color_schema')) { 1432 siteScheme = 'dark'; 1433 } 1434 } // Change site scheme 1435 1436 1437 if (siteScheme !== __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].attr('data-site-scheme')) { 1438 $this.changeScheme(siteScheme, false); 1439 } 1440 }, 1441 1442 /** Change Mode */ 1443 changeMode: function changeMode(e) { 1444 if ('dark' === __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].attr('data-site-scheme')) { 1445 $this.changeScheme('default', true); 1446 } else { 1447 $this.changeScheme('dark', true); 1448 } 1449 }, 1450 1451 /** Change Scheme */ 1452 changeScheme: function changeScheme(scheme, cookie) { 1453 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].addClass('cs-scheme-toggled'); 1454 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].attr('data-site-scheme', scheme);
1455 $this.setIndividualScheme(); 1456 1457 if (cookie) { 1458 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["f" /* csSetCookie */])('_color_schema', scheme, { 1459 expires: 2592000 1460 }); 1461 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["f" /* csSetCookie */])('_color_system_schema', null, { 1462 expires: 2592000 1463 }); 1464 } 1465 1466 setTimeout(function () { 1467 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].removeClass('cs-scheme-toggled'); 1468 }, 100); 1469 } 1470 }; 1471})(); // Initialize. 1472 1473 1474cscoDarkMode.init(); 1475 1476/***/ }), 1477/* 13 */ 1478/***/ (function(module, __webpack_exports__, __webpack_require__) { 1479 1480"use strict"; 1481Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 1482/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 1483/** ---------------------------------------------------------------------------- 1484 * Search Dropdown */ 1485 1486 1487(function () { 1488 var focusSearchTimeout; 1489 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__search-toggle').click(function (e) { 1490 if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search').is(":visible")) { 1491 focusSearchTimeout = setTimeout(function () { 1492 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search .cs-search__input').focus(); 1493 }, 300); 1494 } else { 1495 clearTimeout(focusSearchTimeout); 1496 } 1497 1498 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search').stop().slideToggle(); 1499 e.preventDefault(); 1500 }); 1501 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search__close').click(function (e) { 1502 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search').slideUp(); 1503 e.preventDefault(); 1504 clearTimeout(focusSearchTimeout); 1505 }); 1506})(); 1507 1508/***/ }), 1509/* 14 */ 1510/***/ (function(module, __webpack_exports__, __webpack_require__) { 1511 1512"use strict"; 1513Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 1514/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 1515/** ---------------------------------------------------------------------------- 1516 * Sticky Sidebar */ 1517 1518 1519(function () { 1520 var stickyElementsSmart = [], 1521 stickyElements = []; 1522 stickyElementsSmart.push('.cs-navbar-smart-enabled .cs-entry__metabar-inner'); 1523 stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled.cs-stick-to-top .cs-sidebar__inner'); 1524 stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled.cs-stick-last .cs-sidebar__inner .widget:last-child'); 1525 stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled .cnvs-block-section-sidebar-sticky-top .cnvs-block-section-sidebar-inner'); 1526 stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled .cnvs-block-section-sidebar-sticky-top-last-block .cnvs-block-section-sidebar-inner > :last-child'); 1527 stickyElements.push('.cs-navbar-sticky-enabled .cs-entry__metabar-inner'); 1528 stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled.cs-stick-to-top .cs-sidebar__inner'); 1529 stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled.cs-stick-last .cs-sidebar__inner .widget:last-child'); 1530 stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled .cnvs-block-section-sidebar-sticky-top .cnvs-block-section-sidebar-inner'); 1531 stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled .cnvs-block-section-sidebar-sticky-top-last-block .cnvs-block-section-sidebar-inner > :last-child'); 1532 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].ready(function () { 1533 var headerStick = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header'), 1534 wpAdminBar = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#wpadminbar'), 1535 headerStickHeight = headerStick.outerHeight(), 1536 wpAdminBarHeight = wpAdminBar.outerHeight(), 1537 headerStretch = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header-stretch'), 1538 headerStretchHeight = headerStretch.outerHeight(),
1539 allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20, 1540 windowWidth = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).width(); // Sticky sidebar for mozilla. 1541 1542 if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { 1543 stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner'); 1544 stickyElements.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner'); 1545 stickyElementsSmart.push('.cnvs-block-section-sidebar-sticky-bottom .cnvs-block-section-sidebar-inner'); 1546 stickyElements.push('.cnvs-block-section-sidebar-sticky-bottom .cnvs-block-section-sidebar-inner'); 1547 } // Join elements. 1548 1549 1550 stickyElementsSmart = stickyElementsSmart.join(','); 1551 stickyElements = stickyElements.join(','); // Sticky nav visible. 1552 1553 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('sticky-nav-visible', function () { 1554 headerStickHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')); 1555 1556 if (headerStretchHeight) { 1557 allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20; 1558 } else { 1559 allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20; 1560 } 1561 1562 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px'); 1563 }); // Sticky nav hide. 1564 1565 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('sticky-nav-hide', function () { 1566 headerStickHeight = 0; 1567 allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20; 1568 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px'); 1569 }); 1570 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('nav-unstick', function () { 1571 headerStickHeight = 0; 1572 allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20; 1573 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px'); 1574 }); 1575 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('stretch-nav-to-small', function () { 1576 headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')); 1577 1578 if (headerStretchHeight) { 1579 allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20; 1580 } else { 1581 allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20; 1582 } 1583 1584 if (headerStretch.hasClass("cs-scroll-sticky") && !headerStretch.hasClass("cs-scroll-active")) { 1585 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px'); 1586 } 1587 }); 1588 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('stretch-nav-to-big', function () { 1589 headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')); 1590 }); // Add top style 1591 1592 if (__WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('cs-navbar-smart-enabled') && windowWidth >= 1020) { 1593 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', (wpAdminBarHeight || 0) + 20 + 'px'); 1594 } else if (__WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('cs-navbar-sticky-enabled') && windowWidth >= 1020) { 1595 if (headerStretchHeight) { 1596 allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20; 1597 } else { 1598 allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20; 1599 } 1600 1601 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElements).css('top', allHeight + 'px'); 1602 } // Remove top style rafter resize 1603 1604 1605 __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].resize(function () { 1606 var windowWidthResize = __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].width(); 1607 1608 if (windowWidthResize < 1020) { 1609 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElements).removeAttr('style'); 1610 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).removeAttr('style'); 1611 } 1612 }); 1613 }); 1614})(); 1615 1616/***/ }), 1617/* 15 */ 1618/***/ (function(module, __webpack_exports__, __webpack_require__) { 1619 1620"use strict"; 1621Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 1622/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 1623/** ----------------------------------------------------------------------------
1624 * Video Background */ 1625 1626var cscoVideoBackground = {}; 1627 1628(function () { 1629 var $this; 1630 var YTdeferredDone = false; 1631 var initAPI = false; 1632 var process = false; 1633 var contex = []; 1634 var players = []; 1635 var attrs = []; // Create deferred object 1636 1637 var YTdeferred = __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].Deferred(); 1638 1639 if (typeof window.onYouTubePlayerAPIReady !== 'undefined') { 1640 if (typeof window.csYTAPIReady === 'undefined') { 1641 window.csYTAPIReady = []; 1642 } 1643 1644 window.csYTAPIReady.push(window.onYouTubePlayerAPIReady); 1645 } 1646 1647 window.onYouTubePlayerAPIReady = function () { 1648 if (typeof window.csYTAPIReady !== 'undefined') { 1649 if (window.csYTAPIReady.length) { 1650 window.csYTAPIReady.pop()(); 1651 } 1652 } // Resolve when youtube callback is called 1653 // passing YT as a parameter. 1654 1655 1656 YTdeferred.resolve(window.YT); 1657 }; // Whenever youtube callback was called = deferred resolved 1658 // your custom function will be executed with YT as an argument. 1659 1660 1661 YTdeferred.done(function (YT) { 1662 YTdeferredDone = true; 1663 }); // Embedding youtube iframe api. 1664 1665 function embedYoutubeAPI() { 1666 if ('function' === typeof window.onYTReady) { 1667 return; 1668 } 1669 1670 var tag = document.createElement('script'); 1671 tag.src = 'https://www.youtube.com/iframe_api'; 1672 var firstScriptTag = document.getElementsByTagName('script')[0]; 1673 firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 1674 } 1675 1676 __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].fn.contexObject = function (id, type) { 1677 if ('string' === typeof id) { 1678 id = "[data-id=\"".concat(id, "\"]"); 1679 } else { 1680 id = this; 1681 } 1682 1683 if ('wrap' === type) { 1684 return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id).closest('.cs-overlay, .cs-video-wrap'); 1685 } else if ('container' === type) { 1686 return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id).closest('.cs-video-wrapper'); 1687 } else if ('inner' === type) { 1688 return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id).closest('.cs-overlay, .cs-video-wrap').find('.cs-video-inner'); 1689 } else { 1690 return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id); 1691 } 1692 }; // Object Video Portfolio. 1693 1694 1695 cscoVideoBackground = { 1696 /** Initialize */ 1697 init: function init(e) { 1698 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) { 1699 return; 1700 } 1701 1702 $this = cscoVideoBackground; // Init events. 1703 1704 $this.events(e); 1705 }, 1706 // Video rescale. 1707 rescaleVideoBackground: function rescaleVideoBackground() { 1708 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-video-init').each(function () { 1709 var w = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().width(); 1710 var h = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().height(); 1711 var hideControl = 400; 1712 var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).attr('data-id'); 1713 1714 if (w / h > 16 / 9) { 1715 if ('youtube' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().data('video-mode')) { 1716 players[id].setSize(w, w / 16 * 9 + hideControl); 1717 } else { 1718 players[id].width(w); 1719 players[id].height(w / 16 * 9 + hideControl); 1720 } 1721 } else { 1722 if ('youtube' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().data('video-mode')) { 1723 players[id].setSize(h / 9 * 16, h + hideControl); 1724 } else { 1725 players[id].width(h / 9 * 16); 1726 players[id].height(h + hideControl); 1727 } 1728 } 1729 }); 1730 }, 1731 // Init video background. 1732 initVideoBackground: function initVideoBackground(mode, object) { 1733 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-video-inner').each(function () { 1734 // The mode. 1735 if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().is("[data-video-mode=\"".concat(mode, "\"]"))) { 1736 return; 1737 } // The state. 1738 1739 1740 var isInit = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).hasClass('cs-video-init'); 1741 var id = null; // Generate unique ID. 1742 1743 if (!isInit) { 1744 id = Math.random().toString(36).substr(2, 9); 1745 } else { 1746 id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).attr('data-id'); 1747 } // Create contex. 1748 1749 1750 contex[id] = this; // The monitor. 1751 1752 var isInView = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).isInViewport(); // The actived. 1753 1754 var isActive = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).hasClass('active'); // Get video attrs. 1755 1756 var youtubeID = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('youtube-id'); 1757 var videoType = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('video-type'); 1758 var videoStart = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('video-start'); 1759 var videoEnd = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('video-end'); // Initialization. 1760 1761 if (isInView && !isInit) { 1762 // Add init class. 1763 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).addClass('cs-video-init'); // Add unique ID. 1764 1765 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).attr('data-id', id); // Check video mode. 1766 1767 if ('youtube' === mode) { 1768 // Check video id. 1769 if (typeof youtubeID === 'undefined' || !youtubeID) { 1770 return; 1771 } // Video attrs. 1772 1773 1774 attrs[id] = { 1775 'videoId': youtubeID, 1776 'startSeconds': videoStart, 1777 'endSeconds': videoEnd, 1778 'suggestedQuality': 'hd720' 1779 }; // Creating a player. 1780 1781 players[id] = new YT.Player(contex[id], { 1782 playerVars: { 1783 autoplay: 0, 1784 autohide: 1, 1785 modestbranding: 1, 1786 rel: 0, 1787 showinfo: 0, 1788 controls: 0, 1789 disablekb: 1, 1790 enablejsapi: 0, 1791 iv_load_policy: 3, 1792 playsinline: 1, 1793 loop: 1 1794 }, 1795 events: { 1796 'onReady': function onReady() { 1797 players[id].cueVideoById(attrs[id]); 1798 players[id].mute(); 1799 1800 if ('always' === videoType) { 1801 $this.playVideo(id); 1802 } 1803 }, 1804 'onStateChange': function onStateChange(e) { 1805 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).closest('.cs-video-wrapper').removeClass('cs-video-played'); 1806 1807 if (e.data === 1) { 1808 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).closest('.cs-overlay, .cs-video-wrap').addClass('cs-video-bg-init'); 1809 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).closest('.cs-video-wrapper').addClass('cs-video-played'); 1810 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).addClass('active'); 1811 } else if (e.data === 0) { 1812 players[id].seekTo(attrs[id].startSeconds); 1813 } else if (e.data === 5) { 1814 players[id].videoReady = true; 1815 } 1816 } 1817 } 1818 }); 1819 } 1820
1821 $this.rescaleVideoBackground(); 1822 } // Pause and play. 1823 1824 1825 if ('always' === videoType && isActive && isInit && !$this.getVideoUpause(id)) { 1826 if (isInView) { 1827 $this.playVideo(id); 1828 } 1829 1830 if (!isInView) { 1831 $this.pauseVideo(id); 1832 } 1833 } 1834 }); 1835 }, 1836 // Construct video background. 1837 constructVideoBackground: function constructVideoBackground(object) { 1838 if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) { 1839 return; 1840 } 1841 1842 if (process) { 1843 return; 1844 } 1845 1846 process = true; // Smart init API. 1847 1848 if (!initAPI) { 1849 var elements = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('[data-video-mode="youtube"][data-youtube-id]'); 1850 1851 if (elements.length) { 1852 embedYoutubeAPI(); 1853 initAPI = true; 1854 } 1855 } 1856 1857 if (!initAPI) { 1858 process = false; 1859 } // Play Video. 1860 1861 1862 $this.initVideoBackground('local', object); 1863 1864 if (initAPI && YTdeferredDone) { 1865 $this.initVideoBackground('youtube', object); 1866 } 1867 1868 process = false; 1869 }, 1870 // Get video type. 1871 getVideoType: function getVideoType(id) { 1872 return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'container').data('video-type'); 1873 }, 1874 // Get video mode. 1875 getVideoMode: function getVideoMode(id) { 1876 return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'container').data('video-mode'); 1877 }, 1878 // Get video state. 1879 getVideoState: function getVideoState(id) { 1880 return players[id].videoState; 1881 }, 1882 // Get video ready. 1883 getVideoReady: function getVideoReady(id) { 1884 return players[id].videoReady ? players[id].videoReady : false; 1885 }, 1886 // Get video upause. 1887 getVideoUpause: function getVideoUpause(id) { 1888 return players[id].videoUpause ? players[id].videoUpause : false; 1889 }, 1890 // Get video volume. 1891 getVideoVolume: function getVideoVolume(id) { 1892 return players[id].videoVolume ? players[id].videoVolume : 'mute'; 1893 }, 1894 // Change video upause. 1895 changeVideoUpause: function changeVideoUpause(id, val) { 1896 players[id].videoUpause = val; 1897 }, 1898 // Play video. 1899 playVideo: function playVideo(id) { 1900 if ('play' === players[id].videoState) { 1901 return; 1902 } 1903 1904 if (!players[id].videoReady) { 1905 return setTimeout(function () { 1906 $this.playVideo(id); 1907 }, 100); 1908 } 1909 1910 if ('youtube' === $this.getVideoMode(id)) { 1911 players[id].playVideo(); 1912 } else { 1913 players[id].trigger('play'); 1914 } // Change control. 1915 1916 1917 var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-state'); 1918 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-pause'); 1919 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-play'); // Set state. 1920 1921 players[id].videoState = 'play'; 1922 }, 1923 // Pause video. 1924 pauseVideo: function pauseVideo(id) { 1925 if ('pause' === players[id].videoState) { 1926 return; 1927 } 1928 1929 if (!players[id].videoReady) { 1930 return; 1931 } 1932 1933 if ('youtube' === $this.getVideoMode(id)) { 1934 players[id].pauseVideo(); 1935 } else { 1936 players[id].trigger('pause'); 1937 } // Change control. 1938 1939 1940 var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-state'); 1941 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-play'); 1942 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-pause'); // Set state. 1943 1944 players[id].videoState = 'pause'; 1945 }, 1946 // Unmute video. 1947 unmuteVideo: function unmuteVideo(id) { 1948 if (!players[id].videoReady) { 1949 return; 1950 } 1951 1952 if ('youtube' === $this.getVideoMode(id)) { 1953 players[id].unMute(); 1954 } else { 1955 players[id].prop('muted', false); 1956 } // Change control. 1957 1958 1959 var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-volume'); 1960 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-mute'); 1961 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-unmute'); // Set state. 1962 1963 players[id].videoVolume = 'unmute'; 1964 }, 1965 // Mute video. 1966 muteVideo: function muteVideo(id) { 1967 if (!players[id].videoReady) { 1968 return; 1969 } 1970 1971 if ('youtube' === $this.getVideoMode(id)) { 1972 players[id].mute(); 1973 } else { 1974 players[id].prop('muted', true); 1975 } // Change control. 1976 1977 1978 var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-volume'); 1979 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-unmute'); 1980 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-mute'); // Set state. 1981 1982 players[id].videoVolume = 'muted'; 1983 }, 1984 // Toogle video state. 1985 toogleVideoState: function toogleVideoState(id) { 1986 if ('play' === $this.getVideoState(id)) { 1987 $this.pauseVideo(id); 1988 } else { 1989 $this.playVideo(id); 1990 } 1991 }, 1992 // Toogle video volume. 1993 toogleVideoVolume: function toogleVideoVolume(id) { 1994 if ('unmute' === $this.getVideoVolume(id)) { 1995 $this.muteVideo(id); 1996 } else { 1997 $this.unmuteVideo(id); 1998 } 1999 }, 2000 2001 /** Events */ 2002 events: function events(e) { 2003 // State Control. 2004 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('click', '.cs-player-state', function () { 2005 var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id'); 2006 $this.toogleVideoState(id); 2007 2008 if ('play' === $this.getVideoState(id)) { 2009 $this.changeVideoUpause(id, false); 2010 } else { 2011 $this.changeVideoUpause(id, true); 2012 } 2013 }); // Stop Control. 2014 2015 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('click', '.cs-player-stop', function () { 2016 var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id'); 2017 2018 if ('play' === $this.getVideoState(id)) { 2019 $this.changeVideoUpause(id, true); 2020 } 2021 2022 $this.pauseVideo(id); 2023 }); // Volume Control. 2024 2025 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('click', '.cs-player-volume', function () { 2026 var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id'); 2027 $this.toogleVideoVolume(id); 2028 }); // Mouseover. 2029 2030 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('mouseover mousemove', '.cs-entry__thumbnail', function () { 2031 var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id'); 2032 2033 if ('hover' === $this.getVideoType(id)) { 2034 $this.playVideo(id); 2035 } 2036 }); // Mouseout. 2037 2038 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('mouseout', '.cs-entry__thumbnail', function () { 2039 var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id'); 2040 2041 if ('hover' === $this.getVideoType(id)) { 2042 $this.pauseVideo(id); 2043 } 2044 }); // Document scroll. 2045 2046 __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].on('load scroll resize scrollstop', function () {
2047 $this.constructVideoBackground(); 2048 }); // Document ready. 2049 2050 __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].ready(function () { 2051 $this.constructVideoBackground(); 2052 }); // Post load. 2053 2054 __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].on('post-load', function () { 2055 $this.constructVideoBackground(); 2056 }); // Document resize. 2057 2058 __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].on('resize', function () { 2059 $this.rescaleVideoBackground(); 2060 }); // Init. 2061 2062 $this.constructVideoBackground(); 2063 } 2064 }; 2065})(); // Initialize. 2066 2067 2068cscoVideoBackground.init(); 2069 2070/***/ }), 2071/* 16 */ 2072/***/ (function(module, __webpack_exports__, __webpack_require__) { 2073 2074"use strict"; 2075Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 2076/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 2077/** ---------------------------------------------------------------------------- 2078 * Widget Nav Menu */ 2079 2080 2081(function () { 2082 __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].fn.responsiveNav = function () { 2083 this.removeClass('menu-item-expanded'); 2084 2085 if (this.prev().hasClass('submenu-visible')) { 2086 this.prev().removeClass('submenu-visible').slideUp(350); 2087 this.parent().removeClass('menu-item-expanded'); 2088 } else { 2089 this.parent().parent().find('.menu-item .sub-menu').removeClass('submenu-visible').slideUp(350); 2090 this.parent().parent().find('.menu-item-expanded').removeClass('menu-item-expanded'); 2091 this.prev().toggleClass('submenu-visible').hide().slideToggle(350); 2092 this.parent().toggleClass('menu-item-expanded'); 2093 } 2094 }; // 2095 // Navigation Menu Widget 2096 // 2097 2098 2099 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).ready(function (e) { 2100 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.widget_nav_menu .menu-item-has-children').each(function (e) { 2101 // Add a caret. 2102 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).append('<span></span>'); // Fire responsiveNav() when clicking a caret. 2103 2104 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> span', this).on('click', function (e) { 2105 e.preventDefault(); 2106 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).responsiveNav(); 2107 }); // Fire responsiveNav() when clicking a parent item with # href attribute. 2108 2109 if ('#' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).attr('href')) { 2110 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).on('click', function (e) { 2111 e.preventDefault(); 2112 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).next().next().responsiveNav(); 2113 }); 2114 } 2115 }); 2116 }); 2117})(); 2118 2119/***/ }), 2120/* 17 */ 2121/***/ (function(module, __webpack_exports__, __webpack_require__) { 2122 2123"use strict"; 2124Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 2125/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0); 2126/** Smart multi-Level menu */ 2127 2128 2129(function () { 2130 var windowWidth = __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].width(); 2131 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cp-entry__tooltip-inner').each(function (index, el) { 2132 var offset = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).offset(), 2133 objOffset = offset.left, 2134 objPrevWidth = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth(), 2135 positionOffset = -1 * (objPrevWidth - (windowWidth - objOffset)), 2136 elTriangle = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).find('.cp-entry__tooltip-triangle'); 2137 2138 if (windowWidth <= objOffset + objPrevWidth) { 2139 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).css('left', positionOffset - 20); 2140 elTriangle.css('left', -positionOffset + 17); 2141 2142 if (windowWidth >= 1200) { 2143 elTriangle.css('left', -positionOffset + 41); 2144 } 2145 } 2146 2147 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).resize(function () { 2148 var windowWidthResize = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).width(), 2149 offsetResize = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).offset(), 2150 objOffsetResize = offsetResize.left, 2151 positionOffsetResize = -1 * (objPrevWidth - (windowWidthResize - objOffsetResize)); 2152 2153 if (windowWidthResize <= objOffsetResize + objPrevWidth) { 2154 Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).css('left', positionOffsetResize - 20); 2155 elTriangle.css('left', -positionOffsetResize + 17); 2156 2157 if (windowWidthResize >= 1200) { 2158 elTriangle.css('left', -positionOffsetResize + 41); 2159 } 2160 } 2161 }); 2162 }); 2163})(); 2164 2165/***/ }) 2166/******/ ]);
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.