UNPKG

conekta-card-tokenizer

Version:

![README Cover Image](readme_cover.png)

2 lines 59.2 kB
"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(a,b,c,d,e,f){function g(a,b){var c=typeof a[b];return"function"==c||!("object"!=c||!a[b])||"unknown"==c}function h(a,b){return!("object"!=typeof a[b]||!a[b])}function i(a){return"[object Array]"===Object.prototype.toString.call(a)}function j(){var a="Shockwave Flash",b="application/x-shockwave-flash";if(!t(navigator.plugins)&&"object"==typeof navigator.plugins[a]){var c=navigator.plugins[a].description;c&&!t(navigator.mimeTypes)&&navigator.mimeTypes[b]&&navigator.mimeTypes[b].enabledPlugin&&(C=c.match(/\d+/g))}if(!C){var d;try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),C=Array.prototype.slice.call(d.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),d=null}catch(e){}}if(!C)return!1;var f=parseInt(C[0],10),g=parseInt(C[1],10);return D=f>9&&g>0,!0}function k(){if(!S){S=!0;for(var a=0;a<T.length;a++)T[a]();T.length=0}}function l(a,b){return S?void a.call(b):void T.push(function(){a.call(b)})}function m(){var a=parent;if(""!==M)for(var b=0,c=M.split(".");b<c.length;b++)a=a[c[b]];return a.easyXDM}function n(b){return a.easyXDM=O,M=b,M&&(P="easyXDM_"+M.replace(".","_")+"_"),N}function o(a){return a.match(J)[3]}function p(a){return a.match(J)[4]||""}function q(a){var b=a.toLowerCase().match(J),c=b[2],d=b[3],e=b[4]||"";return("http:"==c&&":80"==e||"https:"==c&&":443"==e)&&(e=""),c+"//"+d+e}function r(a){if(a=a.replace(L,"$1/"),!a.match(/^(http||https):\/\//)){var b="/"===a.substring(0,1)?"":c.pathname;"/"!==b.substring(b.length-1)&&(b=b.substring(0,b.lastIndexOf("/")+1)),a=c.protocol+"//"+c.host+b+a}for(;K.test(a);)a=a.replace(K,"");return a}function s(a,b){var c="",d=a.indexOf("#");-1!==d&&(c=a.substring(d),a=a.substring(0,d));var e=[];for(var g in b)b.hasOwnProperty(g)&&e.push(g+"="+f(b[g]));return a+(Q?"#":-1==a.indexOf("?")?"?":"&")+e.join("&")+c}function t(a){return"undefined"==typeof a}function u(a,b,c){var d;for(var e in b)b.hasOwnProperty(e)&&(e in a?(d=b[e],"object"==typeof d?u(a[e],d,c):c||(a[e]=b[e])):a[e]=b[e]);return a}function v(){var a=b.body.appendChild(b.createElement("form")),c=a.appendChild(b.createElement("input"));c.name=P+"TEST"+H,B=c!==a.elements[c.name],b.body.removeChild(a)}function w(a){t(B)&&v();var c;B?c=b.createElement('<iframe name="'+a.props.name+'"/>'):(c=b.createElement("IFRAME"),c.name=a.props.name),c.id=c.name=a.props.name,delete a.props.name,"string"==typeof a.container&&(a.container=b.getElementById(a.container)),a.container||(u(c.style,{position:"absolute",top:"-2000px",left:"0px"}),a.container=b.body);var d=a.props.src;if(a.props.src="javascript:false",u(c,a.props),c.border=c.frameBorder=0,c.allowTransparency=!0,a.container.appendChild(c),a.onLoad&&E(c,"load",a.onLoad),a.usePost){var e,f=a.container.appendChild(b.createElement("form"));if(f.target=c.name,f.action=d,f.method="POST","object"==typeof a.usePost)for(var g in a.usePost)a.usePost.hasOwnProperty(g)&&(B?e=b.createElement('<input name="'+g+'"/>'):(e=b.createElement("INPUT"),e.name=g),e.value=a.usePost[g],f.appendChild(e));f.submit(),f.parentNode.removeChild(f)}else c.src=d;return a.props.src=d,c}function x(a,b){"string"==typeof a&&(a=[a]);for(var c,d=a.length;d--;)if(c=a[d],c=new RegExp("^"==c.substr(0,1)?c:"^"+c.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"),c.test(b))return!0;return!1}function y(d){var e,f=d.protocol;if(d.isHost=d.isHost||t(V.xdm_p),Q=d.hash||!1,d.props||(d.props={}),d.isHost)d.remote=r(d.remote),d.channel=d.channel||"default"+H++,d.secret=Math.random().toString(16).substring(2),t(f)&&(f=q(c.href)==q(d.remote)?"4":g(a,"postMessage")||g(b,"postMessage")?"1":d.swf&&g(a,"ActiveXObject")&&j()?"6":"Gecko"===navigator.product&&"frameElement"in a&&-1==navigator.userAgent.indexOf("WebKit")?"5":d.remoteHelper?"2":"0");else if(d.channel=V.xdm_c.replace(/["'<>\\]/g,""),d.secret=V.xdm_s,d.remote=V.xdm_e.replace(/["'<>\\]/g,""),f=V.xdm_p,d.acl&&!x(d.acl,d.remote))throw new Error("Access denied for "+d.remote);switch(d.protocol=f,f){case"0":if(u(d,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),d.isHost){if(!d.local){for(var h,i=c.protocol+"//"+c.host,k=b.body.getElementsByTagName("img"),l=k.length;l--;)if(h=k[l],h.src.substring(0,i.length)===i){d.local=h.src;break}d.local||(d.local=a)}var m={xdm_c:d.channel,xdm_p:0};d.local===a?(d.usePolling=!0,d.useParent=!0,d.local=c.protocol+"//"+c.host+c.pathname+c.search,m.xdm_e=d.local,m.xdm_pa=1):m.xdm_e=r(d.local),d.container&&(d.useResize=!1,m.xdm_po=1),d.remote=s(d.remote,m)}else u(d,{channel:V.xdm_c,remote:V.xdm_e,useParent:!t(V.xdm_pa),usePolling:!t(V.xdm_po),useResize:d.useParent?!1:d.useResize});e=[new N.stack.HashTransport(d),new N.stack.ReliableBehavior({}),new N.stack.QueueBehavior({encode:!0,maxLength:4e3-d.remote.length}),new N.stack.VerifyBehavior({initiate:d.isHost})];break;case"1":e=[new N.stack.PostMessageTransport(d)];break;case"2":d.isHost&&(d.remoteHelper=r(d.remoteHelper)),e=[new N.stack.NameTransport(d),new N.stack.QueueBehavior,new N.stack.VerifyBehavior({initiate:d.isHost})];break;case"3":e=[new N.stack.NixTransport(d)];break;case"4":e=[new N.stack.SameOriginTransport(d)];break;case"5":e=[new N.stack.FrameElementTransport(d)];break;case"6":C||j(),e=[new N.stack.FlashTransport(d)]}return e.push(new N.stack.QueueBehavior({lazy:d.lazy,remove:!0})),e}function z(a){for(var b,c={incoming:function(a,b){this.up.incoming(a,b)},outgoing:function(a,b){this.down.outgoing(a,b)},callback:function(a){this.up.callback(a)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},d=0,e=a.length;e>d;d++)b=a[d],u(b,c,!0),0!==d&&(b.down=a[d-1]),d!==e-1&&(b.up=a[d+1]);return b}function A(a){a.up.down=a.down,a.down.up=a.up,a.up=a.down=null}var B,C,D,E,F,G=this,H=Math.floor(1e4*Math.random()),I=Function.prototype,J=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,K=/[\-\w]+\/\.\.\//,L=/([^:])\/\//g,M="",N={},O=a.easyXDM,P="easyXDM_",Q=!1;if(g(a,"addEventListener"))E=function(a,b,c){a.addEventListener(b,c,!1)},F=function(a,b,c){a.removeEventListener(b,c,!1)};else{if(!g(a,"attachEvent"))throw new Error("Browser not supported");E=function(a,b,c){a.attachEvent("on"+b,c)},F=function(a,b,c){a.detachEvent("on"+b,c)}}var R,S=!1,T=[];if("readyState"in b?(R=b.readyState,S="complete"==R||~navigator.userAgent.indexOf("AppleWebKit/")&&("loaded"==R||"interactive"==R)):S=!!b.body,!S){if(g(a,"addEventListener"))E(b,"DOMContentLoaded",k);else if(E(b,"readystatechange",function(){"complete"==b.readyState&&k()}),b.documentElement.doScroll&&a===top){var U=function(){if(!S){try{b.documentElement.doScroll("left")}catch(a){return void d(U,1)}k()}};U()}E(a,"load",k)}var V=function(a){a=a.substring(1).split("&");for(var b,c={},d=a.length;d--;)b=a[d].split("="),c[b[0]]=e(b[1]);return c}(/xdm_e=/.test(c.search)?c.search:c.hash),W=function(){var a={},b={a:[1,2,3]},c='{"a":[1,2,3]}';return"undefined"!=typeof JSON&&"function"==typeof JSON.stringify&&JSON.stringify(b).replace(/\s/g,"")===c?JSON:(Object.toJSON&&Object.toJSON(b).replace(/\s/g,"")===c&&(a.stringify=Object.toJSON),"function"==typeof String.prototype.evalJSON&&(b=c.evalJSON(),b.a&&3===b.a.length&&3===b.a[2]&&(a.parse=function(a){return a.evalJSON()})),a.stringify&&a.parse?(W=function(){return a},a):null)};u(N,{version:"2.4.18.25",query:V,stack:{},apply:u,getJSONObject:W,whenReady:l,noConflict:n}),N.DomHelper={on:E,un:F,requiresJSON:function(c){h(a,"JSON")||b.write('<script type="text/javascript" src="'+c+'"></script>')}},function(){var a={};N.Fn={set:function(b,c){a[b]=c},get:function(b,c){var d=a[b];return c&&delete a[b],d}}}(),N.Socket=function(a){var b=z(y(a).concat([{incoming:function(b,c){a.onMessage(b,c)},callback:function(b){a.onReady&&a.onReady(b)}}])),c=q(a.remote);this.origin=q(a.remote),this.destroy=function(){b.destroy()},this.postMessage=function(a){b.outgoing(a,c)},b.init()},N.Rpc=function(a,b){if(b.local)for(var c in b.local)if(b.local.hasOwnProperty(c)){var d=b.local[c];"function"==typeof d&&(b.local[c]={method:d})}var e=z(y(a).concat([new N.stack.RpcBehavior(this,b),{callback:function(b){a.onReady&&a.onReady(b)}}]));this.origin=q(a.remote),this.destroy=function(){e.destroy()},e.init()},N.stack.SameOriginTransport=function(a){var b,e,f,g;return b={outgoing:function(a,b,c){f(a),c&&c()},destroy:function(){e&&(e.parentNode.removeChild(e),e=null)},onDOMReady:function(){g=q(a.remote),a.isHost?(u(a.props,{src:s(a.remote,{xdm_e:c.protocol+"//"+c.host+c.pathname,xdm_c:a.channel,xdm_p:4}),name:P+a.channel+"_provider"}),e=w(a),N.Fn.set(a.channel,function(a){return f=a,d(function(){b.up.callback(!0)},0),function(a){b.up.incoming(a,g)}})):(f=m().Fn.get(a.channel,!0)(function(a){b.up.incoming(a,g)}),d(function(){b.up.callback(!0)},0))},init:function(){l(b.onDOMReady,b)}}},N.stack.FlashTransport=function(a){function e(a,b){d(function(){h.up.incoming(a,j)},0)}function g(c){var d=a.swf+"?host="+a.isHost,e="easyXDM_swf_"+Math.floor(1e4*Math.random());N.Fn.set("flash_loaded"+c.replace(/[\-.]/g,"_"),function(){N.stack.FlashTransport[c].swf=k=m.firstChild;for(var a=N.stack.FlashTransport[c].queue,b=0;b<a.length;b++)a[b]();a.length=0}),a.swfContainer?m="string"==typeof a.swfContainer?b.getElementById(a.swfContainer):a.swfContainer:(m=b.createElement("div"),u(m.style,D&&a.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0}),b.body.appendChild(m));var g="callback=flash_loaded"+f(c.replace(/[\-.]/g,"_"))+"&proto="+G.location.protocol+"&domain="+f(o(G.location.href))+"&port="+f(p(G.location.href))+"&ns="+f(M);m.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+e+"' data='"+d+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+d+"'></param><param name='flashvars' value='"+g+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+g+"' allowScriptAccess='always' wmode='transparent' src='"+d+"' height='1' width='1'></embed></object>"}var h,i,j,k,m;return h={outgoing:function(b,c,d){k.postMessage(a.channel,b.toString()),d&&d()},destroy:function(){try{k.destroyChannel(a.channel)}catch(b){}k=null,i&&(i.parentNode.removeChild(i),i=null)},onDOMReady:function(){j=a.remote,N.Fn.set("flash_"+a.channel+"_init",function(){d(function(){h.up.callback(!0)})}),N.Fn.set("flash_"+a.channel+"_onMessage",e),a.swf=r(a.swf);var b=o(a.swf),f=function(){N.stack.FlashTransport[b].init=!0,k=N.stack.FlashTransport[b].swf,k.createChannel(a.channel,a.secret,q(a.remote),a.isHost),a.isHost&&(D&&a.swfNoThrottle&&u(a.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),u(a.props,{src:s(a.remote,{xdm_e:q(c.href),xdm_c:a.channel,xdm_p:6,xdm_s:a.secret}),name:P+a.channel+"_provider"}),i=w(a))};N.stack.FlashTransport[b]&&N.stack.FlashTransport[b].init?f():N.stack.FlashTransport[b]?N.stack.FlashTransport[b].queue.push(f):(N.stack.FlashTransport[b]={queue:[f]},g(b))},init:function(){l(h.onDOMReady,h)}}},N.stack.PostMessageTransport=function(b){function e(a){if(a.origin)return q(a.origin);if(a.uri)return q(a.uri);if(a.domain)return c.protocol+"//"+a.domain;throw"Unable to retrieve the origin of the event"}function f(a){var c=e(a);c==j&&a.data.substring(0,b.channel.length+1)==b.channel+" "&&g.up.incoming(a.data.substring(b.channel.length+1),c)}var g,h,i,j;return g={outgoing:function(a,c,d){i.postMessage(b.channel+" "+a,c||j),d&&d()},destroy:function(){F(a,"message",f),h&&(i=null,h.parentNode.removeChild(h),h=null)},onDOMReady:function(){if(j=q(b.remote),b.isHost){var e=function(c){c.data==b.channel+"-ready"&&(i="postMessage"in h.contentWindow?h.contentWindow:h.contentWindow.document,F(a,"message",e),E(a,"message",f),d(function(){g.up.callback(!0)},0))};E(a,"message",e),u(b.props,{src:s(b.remote,{xdm_e:q(c.href),xdm_c:b.channel,xdm_p:1}),name:P+b.channel+"_provider"}),h=w(b)}else E(a,"message",f),i="postMessage"in a.parent?a.parent:a.parent.document,i.postMessage(b.channel+"-ready",j),d(function(){g.up.callback(!0)},0)},init:function(){l(g.onDOMReady,g)}}},N.stack.FrameElementTransport=function(e){var f,g,h,i;return f={outgoing:function(a,b,c){h.call(this,a),c&&c()},destroy:function(){g&&(g.parentNode.removeChild(g),g=null)},onDOMReady:function(){i=q(e.remote),e.isHost?(u(e.props,{src:s(e.remote,{xdm_e:q(c.href),xdm_c:e.channel,xdm_p:5}),name:P+e.channel+"_provider"}),g=w(e),g.fn=function(a){return delete g.fn,h=a,d(function(){f.up.callback(!0)},0),function(a){f.up.incoming(a,i)}}):(b.referrer&&q(b.referrer)!=V.xdm_e&&(a.top.location=V.xdm_e),h=a.frameElement.fn(function(a){f.up.incoming(a,i)}),f.up.callback(!0))},init:function(){l(f.onDOMReady,f)}}},N.stack.NameTransport=function(a){function b(b){var c=a.remoteHelper+(h?"#_3":"#_2")+a.channel;i.contentWindow.sendMessage(b,c)}function c(){h?2!==++k&&h||g.up.callback(!0):(b("ready"),g.up.callback(!0))}function e(a){g.up.incoming(a,n)}function f(){m&&d(function(){m(!0)},0)}var g,h,i,j,k,m,n,o;return g={outgoing:function(a,c,d){m=d,b(a)},destroy:function(){i.parentNode.removeChild(i),i=null,h&&(j.parentNode.removeChild(j),j=null)},onDOMReady:function(){h=a.isHost,k=0,n=q(a.remote),a.local=r(a.local),h?(N.Fn.set(a.channel,function(b){h&&"ready"===b&&(N.Fn.set(a.channel,e),c())}),o=s(a.remote,{xdm_e:a.local,xdm_c:a.channel,xdm_p:2}),u(a.props,{src:o+"#"+a.channel,name:P+a.channel+"_provider"}),j=w(a)):(a.remoteHelper=a.remote,N.Fn.set(a.channel,e));var b=function(){var e=i||this;F(e,"load",b),N.Fn.set(a.channel+"_load",f),function g(){"function"==typeof e.contentWindow.sendMessage?c():d(g,50)}()};i=w({props:{src:a.local+"#_4"+a.channel},onLoad:b})},init:function(){l(g.onDOMReady,g)}}},N.stack.HashTransport=function(b){function c(a){if(p){var c=b.remote+"#"+n++ +"_"+a;(i||!r?p.contentWindow:p).location=c}}function e(a){m=a,h.up.incoming(m.substring(m.indexOf("_")+1),s)}function f(){if(o){var a=o.location.href,b="",c=a.indexOf("#");-1!=c&&(b=a.substring(c)),b&&b!=m&&e(b)}}function g(){j=setInterval(f,k)}var h,i,j,k,m,n,o,p,r,s;return h={outgoing:function(a,b){c(a)},destroy:function(){a.clearInterval(j),(i||!r)&&p.parentNode.removeChild(p),p=null},onDOMReady:function(){if(i=b.isHost,k=b.interval,m="#"+b.channel,n=0,r=b.useParent,s=q(b.remote),i){if(u(b.props,{src:b.remote,name:P+b.channel+"_provider"}),r)b.onLoad=function(){o=a,g(),h.up.callback(!0)};else{var c=0,e=b.delay/50;!function f(){if(++c>e)throw new Error("Unable to reference listenerwindow");try{o=p.contentWindow.frames[P+b.channel+"_consumer"]}catch(a){}o?(g(),h.up.callback(!0)):d(f,50)}()}p=w(b)}else o=a,g(),r?(p=parent,h.up.callback(!0)):(u(b,{props:{src:b.remote+"#"+b.channel+new Date,name:P+b.channel+"_consumer"},onLoad:function(){h.up.callback(!0)}}),p=w(b))},init:function(){l(h.onDOMReady,h)}}},N.stack.ReliableBehavior=function(a){var b,c,d=0,e=0,f="";return b={incoming:function(a,g){var h=a.indexOf("_"),i=a.substring(0,h).split(",");a=a.substring(h+1),i[0]==d&&(f="",c&&c(!0)),a.length>0&&(b.down.outgoing(i[1]+","+d+"_"+f,g),e!=i[1]&&(e=i[1],b.up.incoming(a,g)))},outgoing:function(a,g,h){f=a,c=h,b.down.outgoing(e+","+ ++d+"_"+a,g)}}},N.stack.QueueBehavior=function(a){function b(){if(a.remove&&0===h.length)return void A(c);if(!i&&0!==h.length&&!g){i=!0;var e=h.shift();c.down.outgoing(e.data,e.origin,function(a){i=!1,e.callback&&d(function(){e.callback(a)},0),b()})}}var c,g,h=[],i=!0,j="",k=0,l=!1,m=!1;return c={init:function(){t(a)&&(a={}),a.maxLength&&(k=a.maxLength,m=!0),a.lazy?l=!0:c.down.init()},callback:function(a){i=!1;var d=c.up;b(),d.callback(a)},incoming:function(b,d){if(m){var f=b.indexOf("_"),g=parseInt(b.substring(0,f),10);j+=b.substring(f+1),0===g&&(a.encode&&(j=e(j)),c.up.incoming(j,d),j="")}else c.up.incoming(b,d)},outgoing:function(d,e,g){a.encode&&(d=f(d));var i,j=[];if(m){for(;0!==d.length;)i=d.substring(0,k),d=d.substring(i.length),j.push(i);for(;i=j.shift();)h.push({data:j.length+"_"+i,origin:e,callback:0===j.length?g:null})}else h.push({data:d,origin:e,callback:g});l?c.down.init():b()},destroy:function(){g=!0,c.down.destroy()}}},N.stack.VerifyBehavior=function(a){function b(){d=Math.random().toString(16).substring(2),c.down.outgoing(d)}var c,d,e;return c={incoming:function(f,g){var h=f.indexOf("_");-1===h?f===d?c.up.callback(!0):e||(e=f,a.initiate||b(),c.down.outgoing(f)):f.substring(0,h)===e&&c.up.incoming(f.substring(h+1),g)},outgoing:function(a,b,e){c.down.outgoing(d+"_"+a,b,e)},callback:function(c){a.initiate&&b()}}},N.stack.RpcBehavior=function(a,b){function c(a){a.jsonrpc="2.0",f.down.outgoing(g.stringify(a))}function d(a,b){var d=Array.prototype.slice;return function(){var e,f=arguments.length,g={method:b};f>0&&"function"==typeof arguments[f-1]?(f>1&&"function"==typeof arguments[f-2]?(e={success:arguments[f-2],error:arguments[f-1]},g.params=d.call(arguments,0,f-2)):(e={success:arguments[f-1]},g.params=d.call(arguments,0,f-1)),j[""+ ++h]=e,g.id=h):g.params=d.call(arguments,0),a.namedParams&&1===g.params.length&&(g.params=g.params[0]),c(g)}}function e(a,b,d,e){if(!d)return void(b&&c({id:b,error:{code:-32601,message:"Procedure not found."}}));var f,g;b?(f=function(a){f=I,c({id:b,result:a})},g=function(a,d){g=I;var e={id:b,error:{code:-32099,message:a}};d&&(e.error.data=d),c(e)}):f=g=I,i(e)||(e=[e]);try{var h=d.method.apply(d.scope,e.concat([f,g]));t(h)||f(h)}catch(j){g(j.message)}}var f,g=b.serializer||W(),h=0,j={};return f={incoming:function(a,d){var f=g.parse(a);if(f.method)b.handle?b.handle(f,c):e(f.method,f.id,b.local[f.method],f.params);else{var h=j[f.id];f.error?h.error&&h.error(f.error):h.success&&h.success(f.result),delete j[f.id]}},init:function(){if(b.remote)for(var c in b.remote)b.remote.hasOwnProperty(c)&&(a[c]=d(b.remote[c],c));f.down.init()},destroy:function(){for(var c in b.remote)b.remote.hasOwnProperty(c)&&a.hasOwnProperty(c)&&delete a[c];f.down.destroy()}}},G.easyXDM=N}(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent),!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c){return!0}function e(a,b,c,e){return a.global?d(b||y,c,e):void 0}function f(a){a.global&&0===conektaAjax.active++&&e(a,null,"ajaxStart")}function g(a){a.global&&!--conektaAjax.active&&e(a,null,"ajaxStop")}function h(a,b){var c=b.context;return b.beforeSend.call(c,a,b)===!1||e(b,c,"ajaxBeforeSend",[a,b])===!1?!1:void e(b,c,"ajaxSend",[a,b])}function i(a,b,c){var d=c.context,f="success";c.success.call(d,a,f,b),e(c,d,"ajaxSuccess",[b,c,a]),k(f,b,c)}function j(a,b,c,d){var f=d.context;d.error.call(f,c,b,a),e(d,f,"ajaxError",[c,d,a]),k(b,c,d)}function k(a,b,c){var d=c.context;c.complete.call(d,b,a),e(c,d,"ajaxComplete",[b,c]),g(c)}function l(){}function m(a){return a&&(a==C?"html":a==B?"json":z.test(a)?"script":A.test(a)&&"xml")||"text"}function n(a,b){return(a+"&"+b).replace(/[&?]{1,2}/,"?")}function o(a){"object"===s(a.data)&&(a.data=q(a.data)),!a.data||a.type&&"GET"!=a.type.toUpperCase()||(a.url=n(a.url,a.data))}function p(a,b,c,d){var e="array"===s(b);for(var f in b){var g=b[f];d&&(f=c?d:d+"["+(e?"":f)+"]"),!d&&e?a.add(g.name,g.value):(c?"array"===s(g):"object"===s(g))?p(a,g,c,f):a.add(f,g)}}function q(a,b){var c=[];return c.add=function(a,b){this.push(E(a)+"="+E(b))},p(c,a,b),c.join("&").replace("%20","+")}function r(a){for(var b=Array.prototype.slice,c=b.call(arguments,1),d=c.length,e=0;d>e;e++){source=c[e];for(v in source)void 0!==source[v]&&(a[v]=source[v])}return a}var s;try{s=a("type-of")}catch(t){var u=a;s=u("type")}var v,w,x=0,y=window.document,z=/^(?:text|application)\/javascript/i,A=/^(?:text|application)\/xml/i,B="application/json",C="text/html",D=/^\s*$/;window.conektaAjax=b.exports=function(a){var b=r({},a||{});for(v in conektaAjax.settings)void 0===b[v]&&(b[v]=conektaAjax.settings[v]);f(b),b.crossDomain||(b.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(b.url)&&RegExp.$2!=window.location.host);var c=b.dataType,d=/=\?/.test(b.url);if("jsonp"==c||d)return d||(b.url=n(b.url,"callback=?")),conektaAjax.JSONP(b);b.url||(b.url=window.location.toString()),o(b);var e,g=b.accepts[c],k={},p=/^([\w-]+:)\/\//.test(b.url)?RegExp.$1:window.location.protocol,q=conektaAjax.settings.xhr();b.crossDomain||(k["X-Requested-With"]="XMLHttpRequest"),g&&(k.Accept=g,g.indexOf(",")>-1&&(g=g.split(",",2)[0]),q.overrideMimeType&&q.overrideMimeType(g)),(b.contentType||b.data&&"GET"!=b.type.toUpperCase())&&(k["Content-Type"]=b.contentType||"application/x-www-form-urlencoded"),b.headers=r(k,b.headers||{}),q.onreadystatechange=function(){if(4==q.readyState){clearTimeout(e);var a,d=!1;if(q.status>=200&&q.status<300||304==q.status||0==q.status&&"file:"==p){c=c||m(q.getResponseHeader("content-type")),a=q.responseText;try{"script"==c?(1,eval)(a):"xml"==c?a=q.responseXML:"json"==c&&(a=D.test(a)?null:JSON.parse(a))}catch(f){d=f}d?j(d,"parsererror",q,b):i(a,q,b)}else j(null,"error",q,b)}};var s="async"in b?b.async:!0;q.open(b.type,b.url,s);for(w in b.headers)q.setRequestHeader(w,b.headers[w]);return h(q,b)===!1?(q.abort(),!1):(b.timeout>0&&(e=setTimeout(function(){q.onreadystatechange=l,q.abort(),j(null,"timeout",q,b)},b.timeout)),q.send(b.data?b.data:null),q)},conektaAjax.active=0,conektaAjax.JSONP=function(a){if(!("type"in a))return conektaAjax(a);var b="jsonp"+ ++x;a.jsonpCallback&&(b=a.jsonpCallback);var c,d=y.createElement("script"),e=function(){b in window&&(window[b]=l),k("abort",f,a)},f={abort:e},g=y.getElementsByTagName("head")[0]||y.documentElement;return a.error&&(d.onerror=function(){f.abort(),a.error()}),window[b]=function(d){clearTimeout(c);try{delete window[b]}catch(e){window[b]=void 0}i(d,f,a)},o(a),d.src=a.url.replace(/=\?/,"="+b),g.insertBefore(d,g.firstChild),a.timeout>0&&(c=setTimeout(function(){f.abort(),k("timeout",f,a)},a.timeout)),f},conektaAjax.settings={type:"GET",beforeSend:l,success:l,error:l,complete:l,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript",json:B,xml:"application/xml, text/xml",html:C,text:"text/plain"},crossDomain:!1,timeout:0},conektaAjax.get=function(a,b){return conektaAjax({url:a,success:b})},conektaAjax.post=function(a,b,c,d){return"function"===s(b)&&(d=d||c,c=b,b=null),conektaAjax({type:"POST",url:a,data:b,success:c,dataType:d})},conektaAjax.getJSON=function(a,b){return conektaAjax({url:a,success:b,dataType:"json"})};var E=encodeURIComponent},{"type-of":2}],2:[function(a,b,c){var d=Object.prototype.toString;b.exports=function(a){switch(d.call(a)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object String]":return"string"}return null===a?"null":void 0===a?"undefined":a&&1===a.nodeType?"element":a===Object(a)?"object":typeof a}},{}]},{},[1]),function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;if(e="https://api.conekta.io/",v="https://s.conekta.io",x="",c="es",l="205000",d={},window.conektaAjax||("undefined"!=typeof jQuery?window.conektaAjax=jQuery.ajax:console.error("no either a jQuery or ajax function provided")),m=function(a){var b;if("undefined"==typeof localStorage||"undefined"==typeof localStorage.getItem)return null;try{return localStorage.setItem("testKey","1"),localStorage.removeItem("testKey"),localStorage.getItem(a)}catch(c){return b=c,null}},n=function(a,b){var c;if("undefined"==typeof localStorage||"undefined"==typeof localStorage.setItem)return null;try{return localStorage.setItem("testKey","1"),localStorage.removeItem("testKey"),localStorage.setItem(a,b)}catch(d){return c=d,null}},r=m("_conekta_publishable_key"),f=function(){var a,b,c,d;if("undefined"==typeof document||"undefined"==typeof document.body||!document.body||"interactive"!==document.readyState&&"complete"!==document.readyState||"undefined"==typeof Conekta)setTimeout(f,150);else if("1"!==Conekta._helpers.finger_printed()){a=document.getElementsByTagName("body")[0],c=document.createElement("iframe"),c.setAttribute("height","1"),c.setAttribute("scrolling","no"),c.setAttribute("frameborder","0"),c.setAttribute("width","1"),c.setAttribute("src","https://ssl.kaptcha.com/logo.htm?m="+l+"&s="+x),d=document.createElement("img"),d.setAttribute("height","1"),d.setAttribute("width","1"),d.setAttribute("src","https://ssl.kaptcha.com/logo.gif?m="+l+"&s="+x),Conekta.Fingerprint(function(b){var c;return c=document.createElement("img"),c.setAttribute("width","1"),c.setAttribute("height","1"),c.setAttribute("border","0"),c.setAttribute("scrolling","no"),c.setAttribute("src",v+"/images/"+x+".gif?"+b.join("&")),a.appendChild(c)});try{c.appendChild(d)}catch(e){b=e}a.appendChild(c),n("_conekta_finger_printed","1")}},w=function(){var a,b;"undefined"==typeof document||"undefined"==typeof document.body||!document.body||"interactive"!==document.readyState&&"complete"!==document.readyState||"undefined"==typeof Conekta?setTimeout(w,150):Conekta._helpers.beacon_sent||(d.riskified&&(b=function(){var a,b,c,e;b=d.riskified.domain,x=x,c=("https:"===document.location.protocol?"https://":"http://")+"beacon.riskified.com?shop="+b+"&sid="+x,a=document.createElement("script"),a.type="text/javascript",a.async=!0,a.src=c,e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(a,e)})(),d.siftscience&&(a=x,window._sift=window._sift||[],_sift.push(["_setAccount",d.siftscience.beacon_key]),_sift.push(["_setSessionId",x]),_sift.push(["_trackPageview"]),(b=function(){var a,b;a=document.createElement("script"),a.type="text/javascript",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.siftscience.com/s.js",b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(a,b)})()))},m("_conekta_session_id")&&m("_conekta_session_id_timestamp")&&(new Date).getTime()-6e5<parseInt(m("_conekta_session_id_timestamp")))x=localStorage.getItem("_conekta_session_id"),f();else if("undefined"!=typeof Shopify)"undefined"==typeof Shopify.getCart&&"undefined"!=typeof jQuery&&(Shopify.getCart=function(a){return jQuery.getJSON("/cart.js",function(b){return"function"==typeof a?a(b):void 0})}),h=function(a){x=a.token,null!==x&&""!==x&&(f(),w(),n("_conekta_session_id",x),n("_conekta_session_id_timestamp",(new Date).getTime().toString()))},"undefined"!=typeof Shopify.getCart&&Shopify.getCart(function(a){h(a)}),o=Shopify.getCart,Shopify.getCart=function(a){var b;b=function(b){h(b),a(b)},o(b)},q=Shopify.onItemAdded,Shopify.onItemAdded=function(a){var b;b=function(b){Shopify.getCart(function(a){h(a)}),a(b)},q(b)},p=Shopify.onCartUpdated,Shopify.onCartUpdated=function(a){var b;b=function(b){h(b),a(b)},p(b)},"undefined"!=typeof jQuery&&jQuery(document).ajaxSuccess(function(a,b,c,d){"cart/add.js"===c.url&&Shopify.getCart(function(a){h(a)})});else{if(y="abcdefghijklmnopqrstuvwxyz0123456789","undefined"!=typeof crypto&&"undefined"!=typeof crypto.getRandomValues)for(t=new Uint32Array(32),crypto.getRandomValues(t),i=j=0,u=t.length-1;u>=0?u>=j:j>=u;i=u>=0?++j:--j)x+=y.charAt(t[i]%36);else for(i=k=0;30>=k;i=++k)s=Math.floor(36*Math.random()),x+=y.charAt(s);n("_conekta_session_id",x),n("_conekta_session_id_timestamp",(new Date).getTime().toString()),f()}g=function(){var a,b,c,e;return c=m("conekta_antifraud_config"),c&&c.match(/^\{/)?d=JSON.parse(c):(b=function(a){return d=a,n("conekta_antifraud_config",d),w()},a=function(){},e="https://d3fxnri0mz3rya.cloudfront.net/antifraud/"+r+".js",conektaAjax({url:e,dataType:"jsonp",jsonpCallback:"conekta_antifraud_config_jsonp",success:b,error:a}))},g(),b={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var c,d,e,f,g,h,j,k;for(k="",c=void 0,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,j=void 0,i=0,a=b._utf8_encode(a);i<a.length;)c=a.charCodeAt(i++),d=a.charCodeAt(i++),e=a.charCodeAt(i++),f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,j=63&e,isNaN(d)?h=j=64:isNaN(e)&&(j=64),k=k+b._keyStr.charAt(f)+b._keyStr.charAt(g)+b._keyStr.charAt(h)+b._keyStr.charAt(j);return k},decode:function(a){var c,d,e,f,g,h,j,k;for(k="",c=void 0,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,j=void 0,i=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<a.length;)f=b._keyStr.indexOf(a.charAt(i++)),g=b._keyStr.indexOf(a.charAt(i++)),h=b._keyStr.indexOf(a.charAt(i++)),j=b._keyStr.indexOf(a.charAt(i++)),c=f<<2|g>>4,d=(15&g)<<4|h>>2,e=(3&h)<<6|j,k+=String.fromCharCode(c),64!==h&&(k+=String.fromCharCode(d)),64!==j&&(k+=String.fromCharCode(e));return k=b._utf8_decode(k)},_utf8_encode:function(a){var b,c,d;for(a=a.replace(/\r\n/g,"\n"),d="",c=0;c<a.length;)b=a.charCodeAt(c),128>b?d+=String.fromCharCode(b):b>127&&2048>b?(d+=String.fromCharCode(b>>6|192),d+=String.fromCharCode(63&b|128)):(d+=String.fromCharCode(b>>12|224),d+=String.fromCharCode(b>>6&63|128),d+=String.fromCharCode(63&b|128)),c++;return d},_utf8_decode:function(a){ var b,c,d,e,f;for(f="",i=0,b=c=d=0;i<a.length;)b=a.charCodeAt(i),128>b?(f+=String.fromCharCode(b),i++):b>191&&224>b?(d=a.charCodeAt(i+1),f+=String.fromCharCode((31&b)<<6|63&d),i+=2):(d=a.charCodeAt(i+1),e=a.charCodeAt(i+2),f+=String.fromCharCode((15&b)<<12|(63&d)<<6|63&e),i+=3);return f}},window.Conekta||(window.Conekta={b64:b,setLanguage:function(a){return c=a},getLanguage:function(){return c},setPublicKey:function(a){"string"==typeof a&&a.match(/^[a-zA-Z0-9_]*$/)&&a.length>=20&&a.length<30?(r=a,n("_conekta_publishable_key",r)):Conekta._helpers.log("Unusable public key: "+a)},setPublishableKey:function(a){return console.warn("setPublishableKey is going to be deprecated on version 2.0.0"),setPublicKey(a)},getPublicKey:function(a){return r},getPublishableKey:function(){return console.warn("setPublishableKey is going to be deprecated on version 2.0.0"),getPublicKey()},_helpers:{finger_printed:function(){return m("_conekta_finger_printed")},beacon_sent:!1,objectKeys:function(a){var b,c;b=[];for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b},parseForm:function(a){var b,c,d,e,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;if(h={},"object"==typeof a){if("undefined"!=typeof jQuery&&(a instanceof jQuery||"jquery"in Object(a))&&(a=a.get()[0],"object"!=typeof a))return{};if(a.nodeType){for(x=a.getElementsByTagName("textarea"),g=a.getElementsByTagName("input"),w=a.getElementsByTagName("select"),b=new Array(x.length+g.length+w.length),i=j=0,t=x.length-1;t>=j;i=j+=1)b[i]=x[i];for(i=n=0,u=g.length-1;u>=n;i=n+=1)b[i+x.length]=g[i];for(i=p=0,v=w.length-1;v>=p;i=p+=1)b[i+x.length+g.length]=w[i];for(r=0,l=b.length;l>r;r++)if(f=b[r],f&&(d=f.getAttribute("data-conekta"))){for(y="SELECT"===f.tagName?f.value:f.getAttribute("value")||f.innerHTML||f.value,e=d.replace(/\]/g,"").replace(/\-/g,"_").split(/\[/),q=null,o=h,k=null,s=0,m=e.length;m>s;s++)c=e[s],o[c]||(o[c]={}),q=o,k=c,o=o[c];q[k]=y}}else h=a}return h},getSessionId:function(){return x},xDomainPost:function(a){var c,d,f;return f=function(b,c,d){return b&&"error"!==b.object&&b.id?a.success(b):a.error(b||{object:"error",type:"api_error",message:"Something went wrong on Conekta's end",message_to_purchaser:"Your code could not be processed, please try again later"})},c=function(){return a.error({object:"error",type:"api_error",message:"Something went wrong, possibly a connectivity issue",message_to_purchaser:"Your code could not be processed, please try again later"})},"file:"===document.location.protocol&&-1!==navigator.userAgent.indexOf("MSIE")?(a.url=(a.jsonp_url||a.url)+"/create.js",a.data._Version="0.3.0",a.data._RaiseHtmlError=!1,a.data.auth_token=Conekta.getPublicKey(),a.data.conekta_client_user_agent='{"agent":"Conekta JavascriptBindings/0.3.0"}',conektaAjax({url:e+a.url,dataType:"jsonp",data:a.data,success:f,error:c})):"undefined"!=typeof(new XMLHttpRequest).withCredentials?conektaAjax({url:e+a.url,type:"POST",dataType:"json",data:JSON.stringify(a.data),contentType:"application/json",headers:{RaiseHtmlError:!1,Accept:"application/vnd.conekta-v0.3.0+json","Accept-Language":Conekta.getLanguage(),"Conekta-Client-User-Agent":'{"agent":"Conekta JavascriptBindings/0.3.0"}',Authorization:"Basic "+b.encode(Conekta.getPublicKey()+":")},success:f,error:c}):(d=new easyXDM.Rpc({swf:"https://conektaapi.s3.amazonaws.com/v0.3.2/flash/easyxdm.swf",remote:e+"easyxdm_cors_proxy.html"},{remote:{request:{}}}),d.request({url:e+a.url,method:"POST",headers:{RaiseHtmlError:!1,Accept:"application/vnd.conekta-v0.3.0+json","Accept-Language":Conekta.getLanguage(),"Conekta-Client-User-Agent":'{"agent":"Conekta JavascriptBindings/0.3.0"}',Authorization:"Basic "+b.encode(Conekta.getPublicKey()+":")},data:JSON.stringify(a.data)},f,c))},log:function(a){return"undefined"!=typeof console&&console.log?console.log(a):void 0},querySelectorAll:function(a){var b,c,d;if(document.querySelectorAll)return document.querySelectorAll(a);for(d=document.createElement("style"),c=[],document.documentElement.firstChild.appendChild(d),document._qsa=[],d.styleSheet?d.styleSheet.cssText=a+"{x-qsa:expression(document._qsa && document._qsa.push(this))}":d.style.cssText=a+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),d.parentNode.removeChild(d);document._qsa.length;)b=document._qsa.shift(),b.style.removeAttribute("x-qsa"),c.push(b);return document._qsa=null,c},querySelector:function(a){var b;return document.querySelector?document.querySelector(a):(b=this.querySelectorAll(a),b.length>0?b[0]:null)}}},Conekta._helpers.querySelectorAll("script[data-conekta-session-id]").length>0&&(a=Conekta._helpers.querySelectorAll("script[data-conekta-session-id]")[0],x=a.getAttribute("data-conekta-session-id")),Conekta._helpers.querySelectorAll("script[data-conekta-public-key]").length>0&&(a=Conekta._helpers.querySelectorAll("script[data-conekta-public-key]")[0],window.Conekta.setPublicKey(a.getAttribute("data-conekta-public-key"))))}.call(this),function(){var a,b,c,d,e,f,g,h=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=[{name:"amex",pattern:/^3[47]/,valid_length:[15]},{name:"diners_club_carte_blanche",pattern:/^30[0-5]/,valid_length:[14]},{name:"diners_club_international",pattern:/^36/,valid_length:[14]},{name:"jcb",pattern:/^35(2[89]|[3-8][0-9])/,valid_length:[16]},{name:"laser",pattern:/^(6304|670[69]|6771)/,valid_length:[16,17,18,19]},{name:"visa_electron",pattern:/^(4026|417500|4508|4844|491(3|7))/,valid_length:[16]},{name:"visa",pattern:/^4/,valid_length:[16]},{name:"mastercard",pattern:/^5[1-5]/,valid_length:[16]},{name:"maestro",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,valid_length:[12,13,14,15,16,17,18,19]},{name:"discover",pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,valid_length:[16]}],e=function(a){var b,c,d,e,f,g;for(g=0,f=a.split("").reverse(),e=c=0,d=f.length;d>c;e=++c)b=f[e],b=+b,e%2?(b*=2,g+=10>b?b:b-9):g+=b;return g%10===0},d=function(a,b){var c;return c=a.length,h.call(b.valid_length,c)>=0},a=["visa","mastercard","maestro","visa_electron","amex","laser","diners_club_carte_blanche","diners_club_international","discover","jcb"],c=function(c){var d,e,f,g,i;for(i=function(){var c,e,f,g;for(g=[],c=0,e=b.length;e>c;c++)d=b[c],f=d.name,h.call(a,f)>=0&&g.push(d);return g}(),f=0,g=i.length;g>f;f++)if(e=i[f],c.match(e.pattern))return e;return null},f=function(a){return"string"==typeof a&&a.match(/^[\d]{1,2}$/)?parseInt(a):a},g=function(a){return"number"==typeof a&&100>a&&(a+=2e3),"string"==typeof a&&a.match(/^([\d]{2,2}|20[\d]{2,2})$/)?(a.match(/^([\d]{2,2})$/)&&(a="20"+a),parseInt(a)):a},Conekta.card={},Conekta.card.getBrand=function(a){var b;return"string"==typeof a?a=a.replace(/[ -]/g,""):"number"==typeof a&&(a=toString(a)),b=c(a),b&&b.name?b.name:null},Conekta.card.validateCVC=function(a){return"number"==typeof a&&a>=0&&1e4>a||"string"==typeof a&&null!==a.match(/^[\d]{3,4}$/)},Conekta.card.validateExpMonth=function(a){var b;return b=f(a),"number"==typeof b&&b>0&&13>b},Conekta.card.validateExpYear=function(a){var b;return b=g(a),"number"==typeof b&&b>2013&&2035>b},Conekta.card.validateExpirationDate=function(a,b){var c,d;return c=f(a),d=g(b),"number"==typeof c&&c>0&&13>c&&"number"==typeof d&&d>2013&&2035>d?new Date(d,c,new Date(d,c,0).getDate())>new Date:!1},Conekta.card.validateExpiry=function(a,b){return Conekta.card.validateExpirationDate(a,b)},Conekta.card.validateName=function(a){return"string"==typeof a&&null!==a.match(/^\s*[A-z]+\s+[A-z]+[\sA-z]*$/)&&null===a.match(/visa|master\s*card|amex|american\s*express|banorte|banamex|bancomer|hsbc|scotiabank|jcb|diners\s*club|discover/i)},Conekta.card.validateNumber=function(a){var b,f,g;return a="string"==typeof a?a.replace(/[ -]/g,""):"number"==typeof a?a.toString():"",b=c(a),g=!1,f=!1,null!=b&&(g=e(a),f=d(a,b)),g&&f},Conekta.Card=Conekta.card}.call(this),function(){Conekta.Token={},Conekta.Token.create=function(a,b,c){var d;return"function"!=typeof b&&(b=Conekta._helpers.log),"function"!=typeof c&&(c=Conekta._helpers.log),d=Conekta._helpers.parseForm(a),"object"==typeof d?Conekta._helpers.objectKeys(d).length>0?(d.card?d.card.device_fingerprint=Conekta._helpers.getSessionId():c({object:"error",type:"invalid_request_error",message:"The form or hash has no attributes 'card'. If you are using a form, please ensure that you have have an input or text area with the data-conekta attribute 'card[number]'. For an example form see: https://github.com/conekta/conekta.js/blob/master/examples/credit_card.html",message_to_purchaser:"The card could not be processed, please try again later"}),d.card&&d.card.address&&!(d.card.address.street1||d.card.address.street2||d.card.address.street3||d.card.address.city||d.card.address.state||d.card.address.country||d.card.address.zip)&&delete d.card.address,Conekta._helpers.xDomainPost({jsonp_url:"tokens",url:"tokens",data:d,success:b,error:c})):c({object:"error",type:"invalid_request_error",message:"supplied parameter 'token' is usable object but has no values (e.g. amount, description) associated with it",message_to_purchaser:"The card could not be processed, please try again later"}):c({object:"error",type:"invalid_request_error",message:"Supplied parameter 'token' is not a javascript object or a form",message_to_purchaser:"The card could not be processed, please try again later"})},Conekta.token={},Conekta.token.create=Conekta.Token.create}.call(this),function(){Date.prototype.stdTimezoneOffset=function(){var a,b;return a=new Date(this.getFullYear(),0,1),b=new Date(this.getFullYear(),6,1),Math.max(a.getTimezoneOffset(),b.getTimezoneOffset())},Conekta.Fingerprint=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;y={detectScreenOrientation:!0,excludeJsFonts:!1,excludeFlashFonts:!1,excludePlugins:!1,excludeIEPlugins:!1,userDefinedFonts:[],sortPluginsFor:[/palemoon/i]},v=Array.prototype.forEach,w=Array.prototype.map,e=function(a,b,c){var d,e,f,g,h,i,j;if(null!==a){if(v&&a.forEach===v)return a.forEach(b,c);if(a.length===+a.length){for(d=e=0,g=a.length;g>e;d=++e)if(j=a[d],b.call(c,a[d],d,a==={}))return}else for(i=0,h=a.length;h>i;i++)if(f=a[i],a.hasOwnProperty(f)&&b.call(c,a[f],f,a)==={})return}},t=function(a,b,c){var d;return d=[],null===a?d:this.nativeMap&&a.map===this.nativeMap?a.map(b,c):(e(a,function(a,e,f){return d[d.length]=b.call(c,a,e,f)}),d)},J=function(a){return a.push({key:"ua",value:navigator.userAgent}),a},r=function(a){return a.push({key:"l",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),a},c=function(a){return a.push({key:"cd",value:screen.colorDepth}),a},z=function(a){return a.push({key:"pr",value:window.devicePixelRatio||""}),a},D=function(a){return l(a),a},l=function(a){var b;return y.detectScreenOrientation?(b=[screen.width,screen.height],screen.height>screen.width&&(b=[screen.height,screen.width])):b=[screen.width,screen.height],"undefined"!=typeof b&&(a.push({key:"sw",value:b[0]}),a.push({key:"sh",value:b[1]})),a},g=function(){var a;return a=document.inputEncoding||document.characterSet||document.charset||document.defaultCharset,"undefined"!=typeof a&&q.push({key:"cs",value:a}),q},G=function(){return q.push({key:"to",value:(new Date).getTimezoneOffset()}),q},F=function(){return q.push({key:"d",value:(new Date).stdTimezoneOffset()-(new Date).getTimezoneOffset()}),q},E=function(){return q.push({key:"ss",value:window.hasOwnProperty("sessionStorage")?1:0}),q},s=function(){return q.push({key:"ls",value:window.hasOwnProperty("localStorage")?1:0}),q},o=function(){return q.push({key:"idx",value:window.hasOwnProperty("indexedDB")?1:0}),q},b=function(){return document.body&&document.body.addBehavior&&q.push({key:"add_behavior",value:1}),q},x=function(){return q.push({key:"odb",value:window.openDatabase?1:0}),q},d=function(){return q.push({key:"cc",value:navigator.cpuClass||""}),q},A=function(){return q.push({key:"np",value:navigator.platform||""}),q},m=function(a){return a.push({key:"hll",value:i()?1:0}),a},i=function(){var a,b;if("undefined"!=typeof navigator.languages)try{if(b=navigator.languages[0].substr(0,2),b!==navigator.language.substr(0,2))return!0}catch(c){return a=c,!0}return!1},u=function(a){var b,c,d,e,f;for(e=[],f=navigator.mimeTypes,b=0,c=f.length;c>b;b++)d=f[b],e.push(d.type);return a.push({key:"mtn",value:e.length}),a.push({key:"mth",value:md5(e.join(";"))}),a},p=function(){return"Microsoft Internet Explorer"===navigator.appName?!0:"Netscape"===navigator.appName&&/Trident/.test(navigator.userAgent)?!0:!1},B=function(a){var b;return y.excludePlugins||(p()?y.excludeIEPlugins||(b=j(),a.push({key:"ieph",value:md5(b.join(";"))}),a.push({key:"iepn",value:b.length})):(b=k(),a.push({key:"rph",value:md5(b.join(";"))}),a.push({key:"rpn",value:b.length}))),a},k=function(){var a,b,c;for(c=[],a=0,b=navigator.plugins.length;b>a;)c.push(navigator.plugins[a]),a++;return C()&&(c=c.sort(function(a,b){return a.name>b.name?1:a.name<b.name?-1:0})),t(c,function(a){var b;return b=t(a,function(a){return[a.type,a.suffixes].join("~")}).join(","),[a.name,a.description,b].join("::")},this)},j=function(){var a,b;return b=[],(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window)&&(a=["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],b=t(a,function(a){var b;try{return new ActiveXObject(a),a}catch(c){return b=c,null}})),navigator.plugins&&(b=b.concat(k())),b},C=function(){var a,b,c,d;for(d=!1,a=0,b=y.sortPluginsFor.length;b>a;){if(c=y.sortPluginsFor[a],navigator.userAgent.match(c)){d=!0;break}a++}return d},h=function(a,b){var c;return c=function(){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,z,A,B,C;for(e=["monospace","sans-serif","serif"],n=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],l=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goud