var XsollaLogin=function(e){"use strict";var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)};function r(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}};function i(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var a=Object.prototype.toString;function s(e){return"[object Array]"===a.call(e)}function c(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===a.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var l={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:function(e){return null!=e&&(i(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))}(e)||!!e._isBuffer)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:c,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:u,isStream:function(e){return c(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:f,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,function(t,n){e[n]=r&&"function"==typeof t?o(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},p="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function d(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}var h=d,m=y;function g(e){if(h===setTimeout)return setTimeout(e,0);if((h===d||!h)&&setTimeout)return h=setTimeout,setTimeout(e,0);try{return h(e,0)}catch(t){try{return h.call(null,e,0)}catch(t){return h.call(this,e,0)}}}"function"==typeof p.setTimeout&&(h=setTimeout),"function"==typeof p.clearTimeout&&(m=clearTimeout);var v,b=[],w=!1,E=-1;function S(){w&&v&&(w=!1,v.length?b=v.concat(b):E=-1,b.length&&j())}function j(){if(!w){var e=g(S);w=!0;for(var t=b.length;t;){for(v=b,b=[];++E<t;)v&&v[E].run();E=-1,t=b.length}v=null,w=!1,function(e){if(m===clearTimeout)return clearTimeout(e);if((m===y||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(e);try{m(e)}catch(t){try{return m.call(null,e)}catch(t){return m.call(this,e)}}}(e)}}function O(e,t){this.fun=e,this.array=t}O.prototype.run=function(){this.fun.apply(null,this.array)};function x(){}var _=x,T=x,P=x,A=x,k=x,I=x,C=x;var N=p.performance||{},M=N.now||N.mozNow||N.msNow||N.oNow||N.webkitNow||function(){return(new Date).getTime()};var R=new Date;var U={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];b.push(new O(e,t)),1!==b.length||w||g(j)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:_,addListener:T,once:P,off:A,removeListener:k,removeAllListeners:I,emit:C,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*M.call(N),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-R)/1e3}},D=function(e,t,r,n,o){return function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}(new Error(e),t,r,n,o)};function L(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var q=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],B=l.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=l.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function G(){this.message="String contains an invalid character"}G.prototype=new Error,G.prototype.code=5,G.prototype.name="InvalidCharacterError";var W=function(e){for(var t,r,n=String(e),o="",i=0,a=F;n.charAt(0|i)||(a="=",i%1);o+=a.charAt(63&t>>8-i%1*8)){if((r=n.charCodeAt(i+=.75))>255)throw new G;t=t<<8|r}return o},V=l.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),l.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),l.isString(n)&&a.push("path="+n),l.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},H="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||W,X=function(e){return new Promise(function(t,r){var n=e.data,o=e.headers;l.isFormData(n)&&delete o["Content-Type"];var i=new XMLHttpRequest,a="onreadystatechange",s=!1;if("test"===U.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in i||B(e.url)||(i=new window.XDomainRequest,a="onload",s=!0,i.onprogress=function(){},i.ontimeout=function(){}),e.auth){var c=e.auth.username||"",u=e.auth.password||"";o.Authorization="Basic "+H(c+":"+u)}if(i.open(e.method.toUpperCase(),function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(l.isURLSearchParams(t))n=t.toString();else{var o=[];l.forEach(t,function(e,t){null!=e&&(l.isArray(e)?t+="[]":e=[e],l.forEach(e,function(e){l.isDate(e)?e=e.toISOString():l.isObject(e)&&(e=JSON.stringify(e)),o.push(L(t)+"="+L(e))}))}),n=o.join("&")}return n&&(e+=(-1===e.indexOf("?")?"?":"&")+n),e}(e.url,e.params,e.paramsSerializer),!0),i.timeout=e.timeout,i[a]=function(){if(i&&(4===i.readyState||s)&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var n,o,a,c,u,f="getAllResponseHeaders"in i?(n=i.getAllResponseHeaders(),u={},n?(l.forEach(n.split("\n"),function(e){if(c=e.indexOf(":"),o=l.trim(e.substr(0,c)).toLowerCase(),a=l.trim(e.substr(c+1)),o){if(u[o]&&q.indexOf(o)>=0)return;u[o]="set-cookie"===o?(u[o]?u[o]:[]).concat([a]):u[o]?u[o]+", "+a:a}}),u):u):null,p={data:e.responseType&&"text"!==e.responseType?i.response:i.responseText,status:1223===i.status?204:i.status,statusText:1223===i.status?"No Content":i.statusText,headers:f,config:e,request:i};!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(D("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}(t,r,p),i=null}},i.onerror=function(){r(D("Network Error",e,null,i)),i=null},i.ontimeout=function(){r(D("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",i)),i=null},l.isStandardBrowserEnv()){var f=V,p=(e.withCredentials||B(e.url))&&e.xsrfCookieName?f.read(e.xsrfCookieName):void 0;p&&(o[e.xsrfHeaderName]=p)}if("setRequestHeader"in i&&l.forEach(o,function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete o[t]:i.setRequestHeader(t,e)}),e.withCredentials&&(i.withCredentials=!0),e.responseType)try{i.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&i.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){i&&(i.abort(),r(e),i=null)}),void 0===n&&(n=null),i.send(n)})},z={"Content-Type":"application/x-www-form-urlencoded"};function $(e,t){!l.isUndefined(e)&&l.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var J,K={adapter:("undefined"!=typeof XMLHttpRequest?J=X:void 0!==U&&(J=X),J),transformRequest:[function(e,t){return function(e,t){l.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}(t,"Content-Type"),l.isFormData(e)||l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)?e:l.isArrayBufferView(e)?e.buffer:l.isURLSearchParams(e)?($(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):l.isObject(e)?($(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};K.headers={common:{Accept:"application/json, text/plain, */*"}},l.forEach(["delete","get","head"],function(e){K.headers[e]={}}),l.forEach(["post","put","patch"],function(e){K.headers[e]=l.merge(z)});var Z=K;function Y(){this.handlers=[]}Y.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},Y.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Y.prototype.forEach=function(e){l.forEach(this.handlers,function(t){null!==t&&e(t)})};var Q=Y,ee=function(e,t,r){return l.forEach(r,function(r){e=r(e,t)}),e},te=function(e){return!(!e||!e.__CANCEL__)};function re(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var ne=function(e){var t,r,n;return re(e),e.baseURL&&(n=e.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(n))&&(e.url=(t=e.baseURL,(r=e.url)?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t)),e.headers=e.headers||{},e.data=ee(e.data,e.headers,e.transformRequest),e.headers=l.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),l.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||Z.adapter)(e).then(function(t){return re(e),t.data=ee(t.data,t.headers,e.transformResponse),t},function(t){return te(t)||(re(e),t&&t.response&&(t.response.data=ee(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})},oe="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ie(e,t){return e(t={exports:{}},t.exports),t.exports}var ae=ie(function(e){var t=function(){function e(t,n,o,i){"object"==typeof n&&(o=n.depth,i=n.prototype,n.filter,n=n.circular);var a=[],s=[],c="undefined"!=typeof Buffer;return void 0===n&&(n=!0),void 0===o&&(o=1/0),function t(o,u){if(null===o)return null;if(0==u)return o;var f,l;if("object"!=typeof o)return o;if(e.__isArray(o))f=[];else if(e.__isRegExp(o))f=new RegExp(o.source,r(o)),o.lastIndex&&(f.lastIndex=o.lastIndex);else if(e.__isDate(o))f=new Date(o.getTime());else{if(c&&Buffer.isBuffer(o))return f=Buffer.allocUnsafe?Buffer.allocUnsafe(o.length):new Buffer(o.length),o.copy(f),f;void 0===i?(l=Object.getPrototypeOf(o),f=Object.create(l)):(f=Object.create(i),l=i)}if(n){var p=a.indexOf(o);if(-1!=p)return s[p];a.push(o),s.push(f)}for(var d in o){var y;l&&(y=Object.getOwnPropertyDescriptor(l,d)),y&&null==y.set||(f[d]=t(o[d],u-1))}return f}(t,o)}function t(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=t,e.__isDate=function(e){return"object"==typeof e&&"[object Date]"===t(e)},e.__isArray=function(e){return"object"==typeof e&&"[object Array]"===t(e)},e.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===t(e)},e.__getRegExpFlags=r,e}();e.exports&&(e.exports=t)}),se=function(e,t){return e=e||{},Object.keys(t).forEach(function(r){void 0===e[r]&&(e[r]=ae(t[r]))}),e};function ce(e){this.defaults=e,this.interceptors={request:new Q,response:new Q}}ce.prototype.request=function(e){"string"==typeof e&&(e=l.merge({url:arguments[0]},arguments[1])),(e=l.merge(se,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[ne,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},l.forEach(["delete","get","head","options"],function(e){ce.prototype[e]=function(t,r){return this.request(l.merge(r||{},{method:e,url:t}))}}),l.forEach(["post","put","patch"],function(e){ce.prototype[e]=function(t,r,n){return this.request(l.merge(n||{},{method:e,url:t,data:r}))}});var ue=ce;function fe(e){this.message=e}fe.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},fe.prototype.__CANCEL__=!0;var le=fe;function pe(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new le(e),t(r.reason))})}pe.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},pe.source=function(){var e;return{token:new pe(function(t){e=t}),cancel:e}};var de=pe;function ye(e){var t=new ue(e),r=o(ue.prototype.request,t);return l.extend(r,ue.prototype,t),l.extend(r,t),r}var he=ye(Z);he.Axios=ue,he.create=function(e){return ye(l.merge(Z,e))},he.Cancel=le,he.CancelToken=de,he.isCancel=te,he.all=function(e){return Promise.all(e)},he.spread=function(e){return function(t){return e.apply(null,t)}};var me=he,ge=he;me.default=ge;var ve=me,be=Array.prototype.slice,we=Object.prototype.toString,Ee=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==we.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=be.call(arguments,1),o=Math.max(0,t.length-n.length),i=[],a=0;a<o;a++)i.push("$"+a);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var o=t.apply(this,n.concat(be.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(be.call(arguments)))}),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},Se=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},je="undefined"!=typeof Symbol&&Symbol,Oe=function(){return"function"==typeof je&&("function"==typeof Symbol&&("symbol"==typeof je("foo")&&("symbol"==typeof Symbol("bar")&&Se())))},xe=Ee.call(Function.call,Object.prototype.hasOwnProperty),_e=SyntaxError,Te=Function,Pe=TypeError,Ae=function(e){try{return Te('"use strict"; return ('+e+").constructor;")()}catch(e){}},ke=Object.getOwnPropertyDescriptor;if(ke)try{ke({},"")}catch(e){ke=null}var Ie=function(){throw new Pe},Ce=ke?function(){try{return Ie}catch(e){try{return ke(arguments,"callee").get}catch(e){return Ie}}}():Ie,Ne=Oe(),Me=Object.getPrototypeOf||function(e){return e.__proto__},Re={},Ue="undefined"==typeof Uint8Array?void 0:Me(Uint8Array),De={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":Ne?Me([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Re,"%AsyncGenerator%":Re,"%AsyncGeneratorFunction%":Re,"%AsyncIteratorPrototype%":Re,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":Te,"%GeneratorFunction%":Re,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ne?Me(Me([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Ne?Me((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Ne?Me((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ne?Me(""[Symbol.iterator]()):void 0,"%Symbol%":Ne?Symbol:void 0,"%SyntaxError%":_e,"%ThrowTypeError%":Ce,"%TypedArray%":Ue,"%TypeError%":Pe,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},Le={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},qe=Ee.call(Function.call,Array.prototype.concat),Be=Ee.call(Function.apply,Array.prototype.splice),Fe=Ee.call(Function.call,String.prototype.replace),Ge=Ee.call(Function.call,String.prototype.slice),We=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ve=/\\(\\)?/g,He=function(e,t){var r,n=e;if(xe(Le,n)&&(n="%"+(r=Le[n])[0]+"%"),xe(De,n)){var o=De[n];if(o===Re&&(o=function e(t){var r;if("%AsyncFunction%"===t)r=Ae("async function () {}");else if("%GeneratorFunction%"===t)r=Ae("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=Ae("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=Me(o.prototype))}return De[t]=r,r}(n)),void 0===o&&!t)throw new Pe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new _e("intrinsic "+e+" does not exist!")},Xe=function(e,t){if("string"!=typeof e||0===e.length)throw new Pe("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Pe('"allowMissing" argument must be a boolean');var r=function(e){var t=Ge(e,0,1),r=Ge(e,-1);if("%"===t&&"%"!==r)throw new _e("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new _e("invalid intrinsic syntax, expected opening `%`");var n=[];return Fe(e,We,function(e,t,r,o){n[n.length]=r?Fe(o,Ve,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=He("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],Be(r,qe([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var l=r[u],p=Ge(l,0,1),d=Ge(l,-1);if(('"'===p||"'"===p||"`"===p||'"'===d||"'"===d||"`"===d)&&p!==d)throw new _e("property names with quotes must have matching quotes");if("constructor"!==l&&f||(s=!0),xe(De,i="%"+(n+="."+l)+"%"))a=De[i];else if(null!=a){if(!(l in a)){if(!t)throw new Pe("base intrinsic for "+e+" exists, but the property is not available.");return}if(ke&&u+1>=r.length){var y=ke(a,l);a=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[l]}else f=xe(a,l),a=a[l];f&&!s&&(De[i]=a)}}return a},ze=ie(function(e){var t=Xe("%Function.prototype.apply%"),r=Xe("%Function.prototype.call%"),n=Xe("%Reflect.apply%",!0)||Ee.call(r,t),o=Xe("%Object.getOwnPropertyDescriptor%",!0),i=Xe("%Object.defineProperty%",!0),a=Xe("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=n(Ee,r,arguments);o&&i&&(o(t,"length").configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))}));return t};var s=function(){return n(Ee,t,arguments)};i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),$e=(ze.apply,Object.prototype.toString),Je=function(e){var t=$e.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===$e.call(e.callee)),r},Ke=Object.prototype.hasOwnProperty,Ze=Object.prototype.toString,Ye=Array.prototype.slice,Qe=Object.prototype.propertyIsEnumerable,et=!Qe.call({toString:null},"toString"),tt=Qe.call(function(){},"prototype"),rt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],nt=function(e){var t=e.constructor;return t&&t.prototype===e},ot={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},it=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!ot["$"+e]&&Ke.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{nt(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),at=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===Ze.call(e),n=Je(e),o=t&&"[object String]"===Ze.call(e),i=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var a=tt&&r;if(o&&e.length>0&&!Ke.call(e,0))for(var s=0;s<e.length;++s)i.push(String(s));if(n&&e.length>0)for(var c=0;c<e.length;++c)i.push(String(c));else for(var u in e)a&&"prototype"===u||!Ke.call(e,u)||i.push(String(u));if(et)for(var f=function(e){if("undefined"==typeof window||!it)return nt(e);try{return nt(e)}catch(e){return!1}}(e),l=0;l<rt.length;++l)f&&"constructor"===rt[l]||!Ke.call(e,rt[l])||i.push(rt[l]);return i};at.shim=function(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var e=Object.keys;Object.keys=function(t){return Je(t)?e(Ye.call(t)):e(t)}}}else Object.keys=at;return Object.keys||at};var st=at,ct="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),ut=Object.prototype.toString,ft=Array.prototype.concat,lt=Object.defineProperty,pt=lt&&function(){var e={};try{for(var t in lt(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),dt=function(e,t,r,n){var o;t in e&&("function"!=typeof(o=n)||"[object Function]"!==ut.call(o)||!n())||(pt?lt(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},yt=function(e,t){var r=arguments.length>2?arguments[2]:{},n=st(t);ct&&(n=ft.call(n,Object.getOwnPropertySymbols(t)));for(var o=0;o<n.length;o+=1)dt(e,n[o],t[n[o]],r[n[o]])};yt.supportsDescriptors=!!pt;var ht=yt,mt=function(){if("function"!=typeof Promise)throw new TypeError("`Promise.any` requires a global `Promise` be available.")},gt=ze(Xe("String.prototype.indexOf")),vt=function(e,t){var r=Xe(e,!!t);return"function"==typeof r&&gt(e,".prototype.")>-1?ze(r):r},bt=function(e){return"number"==typeof e&&e>=55296&&e<=56319},wt=function(e){return"number"==typeof e&&e>=56320&&e<=57343},Et=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}(e)},St=Xe("%TypeError%"),jt=Xe("%String.fromCharCode%"),Ot=function(e,t){if(!bt(e)||!wt(t))throw new St("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return jt(e)+jt(t)},xt=Xe("%TypeError%"),_t=vt("String.prototype.charAt"),Tt=vt("String.prototype.charCodeAt"),Pt=Xe("%Math.abs%"),At=Math.floor,kt=Number.isNaN||function(e){return e!=e},It=Number.isNaN||function(e){return e!=e},Ct=Number.isFinite||function(e){return"number"==typeof e&&!It(e)&&e!==1/0&&e!==-1/0},Nt=function(e){if("number"!=typeof e||kt(e)||!Ct(e))return!1;var t=Pt(e);return function(e){return At(e)}(t)===t},Mt=Xe("%Math%"),Rt=Xe("%Number%").MAX_SAFE_INTEGER||Mt.pow(2,53)-1,Ut=Xe("%TypeError%"),Dt=function(e,t,r){if("String"!==Et(e))throw new Ut("Assertion failed: `S` must be a String");if(!Nt(t)||t<0||t>Rt)throw new Ut("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==Et(r))throw new Ut("Assertion failed: `unicode` must be a Boolean");return r?t+1>=e.length?t+1:t+function(e,t){if("String"!==Et(e))throw new xt("Assertion failed: `string` must be a String");var r=e.length;if(t<0||t>=r)throw new xt("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=Tt(e,t),o=_t(e,t),i=bt(n),a=wt(n);if(!i&&!a)return{"[[CodePoint]]":o,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(a||t+1===r)return{"[[CodePoint]]":o,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var s=Tt(e,t+1);return wt(s)?{"[[CodePoint]]":Ot(n,s),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":o,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}(e,t)["[[CodeUnitCount]]"]:t+1},Lt=Xe("%Object.defineProperty%",!0);if(Lt)try{Lt({},"a",{value:1})}catch(e){Lt=null}var qt=vt("Object.prototype.propertyIsEnumerable"),Bt=Xe("%TypeError%"),Ft=Xe("%SyntaxError%"),Gt={"Property Descriptor":function(e,t){if("Object"!==e(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(xe(t,n)&&!r[n])return!1;var o=xe(t,"[[Value]]"),i=xe(t,"[[Get]]")||xe(t,"[[Set]]");if(o&&i)throw new Bt("Property Descriptors may not be both accessor and data descriptors");return!0}},Wt=function(e,t,r,n){var o=Gt[t];if("function"!=typeof o)throw new Ft("unknown record type: "+t);if(!o(e,n))throw new Bt(r+" must be a "+t)},Vt=function(e){if(void 0===e)return e;Wt(Et,"Property Descriptor","Desc",e);var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=e["[[Configurable]]"]),t},Ht=Xe("%Object.getOwnPropertyDescriptor%");if(Ht)try{Ht([],"length")}catch(e){Ht=null}var Xt,zt,$t,Jt,Kt=Ht,Zt=Xe("%Array%"),Yt=!Zt.isArray&&vt("Object.prototype.toString"),Qt=Zt.isArray||function(e){return"[object Array]"===Yt(e)},er=function(e){return"string"==typeof e||"symbol"==typeof e},tr=function(){return Se()&&!!Symbol.toStringTag},rr=tr();if(rr){Xt=vt("Object.prototype.hasOwnProperty"),zt=vt("RegExp.prototype.exec"),$t={};var nr=function(){throw $t};Jt={toString:nr,valueOf:nr},"symbol"==typeof Symbol.toPrimitive&&(Jt[Symbol.toPrimitive]=nr)}var or,ir,ar=vt("Object.prototype.toString"),sr=Object.getOwnPropertyDescriptor,cr=rr?function(e){if(!e||"object"!=typeof e)return!1;var t=sr(e,"lastIndex");if(!(t&&Xt(t,"value")))return!1;try{zt(e,Jt)}catch(e){return e===$t}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===ar(e)},ur=function(e){return!!e},fr=Xe("%Symbol.match%",!0),lr=Function.prototype.toString,pr="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof pr&&"function"==typeof Object.defineProperty)try{or=Object.defineProperty({},"length",{get:function(){throw ir}}),ir={},pr(function(){throw 42},null,or)}catch(e){e!==ir&&(pr=null)}else pr=null;var dr=/^\s*class\b/,yr=function(e){try{var t=lr.call(e);return dr.test(t)}catch(e){return!1}},hr=Object.prototype.toString,mr="function"==typeof Symbol&&!!Symbol.toStringTag,gr="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{},vr=pr?function(e){if(e===gr)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{pr(e,null,or)}catch(e){if(e!==ir)return!1}return!yr(e)}:function(e){if(e===gr)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(mr)return function(e){try{return!yr(e)&&(lr.call(e),!0)}catch(e){return!1}}(e);if(yr(e))return!1;var t=hr.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},br=Xe("%TypeError%"),wr=Xe("%TypeError%"),Er=vt("Object.prototype.propertyIsEnumerable"),Sr=function(e,t){if("Object"!==Et(e))throw new wr("Assertion failed: O must be an Object");if(!er(t))throw new wr("Assertion failed: P must be a Property Key");if(xe(e,t)){if(!Kt){var r=Qt(e)&&"length"===t,n=function(e){if(!e||"object"!=typeof e)return!1;if(fr){var t=e[fr];if(void 0!==t)return ur(t)}return cr(e)}(e)&&"lastIndex"===t;return{"[[Configurable]]":!(r||n),"[[Enumerable]]":Er(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return function(e){if("Object"!==Et(e))throw new br("ToPropertyDescriptor requires an object");var t={};if(xe(e,"enumerable")&&(t["[[Enumerable]]"]=ur(e.enumerable)),xe(e,"configurable")&&(t["[[Configurable]]"]=ur(e.configurable)),xe(e,"value")&&(t["[[Value]]"]=e.value),xe(e,"writable")&&(t["[[Writable]]"]=ur(e.writable)),xe(e,"get")){var r=e.get;if(void 0!==r&&!vr(r))throw new br("getter must be a function");t["[[Get]]"]=r}if(xe(e,"set")){var n=e.set;if(void 0!==n&&!vr(n))throw new br("setter must be a function");t["[[Set]]"]=n}if((xe(t,"[[Get]]")||xe(t,"[[Set]]"))&&(xe(t,"[[Value]]")||xe(t,"[[Writable]]")))throw new br("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}(Kt(e,t))}},jr=function(e){return void 0!==e&&(Wt(Et,"Property Descriptor","Desc",e),!(!xe(e,"[[Value]]")&&!xe(e,"[[Writable]]")))},Or=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},xr=Xe("%Object%"),_r=xr.preventExtensions,Tr=xr.isExtensible,Pr=_r?function(e){return!Or(e)&&Tr(e)}:function(e){return!Or(e)},Ar=function(e,t){return e===t?0!==e||1/e==1/t:kt(e)&&kt(t)},kr=Xe("%TypeError%"),Ir=function(e,t,r){if("Object"!==Et(e))throw new kr("Assertion failed: Type(O) is not Object");if(!er(t))throw new kr("Assertion failed: IsPropertyKey(P) is not true");var n=Sr(e,t),o=!n||Pr(e);return!(n&&(!n["[[Writable]]"]||!n["[[Configurable]]"])||!o)&&function(e,t,r,n,o,i){if(!Lt){if(!e(i))return!1;if(!i["[[Configurable]]"]||!i["[[Writable]]"])return!1;if(o in n&&qt(n,o)!==!!i["[[Enumerable]]"])return!1;var a=i["[[Value]]"];return n[o]=a,t(n[o],a)}return Lt(n,o,r(i)),!0}(jr,Ar,Vt,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":r,"[[Writable]]":!0})},Cr=Xe("%TypeError%"),Nr=function(e,t,r){if("Object"!==Et(e))throw new Cr("Assertion failed: Type(O) is not Object");if(!er(t))throw new Cr("Assertion failed: IsPropertyKey(P) is not true");var n=Ir(e,t,r);if(!n)throw new Cr("unable to create data property");return n},Mr=Xe("%TypeError%"),Rr=function(e,t){if(null==e)throw new Mr(t||"Cannot call method on "+e);return e},Ur=Xe("%Object%"),Dr=Xe("%TypeError%"),Lr=function(e,t){if(!er(t))throw new Dr("Assertion failed: IsPropertyKey(P) is not true");var r;return(Rr(r=e),Ur(r))[t]},qr=Xe("%TypeError%"),Br=function(e,t){if(!er(t))throw new qr("Assertion failed: IsPropertyKey(P) is not true");var r=Lr(e,t);if(null!=r){if(!vr(r))throw new qr(t+"is not a function");return r}},Fr=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8},Gr=ie(function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),Wr=ie(function(e,t){var r=/%[sdj%]/g;t.format=function(e){if(!h(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var o=arguments,a=o.length,s=String(e).replace(r,function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(e){return"[Circular]"}default:return e}}),c=o[n];n<a;c=o[++n])d(c)||!v(c)?s+=" "+c:s+=" "+i(c);return s},t.deprecate=function(e,r){if(m(oe.process))return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){return n||(console.error(r),n=!0),e.apply(this,arguments)}};var n,o={};function i(e,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),c(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return h(o)||(o=c(e,o,n)),o}var i=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(h(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(d(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(r);if(0===a.length){if(E(r)){var v=r.name?": "+r.name:"";return e.stylize("[Function"+v+"]","special")}if(g(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(b(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return u(r)}var S,j="",O=!1,_=["{","}"];(l(r)&&(O=!0,_=["[","]"]),E(r))&&(j=" [Function"+(r.name?": "+r.name:"")+"]");return g(r)&&(j=" "+RegExp.prototype.toString.call(r)),b(r)&&(j=" "+Date.prototype.toUTCString.call(r)),w(r)&&(j=" "+u(r)),0!==a.length||O&&0!=r.length?n<0?g(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),S=O?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)x(t,String(a))?i.push(f(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(f(e,t,r,n,o,!0))}),i}(e,r,n,s,a):a.map(function(t){return f(e,r,n,s,t,O)}),e.seen.pop(),function(e,t,r){if(e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(S,j,_)):_[0]+j+_[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),x(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=d(r)?c(e,u.value,null):c(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n")):s=e.stylize("[Circular]","special")),m(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function l(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function d(e){return null===e}function y(e){return"number"==typeof e}function h(e){return"string"==typeof e}function m(e){return void 0===e}function g(e){return v(e)&&"[object RegExp]"===S(e)}function v(e){return"object"==typeof e&&null!==e}function b(e){return v(e)&&"[object Date]"===S(e)}function w(e){return v(e)&&("[object Error]"===S(e)||e instanceof Error)}function E(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function j(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(m(n)&&(n=""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(n)){var r=U.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=l,t.isBoolean=p,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=h,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=g,t.isObject=v,t.isDate=b,t.isError=w,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=Fr;var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[j(e.getHours()),j(e.getMinutes()),j(e.getSeconds())].join(":"),[e.getDate(),O[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=Gr,t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}),Vr=(Wr.format,Wr.deprecate,Wr.debuglog,Wr.inspect,Wr.isArray,Wr.isBoolean,Wr.isNull,Wr.isNullOrUndefined,Wr.isNumber,Wr.isString,Wr.isSymbol,Wr.isUndefined,Wr.isRegExp,Wr.isObject,Wr.isDate,Wr.isError,Wr.isFunction,Wr.isPrimitive,Wr.isBuffer,Wr.log,Wr.inherits,Wr._extend,Wr.inspect),Hr="function"==typeof Map&&Map.prototype,Xr=Object.getOwnPropertyDescriptor&&Hr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,zr=Hr&&Xr&&"function"==typeof Xr.get?Xr.get:null,$r=Hr&&Map.prototype.forEach,Jr="function"==typeof Set&&Set.prototype,Kr=Object.getOwnPropertyDescriptor&&Jr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Zr=Jr&&Kr&&"function"==typeof Kr.get?Kr.get:null,Yr=Jr&&Set.prototype.forEach,Qr="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,en="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,tn="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,rn=Boolean.prototype.valueOf,nn=Object.prototype.toString,on=Function.prototype.toString,an=String.prototype.match,sn="function"==typeof BigInt?BigInt.prototype.valueOf:null,cn=Object.getOwnPropertySymbols,un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,fn="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ln=Object.prototype.propertyIsEnumerable,pn=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),dn=Vr.custom,yn=dn&&wn(dn)?dn:null,hn="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null,mn=function e(t,r,n,o){var i=r||{};if(Sn(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Sn(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Sn(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Sn(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return e(t.slice(0,r.maxStringLength),r)+o}var i=t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,xn);return gn(i,"single",r)}(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var s=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=s&&s>0&&"object"==typeof t)return bn(t)?"[Array]":"[Object]";var c=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,n);if(void 0===o)o=[];else if(On(o,t)>=0)return"[Circular]";function u(t,r,a){if(r&&(o=o.slice()).push(r),a){var s={depth:i.depth};return Sn(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t){var f=function(e){if(e.name)return e.name;var t=an.call(on.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),l=kn(t,u);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(l.length>0?" { "+l.join(", ")+" }":"")}if(wn(t)){var p=fn?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):un.call(t);return"object"!=typeof t||fn?p:_n(p)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var d="<"+String(t.nodeName).toLowerCase(),y=t.attributes||[],h=0;h<y.length;h++)d+=" "+y[h].name+"="+gn(vn(y[h].value),"double",i);return d+=">",t.childNodes&&t.childNodes.length&&(d+="..."),d+="</"+String(t.nodeName).toLowerCase()+">"}if(bn(t)){if(0===t.length)return"[]";var m=kn(t,u);return c&&!function(e){for(var t=0;t<e.length;t++)if(On(e[t],"\n")>=0)return!1;return!0}(m)?"["+An(m,c)+"]":"[ "+m.join(", ")+" ]"}if(function(e){return!("[object Error]"!==jn(e)||hn&&"object"==typeof e&&hn in e)}(t)){var g=kn(t,u);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&a){if(yn&&"function"==typeof t[yn])return t[yn]();if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!zr||!e||"object"!=typeof e)return!1;try{zr.call(e);try{Zr.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var v=[];return $r.call(t,function(e,r){v.push(u(r,t,!0)+" => "+u(e,t))}),Pn("Map",zr.call(t),v,c)}if(function(e){if(!Zr||!e||"object"!=typeof e)return!1;try{Zr.call(e);try{zr.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var b=[];return Yr.call(t,function(e){b.push(u(e,t))}),Pn("Set",Zr.call(t),b,c)}if(function(e){if(!Qr||!e||"object"!=typeof e)return!1;try{Qr.call(e,Qr);try{en.call(e,en)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Tn("WeakMap");if(function(e){if(!en||!e||"object"!=typeof e)return!1;try{en.call(e,en);try{Qr.call(e,Qr)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Tn("WeakSet");if(function(e){if(!tn||!e||"object"!=typeof e)return!1;try{return tn.call(e),!0}catch(e){}return!1}(t))return Tn("WeakRef");if(function(e){return!("[object Number]"!==jn(e)||hn&&"object"==typeof e&&hn in e)}(t))return _n(u(Number(t)));if(function(e){if(!e||"object"!=typeof e||!sn)return!1;try{return sn.call(e),!0}catch(e){}return!1}(t))return _n(u(sn.call(t)));if(function(e){return!("[object Boolean]"!==jn(e)||hn&&"object"==typeof e&&hn in e)}(t))return _n(rn.call(t));if(function(e){return!("[object String]"!==jn(e)||hn&&"object"==typeof e&&hn in e)}(t))return _n(u(String(t)));if(!function(e){return!("[object Date]"!==jn(e)||hn&&"object"==typeof e&&hn in e)}(t)&&!function(e){return!("[object RegExp]"!==jn(e)||hn&&"object"==typeof e&&hn in e)}(t)){var w=kn(t,u),E=pn?pn(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",j=!E&&hn&&Object(t)===t&&hn in t?jn(t).slice(8,-1):S?"Object":"",O=(E||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(j||S?"["+[].concat(j||[],S||[]).join(": ")+"] ":"");return 0===w.length?O+"{}":c?O+"{"+An(w,c)+"}":O+"{ "+w.join(", ")+" }"}return String(t)};function gn(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function vn(e){return String(e).replace(/"/g,"&quot;")}function bn(e){return!("[object Array]"!==jn(e)||hn&&"object"==typeof e&&hn in e)}function wn(e){if(fn)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!un)return!1;try{return un.call(e),!0}catch(e){}return!1}var En=Object.prototype.hasOwnProperty||function(e){return e in this};function Sn(e,t){return En.call(e,t)}function jn(e){return nn.call(e)}function On(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function xn(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function _n(e){return"Object("+e+")"}function Tn(e){return e+" { ? }"}function Pn(e,t,r,n){return e+" ("+t+") {"+(n?An(r,n):r.join(", "))+"}"}function An(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function kn(e,t){var r=bn(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Sn(e,o)?t(e[o],e):""}var i,a="function"==typeof cn?cn(e):[];if(fn){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)Sn(e,c)&&(r&&String(Number(c))===c&&c<e.length||fn&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof cn)for(var u=0;u<a.length;u++)ln.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}var In=Oe(),Cn=Xe("%Symbol.iterator%",!0),Nn=vt("String.prototype.slice"),Mn=function(e,t){var r;return In?r=e.GetMethod(t,Cn):e.IsArray(t)?r=function(){var e=-1,t=this;return{next:function(){return{done:(e+=1)>=t.length,value:t[e]}}}}:"String"===e.Type(t)&&(r=function(){var r=0;return{next:function(){var n=e.AdvanceStringIndex(t,r,!0),o=Nn(t,r,n);return r=n,{done:n>t.length,value:o}}}}),r},Rn=Xe("%TypeError%"),Un=Xe("%Reflect.apply%",!0)||vt("%Function.prototype.apply%"),Dn=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!Qt(r))throw new Rn("Assertion failed: optional `argumentsList`, if provided, must be a List");return Un(e,t,r)},Ln=Xe("%TypeError%"),qn=Xe("%Symbol.asyncIterator%",!0),Bn=Oe(),Fn=Xe("%TypeError%"),Gn=function(e,t){if("Object"!==Et(e))throw new Fn("Assertion failed: Type(O) is not Object");if(!er(t))throw new Fn("Assertion failed: IsPropertyKey(P) is not true, got "+mn(t));return e[t]},Wn=Xe("%TypeError%"),Vn=Xe("%TypeError%"),Hn=Xe("%TypeError%"),Xn=function(e,t){var r=function(e,t){if(!er(t))throw new Vn("Assertion failed: P must be a Property Key");var r=arguments.length>2?arguments[2]:[];if(!Qt(r))throw new Vn("Assertion failed: optional `argumentsList`, if provided, must be a List");var n=Lr(e,t);return Dn(n,e,r)}(e,"next",arguments.length<2?[]:[t]);if("Object"!==Et(r))throw new Hn("iterator next must return an object");return r},zn=function(e){var t=Xn(e);return!0!==function(e){if("Object"!==Et(e))throw new Wn("Assertion failed: Type(iterResult) is not Object");return ur(Gn(e,"done"))}(t)&&t},$n=Xe("%TypeError%"),Jn=function(e){if("Object"!==Et(e))throw new $n("Assertion failed: Type(iterResult) is not Object");return Gn(e,"value")},Kn=vt("Array.prototype.push"),Zn=function(e,t){for(var r=function(e,t,r){var n=t;if(arguments.length<2&&(n="sync"),"sync"!==n&&"async"!==n)throw new Ln("Assertion failed: `hint` must be one of 'sync' or 'async', got "+mn(t));var o=r;if(arguments.length<3)if("async"===n){if(Bn&&qn&&(o=Br(e,qn)),void 0===o)throw new Ln("async from sync iterators aren't currently supported")}else o=Mn({AdvanceStringIndex:Dt,GetMethod:Br,IsArray:Qt,Type:Et},e);var i=Dn(o,e);if("Object"!==Et(i))throw new Ln("iterator must return an object");return i}(e,"sync",t),n=[],o=!0;o;)if(o=zn(r)){var i=Jn(o);Kn(n,i)}return n},Yn=Xe("%Object.setPrototypeOf%",!0),Qn=Xe("%Array.prototype%"),eo=Yn||([].__proto__!==Qn?null:function(e,t){return e.__proto__=t,e}),to=Xe("%Object.getPrototypeOf%",!0),ro=Xe("%Array.prototype%"),no=to||([].__proto__===ro?function(e){return e.__proto__}:null),oo=Xe("%TypeError%"),io=Xe("%TypeError%"),ao=function(e,t){if("Object"!==Et(t)&&"Null"!==Et(t))throw new io("Assertion failed: V must be Object or Null");try{eo(e,t)}catch(e){return!1}return function(e){if("Object"!==Et(e))throw new oo("Assertion failed: O must be an Object");if(!no)throw new oo("This environment does not support fetching prototypes.");return no(e)}(e)===t},so=Xe("%Error%");function co(e,t){var r=new so(t);ao(r,uo),delete r.constructor;var n=Zn(e,Mn({AdvanceStringIndex:Dt,GetMethod:Br,IsArray:Qt,Type:Et},e));return Nr(r,"errors",n),r}var uo=co.prototype;ht(co.prototype,{constructor:co,message:"",name:"AggregateError"}),ao(co.prototype,Error.prototype);var fo=co,lo=Xe("%Promise.resolve%",!0),po=lo&&ze(lo),yo=tr(),ho=vt("Object.prototype.toString"),mo=function(e){return!(yo&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===ho(e)},go=function(e){return!!mo(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==ho(e)&&"[object Function]"===ho(e.callee)},vo=function(){return mo(arguments)}();mo.isLegacyArguments=go;var bo,wo=vo?mo:go,Eo={}.toString,So=Array.isArray||function(e){return"[object Array]"==Eo.call(e)},jo=String.prototype.valueOf,Oo=Object.prototype.toString,xo=tr(),_o=function(e){return"string"==typeof e||"object"==typeof e&&(xo?function(e){try{return jo.call(e),!0}catch(e){return!1}}(e):"[object String]"===Oo.call(e))},To="function"==typeof Map&&Map.prototype?Map:null,Po="function"==typeof Set&&Set.prototype?Set:null;To||(bo=function(e){return!1});var Ao=To?Map.prototype.has:null,ko=Po?Set.prototype.has:null;bo||Ao||(bo=function(e){return!1});var Io,Co=bo||function(e){if(!e||"object"!=typeof e)return!1;try{if(Ao.call(e),ko)try{ko.call(e)}catch(e){return!0}return e instanceof To}catch(e){}return!1},No="function"==typeof Map&&Map.prototype?Map:null,Mo="function"==typeof Set&&Set.prototype?Set:null;Mo||(Io=function(e){return!1});var Ro=No?Map.prototype.has:null,Uo=Mo?Set.prototype.has:null;Io||Uo||(Io=function(e){return!1});var Do=Io||function(e){if(!e||"object"!=typeof e)return!1;try{if(Uo.call(e),Ro)try{Ro.call(e)}catch(e){return!0}return e instanceof Mo}catch(e){}return!1},Lo=ie(function(e){if(Oe()||Se()){var t=Symbol.iterator;e.exports=function(e){return null!=e&&void 0!==e[t]?e[t]():wo(e)?Array.prototype[t].call(e):void 0}}else{var r=So,n=_o,o=Xe,i=o("%Map%",!0),a=o("%Set%",!0),s=vt,c=s("Array.prototype.push"),u=s("String.prototype.charCodeAt"),f=s("String.prototype.slice"),l=function(e){var t=0;return{next:function(){var r,n=t>=e.length;return n||(r=e[t],t+=1),{done:n,value:r}}}},p=function(e,t){if(r(e)||wo(e))return l(e);if(n(e)){var o=0;return{next:function(){var t=function(e,t){if(t+1>=e.length)return t+1;var r=u(e,t);if(r<55296||r>56319)return t+1;var n=u(e,t+1);return n<56320||n>57343?t+1:t+2}(e,o),r=f(e,o,t);return o=t,{done:t>e.length,value:r}}}}return t&&void 0!==e["_es6-shim iterator_"]?e["_es6-shim iterator_"]():void 0};if(i||a){var d=Co,y=Do,h=s("Map.prototype.forEach",!0),m=s("Set.prototype.forEach",!0);if(void 0===U||!U.versions||!U.versions.node)var g=s("Map.prototype.iterator",!0),v=s("Set.prototype.iterator",!0),b=function(e){var t=!1;return{next:function(){try{return{done:t,value:t?void 0:e.next()}}catch(e){return t=!0,{done:!0,value:void 0}}}}};var w=s("Map.prototype.@@iterator",!0)||s("Map.prototype._es6-shim iterator_",!0),E=s("Set.prototype.@@iterator",!0)||s("Set.prototype._es6-shim iterator_",!0);e.exports=function(e){return function(e){if(d(e)){if(g)return b(g(e));if(w)return w(e);if(h){var t=[];return h(e,function(e,r){c(t,[r,e])}),l(t)}}if(y(e)){if(v)return b(v(e));if(E)return E(e);if(m){var r=[];return m(e,function(e){c(r,e)}),l(r)}}}(e)||p(e)}}else e.exports=function(e){if(null!=e)return p(e,!0)}}}),qo=TypeError,Bo=function(e){if(!e||"function"!=typeof e.next)throw new qo("iterator must be an object with a `next` method");if(arguments.length>1){var t=arguments[1];if("function"!=typeof t)throw new qo("`callback`, if provided, must be a function")}for(var r,n=t||[];(r=e.next())&&!r.done;)t?t(r.value):n.push(r.value);if(!t)return n},Fo=TypeError,Go=Xe("%TypeError%"),Wo=function(e,t){if(null==e)throw new Go(t||"Cannot call method on "+e);return e},Vo=function(e){return"string"==typeof e||"symbol"==typeof e},Ho=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}(e)},Xo=Xe("%TypeError%"),zo=function(e,t){if("Object"!==Ho(e))throw new Xo("Assertion failed: Type(O) is not Object");if(!Vo(t))throw new Xo("Assertion failed: IsPropertyKey(P) is not true, got "+mn(t));return e[t]},$o=Xe("%Array%"),Jo=!$o.isArray&&vt("Object.prototype.toString"),Ko=$o.isArray||function(e){return"[object Array]"===Jo(e)},Zo=Xe,Yo=Xe("%TypeError%"),Qo=function(e,t){if("Object"!==e.Type(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(xe(t,n)&&!r[n])return!1;if(e.IsDataDescriptor(t)&&e.IsAccessorDescriptor(t))throw new Yo("Property Descriptors may not be both accessor and data descriptors");return!0},ei=Xe("%Object.defineProperty%",!0);if(ei)try{ei({},"a",{value:1})}catch(e){ei=null}var ti,ri,ni=vt("Object.prototype.propertyIsEnumerable"),oi=function(e,t,r,n,o,i){if(!ei){if(!e(i))return!1;if(!i["[[Configurable]]"]||!i["[[Writable]]"])return!1;if(o in n&&ni(n,o)!==!!i["[[Enumerable]]"])return!1;var a=i["[[Value]]"];return n[o]=a,t(n[o],a)}return ei(n,o,r(i)),!0},ii=Xe("%TypeError%"),ai=Xe("%SyntaxError%"),si={"Property Descriptor":function(e,t){if("Object"!==e(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(xe(t,n)&&!r[n])return!1;var o=xe(t,"[[Value]]"),i=xe(t,"[[Get]]")||xe(t,"[[Set]]");if(o&&i)throw new ii("Property Descriptors may not be both accessor and data descriptors");return!0}},ci=function(e,t,r,n){var o=si[t];if("function"!=typeof o)throw new ai("unknown record type: "+t);if(!o(e,n))throw new ii(r+" must be a "+t)},ui=function(e){if(void 0===e)return e;ci(Ho,"Property Descriptor","Desc",e);var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=e["[[Configurable]]"]),t},fi=function(e){return void 0!==e&&(ci(Ho,"Property Descriptor","Desc",e),!(!xe(e,"[[Get]]")&&!xe(e,"[[Set]]")))},li=function(e){return void 0!==e&&(ci(Ho,"Property Descriptor","Desc",e),!(!xe(e,"[[Value]]")&&!xe(e,"[[Writable]]")))},pi=Number.isNaN||function(e){return e!=e},di=function(e,t){return e===t?0!==e||1/e==1/t:pi(e)&&pi(t)},yi=function(e){return!!e},hi=Function.prototype.toString,mi="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof mi&&"function"==typeof Object.defineProperty)try{ti=Object.defineProperty({},"length",{get:function(){throw ri}}),ri={},mi(function(){throw 42},null,ti)}catch(e){e!==ri&&(mi=null)}else mi=null;var gi=/^\s*class\b/,vi=function(e){try{var t=hi.call(e);return gi.test(t)}catch(e){return!1}},bi=Object.prototype.toString,wi="function"==typeof Symbol&&!!Symbol.toStringTag,Ei="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{},Si=mi?function(e){if(e===Ei)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{mi(e,null,ti)}catch(e){if(e!==ri)return!1}return!vi(e)}:function(e){if(e===Ei)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(wi)return function(e){try{return!vi(e)&&(hi.call(e),!0)}catch(e){return!1}}(e);if(vi(e))return!1;var t=bi.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},ji=Xe("%TypeError%"),Oi=function(e){if("Object"!==Ho(e))throw new ji("ToPropertyDescriptor requires an object");var t={};if(xe(e,"enumerable")&&(t["[[Enumerable]]"]=yi(e.enumerable)),xe(e,"configurable")&&(t["[[Configurable]]"]=yi(e.configurable)),xe(e,"value")&&(t["[[Value]]"]=e.value),xe(e,"writable")&&(t["[[Writable]]"]=yi(e.writable)),xe(e,"get")){var r=e.get;if(void 0!==r&&!Si(r))throw new ji("getter must be a function");t["[[Get]]"]=r}if(xe(e,"set")){var n=e.set;if(void 0!==n&&!Si(n))throw new ji("setter must be a function");t["[[Set]]"]=n}if((xe(t,"[[Get]]")||xe(t,"[[Set]]"))&&(xe(t,"[[Value]]")||xe(t,"[[Writable]]")))throw new ji("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t},xi=Xe("%TypeError%"),_i=function(e,t,r){if("Object"!==Ho(e))throw new xi("Assertion failed: Type(O) is not Object");if(!Vo(t))throw new xi("Assertion failed: IsPropertyKey(P) is not true");var n=Qo({Type:Ho,IsDataDescriptor:li,IsAccessorDescriptor:fi},r)?r:Oi(r);if(!Qo({Type:Ho,IsDataDescriptor:li,IsAccessorDescriptor:fi},n))throw new xi("Assertion failed: Desc is not a valid Property Descriptor");return oi(li,di,ui,e,t,n)},Ti=ie(function(e){var t=Zo("%Reflect.construct%",!0),r=_i;try{r({},"",{"[[Get]]":function(){}})}catch(e){r=null}if(r&&t){var n={},o={};r(o,"length",{"[[Get]]":function(){throw n},"[[Enumerable]]":!0}),e.exports=function(e){try{t(e,o)}catch(e){return e===n}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}}),Pi=Xe("%Math.abs%"),Ai=Math.floor,ki=Number.isNaN||function(e){return e!=e},Ii=Number.isFinite||function(e){return"number"==typeof e&&!ki(e)&&e!==1/0&&e!==-1/0},Ci=function(e){if("number"!=typeof e||pi(e)||!Ii(e))return!1;var t=Pi(e);return function(e){return Ai(e)}(t)===t},Ni=Xe("%Array%"),Mi=Xe("%Symbol.species%",!0),Ri=Xe("%TypeError%"),Ui=Xe("%TypeError%"),Di=Xe("%Reflect.apply%",!0)||vt("%Function.prototype.apply%"),Li=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!Ko(r))throw new Ui("Assertion failed: optional `argumentsList`, if provided, must be a List");return Di(e,t,r)},qi=Xe("%Object.getOwnPropertyDescriptor%");if(qi)try{qi([],"length")}catch(e){qi=null}var Bi,Fi,Gi,Wi,Vi=qi,Hi=tr();if(Hi){Bi=vt("Object.prototype.hasOwnProperty"),Fi=vt("RegExp.prototype.exec"),Gi={};var Xi=function(){throw Gi};Wi={toString:Xi,valueOf:Xi},"symbol"==typeof Symbol.toPrimitive&&(Wi[Symbol.toPrimitive]=Xi)}var zi=vt("Object.prototype.toString"),$i=Object.getOwnPropertyDescriptor,Ji=Hi?function(e){if(!e||"object"!=typeof e)return!1;var t=$i(e,"lastIndex");if(!(t&&Bi(t,"value")))return!1;try{Fi(e,Wi)}catch(e){return e===Gi}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===zi(e)},Ki=Xe("%Symbol.match%",!0),Zi=Xe("%TypeError%"),Yi=vt("Object.prototype.propertyIsEnumerable"),Qi=function(e,t){if("Object"!==Ho(e))throw new Zi("Assertion failed: O must be an Object");if(!Vo(t))throw new Zi("Assertion failed: P must be a Property Key");if(xe(e,t)){if(!Vi){var r=Ko(e)&&"length"===t,n=function(e){if(!e||"object"!=typeof e)return!1;if(Ki){var t=e[Ki];if(void 0!==t)return yi(t)}return Ji(e)}(e)&&"lastIndex"===t;return{"[[Configurable]]":!(r||n),"[[Enumerable]]":Yi(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return Oi(Vi(e,t))}},ea=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},ta=Xe("%Object%"),ra=ta.preventExtensions,na=ta.isExtensible,oa=ra?function(e){return!ea(e)&&na(e)}:function(e){return!ea(e)},ia=Xe("%TypeError%"),aa=Xe("%TypeError%"),sa=function(e,t,r){if("Object"!==Ho(e))throw new aa("Assertion failed: Type(O) is not Object");if(!Vo(t))throw new aa("Assertion failed: IsPropertyKey(P) is not true");var n=function(e,t,r){if("Object"!==Ho(e))throw new ia("Assertion failed: Type(O) is not Object");if(!Vo(t))throw new ia("Assertion failed: IsPropertyKey(P) is not true");var n=Qi(e,t),o=!n||oa(e);return!(n&&(!n["[[Writable]]"]||!n["[[Configurable]]"])||!o)&&oi(li,di,ui,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":r,"[[Writable]]":!0})}(e,t,r);if(!n)throw new aa("unable to create data property");return n},ca=Xe("%TypeError%"),ua=function(e,t){if("Object"!==Ho(e))throw new ca("Assertion failed: `O` must be an Object");if(!Vo(t))throw new ca("Assertion failed: `P` must be a Property Key");return t in e},fa=Xe("RegExp.prototype.test"),la=function(e){return ze(fa,e)},pa=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},da=Function.prototype.toString,ya=/^\s*class\b/,ha=function(e){try{var t=da.call(e);return ya.test(t)}catch(e){return!1}},ma=Object.prototype.toString,ga="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,va=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(ga)return function(e){try{return!ha(e)&&(da.call(e),!0)}catch(e){return!1}}(e);if(ha(e))return!1;var t=ma.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},ba=Date.prototype.getDay,wa=Object.prototype.toString,Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Sa=function(e){return"object"==typeof e&&null!==e&&(Ea?function(e){try{return ba.call(e),!0}catch(e){return!1}}(e):"[object Date]"===wa.call(e))},ja=oe.Symbol,Oa=function(){return"function"==typeof ja&&("function"==typeof Symbol&&("symbol"==typeof ja("foo")&&("symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}())))},xa=ie(function(e){var t=Object.prototype.toString;if(Oa()){var r=Symbol.prototype.toString,n=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==t.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&n.test(r.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}}),_a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,Ta=function(e){if(pa(e))return e;var t,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),_a&&(Symbol.toPrimitive?t=function(e,t){var r=e[t];if(null!=r){if(!va(r))throw new TypeError(r+" returned for property "+t+" of object "+e+" is not a function");return r}}(e,Symbol.toPrimitive):xa(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var n=t.call(e,r);if(pa(n))return n;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(Sa(e)||xa(e))&&(r="string"),function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var r,n,o,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(o=0;o<i.length;++o)if(r=e[i[o]],va(r)&&(n=r.call(e),pa(n)))return n;throw new TypeError("No default value")}(e,"default"===r?"number":r)},Pa=Xe("%TypeError%"),Aa=Xe("%Number%"),ka=Xe("%RegExp%"),Ia=Xe("%parseInt%"),Ca=vt("String.prototype.slice"),Na=la(/^0b[01]+$/i),Ma=la(/^0o[0-7]+$/i),Ra=la(/^[-+]0x[0-9a-f]+$/i),Ua=la(new ka("["+["","​","￾"].join("")+"]","g")),Da=["\t\n\v\f\r   ᠎    ","         　\u2028","\u2029\ufeff"].join(""),La=new RegExp("(^["+Da+"]+)|(["+Da+"]+$)","g"),qa=vt("String.prototype.replace"),Ba=function e(t){var r=ea(t)?t:function(e){return arguments.length>1?Ta(e,arguments[1]):Ta(e)}(t,Aa);if("symbol"==typeof r)throw new Pa("Cannot convert a Symbol value to a number");if("bigint"==typeof r)throw new Pa("Conversion from 'BigInt' to 'number' is not allowed.");if("string"==typeof r){if(Na(r))return e(Ia(Ca(r,2),2));if(Ma(r))return e(Ia(Ca(r,2),8));if(Ua(r)||Ra(r))return NaN;var n=function(e){return qa(e,La,"")}(r);if(n!==r)return e(n)}return Aa(r)},Fa=Xe("%Object%"),Ga=Xe("%String%"),Wa=Xe("%TypeError%"),Va=function(e){if("symbol"==typeof e)throw new Wa("Cannot convert a Symbol value to a string");return Ga(e)},Ha=Object("a"),Xa="a"!==Ha[0]||!(0 in Ha),za=vt("String.prototype.split"),$a=function(e){var t,r,n,o=(Wo(t=this),Fa(t)),i=Xa&&_o(o)?za(o,""):o,a=(r=i.length,Ba(r)>>>0);if(!Si(e))throw new TypeError("Array.prototype.map callback must be a function");arguments.length>1&&(n=arguments[1]);for(var s=function(e,t){if(!Ci(t)||t<0)throw new Ri("Assertion failed: length must be an integer >= 0");var r,n=0===t?0:t;if(Ko(e)&&(r=zo(e,"constructor"),Mi&&"Object"===Ho(r)&&null===(r=zo(r,Mi))&&(r=void 0)),void 0===r)return Ni(n);if(!Ti(r))throw new Ri("C must be a constructor");return new r(n)}(o,a),c=0;c<a;){var u=Va(c);if(ua(o,u)){var f=zo(o,u),l=Li(e,n,[f,c,o]);sa(s,u,l)}c+=1}return s},Ja=function(){var e=Array.prototype.map;return function(e){var t=!0,r=!0,n=!1;if("function"==typeof e){try{e.call("f",function(e,r,n){"object"!=typeof n&&(t=!1)}),e.call([null],function(){r="string"==typeof this},"x")}catch(e){n=!0}return!n&&t&&r}return!1}(e)?e:$a},Ka=Ja(),Za=vt("Array.prototype.slice"),Ya=function(e,t){return Wo(e),Ka.apply(e,Za(arguments,1))};ht(Ya,{getPolyfill:Ja,implementation:$a,shim:function(){var e=Ja();return ht(Array.prototype,{map:e},{map:function(){return Array.prototype.map!==e}}),e}});var Qa=Ya;mt();var es="function"==typeof AggregateError?AggregateError:fo,ts=ze(Xe("%Promise.all%")),rs=ze(Xe("%Promise.reject%")),ns=function(e){return e},os=function(e){var t,r=this;if("Object"!==("symbol"==typeof(t=r)?"Symbol":"bigint"==typeof t?"BigInt":function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}(t)))throw new TypeError("`this` value must be an object");var n=function(e){return rs(r,e)};return ts(r,Qa(function(e){var t=Lo(e);if(!t)throw new Fo("non-iterable value provided");return arguments.length>1?Bo(t,arguments[1]):Bo(t)}(e),function(e){var t=function(e,t){if(!po)throw new SyntaxError("This environment does not support Promises.");return po(e,t)}(r,e);try{return t.then(n,ns)}catch(e){return e}})).then(function(e){throw new es(e,"Every promise rejected")},ns)},is=function(){return mt(),"function"==typeof Promise.any?Promise.any:os};mt();var as=ze(is()),ss=function(e){return as(void 0===this?Promise:this,e)};ht(ss,{getPolyfill:is,implementation:os,shim:function(){mt();var e=is();return ht(Promise,{any:e},{any:function(){return Promise.any!==e}}),e}});var cs,us,fs,ls,ps=ss,ds=function(e){function t(r){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var i=e.apply(this,n)||this;return i.code=r,i.name=i.constructor.name,i.message=r,Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return r(t,e),t}(Error),ys=function(e){function t(r){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var i=e.apply(this,n)||this;return i.message=r,i.name=i.constructor.name,i.message=r,Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return r(t,e),t}(Error),hs=function(e,t,r,n,o,i,a,s){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,o,i,a,s],f=0;(c=new Error(t.replace(/%s/g,function(){return u[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},ms=["ar","bg","cs","de","en","es","fr","he","hu","it","ja","ko","pl","pt","ro","ru","th","tr","vi","zh"],gs=[navigator.language].concat(navigator.languages),vs=function(e){return r=[t=e].concat(gs).find(function(e){return!!e&&ms.includes(e.substring(0,2))})||"en-XX",hs(!t||r===t,'Locale "%s" cannot be applied, language code should be one of %s',t,ms),r;var t,r};(cs=e.ConfirmationType||(e.ConfirmationType={})).CODE="code",cs.LINK="link",(us=e.PostMessageEvents||(e.PostMessageEvents={})).ThemeUpdate="@xsolla-login/sdk:theme-update",us.Close="@xsolla-login/sdk:close",us.Open="@xsolla-login/sdk:open",us.PageOpen="@xsolla-login/sdk:page:open",us.IframeOpen="@xsolla-login/sdk:iframe:open",us.GetRedirectCode="@xsolla-login/sdk:get-redirect-url",us.WidgetStep="@xsolla-login/sdk:widget:step",us.GoogleOneTapOpen="@xsolla-login/sdk:google-one-tap:open",us.GoogleOneTapSuccess="@xsolla-login/sdk:google-one-tap:success",(fs=e.WidgetPages||(e.WidgetPages={})).SignUpPage="signUp",fs.LogInPage="logIn",fs.LogInPresetPage="logInUserPreset",fs.ResetPasswordPage="passwordReset",fs.SetPasswordPage="passwordSet",fs.AskPage="ask",fs.ErrorPage="error",fs.SocialsPage="socials",fs.AgreementPage="agreement",fs.TwoFactorPage="otp",(ls=e.CloseSource||(e.CloseSource={}))[ls.Button=0]="Button";var bs=function(t){var r=t.message,o=t.targetOrigin,i=t.target,a=t.globalObject,s=void 0===a?window:a,c=s.parent;if(!c||c===s){if(void 0!==i)switch(r.type){case e.PostMessageEvents.PageOpen:case e.PostMessageEvents.ThemeUpdate:case e.PostMessageEvents.GoogleOneTapSuccess:case e.PostMessageEvents.IframeOpen:i.postMessage(n({},r),o)}}else switch(r.type.replace("@xsolla/login-sdk","@xsolla-login/sdk")){case e.PostMessageEvents.Close:case e.PostMessageEvents.Open:case e.PostMessageEvents.WidgetStep:case e.PostMessageEvents.PageOpen:case e.PostMessageEvents.GetRedirectCode:case e.PostMessageEvents.GoogleOneTapOpen:c.postMessage(n({},r),o);break;case e.PostMessageEvents.ThemeUpdate:case e.PostMessageEvents.IframeOpen:case e.PostMessageEvents.GoogleOneTapSuccess:void 0!==i&&i.postMessage(n({},r),o)}},ws=window.addEventListener?"addEventListener":"attachEvent",Es=window[ws],Ss="addEventListener"!==ws?"on":"";var js;ie(function(e){var t;t=function(e){var t={counterId:0,clientId:0,siteDomains:null,server:"",hitUrl:"",userParamsUrl:"",externalId:null,extraValues:"",hit:!0,extLink:!0,click:!0,scroll:!0,sendLoadMetrics:!1,abParams:"",isBrowser:"undefined"!=typeof window},r=null,n=!1,o=!1,i=!1,a=0,s=0;t.isBrowser&&(s="hidden"===document.visibilityState?0:1/0);var c={isArray:function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},random:function(e,t){return 2>arguments.length&&(t=e,e=0),1>arguments.length&&(t=1073741824),Math.floor(Math.random()*(t-e))+e},mergeObjects:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},apiHelper:function(e,r){2!=e&&(n=!1,o=!1,i=!1);var a=r&&r.eid?r.eid:t.externalId,s=r&&r.exv?JSON.stringify(r.exv):t.extraValues,u=r&&"object"==typeof r.abParams?JSON.stringify(r.abParams):t.abParams,f={et:e,eid:a};return s&&(f.exv=s),u&&(f.abParams=u),"object"!=typeof r&&(r={}),r=c.mergeObjects(r,f)}},u=function(){if(0===s)return null;var e=0;if(window.performance&&window.performance.getEntriesByType){for(var t=window.performance.getEntriesByType("paint"),r=0;r<t.length;r++)if("first-contentful-paint"===t[r].name)return(e=Math.round(t[r].startTime))<s?e:null;return null}if("object"==typeof window.chrome&&window.chrome.loadTimes){var n=window.chrome.loadTimes();if(n.requestTime&&n.firstPaintTime&&window.performance&&window.performance.timing)return(e=Math.round(1e3*n.firstPaintTime-window.performance.timing.navigationStart))<s?e:null}else if(window.performance&&window.performance.timing&&((n=window.performance.timing).navigationStart&&n.msFirstPaint))return(e=n.msFirstPaint-n.navigationStart)<s?e:null;return null},f=function(){try{function e(e){if(e.startTime<s&&(a=Math.round(e.startTime),t.sendLoadMetrics)){var r=document.documentElement.scrollHeight||0;(document.documentElement.clientHeight||0)>=r&&j.eventForLCP()}}var r=new PerformanceObserver(function(t){for(var r=t.getEntries(),n=0;n<r.length;n++)e(r[n])});r.observe({type:"largest-contentful-paint",buffered:!0}),document.addEventListener("visibilitychange",function t(){if("hidden"===document.visibilityState){document.removeEventListener("visibilitychange",t,!0);var n=[];r.takeRecords&&(n=r.takeRecords());for(var o=0;o<n.length;o++)e(n[o]);r.disconnect()}},!0)}catch(e){}},l=function(){var e=(navigator.connection||{type:""}).type;return void 0===e?"":e},p=function(){var e=(window.navigator?navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage:"").toLowerCase();return c.isString(e)?e:""},d=function(){try{return navigator.javaEnabled()}catch(e){return!1}},y=function(){try{var e=Notification.permission}catch(e){}switch(e){case"denied":return 0;case"granted":return 1}},h=function(){try{return window.top!==window.self}catch(e){return!1}},m=function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e},g=function(){return Math.round(+new Date/1e3)},v=function(){return-(new Date).getTimezoneOffset()},b={getVid:function(){var e=w.isFromAd()?0:this.readM("vid");return e||(e=g()+""+c.random()),this.create("vid",e,30),e},getUid:function(){this.globalDomain();var e=this.readM("uid"),t=this.readLocalStorage("uid");return e||t?!e&&t?(e=t,this.create("uid",t,1036800)):e&&!t&&this.createLocalStorage("uid",e):(e=g()+""+c.random(),this.create("uid",e,1036800),this.createLocalStorage("uid",e)),e},getXsollauid:function(e){this.globalDomain();var t=this.readM("xsollauid"),r=this.readLocalStorage("xsollauid");return e?(this.create("xsollauid",e,5184e3),this.createLocalStorage("xsollauid",e),e):(t&&!r?this.createLocalStorage("xsollauid",t):!t&&r&&this.create("xsollauid",r,5184e3),t||r)},createLocalStorage:function(e,t){try{localStorage.setItem(this._prepareName(e),encodeURIComponent(t))}catch(e){}},create:function(e,t,r){var n,o=[this._prepareName(e)+"="+encodeURIComponent(t)];r&&((n=new Date).setTime(n.getTime()+6e4*r),o.push("expires="+n.toGMTString())),this._domain&&o.push("domain="+this._domain),o.push("path=/");try{document.cookie=o.join(";")}catch(e){}},globalDomain:function(){return this._domain=w.extractHostname(window.location.host),this._domain},readM:function(e){return e=this._prepareName(e),this.read(e)},read:function(e){try{var t=document.cookie}catch(e){}return t&&t.match(new RegExp("(?:^|;\\s*)"+e+"=([^;]*)"))?decodeURIComponent(RegExp.$1):null},readLocalStorage:function(e){e=this._prepareName(e);try{return localStorage.getItem(e)}catch(e){return null}},erase:function(e){this.create(e,"",-1)},_prepareName:function(e){return"xsollauid"===e?e:"_mm_"+e+(t.counterId?"_"+t.counterId:"")}},w={getDocumentCharset:function(){return(""+(document.characterSet||document.charset||"")).toLowerCase()},getRootElement:function(){var e=document.documentElement;return"CSS1Compat"===document.compatMode?e:document.body||e},getViewportSize:function(){var e=this.getRootElement();return[e.clientWidth||window.innerWidth,e.clientHeight||window.innerHeight]},getDocumentTitle:function(){var e=document.title;return"string"!=typeof e&&(e=(e=document.getElementsByTagName("title"))&&e.length?e[0].innerHTML:""),e},isFromAd:function(){if(!document.referrer)return!1;var e=["adfox","admitad","adnews","adnous","adriver","advmaker","aport","aport.ru","AvitoPromo","AvitoContext","begun","bing","B2BContext","criteo","directadvert","directadvert.ru","drivenetwork","facebook","fb","facebook.com","fb.com","giraffio","google","adwords","adsense","instagram","kavanga","ladycenter","link","magna","marketgid","medialand","merchant","moimir","nnn","nnn.ru","odnoklassniki","price","price.ru","prre","mytarget","targetmailru","taboola","torg.mail.ru","trorer","rorer","Ttarget","ubn.ua","banner.ua","videonow","vkontakte","vk","vk.com","whisla","youtube"],t=["cpc","ppc","paidsearch","cpv","cpa","cpp","display","cpm","banner"],r=window.location.search.replace("?","").split("&"),n=window.location.hash.replace("#","").split("&").concat(r),o=!1;return n.forEach(function(r){var n=r.split("=");return"utm_source"===n[0]&&n[1]&&e.indexOf(n[1])?o=!0:"utm_medium"===n[0]&&n[1]&&t.indexOf(n[1])?o=!0:void 0}),o},extractHostname:function(e){return void 0===e||""===e?"":(e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0]).split(":")[0].split("?")[0].replace(/^www\./,"").replace("#","")},isExternal:function(e){var r=this.extractHostname(e);return Array.isArray(t.siteDomains)?!(t.siteDomains.indexOf(r)>-1||""===r):!(this.extractHostname(window.location.hostname)===r||""===r)},isInternal:function(e){var r=this.extractHostname(e);return this.extractHostname(window.location.hostname)!==r&&(!Array.isArray(t.siteDomains)||(t.siteDomains.indexOf(r)>-1||""===r))}},E={send:function(e,r){if(e===t.hitUrl&&(r.ident=this.prepareBrowserInfo()),t.xsollauid&&-1===e.indexOf("_xm")){var n="_xm="+t.xsollauid;e=-1===e.indexOf("?")?e+"?"+n:e+"&"+n}var o="string"!=typeof r?JSON.stringify(r):r;t.xsollauid||0!==t.hitCount?t.xsollauid||1!==t.hitCount?this.sendBeacon(e,o)||this.sendXHR(e,o):setTimeout(function(){t.hitCount=2,E.send(e,r)},1e3):(t.hitCount=1,this.sendXHR(e,o))},sendUserParams:function(e){e.clid=t.clientId,e.cid=t.counterId;var r=JSON.stringify(e),n=t.userParamsUrl;this.sendBeacon(n,r)||this.sendXHR(n,r)},sendBeacon:function(e,t){return!("function"!=typeof navigator.sendBeacon||!navigator.onLine)&&(navigator.sendBeacon(e,t),!0)},sendXHR:function(e,r){if(window.XMLHttpRequest){var n=new XMLHttpRequest;try{n.open("POST",e,!0)}catch(e){return!1}return n.timeout=1e4,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.withCredentials=!0,n.ontimeout=function(){E.sendXHR(e,r)},n.onload=function(){var e=E.getValueFromUrl(n.responseURL,"_xm");if(e&&e!==t.xsollauid)t.xsollauid=b.getXsollauid(e);else{var r=E.getValueFromBody(n.responseText,"xsollauid");r&&r!==t.xsollauid&&(t.xsollauid=b.getXsollauid(r))}},n.send(r),!0}return!1},getValueFromUrl:function(e,t){if(e&&e.indexOf(t+"=")>-1){var r=new RegExp("https?://.*"+t+"=([^&]*)"),n=e.match(r);if(n&&n.length>1)return n[1]}return null},getValueFromBody:function(e,t){try{var r=e?JSON.parse(e)[t]:null}catch(e){r=null}return r},setXsollauidFromUrl:function(e){var r=E.getValueFromUrl(e,"_xm");r?(r=r.split("."))&&2===r.length&&r[0]===""+t.counterId&&r[1]!==t.xsollauid&&(t.xsollauid=b.getXsollauid(r[1])):(r=E.getValueFromUrl(e,"_xsollauid"))&&r!==t.xsollauid&&(t.xsollauid=b.getXsollauid(r))},prepareBrowserInfo:function(){var e={},r=window.screen,n=y();""!==n&&(e.ntf=n);var o=l();""!==o&&(e.net=o),e.t=w.getDocumentTitle(),e.pc=w.getDocumentCharset(),e.tz=v();var i=w.getViewportSize();e.wcw=i[0],e.wch=i[1],e.plt=u(),e.lcp=t.sendLoadMetrics?a:0,e.la=p(),e.j=d()?1:0,e.clid=t.clientId,e.cid=t.counterId,e.vid=b.getVid(),e.c=m()?1:0,e.sw=r.width,e.sh=r.height,e.sc=r.colorDepth||r.pixelDepth,h()&&(e.ifr=1);var s=b.read("_ym_uid");s&&(e.yid=s);try{var c=b.read("_ga");c.length>0&&(c=c.split("."),e.gaid=c[2]+"."+c[3])}catch(e){}var f=b.read("paystation_visit");f&&(e.pv=f);var g=b.read("corpsite_visit");g&&(e.cv=g);var E=b.read("pa_visit");E&&(e.pav=E);var S=b.read("dev_visit");S&&(e.dv=S);var j=b.read("first_visit");return j&&(e.fvp=j),e}},S={setHandlers:function(e,t,r,n,o,i){o&&this.documentVisibilityChange(),o&&this.documentReadyEvent(f),e&&this.documentReadyEvent(this.onDocumentReady),t&&this.documentReadyEvent(this.clickEvent),r&&this.documentReadyEvent(this.selectorEvent),n&&this.documentReadyEvent(this.scrollEvent),i&&this.documentReadyEvent(this.externalTransitionEvent)},documentReadyEvent:function(e){(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?e():document.addEventListener("DOMContentLoaded",e)},documentVisibilityChange:function(){document.addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(s=Math.min(s,Math.round(t.timeStamp)),document.removeEventListener("visibilitychange",e))})},clickEvent:function(){for(var e=document.getElementsByTagName("a"),t=0;t<e.length;t++)S.setEvents(e[t],"click",S.onClick)},setEvents:function(e,t,r){e.addEventListener?e.addEventListener(t,r):e.attachEvent&&e.attachEvent("on"+t,r)},onDocumentReady:function(){var e=window.location.href,r={et:1,url:e,eid:t.externalId,exv:t.extraValues,abParams:t.abParams};r.eid&&2340===r.eid||(document.referrer&&(r.referer=document.referrer,w.isExternal(r.referer)||(r.ss=1),E.setXsollauidFromUrl(e)),E.send(t.hitUrl,r))},onClick:function(){w.isExternal(this.href)&&E.send(t.hitUrl,{et:2,referer:window.location.href,url:this.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})},selectorEvent:function(){for(var e=document.querySelectorAll("[data-analytics]"),t=0;t<e.length;t++)S.setEvents(e[t],"click",S.onSelectorClick)},onSelectorClick:function(){E.send(t.hitUrl,{et:3,en:this.dataset.analytics,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})},scrollEvent:function(){S.setEvents(window,"scroll",S.onScroll)},onScroll:function(){null!==r&&clearTimeout(r),r=setTimeout(function(){var e=document.documentElement.scrollTop||document.body.scrollTop,r=document.documentElement.scrollHeight||document.body.scrollHeight;!n&&e>0&&(n=!0,E.send(t.hitUrl,{et:10,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})),!o&&2*e>r-document.documentElement.clientHeight&&(o=!0,E.send(t.hitUrl,{et:11,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})),!i&&e>=.9*(r-document.documentElement.clientHeight)&&(i=!0,E.send(t.hitUrl,{et:12,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams}))},150)},onFormSubmit:function(){},externalTransitionEvent:function(){S.setEvents(document,"mousedown",S.onExternalTransition),S.setEvents(document,"keyup",S.onExternalTransition)},onExternalTransition:function(e){e:{var r=(e=e||window.event).target||e.srcElement;for(e=100;r&&0<e;){if(r.href&&r.nodeName.match(/^a(?:rea)?$/i)){var n=r;break e}r=r.parentNode,e--}n={}}if(("http:"===n.protocol||"https:"===n.protocol)&&n.href&&w.isInternal(n.href)&&!(n.href.indexOf("_xm=")>-1)&&t.xsollauid&&t.counterId){var o="_xm="+t.counterId+"."+t.xsollauid;n.href=-1!==n.href.indexOf("?")?n.href+"&"+o:n.href+"?"+o}}},j={hit:function(e,r){if(t.isBrowser){var n=c.apiHelper(1,r),o=window.location!=window.parent.location?document.referrer:document.location.href,i=n&&n.referer?n.referer:o;n.referer=i,n.referer!=document.location.href&&E.setXsollauidFromUrl(e),n.url=e,E.send(t.hitUrl,n)}},externalLink:function(e,r){if(t.isBrowser){var n=c.apiHelper(2,r);n.referer=window.location.href,n.url=e,E.send(t.hitUrl,n)}},elementClick:function(e,r){if(t.isBrowser){var n=c.apiHelper(3,r);n.url=window.location.href,n.en=e,E.send(t.hitUrl,n)}},formData:function(e,r,n){if(t.isBrowser){var o=c.apiHelper(4,n);o.url=window.location.href;var i=r?JSON.stringify(r):"";o.form=i,o.en=e,E.send(t.hitUrl,o)}},customEvent:function(e,r){if(t.isBrowser){var n=c.apiHelper(5,r);n.url=window.location.href,n.en=e,E.send(t.hitUrl,n)}},eventForLCP:function(){if(t.isBrowser){var e={et:6,url:window.location.href};E.send(t.hitUrl,e)}},setABParams:function(e){t.isBrowser&&(t.abParams="object"==typeof e?JSON.stringify(e):"")},setUserParams:function(e){var t="object"!=typeof e?"":{uprm:e};t&&E.sendUserParams(t)},addXsollauidToUrl:function(e){if(e.indexOf("_xsollauid=")>-1)return e;var t=b.getXsollauid(),r=t?"_xsollauid="+t:"";return r?-1!==e.indexOf("?")?e+"&"+r:e+"?"+r:e},sendCustomData:function(e,r){var n=e?t.server+"/"+e:"",o=t.xsollauid?"_xm="+t.xsollauid:"";(n=o?-1!==n.indexOf("?")?n+"&"+o:n+"?"+o:n)&&E.send(n,r)}};t.counterId=e.id,t.siteDomains=e.siteDomains;var O=e.server.match(/(https?:\/\/[^\/]*)/g);return t.server=O&&O.length?O[0]:console.log("Не удалось извлечь адрес сервера! Установлено значение по умолчанию - https://datagather.xsolla.com")||"https://datagather.xsolla.com",t.hitUrl=t.server+"/hit",t.userParamsUrl=t.server+"/users_params",t.externalId=e.externalId||e.merchantId,t.extraValues=e.extraValues?JSON.stringify(e.extraValues):"",t.hit=void 0===e.hit||e.hit,t.extLink=void 0===e.extLink||e.extLink,t.click=void 0===e.click||e.click,t.scroll=void 0===e.scroll||e.scroll,t.sendLoadMetrics=void 0!==e.sendLoadMetrics&&e.sendLoadMetrics,t.crossDomainTracking=void 0===e.crossDomainTracking||e.crossDomainTracking,t.hitCount=0,t.isBrowser&&(t.clientId=b.getUid(),t.visitId=b.getVid(),t.xsollauid=e.xsollauid||b.getXsollauid(),e.abParams&&j.setABParams(e.abParams),t.server&&t.counterId&&S.setHandlers(t.hit,t.extLink,t.click,t.scroll,t.sendLoadMetrics,t.crossDomainTracking),e.userParams&&j.setUserParams(e.userParams)),j},"undefined"!=typeof window?window.XsollaAnalytics=t:e.exports=t});(js=e.MetrikaEventNames||(e.MetrikaEventNames={})).initiate="login-widget_sign-in_initiate",js.secure_account="login-widget_sign-in_secure-account",js.email_confirm="login-widget_email-verification_confirm",js.confirm_secure_email="login-widget_email-verification_secure-confirm",js.phone_confirm="login-widget_phone-verification_confirm",js.confirm_secure_phone="login-widget_phone-verification_secure-confirm",js.sign_up="login-widget_sign-up_email",js.reset_pass_init="login-widget_reset-pass_initiate",js.widget_open="login-widget_opening_initiate",js.performance="widget_performance",js.performanceJSLoad="widget_performance_js_load",js.performanceRequest="widget_performance_request",js.pageOpen="widget_page_open";var Os=function(e,t){var r=function(e){return"object"==typeof e?"lg_"+e.block+"_"+e.section+"_"+e.action:"lg_"+e}(e);window.XA&&window.XA.elementClick(r,t)},xs={AD:6,AE:6,AF:6,AG:6,AI:6,AL:1,AM:4,AO:6,AQ:6,AR:4,AS:5,AT:1,AU:6,AW:5,AX:1,AZ:4,BA:1,BB:5,BD:6,BE:1,BF:6,BG:1,BH:6,BI:6,BJ:6,BL:5,BM:5,BN:6,BO:5,BQ:5,BR:5,BS:5,BT:6,BV:6,BW:6,BY:4,BZ:5,CA:5,CC:5,CD:6,CF:6,CG:6,CH:1,CI:6,CK:6,CL:1,CM:6,CN:2,CO:1,CR:1,CU:1,CV:6,CW:5,CX:6,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:5,DO:5,DZ:6,EC:5,EE:1,EG:6,EH:6,ER:6,ES:1,ET:6,FI:1,FJ:6,FK:5,FM:5,FO:6,FR:1,GA:6,GB:1,GD:5,GE:4,GF:5,GG:1,GH:6,GI:1,GL:6,GM:6,GN:6,GP:5,GQ:6,GR:1,GS:1,GT:5,GU:6,GW:6,GY:6,HK:2,HM:6,HN:5,HR:1,HT:5,HU:1,ID:6,IE:1,IL:6,IM:1,IN:6,IO:6,IQ:6,IR:6,IS:6,IT:1,JE:1,JM:5,JO:6,JP:6,KE:6,KG:4,KH:6,KI:6,KM:6,KN:5,KP:3,KR:3,KW:6,KY:5,KZ:4,LA:6,LB:6,LC:5,LI:1,LK:6,LR:6,LS:6,LT:1,LU:1,LV:1,LY:6,MA:6,MC:1,MD:4,ME:1,MF:1,MG:6,MH:6,MK:1,ML:6,MM:6,MN:6,MO:2,MP:6,MQ:1,MR:5,MS:5,MT:1,MU:6,MV:6,MW:6,MX:5,MY:6,MZ:6,NA:6,NC:6,NE:6,NF:6,NG:6,NI:5,NL:1,NO:1,NP:6,NR:6,NU:6,NZ:6,OM:6,PA:5,PE:5,PF:6,PG:6,PH:6,PK:6,PL:1,PM:5,PN:6,PR:6,PS:6,PT:1,PW:6,PY:5,QA:6,RE:6,RO:1,RS:1,RU:4,RW:6,SA:6,SB:6,SC:6,SD:6,SE:1,SG:6,SH:6,SI:1,SJ:6,SK:1,SL:6,SM:1,SN:6,SO:6,SR:5,SS:6,ST:6,SV:5,SX:5,SY:6,SZ:6,TC:5,TD:6,TF:6,TG:6,TH:6,TJ:4,TK:6,TL:6,TM:4,TN:6,TO:6,TR:1,TT:5,TV:6,TW:2,TZ:6,UA:4,UG:6,UM:6,US:5,UY:5,UZ:4,VA:1,VC:5,VE:5,VG:6,VI:6,VN:6,VU:6,WF:1,WS:6,YE:6,YT:6,ZA:6,ZM:6,ZW:6,ZZ:6},_s=function(e,t){return e?e.includes("?")?e+"&xsolla_lang="+t:e+"?xsolla_lang="+t:""},Ts=function(e,t){var r=document.createElement("script");r.type="text/javascript",r.src="https://accounts.google.com/gsi/client",r.async=!0,r.defer=!0,document.getElementsByTagName("head")[0].appendChild(r),window.onGoogleLibraryLoad=function(){window.google.accounts.id.initialize({client_id:e,callback:function(e){return t(e)},context:"signin",cancel_on_tap_outside:!1}),window.google.accounts.id.prompt()}};var Ps={apiUrl:"https://login.xsolla.com/api/",cdnUrl:"https://cdn.xsolla.net/login-widget/",consentUrl:"https://consent-api.xsolla.com/v2/consen",projectId:"",theme:{background:{color:"#FFFFFF",image:{url:"",opacity:"1"}},primary_color:"#0073F7",secondary_color:"#DADADA",text_color:"#000000",error_color:"#eb002f",button_image:"",rounding:{inputs:"6px",buttons:"100px",widget:"6px"},scene:{color:"#f7faff"}},is_oauth2:!1},As=function(e){return e&&e.data&&e.data.error&&e.data.error.code||null},ks=["clientId","scope","state","redirectUri","responseType"],Is=["projectId","fullLocale","callbackUrl","payload","with_logout"],Cs=["emailTemplate"],Ns=["challenge_id","fullLocale"],Ms=function(e,t){void 0===t&&(t=[]);var r={projectId:e.projectId};return t.forEach(function(t){if(e[t])switch(t){case"callbackUrl":r.login_url=e.callbackUrl;break;case"fullLocale":r.locale=e.fullLocale?e.fullLocale.replace("-","_"):e.fullLocale;break;case"clientId":r.client_id=e.clientId;break;case"redirectUri":r.redirect_uri=e.redirectUri;break;case"responseType":r.response_type=e.responseType;break;case"emailTemplate":r.email_template=e.emailTemplate;break;default:r[t]=e[t]}}),r};ve.defaults.withCredentials=!0;var Rs,Us=function(){function t(e){this.config=Ps,this.updateConfig(e)}return t.prototype.updateConfig=function(e){var t=function e(t){if(null!=t){var r=Array.isArray(t)?[]:{};return Object.keys(t).forEach(function(n){var o=t[n];"object"==typeof o?r[n]=e(o):""!==o&&(r[n]=o)}),r}}(e);!function e(t,r){if(void 0===t)return r;for(var n in r)n in t&&"object"==typeof r[n]?e(t[n],r[n]):void 0!==r[n]&&(t[n]=r[n]);return t}(this.config,t);var r=this.config,n=r.clientId,o=r.redirectUri,i=r.responseType,a=r.state;return n&&i&&o&&a&&(this.config.is_oauth2=!0),this.config},t.prototype.fetchConfig=function(){var t=this,r=Ms(this.config,Is.concat(ks)),o=this.config,i=o.settingsJSON,a=o.socialsJSON,s=o.themeJSON,c=this.config.projectId,u=[ve.get(i||"https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/auth",{withCredentials:!1}),ve.get(a||"https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/socials/by_region",{withCredentials:!1}),ve.get(s||"https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/widget",{withCredentials:!1}),ve.get(this.config.apiUrl+"/client/details")],f=Promise.all(u),l=ve.get(this.config.apiUrl+"/widget/ng/settings",{params:r}),p=(new Date).getTime(),d={projectId:c,requestName:"fetchConfigWidget",requestType:"get",requestUrl:["https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/auth","https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/socials/by_region","https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/widget",this.config.apiUrl+"/client/details",this.config.apiUrl+"/widget/ng/settings"]};return ps([f,l]).then(function(o){if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},d,{isError:!1,load_time:(new Date).getTime()-p})}),!o.data){var i=o,a=i[0],s=i[1],c=i[2],u=i[3].data.geo_ip_country.toUpperCase()||"US",f=function(e,t,r,o){var i=o.projectId,a=o.client_id,s=void 0===a?"":a,c=o.scope,u=void 0===c?"":c,f=o.state,l=void 0===f?"":f,p=o.response_type,d=void 0===p?"":p,y=o.redirect_uri,h=void 0===y?"":y,m=o.login_url,g=r?"?client_id="+s+"&redirect_uri="+h+"&response_type="+d+"&scope="+u+"&state="+l:"?projectId="+i+"&login_url="+(void 0===m?"":m),v=Object.keys(xs).includes(t)?e[xs[t]]:e[xs.US];return{primary:n({},v.primary.map(function(e){return{name:e.name,url:r?""+e.oauth2+g:""+e.jwt+g}})),secondary:n({},v.secondary.map(function(e){return{name:e.name,url:r?""+e.oauth2+g:""+e.jwt+g}})),other:[],showOtherLink:!1}}(s.data,u,t.config.is_oauth2||!1,r),l=(y=a.data,h=y.tos_url,m=y.consent_url,g=y.cookie_policy,v=y.privacy_policy,b="en",navigator.language&&(b=navigator.language.trim().split(/-|_/)[0]),n({},y,{tos_url:_s(h,b),consent_url:_s(m,b),cookie_policy:_s(g,b),privacy_policy:_s(v,b)}));return t.updateConfig(n({apiUrl:"",projectId:""},l,{social_links:n({},f),theme:c.data,geo_ip_country:u}))}var y,h,m,g,v,b;return t.updateConfig(o.data)}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},d,{isError:r,load_time:(new Date).getTime()-p})}),r)throw new ds(r);throw t})},t.prototype.signup=function(t){var r=t.userInfo,o=Ms(this.config,Is.concat(ks,Cs)),i=this.config.apiUrl+(this.config.is_oauth2?"/oauth2/user":"/user"),a=(new Date).getTime(),s={requestUrl:i,projectId:this.config.projectId,requestName:"signup",requestType:"post"};return ve.post(i,r,{params:o,withCredentials:!0}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:!1,load_time:(new Date).getTime()-a})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:r,load_time:(new Date).getTime()-a})}),r)throw new ds(r);throw t})},t.prototype.login=function(t){var r=t.credentials,o=t.captchaData,i=Ms(this.config,Is.concat(ks)),a={};this.config.callbackUrl&&(i.login_url=this.config.callbackUrl),o&&(a["X-LOT-NUMBER"]=o.lot_number,a["X-CAPTCHA-OUTPUT"]=o.captcha_output,a["X-PASS-TOKEN"]=o.pass_token,a["X-GEN-TIME"]=o.gen_time);var s=this.config.apiUrl+(this.config.is_oauth2?"/oauth2/login":"/login"),c=(new Date).getTime(),u={requestUrl:s,projectId:this.config.projectId,requestName:"login",requestType:"post"};return ve.post(s,r,{params:i,headers:a}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},u,{isError:!1,load_time:(new Date).getTime()-c})}),t.data}).catch(function(t){var r=As(t.response),o=t.response.headers["x-captcha-enabled"];if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},u,{isError:r,load_time:(new Date).getTime()-c})}),"003-038"===r&&o&&"1"===o)throw new ds("003-338");if(r)throw new ds(r);throw t})},t.prototype.agreement=function(t){var r=t.token,o=t.isAccepted,i=t.consentId,a={token:r,projectId:this.config.projectId,accept_consent:o};i&&(a.consent_id=i);var s=this.config.apiUrl+"/social/consent",c=(new Date).getTime(),u={requestUrl:s,projectId:this.config.projectId,requestName:"socialConsent",requestType:"put"};return ve.put(s,a).then(function(e){return e.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},u,{isError:r,load_time:(new Date).getTime()-c})}),r)throw new ds(r);throw t})},t.prototype.reset=function(t){var r=Ms(this.config,Is.concat(Cs));this.config.callbackUrl&&(r.login_url=this.config.callbackUrl);var o=this.config.apiUrl+"/password/reset/request",i=(new Date).getTime(),a={requestUrl:o,projectId:this.config.projectId,requestName:"passwordResetRequest",requestType:"post"};return ve.post(o,t,{params:r}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:!1,load_time:(new Date).getTime()-i})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:r,load_time:(new Date).getTime()-i})}),r)throw new ds(r);throw t})},t.prototype.set=function(t){var r=Ms(this.config,Is);this.config.callbackUrl&&(r.login_url=this.config.callbackUrl);var o={new_password:t.newPassword,reset_code:t.code,user_id:t.user_id},i=this.config.apiUrl+"/password/reset/confirm",a=(new Date).getTime(),s={requestUrl:i,projectId:this.config.projectId,requestName:"passwordResetConfirm",requestType:"post"};return ve.post(i,o,{params:r}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:!1,load_time:(new Date).getTime()-a})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:r,load_time:(new Date).getTime()-a})}),r)throw new ds(r);throw t})},t.prototype.getConfirmCode=function(t){var r={projectId:this.config.projectId,login:t.login.toLowerCase(),operation_id:t.operation_id},o=this.config.apiUrl+"/otc/code",i=(new Date).getTime(),a={requestUrl:o,projectId:this.config.projectId,requestName:"getConfirmCode",requestType:"get"};return ve.get(this.config.apiUrl+"/otc/code",{params:r,cancelToken:t.cancelToken.token}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:!1,load_time:(new Date).getTime()-i})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:r,load_time:(new Date).getTime()-i})}),r)throw new ds(r);throw t})},t.prototype.pushConfirmCode=function(t){var r=n({projectId:this.config.projectId},t),o=this.config.apiUrl+"/otc/push",i=(new Date).getTime(),a={requestUrl:o,projectId:this.config.projectId,requestName:"pushConfirmCode",requestType:"get"};return ve.get(o,{params:r}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:!1,load_time:(new Date).getTime()-i})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:r,load_time:(new Date).getTime()-i})}),r)throw new ds(r);throw t})},t.prototype.ask=function(t){var r,o=Ms(this.config,Is.concat(ks,Cs)),i=((r={})[t.fields.email?"email":"phone_number"]={link_url:t.link_url,send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},r),a={};t.captchaData&&(a["X-LOT-NUMBER"]=t.captchaData.lot_number,a["X-CAPTCHA-OUTPUT"]=t.captchaData.captcha_output,a["X-PASS-TOKEN"]=t.captchaData.pass_token,a["X-GEN-TIME"]=t.captchaData.gen_time);var s={updatedFields:t.fields,token:t.token,settings:i,email:this.config.is_oauth2?t.fields.email:""},c=this.config.apiUrl+(this.config.is_oauth2?"/oauth2/user/ask":"/token/update"),u=(new Date).getTime(),f={requestUrl:c,projectId:this.config.projectId,requestName:"userAsk",requestType:"post"};return ve.post(c,s,{params:o,headers:a}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},f,{isError:!1,load_time:(new Date).getTime()-u})}),t.data}).catch(function(t){var r=As(t.response),o=t.response.headers["x-captcha-enabled"];if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},f,{isError:r,load_time:(new Date).getTime()-u})}),"003-038"===r&&o&&"1"===o)throw new ds("003-338");if(r)throw new ds(r);throw t})},t.prototype.getAskFields=function(t){var r={projectId:this.config.projectId},o={};o.Authorization="Bearer "+t;var i=this.config.apiUrl+"/users/me/ask",a=(new Date).getTime(),s={requestUrl:i,projectId:this.config.projectId,requestName:"getAskFields",requestType:"get"};return ve.get(i,{params:r,headers:o}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:!1,load_time:(new Date).getTime()-a})}),0!==t.data.length?t.data:function(){var e=[],t=new URLSearchParams(window.location.search).getAll("fields");if(0!==t.length)for(var r=0,n=t[0].split(",");r<n.length;r++)if("email"===n[r]){e.push({name:"email",required:!0,type:"email",validation:{regexps:[]},step:0});break}return e}()}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:r,load_time:(new Date).getTime()-a})}),r)throw new ds(r);throw t})},t.prototype.otpLogin=function(t){var r=t.code,o=t.remember_me,i=void 0===o||o,a=Ms(this.config,Ns),s=this.config.apiUrl+"/otp/validate",c=(new Date).getTime(),u={requestUrl:s,projectId:this.config.projectId,requestName:"otpLoginValidate",requestType:"get"};return ve.get(s,{params:{code:r,remember_me:i,challenge_id:a.challenge_id}}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},u,{isError:!1,load_time:(new Date).getTime()-c})}),t.data}).catch(function(t){var o=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},u,{isError:r,load_time:(new Date).getTime()-c})}),o)throw new ds(o);throw t})},t.prototype.otpResendCode=function(){var t=Ms(this.config,Ns),r=this.config.apiUrl+"/otp/resend",o=(new Date).getTime(),i={requestUrl:r,projectId:this.config.projectId,requestName:"otpResendCode",requestType:"put"};return ve.put(r,{locale:t.locale},{params:{challenge_id:t.challenge_id}}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},i,{isError:!1,load_time:(new Date).getTime()-o})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},i,{isError:r,load_time:(new Date).getTime()-o})}),r)throw new ds(r);throw t})},t.prototype.phoneGetCode=function(t){var r=t.phone_number,o=t.link_url,i=t.isOauth2,a=t.captchaData,s=Ms(this.config,Is.concat(ks)),c={};a&&(c["X-LOT-NUMBER"]=a.lot_number,c["X-CAPTCHA-OUTPUT"]=a.captcha_output,c["X-PASS-TOKEN"]=a.pass_token,c["X-GEN-TIME"]=a.gen_time);var u=this.config.apiUrl+(i?"/oauth2":"")+"/login/phone/request",f=(new Date).getTime(),l={requestUrl:u,projectId:this.config.projectId,requestName:"phoneGetCode",requestType:"post"};return ve.post(u,{link_url:o,phone_number:r||"",send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},{params:s,headers:c}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},l,{isError:!1,load_time:(new Date).getTime()-f})}),t.data}).catch(function(t){var r=As(t.response),o=t.response.headers["x-captcha-enabled"];if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},l,{isError:r,load_time:(new Date).getTime()-f})}),"003-038"===r&&o&&"1"===o)throw new ds("003-338");if(r)throw new ds(r);throw t})},t.prototype.loginWithPhoneCode=function(t){var r=t.phone_number,o=t.code,i=t.operation_id,a=t.isOauth2,s=Ms(this.config,Is.concat(ks)),c=this.config.apiUrl+(a?"/oauth2":"")+"/login/phone/confirm",u=(new Date).getTime(),f={requestUrl:c,projectId:this.config.projectId,requestName:"loginWithPhoneCodeConfirm",requestType:"post"};return ve.post(c,{phone_number:r,code:o,operation_id:i},{params:s}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},f,{isError:!1,load_time:(new Date).getTime()-u})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},f,{isError:r,load_time:(new Date).getTime()-u})}),r)throw new ds(r);throw t})},t.prototype.emailGetCode=function(t){var r=t.email,o=t.isOauth2,i=t.link_url,a=t.captchaData,s=Ms(this.config,Is.concat(ks)),c={};a&&(c["X-LOT-NUMBER"]=a.lot_number,c["X-CAPTCHA-OUTPUT"]=a.captcha_output,c["X-PASS-TOKEN"]=a.pass_token,c["X-GEN-TIME"]=a.gen_time);var u=this.config.apiUrl+(o?"/oauth2":"")+"/login/email/request",f=(new Date).getTime(),l={requestUrl:u,projectId:this.config.projectId,requestName:"emailGetCode",requestType:"post"};return ve.post(u,{link_url:i,email:r?r.toLowerCase():"",send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},{params:s,headers:c}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},l,{isError:!1,load_time:(new Date).getTime()-f})}),t.data}).catch(function(t){var r=As(t.response),o=t.response.headers["x-captcha-enabled"];if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},l,{isError:r,load_time:(new Date).getTime()-f})}),"003-038"===r&&o&&"1"===o)throw new ds("003-338");if(r)throw new ds(r);throw t})},t.prototype.loginWithEmailCode=function(t){var r=t.email,o=t.code,i=t.operation_id,a=t.isOauth2,s=Ms(this.config,Is.concat(ks)),c=this.config.apiUrl+(a?"/oauth2":"")+"/login/email/confirm",u=(new Date).getTime(),f={requestUrl:c,projectId:this.config.projectId,requestName:"loginWithEmail_CodeConfirm",requestType:"post"};return ve.post(c,{email:r,code:o,operation_id:i},{params:s}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},f,{isError:!1,load_time:(new Date).getTime()-u})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},f,{isError:r,load_time:(new Date).getTime()-u})}),r)throw new ds(r);throw t})},t.prototype.resendEmail=function(t){var r=Ms(this.config,Is.concat(ks,Cs)),o=this.config.apiUrl+(this.config.is_oauth2?"/oauth2":"")+"/user/resend_confirmation_link",i=(new Date).getTime(),a={requestUrl:o,projectId:this.config.projectId,requestName:"resendEmailConfirmationLink",requestType:"post"};return ve.post(o,{username:t},{params:r}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:!1,load_time:(new Date).getTime()-i})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:r,load_time:(new Date).getTime()-i})}),r)throw new ds(r);throw t})},t.prototype.oneTapLogin=function(t,r){var o=Ms(this.config,Is.concat(ks)),i=this.config.apiUrl+(this.config.is_oauth2?"/oauth2":"")+"/social/"+r+"/one_tap/complete",a=(new Date).getTime(),s={requestUrl:i,projectId:this.config.projectId,requestName:"oneTapLoginComplete",requestType:"post"};return ve.post(i,{access_token:t},{params:o}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:!1,load_time:(new Date).getTime()-a})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},s,{isError:r,load_time:(new Date).getTime()-a})}),r)throw new ds(r);throw t})},t.prototype.checkUserAuthSSO=function(){var t=Ms(this.config,Is),r=this.config.apiUrl+"/jwt/sso",o=(new Date).getTime(),i={requestUrl:r,projectId:this.config.projectId,requestName:"oneTapLoginComplete",requestType:"post"};return ve.get(r,{params:t}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},i,{isError:!1,load_time:(new Date).getTime()-o})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},i,{isError:r,load_time:(new Date).getTime()-o})}),r)throw new ds(r);throw t})},t.prototype.userAuthSSOWithRedirect=function(t){var r=Ms(this.config,Is),o=this.config.apiUrl+"/jwt/sso/redirect",i=(new Date).getTime(),a={requestUrl:o,projectId:this.config.projectId,requestName:"userAuthSSOWithRedirect",requestType:"post"};return ve.get(o,{params:n({},r,{login_url:t})}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:!1,load_time:(new Date).getTime()-i})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:r,load_time:(new Date).getTime()-i})}),r)throw new ds(r);throw t})},t.prototype.logout=function(t,r){var o={};o.Authorization="Bearer "+t;var i=this.config.apiUrl+"/oauth2/logout",a={requestUrl:i,projectId:this.config.projectId,requestName:"logout",requestType:"post"},s=(new Date).getTime();return ve.get(i,{headers:o,params:{sessions:r}}).then(function(t){return Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:!1,load_time:(new Date).getTime()-s})}),t.data}).catch(function(t){var r=As(t.response);if(Os(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:r,load_time:(new Date).getTime()-s})}),r)throw new ds(r);throw t})},t}(),Ds="object"==typeof Reflect?Reflect:null,Ls=Ds&&"function"==typeof Ds.apply?Ds.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};Rs=Ds&&"function"==typeof Ds.ownKeys?Ds.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var qs=Number.isNaN||function(e){return e!=e};function Bs(){Bs.init.call(this)}var Fs=Bs;Bs.EventEmitter=Bs,Bs.prototype._events=void 0,Bs.prototype._eventsCount=0,Bs.prototype._maxListeners=void 0;var Gs=10;function Ws(e){return void 0===e._maxListeners?Bs.defaultMaxListeners:e._maxListeners}function Vs(e,t,r,n){var o,i,a,s;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=Ws(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function Hs(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,Ls(this.listener,this.target,e))}.bind(n);return o.listener=r,n.wrapFn=o,o}function Xs(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):$s(o,o.length)}function zs(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function $s(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(Bs,"defaultMaxListeners",{enumerable:!0,get:function(){return Gs},set:function(e){if("number"!=typeof e||e<0||qs(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Gs=e}}),Bs.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Bs.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||qs(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Bs.prototype.getMaxListeners=function(){return Ws(this)},Bs.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var s=o[e];if(void 0===s)return!1;if("function"==typeof s)Ls(s,this,t);else{var c=s.length,u=$s(s,c);for(r=0;r<c;++r)Ls(u[r],this,t)}return!0},Bs.prototype.addListener=function(e,t){return Vs(this,e,t,!1)},Bs.prototype.on=Bs.prototype.addListener,Bs.prototype.prependListener=function(e,t){return Vs(this,e,t,!0)},Bs.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,Hs(this,e,t)),this},Bs.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,Hs(this,e,t)),this},Bs.prototype.removeListener=function(e,t){var r,n,o,i,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},Bs.prototype.off=Bs.prototype.removeListener,Bs.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},Bs.prototype.listeners=function(e){return Xs(this,e,!0)},Bs.prototype.rawListeners=function(e){return Xs(this,e,!1)},Bs.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):zs.call(e,t)},Bs.prototype.listenerCount=zs,Bs.prototype.eventNames=function(){return this._eventsCount>0?Rs(this._events):[]};var Js,Ks={projectId:"8513c380-0336-4927-b351-02ccec7f3cb6",url:"https://login-widget.xsolla.com/latest",popupBackgroundColor:"rgba(0, 0, 0, 0.6)",showPopupBackground:!0,iframeZIndex:9e3,siteHaveGDPRBanner:!1},Zs=["preferredLocale","callbackUrl","disableConfirmByLink","payload","with_logout","clientId","emailTemplate","scope","state","redirectUri","responseType","isDemo","challenge_id","analyticsProductName","theme","authData","page","customStyle","customLabels","parentIsFrame","settingsJSON","socialsJSON","themeJSON","siteHaveGDPRBanner","sendLoadMetrics"],Ys={signUp:"/sign-up",confirm:"/confirm",logIn:"/",passwordReset:"/password/reset",passwordSet:"/password/set",ask:"/ask",error:"/404",socials:"/socials",agreement:"/agreement",otp:"/otp",logInUserPreset:"/"},Qs=function(t){function o(r){var o=t.call(this)||this;return o.events=e.PostMessageEvents,o.eventsArray=Object.values(e.PostMessageEvents),o.handler={},o.config=n({},Ks,r),o.api=new Us(n({},Ps,r)),o.inFullscreenMode=!1,o.page=o.config.page?Ys[o.config.page]:"",o.setLocale(o.config.preferredLocale),o.on("newListener",function(t){if(!(o.eventsArray.indexOf(t)>-1))throw new ys("Invalid event");t===e.PostMessageEvents.Close&&(o.handler[t]=!0)}),o}return r(o,t),o.prototype.mount=function(t){var r=this.config.isHardMounted;this.iframe=document.createElement("iframe"),this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none",r&&(this.iframe.style.position="absolute",this.iframe.style.top="0",this.iframe.style.bottom="0",this.iframe.style.left="0",this.iframe.style.right="0");var n=r?document.body:document.getElementById(t);if(n){var o=window.getComputedStyle(n);this.config.sendLoadMetrics="none"!==o.display&&"hidden"!==o.visibility,n.appendChild(this.iframe)}this.updateWidget(),Os(e.MetrikaEventNames.widget_open),this.initDispatcher()},o.prototype.setLocale=function(e){e&&(this.locale=vs(e),this.updateWidget())},o.prototype.setTheme=function(t){if(!this.iframe||!this.iframe.contentWindow)throw new ys("Widget is not mounted");bs({message:{theme:t,type:e.PostMessageEvents.ThemeUpdate},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})},o.prototype.setPage=function(t){if(t){if(!this.iframe||!this.iframe.contentWindow)throw new ys("Widget is not mounted");bs({message:{page:t,type:e.PostMessageEvents.PageOpen},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})}},o.prototype.open=function(){if(!this.iframe||!this.iframe.contentWindow)return Error("Widget is not mounted");var t=this.iframe.style;t.position="fixed",t.zIndex=String(this.config.iframeZIndex),t.left="0",t.top="0",t.width="100%",t.height="100%",this.inFullscreenMode=!0,this.config.showPopupBackground&&this.config.popupBackgroundColor?t.backgroundColor=this.config.popupBackgroundColor:t.backgroundColor="transparent",Os(e.MetrikaEventNames.widget_open),bs({message:{type:e.PostMessageEvents.IframeOpen},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})},o.prototype.close=function(){if(!this.iframe||!this.iframe.contentWindow)return Error("Widget is not mounted");var e=this.iframe.style;e.position="",e.zIndex="",e.left="",e.top="",e.width="0",e.height="0",e.backgroundColor=""},o.prototype.initDispatcher=function(){var t=this;Es(Ss+"message",function(r){r.data.type!==e.PostMessageEvents.Close||t.handler[e.PostMessageEvents.Close]||t.onCloseEvent(r.data.source),r.data.type===e.PostMessageEvents.GoogleOneTapOpen?t.onOpenGoogleOneTapEvent(r.data.params):t.emit(r.data.type,r.data)},!1)},o.prototype.unmount=function(){if(!this.iframe||!this.iframe.parentNode)throw new ys("Widget is not mounted");this.iframe.parentNode.removeChild(this.iframe)},o.prototype.onCloseEvent=function(t){(this.inFullscreenMode||t===e.CloseSource.Button)&&this.close()},o.prototype.onOpenGoogleOneTapEvent=function(t){var r=this;if(!this.iframe||!this.iframe.parentNode)throw new ys("Widget is not mounted");var n=t.appId;Ts(n,function(t){bs({message:{type:e.PostMessageEvents.GoogleOneTapSuccess,credential:t.credential},targetOrigin:r.config.url||window.location.origin,target:r.iframe.contentWindow})})},o.prototype.updateWidget=function(){var e=this;if(this.iframe){var t="";Zs.forEach(function(r){var n=e.config[r];if(n)switch(r){case"preferredLocale":t+="&locale="+n;break;case"clientId":t+="&client_id="+n;break;case"redirectUri":t+="&redirect_uri="+n;break;case"responseType":t+="&response_type="+n;break;case"theme":t+="&theme="+JSON.stringify(n);break;case"authData":t+="&auth_data="+JSON.stringify(n);break;case"siteHaveGDPRBanner":default:t+="&"+r+"="+n}}),this.iframe.src=""+this.config.url+this.page+"?projectId="+this.config.projectId,this.iframe.src+=t}},o}(Fs);return(Js=e.Socials||(e.Socials={})).amazon="amazon",Js.apple="apple",Js.baidu="baidu",Js.battlenet="battlenet",Js.china_telecom="china_telecom",Js.discord="discord",Js.email="email",Js.epicgames="epicgames",Js.facebook="facebook",Js.github="github",Js.google="google",Js["google-plus"]="google-plus",Js.instagram="instagram",Js.kakao="kakao",Js.linkedin="linkedin",Js.mailru="mailru",Js.microsoft="microsoft",Js.msn="msn",Js.naver="naver",Js.ok="ok",Js.paradox="paradox",Js.paypal="paypal",Js.pinterest="pinterest",Js.qq="qq",Js.reddit="reddit",Js.steam="steam",Js.slack="slack",Js.twitch="twitch",Js.twitter="twitter",Js.vimeo="vimeo",Js.vk="vk",Js.wechat="wechat",Js.weibo="weibo",Js.xbox="xbox",Js.yahoo="yahoo",Js.yandex="yandex",Js.youtube="youtube",e.Api=Us,e.defaultConfig=Ps,e.Widget=Qs,e.APIError=ds,e.SUPPORTED_LANGUAGES=ms,e.LANGUAGE_MAP={ae:"ar",bh:"ar",dz:"ar",eg:"ar",iq:"ar",jo:"ar",km:"ar",kw:"ar",lb:"ar",ly:"ar",ma:"ar",mr:"ar",om:"ar",ps:"ar",qa:"ar",sa:"ar",sd:"ar",sy:"ar",tn:"ar",ye:"ar",bg:"bg",cz:"cs",de:"de",at:"de",li:"de",ch:"de",es:"es",ar:"es",bo:"es",cl:"es",co:"es",cr:"es",cu:"es",do:"es",ec:"es",eh:"es",gq:"es",gt:"es",hn:"es",mx:"es",ni:"es",pa:"es",pe:"es",pr:"es",py:"es",sv:"es",uy:"es",ve:"es",fr:"fr",bf:"fr",bi:"fr",bj:"fr",bl:"fr",cd:"fr",cf:"fr",cg:"fr",ci:"fr",dj:"fr",ga:"fr",gf:"fr",gn:"fr",gp:"fr",ht:"fr",lu:"fr",mc:"fr",mg:"fr",ml:"fr",mq:"fr",nc:"fr",ne:"fr",pf:"fr",pm:"fr",re:"fr",sc:"fr",sn:"fr",td:"fr",tf:"fr",tg:"fr",wf:"fr",yt:"fr",il:"he",hu:"hu",it:"it",sm:"it",va:"it",jp:"ja",kr:"ko",kp:"ko",pt:"pt",ao:"pt",br:"pt",cv:"pt",gw:"pt",mz:"pt",st:"pt",tl:"pt",ro:"ro",md:"ro",ru:"ru",kz:"ru",ua:"ru",by:"ru",th:"th",tr:"tr",vn:"vi",cn:"zh",hk:"zh",mo:"zh",tw:"zh"},e.sendMessage=bs,e.initGoogleOneTap=Ts,e.getUrlVersion=function(e){var t=e.match(/\/([^\/]+)\//);return null!==t?t[1]:"latest"},e.getPageName=function(e){var t=e.lastIndexOf("/");return e.substring(t+1,e.length)},e.initAnalytics=function(e,t,r){void 0===r&&(r=!1);try{var n={projectId:e};return t&&(n.productName=t),window.XA=new window.XsollaAnalytics({extraValues:n,sendLoadMetrics:r,id:2222,server:"https://datagather.xsolla.com/hit",siteDomains:["login-widget.xsolla.com"],externalId:e}),!0}catch(e){return e}},e.addEvent=Os,e.openEvent=function(e,t){window.XA&&window.XA.hit(e,t)},e}({});
//# sourceMappingURL=sdk.js.map
