
管理员
站长
- UID
- 1
- 积分
- 224398
- 余额
- 13 R
- Moe币
- 84879
- 在线时间
- 279 小时
- 注册时间
- 2025-12-28
- 最后登录
- 2026-11-6
|
|
var ksoAccount=function(){"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){r=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),c=new S(n||[]);return i(a,"_invoke",{value:P(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",y="executing",v="completed",g={};function m(){}function w(){}function b(){}var O={};f(O,c,(function(){return this}));var E=Object.getPrototypeOf,R=E&&E(E(L([])));R&&R!==n&&o.call(R,c)&&(O=R);var j=b.prototype=m.prototype=Object.create(O);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(n,i,a,c){var u=p(t[n],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var n;i(this,"_invoke",{value:function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}})}function P(e,r,n){var o=h;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=x(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?v:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function x(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,i(j,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:w,configurable:!0}),w.displayName=f(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},k(_.prototype),f(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(j),f(j,s,"Generator"),f(j,c,(function(){return this})),f(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function c(t){o(a,n,i,c,u,"next",t)}function u(t){o(a,n,i,c,u,"throw",t)}c(void 0)}))}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function u(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}(this,r)}}function d(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=d(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},y.apply(this,arguments)}function v(t,e,r,n){return v="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,r,n){var o,i=d(t,e);if(i){if((o=Object.getOwnPropertyDescriptor(i,e)).set)return o.set.call(n,r),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(n,e)){if(!o.writable)return!1;o.value=r,Object.defineProperty(n,e,o)}else s(n,e,r);return!0},v(t,e,r,n)}function g(t,e,r,n,o){if(!v(t,e,r,n||t)&&o)throw new TypeError("failed to set property");return r}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function O(t,e){Error.call(this),this.result=E[t]||t,this.msg=e||R[t]}var E={DB_ERROR:"DBError",CRYPTO_ERROR:"CryptoError",INVALID_ARGUMENT:"InvalidArgument",ANDRIOD_INIT_FAIL:"AndroidInitFail"},R={DB_ERROR:"打开数据库失败",CRYPTO_ERROR:"加密过程出错",INVALID_ARGUMENT:"入参格式错误",ANDRIOD_INIT_FAIL:"安卓初始化失败"},j={};Object.keys(E).forEach((function(t){j[t]={value:t}})),Object.defineProperties(O,j);var k,_,P=function(t,e,r){if(void 0===t)throw new O(O.INVALID_ARGUMENT,r);if(n(t)!==e)throw new O(O.INVALID_ARGUMENT,r);return!0},x=function(t){if("undefined"!=typeof document){var e={};try{e=document.cookie.split(";").map((function(t){return t.trim().split("=")})).reduce((function(t,e){var r=m(e,2),n=r[0],o=r[1];return t[n]=decodeURIComponent(o),t}),{})}catch(t){}return e[t]||null}},A=Object.prototype.toString,N=Object.getPrototypeOf,S=(k=Object.create(null),function(t){var e=A.call(t);return k[e]||(k[e]=e.slice(8,-1).toLowerCase())}),L=function(t){return t=t.toLowerCase(),function(e){return S(e)===t}},T=Array.isArray,I=(_="undefined",function(t){return n(t)===_}),C=function(t){return null!==t&&"object"===n(t)},D=L("Date"),U=L("URLSearchParams");function B(t,e){var r,o,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==i&&i;if(null!=t)if("object"!==n(t)&&(t=[t]),T(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{var c,u=a?Object.getOwnPropertyNames(t):Object.keys(t),s=u.length;for(r=0;r<s;r++)c=u[r],e.call(null,t[c],c,t)}}var F={isString:function(t){return"string"==typeof t},isArray:T,isUndefined:I,isDate:D,isURLSearchParams:U,isObject:C,mergeConfig:function(t,r){r=r||{};var n=e({},t);return Object.keys(r).forEach((function(t){t in n&&C(r[t])?n[t]=e(e({},n[t]),r[t]):n[t]=r[t]})),n},forEach:B,inherits:function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:function(t,e,r,n){var o,i,a,c={};if(e=e||{},null==t)return e;do{for(i=(o=Object.getOwnPropertyNames(t)).length;i-- >0;)a=o[i],n&&!n(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==r&&N(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},toObjectSet:function(t,e){var r={},n=function(t){t.forEach((function(t){r[t]=!0}))};return T(t)?n(t):n(String(t).split(e)),r},toJSONObject:function(t){var e=new Array(10);return function t(r,n){if(C(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[n]=r;var o=T(r)?[]:{};return B(r,(function(e,r){var i=t(e,n+1);!I(i)&&(o[r]=i)})),e[n]=void 0,o}}return r}(t,0)},isAbsoluteURL:function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},combineURLs:function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}};function G(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}F.inherits(G,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var M=G.prototype,K={};function q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(t){K[t]={value:t}})),Object.defineProperties(G,K),Object.defineProperty(M,"isAxiosError",{value:!0}),G.from=function(t,e,r,n,o,i){var a=Object.create(M);return F.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(function(t){return"isAxiosError"!==t})),G.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};var H=F.toObjectSet(["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"]),J="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){var n,o,i=t.data,a=t.headers,c=t.responseType,u=new XMLHttpRequest,s=(n=t.baseURL,o=t.url,n&&!F.isAbsoluteURL(o)?F.combineURLs(n,o):o);function f(t){var e="json"===c;return t&&F.isString(t)&&e?JSON.parse(t):t}function l(){if(u){var n=function(t){var e,r,n,o={};return t&&t.split("\n").forEach((function(t){n=t.indexOf(":"),e=t.substring(0,n).trim().toLowerCase(),r=t.substring(n+1).trim(),!e||o[e]&&H[e]||("set-cookie"===e?o[e]?o[e].push(r):o[e]=[r]:o[e]=o[e]?o[e]+", "+r:r)})),o}("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),o=c&&"text"!==c&&"json"!==c?u.response:u.responseText;!function(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new G("Request failed with status code "+r.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t)}),(function(t){r(t)}),{data:o&&f(o),status:u.status,statusText:u.statusText,headers:n,config:t,request:u}),u=null}}u.open(t.method.toUpperCase(),function(t,e,r){if(!e)return t;var n,o=r&&r.serialize;if(o)n=o(e,r);else if(F.isURLSearchParams(e))n=e.toString();else{var i=[];F.forEach(e,(function(t,e){null!=t&&(F.isArray(t)?e+="[]":t=[t],F.forEach(t,(function(t){F.isDate(t)?t=t.toISOString():F.isObject(t)&&(t=JSON.stringify(t)),i.push(q(e)+"="+q(t))})))})),n=i.join("&")}if(n){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t}(s,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(new G("Request aborted",G.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new G("Network Error",G.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";r(new G(e,t,u)),u=null},"setRequestHeader"in u&&F.forEach(a,(function(t,e){u.setRequestHeader(e,t)})),F.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),c&&"json"!==c&&(u.responseType=t.responseType),u.send(i||null)}))},V={adapter:["xhr","http"],timeout:2e4,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,withCredentials:!0,responseType:"json",validateStatus:function(t){return t>=200&&t<300},headers:{Accept:"application/json, text/plain, */*"}},z=function(){function t(){a(this,t),this.defaults=V}return u(t,[{key:"request",value:function(t,e){var r;"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=F.mergeConfig(this.defaults,e)).method=(e.method||this.defaults.method||"get").toLowerCase();try{r=J(e)}catch(t){return Promise.reject(t)}return r}}]),t}();F.forEach(["delete","get","head","options"],(function(t){z.prototype[t]=function(e,r){return this.request(F.mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}})),F.forEach(["post","put","patch"],(function(t){z.prototype[t]=function(e,r,n){return this.request(F.mergeConfig(n||{},{method:t,headers:{"Content-Type":"application/json"},url:e,data:JSON.stringify(r)}))}}));var X,Y,W=new z,$={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn",LOG:"log"},Q=function(){function t(e){a(this,t),this.level=e||$.INFO}return u(t,[{key:"log",value:function(t){this.shouldLog(t)}},{key:"shouldLog",value:function(t){var e=Object.values($);return e.indexOf(t)>=e.indexOf(this.level)}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[$.DEBUG].concat(e))}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[$.ERROR].concat(e))}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[$.INFO].concat(e))}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[$.WARN].concat(e))}}]),t}(),Z=new Q($.DEBUG),tt=!1,et=[],rt=function t(){tt||et.length>0&&(tt=!0,ot().then((function(t){nt()})).catch((function(t){nt(null,t)})).finally((function(){tt=!1,t()})))},nt=function(t,e){et.forEach((function(t){e?t.reject(e):t.resolve("update ksosid success")})),et=[]},ot=function(){return(X=X||i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var r=window.location.hostname.split(".").slice(-2).join(".");W.post("https://account.".concat(r,"/passport/secure/api/grant_token"),{grant_type:"refresh_token"}).then((function(e){t(e)})).catch((function(r){var n=(r.response||{}).data||r,o=n.result,i=n.msg;"TokenExpired"===o.result?(Z.info("token is expired when refresh token"),t({result:"ok",msg:"update ksosid success"})):e(new O(o,i))}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)},it=function(){return(Y=Y||i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){et.push({resolve:t,reject:e}),rt()})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)},at=function(t){function e(){a(this,e)}return u(e,[{key:"checkKsoSid",value:function(){return(t=t||i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){!x("exp")&&x("_ku")?it().then((function(){t("update ksosid success")})).catch((function(t){e(t)})):!x("nexp")&&x("_ku")?(t("get ksosid success,need refresh"),it()):t("get ksosid success")})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}]),e}(),ct=function(t,e){return t>>>e|t<<32-e},ut=function t(e){for(var r,n,o=Math.pow,i=o(2,32),a="length",c="",u=[],s=8*e[a],f=t.h=t.h||[],l=t.k=t.k||[],p=l[a],h={},d=2;p<64;d++)if(!h[d]){for(r=0;r<313;r+=d)h[r]=d;f[p]=o(d,.5)*i|0,l[p++]=o(d,1/3)*i|0}for(e+="";e[a]%64-56;)e+="\0";for(r=0;r<e[a];r++){if((n=e.charCodeAt(r))>>8)return;u[r>>2]|=n<<(3-r)%4*8}for(u[u[a]]=s/i|0,u[u[a]]=s,n=0;n<u[a];){var y=u.slice(n,n+=16),v=f;for(f=f.slice(0,8),r=0;r<64;r++){var g=y[r-15],m=y[r-2],w=f[0],b=f[4],O=f[7]+(ct(b,6)^ct(b,11)^ct(b,25))+(b&f[5]^~b&f[6])+l[r]+(y[r]=r<16?y[r]:y[r-16]+(ct(g,7)^ct(g,18)^g>>>3)+y[r-7]+(ct(m,17)^ct(m,19)^m>>>10)|0);(f=[O+((ct(w,2)^ct(w,13)^ct(w,22))+(w&f[1]^w&f[2]^f[1]&f[2]))|0].concat(f))[4]=f[4]+O|0}for(r=0;r<8;r++)f[r]=f[r]+v[r]|0}for(r=0;r<8;r++)for(n=3;n+1;n--){var E=f[r]>>8*n&255;c+=(E<16?0:"")+E.toString(16)}return c},st="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",ft=function(t){for(var e="",r=0;r<t;r++){var n=Math.floor(66*Math.random());e+=st.charAt(n)}return e},lt=function(t){var e=ut(t),r=new Uint8Array(e.match(/[\da-f]{2}/gi).map((function(t){return parseInt(t,16)})));return pt(r)},pt=function(t){var e=new Uint8Array(t);return ht(String.fromCharCode.apply(null,e))},ht=function(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},dt=function(t,e,n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(c,t);var o=h(c);function c(){var t,e,r;return a(this,c),r=o.call(this),x("_ku")?g((t=p(r),f(c.prototype)),"supportKsosid",!0,t,!0):g((e=p(r),f(c.prototype)),"supportKsosid",!1,e,!0),r}return u(c,[{key:"signPopToken",value:function(t,n){return(e=e||i(r().mark((function t(e,n){var o=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){P(e,"string","method格式错误"),P(n,"string","uri格式错误"),y(f(c.prototype),"checkKsoSid",o).call(o).then((function(e){t("empty")})).catch((function(t){r(t)}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},{key:"generatePKCEParam",value:function(){return(n=n||i(r().mark((function t(){var e,n,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Math.floor(86*Math.random())+43,n=ft(e),o=lt(n),t.abrupt("return",{code_verifier:n,code_challenge:o});case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}]),c}(at),yt=new dt,vt=function(){function t(){a(this,t)}return u(t,[{key:"_checkAndroidInit",value:function(){return new Promise((function(t,e){if(window.ksointernalaccountapi)return t(!0);var r=0,n=setInterval((function(){return r++,window.ksointernalaccountapi?(clearInterval(n),t(!0)):r>15?(clearInterval(n),e(new O(O.ANDRIOD_INIT_FAIL))):void 0}),10)}))}},{key:"_execClientSdk",value:function(t){var e=this,r=t.eventName,n=t.params;return new Promise((function(t,o){e._checkAndroidInit().then((function(){var e=Object.assign({},n,{kwtid:x("kwtid")});window.ksointernalaccountapi[r](e,(function(e){if("ok"===e.result)return t(e.data);var r=e.result,n=e.msg;return o(new O(r,n))}))})).catch((function(t){return o(t)}))}))}},{key:"signPopToken",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x("cv");return new Prom |
|