Comparing version 3.6.0 to 3.7.0
@@ -7,46 +7,46 @@ /** | ||
export interface SetupDefaults { | ||
/** | ||
* 默认树的转换配置 | ||
* 用于 toArrayTree()、toTreeArray() | ||
*/ | ||
treeOptions?: { | ||
strict?: boolean; | ||
parentKey?: string; | ||
key?: string; | ||
children?: string; | ||
data?: string; | ||
[key: string]: any; | ||
}; | ||
/** | ||
* 默认解析的日期格式 | ||
* 用于 toDateString() | ||
*/ | ||
parseDateFormat?: string; | ||
/** | ||
* 默认格式化日期的规则 | ||
* 用于 toDateString() | ||
*/ | ||
parseDateRules?: ToDateStringFormats; | ||
/** | ||
* 默认周视图的起始天 | ||
* 用于 getWhatWeek()、getYearWeek()、toDateString() | ||
*/ | ||
firstDayOfWeek?: FirstDayOfWeek; | ||
/** | ||
* 分隔函数配置 | ||
* 用于 commafy() | ||
*/ | ||
commafyOptions?: CommafyOptions; | ||
/** | ||
* 默认树的转换配置 | ||
* 用于 toArrayTree()、toTreeArray() | ||
*/ | ||
treeOptions?: { | ||
strict?: boolean; | ||
parentKey?: string; | ||
key?: string; | ||
children?: string; | ||
data?: string; | ||
[key: string]: any; | ||
}; | ||
/** | ||
* 默认解析的日期格式 | ||
* 用于 toDateString() | ||
*/ | ||
parseDateFormat?: string; | ||
/** | ||
* 默认格式化日期的规则 | ||
* 用于 toDateString() | ||
*/ | ||
parseDateRules?: ToDateStringFormats; | ||
/** | ||
* 默认周视图的起始天 | ||
* 用于 getWhatWeek()、getYearWeek()、toDateString() | ||
*/ | ||
firstDayOfWeek?: FirstDayOfWeek; | ||
/** | ||
* 分隔函数配置 | ||
* 用于 commafy() | ||
*/ | ||
commafyOptions?: CommafyOptions; | ||
/** | ||
* 已被 parseDateRules 替换 | ||
* @deprecated | ||
*/ | ||
formatStringMatchs?: any; | ||
/** | ||
* 已被 parseDateFormat 替换 | ||
* @deprecated | ||
*/ | ||
formatString?: string; | ||
[key: string]: any; | ||
/** | ||
* 已被 parseDateRules 替换 | ||
* @deprecated | ||
*/ | ||
formatStringMatchs?: any; | ||
/** | ||
* 已被 parseDateFormat 替换 | ||
* @deprecated | ||
*/ | ||
formatString?: string; | ||
[key: string]: any; | ||
} | ||
@@ -181,4 +181,4 @@ | ||
interface OrderBySortConfs<T, C> { | ||
field?: string | ((this: C, item: T, index: number, list: T[]) => any) | null; | ||
order?: 'asc' | 'desc' | null; | ||
field?: string | ((this: C, item: T, index: number, list: T[]) => any) | null; | ||
order?: 'asc' | 'desc' | null; | ||
} | ||
@@ -199,3 +199,3 @@ | ||
* @param list 数组 | ||
*/ | ||
*/ | ||
export function shuffle<T>(list: T[]): T[]; | ||
@@ -462,14 +462,14 @@ | ||
export interface ToArrayTreeOptions<T> { | ||
strict?: boolean; | ||
key?: string; | ||
parentKey?: string; | ||
children?: string; | ||
mapChildren?: string; | ||
sortKey?: OrderByFieldConfs<T, any>; | ||
data?: string; | ||
/** | ||
* 已废弃,被 sortKey: { ...,order: 'desc' } 替换 | ||
* @deprecated | ||
*/ | ||
reverse?: boolean; | ||
strict?: boolean; | ||
key?: string; | ||
parentKey?: string; | ||
children?: string; | ||
mapChildren?: string; | ||
sortKey?: OrderByFieldConfs<T, any>; | ||
data?: string; | ||
/** | ||
* 已废弃,被 sortKey: { ...,order: 'desc' } 替换 | ||
* @deprecated | ||
*/ | ||
reverse?: boolean; | ||
} | ||
@@ -486,8 +486,8 @@ | ||
export interface ToTreeArrayOptions { | ||
key?: string; | ||
parentKey?: string; | ||
children?: string; | ||
data?: string; | ||
updated?: boolean | ||
clear?: boolean; | ||
key?: string; | ||
parentKey?: string; | ||
children?: string; | ||
data?: string; | ||
updated?: boolean | ||
clear?: boolean; | ||
} | ||
@@ -504,12 +504,12 @@ | ||
export interface FindTerrResult<T = any> { | ||
index: number; | ||
item: T; | ||
path: Array<string>; | ||
items: T[]; | ||
parent: T; | ||
nodes: T[]; | ||
index: number; | ||
item: T; | ||
path: Array<string>; | ||
items: T[]; | ||
parent: T; | ||
nodes: T[]; | ||
} | ||
export interface FindTreeOptions { | ||
children?: string; | ||
children?: string; | ||
} | ||
@@ -527,3 +527,3 @@ | ||
export interface EachTreeOptions { | ||
children?: string; | ||
children?: string; | ||
} | ||
@@ -543,4 +543,4 @@ | ||
export interface MapTreeOptions { | ||
children?: string; | ||
mapChildren?: string; | ||
children?: string; | ||
mapChildren?: string; | ||
} | ||
@@ -560,3 +560,3 @@ | ||
export interface FilterTreeOptions { | ||
children?: string; | ||
children?: string; | ||
} | ||
@@ -574,7 +574,7 @@ | ||
export interface SearchTreeOptions { | ||
isEvery?: boolean | ||
children?: string; | ||
mapChildren?: string; | ||
original?: boolean; | ||
data?: string; | ||
isEvery?: boolean | ||
children?: string; | ||
mapChildren?: string; | ||
original?: boolean; | ||
data?: string; | ||
} | ||
@@ -1127,26 +1127,26 @@ | ||
export interface CommafyOptions { | ||
/** | ||
* 分割位数,默认3 | ||
*/ | ||
spaceNumber?: number; | ||
/** | ||
* 分隔符,默认',' | ||
*/ | ||
separator?: string; | ||
/** | ||
* 只对 number 类型有效,小数位数,默认null | ||
*/ | ||
digits?: number; | ||
/** | ||
* 只对 number 类型有效,四舍五入,默认true | ||
*/ | ||
round?: boolean; | ||
/** | ||
* 只对 number 类型有效,向上舍入 | ||
*/ | ||
ceil?: boolean; | ||
/** | ||
* 只对 number 类型有效,向下舍入 | ||
*/ | ||
floor?: boolean; | ||
/** | ||
* 分割位数,默认3 | ||
*/ | ||
spaceNumber?: number; | ||
/** | ||
* 分隔符,默认',' | ||
*/ | ||
separator?: string; | ||
/** | ||
* 只对 number 类型有效,小数位数,默认null | ||
*/ | ||
digits?: number; | ||
/** | ||
* 只对 number 类型有效,四舍五入,默认true | ||
*/ | ||
round?: boolean; | ||
/** | ||
* 只对 number 类型有效,向上舍入 | ||
*/ | ||
ceil?: boolean; | ||
/** | ||
* 只对 number 类型有效,向下舍入 | ||
*/ | ||
floor?: boolean; | ||
} | ||
@@ -1308,36 +1308,36 @@ | ||
export type ToDateStringFormats = { | ||
/** | ||
* 用于格式化季度 | ||
* 例如:[null, '第一季度', '第二季度', '第三季度', '第四季度'] | ||
*/ | ||
q?: string[] | { | ||
1: string | ||
2: string | ||
3: string | ||
4: string | ||
} | ((value: string | number, match: string, date: Date) => string); | ||
/** | ||
* 用于格式化周 | ||
* 例如:['日', '一', '二', '三', '四', '五', '六'] | ||
*/ | ||
E?: string[] | { | ||
0: string | ||
1: string | ||
2: string | ||
3: string | ||
4: string | ||
5: string | ||
6: string | ||
} | ((value: string | number, match: string, date: Date) => string); | ||
/** | ||
* 用于格式化季度 | ||
* 例如:[null, '第一季度', '第二季度', '第三季度', '第四季度'] | ||
*/ | ||
q?: string[] | { | ||
1: string | ||
2: string | ||
3: string | ||
4: string | ||
} | ((value: string | number, match: string, date: Date) => string); | ||
/** | ||
* 用于格式化周 | ||
* 例如:['日', '一', '二', '三', '四', '五', '六'] | ||
*/ | ||
E?: string[] | { | ||
0: string | ||
1: string | ||
2: string | ||
3: string | ||
4: string | ||
5: string | ||
6: string | ||
} | ((value: string | number, match: string, date: Date) => string); | ||
} | ||
export interface ToDateStringOptions { | ||
/** | ||
* 默认周视图的起始天 | ||
*/ | ||
firstDay?: FirstDayOfWeek; | ||
/** | ||
* 自定义格式化模板 | ||
*/ | ||
formats?: ToDateStringFormats | ||
/** | ||
* 默认周视图的起始天 | ||
*/ | ||
firstDay?: FirstDayOfWeek; | ||
/** | ||
* 自定义格式化模板 | ||
*/ | ||
formats?: ToDateStringFormats | ||
} | ||
@@ -1482,38 +1482,38 @@ | ||
export interface DateDiffResult { | ||
/** | ||
* 是否计算完成(如果结束日期小于开始日期 done 为 fasle) | ||
*/ | ||
done: boolean; | ||
/** | ||
* 相差多少毫秒 | ||
*/ | ||
time: number; | ||
/** | ||
* 年 | ||
*/ | ||
yyyy: number; | ||
/** | ||
* 月 | ||
*/ | ||
MM: number; | ||
/** | ||
* 日 | ||
*/ | ||
dd: number; | ||
/** | ||
* 时 | ||
*/ | ||
HH: number; | ||
/** | ||
* 分 | ||
*/ | ||
mm: number; | ||
/** | ||
* 秒 | ||
*/ | ||
ss: number; | ||
/** | ||
* 毫秒 | ||
*/ | ||
S: number; | ||
/** | ||
* 是否计算完成(如果结束日期小于开始日期 done 为 fasle) | ||
*/ | ||
done: boolean; | ||
/** | ||
* 相差多少毫秒 | ||
*/ | ||
time: number; | ||
/** | ||
* 年 | ||
*/ | ||
yyyy: number; | ||
/** | ||
* 月 | ||
*/ | ||
MM: number; | ||
/** | ||
* 日 | ||
*/ | ||
dd: number; | ||
/** | ||
* 时 | ||
*/ | ||
HH: number; | ||
/** | ||
* 分 | ||
*/ | ||
mm: number; | ||
/** | ||
* 秒 | ||
*/ | ||
ss: number; | ||
/** | ||
* 毫秒 | ||
*/ | ||
S: number; | ||
} | ||
@@ -1659,4 +1659,4 @@ | ||
*/ | ||
export function toValueString(obj: number | string | any[] | null): string; | ||
export function toValueString(obj: any): string; | ||
export function toValueString(obj: number | string | any[] | null): string; | ||
export function toValueString(obj: any): string; | ||
@@ -1702,10 +1702,10 @@ /** | ||
export interface ThrottleOptions { | ||
/** | ||
* 是否在之前执行 | ||
*/ | ||
leading?: boolean; | ||
/** | ||
* 是否在之后执行 | ||
*/ | ||
trailing?: boolean; | ||
/** | ||
* 是否在之前执行 | ||
*/ | ||
leading?: boolean; | ||
/** | ||
* 是否在之后执行 | ||
*/ | ||
trailing?: boolean; | ||
} | ||
@@ -1722,10 +1722,10 @@ | ||
export interface DebounceOptions { | ||
/** | ||
* 是否在之前执行 | ||
*/ | ||
leading?: boolean; | ||
/** | ||
* 是否在之后执行 | ||
*/ | ||
trailing?: boolean; | ||
/** | ||
* 是否在之前执行 | ||
*/ | ||
leading?: boolean; | ||
/** | ||
* 是否在之后执行 | ||
*/ | ||
trailing?: boolean; | ||
} | ||
@@ -1750,50 +1750,50 @@ | ||
export interface XEUrl { | ||
/** | ||
* 获取完整的地址 | ||
*/ | ||
href: string; | ||
/** | ||
* 获取 #Hash 的完整字符串 | ||
*/ | ||
hash: string; | ||
/** | ||
* 获取主机信息 | ||
*/ | ||
host: string; | ||
/** | ||
* 主机主机名 | ||
*/ | ||
hostname: string; | ||
/** | ||
* 获取地址的协议类型 | ||
*/ | ||
protocol: string; | ||
/** | ||
* 获取端口信息 | ||
*/ | ||
port: string; | ||
/** | ||
* 查询字符串 | ||
*/ | ||
search: string; | ||
/** | ||
* 获取路径字符串 | ||
*/ | ||
pathname: string; | ||
/** | ||
* 获取 #hash 键值 | ||
*/ | ||
origin: string; | ||
/** | ||
* 获取 #hash 键值,不包括参数 | ||
*/ | ||
hashKey: string; | ||
/** | ||
* 获取 #hash 对象参数 | ||
*/ | ||
hashQuery: any; | ||
/** | ||
* 获取查询对象参数 | ||
*/ | ||
searchQuery: any; | ||
/** | ||
* 获取完整的地址 | ||
*/ | ||
href: string; | ||
/** | ||
* 获取 #Hash 的完整字符串 | ||
*/ | ||
hash: string; | ||
/** | ||
* 获取主机信息 | ||
*/ | ||
host: string; | ||
/** | ||
* 主机主机名 | ||
*/ | ||
hostname: string; | ||
/** | ||
* 获取地址的协议类型 | ||
*/ | ||
protocol: string; | ||
/** | ||
* 获取端口信息 | ||
*/ | ||
port: string; | ||
/** | ||
* 查询字符串 | ||
*/ | ||
search: string; | ||
/** | ||
* 获取路径字符串 | ||
*/ | ||
pathname: string; | ||
/** | ||
* 获取 #hash 键值 | ||
*/ | ||
origin: string; | ||
/** | ||
* 获取 #hash 键值,不包括参数 | ||
*/ | ||
hashKey: string; | ||
/** | ||
* 获取 #hash 对象参数 | ||
*/ | ||
hashQuery: any; | ||
/** | ||
* 获取查询对象参数 | ||
*/ | ||
searchQuery: any; | ||
} | ||
@@ -1832,58 +1832,58 @@ | ||
export interface XEBrowse { | ||
/** | ||
* 判断是否 NodeJs 环境 | ||
*/ | ||
isNode: boolean; | ||
/** | ||
* 判断是否有 document 元素 | ||
*/ | ||
isDoc: boolean; | ||
/** | ||
* 判断是否 Edge 浏览器 | ||
*/ | ||
edge: boolean; | ||
/** | ||
* 判断是否 Firefox 浏览器 | ||
*/ | ||
firefox: boolean; | ||
/** | ||
* 判断是否 IE 浏览器 | ||
*/ | ||
msie: boolean; | ||
/** | ||
* 判断是否 Safari 浏览器 | ||
*/ | ||
safari: boolean; | ||
/** | ||
* 判断是否移动端 | ||
*/ | ||
isMobile: boolean; | ||
/** | ||
* 判断是否 PC 端 | ||
*/ | ||
isPC: boolean; | ||
/** | ||
* 判断浏览器是否支持 LocalStorage | ||
*/ | ||
isLocalStorage: boolean; | ||
/** | ||
* 判断浏览器是否支持 SessionStorage | ||
*/ | ||
isSessionStorage: boolean; | ||
/** | ||
* 判断浏览器是否 -webkit 内核 | ||
*/ | ||
'-webkit': boolean; | ||
/** | ||
* 判断浏览器是否 -moz 内核 | ||
*/ | ||
'-moz': boolean; | ||
/** | ||
* 判断浏览器是否 -ms 内核 | ||
*/ | ||
'-ms': boolean; | ||
/** | ||
* 判断浏览器是否 -o 内核 | ||
*/ | ||
'-o': boolean; | ||
/** | ||
* 判断是否 NodeJs 环境 | ||
*/ | ||
isNode: boolean; | ||
/** | ||
* 判断是否有 document 元素 | ||
*/ | ||
isDoc: boolean; | ||
/** | ||
* 判断是否 Edge 浏览器 | ||
*/ | ||
edge: boolean; | ||
/** | ||
* 判断是否 Firefox 浏览器 | ||
*/ | ||
firefox: boolean; | ||
/** | ||
* 判断是否 IE 浏览器 | ||
*/ | ||
msie: boolean; | ||
/** | ||
* 判断是否 Safari 浏览器 | ||
*/ | ||
safari: boolean; | ||
/** | ||
* 判断是否移动端 | ||
*/ | ||
isMobile: boolean; | ||
/** | ||
* 判断是否 PC 端 | ||
*/ | ||
isPC: boolean; | ||
/** | ||
* 判断浏览器是否支持 LocalStorage | ||
*/ | ||
isLocalStorage: boolean; | ||
/** | ||
* 判断浏览器是否支持 SessionStorage | ||
*/ | ||
isSessionStorage: boolean; | ||
/** | ||
* 判断浏览器是否 -webkit 内核 | ||
*/ | ||
'-webkit': boolean; | ||
/** | ||
* 判断浏览器是否 -moz 内核 | ||
*/ | ||
'-moz': boolean; | ||
/** | ||
* 判断浏览器是否 -ms 内核 | ||
*/ | ||
'-ms': boolean; | ||
/** | ||
* 判断浏览器是否 -o 内核 | ||
*/ | ||
'-o': boolean; | ||
} | ||
@@ -1897,26 +1897,26 @@ | ||
export interface CookieOptions { | ||
/** | ||
* 键 | ||
*/ | ||
name?: string; | ||
/** | ||
* 值 | ||
*/ | ||
value?: string; | ||
/** | ||
* 路径 | ||
*/ | ||
path?: string; | ||
/** | ||
* 作用域 | ||
*/ | ||
domain?: string; | ||
/** | ||
* 设置为安全的,只能用https协议 | ||
*/ | ||
secure?: string; | ||
/** | ||
* 过期时间,可以指定日期或者字符串,默认天 | ||
*/ | ||
expires?: string; | ||
/** | ||
* 键 | ||
*/ | ||
name?: string; | ||
/** | ||
* 值 | ||
*/ | ||
value?: string; | ||
/** | ||
* 路径 | ||
*/ | ||
path?: string; | ||
/** | ||
* 作用域 | ||
*/ | ||
domain?: string; | ||
/** | ||
* 设置为安全的,只能用https协议 | ||
*/ | ||
secure?: string; | ||
/** | ||
* 过期时间,可以指定日期或者字符串,默认天 | ||
*/ | ||
expires?: string; | ||
} | ||
@@ -1951,38 +1951,38 @@ | ||
export type XECookie = typeof CookieFunc & { | ||
/** | ||
* 根据 name 判断 Cookie 是否存在 | ||
* @param name 键 | ||
*/ | ||
has(name: string): boolean; | ||
/** | ||
* 根据 name 判断 Cookie 是否存在 | ||
* @param name 键 | ||
*/ | ||
has(name: string): boolean; | ||
/** | ||
* 添加 Cookie | ||
* @param name 键 | ||
* @param value 值 | ||
* @param options 可选参数 | ||
*/ | ||
set(name: string, value: any, options?: CookieOptions): XECookie; | ||
/** | ||
* 添加 Cookie | ||
* @param name 键 | ||
* @param value 值 | ||
* @param options 可选参数 | ||
*/ | ||
set(name: string, value: any, options?: CookieOptions): XECookie; | ||
/** | ||
* 根据 name 获取 Cookie | ||
* @param name 键 | ||
*/ | ||
get(name: string): string; | ||
/** | ||
* 根据 name 获取 Cookie | ||
* @param name 键 | ||
*/ | ||
get(name: string): string; | ||
/** | ||
* 根据 name 删除 Cookie | ||
* @param name 键 | ||
* @param options 可选参数 | ||
*/ | ||
remove(name: string, options?: CookieOptions): number; | ||
/** | ||
* 根据 name 删除 Cookie | ||
* @param name 键 | ||
* @param options 可选参数 | ||
*/ | ||
remove(name: string, options?: CookieOptions): number; | ||
/** | ||
* 获取 Cookie 所有键 | ||
*/ | ||
keys(): any[]; | ||
/** | ||
* 获取 Cookie 所有键 | ||
*/ | ||
keys(): any[]; | ||
/** | ||
* 获取所有 Cookie | ||
*/ | ||
getJSON(): any; | ||
/** | ||
* 获取所有 Cookie | ||
*/ | ||
getJSON(): any; | ||
} | ||
@@ -1989,0 +1989,0 @@ |
/** | ||
* xe-utils.js v3.6.0 | ||
* xe-utils.js v3.7.0 | ||
* MIT License. | ||
* @preserve | ||
*/ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.XEUtils=t()}(this,function(){"use strict";function r(){}var y={cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};function n(u){return function(n,t){var r,e,t=N(t)?t:y.firstDayOfWeek,n=lr(n,0,t,t);return I(n)?(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t<(e=(n=u(n)).getDay())&&n.setDate(7-e+t+1),e<t&&n.setDate(t-e+1),Math.floor((f(r)-f(n))/hn+1)):NaN}}function t(n,e){var u=Object[n];return function(t){var r=[];if(t){if(u)return u(t);A(t,1<e?function(n){r.push([""+n,t[n]])}:function(){r.push(arguments[e])})}return r}}function _(e,u){return function(n,t){if(n){if(n[e])return n[e](t);if(w(n)||D(n))return u(n,t);for(var r in n)if(d(n,r)&&t===n[r])return r}return-1}}function H(t){return function(n){return"[object "+t+"]"===dn.call(n)}}function Z(t){return function(n){return typeof n===t}}function C(o,a,c,f,l){return function(n,t,r){if(n&&t){if(o&&n[o])return n[o](t,r);if(a&&D(n)){for(var e=0,u=n.length;e<u;e++)if(!!t.call(r,n[e],e,n)===f)return[!0,!1,e,n[e]][c]}else for(var i in n)if(d(n,i)&&!!t.call(r,n[i],i,n)===f)return[!0,!1,i,n[i]][c]}return l}}function L(u){return function(n,t,r){if(n&&M(t)){if(D(n)||w(n))return u(n,t,r);for(var e in n)if(d(n,e)&&t.call(r,n[e],e,n))return e}return-1}}function P(o){return function(n,t){var n=W(n),r=n;if(n){t>>=0;var e=F(n).split("."),u=e[0],e=e[1]||"",i=e.substring(0,t+1),u=u+(i?"."+i:"");if(t>=e.length)return W(u);u=n,r=0<t?(i=Math.pow(10,t),Math[o](un(u,i))/i):Math[o](u)}return r}}function Y(o){return function(r,e){var u,i;return r&&r.length?(O(r,function(n,t){m(n=e?M(e)?e(n,t,r):Dt(n,e):n)||!m(u)&&!o(u,n)||(i=t,u=n)}),r[i]):u}}function U(f,l){return function(r,e){var n,t,u={},i=[],o=this,a=arguments,c=a.length;if(!M(e)){for(t=1;t<c;t++)i.push.apply(i,D(n=a[t])?n:[n]);e=0}return A(r,function(n,t){((e?e.call(o,n,t,r):-1<pt(i,function(n){return n===t}))?f:l)&&(u[t]=n)}),u}}function q(t){return function(n){if(n){n=t(n&&n.replace?n.replace(/,/g,""):n);if(!isNaN(n))return n}return 0}}function B(i){return function(n,t,r,e){var r=r||{},u=r.children||"children";return i(null,n,t,e,[],[],u,r)}}function J(n,t){return n===t}function K(t,r){try{delete t[r]}catch(n){t[r]=void 0}}function Q(r,e,u,i,n,t,o){if(r===e)return!0;if(r&&e&&!N(r)&&!N(e)&&!w(r)&&!w(e)){if(Kn(r))return u(""+r,""+e,n,t,o);if(E(r)||Jn(r))return u(+r,+e,n,t,o);var a,c,f,l=D(r),s=D(e);if(l||s?l&&s:r.constructor===e.constructor)return c=j(r),f=j(e),i&&(a=i(r,e,n)),c.length===f.length&&(b(a)?Wn(c,function(n,t){return n===f[t]&&Q(r[n],e[f[t]],u,i,l||s?t:n,r,e)}):!!a)}return u(r,e,n,t,o)}function V(t){var r=new RegExp("(?:"+j(t).join("|")+")","g");return function(n){return $(n).replace(r,function(n){return t[n]})}}function X(n){return n.getFullYear()}function G(n){return n.getMonth()}function f(n){return n.getTime()}function nn(n){return n?n.splice&&n.join?n:(""+n).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function tn(){return h?h.origin||h.protocol+"//"+h.host:""}function rn(n){return Date.UTC(n.y,n.M||0,n.d||1,n.H||0,n.m||0,n.s||0,n.S||0)}function en(n){return f((n=n,new Date(X(n),G(n),n.getDate())))}function un(n,t){n=F(n),t=F(t);return parseInt(n.replace(".",""))*parseInt(t.replace(".",""))/Math.pow(10,i(n)+i(t))}function on(){return new Date}function an(n,t){var r=F(n),e=F(t),r=Math.pow(10,Math.max(i(r),i(e)));return(_t(n,r)+_t(t,r))/r}function i(n){return(n.split(".")[1]||"").length}function cn(n,t){var n=F(n),t=F(t),r=i(n),r=i(t)-r,e=r<0,r=Math.pow(10,e?Math.abs(r):r);return _t(n.replace(".","")/t.replace(".",""),e?1/r:r)}function fn(n,t){return n.substring(0,t)+"."+n.substring(t,n.length)}function o(n){return n.toLowerCase()}function l(n,t){return n.repeat?n.repeat(t):(t=isNaN(t)?[]:new Array(g(t))).join(n)+(0<t.length?n:"")}function a(n,t,r){return n.substring(t,r)}function ln(n){return n.toUpperCase()}r.VERSION="3.6.0",r.mixin=function(){O(arguments,function(n){A(n,function(t,n){r[n]=M(t)?function(){var n=t.apply(r.$context,arguments);return r.$context=null,n}:t})})},r.setup=function(n){return S(y,n)};var c="undefined",sn="last",e="first",s=864e5,hn=7*s,h=typeof location==c?0:location,pn=typeof window==c?0:window,p=typeof document==c?0:document,gn=encodeURIComponent,vn=decodeURIComponent,dn=Object.prototype.toString,g=parseInt,yn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},mn=/(.+)?\[(\d+)\]$/,bn=Object.assign;function Dn(t,n,r){for(var e,u=n.length,i=1;i<u;i++)e=n[i],O(j(n[i]),r?function(n){t[n]=Et(e[n],r)}:function(n){t[n]=e[n]});return t}var S=function(n){if(n){var t=arguments;if(!0!==n)return bn?bn.apply(Object,t):Dn(n,t);if(1<t.length)return Dn(n=D(n[1])?[]:{},t,!0)}return n};function Mn(n,t,r){if(n)for(var e in n)d(n,e)&&t.call(r,n[e],e,n)}function Sn(t,r,e){Ln(j(t),function(n){r.call(e,t[n],n,t)})}function On(r,e,u){var i,o,a=[];return e?(M(e)||(e=Sr(e)),o={},A(r,function(n,t){i=e.call(u,n,t,r),o[i]||(o[i]=1,a.push(n))})):A(r,function(n){Tn(a,n)||a.push(n)}),a}var wn=kn,Nn="asc",xn="desc";function En(n,t){return b(n)?1:k(n)?b(t)?-1:1:n&&n.localeCompare?n.localeCompare(t):t<n?1:-1}function kn(n,t,r){if(n){if(m(t))return Hn(n).sort(En);for(var e,u=$n(n,function(n){return{data:n}}),i=(a=n,c=u,f=r,l=[],O(n=D(n=t)?n:[n],function(n,r){var e,t;n&&(D(e=n)?(e=n[0],t=n[1]):x(n)&&(e=n.field,t=n.order),l.push({field:e,order:t||Nn}),O(c,M(e)?function(n,t){n[r]=e.call(f,n.data,t,a)}:function(n){n[r]=e?Dt(n.data,e):n.data}))}),l),o=i.length-1;0<=o;)e=function(u,i,o){return function(n,t){var r=n[u],e=t[u];return r===e?o?o(n,t):0:i.order===xn?En(e,r):En(r,e)}}(o,i[o],e),o--;return $n(u=e?u.sort(e):u,Sr("data"))}var a,c,f,l;return[]}function jn(n){for(var t,r=[],e=vt(n),u=e.length-1;0<=u;u--)t=0<u?At(0,u):0,r.push(e[t]),e.splice(t,1);return r}var An=C("some",1,0,!0,!1),Wn=C("every",1,1,!1,!0);function v(n,t,r){var e=[],u=arguments.length;if(n){if(t=2<=u?W(t):0,r=3<=u?W(r):n.length,n.slice)return n.slice(t,r);for(;t<r;t++)e.push(n[t])}return e}var Fn=C("find",1,3,!0);var In=C("",0,2,!0);function Tn(n,t){if(n){if(n.includes)return n.includes(t);for(var r in n)if(d(n,r)&&t===n[r])return!0}return!1}function zn(n,t){if(n.indexOf)return n.indexOf(t);for(var r=0,e=n.length;r<e;r++)if(t===n[r])return r}function Rn(n,t){if(n.lastIndexOf)return n.lastIndexOf(t);for(var r=n.length-1;0<=r;r--)if(t===n[r])return r;return-1}function $n(n,t,r){var e=[];if(n&&1<arguments.length){if(n.map)return n.map(t,r);A(n,function(){e.push(t.apply(r,arguments))})}return e}function _n(n){var t,r,e,u=[];if(n&&n.length)for(t=0,e=(r=Ft(n,function(n){return n?n.length:0}))?r.length:0;t<e;t++)u.push(Cn(n,t));return u}function Hn(n){return $n(n,function(n){return n})}function Zn(n,t){var r,e=0;if(D(n)&&D(t)){for(r=t.length;e<r;e++)if(!Tn(n,t[e]))return!1;return!0}return Tn(n,t)}function Cn(n,t){return $n(n,Sr(t))}function O(n,t,r){if(n)if(n.forEach)n.forEach(t,r);else for(var e=0,u=n.length;e<u;e++)t.call(r,n[e],e,n)}function Ln(n,t,r){for(var e=n.length-1;0<=e;e--)t.call(r,n[e],e,n)}var Pn=B(function n(t,r,e,u,i,o,a,c){if(r)for(var f,l,s,h=0,p=r.length;h<p;h++){if(s=r[h],f=i.concat([""+h]),l=o.concat([s]),e.call(u,s,h,r,f,t,l))return{index:h,item:s,path:f,items:r,parent:t,nodes:l};if(a&&(s=s&&n(s,s[a],e,u,f.concat([a]),l,a,c)))return s}});var Yn=B(function r(e,u,i,o,a,c,f,l){var s,h;A(u,function(n,t){s=a.concat([""+t]),h=c.concat([n]),i.call(o,n,t,u,s,e,h),n&&f&&(s.push(f),r(n,n[f],i,o,s,h,f,l))})});var Un=B(function r(e,u,i,o,a,c,f,l){var s,h,p,g=l.mapChildren||f;return $n(u,function(n,t){return s=a.concat([""+t]),h=c.concat([n]),(p=i.call(o,n,t,u,s,e,h))&&n&&f&&n[f]&&(p[g]=r(n,n[f],i,o,s,h,f,l)),p})});var qn=B(function(n,t,r,e,u,i,o,a){return function r(e,u,i,o,a,c,f,l,s){var h,p,g,v,d,y=[],m=s.original,b=s.data,D=s.mapChildren||l,M=s.isEvery;return O(i,function(n,t){h=c.concat([""+t]),p=f.concat([n]),v=e&&!M||o.call(a,n,t,i,h,u,p),d=l&&n[l],v||d?(m?g=n:(g=S({},n),b&&(g[b]=n)),g[D]=r(v,n,n[l],o,a,h,p,l,s),(v||g[D].length)&&y.push(g)):v&&y.push(g)}),y}(0,n,t,r,e,u,i,o,a)});function d(n,t){return!(!n||!n.hasOwnProperty)&&n.hasOwnProperty(t)}function m(n){return k(n)||b(n)}var b=Z(c),D=Array.isArray||H("Array");function Bn(n){return!k(n)&&!isNaN(n)&&!D(n)&&n%1==0}var M=Z("function"),Jn=Z("boolean"),w=Z("string"),N=Z("number"),Kn=H("RegExp"),Qn=Z("object");function x(n){return!!n&&n.constructor===Object}var E=H("Date"),Vn=H("Error");function Xn(n){for(var t in n)return!1;return!0}function k(n){return null===n}var Gn=typeof Symbol!=c;function nt(n){return Gn&&Symbol.isSymbol?Symbol.isSymbol(n):"symbol"==typeof n}var tt=H("Arguments");var rt=typeof FormData!=c;var et=typeof Map!=c;var ut=typeof WeakMap!=c;var it=typeof Set!=c;var ot=typeof WeakSet!=c;function at(n){var n=n?T(n):on();return!!E(n)&&(n=n.getFullYear())%4==0&&(n%100!=0||n%400==0)}function ct(n,t){return Q(n,t,J)}var ft=0;function lt(n){var t=0;return w(n)||D(n)?n.length:(A(n,function(){t++}),t)}var st=_("indexOf",zn),ht=_("lastIndexOf",Rn),pt=L(function(n,t,r){for(var e=0,u=n.length;e<u;e++)if(t.call(r,n[e],e,n))return e;return-1}),gt=L(function(n,t,r){for(var e=n.length-1;0<=e;e--)if(t.call(r,n[e],e,n))return e;return-1});var j=t("keys",1),vt=t("values",0),dt=t("entries",2),yt=U(1,0),mt=U(0,1);function A(n,t,r){return n&&(D(n)?O:Mn)(n,t,r)}function bt(n,t,r){return n&&(D(n)?Ln:Sn)(n,t,r)}function Dt(n,t,r){return m(n)||(n=function(n,t){if(n){var r,e,u,i=0;if(n[t]||d(n,t))return n[t];if(e=nn(t),u=e.length)for(r=n;i<u;i++)if(m(r=function(n,t){var r=t?t.match(mn):"";return r?r[1]?n[r[1]]?n[r[1]][r[2]]:void 0:n[r[2]]:n[t]}(r,e[i])))return i===u-1?r:void 0;return r}}(n,t),b(n))?r:n}var Mt=/(.+)?\[(\d+)\]$/;function St(n){return"__proto__"===n||"constructor"===n||"prototype"===n}function Ot(r,e,u){var i,n,o={};return r&&(e&&Qn(e)?(n=e,e=function(){return Xn(n)}):M(e)||(e=Sr(e)),A(r,function(n,t){i=e?e.call(u,n,t,r):n,o[i]?o[i].push(n):o[i]=[n]})),o}function wt(n,t){n=n.__proto__.constructor;return t?new n(t):new n}function Nt(n,t){return t?xt(n,t):n}function xt(n,r){if(n)switch(dn.call(n)){case"[object Object]":var e=Object.create(Object.getPrototypeOf(n));return Mn(n,function(n,t){e[t]=Nt(n,r)}),e;case"[object Date]":case"[object RegExp]":return wt(n,n.valueOf());case"[object Array]":case"[object Arguments]":var t=[];return O(n,function(n){t.push(Nt(n,r))}),t;case"[object Set]":var u=wt(n);return u.forEach(function(n){u.add(Nt(n,r))}),u;case"[object Map]":var i=wt(n);return i.forEach(function(n,t){i.set(t,Nt(n,r))}),i}return n}function Et(n,t){return n&&xt(n,t)}function kt(r,e,n){if(r){var t,u=1<arguments.length&&(k(e)||!Qn(e)),n=u?n:e;if(x(r))Mn(r,u?function(n,t){r[t]=e}:function(n,t){K(r,t)}),n&&S(r,n);else if(D(r)){if(u)for(t=r.length;0<t;)r[--t]=e;else r.length=0;n&&r.push.apply(r,n)}}return r}function jt(r,e,u){var i,o,a;return r&&(m(e)?kt(r):(i=[],o=[],M(e)||(a=e,e=function(n,t){return t===a}),A(r,function(n,t,r){e.call(u,n,t,r)&&i.push(t)}),D(r)?bt(i,function(n,t){o.push(r[n]),r.splice(n,1)}):(o={},O(i,function(n){o[n]=r[n],K(r,n)})),o))}function At(n,t){return t<=n?n:(n>>=0)+Math.round(Math.random()*((t||9)-n))}var Wt=Y(function(n,t){return t<n}),Ft=Y(function(n,t){return n<t});var It=P("round"),Tt=P("ceil"),zt=P("floor");function Rt(n,t){var n=$(It(n,t>>=0)).split("."),r=n[0],n=n[1]||"",e=t-n.length;return t?0<e?r+"."+n+l("0",e):r+fn(n,Math.abs(e)):r}var W=q(parseFloat);function F(n){var t,r,e,u,i,o,a,c=""+n,f=c.match(/^([-+]?)((\d+)|((\d+)?[.](\d+)?))e([-+]{1})([0-9]+)$/);return f?(n=n<0?"-":"",t=f[3]||"",r=f[5]||"",e=f[6]||"",u=f[7],i=(f=f[8])-e.length,o=f-t.length,a=f-r.length,"+"===u?t?n+t+l("0",f):0<i?n+r+e+l("0",i):n+r+fn(e,f):t?0<o?n+"0."+l("0",Math.abs(o))+t:n+fn(t,o):0<a?n+"0."+l("0",Math.abs(a))+r+e:n+fn(r,a)+e):c}var $t=q(g);function _t(n,t){return un(W(n),W(t))}function Ht(n,t,r){var e=0;return A(n&&2<n.length&&D(n)?n.sort():n,t?M(t)?function(){e=an(e,t.apply(r,arguments))}:function(n){e=an(e,Dt(n,t))}:function(n){e=an(e,n)}),e}var Zt=Date.now||function(){return f(on())};function I(n){return E(n)&&!isNaN(f(n))}function Ct(n){return"(\\d{"+n+"})"}function Lt(n){return isNaN(n)?n:g(n)}for(var Pt=Ct(2),Yt=Ct("1,2"),Ut=Ct("1,7"),qt=Ct("3,4"),Bt=".{1}"+Yt,Jt="(([zZ])|([-+]\\d{2}:?\\d{2}))",Kt=[qt,Bt,Bt,Bt,Bt,Bt,".{1}"+Ut,Jt],Qt=[],Vt=Kt.length-1;0<=Vt;Vt--){for(var Xt="",Gt=0;Gt<Vt+1;Gt++)Xt+=Kt[Gt];Qt.push(new RegExp("^"+Xt+"$"))}for(var nr=[["yyyy",qt],["yy",Pt],["MM",Pt],["M",Yt],["dd",Pt],["d",Yt],["HH",Pt],["H",Yt],["mm",Pt],["m",Yt],["ss",Pt],["s",Yt],["SSS",Ct(3)],["S",Ut],["Z",Jt]],tr={},rr=["\\[([^\\]]+)\\]"],Gt=0;Gt<nr.length;Gt++){var er=nr[Gt];tr[er[0]]=er[1]+"?",rr.push(er[0])}var ur=new RegExp(rr.join("|"),"g"),ir={};function T(n,t){if(n){var r=E(n);if(r||!t&&/^[0-9]{11,15}$/.test(n))return new Date((r?f:g)(n));if(w(n)){r=t?function(n,t){var e,r,u=ir[t],i=(u||(e=[],r=t.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(ur,function(n,t){var r=n.charAt(0);return"["===r?t:(e.push(r),tr[n])}),u=ir[t]={_i:e,_r:new RegExp(r)}),{}),o=n.match(u._r);if(o)for(var a=u._i,c=1,f=o.length;c<f;c++)i[a[c-1]]=o[c];return i}(n,t):function(n){for(var t,r={},e=0,u=Qt.length;e<u;e++)if(t=n.match(Qt[e])){r.y=t[1],r.M=t[2],r.d=t[3],r.H=t[4],r.m=t[5],r.s=t[6],r.S=t[7],r.Z=t[8];break}return r}(n);if(r.y)return r.M&&(r.M=Lt(r.M)-1),r.S&&(r.S=(t=Lt(r.S.substring(0,3)))<10?100*t:t<100?10*t:t),r.Z?/^[zZ]/.test((n=r).Z)?new Date(rn(n)):(t=n.Z.match(/([-+])(\d{2}):?(\d{2})/))?new Date(rn(n)-("-"===t[1]?-1:1)*g(t[2])*36e5+6e4*g(t[3])):new Date(""):new Date(r.y,r.M||0,r.d||1,r.H||0,r.m||0,r.s||0,r.S||0)}}return new Date("")}function z(n,t,r,e){t=t[r];return t?M(t)?t(e,r,n):t[e]:e}var or=/\[([^\]]+)]|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 ar(e,n,r){var u,t,i,o,a;return e?I(e=T(e))?(n=n||y.parseDateFormat||y.formatString,u=e.getHours(),t=u<12?"am":"pm",i=S({},y.parseDateRules||y.formatStringMatchs,r?r.formats:null),a={yyyy:o=function(n,t){return(""+X(e)).substr(4-t)},yy:o,MM:o=function(n,t){return R(G(e)+1,t,"0")},M:o,dd:o=function(n,t){return R(e.getDate(),t,"0")},d:o,HH:o=function(n,t){return R(u,t,"0")},H:o,hh:o=function(n,t){return R(u<=12?u:u-12,t,"0")},h:o,mm:o=function(n,t){return R(e.getMinutes(),t,"0")},m:o,ss:o=function(n,t){return R(e.getSeconds(),t,"0")},s:o,SSS:o=function(n,t){return R(e.getMilliseconds(),t,"0")},S:o,ZZ:o=function(n,t){var r=e.getTimezoneOffset()/60*-1;return z(e,i,n,(0<=r?"+":"-")+R(r,2,"0")+(1===t?":":"")+"00")},Z:o,WW:o=function(n,t){return R(z(e,i,n,pr(e,(r?r.firstDay:null)||y.firstDayOfWeek)),t,"0")},W:o,DDD:o=function(n,t){return R(z(e,i,n,hr(e)),t,"0")},D:o,a:function(n){return z(e,i,n,t)},A:function(n){return z(e,i,n,ln(t))},e:function(n){return z(e,i,n,e.getDay())},E:function(n){return z(e,i,n,e.getDay())},q:function(n){return z(e,i,n,Math.floor((G(e)+3)/3))}},n.replace(or,function(n,t){return t||(a[n]?a[n](n,n.length):n)})):"Invalid Date":""}function cr(n,t,r){if(I(n=T(n))&&(t&&(t=t&&!isNaN(t)?t:0,n.setFullYear(X(n)+t)),r||!isNaN(r))){if(r===e)return new Date(X(n),0,1);if(r===sn)return n.setMonth(11),fr(n,0,sn);n.setMonth(r)}return n}function fr(n,t,r){t=t&&!isNaN(t)?t:0;if(I(n=T(n))){if(r===e)return new Date(X(n),G(n)+t,1);if(r===sn)return new Date(f(fr(n,t+1,e))-1);if(N(r)&&n.setDate(r),t){r=n.getDate();if(n.setMonth(G(n)+t),r!==n.getDate())return n.setDate(1),new Date(f(n)-s)}}return n}function lr(n,t,r,e){var u,i,o;return I(n=T(n))?(o=N(r),i=N(e),u=f(n),(o||i)&&(i=i?e:y.firstDayOfWeek,(e=n.getDay())!==(o=o?r:e))&&(r=0,e<i?r=-(7-i+e):i<e&&(r=i-e),u+=i<o?((0===o?7:o)-i+r)*s:o<i?(7-i+o+r)*s:r*s),t&&!isNaN(t)&&(u+=t*hn),new Date(u)):n}function sr(n,t,r){if(I(n=T(n))&&!isNaN(t)){if(n.setDate(n.getDate()+g(t)),r===e)return new Date(X(n),G(n),n.getDate());if(r===sn)return new Date(f(sr(n,1,e))-1)}return n}function hr(n){return I(n=T(n))?Math.floor((en(n)-en(cr(n,0,e)))/s)+1:NaN}var pr=n(function(n){return new Date(n.getFullYear(),0,1)}),Bt=n(function(n){return new Date(n.getFullYear(),n.getMonth(),1)});var gr=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function vr(n){return n&&n.trim?n.trim():yr(dr(n))}function dr(n){return n&&n.trimLeft?n.trimLeft():$(n).replace(/^[\s\uFEFF\xA0]+/g,"")}function yr(n){return n&&n.trimRight?n.trimRight():$(n).replace(/[\s\uFEFF\xA0]+$/g,"")}var qt=V(yn),mr={},Pt=(A(yn,function(n,t){mr[yn[t]]=t}),V(mr)),br={};var Dr={};function R(n,t,r){n=$(n);return t>>=0,r=b(r)?" ":""+r,n.padStart?n.padStart(t,r):t>n.length?((t-=n.length)>r.length&&(r+=l(r,t/r.length)),r.slice(0,t)+n):n}function Mr(n,r,t){return $(n).replace((t||y).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(n,t){return Dt(r,vr(t))})}function $(n){return N(n)?F(n):""+(m(n)?"":n)}function Sr(t,r){return function(n){return k(n)?r:n[t]}}function Or(n){return Nr(n.split("?")[1]||"")}function wr(n){var e,t,u,n=""+n;return 0===n.indexOf("//")?n=(h?h.protocol:"")+n:0===n.indexOf("/")&&(n=tn()+n),t=n.replace(/#.*/,"").match(/(\?.*)/),(u={href:n,hash:"",host:"",hostname:"",protocol:"",port:"",search:t&&t[1]&&1<t[1].length?t[1]:""}).path=n.replace(/^([a-z0-9.+-]*:)\/\//,function(n,t){return u.protocol=t,""}).replace(/^([a-z0-9.+-]*)(:\d+)?\/?/,function(n,t,r){return e=r||"",u.port=e.replace(":",""),u.hostname=t,u.host=t+e,"/"}).replace(/(#.*)/,function(n,t){return u.hash=1<t.length?t:"",""}),t=u.hash.match(/#((.*)\?|(.*))/),u.pathname=u.path.replace(/(\?|#.*).*/,""),u.origin=u.protocol+"//"+u.host,u.hashKey=t&&(t[2]||t[1])||"",u.hashQuery=Or(u.hash),u.searchQuery=Or(u.search),u}function Nr(n){var t,r={};return n&&w(n)&&O(n.split("&"),function(n){t=n.split("="),r[vn(t[0])]=vn(t[1]||"")}),r}function xr(n){try{return n.setItem("__xe_t",1),n.removeItem("__xe_t"),!0}catch(n){return!1}}function Er(n){return-1<navigator.userAgent.indexOf(n)}function kr(n,t){var r=parseFloat(t),e=on(),u=f(e);switch(n){case"y":return f(cr(e,r));case"M":return f(fr(e,r));case"d":return f(sr(e,r));case"h":case"H":return u+60*r*60*1e3;case"m":return u+60*r*1e3;case"s":return u+1e3*r}return u}function jr(n){return(E(n)?n:new Date(n)).toUTCString()}function u(n,t,r){var e,u,i,o,a,c,f;return!!p&&(c=[],f=arguments,D(n)?c=n:1<f.length?c=[S({name:n,value:t},r)]:Qn(n)&&(c=[n]),0<c.length?(O(c,function(n){e=S({},y.cookies,n),i=[],e.name&&(u=e.expires,i.push(gn(e.name)+"="+gn(Qn(e.value)?JSON.stringify(e.value):e.value)),u&&(u=isNaN(u)?u.replace(/^([0-9]+)(y|M|d|H|h|m|s)$/,function(n,t,r){return jr(kr(r,t))}):/^[0-9]{11,13}$/.test(u)||E(u)?jr(u):jr(kr("d",u)),e.expires=u),O(["expires","path","domain","secure"],function(n){b(e[n])||i.push(e[n]&&"secure"===n?n:n+"="+e[n])})),p.cookie=i.join("; ")}),!0):(o={},(t=p.cookie)&&O(t.split("; "),function(n){a=n.indexOf("="),o[vn(n.substring(0,a))]=vn(n.substring(a+1)||"")}),1===f.length?o[n]:o))}function Ar(n){return u(n)}function Wr(n,t,r){return u(n,t,r),u}function Fr(n,t){u(n,"",S({expires:-1},y.cookies,t))}function Ir(){return j(u())}return S(u,{has:function(n){return Tn(Ir(),n)},set:Wr,setItem:Wr,get:Ar,getItem:Ar,remove:Fr,removeItem:Fr,keys:Ir,getJSON:function(){return u()}}),S(r,{assign:S,objectEach:Mn,lastObjectEach:Sn,objectMap:function(r,e,u){var i={};if(r){if(!e)return r;M(e)||(e=Sr(e)),A(r,function(n,t){i[t]=e.call(u,n,t,r)})}return i},merge:function(n){n=n||{};for(var t,r=arguments,e=r.length,u=1;u<e;u++)(t=r[u])&&!function r(e,n){return x(e)&&x(n)||D(e)&&D(n)?(A(n,function(n,t){e[t]=r(e[t],n)}),e):n}(n,t);return n},uniq:On,union:function(){for(var n=arguments,t=[],r=0,e=n.length;r<e;r++)t=t.concat(Hn(n[r]));return On(t)},sortBy:wn,orderBy:kn,shuffle:jn,sample:function(n,t){return n=jn(n),arguments.length<=1?n[0]:(t<n.length&&(n.length=t||0),n)},some:An,every:Wn,slice:v,filter:function(r,e,u){var i=[];if(r&&e){if(r.filter)return r.filter(e,u);A(r,function(n,t){e.call(u,n,t,r)&&i.push(n)})}return i},find:Fn,findLast:function(n,t,r){if(n)for(var e=(n=D(n)?n:vt(n)).length-1;0<=e;e--)if(t.call(r,n[e],e,n))return n[e]},findKey:In,includes:Tn,arrayIndexOf:zn,arrayLastIndexOf:Rn,map:$n,reduce:function(n,t,r){if(n){var e,u,i=0,o=r,r=2<arguments.length,a=j(n);if(n.length&&n.reduce)return u=function(){return t.apply(null,arguments)},r?n.reduce(u,o):n.reduce(u);for(r&&(i=1,o=n[a[0]]),e=a.length;i<e;i++)o=t.call(null,o,n[a[i]],i,n);return o}},copyWithin:function(n,t,r,e){if(D(n)&&n.copyWithin)return n.copyWithin(t,r,e);var u,i,o=t>>0,t=r>>0,a=n.length,r=3<arguments.length?e>>0:a;if(o<a&&0<=(o=0<=o?o:a+o)&&(t=0<=t?t:a+t)<(r=0<=r?r:a+r))for(u=0,i=n.slice(t,r);o<a&&!(i.length<=u);o++)n[o]=i[u++];return n},chunk:function(n,t){var r,e=[],u=t>>0||1;if(D(n))if(0<=u&&n.length>u)for(r=0;r<n.length;)e.push(n.slice(r,r+u)),r+=u;else e=n.length?[n]:n;return e},zip:function(){return _n(arguments)},unzip:_n,zipObject:function(n,r){var e={};return r=r||[],A(vt(n),function(n,t){e[n]=r[t]}),e},flatten:function(n,t){return D(n)?function t(n,r){var e=[];return O(n,function(n){e=e.concat(D(n)?r?t(n,r):n:[n])}),e}(n,t):[]},toArray:Hn,includeArrays:Zn,pluck:Cn,invoke:function(n,t){for(var r,e=arguments,u=[],i=[],o=2,a=e.length;o<a;o++)u.push(e[o]);if(D(t)){for(a=t.length-1,o=0;o<a;o++)i.push(t[o]);t=t[a]}return $n(n,function(n){if(i.length&&(n=function(n,t){for(var r=0,e=t.length;n&&r<e;)n=n[t[r++]];return e&&n?n:0}(n,i)),(r=n[t]||t)&&r.apply)return r.apply(n,u)})},arrayEach:O,lastArrayEach:Ln,toArrayTree:function(n,t){var r,e,u,i,o=(t=S({},y.treeOptions,t)).strict,a=t.key,c=t.parentKey,f=t.children,l=t.mapChildren,s=t.sortKey,h=t.reverse,p=t.data,g=[],v={},d={};return A(n=s&&(n=kn(Et(n),s),h)?n.reverse():n,function(n){r=n[a],d[r]=!0}),A(n,function(n){r=n[a],p?(e={})[p]=n:e=n,u=n[c],v[r]=v[r]||[],e[a]=r,e[c]=u,r===u&&(u=null,console.log("Fix infinite Loop.",n)),v[u]=v[u]||[],v[u].push(e),e[f]=v[r],l&&(e[l]=v[r]),o&&!m(u)||d[u]||g.push(e)}),o&&(i=f,A(n,function(n){n[i]&&!n[i].length&&jt(n,i)})),g},toTreeArray:function(n,t){return function r(e,u,n,i){var o=i.key,a=i.parentKey,c=i.children,f=i.data,l=i.updated,s=i.clear;return O(n,function(n){var t=n[c];f&&(n=n[f]),!1!==l&&(n[a]=u?u[o]:null),e.push(n),t&&t.length&&r(e,n,t,i),s&&delete n[c]}),e}([],null,n,S({},y.treeOptions,t))},findTree:Pn,eachTree:Yn,mapTree:Un,filterTree:function(n,o,t,a){var c=[];return n&&o&&Yn(n,function(n,t,r,e,u,i){o.call(a,n,t,r,e,u,i)&&c.push(n)},t),c},searchTree:qn,hasOwnProp:d,eqNull:m,isNaN:function(n){return N(n)&&isNaN(n)},isFinite:function(n){return N(n)&&isFinite(n)},isUndefined:b,isArray:D,isFloat:function(n){return!(k(n)||isNaN(n)||D(n)||Bn(n))},isInteger:Bn,isFunction:M,isBoolean:Jn,isString:w,isNumber:N,isRegExp:Kn,isObject:Qn,isPlainObject:x,isDate:E,isError:Vn,isTypeError:function(n){return!!n&&n.constructor===TypeError},isEmpty:Xn,isNull:k,isSymbol:nt,isArguments:tt,isElement:function(n){return!!(n&&w(n.nodeName)&&N(n.nodeType))},isDocument:function(n){return!(!n||!p||9!==n.nodeType)},isWindow:function(n){return!(!pn||!n||n!==n.window)},isFormData:function(n){return rt&&n instanceof FormData},isMap:function(n){return et&&n instanceof Map},isWeakMap:function(n){return ut&&n instanceof WeakMap},isSet:function(n){return it&&n instanceof Set},isWeakSet:function(n){return ot&&n instanceof WeakSet},isLeapYear:at,isMatch:function(r,e){var n=j(r),t=j(e);return!t.length||(Zn(n,t)?An(t,function(t){return-1<pt(n,function(n){return n===t&&ct(r[n],e[t])})}):ct(r,e))},isEqual:ct,isEqualWith:function(n,t,i){return M(i)?Q(n,t,function(n,t,r,e,u){r=i(n,t,r,e,u);return b(r)?n===t:!!r},i):Q(n,t,J)},getType:function(n){return k(n)?"null":nt(n)?"symbol":E(n)?"date":D(n)?"array":Kn(n)?"regexp":Vn(n)?"error":typeof n},uniqueId:function(n){return[n,++ft].join("")},getSize:lt,indexOf:st,lastIndexOf:ht,findIndexOf:pt,findLastIndexOf:gt,toStringJSON:function(n){if(x(n))return n;if(w(n))try{return JSON.parse(n)}catch(n){}return{}},toJSONString:function(n){return m(n)?"":JSON.stringify(n)},keys:j,values:vt,entries:dt,pick:yt,omit:mt,first:function(n){return vt(n)[0]},last:function(n){return(n=vt(n))[n.length-1]},each:A,forOf:function(n,t,r){if(n)if(D(n))for(var e=0,u=n.length;e<u&&!1!==t.call(r,n[e],e,n);e++);else for(var i in n)if(d(n,i)&&!1===t.call(r,n[i],i,n))break},lastForOf:function(n,t,r){var e,u;if(n)if(D(n))for(e=n.length-1;0<=e&&!1!==t.call(r,n[e],e,n);e--);else for(e=(u=j(n)).length-1;0<=e&&!1!==t.call(r,n[u[e]],u[e],n);e--);},lastEach:bt,has:function(n,t){if(n){if(d(n,t))return!0;for(var r,e,u,i,o=nn(t),a=0,c=o.length,f=n;a<c&&(i=!1,(u=(r=o[a])?r.match(mn):"")?(e=u[1],u=u[2],e?f[e]&&d(f[e],u)&&(i=!0,f=f[e][u]):d(f,u)&&(i=!0,f=f[u])):d(f,r)&&(i=!0,f=f[r]),i);a++)if(a===c-1)return!0}return!1},get:Dt,set:function(n,t,r){if(n)if(!n[t]&&!d(n,t)||St(t))for(var e=n,u=nn(t),i=u.length,o=0;o<i;o++)St(u[o])||(a=e,c=u[o],l=(f=o===i-1)?null:u[o+1],s=r,h=void 0,e=a[c]?(f&&(a[c]=s),a[c]):(h=c?c.match(Mt):null,l=f?s:(s=l?l.match(Mt):null)&&!s[1]?new Array(g(s[2])+1):{},h?h[1]?(s=g(h[2]),a[h[1]]?!f&&a[h[1]][s]?l=a[h[1]][s]:a[h[1]][s]=l:(a[h[1]]=new Array(s+1),a[h[1]][s]=l)):a[h[2]]=l:a[c]=l,l));else n[t]=r;var a,c,f,l,s,h;return n},groupBy:Ot,countBy:function(n,t,r){var e=Ot(n,t,r||this);return Mn(e,function(n,t){e[t]=n.length}),e},clone:Et,clear:kt,remove:jt,range:function(n,t,r){var e,u,i=[],o=arguments;if(o.length<2&&(t=o[0],n=0),u=t>>0,(e=n>>0)<t)for(r=r>>0||1;e<u;e+=r)i.push(e);return i},destructuring:function(t,n){var r,e;return t&&n&&(r=S.apply(this,[{}].concat(v(arguments,1))),e=j(r),O(j(t),function(n){Tn(e,n)&&(t[n]=r[n])})),t},random:At,min:Wt,max:Ft,commafy:function(n,t){var r,e,u,i,o,a=(t=S({},y.commafyOptions,t)).digits;return N(n)?(r=(t.ceil?Tt:t.floor?zt:It)(n,a),i=(e=F(a?Rt(r,a):r).split("."))[0],o=e[1],(u=i&&r<0)&&(i=i.substring(1,i.length))):i=(e=(r=$(n).replace(/,/g,""))?[r]:[])[0],e.length?(u?"-":"")+i.replace(new RegExp("(?=(?!(\\b))(.{"+(t.spaceNumber||3)+"})+$)","g"),t.separator||",")+(o?"."+o:""):r},round:It,ceil:Tt,floor:zt,toFixed:Rt,toNumber:W,toNumberString:F,toInteger:$t,add:function(n,t){return an(W(n),W(t))},subtract:function(n,t){var n=W(n),t=W(t),r=F(n),e=F(t),r=i(r),e=i(e),u=Math.pow(10,Math.max(r,e));return parseFloat(Rt((n*u-t*u)/u,e<=r?r:e))},multiply:_t,divide:function(n,t){return cn(W(n),W(t))},sum:Ht,mean:function(n,t,r){return cn(Ht(n,t,r),lt(n))},now:Zt,timestamp:function(n,t){return n?(n=T(n,t),E(n)?f(n):n):Zt()},isValidDate:I,isDateSame:function(n,t,r){return!(!n||!t)&&"Invalid Date"!==(n=ar(n,r))&&n===ar(t,r)},toStringDate:T,toDateString:ar,getWhatYear:cr,getWhatQuarter:function(n,t,r){var e,t=t&&!isNaN(t)?3*t:0;return I(n=T(n))?(e=3*(((e=(e=n).getMonth())<3?1:e<6?2:e<9?3:4)-1),n.setMonth(e),fr(n,t,r)):n},getWhatMonth:fr,getWhatWeek:lr,getWhatDay:sr,getYearDay:hr,getYearWeek:pr,getMonthWeek:Bt,getDayOfYear:function(n,t){return I(n=T(n))?at(cr(n,t))?366:365:NaN},getDayOfMonth:function(n,t){return I(n=T(n))?Math.floor((f(fr(n,t,sn))-f(fr(n,t,e)))/s)+1:NaN},getDateDiff:function(n,t){var r,e,u,i,o,a,c={done:!1,time:0};if(n=T(n),t=t?T(t):on(),I(n)&&I(t)&&(r=f(n))<(e=f(t)))for(i=c.time=e-r,c.done=!0,a=0,o=gr.length;a<o;a++)i>=(u=gr[a])[1]?a===o-1?c[u[0]]=i||0:(c[u[0]]=Math.floor(i/u[1]),i-=c[u[0]]*u[1]):c[u[0]]=0;return c},trim:vr,trimLeft:dr,trimRight:yr,escape:qt,unescape:Pt,camelCase:function(n){var u,t;return n=$(n),br[n]||(u=n.length,u=(t=n.replace(/([-]+)/g,function(n,t,r){return r&&r+t.length<u?"-":""})).length,t=t.replace(/([A-Z]+)/g,function(n,t,r){var e=t.length;return t=o(t),r?2<e&&r+e<u?ln(a(t,0,1))+a(t,1,e-1)+ln(a(t,e-1,e)):ln(a(t,0,1))+a(t,1,e):1<e&&r+e<u?a(t,0,e-1)+ln(a(t,e-1,e)):t}).replace(/(-[a-zA-Z])/g,function(n,t){return ln(a(t,1,t.length))}),br[n]=t)},kebabCase:function(n){var e;return n=$(n),Dr[n]||(/^[A-Z]+$/.test(n)?o(n):(e=(e=n.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(n,t,r,e){var u=r.length;return 1<u?t+"-"+o(a(r,0,u-1))+"-"+o(a(r,u-1,u))+e:o(t+"-"+r+e)}).replace(/^([A-Z]+)([a-z]+)?$/,function(n,t,r){var e=t.length;return o(a(t,0,e-1)+"-"+a(t,e-1,e)+(r||""))}).replace(/([a-z]?)([A-Z]+)([a-z]?)/g,function(n,t,r,e,u){var i=r.length;return 1<i&&(t&&(t+="-"),e)?(t||"")+o(a(r,0,i-1))+"-"+o(a(r,i-1,i))+e:(t||"")+(u?"-":"")+o(r)+(e||"")})).replace(/([-]+)/g,function(n,t,r){return r&&r+t.length<e.length?"-":""}),Dr[n]=e))},repeat:function(n,t){return l($(n),t)},padStart:R,padEnd:function(n,t,r){return n=$(n),t>>=0,r=b(r)?" ":""+r,n.padEnd?n.padEnd(t,r):t>n.length?((t-=n.length)>r.length&&(r+=l(r,t/r.length)),n+r.slice(0,t)):n},startsWith:function(n,t,r){return n=$(n),0===(1===arguments.length?n:n.substring(r)).indexOf(t)},endsWith:function(n,t,r){var n=$(n),e=arguments.length;return 1<e&&(2<e?n.substring(0,r).indexOf(t)===r-1:n.indexOf(t)===n.length-1)},template:Mr,toFormatString:function(n,t){return Mr(n,t,{tmplRE:/\{([.\w[\]\s]+)\}/g})},toString:$,toValueString:$,noop:function(){},property:Sr,bind:function(n,t){var r=v(arguments,2);return function(){return n.apply(t,v(arguments).concat(r))}},once:function(n,t){var r=!1,e=null,u=v(arguments,2);return function(){return r||(e=n.apply(t,v(arguments).concat(u)),r=!0),e}},after:function(t,r,e){var u=0,i=[];return function(){var n=arguments;++u<=t&&i.push(n[0]),t<=u&&r.apply(e,[i].concat(v(n)))}},before:function(t,r,e){var u=0,i=[];return e=e||this,function(){var n=arguments;++u<t&&(i.push(n[0]),r.apply(e,[i].concat(v(n))))}},throttle:function(n,t,r){function e(){u=arguments,i=this,o=!1,null===a&&(!0===c?s():!0===f&&(a=setTimeout(h,t)))}var u=null,i=null,o=!1,a=null,c=!("leading"in(r=r||{}))||r.leading,f="trailing"in r&&r.trailing,l=function(){i=u=null},s=function(){o=!0,n.apply(i,u),a=setTimeout(h,t),l()},h=function(){a=null,o||!0!==f||s()};return e.cancel=function(){var n=null!==a;return n&&clearTimeout(a),l(),a=null,o=!1,n},e},debounce:function(n,t,r){function e(){!0===l&&(f=null),c||!0!==s||p()}function u(){c=!1,i=arguments,o=this,null===f?!0===l&&p():clearTimeout(f),f=setTimeout(e,t)}var i=null,o=null,a=r||{},c=!1,f=null,r="boolean"==typeof r,l="leading"in a?a.leading:r,s="trailing"in a?a.trailing:!r,h=function(){o=i=null},p=function(){c=!0,n.apply(o,i),h()};return u.cancel=function(){var n=null!==f;return n&&clearTimeout(f),h(),f=null,c=!1,n},u},delay:function(n,t){var r=v(arguments,2),e=this;return setTimeout(function(){n.apply(e,r)},t)},unserialize:Nr,serialize:function(n){var r,e=[];return A(n,function(n,t){b(n)||(r=D(n),x(n)||r?e=e.concat(function r(n,e,u){var i,o=[];return A(n,function(n,t){i=D(n),x(n)||i?o=o.concat(r(n,e+"["+t+"]",i)):o.push(gn(e+"["+(u?"":t)+"]")+"="+gn(k(n)?"":n))}),o}(n,t,r)):e.push(gn(t)+"="+gn(k(n)?"":n)))}),e.join("&").replace(/%20/g,"+")},parseUrl:wr,getBaseURL:function(){var n,t;return h?(n=h.pathname,t=ht(n,"/")+1,tn()+(t===n.length?n:n.substring(0,t))):""},locat:function(){return h?wr(h.href):{}},browse:function(){var t,n,r,e,u=!1,i=!1,o={isNode:!1,isMobile:!1,isPC:!1,isDoc:!!p};if(pn||typeof process==c){r=Er("Edge"),n=Er("Chrome"),e=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),o.isDoc&&(t=p.body||p.documentElement,O(["webkit","khtml","moz","ms","o"],function(n){o["-"+n]=!!t[n+"MatchesSelector"]}));try{u=xr(pn.localStorage)}catch(n){}try{i=xr(pn.sessionStorage)}catch(n){}S(o,{edge:r,firefox:Er("Firefox"),msie:!r&&o["-ms"],safari:!n&&!r&&Er("Safari"),isMobile:e,isPC:!e,isLocalStorage:u,isSessionStorage:i})}else o.isNode=!0;return o},cookie:u}),r}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.XEUtils=t()}(this,function(){"use strict";function r(){}var y={cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};r.VERSION="3.6.0",r.mixin=function(){O(arguments,function(n){A(n,function(t,n){r[n]=M(t)?function(){var n=t.apply(r.$context,arguments);return r.$context=null,n}:t})})},r.setup=function(n){return S(y,n)};var _=d(Wt(0,7),function(n){return[(n+1)%7,(n+2)%7,(n+3)%7]});function H(n,t){n=new Date(n).getDay();return $n(_[t],n)}function n(s,h){return function(n,t){var r=N(t)?t:y.firstDayOfWeek,t=T(n);if(I(t)){var e,n=pr(t,0,r,r),t=s(n),u=p(t),i=p(n),o=i+6*g,a=new Date(o),t=pr(t,0,r,r),c=p(t);if(i===c)return 1;if(h(n,a))for(e=p(s(a));e<o;e+=g)if(H(e,r))return 1;var f=c+6*g,n=new Date(o),l=1;if(h(t,n))for(l=0,e=u;e<f;e+=g)if(H(e,r)){l++;break}return Math.floor((i-c)/gn)+l}return NaN}}function t(n,e){var u=Object[n];return function(t){var r=[];if(t){if(u)return u(t);A(t,1<e?function(n){r.push([""+n,t[n]])}:function(){r.push(arguments[e])})}return r}}function Z(e,u){return function(n,t){if(n){if(n[e])return n[e](t);if(w(n)||D(n))return u(n,t);for(var r in n)if(m(n,r)&&t===n[r])return r}return-1}}function C(t){return function(n){return"[object "+t+"]"===bn.call(n)}}function Y(t){return function(n){return typeof n===t}}function L(o,a,c,f,l){return function(n,t,r){if(n&&t){if(o&&n[o])return n[o](t,r);if(a&&D(n)){for(var e=0,u=n.length;e<u;e++)if(!!t.call(r,n[e],e,n)===f)return[!0,!1,e,n[e]][c]}else for(var i in n)if(m(n,i)&&!!t.call(r,n[i],i,n)===f)return[!0,!1,i,n[i]][c]}return l}}function P(u){return function(n,t,r){if(n&&M(t)){if(D(n)||w(n))return u(n,t,r);for(var e in n)if(m(n,e)&&t.call(r,n[e],e,n))return e}return-1}}function U(o){return function(n,t){var n=F(n),r=n;if(n){t>>=0;var e=W(n).split("."),u=e[0],e=e[1]||"",i=e.substring(0,t+1),u=u+(i?"."+i:"");if(t>=e.length)return F(u);u=n,r=0<t?(i=Math.pow(10,t),Math[o](an(u,i))/i):Math[o](u)}return r}}function q(o){return function(r,e){var u,i;return r&&r.length?(O(r,function(n,t){b(n=e?M(e)?e(n,t,r):St(n,e):n)||!b(u)&&!o(u,n)||(i=t,u=n)}),r[i]):u}}function B(f,l){return function(r,e){var n,t,u={},i=[],o=this,a=arguments,c=a.length;if(!M(e)){for(t=1;t<c;t++)i.push.apply(i,D(n=a[t])?n:[n]);e=0}return A(r,function(n,t){((e?e.call(o,n,t,r):-1<vt(i,function(n){return n===t}))?f:l)&&(u[t]=n)}),u}}function J(t){return function(n){if(n){n=t(n&&n.replace?n.replace(/,/g,""):n);if(!isNaN(n))return n}return 0}}function K(i){return function(n,t,r,e){var r=r||{},u=r.children||"children";return i(null,n,t,e,[],[],u,r)}}function Q(n,t){return n===t}function V(t,r){try{delete t[r]}catch(n){t[r]=void 0}}function X(r,e,u,i,n,t,o){if(r===e)return!0;if(r&&e&&!N(r)&&!N(e)&&!w(r)&&!w(e)){if(Vn(r))return u(""+r,""+e,n,t,o);if(E(r)||Qn(r))return u(+r,+e,n,t,o);var a,c,f,l=D(r),s=D(e);if(l||s?l&&s:r.constructor===e.constructor)return c=j(r),f=j(e),i&&(a=i(r,e,n)),c.length===f.length&&(h(a)?Tn(c,function(n,t){return n===f[t]&&X(r[n],e[f[t]],u,i,l||s?t:n,r,e)}):!!a)}return u(r,e,n,t,o)}function G(t){var r=new RegExp("(?:"+j(t).join("|")+")","g");return function(n){return $(n).replace(r,function(n){return t[n]})}}function nn(n){return n.getFullYear()}function tn(n){return n.getMonth()}function p(n){return n.getTime()}function rn(n){return n?n.splice&&n.join?n:(""+n).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function en(){return f?f.origin||f.protocol+"//"+f.host:""}function un(n){return Date.UTC(n.y,n.M||0,n.d||1,n.H||0,n.m||0,n.s||0,n.S||0)}function on(n){return p((n=n,new Date(nn(n),tn(n),n.getDate())))}function an(n,t){n=W(n),t=W(t);return parseInt(n.replace(".",""))*parseInt(t.replace(".",""))/Math.pow(10,i(n)+i(t))}function cn(){return new Date}function fn(n,t){var r=W(n),e=W(t),r=Math.pow(10,Math.max(i(r),i(e)));return(Ct(n,r)+Ct(t,r))/r}function i(n){return(n.split(".")[1]||"").length}function ln(n,t){var n=W(n),t=W(t),r=i(n),r=i(t)-r,e=r<0,r=Math.pow(10,e?Math.abs(r):r);return Ct(n.replace(".","")/t.replace(".",""),e?1/r:r)}function sn(n,t){return n.substring(0,t)+"."+n.substring(t,n.length)}function o(n){return n.toLowerCase()}function l(n,t){return n.repeat?n.repeat(t):(t=isNaN(t)?[]:new Array(v(t))).join(n)+(0<t.length?n:"")}function a(n,t,r){return n.substring(t,r)}function hn(n){return n.toUpperCase()}var c="undefined",pn="last",e="first",g=864e5,gn=7*g,f=typeof location==c?0:location,vn=typeof window==c?0:window,dn=typeof document==c?0:document,yn=encodeURIComponent,mn=decodeURIComponent,bn=Object.prototype.toString,v=parseInt,Dn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Mn=/(.+)?\[(\d+)\]$/,Sn=Object.assign;function On(t,n,r){for(var e,u=n.length,i=1;i<u;i++)e=n[i],O(j(n[i]),r?function(n){t[n]=jt(e[n],r)}:function(n){t[n]=e[n]});return t}var S=function(n){if(n){var t=arguments;if(!0!==n)return Sn?Sn.apply(Object,t):On(n,t);if(1<t.length)return On(n=D(n[1])?[]:{},t,!0)}return n};function wn(n,t,r){if(n)for(var e in n)m(n,e)&&t.call(r,n[e],e,n)}function Nn(t,r,e){Pn(j(t),function(n){r.call(e,t[n],n,t)})}function xn(r,e,u){var i,o,a=[];return e?(M(e)||(e=Nr(e)),o={},A(r,function(n,t){i=e.call(u,n,t,r),o[i]||(o[i]=1,a.push(n))})):A(r,function(n){$n(a,n)||a.push(n)}),a}var En=Fn,kn="asc",jn="desc";function An(n,t){return h(n)?1:k(n)?h(t)?-1:1:n&&n.localeCompare?n.localeCompare(t):t<n?1:-1}function Fn(n,t,r){if(n){if(b(t))return Cn(n).sort(An);for(var e,u=d(n,function(n){return{data:n}}),i=(a=n,c=u,f=r,l=[],O(n=D(n=t)?n:[n],function(n,r){var e,t;n&&(D(e=n)?(e=n[0],t=n[1]):x(n)&&(e=n.field,t=n.order),l.push({field:e,order:t||kn}),O(c,M(e)?function(n,t){n[r]=e.call(f,n.data,t,a)}:function(n){n[r]=e?St(n.data,e):n.data}))}),l),o=i.length-1;0<=o;)e=function(u,i,o){return function(n,t){var r=n[u],e=t[u];return r===e?o?o(n,t):0:i.order===jn?An(e,r):An(r,e)}}(o,i[o],e),o--;return d(u=e?u.sort(e):u,Nr("data"))}var a,c,f,l;return[]}function Wn(n){for(var t,r=[],e=yt(n),u=e.length-1;0<=u;u--)t=0<u?It(0,u):0,r.push(e[t]),e.splice(t,1);return r}var In=L("some",1,0,!0,!1),Tn=L("every",1,1,!1,!0);function s(n,t,r){var e=[],u=arguments.length;if(n){if(t=2<=u?F(t):0,r=3<=u?F(r):n.length,n.slice)return n.slice(t,r);for(;t<r;t++)e.push(n[t])}return e}var zn=L("find",1,3,!0);var Rn=L("",0,2,!0);function $n(n,t){if(n){if(n.includes)return n.includes(t);for(var r in n)if(m(n,r)&&t===n[r])return!0}return!1}function _n(n,t){if(n.indexOf)return n.indexOf(t);for(var r=0,e=n.length;r<e;r++)if(t===n[r])return r}function Hn(n,t){if(n.lastIndexOf)return n.lastIndexOf(t);for(var r=n.length-1;0<=r;r--)if(t===n[r])return r;return-1}function d(n,t,r){var e=[];if(n&&1<arguments.length){if(n.map)return n.map(t,r);A(n,function(){e.push(t.apply(r,arguments))})}return e}function Zn(n){var t,r,e,u=[];if(n&&n.length)for(t=0,e=(r=zt(n,function(n){return n?n.length:0}))?r.length:0;t<e;t++)u.push(Ln(n,t));return u}function Cn(n){return d(n,function(n){return n})}function Yn(n,t){var r,e=0;if(D(n)&&D(t)){for(r=t.length;e<r;e++)if(!$n(n,t[e]))return!1;return!0}return $n(n,t)}function Ln(n,t){return d(n,Nr(t))}function O(n,t,r){if(n)if(n.forEach)n.forEach(t,r);else for(var e=0,u=n.length;e<u;e++)t.call(r,n[e],e,n)}function Pn(n,t,r){for(var e=n.length-1;0<=e;e--)t.call(r,n[e],e,n)}var Un=K(function n(t,r,e,u,i,o,a,c){if(r)for(var f,l,s,h=0,p=r.length;h<p;h++){if(s=r[h],f=i.concat([""+h]),l=o.concat([s]),e.call(u,s,h,r,f,t,l))return{index:h,item:s,path:f,items:r,parent:t,nodes:l};if(a&&(s=s&&n(s,s[a],e,u,f.concat([a]),l,a,c)))return s}});var qn=K(function r(e,u,i,o,a,c,f,l){var s,h;A(u,function(n,t){s=a.concat([""+t]),h=c.concat([n]),i.call(o,n,t,u,s,e,h),n&&f&&(s.push(f),r(n,n[f],i,o,s,h,f,l))})});var Bn=K(function r(e,u,i,o,a,c,f,l){var s,h,p,g=l.mapChildren||f;return d(u,function(n,t){return s=a.concat([""+t]),h=c.concat([n]),(p=i.call(o,n,t,u,s,e,h))&&n&&f&&n[f]&&(p[g]=r(n,n[f],i,o,s,h,f,l)),p})});var Jn=K(function(n,t,r,e,u,i,o,a){return function r(e,u,i,o,a,c,f,l,s){var h,p,g,v,d,y=[],m=s.original,b=s.data,D=s.mapChildren||l,M=s.isEvery;return O(i,function(n,t){h=c.concat([""+t]),p=f.concat([n]),v=e&&!M||o.call(a,n,t,i,h,u,p),d=l&&n[l],v||d?(m?g=n:(g=S({},n),b&&(g[b]=n)),g[D]=r(v,n,n[l],o,a,h,p,l,s),(v||g[D].length)&&y.push(g)):v&&y.push(g)}),y}(0,n,t,r,e,u,i,o,a)});function m(n,t){return!(!n||!n.hasOwnProperty)&&n.hasOwnProperty(t)}function b(n){return k(n)||h(n)}var h=Y(c),D=Array.isArray||C("Array");function Kn(n){return!k(n)&&!isNaN(n)&&!D(n)&&n%1==0}var M=Y("function"),Qn=Y("boolean"),w=Y("string"),N=Y("number"),Vn=C("RegExp"),Xn=Y("object");function x(n){return!!n&&n.constructor===Object}var E=C("Date"),Gn=C("Error");function nt(n){for(var t in n)return!1;return!0}function k(n){return null===n}var tt=typeof Symbol!=c;function rt(n){return tt&&Symbol.isSymbol?Symbol.isSymbol(n):"symbol"==typeof n}var et=C("Arguments");var ut=typeof FormData!=c;var it=typeof Map!=c;var ot=typeof WeakMap!=c;var at=typeof Set!=c;var ct=typeof WeakSet!=c;function ft(n){var n=n?T(n):cn();return!!E(n)&&(n=n.getFullYear())%4==0&&(n%100!=0||n%400==0)}function lt(n,t){return X(n,t,Q)}var st=0;function ht(n){var t=0;return w(n)||D(n)?n.length:(A(n,function(){t++}),t)}var pt=Z("indexOf",_n),gt=Z("lastIndexOf",Hn),vt=P(function(n,t,r){for(var e=0,u=n.length;e<u;e++)if(t.call(r,n[e],e,n))return e;return-1}),dt=P(function(n,t,r){for(var e=n.length-1;0<=e;e--)if(t.call(r,n[e],e,n))return e;return-1});var j=t("keys",1),yt=t("values",0),mt=t("entries",2),bt=B(1,0),Dt=B(0,1);function A(n,t,r){return n&&(D(n)?O:wn)(n,t,r)}function Mt(n,t,r){return n&&(D(n)?Pn:Nn)(n,t,r)}function St(n,t,r){return b(n)||(n=function(n,t){if(n){var r,e,u,i=0;if(n[t]||m(n,t))return n[t];if(e=rn(t),u=e.length)for(r=n;i<u;i++)if(b(r=function(n,t){var r=t?t.match(Mn):"";return r?r[1]?n[r[1]]?n[r[1]][r[2]]:void 0:n[r[2]]:n[t]}(r,e[i])))return i===u-1?r:void 0;return r}}(n,t),h(n))?r:n}var Ot=/(.+)?\[(\d+)\]$/;function wt(n){return"__proto__"===n||"constructor"===n||"prototype"===n}function Nt(r,e,u){var i,n,o={};return r&&(e&&Xn(e)?(n=e,e=function(){return nt(n)}):M(e)||(e=Nr(e)),A(r,function(n,t){i=e?e.call(u,n,t,r):n,o[i]?o[i].push(n):o[i]=[n]})),o}function xt(n,t){n=n.__proto__.constructor;return t?new n(t):new n}function Et(n,t){return t?kt(n,t):n}function kt(n,r){if(n)switch(bn.call(n)){case"[object Object]":var e=Object.create(Object.getPrototypeOf(n));return wn(n,function(n,t){e[t]=Et(n,r)}),e;case"[object Date]":case"[object RegExp]":return xt(n,n.valueOf());case"[object Array]":case"[object Arguments]":var t=[];return O(n,function(n){t.push(Et(n,r))}),t;case"[object Set]":var u=xt(n);return u.forEach(function(n){u.add(Et(n,r))}),u;case"[object Map]":var i=xt(n);return i.forEach(function(n,t){i.set(t,Et(n,r))}),i}return n}function jt(n,t){return n&&kt(n,t)}function At(r,e,n){if(r){var t,u=1<arguments.length&&(k(e)||!Xn(e)),n=u?n:e;if(x(r))wn(r,u?function(n,t){r[t]=e}:function(n,t){V(r,t)}),n&&S(r,n);else if(D(r)){if(u)for(t=r.length;0<t;)r[--t]=e;else r.length=0;n&&r.push.apply(r,n)}}return r}function Ft(r,e,u){var i,o,a;return r&&(b(e)?At(r):(i=[],o=[],M(e)||(a=e,e=function(n,t){return t===a}),A(r,function(n,t,r){e.call(u,n,t,r)&&i.push(t)}),D(r)?Mt(i,function(n,t){o.push(r[n]),r.splice(n,1)}):(o={},O(i,function(n){o[n]=r[n],V(r,n)})),o))}function Wt(n,t,r){var e,u,i=[],o=arguments;if(o.length<2&&(t=o[0],n=0),u=t>>0,(e=n>>0)<t)for(r=r>>0||1;e<u;e+=r)i.push(e);return i}function It(n,t){return t<=n?n:(n>>=0)+Math.round(Math.random()*((t||9)-n))}var Tt=q(function(n,t){return t<n}),zt=q(function(n,t){return n<t});var Rt=U("round"),$t=U("ceil"),_t=U("floor");function Ht(n,t){var n=$(Rt(n,t>>=0)).split("."),r=n[0],n=n[1]||"",e=t-n.length;return t?0<e?r+"."+n+l("0",e):r+sn(n,Math.abs(e)):r}var F=J(parseFloat);function W(n){var t,r,e,u,i,o,a,c=""+n,f=c.match(/^([-+]?)((\d+)|((\d+)?[.](\d+)?))e([-+]{1})([0-9]+)$/);return f?(n=n<0?"-":"",t=f[3]||"",r=f[5]||"",e=f[6]||"",u=f[7],i=(f=f[8])-e.length,o=f-t.length,a=f-r.length,"+"===u?t?n+t+l("0",f):0<i?n+r+e+l("0",i):n+r+sn(e,f):t?0<o?n+"0."+l("0",Math.abs(o))+t:n+sn(t,o):0<a?n+"0."+l("0",Math.abs(a))+r+e:n+sn(r,a)+e):c}var Zt=J(v);function Ct(n,t){return an(F(n),F(t))}function Yt(n,t,r){var e=0;return A(n&&2<n.length&&D(n)?n.sort():n,t?M(t)?function(){e=fn(e,t.apply(r,arguments))}:function(n){e=fn(e,St(n,t))}:function(n){e=fn(e,n)}),e}var Lt=Date.now||function(){return p(cn())};function I(n){return E(n)&&!isNaN(p(n))}function Pt(n){return"(\\d{"+n+"})"}function Ut(n){return isNaN(n)?n:v(n)}for(var qt=Pt(2),Bt=Pt("1,2"),Jt=Pt("1,7"),Kt=Pt("3,4"),Qt=".{1}"+Bt,Vt="(([zZ])|([-+]\\d{2}:?\\d{2}))",Xt=[Kt,Qt,Qt,Qt,Qt,Qt,".{1}"+Jt,Vt],Gt=[],nr=Xt.length-1;0<=nr;nr--){for(var tr="",rr=0;rr<nr+1;rr++)tr+=Xt[rr];Gt.push(new RegExp("^"+tr+"$"))}for(var er=[["yyyy",Kt],["yy",qt],["MM",qt],["M",Bt],["dd",qt],["d",Bt],["HH",qt],["H",Bt],["mm",qt],["m",Bt],["ss",qt],["s",Bt],["SSS",Pt(3)],["S",Jt],["Z",Vt]],ur={},ir=["\\[([^\\]]+)\\]"],rr=0;rr<er.length;rr++){var or=er[rr];ur[or[0]]=or[1]+"?",ir.push(or[0])}var ar=new RegExp(ir.join("|"),"g"),cr={};function T(n,t){if(n){var r=E(n);if(r||!t&&/^[0-9]{11,15}$/.test(n))return new Date((r?p:v)(n));if(w(n)){r=t?function(n,t){var e,r,u=cr[t],i=(u||(e=[],r=t.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(ar,function(n,t){var r=n.charAt(0);return"["===r?t:(e.push(r),ur[n])}),u=cr[t]={_i:e,_r:new RegExp(r)}),{}),o=n.match(u._r);if(o)for(var a=u._i,c=1,f=o.length;c<f;c++)i[a[c-1]]=o[c];return i}(n,t):function(n){for(var t,r={},e=0,u=Gt.length;e<u;e++)if(t=n.match(Gt[e])){r.y=t[1],r.M=t[2],r.d=t[3],r.H=t[4],r.m=t[5],r.s=t[6],r.S=t[7],r.Z=t[8];break}return r}(n);if(r.y)return r.M&&(r.M=Ut(r.M)-1),r.S&&(r.S=(t=Ut(r.S.substring(0,3)))<10?100*t:t<100?10*t:t),r.Z?/^[zZ]/.test((n=r).Z)?new Date(un(n)):(t=n.Z.match(/([-+])(\d{2}):?(\d{2})/))?new Date(un(n)-("-"===t[1]?-1:1)*v(t[2])*36e5+6e4*v(t[3])):new Date(""):new Date(r.y,r.M||0,r.d||1,r.H||0,r.m||0,r.s||0,r.S||0)}}return new Date("")}function z(n,t,r,e){t=t[r];return t?M(t)?t(e,r,n):t[e]:e}var fr=/\[([^\]]+)]|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 lr(e,n,r){var u,t,i,o,a;return e?I(e=T(e))?(n=n||y.parseDateFormat||y.formatString,u=e.getHours(),t=u<12?"am":"pm",i=S({},y.parseDateRules||y.formatStringMatchs,r?r.formats:null),a={yyyy:o=function(n,t){return(""+nn(e)).substr(4-t)},yy:o,MM:o=function(n,t){return R(tn(e)+1,t,"0")},M:o,dd:o=function(n,t){return R(e.getDate(),t,"0")},d:o,HH:o=function(n,t){return R(u,t,"0")},H:o,hh:o=function(n,t){return R(u<=12?u:u-12,t,"0")},h:o,mm:o=function(n,t){return R(e.getMinutes(),t,"0")},m:o,ss:o=function(n,t){return R(e.getSeconds(),t,"0")},s:o,SSS:o=function(n,t){return R(e.getMilliseconds(),t,"0")},S:o,ZZ:o=function(n,t){var r=e.getTimezoneOffset()/60*-1;return z(e,i,n,(0<=r?"+":"-")+R(r,2,"0")+(1===t?":":"")+"00")},Z:o,WW:o=function(n,t){return R(z(e,i,n,dr(e,(r?r.firstDay:null)||y.firstDayOfWeek)),t,"0")},W:o,DDD:o=function(n,t){return R(z(e,i,n,vr(e)),t,"0")},D:o,a:function(n){return z(e,i,n,t)},A:function(n){return z(e,i,n,hn(t))},e:function(n){return z(e,i,n,e.getDay())},E:function(n){return z(e,i,n,e.getDay())},q:function(n){return z(e,i,n,Math.floor((tn(e)+3)/3))}},n.replace(fr,function(n,t){return t||(a[n]?a[n](n,n.length):n)})):"Invalid Date":""}function sr(n,t,r){if(I(n=T(n))&&(t&&(t=t&&!isNaN(t)?t:0,n.setFullYear(nn(n)+t)),r||!isNaN(r))){if(r===e)return new Date(nn(n),0,1);if(r===pn)return n.setMonth(11),hr(n,0,pn);n.setMonth(r)}return n}function hr(n,t,r){t=t&&!isNaN(t)?t:0;if(I(n=T(n))){if(r===e)return new Date(nn(n),tn(n)+t,1);if(r===pn)return new Date(p(hr(n,t+1,e))-1);if(N(r)&&n.setDate(r),t){r=n.getDate();if(n.setMonth(tn(n)+t),r!==n.getDate())return n.setDate(1),new Date(p(n)-g)}}return n}function pr(n,t,r,e){var u,i,o;return I(n=T(n))?(o=N(r),i=N(e),u=p(n),(o||i)&&(i=i?e:y.firstDayOfWeek,(e=n.getDay())!==(o=o?r:e))&&(r=0,e<i?r=-(7-i+e):i<e&&(r=i-e),u+=i<o?((0===o?7:o)-i+r)*g:o<i?(7-i+o+r)*g:r*g),t&&!isNaN(t)&&(u+=t*gn),new Date(u)):n}function gr(n,t,r){if(I(n=T(n))&&!isNaN(t)){if(n.setDate(n.getDate()+v(t)),r===e)return new Date(nn(n),tn(n),n.getDate());if(r===pn)return new Date(p(gr(n,1,e))-1)}return n}function vr(n){return I(n=T(n))?Math.floor((on(n)-on(sr(n,0,e)))/g)+1:NaN}var dr=n(function(n){return new Date(n.getFullYear(),0,1)},function(n,t){return n.getFullYear()!==t.getFullYear()}),Qt=n(function(n){return new Date(n.getFullYear(),n.getMonth(),1)},function(n,t){return n.getMonth()!==t.getMonth()});var yr=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function mr(n){return n&&n.trim?n.trim():Dr(br(n))}function br(n){return n&&n.trimLeft?n.trimLeft():$(n).replace(/^[\s\uFEFF\xA0]+/g,"")}function Dr(n){return n&&n.trimRight?n.trimRight():$(n).replace(/[\s\uFEFF\xA0]+$/g,"")}var Kt=G(Dn),Mr={},qt=(A(Dn,function(n,t){Mr[Dn[t]]=t}),G(Mr)),Sr={};var Or={};function R(n,t,r){n=$(n);return t>>=0,r=h(r)?" ":""+r,n.padStart?n.padStart(t,r):t>n.length?((t-=n.length)>r.length&&(r+=l(r,t/r.length)),r.slice(0,t)+n):n}function wr(n,r,t){return $(n).replace((t||y).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(n,t){return St(r,mr(t))})}function $(n){return N(n)?W(n):""+(b(n)?"":n)}function Nr(t,r){return function(n){return k(n)?r:n[t]}}function xr(n){return kr(n.split("?")[1]||"")}function Er(n){var e,t,u,n=""+n;return 0===n.indexOf("//")?n=(f?f.protocol:"")+n:0===n.indexOf("/")&&(n=en()+n),t=n.replace(/#.*/,"").match(/(\?.*)/),(u={href:n,hash:"",host:"",hostname:"",protocol:"",port:"",search:t&&t[1]&&1<t[1].length?t[1]:""}).path=n.replace(/^([a-z0-9.+-]*:)\/\//,function(n,t){return u.protocol=t,""}).replace(/^([a-z0-9.+-]*)(:\d+)?\/?/,function(n,t,r){return e=r||"",u.port=e.replace(":",""),u.hostname=t,u.host=t+e,"/"}).replace(/(#.*)/,function(n,t){return u.hash=1<t.length?t:"",""}),t=u.hash.match(/#((.*)\?|(.*))/),u.pathname=u.path.replace(/(\?|#.*).*/,""),u.origin=u.protocol+"//"+u.host,u.hashKey=t&&(t[2]||t[1])||"",u.hashQuery=xr(u.hash),u.searchQuery=xr(u.search),u}function kr(n){var t,r={};return n&&w(n)&&O(n.split("&"),function(n){t=n.split("="),r[mn(t[0])]=mn(t[1]||"")}),r}function jr(n){try{return n.setItem("__xe_t",1),n.removeItem("__xe_t"),!0}catch(n){return!1}}function Ar(n){return-1<navigator.userAgent.indexOf(n)}function Fr(n,t){var r=parseFloat(t),e=cn(),u=p(e);switch(n){case"y":return p(sr(e,r));case"M":return p(hr(e,r));case"d":return p(gr(e,r));case"h":case"H":return u+60*r*60*1e3;case"m":return u+60*r*1e3;case"s":return u+1e3*r}return u}function Wr(n){return(E(n)?n:new Date(n)).toUTCString()}function u(n,t,r){var e,u,i,o,a,c,f;return!!dn&&(c=[],f=arguments,D(n)?c=n:1<f.length?c=[S({name:n,value:t},r)]:Xn(n)&&(c=[n]),0<c.length?(O(c,function(n){e=S({},y.cookies,n),i=[],e.name&&(u=e.expires,i.push(yn(e.name)+"="+yn(Xn(e.value)?JSON.stringify(e.value):e.value)),u&&(u=isNaN(u)?u.replace(/^([0-9]+)(y|M|d|H|h|m|s)$/,function(n,t,r){return Wr(Fr(r,t))}):/^[0-9]{11,13}$/.test(u)||E(u)?Wr(u):Wr(Fr("d",u)),e.expires=u),O(["expires","path","domain","secure"],function(n){h(e[n])||i.push(e[n]&&"secure"===n?n:n+"="+e[n])})),dn.cookie=i.join("; ")}),!0):(o={},(t=dn.cookie)&&O(t.split("; "),function(n){a=n.indexOf("="),o[mn(n.substring(0,a))]=mn(n.substring(a+1)||"")}),1===f.length?o[n]:o))}function Ir(n){return u(n)}function Tr(n,t,r){return u(n,t,r),u}function zr(n,t){u(n,"",S({expires:-1},y.cookies,t))}function Rr(){return j(u())}return S(u,{has:function(n){return $n(Rr(),n)},set:Tr,setItem:Tr,get:Ir,getItem:Ir,remove:zr,removeItem:zr,keys:Rr,getJSON:function(){return u()}}),S(r,{assign:S,objectEach:wn,lastObjectEach:Nn,objectMap:function(r,e,u){var i={};if(r){if(!e)return r;M(e)||(e=Nr(e)),A(r,function(n,t){i[t]=e.call(u,n,t,r)})}return i},merge:function(n){n=n||{};for(var t,r=arguments,e=r.length,u=1;u<e;u++)(t=r[u])&&!function r(e,n){return x(e)&&x(n)||D(e)&&D(n)?(A(n,function(n,t){e[t]=r(e[t],n)}),e):n}(n,t);return n},uniq:xn,union:function(){for(var n=arguments,t=[],r=0,e=n.length;r<e;r++)t=t.concat(Cn(n[r]));return xn(t)},sortBy:En,orderBy:Fn,shuffle:Wn,sample:function(n,t){return n=Wn(n),arguments.length<=1?n[0]:(t<n.length&&(n.length=t||0),n)},some:In,every:Tn,slice:s,filter:function(r,e,u){var i=[];if(r&&e){if(r.filter)return r.filter(e,u);A(r,function(n,t){e.call(u,n,t,r)&&i.push(n)})}return i},find:zn,findLast:function(n,t,r){if(n)for(var e=(n=D(n)?n:yt(n)).length-1;0<=e;e--)if(t.call(r,n[e],e,n))return n[e]},findKey:Rn,includes:$n,arrayIndexOf:_n,arrayLastIndexOf:Hn,map:d,reduce:function(n,t,r){if(n){var e,u,i=0,o=r,r=2<arguments.length,a=j(n);if(n.length&&n.reduce)return u=function(){return t.apply(null,arguments)},r?n.reduce(u,o):n.reduce(u);for(r&&(i=1,o=n[a[0]]),e=a.length;i<e;i++)o=t.call(null,o,n[a[i]],i,n);return o}},copyWithin:function(n,t,r,e){if(D(n)&&n.copyWithin)return n.copyWithin(t,r,e);var u,i,o=t>>0,t=r>>0,a=n.length,r=3<arguments.length?e>>0:a;if(o<a&&0<=(o=0<=o?o:a+o)&&(t=0<=t?t:a+t)<(r=0<=r?r:a+r))for(u=0,i=n.slice(t,r);o<a&&!(i.length<=u);o++)n[o]=i[u++];return n},chunk:function(n,t){var r,e=[],u=t>>0||1;if(D(n))if(0<=u&&n.length>u)for(r=0;r<n.length;)e.push(n.slice(r,r+u)),r+=u;else e=n.length?[n]:n;return e},zip:function(){return Zn(arguments)},unzip:Zn,zipObject:function(n,r){var e={};return r=r||[],A(yt(n),function(n,t){e[n]=r[t]}),e},flatten:function(n,t){return D(n)?function t(n,r){var e=[];return O(n,function(n){e=e.concat(D(n)?r?t(n,r):n:[n])}),e}(n,t):[]},toArray:Cn,includeArrays:Yn,pluck:Ln,invoke:function(n,t){for(var r,e=arguments,u=[],i=[],o=2,a=e.length;o<a;o++)u.push(e[o]);if(D(t)){for(a=t.length-1,o=0;o<a;o++)i.push(t[o]);t=t[a]}return d(n,function(n){if(i.length&&(n=function(n,t){for(var r=0,e=t.length;n&&r<e;)n=n[t[r++]];return e&&n?n:0}(n,i)),(r=n[t]||t)&&r.apply)return r.apply(n,u)})},arrayEach:O,lastArrayEach:Pn,toArrayTree:function(n,t){var r,e,u,i,o=(t=S({},y.treeOptions,t)).strict,a=t.key,c=t.parentKey,f=t.children,l=t.mapChildren,s=t.sortKey,h=t.reverse,p=t.data,g=[],v={},d={};return A(n=s&&(n=Fn(jt(n),s),h)?n.reverse():n,function(n){r=n[a],d[r]=!0}),A(n,function(n){r=n[a],p?(e={})[p]=n:e=n,u=n[c],v[r]=v[r]||[],e[a]=r,e[c]=u,r===u&&(u=null,console.log("Fix infinite Loop.",n)),v[u]=v[u]||[],v[u].push(e),e[f]=v[r],l&&(e[l]=v[r]),o&&!b(u)||d[u]||g.push(e)}),o&&(i=f,A(n,function(n){n[i]&&!n[i].length&&Ft(n,i)})),g},toTreeArray:function(n,t){return function r(e,u,n,i){var o=i.key,a=i.parentKey,c=i.children,f=i.data,l=i.updated,s=i.clear;return O(n,function(n){var t=n[c];f&&(n=n[f]),!1!==l&&(n[a]=u?u[o]:null),e.push(n),t&&t.length&&r(e,n,t,i),s&&delete n[c]}),e}([],null,n,S({},y.treeOptions,t))},findTree:Un,eachTree:qn,mapTree:Bn,filterTree:function(n,o,t,a){var c=[];return n&&o&&qn(n,function(n,t,r,e,u,i){o.call(a,n,t,r,e,u,i)&&c.push(n)},t),c},searchTree:Jn,hasOwnProp:m,eqNull:b,isNaN:function(n){return N(n)&&isNaN(n)},isFinite:function(n){return N(n)&&isFinite(n)},isUndefined:h,isArray:D,isFloat:function(n){return!(k(n)||isNaN(n)||D(n)||Kn(n))},isInteger:Kn,isFunction:M,isBoolean:Qn,isString:w,isNumber:N,isRegExp:Vn,isObject:Xn,isPlainObject:x,isDate:E,isError:Gn,isTypeError:function(n){return!!n&&n.constructor===TypeError},isEmpty:nt,isNull:k,isSymbol:rt,isArguments:et,isElement:function(n){return!!(n&&w(n.nodeName)&&N(n.nodeType))},isDocument:function(n){return!(!n||!dn||9!==n.nodeType)},isWindow:function(n){return!(!vn||!n||n!==n.window)},isFormData:function(n){return ut&&n instanceof FormData},isMap:function(n){return it&&n instanceof Map},isWeakMap:function(n){return ot&&n instanceof WeakMap},isSet:function(n){return at&&n instanceof Set},isWeakSet:function(n){return ct&&n instanceof WeakSet},isLeapYear:ft,isMatch:function(r,e){var n=j(r),t=j(e);return!t.length||(Yn(n,t)?In(t,function(t){return-1<vt(n,function(n){return n===t&<(r[n],e[t])})}):lt(r,e))},isEqual:lt,isEqualWith:function(n,t,i){return M(i)?X(n,t,function(n,t,r,e,u){r=i(n,t,r,e,u);return h(r)?n===t:!!r},i):X(n,t,Q)},getType:function(n){return k(n)?"null":rt(n)?"symbol":E(n)?"date":D(n)?"array":Vn(n)?"regexp":Gn(n)?"error":typeof n},uniqueId:function(n){return[n,++st].join("")},getSize:ht,indexOf:pt,lastIndexOf:gt,findIndexOf:vt,findLastIndexOf:dt,toStringJSON:function(n){if(x(n))return n;if(w(n))try{return JSON.parse(n)}catch(n){}return{}},toJSONString:function(n){return b(n)?"":JSON.stringify(n)},keys:j,values:yt,entries:mt,pick:bt,omit:Dt,first:function(n){return yt(n)[0]},last:function(n){return(n=yt(n))[n.length-1]},each:A,forOf:function(n,t,r){if(n)if(D(n))for(var e=0,u=n.length;e<u&&!1!==t.call(r,n[e],e,n);e++);else for(var i in n)if(m(n,i)&&!1===t.call(r,n[i],i,n))break},lastForOf:function(n,t,r){var e,u;if(n)if(D(n))for(e=n.length-1;0<=e&&!1!==t.call(r,n[e],e,n);e--);else for(e=(u=j(n)).length-1;0<=e&&!1!==t.call(r,n[u[e]],u[e],n);e--);},lastEach:Mt,has:function(n,t){if(n){if(m(n,t))return!0;for(var r,e,u,i,o=rn(t),a=0,c=o.length,f=n;a<c&&(i=!1,(u=(r=o[a])?r.match(Mn):"")?(e=u[1],u=u[2],e?f[e]&&m(f[e],u)&&(i=!0,f=f[e][u]):m(f,u)&&(i=!0,f=f[u])):m(f,r)&&(i=!0,f=f[r]),i);a++)if(a===c-1)return!0}return!1},get:St,set:function(n,t,r){if(n)if(!n[t]&&!m(n,t)||wt(t))for(var e=n,u=rn(t),i=u.length,o=0;o<i;o++)wt(u[o])||(a=e,c=u[o],l=(f=o===i-1)?null:u[o+1],s=r,h=void 0,e=a[c]?(f&&(a[c]=s),a[c]):(h=c?c.match(Ot):null,l=f?s:(s=l?l.match(Ot):null)&&!s[1]?new Array(v(s[2])+1):{},h?h[1]?(s=v(h[2]),a[h[1]]?!f&&a[h[1]][s]?l=a[h[1]][s]:a[h[1]][s]=l:(a[h[1]]=new Array(s+1),a[h[1]][s]=l)):a[h[2]]=l:a[c]=l,l));else n[t]=r;var a,c,f,l,s,h;return n},groupBy:Nt,countBy:function(n,t,r){var e=Nt(n,t,r||this);return wn(e,function(n,t){e[t]=n.length}),e},clone:jt,clear:At,remove:Ft,range:Wt,destructuring:function(t,n){var r,e;return t&&n&&(r=S.apply(this,[{}].concat(s(arguments,1))),e=j(r),O(j(t),function(n){$n(e,n)&&(t[n]=r[n])})),t},random:It,min:Tt,max:zt,commafy:function(n,t){var r,e,u,i,o,a=(t=S({},y.commafyOptions,t)).digits;return N(n)?(r=(t.ceil?$t:t.floor?_t:Rt)(n,a),i=(e=W(a?Ht(r,a):r).split("."))[0],o=e[1],(u=i&&r<0)&&(i=i.substring(1,i.length))):i=(e=(r=$(n).replace(/,/g,""))?[r]:[])[0],e.length?(u?"-":"")+i.replace(new RegExp("(?=(?!(\\b))(.{"+(t.spaceNumber||3)+"})+$)","g"),t.separator||",")+(o?"."+o:""):r},round:Rt,ceil:$t,floor:_t,toFixed:Ht,toNumber:F,toNumberString:W,toInteger:Zt,add:function(n,t){return fn(F(n),F(t))},subtract:function(n,t){var n=F(n),t=F(t),r=W(n),e=W(t),r=i(r),e=i(e),u=Math.pow(10,Math.max(r,e));return parseFloat(Ht((n*u-t*u)/u,e<=r?r:e))},multiply:Ct,divide:function(n,t){return ln(F(n),F(t))},sum:Yt,mean:function(n,t,r){return ln(Yt(n,t,r),ht(n))},now:Lt,timestamp:function(n,t){return n?(n=T(n,t),E(n)?p(n):n):Lt()},isValidDate:I,isDateSame:function(n,t,r){return!(!n||!t)&&"Invalid Date"!==(n=lr(n,r))&&n===lr(t,r)},toStringDate:T,toDateString:lr,getWhatYear:sr,getWhatQuarter:function(n,t,r){var e,t=t&&!isNaN(t)?3*t:0;return I(n=T(n))?(e=3*(((e=(e=n).getMonth())<3?1:e<6?2:e<9?3:4)-1),n.setMonth(e),hr(n,t,r)):n},getWhatMonth:hr,getWhatWeek:pr,getWhatDay:gr,getYearDay:vr,getYearWeek:dr,getMonthWeek:Qt,getDayOfYear:function(n,t){return I(n=T(n))?ft(sr(n,t))?366:365:NaN},getDayOfMonth:function(n,t){return I(n=T(n))?Math.floor((p(hr(n,t,pn))-p(hr(n,t,e)))/g)+1:NaN},getDateDiff:function(n,t){var r,e,u,i,o,a,c={done:!1,time:0};if(n=T(n),t=t?T(t):cn(),I(n)&&I(t)&&(r=p(n))<(e=p(t)))for(i=c.time=e-r,c.done=!0,a=0,o=yr.length;a<o;a++)i>=(u=yr[a])[1]?a===o-1?c[u[0]]=i||0:(c[u[0]]=Math.floor(i/u[1]),i-=c[u[0]]*u[1]):c[u[0]]=0;return c},trim:mr,trimLeft:br,trimRight:Dr,escape:Kt,unescape:qt,camelCase:function(n){var u,t;return n=$(n),Sr[n]||(u=n.length,u=(t=n.replace(/([-]+)/g,function(n,t,r){return r&&r+t.length<u?"-":""})).length,t=t.replace(/([A-Z]+)/g,function(n,t,r){var e=t.length;return t=o(t),r?2<e&&r+e<u?hn(a(t,0,1))+a(t,1,e-1)+hn(a(t,e-1,e)):hn(a(t,0,1))+a(t,1,e):1<e&&r+e<u?a(t,0,e-1)+hn(a(t,e-1,e)):t}).replace(/(-[a-zA-Z])/g,function(n,t){return hn(a(t,1,t.length))}),Sr[n]=t)},kebabCase:function(n){var e;return n=$(n),Or[n]||(/^[A-Z]+$/.test(n)?o(n):(e=(e=n.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(n,t,r,e){var u=r.length;return 1<u?t+"-"+o(a(r,0,u-1))+"-"+o(a(r,u-1,u))+e:o(t+"-"+r+e)}).replace(/^([A-Z]+)([a-z]+)?$/,function(n,t,r){var e=t.length;return o(a(t,0,e-1)+"-"+a(t,e-1,e)+(r||""))}).replace(/([a-z]?)([A-Z]+)([a-z]?)/g,function(n,t,r,e,u){var i=r.length;return 1<i&&(t&&(t+="-"),e)?(t||"")+o(a(r,0,i-1))+"-"+o(a(r,i-1,i))+e:(t||"")+(u?"-":"")+o(r)+(e||"")})).replace(/([-]+)/g,function(n,t,r){return r&&r+t.length<e.length?"-":""}),Or[n]=e))},repeat:function(n,t){return l($(n),t)},padStart:R,padEnd:function(n,t,r){return n=$(n),t>>=0,r=h(r)?" ":""+r,n.padEnd?n.padEnd(t,r):t>n.length?((t-=n.length)>r.length&&(r+=l(r,t/r.length)),n+r.slice(0,t)):n},startsWith:function(n,t,r){return n=$(n),0===(1===arguments.length?n:n.substring(r)).indexOf(t)},endsWith:function(n,t,r){var n=$(n),e=arguments.length;return 1<e&&(2<e?n.substring(0,r).indexOf(t)===r-1:n.indexOf(t)===n.length-1)},template:wr,toFormatString:function(n,t){return wr(n,t,{tmplRE:/\{([.\w[\]\s]+)\}/g})},toString:$,toValueString:$,noop:function(){},property:Nr,bind:function(n,t){var r=s(arguments,2);return function(){return n.apply(t,s(arguments).concat(r))}},once:function(n,t){var r=!1,e=null,u=s(arguments,2);return function(){return r||(e=n.apply(t,s(arguments).concat(u)),r=!0),e}},after:function(t,r,e){var u=0,i=[];return function(){var n=arguments;++u<=t&&i.push(n[0]),t<=u&&r.apply(e,[i].concat(s(n)))}},before:function(t,r,e){var u=0,i=[];return e=e||this,function(){var n=arguments;++u<t&&(i.push(n[0]),r.apply(e,[i].concat(s(n))))}},throttle:function(n,t,r){function e(){u=arguments,i=this,o=!1,null===a&&(!0===c?s():!0===f&&(a=setTimeout(h,t)))}var u=null,i=null,o=!1,a=null,c=!("leading"in(r=r||{}))||r.leading,f="trailing"in r&&r.trailing,l=function(){i=u=null},s=function(){o=!0,n.apply(i,u),a=setTimeout(h,t),l()},h=function(){a=null,o||!0!==f||s()};return e.cancel=function(){var n=null!==a;return n&&clearTimeout(a),l(),a=null,o=!1,n},e},debounce:function(n,t,r){function e(){!0===l&&(f=null),c||!0!==s||p()}function u(){c=!1,i=arguments,o=this,null===f?!0===l&&p():clearTimeout(f),f=setTimeout(e,t)}var i=null,o=null,a=r||{},c=!1,f=null,r="boolean"==typeof r,l="leading"in a?a.leading:r,s="trailing"in a?a.trailing:!r,h=function(){o=i=null},p=function(){c=!0,n.apply(o,i),h()};return u.cancel=function(){var n=null!==f;return n&&clearTimeout(f),h(),f=null,c=!1,n},u},delay:function(n,t){var r=s(arguments,2),e=this;return setTimeout(function(){n.apply(e,r)},t)},unserialize:kr,serialize:function(n){var r,e=[];return A(n,function(n,t){h(n)||(r=D(n),x(n)||r?e=e.concat(function r(n,e,u){var i,o=[];return A(n,function(n,t){i=D(n),x(n)||i?o=o.concat(r(n,e+"["+t+"]",i)):o.push(yn(e+"["+(u?"":t)+"]")+"="+yn(k(n)?"":n))}),o}(n,t,r)):e.push(yn(t)+"="+yn(k(n)?"":n)))}),e.join("&").replace(/%20/g,"+")},parseUrl:Er,getBaseURL:function(){var n,t;return f?(n=f.pathname,t=gt(n,"/")+1,en()+(t===n.length?n:n.substring(0,t))):""},locat:function(){return f?Er(f.href):{}},browse:function(){var t,n,r,e,u=!1,i=!1,o={isNode:!1,isMobile:!1,isPC:!1,isDoc:!!dn};if(vn||typeof process==c){r=Ar("Edge"),n=Ar("Chrome"),e=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),o.isDoc&&(t=dn.body||dn.documentElement,O(["webkit","khtml","moz","ms","o"],function(n){o["-"+n]=!!t[n+"MatchesSelector"]}));try{u=jr(vn.localStorage)}catch(n){}try{i=jr(vn.sessionStorage)}catch(n){}S(o,{edge:r,firefox:Ar("Firefox"),msie:!r&&o["-ms"],safari:!n&&!r&&Ar("Safari"),isMobile:e,isPC:!e,isLocalStorage:u,isSessionStorage:i})}else o.isNode=!0;return o},cookie:u}),r}); |
@@ -12,4 +12,6 @@ var helperCreateGetDateWeek = require('./helperCreateGetDateWeek') | ||
return new Date(targetDate.getFullYear(), targetDate.getMonth(), 1) | ||
}, function (date1, date2) { | ||
return date1.getMonth() !== date2.getMonth() | ||
}) | ||
module.exports = getMonthWeek |
@@ -12,4 +12,6 @@ var helperCreateGetDateWeek = require('./helperCreateGetDateWeek') | ||
return new Date(targetDate.getFullYear(), 0, 1) | ||
}, function (date1, date2) { | ||
return date1.getFullYear() !== date2.getFullYear() | ||
}) | ||
module.exports = getYearWeek |
var setupDefaults = require('./setupDefaults') | ||
var staticDayTime = require('./staticDayTime') | ||
var staticWeekTime = require('./staticWeekTime') | ||
var isNumber = require('./isNumber') | ||
var includes = require('./includes') | ||
var toStringDate = require('./toStringDate') | ||
var isValidDate = require('./isValidDate') | ||
var getWhatWeek = require('./getWhatWeek') | ||
var range = require('./range') | ||
var map = require('./map') | ||
var helperGetDateTime = require('./helperGetDateTime') | ||
function helperCreateGetDateWeek (getStartDate) { | ||
var nextStartMaps = map(range(0, 7), function (day) { | ||
return [(day + 1) % 7, (day + 2) % 7, (day + 3) % 7] | ||
}) | ||
function matchWeekStartDay (time, viewStartDay) { | ||
var day = new Date(time).getDay() | ||
return includes(nextStartMaps[viewStartDay], day) | ||
} | ||
function helperCreateGetDateWeek (getStartDate, checkCrossDate) { | ||
return function (date, firstDay) { | ||
var viewStartDay = isNumber(firstDay) ? firstDay : setupDefaults.firstDayOfWeek | ||
var targetDate = getWhatWeek(date, 0, viewStartDay, viewStartDay) | ||
var targetDate = toStringDate(date) | ||
if (isValidDate(targetDate)) { | ||
var targetOffsetDate = new Date(targetDate.getFullYear(), targetDate.getMonth(), targetDate.getDate()) | ||
var targerStartDate = getStartDate(targetDate) | ||
var targetFirstDay = targerStartDate.getDay() | ||
if (targetFirstDay > viewStartDay) { | ||
targerStartDate.setDate(7 - targetFirstDay + viewStartDay + 1) | ||
var targetWeekStartDate = getWhatWeek(targetDate, 0, viewStartDay, viewStartDay) | ||
var firstDate = getStartDate(targetWeekStartDate) | ||
var firstTime = helperGetDateTime(firstDate) | ||
var targetWeekStartTime = helperGetDateTime(targetWeekStartDate) | ||
var targetWeekEndTime = targetWeekStartTime + staticDayTime * 6 | ||
var targetWeekEndDate = new Date(targetWeekEndTime) | ||
var firstWeekStartDate = getWhatWeek(firstDate, 0, viewStartDay, viewStartDay) | ||
var firstWeekStartTime = helperGetDateTime(firstWeekStartDate) | ||
if (targetWeekStartTime === firstWeekStartTime) { | ||
return 1 | ||
} | ||
if (targetFirstDay < viewStartDay) { | ||
targerStartDate.setDate(viewStartDay - targetFirstDay + 1) | ||
var tempTime | ||
if (checkCrossDate(targetWeekStartDate, targetWeekEndDate)) { | ||
tempTime = helperGetDateTime(getStartDate(targetWeekEndDate)) | ||
for (; tempTime < targetWeekEndTime; tempTime += staticDayTime) { | ||
if (matchWeekStartDay(tempTime, viewStartDay)) { | ||
return 1 | ||
} | ||
} | ||
} | ||
return Math.floor((helperGetDateTime(targetOffsetDate) - helperGetDateTime(targerStartDate)) / staticWeekTime + 1) | ||
var firstWeekEndTime = firstWeekStartTime+ staticDayTime * 6 | ||
var firstWeekEndDate = new Date(targetWeekEndTime) | ||
var offsetNum = 1 | ||
if (checkCrossDate(firstWeekStartDate, firstWeekEndDate)) { | ||
offsetNum = 0 | ||
tempTime = firstTime | ||
for (; tempTime < firstWeekEndTime; tempTime += staticDayTime) { | ||
if (matchWeekStartDay(tempTime, viewStartDay)) { | ||
offsetNum++ | ||
break | ||
} | ||
} | ||
} | ||
return Math.floor((targetWeekStartTime - firstWeekStartTime) / staticWeekTime) + offsetNum | ||
} | ||
@@ -27,0 +65,0 @@ return NaN |
{ | ||
"name": "xe-utils", | ||
"version": "3.6.0", | ||
"version": "3.7.0", | ||
"description": "JavaScript 函数库、工具类", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
473963
14305