Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bassist/utils

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bassist/utils - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

4

./dist/index.min.js
/**
* name: @bassist/utils
* version: v0.13.0
* version: v0.14.0
* description: Opinionated collection of common JavaScript / TypeScript utils by @chengpeiquan .

@@ -9,2 +9,2 @@ * author: chengpeiquan <chengpeiquan@chengpeiquan.com>

*/
(function(t,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(t=typeof globalThis<"u"?globalThis:t||self,c(t.Utils={}))})(this,function(t){"use strict";var Ge=Object.defineProperty;var Ce=(t,c,s)=>c in t?Ge(t,c,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[c]=s;var p=(t,c,s)=>(Ce(t,typeof c!="symbol"?c+"":c,s),s);const c={isSupported:typeof navigator>"u"?!1:!!navigator.clipboard,async copy(e){if(!this.isSupported)return!1;const i=e.innerText||e.value;return await this.write(i)},async cut(e){return!this.isSupported||!await this.copy(e)?!1:(e.value="",!0)},async read(){return this.isSupported?await navigator.clipboard.readText():""},async write(e){return this.isSupported?(await navigator.clipboard.writeText(e),!0):!1}};function s(){return typeof window<"u"?navigator.userAgent.toLowerCase():""}const m=["Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; BLA-AL00 Build/HUAWEIBLA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/8.9 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.0.0; zh-CN; MHA-AL00 Build/HUAWEIMHA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.1.4.994 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.1; EML-AL00 Build/HUAWEIEML-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.143 Crosswalk/24.53.595.0 XWEB/358 MMWEBSDK/23 Mobile Safari/537.36 MicroMessenger/6.7.2.1340(0x2607023A) NetType/4G Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044207 Mobile Safari/537.36 MicroMessenger/6.7.3.1340(0x26070332) NetType/4G Language/zh_CN Process/tools","Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13","MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1","Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 OPR/45.0.2552.888","Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (iPad; CPU OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.0 Mobile/14F89 Safari/602.1","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.812","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"],d=typeof window<"u",H=!d,K=/iPhone|phone|android|iPod|pad|iPad/i;function g(){return d?K.test(s()):!1}function N(){return d?!g():!1}const F=/Android/i.test(s()),x=/iPhone|iPod|iPad|iOS/i.test(s()),$=/uni-app|html5plus/.test(s()),E=/MicroMessenger/i.test(s()),I=/\sQQ|mqqbrowser|qzone|qqbrowser/i.test(s()),X=/mqqbrowser|qqbrowser/i.test(s()),P=/qzone\/.*_qz_([\d.]+)/i.test(s()),B=/(weibo).*weibo__([\d.]+)/i.test(s()),U=/(baiduboxapp)\/([\d.]+)/i.test(s());function Q(e,{immediate:i}={immediate:!0}){d&&(i&&window.addEventListener("load",e,!1),window.addEventListener("orientationchange"in window?"orientationchange":"resize",e,!1))}function W(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function M(e){return W(e)==="object"}function h(e,i){return M(e)?Object.prototype.hasOwnProperty.call(e,i):!1}const S={};class R{constructor(i){p(this,"data");this.data={};const o=h(S,i);this.data=o?S[i].data:{},o||(S[i]=this)}get length(){return Object.keys(this.data).length}clear(){this.data={}}getItem(i){return h(this.data,i)?this.data[i]:null}setItem(i,o){this.data[i]=o}removeItem(i){h(this.data,i)&&delete this.data[i]}key(i){const o=Object.keys(this.data);return i>o.length?null:o[i]}}class L{constructor(i,o){p(this,"prefix");p(this,"storage");this.prefix=i,this.storage=d?window[o]:new R(i)}get(i){const o=this.storage.getItem(`${this.prefix}-${i}`);if(!o)return o;try{return o==="true"?!0:o==="false"?!1:o==="null"?null:o==="undefined"?void 0:JSON.parse(o)}catch{return o}}set(i,o){try{const r=W(o)==="string"?o:JSON.stringify(o);this.storage.setItem(`${this.prefix}-${i}`,r)}catch(n){console.log(n)}}remove(i){this.storage.removeItem(`${this.prefix}-${i}`)}clear(){this.list().forEach(o=>{this.remove(o)})}count(){return this.list().length}list(){if(!this.prefix)return[];const i=[],o=this.storage.length;for(let n=0;n<o;n++){const r=this.storage.key(n);r!=null&&r.startsWith(this.prefix)&&i.push(r.replace(`${this.prefix}-`,""))}return i}}class D extends L{constructor(i){super(i,"localStorage")}}class V extends L{constructor(i){super(i,"sessionStorage")}}function w(){return d?window.matchMedia("(prefers-color-scheme: dark)").matches:!1}function z(){return d?window.matchMedia("(prefers-color-scheme: light)").matches:!1}function q(){if(w())return"dark";if(z())return"light"}class j{constructor(i){p(this,"mime");this.mime=i}getMimeType(i){try{return i.startsWith("data")&&i.includes("base64")?i.split(",")[0].replace(/data:(.*);base64/,"$1"):this.mime.getType(i)||""}catch{return""}}getExtensionFromMimeType(i){try{return this.mime.getExtension(i)||""}catch{return""}}getExtension(i){try{const o=this.getMimeType(i);return this.getExtensionFromMimeType(o)}catch{return""}}}function Z(e,i=!1){return e=e?String(e):"",e=e.replace(/[^\d]/g,""),e&&!i&&(e=parseInt(e)),String(e)}function J(e){if(e=String(e),!e)return"0.00";const i=e.split("."),o=i[0],n=i[1];return i.length===1?`${o}.00`:n.length===1?`${e}0`:Number(e).toFixed(2)}function Y(e,i){return String(e).length>i?String(e).slice(0,i)+" ...":String(e)}function G([e,...i]){return e?e.toUpperCase()+i.join(""):""}function ee(e){return e?e.replace(/([A-Z])/g," $1").trim().split(" ").join("-").replace(/_/g,"-").toLowerCase():""}function C([e,...i]){return e?(e.toLowerCase()+i.join("")).replace(/[-_](\w)/g,(n,r)=>r?r.toUpperCase():""):""}function ie(e){return e?G(C(e)):""}function oe(e){const i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);return e&&o.test(e)?e.replace(i,"\\$&"):e}function T(e){if(!Array.isArray(e)&&!M(e))return e;if(Array.isArray(e))return e.map(n=>T(n));const i=Object.keys(e).sort(),o={};return i.forEach(n=>{o[n]=T(e[n])}),o}function te({primaryKey:e,list:i}){const o=new Map;i.forEach(r=>{const l=String(r[e]);o.has(l)||o.set(l,r)});const n=[];return o.forEach(r=>{n.push(r)}),n}function ne(e,i){if(!M)return e;const o={};for(const n in e)h(e,n)&&!i.includes(n)&&(o[n]=e[n]);return o}function re(e,i){const o=new Date(e),n=o.getFullYear(),r=("0"+(o.getMonth()+1)).slice(-2),l=("0"+o.getDate()).slice(-2),a=("0"+o.getHours()).slice(-2),u=("0"+o.getMinutes()).slice(-2),f=("0"+o.getSeconds()).slice(-2);return i?`${n}-${r}-${l}`:`${n}-${r}-${l} ${a}:${u}:${f}`}function ae(e,i={days:"天",hours:"小时",minutes:"分钟",seconds:"秒"}){const o=Math.floor(e/1e3),n=Math.floor(o/(3600*24)),r=Math.floor(o%(3600*24)/3600),l=Math.floor(o%3600/60),a=Math.floor(o%60),u=[];return n>0&&u.push(`${n} ${i.days}`),r>0&&u.push(`${r} ${i.hours}`),l>0&&u.push(`${l} ${i.minutes}`),a>0&&u.push(`${a} ${i.seconds}`),u.length===0?`0 ${i.seconds}`:u.join(" ")}function A(e){let i="";if(d){const{search:n}=window.location;i=n}if(typeof e=="string"&&e.startsWith("http")){const n=e.indexOf("?");i=n===-1?"":e.slice(n)}if(i.includes("#")){const n=i.indexOf("#");i=i.slice(0,n)}if(!i.length)return{};const o={};return i.slice(1).split("&").forEach(n=>{const[r,l]=n.split("=");o[r]=decodeURIComponent(l)}),o}function le(e){const i=A(e),o={};return Object.keys(i).forEach(r=>{r!=="path"&&(o[r]=i[r])}),{path:i.path||"",params:o}}function y(e,i){return A(i)[e]||""}function se(e){return M(e)?Object.keys(e).map(i=>`${i}=${encodeURIComponent(String(e[i]))}`).join("&"):""}function b(e=0,i=100,o="round"){return Math[o](Math.random()*(i-e)+e)}function v(e=10){const i="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let o="",n=e;const r=i.length;for(;n--;)o+=i[Math.random()*r|0];return o}function ce(){const e=b(0,1);return[!0,!1][e]}function de(e){if(!Array.isArray(e))return e;for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1)),n=e[i];e[i]=e[o],e[o]=n}return e}function ue(){const e=b(0,m.length-1);return m[e]}function fe({type:e,id:i,resource:o}){return new Promise((n,r)=>{if(!d||document.querySelector(`#${i}`)){r();return}function l(a){a.addEventListener("load",n),a.addEventListener("error",r),a.addEventListener("abort",r)}switch(e){case"js":{const a=document.createElement("script");a.id=i,a.async=!0,a.src=o,l(a),document.head.appendChild(a);break}case"css":{const a=document.createElement("link");a.id=i,a.rel="stylesheet",a.href=o,l(a),document.head.appendChild(a);break}case"style":{const a=document.createElement("style");a.id=i,l(a),document.head.appendChild(a),a.appendChild(document.createTextNode(o));break}}})}function Me(e,i){return new Promise((o,n)=>{if(!d){n();return}const l=y(e)||i||`jsonp_callback_${v().replace(/-/g,"_")}`;window[l]=O=>{try{delete window[l]}catch{window[l]=void 0}document.body.removeChild(f),o(O)};const a=e.includes("?")?"&":"?",u=e.includes("callback")?e:e+a+"callback="+l,f=document.createElement("script");f.src=u,f.onerror=n,document.body.appendChild(f)})}function he(e){return new Promise(i=>{setTimeout(()=>{i()},e)})}function pe(e,i=200){let o;return function(...n){const r=this;clearTimeout(o),o=setTimeout(function(){e.apply(r,n)},i)}}function ke(e,i){let o,n=0;return function(...r){const l=Date.now(),a=i-(l-n);a<=0?(clearTimeout(o),n=l,e.apply(this,r)):o||(o=setTimeout(()=>{n=Date.now(),o=void 0,e.apply(this,r)},a))}}function me(e){return/^1[3456789]\d{9}$/.test(String(e))}function We(e){return/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)}function Se(e){return/https?:\/\/[\w-]+(\.[\w-]+){1,2}(\/[\w-]{3,6}){0,2}(\?[\w_]{4,6}=[\w_]{4,6}(&[\w_]{4,6}=[\w_]{4,6}){0,2})?/.test(e)}function Te(e){const i=/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,o=/^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;return i.test(e)||o.test(e)}function Ae(e){return/^([1-9]{1})(\d{15}|\d{16}|\d{18})$/.test(e)}function be(e){return/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e)}function Ke(e){return/^([\da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^::([\da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:):([\da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){2}:([\da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){3}:([\da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^:((:[\da-fA-F]{1,4}){1,6}|:)$|^[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,5}|:)$|^([\da-fA-F]{1,4}:){2}((:[\da-fA-F]{1,4}){1,4}|:)$|^([\da-fA-F]{1,4}:){3}((:[\da-fA-F]{1,4}){1,3}|:)$|^([\da-fA-F]{1,4}:){4}((:[\da-fA-F]{1,4}){1,2}|:)$|^([\da-fA-F]{1,4}:){5}:([\da-fA-F]{1,4})?$|^([\da-fA-F]{1,4}:){6}:$/.test(e)}function _(){try{return process.env.NODE_ENV}catch{return}}const ge=_();function k(e){try{return process.env.NODE_ENV===e}catch{return!1}}const Le=k("development"),we=k("test"),ze=k("production");t.FileInfo=j,t.LocalStorage=D,t.SessionStorage=V,t.camelCase=C,t.capitalize=G,t.checkRuntimeEnv=k,t.clipboard=c,t.debounce=pe,t.ellipsis=Y,t.escapeRegExp=oe,t.excludeFields=ne,t.extractNumber=Z,t.extractQueryInfo=le,t.formatAmount=J,t.formatDuration=ae,t.formatTime=re,t.getDataType=W,t.getPrefersColorScheme=q,t.getQuery=y,t.getRuntimeEnv=_,t.getUserAgent=s,t.hasKey=h,t.isAndroid=F,t.isBaidu=U,t.isBankCard=Ae,t.isBrowser=d,t.isDark=w,t.isDesktop=N,t.isDevRuntime=Le,t.isEmail=We,t.isIOS=x,t.isIPv4=be,t.isIPv6=Ke,t.isIdCard=Te,t.isLight=z,t.isMob=me,t.isMobile=g,t.isObject=M,t.isProdRuntime=ze,t.isQQ=I,t.isQQBrowser=X,t.isQzone=P,t.isServer=H,t.isTestRuntime=we,t.isUniApp=$,t.isUrl=Se,t.isWeibo=B,t.isWeixin=E,t.jsonp=Me,t.kebabCase=ee,t.loadRes=fe,t.mobileDevicesRegExp=K,t.parseQuery=A,t.pascalCase=ie,t.randomBoolean=ce,t.randomNumber=b,t.randomString=v,t.randomUserAgent=ue,t.runtimeEnv=ge,t.shuffle=de,t.sleep=he,t.sortKeys=T,t.stringifyQuery=se,t.throttle=ke,t.unique=te,t.userAgents=m,t.watchResize=Q,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
(function(t,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(t=typeof globalThis<"u"?globalThis:t||self,d(t.Utils={}))})(this,function(t){"use strict";var Fe=Object.defineProperty;var Ie=(t,d,s)=>d in t?Fe(t,d,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[d]=s;var p=(t,d,s)=>(Ie(t,typeof d!="symbol"?d+"":d,s),s);const d={isSupported:typeof navigator>"u"?!1:!!navigator.clipboard,async copy(e){if(!this.isSupported)return!1;const i=e.innerText||e.value;return await this.write(i)},async cut(e){return!this.isSupported||!await this.copy(e)?!1:(e.value="",!0)},async read(){return this.isSupported?await navigator.clipboard.readText():""},async write(e){return this.isSupported?(await navigator.clipboard.writeText(e),!0):!1}};function s(){return typeof window<"u"?navigator.userAgent.toLowerCase():""}const m=["Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; BLA-AL00 Build/HUAWEIBLA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/8.9 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.0.0; zh-CN; MHA-AL00 Build/HUAWEIMHA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.1.4.994 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.1; EML-AL00 Build/HUAWEIEML-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.143 Crosswalk/24.53.595.0 XWEB/358 MMWEBSDK/23 Mobile Safari/537.36 MicroMessenger/6.7.2.1340(0x2607023A) NetType/4G Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044207 Mobile Safari/537.36 MicroMessenger/6.7.3.1340(0x26070332) NetType/4G Language/zh_CN Process/tools","Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13","MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1","Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 OPR/45.0.2552.888","Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (iPad; CPU OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.0 Mobile/14F89 Safari/602.1","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.812","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"],c=typeof window<"u",$=!c,K=/iPhone|phone|android|iPod|pad|iPad/i;function g(){return c?K.test(s()):!1}function E(){return c?!g():!1}const x=/Android/i.test(s()),X=/iPhone|iPod|iPad|iOS/i.test(s()),P=/uni-app|html5plus/.test(s()),B=/MicroMessenger/i.test(s()),Q=/\sQQ|mqqbrowser|qzone|qqbrowser/i.test(s()),U=/mqqbrowser|qqbrowser/i.test(s()),R=/qzone\/.*_qz_([\d.]+)/i.test(s()),D=/(weibo).*weibo__([\d.]+)/i.test(s()),V=/(baiduboxapp)\/([\d.]+)/i.test(s());function q(e,{immediate:i}={immediate:!0}){c&&(i&&window.addEventListener("load",e,!1),window.addEventListener("orientationchange"in window?"orientationchange":"resize",e,!1))}function W(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function M(e){return W(e)==="object"}function h(e,i){return M(e)?Object.prototype.hasOwnProperty.call(e,i):!1}function j(e){return new TextEncoder().encode(e)}const S={};class Z{constructor(i){p(this,"data");this.data={};const o=h(S,i);this.data=o?S[i].data:{},o||(S[i]=this)}get length(){return Object.keys(this.data).length}clear(){this.data={}}getItem(i){return h(this.data,i)?this.data[i]:null}setItem(i,o){this.data[i]=o}removeItem(i){h(this.data,i)&&delete this.data[i]}key(i){const o=Object.keys(this.data);return i>o.length?null:o[i]}}class w{constructor(i,o){p(this,"prefix");p(this,"storage");this.prefix=i,this.storage=c?window[o]:new Z(i)}get(i){const o=this.storage.getItem(`${this.prefix}-${i}`);if(!o)return o;try{return o==="true"?!0:o==="false"?!1:o==="null"?null:o==="undefined"?void 0:JSON.parse(o)}catch{return o}}set(i,o){try{const r=W(o)==="string"?o:JSON.stringify(o);this.storage.setItem(`${this.prefix}-${i}`,r)}catch(n){console.log(n)}}remove(i){this.storage.removeItem(`${this.prefix}-${i}`)}clear(){this.list().forEach(o=>{this.remove(o)})}count(){return this.list().length}list(){if(!this.prefix)return[];const i=[],o=this.storage.length;for(let n=0;n<o;n++){const r=this.storage.key(n);r!=null&&r.startsWith(this.prefix)&&i.push(r.replace(`${this.prefix}-`,""))}return i}}class J extends w{constructor(i){super(i,"localStorage")}}class Y extends w{constructor(i){super(i,"sessionStorage")}}const L=c?window.matchMedia("(prefers-color-scheme: dark)"):void 0;function z(){return c?L.matches:!1}const y=c?window.matchMedia("(prefers-color-scheme: light)"):void 0;function G(){return c?y.matches:!1}function ee(){if(z())return"dark";if(G())return"light"}const C=c?window.matchMedia("(orientation: portrait)"):void 0;function ie(){return c?C.matches:!1}const v=c?window.matchMedia("(orientation: landscape)"):void 0;function oe(){return c?v.matches:!1}class te{constructor(i){p(this,"mime");this.mime=i}getMimeType(i){try{return i.startsWith("data")&&i.includes("base64")?i.split(",")[0].replace(/data:(.*);base64/,"$1"):this.mime.getType(i)||""}catch{return""}}getExtensionFromMimeType(i){try{return this.mime.getExtension(i)||""}catch{return""}}getExtension(i){try{const o=this.getMimeType(i);return this.getExtensionFromMimeType(o)}catch{return""}}}function ne(e,i=!1){return e=e?String(e):"",e=e.replace(/[^\d]/g,""),e&&!i&&(e=parseInt(e)),String(e)}function re(e){if(e=String(e),!e)return"0.00";const i=e.split("."),o=i[0],n=i[1];return i.length===1?`${o}.00`:n.length===1?`${e}0`:Number(e).toFixed(2)}function ae(e,i){return String(e).length>i?String(e).slice(0,i)+" ...":String(e)}function _([e,...i]){return e?e.toUpperCase()+i.join(""):""}function le(e){return e?e.replace(/([A-Z])/g," $1").trim().split(" ").join("-").replace(/_/g,"-").toLowerCase():""}function O([e,...i]){return e?(e.toLowerCase()+i.join("")).replace(/[-_](\w)/g,(n,r)=>r?r.toUpperCase():""):""}function se(e){return e?_(O(e)):""}function ce(e){const i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);return e&&o.test(e)?e.replace(i,"\\$&"):e}function T(e){if(!Array.isArray(e)&&!M(e))return e;if(Array.isArray(e))return e.map(n=>T(n));const i=Object.keys(e).sort(),o={};return i.forEach(n=>{o[n]=T(e[n])}),o}function de({primaryKey:e,list:i}){const o=new Map;i.forEach(r=>{const l=String(r[e]);o.has(l)||o.set(l,r)});const n=[];return o.forEach(r=>{n.push(r)}),n}function ue(e,i){if(!M)return e;const o={};for(const n in e)h(e,n)&&!i.includes(n)&&(o[n]=e[n]);return o}function fe(e,i){const o=new Date(e),n=o.getFullYear(),r=("0"+(o.getMonth()+1)).slice(-2),l=("0"+o.getDate()).slice(-2),a=("0"+o.getHours()).slice(-2),u=("0"+o.getMinutes()).slice(-2),f=("0"+o.getSeconds()).slice(-2);return i?`${n}-${r}-${l}`:`${n}-${r}-${l} ${a}:${u}:${f}`}function Me(e,i={days:"天",hours:"小时",minutes:"分钟",seconds:"秒"}){const o=Math.floor(e/1e3),n=Math.floor(o/(3600*24)),r=Math.floor(o%(3600*24)/3600),l=Math.floor(o%3600/60),a=Math.floor(o%60),u=[];return n>0&&u.push(`${n} ${i.days}`),r>0&&u.push(`${r} ${i.hours}`),l>0&&u.push(`${l} ${i.minutes}`),a>0&&u.push(`${a} ${i.seconds}`),u.length===0?`0 ${i.seconds}`:u.join(" ")}function b(e){let i="";if(c){const{search:n}=window.location;i=n}if(typeof e=="string"&&e.startsWith("http")){const n=e.indexOf("?");i=n===-1?"":e.slice(n)}if(i.includes("#")){const n=i.indexOf("#");i=i.slice(0,n)}if(!i.length)return{};const o={};return i.slice(1).split("&").forEach(n=>{const[r,l]=n.split("=");o[r]=decodeURIComponent(l)}),o}function he(e){const i=b(e),o={};return Object.keys(i).forEach(r=>{r!=="path"&&(o[r]=i[r])}),{path:i.path||"",params:o}}function H(e,i){return b(i)[e]||""}function pe(e){return M(e)?Object.keys(e).map(i=>`${i}=${encodeURIComponent(String(e[i]))}`).join("&"):""}function A(e=0,i=100,o="round"){return Math[o](Math.random()*(i-e)+e)}function N(e=10){const i="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let o="",n=e;const r=i.length;for(;n--;)o+=i[Math.random()*r|0];return o}function ke(){const e=A(0,1);return[!0,!1][e]}function me(e){if(!Array.isArray(e))return e;for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1)),n=e[i];e[i]=e[o],e[o]=n}return e}function We(){const e=A(0,m.length-1);return m[e]}function Se({type:e,id:i,resource:o}){return new Promise((n,r)=>{if(!c||document.querySelector(`#${i}`)){r();return}function l(a){a.addEventListener("load",n),a.addEventListener("error",r),a.addEventListener("abort",r)}switch(e){case"js":{const a=document.createElement("script");a.id=i,a.async=!0,a.src=o,l(a),document.head.appendChild(a);break}case"css":{const a=document.createElement("link");a.id=i,a.rel="stylesheet",a.href=o,l(a),document.head.appendChild(a);break}case"style":{const a=document.createElement("style");a.id=i,l(a),document.head.appendChild(a),a.appendChild(document.createTextNode(o));break}}})}function Te(e,i){return new Promise((o,n)=>{if(!c){n();return}const l=H(e)||i||`jsonp_callback_${N().replace(/-/g,"_")}`;window[l]=I=>{try{delete window[l]}catch{window[l]=void 0}document.body.removeChild(f),o(I)};const a=e.includes("?")?"&":"?",u=e.includes("callback")?e:e+a+"callback="+l,f=document.createElement("script");f.src=u,f.onerror=n,document.body.appendChild(f)})}async function be(e){const i=[];for(const o in e)i.push(new Promise((n,r)=>{const l=new Image;l.onload=n,l.onerror=r,l.src=o}));return Promise.all(i)}function Ae(e){return new Promise(i=>{setTimeout(()=>{i()},e)})}function Ke(e,i=200){let o;return function(...n){const r=this;clearTimeout(o),o=setTimeout(function(){e.apply(r,n)},i)}}function ge(e,i){let o,n=0;return function(...r){const l=Date.now(),a=i-(l-n);a<=0?(clearTimeout(o),n=l,e.apply(this,r)):o||(o=setTimeout(()=>{n=Date.now(),o=void 0,e.apply(this,r)},a))}}function we(e){return/^1[3456789]\d{9}$/.test(String(e))}function Le(e){return/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)}function ze(e){return/https?:\/\/[\w-]+(\.[\w-]+){1,2}(\/[\w-]{3,6}){0,2}(\?[\w_]{4,6}=[\w_]{4,6}(&[\w_]{4,6}=[\w_]{4,6}){0,2})?/.test(e)}function ye(e){const i=/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,o=/^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;return i.test(e)||o.test(e)}function Ge(e){return/^([1-9]{1})(\d{15}|\d{16}|\d{18})$/.test(e)}function Ce(e){return/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e)}function ve(e){return/^([\da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^::([\da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:):([\da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){2}:([\da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){3}:([\da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^:((:[\da-fA-F]{1,4}){1,6}|:)$|^[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,5}|:)$|^([\da-fA-F]{1,4}:){2}((:[\da-fA-F]{1,4}){1,4}|:)$|^([\da-fA-F]{1,4}:){3}((:[\da-fA-F]{1,4}){1,3}|:)$|^([\da-fA-F]{1,4}:){4}((:[\da-fA-F]{1,4}){1,2}|:)$|^([\da-fA-F]{1,4}:){5}:([\da-fA-F]{1,4})?$|^([\da-fA-F]{1,4}:){6}:$/.test(e)}function F(){try{return process.env.NODE_ENV}catch{return}}const _e=F();function k(e){try{return process.env.NODE_ENV===e}catch{return!1}}const Oe=k("development"),He=k("test"),Ne=k("production");t.FileInfo=te,t.LocalStorage=J,t.SessionStorage=Y,t.camelCase=O,t.capitalize=_,t.checkRuntimeEnv=k,t.clipboard=d,t.darkMediaQuery=L,t.debounce=Ke,t.ellipsis=ae,t.escapeRegExp=ce,t.excludeFields=ue,t.extractNumber=ne,t.extractQueryInfo=he,t.formatAmount=re,t.formatDuration=Me,t.formatTime=fe,t.getBytes=j,t.getDataType=W,t.getPrefersColorScheme=ee,t.getQuery=H,t.getRuntimeEnv=F,t.getUserAgent=s,t.hasKey=h,t.isAndroid=x,t.isBaidu=V,t.isBankCard=Ge,t.isBrowser=c,t.isDark=z,t.isDesktop=E,t.isDevRuntime=Oe,t.isEmail=Le,t.isIOS=X,t.isIPv4=Ce,t.isIPv6=ve,t.isIdCard=ye,t.isLandscape=oe,t.isLight=G,t.isMob=we,t.isMobile=g,t.isObject=M,t.isPortrait=ie,t.isProdRuntime=Ne,t.isQQ=Q,t.isQQBrowser=U,t.isQzone=R,t.isServer=$,t.isTestRuntime=He,t.isUniApp=P,t.isUrl=ze,t.isWeibo=D,t.isWeixin=B,t.jsonp=Te,t.kebabCase=le,t.landscapeMediaQuery=v,t.lightMediaQuery=y,t.loadRes=Se,t.mobileDevicesRegExp=K,t.parseQuery=b,t.pascalCase=se,t.portraitMediaQuery=C,t.preloadImages=be,t.randomBoolean=ke,t.randomNumber=A,t.randomString=N,t.randomUserAgent=We,t.runtimeEnv=_e,t.shuffle=me,t.sleep=Ae,t.sortKeys=T,t.stringifyQuery=pe,t.throttle=ge,t.unique=de,t.userAgents=m,t.watchResize=q,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});

@@ -117,2 +117,8 @@ /**

/**
* Dark mode media query
*
* @category appearance
*/
export declare const darkMediaQuery: MediaQueryList | undefined;
/**
* Checks if the user's preferred color scheme is dark

@@ -124,2 +130,8 @@ *

/**
* Light mode media query
*
* @category appearance
*/
export declare const lightMediaQuery: MediaQueryList | undefined;
/**
* Checks if the user's preferred color scheme is light

@@ -137,2 +149,21 @@ *

/**
* Portrait orientation media query
*
* @category appearance
*/
export declare const portraitMediaQuery: MediaQueryList | undefined;
/**
* Checks if the user's preferred color scheme is light
*
* @category appearance
*/
export declare function isPortrait(): boolean;
/**
* Landscape orientation media query
*
* @category appearance
*/
export declare const landscapeMediaQuery: MediaQueryList | undefined;
export declare function isLandscape(): boolean;
/**
* The actual type of the data

@@ -162,2 +193,8 @@ *

/**
* String to byte stream
*
* @category data
*/
export declare function getBytes(value: string): Uint8Array;
/**
* Checks if the code is being executed in a browser environment

@@ -452,26 +489,26 @@ *

*
* ```ts
* interface Res {
* code: number
* data: string[]
* msg: string
* }
* ```ts
* interface Res {
* code: number
* data: string[]
* msg: string
* }
*
* // The default and server-side agreement is to use `callback` Query
* const url = `https://example.com/data`
* // The default and server-side agreement is to use `callback` Query
* const url = `https://example.com/data`
*
* // When no `callback` param passed, a random function name is created
* // Equivalent to `https://example.com/data?callback=randomCallbackName`
* // Pass the type of response as a generic to get a typed return value
* const res = await jsonp<Res>(url)
* // When no `callback` param passed, a random function name is created
* // Equivalent to `https://example.com/data?callback=randomCallbackName`
* // Pass the type of response as a generic to get a typed return value
* const res = await jsonp<Res>(url)
*
* // You can also specify the `callback` function name
* const callback = 'jsonp_callback_123456'
* const res2 = await jsonp<Res>(url, callback)
* // You can also specify the `callback` function name
* const callback = 'jsonp_callback_123456'
* const res2 = await jsonp<Res>(url, callback)
*
* // If the server does not agree on the `callback` Query,
* // you can specify other valid Query in this way.
* const urlWithCallback = `https://example.com/data?cb=${callback}`
* const res3 = await jsonp<Res>(urlWithCallback)
* ```
* // If the server does not agree on the `callback` Query,
* // you can specify other valid Query in this way.
* const urlWithCallback = `https://example.com/data?cb=${callback}`
* const res3 = await jsonp<Res>(urlWithCallback)
* ```
*

@@ -482,2 +519,33 @@ * @category network

/**
* Preload images
*
* @description It can be used to preload large images in advance,
* or wait for the image to be loaded before ending Loading
* and other usage scenarios.
*
* @param images - An array containing image urls
*
* @example
*
* ```ts
* const images = [
* 'https://example.com/1.jpg',
* 'https://example.com/2.jpg',
* 'https://example.com/3.jpg',
* ]
*
* // Start loading, Show loading icon etc.
* setLoading(true)
*
* // Wait for the images to be pre-rendered
* await preloadImages(images)
*
* // End loading state
* setLoading(false)
* ```
*
* @category network
*/
export declare function preloadImages(images: string[]): Promise<unknown[]>;
/**
* Put the program to sleep for a while

@@ -484,0 +552,0 @@ *

/**
* name: @bassist/utils
* version: v0.13.0
* version: v0.14.0
* description: Opinionated collection of common JavaScript / TypeScript utils by @chengpeiquan .

@@ -9,2 +9,2 @@ * author: chengpeiquan <chengpeiquan@chengpeiquan.com>

*/
(function(t,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(t=typeof globalThis<"u"?globalThis:t||self,c(t.Utils={}))})(this,function(t){"use strict";var Ge=Object.defineProperty;var Ce=(t,c,s)=>c in t?Ge(t,c,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[c]=s;var p=(t,c,s)=>(Ce(t,typeof c!="symbol"?c+"":c,s),s);const c={isSupported:typeof navigator>"u"?!1:!!navigator.clipboard,async copy(e){if(!this.isSupported)return!1;const i=e.innerText||e.value;return await this.write(i)},async cut(e){return!this.isSupported||!await this.copy(e)?!1:(e.value="",!0)},async read(){return this.isSupported?await navigator.clipboard.readText():""},async write(e){return this.isSupported?(await navigator.clipboard.writeText(e),!0):!1}};function s(){return typeof window<"u"?navigator.userAgent.toLowerCase():""}const m=["Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; BLA-AL00 Build/HUAWEIBLA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/8.9 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.0.0; zh-CN; MHA-AL00 Build/HUAWEIMHA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.1.4.994 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.1; EML-AL00 Build/HUAWEIEML-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.143 Crosswalk/24.53.595.0 XWEB/358 MMWEBSDK/23 Mobile Safari/537.36 MicroMessenger/6.7.2.1340(0x2607023A) NetType/4G Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044207 Mobile Safari/537.36 MicroMessenger/6.7.3.1340(0x26070332) NetType/4G Language/zh_CN Process/tools","Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13","MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1","Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 OPR/45.0.2552.888","Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (iPad; CPU OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.0 Mobile/14F89 Safari/602.1","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.812","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"],d=typeof window<"u",H=!d,K=/iPhone|phone|android|iPod|pad|iPad/i;function g(){return d?K.test(s()):!1}function N(){return d?!g():!1}const F=/Android/i.test(s()),x=/iPhone|iPod|iPad|iOS/i.test(s()),$=/uni-app|html5plus/.test(s()),E=/MicroMessenger/i.test(s()),I=/\sQQ|mqqbrowser|qzone|qqbrowser/i.test(s()),X=/mqqbrowser|qqbrowser/i.test(s()),P=/qzone\/.*_qz_([\d.]+)/i.test(s()),B=/(weibo).*weibo__([\d.]+)/i.test(s()),U=/(baiduboxapp)\/([\d.]+)/i.test(s());function Q(e,{immediate:i}={immediate:!0}){d&&(i&&window.addEventListener("load",e,!1),window.addEventListener("orientationchange"in window?"orientationchange":"resize",e,!1))}function W(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function M(e){return W(e)==="object"}function h(e,i){return M(e)?Object.prototype.hasOwnProperty.call(e,i):!1}const S={};class R{constructor(i){p(this,"data");this.data={};const o=h(S,i);this.data=o?S[i].data:{},o||(S[i]=this)}get length(){return Object.keys(this.data).length}clear(){this.data={}}getItem(i){return h(this.data,i)?this.data[i]:null}setItem(i,o){this.data[i]=o}removeItem(i){h(this.data,i)&&delete this.data[i]}key(i){const o=Object.keys(this.data);return i>o.length?null:o[i]}}class L{constructor(i,o){p(this,"prefix");p(this,"storage");this.prefix=i,this.storage=d?window[o]:new R(i)}get(i){const o=this.storage.getItem(`${this.prefix}-${i}`);if(!o)return o;try{return o==="true"?!0:o==="false"?!1:o==="null"?null:o==="undefined"?void 0:JSON.parse(o)}catch{return o}}set(i,o){try{const r=W(o)==="string"?o:JSON.stringify(o);this.storage.setItem(`${this.prefix}-${i}`,r)}catch(n){console.log(n)}}remove(i){this.storage.removeItem(`${this.prefix}-${i}`)}clear(){this.list().forEach(o=>{this.remove(o)})}count(){return this.list().length}list(){if(!this.prefix)return[];const i=[],o=this.storage.length;for(let n=0;n<o;n++){const r=this.storage.key(n);r!=null&&r.startsWith(this.prefix)&&i.push(r.replace(`${this.prefix}-`,""))}return i}}class D extends L{constructor(i){super(i,"localStorage")}}class V extends L{constructor(i){super(i,"sessionStorage")}}function w(){return d?window.matchMedia("(prefers-color-scheme: dark)").matches:!1}function z(){return d?window.matchMedia("(prefers-color-scheme: light)").matches:!1}function q(){if(w())return"dark";if(z())return"light"}class j{constructor(i){p(this,"mime");this.mime=i}getMimeType(i){try{return i.startsWith("data")&&i.includes("base64")?i.split(",")[0].replace(/data:(.*);base64/,"$1"):this.mime.getType(i)||""}catch{return""}}getExtensionFromMimeType(i){try{return this.mime.getExtension(i)||""}catch{return""}}getExtension(i){try{const o=this.getMimeType(i);return this.getExtensionFromMimeType(o)}catch{return""}}}function Z(e,i=!1){return e=e?String(e):"",e=e.replace(/[^\d]/g,""),e&&!i&&(e=parseInt(e)),String(e)}function J(e){if(e=String(e),!e)return"0.00";const i=e.split("."),o=i[0],n=i[1];return i.length===1?`${o}.00`:n.length===1?`${e}0`:Number(e).toFixed(2)}function Y(e,i){return String(e).length>i?String(e).slice(0,i)+" ...":String(e)}function G([e,...i]){return e?e.toUpperCase()+i.join(""):""}function ee(e){return e?e.replace(/([A-Z])/g," $1").trim().split(" ").join("-").replace(/_/g,"-").toLowerCase():""}function C([e,...i]){return e?(e.toLowerCase()+i.join("")).replace(/[-_](\w)/g,(n,r)=>r?r.toUpperCase():""):""}function ie(e){return e?G(C(e)):""}function oe(e){const i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);return e&&o.test(e)?e.replace(i,"\\$&"):e}function T(e){if(!Array.isArray(e)&&!M(e))return e;if(Array.isArray(e))return e.map(n=>T(n));const i=Object.keys(e).sort(),o={};return i.forEach(n=>{o[n]=T(e[n])}),o}function te({primaryKey:e,list:i}){const o=new Map;i.forEach(r=>{const l=String(r[e]);o.has(l)||o.set(l,r)});const n=[];return o.forEach(r=>{n.push(r)}),n}function ne(e,i){if(!M)return e;const o={};for(const n in e)h(e,n)&&!i.includes(n)&&(o[n]=e[n]);return o}function re(e,i){const o=new Date(e),n=o.getFullYear(),r=("0"+(o.getMonth()+1)).slice(-2),l=("0"+o.getDate()).slice(-2),a=("0"+o.getHours()).slice(-2),u=("0"+o.getMinutes()).slice(-2),f=("0"+o.getSeconds()).slice(-2);return i?`${n}-${r}-${l}`:`${n}-${r}-${l} ${a}:${u}:${f}`}function ae(e,i={days:"天",hours:"小时",minutes:"分钟",seconds:"秒"}){const o=Math.floor(e/1e3),n=Math.floor(o/(3600*24)),r=Math.floor(o%(3600*24)/3600),l=Math.floor(o%3600/60),a=Math.floor(o%60),u=[];return n>0&&u.push(`${n} ${i.days}`),r>0&&u.push(`${r} ${i.hours}`),l>0&&u.push(`${l} ${i.minutes}`),a>0&&u.push(`${a} ${i.seconds}`),u.length===0?`0 ${i.seconds}`:u.join(" ")}function A(e){let i="";if(d){const{search:n}=window.location;i=n}if(typeof e=="string"&&e.startsWith("http")){const n=e.indexOf("?");i=n===-1?"":e.slice(n)}if(i.includes("#")){const n=i.indexOf("#");i=i.slice(0,n)}if(!i.length)return{};const o={};return i.slice(1).split("&").forEach(n=>{const[r,l]=n.split("=");o[r]=decodeURIComponent(l)}),o}function le(e){const i=A(e),o={};return Object.keys(i).forEach(r=>{r!=="path"&&(o[r]=i[r])}),{path:i.path||"",params:o}}function y(e,i){return A(i)[e]||""}function se(e){return M(e)?Object.keys(e).map(i=>`${i}=${encodeURIComponent(String(e[i]))}`).join("&"):""}function b(e=0,i=100,o="round"){return Math[o](Math.random()*(i-e)+e)}function v(e=10){const i="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let o="",n=e;const r=i.length;for(;n--;)o+=i[Math.random()*r|0];return o}function ce(){const e=b(0,1);return[!0,!1][e]}function de(e){if(!Array.isArray(e))return e;for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1)),n=e[i];e[i]=e[o],e[o]=n}return e}function ue(){const e=b(0,m.length-1);return m[e]}function fe({type:e,id:i,resource:o}){return new Promise((n,r)=>{if(!d||document.querySelector(`#${i}`)){r();return}function l(a){a.addEventListener("load",n),a.addEventListener("error",r),a.addEventListener("abort",r)}switch(e){case"js":{const a=document.createElement("script");a.id=i,a.async=!0,a.src=o,l(a),document.head.appendChild(a);break}case"css":{const a=document.createElement("link");a.id=i,a.rel="stylesheet",a.href=o,l(a),document.head.appendChild(a);break}case"style":{const a=document.createElement("style");a.id=i,l(a),document.head.appendChild(a),a.appendChild(document.createTextNode(o));break}}})}function Me(e,i){return new Promise((o,n)=>{if(!d){n();return}const l=y(e)||i||`jsonp_callback_${v().replace(/-/g,"_")}`;window[l]=O=>{try{delete window[l]}catch{window[l]=void 0}document.body.removeChild(f),o(O)};const a=e.includes("?")?"&":"?",u=e.includes("callback")?e:e+a+"callback="+l,f=document.createElement("script");f.src=u,f.onerror=n,document.body.appendChild(f)})}function he(e){return new Promise(i=>{setTimeout(()=>{i()},e)})}function pe(e,i=200){let o;return function(...n){const r=this;clearTimeout(o),o=setTimeout(function(){e.apply(r,n)},i)}}function ke(e,i){let o,n=0;return function(...r){const l=Date.now(),a=i-(l-n);a<=0?(clearTimeout(o),n=l,e.apply(this,r)):o||(o=setTimeout(()=>{n=Date.now(),o=void 0,e.apply(this,r)},a))}}function me(e){return/^1[3456789]\d{9}$/.test(String(e))}function We(e){return/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)}function Se(e){return/https?:\/\/[\w-]+(\.[\w-]+){1,2}(\/[\w-]{3,6}){0,2}(\?[\w_]{4,6}=[\w_]{4,6}(&[\w_]{4,6}=[\w_]{4,6}){0,2})?/.test(e)}function Te(e){const i=/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,o=/^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;return i.test(e)||o.test(e)}function Ae(e){return/^([1-9]{1})(\d{15}|\d{16}|\d{18})$/.test(e)}function be(e){return/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e)}function Ke(e){return/^([\da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^::([\da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:):([\da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){2}:([\da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){3}:([\da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^:((:[\da-fA-F]{1,4}){1,6}|:)$|^[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,5}|:)$|^([\da-fA-F]{1,4}:){2}((:[\da-fA-F]{1,4}){1,4}|:)$|^([\da-fA-F]{1,4}:){3}((:[\da-fA-F]{1,4}){1,3}|:)$|^([\da-fA-F]{1,4}:){4}((:[\da-fA-F]{1,4}){1,2}|:)$|^([\da-fA-F]{1,4}:){5}:([\da-fA-F]{1,4})?$|^([\da-fA-F]{1,4}:){6}:$/.test(e)}function _(){try{return process.env.NODE_ENV}catch{return}}const ge=_();function k(e){try{return process.env.NODE_ENV===e}catch{return!1}}const Le=k("development"),we=k("test"),ze=k("production");t.FileInfo=j,t.LocalStorage=D,t.SessionStorage=V,t.camelCase=C,t.capitalize=G,t.checkRuntimeEnv=k,t.clipboard=c,t.debounce=pe,t.ellipsis=Y,t.escapeRegExp=oe,t.excludeFields=ne,t.extractNumber=Z,t.extractQueryInfo=le,t.formatAmount=J,t.formatDuration=ae,t.formatTime=re,t.getDataType=W,t.getPrefersColorScheme=q,t.getQuery=y,t.getRuntimeEnv=_,t.getUserAgent=s,t.hasKey=h,t.isAndroid=F,t.isBaidu=U,t.isBankCard=Ae,t.isBrowser=d,t.isDark=w,t.isDesktop=N,t.isDevRuntime=Le,t.isEmail=We,t.isIOS=x,t.isIPv4=be,t.isIPv6=Ke,t.isIdCard=Te,t.isLight=z,t.isMob=me,t.isMobile=g,t.isObject=M,t.isProdRuntime=ze,t.isQQ=I,t.isQQBrowser=X,t.isQzone=P,t.isServer=H,t.isTestRuntime=we,t.isUniApp=$,t.isUrl=Se,t.isWeibo=B,t.isWeixin=E,t.jsonp=Me,t.kebabCase=ee,t.loadRes=fe,t.mobileDevicesRegExp=K,t.parseQuery=A,t.pascalCase=ie,t.randomBoolean=ce,t.randomNumber=b,t.randomString=v,t.randomUserAgent=ue,t.runtimeEnv=ge,t.shuffle=de,t.sleep=he,t.sortKeys=T,t.stringifyQuery=se,t.throttle=ke,t.unique=te,t.userAgents=m,t.watchResize=Q,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
(function(t,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(t=typeof globalThis<"u"?globalThis:t||self,d(t.Utils={}))})(this,function(t){"use strict";var Fe=Object.defineProperty;var Ie=(t,d,s)=>d in t?Fe(t,d,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[d]=s;var p=(t,d,s)=>(Ie(t,typeof d!="symbol"?d+"":d,s),s);const d={isSupported:typeof navigator>"u"?!1:!!navigator.clipboard,async copy(e){if(!this.isSupported)return!1;const i=e.innerText||e.value;return await this.write(i)},async cut(e){return!this.isSupported||!await this.copy(e)?!1:(e.value="",!0)},async read(){return this.isSupported?await navigator.clipboard.readText():""},async write(e){return this.isSupported?(await navigator.clipboard.writeText(e),!0):!1}};function s(){return typeof window<"u"?navigator.userAgent.toLowerCase():""}const m=["Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; BLA-AL00 Build/HUAWEIBLA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/8.9 Mobile Safari/537.36","Mozilla/5.0 (Linux; U; Android 8.0.0; zh-CN; MHA-AL00 Build/HUAWEIMHA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.1.4.994 Mobile Safari/537.36","Mozilla/5.0 (Linux; Android 8.1; EML-AL00 Build/HUAWEIEML-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.143 Crosswalk/24.53.595.0 XWEB/358 MMWEBSDK/23 Mobile Safari/537.36 MicroMessenger/6.7.2.1340(0x2607023A) NetType/4G Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044207 Mobile Safari/537.36 MicroMessenger/6.7.3.1340(0x26070332) NetType/4G Language/zh_CN Process/tools","Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13","MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1","Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN","Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Windows NT 6.1; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 OPR/45.0.2552.888","Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (iPad; CPU OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.0 Mobile/14F89 Safari/602.1","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.812","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Trident/5.0)","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1","Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36","Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7","Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko","Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"],c=typeof window<"u",$=!c,K=/iPhone|phone|android|iPod|pad|iPad/i;function g(){return c?K.test(s()):!1}function E(){return c?!g():!1}const x=/Android/i.test(s()),X=/iPhone|iPod|iPad|iOS/i.test(s()),P=/uni-app|html5plus/.test(s()),B=/MicroMessenger/i.test(s()),Q=/\sQQ|mqqbrowser|qzone|qqbrowser/i.test(s()),U=/mqqbrowser|qqbrowser/i.test(s()),R=/qzone\/.*_qz_([\d.]+)/i.test(s()),D=/(weibo).*weibo__([\d.]+)/i.test(s()),V=/(baiduboxapp)\/([\d.]+)/i.test(s());function q(e,{immediate:i}={immediate:!0}){c&&(i&&window.addEventListener("load",e,!1),window.addEventListener("orientationchange"in window?"orientationchange":"resize",e,!1))}function W(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function M(e){return W(e)==="object"}function h(e,i){return M(e)?Object.prototype.hasOwnProperty.call(e,i):!1}function j(e){return new TextEncoder().encode(e)}const S={};class Z{constructor(i){p(this,"data");this.data={};const o=h(S,i);this.data=o?S[i].data:{},o||(S[i]=this)}get length(){return Object.keys(this.data).length}clear(){this.data={}}getItem(i){return h(this.data,i)?this.data[i]:null}setItem(i,o){this.data[i]=o}removeItem(i){h(this.data,i)&&delete this.data[i]}key(i){const o=Object.keys(this.data);return i>o.length?null:o[i]}}class w{constructor(i,o){p(this,"prefix");p(this,"storage");this.prefix=i,this.storage=c?window[o]:new Z(i)}get(i){const o=this.storage.getItem(`${this.prefix}-${i}`);if(!o)return o;try{return o==="true"?!0:o==="false"?!1:o==="null"?null:o==="undefined"?void 0:JSON.parse(o)}catch{return o}}set(i,o){try{const r=W(o)==="string"?o:JSON.stringify(o);this.storage.setItem(`${this.prefix}-${i}`,r)}catch(n){console.log(n)}}remove(i){this.storage.removeItem(`${this.prefix}-${i}`)}clear(){this.list().forEach(o=>{this.remove(o)})}count(){return this.list().length}list(){if(!this.prefix)return[];const i=[],o=this.storage.length;for(let n=0;n<o;n++){const r=this.storage.key(n);r!=null&&r.startsWith(this.prefix)&&i.push(r.replace(`${this.prefix}-`,""))}return i}}class J extends w{constructor(i){super(i,"localStorage")}}class Y extends w{constructor(i){super(i,"sessionStorage")}}const L=c?window.matchMedia("(prefers-color-scheme: dark)"):void 0;function z(){return c?L.matches:!1}const y=c?window.matchMedia("(prefers-color-scheme: light)"):void 0;function G(){return c?y.matches:!1}function ee(){if(z())return"dark";if(G())return"light"}const C=c?window.matchMedia("(orientation: portrait)"):void 0;function ie(){return c?C.matches:!1}const v=c?window.matchMedia("(orientation: landscape)"):void 0;function oe(){return c?v.matches:!1}class te{constructor(i){p(this,"mime");this.mime=i}getMimeType(i){try{return i.startsWith("data")&&i.includes("base64")?i.split(",")[0].replace(/data:(.*);base64/,"$1"):this.mime.getType(i)||""}catch{return""}}getExtensionFromMimeType(i){try{return this.mime.getExtension(i)||""}catch{return""}}getExtension(i){try{const o=this.getMimeType(i);return this.getExtensionFromMimeType(o)}catch{return""}}}function ne(e,i=!1){return e=e?String(e):"",e=e.replace(/[^\d]/g,""),e&&!i&&(e=parseInt(e)),String(e)}function re(e){if(e=String(e),!e)return"0.00";const i=e.split("."),o=i[0],n=i[1];return i.length===1?`${o}.00`:n.length===1?`${e}0`:Number(e).toFixed(2)}function ae(e,i){return String(e).length>i?String(e).slice(0,i)+" ...":String(e)}function _([e,...i]){return e?e.toUpperCase()+i.join(""):""}function le(e){return e?e.replace(/([A-Z])/g," $1").trim().split(" ").join("-").replace(/_/g,"-").toLowerCase():""}function O([e,...i]){return e?(e.toLowerCase()+i.join("")).replace(/[-_](\w)/g,(n,r)=>r?r.toUpperCase():""):""}function se(e){return e?_(O(e)):""}function ce(e){const i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);return e&&o.test(e)?e.replace(i,"\\$&"):e}function T(e){if(!Array.isArray(e)&&!M(e))return e;if(Array.isArray(e))return e.map(n=>T(n));const i=Object.keys(e).sort(),o={};return i.forEach(n=>{o[n]=T(e[n])}),o}function de({primaryKey:e,list:i}){const o=new Map;i.forEach(r=>{const l=String(r[e]);o.has(l)||o.set(l,r)});const n=[];return o.forEach(r=>{n.push(r)}),n}function ue(e,i){if(!M)return e;const o={};for(const n in e)h(e,n)&&!i.includes(n)&&(o[n]=e[n]);return o}function fe(e,i){const o=new Date(e),n=o.getFullYear(),r=("0"+(o.getMonth()+1)).slice(-2),l=("0"+o.getDate()).slice(-2),a=("0"+o.getHours()).slice(-2),u=("0"+o.getMinutes()).slice(-2),f=("0"+o.getSeconds()).slice(-2);return i?`${n}-${r}-${l}`:`${n}-${r}-${l} ${a}:${u}:${f}`}function Me(e,i={days:"天",hours:"小时",minutes:"分钟",seconds:"秒"}){const o=Math.floor(e/1e3),n=Math.floor(o/(3600*24)),r=Math.floor(o%(3600*24)/3600),l=Math.floor(o%3600/60),a=Math.floor(o%60),u=[];return n>0&&u.push(`${n} ${i.days}`),r>0&&u.push(`${r} ${i.hours}`),l>0&&u.push(`${l} ${i.minutes}`),a>0&&u.push(`${a} ${i.seconds}`),u.length===0?`0 ${i.seconds}`:u.join(" ")}function b(e){let i="";if(c){const{search:n}=window.location;i=n}if(typeof e=="string"&&e.startsWith("http")){const n=e.indexOf("?");i=n===-1?"":e.slice(n)}if(i.includes("#")){const n=i.indexOf("#");i=i.slice(0,n)}if(!i.length)return{};const o={};return i.slice(1).split("&").forEach(n=>{const[r,l]=n.split("=");o[r]=decodeURIComponent(l)}),o}function he(e){const i=b(e),o={};return Object.keys(i).forEach(r=>{r!=="path"&&(o[r]=i[r])}),{path:i.path||"",params:o}}function H(e,i){return b(i)[e]||""}function pe(e){return M(e)?Object.keys(e).map(i=>`${i}=${encodeURIComponent(String(e[i]))}`).join("&"):""}function A(e=0,i=100,o="round"){return Math[o](Math.random()*(i-e)+e)}function N(e=10){const i="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let o="",n=e;const r=i.length;for(;n--;)o+=i[Math.random()*r|0];return o}function ke(){const e=A(0,1);return[!0,!1][e]}function me(e){if(!Array.isArray(e))return e;for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1)),n=e[i];e[i]=e[o],e[o]=n}return e}function We(){const e=A(0,m.length-1);return m[e]}function Se({type:e,id:i,resource:o}){return new Promise((n,r)=>{if(!c||document.querySelector(`#${i}`)){r();return}function l(a){a.addEventListener("load",n),a.addEventListener("error",r),a.addEventListener("abort",r)}switch(e){case"js":{const a=document.createElement("script");a.id=i,a.async=!0,a.src=o,l(a),document.head.appendChild(a);break}case"css":{const a=document.createElement("link");a.id=i,a.rel="stylesheet",a.href=o,l(a),document.head.appendChild(a);break}case"style":{const a=document.createElement("style");a.id=i,l(a),document.head.appendChild(a),a.appendChild(document.createTextNode(o));break}}})}function Te(e,i){return new Promise((o,n)=>{if(!c){n();return}const l=H(e)||i||`jsonp_callback_${N().replace(/-/g,"_")}`;window[l]=I=>{try{delete window[l]}catch{window[l]=void 0}document.body.removeChild(f),o(I)};const a=e.includes("?")?"&":"?",u=e.includes("callback")?e:e+a+"callback="+l,f=document.createElement("script");f.src=u,f.onerror=n,document.body.appendChild(f)})}async function be(e){const i=[];for(const o in e)i.push(new Promise((n,r)=>{const l=new Image;l.onload=n,l.onerror=r,l.src=o}));return Promise.all(i)}function Ae(e){return new Promise(i=>{setTimeout(()=>{i()},e)})}function Ke(e,i=200){let o;return function(...n){const r=this;clearTimeout(o),o=setTimeout(function(){e.apply(r,n)},i)}}function ge(e,i){let o,n=0;return function(...r){const l=Date.now(),a=i-(l-n);a<=0?(clearTimeout(o),n=l,e.apply(this,r)):o||(o=setTimeout(()=>{n=Date.now(),o=void 0,e.apply(this,r)},a))}}function we(e){return/^1[3456789]\d{9}$/.test(String(e))}function Le(e){return/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)}function ze(e){return/https?:\/\/[\w-]+(\.[\w-]+){1,2}(\/[\w-]{3,6}){0,2}(\?[\w_]{4,6}=[\w_]{4,6}(&[\w_]{4,6}=[\w_]{4,6}){0,2})?/.test(e)}function ye(e){const i=/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,o=/^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;return i.test(e)||o.test(e)}function Ge(e){return/^([1-9]{1})(\d{15}|\d{16}|\d{18})$/.test(e)}function Ce(e){return/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e)}function ve(e){return/^([\da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^::([\da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:):([\da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){2}:([\da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){3}:([\da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^:((:[\da-fA-F]{1,4}){1,6}|:)$|^[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,5}|:)$|^([\da-fA-F]{1,4}:){2}((:[\da-fA-F]{1,4}){1,4}|:)$|^([\da-fA-F]{1,4}:){3}((:[\da-fA-F]{1,4}){1,3}|:)$|^([\da-fA-F]{1,4}:){4}((:[\da-fA-F]{1,4}){1,2}|:)$|^([\da-fA-F]{1,4}:){5}:([\da-fA-F]{1,4})?$|^([\da-fA-F]{1,4}:){6}:$/.test(e)}function F(){try{return process.env.NODE_ENV}catch{return}}const _e=F();function k(e){try{return process.env.NODE_ENV===e}catch{return!1}}const Oe=k("development"),He=k("test"),Ne=k("production");t.FileInfo=te,t.LocalStorage=J,t.SessionStorage=Y,t.camelCase=O,t.capitalize=_,t.checkRuntimeEnv=k,t.clipboard=d,t.darkMediaQuery=L,t.debounce=Ke,t.ellipsis=ae,t.escapeRegExp=ce,t.excludeFields=ue,t.extractNumber=ne,t.extractQueryInfo=he,t.formatAmount=re,t.formatDuration=Me,t.formatTime=fe,t.getBytes=j,t.getDataType=W,t.getPrefersColorScheme=ee,t.getQuery=H,t.getRuntimeEnv=F,t.getUserAgent=s,t.hasKey=h,t.isAndroid=x,t.isBaidu=V,t.isBankCard=Ge,t.isBrowser=c,t.isDark=z,t.isDesktop=E,t.isDevRuntime=Oe,t.isEmail=Le,t.isIOS=X,t.isIPv4=Ce,t.isIPv6=ve,t.isIdCard=ye,t.isLandscape=oe,t.isLight=G,t.isMob=we,t.isMobile=g,t.isObject=M,t.isPortrait=ie,t.isProdRuntime=Ne,t.isQQ=Q,t.isQQBrowser=U,t.isQzone=R,t.isServer=$,t.isTestRuntime=He,t.isUniApp=P,t.isUrl=ze,t.isWeibo=D,t.isWeixin=B,t.jsonp=Te,t.kebabCase=le,t.landscapeMediaQuery=v,t.lightMediaQuery=y,t.loadRes=Se,t.mobileDevicesRegExp=K,t.parseQuery=b,t.pascalCase=se,t.portraitMediaQuery=C,t.preloadImages=be,t.randomBoolean=ke,t.randomNumber=A,t.randomString=N,t.randomUserAgent=We,t.runtimeEnv=_e,t.shuffle=me,t.sleep=Ae,t.sortKeys=T,t.stringifyQuery=pe,t.throttle=ge,t.unique=de,t.userAgents=m,t.watchResize=q,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
{
"name": "@bassist/utils",
"version": "0.13.0",
"version": "0.14.0",
"description": "Opinionated collection of common JavaScript / TypeScript utils by @chengpeiquan .",

@@ -5,0 +5,0 @@ "author": "chengpeiquan <chengpeiquan@chengpeiquan.com>",

@@ -8,3 +8,3 @@ # @bassist/utils

<a href="https://www.npmjs.com/package/@bassist/utils" target="__blank">
<img src="https://img.shields.io/npm/dm/@bassist/utils?color=f43f5e&label=" />
<img src="https://img.shields.io/npm/dt/@bassist/utils?color=f43f5e&label=downloads" />
</a>

@@ -11,0 +11,0 @@ <a href="https://paka.dev/npm/@bassist/utils" target="__blank">

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc