1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10(function() { 11 this.Calendly = {}; 12 13 this.Calendly._util = {}; 14 15}).call(this); 16// @see http://beeker.io/jquery-document-ready-equivalent-vanilla-javascript 17Calendly._util.domReady = function(callback) { 18 var ready = false; 19 20 var detach = function() { 21 if(document.addEventListener) { 22 document.removeEventListener("DOMContentLoaded", completed); 23 window.removeEventListener("load", completed); 24 } else { 25 document.detachEvent("onreadystatechange", completed); 26 window.detachEvent("onload", completed); 27 } 28 } 29 var completed = function() { 30 if(!ready && (document.addEventListener || event.type === "load" || document.readyState === "complete")) { 31 ready = true; 32 detach(); 33 callback(); 34 } 35 }; 36 37 if(document.readyState === "complete") { 38 callback(); 39 } else if(document.addEventListener) { 40 document.addEventListener("DOMContentLoaded", completed); 41 window.addEventListener("load", completed); 42 } else { 43 document.attachEvent("onreadystatechange", completed); 44 window.attachEvent("onload", completed); 45 46 var top = false; 47 48 try { 49 top = window.frameElement == null && document.documentElement; 50 } catch(e) {} 51 52 if(top && top.doScroll) { 53 (function scrollCheck() { 54 if(ready) return; 55 56 try { 57 top.doScroll("left"); 58 } catch(e) { 59 return setTimeout(scrollCheck, 50); 60 } 61 62 ready = true; 63 detach(); 64 callback(); 65 })(); 66 } 67 } 68}; 69// @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill 70Calendly._util.assign = function assign(target, varArgs) { // .length of function is 2 71 'use strict'; 72 if (target == null) { // TypeError if undefined or null 73 throw new TypeError('Cannot convert undefined or null to object'); 74 } 75 76 var to = Object(target); 77 78 for (var index = 1; index < arguments.length; index++) { 79 var nextSource = arguments[index]; 80 81 if (nextSource != null) { // Skip over if undefined or null 82 for (var nextKey in nextSource) { 83 // Avoid bugs when hasOwnProperty is shadowed 84 if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 85 to[nextKey] = nextSource[nextKey]; 86 } 87 } 88 } 89 } 90 return to; 91} 92; 93(function() { 94 Calendly._url = {}; 95 96 Calendly._url.extractQueryStringParams = function(url) { 97 var i, key, len, param, paramString, params, parser, ref, ref1, value; 98 parser = document.createElement('a'); 99 parser.href = url; 100 paramString = parser.search.substr(1); 101 params = {}; 102 ref = paramString.split('&'); 103 for (i = 0, len = ref.length; i < len; i++) { 104 param = ref[i]; 105 ref1 = param.split('='), key = ref1[0], value = ref1[1]; 106 if (value !== void 0) { 107 params[key.toLowerCase()] = decodeURIComponent(value); 108 } 109 } 110 return params; 111 }; 112 113 Calendly._url.stripQuery = function(url) { 114 return url.split('?')[0]; 115 }; 116 117}).call(this); 118(function() { 119 Calendly._util.snakeCaseKeys = function(options) { 120 var convertedKey, key, result; 121 result = {}; 122 for (key in options) { 123 convertedKey = key.split(/(?=[A-Z])/).join('_').toLowerCase(); 124 result[convertedKey] = options[key]; 125 } 126 return result; 127 }; 128 129 Calendly._util.pick = function(options, keyWhitelist) { 130 var i, key, len, result; 131 if (!options) { 132 return; 133 } 134 result = {}; 135 for (i = 0, len = keyWhitelist.length; i < len; i++) { 136 key = keyWhitelist[i]; 137 if (options[key]) { 138 result[key] = options[key]; 139 } 140 } 141 return result; 142 }; 143 144}).call(this); 145(function (global, factory) { 146 var mod = { 147 exports: {} 148 }; 149 150 if (typeof define === "function" && define.amd) { 151 define(['exports'], factory); 152 } else if (typeof exports !== "undefined") { 153 mod.exports = exports 154 } 155
156 factory(mod.exports); 157 global.bodyScrollLock = mod.exports; 158})(this, function (exports) { 159 'use strict'; 160 161 Object.defineProperty(exports, "__esModule", { 162 value: true 163 }); 164 165 function _toConsumableArray(arr) { 166 if (Array.isArray(arr)) { 167 for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { 168 arr2[i] = arr[i]; 169 } 170 171 return arr2; 172 } else { 173 return Array.from(arr); 174 } 175 } 176 177 // Older browsers don't support event options, feature detect it. 178 179 // Adopted and modified solution from Bohdan Didukh (2017) 180 // https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi 181 182 var hasPassiveEvents = false; 183 if (typeof window !== 'undefined') { 184 var passiveTestOptions = { 185 get passive() { 186 hasPassiveEvents = true; 187 return undefined; 188 } 189 }; 190 window.addEventListener('testPassive', null, passiveTestOptions); 191 window.removeEventListener('testPassive', null, passiveTestOptions); 192 } 193 194 var isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && /iP(ad|hone|od)/.test(window.navigator.platform); 195 196 197 var locks = []; 198 var documentListenerAdded = false; 199 var initialClientY = -1; 200 var previousBodyOverflowSetting = void 0; 201 var previousBodyPaddingRight = void 0; 202 203 // returns true if `el` should be allowed to receive touchmove events. 204 var allowTouchMove = function allowTouchMove(el) { 205 return locks.some(function (lock) { 206 if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) { 207 return true; 208 } 209 210 return false; 211 }); 212 }; 213 214 var preventDefault = function preventDefault(rawEvent) { 215 var e = rawEvent || window.event; 216 217 // For the case whereby consumers adds a touchmove event listener to document. 218 // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false }) 219 // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then 220 // the touchmove event on document will break. 221 if (allowTouchMove(e.target)) { 222 return true; 223 } 224 225 // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom). 226 if (e.touches.length > 1) return true; 227 228 if (e.preventDefault) e.preventDefault(); 229 230 return false; 231 }; 232 233 var setOverflowHidden = function setOverflowHidden(options) { 234 // Setting overflow on body/documentElement synchronously in Desktop Safari slows down 235 // the responsiveness for some reason. Setting within a setTimeout fixes this. 236 setTimeout(function () { 237 // If previousBodyPaddingRight is already set, don't set it again. 238 if (previousBodyPaddingRight === undefined) { 239 var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true; 240 var scrollBarGap = window.innerWidth - document.documentElement.clientWidth; 241 242 if (_reserveScrollBarGap && scrollBarGap > 0) { 243 previousBodyPaddingRight = document.body.style.paddingRight; 244 document.body.style.paddingRight = scrollBarGap + 'px'; 245 } 246 } 247 248 // If previousBodyOverflowSetting is already set, don't set it again. 249 if (previousBodyOverflowSetting === undefined) { 250 previousBodyOverflowSetting = document.body.style.overflow; 251 document.body.style.overflow = 'hidden'; 252 } 253 }); 254 }; 255 256 var restoreOverflowSetting = function restoreOverflowSetting() { 257 // Setting overflow on body/documentElement synchronously in Desktop Safari slows down 258 // the responsiveness for some reason. Setting within a setTimeout fixes this. 259 setTimeout(function () { 260 if (previousBodyPaddingRight !== undefined) { 261 document.body.style.paddingRight = previousBodyPaddingRight; 262 263 // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it 264 // can be set again. 265 previousBodyPaddingRight = undefined; 266 } 267 268 if (previousBodyOverflowSetting !== undefined) { 269 document.body.style.overflow = previousBodyOverflowSetting; 270 271 // Restore previousBodyOverflowSetting to undefined 272 // so setOverflowHidden knows it can be set again. 273 previousBodyOverflowSetting = undefined; 274 } 275 }); 276 }; 277 278 // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions 279 var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) { 280 return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
281 }; 282 283 var handleScroll = function handleScroll(event, targetElement) { 284 var clientY = event.targetTouches[0].clientY - initialClientY; 285 286 if (allowTouchMove(event.target)) { 287 return false; 288 } 289 290 if (targetElement && targetElement.scrollTop === 0 && clientY > 0) { 291 // element is at the top of its scroll. 292 return preventDefault(event); 293 } 294 295 if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) { 296 // element is at the top of its scroll. 297 return preventDefault(event); 298 } 299 300 event.stopPropagation(); 301 return true; 302 }; 303 304 var disableBodyScroll = exports.disableBodyScroll = function disableBodyScroll(targetElement, options) { 305 if (isIosDevice) { 306 // targetElement must be provided, and disableBodyScroll must not have been 307 // called on this targetElement before. 308 if (!targetElement) { 309 // eslint-disable-next-line no-console 310 console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.'); 311 return; 312 } 313 314 if (targetElement && !locks.some(function (lock) { 315 return lock.targetElement === targetElement; 316 })) { 317 var lock = { 318 targetElement: targetElement, 319 options: options || {} 320 }; 321 322 locks = [].concat(_toConsumableArray(locks), [lock]); 323 324 targetElement.ontouchstart = function (event) { 325 if (event.targetTouches.length === 1) { 326 // detect single touch. 327 initialClientY = event.targetTouches[0].clientY; 328 } 329 }; 330 targetElement.ontouchmove = function (event) { 331 if (event.targetTouches.length === 1) { 332 // detect single touch. 333 handleScroll(event, targetElement); 334 } 335 }; 336 337 if (!documentListenerAdded) { 338 document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined); 339 documentListenerAdded = true; 340 } 341 } 342 } else { 343 setOverflowHidden(options); 344 var _lock = { 345 targetElement: targetElement, 346 options: options || {} 347 }; 348 349 locks = [].concat(_toConsumableArray(locks), [_lock]); 350 } 351 }; 352 353 var clearAllBodyScrollLocks = exports.clearAllBodyScrollLocks = function clearAllBodyScrollLocks() { 354 if (isIosDevice) { 355 // Clear all locks ontouchstart/ontouchmove handlers, and the references. 356 locks.forEach(function (lock) { 357 lock.targetElement.ontouchstart = null; 358 lock.targetElement.ontouchmove = null; 359 }); 360 361 if (documentListenerAdded) { 362 document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined); 363 documentListenerAdded = false; 364 } 365 366 locks = []; 367 368 // Reset initial clientY. 369 initialClientY = -1; 370 } else { 371 restoreOverflowSetting(); 372 locks = []; 373 } 374 }; 375 376 var enableBodyScroll = exports.enableBodyScroll = function enableBodyScroll(targetElement) { 377 if (isIosDevice) { 378 if (!targetElement) { 379 // eslint-disable-next-line no-console 380 console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.'); 381 return; 382 } 383 384 targetElement.ontouchstart = null; 385 targetElement.ontouchmove = null; 386 387 locks = locks.filter(function (lock) { 388 return lock.targetElement !== targetElement; 389 }); 390 391 if (documentListenerAdded && locks.length === 0) { 392 document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined); 393 394 documentListenerAdded = false; 395 } 396 } else { 397 locks = locks.filter(function (lock) { 398 return lock.targetElement !== targetElement; 399 }); 400 if (!locks.length) { 401 restoreOverflowSetting(); 402 } 403 } 404 }; 405}); 406 407 408 409 410 411 412 413(function() { 414 var createBadgeWidget, createInlineWidgets, extractBadgeOptions, findInlineParentElement, shouldSkipAutoLoadInlineWidget; 415 416 Calendly._autoLoadInlineWidgets = function() { 417 return Calendly._util.domReady(function() { 418 return createInlineWidgets(); 419 }); 420 }; 421 422 Calendly.initBadgeWidget = function(options) { 423 return Calendly._util.domReady(function() { 424 return createBadgeWidget(options); 425 }); 426 }; 427 428 Calendly.destroyBadgeWidget = function() { 429 if (!Calendly.badgeWidget) { 430 return; 431 } 432 Calendly.badgeWidget.destroy(); 433 return delete Calendly.badgeWidget; 434 }; 435 436 Calendly.initPopupWidget = function(options) { 437 return Calendly._util.domReady(function() { 438 return Calendly.showPopupWidget(options.url, 'PopupText', options); 439 }); 440 }; 441 442 Calendly.initInlineWidget = function(options) { 443 if (!options.url) { 444 return; 445 } 446 if (!options.parentElement) { 447 options.parentElement = findInlineParentElement(); 448 } 449 return Calendly._util.domReady(function() { 450 options.embedType = 'Inline'; 451 return new Calendly.Iframe(options); 452 }); 453 }; 454 455 Calendly.showPopupWidget = function(url, embedType, options) { 456 var onCloseHandler; 457 if (embedType == null) { 458 embedType = 'PopupText'; 459 } 460 if (options == null) { 461 options = {}; 462 } 463 this.closePopupWidget(); 464 onCloseHandler = function() { 465 return delete Calendly.popupWidget; 466 }; 467 Calendly.popupWidget = new Calendly.PopupWidget(url, onCloseHandler, embedType, options); 468 return Calendly.popupWidget.show(); 469 }; 470 471 Calendly.closePopupWidget = function() { 472 if (!Calendly.popupWidget) { 473 return; 474 } 475 return Calendly.popupWidget.close(); 476 }; 477 478 findInlineParentElement = function() { 479 var thisScript; 480 thisScript = document.scripts[document.scripts.length - 1]; 481 return thisScript.parentNode; 482 }; 483 484 createInlineWidgets = function() { 485 var element, elements, i, len, results; 486 elements = document.querySelectorAll('.calendly-inline-widget'); 487 results = []; 488 for (i = 0, len = elements.length; i < len; i++) { 489 element = elements[i]; 490 if (!shouldSkipAutoLoadInlineWidget(element)) { 491 element.setAttribute('data-processed', true); 492 results.push(new Calendly.Iframe({ 493 parentElement: element, 494 inlineStyles: true, 495 embedType: 'Inline' 496 })); 497 } else { 498 results.push(void 0); 499 } 500 } 501 return results; 502 }; 503 504 shouldSkipAutoLoadInlineWidget = function(element) { 505 return element.getAttribute('data-processed') || element.getAttribute('data-auto-load') === 'false'; 506 }; 507 508 createBadgeWidget = function(options) { 509 var badgeOptions, initBadgeOptions, onClickHandler; 510 Calendly.destroyBadgeWidget(); 511 badgeOptions = extractBadgeOptions(options); 512 onClickHandler = function() { 513 return Calendly.showPopupWidget(options.url, 'PopupWidget', options); 514 }; 515 initBadgeOptions = Calendly._util.assign({ 516 onClick: onClickHandler 517 }, badgeOptions); 518 return Calendly.badgeWidget = new Calendly.BadgeWidget(initBadgeOptions); 519 }; 520 521 extractBadgeOptions = function(options) { 522 var badgeKeys, badgeOptions; 523 badgeKeys = ['color', 'textColor', 'text', 'branding']; 524 badgeOptions = {}; 525 badgeKeys.forEach(function(key) { 526 badgeOptions[key] = options[key]; 527 return delete options[key]; 528 }); 529 return badgeOptions; 530 }; 531 532}).call(this); 533(function() { 534 Calendly.Iframe = (function() { 535 Iframe.prototype.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 536 537 function Iframe(options) { 538 this.options = options; 539 this.parseOptions(); 540 this.build(); 541 this.inject(); 542 } 543 544 Iframe.prototype.parseOptions = function() { 545 var defaultOptions; 546 defaultOptions = { 547 inlineStyles: false 548 }; 549 this.options = Calendly._util.assign({}, defaultOptions, this.options); 550 this.parent = this.options.parentElement; 551 if (!this.parent) { 552 throw 'Calendly: Parent element not set'; 553 } 554 if (this.parent.jquery) { 555 this.parent = this.parent[0]; 556 } 557 this.inlineStyles = this.options.inlineStyles; 558 this.embedType = this.options.embedType; 559 this.url = (this.options.url || this.getUrlFromParent()).split('#')[0]; 560 if (!this.url) { 561 throw 'Calendly: Widget URL not set'; 562 } 563 }; 564 565 Iframe.prototype.build = function() { 566 this.node = document.createElement('iframe');
567 this.node.src = this.getSource(); 568 this.node.width = '100%'; 569 this.node.height = '100%'; 570 return this.node.frameBorder = '0'; 571 }; 572 573 Iframe.prototype.inject = function() { 574 this.format(); 575 this.parent.appendChild(this.buildSpinner()); 576 return this.parent.appendChild(this.node); 577 }; 578 579 Iframe.prototype.getSource = function() { 580 return (Calendly._url.stripQuery(this.url)) + "?" + (this.getParams()); 581 }; 582 583 Iframe.prototype.getUrlFromParent = function() { 584 return this.parent.getAttribute('data-url'); 585 }; 586 587 Iframe.prototype.getParams = function() { 588 var key, params, parts, value; 589 params = { 590 embed_domain: this.getDomain(), 591 embed_type: this.embedType 592 }; 593 params = Calendly._util.assign(params, this.getUtmParamsFromHost(), this.getParamsFromUrl(), this.getParamsFromOptions()); 594 parts = []; 595 for (key in params) { 596 value = params[key]; 597 parts.push(key + "=" + (encodeURIComponent(value))); 598 } 599 return parts.join('&'); 600 }; 601 602 Iframe.prototype.getUtmParamsFromHost = function() { 603 var keyFilters, queryStringParams; 604 keyFilters = ['utm_campaign', 'utm_source', 'utm_medium', 'utm_content', 'utm_term']; 605 queryStringParams = Calendly._url.extractQueryStringParams(window.location.href); 606 return Calendly._util.pick(queryStringParams, keyFilters); 607 }; 608 609 Iframe.prototype.getParamsFromUrl = function() { 610 return Calendly._url.extractQueryStringParams(this.url); 611 }; 612 613 Iframe.prototype.getParamsFromOptions = function() { 614 return Calendly._util.assign({}, this.getPrefillParams(), this.getUtmParams()); 615 }; 616 617 Iframe.prototype.getUtmParams = function() { 618 var keyFilters; 619 if (!this.options.utm) { 620 return null; 621 } 622 keyFilters = ['utmCampaign', 'utmSource', 'utmMedium', 'utmContent', 'utmTerm']; 623 return Calendly._util.snakeCaseKeys(Calendly._util.pick(this.options.utm, keyFilters)); 624 }; 625 626 Iframe.prototype.getPrefillParams = function() { 627 var key, keyFilters, params, ref, value; 628 if (!this.options.prefill) { 629 return null; 630 } 631 keyFilters = ['name', 'firstName', 'lastName', 'email']; 632 params = Calendly._util.snakeCaseKeys(Calendly._util.pick(this.options.prefill, keyFilters)); 633 if (this.options.prefill['customAnswers']) { 634 ref = this.options.prefill['customAnswers']; 635 for (key in ref) { 636 value = ref[key]; 637 if (key.match(/^a\d{1,2}$/)) { 638 params[key] = value; 639 } 640 } 641 } 642 return params; 643 }; 644 645 Iframe.prototype.getDomain = function() { 646 return document.location.host; 647 }; 648 649 Iframe.prototype.format = function() { 650 if (this.isMobile) { 651 return this.formatMobile(); 652 } else { 653 return this.formatDesktop(); 654 } 655 }; 656 657 Iframe.prototype.formatDesktop = function() { 658 if (this.inlineStyles) { 659 return this.parent.setAttribute('style', 'position: relative;' + this.parent.getAttribute('style')); 660 } 661 }; 662 663 Iframe.prototype.formatMobile = function() { 664 if (this.inlineStyles) { 665 return this.parent.setAttribute('style', 'position: relative;overflow-y:auto;-webkit-overflow-scrolling:touch;' + this.parent.getAttribute('style')); 666 } else { 667 return this.parent.className += ' calendly-mobile'; 668 } 669 }; 670 671 Iframe.prototype.buildSpinner = function() { 672 var spinner; 673 spinner = document.createElement('div'); 674 spinner.className = 'calendly-spinner'; 675 spinner.appendChild(this.buildBounce(1)); 676 spinner.appendChild(this.buildBounce(2)); 677 spinner.appendChild(this.buildBounce(3)); 678 return spinner; 679 }; 680 681 Iframe.prototype.buildBounce = function(number) { 682 var bounce; 683 bounce = document.createElement('div'); 684 bounce.className = "calendly-bounce" + number; 685 return bounce; 686 }; 687 688 return Iframe; 689 690 })(); 691 692}).call(this); 693(function() { 694 var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; 695 696 Calendly.PopupWidget = (function() { 697 function PopupWidget(url, onClose, embedType, options) { 698 this.url = url; 699 this.onClose = onClose; 700 this.embedType = embedType; 701 this.options = options != null ? options : {}; 702 this.close = bind(this.close, this); 703 } 704 705 PopupWidget.prototype.show = function() { 706 this.buildOverlay(); 707 this.insertOverlay(); 708 return this.lockPageScroll(); 709 }; 710 711 PopupWidget.prototype.close = function() { 712 this.unlockPageScroll(); 713 this.destroyOverlay(); 714 return this.onClose(); 715 }; 716 717 PopupWidget.prototype.buildOverlay = function() {
718 this.overlay = document.createElement('div'); 719 this.overlay.className = 'calendly-overlay'; 720 this.overlay.appendChild(this.buildCloseOverlay()); 721 this.overlay.appendChild(this.buildPopup()); 722 return this.overlay.appendChild(this.buildCloseButton()); 723 }; 724 725 PopupWidget.prototype.insertOverlay = function() { 726 return document.body.appendChild(this.overlay); 727 }; 728 729 PopupWidget.prototype.buildCloseOverlay = function() { 730 var node; 731 node = document.createElement('div'); 732 node.className = 'calendly-close-overlay'; 733 node.onclick = this.close; 734 return node; 735 }; 736 737 PopupWidget.prototype.buildPopup = function() { 738 var node; 739 node = document.createElement('div'); 740 node.className = 'calendly-popup'; 741 node.appendChild(this.buildPopupContent()); 742 return node; 743 }; 744 745 PopupWidget.prototype.buildPopupContent = function() { 746 var node; 747 node = document.createElement('div'); 748 node.className = 'calendly-popup-content'; 749 node.setAttribute('data-url', this.url); 750 this.options.parentElement = node; 751 this.options.embedType = this.embedType; 752 new Calendly.Iframe(this.options); 753 return node; 754 }; 755 756 PopupWidget.prototype.buildCloseButton = function() { 757 var node; 758 node = document.createElement('div'); 759 node.className = 'calendly-popup-close'; 760 node.onclick = this.close; 761 return node; 762 }; 763 764 PopupWidget.prototype.destroyOverlay = function() { 765 return this.overlay.parentNode.removeChild(this.overlay); 766 }; 767 768 PopupWidget.prototype.lockPageScroll = function() { 769 bodyScrollLock.disableBodyScroll(this.overlay); 770 return document.addEventListener('touchmove', this.handleLockedTouchmove, { 771 passive: false 772 }); 773 }; 774 775 PopupWidget.prototype.unlockPageScroll = function() { 776 bodyScrollLock.enableBodyScroll(this.overlay); 777 return document.removeEventListener('touchmove', this.handleLockedTouchmove, { 778 passive: false 779 }); 780 }; 781 782 PopupWidget.prototype.handleLockedTouchmove = function(event) { 783 return event.preventDefault(); 784 }; 785 786 return PopupWidget; 787 788 })(); 789 790}).call(this); 791(function() { 792 Calendly.BadgeWidget = (function() { 793 function BadgeWidget(options) { 794 this.options = options; 795 this.buildWidget(); 796 this.insertWidget(); 797 } 798 799 BadgeWidget.prototype.destroy = function() { 800 return this.widget.parentNode.removeChild(this.widget); 801 }; 802 803 BadgeWidget.prototype.buildWidget = function() { 804 this.widget = document.createElement('div'); 805 this.widget.className = 'calendly-badge-widget'; 806 return this.widget.appendChild(this.buildContent()); 807 }; 808 809 BadgeWidget.prototype.insertWidget = function() { 810 return document.body.insertBefore(this.widget, document.body.firstChild); 811 }; 812 813 BadgeWidget.prototype.buildContent = function() { 814 var element; 815 element = document.createElement('div'); 816 element.className = 'calendly-badge-content'; 817 if (this.options.color === '#ffffff') { 818 element.className += ' calendly-white'; 819 } 820 element.onclick = this.options.onClick; 821 element.innerHTML = this.options.text; 822 element.style.background = this.options.color; 823 element.style.color = this.options.textColor; 824 if (this.options.branding) { 825 element.appendChild(this.buildBranding()); 826 } 827 return element; 828 }; 829 830 BadgeWidget.prototype.buildBranding = function() { 831 var element; 832 element = document.createElement('span'); 833 element.innerHTML = 'powered by Calendly'; 834 return element; 835 }; 836 837 return BadgeWidget; 838 839 })(); 840 841}).call(this); 842 843 844 845 846 847 848 849Calendly._autoLoadInlineWidgets() 850; 851 852}
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.