From 252eebc5f2f395e12cb83b5e0a84b5d2f7745cdb Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Fri, 2 Aug 2019 23:03:04 +0530 Subject: [PATCH] Fix lint errors on home. --- accounts/package.json | 1 + home/package.json | 1 + home/public/js/animate.js | 22 ++-- home/public/js/crm.js | 38 +++--- home/public/js/default.js | 246 +++++++++++++++++------------------ home/public/js/demo.js | 2 +- home/public/js/resources.js | 2 +- home/public/js/stickyfill.js | 2 +- home/public/js/switch.js | 4 +- home/public/js/switchUrl.js | 8 +- home/server.js | 12 +- 11 files changed, 170 insertions(+), 168 deletions(-) diff --git a/accounts/package.json b/accounts/package.json index 57c5b21f3c..07d5e7d52e 100755 --- a/accounts/package.json +++ b/accounts/package.json @@ -65,6 +65,7 @@ }, "scripts": { "lint": "eslint .", + "fix-lint": "eslint . --fix", "dev": "export PORT=3003 && react-scripts start", "build": "react-scripts build", "test": "npm run lint", diff --git a/home/package.json b/home/package.json index 0dad13fafb..12c89427ae 100755 --- a/home/package.json +++ b/home/package.json @@ -5,6 +5,7 @@ "start": "node server.js", "test": "echo 'no tests'", "lint": "eslint .", + "fix-lint": "eslint . --fix", "lighthouse-test": "jest lighthouse-tests/test/index.test.js --env=node --detectOpenHandles", "lighthouse": "start-server-and-test http://localhost:1444", "smoketest": "jest smoketest/index.test.js --env=node --detectOpenHandles", diff --git a/home/public/js/animate.js b/home/public/js/animate.js index 37583af3f9..296f12502e 100755 --- a/home/public/js/animate.js +++ b/home/public/js/animate.js @@ -6,14 +6,14 @@ c)))*Math.PI/e)+c+b},easeOutBack:function(a,b,c,d){return c*((a=a/d-1)*a*(2.7015 (a/=d/2)?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},easeInOutQuint:function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},easeInOutSine:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},easeInOutExpo:function(a,b,c,d){return 0==a?b:a==d?b+c:1>(a/=d/2)?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},easeInOutCirc:function(a,b,c,d){return 1>(a/=d/2)?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInOutElastic:function(a,b,c,d){var e=4>=arguments.length|| void 0===arguments[4]?500:arguments[4];if(0==a)return b;if(2==(a/=d/2))return b+c;var e=d*(1-Math.min(e,999)/1E3)*1.5,f=ca?-.5*c*Math.pow(2,10*--a)*Math.sin(2*(a*d-f)*Math.PI/e)+b:c*Math.pow(2,-10*--a)*Math.sin(2*(a*d-f)*Math.PI/e)*.5+c+b},easeInOutBack:function(a,b,c,d){var e=1.70158;return 1>(a/=d/2)?c/2*a*a*(((e*=1.525)+1)*a-e)+b:c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b}},w=function(a){return a[0]},F=function(a){return a.reduce(function(a,c){return a.concat(c)})}, m=function(){return Array.prototype.includes?function(a,b){return a.includes(b)}:function(a,b){return a.some(function(a){return a===b})}}(),x=function(a){for(var b=arguments.length,c=Array(1a.length?a.split("").reduce(function(a,b){return a+b+b}):a},b=function(a){return a.match(/[\d\w]{2}/g).map(function(a){return parseInt(a,16)})};return function(c){if(y(c))return c;c=p(a,b)(c);return"rgb("+c[0]+", "+c[1]+", "+c[2]+")"}}(),z=function(a){return J("string"==typeof a?document.querySelectorAll(a):a)},J=function(){var a=[NodeList,HTMLCollection,Set];return function(b){return Array.isArray(b)?b:a.some(function(a){return b instanceof a})?Array.from(b): -b.nodeType?[b]:b.get()}}(),l=new Map;"el delay begin complete loop direction".split(" ").forEach(function(a){return l.set(a,null)});l.set("duration",1E3);l.set("easing","easeOutElastic");var K=function(){var a=Array.from(l.keys()).filter(function(a){return l.get(a)}),b=function(b){return a.every(function(a){return b.has(a)})},c=function(b){var c=new Map(b);a.forEach(function(a){c.has(a)||c.set(a,l.get(a))});return c};return function(a){return b(a)?a:c(a)}}(),L=function(){var a=h(function(a,b){return Array.isArray(a.get(b))}), -b=function(b){return n(b).every(a(b))},c=function(b){return n(b).filter(q(a(b)))};return function(a){if(b(a))return a;var e=new Map(a);c(e).forEach(function(a){return e.set(a,[A.get(a),e.get(a)])});return e}}(),M=function(){var a=function(a){return/\D$/.test(a)},b=h(function(b,c){return a(c)||/scale/.test(b)?c:/rotate|skew/.test(b)?c+"deg":c+"px"}),c=function(b,c){return c.every(function(c){return b.get(c).every(a)})};return function(a){var e=n(a).filter(r);if(c(a,e))return a;var f=new Map(a);e.forEach(function(c){return f.set(c, -a.get(c).map(b(c)))});return f}}(),N=function(){var a=h(function(a,b){return a.get(b).some(H)}),b=function(b){return!B(b).some(a(b))},c=function(b){return B(b).filter(a(b))};return function(a){if(b(a))return a;var e=new Map(a);c(a).forEach(function(a){return e.set(a,e.get(a).map(I))});return e}}(),C=function(a){var b=new Map(a);t(a).forEach(function(a){return b.set(a,b.get(a).slice().reverse())});return b},O=p(G,K,L,M,N,function(a){return(new Map(a)).set("el",z(a.get("el")))},function(a){return"reverse"== -a.get("direction")?C(a):a}),t=function(){var a=Array.from(l.keys()),b=function(b){return q(m)(a,b)};return function(a){return Array.from(a.keys()).filter(b)}}(),Q=function(){var a=p(w,y),b=h(function(b,d){var e=b.get(d).map(P),f=e[0],g=e[1],e=new Map;e.set("prop",d);e.set("from",f);e.set("to",g);e.set("isTransformFunction",r(d));e.set("isColor",a(b.get(d)));/\d$/.test(b.get("easing"))?(f=b.get("easing").split(" "),g=f[1],e.set("easing",f[0]),e.set("frequency",g)):e.set("easing",b.get("easing"));return e}); -return function(a,d){return t(a).map(b(a))}}(),n=function(){var a=function(a){return m(u,a)};return function(b){return Array.from(b.keys()).filter(a)}}(),B=function(a){return x(t(a),n(a))},u="opacity translateX translateY scale rotate scaleX scaleY rotateX rotateY perspective skewX skewY translateZ rotateZ scaleZ".split(" "),A=new Map;(function(){var a=["opacity","scale","scaleX","scaleY"];u.forEach(function(b){return A.set(b,m(a,b)?1:0)})})();var r=function(){var a=u.filter(function(a){return"opacity"!= -a});return function(b){return m(a,b)}}(),R=function(a){var b=n(a);if(b.length){var c=[];b.some(r)&&c.push("transform");m(b,"opacity")&&c.push("opacity");var d=c.join();a.get("el").forEach(function(a){a.style.willChange||(a.style.willChange=d)})}},S=function(a,b){return b.reduce(function(b,d,e){return b+a[e-1]+d})},P=function(){var a=/-?\d*\.?\d+/g;return function(b){var c=new Map;c.set("digits",("string"==typeof b?b:String(b)).match(a).map(Number));c.set("others",("string"==typeof b?b:String(b)).split(a)); -return c}}(),T=h(function(a,b,c){var d=c.get("to").get("digits").map(function(d,f){var g=c.get("from").get("digits")[f];if(g==d)return g;var D=d-g,g=E[c.get("easing")](b,g,D,a.get("duration"),c.get("frequency"));return c.get("isColor")?Math.round(g):g});return S(d,c.get("to").get("others"))}),U=h(function(a,b){var c=a.get(b.get("prop"));return w(c.slice(-1))}),V=h(function(a,b,c){var d=void 0;a.forEach(function(a,f){a.get("isTransformFunction")?(d||(d=[]),d.push(a.get("prop")+"("+b[f]+")")):"opacity"== -a.get("prop")?c.style.opacity=b[f]:c.setAttribute(a.get("prop"),b[f])});d&&(c.style.transform=d.join(" "))}),W=function(){var a=function(a,c){c.get("begin")&&c.get("begin")(c.get("el"));requestAnimationFrame(a)};return function(b,c){return c.get("delay")?setTimeout(function(){return a(b,c)},c.get("delay")):a(b,c)}}(),X=function(a){return v(function(){if("alternate"==a.get("direction"))return C(a);if("reverse"==a.get("direction")){var b=new Map(a);b["delete"]("direction");return b}return a}())},k= -new Map,Y=function(){var a=0;return function(b){var c=a++;k=(new Map(k)).set(c,b);return c}}(),v=function(a){var b=O(a),c=Q(b),d=Y(b.get("el")),e=new Map;R(b);W(function g(a){if(k.has(d)){e.has("start")||e.set("start",a);e.set("elapsed",a-e.get("start"));a=e.get("elapsed")a.length?a.split('').reduce(function(a,b){return a+b+b}):a},b=function(a){return a.match(/[\d\w]{2}/g).map(function(a){return parseInt(a,16)})};return function(c){if(y(c))return c;c=p(a,b)(c);return'rgb('+c[0]+', '+c[1]+', '+c[2]+')'}}(),z=function(a){return J('string'==typeof a?document.querySelectorAll(a):a)},J=function(){var a=[NodeList,HTMLCollection,Set];return function(b){return Array.isArray(b)?b:a.some(function(a){return b instanceof a})?Array.from(b): +b.nodeType?[b]:b.get()}}(),l=new Map;'el delay begin complete loop direction'.split(' ').forEach(function(a){return l.set(a,null)});l.set('duration',1E3);l.set('easing','easeOutElastic');var K=function(){var a=Array.from(l.keys()).filter(function(a){return l.get(a)}),b=function(b){return a.every(function(a){return b.has(a)})},c=function(b){var c=new Map(b);a.forEach(function(a){c.has(a)||c.set(a,l.get(a))});return c};return function(a){return b(a)?a:c(a)}}(),L=function(){var a=h(function(a,b){return Array.isArray(a.get(b))}), +b=function(b){return n(b).every(a(b))},c=function(b){return n(b).filter(q(a(b)))};return function(a){if(b(a))return a;var e=new Map(a);c(e).forEach(function(a){return e.set(a,[A.get(a),e.get(a)])});return e}}(),M=function(){var a=function(a){return/\D$/.test(a)},b=h(function(b,c){return a(c)||/scale/.test(b)?c:/rotate|skew/.test(b)?c+'deg':c+'px'}),c=function(b,c){return c.every(function(c){return b.get(c).every(a)})};return function(a){var e=n(a).filter(r);if(c(a,e))return a;var f=new Map(a);e.forEach(function(c){return f.set(c, +a.get(c).map(b(c)))});return f}}(),N=function(){var a=h(function(a,b){return a.get(b).some(H)}),b=function(b){return!B(b).some(a(b))},c=function(b){return B(b).filter(a(b))};return function(a){if(b(a))return a;var e=new Map(a);c(a).forEach(function(a){return e.set(a,e.get(a).map(I))});return e}}(),C=function(a){var b=new Map(a);t(a).forEach(function(a){return b.set(a,b.get(a).slice().reverse())});return b},O=p(G,K,L,M,N,function(a){return(new Map(a)).set('el',z(a.get('el')))},function(a){return'reverse'== +a.get('direction')?C(a):a}),t=function(){var a=Array.from(l.keys()),b=function(b){return q(m)(a,b)};return function(a){return Array.from(a.keys()).filter(b)}}(),Q=function(){var a=p(w,y),b=h(function(b,d){var e=b.get(d).map(P),f=e[0],g=e[1],e=new Map;e.set('prop',d);e.set('from',f);e.set('to',g);e.set('isTransformFunction',r(d));e.set('isColor',a(b.get(d)));/\d$/.test(b.get('easing'))?(f=b.get('easing').split(' '),g=f[1],e.set('easing',f[0]),e.set('frequency',g)):e.set('easing',b.get('easing'));return e}); +return function(a,d){return t(a).map(b(a))}}(),n=function(){var a=function(a){return m(u,a)};return function(b){return Array.from(b.keys()).filter(a)}}(),B=function(a){return x(t(a),n(a))},u='opacity translateX translateY scale rotate scaleX scaleY rotateX rotateY perspective skewX skewY translateZ rotateZ scaleZ'.split(' '),A=new Map;(function(){var a=['opacity','scale','scaleX','scaleY'];u.forEach(function(b){return A.set(b,m(a,b)?1:0)})})();var r=function(){var a=u.filter(function(a){return'opacity'!= +a});return function(b){return m(a,b)}}(),R=function(a){var b=n(a);if(b.length){var c=[];b.some(r)&&c.push('transform');m(b,'opacity')&&c.push('opacity');var d=c.join();a.get('el').forEach(function(a){a.style.willChange||(a.style.willChange=d)})}},S=function(a,b){return b.reduce(function(b,d,e){return b+a[e-1]+d})},P=function(){var a=/-?\d*\.?\d+/g;return function(b){var c=new Map;c.set('digits',('string'==typeof b?b:String(b)).match(a).map(Number));c.set('others',('string'==typeof b?b:String(b)).split(a)); +return c}}(),T=h(function(a,b,c){var d=c.get('to').get('digits').map(function(d,f){var g=c.get('from').get('digits')[f];if(g==d)return g;var D=d-g,g=E[c.get('easing')](b,g,D,a.get('duration'),c.get('frequency'));return c.get('isColor')?Math.round(g):g});return S(d,c.get('to').get('others'))}),U=h(function(a,b){var c=a.get(b.get('prop'));return w(c.slice(-1))}),V=h(function(a,b,c){var d=void 0;a.forEach(function(a,f){a.get('isTransformFunction')?(d||(d=[]),d.push(a.get('prop')+'('+b[f]+')')):'opacity'== +a.get('prop')?c.style.opacity=b[f]:c.setAttribute(a.get('prop'),b[f])});d&&(c.style.transform=d.join(' '))}),W=function(){var a=function(a,c){c.get('begin')&&c.get('begin')(c.get('el'));requestAnimationFrame(a)};return function(b,c){return c.get('delay')?setTimeout(function(){return a(b,c)},c.get('delay')):a(b,c)}}(),X=function(a){return v(function(){if('alternate'==a.get('direction'))return C(a);if('reverse'==a.get('direction')){var b=new Map(a);b['delete']('direction');return b}return a}())},k= +new Map,Y=function(){var a=0;return function(b){var c=a++;k=(new Map(k)).set(c,b);return c}}(),v=function(a){var b=O(a),c=Q(b),d=Y(b.get('el')),e=new Map;R(b);W(function g(a){if(k.has(d)){e.has('start')||e.set('start',a);e.set('elapsed',a-e.get('start'));a=e.get('elapsed') document.getElementById(tabName + '1').parentNode.click(), 200); -}; +} function openTooltip(name) { // Declare all variables @@ -27,32 +27,32 @@ function openTooltip(name) { element = document.getElementById(name); elclass = element.className; - tooltip = document.getElementsByClassName("tooltiptext"); + tooltip = document.getElementsByClassName('tooltiptext'); for (i = 0; i < tooltip.length; i++) { - tooltip[i].className = tooltip[i].className.replace(" active", ""); + tooltip[i].className = tooltip[i].className.replace(' active', ''); } - if (elclass.indexOf("active") > -1) { - element.className = element.className.replace(" active", ""); + if (elclass.indexOf('active') > -1) { + element.className = element.className.replace(' active', ''); } else { - element.classList.add("active"); + element.classList.add('active'); } } window.onload = function () { animateHTML().init(); - var tooltext = document.getElementsByClassName("tooltiptext"); + var tooltext = document.getElementsByClassName('tooltiptext'); for (var i = 0; i < tooltext.length; i++) { tooltext[i].onclick = function (e) { e.stopPropagation(); } } - document.getElementsByTagName("body")[0].onclick = function (e) { - if (e.target.className !== "popover-dot" && e.target.className !== "tooltiptext" && e.target.className !== "tablinks active") { - var tooltip = document.getElementsByClassName("tooltiptext"); + document.getElementsByTagName('body')[0].onclick = function (e) { + if (e.target.className !== 'popover-dot' && e.target.className !== 'tooltiptext' && e.target.className !== 'tablinks active') { + var tooltip = document.getElementsByClassName('tooltiptext'); for (i = 0; i < tooltip.length; i++) { - tooltip[i].className = tooltip[i].className.replace(" active", ""); + tooltip[i].className = tooltip[i].className.replace(' active', ''); } } } @@ -61,7 +61,7 @@ window.onload = function () { var animateHTML = function () { var elem, windowHeight; var init = function () { - elem = document.getElementById("Statuspage"); + elem = document.getElementById('Statuspage'); windowHeight = window.innerHeight; _addEventHandlers(); } @@ -73,7 +73,7 @@ var animateHTML = function () { var posFromTop = elem.getBoundingClientRect().top; if (posFromTop - windowHeight <= -400) { - document.getElementById("Statuspage1").parentNode.click(); + document.getElementById('Statuspage1').parentNode.click(); window.removeEventListener('scroll', _checkPosition); window.removeEventListener('resize', init); return; diff --git a/home/public/js/default.js b/home/public/js/default.js index 886e2d460a..5d15b6c938 100755 --- a/home/public/js/default.js +++ b/home/public/js/default.js @@ -1,6 +1,6 @@ function readConfig(t) { function n(t) { - return String(t).replace(/"/g, '"').replace(/'/g, "'").replace(///g, "index.html").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&") + return String(t).replace(/"/g, '"').replace(/'/g, '\'').replace(///g, 'index.html').replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&') } var e = /^[\],:{}\s]*$/, i = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, @@ -8,42 +8,42 @@ function readConfig(t) { r = /(?:^|:|,)(?:\s*\[)+/g, a = document.getElementById(t); if (!a) return null; - var s = n((a.textContent || a.innerHTML).replace(/^\s+|\s+$/gm, "")); - return e.test(s.replace(i, "@").replace(o, "]").replace(r, "")) ? window.JSON && window.JSON.parse ? window.JSON.parse(s) : new Function("return " + s)() : void 0 + var s = n((a.textContent || a.innerHTML).replace(/^\s+|\s+$/gm, '')); + return e.test(s.replace(i, '@').replace(o, ']').replace(r, '')) ? window.JSON && window.JSON.parse ? window.JSON.parse(s) : new Function('return ' + s)() : void 0 } function globalNavDropdowns(t) { var n = this; - this.container = document.querySelector(t), this.root = this.container.querySelector(".navRoot"), this.primaryNav = this.root.querySelector(".navSection.primary"), this.primaryNavItem = this.root.querySelector(".navSection.primary .rootLink:last-child"), this.secondaryNavItem = this.root.querySelector(".navSection.secondary .rootLink:first-child"), this.checkCollision(), window.addEventListener("load", this.checkCollision.bind(this)), window.addEventListener("resize", this.checkCollision.bind(this)), this.container.classList.add("noDropdownTransition"), this.dropdownBackground = this.container.querySelector(".dropdownBackground"), this.dropdownBackgroundAlt = this.container.querySelector(".alternateBackground"), this.dropdownContainer = this.container.querySelector(".dropdownContainer"), this.dropdownArrow = this.container.querySelector(".dropdownArrow"), this.dropdownRoots = Strut.queryArray(".hasDropdown", this.root), this.dropdownSections = Strut.queryArray(".dropdownSection", this.container).map(function(t) { + this.container = document.querySelector(t), this.root = this.container.querySelector('.navRoot'), this.primaryNav = this.root.querySelector('.navSection.primary'), this.primaryNavItem = this.root.querySelector('.navSection.primary .rootLink:last-child'), this.secondaryNavItem = this.root.querySelector('.navSection.secondary .rootLink:first-child'), this.checkCollision(), window.addEventListener('load', this.checkCollision.bind(this)), window.addEventListener('resize', this.checkCollision.bind(this)), this.container.classList.add('noDropdownTransition'), this.dropdownBackground = this.container.querySelector('.dropdownBackground'), this.dropdownBackgroundAlt = this.container.querySelector('.alternateBackground'), this.dropdownContainer = this.container.querySelector('.dropdownContainer'), this.dropdownArrow = this.container.querySelector('.dropdownArrow'), this.dropdownRoots = Strut.queryArray('.hasDropdown', this.root), this.dropdownSections = Strut.queryArray('.dropdownSection', this.container).map(function(t) { return { el: t, - name: t.getAttribute("data-dropdown"), - content: t.querySelector(".dropdownContent") + name: t.getAttribute('data-dropdown'), + content: t.querySelector('.dropdownContent') } }); var e = window.PointerEvent ? { - end: "pointerup", - enter: "pointerenter", - leave: "pointerleave" + end: 'pointerup', + enter: 'pointerenter', + leave: 'pointerleave' } : { - end: "touchend", - enter: "mouseenter", - leave: "mouseleave" + end: 'touchend', + enter: 'mouseenter', + leave: 'mouseleave' }; this.dropdownRoots.forEach(function(t) { t.addEventListener(e.end, function(e) { e.preventDefault(), e.stopPropagation(), n.toggleDropdown(t) }), t.addEventListener(e.enter, function(e) { - "touch" != e.pointerType && (n.stopCloseTimeout(), n.openDropdown(t)) + 'touch' != e.pointerType && (n.stopCloseTimeout(), n.openDropdown(t)) }), t.addEventListener(e.leave, function(t) { - "touch" != t.pointerType && n.startCloseTimeout() + 'touch' != t.pointerType && n.startCloseTimeout() }) }), this.dropdownContainer.addEventListener(e.end, function(t) { t.stopPropagation() }), this.dropdownContainer.addEventListener(e.enter, function(t) { - "touch" != t.pointerType && n.stopCloseTimeout() + 'touch' != t.pointerType && n.stopCloseTimeout() }), this.dropdownContainer.addEventListener(e.leave, function(t) { - "touch" != t.pointerType && n.startCloseTimeout() + 'touch' != t.pointerType && n.startCloseTimeout() }), document.body.addEventListener(e.end, function() { Strut.touch.isDragging || n.closeDropdown() }) @@ -51,18 +51,18 @@ function globalNavDropdowns(t) { function globalNavPopup(t) { var n = this, - e = Strut.touch.isSupported ? "touchend" : "click"; - this.activeClass = "globalPopupActive", this.root = document.querySelector(t), this.link = this.root.querySelector(".rootLink"), this.popup = this.root.querySelector(".popup"), this.closeButton = this.root.querySelector(".popupCloseButton"), this.link.addEventListener(e, function(t) { + e = Strut.touch.isSupported ? 'touchend' : 'click'; + this.activeClass = 'globalPopupActive', this.root = document.querySelector(t), this.link = this.root.querySelector('.rootLink'), this.popup = this.root.querySelector('.popup'), this.closeButton = this.root.querySelector('.popupCloseButton'), this.link.addEventListener(e, function(t) { t.stopPropagation(), n.togglePopup() }), this.popup.addEventListener(e, function(t) { t.stopPropagation() - }), this.popup.addEventListener("transitionend", function() { + }), this.popup.addEventListener('transitionend', function() { if (n.isOpening) { n.isOpening = !1; var t = n.popup.getBoundingClientRect().top + window.scrollY; if (t < 15) { var e = 15 - t; - n.popup.style.transform = "translateY(" + e + "px)" + n.popup.style.transform = 'translateY(' + e + 'px)' } } }), this.closeButton && this.closeButton.addEventListener(e, function() { @@ -76,30 +76,30 @@ function globalNavPopup(t) { } function n() { - o.classList.add("dismissed") + o.classList.add('dismissed') } function e() { var t = new Date, - n = a + "=ack"; - t.setYear(t.getFullYear() + 10), n += ";expires=" + t.toGMTString(), n += ";domain=" + document.domain, document.cookie = n + n = a + '=ack'; + t.setYear(t.getFullYear() + 10), n += ';expires=' + t.toGMTString(), n += ';domain=' + document.domain, document.cookie = n } function i() { - o = document.querySelector('[rel="cookie-notification"]'), (r = document.querySelector('[rel="dismiss-cookie-notification"]')) && r.addEventListener("click", t) + o = document.querySelector('[rel="cookie-notification"]'), (r = document.querySelector('[rel="dismiss-cookie-notification"]')) && r.addEventListener('click', t) } - var o, r, a = "cookie_banner_ack"; - document.addEventListener("DOMContentLoaded", i) + var o, r, a = 'cookie_banner_ack'; + document.addEventListener('DOMContentLoaded', i) }(), function() { window.$ && window.$.ajaxPrefilter && $(function() { var t; return t = function() { var t, n; - return t = $("form input[name=csrf-token]"), t.length > 0 ? t.attr("value") : (n = $("meta[name=csrf-token]"), n.length > 0 ? n.attr("content") : "") + return t = $('form input[name=csrf-token]'), t.length > 0 ? t.attr('value') : (n = $('meta[name=csrf-token]'), n.length > 0 ? n.attr('content') : '') }, $.ajaxPrefilter(function(n, e, i) { var o; - return o = t(), i.setRequestHeader("x-fyipe-csrf-token", o) + return o = t(), i.setRequestHeader('x-fyipe-csrf-token', o) }) }) }.call(this); @@ -123,23 +123,23 @@ var Strut = { return n || (n = document.body), Array.prototype.slice.call(n.querySelectorAll(t)) }, ready: function(t) { - "loading" !== document.readyState ? t() : document.addEventListener("DOMContentLoaded", t) + 'loading' !== document.readyState ? t() : document.addEventListener('DOMContentLoaded', t) } }; -Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, Strut.isMobileViewport = window.innerWidth < Strut.mobileViewportWidth, window.addEventListener("resize", function() { +Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, Strut.isMobileViewport = window.innerWidth < Strut.mobileViewportWidth, window.addEventListener('resize', function() { Strut.isMobileViewport = window.innerWidth < Strut.mobileViewportWidth }), Strut.touch = { - isSupported: "ontouchstart" in window || navigator.maxTouchPoints, + isSupported: 'ontouchstart' in window || navigator.maxTouchPoints, isDragging: !1 - }, document.addEventListener("DOMContentLoaded", function() { - document.body.addEventListener("touchmove", function() { + }, document.addEventListener('DOMContentLoaded', function() { + document.body.addEventListener('touchmove', function() { Strut.touch.isDragging = !0 - }), document.body.addEventListener("touchstart", function() { + }), document.body.addEventListener('touchstart', function() { Strut.touch.isDragging = !1 }) }), Strut.load = { images: function(t, n) { - "string" == typeof t && (t = [t]); + 'string' == typeof t && (t = [t]); var e = -t.length; t.forEach(function(t) { var i = new Image; @@ -149,15 +149,15 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, }) }, css: function(t, n) { - var e = document.createElement("link"), - i = window.readConfig("strut_files") || {}, + var e = document.createElement('link'), + i = window.readConfig('strut_files') || {}, o = i[t]; if (!o) throw new Error('CSS file "' + t + '" not found in strut_files config'); - e.href = o, e.rel = "stylesheet", document.head.appendChild(e), n && (e.onload = n) + e.href = o, e.rel = 'stylesheet', document.head.appendChild(e), n && (e.onload = n) }, js: function(t, n) { - var e = document.createElement("script"), - i = window.readConfig("strut_files") || {}, + var e = document.createElement('script'), + i = window.readConfig('strut_files') || {}, o = i[t]; if (!o) throw new Error('Javascript file "' + t + '" not found in strut_files config'); e.src = o, e.async = !1, document.head.appendChild(e), n && (e.onload = n) @@ -165,16 +165,16 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, }, Strut.supports = { es6: function() { try { - return new Function("(a = 0) => a"), !0 + return new Function('(a = 0) => a'), !0 } catch (t) { return !1 } }(), pointerEvents: function() { - var t = document.createElement("a").style; - return t.cssText = "pointer-events:auto", "auto" === t.pointerEvents + var t = document.createElement('a').style; + return t.cssText = 'pointer-events:auto', 'auto' === t.pointerEvents }(), - positionSticky: Boolean(window.CSS && CSS.supports("(position: -webkit-sticky) or (position: sticky)")), + positionSticky: Boolean(window.CSS && CSS.supports('(position: -webkit-sticky) or (position: sticky)')), masks: function() { return !/MSIE|Trident|Edge/i.test(navigator.userAgent) }() @@ -184,22 +184,22 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, if (1 == t.compact) { var n = document.body.clientWidth, e = t.primaryNav.getBoundingClientRect(); - e.left + e.width / 2 > n / 2 && (t.container.classList.remove("compact"), t.compact = !1) + e.left + e.width / 2 > n / 2 && (t.container.classList.remove('compact'), t.compact = !1) } else { var i = t.primaryNavItem.getBoundingClientRect(), o = t.secondaryNavItem.getBoundingClientRect(); - i.right > o.left && (t.container.classList.add("compact"), t.compact = !0) + i.right > o.left && (t.container.classList.add('compact'), t.compact = !0) } }, globalNavDropdowns.prototype.openDropdown = function(t) { var n = this; if (this.activeDropdown !== t) { - this.container.classList.add("overlayActive"), this.container.classList.add("dropdownActive"), this.activeDropdown = t, this.dropdownRoots.forEach(function(t) { - t.classList.remove("active") - }), t.classList.add("active"); - var e, i, o, r = t.getAttribute("data-dropdown"), - a = "left"; + this.container.classList.add('overlayActive'), this.container.classList.add('dropdownActive'), this.activeDropdown = t, this.dropdownRoots.forEach(function(t) { + t.classList.remove('active') + }), t.classList.add('active'); + var e, i, o, r = t.getAttribute('data-dropdown'), + a = 'left'; this.dropdownSections.forEach(function(t) { - t.el.classList.remove("active"), t.el.classList.remove("left"), t.el.classList.remove("right"), t.name == r ? (t.el.classList.add("active"), a = "right", e = t.content.offsetWidth, i = t.content.offsetHeight, t.content.getAttribute("data-fixed") ? t.content.setAttribute("data-fixed", !0) : (t.content.style.width = e + "px", t.content.style.height = i + "px"), o = t.content) : t.el.classList.add(a) + t.el.classList.remove('active'), t.el.classList.remove('left'), t.el.classList.remove('right'), t.name == r ? (t.el.classList.add('active'), a = 'right', e = t.content.offsetWidth, i = t.content.offsetHeight, t.content.getAttribute('data-fixed') ? t.content.setAttribute('data-fixed', !0) : (t.content.style.width = e + 'px', t.content.style.height = i + 'px'), o = t.content) : t.el.classList.add(a) }); var s = 380, c = 400, @@ -208,20 +208,20 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, u = t.getBoundingClientRect(), p = u.left + u.width / 2 - e / 2; p = Math.round(Math.max(p, 10)), clearTimeout(this.disableTransitionTimeout), this.enableTransitionTimeout = setTimeout(function() { - n.container.classList.remove("noDropdownTransition") - }, 50), this.dropdownBackground.style.transform = "translateX(" + p + "px) scaleX(" + d + ") scaleY(" + l + ")", this.dropdownContainer.style.transform = "translateX(" + p + "px)", this.dropdownContainer.style.width = e + "px", this.dropdownContainer.style.height = i + "px"; + n.container.classList.remove('noDropdownTransition') + }, 50), this.dropdownBackground.style.transform = 'translateX(' + p + 'px) scaleX(' + d + ') scaleY(' + l + ')', this.dropdownContainer.style.transform = 'translateX(' + p + 'px)', this.dropdownContainer.style.width = e + 'px', this.dropdownContainer.style.height = i + 'px'; var w = Math.round(u.left + u.width / 2); - this.dropdownArrow.style.transform = "translateX(" + w + "px) rotate(45deg)"; + this.dropdownArrow.style.transform = 'translateX(' + w + 'px) rotate(45deg)'; var f = o.children[0].offsetHeight / l; - this.dropdownBackgroundAlt.style.transform = "translateY(" + f + "px)", window.siteAnalytics && window.siteAnalytics.trackGlobalNavDropdownOpen && window.siteAnalytics.trackGlobalNavDropdownOpen(r) + this.dropdownBackgroundAlt.style.transform = 'translateY(' + f + 'px)', window.siteAnalytics && window.siteAnalytics.trackGlobalNavDropdownOpen && window.siteAnalytics.trackGlobalNavDropdownOpen(r) } }, globalNavDropdowns.prototype.closeDropdown = function() { var t = this; this.activeDropdown && (this.dropdownRoots.forEach(function(t) { - t.classList.remove("active") + t.classList.remove('active') }), clearTimeout(this.enableTransitionTimeout), this.disableTransitionTimeout = setTimeout(function() { - t.container.classList.add("noDropdownTransition") - }, 50), this.container.classList.remove("overlayActive"), this.container.classList.remove("dropdownActive"), this.activeDropdown = undefined) + t.container.classList.add('noDropdownTransition') + }, 50), this.container.classList.remove('overlayActive'), this.container.classList.remove('dropdownActive'), this.activeDropdown = undefined) }, globalNavDropdowns.prototype.toggleDropdown = function(t) { this.activeDropdown === t ? this.closeDropdown() : this.openDropdown(t) }, globalNavDropdowns.prototype.startCloseTimeout = function() { @@ -236,12 +236,12 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, var t = this.root.classList.contains(this.activeClass); this.closeAllPopups(!0), t || (this.root.classList.add(this.activeClass), this.isOpening = !0) }, globalNavPopup.prototype.closeAllPopups = function() { - for (var t = document.getElementsByClassName(this.activeClass), n = 0; n < t.length; n++) t[n].querySelector(".popup").style.transform = null, t[n].classList.remove(this.activeClass) - }, Strut.supports.pointerEvents || Strut.load.css("v3/shared/navigation_ie10.html"), Strut.ready(function() { - new globalNavDropdowns(".globalNav"), new globalNavPopup(".globalNav .navSection.mobile"), new globalNavPopup(".globalFooterNav .select.country"), new globalNavPopup(".globalFooterNav .select.language") + for (var t = document.getElementsByClassName(this.activeClass), n = 0; n < t.length; n++) t[n].querySelector('.popup').style.transform = null, t[n].classList.remove(this.activeClass) + }, Strut.supports.pointerEvents || Strut.load.css('v3/shared/navigation_ie10.html'), Strut.ready(function() { + new globalNavDropdowns('.globalNav'), new globalNavPopup('.globalNav .navSection.mobile'), new globalNavPopup('.globalFooterNav .select.country'), new globalNavPopup('.globalFooterNav .select.language') }), function() { - "use strict"; + 'use strict'; function t() { var t = [].slice.call(arguments); @@ -250,7 +250,7 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, function n() { var t = {}, - n = document.getElementById("site-analytics-config"); + n = document.getElementById('site-analytics-config'); return n && (t = JSON.parse(n.textContent)), t } @@ -267,19 +267,19 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, } function r(t, n) { - d("action", t, n) + d('action', t, n) } function a(t, n) { - d("actionOnce", t, n) + d('actionOnce', t, n) } function s(t, n) { - d("modal", t, n) + d('modal', t, n) } function c(t, n) { - d("viewed", t, n) + d('viewed', t, n) } function d(t, n, e) { @@ -289,19 +289,19 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, function l(n, e, i) { u(); var o = f(i); - window.Analytics[n](e, o), t("emit", n, e, o) + window.Analytics[n](e, o), t('emit', n, e, o) } function u() { - A || (window.Analytics.configure(e()), A = !0, t("Sent config data")) + A || (window.Analytics.configure(e()), A = !0, t('Sent config data')) } function p(n, e, i) { - S.push([n, e, i]), g(), t("enqueue", n, e, i) + S.push([n, e, i]), g(), t('enqueue', n, e, i) } function w() { - t("Flushing event queue"), u(), S.forEach(function(t) { + t('Flushing event queue'), u(), S.forEach(function(t) { l.apply(this, t) }) } @@ -318,7 +318,7 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, } function m() { - v = null, window.Analytics ? (w(), L = E) : (g(), t("Ready timer waiting " + L + "ms")) + v = null, window.Analytics ? (w(), L = E) : (g(), t('Ready timer waiting ' + L + 'ms')) } function y(t) { @@ -330,7 +330,7 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, } window.siteAnalytics = window.siteAnalytics || {}, window.siteAnalyticsUtil = window.siteAnalyticsUtil || {}; var v, A = !1, - b = "SITE_ANALYTICS_DEBUG", + b = 'SITE_ANALYTICS_DEBUG', S = [], E = 250, L = E, @@ -347,7 +347,7 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, } function n(t) { - return t.getAttribute(r) || t.getAttribute(s) ? t : t.parentNode && "BODY" !== t.tagName ? n(t.parentNode) : null + return t.getAttribute(r) || t.getAttribute(s) ? t : t.parentNode && 'BODY' !== t.tagName ? n(t.parentNode) : null } function e(t) { @@ -362,10 +362,10 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, function o() { window.siteAnalytics.hasAnalyticsAttributes = e, window.siteAnalytics.trackByAttributes = i } - var r = "data-analytics-action", - a = "data-analytics-source", - s = "data-analytics-modal", - c = "data-analytics-ga"; + var r = 'data-analytics-action', + a = 'data-analytics-source', + s = 'data-analytics-modal', + c = 'data-analytics-ga'; o() }(), function() { @@ -373,45 +373,45 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, ! function(t, n, e, i, o, r, a) { t.fbq || (o = t.fbq = function() { o.callMethod ? o.callMethod.apply(o, arguments) : o.queue.push(arguments) - }, t._fbq || (t._fbq = o), o.push = o, o.loaded = !0, o.version = "2.0", o.queue = [], r = n.createElement(e), r.async = !0, r.src = i, a = n.getElementsByTagName(e)[0], a.parentNode.insertBefore(r, a)) - }(window, document, "script", "../connect.facebook.net/en_US/fbevents.js") + }, t._fbq || (t._fbq = o), o.push = o, o.loaded = !0, o.version = '2.0', o.queue = [], r = n.createElement(e), r.async = !0, r.src = i, a = n.getElementsByTagName(e)[0], a.parentNode.insertBefore(r, a)) + }(window, document, 'script', '../connect.facebook.net/en_US/fbevents.js') } function n() { - window.fbq && window.fbq("init", o) + window.fbq && window.fbq('init', o) } function e(t) { - window.fbq && t && (window.fbq("track", t), window.siteAnalyticsUtil.debugActive() && console.log("FB track", t)) + window.fbq && t && (window.fbq('track', t), window.siteAnalyticsUtil.debugActive() && console.log('FB track', t)) } function i() { - t(), n(), window.siteAnalytics.trackFacebookEvent = e, e("PageView") + t(), n(), window.siteAnalytics.trackFacebookEvent = e, e('PageView') } - var o = "742650679237989"; + var o = '742650679237989'; i() }(), function() { function t(t) { - return t.matches("form *") + return t.matches('form *') } function n(n) { t(n.target) && window.siteAnalyticsUtil.emitAction(o, { - name: n.target.getAttribute("name"), + name: n.target.getAttribute('name'), value: n.target.value }) } function e(t) { - "FORM" === t.target.tagName && window.siteAnalyticsUtil.emitAction(r) + 'FORM' === t.target.tagName && window.siteAnalyticsUtil.emitAction(r) } function i() { - document.addEventListener("change", n), document.addEventListener("submit", e) + document.addEventListener('change', n), document.addEventListener('submit', e) } - var o = "form_input", - r = "form_submit"; + var o = 'form_input', + r = 'form_submit'; i() }(), function() { @@ -424,20 +424,20 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, function n() { window.siteAnalytics.trackGlobalNavDropdownOpen = t } - var e = "nav_dropdown_open", + var e = 'nav_dropdown_open', i = {}; n() }(), function(t, n, e, i, o) { t[i] = t[i] || [], t[i].push({ - "gtm.start": (new Date).getTime(), - event: "gtm.js" + 'gtm.start': (new Date).getTime(), + event: 'gtm.js' }); var r = n.getElementsByTagName(e)[0], a = n.createElement(e), - s = "dataLayer" != i ? "&l=" + i : ""; - a.async = !0, a.src = "../www.googletagmanager.com/gtm5445.html?id=" + o + s, r.parentNode.insertBefore(a, r) - }(window, document, "script", "dataLayer", "GTM-K8JKCBR"), + s = 'dataLayer' != i ? '&l=' + i : ''; + a.async = !0, a.src = '../www.googletagmanager.com/gtm5445.html?id=' + o + s, r.parentNode.insertBefore(a, r) + }(window, document, 'script', 'dataLayer', 'GTM-K8JKCBR'), function() { function t() { window.siteAnalyticsUtil.emitActionOnce(c) @@ -480,29 +480,29 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, function s() { window.siteAnalytics.trackConnectRoutingDiagram = i, window.siteAnalytics.trackHomePageNotebook = e, window.siteAnalytics.trackRadarIcosahedron = t, window.siteAnalytics.trackRadarFraudChart = n, window.siteAnalytics.trackSigmaQueryCategory = o, window.siteAnalytics.trackSigmaQueryExample = r, window.siteAnalytics.trackSigmaPricingSlider = a } - var c = "radar_icosahedron", - d = "radar_fraud_chart", - l = "home_page_notebook", - u = "connect_routing_diagram", - p = "query_category", - w = "pricing_slider", + var c = 'radar_icosahedron', + d = 'radar_fraud_chart', + l = 'home_page_notebook', + u = 'connect_routing_diagram', + p = 'query_category', + w = 'pricing_slider', f = {}, g = {}; s() }(), function() { function t(t) { - return !!t.getAttribute("href") + return !!t.getAttribute('href') } function n(t) { - return t.trim().replace(/\s+/g, " ") + return t.trim().replace(/\s+/g, ' ') } function e(t) { var n = t.className.toLowerCase(), - e = t.getAttribute("href"); - return /\.pdf$|\.pdf#|\.pdf\?/i.test(t.href) ? d : -1 !== n.indexOf("button") || "#" === e ? c : s + e = t.getAttribute('href'); + return /\.pdf$|\.pdf#|\.pdf\?/i.test(t.href) ? d : -1 !== n.indexOf('button') || '#' === e ? c : s } function i(t) { @@ -514,7 +514,7 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, } function o(t) { - return "A" === t.tagName ? t : t.parentNode ? o(t.parentNode) : null + return 'A' === t.tagName ? t : t.parentNode ? o(t.parentNode) : null } function r(n) { @@ -524,11 +524,11 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, } function a() { - document.addEventListener("click", r) + document.addEventListener('click', r) } - var s = "inline_link", - c = "button", - d = "pdf_link"; + var s = 'inline_link', + c = 'button', + d = 'pdf_link'; a() }(), function() { @@ -547,7 +547,7 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, function e() { window.siteAnalytics.pageLoadTracking || (window.siteAnalytics.pageLoadTracking = { trackPageView: t - }, window.addEventListener("load", t)) + }, window.addEventListener('load', t)) } e() }(), @@ -566,35 +566,35 @@ Strut.isRetina = window.devicePixelRatio > 1.3, Strut.mobileViewportWidth = 670, function i(t, n) { var e = n; - "string" != typeof n && (e = r(n)), window.siteAnalyticsUtil.emitAction(t, { + 'string' != typeof n && (e = r(n)), window.siteAnalyticsUtil.emitAction(t, { video: e }) } function o(t) { - return t.currentSrc || t.getAttribute("src") || t.querySelector("source").getAttribute("src") + return t.currentSrc || t.getAttribute('src') || t.querySelector('source').getAttribute('src') } function r(t) { var n = o(t), - e = n.slice(n.lastIndexOf("index.html") + 1); - return e.slice(0, e.lastIndexOf(".")) + e = n.slice(n.lastIndexOf('index.html') + 1); + return e.slice(0, e.lastIndexOf('.')) } function a(t) { - "VIDEO" === t.target.tagName && n(t.target) + 'VIDEO' === t.target.tagName && n(t.target) } function s(t) { - "VIDEO" === t.target.tagName && e(t.target) + 'VIDEO' === t.target.tagName && e(t.target) } function c() { - document.addEventListener("play", a, !0), document.addEventListener("ended", s, !0), window.siteAnalytics.trackVideoExpand = t, window.siteAnalytics.trackVideoPlay = n, window.siteAnalytics.trackVideoEnd = e + document.addEventListener('play', a, !0), document.addEventListener('ended', s, !0), window.siteAnalytics.trackVideoExpand = t, window.siteAnalytics.trackVideoPlay = n, window.siteAnalytics.trackVideoEnd = e } - var d = "video_expand", - l = "video_end", - u = "video_play"; + var d = 'video_expand', + l = 'video_end', + u = 'video_play'; c() }(); diff --git a/home/public/js/demo.js b/home/public/js/demo.js index 212f656b8d..c945c9cf20 100755 --- a/home/public/js/demo.js +++ b/home/public/js/demo.js @@ -1 +1 @@ -!function(){function e(e,t){var n="",s=e.match(/\d/g);if(!s)return"";var i=s.join("");return t.split("").forEach(function(e){if(i.length){if("x"!==e)return void(n+=e);n+=i[0],i=i.substring(1)}}),n}function t(e){return 1===e.length&&!!e.match(/\d/)}function n(e,n){var s=0;return n.split("").forEach(function(n){e>0&&s++,t(n)&&e--}),s}function s(){window.phoneInputUtil={formatValue:e,placeCursor:n}}s()}(),function(){"use strict";function e(t,n){if(!(this instanceof e))return new e(t);n=n||{},this.inputEl=t,this.formatString=n.formatString||s,this.onFormatValue=n.onFormatValue||function(){},this.addListeners()}function t(t,n){new e(t,n)}function n(){window.phoneNumberInput={createPhoneNumberInput:t,PhoneInput:e}}var s="(xxx) xxx-xxxx",i=e.prototype;i.addListeners=function(){this.inputEl.addEventListener("input",this.onChange.bind(this)),this.inputEl.addEventListener("change",this.onChange.bind(this))},i.onChange=function(e){var t=e.target.value,n=e.target.selectionStart,s=t.slice(0,n).replace(/\D/g,"").length,i=window.phoneInputUtil.formatValue(t,this.formatString),o=window.phoneInputUtil.placeCursor(s,i);e.target.value=i,e.target.setSelectionRange(o,o),this.onFormatValue(i,e.target)},n()}(),function(){"use strict";function e(e){return[].slice.call(arguments,1).forEach(function(t){Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function t(e,t,n){var s=document.createElement(e);return s.setAttribute("class",t),n&&n.appendChild(s),s}function n(e){var t=[].slice.call(e.querySelectorAll("option")),n={};return t.forEach(function(e){e.disabled||(n[e.value]=e.text)}),n}function s(e){return e.getAttribute("data-searchable-select-input-placeholder")}function i(e){return e.getAttribute("data-searchable-select-no-results-message")}function o(e,t){if(!t.trim())return!0;var n=t.trim().toLowerCase().split(" ").filter(Boolean),s=e.toLowerCase();return n.every(function(e){return-1!==s.indexOf(e)})}function r(e,t){for(;e.children.length>0;)e.removeChild(e.children[0]);t.forEach(function(t){e.appendChild(t)})}function a(e){var t=-1;return[].slice.call(e.parentElement.children).forEach(function(n,s){n===e&&(t=s)}),t}function l(e){var t=e.slice();return t.sort(function(e,t){return e.length>t.length?1:t.length>e.length?-1:0}),t}function c(e,t){return l(e).reduce(function(e,n){n=n.toLowerCase();for(var s=0;s"+s[i]+"",i+=s[i].length):(o+=t[i],i++);return o}function h(e,t){var n=e.offsetTop+Math.ceil(e.clientHeight/2),s=nt.scrollTop+t.clientHeight;s?d(e,t,!0):i&&d(e,t,!1)}function d(e,t,n){t.scrollTop=n?e.offsetTop:e.offsetTop-t.clientHeight+e.clientHeight}function p(e,t){var n=document.createEvent("Event");n.initEvent&&e.dispatchEvent&&(n.initEvent(t,!0,!0),e.dispatchEvent(n))}function f(){window.searchableSelectUtil={findIndexInParent:a,getValuesFromSelect:n,getSearchPlaceholder:s,getNoResultsMessage:i,highlightQueryInValue:u,makeElement:t,objectAssign:e,replaceChildren:r,scrollIntoViewIfNeeded:h,triggerEvent:p,valueMatchesQuery:o}}f()}(),function(){"use strict";function e(e,t){this.props={},this.props.resultsListEl=e,this.props.onResultSelect=t.onResultSelect||function(){},this.props.noResultsMessage=t.noResultsMessage||"No results found.",this.props.searchEnabled=t.searchEnabled,this.state={results:{},highlightIndex:null},this.addListeners()}function t(e){return e.classList.contains("searchable-select-result")?e:null===e.parentElement||"BODY"===e.tagName?null:t(e.parentElement)}function n(){window.searchableSelect=window.searchableSelect||{},window.searchableSelect.ResultsList=e}var s=e.prototype,i=window.searchableSelectUtil;s.addListeners=function(){this.props.resultsListEl.addEventListener("mouseover",this.onResultMouseover.bind(this)),this.props.resultsListEl.addEventListener("click",this.onResultClick.bind(this))},s.onResultMouseover=function(e){e.target.classList.contains("searchable-select-result")&&this.highlightResultElement(e.target)},s.onResultClick=function(e){var n=t(e.target);n&&(e.stopPropagation(),this.props.onResultSelect(n.getAttribute("data-value")))},s.setResults=function(e,t,n){var s=this.renderSearchResults(e,t,n);s.length||(s=[this.renderEmptySearchResults()]),i.replaceChildren(this.props.resultsListEl,s),this.state.results=i.objectAssign({},e),this.props.searchEnabled?(this.setHighlightIndex(null),this.props.resultsListEl.scrollTop=0):this.highlightSelectedResult()},s.renderSearchResults=function(e,t,n){return e=i.objectAssign({},e),Object.keys(e).map(function(s){var o=i.makeElement("li","searchable-select-result");return o.setAttribute("data-value",s),o.innerHTML=i.highlightQueryInValue(t,e[s]),n===s&&o.classList.add("selected"),o})},s.highlightSelectedResult=function(){var e=this.props.resultsListEl.querySelector(".selected");e&&this.highlightResultElement(e)},s.highlightResultElement=function(e){var t=i.findIndexInParent(e);this.setHighlightIndex(t),this.scrollHighlightedResult(t)},s.setHighlightIndex=function(e){this.getSearchResultEls().forEach(function(t,n){n===e?t.classList.add("highlighted"):t.classList.remove("highlighted")}),this.state.highlightIndex=e},s.highlightPreviousResult=function(){if(this.getSearchResultEls().length){var e=this.state.highlightIndex-1;null===this.state.highlightIndex&&(e=0),e=Math.max(e,0),this.setHighlightIndex(e),this.scrollHighlightedResult(e)}},s.highlightNextResult=function(){var e=this.getSearchResultEls().length;if(e){var t=this.state.highlightIndex+1;null===this.state.highlightIndex&&(t=0),t=Math.min(t,e-1),this.setHighlightIndex(t),this.scrollHighlightedResult(t)}},s.getSearchResultEls=function(){return[].slice.call(this.props.resultsListEl.querySelectorAll(".searchable-select-result"))},s.scrollHighlightedResult=function(e){var t=this.getSearchResultEls()[e];i.scrollIntoViewIfNeeded(t,this.props.resultsListEl)},s.renderEmptySearchResults=function(){var e=i.makeElement("li","searchable-select-no-results");return e.textContent=this.props.noResultsMessage,e},n()}(),function(){"use strict";function e(e,t){this.props={},this.props.searchInputEl=e,this.props.onQueryChange=t.onQueryChange||function(){},this.props.onQueryChange=t.onQueryChange||function(){},this.addListeners()}function t(){window.searchableSelect=window.searchableSelect||{},window.searchableSelect.SearchInput=e}var n=e.prototype;n.addListeners=function(){this.props.searchInputEl.addEventListener("input",this.onInput.bind(this))},n.onInput=function(e){this.props.onQueryChange(e.target.value)},n.onSearchInput=function(e){e.stopPropagation(),this.props.onQueryChange(this.props.searchInputEl.value)},t()}(),function(){"use strict";function e(t,n){if(!(this instanceof e))return new e(t,n);e.allInstances=e.allInstances||[],e.allInstances.push(this),this.props={},this.props.originalSelect=t,this.props.allValues=s.getValuesFromSelect(this.props.originalSelect),this.props.aliases=n.aliases||{},this.props.onOpen=n.onOpen||function(){},this.props.onClose=n.onClose||function(){},this.props.valueMatchesQuery=s.valueMatchesQuery||n.valueMatchesQuery,this.props.searchEnabled=!0,n.hasOwnProperty("searchEnabled")&&(this.props.searchEnabled=!!n.searchEnabled),this.props.searchPlaceholder=s.getSearchPlaceholder(this.props.originalSelect)||"Search...",this.props.noResultsMessage=s.getNoResultsMessage(this.props.originalSelect)||"No results found.",this.state={open:!1,query:"",searchResults:s.getValuesFromSelect(this.props.originalSelect),selectedValue:this.props.originalSelect.value},this.createElements(),this.createComponents(),this.props.originalSelect.parentElement.appendChild(this.elements.containerEl),this.addListeners(),this.render()}function t(t,n){return new e(t,n)}function n(){window.searchableSelect={createSearchableSelect:t,SearchableSelect:e}}var s=window.searchableSelectUtil,i=window.searchableSelect.SearchInput,o=window.searchableSelect.ResultsList,r=e.prototype;r.createComponents=function(){var e;this.props.searchEnabled&&(e=new i(this.elements.searchInputEl,{onQueryChange:this.onQueryChange.bind(this),searchPlaceholder:this.props.searchPlaceholder}));var t=new o(this.elements.searchResultsEl,{onResultSelect:this.onResultSelect.bind(this),noResultsMessage:this.props.noResultsMessage,searchEnabled:this.props.searchEnabled});this.components={searchInput:e,resultsList:t}},r.createElements=function(){var e,t=s.makeElement("div","searchable-select-container"),n=s.makeElement("div","searchable-select-dropdown",t);this.props.searchEnabled&&(e=s.makeElement("input","searchable-select-input",n),e.setAttribute("placeholder",this.props.searchPlaceholder),e.setAttribute("autocorrect","off"),e.setAttribute("autocomplete","off"),e.setAttribute("spellcheck","false"));var i=s.makeElement("ul","searchable-select-results",n);this.elements={containerEl:t,containerParentEl:this.props.originalSelect.parentElement,dropdownEl:n,searchInputEl:e,searchResultsEl:i}},r.reloadValuesFromSelect=function(){this.props.allValues=s.getValuesFromSelect(this.props.originalSelect),this.setState({query:"",searchResults:s.getValuesFromSelect(this.props.originalSelect),selectedValue:this.props.originalSelect.value})},r.addListeners=function(){this.elements.containerParentEl.addEventListener("click",this.onContainerClick.bind(this)),document.body.addEventListener("click",this.onBodyClick.bind(this)),document.body.addEventListener("keydown",this.onBodyKeydown.bind(this)),this.props.originalSelect.addEventListener("focus",this.onSelectFocus.bind(this)),this.elements.containerEl.addEventListener("focusout",this.onFocusOut.bind(this))},r.onSelectFocus=function(e){e.stopPropagation(),e.target.blur(),this.state.open||this.open()},r.onQueryChange=function(e){this.setQuery(e)},r.onResultSelect=function(e){this.setSelection(e)},r.onBodyKeydown=function(e){this.state.open&&-1!==[13,27,38,40].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),40===e.keyCode?this.components.resultsList.highlightNextResult():38===e.keyCode?this.components.resultsList.highlightPreviousResult():13===e.keyCode?this.selectHighlightedResult():27===e.keyCode&&this.close())},r.onContainerClick=function(e){e.stopPropagation(),e.preventDefault(),this.state.open?e.target!==this.elements.containerParentEl&&e.target!==this.props.originalSelect||this.close():this.open()},r.onBodyClick=function(){this.close()},r.onFocusOut=function(){setTimeout(function(){"ontouchstart"in window&&this.close()}.bind(this),10)},r.selectHighlightedResult=function(){var e=this.components.resultsList.state.highlightIndex,t=Object.keys(this.state.searchResults),n=t[e];n||1!==t.length||(n=t[0]),n&&this.setSelection(n)},r.setSelection=function(e){this.setState({open:!1,selectedValue:e}),this.elements.searchInputEl&&this.elements.searchInputEl.blur()},r.setState=function(e){var t=s.objectAssign({},this.state,e);this.state=t,this.render()},r.filterValuesByQuery=function(e){var t={},n=this.props.allValues,i=this.props.aliases||{},o=this.props.valueMatchesQuery||s.valueMatchesQuery;return Object.keys(n).forEach(function(s){var i=n[s];(o(i,e)||o(s,e))&&(t[s]=i)}),Object.keys(i).forEach(function(s){var r=i[s];o(s,e)&&(t[r]=n[r])}),t},r.render=function(){this.components.resultsList.setResults(this.state.searchResults,this.state.query,this.state.selectedValue),this.state.open?(this.elements.containerEl.classList.add("dropdown-open"),this.props.originalSelect.classList.add("dropdown-open")):(this.elements.containerEl.classList.remove("dropdown-open"),this.props.originalSelect.classList.remove("dropdown-open")),this.state.selectedValue!==this.props.originalSelect.value&&(this.props.originalSelect.value=this.state.selectedValue,s.triggerEvent(this.props.originalSelect,"change")),this.props.originalSelect.value?this.props.originalSelect.classList.add("has-value"):this.props.originalSelect.classList.remove("has-value")},r.closeAllInstances=function(){e.allInstances.forEach(function(e){e.close()})},r.open=function(){this.closeAllInstances(),this.setState({open:!0}),this.elements.searchInputEl&&this.elements.searchInputEl.focus(),this.props.onOpen({searchableSelect:this,containerEl:this.elements.containerEl})},r.close=function(){this.setState({open:!1}),this.elements.searchInputEl&&this.elements.searchInputEl.blur(),this.props.onClose({searchableSelect:this,containerEl:this.elements.containerEl})},r.setQuery=function(e){if(this.state.query!==e){var t=this.filterValuesByQuery(e);this.setState({query:e,searchResults:t,highlightedIndex:0})}},n()}(),function(){function e(){var e=document.querySelector("form"),t=document.querySelector(".phone-number-form");e.addEventListener("change",n),e.addEventListener("submit",i),t.addEventListener("submit",o)}function t(e){if(window.Analytics&&window.Analytics.getPreviousEventId()){var t=Analytics.getPreviousEventId();e.querySelector('[name="analytics_event_id"]').value=t}}function n(e){s(e.target.getAttribute("name"))}function s(e){var t="contact_sales_form_changed_"+e;p.emitActionOnce(t)}function i(e){window.contactSales.formValidation.validateForm()&&(t(e.target),l(),h(),u())}function o(e){t(e.target),c()}function r(){p.emitAction("contact_sales_form_error")}function a(){p.emitAction("contact_sales_phone_form_error")}function l(){p.emitAction("contact_sales_form_success")}function c(){p.emitAction("contact_sales_phone_form_success")}function u(){window.ga&&window.ga("send","event","Forms","Message to Sales","Message to Sales")}function h(){window.siteAnalytics&&window.siteAnalytics.trackFacebookEvent&&window.siteAnalytics.trackFacebookEvent("Lead")}function d(){window.contactSales=window.contactSales||{},window.contactSales.analytics={sendSubmitError:r,sendSubmitPhoneError:a}}var p=window.siteAnalyticsUtil;d(),document.addEventListener("DOMContentLoaded",e)}(),function(){function e(){var e=document.querySelector("form");return[].slice.call(e.querySelectorAll("[name]")).reduce(function(e,t){return e[t.getAttribute("name")]=t.value,e},{})}function t(){d(),n()}function n(){var e=document.querySelector("form"),t=e.querySelector("[name=country]");e.addEventListener("focusin",i),e.addEventListener("focusout",o),t.addEventListener("change",r)}function s(e){return e.classList.contains("form-row")}function i(){u()}function o(){u()}function r(e){a(e.target.value)}function a(e){var t=window.contactSales.volumeOptions.dataForCountry(e),n=document.querySelector('[name="volume"]');if(t){for(var s=t.map(function(e){var t=document.createElement("option");return t.textContent=e.label,t.value=e.value,t});n.children.length>0;)n.removeChild(n.children[0]);s.forEach(function(e){n.appendChild(e)}),n.value="",n.options[0].selected=!0,v.reloadValuesFromSelect()}}function l(e){var t=h(e.containerEl,s);u(),t.classList.add("has-focus")}function c(e){var t=h(e.containerEl,s);u(),t.classList.remove("has-focus")}function u(){var e=document.activeElement,t=h(e,s);[].slice.call(document.querySelectorAll(".form-row")).forEach(function(e){e===t?e.classList.add("has-focus"):e.classList.remove("has-focus")})}function h(e,t){e.parentElement;return document.body===e||null===e.parentElement?null:t(e)?e:h(e.parentElement,t)}function d(){var e=document.querySelector("form"),t=e.querySelector("[name=country]"),n=e.querySelector("[name=volume]"),s={"u.s.":"US","u.s.a.":"US",us:"US",usa:"US",uk:"GB","u.k.":"GB"},i={aliases:s,onOpen:l,onClose:c},o={onOpen:l,onClose:c,searchEnabled:!1};m=window.searchableSelect.createSearchableSelect(t,i),v=window.searchableSelect.createSearchableSelect(n,o)}function p(){return m}function f(){return v}function g(){window.contactSales=window.contactSales||{},window.contactSales.inputs={getCountryInput:p,getVolumeInput:f,getFormValues:e}}var m=null,v=null;g(),document.addEventListener("DOMContentLoaded",t)}(),function(){function e(){return t()}function t(){var e=document.querySelector("form"),t=[].slice.call(e.querySelectorAll("[required]"));return t.forEach(function(e){n(e)}),t.every(function(e){return-1===e.className.indexOf("invalid")})}function n(e){e.value?e.classList.remove("invalid-missing"):e.classList.add("invalid-missing"),"email"===e.getAttribute("name")&&s(e),"website"===e.getAttribute("name")&&i(e)}function s(e){o(e.value)?e.classList.remove("invalid-value"):e.classList.add("invalid-value")}function i(e){r(e.value)?e.classList.remove("invalid-value"):e.classList.add("invalid-value")}function o(e){e=e.trim();var t=e.match(/@/g);return!(!t||1!==t.length)&&("@"!==e[0]&&"@"!==e[e.length-1])}function r(e){var t=e.lastIndexOf(".");return-1===[-1,0,e.length-1].indexOf(t)}function a(e){-1!==["SELECT","INPUT","TEXTAREA"].indexOf(e.target.tagName)&&e.target.hasAttribute("required")&&n(e.target)}function l(){var e=document.querySelector("form");e.addEventListener("change",a),e.addEventListener("focusout",a)}function c(){window.contactSales=window.contactSales||{},window.contactSales.formValidation={validateForm:e}}c(),document.addEventListener("DOMContentLoaded",l)}(),function(){function e(e){try{return JSON.parse(e)}catch(t){return e}}function t(e,t,n){s("POST",e,t,n)}function n(e,t){s("GET",e,null,t)}function s(t,n,s,i){var o=document.querySelector("form [name=csrf-token]").getAttribute("value"),r=new XMLHttpRequest;r.open(t,n),s&&r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("x-fyipe-csrf-token",o),i&&(r.onreadystatechange=function(){4==r.readyState&&i(e(r.responseText),r)}),s?r.send(JSON.stringify(s)):r.send()}function i(){window.contactSales=window.contactSales||{},window.contactSales.request={postRequest:t,getRequest:n}}i()}(),function(){function e(e){e.preventDefault(),u||window.contactSales.formValidation.validateForm()&&(c=window.contactSales.inputs.getFormValues(),window.contactSales.request.postRequest(e.target.action,c,s),t(e.target),o(!1,c.email))}function t(e){var t=e.querySelector(".spinner"),n=e.querySelector('input[type="submit"]');u=!0,n.disabled=!0,n.classList.add("common-Button--disabled"),t&&t.classList.add("shown")}function n(e){var t="submit"===e.target.getAttribute("type");13!==e.keyCode||t||e.preventDefault()}function s(){}function i(){document.body.classList.add("no-phone")}function o(e){var t=document.querySelector(".submitted-email");e||i(),t&&(t.textContent=c.email),document.body.classList.add("form-submitted")}function r(){return l}function a(){var t=document.querySelector("form");t.addEventListener("submit",e),t.addEventListener("keydown",n),window.contactSales.initialForm={getFormToken:r}}var l,c,u=!1;document.addEventListener("DOMContentLoaded",a)}(),function(){function e(e){if(e.preventDefault(),!c&&i(e.target)){n(e.target);var s=t(e.target);window.contactSales.request.postRequest(e.target.action,s,function(){}),r()}}function t(e){var t=[].slice.call(e.querySelectorAll("[name]")),n=t.reduce(function(e,t){return e[t.getAttribute("name")]=t.value,e},{});return n.phone=n.phone.split(/\D+/).join(""),n}function n(e){var t=window.contactSales.inputs.getFormValues(),n=t.email,s=window.contactSales.initialForm.getFormToken(),i=e.querySelector('[name="email"]'),o=e.querySelector('[name="token"]');i.value=n,o.value=s}function s(e,t){e&&t.classList.remove("invalid-missing"),o(e)&&t.classList.remove("invalid-value")}function i(e){var t=e.querySelector('[name="phone"]');if(t.classList.remove("invalid-value"),t.classList.remove("invalid-missing"),!t.value)return t.classList.add("invalid-missing"),!1;var n=o(t.value);return n||t.classList.add("invalid-value"),n}function o(e){var t=(e||"").match(/\d/g);return t&&10===t.length}function r(){var e=document.querySelector(".phone-number-form"),t=e.querySelector('input[type="submit"]');document.body.classList.add("phone-finished"),c=!0,t.disabled=!0,t.classList.add("common-Button--disabled")}function a(){var t=document.querySelector(".phone-number-form"),n=t.querySelector('[name="phone"]');t.addEventListener("submit",e),window.phoneNumberInput.createPhoneNumberInput(n,{formatString:l,onFormatValue:s})}var l="(xxx) xxx-xxxx",c=!1;document.addEventListener("DOMContentLoaded",a)}(),function(){function e(){window.contactSales.request.getRequest("/contact/sales/volume_options",t)}function t(e){i=e,o=!0}function n(e){return o?[i.empty_volume_option,i.just_starting_volume_option].concat(i.data_by_country[e]).map(function(e){var t=e.value;return"object"==typeof t&&(t=JSON.stringify(t)),e.value=t,e}):null}function s(){window.contactSales=window.contactSales||{},window.contactSales.volumeOptions={dataForCountry:n},window.addEventListener("load",e)}var i={},o=!1;s()}(); \ No newline at end of file +!function(){function e(e,t){var n='',s=e.match(/\d/g);if(!s)return'';var i=s.join('');return t.split('').forEach(function(e){if(i.length){if('x'!==e)return void(n+=e);n+=i[0],i=i.substring(1)}}),n}function t(e){return 1===e.length&&!!e.match(/\d/)}function n(e,n){var s=0;return n.split('').forEach(function(n){e>0&&s++,t(n)&&e--}),s}function s(){window.phoneInputUtil={formatValue:e,placeCursor:n}}s()}(),function(){'use strict';function e(t,n){if(!(this instanceof e))return new e(t);n=n||{},this.inputEl=t,this.formatString=n.formatString||s,this.onFormatValue=n.onFormatValue||function(){},this.addListeners()}function t(t,n){new e(t,n)}function n(){window.phoneNumberInput={createPhoneNumberInput:t,PhoneInput:e}}var s='(xxx) xxx-xxxx',i=e.prototype;i.addListeners=function(){this.inputEl.addEventListener('input',this.onChange.bind(this)),this.inputEl.addEventListener('change',this.onChange.bind(this))},i.onChange=function(e){var t=e.target.value,n=e.target.selectionStart,s=t.slice(0,n).replace(/\D/g,'').length,i=window.phoneInputUtil.formatValue(t,this.formatString),o=window.phoneInputUtil.placeCursor(s,i);e.target.value=i,e.target.setSelectionRange(o,o),this.onFormatValue(i,e.target)},n()}(),function(){'use strict';function e(e){return[].slice.call(arguments,1).forEach(function(t){Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function t(e,t,n){var s=document.createElement(e);return s.setAttribute('class',t),n&&n.appendChild(s),s}function n(e){var t=[].slice.call(e.querySelectorAll('option')),n={};return t.forEach(function(e){e.disabled||(n[e.value]=e.text)}),n}function s(e){return e.getAttribute('data-searchable-select-input-placeholder')}function i(e){return e.getAttribute('data-searchable-select-no-results-message')}function o(e,t){if(!t.trim())return!0;var n=t.trim().toLowerCase().split(' ').filter(Boolean),s=e.toLowerCase();return n.every(function(e){return-1!==s.indexOf(e)})}function r(e,t){for(;e.children.length>0;)e.removeChild(e.children[0]);t.forEach(function(t){e.appendChild(t)})}function a(e){var t=-1;return[].slice.call(e.parentElement.children).forEach(function(n,s){n===e&&(t=s)}),t}function l(e){var t=e.slice();return t.sort(function(e,t){return e.length>t.length?1:t.length>e.length?-1:0}),t}function c(e,t){return l(e).reduce(function(e,n){n=n.toLowerCase();for(var s=0;s'+s[i]+'',i+=s[i].length):(o+=t[i],i++);return o}function h(e,t){var n=e.offsetTop+Math.ceil(e.clientHeight/2),s=nt.scrollTop+t.clientHeight;s?d(e,t,!0):i&&d(e,t,!1)}function d(e,t,n){t.scrollTop=n?e.offsetTop:e.offsetTop-t.clientHeight+e.clientHeight}function p(e,t){var n=document.createEvent('Event');n.initEvent&&e.dispatchEvent&&(n.initEvent(t,!0,!0),e.dispatchEvent(n))}function f(){window.searchableSelectUtil={findIndexInParent:a,getValuesFromSelect:n,getSearchPlaceholder:s,getNoResultsMessage:i,highlightQueryInValue:u,makeElement:t,objectAssign:e,replaceChildren:r,scrollIntoViewIfNeeded:h,triggerEvent:p,valueMatchesQuery:o}}f()}(),function(){'use strict';function e(e,t){this.props={},this.props.resultsListEl=e,this.props.onResultSelect=t.onResultSelect||function(){},this.props.noResultsMessage=t.noResultsMessage||'No results found.',this.props.searchEnabled=t.searchEnabled,this.state={results:{},highlightIndex:null},this.addListeners()}function t(e){return e.classList.contains('searchable-select-result')?e:null===e.parentElement||'BODY'===e.tagName?null:t(e.parentElement)}function n(){window.searchableSelect=window.searchableSelect||{},window.searchableSelect.ResultsList=e}var s=e.prototype,i=window.searchableSelectUtil;s.addListeners=function(){this.props.resultsListEl.addEventListener('mouseover',this.onResultMouseover.bind(this)),this.props.resultsListEl.addEventListener('click',this.onResultClick.bind(this))},s.onResultMouseover=function(e){e.target.classList.contains('searchable-select-result')&&this.highlightResultElement(e.target)},s.onResultClick=function(e){var n=t(e.target);n&&(e.stopPropagation(),this.props.onResultSelect(n.getAttribute('data-value')))},s.setResults=function(e,t,n){var s=this.renderSearchResults(e,t,n);s.length||(s=[this.renderEmptySearchResults()]),i.replaceChildren(this.props.resultsListEl,s),this.state.results=i.objectAssign({},e),this.props.searchEnabled?(this.setHighlightIndex(null),this.props.resultsListEl.scrollTop=0):this.highlightSelectedResult()},s.renderSearchResults=function(e,t,n){return e=i.objectAssign({},e),Object.keys(e).map(function(s){var o=i.makeElement('li','searchable-select-result');return o.setAttribute('data-value',s),o.innerHTML=i.highlightQueryInValue(t,e[s]),n===s&&o.classList.add('selected'),o})},s.highlightSelectedResult=function(){var e=this.props.resultsListEl.querySelector('.selected');e&&this.highlightResultElement(e)},s.highlightResultElement=function(e){var t=i.findIndexInParent(e);this.setHighlightIndex(t),this.scrollHighlightedResult(t)},s.setHighlightIndex=function(e){this.getSearchResultEls().forEach(function(t,n){n===e?t.classList.add('highlighted'):t.classList.remove('highlighted')}),this.state.highlightIndex=e},s.highlightPreviousResult=function(){if(this.getSearchResultEls().length){var e=this.state.highlightIndex-1;null===this.state.highlightIndex&&(e=0),e=Math.max(e,0),this.setHighlightIndex(e),this.scrollHighlightedResult(e)}},s.highlightNextResult=function(){var e=this.getSearchResultEls().length;if(e){var t=this.state.highlightIndex+1;null===this.state.highlightIndex&&(t=0),t=Math.min(t,e-1),this.setHighlightIndex(t),this.scrollHighlightedResult(t)}},s.getSearchResultEls=function(){return[].slice.call(this.props.resultsListEl.querySelectorAll('.searchable-select-result'))},s.scrollHighlightedResult=function(e){var t=this.getSearchResultEls()[e];i.scrollIntoViewIfNeeded(t,this.props.resultsListEl)},s.renderEmptySearchResults=function(){var e=i.makeElement('li','searchable-select-no-results');return e.textContent=this.props.noResultsMessage,e},n()}(),function(){'use strict';function e(e,t){this.props={},this.props.searchInputEl=e,this.props.onQueryChange=t.onQueryChange||function(){},this.props.onQueryChange=t.onQueryChange||function(){},this.addListeners()}function t(){window.searchableSelect=window.searchableSelect||{},window.searchableSelect.SearchInput=e}var n=e.prototype;n.addListeners=function(){this.props.searchInputEl.addEventListener('input',this.onInput.bind(this))},n.onInput=function(e){this.props.onQueryChange(e.target.value)},n.onSearchInput=function(e){e.stopPropagation(),this.props.onQueryChange(this.props.searchInputEl.value)},t()}(),function(){'use strict';function e(t,n){if(!(this instanceof e))return new e(t,n);e.allInstances=e.allInstances||[],e.allInstances.push(this),this.props={},this.props.originalSelect=t,this.props.allValues=s.getValuesFromSelect(this.props.originalSelect),this.props.aliases=n.aliases||{},this.props.onOpen=n.onOpen||function(){},this.props.onClose=n.onClose||function(){},this.props.valueMatchesQuery=s.valueMatchesQuery||n.valueMatchesQuery,this.props.searchEnabled=!0,n.hasOwnProperty('searchEnabled')&&(this.props.searchEnabled=!!n.searchEnabled),this.props.searchPlaceholder=s.getSearchPlaceholder(this.props.originalSelect)||'Search...',this.props.noResultsMessage=s.getNoResultsMessage(this.props.originalSelect)||'No results found.',this.state={open:!1,query:'',searchResults:s.getValuesFromSelect(this.props.originalSelect),selectedValue:this.props.originalSelect.value},this.createElements(),this.createComponents(),this.props.originalSelect.parentElement.appendChild(this.elements.containerEl),this.addListeners(),this.render()}function t(t,n){return new e(t,n)}function n(){window.searchableSelect={createSearchableSelect:t,SearchableSelect:e}}var s=window.searchableSelectUtil,i=window.searchableSelect.SearchInput,o=window.searchableSelect.ResultsList,r=e.prototype;r.createComponents=function(){var e;this.props.searchEnabled&&(e=new i(this.elements.searchInputEl,{onQueryChange:this.onQueryChange.bind(this),searchPlaceholder:this.props.searchPlaceholder}));var t=new o(this.elements.searchResultsEl,{onResultSelect:this.onResultSelect.bind(this),noResultsMessage:this.props.noResultsMessage,searchEnabled:this.props.searchEnabled});this.components={searchInput:e,resultsList:t}},r.createElements=function(){var e,t=s.makeElement('div','searchable-select-container'),n=s.makeElement('div','searchable-select-dropdown',t);this.props.searchEnabled&&(e=s.makeElement('input','searchable-select-input',n),e.setAttribute('placeholder',this.props.searchPlaceholder),e.setAttribute('autocorrect','off'),e.setAttribute('autocomplete','off'),e.setAttribute('spellcheck','false'));var i=s.makeElement('ul','searchable-select-results',n);this.elements={containerEl:t,containerParentEl:this.props.originalSelect.parentElement,dropdownEl:n,searchInputEl:e,searchResultsEl:i}},r.reloadValuesFromSelect=function(){this.props.allValues=s.getValuesFromSelect(this.props.originalSelect),this.setState({query:'',searchResults:s.getValuesFromSelect(this.props.originalSelect),selectedValue:this.props.originalSelect.value})},r.addListeners=function(){this.elements.containerParentEl.addEventListener('click',this.onContainerClick.bind(this)),document.body.addEventListener('click',this.onBodyClick.bind(this)),document.body.addEventListener('keydown',this.onBodyKeydown.bind(this)),this.props.originalSelect.addEventListener('focus',this.onSelectFocus.bind(this)),this.elements.containerEl.addEventListener('focusout',this.onFocusOut.bind(this))},r.onSelectFocus=function(e){e.stopPropagation(),e.target.blur(),this.state.open||this.open()},r.onQueryChange=function(e){this.setQuery(e)},r.onResultSelect=function(e){this.setSelection(e)},r.onBodyKeydown=function(e){this.state.open&&-1!==[13,27,38,40].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),40===e.keyCode?this.components.resultsList.highlightNextResult():38===e.keyCode?this.components.resultsList.highlightPreviousResult():13===e.keyCode?this.selectHighlightedResult():27===e.keyCode&&this.close())},r.onContainerClick=function(e){e.stopPropagation(),e.preventDefault(),this.state.open?e.target!==this.elements.containerParentEl&&e.target!==this.props.originalSelect||this.close():this.open()},r.onBodyClick=function(){this.close()},r.onFocusOut=function(){setTimeout(function(){'ontouchstart'in window&&this.close()}.bind(this),10)},r.selectHighlightedResult=function(){var e=this.components.resultsList.state.highlightIndex,t=Object.keys(this.state.searchResults),n=t[e];n||1!==t.length||(n=t[0]),n&&this.setSelection(n)},r.setSelection=function(e){this.setState({open:!1,selectedValue:e}),this.elements.searchInputEl&&this.elements.searchInputEl.blur()},r.setState=function(e){var t=s.objectAssign({},this.state,e);this.state=t,this.render()},r.filterValuesByQuery=function(e){var t={},n=this.props.allValues,i=this.props.aliases||{},o=this.props.valueMatchesQuery||s.valueMatchesQuery;return Object.keys(n).forEach(function(s){var i=n[s];(o(i,e)||o(s,e))&&(t[s]=i)}),Object.keys(i).forEach(function(s){var r=i[s];o(s,e)&&(t[r]=n[r])}),t},r.render=function(){this.components.resultsList.setResults(this.state.searchResults,this.state.query,this.state.selectedValue),this.state.open?(this.elements.containerEl.classList.add('dropdown-open'),this.props.originalSelect.classList.add('dropdown-open')):(this.elements.containerEl.classList.remove('dropdown-open'),this.props.originalSelect.classList.remove('dropdown-open')),this.state.selectedValue!==this.props.originalSelect.value&&(this.props.originalSelect.value=this.state.selectedValue,s.triggerEvent(this.props.originalSelect,'change')),this.props.originalSelect.value?this.props.originalSelect.classList.add('has-value'):this.props.originalSelect.classList.remove('has-value')},r.closeAllInstances=function(){e.allInstances.forEach(function(e){e.close()})},r.open=function(){this.closeAllInstances(),this.setState({open:!0}),this.elements.searchInputEl&&this.elements.searchInputEl.focus(),this.props.onOpen({searchableSelect:this,containerEl:this.elements.containerEl})},r.close=function(){this.setState({open:!1}),this.elements.searchInputEl&&this.elements.searchInputEl.blur(),this.props.onClose({searchableSelect:this,containerEl:this.elements.containerEl})},r.setQuery=function(e){if(this.state.query!==e){var t=this.filterValuesByQuery(e);this.setState({query:e,searchResults:t,highlightedIndex:0})}},n()}(),function(){function e(){var e=document.querySelector('form'),t=document.querySelector('.phone-number-form');e.addEventListener('change',n),e.addEventListener('submit',i),t.addEventListener('submit',o)}function t(e){if(window.Analytics&&window.Analytics.getPreviousEventId()){var t=Analytics.getPreviousEventId();e.querySelector('[name="analytics_event_id"]').value=t}}function n(e){s(e.target.getAttribute('name'))}function s(e){var t='contact_sales_form_changed_'+e;p.emitActionOnce(t)}function i(e){window.contactSales.formValidation.validateForm()&&(t(e.target),l(),h(),u())}function o(e){t(e.target),c()}function r(){p.emitAction('contact_sales_form_error')}function a(){p.emitAction('contact_sales_phone_form_error')}function l(){p.emitAction('contact_sales_form_success')}function c(){p.emitAction('contact_sales_phone_form_success')}function u(){window.ga&&window.ga('send','event','Forms','Message to Sales','Message to Sales')}function h(){window.siteAnalytics&&window.siteAnalytics.trackFacebookEvent&&window.siteAnalytics.trackFacebookEvent('Lead')}function d(){window.contactSales=window.contactSales||{},window.contactSales.analytics={sendSubmitError:r,sendSubmitPhoneError:a}}var p=window.siteAnalyticsUtil;d(),document.addEventListener('DOMContentLoaded',e)}(),function(){function e(){var e=document.querySelector('form');return[].slice.call(e.querySelectorAll('[name]')).reduce(function(e,t){return e[t.getAttribute('name')]=t.value,e},{})}function t(){d(),n()}function n(){var e=document.querySelector('form'),t=e.querySelector('[name=country]');e.addEventListener('focusin',i),e.addEventListener('focusout',o),t.addEventListener('change',r)}function s(e){return e.classList.contains('form-row')}function i(){u()}function o(){u()}function r(e){a(e.target.value)}function a(e){var t=window.contactSales.volumeOptions.dataForCountry(e),n=document.querySelector('[name="volume"]');if(t){for(var s=t.map(function(e){var t=document.createElement('option');return t.textContent=e.label,t.value=e.value,t});n.children.length>0;)n.removeChild(n.children[0]);s.forEach(function(e){n.appendChild(e)}),n.value='',n.options[0].selected=!0,v.reloadValuesFromSelect()}}function l(e){var t=h(e.containerEl,s);u(),t.classList.add('has-focus')}function c(e){var t=h(e.containerEl,s);u(),t.classList.remove('has-focus')}function u(){var e=document.activeElement,t=h(e,s);[].slice.call(document.querySelectorAll('.form-row')).forEach(function(e){e===t?e.classList.add('has-focus'):e.classList.remove('has-focus')})}function h(e,t){e.parentElement;return document.body===e||null===e.parentElement?null:t(e)?e:h(e.parentElement,t)}function d(){var e=document.querySelector('form'),t=e.querySelector('[name=country]'),n=e.querySelector('[name=volume]'),s={'u.s.':'US','u.s.a.':'US',us:'US',usa:'US',uk:'GB','u.k.':'GB'},i={aliases:s,onOpen:l,onClose:c},o={onOpen:l,onClose:c,searchEnabled:!1};m=window.searchableSelect.createSearchableSelect(t,i),v=window.searchableSelect.createSearchableSelect(n,o)}function p(){return m}function f(){return v}function g(){window.contactSales=window.contactSales||{},window.contactSales.inputs={getCountryInput:p,getVolumeInput:f,getFormValues:e}}var m=null,v=null;g(),document.addEventListener('DOMContentLoaded',t)}(),function(){function e(){return t()}function t(){var e=document.querySelector('form'),t=[].slice.call(e.querySelectorAll('[required]'));return t.forEach(function(e){n(e)}),t.every(function(e){return-1===e.className.indexOf('invalid')})}function n(e){e.value?e.classList.remove('invalid-missing'):e.classList.add('invalid-missing'),'email'===e.getAttribute('name')&&s(e),'website'===e.getAttribute('name')&&i(e)}function s(e){o(e.value)?e.classList.remove('invalid-value'):e.classList.add('invalid-value')}function i(e){r(e.value)?e.classList.remove('invalid-value'):e.classList.add('invalid-value')}function o(e){e=e.trim();var t=e.match(/@/g);return!(!t||1!==t.length)&&('@'!==e[0]&&'@'!==e[e.length-1])}function r(e){var t=e.lastIndexOf('.');return-1===[-1,0,e.length-1].indexOf(t)}function a(e){-1!==['SELECT','INPUT','TEXTAREA'].indexOf(e.target.tagName)&&e.target.hasAttribute('required')&&n(e.target)}function l(){var e=document.querySelector('form');e.addEventListener('change',a),e.addEventListener('focusout',a)}function c(){window.contactSales=window.contactSales||{},window.contactSales.formValidation={validateForm:e}}c(),document.addEventListener('DOMContentLoaded',l)}(),function(){function e(e){try{return JSON.parse(e)}catch(t){return e}}function t(e,t,n){s('POST',e,t,n)}function n(e,t){s('GET',e,null,t)}function s(t,n,s,i){var o=document.querySelector('form [name=csrf-token]').getAttribute('value'),r=new XMLHttpRequest;r.open(t,n),s&&r.setRequestHeader('Content-Type','application/json;charset=UTF-8'),r.setRequestHeader('x-fyipe-csrf-token',o),i&&(r.onreadystatechange=function(){4==r.readyState&&i(e(r.responseText),r)}),s?r.send(JSON.stringify(s)):r.send()}function i(){window.contactSales=window.contactSales||{},window.contactSales.request={postRequest:t,getRequest:n}}i()}(),function(){function e(e){e.preventDefault(),u||window.contactSales.formValidation.validateForm()&&(c=window.contactSales.inputs.getFormValues(),window.contactSales.request.postRequest(e.target.action,c,s),t(e.target),o(!1,c.email))}function t(e){var t=e.querySelector('.spinner'),n=e.querySelector('input[type="submit"]');u=!0,n.disabled=!0,n.classList.add('common-Button--disabled'),t&&t.classList.add('shown')}function n(e){var t='submit'===e.target.getAttribute('type');13!==e.keyCode||t||e.preventDefault()}function s(){}function i(){document.body.classList.add('no-phone')}function o(e){var t=document.querySelector('.submitted-email');e||i(),t&&(t.textContent=c.email),document.body.classList.add('form-submitted')}function r(){return l}function a(){var t=document.querySelector('form');t.addEventListener('submit',e),t.addEventListener('keydown',n),window.contactSales.initialForm={getFormToken:r}}var l,c,u=!1;document.addEventListener('DOMContentLoaded',a)}(),function(){function e(e){if(e.preventDefault(),!c&&i(e.target)){n(e.target);var s=t(e.target);window.contactSales.request.postRequest(e.target.action,s,function(){}),r()}}function t(e){var t=[].slice.call(e.querySelectorAll('[name]')),n=t.reduce(function(e,t){return e[t.getAttribute('name')]=t.value,e},{});return n.phone=n.phone.split(/\D+/).join(''),n}function n(e){var t=window.contactSales.inputs.getFormValues(),n=t.email,s=window.contactSales.initialForm.getFormToken(),i=e.querySelector('[name="email"]'),o=e.querySelector('[name="token"]');i.value=n,o.value=s}function s(e,t){e&&t.classList.remove('invalid-missing'),o(e)&&t.classList.remove('invalid-value')}function i(e){var t=e.querySelector('[name="phone"]');if(t.classList.remove('invalid-value'),t.classList.remove('invalid-missing'),!t.value)return t.classList.add('invalid-missing'),!1;var n=o(t.value);return n||t.classList.add('invalid-value'),n}function o(e){var t=(e||'').match(/\d/g);return t&&10===t.length}function r(){var e=document.querySelector('.phone-number-form'),t=e.querySelector('input[type="submit"]');document.body.classList.add('phone-finished'),c=!0,t.disabled=!0,t.classList.add('common-Button--disabled')}function a(){var t=document.querySelector('.phone-number-form'),n=t.querySelector('[name="phone"]');t.addEventListener('submit',e),window.phoneNumberInput.createPhoneNumberInput(n,{formatString:l,onFormatValue:s})}var l='(xxx) xxx-xxxx',c=!1;document.addEventListener('DOMContentLoaded',a)}(),function(){function e(){window.contactSales.request.getRequest('/contact/sales/volume_options',t)}function t(e){i=e,o=!0}function n(e){return o?[i.empty_volume_option,i.just_starting_volume_option].concat(i.data_by_country[e]).map(function(e){var t=e.value;return'object'==typeof t&&(t=JSON.stringify(t)),e.value=t,e}):null}function s(){window.contactSales=window.contactSales||{},window.contactSales.volumeOptions={dataForCountry:n},window.addEventListener('load',e)}var i={},o=!1;s()}(); \ No newline at end of file diff --git a/home/public/js/resources.js b/home/public/js/resources.js index e86d54f7d4..66e0453fe5 100755 --- a/home/public/js/resources.js +++ b/home/public/js/resources.js @@ -1 +1 @@ -!function(){function n(n,e){$(".hidden",n).eq(e).css({transitionDelay:Math.random()+Math.random()+"s",transitionDuration:2*Math.random()+.2+"s"}),$(".hidden",n).eq(e).attr("class","shown")}function e(n,e){if(n.hasClass("is-visible")){var a=$(".shown",n).eq(e);a.attr("class","hidden"),setTimeout(function(){a.attr("class","shown")},3e3)}}$(".card").each(function(e,a){if(window.IntersectionObserver)a.observer=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting||e.intersectionRatio>0){$(a).addClass("is-visible");for(var t=$(".hidden",a).length;t>=0;t--)n(a,t)}else $(a).removeClass("is-visible")})}),a.observer.observe(a);else{$(a).addClass("is-visible");for(var t=$(".hidden",a).length;t>=0;t--)n(a,t)}}),setInterval(function(){var n=$(".card").eq(Math.floor(Math.random()*$(".card").length));e(n,Math.floor(Math.random()*$(".shown",n).length));var n=$(".card").eq(Math.floor(Math.random()*$(".card").length));e(n,Math.floor(Math.random()*$(".shown",n).length))},600)}(); \ No newline at end of file +!function(){function n(n,e){$('.hidden',n).eq(e).css({transitionDelay:Math.random()+Math.random()+'s',transitionDuration:2*Math.random()+.2+'s'}),$('.hidden',n).eq(e).attr('class','shown')}function e(n,e){if(n.hasClass('is-visible')){var a=$('.shown',n).eq(e);a.attr('class','hidden'),setTimeout(function(){a.attr('class','shown')},3e3)}}$('.card').each(function(e,a){if(window.IntersectionObserver)a.observer=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting||e.intersectionRatio>0){$(a).addClass('is-visible');for(var t=$('.hidden',a).length;t>=0;t--)n(a,t)}else $(a).removeClass('is-visible')})}),a.observer.observe(a);else{$(a).addClass('is-visible');for(var t=$('.hidden',a).length;t>=0;t--)n(a,t)}}),setInterval(function(){var n=$('.card').eq(Math.floor(Math.random()*$('.card').length));e(n,Math.floor(Math.random()*$('.shown',n).length));var n=$('.card').eq(Math.floor(Math.random()*$('.card').length));e(n,Math.floor(Math.random()*$('.shown',n).length))},600)}(); \ No newline at end of file diff --git a/home/public/js/stickyfill.js b/home/public/js/stickyfill.js index b6498ef1f7..e625bb7a5f 100755 --- a/home/public/js/stickyfill.js +++ b/home/public/js/stickyfill.js @@ -6,4 +6,4 @@ * MIT License */ -!function(a,b){function c(){y=D=z=A=B=C=K}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function e(a){return parseFloat(a)||0}function f(){F={top:b.pageYOffset,left:b.pageXOffset}}function g(){return b.pageXOffset!=F.left?(f(),void z()):void(b.pageYOffset!=F.top&&(f(),i()))}function h(a){setTimeout(function(){b.pageYOffset!=F.top&&(F.top=b.pageYOffset,i())},0)}function i(){for(var a=H.length-1;a>=0;a--)j(H[a])}function j(a){if(a.inited){var b=F.top<=a.limit.start?0:F.top>=a.limit.end?2:1;a.mode!=b&&p(a,b)}}function k(){for(var a=H.length-1;a>=0;a--)if(H[a].inited){var b=Math.abs(t(H[a].clone)-H[a].docOffsetTop),c=Math.abs(H[a].parent.node.offsetHeight-H[a].parent.height);if(b>=2||c>=2)return!1}return!0}function l(a){isNaN(parseFloat(a.computed.top))||a.isCell||"none"==a.computed.display||(a.inited=!0,a.clone||q(a),"absolute"!=a.parent.computed.position&&"relative"!=a.parent.computed.position&&(a.parent.node.style.position="relative"),j(a),a.parent.height=a.parent.node.offsetHeight,a.docOffsetTop=t(a.clone))}function m(a){var b=!0;a.clone&&r(a),d(a.node.style,a.css);for(var c=H.length-1;c>=0;c--)if(H[c].node!==a.node&&H[c].parent.node===a.parent.node){b=!1;break}b&&(a.parent.node.style.position=a.parent.css.position),a.mode=-1}function n(){for(var a=H.length-1;a>=0;a--)l(H[a])}function o(){for(var a=H.length-1;a>=0;a--)m(H[a])}function p(a,b){var c=a.node.style;switch(b){case 0:c.position="absolute",c.left=a.offset.left+"px",c.right=a.offset.right+"px",c.top=a.offset.top+"px",c.bottom="auto",c.width="auto",c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 1:c.position="fixed",c.left=a.box.left+"px",c.right=a.box.right+"px",c.top=a.css.top,c.bottom="auto",c.width="auto",c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 2:c.position="absolute",c.left=a.offset.left+"px",c.right=a.offset.right+"px",c.top="auto",c.bottom=0,c.width="auto",c.marginLeft=0,c.marginRight=0}a.mode=b}function q(a){a.clone=document.createElement("div");var b=a.node.nextSibling||a.node,c=a.clone.style;c.height=a.height+"px",c.width=a.width+"px",c.marginTop=a.computed.marginTop,c.marginBottom=a.computed.marginBottom,c.marginLeft=a.computed.marginLeft,c.marginRight=a.computed.marginRight,c.padding=c.border=c.borderSpacing=0,c.fontSize="1em",c.position="static",c.cssFloat=a.computed.cssFloat,a.node.parentNode.insertBefore(a.clone,b)}function r(a){a.clone.parentNode.removeChild(a.clone),a.clone=void 0}function s(a){var b=getComputedStyle(a),c=a.parentNode,d=getComputedStyle(c),f=a.style.position;a.style.position="relative";var g={top:b.top,marginTop:b.marginTop,marginBottom:b.marginBottom,marginLeft:b.marginLeft,marginRight:b.marginRight,cssFloat:b.cssFloat,display:b.display},h={top:e(b.top),marginBottom:e(b.marginBottom),paddingLeft:e(b.paddingLeft),paddingRight:e(b.paddingRight),borderLeftWidth:e(b.borderLeftWidth),borderRightWidth:e(b.borderRightWidth)};a.style.position=f;var i={position:a.style.position,top:a.style.top,bottom:a.style.bottom,left:a.style.left,right:a.style.right,width:a.style.width,marginTop:a.style.marginTop,marginLeft:a.style.marginLeft,marginRight:a.style.marginRight},j=u(a),k=u(c),l={node:c,css:{position:c.style.position},computed:{position:d.position},numeric:{borderLeftWidth:e(d.borderLeftWidth),borderRightWidth:e(d.borderRightWidth),borderTopWidth:e(d.borderTopWidth),borderBottomWidth:e(d.borderBottomWidth)}},m={node:a,box:{left:j.win.left,right:J.clientWidth-j.win.right},offset:{top:j.win.top-k.win.top-l.numeric.borderTopWidth,left:j.win.left-k.win.left-l.numeric.borderLeftWidth,right:-j.win.right+k.win.right-l.numeric.borderRightWidth},css:i,isCell:"table-cell"==b.display,computed:g,numeric:h,width:j.win.right-j.win.left,height:j.win.bottom-j.win.top,mode:-1,inited:!1,parent:l,limit:{start:j.doc.top-h.top,end:k.doc.top+c.offsetHeight-l.numeric.borderBottomWidth-a.offsetHeight-h.top-h.marginBottom}};return m}function t(a){for(var b=0;a;)b+=a.offsetTop,a=a.offsetParent;return b}function u(a){var c=a.getBoundingClientRect();return{doc:{top:c.top+b.pageYOffset,left:c.left+b.pageXOffset},win:c}}function v(){G=setInterval(function(){!k()&&z()},500)}function w(){clearInterval(G)}function x(){I&&(document[L]?w():v())}function y(){I||(f(),n(),b.addEventListener("scroll",g),b.addEventListener("wheel",h),b.addEventListener("resize",z),b.addEventListener("orientationchange",z),a.addEventListener(M,x),v(),I=!0)}function z(){if(I){o();for(var a=H.length-1;a>=0;a--)H[a]=s(H[a].node);n()}}function A(){b.removeEventListener("scroll",g),b.removeEventListener("wheel",h),b.removeEventListener("resize",z),b.removeEventListener("orientationchange",z),a.removeEventListener(M,x),w(),I=!1}function B(){A(),o()}function C(){for(B();H.length;)H.pop()}function D(a){for(var b=H.length-1;b>=0;b--)if(H[b].node===a)return;var c=s(a);H.push(c),I?l(c):y()}function E(a){for(var b=H.length-1;b>=0;b--)H[b].node===a&&(m(H[b]),H.splice(b,1))}var F,G,H=[],I=!1,J=a.documentElement,K=function(){},L="hidden",M="visibilitychange";void 0!==a.webkitHidden&&(L="webkitHidden",M="webkitvisibilitychange"),b.getComputedStyle||c();for(var N=["","-webkit-","-moz-","-ms-"],O=document.createElement("div"),P=N.length-1;P>=0;P--){try{O.style.position=N[P]+"sticky"}catch(Q){}""!=O.style.position&&c()}f(),b.Stickyfill={stickies:H,add:D,remove:E,init:y,rebuild:z,pause:A,stop:B,kill:C}}(document,window),window.jQuery&&!function($){$.fn.Stickyfill=function(a){return this.each(function(){Stickyfill.add(this)}),this}}(window.jQuery); \ No newline at end of file +!function(a,b){function c(){y=D=z=A=B=C=K}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function e(a){return parseFloat(a)||0}function f(){F={top:b.pageYOffset,left:b.pageXOffset}}function g(){return b.pageXOffset!=F.left?(f(),void z()):void(b.pageYOffset!=F.top&&(f(),i()))}function h(a){setTimeout(function(){b.pageYOffset!=F.top&&(F.top=b.pageYOffset,i())},0)}function i(){for(var a=H.length-1;a>=0;a--)j(H[a])}function j(a){if(a.inited){var b=F.top<=a.limit.start?0:F.top>=a.limit.end?2:1;a.mode!=b&&p(a,b)}}function k(){for(var a=H.length-1;a>=0;a--)if(H[a].inited){var b=Math.abs(t(H[a].clone)-H[a].docOffsetTop),c=Math.abs(H[a].parent.node.offsetHeight-H[a].parent.height);if(b>=2||c>=2)return!1}return!0}function l(a){isNaN(parseFloat(a.computed.top))||a.isCell||'none'==a.computed.display||(a.inited=!0,a.clone||q(a),'absolute'!=a.parent.computed.position&&'relative'!=a.parent.computed.position&&(a.parent.node.style.position='relative'),j(a),a.parent.height=a.parent.node.offsetHeight,a.docOffsetTop=t(a.clone))}function m(a){var b=!0;a.clone&&r(a),d(a.node.style,a.css);for(var c=H.length-1;c>=0;c--)if(H[c].node!==a.node&&H[c].parent.node===a.parent.node){b=!1;break}b&&(a.parent.node.style.position=a.parent.css.position),a.mode=-1}function n(){for(var a=H.length-1;a>=0;a--)l(H[a])}function o(){for(var a=H.length-1;a>=0;a--)m(H[a])}function p(a,b){var c=a.node.style;switch(b){case 0:c.position='absolute',c.left=a.offset.left+'px',c.right=a.offset.right+'px',c.top=a.offset.top+'px',c.bottom='auto',c.width='auto',c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 1:c.position='fixed',c.left=a.box.left+'px',c.right=a.box.right+'px',c.top=a.css.top,c.bottom='auto',c.width='auto',c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 2:c.position='absolute',c.left=a.offset.left+'px',c.right=a.offset.right+'px',c.top='auto',c.bottom=0,c.width='auto',c.marginLeft=0,c.marginRight=0}a.mode=b}function q(a){a.clone=document.createElement('div');var b=a.node.nextSibling||a.node,c=a.clone.style;c.height=a.height+'px',c.width=a.width+'px',c.marginTop=a.computed.marginTop,c.marginBottom=a.computed.marginBottom,c.marginLeft=a.computed.marginLeft,c.marginRight=a.computed.marginRight,c.padding=c.border=c.borderSpacing=0,c.fontSize='1em',c.position='static',c.cssFloat=a.computed.cssFloat,a.node.parentNode.insertBefore(a.clone,b)}function r(a){a.clone.parentNode.removeChild(a.clone),a.clone=void 0}function s(a){var b=getComputedStyle(a),c=a.parentNode,d=getComputedStyle(c),f=a.style.position;a.style.position='relative';var g={top:b.top,marginTop:b.marginTop,marginBottom:b.marginBottom,marginLeft:b.marginLeft,marginRight:b.marginRight,cssFloat:b.cssFloat,display:b.display},h={top:e(b.top),marginBottom:e(b.marginBottom),paddingLeft:e(b.paddingLeft),paddingRight:e(b.paddingRight),borderLeftWidth:e(b.borderLeftWidth),borderRightWidth:e(b.borderRightWidth)};a.style.position=f;var i={position:a.style.position,top:a.style.top,bottom:a.style.bottom,left:a.style.left,right:a.style.right,width:a.style.width,marginTop:a.style.marginTop,marginLeft:a.style.marginLeft,marginRight:a.style.marginRight},j=u(a),k=u(c),l={node:c,css:{position:c.style.position},computed:{position:d.position},numeric:{borderLeftWidth:e(d.borderLeftWidth),borderRightWidth:e(d.borderRightWidth),borderTopWidth:e(d.borderTopWidth),borderBottomWidth:e(d.borderBottomWidth)}},m={node:a,box:{left:j.win.left,right:J.clientWidth-j.win.right},offset:{top:j.win.top-k.win.top-l.numeric.borderTopWidth,left:j.win.left-k.win.left-l.numeric.borderLeftWidth,right:-j.win.right+k.win.right-l.numeric.borderRightWidth},css:i,isCell:'table-cell'==b.display,computed:g,numeric:h,width:j.win.right-j.win.left,height:j.win.bottom-j.win.top,mode:-1,inited:!1,parent:l,limit:{start:j.doc.top-h.top,end:k.doc.top+c.offsetHeight-l.numeric.borderBottomWidth-a.offsetHeight-h.top-h.marginBottom}};return m}function t(a){for(var b=0;a;)b+=a.offsetTop,a=a.offsetParent;return b}function u(a){var c=a.getBoundingClientRect();return{doc:{top:c.top+b.pageYOffset,left:c.left+b.pageXOffset},win:c}}function v(){G=setInterval(function(){!k()&&z()},500)}function w(){clearInterval(G)}function x(){I&&(document[L]?w():v())}function y(){I||(f(),n(),b.addEventListener('scroll',g),b.addEventListener('wheel',h),b.addEventListener('resize',z),b.addEventListener('orientationchange',z),a.addEventListener(M,x),v(),I=!0)}function z(){if(I){o();for(var a=H.length-1;a>=0;a--)H[a]=s(H[a].node);n()}}function A(){b.removeEventListener('scroll',g),b.removeEventListener('wheel',h),b.removeEventListener('resize',z),b.removeEventListener('orientationchange',z),a.removeEventListener(M,x),w(),I=!1}function B(){A(),o()}function C(){for(B();H.length;)H.pop()}function D(a){for(var b=H.length-1;b>=0;b--)if(H[b].node===a)return;var c=s(a);H.push(c),I?l(c):y()}function E(a){for(var b=H.length-1;b>=0;b--)H[b].node===a&&(m(H[b]),H.splice(b,1))}var F,G,H=[],I=!1,J=a.documentElement,K=function(){},L='hidden',M='visibilitychange';void 0!==a.webkitHidden&&(L='webkitHidden',M='webkitvisibilitychange'),b.getComputedStyle||c();for(var N=['','-webkit-','-moz-','-ms-'],O=document.createElement('div'),P=N.length-1;P>=0;P--){try{O.style.position=N[P]+'sticky'}catch(Q){}''!=O.style.position&&c()}f(),b.Stickyfill={stickies:H,add:D,remove:E,init:y,rebuild:z,pause:A,stop:B,kill:C}}(document,window),window.jQuery&&!function($){$.fn.Stickyfill=function(a){return this.each(function(){Stickyfill.add(this)}),this}}(window.jQuery); \ No newline at end of file diff --git a/home/public/js/switch.js b/home/public/js/switch.js index 6cf6a979ff..c71f77847f 100755 --- a/home/public/js/switch.js +++ b/home/public/js/switch.js @@ -1,8 +1,8 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Switch=e():t.Switch=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=o(r);e.default=i.default,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){this._init(t,e)}function i(){}function c(t,e,n){S(t).add("switch","switch-"+(C.includes(e.size)?e.size:"default"),e.checked?j:M),h.call(n),a.call(n),l.call(n),f.call(n,n._options.disabled)}function s(t,e){t.setAttribute("tabindex",0),t.setAttribute("role","checkbox"),t.setAttribute("aria-checked",e.checked),t.setAttribute("aria-disabled",e.disabled)}function u(t,e){e.parentNode.insertBefore(t,e.nextSibling)}function a(){this._el.checked?(this._switch.style.boxShadow="inset 0 0 0 "+this._switch.clientHeight/1.8+"px "+this._options.onSwitchColor,this._switch.style.border="1px solid "+this._options.onSwitchColor,this._switch.style.transition="border 0.4s, box-shadow 0.4s, background-color 1.4s",this._switch.style.backgroundColor=this._options.onSwitchColor,this._jack.style.backgroundColor=this._options.onJackColor):(this._switch.style.boxShadow="inset 0 0 0 0 "+this._options.offSwitchColor,this._switch.style.border="1px solid "+O,this._switch.style.transition="border 0.4s, box-shadow 0.4s",this._switch.style.backgroundColor=this._options.offSwitchColor,this._jack.style.backgroundColor=this._options.offJackColor)}function f(t){this._el.disabled=t,S(this._switch)[t?"add":"remove"]("switch-disabled"),this._switch.setAttribute("aria-disabled",t)}function l(){var t=this._switch.clientWidth-this._jack.clientWidth;this._jack.style.left=this._el.checked?t+"px":0}function h(){this._options.showText&&(this._jack.innerHTML=this._el.checked?this._options.onText:this._options.offText)}function p(t,e){return e?((0,k.default)(e).forEach(function(n){t[n]=e[n]}),t):t}function d(t,e){var n=!0,o=!1,r=void 0;try{for(var i,c=function(){var t=(0,g.default)(i.value,2),e=t[0],n=t[1];e=e.split(" "),function(t,e){n.addEventListener(t,T[e])}(e[0],e[1])},s=(0,m.default)(t);!(n=(i=s.next()).done);n=!0)c()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}}function v(t,e){var n=!0,o=!1,r=void 0;try{for(var i,c=function(){var t=(0,g.default)(i.value,2),e=t[0],n=t[1];e=e.split(" "),function(t,e){console.log(),n.removeEventListener(t,T[e])}(e[0],e[1])},s=(0,m.default)(t);!(n=(i=s.next()).done);n=!0)c()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}}Object.defineProperty(e,"__esModule",{value:!0});var y=n(2),g=o(y),_=n(55),m=o(_),w=n(59),k=o(w),x=n(63),b=o(x);n(83);var E=n(87),S=n(88),C=["default","large","small"],T={changeSwitchStateFromCheckbox:function(){this._switch._toggle(this.checked)},changeSwitchStateFromSwitch:function(){this._instance._options.disabled||this._instance._toggle()},changeSwitchStateFromKeyboard:function(t){var e=t.which||t.keyCode||0;this._instance._options.disabled||13===e&&this._instance._toggle()}},O="#dfdfdf",j="switch-on",M="switch-off";r.prototype._init=function(t,e){var n={size:"default",checked:void 0,onText:"Y",offText:"N",onSwitchColor:"#64BD63",offSwitchColor:"#fff",onJackColor:"#fff",offJackColor:"#fff",showText:!1,disabled:!1,onInit:i,beforeChange:i,onChange:i,beforeRemove:i,onRemove:i,beforeDestroy:i,onDestroy:i};if(t&&1===t.nodeType&&"checkbox"===t.type){if(t._switch)return t._switch;if(!this instanceof r)return new r(t,e);this._el=t,this._el._switch=this,this._options=p(n,e),this._initElement(),this._initEvents(),this._options.onInit.call(this)}},r.prototype._initElement=function(){this._el.style.display="none",void 0!==this._options.checked?this._el.checked=Boolean(this._options.checked):this._options.checked=this._el.checked;var t=this._createSwitch();s(t,this._options),u(t,this._el),c(t,this._options,this),E.attach(t)},r.prototype._createSwitch=function(){return this._switch=document.createElement("span"),this._jack=document.createElement("small"),this._switch.appendChild(this._jack),this._switch._instance=this,this._switch},r.prototype._initEvents=function(){this._events=new b.default([["change changeSwitchStateFromCheckbox",this._el],["click changeSwitchStateFromSwitch",this._switch],["keypress changeSwitchStateFromKeyboard",this._switch]]),d(this._events,this)},r.prototype._toggle=function(t){this._options.beforeChange.call(this,this._el.checked),this._el.checked=void 0===t?!this._el.checked:t,this._options.onChange.call(this,this._el.checked);var e=this._el.checked?j:M,n=this._el.checked?M:j;this._switch.setAttribute("aria-checked",this._el.checked),S(this._switch).add(e).remove(n),l.call(this),h.call(this),a.call(this)},r.prototype.getChecked=function(){return this._el.checked},r.prototype.on=function(){this._toggle(!0)},r.prototype.off=function(){this._toggle(!1)},r.prototype.toggle=function(){this._toggle()},r.prototype.disable=function(){f.call(this,this._options.disabled=!0)},r.prototype.enable=function(){f.call(this,this._options.disabled=!1)},r.prototype.destroy=function(){this._options.beforeDestroy.call(this,this._el.checked),v(this._events,this),this._options.onDestroy.call(this)},r.prototype.remove=function(){this._options.beforeRemove.call(this,this._el.checked);try{this._el.setAttribute("style",this._el.getAttribute("style").replace(/\s*display:\s*none;/g,""))}catch(t){}this._switch.parentNode&&(this._switch.parentNode.removeChild(this._switch),this._options.onRemove.call(this))},e.default=r,t.exports=e.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(3),i=o(r),c=n(55),s=o(c);e.default=function(){function t(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var c,u=(0,s.default)(t);!(o=(c=u.next()).done)&&(n.push(c.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&u.return&&u.return()}finally{if(r)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if((0,i.default)(Object(e)))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e,n){t.exports={default:n(4),__esModule:!0}},function(t,e,n){n(5),n(51),t.exports=n(53)},function(t,e,n){n(6);for(var o=n(17),r=n(21),i=n(9),c=n(48)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var a=s[u],f=o[a],l=f&&f.prototype;l&&!l[c]&&r(l,c,a),i[a]=i.Array}},function(t,e,n){"use strict";var o=n(7),r=n(8),i=n(9),c=n(10);t.exports=n(14)(Array,"Array",function(t,e){this._t=c(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,n):"values"==e?r(0,t[n]):r(0,[n,t[n]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports={}},function(t,e,n){var o=n(11),r=n(13);t.exports=function(t){return o(r(t))}},function(t,e,n){var o=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var o=n(15),r=n(16),i=n(31),c=n(21),s=n(32),u=n(9),a=n(33),f=n(47),l=n(49),h=n(48)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",y="values",g=function(){return this};t.exports=function(t,e,n,_,m,w,k){a(n,e,_);var x,b,E,S=function(t){if(!p&&t in j)return j[t];switch(t){case v:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",T=m==y,O=!1,j=t.prototype,M=j[h]||j[d]||m&&j[m],A=M||S(m),L=m?T?S("entries"):A:void 0,N="Array"==e?j.entries||M:M;if(N&&(E=l(N.call(new t)),E!==Object.prototype&&(f(E,C,!0),o||s(E,h)||c(E,h,g))),T&&M&&M.name!==y&&(O=!0,A=function(){return M.call(this)}),o&&!k||!p&&!O&&j[h]||c(j,h,A),u[e]=A,u[C]=g,m)if(x={values:T?A:S(y),keys:w?A:S(v),entries:L},k)for(b in x)b in j||i(j,b,x[b]);else r(r.P+r.F*(p||O),e,x);return x}},function(t,e){t.exports=!0},function(t,e,n){var o=n(17),r=n(18),i=n(19),c=n(21),s="prototype",u=function(t,e,n){var a,f,l,h=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,y=t&u.B,g=t&u.W,_=p?r:r[e]||(r[e]={}),m=_[s],w=p?o:d?o[e]:(o[e]||{})[s];p&&(n=e);for(a in n)f=!h&&w&&void 0!==w[a],f&&a in _||(l=f?w[a]:n[a],_[a]=p&&"function"!=typeof w[a]?n[a]:y&&f?i(l,o):g&&w[a]==l?function(t){var e=function(e,n,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return t.apply(this,arguments)};return e[s]=t[s],e}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((_.virtual||(_.virtual={}))[a]=l,t&u.R&&m&&!m[a]&&c(m,a,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var o=n(20);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,r){return t.call(e,n,o,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var o=n(22),r=n(30);t.exports=n(26)?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(23),r=n(25),i=n(29),c=Object.defineProperty;e.f=n(26)?Object.defineProperty:function(t,e,n){if(o(t),e=i(e,!0),o(n),r)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(24);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(26)&&!n(27)(function(){return 7!=Object.defineProperty(n(28)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var o=n(24),r=n(17).document,i=o(r)&&o(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e,n){var o=n(24);t.exports=function(t,e){if(!o(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!o(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports=n(21)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";var o=n(34),r=n(30),i=n(47),c={};n(21)(c,n(48)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=o(c,{next:r(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var o=n(23),r=n(35),i=n(45),c=n(42)("IE_PROTO"),s=function(){},u="prototype",a=function(){var t,e=n(28)("iframe"),o=i.length,r="<",c=">";for(e.style.display="none",n(46).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+c+"document.F=Object"+r+"/script"+c),t.close(),a=t.F;o--;)delete a[u][i[o]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=o(t),n=new s,s[u]=null,n[c]=t):n=a(),void 0===e?n:r(n,e)}},function(t,e,n){var o=n(22),r=n(23),i=n(36);t.exports=n(26)?Object.defineProperties:function(t,e){r(t);for(var n,c=i(e),s=c.length,u=0;s>u;)o.f(t,n=c[u++],e[n]);return t}},function(t,e,n){var o=n(37),r=n(45);t.exports=Object.keys||function(t){return o(t,r)}},function(t,e,n){var o=n(32),r=n(10),i=n(38)(!1),c=n(42)("IE_PROTO");t.exports=function(t,e){var n,s=r(t),u=0,a=[];for(n in s)n!=c&&o(s,n)&&a.push(n);for(;e.length>u;)o(s,n=e[u++])&&(~i(a,n)||a.push(n));return a}},function(t,e,n){var o=n(10),r=n(39),i=n(41);t.exports=function(t){return function(e,n,c){var s,u=o(e),a=r(u.length),f=i(c,a);if(t&&n!=n){for(;a>f;)if(s=u[f++],s!=s)return!0}else for(;a>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var o=n(40),r=Math.min;t.exports=function(t){return t>0?r(o(t),9007199254740991):0}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){var o=n(40),r=Math.max,i=Math.min;t.exports=function(t,e){return t=o(t),t<0?r(t+e,0):i(t,e)}},function(t,e,n){var o=n(43)("keys"),r=n(44);t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e,n){var o=n(17),r="__core-js_shared__",i=o[r]||(o[r]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){t.exports=n(17).document&&document.documentElement},function(t,e,n){var o=n(22).f,r=n(32),i=n(48)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&o(t,i,{configurable:!0,value:e})}},function(t,e,n){var o=n(43)("wks"),r=n(44),i=n(17).Symbol,c="function"==typeof i,s=t.exports=function(t){return o[t]||(o[t]=c&&i[t]||(c?i:r)("Symbol."+t))};s.store=o},function(t,e,n){var o=n(32),r=n(50),i=n(42)("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),o(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){var o=n(13);t.exports=function(t){return Object(o(t))}},function(t,e,n){"use strict";var o=n(52)(!0);n(14)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=o(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var o=n(40),r=n(13);t.exports=function(t){return function(e,n){var i,c,s=String(r(e)),u=o(n),a=s.length;return u<0||u>=a?t?"":void 0:(i=s.charCodeAt(u),i<55296||i>56319||u+1===a||(c=s.charCodeAt(u+1))<56320||c>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(c-56320)+65536)}}},function(t,e,n){var o=n(54),r=n(48)("iterator"),i=n(9);t.exports=n(18).isIterable=function(t){var e=Object(t);return void 0!==e[r]||"@@iterator"in e||i.hasOwnProperty(o(e))}},function(t,e,n){var o=n(12),r=n(48)("toStringTag"),i="Arguments"==o(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),r))?n:i?o(e):"Object"==(s=o(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){t.exports={default:n(56),__esModule:!0}},function(t,e,n){n(5),n(51),t.exports=n(57)},function(t,e,n){var o=n(23),r=n(58);t.exports=n(18).getIterator=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return o(e.call(t))}},function(t,e,n){var o=n(54),r=n(48)("iterator"),i=n(9);t.exports=n(18).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||i[o(t)]}},function(t,e,n){t.exports={default:n(60),__esModule:!0}},function(t,e,n){n(61),t.exports=n(18).Object.keys},function(t,e,n){var o=n(50),r=n(36);n(62)("keys",function(){return function(t){return r(o(t))}})},function(t,e,n){var o=n(16),r=n(18),i=n(27);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],c={};c[t]=e(n),o(o.S+o.F*i(function(){n(1)}),"Object",c)}},function(t,e,n){t.exports={default:n(64),__esModule:!0}},function(t,e,n){n(65),n(51),n(5),n(66),n(80),t.exports=n(18).Map},function(t,e){},function(t,e,n){"use strict";var o=n(67);t.exports=n(75)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=o.getEntry(this,t);return e&&e.v},set:function(t,e){return o.def(this,0===t?0:t,e)}},o,!0)},function(t,e,n){"use strict";var o=n(22).f,r=n(34),i=n(68),c=n(19),s=n(69),u=n(13),a=n(70),f=n(14),l=n(8),h=n(73),p=n(26),d=n(74).fastKey,v=p?"_s":"size",y=function(t,e){var n,o=d(e);if("F"!==o)return t._i[o];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,f){var l=t(function(t,o){s(t,l,e,"_i"),t._i=r(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=o&&a(o,n,t[f],t)});return i(l.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var e=this,n=y(e,t);if(n){var o=n.n,r=n.p;delete e._i[n.i],n.r=!0,r&&(r.n=o),o&&(o.p=r),e._f==n&&(e._f=o),e._l==n&&(e._l=r),e[v]--}return!!n},forEach:function(t){s(this,l,"forEach");for(var e,n=c(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),p&&o(l.prototype,"size",{get:function(){return u(this[v])}}),l},def:function(t,e,n){var o,r,i=y(t,e);return i?i.v=n:(t._l=i={i:r=d(e,!0),k:e,v:n,p:o=t._l,n:void 0,r:!1},t._f||(t._f=i),o&&(o.n=i),t[v]++,"F"!==r&&(t._i[r]=i)),t},getEntry:y,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),h(e)}}},function(t,e,n){var o=n(21);t.exports=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:o(t,r,e[r]);return t}},function(t,e){t.exports=function(t,e,n,o){if(!(t instanceof e)||void 0!==o&&o in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var o=n(19),r=n(71),i=n(72),c=n(23),s=n(39),u=n(58),a={},f={},e=t.exports=function(t,e,n,l,h){var p,d,v,y,g=h?function(){return t}:u(t),_=o(n,l,e?2:1),m=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(p=s(t.length);p>m;m++)if(y=e?_(c(d=t[m])[0],d[1]):_(t[m]),y===a||y===f)return y}else for(v=g.call(t);!(d=v.next()).done;)if(y=r(v,_,d.value,e),y===a||y===f)return y};e.BREAK=a,e.RETURN=f},function(t,e,n){var o=n(23);t.exports=function(t,e,n,r){try{return r?e(o(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&o(i.call(t)),e}}},function(t,e,n){var o=n(9),r=n(48)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||i[r]===t)}},function(t,e,n){"use strict";var o=n(17),r=n(18),i=n(22),c=n(26),s=n(48)("species");t.exports=function(t){var e="function"==typeof r[t]?r[t]:o[t];c&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var o=n(44)("meta"),r=n(24),i=n(32),c=n(22).f,s=0,u=Object.isExtensible||function(){return!0},a=!n(27)(function(){return u(Object.preventExtensions({}))}),f=function(t){c(t,o,{value:{i:"O"+ ++s,w:{}}})},l=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,o)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[o].i},h=function(t,e){if(!i(t,o)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[o].w},p=function(t){return a&&d.NEED&&u(t)&&!i(t,o)&&f(t),t},d=t.exports={KEY:o,NEED:!1,fastKey:l,getWeak:h,onFreeze:p}},function(t,e,n){"use strict";var o=n(17),r=n(16),i=n(74),c=n(27),s=n(21),u=n(68),a=n(70),f=n(69),l=n(24),h=n(47),p=n(22).f,d=n(76)(0),v=n(26);t.exports=function(t,e,n,y,g,_){var m=o[t],w=m,k=g?"set":"add",x=w&&w.prototype,b={};return v&&"function"==typeof w&&(_||x.forEach&&!c(function(){(new w).entries().next()}))?(w=e(function(e,n){f(e,w,t,"_c"),e._c=new m,void 0!=n&&a(n,g,e[k],e)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in x&&(!_||"clear"!=t)&&s(w.prototype,t,function(n,o){if(f(this,w,t),!e&&_&&!l(n))return"get"==t&&void 0;var r=this._c[t](0===n?0:n,o);return e?this:r})}),"size"in x&&p(w.prototype,"size",{get:function(){return this._c.size}})):(w=y.getConstructor(e,t,g,k),u(w.prototype,n),i.NEED=!0),h(w,t),b[t]=w,r(r.G+r.W+r.F,b),_||y.setStrong(w,t,g),w}},function(t,e,n){var o=n(19),r=n(11),i=n(50),c=n(39),s=n(77);t.exports=function(t,e){var n=1==t,u=2==t,a=3==t,f=4==t,l=6==t,h=5==t||l,p=e||s;return function(e,s,d){for(var v,y,g=i(e),_=r(g),m=o(s,d,3),w=c(_.length),k=0,x=n?p(e,w):u?p(e,0):void 0;w>k;k++)if((h||k in _)&&(v=_[k],y=m(v,k,g),t))if(n)x[k]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return k;case 2:x.push(v)}else if(f)return!1;return l?-1:a||f?f:x}}},function(t,e,n){var o=n(78);t.exports=function(t,e){return new(o(t))(e)}},function(t,e,n){var o=n(24),r=n(79),i=n(48)("species");t.exports=function(t){var e;return r(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!r(e.prototype)||(e=void 0),o(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,n){var o=n(12);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,n){var o=n(16);o(o.P+o.R,"Map",{toJSON:n(81)("Map")})},function(t,e,n){var o=n(54),r=n(82);t.exports=function(t){return function(){if(o(this)!=t)throw TypeError(t+"#toJSON isn't generic");return r(this)}}},function(t,e,n){var o=n(70);t.exports=function(t,e){var n=[];return o(t,!1,n.push,n,e),n}},function(t,e){},,,,function(t,e,n){var o;!function(){"use strict";/** +!function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports.Switch=e():t.Switch=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p='',e(0)}([function(t,e,n){'use strict';function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,'__esModule',{value:!0});var r=n(1),i=o(r);e.default=i.default,t.exports=e.default},function(t,e,n){'use strict';function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){this._init(t,e)}function i(){}function c(t,e,n){S(t).add('switch','switch-'+(C.includes(e.size)?e.size:'default'),e.checked?j:M),h.call(n),a.call(n),l.call(n),f.call(n,n._options.disabled)}function s(t,e){t.setAttribute('tabindex',0),t.setAttribute('role','checkbox'),t.setAttribute('aria-checked',e.checked),t.setAttribute('aria-disabled',e.disabled)}function u(t,e){e.parentNode.insertBefore(t,e.nextSibling)}function a(){this._el.checked?(this._switch.style.boxShadow='inset 0 0 0 '+this._switch.clientHeight/1.8+'px '+this._options.onSwitchColor,this._switch.style.border='1px solid '+this._options.onSwitchColor,this._switch.style.transition='border 0.4s, box-shadow 0.4s, background-color 1.4s',this._switch.style.backgroundColor=this._options.onSwitchColor,this._jack.style.backgroundColor=this._options.onJackColor):(this._switch.style.boxShadow='inset 0 0 0 0 '+this._options.offSwitchColor,this._switch.style.border='1px solid '+O,this._switch.style.transition='border 0.4s, box-shadow 0.4s',this._switch.style.backgroundColor=this._options.offSwitchColor,this._jack.style.backgroundColor=this._options.offJackColor)}function f(t){this._el.disabled=t,S(this._switch)[t?'add':'remove']('switch-disabled'),this._switch.setAttribute('aria-disabled',t)}function l(){var t=this._switch.clientWidth-this._jack.clientWidth;this._jack.style.left=this._el.checked?t+'px':0}function h(){this._options.showText&&(this._jack.innerHTML=this._el.checked?this._options.onText:this._options.offText)}function p(t,e){return e?((0,k.default)(e).forEach(function(n){t[n]=e[n]}),t):t}function d(t,e){var n=!0,o=!1,r=void 0;try{for(var i,c=function(){var t=(0,g.default)(i.value,2),e=t[0],n=t[1];e=e.split(' '),function(t,e){n.addEventListener(t,T[e])}(e[0],e[1])},s=(0,m.default)(t);!(n=(i=s.next()).done);n=!0)c()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}}function v(t,e){var n=!0,o=!1,r=void 0;try{for(var i,c=function(){var t=(0,g.default)(i.value,2),e=t[0],n=t[1];e=e.split(' '),function(t,e){console.log(),n.removeEventListener(t,T[e])}(e[0],e[1])},s=(0,m.default)(t);!(n=(i=s.next()).done);n=!0)c()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}}Object.defineProperty(e,'__esModule',{value:!0});var y=n(2),g=o(y),_=n(55),m=o(_),w=n(59),k=o(w),x=n(63),b=o(x);n(83);var E=n(87),S=n(88),C=['default','large','small'],T={changeSwitchStateFromCheckbox:function(){this._switch._toggle(this.checked)},changeSwitchStateFromSwitch:function(){this._instance._options.disabled||this._instance._toggle()},changeSwitchStateFromKeyboard:function(t){var e=t.which||t.keyCode||0;this._instance._options.disabled||13===e&&this._instance._toggle()}},O='#dfdfdf',j='switch-on',M='switch-off';r.prototype._init=function(t,e){var n={size:'default',checked:void 0,onText:'Y',offText:'N',onSwitchColor:'#64BD63',offSwitchColor:'#fff',onJackColor:'#fff',offJackColor:'#fff',showText:!1,disabled:!1,onInit:i,beforeChange:i,onChange:i,beforeRemove:i,onRemove:i,beforeDestroy:i,onDestroy:i};if(t&&1===t.nodeType&&'checkbox'===t.type){if(t._switch)return t._switch;if(!(this instanceof r))return new r(t,e);this._el=t,this._el._switch=this,this._options=p(n,e),this._initElement(),this._initEvents(),this._options.onInit.call(this)}},r.prototype._initElement=function(){this._el.style.display='none',void 0!==this._options.checked?this._el.checked=Boolean(this._options.checked):this._options.checked=this._el.checked;var t=this._createSwitch();s(t,this._options),u(t,this._el),c(t,this._options,this),E.attach(t)},r.prototype._createSwitch=function(){return this._switch=document.createElement('span'),this._jack=document.createElement('small'),this._switch.appendChild(this._jack),this._switch._instance=this,this._switch},r.prototype._initEvents=function(){this._events=new b.default([['change changeSwitchStateFromCheckbox',this._el],['click changeSwitchStateFromSwitch',this._switch],['keypress changeSwitchStateFromKeyboard',this._switch]]),d(this._events,this)},r.prototype._toggle=function(t){this._options.beforeChange.call(this,this._el.checked),this._el.checked=void 0===t?!this._el.checked:t,this._options.onChange.call(this,this._el.checked);var e=this._el.checked?j:M,n=this._el.checked?M:j;this._switch.setAttribute('aria-checked',this._el.checked),S(this._switch).add(e).remove(n),l.call(this),h.call(this),a.call(this)},r.prototype.getChecked=function(){return this._el.checked},r.prototype.on=function(){this._toggle(!0)},r.prototype.off=function(){this._toggle(!1)},r.prototype.toggle=function(){this._toggle()},r.prototype.disable=function(){f.call(this,this._options.disabled=!0)},r.prototype.enable=function(){f.call(this,this._options.disabled=!1)},r.prototype.destroy=function(){this._options.beforeDestroy.call(this,this._el.checked),v(this._events,this),this._options.onDestroy.call(this)},r.prototype.remove=function(){this._options.beforeRemove.call(this,this._el.checked);try{this._el.setAttribute('style',this._el.getAttribute('style').replace(/\s*display:\s*none;/g,''))}catch(t){}this._switch.parentNode&&(this._switch.parentNode.removeChild(this._switch),this._options.onRemove.call(this))},e.default=r,t.exports=e.default},function(t,e,n){'use strict';function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(3),i=o(r),c=n(55),s=o(c);e.default=function(){function t(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var c,u=(0,s.default)(t);!(o=(c=u.next()).done)&&(n.push(c.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&u.return&&u.return()}finally{if(r)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if((0,i.default)(Object(e)))return t(e,n);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}()},function(t,e,n){t.exports={default:n(4),__esModule:!0}},function(t,e,n){n(5),n(51),t.exports=n(53)},function(t,e,n){n(6);for(var o=n(17),r=n(21),i=n(9),c=n(48)('toStringTag'),s=['NodeList','DOMTokenList','MediaList','StyleSheetList','CSSRuleList'],u=0;u<5;u++){var a=s[u],f=o[a],l=f&&f.prototype;l&&!l[c]&&r(l,c,a),i[a]=i.Array}},function(t,e,n){'use strict';var o=n(7),r=n(8),i=n(9),c=n(10);t.exports=n(14)(Array,'Array',function(t,e){this._t=c(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):'keys'==e?r(0,n):'values'==e?r(0,t[n]):r(0,[n,t[n]])},'values'),i.Arguments=i.Array,o('keys'),o('values'),o('entries')},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports={}},function(t,e,n){var o=n(11),r=n(13);t.exports=function(t){return o(r(t))}},function(t,e,n){var o=n(12);t.exports=Object('z').propertyIsEnumerable(0)?Object:function(t){return'String'==o(t)?t.split(''):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError('Can\'t call method on '+t);return t}},function(t,e,n){'use strict';var o=n(15),r=n(16),i=n(31),c=n(21),s=n(32),u=n(9),a=n(33),f=n(47),l=n(49),h=n(48)('iterator'),p=!([].keys&&'next'in[].keys()),d='@@iterator',v='keys',y='values',g=function(){return this};t.exports=function(t,e,n,_,m,w,k){a(n,e,_);var x,b,E,S=function(t){if(!p&&t in j)return j[t];switch(t){case v:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+' Iterator',T=m==y,O=!1,j=t.prototype,M=j[h]||j[d]||m&&j[m],A=M||S(m),L=m?T?S('entries'):A:void 0,N='Array'==e?j.entries||M:M;if(N&&(E=l(N.call(new t)),E!==Object.prototype&&(f(E,C,!0),o||s(E,h)||c(E,h,g))),T&&M&&M.name!==y&&(O=!0,A=function(){return M.call(this)}),o&&!k||!p&&!O&&j[h]||c(j,h,A),u[e]=A,u[C]=g,m)if(x={values:T?A:S(y),keys:w?A:S(v),entries:L},k)for(b in x)b in j||i(j,b,x[b]);else r(r.P+r.F*(p||O),e,x);return x}},function(t,e){t.exports=!0},function(t,e,n){var o=n(17),r=n(18),i=n(19),c=n(21),s='prototype',u=function(t,e,n){var a,f,l,h=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,y=t&u.B,g=t&u.W,_=p?r:r[e]||(r[e]={}),m=_[s],w=p?o:d?o[e]:(o[e]||{})[s];p&&(n=e);for(a in n)f=!h&&w&&void 0!==w[a],f&&a in _||(l=f?w[a]:n[a],_[a]=p&&'function'!=typeof w[a]?n[a]:y&&f?i(l,o):g&&w[a]==l?function(t){var e=function(e,n,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return t.apply(this,arguments)};return e[s]=t[s],e}(l):v&&'function'==typeof l?i(Function.call,l):l,v&&((_.virtual||(_.virtual={}))[a]=l,t&u.R&&m&&!m[a]&&c(m,a,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n=t.exports='undefined'!=typeof window&&window.Math==Math?window:'undefined'!=typeof self&&self.Math==Math?self:Function('return this')();'number'==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:'2.4.0'};'number'==typeof __e&&(__e=n)},function(t,e,n){var o=n(20);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,r){return t.call(e,n,o,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if('function'!=typeof t)throw TypeError(t+' is not a function!');return t}},function(t,e,n){var o=n(22),r=n(30);t.exports=n(26)?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(23),r=n(25),i=n(29),c=Object.defineProperty;e.f=n(26)?Object.defineProperty:function(t,e,n){if(o(t),e=i(e,!0),o(n),r)try{return c(t,e,n)}catch(t){}if('get'in n||'set'in n)throw TypeError('Accessors not supported!');return'value'in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(24);t.exports=function(t){if(!o(t))throw TypeError(t+' is not an object!');return t}},function(t,e){t.exports=function(t){return'object'==typeof t?null!==t:'function'==typeof t}},function(t,e,n){t.exports=!n(26)&&!n(27)(function(){return 7!=Object.defineProperty(n(28)('div'),'a',{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(27)(function(){return 7!=Object.defineProperty({},'a',{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var o=n(24),r=n(17).document,i=o(r)&&o(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e,n){var o=n(24);t.exports=function(t,e){if(!o(t))return t;var n,r;if(e&&'function'==typeof(n=t.toString)&&!o(r=n.call(t)))return r;if('function'==typeof(n=t.valueOf)&&!o(r=n.call(t)))return r;if(!e&&'function'==typeof(n=t.toString)&&!o(r=n.call(t)))return r;throw TypeError('Can\'t convert object to primitive value')}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports=n(21)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){'use strict';var o=n(34),r=n(30),i=n(47),c={};n(21)(c,n(48)('iterator'),function(){return this}),t.exports=function(t,e,n){t.prototype=o(c,{next:r(1,n)}),i(t,e+' Iterator')}},function(t,e,n){var o=n(23),r=n(35),i=n(45),c=n(42)('IE_PROTO'),s=function(){},u='prototype',a=function(){var t,e=n(28)('iframe'),o=i.length,r='<',c='>';for(e.style.display='none',n(46).appendChild(e),e.src='javascript:',t=e.contentWindow.document,t.open(),t.write(r+'script'+c+'document.F=Object'+r+'/script'+c),t.close(),a=t.F;o--;)delete a[u][i[o]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=o(t),n=new s,s[u]=null,n[c]=t):n=a(),void 0===e?n:r(n,e)}},function(t,e,n){var o=n(22),r=n(23),i=n(36);t.exports=n(26)?Object.defineProperties:function(t,e){r(t);for(var n,c=i(e),s=c.length,u=0;s>u;)o.f(t,n=c[u++],e[n]);return t}},function(t,e,n){var o=n(37),r=n(45);t.exports=Object.keys||function(t){return o(t,r)}},function(t,e,n){var o=n(32),r=n(10),i=n(38)(!1),c=n(42)('IE_PROTO');t.exports=function(t,e){var n,s=r(t),u=0,a=[];for(n in s)n!=c&&o(s,n)&&a.push(n);for(;e.length>u;)o(s,n=e[u++])&&(~i(a,n)||a.push(n));return a}},function(t,e,n){var o=n(10),r=n(39),i=n(41);t.exports=function(t){return function(e,n,c){var s,u=o(e),a=r(u.length),f=i(c,a);if(t&&n!=n){for(;a>f;)if(s=u[f++],s!=s)return!0}else for(;a>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var o=n(40),r=Math.min;t.exports=function(t){return t>0?r(o(t),9007199254740991):0}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){var o=n(40),r=Math.max,i=Math.min;t.exports=function(t,e){return t=o(t),t<0?r(t+e,0):i(t,e)}},function(t,e,n){var o=n(43)('keys'),r=n(44);t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e,n){var o=n(17),r='__core-js_shared__',i=o[r]||(o[r]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){var n=0,o=Math.random();t.exports=function(t){return'Symbol('.concat(void 0===t?'':t,')_',(++n+o).toString(36))}},function(t,e){t.exports='constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',')},function(t,e,n){t.exports=n(17).document&&document.documentElement},function(t,e,n){var o=n(22).f,r=n(32),i=n(48)('toStringTag');t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&o(t,i,{configurable:!0,value:e})}},function(t,e,n){var o=n(43)('wks'),r=n(44),i=n(17).Symbol,c='function'==typeof i,s=t.exports=function(t){return o[t]||(o[t]=c&&i[t]||(c?i:r)('Symbol.'+t))};s.store=o},function(t,e,n){var o=n(32),r=n(50),i=n(42)('IE_PROTO'),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),o(t,i)?t[i]:'function'==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){var o=n(13);t.exports=function(t){return Object(o(t))}},function(t,e,n){'use strict';var o=n(52)(!0);n(14)(String,'String',function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=o(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var o=n(40),r=n(13);t.exports=function(t){return function(e,n){var i,c,s=String(r(e)),u=o(n),a=s.length;return u<0||u>=a?t?'':void 0:(i=s.charCodeAt(u),i<55296||i>56319||u+1===a||(c=s.charCodeAt(u+1))<56320||c>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(c-56320)+65536)}}},function(t,e,n){var o=n(54),r=n(48)('iterator'),i=n(9);t.exports=n(18).isIterable=function(t){var e=Object(t);return void 0!==e[r]||'@@iterator'in e||i.hasOwnProperty(o(e))}},function(t,e,n){var o=n(12),r=n(48)('toStringTag'),i='Arguments'==o(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?'Undefined':null===t?'Null':'string'==typeof(n=c(e=Object(t),r))?n:i?o(e):'Object'==(s=o(e))&&'function'==typeof e.callee?'Arguments':s}},function(t,e,n){t.exports={default:n(56),__esModule:!0}},function(t,e,n){n(5),n(51),t.exports=n(57)},function(t,e,n){var o=n(23),r=n(58);t.exports=n(18).getIterator=function(t){var e=r(t);if('function'!=typeof e)throw TypeError(t+' is not iterable!');return o(e.call(t))}},function(t,e,n){var o=n(54),r=n(48)('iterator'),i=n(9);t.exports=n(18).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t['@@iterator']||i[o(t)]}},function(t,e,n){t.exports={default:n(60),__esModule:!0}},function(t,e,n){n(61),t.exports=n(18).Object.keys},function(t,e,n){var o=n(50),r=n(36);n(62)('keys',function(){return function(t){return r(o(t))}})},function(t,e,n){var o=n(16),r=n(18),i=n(27);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],c={};c[t]=e(n),o(o.S+o.F*i(function(){n(1)}),'Object',c)}},function(t,e,n){t.exports={default:n(64),__esModule:!0}},function(t,e,n){n(65),n(51),n(5),n(66),n(80),t.exports=n(18).Map},function(t,e){},function(t,e,n){'use strict';var o=n(67);t.exports=n(75)('Map',function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=o.getEntry(this,t);return e&&e.v},set:function(t,e){return o.def(this,0===t?0:t,e)}},o,!0)},function(t,e,n){'use strict';var o=n(22).f,r=n(34),i=n(68),c=n(19),s=n(69),u=n(13),a=n(70),f=n(14),l=n(8),h=n(73),p=n(26),d=n(74).fastKey,v=p?'_s':'size',y=function(t,e){var n,o=d(e);if('F'!==o)return t._i[o];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,f){var l=t(function(t,o){s(t,l,e,'_i'),t._i=r(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=o&&a(o,n,t[f],t)});return i(l.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var e=this,n=y(e,t);if(n){var o=n.n,r=n.p;delete e._i[n.i],n.r=!0,r&&(r.n=o),o&&(o.p=r),e._f==n&&(e._f=o),e._l==n&&(e._l=r),e[v]--}return!!n},forEach:function(t){s(this,l,'forEach');for(var e,n=c(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),p&&o(l.prototype,'size',{get:function(){return u(this[v])}}),l},def:function(t,e,n){var o,r,i=y(t,e);return i?i.v=n:(t._l=i={i:r=d(e,!0),k:e,v:n,p:o=t._l,n:void 0,r:!1},t._f||(t._f=i),o&&(o.n=i),t[v]++,'F'!==r&&(t._i[r]=i)),t},getEntry:y,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?'keys'==e?l(0,n.k):'values'==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?'entries':'values',!n,!0),h(e)}}},function(t,e,n){var o=n(21);t.exports=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:o(t,r,e[r]);return t}},function(t,e){t.exports=function(t,e,n,o){if(!(t instanceof e)||void 0!==o&&o in t)throw TypeError(n+': incorrect invocation!');return t}},function(t,e,n){var o=n(19),r=n(71),i=n(72),c=n(23),s=n(39),u=n(58),a={},f={},e=t.exports=function(t,e,n,l,h){var p,d,v,y,g=h?function(){return t}:u(t),_=o(n,l,e?2:1),m=0;if('function'!=typeof g)throw TypeError(t+' is not iterable!');if(i(g)){for(p=s(t.length);p>m;m++)if(y=e?_(c(d=t[m])[0],d[1]):_(t[m]),y===a||y===f)return y}else for(v=g.call(t);!(d=v.next()).done;)if(y=r(v,_,d.value,e),y===a||y===f)return y};e.BREAK=a,e.RETURN=f},function(t,e,n){var o=n(23);t.exports=function(t,e,n,r){try{return r?e(o(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&o(i.call(t)),e}}},function(t,e,n){var o=n(9),r=n(48)('iterator'),i=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||i[r]===t)}},function(t,e,n){'use strict';var o=n(17),r=n(18),i=n(22),c=n(26),s=n(48)('species');t.exports=function(t){var e='function'==typeof r[t]?r[t]:o[t];c&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var o=n(44)('meta'),r=n(24),i=n(32),c=n(22).f,s=0,u=Object.isExtensible||function(){return!0},a=!n(27)(function(){return u(Object.preventExtensions({}))}),f=function(t){c(t,o,{value:{i:'O'+ ++s,w:{}}})},l=function(t,e){if(!r(t))return'symbol'==typeof t?t:('string'==typeof t?'S':'P')+t;if(!i(t,o)){if(!u(t))return'F';if(!e)return'E';f(t)}return t[o].i},h=function(t,e){if(!i(t,o)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[o].w},p=function(t){return a&&d.NEED&&u(t)&&!i(t,o)&&f(t),t},d=t.exports={KEY:o,NEED:!1,fastKey:l,getWeak:h,onFreeze:p}},function(t,e,n){'use strict';var o=n(17),r=n(16),i=n(74),c=n(27),s=n(21),u=n(68),a=n(70),f=n(69),l=n(24),h=n(47),p=n(22).f,d=n(76)(0),v=n(26);t.exports=function(t,e,n,y,g,_){var m=o[t],w=m,k=g?'set':'add',x=w&&w.prototype,b={};return v&&'function'==typeof w&&(_||x.forEach&&!c(function(){(new w).entries().next()}))?(w=e(function(e,n){f(e,w,t,'_c'),e._c=new m,void 0!=n&&a(n,g,e[k],e)}),d('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(t){var e='add'==t||'set'==t;t in x&&(!_||'clear'!=t)&&s(w.prototype,t,function(n,o){if(f(this,w,t),!e&&_&&!l(n))return'get'==t&&void 0;var r=this._c[t](0===n?0:n,o);return e?this:r})}),'size'in x&&p(w.prototype,'size',{get:function(){return this._c.size}})):(w=y.getConstructor(e,t,g,k),u(w.prototype,n),i.NEED=!0),h(w,t),b[t]=w,r(r.G+r.W+r.F,b),_||y.setStrong(w,t,g),w}},function(t,e,n){var o=n(19),r=n(11),i=n(50),c=n(39),s=n(77);t.exports=function(t,e){var n=1==t,u=2==t,a=3==t,f=4==t,l=6==t,h=5==t||l,p=e||s;return function(e,s,d){for(var v,y,g=i(e),_=r(g),m=o(s,d,3),w=c(_.length),k=0,x=n?p(e,w):u?p(e,0):void 0;w>k;k++)if((h||k in _)&&(v=_[k],y=m(v,k,g),t))if(n)x[k]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return k;case 2:x.push(v)}else if(f)return!1;return l?-1:a||f?f:x}}},function(t,e,n){var o=n(78);t.exports=function(t,e){return new(o(t))(e)}},function(t,e,n){var o=n(24),r=n(79),i=n(48)('species');t.exports=function(t){var e;return r(t)&&(e=t.constructor,'function'!=typeof e||e!==Array&&!r(e.prototype)||(e=void 0),o(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,n){var o=n(12);t.exports=Array.isArray||function(t){return'Array'==o(t)}},function(t,e,n){var o=n(16);o(o.P+o.R,'Map',{toJSON:n(81)('Map')})},function(t,e,n){var o=n(54),r=n(82);t.exports=function(t){return function(){if(o(this)!=t)throw TypeError(t+'#toJSON isn\'t generic');return r(this)}}},function(t,e,n){var o=n(70);t.exports=function(t,e){var n=[];return o(t,!1,n.push,n,e),n}},function(t,e){},,,,function(t,e,n){var o;!function(){'use strict';/** * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. * * @codingstandard ftlabs-jsv2 * @copyright The Financial Times Limited [All Rights Reserved] * @license MIT License (see LICENSE.txt) */ -function r(t,e){function n(t,e){return function(){return t.apply(e,arguments)}}var o;if(e=e||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=e.touchBoundary||10,this.layer=t,this.tapDelay=e.tapDelay||200,this.tapTimeout=e.tapTimeout||700,!r.notNeeded(t)){for(var i=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],s=this,u=0,a=i.length;u=0,c=navigator.userAgent.indexOf("Android")>0&&!i,s=/iP(ad|hone|od)/.test(navigator.userAgent)&&!i,u=s&&/OS 4_\d(_\d)?/.test(navigator.userAgent),a=s&&/OS [6-7]_\d/.test(navigator.userAgent),f=navigator.userAgent.indexOf("BB10")>0;r.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(s&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},r.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},r.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},r.prototype.determineEventType=function(t){return c&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},r.prototype.focus=function(t){var e;s&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},r.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},r.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},r.prototype.onTouchStart=function(t){var e,n,o;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],s){if(o=window.getSelection(),o.rangeCount&&!o.isCollapsed)return!0;if(!u){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n},r.prototype.onTouchMove=function(t){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0)},r.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},r.prototype.onTouchEnd=function(t){var e,n,o,r,i,f=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,a&&(i=t.changedTouches[0],f=document.elementFromPoint(i.pageX-window.pageXOffset,i.pageY-window.pageYOffset)||f,f.fastClickScrollParent=this.targetElement.fastClickScrollParent),o=f.tagName.toLowerCase(),"label"===o){if(e=this.findControl(f)){if(this.focus(f),c)return!1;f=e}}else if(this.needsFocus(f))return t.timeStamp-n>100||s&&window.top!==window&&"input"===o?(this.targetElement=null,!1):(this.focus(f),this.sendClick(f,t),s&&"select"===o||(this.targetElement=null,t.preventDefault()),!1);return!(!s||u||(r=f.fastClickScrollParent,!r||r.fastClickLastScrollTop===r.scrollTop))||(this.needsClick(f)||(t.preventDefault(),this.sendClick(f,t)),!1)},r.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},r.prototype.onMouse=function(t){return!this.targetElement||(!!t.forwardedTouchEvent||(!t.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1))))},r.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail||(e=this.onMouse(t),e||(this.targetElement=null),e)},r.prototype.destroy=function(){var t=this.layer;c&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},r.notNeeded=function(t){var e,n,o,r;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(e=document.querySelector("meta[name=viewport]")){if(e.content.indexOf("user-scalable=no")!==-1)return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(f&&(o=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),o[1]>=10&&o[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(e.content.indexOf("user-scalable=no")!==-1)return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction||(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],!!(r>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(e.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))||("none"===t.style.touchAction||"manipulation"===t.style.touchAction))},r.attach=function(t,e){return new r(t,e)},o=function(){return r}.call(e,n,e,t),!(void 0!==o&&(t.exports=o))}()},function(t,e,n){"use strict";function o(t){if(!(this instanceof o))return new o(t);var e,n=i(t.className).split(/\s+/);for(this._elem=t,this.length=0,e=0;e=0||c.push.call(this,t);return this._elem.className=this.toString(),this},o.prototype.remove=function(){var t,e,n;for(n=0;n=0},o.prototype.toggle=function(t,e){return t+="",e===!0?this.add(t):e===!1?this.remove(t):this[this.contains(t)?"remove":"add"](t)},o.prototype.toString=function(){return c.join.call(this," ")}},function(t,e){t.exports=function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n=0,c=navigator.userAgent.indexOf('Android')>0&&!i,s=/iP(ad|hone|od)/.test(navigator.userAgent)&&!i,u=s&&/OS 4_\d(_\d)?/.test(navigator.userAgent),a=s&&/OS [6-7]_\d/.test(navigator.userAgent),f=navigator.userAgent.indexOf('BB10')>0;r.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case'button':case'select':case'textarea':if(t.disabled)return!0;break;case'input':if(s&&'file'===t.type||t.disabled)return!0;break;case'label':case'iframe':case'video':return!0}return/\bneedsclick\b/.test(t.className)},r.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case'textarea':return!0;case'select':return!c;case'input':switch(t.type){case'button':case'checkbox':case'file':case'image':case'radio':case'submit':return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},r.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent('MouseEvents'),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},r.prototype.determineEventType=function(t){return c&&'select'===t.tagName.toLowerCase()?'mousedown':'click'},r.prototype.focus=function(t){var e;s&&t.setSelectionRange&&0!==t.type.indexOf('date')&&'time'!==t.type&&'month'!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},r.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},r.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},r.prototype.onTouchStart=function(t){var e,n,o;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],s){if(o=window.getSelection(),o.rangeCount&&!o.isCollapsed)return!0;if(!u){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n},r.prototype.onTouchMove=function(t){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0)},r.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea')},r.prototype.onTouchEnd=function(t){var e,n,o,r,i,f=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,a&&(i=t.changedTouches[0],f=document.elementFromPoint(i.pageX-window.pageXOffset,i.pageY-window.pageYOffset)||f,f.fastClickScrollParent=this.targetElement.fastClickScrollParent),o=f.tagName.toLowerCase(),'label'===o){if(e=this.findControl(f)){if(this.focus(f),c)return!1;f=e}}else if(this.needsFocus(f))return t.timeStamp-n>100||s&&window.top!==window&&'input'===o?(this.targetElement=null,!1):(this.focus(f),this.sendClick(f,t),s&&'select'===o||(this.targetElement=null,t.preventDefault()),!1);return!(!s||u||(r=f.fastClickScrollParent,!r||r.fastClickLastScrollTop===r.scrollTop))||(this.needsClick(f)||(t.preventDefault(),this.sendClick(f,t)),!1)},r.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},r.prototype.onMouse=function(t){return!this.targetElement||(!!t.forwardedTouchEvent||(!t.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1))))},r.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):'submit'===t.target.type&&0===t.detail||(e=this.onMouse(t),e||(this.targetElement=null),e)},r.prototype.destroy=function(){var t=this.layer;c&&(t.removeEventListener('mouseover',this.onMouse,!0),t.removeEventListener('mousedown',this.onMouse,!0),t.removeEventListener('mouseup',this.onMouse,!0)),t.removeEventListener('click',this.onClick,!0),t.removeEventListener('touchstart',this.onTouchStart,!1),t.removeEventListener('touchmove',this.onTouchMove,!1),t.removeEventListener('touchend',this.onTouchEnd,!1),t.removeEventListener('touchcancel',this.onTouchCancel,!1)},r.notNeeded=function(t){var e,n,o,r;if('undefined'==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(e=document.querySelector('meta[name=viewport]')){if(e.content.indexOf('user-scalable=no')!==-1)return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(f&&(o=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),o[1]>=10&&o[2]>=3&&(e=document.querySelector('meta[name=viewport]')))){if(e.content.indexOf('user-scalable=no')!==-1)return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return'none'===t.style.msTouchAction||'manipulation'===t.style.touchAction||(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],!!(r>=27&&(e=document.querySelector('meta[name=viewport]'),e&&(e.content.indexOf('user-scalable=no')!==-1||document.documentElement.scrollWidth<=window.outerWidth)))||('none'===t.style.touchAction||'manipulation'===t.style.touchAction))},r.attach=function(t,e){return new r(t,e)},o=function(){return r}.call(e,n,e,t),!(void 0!==o&&(t.exports=o))}()},function(t,e,n){'use strict';function o(t){if(!(this instanceof o))return new o(t);var e,n=i(t.className).split(/\s+/);for(this._elem=t,this.length=0,e=0;e=0||c.push.call(this,t);return this._elem.className=this.toString(),this},o.prototype.remove=function(){var t,e,n;for(n=0;n=0},o.prototype.toggle=function(t,e){return t+='',e===!0?this.add(t):e===!1?this.remove(t):this[this.contains(t)?'remove':'add'](t)},o.prototype.toString=function(){return c.join.call(this,' ')}},function(t,e){t.exports=function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n -1) { apiUrl = 'http://localhost:3000'; @@ -19,7 +19,7 @@ function loginUrl(extra){ else{ window.location.href = `${apiUrl}/login`; } -}; +} function registerUrl(params){ if(params){ @@ -28,9 +28,9 @@ function registerUrl(params){ else{ window.location.href = `${apiUrl}/register`; } -}; +} function formUrl(){ return `${backendUrl}/lead/`; -}; +} diff --git a/home/server.js b/home/server.js index 209145095e..3bed1a5915 100755 --- a/home/server.js +++ b/home/server.js @@ -65,19 +65,19 @@ app.get('/enterprise/overview', function(req, res) { }); app.get('/legal', function(req, res) { - res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: "terms",requestDemoCta:false}); + res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: 'terms',requestDemoCta:false}); }); app.get('/legal/terms', function(req, res) { - res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: "terms",requestDemoCta:false}); + res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: 'terms',requestDemoCta:false}); }); app.get('/legal/privacy', function(req, res) { - res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: "privacy",requestDemoCta:false}); + res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: 'privacy',requestDemoCta:false}); }); app.get('/legal/sla', function(req, res) { - res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: "sla",requestDemoCta:false}); + res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'sla',requestDemoCta:false}); }); app.get('/enterprise/download-resource/:resourceName', function(req, res) { @@ -87,11 +87,11 @@ app.get('/enterprise/download-resource/:resourceName', function(req, res) { app.use(express.static(path.join(__dirname, 'public'), { maxAge: 2592000 })); app.get('/*', function(req, res) { - res.render('notFound.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: "terms",requestDemoCta:false}); + res.render('notFound.ejs', {footerCards: true, cta:true, blackLogo:false, blackLogo:false, section: 'terms',requestDemoCta:false}); }); app.set('port', process.env.PORT || 1444); var server = app.listen(app.get('port'), function() { - console.log("Server running on port : "+app.get('port')); + console.log('Server running on port : '+app.get('port')); });