vendor: 4,359 bytes, lines 1-121
1/*! 2 * Webflow: Front-end site library 3 * @license MIT 4 * Inline scripts may access the api using an async handler: 5 * var Webflow = Webflow || []; 6 * Webflow.push(readyFunction); 7 */ 8/******/ (function(modules) { // webpackBootstrap 9/******/ // The module cache 10/******/ var installedModules = {}; 11/******/ 12/******/ // The require function 13/******/ function __webpack_require__(moduleId) { 14/******/ 15/******/ // Check if module is in cache 16/******/ if(installedModules[moduleId]) { 17/******/ return installedModules[moduleId].exports; 18/******/ } 19/******/ // Create a new module (and put it into the cache) 20/******/ var module = installedModules[moduleId] = { 21/******/ i: moduleId, 22/******/ l: false, 23/******/ exports: {} 24/******/ }; 25/******/ 26/******/ // Execute the module function 27/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 28/******/ 29/******/ // Flag the module as loaded 30/******/ module.l = true; 31/******/ 32/******/ // Return the exports of the module 33/******/ return module.exports; 34/******/ } 35/******/ 36/******/ 37/******/ // expose the modules object (__webpack_modules__) 38/******/ __webpack_require__.m = modules; 39/******/ 40/******/ // expose the module cache 41/******/ __webpack_require__.c = installedModules; 42/******/ 43/******/ // define getter function for harmony exports 44/******/ __webpack_require__.d = function(exports, name, getter) { 45/******/ if(!__webpack_require__.o(exports, name)) { 46/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 47/******/ } 48/******/ }; 49/******/ 50/******/ // define __esModule on exports 51/******/ __webpack_require__.r = function(exports) { 52/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {w-slider 53/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 54/******/ } 55/******/ Object.defineProperty(exports, '__esModule', { value: true }); 56/******/ }; 57/******/ 58/******/ // create a fake namespace object 59/******/ // mode & 1: value is a module id, require it 60/******/ // mode & 2: merge all properties of value into the ns 61/******/ // mode & 4: return value when already ns object 62/******/ // mode & 8|1: behave like require 63/******/ __webpack_require__.t = function(value, mode) { 64/******/ if(mode & 1) value = __webpack_require__(value); 65/******/ if(mode & 8) return value; 66/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 67/******/ var ns = Object.create(null); 68/******/ __webpack_require__.r(ns); 69/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 70/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 71/******/ return ns; 72/******/ }; 73/******/ 74/******/ // getDefaultExport function for compatibility with non-harmony modules 75/******/ __webpack_require__.n = function(module) { 76/******/ var getter = module && module.__esModule ? 77/******/ function getDefault() { return module['default']; } : 78/******/ function getModuleExports() { return module; }; 79/******/ __webpack_require__.d(getter, 'a', getter); 80/******/ return getter; 81/******/ }; 82/******/ 83/******/ // Object.prototype.hasOwnProperty.call 84/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 85/******/ 86/******/ // __webpack_public_path__ 87/******/ __webpack_require__.p = ""; 88/******/ 89/******/ 90/******/ // Load entry module and return exports 91/******/ return __webpack_require__(__webpack_require__.s = 4); 92/******/ }) 93/************************************************************************/ 94/******/ ([ 95/* 0 */ 96/***/ (function(module, exports, __webpack_require__) { 97 98"use strict"; 99 // @wf-will-never-add-flow-to-this-file 100 101/* globals window, document, navigator, WEBFLOW_ENV_TEST */ 102 103/* eslint-disable no-var */ 104 105/** 106 * Webflow: Core site library 107 */ 108 109var Webflow = {}; 110var modules = {}; 111var primary = []; 112var secondary = window.Webflow || []; 113var $ = window.jQuery; 114var $win = $(window); 115var $doc = $(document); 116var isFunction = $.isFunction; 117 118var _ = Webflow._ = __webpack_require__(6); 119 120var tram = Webflow.tram = __webpack_require__(1) && $.tram; 121var domready = false;
122var destroyed = false; 123tram.config.hideBackface = false; 124tram.config.keepInherited = true; 125/** 126 * Webflow.define - Define a named module 127 * @param {string} name 128 * @param {function} factory 129 * @param {object} options 130 * @return {object} 131 */ 132 133Webflow.define = function (name, factory, options) { 134 if (modules[name]) { 135 unbindModule(modules[name]); 136 } 137 138 var instance = modules[name] = factory($, _, options) || {}; 139 bindModule(instance); 140 return instance; 141}; 142/** 143 * Webflow.require - Require a named module 144 * @param {string} name 145 * @return {object} 146 */ 147 148 149Webflow.require = function (name) { 150 return modules[name]; 151}; 152 153function bindModule(module) { 154 // If running in Webflow app, subscribe to design/preview events 155 if (Webflow.env()) { 156 isFunction(module.design) && $win.on('__wf_design', module.design); 157 isFunction(module.preview) && $win.on('__wf_preview', module.preview); 158 } // Subscribe to front-end destroy event 159 160 161 isFunction(module.destroy) && $win.on('__wf_destroy', module.destroy); // Look for ready method on module 162 163 if (module.ready && isFunction(module.ready)) { 164 addReady(module); 165 } 166} 167 168function addReady(module) { 169 // If domready has already happened, run ready method 170 if (domready) { 171 module.ready(); 172 return; 173 } // Otherwise add ready method to the primary queue (only once) 174 175 176 if (_.contains(primary, module.ready)) { 177 return; 178 } 179 180 primary.push(module.ready); 181} 182 183function unbindModule(module) { 184 // Unsubscribe module from window events 185 isFunction(module.design) && $win.off('__wf_design', module.design); 186 isFunction(module.preview) && $win.off('__wf_preview', module.preview); 187 isFunction(module.destroy) && $win.off('__wf_destroy', module.destroy); // Remove ready method from primary queue 188 189 if (module.ready && isFunction(module.ready)) { 190 removeReady(module); 191 } 192} 193 194function removeReady(module) { 195 primary = _.filter(primary, function (readyFn) { 196 return readyFn !== module.ready; 197 }); 198} 199/** 200 * Webflow.push - Add a ready handler into secondary queue 201 * @param {function} ready Callback to invoke on domready 202 */ 203 204 205Webflow.push = function (ready) { 206 // If domready has already happened, invoke handler 207 if (domready) { 208 isFunction(ready) && ready(); 209 return; 210 } // Otherwise push into secondary queue 211 212 213 secondary.push(ready); 214}; 215/** 216 * Webflow.env - Get the state of the Webflow app 217 * @param {string} mode [optional] 218 * @return {boolean} 219 */ 220 221 222Webflow.env = function (mode) { 223 var designFlag = window.__wf_design; 224 var inApp = typeof designFlag !== 'undefined'; 225 226 if (!mode) { 227 return inApp; 228 } 229 230 if (mode === 'design') { 231 return inApp && designFlag; 232 } 233 234 if (mode === 'preview') { 235 return inApp && !designFlag; 236 } 237 238 if (mode === 'slug') { 239 return inApp && window.__wf_slug; 240 } 241 242 if (mode === 'editor') { 243 return window.WebflowEditor; 244 } 245 246 if (mode === 'test') { 247 return false || window.__wf_test; 248 } 249 250 if (mode === 'frame') { 251 return window !== window.top; 252 } 253}; // Feature detects + browser sniffs ಠ_ಠ254 255 256var userAgent = navigator.userAgent.toLowerCase(); 257var touch = Webflow.env.touch = 'ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch; 258var chrome = Webflow.env.chrome = /chrome/.test(userAgent) && /Google/.test(navigator.vendor) && parseInt(userAgent.match(/chrome\/(\d+)\./)[1], 10); 259var ios = Webflow.env.ios = /(ipod|iphone|ipad)/.test(userAgent); 260Webflow.env.safari = /safari/.test(userAgent) && !chrome && !ios; // Maintain current touch target to prevent late clicks on touch devices 261 262var touchTarget; // Listen for both events to support touch/mouse hybrid devices 263 264touch && $doc.on('touchstart mousedown', function (evt) { 265 touchTarget = evt.target; 266}); 267/** 268 * Webflow.validClick - validate click target against current touch target 269 * @param {HTMLElement} clickTarget Element being clicked 270 * @return {Boolean} True if click target is valid (always true on non-touch) 271 */ 272 273Webflow.validClick = touch ? function (clickTarget) { 274 return clickTarget === touchTarget || $.contains(clickTarget, touchTarget); 275} : function () { 276 return true; 277}; 278/** 279 * Webflow.resize, Webflow.scroll - throttled event proxies 280 */ 281 282var resizeEvents = 'resize.webflow orientationchange.webflow load.webflow';
283var scrollEvents = 'scroll.webflow ' + resizeEvents; 284Webflow.resize = eventProxy($win, resizeEvents); 285Webflow.scroll = eventProxy($win, scrollEvents); 286Webflow.redraw = eventProxy(); // Create a proxy instance for throttled events 287 288function eventProxy(target, types) { 289 // Set up throttled method (using custom frame-based _.throttle) 290 var handlers = []; 291 var proxy = {}; 292 proxy.up = _.throttle(function (evt) { 293 _.each(handlers, function (h) { 294 h(evt); 295 }); 296 }); // Bind events to target 297 298 if (target && types) { 299 target.on(types, proxy.up); 300 } 301 /** 302 * Add an event handler 303 * @param {function} handler 304 */ 305 306 307 proxy.on = function (handler) { 308 if (typeof handler !== 'function') { 309 return; 310 } 311 312 if (_.contains(handlers, handler)) { 313 return; 314 } 315 316 handlers.push(handler); 317 }; 318 /** 319 * Remove an event handler 320 * @param {function} handler 321 */ 322 323 324 proxy.off = function (handler) { 325 // If no arguments supplied, clear all handlers 326 if (!arguments.length) { 327 handlers = []; 328 return; 329 } // Otherwise, remove handler from the list 330 331 332 handlers = _.filter(handlers, function (h) { 333 return h !== handler; 334 }); 335 }; 336 337 return proxy; 338} // Webflow.location - Wrap window.location in api 339 340 341Webflow.location = function (url) { 342 window.location = url; 343}; 344 345if (Webflow.env()) { 346 // Ignore redirects inside a Webflow design/edit environment 347 Webflow.location = function () {}; 348} // Webflow.ready - Call primary and secondary handlers 349 350 351Webflow.ready = function () { 352 domready = true; // Restore modules after destroy 353 354 if (destroyed) { 355 restoreModules(); // Otherwise run primary ready methods 356 } else { 357 _.each(primary, callReady); 358 } // Run secondary ready methods 359 360 361 _.each(secondary, callReady); // Trigger resize 362 363 364 Webflow.resize.up(); 365}; 366 367function callReady(readyFn) { 368 isFunction(readyFn) && readyFn(); 369} 370 371function restoreModules() { 372 destroyed = false; 373 374 _.each(modules, bindModule); 375} 376/** 377 * Webflow.load - Add a window load handler that will run even if load event has already happened 378 * @param {function} handler 379 */ 380 381 382var deferLoad; 383 384Webflow.load = function (handler) { 385 deferLoad.then(handler); 386}; 387 388function bindLoad() { 389 // Reject any previous deferred (to support destroy) 390 if (deferLoad) { 391 deferLoad.reject(); 392 $win.off('load', deferLoad.resolve); 393 } // Create deferred and bind window load event 394 395 396 deferLoad = new $.Deferred(); 397 $win.on('load', deferLoad.resolve); 398} // Webflow.destroy - Trigger a destroy event for all modules 399 400 401Webflow.destroy = function (options) { 402 options = options || {}; 403 destroyed = true; 404 $win.triggerHandler('__wf_destroy'); // Allow domready reset for tests 405 406 if (options.domready != null) { 407 domready = options.domready; 408 } // Unbind modules 409 410 411 _.each(modules, unbindModule); // Clear any proxy event handlers 412 413 414 Webflow.resize.off(); 415 Webflow.scroll.off(); 416 Webflow.redraw.off(); // Clear any queued ready methods 417 418 primary = []; 419 secondary = []; // If load event has not yet fired, replace the deferred 420 421 if (deferLoad.state() === 'pending') { 422 bindLoad(); 423 } 424}; // Listen for domready 425 426 427$(Webflow.ready); // Listen for window.onload and resolve deferred 428 429bindLoad(); // Export commonjs module 430 431module.exports = window.Webflow = Webflow; 432 433/***/ }), 434/* 1 */ 435/***/ (function(module, exports, __webpack_require__) { 436 437"use strict"; 438 // @wf-will-never-add-flow-to-this-file 439 440/* eslint-disable eslint-comments/no-unlimited-disable */ 441 442/* eslint-disable */ 443 444/*! 445 * tram.js v0.8.2-global 446 * Cross-browser CSS3 transitions in JavaScript 447 * https://github.com/bkwld/tram 448 * MIT License 449 */ 450 451/* prettier-ignore */ 452 453var _interopRequireDefault = __webpack_require__(2); 454 455var _typeof2 = _interopRequireDefault(__webpack_require__(7)); 456 457window.tram = function (a) { 458 function b(a, b) { 459 var c = new M.Bare(); 460 return c.init(a, b); 461 } 462 463 function c(a) { 464 return a.replace(/[A-Z]/g, function (a) { 465 return "-" + a.toLowerCase(); 466 }); 467 } 468 469 function d(a) { 470 var b = parseInt(a.slice(1), 16), 471 c = b >> 16 & 255, 472 d = b >> 8 & 255, 473 e = 255 & b; 474 return [c, d, e]; 475 } 476 477 function e(a, b, c) { 478 return "#" + (1 << 24 | a << 16 | b << 8 | c).toString(16).slice(1); 479 } 480 481 function f() {} 482 483 function g(a, b) { 484 j("Type warning: Expected: [" + a + "] Got: [" + (0, _typeof2["default"])(b) + "] " + b); 485 } 486 487 function h(a, b, c) { 488 j("Units do not match [" + a + "]: " + b + ", " + c); 489 } 490 491 function i(a, b, c) { 492 if (void 0 !== b && (c = b), void 0 === a) return c; 493 var d = c; 494 return $.test(a) || !_.test(a) ? d = parseInt(a, 10) : _.test(a) && (d = 1e3 * parseFloat(a)), 0 > d && (d = 0), d === d ? d : c; 495 } 496 497 function j(a) { 498 U.debug && window && window.console.warn(a); 499 } 500 501 function k(a) { 502 for (var b = -1, c = a ? a.length : 0, d = []; ++b < c;) { 503 var e = a[b]; 504 e && d.push(e); 505 } 506 507 return d; 508 } 509 510 var l = function (a, b, c) { 511 function d(a) { 512 return "object" == (0, _typeof2["default"])(a); 513 } 514 515 function e(a) { 516 return "function" == typeof a; 517 } 518 519 function f() {} 520 521 function g(h, i) { 522 function j() { 523 var a = new k(); 524 return e(a.init) && a.init.apply(a, arguments), a; 525 } 526 527 function k() {} 528 529 i === c && (i = h, h = Object), j.Bare = k; 530 var l, 531 m = f[a] = h[a], 532 n = k[a] = j[a] = new f(); 533 return n.constructor = j, j.mixin = function (b) { 534 return k[a] = j[a] = g(j, b)[a], j; 535 }, j.open = function (a) { 536 if (l = {}, e(a) ? l = a.call(j, n, m, j, h) : d(a) && (l = a), d(l)) for (var c in l) { 537 b.call(l, c) && (n[c] = l[c]); 538 } 539 return e(n.init) || (n.init = h), j; 540 }, j.open(i); 541 } 542 543 return g; 544 }("prototype", {}.hasOwnProperty), 545 m = { 546 ease: ["ease", function (a, b, c, d) { 547 var e = (a /= d) * a, 548 f = e * a; 549 return b + c * (-2.75 * f * e + 11 * e * e + -15.5 * f + 8 * e + .25 * a); 550 }], 551 "ease-in": ["ease-in", function (a, b, c, d) { 552 var e = (a /= d) * a, 553 f = e * a; 554 return b + c * (-1 * f * e + 3 * e * e + -3 * f + 2 * e); 555 }], 556 "ease-out": ["ease-out", function (a, b, c, d) { 557 var e = (a /= d) * a, 558 f = e * a; 559 return b + c * (.3 * f * e + -1.6 * e * e + 2.2 * f + -1.8 * e + 1.9 * a); 560 }], 561 "ease-in-out": ["ease-in-out", function (a, b, c, d) { 562 var e = (a /= d) * a, 563 f = e * a; 564 return b + c * (2 * f * e + -5 * e * e + 2 * f + 2 * e); 565 }], 566 linear: ["linear", function (a, b, c, d) { 567 return c * a / d + b; 568 }], 569 "ease-in-quad": ["cubic-bezier(0.550, 0.085, 0.680, 0.530)", function (a, b, c, d) { 570 return c * (a /= d) * a + b; 571 }], 572 "ease-out-quad": ["cubic-bezier(0.250, 0.460, 0.450, 0.940)", function (a, b, c, d) { 573 return -c * (a /= d) * (a - 2) + b; 574 }], 575 "ease-in-out-quad": ["cubic-bezier(0.455, 0.030, 0.515, 0.955)", function (a, b, c, d) { 576 return (a /= d / 2) < 1 ? c / 2 * a * a + b : -c / 2 * (--a * (a - 2) - 1) + b; 577 }], 578 "ease-in-cubic": ["cubic-bezier(0.550, 0.055, 0.675, 0.190)", function (a, b, c, d) { 579 return c * (a /= d) * a * a + b; 580 }], 581 "ease-out-cubic": ["cubic-bezier(0.215, 0.610, 0.355, 1)", function (a, b, c, d) { 582 return c * ((a = a / d - 1) * a * a + 1) + b; 583 }], 584 "ease-in-out-cubic": ["cubic-bezier(0.645, 0.045, 0.355, 1)", function (a, b, c, d) { 585 return (a /= d / 2) < 1 ? c / 2 * a * a * a + b : c / 2 * ((a -= 2) * a * a + 2) + b; 586 }], 587 "ease-in-quart": ["cubic-bezier(0.895, 0.030, 0.685, 0.220)", function (a, b, c, d) { 588 return c * (a /= d) * a * a * a + b; 589 }], 590 "ease-out-quart": ["cubic-bezier(0.165, 0.840, 0.440, 1)", function (a, b, c, d) { 591 return -c * ((a = a / d - 1) * a * a * a - 1) + b; 592 }], 593 "ease-in-out-quart": ["cubic-bezier(0.770, 0, 0.175, 1)", function (a, b, c, d) { 594 return (a /= d / 2) < 1 ? c / 2 * a * a * a * a + b : -c / 2 * ((a -= 2) * a * a * a - 2) + b; 595 }], 596 "ease-in-quint": ["cubic-bezier(0.755, 0.050, 0.855, 0.060)", function (a, b, c, d) { 597 return c * (a /= d) * a * a * a * a + b; 598 }], 599 "ease-out-quint": ["cubic-bezier(0.230, 1, 0.320, 1)", function (a, b, c, d) { 600 return c * ((a = a / d - 1) * a * a * a * a + 1) + b; 601 }], 602 "ease-in-out-quint": ["cubic-bezier(0.860, 0, 0.070, 1)", function (a, b, c, d) { 603 return (a /= d / 2) < 1 ? c / 2 * a * a * a * a * a + b : c / 2 * ((a -= 2) * a * a * a * a + 2) + b; 604 }], 605 "ease-in-sine": ["cubic-bezier(0.470, 0, 0.745, 0.715)", function (a, b, c, d) { 606 return -c * Math.cos(a / d * (Math.PI / 2)) + c + b; 607 }], 608 "ease-out-sine": ["cubic-bezier(0.390, 0.575, 0.565, 1)", function (a, b, c, d) { 609 return c * Math.sin(a / d * (Math.PI / 2)) + b; 610 }], 611 "ease-in-out-sine": ["cubic-bezier(0.445, 0.050, 0.550, 0.950)", function (a, b, c, d) { 612 return -c / 2 * (Math.cos(Math.PI * a / d) - 1) + b; 613 }], 614 "ease-in-expo": ["cubic-bezier(0.950, 0.050, 0.795, 0.035)", function (a, b, c, d) { 615 return 0 === a ? b : c * Math.pow(2, 10 * (a / d - 1)) + b; 616 }], 617 "ease-out-expo": ["cubic-bezier(0.190, 1, 0.220, 1)", function (a, b, c, d) { 618 return a === d ? b + c : c * (-Math.pow(2, -10 * a / d) + 1) + b; 619 }], 620 "ease-in-out-expo": ["cubic-bezier(1, 0, 0, 1)", function (a, b, c, d) { 621 return 0 === a ? b : a === d ? b + c : (a /= d / 2) < 1 ? c / 2 * Math.pow(2, 10 * (a - 1)) + b : c / 2 * (-Math.pow(2, -10 * --a) + 2) + b; 622 }], 623 "ease-in-circ": ["cubic-bezier(0.600, 0.040, 0.980, 0.335)", function (a, b, c, d) { 624 return -c * (Math.sqrt(1 - (a /= d) * a) - 1) + b; 625 }], 626 "ease-out-circ": ["cubic-bezier(0.075, 0.820, 0.165, 1)", function (a, b, c, d) { 627 return c * Math.sqrt(1 - (a = a / d - 1) * a) + b; 628 }], 629 "ease-in-out-circ": ["cubic-bezier(0.785, 0.135, 0.150, 0.860)", function (a, b, c, d) { 630 return (a /= d / 2) < 1 ? -c / 2 * (Math.sqrt(1 - a * a) - 1) + b : c / 2 * (Math.sqrt(1 - (a -= 2) * a) + 1) + b; 631 }], 632 "ease-in-back": ["cubic-bezier(0.600, -0.280, 0.735, 0.045)", function (a, b, c, d, e) { 633 return void 0 === e && (e = 1.70158), c * (a /= d) * a * ((e + 1) * a - e) + b; 634 }], 635 "ease-out-back": ["cubic-bezier(0.175, 0.885, 0.320, 1.275)", function (a, b, c, d, e) { 636 return void 0 === e && (e = 1.70158), c * ((a = a / d - 1) * a * ((e + 1) * a + e) + 1) + b; 637 }], 638 "ease-in-out-back": ["cubic-bezier(0.680, -0.550, 0.265, 1.550)", function (a, b, c, d, e) { 639 return void 0 === e && (e = 1.70158), (a /= d / 2) < 1 ? c / 2 * a * a * (((e *= 1.525) + 1) * a - e) + b : c / 2 * ((a -= 2) * a * (((e *= 1.525) + 1) * a + e) + 2) + b; 640 }] 641 }, 642 n = { 643 "ease-in-back": "cubic-bezier(0.600, 0, 0.735, 0.045)", 644 "ease-out-back": "cubic-bezier(0.175, 0.885, 0.320, 1)", 645 "ease-in-out-back": "cubic-bezier(0.680, 0, 0.265, 1)" 646 }, 647 o = document, 648 p = window, 649 q = "bkwld-tram", 650 r = /[\-\.0-9]/g, 651 s = /[A-Z]/, 652 t = "number", 653 u = /^(rgb|#)/, 654 v = /(em|cm|mm|in|pt|pc|px)$/, 655 w = /(em|cm|mm|in|pt|pc|px|%)$/, 656 x = /(deg|rad|turn)$/, 657 y = "unitless", 658 z = /(all|none) 0s ease 0s/, 659 A = /^(width|height)$/, 660 B = " ", 661 C = o.createElement("a"), 662 D = ["Webkit", "Moz", "O", "ms"], 663 E = ["-webkit-", "-moz-", "-o-", "-ms-"], 664 F = function F(a) { 665 if (a in C.style) return { 666 dom: a, 667 css: a 668 }; 669 var b, 670 c, 671 d = "", 672 e = a.split("-"); 673 674 for (b = 0; b < e.length; b++) { 675 d += e[b].charAt(0).toUpperCase() + e[b].slice(1); 676 } 677 678 for (b = 0; b < D.length; b++) { 679 if (c = D[b] + d, c in C.style) return { 680 dom: c, 681 css: E[b] + a 682 }; 683 } 684 }, 685 G = b.support = { 686 bind: Function.prototype.bind, 687 transform: F("transform"), 688 transition: F("transition"), 689 backface: F("backface-visibility"), 690 timing: F("transition-timing-function") 691 }; 692 693 if (G.transition) { 694 var H = G.timing.dom; 695 if (C.style[H] = m["ease-in-back"][0], !C.style[H]) for (var I in n) { 696 m[I][0] = n[I]; 697 } 698 } 699 700 var J = b.frame = function () { 701 var a = p.requestAnimationFrame || p.webkitRequestAnimationFrame || p.mozRequestAnimationFrame || p.oRequestAnimationFrame || p.msRequestAnimationFrame; 702 return a && G.bind ? a.bind(p) : function (a) { 703 p.setTimeout(a, 16); 704 }; 705 }(), 706 K = b.now = function () { 707 var a = p.performance, 708 b = a && (a.now || a.webkitNow || a.msNow || a.mozNow); 709 return b && G.bind ? b.bind(a) : Date.now || function () { 710 return +new Date(); 711 }; 712 }(), 713 L = l(function (b) { 714 function d(a, b) { 715 var c = k(("" + a).split(B)), 716 d = c[0]; 717 b = b || {}; 718 var e = Y[d]; 719 if (!e) return j("Unsupported property: " + d); 720 721 if (!b.weak || !this.props[d]) { 722 var f = e[0], 723 g = this.props[d]; 724 return g || (g = this.props[d] = new f.Bare()), g.init(this.$el, c, e, b), g; 725 } 726 } 727 728 function e(a, b, c) { 729 if (a) { 730 var e = (0, _typeof2["default"])(a); 731 if (b || (this.timer && this.timer.destroy(), this.queue = [], this.active = !1), "number" == e && b) return this.timer = new S({ 732 duration: a, 733 context: this, 734 complete: h 735 }), void (this.active = !0); 736 737 if ("string" == e && b) { 738 switch (a) { 739 case "hide": 740 o.call(this); 741 break; 742 743 case "stop": 744 l.call(this); 745 break; 746 747 case "redraw": 748 p.call(this); 749 break; 750 751 default: 752 d.call(this, a, c && c[1]); 753 } 754 755 return h.call(this); 756 } 757 758 if ("function" == e) return void a.call(this, this); 759 760 if ("object" == e) { 761 var f = 0; 762 u.call(this, a, function (a, b) { 763 a.span > f && (f = a.span), a.stop(), a.animate(b); 764 }, function (a) { 765 "wait" in a && (f = i(a.wait, 0)); 766 }), t.call(this), f > 0 && (this.timer = new S({ 767 duration: f, 768 context: this 769 }), this.active = !0, b && (this.timer.complete = h)); 770 var g = this, 771 j = !1, 772 k = {}; 773 J(function () { 774 u.call(g, a, function (a) { 775 a.active && (j = !0, k[a.name] = a.nextStyle); 776 }), j && g.$el.css(k); 777 }); 778 } 779 } 780 } 781 782 function f(a) { 783 a = i(a, 0), this.active ? this.queue.push({ 784 options: a 785 }) : (this.timer = new S({ 786 duration: a, 787 context: this, 788 complete: h 789 }), this.active = !0); 790 } 791
792 function g(a) { 793 return this.active ? (this.queue.push({ 794 options: a, 795 args: arguments 796 }), void (this.timer.complete = h)) : j("No active transition timer. Use start() or wait() before then()."); 797 } 798 799 function h() { 800 if (this.timer && this.timer.destroy(), this.active = !1, this.queue.length) { 801 var a = this.queue.shift(); 802 e.call(this, a.options, !0, a.args); 803 } 804 } 805 806 function l(a) { 807 this.timer && this.timer.destroy(), this.queue = [], this.active = !1; 808 var b; 809 "string" == typeof a ? (b = {}, b[a] = 1) : b = "object" == (0, _typeof2["default"])(a) && null != a ? a : this.props, u.call(this, b, v), t.call(this); 810 } 811 812 function m(a) { 813 l.call(this, a), u.call(this, a, w, x); 814 } 815 816 function n(a) { 817 "string" != typeof a && (a = "block"), this.el.style.display = a; 818 } 819 820 function o() { 821 l.call(this), this.el.style.display = "none"; 822 } 823 824 function p() { 825 this.el.offsetHeight; 826 } 827 828 function r() { 829 l.call(this), a.removeData(this.el, q), this.$el = this.el = null; 830 } 831 832 function t() { 833 var a, 834 b, 835 c = []; 836 this.upstream && c.push(this.upstream); 837 838 for (a in this.props) { 839 b = this.props[a], b.active && c.push(b.string); 840 } 841 842 c = c.join(","), this.style !== c && (this.style = c, this.el.style[G.transition.dom] = c); 843 } 844 845 function u(a, b, e) { 846 var f, 847 g, 848 h, 849 i, 850 j = b !== v, 851 k = {}; 852 853 for (f in a) { 854 h = a[f], f in Z ? (k.transform || (k.transform = {}), k.transform[f] = h) : (s.test(f) && (f = c(f)), f in Y ? k[f] = h : (i || (i = {}), i[f] = h)); 855 } 856 857 for (f in k) { 858 if (h = k[f], g = this.props[f], !g) { 859 if (!j) continue; 860 g = d.call(this, f); 861 } 862 863 b.call(this, g, h); 864 } 865 866 e && i && e.call(this, i); 867 } 868 869 function v(a) { 870 a.stop(); 871 } 872 873 function w(a, b) { 874 a.set(b); 875 } 876 877 function x(a) { 878 this.$el.css(a); 879 } 880 881 function y(a, c) { 882 b[a] = function () { 883 return this.children ? A.call(this, c, arguments) : (this.el && c.apply(this, arguments), this); 884 }; 885 } 886 887 function A(a, b) { 888 var c, 889 d = this.children.length; 890 891 for (c = 0; d > c; c++) { 892 a.apply(this.children[c], b); 893 } 894 895 return this; 896 } 897 898 b.init = function (b) { 899 if (this.$el = a(b), this.el = this.$el[0], this.props = {}, this.queue = [], this.style = "", this.active = !1, U.keepInherited && !U.fallback) { 900 var c = W(this.el, "transition"); 901 c && !z.test(c) && (this.upstream = c); 902 } 903 904 G.backface && U.hideBackface && V(this.el, G.backface.css, "hidden"); 905 }, y("add", d), y("start", e), y("wait", f), y("then", g), y("next", h), y("stop", l), y("set", m), y("show", n), y("hide", o), y("redraw", p), y("destroy", r); 906 }), 907 M = l(L, function (b) { 908 function c(b, c) { 909 var d = a.data(b, q) || a.data(b, q, new L.Bare()); 910 return d.el || d.init(b), c ? d.start(c) : d; 911 } 912 913 b.init = function (b, d) { 914 var e = a(b); 915 if (!e.length) return this; 916 if (1 === e.length) return c(e[0], d); 917 var f = []; 918 return e.each(function (a, b) { 919 f.push(c(b, d)); 920 }), this.children = f, this; 921 }; 922 }), 923 N = l(function (a) { 924 function b() { 925 var a = this.get(); 926 this.update("auto"); 927 var b = this.get(); 928 return this.update(a), b; 929 } 930 931 function c(a, b, c) { 932 return void 0 !== b && (c = b), a in m ? a : c; 933 } 934 935 function d(a) { 936 var b = /rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(a); 937 return (b ? e(b[1], b[2], b[3]) : a).replace(/#(\w)(\w)(\w)$/, "#$1$1$2$2$3$3"); 938 } 939 940 var f = { 941 duration: 500, 942 ease: "ease", 943 delay: 0 944 }; 945 a.init = function (a, b, d, e) { 946 this.$el = a, this.el = a[0]; 947 var g = b[0]; 948 d[2] && (g = d[2]), X[g] && (g = X[g]), this.name = g, this.type = d[1], this.duration = i(b[1], this.duration, f.duration), this.ease = c(b[2], this.ease, f.ease), this.delay = i(b[3], this.delay, f.delay), this.span = this.duration + this.delay, this.active = !1, this.nextStyle = null, this.auto = A.test(this.name), this.unit = e.unit || this.unit || U.defaultUnit, this.angle = e.angle || this.angle || U.defaultAngle, U.fallback || e.fallback ? this.animate = this.fallback : (this.animate = this.transition, this.string = this.name + B + this.duration + "ms" + ("ease" != this.ease ? B + m[this.ease][0] : "") + (this.delay ? B + this.delay + "ms" : "")); 949 }, a.set = function (a) { 950 a = this.convert(a, this.type), this.update(a), this.redraw(); 951 }, a.transition = function (a) { 952 this.active = !0, a = this.convert(a, this.type), this.auto && ("auto" == this.el.style[this.name] && (this.update(this.get()), this.redraw()), "auto" == a && (a = b.call(this))), this.nextStyle = a; 953 }, a.fallback = function (a) { 954 var c = this.el.style[this.name] || this.convert(this.get(), this.type); 955 a = this.convert(a, this.type), this.auto && ("auto" == c && (c = this.convert(this.get(), this.type)), "auto" == a && (a = b.call(this))), this.tween = new R({ 956 from: c, 957 to: a, 958 duration: this.duration, 959 delay: this.delay, 960 ease: this.ease, 961 update: this.update, 962 context: this 963 }); 964 }, a.get = function () { 965 return W(this.el, this.name); 966 }, a.update = function (a) { 967 V(this.el, this.name, a); 968 }, a.stop = function () { 969 (this.active || this.nextStyle) && (this.active = !1, this.nextStyle = null, V(this.el, this.name, this.get())); 970 var a = this.tween; 971 a && a.context && a.destroy(); 972 }, a.convert = function (a, b) { 973 if ("auto" == a && this.auto) return a; 974 var c, 975 e = "number" == typeof a, 976 f = "string" == typeof a; 977 978 switch (b) { 979 case t: 980 if (e) return a; 981 if (f && "" === a.replace(r, "")) return +a; 982 c = "number(unitless)"; 983 break; 984 985 case u: 986 if (f) { 987 if ("" === a && this.original) return this.original; 988 if (b.test(a)) return "#" == a.charAt(0) && 7 == a.length ? a : d(a); 989 } 990 991 c = "hex or rgb string"; 992 break; 993 994 case v: 995 if (e) return a + this.unit; 996 if (f && b.test(a)) return a; 997 c = "number(px) or string(unit)"; 998 break; 999 1000 case w: 1001 if (e) return a + this.unit; 1002 if (f && b.test(a)) return a; 1003 c = "number(px) or string(unit or %)"; 1004 break; 1005 1006 case x: 1007 if (e) return a + this.angle; 1008 if (f && b.test(a)) return a; 1009 c = "number(deg) or string(angle)"; 1010 break; 1011 1012 case y: 1013 if (e) return a; 1014 if (f && w.test(a)) return a; 1015 c = "number(unitless) or string(unit or %)"; 1016 } 1017 1018 return g(c, a), a; 1019 }, a.redraw = function () { 1020 this.el.offsetHeight; 1021 }; 1022 }), 1023 O = l(N, function (a, b) { 1024 a.init = function () {
1025 b.init.apply(this, arguments), this.original || (this.original = this.convert(this.get(), u)); 1026 }; 1027 }), 1028 P = l(N, function (a, b) { 1029 a.init = function () { 1030 b.init.apply(this, arguments), this.animate = this.fallback; 1031 }, a.get = function () { 1032 return this.$el[this.name](); 1033 }, a.update = function (a) { 1034 this.$el[this.name](a); 1035 }; 1036 }), 1037 Q = l(N, function (a, b) { 1038 function c(a, b) { 1039 var c, d, e, f, g; 1040 1041 for (c in a) { 1042 f = Z[c], e = f[0], d = f[1] || c, g = this.convert(a[c], e), b.call(this, d, g, e); 1043 } 1044 } 1045 1046 a.init = function () { 1047 b.init.apply(this, arguments), this.current || (this.current = {}, Z.perspective && U.perspective && (this.current.perspective = U.perspective, V(this.el, this.name, this.style(this.current)), this.redraw())); 1048 }, a.set = function (a) { 1049 c.call(this, a, function (a, b) { 1050 this.current[a] = b; 1051 }), V(this.el, this.name, this.style(this.current)), this.redraw(); 1052 }, a.transition = function (a) { 1053 var b = this.values(a); 1054 this.tween = new T({ 1055 current: this.current, 1056 values: b, 1057 duration: this.duration, 1058 delay: this.delay, 1059 ease: this.ease 1060 }); 1061 var c, 1062 d = {}; 1063 1064 for (c in this.current) { 1065 d[c] = c in b ? b[c] : this.current[c]; 1066 } 1067 1068 this.active = !0, this.nextStyle = this.style(d); 1069 }, a.fallback = function (a) { 1070 var b = this.values(a); 1071 this.tween = new T({ 1072 current: this.current, 1073 values: b, 1074 duration: this.duration, 1075 delay: this.delay, 1076 ease: this.ease, 1077 update: this.update, 1078 context: this 1079 }); 1080 }, a.update = function () { 1081 V(this.el, this.name, this.style(this.current)); 1082 }, a.style = function (a) { 1083 var b, 1084 c = ""; 1085 1086 for (b in a) { 1087 c += b + "(" + a[b] + ") "; 1088 } 1089 1090 return c; 1091 }, a.values = function (a) { 1092 var b, 1093 d = {}; 1094 return c.call(this, a, function (a, c, e) { 1095 d[a] = c, void 0 === this.current[a] && (b = 0, ~a.indexOf("scale") && (b = 1), this.current[a] = this.convert(b, e)); 1096 }), d; 1097 }; 1098 }), 1099 R = l(function (b) { 1100 function c(a) { 1101 1 === n.push(a) && J(g); 1102 } 1103 1104 function g() { 1105 var a, 1106 b, 1107 c, 1108 d = n.length; 1109 if (d) for (J(g), b = K(), a = d; a--;) { 1110 c = n[a], c && c.render(b); 1111 } 1112 } 1113 1114 function i(b) { 1115 var c, 1116 d = a.inArray(b, n); 1117 d >= 0 && (c = n.slice(d + 1), n.length = d, c.length && (n = n.concat(c))); 1118 } 1119 1120 function j(a) { 1121 return Math.round(a * o) / o; 1122 } 1123 1124 function k(a, b, c) { 1125 return e(a[0] + c * (b[0] - a[0]), a[1] + c * (b[1] - a[1]), a[2] + c * (b[2] - a[2])); 1126 } 1127 1128 var l = { 1129 ease: m.ease[1], 1130 from: 0, 1131 to: 1 1132 }; 1133 b.init = function (a) { 1134 this.duration = a.duration || 0, this.delay = a.delay || 0; 1135 var b = a.ease || l.ease; 1136 m[b] && (b = m[b][1]), "function" != typeof b && (b = l.ease), this.ease = b, this.update = a.update || f, this.complete = a.complete || f, this.context = a.context || this, this.name = a.name; 1137 var c = a.from, 1138 d = a.to; 1139 void 0 === c && (c = l.from), void 0 === d && (d = l.to), this.unit = a.unit || "", "number" == typeof c && "number" == typeof d ? (this.begin = c, this.change = d - c) : this.format(d, c), this.value = this.begin + this.unit, this.start = K(), a.autoplay !== !1 && this.play(); 1140 }, b.play = function () { 1141 this.active || (this.start || (this.start = K()), this.active = !0, c(this)); 1142 }, b.stop = function () { 1143 this.active && (this.active = !1, i(this)); 1144 }, b.render = function (a) { 1145 var b, 1146 c = a - this.start; 1147 1148 if (this.delay) { 1149 if (c <= this.delay) return; 1150 c -= this.delay; 1151 } 1152 1153 if (c < this.duration) { 1154 var d = this.ease(c, 0, 1, this.duration); 1155 return b = this.startRGB ? k(this.startRGB, this.endRGB, d) : j(this.begin + d * this.change), this.value = b + this.unit, void this.update.call(this.context, this.value); 1156 } 1157 1158 b = this.endHex || this.begin + this.change, this.value = b + this.unit, this.update.call(this.context, this.value), this.complete.call(this.context), this.destroy(); 1159 }, b.format = function (a, b) { 1160 if (b += "", a += "", "#" == a.charAt(0)) return this.startRGB = d(b), this.endRGB = d(a), this.endHex = a, this.begin = 0, void (this.change = 1); 1161 1162 if (!this.unit) { 1163 var c = b.replace(r, ""), 1164 e = a.replace(r, ""); 1165 c !== e && h("tween", b, a), this.unit = c; 1166 } 1167 1168 b = parseFloat(b), a = parseFloat(a), this.begin = this.value = b, this.change = a - b; 1169 }, b.destroy = function () { 1170 this.stop(), this.context = null, this.ease = this.update = this.complete = f; 1171 }; 1172 var n = [], 1173 o = 1e3; 1174 }),
1175 S = l(R, function (a) { 1176 a.init = function (a) { 1177 this.duration = a.duration || 0, this.complete = a.complete || f, this.context = a.context, this.play(); 1178 }, a.render = function (a) { 1179 var b = a - this.start; 1180 b < this.duration || (this.complete.call(this.context), this.destroy()); 1181 }; 1182 }), 1183 T = l(R, function (a, b) { 1184 a.init = function (a) { 1185 this.context = a.context, this.update = a.update, this.tweens = [], this.current = a.current; 1186 var b, c; 1187 1188 for (b in a.values) { 1189 c = a.values[b], this.current[b] !== c && this.tweens.push(new R({ 1190 name: b, 1191 from: this.current[b], 1192 to: c, 1193 duration: a.duration, 1194 delay: a.delay, 1195 ease: a.ease, 1196 autoplay: !1 1197 })); 1198 } 1199 1200 this.play(); 1201 }, a.render = function (a) { 1202 var b, 1203 c, 1204 d = this.tweens.length, 1205 e = !1; 1206 1207 for (b = d; b--;) { 1208 c = this.tweens[b], c.context && (c.render(a), this.current[c.name] = c.value, e = !0); 1209 } 1210 1211 return e ? void (this.update && this.update.call(this.context)) : this.destroy(); 1212 }, a.destroy = function () { 1213 if (b.destroy.call(this), this.tweens) { 1214 var a, 1215 c = this.tweens.length; 1216 1217 for (a = c; a--;) { 1218 this.tweens[a].destroy(); 1219 } 1220 1221 this.tweens = null, this.current = null; 1222 } 1223 }; 1224 }), 1225 U = b.config = { 1226 debug: !1, 1227 defaultUnit: "px", 1228 defaultAngle: "deg", 1229 keepInherited: !1, 1230 hideBackface: !1, 1231 perspective: "", 1232 fallback: !G.transition, 1233 agentTests: [] 1234 }; 1235 1236 b.fallback = function (a) { 1237 if (!G.transition) return U.fallback = !0; 1238 U.agentTests.push("(" + a + ")"); 1239 var b = new RegExp(U.agentTests.join("|"), "i"); 1240 U.fallback = b.test(navigator.userAgent); 1241 }, b.fallback("6.0.[2-5] Safari"), b.tween = function (a) { 1242 return new R(a); 1243 }, b.delay = function (a, b, c) { 1244 return new S({ 1245 complete: b, 1246 duration: a, 1247 context: c 1248 }); 1249 }, a.fn.tram = function (a) { 1250 return b.call(null, this, a); 1251 }; 1252 var V = a.style, 1253 W = a.css, 1254 X = { 1255 transform: G.transform && G.transform.css 1256 }, 1257 Y = { 1258 color: [O, u], 1259 background: [O, u, "background-color"], 1260 "outline-color": [O, u], 1261 "border-color": [O, u], 1262 "border-top-color": [O, u], 1263 "border-right-color": [O, u], 1264 "border-bottom-color": [O, u], 1265 "border-left-color": [O, u], 1266 "border-width": [N, v], 1267 "border-top-width": [N, v], 1268 "border-right-width": [N, v], 1269 "border-bottom-width": [N, v], 1270 "border-left-width": [N, v], 1271 "border-spacing": [N, v], 1272 "letter-spacing": [N, v], 1273 margin: [N, v], 1274 "margin-top": [N, v], 1275 "margin-right": [N, v], 1276 "margin-bottom": [N, v], 1277 "margin-left": [N, v], 1278 padding: [N, v], 1279 "padding-top": [N, v], 1280 "padding-right": [N, v], 1281 "padding-bottom": [N, v], 1282 "padding-left": [N, v], 1283 "outline-width": [N, v], 1284 opacity: [N, t], 1285 top: [N, w], 1286 right: [N, w], 1287 bottom: [N, w], 1288 left: [N, w], 1289 "font-size": [N, w], 1290 "text-indent": [N, w], 1291 "word-spacing": [N, w], 1292 width: [N, w], 1293 "min-width": [N, w], 1294 "max-width": [N, w], 1295 height: [N, w], 1296 "min-height": [N, w], 1297 "max-height": [N, w], 1298 "line-height": [N, y], 1299 "scroll-top": [P, t, "scrollTop"], 1300 "scroll-left": [P, t, "scrollLeft"] 1301 }, 1302 Z = {}; 1303 G.transform && (Y.transform = [Q], Z = { 1304 x: [w, "translateX"], 1305 y: [w, "translateY"], 1306 rotate: [x], 1307 rotateX: [x], 1308 rotateY: [x], 1309 scale: [t], 1310 scaleX: [t], 1311 scaleY: [t], 1312 skew: [x], 1313 skewX: [x], 1314 skewY: [x] 1315 }), G.transform && G.backface && (Z.z = [w, "translateZ"], Z.rotateZ = [x], Z.scaleZ = [t], Z.perspective = [v]); 1316 var $ = /ms/, 1317 _ = /s|\./; 1318 return a.tram = b; 1319}(window.jQuery); 1320 1321/***/ }), 1322/* 2 */ 1323/***/ (function(module, exports) { 1324 1325function _interopRequireDefault(obj) { 1326 return obj && obj.__esModule ? obj : { 1327 "default": obj 1328 }; 1329} 1330 1331module.exports = _interopRequireDefault; 1332 1333/***/ }), 1334/* 3 */ 1335/***/ (function(module, exports, __webpack_require__) { 1336 1337"use strict";
1338// @wf-will-never-add-flow-to-this-file 1339 1340/* globals window, document */ 1341 1342/* eslint-disable no-var */ 1343// eslint-disable-next-line strict 1344 1345 1346var IXEvents = __webpack_require__(18); 1347 1348function dispatchCustomEvent(element, eventName) { 1349 var event = document.createEvent('CustomEvent'); 1350 event.initCustomEvent(eventName, true, true, null); 1351 element.dispatchEvent(event); 1352} 1353/** 1354 * Webflow: IX Event triggers for other modules 1355 */ 1356 1357 1358var $ = window.jQuery; 1359var api = {}; 1360var namespace = '.w-ix'; 1361var eventTriggers = { 1362 reset: function reset(i, el) { 1363 IXEvents.triggers.reset(i, el); 1364 }, 1365 intro: function intro(i, el) { 1366 IXEvents.triggers.intro(i, el); 1367 dispatchCustomEvent(el, 'COMPONENT_ACTIVE'); 1368 }, 1369 outro: function outro(i, el) { 1370 IXEvents.triggers.outro(i, el); 1371 dispatchCustomEvent(el, 'COMPONENT_INACTIVE'); 1372 } 1373}; 1374api.triggers = {}; 1375api.types = { 1376 INTRO: 'w-ix-intro' + namespace, 1377 OUTRO: 'w-ix-outro' + namespace 1378}; 1379$.extend(api.triggers, eventTriggers); 1380module.exports = api; 1381 1382/***/ }), 1383/* 4 */ 1384/***/ (function(module, exports, __webpack_require__) { 1385 1386__webpack_require__(5); 1387__webpack_require__(8); 1388__webpack_require__(9); 1389__webpack_require__(10); 1390__webpack_require__(11); 1391__webpack_require__(12); 1392__webpack_require__(17); 1393module.exports = __webpack_require__(19); 1394 1395 1396/***/ }), 1397/* 5 */ 1398/***/ (function(module, exports, __webpack_require__) { 1399 1400"use strict"; 1401 // @wf-will-never-add-flow-to-this-file 1402 1403/* globals document, window, navigator */ 1404 1405/* eslint-disable no-var */ 1406 1407/** 1408 * Webflow: Brand pages on the subdomain 1409 */ 1410 1411var Webflow = __webpack_require__(0); 1412 1413Webflow.define('brand', module.exports = function ($) { 1414 var api = {}; 1415 var doc = document; 1416 var $html = $('html'); 1417 var $body = $('body'); 1418 var namespace = '.w-webflow-badge'; 1419 var location = window.location; 1420 var isPhantom = /PhantomJS/i.test(navigator.userAgent); 1421 var fullScreenEvents = 'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange'; 1422 var brandElement; // ----------------------------------- 1423 // Module methods 1424 1425 api.ready = function () { 1426 var shouldBrand = $html.attr('data-wf-status'); 1427 var publishedDomain = $html.attr('data-wf-domain') || ''; 1428 1429 if (/\.webflow\.io$/i.test(publishedDomain) && location.hostname !== publishedDomain) { 1430 shouldBrand = true; 1431 } 1432 1433 if (shouldBrand && !isPhantom) { 1434 brandElement = brandElement || createBadge(); 1435 ensureBrand(); 1436 setTimeout(ensureBrand, 500); 1437 $(doc).off(fullScreenEvents, onFullScreenChange).on(fullScreenEvents, onFullScreenChange); 1438 } 1439 }; 1440 1441 function onFullScreenChange() { 1442 var fullScreen = doc.fullScreen || doc.mozFullScreen || doc.webkitIsFullScreen || doc.msFullscreenElement || Boolean(doc.webkitFullscreenElement); 1443 $(brandElement).attr('style', fullScreen ? 'display: none !important;' : ''); 1444 } 1445 1446 function createBadge() { 1447 var $brand = $('<a class="w-webflow-badge"></a>').attr('href', 'https://webflow.com?utm_campaign=brandjs'); 1448 var $logoArt = $('<img>').attr('src', 'https://d3e54v103j8qbb.cloudfront.net/img/webflow-badge-icon.f67cd735e3.svg').attr('alt', '').css({ 1449 marginRight: '8px', 1450 width: '16px' 1451 }); 1452 var $logoText = $('<img>').attr('src', 'https://d1otoma47x30pg.cloudfront.net/img/webflow-badge-text.6faa6a38cd.svg').attr('alt', 'Made in Webflow'); 1453 $brand.append($logoArt, $logoText); 1454 return $brand[0]; 1455 } 1456 1457 function ensureBrand() { 1458 var found = $body.children(namespace); 1459 var match = found.length && found.get(0) === brandElement; 1460 var inEditor = Webflow.env('editor'); 1461 1462 if (match) { 1463 // Remove brand when Editor is active 1464 if (inEditor) { 1465 found.remove(); 1466 } // Exit early, brand is in place 1467 1468 1469 return; 1470 } // Remove any invalid brand elements 1471 1472 1473 if (found.length) { 1474 found.remove(); 1475 } // Append the brand (unless Editor is active) 1476 1477 1478 if (!inEditor) { 1479 $body.append(brandElement); 1480 } 1481 } // Export module 1482 1483 1484 return api; 1485}); 1486 1487/***/ }), 1488/* 6 */ 1489/***/ (function(module, exports, __webpack_require__) { 1490 1491"use strict"; 1492 // @wf-will-never-add-flow-to-this-file 1493// Include tram for frame-throttling 1494 1495/* globals window */ 1496 1497/* eslint-disable no-var */ 1498 1499var $ = window.$; 1500var tram = __webpack_require__(1) && $.tram; 1501/*! 1502 * Webflow._ (aka) Underscore.js 1.6.0 (custom build) 1503 * _.each 1504 * _.map 1505 * _.find 1506 * _.filter 1507 * _.any 1508 * _.contains 1509 * _.delay 1510 * _.defer 1511 * _.throttle (webflow) 1512 * _.debounce 1513 * _.keys 1514 * _.has 1515 * _.now 1516 * 1517 * http://underscorejs.org
1518 * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 1519 * Underscore may be freely distributed under the MIT license. 1520 * @license MIT 1521 */ 1522 1523module.exports = function () { 1524 var _ = {}; // Current version. 1525 1526 _.VERSION = '1.6.0-Webflow'; // Establish the object that gets returned to break out of a loop iteration. 1527 1528 var breaker = {}; // Save bytes in the minified (but not gzipped) version: 1529 1530 /* eslint-disable one-var */ 1531 1532 var ArrayProto = Array.prototype, 1533 ObjProto = Object.prototype, 1534 FuncProto = Function.prototype; 1535 /* eslint-enable one-var */ 1536 // Create quick reference variables for speed access to core prototypes. 1537 1538 /* eslint-disable one-var, no-unused-vars */ 1539 1540 var push = ArrayProto.push, 1541 slice = ArrayProto.slice, 1542 concat = ArrayProto.concat, 1543 toString = ObjProto.toString, 1544 hasOwnProperty = ObjProto.hasOwnProperty; 1545 /* eslint-enable one-var, no-unused-vars */ 1546 // All **ECMAScript 5** native function implementations that we hope to use 1547 // are declared here. 1548 1549 /* eslint-disable one-var, no-unused-vars */ 1550 1551 var nativeForEach = ArrayProto.forEach, 1552 nativeMap = ArrayProto.map, 1553 nativeReduce = ArrayProto.reduce, 1554 nativeReduceRight = ArrayProto.reduceRight, 1555 nativeFilter = ArrayProto.filter, 1556 nativeEvery = ArrayProto.every, 1557 nativeSome = ArrayProto.some, 1558 nativeIndexOf = ArrayProto.indexOf, 1559 nativeLastIndexOf = ArrayProto.lastIndexOf, 1560 nativeIsArray = Array.isArray, 1561 nativeKeys = Object.keys, 1562 nativeBind = FuncProto.bind; 1563 /* eslint-enable one-var, no-unused-vars */ 1564 // Collection Functions 1565 // -------------------- 1566 // The cornerstone, an `each` implementation, aka `forEach`. 1567 // Handles objects with the built-in `forEach`, arrays, and raw objects. 1568 // Delegates to **ECMAScript 5**'s native `forEach` if available. 1569 1570 var each = _.each = _.forEach = function (obj, iterator, context) { 1571 /* jshint shadow:true */ 1572 if (obj == null) return obj; 1573 1574 if (nativeForEach && obj.forEach === nativeForEach) { 1575 obj.forEach(iterator, context); // eslint-disable-next-line no-implicit-coercion 1576 } else if (obj.length === +obj.length) { 1577 for (var i = 0, length = obj.length; i < length; i++) { 1578 if (iterator.call(context, obj[i], i, obj) === breaker) return; 1579 } 1580 } else { 1581 var keys = _.keys(obj); // eslint-disable-next-line no-redeclare 1582 1583 1584 for (var i = 0, length = keys.length; i < length; i++) { 1585 if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; 1586 } 1587 } 1588 1589 return obj; 1590 }; // Return the results of applying the iterator to each element. 1591 // Delegates to **ECMAScript 5**'s native `map` if available. 1592 1593 1594 _.map = _.collect = function (obj, iterator, context) { 1595 var results = []; 1596 if (obj == null) return results; 1597 if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); 1598 each(obj, function (value, index, list) { 1599 results.push(iterator.call(context, value, index, list)); 1600 }); 1601 return results; 1602 }; // Return the first value which passes a truth test. Aliased as `detect`. 1603 1604 1605 _.find = _.detect = function (obj, predicate, context) { 1606 var result; 1607 any(obj, function (value, index, list) { 1608 if (predicate.call(context, value, index, list)) { 1609 result = value; 1610 return true; 1611 } 1612 }); 1613 return result; 1614 }; // Return all the elements that pass a truth test. 1615 // Delegates to **ECMAScript 5**'s native `filter` if available. 1616 // Aliased as `select`. 1617 1618 1619 _.filter = _.select = function (obj, predicate, context) { 1620 var results = []; 1621 if (obj == null) return results; 1622 if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context); 1623 each(obj, function (value, index, list) { 1624 if (predicate.call(context, value, index, list)) results.push(value); 1625 }); 1626 return results; 1627 }; // Determine if at least one element in the object matches a truth test. 1628 // Delegates to **ECMAScript 5**'s native `some` if available. 1629 // Aliased as `any`. 1630 1631 1632 var any = _.some = _.any = function (obj, predicate, context) { 1633 predicate || (predicate = _.identity); 1634 var result = false;
1635 if (obj == null) return result; 1636 if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context); 1637 each(obj, function (value, index, list) { 1638 if (result || (result = predicate.call(context, value, index, list))) return breaker; 1639 }); 1640 return !!result; // eslint-disable-line no-implicit-coercion 1641 }; // Determine if the array or object contains a given value (using `===`). 1642 // Aliased as `include`. 1643 1644 1645 _.contains = _.include = function (obj, target) { 1646 if (obj == null) return false; 1647 if (nativeIndexOf && obj.indexOf === nativeIndexOf) // eslint-disable-next-line eqeqeq 1648 return obj.indexOf(target) != -1; 1649 return any(obj, function (value) { 1650 return value === target; 1651 }); 1652 }; // Function (ahem) Functions 1653 // -------------------- 1654 // Delays a function for the given number of milliseconds, and then calls 1655 // it with the arguments supplied. 1656 1657 1658 _.delay = function (func, wait) { 1659 var args = slice.call(arguments, 2); 1660 return setTimeout(function () { 1661 return func.apply(null, args); 1662 }, wait); 1663 }; // Defers a function, scheduling it to run after the current call stack has 1664 // cleared. 1665 1666 1667 _.defer = function (func) { 1668 return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); 1669 }; // Returns a function, that, when invoked, will only be triggered once every 1670 // browser animation frame - using tram's requestAnimationFrame polyfill. 1671 1672 1673 _.throttle = function (func) { 1674 // eslint-disable-next-line one-var 1675 var wait, args, context; 1676 return function () { 1677 if (wait) return; 1678 wait = true; 1679 args = arguments; 1680 context = this; 1681 tram.frame(function () { 1682 wait = false; 1683 func.apply(context, args); 1684 }); 1685 }; 1686 }; // Returns a function, that, as long as it continues to be invoked, will not 1687 // be triggered. The function will be called after it stops being called for 1688 // N milliseconds. If `immediate` is passed, trigger the function on the 1689 // leading edge, instead of the trailing. 1690 1691 1692 _.debounce = function (func, wait, immediate) { 1693 // eslint-disable-next-line one-var 1694 var timeout, args, context, timestamp, result; 1695 1696 var later = function later() { 1697 var last = _.now() - timestamp; 1698 1699 if (last < wait) { 1700 timeout = setTimeout(later, wait - last); 1701 } else { 1702 timeout = null; 1703 1704 if (!immediate) { 1705 result = func.apply(context, args); 1706 context = args = null; 1707 } 1708 } 1709 }; 1710 1711 return function () { 1712 context = this; 1713 args = arguments; 1714 timestamp = _.now(); 1715 var callNow = immediate && !timeout; 1716 1717 if (!timeout) { 1718 timeout = setTimeout(later, wait); 1719 } 1720 1721 if (callNow) { 1722 result = func.apply(context, args); 1723 context = args = null; 1724 } 1725 1726 return result; 1727 }; 1728 }; // Object Functions 1729 // ---------------- 1730 // Fill in a given object with default properties. 1731 1732 1733 _.defaults = function (obj) { 1734 if (!_.isObject(obj)) return obj; 1735 1736 for (var i = 1, length = arguments.length; i < length; i++) { 1737 var source = arguments[i]; 1738 1739 for (var prop in source) { 1740 // eslint-disable-next-line no-void 1741 if (obj[prop] === void 0) obj[prop] = source[prop]; 1742 } 1743 } 1744 1745 return obj; 1746 }; // Retrieve the names of an object's properties. 1747 // Delegates to **ECMAScript 5**'s native `Object.keys` 1748 1749 1750 _.keys = function (obj) { 1751 if (!_.isObject(obj)) return []; 1752 if (nativeKeys) return nativeKeys(obj); 1753 var keys = []; 1754 1755 for (var key in obj) { 1756 if (_.has(obj, key)) keys.push(key); 1757 } 1758 1759 return keys; 1760 }; // Shortcut function for checking if an object has a given property directly 1761 // on itself (in other words, not on a prototype). 1762 1763 1764 _.has = function (obj, key) { 1765 return hasOwnProperty.call(obj, key); 1766 }; // Is a given variable an object? 1767 1768 1769 _.isObject = function (obj) { 1770 return obj === Object(obj); 1771 }; // Utility Functions 1772 // ----------------- 1773 // A (possibly faster) way to get the current timestamp as an integer. 1774 1775 1776 _.now = Date.now || function () { 1777 return new Date().getTime(); 1778 }; // By default, Underscore uses ERB-style template delimiters, change the 1779 // following template settings to use alternative delimiters. 1780 1781 1782 _.templateSettings = { 1783 evaluate: /<%([\s\S]+?)%>/g, 1784 interpolate: /<%=([\s\S]+?)%>/g, 1785 escape: /<%-([\s\S]+?)%>/g 1786 }; // When customizing `templateSettings`, if you don't want to define an 1787 // interpolation, evaluation or escaping regex, we need one that is 1788 // guaranteed not to match. 1789 1790 var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a 1791 // string literal. 1792 1793 var escapes = { 1794 "'": "'", 1795 '\\': '\\', 1796 '\r': 'r', 1797 '\n': 'n', 1798 "\u2028": 'u2028', 1799 "\u2029": 'u2029' 1800 }; 1801 var escaper = /\\|'|\r|\n|\u2028|\u2029/g; 1802 1803 var escapeChar = function escapeChar(match) { 1804 return '\\' + escapes[match]; 1805 }; // JavaScript micro-templating, similar to John Resig's implementation. 1806 // Underscore templating handles arbitrary delimiters, preserves whitespace, 1807 // and correctly escapes quotes within interpolated code. 1808 // NB: `oldSettings` only exists for backwards compatibility. 1809 1810 1811 _.template = function (text, settings, oldSettings) { 1812 if (!settings && oldSettings) settings = oldSettings; 1813 settings = _.defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation. 1814 1815 var matcher = RegExp([(settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately. 1816 1817 var index = 0; 1818 var source = "__p+='"; 1819 text.replace(matcher, function (match, escape, interpolate, evaluate, offset) { 1820 source += text.slice(index, offset).replace(escaper, escapeChar); 1821 index = offset + match.length; 1822 1823 if (escape) { 1824 source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; 1825 } else if (interpolate) { 1826 source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
1827 } else if (evaluate) { 1828 source += "';\n" + evaluate + "\n__p+='"; 1829 } // Adobe VMs need the match returned to produce the correct offest. 1830 1831 1832 return match; 1833 }); 1834 source += "';\n"; // If a variable is not specified, place data values in local scope. 1835 1836 if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; 1837 source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n'; 1838 1839 try { 1840 // eslint-disable-next-line no-new-func 1841 var render = new Function(settings.variable || 'obj', '_', source); 1842 } catch (e) { 1843 e.source = source; 1844 throw e; 1845 } 1846 1847 var template = function template(data) { 1848 return render.call(this, data, _); 1849 }; // Provide the compiled source as a convenience for precompilation. 1850 1851 1852 var argument = settings.variable || 'obj'; 1853 template.source = 'function(' + argument + '){\n' + source + '}'; 1854 return template; 1855 }; // Export underscore 1856 1857 1858 return _; 1859}(); 1860/* eslint-enable */ 1861 1862/***/ }), 1863/* 7 */ 1864/***/ (function(module, exports) { 1865 1866function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } 1867 1868function _typeof(obj) { 1869 if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { 1870 module.exports = _typeof = function _typeof(obj) { 1871 return _typeof2(obj); 1872 }; 1873 } else { 1874 module.exports = _typeof = function _typeof(obj) { 1875 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); 1876 }; 1877 } 1878 1879 return _typeof(obj); 1880} 1881 1882module.exports = _typeof; 1883 1884/***/ }), 1885/* 8 */ 1886/***/ (function(module, exports, __webpack_require__) { 1887 1888"use strict"; 1889 // @wf-will-never-add-flow-to-this-file 1890 1891/* globals document, window, localStorage, WEBFLOW_API_HOST, WEBFLOW_DEFAULT_HOST */ 1892 1893/* eslint-disable no-var */ 1894 1895/** 1896 * Webflow: Editor loader 1897 */ 1898 1899var Webflow = __webpack_require__(0); 1900 1901Webflow.define('edit', module.exports = function ($, _, options) { 1902 options = options || {}; // Exit early in test env or when inside an iframe 1903 1904 if (Webflow.env('test') || Webflow.env('frame')) { 1905 // Allow test fixtures to continue 1906 if (!options.fixture && !inCypress()) { 1907 return { 1908 exit: 1 1909 }; 1910 } 1911 } 1912 1913 var api = {}; 1914 var $win = $(window); 1915 var $html = $(document.documentElement); 1916 var location = document.location; 1917 var hashchange = 'hashchange'; 1918 var loaded; 1919 var loadEditor = options.load || load; 1920 var hasLocalStorage = false; 1921 1922 try { 1923 // Check localStorage for editor data 1924 hasLocalStorage = localStorage && localStorage.getItem && localStorage.getItem('WebflowEditor'); 1925 } catch (e) {// SecurityError: browser storage has been disabled 1926 } 1927 1928 if (hasLocalStorage) { 1929 loadEditor(); 1930 } else if (location.search) { 1931 // Check url query for `edit` parameter or any url ending in `?edit` 1932 if (/[?&](edit)(?:[=&?]|$)/.test(location.search) || /\?edit$/.test(location.href)) { 1933 loadEditor(); 1934 } 1935 } else { 1936 // Check hash fragment to support `#hash?edit` 1937 $win.on(hashchange, checkHash).triggerHandler(hashchange); 1938 } 1939 1940 function checkHash() { 1941 if (loaded) { 1942 return; 1943 } // Load editor when hash contains `?edit` 1944 1945 1946 if (/\?edit/.test(location.hash)) { 1947 loadEditor(); 1948 } 1949 } 1950 1951 function load() { 1952 loaded = true; // Predefine global immediately to benefit Webflow.env 1953 1954 window.WebflowEditor = true; 1955 $win.off(hashchange, checkHash); 1956 checkThirdPartyCookieSupport(function (thirdPartyCookiesSupported) { 1957 $.ajax({ 1958 url: cleanSlashes("https://editor-api.webflow.com" + '/api/editor/view'), 1959 data: { 1960 siteId: $html.attr('data-wf-site') 1961 }, 1962 xhrFields: { 1963 withCredentials: true 1964 }, 1965 dataType: 'json', 1966 crossDomain: true, 1967 success: success(thirdPartyCookiesSupported) 1968 }); 1969 }); 1970 } 1971 1972 function success(thirdPartyCookiesSupported) { 1973 return function (data) { 1974 if (!data) { 1975 console.error('Could not load editor data'); 1976 return; 1977 } 1978 1979 data.thirdPartyCookiesSupported = thirdPartyCookiesSupported; 1980 getScript(prefix(data.bugReporterScriptPath), function () { 1981 getScript(prefix(data.scriptPath), function () { 1982 window.WebflowEditor(data); 1983 }); 1984 }); 1985 }; 1986 } 1987 1988 function getScript(url, done) { 1989 $.ajax({ 1990 type: 'GET', 1991 url: url,
1992 dataType: 'script', 1993 cache: true 1994 }).then(done, error); 1995 } 1996 1997 function error(jqXHR, textStatus, errorThrown) { 1998 console.error('Could not load editor script: ' + textStatus); 1999 throw errorThrown; 2000 } 2001 2002 function prefix(url) { 2003 return url.indexOf('//') >= 0 ? url : cleanSlashes("https://editor-api.webflow.com" + url); 2004 } 2005 2006 function cleanSlashes(url) { 2007 return url.replace(/([^:])\/\//g, '$1/'); 2008 } 2009 2010 function checkThirdPartyCookieSupport(callback) { 2011 var iframe = window.document.createElement('iframe'); 2012 iframe.src = "https://webflow.com" + '/site/third-party-cookie-check.html'; 2013 iframe.style.display = 'none'; 2014 iframe.sandbox = 'allow-scripts allow-same-origin'; 2015 2016 var handleMessage = function handleMessage(event) { 2017 if (event.data === 'WF_third_party_cookies_unsupported') { 2018 cleanUpCookieCheckerIframe(iframe, handleMessage); 2019 callback(false); 2020 } else if (event.data === 'WF_third_party_cookies_supported') { 2021 cleanUpCookieCheckerIframe(iframe, handleMessage); 2022 callback(true); 2023 } 2024 }; 2025 2026 iframe.onerror = function () { 2027 cleanUpCookieCheckerIframe(iframe, handleMessage); 2028 callback(false); 2029 }; 2030 2031 window.addEventListener('message', handleMessage, false); 2032 window.document.body.appendChild(iframe); 2033 } 2034 2035 function cleanUpCookieCheckerIframe(iframe, listener) { 2036 window.removeEventListener('message', listener, false); 2037 iframe.remove(); 2038 } // Export module 2039 2040 2041 return api; 2042}); 2043 2044function inCypress() { 2045 try { 2046 return window.top.__Cypress__; 2047 } catch (e) { 2048 return false; 2049 } 2050} 2051 2052/***/ }), 2053/* 9 */ 2054/***/ (function(module, exports, __webpack_require__) { 2055 2056"use strict"; 2057 // @wf-will-never-add-flow-to-this-file 2058 2059/* globals window, document */ 2060 2061/* eslint-disable no-var */ 2062 2063/** 2064 * Webflow: Auto-select links to current page or section 2065 */ 2066 2067var Webflow = __webpack_require__(0); 2068 2069Webflow.define('links', module.exports = function ($, _) { 2070 var api = {}; 2071 var $win = $(window); 2072 var designer; 2073 var inApp = Webflow.env(); 2074 var location = window.location; 2075 var tempLink = document.createElement('a'); 2076 var linkCurrent = 'w--current'; 2077 var indexPage = /index\.(html|php)$/; 2078 var dirList = /\/$/; 2079 var anchors; 2080 var slug; // ----------------------------------- 2081 // Module methods 2082 2083 api.ready = api.design = api.preview = init; // ----------------------------------- 2084 // Private methods 2085 2086 function init() { 2087 designer = inApp && Webflow.env('design'); 2088 slug = Webflow.env('slug') || location.pathname || ''; // Reset scroll listener, init anchors 2089 2090 Webflow.scroll.off(scroll); 2091 anchors = []; // Test all links for a selectable href 2092 2093 var links = document.links; 2094 2095 for (var i = 0; i < links.length; ++i) { 2096 select(links[i]); 2097 } // Listen for scroll if any anchors exist 2098 2099 2100 if (anchors.length) { 2101 Webflow.scroll.on(scroll); 2102 scroll(); 2103 } 2104 } 2105 2106 function select(link) { 2107 var href = designer && link.getAttribute('href-disabled') || link.getAttribute('href'); 2108 tempLink.href = href; // Ignore any hrefs with a colon to safely avoid all uri schemes 2109 2110 if (href.indexOf(':') >= 0) { 2111 return; 2112 } 2113 2114 var $link = $(link); // Check for all links with hash (eg (this-host)(/this-path)#section) to this page 2115 2116 if (tempLink.hash.length > 1 && tempLink.host + tempLink.pathname === location.host + location.pathname) { 2117 // Ignore any hrefs with Google Translate type hash 2118 // Example: jQuery can't parse $('#googtrans(en|es)') 2119 // https://forum.webflow.com/t/dropdown-menus-not-working-on-site/87140 2120 if (!/^#[a-zA-Z0-9\-\_]+$/.test(tempLink.hash)) { 2121 return; 2122 } 2123 2124 var $section = $(tempLink.hash); 2125 $section.length && anchors.push({ 2126 link: $link, 2127 sec: $section, 2128 active: false 2129 }); 2130 return; 2131 } // Ignore empty # links 2132 2133 2134 if (href === '#' || href === '') { 2135 return; 2136 } // Determine whether the link should be selected 2137 2138 2139 var match = tempLink.href === location.href || href === slug || indexPage.test(href) && dirList.test(slug); 2140 setClass($link, linkCurrent, match); 2141 } 2142 2143 function scroll() { 2144 var viewTop = $win.scrollTop(); 2145 var viewHeight = $win.height(); // Check each anchor for a section in view 2146 2147 _.each(anchors, function (anchor) { 2148 var $link = anchor.link; 2149 var $section = anchor.sec; 2150 var top = $section.offset().top; 2151 var height = $section.outerHeight(); 2152 var offset = viewHeight * 0.5; 2153 var active = $section.is(':visible') && top + height - offset >= viewTop && top + offset <= viewTop + viewHeight; 2154 2155 if (anchor.active === active) { 2156 return; 2157 } 2158 2159 anchor.active = active; 2160 setClass($link, linkCurrent, active); 2161 }); 2162 } 2163 2164 function setClass($elem, className, add) { 2165 var exists = $elem.hasClass(className); 2166 2167 if (add && exists) { 2168 return; 2169 } 2170 2171 if (!add && !exists) { 2172 return; 2173 } 2174 2175 add ? $elem.addClass(className) : $elem.removeClass(className); 2176 } // Export module 2177 2178 2179 return api; 2180}); 2181 2182/***/ }), 2183/* 10 */ 2184/***/ (function(module, exports, __webpack_require__) { 2185 2186"use strict"; 2187 // @wf-will-never-add-flow-to-this-file 2188 2189/* globals window, document */ 2190 2191/* eslint-disable no-var */ 2192 2193/** 2194 * Webflow: Smooth scroll 2195 */ 2196 2197var Webflow = __webpack_require__(0); 2198 2199Webflow.define('scroll', module.exports = function ($) { 2200 var $doc = $(document); 2201 var win = window; 2202 var loc = win.location; 2203 var history = inIframe() ? null : win.history;
2204 var validHash = /^[a-zA-Z0-9][\w:.-]*$/; 2205 2206 function inIframe() { 2207 try { 2208 return Boolean(win.frameElement); 2209 } catch (e) { 2210 return true; 2211 } 2212 } 2213 2214 function ready() { 2215 // The current page url without the hash part. 2216 var locHref = loc.href.split('#')[0]; // When clicking on a link, check if it links to another part of the page 2217 2218 $doc.on('click', 'a', function (e) { 2219 if (Webflow.env('design')) { 2220 return; 2221 } // Ignore links being used by jQuery mobile 2222 2223 2224 if (window.$.mobile && $(e.currentTarget).hasClass('ui-link')) { 2225 return; 2226 } // Ignore empty # links 2227 2228 2229 if (this.getAttribute('href') === '#') { 2230 e.preventDefault(); 2231 return; 2232 } // The href property always contains the full url so we can compare 2233 // with the documentâs location to only target links on this page. 2234 2235 2236 var parts = this.href.split('#'); 2237 var hash = parts[0] === locHref ? parts[1] : null; 2238 2239 if (hash) { 2240 findEl(hash, e); 2241 } 2242 }); 2243 } 2244 2245 function findEl(hash, e) { 2246 if (!validHash.test(hash)) { 2247 return; 2248 } 2249 2250 var el = $('#' + hash); 2251 2252 if (!el.length) { 2253 return; 2254 } 2255 2256 if (e) { 2257 e.preventDefault(); 2258 e.stopPropagation(); 2259 } // Push new history state 2260 2261 2262 if (loc.hash !== hash && history && history.pushState && // Navigation breaks Chrome when the protocol is `file:`. 2263 !(Webflow.env.chrome && loc.protocol === 'file:')) { 2264 var oldHash = history.state && history.state.hash; 2265 2266 if (oldHash !== hash) { 2267 history.pushState({ 2268 hash: hash 2269 }, '', '#' + hash); 2270 } 2271 } // If a fixed header exists, offset for the height 2272 2273 2274 var rootTag = Webflow.env('editor') ? '.w-editor-body' : 'body'; 2275 var header = $('header, ' + rootTag + ' > .header, ' + rootTag + ' > .w-nav:not([data-no-scroll])'); 2276 var offset = header.css('position') === 'fixed' ? header.outerHeight() : 0; 2277 win.setTimeout(function () { 2278 scroll(el, offset); 2279 }, e ? 0 : 300); 2280 } 2281 2282 function scroll(el, offset) { 2283 var start = $(win).scrollTop(); 2284 var end = el.offset().top - offset; // If specified, scroll so that the element ends up in the middle of the viewport 2285 2286 if (el.data('scroll') === 'mid') { 2287 var available = $(win).height() - offset; 2288 var elHeight = el.outerHeight(); 2289 2290 if (elHeight < available) { 2291 end -= Math.round((available - elHeight) / 2); 2292 } 2293 } 2294 2295 var mult = 1; // Check for custom time multiplier on the body and the element 2296 2297 $('body').add(el).each(function () { 2298 var time = parseFloat($(this).attr('data-scroll-time'), 10); 2299 2300 if (!isNaN(time) && (time === 0 || time > 0)) { 2301 mult = time; 2302 } 2303 }); // Shim for IE8 and below 2304 2305 if (!Date.now) { 2306 Date.now = function () { 2307 return new Date().getTime(); 2308 }; 2309 } 2310 2311 var clock = Date.now(); 2312 2313 var animate = win.requestAnimationFrame || win.mozRequestAnimationFrame || win.webkitRequestAnimationFrame || function (fn) { 2314 win.setTimeout(fn, 15); 2315 }; 2316 2317 var duration = (472.143 * Math.log(Math.abs(start - end) + 125) - 2000) * mult; 2318 2319 var step = function step() { 2320 var elapsed = Date.now() - clock; 2321 win.scroll(0, getY(start, end, elapsed, duration)); 2322 2323 if (elapsed <= duration) { 2324 animate(step); 2325 } 2326 }; 2327 2328 step(); 2329 } 2330 2331 function getY(start, end, elapsed, duration) { 2332 if (elapsed > duration) { 2333 return end; 2334 } 2335 2336 return start + (end - start) * ease(elapsed / duration); 2337 } 2338 2339 function ease(t) { 2340 return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; 2341 } // Export module 2342 2343 2344 return { 2345 ready: ready 2346 }; 2347}); 2348 2349/***/ }), 2350/* 11 */ 2351/***/ (function(module, exports, __webpack_require__) { 2352 2353"use strict"; 2354 // @wf-will-never-add-flow-to-this-file 2355 2356/* globals document, window */ 2357 2358/* eslint-disable no-var */ 2359 2360/** 2361 * Webflow: Touch events 2362 * Supports legacy 'tap' event 2363 * Adds a 'swipe' event to desktop and mobile 2364 */ 2365 2366var Webflow = __webpack_require__(0); 2367 2368Webflow.define('touch', module.exports = function ($) { 2369 var api = {}; 2370 var getSelection = window.getSelection; // Delegate all legacy 'tap' events to 'click' 2371 2372 $.event.special.tap = { 2373 bindType: 'click', 2374 delegateType: 'click' 2375 }; 2376 2377 api.init = function (el) { 2378 el = typeof el === 'string' ? $(el).get(0) : el; 2379 return el ? new Touch(el) : null; 2380 }; 2381 2382 function Touch(el) { 2383 var active = false;
2384 var useTouch = false; 2385 var thresholdX = Math.min(Math.round(window.innerWidth * 0.04), 40); 2386 var startX; 2387 var lastX; 2388 el.addEventListener('touchstart', start, false); 2389 el.addEventListener('touchmove', move, false); 2390 el.addEventListener('touchend', end, false); 2391 el.addEventListener('touchcancel', cancel, false); 2392 el.addEventListener('mousedown', start, false); 2393 el.addEventListener('mousemove', move, false); 2394 el.addEventListener('mouseup', end, false); 2395 el.addEventListener('mouseout', cancel, false); 2396 2397 function start(evt) { 2398 // We donât handle multi-touch events yet. 2399 var touches = evt.touches; 2400 2401 if (touches && touches.length > 1) { 2402 return; 2403 } 2404 2405 active = true; 2406 2407 if (touches) { 2408 useTouch = true; 2409 startX = touches[0].clientX; 2410 } else { 2411 startX = evt.clientX; 2412 } 2413 2414 lastX = startX; 2415 } 2416 2417 function move(evt) { 2418 if (!active) { 2419 return; 2420 } 2421 2422 if (useTouch && evt.type === 'mousemove') { 2423 evt.preventDefault(); 2424 evt.stopPropagation(); 2425 return; 2426 } 2427 2428 var touches = evt.touches; 2429 var x = touches ? touches[0].clientX : evt.clientX; 2430 var velocityX = x - lastX; 2431 lastX = x; // Allow swipes while pointer is down, but prevent them during text selection 2432 2433 if (Math.abs(velocityX) > thresholdX && getSelection && String(getSelection()) === '') { 2434 triggerEvent('swipe', evt, { 2435 direction: velocityX > 0 ? 'right' : 'left' 2436 }); 2437 cancel(); 2438 } 2439 } 2440 2441 function end(evt) { 2442 if (!active) { 2443 return; 2444 } 2445 2446 active = false; 2447 2448 if (useTouch && evt.type === 'mouseup') { 2449 evt.preventDefault(); 2450 evt.stopPropagation(); 2451 useTouch = false; 2452 return; 2453 } 2454 } 2455 2456 function cancel() { 2457 active = false; 2458 } 2459 2460 function destroy() { 2461 el.removeEventListener('touchstart', start, false); 2462 el.removeEventListener('touchmove', move, false); 2463 el.removeEventListener('touchend', end, false); 2464 el.removeEventListener('touchcancel', cancel, false); 2465 el.removeEventListener('mousedown', start, false); 2466 el.removeEventListener('mousemove', move, false); 2467 el.removeEventListener('mouseup', end, false); 2468 el.removeEventListener('mouseout', cancel, false); 2469 el = null; 2470 } // Public instance methods 2471 2472 2473 this.destroy = destroy; 2474 } // Wrap native event to supoprt preventdefault + stopPropagation 2475 2476 2477 function triggerEvent(type, evt, data) { 2478 var newEvent = $.Event(type, { 2479 originalEvent: evt 2480 }); 2481 $(evt.target).trigger(newEvent, data); 2482 } // Listen for touch events on all nodes by default. 2483 2484 2485 api.instance = api.init(document); // Export module 2486 2487 return api; 2488}); 2489 2490/***/ }), 2491/* 12 */ 2492/***/ (function(module, exports, __webpack_require__) { 2493 2494"use strict"; 2495 // @wf-will-never-add-flow-to-this-file 2496 2497/* globals 2498 window, 2499 document, 2500 FormData, 2501 WEBFLOW_FORM_API_HOST, 2502 WEBFLOW_FORM_OLDIE_HOST 2503*/ 2504 2505/* eslint-disable no-var */ 2506 2507/** 2508 * Webflow: Forms 2509 */ 2510 2511var _interopRequireDefault = __webpack_require__(2); 2512 2513var _slicedToArray2 = _interopRequireDefault(__webpack_require__(13)); 2514 2515var Webflow = __webpack_require__(0); 2516 2517Webflow.define('forms', module.exports = function ($, _) { 2518 var api = {}; 2519 var $doc = $(document); 2520 var $forms; 2521 var loc = window.location; 2522 var retro = window.XDomainRequest && !window.atob; 2523 var namespace = '.w-form'; 2524 var siteId; 2525 var emailField = /e(-)?mail/i; 2526 var emailValue = /^\S+@\S+$/; 2527 var alert = window.alert; 2528 var inApp = Webflow.env(); 2529 var listening; 2530 var formUrl; 2531 var signFileUrl; // MailChimp domains: list-manage.com + mirrors 2532 2533 var chimpRegex = /list-manage[1-9]?.com/i; 2534 2535 var disconnected = _.debounce(function () { 2536 alert('Oops! This page has improperly configured forms. Please contact your website administrator to fix this issue.'); 2537 }, 100); 2538 2539 api.ready = api.design = api.preview = function () { 2540 // Init forms 2541 init(); // Wire document events on published site only once 2542 2543 if (!inApp && !listening) { 2544 addListeners(); 2545 } 2546 }; 2547
2548 function init() { 2549 siteId = $('html').attr('data-wf-site'); 2550 formUrl = "https://webflow.com" + '/api/v1/form/' + siteId; // Work around same-protocol IE XDR limitation - without this IE9 and below forms won't submit 2551 2552 if (retro && formUrl.indexOf("https://webflow.com") >= 0) { 2553 formUrl = formUrl.replace("https://webflow.com", "http://formdata.webflow.com"); 2554 } 2555 2556 signFileUrl = "".concat(formUrl, "/signFile"); 2557 $forms = $(namespace + ' form'); 2558 2559 if (!$forms.length) { 2560 return; 2561 } 2562 2563 $forms.each(build); 2564 } 2565 2566 function build(i, el) { 2567 // Store form state using namespace 2568 var $el = $(el); 2569 var data = $.data(el, namespace); 2570 2571 if (!data) { 2572 data = $.data(el, namespace, { 2573 form: $el 2574 }); 2575 } // data.form 2576 2577 2578 reset(data); 2579 var wrap = $el.closest('div.w-form'); 2580 data.done = wrap.find('> .w-form-done'); 2581 data.fail = wrap.find('> .w-form-fail'); 2582 data.fileUploads = wrap.find('.w-file-upload'); 2583 data.fileUploads.each(function (j) { 2584 initFileUpload(j, data); 2585 }); 2586 var action = data.action = $el.attr('action'); 2587 data.handler = null; 2588 data.redirect = $el.attr('data-redirect'); // MailChimp form 2589 2590 if (chimpRegex.test(action)) { 2591 data.handler = submitMailChimp; 2592 return; 2593 } // Custom form action 2594 2595 2596 if (action) { 2597 return; 2598 } // Webflow forms for hosting accounts 2599 2600 2601 if (siteId) { 2602 data.handler = typeof hostedSubmitWebflow === 'function' ? hostedSubmitWebflow : exportedSubmitWebflow; 2603 return; 2604 } // Alert for disconnected Webflow forms 2605 2606 2607 disconnected(); 2608 } 2609 2610 function addListeners() { 2611 listening = true; // Handle form submission for Webflow forms 2612 2613 $doc.on('submit', namespace + ' form', function (evt) { 2614 var data = $.data(this, namespace); 2615 2616 if (data.handler) { 2617 data.evt = evt; 2618 data.handler(data); 2619 } 2620 }); // handle checked ui for custom checkbox and radio button 2621 2622 var CHECKBOX_CLASS_NAME = '.w-checkbox-input'; 2623 var RADIO_INPUT_CLASS_NAME = '.w-radio-input'; 2624 var CHECKED_CLASS = 'w--redirected-checked'; 2625 var FOCUSED_CLASS = 'w--redirected-focus'; 2626 var CUSTOM_CONTROLS = [['checkbox', CHECKBOX_CLASS_NAME], ['radio', RADIO_INPUT_CLASS_NAME]]; 2627 $doc.on('change', namespace + " form input[type=\"checkbox\"]:not(" + CHECKBOX_CLASS_NAME + ')', function (evt) { 2628 $(evt.target).siblings(CHECKBOX_CLASS_NAME).toggleClass(CHECKED_CLASS); 2629 }); 2630 $doc.on('change', namespace + " form input[type=\"radio\"]", function (evt) { 2631 $("input[name=\"".concat(evt.target.name, "\"]:not(").concat(CHECKBOX_CLASS_NAME, ")")).map(function (i, el) { 2632 return $(el).siblings(RADIO_INPUT_CLASS_NAME).removeClass(CHECKED_CLASS); 2633 }); 2634 var $target = $(evt.target); 2635 2636 if (!$target.hasClass('w-radio-input')) { 2637 $target.siblings(RADIO_INPUT_CLASS_NAME).addClass(CHECKED_CLASS); 2638 } 2639 }); 2640 CUSTOM_CONTROLS.forEach(function (_ref) { 2641 var _ref2 = (0, _slicedToArray2["default"])(_ref, 2), 2642 controlType = _ref2[0], 2643 customControlClassName = _ref2[1]; 2644 2645 $doc.on('focus', namespace + " form input[type=\"".concat(controlType, "\"]:not(") + customControlClassName + ')', function (evt) { 2646 $(evt.target).siblings(customControlClassName).addClass(FOCUSED_CLASS); 2647 }); 2648 $doc.on('blur', namespace + " form input[type=\"".concat(controlType, "\"]:not(") + customControlClassName + ')', function (evt) { 2649 $(evt.target).siblings(customControlClassName).removeClass(FOCUSED_CLASS); 2650 }); 2651 }); 2652 } // Reset data common to all submit handlers 2653 2654 2655 function reset(data) { 2656 var btn = data.btn = data.form.find(':input[type="submit"]'); 2657 data.wait = data.btn.attr('data-wait') || null; 2658 data.success = false; 2659 btn.prop('disabled', false); 2660 data.label && btn.val(data.label); 2661 } // Disable submit button 2662 2663 2664 function disableBtn(data) { 2665 var btn = data.btn; 2666 var wait = data.wait; 2667 btn.prop('disabled', true); // Show wait text and store previous label 2668 2669 if (wait) { 2670 data.label = btn.val(); 2671 btn.val(wait); 2672 } 2673 } // Find form fields, validate, and set value pairs 2674 2675 2676 function findFields(form, result) { 2677 var status = null; 2678 result = result || {}; // The ":input" selector is a jQuery shortcut to select all inputs, selects, textareas 2679 2680 form.find(':input:not([type="submit"]):not([type="file"])').each(function (i, el) { 2681 var field = $(el); 2682 var type = field.attr('type'); 2683 var name = field.attr('data-name') || field.attr('name') || 'Field ' + (i + 1); 2684 var value = field.val(); 2685 2686 if (type === 'checkbox') { 2687 value = field.is(':checked'); 2688 } else if (type === 'radio') { 2689 // Radio group value already processed 2690 if (result[name] === null || typeof result[name] === 'string') { 2691 return; 2692 } 2693 2694 value = form.find('input[name="' + field.attr('name') + '"]:checked').val() || null; 2695 } 2696 2697 if (typeof value === 'string') { 2698 value = $.trim(value); 2699 } 2700 2701 result[name] = value; 2702 status = status || getStatus(field, type, name, value); 2703 }); 2704 return status; 2705 } 2706 2707 function findFileUploads(form) { 2708 var result = {}; 2709 form.find(':input[type="file"]').each(function (i, el) { 2710 var field = $(el); 2711 var name = field.attr('data-name') || field.attr('name') || 'File ' + (i + 1); 2712 var value = field.attr('data-value'); 2713 2714 if (typeof value === 'string') { 2715 value = $.trim(value); 2716 } 2717 2718 result[name] = value; 2719 }); 2720 return result; 2721 } 2722 2723 function getStatus(field, type, name, value) { 2724 var status = null; 2725 2726 if (type === 'password') { 2727 status = 'Passwords cannot be submitted.'; 2728 } else if (field.attr('required')) { 2729 if (!value) { 2730 status = 'Please fill out the required field: ' + name; 2731 } else if (emailField.test(field.attr('type'))) { 2732 if (!emailValue.test(value)) { 2733 status = 'Please enter a valid email address for: ' + name; 2734 } 2735 } 2736 } else if (name === 'g-recaptcha-response' && !value) { 2737 status = 'Please confirm youâre not a robot.'; 2738 } 2739 2740 return status; 2741 } 2742 2743 function exportedSubmitWebflow(data) { 2744 preventDefault(data); 2745 afterSubmit(data); 2746 } 2747 /* WEBFLOW_HOSTED_BLOCK:START */ 2748 // Submit form to Webflow 2749 2750 2751 function hostedSubmitWebflow(data) { 2752 reset(data); 2753 var form = data.form; 2754 var payload = { 2755 name: form.attr('data-name') || form.attr('name') || 'Untitled Form', 2756 source: loc.href, 2757 test: Webflow.env(), 2758 fields: {}, 2759 fileUploads: {}, 2760 dolphin: /pass[\s-_]?(word|code)|secret|login|credentials/i.test(form.html()) 2761 }; 2762 preventDefault(data); // Find & populate all fields 2763 2764 var status = findFields(form, payload.fields); 2765 2766 if (status) { 2767 return alert(status); 2768 } 2769 2770 payload.fileUploads = findFileUploads(form); // Disable submit button 2771 2772 disableBtn(data); // Read site ID 2773 // NOTE: If this site is exported, the HTML tag must retain the data-wf-site attribute for forms to work 2774 2775 if (!siteId) { 2776 afterSubmit(data); 2777 return; 2778 } 2779 2780 $.ajax({ 2781 url: formUrl, 2782 type: 'POST', 2783 data: payload, 2784 dataType: 'json', 2785 crossDomain: true 2786 }).done(function (response) { 2787 if (response && response.code === 200) { 2788 data.success = true; 2789 } 2790 2791 afterSubmit(data); 2792 }).fail(function () { 2793 afterSubmit(data); 2794 }); 2795 } 2796 /* WEBFLOW_HOSTED_BLOCK:END */ 2797 // Submit form to MailChimp 2798 2799 2800 function submitMailChimp(data) { 2801 reset(data); 2802 var form = data.form; 2803 var payload = {}; // Skip Ajax submission if http/s mismatch, fallback to POST instead 2804 2805 if (/^https/.test(loc.href) && !/^https/.test(data.action)) { 2806 form.attr('method', 'post'); 2807 return; 2808 } 2809 2810 preventDefault(data); // Find & populate all fields 2811 2812 var status = findFields(form, payload); 2813 2814 if (status) { 2815 return alert(status); 2816 } // Disable submit button 2817 2818 2819 disableBtn(data); // Use special format for MailChimp params 2820 2821 var fullName; 2822 2823 _.each(payload, function (value, key) { 2824 if (emailField.test(key)) { 2825 payload.EMAIL = value; 2826 } 2827 2828 if (/^((full[ _-]?)?name)$/i.test(key)) { 2829 fullName = value; 2830 } 2831 2832 if (/^(first[ _-]?name)$/i.test(key)) { 2833 payload.FNAME = value; 2834 } 2835 2836 if (/^(last[ _-]?name)$/i.test(key)) { 2837 payload.LNAME = value; 2838 } 2839 }); 2840 2841 if (fullName && !payload.FNAME) { 2842 fullName = fullName.split(' '); 2843 payload.FNAME = fullName[0]; 2844 payload.LNAME = payload.LNAME || fullName[1]; 2845 } // Use the (undocumented) MailChimp jsonp api 2846 2847 2848 var url = data.action.replace('/post?', '/post-json?') + '&c=?'; // Add special param to prevent bot signups 2849 2850 var userId = url.indexOf('u=') + 2; 2851 userId = url.substring(userId, url.indexOf('&', userId)); 2852 var listId = url.indexOf('id=') + 3; 2853 listId = url.substring(listId, url.indexOf('&', listId)); 2854 payload['b_' + userId + '_' + listId] = ''; 2855 $.ajax({ 2856 url: url, 2857 data: payload, 2858 dataType: 'jsonp' 2859 }).done(function (resp) { 2860 data.success = resp.result === 'success' || /already/.test(resp.msg); 2861 2862 if (!data.success) { 2863 console.info('MailChimp error: ' + resp.msg); 2864 } 2865 2866 afterSubmit(data); 2867 }).fail(function () { 2868 afterSubmit(data); 2869 }); 2870 } // Common callback which runs after all Ajax submissions 2871 2872 2873 function afterSubmit(data) { 2874 var form = data.form; 2875 var redirect = data.redirect; 2876 var success = data.success; // Redirect to a success url if defined 2877 2878 if (success && redirect) { 2879 Webflow.location(redirect); 2880 return; 2881 } // Show or hide status divs 2882 2883 2884 data.done.toggle(success); 2885 data.fail.toggle(!success); // Hide form on success 2886 2887 form.toggle(!success); // Reset data and enable submit button 2888 2889 reset(data); 2890 } 2891 2892 function preventDefault(data) { 2893 data.evt && data.evt.preventDefault(); 2894 data.evt = null; 2895 } 2896 2897 function initFileUpload(i, form) { 2898 if (!form.fileUploads || !form.fileUploads[i]) { 2899 return; 2900 } 2901 2902 var file; 2903 var $el = $(form.fileUploads[i]); 2904 var $defaultWrap = $el.find('> .w-file-upload-default'); 2905 var $uploadingWrap = $el.find('> .w-file-upload-uploading'); 2906 var $successWrap = $el.find('> .w-file-upload-success'); 2907 var $errorWrap = $el.find('> .w-file-upload-error'); 2908 var $input = $defaultWrap.find('.w-file-upload-input'); 2909 var $label = $defaultWrap.find('.w-file-upload-label'); 2910 var $labelChildren = $label.children(); 2911 var $errorMsgEl = $errorWrap.find('.w-file-upload-error-msg'); 2912 var $fileEl = $successWrap.find('.w-file-upload-file'); 2913 var $removeEl = $successWrap.find('.w-file-remove-link'); 2914 var $fileNameEl = $fileEl.find('.w-file-upload-file-name'); 2915 var sizeErrMsg = $errorMsgEl.attr('data-w-size-error'); 2916 var typeErrMsg = $errorMsgEl.attr('data-w-type-error'); 2917 var genericErrMsg = $errorMsgEl.attr('data-w-generic-error'); 2918 2919 if (!inApp) { 2920 $removeEl.on('click', function () { 2921 $input.removeAttr('data-value'); 2922 $input.val(''); 2923 $fileNameEl.html(''); 2924 $defaultWrap.toggle(true); 2925 $successWrap.toggle(false); 2926 }); 2927 $input.on('change', function (e) { 2928 file = e.target && e.target.files && e.target.files[0]; 2929 2930 if (!file) { 2931 return; 2932 } // Show uploading 2933 2934 2935 $defaultWrap.toggle(false); 2936 $errorWrap.toggle(false); 2937 $uploadingWrap.toggle(true); // Set filename 2938 2939 $fileNameEl.text(file.name); // Disable submit button 2940 2941 if (!isUploading()) { 2942 disableBtn(form); 2943 } 2944 2945 form.fileUploads[i].uploading = true; 2946 signFile(file, afterSign); 2947 }); // Setting input width 1px and height equal label 2948 // This is so the browser required error will show up 2949 2950 var height = $label.outerHeight(); 2951 $input.height(height); 2952 $input.width(1); 2953 } else { 2954 $input.on('click', function (e) { 2955 e.preventDefault(); 2956 }); 2957 $label.on('click', function (e) { 2958 e.preventDefault(); 2959 }); 2960 $labelChildren.on('click', function (e) { 2961 e.preventDefault(); 2962 }); 2963 } 2964 2965 function parseError(err) { 2966 var errorMsg = err.responseJSON && err.responseJSON.msg; 2967 var userError = genericErrMsg; 2968 2969 if (typeof errorMsg === 'string' && errorMsg.indexOf('InvalidFileTypeError') === 0) { 2970 userError = typeErrMsg; 2971 } else if (typeof errorMsg === 'string' && errorMsg.indexOf('MaxFileSizeError') === 0) { 2972 userError = sizeErrMsg; 2973 } 2974 2975 $errorMsgEl.text(userError); 2976 $input.removeAttr('data-value'); 2977 $input.val(''); 2978 $uploadingWrap.toggle(false); 2979 $defaultWrap.toggle(true); 2980 $errorWrap.toggle(true); 2981 form.fileUploads[i].uploading = false;
2982 2983 if (!isUploading()) { 2984 reset(form); 2985 } 2986 } 2987 2988 function afterSign(err, data) { 2989 if (err) { 2990 return parseError(err); 2991 } 2992 2993 var fileName = data.fileName; 2994 var postData = data.postData; 2995 var fileId = data.fileId; 2996 var s3Url = data.s3Url; 2997 $input.attr('data-value', fileId); 2998 uploadS3(s3Url, postData, file, fileName, afterUpload); 2999 } 3000 3001 function afterUpload(err) { 3002 if (err) { 3003 return parseError(err); 3004 } // Show success 3005 3006 3007 $uploadingWrap.toggle(false); 3008 $successWrap.css('display', 'inline-block'); 3009 form.fileUploads[i].uploading = false; 3010 3011 if (!isUploading()) { 3012 reset(form); 3013 } 3014 } 3015 3016 function isUploading() { 3017 var uploads = form.fileUploads && form.fileUploads.toArray() || []; 3018 return uploads.some(function (value) { 3019 return value.uploading; 3020 }); 3021 } 3022 } 3023 3024 function signFile(file, cb) { 3025 var payload = { 3026 name: file.name, 3027 size: file.size 3028 }; 3029 $.ajax({ 3030 type: 'POST', 3031 url: signFileUrl, 3032 data: payload, 3033 dataType: 'json', 3034 crossDomain: true 3035 }).done(function (data) { 3036 cb(null, data); 3037 }).fail(function (err) { 3038 cb(err); 3039 }); 3040 } 3041 3042 function uploadS3(url, data, file, fileName, cb) { 3043 var formData = new FormData(); 3044 3045 for (var k in data) { 3046 formData.append(k, data[k]); 3047 } 3048 3049 formData.append('file', file, fileName); 3050 $.ajax({ 3051 type: 'POST', 3052 url: url, 3053 data: formData, 3054 processData: false, 3055 contentType: false 3056 }).done(function () { 3057 cb(null); 3058 }).fail(function (err) { 3059 cb(err); 3060 }); 3061 } // Export module 3062 3063 3064 return api; 3065}); 3066 3067/***/ }), 3068/* 13 */ 3069/***/ (function(module, exports, __webpack_require__) { 3070 3071var arrayWithHoles = __webpack_require__(14); 3072 3073var iterableToArrayLimit = __webpack_require__(15); 3074 3075var nonIterableRest = __webpack_require__(16); 3076 3077function _slicedToArray(arr, i) { 3078 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); 3079} 3080 3081module.exports = _slicedToArray; 3082 3083/***/ }), 3084/* 14 */ 3085/***/ (function(module, exports) { 3086 3087function _arrayWithHoles(arr) { 3088 if (Array.isArray(arr)) return arr; 3089} 3090 3091module.exports = _arrayWithHoles; 3092 3093/***/ }), 3094/* 15 */ 3095/***/ (function(module, exports) { 3096 3097function _iterableToArrayLimit(arr, i) { 3098 var _arr = []; 3099 var _n = true; 3100 var _d = false; 3101 var _e = undefined; 3102 3103 try { 3104 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { 3105 _arr.push(_s.value); 3106 3107 if (i && _arr.length === i) break; 3108 } 3109 } catch (err) { 3110 _d = true; 3111 _e = err; 3112 } finally { 3113 try { 3114 if (!_n && _i["return"] != null) _i["return"](); 3115 } finally { 3116 if (_d) throw _e; 3117 } 3118 } 3119 3120 return _arr; 3121} 3122 3123module.exports = _iterableToArrayLimit; 3124 3125/***/ }), 3126/* 16 */ 3127/***/ (function(module, exports) { 3128 3129function _nonIterableRest() { 3130 throw new TypeError("Invalid attempt to destructure non-iterable instance"); 3131} 3132 3133module.exports = _nonIterableRest; 3134 3135/***/ }), 3136/* 17 */ 3137/***/ (function(module, exports, __webpack_require__) { 3138 3139"use strict"; 3140 // @wf-will-never-add-flow-to-this-file 3141 3142/* global window, document */ 3143 3144/* eslint-disable no-var */ 3145 3146/** 3147 * Webflow: Slider component 3148 */ 3149 3150var Webflow = __webpack_require__(0); 3151 3152var IXEvents = __webpack_require__(3); 3153 3154Webflow.define('slider', module.exports = function ($, _) { 3155 var api = {}; 3156 var tram = $.tram; 3157 var $doc = $(document); 3158 var $sliders; 3159 var designer; 3160 var inApp = Webflow.env(); 3161 var namespace = '.w-slider'; 3162 var dot = '<div class="w-slider-dot" data-wf-ignore />'; 3163 var ix = IXEvents.triggers; 3164 var fallback; 3165 var inRedraw; // ----------------------------------- 3166 // Module methods 3167 3168 api.ready = function () { 3169 designer = Webflow.env('design'); 3170 init(); 3171 }; 3172 3173 api.design = function () { 3174 designer = true; 3175 init(); 3176 }; 3177 3178 api.preview = function () { 3179 designer = false;
3180 init(); 3181 }; 3182 3183 api.redraw = function () { 3184 inRedraw = true; 3185 init(); 3186 }; 3187 3188 api.destroy = removeListeners; // ----------------------------------- 3189 // Private methods 3190 3191 function init() { 3192 // Find all sliders on the page 3193 $sliders = $doc.find(namespace); 3194 3195 if (!$sliders.length) { 3196 return; 3197 } 3198 3199 $sliders.each(build); 3200 inRedraw = null; 3201 3202 if (fallback) { 3203 return; 3204 } 3205 3206 removeListeners(); 3207 addListeners(); 3208 } 3209 3210 function removeListeners() { 3211 Webflow.resize.off(renderAll); 3212 Webflow.redraw.off(api.redraw); 3213 } 3214 3215 function addListeners() { 3216 Webflow.resize.on(renderAll); 3217 Webflow.redraw.on(api.redraw); 3218 } 3219 3220 function renderAll() { 3221 $sliders.filter(':visible').each(render); 3222 } 3223 3224 function build(i, el) { 3225 var $el = $(el); // Store slider state in data 3226 3227 var data = $.data(el, namespace); 3228 3229 if (!data) { 3230 data = $.data(el, namespace, { 3231 index: 0, 3232 depth: 1, 3233 el: $el, 3234 config: {} 3235 }); 3236 } 3237 3238 data.mask = $el.children('.w-slider-mask'); 3239 data.left = $el.children('.w-slider-arrow-left'); 3240 data.right = $el.children('.w-slider-arrow-right'); 3241 data.nav = $el.children('.w-slider-nav'); 3242 data.slides = data.mask.children('.w-slide'); 3243 data.slides.each(ix.reset); 3244 3245 if (inRedraw) { 3246 data.maskWidth = 0; 3247 } // Disable in old browsers 3248 3249 3250 if (!tram.support.transform) { 3251 data.left.hide(); 3252 data.right.hide(); 3253 data.nav.hide(); 3254 fallback = true; 3255 return; 3256 } // Remove old events 3257 3258 3259 data.el.off(namespace); 3260 data.left.off(namespace); 3261 data.right.off(namespace); 3262 data.nav.off(namespace); // Set config from data attributes 3263 3264 configure(data); // Add events based on mode 3265 3266 if (designer) { 3267 data.el.on('setting' + namespace, handler(data)); 3268 stopTimer(data); 3269 data.hasTimer = false; 3270 } else { 3271 data.el.on('swipe' + namespace, handler(data)); 3272 data.left.on('click' + namespace, previousFunction(data)); 3273 data.right.on('click' + namespace, next(data)); // Start timer if autoplay is true, only once 3274 3275 if (data.config.autoplay && !data.hasTimer) { 3276 data.hasTimer = true; 3277 data.timerCount = 1; 3278 startTimer(data); 3279 } 3280 } // Listen to nav events 3281 3282 3283 data.nav.on('click' + namespace, '> div', handler(data)); // Remove gaps from formatted html (for inline-blocks) 3284 3285 if (!inApp) { 3286 data.mask.contents().filter(function () { 3287 return this.nodeType === 3; 3288 }).remove(); 3289 } // If slider or any parent is hidden, temporarily show for measurements (https://github.com/webflow/webflow/issues/24921) 3290 3291 3292 var $elHidden = $el.filter(':hidden'); 3293 $elHidden.show(); 3294 var $elHiddenParents = $el.parents(':hidden'); 3295 $elHiddenParents.show(); // Run first render 3296 3297 render(i, el); // If slider or any parent is hidden, reset after temporarily showing for measurements 3298 3299 $elHidden.css('display', ''); 3300 $elHiddenParents.css('display', ''); 3301 } 3302 3303 function configure(data) { 3304 var config = {}; 3305 config.crossOver = 0; // Set config options from data attributes 3306 3307 config.animation = data.el.attr('data-animation') || 'slide'; 3308 3309 if (config.animation === 'outin') { 3310 config.animation = 'cross'; 3311 config.crossOver = 0.5; 3312 } 3313 3314 config.easing = data.el.attr('data-easing') || 'ease'; 3315 var duration = data.el.attr('data-duration'); 3316 config.duration = duration != null ? parseInt(duration, 10) : 500; 3317 3318 if (isAttrTrue(data.el.attr('data-infinite'))) { 3319 config.infinite = true; 3320 } 3321 3322 if (isAttrTrue(data.el.attr('data-disable-swipe'))) { 3323 config.disableSwipe = true; 3324 } 3325 3326 if (isAttrTrue(data.el.attr('data-hide-arrows'))) { 3327 config.hideArrows = true; 3328 } else if (data.config.hideArrows) { 3329 data.left.show(); 3330 data.right.show(); 3331 } 3332 3333 if (isAttrTrue(data.el.attr('data-autoplay'))) { 3334 config.autoplay = true; 3335 config.delay = parseInt(data.el.attr('data-delay'), 10) || 2000; 3336 config.timerMax = parseInt(data.el.attr('data-autoplay-limit'), 10); // Disable timer on first touch or mouse down 3337 3338 var touchEvents = 'mousedown' + namespace + ' touchstart' + namespace; 3339 3340 if (!designer) { 3341 data.el.off(touchEvents).one(touchEvents, function () { 3342 stopTimer(data); 3343 }); 3344 } 3345 } // Use edge buffer to help calculate page count 3346 3347 3348 var arrowWidth = data.right.width(); 3349 config.edge = arrowWidth ? arrowWidth + 40 : 100; // Store config in data 3350 3351 data.config = config; 3352 } 3353 3354 function isAttrTrue(value) { 3355 return value === '1' || value === 'true'; 3356 } 3357 3358 function previousFunction(data) { 3359 return function () { 3360 change(data, { 3361 index: data.index - 1, 3362 vector: -1 3363 }); 3364 }; 3365 } 3366 3367 function next(data) { 3368 return function () { 3369 change(data, { 3370 index: data.index + 1, 3371 vector: 1 3372 }); 3373 }; 3374 } 3375 3376 function select(data, value) { 3377 // Select page based on slide element index 3378 var found = null; 3379 3380 if (value === data.slides.length) { 3381 init(); 3382 layout(data); // Rebuild and find new slides 3383 } 3384 3385 _.each(data.anchors, function (anchor, index) { 3386 $(anchor.els).each(function (i, el) { 3387 if ($(el).index() === value) { 3388 found = index; 3389 } 3390 }); 3391 }); 3392 3393 if (found != null) { 3394 change(data, { 3395 index: found, 3396 immediate: true 3397 }); 3398 } 3399 } 3400 3401 function startTimer(data) { 3402 stopTimer(data); 3403 var config = data.config; 3404 var timerMax = config.timerMax; 3405 3406 if (timerMax && data.timerCount++ > timerMax) { 3407 return; 3408 } 3409 3410 data.timerId = window.setTimeout(function () { 3411 if (data.timerId == null || designer) { 3412 return; 3413 } 3414 3415 next(data)(); 3416 startTimer(data); 3417 }, config.delay); 3418 } 3419 3420 function stopTimer(data) { 3421 window.clearTimeout(data.timerId); 3422 data.timerId = null; 3423 } 3424 3425 function handler(data) { 3426 return function (evt, options) { 3427 options = options || {}; 3428 var config = data.config; // Designer settings 3429 3430 if (designer && evt.type === 'setting') { 3431 if (options.select === 'prev') { 3432 return previousFunction(data)(); 3433 } 3434 3435 if (options.select === 'next') { 3436 return next(data)(); 3437 } 3438 3439 configure(data); 3440 layout(data); 3441 3442 if (options.select == null) { 3443 return; 3444 } 3445 3446 select(data, options.select); 3447 return; 3448 } // Swipe event 3449 3450 3451 if (evt.type === 'swipe') { 3452 if (config.disableSwipe) { 3453 return; 3454 } 3455 3456 if (Webflow.env('editor')) { 3457 return; 3458 } 3459 3460 if (options.direction === 'left') { 3461 return next(data)(); 3462 } 3463 3464 if (options.direction === 'right') { 3465 return previousFunction(data)(); 3466 } 3467 3468 return; 3469 } // Page buttons 3470 3471 3472 if (data.nav.has(evt.target).length) { 3473 change(data, { 3474 index: $(evt.target).index() 3475 }); 3476 } 3477 }; 3478 } 3479 3480 function change(data, options) { 3481 options = options || {}; 3482 var config = data.config; 3483 var anchors = data.anchors; // Set new index 3484 3485 data.previous = data.index; 3486 var index = options.index; 3487 var shift = {}; 3488 3489 if (index < 0) { 3490 index = anchors.length - 1; 3491 3492 if (config.infinite) { 3493 // Shift first slide to the end 3494 shift.x = -data.endX; 3495 shift.from = 0; 3496 shift.to = anchors[0].width; 3497 } 3498 } else if (index >= anchors.length) { 3499 index = 0; 3500 3501 if (config.infinite) { 3502 // Shift last slide to the start
3503 shift.x = anchors[anchors.length - 1].width; 3504 shift.from = -anchors[anchors.length - 1].x; 3505 shift.to = shift.from - shift.x; 3506 } 3507 } 3508 3509 data.index = index; // Select page nav 3510 3511 var active = data.nav.children().eq(data.index).addClass('w-active'); 3512 data.nav.children().not(active).removeClass('w-active'); // Hide arrows 3513 3514 if (config.hideArrows) { 3515 data.index === anchors.length - 1 ? data.right.hide() : data.right.show(); 3516 data.index === 0 ? data.left.hide() : data.left.show(); 3517 } // Get page offset from anchors 3518 3519 3520 var lastOffsetX = data.offsetX || 0; 3521 var offsetX = data.offsetX = -anchors[data.index].x; 3522 var resetConfig = { 3523 x: offsetX, 3524 opacity: 1, 3525 visibility: '' 3526 }; // Transition slides 3527 3528 var targets = $(anchors[data.index].els); 3529 var prevTargs = $(anchors[data.previous] && anchors[data.previous].els); 3530 var others = data.slides.not(targets); 3531 var animation = config.animation; 3532 var easing = config.easing; 3533 var duration = Math.round(config.duration); 3534 var vector = options.vector || (data.index > data.previous ? 1 : -1); 3535 var fadeRule = 'opacity ' + duration + 'ms ' + easing; 3536 var slideRule = 'transform ' + duration + 'ms ' + easing; // Trigger IX events 3537 3538 if (!designer) { 3539 targets.each(ix.intro); 3540 others.each(ix.outro); 3541 } // Set immediately after layout changes (but not during redraw) 3542 3543 3544 if (options.immediate && !inRedraw) { 3545 tram(targets).set(resetConfig); 3546 resetOthers(); 3547 return; 3548 } // Exit early if index is unchanged 3549 3550 3551 if (data.index === data.previous) { 3552 return; 3553 } // Cross Fade / Out-In 3554 3555 3556 if (animation === 'cross') { 3557 var reduced = Math.round(duration - duration * config.crossOver); 3558 var wait = Math.round(duration - reduced); 3559 fadeRule = 'opacity ' + reduced + 'ms ' + easing; 3560 tram(prevTargs).set({ 3561 visibility: '' 3562 }).add(fadeRule).start({ 3563 opacity: 0 3564 }); 3565 tram(targets).set({ 3566 visibility: '', 3567 x: offsetX, 3568 opacity: 0, 3569 zIndex: data.depth++ 3570 }).add(fadeRule).wait(wait).then({ 3571 opacity: 1 3572 }).then(resetOthers); 3573 return; 3574 } // Fade Over 3575 3576 3577 if (animation === 'fade') { 3578 tram(prevTargs).set({ 3579 visibility: '' 3580 }).stop(); 3581 tram(targets).set({ 3582 visibility: '', 3583 x: offsetX, 3584 opacity: 0, 3585 zIndex: data.depth++ 3586 }).add(fadeRule).start({ 3587 opacity: 1 3588 }).then(resetOthers); 3589 return; 3590 } // Slide Over 3591 3592 3593 if (animation === 'over') { 3594 resetConfig = { 3595 x: data.endX 3596 }; 3597 tram(prevTargs).set({ 3598 visibility: '' 3599 }).stop(); 3600 tram(targets).set({ 3601 visibility: '', 3602 zIndex: data.depth++, 3603 x: offsetX + anchors[data.index].width * vector 3604 }).add(slideRule).start({ 3605 x: offsetX 3606 }).then(resetOthers); 3607 return; 3608 } // Slide - infinite scroll 3609 3610 3611 if (config.infinite && shift.x) { 3612 tram(data.slides.not(prevTargs)).set({ 3613 visibility: '', 3614 x: shift.x 3615 }).add(slideRule).start({ 3616 x: offsetX 3617 }); 3618 tram(prevTargs).set({ 3619 visibility: '', 3620 x: shift.from 3621 }).add(slideRule).start({ 3622 x: shift.to 3623 }); 3624 data.shifted = prevTargs; 3625 } else { 3626 if (config.infinite && data.shifted) { 3627 tram(data.shifted).set({ 3628 visibility: '', 3629 x: lastOffsetX 3630 }); 3631 data.shifted = null; 3632 } // Slide - basic scroll 3633 3634 3635 tram(data.slides).set({ 3636 visibility: '' 3637 }).add(slideRule).start({ 3638 x: offsetX 3639 }); 3640 } // Helper to move others out of view 3641 3642 3643 function resetOthers() { 3644 targets = $(anchors[data.index].els); 3645 others = data.slides.not(targets); 3646 3647 if (animation !== 'slide') { 3648 resetConfig.visibility = 'hidden'; 3649 } 3650 3651 tram(others).set(resetConfig); 3652 } 3653 } 3654 3655 function render(i, el) { 3656 var data = $.data(el, namespace); 3657 3658 if (!data) { 3659 return; 3660 } 3661 3662 if (maskChanged(data)) { 3663 return layout(data); 3664 } 3665 3666 if (designer && slidesChanged(data)) { 3667 layout(data); 3668 } 3669 } 3670 3671 function layout(data) { 3672 // Determine page count from width of slides 3673 var pages = 1; 3674 var offset = 0; 3675 var anchor = 0; 3676 var width = 0; 3677 var maskWidth = data.maskWidth; 3678 var threshold = maskWidth - data.config.edge; 3679 3680 if (threshold < 0) { 3681 threshold = 0; 3682 } 3683 3684 data.anchors = [{ 3685 els: [], 3686 x: 0, 3687 width: 0 3688 }]; 3689 data.slides.each(function (i, el) { 3690 if (anchor - offset > threshold) { 3691 pages++; 3692 offset += maskWidth; // Store page anchor for transition 3693 3694 data.anchors[pages - 1] = { 3695 els: [], 3696 x: anchor, 3697 width: 0 3698 }; 3699 } // Set next anchor using current width + margin 3700 3701 3702 width = $(el).outerWidth(true); 3703 anchor += width; 3704 data.anchors[pages - 1].width += width; 3705 data.anchors[pages - 1].els.push(el); 3706 }); 3707 data.endX = anchor; // Build dots if nav exists and needs updating 3708 3709 if (designer) { 3710 data.pages = null; 3711 } 3712 3713 if (data.nav.length && data.pages !== pages) { 3714 data.pages = pages; 3715 buildNav(data); 3716 } // Make sure index is still within range and call change handler 3717 3718 3719 var index = data.index; 3720 3721 if (index >= pages) { 3722 index = pages - 1; 3723 } 3724 3725 change(data, { 3726 immediate: true, 3727 index: index 3728 }); 3729 } 3730 3731 function buildNav(data) { 3732 var dots = []; 3733 var $dot; 3734 var spacing = data.el.attr('data-nav-spacing'); 3735 3736 if (spacing) { 3737 spacing = parseFloat(spacing) + 'px'; 3738 } 3739 3740 for (var i = 0; i < data.pages; i++) { 3741 $dot = $(dot); 3742 3743 if (data.nav.hasClass('w-num')) { 3744 $dot.text(i + 1); 3745 } 3746 3747 if (spacing != null) { 3748 $dot.css({ 3749 'margin-left': spacing, 3750 'margin-right': spacing 3751 }); 3752 } 3753 3754 dots.push($dot); 3755 } 3756 3757 data.nav.empty().append(dots); 3758 } 3759 3760 function maskChanged(data) { 3761 var maskWidth = data.mask.width(); 3762 3763 if (data.maskWidth !== maskWidth) { 3764 data.maskWidth = maskWidth; 3765 return true; 3766 } 3767 3768 return false;
3769 } 3770 3771 function slidesChanged(data) { 3772 var slidesWidth = 0; 3773 data.slides.each(function (i, el) { 3774 slidesWidth += $(el).outerWidth(true); 3775 }); 3776 3777 if (data.slidesWidth !== slidesWidth) { 3778 data.slidesWidth = slidesWidth; 3779 return true; 3780 } 3781 3782 return false; 3783 } // Export module 3784 3785 3786 return api; 3787}); 3788 3789/***/ }), 3790/* 18 */ 3791/***/ (function(module, exports, __webpack_require__) { 3792 3793"use strict"; 3794// @wf-will-never-add-flow-to-this-file 3795 3796/* globals window */ 3797 3798/* eslint-disable no-var */ 3799 3800/** 3801 * Webflow: IX Event triggers for other modules 3802 */ 3803// eslint-disable-next-line strict 3804 3805 3806var $ = window.jQuery; 3807var api = {}; 3808var eventQueue = []; 3809var namespace = '.w-ix'; 3810var eventTriggers = { 3811 reset: function reset(i, el) { 3812 el.__wf_intro = null; 3813 }, 3814 intro: function intro(i, el) { 3815 if (el.__wf_intro) { 3816 return; 3817 } 3818 3819 el.__wf_intro = true; 3820 $(el).triggerHandler(api.types.INTRO); 3821 }, 3822 outro: function outro(i, el) { 3823 if (!el.__wf_intro) { 3824 return; 3825 } 3826 3827 el.__wf_intro = null; 3828 $(el).triggerHandler(api.types.OUTRO); 3829 } 3830}; 3831api.triggers = {}; 3832api.types = { 3833 INTRO: 'w-ix-intro' + namespace, 3834 OUTRO: 'w-ix-outro' + namespace 3835}; // Trigger any events in queue + restore trigger methods 3836 3837api.init = function () { 3838 var count = eventQueue.length; 3839 3840 for (var i = 0; i < count; i++) { 3841 var memo = eventQueue[i]; 3842 memo[0](0, memo[1]); 3843 } 3844 3845 eventQueue = []; 3846 $.extend(api.triggers, eventTriggers); 3847}; // Replace all triggers with async wrapper to queue events until init 3848 3849 3850api.async = function () { 3851 for (var key in eventTriggers) { 3852 var func = eventTriggers[key]; 3853 3854 if (!eventTriggers.hasOwnProperty(key)) { 3855 continue; 3856 } // Replace trigger method with async wrapper 3857 3858 3859 api.triggers[key] = function (i, el) { 3860 eventQueue.push([func, el]); 3861 }; 3862 } 3863}; // Default triggers to async queue 3864 3865 3866api.async(); 3867module.exports = api; 3868 3869/***/ }), 3870/* 19 */ 3871/***/ (function(module, exports, __webpack_require__) { 3872 3873"use strict"; 3874 // @wf-will-never-add-flow-to-this-file 3875 3876/* globals document */ 3877 3878/* eslint-disable no-var */ 3879 3880/** 3881 * Webflow: Tabs component 3882 */ 3883 3884var Webflow = __webpack_require__(0); 3885 3886var IXEvents = __webpack_require__(3); 3887 3888Webflow.define('tabs', module.exports = function ($) { 3889 var api = {}; 3890 var tram = $.tram; 3891 var $doc = $(document); 3892 var $tabs; 3893 var design; 3894 var env = Webflow.env; 3895 var safari = env.safari; 3896 var inApp = env(); 3897 var tabAttr = 'data-w-tab'; 3898 var namespace = '.w-tabs'; 3899 var linkCurrent = 'w--current'; 3900 var tabActive = 'w--tab-active'; 3901 var ix = IXEvents.triggers; 3902 var inRedraw = false; // ----------------------------------- 3903 // Module methods 3904 3905 api.ready = api.design = api.preview = init; 3906 3907 api.redraw = function () { 3908 inRedraw = true; 3909 init(); 3910 inRedraw = false; 3911 }; 3912 3913 api.destroy = function () { 3914 $tabs = $doc.find(namespace); 3915 3916 if (!$tabs.length) { 3917 return; 3918 } 3919 3920 $tabs.each(resetIX); 3921 removeListeners(); 3922 }; // ----------------------------------- 3923 // Private methods 3924 3925 3926 function init() { 3927 design = inApp && Webflow.env('design'); // Find all instances on the page 3928 3929 $tabs = $doc.find(namespace); 3930 3931 if (!$tabs.length) { 3932 return; 3933 } 3934 3935 $tabs.each(build); 3936 3937 if (Webflow.env('preview') && !inRedraw) { 3938 $tabs.each(resetIX); 3939 } 3940 3941 removeListeners(); 3942 addListeners(); 3943 } 3944 3945 function removeListeners() { 3946 Webflow.redraw.off(api.redraw); 3947 } 3948 3949 function addListeners() { 3950 Webflow.redraw.on(api.redraw); 3951 } 3952 3953 function resetIX(i, el) { 3954 var data = $.data(el, namespace); 3955 3956 if (!data) { 3957 return; 3958 } 3959 3960 data.links && data.links.each(ix.reset); 3961 data.panes && data.panes.each(ix.reset); 3962 } 3963 3964 function build(i, el) { 3965 var $el = $(el); // Store state in data 3966 3967 var data = $.data(el, namespace); 3968 3969 if (!data) { 3970 data = $.data(el, namespace, { 3971 el: $el, 3972 config: {} 3973 }); 3974 } 3975 3976 data.current = null; 3977 data.menu = $el.children('.w-tab-menu'); 3978 data.links = data.menu.children('.w-tab-link'); 3979 data.content = $el.children('.w-tab-content'); 3980 data.panes = data.content.children('.w-tab-pane'); // Remove old events 3981 3982 data.el.off(namespace); 3983 data.links.off(namespace); // Set config from data attributes 3984 3985 configure(data); // Wire up events when not in design mode 3986 3987 if (!design) {
3988 data.links.on('click' + namespace, linkSelect(data)); // Trigger first intro event from current tab 3989 3990 var $link = data.links.filter('.' + linkCurrent); 3991 var tab = $link.attr(tabAttr); 3992 tab && changeTab(data, { 3993 tab: tab, 3994 immediate: true 3995 }); 3996 } 3997 } 3998 3999 function configure(data) { 4000 var config = {}; // Set config options from data attributes 4001 4002 config.easing = data.el.attr('data-easing') || 'ease'; 4003 var intro = parseInt(data.el.attr('data-duration-in'), 10); // eslint-disable-next-line no-self-compare 4004 4005 intro = config.intro = intro === intro ? intro : 0; 4006 var outro = parseInt(data.el.attr('data-duration-out'), 10); // eslint-disable-next-line no-self-compare 4007 4008 outro = config.outro = outro === outro ? outro : 0; 4009 config.immediate = !intro && !outro; // Store config in data 4010 4011 data.config = config; 4012 } 4013 4014 function linkSelect(data) { 4015 return function (evt) { 4016 var tab = evt.currentTarget.getAttribute(tabAttr); 4017 tab && changeTab(data, { 4018 tab: tab 4019 }); 4020 }; 4021 } 4022 4023 function changeTab(data, options) { 4024 options = options || {}; 4025 var config = data.config; 4026 var easing = config.easing; 4027 var tab = options.tab; // Don't select the same tab twice 4028 4029 if (tab === data.current) { 4030 return; 4031 } 4032 4033 data.current = tab; // Select the current link 4034 4035 data.links.each(function (i, el) { 4036 var $el = $(el); 4037 4038 if (el.getAttribute(tabAttr) === tab) { 4039 $el.addClass(linkCurrent).each(ix.intro); 4040 } else if ($el.hasClass(linkCurrent)) { 4041 $el.removeClass(linkCurrent).each(ix.outro); 4042 } 4043 }); // Find the new tab panes and keep track of previous 4044 4045 var targets = []; 4046 var previous = []; 4047 data.panes.each(function (i, el) { 4048 var $el = $(el); 4049 4050 if (el.getAttribute(tabAttr) === tab) { 4051 targets.push(el); 4052 } else if ($el.hasClass(tabActive)) { 4053 previous.push(el); 4054 } 4055 }); 4056 var $targets = $(targets); 4057 var $previous = $(previous); // Switch tabs immediately and bypass transitions 4058 4059 if (options.immediate || config.immediate) { 4060 $targets.addClass(tabActive).each(ix.intro); 4061 $previous.removeClass(tabActive); // Redraw to benefit components in the hidden tab pane 4062 // But only if not currently in the middle of a redraw 4063 4064 if (!inRedraw) { 4065 Webflow.redraw.up(); 4066 } 4067 4068 return; 4069 } // Fade out the currently active tab before intro 4070 4071 4072 if ($previous.length && config.outro) { 4073 $previous.each(ix.outro); 4074 tram($previous).add('opacity ' + config.outro + 'ms ' + easing, { 4075 fallback: safari 4076 }).start({ 4077 opacity: 0 4078 }).then(intro); 4079 } else { 4080 // Skip the outro and play intro 4081 intro(); 4082 } // Fade in the new target 4083 4084 4085 function intro() { 4086 // Clear previous active class + styles touched by tram 4087 // We cannot remove the whole inline style because it could be dynamically bound 4088 $previous.removeClass(tabActive).css({ 4089 opacity: '', 4090 transition: '', 4091 transform: '', 4092 width: '', 4093 height: '' 4094 }); // Add active class to new target 4095 4096 $targets.addClass(tabActive).each(ix.intro); 4097 Webflow.redraw.up(); // Set opacity immediately if intro is zero 4098 4099 if (!config.intro) { 4100 return tram($targets).set({ 4101 opacity: 1 4102 }); 4103 } // Otherwise fade in opacity 4104 4105 4106 tram($targets).set({ 4107 opacity: 0 4108 }).redraw().add('opacity ' + config.intro + 'ms ' + easing, { 4109 fallback: safari 4110 }).start({ 4111 opacity: 1 4112 }); 4113 } 4114 } // Export module 4115 4116 4117 return api; 4118}); 4119 4120/***/ }) 4121/******/ ]);
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.