!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).bundle={})}(this,function(t){"use strict";function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),r=e(function(t){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)}),o=(r.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),i=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t},c=function(t){try{return!!t()}catch(t){return!0}},a=!c(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),u=n.document,s=o(u)&&o(u.createElement),f=function(t){return s?u.createElement(t):{}},l=!a&&!c(function(){return 7!=Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a}),h=Object.defineProperty,p={f:a?Object.defineProperty:function(t,e,n){if(i(t),e=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")}(e,!0),i(n),l)try{return h(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}},v=a?function(t,e,n){return p.f(t,e,function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}(1,n))}:function(t,e,n){return t[e]=n,t},d={}.hasOwnProperty,y=function(t,e){return d.call(t,e)},g=0,m=Math.random(),w=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++g+m).toString(36))},_=e(function(t){var e=n["__core-js_shared__"]||(n["__core-js_shared__"]={});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),b=_("native-function-to-string",Function.toString),x=e(function(t){var e=w("src"),o=(""+b).split("toString");r.inspectSource=function(t){return b.call(t)},(t.exports=function(t,r,i,c){var a="function"==typeof i;a&&(y(i,"name")||v(i,"name",r)),t[r]!==i&&(a&&(y(i,e)||v(i,e,t[r]?""+t[r]:o.join(String(r)))),t===n?t[r]=i:c?t[r]?t[r]=i:v(t,r,i):(delete t[r],v(t,r,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[e]||b.call(this)})}),E=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},j=function(t,e,n){if(E(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},S=function(t,e,o){var i,c,a,u,s=t&S.F,f=t&S.G,l=t&S.S,h=t&S.P,p=t&S.B,d=f?n:l?n[e]||(n[e]={}):(n[e]||{}).prototype,y=f?r:r[e]||(r[e]={}),g=y.prototype||(y.prototype={});for(i in f&&(o=e),o)a=((c=!s&&d&&void 0!==d[i])?d:o)[i],u=p&&c?j(a,n):h&&"function"==typeof a?j(Function.call,a):a,d&&x(d,i,a,t&S.U),y[i]!=a&&v(y,i,u),h&&g[i]!=a&&(g[i]=a)};n.core=r,S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128;var P=S,k={}.toString,O=function(t){return k.call(t).slice(8,-1)},T=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==O(t)?t.split(""):Object(t)},L=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},C=Math.ceil,R=Math.floor,A=function(t){return isNaN(t=+t)?0:(t>0?R:C)(t)},M=Math.min,F=function(t){return t>0?M(A(t),9007199254740991):0},N=Math.max,I=Math.min,D=e(function(t){var e=_("wks"),r=n.Symbol,o="function"==typeof r;(t.exports=function(t){return e[t]||(e[t]=o&&r[t]||(o?r:w)("Symbol."+t))}).store=e}),q=D("unscopables"),G=Array.prototype;null==G[q]&&v(G,q,{});var K,U,z=(K=!0,function(t,e,n){var r,o=T(L(t)),i=F(o.length),c=function(t,e){return(t=A(t))<0?N(t+e,0):I(t,e)}(n,i);if(K&&e!=e){for(;i>c;)if((r=o[c++])!=r)return!0}else for(;i>c;c++)if((K||c in o)&&o[c]===e)return K||c||0;return!K&&-1});P(P.P,"Array",{includes:function(t){return z(this,t,arguments.length>1?arguments[1]:void 0)}}),U="includes",G[q][U]=!0;var H=D("match"),B=function(t,e,n){if(o(r=e)&&(void 0!==(i=r[H])?i:"RegExp"==O(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(L(t))},W=D("match");function J(t,e,n,r,o,i,c){try{var a=t[i](c),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function Y(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function c(t){J(i,r,o,c,a,"next",t)}function a(t){J(i,r,o,c,a,"throw",t)}c(void 0)})}}function $(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(t,e){for(var n=0;n1?arguments[1]:void 0)}});e(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),c=new O(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var a=S(c,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=f(t,e,n);if("normal"===u.type){if(r=n.done?v:h,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=v,n.method="throw",n.arg=u.arg)}}}(t,n,c),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",p="executing",v="completed",d={};function y(){}function g(){}function m(){}var w={};w[i]=function(){return this};var _=Object.getPrototypeOf,b=_&&_(_(T([])));b&&b!==n&&r.call(b,i)&&(w=b);var x=m.prototype=y.prototype=Object.create(w);function E(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function j(t,e){var n;this._invoke=function(o,i){function c(){return new e(function(n,c){!function n(o,i,c,a){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,c,a)},function(t){n("throw",t,c,a)}):e.resolve(l).then(function(t){s.value=t,c(s)},function(t){return n("throw",t,c,a)})}a(u.arg)}(o,i,n,c)})}return n=n?n.then(c,c):c()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=f(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function n(){for(;++o=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var u=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});var V,Z=function(t){return{query:"mutation createToken($input: CreateTokenInput!) { createToken(input: $input) { id used createdAt expiredAt } }",variables:{input:t}}};!function(t){t.Card="CARD"}(V||(V={}));var tt=function(){function t(e){$(this,t),this.client=e.client}return Q(t,[{key:"createToken",value:function(){var t=Y(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("createToken card info required");case 2:return!e.type&&e.card&&(e.type=V.Card),t.next=5,this.client.post(Z(e));case 5:return n=t.sent,t.abrupt("return",n);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}]),t}();P(P.P,"String",{repeat:function(t){var e=String(L(this)),n="",r=A(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}});var et=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};a&&"g"!=/./g.flags&&p.f(RegExp.prototype,"flags",{configurable:!0,get:et});var nt=/./.toString,rt=function(t){x(RegExp.prototype,"toString",t,!0)};c(function(){return"/a/b"!=nt.call({source:"a",flags:"b"})})?rt(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?et.call(t):void 0)}):"toString"!=nt.name&&rt(function(){return nt.call(this)});var ot=D("toStringTag"),it="Arguments"==O(function(){return arguments}()),ct=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),ot))?n:it?O(e):"Object"==(r=O(e))&&"function"==typeof e.callee?"Arguments":r},at={};at[D("toStringTag")]="z",at+""!="[object z]"&&x(Object.prototype,"toString",function(){return"[object "+ct(this)+"]"},!0);var ut,st,ft,lt=function(){function t(){$(this,t),this.addClearsaleScript();var e,n=[(e=Date.now().toString(16)+Math.random().toString(16)+"0".repeat(16)).substr(0,8),e.substr(8,4),"4000-8"+e.substr(13,3),e.substr(16,12)].join("-");window.csdp("app","99f80c17a7"),window.csdp("sessionid",n),this.setSessionID(n)}return Q(t,[{key:"addClearsaleScript",value:function(){window.CsdpObject="csdp",window.csdp=window.csdp||function(){(window.csdp.q=window.csdp.q||[]).push(arguments)},window.csdp.l=Date.now();var t=document.createElement("script");t.setAttribute("async","true"),t.setAttribute("src","https://js.upnid.com/cs.js"),document.head.appendChild(t)}},{key:"setSessionID",value:function(t){this.sessionID=t}},{key:"getSessionID",value:function(){return this.sessionID}}]),t}(),ht=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}},pt={},vt=D("iterator"),dt=Array.prototype,yt=function(t){return void 0!==t&&(pt.Array===t||dt[vt]===t)},gt=D("iterator"),mt=r.getIteratorMethod=function(t){if(null!=t)return t[gt]||t["@@iterator"]||pt[ct(t)]},wt=e(function(t){var e={},n={},r=t.exports=function(t,r,o,c,a){var u,s,f,l,h=a?function(){return t}:mt(t),p=j(o,c,r?2:1),v=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(yt(h)){for(u=F(t.length);u>v;v++)if((l=r?p(i(s=t[v])[0],s[1]):p(t[v]))===e||l===n)return l}else for(f=h.call(t);!(s=f.next()).done;)if((l=ht(f,p,s.value,r))===e||l===n)return l};r.BREAK=e,r.RETURN=n}),_t=D("species"),bt=n.document,xt=bt&&bt.documentElement,Et=n.process,jt=n.setImmediate,St=n.clearImmediate,Pt=n.MessageChannel,kt=n.Dispatch,Ot=0,Tt={},Lt=function(){var t=+this;if(Tt.hasOwnProperty(t)){var e=Tt[t];delete Tt[t],e()}},Ct=function(t){Lt.call(t.data)};jt&&St||(jt=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Tt[++Ot]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},ut(Ot),Ot},St=function(t){delete Tt[t]},"process"==O(Et)?ut=function(t){Et.nextTick(j(Lt,t,1))}:kt&&kt.now?ut=function(t){kt.now(j(Lt,t,1))}:Pt?(ft=(st=new Pt).port2,st.port1.onmessage=Ct,ut=j(ft.postMessage,ft,1)):n.addEventListener&&"function"==typeof postMessage&&!n.importScripts?(ut=function(t){n.postMessage(t+"","*")},n.addEventListener("message",Ct,!1)):ut="onreadystatechange"in f("script")?function(t){xt.appendChild(f("script")).onreadystatechange=function(){xt.removeChild(this),Lt.call(t)}}:function(t){setTimeout(j(Lt,t,1),0)});var Rt={set:jt,clear:St},At=Rt.set,Mt=n.MutationObserver||n.WebKitMutationObserver,Ft=n.process,Nt=n.Promise,It="process"==O(Ft);function Dt(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=E(e),this.reject=E(n)}var qt={f:function(t){return new Dt(t)}},Gt=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Kt=n.navigator,Ut=Kt&&Kt.userAgent||"",zt=p.f,Ht=D("toStringTag"),Bt=D("species"),Wt=D("iterator"),Jt=!1;try{var Yt=[7][Wt]();Yt.return=function(){Jt=!0},Array.from(Yt,function(){throw 2})}catch(t){}var $t,Xt,Qt,Vt,Zt,te,ee,ne,re=Rt.set,oe=function(){var t,e,r,o=function(){var n,o;for(It&&(n=Ft.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(It)r=function(){Ft.nextTick(o)};else if(!Mt||n.navigator&&n.navigator.standalone)if(Nt&&Nt.resolve){var i=Nt.resolve(void 0);r=function(){i.then(o)}}else r=function(){At.call(n,o)};else{var c=!0,a=document.createTextNode("");new Mt(o).observe(a,{characterData:!0}),r=function(){a.data=c=!c}}return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,r()),e=o}}(),ie=n.TypeError,ce=n.process,ae=ce&&ce.versions,ue=ae&&ae.v8||"",se=n.Promise,fe="process"==ct(ce),le=function(){},he=Xt=qt.f,pe=!!function(){try{var t=se.resolve(1),e=(t.constructor={})[D("species")]=function(t){t(le,le)};return(fe||"function"==typeof PromiseRejectionEvent)&&t.then(le)instanceof e&&0!==ue.indexOf("6.6")&&-1===Ut.indexOf("Chrome/66")}catch(t){}}(),ve=function(t){var e;return!(!o(t)||"function"!=typeof(e=t.then))&&e},de=function(t,e){if(!t._n){t._n=!0;var n=t._c;oe(function(){for(var r=t._v,o=1==t._s,i=0,c=function(e){var n,i,c,a=o?e.ok:e.fail,u=e.resolve,s=e.reject,f=e.domain;try{a?(o||(2==t._h&&me(t),t._h=1),!0===a?n=r:(f&&f.enter(),n=a(r),f&&(f.exit(),c=!0)),n===e.promise?s(ie("Promise-chain cycle")):(i=ve(n))?i.call(n,u,s):u(n)):s(r)}catch(t){f&&!c&&f.exit(),s(t)}};n.length>i;)c(n[i++]);t._c=[],t._n=!1,e&&!t._h&&ye(t)})}},ye=function(t){re.call(n,function(){var e,r,o,i=t._v,c=ge(t);if(c&&(e=Gt(function(){fe?ce.emit("unhandledRejection",i,t):(r=n.onunhandledrejection)?r({promise:t,reason:i}):(o=n.console)&&o.error&&o.error("Unhandled promise rejection",i)}),t._h=fe||ge(t)?2:1),t._a=void 0,c&&e.e)throw e.v})},ge=function(t){return 1!==t._h&&0===(t._a||t._c).length},me=function(t){re.call(n,function(){var e;fe?ce.emit("rejectionHandled",t):(e=n.onrejectionhandled)&&e({promise:t,reason:t._v})})},we=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),de(e,!0))},_e=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw ie("Promise can't be resolved itself");(e=ve(t))?oe(function(){var r={_w:n,_d:!1};try{e.call(t,j(_e,r,1),j(we,r,1))}catch(t){we.call(r,t)}}):(n._v=t,n._s=1,de(n,!1))}catch(t){we.call({_w:n,_d:!1},t)}}};pe||(se=function(t){!function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!")}(this,se,"Promise","_h"),E(t),$t.call(this);try{t(j(_e,this,1),j(we,this,1))}catch(t){we.call(this,t)}},($t=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)x(t,r,e[r],n);return t}(se.prototype,{then:function(t,e){var n,r,o,c=he((n=se,void 0===(o=i(this).constructor)||null==(r=i(o)[_t])?n:E(r)));return c.ok="function"!=typeof t||t,c.fail="function"==typeof e&&e,c.domain=fe?ce.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&de(this,!1),c.promise},catch:function(t){return this.then(void 0,t)}}),Qt=function(){var t=new $t;this.promise=t,this.resolve=j(_e,t,1),this.reject=j(we,t,1)},qt.f=he=function(t){return t===se||t===Vt?new Qt(t):Xt(t)}),P(P.G+P.W+P.F*!pe,{Promise:se}),te="Promise",(Zt=se)&&!y(Zt=ee?Zt:Zt.prototype,Ht)&&zt(Zt,Ht,{configurable:!0,value:te}),ne=n["Promise"],a&&ne&&!ne[Bt]&&p.f(ne,Bt,{configurable:!0,get:function(){return this}}),Vt=r.Promise,P(P.S+P.F*!pe,"Promise",{reject:function(t){var e=he(this);return(0,e.reject)(t),e.promise}}),P(P.S+P.F*!pe,"Promise",{resolve:function(t){return function(t,e){if(i(t),o(e)&&e.constructor===t)return e;var n=qt.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),P(P.S+P.F*!(pe&&function(t,e){if(!e&&!Jt)return!1;var n=!1;try{var r=[7],o=r[Wt]();o.next=function(){return{done:n=!0}},r[Wt]=function(){return o},t(r)}catch(t){}return n}(function(t){se.all(t).catch(le)})),"Promise",{all:function(t){var e=this,n=he(e),r=n.resolve,o=n.reject,i=Gt(function(){var n=[],i=0,c=1;wt(t,!1,function(t){var a=i++,u=!1;n.push(void 0),c++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--c||r(n))},o)}),--c||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=he(e),r=n.reject,o=Gt(function(){wt(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}});var be={client:"Upnid.js",version:"v0",baseurl:"https://api.upnid.com/2020-06/client/graphql"},xe=function(){function t(e){$(this,t);this.headers={"x-upnid-client-name":be.client,"x-upnid-client-version":be.version,"Content-Type":"application/json",Authorization:"Bearer ".concat(e.clientKey)}}return Q(t,[{key:"post",value:function(){var t=Y(regeneratorRuntime.mark(function t(e){var n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){var o={method:"POST",body:JSON.stringify(e),headers:n.headers},i=new XMLHttpRequest;i.onload=function(){var e=JSON.parse(this.responseText);t(e)},i.onerror=function(e){console.log("Error Occurred :",e),t({errors:["Something wrong happen: status ".concat(this.status)]})},i.open(o.method,be.baseurl,!0),i.setRequestHeader("x-upnid-client-name",o.headers["x-upnid-client-name"]),i.setRequestHeader("x-upnid-client-version",o.headers["x-upnid-client-version"]),i.setRequestHeader("Content-Type",o.headers["Content-Type"]),i.setRequestHeader("Authorization",o.headers.Authorization),i.send(o.body)}));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()}]),t}(),Ee=function(){function t(e){if($(this,t),null!=e){if(!e.clientKey)throw new Error("ClientKey required");if(!this.validateClientKey(e.clientKey))throw new Error("The clientkey needs to be on this format: ck_live_***");var n=new xe({clientKey:e.clientKey});this.token=new tt({client:n})}this.fingerprint=new lt}return Q(t,[{key:"validateClientKey",value:function(t){return t.includes("ck_live_")||t.includes("ck_test")}},{key:"getFingerprint",value:function(){return this.fingerprint.getSessionID()}}]),t}();window.Upnid=window.Upnid||Ee,t.Upnid=Ee,Object.defineProperty(t,"__esModule",{value:!0})});