lyb-js 1.1.6 → 1.1.8

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.
Files changed (45) hide show
  1. package/README.md +3 -2
  2. package/dist/Base/LibJsGetDataType/index.js +1 -1
  3. package/dist/Base/LibJsPromiseTimeout/index.js +11 -10
  4. package/dist/Browser/LibJsColorConsole/index.js +22 -12
  5. package/dist/Browser/LibJsIsMobile/index.js +2 -2
  6. package/dist/Browser/LibJsIsPad/index.js +8 -8
  7. package/dist/Browser/LibJsObjToUrlParams/index.js +5 -2
  8. package/dist/Browser/LibJsPathParams/index.js +5 -5
  9. package/dist/Browser/LibJsSetTitleIcon/index.js +3 -3
  10. package/dist/Browser/LibJsTagTitleTip/index.js +5 -5
  11. package/dist/Data/LibJsChunkArray/index.js +3 -3
  12. package/dist/Data/LibJsDeepJSONParse/index.js +5 -5
  13. package/dist/Data/LibJsGroupArrayByKey/index.js +3 -2
  14. package/dist/Data/LibJsMatchEmail/index.js +4 -4
  15. package/dist/Data/LibJsShuffleArray/index.js +15 -5
  16. package/dist/Data/LibJsStepArray/index.js +3 -3
  17. package/dist/Data/LibReverseArrayFromIndex/index.js +12 -3
  18. package/dist/File/LibJsDownloadImageLink/index.js +5 -5
  19. package/dist/File/LibJsImageOptimizer/index.js +36 -36
  20. package/dist/File/LibJsSaveJson/index.js +4 -4
  21. package/dist/Formatter/LibJsFormatterByte/index.js +6 -6
  22. package/dist/Formatter/LibJsMaskPhoneNumber/index.js +2 -2
  23. package/dist/Formatter/LibJsNumComma/index.js +4 -3
  24. package/dist/Formatter/LibJsNumberUnit/index.d.ts +5 -5
  25. package/dist/Formatter/LibJsNumberUnit/index.js +17 -10
  26. package/dist/Formatter/LibJsSecondsFormatterChinese/index.js +15 -15
  27. package/dist/Math/LibJsCalculateExpression/index.js +19 -17
  28. package/dist/Math/LibJsConvertAngle/index.js +1 -1
  29. package/dist/Math/LibJsCoordsAngle/index.js +5 -5
  30. package/dist/Math/LibJsCoordsDistance/index.js +4 -4
  31. package/dist/Math/LibJsDecimal/index.js +8 -7
  32. package/dist/Misc/LibJsRegFormValidate/index.js +6 -6
  33. package/dist/Misc/LibJsRetryRequest/index.js +7 -6
  34. package/dist/Misc/LibNumerStepper/index.js +27 -29
  35. package/dist/Random/LibJsProbabilityResult/index.js +3 -1
  36. package/dist/Random/LibJsRandom/index.js +2 -1
  37. package/dist/Random/LibJsRandomColor/index.js +6 -5
  38. package/dist/Random/LibJsUniqueRandomNumbers/index.js +6 -5
  39. package/dist/Time/LibJsSameTimeCheck/index.js +3 -3
  40. package/dist/Time/LibJsTimeAgo/index.js +8 -7
  41. package/dist/Time/LibJsTimeGreeting/index.js +4 -3
  42. package/dist/libJs.d.ts +3 -2
  43. package/dist/libJs.js +48 -49
  44. package/package.json +1 -1
  45. package/umd/lyb.js +3 -3
package/dist/libJs.js CHANGED
@@ -38,73 +38,73 @@ import { libJsTimeAgo } from "./Time/LibJsTimeAgo";
38
38
  import { libJsTimeGreeting } from "./Time/LibJsTimeGreeting";
39
39
  import { libNumerStepper } from "./Misc/LibNumerStepper";
40
40
  /** @description 基础方法 */
41
- export const Base = {
41
+ export var Base = {
42
42
  /**
43
43
  * @description 返回数据类型
44
44
  * @param v 需要判断类型的数据
45
45
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsColorConsole-有色打印
46
46
  */
47
- libJsGetDataType,
47
+ libJsGetDataType: libJsGetDataType,
48
48
  /**
49
49
  * @description 延时执行,切换到其他页面会暂停
50
50
  * @param delay 延时毫秒数
51
51
  * @param fn 延时执行函数
52
52
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsPromiseTimeout-延时执行
53
53
  */
54
- libJsPromiseTimeout,
54
+ libJsPromiseTimeout: libJsPromiseTimeout,
55
55
  };
56
56
  /** @description 浏览器相关方法 */
57
- export const Browser = {
57
+ export var Browser = {
58
58
  /** @description console颜色打印
59
59
  * @param title 标题
60
60
  * @param color 颜色
61
61
  * @param logs 信息
62
62
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsColorConsole-有色打印
63
63
  */
64
- libJsColorConsole,
64
+ libJsColorConsole: libJsColorConsole,
65
65
  /** @description 判断是否为移动设备
66
66
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsIsMobile-判断手机
67
67
  */
68
- libJsIsMobile,
68
+ libJsIsMobile: libJsIsMobile,
69
69
  /** @description 判断是否为平板
70
70
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsIsPad-判断平板
71
71
  */
72
- libJsIsPad,
72
+ libJsIsPad: libJsIsPad,
73
73
  /** @description 获取浏览器地址栏参数
74
74
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsPathParams-地址栏参数
75
75
  */
76
- libJsPathParams,
76
+ libJsPathParams: libJsPathParams,
77
77
  /** @description 动态设置网站标题及图标
78
78
  * @param title 网站标题
79
79
  * @param url 网站图标地址
80
80
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSetTitleIcon-网站标题图标
81
81
  */
82
- libJsSetTitleIcon,
82
+ libJsSetTitleIcon: libJsSetTitleIcon,
83
83
  /** @description 网站标题交互,当从当前网页切换到其他网页,网站标题自动切换
84
84
  * @param backTitle 从其他网页返回时显示的标题
85
85
  * @param leaveTitle 从当前网页离开时显示的标题
86
86
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTagTitleTip-网站标题交互
87
87
  */
88
- libJsTagTitleTip,
88
+ libJsTagTitleTip: libJsTagTitleTip,
89
89
  /** @description 对象转为url参数
90
90
  * @param params 对象参数
91
91
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsObjToUrlParams-对象转Url参数
92
92
  */
93
- libJsObjToUrlParams,
93
+ libJsObjToUrlParams: libJsObjToUrlParams,
94
94
  };
95
95
  /** @description 数据相关方法 */
96
- export const Data = {
96
+ export var Data = {
97
97
  /**
98
98
  * @description 将数组拆分成指定数组元素数量的多个数组
99
99
  * @param arr 需要拆分的数组
100
100
  * @param chunkSize 每个数组的元素数量
101
101
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsChunkArray-数组拆分
102
102
  */
103
- libJsChunkArray,
103
+ libJsChunkArray: libJsChunkArray,
104
104
  /** @description 递归将JSON字符串深度解析为对象
105
105
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDeepJSONParse-深度解析JSON
106
106
  */
107
- libJsDeepJSONParse,
107
+ libJsDeepJSONParse: libJsDeepJSONParse,
108
108
  /**
109
109
  * @description 分类汇总,将数组对象按照指定键值整理成一个以键值为键名的对象
110
110
  * @param arr 要分组的数组
@@ -112,7 +112,7 @@ export const Data = {
112
112
  * @returns 分组后的对象
113
113
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsGroupArrayByKey-分类汇总
114
114
  */
115
- libJsGroupArrayByKey,
115
+ libJsGroupArrayByKey: libJsGroupArrayByKey,
116
116
  /**
117
117
  * @description 匹配电子邮件,可用于实时输入时,自动补全常用邮箱后缀
118
118
  * @param str 要匹配的字符串
@@ -120,122 +120,121 @@ export const Data = {
120
120
  * @returns 匹配结果数组
121
121
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsMatchEmail-匹配E-Mail
122
122
  */
123
- libJsMatchEmail,
123
+ libJsMatchEmail: libJsMatchEmail,
124
124
  /** @description 数组乱序
125
125
  * @param arr 需要乱序的数组
126
- * @link 了解更多:https://www.npmjs.com/package/lyb-js
127
126
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsShuffleArray-数组乱序
128
127
  */
129
- libJsShuffleArray,
128
+ libJsShuffleArray: libJsShuffleArray,
130
129
  /** @description 数组元素整体步数移动
131
130
  * @param arr 移动的数组
132
131
  * @param step 负数为向后移动,正数为向前移动
133
132
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsStepArray-数组偏移
134
133
  */
135
- libJsStepArray,
134
+ libJsStepArray: libJsStepArray,
136
135
  /** @description 翻转指定索引后面的数组
137
136
  * @param arr 数组
138
137
  * @param index 开始索引
139
138
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibReverseArrayFromIndex-数组定位翻转
140
139
  */
141
- libReverseArrayFromIndex,
140
+ libReverseArrayFromIndex: libReverseArrayFromIndex,
142
141
  };
143
142
  /** @description 文件相关方法 */
144
- export const File = {
143
+ export var File = {
145
144
  /** @description 下载图片链接
146
145
  * @param link 图片链接
147
146
  * @param name 图片名称
148
147
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDownloadImageLink-图片下载
149
148
  */
150
- libJsDownloadImageLink,
149
+ libJsDownloadImageLink: libJsDownloadImageLink,
151
150
  /** @description 图片压缩
152
151
  * @param obj 压缩参数
153
152
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsImageOptimizer-图片压缩
154
153
  */
155
- libJsImageOptimizer,
154
+ libJsImageOptimizer: libJsImageOptimizer,
156
155
  /**
157
156
  * @description 保存文件到本地
158
157
  * @param data 要保存的数据
159
158
  * @param name 文件名
160
159
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSaveJson-保存文件
161
160
  */
162
- libJsSaveJson,
161
+ libJsSaveJson: libJsSaveJson,
163
162
  };
164
163
  /** @description 格式化相关方法 */
165
- export const Formatter = {
164
+ export var Formatter = {
166
165
  /**
167
166
  * @description 格式化字节大小
168
167
  * @param bytes 字节数
169
168
  * @returns ['大小', '单位', '大小及单位']
170
169
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsFormatterByte-字节格式化
171
170
  */
172
- libJsFormatterByte,
171
+ libJsFormatterByte: libJsFormatterByte,
173
172
  /**
174
173
  * @description 隐藏手机号码中间的四位数字
175
174
  * @param mobile 需要处理的手机号码
176
175
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsMaskPhoneNumber-隐藏手机号码
177
176
  */
178
- libJsMaskPhoneNumber,
177
+ libJsMaskPhoneNumber: libJsMaskPhoneNumber,
179
178
  /**
180
179
  * @description 数字每三位添加逗号
181
180
  * @param num 需要格式化的数字
182
181
  * @param reserve 保留小数位数
183
182
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumComma-数字逗号
184
183
  */
185
- libJsNumComma,
184
+ libJsNumComma: libJsNumComma,
186
185
  /** @description 将大于1000的数字使用k为单位
187
186
  * @param num 数字
188
187
  * @param units 单位组,key为单位,value为格式化阈值
189
188
  * @returns [数字, 单位]
190
189
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumberUnit-数字单位
191
190
  */
192
- libJsNumberUnit,
191
+ libJsNumberUnit: libJsNumberUnit,
193
192
  /**
194
193
  * @description 将秒数格式化为中文时间描述,支持扩展到年和月
195
194
  * @param seconds 秒数
196
195
  * @returns 格式化后的中文时间
197
196
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSecondsFormatterChinese-中文时间
198
197
  */
199
- libJsSecondsFormatterChinese,
198
+ libJsSecondsFormatterChinese: libJsSecondsFormatterChinese,
200
199
  };
201
200
  /** @description 数学相关方法 */
202
- export const Math = {
201
+ export var Math = {
203
202
  /** @description 计算表达式字符串
204
203
  * @param expression 表达式字符串
205
204
  * @param point 小数点精度
206
205
  * @returns 计算结果
207
206
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCalculateExpression-表达式字符串
208
207
  */
209
- libJsCalculateExpression,
208
+ libJsCalculateExpression: libJsCalculateExpression,
210
209
  /**
211
210
  * @description 角度和弧度互相转换
212
211
  * @param value 角度值或弧度值
213
212
  * @param type 角度类型或弧度类型
214
213
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsConvertAngle-角弧度互转
215
214
  */
216
- libJsConvertAngle,
215
+ libJsConvertAngle: libJsConvertAngle,
217
216
  /** @description 计算两点角度
218
217
  * @param coord1 起点坐标
219
218
  * @param coord2 终点坐标
220
219
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCoordsAngle-两点角度
221
220
  */
222
- libJsCoordsAngle,
221
+ libJsCoordsAngle: libJsCoordsAngle,
223
222
  /** @description 计算两点距离
224
223
  * @param coord1 起点坐标
225
224
  * @param coord2 终点坐标
226
225
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCoordsDistance-两点距离
227
226
  */
228
- libJsCoordsDistance,
227
+ libJsCoordsDistance: libJsCoordsDistance,
229
228
  /** @description 计算两个数的运算结果,并保留指定位数的小数
230
229
  * @param num1 第一个数
231
230
  * @param num2 第二个数
232
231
  * @param operator 运算符,支持加减乘除
233
232
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDecimal-高精度计算
234
233
  */
235
- libJsDecimal,
234
+ libJsDecimal: libJsDecimal,
236
235
  };
237
236
  /** @description 杂项相关方法 */
238
- export const Misc = {
237
+ export var Misc = {
239
238
  /**
240
239
  * @description 表单验证函数
241
240
  * @param form 表单数据对象
@@ -243,7 +242,7 @@ export const Misc = {
243
242
  * @returns 验证结果数组,包含未通过验证的项
244
243
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRegFormValidate-表单验证
245
244
  */
246
- libJsRegFormValidate,
245
+ libJsRegFormValidate: libJsRegFormValidate,
247
246
  /** @description 请求失败重连
248
247
  * @param promiseFn 请求函数
249
248
  * @param maxRetries 最大重试次数
@@ -251,41 +250,41 @@ export const Misc = {
251
250
  * @param params 请求参数
252
251
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRetryRequest-请求重连
253
252
  */
254
- libJsRetryRequest,
253
+ libJsRetryRequest: libJsRetryRequest,
255
254
  /** @description 数字步进器
256
255
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibNumerStepper-数字步进器
257
256
  */
258
- libNumerStepper,
257
+ libNumerStepper: libNumerStepper,
259
258
  };
260
259
  /** @description 随机相关方法 */
261
- export const Random = {
260
+ export var Random = {
262
261
  /** @description 百分比概率结果
263
262
  * @param probability 触发概率,百分比,0-100
264
263
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsProbabilityResult-概率触发
265
264
  */
266
- libJsProbabilityResult,
265
+ libJsProbabilityResult: libJsProbabilityResult,
267
266
  /** @description 随机数
268
267
  * @param min 最小值
269
268
  * @param max 最大值
270
269
  * @param num 保留小数位数
271
270
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRandom-随机数
272
271
  */
273
- libJsRandom,
272
+ libJsRandom: libJsRandom,
274
273
  /** @description 随机 RGBA 颜色
275
274
  * @param alpha 透明度
276
275
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRandomColor-随机色
277
276
  */
278
- libJsRandomColor,
277
+ libJsRandomColor: libJsRandomColor,
279
278
  /** @description 随机生成n个指定范围的随机数数组
280
279
  * @param min 最小值
281
280
  * @param max 最大值
282
281
  * @param count 数组长度
283
282
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsUniqueRandomNumbers-随机数数组
284
283
  */
285
- libJsUniqueRandomNumbers,
284
+ libJsUniqueRandomNumbers: libJsUniqueRandomNumbers,
286
285
  };
287
286
  /** @description 时间相关方法 */
288
- export const Time = {
287
+ export var Time = {
289
288
  /**
290
289
  * @description 传入时间戳与当前时间判断是否为同一天或同一周
291
290
  * @param timestamp 毫秒时间戳
@@ -293,16 +292,16 @@ export const Time = {
293
292
  * @returns 0-同一单位时间 1-新单位时间 -1时间戳大于当前时间
294
293
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSameTimeCheck-时间比对
295
294
  */
296
- libJsSameTimeCheck,
295
+ libJsSameTimeCheck: libJsSameTimeCheck,
297
296
  /** @description 时间差计算
298
297
  * @param timestamp 毫秒时间戳
299
298
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTimeAgo-中文时间差
300
299
  */
301
- libJsTimeAgo,
300
+ libJsTimeAgo: libJsTimeAgo,
302
301
  /**
303
302
  * @description 根据当前时间返回问候语
304
303
  * @param greet 自定义问候语对象
305
304
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTimeGreeting-时间问候
306
305
  */
307
- libJsTimeGreeting,
306
+ libJsTimeGreeting: libJsTimeGreeting,
308
307
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-js",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "自用JS方法库",
5
5
  "license": "ISC",
6
6
  "type": "module",
package/umd/lyb.js CHANGED
@@ -1,8 +1,8 @@
1
- (function(ee){typeof define=="function"&&define.amd?define(ee):ee()})(function(){"use strict";var An=Object.defineProperty;var Ln=(ee,ne,fe)=>ne in ee?An(ee,ne,{enumerable:!0,configurable:!0,writable:!0,value:fe}):ee[ne]=fe;var de=(ee,ne,fe)=>(Ln(ee,typeof ne!="symbol"?ne+"":ne,fe),fe);const ee=e=>Object.prototype.toString.call(e).substring(8).replace(/]/g,"").toLowerCase(),ne=(e=1,t)=>{let n,i=e,r=Date.now(),s=!1;return new Promise(o=>{const u=()=>{document.hidden?(s=!0,clearTimeout(n),i-=Date.now()-r):s&&(s=!1,r=Date.now(),a(o))},a=c=>{n=setTimeout(()=>{t==null||t(),c(),document.removeEventListener("visibilitychange",u)},i)};document.addEventListener("visibilitychange",u),a(o)})},fe=(e,t,n=[])=>{const i={red:"#c0392b",orange:"#d35400",yellow:"#f1c40f",green:"#27ae60",blue:"#2980b9",purple:"#be2edd"},r=()=>{const s=new Date,o=String(s.getHours()).padStart(2,"0"),u=String(s.getMinutes()).padStart(2,"0"),a=String(s.getSeconds()).padStart(2,"0");return`[${o}:${u}:${a}]`};if(Array.isArray(n)){const s=n.map(o=>[`
2
- ${o.label}:`,o.value]);console.log(`%c${r()}-${e}`,`color: #fff;background: ${i[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,...s.flat(1/0))}else console.log(`%c${r()}-${e}`,`color: #fff;background: ${i[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,n)},et=()=>{const e=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipod/.test(e)},tt=()=>{const e=navigator.userAgent.toLowerCase(),t=Math.max(window.screen.width,window.screen.height),n=Math.min(window.screen.width,window.screen.height),i=t/n,r=/ipad|tablet|playbook|silk/.test(e)&&!/mobile/.test(e),s=t>=768&&t<=1366,o=i>=1.3&&i<=1.6;return r||s&&o},nt=()=>{const t=location.href.split("?")[1];return t?t.split("&").reduce((i,r)=>{const[s,o]=r.split(/=(.+)/);return i[s]=o,i},{})||{}:{}},it=(e,t)=>{document.title=e;const n=document.createElement("link");n.setAttribute("rel","icon"),n.setAttribute("href",t),(document.head||document.getElementsByTagName("head")[0]).appendChild(n)},rt=(e,t)=>{let n="",i;window.addEventListener("visibilitychange",()=>{if(clearTimeout(i),document.hidden){document.title!==e&&(n=document.title),document.title=t;return}document.title=e,i=setTimeout(()=>{document.title=n},1e3)})},st=e=>Object.entries(e).map(([t,n])=>`${t}=${n}`).join("&"),ot=(e,t)=>{const n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n},Me=e=>{if(typeof e=="string")try{const t=JSON.parse(e);return Me(t)}catch{return e}return Array.isArray(e)?e.map(t=>Me(t)):e!==null&&typeof e=="object"?Object.keys(e).reduce((t,n)=>(t[n]=Me(e[n]),t),{}):e},ut=(e=[],t)=>t?e.reduce((n,i)=>(n[i[t]]||(n[i[t]]=[]),n[i[t]].push(i),n),{}):{},ct=(e,t)=>e.includes("@")?t.filter(n=>n.includes(e.slice(e.indexOf("@")))).map(n=>(e.includes("@")?e.split("@")[0]:e)+n):t.map(n=>e+n),at=e=>{const t=[...e];for(let n=t.length-1;n>0;n--){const i=Math.floor(Math.random()*(n+1));[t[n],t[i]]=[t[i],t[n]]}return t},ft=(e,t)=>{const n=e.length;if(n===0||t%n===0)return e;const i=(t%n+n)%n;return e.slice(-i).concat(e.slice(0,-i))},lt=(e,t)=>{if(t<0||t>=e.length)throw new Error("Index out of bounds");const n=e.slice(t+1).reverse();return[...e.slice(0,t+1),...n]},ht=(e,t)=>{fetch(e).then(n=>n.blob()).then(n=>{const i=document.createElement("a"),r=window.URL.createObjectURL(n);i.href=r,i.download=t,i.click()})},dt=e=>{const t=document.createElement("canvas");t.classList.add("imageOptimizer"),document.body.appendChild(t);const n=e.file;if(!n)return;const i=n.name,r=i.split(".").pop().toLowerCase(),s=e.ratio||1,o=e.maxSize||1024,u=e.width||1e4,a=n.type;function c(h,p){const w=h.split(","),M=w[0].match(/:(.*?);/)[1],F=window.atob(w[1]),A=F.length,H=new Uint8Array(A);for(let O=0;O<A;O++)H[O]=F.charCodeAt(O);return new File([H],p,{type:M})}function f(h){const p=new FormData;return p.append("file",h),p}const l=new FileReader;l.readAsDataURL(n),l.onload=h=>{const p=h.target.result;if(h.total/1024>o){const w=new Image;w.src=p,w.onload=()=>{const M=t.getContext("2d"),F=u/w.width;F<1?(t.width=w.width*F,t.height=w.height*F,M.drawImage(w,0,0,w.width*F,w.height*F)):(t.width=w.width,t.height=w.height,M.drawImage(w,0,0,w.width,w.height));const A=t.toDataURL(a,s),H=`${i.split(".")[0]}.${r}`,O=c(A,H);e.success(f(O),O,A),t.remove()},w.onerror=e.fail}else{const w=`${i.split(".")[0]}.${r}`,M=c(p,w);e.success(f(M),M,p),t.remove()}},l.onerror=e.fail},mt=(e,t)=>{const n=window.URL||window.webkitURL,i=new Blob([t]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=e,r.click(),n.revokeObjectURL(r.href)};var Pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Re={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Pe,function(){var n=1e3,i=6e4,r=36e5,s="millisecond",o="second",u="minute",a="hour",c="day",f="week",l="month",h="quarter",p="year",w="date",M="Invalid Date",F=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,H={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var g=["th","st","nd","rd"],m=N%100;return"["+N+(g[(m-20)%10]||g[m]||g[0])+"]"}},O=function(N,g,m){var D=String(N);return!D||D.length>=g?N:""+Array(g+1-D.length).join(m)+N},q={s:O,z:function(N){var g=-N.utcOffset(),m=Math.abs(g),D=Math.floor(m/60),$=m%60;return(g<=0?"+":"-")+O(D,2,"0")+":"+O($,2,"0")},m:function N(g,m){if(g.date()<m.date())return-N(m,g);var D=12*(m.year()-g.year())+(m.month()-g.month()),$=g.clone().add(D,l),C=m-$<0,I=g.clone().add(D+(C?-1:1),l);return+(-(D+(m-$)/(C?$-I:I-$))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:l,y:p,w:f,d:c,D:w,h:a,m:u,s:o,ms:s,Q:h}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},x="en",T={};T[x]=H;var E="$isDayjsObject",v=function(N){return N instanceof R||!(!N||!N[E])},L=function N(g,m,D){var $;if(!g)return x;if(typeof g=="string"){var C=g.toLowerCase();T[C]&&($=C),m&&(T[C]=m,$=C);var I=g.split("-");if(!$&&I.length>1)return N(I[0])}else{var J=g.name;T[J]=g,$=J}return!D&&$&&(x=$),$||!D&&x},y=function(N,g){if(v(N))return N.clone();var m=typeof g=="object"?g:{};return m.date=N,m.args=arguments,new R(m)},b=q;b.l=L,b.i=v,b.w=function(N,g){return y(N,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var R=function(){function N(m){this.$L=L(m.locale,null,!0),this.parse(m),this.$x=this.$x||m.x||{},this[E]=!0}var g=N.prototype;return g.parse=function(m){this.$d=function(D){var $=D.date,C=D.utc;if($===null)return new Date(NaN);if(b.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var I=$.match(F);if(I){var J=I[2]-1||0,B=(I[7]||"0").substring(0,3);return C?new Date(Date.UTC(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)):new Date(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)}}return new Date($)}(m),this.init()},g.init=function(){var m=this.$d;this.$y=m.getFullYear(),this.$M=m.getMonth(),this.$D=m.getDate(),this.$W=m.getDay(),this.$H=m.getHours(),this.$m=m.getMinutes(),this.$s=m.getSeconds(),this.$ms=m.getMilliseconds()},g.$utils=function(){return b},g.isValid=function(){return this.$d.toString()!==M},g.isSame=function(m,D){var $=y(m);return this.startOf(D)<=$&&$<=this.endOf(D)},g.isAfter=function(m,D){return y(m)<this.startOf(D)},g.isBefore=function(m,D){return this.endOf(D)<y(m)},g.$g=function(m,D,$){return b.u(m)?this[D]:this.set($,m)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(m,D){var $=this,C=!!b.u(D)||D,I=b.p(m),J=function(he,G){var ae=b.w($.$u?Date.UTC($.$y,G,he):new Date($.$y,G,he),$);return C?ae:ae.endOf(c)},B=function(he,G){return b.w($.toDate()[he].apply($.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(G)),$)},Z=this.$W,V=this.$M,X=this.$D,ge="set"+(this.$u?"UTC":"");switch(I){case p:return C?J(1,0):J(31,11);case l:return C?J(1,V):J(0,V+1);case f:var le=this.$locale().weekStart||0,ve=(Z<le?Z+7:Z)-le;return J(C?X-ve:X+(6-ve),V);case c:case w:return B(ge+"Hours",0);case a:return B(ge+"Minutes",1);case u:return B(ge+"Seconds",2);case o:return B(ge+"Milliseconds",3);default:return this.clone()}},g.endOf=function(m){return this.startOf(m,!1)},g.$set=function(m,D){var $,C=b.p(m),I="set"+(this.$u?"UTC":""),J=($={},$[c]=I+"Date",$[w]=I+"Date",$[l]=I+"Month",$[p]=I+"FullYear",$[a]=I+"Hours",$[u]=I+"Minutes",$[o]=I+"Seconds",$[s]=I+"Milliseconds",$)[C],B=C===c?this.$D+(D-this.$W):D;if(C===l||C===p){var Z=this.clone().set(w,1);Z.$d[J](B),Z.init(),this.$d=Z.set(w,Math.min(this.$D,Z.daysInMonth())).$d}else J&&this.$d[J](B);return this.init(),this},g.set=function(m,D){return this.clone().$set(m,D)},g.get=function(m){return this[b.p(m)]()},g.add=function(m,D){var $,C=this;m=Number(m);var I=b.p(D),J=function(V){var X=y(C);return b.w(X.date(X.date()+Math.round(V*m)),C)};if(I===l)return this.set(l,this.$M+m);if(I===p)return this.set(p,this.$y+m);if(I===c)return J(1);if(I===f)return J(7);var B=($={},$[u]=i,$[a]=r,$[o]=n,$)[I]||1,Z=this.$d.getTime()+m*B;return b.w(Z,this)},g.subtract=function(m,D){return this.add(-1*m,D)},g.format=function(m){var D=this,$=this.$locale();if(!this.isValid())return $.invalidDate||M;var C=m||"YYYY-MM-DDTHH:mm:ssZ",I=b.z(this),J=this.$H,B=this.$m,Z=this.$M,V=$.weekdays,X=$.months,ge=$.meridiem,le=function(G,ae,$e,Te){return G&&(G[ae]||G(D,C))||$e[ae].slice(0,Te)},ve=function(G){return b.s(J%12||12,G,"0")},he=ge||function(G,ae,$e){var Te=G<12?"AM":"PM";return $e?Te.toLowerCase():Te};return C.replace(A,function(G,ae){return ae||function($e){switch($e){case"YY":return String(D.$y).slice(-2);case"YYYY":return b.s(D.$y,4,"0");case"M":return Z+1;case"MM":return b.s(Z+1,2,"0");case"MMM":return le($.monthsShort,Z,X,3);case"MMMM":return le(X,Z);case"D":return D.$D;case"DD":return b.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return le($.weekdaysMin,D.$W,V,2);case"ddd":return le($.weekdaysShort,D.$W,V,3);case"dddd":return V[D.$W];case"H":return String(J);case"HH":return b.s(J,2,"0");case"h":return ve(1);case"hh":return ve(2);case"a":return he(J,B,!0);case"A":return he(J,B,!1);case"m":return String(B);case"mm":return b.s(B,2,"0");case"s":return String(D.$s);case"ss":return b.s(D.$s,2,"0");case"SSS":return b.s(D.$ms,3,"0");case"Z":return I}return null}(G)||I.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(m,D,$){var C,I=this,J=b.p(D),B=y(m),Z=(B.utcOffset()-this.utcOffset())*i,V=this-B,X=function(){return b.m(I,B)};switch(J){case p:C=X()/12;break;case l:C=X();break;case h:C=X()/3;break;case f:C=(V-Z)/6048e5;break;case c:C=(V-Z)/864e5;break;case a:C=V/r;break;case u:C=V/i;break;case o:C=V/n;break;default:C=V}return $?C:b.a(C)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return T[this.$L]},g.locale=function(m,D){if(!m)return this.$L;var $=this.clone(),C=L(m,D,!0);return C&&($.$L=C),$},g.clone=function(){return b.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},N}(),U=R.prototype;return y.prototype=U,[["$ms",s],["$s",o],["$m",u],["$H",a],["$W",c],["$M",l],["$y",p],["$D",w]].forEach(function(N){U[N[1]]=function(g){return this.$g(g,N[0],N[1])}}),y.extend=function(N,g){return N.$i||(N(g,R,y),N.$i=!0),y},y.locale=L,y.isDayjs=v,y.unix=function(N){return y(1e3*N)},y.en=T[x],y.Ls=T,y.p={},y})})(Re);var pt=Re.exports;const be=Je(pt);var qe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Pe,function(){var n,i,r=1e3,s=6e4,o=36e5,u=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,f=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:c,months:f,days:u,hours:o,minutes:s,seconds:r,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof q},w=function(T,E,v){return new q(T,v,E.$l)},M=function(T){return i.p(T)+"s"},F=function(T){return T<0},A=function(T){return F(T)?Math.ceil(T):Math.floor(T)},H=function(T){return Math.abs(T)},O=function(T,E){return T?F(T)?{negative:!0,format:""+H(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},q=function(){function T(v,L,y){var b=this;if(this.$d={},this.$l=y,v===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return w(v*h[M(L)],this);if(typeof v=="number")return this.$ms=v,this.parseFromMilliseconds(),this;if(typeof v=="object")return Object.keys(v).forEach(function(N){b.$d[M(N)]=v[N]}),this.calMilliseconds(),this;if(typeof v=="string"){var R=v.match(l);if(R){var U=R.slice(2).map(function(N){return N!=null?Number(N):0});return this.$d.years=U[0],this.$d.months=U[1],this.$d.weeks=U[2],this.$d.days=U[3],this.$d.hours=U[4],this.$d.minutes=U[5],this.$d.seconds=U[6],this.calMilliseconds(),this}}return this}var E=T.prototype;return E.calMilliseconds=function(){var v=this;this.$ms=Object.keys(this.$d).reduce(function(L,y){return L+(v.$d[y]||0)*h[y]},0)},E.parseFromMilliseconds=function(){var v=this.$ms;this.$d.years=A(v/c),v%=c,this.$d.months=A(v/f),v%=f,this.$d.days=A(v/u),v%=u,this.$d.hours=A(v/o),v%=o,this.$d.minutes=A(v/s),v%=s,this.$d.seconds=A(v/r),v%=r,this.$d.milliseconds=v},E.toISOString=function(){var v=O(this.$d.years,"Y"),L=O(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var b=O(y,"D"),R=O(this.$d.hours,"H"),U=O(this.$d.minutes,"M"),N=this.$d.seconds||0;this.$d.milliseconds&&(N+=this.$d.milliseconds/1e3,N=Math.round(1e3*N)/1e3);var g=O(N,"S"),m=v.negative||L.negative||b.negative||R.negative||U.negative||g.negative,D=R.format||U.format||g.format?"T":"",$=(m?"-":"")+"P"+v.format+L.format+b.format+D+R.format+U.format+g.format;return $==="P"||$==="-P"?"P0D":$},E.toJSON=function(){return this.toISOString()},E.format=function(v){var L=v||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return L.replace(a,function(b,R){return R||String(y[b])})},E.as=function(v){return this.$ms/h[M(v)]},E.get=function(v){var L=this.$ms,y=M(v);return y==="milliseconds"?L%=1e3:L=y==="weeks"?A(L/h[y]):this.$d[y],L||0},E.add=function(v,L,y){var b;return b=L?v*h[M(L)]:p(v)?v.$ms:w(v,this).$ms,w(this.$ms+b*(y?-1:1),this)},E.subtract=function(v,L){return this.add(v,L,!0)},E.locale=function(v){var L=this.clone();return L.$l=v,L},E.clone=function(){return w(this.$ms,this)},E.humanize=function(v){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!v)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},T}(),x=function(T,E,v){return T.add(E.years()*v,"y").add(E.months()*v,"M").add(E.days()*v,"d").add(E.hours()*v,"h").add(E.minutes()*v,"m").add(E.seconds()*v,"s").add(E.milliseconds()*v,"ms")};return function(T,E,v){n=v,i=v().$utils(),v.duration=function(b,R){var U=v.locale();return w(b,{$l:U},R)},v.isDuration=p;var L=E.prototype.add,y=E.prototype.subtract;E.prototype.add=function(b,R){return p(b)?x(this,b,1):L.bind(this)(b,R)},E.prototype.subtract=function(b,R){return p(b)?x(this,b,-1):y.bind(this)(b,R)}}})})(qe);var gt=qe.exports;const wt=Je(gt);be.extend(wt);const vt=e=>{const t=be.duration(e,"seconds"),n=Math.floor(t.asYears()),i=Math.floor(t.asMonths()%12),r=Math.floor(t.asDays()%30),s=t.hours(),o=t.minutes(),u=t.seconds(),a=[];return n>0&&a.push(`${n}年`),i>0&&a.push(`${i}月`),r>0&&a.push(`${r}天`),s>0&&a.push(`${s}小时`),o>0&&a.push(`${o}分`),(a.length===0||u>0)&&a.push(`${u}秒`),a.join("")},$t=e=>{if(e<=0)return[0,"B","0 B"];const t=1024,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.min(Math.floor(Math.log(e)/Math.log(t)),n.length-1),r=(e/t**i).toFixed(2);return[r,n[i],`${r} ${n[i]}`]},Mt=e=>e.toString().replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2"),bt=(e,t=2)=>{const n=e.toFixed(t).toString(),i=n.indexOf(".")>-1?/(\d)(?=(\d{3})+\.)/g:/(\d)(?=(?:\d{3})+$)/g;return n.replace(i,"$1,")};/*!
1
+ (function(ge){typeof define=="function"&&define.amd?define(ge):ge()})(function(){"use strict";const ge=e=>Object.prototype.toString.call(e).substring(8).replace(/]/g,"").toLowerCase(),Xe=(e=1,t)=>{let n,i=e,s=Date.now(),r=!1;return new Promise(o=>{const u=()=>{document.hidden?(r=!0,clearTimeout(n),i-=Date.now()-s):r&&(r=!1,s=Date.now(),a(o))},a=c=>{n=setTimeout(()=>{t==null||t(),c(),document.removeEventListener("visibilitychange",u)},i)};document.addEventListener("visibilitychange",u),a(o)})},Ke=(e,t,n=[])=>{const i={red:"#c0392b",orange:"#d35400",yellow:"#f1c40f",green:"#27ae60",blue:"#2980b9",purple:"#be2edd"},s=()=>{const r=new Date,o=String(r.getHours()).padStart(2,"0"),u=String(r.getMinutes()).padStart(2,"0"),a=String(r.getSeconds()).padStart(2,"0");return`[${o}:${u}:${a}]`};if(Array.isArray(n)){const r=n.map(o=>[`
2
+ ${o.label}:`,o.value]);console.log(`%c${s()}-${e}`,`color: #fff;background: ${i[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,...r.flat(1/0))}else console.log(`%c${s()}-${e}`,`color: #fff;background: ${i[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,n)},Qe=()=>{const e=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipod/.test(e)},et=()=>{const e=navigator.userAgent.toLowerCase(),t=Math.max(window.screen.width,window.screen.height),n=Math.min(window.screen.width,window.screen.height),i=t/n,s=/ipad|tablet|playbook|silk/.test(e)&&!/mobile/.test(e),r=t>=768&&t<=1366,o=i>=1.3&&i<=1.6;return s||r&&o},tt=()=>{const t=location.href.split("?")[1];return t?t.split("&").reduce((i,s)=>{const[r,o]=s.split(/=(.+)/);return i[r]=o,i},{})||{}:{}},nt=(e,t)=>{document.title=e;const n=document.createElement("link");n.setAttribute("rel","icon"),n.setAttribute("href",t),(document.head||document.getElementsByTagName("head")[0]).appendChild(n)},it=(e,t)=>{let n="",i;window.addEventListener("visibilitychange",()=>{if(clearTimeout(i),document.hidden){document.title!==e&&(n=document.title),document.title=t;return}document.title=e,i=setTimeout(()=>{document.title=n},1e3)})},rt=e=>Object.entries(e).map(([t,n])=>`${t}=${n}`).join("&"),st=(e,t)=>{const n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n},we=e=>{if(typeof e=="string")try{const t=JSON.parse(e);return we(t)}catch{return e}return Array.isArray(e)?e.map(t=>we(t)):e!==null&&typeof e=="object"?Object.keys(e).reduce((t,n)=>(t[n]=we(e[n]),t),{}):e},ot=(e=[],t)=>t?e.reduce((n,i)=>(n[i[t]]||(n[i[t]]=[]),n[i[t]].push(i),n),{}):{},ut=(e,t)=>e.includes("@")?t.filter(n=>n.includes(e.slice(e.indexOf("@")))).map(n=>(e.includes("@")?e.split("@")[0]:e)+n):t.map(n=>e+n),ct=e=>{const t=[...e];for(let n=t.length-1;n>0;n--){const i=Math.floor(Math.random()*(n+1));[t[n],t[i]]=[t[i],t[n]]}return t},at=(e,t)=>{const n=e.length;if(n===0||t%n===0)return e;const i=(t%n+n)%n;return e.slice(-i).concat(e.slice(0,-i))},ft=(e,t)=>{if(t<0||t>=e.length)throw new Error("Index out of bounds");const n=e.slice(t+1).reverse();return[...e.slice(0,t+1),...n]},lt=(e,t)=>{fetch(e).then(n=>n.blob()).then(n=>{const i=document.createElement("a"),s=window.URL.createObjectURL(n);i.href=s,i.download=t,i.click()})},ht=e=>{const t=document.createElement("canvas");t.classList.add("imageOptimizer"),document.body.appendChild(t);const n=e.file;if(!n)return;const i=n.name,s=i.split(".").pop().toLowerCase(),r=e.ratio||1,o=e.maxSize||1024,u=e.width||1e4,a=n.type;function c(h,p){const w=h.split(","),M=w[0].match(/:(.*?);/)[1],F=window.atob(w[1]),A=F.length,H=new Uint8Array(A);for(let O=0;O<A;O++)H[O]=F.charCodeAt(O);return new File([H],p,{type:M})}function f(h){const p=new FormData;return p.append("file",h),p}const l=new FileReader;l.readAsDataURL(n),l.onload=h=>{const p=h.target.result;if(h.total/1024>o){const w=new Image;w.src=p,w.onload=()=>{const M=t.getContext("2d"),F=u/w.width;F<1?(t.width=w.width*F,t.height=w.height*F,M.drawImage(w,0,0,w.width*F,w.height*F)):(t.width=w.width,t.height=w.height,M.drawImage(w,0,0,w.width,w.height));const A=t.toDataURL(a,r),H=`${i.split(".")[0]}.${s}`,O=c(A,H);e.success(f(O),O,A),t.remove()},w.onerror=e.fail}else{const w=`${i.split(".")[0]}.${s}`,M=c(p,w);e.success(f(M),M,p),t.remove()}},l.onerror=e.fail},dt=(e,t)=>{const n=window.URL||window.webkitURL,i=new Blob([t]),s=document.createElement("a");s.href=n.createObjectURL(i),s.download=e,s.click(),n.revokeObjectURL(s.href)};var Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Ae,function(){var n=1e3,i=6e4,s=36e5,r="millisecond",o="second",u="minute",a="hour",c="day",f="week",l="month",h="quarter",p="year",w="date",M="Invalid Date",F=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,H={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var g=["th","st","nd","rd"],m=N%100;return"["+N+(g[(m-20)%10]||g[m]||g[0])+"]"}},O=function(N,g,m){var D=String(N);return!D||D.length>=g?N:""+Array(g+1-D.length).join(m)+N},q={s:O,z:function(N){var g=-N.utcOffset(),m=Math.abs(g),D=Math.floor(m/60),$=m%60;return(g<=0?"+":"-")+O(D,2,"0")+":"+O($,2,"0")},m:function N(g,m){if(g.date()<m.date())return-N(m,g);var D=12*(m.year()-g.year())+(m.month()-g.month()),$=g.clone().add(D,l),C=m-$<0,I=g.clone().add(D+(C?-1:1),l);return+(-(D+(m-$)/(C?$-I:I-$))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:l,y:p,w:f,d:c,D:w,h:a,m:u,s:o,ms:r,Q:h}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},x="en",T={};T[x]=H;var E="$isDayjsObject",v=function(N){return N instanceof R||!(!N||!N[E])},L=function N(g,m,D){var $;if(!g)return x;if(typeof g=="string"){var C=g.toLowerCase();T[C]&&($=C),m&&(T[C]=m,$=C);var I=g.split("-");if(!$&&I.length>1)return N(I[0])}else{var J=g.name;T[J]=g,$=J}return!D&&$&&(x=$),$||!D&&x},y=function(N,g){if(v(N))return N.clone();var m=typeof g=="object"?g:{};return m.date=N,m.args=arguments,new R(m)},b=q;b.l=L,b.i=v,b.w=function(N,g){return y(N,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var R=function(){function N(m){this.$L=L(m.locale,null,!0),this.parse(m),this.$x=this.$x||m.x||{},this[E]=!0}var g=N.prototype;return g.parse=function(m){this.$d=function(D){var $=D.date,C=D.utc;if($===null)return new Date(NaN);if(b.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var I=$.match(F);if(I){var J=I[2]-1||0,B=(I[7]||"0").substring(0,3);return C?new Date(Date.UTC(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)):new Date(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)}}return new Date($)}(m),this.init()},g.init=function(){var m=this.$d;this.$y=m.getFullYear(),this.$M=m.getMonth(),this.$D=m.getDate(),this.$W=m.getDay(),this.$H=m.getHours(),this.$m=m.getMinutes(),this.$s=m.getSeconds(),this.$ms=m.getMilliseconds()},g.$utils=function(){return b},g.isValid=function(){return this.$d.toString()!==M},g.isSame=function(m,D){var $=y(m);return this.startOf(D)<=$&&$<=this.endOf(D)},g.isAfter=function(m,D){return y(m)<this.startOf(D)},g.isBefore=function(m,D){return this.endOf(D)<y(m)},g.$g=function(m,D,$){return b.u(m)?this[D]:this.set($,m)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(m,D){var $=this,C=!!b.u(D)||D,I=b.p(m),J=function(ae,G){var ue=b.w($.$u?Date.UTC($.$y,G,ae):new Date($.$y,G,ae),$);return C?ue:ue.endOf(c)},B=function(ae,G){return b.w($.toDate()[ae].apply($.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(G)),$)},Z=this.$W,V=this.$M,X=this.$D,he="set"+(this.$u?"UTC":"");switch(I){case p:return C?J(1,0):J(31,11);case l:return C?J(1,V):J(0,V+1);case f:var ce=this.$locale().weekStart||0,me=(Z<ce?Z+7:Z)-ce;return J(C?X-me:X+(6-me),V);case c:case w:return B(he+"Hours",0);case a:return B(he+"Minutes",1);case u:return B(he+"Seconds",2);case o:return B(he+"Milliseconds",3);default:return this.clone()}},g.endOf=function(m){return this.startOf(m,!1)},g.$set=function(m,D){var $,C=b.p(m),I="set"+(this.$u?"UTC":""),J=($={},$[c]=I+"Date",$[w]=I+"Date",$[l]=I+"Month",$[p]=I+"FullYear",$[a]=I+"Hours",$[u]=I+"Minutes",$[o]=I+"Seconds",$[r]=I+"Milliseconds",$)[C],B=C===c?this.$D+(D-this.$W):D;if(C===l||C===p){var Z=this.clone().set(w,1);Z.$d[J](B),Z.init(),this.$d=Z.set(w,Math.min(this.$D,Z.daysInMonth())).$d}else J&&this.$d[J](B);return this.init(),this},g.set=function(m,D){return this.clone().$set(m,D)},g.get=function(m){return this[b.p(m)]()},g.add=function(m,D){var $,C=this;m=Number(m);var I=b.p(D),J=function(V){var X=y(C);return b.w(X.date(X.date()+Math.round(V*m)),C)};if(I===l)return this.set(l,this.$M+m);if(I===p)return this.set(p,this.$y+m);if(I===c)return J(1);if(I===f)return J(7);var B=($={},$[u]=i,$[a]=s,$[o]=n,$)[I]||1,Z=this.$d.getTime()+m*B;return b.w(Z,this)},g.subtract=function(m,D){return this.add(-1*m,D)},g.format=function(m){var D=this,$=this.$locale();if(!this.isValid())return $.invalidDate||M;var C=m||"YYYY-MM-DDTHH:mm:ssZ",I=b.z(this),J=this.$H,B=this.$m,Z=this.$M,V=$.weekdays,X=$.months,he=$.meridiem,ce=function(G,ue,pe,ke){return G&&(G[ue]||G(D,C))||pe[ue].slice(0,ke)},me=function(G){return b.s(J%12||12,G,"0")},ae=he||function(G,ue,pe){var ke=G<12?"AM":"PM";return pe?ke.toLowerCase():ke};return C.replace(A,function(G,ue){return ue||function(pe){switch(pe){case"YY":return String(D.$y).slice(-2);case"YYYY":return b.s(D.$y,4,"0");case"M":return Z+1;case"MM":return b.s(Z+1,2,"0");case"MMM":return ce($.monthsShort,Z,X,3);case"MMMM":return ce(X,Z);case"D":return D.$D;case"DD":return b.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ce($.weekdaysMin,D.$W,V,2);case"ddd":return ce($.weekdaysShort,D.$W,V,3);case"dddd":return V[D.$W];case"H":return String(J);case"HH":return b.s(J,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return ae(J,B,!0);case"A":return ae(J,B,!1);case"m":return String(B);case"mm":return b.s(B,2,"0");case"s":return String(D.$s);case"ss":return b.s(D.$s,2,"0");case"SSS":return b.s(D.$ms,3,"0");case"Z":return I}return null}(G)||I.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(m,D,$){var C,I=this,J=b.p(D),B=y(m),Z=(B.utcOffset()-this.utcOffset())*i,V=this-B,X=function(){return b.m(I,B)};switch(J){case p:C=X()/12;break;case l:C=X();break;case h:C=X()/3;break;case f:C=(V-Z)/6048e5;break;case c:C=(V-Z)/864e5;break;case a:C=V/s;break;case u:C=V/i;break;case o:C=V/n;break;default:C=V}return $?C:b.a(C)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return T[this.$L]},g.locale=function(m,D){if(!m)return this.$L;var $=this.clone(),C=L(m,D,!0);return C&&($.$L=C),$},g.clone=function(){return b.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},N}(),U=R.prototype;return y.prototype=U,[["$ms",r],["$s",o],["$m",u],["$H",a],["$W",c],["$M",l],["$y",p],["$D",w]].forEach(function(N){U[N[1]]=function(g){return this.$g(g,N[0],N[1])}}),y.extend=function(N,g){return N.$i||(N(g,R,y),N.$i=!0),y},y.locale=L,y.isDayjs=v,y.unix=function(N){return y(1e3*N)},y.en=T[x],y.Ls=T,y.p={},y})})(Fe);var mt=Fe.exports;const ve=Le(mt);var Pe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Ae,function(){var n,i,s=1e3,r=6e4,o=36e5,u=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,f=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:c,months:f,days:u,hours:o,minutes:r,seconds:s,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof q},w=function(T,E,v){return new q(T,v,E.$l)},M=function(T){return i.p(T)+"s"},F=function(T){return T<0},A=function(T){return F(T)?Math.ceil(T):Math.floor(T)},H=function(T){return Math.abs(T)},O=function(T,E){return T?F(T)?{negative:!0,format:""+H(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},q=function(){function T(v,L,y){var b=this;if(this.$d={},this.$l=y,v===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return w(v*h[M(L)],this);if(typeof v=="number")return this.$ms=v,this.parseFromMilliseconds(),this;if(typeof v=="object")return Object.keys(v).forEach(function(N){b.$d[M(N)]=v[N]}),this.calMilliseconds(),this;if(typeof v=="string"){var R=v.match(l);if(R){var U=R.slice(2).map(function(N){return N!=null?Number(N):0});return this.$d.years=U[0],this.$d.months=U[1],this.$d.weeks=U[2],this.$d.days=U[3],this.$d.hours=U[4],this.$d.minutes=U[5],this.$d.seconds=U[6],this.calMilliseconds(),this}}return this}var E=T.prototype;return E.calMilliseconds=function(){var v=this;this.$ms=Object.keys(this.$d).reduce(function(L,y){return L+(v.$d[y]||0)*h[y]},0)},E.parseFromMilliseconds=function(){var v=this.$ms;this.$d.years=A(v/c),v%=c,this.$d.months=A(v/f),v%=f,this.$d.days=A(v/u),v%=u,this.$d.hours=A(v/o),v%=o,this.$d.minutes=A(v/r),v%=r,this.$d.seconds=A(v/s),v%=s,this.$d.milliseconds=v},E.toISOString=function(){var v=O(this.$d.years,"Y"),L=O(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var b=O(y,"D"),R=O(this.$d.hours,"H"),U=O(this.$d.minutes,"M"),N=this.$d.seconds||0;this.$d.milliseconds&&(N+=this.$d.milliseconds/1e3,N=Math.round(1e3*N)/1e3);var g=O(N,"S"),m=v.negative||L.negative||b.negative||R.negative||U.negative||g.negative,D=R.format||U.format||g.format?"T":"",$=(m?"-":"")+"P"+v.format+L.format+b.format+D+R.format+U.format+g.format;return $==="P"||$==="-P"?"P0D":$},E.toJSON=function(){return this.toISOString()},E.format=function(v){var L=v||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return L.replace(a,function(b,R){return R||String(y[b])})},E.as=function(v){return this.$ms/h[M(v)]},E.get=function(v){var L=this.$ms,y=M(v);return y==="milliseconds"?L%=1e3:L=y==="weeks"?A(L/h[y]):this.$d[y],L||0},E.add=function(v,L,y){var b;return b=L?v*h[M(L)]:p(v)?v.$ms:w(v,this).$ms,w(this.$ms+b*(y?-1:1),this)},E.subtract=function(v,L){return this.add(v,L,!0)},E.locale=function(v){var L=this.clone();return L.$l=v,L},E.clone=function(){return w(this.$ms,this)},E.humanize=function(v){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!v)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},T}(),x=function(T,E,v){return T.add(E.years()*v,"y").add(E.months()*v,"M").add(E.days()*v,"d").add(E.hours()*v,"h").add(E.minutes()*v,"m").add(E.seconds()*v,"s").add(E.milliseconds()*v,"ms")};return function(T,E,v){n=v,i=v().$utils(),v.duration=function(b,R){var U=v.locale();return w(b,{$l:U},R)},v.isDuration=p;var L=E.prototype.add,y=E.prototype.subtract;E.prototype.add=function(b,R){return p(b)?x(this,b,1):L.bind(this)(b,R)},E.prototype.subtract=function(b,R){return p(b)?x(this,b,-1):y.bind(this)(b,R)}}})})(Pe);var pt=Pe.exports;const gt=Le(pt);ve.extend(gt);const wt=e=>{const t=ve.duration(e,"seconds"),n=Math.floor(t.asYears()),i=Math.floor(t.asMonths()%12),s=Math.floor(t.asDays()%30),r=t.hours(),o=t.minutes(),u=t.seconds(),a=[];return n>0&&a.push(`${n}年`),i>0&&a.push(`${i}月`),s>0&&a.push(`${s}天`),r>0&&a.push(`${r}小时`),o>0&&a.push(`${o}分`),(a.length===0||u>0)&&a.push(`${u}秒`),a.join("")},vt=e=>{if(e<=0)return[0,"B","0 B"];const t=1024,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.min(Math.floor(Math.log(e)/Math.log(t)),n.length-1),s=(e/t**i).toFixed(2);return[s,n[i],`${s} ${n[i]}`]},$t=e=>e.toString().replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2"),Mt=(e,t=2)=>{const n=e.toFixed(t).toString(),i=n.indexOf(".")>-1?/(\d)(?=(\d{3})+\.)/g:/(\d)(?=(?:\d{3})+$)/g;return n.replace(i,"$1,")};/*!
3
3
  * decimal.js v10.4.3
4
4
  * An arbitrary-precision Decimal type for JavaScript.
5
5
  * https://github.com/MikeMcl/decimal.js
6
6
  * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
7
7
  * MIT Licence
8
- */var me=9e15,se=1e9,ye="0123456789abcdef",Ne="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Se="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ce={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-me,maxE:me,crypto:!1},Ue,ie,_=!0,De="[DecimalError] ",oe=De+"Invalid argument: ",Be=De+"Precision limit exceeded",He=De+"crypto unavailable",Ye="[object Decimal]",W=Math.floor,Y=Math.pow,Nt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,St=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Dt=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ze=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,K=1e7,k=7,Et=9007199254740991,kt=Ne.length-1,Ie=Se.length-1,d={toStringTag:Ye};d.absoluteValue=d.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),S(e)},d.ceil=function(){return S(new this.constructor(this),this.e+1,2)},d.clampedTo=d.clamp=function(e,t){var n,i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(oe+t);return n=i.cmp(e),n<0?e:i.cmp(t)>0?t:new r(i)},d.comparedTo=d.cmp=function(e){var t,n,i,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,a=s.s,c=e.s;if(!o||!u)return!a||!c?NaN:a!==c?a:o===u?0:!o^a<0?1:-1;if(!o[0]||!u[0])return o[0]?a:u[0]?-c:0;if(a!==c)return a;if(s.e!==e.e)return s.e>e.e^a<0?1:-1;for(i=o.length,r=u.length,t=0,n=i<r?i:r;t<n;++t)if(o[t]!==u[t])return o[t]>u[t]^a<0?1:-1;return i===r?0:i>r^a<0?1:-1},d.cosine=d.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+k,i.rounding=1,n=_t(i,xe(i,n)),i.precision=e,i.rounding=t,S(ie==2||ie==3?n.neg():n,e,t,!0)):new i(1):new i(NaN)},d.cubeRoot=d.cbrt=function(){var e,t,n,i,r,s,o,u,a,c,f=this,l=f.constructor;if(!f.isFinite()||f.isZero())return new l(f);for(_=!1,s=f.s*Y(f.s*f,1/3),!s||Math.abs(s)==1/0?(n=j(f.d),e=f.e,(s=(e-n.length+1)%3)&&(n+=s==1||s==-2?"0":"00"),s=Y(n,1/3),e=W((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?n="5e"+e:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new l(n),i.s=f.s):i=new l(s.toString()),o=(e=l.precision)+3;;)if(u=i,a=u.times(u).times(u),c=a.plus(f),i=P(c.plus(f).times(u),c.plus(a),o+2,1),j(u.d).slice(0,o)===(n=j(i.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!r&&n=="4999"){if(!r&&(S(u,e+1,0),u.times(u).times(u).eq(f))){i=u;break}o+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(S(i,e+1,1),t=!i.times(i).times(i).eq(f));break}return _=!0,S(i,e,l.rounding,t)},d.decimalPlaces=d.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-W(this.e/k))*k,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},d.dividedBy=d.div=function(e){return P(this,new this.constructor(e))},d.dividedToIntegerBy=d.divToInt=function(e){var t=this,n=t.constructor;return S(P(t,new n(e),0,1,1),n.precision,n.rounding)},d.equals=d.eq=function(e){return this.cmp(e)===0},d.floor=function(){return S(new this.constructor(this),this.e+1,3)},d.greaterThan=d.gt=function(e){return this.cmp(e)>0},d.greaterThanOrEqualTo=d.gte=function(e){var t=this.cmp(e);return t==1||t===0},d.hyperbolicCosine=d.cosh=function(){var e,t,n,i,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;n=o.precision,i=o.rounding,o.precision=n+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),t=(1/Oe(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),s=pe(o,1,s.times(t),new o(1),!0);for(var a,c=e,f=new o(8);c--;)a=s.times(s),s=u.minus(a.times(f.minus(a.times(f))));return S(s,o.precision=n,o.rounding=i,!0)},d.hyperbolicSine=d.sinh=function(){var e,t,n,i,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(t=s.precision,n=s.rounding,s.precision=t+Math.max(r.e,r.sd())+4,s.rounding=1,i=r.d.length,i<3)r=pe(s,2,r,r,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,r=r.times(1/Oe(5,e)),r=pe(s,2,r,r,!0);for(var o,u=new s(5),a=new s(16),c=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(a.times(o).plus(c))))}return s.precision=t,s.rounding=n,S(r,t,n,!0)},d.hyperbolicTangent=d.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,P(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},d.inverseCosine=d.acos=function(){var e,t=this,n=t.constructor,i=t.abs().cmp(1),r=n.precision,s=n.rounding;return i!==-1?i===0?t.isNeg()?Q(n,r,s):new n(0):new n(NaN):t.isZero()?Q(n,r+4,s).times(.5):(n.precision=r+6,n.rounding=1,t=t.asin(),e=Q(n,r+4,s).times(.5),n.precision=r,n.rounding=s,e.minus(t))},d.inverseHyperbolicCosine=d.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,_=!1,n=n.times(n).minus(1).sqrt().plus(n),_=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},d.inverseHyperbolicSine=d.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,_=!1,n=n.times(n).plus(1).sqrt().plus(n),_=!0,i.precision=e,i.rounding=t,n.ln())},d.inverseHyperbolicTangent=d.atanh=function(){var e,t,n,i,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,t=s.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?S(new s(r),e,t,!0):(s.precision=n=i-r.e,r=P(r.plus(1),new s(1).minus(r),n+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=t,r.times(.5))):new s(NaN)},d.inverseSine=d.asin=function(){var e,t,n,i,r=this,s=r.constructor;return r.isZero()?new s(r):(t=r.abs().cmp(1),n=s.precision,i=s.rounding,t!==-1?t===0?(e=Q(s,n+4,i).times(.5),e.s=r.s,e):new s(NaN):(s.precision=n+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=n,s.rounding=i,r.times(2)))},d.inverseTangent=d.atan=function(){var e,t,n,i,r,s,o,u,a,c=this,f=c.constructor,l=f.precision,h=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&l+4<=Ie)return o=Q(f,l+4,h).times(.25),o.s=c.s,o}else{if(!c.s)return new f(NaN);if(l+4<=Ie)return o=Q(f,l+4,h).times(.5),o.s=c.s,o}for(f.precision=u=l+10,f.rounding=1,n=Math.min(28,u/k+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(u/k),i=1,a=c.times(c),o=new f(c),r=c;e!==-1;)if(r=r.times(a),s=o.minus(r.div(i+=2)),r=r.times(a),o=s.plus(r.div(i+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===s.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),_=!0,S(o,f.precision=l,f.rounding=h,!0)},d.isFinite=function(){return!!this.d},d.isInteger=d.isInt=function(){return!!this.d&&W(this.e/k)>this.d.length-2},d.isNaN=function(){return!this.s},d.isNegative=d.isNeg=function(){return this.s<0},d.isPositive=d.isPos=function(){return this.s>0},d.isZero=function(){return!!this.d&&this.d[0]===0},d.lessThan=d.lt=function(e){return this.cmp(e)<0},d.lessThanOrEqualTo=d.lte=function(e){return this.cmp(e)<1},d.logarithm=d.log=function(e){var t,n,i,r,s,o,u,a,c=this,f=c.constructor,l=f.precision,h=f.rounding,p=5;if(e==null)e=new f(10),t=!0;else{if(e=new f(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new f(n&&!n[0]?-1/0:c.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)s=!0;else{for(r=n[0];r%10===0;)r/=10;s=r!==1}if(_=!1,u=l+p,o=ce(c,u),i=t?_e(f,u+10):ce(e,u),a=P(o,i,u,1),we(a.d,r=l,h))do if(u+=10,o=ce(c,u),i=t?_e(f,u+10):ce(e,u),a=P(o,i,u,1),!s){+j(a.d).slice(r+1,r+15)+1==1e14&&(a=S(a,l+1,0));break}while(we(a.d,r+=10,h));return _=!0,S(a,l,h)},d.minus=d.sub=function(e){var t,n,i,r,s,o,u,a,c,f,l,h,p=this,w=p.constructor;if(e=new w(e),!p.d||!e.d)return!p.s||!e.s?e=new w(NaN):p.d?e.s=-e.s:e=new w(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(c=p.d,h=e.d,u=w.precision,a=w.rounding,!c[0]||!h[0]){if(h[0])e.s=-e.s;else if(c[0])e=new w(p);else return new w(a===3?-0:0);return _?S(e,u,a):e}if(n=W(e.e/k),f=W(p.e/k),c=c.slice(),s=f-n,s){for(l=s<0,l?(t=c,s=-s,o=h.length):(t=h,n=f,o=c.length),i=Math.max(Math.ceil(u/k),o)+2,s>i&&(s=i,t.length=1),t.reverse(),i=s;i--;)t.push(0);t.reverse()}else{for(i=c.length,o=h.length,l=i<o,l&&(o=i),i=0;i<o;i++)if(c[i]!=h[i]){l=c[i]<h[i];break}s=0}for(l&&(t=c,c=h,h=t,e.s=-e.s),o=c.length,i=h.length-o;i>0;--i)c[o++]=0;for(i=h.length;i>s;){if(c[--i]<h[i]){for(r=i;r&&c[--r]===0;)c[r]=K-1;--c[r],c[i]+=K}c[i]-=h[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=ke(c,n),_?S(e,u,a):e):new w(a===3?-0:0)},d.modulo=d.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?S(new i(n),i.precision,i.rounding):(_=!1,i.modulo==9?(t=P(n,e.abs(),0,3,1),t.s*=e.s):t=P(n,e,0,i.modulo,1),t=t.times(e),_=!0,n.minus(t))},d.naturalExponential=d.exp=function(){return Ae(this)},d.naturalLogarithm=d.ln=function(){return ce(this)},d.negated=d.neg=function(){var e=new this.constructor(this);return e.s=-e.s,S(e)},d.plus=d.add=function(e){var t,n,i,r,s,o,u,a,c,f,l=this,h=l.constructor;if(e=new h(e),!l.d||!e.d)return!l.s||!e.s?e=new h(NaN):l.d||(e=new h(e.d||l.s===e.s?l:NaN)),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(c=l.d,f=e.d,u=h.precision,a=h.rounding,!c[0]||!f[0])return f[0]||(e=new h(l)),_?S(e,u,a):e;if(s=W(l.e/k),i=W(e.e/k),c=c.slice(),r=s-i,r){for(r<0?(n=c,r=-r,o=f.length):(n=f,i=s,o=c.length),s=Math.ceil(u/k),o=s>o?s+1:o+1,r>o&&(r=o,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for(o=c.length,r=f.length,o-r<0&&(r=o,n=f,f=c,c=n),t=0;r;)t=(c[--r]=c[r]+f[r]+t)/K|0,c[r]%=K;for(t&&(c.unshift(t),++i),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=ke(c,i),_?S(e,u,a):e},d.precision=d.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(oe+e);return n.d?(t=je(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},d.round=function(){var e=this,t=e.constructor;return S(new t(e),e.e+1,t.rounding)},d.sine=d.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+k,i.rounding=1,n=Tt(i,xe(i,n)),i.precision=e,i.rounding=t,S(ie>2?n.neg():n,e,t,!0)):new i(NaN)},d.squareRoot=d.sqrt=function(){var e,t,n,i,r,s,o=this,u=o.d,a=o.e,c=o.s,f=o.constructor;if(c!==1||!u||!u[0])return new f(!c||c<0&&(!u||u[0])?NaN:u?o:1/0);for(_=!1,c=Math.sqrt(+o),c==0||c==1/0?(t=j(u),(t.length+a)%2==0&&(t+="0"),c=Math.sqrt(t),a=W((a+1)/2)-(a<0||a%2),c==1/0?t="5e"+a:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+a),i=new f(t)):i=new f(c.toString()),n=(a=f.precision)+3;;)if(s=i,i=s.plus(P(o,s,n+2,1)).times(.5),j(s.d).slice(0,n)===(t=j(i.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!r&&t=="4999"){if(!r&&(S(s,a+1,0),s.times(s).eq(o))){i=s;break}n+=4,r=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(S(i,a+1,1),e=!i.times(i).eq(o));break}return _=!0,S(i,a,f.rounding,e)},d.tangent=d.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,n=n.sin(),n.s=1,n=P(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,S(ie==2||ie==4?n.neg():n,e,t,!0)):new i(NaN)},d.times=d.mul=function(e){var t,n,i,r,s,o,u,a,c,f=this,l=f.constructor,h=f.d,p=(e=new l(e)).d;if(e.s*=f.s,!h||!h[0]||!p||!p[0])return new l(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:!h||!p?e.s/0:e.s*0);for(n=W(f.e/k)+W(e.e/k),a=h.length,c=p.length,a<c&&(s=h,h=p,p=s,o=a,a=c,c=o),s=[],o=a+c,i=o;i--;)s.push(0);for(i=c;--i>=0;){for(t=0,r=a+i;r>i;)u=s[r]+p[i]*h[r-i-1]+t,s[r--]=u%K|0,t=u/K|0;s[r]=(s[r]+t)%K|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=ke(s,n),_?S(e,l.precision,l.rounding):e},d.toBinary=function(e,t){return Fe(this,2,e,t)},d.toDecimalPlaces=d.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),e===void 0?n:(z(e,0,se),t===void 0?t=i.rounding:z(t,0,8),S(n,e+n.e+1,t))},d.toExponential=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=te(i,!0):(z(e,0,se),t===void 0?t=r.rounding:z(t,0,8),i=S(new r(i),e+1,t),n=te(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},d.toFixed=function(e,t){var n,i,r=this,s=r.constructor;return e===void 0?n=te(r):(z(e,0,se),t===void 0?t=s.rounding:z(t,0,8),i=S(new s(r),e+r.e+1,t),n=te(i,!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},d.toFraction=function(e){var t,n,i,r,s,o,u,a,c,f,l,h,p=this,w=p.d,M=p.constructor;if(!w)return new M(p);if(c=n=new M(1),i=a=new M(0),t=new M(i),s=t.e=je(w)-p.e-1,o=s%k,t.d[0]=Y(10,o<0?k+o:o),e==null)e=s>0?t:c;else{if(u=new M(e),!u.isInt()||u.lt(c))throw Error(oe+u);e=u.gt(t)?s>0?t:c:u}for(_=!1,u=new M(j(w)),f=M.precision,M.precision=s=w.length*k*2;l=P(u,t,0,1,1),r=n.plus(l.times(i)),r.cmp(e)!=1;)n=i,i=r,r=c,c=a.plus(l.times(r)),a=r,r=t,t=u.minus(l.times(r)),u=r;return r=P(e.minus(n),i,0,1,1),a=a.plus(r.times(c)),n=n.plus(r.times(i)),a.s=c.s=p.s,h=P(c,i,s,1).minus(p).abs().cmp(P(a,n,s,1).minus(p).abs())<1?[c,i]:[a,n],M.precision=f,_=!0,h},d.toHexadecimal=d.toHex=function(e,t){return Fe(this,16,e,t)},d.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),e==null){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:z(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(_=!1,n=P(n,e,0,t,1).times(e),_=!0,S(n)):(e.s=n.s,n=e),n},d.toNumber=function(){return+this},d.toOctal=function(e,t){return Fe(this,8,e,t)},d.toPower=d.pow=function(e){var t,n,i,r,s,o,u=this,a=u.constructor,c=+(e=new a(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new a(Y(+u,c));if(u=new a(u),u.eq(1))return u;if(i=a.precision,s=a.rounding,e.eq(1))return S(u,i,s);if(t=W(e.e/k),t>=e.d.length-1&&(n=c<0?-c:c)<=Et)return r=We(a,u,n,i),e.s<0?new a(1).div(r):S(r,i,s);if(o=u.s,o<0){if(t<e.d.length-1)return new a(NaN);if(e.d[t]&1||(o=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=o,u}return n=Y(+u,c),t=n==0||!isFinite(n)?W(c*(Math.log("0."+j(u.d))/Math.LN10+u.e+1)):new a(n+"").e,t>a.maxE+1||t<a.minE-1?new a(t>0?o/0:0):(_=!1,a.rounding=u.s=1,n=Math.min(12,(t+"").length),r=Ae(e.times(ce(u,i+n)),i),r.d&&(r=S(r,i+5,1),we(r.d,i,s)&&(t=i+10,r=S(Ae(e.times(ce(u,t+n)),t),t+5,1),+j(r.d).slice(i+1,i+15)+1==1e14&&(r=S(r,i+1,0)))),r.s=o,_=!0,a.rounding=s,S(r,i,s))},d.toPrecision=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=te(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(z(e,1,se),t===void 0?t=r.rounding:z(t,0,8),i=S(new r(i),e,t),n=te(i,e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},d.toSignificantDigits=d.toSD=function(e,t){var n=this,i=n.constructor;return e===void 0?(e=i.precision,t=i.rounding):(z(e,1,se),t===void 0?t=i.rounding:z(t,0,8)),S(new i(n),e,t)},d.toString=function(){var e=this,t=e.constructor,n=te(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},d.truncated=d.trunc=function(){return S(new this.constructor(this),this.e+1,1)},d.valueOf=d.toJSON=function(){var e=this,t=e.constructor,n=te(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function j(e){var t,n,i,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,t=1;t<r;t++)i=e[t]+"",n=k-i.length,n&&(s+=ue(n)),s+=i;o=e[t],i=o+"",n=k-i.length,n&&(s+=ue(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}function z(e,t,n){if(e!==~~e||e<t||e>n)throw Error(oe+e)}function we(e,t,n,i){var r,s,o,u;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=k,r=0):(r=Math.ceil((t+1)/k),t%=k),s=Y(10,k-t),u=e[r]%s|0,i==null?t<3?(t==0?u=u/100|0:t==1&&(u=u/10|0),o=n<4&&u==99999||n>3&&u==49999||u==5e4||u==0):o=(n<4&&u+1==s||n>3&&u+1==s/2)&&(e[r+1]/s/100|0)==Y(10,t-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:t<4?(t==0?u=u/1e3|0:t==1?u=u/100|0:t==2&&(u=u/10|0),o=(i||n<4)&&u==9999||!i&&n>3&&u==4999):o=((i||n<4)&&u+1==s||!i&&n>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==Y(10,t-3)-1,o}function Ee(e,t,n){for(var i,r=[0],s,o=0,u=e.length;o<u;){for(s=r.length;s--;)r[s]*=t;for(r[0]+=ye.indexOf(e.charAt(o++)),i=0;i<r.length;i++)r[i]>n-1&&(r[i+1]===void 0&&(r[i+1]=0),r[i+1]+=r[i]/n|0,r[i]%=n)}return r.reverse()}function _t(e,t){var n,i,r;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),r=(1/Oe(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=pe(e,1,t.times(r),new e(1));for(var s=n;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var P=function(){function e(i,r,s){var o,u=0,a=i.length;for(i=i.slice();a--;)o=i[a]*r+u,i[a]=o%s|0,u=o/s|0;return u&&i.unshift(u),i}function t(i,r,s,o){var u,a;if(s!=o)a=s>o?1:-1;else for(u=a=0;u<s;u++)if(i[u]!=r[u]){a=i[u]>r[u]?1:-1;break}return a}function n(i,r,s,o){for(var u=0;s--;)i[s]-=u,u=i[s]<r[s]?1:0,i[s]=u*o+i[s]-r[s];for(;!i[0]&&i.length>1;)i.shift()}return function(i,r,s,o,u,a){var c,f,l,h,p,w,M,F,A,H,O,q,x,T,E,v,L,y,b,R,U=i.constructor,N=i.s==r.s?1:-1,g=i.d,m=r.d;if(!g||!g[0]||!m||!m[0])return new U(!i.s||!r.s||(g?m&&g[0]==m[0]:!m)?NaN:g&&g[0]==0||!m?N*0:N/0);for(a?(p=1,f=i.e-r.e):(a=K,p=k,f=W(i.e/p)-W(r.e/p)),b=m.length,L=g.length,A=new U(N),H=A.d=[],l=0;m[l]==(g[l]||0);l++);if(m[l]>(g[l]||0)&&f--,s==null?(T=s=U.precision,o=U.rounding):u?T=s+(i.e-r.e)+1:T=s,T<0)H.push(1),w=!0;else{if(T=T/p+2|0,l=0,b==1){for(h=0,m=m[0],T++;(l<L||h)&&T--;l++)E=h*a+(g[l]||0),H[l]=E/m|0,h=E%m|0;w=h||l<L}else{for(h=a/(m[0]+1)|0,h>1&&(m=e(m,h,a),g=e(g,h,a),b=m.length,L=g.length),v=b,O=g.slice(0,b),q=O.length;q<b;)O[q++]=0;R=m.slice(),R.unshift(0),y=m[0],m[1]>=a/2&&++y;do h=0,c=t(m,O,b,q),c<0?(x=O[0],b!=q&&(x=x*a+(O[1]||0)),h=x/y|0,h>1?(h>=a&&(h=a-1),M=e(m,h,a),F=M.length,q=O.length,c=t(M,O,F,q),c==1&&(h--,n(M,b<F?R:m,F,a))):(h==0&&(c=h=1),M=m.slice()),F=M.length,F<q&&M.unshift(0),n(O,M,q,a),c==-1&&(q=O.length,c=t(m,O,b,q),c<1&&(h++,n(O,b<q?R:m,q,a))),q=O.length):c===0&&(h++,O=[0]),H[l++]=h,c&&O[0]?O[q++]=g[v]||0:(O=[g[v]],q=1);while((v++<L||O[0]!==void 0)&&T--);w=O[0]!==void 0}H[0]||H.shift()}if(p==1)A.e=f,Ue=w;else{for(l=1,h=H[0];h>=10;h/=10)l++;A.e=l+f*p-1,S(A,u?s+A.e+1:s,o,w)}return A}}();function S(e,t,n,i){var r,s,o,u,a,c,f,l,h,p=e.constructor;e:if(t!=null){if(l=e.d,!l)return e;for(r=1,u=l[0];u>=10;u/=10)r++;if(s=t-r,s<0)s+=k,o=t,f=l[h=0],a=f/Y(10,r-o-1)%10|0;else if(h=Math.ceil((s+1)/k),u=l.length,h>=u)if(i){for(;u++<=h;)l.push(0);f=a=0,r=1,s%=k,o=s-k+1}else break e;else{for(f=u=l[h],r=1;u>=10;u/=10)r++;s%=k,o=s-k+r,a=o<0?0:f/Y(10,r-o-1)%10|0}if(i=i||t<0||l[h+1]!==void 0||(o<0?f:f%Y(10,r-o-1)),c=n<4?(a||i)&&(n==0||n==(e.s<0?3:2)):a>5||a==5&&(n==4||i||n==6&&(s>0?o>0?f/Y(10,r-o):0:l[h-1])%10&1||n==(e.s<0?8:7)),t<1||!l[0])return l.length=0,c?(t-=e.e+1,l[0]=Y(10,(k-t%k)%k),e.e=-t||0):l[0]=e.e=0,e;if(s==0?(l.length=h,u=1,h--):(l.length=h+1,u=Y(10,k-s),l[h]=o>0?(f/Y(10,r-o)%Y(10,o)|0)*u:0),c)for(;;)if(h==0){for(s=1,o=l[0];o>=10;o/=10)s++;for(o=l[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,l[0]==K&&(l[0]=1));break}else{if(l[h]+=u,l[h]!=K)break;l[h--]=0,u=1}for(s=l.length;l[--s]===0;)l.pop()}return _&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function te(e,t,n){if(!e.isFinite())return Ge(e);var i,r=e.e,s=j(e.d),o=s.length;return t?(n&&(i=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+ue(i):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+ue(-r-1)+s,n&&(i=n-o)>0&&(s+=ue(i))):r>=o?(s+=ue(r+1-o),n&&(i=n-r-1)>0&&(s=s+"."+ue(i))):((i=r+1)<o&&(s=s.slice(0,i)+"."+s.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(s+="."),s+=ue(i))),s}function ke(e,t){var n=e[0];for(t*=k;n>=10;n/=10)t++;return t}function _e(e,t,n){if(t>kt)throw _=!0,n&&(e.precision=n),Error(Be);return S(new e(Ne),t,1,!0)}function Q(e,t,n){if(t>Ie)throw Error(Be);return S(new e(Se),t,n,!0)}function je(e){var t=e.length-1,n=t*k+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function ue(e){for(var t="";e--;)t+="0";return t}function We(e,t,n,i){var r,s=new e(1),o=Math.ceil(i/k+4);for(_=!1;;){if(n%2&&(s=s.times(t),Xe(s.d,o)&&(r=!0)),n=W(n/2),n===0){n=s.d.length-1,r&&s.d[n]===0&&++s.d[n];break}t=t.times(t),Xe(t.d,o)}return _=!0,s}function Ve(e){return e.d[e.d.length-1]&1}function ze(e,t,n){for(var i,r=new e(t[0]),s=0;++s<t.length;)if(i=new e(t[s]),i.s)r[n](i)&&(r=i);else{r=i;break}return r}function Ae(e,t){var n,i,r,s,o,u,a,c=0,f=0,l=0,h=e.constructor,p=h.rounding,w=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(_=!1,a=w):a=t,u=new h(.03125);e.e>-2;)e=e.times(u),l+=5;for(i=Math.log(Y(2,l))/Math.LN10*2+5|0,a+=i,n=s=o=new h(1),h.precision=a;;){if(s=S(s.times(e),a,1),n=n.times(++f),u=o.plus(P(s,n,a,1)),j(u.d).slice(0,a)===j(o.d).slice(0,a)){for(r=l;r--;)o=S(o.times(o),a,1);if(t==null)if(c<3&&we(o.d,a-i,p,c))h.precision=a+=10,n=s=u=new h(1),f=0,c++;else return S(o,h.precision=w,p,_=!0);else return h.precision=w,o}o=u}}function ce(e,t){var n,i,r,s,o,u,a,c,f,l,h,p=1,w=10,M=e,F=M.d,A=M.constructor,H=A.rounding,O=A.precision;if(M.s<0||!F||!F[0]||!M.e&&F[0]==1&&F.length==1)return new A(F&&!F[0]?-1/0:M.s!=1?NaN:F?0:M);if(t==null?(_=!1,f=O):f=t,A.precision=f+=w,n=j(F),i=n.charAt(0),Math.abs(s=M.e)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)M=M.times(e),n=j(M.d),i=n.charAt(0),p++;s=M.e,i>1?(M=new A("0."+n),s++):M=new A(i+"."+n.slice(1))}else return c=_e(A,f+2,O).times(s+""),M=ce(new A(i+"."+n.slice(1)),f-w).plus(c),A.precision=O,t==null?S(M,O,H,_=!0):M;for(l=M,a=o=M=P(M.minus(1),M.plus(1),f,1),h=S(M.times(M),f,1),r=3;;){if(o=S(o.times(h),f,1),c=a.plus(P(o,new A(r),f,1)),j(c.d).slice(0,f)===j(a.d).slice(0,f))if(a=a.times(2),s!==0&&(a=a.plus(_e(A,f+2,O).times(s+""))),a=P(a,new A(p),f,1),t==null)if(we(a.d,f-w,H,u))A.precision=f+=w,c=o=M=P(l.minus(1),l.plus(1),f,1),h=S(M.times(M),f,1),r=u=1;else return S(a,A.precision=O,H,_=!0);else return A.precision=O,a;a=c,r+=2}}function Ge(e){return String(e.s*e.s/0)}function Le(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;t.charCodeAt(i)===48;i++);for(r=t.length;t.charCodeAt(r-1)===48;--r);if(t=t.slice(i,r),t){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%k,n<0&&(i+=k),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=k;i<r;)e.d.push(+t.slice(i,i+=k));t=t.slice(i),i=k-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),_&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Ot(e,t){var n,i,r,s,o,u,a,c,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Ze.test(t))return Le(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(St.test(t))n=16,t=t.toLowerCase();else if(Nt.test(t))n=2;else if(Dt.test(t))n=8;else throw Error(oe+t);for(s=t.search(/p/i),s>0?(a=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),s=t.indexOf("."),o=s>=0,i=e.constructor,o&&(t=t.replace(".",""),u=t.length,s=u-s,r=We(i,new i(n),s,s*2)),c=Ee(t,n,K),f=c.length-1,s=f;c[s]===0;--s)c.pop();return s<0?new i(e.s*0):(e.e=ke(c,f),e.d=c,_=!1,o&&(e=P(e,r,u*4)),a&&(e=e.times(Math.abs(a)<54?Y(2,a):re.pow(2,a))),_=!0,e)}function Tt(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:pe(e,2,t,t);n=1.4*Math.sqrt(i),n=n>16?16:n|0,t=t.times(1/Oe(5,n)),t=pe(e,2,t,t);for(var r,s=new e(5),o=new e(16),u=new e(20);n--;)r=t.times(t),t=t.times(s.plus(r.times(o.times(r).minus(u))));return t}function pe(e,t,n,i,r){var s,o,u,a,c=e.precision,f=Math.ceil(c/k);for(_=!1,a=n.times(n),u=new e(i);;){if(o=P(u.times(a),new e(t++*t++),c,1),u=r?i.plus(o):i.minus(o),i=P(o.times(a),new e(t++*t++),c,1),o=u.plus(i),o.d[f]!==void 0){for(s=f;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=i,i=o,o=s}return _=!0,o.d.length=f+1,o}function Oe(e,t){for(var n=e;--t;)n*=e;return n}function xe(e,t){var n,i=t.s<0,r=Q(e,e.precision,1),s=r.times(.5);if(t=t.abs(),t.lte(s))return ie=i?4:1,t;if(n=t.divToInt(r),n.isZero())ie=i?3:2;else{if(t=t.minus(n.times(r)),t.lte(s))return ie=Ve(n)?i?2:3:i?4:1,t;ie=Ve(n)?i?1:4:i?3:2}return t.minus(r).abs()}function Fe(e,t,n,i){var r,s,o,u,a,c,f,l,h,p=e.constructor,w=n!==void 0;if(w?(z(n,1,se),i===void 0?i=p.rounding:z(i,0,8)):(n=p.precision,i=p.rounding),!e.isFinite())f=Ge(e);else{for(f=te(e),o=f.indexOf("."),w?(r=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):r=t,o>=0&&(f=f.replace(".",""),h=new p(1),h.e=f.length-o,h.d=Ee(te(h),10,r),h.e=h.d.length),l=Ee(f,10,r),s=a=l.length;l[--a]==0;)l.pop();if(!l[0])f=w?"0p+0":"0";else{if(o<0?s--:(e=new p(e),e.d=l,e.e=s,e=P(e,h,n,i,0,r),l=e.d,s=e.e,c=Ue),o=l[n],u=r/2,c=c||l[n+1]!==void 0,c=i<4?(o!==void 0||c)&&(i===0||i===(e.s<0?3:2)):o>u||o===u&&(i===4||c||i===6&&l[n-1]&1||i===(e.s<0?8:7)),l.length=n,c)for(;++l[--n]>r-1;)l[n]=0,n||(++s,l.unshift(1));for(a=l.length;!l[a-1];--a);for(o=0,f="";o<a;o++)f+=ye.charAt(l[o]);if(w){if(a>1)if(t==16||t==8){for(o=t==16?4:3,--a;a%o;a++)f+="0";for(l=Ee(f,r,t),a=l.length;!l[a-1];--a);for(o=1,f="1.";o<a;o++)f+=ye.charAt(l[o])}else f=f.charAt(0)+"."+f.slice(1);f=f+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)f="0"+f;f="0."+f}else if(++s>a)for(s-=a;s--;)f+="0";else s<a&&(f=f.slice(0,s)+"."+f.slice(s))}f=(t==16?"0x":t==2?"0b":t==8?"0o":"")+f}return e.s<0?"-"+f:f}function Xe(e,t){if(e.length>t)return e.length=t,!0}function yt(e){return new this(e).abs()}function Ct(e){return new this(e).acos()}function It(e){return new this(e).acosh()}function At(e,t){return new this(e).plus(t)}function Lt(e){return new this(e).asin()}function Ft(e){return new this(e).asinh()}function Pt(e){return new this(e).atan()}function Jt(e){return new this(e).atanh()}function Rt(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,s=i+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Q(this,s,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Q(this,i,r):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Q(this,s,1).times(.5),n.s=e.s):t.s<0?(this.precision=s,this.rounding=1,n=this.atan(P(e,t,s,1)),t=Q(this,s,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(P(e,t,s,1)),n}function qt(e){return new this(e).cbrt()}function Ut(e){return S(e=new this(e),e.e+1,2)}function Bt(e,t,n){return new this(e).clamp(t,n)}function Ht(e){if(!e||typeof e!="object")throw Error(De+"Object expected");var t,n,i,r=e.defaults===!0,s=["precision",1,se,"rounding",0,8,"toExpNeg",-me,0,"toExpPos",0,me,"maxE",0,me,"minE",-me,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(n=s[t],r&&(this[n]=Ce[n]),(i=e[n])!==void 0)if(W(i)===i&&i>=s[t+1]&&i<=s[t+2])this[n]=i;else throw Error(oe+n+": "+i);if(n="crypto",r&&(this[n]=Ce[n]),(i=e[n])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(He);else this[n]=!1;else throw Error(oe+n+": "+i);return this}function Yt(e){return new this(e).cos()}function Zt(e){return new this(e).cosh()}function Ke(e){var t,n,i;function r(s){var o,u,a,c=this;if(!(c instanceof r))return new r(s);if(c.constructor=r,Qe(s)){c.s=s.s,_?!s.d||s.e>r.maxE?(c.e=NaN,c.d=null):s.e<r.minE?(c.e=0,c.d=[0]):(c.e=s.e,c.d=s.d.slice()):(c.e=s.e,c.d=s.d?s.d.slice():s.d);return}if(a=typeof s,a==="number"){if(s===0){c.s=1/s<0?-1:1,c.e=0,c.d=[0];return}if(s<0?(s=-s,c.s=-1):c.s=1,s===~~s&&s<1e7){for(o=0,u=s;u>=10;u/=10)o++;_?o>r.maxE?(c.e=NaN,c.d=null):o<r.minE?(c.e=0,c.d=[0]):(c.e=o,c.d=[s]):(c.e=o,c.d=[s]);return}else if(s*0!==0){s||(c.s=NaN),c.e=NaN,c.d=null;return}return Le(c,s.toString())}else if(a!=="string")throw Error(oe+s);return(u=s.charCodeAt(0))===45?(s=s.slice(1),c.s=-1):(u===43&&(s=s.slice(1)),c.s=1),Ze.test(s)?Le(c,s):Ot(c,s)}if(r.prototype=d,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=Ht,r.clone=Ke,r.isDecimal=Qe,r.abs=yt,r.acos=Ct,r.acosh=It,r.add=At,r.asin=Lt,r.asinh=Ft,r.atan=Pt,r.atanh=Jt,r.atan2=Rt,r.cbrt=qt,r.ceil=Ut,r.clamp=Bt,r.cos=Yt,r.cosh=Zt,r.div=jt,r.exp=Wt,r.floor=Vt,r.hypot=zt,r.ln=Gt,r.log=xt,r.log10=Kt,r.log2=Xt,r.max=Qt,r.min=en,r.mod=tn,r.mul=nn,r.pow=rn,r.random=sn,r.round=on,r.sign=un,r.sin=cn,r.sinh=an,r.sqrt=fn,r.sub=ln,r.sum=hn,r.tan=dn,r.tanh=mn,r.trunc=pn,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(n=i[t++])||(e[n]=this[n]);return r.config(e),r}function jt(e,t){return new this(e).div(t)}function Wt(e){return new this(e).exp()}function Vt(e){return S(e=new this(e),e.e+1,3)}function zt(){var e,t,n=new this(0);for(_=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return _=!0,new this(1/0);n=t}return _=!0,n.sqrt()}function Qe(e){return e instanceof re||e&&e.toStringTag===Ye||!1}function Gt(e){return new this(e).ln()}function xt(e,t){return new this(e).log(t)}function Xt(e){return new this(e).log(2)}function Kt(e){return new this(e).log(10)}function Qt(){return ze(this,arguments,"lt")}function en(){return ze(this,arguments,"gt")}function tn(e,t){return new this(e).mod(t)}function nn(e,t){return new this(e).mul(t)}function rn(e,t){return new this(e).pow(t)}function sn(e){var t,n,i,r,s=0,o=new this(1),u=[];if(e===void 0?e=this.precision:z(e,1,se),i=Math.ceil(e/k),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));s<i;)r=t[s],r>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);s<i;)r=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((t[s+3]&127)<<24),r>=214e7?crypto.randomBytes(4).copy(t,s):(u.push(r%1e7),s+=4);s=i/4}else throw Error(He);else for(;s<i;)u[s++]=Math.random()*1e7|0;for(i=u[--s],e%=k,i&&e&&(r=Y(10,k-e),u[s]=(i/r|0)*r);u[s]===0;s--)u.pop();if(s<0)n=0,u=[0];else{for(n=-1;u[0]===0;n-=k)u.shift();for(i=1,r=u[0];r>=10;r/=10)i++;i<k&&(n-=k-i)}return o.e=n,o.d=u,o}function on(e){return S(e=new this(e),e.e+1,this.rounding)}function un(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function cn(e){return new this(e).sin()}function an(e){return new this(e).sinh()}function fn(e){return new this(e).sqrt()}function ln(e,t){return new this(e).sub(t)}function hn(){var e=0,t=arguments,n=new this(t[e]);for(_=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return _=!0,S(n,this.precision,this.rounding)}function dn(e){return new this(e).tan()}function mn(e){return new this(e).tanh()}function pn(e){return S(e=new this(e),e.e+1,1)}d[Symbol.for("nodejs.util.inspect.custom")]=d.toString,d[Symbol.toStringTag]="Decimal";var re=d.constructor=Ke(Ce);Ne=new re(Ne),Se=new re(Se);const gn=(e,t)=>{const n=new re(e),i=Object.entries(t).sort(([,r],[,s])=>s-r);for(const[r,s]of i){const o=new re(s);if(n.greaterThanOrEqualTo(o))return[n.dividedBy(o).toFixed(2),r]}return[n.toFixed(2),""]},wn=(e,t=2)=>{e=e.replace(/\s+/g,"");const n={"+":1,"-":1,"*":2,"/":2},i=u=>new re(u),r=u=>["+","-","*","/"].includes(u),s=u=>/[0-9.]/.test(u),o=u=>{const a=[],c=[];let f=0;for(;f<u.length;){const h=u[f];if(s(h)){let p="";for(;f<u.length&&s(u[f]);)p+=u[f],f++;a.push(i(p))}else if(h==="(")c.push(h),f++;else if(h===")"){for(;c.length>0&&c[c.length-1]!=="(";)a.push(c.pop());c.pop(),f++}else if(r(h)){for(;c.length>0&&n[c[c.length-1]]>=n[h];)a.push(c.pop());c.push(h),f++}else throw new Error(`无效字符: ${h}`)}for(;c.length>0;)a.push(c.pop());const l=[];for(let h of a)if(typeof h=="string"){const p=l.pop(),w=l.pop();switch(h){case"+":l.push(w.add(p));break;case"-":l.push(w.sub(p));break;case"*":l.push(w.mul(p));break;case"/":if(p.eq(0))throw new Error("除数不能为零");l.push(w.div(p));break}}else l.push(h);return l.pop()};try{const u=o(e);return Number(u.toFixed(t))}catch(u){throw new Error("表达式计算失败:"+u.message)}},vn=(e,t)=>{if(t==="rad")return e*(Math.PI/180);if(t==="deg")return e*(180/Math.PI);throw new Error("请使用正确类型")},$n=(e,t)=>{const n=t.x-e.x,i=t.y-e.y;let s=Math.atan2(i,n)*(180/Math.PI);return s=-s+90,s<0&&(s+=360),s},Mn=(e,t)=>{const n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)},bn=(e,t,n,i=2)=>{const s={"+":(o,u)=>o.add(u),"-":(o,u)=>o.sub(u),"*":(o,u)=>o.mul(u),"/":(o,u)=>{if(u.eq(0))throw new Error("除数不能为0");return o.div(u)}}[n](new re(e),new re(t));return Number(s.toFixed(i))},Nn=(e,t)=>t.reduce((n,i)=>{const{key:r,verify:s,msg:o,name:u}=i,a=e[r];return a===""||a===void 0||a===null?n.push({key:r,msg:"必填项",name:u}):(typeof s=="function"?!s(a):!s.test(a))&&n.push({key:r,msg:o,name:u}),n},[]),Sn=({promiseFn:e,maxRetries:t=3,retryDelay:n=2e3,params:i=void 0})=>new Promise((r,s)=>{let o=0;const u=()=>{e(i).then(a=>{r(a)}).catch(a=>{if(o++,o>=t){s(a);return}setTimeout(u,n)})};u()}),Dn=e=>Math.random()*100<e,En=(e,t,n=0)=>parseFloat((Math.random()*(t-e)+e).toFixed(n)),kn=(e=1)=>{const t=Math.floor(Math.random()*256),n=Math.floor(Math.random()*256),i=Math.floor(Math.random()*256);return`rgba(${t}, ${n}, ${i}, ${e})`},_n=(e,t,n)=>{const i=Array.from({length:t-e+1},(r,s)=>s+e);for(let r=i.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1));[i[r],i[s]]=[i[s],i[r]]}return i.slice(0,n)},On=(e,t)=>{const n=be(e).startOf(t),i=be().startOf(t);return n.isSame(i)?0:n.isBefore(i)?1:-1},Tn=e=>{const t=[{unit:"年",milliseconds:31536e6},{unit:"月",milliseconds:2592e6},{unit:"周",milliseconds:6048e5},{unit:"天",milliseconds:864e5},{unit:"小时",milliseconds:36e5},{unit:"分钟",milliseconds:6e4}],i=Date.now()-e;for(const{unit:r,milliseconds:s}of t)if(i>=s)return`${Math.floor(i/s)} ${r}前`;return"刚刚"},yn=(e={})=>{const{midnight:t="午夜好",morning:n="早上好",forenoon:i="上午好",noon:r="中午好",afternoon:s="下午好",evening:o="晚上好"}=e,u=new Date().getHours();return u<4?t:u<10?n:u<12?i:u<14?r:u<18?s:o};class Cn{constructor(t,n){de(this,"_onChange");de(this,"_isDown",!1);de(this,"_currentIndex",0);de(this,"_timerId");de(this,"_intervalId");de(this,"_numsLength",0);this._onChange=n,this._numsLength=t,window.addEventListener("pointerup",()=>{this._isDown&&this._up()})}down(t){this._isDown=!0,this._handleChange(t),this._timerId=setTimeout(()=>{this._isDown&&(this._intervalId=setInterval(()=>{this._handleChange(t)},100))},100)}updateIndex(t){this._currentIndex=t}_up(){this._isDown=!1,clearTimeout(this._timerId),clearInterval(this._intervalId)}_handleChange(t){t==="add"?this._currentIndex<this._numsLength-1&&(this._currentIndex++,this._onChange(this._currentIndex)):t==="sub"&&this._currentIndex>0&&(this._currentIndex--,this._onChange(this._currentIndex))}}const In=Object.freeze(Object.defineProperty({__proto__:null,Base:{libJsGetDataType:ee,libJsPromiseTimeout:ne},Browser:{libJsColorConsole:fe,libJsIsMobile:et,libJsIsPad:tt,libJsPathParams:nt,libJsSetTitleIcon:it,libJsTagTitleTip:rt,libJsObjToUrlParams:st},Data:{libJsChunkArray:ot,libJsDeepJSONParse:Me,libJsGroupArrayByKey:ut,libJsMatchEmail:ct,libJsShuffleArray:at,libJsStepArray:ft,libReverseArrayFromIndex:lt},File:{libJsDownloadImageLink:ht,libJsImageOptimizer:dt,libJsSaveJson:mt},Formatter:{libJsFormatterByte:$t,libJsMaskPhoneNumber:Mt,libJsNumComma:bt,libJsNumberUnit:gn,libJsSecondsFormatterChinese:vt},Math:{libJsCalculateExpression:wn,libJsConvertAngle:vn,libJsCoordsAngle:$n,libJsCoordsDistance:Mn,libJsDecimal:bn},Misc:{libJsRegFormValidate:Nn,libJsRetryRequest:Sn,libNumerStepper:Cn},Random:{libJsProbabilityResult:Dn,libJsRandom:En,libJsRandomColor:kn,libJsUniqueRandomNumbers:_n},Time:{libJsSameTimeCheck:On,libJsTimeAgo:Tn,libJsTimeGreeting:yn}},Symbol.toStringTag,{value:"Module"}));window.LibJs=In});
8
+ */var fe=9e15,ie=1e9,_e="0123456789abcdef",$e="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Me="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Oe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-fe,maxE:fe,crypto:!1},Je,te,_=!0,be="[DecimalError] ",re=be+"Invalid argument: ",Re=be+"Precision limit exceeded",qe=be+"crypto unavailable",Ue="[object Decimal]",W=Math.floor,Y=Math.pow,bt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Nt=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,St=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Be=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,K=1e7,k=7,Dt=9007199254740991,Et=$e.length-1,Te=Me.length-1,d={toStringTag:Ue};d.absoluteValue=d.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),S(e)},d.ceil=function(){return S(new this.constructor(this),this.e+1,2)},d.clampedTo=d.clamp=function(e,t){var n,i=this,s=i.constructor;if(e=new s(e),t=new s(t),!e.s||!t.s)return new s(NaN);if(e.gt(t))throw Error(re+t);return n=i.cmp(e),n<0?e:i.cmp(t)>0?t:new s(i)},d.comparedTo=d.cmp=function(e){var t,n,i,s,r=this,o=r.d,u=(e=new r.constructor(e)).d,a=r.s,c=e.s;if(!o||!u)return!a||!c?NaN:a!==c?a:o===u?0:!o^a<0?1:-1;if(!o[0]||!u[0])return o[0]?a:u[0]?-c:0;if(a!==c)return a;if(r.e!==e.e)return r.e>e.e^a<0?1:-1;for(i=o.length,s=u.length,t=0,n=i<s?i:s;t<n;++t)if(o[t]!==u[t])return o[t]>u[t]^a<0?1:-1;return i===s?0:i>s^a<0?1:-1},d.cosine=d.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+k,i.rounding=1,n=kt(i,Ve(i,n)),i.precision=e,i.rounding=t,S(te==2||te==3?n.neg():n,e,t,!0)):new i(1):new i(NaN)},d.cubeRoot=d.cbrt=function(){var e,t,n,i,s,r,o,u,a,c,f=this,l=f.constructor;if(!f.isFinite()||f.isZero())return new l(f);for(_=!1,r=f.s*Y(f.s*f,1/3),!r||Math.abs(r)==1/0?(n=j(f.d),e=f.e,(r=(e-n.length+1)%3)&&(n+=r==1||r==-2?"0":"00"),r=Y(n,1/3),e=W((e+1)/3)-(e%3==(e<0?-1:2)),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new l(n),i.s=f.s):i=new l(r.toString()),o=(e=l.precision)+3;;)if(u=i,a=u.times(u).times(u),c=a.plus(f),i=P(c.plus(f).times(u),c.plus(a),o+2,1),j(u.d).slice(0,o)===(n=j(i.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!s&&n=="4999"){if(!s&&(S(u,e+1,0),u.times(u).times(u).eq(f))){i=u;break}o+=4,s=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(S(i,e+1,1),t=!i.times(i).times(i).eq(f));break}return _=!0,S(i,e,l.rounding,t)},d.decimalPlaces=d.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-W(this.e/k))*k,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},d.dividedBy=d.div=function(e){return P(this,new this.constructor(e))},d.dividedToIntegerBy=d.divToInt=function(e){var t=this,n=t.constructor;return S(P(t,new n(e),0,1,1),n.precision,n.rounding)},d.equals=d.eq=function(e){return this.cmp(e)===0},d.floor=function(){return S(new this.constructor(this),this.e+1,3)},d.greaterThan=d.gt=function(e){return this.cmp(e)>0},d.greaterThanOrEqualTo=d.gte=function(e){var t=this.cmp(e);return t==1||t===0},d.hyperbolicCosine=d.cosh=function(){var e,t,n,i,s,r=this,o=r.constructor,u=new o(1);if(!r.isFinite())return new o(r.s?1/0:NaN);if(r.isZero())return u;n=o.precision,i=o.rounding,o.precision=n+Math.max(r.e,r.sd())+4,o.rounding=1,s=r.d.length,s<32?(e=Math.ceil(s/3),t=(1/Ee(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),r=le(o,1,r.times(t),new o(1),!0);for(var a,c=e,f=new o(8);c--;)a=r.times(r),r=u.minus(a.times(f.minus(a.times(f))));return S(r,o.precision=n,o.rounding=i,!0)},d.hyperbolicSine=d.sinh=function(){var e,t,n,i,s=this,r=s.constructor;if(!s.isFinite()||s.isZero())return new r(s);if(t=r.precision,n=r.rounding,r.precision=t+Math.max(s.e,s.sd())+4,r.rounding=1,i=s.d.length,i<3)s=le(r,2,s,s,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,s=s.times(1/Ee(5,e)),s=le(r,2,s,s,!0);for(var o,u=new r(5),a=new r(16),c=new r(20);e--;)o=s.times(s),s=s.times(u.plus(o.times(a.times(o).plus(c))))}return r.precision=t,r.rounding=n,S(s,t,n,!0)},d.hyperbolicTangent=d.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,P(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},d.inverseCosine=d.acos=function(){var e,t=this,n=t.constructor,i=t.abs().cmp(1),s=n.precision,r=n.rounding;return i!==-1?i===0?t.isNeg()?Q(n,s,r):new n(0):new n(NaN):t.isZero()?Q(n,s+4,r).times(.5):(n.precision=s+6,n.rounding=1,t=t.asin(),e=Q(n,s+4,r).times(.5),n.precision=s,n.rounding=r,e.minus(t))},d.inverseHyperbolicCosine=d.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,_=!1,n=n.times(n).minus(1).sqrt().plus(n),_=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},d.inverseHyperbolicSine=d.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,_=!1,n=n.times(n).plus(1).sqrt().plus(n),_=!0,i.precision=e,i.rounding=t,n.ln())},d.inverseHyperbolicTangent=d.atanh=function(){var e,t,n,i,s=this,r=s.constructor;return s.isFinite()?s.e>=0?new r(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(e=r.precision,t=r.rounding,i=s.sd(),Math.max(i,e)<2*-s.e-1?S(new r(s),e,t,!0):(r.precision=n=i-s.e,s=P(s.plus(1),new r(1).minus(s),n+e,1),r.precision=e+4,r.rounding=1,s=s.ln(),r.precision=e,r.rounding=t,s.times(.5))):new r(NaN)},d.inverseSine=d.asin=function(){var e,t,n,i,s=this,r=s.constructor;return s.isZero()?new r(s):(t=s.abs().cmp(1),n=r.precision,i=r.rounding,t!==-1?t===0?(e=Q(r,n+4,i).times(.5),e.s=s.s,e):new r(NaN):(r.precision=n+6,r.rounding=1,s=s.div(new r(1).minus(s.times(s)).sqrt().plus(1)).atan(),r.precision=n,r.rounding=i,s.times(2)))},d.inverseTangent=d.atan=function(){var e,t,n,i,s,r,o,u,a,c=this,f=c.constructor,l=f.precision,h=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&l+4<=Te)return o=Q(f,l+4,h).times(.25),o.s=c.s,o}else{if(!c.s)return new f(NaN);if(l+4<=Te)return o=Q(f,l+4,h).times(.5),o.s=c.s,o}for(f.precision=u=l+10,f.rounding=1,n=Math.min(28,u/k+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(u/k),i=1,a=c.times(c),o=new f(c),s=c;e!==-1;)if(s=s.times(a),r=o.minus(s.div(i+=2)),s=s.times(a),o=r.plus(s.div(i+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===r.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),_=!0,S(o,f.precision=l,f.rounding=h,!0)},d.isFinite=function(){return!!this.d},d.isInteger=d.isInt=function(){return!!this.d&&W(this.e/k)>this.d.length-2},d.isNaN=function(){return!this.s},d.isNegative=d.isNeg=function(){return this.s<0},d.isPositive=d.isPos=function(){return this.s>0},d.isZero=function(){return!!this.d&&this.d[0]===0},d.lessThan=d.lt=function(e){return this.cmp(e)<0},d.lessThanOrEqualTo=d.lte=function(e){return this.cmp(e)<1},d.logarithm=d.log=function(e){var t,n,i,s,r,o,u,a,c=this,f=c.constructor,l=f.precision,h=f.rounding,p=5;if(e==null)e=new f(10),t=!0;else{if(e=new f(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new f(n&&!n[0]?-1/0:c.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)r=!0;else{for(s=n[0];s%10===0;)s/=10;r=s!==1}if(_=!1,u=l+p,o=oe(c,u),i=t?De(f,u+10):oe(e,u),a=P(o,i,u,1),de(a.d,s=l,h))do if(u+=10,o=oe(c,u),i=t?De(f,u+10):oe(e,u),a=P(o,i,u,1),!r){+j(a.d).slice(s+1,s+15)+1==1e14&&(a=S(a,l+1,0));break}while(de(a.d,s+=10,h));return _=!0,S(a,l,h)},d.minus=d.sub=function(e){var t,n,i,s,r,o,u,a,c,f,l,h,p=this,w=p.constructor;if(e=new w(e),!p.d||!e.d)return!p.s||!e.s?e=new w(NaN):p.d?e.s=-e.s:e=new w(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(c=p.d,h=e.d,u=w.precision,a=w.rounding,!c[0]||!h[0]){if(h[0])e.s=-e.s;else if(c[0])e=new w(p);else return new w(a===3?-0:0);return _?S(e,u,a):e}if(n=W(e.e/k),f=W(p.e/k),c=c.slice(),r=f-n,r){for(l=r<0,l?(t=c,r=-r,o=h.length):(t=h,n=f,o=c.length),i=Math.max(Math.ceil(u/k),o)+2,r>i&&(r=i,t.length=1),t.reverse(),i=r;i--;)t.push(0);t.reverse()}else{for(i=c.length,o=h.length,l=i<o,l&&(o=i),i=0;i<o;i++)if(c[i]!=h[i]){l=c[i]<h[i];break}r=0}for(l&&(t=c,c=h,h=t,e.s=-e.s),o=c.length,i=h.length-o;i>0;--i)c[o++]=0;for(i=h.length;i>r;){if(c[--i]<h[i]){for(s=i;s&&c[--s]===0;)c[s]=K-1;--c[s],c[i]+=K}c[i]-=h[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=Se(c,n),_?S(e,u,a):e):new w(a===3?-0:0)},d.modulo=d.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?S(new i(n),i.precision,i.rounding):(_=!1,i.modulo==9?(t=P(n,e.abs(),0,3,1),t.s*=e.s):t=P(n,e,0,i.modulo,1),t=t.times(e),_=!0,n.minus(t))},d.naturalExponential=d.exp=function(){return ye(this)},d.naturalLogarithm=d.ln=function(){return oe(this)},d.negated=d.neg=function(){var e=new this.constructor(this);return e.s=-e.s,S(e)},d.plus=d.add=function(e){var t,n,i,s,r,o,u,a,c,f,l=this,h=l.constructor;if(e=new h(e),!l.d||!e.d)return!l.s||!e.s?e=new h(NaN):l.d||(e=new h(e.d||l.s===e.s?l:NaN)),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(c=l.d,f=e.d,u=h.precision,a=h.rounding,!c[0]||!f[0])return f[0]||(e=new h(l)),_?S(e,u,a):e;if(r=W(l.e/k),i=W(e.e/k),c=c.slice(),s=r-i,s){for(s<0?(n=c,s=-s,o=f.length):(n=f,i=r,o=c.length),r=Math.ceil(u/k),o=r>o?r+1:o+1,s>o&&(s=o,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for(o=c.length,s=f.length,o-s<0&&(s=o,n=f,f=c,c=n),t=0;s;)t=(c[--s]=c[s]+f[s]+t)/K|0,c[s]%=K;for(t&&(c.unshift(t),++i),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=Se(c,i),_?S(e,u,a):e},d.precision=d.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(re+e);return n.d?(t=He(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},d.round=function(){var e=this,t=e.constructor;return S(new t(e),e.e+1,t.rounding)},d.sine=d.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+k,i.rounding=1,n=Ot(i,Ve(i,n)),i.precision=e,i.rounding=t,S(te>2?n.neg():n,e,t,!0)):new i(NaN)},d.squareRoot=d.sqrt=function(){var e,t,n,i,s,r,o=this,u=o.d,a=o.e,c=o.s,f=o.constructor;if(c!==1||!u||!u[0])return new f(!c||c<0&&(!u||u[0])?NaN:u?o:1/0);for(_=!1,c=Math.sqrt(+o),c==0||c==1/0?(t=j(u),(t.length+a)%2==0&&(t+="0"),c=Math.sqrt(t),a=W((a+1)/2)-(a<0||a%2),c==1/0?t="5e"+a:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+a),i=new f(t)):i=new f(c.toString()),n=(a=f.precision)+3;;)if(r=i,i=r.plus(P(o,r,n+2,1)).times(.5),j(r.d).slice(0,n)===(t=j(i.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!s&&t=="4999"){if(!s&&(S(r,a+1,0),r.times(r).eq(o))){i=r;break}n+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(S(i,a+1,1),e=!i.times(i).eq(o));break}return _=!0,S(i,a,f.rounding,e)},d.tangent=d.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,n=n.sin(),n.s=1,n=P(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,S(te==2||te==4?n.neg():n,e,t,!0)):new i(NaN)},d.times=d.mul=function(e){var t,n,i,s,r,o,u,a,c,f=this,l=f.constructor,h=f.d,p=(e=new l(e)).d;if(e.s*=f.s,!h||!h[0]||!p||!p[0])return new l(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:!h||!p?e.s/0:e.s*0);for(n=W(f.e/k)+W(e.e/k),a=h.length,c=p.length,a<c&&(r=h,h=p,p=r,o=a,a=c,c=o),r=[],o=a+c,i=o;i--;)r.push(0);for(i=c;--i>=0;){for(t=0,s=a+i;s>i;)u=r[s]+p[i]*h[s-i-1]+t,r[s--]=u%K|0,t=u/K|0;r[s]=(r[s]+t)%K|0}for(;!r[--o];)r.pop();return t?++n:r.shift(),e.d=r,e.e=Se(r,n),_?S(e,l.precision,l.rounding):e},d.toBinary=function(e,t){return Ie(this,2,e,t)},d.toDecimalPlaces=d.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),e===void 0?n:(z(e,0,ie),t===void 0?t=i.rounding:z(t,0,8),S(n,e+n.e+1,t))},d.toExponential=function(e,t){var n,i=this,s=i.constructor;return e===void 0?n=ee(i,!0):(z(e,0,ie),t===void 0?t=s.rounding:z(t,0,8),i=S(new s(i),e+1,t),n=ee(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},d.toFixed=function(e,t){var n,i,s=this,r=s.constructor;return e===void 0?n=ee(s):(z(e,0,ie),t===void 0?t=r.rounding:z(t,0,8),i=S(new r(s),e+s.e+1,t),n=ee(i,!1,e+i.e+1)),s.isNeg()&&!s.isZero()?"-"+n:n},d.toFraction=function(e){var t,n,i,s,r,o,u,a,c,f,l,h,p=this,w=p.d,M=p.constructor;if(!w)return new M(p);if(c=n=new M(1),i=a=new M(0),t=new M(i),r=t.e=He(w)-p.e-1,o=r%k,t.d[0]=Y(10,o<0?k+o:o),e==null)e=r>0?t:c;else{if(u=new M(e),!u.isInt()||u.lt(c))throw Error(re+u);e=u.gt(t)?r>0?t:c:u}for(_=!1,u=new M(j(w)),f=M.precision,M.precision=r=w.length*k*2;l=P(u,t,0,1,1),s=n.plus(l.times(i)),s.cmp(e)!=1;)n=i,i=s,s=c,c=a.plus(l.times(s)),a=s,s=t,t=u.minus(l.times(s)),u=s;return s=P(e.minus(n),i,0,1,1),a=a.plus(s.times(c)),n=n.plus(s.times(i)),a.s=c.s=p.s,h=P(c,i,r,1).minus(p).abs().cmp(P(a,n,r,1).minus(p).abs())<1?[c,i]:[a,n],M.precision=f,_=!0,h},d.toHexadecimal=d.toHex=function(e,t){return Ie(this,16,e,t)},d.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),e==null){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:z(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(_=!1,n=P(n,e,0,t,1).times(e),_=!0,S(n)):(e.s=n.s,n=e),n},d.toNumber=function(){return+this},d.toOctal=function(e,t){return Ie(this,8,e,t)},d.toPower=d.pow=function(e){var t,n,i,s,r,o,u=this,a=u.constructor,c=+(e=new a(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new a(Y(+u,c));if(u=new a(u),u.eq(1))return u;if(i=a.precision,r=a.rounding,e.eq(1))return S(u,i,r);if(t=W(e.e/k),t>=e.d.length-1&&(n=c<0?-c:c)<=Dt)return s=Ye(a,u,n,i),e.s<0?new a(1).div(s):S(s,i,r);if(o=u.s,o<0){if(t<e.d.length-1)return new a(NaN);if(e.d[t]&1||(o=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=o,u}return n=Y(+u,c),t=n==0||!isFinite(n)?W(c*(Math.log("0."+j(u.d))/Math.LN10+u.e+1)):new a(n+"").e,t>a.maxE+1||t<a.minE-1?new a(t>0?o/0:0):(_=!1,a.rounding=u.s=1,n=Math.min(12,(t+"").length),s=ye(e.times(oe(u,i+n)),i),s.d&&(s=S(s,i+5,1),de(s.d,i,r)&&(t=i+10,s=S(ye(e.times(oe(u,t+n)),t),t+5,1),+j(s.d).slice(i+1,i+15)+1==1e14&&(s=S(s,i+1,0)))),s.s=o,_=!0,a.rounding=r,S(s,i,r))},d.toPrecision=function(e,t){var n,i=this,s=i.constructor;return e===void 0?n=ee(i,i.e<=s.toExpNeg||i.e>=s.toExpPos):(z(e,1,ie),t===void 0?t=s.rounding:z(t,0,8),i=S(new s(i),e,t),n=ee(i,e<=i.e||i.e<=s.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},d.toSignificantDigits=d.toSD=function(e,t){var n=this,i=n.constructor;return e===void 0?(e=i.precision,t=i.rounding):(z(e,1,ie),t===void 0?t=i.rounding:z(t,0,8)),S(new i(n),e,t)},d.toString=function(){var e=this,t=e.constructor,n=ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},d.truncated=d.trunc=function(){return S(new this.constructor(this),this.e+1,1)},d.valueOf=d.toJSON=function(){var e=this,t=e.constructor,n=ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function j(e){var t,n,i,s=e.length-1,r="",o=e[0];if(s>0){for(r+=o,t=1;t<s;t++)i=e[t]+"",n=k-i.length,n&&(r+=se(n)),r+=i;o=e[t],i=o+"",n=k-i.length,n&&(r+=se(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return r+o}function z(e,t,n){if(e!==~~e||e<t||e>n)throw Error(re+e)}function de(e,t,n,i){var s,r,o,u;for(r=e[0];r>=10;r/=10)--t;return--t<0?(t+=k,s=0):(s=Math.ceil((t+1)/k),t%=k),r=Y(10,k-t),u=e[s]%r|0,i==null?t<3?(t==0?u=u/100|0:t==1&&(u=u/10|0),o=n<4&&u==99999||n>3&&u==49999||u==5e4||u==0):o=(n<4&&u+1==r||n>3&&u+1==r/2)&&(e[s+1]/r/100|0)==Y(10,t-2)-1||(u==r/2||u==0)&&(e[s+1]/r/100|0)==0:t<4?(t==0?u=u/1e3|0:t==1?u=u/100|0:t==2&&(u=u/10|0),o=(i||n<4)&&u==9999||!i&&n>3&&u==4999):o=((i||n<4)&&u+1==r||!i&&n>3&&u+1==r/2)&&(e[s+1]/r/1e3|0)==Y(10,t-3)-1,o}function Ne(e,t,n){for(var i,s=[0],r,o=0,u=e.length;o<u;){for(r=s.length;r--;)s[r]*=t;for(s[0]+=_e.indexOf(e.charAt(o++)),i=0;i<s.length;i++)s[i]>n-1&&(s[i+1]===void 0&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}function kt(e,t){var n,i,s;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),s=(1/Ee(4,n)).toString()):(n=16,s="2.3283064365386962890625e-10"),e.precision+=n,t=le(e,1,t.times(s),new e(1));for(var r=n;r--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var P=function(){function e(i,s,r){var o,u=0,a=i.length;for(i=i.slice();a--;)o=i[a]*s+u,i[a]=o%r|0,u=o/r|0;return u&&i.unshift(u),i}function t(i,s,r,o){var u,a;if(r!=o)a=r>o?1:-1;else for(u=a=0;u<r;u++)if(i[u]!=s[u]){a=i[u]>s[u]?1:-1;break}return a}function n(i,s,r,o){for(var u=0;r--;)i[r]-=u,u=i[r]<s[r]?1:0,i[r]=u*o+i[r]-s[r];for(;!i[0]&&i.length>1;)i.shift()}return function(i,s,r,o,u,a){var c,f,l,h,p,w,M,F,A,H,O,q,x,T,E,v,L,y,b,R,U=i.constructor,N=i.s==s.s?1:-1,g=i.d,m=s.d;if(!g||!g[0]||!m||!m[0])return new U(!i.s||!s.s||(g?m&&g[0]==m[0]:!m)?NaN:g&&g[0]==0||!m?N*0:N/0);for(a?(p=1,f=i.e-s.e):(a=K,p=k,f=W(i.e/p)-W(s.e/p)),b=m.length,L=g.length,A=new U(N),H=A.d=[],l=0;m[l]==(g[l]||0);l++);if(m[l]>(g[l]||0)&&f--,r==null?(T=r=U.precision,o=U.rounding):u?T=r+(i.e-s.e)+1:T=r,T<0)H.push(1),w=!0;else{if(T=T/p+2|0,l=0,b==1){for(h=0,m=m[0],T++;(l<L||h)&&T--;l++)E=h*a+(g[l]||0),H[l]=E/m|0,h=E%m|0;w=h||l<L}else{for(h=a/(m[0]+1)|0,h>1&&(m=e(m,h,a),g=e(g,h,a),b=m.length,L=g.length),v=b,O=g.slice(0,b),q=O.length;q<b;)O[q++]=0;R=m.slice(),R.unshift(0),y=m[0],m[1]>=a/2&&++y;do h=0,c=t(m,O,b,q),c<0?(x=O[0],b!=q&&(x=x*a+(O[1]||0)),h=x/y|0,h>1?(h>=a&&(h=a-1),M=e(m,h,a),F=M.length,q=O.length,c=t(M,O,F,q),c==1&&(h--,n(M,b<F?R:m,F,a))):(h==0&&(c=h=1),M=m.slice()),F=M.length,F<q&&M.unshift(0),n(O,M,q,a),c==-1&&(q=O.length,c=t(m,O,b,q),c<1&&(h++,n(O,b<q?R:m,q,a))),q=O.length):c===0&&(h++,O=[0]),H[l++]=h,c&&O[0]?O[q++]=g[v]||0:(O=[g[v]],q=1);while((v++<L||O[0]!==void 0)&&T--);w=O[0]!==void 0}H[0]||H.shift()}if(p==1)A.e=f,Je=w;else{for(l=1,h=H[0];h>=10;h/=10)l++;A.e=l+f*p-1,S(A,u?r+A.e+1:r,o,w)}return A}}();function S(e,t,n,i){var s,r,o,u,a,c,f,l,h,p=e.constructor;e:if(t!=null){if(l=e.d,!l)return e;for(s=1,u=l[0];u>=10;u/=10)s++;if(r=t-s,r<0)r+=k,o=t,f=l[h=0],a=f/Y(10,s-o-1)%10|0;else if(h=Math.ceil((r+1)/k),u=l.length,h>=u)if(i){for(;u++<=h;)l.push(0);f=a=0,s=1,r%=k,o=r-k+1}else break e;else{for(f=u=l[h],s=1;u>=10;u/=10)s++;r%=k,o=r-k+s,a=o<0?0:f/Y(10,s-o-1)%10|0}if(i=i||t<0||l[h+1]!==void 0||(o<0?f:f%Y(10,s-o-1)),c=n<4?(a||i)&&(n==0||n==(e.s<0?3:2)):a>5||a==5&&(n==4||i||n==6&&(r>0?o>0?f/Y(10,s-o):0:l[h-1])%10&1||n==(e.s<0?8:7)),t<1||!l[0])return l.length=0,c?(t-=e.e+1,l[0]=Y(10,(k-t%k)%k),e.e=-t||0):l[0]=e.e=0,e;if(r==0?(l.length=h,u=1,h--):(l.length=h+1,u=Y(10,k-r),l[h]=o>0?(f/Y(10,s-o)%Y(10,o)|0)*u:0),c)for(;;)if(h==0){for(r=1,o=l[0];o>=10;o/=10)r++;for(o=l[0]+=u,u=1;o>=10;o/=10)u++;r!=u&&(e.e++,l[0]==K&&(l[0]=1));break}else{if(l[h]+=u,l[h]!=K)break;l[h--]=0,u=1}for(r=l.length;l[--r]===0;)l.pop()}return _&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function ee(e,t,n){if(!e.isFinite())return We(e);var i,s=e.e,r=j(e.d),o=r.length;return t?(n&&(i=n-o)>0?r=r.charAt(0)+"."+r.slice(1)+se(i):o>1&&(r=r.charAt(0)+"."+r.slice(1)),r=r+(e.e<0?"e":"e+")+e.e):s<0?(r="0."+se(-s-1)+r,n&&(i=n-o)>0&&(r+=se(i))):s>=o?(r+=se(s+1-o),n&&(i=n-s-1)>0&&(r=r+"."+se(i))):((i=s+1)<o&&(r=r.slice(0,i)+"."+r.slice(i)),n&&(i=n-o)>0&&(s+1===o&&(r+="."),r+=se(i))),r}function Se(e,t){var n=e[0];for(t*=k;n>=10;n/=10)t++;return t}function De(e,t,n){if(t>Et)throw _=!0,n&&(e.precision=n),Error(Re);return S(new e($e),t,1,!0)}function Q(e,t,n){if(t>Te)throw Error(Re);return S(new e(Me),t,n,!0)}function He(e){var t=e.length-1,n=t*k+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function se(e){for(var t="";e--;)t+="0";return t}function Ye(e,t,n,i){var s,r=new e(1),o=Math.ceil(i/k+4);for(_=!1;;){if(n%2&&(r=r.times(t),ze(r.d,o)&&(s=!0)),n=W(n/2),n===0){n=r.d.length-1,s&&r.d[n]===0&&++r.d[n];break}t=t.times(t),ze(t.d,o)}return _=!0,r}function Ze(e){return e.d[e.d.length-1]&1}function je(e,t,n){for(var i,s=new e(t[0]),r=0;++r<t.length;)if(i=new e(t[r]),i.s)s[n](i)&&(s=i);else{s=i;break}return s}function ye(e,t){var n,i,s,r,o,u,a,c=0,f=0,l=0,h=e.constructor,p=h.rounding,w=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(_=!1,a=w):a=t,u=new h(.03125);e.e>-2;)e=e.times(u),l+=5;for(i=Math.log(Y(2,l))/Math.LN10*2+5|0,a+=i,n=r=o=new h(1),h.precision=a;;){if(r=S(r.times(e),a,1),n=n.times(++f),u=o.plus(P(r,n,a,1)),j(u.d).slice(0,a)===j(o.d).slice(0,a)){for(s=l;s--;)o=S(o.times(o),a,1);if(t==null)if(c<3&&de(o.d,a-i,p,c))h.precision=a+=10,n=r=u=new h(1),f=0,c++;else return S(o,h.precision=w,p,_=!0);else return h.precision=w,o}o=u}}function oe(e,t){var n,i,s,r,o,u,a,c,f,l,h,p=1,w=10,M=e,F=M.d,A=M.constructor,H=A.rounding,O=A.precision;if(M.s<0||!F||!F[0]||!M.e&&F[0]==1&&F.length==1)return new A(F&&!F[0]?-1/0:M.s!=1?NaN:F?0:M);if(t==null?(_=!1,f=O):f=t,A.precision=f+=w,n=j(F),i=n.charAt(0),Math.abs(r=M.e)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)M=M.times(e),n=j(M.d),i=n.charAt(0),p++;r=M.e,i>1?(M=new A("0."+n),r++):M=new A(i+"."+n.slice(1))}else return c=De(A,f+2,O).times(r+""),M=oe(new A(i+"."+n.slice(1)),f-w).plus(c),A.precision=O,t==null?S(M,O,H,_=!0):M;for(l=M,a=o=M=P(M.minus(1),M.plus(1),f,1),h=S(M.times(M),f,1),s=3;;){if(o=S(o.times(h),f,1),c=a.plus(P(o,new A(s),f,1)),j(c.d).slice(0,f)===j(a.d).slice(0,f))if(a=a.times(2),r!==0&&(a=a.plus(De(A,f+2,O).times(r+""))),a=P(a,new A(p),f,1),t==null)if(de(a.d,f-w,H,u))A.precision=f+=w,c=o=M=P(l.minus(1),l.plus(1),f,1),h=S(M.times(M),f,1),s=u=1;else return S(a,A.precision=O,H,_=!0);else return A.precision=O,a;a=c,s+=2}}function We(e){return String(e.s*e.s/0)}function Ce(e,t){var n,i,s;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;t.charCodeAt(i)===48;i++);for(s=t.length;t.charCodeAt(s-1)===48;--s);if(t=t.slice(i,s),t){if(s-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%k,n<0&&(i+=k),i<s){for(i&&e.d.push(+t.slice(0,i)),s-=k;i<s;)e.d.push(+t.slice(i,i+=k));t=t.slice(i),i=k-t.length}else i-=s;for(;i--;)t+="0";e.d.push(+t),_&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function _t(e,t){var n,i,s,r,o,u,a,c,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Be.test(t))return Ce(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Nt.test(t))n=16,t=t.toLowerCase();else if(bt.test(t))n=2;else if(St.test(t))n=8;else throw Error(re+t);for(r=t.search(/p/i),r>0?(a=+t.slice(r+1),t=t.substring(2,r)):t=t.slice(2),r=t.indexOf("."),o=r>=0,i=e.constructor,o&&(t=t.replace(".",""),u=t.length,r=u-r,s=Ye(i,new i(n),r,r*2)),c=Ne(t,n,K),f=c.length-1,r=f;c[r]===0;--r)c.pop();return r<0?new i(e.s*0):(e.e=Se(c,f),e.d=c,_=!1,o&&(e=P(e,s,u*4)),a&&(e=e.times(Math.abs(a)<54?Y(2,a):ne.pow(2,a))),_=!0,e)}function Ot(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:le(e,2,t,t);n=1.4*Math.sqrt(i),n=n>16?16:n|0,t=t.times(1/Ee(5,n)),t=le(e,2,t,t);for(var s,r=new e(5),o=new e(16),u=new e(20);n--;)s=t.times(t),t=t.times(r.plus(s.times(o.times(s).minus(u))));return t}function le(e,t,n,i,s){var r,o,u,a,c=e.precision,f=Math.ceil(c/k);for(_=!1,a=n.times(n),u=new e(i);;){if(o=P(u.times(a),new e(t++*t++),c,1),u=s?i.plus(o):i.minus(o),i=P(o.times(a),new e(t++*t++),c,1),o=u.plus(i),o.d[f]!==void 0){for(r=f;o.d[r]===u.d[r]&&r--;);if(r==-1)break}r=u,u=i,i=o,o=r}return _=!0,o.d.length=f+1,o}function Ee(e,t){for(var n=e;--t;)n*=e;return n}function Ve(e,t){var n,i=t.s<0,s=Q(e,e.precision,1),r=s.times(.5);if(t=t.abs(),t.lte(r))return te=i?4:1,t;if(n=t.divToInt(s),n.isZero())te=i?3:2;else{if(t=t.minus(n.times(s)),t.lte(r))return te=Ze(n)?i?2:3:i?4:1,t;te=Ze(n)?i?1:4:i?3:2}return t.minus(s).abs()}function Ie(e,t,n,i){var s,r,o,u,a,c,f,l,h,p=e.constructor,w=n!==void 0;if(w?(z(n,1,ie),i===void 0?i=p.rounding:z(i,0,8)):(n=p.precision,i=p.rounding),!e.isFinite())f=We(e);else{for(f=ee(e),o=f.indexOf("."),w?(s=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):s=t,o>=0&&(f=f.replace(".",""),h=new p(1),h.e=f.length-o,h.d=Ne(ee(h),10,s),h.e=h.d.length),l=Ne(f,10,s),r=a=l.length;l[--a]==0;)l.pop();if(!l[0])f=w?"0p+0":"0";else{if(o<0?r--:(e=new p(e),e.d=l,e.e=r,e=P(e,h,n,i,0,s),l=e.d,r=e.e,c=Je),o=l[n],u=s/2,c=c||l[n+1]!==void 0,c=i<4?(o!==void 0||c)&&(i===0||i===(e.s<0?3:2)):o>u||o===u&&(i===4||c||i===6&&l[n-1]&1||i===(e.s<0?8:7)),l.length=n,c)for(;++l[--n]>s-1;)l[n]=0,n||(++r,l.unshift(1));for(a=l.length;!l[a-1];--a);for(o=0,f="";o<a;o++)f+=_e.charAt(l[o]);if(w){if(a>1)if(t==16||t==8){for(o=t==16?4:3,--a;a%o;a++)f+="0";for(l=Ne(f,s,t),a=l.length;!l[a-1];--a);for(o=1,f="1.";o<a;o++)f+=_e.charAt(l[o])}else f=f.charAt(0)+"."+f.slice(1);f=f+(r<0?"p":"p+")+r}else if(r<0){for(;++r;)f="0"+f;f="0."+f}else if(++r>a)for(r-=a;r--;)f+="0";else r<a&&(f=f.slice(0,r)+"."+f.slice(r))}f=(t==16?"0x":t==2?"0b":t==8?"0o":"")+f}return e.s<0?"-"+f:f}function ze(e,t){if(e.length>t)return e.length=t,!0}function Tt(e){return new this(e).abs()}function yt(e){return new this(e).acos()}function Ct(e){return new this(e).acosh()}function It(e,t){return new this(e).plus(t)}function At(e){return new this(e).asin()}function Lt(e){return new this(e).asinh()}function Ft(e){return new this(e).atan()}function Pt(e){return new this(e).atanh()}function Jt(e,t){e=new this(e),t=new this(t);var n,i=this.precision,s=this.rounding,r=i+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Q(this,r,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Q(this,i,s):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Q(this,r,1).times(.5),n.s=e.s):t.s<0?(this.precision=r,this.rounding=1,n=this.atan(P(e,t,r,1)),t=Q(this,r,1),this.precision=i,this.rounding=s,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(P(e,t,r,1)),n}function Rt(e){return new this(e).cbrt()}function qt(e){return S(e=new this(e),e.e+1,2)}function Ut(e,t,n){return new this(e).clamp(t,n)}function Bt(e){if(!e||typeof e!="object")throw Error(be+"Object expected");var t,n,i,s=e.defaults===!0,r=["precision",1,ie,"rounding",0,8,"toExpNeg",-fe,0,"toExpPos",0,fe,"maxE",0,fe,"minE",-fe,0,"modulo",0,9];for(t=0;t<r.length;t+=3)if(n=r[t],s&&(this[n]=Oe[n]),(i=e[n])!==void 0)if(W(i)===i&&i>=r[t+1]&&i<=r[t+2])this[n]=i;else throw Error(re+n+": "+i);if(n="crypto",s&&(this[n]=Oe[n]),(i=e[n])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(qe);else this[n]=!1;else throw Error(re+n+": "+i);return this}function Ht(e){return new this(e).cos()}function Yt(e){return new this(e).cosh()}function Ge(e){var t,n,i;function s(r){var o,u,a,c=this;if(!(c instanceof s))return new s(r);if(c.constructor=s,xe(r)){c.s=r.s,_?!r.d||r.e>s.maxE?(c.e=NaN,c.d=null):r.e<s.minE?(c.e=0,c.d=[0]):(c.e=r.e,c.d=r.d.slice()):(c.e=r.e,c.d=r.d?r.d.slice():r.d);return}if(a=typeof r,a==="number"){if(r===0){c.s=1/r<0?-1:1,c.e=0,c.d=[0];return}if(r<0?(r=-r,c.s=-1):c.s=1,r===~~r&&r<1e7){for(o=0,u=r;u>=10;u/=10)o++;_?o>s.maxE?(c.e=NaN,c.d=null):o<s.minE?(c.e=0,c.d=[0]):(c.e=o,c.d=[r]):(c.e=o,c.d=[r]);return}else if(r*0!==0){r||(c.s=NaN),c.e=NaN,c.d=null;return}return Ce(c,r.toString())}else if(a!=="string")throw Error(re+r);return(u=r.charCodeAt(0))===45?(r=r.slice(1),c.s=-1):(u===43&&(r=r.slice(1)),c.s=1),Be.test(r)?Ce(c,r):_t(c,r)}if(s.prototype=d,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=Bt,s.clone=Ge,s.isDecimal=xe,s.abs=Tt,s.acos=yt,s.acosh=Ct,s.add=It,s.asin=At,s.asinh=Lt,s.atan=Ft,s.atanh=Pt,s.atan2=Jt,s.cbrt=Rt,s.ceil=qt,s.clamp=Ut,s.cos=Ht,s.cosh=Yt,s.div=Zt,s.exp=jt,s.floor=Wt,s.hypot=Vt,s.ln=zt,s.log=Gt,s.log10=Xt,s.log2=xt,s.max=Kt,s.min=Qt,s.mod=en,s.mul=tn,s.pow=nn,s.random=rn,s.round=sn,s.sign=on,s.sin=un,s.sinh=cn,s.sqrt=an,s.sub=fn,s.sum=ln,s.tan=hn,s.tanh=dn,s.trunc=mn,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(n=i[t++])||(e[n]=this[n]);return s.config(e),s}function Zt(e,t){return new this(e).div(t)}function jt(e){return new this(e).exp()}function Wt(e){return S(e=new this(e),e.e+1,3)}function Vt(){var e,t,n=new this(0);for(_=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return _=!0,new this(1/0);n=t}return _=!0,n.sqrt()}function xe(e){return e instanceof ne||e&&e.toStringTag===Ue||!1}function zt(e){return new this(e).ln()}function Gt(e,t){return new this(e).log(t)}function xt(e){return new this(e).log(2)}function Xt(e){return new this(e).log(10)}function Kt(){return je(this,arguments,"lt")}function Qt(){return je(this,arguments,"gt")}function en(e,t){return new this(e).mod(t)}function tn(e,t){return new this(e).mul(t)}function nn(e,t){return new this(e).pow(t)}function rn(e){var t,n,i,s,r=0,o=new this(1),u=[];if(e===void 0?e=this.precision:z(e,1,ie),i=Math.ceil(e/k),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));r<i;)s=t[r],s>=429e7?t[r]=crypto.getRandomValues(new Uint32Array(1))[0]:u[r++]=s%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);r<i;)s=t[r]+(t[r+1]<<8)+(t[r+2]<<16)+((t[r+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(t,r):(u.push(s%1e7),r+=4);r=i/4}else throw Error(qe);else for(;r<i;)u[r++]=Math.random()*1e7|0;for(i=u[--r],e%=k,i&&e&&(s=Y(10,k-e),u[r]=(i/s|0)*s);u[r]===0;r--)u.pop();if(r<0)n=0,u=[0];else{for(n=-1;u[0]===0;n-=k)u.shift();for(i=1,s=u[0];s>=10;s/=10)i++;i<k&&(n-=k-i)}return o.e=n,o.d=u,o}function sn(e){return S(e=new this(e),e.e+1,this.rounding)}function on(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function un(e){return new this(e).sin()}function cn(e){return new this(e).sinh()}function an(e){return new this(e).sqrt()}function fn(e,t){return new this(e).sub(t)}function ln(){var e=0,t=arguments,n=new this(t[e]);for(_=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return _=!0,S(n,this.precision,this.rounding)}function hn(e){return new this(e).tan()}function dn(e){return new this(e).tanh()}function mn(e){return S(e=new this(e),e.e+1,1)}d[Symbol.for("nodejs.util.inspect.custom")]=d.toString,d[Symbol.toStringTag]="Decimal";var ne=d.constructor=Ge(Oe);$e=new ne($e),Me=new ne(Me);const pn=(e,t,n=2)=>{const i=new ne(e),s=Object.entries(t).sort(([,r],[,o])=>o-r);for(const[r,o]of s){const u=new ne(o);if(i.greaterThanOrEqualTo(u)){const a=i.dividedBy(u).toFixed(n);return[a,r,a+r]}}return[i.toFixed(n),"",i.toFixed(n)]},gn=(e,t=2)=>{e=e.replace(/\s+/g,"");const n={"+":1,"-":1,"*":2,"/":2},i=u=>new ne(u),s=u=>["+","-","*","/"].includes(u),r=u=>/[0-9.]/.test(u),o=u=>{const a=[],c=[];let f=0;for(;f<u.length;){const h=u[f];if(r(h)){let p="";for(;f<u.length&&r(u[f]);)p+=u[f],f++;a.push(i(p))}else if(h==="(")c.push(h),f++;else if(h===")"){for(;c.length>0&&c[c.length-1]!=="(";)a.push(c.pop());c.pop(),f++}else if(s(h)){for(;c.length>0&&n[c[c.length-1]]>=n[h];)a.push(c.pop());c.push(h),f++}else throw new Error(`无效字符: ${h}`)}for(;c.length>0;)a.push(c.pop());const l=[];for(let h of a)if(typeof h=="string"){const p=l.pop(),w=l.pop();switch(h){case"+":l.push(w.add(p));break;case"-":l.push(w.sub(p));break;case"*":l.push(w.mul(p));break;case"/":if(p.eq(0))throw new Error("除数不能为零");l.push(w.div(p));break}}else l.push(h);return l.pop()};try{const u=o(e);return Number(u.toFixed(t))}catch(u){throw new Error("表达式计算失败:"+u.message)}},wn=(e,t)=>{if(t==="rad")return e*(Math.PI/180);if(t==="deg")return e*(180/Math.PI);throw new Error("请使用正确类型")},vn=(e,t)=>{const n=t.x-e.x,i=t.y-e.y;let r=Math.atan2(i,n)*(180/Math.PI);return r=-r+90,r<0&&(r+=360),r},$n=(e,t)=>{const n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)},Mn=(e,t,n,i=2)=>{const r={"+":(o,u)=>o.add(u),"-":(o,u)=>o.sub(u),"*":(o,u)=>o.mul(u),"/":(o,u)=>{if(u.eq(0))throw new Error("除数不能为0");return o.div(u)}}[n](new ne(e),new ne(t));return Number(r.toFixed(i))},bn=(e,t)=>t.reduce((n,i)=>{const{key:s,verify:r,msg:o,name:u}=i,a=e[s];return a===""||a===void 0||a===null?n.push({key:s,msg:"必填项",name:u}):(typeof r=="function"?!r(a):!r.test(a))&&n.push({key:s,msg:o,name:u}),n},[]),Nn=({promiseFn:e,maxRetries:t=3,retryDelay:n=2e3,params:i=void 0})=>new Promise((s,r)=>{let o=0;const u=()=>{e(i).then(a=>{s(a)}).catch(a=>{if(o++,o>=t){r(a);return}setTimeout(u,n)})};u()}),Sn=e=>Math.random()*100<e,Dn=(e,t,n=0)=>parseFloat((Math.random()*(t-e)+e).toFixed(n)),En=(e=1)=>{const t=Math.floor(Math.random()*256),n=Math.floor(Math.random()*256),i=Math.floor(Math.random()*256);return`rgba(${t}, ${n}, ${i}, ${e})`},kn=(e,t,n)=>{const i=Array.from({length:t-e+1},(s,r)=>r+e);for(let s=i.length-1;s>0;s--){const r=Math.floor(Math.random()*(s+1));[i[s],i[r]]=[i[r],i[s]]}return i.slice(0,n)},_n=(e,t)=>{const n=ve(e).startOf(t),i=ve().startOf(t);return n.isSame(i)?0:n.isBefore(i)?1:-1},On=e=>{const t=[{unit:"年",milliseconds:31536e6},{unit:"月",milliseconds:2592e6},{unit:"周",milliseconds:6048e5},{unit:"天",milliseconds:864e5},{unit:"小时",milliseconds:36e5},{unit:"分钟",milliseconds:6e4}],i=Date.now()-e;for(const{unit:s,milliseconds:r}of t)if(i>=r)return`${Math.floor(i/r)} ${s}前`;return"刚刚"},Tn=(e={})=>{const{midnight:t="午夜好",morning:n="早上好",forenoon:i="上午好",noon:s="中午好",afternoon:r="下午好",evening:o="晚上好"}=e,u=new Date().getHours();return u<4?t:u<10?n:u<12?i:u<14?s:u<18?r:o};class yn{constructor(t,n){this._isDown=!1,this._currentIndex=0,this._numsLength=0,this._onChange=n,this._numsLength=t,window.addEventListener("pointerup",()=>{this._isDown&&this._up()})}down(t){this._isDown=!0,this._handleChange(t),this._timerId=setTimeout(()=>{this._isDown&&(this._intervalId=setInterval(()=>{this._handleChange(t)},100))},100)}updateIndex(t){this._currentIndex=t}_up(){this._isDown=!1,clearTimeout(this._timerId),clearInterval(this._intervalId)}_handleChange(t){t==="add"?this._currentIndex<this._numsLength-1&&(this._currentIndex++,this._onChange(this._currentIndex)):t==="sub"&&this._currentIndex>0&&(this._currentIndex--,this._onChange(this._currentIndex))}}const Cn=Object.freeze(Object.defineProperty({__proto__:null,Base:{libJsGetDataType:ge,libJsPromiseTimeout:Xe},Browser:{libJsColorConsole:Ke,libJsIsMobile:Qe,libJsIsPad:et,libJsPathParams:tt,libJsSetTitleIcon:nt,libJsTagTitleTip:it,libJsObjToUrlParams:rt},Data:{libJsChunkArray:st,libJsDeepJSONParse:we,libJsGroupArrayByKey:ot,libJsMatchEmail:ut,libJsShuffleArray:ct,libJsStepArray:at,libReverseArrayFromIndex:ft},File:{libJsDownloadImageLink:lt,libJsImageOptimizer:ht,libJsSaveJson:dt},Formatter:{libJsFormatterByte:vt,libJsMaskPhoneNumber:$t,libJsNumComma:Mt,libJsNumberUnit:pn,libJsSecondsFormatterChinese:wt},Math:{libJsCalculateExpression:gn,libJsConvertAngle:wn,libJsCoordsAngle:vn,libJsCoordsDistance:$n,libJsDecimal:Mn},Misc:{libJsRegFormValidate:bn,libJsRetryRequest:Nn,libNumerStepper:yn},Random:{libJsProbabilityResult:Sn,libJsRandom:Dn,libJsRandomColor:En,libJsUniqueRandomNumbers:kn},Time:{libJsSameTimeCheck:_n,libJsTimeAgo:On,libJsTimeGreeting:Tn}},Symbol.toStringTag,{value:"Module"}));window.LibJs=Cn});