utils-uniapp 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/array/index.js +1 -0
- package/lib/date/index.js +1 -0
- package/lib/fs/index.js +1 -0
- package/lib/getLocation/index.js +1 -0
- package/lib/index-f305d2b7.js +1 -0
- package/lib/index.js +1 -1
- package/lib/lodash/index.d.ts +159 -0
- package/lib/lodash/index.js +7 -0
- package/lib/validate/index.js +1 -0
- package/lib/wx/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"children",e=arguments.length>2?arguments[2]:void 0;return n.reduce((u,r,g)=>{const f=u.concat(r,Array.isArray(r[t])&&r[t].length?c(r[t],t,e):[]);return typeof e=="function"&&e(r,g),f},[])}function w(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children",u=null;return n.some((r,g)=>t(r,g)?(u=r,!0):u=w(r[e],t,e)),u}function T(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"children",e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$parent",u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"$index";return n.map((g,f)=>{const a={...g};return a[r]=f,a[e]=u,a[t]=T(g[t],t,e,a,r),a})}function j(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$parent";const e=[n];for(;n=n[t];)e.unshift(n);return e}function A(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children";return n.filter(t).map(u=>({...u,[e]:A(u[e],t,e)}))}function K(n,t,e,u){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:",",g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:n.length;if(arguments.length>6&&arguments[6]!==void 0?arguments[6]:!0){if(!Array.isArray(n))throw new TypeError("arg1:keys must be an Array!");if(!Array.isArray(t))throw new TypeError("arg2:arr must be an Array!");if(e&&typeof e!="function")throw new TypeError("arg3:callback must be a function!");if(u&&typeof u!="function")throw new TypeError("arg4:callbackAll must be a function!");if(r&&typeof r!="string")throw new TypeError("arg5:join must be a string!");if(g&&typeof g!="number")throw new TypeError("arg6:num must be a number!")}const a=g-1,l=n[a],h=[],o={},y=Array.isArray(l),d={};for(let m=t.length-1;m>=0;m--){const s=t[m];let i=s[l];u&&u(s,m),y&&(i=l.map(E=>s[E]).join(r)),o[i]?(o[i].push(s),e&&e(s,d[i])):(o[i]=[s],e&&e(s,d[i]={}))}const p=Object.keys(o);for(let m=p.length-1;m>=0;m--){const s=p[m],i={key:y?s.split(r):s,value:a!==0?K(n,o[s],e,null,r,a,!1):o[s]};e&&Object.assign(i,d[s]),h.push(i)}return h}function P(n,t){for(let e=n.length-1;e>=0;e--)t(n[e],e)}function b(n,t,e){let u=n[t];n[t]=n[e],n[e]=u}exports.exchangeArrP=b;exports.filterTree=A;exports.findTreeItem=w;exports.flatWithKey=c;exports.getTreePath=j;exports.groupBy=K;exports.reverseForEach=P;exports.treeItemSetParent=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function u(t){if(typeof t=="function")return t;if(typeof t!="string")throw new TypeError("formatter must be a string");return t==="date"?t="yyyy-MM-dd":t==="datetime"&&(t="yyyy-MM-dd HH:mm:ss"),r=>{const{yyyy:e,MM:n,dd:a,HH:s,mm:i,ss:o,ms:d}=r;return t.replaceAll("yyyy",e).replaceAll("MM",n).replaceAll("dd",a).replaceAll("HH",s).replaceAll("mm",i).replaceAll("ss",o).replaceAll("ms",d)}}function g(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"date",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;(typeof t=="number"||typeof t=="string")&&(t=new Date(t)),l=u(l);const e={year:t.getFullYear(),month:t.getMonth()+1,date:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()};e.yyyy=e.year.toString(),e.MM=e.month.toString(),e.dd=e.date.toString(),e.HH=e.hour.toString(),e.mm=e.minute.toString(),e.ss=e.second.toString(),e.ms=e.millisecond.toString();function n(a,s){e[a]=e[a].padStart(s,"0")}return r&&(n("yyyy",4),n("MM",2),n("dd",2),n("HH",2),n("mm",2),n("ss",2),n("ms",3)),l(e)}function m(t){return t.replace(/([0-9]{0,4})[^0-9]*([0-9]{0,2})[^0-9]*([0-9]{0,2}).*/,(l,r,e,n)=>{if(r=r.length==4?r+"-":r,e.length&&(e=e>12?"12":e==0?"01":e,e=e.padStart(2,"0")+"-"),n.length){const a=Number(r.slice(0,4)),s=Number(e.slice(0,2)),i=s==12?new Date(a+1,0,0).getDate():new Date(a,s,0).getDate();n=n.padStart(2,"0"),n=n>i?i.toString():n==0?"01":n}return r+e+n})}exports.dateFormat=m;exports.getDate=g;
|
package/lib/fs/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../index-e3f8a8ef.js"),I=require("../http/index.js");require("../object/index.js");const x=I.createDownloadFile(),u=uni.getFileSystemManager(),P=["ascii","base64","binary","hex","ucs2","ucs-2","utf16le","utf-16le","utf-8","utf8","latin1"];function A(){return`data:image/${arguments.length>0&&arguments[0]!==void 0?arguments[0]:"png"};base64,`}function y(r){let{filePath:n,encoding:t,sync:e,opts:i={}}=r;if(!P.includes(t))throw"编码不符合";if(e===!0)try{return u.readFileSync(n,t,i.position,i.length)}catch(a){return console.error(a),null}return new Promise(function(a,s){u.readFile({filePath:n,encoding:t,...i,success(o){a(o)},fail:s})})}y.sync=function(r){return y({...r,sync:!0})};function g(r){let{filePath:n,data:t,encoding:e,sync:i,opts:a}=r;if(e=e||"binary",!P.includes(e))throw"编码不符合";if(i===!0)try{return u.writeFileSync(n,t,e),{tempFilePath:n,unlink:()=>u.unlinkSync(n)}}catch(s){return console.error(s),null}return new Promise(function(s,o){u.writeFile({filePath:n,encoding:e,data:t,...a,success(f){if(f.errMsg!=="writeFile:ok")return o(new Error(f.errMsg));s({tempFilePath:n,unlink:()=>u.unlinkSync(n)})},fail:o})})}g.sync=function(r){return g({...r,sync:!0})};function M(r){let{arraybuffer:n,fileType:t,method:e,canvasId:i,width:a,height:s,ctx:o,sync:f}=r;if(typeof n!="object"||n.toString().slice(8,-1)!=="ArrayBuffer")return reject(new Error("ArrayBuffer must be a ArrayBuffer"));if(e=e||"canvas",t=t||"png",e==="fs"){const d=wx.env.USER_DATA_PATH+"/"+Date.now()+"."+t;return g({filePath:d,data:n,sync:f})}if(e==="canvas")return new Promise(function(d,l){if(!["canvas","fs"].includes(e))return l(new Error("method must be canvas | fs"));const F=`data:image/${t};base64,${uni.arrayBufferToBase64(n)}`;if(typeof i!="string")return l(new Error("canvasId must be a string [#id]"));const w=uni.createSelectorQuery();o&&w.in(o),w.select(i).fields({node:!0,size:!0}).exec(function(){var b=v._asyncToGenerator(function*(c){if(c=c[0],!c)return l(new Error("No canvas nodes were obtained"));a=a||c.width,s=s||c.height;const m=c.node;if(!m)return l(new Error("No canvas instances were obtained"));const p=m.getContext("2d"),h=m.createImage();yield new Promise(T=>{h.onload=T,h.src=F}).catch(l),p.clearRect(0,0,a,s),p.drawImage(h,0,0,a,s),uni.canvasToTempFilePath({canvas:m,width:a,height:s,fileType:t,success:d,fail:l})});return function(c){return b.apply(this,arguments)}}())})}const S=uni.canIUse("chooseMedia");function B(r){return r={count:1,...r},new Promise((n,t)=>{S?uni.chooseMedia({...r,mediaType:"image",sizeType:["original","compressed"],success(e){if(e.errMsg=="chooseMedia:ok"&&e.tempFiles[0]){const i=e.tempFiles.map(a=>a.tempFilePath);n(i)}else t(e.errMsg)},fail(e){t(e)}}):uni.chooseImage({count,success(e){n(e.tempFilePaths)},fail(e){t(e)}})})}function E(r){return new Promise((n,t)=>{x(r).then(e=>{uni.saveImageToPhotosAlbum({filePath:e.tempFilePath,success:i=>{uni.showToast({icon:"none",title:"保存成功"}),n(i)},fail:i=>{t(i)}})})})}exports.$fs=u;exports.chooseImg=B;exports.getArraybufferTempPath=M;exports.getImgBase64Prefix=A;exports.readFile=y;exports.saveImageToPhotosAlbum=E;exports.writeFile=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../index-e3f8a8ef.js");function g(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return new Promise((o,r)=>{uni.getLocation({altitude:!0,type:"gcj02",success:o,fail:function(i){n&&uni.getNetworkType({success:function(u){if(u.networkType!="none"){const e=getCurrentPages(),t=e[e.length-1];if(t.route.indexOf("errorPage")!=-1)return;uni.redirectTo({url:"/packageOther/pages/errorPage/errorPage"+c.getSearchStr({url:t.$page.fullPath,message:"定位失败",type:2})})}}}),r(i)}})})}function s(n){let{latitude:o,longitude:r,name:i="",address:u=""}=n;return new Promise((e,t)=>{uni.openLocation({latitude:Number(o),longitude:Number(r),name:i,address:u,success:e,fail:function(a){uni.showToast({icon:"none",title:a.errMsg}),t(a)}})})}exports.getLocation=g;exports.openLocation=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l={userLocation:"scope.userLocation",userFuzzyLocation:"scope.userFuzzyLocation",userLocationBackground:"scope.userLocationBackground",record:"scope.record",camera:"scope.camera",bluetooth:"scope.bluetooth",writePhotosAlbum:"scope.writePhotosAlbum",addPhoneContact:"scope.addPhoneContact",addPhoneCalendar:"scope.addPhoneCalendar",werun:"scope.werun",address:"scope.address",invoiceTitle:"scope.invoiceTitle",invoice:"scope.invoice",userInfo:"scope.userInfo"};function c(){let{withSubscriptions:e,scope:o}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e=e||!1,o=l[o]||["scope."+o],new Promise(function(t,n){wx.getSetting({withSubscriptions:e,success(i){if(i.authSetting[o]===!1)return wx.openSetting({withSubscriptions:e,success(s){s.authSetting[o]?t(s):n(s)},fail:n});wx.authorize({scope:o,success:t,fail:n})},fail:n})})}function a(e){let{type:o="file",format:t="png"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((n,i)=>{uni.createSelectorQuery().select(e).node().exec(s=>{s[0].node.takeSnapshot({type:o,format:t,success:n,fail:i})})})}function u(e){return new Promise((o,t)=>{uni.requestPayment({provider:"wxpay",timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.sign,success:o,fail(n){t(n),n.errMsg!=="requestPayment:fail cancel"&&uni.showToast({title:"支付失败",icon:"none",duration:2e3})}})})}function p(e){return new Promise((o,t)=>{wx.requestSubscribeMessage({...e,success(n){const i=[],s=[];for(let r in n)n[r]==="accept"?i.push(r):n[r]==="reject"&&s.push(r);o({allowTemplateIds:i,rejectTemplateIds:s})},fail:t})})}function g(e){return new Promise((o,t)=>{WeixinJSBridge&&WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.sign,timeStamp:e.timeStamp},function(n){n.err_msg==="get_brand_wcpay_request:ok"?o(n):n.err_msg==="get_brand_wcpay_request:cancel"?t(n):(t(n),uni.showToast({title:"支付失败",icon:"none",duration:2e3}))})})}const d=Object.freeze(Object.defineProperty({__proto__:null,authorize:c,subscribeMessage:p,takeSnapshot:a,wxPayInMiniPrograms:u,wxPayInWxBrowser:g},Symbol.toStringTag,{value:"Module"}));exports.authorize=c;exports.index=d;exports.subscribeMessage=p;exports.takeSnapshot=a;exports.wxPayInMiniPrograms=u;exports.wxPayInWxBrowser=g;
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-e3f8a8ef.js"),f=require("./http/index.js"),A=require("./object/index.js");function v(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"children",n=arguments.length>2?arguments[2]:void 0;return e.reduce((t,o,a)=>{const s=t.concat(o,Array.isArray(o[r])&&o[r].length?v(o[r],r,n):[]);return typeof n=="function"&&n(o,a),s},[])}function x(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children",t=null;return e.some((o,a)=>r(o,a)?(t=o,!0):t=x(o[n],r,n)),t}function F(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"children",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$parent",t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"$index";return e.map((a,s)=>{const i={...a};return i[o]=s,i[n]=t,i[r]=F(a[r],r,n,i,o),i})}function D(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$parent";const n=[e];for(;e=e[r];)n.unshift(e);return n}function I(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children";return e.filter(r).map(t=>({...t,[n]:I(t[n],r,n)}))}function M(e,r,n,t){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:",",a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e.length;if(arguments.length>6&&arguments[6]!==void 0?arguments[6]:!0){if(!Array.isArray(e))throw new TypeError("arg1:keys must be an Array!");if(!Array.isArray(r))throw new TypeError("arg2:arr must be an Array!");if(n&&typeof n!="function")throw new TypeError("arg3:callback must be a function!");if(t&&typeof t!="function")throw new TypeError("arg4:callbackAll must be a function!");if(o&&typeof o!="string")throw new TypeError("arg5:join must be a string!");if(a&&typeof a!="number")throw new TypeError("arg6:num must be a number!")}const i=a-1,d=e[i],p=[],l={},P=Array.isArray(d),y={};for(let g=r.length-1;g>=0;g--){const c=r[g];let m=c[d];t&&t(c,g),P&&(m=d.map(w=>c[w]).join(o)),l[m]?(l[m].push(c),n&&n(c,y[m])):(l[m]=[c],n&&n(c,y[m]={}))}const S=Object.keys(l);for(let g=S.length-1;g>=0;g--){const c=S[g],m={key:P?c.split(o):c,value:i!==0?M(e,l[c],n,null,o,i,!1):l[c]};n&&Object.assign(m,y[c]),p.push(m)}return p}function E(e,r){for(let n=e.length-1;n>=0;n--)r(e[n],n)}function L(e,r,n){let t=e[r];e[r]=e[n],e[n]=t}function R(e){if(typeof e=="function")return e;if(typeof e!="string")throw new TypeError("formatter must be a string");return e==="date"?e="yyyy-MM-dd":e==="datetime"&&(e="yyyy-MM-dd HH:mm:ss"),n=>{const{yyyy:t,MM:o,dd:a,HH:s,mm:i,ss:d,ms:p}=n;return e.replaceAll("yyyy",t).replaceAll("MM",o).replaceAll("dd",a).replaceAll("HH",s).replaceAll("mm",i).replaceAll("ss",d).replaceAll("ms",p)}}function k(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"date",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;(typeof e=="number"||typeof e=="string")&&(e=new Date(e)),r=R(r);const t={year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()};t.yyyy=t.year.toString(),t.MM=t.month.toString(),t.dd=t.date.toString(),t.HH=t.hour.toString(),t.mm=t.minute.toString(),t.ss=t.second.toString(),t.ms=t.millisecond.toString();function o(a,s){t[a]=t[a].padStart(s,"0")}return n&&(o("yyyy",4),o("MM",2),o("dd",2),o("HH",2),o("mm",2),o("ss",2),o("ms",3)),r(t)}function z(e){return e.replace(/([0-9]{0,4})[^0-9]*([0-9]{0,2})[^0-9]*([0-9]{0,2}).*/,(r,n,t,o)=>{if(n=n.length==4?n+"-":n,t.length&&(t=t>12?"12":t==0?"01":t,t=t.padStart(2,"0")+"-"),o.length){const a=Number(n.slice(0,4)),s=Number(t.slice(0,2)),i=s==12?new Date(a+1,0,0).getDate():new Date(a,s,0).getDate();o=o.padStart(2,"0"),o=o>i?i.toString():o==0?"01":o}return n+t+o})}const q=f.createDownloadFile(),h=uni.getFileSystemManager(),C=["ascii","base64","binary","hex","ucs2","ucs-2","utf16le","utf-16le","utf-8","utf8","latin1"];function B(){return`data:image/${arguments.length>0&&arguments[0]!==void 0?arguments[0]:"png"};base64,`}function b(e){let{filePath:r,encoding:n,sync:t,opts:o={}}=e;if(!C.includes(n))throw"编码不符合";if(t===!0)try{return h.readFileSync(r,n,o.position,o.length)}catch(a){return console.error(a),null}return new Promise(function(a,s){h.readFile({filePath:r,encoding:n,...o,success(i){a(i)},fail:s})})}b.sync=function(e){return b({...e,sync:!0})};function T(e){let{filePath:r,data:n,encoding:t,sync:o,opts:a}=e;if(t=t||"binary",!C.includes(t))throw"编码不符合";if(o===!0)try{return h.writeFileSync(r,n,t),{tempFilePath:r,unlink:()=>h.unlinkSync(r)}}catch(s){return console.error(s),null}return new Promise(function(s,i){h.writeFile({filePath:r,encoding:t,data:n,...a,success(d){if(d.errMsg!=="writeFile:ok")return i(new Error(d.errMsg));s({tempFilePath:r,unlink:()=>h.unlinkSync(r)})},fail:i})})}T.sync=function(e){return T({...e,sync:!0})};function O(e){let{arraybuffer:r,fileType:n,method:t,canvasId:o,width:a,height:s,ctx:i,sync:d}=e;if(typeof r!="object"||r.toString().slice(8,-1)!=="ArrayBuffer")return reject(new Error("ArrayBuffer must be a ArrayBuffer"));if(t=t||"canvas",n=n||"png",t==="fs"){const p=wx.env.USER_DATA_PATH+"/"+Date.now()+"."+n;return T({filePath:p,data:r,sync:d})}if(t==="canvas")return new Promise(function(p,l){if(!["canvas","fs"].includes(t))return l(new Error("method must be canvas | fs"));const P=`data:image/${n};base64,${uni.arrayBufferToBase64(r)}`;if(typeof o!="string")return l(new Error("canvasId must be a string [#id]"));const y=uni.createSelectorQuery();i&&y.in(i),y.select(o).fields({node:!0,size:!0}).exec(function(){var S=u._asyncToGenerator(function*(g){if(g=g[0],!g)return l(new Error("No canvas nodes were obtained"));a=a||g.width,s=s||g.height;const c=g.node;if(!c)return l(new Error("No canvas instances were obtained"));const m=c.getContext("2d"),w=c.createImage();yield new Promise(_=>{w.onload=_,w.src=P}).catch(l),m.clearRect(0,0,a,s),m.drawImage(w,0,0,a,s),uni.canvasToTempFilePath({canvas:c,width:a,height:s,fileType:n,success:p,fail:l})});return function(g){return S.apply(this,arguments)}}())})}const H=uni.canIUse("chooseMedia");function N(e){return e={count:1,...e},new Promise((r,n)=>{H?uni.chooseMedia({...e,mediaType:"image",sizeType:["original","compressed"],success(t){if(t.errMsg=="chooseMedia:ok"&&t.tempFiles[0]){const o=t.tempFiles.map(a=>a.tempFilePath);r(o)}else n(t.errMsg)},fail(t){n(t)}}):uni.chooseImage({count,success(t){r(t.tempFilePaths)},fail(t){n(t)}})})}function U(e){return new Promise((r,n)=>{q(e).then(t=>{uni.saveImageToPhotosAlbum({filePath:t.tempFilePath,success:o=>{uni.showToast({icon:"none",title:"保存成功"}),r(o)},fail:o=>{n(o)}})})})}function K(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return new Promise((r,n)=>{uni.getLocation({altitude:!0,type:"gcj02",success:r,fail:function(t){e&&uni.getNetworkType({success:function(o){if(o.networkType!="none"){const a=getCurrentPages(),s=a[a.length-1];if(s.route.indexOf("errorPage")!=-1)return;uni.redirectTo({url:"/packageOther/pages/errorPage/errorPage"+u.getSearchStr({url:s.$page.fullPath,message:"定位失败",type:2})})}}}),n(t)}})})}function W(e){let{latitude:r,longitude:n,name:t="",address:o=""}=e;return new Promise((a,s)=>{uni.openLocation({latitude:Number(r),longitude:Number(n),name:t,address:o,success:a,fail:function(i){uni.showToast({icon:"none",title:i.errMsg}),s(i)}})})}function Z(e){return/^(https?:|mailto:|tel:)/.test(e)}function j(e){return/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e)}function Y(e){return/^\d{4}-\d{1,2}-\d{1,2}/.test(e)}function J(e){return/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e)}function Q(e){return/^([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]$|^([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}$/.test(e)}function V(e){return/[1-9]\d{5}(?!\d)/.test(e)}const G={userLocation:"scope.userLocation",userFuzzyLocation:"scope.userFuzzyLocation",userLocationBackground:"scope.userLocationBackground",record:"scope.record",camera:"scope.camera",bluetooth:"scope.bluetooth",writePhotosAlbum:"scope.writePhotosAlbum",addPhoneContact:"scope.addPhoneContact",addPhoneCalendar:"scope.addPhoneCalendar",werun:"scope.werun",address:"scope.address",invoiceTitle:"scope.invoiceTitle",invoice:"scope.invoice",userInfo:"scope.userInfo"};function X(){let{withSubscriptions:e,scope:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e=e||!1,r=G[r]||["scope."+r],new Promise(function(n,t){wx.getSetting({withSubscriptions:e,success(o){if(o.authSetting[r]===!1)return wx.openSetting({withSubscriptions:e,success(a){a.authSetting[r]?n(a):t(a)},fail:t});wx.authorize({scope:r,success:n,fail:t})},fail:t})})}function $(e){let{type:r="file",format:n="png"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((t,o)=>{uni.createSelectorQuery().select(e).node().exec(a=>{a[0].node.takeSnapshot({type:r,format:n,success:t,fail:o})})})}function ee(e){return new Promise((r,n)=>{uni.requestPayment({provider:"wxpay",timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.sign,success:r,fail(t){n(t),t.errMsg!=="requestPayment:fail cancel"&&uni.showToast({title:"支付失败",icon:"none",duration:2e3})}})})}function te(e){return new Promise((r,n)=>{wx.requestSubscribeMessage({...e,success(t){const o=[],a=[];for(let s in t)t[s]==="accept"?o.push(s):t[s]==="reject"&&a.push(s);r({allowTemplateIds:o,rejectTemplateIds:a})},fail:n})})}function ne(e){return new Promise((r,n)=>{WeixinJSBridge&&WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.sign,timeStamp:e.timeStamp},function(t){t.err_msg==="get_brand_wcpay_request:ok"?r(t):t.err_msg==="get_brand_wcpay_request:cancel"?n(t):(n(t),uni.showToast({title:"支付失败",icon:"none",duration:2e3}))})})}const re=Object.freeze(Object.defineProperty({__proto__:null,authorize:X,subscribeMessage:te,takeSnapshot:$,wxPayInMiniPrograms:ee,wxPayInWxBrowser:ne},Symbol.toStringTag,{value:"Module"}));exports.compareVersion=u.compareVersion;exports.compose=u.compose;exports.composeAsync=u.composeAsync;exports.debounce=u.debounce;exports.debouncePromise=u.debouncePromise;exports.decodeURIParams=u.decodeURIParams;exports.encodeURIParams=u.encodeURIParams;exports.getCache=u.getCache;exports.getOnLoadParams=u.getOnLoadParams;exports.getPascalCase=u.getPascalCase;exports.getRandom=u.getRandom;exports.getRandomStr=u.getRandomStr;exports.getSearchParams=u.getSearchParams;exports.getSearchStr=u.getSearchStr;exports.pipe=u.pipe;exports.pipeAsync=u.pipeAsync;exports.randomColor=u.randomColor;exports.removeCache=u.removeCache;exports.renewCache=u.renewCache;exports.setCache=u.setCache;exports.throttle=u.throttle;exports.CONTENT_TYPES=f.CONTENT_TYPES;exports.CancelToken=f.CancelToken;exports.createDownloadFile=f.createDownloadFile;exports.createRequest=f.createRequest;exports.createUploadFile=f.createUploadFile;exports.endLoading=f.endLoading;exports.promisifyRequest=f.promisifyRequest;exports.startLoading=f.startLoading;exports.cloneDeepWithDescriptors=A.cloneDeepWithDescriptors;exports.getRawType=A.getRawType;exports.hasOwnProperty=A.hasOwnProperty;exports.$fs=h;exports.chooseImg=N;exports.dateFormat=z;exports.exchangeArrP=L;exports.filterTree=I;exports.findTreeItem=x;exports.flatWithKey=v;exports.getArraybufferTempPath=O;exports.getDate=k;exports.getImgBase64Prefix=B;exports.getLocation=K;exports.getTreePath=D;exports.groupBy=M;exports.isExternal=Z;exports.openLocation=W;exports.readFile=b;exports.reverseForEach=E;exports.saveImageToPhotosAlbum=U;exports.treeItemSetParent=F;exports.validDate=Y;exports.validIDCard=Q;exports.validPhone=J;exports.validPostalCode=V;exports.validURL=j;exports.writeFile=T;exports.wx=re;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./array/index.js"),n=require("./date/index.js"),r=require("./fs/index.js"),c=require("./getLocation/index.js"),t=require("./http/index.js"),e=require("./index-e3f8a8ef.js"),i=require("./object/index.js"),o=require("./validate/index.js"),s=require("./index-f305d2b7.js");exports.exchangeArrP=a.exchangeArrP;exports.filterTree=a.filterTree;exports.findTreeItem=a.findTreeItem;exports.flatWithKey=a.flatWithKey;exports.getTreePath=a.getTreePath;exports.groupBy=a.groupBy;exports.reverseForEach=a.reverseForEach;exports.treeItemSetParent=a.treeItemSetParent;exports.dateFormat=n.dateFormat;exports.getDate=n.getDate;exports.$fs=r.$fs;exports.chooseImg=r.chooseImg;exports.getArraybufferTempPath=r.getArraybufferTempPath;exports.getImgBase64Prefix=r.getImgBase64Prefix;exports.readFile=r.readFile;exports.saveImageToPhotosAlbum=r.saveImageToPhotosAlbum;exports.writeFile=r.writeFile;exports.getLocation=c.getLocation;exports.openLocation=c.openLocation;exports.CONTENT_TYPES=t.CONTENT_TYPES;exports.CancelToken=t.CancelToken;exports.createDownloadFile=t.createDownloadFile;exports.createRequest=t.createRequest;exports.createUploadFile=t.createUploadFile;exports.endLoading=t.endLoading;exports.promisifyRequest=t.promisifyRequest;exports.startLoading=t.startLoading;exports.compareVersion=e.compareVersion;exports.compose=e.compose;exports.composeAsync=e.composeAsync;exports.debounce=e.debounce;exports.debouncePromise=e.debouncePromise;exports.decodeURIParams=e.decodeURIParams;exports.encodeURIParams=e.encodeURIParams;exports.getCache=e.getCache;exports.getOnLoadParams=e.getOnLoadParams;exports.getPascalCase=e.getPascalCase;exports.getRandom=e.getRandom;exports.getRandomStr=e.getRandomStr;exports.getSearchParams=e.getSearchParams;exports.getSearchStr=e.getSearchStr;exports.pipe=e.pipe;exports.pipeAsync=e.pipeAsync;exports.randomColor=e.randomColor;exports.removeCache=e.removeCache;exports.renewCache=e.renewCache;exports.setCache=e.setCache;exports.throttle=e.throttle;exports.cloneDeepWithDescriptors=i.cloneDeepWithDescriptors;exports.getRawType=i.getRawType;exports.hasOwnProperty=i.hasOwnProperty;exports.isExternal=o.isExternal;exports.validDate=o.validDate;exports.validIDCard=o.validIDCard;exports.validPhone=o.validPhone;exports.validPostalCode=o.validPostalCode;exports.validURL=o.validURL;exports.wx=s.index;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lodash定制构建(内置decimal.js,精确计算类运算经Decimal处理,返回number)
|
|
3
|
+
* 注:算术函数(add/subtract/multiply/divide及其By变体)会忽略除0外的假值
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** 数值(支持数字与数字字符串) */
|
|
7
|
+
export type Numeric = number | string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 任意精度加法:add(0.1, 0.2) -> 0.3
|
|
11
|
+
* @param { Numeric[] } values 参与运算的数值
|
|
12
|
+
*/
|
|
13
|
+
export function add(...values: Numeric[]): number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 任意精度减法:subtract(0.3, 0.1) -> 0.2
|
|
17
|
+
* @param { Numeric[] } values 参与运算的数值
|
|
18
|
+
*/
|
|
19
|
+
export function subtract(...values: Numeric[]): number;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 任意精度乘法:multiply(0.1, 3) -> 0.03
|
|
23
|
+
* @param { Numeric[] } values 参与运算的数值
|
|
24
|
+
*/
|
|
25
|
+
export function multiply(...values: Numeric[]): number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 任意精度除法:divide(0.3, 0.1) -> 3
|
|
29
|
+
* @param { Numeric[] } values 参与运算的数值
|
|
30
|
+
*/
|
|
31
|
+
export function divide(...values: Numeric[]): number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 求和(可按属性聚合)
|
|
35
|
+
* @param { Numeric[] } values 数值数组
|
|
36
|
+
*/
|
|
37
|
+
export function addBy(values: Numeric[]): number;
|
|
38
|
+
/**
|
|
39
|
+
* 求和:按属性聚合,addBy([{n: 1}, {n: 2}], 'n') -> 3
|
|
40
|
+
* @param { T[] } values 对象数组
|
|
41
|
+
* @param { string } key 属性名
|
|
42
|
+
*/
|
|
43
|
+
export function addBy<T extends Record<string, any>>(values: T[], key: string): number;
|
|
44
|
+
/**
|
|
45
|
+
* 求和:按多属性聚合,addBy([{a: 1, b: 2}, {a: 3, b: 4}], ['a', 'b']) -> {a: 4, b: 6}
|
|
46
|
+
* @param { T[] } values 对象数组
|
|
47
|
+
* @param { string[] } keys 属性名数组
|
|
48
|
+
*/
|
|
49
|
+
export function addBy<T extends Record<string, any>>(values: T[], keys: string[]): Record<string, number>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 求积(可按属性聚合)
|
|
53
|
+
* @param { Numeric[] } values 数值数组
|
|
54
|
+
*/
|
|
55
|
+
export function multiplyBy(values: Numeric[]): number;
|
|
56
|
+
/**
|
|
57
|
+
* 求积:按属性聚合
|
|
58
|
+
* @param { T[] } values 对象数组
|
|
59
|
+
* @param { string } key 属性名
|
|
60
|
+
*/
|
|
61
|
+
export function multiplyBy<T extends Record<string, any>>(values: T[], key: string): number;
|
|
62
|
+
/**
|
|
63
|
+
* 求积:按多属性聚合,返回各属性乘积
|
|
64
|
+
* @param { T[] } values 对象数组
|
|
65
|
+
* @param { string[] } keys 属性名数组
|
|
66
|
+
*/
|
|
67
|
+
export function multiplyBy<T extends Record<string, any>>(values: T[], keys: string[]): Record<string, number>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 浅拷贝
|
|
71
|
+
* @param { T } value 目标值
|
|
72
|
+
*/
|
|
73
|
+
export function clone<T>(value: T): T;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 浅拷贝(自定义拷贝逻辑,返回undefined时使用默认拷贝)
|
|
77
|
+
* @param { T } value 目标值
|
|
78
|
+
* @param { function } customizer 自定义函数
|
|
79
|
+
*/
|
|
80
|
+
export function cloneWith<T, TResult = T>(value: T, customizer?: (value: any, key: any, object: any, stack: any) => TResult): TResult;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 深拷贝
|
|
84
|
+
* @param { T } value 目标值
|
|
85
|
+
*/
|
|
86
|
+
export function cloneDeep<T>(value: T): T;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 深拷贝(自定义拷贝逻辑,返回undefined时使用默认拷贝)
|
|
90
|
+
* @param { T } value 目标值
|
|
91
|
+
* @param { function } customizer 自定义函数
|
|
92
|
+
*/
|
|
93
|
+
export function cloneDeepWith<T, TResult = T>(value: T, customizer?: (value: any, key: any, object: any, stack: any) => TResult): TResult;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 检查是否为空值(null、''、[]、{}等返回true)
|
|
97
|
+
* @param { any } value 目标值
|
|
98
|
+
*/
|
|
99
|
+
export function isEmpty(value?: any): boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 检查是否为普通对象({}或new Object()创建)
|
|
103
|
+
* @param { any } value 目标值
|
|
104
|
+
*/
|
|
105
|
+
export function isPlainObject(value: any): value is Record<string, any>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 数组分块
|
|
109
|
+
* @param { T[] } array 数组
|
|
110
|
+
* @param { number } size 每块长度,默认1
|
|
111
|
+
*/
|
|
112
|
+
export function chunk<T>(array: ArrayLike<T> | null | undefined, size?: number): T[][];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* 对象剔除指定属性
|
|
116
|
+
* @param { T } object 目标对象
|
|
117
|
+
* @param { Array<string | string[]> } paths 属性路径
|
|
118
|
+
*/
|
|
119
|
+
export function omit<T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<K | string>): Omit<T, K>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 对象剔除满足谓词的属性
|
|
123
|
+
* @param { T } object 目标对象
|
|
124
|
+
* @param { function } predicate 谓词函数(value, key),默认恒真
|
|
125
|
+
*/
|
|
126
|
+
export function omitBy<T extends object>(object: T | null | undefined, predicate?: (value: T[keyof T], key: keyof T) => boolean): Partial<T>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 对象挑选指定属性
|
|
130
|
+
* @param { T } object 目标对象
|
|
131
|
+
* @param { Array<string | string[]> } paths 属性路径
|
|
132
|
+
*/
|
|
133
|
+
export function pick<T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<K | string>): Pick<T, K>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* 对象挑选满足谓词的属性
|
|
137
|
+
* @param { T } object 目标对象
|
|
138
|
+
* @param { function } predicate 谓词函数(value, key),默认恒真
|
|
139
|
+
*/
|
|
140
|
+
export function pickBy<T extends object>(object: T | null | undefined, predicate?: (value: T[keyof T], key: keyof T) => boolean): Partial<T>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* 排序(支持多字段与升降序)
|
|
144
|
+
* @param { T[] } collection 数组
|
|
145
|
+
* @param { Array<function | string> | function | string } iteratees 排序依据(迭代函数或属性名,单个或数组),默认[value => value]
|
|
146
|
+
* @param { string[] | string } orders 排序方向('asc'|'desc',单个或数组),默认'asc'
|
|
147
|
+
*/
|
|
148
|
+
export function orderBy<T>(
|
|
149
|
+
collection: ArrayLike<T> | null | undefined,
|
|
150
|
+
iteratees?: Array<((value: T) => any) | string> | ((value: T) => any) | string,
|
|
151
|
+
orders?: string[] | string
|
|
152
|
+
): T[];
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* 随机抽样n个元素
|
|
156
|
+
* @param { T[] } collection 数组
|
|
157
|
+
* @param { number } n 抽样数量,默认1
|
|
158
|
+
*/
|
|
159
|
+
export function sampleSize<T>(collection: ArrayLike<T> | null | undefined, n?: number): T[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*!
|
|
2
|
+
* decimal.js v10.4.3
|
|
3
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
4
|
+
* https://github.com/MikeMcl/decimal.js
|
|
5
|
+
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
6
|
+
* MIT Licence
|
|
7
|
+
*/var qt,k,on=9e15,W=1e9,ce="0123456789abcdef",Dn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",qn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ae={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-on,maxE:on,crypto:!1},m=!0,In="[DecimalError] ",G=In+"Invalid argument: ",Tt=In+"Precision limit exceeded",Ut=In+"crypto unavailable",It="[object Decimal]",D=Math.floor,S=Math.pow,_r=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Nr=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Or=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ue=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,z=1e7,w=7,xr=Dn.length-1,fe=qn.length-1,v={toStringTag:It};function P(n){var e,t,r,o=n.length-1,i="",u=n[0];if(o>0){for(i+=u,e=1;e<o;e++)r=n[e]+"",(t=w-r.length)&&(i+=H(t)),i+=r;u=n[e],(t=w-(r=u+"").length)&&(i+=H(t))}else if(u===0)return"0";for(;u%10==0;)u/=10;return i+u}function q(n,e,t){if(n!==~~n||n<e||n>t)throw Error(G+n)}function gn(n,e,t,r){var o,i,u,s;for(i=n[0];i>=10;i/=10)--e;return--e<0?(e+=w,o=0):(o=Math.ceil((e+1)/w),e%=w),i=S(10,w-e),s=n[o]%i|0,r==null?e<3?(e==0?s=s/100|0:e==1&&(s=s/10|0),u=t<4&&s==99999||t>3&&s==49999||s==5e4||s==0):u=(t<4&&s+1==i||t>3&&s+1==i/2)&&(n[o+1]/i/100|0)==S(10,e-2)-1||(s==i/2||s==0)&&(n[o+1]/i/100|0)==0:e<4?(e==0?s=s/1e3|0:e==1?s=s/100|0:e==2&&(s=s/10|0),u=(r||t<4)&&s==9999||!r&&t>3&&s==4999):u=((r||t<4)&&s+1==i||!r&&t>3&&s+1==i/2)&&(n[o+1]/i/1e3|0)==S(10,e-3)-1,u}function Sn(n,e,t){for(var r,o,i=[0],u=0,s=n.length;u<s;){for(o=i.length;o--;)i[o]*=e;for(i[0]+=ce.indexOf(n.charAt(u++)),r=0;r<i.length;r++)i[r]>t-1&&(i[r+1]===void 0&&(i[r+1]=0),i[r+1]+=i[r]/t|0,i[r]%=t)}return i.reverse()}v.absoluteValue=v.abs=function(){var n=new this.constructor(this);return n.s<0&&(n.s=1),g(n)},v.ceil=function(){return g(new this.constructor(this),this.e+1,2)},v.clampedTo=v.clamp=function(n,e){var t=this,r=t.constructor;if(n=new r(n),e=new r(e),!n.s||!e.s)return new r(NaN);if(n.gt(e))throw Error(G+e);return t.cmp(n)<0?n:t.cmp(e)>0?e:new r(t)},v.comparedTo=v.cmp=function(n){var e,t,r,o,i=this,u=i.d,s=(n=new i.constructor(n)).d,c=i.s,a=n.s;if(!u||!s)return c&&a?c!==a?c:u===s?0:!u^c<0?1:-1:NaN;if(!u[0]||!s[0])return u[0]?c:s[0]?-a:0;if(c!==a)return c;if(i.e!==n.e)return i.e>n.e^c<0?1:-1;for(e=0,t=(r=u.length)<(o=s.length)?r:o;e<t;++e)if(u[e]!==s[e])return u[e]>s[e]^c<0?1:-1;return r===o?0:r>o^c<0?1:-1},v.cosine=v.cos=function(){var n,e,t=this,r=t.constructor;return t.d?t.d[0]?(n=r.precision,e=r.rounding,r.precision=n+Math.max(t.e,t.sd())+w,r.rounding=1,t=function(o,i){var u,s,c;if(i.isZero())return i;s=i.d.length,s<32?c=(1/An(4,u=Math.ceil(s/3))).toString():(u=16,c="2.3283064365386962890625e-10"),o.precision+=u,i=Y(o,1,i.times(c),new o(1));for(var a=u;a--;){var f=i.times(i);i=f.times(f).minus(f).times(8).plus(1)}return o.precision-=u,i}(r,Be(r,t)),r.precision=n,r.rounding=e,g(k==2||k==3?t.neg():t,n,e,!0)):new r(1):new r(NaN)},v.cubeRoot=v.cbrt=function(){var n,e,t,r,o,i,u,s,c,a,f=this,h=f.constructor;if(!f.isFinite()||f.isZero())return new h(f);for(m=!1,(i=f.s*S(f.s*f,1/3))&&Math.abs(i)!=1/0?r=new h(i.toString()):(t=P(f.d),(i=((n=f.e)-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=S(t,1/3),n=D((n+1)/3)-(n%3==(n<0?-1:2)),(r=new h(t=i==1/0?"5e"+n:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+n)).s=f.s),u=(n=h.precision)+3;;)if(a=(c=(s=r).times(s).times(s)).plus(f),r=N(a.plus(f).times(s),a.plus(c),u+2,1),P(s.d).slice(0,u)===(t=P(r.d)).slice(0,u)){if((t=t.slice(u-3,u+1))!="9999"&&(o||t!="4999")){+t&&(+t.slice(1)||t.charAt(0)!="5")||(g(r,n+1,1),e=!r.times(r).times(r).eq(f));break}if(!o&&(g(s,n+1,0),s.times(s).times(s).eq(f))){r=s;break}u+=4,o=1}return m=!0,g(r,n,h.rounding,e)},v.decimalPlaces=v.dp=function(){var n,e=this.d,t=NaN;if(e){if(t=((n=e.length-1)-D(this.e/w))*w,n=e[n])for(;n%10==0;n/=10)t--;t<0&&(t=0)}return t},v.dividedBy=v.div=function(n){return N(this,new this.constructor(n))},v.dividedToIntegerBy=v.divToInt=function(n){var e=this.constructor;return g(N(this,new e(n),0,1,1),e.precision,e.rounding)},v.equals=v.eq=function(n){return this.cmp(n)===0},v.floor=function(){return g(new this.constructor(this),this.e+1,3)},v.greaterThan=v.gt=function(n){return this.cmp(n)>0},v.greaterThanOrEqualTo=v.gte=function(n){var e=this.cmp(n);return e==1||e===0},v.hyperbolicCosine=v.cosh=function(){var n,e,t,r,o,i=this,u=i.constructor,s=new u(1);if(!i.isFinite())return new u(i.s?1/0:NaN);if(i.isZero())return s;t=u.precision,r=u.rounding,u.precision=t+Math.max(i.e,i.sd())+4,u.rounding=1,(o=i.d.length)<32?e=(1/An(4,n=Math.ceil(o/3))).toString():(n=16,e="2.3283064365386962890625e-10"),i=Y(u,1,i.times(e),new u(1),!0);for(var c,a=n,f=new u(8);a--;)c=i.times(i),i=s.minus(c.times(f.minus(c.times(f))));return g(i,u.precision=t,u.rounding=r,!0)},v.hyperbolicSine=v.sinh=function(){var n,e,t,r,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(e=i.precision,t=i.rounding,i.precision=e+Math.max(o.e,o.sd())+4,i.rounding=1,(r=o.d.length)<3)o=Y(i,2,o,o,!0);else{n=(n=1.4*Math.sqrt(r))>16?16:0|n,o=Y(i,2,o=o.times(1/An(5,n)),o,!0);for(var u,s=new i(5),c=new i(16),a=new i(20);n--;)u=o.times(o),o=o.times(s.plus(u.times(c.times(u).plus(a))))}return i.precision=e,i.rounding=t,g(o,e,t,!0)},v.hyperbolicTangent=v.tanh=function(){var n,e,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(n=r.precision,e=r.rounding,r.precision=n+7,r.rounding=1,N(t.sinh(),t.cosh(),r.precision=n,r.rounding=e)):new r(t.s)},v.inverseCosine=v.acos=function(){var n,e=this,t=e.constructor,r=e.abs().cmp(1),o=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?B(t,o,i):new t(0):new t(NaN):e.isZero()?B(t,o+4,i).times(.5):(t.precision=o+6,t.rounding=1,e=e.asin(),n=B(t,o+4,i).times(.5),t.precision=o,t.rounding=i,n.minus(e))},v.inverseHyperbolicCosine=v.acosh=function(){var n,e,t=this,r=t.constructor;return t.lte(1)?new r(t.eq(1)?0:NaN):t.isFinite()?(n=r.precision,e=r.rounding,r.precision=n+Math.max(Math.abs(t.e),t.sd())+4,r.rounding=1,m=!1,t=t.times(t).minus(1).sqrt().plus(t),m=!0,r.precision=n,r.rounding=e,t.ln()):new r(t)},v.inverseHyperbolicSine=v.asinh=function(){var n,e,t=this,r=t.constructor;return!t.isFinite()||t.isZero()?new r(t):(n=r.precision,e=r.rounding,r.precision=n+2*Math.max(Math.abs(t.e),t.sd())+6,r.rounding=1,m=!1,t=t.times(t).plus(1).sqrt().plus(t),m=!0,r.precision=n,r.rounding=e,t.ln())},v.inverseHyperbolicTangent=v.atanh=function(){var n,e,t,r,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(n=i.precision,e=i.rounding,r=o.sd(),Math.max(r,n)<2*-o.e-1?g(new i(o),n,e,!0):(i.precision=t=r-o.e,o=N(o.plus(1),new i(1).minus(o),t+n,1),i.precision=n+4,i.rounding=1,o=o.ln(),i.precision=n,i.rounding=e,o.times(.5))):new i(NaN)},v.inverseSine=v.asin=function(){var n,e,t,r,o=this,i=o.constructor;return o.isZero()?new i(o):(e=o.abs().cmp(1),t=i.precision,r=i.rounding,e!==-1?e===0?((n=B(i,t+4,r).times(.5)).s=o.s,n):new i(NaN):(i.precision=t+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=r,o.times(2)))},v.inverseTangent=v.atan=function(){var n,e,t,r,o,i,u,s,c,a=this,f=a.constructor,h=f.precision,l=f.rounding;if(a.isFinite()){if(a.isZero())return new f(a);if(a.abs().eq(1)&&h+4<=fe)return(u=B(f,h+4,l).times(.25)).s=a.s,u}else{if(!a.s)return new f(NaN);if(h+4<=fe)return(u=B(f,h+4,l).times(.5)).s=a.s,u}for(f.precision=s=h+10,f.rounding=1,n=t=Math.min(28,s/w+2|0);n;--n)a=a.div(a.times(a).plus(1).sqrt().plus(1));for(m=!1,e=Math.ceil(s/w),r=1,c=a.times(a),u=new f(a),o=a;n!==-1;)if(o=o.times(c),i=u.minus(o.div(r+=2)),o=o.times(c),(u=i.plus(o.div(r+=2))).d[e]!==void 0)for(n=e;u.d[n]===i.d[n]&&n--;);return t&&(u=u.times(2<<t-1)),m=!0,g(u,f.precision=h,f.rounding=l,!0)},v.isFinite=function(){return!!this.d},v.isInteger=v.isInt=function(){return!!this.d&&D(this.e/w)>this.d.length-2},v.isNaN=function(){return!this.s},v.isNegative=v.isNeg=function(){return this.s<0},v.isPositive=v.isPos=function(){return this.s>0},v.isZero=function(){return!!this.d&&this.d[0]===0},v.lessThan=v.lt=function(n){return this.cmp(n)<0},v.lessThanOrEqualTo=v.lte=function(n){return this.cmp(n)<1},v.logarithm=v.log=function(n){var e,t,r,o,i,u,s,c,a=this,f=a.constructor,h=f.precision,l=f.rounding;if(n==null)n=new f(10),e=!0;else{if(t=(n=new f(n)).d,n.s<0||!t||!t[0]||n.eq(1))return new f(NaN);e=n.eq(10)}if(t=a.d,a.s<0||!t||!t[0]||a.eq(1))return new f(t&&!t[0]?-1/0:a.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)i=!0;else{for(o=t[0];o%10==0;)o/=10;i=o!==1}if(m=!1,u=V(a,s=h+5),r=e?Tn(f,s+10):V(n,s),gn((c=N(u,r,s,1)).d,o=h,l))do if(u=V(a,s+=10),r=e?Tn(f,s+10):V(n,s),c=N(u,r,s,1),!i){+P(c.d).slice(o+1,o+15)+1==1e14&&(c=g(c,h+1,0));break}while(gn(c.d,o+=10,l));return m=!0,g(c,h,l)},v.minus=v.sub=function(n){var e,t,r,o,i,u,s,c,a,f,h,l,p=this,d=p.constructor;if(n=new d(n),!p.d||!n.d)return p.s&&n.s?p.d?n.s=-n.s:n=new d(n.d||p.s!==n.s?p:NaN):n=new d(NaN),n;if(p.s!=n.s)return n.s=-n.s,p.plus(n);if(a=p.d,l=n.d,s=d.precision,c=d.rounding,!a[0]||!l[0]){if(l[0])n.s=-n.s;else{if(!a[0])return new d(c===3?-0:0);n=new d(p)}return m?g(n,s,c):n}if(t=D(n.e/w),f=D(p.e/w),a=a.slice(),i=f-t){for((h=i<0)?(e=a,i=-i,u=l.length):(e=l,t=f,u=a.length),i>(r=Math.max(Math.ceil(s/w),u)+2)&&(i=r,e.length=1),e.reverse(),r=i;r--;)e.push(0);e.reverse()}else{for((h=(r=a.length)<(u=l.length))&&(u=r),r=0;r<u;r++)if(a[r]!=l[r]){h=a[r]<l[r];break}i=0}for(h&&(e=a,a=l,l=e,n.s=-n.s),u=a.length,r=l.length-u;r>0;--r)a[u++]=0;for(r=l.length;r>i;){if(a[--r]<l[r]){for(o=r;o&&a[--o]===0;)a[o]=z-1;--a[o],a[r]+=z}a[r]-=l[r]}for(;a[--u]===0;)a.pop();for(;a[0]===0;a.shift())--t;return a[0]?(n.d=a,n.e=Pn(a,t),m?g(n,s,c):n):new d(c===3?-0:0)},v.modulo=v.mod=function(n){var e,t=this,r=t.constructor;return n=new r(n),!t.d||!n.s||n.d&&!n.d[0]?new r(NaN):!n.d||t.d&&!t.d[0]?g(new r(t),r.precision,r.rounding):(m=!1,r.modulo==9?(e=N(t,n.abs(),0,3,1)).s*=n.s:e=N(t,n,0,r.modulo,1),e=e.times(n),m=!0,t.minus(e))},v.naturalExponential=v.exp=function(){return Qn(this)},v.naturalLogarithm=v.ln=function(){return V(this)},v.negated=v.neg=function(){var n=new this.constructor(this);return n.s=-n.s,g(n)},v.plus=v.add=function(n){var e,t,r,o,i,u,s,c,a,f,h=this,l=h.constructor;if(n=new l(n),!h.d||!n.d)return h.s&&n.s?h.d||(n=new l(n.d||h.s===n.s?h:NaN)):n=new l(NaN),n;if(h.s!=n.s)return n.s=-n.s,h.minus(n);if(a=h.d,f=n.d,s=l.precision,c=l.rounding,!a[0]||!f[0])return f[0]||(n=new l(h)),m?g(n,s,c):n;if(i=D(h.e/w),r=D(n.e/w),a=a.slice(),o=i-r){for(o<0?(t=a,o=-o,u=f.length):(t=f,r=i,u=a.length),o>(u=(i=Math.ceil(s/w))>u?i+1:u+1)&&(o=u,t.length=1),t.reverse();o--;)t.push(0);t.reverse()}for((u=a.length)-(o=f.length)<0&&(o=u,t=f,f=a,a=t),e=0;o;)e=(a[--o]=a[o]+f[o]+e)/z|0,a[o]%=z;for(e&&(a.unshift(e),++r),u=a.length;a[--u]==0;)a.pop();return n.d=a,n.e=Pn(a,r),m?g(n,s,c):n},v.precision=v.sd=function(n){var e,t=this;if(n!==void 0&&n!==!!n&&n!==1&&n!==0)throw Error(G+n);return t.d?(e=Ie(t.d),n&&t.e+1>e&&(e=t.e+1)):e=NaN,e},v.round=function(){var n=this,e=n.constructor;return g(new e(n),n.e+1,e.rounding)},v.sine=v.sin=function(){var n,e,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(n=r.precision,e=r.rounding,r.precision=n+Math.max(t.e,t.sd())+w,r.rounding=1,t=function(o,i){var u,s=i.d.length;if(s<3)return i.isZero()?i:Y(o,2,i,i);u=(u=1.4*Math.sqrt(s))>16?16:0|u,i=i.times(1/An(5,u)),i=Y(o,2,i,i);for(var c,a=new o(5),f=new o(16),h=new o(20);u--;)c=i.times(i),i=i.times(a.plus(c.times(f.times(c).minus(h))));return i}(r,Be(r,t)),r.precision=n,r.rounding=e,g(k>2?t.neg():t,n,e,!0)):new r(NaN)},v.squareRoot=v.sqrt=function(){var n,e,t,r,o,i,u=this,s=u.d,c=u.e,a=u.s,f=u.constructor;if(a!==1||!s||!s[0])return new f(!a||a<0&&(!s||s[0])?NaN:s?u:1/0);for(m=!1,(a=Math.sqrt(+u))==0||a==1/0?(((e=P(s)).length+c)%2==0&&(e+="0"),a=Math.sqrt(e),c=D((c+1)/2)-(c<0||c%2),r=new f(e=a==1/0?"5e"+c:(e=a.toExponential()).slice(0,e.indexOf("e")+1)+c)):r=new f(a.toString()),t=(c=f.precision)+3;;)if(r=(i=r).plus(N(u,i,t+2,1)).times(.5),P(i.d).slice(0,t)===(e=P(r.d)).slice(0,t)){if((e=e.slice(t-3,t+1))!="9999"&&(o||e!="4999")){+e&&(+e.slice(1)||e.charAt(0)!="5")||(g(r,c+1,1),n=!r.times(r).eq(u));break}if(!o&&(g(i,c+1,0),i.times(i).eq(u))){r=i;break}t+=4,o=1}return m=!0,g(r,c,f.rounding,n)},v.tangent=v.tan=function(){var n,e,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(n=r.precision,e=r.rounding,r.precision=n+10,r.rounding=1,(t=t.sin()).s=1,t=N(t,new r(1).minus(t.times(t)).sqrt(),n+10,0),r.precision=n,r.rounding=e,g(k==2||k==4?t.neg():t,n,e,!0)):new r(NaN)},v.times=v.mul=function(n){var e,t,r,o,i,u,s,c,a,f=this,h=f.constructor,l=f.d,p=(n=new h(n)).d;if(n.s*=f.s,!(l&&l[0]&&p&&p[0]))return new h(!n.s||l&&!l[0]&&!p||p&&!p[0]&&!l?NaN:l&&p?0*n.s:n.s/0);for(t=D(f.e/w)+D(n.e/w),(c=l.length)<(a=p.length)&&(i=l,l=p,p=i,u=c,c=a,a=u),i=[],r=u=c+a;r--;)i.push(0);for(r=a;--r>=0;){for(e=0,o=c+r;o>r;)s=i[o]+p[r]*l[o-r-1]+e,i[o--]=s%z|0,e=s/z|0;i[o]=(i[o]+e)%z|0}for(;!i[--u];)i.pop();return e?++t:i.shift(),n.d=i,n.e=Pn(i,t),m?g(n,h.precision,h.rounding):n},v.toBinary=function(n,e){return Yn(this,2,n,e)},v.toDecimalPlaces=v.toDP=function(n,e){var t=this,r=t.constructor;return t=new r(t),n===void 0?t:(q(n,0,W),e===void 0?e=r.rounding:q(e,0,8),g(t,n+t.e+1,e))},v.toExponential=function(n,e){var t,r=this,o=r.constructor;return n===void 0?t=L(r,!0):(q(n,0,W),e===void 0?e=o.rounding:q(e,0,8),t=L(r=g(new o(r),n+1,e),!0,n+1)),r.isNeg()&&!r.isZero()?"-"+t:t},v.toFixed=function(n,e){var t,r,o=this,i=o.constructor;return n===void 0?t=L(o):(q(n,0,W),e===void 0?e=i.rounding:q(e,0,8),t=L(r=g(new i(o),n+o.e+1,e),!1,n+r.e+1)),o.isNeg()&&!o.isZero()?"-"+t:t},v.toFraction=function(n){var e,t,r,o,i,u,s,c,a,f,h,l,p=this,d=p.d,y=p.constructor;if(!d)return new y(p);if(a=t=new y(1),r=c=new y(0),u=(i=(e=new y(r)).e=Ie(d)-p.e-1)%w,e.d[0]=S(10,u<0?w+u:u),n==null)n=i>0?e:a;else{if(!(s=new y(n)).isInt()||s.lt(a))throw Error(G+s);n=s.gt(e)?i>0?e:a:s}for(m=!1,s=new y(P(d)),f=y.precision,y.precision=i=d.length*w*2;h=N(s,e,0,1,1),(o=t.plus(h.times(r))).cmp(n)!=1;)t=r,r=o,o=a,a=c.plus(h.times(o)),c=o,o=e,e=s.minus(h.times(o)),s=o;return o=N(n.minus(t),r,0,1,1),c=c.plus(o.times(a)),t=t.plus(o.times(r)),c.s=a.s=p.s,l=N(a,r,i,1).minus(p).abs().cmp(N(c,t,i,1).minus(p).abs())<1?[a,r]:[c,t],y.precision=f,m=!0,l},v.toHexadecimal=v.toHex=function(n,e){return Yn(this,16,n,e)},v.toNearest=function(n,e){var t=this,r=t.constructor;if(t=new r(t),n==null){if(!t.d)return t;n=new r(1),e=r.rounding}else{if(n=new r(n),e===void 0?e=r.rounding:q(e,0,8),!t.d)return n.s?t:n;if(!n.d)return n.s&&(n.s=t.s),n}return n.d[0]?(m=!1,t=N(t,n,0,e,1).times(n),m=!0,g(t)):(n.s=t.s,t=n),t},v.toNumber=function(){return+this},v.toOctal=function(n,e){return Yn(this,8,n,e)},v.toPower=v.pow=function(n){var e,t,r,o,i,u,s=this,c=s.constructor,a=+(n=new c(n));if(!(s.d&&n.d&&s.d[0]&&n.d[0]))return new c(S(+s,a));if((s=new c(s)).eq(1))return s;if(r=c.precision,i=c.rounding,n.eq(1))return g(s,r,i);if((e=D(n.e/w))>=n.d.length-1&&(t=a<0?-a:a)<=9007199254740991)return o=zt(c,s,t,r),n.s<0?new c(1).div(o):g(o,r,i);if((u=s.s)<0){if(e<n.d.length-1)return new c(NaN);if(!(1&n.d[e])&&(u=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=u,s}return(e=(t=S(+s,a))!=0&&isFinite(t)?new c(t+"").e:D(a*(Math.log("0."+P(s.d))/Math.LN10+s.e+1)))>c.maxE+1||e<c.minE-1?new c(e>0?u/0:0):(m=!1,c.rounding=s.s=1,t=Math.min(12,(e+"").length),(o=Qn(n.times(V(s,r+t)),r)).d&&gn((o=g(o,r+5,1)).d,r,i)&&(e=r+10,+P((o=g(Qn(n.times(V(s,e+t)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(o=g(o,r+1,0))),o.s=u,m=!0,c.rounding=i,g(o,r,i))},v.toPrecision=function(n,e){var t,r=this,o=r.constructor;return n===void 0?t=L(r,r.e<=o.toExpNeg||r.e>=o.toExpPos):(q(n,1,W),e===void 0?e=o.rounding:q(e,0,8),t=L(r=g(new o(r),n,e),n<=r.e||r.e<=o.toExpNeg,n)),r.isNeg()&&!r.isZero()?"-"+t:t},v.toSignificantDigits=v.toSD=function(n,e){var t=this.constructor;return n===void 0?(n=t.precision,e=t.rounding):(q(n,1,W),e===void 0?e=t.rounding:q(e,0,8)),g(new t(this),n,e)},v.toString=function(){var n=this,e=n.constructor,t=L(n,n.e<=e.toExpNeg||n.e>=e.toExpPos);return n.isNeg()&&!n.isZero()?"-"+t:t},v.truncated=v.trunc=function(){return g(new this.constructor(this),this.e+1,1)},v.valueOf=v.toJSON=function(){var n=this,e=n.constructor,t=L(n,n.e<=e.toExpNeg||n.e>=e.toExpPos);return n.isNeg()?"-"+t:t};var N=function(){function n(r,o,i){var u,s=0,c=r.length;for(r=r.slice();c--;)u=r[c]*o+s,r[c]=u%i|0,s=u/i|0;return s&&r.unshift(s),r}function e(r,o,i,u){var s,c;if(i!=u)c=i>u?1:-1;else for(s=c=0;s<i;s++)if(r[s]!=o[s]){c=r[s]>o[s]?1:-1;break}return c}function t(r,o,i,u){for(var s=0;i--;)r[i]-=s,s=r[i]<o[i]?1:0,r[i]=s*u+r[i]-o[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,o,i,u,s,c){var a,f,h,l,p,d,y,b,_,O,j,M,K,C,Wn,On,vn,Gn,I,Jn,xn=r.constructor,Kn=r.s==o.s?1:-1,F=r.d,x=o.d;if(!(F&&F[0]&&x&&x[0]))return new xn(r.s&&o.s&&(F?!x||F[0]!=x[0]:x)?F&&F[0]==0||!x?0*Kn:Kn/0:NaN);for(c?(p=1,f=r.e-o.e):(c=z,p=w,f=D(r.e/p)-D(o.e/p)),I=x.length,vn=F.length,O=(_=new xn(Kn)).d=[],h=0;x[h]==(F[h]||0);h++);if(x[h]>(F[h]||0)&&f--,i==null?(C=i=xn.precision,u=xn.rounding):C=s?i+(r.e-o.e)+1:i,C<0)O.push(1),d=!0;else{if(C=C/p+2|0,h=0,I==1){for(l=0,x=x[0],C++;(h<vn||l)&&C--;h++)Wn=l*c+(F[h]||0),O[h]=Wn/x|0,l=Wn%x|0;d=l||h<vn}else{for((l=c/(x[0]+1)|0)>1&&(x=n(x,l,c),F=n(F,l,c),I=x.length,vn=F.length),On=I,M=(j=F.slice(0,I)).length;M<I;)j[M++]=0;(Jn=x.slice()).unshift(0),Gn=x[0],x[1]>=c/2&&++Gn;do l=0,(a=e(x,j,I,M))<0?(K=j[0],I!=M&&(K=K*c+(j[1]||0)),(l=K/Gn|0)>1?(l>=c&&(l=c-1),(a=e(y=n(x,l,c),j,b=y.length,M=j.length))==1&&(l--,t(y,I<b?Jn:x,b,c))):(l==0&&(a=l=1),y=x.slice()),(b=y.length)<M&&y.unshift(0),t(j,y,M,c),a==-1&&(a=e(x,j,I,M=j.length))<1&&(l++,t(j,I<M?Jn:x,M,c)),M=j.length):a===0&&(l++,j=[0]),O[h++]=l,a&&j[0]?j[M++]=F[On]||0:(j=[F[On]],M=1);while((On++<vn||j[0]!==void 0)&&C--);d=j[0]!==void 0}O[0]||O.shift()}if(p==1)_.e=f,qt=d;else{for(h=1,l=O[0];l>=10;l/=10)h++;_.e=h+f*p-1,g(_,s?i+_.e+1:i,u,d)}return _}}();function g(n,e,t,r){var o,i,u,s,c,a,f,h,l,p=n.constructor;n:if(e!=null){if(!(h=n.d))return n;for(o=1,s=h[0];s>=10;s/=10)o++;if((i=e-o)<0)i+=w,u=e,c=(f=h[l=0])/S(10,o-u-1)%10|0;else if((l=Math.ceil((i+1)/w))>=(s=h.length)){if(!r)break n;for(;s++<=l;)h.push(0);f=c=0,o=1,u=(i%=w)-w+1}else{for(f=s=h[l],o=1;s>=10;s/=10)o++;c=(u=(i%=w)-w+o)<0?0:f/S(10,o-u-1)%10|0}if(r=r||e<0||h[l+1]!==void 0||(u<0?f:f%S(10,o-u-1)),a=t<4?(c||r)&&(t==0||t==(n.s<0?3:2)):c>5||c==5&&(t==4||r||t==6&&(i>0?u>0?f/S(10,o-u):0:h[l-1])%10&1||t==(n.s<0?8:7)),e<1||!h[0])return h.length=0,a?(e-=n.e+1,h[0]=S(10,(w-e%w)%w),n.e=-e||0):h[0]=n.e=0,n;if(i==0?(h.length=l,s=1,l--):(h.length=l+1,s=S(10,w-i),h[l]=u>0?(f/S(10,o-u)%S(10,u)|0)*s:0),a)for(;;){if(l==0){for(i=1,u=h[0];u>=10;u/=10)i++;for(u=h[0]+=s,s=1;u>=10;u/=10)s++;i!=s&&(n.e++,h[0]==z&&(h[0]=1));break}if(h[l]+=s,h[l]!=z)break;h[l--]=0,s=1}for(i=h.length;h[--i]===0;)h.pop()}return m&&(n.e>p.maxE?(n.d=null,n.e=NaN):n.e<p.minE&&(n.e=0,n.d=[0])),n}function L(n,e,t){if(!n.isFinite())return Rt(n);var r,o=n.e,i=P(n.d),u=i.length;return e?(t&&(r=t-u)>0?i=i.charAt(0)+"."+i.slice(1)+H(r):u>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(n.e<0?"e":"e+")+n.e):o<0?(i="0."+H(-o-1)+i,t&&(r=t-u)>0&&(i+=H(r))):o>=u?(i+=H(o+1-u),t&&(r=t-o-1)>0&&(i=i+"."+H(r))):((r=o+1)<u&&(i=i.slice(0,r)+"."+i.slice(r)),t&&(r=t-u)>0&&(o+1===u&&(i+="."),i+=H(r))),i}function Pn(n,e){var t=n[0];for(e*=w;t>=10;t/=10)e++;return e}function Tn(n,e,t){if(e>xr)throw m=!0,t&&(n.precision=t),Error(Tt);return g(new n(Dn),e,1,!0)}function B(n,e,t){if(e>fe)throw Error(Tt);return g(new n(qn),e,t,!0)}function Ie(n){var e=n.length-1,t=e*w+1;if(e=n[e]){for(;e%10==0;e/=10)t--;for(e=n[0];e>=10;e/=10)t++}return t}function H(n){for(var e="";n--;)e+="0";return e}function zt(n,e,t,r){var o,i=new n(1),u=Math.ceil(r/w+4);for(m=!1;;){if(t%2&&Re((i=i.times(e)).d,u)&&(o=!0),(t=D(t/2))===0){t=i.d.length-1,o&&i.d[t]===0&&++i.d[t];break}Re((e=e.times(e)).d,u)}return m=!0,i}function ze(n){return 1&n.d[n.d.length-1]}function Bt(n,e,t){for(var r,o=new n(e[0]),i=0;++i<e.length;){if(!(r=new n(e[i])).s){o=r;break}o[t](r)&&(o=r)}return o}function Qn(n,e){var t,r,o,i,u,s,c,a=0,f=0,h=0,l=n.constructor,p=l.rounding,d=l.precision;if(!n.d||!n.d[0]||n.e>17)return new l(n.d?n.d[0]?n.s<0?0:1/0:1:n.s?n.s<0?0:n:NaN);for(e==null?(m=!1,c=d):c=e,s=new l(.03125);n.e>-2;)n=n.times(s),h+=5;for(c+=r=Math.log(S(2,h))/Math.LN10*2+5|0,t=i=u=new l(1),l.precision=c;;){if(i=g(i.times(n),c,1),t=t.times(++f),P((s=u.plus(N(i,t,c,1))).d).slice(0,c)===P(u.d).slice(0,c)){for(o=h;o--;)u=g(u.times(u),c,1);if(e!=null)return l.precision=d,u;if(!(a<3&&gn(u.d,c-r,p,a)))return g(u,l.precision=d,p,m=!0);l.precision=c+=10,t=i=s=new l(1),f=0,a++}u=s}}function V(n,e){var t,r,o,i,u,s,c,a,f,h,l,p=1,d=n,y=d.d,b=d.constructor,_=b.rounding,O=b.precision;if(d.s<0||!y||!y[0]||!d.e&&y[0]==1&&y.length==1)return new b(y&&!y[0]?-1/0:d.s!=1?NaN:y?0:d);if(e==null?(m=!1,f=O):f=e,b.precision=f+=10,r=(t=P(y)).charAt(0),!(Math.abs(i=d.e)<15e14))return a=Tn(b,f+2,O).times(i+""),d=V(new b(r+"."+t.slice(1)),f-10).plus(a),b.precision=O,e==null?g(d,O,_,m=!0):d;for(;r<7&&r!=1||r==1&&t.charAt(1)>3;)r=(t=P((d=d.times(n)).d)).charAt(0),p++;for(i=d.e,r>1?(d=new b("0."+t),i++):d=new b(r+"."+t.slice(1)),h=d,c=u=d=N(d.minus(1),d.plus(1),f,1),l=g(d.times(d),f,1),o=3;;){if(u=g(u.times(l),f,1),P((a=c.plus(N(u,new b(o),f,1))).d).slice(0,f)===P(c.d).slice(0,f)){if(c=c.times(2),i!==0&&(c=c.plus(Tn(b,f+2,O).times(i+""))),c=N(c,new b(p),f,1),e!=null)return b.precision=O,c;if(!gn(c.d,f-10,_,s))return g(c,b.precision=O,_,m=!0);b.precision=f+=10,a=u=d=N(h.minus(1),h.plus(1),f,1),l=g(d.times(d),f,1),o=s=1}c=a,o+=2}}function Rt(n){return String(n.s*n.s/0)}function Xn(n,e){var t,r,o;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(t<0&&(t=r),t+=+e.slice(r+1),e=e.substring(0,r)):t<0&&(t=e.length),r=0;e.charCodeAt(r)===48;r++);for(o=e.length;e.charCodeAt(o-1)===48;--o);if(e=e.slice(r,o)){if(o-=r,n.e=t=t-r-1,n.d=[],r=(t+1)%w,t<0&&(r+=w),r<o){for(r&&n.d.push(+e.slice(0,r)),o-=w;r<o;)n.d.push(+e.slice(r,r+=w));e=e.slice(r),r=w-e.length}else r-=o;for(;r--;)e+="0";n.d.push(+e),m&&(n.e>n.constructor.maxE?(n.d=null,n.e=NaN):n.e<n.constructor.minE&&(n.e=0,n.d=[0]))}else n.e=0,n.d=[0];return n}function Y(n,e,t,r,o){var i,u,s,c,a=n.precision,f=Math.ceil(a/w);for(m=!1,c=t.times(t),s=new n(r);;){if(u=N(s.times(c),new n(e++*e++),a,1),s=o?r.plus(u):r.minus(u),r=N(u.times(c),new n(e++*e++),a,1),(u=s.plus(r)).d[f]!==void 0){for(i=f;u.d[i]===s.d[i]&&i--;);if(i==-1)break}i=s,s=r,r=u,u=i}return m=!0,u.d.length=f+1,u}function An(n,e){for(var t=n;--e;)t*=n;return t}function Be(n,e){var t,r=e.s<0,o=B(n,n.precision,1),i=o.times(.5);if((e=e.abs()).lte(i))return k=r?4:1,e;if((t=e.divToInt(o)).isZero())k=r?3:2;else{if((e=e.minus(t.times(o))).lte(i))return k=ze(t)?r?2:3:r?4:1,e;k=ze(t)?r?1:4:r?3:2}return e.minus(o).abs()}function Yn(n,e,t,r){var o,i,u,s,c,a,f,h,l,p=n.constructor,d=t!==void 0;if(d?(q(t,1,W),r===void 0?r=p.rounding:q(r,0,8)):(t=p.precision,r=p.rounding),n.isFinite()){for(d?(o=2,e==16?t=4*t-3:e==8&&(t=3*t-2)):o=e,(u=(f=L(n)).indexOf("."))>=0&&(f=f.replace(".",""),(l=new p(1)).e=f.length-u,l.d=Sn(L(l),10,o),l.e=l.d.length),i=c=(h=Sn(f,10,o)).length;h[--c]==0;)h.pop();if(h[0]){if(u<0?i--:((n=new p(n)).d=h,n.e=i,h=(n=N(n,l,t,r,0,o)).d,i=n.e,a=qt),u=h[t],s=o/2,a=a||h[t+1]!==void 0,a=r<4?(u!==void 0||a)&&(r===0||r===(n.s<0?3:2)):u>s||u===s&&(r===4||a||r===6&&1&h[t-1]||r===(n.s<0?8:7)),h.length=t,a)for(;++h[--t]>o-1;)h[t]=0,t||(++i,h.unshift(1));for(c=h.length;!h[c-1];--c);for(u=0,f="";u<c;u++)f+=ce.charAt(h[u]);if(d){if(c>1)if(e==16||e==8){for(u=e==16?4:3,--c;c%u;c++)f+="0";for(c=(h=Sn(f,o,e)).length;!h[c-1];--c);for(u=1,f="1.";u<c;u++)f+=ce.charAt(h[u])}else f=f.charAt(0)+"."+f.slice(1);f=f+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)f="0"+f;f="0."+f}else if(++i>c)for(i-=c;i--;)f+="0";else i<c&&(f=f.slice(0,i)+"."+f.slice(i))}else f=d?"0p+0":"0";f=(e==16?"0x":e==2?"0b":e==8?"0o":"")+f}else f=Rt(n);return n.s<0?"-"+f:f}function Re(n,e){if(n.length>e)return n.length=e,!0}function Ar(n){return new this(n).abs()}function Er(n){return new this(n).acos()}function Mr(n){return new this(n).acosh()}function Sr(n,e){return new this(n).plus(e)}function Pr(n){return new this(n).asin()}function Fr(n){return new this(n).asinh()}function Dr(n){return new this(n).atan()}function qr(n){return new this(n).atanh()}function Tr(n,e){n=new this(n),e=new this(e);var t,r=this.precision,o=this.rounding,i=r+4;return n.s&&e.s?n.d||e.d?!e.d||n.isZero()?(t=e.s<0?B(this,r,o):new this(0)).s=n.s:!n.d||e.isZero()?(t=B(this,i,1).times(.5)).s=n.s:e.s<0?(this.precision=i,this.rounding=1,t=this.atan(N(n,e,i,1)),e=B(this,i,1),this.precision=r,this.rounding=o,t=n.s<0?t.minus(e):t.plus(e)):t=this.atan(N(n,e,i,1)):(t=B(this,i,1).times(e.s>0?.25:.75)).s=n.s:t=new this(NaN),t}function Ur(n){return new this(n).cbrt()}function Ir(n){return g(n=new this(n),n.e+1,2)}function zr(n,e,t){return new this(n).clamp(e,t)}function Br(n){if(!n||typeof n!="object")throw Error(In+"Object expected");var e,t,r,o=n.defaults===!0,i=["precision",1,W,"rounding",0,8,"toExpNeg",-on,0,"toExpPos",0,on,"maxE",0,on,"minE",-on,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],o&&(this[t]=ae[t]),(r=n[t])!==void 0){if(!(D(r)===r&&r>=i[e+1]&&r<=i[e+2]))throw Error(G+t+": "+r);this[t]=r}if(t="crypto",o&&(this[t]=ae[t]),(r=n[t])!==void 0){if(r!==!0&&r!==!1&&r!==0&&r!==1)throw Error(G+t+": "+r);if(r){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Ut);this[t]=!0}else this[t]=!1}return this}function Rr(n){return new this(n).cos()}function Lr(n){return new this(n).cosh()}function Zr(n,e){return new this(n).div(e)}function kr(n){return new this(n).exp()}function $r(n){return g(n=new this(n),n.e+1,3)}function Cr(){var n,e,t=new this(0);for(m=!1,n=0;n<arguments.length;)if((e=new this(arguments[n++])).d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return m=!0,new this(1/0);t=e}return m=!0,t.sqrt()}function Le(n){return n instanceof bn||n&&n.toStringTag===It||!1}function Vr(n){return new this(n).ln()}function Hr(n,e){return new this(n).log(e)}function Wr(n){return new this(n).log(2)}function Gr(n){return new this(n).log(10)}function Jr(){return Bt(this,arguments,"lt")}function Kr(){return Bt(this,arguments,"gt")}function Qr(n,e){return new this(n).mod(e)}function Xr(n,e){return new this(n).mul(e)}function Yr(n,e){return new this(n).pow(e)}function ni(n){var e,t,r,o,i=0,u=new this(1),s=[];if(n===void 0?n=this.precision:q(n,1,W),r=Math.ceil(n/w),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));i<r;)(o=e[i])>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=o%1e7;else{if(!crypto.randomBytes)throw Error(Ut);for(e=crypto.randomBytes(r*=4);i<r;)(o=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((127&e[i+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,i):(s.push(o%1e7),i+=4);i=r/4}else for(;i<r;)s[i++]=1e7*Math.random()|0;for(r=s[--i],n%=w,r&&n&&(o=S(10,w-n),s[i]=(r/o|0)*o);s[i]===0;i--)s.pop();if(i<0)t=0,s=[0];else{for(t=-1;s[0]===0;t-=w)s.shift();for(r=1,o=s[0];o>=10;o/=10)r++;r<w&&(t-=w-r)}return u.e=t,u.d=s,u}function ei(n){return g(n=new this(n),n.e+1,this.rounding)}function ti(n){return(n=new this(n)).d?n.d[0]?n.s:0*n.s:n.s||NaN}function ri(n){return new this(n).sin()}function ii(n){return new this(n).sinh()}function oi(n){return new this(n).sqrt()}function ui(n,e){return new this(n).sub(e)}function si(){var n=0,e=arguments,t=new this(e[n]);for(m=!1;t.s&&++n<e.length;)t=t.plus(e[n]);return m=!0,g(t,this.precision,this.rounding)}function ci(n){return new this(n).tan()}function ai(n){return new this(n).tanh()}function fi(n){return g(n=new this(n),n.e+1,1)}v[Symbol.for("nodejs.util.inspect.custom")]=v.toString,v[Symbol.toStringTag]="Decimal";var bn=v.constructor=function n(e){var t,r,o;function i(u){var s,c,a,f=this;if(!(f instanceof i))return new i(u);if(f.constructor=i,Le(u))return f.s=u.s,void(m?!u.d||u.e>i.maxE?(f.e=NaN,f.d=null):u.e<i.minE?(f.e=0,f.d=[0]):(f.e=u.e,f.d=u.d.slice()):(f.e=u.e,f.d=u.d?u.d.slice():u.d));if((a=typeof u)=="number"){if(u===0)return f.s=1/u<0?-1:1,f.e=0,void(f.d=[0]);if(u<0?(u=-u,f.s=-1):f.s=1,u===~~u&&u<1e7){for(s=0,c=u;c>=10;c/=10)s++;return void(m?s>i.maxE?(f.e=NaN,f.d=null):s<i.minE?(f.e=0,f.d=[0]):(f.e=s,f.d=[u]):(f.e=s,f.d=[u]))}return 0*u!=0?(u||(f.s=NaN),f.e=NaN,void(f.d=null)):Xn(f,u.toString())}if(a!=="string")throw Error(G+u);return(c=u.charCodeAt(0))===45?(u=u.slice(1),f.s=-1):(c===43&&(u=u.slice(1)),f.s=1),Ue.test(u)?Xn(f,u):function(h,l){var p,d,y,b,_,O,j,M,K;if(l.indexOf("_")>-1){if(l=l.replace(/(\d)_(?=\d)/g,"$1"),Ue.test(l))return Xn(h,l)}else if(l==="Infinity"||l==="NaN")return+l||(h.s=NaN),h.e=NaN,h.d=null,h;if(Nr.test(l))p=16,l=l.toLowerCase();else if(_r.test(l))p=2;else{if(!Or.test(l))throw Error(G+l);p=8}for((b=l.search(/p/i))>0?(j=+l.slice(b+1),l=l.substring(2,b)):l=l.slice(2),_=(b=l.indexOf("."))>=0,d=h.constructor,_&&(b=(O=(l=l.replace(".","")).length)-b,y=zt(d,new d(p),b,2*b)),b=K=(M=Sn(l,p,z)).length-1;M[b]===0;--b)M.pop();return b<0?new d(0*h.s):(h.e=Pn(M,K),h.d=M,m=!1,_&&(h=N(h,y,4*O)),j&&(h=h.times(Math.abs(j)<54?S(2,j):bn.pow(2,j))),m=!0,h)}(f,u)}if(i.prototype=v,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=Br,i.clone=n,i.isDecimal=Le,i.abs=Ar,i.acos=Er,i.acosh=Mr,i.add=Sr,i.asin=Pr,i.asinh=Fr,i.atan=Dr,i.atanh=qr,i.atan2=Tr,i.cbrt=Ur,i.ceil=Ir,i.clamp=zr,i.cos=Rr,i.cosh=Lr,i.div=Zr,i.exp=kr,i.floor=$r,i.hypot=Cr,i.ln=Vr,i.log=Hr,i.log10=Gr,i.log2=Wr,i.max=Jr,i.min=Kr,i.mod=Qr,i.mul=Xr,i.pow=Yr,i.random=ni,i.round=ei,i.sign=ti,i.sin=ri,i.sinh=ii,i.sqrt=oi,i.sub=ui,i.sum=si,i.tan=ci,i.tanh=ai,i.trunc=fi,e===void 0&&(e={}),e&&e.defaults!==!0)for(o=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<o.length;)e.hasOwnProperty(r=o[t++])||(e[r]=this[r]);return i.config(e),i}(ae);Dn=new bn(Dn),qn=new bn(qn);var En=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function U(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lt=function(n,e,t){return n==n&&(t!==void 0&&(n=n<=t?n:t),e!==void 0&&(n=n>=e?n:e)),n},Zt=function(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e},li=Math.floor,hi=Math.random,vi=function(n,e){return n+li(hi()*(e-n+1))},kt=function(n,e){var t=-1,r=n.length,o=r-1;for(e=e===void 0?r:e;++t<e;){var i=vi(t,o),u=n[i];n[i]=n[t],n[t]=u}return n.length=e,n},di=Lt,pi=Zt,gi=kt,bi=function(n,e){return gi(pi(n),di(e,0,n.length))},wn=function(n,e){for(var t=-1,r=n==null?0:n.length,o=Array(r);++t<r;)o[t]=e(n[t],t,n);return o},wi=wn,mi=function(n,e){return wi(e,function(t){return n[t]})},yi=function(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r},$t=typeof En=="object"&&En&&En.Object===Object&&En,ji=$t,_i=typeof self=="object"&&self&&self.Object===Object&&self,Z=ji||_i||Function("return this")(),R=Z.Symbol,Ze=R,Ct=Object.prototype,Ni=Ct.hasOwnProperty,Oi=Ct.toString,dn=Ze?Ze.toStringTag:void 0,xi=function(n){var e=Ni.call(n,dn),t=n[dn];try{n[dn]=void 0;var r=!0}catch{}var o=Oi.call(n);return r&&(e?n[dn]=t:delete n[dn]),o},Ai=Object.prototype.toString,Ei=xi,Mi=function(n){return Ai.call(n)},ke=R?R.toStringTag:void 0,sn=function(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":ke&&ke in Object(n)?Ei(n):Mi(n)},J=function(n){return n!=null&&typeof n=="object"},Si=sn,Pi=J,pn,ne,$e,Ce,ee,te,re,Ve,He=function(n){return Pi(n)&&Si(n)=="[object Arguments]"},Fi=J,Vt=Object.prototype,Di=Vt.hasOwnProperty,qi=Vt.propertyIsEnumerable,zn=He(function(){return arguments}())?He:function(n){return Fi(n)&&Di.call(n,"callee")&&!qi.call(n,"callee")},T=Array.isArray,le={exports:{}};pn=le,$e=Z,Ce=function(){return!1},ee=(ne=le.exports)&&!ne.nodeType&&ne,te=ee&&pn&&!pn.nodeType&&pn,re=te&&te.exports===ee?$e.Buffer:void 0,Ve=(re?re.isBuffer:void 0)||Ce,pn.exports=Ve;var Bn=le.exports,Ti=/^(?:0|[1-9]\d*)$/,Rn=function(n,e){var t=typeof n;return!!(e=e??9007199254740991)&&(t=="number"||t!="symbol"&&Ti.test(n))&&n>-1&&n%1==0&&n<e},me=function(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=9007199254740991},Ui=sn,Ii=me,zi=J,E={};E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object Boolean]"]=E["[object DataView]"]=E["[object Date]"]=E["[object Error]"]=E["[object Function]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object WeakMap]"]=!1;var Bi=function(n){return zi(n)&&Ii(n.length)&&!!E[Ui(n)]},Ln=function(n){return function(e){return n(e)}},he={exports:{}};(function(n,e){var t=$t,r=e&&!e.nodeType&&e,o=r&&n&&!n.nodeType&&n,i=o&&o.exports===r&&t.process,u=function(){try{var s=o&&o.require&&o.require("util").types;return s||i&&i.binding&&i.binding("util")}catch{}}();n.exports=u})(he,he.exports);var un=he.exports,Ri=Bi,Li=Ln,We=un&&un.isTypedArray,ye=We?Li(We):Ri,Zi=yi,ki=zn,$i=T,Ci=Bn,Vi=Rn,Hi=ye,Wi=Object.prototype.hasOwnProperty,Ht=function(n,e){var t=$i(n),r=!t&&ki(n),o=!t&&!r&&Ci(n),i=!t&&!r&&!o&&Hi(n),u=t||r||o||i,s=u?Zi(n.length,String):[],c=s.length;for(var a in n)!e&&!Wi.call(n,a)||u&&(a=="length"||o&&(a=="offset"||a=="parent")||i&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Vi(a,c))||s.push(a);return s},Gi=Object.prototype,Zn=function(n){var e=n&&n.constructor;return n===(typeof e=="function"&&e.prototype||Gi)},Wt=function(n,e){return function(t){return n(e(t))}},Ji=Wt(Object.keys,Object),Ki=Zn,Qi=Ji,Xi=Object.prototype.hasOwnProperty,Gt=function(n){if(!Ki(n))return Qi(n);var e=[];for(var t in Object(n))Xi.call(n,t)&&t!="constructor"&&e.push(t);return e},$=function(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")},Yi=sn,no=$,Jt=function(n){if(!no(n))return!1;var e=Yi(n);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"},eo=Jt,to=me,cn=function(n){return n!=null&&to(n.length)&&!eo(n)},ro=Ht,io=Gt,oo=cn,an=function(n){return oo(n)?ro(n):io(n)},uo=mi,so=an,co=Lt,ao=kt,fo=function(n){return n==null?[]:uo(n,so(n))},kn=function(n,e){return n===e||n!=n&&e!=e},lo=kn,ho=cn,vo=Rn,po=$,Kt=function(n,e,t){if(!po(t))return!1;var r=typeof e;return!!(r=="number"?ho(t)&&vo(e,t.length):r=="string"&&e in t)&&lo(t[e],n)},go=/\s/,bo=function(n){for(var e=n.length;e--&&go.test(n.charAt(e)););return e},wo=/^\s+/,mo=sn,yo=J,mn=function(n){return typeof n=="symbol"||yo(n)&&mo(n)=="[object Symbol]"},jo=function(n){return n&&n.slice(0,bo(n)+1).replace(wo,"")},Ge=$,_o=mn,No=/^[-+]0x[0-9a-f]+$/i,Oo=/^0b[01]+$/i,xo=/^0o[0-7]+$/i,Ao=parseInt,Eo=function(n){if(typeof n=="number")return n;if(_o(n))return NaN;if(Ge(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Ge(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=jo(n);var t=Oo.test(n);return t||xo.test(n)?Ao(n.slice(2),t?2:8):No.test(n)?NaN:+n},Mo=1/0,So=function(n){return n?(n=Eo(n))===Mo||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:n===0?n:0},Qt=function(n){var e=So(n),t=e%1;return e==e?t?e-t:e:0},Po=bi,Fo=function(n,e){var t=fo(n);return ao(t,co(e,0,t.length))},Do=T,qo=Kt,To=Qt;const Uo=U(function(n,e,t){return e=(t?qo(n,e,t):e===void 0)?1:To(e),(Do(n)?Po:Fo)(n,e)});var je=Wt(Object.getPrototypeOf,Object),Io=sn,zo=je,Bo=J,Ro=Function.prototype,Lo=Object.prototype,Xt=Ro.toString,Zo=Lo.hasOwnProperty,ko=Xt.call(Object),Yt=function(n){if(!Bo(n)||Io(n)!="[object Object]")return!1;var e=zo(n);if(e===null)return!0;var t=Zo.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Xt.call(t)==ko};const $o=U(Yt);var Je,ie=Z["__core-js_shared__"],Ke=(Je=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+Je:"",Co=function(n){return!!Ke&&Ke in n},Vo=Function.prototype.toString,nr=function(n){if(n!=null){try{return Vo.call(n)}catch{}try{return n+""}catch{}}return""},Ho=Jt,Wo=Co,Go=$,Jo=nr,Ko=/^\[object .+?Constructor\]$/,Qo=Function.prototype,Xo=Object.prototype,Yo=Qo.toString,nu=Xo.hasOwnProperty,eu=RegExp("^"+Yo.call(nu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tu=function(n){return!(!Go(n)||Wo(n))&&(Ho(n)?eu:Ko).test(Jo(n))},ru=function(n,e){return n==null?void 0:n[e]},X=function(n,e){var t=ru(n,e);return tu(t)?t:void 0},iu=X(Z,"DataView"),_e=X(Z,"Map"),ve=iu,de=_e,pe=X(Z,"Promise"),ge=X(Z,"Set"),be=X(Z,"WeakMap"),er=sn,fn=nr,Qe="[object Map]",Xe="[object Promise]",Ye="[object Set]",nt="[object WeakMap]",et="[object DataView]",ou=fn(ve),uu=fn(de),su=fn(pe),cu=fn(ge),au=fn(be),Q=er;(ve&&Q(new ve(new ArrayBuffer(1)))!=et||de&&Q(new de)!=Qe||pe&&Q(pe.resolve())!=Xe||ge&&Q(new ge)!=Ye||be&&Q(new be)!=nt)&&(Q=function(n){var e=er(n),t=e=="[object Object]"?n.constructor:void 0,r=t?fn(t):"";if(r)switch(r){case ou:return et;case uu:return Qe;case su:return Xe;case cu:return Ye;case au:return nt}return e});var yn=Q,fu=Gt,lu=yn,hu=zn,vu=T,du=cn,pu=Bn,gu=Zn,bu=ye,wu=Object.prototype.hasOwnProperty;const mu=U(function(n){if(n==null)return!0;if(du(n)&&(vu(n)||typeof n=="string"||typeof n.splice=="function"||pu(n)||bu(n)||hu(n)))return!n.length;var e=lu(n);if(e=="[object Map]"||e=="[object Set]")return!n.size;if(gu(n))return!fu(n).length;for(var t in n)if(wu.call(n,t))return!1;return!0});var yu=function(){this.__data__=[],this.size=0},ju=kn,$n=function(n,e){for(var t=n.length;t--;)if(ju(n[t][0],e))return t;return-1},_u=$n,Nu=Array.prototype.splice,Ou=$n,xu=$n,Au=$n,Eu=yu,Mu=function(n){var e=this.__data__,t=_u(e,n);return!(t<0)&&(t==e.length-1?e.pop():Nu.call(e,t,1),--this.size,!0)},Su=function(n){var e=this.__data__,t=Ou(e,n);return t<0?void 0:e[t][1]},Pu=function(n){return xu(this.__data__,n)>-1},Fu=function(n,e){var t=this.__data__,r=Au(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this};function nn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}nn.prototype.clear=Eu,nn.prototype.delete=Mu,nn.prototype.get=Su,nn.prototype.has=Pu,nn.prototype.set=Fu;var Cn=nn,Du=Cn,qu=function(){this.__data__=new Du,this.size=0},Tu=function(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t},Uu=function(n){return this.__data__.get(n)},Iu=function(n){return this.__data__.has(n)},Vn=X(Object,"create"),tt=Vn,zu=function(){this.__data__=tt?tt(null):{},this.size=0},Bu=function(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e},Ru=Vn,Lu=Object.prototype.hasOwnProperty,Zu=function(n){var e=this.__data__;if(Ru){var t=e[n];return t==="__lodash_hash_undefined__"?void 0:t}return Lu.call(e,n)?e[n]:void 0},ku=Vn,$u=Object.prototype.hasOwnProperty,Cu=Vn,Vu=zu,Hu=Bu,Wu=Zu,Gu=function(n){var e=this.__data__;return ku?e[n]!==void 0:$u.call(e,n)},Ju=function(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Cu&&e===void 0?"__lodash_hash_undefined__":e,this};function en(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}en.prototype.clear=Vu,en.prototype.delete=Hu,en.prototype.get=Wu,en.prototype.has=Gu,en.prototype.set=Ju;var rt=en,Ku=Cn,Qu=_e,Xu=function(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null},Hn=function(n,e){var t=n.__data__;return Xu(e)?t[typeof e=="string"?"string":"hash"]:t.map},Yu=Hn,ns=Hn,es=Hn,ts=Hn,rs=function(){this.size=0,this.__data__={hash:new rt,map:new(Qu||Ku),string:new rt}},is=function(n){var e=Yu(this,n).delete(n);return this.size-=e?1:0,e},os=function(n){return ns(this,n).get(n)},us=function(n){return es(this,n).has(n)},ss=function(n,e){var t=ts(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this};function tn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}tn.prototype.clear=rs,tn.prototype.delete=is,tn.prototype.get=os,tn.prototype.has=us,tn.prototype.set=ss;var Ne=tn,cs=Cn,as=_e,fs=Ne,ls=Cn,hs=qu,vs=Tu,ds=Uu,ps=Iu,gs=function(n,e){var t=this.__data__;if(t instanceof cs){var r=t.__data__;if(!as||r.length<199)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new fs(r)}return t.set(n,e),this.size=t.size,this};function rn(n){var e=this.__data__=new ls(n);this.size=e.size}rn.prototype.clear=hs,rn.prototype.delete=vs,rn.prototype.get=ds,rn.prototype.has=ps,rn.prototype.set=gs;var Oe=rn,bs=function(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n},ws=X,tr=function(){try{var n=ws(Object,"defineProperty");return n({},"",{}),n}catch{}}(),it=tr,rr=function(n,e,t){e=="__proto__"&&it?it(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t},ms=rr,ys=kn,js=Object.prototype.hasOwnProperty,xe=function(n,e,t){var r=n[e];js.call(n,e)&&ys(r,t)&&(t!==void 0||e in n)||ms(n,e,t)},_s=xe,Ns=rr,jn=function(n,e,t,r){var o=!t;t||(t={});for(var i=-1,u=e.length;++i<u;){var s=e[i],c=r?r(t[s],n[s],s,t,n):void 0;c===void 0&&(c=n[s]),o?Ns(t,s,c):_s(t,s,c)}return t},Os=jn,xs=an,As=function(n,e){return n&&Os(e,xs(e),n)},Es=$,Ms=Zn,Ss=function(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e},Ps=Object.prototype.hasOwnProperty,Fs=Ht,Ds=function(n){if(!Es(n))return Ss(n);var e=Ms(n),t=[];for(var r in n)(r!="constructor"||!e&&Ps.call(n,r))&&t.push(r);return t},qs=cn,Ae=function(n){return qs(n)?Fs(n,!0):Ds(n)},Ts=jn,Us=Ae,Is=function(n,e){return n&&Ts(e,Us(e),n)},we={exports:{}};(function(n,e){var t=Z,r=e&&!e.nodeType&&e,o=r&&n&&!n.nodeType&&n,i=o&&o.exports===r?t.Buffer:void 0,u=i?i.allocUnsafe:void 0;n.exports=function(s,c){if(c)return s.slice();var a=s.length,f=u?u(a):new s.constructor(a);return s.copy(f),f}})(we,we.exports);var zs=we.exports,ir=function(){return[]},Bs=function(n,e){for(var t=-1,r=n==null?0:n.length,o=0,i=[];++t<r;){var u=n[t];e(u,t,n)&&(i[o++]=u)}return i},Rs=ir,Ls=Object.prototype.propertyIsEnumerable,ot=Object.getOwnPropertySymbols,Ee=ot?function(n){return n==null?[]:(n=Object(n),Bs(ot(n),function(e){return Ls.call(n,e)}))}:Rs,Zs=jn,ks=Ee,$s=function(n,e){return Zs(n,ks(n),e)},Me=function(n,e){for(var t=-1,r=e.length,o=n.length;++t<r;)n[o+t]=e[t];return n},Cs=Me,Vs=je,Hs=Ee,Ws=ir,or=Object.getOwnPropertySymbols?function(n){for(var e=[];n;)Cs(e,Hs(n)),n=Vs(n);return e}:Ws,Gs=jn,Js=or,Ks=function(n,e){return Gs(n,Js(n),e)},Qs=Me,Xs=T,ur=function(n,e,t){var r=e(n);return Xs(n)?r:Qs(r,t(n))},Ys=ur,nc=Ee,ec=an,sr=function(n){return Ys(n,ec,nc)},tc=ur,rc=or,ic=Ae,Se=function(n){return tc(n,ic,rc)},oc=Object.prototype.hasOwnProperty,uc=function(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&oc.call(n,"index")&&(t.index=n.index,t.input=n.input),t},cr=Z.Uint8Array,ut=cr,Pe=function(n){var e=new n.constructor(n.byteLength);return new ut(e).set(new ut(n)),e},sc=Pe,cc=function(n,e){var t=e?sc(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)},ac=/\w*$/,fc=function(n){var e=new n.constructor(n.source,ac.exec(n));return e.lastIndex=n.lastIndex,e},st=R?R.prototype:void 0,ct=st?st.valueOf:void 0,lc=Pe,hc=Pe,vc=cc,dc=fc,pc=function(n){return ct?Object(ct.call(n)):{}},gc=function(n,e){var t=e?lc(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)},bc=function(n,e,t){var r=n.constructor;switch(e){case"[object ArrayBuffer]":return hc(n);case"[object Boolean]":case"[object Date]":return new r(+n);case"[object DataView]":return vc(n,t);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return gc(n,t);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(n);case"[object RegExp]":return dc(n);case"[object Symbol]":return pc(n)}},wc=$,at=Object.create,mc=function(){function n(){}return function(e){if(!wc(e))return{};if(at)return at(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}(),yc=je,jc=Zn,_c=function(n){return typeof n.constructor!="function"||jc(n)?{}:mc(yc(n))},Nc=yn,Oc=J,xc=function(n){return Oc(n)&&Nc(n)=="[object Map]"},Ac=Ln,ft=un&&un.isMap,Ec=ft?Ac(ft):xc,Mc=yn,Sc=J,Pc=function(n){return Sc(n)&&Mc(n)=="[object Set]"},Fc=Ln,lt=un&&un.isSet,Dc=lt?Fc(lt):Pc,qc=Oe,Tc=bs,Uc=xe,Ic=As,zc=Is,Bc=zs,Rc=Zt,Lc=$s,Zc=Ks,kc=sr,$c=Se,Cc=yn,Vc=uc,Hc=bc,Wc=_c,Gc=T,Jc=Bn,Kc=Ec,Qc=$,Xc=Dc,Yc=an,na=Ae,ar="[object Arguments]",fr="[object Function]",lr="[object Object]",A={};A[ar]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[lr]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[fr]=A["[object WeakMap]"]=!1;var _n=function n(e,t,r,o,i,u){var s,c=1&t,a=2&t,f=4&t;if(r&&(s=i?r(e,o,i,u):r(e)),s!==void 0)return s;if(!Qc(e))return e;var h=Gc(e);if(h){if(s=Vc(e),!c)return Rc(e,s)}else{var l=Cc(e),p=l==fr||l=="[object GeneratorFunction]";if(Jc(e))return Bc(e,c);if(l==lr||l==ar||p&&!i){if(s=a||p?{}:Wc(e),!c)return a?Zc(e,zc(s,e)):Lc(e,Ic(s,e))}else{if(!A[l])return i?e:{};s=Hc(e,l,c)}}u||(u=new qc);var d=u.get(e);if(d)return d;u.set(e,s),Xc(e)?e.forEach(function(b){s.add(n(b,t,r,b,e,u))}):Kc(e)&&e.forEach(function(b,_){s.set(_,n(b,t,r,_,e,u))});var y=h?void 0:(f?a?$c:kc:a?na:Yc)(e);return Tc(y||e,function(b,_){y&&(b=e[_=b]),Uc(s,_,n(b,t,r,_,e,u))}),s},ea=T,ta=mn,ra=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ia=/^\w*$/,Fe=function(n,e){if(ea(n))return!1;var t=typeof n;return!(t!="number"&&t!="symbol"&&t!="boolean"&&n!=null&&!ta(n))||ia.test(n)||!ra.test(n)||e!=null&&n in Object(e)},hr=Ne;function De(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var t=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=t.cache;if(i.has(o))return i.get(o);var u=n.apply(this,r);return t.cache=i.set(o,u)||i,u};return t.cache=new(De.Cache||hr),t}De.Cache=hr;var oa=De,ua=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sa=/\\(\\)?/g,ca=function(n){var e=oa(n,function(r){return t.size===500&&t.clear(),r}),t=e.cache;return e}(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(ua,function(t,r,o,i){e.push(o?i.replace(sa,"$1"):r||t)}),e}),aa=wn,fa=T,la=mn,ht=R?R.prototype:void 0,vt=ht?ht.toString:void 0,ha=function n(e){if(typeof e=="string")return e;if(fa(e))return aa(e,n)+"";if(la(e))return vt?vt.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},va=ha,da=T,pa=Fe,ga=ca,ba=function(n){return n==null?"":va(n)},ln=function(n,e){return da(n)?n:pa(n,e)?[n]:ga(ba(n))},wa=mn,hn=function(n){if(typeof n=="string"||wa(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e},ma=ln,ya=hn,Nn=function(n,e){for(var t=0,r=(e=ma(e,n)).length;n!=null&&t<r;)n=n[ya(e[t++])];return t&&t==r?n:void 0},vr=function(n,e,t){var r=-1,o=n.length;e<0&&(e=-e>o?0:o+e),(t=t>o?o:t)<0&&(t+=o),o=e>t?0:t-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=n[r+e];return i},ja=Nn,_a=vr,Na=ln,Oa=function(n){var e=n==null?0:n.length;return e?n[e-1]:void 0},xa=function(n,e){return e.length<2?n:ja(n,_a(e,0,-1))},Aa=hn,Ea=function(n,e){return e=Na(e,n),(n=xa(n,e))==null||delete n[Aa(Oa(e))]},Ma=Yt,Sa=function(n){return Ma(n)?void 0:n},Pa=zn,Fa=T,dt=R?R.isConcatSpreadable:void 0,Da=Me,qa=function(n){return Fa(n)||Pa(n)||!!(dt&&n&&n[dt])},Ta=function n(e,t,r,o,i){var u=-1,s=e.length;for(r||(r=qa),i||(i=[]);++u<s;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,o,i):Da(i,c):o||(i[i.length]=c)}return i},Ua=Ta,Ia=function(n){return n!=null&&n.length?Ua(n,1):[]},za=function(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)},pt=Math.max,Ba=function(n,e,t){return e=pt(e===void 0?n.length-1:e,0),function(){for(var r=arguments,o=-1,i=pt(r.length-e,0),u=Array(i);++o<i;)u[o]=r[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=r[o];return s[e]=t(u),za(n,this,s)}},qe=function(n){return n},Ra=function(n){return function(){return n}},gt=tr,La=gt?function(n,e){return gt(n,"toString",{configurable:!0,enumerable:!1,value:Ra(e),writable:!0})}:qe,Za=Date.now,ka=function(n){var e=0,t=0;return function(){var r=Za(),o=16-(r-t);if(t=r,o>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}(La),$a=Ia,Ca=Ba,Va=ka,dr=function(n){return Va(Ca(n,void 0,$a),n+"")},Ha=wn,Wa=_n,Ga=Ea,Ja=ln,Ka=jn,Qa=Sa,Xa=Se;const Ya=U(dr(function(n,e){var t={};if(n==null)return t;var r=!1;e=Ha(e,function(i){return i=Ja(i,n),r||(r=i.length>1),i}),Ka(n,Xa(n),t),r&&(t=Wa(t,7,Qa));for(var o=e.length;o--;)Ga(t,e[o]);return t}));var nf=Ne,ef=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},tf=function(n){return this.__data__.has(n)};function Fn(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new nf;++e<t;)this.add(n[e])}Fn.prototype.add=Fn.prototype.push=ef,Fn.prototype.has=tf;var rf=Fn,of=function(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1},uf=function(n,e){return n.has(e)},pr=function(n,e,t,r,o,i){var u=1&t,s=n.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var a=i.get(n),f=i.get(e);if(a&&f)return a==e&&f==n;var h=-1,l=!0,p=2&t?new rf:void 0;for(i.set(n,e),i.set(e,n);++h<s;){var d=n[h],y=e[h];if(r)var b=u?r(y,d,h,e,n,i):r(d,y,h,n,e,i);if(b!==void 0){if(b)continue;l=!1;break}if(p){if(!of(e,function(_,O){if(!uf(p,O)&&(d===_||o(d,_,t,r,i)))return p.push(O)})){l=!1;break}}else if(d!==y&&!o(d,y,t,r,i)){l=!1;break}}return i.delete(n),i.delete(e),l},bt=cr,sf=kn,cf=pr,af=function(n){var e=-1,t=Array(n.size);return n.forEach(function(r,o){t[++e]=[o,r]}),t},ff=function(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t},wt=R?R.prototype:void 0,oe=wt?wt.valueOf:void 0,lf=function(n,e,t,r,o,i,u){switch(t){case"[object DataView]":if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(n.byteLength!=e.byteLength||!i(new bt(n),new bt(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return sf(+n,+e);case"[object Error]":return n.name==e.name&&n.message==e.message;case"[object RegExp]":case"[object String]":return n==e+"";case"[object Map]":var s=af;case"[object Set]":var c=1&r;if(s||(s=ff),n.size!=e.size&&!c)return!1;var a=u.get(n);if(a)return a==e;r|=2,u.set(n,e);var f=cf(s(n),s(e),r,o,i,u);return u.delete(n),f;case"[object Symbol]":if(oe)return oe.call(n)==oe.call(e)}return!1},mt=sr,hf=Object.prototype.hasOwnProperty,ue=Oe,vf=pr,df=lf,pf=function(n,e,t,r,o,i){var u=1&t,s=mt(n),c=s.length;if(c!=mt(e).length&&!u)return!1;for(var a=c;a--;){var f=s[a];if(!(u?f in e:hf.call(e,f)))return!1}var h=i.get(n),l=i.get(e);if(h&&l)return h==e&&l==n;var p=!0;i.set(n,e),i.set(e,n);for(var d=u;++a<c;){var y=n[f=s[a]],b=e[f];if(r)var _=u?r(b,y,f,e,n,i):r(y,b,f,n,e,i);if(!(_===void 0?y===b||o(y,b,t,r,i):_)){p=!1;break}d||(d=f=="constructor")}if(p&&!d){var O=n.constructor,j=e.constructor;O==j||!("constructor"in n)||!("constructor"in e)||typeof O=="function"&&O instanceof O&&typeof j=="function"&&j instanceof j||(p=!1)}return i.delete(n),i.delete(e),p},yt=yn,jt=T,_t=Bn,gf=ye,Nt="[object Arguments]",Ot="[object Array]",Mn="[object Object]",xt=Object.prototype.hasOwnProperty,bf=function(n,e,t,r,o,i){var u=jt(n),s=jt(e),c=u?Ot:yt(n),a=s?Ot:yt(e),f=(c=c==Nt?Mn:c)==Mn,h=(a=a==Nt?Mn:a)==Mn,l=c==a;if(l&&_t(n)){if(!_t(e))return!1;u=!0,f=!1}if(l&&!f)return i||(i=new ue),u||gf(n)?vf(n,e,t,r,o,i):df(n,e,c,t,r,o,i);if(!(1&t)){var p=f&&xt.call(n,"__wrapped__"),d=h&&xt.call(e,"__wrapped__");if(p||d){var y=p?n.value():n,b=d?e.value():e;return i||(i=new ue),o(y,b,t,r,i)}}return!!l&&(i||(i=new ue),pf(n,e,t,r,o,i))},At=J,gr=function n(e,t,r,o,i){return e===t||(e==null||t==null||!At(e)&&!At(t)?e!=e&&t!=t:bf(e,t,r,o,n,i))},wf=Oe,mf=gr,yf=$,br=function(n){return n==n&&!yf(n)},jf=br,_f=an,wr=function(n,e){return function(t){return t!=null&&t[n]===e&&(e!==void 0||n in Object(t))}},Nf=function(n,e,t,r){var o=t.length,i=o,u=!r;if(n==null)return!i;for(n=Object(n);o--;){var s=t[o];if(u&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++o<i;){var c=(s=t[o])[0],a=n[c],f=s[1];if(u&&s[2]){if(a===void 0&&!(c in n))return!1}else{var h=new wf;if(r)var l=r(a,f,c,n,e,h);if(!(l===void 0?mf(f,a,3,r,h):l))return!1}}return!0},Of=function(n){for(var e=_f(n),t=e.length;t--;){var r=e[t],o=n[r];e[t]=[r,o,jf(o)]}return e},xf=wr,Af=Nn,Ef=ln,Mf=zn,Sf=T,Pf=Rn,Ff=me,Df=hn,qf=function(n,e){return n!=null&&e in Object(n)},Tf=function(n,e,t){for(var r=-1,o=(e=Ef(e,n)).length,i=!1;++r<o;){var u=Df(e[r]);if(!(i=n!=null&&t(n,u)))break;n=n[u]}return i||++r!=o?i:!!(o=n==null?0:n.length)&&Ff(o)&&Pf(u,o)&&(Sf(n)||Mf(n))},mr=function(n,e){return n!=null&&Tf(n,e,qf)},Uf=gr,If=function(n,e,t){var r=n==null?void 0:Af(n,e);return r===void 0?t:r},zf=mr,Bf=Fe,Rf=br,Lf=wr,Zf=hn,kf=Nn,$f=function(n){return function(e){return e==null?void 0:e[n]}},Cf=function(n){return function(e){return kf(e,n)}},Vf=Fe,Hf=hn,Wf=function(n){var e=Of(n);return e.length==1&&e[0][2]?xf(e[0][0],e[0][1]):function(t){return t===n||Nf(t,n,e)}},Gf=function(n,e){return Bf(n)&&Rf(e)?Lf(Zf(n),e):function(t){var r=If(t,n);return r===void 0&&r===e?zf(t,n):Uf(e,r,3)}},Jf=qe,Kf=T,Qf=function(n){return Vf(n)?$f(Hf(n)):Cf(n)},Te=function(n){return typeof n=="function"?n:n==null?Jf:typeof n=="object"?Kf(n)?Gf(n[0],n[1]):Wf(n):Qf(n)},Xf=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}},Yf=xe,n0=ln,e0=Rn,Et=$,t0=hn,r0=Nn,i0=function(n,e,t,r){if(!Et(n))return n;for(var o=-1,i=(e=n0(e,n)).length,u=i-1,s=n;s!=null&&++o<i;){var c=t0(e[o]),a=t;if(c==="__proto__"||c==="constructor"||c==="prototype")return n;if(o!=u){var f=s[c];(a=r?r(f,c,s):void 0)===void 0&&(a=Et(f)?f:e0(e[o+1])?[]:{})}Yf(s,c,a),s=s[c]}return n},o0=ln,yr=function(n,e,t){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],s=r0(n,u);t(s,u)&&i0(i,o0(u,n),s)}return i},u0=wn,s0=Te,c0=yr,a0=Se,jr=function(n,e){if(n==null)return{};var t=u0(a0(n),function(r){return[r]});return e=s0(e),c0(n,t,function(r,o){return e(r,o[0])})};const f0=U(jr);var l0=Te,h0=Xf,v0=jr;const d0=U(function(n,e){return v0(n,h0(l0(e)))});var p0=yr,g0=mr,b0=function(n,e){return p0(n,e,function(t,r){return g0(n,r)})};const w0=U(dr(function(n,e){return n==null?{}:b0(n,e)}));var m0=function(n){return function(e,t,r){for(var o=-1,i=Object(e),u=r(e),s=u.length;s--;){var c=u[n?s:++o];if(t(i[c],c,i)===!1)break}return e}}(),y0=an,j0=cn,_0=function(n,e){return function(t,r){if(t==null)return t;if(!j0(t))return n(t,r);for(var o=t.length,i=e?o:-1,u=Object(t);(e?i--:++i<o)&&r(u[i],i,u)!==!1;);return t}}(function(n,e){return n&&m0(n,e,y0)}),N0=cn,Mt=mn,O0=function(n,e){if(n!==e){var t=n!==void 0,r=n===null,o=n==n,i=Mt(n),u=e!==void 0,s=e===null,c=e==e,a=Mt(e);if(!s&&!a&&!i&&n>e||i&&u&&c&&!s&&!a||r&&u&&c||!t&&c||!o)return 1;if(!r&&!i&&!a&&n<e||a&&t&&o&&!r&&!i||s&&t&&o||!u&&o||!c)return-1}return 0},se=wn,x0=Nn,A0=Te,E0=function(n,e){var t=-1,r=N0(n)?Array(n.length):[];return _0(n,function(o,i,u){r[++t]=e(o,i,u)}),r},M0=function(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n},S0=Ln,P0=function(n,e,t){for(var r=-1,o=n.criteria,i=e.criteria,u=o.length,s=t.length;++r<u;){var c=O0(o[r],i[r]);if(c)return r>=s?c:c*(t[r]=="desc"?-1:1)}return n.index-e.index},F0=qe,D0=T,q0=function(n,e,t){e=e.length?se(e,function(i){return D0(i)?function(u){return x0(u,i.length===1?i[0]:i)}:i}):[F0];var r=-1;e=se(e,S0(A0));var o=E0(n,function(i,u,s){return{criteria:se(e,function(c){return c(i)}),index:++r,value:i}});return M0(o,function(i,u){return P0(i,u,t)})},St=T;const T0=U(function(n,e,t,r){return n==null?[]:(St(e)||(e=e==null?[]:[e]),St(t=r?void 0:t)||(t=t==null?[]:[t]),q0(n,e,t))});var U0=_n;const I0=U(function(n){return U0(n,4)});var z0=_n;const B0=U(function(n,e){return z0(n,4,e=typeof e=="function"?e:void 0)});var R0=_n;const L0=U(function(n){return R0(n,5)});var Z0=_n;const k0=U(function(n,e){return Z0(n,5,e=typeof e=="function"?e:void 0)});var $0=vr,C0=Kt,V0=Qt,H0=Math.ceil,W0=Math.max;const G0=U(function(n,e,t){e=(t?C0(n,e,t):e===void 0)?1:W0(V0(e),0);var r=n==null?0:n.length;if(!r||e<1)return[];for(var o=0,i=0,u=Array(H0(r/e));o<r;)u[i++]=$0(n,o,o+=e);return u});function Un(n,e){return(e=e.filter(t=>t||t===0)).length?e.reduce((t,r)=>t[n](r),new bn(e.shift())).toNumber():0}function Pt(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return Un("mul",e)}function Ft(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return Un("plus",e)}function Dt(n,e,t){if(!e&&typeof n[0]!="object")return t(...n);if(typeof e=="string")return t(...n.map(r=>r[e]));if(e instanceof Array){const r=n.length-1;return n.reduce((o,i,u)=>(Object.keys(o).forEach(s=>{r===u?o[s]=t(...o[s].concat(i[s])):o[s].push(i[s])}),o),e.reduce((o,i)=>(o[i]=[],o),{}))}return 0}exports.add=Ft,exports.addBy=function(n,e){return Dt(n,e,Ft)},exports.chunk=G0,exports.clone=I0,exports.cloneDeep=L0,exports.cloneDeepWith=k0,exports.cloneWith=B0,exports.divide=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return Un("div",e)},exports.isEmpty=mu,exports.isPlainObject=$o,exports.multiply=Pt,exports.multiplyBy=function(n,e){return Dt(n,e,Pt)},exports.omit=Ya,exports.omitBy=d0,exports.orderBy=T0,exports.pick=w0,exports.pickBy=f0,exports.sampleSize=Uo,exports.subtract=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return Un("sub",e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(t){return/^(https?:|mailto:|tel:)/.test(t)}function n(t){return/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(t)}function a(t){return/^\d{4}-\d{1,2}-\d{1,2}/.test(t)}function o(t){return/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(t)}function d(t){return/^([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]$|^([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}$/.test(t)}function i(t){return/[1-9]\d{5}(?!\d)/.test(t)}exports.isExternal=r;exports.validDate=a;exports.validIDCard=d;exports.validPhone=o;exports.validPostalCode=i;exports.validURL=n;
|
package/lib/wx/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-f305d2b7.js");exports.authorize=e.authorize;exports.subscribeMessage=e.subscribeMessage;exports.takeSnapshot=e.takeSnapshot;exports.wxPayInMiniPrograms=e.wxPayInMiniPrograms;exports.wxPayInWxBrowser=e.wxPayInWxBrowser;
|