@pluve/logger-sdk 0.0.7 → 0.0.9
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.
- package/README.html +681 -0
- package/README.md +131 -153
- package/dist/cjs/capture/jsError.js +48 -0
- package/dist/cjs/capture/promiseError.js +49 -0
- package/dist/cjs/capture/resourceError.js +48 -0
- package/dist/cjs/capture/wechatError.js +95 -0
- package/dist/cjs/compress/compression.js +84 -0
- package/dist/cjs/config/index.js +55 -0
- package/dist/cjs/core/fingerprint.js +36 -0
- package/dist/cjs/core/httpClient.js +96 -0
- package/dist/cjs/core/loggerSDK.js +641 -0
- package/dist/cjs/core/queueManager.js +249 -0
- package/dist/cjs/core/retryManager.js +127 -0
- package/dist/cjs/index.js +29 -0
- package/dist/cjs/stack/stacktrace.js +48 -0
- package/dist/cjs/transport/beaconTransport.js +64 -0
- package/dist/cjs/transport/pixelImageTransport.js +100 -0
- package/dist/cjs/transport/transport.js +17 -0
- package/dist/cjs/transport/transportAdapter.js +56 -0
- package/dist/cjs/transport/wechatTransport.js +103 -0
- package/dist/cjs/types/api.js +17 -0
- package/dist/cjs/types/env.js +17 -0
- package/dist/cjs/types/external.d.ts +21 -0
- package/dist/cjs/types/logEvent.js +17 -0
- package/dist/cjs/types/logEventLevel.js +17 -0
- package/dist/cjs/types/sdkOptions.js +17 -0
- package/dist/cjs/types/trackOptions.js +17 -0
- package/dist/cjs/utils/environment.js +183 -0
- package/dist/cjs/utils/session.js +31 -0
- package/dist/cjs/utils/tools.js +82 -0
- package/dist/cjs/utils/uuid.js +35 -0
- package/dist/esm/capture/jsError.js +45 -0
- package/dist/esm/capture/promiseError.js +46 -0
- package/dist/esm/capture/resourceError.js +24 -0
- package/dist/esm/capture/wechatError.js +92 -0
- package/dist/esm/compress/compression.js +82 -0
- package/dist/esm/config/index.js +28 -0
- package/dist/esm/core/fingerprint.js +12 -0
- package/dist/esm/core/httpClient.js +95 -0
- package/dist/esm/core/loggerSDK.js +650 -0
- package/dist/esm/core/queueManager.js +269 -0
- package/dist/esm/core/retryManager.js +129 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/stack/stacktrace.js +37 -0
- package/dist/esm/transport/beaconTransport.js +81 -0
- package/dist/esm/transport/pixelImageTransport.js +99 -0
- package/dist/esm/transport/transport.js +0 -0
- package/dist/esm/transport/transportAdapter.js +32 -0
- package/dist/esm/transport/wechatTransport.js +120 -0
- package/dist/esm/types/api.js +0 -0
- package/dist/esm/types/env.js +0 -0
- package/dist/esm/types/external.d.ts +21 -0
- package/dist/esm/types/logEvent.js +0 -0
- package/dist/esm/types/logEventLevel.js +0 -0
- package/dist/esm/types/sdkOptions.js +0 -0
- package/dist/esm/types/trackOptions.js +0 -0
- package/dist/esm/utils/environment.js +154 -0
- package/dist/esm/utils/session.js +7 -0
- package/dist/esm/utils/tools.js +76 -0
- package/dist/esm/utils/uuid.js +11 -0
- package/dist/types/capture/jsError.d.ts +2 -0
- package/dist/types/capture/promiseError.d.ts +2 -0
- package/dist/types/capture/resourceError.d.ts +2 -0
- package/dist/types/capture/wechatError.d.ts +3 -0
- package/dist/types/compress/compression.d.ts +10 -0
- package/dist/types/config/index.d.ts +9 -0
- package/dist/types/core/fingerprint.d.ts +8 -0
- package/dist/types/core/httpClient.d.ts +11 -0
- package/dist/{loggerSDK.d.ts → types/core/loggerSDK.d.ts} +27 -2
- package/dist/{queueManager.d.ts → types/core/queueManager.d.ts} +9 -1
- package/dist/{retryManager.d.ts → types/core/retryManager.d.ts} +0 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stack/stacktrace.d.ts +2 -0
- package/dist/types/transport/beaconTransport.d.ts +11 -0
- package/dist/types/transport/pixelImageTransport.d.ts +11 -0
- package/dist/types/transport/transport.d.ts +14 -0
- package/dist/types/transport/transportAdapter.d.ts +10 -0
- package/dist/types/transport/wechatTransport.d.ts +11 -0
- package/dist/types/types/api.d.ts +12 -0
- package/dist/types/types/env.d.ts +14 -0
- package/dist/types/types/logEvent.d.ts +57 -0
- package/dist/types/types/logEventLevel.d.ts +2 -0
- package/dist/{types.d.ts → types/types/sdkOptions.d.ts} +23 -42
- package/dist/types/types/trackOptions.d.ts +7 -0
- package/dist/types/utils/environment.d.ts +21 -0
- package/dist/types/utils/session.d.ts +1 -0
- package/dist/types/utils/tools.d.ts +12 -0
- package/dist/types/utils/uuid.d.ts +7 -0
- package/dist/umd/logger-sdk.min.js +1 -0
- package/package.json +29 -5
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -13
- package/dist/loggerSDK.js +0 -560
- package/dist/queueManager.js +0 -186
- package/dist/retryManager.js +0 -224
- package/dist/transportAdapter.d.ts +0 -51
- package/dist/transportAdapter.js +0 -315
- package/dist/types.js +0 -1
- package/dist/utils.d.ts +0 -52
- package/dist/utils.js +0 -348
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Stage } from './env';
|
|
2
|
+
import { LogEventLevel } from './logEventLevel';
|
|
3
|
+
/** 标准化日志上报格式 */
|
|
4
|
+
export interface LogEvent {
|
|
5
|
+
/** 日志 ID */
|
|
6
|
+
logId: string;
|
|
7
|
+
/** 事件序列编号(去重/排序辅助) */
|
|
8
|
+
seq: number;
|
|
9
|
+
/** 应用标识 */
|
|
10
|
+
appId: string;
|
|
11
|
+
/** 环境标识 */
|
|
12
|
+
stage: Stage;
|
|
13
|
+
/** 日志级别:info/warn/error/fatal */
|
|
14
|
+
level: LogEventLevel;
|
|
15
|
+
/** 可选:跟踪 ID(跨服务调用链跟踪) */
|
|
16
|
+
traceId?: string;
|
|
17
|
+
/** 会话标识,同 sessionId */
|
|
18
|
+
frontendId: string;
|
|
19
|
+
/** 发生页面 URL */
|
|
20
|
+
url?: string;
|
|
21
|
+
location: string;
|
|
22
|
+
/** 异常信息 */
|
|
23
|
+
message: string;
|
|
24
|
+
/** 可选:堆栈信息(长字符串) */
|
|
25
|
+
throwable?: string;
|
|
26
|
+
/** 可选:用户 ID(脱敏) */
|
|
27
|
+
userId?: string;
|
|
28
|
+
/** 可选:店铺编码 */
|
|
29
|
+
storeCode?: string;
|
|
30
|
+
/** 可选的结构化额外信息 */
|
|
31
|
+
tags?: Record<string, any>;
|
|
32
|
+
}
|
|
33
|
+
export interface StackFrame {
|
|
34
|
+
file: string;
|
|
35
|
+
line: number;
|
|
36
|
+
column: number;
|
|
37
|
+
function?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare type BaseErrorInfo = {
|
|
40
|
+
type: 'js' | 'promise' | 'resource';
|
|
41
|
+
message: string;
|
|
42
|
+
stack: StackFrame[];
|
|
43
|
+
throwable?: string;
|
|
44
|
+
};
|
|
45
|
+
export declare type ReportData = {
|
|
46
|
+
appId: string;
|
|
47
|
+
appStage: Stage;
|
|
48
|
+
items: ReportItem[];
|
|
49
|
+
};
|
|
50
|
+
export declare type ReportItem = {
|
|
51
|
+
level: LogEventLevel;
|
|
52
|
+
traceId?: string;
|
|
53
|
+
frontendId: string;
|
|
54
|
+
location: string;
|
|
55
|
+
message: string;
|
|
56
|
+
throwable?: string;
|
|
57
|
+
};
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** 事件类型 */
|
|
4
|
-
export type LogEventType = 'error' | 'crash' | 'pageview' | 'custom' | 'session_start';
|
|
5
|
-
/** 日志级别 */
|
|
6
|
-
export type LogEventLevel = 'info' | 'warn' | 'error' | 'fatal';
|
|
1
|
+
import { Env, Stage } from './env';
|
|
2
|
+
import { LogEventLevel } from './logEventLevel';
|
|
7
3
|
/** SDK 配置选项 */
|
|
8
4
|
export interface SDKOptions {
|
|
9
5
|
/** 上报端点 URL */
|
|
10
|
-
endpoint: string;
|
|
11
6
|
/** 应用 ID */
|
|
12
7
|
appId: string;
|
|
13
8
|
/** 环境标识 */
|
|
14
9
|
env?: Env;
|
|
10
|
+
/** 日志环境 */
|
|
11
|
+
logStage: Stage;
|
|
15
12
|
/** 是否开启调试模式 */
|
|
16
13
|
debug?: boolean;
|
|
17
14
|
/** 是否启用批量上报,默认 true */
|
|
@@ -20,6 +17,8 @@ export interface SDKOptions {
|
|
|
20
17
|
batchSize?: number;
|
|
21
18
|
/** 是否启用 gzip 压缩,默认 true */
|
|
22
19
|
enableGzip?: boolean;
|
|
20
|
+
/** 是否仅在批量模式下启用 gzip 压缩,默认 true */
|
|
21
|
+
gzipOnlyInBatchMode?: boolean;
|
|
23
22
|
/** 最大像素图 URL 长度,默认 1900 */
|
|
24
23
|
maxPixelUrlLen?: number;
|
|
25
24
|
/** 批量上报时间间隔(毫秒),默认 5000 */
|
|
@@ -42,39 +41,21 @@ export interface SDKOptions {
|
|
|
42
41
|
userId?: string;
|
|
43
42
|
/** 可选:店铺编码 */
|
|
44
43
|
storeCode?: string;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/** 可选:跟踪 ID(跨服务调用链跟踪) */
|
|
63
|
-
traceId?: string;
|
|
64
|
-
/** 会话标识,同 sessionId */
|
|
65
|
-
frontendId: string;
|
|
66
|
-
/** 发生页面 URL */
|
|
67
|
-
url?: string;
|
|
68
|
-
/** 异常发生位置,结构待定 */
|
|
69
|
-
location: string;
|
|
70
|
-
/** 异常信息 */
|
|
71
|
-
message: string;
|
|
72
|
-
/** 可选:堆栈信息(长字符串) */
|
|
73
|
-
throwable?: string;
|
|
74
|
-
/** 可选:用户 ID(脱敏) */
|
|
75
|
-
userId?: string;
|
|
76
|
-
/** 可选:店铺编码 */
|
|
77
|
-
storeCode?: string;
|
|
78
|
-
/** 可选的结构化额外信息 */
|
|
79
|
-
tags?: Record<string, any>;
|
|
44
|
+
/** token */
|
|
45
|
+
token: string;
|
|
46
|
+
/** 全局采样率 0.0-1.0,默认 1.0(全量) */
|
|
47
|
+
sampleRate?: number;
|
|
48
|
+
/** 分级采样率,优先于全局采样率 */
|
|
49
|
+
levelSampleRate?: Partial<Record<LogEventLevel, number>>;
|
|
50
|
+
/** 事件来源采样率(js/promise/resource/custom),优先于全局采样率 */
|
|
51
|
+
sourceSampleRate?: Partial<Record<'js' | 'promise' | 'resource' | 'custom', number>>;
|
|
52
|
+
/** 页面路径采样率,key 为路径前缀,优先于全局采样率 */
|
|
53
|
+
pathSampleRate?: Record<string, number>;
|
|
54
|
+
autoCapture?: {
|
|
55
|
+
js?: boolean;
|
|
56
|
+
promise?: boolean;
|
|
57
|
+
resource?: boolean;
|
|
58
|
+
wechat?: boolean;
|
|
59
|
+
};
|
|
60
|
+
enableAutoCapture?: boolean;
|
|
80
61
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EnvironmentInfo } from '../types/env';
|
|
2
|
+
export declare function isBrowser(): boolean;
|
|
3
|
+
export declare function isWeChatMiniProgram(): boolean;
|
|
4
|
+
export declare function getCurrentUrl(): string;
|
|
5
|
+
/**
|
|
6
|
+
* 获取环境信息
|
|
7
|
+
*/
|
|
8
|
+
export declare function getEnvironmentInfo(): EnvironmentInfo;
|
|
9
|
+
/**
|
|
10
|
+
* 解析浏览器信息
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseBrowserInfo(userAgent: string): {
|
|
13
|
+
browser: string;
|
|
14
|
+
browserVersion: string;
|
|
15
|
+
os: string;
|
|
16
|
+
osVersion: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 收集环境信息并生成 tags(仅在初始化时执行一次)
|
|
20
|
+
*/
|
|
21
|
+
export declare function collectEnvironmentTags(): Record<string, string | number | boolean | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getSessionId(): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const now: () => number;
|
|
2
|
+
export declare function safeStringify(obj: any): string;
|
|
3
|
+
export declare function normalizeMessage(message: string): string;
|
|
4
|
+
export declare function logDebug(debug: boolean, ...args: any[]): void;
|
|
5
|
+
/**
|
|
6
|
+
* 计算哈希值到概率
|
|
7
|
+
*/
|
|
8
|
+
export declare function hashToProb(s: string): number;
|
|
9
|
+
export declare function flattenStack(error: Error): Promise<{
|
|
10
|
+
location: string;
|
|
11
|
+
throwable: string;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Base64"),require("localforage")):"function"==typeof define&&define.amd?define(["Base64","localforage"],t):"object"==typeof exports?exports.LoggerSDK=t(require("Base64"),require("localforage")):e.LoggerSDK=t(e.Base64,e.localforage)}(self,(function(e,t){return function(){var r,n,o={307:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=u(e),a=i[0],s=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,u=n-o;s<u;s+=a)i.push(c(e,s,s+a>u?u:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},179:function(e,t,r){"use strict";var n=r(505).default,o=r(307),i=r(525),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;var s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),n=u(r),o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(F(e,Uint8Array)){var t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(e));if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return c.from(o,t,r);var i=function(e){if(c.isBuffer(e)){var t=0|g(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||G(e.length)?u(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(e))}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return f(e),u(e<0?0:0|g(e))}function p(e){for(var t=e.length<0?0:0|g(e.length),r=u(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function g(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function v(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+n(e));var r=e.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return o?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return L(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),G(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){var i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){f=!1;break}if(f)return i}return-1}function x(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(G(s))return a;e[r+a]=s}return a}function S(e,t,r,n){return D(q(t,e.length-r),e,r,n)}function _(e,t,r,n){return D(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return D(z(t),e,r,n)}function k(e,t,r,n){return D(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=A));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return h(e)},c.allocUnsafeSlow=function(e){return h(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(F(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=c.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(F(i,Uint8Array))o+i.length>n.length?c.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!c.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},c.byteLength=v,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,o,i){if(F(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+n(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),t<0||r>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&t>=r)return 0;if(o>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(o>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(a,s),l=this.slice(o,i),f=e.slice(t,r),h=0;h<u;++h)if(l[h]!==f[h]){a=l[h],s=f[h];break}return a<s?-1:s<a?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function L(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function M(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function I(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=W[e[i]];return o}function R(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||B(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||B(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);B(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);B(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=c.isBuffer(e)?e:c.from(e,n),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%s]}return this};var U=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function G(e){return e!=e}var W=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},948:function(e,t,r){var n,o,i;r(505).default;!function(a,s){"use strict";o=[r(901)],void 0===(i="function"==typeof(n=function(e){var t=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(r))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter((function(e){return!!e.match(r)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,a=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new e({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2],source:t})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(e){return!e.match(n)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=t.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(t.replace(r,""));return new e({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),o=[],i=2,a=n.length;i<a;i+=2){var s=r.exec(n[i]);s&&o.push(new e({fileName:s[2],lineNumber:s[1],source:n[i]}))}return o},parseOpera10:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split("\n"),o=[],i=0,a=n.length;i<a;i+=2){var s=r.exec(n[i]);s&&o.push(new e({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:n[i]}))}return o},parseOpera11:function(r){return r.stack.split("\n").filter((function(e){return!!e.match(t)&&!e.match(/^Error created at/)}),this).map((function(t){var r,n=t.split("@"),o=this.extractLocation(n.pop()),i=n.shift()||"",a=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var s=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new e({functionName:a,args:s,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})}),this)}}})?n.apply(t,o):n)||(e.exports=i)}()},525:function(e,t){t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*g}},430:function(e,t,r){var n=r(685),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,t){for(var r=new i,n=0,o=e.length;n<o;n++)r.add(e[n],t);return r},i.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,t){var r=n.toSetString(e),i=o.call(this._set,r),a=this._array.length;i&&!t||this._array.push(e),i||(this._set[r]=a)},i.prototype.has=function(e){var t=n.toSetString(e);return o.call(this._set,t)},i.prototype.indexOf=function(e){var t=n.toSetString(e);if(o.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},i.prototype.toArray=function(){return this._array.slice()},t.I=i},773:function(e,t,r){var n=r(626);t.encode=function(e){var t,r="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),r+=n.encode(t)}while(o>0);return r},t.decode=function(e,t,r){var o,i,a,s,u=e.length,c=0,l=0;do{if(t>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<<l,l+=5}while(o);r.value=(s=(a=c)>>1,1==(1&a)?-s:s),r.rest=t}},626:function(e,t){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},509:function(e,t){function r(e,n,o,i,a,s){var u=Math.floor((n-e)/2)+e,c=a(o,i[u],!0);return 0===c?u:c>0?n-u>1?r(u,n,o,i,a,s):s==t.LEAST_UPPER_BOUND?n<i.length?n:-1:u:u-e>1?r(e,u,o,i,a,s):s==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,o,i){if(0===n.length)return-1;var a=r(-1,n.length,e,n,o,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===o(n[a],n[a-1],!0);)--a;return a}},186:function(e,t,r){var n=r(685);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},o.prototype.add=function(e){var t,r,o,i,a,s;t=this._last,r=e,o=t.generatedLine,i=r.generatedLine,a=t.generatedColumn,s=r.generatedColumn,i>o||i==o&&s>=a||n.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.H=o},906:function(e,t){function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t,o,i){if(o<i){var a=o-1;r(e,(l=o,f=i,Math.round(l+Math.random()*(f-l))),i);for(var s=e[i],u=o;u<i;u++)t(e[u],s)<=0&&r(e,a+=1,u);r(e,a+1,u);var c=a+1;n(e,t,o,c-1),n(e,t,c+1,i)}var l,f}t.U=function(e,t){n(e,t,0,e.length-1)}},351:function(e,t,r){var n=r(685),o=r(509),i=r(430).I,a=r(773),s=r(906).U;function u(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new f(t):new c(t)}function c(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=n.getArg(t,"version"),o=n.getArg(t,"sources"),a=n.getArg(t,"names",[]),s=n.getArg(t,"sourceRoot",null),u=n.getArg(t,"sourcesContent",null),c=n.getArg(t,"mappings"),l=n.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);o=o.map(String).map(n.normalize).map((function(e){return s&&n.isAbsolute(s)&&n.isAbsolute(e)?n.relative(s,e):e})),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this.file=l}function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function f(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=n.getArg(t,"version"),o=n.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=o.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=n.getArg(e,"offset"),r=n.getArg(t,"line"),o=n.getArg(t,"column");if(r<a.line||r===a.line&&o<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=t,{generatedOffset:{generatedLine:r+1,generatedColumn:o+1},consumer:new u(n.getArg(e,"map"))}}))}u.fromSourceMap=function(e){return c.fromSourceMap(e)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},u.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(e,t,r){var o,i=t||null;switch(r||u.GENERATED_ORDER){case u.GENERATED_ORDER:o=this._generatedMappings;break;case u.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=a&&(t=n.join(a,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,i)},u.prototype.allGeneratedPositionsFor=function(e){var t=n.getArg(e,"line"),r={source:n.getArg(e,"source"),originalLine:t,originalColumn:n.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=n.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var i=[],a=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,o.LEAST_UPPER_BOUND);if(a>=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:n.getArg(s,"generatedLine",null),column:n.getArg(s,"generatedColumn",null),lastColumn:n.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)i.push({line:n.getArg(s,"generatedLine",null),column:n.getArg(s,"generatedColumn",null),lastColumn:n.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return i},t.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.fromSourceMap=function(e){var t=Object.create(c.prototype),r=t._names=i.fromArray(e._names.toArray(),!0),o=t._sources=i.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],f=t.__originalMappings=[],h=0,p=a.length;h<p;h++){var d=a[h],g=new l;g.generatedLine=d.generatedLine,g.generatedColumn=d.generatedColumn,d.source&&(g.source=o.indexOf(d.source),g.originalLine=d.originalLine,g.originalColumn=d.originalColumn,d.name&&(g.name=r.indexOf(d.name)),f.push(g)),u.push(g)}return s(t.__originalMappings,n.compareByOriginalPositions),t},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._sources.toArray().map((function(e){return null!=this.sourceRoot?n.join(this.sourceRoot,e):e}),this)}}),c.prototype._parseMappings=function(e,t){for(var r,o,i,u,c,f=1,h=0,p=0,d=0,g=0,v=0,m=e.length,y=0,b={},w={},x=[],S=[];y<m;)if(";"===e.charAt(y))f++,y++,h=0;else if(","===e.charAt(y))y++;else{for((r=new l).generatedLine=f,u=y;u<m&&!this._charIsMappingSeparator(e,u);u++);if(i=b[o=e.slice(y,u)])y+=o.length;else{for(i=[];y<u;)a.decode(e,y,w),c=w.value,y=w.rest,i.push(c);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[o]=i}r.generatedColumn=h+i[0],h=r.generatedColumn,i.length>1&&(r.source=g+i[1],g+=i[1],r.originalLine=p+i[2],p=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=v+i[4],v+=i[4])),S.push(r),"number"==typeof r.originalLine&&x.push(r)}s(S,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,s(x,n.compareByOriginalPositions),this.__originalMappings=x},c.prototype._findMapping=function(e,t,r,n,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return o.search(e,t,i,a)},c.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(e){var t={generatedLine:n.getArg(e,"line"),generatedColumn:n.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===t.generatedLine){var i=n.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=n.join(this.sourceRoot,i)));var a=n.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:n.getArg(o,"originalLine",null),column:n.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=n.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=n.urlParse(this.sourceRoot))){var o=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=n.getArg(e,"source");if(null!=this.sourceRoot&&(t=n.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var r={source:t=this._sources.indexOf(t),originalLine:n.getArg(e,"line"),originalColumn:n.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:n.getArg(i,"generatedLine",null),column:n.getArg(i,"generatedColumn",null),lastColumn:n.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},f.prototype=Object.create(u.prototype),f.prototype.constructor=u,f.prototype._version=3,Object.defineProperty(f.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),f.prototype.originalPositionFor=function(e){var t={generatedLine:n.getArg(e,"line"),generatedColumn:n.getArg(e,"column")},r=o.search(t,this._sections,(function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn})),i=this._sections[r];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},f.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},f.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},f.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer.sources.indexOf(n.getArg(e,"source"))){var o=r.consumer.generatedPositionFor(e);if(o)return{line:o.line+(r.generatedOffset.generatedLine-1),column:o.column+(r.generatedOffset.generatedLine===o.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},f.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var o=this._sections[r],i=o.consumer._generatedMappings,a=0;a<i.length;a++){var u=i[a],c=o.consumer._sources.at(u.source);null!==o.consumer.sourceRoot&&(c=n.join(o.consumer.sourceRoot,c)),this._sources.add(c),c=this._sources.indexOf(c);var l=o.consumer._names.at(u.name);this._names.add(l),l=this._names.indexOf(l);var f={source:c,generatedLine:u.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(o.generatedOffset.generatedLine===u.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:l};this.__generatedMappings.push(f),"number"==typeof f.originalLine&&this.__originalMappings.push(f)}s(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),s(this.__originalMappings,n.compareByOriginalPositions)}},60:function(e,t,r){var n=r(773),o=r(685),i=r(430).I,a=r(186).H;function s(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,r=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=o.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)})),e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)})),r},s.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),r=o.getArg(e,"original",null),n=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},s.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=o.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var a=this._sourceRoot;null!=a&&(n=o.relative(a,n));var s=new i,u=new i;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=r&&(t.source=o.join(r,t.source)),null!=a&&(t.source=o.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||s.has(c)||s.add(c);var l=t.name;null==l||u.has(l)||u.add(l)}),this),this._sources=s,this._names=u,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=o.join(r,t)),null!=a&&(t=o.relative(a,t)),this.setSourceContent(t,n))}),this)},s.prototype._validateMapping=function(e,t,r,n){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},s.prototype._serializeMappings=function(){for(var e,t,r,i,a=0,s=1,u=0,c=0,l=0,f=0,h="",p=this._mappings.toArray(),d=0,g=p.length;d<g;d++){if(e="",(t=p[d]).generatedLine!==s)for(a=0;t.generatedLine!==s;)e+=";",s++;else if(d>0){if(!o.compareByGeneratedPositionsInflated(t,p[d-1]))continue;e+=","}e+=n.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=n.encode(i-f),f=i,e+=n.encode(t.originalLine-1-c),c=t.originalLine-1,e+=n.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=n.encode(r-l),l=r)),h+=e}return h},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var r=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=s},164:function(e,t,r){var n=r(60).SourceMapGenerator,o=r(685),i=/(\r?\n)/,a="$$$isSourceNode$$$";function s(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==o?null:o,this[a]=!0,null!=n&&this.add(n)}s.fromStringWithSourceMap=function(e,t,r){var n=new s,a=e.split(i),u=function(){return a.shift()+(a.shift()||"")},c=1,l=0,f=null;return t.eachMapping((function(e){if(null!==f){if(!(c<e.generatedLine)){var t=(r=a[0]).substr(0,e.generatedColumn-l);return a[0]=r.substr(e.generatedColumn-l),l=e.generatedColumn,h(f,t),void(f=e)}h(f,u()),c++,l=0}for(;c<e.generatedLine;)n.add(u()),c++;if(l<e.generatedColumn){var r=a[0];n.add(r.substr(0,e.generatedColumn)),a[0]=r.substr(e.generatedColumn),l=e.generatedColumn}f=e}),this),a.length>0&&(f&&h(f,u()),n.add(a.join(""))),t.sources.forEach((function(e){var i=t.sourceContentFor(e);null!=i&&(null!=r&&(e=o.join(r,e)),n.setSourceContent(e,i))})),n;function h(e,t){if(null===e||void 0===e.source)n.add(t);else{var i=r?o.join(r,e.source):e.source;n.add(new s(e.originalLine,e.originalColumn,i,t,e.name))}}},s.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},s.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)(t=this.children[r])[a]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},s.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[a]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},s.prototype.setSourceContent=function(e,t){this.sourceContents[o.toSetString(e)]=t},s.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);var n=Object.keys(this.sourceContents);for(t=0,r=n.length;t<r;t++)e(o.fromSetString(n[t]),this.sourceContents[n[t]])},s.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},s.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new n(e),o=!1,i=null,a=null,s=null,u=null;return this.walk((function(e,n){t.code+=e,null!==n.source&&null!==n.line&&null!==n.column?(i===n.source&&a===n.line&&s===n.column&&u===n.name||r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:t.line,column:t.column},name:n.name}),i=n.source,a=n.line,s=n.column,u=n.name,o=!0):o&&(r.addMapping({generated:{line:t.line,column:t.column}}),i=null,o=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===l?(i=null,o=!1):o&&r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:t.line,column:t.column},name:n.name})):t.column++})),this.walkSourceContents((function(e,t){r.setSourceContent(e,t)})),{code:t.code,map:r}},t.SourceNode=s},685:function(e,t){t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,n=/^data:.+\,.+$/;function o(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(e){var r=e,n=o(e);if(n){if(!n.path)return e;r=n.path}for(var a,s=t.isAbsolute(r),u=r.split(/\/+/),c=0,l=u.length-1;l>=0;l--)"."===(a=u[l])?u.splice(l,1):".."===a?c++:c>0&&(""===a?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(r=u.join("/"))&&(r=s?"/":"."),n?(n.path=r,i(n)):r}t.urlParse=o,t.urlGenerate=i,t.normalize=a,t.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var r=o(t),s=o(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var u="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=u,i(s)):u},t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(r)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function u(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function l(e,t){return e===t?0:e>t?1:-1}t.toSetString=s?u:function(e){return c(e)?"$"+e:e},t.fromSetString=s?u:function(e){return c(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=e.source-t.source;return 0!==n||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)||r||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:e.name-t.name},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||r||0!==(n=e.source-t.source)||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:e.name-t.name},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=l(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:l(e.name,t.name)}},8:function(e,t,r){t.SourceMapGenerator=r(60).SourceMapGenerator,t.SourceMapConsumer=r(351).SourceMapConsumer,t.SourceNode=r(164).SourceNode},894:function(e,t,r){var n,o,i,a=r(505).default;!function(s,u){"use strict";o=[r(901)],n=function(e){return{backtrace:function(t){var r=[],n=10;"object"===a(t)&&"number"==typeof t.maxStackSize&&(n=t.maxStackSize);for(var o=arguments.callee;o&&r.length<n&&o.arguments;){for(var i=new Array(o.arguments.length),s=0;s<i.length;++s)i[s]=o.arguments[s];/function(?:\s+([\w$]+))+\s*\(/.test(o.toString())?r.push(new e({functionName:RegExp.$1||void 0,args:i})):r.push(new e({args:i}));try{o=o.caller}catch(e){break}}return r}}},void 0===(i="function"==typeof n?n.apply(t,o):n)||(e.exports=i)}()},901:function(e,t,r){var n,o,i;r(505).default;!function(r,a){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e.charAt(0).toUpperCase()+e.substring(1)}function r(e){return function(){return this[e]}}var n=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=["args"],s=["evalOrigin"],u=n.concat(o,i,a,s);function c(e){if(e)for(var r=0;r<u.length;r++)void 0!==e[u[r]]&&this["set"+t(u[r])](e[u[r]])}c.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof c)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new c(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",r=this.getColumnNumber()||"",n=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+r+")":"[eval]:"+t+":"+r:n?n+" ("+e+":"+t+":"+r+")":e+":"+t+":"+r}},c.fromString=function(e){var t=e.indexOf("("),r=e.lastIndexOf(")"),n=e.substring(0,t),o=e.substring(t+1,r).split(","),i=e.substring(r+1);if(0===i.indexOf("@"))var a=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i,""),s=a[1],u=a[2],l=a[3];return new c({functionName:n,args:o||void 0,fileName:s,lineNumber:u||void 0,columnNumber:l||void 0})};for(var l=0;l<n.length;l++)c.prototype["get"+t(n[l])]=r(n[l]),c.prototype["set"+t(n[l])]=function(e){return function(t){this[e]=Boolean(t)}}(n[l]);for(var f=0;f<o.length;f++)c.prototype["get"+t(o[f])]=r(o[f]),c.prototype["set"+t(o[f])]=function(t){return function(r){if(!e(r))throw new TypeError(t+" must be a Number");this[t]=Number(r)}}(o[f]);for(var h=0;h<i.length;h++)c.prototype["get"+t(i[h])]=r(i[h]),c.prototype["set"+t(i[h])]=function(e){return function(t){this[e]=String(t)}}(i[h]);return c})?n.apply(t,o):n)||(e.exports=i)}()},500:function(e,t,r){var n,o,i,a=r(505).default;!function(s,u){"use strict";o=[r(8),r(901)],void 0===(i="function"==typeof(n=function(e,t){function r(e){return new Promise((function(t,r){var n=new XMLHttpRequest;n.open("get",e),n.onerror=r,n.onreadystatechange=function(){4===n.readyState&&(n.status>=200&&n.status<300||"file://"===e.substr(0,7)&&n.responseText?t(n.responseText):r(new Error("HTTP status: "+n.status+" retrieving "+e)))},n.send()}))}function n(e){if("undefined"!=typeof window&&window.atob)return window.atob(e);throw new Error("You must supply a polyfill for window.atob in this environment")}function o(e){if("undefined"!=typeof JSON&&JSON.parse)return JSON.parse(e);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function i(e,t){for(var r=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],n=e.split("\n"),o="",i=Math.min(t,20),a=0;a<i;++a){var s=n[t-a-1],u=s.indexOf("//");if(u>=0&&(s=s.substr(0,u)),s){o=s+o;for(var c=r.length,l=0;l<c;l++){var f=r[l].exec(o);if(f&&f[1])return f[1]}}}}function s(){if("function"!=typeof Object.defineProperty||"function"!=typeof Object.create)throw new Error("Unable to consume source maps in older browsers")}function u(e){if("object"!==a(e))throw new TypeError("Given StackFrame is not an object");if("string"!=typeof e.fileName)throw new TypeError("Given file name is not a String");if("number"!=typeof e.lineNumber||e.lineNumber%1!=0||e.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if("number"!=typeof e.columnNumber||e.columnNumber%1!=0||e.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function c(e){for(var t,r,n=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm;r=n.exec(e);)t=r[1];if(t)return t;throw new Error("sourceMappingURL not found")}function l(e,r,n){return new Promise((function(o,i){var a=r.originalPositionFor({line:e.lineNumber,column:e.columnNumber});if(a.source){var s=r.sourceContentFor(a.source);s&&(n[a.source]=s),o(new t({functionName:a.name||e.functionName,args:e.args,fileName:a.source,lineNumber:a.line,columnNumber:a.column}))}else i(new Error("Could not get original source for given stackframe and source map"))}))}return function a(f){if(!(this instanceof a))return new a(f);f=f||{},this.sourceCache=f.sourceCache||{},this.sourceMapConsumerCache=f.sourceMapConsumerCache||{},this.ajax=f.ajax||r,this._atob=f.atob||n,this._get=function(e){return new Promise(function(t,r){var n="data:"===e.substr(0,5);if(this.sourceCache[e])t(this.sourceCache[e]);else if(f.offline&&!n)r(new Error("Cannot make network requests in offline mode"));else if(n){var o=/^data:application\/json;([\w=:"-]+;)*base64,/,i=e.match(o);if(i){var a=i[0].length,s=e.substr(a),u=this._atob(s);this.sourceCache[e]=u,t(u)}else r(new Error("The encoding of the inline sourcemap is not supported"))}else{var c=this.ajax(e,{method:"get"});this.sourceCache[e]=c,c.then(t,r)}}.bind(this))},this._getSourceMapConsumer=function(t,r){return new Promise(function(n){if(this.sourceMapConsumerCache[t])n(this.sourceMapConsumerCache[t]);else{var i=new Promise(function(n,i){return this._get(t).then((function(t){"string"==typeof t&&(t=o(t.replace(/^\)\]\}'/,""))),void 0===t.sourceRoot&&(t.sourceRoot=r),n(new e.SourceMapConsumer(t))})).catch(i)}.bind(this));this.sourceMapConsumerCache[t]=i,n(i)}}.bind(this))},this.pinpoint=function(e){return new Promise(function(t,r){this.getMappedLocation(e).then(function(e){function r(){t(e)}this.findFunctionName(e).then(t,r).catch(r)}.bind(this),r)}.bind(this))},this.findFunctionName=function(e){return new Promise(function(r,n){u(e),this._get(e.fileName).then((function(n){var o=e.lineNumber,a=e.columnNumber,s=i(n,o,a);r(s?new t({functionName:s,args:e.args,fileName:e.fileName,lineNumber:o,columnNumber:a}):e)}),n).catch(n)}.bind(this))},this.getMappedLocation=function(e){return new Promise(function(t,r){s(),u(e);var n=this.sourceCache,o=e.fileName;this._get(o).then(function(r){var i=c(r),a="data:"===i.substr(0,5),s=o.substring(0,o.lastIndexOf("/")+1);return"/"===i[0]||a||/^https?:\/\/|^\/\//i.test(i)||(i=s+i),this._getSourceMapConsumer(i,s).then((function(r){return l(e,r,n).then(t).catch((function(){t(e)}))}))}.bind(this),r).catch(r)}.bind(this))}}})?n.apply(t,o):n)||(e.exports=i)}()},693:function(e,t,r){var n,o,i,a=r(505).default;!function(s,u){"use strict";o=[r(948),r(894),r(500)],n=function(e,t,r){var n={filter:function(e){return-1===(e.functionName||"").indexOf("StackTrace$$")&&-1===(e.functionName||"").indexOf("ErrorStackParser$$")&&-1===(e.functionName||"").indexOf("StackTraceGPS$$")&&-1===(e.functionName||"").indexOf("StackGenerator$$")},sourceCache:{}},o=function(){try{throw new Error}catch(e){return e}};function i(e,t){var r={};return[e,t].forEach((function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r})),r}function s(e){return e.stack||e["opera#sourceloc"]}function u(e,t){return"function"==typeof t?e.filter(t):e}return{get:function(e){var t=o();return s(t)?this.fromError(t,e):this.generateArtificially(e)},getSync:function(r){r=i(n,r);var a=o();return u(s(a)?e.parse(a):t.backtrace(r),r.filter)},fromError:function(t,o){o=i(n,o);var a=new r(o);return new Promise(function(r){var n=u(e.parse(t),o.filter);r(Promise.all(n.map((function(e){return new Promise((function(t){function r(){t(e)}a.pinpoint(e).then(t,r).catch(r)}))}))))}.bind(this))},generateArtificially:function(e){e=i(n,e);var r=t.backtrace(e);return"function"==typeof e.filter&&(r=r.filter(e.filter)),Promise.resolve(r)},instrument:function(e,t,r,n){if("function"!=typeof e)throw new Error("Cannot instrument non-function object");if("function"==typeof e.__stacktraceOriginalFn)return e;var o=function(){try{return this.get().then(t,r).catch(r),e.apply(n||this,arguments)}catch(e){throw s(e)&&this.fromError(e).then(t,r).catch(r),e}}.bind(this);return o.__stacktraceOriginalFn=e,o},deinstrument:function(e){if("function"!=typeof e)throw new Error("Cannot de-instrument non-function object");return"function"==typeof e.__stacktraceOriginalFn?e.__stacktraceOriginalFn:e},report:function(e,t,r,n){return new Promise((function(o,i){var s=new XMLHttpRequest;if(s.onerror=i,s.onreadystatechange=function(){4===s.readyState&&(s.status>=200&&s.status<400?o(s.responseText):i(new Error("POST to "+t+" failed with status: "+s.status)))},s.open("post",t),s.setRequestHeader("Content-Type","application/json"),n&&"object"===a(n.headers)){var u=n.headers;for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&s.setRequestHeader(c,u[c])}var l={stack:e};null!=r&&(l.message=r),s.send(JSON.stringify(l))}))}}},void 0===(i="function"==typeof n?n.apply(t,o):n)||(e.exports=i)}()},64:function(t){"use strict";t.exports=e},349:function(e){"use strict";e.exports=t},663:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},342:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},750:function(e){function t(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},811:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},997:function(e,t,r){var n=r(969);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},411:function(e,t,r){var n=r(969);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},644:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},149:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},731:function(e,t,r){var n=r(411);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},25:function(e,t,r){var n=r(505).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new R(n||[]);return s(i,"_invoke",{value:A(e,r,a)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var g="suspendedStart",v="executing",m="completed",y={};function b(){}function w(){}function x(){}var S={};h(S,c,(function(){return this}));var _=Object.getPrototypeOf,E=_&&_(_(T([])));E&&E!==i&&a.call(E,c)&&(S=E);var k=x.prototype=b.prototype=Object.create(S);function C(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,s,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var o=g;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=L(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===g)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=d(e,r,n);if("normal"===c.type){if(o=n.done?m:"suspendedYield",c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=x,s(k,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:w,configurable:!0}),w.displayName=h(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,h(e,f,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},C(O.prototype),h(O.prototype,l,(function(){return this})),r.AsyncIterator=O,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new O(p(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(k),h(k,f,"Generator"),h(k,c,(function(){return this})),h(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=T,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},488:function(e,t,r){var n=r(342),o=r(644),i=r(239),a=r(149);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},159:function(e,t,r){var n=r(505).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},969:function(e,t,r){var n=r(505).default,o=r(159);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},505:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},239:function(e,t,r){var n=r(663);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e].call(r.exports,r,r.exports,a),r.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);a.r(o);var i={};r=r||[null,n({}),n([]),n(n)];for(var s=2&t&&e;"object"==typeof s&&!~r.indexOf(s);s=n(s))Object.getOwnPropertyNames(s).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},a.d(o,i),o},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return function(){"use strict";a.r(s),a.d(s,{LoggerSDK:function(){return Be}});var e=a(25),t=a.n(e),r=a(750),n=a.n(r),o=a(488),i=a.n(o),u=a(811),c=a.n(u),l=a(997),f=a.n(l),h=a(411),p=a.n(h),d=a(693),g=a.n(d);function v(e){return m.apply(this,arguments)}function m(){return(m=n()(t()().mark((function e(r){var n;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g().fromError(r);case 2:return n=e.sent,e.abrupt("return",n.slice(0,5).map((function(e){return{file:e.fileName||"",line:e.lineNumber||0,column:e.columnNumber||0,function:e.functionName||void 0}})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var y=a(505),b=a.n(y),w=(a(179).lW,function(){return Date.now()});function x(e){var t=new WeakSet;return JSON.stringify(e,(function(e,r){if(r&&"object"===b()(r)){if(t.has(r))return"[Circular]";t.add(r)}return r}))}function S(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e&&(t=console).debug.apply(t,["[LoggerSDK]"].concat(n))}function _(e){return E.apply(this,arguments)}function E(){return(E=n()(t()().mark((function e(r){var n;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",{location:"",throwable:""});case 2:return e.next=4,v(r);case 4:return n=e.sent,e.abrupt("return",n&&n.length>0?{location:[n[0]].map((function(e){return"".concat(e.file,":").concat(e.line,":").concat(e.column)})).join("\n\t"),throwable:n.map((function(e){return"".concat(e.file,":").concat(e.line,":").concat(e.column)})).join("\n\t")}:{location:"",throwable:""});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var k=function(e){switch(e){case"product":default:return"https://apm.pharmacyyf.com";case"testing":return"https://apm-te.pharmacyyf.com";case"develop":return"https://chief-dev.yifengx.com"}},C=function(e){return"".concat(k(e),"/yfcloud-apm/log/front/batchSave")};function O(){try{return"undefined"!=typeof window&&void 0!==window.document}catch(e){return!1}}function A(){try{return"undefined"!=typeof wx&&"function"==typeof wx.getSystemInfo}catch(e){return!1}}function L(){if(A())try{var e=getCurrentPages();if(e&&e.length>0)return e[e.length-1].route||""}catch(e){return""}return O()?window.location.href:""}function M(){var e=function(){var e={platform:"unknown"};if(A()){e.platform="wechat";try{var t=wx.getSystemInfoSync();e.systemInfo={brand:t.brand,model:t.model,system:t.system,platform:t.platform,version:t.version,SDKVersion:t.SDKVersion},e.screenWidth=t.screenWidth,e.screenHeight=t.screenHeight,e.language=t.language}catch(e){}}else O()&&(e.platform="browser",e.userAgent=navigator.userAgent,e.screenWidth=window.screen.width,e.screenHeight=window.screen.height,e.language=navigator.language);return e}(),t={platform:e.platform};if("browser"===e.platform&&e.userAgent){var r=function(e){var t=e.toLowerCase(),r="Unknown",n="",o="Unknown",a="";if(t.indexOf("chrome")>-1&&-1===t.indexOf("edge")){r="Chrome";var s=t.match(/chrome\/(\d+\.\d+)/);n=s?s[1]:""}else if(t.indexOf("safari")>-1&&-1===t.indexOf("chrome")){r="Safari";var u=t.match(/version\/(\d+\.\d+)/);n=u?u[1]:""}else if(t.indexOf("firefox")>-1){r="Firefox";var c=t.match(/firefox\/(\d+\.\d+)/);n=c?c[1]:""}else if(t.indexOf("edge")>-1){r="Edge";var l=t.match(/edge\/(\d+\.\d+)/);n=l?l[1]:""}if(t.indexOf("iphone")>-1||t.indexOf("ipad")>-1){o="iOS";var f=t.match(/os (\d+[._]\d+)/);a=f?f[1].replace("_","."):""}else if(t.indexOf("windows")>-1)o="Windows",t.indexOf("windows nt 10")>-1?a="10":t.indexOf("windows nt 6.3")>-1?a="8.1":t.indexOf("windows nt 6.2")>-1?a="8":t.indexOf("windows nt 6.1")>-1&&(a="7");else if(t.indexOf("mac os")>-1){o="macOS";var h=t.match(/mac os x (\d+[._]\d+)/);a=h?h[1].replace("_","."):""}else if(t.indexOf("android")>-1){o="Android";var p=t.match(/android (\d+(?:\.\d+)?)/);p?-1===(a=i()(p,2)[1]).indexOf(".")&&(a="".concat(a,".0")):a=""}else t.indexOf("linux")>-1&&(o="Linux");return{browser:r,browserVersion:n,os:o,osVersion:a}}(e.userAgent);t.browser=r.browser,t.browserVersion=r.browserVersion,t.os=r.os,t.osVersion=r.osVersion,t.screenWidth=e.screenWidth,t.screenHeight=e.screenHeight,t.language=e.language}else"wechat"===e.platform&&e.systemInfo&&(t.brand=e.systemInfo.brand,t.model=e.systemInfo.model,t.system=e.systemInfo.system,t.wechatVersion=e.systemInfo.version,t.SDKVersion=e.systemInfo.SDKVersion,t.screenWidth=e.screenWidth,t.screenHeight=e.screenHeight,t.language=e.language);return t}var I=a(731),R=a.n(I),T=Uint8Array,B=Uint16Array,P=Int32Array,j=new T([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),N=new T([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),U=new T([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),q=function(e,t){for(var r=new B(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var o=new P(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return{b:r,r:o}},z=q(j,2),D=z.b,F=z.r;D[28]=258,F[258]=28;for(var G=q(N,0),W=(G.b,G.r),$=new B(32768),K=0;K<32768;++K){var J=(43690&K)>>1|(21845&K)<<1;J=(61680&(J=(52428&J)>>2|(13107&J)<<2))>>4|(3855&J)<<4,$[K]=((65280&J)>>8|(255&J)<<8)>>1}var H=function(e,t,r){for(var n=e.length,o=0,i=new B(t);o<n;++o)e[o]&&++i[e[o]-1];var a,s=new B(t);for(o=1;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(r){a=new B(1<<t);var u=15-t;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],l=t-e[o],f=s[e[o]-1]++<<l,h=f|(1<<l)-1;f<=h;++f)a[$[f]>>u]=c}else for(a=new B(n),o=0;o<n;++o)e[o]&&(a[o]=$[s[e[o]-1]++]>>15-e[o]);return a},V=new T(288);for(K=0;K<144;++K)V[K]=8;for(K=144;K<256;++K)V[K]=9;for(K=256;K<280;++K)V[K]=7;for(K=280;K<288;++K)V[K]=8;var Y=new T(32);for(K=0;K<32;++K)Y[K]=5;var Q=H(V,9,0),Z=H(Y,5,0),X=function(e){return(e+7)/8|0},ee=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new T(e.subarray(t,r))},te=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},re=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},ne=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,i=r.slice();if(!o)return{t:le,l:0};if(1==o){var a=new T(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var s=r[0],u=r[1],c=0,l=1,f=2;for(r[0]={s:-1,f:s.f+u.f,l:s,r:u};l!=o-1;)s=r[r[c].f<r[f].f?c++:f++],u=r[c!=l&&r[c].f<r[f].f?c++:f++],r[l++]={s:-1,f:s.f+u.f,l:s,r:u};var h=i[0].s;for(n=1;n<o;++n)i[n].s>h&&(h=i[n].s);var p=new B(h+1),d=oe(r[l-1],p,0);if(d>t){n=0;var g=0,v=d-t,m=1<<v;for(i.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));n<o;++n){var y=i[n].s;if(!(p[y]>t))break;g+=m-(1<<d-p[y]),p[y]=t}for(g>>=v;g>0;){var b=i[n].s;p[b]<t?g-=1<<t-p[b]++-1:++n}for(;n>=0&&g;--n){var w=i[n].s;p[w]==t&&(--p[w],++g)}d=t}return{t:new T(p),l:d}},oe=function e(t,r,n){return-1==t.s?Math.max(e(t.l,r,n+1),e(t.r,r,n+1)):r[t.s]=n},ie=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new B(++t),n=0,o=e[0],i=1,a=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[s]}return{c:r.subarray(0,n),n:t}},ae=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},se=function(e,t,r){var n=r.length,o=X(t+2);e[o]=255&n,e[o+1]=n>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<n;++i)e[o+i+4]=r[i];return 8*(o+4+n)},ue=function(e,t,r,n,o,i,a,s,u,c,l){te(t,l++,r),++o[256];for(var f=ne(o,15),h=f.t,p=f.l,d=ne(i,15),g=d.t,v=d.l,m=ie(h),y=m.c,b=m.n,w=ie(g),x=w.c,S=w.n,_=new B(19),E=0;E<y.length;++E)++_[31&y[E]];for(E=0;E<x.length;++E)++_[31&x[E]];for(var k=ne(_,7),C=k.t,O=k.l,A=19;A>4&&!C[U[A-1]];--A);var L,M,I,R,T=c+5<<3,P=ae(o,V)+ae(i,Y)+a,q=ae(o,h)+ae(i,g)+a+14+3*A+ae(_,C)+2*_[16]+3*_[17]+7*_[18];if(u>=0&&T<=P&&T<=q)return se(t,l,e.subarray(u,u+c));if(te(t,l,1+(q<P)),l+=2,q<P){L=H(h,p,0),M=h,I=H(g,v,0),R=g;var z=H(C,O,0);te(t,l,b-257),te(t,l+5,S-1),te(t,l+10,A-4),l+=14;for(E=0;E<A;++E)te(t,l+3*E,C[U[E]]);l+=3*A;for(var D=[y,x],F=0;F<2;++F){var G=D[F];for(E=0;E<G.length;++E){var W=31&G[E];te(t,l,z[W]),l+=C[W],W>15&&(te(t,l,G[E]>>5&127),l+=G[E]>>12)}}}else L=Q,M=V,I=Z,R=Y;for(E=0;E<s;++E){var $=n[E];if($>255){re(t,l,L[(W=$>>18&31)+257]),l+=M[W+257],W>7&&(te(t,l,$>>23&31),l+=j[W]);var K=31&$;re(t,l,I[K]),l+=R[K],K>3&&(re(t,l,$>>5&8191),l+=N[K])}else re(t,l,L[$]),l+=M[$]}return re(t,l,L[256]),l+M[256]},ce=new P([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),le=new T(0),fe=function(e,t,r,n,o,i){var a=i.z||e.length,s=new T(n+a+5*(1+Math.ceil(a/7e3))+o),u=s.subarray(n,s.length-o),c=i.l,l=7&(i.r||0);if(t){l&&(u[0]=i.r>>3);for(var f=ce[t-1],h=f>>13,p=8191&f,d=(1<<r)-1,g=i.p||new B(32768),v=i.h||new B(d+1),m=Math.ceil(r/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&d},w=new P(25e3),x=new B(288),S=new B(32),_=0,E=0,k=i.i||0,C=0,O=i.w||0,A=0;k+2<a;++k){var L=b(k),M=32767&k,I=v[L];if(g[M]=I,v[L]=M,O<=k){var R=a-k;if((_>7e3||C>24576)&&(R>423||!c)){l=ue(e,u,0,w,x,S,E,C,A,k-A,l),C=_=E=0,A=k;for(var U=0;U<286;++U)x[U]=0;for(U=0;U<30;++U)S[U]=0}var q=2,z=0,D=p,G=M-I&32767;if(R>2&&L==b(k-G))for(var $=Math.min(h,R)-1,K=Math.min(32767,k),J=Math.min(258,R);G<=K&&--D&&M!=I;){if(e[k+q]==e[k+q-G]){for(var H=0;H<J&&e[k+H]==e[k+H-G];++H);if(H>q){if(q=H,z=G,H>$)break;var V=Math.min(G,H-2),Y=0;for(U=0;U<V;++U){var Q=k-G+U&32767,Z=Q-g[Q]&32767;Z>Y&&(Y=Z,I=Q)}}}G+=(M=I)-(I=g[M])&32767}if(z){w[C++]=268435456|F[q]<<18|W[z];var te=31&F[q],re=31&W[z];E+=j[te]+N[re],++x[257+te],++S[re],O=k+q,++_}else w[C++]=e[k],++x[e[k]]}}for(k=Math.max(k,O);k<a;++k)w[C++]=e[k],++x[e[k]];l=ue(e,u,c,w,x,S,E,C,A,k-A,l),c||(i.r=7&l|u[l/8|0]<<3,l-=7,i.h=v,i.p=g,i.i=k,i.w=O)}else{for(k=i.w||0;k<a+c;k+=65535){var ne=k+65535;ne>=a&&(u[l/8|0]=c,ne=a),l=se(u,l+1,e.subarray(k,ne))}i.i=a}return ee(s,0,n+X(l)+o)},he=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),pe=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=he[255&r^t[n]]^r>>>8;e=r},d:function(){return~e}}},de=function(e,t,r,n,o){if(!o&&(o={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),a=new T(i.length+e.length);a.set(i),a.set(e,i.length),e=a,o.w=i.length}return fe(e,null==t.level?6:t.level,null==t.mem?o.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,o)},ge=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},ve=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ge(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}},me=function(e){return 10+(e.filename?e.filename.length+1:0)};function ye(e,t){t||(t={});var r=pe(),n=e.length;r.p(e);var o=de(e,t,me(t),8),i=o.length;return ve(o,t),ge(o,i-8,r.d()),ge(o,i-4,n),o}var be="undefined"!=typeof TextDecoder&&new TextDecoder;try{be.decode(le,{stream:!0}),1}catch(e){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var we=a(64),xe=a(179).lW;function Se(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var t=encodeURIComponent(e),r=[],n=0;n<t.length;n+=1){var o=t[n];"%"===o?(r.push(parseInt(t.slice(n+1,n+3),16)),n+=2):r.push(o.charCodeAt(0))}return new Uint8Array(r)}function _e(e){return Ee.apply(this,arguments)}function Ee(){return Ee=n()(t()().mark((function e(r){var n,o,i,a,s,u,c,l,f,h,p;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!O()||"undefined"==typeof CompressionStream){e.next=21;break}return e.prev=1,n=new TextEncoder,o=n.encode(r),i=new CompressionStream("gzip"),a=new Blob([o]).stream(),s=a.pipeThrough(i),e.next=9,new Response(s).arrayBuffer();case 9:for(u=e.sent,c=new Uint8Array(u),l="",f=0;f<c.byteLength;f+=1)l+=String.fromCharCode(c[f]);if("undefined"==typeof btoa){e.next=15;break}return e.abrupt("return",btoa(l));case 15:return e.abrupt("return",xe.from(l,"base64").toString("base64"));case 18:e.prev=18,e.t0=e.catch(1),console.log("gzipCompress 压缩失败,尝试使用 fflate 库",e.t0);case 21:return e.prev=21,h=Se(r),p=ye(h),e.abrupt("return",we.Base64.fromUint8Array(p,!1));case 27:e.prev=27,e.t1=e.catch(21),console.log("gzipCompress 压缩失败",e.t1);case 30:return e.abrupt("return",we.Base64.encode(r,!1));case 31:case"end":return e.stop()}}),e,null,[[1,18],[21,27]])}))),Ee.apply(this,arguments)}var ke=function(){function e(t){c()(this,e),p()(this,"name","beacon"),p()(this,"opts",void 0),this.opts=t}var r;return f()(e,[{key:"isSupported",value:function(){return O()&&"undefined"!=typeof navigator&&navigator.sendBeacon&&"function"==typeof navigator.sendBeacon}},{key:"send",value:(r=n()(t()().mark((function e(r){var n,o,i,a,s,u,c,l,f,h,p;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s="string"==typeof r?r:x(r),u=C((null===(n=this.opts)||void 0===n?void 0:n.env)||"develop"),c="application/json",null===(o=this.opts)||void 0===o||!o.enableGzip||null!==(i=this.opts)&&void 0!==i&&i.gzipOnlyInBatchMode&&!(r.items.length>0)){e.next=9;break}return e.next=6,_e(x(r.items));case 6:l=e.sent,s=x(R()(R()({},r),{},{items:l})),c="application/json; charset=utf-8";case 9:return f=new Blob([s],{type:c}),h=navigator.sendBeacon(u,f),S(!(null===(a=this.opts)||void 0===a||!a.debug),"sendBeacon result",h),h||S(!(null===(p=this.opts)||void 0===p||!p.debug),"sendBeacon failed (queue full or other error)"),e.abrupt("return",Promise.resolve());case 14:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})}]),e}(),Ce=function(){function e(t){c()(this,e),p()(this,"name","image"),p()(this,"opts",void 0),this.opts=t}var r;return f()(e,[{key:"isSupported",value:function(){return O()&&"undefined"!=typeof Image}},{key:"send",value:(r=n()(t()().mark((function e(r){var n,o,i,a,s,u,c,l,f,h,p,d,g,v,m,y,b,_,E,C,O,A=this;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=x(r.items),t=(null===(n=this.opts)||void 0===n?void 0:n.env)||"develop",f="".concat(k(t),"/yfcloud-apm/log/front/pixelBatchSave"),h="items",p=(null===(o=this.opts)||void 0===o?void 0:o.maxPixelUrlLen)||8192,null===(i=this.opts)||void 0===i||!i.enableGzip||null!==(a=this.opts)&&void 0!==a&&a.gzipOnlyInBatchMode&&!(r.items.length>0)){e.next=15;break}return b=w(),S(!(null===(g=this.opts)||void 0===g||!g.debug),"PixelImage request gzip compress body: ",l),e.next=9,_e(l);case 9:d=e.sent,S(!(null===(v=this.opts)||void 0===v||!v.debug),"PixelImage request gzip compress cost: ",w()-b),S(!(null===(m=this.opts)||void 0===m||!m.debug),"original body size: ".concat(l.length,", compressed body size: ").concat(d.length)),S(!(null===(y=this.opts)||void 0===y||!y.debug),"PixelImage request gzip compress body: ",d),e.next=16;break;case 15:d=we.Base64.encode(l,!1);case 16:return _="_=".concat(Date.now()),E="appId=".concat((null===(s=this.opts)||void 0===s?void 0:s.appId)||"","&appStage=").concat((null===(u=this.opts)||void 0===u?void 0:u.logStage)||"","&").concat(h,"=").concat(encodeURIComponent(d),"&gzip=").concat(null!==(c=this.opts)&&void 0!==c&&c.enableGzip?1:0,"&").concat(_),(C=f.includes("?")?"".concat(f,"&").concat(E):"".concat(f,"?").concat(E)).length>p&&S(!(null===(O=this.opts)||void 0===O||!O.debug),"URL too long (".concat(C.length," > ").concat(p,")")),e.abrupt("return",new Promise((function(e,t){var r,n=new Image,o=!1;r=setTimeout((function(){o||(o=!0,n.src="",t(new Error("Image request timeout after 5000ms")))}),5e3),n.onload=function(){r&&clearTimeout(r),o||(o=!0,e())},n.onerror=function(t,n,i,a,s){var u,c;S(!(null===(u=A.opts)||void 0===u||!u.debug),"Image request failed",t,n,i,a,s),r&&clearTimeout(r),o||(o=!0,S(!(null===(c=A.opts)||void 0===c||!c.debug),"Image request failed",t,n,i,a,s),e())},n.src=C})));case 21:case"end":return e.stop()}var t}),e,this)}))),function(e){return r.apply(this,arguments)})}]),e}(),Oe=function(){function e(t){c()(this,e),p()(this,"name","wechat"),p()(this,"opts",void 0),this.opts=t}var r;return f()(e,[{key:"isSupported",value:function(){return A()}},{key:"send",value:(r=n()(t()().mark((function e(r){var n,o,i,a,s,u,c,l,f,h,p,d=this;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a="string"==typeof r?r:x(r),s=C((null===(n=this.opts)||void 0===n?void 0:n.env)||"develop"),u=1e4,c="application/json",null===(o=this.opts)||void 0===o||!o.enableGzip||null!==(i=this.opts)&&void 0!==i&&i.gzipOnlyInBatchMode&&!(r.items.length>0)){e.next=13;break}return h=w(),S(!(null===(l=this.opts)||void 0===l||!l.debug),"WeChat request enable gzip compress: ",h),e.next=9,_e(x(r.items));case 9:p=e.sent,a=x(R()(R()({},r),{},{items:p})),S(!(null===(f=this.opts)||void 0===f||!f.debug),"WeChat request gzip compress cost: ",w()-h),c="application/json; charset=utf-8";case 13:return e.abrupt("return",new Promise((function(e,t){var r,n,o=!1;n=setTimeout((function(){o||(o=!0,t(new Error("WeChat request timeout after ".concat(u,"ms"))))}),u),wx.request({url:s,method:"POST",data:a,header:{"Content-Type":c,token:(null===(r=d.opts)||void 0===r?void 0:r.token)||""},success:function(r){n&&clearTimeout(n),o||(o=!0,r.statusCode>=200&&r.statusCode<300?e():t(new Error("HTTP ".concat(r.statusCode))))},fail:function(e){var r;n&&clearTimeout(n),o||(o=!0,S(!(null===(r=this.opts)||void 0===r||!r.debug),"WeChat request failed",e),t(new Error("WeChat request failed: ".concat(e.errMsg||"unknown error"))))}})})));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})}]),e}(),Ae=function(){function e(t){c()(this,e),p()(this,"beaconTransport",void 0),p()(this,"pixelImageTransport",void 0),p()(this,"wechatTransport",void 0),this.beaconTransport=new ke(t),this.pixelImageTransport=new Ce(t),this.wechatTransport=new Oe(t)}return f()(e,[{key:"getTransporter",value:function(){if(A())return this.wechatTransport;var e=[this.beaconTransport,this.pixelImageTransport].find((function(e){return e.isSupported()}));return e||this.pixelImageTransport}}],[{key:"getInstance",value:function(t){return e.instance||(e.instance=new e(t)),e.instance}}]),e}();function Le(){return"".concat(Date.now(),"_").concat(Math.random().toString(36).substring(2,15))}function Me(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.floor(16*Math.random());return("x"===e?t:Math.floor(t%4+8)).toString(16)}))}p()(Ae,"instance",void 0);var Ie=function(){function e(){c()(this,e)}var r;return f()(e,null,[{key:"post",value:(r=n()(t()().mark((function e(r,n,o){return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S(!0,"post",r,n,o),!A()){e.next=3;break}return e.abrupt("return",new Promise((function(e,t){wx.request({url:r,method:"POST",data:JSON.stringify(n),header:{"Content-Type":"application/json",Authorization:"Bearer ".concat(o)},success:function(t){return e({type:"wechat",response:t})},fail:function(e){return t({type:"wechat",error:e})}})})));case 3:if("undefined"!=typeof fetch){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){var i=new XMLHttpRequest;i.open("POST",r,!0),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Authorization","Bearer ".concat(o)),i.onreadystatechange=function(){4===i.readyState&&(200===i.status?e({type:"xhr",response:i.responseText}):t({type:"xhr",error:new Error(i.statusText)}))},i.send(JSON.stringify(n))})));case 5:return e.abrupt("return",new Promise((function(e,t){fetch(r,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(o)}}).then((function(t){return e({type:"fetch",response:t})})).catch((function(e){return t({type:"fetch",error:e})}))})));case 6:case"end":return e.stop()}}),e)}))),function(e,t,n){return r.apply(this,arguments)})}]),e}(),Re=function(){function e(t){var r=this;c()(this,e),p()(this,"queue",[]),p()(this,"opts",void 0),p()(this,"storageKey",void 0),p()(this,"localforage",null),this.opts=t,this.storageKey="".concat(t.storagePrefix,"_queue"),this.loadLocalForage().then((function(){r.opts.enableStorage&&r.loadFromStorage()}))}var r,o;return f()(e,[{key:"loadLocalForage",value:(o=n()(t()().mark((function e(){var r=this;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{O()&&Promise.resolve().then(a.t.bind(a,349,23)).then((function(e){r.localforage=e,S(!!r.opts.debug,e)}))}catch(e){S(!!this.opts.debug,"localforage load error",e)}return e.abrupt("return",null);case 2:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"enqueue",value:function(e){return this.queue.length>=this.opts.maxSize&&(this.queue.shift(),S(!!this.opts.debug,"Queue full, dropped oldest event")),this.queue.push(e),S(!!this.opts.debug,"Enqueued event",e),this.opts.enableStorage&&this.saveToStorage(),!0}},{key:"peek",value:function(e){return this.queue.slice(0,e)}},{key:"dequeue",value:function(e){var t=this.queue.splice(0,e);return S(!!this.opts.debug,"Dequeued ".concat(t.length," events")),this.opts.enableStorage&&this.saveToStorage(),t}},{key:"size",value:function(){return this.queue.length}},{key:"clear",value:function(){this.queue=[],S(!!this.opts.debug,"Queue cleared"),this.opts.enableStorage&&this.removeFromStorage()}},{key:"loadFromStorage",value:(r=n()(t()().mark((function e(){var r,n,o,i,a;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r=null,!A()){e.next=6;break}r=wx.getStorageSync(this.storageKey),e.next=30;break;case 6:if(!O()){e.next=30;break}if(this.localforage){e.next=10;break}return e.next=10,this.loadLocalForage();case 10:if(e.prev=10,!this.localforage){e.next=17;break}return e.next=14,this.localforage.getItem(this.storageKey);case 14:e.t0=e.sent,e.next=18;break;case 17:e.t0=null;case 18:if(n=e.t0,!Array.isArray(n)){e.next=23;break}return this.queue=n.slice(0,this.opts.maxSize),S(!!this.opts.debug,"Loaded ".concat(this.queue.length," events from IndexedDB")),e.abrupt("return");case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(10),S(!!this.opts.debug,"IndexedDB load error, falling back to localStorage",e.t1);case 28:if("undefined"!=typeof localStorage&&(o=localStorage.getItem(this.storageKey)))try{i=JSON.parse(o),Array.isArray(i)&&(this.queue=i.slice(0,this.opts.maxSize),S(!!this.opts.debug,"Loaded ".concat(this.queue.length," events from localStorage")))}catch(e){}return e.abrupt("return");case 30:r&&(a=JSON.parse(r),Array.isArray(a)&&(this.queue=a.slice(0,this.opts.maxSize),S(!!this.opts.debug,"Loaded ".concat(this.queue.length," events from storage")))),e.next=36;break;case 33:e.prev=33,e.t2=e.catch(0),S(!!this.opts.debug,"Failed to load queue from storage",e.t2);case 36:case"end":return e.stop()}}),e,this,[[0,33],[10,25]])}))),function(){return r.apply(this,arguments)})},{key:"saveToStorage",value:function(){var e=this;try{var t=x(this.queue);if(A())wx.setStorageSync(this.storageKey,t);else if(O()){var r=function(){"undefined"!=typeof localStorage&&(localStorage.setItem(e.storageKey,t),S(!!e.opts.debug,"Saved ".concat(e.queue.length," events to localStorage")))};this.localforage?this.localforage.setItem(this.storageKey,this.queue).then((function(){S(!!e.opts.debug,"Saved ".concat(e.queue.length," events to IndexedDB"))})).catch((function(t){S(!!e.opts.debug,"IndexedDB save error, falling back to localStorage",t),r()})):this.loadLocalForage().then((function(){return e.localforage?e.localforage.setItem(e.storageKey,e.queue).then((function(){S(!!e.opts.debug,"Saved ".concat(e.queue.length," events to IndexedDB"))})).catch((function(t){S(!!e.opts.debug,"IndexedDB save error, falling back to localStorage",t),r()})):(r(),null)})).catch((function(t){S(!!e.opts.debug,"IndexedDB save error, falling back to localStorage",t),r()}))}}catch(e){S(!!this.opts.debug,"Failed to save queue to storage",e)}}},{key:"removeFromStorage",value:function(){var e=this;try{if(A())wx.removeStorageSync(this.storageKey);else if(O()){var t=function(){"undefined"!=typeof localStorage&&(localStorage.removeItem(e.storageKey),S(!!e.opts.debug,"Removed queue from localStorage"))};this.localforage?this.localforage.removeItem(this.storageKey).then((function(){S(!!e.opts.debug,"Removed queue from IndexedDB")})).catch((function(r){S(!!e.opts.debug,"IndexedDB remove error, falling back to localStorage",r),t()})):this.loadLocalForage().then((function(){return e.localforage?e.localforage.removeItem(e.storageKey).then((function(){S(!!e.opts.debug,"Removed queue from IndexedDB")})).catch((function(r){S(!!e.opts.debug,"IndexedDB remove error, falling back to localStorage",r),t()})):(t(),null)})).catch((function(r){S(!!e.opts.debug,"IndexedDB remove error, falling back to localStorage",r),t()}))}}catch(e){S(!!this.opts.debug,"Failed to remove queue from storage",e)}}}]),e}(),Te=function(){function e(t){c()(this,e),p()(this,"opts",void 0),p()(this,"retryingTasks",new Map),this.opts=t}var r,o;return f()(e,[{key:"executeWithRetry",value:(o=n()(t()().mark((function e(r,n){var o,i;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.retryingTasks.has(r)){e.next=3;break}throw S(!!this.opts.debug,"Task ".concat(r," already retrying, skipped")),new Error("Task ".concat(r," already retrying"));case 3:return o={id:r,fn:n,retries:0,maxRetries:this.opts.maxRetries,baseDelay:this.opts.baseDelay,useBackoff:this.opts.useBackoff},this.retryingTasks.set(r,o),e.prev=5,e.next=8,this.executeTask(o);case 8:return i=e.sent,this.retryingTasks.delete(r),e.abrupt("return",i);case 13:throw e.prev=13,e.t0=e.catch(5),this.retryingTasks.delete(r),e.t0;case 17:case"end":return e.stop()}}),e,this,[[5,13]])}))),function(e,t){return o.apply(this,arguments)})},{key:"executeTask",value:(r=n()(t()().mark((function r(n){var o,i;return t()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n.retries<=n.maxRetries)){t.next=21;break}return t.prev=1,t.next=4,n.fn();case 4:return o=t.sent,n.retries>0&&S(!!this.opts.debug,"Task ".concat(n.id," succeeded after ").concat(n.retries," retries")),t.abrupt("return",o);case 9:if(t.prev=9,t.t0=t.catch(1),n.retries+=1,!(n.retries>n.maxRetries)){t.next=15;break}throw S(!!this.opts.debug,"Task ".concat(n.id," failed after ").concat(n.maxRetries," retries")),t.t0;case 15:return i=e.calculateDelay(n.retries,n.baseDelay,n.useBackoff),S(!!this.opts.debug,"Task ".concat(n.id," failed (attempt ").concat(n.retries,"/").concat(n.maxRetries,"), retrying in ").concat(i,"ms")),t.next=19,e.sleep(i);case 19:t.next=0;break;case 21:throw new Error("Task ".concat(n.id," exceeded max retries"));case 22:case"end":return t.stop()}}),r,this,[[1,9]])}))),function(e){return r.apply(this,arguments)})},{key:"getRetryingCount",value:function(){return this.retryingTasks.size}},{key:"clear",value:function(){this.retryingTasks.clear()}}],[{key:"calculateDelay",value:function(e,t,r){if(!r)return t;var n=t*Math.pow(2,e-1),o=.3*Math.random()*n;return Math.min(n+o,3e4)}},{key:"sleep",value:function(e){return new Promise((function(t){return setTimeout(t,e)}))}}]),e}(),Be=function(){function e(){c()(this,e),p()(this,"opts",void 0),p()(this,"seq",0),p()(this,"closed",!1),p()(this,"envTags",{}),p()(this,"initialized",!1),p()(this,"sessionId",void 0),p()(this,"queueManager",void 0),p()(this,"retryManager",void 0),p()(this,"transporter",void 0),p()(this,"batchTimer",void 0),p()(this,"isSending",!1),p()(this,"collectSwitch",0),p()(this,"collectLogLevel",[]),p()(this,"recentAutoEvents",new Map),p()(this,"offJs",void 0),p()(this,"offPromise",void 0),p()(this,"offResource",void 0),p()(this,"offWxError",void 0),p()(this,"offWxUnhandled",void 0),this.sessionId=Le()}var r,o,a,s,u,l;return f()(e,[{key:"init",value:function(e){var r=this;this.opts={appId:"".concat(e.appId,"-frontend")||0,env:e.env||"develop",logStage:e.logStage,debug:!!e.debug,enableGzip:!1!==e.enableGzip,gzipOnlyInBatchMode:!1!==e.gzipOnlyInBatchMode,maxPixelUrlLen:e.maxPixelUrlLen||8192,enableBatch:!0===e.enableBatch,batchSize:e.batchSize||20,batchInterval:e.batchInterval||15e3,maxQueueSize:e.maxQueueSize||100,enableStorage:!0===e.enableBatch||!1!==e.enableStorage,storagePrefix:e.storagePrefix||"logger_sdk",enableRetry:!1!==e.enableRetry,maxRetries:e.maxRetries||3,retryDelay:e.retryDelay||1e3,retryBackoff:!1!==e.retryBackoff,userId:e.userId,storeCode:e.storeCode,token:e.token,sampleRate:"number"==typeof e.sampleRate?e.sampleRate:1,levelSampleRate:e.levelSampleRate||{ERROR:.8,WARN:.5,INFO:.1,FATAL:1},sourceSampleRate:e.sourceSampleRate||{js:.8,promise:.5,resource:.2,custom:1},pathSampleRate:e.pathSampleRate||{"/":1},enableAutoCapture:!1!==e.enableAutoCapture,autoCapture:e.autoCapture||{js:!0,promise:!0,resource:!0,wechat:!0}},this.opts.enableBatch&&(this.queueManager=new Re({maxSize:this.opts.maxQueueSize,enableStorage:this.opts.enableStorage,storagePrefix:this.opts.storagePrefix,debug:this.opts.debug})),this.opts.enableRetry&&(this.retryManager=new Te({maxRetries:this.opts.maxRetries,baseDelay:this.opts.retryDelay,useBackoff:this.opts.retryBackoff,debug:this.opts.debug})),this.transporter=Ae.getInstance(this.opts).getTransporter(),this.sessionId=Le(),this.envTags=M(),this.initSDK(this.opts,(function(e){var o,i,a;r.collectSwitch=e.collectSwitch,r.collectLogLevel=e.collectLogLevel,r.opts.sampleRate=e.samplingRate,null!==(o=r.opts)&&void 0!==o&&o.enableBatch&&r.startBatchTimer(),r.initialized=!0,r.attachUnloadHandlers();var s,u,c,l,f,h=!1!==(null===(i=r.opts)||void 0===i?void 0:i.enableAutoCapture),p=(null===(a=r.opts)||void 0===a?void 0:a.autoCapture)||{};h&&!1!==p.js&&(r.offJs=function(e,r){if("undefined"!=typeof window){var o=function(){var o=n()(t()().mark((function n(o){var i;return t()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S(e,"registerJsErrorCapture error",o),o.error){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,v(o.error);case 5:i=t.sent,r({type:"js",message:o.error.message,stack:i,throwable:o.error.stack||""});case 7:case"end":return t.stop()}}),n)})));return function(e){return o.apply(this,arguments)}}();return window.addEventListener("error",o),function(){return window.removeEventListener("error",o)}}}(!(null===(s=r.opts)||void 0===s||!s.debug),r.trackInner.bind(r)));h&&!1!==p.promise&&(r.offPromise=function(e,r){if("undefined"!=typeof window){var o=function(){var o=n()(t()().mark((function n(o){var i,a;return t()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S(e,"registerPromiseErrorCapture unhandledrejection",o),!((i=o.reason)instanceof Error)){t.next=7;break}return t.next=5,v(i);case 5:a=t.sent,r({type:"promise",message:i.message,stack:a,throwable:i.stack||""});case 7:case"end":return t.stop()}}),n)})));return function(e){return o.apply(this,arguments)}}();return window.addEventListener("unhandledrejection",o),function(){return window.removeEventListener("unhandledrejection",o)}}}(!(null===(u=r.opts)||void 0===u||!u.debug),r.trackInner.bind(r)));h&&!1!==p.resource&&(r.offResource=function(e,t){if("undefined"!=typeof window){var r=function(r){S(e,"registerResourceErrorCapture error",r);var n,o=r.target;(null!=o&&o.src||null!=o&&o.href)&&t({type:"resource",message:"Resource load failed: ".concat((null==o?void 0:o.src)||(null==o?void 0:o.href)),stack:[],throwable:(null==r||null===(n=r.error)||void 0===n?void 0:n.stack)||""})};return window.addEventListener("error",r,!0),function(){return window.removeEventListener("error",r,!0)}}}(!(null===(c=r.opts)||void 0===c||!c.debug),r.trackInner.bind(r)));h&&!1!==p.wechat&&(r.offWxError=function(e,r){if(A())try{var o=globalThis.wx;if(o&&"function"==typeof o.onError){var i=function(){var o=n()(t()().mark((function n(o){var i,a,s,u;return t()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return S(e,"registerWechatErrorCapture onError",o),a=String(null!==(i=null==o?void 0:o.message)&&void 0!==i?i:o),s=o instanceof Error?o:new Error(a),t.next=5,v(s);case 5:u=t.sent,r({type:"js",message:s.message,stack:u,throwable:s.stack||""});case 7:case"end":return t.stop()}}),n)})));return function(e){return o.apply(this,arguments)}}();return o.onError(i),function(){try{o.offError&&o.offError(i)}catch(e){}}}}catch(t){S(e,"registerWechatErrorCapture attach failed",t)}}(!(null===(l=r.opts)||void 0===l||!l.debug),r.trackInner.bind(r)),r.offWxUnhandled=function(e,r){if(A())try{var o=globalThis.wx;if(o&&"function"==typeof o.onUnhandledRejection){var i=function(){var o=n()(t()().mark((function n(o){var i,a,s;return t()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=null==o?void 0:o.reason,S(e,"registerWechatUnhandledCapture onUnhandledRejection",i),a=i instanceof Error?i:new Error(String(i)),t.next=5,v(a);case 5:s=t.sent,r({type:"promise",message:a.message,stack:s,throwable:a.stack||""});case 7:case"end":return t.stop()}}),n)})));return function(e){return o.apply(this,arguments)}}();return o.onUnhandledRejection(i),function(){try{o.offUnhandledRejection&&o.offUnhandledRejection(i)}catch(e){}}}}catch(t){S(e,"registerWechatUnhandledCapture attach failed",t)}}(!(null===(f=r.opts)||void 0===f||!f.debug),r.trackInner.bind(r)))}))}},{key:"identify",value:function(e){var t;S(!(null===(t=this.opts)||void 0===t||!t.debug),"identify",e),this.opts&&(this.opts.userId=e)}},{key:"setStoreCode",value:function(e){var t;S(!(null===(t=this.opts)||void 0===t||!t.debug),"setStoreCode",e),this.opts&&(this.opts.storeCode=e)}},{key:"setStage",value:function(e){var t;S(!(null===(t=this.opts)||void 0===t||!t.debug),"setStage",e),this.opts&&(this.opts.env=e)}},{key:"flattenEnvTags",value:function(){return Object.entries(this.envTags||{}).map((function(e){var t=i()(e,2),r=t[0],n=t[1];return"".concat(r,"=").concat(n)})).join(",")}},{key:"track",value:(l=n()(t()().mark((function e(r){var n,o,i,a,s,u,c,l,f,h,p,d,g,v;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=r.message,i=r.error,a=r.traceId,s=r.logLevel,u=void 0===s?"INFO":s,S(!(null===(n=this.opts)||void 0===n||!n.debug),"track",{message:o,error:i,traceId:a,logLevel:u}),!this.closed){e.next=4;break}return e.abrupt("return");case 4:if(this.initialized){e.next=7;break}return S(!(null===(c=this.opts)||void 0===c||!c.debug),"SDK not initialized, skip track"),e.abrupt("return");case 7:if(this.shouldSend(u,"custom",L(),a,o)){e.next=10;break}return S(!(null===(l=this.opts)||void 0===l||!l.debug),"Event sampled out",{logLevel:u,traceId:a,message:o}),e.abrupt("return");case 10:if(this.seq+=1,f="",h="",!(i instanceof Error)){e.next=28;break}return e.prev=14,e.next=17,_(i);case 17:p=e.sent,d=p.location,g=p.throwable,f=d||"",h=g||i.stack||"",e.next=28;break;case 24:e.prev=24,e.t0=e.catch(14),f="",h=i.stack||"";case 28:v={logId:"".concat(this.opts.appId).concat(Me()).concat(w()),seq:this.seq,appId:this.opts.appId||"unknown",stage:this.opts.logStage,level:u,traceId:a,frontendId:this.sessionId,url:L(),location:f,message:"[message]: ".concat(o,"; [envTags]: ").concat(this.flattenEnvTags(),"; [t]: ").concat(w()),throwable:h,userId:this.opts.userId,storeCode:this.opts.storeCode},this.doTrack(v);case 30:case"end":return e.stop()}}),e,this,[[14,24]])}))),function(e){return l.apply(this,arguments)})},{key:"trackInner",value:function(e){var t,r;if(!this.closed)if(this.initialized){S(!(null===(t=this.opts)||void 0===t||!t.debug),"trackInner",e);var n,o="".concat(e.type,"|").concat((n=e.message,n.replace(/\d+/g,"{n}").replace(/https?:\/\/\S+/g,"{url}").replace(/[a-f0-9]{16,}/gi,"{id}").slice(0,200)),"|").concat(String(this.sessionId||"")),i=w();if(!(i-(this.recentAutoEvents.get(o)||0)<3e3))if(this.recentAutoEvents.set(o,i),this.shouldSend("ERROR",e.type,L(),void 0,e.message)){this.seq+=1;var a,s,u,c,l="",f=(null===(r=e.stack)||void 0===r?void 0:r.map((function(e){return"".concat(e.file,":").concat(e.line,":").concat(e.column)})).join("\n\t"))||"";if(e.stack&&e.stack.length>0)l="".concat(null===(a=e.stack)||void 0===a?void 0:a[0].file,":").concat(null===(s=e.stack)||void 0===s?void 0:s[0].line,":").concat(null===(u=e.stack)||void 0===u?void 0:u[0].column,":").concat(null===(c=e.stack)||void 0===c?void 0:c[0].function);var h={logId:"".concat(this.opts.appId).concat(Me()).concat(w()),seq:this.seq,appId:this.opts.appId||"unknown",stage:this.opts.env||"develop",level:"ERROR",frontendId:this.sessionId,url:L(),location:l,message:"[message]: ".concat(e.message,"; [envTags]: ").concat(this.flattenEnvTags(),"; [t]: ").concat(w()),throwable:f,userId:this.opts.userId,storeCode:this.opts.storeCode};this.doTrack(h)}else{var p;S(!(null===(p=this.opts)||void 0===p||!p.debug),"Auto-captured event sampled out",e.message)}}else{var d;S(!(null===(d=this.opts)||void 0===d||!d.debug),"SDK not initialized, skip track")}}},{key:"shouldSend",value:function(e,t,r,n,o){var i,a,s,u,c,l=this;if("FATAL"===e)return!0;if(0===this.collectSwitch)return S(!(null===(u=this.opts)||void 0===u||!u.debug),"Collect switch is off, skip track"),!1;if(!this.collectLogLevel.some((function(t){return t===e})))return S(!(null===(c=this.opts)||void 0===c||!c.debug),"Log level(".concat(e,") not in collect log level, skip track")),!1;var f,h=null===(i=this.opts)||void 0===i||null===(i=i.levelSampleRate)||void 0===i?void 0:i[e],p=null===(a=this.opts)||void 0===a||null===(a=a.sourceSampleRate)||void 0===a?void 0:a[t],d=(null===(s=this.opts)||void 0===s?void 0:s.pathSampleRate)||{},g=Object.keys(d);if(g.length){for(var v="",m=0;m<g.length;m+=1){var y=g[m];r.startsWith(y)&&y.length>=v.length&&(v=y)}v&&(f=d[v])}var b=function(e){if("number"==typeof h)return h;if("number"==typeof p)return p;if("number"==typeof f)return f;var t=null===(e=l.opts)||void 0===e?void 0:e.sampleRate;return"number"==typeof t?t:1}(),w=Math.max(0,Math.min(1,b));if(w>=1)return!0;var x=function(e){for(var t=2166136261,r=0;r<e.length;r+=1)t=(t^=e.charCodeAt(r))+(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)>>>0;return t%1e4/1e4}("".concat(String(n||""),"|").concat(String(o||""),"|").concat(String(this.sessionId||""),"|").concat(String(e),"|").concat(String(t),"|").concat(String(r)));return x<w}},{key:"doTrack",value:(u=n()(t()().mark((function e(r){var n,o,i;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S(!(null===(n=this.opts)||void 0===n||!n.debug),"track",r),!this.opts.enableBatch||!this.queueManager){e.next=9;break}if(this.queueManager.enqueue(r),!(this.queueManager.size()>=this.opts.batchSize)){e.next=7;break}return S(!(null===(o=this.opts)||void 0===o||!o.debug),"Queue size reached batch size, flushing immediately"),e.next=7,this.flush();case 7:e.next=17;break;case 9:return e.prev=9,e.next=12,this.sendEvent(r);case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(9),S(!(null===(i=this.opts)||void 0===i||!i.debug),"track failed",e.t0);case 17:case"end":return e.stop()}}),e,this,[[9,14]])}))),function(e){return u.apply(this,arguments)})},{key:"flush",value:(s=n()(t()().mark((function e(){var r,n,o,i,a;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.queueManager&&0!==this.queueManager.size()){e.next=2;break}return e.abrupt("return");case 2:if(!this.isSending){e.next=5;break}return S(!(null===(n=this.opts)||void 0===n||!n.debug),"Already sending, skip flush"),e.abrupt("return");case 5:if(this.isSending=!0,S(!(null===(r=this.opts)||void 0===r||!r.debug),"Flushing ".concat(this.queueManager.size()," events")),e.prev=7,0!==(i=this.queueManager.peek(this.queueManager.size())).length){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,this.sendBatch(i);case 13:this.queueManager.dequeue(i.length),S(!(null===(o=this.opts)||void 0===o||!o.debug),"Flushed ".concat(i.length," events successfully")),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(7),S(!(null===(a=this.opts)||void 0===a||!a.debug),"Flush failed",e.t0);case 20:return e.prev=20,this.isSending=!1,e.finish(20);case 23:case"end":return e.stop()}}),e,this,[[7,17,20,23]])}))),function(){return s.apply(this,arguments)})},{key:"destroy",value:(a=n()(t()().mark((function r(){return t()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.closed=!0,this.batchTimer&&(clearInterval(this.batchTimer),this.batchTimer=null),t.next=4,this.flush();case 4:this.queueManager&&this.queueManager.clear(),this.retryManager&&this.retryManager.clear(),this.offJs&&(this.offJs(),this.offJs=void 0),this.offPromise&&(this.offPromise(),this.offPromise=void 0),this.offResource&&(this.offResource(),this.offResource=void 0),this.offWxError&&(this.offWxError(),this.offWxError=void 0),this.offWxUnhandled&&(this.offWxUnhandled(),this.offWxUnhandled=void 0),this.initialized=!1,this.sessionId=void 0,e.instance=void 0;case 14:case"end":return t.stop()}}),r,this)}))),function(){return a.apply(this,arguments)})},{key:"sendEvent",value:(o=n()(t()().mark((function e(r){var o,i=this;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=function(){var e=n()(t()().mark((function e(){var n;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=i.transporter)||void 0===n?void 0:n.send({appId:r.appId,appStage:r.stage,items:[{level:"FATAL"===r.level?"ERROR":r.level,traceId:r.traceId,frontendId:r.frontendId,location:r.location,message:r.message,throwable:r.throwable}]});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!this.opts.enableRetry||!this.retryManager){e.next=6;break}return e.next=4,this.retryManager.executeWithRetry(r.logId,o);case 4:e.next=8;break;case 6:return e.next=8,o();case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"sendBatch",value:(r=n()(t()().mark((function e(r){var o,a,s,u,c,l,f,h,p,d,g,v,m,y,b,x=this;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==r.length){e.next=2;break}return e.abrupt("return");case 2:for(a=new Map,s=0;s<r.length;s+=1)u=r[s],c="".concat(u.appId,"|").concat(u.stage),(l=a.get(c))?l.push(u):a.set(c,[u]);f=Math.min(200,(null===(o=this.opts)||void 0===o?void 0:o.batchSize)||50),h=Array.from(a.entries()),p=[],d=0;case 8:if(!(d<h.length)){e.next=21;break}g=i()(h[d],2),v=g[0],(m=g[1]).sort((function(e,t){return e.seq-t.seq})),y=t()().mark((function e(){var r,o,i,a;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=m.slice(b,b+f)).length>0&&(o="batch_".concat(w(),"_").concat(Math.random().toString(36).substring(2,9),"_").concat(v,"_").concat(b),i=function(){var e=n()(t()().mark((function e(){var n;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=x.transporter)||void 0===n?void 0:n.send({appId:r[0].appId,appStage:r[0].stage,items:r.map((function(e){return{level:"FATAL"===e.level?"ERROR":e.level,traceId:e.traceId,frontendId:e.frontendId,location:e.location,message:e.message,throwable:e.throwable}}))});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=x.opts.enableRetry&&x.retryManager?x.retryManager.executeWithRetry(o,i):i(),p.push(a));case 2:case"end":return e.stop()}}),e)})),b=0;case 13:if(!(b<m.length)){e.next=18;break}return e.delegateYield(y(),"t0",15);case 15:b+=f,e.next=13;break;case 18:d+=1,e.next=8;break;case 21:return e.next=23,Promise.all(p);case 23:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"startBatchTimer",value:function(){var e,t=this;this.batchTimer||(this.batchTimer=setInterval((function(){var e;!t.closed&&t.queueManager&&t.queueManager.size()>0&&(S(!(null===(e=t.opts)||void 0===e||!e.debug),"Batch timer triggered, flushing queue"),t.flush().catch((function(e){var r;S(!(null===(r=t.opts)||void 0===r||!r.debug),"Batch timer flush failed",e)})))}),this.opts.batchInterval),S(!(null===(e=this.opts)||void 0===e||!e.debug),"Batch timer started with interval ".concat(this.opts.batchInterval,"ms")))}},{key:"attachUnloadHandlers",value:function(){var e,t=this;if(!1!==(null===(e=this.opts)||void 0===e?void 0:e.enableAutoCapture)&&O()){var r=window;document.addEventListener&&document.addEventListener("visibilitychange",(function(){try{var e;if("hidden"===document.visibilityState)t.flush().catch((function(){})),S(!(null===(e=t.opts)||void 0===e||!e.debug),"Page hidden, flushed queue")}catch(e){}})),r.addEventListener&&r.addEventListener("pagehide",(function(){try{var e,r;S(!(null===(e=t.opts)||void 0===e||!e.debug),"Page hide, flushed queue"),t.flush().catch((function(){})),S(!(null===(r=t.opts)||void 0===r||!r.debug),"Page hide, flushed queue")}catch(e){}})),r.addEventListener&&r.addEventListener("beforeunload",(function(){try{var e,r;S(!(null===(e=t.opts)||void 0===e||!e.debug),"Page unload, flushed queue"),t.flush().catch((function(){})),S(!(null===(r=t.opts)||void 0===r||!r.debug),"Page unload, flushed queue")}catch(e){}}))}}},{key:"initSDK",value:function(e,r){var o,i,a=this;Ie.post((i=(null===(o=this.opts)||void 0===o?void 0:o.env)||"develop","".concat(k(i),"/yfcloud-apm/log/front/init")),{appId:e.appId,message:"init",appStage:e.logStage,location:"",userId:e.userId,storeCode:e.storeCode},e.token).then(function(){var e=n()(t()().mark((function e(n){var o,i,s,u,c,l,f,h;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S(!(null===(o=a.opts)||void 0===o||!o.debug),"Register success",n),n){e.next=3;break}return e.abrupt("return");case 3:if(i=n.type,s=n.response,n.error,u=!1,"wechat"!==i||200!==(null==s?void 0:s.statusCode)){e.next=10;break}u=!0,c=s.data.data,e.next=19;break;case 10:if("fetch"!==i){e.next=18;break}return e.next=13,null==s||null===(l=s.json)||void 0===l?void 0:l.call(s);case 13:h=e.sent,S(!(null===(f=a.opts)||void 0===f||!f.debug),"Register fetch response",h),0===(null==h?void 0:h.code)&&(u=!0,c=h.data),e.next=19;break;case 18:"xhr"===i&&(u=!0);case 19:u&&c&&r(c);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){var t;S(!(null===(t=a.opts)||void 0===t||!t.debug),"Failed to initialize SDK",e)}))}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();p()(Be,"instance",void 0)}(),s}()}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluve/logger-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "logger sdk",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logger"
|
|
@@ -8,8 +8,19 @@
|
|
|
8
8
|
"author": "黄震 <huangzhen@yfpharmacy.com>",
|
|
9
9
|
"homepage": "http://.",
|
|
10
10
|
"license": "ISC",
|
|
11
|
-
"main": "dist/index.js",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"browser": "dist/esm/index.js",
|
|
12
14
|
"types": "dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/esm/index.js",
|
|
18
|
+
"require": "./dist/cjs/index.js",
|
|
19
|
+
"default": "./dist/esm/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"unpkg": "dist/umd/logger-sdk.min.js",
|
|
23
|
+
"jsdelivr": "dist/umd/logger-sdk.min.js",
|
|
13
24
|
"directories": {
|
|
14
25
|
"dist": "dist"
|
|
15
26
|
},
|
|
@@ -26,16 +37,29 @@
|
|
|
26
37
|
},
|
|
27
38
|
"scripts": {
|
|
28
39
|
"init-install": "yarn install",
|
|
29
|
-
"build-types": "tsc",
|
|
40
|
+
"build-types": "tsc -p tsconfig.types.json",
|
|
41
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
30
42
|
"build": "father build",
|
|
31
43
|
"test": "vitest run",
|
|
32
44
|
"test:watch": "vitest",
|
|
33
45
|
"test:coverage": "vitest run --coverage",
|
|
34
46
|
"clear-types": "rm -rf lib",
|
|
35
47
|
"clear-build": "rm -rf dist",
|
|
36
|
-
"clear-node_modules": "rm -rf node_modules"
|
|
48
|
+
"clear-node_modules": "rm -rf node_modules",
|
|
49
|
+
"generate-mermaid": "mermaid-cli logger-sdk.mermaid -o logger-sdk.svg"
|
|
37
50
|
},
|
|
38
51
|
"devDependencies": {
|
|
39
|
-
"
|
|
52
|
+
"jsdom": "^27.4.0",
|
|
53
|
+
"vitest": "^4.0.15",
|
|
54
|
+
"localforage": "^1.10.0",
|
|
55
|
+
"@mermaid-js/mermaid-cli": "^10.9.1"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"fflate": "^0.8.2",
|
|
59
|
+
"stacktrace-js": "^2.0.2"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"js-base64": "^3.7.5",
|
|
63
|
+
"localforage": "^1.10.0"
|
|
40
64
|
}
|
|
41
65
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { LoggerSDK } from './loggerSDK';
|
|
2
|
-
export { defaultTransport, TransportAdapters } from './transportAdapter';
|
|
3
|
-
export type { TransportAdapter, TransportOptions } from './transportAdapter';
|
|
4
|
-
export type { SDKOptions, LogEvent, LogEventType, LogEventLevel, Env } from './types';
|
|
5
|
-
export type { PlatformType, EnvironmentInfo } from './utils';
|
|
6
|
-
export { getEnvironmentInfo, parseBrowserInfo, isWeChatMiniProgram, gzipCompress, isGzipSupported } from './utils';
|
|
7
|
-
export { QueueManager } from './queueManager';
|
|
8
|
-
export type { QueueOptions } from './queueManager';
|
|
9
|
-
export { RetryManager } from './retryManager';
|
|
10
|
-
export type { RetryOptions } from './retryManager';
|
package/dist/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author : 黄震 huangzhen@yfpharmacy.com
|
|
3
|
-
* @Date : 2025-11-21 14:25:26
|
|
4
|
-
* @LastEditors : 黄震 huangzhen@yfpharmacy.com
|
|
5
|
-
* @LastEditTime : 2025-12-18 13:26:30
|
|
6
|
-
* @Description : 描述
|
|
7
|
-
* Copyright (c) 2025 by 益丰大药房连锁股份有限公司, All Rights Reserved.
|
|
8
|
-
*/
|
|
9
|
-
export { LoggerSDK } from "./loggerSDK";
|
|
10
|
-
export { defaultTransport, TransportAdapters } from "./transportAdapter";
|
|
11
|
-
export { getEnvironmentInfo, parseBrowserInfo, isWeChatMiniProgram, gzipCompress, isGzipSupported } from "./utils";
|
|
12
|
-
export { QueueManager } from "./queueManager";
|
|
13
|
-
export { RetryManager } from "./retryManager";
|