@cloudbase/js-sdk 2.5.22-beta.0 → 2.5.24-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  import cloudbase from '@cloudbase/app';
2
- import pkg from '../../package.json';
3
- var version = pkg.version;
2
+ import { version } from '@cloudbase/app/package.json';
4
3
  cloudbase.registerVersion(version);
5
4
  try {
6
5
  window.cloudbase = cloudbase;
@@ -8,4 +7,4 @@ try {
8
7
  catch (e) { }
9
8
  export default cloudbase;
10
9
 
11
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sU0FBUyxNQUFNLGdCQUFnQixDQUFDO0FBQ3ZDLE9BQU8sR0FBRyxNQUFNLG9CQUFvQixDQUFDO0FBRzdCLElBQUEsT0FBTyxHQUFLLEdBQUcsUUFBUixDQUFTO0FBQ3hCLFNBQVMsQ0FBQyxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUM7QUFPbkMsSUFBSTtJQUNELE1BQWlCLENBQUMsU0FBUyxHQUFHLFNBQVMsQ0FBQztDQUMxQztBQUFDLE9BQU8sQ0FBQyxFQUFFLEdBQUc7QUFHZixlQUFlLFNBQVMsQ0FBQyIsImZpbGUiOiJpbmRleC5lc20uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY2xvdWRiYXNlIGZyb20gJ0BjbG91ZGJhc2UvYXBwJztcbmltcG9ydCBwa2cgZnJvbSAnLi4vLi4vcGFja2FnZS5qc29uJztcbmltcG9ydCB7IElDbG91ZGJhc2UgfSBmcm9tICdAY2xvdWRiYXNlL3R5cGVzJztcblxuY29uc3QgeyB2ZXJzaW9uIH0gPSBwa2c7XG5jbG91ZGJhc2UucmVnaXN0ZXJWZXJzaW9uKHZlcnNpb24pO1xuXG5kZWN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TogSUNsb3VkYmFzZTtcbiAgfVxufVxudHJ5IHtcbiAgKHdpbmRvdyBhcyBXaW5kb3cpLmNsb3VkYmFzZSA9IGNsb3VkYmFzZTtcbn0gY2F0Y2ggKGUpIHsgfVxuLy8gQHRzLWlnbm9yZVxuZXhwb3J0ID0gY2xvdWRiYXNlO1xuZXhwb3J0IGRlZmF1bHQgY2xvdWRiYXNlOyJdfQ==
package/app/dist/index.js CHANGED
@@ -3,9 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  var app_1 = __importDefault(require("@cloudbase/app"));
6
- var package_json_1 = __importDefault(require("../../package.json"));
7
- var version = package_json_1.default.version;
8
- app_1.default.registerVersion(version);
6
+ var package_json_1 = require("@cloudbase/app/package.json");
7
+ app_1.default.registerVersion(package_json_1.version);
9
8
  try {
10
9
  window.cloudbase = app_1.default;
11
10
  }
@@ -13,6 +12,6 @@ catch (e) { }
13
12
  exports.default = app_1.default;
14
13
  module.exports = app_1.default;
15
14
 
16
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSx1REFBdUM7QUFDdkMsb0VBQXFDO0FBRzdCLElBQUEsT0FBTyxHQUFLLHNCQUFHLFFBQVIsQ0FBUztBQUN4QixhQUFTLENBQUMsZUFBZSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBT25DLElBQUk7SUFDRCxNQUFpQixDQUFDLFNBQVMsR0FBRyxhQUFTLENBQUM7Q0FDMUM7QUFBQyxPQUFPLENBQUMsRUFBRSxHQUFHO0FBR2Ysa0JBQWUsYUFBUyxDQUFDO0FBRHpCLGlCQUFTLGFBQVMsQ0FBQyIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjbG91ZGJhc2Ug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2luZG93IHtcbiAgICBjbG91ZGJhc2U6IElDbG91ZGJhc2U7XG4gIH1cbn1cbnRyeSB7XG4gICh3aW5kb3cgYXMgV2luZG93KS5jbG91ZGJhc2UgPSBjbG91ZGJhc2U7XG59IGNhdGNoIChlKSB7IH1cbi8vIEB0cy1pZ25vcmVcbmV4cG9ydCA9IGNsb3VkYmFzZTtcbmV4cG9ydCBkZWZhdWx0IGNsb3VkYmFzZTsiXX0=
package/app/package.json CHANGED
@@ -2,5 +2,5 @@
2
2
  "name": "@cloudbase/js-sdk/app",
3
3
  "main": "dist/index.js",
4
4
  "module": "dist/index.esm.js",
5
- "typings": "../index.d.ts"
5
+ "typings": "dist/index.d.ts"
6
6
  }
package/dist/index.cjs.js CHANGED
@@ -13,12 +13,12 @@ var package_json_1 = __importDefault(require("../package.json"));
13
13
  var version = package_json_1.default.version;
14
14
  app_1.default.registerVersion(version);
15
15
  try {
16
- auth_1.registerAuth(app_1.default);
17
- functions_1.registerFunctions(app_1.default);
18
- storage_1.registerStorage(app_1.default);
19
- database_1.registerDatabase(app_1.default);
20
- realtime_1.registerRealtime(app_1.default);
21
- analytics_1.registerAnalytics(app_1.default);
16
+ (0, auth_1.registerAuth)(app_1.default);
17
+ (0, functions_1.registerFunctions)(app_1.default);
18
+ (0, storage_1.registerStorage)(app_1.default);
19
+ (0, database_1.registerDatabase)(app_1.default);
20
+ (0, realtime_1.registerRealtime)(app_1.default);
21
+ (0, analytics_1.registerAnalytics)(app_1.default);
22
22
  }
23
23
  catch (e) { }
24
24
  try {
@@ -28,4 +28,4 @@ catch (e) { }
28
28
  exports.default = app_1.default;
29
29
  module.exports = app_1.default;
30
30
 
31
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSx1REFBc0M7QUFDdEMsd0NBQThDO0FBQzlDLGtEQUF3RDtBQUN4R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GJhc2VcbiJdfQ==
package/dist/index.esm.js CHANGED
@@ -23,4 +23,4 @@ try {
23
23
  catch (e) { }
24
24
  export default cloudbase;
25
25
 
26
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sU0FBUyxNQUFNLGdCQUFnQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUM5QyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtBQUN4RCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sb0JBQW9CLENBQUE7QUFDcEQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0scUJBQXFCLENBQUE7QUFDdEQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sc0JBQXNCLENBQUE7QUFFeEQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQ2hELE9BQU8sR0FBRyxNQUFNLGlCQUFpQixDQUFBO0FBSXpCLElBQUEsT0FBTyxHQUFLLEdBQUcsUUFBUixDQUFRO0FBQ3ZCLFNBQVMsQ0FBQyxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUE7QUFFbEMsSUFBSTtJQUNGLFlBQVksQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUN2QixpQkFBaUIsQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUM1QixlQUFlLENBQUMsU0FBUyxDQUFDLENBQUE7SUFDMUIsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLENBQUE7SUFDM0IsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLENBQUE7SUFDM0IsaUJBQWlCLENBQUMsU0FBUyxDQUFDLENBQUE7Q0FDN0I7QUFBQyxPQUFPLENBQUMsRUFBR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3J0IHBrZyBmcm9tICcuLi9wYWNrYWdlLmpzb24nXG5pbXBvcnQgeyBJQ2xvdWRiYXNlIH0gZnJvbSAnQGNsb3VkYmFzZS90eXBlcydcblxuXG5jb25zdCB7IHZlcnNpb24gfSA9IHBrZ1xuY2xvdWRiYXNlLnJlZ2lzdGVyVmVyc2lvbih2ZXJzaW9uKVxuXG50cnkge1xuICByZWdpc3RlckF1dGgoY2xvdWRiYXNlKVxuICByZWdpc3RlckZ1bmN0aW9ucyhjbG91ZGJhc2UpXG4gIHJlZ2lzdGVyU3RvcmFnZShjbG91ZGJhc2UpXG4gIHJlZ2lzdGVyRGF0YWJhc2UoY2xvdWRiYXNlKVxuICByZWdpc3RlclJlYWx0aW1lKGNsb3VkYmFzZSlcbiAgcmVnaXN0ZXJBbmFseXRpY3MoY2xvdWRiYXNlKVxufSBjYXRjaCAoZSkgeyB9XG5cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgaW50ZXJmYWNlIFdpbmRvdyB7XG4gICAgY2xvdWRiYXNlOiBJQ2xvdWRiYXNlO1xuICB9XG59XG50cnkge1xuICAod2luZG93IGFzIFdpbmRvdykuY2xvdWRiYXNlID0gY2xvdWRiYXNlXG59IGNhdGNoIChlKSB7IH1cbi8vIEB0cy1pZ25vcmVcbmV4cG9ydCA9IGNsb3VkYmFzZVxuZXhwb3J0IGRlZmF1bHQgY2xvdWRiYXNlXG4iXX0=
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CloudbaseAdapter } from '@cloudbase/adapter-interface';
2
- import { ICloudbaseUpgradedConfig, ICloudbase } from '@cloudbase/types';
2
+ import { ICloudbaseUpgradedConfig, ICloudbase, Persistence } from '@cloudbase/types';
3
3
  import { authModels } from './oauth/src';
4
4
 
5
5
  type KV<T> = {
@@ -579,7 +579,7 @@ declare namespace cloudbase.auth {
579
579
  * 文档 {@link https://docs.cloudbase.net/api-reference/webv3/authentication#authsigninanonymously}
580
580
  *
581
581
  */
582
- signInAnonymously(data: { provider_token?: string }): Promise<LoginState>
582
+ signInAnonymously(data: { provider_token?: string }): Promise<ILoginState>
583
583
  /**
584
584
  * 设置获取自定义登录 ticket 的函数
585
585
  *
@@ -594,19 +594,19 @@ declare namespace cloudbase.auth {
594
594
  *
595
595
  * 文档 {@link https://docs.cloudbase.net/api-reference/webv3/authentication#authsigninwithcustomticket}
596
596
  */
597
- signInWithCustomTicket(): Promise<LoginState>
597
+ signInWithCustomTicket(): Promise<ILoginState>
598
598
  /**
599
599
  * 用户登录,目前支持手机号,邮箱,用户名密码登录
600
600
  *
601
601
  * 文档 {@link https://docs.cloudbase.net/api-reference/webv3/authentication#authsignin}
602
602
  */
603
- signIn(params: authModels.SignInRequest): Promise<LoginState>
603
+ signIn(params: authModels.SignInRequest): Promise<ILoginState>
604
604
  /**
605
605
  * 用户注册,目前支持手机号验证码注册,邮箱验证码注册
606
606
  *
607
607
  * 文档 {@link https://docs.cloudbase.net/api-reference/webv3/authentication#authsignup}
608
608
  */
609
- signUp(params: authModels.SignUpRequest): Promise<LoginState>
609
+ signUp(params: authModels.SignUpRequest): Promise<ILoginState>
610
610
  /**
611
611
  * 设置密码(已登录状态下,更新用户密码)
612
612
  *
@@ -689,8 +689,8 @@ declare namespace cloudbase.auth {
689
689
  *
690
690
  * 文档 {@link https://docs.cloudbase.net/api-reference/webv3/authentication#authsigninwithprovider}
691
691
  */
692
- signInWithProvider(params: authModels.SignInWithProviderRequest): Promise<LoginState>
693
- grantToken(params: authModels.GrantTokenRequest): Promise<LoginState>
692
+ signInWithProvider(params: authModels.SignInWithProviderRequest): Promise<ILoginState>
693
+ grantToken(params: authModels.GrantTokenRequest): Promise<ILoginState>
694
694
  /**
695
695
  * 生成第三方平台授权 Uri (如微信二维码扫码授权网页)
696
696
  *
@@ -730,7 +730,7 @@ declare namespace cloudbase.auth {
730
730
  loginScope(): Promise<string>
731
731
  loginGroups(): Promise<string[]>
732
732
  onLoginStateChanged(callback: Function)
733
- createLoginState(): Promise<LoginState>
733
+ createLoginState(): Promise<ILoginState>
734
734
  /**
735
735
  * 退出登录,请注意,匿名登录不支持退出
736
736
  *
@@ -796,7 +796,7 @@ declare namespace cloudbase.storage {
796
796
  cloudPath: string;
797
797
  filePath: string;
798
798
  method?: 'post' | 'put';
799
- headers?: KVstring[];
799
+ headers?: KV<string>;
800
800
  onUploadProgress?: Function;
801
801
  }
802
802
  interface ICloudbaseUploadFileResult {
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase_analytics",[],e):"object"==typeof exports?exports.cloudbase_analytics=e():t.cloudbase_analytics=e()}("undefined"!=typeof window?window:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return i})),n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return a})),n.d(e,"h",(function(){return u})),n.d(e,"g",(function(){return f})),n.d(e,"f",(function(){return l}));n(7),n(8),n(5);var r=n(1);function o(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return"string"==typeof t}function c(t,e){return t instanceof e}function s(t){return"[object FormData]"===Object.prototype.toString.call(t)}function a(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+=t+"="+encodeURIComponent(n[t])})),/^http(s)?:\/\//.test(e+=o)?e:""+t+e}function u(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push(n+"="+encodeURIComponent(t[n]))})),e.join("&")}function f(t,e){console.warn("["+Object(r.getSdkName)()+"]["+t+"]:"+e)}function l(t){var e=t.title,n=t.subtitle,r=void 0===n?"":n,o=t.content,i=void 0===o?[]:o,c=t.printTrace,s=void 0!==c&&c,a=t.collapsed;void 0!==a&&a?console.groupCollapsed(e,r):console.group(e,r);for(var u=0,f=i;u<f.length;u++){var l=f[u],p=l.type,d=l.body;switch(p){case"info":console.log(d);break;case"warn":console.warn(d);break;case"error":console.error(d)}}s&&console.trace("stack trace:"),console.groupEnd()}},function(t,e,n){"use strict";n.r(e),n.d(e,"setSdkName",(function(){return r.f})),n.d(e,"getSdkName",(function(){return r.d})),n.d(e,"setProtocol",(function(){return r.e})),n.d(e,"getProtocol",(function(){return r.c})),n.d(e,"IS_DEBUG_MODE",(function(){return r.b})),n.d(e,"COMMUNITY_SITE_URL",(function(){return r.a})),n.d(e,"ERRORS",(function(){return o})),n.d(e,"OATUH_LOGINTYPE",(function(){return i}));var r=n(3),o={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"},i="constants"},function(t,e,n){var r;t.exports=(r=r||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},o=r.lib={},i=o.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},c=o.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var c=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=c<<24-(r+i)%4*8}else for(i=0;i<o;i+=4)e[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],o=function(e){e=e;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return o/=4294967296,(o+=.5)*(t.random()>.5?1:-1)}},i=0;i<e;i+=4){var s=o(4294967296*(n||t.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new c.init(r,e)}}),s=r.enc={},a=s.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new c.init(n,e/2)}},u=s.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new c.init(n,e)}},f=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},l=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),a=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*i,u=t.min(4*a,o);if(a){for(var f=0;f<a;f+=i)this._doProcessBlock(r,f);var l=r.splice(0,a);n.sigBytes-=u}return new c.init(l,u)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),p=(o.Hasher=l.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new p.HMAC.init(t,n).finalize(e)}}}),r.algo={});return r}(Math),r)},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return s})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return f}));var r="@cloudbase/js-sdk";function o(t){r=t}function i(){return r}var c="https:";function s(t){c=t}function a(){return c}var u=!1,f="https://support.qq.com/products/148793"},function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i})),function(t){t.local="local",t.none="none",t.session="session"}(r||(r={}));var o=function(){},i=function(){}},function(t,e,n){var r;t.exports=(r=n(2),r.enc.Utf8)},function(t,e,n){"use strict";(function(t){var e,r=n(4),o=n(0),i=n(1),c=(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)},function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function c(t){try{a(r.next(t))}catch(t){i(t)}}function s(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}a((r=r.apply(t,e||[])).next())}))},a=function(t,e){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return c(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}(r.b);!function(){function e(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,c=t.keys,s=void 0===c?{}:c;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":return e.localStorage?e.localStorage:(Object(o.g)(i.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new u(e.root));case"none":return new u(e.root);default:return e.localStorage?e.localStorage:(Object(o.g)(i.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new u(e.root))}}(this.persistenceTag,this.platformInfo.adapter),this.keys=s)}Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:i.ERRORS.OPERATION_FAIL,msg:"["+Object(i.getSdkName)()+"]["+i.ERRORS.OPERATION_FAIL+"]setStore failed",info:t}))}}else Object(o.g)(i.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},e.prototype.setStoreAsync=function(t,e,n){return s(this,void 0,void 0,(function(){var r;return a(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},e.prototype.getStore=function(e,n){var r;if("async"!==this.mode){try{if(void 0!==t&&(null===(r=t.env)||void 0===r?void 0:r.tcb_token))return t.env.tcb_token;if(!this.storage)return""}catch(t){return""}n=n||"localCachev1";var c=this.storage.getItem(e);return c&&c.indexOf(n)>=0?JSON.parse(c).content:""}Object(o.g)(i.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},e.prototype.getStoreAsync=function(e,n){var r;return s(this,void 0,void 0,(function(){var o;return a(this,(function(i){switch(i.label){case 0:try{if(void 0!==t&&(null===(r=t.env)||void 0===r?void 0:r.tcb_token))return[2,t.env.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return n=n||"localCachev1",[4,this.storage.getItem(e)];case 1:return(o=i.sent())&&o.indexOf(n)>=0?[2,JSON.parse(o).content]:[2,""]}}))}))},e.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):Object(o.g)(i.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},e.prototype.removeStoreAsync=function(t){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))}}()}).call(this,n(12))},function(t,e,n){var r;t.exports=(r=n(2),n(10),n(11),r.HmacSHA256)},function(t,e,n){var r,o,i;t.exports=(i=n(2),o=(r=i).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i<n;i+=3)for(var c=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(c>>>6*(3-s)&63));var a=r.charAt(64);if(a)for(;o.length%4;)o.push(a);return o.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i<n.length;i++)r[n.charCodeAt(i)]=i}var c=n.charAt(64);if(c){var s=t.indexOf(c);-1!==s&&(e=s)}return function(t,e,n){for(var r=[],i=0,c=0;c<e;c++)if(c%4){var s=n[t.charCodeAt(c-1)]<<c%4*2,a=n[t.charCodeAt(c)]>>>6-c%4*2;r[i>>>2]|=(s|a)<<24-i%4*8,i++}return o.create(r,i)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},i.enc.Base64)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnalytics=void 0;var r=n(13);e.registerAnalytics=r.registerAnalytics},function(t,e,n){var r;t.exports=(r=n(2),function(t){var e=r,n=e.lib,o=n.WordArray,i=n.Hasher,c=e.algo,s=[],a=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,o=0;o<64;)e(r)&&(o<8&&(s[o]=n(t.pow(r,.5))),a[o]=n(t.pow(r,1/3)),o++),r++}();var u=[],f=c.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],c=n[3],s=n[4],f=n[5],l=n[6],p=n[7],d=0;d<64;d++){if(d<16)u[d]=0|t[e+d];else{var h=u[d-15],y=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,v=u[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[d]=y+u[d-7]+g+u[d-16]}var b=r&o^r&i^o&i,m=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=p+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&l)+a[d]+u[d];p=l,l=f,f=s,s=c+w|0,c=i,i=o,o=r,r=w+(m+b)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+c|0,n[4]=n[4]+s|0,n[5]=n[5]+f|0,n[6]=n[6]+l|0,n[7]=n[7]+p|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=t.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(f),e.HmacSHA256=i._createHmacHelper(f)}(Math),r.SHA256)},function(t,e,n){var r,o,i,c;t.exports=(r=n(2),i=(o=r).lib.Base,c=o.enc.Utf8,void(o.algo.HMAC=i.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=c.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),i=this._iKey=e.clone(),s=o.words,a=i.words,u=0;u<n;u++)s[u]^=1549556828,a[u]^=909522486;o.sigBytes=i.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(t){r=c}}();var a,u=[],f=!1,l=-1;function p(){f&&a&&(f=!1,a.length?u=a.concat(u):l=-1,u.length&&d())}function d(){if(!f){var t=s(p);f=!0;for(var e=u.length;e;){for(a=u,u=[];++l<e;)a&&a[l].run();l=-1,e=u.length}a=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new h(t,e)),1!==u.length||f||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";n.r(e),n.d(e,"registerAnalytics",(function(){return M}));var r={};n.r(r),n.d(r,"catchErrorsDecorator",(function(){return S}));var o,i,c=n(1),s=n(4),a=n(0),u=n(3),f=(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(){return(l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function c(t){try{a(r.next(t))}catch(t){i(t)}}function s(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}a((r=r.apply(t,e||[])).next())}))},d=function(t,e){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};!function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}f(e,t),e.prototype.get=function(t){return this.request(l(l({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(l(l({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(l(l({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,i=t.headers,c=void 0===i?{}:i,s={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",a=new FormData;return"post"===s?(Object.keys(e).forEach((function(t){a.append(t,e[t])})),a.append("key",r),a.append("file",n),this.request(l(l({},t),{data:a,method:s}),this.restrictedMethods.includes("upload"))):this.request(l(l({},t),{method:"put",headers:c,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return p(this,void 0,void 0,(function(){var e,n,r,o;return d(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(l(l({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,c,s=t.url,f=t.headers,l=void 0===f?{}:f,p=t.data,d=t.responseType,h=t.withCredentials,y=t.body,v=t.onUploadProgress,g=Object(a.a)(Object(u.c)(),s,"get"===r?p:{}),b=new XMLHttpRequest;b.open(r,g),d&&(b.responseType=d),Object.keys(l).forEach((function(t){b.setRequestHeader(t,l[t])})),v&&b.upload.addEventListener("progress",v),b.onreadystatechange=function(){var t={};if(4===b.readyState){var e=b.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=b.status;try{t.data="blob"===d?b.response:JSON.parse(b.responseText)}catch(e){t.data="blob"===d?b.response:b.responseText}clearTimeout(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),b.abort()}),n.timeout)),c=Object(a.c)(p)?p:"application/x-www-form-urlencoded"===l["content-type"]?Object(a.h)(p):y||(p?JSON.stringify(p):void 0),h&&(b.withCredentials=!0),b.send(c)}))}}(s.a);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(i||(i={}));n(6);var h=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],c=0,s=i.length;c<s;c++,o++)r[o]=i[c];return r};var v=function(t,e){this.data=e||null,this.name=t},g=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return h(e,t),e}(v);new(function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(Object(a.d)(t,g))return console.error(t.error),this;var n=Object(a.e)(t)?new v(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,i=this.listeners[r]?y(this.listeners[r]):[];o<i.length;o++){i[o].call(this,n)}}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}());var b=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function c(t){try{a(r.next(t))}catch(t){i(t)}}function s(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}a((r=r.apply(t,e||[])).next())}))},m=function(t,e){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},w=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(w=-1!==navigator.userAgent.indexOf("Firefox"));var _=w?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,O=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function S(t){var e=t.mode,n=void 0===e?"async":e,r=t.customInfo,o=void 0===r?{}:r,i=t.title,s=t.messages,u=void 0===s?[]:s;return function(t,e,r){if(c.IS_DEBUG_MODE){var s=o.className||t.constructor.name,f=o.methodName||e,l=r.value,p=function(t){var e="",n=t.stack.split("\n"),r=n.findIndex((function(t){return _.test(t)}));if(-1!==r){var o=O.exec(n[r+1]||"");e=o?o[0]:""}return e}(new Error);r.value="sync"===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=R({err:new Error,className:s,methodName:f,sourceLink:p});try{return l.apply(this,t)}catch(t){var r=t,o=t.message,c=t.error,d=t.error_description,h={title:i||s+"."+f+" failed",content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var y=JSON.parse(o);h.subtitle=o,y.code&&(n?(n.code=y.code,n.msg=y.msg):(t.code=y.code,t.message=y.msg),r=n||t,h.content=u.map((function(t){return{type:"info",body:t}})))}throw c&&d&&(h.subtitle=d,n?(n.code=c,n.msg=d):(t.code=c,t.message=d),r=n||t,h.content=u.map((function(t){return{type:"info",body:t}}))),Object(a.f)(h),r}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return b(this,void 0,void 0,(function(){var e,n,r,o,c,d,h,y;return m(this,(function(v){switch(v.label){case 0:e=R({err:new Error,className:s,methodName:f,sourceLink:p}),v.label=1;case 1:return v.trys.push([1,3,,4]),[4,l.apply(this,t)];case 2:return[2,v.sent()];case 3:throw n=v.sent(),r=n,o=n.message,c=n.error,d=n.error_description,h={title:i||s+"."+f+" failed",content:[{type:"error",body:n}]},o&&/^\{.*\}$/.test(o)&&(y=JSON.parse(o),h.subtitle=y,y.code&&(e?(e.code=y.code,e.message=y.msg):(n.code=y.code,n.message=y.msg),r=e||n,h.content=u.map((function(t){return{type:"info",body:t}})))),c&&d&&(h.subtitle=d,e?(e.code=c,e.msg=d):(n.code=c,n.message=d),r=e||n,h.content=u.map((function(t){return{type:"info",body:t}}))),Object(a.f)(h),r;case 4:return[2]}}))}))}}}}function R(t){var e=t.err,n=t.className,r=t.methodName,o=t.sourceLink;if(!o)return null;var i,c=e.stack.split("\n"),s=w?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp(n+"\\.descriptor.value\\s*\\[as\\s"+r+"\\]\\s*\\(.*\\)$"),a=w?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp(n+"\\.descriptor.value\\s*\\[as\\s"+r+"\\]"),u=c.findIndex((function(t){return s.test(t)}));if(-1!==u){var f=c.filter((function(t,e){return e>u}));f.unshift(c[u].replace(a,n+"."+r).replace(O,o)),(i=new Error).stack=(w?"@debugger":"Error")+"\n"+f.join("\n")}return i}function A(t){this.message=t}A.prototype=new Error,A.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window);function j(t){this.message=t}j.prototype=new Error,j.prototype.name="InvalidTokenError";var I=function(t,e,n,r){var o,i=arguments.length,c=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(c=(i<3?o(c):i>3?o(e,n,c):o(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},x=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},E=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function c(t){try{a(r.next(t))}catch(t){i(t)}}function s(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}a((r=r.apply(t,e||[])).next())}))},N=function(t,e){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},T=c.ERRORS,k=c.COMMUNITY_SITE_URL,P=r.catchErrorsDecorator,C=["mall"];var L={name:"analytics",entity:{analytics:(new(function(){function t(){}return t.prototype.analytics=function(t){return E(this,void 0,void 0,(function(){var e,n,r;return N(this,(function(o){if(!function(t){if("Object"!==Object.prototype.toString.call(t).slice(8,-1))return!1;var e=t.report_data,n=t.report_type;return!1!==C.includes(n)&&("Object"===Object.prototype.toString.call(e).slice(8,-1)&&(!(void 0!==e.action_time&&!Number.isInteger(e.action_time))&&"string"==typeof e.action_type))}(t))throw new Error(JSON.stringify({code:T.INVALID_PARAMS,msg:"[analytics.analytics] invalid report data"}));return"analytics.report",e=void 0===t.report_data.action_time?Math.floor(Date.now()/1e3):t.report_data.action_time,n={analytics_scene:t.report_type,analytics_data:Object.assign({},t.report_data,{action_time:e})},r={requestData:n},this.request.send("analytics.report",r),[2]}))}))},I([P({customInfo:{className:"Cloudbase",methodName:"analytics"},title:"上报调用失败",messages:["请确认以下各项:"," 1 - 调用 analytics() 的语法或参数是否正确","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+k]}),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",Promise)],t.prototype,"analytics",null),t}())).analytics}};try{cloudbase.registerComponent(L)}catch(A){}function M(t){try{t.registerComponent(L)}catch(t){console.warn(t)}}}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase_analytics",[],e):"object"==typeof exports?exports.cloudbase_analytics=e():t.cloudbase_analytics=e()}("undefined"!=typeof window?window:this,(()=>(()=>{var t={298:function(t,e,n){var r;t.exports=(r=r||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(633)}catch(t){}var o=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},a=s.lib={},c=a.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var s=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=s<<24-(r+i)%4*8}else for(var a=0;a<o;a+=4)e[r+a>>>2]=n[a>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new u.init(e,t)}}),f=s.enc={},l=f.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new u.init(n,e/2)}},p=f.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new u.init(n,e)}},h=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},d=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=h.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,o=r.words,i=r.sigBytes,s=this.blockSize,a=i/(4*s),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,f=t.min(4*c,i);if(c){for(var l=0;l<c;l+=s)this._doProcessBlock(o,l);n=o.splice(0,c),r.sigBytes-=f}return new u.init(n,f)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),y=(a.Hasher=d.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new y.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math),r)},879:function(t,e,n){var r,o,i;t.exports=(r=n(298),i=(o=r).lib.WordArray,o.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i<n;i+=3)for(var s=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a<n;a++)o.push(r.charAt(s>>>6*(3-a)&63));var c=r.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<n.length;o++)r[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}return function(t,e,n){for(var r=[],o=0,s=0;s<e;s++)if(s%4){var a=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;r[o>>>2]|=a<<24-o%4*8,o++}return i.create(r,o)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},939:function(t,e,n){t.exports=n(298).enc.Utf8},171:function(t,e,n){var r;t.exports=(r=n(298),n(624),n(775),r.HmacSHA256)},775:function(t,e,n){var r,o,i;t.exports=(o=(r=n(298)).lib.Base,i=r.enc.Utf8,void(r.algo.HMAC=o.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=i.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),s=this._iKey=e.clone(),a=o.words,c=s.words,u=0;u<n;u++)a[u]^=1549556828,c[u]^=909522486;o.sigBytes=s.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},624:function(t,e,n){var r;t.exports=(r=n(298),function(t){var e=r,n=e.lib,o=n.WordArray,i=n.Hasher,s=e.algo,a=[],c=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,o=0;o<64;)e(r)&&(o<8&&(a[o]=n(t.pow(r,.5))),c[o]=n(t.pow(r,1/3)),o++),r++}();var u=[],f=s.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],s=n[3],a=n[4],f=n[5],l=n[6],p=n[7],h=0;h<64;h++){if(h<16)u[h]=0|t[e+h];else{var d=u[h-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,v=u[h-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[h]=y+u[h-7]+g+u[h-16]}var b=r&o^r&i^o&i,w=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&l)+c[h]+u[h];p=l,l=f,f=a,a=s+m|0,s=i,i=o,o=r,r=m+(w+b)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+f|0,n[6]=n[6]+l|0,n[7]=n[7]+p|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=t.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(f),e.HmacSHA256=i._createHmacHelper(f)}(Math),r.SHA256)},569:(t,e,n)=>{"use strict";n.r(e),n.d(e,{registerAnalytics:()=>R});var r="@cloudbase/js-sdk";function o(){return r}var i,s={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"};!function(t){t.local="local",t.none="none",t.session="session"}(i||(i={}));function a(t,e){console.warn("[".concat(o(),"][").concat(t,"]:").concat(e))}n(171),n(879),n(939);var c,u,f=(c=function(t,e){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},c(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(){return l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},l.apply(this,arguments)};!function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}f(e,t),e.prototype.get=function(t){return this.request(l(l({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(l(l({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(l(l({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,i=t.headers,s=void 0===i?{}:i,a={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",c=new FormData;return"post"===a?(Object.keys(e).forEach((function(t){c.append(t,e[t])})),c.append("key",r),c.append("file",n),this.request(l(l({},t),{data:c,method:a}),this.restrictedMethods.includes("upload"))):this.request(l(l({},t),{method:"put",headers:s,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return e=this,n=void 0,o=function(){var e,n,r,o;return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(l(l({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))},new((r=void 0)||(r=Promise))((function(t,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(s,a)}c((o=o.apply(e,n||[])).next())}));var e,n,r,o},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,s,a,c=t.url,u=t.headers,f=void 0===u?{}:u,l=t.data,p=t.responseType,h=t.withCredentials,d=t.body,y=t.onUploadProgress,v=function(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(n[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)}("https:",c,"get"===r?l:{}),g=new XMLHttpRequest;g.open(r,v),p&&(g.responseType=p),Object.keys(f).forEach((function(t){g.setRequestHeader(t,f[t])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var t={};if(4===g.readyState){var e=g.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=g.status;try{t.data="blob"===p?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===p?g.response:g.responseText}clearTimeout(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),g.abort()}),n.timeout)),a=l,s="[object FormData]"===Object.prototype.toString.call(a)?l:"application/x-www-form-urlencoded"===f["content-type"]?function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push("".concat(n,"=").concat(encodeURIComponent(t[n])))})),e.join("&")}(l):d||(l?JSON.stringify(l):void 0),h&&(g.withCredentials=!0),g.send(s)}))}}((function(){})),function(t){t.WEB="web",t.WX_MP="wx_mp"}(u||(u={}));var p=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},d=function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},y=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return p(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}((function(){}));!function(){function t(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,i=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:(a(s.INVALID_PARAMS,"localStorage is not supported on current platform"),new y(e.root));case"none":return new y(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:s.OPERATION_FAIL,msg:"[".concat(o(),"][").concat(s.OPERATION_FAIL,"]setStore failed"),info:t}))}}else a(s.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,n){return h(this,void 0,void 0,(function(){var r;return d(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return process.env.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var r=this.storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}a(s.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var n;return h(this,void 0,void 0,(function(){var r;return d(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return[2,process.env.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(r=o.sent())&&r.indexOf(e)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):a(s.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return h(this,void 0,void 0,(function(){return d(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))}}();var v=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(t,e){this.data=e||null,this.name=t},b=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return v(e,t),e}(g);new(function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(t instanceof b)return console.error(t.error),this;var n="string"==typeof t?new g(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,i=this.listeners[r]?function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}([],this.listeners[r],!0):[];o<i.length;o++)i[o].call(this,n)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}());"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Firefox");function w(t){this.message=t}function m(t){this.message=t}w.prototype=new Error,w.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),m.prototype=new Error,m.prototype.name="InvalidTokenError";var _=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},O=s,A=function(t){t.mode,t.customInfo,t.title,t.messages;return function(t,e,n){}},S="analytics",I=["mall"],x=new(function(){function t(){}return t.prototype.analytics=function(t){return e=this,n=void 0,o=function(){var e,n,r;return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(o){if(!function(t){if("Object"!==Object.prototype.toString.call(t).slice(8,-1))return!1;var e=t.report_data,n=t.report_type;return!1!==I.includes(n)&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!(void 0!==e.action_time&&!Number.isInteger(e.action_time))&&"string"==typeof e.action_type}(t))throw new Error(JSON.stringify({code:O.INVALID_PARAMS,msg:"[".concat(S,".analytics] invalid report data")}));return e=void 0===t.report_data.action_time?Math.floor(Date.now()/1e3):t.report_data.action_time,n={analytics_scene:t.report_type,analytics_data:Object.assign({},t.report_data,{action_time:e})},r={requestData:n},this.request.send("analytics.report",r),[2]}))},new((r=void 0)||(r=Promise))((function(t,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(s,a)}c((o=o.apply(e,n||[])).next())}));var e,n,r,o},function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);i>3&&s&&Object.defineProperty(e,n,s)}([A({customInfo:{className:"Cloudbase",methodName:"analytics"},title:"上报调用失败",messages:["请确认以下各项:"," 1 - 调用 analytics() 的语法或参数是否正确","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat("https://support.qq.com/products/148793")]}),_("design:type",Function),_("design:paramtypes",[Object]),_("design:returntype",Promise)],t.prototype,"analytics",null),t}()),j={name:S,entity:{analytics:x.analytics}};try{cloudbase.registerComponent(j)}catch(w){}function R(t){try{t.registerComponent(j)}catch(t){console.warn(t)}}},633:()=>{}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.registerAnalytics=void 0;var e=n(569);t.registerAnalytics=e.registerAnalytics})(),r})()));
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase",[],e):"object"==typeof exports?exports.cloudbase=e():t.cloudbase=e()}("undefined"!=typeof window?window:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=12)}([function(t,e,n){"use strict";n.r(e),n.d(e,"isArray",(function(){return f})),n.d(e,"isString",(function(){return l})),n.d(e,"isUndefined",(function(){return p})),n.d(e,"isPalinObject",(function(){return h})),n.d(e,"isNull",(function(){return d})),n.d(e,"isInstanceOf",(function(){return y})),n.d(e,"isFormData",(function(){return v})),n.d(e,"genSeqId",(function(){return g})),n.d(e,"formatUrl",(function(){return m})),n.d(e,"createSign",(function(){return w})),n.d(e,"toQueryString",(function(){return O})),n.d(e,"getQuery",(function(){return _})),n.d(e,"getHash",(function(){return S})),n.d(e,"removeParam",(function(){return E})),n.d(e,"createPromiseCallback",(function(){return A})),n.d(e,"execCallback",(function(){return x})),n.d(e,"printWarn",(function(){return j})),n.d(e,"printError",(function(){return I})),n.d(e,"printInfo",(function(){return P})),n.d(e,"throwError",(function(){return R})),n.d(e,"printGroupLog",(function(){return C})),n.d(e,"sleep",(function(){return k})),n.d(e,"transformPhone",(function(){return N}));var r=n(10),o=n.n(r),i=n(11),a=n.n(i),c=n(7),s=n.n(c),u=n(2);function f(t){return"[object Array]"===Object.prototype.toString.call(t)}function l(t){return"string"==typeof t}function p(t){return void 0===t}function h(t){return"[object Object]"===Object.prototype.toString.call(t)}function d(t){return"[object Null]"===Object.prototype.toString.call(t)}function y(t,e){return t instanceof e}function v(t){return"[object FormData]"===Object.prototype.toString.call(t)}function g(){return Math.random().toString(16).slice(2)}function m(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+=t+"="+encodeURIComponent(n[t])})),/^http(s)?:\/\//.test(e+=o)?e:""+t+e}function b(t){var e=a.a.stringify(t);return e=(e=(e=e.replace(/=+$/,"")).replace(/\+/g,"-")).replace(/\//g,"_")}function w(t,e){var n=b(s.a.parse(JSON.stringify({alg:"HS256",typ:"JWT"})))+"."+b(s.a.parse(JSON.stringify(t)));return n+"."+b(o()(n,e))}function O(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push(n+"="+encodeURIComponent(t[n]))})),e.join("&")}function _(t,e){if("undefined"==typeof window)return!1;var n=e||window.location.search,r=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""}var S=function(t){if("undefined"==typeof window)return"";var e=window.location.hash.match(new RegExp("[#?&/]"+t+"=([^&#]*)"));return e?e[1]:""};function E(t,e){var n=e.split("?")[0],r=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===t&&r.splice(i,1);n=n+"?"+r.join("&")}return n}function A(){var t;if(!Promise){(t=function(){}).promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var n=new Promise((function(e,n){t=function(t,r){return t?n(t):e(r)}}));return t.promise=n,t}function x(t,e,n){if(void 0===n&&(n=null),t&&"function"==typeof t)return t(e,n);if(e)throw e;return n}function j(t,e){console.warn("["+Object(u.getSdkName)()+"]["+t+"]:"+e)}function I(t,e){console.error({code:t,msg:"["+Object(u.getSdkName)()+"]["+t+"]:"+e})}function P(t,e){console.log("["+Object(u.getSdkName)()+"]["+t+"]:"+e)}function R(t,e){throw new Error(JSON.stringify({code:t,msg:"["+Object(u.getSdkName)()+"]["+t+"]:"+e}))}function C(t){var e=t.title,n=t.subtitle,r=void 0===n?"":n,o=t.content,i=void 0===o?[]:o,a=t.printTrace,c=void 0!==a&&a,s=t.collapsed;void 0!==s&&s?console.groupCollapsed(e,r):console.group(e,r);for(var u=0,f=i;u<f.length;u++){var l=f[u],p=l.type,h=l.body;switch(p){case"info":console.log(h);break;case"warn":console.warn(h);break;case"error":console.error(h)}}c&&console.trace("stack trace:"),console.groupEnd()}var k=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))};function N(t){return"+86"+t}},function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return m})),n.d(e,"e",(function(){return u})),n.d(e,"d",(function(){return o}));var r={};n.r(r),n.d(r,"RUNTIME",(function(){return a})),n.d(r,"useAdapters",(function(){return v})),n.d(r,"useDefaultAdapter",(function(){return g}));var o={};n.r(o),n.d(o,"catchErrorsDecorator",(function(){return I}));var i,a,c=n(2),s=n(4),u=n(0),f=n(6),l=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},h=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},d=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},y=function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}return l(e,t),e.prototype.get=function(t){return this.request(p(p({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(p(p({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(p(p({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,i=t.headers,a=void 0===i?{}:i,c={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",s=new FormData;return"post"===c?(Object.keys(e).forEach((function(t){s.append(t,e[t])})),s.append("key",r),s.append("file",n),this.request(p(p({},t),{data:s,method:c}),this.restrictedMethods.includes("upload"))):this.request(p(p({},t),{method:"put",headers:a,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return h(this,void 0,void 0,(function(){var e,n,r,o;return d(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(p(p({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,a,c=t.url,s=t.headers,l=void 0===s?{}:s,p=t.data,h=t.responseType,d=t.withCredentials,y=t.body,v=t.onUploadProgress,g=Object(u.formatUrl)(Object(f.c)(),c,"get"===r?p:{}),m=new XMLHttpRequest;m.open(r,g),h&&(m.responseType=h),Object.keys(l).forEach((function(t){m.setRequestHeader(t,l[t])})),v&&m.upload.addEventListener("progress",v),m.onreadystatechange=function(){var t={};if(4===m.readyState){var e=m.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=m.status;try{t.data="blob"===h?m.response:JSON.parse(m.responseText)}catch(e){t.data="blob"===h?m.response:m.responseText}clearTimeout(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),m.abort()}),n.timeout)),a=Object(u.isFormData)(p)?p:"application/x-www-form-urlencoded"===l["content-type"]?Object(u.toQueryString)(p):y||(p?JSON.stringify(p):void 0),d&&(m.withCredentials=!0),m.send(a)}))},e}(s.a);function v(t){for(var e=0,n=Object(u.isArray)(t)?t:[t];e<n.length;e++){var r=n[e],o=r.isMatch,i=r.genAdapter,a=r.runtime;if(o())return{adapter:i(),runtime:a}}}function g(){return{adapter:{root:window,reqClass:y,wsClass:WebSocket,localStorage:localStorage},runtime:a.WEB}}!function(t){t.WEB="web",t.WX_MP="wx_mp"}(a||(a={}));var m=n(8),b=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r};var O=function(t,e){this.data=e||null,this.name=t},_=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return b(e,t),e}(O);new(function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(Object(u.isInstanceOf)(t,_))return console.error(t.error),this;var n=Object(u.isString)(t)?new O(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,i=this.listeners[r]?w(this.listeners[r]):[];o<i.length;o++){i[o].call(this,n)}}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}());var S=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},E=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},A=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(A=-1!==navigator.userAgent.indexOf("Firefox"));var x=A?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,j=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function I(t){var e=t.mode,n=void 0===e?"async":e,r=t.customInfo,o=void 0===r?{}:r,i=t.title,a=t.messages,s=void 0===a?[]:a;return function(t,e,r){if(c.IS_DEBUG_MODE){var a=o.className||t.constructor.name,f=o.methodName||e,l=r.value,p=function(t){var e="",n=t.stack.split("\n"),r=n.findIndex((function(t){return x.test(t)}));if(-1!==r){var o=j.exec(n[r+1]||"");e=o?o[0]:""}return e}(new Error);r.value="sync"===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=P({err:new Error,className:a,methodName:f,sourceLink:p});try{return l.apply(this,t)}catch(t){var r=t,o=t.message,c=t.error,h=t.error_description,d={title:i||a+"."+f+" failed",content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var y=JSON.parse(o);d.subtitle=o,y.code&&(n?(n.code=y.code,n.msg=y.msg):(t.code=y.code,t.message=y.msg),r=n||t,d.content=s.map((function(t){return{type:"info",body:t}})))}throw c&&h&&(d.subtitle=h,n?(n.code=c,n.msg=h):(t.code=c,t.message=h),r=n||t,d.content=s.map((function(t){return{type:"info",body:t}}))),Object(u.printGroupLog)(d),r}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return S(this,void 0,void 0,(function(){var e,n,r,o,c,h,d,y;return E(this,(function(v){switch(v.label){case 0:e=P({err:new Error,className:a,methodName:f,sourceLink:p}),v.label=1;case 1:return v.trys.push([1,3,,4]),[4,l.apply(this,t)];case 2:return[2,v.sent()];case 3:throw n=v.sent(),r=n,o=n.message,c=n.error,h=n.error_description,d={title:i||a+"."+f+" failed",content:[{type:"error",body:n}]},o&&/^\{.*\}$/.test(o)&&(y=JSON.parse(o),d.subtitle=y,y.code&&(e?(e.code=y.code,e.message=y.msg):(n.code=y.code,n.message=y.msg),r=e||n,d.content=s.map((function(t){return{type:"info",body:t}})))),c&&h&&(d.subtitle=h,e?(e.code=c,e.msg=h):(n.code=c,n.message=h),r=e||n,d.content=s.map((function(t){return{type:"info",body:t}}))),Object(u.printGroupLog)(d),r;case 4:return[2]}}))}))}}}}function P(t){var e=t.err,n=t.className,r=t.methodName,o=t.sourceLink;if(!o)return null;var i,a=e.stack.split("\n"),c=A?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp(n+"\\.descriptor.value\\s*\\[as\\s"+r+"\\]\\s*\\(.*\\)$"),s=A?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp(n+"\\.descriptor.value\\s*\\[as\\s"+r+"\\]"),u=a.findIndex((function(t){return c.test(t)}));if(-1!==u){var f=a.filter((function(t,e){return e>u}));f.unshift(a[u].replace(s,n+"."+r).replace(j,o)),(i=new Error).stack=(A?"@debugger":"Error")+"\n"+f.join("\n")}return i}function R(t){this.message=t}R.prototype=new Error,R.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window);function C(t){this.message=t}C.prototype=new Error,C.prototype.name="InvalidTokenError"},function(t,e,n){"use strict";n.r(e),n.d(e,"setSdkName",(function(){return r.f})),n.d(e,"getSdkName",(function(){return r.d})),n.d(e,"setProtocol",(function(){return r.e})),n.d(e,"getProtocol",(function(){return r.c})),n.d(e,"IS_DEBUG_MODE",(function(){return r.b})),n.d(e,"COMMUNITY_SITE_URL",(function(){return r.a})),n.d(e,"ERRORS",(function(){return o})),n.d(e,"OATUH_LOGINTYPE",(function(){return i}));var r=n(6),o={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"},i="constants"},function(t,e,n){"use strict";(function(t){n.d(e,"i",(function(){return s})),n.d(e,"e",(function(){return u})),n.d(e,"h",(function(){return f})),n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return h})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return g})),n.d(e,"c",(function(){return m})),n.d(e,"b",(function(){return b}));var r=n(1),o=r.c.setSdkName,i=r.c.setProtocol,a="",c="@cloudbase/js-sdk";function s(t){a=t}function u(){return a}function f(t){c=t,o(t)}function l(){return c}var p,h="2020-01-10",d="https:",y="//tcb-api.tencentcloudapi.com/web";function v(t,e){y=t,e&&(d=e,i(e))}function g(t,e,n){v(e?"//"+t+"."+e+".tcb-api.tencentcloudapi.com/web":"//"+t+".ap-shanghai.tcb-api.tencentcloudapi.com/web",n)}function m(){return{BASE_URL:y,PROTOCOL:d}}function b(){var t=m();return(""+t.PROTOCOL+t.BASE_URL).match(/(http(s)?:)?\/\/([^/?#]*)/)[0]}!function(t){t.NULL="NULL",t.ANONYMOUS="ANONYMOUS",t.WECHAT="WECHAT",t.WECHAT_PUBLIC="WECHAT-PUBLIC",t.WECHAT_OPEN="WECHAT-OPEN",t.CUSTOM="CUSTOM",t.EMAIL="EMAIL",t.USERNAME="USERNAME",t.PHONE="PHONE"}(p||(p={}))}).call(this,n(9))},function(t,e,n){"use strict";var r;n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return a})),function(t){t.local="local",t.none="none",t.session="session"}(r||(r={}));var o=function(){},i=function(){};function a(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var i in n)""===o?!r&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}},function(t,e,n){var r;t.exports=(r=r||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},o=r.lib={},i=o.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=o.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||s).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=a<<24-(r+i)%4*8}else for(i=0;i<o;i+=4)e[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],o=function(e){e=e;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return o/=4294967296,(o+=.5)*(t.random()>.5?1:-1)}},i=0;i<e;i+=4){var c=o(4294967296*(n||t.random()));n=987654071*c(),r.push(4294967296*c()|0)}return new a.init(r,e)}}),c=r.enc={},s=c.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new a.init(n,e/2)}},u=c.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new a.init(n,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},l=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,c=o/(4*i),s=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*i,u=t.min(4*s,o);if(s){for(var f=0;f<s;f+=i)this._doProcessBlock(r,f);var l=r.splice(0,s);n.sigBytes-=u}return new a.init(l,u)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),p=(o.Hasher=l.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new p.HMAC.init(t,n).finalize(e)}}}),r.algo={});return r}(Math),r)},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return c})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return f}));var r="@cloudbase/js-sdk";function o(t){r=t}function i(){return r}var a="https:";function c(t){a=t}function s(){return a}var u=!1,f="https://support.qq.com/products/148793"},function(t,e,n){var r;t.exports=(r=n(5),r.enc.Utf8)},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"CloudbaseCache",(function(){return l}));var r,o=n(4),i=n(0),a=n(2),c=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},u=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},f=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return c(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}(o.b);var l=function(){function e(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,c=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":return e.localStorage?e.localStorage:(Object(i.printWarn)(a.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new f(e.root));case"none":return new f(e.root);default:return e.localStorage?e.localStorage:(Object(i.printWarn)(a.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new f(e.root))}}(this.persistenceTag,this.platformInfo.adapter),this.keys=c)}return Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:a.ERRORS.OPERATION_FAIL,msg:"["+Object(a.getSdkName)()+"]["+a.ERRORS.OPERATION_FAIL+"]setStore failed",info:t}))}}else Object(i.printWarn)(a.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},e.prototype.setStoreAsync=function(t,e,n){return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},e.prototype.getStore=function(e,n){var r;if("async"!==this.mode){try{if(void 0!==t&&(null===(r=t.env)||void 0===r?void 0:r.tcb_token))return t.env.tcb_token;if(!this.storage)return""}catch(t){return""}n=n||"localCachev1";var o=this.storage.getItem(e);return o&&o.indexOf(n)>=0?JSON.parse(o).content:""}Object(i.printWarn)(a.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},e.prototype.getStoreAsync=function(e,n){var r;return s(this,void 0,void 0,(function(){var o;return u(this,(function(i){switch(i.label){case 0:try{if(void 0!==t&&(null===(r=t.env)||void 0===r?void 0:r.tcb_token))return[2,t.env.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return n=n||"localCachev1",[4,this.storage.getItem(e)];case 1:return(o=i.sent())&&o.indexOf(n)>=0?[2,JSON.parse(o).content]:[2,""]}}))}))},e.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):Object(i.printWarn)(a.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},e.prototype.removeStoreAsync=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},e}()}.call(this,n(9))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,u=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?u=s.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=c(p);f=!0;for(var e=u.length;e;){for(s=u,u=[];++l<e;)s&&s[l].run();l=-1,e=u.length}s=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||f||c(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){var r;t.exports=(r=n(5),n(15),n(16),r.HmacSHA256)},function(t,e,n){var r,o,i;t.exports=(i=n(5),o=(r=i).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,c=0;c<4&&i+.75*c<n;c++)o.push(r.charAt(a>>>6*(3-c)&63));var s=r.charAt(64);if(s)for(;o.length%4;)o.push(s);return o.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i<n.length;i++)r[n.charCodeAt(i)]=i}var a=n.charAt(64);if(a){var c=t.indexOf(a);-1!==c&&(e=c)}return function(t,e,n){for(var r=[],i=0,a=0;a<e;a++)if(a%4){var c=n[t.charCodeAt(a-1)]<<a%4*2,s=n[t.charCodeAt(a)]>>>6-a%4*2;r[i>>>2]|=(c|s)<<24-i%4*8,i++}return o.create(r,i)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},i.enc.Base64)},function(t,e,n){n(13),t.exports=n(14)},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),c=new A(o||[]);return r(a,"_invoke",{value:O(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var y={};s(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(x([])));g&&g!==e&&n.call(g,i)&&(y=g);var m=d.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var o;r(this,"_invoke",{value:function(r,i){function a(){return new e((function(o,a){!function r(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}(r,i,o,a)}))}return o=o?o.then(a,a):a()}})}function O(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=f(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),l;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,l;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function S(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return h.prototype=d,r(m,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:h,configurable:!0}),h.displayName=s(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),s(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=x,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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,l):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),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=r(n(18)),i=r(n(17)).default.version;o.default.registerVersion(i);try{window.cloudbase=o.default}catch(t){}e.default=o.default,t.exports=o.default},function(t,e,n){var r;t.exports=(r=n(5),function(t){var e=r,n=e.lib,o=n.WordArray,i=n.Hasher,a=e.algo,c=[],s=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,o=0;o<64;)e(r)&&(o<8&&(c[o]=n(t.pow(r,.5))),s[o]=n(t.pow(r,1/3)),o++),r++}();var u=[],f=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],c=n[4],f=n[5],l=n[6],p=n[7],h=0;h<64;h++){if(h<16)u[h]=0|t[e+h];else{var d=u[h-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,v=u[h-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[h]=y+u[h-7]+g+u[h-16]}var m=r&o^r&i^o&i,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=p+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&f^~c&l)+s[h]+u[h];p=l,l=f,f=c,c=a+w|0,a=i,i=o,o=r,r=w+(b+m)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0,n[5]=n[5]+f|0,n[6]=n[6]+l|0,n[7]=n[7]+p|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=t.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(f),e.HmacSHA256=i._createHmacHelper(f)}(Math),r.SHA256)},function(t,e,n){var r,o,i,a;t.exports=(r=n(5),i=(o=r).lib.Base,a=o.enc.Utf8,void(o.algo.HMAC=i.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=a.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),i=this._iKey=e.clone(),c=o.words,s=i.words,u=0;u<n;u++)c[u]^=1549556828,s[u]^=909522486;o.sigBytes=i.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},function(t){t.exports=JSON.parse('{"version":"2.5.22-beta.0"}')},function(t,e,n){"use strict";n.r(e),n.d(e,"getBaseEndPoint",(function(){return A.b})),n.d(e,"cloudbase",(function(){return X}));var r,o=n(1),i=n(4),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},u=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};var f=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n._timeout=r||0,n._timeoutMsg=o||"请求超时",n._restrictedMethods=i||["get","post","upload","download"],n}return a(e,t),e.prototype.post=function(t){var e=this;return new Promise((function(n,r){var o=t.url,a=t.data,c=t.headers,s=wx.request({url:Object(i.d)("https:",o),data:a,timeout:e._timeout,method:"POST",header:c,success:function(t){n(t)},fail:function(t){r(t)},complete:function(t){if(t&&t.errMsg&&(e._timeout&&-1!==e._restrictedMethods.indexOf("post")&&"request:fail timeout"===t.errMsg)){console.warn(e._timeoutMsg);try{s.abort()}catch(t){}}}})}))},e.prototype.upload=function(t){var e=this,n=this;return new Promise((function(r){return s(e,void 0,void 0,(function(){var e,o,i,a,s,f;return u(this,(function(u){return e=t.url,o=t.file,i=t.data,a=t.headers,s=t.onUploadProgress,f=wx.uploadFile({url:e,filePath:o,name:"file",formData:c({},i),header:a,timeout:this._timeout,success:function(t){var e={statusCode:t.statusCode,data:t.data||{}};200===t.statusCode&&i.success_action_status&&(e.statusCode=parseInt(i.success_action_status,10)),r(e)},fail:function(t){r(t)},complete:function(t){if(t&&t.errMsg&&(n._timeout&&-1!==n._restrictedMethods.indexOf("upload")&&"request:fail timeout"===t.errMsg)){console.warn(n._timeoutMsg);try{f.abort()}catch(t){}}}}),s&&f.onProgressUpdate((function(t){s(t)})),[2]}))}))}))},e.prototype.download=function(t){var e=this,n=this;return new Promise((function(r,o){var a=t.url,c=t.headers,s=wx.downloadFile({url:Object(i.d)("https:",a),header:c,timeout:e._timeout,success:function(t){200===t.statusCode&&t.tempFilePath?r({statusCode:200,tempFilePath:t.tempFilePath}):r(t)},fail:function(t){o(t)},complete:function(t){if(t&&t.errMsg&&(n._timeout&&-1!==n._restrictedMethods.indexOf("download")&&"request:fail timeout"===t.errMsg)){console.warn(n._timeoutMsg);try{s.abort()}catch(t){}}}})}))},e}(i.a),l={setItem:function(t,e){wx.setStorageSync(t,e)},getItem:function(t){return wx.getStorageSync(t)},removeItem:function(t){wx.removeStorageSync(t)},clear:function(){wx.clearStorageSync()}},p=function(t,e){void 0===e&&(e={});var n=wx.connectSocket(c({url:t},e));return{set onopen(t){n.onOpen(t)},set onmessage(t){n.onMessage(t)},set onclose(t){n.onClose(t)},set onerror(t){n.onError(t)},send:function(t){return n.send({data:t})},close:function(t,e){return n.close({code:t,reason:e})},get readyState(){return n.readyState},CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3}};var h={genAdapter:function(){return{root:{},reqClass:f,wsClass:p,localStorage:l,primaryStorage:i.c.local,getAppSign:function(){var t=wx.getAccountInfoSync();return"undefined"!=typeof App||"undefined"!=typeof getApp||wx.onAppHide||wx.offAppHide||wx.onAppShow||wx.offAppShow?t&&t.miniProgram?t.miniProgram.appId:"":t&&t.plugin?t.plugin.appId:""}}},isMatch:function(){if("undefined"==typeof wx)return!1;if("undefined"==typeof Page)return!1;if(!wx.getSystemInfoSync)return!1;if(!wx.getStorageSync)return!1;if(!wx.setStorageSync)return!1;if(!wx.connectSocket)return!1;if(!wx.request)return!1;try{if(!wx.getSystemInfoSync())return!1;if("qq"===wx.getSystemInfoSync().AppPlatform)return!1}catch(t){return!1}return!0},runtime:"wx_mp"},d=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r},y=o.c.ERRORS,v={};function g(t,e){var n=e.name,r=e.namespace,o=e.entity,i=e.injectEvents,a=e.IIFE,c=void 0!==a&&a;if(v[n]||r&&t[r])throw new Error(JSON.stringify({code:y.INVALID_OPERATION,msg:"Duplicate component "+n}));if(c){if(!o||"function"!=typeof o)throw new Error(JSON.stringify({code:y.INVALID_PARAMS,msg:"IIFE component's entity must be a function"}));o.call(t)}if(v[n]=e,r?t.prototype[r]=o:function t(e,n){if(!(n instanceof Object))return n;switch(n.constructor){case Date:return new Date(n.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return n}for(var r=Object.keys(n),o=0,i=r;o<i.length;o++){var a=i[o];Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=t(e[a],n[a]))}return e}(t.prototype,o),i){var s=i.bus,u=i.events;if(!s||!u||0===u.length)return;var f=t.prototype.fire||function(){};t.prototype.events||(t.prototype.events={}),(t.prototype.events||{})[n]?t.prototype.events[n].events=d(t.prototype.events[n].events,u):t.prototype.events[n]={bus:s,events:u},t.prototype.fire=function(t,e){f(t,e);for(var n=0,r=Object.keys(this.events);n<r.length;n++){var o=r[n],i=this.events[o],a=i.bus;if(i.events.includes(t)){a.fire(t,e);break}}}}}var m={},b=function(){return(b=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},w=o.b.CloudbaseCache,O={},_={};function S(t){var e=t.env,n=t.platformInfo,r={userInfoKey:"user_info_"+e};O[e]=O[e]||new w(b(b({},t),{keys:r,platformInfo:n})),_[e]=_[e]||new w(b(b({},t),{keys:r,platformInfo:n,persistence:"local"}))}function E(t){return _[t]}var A=n(3),x=function(){return(x=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},j=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},I=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},P=o.c.ERRORS,R=o.e.genSeqId,C=o.e.isFormData,k=o.e.formatUrl,N=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"];function T(t,e,n){var r=t[e];t[e]=function(e){var o={},i={};n.forEach((function(n){var r=n.call(t,e),a=r.data,c=r.headers;Object.assign(o,a),Object.assign(i,c)}));var a=e.data;return a&&(C(a)?Object.keys(o).forEach((function(t){a.append(t,o[t])})):e.data=x(x({},a),o)),e.headers=x(x({},e.headers||{}),i),r.call(t,e)}}function L(){var t=R();return{data:{seqId:t},headers:{"X-SDK-Version":"@cloudbase/js-sdk/"+Object(A.e)(),"x-seqid":t}}}var M=function(){function t(t){this.throwWhenRequestFail=!1,this.config=t;var e={timeout:this.config.timeout,timeoutMsg:"[@cloudbase/js-sdk] 请求在"+this.config.timeout/1e3+"s内未完成,已中断",restrictedMethods:["post","put"]};this.reqClass=new m.adapter.reqClass(e),this.throwWhenRequestFail=t.throw||!1,this.localCache=E(this.config.env),T(this.reqClass,"post",[L]),T(this.reqClass,"upload",[L]),T(this.reqClass,"download",[L])}return t.prototype.post=function(t){return j(this,void 0,void 0,(function(){return I(this,(function(e){switch(e.label){case 0:return[4,this.reqClass.post(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.upload=function(t){return j(this,void 0,void 0,(function(){return I(this,(function(e){switch(e.label){case 0:return[4,this.reqClass.upload(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.download=function(t){return j(this,void 0,void 0,(function(){return I(this,(function(e){switch(e.label){case 0:return[4,this.reqClass.download(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getBaseEndPoint=function(){return Object(A.b)()},t.prototype.getOauthAccessTokenV2=function(t){return j(this,void 0,void 0,(function(){var e,n;return I(this,(function(r){switch(r.label){case 0:return[4,t.getAccessToken()];case 1:return e=r.sent(),[4,t.getCredentials()];case 2:return n=r.sent(),[2,{accessToken:e,accessTokenExpire:new Date(n.expires_at).getTime()}]}}))}))},t.prototype.request=function(t,e,n){var r;return j(this,void 0,void 0,(function(){var o,i,a,c,s,u,f,l,p,h,d,y,v,g,m,b,w,O,_,S;return I(this,(function(E){switch(E.label){case 0:if(o="x-tcb-trace_"+this.config.env,i="application/x-www-form-urlencoded",a=x({action:t,dataVersion:A.a,env:this.config.env},e),-1!==N.indexOf(t))return[3,2];if(!(c=this.config._fromApp).oauthInstance)throw new Error("you can't request without auth");return s=c.oauthInstance,u=s.oauth2client,f=a,[4,this.getOauthAccessTokenV2(u)];case 1:f.access_token=E.sent().accessToken,E.label=2;case 2:return"storage.uploadFile"===t?(l=new FormData,Object.keys(l).forEach((function(t){Object.prototype.hasOwnProperty.call(l,t)&&void 0!==l[t]&&l.append(t,a[t])})),i="multipart/form-data"):(i="application/json;charset=UTF-8",l={},Object.keys(a).forEach((function(t){void 0!==a[t]&&(l[t]=a[t])}))),p={headers:{"content-type":i}},(null==n?void 0:n.onUploadProgress)&&(p.onUploadProgress=n.onUploadProgress),this.config.region&&(p.headers["X-TCB-Region"]=this.config.region),(h=this.localCache.getStore(o))&&(p.headers["X-TCB-Trace"]=h),d=e.parse,y=e.inQuery,v=e.search,g={env:this.config.env},d&&(g.parse=!0),y&&(g=x(x({},y),g)),m=Object(A.c)(),b=m.BASE_URL,w=m.PROTOCOL,O=k(w,b,g),v&&(O+=v),[4,this.post(x({url:O,data:l},p))];case 3:if(_=E.sent(),(S=null===(r=_.header)||void 0===r?void 0:r["x-tcb-trace"])&&this.localCache.setStore(o,S),200!==Number(_.status)&&200!==Number(_.statusCode)||!_.data)throw new Error("network request error");return[2,_]}}))}))},t.prototype.send=function(t,e){return void 0===e&&(e={}),j(this,void 0,void 0,(function(){var n;return I(this,(function(r){switch(r.label){case 0:return[4,this.request(t,e,{onUploadProgress:e.onUploadProgress})];case 1:if((n=r.sent()).data.code&&this.throwWhenRequestFail)throw new Error(JSON.stringify({code:P.OPERATION_FAIL,msg:"["+n.data.code+"] "+n.data.message}));return[2,n.data]}}))}))},t}(),U={};var D=function(){return(D=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},B=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},q=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},F=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},H=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},W=o.a.useAdapters,V=o.a.useDefaultAdapter,G=o.c.ERRORS,J=o.c.COMMUNITY_SITE_URL,z=o.e.printWarn,$=o.d.catchErrorsDecorator,K={timeout:15e3,persistence:"local"},Y={},X=new(function(){function t(t){this.cloudbaseConfig=t||this.cloudbaseConfig,this.authInstance=null,this.oauthInstance=null}return Object.defineProperty(t.prototype,"config",{get:function(){return this.cloudbaseConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"platform",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cache",{get:function(){return t=this.cloudbaseConfig.env,O[t];var t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localCache",{get:function(){return E(this.cloudbaseConfig.env)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"request",{get:function(){return t=this.cloudbaseConfig.env,U[t];var t},enumerable:!1,configurable:!0}),t.prototype.init=function(e){if(!e.env)throw new Error(JSON.stringify({code:G.INVALID_PARAMS,msg:"env must not be specified"}));m.adapter||this.useDefaultAdapter();var n={timeout:e.timeout||5e3,timeoutMsg:"["+Object(A.d)()+"][REQUEST TIMEOUT] request had been abort since didn't finished within"+e.timeout/1e3+"s"};this.requestClient=new m.adapter.reqClass(n),this.cloudbaseConfig=D(D({},K),e),this.cloudbaseConfig.timeout=this.formatTimeout(this.cloudbaseConfig.timeout);var r=this.cloudbaseConfig,o=r.env,i=r.persistence,a=r.debug,c=r.timeout,s=r.oauthClient;S({env:o,persistence:i,debug:a,platformInfo:this.platform}),Object(A.g)(o,e.region||"");var u=new t(this.cloudbaseConfig);return function(t){U[t.env]=new M(x(x({},t),{throw:!0}))}({env:o,region:e.region||"",timeout:c,oauthClient:s,_fromApp:u}),u.requestClient=this.requestClient,u},t.prototype.updateConfig=function(t){var e=t.persistence,n=t.debug;this.cloudbaseConfig.persistence=e,this.cloudbaseConfig.debug=n,S({env:this.cloudbaseConfig.env,persistence:e,debug:n,platformInfo:this.platform})},t.prototype.registerExtension=function(t){Y[t.name]=t},t.prototype.invokeExtension=function(t,e){return F(this,void 0,void 0,(function(){var n;return H(this,(function(r){switch(r.label){case 0:if(!(n=Y[t]))throw new Error(JSON.stringify({code:G.INVALID_PARAMS,msg:"extension:"+t+" must be registered before invoke"}));return[4,n.invoke(e,this)];case 1:return[2,r.sent()]}}))}))},t.prototype.useAdapters=function(t){var e=W(t)||{},n=e.adapter,r=e.runtime;n&&(m.adapter=n),r&&(m.runtime=r)},t.prototype.registerHook=function(e){!function(t,e){var n=e.entity,r=e.target;if(Object.prototype.hasOwnProperty.call(t,r))throw new Error(JSON.stringify({code:y.INVALID_OPERATION,msg:"target:"+r+" is not exist"}));var o=t.prototype[r];if("function"!=typeof o)throw new Error(JSON.stringify({code:y.INVALID_OPERATION,msg:"target:"+r+" is not a function which is the only type supports hook"}));t.prototype[r]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.call.apply(n,d([this],t)),o.call.apply(o,d([this],t))}}(t,e)},t.prototype.registerComponent=function(e){g(t,e)},t.prototype.registerVersion=function(t){Object(A.i)(t)},t.prototype.registerSdkName=function(t){Object(A.h)(t)},t.prototype.registerEndPoint=function(t,e){Object(A.f)(t,e)},t.prototype.useDefaultAdapter=function(){var t=V(),e=t.adapter,n=t.runtime;m.adapter=e,m.runtime=n},t.prototype.formatTimeout=function(t){switch(!0){case t>6e5:return z(G.INVALID_PARAMS,"timeout is greater than maximum value[10min]"),6e5;case t<100:return z(G.INVALID_PARAMS,"timeout is less than maximum value[100ms]"),100;default:return t}},B([$({mode:"sync",title:"Cloudbase 初始化失败",messages:["请确认以下各项:"," 1 - 调用 cloudbase.init() 的语法或参数是否正确"," 2 - 如果是非浏览器环境,是否配置了安全应用来源(https://docs.cloudbase.net/api-reference/webv3/adapter#%E7%AC%AC-2-%E6%AD%A5%E9%85%8D%E7%BD%AE%E5%AE%89%E5%85%A8%E5%BA%94%E7%94%A8%E6%9D%A5%E6%BA%90)","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+J]}),q("design:type",Function),q("design:paramtypes",[Object]),q("design:returntype",t)],t.prototype,"init",null),B([$({title:"调用扩展能力失败",messages:["请确认以下各项:"," 1 - 调用 invokeExtension() 的语法或参数是否正确"," 2 - 被调用的扩展能力是否已经安装并通过 registerExtension() 注册","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+J]}),q("design:type",Function),q("design:paramtypes",[String,Object]),q("design:returntype",Promise)],t.prototype,"invokeExtension",null),t}());X.useAdapters(h);e.default=X}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase",[],e):"object"==typeof exports?exports.cloudbase=e():t.cloudbase=e()}("undefined"!=typeof window?window:this,(function(){return function(){var t={313:function(t,e,n){"use strict";var r=(this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}})(n(227)),o=n(878);r.default.registerVersion(o.version);try{window.cloudbase=r.default}catch(t){}e.default=r.default,t.exports=r.default},227:function(t,e,n){"use strict";n.r(e),n.d(e,{cloudbase:function(){return St},default:function(){return Et},getBaseEndPoint:function(){return et}});var r="@cloudbase/js-sdk";function o(){return r}var i,a="https:",s={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"};!function(t){t.local="local",t.none="none",t.session="session"}(i||(i={}));var c=function(){};function u(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var i in n)""===o?!r&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}function f(t){return"[object FormData]"===Object.prototype.toString.call(t)}function l(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(n[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)}function p(t,e){console.warn("[".concat(o(),"][").concat(t,"]:").concat(e))}n(61),n(139),n(307);var h,d,y=(h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},h(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),v=function(){return v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},v.apply(this,arguments)},g=function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}return y(e,t),e.prototype.get=function(t){return this.request(v(v({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(v(v({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(v(v({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,i=t.headers,a=void 0===i?{}:i,s={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",c=new FormData;return"post"===s?(Object.keys(e).forEach((function(t){c.append(t,e[t])})),c.append("key",r),c.append("file",n),this.request(v(v({},t),{data:c,method:s}),this.restrictedMethods.includes("upload"))):this.request(v(v({},t),{method:"put",headers:a,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return e=this,n=void 0,o=function(){var e,n,r,o;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(v(v({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))},new((r=void 0)||(r=Promise))((function(t,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,s)}c((o=o.apply(e,n||[])).next())}));var e,n,r,o},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,s,c=t.url,u=t.headers,p=void 0===u?{}:u,h=t.data,d=t.responseType,y=t.withCredentials,v=t.body,g=t.onUploadProgress,m=l(a,c,"get"===r?h:{}),w=new XMLHttpRequest;w.open(r,m),d&&(w.responseType=d),Object.keys(p).forEach((function(t){w.setRequestHeader(t,p[t])})),g&&w.upload.addEventListener("progress",g),w.onreadystatechange=function(){var t={};if(4===w.readyState){var e=w.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=w.status;try{t.data="blob"===d?w.response:JSON.parse(w.responseText)}catch(e){t.data="blob"===d?w.response:w.responseText}clearTimeout(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),w.abort()}),n.timeout)),s=f(h)?h:"application/x-www-form-urlencoded"===p["content-type"]?function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push("".concat(n,"=").concat(encodeURIComponent(t[n])))})),e.join("&")}(h):v||(h?JSON.stringify(h):void 0),y&&(w.withCredentials=!0),w.send(s)}))},e}(c);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(d||(d={}));var m=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},b=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},O=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return m(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}((function(){})),_=function(){function t(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,i=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:(p(s.INVALID_PARAMS,"localStorage is not supported on current platform"),new O(e.root));case"none":return new O(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}return Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:s.OPERATION_FAIL,msg:"[".concat(o(),"][").concat(s.OPERATION_FAIL,"]setStore failed"),info:t}))}}else p(s.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,n){return w(this,void 0,void 0,(function(){var r;return b(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return process.env.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var r=this.storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}p(s.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var n;return w(this,void 0,void 0,(function(){var r;return b(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return[2,process.env.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(r=o.sent())&&r.indexOf(e)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):p(s.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return w(this,void 0,void 0,(function(){return b(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},t}(),A=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(t,e){this.data=e||null,this.name=t},S=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return A(e,t),e}(x);new(function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(t instanceof S)return console.error(t.error),this;var n="string"==typeof t?new x(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,i=this.listeners[r]?function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}([],this.listeners[r],!0):[];o<i.length;o++)i[o].call(this,n)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}());"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Firefox");function E(t){this.message=t}function I(t){this.message=t}E.prototype=new Error,E.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),I.prototype=new Error,I.prototype.name="InvalidTokenError";var C=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return P=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},P.apply(this,arguments)},j=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n._timeout=r||0,n._timeoutMsg=o||"请求超时",n._restrictedMethods=i||["get","post","upload","download"],n}return C(e,t),e.prototype.post=function(t){var e=this;return new Promise((function(n,r){var o=t.url,i=t.data,a=t.headers,s=wx.request({url:u("https:",o),data:i,timeout:e._timeout,method:"POST",header:a,success:function(t){n(t)},fail:function(t){r(t)},complete:function(t){if(t&&t.errMsg&&e._timeout&&-1!==e._restrictedMethods.indexOf("post")&&"request:fail timeout"===t.errMsg){console.warn(e._timeoutMsg);try{s.abort()}catch(t){}}}})}))},e.prototype.upload=function(t){var e=this,n=this;return new Promise((function(r){return o=e,i=void 0,s=function(){var e,o,i,a,s,c;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(u){return e=t.url,o=t.file,i=t.data,a=t.headers,s=t.onUploadProgress,c=wx.uploadFile({url:e,filePath:o,name:"file",formData:P({},i),header:a,timeout:this._timeout,success:function(t){var e={statusCode:t.statusCode,data:t.data||{}};200===t.statusCode&&i.success_action_status&&(e.statusCode=parseInt(i.success_action_status,10)),r(e)},fail:function(t){r(t)},complete:function(t){if(t&&t.errMsg&&n._timeout&&-1!==n._restrictedMethods.indexOf("upload")&&"request:fail timeout"===t.errMsg){console.warn(n._timeoutMsg);try{c.abort()}catch(t){}}}}),s&&c.onProgressUpdate((function(t){s(t)})),[2]}))},new((a=void 0)||(a=Promise))((function(t,e){function n(t){try{c(s.next(t))}catch(t){e(t)}}function r(t){try{c(s.throw(t))}catch(t){e(t)}}function c(e){var o;e.done?t(e.value):(o=e.value,o instanceof a?o:new a((function(t){t(o)}))).then(n,r)}c((s=s.apply(o,i||[])).next())}));var o,i,a,s}))},e.prototype.download=function(t){var e=this,n=this;return new Promise((function(r,o){var i=t.url,a=t.headers,s=wx.downloadFile({url:u("https:",i),header:a,timeout:e._timeout,success:function(t){200===t.statusCode&&t.tempFilePath?r({statusCode:200,tempFilePath:t.tempFilePath}):r(t)},fail:function(t){o(t)},complete:function(t){if(t&&t.errMsg&&n._timeout&&-1!==n._restrictedMethods.indexOf("download")&&"request:fail timeout"===t.errMsg){console.warn(n._timeoutMsg);try{s.abort()}catch(t){}}}})}))},e}(c),k={setItem:function(t,e){wx.setStorageSync(t,e)},getItem:function(t){return wx.getStorageSync(t)},removeItem:function(t){wx.removeStorageSync(t)},clear:function(){wx.clearStorageSync()}},T=function(t,e){void 0===e&&(e={});var n=wx.connectSocket(P({url:t},e));return{set onopen(t){n.onOpen(t)},set onmessage(t){n.onMessage(t)},set onclose(t){n.onClose(t)},set onerror(t){n.onError(t)},send:function(t){return n.send({data:t})},close:function(t,e){return n.close({code:t,reason:e})},get readyState(){return n.readyState},CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3}},N={genAdapter:function(){return{root:{},reqClass:j,wsClass:T,localStorage:k,primaryStorage:i.local,getAppSign:function(){var t=wx.getAccountInfoSync();return"undefined"!=typeof App||"undefined"!=typeof getApp||wx.onAppHide||wx.offAppHide||wx.onAppShow||wx.offAppShow?t&&t.miniProgram?t.miniProgram.appId:"":t&&t.plugin?t.plugin.appId:""}}},isMatch:function(){if("undefined"==typeof wx)return!1;if("undefined"==typeof Page)return!1;if(!wx.getSystemInfoSync)return!1;if(!wx.getStorageSync)return!1;if(!wx.setStorageSync)return!1;if(!wx.connectSocket)return!1;if(!wx.request)return!1;try{if(!wx.getSystemInfoSync())return!1;if("qq"===wx.getSystemInfoSync().AppPlatform)return!1}catch(t){return!1}return!0},runtime:"wx_mp"},L=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},R=s,M={};function B(t,e){var n=e.name,r=e.namespace,o=e.entity,i=e.injectEvents,a=e.IIFE,s=void 0!==a&&a;if(M[n]||r&&t[r])throw new Error(JSON.stringify({code:R.INVALID_OPERATION,msg:"Duplicate component ".concat(n)}));if(s){if(!o||"function"!=typeof o)throw new Error(JSON.stringify({code:R.INVALID_PARAMS,msg:"IIFE component's entity must be a function"}));o.call(t)}if(M[n]=e,r?t.prototype[r]=o:U(t.prototype,o),i){var c=i.bus,u=i.events;if(!c||!u||0===u.length)return;var f=t.prototype.fire||function(){};t.prototype.events||(t.prototype.events={}),(t.prototype.events||{})[n]?t.prototype.events[n].events=L(L([],t.prototype.events[n].events,!0),u,!0):t.prototype.events[n]={bus:c,events:u},t.prototype.fire=function(t,e){f(t,e);for(var n=0,r=Object.keys(this.events);n<r.length;n++){var o=r[n],i=this.events[o],a=i.bus;if(i.events.includes(t)){a.fire(t,e);break}}}}}function U(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=U(t[o],e[o]))}return t}var q={},D=function(){return D=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},D.apply(this,arguments)},F="user_info",H=_,V={},W={};function J(t){var e=t.env,n=t.platformInfo,r={userInfoKey:"".concat(F,"_").concat(e)};V[e]=V[e]||new H(D(D({},t),{keys:r,platformInfo:n})),W[e]=W[e]||new H(D(D({},t),{keys:r,platformInfo:n,persistence:"local"}))}function G(t){return W[t]}var z,K=function(t){a=t},X="",Y="@cloudbase/js-sdk",Q="https:",$="//tcb-api.tencentcloudapi.com/web";function Z(t,e){$=t,e&&(Q=e,K(e))}function tt(){return{BASE_URL:$,PROTOCOL:Q}}function et(){var t=tt(),e=t.PROTOCOL,n=t.BASE_URL;return"".concat(e).concat(n).match(/(http(s)?:)?\/\/([^/?#]*)/)[0]}!function(t){t.NULL="NULL",t.ANONYMOUS="ANONYMOUS",t.WECHAT="WECHAT",t.WECHAT_PUBLIC="WECHAT-PUBLIC",t.WECHAT_OPEN="WECHAT-OPEN",t.CUSTOM="CUSTOM",t.EMAIL="EMAIL",t.USERNAME="USERNAME",t.PHONE="PHONE"}(z||(z={}));var nt=function(){return nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},nt.apply(this,arguments)},rt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},ot=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},it=s,at=function(){return Math.random().toString(16).slice(2)},st=f,ct=l,ut=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"];function ft(t,e,n){var r=t[e];t[e]=function(e){var o={},i={};n.forEach((function(n){var r=n.call(t,e),a=r.data,s=r.headers;Object.assign(o,a),Object.assign(i,s)}));var a=e.data;return a&&(st(a)?Object.keys(o).forEach((function(t){a.append(t,o[t])})):e.data=nt(nt({},a),o)),e.headers=nt(nt({},e.headers||{}),i),r.call(t,e)}}function lt(){var t=at();return{data:{seqId:t},headers:{"X-SDK-Version":"@cloudbase/js-sdk/".concat(X),"x-seqid":t}}}var pt=function(){function t(t){this.throwWhenRequestFail=!1,this.config=t;var e={timeout:this.config.timeout,timeoutMsg:"[@cloudbase/js-sdk] 请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post","put"]};this.reqClass=new q.adapter.reqClass(e),this.throwWhenRequestFail=t.throw||!1,this.localCache=G(this.config.env),ft(this.reqClass,"post",[lt]),ft(this.reqClass,"upload",[lt]),ft(this.reqClass,"download",[lt])}return t.prototype.post=function(t){return rt(this,void 0,void 0,(function(){return ot(this,(function(e){switch(e.label){case 0:return[4,this.reqClass.post(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.upload=function(t){return rt(this,void 0,void 0,(function(){return ot(this,(function(e){switch(e.label){case 0:return[4,this.reqClass.upload(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.download=function(t){return rt(this,void 0,void 0,(function(){return ot(this,(function(e){switch(e.label){case 0:return[4,this.reqClass.download(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getBaseEndPoint=function(){return et()},t.prototype.getOauthAccessTokenV2=function(t){return rt(this,void 0,void 0,(function(){var e,n;return ot(this,(function(r){switch(r.label){case 0:return[4,t.getAccessToken()];case 1:return e=r.sent(),[4,t.getCredentials()];case 2:return n=r.sent(),[2,{accessToken:e,accessTokenExpire:new Date(n.expires_at).getTime()}]}}))}))},t.prototype.request=function(t,e,n){var r;return rt(this,void 0,void 0,(function(){var o,i,a,s,c,u,f,l,p,h,d,y,v,g,m,w,b,O,_,A;return ot(this,(function(x){switch(x.label){case 0:if(o="x-tcb-trace_".concat(this.config.env),i="application/x-www-form-urlencoded",a=nt({action:t,dataVersion:"2020-01-10",env:this.config.env},e),-1!==ut.indexOf(t))return[3,2];if(!(s=this.config._fromApp).oauthInstance)throw new Error("you can't request without auth");return c=s.oauthInstance,u=c.oauth2client,f=a,[4,this.getOauthAccessTokenV2(u)];case 1:f.access_token=x.sent().accessToken,x.label=2;case 2:return"storage.uploadFile"===t?(l=new FormData,Object.keys(l).forEach((function(t){Object.prototype.hasOwnProperty.call(l,t)&&void 0!==l[t]&&l.append(t,a[t])})),i="multipart/form-data"):(i="application/json;charset=UTF-8",l={},Object.keys(a).forEach((function(t){void 0!==a[t]&&(l[t]=a[t])}))),p={headers:{"content-type":i}},(null==n?void 0:n.onUploadProgress)&&(p.onUploadProgress=n.onUploadProgress),this.config.region&&(p.headers["X-TCB-Region"]=this.config.region),(h=this.localCache.getStore(o))&&(p.headers["X-TCB-Trace"]=h),d=e.parse,y=e.inQuery,v=e.search,g={env:this.config.env},d&&(g.parse=!0),y&&(g=nt(nt({},y),g)),m=tt(),w=m.BASE_URL,b=m.PROTOCOL,O=ct(b,w,g),v&&(O+=v),[4,this.post(nt({url:O,data:l},p))];case 3:if(_=x.sent(),(A=null===(r=_.header)||void 0===r?void 0:r["x-tcb-trace"])&&this.localCache.setStore(o,A),200!==Number(_.status)&&200!==Number(_.statusCode)||!_.data)throw new Error("network request error");return[2,_]}}))}))},t.prototype.send=function(t,e){return void 0===e&&(e={}),rt(this,void 0,void 0,(function(){var n;return ot(this,(function(r){switch(r.label){case 0:return[4,this.request(t,e,{onUploadProgress:e.onUploadProgress})];case 1:if((n=r.sent()).data.code&&this.throwWhenRequestFail)throw new Error(JSON.stringify({code:it.OPERATION_FAIL,msg:"[".concat(n.data.code,"] ").concat(n.data.message)}));return[2,n.data]}}))}))},t}(),ht={},dt=function(){return dt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},dt.apply(this,arguments)},yt=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},vt=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},gt=s,mt="https://support.qq.com/products/148793",wt=p,bt=function(t){t.mode,t.customInfo,t.title,t.messages;return function(t,e,n){}},Ot={timeout:15e3,persistence:"local"},_t=6e5,At={},xt=function(){function t(t){this.cloudbaseConfig=t||this.cloudbaseConfig,this.authInstance=null,this.oauthInstance=null}return Object.defineProperty(t.prototype,"config",{get:function(){return this.cloudbaseConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"platform",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cache",{get:function(){return t=this.cloudbaseConfig.env,V[t];var t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localCache",{get:function(){return G(this.cloudbaseConfig.env)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"request",{get:function(){return t=this.cloudbaseConfig.env,ht[t];var t},enumerable:!1,configurable:!0}),t.prototype.init=function(e){if(!e.env)throw new Error(JSON.stringify({code:gt.INVALID_PARAMS,msg:"env must not be specified"}));q.adapter||this.useDefaultAdapter();var n={timeout:e.timeout||5e3,timeoutMsg:"[".concat(Y,"][REQUEST TIMEOUT] request had been abort since didn't finished within").concat(e.timeout/1e3,"s")};this.requestClient=new q.adapter.reqClass(n),this.cloudbaseConfig=dt(dt({},Ot),e),this.cloudbaseConfig.timeout=this.formatTimeout(this.cloudbaseConfig.timeout);var r=this.cloudbaseConfig,o=r.env,i=r.persistence,a=r.debug,s=r.timeout,c=r.oauthClient;J({env:o,persistence:i,debug:a,platformInfo:this.platform}),function(t,e,n){Z(e?"//".concat(t,".").concat(e,".tcb-api.tencentcloudapi.com/web"):"//".concat(t,".ap-shanghai.tcb-api.tencentcloudapi.com/web"),void 0)}(o,e.region||"");var u=new t(this.cloudbaseConfig);return function(t){ht[t.env]=new pt(nt(nt({},t),{throw:!0}))}({env:o,region:e.region||"",timeout:s,oauthClient:c,_fromApp:u}),u.requestClient=this.requestClient,u},t.prototype.updateConfig=function(t){var e=t.persistence,n=t.debug;this.cloudbaseConfig.persistence=e,this.cloudbaseConfig.debug=n,J({env:this.cloudbaseConfig.env,persistence:e,debug:n,platformInfo:this.platform})},t.prototype.registerExtension=function(t){At[t.name]=t},t.prototype.invokeExtension=function(t,e){return n=this,r=void 0,i=function(){var n;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,(function(r){switch(r.label){case 0:if(!(n=At[t]))throw new Error(JSON.stringify({code:gt.INVALID_PARAMS,msg:"extension:".concat(t," must be registered before invoke")}));return[4,n.invoke(e,this)];case 1:return[2,r.sent()]}}))},new((o=void 0)||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function s(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,s)}c((i=i.apply(n,r||[])).next())}));var n,r,o,i},t.prototype.useAdapters=function(t){var e=function(t){for(var e,n=0,r=(e=t,"[object Array]"===Object.prototype.toString.call(e)?t:[t]);n<r.length;n++){var o=r[n],i=o.isMatch,a=o.genAdapter,s=o.runtime;if(i())return{adapter:a(),runtime:s}}}(t)||{},n=e.adapter,r=e.runtime;n&&(q.adapter=n),r&&(q.runtime=r)},t.prototype.registerHook=function(e){!function(t,e){var n=e.entity,r=e.target;if(Object.prototype.hasOwnProperty.call(t,r))throw new Error(JSON.stringify({code:R.INVALID_OPERATION,msg:"target:".concat(r," is not exist")}));var o=t.prototype[r];if("function"!=typeof o)throw new Error(JSON.stringify({code:R.INVALID_OPERATION,msg:"target:".concat(r," is not a function which is the only type supports hook")}));t.prototype[r]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.call.apply(n,L([this],t,!1)),o.call.apply(o,L([this],t,!1))}}(t,e)},t.prototype.registerComponent=function(e){B(t,e)},t.prototype.registerVersion=function(t){!function(t){X=t}(t)},t.prototype.registerSdkName=function(t){!function(t){Y=t,function(t){r=t}(t)}(t)},t.prototype.registerEndPoint=function(t,e){Z(t,e)},t.prototype.useDefaultAdapter=function(){var t={adapter:{root:window,reqClass:g,wsClass:WebSocket,localStorage:localStorage},runtime:d.WEB},e=t.adapter,n=t.runtime;q.adapter=e,q.runtime=n},t.prototype.formatTimeout=function(t){switch(!0){case t>_t:return wt(gt.INVALID_PARAMS,"timeout is greater than maximum value[10min]"),_t;case t<100:return wt(gt.INVALID_PARAMS,"timeout is less than maximum value[100ms]"),100;default:return t}},yt([bt({mode:"sync",title:"Cloudbase 初始化失败",messages:["请确认以下各项:"," 1 - 调用 cloudbase.init() 的语法或参数是否正确"," 2 - 如果是非浏览器环境,是否配置了安全应用来源(https://docs.cloudbase.net/api-reference/webv3/adapter#%E7%AC%AC-2-%E6%AD%A5%E9%85%8D%E7%BD%AE%E5%AE%89%E5%85%A8%E5%BA%94%E7%94%A8%E6%9D%A5%E6%BA%90)","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(mt)]}),vt("design:type",Function),vt("design:paramtypes",[Object]),vt("design:returntype",t)],t.prototype,"init",null),yt([bt({title:"调用扩展能力失败",messages:["请确认以下各项:"," 1 - 调用 invokeExtension() 的语法或参数是否正确"," 2 - 被调用的扩展能力是否已经安装并通过 registerExtension() 注册","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(mt)]}),vt("design:type",Function),vt("design:paramtypes",[String,Object]),vt("design:returntype",Promise)],t.prototype,"invokeExtension",null),t}(),St=new xt;St.useAdapters(N);var Et=St},359:function(t,e,n){var r;t.exports=(r=r||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(633)}catch(t){}var o=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},s=a.lib={},c=s.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var s=0;s<o;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new u.init(e,t)}}),f=a.enc={},l=f.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new u.init(n,e/2)}},p=f.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new u.init(n,e)}},h=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},d=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=h.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,o=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,f=t.min(4*c,i);if(c){for(var l=0;l<c;l+=a)this._doProcessBlock(o,l);n=o.splice(0,c),r.sigBytes-=f}return new u.init(n,f)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),y=(s.Hasher=d.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new y.HMAC.init(t,n).finalize(e)}}}),a.algo={});return a}(Math),r)},139:function(t,e,n){var r,o,i;t.exports=(r=n(359),i=(o=r).lib.WordArray,o.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(a>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<n.length;o++)r[n.charCodeAt(o)]=o}var a=n.charAt(64);if(a){var s=t.indexOf(a);-1!==s&&(e=s)}return function(t,e,n){for(var r=[],o=0,a=0;a<e;a++)if(a%4){var s=n[t.charCodeAt(a-1)]<<a%4*2|n[t.charCodeAt(a)]>>>6-a%4*2;r[o>>>2]|=s<<24-o%4*8,o++}return i.create(r,o)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},307:function(t,e,n){t.exports=n(359).enc.Utf8},61:function(t,e,n){var r;t.exports=(r=n(359),n(93),n(423),r.HmacSHA256)},423:function(t,e,n){var r,o,i;t.exports=(o=(r=n(359)).lib.Base,i=r.enc.Utf8,void(r.algo.HMAC=o.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=i.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),a=this._iKey=e.clone(),s=o.words,c=a.words,u=0;u<n;u++)s[u]^=1549556828,c[u]^=909522486;o.sigBytes=a.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},93:function(t,e,n){var r;t.exports=(r=n(359),function(t){var e=r,n=e.lib,o=n.WordArray,i=n.Hasher,a=e.algo,s=[],c=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,o=0;o<64;)e(r)&&(o<8&&(s[o]=n(t.pow(r,.5))),c[o]=n(t.pow(r,1/3)),o++),r++}();var u=[],f=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],f=n[5],l=n[6],p=n[7],h=0;h<64;h++){if(h<16)u[h]=0|t[e+h];else{var d=u[h-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,v=u[h-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[h]=y+u[h-7]+g+u[h-16]}var m=r&o^r&i^o&i,w=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=p+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&l)+c[h]+u[h];p=l,l=f,f=s,s=a+b|0,a=i,i=o,o=r,r=b+(w+m)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+f|0,n[6]=n[6]+l|0,n[7]=n[7]+p|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=t.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(f),e.HmacSHA256=i._createHmacHelper(f)}(Math),r.SHA256)},47:function(t){var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new j(r||[]);return o(a,"_invoke",{value:E(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function g(){}function m(){}function w(){}var b={};u(b,a,(function(){return this}));var O=Object.getPrototypeOf,_=O&&O(O(k([])));_&&_!==n&&r.call(_,a)&&(b=_);var A=w.prototype=g.prototype=Object.create(b);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(o,i,a,s){var c=l(t[o],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(t,e,n){var r=p;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===y){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?y:h,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=y,n.method="throw",n.arg=c.arg)}}}function I(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=l(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function k(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:T}}function T(){return{value:e,done:!0}}return m.prototype=w,o(A,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:m,configurable:!0}),m.displayName=u(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},x(S.prototype),u(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new S(f(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(A),u(A,c,"Generator"),u(A,a,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=k,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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,v):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),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:k(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},633:function(){},878:function(t){"use strict";t.exports=JSON.parse('{"version":"2.5.24-beta.0"}')}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(47),n(313)}()}));