@dazhicheng/utils 1.3.55 → 1.3.57

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,8 @@
1
+ /** 分页最大数量(主数据/下拉一次拉全量) */
2
+ export declare const MAX_PAGE_SIZE = 99999999;
3
+ /**
4
+ * 表格不展示分页、但接口仍要分页参数时的 pageSize
5
+ * - 用于详情内嵌表(日志等):currentPage=1 + pageSize=TABLE_PAGE_SIZE
6
+ * - 比 MAX_PAGE_SIZE 小,避免部分后端拒超大 pageSize;单业务主键下通常足够
7
+ */
8
+ export declare const TABLE_PAGE_SIZE = 9999;
package/dist/index.d.ts CHANGED
@@ -15,3 +15,4 @@ export * from "./types";
15
15
  export * from "./stroge";
16
16
  export * from "./check";
17
17
  export * from "./business";
18
+ export * from "./constants";
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 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 y}from"crypto-js/enc-utf8";import v from"crypto-js/mode-ecb";import w from"crypto-js/pad-pkcs7";import{cloneDeep as b}from"lodash-es";function S(t){return t.charAt(0).toUpperCase()+t.slice(1)}function E(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 M(t,n=!0){n&&e.error(t.message),console.error("[HTTP Error]",t.toLogData())}const T=Object.prototype.toString;function k(t,e){return T.call(t)===`[object ${e}]`}function C(t){return void 0!==t}function I(t){return!C(t)}function P(t){return null===t}function R(t){return I(t)||P(t)}function F(t){return!R(t)&&(t instanceof Promise||k(t,"Object"))}function $(t){return!!R(t)||(B(t)||U(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:!!F(t)&&0===Object.keys(t).length)}function _(t){return!!$(t)||(0===t||!!U(t)&&("0"===t||"undefined"===t||"null"===t))}function W(t){return k(t,"Date")}function q(t){return k(t,"Number")&&t==t}function z(t){return k(t,"Promise")&&F(t)&&H(t.then)&&H(t.catch)}function U(t){return k(t,"String")}function H(t){return"function"==typeof t}function K(t){return k(t,"Boolean")}function L(t){return k(t,"RegExp")}function B(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!!U(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===P(t)||t===I(t)||!1===t||t===Number.isNaN(t)||!(!B(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="tt-loading-mask",mt=new Map;let yt=null;const vt=()=>document.documentElement.classList.contains("dark")?"rgba(7, 7, 7, 0.85)":"rgba(255, 255, 255, 0.5)",wt={lock:!0,get background(){return vt()},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:gt};function bt(t){return!!t.isConnected&&t.getClientRects().length>0}function St(t){if(!t.isConnected)return!1;return(t.clientHeight||t.getBoundingClientRect().height)>=48}function Et(){const t=document.querySelectorAll("micro-app-body");for(const e of Array.from(t)){const t=e;if(!bt(t))continue;const n=t.querySelector("#app");if(n)return n}const e=document.querySelector("micro-app-body");return e?e.querySelector("#app"):null}function Nt(t=document){const e=[],n=new Set;return t.querySelectorAll("micro-app").forEach(t=>{const r=t.shadowRoot?.querySelector("iframe")||t.querySelector("iframe");r&&!n.has(r)&&(n.add(r),e.push(r))}),e}function Ot(){if("undefined"==typeof document)return null;for(const t of Nt())if(bt(t))try{const e=t.contentDocument;if(!e)continue;const n=e.querySelector("micro-app-body #app")||e.querySelector("#app");if(n&&bt(n)&&St(n))return n;const r=e.querySelector("micro-app-body")||e.body;if(r&&bt(r)&&St(r))return r}catch{}return null}function Dt(t){const e=t.style.zIndex||getComputedStyle(t).zIndex,n=Number.parseInt(e,10);return Number.isNaN(n)?0:n}function At(t){return t.isConnected&&"1"!==t.dataset.ttModalSuspended&&"none"!==t.style.display&&"none"!==getComputedStyle(t).display}function xt(t){const e=function(t){const e=[];if(t){e.push(t);const n=t.closest("micro-app-body");n&&e.push(n);const r=t.ownerDocument;r?.body&&e.push(r.body)}if("undefined"!=typeof document&&document.body){e.push(document.body);for(const t of Nt())if(bt(t))try{const n=t.contentDocument;if(!n)continue;const r=n.querySelector("#app");r&&e.push(r),n.body&&e.push(n.body)}catch{}}const n=new Set,r=[];for(const t of e)t.querySelectorAll(".el-overlay.tt-modal-overlay").forEach(t=>{!n.has(t)&&At(t)&&(n.add(t),r.push(t))});return r}(t);if(0===e.length)return null;const n=e.reduce((t,e)=>Dt(e)>=Dt(t)?e:t);return n}function jt(){const t=function(){const t=[Et(),Ot(),document.querySelector("#app-content"),document.querySelector("#app")];for(const e of t)if(e&&bt(e)&&St(e))return e;return null}();return xt(t)||t}function Mt(t){if(t.instance){try{t.instance.close()}catch{}t.instance=null,t.target=null}else t.target=null}function Tt(t){if(!t.instance)return!1;if(!t.target)return function(){const t=document.body.querySelector(`.el-loading-mask.${gt}.is-fullscreen`);return!(!t||!t.isConnected)}();if(!bt(t.target)||!St(t.target))return!1;const e=t.target.querySelector(`.el-loading-mask.${gt}`);return!(!e||!e.isConnected)}function kt(t,e){if(It()!==t)return void Mt(e);const r=jt();if(e.instance&&Tt(e)&&e.target===r)return;Mt(e),r&&"static"===getComputedStyle(r).position&&(r.style.position="relative");const i={...wt,background:vt(),...r?{target:r,fullscreen:!1,lock:!1}:{fullscreen:!0}};e.instance=n.service(i),e.target=r,function(t){if(!t)return;const e=t.querySelector(`.el-loading-mask.${gt}`);if(!e)return;const n=Math.max(Dt(t),...Array.from(t.querySelectorAll(".el-overlay-dialog, .el-dialog")).map(Dt));Dt(e)<=n&&(e.style.zIndex=String(n+1))}(r),r&&!r.classList.contains("tt-modal-overlay")&&function(t,e){const n=()=>{if(e.count<=0||mt.get(t)!==e)return;if(It()!==t)return;const n=jt();n&&n!==e.target&&kt(t,e)};o(()=>{requestAnimationFrame(n),window.setTimeout(n,50)})}(t,e)}function Ct(t){for(const[e,n]of mt)e!==t&&Mt(n)}function It(t){const e="undefined"!=typeof window&&window.__MICRO_APP_NAME__||"host";let n=t;return n||(n=yt?.currentRoute?.value?yt.currentRoute.value.fullPath:"undefined"!=typeof window?window.location.pathname+window.location.search+window.location.hash:"/"),`${e}::${n}`}const Pt={getPageKey:It,bindRouter(t){t&&yt!==t&&(yt=t,t.afterEach(()=>{o(()=>Pt.sync())}))},showLoading(t){const e=t||It(),n=function(t){let e=mt.get(t);return e||(e={count:0,instance:null,target:null},mt.set(t,e)),e}(e);return n.count+=1,Ct(It()),kt(e,n),()=>this.hideLoading(e)},hideLoading(t){const e=t||It(),n=mt.get(e);n&&(n.count=Math.max(0,n.count-1),0===n.count&&(Mt(n),mt.delete(e)))},sync(t){const e=t||It();Ct(e);const n=mt.get(e);n&&n.count>0&&kt(e,n)}};function Rt(n){const{router:r,useUserStore:i,VITE_API_URL:u,VITE_WITH_CREDENTIALS:a}=n;Pt.bindRouter(r);const c=new Set;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"],f=new Map;function l(t){t&&setTimeout(()=>{const e=(f.get(t)||1)-1;e<=0?(f.delete(t),function(t){t&&c.has(t)&&(c.delete(t),o(()=>{Pt.hideLoading(t)}))}(t)):f.set(t,e)},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 y(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>y(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]=y(r)}return e}function v(t,e){return new x(t,e)}function w(t){const e=v(t||A.unauthorized,D.unauthorized);if(!d)throw d=!0,S(),h=setTimeout(b,3e3),M(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();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));const o=It();t.__loadingPageKey=o;const u=f.get(o)||0;return t.hideLoading||0!==u||function(t){c.add(t),Pt.showLoading(t)}(o),f.set(o,u+1),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=>(M(v(A.requestConfigError,D.error)),Promise.reject(t))),p.interceptors.response.use(async t=>{l(t.config?.__loadingPageKey),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 v(A.requestFailed,D.error)}}(t);const e=t.headers["content-type"];if(e?.includes("application/json")){t.data&&(t.data=y(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),v(n||A.requestFailed,e)}if(s.includes(e))return O(t,e),t},t=>(l(t.config?.__loadingPageKey),t.response?.status===D.unauthorized&&w(),Promise.reject(j(t))));const S=()=>{setTimeout(()=>{i().logOut()},500)};let E=null;async function N(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){M(e,!1!==t.showErrorMessage)}return Promise.reject(e)}}(t)}catch(e){if(e instanceof x&&e.code===D.NEED_REFRESH_TOKEN&&!t.url?.includes("/iam/user/refreshToken")&&!t.__retriedAfterRefresh)return t.__retriedAfterRefresh=!0,await(E||(E=(async()=>{await i().refreshTokenFunc(),await T(1e3)})().finally(()=>{E=null})),E),N(t,n);if(n>0&&e instanceof x&&(r=e.code,[D.requestTimeout,D.internalServerError,D.badGateway,D.serviceUnavailable,D.gatewayTimeout].includes(r)))return await T(1e3),N(t,n-1);throw e}var r}function T(t){return new Promise(e=>setTimeout(e,t))}const k={get:t=>N({...t,method:"GET"}),post:t=>N({...t,method:"POST"}),put:t=>N({...t,method:"PUT"}),del:t=>N({...t,method:"DELETE"}),patch:t=>N({...t,method:"PATCH"}),request:t=>N(t)};return{...k,logOut:S,setBaseUrl:t=>{p.defaults.baseURL=t}}}function Ft(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 $t="0,0.00";function _t(t,e=$t){return t?u(t).format(e):"0.00"}function Wt(t,e=$t){return t?u(t).format(e):"0.00"}function qt(t){return t?u(u(t).format($t)).value():0}function zt(t,e){if(R(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 Ut(t,e=2){if(R(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 Ht(t,e="period"){if(!t)return"";const n=(q(t)?t.toString():t).replace(/[-.]/g,""),r=n.slice(0,4),o=n.slice(4,6);return"period"===e?`${r}年${o}期`:` ${o}/${r}`}function Kt(t,e="YYYY-MM-DD HH:mm:ss"){return R(t)?"--":r(t).isValid()?r(t).format(e):"--"}function Lt(t,e="YYYY-MM-DD",n=!1){return R(t)?"--":n?t?r(+t).format(e):"--":r(t).isValid()?r(t).format(e):"--"}function Bt(t){if("string"==typeof t)return t.trim();if("function"==typeof t){return(t.name||"").replace(/^bound\s+/i,"")}return""}function Yt(...t){return t.filter(t=>null!=t&&""!==t).join("-")}function Zt(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 Vt(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 Jt(t){return t?Zt(t):""}function Gt(t){if(!t)return!1;return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(t)}var Qt={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,o=t.length;r<o;r++)e.call(n,t[r],r,t)}var te=Object.prototype.toString;function ee(t){return function(e){return"[object "+t+"]"===te.call(e)}}var ne=Array.isArray||ee("Array");function re(t,e){return!(!t||!t.hasOwnProperty)&&t.hasOwnProperty(e)}function oe(t,e,n){if(t)for(var r in t)re(t,r)&&e.call(n,t[r],r,t)}function ie(t,e,n){return t?(ne(t)?Xt:oe)(t,e,n):t}function ue(t){return function(e){return typeof e===t}}var ae=ue("function");function ce(t,e){var n=Object[t];return function(t){var r=[];if(t){if(n)return n(t);ie(t,e>1?function(e){r.push([""+e,t[e]])}:function(){r.push(arguments[e])})}return r}}var se=ce("keys",1);function fe(t,e){var n=t.__proto__.constructor;return e?new n(e):new n}function le(t,e){return e?de(t,e):t}function de(t,e){if(t)switch(te.call(t)){case"[object Object]":var n=Object.create(Object.getPrototypeOf(t));return oe(t,function(t,r){n[r]=le(t,e)}),n;case"[object Date]":case"[object RegExp]":return fe(t,t.valueOf());case"[object Array]":case"[object Arguments]":var r=[];return Xt(t,function(t){r.push(le(t,e))}),r;case"[object Set]":var o=fe(t);return o.forEach(function(t){o.add(le(t,e))}),o;case"[object Map]":var i=fe(t);return i.forEach(function(t,n){i.set(n,le(t,e))}),i}return t}function he(t,e){return t?de(t,e):t}var pe=Object.assign;function ge(t,e,n){for(var r,o=e.length,i=1;i<o;i++)r=e[i],Xt(se(e[i]),n?function(e){t[e]=he(r[e],n)}:function(e){t[e]=r[e]});return t}var me=function(t){if(t){var e=arguments;if(!0!==t)return pe?pe.apply(Object,e):ge(t,e);if(e.length>1)return ge(t=ne(t[1])?[]:{},e,!0)}return t},ye=function(){};function ve(t){return me(Qt,t)}var we="4.0.12";function be(t,e,n){for(var r=t.length-1;r>=0;r--)e.call(n,t[r],r,t)}function Se(t,e,n){be(se(t),function(r){e.call(n,t[r],r,t)})}function Ee(t){return null===t}function Ne(t,e){return function(n){return Ee(n)?e:n[t]}}function Oe(t){return!!t&&t.constructor===Object}function De(t){return"__proto__"!==t&&"constructor"!==t}function Ae(t,e){return Oe(t)&&Oe(e)||ne(t)&&ne(e)?(ie(e,function(n,r){De(r)&&(t[r]=ae(e)?n:Ae(t[r],n))}),t):he(e,!0)}ye.VERSION=we,ye.version=we,ye.mixin=function(){Xt(arguments,function(t){ie(t,function(t,e){ye[e]=ae(t)?function(){var e=t.apply(ye.$context,arguments);return ye.$context=null,e}:t})})},ye.setup=ve,ye.setConfig=ve,ye.getConfig=function(){return Qt};function xe(t,e,n){var r=[];if(t&&arguments.length>1){if(t.map)return t.map(e,n);ie(t,function(){r.push(e.apply(n,arguments))})}return r}function je(t,e,n,r,o){return function(i,u,a){if(i&&u){if(t&&i[t])return i[t](u,a);if(e&&ne(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(re(i,f)&&!!u.call(a,i[f],f,i)===r)return[!0,!1,f,i[f]][n]}return o}}var Me=je("some",1,0,!0,!1),Te=je("every",1,1,!1,!0);function ke(t,e){if(t){if(t.includes)return t.includes(e);for(var n in t)if(re(t,n)&&e===t[n])return!0}return!1}function Ce(t,e){var n,r=0;if(ne(t)&&ne(e)){for(n=e.length;r<n;r++)if(!ke(t,e[r]))return!1;return!0}return ke(t,e)}function Ie(t,e,n){var r=[];if(e){ae(e)||(e=Ne(e));var o,i={};ie(t,function(u,a){o=e.call(n,u,a,t),i[o]||(i[o]=1,r.push(u))})}else ie(t,function(t){ke(r,t)||r.push(t)});return r}function Pe(t){return xe(t,function(t){return t})}var Re="undefined",Fe=ue(Re);function $e(t){return Ee(t)||Fe(t)}var _e=/(.+)?\[(\d+)\]$/;function We(t){return t?t.splice&&t.join?t:(""+t).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function qe(t,e,n){if($e(t))return n;var r=function(t,e){if(t){var n,r,o,i=0;if(t[e]||re(t,e))return t[e];if(o=(r=We(e)).length)for(n=t;i<o;i++)if($e(n=ze(n,r[i])))return i===o-1?n:void 0;return n}}(t,e);return Fe(r)?n:r}function ze(t,e){var n=e?e.match(_e):"";return n?n[1]?t[n[1]]?t[n[1]][n[2]]:void 0:t[n[2]]:t[e]}function Ue(t,e){return Fe(t)?1:Ee(t)?Fe(e)?-1:1:t&&t.localeCompare?t.localeCompare(e):t>e?1:-1}function He(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?Ue(u,i):Ue(i,u)}}function Ke(t,e,n){if(t){if($e(e))return Pe(t).sort(Ue);for(var r,o=xe(t,function(t){return{data:t}}),i=function(t,e,n,r){var o=[];return Xt(n=ne(n)?n:[n],function(n,i){if(n){var u,a=n;ne(n)?(a=n[0],u=n[1]):Oe(n)&&(a=n.field,u=n.order),o.push({field:a,order:u||"asc"}),Xt(e,ae(a)?function(e,n){e[i]=a.call(r,e.data,n,t)}:function(t){t[i]=a?qe(t.data,a):t.data})}}),o}(t,o,e,n),u=i.length-1;u>=0;)r=He(u,i[u],r),u--;return r&&(o=o.sort(r)),xe(o,Ne("data"))}return[]}var Le=Ke;function Be(t,e){return t>=e?t:(t|=0)+Math.round(Math.random()*((e||9)-t))}var Ye=ce("values",0);function Ze(t){for(var e,n=[],r=Ye(t),o=r.length-1;o>=0;o--)e=o>0?Be(0,o):0,n.push(r[e]),r.splice(e,1);return n}function Ve(t){return function(e){if(e){var n=t(e&&e.replace?e.replace(/,/g,""):e);if(!isNaN(n))return n}return 0}}var Je=Ve(parseFloat),Ge=ue("string");function Qe(t,e,n){var r=Ge(t),o=r?"":[],i=arguments.length;if(t){if(e=i>=2?Je(e):0,n=i>=3?Je(n):t.length,t.slice)return t.slice(e,n);if(e<0&&(e=Math.max(0,t.length+e)),r)return t.substring(e,n);for(;e<n;e++)o.push(t[e])}return o}var Xe=je("",0,2,!0),tn=je("find",1,3,!0);function en(t,e){return xe(t,Ne(e))}function nn(t){return function(e,n){var r,o;return e&&e.length?(Xt(e,function(i,u){n&&(i=ae(n)?n(i,u,e):qe(i,n)),$e(i)||!$e(r)&&!t(r,i)||(o=u,r=i)}),e[o]):r}}var rn=nn(function(t,e){return t<e});function on(t){var e,n,r,o=[];if(t&&t.length)for(e=0,r=(n=rn(t,function(t){return t?t.length:0}))?n.length:0;e<r;e++)o.push(en(t,e));return o}function un(t,e){var n=[];return Xt(t,function(t){n=n.concat(ne(t)?e?un(t,e):t:[t])}),n}function an(t,e){return(console[t]||console.log)(e)}function cn(t,e){try{delete t[e]}catch(n){t[e]=void 0}}function sn(t,e,n){return t?(ne(t)?be:Se)(t,e,n):t}var fn=ue("object");function ln(t,e,n){if(t){var r,o=arguments.length>1&&(Ee(e)||!fn(e)),i=o?n:e;if(Oe(t))oe(t,o?function(n,r){t[r]=e}:function(e,n){cn(t,n)}),i&&me(t,i);else if(ne(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 dn(t,e,n){if(t){if(!$e(e)){var r=[],o=[];return ae(e)||(i=e,e=function(t,e){return e===i}),ie(t,function(t,o,i){e.call(n,t,o,i)&&r.push(o)}),ne(t)?sn(r,function(e,n){o.push(t[e]),t.splice(e,1)}):(o={},Xt(r,function(e){o[e]=t[e],cn(t,e)})),o}return ln(t)}var i;return t}function hn(t,e,n,r){var o=r.key,i=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[i]=e?e[o]:null),t.push(n),f&&f.length&&hn(t,n,f,r),s&&delete n[u]}),t}function pn(t){return function(e,n,r,o){var i=r||{},u=i.children||"children";return t(null,e,n,o,[],[],u,i)}}var gn=pn(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 mn=pn(function t(e,n,r,o,i,u,a,c){var s,f;ie(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 yn=pn(function t(e,n,r,o,i,u,a,c){var s,f,l,d=c.mapChildren||a;return xe(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 vn(t,e,n,r,o,i,u,a,c){var s,f,l,d,h,p=[],g=c.original,m=c.data,y=c.mapChildren||a,v=c.isEvery;return Xt(n,function(w,b){s=i.concat([""+b]),f=u.concat([w]),d=t&&!v||r.call(o,w,b,n,s,e,f),h=a&&w[a],d||h?(g?l=w:(l=me({},w),m&&(l[m]=w)),l[y]=vn(d,w,w[a],r,o,s,f,a,c),(d||l[y].length)&&p.push(l)):d&&p.push(l)}),p}var wn=pn(function(t,e,n,r,o,i,u,a){return vn(0,t,e,n,r,o,i,u,a)});function bn(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 Sn(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 En=ue("number");var Nn=ee("Date"),On=parseInt;function Dn(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 An(t){return t.getTime()}function xn(t){return"(\\d{"+t+"})"}function jn(t){return isNaN(t)?t:On(t)}for(var Mn=xn(2),Tn=xn("1,2"),kn=xn("1,7"),Cn=xn("3,4"),In=".{1}",Pn=In+Tn,Rn="(([zZ])|([-+]\\d{2}:?\\d{2}))",Fn=[Cn,Pn,Pn,Pn,Pn,Pn,In+kn,Rn],$n=[],_n=Fn.length-1;_n>=0;_n--){for(var Wn="",qn=0;qn<_n+1;qn++)Wn+=Fn[qn];$n.push(new RegExp("^"+Wn))}var zn=[["yyyy",Cn],["yy",Mn],["MM",Mn],["M",Tn],["dd",Mn],["d",Tn],["HH",Mn],["H",Tn],["mm",Mn],["m",Tn],["ss",Mn],["s",Tn],["SSS",xn(3)],["S",kn],["Z",Rn]],Un={},Hn=["\\[([^\\]]+)\\]"];for(qn=0;qn<zn.length;qn++){var Kn=zn[qn];Un[Kn[0]]=Kn[1]+"?",Hn.push(Kn[0])}var Ln=new RegExp(Hn.join("|"),"g"),Bn={};function Yn(t,e){if(t){var n=Nn(t);if(n||(!e||En(t))&&/^[0-9]{11,15}$/.test(t))return new Date(n?An(t):On(t));if(Ge(t)){var r=e?function(t,e){var n=Bn[e];if(!n){var r=[],o=e.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(Ln,function(t,e){var n=t.charAt(0);return"["===n?e:(r.push(n),Un[t])});n=Bn[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=$n.length;r<o;r++)if(e=t.match($n[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=jn(r.M)-1),r.S&&(r.S=(o=jn(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(Dn(t));var e=t.Z.match(/([-+])(\d{2}):?(\d{2})/);return e?new Date(Dn(t)-("-"===e[1]?-1:1)*On(e[2])*36e5+6e4*On(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 Zn(){return new Date}function Vn(t){var e,n=t?Yn(t):Zn();return!!Nn(n)&&((e=n.getFullYear())%4==0&&(e%100!=0||e%400==0))}function Jn(t,e){return function(n,r){if(n){if(n[t])return n[t](r);if(Ge(n)||ne(n))return e(n,r);for(var o in n)if(re(n,o)&&r===n[o])return o}return-1}}var Gn=Jn("indexOf",bn),Qn=Jn("lastIndexOf",Sn);function Xn(t){var e=0;return Ge(t)||ne(t)?t.length:(ie(t,function(){e++}),e)}var tr=function(t){return!Ee(t)&&!isNaN(t)&&!ne(t)&&t%1==0};var er=ue("boolean"),nr=ee("RegExp"),rr=ee("Error");function or(t){for(var e in t)return!1;return!0}var ir=typeof Symbol!==Re;function ur(t){return ir&&Symbol.isSymbol?Symbol.isSymbol(t):"symbol"==typeof t}var ar=ee("Arguments");var cr=typeof document===Re?0:document;var sr=typeof window===Re?0:window;var fr=typeof FormData!==Re;var lr=typeof Map!==Re;var dr=typeof WeakMap!==Re;var hr=typeof Set!==Re;var pr=typeof WeakSet!==Re;function gr(t){return function(e,n,r){if(e&&ae(n)){if(ne(e)||Ge(e))return t(e,n,r);for(var o in e)if(re(e,o)&&n.call(r,e[o],o,e))return o}return-1}}var mr=gr(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 yr(t,e,n,r,o,i,u){if(t===e)return!0;if(t&&e&&!En(t)&&!En(e)&&!Ge(t)&&!Ge(e)){if(nr(t))return n(""+t,""+e,o,i,u);if(Nn(t)||er(t))return n(+t,+e,o,i,u);var a,c,s,f=ne(t),l=ne(e);if(f||l?f&&l:t.constructor===e.constructor)return c=se(t),s=se(e),r&&(a=r(t,e,o)),c.length===s.length&&(Fe(a)?Te(c,function(o,i){return o===s[i]&&yr(t[o],e[s[i]],n,r,f||l?i:o,t,e)}):!!a)}return n(t,e,o,i,u)}function vr(t,e){return t===e}function wr(t,e){return yr(t,e,vr)}var br=gr(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 Sr=ce("entries",2);function Er(t,e){return function(n,r){var o,i,u={},a=[],c=this,s=arguments,f=s.length;if(!ae(r)){for(i=1;i<f;i++)o=s[i],a.push.apply(a,ne(o)?o:[o]);r=0}return ie(n,function(o,i){((r?r.call(c,o,i,n):mr(a,function(t){return t===i})>-1)?t:e)&&(u[i]=o)}),u}}var Nr=Er(1,0),Or=Er(0,1);var Dr=/(.+)?\[(\d+)\]$/;function Ar(t,e,n,r,o){if(!t[e]){var i,u,a=e?e.match(Dr):null;if(n)u=o;else{var c=r?r.match(Dr):null;u=c&&!c[1]?new Array(On(c[2])+1):{}}return a?a[1]?(i=On(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 xr(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function jr(t,e,n){var r,o={};return t&&(e&&fn(e)?e=function(t){return function(){return or(t)}}(e):ae(e)||(e=Ne(e)),ie(t,function(i,u){r=e?e.call(n,i,u,t):i,o[r]?o[r].push(i):o[r]=[i]})),o}function Mr(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 Tr=nn(function(t,e){return t>e});function kr(t){return(t.split(".")[1]||"").length}function Cr(t,e){if(t.repeat)return t.repeat(e);var n=isNaN(e)?[]:new Array(On(e));return n.join(t)+(n.length>0?t:"")}function Ir(t,e){return t.substring(0,e)+"."+t.substring(e,t.length)}function Pr(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+Cr("0",c):s>0?r+i+u+Cr("0",s):r+i+Ir(u,c):o?f>0?r+"0."+Cr("0",Math.abs(f))+o:r+Ir(o,f):l>0?r+"0."+Cr("0",Math.abs(l))+i+u:r+Ir(i,l)+u}return e}function Rr(t,e){var n=Pr(t),r=Pr(e);return parseInt(n.replace(".",""))*parseInt(r.replace(".",""))/Math.pow(10,kr(n)+kr(r))}function Fr(t,e){return function(n,r,o){var i=Je(n),u=i;if(i){r|=0;var a=Pr(i).split("."),c=a[0],s=a[1]||"",f=s.substring(0,r+1),l=c+(f?"."+f:"");if(r>=s.length)return Je(l);if(l=i,r>0){var d=Math.pow(10,r),h=Rr(l,d);u=e&&l<0&&!1!==o?-Math[t](Math.abs(h))/d:Math[t](h)/d}else u=Math[t](l)}return u}}var $r=Fr("round",!0),_r=Fr("ceil"),Wr=Fr("floor");function qr(t){return En(t)?Pr(t):""+($e(t)?"":t)}function zr(t,e,n){var r=qr($r(t,e|=0,n)).split("."),o=r[0],i=r[1]||"",u=e-i.length;return e?u>0?o+"."+i+Cr("0",u):o+Ir(i,Math.abs(u)):o}var Ur=Ve(On);function Hr(t,e){return Rr(Je(t),Je(e))}function Kr(t,e){var n=Pr(t),r=Pr(e),o=Math.pow(10,Math.max(kr(n),kr(r)));return(Hr(t,o)+Hr(e,o))/o}function Lr(t,e){var n=Pr(t),r=Pr(e),o=kr(n),i=kr(r)-o,u=i<0,a=Math.pow(10,u?Math.abs(i):i);return Hr(n.replace(".","")/r.replace(".",""),u?1/a:a)}function Br(t,e,n){var r=0;return ie(t&&t.length>2&&ne(t)?t.sort():t,e?ae(e)?function(){r=Kr(r,e.apply(n,arguments))}:function(t){r=Kr(r,qe(t,e))}:function(t){r=Kr(r,t)}),r}var Yr="first",Zr="last";function Vr(t){return t.getFullYear()}var Jr=864e5;function Gr(t){return t.getMonth()}function Qr(t){return Nn(t)&&!isNaN(An(t))}function Xr(t,e,n){var r=e&&!isNaN(e)?e:0;if(Qr(t=Yn(t))){if(n===Yr)return new Date(Vr(t),Gr(t)+r,1);if(n===Zr)return new Date(An(Xr(t,r+1,Yr))-1);if(En(n)&&t.setDate(n),r){var o=t.getDate();if(t.setMonth(Gr(t)+r),o!==t.getDate())return t.setDate(1),new Date(An(t)-Jr)}}return t}function to(t,e,n){var r;if(Qr(t=Yn(t))&&(e&&(r=e&&!isNaN(e)?e:0,t.setFullYear(Vr(t)+r)),n||!isNaN(n))){if(n===Yr)return new Date(Vr(t),0,1);if(n===Zr)return t.setMonth(11),Xr(t,0,Zr);t.setMonth(n)}return t}function eo(t,e,n){var r,o=e&&!isNaN(e)?3*e:0;return Qr(t=Yn(t))?(r=3*(function(t){var e=t.getMonth();return e<3?1:e<6?2:e<9?3:4}(t)-1)+("last"===n?2:0),t.setMonth(r),Xr(t,o,n)):t}var no=6048e5;function ro(t,e,n,r){if(Qr(t=Yn(t))){var o,i,u=En(r),a=An(t),c=u?r:Qt.firstDayOfWeek,s=t.getDay(),f=!1;return"first"===n?(f=!0,i=c):"last"===n?(f=!0,i=(c+6)%7):(i=En(n)?n:s,f=!0),f&&s!==i&&(o=0,c>s?o=-(7-c+s):c<s&&(o=c-s),a+=i>c?((0===i?7:i)-c+o)*Jr:i<c?(7-c+i+o)*Jr:o*Jr),e&&!isNaN(e)&&(a+=e*no),new Date(a)}return t}function oo(t,e,n){if(Qr(t=Yn(t))&&!isNaN(e)){if(t.setDate(t.getDate()+On(e)),n===Yr)return new Date(Vr(t),Gr(t),t.getDate());if(n===Zr)return new Date(An(oo(t,1,Yr))-1)}return t}function io(t){return t.toUpperCase()}var uo=xe(Mr(0,7),function(t){return[(t+1)%7,(t+2)%7,(t+3)%7]});function ao(t,e){var n=new Date(t).getDay();return ke(uo[e],n)}function co(t,e){return function(n,r){var o=En(r)?r:Qt.firstDayOfWeek,i=Yn(n);if(Qr(i)){var u,a=ro(i,0,o,o),c=t(a),s=An(c),f=An(a),l=f+5184e5,d=new Date(l),h=ro(c,0,o,o),p=An(h);if(f===p)return 1;if(e(a,d))for(u=An(t(d));u<l;u+=Jr)if(ao(u,o))return 1;var g=p+5184e5,m=new Date(l),y=1;if(e(h,m))for(y=0,u=s;u<g;u+=Jr)if(ao(u,o)){y++;break}return Math.floor((f-p)/no)+y}return NaN}}var so=co(function(t){return new Date(t.getFullYear(),0,1)},function(t,e){return t.getFullYear()!==e.getFullYear()});function fo(t){return An(function(t){return new Date(Vr(t),Gr(t),t.getDate())}(t))}function lo(t){return Qr(t=Yn(t))?Math.floor((fo(t)-fo(to(t,0,Yr)))/Jr)+1:NaN}function ho(t,e,n){var r=qr(t);return e|=0,n=Fe(n)?" ":""+n,r.padStart?r.padStart(e,n):e>r.length?((e-=r.length)>n.length&&(n+=Cr(n,e/n.length)),n.slice(0,e)+r):r}function po(t,e,n,r){var o=e[n];return o?ae(o)?o(r,n,t):o[r]:r}var go=/\[([^\]]+)]|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 mo(t,e,n){if(t){if(Qr(t=Yn(t))){var r=n||{},o=e||Qt.parseDateFormat||Qt.formatString,i=t.getHours(),u=i<12?"am":"pm",a=me({},Qt.parseDateRules||Qt.formatStringMatchs,r.formats),c=function(e,n){return(""+Vr(t)).substring(4-n)},s=function(e,n){return ho(Gr(t)+1,n,"0")},f=function(e,n){return ho(t.getDate(),n,"0")},l=function(t,e){return ho(i,e,"0")},d=function(t,e){return ho(i<=12?i:i-12,e,"0")},h=function(e,n){return ho(t.getMinutes(),n,"0")},p=function(e,n){return ho(t.getSeconds(),n,"0")},g=function(e,n){return ho(t.getMilliseconds(),n,"0")},m=function(e,n){var r=t.getTimezoneOffset()/60*-1;return po(t,a,e,(r>=0?"+":"-")+ho(r,2,"0")+(1===n?":":"")+"00")},y=function(e,n){return ho(po(t,a,e,so(t,$e(r.firstDay)?Qt.firstDayOfWeek:r.firstDay)),n,"0")},v=function(e,n){return ho(po(t,a,e,lo(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:y,W:y,DDD:v,D:v,a:function(e){return po(t,a,e,u)},A:function(e){return po(t,a,e,io(u))},e:function(e){return po(t,a,e,t.getDay())},E:function(e){return po(t,a,e,t.getDay())},q:function(e){return po(t,a,e,Math.floor((Gr(t)+3)/3))}};return o.replace(go,function(t,e){return e||(w[t]?w[t](t,t.length):t)})}return"Invalid Date"}return""}var yo=Date.now||function(){return An(Zn())};var vo=co(function(t){return new Date(t.getFullYear(),t.getMonth(),1)},function(t,e){return t.getMonth()!==e.getMonth()});var wo=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function bo(t){return t&&t.trimRight?t.trimRight():qr(t).replace(/[\s\uFEFF\xA0]+$/g,"")}function So(t){return t&&t.trimLeft?t.trimLeft():qr(t).replace(/^[\s\uFEFF\xA0]+/g,"")}function Eo(t){return t&&t.trim?t.trim():bo(So(t))}var No={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function Oo(t){var e=new RegExp("(?:"+se(t).join("|")+")","g");return function(n){return qr(n).replace(e,function(e){return t[e]})}}var Do=Oo(No),Ao={};ie(No,function(t,e){Ao[No[e]]=e});var xo=Oo(Ao);function jo(t,e,n){return t.substring(e,n)}function Mo(t){return t.toLowerCase()}var To={};var ko={};function Co(t,e,n){return qr(t).replace((n||Qt).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(t,n){return qe(e,Eo(n))})}var Io=decodeURIComponent;function Po(t){var e,n={};return t&&Ge(t)&&Xt(t.split("&"),function(t){e=t.split("="),n[Io(e[0])]=Io(e[1]||"")}),n}var Ro=encodeURIComponent;function Fo(t,e,n){var r,o=[];return ie(t,function(t,i){r=ne(t),Oe(t)||r?o=o.concat(Fo(t,e+"["+i+"]",r)):o.push(Ro(e+"["+(n?"":i)+"]")+"="+Ro(Ee(t)?"":t))}),o}var $o=typeof location===Re?0:location;function _o(){return $o?$o.origin||$o.protocol+"//"+$o.host:""}function Wo(t){return Po(t.split("?")[1]||"")}function qo(t){var e,n,r,o,i=""+t;return 0===i.indexOf("//")?i=($o?$o.protocol:"")+i:0===i.indexOf("/")&&(i=_o()+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=Wo(o.hash),o.searchQuery=Wo(o.search),o}function zo(t,e){var n=parseFloat(e),r=Zn(),o=An(r);switch(t){case"y":return An(to(r,n));case"M":return An(Xr(r,n));case"d":return An(oo(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 Uo(t){return(Nn(t)?t:new Date(t)).toUTCString()}function Ho(t,e,n){if(cr){var r,o,i,u,a,c,s=[],f=arguments;return ne(t)?s=t:f.length>1?s=[me({name:t,value:e},n)]:fn(t)&&(s=[t]),s.length>0?(Xt(s,function(t){r=me({},Qt.cookies,t),i=[],r.name&&(o=r.expires,i.push(Ro(r.name)+"="+Ro(fn(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 Uo(zo(n,e))}):/^[0-9]{11,13}$/.test(o)||Nn(o)?Uo(o):Uo(zo("d",o)),r.expires=o),Xt(["expires","path","domain","secure"],function(t){Fe(r[t])||i.push(r[t]&&"secure"===t?t:t+"="+r[t])})),cr.cookie=i.join("; ")}),!0):(u={},(a=cr.cookie)&&Xt(a.split("; "),function(t){c=t.indexOf("="),u[Io(t.substring(0,c))]=Io(t.substring(c+1)||"")}),1===f.length?u[t]:u)}return!1}function Ko(t){return Ho(t)}function Lo(t,e,n){return Ho(t,e,n),Ho}function Bo(t,e){Ho(t,"",me({expires:-1},Qt.cookies,e))}function Yo(){return se(Ho())}function Zo(t){try{var e="__xe_t";return t.setItem(e,1),t.removeItem(e),!0}catch(t){return!1}}function Vo(t){return navigator.userAgent.indexOf(t)>-1}me(Ho,{has:function(t){return ke(Yo(),t)},set:Lo,setItem:Lo,get:Ko,getItem:Ko,remove:Bo,removeItem:Bo,keys:Yo,getJSON:function(){return Ho()}}),me(ye,{assign:me,objectEach:oe,lastObjectEach:Se,objectMap:function(t,e,n){var r={};if(t){if(!e)return t;ae(e)||(e=Ne(e)),ie(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])&&Ae(t,e);return t},uniq:Ie,union:function(){for(var t=arguments,e=[],n=0,r=t.length;n<r;n++)e=e.concat(Pe(t[n]));return Ie(e)},sortBy:Le,orderBy:Ke,shuffle:Ze,sample:function(t,e){var n=Ze(t);return arguments.length<=1?n[0]:(e<n.length&&(n.length=e||0),n)},some:Me,every:Te,slice:Qe,filter:function(t,e,n){var r=[];if(t&&e){if(t.filter)return t.filter(e,n);ie(t,function(o,i){e.call(n,o,i,t)&&r.push(o)})}return r},find:tn,findLast:function(t,e,n){if(t){ne(t)||(t=Ye(t));for(var r=t.length-1;r>=0;r--)if(e.call(n,t[r],r,t))return t[r]}},findKey:Xe,includes:ke,arrayIndexOf:bn,arrayLastIndexOf:Sn,map:xe,reduce:function(t,e,n){if(t){var r,o,i=0,u=n,a=arguments.length>2,c=se(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(ne(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(ne(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 on(arguments)},unzip:on,zipObject:function(t,e){var n={};return e=e||[],ie(Ye(t),function(t,r){n[t]=e[r]}),n},flatten:function(t,e){return ne(t)?un(t,e):[]},toArray:Pe,includeArrays:Ce,pluck:en,invoke:function(t,e){for(var n,r=arguments,o=[],i=[],u=2,a=r.length;u<a;u++)o.push(r[u]);if(ne(e)){for(a=e.length-1,u=0;u<a;u++)i.push(e[u]);e=e[a]}return xe(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:Xt,lastArrayEach:be,toArrayTree:function(t,e){var n,r,o,i,u,a,c,s,f=me({},Qt.treeOptions,e),l=f.strict,d=f.key,h=f.parentKey,p=f.children,g=f.mapChildren,m=f.rootValues,y=f.rootParentValue,v=f.sortKey,w=f.reverse,b=f.data,S=[],E={},N={},O={},D={},A={},x=void 0===y;return v&&(t=Ke(he(t),v),w&&(t=t.reverse())),m&&m.length&&ie(m,function(t){A[t]=1}),ie(t,function(t){n=t[d],(i=$e(n)?D:O)[n]&&an("warn","Duplicate primary key="+n),i[n]=!0}),ie(t,function(t){n=t[d],u=$e(n),b?(r={})[b]=t:r=t,o=t[h],a=$e(o),(c=u?N:E)[n]=c[n]||[],r[d]=n,r[h]=o,n===o&&(o=null,an("warn","Error infinite Loop. key="+n+" parentKey="+n)),i=a?D:O,(s=a?N:E)[o]=s[o]||[],s[o].push(r),r[p]=c[n],g&&(r[g]=c[n]),m&&m.length?A[n]&&S.push(r):x?(!l||l&&a)&&(i[o]||S.push(r)):o===y&&S.push(r)}),l&&function(t,e){ie(t,function(t){t[e]&&!t[e].length&&dn(t,e)})}(t,p),S},toTreeArray:function(t,e){return hn([],null,t,me({},Qt.treeOptions,e))},findTree:gn,eachTree:mn,mapTree:yn,filterTree:function(t,e,n,r){var o=[];return t&&e&&mn(t,function(t,n,i,u,a,c){e.call(r,t,n,i,u,a,c)&&o.push(t)},n),o},searchTree:wn,hasOwnProp:re,eqNull:$e,isNaN:function(t){return En(t)&&isNaN(t)},isFinite:function(t){return En(t)&&isFinite(t)},isUndefined:Fe,isArray:ne,isFloat:function(t){return!(Ee(t)||isNaN(t)||ne(t)||tr(t))},isInteger:tr,isFunction:ae,isBoolean:er,isString:Ge,isNumber:En,isRegExp:nr,isObject:fn,isPlainObject:Oe,isDate:Nn,isError:rr,isTypeError:function(t){return!!t&&t.constructor===TypeError},isEmpty:or,isNull:Ee,isSymbol:ur,isArguments:ar,isElement:function(t){return!!(t&&Ge(t.nodeName)&&En(t.nodeType))},isDocument:function(t){return!(!t||!cr||9!==t.nodeType)},isWindow:function(t){return!(!sr||!t||t!==t.window)},isFormData:function(t){return fr&&t instanceof FormData},isMap:function(t){return lr&&t instanceof Map},isWeakMap:function(t){return dr&&t instanceof WeakMap},isSet:function(t){return hr&&t instanceof Set},isWeakSet:function(t){return pr&&t instanceof WeakSet},isLeapYear:Vn,isMatch:function(t,e){var n=se(t),r=se(e);return!r.length||(Ce(n,r)?Me(r,function(r){return mr(n,function(n){return n===r&&wr(t[n],e[r])})>-1}):wr(t,e))},isEqual:wr,isEqualWith:function(t,e,n){return ae(n)?yr(t,e,function(t,e,r,o,i){var u=n(t,e,r,o,i);return Fe(u)?vr(t,e):!!u},n):yr(t,e,vr)},getType:function(t){return Ee(t)?"null":ur(t)?"symbol":Nn(t)?"date":ne(t)?"array":nr(t)?"regexp":rr(t)?"error":typeof t},uniqueId:function(t){return""+($e(t)?"":t)+Qt.keyId++},getSize:Xn,indexOf:Gn,lastIndexOf:Qn,findIndexOf:mr,findLastIndexOf:br,toStringJSON:function(t){if(Oe(t))return t;if(Ge(t))try{return JSON.parse(t)}catch(t){}return{}},toJSONString:function(t){return $e(t)?"":JSON.stringify(t)},keys:se,values:Ye,entries:Sr,pick:Nr,omit:Or,first:function(t){return Ye(t)[0]},last:function(t){var e=Ye(t);return e[e.length-1]},each:ie,forOf:function(t,e,n){if(t)if(ne(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(re(t,i)&&!1===e.call(n,t[i],i,t))break},lastForOf:function(t,e,n){var r,o;if(t)if(ne(t))for(r=t.length-1;r>=0&&!1!==e.call(n,t[r],r,t);r--);else for(r=(o=re(t)).length-1;r>=0&&!1!==e.call(n,t[o[r]],o[r],t);r--);},lastEach:sn,has:function(t,e){if(t){if(re(t,e))return!0;var n,r,o,i,u,a,c=We(e),s=0,f=c.length;for(u=t;s<f&&(a=!1,(i=(n=c[s])?n.match(_e):"")?(r=i[1],o=i[2],r?u[r]&&re(u[r],o)&&(a=!0,u=u[r][o]):re(u,o)&&(a=!0,u=u[o])):re(u,n)&&(a=!0,u=u[n]),a);s++)if(s===f-1)return!0}return!1},get:qe,set:function(t,e,n){if(t&&De(e))if(!t[e]&&!re(t,e)||xr(e)){for(var r=t,o=We(e),i=o.length,u=0;u<i;u++)if(!xr(o[u])){var a=u===i-1;r=Ar(r,o[u],a,a?null:o[u+1],n)}}else t[e]=n;return t},groupBy:jr,countBy:function(t,e,n){var r=jr(t,e,n||this);return oe(r,function(t,e){r[e]=t.length}),r},clone:he,clear:ln,remove:dn,range:Mr,destructuring:function(t,e){if(t&&e){var n=me.apply(this,[{}].concat(Qe(arguments,1))),r=se(n);Xt(se(t),function(e){ke(r,e)&&(t[e]=n[e])})}return t},random:Be,min:Tr,max:rn,commafy:function(t,e){var n,r,o,i,u,a=me({},Qt.commafyOptions,e),c=a.digits;return En(t)?(n=(a.ceil?_r:a.floor?Wr:$r)(t,c),i=(r=Pr(c?zr(n,c):n).split("."))[0],u=r[1],(o=i&&n<0)&&(i=i.substring(1,i.length))):i=(r=(n=qr(t).replace(/,/g,""))?[n]:[])[0],r.length?(o?"-":"")+i.replace(new RegExp("(?=(?!(\\b))(.{"+(a.spaceNumber||3)+"})+$)","g"),a.separator||",")+(u?"."+u:""):n},round:$r,ceil:_r,floor:Wr,toFixed:zr,toNumber:Je,toNumberString:Pr,toInteger:Ur,add:function(t,e){return Kr(Je(t),Je(e))},subtract:function(t,e){var n=Je(t),r=Je(e),o=Pr(n),i=Pr(r),u=kr(o),a=kr(i),c=Math.pow(10,Math.max(u,a));return parseFloat(zr((n*c-r*c)/c,u>=a?u:a))},multiply:Hr,divide:function(t,e){return Lr(Je(t),Je(e))},sum:Br,mean:function(t,e,n){return Lr(Br(t,e,n),Xn(t))},now:yo,timestamp:function(t,e){if(t){var n=Yn(t,e);return Nn(n)?An(n):n}return yo()},isValidDate:Qr,isDateSame:function(t,e,n){return!(!t||!e)&&("Invalid Date"!==(t=mo(t,n))&&t===mo(e,n))},toStringDate:Yn,toDateString:mo,getWhatYear:to,getWhatQuarter:eo,getWhatMonth:Xr,getWhatWeek:ro,getWhatDay:oo,getWhatHours:function t(e,n,r){if(Qr(e=Yn(e))&&!isNaN(n)){if(e.setHours(e.getHours()+On(n)),r===Yr)return new Date(Vr(e),Gr(e),e.getDate(),e.getHours());if(r===Zr)return new Date(An(t(e,1,Yr))-1)}return e},getWhatMinutes:function t(e,n,r){if(Qr(e=Yn(e))&&!isNaN(n)){if(e.setMinutes(e.getMinutes()+On(n)),r===Yr)return new Date(Vr(e),Gr(e),e.getDate(),e.getHours(),e.getMinutes());if(r===Zr)return new Date(An(t(e,1,Yr))-1)}return e},getWhatSeconds:function t(e,n,r){if(Qr(e=Yn(e))&&!isNaN(n)){if(e.setSeconds(e.getSeconds()+On(n)),r===Yr)return new Date(Vr(e),Gr(e),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());if(r===Zr)return new Date(An(t(e,1,Yr))-1)}return e},getYearDay:lo,getYearWeek:so,getMonthWeek:vo,getDayOfYear:function(t,e){return Qr(t=Yn(t))?Vn(to(t,e))?366:365:NaN},getDayOfQuarter:function(t,e){return Qr(t=Yn(t))?Math.floor((An(eo(t,e,Zr))-An(eo(t,e,Yr)))/Jr)+1:NaN},getDayOfMonth:function(t,e){return Qr(t=Yn(t))?Math.floor((An(Xr(t,e,Zr))-An(Xr(t,e,Yr)))/Jr)+1:NaN},getDateDiff:function(t,e){var n,r,o,i,u,a,c={done:!1,status:!1,time:0};if(t=Yn(t),e=e?Yn(e):Zn(),Qr(t)&&Qr(e)&&(n=An(t))<(r=An(e)))for(i=c.time=r-n,c.done=!0,c.status=!0,a=0,u=wo.length;a<u;a++)i>=(o=wo[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:Eo,trimLeft:So,trimRight:bo,escape:Do,unescape:xo,camelCase:function(t){if(t=qr(t),To[t])return To[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=Mo(n),r?o>2&&r+o<e?io(jo(n,0,1))+jo(n,1,o-1)+io(jo(n,o-1,o)):io(jo(n,0,1))+jo(n,1,o):o>1&&r+o<e?jo(n,0,o-1)+io(jo(n,o-1,o)):n}).replace(/(-[a-zA-Z])/g,function(t,e){return io(jo(e,1,e.length))}),To[t]=n,n},kebabCase:function(t){if(t=qr(t),ko[t])return ko[t];if(/^[A-Z]+$/.test(t))return Mo(t);var e=t.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(t,e,n,r){var o=n.length;return o>1?e+"-"+Mo(jo(n,0,o-1))+"-"+Mo(jo(n,o-1,o))+r:Mo(e+"-"+n+r)}).replace(/^([A-Z]+)([a-z]+)?$/,function(t,e,n){var r=e.length;return Mo(jo(e,0,r-1)+"-"+jo(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||"")+Mo(jo(n,0,i-1))+"-"+Mo(jo(n,i-1,i))+r:(e||"")+(o?"-":"")+Mo(n)+(r||"")});return e=e.replace(/([-]+)/g,function(t,n,r){return r&&r+n.length<e.length?"-":""}),ko[t]=e,e},repeat:function(t,e){return Cr(qr(t),e)},padStart:ho,padEnd:function(t,e,n){var r=qr(t);return e|=0,n=Fe(n)?" ":""+n,r.padEnd?r.padEnd(e,n):e>r.length?((e-=r.length)>n.length&&(n+=Cr(n,e/n.length)),r+n.slice(0,e)):r},startsWith:function(t,e,n){var r=qr(t);return 0===(1===arguments.length?r:r.substring(n)).indexOf(e)},endsWith:function(t,e,n){var r=qr(t),o=arguments.length;return o>1&&(o>2?r.substring(0,n).indexOf(e)===n-1:r.indexOf(e)===r.length-1)},template:Co,toFormatString:function(t,e){return Co(t,e,{tmplRE:/\{([.\w[\]\s]+)\}/g})},toString:qr,toValueString:qr,noop:function(){},property:Ne,bind:function(t,e){var n=Qe(arguments,2);return function(){return t.apply(e,Qe(arguments).concat(n))}},once:function(t,e){var n=!1,r=null,o=Qe(arguments,2);return function(){return n||(r=t.apply(e,Qe(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(Qe(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(Qe(i))))}},throttle:function(t,e,n){var r=null,o=null,i=!1,u=null,a=me({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}:me({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=Qe(arguments,2),r=this;return setTimeout(function(){t.apply(r,n)},e)},unserialize:Po,serialize:function(t){var e,n=[];return ie(t,function(t,r){Fe(t)||(e=ne(t),Oe(t)||e?n=n.concat(Fo(t,r,e)):n.push(Ro(r)+"="+Ro(Ee(t)?"":t)))}),n.join("&").replace(/%20/g,"+")},parseUrl:qo,getBaseURL:function(){if($o){var t=$o.pathname,e=Qn(t,"/")+1;return _o()+(e===t.length?t:t.substring(0,e))}return""},locat:function(){return $o?qo($o.href):{}},browse:function(){var t,e,n,r=!1,o=!1,i=!1,u={isNode:!1,isMobile:r,isPC:!1,isDoc:!!cr};if(sr||typeof process===Re){n=Vo("Edge"),e=Vo("Chrome"),r=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),u.isDoc&&(t=cr.body||cr.documentElement,Xt(["webkit","khtml","moz","ms","o"],function(e){u["-"+e]=!!t[e+"MatchesSelector"]}));try{o=Zo(sr.localStorage)}catch(t){}try{i=Zo(sr.sessionStorage)}catch(t){}me(u,{edge:n,firefox:Vo("Firefox"),msie:!n&&u["-ms"],safari:!e&&!n&&Vo("Safari"),isMobile:r,isPC:!r,isLocalStorage:o,isSessionStorage:i})}else u.isNode=!0;return u},cookie:Ho});let Jo=!1;const Go="Asia/Shanghai";function Qo(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 Xo(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 ti(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&&F(u)?ei(n,e,u,i,t):u&&B(u)?ni(n,e,u,i,t):ri(n,e,u,i,t)),t),[]))}function ei(t,e,n,r,o){const i=ti(n,e[r]||{},{excludeAll:t?.excludeAll,...t});Object.keys(i).length&&o.push([r,i])}function ni(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=ti(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(F(e)&&!F(r)||B(e)&&!B(r)||typeof e!=typeof r||!r)i.push(e);else if(F(e)||B(e)){const n=ti(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 ri(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 oi(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(oi(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=oi(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 ii(t={},e={}){let n;for(n in e)t[n]=F(t[n])?ii(t[n],e[n]):t[n]=e[n];return t}function ui(t,e="px"){return ye.isNumber(t)||/^\d+$/.test(`${t}`)?`${t}${e}`:`${t||""}`}function ai(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 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 si(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=>si(t));const e={};return Object.keys(t).forEach(n=>{e[n]=si(t[n])}),e}function fi(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 li(...t){for(const e of t)if(null!=e)return e}function di(...t){return a(c(t))}function hi(){const t=new Event("resize");window.dispatchEvent(t)}function pi(t,e,n="prop",r="content"){t.forEach(t=>{Object.prototype.hasOwnProperty.call(t,n)&&(B(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 gi=function(t,e="YYYY-MM-DD HH:mm:ss",n=Go){return R(t)||""===t||0===t||"0"===t?"":r(t).isValid()?(Jo||(r.extend(f),r.extend(l),Jo=!0),n===Go?r(t).utcOffset(480).format(e):r(t).tz(n).format(e)):""};function mi(t){return s(t)}function yi(t,e){return t?e&&0!==e.length?e.reduce((t,e)=>(delete t[e],t),{...t}):t:{}}function vi(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 y(){const t=Date.now();h(),void 0!==s&&d(t)}const v=(...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(y,i)),r?d(t):f}(n);if(void 0!==i)return h(),u=window.setTimeout(m,e),a=window.setTimeout(y,i),r?d(n):f}return void 0===u&&(u=window.setTimeout(m,e),void 0!==i&&(a=window.setTimeout(y,i))),f};return v.isPending=()=>void 0!==u||void 0!==a,v.cancel=()=>{p()},v.flush=(...e)=>{if(!v.isPending())return e.length>0?t(...e):f;const n=void 0!==s?s:e;return p(),t(...n)},v}function wi(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 bi(...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 Si(...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 Ei(...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 Ni(...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 Oi(...t){return t.reduce((t,e)=>xi(t??0).add(e??0).toNumber(),0)}function Di(t,e){return t.reduce((t,n)=>xi(t??0).add(e(n)??0).toNumber(),0)}function Ai(t,e,n){const r={},o=n;return t.forEach(t=>{const n=e(t);if(n){const e=o(t);r[n]=xi(r[n]||0).add(e).toNumber()}}),r}function xi(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 ji{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 Mi{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 Ti=!0,ki=25200,Ci={key:"_11111000001111@",iv:"@11111000001111_"};class Ii{key;iv;constructor(t={}){const{key:e,iv:n}=t;e&&(this.key=y?.(e)),n&&(this.iv=y?.(n))}get getOptions(){return{mode:v,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 Pi({prefixKey:t="",storage:e=sessionStorage,key:n=Ci.key,iv:r=Ci.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 Ii({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:R(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(R(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 Ri(t=sessionStorage,e={}){return Pi(function(t,e={}){return{hasEncrypt:Ti,storage:t,prefixKey:"tt-admin",...e}}(t,e))}function Fi(t={}){return Ri(sessionStorage,{...t,timeout:ki})}function $i(t={}){return Ri(localStorage,{...t,timeout:ki})}function _i(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 Wi(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 qi(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 zi=new Set(["*","all","ALL","All"]);function Ui(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:U(e)&&(c=e?.split(","));const s=t=>a?t:void 0;return c?.map(e=>zi.has(String(e))?"全部":Array.isArray(t)?t?.find(t=>t[o]==e)?.[r]??s(e):t?.[e]??s(e))?.join()}const Hi=(t=[])=>{let e=[];return e=t.filter(t=>Boolean(Object.values(t).filter(Boolean).length)),e.length?e:void 0},Ki=(t,e=",")=>Array.isArray(t)?t:t?.split(e).filter(Boolean)??[],Li=(t=[])=>t.filter(Boolean),Bi=(t,e)=>t()?e:[],Yi=(t,e=",")=>Array.isArray(t)?t.join(e):t;export{Ui as CODE_TO_VALUE,ki as DEFAULT_CACHE_TIME,Li as FILTER_BOOLEAN,Hi as FILTER_EMPTY,Bi as GET_LIST_BY_FUNC,Yi as JOIN_BY_SEPARATOR,Ki as SPLIT_BY_SEPARATOR,ji as StateHandler,Mi as StateHandlerOld,Rt as TtHttp,bi as add,pi as arrGive,fi as arrayToTree,ci as bindMethods,Ci as cacheCipher,xi as calc,Xo as calcWordsWidth,S as capitalize,_i as checkVersion,di as clnm,mi as cloneDeep,Ai as clsSumTotalBy,oi as compareObjects,Pi as create,$i as createLocalStorage,Fi as createSessionStorage,Ri as createStorage,gi as dateFormat,vi as debounce,si as deepCopy,ii as deepMerge,Ni as divide,O as downloadFile,Ti as enableStorageEncryption,Jt as extractIdFromTitle,Bt as extractResourceFromApi,_t as formatAmount,Wt as formatAmountOfPlace,zt as formatDecimal,Ut as formatFileSize,Wi as formatFormData,Ht as formatPeriod,qt as formatPlaceOfAmount,Lt as formatToDate,Kt as formatToDateTime,Vt as generateFormName,Yt as generateTestId,at as getBrowserType,ut as getDeviceType,ti as getDifference,li as getFirstNonNullOrUndefined,It as getPageKey,Qo as getStorage,k as is,st as isAndroid,B as isArray,K as isBoolean,G as isClient,W as isDate,ht as isDayjsObject,C as isDef,Z as isElement,$ as isEmpty,_ as isEmptyZero,et as isError,lt as isExternal,ot as isFalse,pt as isFormData,H as isFunction,ct as isIos,dt as isJson,V as isMap,P as isNull,R as isNullOrUnDef,q as isNumber,F as isObject,ft as isPC,tt as isPrimitive,z as isPromise,L as isRegExp,J as isServer,rt as isSet,U as isString,X as isStringNumber,nt as isSymbol,it as isTrue,I as isUndefined,Q as isUrl,Gt as isValidTestId,Y as isWindow,N as kebabToCamelCase,Pt as loadingService,wi as mergeWithArrayOverride,Ei as multiply,yi as omit,qi as revertFormatFormData,ni as setDifferenceArr,ri as setDifferenceField,ei as setDifferenceObj,Si as subtract,Oi as sumTotal,Di as sumTotalBy,ui as toCssUnit,Zt as toKebabCase,hi as triggerWindowResize,E as trim,ai as useVModel,Ft 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 y}from"crypto-js/enc-utf8";import v from"crypto-js/mode-ecb";import w from"crypto-js/pad-pkcs7";import{cloneDeep as b}from"lodash-es";function S(t){return t.charAt(0).toUpperCase()+t.slice(1)}function E(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 C(t){return void 0!==t}function P(t){return!C(t)}function I(t){return null===t}function R(t){return P(t)||I(t)}function F(t){return!R(t)&&(t instanceof Promise||k(t,"Object"))}function $(t){return!!R(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!!$(t)||(0===t||!!z(t)&&("0"===t||"undefined"===t||"null"===t))}function W(t){return k(t,"Date")}function U(t){return k(t,"Number")&&t==t}function H(t){return k(t,"Promise")&&F(t)&&K(t.then)&&K(t.catch)}function z(t){return k(t,"String")}function K(t){return"function"==typeof t}function L(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===I(t)||t===P(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="tt-loading-mask",mt=new Map;let yt=null;const vt=()=>document.documentElement.classList.contains("dark")?"rgba(7, 7, 7, 0.85)":"rgba(255, 255, 255, 0.5)",wt={lock:!0,get background(){return vt()},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:gt};function bt(t){return!!t.isConnected&&t.getClientRects().length>0}function St(t){if(!t.isConnected)return!1;return(t.clientHeight||t.getBoundingClientRect().height)>=48}function Et(){const t=document.querySelectorAll("micro-app-body");for(const e of Array.from(t)){const t=e;if(!bt(t))continue;const n=t.querySelector("#app");if(n)return n}const e=document.querySelector("micro-app-body");return e?e.querySelector("#app"):null}function Nt(t){if(t.instance){try{t.instance.close()}catch{}t.instance=null,t.target=null}else t.target=null}function Ot(t){if(!t.instance)return!1;if(!t.target)return function(){const t=document.body.querySelector(`.el-loading-mask.${gt}.is-fullscreen`);return!(!t||!t.isConnected)}();if(!bt(t.target)||!St(t.target))return!1;const e=t.target.querySelector(`.el-loading-mask.${gt}`);return!(!e||!e.isConnected)}function Dt(t,e){if(xt()!==t)return void Nt(e);if(e.instance&&Ot(e))return;Nt(e);const r=function(){const t=[Et(),document.querySelector("#app-content"),document.querySelector("#app")];for(const e of t)if(e&&bt(e)&&St(e))return e;return null}(),o={...wt,background:vt(),...r?{target:r,fullscreen:!1}:{fullscreen:!0}};e.instance=n.service(o),e.target=r}function At(t){for(const[e,n]of mt)e!==t&&Nt(n)}function xt(t){const e="undefined"!=typeof window&&window.__MICRO_APP_NAME__||"host";let n=t;return n||(n=yt?.currentRoute?.value?yt.currentRoute.value.fullPath:"undefined"!=typeof window?window.location.pathname+window.location.search+window.location.hash:"/"),`${e}::${n}`}const jt={getPageKey:xt,bindRouter(t){t&&yt!==t&&(yt=t,t.afterEach(()=>{o(()=>jt.sync())}))},showLoading(t){const e=t||xt(),n=function(t){let e=mt.get(t);return e||(e={count:0,instance:null,target:null},mt.set(t,e)),e}(e);return n.count+=1,At(xt()),Dt(e,n),()=>this.hideLoading(e)},hideLoading(t){const e=t||xt(),n=mt.get(e);n&&(n.count=Math.max(0,n.count-1),0===n.count&&(Nt(n),mt.delete(e)))},sync(t){const e=t||xt();At(e);const n=mt.get(e);n&&n.count>0&&Dt(e,n)}};function Tt(n){const{router:r,useUserStore:i,VITE_API_URL:u,VITE_WITH_CREDENTIALS:a}=n;jt.bindRouter(r);const c=new Set;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"],f=new Map;function l(t){t&&setTimeout(()=>{const e=(f.get(t)||1)-1;e<=0?(f.delete(t),function(t){t&&c.has(t)&&(c.delete(t),o(()=>{jt.hideLoading(t)}))}(t)):f.set(t,e)},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 y(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>y(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]=y(r)}return e}function v(t,e){return new x(t,e)}function w(t){const e=v(t||A.unauthorized,D.unauthorized);if(!d)throw d=!0,S(),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();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));const o=xt();t.__loadingPageKey=o;const u=f.get(o)||0;return t.hideLoading||0!==u||function(t){c.add(t),jt.showLoading(t)}(o),f.set(o,u+1),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(v(A.requestConfigError,D.error)),Promise.reject(t))),p.interceptors.response.use(async t=>{l(t.config?.__loadingPageKey),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 v(A.requestFailed,D.error)}}(t);const e=t.headers["content-type"];if(e?.includes("application/json")){t.data&&(t.data=y(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),v(n||A.requestFailed,e)}if(s.includes(e))return O(t,e),t},t=>(l(t.config?.__loadingPageKey),t.response?.status===D.unauthorized&&w(),Promise.reject(j(t))));const S=()=>{setTimeout(()=>{i().logOut()},500)};let E=null;async function N(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&&e.code===D.NEED_REFRESH_TOKEN&&!t.url?.includes("/iam/user/refreshToken")&&!t.__retriedAfterRefresh)return t.__retriedAfterRefresh=!0,await(E||(E=(async()=>{await i().refreshTokenFunc(),await M(1e3)})().finally(()=>{E=null})),E),N(t,n);if(n>0&&e instanceof x&&(r=e.code,[D.requestTimeout,D.internalServerError,D.badGateway,D.serviceUnavailable,D.gatewayTimeout].includes(r)))return await M(1e3),N(t,n-1);throw e}var r}function M(t){return new Promise(e=>setTimeout(e,t))}const k={get:t=>N({...t,method:"GET"}),post:t=>N({...t,method:"POST"}),put:t=>N({...t,method:"PUT"}),del:t=>N({...t,method:"DELETE"}),patch:t=>N({...t,method:"PATCH"}),request:t=>N(t)};return{...k,logOut:S,setBaseUrl:t=>{p.defaults.baseURL=t}}}function Mt(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 kt="0,0.00";function Ct(t,e=kt){return t?u(t).format(e):"0.00"}function Pt(t,e=kt){return t?u(t).format(e):"0.00"}function It(t){return t?u(u(t).format(kt)).value():0}function Rt(t,e){if(R(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 Ft(t,e=2){if(R(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 $t(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 _t(t,e="YYYY-MM-DD HH:mm:ss"){return R(t)?"--":r(t).isValid()?r(t).format(e):"--"}function Wt(t,e="YYYY-MM-DD",n=!1){return R(t)?"--":n?t?r(+t).format(e):"--":r(t).isValid()?r(t).format(e):"--"}function Ut(t){if("string"==typeof t)return t.trim();if("function"==typeof t){return(t.name||"").replace(/^bound\s+/i,"")}return""}function Ht(...t){return t.filter(t=>null!=t&&""!==t).join("-")}function zt(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 Kt(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 Lt(t){return t?zt(t):""}function Bt(t){if(!t)return!1;return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(t)}var qt={keyId:1,cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};function Yt(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 Zt=Object.prototype.toString;function Vt(t){return function(e){return"[object "+t+"]"===Zt.call(e)}}var Jt=Array.isArray||Vt("Array");function Gt(t,e){return!(!t||!t.hasOwnProperty)&&t.hasOwnProperty(e)}function Qt(t,e,n){if(t)for(var r in t)Gt(t,r)&&e.call(n,t[r],r,t)}function Xt(t,e,n){return t?(Jt(t)?Yt:Qt)(t,e,n):t}function te(t){return function(e){return typeof e===t}}var ee=te("function");function ne(t,e){var n=Object[t];return function(t){var r=[];if(t){if(n)return n(t);Xt(t,e>1?function(e){r.push([""+e,t[e]])}:function(){r.push(arguments[e])})}return r}}var re=ne("keys",1);function oe(t,e){var n=t.__proto__.constructor;return e?new n(e):new n}function ie(t,e){return e?ue(t,e):t}function ue(t,e){if(t)switch(Zt.call(t)){case"[object Object]":var n=Object.create(Object.getPrototypeOf(t));return Qt(t,function(t,r){n[r]=ie(t,e)}),n;case"[object Date]":case"[object RegExp]":return oe(t,t.valueOf());case"[object Array]":case"[object Arguments]":var r=[];return Yt(t,function(t){r.push(ie(t,e))}),r;case"[object Set]":var o=oe(t);return o.forEach(function(t){o.add(ie(t,e))}),o;case"[object Map]":var i=oe(t);return i.forEach(function(t,n){i.set(n,ie(t,e))}),i}return t}function ae(t,e){return t?ue(t,e):t}var ce=Object.assign;function se(t,e,n){for(var r,o=e.length,i=1;i<o;i++)r=e[i],Yt(re(e[i]),n?function(e){t[e]=ae(r[e],n)}:function(e){t[e]=r[e]});return t}var fe=function(t){if(t){var e=arguments;if(!0!==t)return ce?ce.apply(Object,e):se(t,e);if(e.length>1)return se(t=Jt(t[1])?[]:{},e,!0)}return t},le=function(){};function de(t){return fe(qt,t)}var he="4.0.0";function pe(t,e,n){for(var r=t.length-1;r>=0;r--)e.call(n,t[r],r,t)}function ge(t,e,n){pe(re(t),function(r){e.call(n,t[r],r,t)})}function me(t){return null===t}function ye(t,e){return function(n){return me(n)?e:n[t]}}function ve(t){return!!t&&t.constructor===Object}function we(t){return"__proto__"!==t&&"constructor"!==t}function be(t,e){return ve(t)&&ve(e)||Jt(t)&&Jt(e)?(Xt(e,function(n,r){we(r)&&(t[r]=ee(e)?n:be(t[r],n))}),t):e}le.VERSION=he,le.version=he,le.mixin=function(){Yt(arguments,function(t){Xt(t,function(t,e){le[e]=ee(t)?function(){var e=t.apply(le.$context,arguments);return le.$context=null,e}:t})})},le.setup=de,le.setConfig=de,le.getConfig=function(){return qt};function Se(t,e,n){var r=[];if(t&&arguments.length>1){if(t.map)return t.map(e,n);Xt(t,function(){r.push(e.apply(n,arguments))})}return r}function Ee(t,e,n,r,o){return function(i,u,a){if(i&&u){if(t&&i[t])return i[t](u,a);if(e&&Jt(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(Gt(i,f)&&!!u.call(a,i[f],f,i)===r)return[!0,!1,f,i[f]][n]}return o}}var Ne=Ee("some",1,0,!0,!1),Oe=Ee("every",1,1,!1,!0);function De(t,e){if(t){if(t.includes)return t.includes(e);for(var n in t)if(Gt(t,n)&&e===t[n])return!0}return!1}function Ae(t,e){var n,r=0;if(Jt(t)&&Jt(e)){for(n=e.length;r<n;r++)if(!De(t,e[r]))return!1;return!0}return De(t,e)}function xe(t,e,n){var r=[];if(e){ee(e)||(e=ye(e));var o,i={};Xt(t,function(u,a){o=e.call(n,u,a,t),i[o]||(i[o]=1,r.push(u))})}else Xt(t,function(t){De(r,t)||r.push(t)});return r}function je(t){return Se(t,function(t){return t})}var Te="undefined",Me=te(Te);function ke(t){return me(t)||Me(t)}var Ce=/(.+)?\[(\d+)\]$/;function Pe(t){return t?t.splice&&t.join?t:(""+t).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function Ie(t,e,n){if(ke(t))return n;var r=function(t,e){if(t){var n,r,o,i=0;if(t[e]||Gt(t,e))return t[e];if(o=(r=Pe(e)).length)for(n=t;i<o;i++)if(ke(n=Re(n,r[i])))return i===o-1?n:void 0;return n}}(t,e);return Me(r)?n:r}function Re(t,e){var n=e?e.match(Ce):"";return n?n[1]?t[n[1]]?t[n[1]][n[2]]:void 0:t[n[2]]:t[e]}function Fe(t,e){return Me(t)?1:me(t)?Me(e)?-1:1:t&&t.localeCompare?t.localeCompare(e):t>e?1:-1}function $e(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?Fe(u,i):Fe(i,u)}}function _e(t,e,n){if(t){if(ke(e))return je(t).sort(Fe);for(var r,o=Se(t,function(t){return{data:t}}),i=function(t,e,n,r){var o=[];return Yt(n=Jt(n)?n:[n],function(n,i){if(n){var u,a=n;Jt(n)?(a=n[0],u=n[1]):ve(n)&&(a=n.field,u=n.order),o.push({field:a,order:u||"asc"}),Yt(e,ee(a)?function(e,n){e[i]=a.call(r,e.data,n,t)}:function(t){t[i]=a?Ie(t.data,a):t.data})}}),o}(t,o,e,n),u=i.length-1;u>=0;)r=$e(u,i[u],r),u--;return r&&(o=o.sort(r)),Se(o,ye("data"))}return[]}var We=_e;function Ue(t,e){return t>=e?t:(t|=0)+Math.round(Math.random()*((e||9)-t))}var He=ne("values",0);function ze(t){for(var e,n=[],r=He(t),o=r.length-1;o>=0;o--)e=o>0?Ue(0,o):0,n.push(r[e]),r.splice(e,1);return n}function Ke(t){return function(e){if(e){var n=t(e&&e.replace?e.replace(/,/g,""):e);if(!isNaN(n))return n}return 0}}var Le=Ke(parseFloat);function Be(t,e,n){var r=[],o=arguments.length;if(t){if(e=o>=2?Le(e):0,n=o>=3?Le(n):t.length,t.slice)return t.slice(e,n);for(;e<n;e++)r.push(t[e])}return r}var qe=Ee("",0,2,!0),Ye=Ee("find",1,3,!0);function Ze(t,e){return Se(t,ye(e))}function Ve(t){return function(e,n){var r,o;return e&&e.length?(Yt(e,function(i,u){n&&(i=ee(n)?n(i,u,e):Ie(i,n)),ke(i)||!ke(r)&&!t(r,i)||(o=u,r=i)}),e[o]):r}}var Je=Ve(function(t,e){return t<e});function Ge(t){var e,n,r,o=[];if(t&&t.length)for(e=0,r=(n=Je(t,function(t){return t?t.length:0}))?n.length:0;e<r;e++)o.push(Ze(t,e));return o}function Qe(t,e){var n=[];return Yt(t,function(t){n=n.concat(Jt(t)?e?Qe(t,e):t:[t])}),n}function Xe(t,e){return(console[t]||console.log)(e)}function tn(t,e){try{delete t[e]}catch(n){t[e]=void 0}}function en(t,e,n){return t?(Jt(t)?pe:ge)(t,e,n):t}var nn=te("object");function rn(t,e,n){if(t){var r,o=arguments.length>1&&(me(e)||!nn(e)),i=o?n:e;if(ve(t))Qt(t,o?function(n,r){t[r]=e}:function(e,n){tn(t,n)}),i&&fe(t,i);else if(Jt(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 on(t,e,n){if(t){if(!ke(e)){var r=[],o=[];return ee(e)||(i=e,e=function(t,e){return e===i}),Xt(t,function(t,o,i){e.call(n,t,o,i)&&r.push(o)}),Jt(t)?en(r,function(e,n){o.push(t[e]),t.splice(e,1)}):(o={},Yt(r,function(e){o[e]=t[e],tn(t,e)})),o}return rn(t)}var i;return t}function un(t,e,n,r){var o=r.key,i=r.parentKey,u=r.children,a=r.data,c=r.updated,s=r.clear;return Yt(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&&un(t,n,f,r),s&&delete n[u]}),t}function an(t){return function(e,n,r,o){var i=r||{},u=i.children||"children";return t(null,e,n,o,[],[],u,i)}}var cn=an(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 sn=an(function t(e,n,r,o,i,u,a,c){var s,f;Xt(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 fn=an(function t(e,n,r,o,i,u,a,c){var s,f,l,d=c.mapChildren||a;return Se(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 ln(t,e,n,r,o,i,u,a,c){var s,f,l,d,h,p=[],g=c.original,m=c.data,y=c.mapChildren||a,v=c.isEvery;return Yt(n,function(w,b){s=i.concat([""+b]),f=u.concat([w]),d=t&&!v||r.call(o,w,b,n,s,e,f),h=a&&w[a],d||h?(g?l=w:(l=fe({},w),m&&(l[m]=w)),l[y]=ln(d,w,w[a],r,o,s,f,a,c),(d||l[y].length)&&p.push(l)):d&&p.push(l)}),p}var dn=an(function(t,e,n,r,o,i,u,a){return ln(0,t,e,n,r,o,i,u,a)});function hn(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 pn(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 gn=te("number");var mn=te("string"),yn=Vt("Date"),vn=parseInt;function wn(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 bn(t){return t.getTime()}function Sn(t){return"(\\d{"+t+"})"}function En(t){return isNaN(t)?t:vn(t)}for(var Nn=Sn(2),On=Sn("1,2"),Dn=Sn("1,7"),An=Sn("3,4"),xn=".{1}",jn=xn+On,Tn="(([zZ])|([-+]\\d{2}:?\\d{2}))",Mn=[An,jn,jn,jn,jn,jn,xn+Dn,Tn],kn=[],Cn=Mn.length-1;Cn>=0;Cn--){for(var Pn="",In=0;In<Cn+1;In++)Pn+=Mn[In];kn.push(new RegExp("^"+Pn+"$"))}var Rn=[["yyyy",An],["yy",Nn],["MM",Nn],["M",On],["dd",Nn],["d",On],["HH",Nn],["H",On],["mm",Nn],["m",On],["ss",Nn],["s",On],["SSS",Sn(3)],["S",Dn],["Z",Tn]],Fn={},$n=["\\[([^\\]]+)\\]"];for(In=0;In<Rn.length;In++){var _n=Rn[In];Fn[_n[0]]=_n[1]+"?",$n.push(_n[0])}var Wn=new RegExp($n.join("|"),"g"),Un={};function Hn(t,e){if(t){var n=yn(t);if(n||!e&&/^[0-9]{11,15}$/.test(t))return new Date(n?bn(t):vn(t));if(mn(t)){var r=e?function(t,e){var n=Un[e];if(!n){var r=[],o=e.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(Wn,function(t,e){var n=t.charAt(0);return"["===n?e:(r.push(n),Fn[t])});n=Un[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=kn.length;r<o;r++)if(e=t.match(kn[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=(o=En(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(wn(t));var e=t.Z.match(/([-+])(\d{2}):?(\d{2})/);return e?new Date(wn(t)-("-"===e[1]?-1:1)*vn(e[2])*36e5+6e4*vn(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 zn(){return new Date}function Kn(t){var e,n=t?Hn(t):zn();return!!yn(n)&&((e=n.getFullYear())%4==0&&(e%100!=0||e%400==0))}function Ln(t,e){return function(n,r){if(n){if(n[t])return n[t](r);if(mn(n)||Jt(n))return e(n,r);for(var o in n)if(Gt(n,o)&&r===n[o])return o}return-1}}var Bn=Ln("indexOf",hn),qn=Ln("lastIndexOf",pn);function Yn(t){var e=0;return mn(t)||Jt(t)?t.length:(Xt(t,function(){e++}),e)}var Zn=function(t){return!me(t)&&!isNaN(t)&&!Jt(t)&&t%1==0};var Vn=te("boolean"),Jn=Vt("RegExp"),Gn=Vt("Error");function Qn(t){for(var e in t)return!1;return!0}var Xn=typeof Symbol!==Te;function tr(t){return Xn&&Symbol.isSymbol?Symbol.isSymbol(t):"symbol"==typeof t}var er=Vt("Arguments");var nr=typeof document===Te?0:document;var rr=typeof window===Te?0:window;var or=typeof FormData!==Te;var ir=typeof Map!==Te;var ur=typeof WeakMap!==Te;var ar=typeof Set!==Te;var cr=typeof WeakSet!==Te;function sr(t){return function(e,n,r){if(e&&ee(n)){if(Jt(e)||mn(e))return t(e,n,r);for(var o in e)if(Gt(e,o)&&n.call(r,e[o],o,e))return o}return-1}}var fr=sr(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 lr(t,e,n,r,o,i,u){if(t===e)return!0;if(t&&e&&!gn(t)&&!gn(e)&&!mn(t)&&!mn(e)){if(Jn(t))return n(""+t,""+e,o,i,u);if(yn(t)||Vn(t))return n(+t,+e,o,i,u);var a,c,s,f=Jt(t),l=Jt(e);if(f||l?f&&l:t.constructor===e.constructor)return c=re(t),s=re(e),r&&(a=r(t,e,o)),c.length===s.length&&(Me(a)?Oe(c,function(o,i){return o===s[i]&&lr(t[o],e[s[i]],n,r,f||l?i:o,t,e)}):!!a)}return n(t,e,o,i,u)}function dr(t,e){return t===e}function hr(t,e){return lr(t,e,dr)}var pr=sr(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 gr=ne("entries",2);function mr(t,e){return function(n,r){var o,i,u={},a=[],c=this,s=arguments,f=s.length;if(!ee(r)){for(i=1;i<f;i++)o=s[i],a.push.apply(a,Jt(o)?o:[o]);r=0}return Xt(n,function(o,i){((r?r.call(c,o,i,n):fr(a,function(t){return t===i})>-1)?t:e)&&(u[i]=o)}),u}}var yr=mr(1,0),vr=mr(0,1);var wr=/(.+)?\[(\d+)\]$/;function br(t,e,n,r,o){if(!t[e]){var i,u,a=e?e.match(wr):null;if(n)u=o;else{var c=r?r.match(wr):null;u=c&&!c[1]?new Array(vn(c[2])+1):{}}return a?a[1]?(i=vn(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 Sr(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function Er(t,e,n){var r,o={};return t&&(e&&nn(e)?e=function(t){return function(){return Qn(t)}}(e):ee(e)||(e=ye(e)),Xt(t,function(i,u){r=e?e.call(n,i,u,t):i,o[r]?o[r].push(i):o[r]=[i]})),o}function Nr(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 Or=Ve(function(t,e){return t>e});function Dr(t){return(t.split(".")[1]||"").length}function Ar(t,e){if(t.repeat)return t.repeat(e);var n=isNaN(e)?[]:new Array(vn(e));return n.join(t)+(n.length>0?t:"")}function xr(t,e){return t.substring(0,e)+"."+t.substring(e,t.length)}function jr(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+Ar("0",c):s>0?r+i+u+Ar("0",s):r+i+xr(u,c):o?f>0?r+"0."+Ar("0",Math.abs(f))+o:r+xr(o,f):l>0?r+"0."+Ar("0",Math.abs(l))+i+u:r+xr(i,l)+u}return e}function Tr(t,e){var n=jr(t),r=jr(e);return parseInt(n.replace(".",""))*parseInt(r.replace(".",""))/Math.pow(10,Dr(n)+Dr(r))}function Mr(t){return function(e,n){var r=Le(e),o=r;if(r){n|=0;var i=jr(r).split("."),u=i[0],a=i[1]||"",c=a.substring(0,n+1),s=u+(c?"."+c:"");if(n>=a.length)return Le(s);if(s=r,n>0){var f=Math.pow(10,n);o=Math[t](Tr(s,f))/f}else o=Math[t](s)}return o}}var kr=Mr("round"),Cr=Mr("ceil"),Pr=Mr("floor");function Ir(t){return gn(t)?jr(t):""+(ke(t)?"":t)}function Rr(t,e){var n=Ir(kr(t,e|=0)).split("."),r=n[0],o=n[1]||"",i=e-o.length;return e?i>0?r+"."+o+Ar("0",i):r+xr(o,Math.abs(i)):r}var Fr=Ke(vn);function $r(t,e){return Tr(Le(t),Le(e))}function _r(t,e){var n=jr(t),r=jr(e),o=Math.pow(10,Math.max(Dr(n),Dr(r)));return($r(t,o)+$r(e,o))/o}function Wr(t,e){var n=jr(t),r=jr(e),o=Dr(n),i=Dr(r)-o,u=i<0,a=Math.pow(10,u?Math.abs(i):i);return $r(n.replace(".","")/r.replace(".",""),u?1/a:a)}function Ur(t,e,n){var r=0;return Xt(t&&t.length>2&&Jt(t)?t.sort():t,e?ee(e)?function(){r=_r(r,e.apply(n,arguments))}:function(t){r=_r(r,Ie(t,e))}:function(t){r=_r(r,t)}),r}var Hr="first",zr="last";function Kr(t){return t.getFullYear()}var Lr=864e5;function Br(t){return t.getMonth()}function qr(t){return yn(t)&&!isNaN(bn(t))}function Yr(t,e,n){var r=e&&!isNaN(e)?e:0;if(qr(t=Hn(t))){if(n===Hr)return new Date(Kr(t),Br(t)+r,1);if(n===zr)return new Date(bn(Yr(t,r+1,Hr))-1);if(gn(n)&&t.setDate(n),r){var o=t.getDate();if(t.setMonth(Br(t)+r),o!==t.getDate())return t.setDate(1),new Date(bn(t)-Lr)}}return t}function Zr(t,e,n){var r;if(qr(t=Hn(t))&&(e&&(r=e&&!isNaN(e)?e:0,t.setFullYear(Kr(t)+r)),n||!isNaN(n))){if(n===Hr)return new Date(Kr(t),0,1);if(n===zr)return t.setMonth(11),Yr(t,0,zr);t.setMonth(n)}return t}var Vr=6048e5;function Jr(t,e,n,r){if(qr(t=Hn(t))){var o=gn(n),i=gn(r),u=bn(t);if(o||i){var a=i?r:qt.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)*Lr:s<a?(7-a+s+f)*Lr:f*Lr}}return e&&!isNaN(e)&&(u+=e*Vr),new Date(u)}return t}function Gr(t,e,n){if(qr(t=Hn(t))&&!isNaN(e)){if(t.setDate(t.getDate()+vn(e)),n===Hr)return new Date(Kr(t),Br(t),t.getDate());if(n===zr)return new Date(bn(Gr(t,1,Hr))-1)}return t}function Qr(t){return t.toUpperCase()}var Xr=Se(Nr(0,7),function(t){return[(t+1)%7,(t+2)%7,(t+3)%7]});function to(t,e){var n=new Date(t).getDay();return De(Xr[e],n)}function eo(t,e){return function(n,r){var o=gn(r)?r:qt.firstDayOfWeek,i=Hn(n);if(qr(i)){var u,a=Jr(i,0,o,o),c=t(a),s=bn(c),f=bn(a),l=f+5184e5,d=new Date(l),h=Jr(c,0,o,o),p=bn(h);if(f===p)return 1;if(e(a,d))for(u=bn(t(d));u<l;u+=Lr)if(to(u,o))return 1;var g=p+5184e5,m=new Date(l),y=1;if(e(h,m))for(y=0,u=s;u<g;u+=Lr)if(to(u,o)){y++;break}return Math.floor((f-p)/Vr)+y}return NaN}}var no=eo(function(t){return new Date(t.getFullYear(),0,1)},function(t,e){return t.getFullYear()!==e.getFullYear()});function ro(t){return bn(function(t){return new Date(Kr(t),Br(t),t.getDate())}(t))}function oo(t){return qr(t=Hn(t))?Math.floor((ro(t)-ro(Zr(t,0,Hr)))/Lr)+1:NaN}function io(t,e,n){var r=Ir(t);return e|=0,n=Me(n)?" ":""+n,r.padStart?r.padStart(e,n):e>r.length?((e-=r.length)>n.length&&(n+=Ar(n,e/n.length)),n.slice(0,e)+r):r}function uo(t,e,n,r){var o=e[n];return o?ee(o)?o(r,n,t):o[r]:r}var ao=/\[([^\]]+)]|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 co(t,e,n){if(t){if(qr(t=Hn(t))){var r=n||{},o=e||qt.parseDateFormat||qt.formatString,i=t.getHours(),u=i<12?"am":"pm",a=fe({},qt.parseDateRules||qt.formatStringMatchs,r.formats),c=function(e,n){return(""+Kr(t)).substring(4-n)},s=function(e,n){return io(Br(t)+1,n,"0")},f=function(e,n){return io(t.getDate(),n,"0")},l=function(t,e){return io(i,e,"0")},d=function(t,e){return io(i<=12?i:i-12,e,"0")},h=function(e,n){return io(t.getMinutes(),n,"0")},p=function(e,n){return io(t.getSeconds(),n,"0")},g=function(e,n){return io(t.getMilliseconds(),n,"0")},m=function(e,n){var r=t.getTimezoneOffset()/60*-1;return uo(t,a,e,(r>=0?"+":"-")+io(r,2,"0")+(1===n?":":"")+"00")},y=function(e,n){return io(uo(t,a,e,no(t,ke(r.firstDay)?qt.firstDayOfWeek:r.firstDay)),n,"0")},v=function(e,n){return io(uo(t,a,e,oo(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:y,W:y,DDD:v,D:v,a:function(e){return uo(t,a,e,u)},A:function(e){return uo(t,a,e,Qr(u))},e:function(e){return uo(t,a,e,t.getDay())},E:function(e){return uo(t,a,e,t.getDay())},q:function(e){return uo(t,a,e,Math.floor((Br(t)+3)/3))}};return o.replace(ao,function(t,e){return e||(w[t]?w[t](t,t.length):t)})}return"Invalid Date"}return""}var so=Date.now||function(){return bn(zn())};var fo=eo(function(t){return new Date(t.getFullYear(),t.getMonth(),1)},function(t,e){return t.getMonth()!==e.getMonth()});var lo=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function ho(t){return t&&t.trimRight?t.trimRight():Ir(t).replace(/[\s\uFEFF\xA0]+$/g,"")}function po(t){return t&&t.trimLeft?t.trimLeft():Ir(t).replace(/^[\s\uFEFF\xA0]+/g,"")}function go(t){return t&&t.trim?t.trim():ho(po(t))}var mo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function yo(t){var e=new RegExp("(?:"+re(t).join("|")+")","g");return function(n){return Ir(n).replace(e,function(e){return t[e]})}}var vo=yo(mo),wo={};Xt(mo,function(t,e){wo[mo[e]]=e});var bo=yo(wo);function So(t,e,n){return t.substring(e,n)}function Eo(t){return t.toLowerCase()}var No={};var Oo={};function Do(t,e,n){return Ir(t).replace((n||qt).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(t,n){return Ie(e,go(n))})}var Ao=decodeURIComponent;function xo(t){var e,n={};return t&&mn(t)&&Yt(t.split("&"),function(t){e=t.split("="),n[Ao(e[0])]=Ao(e[1]||"")}),n}var jo=encodeURIComponent;function To(t,e,n){var r,o=[];return Xt(t,function(t,i){r=Jt(t),ve(t)||r?o=o.concat(To(t,e+"["+i+"]",r)):o.push(jo(e+"["+(n?"":i)+"]")+"="+jo(me(t)?"":t))}),o}var Mo=typeof location===Te?0:location;function ko(){return Mo?Mo.origin||Mo.protocol+"//"+Mo.host:""}function Co(t){return xo(t.split("?")[1]||"")}function Po(t){var e,n,r,o,i=""+t;return 0===i.indexOf("//")?i=(Mo?Mo.protocol:"")+i:0===i.indexOf("/")&&(i=ko()+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=Co(o.hash),o.searchQuery=Co(o.search),o}function Io(t,e){var n=parseFloat(e),r=zn(),o=bn(r);switch(t){case"y":return bn(Zr(r,n));case"M":return bn(Yr(r,n));case"d":return bn(Gr(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 Ro(t){return(yn(t)?t:new Date(t)).toUTCString()}function Fo(t,e,n){if(nr){var r,o,i,u,a,c,s=[],f=arguments;return Jt(t)?s=t:f.length>1?s=[fe({name:t,value:e},n)]:nn(t)&&(s=[t]),s.length>0?(Yt(s,function(t){r=fe({},qt.cookies,t),i=[],r.name&&(o=r.expires,i.push(jo(r.name)+"="+jo(nn(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 Ro(Io(n,e))}):/^[0-9]{11,13}$/.test(o)||yn(o)?Ro(o):Ro(Io("d",o)),r.expires=o),Yt(["expires","path","domain","secure"],function(t){Me(r[t])||i.push(r[t]&&"secure"===t?t:t+"="+r[t])})),nr.cookie=i.join("; ")}),!0):(u={},(a=nr.cookie)&&Yt(a.split("; "),function(t){c=t.indexOf("="),u[Ao(t.substring(0,c))]=Ao(t.substring(c+1)||"")}),1===f.length?u[t]:u)}return!1}function $o(t){return Fo(t)}function _o(t,e,n){return Fo(t,e,n),Fo}function Wo(t,e){Fo(t,"",fe({expires:-1},qt.cookies,e))}function Uo(){return re(Fo())}function Ho(t){try{var e="__xe_t";return t.setItem(e,1),t.removeItem(e),!0}catch(t){return!1}}function zo(t){return navigator.userAgent.indexOf(t)>-1}fe(Fo,{has:function(t){return De(Uo(),t)},set:_o,setItem:_o,get:$o,getItem:$o,remove:Wo,removeItem:Wo,keys:Uo,getJSON:function(){return Fo()}}),fe(le,{assign:fe,objectEach:Qt,lastObjectEach:ge,objectMap:function(t,e,n){var r={};if(t){if(!e)return t;ee(e)||(e=ye(e)),Xt(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])&&be(t,e);return t},uniq:xe,union:function(){for(var t=arguments,e=[],n=0,r=t.length;n<r;n++)e=e.concat(je(t[n]));return xe(e)},sortBy:We,orderBy:_e,shuffle:ze,sample:function(t,e){var n=ze(t);return arguments.length<=1?n[0]:(e<n.length&&(n.length=e||0),n)},some:Ne,every:Oe,slice:Be,filter:function(t,e,n){var r=[];if(t&&e){if(t.filter)return t.filter(e,n);Xt(t,function(o,i){e.call(n,o,i,t)&&r.push(o)})}return r},find:Ye,findLast:function(t,e,n){if(t){Jt(t)||(t=He(t));for(var r=t.length-1;r>=0;r--)if(e.call(n,t[r],r,t))return t[r]}},findKey:qe,includes:De,arrayIndexOf:hn,arrayLastIndexOf:pn,map:Se,reduce:function(t,e,n){if(t){var r,o,i=0,u=n,a=arguments.length>2,c=re(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(Jt(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(Jt(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 Ge(arguments)},unzip:Ge,zipObject:function(t,e){var n={};return e=e||[],Xt(He(t),function(t,r){n[t]=e[r]}),n},flatten:function(t,e){return Jt(t)?Qe(t,e):[]},toArray:je,includeArrays:Ae,pluck:Ze,invoke:function(t,e){for(var n,r=arguments,o=[],i=[],u=2,a=r.length;u<a;u++)o.push(r[u]);if(Jt(e)){for(a=e.length-1,u=0;u<a;u++)i.push(e[u]);e=e[a]}return Se(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:Yt,lastArrayEach:pe,toArrayTree:function(t,e){var n,r,o,i=fe({},qt.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=_e(ae(t),l),d&&(t=t.reverse())),Xt(t,function(t){n=t[a],m[n]&&Xe("warn","Duplicate primary key="+n),m[n]=!0}),Xt(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,Xe("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&&ke(o))&&(m[o]||p.push(r))}),u&&function(t,e){Xt(t,function(t){t[e]&&!t[e].length&&on(t,e)})}(t,s),p},toTreeArray:function(t,e){return un([],null,t,fe({},qt.treeOptions,e))},findTree:cn,eachTree:sn,mapTree:fn,filterTree:function(t,e,n,r){var o=[];return t&&e&&sn(t,function(t,n,i,u,a,c){e.call(r,t,n,i,u,a,c)&&o.push(t)},n),o},searchTree:dn,hasOwnProp:Gt,eqNull:ke,isNaN:function(t){return gn(t)&&isNaN(t)},isFinite:function(t){return gn(t)&&isFinite(t)},isUndefined:Me,isArray:Jt,isFloat:function(t){return!(me(t)||isNaN(t)||Jt(t)||Zn(t))},isInteger:Zn,isFunction:ee,isBoolean:Vn,isString:mn,isNumber:gn,isRegExp:Jn,isObject:nn,isPlainObject:ve,isDate:yn,isError:Gn,isTypeError:function(t){return!!t&&t.constructor===TypeError},isEmpty:Qn,isNull:me,isSymbol:tr,isArguments:er,isElement:function(t){return!!(t&&mn(t.nodeName)&&gn(t.nodeType))},isDocument:function(t){return!(!t||!nr||9!==t.nodeType)},isWindow:function(t){return!(!rr||!t||t!==t.window)},isFormData:function(t){return or&&t instanceof FormData},isMap:function(t){return ir&&t instanceof Map},isWeakMap:function(t){return ur&&t instanceof WeakMap},isSet:function(t){return ar&&t instanceof Set},isWeakSet:function(t){return cr&&t instanceof WeakSet},isLeapYear:Kn,isMatch:function(t,e){var n=re(t),r=re(e);return!r.length||(Ae(n,r)?Ne(r,function(r){return fr(n,function(n){return n===r&&hr(t[n],e[r])})>-1}):hr(t,e))},isEqual:hr,isEqualWith:function(t,e,n){return ee(n)?lr(t,e,function(t,e,r,o,i){var u=n(t,e,r,o,i);return Me(u)?dr(t,e):!!u},n):lr(t,e,dr)},getType:function(t){return me(t)?"null":tr(t)?"symbol":yn(t)?"date":Jt(t)?"array":Jn(t)?"regexp":Gn(t)?"error":typeof t},uniqueId:function(t){return""+(ke(t)?"":t)+qt.keyId++},getSize:Yn,indexOf:Bn,lastIndexOf:qn,findIndexOf:fr,findLastIndexOf:pr,toStringJSON:function(t){if(ve(t))return t;if(mn(t))try{return JSON.parse(t)}catch(t){}return{}},toJSONString:function(t){return ke(t)?"":JSON.stringify(t)},keys:re,values:He,entries:gr,pick:yr,omit:vr,first:function(t){return He(t)[0]},last:function(t){var e=He(t);return e[e.length-1]},each:Xt,forOf:function(t,e,n){if(t)if(Jt(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(Gt(t,i)&&!1===e.call(n,t[i],i,t))break},lastForOf:function(t,e,n){var r,o;if(t)if(Jt(t))for(r=t.length-1;r>=0&&!1!==e.call(n,t[r],r,t);r--);else for(r=(o=Gt(t)).length-1;r>=0&&!1!==e.call(n,t[o[r]],o[r],t);r--);},lastEach:en,has:function(t,e){if(t){if(Gt(t,e))return!0;var n,r,o,i,u,a,c=Pe(e),s=0,f=c.length;for(u=t;s<f&&(a=!1,(i=(n=c[s])?n.match(Ce):"")?(r=i[1],o=i[2],r?u[r]&&Gt(u[r],o)&&(a=!0,u=u[r][o]):Gt(u,o)&&(a=!0,u=u[o])):Gt(u,n)&&(a=!0,u=u[n]),a);s++)if(s===f-1)return!0}return!1},get:Ie,set:function(t,e,n){if(t&&we(e))if(!t[e]&&!Gt(t,e)||Sr(e)){for(var r=t,o=Pe(e),i=o.length,u=0;u<i;u++)if(!Sr(o[u])){var a=u===i-1;r=br(r,o[u],a,a?null:o[u+1],n)}}else t[e]=n;return t},groupBy:Er,countBy:function(t,e,n){var r=Er(t,e,n||this);return Qt(r,function(t,e){r[e]=t.length}),r},clone:ae,clear:rn,remove:on,range:Nr,destructuring:function(t,e){if(t&&e){var n=fe.apply(this,[{}].concat(Be(arguments,1))),r=re(n);Yt(re(t),function(e){De(r,e)&&(t[e]=n[e])})}return t},random:Ue,min:Or,max:Je,commafy:function(t,e){var n,r,o,i,u,a=fe({},qt.commafyOptions,e),c=a.digits;return gn(t)?(n=(a.ceil?Cr:a.floor?Pr:kr)(t,c),i=(r=jr(c?Rr(n,c):n).split("."))[0],u=r[1],(o=i&&n<0)&&(i=i.substring(1,i.length))):i=(r=(n=Ir(t).replace(/,/g,""))?[n]:[])[0],r.length?(o?"-":"")+i.replace(new RegExp("(?=(?!(\\b))(.{"+(a.spaceNumber||3)+"})+$)","g"),a.separator||",")+(u?"."+u:""):n},round:kr,ceil:Cr,floor:Pr,toFixed:Rr,toNumber:Le,toNumberString:jr,toInteger:Fr,add:function(t,e){return _r(Le(t),Le(e))},subtract:function(t,e){var n=Le(t),r=Le(e),o=jr(n),i=jr(r),u=Dr(o),a=Dr(i),c=Math.pow(10,Math.max(u,a));return parseFloat(Rr((n*c-r*c)/c,u>=a?u:a))},multiply:$r,divide:function(t,e){return Wr(Le(t),Le(e))},sum:Ur,mean:function(t,e,n){return Wr(Ur(t,e,n),Yn(t))},now:so,timestamp:function(t,e){if(t){var n=Hn(t,e);return yn(n)?bn(n):n}return so()},isValidDate:qr,isDateSame:function(t,e,n){return!(!t||!e)&&("Invalid Date"!==(t=co(t,n))&&t===co(e,n))},toStringDate:Hn,toDateString:co,getWhatYear:Zr,getWhatQuarter:function(t,e,n){var r,o=e&&!isNaN(e)?3*e:0;return qr(t=Hn(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),Yr(t,o,n)):t},getWhatMonth:Yr,getWhatWeek:Jr,getWhatDay:Gr,getWhatHours:function t(e,n,r){if(qr(e=Hn(e))&&!isNaN(n)){if(e.setHours(e.getHours()+vn(n)),r===Hr)return new Date(Kr(e),Br(e),e.getDate(),e.getHours());if(r===zr)return new Date(bn(t(e,1,Hr))-1)}return e},getWhatMinutes:function t(e,n,r){if(qr(e=Hn(e))&&!isNaN(n)){if(e.setMinutes(e.getMinutes()+vn(n)),r===Hr)return new Date(Kr(e),Br(e),e.getDate(),e.getHours(),e.getMinutes());if(r===zr)return new Date(bn(t(e,1,Hr))-1)}return e},getWhatSeconds:function t(e,n,r){if(qr(e=Hn(e))&&!isNaN(n)){if(e.setSeconds(e.getSeconds()+vn(n)),r===Hr)return new Date(Kr(e),Br(e),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());if(r===zr)return new Date(bn(t(e,1,Hr))-1)}return e},getYearDay:oo,getYearWeek:no,getMonthWeek:fo,getDayOfYear:function(t,e){return qr(t=Hn(t))?Kn(Zr(t,e))?366:365:NaN},getDayOfMonth:function(t,e){return qr(t=Hn(t))?Math.floor((bn(Yr(t,e,zr))-bn(Yr(t,e,Hr)))/Lr)+1:NaN},getDateDiff:function(t,e){var n,r,o,i,u,a,c={done:!1,status:!1,time:0};if(t=Hn(t),e=e?Hn(e):zn(),qr(t)&&qr(e)&&(n=bn(t))<(r=bn(e)))for(i=c.time=r-n,c.done=!0,c.status=!0,a=0,u=lo.length;a<u;a++)i>=(o=lo[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:go,trimLeft:po,trimRight:ho,escape:vo,unescape:bo,camelCase:function(t){if(t=Ir(t),No[t])return No[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=Eo(n),r?o>2&&r+o<e?Qr(So(n,0,1))+So(n,1,o-1)+Qr(So(n,o-1,o)):Qr(So(n,0,1))+So(n,1,o):o>1&&r+o<e?So(n,0,o-1)+Qr(So(n,o-1,o)):n}).replace(/(-[a-zA-Z])/g,function(t,e){return Qr(So(e,1,e.length))}),No[t]=n,n},kebabCase:function(t){if(t=Ir(t),Oo[t])return Oo[t];if(/^[A-Z]+$/.test(t))return Eo(t);var e=t.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(t,e,n,r){var o=n.length;return o>1?e+"-"+Eo(So(n,0,o-1))+"-"+Eo(So(n,o-1,o))+r:Eo(e+"-"+n+r)}).replace(/^([A-Z]+)([a-z]+)?$/,function(t,e,n){var r=e.length;return Eo(So(e,0,r-1)+"-"+So(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||"")+Eo(So(n,0,i-1))+"-"+Eo(So(n,i-1,i))+r:(e||"")+(o?"-":"")+Eo(n)+(r||"")});return e=e.replace(/([-]+)/g,function(t,n,r){return r&&r+n.length<e.length?"-":""}),Oo[t]=e,e},repeat:function(t,e){return Ar(Ir(t),e)},padStart:io,padEnd:function(t,e,n){var r=Ir(t);return e|=0,n=Me(n)?" ":""+n,r.padEnd?r.padEnd(e,n):e>r.length?((e-=r.length)>n.length&&(n+=Ar(n,e/n.length)),r+n.slice(0,e)):r},startsWith:function(t,e,n){var r=Ir(t);return 0===(1===arguments.length?r:r.substring(n)).indexOf(e)},endsWith:function(t,e,n){var r=Ir(t),o=arguments.length;return o>1&&(o>2?r.substring(0,n).indexOf(e)===n-1:r.indexOf(e)===r.length-1)},template:Do,toFormatString:function(t,e){return Do(t,e,{tmplRE:/\{([.\w[\]\s]+)\}/g})},toString:Ir,toValueString:Ir,noop:function(){},property:ye,bind:function(t,e){var n=Be(arguments,2);return function(){return t.apply(e,Be(arguments).concat(n))}},once:function(t,e){var n=!1,r=null,o=Be(arguments,2);return function(){return n||(r=t.apply(e,Be(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(Be(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(Be(i))))}},throttle:function(t,e,n){var r=null,o=null,i=!1,u=null,a=fe({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}:fe({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=Be(arguments,2),r=this;return setTimeout(function(){t.apply(r,n)},e)},unserialize:xo,serialize:function(t){var e,n=[];return Xt(t,function(t,r){Me(t)||(e=Jt(t),ve(t)||e?n=n.concat(To(t,r,e)):n.push(jo(r)+"="+jo(me(t)?"":t)))}),n.join("&").replace(/%20/g,"+")},parseUrl:Po,getBaseURL:function(){if(Mo){var t=Mo.pathname,e=qn(t,"/")+1;return ko()+(e===t.length?t:t.substring(0,e))}return""},locat:function(){return Mo?Po(Mo.href):{}},browse:function(){var t,e,n,r=!1,o=!1,i=!1,u={isNode:!1,isMobile:r,isPC:!1,isDoc:!!nr};if(rr||typeof process===Te){n=zo("Edge"),e=zo("Chrome"),r=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),u.isDoc&&(t=nr.body||nr.documentElement,Yt(["webkit","khtml","moz","ms","o"],function(e){u["-"+e]=!!t[e+"MatchesSelector"]}));try{o=Ho(rr.localStorage)}catch(t){}try{i=Ho(rr.sessionStorage)}catch(t){}fe(u,{edge:n,firefox:zo("Firefox"),msie:!n&&u["-ms"],safari:!e&&!n&&zo("Safari"),isMobile:r,isPC:!r,isLocalStorage:o,isSessionStorage:i})}else u.isNode=!0;return u},cookie:Fo});let Ko=!1;const Lo="Asia/Shanghai";function Bo(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 qo(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 Yo(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&&F(u)?Zo(n,e,u,i,t):u&&q(u)?Vo(n,e,u,i,t):Jo(n,e,u,i,t)),t),[]))}function Zo(t,e,n,r,o){const i=Yo(n,e[r]||{},{excludeAll:t?.excludeAll,...t});Object.keys(i).length&&o.push([r,i])}function Vo(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=Yo(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(F(e)&&!F(r)||q(e)&&!q(r)||typeof e!=typeof r||!r)i.push(e);else if(F(e)||q(e)){const n=Yo(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 Jo(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 Go(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(Go(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=Go(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 Qo(t={},e={}){let n;for(n in e)t[n]=F(t[n])?Qo(t[n],e[n]):t[n]=e[n];return t}function Xo(t,e="px"){return le.isNumber(t)||/^\d+$/.test(`${t}`)?`${t}${e}`:`${t||""}`}function ti(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 ei(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 ni(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=>ni(t));const e={};return Object.keys(t).forEach(n=>{e[n]=ni(t[n])}),e}function ri(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 oi(...t){for(const e of t)if(null!=e)return e}function ii(...t){return a(c(t))}function ui(){const t=new Event("resize");window.dispatchEvent(t)}function ai(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 ci=function(t,e="YYYY-MM-DD HH:mm:ss",n=Lo){return R(t)||""===t||0===t||"0"===t?"":r(t).isValid()?(Ko||(r.extend(f),r.extend(l),Ko=!0),n===Lo?r(t).utcOffset(480).format(e):r(t).tz(n).format(e)):""};function si(t){return s(t)}function fi(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: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 y(){const t=Date.now();h(),void 0!==s&&d(t)}const v=(...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(y,i)),r?d(t):f}(n);if(void 0!==i)return h(),u=window.setTimeout(m,e),a=window.setTimeout(y,i),r?d(n):f}return void 0===u&&(u=window.setTimeout(m,e),void 0!==i&&(a=window.setTimeout(y,i))),f};return v.isPending=()=>void 0!==u||void 0!==a,v.cancel=()=>{p()},v.flush=(...e)=>{if(!v.isPending())return e.length>0?t(...e):f;const n=void 0!==s?s:e;return p(),t(...n)},v}function di(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 hi(...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 pi(...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 gi(...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 mi(...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 yi(...t){return t.reduce((t,e)=>bi(t??0).add(e??0).toNumber(),0)}function vi(t,e){return t.reduce((t,n)=>bi(t??0).add(e(n)??0).toNumber(),0)}function wi(t,e,n){const r={},o=n;return t.forEach(t=>{const n=e(t);if(n){const e=o(t);r[n]=bi(r[n]||0).add(e).toNumber()}}),r}function bi(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 Si{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 Ei{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 Ni=!0,Oi=25200,Di={key:"_11111000001111@",iv:"@11111000001111_"};class Ai{key;iv;constructor(t={}){const{key:e,iv:n}=t;e&&(this.key=y?.(e)),n&&(this.iv=y?.(n))}get getOptions(){return{mode:v,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 xi({prefixKey:t="",storage:e=sessionStorage,key:n=Di.key,iv:r=Di.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 Ai({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:R(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(R(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 ji(t=sessionStorage,e={}){return xi(function(t,e={}){return{hasEncrypt:Ni,storage:t,prefixKey:"tt-admin",...e}}(t,e))}function Ti(t={}){return ji(sessionStorage,{...t,timeout:Oi})}function Mi(t={}){return ji(localStorage,{...t,timeout:Oi})}function ki(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 Ci(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 Pi(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 Ii=new Set(["*","all","ALL","All"]);function Ri(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=>Ii.has(String(e))?"全部":Array.isArray(t)?t?.find(t=>t[o]==e)?.[r]??s(e):t?.[e]??s(e))?.join()}const Fi=(t=[])=>{let e=[];return e=t.filter(t=>Boolean(Object.values(t).filter(Boolean).length)),e.length?e:void 0},$i=(t,e=",")=>Array.isArray(t)?t:t?.split(e).filter(Boolean)??[],_i=(t=[])=>t.filter(Boolean),Wi=(t,e)=>t()?e:[],Ui=(t,e=",")=>Array.isArray(t)?t.join(e):t,Hi=99999999,zi=9999;export{Ri as CODE_TO_VALUE,Oi as DEFAULT_CACHE_TIME,_i as FILTER_BOOLEAN,Fi as FILTER_EMPTY,Wi as GET_LIST_BY_FUNC,Ui as JOIN_BY_SEPARATOR,Hi as MAX_PAGE_SIZE,$i as SPLIT_BY_SEPARATOR,Si as StateHandler,Ei as StateHandlerOld,zi as TABLE_PAGE_SIZE,Tt as TtHttp,hi as add,ai as arrGive,ri as arrayToTree,ei as bindMethods,Di as cacheCipher,bi as calc,qo as calcWordsWidth,S as capitalize,ki as checkVersion,ii as clnm,si as cloneDeep,wi as clsSumTotalBy,Go as compareObjects,xi as create,Mi as createLocalStorage,Ti as createSessionStorage,ji as createStorage,ci as dateFormat,li as debounce,ni as deepCopy,Qo as deepMerge,mi as divide,O as downloadFile,Ni as enableStorageEncryption,Lt as extractIdFromTitle,Ut as extractResourceFromApi,Ct as formatAmount,Pt as formatAmountOfPlace,Rt as formatDecimal,Ft as formatFileSize,Ci as formatFormData,$t as formatPeriod,It as formatPlaceOfAmount,Wt as formatToDate,_t as formatToDateTime,Kt as generateFormName,Ht as generateTestId,at as getBrowserType,ut as getDeviceType,Yo as getDifference,oi as getFirstNonNullOrUndefined,xt as getPageKey,Bo as getStorage,k as is,st as isAndroid,q as isArray,L as isBoolean,G as isClient,W as isDate,ht as isDayjsObject,C as isDef,Z as isElement,$ as isEmpty,_ as isEmptyZero,et as isError,lt as isExternal,ot as isFalse,pt as isFormData,K as isFunction,ct as isIos,dt as isJson,V as isMap,I as isNull,R as isNullOrUnDef,U as isNumber,F 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,P as isUndefined,Q as isUrl,Bt as isValidTestId,Y as isWindow,N as kebabToCamelCase,jt as loadingService,di as mergeWithArrayOverride,gi as multiply,fi as omit,Pi as revertFormatFormData,Vo as setDifferenceArr,Jo as setDifferenceField,Zo as setDifferenceObj,pi as subtract,yi as sumTotal,vi as sumTotalBy,Xo as toCssUnit,zt as toKebabCase,ui as triggerWindowResize,E as trim,ti as useVModel,Mt as withInstall};
2
2
  //# sourceMappingURL=index.esm.js.map