proofofphone/web/public/javascripts/application.js

9 lines
277 KiB
JavaScript
Raw Normal View History

2017-06-26 13:24:10 -07:00
function addPhoneToWallet(e,t,n,i,r){$.post("/newPhoneToAddr",{globalToken:"cba2c691-47df-41e7-bc97-a0818103ed14",phone:e,wallet:t,code:n},function(e){r(),e.success?i(1,null):1e3==e.error.code?swal({title:"Warning",text:e.error.message,type:"warning"}):swal({title:"Error",text:e.error.message,type:"error"})})}function getAddressByPhone(e,t,n){$.post("/getAddressByPhone",{globalToken:"cba2c691-47df-41e7-bc97-a0818103ed14",phone:e},function(e){n(),e.success?"0x0000000000000000000000000000000000000000"!=e.success.addr?(POPInputWallet.val(e.success.addr),t(null,4)):swal({title:"Warning",text:"This phone wasn't set for any wallet yet",type:"warning"}):swal({title:"Error",text:e.error.message,type:"error"})})}function getPhoneByAddress(e,t,n){$.post("/getPhoneByAddress",{globalToken:"cba2c691-47df-41e7-bc97-a0818103ed14",wallet:e},function(e){n(),e.success?0!=e.success.phone?(POPInputPhone.val(e.success.phone),t(null,4)):swal({title:"Warning",text:"Phone wasn't set for this wallet yet",type:"warning"}):swal({title:"Error",text:e.error.message,type:"error"})})}function sendCodeBySMS(e,t,n){$.post("/sendCodeBySMS",{globalToken:"cba2c691-47df-41e7-bc97-a0818103ed14",to:e},function(e){console.log(e),e.success?(t(1,null),token.val(e.success.code),swal({title:"Success",text:"Code successfully sent by SMS",type:"success"})):swal({title:"Error",text:e.error.message,type:"error"})})}function verifyCodeFromSMS(e,t,n,i){$.post("/verifyCodeFromSMS",{globalToken:"cba2c691-47df-41e7-bc97-a0818103ed14",code:e,phone:t},function(e){i(),console.log(e),e.success?(hashToAddress=e.success.message,console.log(hashToAddress),n(1,null),token.val(e.success.code),swal({title:"Success",text:"Code successfully verified",type:"success"})):swal({title:"Error",text:e.error.message,type:"error"})})}if(function(e,t){"use strict";var n,i,r,o=e,a=o.document,s=o.navigator,l=o.setTimeout,c=o.clearTimeout,u=o.setInterval,d=o.clearInterval,f=o.getComputedStyle,p=o.encodeURIComponent,h=o.ActiveXObject,v=o.Error,m=o.Number.parseInt||o.parseInt,g=o.Number.parseFloat||o.parseFloat,y=o.Number.isNaN||o.isNaN,b=o.Date.now,w=o.Object.keys,x=o.Object.defineProperty,C=o.Object.prototype.hasOwnProperty,T=o.Array.prototype.slice,k=function(){var e=function(e){return e};if("function"==typeof o.wrap&&"function"==typeof o.unwrap)try{var t=a.createElement("div"),n=o.unwrap(t);1===t.nodeType&&n&&1===n.nodeType&&(e=o.unwrap)}catch(e){}return e}(),S=function(e){return T.call(e,0)},E=function(){var e,t,n,i,r,o=S(arguments),a=o[0]||{};for(e=1,t=o.length;e<t;e++)if(null!=(n=o[e]))for(i in n)C.call(n,i)&&(a[i],r=n[i],a!==r&&void 0!==r&&(a[i]=r));return a},P=function(e){var t,n,i,r;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if("number"==typeof e.length)for(t=[],n=0,i=e.length;n<i;n++)C.call(e,n)&&(t[n]=P(e[n]));else{t={};for(r in e)C.call(e,r)&&(t[r]=P(e[r]))}return t},O=function(e,t){for(var n={},i=0,r=t.length;i<r;i++)t[i]in e&&(n[t[i]]=e[t[i]]);return n},A=function(e,t){var n={};for(var i in e)-1===t.indexOf(i)&&(n[i]=e[i]);return n},N=function(e){if(e)for(var t in e)C.call(e,t)&&delete e[t];return e},D=function(e,t){if(e&&1===e.nodeType&&e.ownerDocument&&t&&(1===t.nodeType&&t.ownerDocument&&t.ownerDocument===e.ownerDocument||9===t.nodeType&&!t.ownerDocument&&t===e.ownerDocument))do{if(e===t)return!0;e=e.parentNode}while(e);return!1},j=function(e){var t;return"string"==typeof e&&e&&(t=e.split("#")[0].split("?")[0],t=e.slice(0,e.lastIndexOf("/")+1)),t},M=function(e){var t,n;return"string"==typeof e&&e&&(n=e.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]?t=n[1]:(n=e.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/))&&n[1]&&(t=n[1])),t},_=function(){var e,t;try{throw new v}catch(e){t=e}return t&&(e=t.sourceURL||t.fileName||M(t.stack)),e},I=function(){var e,t,n;if(a.currentScript&&(e=a.currentScript.src))return e;if(t=a.getElementsByTagName("script"),1===t.length)return t[0].src||void 0;if("readyState"in t[0])for(n=t.length;n--;)if("interacti
function r(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function o(e){var t=be[e]={};return re.each(e.match(ye)||[],function(e,n){t[n]=!0}),t}function a(){he.addEventListener?(he.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(he.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(he.addEventListener||"load"===event.type||"complete"===he.readyState)&&(a(),re.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(ke,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Te.test(n)?re.parseJSON(n):n)}catch(e){}re.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!re.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,n,i){if(re.acceptData(e)){var r,o,a=re.expando,s=e.nodeType,l=s?re.cache:e,c=s?e[a]:e[a]&&a;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[a]=Y.pop()||re.guid++:a),l[c]||(l[c]=s?{}:{toJSON:re.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[c]=re.extend(l[c],t):l[c].data=re.extend(l[c].data,t)),o=l[c],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[re.camelCase(t)]=n),"string"==typeof t?null==(r=o[t])&&(r=o[re.camelCase(t)]):r=o,r}}function d(e,t,n){if(re.acceptData(e)){var i,r,o=e.nodeType,a=o?re.cache:e,s=o?e[re.expando]:re.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){re.isArray(t)?t=t.concat(re.map(t,re.camelCase)):t in i?t=[t]:(t=re.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!c(i):!re.isEmptyObject(i))return}(n||(delete a[s].data,c(a[s])))&&(o?re.cleanData([e],!0):ne.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function f(){return!0}function p(){return!1}function h(){try{return he.activeElement}catch(e){}}function v(e){var t=Ie.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function m(e,t){var n,i,r=0,o=typeof e.getElementsByTagName!==Ce?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Ce?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||re.nodeName(i,t)?o.push(i):re.merge(o,m(i,t));return void 0===t||t&&re.nodeName(e,t)?re.merge([e],o):o}function g(e){Ae.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return re.nodeName(e,"table")&&re.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==re.find.attr(e,"type"))+"/"+e.type,e}function w(e){var t=Xe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function x(e,t){for(var n,i=0;null!=(n=e[i]);i++)re._data(n,"globalEval",!t||re._data(t[i],"globalEval"))}function C(e,t){if(1===t.nodeType&&re.hasData(e)){var n,i,r,o=re._data(e),a=re._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)re.event.add(t,n,s[n][i])}a.data&&(a.data=re.extend({},a.data))}}function T(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[re.expando]){r=re._data(t);for(i in r.events)re.removeEvent(t,i,r.handle);t.removeAttribute(re.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,w(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!re.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ae.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function k(t,n){var i,r=re(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:re.css(r[0],"display");return r.detach(),o}function S(e){var t=he,n=Je[e];return n||(n=k(e,t),"none"!==n&&n||(Ge=(Ge||re("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Ge[0].contentWindow||Ge[0].contentDocument).document,t.write(),t.close(),n=k(e,t),Ge.detach()),Je[e]
!(e=i.length&&u(o)))return G.apply(n,i),n;break}}return(d||k(e,f))(i,t,!j,n,ge.test(e)&&l(t.parentNode)||t),n},b.sortStable=L.split("").sort(V).join("")===L,b.detectDuplicates=!!O,A(),b.sortDetached=r(function(e){return 1&e.compareDocumentPosition(N.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var i;return n?void 0:!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);re.find=ce,re.expr=ce.selectors,re.expr[":"]=re.expr.pseudos,re.unique=ce.uniqueSort,re.text=ce.getText,re.isXMLDoc=ce.isXML,re.contains=ce.contains;var ue=re.expr.match.needsContext,de=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,fe=/^.[^:#\[\.,]*$/;re.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?re.find.matchesSelector(i,e)?[i]:[]:re.find.matches(e,re.grep(t,function(e){return 1===e.nodeType}))},re.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(re(e).filter(function(){for(t=0;r>t;t++)if(re.contains(i[t],this))return!0}));for(t=0;r>t;t++)re.find(e,i[t],n);return n=this.pushStack(r>1?re.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&ue.test(e)?re(e):e||[],!1).length}});var pe,he=e.document,ve=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(re.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ve.exec(e))||!n[1]&&t)return!t||t.jquery?(t||pe).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof re?t[0]:t,re.merge(this,re.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:he,!0)),de.test(n[1])&&re.isPlainObject(t))for(n in t)re.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((i=he.getElementById(n[2]))&&i.parentNode){if(i.id!==n[2])return pe.find(e);this.length=1,this[0]=i}return this.context=he,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):re.isFunction(e)?void 0!==pe.ready?pe.ready(e):e(re):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),re.makeArray(e,this))}).prototype=re.fn,pe=re(he);var me=/^(?:parents|prev(?:Until|All))/,ge={children:!0,contents:!0,next:!0,prev:!0};re.extend({dir:function(e,t,n){for(var i=[],r=e[t];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!re(r).is(n));)1===r.nodeType&&i.push(r),r=r[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),re.fn.extend({has:function(e){var t,n=re(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(re.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=ue.test(e)||"string"!=typeof e?re(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&re.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?re.unique(o):o)},index:function(e){return e?"string"==typeof e?re.inArray(this[0],re(e)):re.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(re.unique(re.merge(this.get(),re(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),re.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return re.dir(e,"parentNode")},parentsUntil:function(e,t,n){return re.dir(e,"parentNode",n)},next:function(e){retu
t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=a=!1,l=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(t,null)||{}).top,a="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,r=t.appendChild(he.createElement("div")),r.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",t.style.width="1px",l=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=t.getElementsByTagName("td"),r[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===r[0].offsetHeight,s&&(r[0].style.display="",r[1].style.display="none",s=0===r[0].offsetHeight),n.removeChild(i))}var n,i,r,o,a,s,l;n=he.createElement("div"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=n.getElementsByTagName("a")[0],(i=r&&r.style)&&(i.cssText="float:left;opacity:.5",ne.opacity="0.5"===i.opacity,ne.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,re.extend(ne,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==l&&t(),l}}))}(),re.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var rt=/alpha\([^)]*\)/i,ot=/opacity\s*=\s*([^)]*)/,at=/^(none|table(?!-c[ea]).+)/,st=new RegExp("^("+Se+")(.*)$","i"),lt=new RegExp("^([+-])=("+Se+")","i"),ct={position:"absolute",visibility:"hidden",display:"block"},ut={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","O","Moz","ms"];re.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=et(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:ne.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=re.camelCase(t),l=e.style;if(t=re.cssProps[s]||(re.cssProps[s]=P(l,s)),a=re.cssHooks[t]||re.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t];if(o=typeof n,"string"===o&&(r=lt.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(re.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||re.cssNumber[s]||(n+="px"),ne.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,i)))))try{l[t]=n}catch(e){}}},css:function(e,t,n,i){var r,o,a,s=re.camelCase(t);return t=re.cssProps[s]||(re.cssProps[s]=P(e.style,s)),a=re.cssHooks[t]||re.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=et(e,t,i)),"normal"===o&&t in ut&&(o=ut[t]),""===n||n?(r=parseFloat(o),!0===n||re.isNumeric(r)?r||0:o):o}}),re.each(["height","width"],function(e,t){re.cssHooks[t]={get:function(e,n,i){return n?at.test(re.css(e,"display"))&&0===e.offsetWidth?re.swap(e,ct,function(){return D(e,t,i)}):D(e,t,i):void 0},set:function(e,n,i){var r=i&&Ke(e);return A(e,n,i?N(e,t,i,ne.boxSizing&&"border-box"===re.css(e,"boxSizing",!1,r),r):0)}}}),ne.opacity||(re.cssHooks.opacity={get:function(e,t){return ot.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=re.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===re.trim(o.replace(rt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=rt.test(o)?o.replace(rt,r):o+" "+r)}}),re.cssHooks.marginRight=E(ne.reliableMarginRight,function(e,t){return t?re.swap(e,{display:"inline-block"},et,[e,"margin
return jQuery.easing[jQuery.easing.def](e,t,n,i,r)},easeInQuad:function(e,t,n,i,r){return i*(t/=r)*t+n},easeOutQuad:function(e,t,n,i,r){return-i*(t/=r)*(t-2)+n},easeInOutQuad:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t+n:-i/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,i,r){return i*(t/=r)*t*t+n},easeOutCubic:function(e,t,n,i,r){return i*((t=t/r-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t*t+n:i/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,i,r){return i*(t/=r)*t*t*t+n},easeOutQuart:function(e,t,n,i,r){return-i*((t=t/r-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t*t*t+n:-i/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,i,r){return i*(t/=r)*t*t*t*t+n},easeOutQuint:function(e,t,n,i,r){return i*((t=t/r-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t*t*t*t+n:i/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,i,r){return-i*Math.cos(t/r*(Math.PI/2))+i+n},easeOutSine:function(e,t,n,i,r){return i*Math.sin(t/r*(Math.PI/2))+n},easeInOutSine:function(e,t,n,i,r){return-i/2*(Math.cos(Math.PI*t/r)-1)+n},easeInExpo:function(e,t,n,i,r){return 0==t?n:i*Math.pow(2,10*(t/r-1))+n},easeOutExpo:function(e,t,n,i,r){return t==r?n+i:i*(1-Math.pow(2,-10*t/r))+n},easeInOutExpo:function(e,t,n,i,r){return 0==t?n:t==r?n+i:(t/=r/2)<1?i/2*Math.pow(2,10*(t-1))+n:i/2*(2-Math.pow(2,-10*--t))+n},easeInCirc:function(e,t,n,i,r){return-i*(Math.sqrt(1-(t/=r)*t)-1)+n},easeOutCirc:function(e,t,n,i,r){return i*Math.sqrt(1-(t=t/r-1)*t)+n},easeInOutCirc:function(e,t,n,i,r){return(t/=r/2)<1?-i/2*(Math.sqrt(1-t*t)-1)+n:i/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,i,r){var o=1.70158,a=0,s=i;if(0==t)return n;if(1==(t/=r))return n+i;if(a||(a=.3*r),s<Math.abs(i)){s=i;var o=a/4}else var o=a/(2*Math.PI)*Math.asin(i/s);return-s*Math.pow(2,10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)+n},easeOutElastic:function(e,t,n,i,r){var o=1.70158,a=0,s=i;if(0==t)return n;if(1==(t/=r))return n+i;if(a||(a=.3*r),s<Math.abs(i)){s=i;var o=a/4}else var o=a/(2*Math.PI)*Math.asin(i/s);return s*Math.pow(2,-10*t)*Math.sin((t*r-o)*(2*Math.PI)/a)+i+n},easeInOutElastic:function(e,t,n,i,r){var o=1.70158,a=0,s=i;if(0==t)return n;if(2==(t/=r/2))return n+i;if(a||(a=r*(.3*1.5)),s<Math.abs(i)){s=i;var o=a/4}else var o=a/(2*Math.PI)*Math.asin(i/s);return 1>t?s*Math.pow(2,10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)*-.5+n:s*Math.pow(2,-10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)*.5+i+n},easeInBack:function(e,t,n,i,r,o){return void 0==o&&(o=1.70158),i*(t/=r)*t*((o+1)*t-o)+n},easeOutBack:function(e,t,n,i,r,o){return void 0==o&&(o=1.70158),i*((t=t/r-1)*t*((o+1)*t+o)+1)+n},easeInOutBack:function(e,t,n,i,r,o){return void 0==o&&(o=1.70158),(t/=r/2)<1?i/2*(t*t*((1+(o*=1.525))*t-o))+n:i/2*((t-=2)*t*((1+(o*=1.525))*t+o)+2)+n},easeInBounce:function(e,t,n,i,r){return i-jQuery.easing.easeOutBounce(e,r-t,0,i,r)+n},easeOutBounce:function(e,t,n,i,r){return(t/=r)<1/2.75?i*(7.5625*t*t)+n:2/2.75>t?i*(7.5625*(t-=1.5/2.75)*t+.75)+n:2.5/2.75>t?i*(7.5625*(t-=2.25/2.75)*t+.9375)+n:i*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeInOutBounce:function(e,t,n,i,r){return r/2>t?.5*jQuery.easing.easeInBounce(e,2*t,0,i,r)+n:.5*jQuery.easing.easeOutBounce(e,2*t-r,0,i,r)+.5*i+n}}),jQuery.extend(jQuery.easing,{easeInOutMaterial:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t+n:i/4*((t-=2)*t*t+2)+n}}),jQuery.Velocity?console.log("Velocity is already loaded. You may be needlessly importing Velocity again; note that Materialize includes Velocity."):(function(e){function t(e){var t=e.length,i=n.type(e);return"function"!==i&&!n.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e))}if(!e.jQuery){var n=function(e,t){return new n.fn.init(e,t)};n.isWindow=function(e){return null!=e&&e==e.window},n.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?r[a.call(e)]||"object":typeof e},n.isArray=Array.isArray||function(e){return"array"===n.type(e)},n.isPlainObject=function(e){var t;if(!e||"object"!==n.type(e)||e.nodeType||n.isWindow(e))return!1;try{if(e.constructor&&!o.call(e,"constructor")&&!o
;default:$*=1/r[W+"ToPx"]}}switch(V){case"+":q=$+q;break;case"-":q=$-q;break;case"*":q*=$;break;case"/":q=$/q}l[j]={rootPropertyValue:H,startValue:$,currentValue:$,endValue:q,unitType:W,easing:L},b.debug&&console.log("tweensContainer ("+j+"): "+JSON.stringify(l[j]),o)}else b.debug&&console.log("Skipping ["+F+"] due to a lack of browser support.")}l.element=o}l.element&&(x.Values.addClass(o,"velocity-animating"),I.push(l),""===s.queue&&(a(o).tweensContainer=l,a(o).opts=s),a(o).isAnimating=!0,k===T-1?(b.State.calls.push([I,h,s,null,P.resolver]),!1===b.State.isTicking&&(b.State.isTicking=!0,u())):k++)}var r,o=this,s=f.extend({},b.defaults,y),l={};switch(a(o)===i&&b.init(o),parseFloat(s.delay)&&!1!==s.queue&&f.queue(o,s.queue,function(e){b.velocityQueueEntryFlag=!0,a(o).delayTimer={setTimeout:setTimeout(e,parseFloat(s.delay)),next:e}}),s.duration.toString().toLowerCase()){case"fast":s.duration=200;break;case"normal":s.duration=g;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}!1!==b.mock&&(!0===b.mock?s.duration=s.delay=1:(s.duration*=parseFloat(b.mock)||1,s.delay*=parseFloat(b.mock)||1)),s.easing=c(s.easing,s.duration),s.begin&&!v.isFunction(s.begin)&&(s.begin=null),s.progress&&!v.isFunction(s.progress)&&(s.progress=null),s.complete&&!v.isFunction(s.complete)&&(s.complete=null),s.display!==i&&null!==s.display&&(s.display=s.display.toString().toLowerCase(),"auto"===s.display&&(s.display=b.CSS.Values.getDisplayType(o))),s.visibility!==i&&null!==s.visibility&&(s.visibility=s.visibility.toString().toLowerCase()),s.mobileHA=s.mobileHA&&b.State.isMobile&&!b.State.isGingerbread,!1===s.queue?s.delay?setTimeout(e,s.delay):e():f.queue(o,s.queue,function(t,n){return!0===n?(P.promise&&P.resolver(h),!0):(b.velocityQueueEntryFlag=!0,void e(t))}),""!==s.queue&&"fx"!==s.queue||"inprogress"===f.queue(o)[0]||f.dequeue(o)}var s,l,p,h,m,y,w=arguments[0]&&(arguments[0].p||f.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||v.isString(arguments[0].properties));if(v.isWrapped(this)?(s=!1,p=0,h=this,l=this):(s=!0,p=1,h=w?arguments[0].elements||arguments[0].e:arguments[0]),h=o(h)){w?(m=arguments[0].properties||arguments[0].p,y=arguments[0].options||arguments[0].o):(m=arguments[p],y=arguments[p+1]);var T=h.length,k=0;if(!/^(stop|finish)$/i.test(m)&&!f.isPlainObject(y)){var S=p+1;y={};for(var E=S;E<arguments.length;E++)v.isArray(arguments[E])||!/^(fast|normal|slow)$/i.test(arguments[E])&&!/^\d/.test(arguments[E])?v.isString(arguments[E])||v.isArray(arguments[E])?y.easing=arguments[E]:v.isFunction(arguments[E])&&(y.complete=arguments[E]):y.duration=arguments[E]}var P={promise:null,resolver:null,rejecter:null};s&&b.Promise&&(P.promise=new b.Promise(function(e,t){P.resolver=e,P.rejecter=t}));var O;switch(m){case"scroll":O="scroll";break;case"reverse":O="reverse";break;case"finish":case"stop":f.each(h,function(e,t){a(t)&&a(t).delayTimer&&(clearTimeout(a(t).delayTimer.setTimeout),a(t).delayTimer.next&&a(t).delayTimer.next(),delete a(t).delayTimer)});var A=[];return f.each(b.State.calls,function(e,t){t&&f.each(t[1],function(n,r){var o=y===i?"":y;return!0!==o&&t[2].queue!==o&&(y!==i||!1!==t[2].queue)||void f.each(h,function(n,i){i===r&&((!0===y||v.isString(y))&&(f.each(f.queue(i,v.isString(y)?y:""),function(e,t){v.isFunction(t)&&t(null,!0)}),f.queue(i,v.isString(y)?y:"",[])),"stop"===m?(a(i)&&a(i).tweensContainer&&!1!==o&&f.each(a(i).tweensContainer,function(e,t){t.endValue=t.currentValue}),A.push(e)):"finish"===m&&(t[2].duration=1))})})}),"stop"===m&&(f.each(A,function(e,t){d(t,!0)}),P.promise&&P.resolver(h)),e();default:if(!f.isPlainObject(m)||v.isEmptyObject(m)){if(v.isString(m)&&b.Redirects[m]){var N=f.extend({},y),D=N.duration,j=N.delay||0;return!0===N.backwards&&(h=f.extend(!0,[],h).reverse()),f.each(h,function(e,t){parseFloat(N.stagger)?N.delay=j+parseFloat(N.stagger)*e:v.isFunction(N.stagger)&&(N.delay=j+N.stagger.call(t,e,T)),N.drag&&(N.duration=parseFloat(D)||(/^(callout|transition)/.test(m)?1e3:g),N.duration=Math.max(N.duration*(N.backwards?1-e/T:(e+1)/T),.75*N.duration,200)),b.Redirects[m
a.remove(),t--}})}}),e.fn.extend({leanModal:function(t){return this.each(function(){var n={starting_top:"4%"},i=e.extend(n,t);e(this).click(function(t){i.starting_top=(e(this).offset().top-e(window).scrollTop())/1.15;var n=e(this).attr("href")||"#"+e(this).data("target");e(n).openModal(i),t.preventDefault()})})}})}(jQuery),function(e){e.fn.materialbox=function(){return this.each(function(){function t(){o=!1;var t=l.parent(".material-placeholder"),i=(window.innerWidth,window.innerHeight,l.data("width")),a=l.data("height");l.velocity("stop",!0),e("#materialbox-overlay").velocity("stop",!0),e(".materialbox-caption").velocity("stop",!0),e("#materialbox-overlay").velocity({opacity:0},{duration:s,queue:!1,easing:"easeOutQuad",complete:function(){r=!1,e(this).remove()}}),l.velocity({width:i,height:a,left:0,top:0},{duration:s,queue:!1,easing:"easeOutQuad"}),e(".materialbox-caption").velocity({opacity:0},{duration:s,queue:!1,easing:"easeOutQuad",complete:function(){t.css({height:"",width:"",position:"",top:"",left:""}),l.css({height:"",top:"",left:"",width:"","max-width":"",position:"","z-index":""}),l.removeClass("active"),o=!0,e(this).remove(),n.css("overflow","")}})}if(!e(this).hasClass("initialized")){e(this).addClass("initialized");var n,i,r=!1,o=!0,a=275,s=200,l=e(this),c=e("<div></div>").addClass("material-placeholder");l.wrap(c),l.on("click",function(){var s=l.parent(".material-placeholder"),c=window.innerWidth,u=window.innerHeight,d=l.width(),f=l.height();if(!1===o)return t(),!1;if(r&&!0===o)return t(),!1;for(o=!1,l.addClass("active"),r=!0,s.css({width:s[0].getBoundingClientRect().width,height:s[0].getBoundingClientRect().height,position:"relative",top:0,left:0}),n=void 0,i=s[0].parentNode;null!==i&&!e(i).is(document);){var p=e(i);"hidden"===p.css("overflow")&&(p.css("overflow","visible"),n=void 0===n?p:n.add(p)),i=i.parentNode}l.css({position:"absolute","z-index":1e3}).data("width",d).data("height",f);var h=e('<div id="materialbox-overlay"></div>').css({opacity:0}).click(function(){!0===o&&t()});if(e("body").append(h),h.velocity({opacity:1},{duration:a,queue:!1,easing:"easeOutQuad"}),""!==l.data("caption")){var v=e('<div class="materialbox-caption"></div>');v.text(l.data("caption")),e("body").append(v),v.css({display:"inline"}),v.velocity({opacity:1},{duration:a,queue:!1,easing:"easeOutQuad"})}var m=0,g=d/c,y=f/u,b=0,w=0;g>y?(m=f/d,b=.9*c,w=.9*c*m):(m=d/f,b=.9*u*m,w=.9*u),l.hasClass("responsive-img")?l.velocity({"max-width":b,width:d},{duration:0,queue:!1,complete:function(){l.css({left:0,top:0}).velocity({height:w,width:b,left:e(document).scrollLeft()+c/2-l.parent(".material-placeholder").offset().left-b/2,top:e(document).scrollTop()+u/2-l.parent(".material-placeholder").offset().top-w/2},{duration:a,queue:!1,easing:"easeOutQuad",complete:function(){o=!0}})}}):l.css("left",0).css("top",0).velocity({height:w,width:b,left:e(document).scrollLeft()+c/2-l.parent(".material-placeholder").offset().left-b/2,top:e(document).scrollTop()+u/2-l.parent(".material-placeholder").offset().top-w/2},{duration:a,queue:!1,easing:"easeOutQuad",complete:function(){o=!0}})}),e(window).scroll(function(){r&&t()}),e(document).keyup(function(e){27===e.keyCode&&!0===o&&r&&t()})}})},e(document).ready(function(){e(".materialboxed").materialbox()})}(jQuery),function(e){e.fn.parallax=function(){var t=e(window).width();return this.each(function(n){function i(n){var i;i=601>t?r.height()>0?r.height():r.children("img").height():r.height()>0?r.height():500;var o=r.children("img").first(),a=o.height(),s=a-i,l=r.offset().top+i,c=r.offset().top,u=e(window).scrollTop(),d=window.innerHeight,f=u+d,p=(f-c)/(i+d),h=Math.round(s*p);n&&o.css("display","block"),l>u&&u+d>c&&o.css("transform","translate3D(-50%,"+h+"px, 0)")}var r=e(this);r.addClass("parallax"),r.children("img").one("load",function(){i(!0)}).each(function(){this.complete&&e(this).load()}),e(window).scroll(function(){t=e(window).width(),i(!1)}),e(window).resize(function(){t=e(window).width(),i(!1)})})}}(jQuery),function(e){var t={init:function(){return this.each(function(){var t=e(this);e(window).width
i(l.parent().find(e(this)).index()),clearInterval(a),a=setInterval(function(){u=l.find(".active").index(),c.length==u+1?u=0:u+=1,i(u)},t.transition+t.interval)}),o.append(r)}),s.append(o),o=s.find("ul.indicators").find("li.indicator-item")),r?r.show():(c.first().addClass("active").velocity({opacity:1},{duration:t.transition,queue:!1,easing:"easeOutQuad"}),u=0,r=c.eq(u),t.indicators&&o.eq(u).addClass("active")),r.find("img").each(function(){r.find(".caption").velocity({opacity:1,translateX:0,translateY:0},{duration:t.transition,queue:!1,easing:"easeOutQuad"})}),a=setInterval(function(){u=l.find(".active").index(),i(u+1)},t.transition+t.interval);var d=!1,f=!1,p=!1;s.hammer({prevent_default:!1}).bind("pan",function(e){if("touch"===e.gesture.pointerType){clearInterval(a);var t=e.gesture.direction,n=e.gesture.deltaX,i=e.gesture.velocityX;$curr_slide=l.find(".active"),$curr_slide.velocity({translateX:n},{duration:50,queue:!1,easing:"easeOutQuad"}),4===t&&(n>s.innerWidth()/2||-.65>i)?p=!0:2===t&&(n<-1*s.innerWidth()/2||i>.65)&&(f=!0);var r;f&&(r=$curr_slide.next(),0===r.length&&(r=c.first()),r.velocity({opacity:1},{duration:300,queue:!1,easing:"easeOutQuad"})),p&&(r=$curr_slide.prev(),0===r.length&&(r=c.last()),r.velocity({opacity:1},{duration:300,queue:!1,easing:"easeOutQuad"}))}}).bind("panend",function(e){"touch"===e.gesture.pointerType&&($curr_slide=l.find(".active"),d=!1,curr_index=l.find(".active").index(),p||f?f?(i(curr_index+1),$curr_slide.velocity({translateX:-1*s.innerWidth()},{duration:300,queue:!1,easing:"easeOutQuad",complete:function(){$curr_slide.velocity({opacity:0,translateX:0},{duration:0,queue:!1})}})):p&&(i(curr_index-1),$curr_slide.velocity({translateX:s.innerWidth()},{duration:300,queue:!1,easing:"easeOutQuad",complete:function(){$curr_slide.velocity({opacity:0,translateX:0},{duration:0,queue:!1})}})):$curr_slide.velocity({translateX:0},{duration:300,queue:!1,easing:"easeOutQuad"}),f=!1,p=!1,clearInterval(a),a=setInterval(function(){u=l.find(".active").index(),c.length==u+1?u=0:u+=1,i(u)},t.transition+t.interval))}),s.on("sliderPause",function(){clearInterval(a)}),s.on("sliderStart",function(){clearInterval(a),a=setInterval(function(){u=l.find(".active").index(),c.length==u+1?u=0:u+=1,i(u)},t.transition+t.interval)}),s.on("sliderNext",function(){u=l.find(".active").index(),i(u+1)}),s.on("sliderPrev",function(){u=l.find(".active").index(),i(u-1)})})},pause:function(){e(this).trigger("sliderPause")},start:function(){e(this).trigger("sliderStart")},next:function(){e(this).trigger("sliderNext")},prev:function(){e(this).trigger("sliderPrev")}};e.fn.slider=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.tooltip"):t.init.apply(this,arguments)}}(jQuery),function(e){e(document).ready(function(){e(document).on("click.card",".card",function(t){e(this).find("> .card-reveal").length&&(e(t.target).is(e(".card-reveal .card-title"))||e(t.target).is(e(".card-reveal .card-title i"))?e(this).find(".card-reveal").velocity({translateY:0},{duration:225,queue:!1,easing:"easeInOutQuad",complete:function(){e(this).css({display:"none"})}}):(e(t.target).is(e(".card .activator"))||e(t.target).is(e(".card .activator i")))&&(e(t.target).closest(".card").css("overflow","hidden"),e(this).find(".card-reveal").css({display:"block"}).velocity("stop",!1).velocity({translateY:"-100%"},{duration:300,queue:!1,easing:"easeInOutQuad"}))),e(".card-reveal").closest(".card").css("overflow","hidden")})})}(jQuery),function(e){e(document).ready(function(){e(document).on("click.chip",".chip .material-icons",function(t){e(this).parent().remove()})})}(jQuery),function(e){e(document).ready(function(){e.fn.pushpin=function(t){var n={top:0,bottom:1/0,offset:0};return t=e.extend(n,t),$index=0,this.each(function(){function n(e){e.removeClass("pin-top"),e.removeClass("pinned"),e.removeClass("pin-bottom")}function i(i,r){i.each(function(){t.top<=r&&t.bottom>=r&&!e(this).hasClass("pinned")&&(n(e(this)),e(this).css("top",t.offset),e(this).addClass("pinned")
clearInterval(P),P=setInterval(a,100)}function u(e){var t,r;if(v)if(t=n(e),y=i(e),r=b-t,30>Math.abs(w-y)&&!A)(r>2||-2>r)&&(O=!0,b=t,o(p+r));else{if(O)return e.preventDefault(),e.stopPropagation(),!1;A=!0}return O?(e.preventDefault(),e.stopPropagation(),!1):void 0}function d(e){return v=!1,clearInterval(P),C=p,(T>10||-10>T)&&(x=.9*T,C=p+x),C=Math.round(C/m)*m,x=C-p,E=Date.now(),requestAnimationFrame(s),e.preventDefault(),e.stopPropagation(),!1}var f,p,h,v,m,g,b,w,x,C,T,k,S,E,P,O,A,N=e(this);return!!N.hasClass("initialized")||(t.full_width&&(t.dist=0,imageHeight=N.find(".carousel-item img").first().load(function(){N.css("height",e(this).height())})),N.addClass("initialized"),v=!1,p=C=0,f=[],item_width=N.find(".carousel-item").first().innerWidth(),m=2*item_width+t.padding,N.find(".carousel-item").each(function(){f.push(e(this)[0])}),g=f.length,k="transform",["webkit","Moz","O","ms"].every(function(e){var t=e+"Transform";return void 0===document.body.style[t]||(k=t,!1)}),window.onresize=o,function(){void 0!==window.ontouchstart&&(N[0].addEventListener("touchstart",c),N[0].addEventListener("touchmove",u),N[0].addEventListener("touchend",d)),N[0].addEventListener("mousedown",c),N[0].addEventListener("mousemove",u),N[0].addEventListener("mouseup",d),N[0].addEventListener("click",l)}(),o(p),e(this).on("carouselNext",function(e,t){void 0===t&&(t=1),C=p+m*t,p!==C&&(x=C-p,E=Date.now(),requestAnimationFrame(s))}),void e(this).on("carouselPrev",function(e,t){void 0===t&&(t=1),C=p-m*t,p!==C&&(x=C-p,E=Date.now(),requestAnimationFrame(s))}))})},next:function(t){e(this).trigger("carouselNext",[t])},prev:function(t){e(this).trigger("carouselPrev",[t])}};e.fn.carousel=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.carousel"):t.init.apply(this,arguments)}}(jQuery),function(e,t,n){"use strict";!function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return r(n||e)},u,u.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(i,r,o){var a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});var s,l,c,u,d=i("./modules/handle-dom"),f=i("./modules/utils"),p=i("./modules/handle-swal-dom"),h=i("./modules/handle-click"),v=i("./modules/handle-key"),m=a(v),g=i("./modules/default-params"),y=a(g),b=i("./modules/set-params"),w=a(b);o.default=c=u=function(){function i(e){var t=r;return t[e]===n?y.default[e]:t[e]}var r=arguments[0];if(d.addClass(t.body,"stop-scrolling"),p.resetInput(),r===n)return f.logStr("SweetAlert expects at least 1 attribute!"),!1;var o=f.extend({},y.default);switch(typeof r){case"string":o.title=r,o.text=arguments[1]||"",o.type=arguments[2]||"";break;case"object":if(r.title===n)return f.logStr('Missing "title" argument!'),!1;o.title=r.title;for(var a in y.default)o[a]=i(a);o.confirmButtonText=o.showCancelButton?"Confirm":y.default.confirmButtonText,o.confirmButtonText=i("confirmButtonText"),o.doneFunction=arguments[1]||null;break;default:return f.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof r),!1}w.default(o),p.fixVerticalPosition(),p.openModal(arguments[1]);for(var c=p.getModal(),v=c.querySelectorAll("button"),g=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],b=function(e){return h.handleButton(e,o,c)},x=0;x<v.length;x++)for(var C=0;C<g.length;C++){var T=g[C];v[x][T]=b}p.getOverlay().onclick=b,s=e.onkeydown;var k=function(e){return m.default(e,o,c)};e.onkeydown=k,e.onfocus=function(){setTimeout(function(){l!==n&&(l.focus(),l=n)},0)},u.enableButtons()},c.setDefaults=u.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");