@dazhicheng/utils 1.3.50 → 1.3.51

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,101 @@
1
+ import type dayjs from "dayjs";
2
+ /** 期间格式化类型:`period` 输出「2026年08期」,`month` 输出「08/2026」 */
3
+ export type LabelFormatType = "month" | "period";
4
+ /**
5
+ * 日期格式化入参。
6
+ *
7
+ * 接受空值:接口返回的日期字段大多是可选的,调用点不必逐个补非空断言。
8
+ */
9
+ export type FormatDateInput = Date | dayjs.Dayjs | null | number | string | undefined;
10
+ /** 金额格式化入参,接受空值 */
11
+ export type FormatAmountInput = null | number | string | undefined;
12
+ /**
13
+ * 格式化金额,默认千分位保留两位小数。
14
+ *
15
+ * 空值与 `0` 统一返回 `"0.00"`,与 `formatAmountOfPlace` 口径一致。
16
+ * @param val 金额,可以是数字或字符串
17
+ * @param format numeral 的格式化模板,默认 `0,0.00`
18
+ * @returns 格式化后的金额字符串
19
+ * @example
20
+ * formatAmount(1234.5) // "1,234.50"
21
+ * formatAmount(undefined) // "0.00"
22
+ * formatAmount(1234.5678, "0,0.0000") // "1,234.5678"
23
+ */
24
+ export declare function formatAmount(val: FormatAmountInput, format?: string): string;
25
+ /**
26
+ * 格式化金额为千分位并保留两位小数。
27
+ *
28
+ * 与 `formatAmount` 行为相同,保留该导出是为了兼容既有调用点。
29
+ * @param val 金额数值
30
+ * @param format numeral 的格式化模板,默认 `0,0.00`
31
+ * @returns 格式化后的金额字符串
32
+ * @example
33
+ * formatAmountOfPlace(1234.5) // "1,234.50"
34
+ */
35
+ export declare function formatAmountOfPlace(val: FormatAmountInput, format?: string): string;
36
+ /**
37
+ * 把千分位金额字符串转回数值。
38
+ * @param val 千分位格式的金额字符串或数值
39
+ * @returns 转换后的数值,空值返回 `0`
40
+ * @example
41
+ * formatPlaceOfAmount("1,234.50") // 1234.5
42
+ * formatPlaceOfAmount(undefined) // 0
43
+ */
44
+ export declare function formatPlaceOfAmount(val: FormatAmountInput): number;
45
+ /**
46
+ * 按指定小数位截断金额,不做四舍五入,位数不足补零。
47
+ * @param str 金额字符串或数字
48
+ * @param index 保留的小数位数
49
+ * @returns 格式化后的金额字符串,空值或非数字返回空字符串
50
+ * @example
51
+ * formatDecimal(1.239, 2) // "1.24"
52
+ * formatDecimal(undefined, 2) // ""
53
+ */
54
+ export declare function formatDecimal(str: FormatAmountInput, index: number): string;
55
+ /**
56
+ * 格式化文件大小,按 1000 进制换算并带单位。
57
+ * @param bytes 文件大小,单位字节
58
+ * @param decimalPoint 保留的小数位数,默认 2
59
+ * @returns 带单位的文件大小字符串,空值与 `0` 返回 `"0 Bytes"`
60
+ * @example
61
+ * formatFileSize(1500) // "1.5 KB"
62
+ * formatFileSize(undefined) // "0 Bytes"
63
+ */
64
+ export declare function formatFileSize(bytes: null | number | undefined, decimalPoint?: number): string;
65
+ /**
66
+ * 格式化期间(年月)。
67
+ * @param val 期间值,形如 `202608`、`2026-08`、`2026.08`
68
+ * @param formatType 输出形式,`period` 为「2026年08期」,`month` 为「 08/2026」
69
+ * @returns 格式化后的期间字符串,空值返回空字符串
70
+ * @example
71
+ * formatPeriod(202608) // "2026年08期"
72
+ * formatPeriod("2026-08", "month") // " 08/2026"
73
+ */
74
+ export declare function formatPeriod(val: FormatAmountInput, formatType?: LabelFormatType): string;
75
+ /**
76
+ * 格式化日期时间。
77
+ *
78
+ * `undefined` 与 `null` 直接返回 `"--"`,不走 dayjs:`dayjs(undefined)` 等价于 `dayjs()`,
79
+ * 会把空日期渲染成当天时间。`""` 与无效日期仍由 dayjs 的 `isValid()` 判定,
80
+ * 时间戳 `0` 沿用原行为按 1970-01-01 解析。
81
+ * @param date 日期,支持字符串、时间戳、Date 与 dayjs 对象
82
+ * @param format 格式化模板,默认 `YYYY-MM-DD HH:mm:ss`
83
+ * @returns 格式化后的字符串,空值或无效日期返回 `"--"`
84
+ * @example
85
+ * formatToDateTime("2026-08-15") // "2026-08-15 00:00:00"
86
+ * formatToDateTime(undefined) // "--"
87
+ */
88
+ export declare function formatToDateTime(date: FormatDateInput, format?: string): string;
89
+ /**
90
+ * 格式化日期。
91
+ *
92
+ * 空值处理与 `formatToDateTime` 一致,`undefined` 不会被解析成当天。
93
+ * @param date 日期,支持字符串、时间戳、Date 与 dayjs 对象
94
+ * @param format 格式化模板,默认 `YYYY-MM-DD`
95
+ * @param isTimeStamp 入参是否为时间戳,为 `true` 时按数字解析
96
+ * @returns 格式化后的字符串,空值或无效日期返回 `"--"`
97
+ * @example
98
+ * formatToDate("2026-08-15 10:00:00") // "2026-08-15"
99
+ * formatToDate(1755230400000, "YYYY-MM-DD", true) // "2026-08-15"
100
+ */
101
+ export declare function formatToDate(date: FormatDateInput, format?: string, isTimeStamp?: boolean): string;
package/dist/index.d.ts CHANGED
@@ -2,8 +2,10 @@ export * from "./string";
2
2
  export * from "./file";
3
3
  export * from "./axios/index";
4
4
  export * from "./axios/type";
5
+ export { loadingService } from "./axios/loading";
5
6
  export * from "./install";
6
7
  export * from "./is";
8
+ export * from "./format";
7
9
  export * from "./testid-helper";
8
10
  export * from "./tool";
9
11
  export * from "./merge";
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import t from"axios";import{ElMessage as e,ElLoading as n}from"element-plus";import r from"dayjs";import{nextTick as i,computed as o}from"vue";import{twMerge as u}from"tailwind-merge";import{clsx as a}from"clsx";import{klona as c}from"klona/full";import s from"dayjs/plugin/utc";import f from"dayjs/plugin/timezone";import{createDefu as l}from"defu";export{createDefu as createMerge,defuFn as mergFn,defu as merge}from"defu";import d from"decimal.js";import{encrypt as h,decrypt as p}from"crypto-js/aes";import g,{parse as m}from"crypto-js/enc-utf8";import v from"crypto-js/mode-ecb";import y from"crypto-js/pad-pkcs7";import{cloneDeep as w}from"lodash-es";function b(t){return t.charAt(0).toUpperCase()+t.slice(1)}function E(t){return t.trim()}function S(t){return t.replace(/-(\w)/g,(t,e)=>e?e.toUpperCase():"")}const N=(t,e)=>{try{const n=new Blob([t.data],{type:e}),r=document.createElement("a"),i=(window.URL||window.webkitURL).createObjectURL(n);r.href=i;let o=((t.headers["content-disposition"]||"").split("=")||[]).at(-1)||"";o=o?decodeURI(o.replace(/"/g,"")):"";const u=o?.split("''");o=u.at(-1)||"",r.download=o,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}catch(t){console.log(t)}};var O,D;!function(t){t[t.success=200]="success",t[t.success1=0]="success1",t[t.error=400]="error",t[t.unauthorized=401]="unauthorized",t[t.forbidden=403]="forbidden",t[t.notFound=404]="notFound",t[t.methodNotAllowed=405]="methodNotAllowed",t[t.requestTimeout=408]="requestTimeout",t[t.internalServerError=500]="internalServerError",t[t.notImplemented=501]="notImplemented",t[t.badGateway=502]="badGateway",t[t.serviceUnavailable=503]="serviceUnavailable",t[t.gatewayTimeout=504]="gatewayTimeout",t[t.httpVersionNotSupported=505]="httpVersionNotSupported",t[t.NEED_REFRESH_TOKEN=1001]="NEED_REFRESH_TOKEN",t[t.API_NO_AUTH=1002]="API_NO_AUTH",t[t.INVALID_TOKEN=1005]="INVALID_TOKEN"}(O||(O={})),function(t){t.badGateway="网关错误,请稍后重试",t.forbidden="禁止访问该资源",t.gatewayTimeout="网关超时,请稍后重试",t.internalServerError="服务器内部错误,请稍后重试",t.methodNotAllowed="请求方法不允许",t.networkError="网络连接异常,请检查网络连接",t.notFound="请求的资源不存在",t.requestCancelled="请求已取消",t.requestConfigError="请求配置错误",t.requestFailed="请求失败",t.requestTimeout="请求超时,请稍后重试",t.serviceUnavailable="服务暂时不可用,请稍后重试",t.unauthorized="未授权访问,请重新登录"}(D||(D={}));class A extends Error{code;data;timestamp;url;method;constructor(t,e,n){super(t),this.name="HttpError",this.code=e,this.data=n?.data,this.timestamp=(new Date).toISOString(),this.url=n?.url||"",this.method=n?.method||""}toLogData(){return{code:this.code,message:this.message,data:this.data,timestamp:this.timestamp,url:this.url||"",method:this.method||"",stack:this.stack||""}}}function x(t){if("ERR_CANCELED"===t.code)throw console.warn("Request cancelled:",t.message),new A(D.requestCancelled,O.error);const e=t.response?.status,n=t.response?.data?.msg||t.message,r=t.config;if(!t.response)throw new A(D.networkError,O.error,{url:r?.url||"",method:r?.method?.toUpperCase()||""});const i=e?(o=e,{[O.unauthorized]:D.unauthorized,[O.forbidden]:D.forbidden,[O.notFound]:D.notFound,[O.methodNotAllowed]:D.methodNotAllowed,[O.requestTimeout]:D.requestTimeout,[O.internalServerError]:D.internalServerError,[O.badGateway]:D.badGateway,[O.serviceUnavailable]:D.serviceUnavailable,[O.gatewayTimeout]:D.gatewayTimeout}[o]||D.internalServerError):n||D.requestFailed;var o;throw new A(i,e||O.error,{data:t.response.data,url:r?.url||"",method:r?.method?.toUpperCase()||""})}function j(t,n=!0){n&&e.error(t.message),console.error("[HTTP Error]",t.toLogData())}const T=Object.prototype.toString;function M(t,e){return T.call(t)===`[object ${e}]`}function k(t){return void 0!==t}function I(t){return!k(t)}function C(t){return null===t}function P(t){return I(t)||C(t)}function F(t){return!P(t)&&(t instanceof Promise||M(t,"Object"))}function R(t){return!!P(t)||(q(t)||z(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:!!F(t)&&0===Object.keys(t).length)}function $(t){return!!R(t)||(0===t||!!z(t)&&("0"===t||"undefined"===t||"null"===t))}function W(t){return M(t,"Date")}function _(t){return M(t,"Number")&&t==t}function U(t){return M(t,"Promise")&&F(t)&&H(t.then)&&H(t.catch)}function z(t){return M(t,"String")}function H(t){return"function"==typeof t}function L(t){return M(t,"Boolean")}function K(t){return M(t,"RegExp")}function q(t){return t&&Array.isArray(t)}function B(t){return"undefined"!=typeof window&&M(t,"Window")}function Z(t){return"undefined"!=typeof Element&&t instanceof Element}function Y(t){return M(t,"Map")}const J="undefined"==typeof window,V=!J;function G(t){return/(?:^https?:(?:\/\/)?(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)(?:\/[+~%/.\w-]*)?\??[-+=&;%@.\w]*(?:#\w*)?$/.test(t)}function Q(t){return!!z(t)&&!Number.isNaN(Number(t))}function X(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function tt(t){return"Error"===Object.prototype.toString.call(t).slice(8,-1)}function et(t){return"Symbol"===Object.prototype.toString.call(t).slice(8,-1)}function nt(t){return"Set"===Object.prototype.toString.call(t).slice(8,-1)}function rt(t){return!t||t===C(t)||t===I(t)||!1===t||t===Number.isNaN(t)||!(!q(t)||0!==t.length)}function it(t){return!rt(t)}function ot(){const t=navigator.userAgent;return t.includes("Android")||t.includes("Linux")?"Android":t.includes("iPhone")?"iPhone":t.includes("iPad")?"iPad":t.includes("Windows Phone")?"Windows Phone":t}function ut(){const t=navigator.userAgent;return function(t){const e=t.includes("Opera");return t.includes("compatible")&&t.includes("MSIE")&&!e}(t)?function(t){const e=/MSIE (\d+\.\d+);/,n=t.match(e),r=n?Number.parseFloat(n[1]||"0"):0;return 7===r?"IE7":8===r?"IE8":9===r?"IE9":10===r?"IE10":"IE7以下"}(t):function(t){return t.includes("Trident")&&t.includes("rv:11.0")}(t)?"IE11":function(t){const e=t.includes("compatible")&&t.includes("MSIE");return t.includes("Edge")&&!e}(t)?"Edge":function(t){return t.includes("Firefox")}(t)?"FF":function(t){return t.includes("Opera")}(t)?"Opera":function(t){return t.includes("Safari")&&!t.includes("Chrome")}(t)?"Safari":function(t){return t.includes("Chrome")&&t.includes("Safari")}(t)?"Chrome":""}function at(){return"iPhone"===ot()}function ct(){return"Android"===ot()}function st(){const t=navigator.userAgent,e=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];let n=!0;for(let r=0;r<e.length;r++){const i=e[r];if(i&&t.indexOf(i)>0){n=!1;break}}return n}function ft(t){return/^(?:https?:|mailto:|tel:|\/\/)/.test(t)}function lt(t){if("string"==typeof t)try{const e=JSON.parse(t);return!("object"!=typeof e||!e)}catch(t){return console.error(`error:${t}`),!1}return!1}function dt(t){return r.isDayjs(t)}function ht(t){return M(t,"FormData")}const pt=()=>document.documentElement.classList.contains("dark")?"rgba(7, 7, 7, 0.85)":"rgba(255, 255, 255, 0.5)",gt={lock:!0,get background(){return pt()},svg:'\n <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <style>\n .spinner {\n transform-origin: 20px 20px;\n animation: rotate 1.6s linear infinite;\n }\n .dot {\n fill: var(--theme-color);\n animation: fade 1.6s infinite;\n }\n .dot:nth-child(1) { animation-delay: 0s; }\n .dot:nth-child(2) { animation-delay: 0.5s; }\n .dot:nth-child(3) { animation-delay: 1s; }\n .dot:nth-child(4) { animation-delay: 1.5s; }\n @keyframes rotate {\n 100% { transform: rotate(360deg); }\n }\n @keyframes fade {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n </style>\n <g class="spinner">\n <circle class="dot" cx="20" cy="8" r="4"/>\n <circle class="dot" cx="32" cy="20" r="4"/>\n <circle class="dot" cx="20" cy="32" r="4"/>\n <circle class="dot" cx="8" cy="20" r="4"/>\n </g>\n </svg>\n',svgViewBox:"0 0 40 40",customClass:"art-loading-fix"};let mt=null;const vt={showLoading(){if(!mt){const t={...gt,background:pt()};mt=n.service(t)}return()=>this.hideLoading()},hideLoading(){mt&&(mt.close(),mt=null)}};function yt(n){const{router:r,useUserStore:o,VITE_API_URL:u,VITE_WITH_CREDENTIALS:a}=n;let c=!1;const s=["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"];let f=0;function l(){setTimeout(()=>{f--,0===f&&c&&i(()=>{vt.hideLoading(),c=!1})},0)}let d=!1,h=null;const p=t.create({timeout:6e5,baseURL:"/"+u,withCredentials:"true"===a,validateStatus:t=>t>=200&&t<300,transformResponse:[(t,e)=>{const n=e["content-type"];if(n?.includes("application/json"))try{return JSON.parse(t)}catch{return t}return t}]});function g(t,e="start"){if("string"!=typeof t||!t.trim())return"string"==typeof t?t.trim():t;const n=t.trim();if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(n))return n;const r="end"===e?"59":"00";return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(n)?`${n}:${r}`:/^\d{4}-\d{2}-\d{2} \d{2}$/.test(n)?`${n}:${r}:${r}`:/^\d{4}-\d{2}-\d{2}$/.test(n)?"end"===e?`${n} 23:59:59`:`${n} 00:00:00`:n}function m(t){if("string"==typeof t)return t.trim();if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>m(t));const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];n.includes("DtRange")&&Array.isArray(r)&&2===r.length?e[n]={startDate:m(r[0]),endDate:m(r[1])}:n.includes("TmRange")&&Array.isArray(r)&&2===r.length?e[n]={startTime:g(r[0],"start"),endTime:g(r[1],"end")}:e[n]="startTime"===n?g(r,"start"):"endTime"===n?g(r,"end"):m(r)}return e}function v(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>v(t));const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];n.includes("DtRange")&&"object"==typeof r&&null!==r&&"startDate"in r&&"endDate"in r?e[n]=[r.startDate,r.endDate]:n.includes("TmRange")&&"object"==typeof r&&null!==r&&"startTime"in r&&"endTime"in r?e[n]=[r.startTime,r.endTime]:e[n]=v(r)}return e}function y(t,e){return new A(t,e)}function w(t){const e=y(t||D.unauthorized,O.unauthorized);if(!d)throw d=!0,E(),h=setTimeout(b,3e3),j(e,!0),e;throw e}function b(){d=!1,h&&clearTimeout(h),h=null}p.interceptors.request.use(t=>{const{accessToken:e,info:n}=o();return e&&(t.headers.set("Authorization",e),t.headers.set("token",e),t.headers.set("x-userid-header",n.userId),t.headers.set("x-permission-code-header",r.currentRoute.value.meta.permissionOnlyCode),t.headers.set("a-path-code",r.currentRoute.value.path)),t.hideLoading||0!==f||(c=!0,vt.showLoading()),f++,t.params&&(t.params=m(t.params)),!t.data||ht(t.data)||t.headers["Content-Type"]||(t.data=m(t.data),t.headers.set("Content-Type","application/json"),t.data=JSON.stringify(t.data)),t},t=>(j(y(D.requestConfigError,O.error)),Promise.reject(t))),p.interceptors.response.use(async t=>{l(),await async function(t){const e=t.data;if(!(e instanceof Blob))return;const n=String(t.headers["content-type"]||""),r=e.type||"";if(n.includes("application/json")||r.includes("application/json"))try{const n=await e.text();t.data=JSON.parse(n)}catch{throw y(D.requestFailed,O.error)}}(t);const e=t.headers["content-type"];if(e?.includes("application/json")){t.data&&(t.data=v(t.data));const{code:e,msg:n}=t.data;if([O.success,O.success1].includes(e))return t;throw[O.unauthorized,O.INVALID_TOKEN].includes(e)&&w(n),y(n||D.requestFailed,e)}if(s.includes(e))return N(t,e),t},t=>(l(),t.response?.status===O.unauthorized&&w(),Promise.reject(x(t))));const E=()=>{setTimeout(()=>{o().logOut()},500)};async function S(t,n=0){try{return await async function(t){["POST","PUT","PATCH"].includes(t.method?.toUpperCase()||"")&&t.params&&!t.data&&(t.data=t.params,t.params=void 0);try{const n=await p.request(t);return t.showSuccessMessage&&n.data.msg&&function(t,n=!0){n&&e.success(t)}(n.data.msg),t.responseAllData?n:n.data.data}catch(e){const n=[O.unauthorized,O.NEED_REFRESH_TOKEN].includes(e.code);if(e instanceof A&&!n){j(e,!1!==t.showErrorMessage)}return Promise.reject(e)}}(t)}catch(e){if(e instanceof A&&[O.NEED_REFRESH_TOKEN].includes(e.code)&&!t.url?.includes("/iam/user/refreshToken"))return await o().refreshTokenFunc(),await T(1e3),S(t,n-1);if(n>0&&e instanceof A&&(r=e.code,[O.requestTimeout,O.internalServerError,O.badGateway,O.serviceUnavailable,O.gatewayTimeout].includes(r)))return await T(1e3),S(t,n-1);throw e}var r}function T(t){return new Promise(e=>setTimeout(e,t))}const M={get:t=>S({...t,method:"GET"}),post:t=>S({...t,method:"POST"}),put:t=>S({...t,method:"PUT"}),del:t=>S({...t,method:"DELETE"}),patch:t=>S({...t,method:"PATCH"}),request:t=>S(t)};return{...M,logOut:E,setBaseUrl:t=>{p.defaults.baseURL=t}}}function wt(t,e){if(t.install=n=>{for(const r of[t,...Object.values(e??{})]){const t=r.name;t&&n.component(t,r)}},e)for(const[n,r]of Object.entries(e))t[n]=r;return t}function bt(t){if("string"==typeof t)return t.trim();if("function"==typeof t){return(t.name||"").replace(/^bound\s+/i,"")}return""}function Et(...t){return t.filter(t=>null!=t&&""!==t).join("-")}function St(t){return t?t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/[\s_]+/g,"-").replace(/[^\w\u4E00-\u9FA5-]+/g,"-").toLowerCase().replace(/^-+|-+$/g,"").replace(/-+/g,"-"):""}function Nt(t,e=3){if(!t||0===t.length)return"form";const n=t.filter(t=>null!=t&&""!==t).slice(0,e);return 0===n.length?"form":n.join("-")}function Ot(t){return t?St(t):""}function Dt(t){if(!t)return!1;return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(t)}var At={keyId:1,cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};function xt(t,e,n){if(t)if(t.forEach)t.forEach(e,n);else for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t)}var jt=Object.prototype.toString;function Tt(t){return function(e){return"[object "+t+"]"===jt.call(e)}}var Mt=Array.isArray||Tt("Array");function kt(t,e){return!(!t||!t.hasOwnProperty)&&t.hasOwnProperty(e)}function It(t,e,n){if(t)for(var r in t)kt(t,r)&&e.call(n,t[r],r,t)}function Ct(t,e,n){return t?(Mt(t)?xt:It)(t,e,n):t}function Pt(t){return function(e){return typeof e===t}}var Ft=Pt("function");function Rt(t,e){var n=Object[t];return function(t){var r=[];if(t){if(n)return n(t);Ct(t,e>1?function(e){r.push([""+e,t[e]])}:function(){r.push(arguments[e])})}return r}}var $t=Rt("keys",1);function Wt(t,e){var n=t.__proto__.constructor;return e?new n(e):new n}function _t(t,e){return e?Ut(t,e):t}function Ut(t,e){if(t)switch(jt.call(t)){case"[object Object]":var n=Object.create(Object.getPrototypeOf(t));return It(t,function(t,r){n[r]=_t(t,e)}),n;case"[object Date]":case"[object RegExp]":return Wt(t,t.valueOf());case"[object Array]":case"[object Arguments]":var r=[];return xt(t,function(t){r.push(_t(t,e))}),r;case"[object Set]":var i=Wt(t);return i.forEach(function(t){i.add(_t(t,e))}),i;case"[object Map]":var o=Wt(t);return o.forEach(function(t,n){o.set(n,_t(t,e))}),o}return t}function zt(t,e){return t?Ut(t,e):t}var Ht=Object.assign;function Lt(t,e,n){for(var r,i=e.length,o=1;o<i;o++)r=e[o],xt($t(e[o]),n?function(e){t[e]=zt(r[e],n)}:function(e){t[e]=r[e]});return t}var Kt=function(t){if(t){var e=arguments;if(!0!==t)return Ht?Ht.apply(Object,e):Lt(t,e);if(e.length>1)return Lt(t=Mt(t[1])?[]:{},e,!0)}return t},qt=function(){};function Bt(t){return Kt(At,t)}var Zt="4.0.0";function Yt(t,e,n){for(var r=t.length-1;r>=0;r--)e.call(n,t[r],r,t)}function Jt(t,e,n){Yt($t(t),function(r){e.call(n,t[r],r,t)})}function Vt(t){return null===t}function Gt(t,e){return function(n){return Vt(n)?e:n[t]}}function Qt(t){return!!t&&t.constructor===Object}function Xt(t){return"__proto__"!==t&&"constructor"!==t}function te(t,e){return Qt(t)&&Qt(e)||Mt(t)&&Mt(e)?(Ct(e,function(n,r){Xt(r)&&(t[r]=Ft(e)?n:te(t[r],n))}),t):e}qt.VERSION=Zt,qt.version=Zt,qt.mixin=function(){xt(arguments,function(t){Ct(t,function(t,e){qt[e]=Ft(t)?function(){var e=t.apply(qt.$context,arguments);return qt.$context=null,e}:t})})},qt.setup=Bt,qt.setConfig=Bt,qt.getConfig=function(){return At};function ee(t,e,n){var r=[];if(t&&arguments.length>1){if(t.map)return t.map(e,n);Ct(t,function(){r.push(e.apply(n,arguments))})}return r}function ne(t,e,n,r,i){return function(o,u,a){if(o&&u){if(t&&o[t])return o[t](u,a);if(e&&Mt(o)){for(var c=0,s=o.length;c<s;c++)if(!!u.call(a,o[c],c,o)===r)return[!0,!1,c,o[c]][n]}else for(var f in o)if(kt(o,f)&&!!u.call(a,o[f],f,o)===r)return[!0,!1,f,o[f]][n]}return i}}var re=ne("some",1,0,!0,!1),ie=ne("every",1,1,!1,!0);function oe(t,e){if(t){if(t.includes)return t.includes(e);for(var n in t)if(kt(t,n)&&e===t[n])return!0}return!1}function ue(t,e){var n,r=0;if(Mt(t)&&Mt(e)){for(n=e.length;r<n;r++)if(!oe(t,e[r]))return!1;return!0}return oe(t,e)}function ae(t,e,n){var r=[];if(e){Ft(e)||(e=Gt(e));var i,o={};Ct(t,function(u,a){i=e.call(n,u,a,t),o[i]||(o[i]=1,r.push(u))})}else Ct(t,function(t){oe(r,t)||r.push(t)});return r}function ce(t){return ee(t,function(t){return t})}var se="undefined",fe=Pt(se);function le(t){return Vt(t)||fe(t)}var de=/(.+)?\[(\d+)\]$/;function he(t){return t?t.splice&&t.join?t:(""+t).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function pe(t,e,n){if(le(t))return n;var r=function(t,e){if(t){var n,r,i,o=0;if(t[e]||kt(t,e))return t[e];if(i=(r=he(e)).length)for(n=t;o<i;o++)if(le(n=ge(n,r[o])))return o===i-1?n:void 0;return n}}(t,e);return fe(r)?n:r}function ge(t,e){var n=e?e.match(de):"";return n?n[1]?t[n[1]]?t[n[1]][n[2]]:void 0:t[n[2]]:t[e]}function me(t,e){return fe(t)?1:Vt(t)?fe(e)?-1:1:t&&t.localeCompare?t.localeCompare(e):t>e?1:-1}function ve(t,e,n){return function(r,i){var o=r[t],u=i[t];return o===u?n?n(r,i):0:"desc"===e.order?me(u,o):me(o,u)}}function ye(t,e,n){if(t){if(le(e))return ce(t).sort(me);for(var r,i=ee(t,function(t){return{data:t}}),o=function(t,e,n,r){var i=[];return xt(n=Mt(n)?n:[n],function(n,o){if(n){var u,a=n;Mt(n)?(a=n[0],u=n[1]):Qt(n)&&(a=n.field,u=n.order),i.push({field:a,order:u||"asc"}),xt(e,Ft(a)?function(e,n){e[o]=a.call(r,e.data,n,t)}:function(t){t[o]=a?pe(t.data,a):t.data})}}),i}(t,i,e,n),u=o.length-1;u>=0;)r=ve(u,o[u],r),u--;return r&&(i=i.sort(r)),ee(i,Gt("data"))}return[]}var we=ye;function be(t,e){return t>=e?t:(t|=0)+Math.round(Math.random()*((e||9)-t))}var Ee=Rt("values",0);function Se(t){for(var e,n=[],r=Ee(t),i=r.length-1;i>=0;i--)e=i>0?be(0,i):0,n.push(r[e]),r.splice(e,1);return n}function Ne(t){return function(e){if(e){var n=t(e&&e.replace?e.replace(/,/g,""):e);if(!isNaN(n))return n}return 0}}var Oe=Ne(parseFloat);function De(t,e,n){var r=[],i=arguments.length;if(t){if(e=i>=2?Oe(e):0,n=i>=3?Oe(n):t.length,t.slice)return t.slice(e,n);for(;e<n;e++)r.push(t[e])}return r}var Ae=ne("",0,2,!0),xe=ne("find",1,3,!0);function je(t,e){return ee(t,Gt(e))}function Te(t){return function(e,n){var r,i;return e&&e.length?(xt(e,function(o,u){n&&(o=Ft(n)?n(o,u,e):pe(o,n)),le(o)||!le(r)&&!t(r,o)||(i=u,r=o)}),e[i]):r}}var Me=Te(function(t,e){return t<e});function ke(t){var e,n,r,i=[];if(t&&t.length)for(e=0,r=(n=Me(t,function(t){return t?t.length:0}))?n.length:0;e<r;e++)i.push(je(t,e));return i}function Ie(t,e){var n=[];return xt(t,function(t){n=n.concat(Mt(t)?e?Ie(t,e):t:[t])}),n}function Ce(t,e){return(console[t]||console.log)(e)}function Pe(t,e){try{delete t[e]}catch(n){t[e]=void 0}}function Fe(t,e,n){return t?(Mt(t)?Yt:Jt)(t,e,n):t}var Re=Pt("object");function $e(t,e,n){if(t){var r,i=arguments.length>1&&(Vt(e)||!Re(e)),o=i?n:e;if(Qt(t))It(t,i?function(n,r){t[r]=e}:function(e,n){Pe(t,n)}),o&&Kt(t,o);else if(Mt(t)){if(i)for(r=t.length;r>0;)r--,t[r]=e;else t.length=0;o&&t.push.apply(t,o)}}return t}function We(t,e,n){if(t){if(!le(e)){var r=[],i=[];return Ft(e)||(o=e,e=function(t,e){return e===o}),Ct(t,function(t,i,o){e.call(n,t,i,o)&&r.push(i)}),Mt(t)?Fe(r,function(e,n){i.push(t[e]),t.splice(e,1)}):(i={},xt(r,function(e){i[e]=t[e],Pe(t,e)})),i}return $e(t)}var o;return t}function _e(t,e,n,r){var i=r.key,o=r.parentKey,u=r.children,a=r.data,c=r.updated,s=r.clear;return xt(n,function(n){var f=n[u];a&&(n=n[a]),!1!==c&&(n[o]=e?e[i]:null),t.push(n),f&&f.length&&_e(t,n,f,r),s&&delete n[u]}),t}function Ue(t){return function(e,n,r,i){var o=r||{},u=o.children||"children";return t(null,e,n,i,[],[],u,o)}}var ze=Ue(function t(e,n,r,i,o,u,a,c){var s,f,l,d,h,p;if(n)for(f=0,l=n.length;f<l;f++){if(s=n[f],d=o.concat([""+f]),h=u.concat([s]),r.call(i,s,f,n,d,e,h))return{index:f,item:s,path:d,items:n,parent:e,nodes:h};if(a&&s&&(p=t(s,s[a],r,i,d.concat([a]),h,a)))return p}});var He=Ue(function t(e,n,r,i,o,u,a,c){var s,f;Ct(n,function(c,l){s=o.concat([""+l]),f=u.concat([c]),r.call(i,c,l,n,s,e,f),c&&a&&(s.push(a),t(c,c[a],r,i,s,f,a))})});var Le=Ue(function t(e,n,r,i,o,u,a,c){var s,f,l,d=c.mapChildren||a;return ee(n,function(h,p){return s=o.concat([""+p]),f=u.concat([h]),(l=r.call(i,h,p,n,s,e,f))&&h&&a&&h[a]&&(l[d]=t(h,h[a],r,i,s,f,a,c)),l})});function Ke(t,e,n,r,i,o,u,a,c){var s,f,l,d,h,p=[],g=c.original,m=c.data,v=c.mapChildren||a,y=c.isEvery;return xt(n,function(w,b){s=o.concat([""+b]),f=u.concat([w]),d=t&&!y||r.call(i,w,b,n,s,e,f),h=a&&w[a],d||h?(g?l=w:(l=Kt({},w),m&&(l[m]=w)),l[v]=Ke(d,w,w[a],r,i,s,f,a,c),(d||l[v].length)&&p.push(l)):d&&p.push(l)}),p}var qe=Ue(function(t,e,n,r,i,o,u,a){return Ke(0,t,e,n,r,i,o,u,a)});function Be(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(e===t[n])return n}function Ze(t,e){if(t.lastIndexOf)return t.lastIndexOf(e);for(var n=t.length-1;n>=0;n--)if(e===t[n])return n;return-1}var Ye=Pt("number");var Je=Pt("string"),Ve=Tt("Date"),Ge=parseInt;function Qe(t){return Date.UTC(t.y,t.M||0,t.d||1,t.H||0,t.m||0,t.s||0,t.S||0)}function Xe(t){return t.getTime()}function tn(t){return"(\\d{"+t+"})"}function en(t){return isNaN(t)?t:Ge(t)}for(var nn=tn(2),rn=tn("1,2"),on=tn("1,7"),un=tn("3,4"),an=".{1}",cn=an+rn,sn="(([zZ])|([-+]\\d{2}:?\\d{2}))",fn=[un,cn,cn,cn,cn,cn,an+on,sn],ln=[],dn=fn.length-1;dn>=0;dn--){for(var hn="",pn=0;pn<dn+1;pn++)hn+=fn[pn];ln.push(new RegExp("^"+hn+"$"))}var gn=[["yyyy",un],["yy",nn],["MM",nn],["M",rn],["dd",nn],["d",rn],["HH",nn],["H",rn],["mm",nn],["m",rn],["ss",nn],["s",rn],["SSS",tn(3)],["S",on],["Z",sn]],mn={},vn=["\\[([^\\]]+)\\]"];for(pn=0;pn<gn.length;pn++){var yn=gn[pn];mn[yn[0]]=yn[1]+"?",vn.push(yn[0])}var wn=new RegExp(vn.join("|"),"g"),bn={};function En(t,e){if(t){var n=Ve(t);if(n||!e&&/^[0-9]{11,15}$/.test(t))return new Date(n?Xe(t):Ge(t));if(Je(t)){var r=e?function(t,e){var n=bn[e];if(!n){var r=[],i=e.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(wn,function(t,e){var n=t.charAt(0);return"["===n?e:(r.push(n),mn[t])});n=bn[e]={_i:r,_r:new RegExp(i)}}var o={},u=t.match(n._r);if(u){for(var a=n._i,c=1,s=u.length;c<s;c++)o[a[c-1]]=u[c];return o}return o}(t,e):function(t){for(var e,n={},r=0,i=ln.length;r<i;r++)if(e=t.match(ln[r])){n.y=e[1],n.M=e[2],n.d=e[3],n.H=e[4],n.m=e[5],n.s=e[6],n.S=e[7],n.Z=e[8];break}return n}(t);if(r.y)return r.M&&(r.M=en(r.M)-1),r.S&&(r.S=(i=en(r.S.substring(0,3)))<10?100*i:i<100?10*i:i),r.Z?function(t){if(/^[zZ]/.test(t.Z))return new Date(Qe(t));var e=t.Z.match(/([-+])(\d{2}):?(\d{2})/);return e?new Date(Qe(t)-("-"===e[1]?-1:1)*Ge(e[2])*36e5+6e4*Ge(e[3])):new Date("")}(r):new Date(r.y,r.M||0,r.d||1,r.H||0,r.m||0,r.s||0,r.S||0)}}var i;return new Date("")}function Sn(){return new Date}function Nn(t){var e,n=t?En(t):Sn();return!!Ve(n)&&((e=n.getFullYear())%4==0&&(e%100!=0||e%400==0))}function On(t,e){return function(n,r){if(n){if(n[t])return n[t](r);if(Je(n)||Mt(n))return e(n,r);for(var i in n)if(kt(n,i)&&r===n[i])return i}return-1}}var Dn=On("indexOf",Be),An=On("lastIndexOf",Ze);function xn(t){var e=0;return Je(t)||Mt(t)?t.length:(Ct(t,function(){e++}),e)}var jn=function(t){return!Vt(t)&&!isNaN(t)&&!Mt(t)&&t%1==0};var Tn=Pt("boolean"),Mn=Tt("RegExp"),kn=Tt("Error");function In(t){for(var e in t)return!1;return!0}var Cn=typeof Symbol!==se;function Pn(t){return Cn&&Symbol.isSymbol?Symbol.isSymbol(t):"symbol"==typeof t}var Fn=Tt("Arguments");var Rn=typeof document===se?0:document;var $n=typeof window===se?0:window;var Wn=typeof FormData!==se;var _n=typeof Map!==se;var Un=typeof WeakMap!==se;var zn=typeof Set!==se;var Hn=typeof WeakSet!==se;function Ln(t){return function(e,n,r){if(e&&Ft(n)){if(Mt(e)||Je(e))return t(e,n,r);for(var i in e)if(kt(e,i)&&n.call(r,e[i],i,e))return i}return-1}}var Kn=Ln(function(t,e,n){for(var r=0,i=t.length;r<i;r++)if(e.call(n,t[r],r,t))return r;return-1});function qn(t,e,n,r,i,o,u){if(t===e)return!0;if(t&&e&&!Ye(t)&&!Ye(e)&&!Je(t)&&!Je(e)){if(Mn(t))return n(""+t,""+e,i,o,u);if(Ve(t)||Tn(t))return n(+t,+e,i,o,u);var a,c,s,f=Mt(t),l=Mt(e);if(f||l?f&&l:t.constructor===e.constructor)return c=$t(t),s=$t(e),r&&(a=r(t,e,i)),c.length===s.length&&(fe(a)?ie(c,function(i,o){return i===s[o]&&qn(t[i],e[s[o]],n,r,f||l?o:i,t,e)}):!!a)}return n(t,e,i,o,u)}function Bn(t,e){return t===e}function Zn(t,e){return qn(t,e,Bn)}var Yn=Ln(function(t,e,n){for(var r=t.length-1;r>=0;r--)if(e.call(n,t[r],r,t))return r;return-1});var Jn=Rt("entries",2);function Vn(t,e){return function(n,r){var i,o,u={},a=[],c=this,s=arguments,f=s.length;if(!Ft(r)){for(o=1;o<f;o++)i=s[o],a.push.apply(a,Mt(i)?i:[i]);r=0}return Ct(n,function(i,o){((r?r.call(c,i,o,n):Kn(a,function(t){return t===o})>-1)?t:e)&&(u[o]=i)}),u}}var Gn=Vn(1,0),Qn=Vn(0,1);var Xn=/(.+)?\[(\d+)\]$/;function tr(t,e,n,r,i){if(!t[e]){var o,u,a=e?e.match(Xn):null;if(n)u=i;else{var c=r?r.match(Xn):null;u=c&&!c[1]?new Array(Ge(c[2])+1):{}}return a?a[1]?(o=Ge(a[2]),t[a[1]]?n?t[a[1]][o]=u:t[a[1]][o]?u=t[a[1]][o]:t[a[1]][o]=u:(t[a[1]]=new Array(o+1),t[a[1]][o]=u)):t[a[2]]=u:t[e]=u,u}return n&&(t[e]=i),t[e]}function er(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function nr(t,e,n){var r,i={};return t&&(e&&Re(e)?e=function(t){return function(){return In(t)}}(e):Ft(e)||(e=Gt(e)),Ct(t,function(o,u){r=e?e.call(n,o,u,t):o,i[r]?i[r].push(o):i[r]=[o]})),i}function rr(t,e,n){var r,i,o=[],u=arguments;if(u.length<2&&(e=u[0],t=0),i=e|0,(r=t|0)<e)for(n=n|0||1;r<i;r+=n)o.push(r);return o}var ir=Te(function(t,e){return t>e});function or(t){return(t.split(".")[1]||"").length}function ur(t,e){if(t.repeat)return t.repeat(e);var n=isNaN(e)?[]:new Array(Ge(e));return n.join(t)+(n.length>0?t:"")}function ar(t,e){return t.substring(0,e)+"."+t.substring(e,t.length)}function cr(t){var e=""+t,n=e.match(/^([-+]?)((\d+)|((\d+)?[.](\d+)?))e([-+]{1})([0-9]+)$/);if(n){var r=t<0?"-":"",i=n[3]||"",o=n[5]||"",u=n[6]||"",a=n[7],c=n[8],s=c-u.length,f=c-i.length,l=c-o.length;return"+"===a?i?r+i+ur("0",c):s>0?r+o+u+ur("0",s):r+o+ar(u,c):i?f>0?r+"0."+ur("0",Math.abs(f))+i:r+ar(i,f):l>0?r+"0."+ur("0",Math.abs(l))+o+u:r+ar(o,l)+u}return e}function sr(t,e){var n=cr(t),r=cr(e);return parseInt(n.replace(".",""))*parseInt(r.replace(".",""))/Math.pow(10,or(n)+or(r))}function fr(t){return function(e,n){var r=Oe(e),i=r;if(r){n|=0;var o=cr(r).split("."),u=o[0],a=o[1]||"",c=a.substring(0,n+1),s=u+(c?"."+c:"");if(n>=a.length)return Oe(s);if(s=r,n>0){var f=Math.pow(10,n);i=Math[t](sr(s,f))/f}else i=Math[t](s)}return i}}var lr=fr("round"),dr=fr("ceil"),hr=fr("floor");function pr(t){return Ye(t)?cr(t):""+(le(t)?"":t)}function gr(t,e){var n=pr(lr(t,e|=0)).split("."),r=n[0],i=n[1]||"",o=e-i.length;return e?o>0?r+"."+i+ur("0",o):r+ar(i,Math.abs(o)):r}var mr=Ne(Ge);function vr(t,e){return sr(Oe(t),Oe(e))}function yr(t,e){var n=cr(t),r=cr(e),i=Math.pow(10,Math.max(or(n),or(r)));return(vr(t,i)+vr(e,i))/i}function wr(t,e){var n=cr(t),r=cr(e),i=or(n),o=or(r)-i,u=o<0,a=Math.pow(10,u?Math.abs(o):o);return vr(n.replace(".","")/r.replace(".",""),u?1/a:a)}function br(t,e,n){var r=0;return Ct(t&&t.length>2&&Mt(t)?t.sort():t,e?Ft(e)?function(){r=yr(r,e.apply(n,arguments))}:function(t){r=yr(r,pe(t,e))}:function(t){r=yr(r,t)}),r}var Er="first",Sr="last";function Nr(t){return t.getFullYear()}var Or=864e5;function Dr(t){return t.getMonth()}function Ar(t){return Ve(t)&&!isNaN(Xe(t))}function xr(t,e,n){var r=e&&!isNaN(e)?e:0;if(Ar(t=En(t))){if(n===Er)return new Date(Nr(t),Dr(t)+r,1);if(n===Sr)return new Date(Xe(xr(t,r+1,Er))-1);if(Ye(n)&&t.setDate(n),r){var i=t.getDate();if(t.setMonth(Dr(t)+r),i!==t.getDate())return t.setDate(1),new Date(Xe(t)-Or)}}return t}function jr(t,e,n){var r;if(Ar(t=En(t))&&(e&&(r=e&&!isNaN(e)?e:0,t.setFullYear(Nr(t)+r)),n||!isNaN(n))){if(n===Er)return new Date(Nr(t),0,1);if(n===Sr)return t.setMonth(11),xr(t,0,Sr);t.setMonth(n)}return t}var Tr=6048e5;function Mr(t,e,n,r){if(Ar(t=En(t))){var i=Ye(n),o=Ye(r),u=Xe(t);if(i||o){var a=o?r:At.firstDayOfWeek,c=t.getDay(),s=i?n:c;if(c!==s){var f=0;a>c?f=-(7-a+c):a<c&&(f=a-c),u+=s>a?((0===s?7:s)-a+f)*Or:s<a?(7-a+s+f)*Or:f*Or}}return e&&!isNaN(e)&&(u+=e*Tr),new Date(u)}return t}function kr(t,e,n){if(Ar(t=En(t))&&!isNaN(e)){if(t.setDate(t.getDate()+Ge(e)),n===Er)return new Date(Nr(t),Dr(t),t.getDate());if(n===Sr)return new Date(Xe(kr(t,1,Er))-1)}return t}function Ir(t){return t.toUpperCase()}var Cr=ee(rr(0,7),function(t){return[(t+1)%7,(t+2)%7,(t+3)%7]});function Pr(t,e){var n=new Date(t).getDay();return oe(Cr[e],n)}function Fr(t,e){return function(n,r){var i=Ye(r)?r:At.firstDayOfWeek,o=En(n);if(Ar(o)){var u,a=Mr(o,0,i,i),c=t(a),s=Xe(c),f=Xe(a),l=f+5184e5,d=new Date(l),h=Mr(c,0,i,i),p=Xe(h);if(f===p)return 1;if(e(a,d))for(u=Xe(t(d));u<l;u+=Or)if(Pr(u,i))return 1;var g=p+5184e5,m=new Date(l),v=1;if(e(h,m))for(v=0,u=s;u<g;u+=Or)if(Pr(u,i)){v++;break}return Math.floor((f-p)/Tr)+v}return NaN}}var Rr=Fr(function(t){return new Date(t.getFullYear(),0,1)},function(t,e){return t.getFullYear()!==e.getFullYear()});function $r(t){return Xe(function(t){return new Date(Nr(t),Dr(t),t.getDate())}(t))}function Wr(t){return Ar(t=En(t))?Math.floor(($r(t)-$r(jr(t,0,Er)))/Or)+1:NaN}function _r(t,e,n){var r=pr(t);return e|=0,n=fe(n)?" ":""+n,r.padStart?r.padStart(e,n):e>r.length?((e-=r.length)>n.length&&(n+=ur(n,e/n.length)),n.slice(0,e)+r):r}function Ur(t,e,n,r){var i=e[n];return i?Ft(i)?i(r,n,t):i[r]:r}var zr=/\[([^\]]+)]|y{2,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|S{1,3}|Z{1,2}|W{1,2}|D{1,3}|[aAeEq]/g;function Hr(t,e,n){if(t){if(Ar(t=En(t))){var r=n||{},i=e||At.parseDateFormat||At.formatString,o=t.getHours(),u=o<12?"am":"pm",a=Kt({},At.parseDateRules||At.formatStringMatchs,r.formats),c=function(e,n){return(""+Nr(t)).substring(4-n)},s=function(e,n){return _r(Dr(t)+1,n,"0")},f=function(e,n){return _r(t.getDate(),n,"0")},l=function(t,e){return _r(o,e,"0")},d=function(t,e){return _r(o<=12?o:o-12,e,"0")},h=function(e,n){return _r(t.getMinutes(),n,"0")},p=function(e,n){return _r(t.getSeconds(),n,"0")},g=function(e,n){return _r(t.getMilliseconds(),n,"0")},m=function(e,n){var r=t.getTimezoneOffset()/60*-1;return Ur(t,a,e,(r>=0?"+":"-")+_r(r,2,"0")+(1===n?":":"")+"00")},v=function(e,n){return _r(Ur(t,a,e,Rr(t,le(r.firstDay)?At.firstDayOfWeek:r.firstDay)),n,"0")},y=function(e,n){return _r(Ur(t,a,e,Wr(t)),n,"0")},w={yyyy:c,yy:c,MM:s,M:s,dd:f,d:f,HH:l,H:l,hh:d,h:d,mm:h,m:h,ss:p,s:p,SSS:g,S:g,ZZ:m,Z:m,WW:v,W:v,DDD:y,D:y,a:function(e){return Ur(t,a,e,u)},A:function(e){return Ur(t,a,e,Ir(u))},e:function(e){return Ur(t,a,e,t.getDay())},E:function(e){return Ur(t,a,e,t.getDay())},q:function(e){return Ur(t,a,e,Math.floor((Dr(t)+3)/3))}};return i.replace(zr,function(t,e){return e||(w[t]?w[t](t,t.length):t)})}return"Invalid Date"}return""}var Lr=Date.now||function(){return Xe(Sn())};var Kr=Fr(function(t){return new Date(t.getFullYear(),t.getMonth(),1)},function(t,e){return t.getMonth()!==e.getMonth()});var qr=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function Br(t){return t&&t.trimRight?t.trimRight():pr(t).replace(/[\s\uFEFF\xA0]+$/g,"")}function Zr(t){return t&&t.trimLeft?t.trimLeft():pr(t).replace(/^[\s\uFEFF\xA0]+/g,"")}function Yr(t){return t&&t.trim?t.trim():Br(Zr(t))}var Jr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function Vr(t){var e=new RegExp("(?:"+$t(t).join("|")+")","g");return function(n){return pr(n).replace(e,function(e){return t[e]})}}var Gr=Vr(Jr),Qr={};Ct(Jr,function(t,e){Qr[Jr[e]]=e});var Xr=Vr(Qr);function ti(t,e,n){return t.substring(e,n)}function ei(t){return t.toLowerCase()}var ni={};var ri={};function ii(t,e,n){return pr(t).replace((n||At).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(t,n){return pe(e,Yr(n))})}var oi=decodeURIComponent;function ui(t){var e,n={};return t&&Je(t)&&xt(t.split("&"),function(t){e=t.split("="),n[oi(e[0])]=oi(e[1]||"")}),n}var ai=encodeURIComponent;function ci(t,e,n){var r,i=[];return Ct(t,function(t,o){r=Mt(t),Qt(t)||r?i=i.concat(ci(t,e+"["+o+"]",r)):i.push(ai(e+"["+(n?"":o)+"]")+"="+ai(Vt(t)?"":t))}),i}var si=typeof location===se?0:location;function fi(){return si?si.origin||si.protocol+"//"+si.host:""}function li(t){return ui(t.split("?")[1]||"")}function di(t){var e,n,r,i,o=""+t;return 0===o.indexOf("//")?o=(si?si.protocol:"")+o:0===o.indexOf("/")&&(o=fi()+o),r=o.replace(/#.*/,"").match(/(\?.*)/),(i={href:o,hash:"",host:"",hostname:"",protocol:"",port:"",search:r&&r[1]&&r[1].length>1?r[1]:""}).path=o.replace(/^([a-z0-9.+-]*:)\/\//,function(t,e){return i.protocol=e,""}).replace(/^([a-z0-9.+-]*)(:\d+)?\/?/,function(t,e,r){return n=r||"",i.port=n.replace(":",""),i.hostname=e,i.host=e+n,"/"}).replace(/(#.*)/,function(t,e){return i.hash=e.length>1?e:"",""}),e=i.hash.match(/#((.*)\?|(.*))/),i.pathname=i.path.replace(/(\?|#.*).*/,""),i.origin=i.protocol+"//"+i.host,i.hashKey=e&&(e[2]||e[1])||"",i.hashQuery=li(i.hash),i.searchQuery=li(i.search),i}function hi(t,e){var n=parseFloat(e),r=Sn(),i=Xe(r);switch(t){case"y":return Xe(jr(r,n));case"M":return Xe(xr(r,n));case"d":return Xe(kr(r,n));case"h":case"H":return i+60*n*60*1e3;case"m":return i+60*n*1e3;case"s":return i+1e3*n}return i}function pi(t){return(Ve(t)?t:new Date(t)).toUTCString()}function gi(t,e,n){if(Rn){var r,i,o,u,a,c,s=[],f=arguments;return Mt(t)?s=t:f.length>1?s=[Kt({name:t,value:e},n)]:Re(t)&&(s=[t]),s.length>0?(xt(s,function(t){r=Kt({},At.cookies,t),o=[],r.name&&(i=r.expires,o.push(ai(r.name)+"="+ai(Re(r.value)?JSON.stringify(r.value):r.value)),i&&(i=isNaN(i)?i.replace(/^([0-9]+)(y|M|d|H|h|m|s)$/,function(t,e,n){return pi(hi(n,e))}):/^[0-9]{11,13}$/.test(i)||Ve(i)?pi(i):pi(hi("d",i)),r.expires=i),xt(["expires","path","domain","secure"],function(t){fe(r[t])||o.push(r[t]&&"secure"===t?t:t+"="+r[t])})),Rn.cookie=o.join("; ")}),!0):(u={},(a=Rn.cookie)&&xt(a.split("; "),function(t){c=t.indexOf("="),u[oi(t.substring(0,c))]=oi(t.substring(c+1)||"")}),1===f.length?u[t]:u)}return!1}function mi(t){return gi(t)}function vi(t,e,n){return gi(t,e,n),gi}function yi(t,e){gi(t,"",Kt({expires:-1},At.cookies,e))}function wi(){return $t(gi())}function bi(t){try{var e="__xe_t";return t.setItem(e,1),t.removeItem(e),!0}catch(t){return!1}}function Ei(t){return navigator.userAgent.indexOf(t)>-1}Kt(gi,{has:function(t){return oe(wi(),t)},set:vi,setItem:vi,get:mi,getItem:mi,remove:yi,removeItem:yi,keys:wi,getJSON:function(){return gi()}}),Kt(qt,{assign:Kt,objectEach:It,lastObjectEach:Jt,objectMap:function(t,e,n){var r={};if(t){if(!e)return t;Ft(e)||(e=Gt(e)),Ct(t,function(i,o){r[o]=e.call(n,i,o,t)})}return r},merge:function(t){t||(t={});for(var e,n=arguments,r=n.length,i=1;i<r;i++)(e=n[i])&&te(t,e);return t},uniq:ae,union:function(){for(var t=arguments,e=[],n=0,r=t.length;n<r;n++)e=e.concat(ce(t[n]));return ae(e)},sortBy:we,orderBy:ye,shuffle:Se,sample:function(t,e){var n=Se(t);return arguments.length<=1?n[0]:(e<n.length&&(n.length=e||0),n)},some:re,every:ie,slice:De,filter:function(t,e,n){var r=[];if(t&&e){if(t.filter)return t.filter(e,n);Ct(t,function(i,o){e.call(n,i,o,t)&&r.push(i)})}return r},find:xe,findLast:function(t,e,n){if(t){Mt(t)||(t=Ee(t));for(var r=t.length-1;r>=0;r--)if(e.call(n,t[r],r,t))return t[r]}},findKey:Ae,includes:oe,arrayIndexOf:Be,arrayLastIndexOf:Ze,map:ee,reduce:function(t,e,n){if(t){var r,i,o=0,u=n,a=arguments.length>2,c=$t(t);if(t.length&&t.reduce)return i=function(){return e.apply(null,arguments)},a?t.reduce(i,u):t.reduce(i);for(a&&(o=1,u=t[c[0]]),r=c.length;o<r;o++)u=e.call(null,u,t[c[o]],o,t);return u}},copyWithin:function(t,e,n,r){if(Mt(t)&&t.copyWithin)return t.copyWithin(e,n,r);var i,o,u=e|0,a=n|0,c=t.length,s=arguments.length>3?r|0:c;if(u<c&&(u=u>=0?u:c+u)>=0&&(a=a>=0?a:c+a)<(s=s>=0?s:c+s))for(i=0,o=t.slice(a,s);u<c&&!(o.length<=i);u++)t[u]=o[i++];return t},chunk:function(t,e){var n,r=[],i=e|0||1;if(Mt(t))if(i>=0&&t.length>i)for(n=0;n<t.length;)r.push(t.slice(n,n+i)),n+=i;else r=t.length?[t]:t;return r},zip:function(){return ke(arguments)},unzip:ke,zipObject:function(t,e){var n={};return e=e||[],Ct(Ee(t),function(t,r){n[t]=e[r]}),n},flatten:function(t,e){return Mt(t)?Ie(t,e):[]},toArray:ce,includeArrays:ue,pluck:je,invoke:function(t,e){for(var n,r=arguments,i=[],o=[],u=2,a=r.length;u<a;u++)i.push(r[u]);if(Mt(e)){for(a=e.length-1,u=0;u<a;u++)o.push(e[u]);e=e[a]}return ee(t,function(t){if(o.length&&(t=function(t,e){for(var n=0,r=e.length;t&&n<r;)t=t[e[n++]];return r&&t?t:0}(t,o)),(n=t[e]||e)&&n.apply)return n.apply(t,i)})},arrayEach:xt,lastArrayEach:Yt,toArrayTree:function(t,e){var n,r,i,o=Kt({},At.treeOptions,e),u=o.strict,a=o.key,c=o.parentKey,s=o.children,f=o.mapChildren,l=o.sortKey,d=o.reverse,h=o.data,p=[],g={},m={};return l&&(t=ye(zt(t),l),d&&(t=t.reverse())),Ct(t,function(t){n=t[a],m[n]&&Ce("warn","Duplicate primary key="+n),m[n]=!0}),Ct(t,function(t){n=t[a],h?(r={})[h]=t:r=t,i=t[c],g[n]=g[n]||[],r[a]=n,r[c]=i,n===i&&(i=null,Ce("warn","Error infinite Loop. key="+n+" parentKey="+n)),g[i]=g[i]||[],g[i].push(r),r[s]=g[n],f&&(r[f]=g[n]),(!u||u&&le(i))&&(m[i]||p.push(r))}),u&&function(t,e){Ct(t,function(t){t[e]&&!t[e].length&&We(t,e)})}(t,s),p},toTreeArray:function(t,e){return _e([],null,t,Kt({},At.treeOptions,e))},findTree:ze,eachTree:He,mapTree:Le,filterTree:function(t,e,n,r){var i=[];return t&&e&&He(t,function(t,n,o,u,a,c){e.call(r,t,n,o,u,a,c)&&i.push(t)},n),i},searchTree:qe,hasOwnProp:kt,eqNull:le,isNaN:function(t){return Ye(t)&&isNaN(t)},isFinite:function(t){return Ye(t)&&isFinite(t)},isUndefined:fe,isArray:Mt,isFloat:function(t){return!(Vt(t)||isNaN(t)||Mt(t)||jn(t))},isInteger:jn,isFunction:Ft,isBoolean:Tn,isString:Je,isNumber:Ye,isRegExp:Mn,isObject:Re,isPlainObject:Qt,isDate:Ve,isError:kn,isTypeError:function(t){return!!t&&t.constructor===TypeError},isEmpty:In,isNull:Vt,isSymbol:Pn,isArguments:Fn,isElement:function(t){return!!(t&&Je(t.nodeName)&&Ye(t.nodeType))},isDocument:function(t){return!(!t||!Rn||9!==t.nodeType)},isWindow:function(t){return!(!$n||!t||t!==t.window)},isFormData:function(t){return Wn&&t instanceof FormData},isMap:function(t){return _n&&t instanceof Map},isWeakMap:function(t){return Un&&t instanceof WeakMap},isSet:function(t){return zn&&t instanceof Set},isWeakSet:function(t){return Hn&&t instanceof WeakSet},isLeapYear:Nn,isMatch:function(t,e){var n=$t(t),r=$t(e);return!r.length||(ue(n,r)?re(r,function(r){return Kn(n,function(n){return n===r&&Zn(t[n],e[r])})>-1}):Zn(t,e))},isEqual:Zn,isEqualWith:function(t,e,n){return Ft(n)?qn(t,e,function(t,e,r,i,o){var u=n(t,e,r,i,o);return fe(u)?Bn(t,e):!!u},n):qn(t,e,Bn)},getType:function(t){return Vt(t)?"null":Pn(t)?"symbol":Ve(t)?"date":Mt(t)?"array":Mn(t)?"regexp":kn(t)?"error":typeof t},uniqueId:function(t){return""+(le(t)?"":t)+At.keyId++},getSize:xn,indexOf:Dn,lastIndexOf:An,findIndexOf:Kn,findLastIndexOf:Yn,toStringJSON:function(t){if(Qt(t))return t;if(Je(t))try{return JSON.parse(t)}catch(t){}return{}},toJSONString:function(t){return le(t)?"":JSON.stringify(t)},keys:$t,values:Ee,entries:Jn,pick:Gn,omit:Qn,first:function(t){return Ee(t)[0]},last:function(t){var e=Ee(t);return e[e.length-1]},each:Ct,forOf:function(t,e,n){if(t)if(Mt(t))for(var r=0,i=t.length;r<i&&!1!==e.call(n,t[r],r,t);r++);else for(var o in t)if(kt(t,o)&&!1===e.call(n,t[o],o,t))break},lastForOf:function(t,e,n){var r,i;if(t)if(Mt(t))for(r=t.length-1;r>=0&&!1!==e.call(n,t[r],r,t);r--);else for(r=(i=kt(t)).length-1;r>=0&&!1!==e.call(n,t[i[r]],i[r],t);r--);},lastEach:Fe,has:function(t,e){if(t){if(kt(t,e))return!0;var n,r,i,o,u,a,c=he(e),s=0,f=c.length;for(u=t;s<f&&(a=!1,(o=(n=c[s])?n.match(de):"")?(r=o[1],i=o[2],r?u[r]&&kt(u[r],i)&&(a=!0,u=u[r][i]):kt(u,i)&&(a=!0,u=u[i])):kt(u,n)&&(a=!0,u=u[n]),a);s++)if(s===f-1)return!0}return!1},get:pe,set:function(t,e,n){if(t&&Xt(e))if(!t[e]&&!kt(t,e)||er(e)){for(var r=t,i=he(e),o=i.length,u=0;u<o;u++)if(!er(i[u])){var a=u===o-1;r=tr(r,i[u],a,a?null:i[u+1],n)}}else t[e]=n;return t},groupBy:nr,countBy:function(t,e,n){var r=nr(t,e,n||this);return It(r,function(t,e){r[e]=t.length}),r},clone:zt,clear:$e,remove:We,range:rr,destructuring:function(t,e){if(t&&e){var n=Kt.apply(this,[{}].concat(De(arguments,1))),r=$t(n);xt($t(t),function(e){oe(r,e)&&(t[e]=n[e])})}return t},random:be,min:ir,max:Me,commafy:function(t,e){var n,r,i,o,u,a=Kt({},At.commafyOptions,e),c=a.digits;return Ye(t)?(n=(a.ceil?dr:a.floor?hr:lr)(t,c),o=(r=cr(c?gr(n,c):n).split("."))[0],u=r[1],(i=o&&n<0)&&(o=o.substring(1,o.length))):o=(r=(n=pr(t).replace(/,/g,""))?[n]:[])[0],r.length?(i?"-":"")+o.replace(new RegExp("(?=(?!(\\b))(.{"+(a.spaceNumber||3)+"})+$)","g"),a.separator||",")+(u?"."+u:""):n},round:lr,ceil:dr,floor:hr,toFixed:gr,toNumber:Oe,toNumberString:cr,toInteger:mr,add:function(t,e){return yr(Oe(t),Oe(e))},subtract:function(t,e){var n=Oe(t),r=Oe(e),i=cr(n),o=cr(r),u=or(i),a=or(o),c=Math.pow(10,Math.max(u,a));return parseFloat(gr((n*c-r*c)/c,u>=a?u:a))},multiply:vr,divide:function(t,e){return wr(Oe(t),Oe(e))},sum:br,mean:function(t,e,n){return wr(br(t,e,n),xn(t))},now:Lr,timestamp:function(t,e){if(t){var n=En(t,e);return Ve(n)?Xe(n):n}return Lr()},isValidDate:Ar,isDateSame:function(t,e,n){return!(!t||!e)&&("Invalid Date"!==(t=Hr(t,n))&&t===Hr(e,n))},toStringDate:En,toDateString:Hr,getWhatYear:jr,getWhatQuarter:function(t,e,n){var r,i=e&&!isNaN(e)?3*e:0;return Ar(t=En(t))?(r=3*(function(t){var e=t.getMonth();return e<3?1:e<6?2:e<9?3:4}(t)-1),t.setMonth(r),xr(t,i,n)):t},getWhatMonth:xr,getWhatWeek:Mr,getWhatDay:kr,getWhatHours:function t(e,n,r){if(Ar(e=En(e))&&!isNaN(n)){if(e.setHours(e.getHours()+Ge(n)),r===Er)return new Date(Nr(e),Dr(e),e.getDate(),e.getHours());if(r===Sr)return new Date(Xe(t(e,1,Er))-1)}return e},getWhatMinutes:function t(e,n,r){if(Ar(e=En(e))&&!isNaN(n)){if(e.setMinutes(e.getMinutes()+Ge(n)),r===Er)return new Date(Nr(e),Dr(e),e.getDate(),e.getHours(),e.getMinutes());if(r===Sr)return new Date(Xe(t(e,1,Er))-1)}return e},getWhatSeconds:function t(e,n,r){if(Ar(e=En(e))&&!isNaN(n)){if(e.setSeconds(e.getSeconds()+Ge(n)),r===Er)return new Date(Nr(e),Dr(e),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());if(r===Sr)return new Date(Xe(t(e,1,Er))-1)}return e},getYearDay:Wr,getYearWeek:Rr,getMonthWeek:Kr,getDayOfYear:function(t,e){return Ar(t=En(t))?Nn(jr(t,e))?366:365:NaN},getDayOfMonth:function(t,e){return Ar(t=En(t))?Math.floor((Xe(xr(t,e,Sr))-Xe(xr(t,e,Er)))/Or)+1:NaN},getDateDiff:function(t,e){var n,r,i,o,u,a,c={done:!1,status:!1,time:0};if(t=En(t),e=e?En(e):Sn(),Ar(t)&&Ar(e)&&(n=Xe(t))<(r=Xe(e)))for(o=c.time=r-n,c.done=!0,c.status=!0,a=0,u=qr.length;a<u;a++)o>=(i=qr[a])[1]?a===u-1?c[i[0]]=o||0:(c[i[0]]=Math.floor(o/i[1]),o-=c[i[0]]*i[1]):c[i[0]]=0;return c},trim:Yr,trimLeft:Zr,trimRight:Br,escape:Gr,unescape:Xr,camelCase:function(t){if(t=pr(t),ni[t])return ni[t];var e=t.length,n=t.replace(/([-]+)/g,function(t,n,r){return r&&r+n.length<e?"-":""});return e=n.length,n=n.replace(/([A-Z]+)/g,function(t,n,r){var i=n.length;return n=ei(n),r?i>2&&r+i<e?Ir(ti(n,0,1))+ti(n,1,i-1)+Ir(ti(n,i-1,i)):Ir(ti(n,0,1))+ti(n,1,i):i>1&&r+i<e?ti(n,0,i-1)+Ir(ti(n,i-1,i)):n}).replace(/(-[a-zA-Z])/g,function(t,e){return Ir(ti(e,1,e.length))}),ni[t]=n,n},kebabCase:function(t){if(t=pr(t),ri[t])return ri[t];if(/^[A-Z]+$/.test(t))return ei(t);var e=t.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(t,e,n,r){var i=n.length;return i>1?e+"-"+ei(ti(n,0,i-1))+"-"+ei(ti(n,i-1,i))+r:ei(e+"-"+n+r)}).replace(/^([A-Z]+)([a-z]+)?$/,function(t,e,n){var r=e.length;return ei(ti(e,0,r-1)+"-"+ti(e,r-1,r)+(n||""))}).replace(/([a-z]?)([A-Z]+)([a-z]?)/g,function(t,e,n,r,i){var o=n.length;return o>1&&(e&&(e+="-"),r)?(e||"")+ei(ti(n,0,o-1))+"-"+ei(ti(n,o-1,o))+r:(e||"")+(i?"-":"")+ei(n)+(r||"")});return e=e.replace(/([-]+)/g,function(t,n,r){return r&&r+n.length<e.length?"-":""}),ri[t]=e,e},repeat:function(t,e){return ur(pr(t),e)},padStart:_r,padEnd:function(t,e,n){var r=pr(t);return e|=0,n=fe(n)?" ":""+n,r.padEnd?r.padEnd(e,n):e>r.length?((e-=r.length)>n.length&&(n+=ur(n,e/n.length)),r+n.slice(0,e)):r},startsWith:function(t,e,n){var r=pr(t);return 0===(1===arguments.length?r:r.substring(n)).indexOf(e)},endsWith:function(t,e,n){var r=pr(t),i=arguments.length;return i>1&&(i>2?r.substring(0,n).indexOf(e)===n-1:r.indexOf(e)===r.length-1)},template:ii,toFormatString:function(t,e){return ii(t,e,{tmplRE:/\{([.\w[\]\s]+)\}/g})},toString:pr,toValueString:pr,noop:function(){},property:Gt,bind:function(t,e){var n=De(arguments,2);return function(){return t.apply(e,De(arguments).concat(n))}},once:function(t,e){var n=!1,r=null,i=De(arguments,2);return function(){return n||(r=t.apply(e,De(arguments).concat(i)),n=!0),r}},after:function(t,e,n){var r=0,i=[];return function(){var o=arguments;++r<=t&&i.push(o[0]),r>=t&&e.apply(n,[i].concat(De(o)))}},before:function(t,e,n){var r=0,i=[];return n=n||this,function(){var o=arguments;++r<t&&(i.push(o[0]),e.apply(n,[i].concat(De(o))))}},throttle:function(t,e,n){var r=null,i=null,o=!1,u=null,a=Kt({leading:!0,trailing:!0},n),c=a.leading,s=a.trailing,f=function(){r=null,i=null},l=function(){o=!0,t.apply(i,r),u=setTimeout(d,e),f()},d=function(){u=null,o||!0!==s?f():l()},h=function(){r=arguments,i=this,o=!1,null!==u||!0!==c?!0===s&&(u=setTimeout(d,e)):l()};return h.cancel=function(){var t=null!==u;return t&&clearTimeout(u),f(),u=null,o=!1,t},h},debounce:function(t,e,n){var r=null,i=null,o="boolean"==typeof n?{leading:n,trailing:!n}:Kt({leading:!1,trailing:!0},n),u=!1,a=null,c=o.leading,s=o.trailing,f=function(){r=null,i=null},l=function(){u=!0,t.apply(i,r),f()},d=function(){!0===c&&(a=null),u||!0!==s?f():l()},h=function(){u=!1,r=arguments,i=this,null===a?!0===c&&l():clearTimeout(a),a=setTimeout(d,e)};return h.cancel=function(){var t=null!==a;return t&&clearTimeout(a),f(),a=null,u=!1,t},h},delay:function(t,e){var n=De(arguments,2),r=this;return setTimeout(function(){t.apply(r,n)},e)},unserialize:ui,serialize:function(t){var e,n=[];return Ct(t,function(t,r){fe(t)||(e=Mt(t),Qt(t)||e?n=n.concat(ci(t,r,e)):n.push(ai(r)+"="+ai(Vt(t)?"":t)))}),n.join("&").replace(/%20/g,"+")},parseUrl:di,getBaseURL:function(){if(si){var t=si.pathname,e=An(t,"/")+1;return fi()+(e===t.length?t:t.substring(0,e))}return""},locat:function(){return si?di(si.href):{}},browse:function(){var t,e,n,r=!1,i=!1,o=!1,u={isNode:!1,isMobile:r,isPC:!1,isDoc:!!Rn};if($n||typeof process===se){n=Ei("Edge"),e=Ei("Chrome"),r=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),u.isDoc&&(t=Rn.body||Rn.documentElement,xt(["webkit","khtml","moz","ms","o"],function(e){u["-"+e]=!!t[e+"MatchesSelector"]}));try{i=bi($n.localStorage)}catch(t){}try{o=bi($n.sessionStorage)}catch(t){}Kt(u,{edge:n,firefox:Ei("Firefox"),msie:!n&&u["-ms"],safari:!e&&!n&&Ei("Safari"),isMobile:r,isPC:!r,isLocalStorage:i,isSessionStorage:o})}else u.isNode=!0;return u},cookie:gi});let Si=!1;function Ni(t){if(!t)return null;const e=localStorage.getItem(t);if(!e)return null;try{return JSON.parse(e,(t,e)=>{if(e&&"string"==typeof e){const t=function(){return e.replace("TT_FUNCTION","")};return e.includes("TT_FUNCTION")?t():e}return e})}catch{return e}}function Oi(t,e="12",n="Microsoft YaHei,Arial,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'"){let r=0;const i=document.createElement("canvas").getContext("2d");return i&&(i.font=`${e} ${n}`,r=i.measureText(t).width),r}function Di(t,e,n){const r=n?.excludeAll||[],i=n?.exclude||[];return r.includes("Id")||r.push("Id"),r.includes("rowId")||r.push("rowId"),Object.fromEntries(Object.entries(t).reduce((t,[o,u])=>(r.includes(o)||i.includes(o)||(u&&F(u)?Ai(n,e,u,o,t):u&&q(u)?xi(n,e,u,o,t):ji(n,e,u,o,t)),t),[]))}function Ai(t,e,n,r,i){const o=Di(n,e[r]||{},{excludeAll:t?.excludeAll,...t});Object.keys(o).length&&i.push([r,o])}function xi(t,e,n,r,i){const o=[],u=(t||{})[r]?.key;if(e[r]){const i=n?.length>=e[r]?.length?n:e[r],a=n?.length<e[r]?.length?n:e[r];u?i.forEach(e=>{const n=a.find(t=>t[u]===e[u]);if(n){const i=Di(e,n,{excludeAll:t?.excludeAll,...t[r]});Object.keys(i).length&&o.push({[u]:n[u],...i})}else o.push(e)}):i.forEach((e,n)=>{const r=a[n];if(F(e)&&!F(r)||q(e)&&!q(r)||typeof e!=typeof r||!r)o.push(e);else if(F(e)||q(e)){const n=Di(e,r,{excludeAll:t?.excludeAll});Object.keys(n).length&&o.push({...n})}else e!==r&&o.push(e)})}else o.push(...n);o.length&&i.push([r,o])}function ji(t,e,n,r,i){const o=t?.notNullToFalse||[];if("string"==typeof n&&"number"==typeof e[r]||"number"==typeof n&&"string"==typeof e[r])Number(n)!==Number(e[r])&&i.push([r,n]);else if([void 0,null,""].includes(n))[void 0,null,""].includes(e[r])||i.push([r,n]);else if(n!==e[r]){if(!1===n&&[void 0,null,""].includes(e[r])&&!o.includes(r))return;i.push([r,n])}}function Ti(t,e,n){const r={},i=["rowId","row_id"],o=n?.excludeAll||[],u=n?.exclude||[];for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&![...o,...i].includes(a)&&![...u,...i].includes(a)){const i=t[a],u=e[a];if(Array.isArray(u)&&Array.isArray(i)){(i.length!==u.length||i.some((t,e)=>"object"==typeof t&&"object"==typeof u[e]?Object.keys(Ti(t,u[e],{excludeAll:o,...n?.[a]})).length>0:t!==u[e]))&&(r[a]=u)}else if("object"==typeof u&&"object"==typeof i&&null!==u&&null!==i){const t=Ti(i,u,{excludeAll:o,...n?.[a]});Object.keys(t).length>0&&(r[a]=t)}else i!==u&&String(i)!==String(u)&&(r[a]=u)}return r}function Mi(t={},e={}){let n;for(n in e)t[n]=F(t[n])?Mi(t[n],e[n]):t[n]=e[n];return t}function ki(t,e="px"){return qt.isNumber(t)||/^\d+$/.test(`${t}`)?`${t}${e}`:`${t||""}`}function Ii(t,e,n){return o({get:()=>new Proxy(t[e],{set:(t,r,i)=>(n(`update:${e}`,{...t,[r]:i}),!0)}),set(t){n(`update:${e}`,t)}})}function Ci(t){const e=Object.getPrototypeOf(t);if(!e||e===Object.prototype)return t;const n=Object.getOwnPropertyNames(e);for(const e of n){const n=t[e];"constructor"!==e&&"function"==typeof n&&(t[e]=n.bind(t))}return t}function Pi(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);if(Array.isArray(t))return t.map(t=>Pi(t));const e={};return Object.keys(t).forEach(n=>{e[n]=Pi(t[n])}),e}function Fi(t,e="id",n="parentId",r="children"){const i=new Map,o=[];return t.forEach(t=>{i.set(t[e],{...t,[r]:[]})}),t.forEach(t=>{const u=i.get(t[e]);if(t[n]){const e=i.get(t[n]);e&&e[r].push(u)}else o.push(u)}),o}function Ri(...t){for(const e of t)if(null!=e)return e}function $i(...t){return u(a(t))}function Wi(){const t=new Event("resize");window.dispatchEvent(t)}function _i(t,e,n="prop",r="content"){t.forEach(t=>{Object.prototype.hasOwnProperty.call(t,n)&&(q(r)?r.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=e[t[n]])}):Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=e[t[n]]))})}const Ui=function(t,e="YYYY-MM-DD HH:mm:ss",n="Asia/Shanghai"){return""===t||null==t||0===t||"0"===t?"":r(t).isValid()?(Si||(r.extend(s),r.extend(f),Si=!0),r(t).tz(n).format(e)):""};function zi(t){return c(t)}function Hi(t,e){return t?e&&0!==e.length?e.reduce((t,e)=>(delete t[e],t),{...t}):t:{}}function Li(t,e=200,n={}){const{leading:r=!1,trailing:i=!0,maxWait:o}=n;let u,a,c,s,f,l=0;function d(e){const n=s;return s=void 0,l=e,f=t(...n),f}function h(){void 0!==u&&(window.clearTimeout(u),u=void 0),void 0!==a&&(window.clearTimeout(a),a=void 0)}function p(){h(),l=0,s=void 0,c=void 0,f=void 0}function g(t){if(void 0===c)return!0;const n=t-c;return n>=e||n<0||void 0!==o&&t-l>=o}function m(){const t=Date.now();if(g(t))return void function(t){u=void 0,i&&void 0!==s?d(t):s=void 0}(t);const n=function(t){const n=t-l,r=e-(t-c);return void 0!==o?Math.min(r,o-n):r}(t);u=n>0?window.setTimeout(m,n):void 0}function v(){const t=Date.now();h(),void 0!==s&&d(t)}const y=(...t)=>{const n=Date.now(),i=g(n);if(s=t??[],c=n,i){if(void 0===u)return function(t){return l=t,h(),u=window.setTimeout(m,e),void 0!==o&&(a=window.setTimeout(v,o)),r?d(t):f}(n);if(void 0!==o)return h(),u=window.setTimeout(m,e),a=window.setTimeout(v,o),r?d(n):f}return void 0===u&&(u=window.setTimeout(m,e),void 0!==o&&(a=window.setTimeout(v,o))),f};return y.isPending=()=>void 0!==u||void 0!==a,y.cancel=()=>{p()},y.flush=(...e)=>{if(!y.isPending())return e.length>0?t(...e):f;const n=void 0!==s?s:e;return p(),t(...n)},y}function Ki(t,...e){let n=[];const r=e[e.length-1];return e.length>0&&Array.isArray(r)&&r.every(t=>["string","number","symbol"].includes(typeof t))&&(n=e.pop()),l((t,e,r)=>n.includes(e)||Array.isArray(t[e])&&Array.isArray(r)?(t[e]=r,!0):void 0)(t,...e)}function qi(...t){let e=new d(t[0]??0);for(let n=1;n<t.length;n++)e=e.add(new d(t[n]??0));return e.toNumber()}function Bi(...t){let e=new d(t[0]??0);for(let n=1;n<t.length;n++)e=e.sub(new d(t[n]??0));return e.toNumber()}function Zi(...t){let e=new d(t[0]??0);for(let n=1;n<t.length;n++)e=e.mul(new d(t[n]??0));return e.toNumber()}function Yi(...t){let e=new d(t[0]??0);for(let n=1;n<t.length;n++)e=e.div(new d(t[n]??0));return e.toNumber()}function Ji(...t){return t.reduce((t,e)=>Qi(t??0).add(e??0).toNumber(),0)}function Vi(t,e){return t.reduce((t,n)=>Qi(t??0).add(e(n)??0).toNumber(),0)}function Gi(t,e,n){const r={},i=n;return t.forEach(t=>{const n=e(t);if(n){const e=i(t);r[n]=Qi(r[n]||0).add(e).toNumber()}}),r}function Qi(t){const e=Number(t)||0===t,n=Number.isNaN(Number(t)),r=new d(t);if(e&&!n)return r;console.error("请输入合理数字!");return new d(Number.NaN)}class Xi{condition=!1;promiseResolvers=null;isConditionTrue(){return this.condition}reset(){this.condition=!1,this.clearPromises()}setConditionFalse(){this.condition=!1,this.promiseResolvers&&(this.promiseResolvers.reject(),this.clearPromises())}setConditionTrue(){this.condition=!0,this.promiseResolvers&&(this.promiseResolvers.resolve(),this.clearPromises())}waitForCondition(){if(this.condition)return Promise.resolve();const{promise:t,resolve:e,reject:n}=Promise.withResolvers();return this.promiseResolvers={resolve:e,reject:n},t}clearPromises(){this.promiseResolvers=null}}class to{condition=!1;rejectCondition=null;resolveCondition=null;isConditionTrue(){return this.condition}reset(){this.condition=!1,this.clearPromises()}setConditionFalse(){this.condition=!1,this.rejectCondition&&(this.rejectCondition(),this.clearPromises())}setConditionTrue(){this.condition=!0,this.resolveCondition&&(this.resolveCondition(),this.clearPromises())}waitForCondition(){return new Promise((t,e)=>{this.condition?t():(this.resolveCondition=t,this.rejectCondition=e)})}clearPromises(){this.resolveCondition=null,this.rejectCondition=null}}const eo=!0,no=25200,ro={key:"_11111000001111@",iv:"@11111000001111_"};class io{key;iv;constructor(t={}){const{key:e,iv:n}=t;e&&(this.key=m?.(e)),n&&(this.iv=m?.(n))}get getOptions(){return{mode:v,padding:y,iv:this.iv}}encryptByAES(t){return h(t,this.key,this.getOptions).toString()}decryptByAES(t){return p(t,this.key,this.getOptions).toString(g)}}function oo({prefixKey:t="",storage:e=sessionStorage,key:n=ro.key,iv:r=ro.iv,timeout:i=null,hasEncrypt:o=!0}={}){if(o&&[n.length,r.length].some(t=>16!==t))throw new Error("When hasEncrypt is true, the key or iv must be 16 bits!");const u=new io({key:n,iv:r});return new class{storage;prefixKey;encryption;hasEncrypt;constructor(){this.storage=e,this.prefixKey=t,this.encryption=u,this.hasEncrypt=o}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,e,n=i){const r=JSON.stringify({value:e,time:Date.now(),expire:P(n)?null:(new Date).getTime()+1e3*n}),o=this.hasEncrypt?this.encryption.encryptByAES(r):r;this.storage.setItem(this.getKey(t),o)}get(t,e=null){const n=this.storage.getItem(this.getKey(t));if(!n)return e;try{const e=this.hasEncrypt?this.encryption.decryptByAES(n):n,r=JSON.parse(e),{value:i,expire:o}=r;if(P(o)||o>=(new Date).getTime())return i;this.remove(t)}catch(t){return console.error(`get erroe:${t}`),e}}remove(t){this.storage.removeItem(this.getKey(t))}getKeysWithPrefix(t){const e=[];for(let n=0;n<this.storage.length;n++){const r=this.storage.key(n);r&&r.startsWith(t)&&e.push(r)}return e}getKeysWithPrefixExcluding(t,e){const n=[];for(let r=0;r<this.storage.length;r++){const i=this.storage.key(r);i&&i.startsWith(t)&&!e.has(i)&&n.push(i)}return n}removeKeys(t){t.forEach(t=>{this.storage.removeItem(t)})}clear(t){const e=(this.prefixKey||"").toUpperCase();if(!t)return void this.removeKeys(this.getKeysWithPrefix(e));const{keys:n,exclude:r}=t;if(n&&n.length>0)n.forEach(t=>{this.remove(t)});else{if(r&&r.length>0){const t=new Set(r.map(t=>this.getKey(t)));return void this.removeKeys(this.getKeysWithPrefixExcluding(e,t))}this.removeKeys(this.getKeysWithPrefix(e))}}}}function uo(t=sessionStorage,e={}){return oo(function(t,e={}){return{hasEncrypt:eo,storage:t,prefixKey:"tt-admin",...e}}(t,e))}function ao(t={}){return uo(sessionStorage,{...t,timeout:no})}function co(t={}){return uo(localStorage,{...t,timeout:no})}function so(t,e,n,r){if(!t)return!1;const i=t.split(".").map(t=>Number(t));if(i.length<2)return!1;const o=i[0],u=i[1],a=i[2];return o>e||!(o<e)&&(u>n||!(u<n)&&(void 0===r||(a??0)>=r))}function fo(t,e,n){const r=w(t);return e?n?.forEach(t=>{const e=r[t];Array.isArray(e)&&(r[t]=r[t].join(","))}):Object.entries(r).forEach(([t,e])=>{Array.isArray(e)&&!n?.includes(t)&&(r[t]=e.join(","))}),r}function lo(t,e,n){const r=w(t);return e?n?.forEach(t=>{const e=r[t];"string"==typeof e&&(r[t]=""===e?[]:e.split(","))}):Object.entries(r).forEach(([t,e])=>{"string"!=typeof e||n?.includes(t)||(r[t]=""===e?[]:e.split(","))}),r}const ho=new Set(["*","all","ALL","All"]);function po(t,e,n){let{vk:r,ck:i}=n||{};const{labelField:o,valueField:u,hasDefault:a=!0}=n||{};r=r||o||"label",i=i||u||"value","number"==typeof e&&(e=e.toString());let c=[e];Array.isArray(e)?c=e:z(e)&&(c=e?.split(","));const s=t=>a?t:void 0;return c?.map(e=>ho.has(String(e))?"全部":Array.isArray(t)?t?.find(t=>t[i]==e)?.[r]??s(e):t?.[e]??s(e))?.join()}const go=(t=[])=>{let e=[];return e=t.filter(t=>Boolean(Object.values(t).filter(Boolean).length)),e.length?e:void 0},mo=(t,e=",")=>Array.isArray(t)?t:t?.split(e).filter(Boolean)??[],vo=(t=[])=>t.filter(Boolean),yo=(t,e)=>t()?e:[],wo=(t,e=",")=>Array.isArray(t)?t.join(e):t;export{po as CODE_TO_VALUE,no as DEFAULT_CACHE_TIME,vo as FILTER_BOOLEAN,go as FILTER_EMPTY,yo as GET_LIST_BY_FUNC,wo as JOIN_BY_SEPARATOR,mo as SPLIT_BY_SEPARATOR,Xi as StateHandler,to as StateHandlerOld,yt as TtHttp,qi as add,_i as arrGive,Fi as arrayToTree,Ci as bindMethods,ro as cacheCipher,Qi as calc,Oi as calcWordsWidth,b as capitalize,so as checkVersion,$i as clnm,zi as cloneDeep,Gi as clsSumTotalBy,Ti as compareObjects,oo as create,co as createLocalStorage,ao as createSessionStorage,uo as createStorage,Ui as dateFormat,Li as debounce,Pi as deepCopy,Mi as deepMerge,Yi as divide,N as downloadFile,eo as enableStorageEncryption,Ot as extractIdFromTitle,bt as extractResourceFromApi,fo as formatFormData,Nt as generateFormName,Et as generateTestId,ut as getBrowserType,ot as getDeviceType,Di as getDifference,Ri as getFirstNonNullOrUndefined,Ni as getStorage,M as is,ct as isAndroid,q as isArray,L as isBoolean,V as isClient,W as isDate,dt as isDayjsObject,k as isDef,Z as isElement,R as isEmpty,$ as isEmptyZero,tt as isError,ft as isExternal,rt as isFalse,ht as isFormData,H as isFunction,at as isIos,lt as isJson,Y as isMap,C as isNull,P as isNullOrUnDef,_ as isNumber,F as isObject,st as isPC,X as isPrimitive,U as isPromise,K as isRegExp,J as isServer,nt as isSet,z as isString,Q as isStringNumber,et as isSymbol,it as isTrue,I as isUndefined,G as isUrl,Dt as isValidTestId,B as isWindow,S as kebabToCamelCase,Ki as mergeWithArrayOverride,Zi as multiply,Hi as omit,lo as revertFormatFormData,xi as setDifferenceArr,ji as setDifferenceField,Ai as setDifferenceObj,Bi as subtract,Ji as sumTotal,Vi as sumTotalBy,ki as toCssUnit,St as toKebabCase,Wi as triggerWindowResize,E as trim,Ii as useVModel,wt as withInstall};
1
+ import t from"axios";import{ElMessage as e,ElLoading as n}from"element-plus";import r from"dayjs";import{nextTick as o,computed as i}from"vue";import u from"numeral";import{twMerge as a}from"tailwind-merge";import{clsx as c}from"clsx";import{klona as s}from"klona/full";import f from"dayjs/plugin/utc";import l from"dayjs/plugin/timezone";import{createDefu as d}from"defu";export{createDefu as createMerge,defuFn as mergFn,defu as merge}from"defu";import h from"decimal.js";import{encrypt as p,decrypt as g}from"crypto-js/aes";import m,{parse as v}from"crypto-js/enc-utf8";import y from"crypto-js/mode-ecb";import w from"crypto-js/pad-pkcs7";import{cloneDeep as b}from"lodash-es";function E(t){return t.charAt(0).toUpperCase()+t.slice(1)}function S(t){return t.trim()}function N(t){return t.replace(/-(\w)/g,(t,e)=>e?e.toUpperCase():"")}const O=(t,e)=>{try{const n=new Blob([t.data],{type:e}),r=document.createElement("a"),o=(window.URL||window.webkitURL).createObjectURL(n);r.href=o;let i=((t.headers["content-disposition"]||"").split("=")||[]).at(-1)||"";i=i?decodeURI(i.replace(/"/g,"")):"";const u=i?.split("''");i=u.at(-1)||"",r.download=i,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(o)}catch(t){console.log(t)}};var D,A;!function(t){t[t.success=200]="success",t[t.success1=0]="success1",t[t.error=400]="error",t[t.unauthorized=401]="unauthorized",t[t.forbidden=403]="forbidden",t[t.notFound=404]="notFound",t[t.methodNotAllowed=405]="methodNotAllowed",t[t.requestTimeout=408]="requestTimeout",t[t.internalServerError=500]="internalServerError",t[t.notImplemented=501]="notImplemented",t[t.badGateway=502]="badGateway",t[t.serviceUnavailable=503]="serviceUnavailable",t[t.gatewayTimeout=504]="gatewayTimeout",t[t.httpVersionNotSupported=505]="httpVersionNotSupported",t[t.NEED_REFRESH_TOKEN=1001]="NEED_REFRESH_TOKEN",t[t.API_NO_AUTH=1002]="API_NO_AUTH",t[t.INVALID_TOKEN=1005]="INVALID_TOKEN"}(D||(D={})),function(t){t.badGateway="网关错误,请稍后重试",t.forbidden="禁止访问该资源",t.gatewayTimeout="网关超时,请稍后重试",t.internalServerError="服务器内部错误,请稍后重试",t.methodNotAllowed="请求方法不允许",t.networkError="网络连接异常,请检查网络连接",t.notFound="请求的资源不存在",t.requestCancelled="请求已取消",t.requestConfigError="请求配置错误",t.requestFailed="请求失败",t.requestTimeout="请求超时,请稍后重试",t.serviceUnavailable="服务暂时不可用,请稍后重试",t.unauthorized="未授权访问,请重新登录"}(A||(A={}));class x extends Error{code;data;timestamp;url;method;constructor(t,e,n){super(t),this.name="HttpError",this.code=e,this.data=n?.data,this.timestamp=(new Date).toISOString(),this.url=n?.url||"",this.method=n?.method||""}toLogData(){return{code:this.code,message:this.message,data:this.data,timestamp:this.timestamp,url:this.url||"",method:this.method||"",stack:this.stack||""}}}function j(t){if("ERR_CANCELED"===t.code)throw console.warn("Request cancelled:",t.message),new x(A.requestCancelled,D.error);const e=t.response?.status,n=t.response?.data?.msg||t.message,r=t.config;if(!t.response)throw new x(A.networkError,D.error,{url:r?.url||"",method:r?.method?.toUpperCase()||""});const o=e?(i=e,{[D.unauthorized]:A.unauthorized,[D.forbidden]:A.forbidden,[D.notFound]:A.notFound,[D.methodNotAllowed]:A.methodNotAllowed,[D.requestTimeout]:A.requestTimeout,[D.internalServerError]:A.internalServerError,[D.badGateway]:A.badGateway,[D.serviceUnavailable]:A.serviceUnavailable,[D.gatewayTimeout]:A.gatewayTimeout}[i]||A.internalServerError):n||A.requestFailed;var i;throw new x(o,e||D.error,{data:t.response.data,url:r?.url||"",method:r?.method?.toUpperCase()||""})}function T(t,n=!0){n&&e.error(t.message),console.error("[HTTP Error]",t.toLogData())}const M=Object.prototype.toString;function k(t,e){return M.call(t)===`[object ${e}]`}function I(t){return void 0!==t}function C(t){return!I(t)}function F(t){return null===t}function P(t){return C(t)||F(t)}function R(t){return!P(t)&&(t instanceof Promise||k(t,"Object"))}function $(t){return!!P(t)||(q(t)||z(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:!!R(t)&&0===Object.keys(t).length)}function W(t){return!!$(t)||(0===t||!!z(t)&&("0"===t||"undefined"===t||"null"===t))}function _(t){return k(t,"Date")}function U(t){return k(t,"Number")&&t==t}function H(t){return k(t,"Promise")&&R(t)&&L(t.then)&&L(t.catch)}function z(t){return k(t,"String")}function L(t){return"function"==typeof t}function K(t){return k(t,"Boolean")}function B(t){return k(t,"RegExp")}function q(t){return Array.isArray(t)}function Y(t){return"undefined"!=typeof window&&k(t,"Window")}function Z(t){return"undefined"!=typeof Element&&t instanceof Element}function V(t){return k(t,"Map")}const J="undefined"==typeof window,G=!J;function Q(t){return/(?:^https?:(?:\/\/)?(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)(?:\/[+~%/.\w-]*)?\??[-+=&;%@.\w]*(?:#\w*)?$/.test(t)}function X(t){return!!z(t)&&!Number.isNaN(Number(t))}function tt(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function et(t){return"Error"===Object.prototype.toString.call(t).slice(8,-1)}function nt(t){return"Symbol"===Object.prototype.toString.call(t).slice(8,-1)}function rt(t){return"Set"===Object.prototype.toString.call(t).slice(8,-1)}function ot(t){return!t||t===F(t)||t===C(t)||!1===t||t===Number.isNaN(t)||!(!q(t)||0!==t.length)}function it(t){return!ot(t)}function ut(){const t=navigator.userAgent;return t.includes("Android")||t.includes("Linux")?"Android":t.includes("iPhone")?"iPhone":t.includes("iPad")?"iPad":t.includes("Windows Phone")?"Windows Phone":t}function at(){const t=navigator.userAgent;return function(t){const e=t.includes("Opera");return t.includes("compatible")&&t.includes("MSIE")&&!e}(t)?function(t){const e=/MSIE (\d+\.\d+);/,n=t.match(e),r=n?Number.parseFloat(n[1]||"0"):0;return 7===r?"IE7":8===r?"IE8":9===r?"IE9":10===r?"IE10":"IE7以下"}(t):function(t){return t.includes("Trident")&&t.includes("rv:11.0")}(t)?"IE11":function(t){const e=t.includes("compatible")&&t.includes("MSIE");return t.includes("Edge")&&!e}(t)?"Edge":function(t){return t.includes("Firefox")}(t)?"FF":function(t){return t.includes("Opera")}(t)?"Opera":function(t){return t.includes("Safari")&&!t.includes("Chrome")}(t)?"Safari":function(t){return t.includes("Chrome")&&t.includes("Safari")}(t)?"Chrome":""}function ct(){return"iPhone"===ut()}function st(){return"Android"===ut()}function ft(){const t=navigator.userAgent,e=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];let n=!0;for(let r=0;r<e.length;r++){const o=e[r];if(o&&t.indexOf(o)>0){n=!1;break}}return n}function lt(t){return/^(?:https?:|mailto:|tel:|\/\/)/.test(t)}function dt(t){if("string"==typeof t)try{const e=JSON.parse(t);return!("object"!=typeof e||!e)}catch(t){return console.error(`error:${t}`),!1}return!1}function ht(t){return r.isDayjs(t)}function pt(t){return k(t,"FormData")}const gt=()=>document.documentElement.classList.contains("dark")?"rgba(7, 7, 7, 0.85)":"rgba(255, 255, 255, 0.5)",mt={lock:!0,get background(){return gt()},svg:'\n <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <style>\n .spinner {\n transform-origin: 20px 20px;\n animation: rotate 1.6s linear infinite;\n }\n .dot {\n fill: var(--theme-color);\n animation: fade 1.6s infinite;\n }\n .dot:nth-child(1) { animation-delay: 0s; }\n .dot:nth-child(2) { animation-delay: 0.5s; }\n .dot:nth-child(3) { animation-delay: 1s; }\n .dot:nth-child(4) { animation-delay: 1.5s; }\n @keyframes rotate {\n 100% { transform: rotate(360deg); }\n }\n @keyframes fade {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n </style>\n <g class="spinner">\n <circle class="dot" cx="20" cy="8" r="4"/>\n <circle class="dot" cx="32" cy="20" r="4"/>\n <circle class="dot" cx="20" cy="32" r="4"/>\n <circle class="dot" cx="8" cy="20" r="4"/>\n </g>\n </svg>\n',svgViewBox:"0 0 40 40",customClass:"art-loading-fix"};let vt=null;const yt={showLoading(){if(!vt){const t=document.querySelector("#app-content"),e={...mt,background:gt(),...t?{target:t,fullscreen:!1}:{fullscreen:!0}};vt=n.service(e)}return()=>this.hideLoading()},hideLoading(){vt&&(vt.close(),vt=null)}};function wt(n){const{router:r,useUserStore:i,VITE_API_URL:u,VITE_WITH_CREDENTIALS:a}=n;let c=!1;const s=["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"];let f=0;function l(){setTimeout(()=>{f--,0===f&&c&&o(()=>{yt.hideLoading(),c=!1})},0)}let d=!1,h=null;const p=t.create({timeout:6e5,baseURL:"/"+u,withCredentials:"true"===a,validateStatus:t=>t>=200&&t<300,transformResponse:[(t,e)=>{const n=e["content-type"];if(n?.includes("application/json"))try{return JSON.parse(t)}catch{return t}return t}]});function g(t,e="start"){if("string"!=typeof t||!t.trim())return"string"==typeof t?t.trim():t;const n=t.trim();if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(n))return n;const r="end"===e?"59":"00";return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(n)?`${n}:${r}`:/^\d{4}-\d{2}-\d{2} \d{2}$/.test(n)?`${n}:${r}:${r}`:/^\d{4}-\d{2}-\d{2}$/.test(n)?"end"===e?`${n} 23:59:59`:`${n} 00:00:00`:n}function m(t){if("string"==typeof t)return t.trim();if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>m(t));const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];n.includes("DtRange")&&Array.isArray(r)&&2===r.length?e[n]={startDate:m(r[0]),endDate:m(r[1])}:n.includes("TmRange")&&Array.isArray(r)&&2===r.length?e[n]={startTime:g(r[0],"start"),endTime:g(r[1],"end")}:e[n]="startTime"===n?g(r,"start"):"endTime"===n?g(r,"end"):m(r)}return e}function v(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>v(t));const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];n.includes("DtRange")&&"object"==typeof r&&null!==r&&"startDate"in r&&"endDate"in r?e[n]=[r.startDate,r.endDate]:n.includes("TmRange")&&"object"==typeof r&&null!==r&&"startTime"in r&&"endTime"in r?e[n]=[r.startTime,r.endTime]:e[n]=v(r)}return e}function y(t,e){return new x(t,e)}function w(t){const e=y(t||A.unauthorized,D.unauthorized);if(!d)throw d=!0,E(),h=setTimeout(b,3e3),T(e,!0),e;throw e}function b(){d=!1,h&&clearTimeout(h),h=null}p.interceptors.request.use(t=>{const{accessToken:e,info:n}=i();return e&&(t.headers.set("Authorization",e),t.headers.set("token",e),t.headers.set("x-userid-header",n.userId),t.headers.set("x-permission-code-header",r.currentRoute.value.meta.permissionOnlyCode),t.headers.set("a-path-code",r.currentRoute.value.path)),t.hideLoading||0!==f||(c=!0,yt.showLoading()),f++,t.params&&(t.params=m(t.params)),!t.data||pt(t.data)||t.headers["Content-Type"]||(t.data=m(t.data),t.headers.set("Content-Type","application/json"),t.data=JSON.stringify(t.data)),t},t=>(T(y(A.requestConfigError,D.error)),Promise.reject(t))),p.interceptors.response.use(async t=>{l(),await async function(t){const e=t.data;if(!(e instanceof Blob))return;const n=String(t.headers["content-type"]||""),r=e.type||"";if(n.includes("application/json")||r.includes("application/json"))try{const n=await e.text();t.data=JSON.parse(n)}catch{throw y(A.requestFailed,D.error)}}(t);const e=t.headers["content-type"];if(e?.includes("application/json")){t.data&&(t.data=v(t.data));const{code:e,msg:n}=t.data;if([D.success,D.success1].includes(e))return t;throw[D.unauthorized,D.INVALID_TOKEN].includes(e)&&w(n),y(n||A.requestFailed,e)}if(s.includes(e))return O(t,e),t},t=>(l(),t.response?.status===D.unauthorized&&w(),Promise.reject(j(t))));const E=()=>{setTimeout(()=>{i().logOut()},500)};async function S(t,n=0){try{return await async function(t){["POST","PUT","PATCH"].includes(t.method?.toUpperCase()||"")&&t.params&&!t.data&&(t.data=t.params,t.params=void 0);try{const n=await p.request(t);return t.showSuccessMessage&&n.data.msg&&function(t,n=!0){n&&e.success(t)}(n.data.msg),t.responseAllData?n:n.data.data}catch(e){const n=[D.unauthorized,D.NEED_REFRESH_TOKEN].includes(e.code);if(e instanceof x&&!n){T(e,!1!==t.showErrorMessage)}return Promise.reject(e)}}(t)}catch(e){if(e instanceof x&&[D.NEED_REFRESH_TOKEN].includes(e.code)&&!t.url?.includes("/iam/user/refreshToken"))return await i().refreshTokenFunc(),await N(1e3),S(t,n-1);if(n>0&&e instanceof x&&(r=e.code,[D.requestTimeout,D.internalServerError,D.badGateway,D.serviceUnavailable,D.gatewayTimeout].includes(r)))return await N(1e3),S(t,n-1);throw e}var r}function N(t){return new Promise(e=>setTimeout(e,t))}const M={get:t=>S({...t,method:"GET"}),post:t=>S({...t,method:"POST"}),put:t=>S({...t,method:"PUT"}),del:t=>S({...t,method:"DELETE"}),patch:t=>S({...t,method:"PATCH"}),request:t=>S(t)};return{...M,logOut:E,setBaseUrl:t=>{p.defaults.baseURL=t}}}function bt(t,e){if(t.install=n=>{for(const r of[t,...Object.values(e??{})]){const t=r.name;t&&n.component(t,r)}},e)for(const[n,r]of Object.entries(e))t[n]=r;return t}const Et="0,0.00";function St(t,e=Et){return t?u(t).format(e):"0.00"}function Nt(t,e=Et){return t?u(t).format(e):"0.00"}function Ot(t){return t?u(u(t).format(Et)).value():0}function Dt(t,e){if(P(t)||""===t)return"";let n=Number.parseFloat(t.toString());if(Number.isNaN(n))return"";n=Math.round(n*10**e)/10**e;let r=n.toString(),o=r.indexOf(".");for(o<0&&(o=r.length,r+=".");r.length<=o+e;)r+="0";return r}function At(t,e=2){if(P(t)||0===t)return"0 Bytes";const n=Math.floor(Math.log(t)/Math.log(1e3));return`${Number.parseFloat((t/1e3**n).toFixed(e))} ${["B","KB","MB","GB","TB","PB","EB","ZB","YB"][n]}`}function xt(t,e="period"){if(!t)return"";const n=(U(t)?t.toString():t).replace(/[-.]/g,""),r=n.slice(0,4),o=n.slice(4,6);return"period"===e?`${r}年${o}期`:` ${o}/${r}`}function jt(t,e="YYYY-MM-DD HH:mm:ss"){return P(t)?"--":r(t).isValid()?r(t).format(e):"--"}function Tt(t,e="YYYY-MM-DD",n=!1){return P(t)?"--":n?t?r(+t).format(e):"--":r(t).isValid()?r(t).format(e):"--"}function Mt(t){if("string"==typeof t)return t.trim();if("function"==typeof t){return(t.name||"").replace(/^bound\s+/i,"")}return""}function kt(...t){return t.filter(t=>null!=t&&""!==t).join("-")}function It(t){return t?t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/[\s_]+/g,"-").replace(/[^\w\u4E00-\u9FA5-]+/g,"-").toLowerCase().replace(/^-+|-+$/g,"").replace(/-+/g,"-"):""}function Ct(t,e=3){if(!t||0===t.length)return"form";const n=t.filter(t=>null!=t&&""!==t).slice(0,e);return 0===n.length?"form":n.join("-")}function Ft(t){return t?It(t):""}function Pt(t){if(!t)return!1;return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(t)}var Rt={keyId:1,cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};function $t(t,e,n){if(t)if(t.forEach)t.forEach(e,n);else for(var r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)}var Wt=Object.prototype.toString;function _t(t){return function(e){return"[object "+t+"]"===Wt.call(e)}}var Ut=Array.isArray||_t("Array");function Ht(t,e){return!(!t||!t.hasOwnProperty)&&t.hasOwnProperty(e)}function zt(t,e,n){if(t)for(var r in t)Ht(t,r)&&e.call(n,t[r],r,t)}function Lt(t,e,n){return t?(Ut(t)?$t:zt)(t,e,n):t}function Kt(t){return function(e){return typeof e===t}}var Bt=Kt("function");function qt(t,e){var n=Object[t];return function(t){var r=[];if(t){if(n)return n(t);Lt(t,e>1?function(e){r.push([""+e,t[e]])}:function(){r.push(arguments[e])})}return r}}var Yt=qt("keys",1);function Zt(t,e){var n=t.__proto__.constructor;return e?new n(e):new n}function Vt(t,e){return e?Jt(t,e):t}function Jt(t,e){if(t)switch(Wt.call(t)){case"[object Object]":var n=Object.create(Object.getPrototypeOf(t));return zt(t,function(t,r){n[r]=Vt(t,e)}),n;case"[object Date]":case"[object RegExp]":return Zt(t,t.valueOf());case"[object Array]":case"[object Arguments]":var r=[];return $t(t,function(t){r.push(Vt(t,e))}),r;case"[object Set]":var o=Zt(t);return o.forEach(function(t){o.add(Vt(t,e))}),o;case"[object Map]":var i=Zt(t);return i.forEach(function(t,n){i.set(n,Vt(t,e))}),i}return t}function Gt(t,e){return t?Jt(t,e):t}var Qt=Object.assign;function Xt(t,e,n){for(var r,o=e.length,i=1;i<o;i++)r=e[i],$t(Yt(e[i]),n?function(e){t[e]=Gt(r[e],n)}:function(e){t[e]=r[e]});return t}var te=function(t){if(t){var e=arguments;if(!0!==t)return Qt?Qt.apply(Object,e):Xt(t,e);if(e.length>1)return Xt(t=Ut(t[1])?[]:{},e,!0)}return t},ee=function(){};function ne(t){return te(Rt,t)}var re="4.0.0";function oe(t,e,n){for(var r=t.length-1;r>=0;r--)e.call(n,t[r],r,t)}function ie(t,e,n){oe(Yt(t),function(r){e.call(n,t[r],r,t)})}function ue(t){return null===t}function ae(t,e){return function(n){return ue(n)?e:n[t]}}function ce(t){return!!t&&t.constructor===Object}function se(t){return"__proto__"!==t&&"constructor"!==t}function fe(t,e){return ce(t)&&ce(e)||Ut(t)&&Ut(e)?(Lt(e,function(n,r){se(r)&&(t[r]=Bt(e)?n:fe(t[r],n))}),t):e}ee.VERSION=re,ee.version=re,ee.mixin=function(){$t(arguments,function(t){Lt(t,function(t,e){ee[e]=Bt(t)?function(){var e=t.apply(ee.$context,arguments);return ee.$context=null,e}:t})})},ee.setup=ne,ee.setConfig=ne,ee.getConfig=function(){return Rt};function le(t,e,n){var r=[];if(t&&arguments.length>1){if(t.map)return t.map(e,n);Lt(t,function(){r.push(e.apply(n,arguments))})}return r}function de(t,e,n,r,o){return function(i,u,a){if(i&&u){if(t&&i[t])return i[t](u,a);if(e&&Ut(i)){for(var c=0,s=i.length;c<s;c++)if(!!u.call(a,i[c],c,i)===r)return[!0,!1,c,i[c]][n]}else for(var f in i)if(Ht(i,f)&&!!u.call(a,i[f],f,i)===r)return[!0,!1,f,i[f]][n]}return o}}var he=de("some",1,0,!0,!1),pe=de("every",1,1,!1,!0);function ge(t,e){if(t){if(t.includes)return t.includes(e);for(var n in t)if(Ht(t,n)&&e===t[n])return!0}return!1}function me(t,e){var n,r=0;if(Ut(t)&&Ut(e)){for(n=e.length;r<n;r++)if(!ge(t,e[r]))return!1;return!0}return ge(t,e)}function ve(t,e,n){var r=[];if(e){Bt(e)||(e=ae(e));var o,i={};Lt(t,function(u,a){o=e.call(n,u,a,t),i[o]||(i[o]=1,r.push(u))})}else Lt(t,function(t){ge(r,t)||r.push(t)});return r}function ye(t){return le(t,function(t){return t})}var we="undefined",be=Kt(we);function Ee(t){return ue(t)||be(t)}var Se=/(.+)?\[(\d+)\]$/;function Ne(t){return t?t.splice&&t.join?t:(""+t).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function Oe(t,e,n){if(Ee(t))return n;var r=function(t,e){if(t){var n,r,o,i=0;if(t[e]||Ht(t,e))return t[e];if(o=(r=Ne(e)).length)for(n=t;i<o;i++)if(Ee(n=De(n,r[i])))return i===o-1?n:void 0;return n}}(t,e);return be(r)?n:r}function De(t,e){var n=e?e.match(Se):"";return n?n[1]?t[n[1]]?t[n[1]][n[2]]:void 0:t[n[2]]:t[e]}function Ae(t,e){return be(t)?1:ue(t)?be(e)?-1:1:t&&t.localeCompare?t.localeCompare(e):t>e?1:-1}function xe(t,e,n){return function(r,o){var i=r[t],u=o[t];return i===u?n?n(r,o):0:"desc"===e.order?Ae(u,i):Ae(i,u)}}function je(t,e,n){if(t){if(Ee(e))return ye(t).sort(Ae);for(var r,o=le(t,function(t){return{data:t}}),i=function(t,e,n,r){var o=[];return $t(n=Ut(n)?n:[n],function(n,i){if(n){var u,a=n;Ut(n)?(a=n[0],u=n[1]):ce(n)&&(a=n.field,u=n.order),o.push({field:a,order:u||"asc"}),$t(e,Bt(a)?function(e,n){e[i]=a.call(r,e.data,n,t)}:function(t){t[i]=a?Oe(t.data,a):t.data})}}),o}(t,o,e,n),u=i.length-1;u>=0;)r=xe(u,i[u],r),u--;return r&&(o=o.sort(r)),le(o,ae("data"))}return[]}var Te=je;function Me(t,e){return t>=e?t:(t|=0)+Math.round(Math.random()*((e||9)-t))}var ke=qt("values",0);function Ie(t){for(var e,n=[],r=ke(t),o=r.length-1;o>=0;o--)e=o>0?Me(0,o):0,n.push(r[e]),r.splice(e,1);return n}function Ce(t){return function(e){if(e){var n=t(e&&e.replace?e.replace(/,/g,""):e);if(!isNaN(n))return n}return 0}}var Fe=Ce(parseFloat);function Pe(t,e,n){var r=[],o=arguments.length;if(t){if(e=o>=2?Fe(e):0,n=o>=3?Fe(n):t.length,t.slice)return t.slice(e,n);for(;e<n;e++)r.push(t[e])}return r}var Re=de("",0,2,!0),$e=de("find",1,3,!0);function We(t,e){return le(t,ae(e))}function _e(t){return function(e,n){var r,o;return e&&e.length?($t(e,function(i,u){n&&(i=Bt(n)?n(i,u,e):Oe(i,n)),Ee(i)||!Ee(r)&&!t(r,i)||(o=u,r=i)}),e[o]):r}}var Ue=_e(function(t,e){return t<e});function He(t){var e,n,r,o=[];if(t&&t.length)for(e=0,r=(n=Ue(t,function(t){return t?t.length:0}))?n.length:0;e<r;e++)o.push(We(t,e));return o}function ze(t,e){var n=[];return $t(t,function(t){n=n.concat(Ut(t)?e?ze(t,e):t:[t])}),n}function Le(t,e){return(console[t]||console.log)(e)}function Ke(t,e){try{delete t[e]}catch(n){t[e]=void 0}}function Be(t,e,n){return t?(Ut(t)?oe:ie)(t,e,n):t}var qe=Kt("object");function Ye(t,e,n){if(t){var r,o=arguments.length>1&&(ue(e)||!qe(e)),i=o?n:e;if(ce(t))zt(t,o?function(n,r){t[r]=e}:function(e,n){Ke(t,n)}),i&&te(t,i);else if(Ut(t)){if(o)for(r=t.length;r>0;)r--,t[r]=e;else t.length=0;i&&t.push.apply(t,i)}}return t}function Ze(t,e,n){if(t){if(!Ee(e)){var r=[],o=[];return Bt(e)||(i=e,e=function(t,e){return e===i}),Lt(t,function(t,o,i){e.call(n,t,o,i)&&r.push(o)}),Ut(t)?Be(r,function(e,n){o.push(t[e]),t.splice(e,1)}):(o={},$t(r,function(e){o[e]=t[e],Ke(t,e)})),o}return Ye(t)}var i;return t}function Ve(t,e,n,r){var o=r.key,i=r.parentKey,u=r.children,a=r.data,c=r.updated,s=r.clear;return $t(n,function(n){var f=n[u];a&&(n=n[a]),!1!==c&&(n[i]=e?e[o]:null),t.push(n),f&&f.length&&Ve(t,n,f,r),s&&delete n[u]}),t}function Je(t){return function(e,n,r,o){var i=r||{},u=i.children||"children";return t(null,e,n,o,[],[],u,i)}}var Ge=Je(function t(e,n,r,o,i,u,a,c){var s,f,l,d,h,p;if(n)for(f=0,l=n.length;f<l;f++){if(s=n[f],d=i.concat([""+f]),h=u.concat([s]),r.call(o,s,f,n,d,e,h))return{index:f,item:s,path:d,items:n,parent:e,nodes:h};if(a&&s&&(p=t(s,s[a],r,o,d.concat([a]),h,a)))return p}});var Qe=Je(function t(e,n,r,o,i,u,a,c){var s,f;Lt(n,function(c,l){s=i.concat([""+l]),f=u.concat([c]),r.call(o,c,l,n,s,e,f),c&&a&&(s.push(a),t(c,c[a],r,o,s,f,a))})});var Xe=Je(function t(e,n,r,o,i,u,a,c){var s,f,l,d=c.mapChildren||a;return le(n,function(h,p){return s=i.concat([""+p]),f=u.concat([h]),(l=r.call(o,h,p,n,s,e,f))&&h&&a&&h[a]&&(l[d]=t(h,h[a],r,o,s,f,a,c)),l})});function tn(t,e,n,r,o,i,u,a,c){var s,f,l,d,h,p=[],g=c.original,m=c.data,v=c.mapChildren||a,y=c.isEvery;return $t(n,function(w,b){s=i.concat([""+b]),f=u.concat([w]),d=t&&!y||r.call(o,w,b,n,s,e,f),h=a&&w[a],d||h?(g?l=w:(l=te({},w),m&&(l[m]=w)),l[v]=tn(d,w,w[a],r,o,s,f,a,c),(d||l[v].length)&&p.push(l)):d&&p.push(l)}),p}var en=Je(function(t,e,n,r,o,i,u,a){return tn(0,t,e,n,r,o,i,u,a)});function nn(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(e===t[n])return n}function rn(t,e){if(t.lastIndexOf)return t.lastIndexOf(e);for(var n=t.length-1;n>=0;n--)if(e===t[n])return n;return-1}var on=Kt("number");var un=Kt("string"),an=_t("Date"),cn=parseInt;function sn(t){return Date.UTC(t.y,t.M||0,t.d||1,t.H||0,t.m||0,t.s||0,t.S||0)}function fn(t){return t.getTime()}function ln(t){return"(\\d{"+t+"})"}function dn(t){return isNaN(t)?t:cn(t)}for(var hn=ln(2),pn=ln("1,2"),gn=ln("1,7"),mn=ln("3,4"),vn=".{1}",yn=vn+pn,wn="(([zZ])|([-+]\\d{2}:?\\d{2}))",bn=[mn,yn,yn,yn,yn,yn,vn+gn,wn],En=[],Sn=bn.length-1;Sn>=0;Sn--){for(var Nn="",On=0;On<Sn+1;On++)Nn+=bn[On];En.push(new RegExp("^"+Nn+"$"))}var Dn=[["yyyy",mn],["yy",hn],["MM",hn],["M",pn],["dd",hn],["d",pn],["HH",hn],["H",pn],["mm",hn],["m",pn],["ss",hn],["s",pn],["SSS",ln(3)],["S",gn],["Z",wn]],An={},xn=["\\[([^\\]]+)\\]"];for(On=0;On<Dn.length;On++){var jn=Dn[On];An[jn[0]]=jn[1]+"?",xn.push(jn[0])}var Tn=new RegExp(xn.join("|"),"g"),Mn={};function kn(t,e){if(t){var n=an(t);if(n||!e&&/^[0-9]{11,15}$/.test(t))return new Date(n?fn(t):cn(t));if(un(t)){var r=e?function(t,e){var n=Mn[e];if(!n){var r=[],o=e.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(Tn,function(t,e){var n=t.charAt(0);return"["===n?e:(r.push(n),An[t])});n=Mn[e]={_i:r,_r:new RegExp(o)}}var i={},u=t.match(n._r);if(u){for(var a=n._i,c=1,s=u.length;c<s;c++)i[a[c-1]]=u[c];return i}return i}(t,e):function(t){for(var e,n={},r=0,o=En.length;r<o;r++)if(e=t.match(En[r])){n.y=e[1],n.M=e[2],n.d=e[3],n.H=e[4],n.m=e[5],n.s=e[6],n.S=e[7],n.Z=e[8];break}return n}(t);if(r.y)return r.M&&(r.M=dn(r.M)-1),r.S&&(r.S=(o=dn(r.S.substring(0,3)))<10?100*o:o<100?10*o:o),r.Z?function(t){if(/^[zZ]/.test(t.Z))return new Date(sn(t));var e=t.Z.match(/([-+])(\d{2}):?(\d{2})/);return e?new Date(sn(t)-("-"===e[1]?-1:1)*cn(e[2])*36e5+6e4*cn(e[3])):new Date("")}(r):new Date(r.y,r.M||0,r.d||1,r.H||0,r.m||0,r.s||0,r.S||0)}}var o;return new Date("")}function In(){return new Date}function Cn(t){var e,n=t?kn(t):In();return!!an(n)&&((e=n.getFullYear())%4==0&&(e%100!=0||e%400==0))}function Fn(t,e){return function(n,r){if(n){if(n[t])return n[t](r);if(un(n)||Ut(n))return e(n,r);for(var o in n)if(Ht(n,o)&&r===n[o])return o}return-1}}var Pn=Fn("indexOf",nn),Rn=Fn("lastIndexOf",rn);function $n(t){var e=0;return un(t)||Ut(t)?t.length:(Lt(t,function(){e++}),e)}var Wn=function(t){return!ue(t)&&!isNaN(t)&&!Ut(t)&&t%1==0};var _n=Kt("boolean"),Un=_t("RegExp"),Hn=_t("Error");function zn(t){for(var e in t)return!1;return!0}var Ln=typeof Symbol!==we;function Kn(t){return Ln&&Symbol.isSymbol?Symbol.isSymbol(t):"symbol"==typeof t}var Bn=_t("Arguments");var qn=typeof document===we?0:document;var Yn=typeof window===we?0:window;var Zn=typeof FormData!==we;var Vn=typeof Map!==we;var Jn=typeof WeakMap!==we;var Gn=typeof Set!==we;var Qn=typeof WeakSet!==we;function Xn(t){return function(e,n,r){if(e&&Bt(n)){if(Ut(e)||un(e))return t(e,n,r);for(var o in e)if(Ht(e,o)&&n.call(r,e[o],o,e))return o}return-1}}var tr=Xn(function(t,e,n){for(var r=0,o=t.length;r<o;r++)if(e.call(n,t[r],r,t))return r;return-1});function er(t,e,n,r,o,i,u){if(t===e)return!0;if(t&&e&&!on(t)&&!on(e)&&!un(t)&&!un(e)){if(Un(t))return n(""+t,""+e,o,i,u);if(an(t)||_n(t))return n(+t,+e,o,i,u);var a,c,s,f=Ut(t),l=Ut(e);if(f||l?f&&l:t.constructor===e.constructor)return c=Yt(t),s=Yt(e),r&&(a=r(t,e,o)),c.length===s.length&&(be(a)?pe(c,function(o,i){return o===s[i]&&er(t[o],e[s[i]],n,r,f||l?i:o,t,e)}):!!a)}return n(t,e,o,i,u)}function nr(t,e){return t===e}function rr(t,e){return er(t,e,nr)}var or=Xn(function(t,e,n){for(var r=t.length-1;r>=0;r--)if(e.call(n,t[r],r,t))return r;return-1});var ir=qt("entries",2);function ur(t,e){return function(n,r){var o,i,u={},a=[],c=this,s=arguments,f=s.length;if(!Bt(r)){for(i=1;i<f;i++)o=s[i],a.push.apply(a,Ut(o)?o:[o]);r=0}return Lt(n,function(o,i){((r?r.call(c,o,i,n):tr(a,function(t){return t===i})>-1)?t:e)&&(u[i]=o)}),u}}var ar=ur(1,0),cr=ur(0,1);var sr=/(.+)?\[(\d+)\]$/;function fr(t,e,n,r,o){if(!t[e]){var i,u,a=e?e.match(sr):null;if(n)u=o;else{var c=r?r.match(sr):null;u=c&&!c[1]?new Array(cn(c[2])+1):{}}return a?a[1]?(i=cn(a[2]),t[a[1]]?n?t[a[1]][i]=u:t[a[1]][i]?u=t[a[1]][i]:t[a[1]][i]=u:(t[a[1]]=new Array(i+1),t[a[1]][i]=u)):t[a[2]]=u:t[e]=u,u}return n&&(t[e]=o),t[e]}function lr(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function dr(t,e,n){var r,o={};return t&&(e&&qe(e)?e=function(t){return function(){return zn(t)}}(e):Bt(e)||(e=ae(e)),Lt(t,function(i,u){r=e?e.call(n,i,u,t):i,o[r]?o[r].push(i):o[r]=[i]})),o}function hr(t,e,n){var r,o,i=[],u=arguments;if(u.length<2&&(e=u[0],t=0),o=e|0,(r=t|0)<e)for(n=n|0||1;r<o;r+=n)i.push(r);return i}var pr=_e(function(t,e){return t>e});function gr(t){return(t.split(".")[1]||"").length}function mr(t,e){if(t.repeat)return t.repeat(e);var n=isNaN(e)?[]:new Array(cn(e));return n.join(t)+(n.length>0?t:"")}function vr(t,e){return t.substring(0,e)+"."+t.substring(e,t.length)}function yr(t){var e=""+t,n=e.match(/^([-+]?)((\d+)|((\d+)?[.](\d+)?))e([-+]{1})([0-9]+)$/);if(n){var r=t<0?"-":"",o=n[3]||"",i=n[5]||"",u=n[6]||"",a=n[7],c=n[8],s=c-u.length,f=c-o.length,l=c-i.length;return"+"===a?o?r+o+mr("0",c):s>0?r+i+u+mr("0",s):r+i+vr(u,c):o?f>0?r+"0."+mr("0",Math.abs(f))+o:r+vr(o,f):l>0?r+"0."+mr("0",Math.abs(l))+i+u:r+vr(i,l)+u}return e}function wr(t,e){var n=yr(t),r=yr(e);return parseInt(n.replace(".",""))*parseInt(r.replace(".",""))/Math.pow(10,gr(n)+gr(r))}function br(t){return function(e,n){var r=Fe(e),o=r;if(r){n|=0;var i=yr(r).split("."),u=i[0],a=i[1]||"",c=a.substring(0,n+1),s=u+(c?"."+c:"");if(n>=a.length)return Fe(s);if(s=r,n>0){var f=Math.pow(10,n);o=Math[t](wr(s,f))/f}else o=Math[t](s)}return o}}var Er=br("round"),Sr=br("ceil"),Nr=br("floor");function Or(t){return on(t)?yr(t):""+(Ee(t)?"":t)}function Dr(t,e){var n=Or(Er(t,e|=0)).split("."),r=n[0],o=n[1]||"",i=e-o.length;return e?i>0?r+"."+o+mr("0",i):r+vr(o,Math.abs(i)):r}var Ar=Ce(cn);function xr(t,e){return wr(Fe(t),Fe(e))}function jr(t,e){var n=yr(t),r=yr(e),o=Math.pow(10,Math.max(gr(n),gr(r)));return(xr(t,o)+xr(e,o))/o}function Tr(t,e){var n=yr(t),r=yr(e),o=gr(n),i=gr(r)-o,u=i<0,a=Math.pow(10,u?Math.abs(i):i);return xr(n.replace(".","")/r.replace(".",""),u?1/a:a)}function Mr(t,e,n){var r=0;return Lt(t&&t.length>2&&Ut(t)?t.sort():t,e?Bt(e)?function(){r=jr(r,e.apply(n,arguments))}:function(t){r=jr(r,Oe(t,e))}:function(t){r=jr(r,t)}),r}var kr="first",Ir="last";function Cr(t){return t.getFullYear()}var Fr=864e5;function Pr(t){return t.getMonth()}function Rr(t){return an(t)&&!isNaN(fn(t))}function $r(t,e,n){var r=e&&!isNaN(e)?e:0;if(Rr(t=kn(t))){if(n===kr)return new Date(Cr(t),Pr(t)+r,1);if(n===Ir)return new Date(fn($r(t,r+1,kr))-1);if(on(n)&&t.setDate(n),r){var o=t.getDate();if(t.setMonth(Pr(t)+r),o!==t.getDate())return t.setDate(1),new Date(fn(t)-Fr)}}return t}function Wr(t,e,n){var r;if(Rr(t=kn(t))&&(e&&(r=e&&!isNaN(e)?e:0,t.setFullYear(Cr(t)+r)),n||!isNaN(n))){if(n===kr)return new Date(Cr(t),0,1);if(n===Ir)return t.setMonth(11),$r(t,0,Ir);t.setMonth(n)}return t}var _r=6048e5;function Ur(t,e,n,r){if(Rr(t=kn(t))){var o=on(n),i=on(r),u=fn(t);if(o||i){var a=i?r:Rt.firstDayOfWeek,c=t.getDay(),s=o?n:c;if(c!==s){var f=0;a>c?f=-(7-a+c):a<c&&(f=a-c),u+=s>a?((0===s?7:s)-a+f)*Fr:s<a?(7-a+s+f)*Fr:f*Fr}}return e&&!isNaN(e)&&(u+=e*_r),new Date(u)}return t}function Hr(t,e,n){if(Rr(t=kn(t))&&!isNaN(e)){if(t.setDate(t.getDate()+cn(e)),n===kr)return new Date(Cr(t),Pr(t),t.getDate());if(n===Ir)return new Date(fn(Hr(t,1,kr))-1)}return t}function zr(t){return t.toUpperCase()}var Lr=le(hr(0,7),function(t){return[(t+1)%7,(t+2)%7,(t+3)%7]});function Kr(t,e){var n=new Date(t).getDay();return ge(Lr[e],n)}function Br(t,e){return function(n,r){var o=on(r)?r:Rt.firstDayOfWeek,i=kn(n);if(Rr(i)){var u,a=Ur(i,0,o,o),c=t(a),s=fn(c),f=fn(a),l=f+5184e5,d=new Date(l),h=Ur(c,0,o,o),p=fn(h);if(f===p)return 1;if(e(a,d))for(u=fn(t(d));u<l;u+=Fr)if(Kr(u,o))return 1;var g=p+5184e5,m=new Date(l),v=1;if(e(h,m))for(v=0,u=s;u<g;u+=Fr)if(Kr(u,o)){v++;break}return Math.floor((f-p)/_r)+v}return NaN}}var qr=Br(function(t){return new Date(t.getFullYear(),0,1)},function(t,e){return t.getFullYear()!==e.getFullYear()});function Yr(t){return fn(function(t){return new Date(Cr(t),Pr(t),t.getDate())}(t))}function Zr(t){return Rr(t=kn(t))?Math.floor((Yr(t)-Yr(Wr(t,0,kr)))/Fr)+1:NaN}function Vr(t,e,n){var r=Or(t);return e|=0,n=be(n)?" ":""+n,r.padStart?r.padStart(e,n):e>r.length?((e-=r.length)>n.length&&(n+=mr(n,e/n.length)),n.slice(0,e)+r):r}function Jr(t,e,n,r){var o=e[n];return o?Bt(o)?o(r,n,t):o[r]:r}var Gr=/\[([^\]]+)]|y{2,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|S{1,3}|Z{1,2}|W{1,2}|D{1,3}|[aAeEq]/g;function Qr(t,e,n){if(t){if(Rr(t=kn(t))){var r=n||{},o=e||Rt.parseDateFormat||Rt.formatString,i=t.getHours(),u=i<12?"am":"pm",a=te({},Rt.parseDateRules||Rt.formatStringMatchs,r.formats),c=function(e,n){return(""+Cr(t)).substring(4-n)},s=function(e,n){return Vr(Pr(t)+1,n,"0")},f=function(e,n){return Vr(t.getDate(),n,"0")},l=function(t,e){return Vr(i,e,"0")},d=function(t,e){return Vr(i<=12?i:i-12,e,"0")},h=function(e,n){return Vr(t.getMinutes(),n,"0")},p=function(e,n){return Vr(t.getSeconds(),n,"0")},g=function(e,n){return Vr(t.getMilliseconds(),n,"0")},m=function(e,n){var r=t.getTimezoneOffset()/60*-1;return Jr(t,a,e,(r>=0?"+":"-")+Vr(r,2,"0")+(1===n?":":"")+"00")},v=function(e,n){return Vr(Jr(t,a,e,qr(t,Ee(r.firstDay)?Rt.firstDayOfWeek:r.firstDay)),n,"0")},y=function(e,n){return Vr(Jr(t,a,e,Zr(t)),n,"0")},w={yyyy:c,yy:c,MM:s,M:s,dd:f,d:f,HH:l,H:l,hh:d,h:d,mm:h,m:h,ss:p,s:p,SSS:g,S:g,ZZ:m,Z:m,WW:v,W:v,DDD:y,D:y,a:function(e){return Jr(t,a,e,u)},A:function(e){return Jr(t,a,e,zr(u))},e:function(e){return Jr(t,a,e,t.getDay())},E:function(e){return Jr(t,a,e,t.getDay())},q:function(e){return Jr(t,a,e,Math.floor((Pr(t)+3)/3))}};return o.replace(Gr,function(t,e){return e||(w[t]?w[t](t,t.length):t)})}return"Invalid Date"}return""}var Xr=Date.now||function(){return fn(In())};var to=Br(function(t){return new Date(t.getFullYear(),t.getMonth(),1)},function(t,e){return t.getMonth()!==e.getMonth()});var eo=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function no(t){return t&&t.trimRight?t.trimRight():Or(t).replace(/[\s\uFEFF\xA0]+$/g,"")}function ro(t){return t&&t.trimLeft?t.trimLeft():Or(t).replace(/^[\s\uFEFF\xA0]+/g,"")}function oo(t){return t&&t.trim?t.trim():no(ro(t))}var io={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function uo(t){var e=new RegExp("(?:"+Yt(t).join("|")+")","g");return function(n){return Or(n).replace(e,function(e){return t[e]})}}var ao=uo(io),co={};Lt(io,function(t,e){co[io[e]]=e});var so=uo(co);function fo(t,e,n){return t.substring(e,n)}function lo(t){return t.toLowerCase()}var ho={};var po={};function go(t,e,n){return Or(t).replace((n||Rt).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(t,n){return Oe(e,oo(n))})}var mo=decodeURIComponent;function vo(t){var e,n={};return t&&un(t)&&$t(t.split("&"),function(t){e=t.split("="),n[mo(e[0])]=mo(e[1]||"")}),n}var yo=encodeURIComponent;function wo(t,e,n){var r,o=[];return Lt(t,function(t,i){r=Ut(t),ce(t)||r?o=o.concat(wo(t,e+"["+i+"]",r)):o.push(yo(e+"["+(n?"":i)+"]")+"="+yo(ue(t)?"":t))}),o}var bo=typeof location===we?0:location;function Eo(){return bo?bo.origin||bo.protocol+"//"+bo.host:""}function So(t){return vo(t.split("?")[1]||"")}function No(t){var e,n,r,o,i=""+t;return 0===i.indexOf("//")?i=(bo?bo.protocol:"")+i:0===i.indexOf("/")&&(i=Eo()+i),r=i.replace(/#.*/,"").match(/(\?.*)/),(o={href:i,hash:"",host:"",hostname:"",protocol:"",port:"",search:r&&r[1]&&r[1].length>1?r[1]:""}).path=i.replace(/^([a-z0-9.+-]*:)\/\//,function(t,e){return o.protocol=e,""}).replace(/^([a-z0-9.+-]*)(:\d+)?\/?/,function(t,e,r){return n=r||"",o.port=n.replace(":",""),o.hostname=e,o.host=e+n,"/"}).replace(/(#.*)/,function(t,e){return o.hash=e.length>1?e:"",""}),e=o.hash.match(/#((.*)\?|(.*))/),o.pathname=o.path.replace(/(\?|#.*).*/,""),o.origin=o.protocol+"//"+o.host,o.hashKey=e&&(e[2]||e[1])||"",o.hashQuery=So(o.hash),o.searchQuery=So(o.search),o}function Oo(t,e){var n=parseFloat(e),r=In(),o=fn(r);switch(t){case"y":return fn(Wr(r,n));case"M":return fn($r(r,n));case"d":return fn(Hr(r,n));case"h":case"H":return o+60*n*60*1e3;case"m":return o+60*n*1e3;case"s":return o+1e3*n}return o}function Do(t){return(an(t)?t:new Date(t)).toUTCString()}function Ao(t,e,n){if(qn){var r,o,i,u,a,c,s=[],f=arguments;return Ut(t)?s=t:f.length>1?s=[te({name:t,value:e},n)]:qe(t)&&(s=[t]),s.length>0?($t(s,function(t){r=te({},Rt.cookies,t),i=[],r.name&&(o=r.expires,i.push(yo(r.name)+"="+yo(qe(r.value)?JSON.stringify(r.value):r.value)),o&&(o=isNaN(o)?o.replace(/^([0-9]+)(y|M|d|H|h|m|s)$/,function(t,e,n){return Do(Oo(n,e))}):/^[0-9]{11,13}$/.test(o)||an(o)?Do(o):Do(Oo("d",o)),r.expires=o),$t(["expires","path","domain","secure"],function(t){be(r[t])||i.push(r[t]&&"secure"===t?t:t+"="+r[t])})),qn.cookie=i.join("; ")}),!0):(u={},(a=qn.cookie)&&$t(a.split("; "),function(t){c=t.indexOf("="),u[mo(t.substring(0,c))]=mo(t.substring(c+1)||"")}),1===f.length?u[t]:u)}return!1}function xo(t){return Ao(t)}function jo(t,e,n){return Ao(t,e,n),Ao}function To(t,e){Ao(t,"",te({expires:-1},Rt.cookies,e))}function Mo(){return Yt(Ao())}function ko(t){try{var e="__xe_t";return t.setItem(e,1),t.removeItem(e),!0}catch(t){return!1}}function Io(t){return navigator.userAgent.indexOf(t)>-1}te(Ao,{has:function(t){return ge(Mo(),t)},set:jo,setItem:jo,get:xo,getItem:xo,remove:To,removeItem:To,keys:Mo,getJSON:function(){return Ao()}}),te(ee,{assign:te,objectEach:zt,lastObjectEach:ie,objectMap:function(t,e,n){var r={};if(t){if(!e)return t;Bt(e)||(e=ae(e)),Lt(t,function(o,i){r[i]=e.call(n,o,i,t)})}return r},merge:function(t){t||(t={});for(var e,n=arguments,r=n.length,o=1;o<r;o++)(e=n[o])&&fe(t,e);return t},uniq:ve,union:function(){for(var t=arguments,e=[],n=0,r=t.length;n<r;n++)e=e.concat(ye(t[n]));return ve(e)},sortBy:Te,orderBy:je,shuffle:Ie,sample:function(t,e){var n=Ie(t);return arguments.length<=1?n[0]:(e<n.length&&(n.length=e||0),n)},some:he,every:pe,slice:Pe,filter:function(t,e,n){var r=[];if(t&&e){if(t.filter)return t.filter(e,n);Lt(t,function(o,i){e.call(n,o,i,t)&&r.push(o)})}return r},find:$e,findLast:function(t,e,n){if(t){Ut(t)||(t=ke(t));for(var r=t.length-1;r>=0;r--)if(e.call(n,t[r],r,t))return t[r]}},findKey:Re,includes:ge,arrayIndexOf:nn,arrayLastIndexOf:rn,map:le,reduce:function(t,e,n){if(t){var r,o,i=0,u=n,a=arguments.length>2,c=Yt(t);if(t.length&&t.reduce)return o=function(){return e.apply(null,arguments)},a?t.reduce(o,u):t.reduce(o);for(a&&(i=1,u=t[c[0]]),r=c.length;i<r;i++)u=e.call(null,u,t[c[i]],i,t);return u}},copyWithin:function(t,e,n,r){if(Ut(t)&&t.copyWithin)return t.copyWithin(e,n,r);var o,i,u=e|0,a=n|0,c=t.length,s=arguments.length>3?r|0:c;if(u<c&&(u=u>=0?u:c+u)>=0&&(a=a>=0?a:c+a)<(s=s>=0?s:c+s))for(o=0,i=t.slice(a,s);u<c&&!(i.length<=o);u++)t[u]=i[o++];return t},chunk:function(t,e){var n,r=[],o=e|0||1;if(Ut(t))if(o>=0&&t.length>o)for(n=0;n<t.length;)r.push(t.slice(n,n+o)),n+=o;else r=t.length?[t]:t;return r},zip:function(){return He(arguments)},unzip:He,zipObject:function(t,e){var n={};return e=e||[],Lt(ke(t),function(t,r){n[t]=e[r]}),n},flatten:function(t,e){return Ut(t)?ze(t,e):[]},toArray:ye,includeArrays:me,pluck:We,invoke:function(t,e){for(var n,r=arguments,o=[],i=[],u=2,a=r.length;u<a;u++)o.push(r[u]);if(Ut(e)){for(a=e.length-1,u=0;u<a;u++)i.push(e[u]);e=e[a]}return le(t,function(t){if(i.length&&(t=function(t,e){for(var n=0,r=e.length;t&&n<r;)t=t[e[n++]];return r&&t?t:0}(t,i)),(n=t[e]||e)&&n.apply)return n.apply(t,o)})},arrayEach:$t,lastArrayEach:oe,toArrayTree:function(t,e){var n,r,o,i=te({},Rt.treeOptions,e),u=i.strict,a=i.key,c=i.parentKey,s=i.children,f=i.mapChildren,l=i.sortKey,d=i.reverse,h=i.data,p=[],g={},m={};return l&&(t=je(Gt(t),l),d&&(t=t.reverse())),Lt(t,function(t){n=t[a],m[n]&&Le("warn","Duplicate primary key="+n),m[n]=!0}),Lt(t,function(t){n=t[a],h?(r={})[h]=t:r=t,o=t[c],g[n]=g[n]||[],r[a]=n,r[c]=o,n===o&&(o=null,Le("warn","Error infinite Loop. key="+n+" parentKey="+n)),g[o]=g[o]||[],g[o].push(r),r[s]=g[n],f&&(r[f]=g[n]),(!u||u&&Ee(o))&&(m[o]||p.push(r))}),u&&function(t,e){Lt(t,function(t){t[e]&&!t[e].length&&Ze(t,e)})}(t,s),p},toTreeArray:function(t,e){return Ve([],null,t,te({},Rt.treeOptions,e))},findTree:Ge,eachTree:Qe,mapTree:Xe,filterTree:function(t,e,n,r){var o=[];return t&&e&&Qe(t,function(t,n,i,u,a,c){e.call(r,t,n,i,u,a,c)&&o.push(t)},n),o},searchTree:en,hasOwnProp:Ht,eqNull:Ee,isNaN:function(t){return on(t)&&isNaN(t)},isFinite:function(t){return on(t)&&isFinite(t)},isUndefined:be,isArray:Ut,isFloat:function(t){return!(ue(t)||isNaN(t)||Ut(t)||Wn(t))},isInteger:Wn,isFunction:Bt,isBoolean:_n,isString:un,isNumber:on,isRegExp:Un,isObject:qe,isPlainObject:ce,isDate:an,isError:Hn,isTypeError:function(t){return!!t&&t.constructor===TypeError},isEmpty:zn,isNull:ue,isSymbol:Kn,isArguments:Bn,isElement:function(t){return!!(t&&un(t.nodeName)&&on(t.nodeType))},isDocument:function(t){return!(!t||!qn||9!==t.nodeType)},isWindow:function(t){return!(!Yn||!t||t!==t.window)},isFormData:function(t){return Zn&&t instanceof FormData},isMap:function(t){return Vn&&t instanceof Map},isWeakMap:function(t){return Jn&&t instanceof WeakMap},isSet:function(t){return Gn&&t instanceof Set},isWeakSet:function(t){return Qn&&t instanceof WeakSet},isLeapYear:Cn,isMatch:function(t,e){var n=Yt(t),r=Yt(e);return!r.length||(me(n,r)?he(r,function(r){return tr(n,function(n){return n===r&&rr(t[n],e[r])})>-1}):rr(t,e))},isEqual:rr,isEqualWith:function(t,e,n){return Bt(n)?er(t,e,function(t,e,r,o,i){var u=n(t,e,r,o,i);return be(u)?nr(t,e):!!u},n):er(t,e,nr)},getType:function(t){return ue(t)?"null":Kn(t)?"symbol":an(t)?"date":Ut(t)?"array":Un(t)?"regexp":Hn(t)?"error":typeof t},uniqueId:function(t){return""+(Ee(t)?"":t)+Rt.keyId++},getSize:$n,indexOf:Pn,lastIndexOf:Rn,findIndexOf:tr,findLastIndexOf:or,toStringJSON:function(t){if(ce(t))return t;if(un(t))try{return JSON.parse(t)}catch(t){}return{}},toJSONString:function(t){return Ee(t)?"":JSON.stringify(t)},keys:Yt,values:ke,entries:ir,pick:ar,omit:cr,first:function(t){return ke(t)[0]},last:function(t){var e=ke(t);return e[e.length-1]},each:Lt,forOf:function(t,e,n){if(t)if(Ut(t))for(var r=0,o=t.length;r<o&&!1!==e.call(n,t[r],r,t);r++);else for(var i in t)if(Ht(t,i)&&!1===e.call(n,t[i],i,t))break},lastForOf:function(t,e,n){var r,o;if(t)if(Ut(t))for(r=t.length-1;r>=0&&!1!==e.call(n,t[r],r,t);r--);else for(r=(o=Ht(t)).length-1;r>=0&&!1!==e.call(n,t[o[r]],o[r],t);r--);},lastEach:Be,has:function(t,e){if(t){if(Ht(t,e))return!0;var n,r,o,i,u,a,c=Ne(e),s=0,f=c.length;for(u=t;s<f&&(a=!1,(i=(n=c[s])?n.match(Se):"")?(r=i[1],o=i[2],r?u[r]&&Ht(u[r],o)&&(a=!0,u=u[r][o]):Ht(u,o)&&(a=!0,u=u[o])):Ht(u,n)&&(a=!0,u=u[n]),a);s++)if(s===f-1)return!0}return!1},get:Oe,set:function(t,e,n){if(t&&se(e))if(!t[e]&&!Ht(t,e)||lr(e)){for(var r=t,o=Ne(e),i=o.length,u=0;u<i;u++)if(!lr(o[u])){var a=u===i-1;r=fr(r,o[u],a,a?null:o[u+1],n)}}else t[e]=n;return t},groupBy:dr,countBy:function(t,e,n){var r=dr(t,e,n||this);return zt(r,function(t,e){r[e]=t.length}),r},clone:Gt,clear:Ye,remove:Ze,range:hr,destructuring:function(t,e){if(t&&e){var n=te.apply(this,[{}].concat(Pe(arguments,1))),r=Yt(n);$t(Yt(t),function(e){ge(r,e)&&(t[e]=n[e])})}return t},random:Me,min:pr,max:Ue,commafy:function(t,e){var n,r,o,i,u,a=te({},Rt.commafyOptions,e),c=a.digits;return on(t)?(n=(a.ceil?Sr:a.floor?Nr:Er)(t,c),i=(r=yr(c?Dr(n,c):n).split("."))[0],u=r[1],(o=i&&n<0)&&(i=i.substring(1,i.length))):i=(r=(n=Or(t).replace(/,/g,""))?[n]:[])[0],r.length?(o?"-":"")+i.replace(new RegExp("(?=(?!(\\b))(.{"+(a.spaceNumber||3)+"})+$)","g"),a.separator||",")+(u?"."+u:""):n},round:Er,ceil:Sr,floor:Nr,toFixed:Dr,toNumber:Fe,toNumberString:yr,toInteger:Ar,add:function(t,e){return jr(Fe(t),Fe(e))},subtract:function(t,e){var n=Fe(t),r=Fe(e),o=yr(n),i=yr(r),u=gr(o),a=gr(i),c=Math.pow(10,Math.max(u,a));return parseFloat(Dr((n*c-r*c)/c,u>=a?u:a))},multiply:xr,divide:function(t,e){return Tr(Fe(t),Fe(e))},sum:Mr,mean:function(t,e,n){return Tr(Mr(t,e,n),$n(t))},now:Xr,timestamp:function(t,e){if(t){var n=kn(t,e);return an(n)?fn(n):n}return Xr()},isValidDate:Rr,isDateSame:function(t,e,n){return!(!t||!e)&&("Invalid Date"!==(t=Qr(t,n))&&t===Qr(e,n))},toStringDate:kn,toDateString:Qr,getWhatYear:Wr,getWhatQuarter:function(t,e,n){var r,o=e&&!isNaN(e)?3*e:0;return Rr(t=kn(t))?(r=3*(function(t){var e=t.getMonth();return e<3?1:e<6?2:e<9?3:4}(t)-1),t.setMonth(r),$r(t,o,n)):t},getWhatMonth:$r,getWhatWeek:Ur,getWhatDay:Hr,getWhatHours:function t(e,n,r){if(Rr(e=kn(e))&&!isNaN(n)){if(e.setHours(e.getHours()+cn(n)),r===kr)return new Date(Cr(e),Pr(e),e.getDate(),e.getHours());if(r===Ir)return new Date(fn(t(e,1,kr))-1)}return e},getWhatMinutes:function t(e,n,r){if(Rr(e=kn(e))&&!isNaN(n)){if(e.setMinutes(e.getMinutes()+cn(n)),r===kr)return new Date(Cr(e),Pr(e),e.getDate(),e.getHours(),e.getMinutes());if(r===Ir)return new Date(fn(t(e,1,kr))-1)}return e},getWhatSeconds:function t(e,n,r){if(Rr(e=kn(e))&&!isNaN(n)){if(e.setSeconds(e.getSeconds()+cn(n)),r===kr)return new Date(Cr(e),Pr(e),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());if(r===Ir)return new Date(fn(t(e,1,kr))-1)}return e},getYearDay:Zr,getYearWeek:qr,getMonthWeek:to,getDayOfYear:function(t,e){return Rr(t=kn(t))?Cn(Wr(t,e))?366:365:NaN},getDayOfMonth:function(t,e){return Rr(t=kn(t))?Math.floor((fn($r(t,e,Ir))-fn($r(t,e,kr)))/Fr)+1:NaN},getDateDiff:function(t,e){var n,r,o,i,u,a,c={done:!1,status:!1,time:0};if(t=kn(t),e=e?kn(e):In(),Rr(t)&&Rr(e)&&(n=fn(t))<(r=fn(e)))for(i=c.time=r-n,c.done=!0,c.status=!0,a=0,u=eo.length;a<u;a++)i>=(o=eo[a])[1]?a===u-1?c[o[0]]=i||0:(c[o[0]]=Math.floor(i/o[1]),i-=c[o[0]]*o[1]):c[o[0]]=0;return c},trim:oo,trimLeft:ro,trimRight:no,escape:ao,unescape:so,camelCase:function(t){if(t=Or(t),ho[t])return ho[t];var e=t.length,n=t.replace(/([-]+)/g,function(t,n,r){return r&&r+n.length<e?"-":""});return e=n.length,n=n.replace(/([A-Z]+)/g,function(t,n,r){var o=n.length;return n=lo(n),r?o>2&&r+o<e?zr(fo(n,0,1))+fo(n,1,o-1)+zr(fo(n,o-1,o)):zr(fo(n,0,1))+fo(n,1,o):o>1&&r+o<e?fo(n,0,o-1)+zr(fo(n,o-1,o)):n}).replace(/(-[a-zA-Z])/g,function(t,e){return zr(fo(e,1,e.length))}),ho[t]=n,n},kebabCase:function(t){if(t=Or(t),po[t])return po[t];if(/^[A-Z]+$/.test(t))return lo(t);var e=t.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(t,e,n,r){var o=n.length;return o>1?e+"-"+lo(fo(n,0,o-1))+"-"+lo(fo(n,o-1,o))+r:lo(e+"-"+n+r)}).replace(/^([A-Z]+)([a-z]+)?$/,function(t,e,n){var r=e.length;return lo(fo(e,0,r-1)+"-"+fo(e,r-1,r)+(n||""))}).replace(/([a-z]?)([A-Z]+)([a-z]?)/g,function(t,e,n,r,o){var i=n.length;return i>1&&(e&&(e+="-"),r)?(e||"")+lo(fo(n,0,i-1))+"-"+lo(fo(n,i-1,i))+r:(e||"")+(o?"-":"")+lo(n)+(r||"")});return e=e.replace(/([-]+)/g,function(t,n,r){return r&&r+n.length<e.length?"-":""}),po[t]=e,e},repeat:function(t,e){return mr(Or(t),e)},padStart:Vr,padEnd:function(t,e,n){var r=Or(t);return e|=0,n=be(n)?" ":""+n,r.padEnd?r.padEnd(e,n):e>r.length?((e-=r.length)>n.length&&(n+=mr(n,e/n.length)),r+n.slice(0,e)):r},startsWith:function(t,e,n){var r=Or(t);return 0===(1===arguments.length?r:r.substring(n)).indexOf(e)},endsWith:function(t,e,n){var r=Or(t),o=arguments.length;return o>1&&(o>2?r.substring(0,n).indexOf(e)===n-1:r.indexOf(e)===r.length-1)},template:go,toFormatString:function(t,e){return go(t,e,{tmplRE:/\{([.\w[\]\s]+)\}/g})},toString:Or,toValueString:Or,noop:function(){},property:ae,bind:function(t,e){var n=Pe(arguments,2);return function(){return t.apply(e,Pe(arguments).concat(n))}},once:function(t,e){var n=!1,r=null,o=Pe(arguments,2);return function(){return n||(r=t.apply(e,Pe(arguments).concat(o)),n=!0),r}},after:function(t,e,n){var r=0,o=[];return function(){var i=arguments;++r<=t&&o.push(i[0]),r>=t&&e.apply(n,[o].concat(Pe(i)))}},before:function(t,e,n){var r=0,o=[];return n=n||this,function(){var i=arguments;++r<t&&(o.push(i[0]),e.apply(n,[o].concat(Pe(i))))}},throttle:function(t,e,n){var r=null,o=null,i=!1,u=null,a=te({leading:!0,trailing:!0},n),c=a.leading,s=a.trailing,f=function(){r=null,o=null},l=function(){i=!0,t.apply(o,r),u=setTimeout(d,e),f()},d=function(){u=null,i||!0!==s?f():l()},h=function(){r=arguments,o=this,i=!1,null!==u||!0!==c?!0===s&&(u=setTimeout(d,e)):l()};return h.cancel=function(){var t=null!==u;return t&&clearTimeout(u),f(),u=null,i=!1,t},h},debounce:function(t,e,n){var r=null,o=null,i="boolean"==typeof n?{leading:n,trailing:!n}:te({leading:!1,trailing:!0},n),u=!1,a=null,c=i.leading,s=i.trailing,f=function(){r=null,o=null},l=function(){u=!0,t.apply(o,r),f()},d=function(){!0===c&&(a=null),u||!0!==s?f():l()},h=function(){u=!1,r=arguments,o=this,null===a?!0===c&&l():clearTimeout(a),a=setTimeout(d,e)};return h.cancel=function(){var t=null!==a;return t&&clearTimeout(a),f(),a=null,u=!1,t},h},delay:function(t,e){var n=Pe(arguments,2),r=this;return setTimeout(function(){t.apply(r,n)},e)},unserialize:vo,serialize:function(t){var e,n=[];return Lt(t,function(t,r){be(t)||(e=Ut(t),ce(t)||e?n=n.concat(wo(t,r,e)):n.push(yo(r)+"="+yo(ue(t)?"":t)))}),n.join("&").replace(/%20/g,"+")},parseUrl:No,getBaseURL:function(){if(bo){var t=bo.pathname,e=Rn(t,"/")+1;return Eo()+(e===t.length?t:t.substring(0,e))}return""},locat:function(){return bo?No(bo.href):{}},browse:function(){var t,e,n,r=!1,o=!1,i=!1,u={isNode:!1,isMobile:r,isPC:!1,isDoc:!!qn};if(Yn||typeof process===we){n=Io("Edge"),e=Io("Chrome"),r=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),u.isDoc&&(t=qn.body||qn.documentElement,$t(["webkit","khtml","moz","ms","o"],function(e){u["-"+e]=!!t[e+"MatchesSelector"]}));try{o=ko(Yn.localStorage)}catch(t){}try{i=ko(Yn.sessionStorage)}catch(t){}te(u,{edge:n,firefox:Io("Firefox"),msie:!n&&u["-ms"],safari:!e&&!n&&Io("Safari"),isMobile:r,isPC:!r,isLocalStorage:o,isSessionStorage:i})}else u.isNode=!0;return u},cookie:Ao});let Co=!1;function Fo(t){if(!t)return null;const e=localStorage.getItem(t);if(!e)return null;try{return JSON.parse(e,(t,e)=>{if(e&&"string"==typeof e){const t=function(){return e.replace("TT_FUNCTION","")};return e.includes("TT_FUNCTION")?t():e}return e})}catch{return e}}function Po(t,e="12",n="Microsoft YaHei,Arial,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'"){let r=0;const o=document.createElement("canvas").getContext("2d");return o&&(o.font=`${e} ${n}`,r=o.measureText(t).width),r}function Ro(t,e,n){const r=n?.excludeAll||[],o=n?.exclude||[];return r.includes("Id")||r.push("Id"),r.includes("rowId")||r.push("rowId"),Object.fromEntries(Object.entries(t).reduce((t,[i,u])=>(r.includes(i)||o.includes(i)||(u&&R(u)?$o(n,e,u,i,t):u&&q(u)?Wo(n,e,u,i,t):_o(n,e,u,i,t)),t),[]))}function $o(t,e,n,r,o){const i=Ro(n,e[r]||{},{excludeAll:t?.excludeAll,...t});Object.keys(i).length&&o.push([r,i])}function Wo(t,e,n,r,o){const i=[],u=(t||{})[r]?.key;if(e[r]){const o=n?.length>=e[r]?.length?n:e[r],a=n?.length<e[r]?.length?n:e[r];u?o.forEach(e=>{const n=a.find(t=>t[u]===e[u]);if(n){const o=Ro(e,n,{excludeAll:t?.excludeAll,...t[r]});Object.keys(o).length&&i.push({[u]:n[u],...o})}else i.push(e)}):o.forEach((e,n)=>{const r=a[n];if(R(e)&&!R(r)||q(e)&&!q(r)||typeof e!=typeof r||!r)i.push(e);else if(R(e)||q(e)){const n=Ro(e,r,{excludeAll:t?.excludeAll});Object.keys(n).length&&i.push({...n})}else e!==r&&i.push(e)})}else i.push(...n);i.length&&o.push([r,i])}function _o(t,e,n,r,o){const i=t?.notNullToFalse||[];if("string"==typeof n&&"number"==typeof e[r]||"number"==typeof n&&"string"==typeof e[r])Number(n)!==Number(e[r])&&o.push([r,n]);else if([void 0,null,""].includes(n))[void 0,null,""].includes(e[r])||o.push([r,n]);else if(n!==e[r]){if(!1===n&&[void 0,null,""].includes(e[r])&&!i.includes(r))return;o.push([r,n])}}function Uo(t,e,n){const r={},o=["rowId","row_id"],i=n?.excludeAll||[],u=n?.exclude||[];for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&![...i,...o].includes(a)&&![...u,...o].includes(a)){const o=t[a],u=e[a];if(Array.isArray(u)&&Array.isArray(o)){(o.length!==u.length||o.some((t,e)=>"object"==typeof t&&"object"==typeof u[e]?Object.keys(Uo(t,u[e],{excludeAll:i,...n?.[a]})).length>0:t!==u[e]))&&(r[a]=u)}else if("object"==typeof u&&"object"==typeof o&&null!==u&&null!==o){const t=Uo(o,u,{excludeAll:i,...n?.[a]});Object.keys(t).length>0&&(r[a]=t)}else o!==u&&String(o)!==String(u)&&(r[a]=u)}return r}function Ho(t={},e={}){let n;for(n in e)t[n]=R(t[n])?Ho(t[n],e[n]):t[n]=e[n];return t}function zo(t,e="px"){return ee.isNumber(t)||/^\d+$/.test(`${t}`)?`${t}${e}`:`${t||""}`}function Lo(t,e,n){return i({get:()=>new Proxy(t[e],{set:(t,r,o)=>(n(`update:${e}`,{...t,[r]:o}),!0)}),set(t){n(`update:${e}`,t)}})}function Ko(t){const e=Object.getPrototypeOf(t);if(!e||e===Object.prototype)return t;const n=Object.getOwnPropertyNames(e);for(const e of n){const n=t[e];"constructor"!==e&&"function"==typeof n&&(t[e]=n.bind(t))}return t}function Bo(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);if(Array.isArray(t))return t.map(t=>Bo(t));const e={};return Object.keys(t).forEach(n=>{e[n]=Bo(t[n])}),e}function qo(t,e="id",n="parentId",r="children"){const o=new Map,i=[];return t.forEach(t=>{o.set(t[e],{...t,[r]:[]})}),t.forEach(t=>{const u=o.get(t[e]);if(t[n]){const e=o.get(t[n]);e&&e[r].push(u)}else i.push(u)}),i}function Yo(...t){for(const e of t)if(null!=e)return e}function Zo(...t){return a(c(t))}function Vo(){const t=new Event("resize");window.dispatchEvent(t)}function Jo(t,e,n="prop",r="content"){t.forEach(t=>{Object.prototype.hasOwnProperty.call(t,n)&&(q(r)?r.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=e[t[n]])}):Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=e[t[n]]))})}const Go=function(t,e="YYYY-MM-DD HH:mm:ss",n="Asia/Shanghai"){return P(t)||""===t||0===t||"0"===t?"":r(t).isValid()?(Co||(r.extend(f),r.extend(l),Co=!0),r(t).tz(n).format(e)):""};function Qo(t){return s(t)}function Xo(t,e){return t?e&&0!==e.length?e.reduce((t,e)=>(delete t[e],t),{...t}):t:{}}function ti(t,e=200,n={}){const{leading:r=!1,trailing:o=!0,maxWait:i}=n;let u,a,c,s,f,l=0;function d(e){const n=s;return s=void 0,l=e,f=t(...n),f}function h(){void 0!==u&&(window.clearTimeout(u),u=void 0),void 0!==a&&(window.clearTimeout(a),a=void 0)}function p(){h(),l=0,s=void 0,c=void 0,f=void 0}function g(t){if(void 0===c)return!0;const n=t-c;return n>=e||n<0||void 0!==i&&t-l>=i}function m(){const t=Date.now();if(g(t))return void function(t){u=void 0,o&&void 0!==s?d(t):s=void 0}(t);const n=function(t){const n=t-l,r=e-(t-c);return void 0!==i?Math.min(r,i-n):r}(t);u=n>0?window.setTimeout(m,n):void 0}function v(){const t=Date.now();h(),void 0!==s&&d(t)}const y=(...t)=>{const n=Date.now(),o=g(n);if(s=t??[],c=n,o){if(void 0===u)return function(t){return l=t,h(),u=window.setTimeout(m,e),void 0!==i&&(a=window.setTimeout(v,i)),r?d(t):f}(n);if(void 0!==i)return h(),u=window.setTimeout(m,e),a=window.setTimeout(v,i),r?d(n):f}return void 0===u&&(u=window.setTimeout(m,e),void 0!==i&&(a=window.setTimeout(v,i))),f};return y.isPending=()=>void 0!==u||void 0!==a,y.cancel=()=>{p()},y.flush=(...e)=>{if(!y.isPending())return e.length>0?t(...e):f;const n=void 0!==s?s:e;return p(),t(...n)},y}function ei(t,...e){let n=[];const r=e[e.length-1];return e.length>0&&Array.isArray(r)&&r.every(t=>["string","number","symbol"].includes(typeof t))&&(n=e.pop()),d((t,e,r)=>n.includes(e)||Array.isArray(t[e])&&Array.isArray(r)?(t[e]=r,!0):void 0)(t,...e)}function ni(...t){let e=new h(t[0]??0);for(let n=1;n<t.length;n++)e=e.add(new h(t[n]??0));return e.toNumber()}function ri(...t){let e=new h(t[0]??0);for(let n=1;n<t.length;n++)e=e.sub(new h(t[n]??0));return e.toNumber()}function oi(...t){let e=new h(t[0]??0);for(let n=1;n<t.length;n++)e=e.mul(new h(t[n]??0));return e.toNumber()}function ii(...t){let e=new h(t[0]??0);for(let n=1;n<t.length;n++)e=e.div(new h(t[n]??0));return e.toNumber()}function ui(...t){return t.reduce((t,e)=>si(t??0).add(e??0).toNumber(),0)}function ai(t,e){return t.reduce((t,n)=>si(t??0).add(e(n)??0).toNumber(),0)}function ci(t,e,n){const r={},o=n;return t.forEach(t=>{const n=e(t);if(n){const e=o(t);r[n]=si(r[n]||0).add(e).toNumber()}}),r}function si(t){const e=Number(t)||0===t,n=Number.isNaN(Number(t)),r=new h(t);if(e&&!n)return r;console.error("请输入合理数字!");return new h(Number.NaN)}class fi{condition=!1;promiseResolvers=null;isConditionTrue(){return this.condition}reset(){this.condition=!1,this.clearPromises()}setConditionFalse(){this.condition=!1,this.promiseResolvers&&(this.promiseResolvers.reject(),this.clearPromises())}setConditionTrue(){this.condition=!0,this.promiseResolvers&&(this.promiseResolvers.resolve(),this.clearPromises())}waitForCondition(){if(this.condition)return Promise.resolve();const{promise:t,resolve:e,reject:n}=Promise.withResolvers();return this.promiseResolvers={resolve:e,reject:n},t}clearPromises(){this.promiseResolvers=null}}class li{condition=!1;rejectCondition=null;resolveCondition=null;isConditionTrue(){return this.condition}reset(){this.condition=!1,this.clearPromises()}setConditionFalse(){this.condition=!1,this.rejectCondition&&(this.rejectCondition(),this.clearPromises())}setConditionTrue(){this.condition=!0,this.resolveCondition&&(this.resolveCondition(),this.clearPromises())}waitForCondition(){return new Promise((t,e)=>{this.condition?t():(this.resolveCondition=t,this.rejectCondition=e)})}clearPromises(){this.resolveCondition=null,this.rejectCondition=null}}const di=!0,hi=25200,pi={key:"_11111000001111@",iv:"@11111000001111_"};class gi{key;iv;constructor(t={}){const{key:e,iv:n}=t;e&&(this.key=v?.(e)),n&&(this.iv=v?.(n))}get getOptions(){return{mode:y,padding:w,iv:this.iv}}encryptByAES(t){return p(t,this.key,this.getOptions).toString()}decryptByAES(t){return g(t,this.key,this.getOptions).toString(m)}}function mi({prefixKey:t="",storage:e=sessionStorage,key:n=pi.key,iv:r=pi.iv,timeout:o=null,hasEncrypt:i=!0}={}){if(i&&[n.length,r.length].some(t=>16!==t))throw new Error("When hasEncrypt is true, the key or iv must be 16 bits!");const u=new gi({key:n,iv:r});return new class{storage;prefixKey;encryption;hasEncrypt;constructor(){this.storage=e,this.prefixKey=t,this.encryption=u,this.hasEncrypt=i}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,e,n=o){const r=JSON.stringify({value:e,time:Date.now(),expire:P(n)?null:(new Date).getTime()+1e3*n}),i=this.hasEncrypt?this.encryption.encryptByAES(r):r;this.storage.setItem(this.getKey(t),i)}get(t,e=null){const n=this.storage.getItem(this.getKey(t));if(!n)return e;try{const e=this.hasEncrypt?this.encryption.decryptByAES(n):n,r=JSON.parse(e),{value:o,expire:i}=r;if(P(i)||i>=(new Date).getTime())return o;this.remove(t)}catch(t){return console.error(`get erroe:${t}`),e}}remove(t){this.storage.removeItem(this.getKey(t))}getKeysWithPrefix(t){const e=[];for(let n=0;n<this.storage.length;n++){const r=this.storage.key(n);r&&r.startsWith(t)&&e.push(r)}return e}getKeysWithPrefixExcluding(t,e){const n=[];for(let r=0;r<this.storage.length;r++){const o=this.storage.key(r);o&&o.startsWith(t)&&!e.has(o)&&n.push(o)}return n}removeKeys(t){t.forEach(t=>{this.storage.removeItem(t)})}clear(t){const e=(this.prefixKey||"").toUpperCase();if(!t)return void this.removeKeys(this.getKeysWithPrefix(e));const{keys:n,exclude:r}=t;if(n&&n.length>0)n.forEach(t=>{this.remove(t)});else{if(r&&r.length>0){const t=new Set(r.map(t=>this.getKey(t)));return void this.removeKeys(this.getKeysWithPrefixExcluding(e,t))}this.removeKeys(this.getKeysWithPrefix(e))}}}}function vi(t=sessionStorage,e={}){return mi(function(t,e={}){return{hasEncrypt:di,storage:t,prefixKey:"tt-admin",...e}}(t,e))}function yi(t={}){return vi(sessionStorage,{...t,timeout:hi})}function wi(t={}){return vi(localStorage,{...t,timeout:hi})}function bi(t,e,n,r){if(!t)return!1;const o=t.split(".").map(t=>Number(t));if(o.length<2)return!1;const i=o[0],u=o[1],a=o[2];return i>e||!(i<e)&&(u>n||!(u<n)&&(void 0===r||(a??0)>=r))}function Ei(t,e,n){const r=b(t);return e?n?.forEach(t=>{const e=r[t];Array.isArray(e)&&(r[t]=r[t].join(","))}):Object.entries(r).forEach(([t,e])=>{Array.isArray(e)&&!n?.includes(t)&&(r[t]=e.join(","))}),r}function Si(t,e,n){const r=b(t);return e?n?.forEach(t=>{const e=r[t];"string"==typeof e&&(r[t]=""===e?[]:e.split(","))}):Object.entries(r).forEach(([t,e])=>{"string"!=typeof e||n?.includes(t)||(r[t]=""===e?[]:e.split(","))}),r}const Ni=new Set(["*","all","ALL","All"]);function Oi(t,e,n){let{vk:r,ck:o}=n||{};const{labelField:i,valueField:u,hasDefault:a=!0}=n||{};r=r||i||"label",o=o||u||"value","number"==typeof e&&(e=e.toString());let c=[e];Array.isArray(e)?c=e:z(e)&&(c=e?.split(","));const s=t=>a?t:void 0;return c?.map(e=>Ni.has(String(e))?"全部":Array.isArray(t)?t?.find(t=>t[o]==e)?.[r]??s(e):t?.[e]??s(e))?.join()}const Di=(t=[])=>{let e=[];return e=t.filter(t=>Boolean(Object.values(t).filter(Boolean).length)),e.length?e:void 0},Ai=(t,e=",")=>Array.isArray(t)?t:t?.split(e).filter(Boolean)??[],xi=(t=[])=>t.filter(Boolean),ji=(t,e)=>t()?e:[],Ti=(t,e=",")=>Array.isArray(t)?t.join(e):t;export{Oi as CODE_TO_VALUE,hi as DEFAULT_CACHE_TIME,xi as FILTER_BOOLEAN,Di as FILTER_EMPTY,ji as GET_LIST_BY_FUNC,Ti as JOIN_BY_SEPARATOR,Ai as SPLIT_BY_SEPARATOR,fi as StateHandler,li as StateHandlerOld,wt as TtHttp,ni as add,Jo as arrGive,qo as arrayToTree,Ko as bindMethods,pi as cacheCipher,si as calc,Po as calcWordsWidth,E as capitalize,bi as checkVersion,Zo as clnm,Qo as cloneDeep,ci as clsSumTotalBy,Uo as compareObjects,mi as create,wi as createLocalStorage,yi as createSessionStorage,vi as createStorage,Go as dateFormat,ti as debounce,Bo as deepCopy,Ho as deepMerge,ii as divide,O as downloadFile,di as enableStorageEncryption,Ft as extractIdFromTitle,Mt as extractResourceFromApi,St as formatAmount,Nt as formatAmountOfPlace,Dt as formatDecimal,At as formatFileSize,Ei as formatFormData,xt as formatPeriod,Ot as formatPlaceOfAmount,Tt as formatToDate,jt as formatToDateTime,Ct as generateFormName,kt as generateTestId,at as getBrowserType,ut as getDeviceType,Ro as getDifference,Yo as getFirstNonNullOrUndefined,Fo as getStorage,k as is,st as isAndroid,q as isArray,K as isBoolean,G as isClient,_ as isDate,ht as isDayjsObject,I as isDef,Z as isElement,$ as isEmpty,W as isEmptyZero,et as isError,lt as isExternal,ot as isFalse,pt as isFormData,L as isFunction,ct as isIos,dt as isJson,V as isMap,F as isNull,P as isNullOrUnDef,U as isNumber,R as isObject,ft as isPC,tt as isPrimitive,H as isPromise,B as isRegExp,J as isServer,rt as isSet,z as isString,X as isStringNumber,nt as isSymbol,it as isTrue,C as isUndefined,Q as isUrl,Pt as isValidTestId,Y as isWindow,N as kebabToCamelCase,yt as loadingService,ei as mergeWithArrayOverride,oi as multiply,Xo as omit,Si as revertFormatFormData,Wo as setDifferenceArr,_o as setDifferenceField,$o as setDifferenceObj,ri as subtract,ui as sumTotal,ai as sumTotalBy,zo as toCssUnit,It as toKebabCase,Vo as triggerWindowResize,S as trim,Lo as useVModel,bt as withInstall};
2
2
  //# sourceMappingURL=index.esm.js.map