lyb-js 1.3.1 → 1.4.1

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.
@@ -0,0 +1,7 @@
1
+ /** @description 线性插值
2
+ * @param start 当 value = 0 时,返回 start
3
+ * @param end 当 value = 1 时,返回 end
4
+ * @param value 插值比例,取值范围 0~1
5
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsLerp-线性插值
6
+ */
7
+ export declare const LibJsLerp: (start: number, end: number, value: number) => number;
@@ -0,0 +1,10 @@
1
+ /** @description 线性插值
2
+ * @param start 当 value = 0 时,返回 start
3
+ * @param end 当 value = 1 时,返回 end
4
+ * @param value 插值比例,取值范围 0~1
5
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsLerp-线性插值
6
+ */
7
+ export const LibJsLerp = (start, end, value) => {
8
+ const t = Math.min(Math.max(value, 0), 1);
9
+ return start * (1 - t) + end * t;
10
+ };
@@ -0,0 +1,7 @@
1
+ /** @description 值介于起点与终点之间时返回一个介于0与1之间的数
2
+ * @param start 起点
3
+ * @param end 终点
4
+ * @param value 动态值
5
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNormalizeInRange-范围归一化
6
+ */
7
+ export declare const LibJsNormalizeInRange: (start: number, end: number, value: number) => number;
@@ -0,0 +1,9 @@
1
+ /** @description 值介于起点与终点之间时返回一个介于0与1之间的数
2
+ * @param start 起点
3
+ * @param end 终点
4
+ * @param value 动态值
5
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNormalizeInRange-范围归一化
6
+ */
7
+ export const LibJsNormalizeInRange = (start, end, value) => {
8
+ return Math.max(0, Math.min((start - value) / (start - end), 1));
9
+ };
@@ -0,0 +1,25 @@
1
+ type Callback<T> = (newValue: T[keyof T], oldValue: T[keyof T]) => void;
2
+ export declare class LibJsObserver<Store> {
3
+ /** 递增索引 */
4
+ private _index;
5
+ private _store;
6
+ private _lastData;
7
+ private _listeners;
8
+ constructor(store: Store);
9
+ /** @description 监听
10
+ * @param key 要监听的键
11
+ * @param callback key值变化时执行的回调函数
12
+ * @param immediately 监听时是否立即执行回调函数
13
+ * @returns 返回一个函数用于注销监听器
14
+ */
15
+ on(key: keyof Store, callback: Callback<Store>, immediately?: boolean): () => void;
16
+ /** @description 获取数据 */
17
+ getData(key: keyof Store): Store[keyof Store];
18
+ /** @description 手动更新数据 */
19
+ setData(newData: Partial<Store>): void;
20
+ /** @description 通知监听器更新 */
21
+ private _notifyListeners;
22
+ /** @description 判断数据变化并通知监听器 */
23
+ private _update;
24
+ }
25
+ export {};
@@ -0,0 +1,100 @@
1
+ export class LibJsObserver {
2
+ constructor(store) {
3
+ /** 递增索引 */
4
+ this._index = 0;
5
+ // 监听器映射,用于存储不同键的回调函数
6
+ this._listeners = new Map();
7
+ this._store = store;
8
+ this._lastData = Object.assign({}, store);
9
+ }
10
+ /** @description 监听
11
+ * @param key 要监听的键
12
+ * @param callback key值变化时执行的回调函数
13
+ * @param immediately 监听时是否立即执行回调函数
14
+ * @returns 返回一个函数用于注销监听器
15
+ */
16
+ on(key, callback, immediately = true) {
17
+ this._index += 1;
18
+ const index = this._index;
19
+ // 如果该键没有对应的监听器集合,则初始化一个新的集合
20
+ if (!this._listeners.has(key)) {
21
+ this._listeners.set(key, new Map());
22
+ }
23
+ // 将回调函数添加到对应键的监听器集合中
24
+ this._listeners.get(key).set(index, callback);
25
+ immediately && callback(this._store[key], this._lastData[key]);
26
+ return () => {
27
+ // 从特定键的监听器集合中移除指定标识符的回调函数
28
+ const listenerMap = this._listeners.get(key);
29
+ if (listenerMap) {
30
+ listenerMap.delete(index);
31
+ }
32
+ else {
33
+ console.warn(`监听 Key "${key.toString()}" 重复注销事件`);
34
+ }
35
+ };
36
+ }
37
+ /** @description 获取数据 */
38
+ getData(key) {
39
+ return this._store[key];
40
+ }
41
+ /** @description 手动更新数据 */
42
+ setData(newData) {
43
+ this._store = Object.assign(Object.assign({}, this._store), newData);
44
+ this._update();
45
+ }
46
+ /** @description 通知监听器更新 */
47
+ _notifyListeners(key, newValue, oldValue) {
48
+ // 获取特定键的所有监听器
49
+ const keyListeners = this._listeners.get(key);
50
+ if (keyListeners) {
51
+ // 遍历并执行每个监听器的回调函数
52
+ keyListeners.forEach((callback) => callback(newValue, oldValue));
53
+ }
54
+ }
55
+ /** @description 判断数据变化并通知监听器 */
56
+ _update() {
57
+ // 遍历当前数据对象的每个键,检查是否有变化
58
+ for (const key in this._store) {
59
+ const typedKey = key;
60
+ const newValue = this._store[typedKey];
61
+ const oldValue = this._lastData[typedKey];
62
+ //如果旧值与新值不相等,则通知监听器
63
+ if (newValue !== oldValue) {
64
+ this._notifyListeners(typedKey, newValue, oldValue);
65
+ this._lastData[typedKey] = this._store[typedKey];
66
+ }
67
+ }
68
+ }
69
+ }
70
+ class LibJsStore extends LibJsObserver {
71
+ constructor() {
72
+ super({
73
+ name: "张三",
74
+ age: 20,
75
+ });
76
+ }
77
+ }
78
+ const store = new LibJsStore();
79
+ const offA = store.on("age", (newValue) => {
80
+ console.log(`A收到年龄更新:`, newValue);
81
+ });
82
+ store.on("age", (newValue) => {
83
+ console.log(`B收到年龄更新:`, newValue);
84
+ });
85
+ // 模拟更新数据
86
+ setTimeout(() => {
87
+ console.log("尝试更新年龄值为:25");
88
+ store.setData({ age: 25 });
89
+ setTimeout(() => {
90
+ console.warn("注销A监听器");
91
+ offA();
92
+ setTimeout(() => {
93
+ console.warn("尝试更新年龄值为:26");
94
+ store.setData({ age: 26 });
95
+ setTimeout(() => {
96
+ console.log("尝试获取年龄值:", store.getData("age"));
97
+ }, 1000);
98
+ }, 1000);
99
+ }, 1000);
100
+ }, 1000);
package/README.md CHANGED
@@ -133,6 +133,10 @@ console.log(t); //"string"
133
133
 
134
134
  \- [LibJsDecimal-高精度计算](#LibJsDecimal-高精度计算)
135
135
 
136
+ \- [LibJsLerp-线性插值](#LibJsLerp-线性插值)
137
+
138
+ \- [LibJsNormalizeInRange-范围归一化](#LibJsNormalizeInRange-范围归一化)
139
+
136
140
  ### Misc-杂项
137
141
 
138
142
  \- [LibJsRegFormValidate-表单验证](#LibJsRegFormValidate-表单验证)
@@ -491,6 +495,24 @@ const result3 = libJsDecimal(10, 3, "/", 2);
491
495
  console.log(result3); //3.33
492
496
  ```
493
497
 
498
+ ### LibJsLerp-线性插值
499
+
500
+ > 线性插值
501
+
502
+ ```ts
503
+ console.log(LibJsLerp(0, 100, 0.25)); //25
504
+ console.log(LibJsLerp(100, 0, 0.75)); //25
505
+ ```
506
+
507
+ ### LibJsNormalizeInRange-范围归一化
508
+
509
+ > 值介于起点与终点之间时返回一个介于0与1之间的数
510
+
511
+ ```ts
512
+ console.log(LibJsNormalizeInRange(0, 100, 75)); //0.75
513
+ console.log(LibJsNormalizeInRange(100, 0, 75)); //0.25
514
+ ```
515
+
494
516
  ## Misc-杂项
495
517
 
496
518
  ### LibJsRegFormValidate-表单验证
package/libJs.d.ts CHANGED
@@ -251,6 +251,20 @@ export declare const Misc: {
251
251
  emit: <K extends keyof T>(event: K, ...args: T[K] extends any[] ? T[K] : [T[K]]) => void;
252
252
  off: <K extends keyof T>(event: K, listener?: T[K] extends any[] ? (...args: T[K]) => void : (arg: T[K]) => void) => void;
253
253
  };
254
+ /** @description 线性插值
255
+ * @param start 当 value = 0 时,返回 start
256
+ * @param end 当 value = 1 时,返回 end
257
+ * @param value 插值比例,取值范围 0~1
258
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsLerp-线性插值
259
+ */
260
+ LibJsLerp: (start: number, end: number, value: number) => number;
261
+ /** @description 值介于起点与终点之间时返回一个介于0与1之间的数
262
+ * @param start 起点
263
+ * @param end 终点
264
+ * @param value 动态值
265
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNormalizeInRange-范围归一化
266
+ */
267
+ LibJsNormalizeInRange: (start: number, end: number, value: number) => number;
254
268
  };
255
269
  /** @description 随机相关方法 */
256
270
  export declare const Random: {
package/libJs.js CHANGED
@@ -37,7 +37,9 @@ import { libJsNumberUnit } from "./Formatter/LibJsNumberUnit";
37
37
  import { libJsNumComma } from "./Formatter/LibJsNumComma";
38
38
  import { libJsSecondsFormatterChinese } from "./Formatter/LibJsSecondsFormatterChinese";
39
39
  import { libJsCalculateExpression } from "./Math/LibJsCalculateExpression";
40
- import { LibJsEmitter } from './Misc/LibJsEmitter';
40
+ import { LibJsEmitter } from "./Misc/LibJsEmitter";
41
+ import { LibJsLerp } from "./Math/LibJsLerp";
42
+ import { LibJsNormalizeInRange } from './Math/LibJsNormalizeInRange';
41
43
  /** @description 基础方法 */
42
44
  export const Base = {
43
45
  /**
@@ -260,6 +262,20 @@ export const Misc = {
260
262
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsEmitter-事件管理器
261
263
  */
262
264
  LibJsEmitter,
265
+ /** @description 线性插值
266
+ * @param start 当 value = 0 时,返回 start
267
+ * @param end 当 value = 1 时,返回 end
268
+ * @param value 插值比例,取值范围 0~1
269
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsLerp-线性插值
270
+ */
271
+ LibJsLerp,
272
+ /** @description 值介于起点与终点之间时返回一个介于0与1之间的数
273
+ * @param start 起点
274
+ * @param end 终点
275
+ * @param value 动态值
276
+ * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNormalizeInRange-范围归一化
277
+ */
278
+ LibJsNormalizeInRange,
263
279
  };
264
280
  /** @description 随机相关方法 */
265
281
  export const Random = {
package/lyb.js CHANGED
@@ -1,8 +1,8 @@
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(),Ke=(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)})},Qe=(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},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},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]),I=F.length,H=new Uint8Array(I);for(let O=0;O<I;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 I=t.toDataURL(a,s),H=`${i.split(".")[0]}.${r}`,O=c(I,H);e.success(f(O),O,I),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)},pt=(e,t)=>{if(t==="rad")return e*(Math.PI/180);if(t==="deg")return e*(180/Math.PI);throw new Error("请使用正确类型")},gt=(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},wt=(e,t)=>{const n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)};/*!
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},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},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],J=window.atob(w[1]),I=J.length,H=new Uint8Array(I);for(let O=0;O<I;O++)H[O]=J.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"),J=u/w.width;J<1?(t.width=w.width*J,t.height=w.height*J,M.drawImage(w,0,0,w.width*J,w.height*J)):(t.width=w.width,t.height=w.height,M.drawImage(w,0,0,w.width,w.height));const I=t.toDataURL(a,s),H=`${i.split(".")[0]}.${r}`,O=c(I,H);e.success(f(O),O,I),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)},pt=(e,t)=>{if(t==="rad")return e*(Math.PI/180);if(t==="deg")return e*(180/Math.PI);throw new Error("请使用正确类型")},gt=(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},wt=(e,t)=>{const n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)};/*!
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 fe=9e15,ie=1e9,_e="0123456789abcdef",ve="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",$e="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Oe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-fe,maxE:fe,crypto:!1},Ae,te,_=!0,Me="[DecimalError] ",re=Me+"Invalid argument: ",Fe=Me+"Precision limit exceeded",Pe=Me+"crypto unavailable",Je="[object Decimal]",W=Math.floor,Y=Math.pow,vt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,$t=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Mt=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Re=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,K=1e7,k=7,bt=9007199254740991,Nt=ve.length-1,Te=$e.length-1,d={toStringTag:Je};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(re+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=St(i,Ze(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,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/De(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),s=le(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=le(s,2,r,r,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,r=r.times(1/De(5,e)),r=le(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<=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),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=oe(c,u),i=t?Se(f,u+10):oe(e,u),a=P(o,i,u,1),de(a.d,r=l,h))do if(u+=10,o=oe(c,u),i=t?Se(f,u+10):oe(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(de(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=Ne(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,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=Ne(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=qe(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=Et(i,Ze(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,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(te==2||te==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=Ne(s,n),_?S(e,l.precision,l.rounding):e},d.toBinary=function(e,t){return Le(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,r=i.constructor;return e===void 0?n=ee(i,!0):(z(e,0,ie),t===void 0?t=r.rounding:z(t,0,8),i=S(new r(i),e+1,t),n=ee(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=ee(r):(z(e,0,ie),t===void 0?t=s.rounding:z(t,0,8),i=S(new s(r),e+r.e+1,t),n=ee(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=qe(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(re+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 Le(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 Le(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)<=bt)return r=Ue(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=ye(e.times(oe(u,i+n)),i),r.d&&(r=S(r,i+5,1),de(r.d,i,s)&&(t=i+10,r=S(ye(e.times(oe(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=ee(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(z(e,1,ie),t===void 0?t=r.rounding:z(t,0,8),i=S(new r(i),e,t),n=ee(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,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,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+=se(n)),s+=i;o=e[t],i=o+"",n=k-i.length,n&&(s+=se(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(re+e)}function de(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 be(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]+=_e.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 St(e,t){var n,i,r;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),r=(1/De(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=le(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,I,H,O,q,X,T,E,v,A,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,A=g.length,I=new U(N),H=I.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<A||h)&&T--;l++)E=h*a+(g[l]||0),H[l]=E/m|0,h=E%m|0;w=h||l<A}else{for(h=a/(m[0]+1)|0,h>1&&(m=e(m,h,a),g=e(g,h,a),b=m.length,A=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++<A||O[0]!==void 0)&&T--);w=O[0]!==void 0}H[0]||H.shift()}if(p==1)I.e=f,Ae=w;else{for(l=1,h=H[0];h>=10;h/=10)l++;I.e=l+f*p-1,S(I,u?s+I.e+1:s,o,w)}return I}}();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 ee(e,t,n){if(!e.isFinite())return Ye(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)+se(i):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+se(-r-1)+s,n&&(i=n-o)>0&&(s+=se(i))):r>=o?(s+=se(r+1-o),n&&(i=n-r-1)>0&&(s=s+"."+se(i))):((i=r+1)<o&&(s=s.slice(0,i)+"."+s.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(s+="."),s+=se(i))),s}function Ne(e,t){var n=e[0];for(t*=k;n>=10;n/=10)t++;return t}function Se(e,t,n){if(t>Nt)throw _=!0,n&&(e.precision=n),Error(Fe);return S(new e(ve),t,1,!0)}function Q(e,t,n){if(t>Te)throw Error(Fe);return S(new e($e),t,n,!0)}function qe(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 Ue(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),je(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),je(t.d,o)}return _=!0,s}function Be(e){return e.d[e.d.length-1]&1}function He(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 ye(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&&de(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 oe(e,t){var n,i,r,s,o,u,a,c,f,l,h,p=1,w=10,M=e,F=M.d,I=M.constructor,H=I.rounding,O=I.precision;if(M.s<0||!F||!F[0]||!M.e&&F[0]==1&&F.length==1)return new I(F&&!F[0]?-1/0:M.s!=1?NaN:F?0:M);if(t==null?(_=!1,f=O):f=t,I.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 I("0."+n),s++):M=new I(i+"."+n.slice(1))}else return c=Se(I,f+2,O).times(s+""),M=oe(new I(i+"."+n.slice(1)),f-w).plus(c),I.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 I(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(Se(I,f+2,O).times(s+""))),a=P(a,new I(p),f,1),t==null)if(de(a.d,f-w,H,u))I.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,I.precision=O,H,_=!0);else return I.precision=O,a;a=c,r+=2}}function Ye(e){return String(e.s*e.s/0)}function Ce(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 Dt(e,t){var n,i,r,s,o,u,a,c,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Re.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($t.test(t))n=16,t=t.toLowerCase();else if(vt.test(t))n=2;else if(Mt.test(t))n=8;else throw Error(re+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=Ue(i,new i(n),s,s*2)),c=be(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=Ne(c,f),e.d=c,_=!1,o&&(e=P(e,r,u*4)),a&&(e=e.times(Math.abs(a)<54?Y(2,a):ne.pow(2,a))),_=!0,e)}function Et(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/De(5,n)),t=le(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 le(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 De(e,t){for(var n=e;--t;)n*=e;return n}function Ze(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 te=i?4:1,t;if(n=t.divToInt(r),n.isZero())te=i?3:2;else{if(t=t.minus(n.times(r)),t.lte(s))return te=Be(n)?i?2:3:i?4:1,t;te=Be(n)?i?1:4:i?3:2}return t.minus(r).abs()}function Le(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,ie),i===void 0?i=p.rounding:z(i,0,8)):(n=p.precision,i=p.rounding),!e.isFinite())f=Ye(e);else{for(f=ee(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=be(ee(h),10,r),h.e=h.d.length),l=be(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=Ae),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+=_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=be(f,r,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+(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 je(e,t){if(e.length>t)return e.length=t,!0}function kt(e){return new this(e).abs()}function _t(e){return new this(e).acos()}function Ot(e){return new this(e).acosh()}function Tt(e,t){return new this(e).plus(t)}function yt(e){return new this(e).asin()}function Ct(e){return new this(e).asinh()}function Lt(e){return new this(e).atan()}function It(e){return new this(e).atanh()}function At(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 Ft(e){return new this(e).cbrt()}function Pt(e){return S(e=new this(e),e.e+1,2)}function Jt(e,t,n){return new this(e).clamp(t,n)}function Rt(e){if(!e||typeof e!="object")throw Error(Me+"Object expected");var t,n,i,r=e.defaults===!0,s=["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<s.length;t+=3)if(n=s[t],r&&(this[n]=Oe[n]),(i=e[n])!==void 0)if(W(i)===i&&i>=s[t+1]&&i<=s[t+2])this[n]=i;else throw Error(re+n+": "+i);if(n="crypto",r&&(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(Pe);else this[n]=!1;else throw Error(re+n+": "+i);return this}function qt(e){return new this(e).cos()}function Ut(e){return new this(e).cosh()}function We(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,Ve(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 Ce(c,s.toString())}else if(a!=="string")throw Error(re+s);return(u=s.charCodeAt(0))===45?(s=s.slice(1),c.s=-1):(u===43&&(s=s.slice(1)),c.s=1),Re.test(s)?Ce(c,s):Dt(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=Rt,r.clone=We,r.isDecimal=Ve,r.abs=kt,r.acos=_t,r.acosh=Ot,r.add=Tt,r.asin=yt,r.asinh=Ct,r.atan=Lt,r.atanh=It,r.atan2=At,r.cbrt=Ft,r.ceil=Pt,r.clamp=Jt,r.cos=qt,r.cosh=Ut,r.div=Bt,r.exp=Ht,r.floor=Yt,r.hypot=Zt,r.ln=jt,r.log=Wt,r.log10=zt,r.log2=Vt,r.max=Gt,r.min=Xt,r.mod=xt,r.mul=Kt,r.pow=Qt,r.random=en,r.round=tn,r.sign=nn,r.sin=rn,r.sinh=sn,r.sqrt=on,r.sub=un,r.sum=cn,r.tan=an,r.tanh=fn,r.trunc=ln,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 Bt(e,t){return new this(e).div(t)}function Ht(e){return new this(e).exp()}function Yt(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 Ve(e){return e instanceof ne||e&&e.toStringTag===Je||!1}function jt(e){return new this(e).ln()}function Wt(e,t){return new this(e).log(t)}function Vt(e){return new this(e).log(2)}function zt(e){return new this(e).log(10)}function Gt(){return He(this,arguments,"lt")}function Xt(){return He(this,arguments,"gt")}function xt(e,t){return new this(e).mod(t)}function Kt(e,t){return new this(e).mul(t)}function Qt(e,t){return new this(e).pow(t)}function en(e){var t,n,i,r,s=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));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(Pe);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 tn(e){return S(e=new this(e),e.e+1,this.rounding)}function nn(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function rn(e){return new this(e).sin()}function sn(e){return new this(e).sinh()}function on(e){return new this(e).sqrt()}function un(e,t){return new this(e).sub(t)}function cn(){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 an(e){return new this(e).tan()}function fn(e){return new this(e).tanh()}function ln(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=We(Oe);ve=new ne(ve),$e=new ne($e);const hn=(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 ne(e),new ne(t));return Number(s.toFixed(i))},dn=(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},[]),mn=({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()}),pn=e=>Math.random()*100<e,gn=(e,t,n=0)=>parseFloat((Math.random()*(t-e)+e).toFixed(n)),wn=(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})`},vn=(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)};var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(ze,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+)?$/,I=/\[([^\]]+)]|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,L=g.clone().add(D+(C?-1:1),l);return+(-(D+(m-$)/(C?$-L:L-$))||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])},A=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 L=g.split("-");if(!$&&L.length>1)return N(L[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=A,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=A(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 L=$.match(F);if(L){var J=L[2]-1||0,B=(L[7]||"0").substring(0,3);return C?new Date(Date.UTC(L[1],J,L[3]||1,L[4]||0,L[5]||0,L[6]||0,B)):new Date(L[1],J,L[3]||1,L[4]||0,L[5]||0,L[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,L=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(L){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),L="set"+(this.$u?"UTC":""),J=($={},$[c]=L+"Date",$[w]=L+"Date",$[l]=L+"Month",$[p]=L+"FullYear",$[a]=L+"Hours",$[u]=L+"Minutes",$[o]=L+"Seconds",$[s]=L+"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 L=b.p(D),J=function(V){var x=y(C);return b.w(x.date(x.date()+Math.round(V*m)),C)};if(L===l)return this.set(l,this.$M+m);if(L===p)return this.set(p,this.$y+m);if(L===c)return J(1);if(L===f)return J(7);var B=($={},$[u]=i,$[a]=r,$[o]=n,$)[L]||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",L=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(I,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 L}return null}(G)||L.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(m,D,$){var C,L=this,J=b.p(D),B=y(m),Z=(B.utcOffset()-this.utcOffset())*i,V=this-B,x=function(){return b.m(L,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=A(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=A,y.isDayjs=v,y.unix=function(N){return y(1e3*N)},y.en=T[X],y.Ls=T,y.p={},y})})(Xe);var $n=Xe.exports;const Ee=Ge($n),Mn=(e,t)=>{const n=Ee(e).startOf(t),i=Ee().startOf(t);return n.isSame(i)?0:n.isBefore(i)?1:-1},bn=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"刚刚"},Nn=(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 Sn{constructor(t,n){this._currentIndex=0,this._numsLength=0,this._isDown=!1,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 Dn=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]}`]},En=e=>e.toString().replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2"),Ie=(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,")},kn=(e,t,n=0)=>{const i=new ne(e),r=Object.entries(t).sort(([,o],[,u])=>u-o);for(const[o,u]of r){const a=new ne(u);if(i.greaterThanOrEqualTo(a)){const c=i.dividedBy(a);return Ie(Number(c),n)+o}}return Ie(Number(i),n)};var xe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(ze,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},I=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,A,y){var b=this;if(this.$d={},this.$l=y,v===void 0&&(this.$ms=0,this.parseFromMilliseconds()),A)return w(v*h[M(A)],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(A,y){return A+(v.$d[y]||0)*h[y]},0)},E.parseFromMilliseconds=function(){var v=this.$ms;this.$d.years=I(v/c),v%=c,this.$d.months=I(v/f),v%=f,this.$d.days=I(v/u),v%=u,this.$d.hours=I(v/o),v%=o,this.$d.minutes=I(v/s),v%=s,this.$d.seconds=I(v/r),v%=r,this.$d.milliseconds=v},E.toISOString=function(){var v=O(this.$d.years,"Y"),A=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||A.negative||b.negative||R.negative||U.negative||g.negative,D=R.format||U.format||g.format?"T":"",$=(m?"-":"")+"P"+v.format+A.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 A=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 A.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 A=this.$ms,y=M(v);return y==="milliseconds"?A%=1e3:A=y==="weeks"?I(A/h[y]):this.$d[y],A||0},E.add=function(v,A,y){var b;return b=A?v*h[M(A)]:p(v)?v.$ms:w(v,this).$ms,w(this.$ms+b*(y?-1:1),this)},E.subtract=function(v,A){return this.add(v,A,!0)},E.locale=function(v){var A=this.clone();return A.$l=v,A},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 A=E.prototype.add,y=E.prototype.subtract;E.prototype.add=function(b,R){return p(b)?X(this,b,1):A.bind(this)(b,R)},E.prototype.subtract=function(b,R){return p(b)?X(this,b,-1):y.bind(this)(b,R)}}})})(xe);var _n=xe.exports;const On=Ge(_n);Ee.extend(On);const Tn=Object.freeze(Object.defineProperty({__proto__:null,Base:{libJsGetDataType:ge,libJsPromiseTimeout:Ke},Browser:{libJsColorConsole:Qe,libJsIsMobile:et,libJsIsPad:tt,libJsPathParams:nt,libJsSetTitleIcon:it,libJsTagTitleTip:rt,libJsObjToUrlParams:st},Data:{libJsChunkArray:ot,libJsDeepJSONParse:we,libJsGroupArrayByKey:ut,libJsMatchEmail:ct,libJsShuffleArray:at,libJsStepArray:ft,libReverseArrayFromIndex:lt},File:{libJsDownloadImageLink:ht,libJsImageOptimizer:dt,libJsSaveJson:mt},Formatter:{libJsFormatterByte:Dn,libJsMaskPhoneNumber:En,libJsNumComma:Ie,libJsNumberUnit:kn,libJsSecondsFormatterChinese:e=>{const t=Ee.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("")}},Math:{libJsCalculateExpression:(e,t=2)=>{e=e.replace(/\s+/g,"");const n={"+":1,"-":1,"*":2,"/":2},i=u=>new ne(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)}},libJsConvertAngle:pt,libJsCoordsAngle:gt,libJsCoordsDistance:wt,libJsDecimal:hn},Misc:{libJsRegFormValidate:dn,libJsRetryRequest:mn,LibJsNumberStepper:Sn,LibJsEmitter:()=>{const e=new Map;return{on:(r,s)=>{e.has(r)||e.set(r,[]),e.get(r).push(s)},emit:(r,...s)=>{var o;(o=e.get(r))==null||o.forEach(u=>u(...s))},off:(r,s)=>{if(!s)e.delete(r);else{const o=e.get(r);o&&e.set(r,o.filter(u=>u!==s))}}}}},Random:{libJsProbabilityResult:pn,libJsRandom:gn,libJsRandomColor:wn,libJsUniqueRandomNumbers:vn},Time:{libJsSameTimeCheck:Mn,libJsTimeAgo:bn,libJsTimeGreeting:Nn}},Symbol.toStringTag,{value:"Module"}));window.LibJs=Tn});
8
+ */var fe=9e15,ie=1e9,_e="0123456789abcdef",ve="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",$e="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Oe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-fe,maxE:fe,crypto:!1},Ae,te,_=!0,Me="[DecimalError] ",re=Me+"Invalid argument: ",Je=Me+"Precision limit exceeded",Fe=Me+"crypto unavailable",Pe="[object Decimal]",W=Math.floor,Y=Math.pow,vt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,$t=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Mt=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Re=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,K=1e7,k=7,bt=9007199254740991,Nt=ve.length-1,Te=$e.length-1,d={toStringTag:Pe};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(re+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=St(i,Ze(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,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=F(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 F(this,new this.constructor(e))},d.dividedToIntegerBy=d.divToInt=function(e){var t=this,n=t.constructor;return S(F(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/De(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),s=le(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=le(s,2,r,r,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,r=r.times(1/De(5,e)),r=le(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,F(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=F(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<=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),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=oe(c,u),i=t?Se(f,u+10):oe(e,u),a=F(o,i,u,1),de(a.d,r=l,h))do if(u+=10,o=oe(c,u),i=t?Se(f,u+10):oe(e,u),a=F(o,i,u,1),!s){+j(a.d).slice(r+1,r+15)+1==1e14&&(a=S(a,l+1,0));break}while(de(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=Ne(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=F(n,e.abs(),0,3,1),t.s*=e.s):t=F(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,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=Ne(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=qe(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=Et(i,Ze(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,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(F(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=F(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,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=Ne(s,n),_?S(e,l.precision,l.rounding):e},d.toBinary=function(e,t){return Le(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,r=i.constructor;return e===void 0?n=ee(i,!0):(z(e,0,ie),t===void 0?t=r.rounding:z(t,0,8),i=S(new r(i),e+1,t),n=ee(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=ee(r):(z(e,0,ie),t===void 0?t=s.rounding:z(t,0,8),i=S(new s(r),e+r.e+1,t),n=ee(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=qe(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(re+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=F(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=F(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=F(c,i,s,1).minus(p).abs().cmp(F(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 Le(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=F(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 Le(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)<=bt)return r=Ue(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=ye(e.times(oe(u,i+n)),i),r.d&&(r=S(r,i+5,1),de(r.d,i,s)&&(t=i+10,r=S(ye(e.times(oe(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=ee(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(z(e,1,ie),t===void 0?t=r.rounding:z(t,0,8),i=S(new r(i),e,t),n=ee(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,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,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+=se(n)),s+=i;o=e[t],i=o+"",n=k-i.length,n&&(s+=se(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(re+e)}function de(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 be(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]+=_e.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 St(e,t){var n,i,r;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),r=(1/De(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=le(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 F=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,J,I,H,O,q,x,T,E,v,A,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,A=g.length,I=new U(N),H=I.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<A||h)&&T--;l++)E=h*a+(g[l]||0),H[l]=E/m|0,h=E%m|0;w=h||l<A}else{for(h=a/(m[0]+1)|0,h>1&&(m=e(m,h,a),g=e(g,h,a),b=m.length,A=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),J=M.length,q=O.length,c=t(M,O,J,q),c==1&&(h--,n(M,b<J?R:m,J,a))):(h==0&&(c=h=1),M=m.slice()),J=M.length,J<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++<A||O[0]!==void 0)&&T--);w=O[0]!==void 0}H[0]||H.shift()}if(p==1)I.e=f,Ae=w;else{for(l=1,h=H[0];h>=10;h/=10)l++;I.e=l+f*p-1,S(I,u?s+I.e+1:s,o,w)}return I}}();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 ee(e,t,n){if(!e.isFinite())return Ye(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)+se(i):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+se(-r-1)+s,n&&(i=n-o)>0&&(s+=se(i))):r>=o?(s+=se(r+1-o),n&&(i=n-r-1)>0&&(s=s+"."+se(i))):((i=r+1)<o&&(s=s.slice(0,i)+"."+s.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(s+="."),s+=se(i))),s}function Ne(e,t){var n=e[0];for(t*=k;n>=10;n/=10)t++;return t}function Se(e,t,n){if(t>Nt)throw _=!0,n&&(e.precision=n),Error(Je);return S(new e(ve),t,1,!0)}function Q(e,t,n){if(t>Te)throw Error(Je);return S(new e($e),t,n,!0)}function qe(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 Ue(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),je(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),je(t.d,o)}return _=!0,s}function Be(e){return e.d[e.d.length-1]&1}function He(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 ye(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(F(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&&de(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 oe(e,t){var n,i,r,s,o,u,a,c,f,l,h,p=1,w=10,M=e,J=M.d,I=M.constructor,H=I.rounding,O=I.precision;if(M.s<0||!J||!J[0]||!M.e&&J[0]==1&&J.length==1)return new I(J&&!J[0]?-1/0:M.s!=1?NaN:J?0:M);if(t==null?(_=!1,f=O):f=t,I.precision=f+=w,n=j(J),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 I("0."+n),s++):M=new I(i+"."+n.slice(1))}else return c=Se(I,f+2,O).times(s+""),M=oe(new I(i+"."+n.slice(1)),f-w).plus(c),I.precision=O,t==null?S(M,O,H,_=!0):M;for(l=M,a=o=M=F(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(F(o,new I(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(Se(I,f+2,O).times(s+""))),a=F(a,new I(p),f,1),t==null)if(de(a.d,f-w,H,u))I.precision=f+=w,c=o=M=F(l.minus(1),l.plus(1),f,1),h=S(M.times(M),f,1),r=u=1;else return S(a,I.precision=O,H,_=!0);else return I.precision=O,a;a=c,r+=2}}function Ye(e){return String(e.s*e.s/0)}function Ce(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 Dt(e,t){var n,i,r,s,o,u,a,c,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Re.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($t.test(t))n=16,t=t.toLowerCase();else if(vt.test(t))n=2;else if(Mt.test(t))n=8;else throw Error(re+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=Ue(i,new i(n),s,s*2)),c=be(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=Ne(c,f),e.d=c,_=!1,o&&(e=F(e,r,u*4)),a&&(e=e.times(Math.abs(a)<54?Y(2,a):ne.pow(2,a))),_=!0,e)}function Et(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/De(5,n)),t=le(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 le(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=F(u.times(a),new e(t++*t++),c,1),u=r?i.plus(o):i.minus(o),i=F(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 De(e,t){for(var n=e;--t;)n*=e;return n}function Ze(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 te=i?4:1,t;if(n=t.divToInt(r),n.isZero())te=i?3:2;else{if(t=t.minus(n.times(r)),t.lte(s))return te=Be(n)?i?2:3:i?4:1,t;te=Be(n)?i?1:4:i?3:2}return t.minus(r).abs()}function Le(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,ie),i===void 0?i=p.rounding:z(i,0,8)):(n=p.precision,i=p.rounding),!e.isFinite())f=Ye(e);else{for(f=ee(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=be(ee(h),10,r),h.e=h.d.length),l=be(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=F(e,h,n,i,0,r),l=e.d,s=e.e,c=Ae),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+=_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=be(f,r,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+(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 je(e,t){if(e.length>t)return e.length=t,!0}function kt(e){return new this(e).abs()}function _t(e){return new this(e).acos()}function Ot(e){return new this(e).acosh()}function Tt(e,t){return new this(e).plus(t)}function yt(e){return new this(e).asin()}function Ct(e){return new this(e).asinh()}function Lt(e){return new this(e).atan()}function It(e){return new this(e).atanh()}function At(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(F(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(F(e,t,s,1)),n}function Jt(e){return new this(e).cbrt()}function Ft(e){return S(e=new this(e),e.e+1,2)}function Pt(e,t,n){return new this(e).clamp(t,n)}function Rt(e){if(!e||typeof e!="object")throw Error(Me+"Object expected");var t,n,i,r=e.defaults===!0,s=["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<s.length;t+=3)if(n=s[t],r&&(this[n]=Oe[n]),(i=e[n])!==void 0)if(W(i)===i&&i>=s[t+1]&&i<=s[t+2])this[n]=i;else throw Error(re+n+": "+i);if(n="crypto",r&&(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(Fe);else this[n]=!1;else throw Error(re+n+": "+i);return this}function qt(e){return new this(e).cos()}function Ut(e){return new this(e).cosh()}function We(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,Ve(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 Ce(c,s.toString())}else if(a!=="string")throw Error(re+s);return(u=s.charCodeAt(0))===45?(s=s.slice(1),c.s=-1):(u===43&&(s=s.slice(1)),c.s=1),Re.test(s)?Ce(c,s):Dt(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=Rt,r.clone=We,r.isDecimal=Ve,r.abs=kt,r.acos=_t,r.acosh=Ot,r.add=Tt,r.asin=yt,r.asinh=Ct,r.atan=Lt,r.atanh=It,r.atan2=At,r.cbrt=Jt,r.ceil=Ft,r.clamp=Pt,r.cos=qt,r.cosh=Ut,r.div=Bt,r.exp=Ht,r.floor=Yt,r.hypot=Zt,r.ln=jt,r.log=Wt,r.log10=zt,r.log2=Vt,r.max=Gt,r.min=xt,r.mod=Xt,r.mul=Kt,r.pow=Qt,r.random=en,r.round=tn,r.sign=nn,r.sin=rn,r.sinh=sn,r.sqrt=on,r.sub=un,r.sum=cn,r.tan=an,r.tanh=fn,r.trunc=ln,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 Bt(e,t){return new this(e).div(t)}function Ht(e){return new this(e).exp()}function Yt(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 Ve(e){return e instanceof ne||e&&e.toStringTag===Pe||!1}function jt(e){return new this(e).ln()}function Wt(e,t){return new this(e).log(t)}function Vt(e){return new this(e).log(2)}function zt(e){return new this(e).log(10)}function Gt(){return He(this,arguments,"lt")}function xt(){return He(this,arguments,"gt")}function Xt(e,t){return new this(e).mod(t)}function Kt(e,t){return new this(e).mul(t)}function Qt(e,t){return new this(e).pow(t)}function en(e){var t,n,i,r,s=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));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(Fe);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 tn(e){return S(e=new this(e),e.e+1,this.rounding)}function nn(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function rn(e){return new this(e).sin()}function sn(e){return new this(e).sinh()}function on(e){return new this(e).sqrt()}function un(e,t){return new this(e).sub(t)}function cn(){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 an(e){return new this(e).tan()}function fn(e){return new this(e).tanh()}function ln(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=We(Oe);ve=new ne(ve),$e=new ne($e);const hn=(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 ne(e),new ne(t));return Number(s.toFixed(i))},dn=(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},[]),mn=({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()}),pn=e=>Math.random()*100<e,gn=(e,t,n=0)=>parseFloat((Math.random()*(t-e)+e).toFixed(n)),wn=(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})`},vn=(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)};var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(ze,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",J=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|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,L=g.clone().add(D+(C?-1:1),l);return+(-(D+(m-$)/(C?$-L:L-$))||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])},A=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 L=g.split("-");if(!$&&L.length>1)return N(L[0])}else{var P=g.name;T[P]=g,$=P}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=A,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=A(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 L=$.match(J);if(L){var P=L[2]-1||0,B=(L[7]||"0").substring(0,3);return C?new Date(Date.UTC(L[1],P,L[3]||1,L[4]||0,L[5]||0,L[6]||0,B)):new Date(L[1],P,L[3]||1,L[4]||0,L[5]||0,L[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,L=b.p(m),P=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(L){case p:return C?P(1,0):P(31,11);case l:return C?P(1,V):P(0,V+1);case f:var ce=this.$locale().weekStart||0,me=(Z<ce?Z+7:Z)-ce;return P(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),L="set"+(this.$u?"UTC":""),P=($={},$[c]=L+"Date",$[w]=L+"Date",$[l]=L+"Month",$[p]=L+"FullYear",$[a]=L+"Hours",$[u]=L+"Minutes",$[o]=L+"Seconds",$[s]=L+"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[P](B),Z.init(),this.$d=Z.set(w,Math.min(this.$D,Z.daysInMonth())).$d}else P&&this.$d[P](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 L=b.p(D),P=function(V){var X=y(C);return b.w(X.date(X.date()+Math.round(V*m)),C)};if(L===l)return this.set(l,this.$M+m);if(L===p)return this.set(p,this.$y+m);if(L===c)return P(1);if(L===f)return P(7);var B=($={},$[u]=i,$[a]=r,$[o]=n,$)[L]||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",L=b.z(this),P=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(P%12||12,G,"0")},ae=he||function(G,ue,pe){var ke=G<12?"AM":"PM";return pe?ke.toLowerCase():ke};return C.replace(I,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(P);case"HH":return b.s(P,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return ae(P,B,!0);case"A":return ae(P,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 L}return null}(G)||L.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(m,D,$){var C,L=this,P=b.p(D),B=y(m),Z=(B.utcOffset()-this.utcOffset())*i,V=this-B,X=function(){return b.m(L,B)};switch(P){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=A(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=A,y.isDayjs=v,y.unix=function(N){return y(1e3*N)},y.en=T[x],y.Ls=T,y.p={},y})})(xe);var $n=xe.exports;const Ee=Ge($n),Mn=(e,t)=>{const n=Ee(e).startOf(t),i=Ee().startOf(t);return n.isSame(i)?0:n.isBefore(i)?1:-1},bn=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"刚刚"},Nn=(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 Sn{constructor(t,n){this._currentIndex=0,this._numsLength=0,this._isDown=!1,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 Dn=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]}`]},En=e=>e.toString().replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2"),Ie=(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,")},kn=(e,t,n=0)=>{const i=new ne(e),r=Object.entries(t).sort(([,o],[,u])=>u-o);for(const[o,u]of r){const a=new ne(u);if(i.greaterThanOrEqualTo(a)){const c=i.dividedBy(a);return Ie(Number(c),n)+o}}return Ie(Number(i),n)};var Xe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(ze,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"},J=function(T){return T<0},I=function(T){return J(T)?Math.ceil(T):Math.floor(T)},H=function(T){return Math.abs(T)},O=function(T,E){return T?J(T)?{negative:!0,format:""+H(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},q=function(){function T(v,A,y){var b=this;if(this.$d={},this.$l=y,v===void 0&&(this.$ms=0,this.parseFromMilliseconds()),A)return w(v*h[M(A)],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(A,y){return A+(v.$d[y]||0)*h[y]},0)},E.parseFromMilliseconds=function(){var v=this.$ms;this.$d.years=I(v/c),v%=c,this.$d.months=I(v/f),v%=f,this.$d.days=I(v/u),v%=u,this.$d.hours=I(v/o),v%=o,this.$d.minutes=I(v/s),v%=s,this.$d.seconds=I(v/r),v%=r,this.$d.milliseconds=v},E.toISOString=function(){var v=O(this.$d.years,"Y"),A=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||A.negative||b.negative||R.negative||U.negative||g.negative,D=R.format||U.format||g.format?"T":"",$=(m?"-":"")+"P"+v.format+A.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 A=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 A.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 A=this.$ms,y=M(v);return y==="milliseconds"?A%=1e3:A=y==="weeks"?I(A/h[y]):this.$d[y],A||0},E.add=function(v,A,y){var b;return b=A?v*h[M(A)]:p(v)?v.$ms:w(v,this).$ms,w(this.$ms+b*(y?-1:1),this)},E.subtract=function(v,A){return this.add(v,A,!0)},E.locale=function(v){var A=this.clone();return A.$l=v,A},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 A=E.prototype.add,y=E.prototype.subtract;E.prototype.add=function(b,R){return p(b)?x(this,b,1):A.bind(this)(b,R)},E.prototype.subtract=function(b,R){return p(b)?x(this,b,-1):y.bind(this)(b,R)}}})})(Xe);var _n=Xe.exports;const On=Ge(_n);Ee.extend(On);const Tn=Object.freeze(Object.defineProperty({__proto__:null,Base:{libJsGetDataType:ge,libJsPromiseTimeout:Ke},Browser:{libJsColorConsole:Qe,libJsIsMobile:et,libJsIsPad:tt,libJsPathParams:nt,libJsSetTitleIcon:it,libJsTagTitleTip:rt,libJsObjToUrlParams:st},Data:{libJsChunkArray:ot,libJsDeepJSONParse:we,libJsGroupArrayByKey:ut,libJsMatchEmail:ct,libJsShuffleArray:at,libJsStepArray:ft,libReverseArrayFromIndex:lt},File:{libJsDownloadImageLink:ht,libJsImageOptimizer:dt,libJsSaveJson:mt},Formatter:{libJsFormatterByte:Dn,libJsMaskPhoneNumber:En,libJsNumComma:Ie,libJsNumberUnit:kn,libJsSecondsFormatterChinese:e=>{const t=Ee.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("")}},Math:{libJsCalculateExpression:(e,t=2)=>{e=e.replace(/\s+/g,"");const n={"+":1,"-":1,"*":2,"/":2},i=u=>new ne(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)}},libJsConvertAngle:pt,libJsCoordsAngle:gt,libJsCoordsDistance:wt,libJsDecimal:hn},Misc:{libJsRegFormValidate:dn,libJsRetryRequest:mn,LibJsNumberStepper:Sn,LibJsEmitter:()=>{const e=new Map;return{on:(r,s)=>{e.has(r)||e.set(r,[]),e.get(r).push(s)},emit:(r,...s)=>{var o;(o=e.get(r))==null||o.forEach(u=>u(...s))},off:(r,s)=>{if(!s)e.delete(r);else{const o=e.get(r);o&&e.set(r,o.filter(u=>u!==s))}}}},LibJsLerp:(e,t,n)=>{const i=Math.min(Math.max(n,0),1);return e*(1-i)+t*i},LibJsNormalizeInRange:(e,t,n)=>Math.max(0,Math.min((e-n)/(e-t),1))},Random:{libJsProbabilityResult:pn,libJsRandom:gn,libJsRandomColor:wn,libJsUniqueRandomNumbers:vn},Time:{libJsSameTimeCheck:Mn,libJsTimeAgo:bn,libJsTimeGreeting:Nn}},Symbol.toStringTag,{value:"Module"}));window.LibJs=Tn});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-js",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "自用JS方法库",
5
5
  "license": "ISC",
6
6
  "type": "module",