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

a-calc

Package Overview
Dependencies
Maintainers
1
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a-calc - npm Package Compare versions

Comparing version 1.5.0-dev.2024042302 to 1.5.0-dev.2024042303

2

a-calc.versions.js

@@ -35,3 +35,3 @@ try{

'1.3.11', '1.3.12', '1.5.0-dev.20240325',
'1.5.0-dev.20240423', '1.5.0-dev.2024032502', '1.5.0-dev.2024042302'
'1.5.0-dev.20240423', '1.5.0-dev.2024032502', '1.5.0-dev.2024042302', '1.5.0-dev.2024042303'
]; a_calc_versions;

@@ -38,0 +38,0 @@ }

@@ -1,1 +0,1 @@

var a_calc=function(exports){"use strict";function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new O(o||[]);return n(a,"_invoke",{value:S(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function h(){}function _(){}var g={};c(g,i,(function(){return this}));var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==t&&r.call(m,i)&&(g=m);var b=_.prototype=p.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function o(n,i,a,s){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return h.prototype=_,n(b,"constructor",{value:_,configurable:!0}),n(_,"constructor",{value:h,configurable:!0}),h.displayName=c(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(y.prototype),c(y.prototype,a,(function(){return this})),e.AsyncIterator=y,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new y(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(b),c(b,s,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var version="1.5.0-dev.2024042302",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function decimal_round(e,t,r,n,o){var i=e,a=t,s=t.length,c={"~-":function(){var e="<"===r?n-1:n;a=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(s<=e||0===s)){var o=t.slice(0,e);0==+t.slice(e,s)?a=o:(o=(+"9".concat(o)+1).toString().slice(1)).length>e?(a=o.slice(1,o.length),i=(+i+1).toString()):a=o}},"~5":function(){if(0!==s){var e="<"===r?n-1:n;a=t.slice(0,e);var o=+t[e];Number.isNaN(o)||o>=5&&(a=(+"9".concat(a)+1).toString().slice(1)).length>e&&(a=a.slice(1,a.length),i=(+i+1).toString())}},"~6":function(){if(0!==s){var o,c="<"===r?n-1:n,l=+t[c],u=t.slice(+c+1,t.length);u=""===u?0:parseInt(u),o=0===c?+e[e.length-1]:+t[c-1],a=t.slice(0,c),(l>=6||5===l&&u>0||5===l&&o%2!=0)&&(a=(+"9".concat(a)+1).toString().slice(1)).length>c&&(a=a.slice(1,a.length),i=(+i+1).toString())}}};return"<="===r?s<=n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"<"===r?s<n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"="===r?s<n?a=t+"0".repeat(n-s):s>n&&c[o]&&c[o]():">="===r?s<n&&(a=t+"0".repeat(n-s)):">"===r&&s<=n&&(a=t+"0".repeat(n-s+1)),{int_part:i,dec_part:a}}function is_operator(e){return"+-*/%()**".indexOf(e)>-1}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r=null,n=null,o=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],i=0;i<o.length;i++){var a=e.match(o[i]);if(a){t=a;break}}if(t){n=t[1];var s=t[2];""!==s.trim()&&(r=s)}return{num:n,unit:r}}function parse_mantissa(e,t,r,n){var o=e.split("."),i=o[0],a=1===o.length?"":o[1],s=decimal_round(i,a,t,+r,n);return i=s.int_part,""===(a=s.dec_part)?i:"".concat(i,".").concat(a)}function parse_thousands(e){var t=e.split(".");if(t.length>1){var r=t[0];r.includes("-")?t[0]=r[0]+r.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=r.replace(/(?=(?!^)(?:\d{3})+$)/g,","),e=t.join(".")}else{var n=t[0];e=n.includes("-")?n[0]+n.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):n.replace(/(?=(?!^)(?:\d{3})+$)/g,",")}return e}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:5e3,n=0;case 2:if(!(n<t.length)){e.next=16;break}return e.prev=3,e.next=6,Promise.race([t[n],new Promise((function(e,t){setTimeout((function(){return t(new Error("promise queue timeout err"))}),r)}))]);case 6:o=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("continue",13);case 12:return e.abrupt("return",o);case 13:n++,e.next=2;break;case 16:return e.abrupt("return",Promise.reject("错误的 promise queue 调用"));case 17:case"end":return e.stop()}}),e,null,[[3,9]])}))),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=16;break}return e.prev=2,e.next=5,fetch(t[r]);case 5:if(!e.sent.ok){e.next=8;break}return e.abrupt("return",t[r]);case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("continue",13);case 13:r++,e.next=1;break;case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}function idle(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return"undefined"!=typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e,t)}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",to_number_string:"to-number-string",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]}),e=e.slice(2);else if(/[Nn]/.test(e[1]))n.push({type:"to-number",value:e[1]}),e=e.slice(2);else{if(!/[Uu]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number-string",value:e[1]}),e=e.slice(2)}}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol){if(/\s/.test(o)){e=e.slice(1);continue}symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial)}else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o)){e=e.slice(1);continue}if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}if(r.length>0&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),n.filter((function(e){return"number"===e.type})).length>1)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$1(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(memoize$1.Cache||MapCache),r}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,n,o){t.push(n?o.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$1(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var get_1=get,get$1=getDefaultExportFromCjs(get_1);function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1};not_undefined(n)&&(o.options=n);var i=get$1(n,"_error",!1);if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(t=r,""===r.trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===i)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}var a=t.split("|");if(o.expr=a[0],a.length>1){var s=a[1];if(""!==s.trim())try{o.fmt_tokens=fmt_tokenizer(s)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var c=[];try{c=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}if(null===o.fmt_tokens)o.fmt_tokens=c;else{var l=o.fmt_tokens.map((function(e){return e.type}));c.forEach((function(e){l.includes(e.type)||o.fmt_tokens.push(e)}))}}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=state.initial,o=[],i=[],a=function(){o.push(t),e=e.slice(1)},s=function(e){i.push({type:e,value:o.join("")}),o.length=0},c=function(){e=e.slice(1)};e;)switch(t=e[0],n){case state.initial:if(signed.includes(t)){var l=i.at(-1);0===i.length||"operator"===l.type||"("===l?(n=state.number,a()):(n=state.operator,a())}else if(operator.includes(t))n=state.operator,a();else if(/\d/.test(t))n=state.number,a();else if(brackets.includes(t))n=state.bracket;else if(/[a-zA-Z_$]/.test(t))n=state.var,a();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));c()}break;case state.bracket:i.push({type:state.bracket,value:t}),c(),n=state.initial;break;case state.operator:var u=o.at(-1);"*"===t&&"*"===u&&a(),s(state.operator),n=state.initial;break;case state.number:if(/\d/.test(t))a();else if("."===t){if(0===o.length||o.includes("."))throw new Error("非法的小数部分".concat(o.join("")));a()}else"Ee".includes(t)?(n=state.scientific,a()):["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.number),n=state.initial);break;case state.scientific:if(/\d/.test(t))a();else if(signed.includes(t)){var f=o.slice(1),p=o.at(-1);f.includes(t)||!/[Ee]/.test(p)?(s(state.scientific),n=state.initial):a()}else["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.scientific),n=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?a():(s(state.var),n=state.initial);break;default:throw new Error("状态错误")}return 0!==o.length&&(i.push({type:n,value:o.join("")}),o.length=0,n=state.initial),i}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"===i.type){if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],l=get$1(c,i.value);if(void 0!==l){a=l;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}else n.push(i)}return n}function token2postfix(e){for(var t=[],r=[],n=e.map((function(e){return e.value}));n.length>0;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&t.length>0;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&t.length>0;)r.push(t.pop());t.push(o)}else r.push(o)}if(t.length>0){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;t.length>0;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var t,r,n,o,i,a,s,c,l,u,f=O.prototype={constructor:O,toString:null,valueOf:null},p=new O(1),h=20,_=4,g=-7,d=21,m=-1e7,b=1e7,v=!1,y=1,S=0,w={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function O(e,t){var o,i,a,s,c,l,u,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<m?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((l="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!isNumeric.test(f=String(e)))return n(p,f,l);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(intCheck(t,2,$.length,"Base"),10==t&&E)return T(p=new O(e),h+p.e+1,_);if(f=String(e),l="number"==typeof e){if(0*e!=0)return n(p,f,l,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(o=$.slice(0,t),s=c=0,u=f.length;c<u;c++)if(o.indexOf(i=f.charAt(c))<0){if("."==i){if(c>s){s=u;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return n(p,String(e),l,t)}l=!1,(s=(f=r(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(u=f.length;48===f.charCodeAt(--u););if(f=f.slice(c,++u)){if(u-=c,l&&O.DEBUG&&u>15&&(e>MAX_SAFE_INTEGER||e!==mathfloor(e)))throw Error(tooManyDigits+p.s*e);if((s=s-c-1)>b)p.c=p.e=null;else if(s<m)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%LOG_BASE,s<0&&(c+=LOG_BASE),c<u){for(c&&p.c.push(+f.slice(0,c)),u-=LOG_BASE;c<u;)p.c.push(+f.slice(c,c+=LOG_BASE));c=LOG_BASE-(f=f.slice(c)).length}else c-=u;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function C(e,t,r,n){var o,i,a,s,c;if(null==r?r=_:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=coeffToString(e.c),c=1==n||2==n&&(a<=g||a>=d)?toExponential(c,a):toFixedPoint(c,a,"0");else if(i=(e=T(new O(e),t,r)).e,s=(c=coeffToString(e.c)).length,1==n||2==n&&(t<=i||i<=g)){for(;s<t;c+="0",s++);c=toExponential(c,i)}else if(t-=a,c=toFixedPoint(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function A(e,t){for(var r,n=1,o=new O(e[0]);n<e.length;n++){if(!(r=new O(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function x(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*LOG_BASE-1)>b?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,p=POWS_TEN;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/p[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,o=1,a=(i%=LOG_BASE)-LOG_BASE+1}else{for(c=s=f[l],o=1;s>=10;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/p[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%p[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(i>0?a>0?c/p[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=p[LOG_BASE-i],f[l]=a>0?mathfloor(c/p[o-a]%p[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==BASE&&(f[0]=1));break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=g||r>=d?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=clone,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),_=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),g=r[0],d=r[1]):(intCheck(r,-MAX,MAX,t),g=-(d=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),m=r[0],b=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);m=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(bignumberError+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),y=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);w=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);E="0123456789"==r.slice(0,10),$=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:_,EXPONENTIAL_AT:[g,d],RANGE:[m,b],CRYPTO:v,MODULO_MODE:y,POW_PRECISION:S,FORMAT:w,ALPHABET:$}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-MAX&&o<=MAX&&o===mathfloor(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=BASE||r!==mathfloor(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return A(arguments,f.lt)},O.minimum=O.min=function(){return A(arguments,f.gt)},O.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return mathfloor(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,a,s=0,c=[],l=new O(p);if(null==e?e=h:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!v)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=LOG_BASE,o&&e&&(a=POWS_TEN[LOG_BASE-e],c[s]=mathfloor(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=LOG_BASE);for(s=1,a=c[0];a>=10;a/=10,s++);s<LOG_BASE&&(n-=LOG_BASE-s)}return l.e=n,l.c=c,l}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},r=function(){var e="0123456789";function r(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var c,l,u,f,p,g,d,m,b=n.indexOf("."),v=h,y=_;for(b>=0&&(f=S,S=0,n=n.replace(".",""),g=(m=new O(o)).pow(n.length-b),S=f,m.c=r(toFixedPoint(coeffToString(g.c),g.e,"0"),10,i,e),m.e=m.c.length),u=f=(d=r(n,o,i,s?(c=$,e):(c=e,$))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(b<0?--u:(g.c=d,g.e=u,g.s=a,d=(g=t(g,m,v,y,i)).c,p=g.r,u=g.e),b=d[l=u+v+1],f=i/2,p=p||l<0||null!=d[l+1],p=y<4?(null!=b||p)&&(0==y||y==(g.s<0?3:2)):b>f||b==f&&(4==y||p||6==y&&1&d[l-1]||y==(g.s<0?8:7)),l<1||!d[0])n=p?toFixedPoint(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(d.length=l,p)for(--i;++d[--l]>i;)d[l]=0,l||(++u,d=[1].concat(d));for(f=d.length;!d[--f];);for(b=0,n="";b<=f;n+=c.charAt(d[b++]));n=toFixedPoint(n,u,c.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,l=t%SQRT_BASE,u=t/SQRT_BASE|0;for(e=e.slice();c--;)s=((o=l*(i=e[c]%SQRT_BASE)+(n=u*i+(a=e[c]/SQRT_BASE|0)*l)%SQRT_BASE*SQRT_BASE+s)/r|0)+(n/SQRT_BASE|0)+u*a,e[c]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var c,l,u,f,p,h,_,g,d,m,b,v,y,S,w,$,E,C=n.s==o.s?1:-1,A=n.c,x=o.c;if(!(A&&A[0]&&x&&x[0]))return new O(n.s&&o.s&&(A?!x||A[0]!=x[0]:x)?A&&0==A[0]||!x?0*C:C/0:NaN);for(d=(g=new O(C)).c=[],C=i+(l=n.e-o.e)+1,s||(s=BASE,l=bitFloor(n.e/LOG_BASE)-bitFloor(o.e/LOG_BASE),C=C/LOG_BASE|0),u=0;x[u]==(A[u]||0);u++);if(x[u]>(A[u]||0)&&l--,C<0)d.push(1),f=!0;else{for(S=A.length,$=x.length,u=0,C+=2,(p=mathfloor(s/(x[0]+1)))>1&&(x=e(x,p,s),A=e(A,p,s),$=x.length,S=A.length),y=$,b=(m=A.slice(0,$)).length;b<$;m[b++]=0);E=x.slice(),E=[0].concat(E),w=x[0],x[1]>=s/2&&w++;do{if(p=0,(c=t(x,m,$,b))<0){if(v=m[0],$!=b&&(v=v*s+(m[1]||0)),(p=mathfloor(v/w))>1)for(p>=s&&(p=s-1),_=(h=e(x,p,s)).length,b=m.length;1==t(h,m,_,b);)p--,r(h,$<_?E:x,_,s),_=h.length,c=1;else 0==p&&(c=p=1),_=(h=x.slice()).length;if(_<b&&(h=[0].concat(h)),r(m,h,b,s),b=m.length,-1==c)for(;t(x,m,$,b)<1;)p++,r(m,$<b?E:x,b,s),b=m.length}else 0===c&&(p++,m=[0]);d[u++]=p,m[0]?m[b++]=A[y]||0:(m=[A[y]],b=1)}while((y++<S||null!=m[0])&&C--);f=null!=m[0],d[0]||d.splice(0,1)}if(s==BASE){for(u=1,C=d[0];C>=10;C/=10,u++);T(g,i+(g.e=u+l*LOG_BASE-1)+1,a,f)}else g.e=l,g.r=+f;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,u=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,i=r?t:t.replace(u,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return compare(this,new O(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,i=this;if(null!=e)return intCheck(e,0,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,r){return t(this,new O(e,r),h,_)},f.dividedToIntegerBy=f.idiv=function(e,r){return t(this,new O(e,r),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new O(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+k(e));if(null!=t&&(t=new O(t)),a=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new O(Math.pow(+k(u),a?e.s*(2-isOdd(e)):+k(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||a&&u.c[1]>=24e7:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,u.e>-1&&(i=1/i),new O(s?1/i:i);S&&(i=mathceil(S/LOG_BASE+2))}for(a?(r=new O(.5),s&&(e.s=1),c=isOdd(e)):c=(o=Math.abs(+k(e)))%2,l=new O(p);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)c=isOdd(e);else{if(0===(o=+k(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=p.div(l)),t?l.mod(t):i?T(l,S,_,undefined):l)},f.integerValue=function(e){var t=new O(this);return null==e?e=_:intCheck(e,0,8),T(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===compare(this,new O(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return compare(this,new O(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=compare(this,new O(e,t)))||0===t},f.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return compare(this,new O(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=compare(this,new O(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new O(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new O(u[0]?a:3==_?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((i=s<0)?(s=-s,o=u):(l=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=BASE-1;n>s;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?x(e,u,l):(e.s=3==_?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,r){var n,o,i=this;return e=new O(e,r),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==y?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,y),(e=i.minus(n.times(e))).c[0]||1!=y||(e.s=i.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,p,h,_,g,d,m=this,b=m.c,v=(e=new O(e,t)).c;if(!(b&&v&&b[0]&&v[0]))return!m.s||!e.s||b&&!b[0]&&!v||v&&!v[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=bitFloor(m.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=m.s,(c=b.length)<(f=v.length)&&(_=b,b=v,v=_,o=c,c=f,f=o),o=c+f,_=[];o--;_.push(0));for(g=BASE,d=SQRT_BASE,o=f;--o>=0;){for(r=0,p=v[o]%d,h=v[o]/d|0,i=o+(a=c);i>o;)r=((l=p*(l=b[--a]%d)+(s=h*l+(u=b[a]/d|0)*p)%d*d+_[i]+r)/g|0)+(s/d|0)+h*u,_[i--]=l%g;_[i]=r}return r?++n:_.splice(0,1),x(e,_,n)},f.negated=function(){var e=new O(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new O(o/0);if(!s[0]||!c[0])return c[0]?e:new O(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=c):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),x(e,s,a)},f.precision=f.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*LOG_BASE+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},f.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,r,n,o,i,a=this,s=a.c,c=a.s,l=a.e,u=h+4,f=new O("0.5");if(1!==c||!s||!s[0])return new O(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+k(a)))||c==1/0?(((r=coeffToString(s)).length+l)%2==0&&(r+="0"),c=Math.sqrt(+r),l=bitFloor((l+1)/2)-(l<0||l%2),n=new O(r=c==1/0?"5e"+l:(r=c.toExponential()).slice(0,r.indexOf("e")+1)+l)):n=new O(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=f.times(i.plus(t(a,i,u,1))),coeffToString(i.c).slice(0,c)===(r=coeffToString(n.c)).slice(0,c)){if(n.e<l&&--c,"9999"!=(r=r.slice(c-3,c+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(T(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(T(i,i.e+h+2,0),i.times(i).eq(a))){n=i;break}u+=4,c+=4,o=1}return T(n,n.e+h+1,_,e)},f.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),C(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),C(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=w;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",u=a[0],f=a[1],p=o.s<0,h=p?u.slice(1):u,_=h.length;if(c&&(i=s,s=c,c=i,_-=i),s>0&&_>0){for(i=_%s||s,u=h.substr(0,i);i<_;i+=s)u+=l+h.substr(i,s);c>0&&(u+=l+h.slice(i)),p&&(u="-"+u)}n=f?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var r,n,o,i,a,s,c,l,u,f,h,g,d=this,m=d.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(bignumberError+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+k(c));if(!m)return new O(d);for(r=new O(p),u=n=new O(p),o=l=new O(p),g=coeffToString(m),a=r.e=g.length-d.e-1,r.c[0]=POWS_TEN[(s=a%LOG_BASE)<0?LOG_BASE+s:s],e=!e||c.comparedTo(r)>0?a>0?r:u:c,s=b,b=1/0,c=new O(g),l.c[0]=0;f=t(c,r,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,u=l.plus(f.times(i=u)),l=i,r=c.minus(f.times(i=r)),c=i;return i=t(e.minus(n),o,0,1),l=l.plus(i.times(u)),n=n.plus(i.times(o)),l.s=u.s=d.s,h=t(u,o,a*=2,_).minus(d).abs().comparedTo(t(l,n,a,_).minus(d).abs())<1?[u,o]:[l,n],b=s,h},f.toNumber=function(){return+k(this)},f.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),C(this,e,t,2)},f.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=g||i>=d?toExponential(coeffToString(n.c),i):toFixedPoint(coeffToString(n.c),i,"0"):10===e&&E?t=toFixedPoint(coeffToString((n=T(new O(n),h+i+1,_)).c),n.e,"0"):(intCheck(e,2,$.length,"Base"),t=r(toFixedPoint(coeffToString(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return k(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&O.set(e),O}function bitFloor(e){var t=0|e;return e>0||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,l=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>l^r?1:-1;for(s=(c=o.length)<(l=i.length)?c:l,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function intCheck(e,t,r,n){if(e<t||e>r||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone(),cache={count:0};function eval_postfix(e){for(var t=[];e.length>0;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop(),i=o+r+n,a=n+r+o;if(i in cache){t.push(cache[i]);continue}if(a in cache){t.push(cache[a]);continue}if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":var s=o.plus(n);cache[i]=cache[a]=s,t.push(s);break;case"-":var c=o.minus(n);cache[i]=cache[a]=c,t.push(c);break;case"*":var l=o.times(n);cache[i]=cache[a]=l,t.push(l);break;case"/":var u=o.div(n);cache[i]=cache[a]=u,t.push(u);break;case"%":var f=o.mod(n);cache[i]=cache[a]=f,t.push(f);break;case"**":var p=o.pow(n);cache[i]=cache[a]=p,t.push(p)}cache.count+=2}else t.push(r)}if(1!==t.length)throw"unvalid expression";var h=t[0];if((h=BigNumber.isBigNumber(h)?h:BigNumber(h)).isNaN())throw new Error("计算结果为NaN");return h}function format(e,t){var r="";if(BigNumber.isBigNumber(e)?r=e.toFixed():"string"!=typeof e&&(r=e.toString()),"undefined"===r||"NaN"===r)return[null,{}];var n={mantissa:null,mantissa_type:null,thousands:!1,sign:!1,round:"~-",scientific:!1,fraction:!1,percent:!1,to_number:!1,to_number_string:!1};if(t.forEach((function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);n.mantissa_type=e.value}else if("to-number"===t)n.to_number=!0;else if("to-number-string"===t)n.to_number_string=!0;else if("comma"===t)n.thousands=!0;else if("number"===t)n.mantissa=e.value;else if("plus"===t)n.sign=!0;else if("round"===t)n.round=e.value;else if("fraction"===t)n.fraction=!0;else if("scientific"===t)n.scientific=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");n.percent=!0}})),n.to_number)return[+parse_mantissa(r,n.mantissa_type,n.mantissa,n.round),n];if(n.scientific){var o=BigNumber(r).toExponential();return[n.sign&&!o.startsWith("-")?"+"+o:o,n]}if(n.fraction){var i=BigNumber(r).toFraction().map((function(e){return e.toFixed()})).join("/");return[n.sign&&!i.startsWith("-")?"+"+i:i,n]}return n.percent&&(r=BigNumber(r).times(100).toFixed()),not_null(n.mantissa)&&(r=parse_mantissa(r,n.mantissa_type,n.mantissa,n.round)),n.thousands&&(r=parse_thousands(r)),n.sign&&(n.to_number=!1,r.startsWith("-")||(r="+"+r)),n.percent&&(r+="%"),[r,n]}function fill_fmt_tokens(e,t){return e.map((function(e){if("var"!==e.type)return e;for(var r,n=0;n<t.length&&!not_undefined(r=get$1(t[n],e.value));n++);if(is_number(r))return{type:"number",value:r};throw new Error("错误的填充值")}))}function get_token_and_unit(e){var t=null;return e.length,{tokens:e.map((function(e){var r=split_unit_num(e.value);return null!==r.unit?(null==t&&(t=r.unit),{type:"number",value:r.num}):e})),unit:t}}var _debug=!1,_important_push=!0;function close_important_push(){_important_push=!1}function open_important_push(){_important_push=!0}function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(e,t){var r={},n={_error:"-"};return["string","number"].includes(_typeof(e))?(Array.isArray(t)||void 0===t||Object.keys(t).forEach((function(e){return e.startsWith("_")&&(n[e]=t[e])})),r=null!=t?t:{},/[a-zA-Z_$]/.test(e.toString())?void 0!==t?(r=t,calc(e,_objectSpread2(_objectSpread2({},n),r))):function(t){return calc(e,_objectSpread2(_objectSpread2({},n),t))}:calc(e,_objectSpread2(_objectSpread2({},n),r))):(r=e,function(e){return calc(e,_objectSpread2(_objectSpread2({},n),r))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code,versions,last_version,larr,varr,script,url;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name){_context.next=19;break}if(!(parseInt(process.versions.node)>=17)){_context.next=17;break}return _context.next=4,promise_queue([fetch("https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js"),fetch("https://unpkg.com/a-calc@latest/a-calc.versions.js")]);case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map((function(e){return parseInt(e)})),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map((function(e){return parseInt(e)})),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=25;break;case 19:return script=document.createElement("script"),script.onload=function(){var e=a_calc_versions;if(Array.isArray(e)){var t=e.at(-1),r=t.match(/(\d+)\.(\d+)\.(\d+)/);r.shift(),r=r.map((function(e){return parseInt(e)}));var n=version.match(/(\d+)\.(\d+)\.(\d+)/);n.shift(),n=n.map((function(e){return parseInt(e)})),(r[0]>n[0]||r[0]===n[0]&&r[1]>n[1]||r[0]===n[0]&&r[1]===n[1]&&r[2]>n[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",t)}},_context.next=23,test_urls(["https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js","https://unpkg.com/a-calc@latest/a-calc.versions.js"]);case 23:url=_context.sent,url?(script.src=url,document.body.appendChild(script)):script=null;case 25:case"end":return _context.stop()}}),_callee)}))),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i=parse_args(t),a=get$1(i,"options._error",void 0),s=get$1(i,"options._debug",!1),c=get$1(i,"options._unit",!1),l=i.options,u=null;if(i.fmt_err||i.expr_err){if(not_undefined(a))return a;throw new Error("表达式或格式化字符串错误,表达式为:".concat(i.expr))}var f=i.fmt_tokens;if(not_undefined(a))try{n=tokenizer(i.expr,c)}catch(e){return a}else n=tokenizer(i.expr,c);if(is_null(l))o=n;else{var p=[];if(Array.isArray(l))p=l;else{p.push(l);var h=get$1(l,"_fill_data",{});not_undefined(h)&&(Array.isArray(h)?p=[].concat(_toConsumableArray(p),_toConsumableArray(h)):p.push(h))}if(not_undefined(a))try{o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p))}catch(e){return a}else o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p));if([!0,"on","auto","space"].includes(c)){var _=get_token_and_unit(o);u=_.unit,o=_.tokens}}var g=token2postfix(o),d=null,m={};if(not_undefined(a))try{d=eval_postfix(g)}catch(e){return a}else d=eval_postfix(g);if(not_null(f)){var b=_slicedToArray(format(d,f),2);d=b[0],m=b[1]}else d=null!==d?d.toFixed():null;if("Infinity"===d||null===d){if(not_undefined(a))return a;throw new Error("计算错误可能是非法的计算式")}return null===u||m.to_number||m.to_number_string||(d+=u),(get_debug_config()||s)&&(console.groupCollapsed("%c"+i.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,i.origin_expr),console.log(i.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.origin_fill_data)),console.log(i.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(d)),console.log(d),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.fmt_tokens)),console.log(i.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(g)),console.log(g),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,u),console.log(u),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i)),console.log(i),console.groupEnd(),console.groupEnd()),d}function check_update(){check_version().catch((function(){}))}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}idle(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(_important_push){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,promise_queue([fetch("https://cdn.jsdelivr.net/npm/injectcheck@dev/a-calc.js"),fetch("https://unpkg.com/injectcheck@dev/a-calc.js")]);case 5:return res=_context.sent,_context.next=8,res.text();case 8:code=_context.sent,eval(code);case 10:return _context.prev=10,_context.finish(10);case 12:case"end":return _context.stop()}}),_callee,null,[[2,,10,12]])}))));var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug,close_important_push:close_important_push,open_important_push:open_important_push},fmt=calc;return exports.calc=calc,exports.calc_util=calc_util,exports.calc_wrap=calc_wrap,exports.fmt=fmt,exports.version=version,exports}({});
var a_calc=function(exports){"use strict";function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new O(o||[]);return n(a,"_invoke",{value:S(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function h(){}function _(){}var g={};c(g,i,(function(){return this}));var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==t&&r.call(m,i)&&(g=m);var b=_.prototype=p.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function o(n,i,a,s){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return h.prototype=_,n(b,"constructor",{value:_,configurable:!0}),n(_,"constructor",{value:h,configurable:!0}),h.displayName=c(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(y.prototype),c(y.prototype,a,(function(){return this})),e.AsyncIterator=y,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new y(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(b),c(b,s,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var version="1.5.0-dev.2024042303",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function decimal_round(e,t,r,n,o){var i=e,a=t,s=t.length,c={"~-":function(){var e="<"===r?n-1:n;a=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(s<=e||0===s)){var o=t.slice(0,e);0==+t.slice(e,s)?a=o:(o=(+"9".concat(o)+1).toString().slice(1)).length>e?(a=o.slice(1,o.length),i=(+i+1).toString()):a=o}},"~5":function(){if(0!==s){var e="<"===r?n-1:n;a=t.slice(0,e);var o=+t[e];Number.isNaN(o)||o>=5&&(a=(+"9".concat(a)+1).toString().slice(1)).length>e&&(a=a.slice(1,a.length),i=(+i+1).toString())}},"~6":function(){if(0!==s){var o,c="<"===r?n-1:n,l=+t[c],u=t.slice(+c+1,t.length);u=""===u?0:parseInt(u),o=0===c?+e[e.length-1]:+t[c-1],a=t.slice(0,c),(l>=6||5===l&&u>0||5===l&&o%2!=0)&&(a=(+"9".concat(a)+1).toString().slice(1)).length>c&&(a=a.slice(1,a.length),i=(+i+1).toString())}}};return"<="===r?s<=n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"<"===r?s<n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"="===r?s<n?a=t+"0".repeat(n-s):s>n&&c[o]&&c[o]():">="===r?s<n&&(a=t+"0".repeat(n-s)):">"===r&&s<=n&&(a=t+"0".repeat(n-s+1)),{int_part:i,dec_part:a}}function is_operator(e){return"+-*/%()**".indexOf(e)>-1}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r=null,n=null,o=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],i=0;i<o.length;i++){var a=e.match(o[i]);if(a){t=a;break}}if(t){n=t[1];var s=t[2];""!==s.trim()&&(r=s)}return{num:n,unit:r}}function parse_mantissa(e,t,r,n){var o=e.split("."),i=o[0],a=1===o.length?"":o[1],s=decimal_round(i,a,t,+r,n);return i=s.int_part,""===(a=s.dec_part)?i:"".concat(i,".").concat(a)}function parse_thousands(e){var t=e.split(".");if(t.length>1){var r=t[0];r.includes("-")?t[0]=r[0]+r.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=r.replace(/(?=(?!^)(?:\d{3})+$)/g,","),e=t.join(".")}else{var n=t[0];e=n.includes("-")?n[0]+n.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):n.replace(/(?=(?!^)(?:\d{3})+$)/g,",")}return e}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:5e3,n=0;case 2:if(!(n<t.length)){e.next=16;break}return e.prev=3,e.next=6,Promise.race([t[n],new Promise((function(e,t){setTimeout((function(){return t(new Error("promise queue timeout err"))}),r)}))]);case 6:o=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("continue",13);case 12:return e.abrupt("return",o);case 13:n++,e.next=2;break;case 16:return e.abrupt("return",Promise.reject("错误的 promise queue 调用"));case 17:case"end":return e.stop()}}),e,null,[[3,9]])}))),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=16;break}return e.prev=2,e.next=5,fetch(t[r]);case 5:if(!e.sent.ok){e.next=8;break}return e.abrupt("return",t[r]);case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("continue",13);case 13:r++,e.next=1;break;case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}function idle(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return"undefined"!=typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e,t)}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",to_number_string:"to-number-string",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]}),e=e.slice(2);else if(/[Nn]/.test(e[1]))n.push({type:"to-number",value:e[1]}),e=e.slice(2);else{if(!/[Uu]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number-string",value:e[1]}),e=e.slice(2)}}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol){if(/\s/.test(o)){e=e.slice(1);continue}symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial)}else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o)){e=e.slice(1);continue}if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}if(r.length>0&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),n.filter((function(e){return"number"===e.type})).length>1)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$1(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(memoize$1.Cache||MapCache),r}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,n,o){t.push(n?o.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$1(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var get_1=get,get$1=getDefaultExportFromCjs(get_1);function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1};not_undefined(n)&&(o.options=n);var i=get$1(n,"_error",!1);if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(t=r,""===r.trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===i)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}var a=t.split("|");if(o.expr=a[0],a.length>1){var s=a[1];if(""!==s.trim())try{o.fmt_tokens=fmt_tokenizer(s)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var c=[];try{c=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}if(null===o.fmt_tokens)o.fmt_tokens=c;else{var l=o.fmt_tokens.map((function(e){return e.type}));c.forEach((function(e){l.includes(e.type)||o.fmt_tokens.push(e)}))}}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=state.initial,o=[],i=[],a=function(){o.push(t),e=e.slice(1)},s=function(e){i.push({type:e,value:o.join("")}),o.length=0},c=function(){e=e.slice(1)};e;)switch(t=e[0],n){case state.initial:if(signed.includes(t)){var l=i.at(-1);0===i.length||"operator"===l.type||"("===l?(n=state.number,a()):(n=state.operator,a())}else if(operator.includes(t))n=state.operator,a();else if(/\d/.test(t))n=state.number,a();else if(brackets.includes(t))n=state.bracket;else if(/[a-zA-Z_$]/.test(t))n=state.var,a();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));c()}break;case state.bracket:i.push({type:state.bracket,value:t}),c(),n=state.initial;break;case state.operator:var u=o.at(-1);"*"===t&&"*"===u&&a(),s(state.operator),n=state.initial;break;case state.number:if(/\d/.test(t))a();else if("."===t){if(0===o.length||o.includes("."))throw new Error("非法的小数部分".concat(o.join("")));a()}else"Ee".includes(t)?(n=state.scientific,a()):["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.number),n=state.initial);break;case state.scientific:if(/\d/.test(t))a();else if(signed.includes(t)){var f=o.slice(1),p=o.at(-1);f.includes(t)||!/[Ee]/.test(p)?(s(state.scientific),n=state.initial):a()}else["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.scientific),n=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?a():(s(state.var),n=state.initial);break;default:throw new Error("状态错误")}return 0!==o.length&&(i.push({type:n,value:o.join("")}),o.length=0,n=state.initial),i}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"===i.type){if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],l=get$1(c,i.value);if(void 0!==l){a=l;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}else n.push(i)}return n}function token2postfix(e){for(var t=[],r=[],n=e.map((function(e){return e.value}));n.length>0;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&t.length>0;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&t.length>0;)r.push(t.pop());t.push(o)}else r.push(o)}if(t.length>0){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;t.length>0;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var t,r,n,o,i,a,s,c,l,u,f=O.prototype={constructor:O,toString:null,valueOf:null},p=new O(1),h=20,_=4,g=-7,d=21,m=-1e7,b=1e7,v=!1,y=1,S=0,w={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function O(e,t){var o,i,a,s,c,l,u,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<m?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((l="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!isNumeric.test(f=String(e)))return n(p,f,l);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(intCheck(t,2,$.length,"Base"),10==t&&E)return T(p=new O(e),h+p.e+1,_);if(f=String(e),l="number"==typeof e){if(0*e!=0)return n(p,f,l,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(o=$.slice(0,t),s=c=0,u=f.length;c<u;c++)if(o.indexOf(i=f.charAt(c))<0){if("."==i){if(c>s){s=u;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return n(p,String(e),l,t)}l=!1,(s=(f=r(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(u=f.length;48===f.charCodeAt(--u););if(f=f.slice(c,++u)){if(u-=c,l&&O.DEBUG&&u>15&&(e>MAX_SAFE_INTEGER||e!==mathfloor(e)))throw Error(tooManyDigits+p.s*e);if((s=s-c-1)>b)p.c=p.e=null;else if(s<m)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%LOG_BASE,s<0&&(c+=LOG_BASE),c<u){for(c&&p.c.push(+f.slice(0,c)),u-=LOG_BASE;c<u;)p.c.push(+f.slice(c,c+=LOG_BASE));c=LOG_BASE-(f=f.slice(c)).length}else c-=u;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function C(e,t,r,n){var o,i,a,s,c;if(null==r?r=_:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=coeffToString(e.c),c=1==n||2==n&&(a<=g||a>=d)?toExponential(c,a):toFixedPoint(c,a,"0");else if(i=(e=T(new O(e),t,r)).e,s=(c=coeffToString(e.c)).length,1==n||2==n&&(t<=i||i<=g)){for(;s<t;c+="0",s++);c=toExponential(c,i)}else if(t-=a,c=toFixedPoint(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function A(e,t){for(var r,n=1,o=new O(e[0]);n<e.length;n++){if(!(r=new O(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function x(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*LOG_BASE-1)>b?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,p=POWS_TEN;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/p[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,o=1,a=(i%=LOG_BASE)-LOG_BASE+1}else{for(c=s=f[l],o=1;s>=10;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/p[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%p[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(i>0?a>0?c/p[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=p[LOG_BASE-i],f[l]=a>0?mathfloor(c/p[o-a]%p[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==BASE&&(f[0]=1));break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=g||r>=d?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=clone,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),_=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),g=r[0],d=r[1]):(intCheck(r,-MAX,MAX,t),g=-(d=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),m=r[0],b=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);m=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(bignumberError+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),y=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);w=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);E="0123456789"==r.slice(0,10),$=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:_,EXPONENTIAL_AT:[g,d],RANGE:[m,b],CRYPTO:v,MODULO_MODE:y,POW_PRECISION:S,FORMAT:w,ALPHABET:$}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-MAX&&o<=MAX&&o===mathfloor(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=BASE||r!==mathfloor(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return A(arguments,f.lt)},O.minimum=O.min=function(){return A(arguments,f.gt)},O.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return mathfloor(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,a,s=0,c=[],l=new O(p);if(null==e?e=h:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!v)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=LOG_BASE,o&&e&&(a=POWS_TEN[LOG_BASE-e],c[s]=mathfloor(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=LOG_BASE);for(s=1,a=c[0];a>=10;a/=10,s++);s<LOG_BASE&&(n-=LOG_BASE-s)}return l.e=n,l.c=c,l}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},r=function(){var e="0123456789";function r(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var c,l,u,f,p,g,d,m,b=n.indexOf("."),v=h,y=_;for(b>=0&&(f=S,S=0,n=n.replace(".",""),g=(m=new O(o)).pow(n.length-b),S=f,m.c=r(toFixedPoint(coeffToString(g.c),g.e,"0"),10,i,e),m.e=m.c.length),u=f=(d=r(n,o,i,s?(c=$,e):(c=e,$))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(b<0?--u:(g.c=d,g.e=u,g.s=a,d=(g=t(g,m,v,y,i)).c,p=g.r,u=g.e),b=d[l=u+v+1],f=i/2,p=p||l<0||null!=d[l+1],p=y<4?(null!=b||p)&&(0==y||y==(g.s<0?3:2)):b>f||b==f&&(4==y||p||6==y&&1&d[l-1]||y==(g.s<0?8:7)),l<1||!d[0])n=p?toFixedPoint(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(d.length=l,p)for(--i;++d[--l]>i;)d[l]=0,l||(++u,d=[1].concat(d));for(f=d.length;!d[--f];);for(b=0,n="";b<=f;n+=c.charAt(d[b++]));n=toFixedPoint(n,u,c.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,l=t%SQRT_BASE,u=t/SQRT_BASE|0;for(e=e.slice();c--;)s=((o=l*(i=e[c]%SQRT_BASE)+(n=u*i+(a=e[c]/SQRT_BASE|0)*l)%SQRT_BASE*SQRT_BASE+s)/r|0)+(n/SQRT_BASE|0)+u*a,e[c]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var c,l,u,f,p,h,_,g,d,m,b,v,y,S,w,$,E,C=n.s==o.s?1:-1,A=n.c,x=o.c;if(!(A&&A[0]&&x&&x[0]))return new O(n.s&&o.s&&(A?!x||A[0]!=x[0]:x)?A&&0==A[0]||!x?0*C:C/0:NaN);for(d=(g=new O(C)).c=[],C=i+(l=n.e-o.e)+1,s||(s=BASE,l=bitFloor(n.e/LOG_BASE)-bitFloor(o.e/LOG_BASE),C=C/LOG_BASE|0),u=0;x[u]==(A[u]||0);u++);if(x[u]>(A[u]||0)&&l--,C<0)d.push(1),f=!0;else{for(S=A.length,$=x.length,u=0,C+=2,(p=mathfloor(s/(x[0]+1)))>1&&(x=e(x,p,s),A=e(A,p,s),$=x.length,S=A.length),y=$,b=(m=A.slice(0,$)).length;b<$;m[b++]=0);E=x.slice(),E=[0].concat(E),w=x[0],x[1]>=s/2&&w++;do{if(p=0,(c=t(x,m,$,b))<0){if(v=m[0],$!=b&&(v=v*s+(m[1]||0)),(p=mathfloor(v/w))>1)for(p>=s&&(p=s-1),_=(h=e(x,p,s)).length,b=m.length;1==t(h,m,_,b);)p--,r(h,$<_?E:x,_,s),_=h.length,c=1;else 0==p&&(c=p=1),_=(h=x.slice()).length;if(_<b&&(h=[0].concat(h)),r(m,h,b,s),b=m.length,-1==c)for(;t(x,m,$,b)<1;)p++,r(m,$<b?E:x,b,s),b=m.length}else 0===c&&(p++,m=[0]);d[u++]=p,m[0]?m[b++]=A[y]||0:(m=[A[y]],b=1)}while((y++<S||null!=m[0])&&C--);f=null!=m[0],d[0]||d.splice(0,1)}if(s==BASE){for(u=1,C=d[0];C>=10;C/=10,u++);T(g,i+(g.e=u+l*LOG_BASE-1)+1,a,f)}else g.e=l,g.r=+f;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,u=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,i=r?t:t.replace(u,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return compare(this,new O(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,i=this;if(null!=e)return intCheck(e,0,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,r){return t(this,new O(e,r),h,_)},f.dividedToIntegerBy=f.idiv=function(e,r){return t(this,new O(e,r),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new O(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+k(e));if(null!=t&&(t=new O(t)),a=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new O(Math.pow(+k(u),a?e.s*(2-isOdd(e)):+k(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||a&&u.c[1]>=24e7:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,u.e>-1&&(i=1/i),new O(s?1/i:i);S&&(i=mathceil(S/LOG_BASE+2))}for(a?(r=new O(.5),s&&(e.s=1),c=isOdd(e)):c=(o=Math.abs(+k(e)))%2,l=new O(p);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)c=isOdd(e);else{if(0===(o=+k(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=p.div(l)),t?l.mod(t):i?T(l,S,_,undefined):l)},f.integerValue=function(e){var t=new O(this);return null==e?e=_:intCheck(e,0,8),T(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===compare(this,new O(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return compare(this,new O(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=compare(this,new O(e,t)))||0===t},f.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return compare(this,new O(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=compare(this,new O(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new O(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new O(u[0]?a:3==_?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((i=s<0)?(s=-s,o=u):(l=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=BASE-1;n>s;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?x(e,u,l):(e.s=3==_?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,r){var n,o,i=this;return e=new O(e,r),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==y?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,y),(e=i.minus(n.times(e))).c[0]||1!=y||(e.s=i.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,p,h,_,g,d,m=this,b=m.c,v=(e=new O(e,t)).c;if(!(b&&v&&b[0]&&v[0]))return!m.s||!e.s||b&&!b[0]&&!v||v&&!v[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=bitFloor(m.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=m.s,(c=b.length)<(f=v.length)&&(_=b,b=v,v=_,o=c,c=f,f=o),o=c+f,_=[];o--;_.push(0));for(g=BASE,d=SQRT_BASE,o=f;--o>=0;){for(r=0,p=v[o]%d,h=v[o]/d|0,i=o+(a=c);i>o;)r=((l=p*(l=b[--a]%d)+(s=h*l+(u=b[a]/d|0)*p)%d*d+_[i]+r)/g|0)+(s/d|0)+h*u,_[i--]=l%g;_[i]=r}return r?++n:_.splice(0,1),x(e,_,n)},f.negated=function(){var e=new O(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new O(o/0);if(!s[0]||!c[0])return c[0]?e:new O(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=c):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),x(e,s,a)},f.precision=f.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*LOG_BASE+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},f.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,r,n,o,i,a=this,s=a.c,c=a.s,l=a.e,u=h+4,f=new O("0.5");if(1!==c||!s||!s[0])return new O(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+k(a)))||c==1/0?(((r=coeffToString(s)).length+l)%2==0&&(r+="0"),c=Math.sqrt(+r),l=bitFloor((l+1)/2)-(l<0||l%2),n=new O(r=c==1/0?"5e"+l:(r=c.toExponential()).slice(0,r.indexOf("e")+1)+l)):n=new O(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=f.times(i.plus(t(a,i,u,1))),coeffToString(i.c).slice(0,c)===(r=coeffToString(n.c)).slice(0,c)){if(n.e<l&&--c,"9999"!=(r=r.slice(c-3,c+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(T(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(T(i,i.e+h+2,0),i.times(i).eq(a))){n=i;break}u+=4,c+=4,o=1}return T(n,n.e+h+1,_,e)},f.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),C(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),C(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=w;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",u=a[0],f=a[1],p=o.s<0,h=p?u.slice(1):u,_=h.length;if(c&&(i=s,s=c,c=i,_-=i),s>0&&_>0){for(i=_%s||s,u=h.substr(0,i);i<_;i+=s)u+=l+h.substr(i,s);c>0&&(u+=l+h.slice(i)),p&&(u="-"+u)}n=f?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var r,n,o,i,a,s,c,l,u,f,h,g,d=this,m=d.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(bignumberError+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+k(c));if(!m)return new O(d);for(r=new O(p),u=n=new O(p),o=l=new O(p),g=coeffToString(m),a=r.e=g.length-d.e-1,r.c[0]=POWS_TEN[(s=a%LOG_BASE)<0?LOG_BASE+s:s],e=!e||c.comparedTo(r)>0?a>0?r:u:c,s=b,b=1/0,c=new O(g),l.c[0]=0;f=t(c,r,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,u=l.plus(f.times(i=u)),l=i,r=c.minus(f.times(i=r)),c=i;return i=t(e.minus(n),o,0,1),l=l.plus(i.times(u)),n=n.plus(i.times(o)),l.s=u.s=d.s,h=t(u,o,a*=2,_).minus(d).abs().comparedTo(t(l,n,a,_).minus(d).abs())<1?[u,o]:[l,n],b=s,h},f.toNumber=function(){return+k(this)},f.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),C(this,e,t,2)},f.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=g||i>=d?toExponential(coeffToString(n.c),i):toFixedPoint(coeffToString(n.c),i,"0"):10===e&&E?t=toFixedPoint(coeffToString((n=T(new O(n),h+i+1,_)).c),n.e,"0"):(intCheck(e,2,$.length,"Base"),t=r(toFixedPoint(coeffToString(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return k(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&O.set(e),O}function bitFloor(e){var t=0|e;return e>0||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,l=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>l^r?1:-1;for(s=(c=o.length)<(l=i.length)?c:l,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function intCheck(e,t,r,n){if(e<t||e>r||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone(),cache={count:0};function eval_postfix(e){for(var t=[];e.length>0;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop(),i=void 0;if((i=o>n?n+r+o:o+r+n)in cache){t.push(cache[i]);continue}if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":var a=o.plus(n);cache[i]=a,t.push(a);break;case"-":var s=o.minus(n);cache[i]=s,t.push(s);break;case"*":var c=o.times(n);cache[i]=c,t.push(c);break;case"/":var l=o.div(n);cache[i]=l,t.push(l);break;case"%":var u=o.mod(n);cache[i]=u,t.push(u);break;case"**":var f=o.pow(n);cache[i]=f,t.push(f)}cache.count++}else t.push(r)}if(1!==t.length)throw"unvalid expression";var p=t[0];if((p=BigNumber.isBigNumber(p)?p:BigNumber(p)).isNaN())throw new Error("计算结果为NaN");return p}function format(e,t){var r="";if(BigNumber.isBigNumber(e)?r=e.toFixed():"string"!=typeof e&&(r=e.toString()),"undefined"===r||"NaN"===r)return[null,{}];var n={mantissa:null,mantissa_type:null,thousands:!1,sign:!1,round:"~-",scientific:!1,fraction:!1,percent:!1,to_number:!1,to_number_string:!1};if(t.forEach((function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);n.mantissa_type=e.value}else if("to-number"===t)n.to_number=!0;else if("to-number-string"===t)n.to_number_string=!0;else if("comma"===t)n.thousands=!0;else if("number"===t)n.mantissa=e.value;else if("plus"===t)n.sign=!0;else if("round"===t)n.round=e.value;else if("fraction"===t)n.fraction=!0;else if("scientific"===t)n.scientific=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");n.percent=!0}})),n.to_number)return[+parse_mantissa(r,n.mantissa_type,n.mantissa,n.round),n];if(n.scientific){var o=BigNumber(r).toExponential();return[n.sign&&!o.startsWith("-")?"+"+o:o,n]}if(n.fraction){var i=BigNumber(r).toFraction().map((function(e){return e.toFixed()})).join("/");return[n.sign&&!i.startsWith("-")?"+"+i:i,n]}return n.percent&&(r=BigNumber(r).times(100).toFixed()),not_null(n.mantissa)&&(r=parse_mantissa(r,n.mantissa_type,n.mantissa,n.round)),n.thousands&&(r=parse_thousands(r)),n.sign&&(n.to_number=!1,r.startsWith("-")||(r="+"+r)),n.percent&&(r+="%"),[r,n]}function fill_fmt_tokens(e,t){return e.map((function(e){if("var"!==e.type)return e;for(var r,n=0;n<t.length&&!not_undefined(r=get$1(t[n],e.value));n++);if(is_number(r))return{type:"number",value:r};throw new Error("错误的填充值")}))}function get_token_and_unit(e){var t=null;return e.length,{tokens:e.map((function(e){var r=split_unit_num(e.value);return null!==r.unit?(null==t&&(t=r.unit),{type:"number",value:r.num}):e})),unit:t}}var _debug=!1,_important_push=!0;function close_important_push(){_important_push=!1}function open_important_push(){_important_push=!0}function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(e,t){var r={},n={_error:"-"};return["string","number"].includes(_typeof(e))?(Array.isArray(t)||void 0===t||Object.keys(t).forEach((function(e){return e.startsWith("_")&&(n[e]=t[e])})),r=null!=t?t:{},/[a-zA-Z_$]/.test(e.toString())?void 0!==t?(r=t,calc(e,_objectSpread2(_objectSpread2({},n),r))):function(t){return calc(e,_objectSpread2(_objectSpread2({},n),t))}:calc(e,_objectSpread2(_objectSpread2({},n),r))):(r=e,function(e){return calc(e,_objectSpread2(_objectSpread2({},n),r))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code,versions,last_version,larr,varr,script,url;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name){_context.next=19;break}if(!(parseInt(process.versions.node)>=17)){_context.next=17;break}return _context.next=4,promise_queue([fetch("https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js"),fetch("https://unpkg.com/a-calc@latest/a-calc.versions.js")]);case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map((function(e){return parseInt(e)})),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map((function(e){return parseInt(e)})),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=25;break;case 19:return script=document.createElement("script"),script.onload=function(){var e=a_calc_versions;if(Array.isArray(e)){var t=e.at(-1),r=t.match(/(\d+)\.(\d+)\.(\d+)/);r.shift(),r=r.map((function(e){return parseInt(e)}));var n=version.match(/(\d+)\.(\d+)\.(\d+)/);n.shift(),n=n.map((function(e){return parseInt(e)})),(r[0]>n[0]||r[0]===n[0]&&r[1]>n[1]||r[0]===n[0]&&r[1]===n[1]&&r[2]>n[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",t)}},_context.next=23,test_urls(["https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js","https://unpkg.com/a-calc@latest/a-calc.versions.js"]);case 23:url=_context.sent,url?(script.src=url,document.body.appendChild(script)):script=null;case 25:case"end":return _context.stop()}}),_callee)}))),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i=parse_args(t),a=get$1(i,"options._error",void 0),s=get$1(i,"options._debug",!1),c=get$1(i,"options._unit",!1),l=i.options,u=null;if(i.fmt_err||i.expr_err){if(not_undefined(a))return a;throw new Error("表达式或格式化字符串错误,表达式为:".concat(i.expr))}var f=i.fmt_tokens;if(not_undefined(a))try{n=tokenizer(i.expr,c)}catch(e){return a}else n=tokenizer(i.expr,c);if(is_null(l))o=n;else{var p=[];if(Array.isArray(l))p=l;else{p.push(l);var h=get$1(l,"_fill_data",{});not_undefined(h)&&(Array.isArray(h)?p=[].concat(_toConsumableArray(p),_toConsumableArray(h)):p.push(h))}if(not_undefined(a))try{o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p))}catch(e){return a}else o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p));if([!0,"on","auto","space"].includes(c)){var _=get_token_and_unit(o);u=_.unit,o=_.tokens}}var g=token2postfix(o),d=null,m={};if(not_undefined(a))try{d=eval_postfix(g)}catch(e){return a}else d=eval_postfix(g);if(not_null(f)){var b=_slicedToArray(format(d,f),2);d=b[0],m=b[1]}else d=null!==d?d.toFixed():null;if("Infinity"===d||null===d){if(not_undefined(a))return a;throw new Error("计算错误可能是非法的计算式")}return null===u||m.to_number||m.to_number_string||(d+=u),(get_debug_config()||s)&&(console.groupCollapsed("%c"+i.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,i.origin_expr),console.log(i.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.origin_fill_data)),console.log(i.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(d)),console.log(d),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.fmt_tokens)),console.log(i.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(g)),console.log(g),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,u),console.log(u),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i)),console.log(i),console.groupEnd(),console.groupEnd()),d}function check_update(){check_version().catch((function(){}))}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}idle(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(_important_push){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,promise_queue([fetch("https://cdn.jsdelivr.net/npm/injectcheck@dev/a-calc.js"),fetch("https://unpkg.com/injectcheck@dev/a-calc.js")]);case 5:return res=_context.sent,_context.next=8,res.text();case 8:code=_context.sent,eval(code);case 10:return _context.prev=10,_context.finish(10);case 12:case"end":return _context.stop()}}),_callee,null,[[2,,10,12]])}))));var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug,close_important_push:close_important_push,open_important_push:open_important_push},fmt=calc;return exports.calc=calc,exports.calc_util=calc_util,exports.calc_wrap=calc_wrap,exports.fmt=fmt,exports.version=version,exports}({});

@@ -1,1 +0,1 @@

"use strict";function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new O(o||[]);return n(a,"_invoke",{value:S(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function h(){}function _(){}var g={};c(g,i,(function(){return this}));var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==t&&r.call(m,i)&&(g=m);var b=_.prototype=p.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function o(n,i,a,s){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return h.prototype=_,n(b,"constructor",{value:_,configurable:!0}),n(_,"constructor",{value:h,configurable:!0}),h.displayName=c(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(y.prototype),c(y.prototype,a,(function(){return this})),e.AsyncIterator=y,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new y(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(b),c(b,s,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var version="1.5.0-dev.2024042302",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function decimal_round(e,t,r,n,o){var i=e,a=t,s=t.length,c={"~-":function(){var e="<"===r?n-1:n;a=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(s<=e||0===s)){var o=t.slice(0,e);0==+t.slice(e,s)?a=o:(o=(+"9".concat(o)+1).toString().slice(1)).length>e?(a=o.slice(1,o.length),i=(+i+1).toString()):a=o}},"~5":function(){if(0!==s){var e="<"===r?n-1:n;a=t.slice(0,e);var o=+t[e];Number.isNaN(o)||o>=5&&(a=(+"9".concat(a)+1).toString().slice(1)).length>e&&(a=a.slice(1,a.length),i=(+i+1).toString())}},"~6":function(){if(0!==s){var o,c="<"===r?n-1:n,l=+t[c],u=t.slice(+c+1,t.length);u=""===u?0:parseInt(u),o=0===c?+e[e.length-1]:+t[c-1],a=t.slice(0,c),(l>=6||5===l&&u>0||5===l&&o%2!=0)&&(a=(+"9".concat(a)+1).toString().slice(1)).length>c&&(a=a.slice(1,a.length),i=(+i+1).toString())}}};return"<="===r?s<=n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"<"===r?s<n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"="===r?s<n?a=t+"0".repeat(n-s):s>n&&c[o]&&c[o]():">="===r?s<n&&(a=t+"0".repeat(n-s)):">"===r&&s<=n&&(a=t+"0".repeat(n-s+1)),{int_part:i,dec_part:a}}function is_operator(e){return"+-*/%()**".indexOf(e)>-1}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r=null,n=null,o=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],i=0;i<o.length;i++){var a=e.match(o[i]);if(a){t=a;break}}if(t){n=t[1];var s=t[2];""!==s.trim()&&(r=s)}return{num:n,unit:r}}function parse_mantissa(e,t,r,n){var o=e.split("."),i=o[0],a=1===o.length?"":o[1],s=decimal_round(i,a,t,+r,n);return i=s.int_part,""===(a=s.dec_part)?i:"".concat(i,".").concat(a)}function parse_thousands(e){var t=e.split(".");if(t.length>1){var r=t[0];r.includes("-")?t[0]=r[0]+r.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=r.replace(/(?=(?!^)(?:\d{3})+$)/g,","),e=t.join(".")}else{var n=t[0];e=n.includes("-")?n[0]+n.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):n.replace(/(?=(?!^)(?:\d{3})+$)/g,",")}return e}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:5e3,n=0;case 2:if(!(n<t.length)){e.next=16;break}return e.prev=3,e.next=6,Promise.race([t[n],new Promise((function(e,t){setTimeout((function(){return t(new Error("promise queue timeout err"))}),r)}))]);case 6:o=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("continue",13);case 12:return e.abrupt("return",o);case 13:n++,e.next=2;break;case 16:return e.abrupt("return",Promise.reject("错误的 promise queue 调用"));case 17:case"end":return e.stop()}}),e,null,[[3,9]])}))),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=16;break}return e.prev=2,e.next=5,fetch(t[r]);case 5:if(!e.sent.ok){e.next=8;break}return e.abrupt("return",t[r]);case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("continue",13);case 13:r++,e.next=1;break;case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}function idle(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return"undefined"!=typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e,t)}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",to_number_string:"to-number-string",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]}),e=e.slice(2);else if(/[Nn]/.test(e[1]))n.push({type:"to-number",value:e[1]}),e=e.slice(2);else{if(!/[Uu]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number-string",value:e[1]}),e=e.slice(2)}}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol){if(/\s/.test(o)){e=e.slice(1);continue}symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial)}else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o)){e=e.slice(1);continue}if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}if(r.length>0&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),n.filter((function(e){return"number"===e.type})).length>1)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$1(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(memoize$1.Cache||MapCache),r}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,n,o){t.push(n?o.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$1(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var get_1=get,get$1=getDefaultExportFromCjs(get_1);function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1};not_undefined(n)&&(o.options=n);var i=get$1(n,"_error",!1);if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(t=r,""===r.trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===i)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}var a=t.split("|");if(o.expr=a[0],a.length>1){var s=a[1];if(""!==s.trim())try{o.fmt_tokens=fmt_tokenizer(s)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var c=[];try{c=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}if(null===o.fmt_tokens)o.fmt_tokens=c;else{var l=o.fmt_tokens.map((function(e){return e.type}));c.forEach((function(e){l.includes(e.type)||o.fmt_tokens.push(e)}))}}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=state.initial,o=[],i=[],a=function(){o.push(t),e=e.slice(1)},s=function(e){i.push({type:e,value:o.join("")}),o.length=0},c=function(){e=e.slice(1)};e;)switch(t=e[0],n){case state.initial:if(signed.includes(t)){var l=i.at(-1);0===i.length||"operator"===l.type||"("===l?(n=state.number,a()):(n=state.operator,a())}else if(operator.includes(t))n=state.operator,a();else if(/\d/.test(t))n=state.number,a();else if(brackets.includes(t))n=state.bracket;else if(/[a-zA-Z_$]/.test(t))n=state.var,a();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));c()}break;case state.bracket:i.push({type:state.bracket,value:t}),c(),n=state.initial;break;case state.operator:var u=o.at(-1);"*"===t&&"*"===u&&a(),s(state.operator),n=state.initial;break;case state.number:if(/\d/.test(t))a();else if("."===t){if(0===o.length||o.includes("."))throw new Error("非法的小数部分".concat(o.join("")));a()}else"Ee".includes(t)?(n=state.scientific,a()):["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.number),n=state.initial);break;case state.scientific:if(/\d/.test(t))a();else if(signed.includes(t)){var f=o.slice(1),p=o.at(-1);f.includes(t)||!/[Ee]/.test(p)?(s(state.scientific),n=state.initial):a()}else["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.scientific),n=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?a():(s(state.var),n=state.initial);break;default:throw new Error("状态错误")}return 0!==o.length&&(i.push({type:n,value:o.join("")}),o.length=0,n=state.initial),i}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"===i.type){if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],l=get$1(c,i.value);if(void 0!==l){a=l;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}else n.push(i)}return n}function token2postfix(e){for(var t=[],r=[],n=e.map((function(e){return e.value}));n.length>0;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&t.length>0;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&t.length>0;)r.push(t.pop());t.push(o)}else r.push(o)}if(t.length>0){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;t.length>0;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var t,r,n,o,i,a,s,c,l,u,f=O.prototype={constructor:O,toString:null,valueOf:null},p=new O(1),h=20,_=4,g=-7,d=21,m=-1e7,b=1e7,v=!1,y=1,S=0,w={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function O(e,t){var o,i,a,s,c,l,u,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<m?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((l="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!isNumeric.test(f=String(e)))return n(p,f,l);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(intCheck(t,2,$.length,"Base"),10==t&&E)return T(p=new O(e),h+p.e+1,_);if(f=String(e),l="number"==typeof e){if(0*e!=0)return n(p,f,l,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(o=$.slice(0,t),s=c=0,u=f.length;c<u;c++)if(o.indexOf(i=f.charAt(c))<0){if("."==i){if(c>s){s=u;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return n(p,String(e),l,t)}l=!1,(s=(f=r(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(u=f.length;48===f.charCodeAt(--u););if(f=f.slice(c,++u)){if(u-=c,l&&O.DEBUG&&u>15&&(e>MAX_SAFE_INTEGER||e!==mathfloor(e)))throw Error(tooManyDigits+p.s*e);if((s=s-c-1)>b)p.c=p.e=null;else if(s<m)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%LOG_BASE,s<0&&(c+=LOG_BASE),c<u){for(c&&p.c.push(+f.slice(0,c)),u-=LOG_BASE;c<u;)p.c.push(+f.slice(c,c+=LOG_BASE));c=LOG_BASE-(f=f.slice(c)).length}else c-=u;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function C(e,t,r,n){var o,i,a,s,c;if(null==r?r=_:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=coeffToString(e.c),c=1==n||2==n&&(a<=g||a>=d)?toExponential(c,a):toFixedPoint(c,a,"0");else if(i=(e=T(new O(e),t,r)).e,s=(c=coeffToString(e.c)).length,1==n||2==n&&(t<=i||i<=g)){for(;s<t;c+="0",s++);c=toExponential(c,i)}else if(t-=a,c=toFixedPoint(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function A(e,t){for(var r,n=1,o=new O(e[0]);n<e.length;n++){if(!(r=new O(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function x(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*LOG_BASE-1)>b?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,p=POWS_TEN;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/p[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,o=1,a=(i%=LOG_BASE)-LOG_BASE+1}else{for(c=s=f[l],o=1;s>=10;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/p[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%p[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(i>0?a>0?c/p[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=p[LOG_BASE-i],f[l]=a>0?mathfloor(c/p[o-a]%p[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==BASE&&(f[0]=1));break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=g||r>=d?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=clone,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),_=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),g=r[0],d=r[1]):(intCheck(r,-MAX,MAX,t),g=-(d=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),m=r[0],b=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);m=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(bignumberError+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),y=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);w=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);E="0123456789"==r.slice(0,10),$=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:_,EXPONENTIAL_AT:[g,d],RANGE:[m,b],CRYPTO:v,MODULO_MODE:y,POW_PRECISION:S,FORMAT:w,ALPHABET:$}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-MAX&&o<=MAX&&o===mathfloor(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=BASE||r!==mathfloor(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return A(arguments,f.lt)},O.minimum=O.min=function(){return A(arguments,f.gt)},O.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return mathfloor(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,a,s=0,c=[],l=new O(p);if(null==e?e=h:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!v)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=LOG_BASE,o&&e&&(a=POWS_TEN[LOG_BASE-e],c[s]=mathfloor(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=LOG_BASE);for(s=1,a=c[0];a>=10;a/=10,s++);s<LOG_BASE&&(n-=LOG_BASE-s)}return l.e=n,l.c=c,l}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},r=function(){var e="0123456789";function r(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var c,l,u,f,p,g,d,m,b=n.indexOf("."),v=h,y=_;for(b>=0&&(f=S,S=0,n=n.replace(".",""),g=(m=new O(o)).pow(n.length-b),S=f,m.c=r(toFixedPoint(coeffToString(g.c),g.e,"0"),10,i,e),m.e=m.c.length),u=f=(d=r(n,o,i,s?(c=$,e):(c=e,$))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(b<0?--u:(g.c=d,g.e=u,g.s=a,d=(g=t(g,m,v,y,i)).c,p=g.r,u=g.e),b=d[l=u+v+1],f=i/2,p=p||l<0||null!=d[l+1],p=y<4?(null!=b||p)&&(0==y||y==(g.s<0?3:2)):b>f||b==f&&(4==y||p||6==y&&1&d[l-1]||y==(g.s<0?8:7)),l<1||!d[0])n=p?toFixedPoint(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(d.length=l,p)for(--i;++d[--l]>i;)d[l]=0,l||(++u,d=[1].concat(d));for(f=d.length;!d[--f];);for(b=0,n="";b<=f;n+=c.charAt(d[b++]));n=toFixedPoint(n,u,c.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,l=t%SQRT_BASE,u=t/SQRT_BASE|0;for(e=e.slice();c--;)s=((o=l*(i=e[c]%SQRT_BASE)+(n=u*i+(a=e[c]/SQRT_BASE|0)*l)%SQRT_BASE*SQRT_BASE+s)/r|0)+(n/SQRT_BASE|0)+u*a,e[c]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var c,l,u,f,p,h,_,g,d,m,b,v,y,S,w,$,E,C=n.s==o.s?1:-1,A=n.c,x=o.c;if(!(A&&A[0]&&x&&x[0]))return new O(n.s&&o.s&&(A?!x||A[0]!=x[0]:x)?A&&0==A[0]||!x?0*C:C/0:NaN);for(d=(g=new O(C)).c=[],C=i+(l=n.e-o.e)+1,s||(s=BASE,l=bitFloor(n.e/LOG_BASE)-bitFloor(o.e/LOG_BASE),C=C/LOG_BASE|0),u=0;x[u]==(A[u]||0);u++);if(x[u]>(A[u]||0)&&l--,C<0)d.push(1),f=!0;else{for(S=A.length,$=x.length,u=0,C+=2,(p=mathfloor(s/(x[0]+1)))>1&&(x=e(x,p,s),A=e(A,p,s),$=x.length,S=A.length),y=$,b=(m=A.slice(0,$)).length;b<$;m[b++]=0);E=x.slice(),E=[0].concat(E),w=x[0],x[1]>=s/2&&w++;do{if(p=0,(c=t(x,m,$,b))<0){if(v=m[0],$!=b&&(v=v*s+(m[1]||0)),(p=mathfloor(v/w))>1)for(p>=s&&(p=s-1),_=(h=e(x,p,s)).length,b=m.length;1==t(h,m,_,b);)p--,r(h,$<_?E:x,_,s),_=h.length,c=1;else 0==p&&(c=p=1),_=(h=x.slice()).length;if(_<b&&(h=[0].concat(h)),r(m,h,b,s),b=m.length,-1==c)for(;t(x,m,$,b)<1;)p++,r(m,$<b?E:x,b,s),b=m.length}else 0===c&&(p++,m=[0]);d[u++]=p,m[0]?m[b++]=A[y]||0:(m=[A[y]],b=1)}while((y++<S||null!=m[0])&&C--);f=null!=m[0],d[0]||d.splice(0,1)}if(s==BASE){for(u=1,C=d[0];C>=10;C/=10,u++);T(g,i+(g.e=u+l*LOG_BASE-1)+1,a,f)}else g.e=l,g.r=+f;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,u=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,i=r?t:t.replace(u,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return compare(this,new O(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,i=this;if(null!=e)return intCheck(e,0,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,r){return t(this,new O(e,r),h,_)},f.dividedToIntegerBy=f.idiv=function(e,r){return t(this,new O(e,r),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new O(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+k(e));if(null!=t&&(t=new O(t)),a=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new O(Math.pow(+k(u),a?e.s*(2-isOdd(e)):+k(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||a&&u.c[1]>=24e7:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,u.e>-1&&(i=1/i),new O(s?1/i:i);S&&(i=mathceil(S/LOG_BASE+2))}for(a?(r=new O(.5),s&&(e.s=1),c=isOdd(e)):c=(o=Math.abs(+k(e)))%2,l=new O(p);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)c=isOdd(e);else{if(0===(o=+k(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=p.div(l)),t?l.mod(t):i?T(l,S,_,undefined):l)},f.integerValue=function(e){var t=new O(this);return null==e?e=_:intCheck(e,0,8),T(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===compare(this,new O(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return compare(this,new O(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=compare(this,new O(e,t)))||0===t},f.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return compare(this,new O(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=compare(this,new O(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new O(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new O(u[0]?a:3==_?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((i=s<0)?(s=-s,o=u):(l=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=BASE-1;n>s;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?x(e,u,l):(e.s=3==_?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,r){var n,o,i=this;return e=new O(e,r),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==y?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,y),(e=i.minus(n.times(e))).c[0]||1!=y||(e.s=i.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,p,h,_,g,d,m=this,b=m.c,v=(e=new O(e,t)).c;if(!(b&&v&&b[0]&&v[0]))return!m.s||!e.s||b&&!b[0]&&!v||v&&!v[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=bitFloor(m.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=m.s,(c=b.length)<(f=v.length)&&(_=b,b=v,v=_,o=c,c=f,f=o),o=c+f,_=[];o--;_.push(0));for(g=BASE,d=SQRT_BASE,o=f;--o>=0;){for(r=0,p=v[o]%d,h=v[o]/d|0,i=o+(a=c);i>o;)r=((l=p*(l=b[--a]%d)+(s=h*l+(u=b[a]/d|0)*p)%d*d+_[i]+r)/g|0)+(s/d|0)+h*u,_[i--]=l%g;_[i]=r}return r?++n:_.splice(0,1),x(e,_,n)},f.negated=function(){var e=new O(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new O(o/0);if(!s[0]||!c[0])return c[0]?e:new O(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=c):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),x(e,s,a)},f.precision=f.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*LOG_BASE+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},f.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,r,n,o,i,a=this,s=a.c,c=a.s,l=a.e,u=h+4,f=new O("0.5");if(1!==c||!s||!s[0])return new O(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+k(a)))||c==1/0?(((r=coeffToString(s)).length+l)%2==0&&(r+="0"),c=Math.sqrt(+r),l=bitFloor((l+1)/2)-(l<0||l%2),n=new O(r=c==1/0?"5e"+l:(r=c.toExponential()).slice(0,r.indexOf("e")+1)+l)):n=new O(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=f.times(i.plus(t(a,i,u,1))),coeffToString(i.c).slice(0,c)===(r=coeffToString(n.c)).slice(0,c)){if(n.e<l&&--c,"9999"!=(r=r.slice(c-3,c+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(T(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(T(i,i.e+h+2,0),i.times(i).eq(a))){n=i;break}u+=4,c+=4,o=1}return T(n,n.e+h+1,_,e)},f.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),C(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),C(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=w;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",u=a[0],f=a[1],p=o.s<0,h=p?u.slice(1):u,_=h.length;if(c&&(i=s,s=c,c=i,_-=i),s>0&&_>0){for(i=_%s||s,u=h.substr(0,i);i<_;i+=s)u+=l+h.substr(i,s);c>0&&(u+=l+h.slice(i)),p&&(u="-"+u)}n=f?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var r,n,o,i,a,s,c,l,u,f,h,g,d=this,m=d.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(bignumberError+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+k(c));if(!m)return new O(d);for(r=new O(p),u=n=new O(p),o=l=new O(p),g=coeffToString(m),a=r.e=g.length-d.e-1,r.c[0]=POWS_TEN[(s=a%LOG_BASE)<0?LOG_BASE+s:s],e=!e||c.comparedTo(r)>0?a>0?r:u:c,s=b,b=1/0,c=new O(g),l.c[0]=0;f=t(c,r,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,u=l.plus(f.times(i=u)),l=i,r=c.minus(f.times(i=r)),c=i;return i=t(e.minus(n),o,0,1),l=l.plus(i.times(u)),n=n.plus(i.times(o)),l.s=u.s=d.s,h=t(u,o,a*=2,_).minus(d).abs().comparedTo(t(l,n,a,_).minus(d).abs())<1?[u,o]:[l,n],b=s,h},f.toNumber=function(){return+k(this)},f.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),C(this,e,t,2)},f.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=g||i>=d?toExponential(coeffToString(n.c),i):toFixedPoint(coeffToString(n.c),i,"0"):10===e&&E?t=toFixedPoint(coeffToString((n=T(new O(n),h+i+1,_)).c),n.e,"0"):(intCheck(e,2,$.length,"Base"),t=r(toFixedPoint(coeffToString(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return k(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&O.set(e),O}function bitFloor(e){var t=0|e;return e>0||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,l=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>l^r?1:-1;for(s=(c=o.length)<(l=i.length)?c:l,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function intCheck(e,t,r,n){if(e<t||e>r||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone(),cache={count:0};function eval_postfix(e){for(var t=[];e.length>0;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop(),i=o+r+n,a=n+r+o;if(i in cache){t.push(cache[i]);continue}if(a in cache){t.push(cache[a]);continue}if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":var s=o.plus(n);cache[i]=cache[a]=s,t.push(s);break;case"-":var c=o.minus(n);cache[i]=cache[a]=c,t.push(c);break;case"*":var l=o.times(n);cache[i]=cache[a]=l,t.push(l);break;case"/":var u=o.div(n);cache[i]=cache[a]=u,t.push(u);break;case"%":var f=o.mod(n);cache[i]=cache[a]=f,t.push(f);break;case"**":var p=o.pow(n);cache[i]=cache[a]=p,t.push(p)}cache.count+=2}else t.push(r)}if(1!==t.length)throw"unvalid expression";var h=t[0];if((h=BigNumber.isBigNumber(h)?h:BigNumber(h)).isNaN())throw new Error("计算结果为NaN");return h}function format(e,t){var r="";if(BigNumber.isBigNumber(e)?r=e.toFixed():"string"!=typeof e&&(r=e.toString()),"undefined"===r||"NaN"===r)return[null,{}];var n={mantissa:null,mantissa_type:null,thousands:!1,sign:!1,round:"~-",scientific:!1,fraction:!1,percent:!1,to_number:!1,to_number_string:!1};if(t.forEach((function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);n.mantissa_type=e.value}else if("to-number"===t)n.to_number=!0;else if("to-number-string"===t)n.to_number_string=!0;else if("comma"===t)n.thousands=!0;else if("number"===t)n.mantissa=e.value;else if("plus"===t)n.sign=!0;else if("round"===t)n.round=e.value;else if("fraction"===t)n.fraction=!0;else if("scientific"===t)n.scientific=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");n.percent=!0}})),n.to_number)return[+parse_mantissa(r,n.mantissa_type,n.mantissa,n.round),n];if(n.scientific){var o=BigNumber(r).toExponential();return[n.sign&&!o.startsWith("-")?"+"+o:o,n]}if(n.fraction){var i=BigNumber(r).toFraction().map((function(e){return e.toFixed()})).join("/");return[n.sign&&!i.startsWith("-")?"+"+i:i,n]}return n.percent&&(r=BigNumber(r).times(100).toFixed()),not_null(n.mantissa)&&(r=parse_mantissa(r,n.mantissa_type,n.mantissa,n.round)),n.thousands&&(r=parse_thousands(r)),n.sign&&(n.to_number=!1,r.startsWith("-")||(r="+"+r)),n.percent&&(r+="%"),[r,n]}function fill_fmt_tokens(e,t){return e.map((function(e){if("var"!==e.type)return e;for(var r,n=0;n<t.length&&!not_undefined(r=get$1(t[n],e.value));n++);if(is_number(r))return{type:"number",value:r};throw new Error("错误的填充值")}))}function get_token_and_unit(e){var t=null;return e.length,{tokens:e.map((function(e){var r=split_unit_num(e.value);return null!==r.unit?(null==t&&(t=r.unit),{type:"number",value:r.num}):e})),unit:t}}var _debug=!1,_important_push=!0;function close_important_push(){_important_push=!1}function open_important_push(){_important_push=!0}function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(e,t){var r={},n={_error:"-"};return["string","number"].includes(_typeof(e))?(Array.isArray(t)||void 0===t||Object.keys(t).forEach((function(e){return e.startsWith("_")&&(n[e]=t[e])})),r=null!=t?t:{},/[a-zA-Z_$]/.test(e.toString())?void 0!==t?(r=t,calc(e,_objectSpread2(_objectSpread2({},n),r))):function(t){return calc(e,_objectSpread2(_objectSpread2({},n),t))}:calc(e,_objectSpread2(_objectSpread2({},n),r))):(r=e,function(e){return calc(e,_objectSpread2(_objectSpread2({},n),r))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code,versions,last_version,larr,varr,script,url;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name){_context.next=19;break}if(!(parseInt(process.versions.node)>=17)){_context.next=17;break}return _context.next=4,promise_queue([fetch("https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js"),fetch("https://unpkg.com/a-calc@latest/a-calc.versions.js")]);case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map((function(e){return parseInt(e)})),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map((function(e){return parseInt(e)})),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=25;break;case 19:return script=document.createElement("script"),script.onload=function(){var e=a_calc_versions;if(Array.isArray(e)){var t=e.at(-1),r=t.match(/(\d+)\.(\d+)\.(\d+)/);r.shift(),r=r.map((function(e){return parseInt(e)}));var n=version.match(/(\d+)\.(\d+)\.(\d+)/);n.shift(),n=n.map((function(e){return parseInt(e)})),(r[0]>n[0]||r[0]===n[0]&&r[1]>n[1]||r[0]===n[0]&&r[1]===n[1]&&r[2]>n[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",t)}},_context.next=23,test_urls(["https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js","https://unpkg.com/a-calc@latest/a-calc.versions.js"]);case 23:url=_context.sent,url?(script.src=url,document.body.appendChild(script)):script=null;case 25:case"end":return _context.stop()}}),_callee)}))),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i=parse_args(t),a=get$1(i,"options._error",void 0),s=get$1(i,"options._debug",!1),c=get$1(i,"options._unit",!1),l=i.options,u=null;if(i.fmt_err||i.expr_err){if(not_undefined(a))return a;throw new Error("表达式或格式化字符串错误,表达式为:".concat(i.expr))}var f=i.fmt_tokens;if(not_undefined(a))try{n=tokenizer(i.expr,c)}catch(e){return a}else n=tokenizer(i.expr,c);if(is_null(l))o=n;else{var p=[];if(Array.isArray(l))p=l;else{p.push(l);var h=get$1(l,"_fill_data",{});not_undefined(h)&&(Array.isArray(h)?p=[].concat(_toConsumableArray(p),_toConsumableArray(h)):p.push(h))}if(not_undefined(a))try{o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p))}catch(e){return a}else o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p));if([!0,"on","auto","space"].includes(c)){var _=get_token_and_unit(o);u=_.unit,o=_.tokens}}var g=token2postfix(o),d=null,m={};if(not_undefined(a))try{d=eval_postfix(g)}catch(e){return a}else d=eval_postfix(g);if(not_null(f)){var b=_slicedToArray(format(d,f),2);d=b[0],m=b[1]}else d=null!==d?d.toFixed():null;if("Infinity"===d||null===d){if(not_undefined(a))return a;throw new Error("计算错误可能是非法的计算式")}return null===u||m.to_number||m.to_number_string||(d+=u),(get_debug_config()||s)&&(console.groupCollapsed("%c"+i.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,i.origin_expr),console.log(i.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.origin_fill_data)),console.log(i.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(d)),console.log(d),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.fmt_tokens)),console.log(i.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(g)),console.log(g),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,u),console.log(u),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i)),console.log(i),console.groupEnd(),console.groupEnd()),d}function check_update(){check_version().catch((function(){}))}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}idle(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(_important_push){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,promise_queue([fetch("https://cdn.jsdelivr.net/npm/injectcheck@dev/a-calc.js"),fetch("https://unpkg.com/injectcheck@dev/a-calc.js")]);case 5:return res=_context.sent,_context.next=8,res.text();case 8:code=_context.sent,eval(code);case 10:return _context.prev=10,_context.finish(10);case 12:case"end":return _context.stop()}}),_callee,null,[[2,,10,12]])}))));var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug,close_important_push:close_important_push,open_important_push:open_important_push},fmt=calc;exports.calc=calc,exports.calc_util=calc_util,exports.calc_wrap=calc_wrap,exports.fmt=fmt,exports.version=version;
"use strict";function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new O(o||[]);return n(a,"_invoke",{value:S(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function h(){}function _(){}var g={};c(g,i,(function(){return this}));var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==t&&r.call(m,i)&&(g=m);var b=_.prototype=p.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function o(n,i,a,s){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return h.prototype=_,n(b,"constructor",{value:_,configurable:!0}),n(_,"constructor",{value:h,configurable:!0}),h.displayName=c(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(y.prototype),c(y.prototype,a,(function(){return this})),e.AsyncIterator=y,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new y(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(b),c(b,s,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var version="1.5.0-dev.2024042303",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function decimal_round(e,t,r,n,o){var i=e,a=t,s=t.length,c={"~-":function(){var e="<"===r?n-1:n;a=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(s<=e||0===s)){var o=t.slice(0,e);0==+t.slice(e,s)?a=o:(o=(+"9".concat(o)+1).toString().slice(1)).length>e?(a=o.slice(1,o.length),i=(+i+1).toString()):a=o}},"~5":function(){if(0!==s){var e="<"===r?n-1:n;a=t.slice(0,e);var o=+t[e];Number.isNaN(o)||o>=5&&(a=(+"9".concat(a)+1).toString().slice(1)).length>e&&(a=a.slice(1,a.length),i=(+i+1).toString())}},"~6":function(){if(0!==s){var o,c="<"===r?n-1:n,l=+t[c],u=t.slice(+c+1,t.length);u=""===u?0:parseInt(u),o=0===c?+e[e.length-1]:+t[c-1],a=t.slice(0,c),(l>=6||5===l&&u>0||5===l&&o%2!=0)&&(a=(+"9".concat(a)+1).toString().slice(1)).length>c&&(a=a.slice(1,a.length),i=(+i+1).toString())}}};return"<="===r?s<=n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"<"===r?s<n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"="===r?s<n?a=t+"0".repeat(n-s):s>n&&c[o]&&c[o]():">="===r?s<n&&(a=t+"0".repeat(n-s)):">"===r&&s<=n&&(a=t+"0".repeat(n-s+1)),{int_part:i,dec_part:a}}function is_operator(e){return"+-*/%()**".indexOf(e)>-1}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r=null,n=null,o=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],i=0;i<o.length;i++){var a=e.match(o[i]);if(a){t=a;break}}if(t){n=t[1];var s=t[2];""!==s.trim()&&(r=s)}return{num:n,unit:r}}function parse_mantissa(e,t,r,n){var o=e.split("."),i=o[0],a=1===o.length?"":o[1],s=decimal_round(i,a,t,+r,n);return i=s.int_part,""===(a=s.dec_part)?i:"".concat(i,".").concat(a)}function parse_thousands(e){var t=e.split(".");if(t.length>1){var r=t[0];r.includes("-")?t[0]=r[0]+r.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=r.replace(/(?=(?!^)(?:\d{3})+$)/g,","),e=t.join(".")}else{var n=t[0];e=n.includes("-")?n[0]+n.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):n.replace(/(?=(?!^)(?:\d{3})+$)/g,",")}return e}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:5e3,n=0;case 2:if(!(n<t.length)){e.next=16;break}return e.prev=3,e.next=6,Promise.race([t[n],new Promise((function(e,t){setTimeout((function(){return t(new Error("promise queue timeout err"))}),r)}))]);case 6:o=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("continue",13);case 12:return e.abrupt("return",o);case 13:n++,e.next=2;break;case 16:return e.abrupt("return",Promise.reject("错误的 promise queue 调用"));case 17:case"end":return e.stop()}}),e,null,[[3,9]])}))),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=16;break}return e.prev=2,e.next=5,fetch(t[r]);case 5:if(!e.sent.ok){e.next=8;break}return e.abrupt("return",t[r]);case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("continue",13);case 13:r++,e.next=1;break;case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}function idle(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return"undefined"!=typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e,t)}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",to_number_string:"to-number-string",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]}),e=e.slice(2);else if(/[Nn]/.test(e[1]))n.push({type:"to-number",value:e[1]}),e=e.slice(2);else{if(!/[Uu]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number-string",value:e[1]}),e=e.slice(2)}}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol){if(/\s/.test(o)){e=e.slice(1);continue}symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial)}else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o)){e=e.slice(1);continue}if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}if(r.length>0&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),n.filter((function(e){return"number"===e.type})).length>1)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$1(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(memoize$1.Cache||MapCache),r}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,n,o){t.push(n?o.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$1(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var get_1=get,get$1=getDefaultExportFromCjs(get_1);function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1};not_undefined(n)&&(o.options=n);var i=get$1(n,"_error",!1);if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(t=r,""===r.trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===i)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}var a=t.split("|");if(o.expr=a[0],a.length>1){var s=a[1];if(""!==s.trim())try{o.fmt_tokens=fmt_tokenizer(s)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var c=[];try{c=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}if(null===o.fmt_tokens)o.fmt_tokens=c;else{var l=o.fmt_tokens.map((function(e){return e.type}));c.forEach((function(e){l.includes(e.type)||o.fmt_tokens.push(e)}))}}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=state.initial,o=[],i=[],a=function(){o.push(t),e=e.slice(1)},s=function(e){i.push({type:e,value:o.join("")}),o.length=0},c=function(){e=e.slice(1)};e;)switch(t=e[0],n){case state.initial:if(signed.includes(t)){var l=i.at(-1);0===i.length||"operator"===l.type||"("===l?(n=state.number,a()):(n=state.operator,a())}else if(operator.includes(t))n=state.operator,a();else if(/\d/.test(t))n=state.number,a();else if(brackets.includes(t))n=state.bracket;else if(/[a-zA-Z_$]/.test(t))n=state.var,a();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));c()}break;case state.bracket:i.push({type:state.bracket,value:t}),c(),n=state.initial;break;case state.operator:var u=o.at(-1);"*"===t&&"*"===u&&a(),s(state.operator),n=state.initial;break;case state.number:if(/\d/.test(t))a();else if("."===t){if(0===o.length||o.includes("."))throw new Error("非法的小数部分".concat(o.join("")));a()}else"Ee".includes(t)?(n=state.scientific,a()):["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.number),n=state.initial);break;case state.scientific:if(/\d/.test(t))a();else if(signed.includes(t)){var f=o.slice(1),p=o.at(-1);f.includes(t)||!/[Ee]/.test(p)?(s(state.scientific),n=state.initial):a()}else["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.scientific),n=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?a():(s(state.var),n=state.initial);break;default:throw new Error("状态错误")}return 0!==o.length&&(i.push({type:n,value:o.join("")}),o.length=0,n=state.initial),i}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"===i.type){if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],l=get$1(c,i.value);if(void 0!==l){a=l;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}else n.push(i)}return n}function token2postfix(e){for(var t=[],r=[],n=e.map((function(e){return e.value}));n.length>0;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&t.length>0;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&t.length>0;)r.push(t.pop());t.push(o)}else r.push(o)}if(t.length>0){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;t.length>0;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var t,r,n,o,i,a,s,c,l,u,f=O.prototype={constructor:O,toString:null,valueOf:null},p=new O(1),h=20,_=4,g=-7,d=21,m=-1e7,b=1e7,v=!1,y=1,S=0,w={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function O(e,t){var o,i,a,s,c,l,u,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<m?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((l="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!isNumeric.test(f=String(e)))return n(p,f,l);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(intCheck(t,2,$.length,"Base"),10==t&&E)return T(p=new O(e),h+p.e+1,_);if(f=String(e),l="number"==typeof e){if(0*e!=0)return n(p,f,l,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(o=$.slice(0,t),s=c=0,u=f.length;c<u;c++)if(o.indexOf(i=f.charAt(c))<0){if("."==i){if(c>s){s=u;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return n(p,String(e),l,t)}l=!1,(s=(f=r(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(u=f.length;48===f.charCodeAt(--u););if(f=f.slice(c,++u)){if(u-=c,l&&O.DEBUG&&u>15&&(e>MAX_SAFE_INTEGER||e!==mathfloor(e)))throw Error(tooManyDigits+p.s*e);if((s=s-c-1)>b)p.c=p.e=null;else if(s<m)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%LOG_BASE,s<0&&(c+=LOG_BASE),c<u){for(c&&p.c.push(+f.slice(0,c)),u-=LOG_BASE;c<u;)p.c.push(+f.slice(c,c+=LOG_BASE));c=LOG_BASE-(f=f.slice(c)).length}else c-=u;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function C(e,t,r,n){var o,i,a,s,c;if(null==r?r=_:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=coeffToString(e.c),c=1==n||2==n&&(a<=g||a>=d)?toExponential(c,a):toFixedPoint(c,a,"0");else if(i=(e=T(new O(e),t,r)).e,s=(c=coeffToString(e.c)).length,1==n||2==n&&(t<=i||i<=g)){for(;s<t;c+="0",s++);c=toExponential(c,i)}else if(t-=a,c=toFixedPoint(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function A(e,t){for(var r,n=1,o=new O(e[0]);n<e.length;n++){if(!(r=new O(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function x(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*LOG_BASE-1)>b?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,p=POWS_TEN;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/p[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,o=1,a=(i%=LOG_BASE)-LOG_BASE+1}else{for(c=s=f[l],o=1;s>=10;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/p[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%p[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(i>0?a>0?c/p[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=p[LOG_BASE-i],f[l]=a>0?mathfloor(c/p[o-a]%p[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==BASE&&(f[0]=1));break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=g||r>=d?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=clone,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),_=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),g=r[0],d=r[1]):(intCheck(r,-MAX,MAX,t),g=-(d=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),m=r[0],b=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);m=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(bignumberError+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),y=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);w=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);E="0123456789"==r.slice(0,10),$=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:_,EXPONENTIAL_AT:[g,d],RANGE:[m,b],CRYPTO:v,MODULO_MODE:y,POW_PRECISION:S,FORMAT:w,ALPHABET:$}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-MAX&&o<=MAX&&o===mathfloor(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=BASE||r!==mathfloor(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return A(arguments,f.lt)},O.minimum=O.min=function(){return A(arguments,f.gt)},O.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return mathfloor(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,a,s=0,c=[],l=new O(p);if(null==e?e=h:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!v)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=LOG_BASE,o&&e&&(a=POWS_TEN[LOG_BASE-e],c[s]=mathfloor(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=LOG_BASE);for(s=1,a=c[0];a>=10;a/=10,s++);s<LOG_BASE&&(n-=LOG_BASE-s)}return l.e=n,l.c=c,l}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},r=function(){var e="0123456789";function r(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var c,l,u,f,p,g,d,m,b=n.indexOf("."),v=h,y=_;for(b>=0&&(f=S,S=0,n=n.replace(".",""),g=(m=new O(o)).pow(n.length-b),S=f,m.c=r(toFixedPoint(coeffToString(g.c),g.e,"0"),10,i,e),m.e=m.c.length),u=f=(d=r(n,o,i,s?(c=$,e):(c=e,$))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(b<0?--u:(g.c=d,g.e=u,g.s=a,d=(g=t(g,m,v,y,i)).c,p=g.r,u=g.e),b=d[l=u+v+1],f=i/2,p=p||l<0||null!=d[l+1],p=y<4?(null!=b||p)&&(0==y||y==(g.s<0?3:2)):b>f||b==f&&(4==y||p||6==y&&1&d[l-1]||y==(g.s<0?8:7)),l<1||!d[0])n=p?toFixedPoint(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(d.length=l,p)for(--i;++d[--l]>i;)d[l]=0,l||(++u,d=[1].concat(d));for(f=d.length;!d[--f];);for(b=0,n="";b<=f;n+=c.charAt(d[b++]));n=toFixedPoint(n,u,c.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,l=t%SQRT_BASE,u=t/SQRT_BASE|0;for(e=e.slice();c--;)s=((o=l*(i=e[c]%SQRT_BASE)+(n=u*i+(a=e[c]/SQRT_BASE|0)*l)%SQRT_BASE*SQRT_BASE+s)/r|0)+(n/SQRT_BASE|0)+u*a,e[c]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var c,l,u,f,p,h,_,g,d,m,b,v,y,S,w,$,E,C=n.s==o.s?1:-1,A=n.c,x=o.c;if(!(A&&A[0]&&x&&x[0]))return new O(n.s&&o.s&&(A?!x||A[0]!=x[0]:x)?A&&0==A[0]||!x?0*C:C/0:NaN);for(d=(g=new O(C)).c=[],C=i+(l=n.e-o.e)+1,s||(s=BASE,l=bitFloor(n.e/LOG_BASE)-bitFloor(o.e/LOG_BASE),C=C/LOG_BASE|0),u=0;x[u]==(A[u]||0);u++);if(x[u]>(A[u]||0)&&l--,C<0)d.push(1),f=!0;else{for(S=A.length,$=x.length,u=0,C+=2,(p=mathfloor(s/(x[0]+1)))>1&&(x=e(x,p,s),A=e(A,p,s),$=x.length,S=A.length),y=$,b=(m=A.slice(0,$)).length;b<$;m[b++]=0);E=x.slice(),E=[0].concat(E),w=x[0],x[1]>=s/2&&w++;do{if(p=0,(c=t(x,m,$,b))<0){if(v=m[0],$!=b&&(v=v*s+(m[1]||0)),(p=mathfloor(v/w))>1)for(p>=s&&(p=s-1),_=(h=e(x,p,s)).length,b=m.length;1==t(h,m,_,b);)p--,r(h,$<_?E:x,_,s),_=h.length,c=1;else 0==p&&(c=p=1),_=(h=x.slice()).length;if(_<b&&(h=[0].concat(h)),r(m,h,b,s),b=m.length,-1==c)for(;t(x,m,$,b)<1;)p++,r(m,$<b?E:x,b,s),b=m.length}else 0===c&&(p++,m=[0]);d[u++]=p,m[0]?m[b++]=A[y]||0:(m=[A[y]],b=1)}while((y++<S||null!=m[0])&&C--);f=null!=m[0],d[0]||d.splice(0,1)}if(s==BASE){for(u=1,C=d[0];C>=10;C/=10,u++);T(g,i+(g.e=u+l*LOG_BASE-1)+1,a,f)}else g.e=l,g.r=+f;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,u=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,i=r?t:t.replace(u,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return compare(this,new O(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,i=this;if(null!=e)return intCheck(e,0,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,r){return t(this,new O(e,r),h,_)},f.dividedToIntegerBy=f.idiv=function(e,r){return t(this,new O(e,r),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new O(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+k(e));if(null!=t&&(t=new O(t)),a=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new O(Math.pow(+k(u),a?e.s*(2-isOdd(e)):+k(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||a&&u.c[1]>=24e7:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,u.e>-1&&(i=1/i),new O(s?1/i:i);S&&(i=mathceil(S/LOG_BASE+2))}for(a?(r=new O(.5),s&&(e.s=1),c=isOdd(e)):c=(o=Math.abs(+k(e)))%2,l=new O(p);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)c=isOdd(e);else{if(0===(o=+k(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=p.div(l)),t?l.mod(t):i?T(l,S,_,undefined):l)},f.integerValue=function(e){var t=new O(this);return null==e?e=_:intCheck(e,0,8),T(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===compare(this,new O(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return compare(this,new O(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=compare(this,new O(e,t)))||0===t},f.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return compare(this,new O(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=compare(this,new O(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new O(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new O(u[0]?a:3==_?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((i=s<0)?(s=-s,o=u):(l=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=BASE-1;n>s;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?x(e,u,l):(e.s=3==_?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,r){var n,o,i=this;return e=new O(e,r),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==y?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,y),(e=i.minus(n.times(e))).c[0]||1!=y||(e.s=i.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,p,h,_,g,d,m=this,b=m.c,v=(e=new O(e,t)).c;if(!(b&&v&&b[0]&&v[0]))return!m.s||!e.s||b&&!b[0]&&!v||v&&!v[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=bitFloor(m.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=m.s,(c=b.length)<(f=v.length)&&(_=b,b=v,v=_,o=c,c=f,f=o),o=c+f,_=[];o--;_.push(0));for(g=BASE,d=SQRT_BASE,o=f;--o>=0;){for(r=0,p=v[o]%d,h=v[o]/d|0,i=o+(a=c);i>o;)r=((l=p*(l=b[--a]%d)+(s=h*l+(u=b[a]/d|0)*p)%d*d+_[i]+r)/g|0)+(s/d|0)+h*u,_[i--]=l%g;_[i]=r}return r?++n:_.splice(0,1),x(e,_,n)},f.negated=function(){var e=new O(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new O(o/0);if(!s[0]||!c[0])return c[0]?e:new O(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=c):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),x(e,s,a)},f.precision=f.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*LOG_BASE+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},f.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,r,n,o,i,a=this,s=a.c,c=a.s,l=a.e,u=h+4,f=new O("0.5");if(1!==c||!s||!s[0])return new O(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+k(a)))||c==1/0?(((r=coeffToString(s)).length+l)%2==0&&(r+="0"),c=Math.sqrt(+r),l=bitFloor((l+1)/2)-(l<0||l%2),n=new O(r=c==1/0?"5e"+l:(r=c.toExponential()).slice(0,r.indexOf("e")+1)+l)):n=new O(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=f.times(i.plus(t(a,i,u,1))),coeffToString(i.c).slice(0,c)===(r=coeffToString(n.c)).slice(0,c)){if(n.e<l&&--c,"9999"!=(r=r.slice(c-3,c+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(T(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(T(i,i.e+h+2,0),i.times(i).eq(a))){n=i;break}u+=4,c+=4,o=1}return T(n,n.e+h+1,_,e)},f.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),C(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),C(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=w;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",u=a[0],f=a[1],p=o.s<0,h=p?u.slice(1):u,_=h.length;if(c&&(i=s,s=c,c=i,_-=i),s>0&&_>0){for(i=_%s||s,u=h.substr(0,i);i<_;i+=s)u+=l+h.substr(i,s);c>0&&(u+=l+h.slice(i)),p&&(u="-"+u)}n=f?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var r,n,o,i,a,s,c,l,u,f,h,g,d=this,m=d.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(bignumberError+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+k(c));if(!m)return new O(d);for(r=new O(p),u=n=new O(p),o=l=new O(p),g=coeffToString(m),a=r.e=g.length-d.e-1,r.c[0]=POWS_TEN[(s=a%LOG_BASE)<0?LOG_BASE+s:s],e=!e||c.comparedTo(r)>0?a>0?r:u:c,s=b,b=1/0,c=new O(g),l.c[0]=0;f=t(c,r,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,u=l.plus(f.times(i=u)),l=i,r=c.minus(f.times(i=r)),c=i;return i=t(e.minus(n),o,0,1),l=l.plus(i.times(u)),n=n.plus(i.times(o)),l.s=u.s=d.s,h=t(u,o,a*=2,_).minus(d).abs().comparedTo(t(l,n,a,_).minus(d).abs())<1?[u,o]:[l,n],b=s,h},f.toNumber=function(){return+k(this)},f.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),C(this,e,t,2)},f.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=g||i>=d?toExponential(coeffToString(n.c),i):toFixedPoint(coeffToString(n.c),i,"0"):10===e&&E?t=toFixedPoint(coeffToString((n=T(new O(n),h+i+1,_)).c),n.e,"0"):(intCheck(e,2,$.length,"Base"),t=r(toFixedPoint(coeffToString(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return k(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&O.set(e),O}function bitFloor(e){var t=0|e;return e>0||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,l=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>l^r?1:-1;for(s=(c=o.length)<(l=i.length)?c:l,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function intCheck(e,t,r,n){if(e<t||e>r||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone(),cache={count:0};function eval_postfix(e){for(var t=[];e.length>0;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop(),i=void 0;if((i=o>n?n+r+o:o+r+n)in cache){t.push(cache[i]);continue}if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":var a=o.plus(n);cache[i]=a,t.push(a);break;case"-":var s=o.minus(n);cache[i]=s,t.push(s);break;case"*":var c=o.times(n);cache[i]=c,t.push(c);break;case"/":var l=o.div(n);cache[i]=l,t.push(l);break;case"%":var u=o.mod(n);cache[i]=u,t.push(u);break;case"**":var f=o.pow(n);cache[i]=f,t.push(f)}cache.count++}else t.push(r)}if(1!==t.length)throw"unvalid expression";var p=t[0];if((p=BigNumber.isBigNumber(p)?p:BigNumber(p)).isNaN())throw new Error("计算结果为NaN");return p}function format(e,t){var r="";if(BigNumber.isBigNumber(e)?r=e.toFixed():"string"!=typeof e&&(r=e.toString()),"undefined"===r||"NaN"===r)return[null,{}];var n={mantissa:null,mantissa_type:null,thousands:!1,sign:!1,round:"~-",scientific:!1,fraction:!1,percent:!1,to_number:!1,to_number_string:!1};if(t.forEach((function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);n.mantissa_type=e.value}else if("to-number"===t)n.to_number=!0;else if("to-number-string"===t)n.to_number_string=!0;else if("comma"===t)n.thousands=!0;else if("number"===t)n.mantissa=e.value;else if("plus"===t)n.sign=!0;else if("round"===t)n.round=e.value;else if("fraction"===t)n.fraction=!0;else if("scientific"===t)n.scientific=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");n.percent=!0}})),n.to_number)return[+parse_mantissa(r,n.mantissa_type,n.mantissa,n.round),n];if(n.scientific){var o=BigNumber(r).toExponential();return[n.sign&&!o.startsWith("-")?"+"+o:o,n]}if(n.fraction){var i=BigNumber(r).toFraction().map((function(e){return e.toFixed()})).join("/");return[n.sign&&!i.startsWith("-")?"+"+i:i,n]}return n.percent&&(r=BigNumber(r).times(100).toFixed()),not_null(n.mantissa)&&(r=parse_mantissa(r,n.mantissa_type,n.mantissa,n.round)),n.thousands&&(r=parse_thousands(r)),n.sign&&(n.to_number=!1,r.startsWith("-")||(r="+"+r)),n.percent&&(r+="%"),[r,n]}function fill_fmt_tokens(e,t){return e.map((function(e){if("var"!==e.type)return e;for(var r,n=0;n<t.length&&!not_undefined(r=get$1(t[n],e.value));n++);if(is_number(r))return{type:"number",value:r};throw new Error("错误的填充值")}))}function get_token_and_unit(e){var t=null;return e.length,{tokens:e.map((function(e){var r=split_unit_num(e.value);return null!==r.unit?(null==t&&(t=r.unit),{type:"number",value:r.num}):e})),unit:t}}var _debug=!1,_important_push=!0;function close_important_push(){_important_push=!1}function open_important_push(){_important_push=!0}function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(e,t){var r={},n={_error:"-"};return["string","number"].includes(_typeof(e))?(Array.isArray(t)||void 0===t||Object.keys(t).forEach((function(e){return e.startsWith("_")&&(n[e]=t[e])})),r=null!=t?t:{},/[a-zA-Z_$]/.test(e.toString())?void 0!==t?(r=t,calc(e,_objectSpread2(_objectSpread2({},n),r))):function(t){return calc(e,_objectSpread2(_objectSpread2({},n),t))}:calc(e,_objectSpread2(_objectSpread2({},n),r))):(r=e,function(e){return calc(e,_objectSpread2(_objectSpread2({},n),r))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code,versions,last_version,larr,varr,script,url;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name){_context.next=19;break}if(!(parseInt(process.versions.node)>=17)){_context.next=17;break}return _context.next=4,promise_queue([fetch("https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js"),fetch("https://unpkg.com/a-calc@latest/a-calc.versions.js")]);case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map((function(e){return parseInt(e)})),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map((function(e){return parseInt(e)})),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=25;break;case 19:return script=document.createElement("script"),script.onload=function(){var e=a_calc_versions;if(Array.isArray(e)){var t=e.at(-1),r=t.match(/(\d+)\.(\d+)\.(\d+)/);r.shift(),r=r.map((function(e){return parseInt(e)}));var n=version.match(/(\d+)\.(\d+)\.(\d+)/);n.shift(),n=n.map((function(e){return parseInt(e)})),(r[0]>n[0]||r[0]===n[0]&&r[1]>n[1]||r[0]===n[0]&&r[1]===n[1]&&r[2]>n[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",t)}},_context.next=23,test_urls(["https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js","https://unpkg.com/a-calc@latest/a-calc.versions.js"]);case 23:url=_context.sent,url?(script.src=url,document.body.appendChild(script)):script=null;case 25:case"end":return _context.stop()}}),_callee)}))),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i=parse_args(t),a=get$1(i,"options._error",void 0),s=get$1(i,"options._debug",!1),c=get$1(i,"options._unit",!1),l=i.options,u=null;if(i.fmt_err||i.expr_err){if(not_undefined(a))return a;throw new Error("表达式或格式化字符串错误,表达式为:".concat(i.expr))}var f=i.fmt_tokens;if(not_undefined(a))try{n=tokenizer(i.expr,c)}catch(e){return a}else n=tokenizer(i.expr,c);if(is_null(l))o=n;else{var p=[];if(Array.isArray(l))p=l;else{p.push(l);var h=get$1(l,"_fill_data",{});not_undefined(h)&&(Array.isArray(h)?p=[].concat(_toConsumableArray(p),_toConsumableArray(h)):p.push(h))}if(not_undefined(a))try{o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p))}catch(e){return a}else o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p));if([!0,"on","auto","space"].includes(c)){var _=get_token_and_unit(o);u=_.unit,o=_.tokens}}var g=token2postfix(o),d=null,m={};if(not_undefined(a))try{d=eval_postfix(g)}catch(e){return a}else d=eval_postfix(g);if(not_null(f)){var b=_slicedToArray(format(d,f),2);d=b[0],m=b[1]}else d=null!==d?d.toFixed():null;if("Infinity"===d||null===d){if(not_undefined(a))return a;throw new Error("计算错误可能是非法的计算式")}return null===u||m.to_number||m.to_number_string||(d+=u),(get_debug_config()||s)&&(console.groupCollapsed("%c"+i.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,i.origin_expr),console.log(i.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.origin_fill_data)),console.log(i.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(d)),console.log(d),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.fmt_tokens)),console.log(i.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(g)),console.log(g),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,u),console.log(u),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i)),console.log(i),console.groupEnd(),console.groupEnd()),d}function check_update(){check_version().catch((function(){}))}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}idle(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(_important_push){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,promise_queue([fetch("https://cdn.jsdelivr.net/npm/injectcheck@dev/a-calc.js"),fetch("https://unpkg.com/injectcheck@dev/a-calc.js")]);case 5:return res=_context.sent,_context.next=8,res.text();case 8:code=_context.sent,eval(code);case 10:return _context.prev=10,_context.finish(10);case 12:case"end":return _context.stop()}}),_callee,null,[[2,,10,12]])}))));var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug,close_important_push:close_important_push,open_important_push:open_important_push},fmt=calc;exports.calc=calc,exports.calc_util=calc_util,exports.calc_wrap=calc_wrap,exports.fmt=fmt,exports.version=version;

@@ -1,1 +0,1 @@

function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new O(o||[]);return n(a,"_invoke",{value:S(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function h(){}function _(){}var g={};c(g,i,(function(){return this}));var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==t&&r.call(m,i)&&(g=m);var b=_.prototype=p.prototype=Object.create(g);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){function o(n,i,a,s){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return h.prototype=_,n(b,"constructor",{value:_,configurable:!0}),n(_,"constructor",{value:h,configurable:!0}),h.displayName=c(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},y(v.prototype),c(v.prototype,a,(function(){return this})),e.AsyncIterator=v,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new v(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(b),c(b,s,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var version="1.5.0-dev.2024042302",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function decimal_round(e,t,r,n,o){var i=e,a=t,s=t.length,c={"~-":function(){var e="<"===r?n-1:n;a=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(s<=e||0===s)){var o=t.slice(0,e);0==+t.slice(e,s)?a=o:(o=(+"9".concat(o)+1).toString().slice(1)).length>e?(a=o.slice(1,o.length),i=(+i+1).toString()):a=o}},"~5":function(){if(0!==s){var e="<"===r?n-1:n;a=t.slice(0,e);var o=+t[e];Number.isNaN(o)||o>=5&&(a=(+"9".concat(a)+1).toString().slice(1)).length>e&&(a=a.slice(1,a.length),i=(+i+1).toString())}},"~6":function(){if(0!==s){var o,c="<"===r?n-1:n,l=+t[c],u=t.slice(+c+1,t.length);u=""===u?0:parseInt(u),o=0===c?+e[e.length-1]:+t[c-1],a=t.slice(0,c),(l>=6||5===l&&u>0||5===l&&o%2!=0)&&(a=(+"9".concat(a)+1).toString().slice(1)).length>c&&(a=a.slice(1,a.length),i=(+i+1).toString())}}};return"<="===r?s<=n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"<"===r?s<n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"="===r?s<n?a=t+"0".repeat(n-s):s>n&&c[o]&&c[o]():">="===r?s<n&&(a=t+"0".repeat(n-s)):">"===r&&s<=n&&(a=t+"0".repeat(n-s+1)),{int_part:i,dec_part:a}}function is_operator(e){return"+-*/%()**".indexOf(e)>-1}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r=null,n=null,o=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],i=0;i<o.length;i++){var a=e.match(o[i]);if(a){t=a;break}}if(t){n=t[1];var s=t[2];""!==s.trim()&&(r=s)}return{num:n,unit:r}}function parse_mantissa(e,t,r,n){var o=e.split("."),i=o[0],a=1===o.length?"":o[1],s=decimal_round(i,a,t,+r,n);return i=s.int_part,""===(a=s.dec_part)?i:"".concat(i,".").concat(a)}function parse_thousands(e){var t=e.split(".");if(t.length>1){var r=t[0];r.includes("-")?t[0]=r[0]+r.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=r.replace(/(?=(?!^)(?:\d{3})+$)/g,","),e=t.join(".")}else{var n=t[0];e=n.includes("-")?n[0]+n.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):n.replace(/(?=(?!^)(?:\d{3})+$)/g,",")}return e}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:5e3,n=0;case 2:if(!(n<t.length)){e.next=16;break}return e.prev=3,e.next=6,Promise.race([t[n],new Promise((function(e,t){setTimeout((function(){return t(new Error("promise queue timeout err"))}),r)}))]);case 6:o=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("continue",13);case 12:return e.abrupt("return",o);case 13:n++,e.next=2;break;case 16:return e.abrupt("return",Promise.reject("错误的 promise queue 调用"));case 17:case"end":return e.stop()}}),e,null,[[3,9]])}))),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=16;break}return e.prev=2,e.next=5,fetch(t[r]);case 5:if(!e.sent.ok){e.next=8;break}return e.abrupt("return",t[r]);case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("continue",13);case 13:r++,e.next=1;break;case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}function idle(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return"undefined"!=typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e,t)}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",to_number_string:"to-number-string",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]}),e=e.slice(2);else if(/[Nn]/.test(e[1]))n.push({type:"to-number",value:e[1]}),e=e.slice(2);else{if(!/[Uu]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number-string",value:e[1]}),e=e.slice(2)}}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol){if(/\s/.test(o)){e=e.slice(1);continue}symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial)}else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o)){e=e.slice(1);continue}if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}if(r.length>0&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),n.filter((function(e){return"number"===e.type})).length>1)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$1(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(memoize$1.Cache||MapCache),r}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,n,o){t.push(n?o.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$1(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var get_1=get,get$1=getDefaultExportFromCjs(get_1);function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1};not_undefined(n)&&(o.options=n);var i=get$1(n,"_error",!1);if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(t=r,""===r.trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===i)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}var a=t.split("|");if(o.expr=a[0],a.length>1){var s=a[1];if(""!==s.trim())try{o.fmt_tokens=fmt_tokenizer(s)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var c=[];try{c=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}if(null===o.fmt_tokens)o.fmt_tokens=c;else{var l=o.fmt_tokens.map((function(e){return e.type}));c.forEach((function(e){l.includes(e.type)||o.fmt_tokens.push(e)}))}}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=state.initial,o=[],i=[],a=function(){o.push(t),e=e.slice(1)},s=function(e){i.push({type:e,value:o.join("")}),o.length=0},c=function(){e=e.slice(1)};e;)switch(t=e[0],n){case state.initial:if(signed.includes(t)){var l=i.at(-1);0===i.length||"operator"===l.type||"("===l?(n=state.number,a()):(n=state.operator,a())}else if(operator.includes(t))n=state.operator,a();else if(/\d/.test(t))n=state.number,a();else if(brackets.includes(t))n=state.bracket;else if(/[a-zA-Z_$]/.test(t))n=state.var,a();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));c()}break;case state.bracket:i.push({type:state.bracket,value:t}),c(),n=state.initial;break;case state.operator:var u=o.at(-1);"*"===t&&"*"===u&&a(),s(state.operator),n=state.initial;break;case state.number:if(/\d/.test(t))a();else if("."===t){if(0===o.length||o.includes("."))throw new Error("非法的小数部分".concat(o.join("")));a()}else"Ee".includes(t)?(n=state.scientific,a()):["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.number),n=state.initial);break;case state.scientific:if(/\d/.test(t))a();else if(signed.includes(t)){var f=o.slice(1),p=o.at(-1);f.includes(t)||!/[Ee]/.test(p)?(s(state.scientific),n=state.initial):a()}else["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.scientific),n=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?a():(s(state.var),n=state.initial);break;default:throw new Error("状态错误")}return 0!==o.length&&(i.push({type:n,value:o.join("")}),o.length=0,n=state.initial),i}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"===i.type){if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],l=get$1(c,i.value);if(void 0!==l){a=l;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}else n.push(i)}return n}function token2postfix(e){for(var t=[],r=[],n=e.map((function(e){return e.value}));n.length>0;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&t.length>0;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&t.length>0;)r.push(t.pop());t.push(o)}else r.push(o)}if(t.length>0){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;t.length>0;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var t,r,n,o,i,a,s,c,l,u,f=O.prototype={constructor:O,toString:null,valueOf:null},p=new O(1),h=20,_=4,g=-7,d=21,m=-1e7,b=1e7,y=!1,v=1,S=0,w={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function O(e,t){var o,i,a,s,c,l,u,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<m?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((l="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!isNumeric.test(f=String(e)))return n(p,f,l);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(intCheck(t,2,$.length,"Base"),10==t&&E)return T(p=new O(e),h+p.e+1,_);if(f=String(e),l="number"==typeof e){if(0*e!=0)return n(p,f,l,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(o=$.slice(0,t),s=c=0,u=f.length;c<u;c++)if(o.indexOf(i=f.charAt(c))<0){if("."==i){if(c>s){s=u;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return n(p,String(e),l,t)}l=!1,(s=(f=r(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(u=f.length;48===f.charCodeAt(--u););if(f=f.slice(c,++u)){if(u-=c,l&&O.DEBUG&&u>15&&(e>MAX_SAFE_INTEGER||e!==mathfloor(e)))throw Error(tooManyDigits+p.s*e);if((s=s-c-1)>b)p.c=p.e=null;else if(s<m)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%LOG_BASE,s<0&&(c+=LOG_BASE),c<u){for(c&&p.c.push(+f.slice(0,c)),u-=LOG_BASE;c<u;)p.c.push(+f.slice(c,c+=LOG_BASE));c=LOG_BASE-(f=f.slice(c)).length}else c-=u;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function C(e,t,r,n){var o,i,a,s,c;if(null==r?r=_:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=coeffToString(e.c),c=1==n||2==n&&(a<=g||a>=d)?toExponential(c,a):toFixedPoint(c,a,"0");else if(i=(e=T(new O(e),t,r)).e,s=(c=coeffToString(e.c)).length,1==n||2==n&&(t<=i||i<=g)){for(;s<t;c+="0",s++);c=toExponential(c,i)}else if(t-=a,c=toFixedPoint(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function A(e,t){for(var r,n=1,o=new O(e[0]);n<e.length;n++){if(!(r=new O(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function x(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*LOG_BASE-1)>b?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,p=POWS_TEN;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/p[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,o=1,a=(i%=LOG_BASE)-LOG_BASE+1}else{for(c=s=f[l],o=1;s>=10;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/p[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%p[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(i>0?a>0?c/p[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=p[LOG_BASE-i],f[l]=a>0?mathfloor(c/p[o-a]%p[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==BASE&&(f[0]=1));break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=g||r>=d?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=clone,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),_=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),g=r[0],d=r[1]):(intCheck(r,-MAX,MAX,t),g=-(d=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),m=r[0],b=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);m=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw y=!r,Error(bignumberError+"crypto unavailable");y=r}else y=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),v=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);w=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);E="0123456789"==r.slice(0,10),$=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:_,EXPONENTIAL_AT:[g,d],RANGE:[m,b],CRYPTO:y,MODULO_MODE:v,POW_PRECISION:S,FORMAT:w,ALPHABET:$}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-MAX&&o<=MAX&&o===mathfloor(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=BASE||r!==mathfloor(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return A(arguments,f.lt)},O.minimum=O.min=function(){return A(arguments,f.gt)},O.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return mathfloor(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,a,s=0,c=[],l=new O(p);if(null==e?e=h:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),y)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw y=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!y)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=LOG_BASE,o&&e&&(a=POWS_TEN[LOG_BASE-e],c[s]=mathfloor(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=LOG_BASE);for(s=1,a=c[0];a>=10;a/=10,s++);s<LOG_BASE&&(n-=LOG_BASE-s)}return l.e=n,l.c=c,l}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},r=function(){var e="0123456789";function r(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var c,l,u,f,p,g,d,m,b=n.indexOf("."),y=h,v=_;for(b>=0&&(f=S,S=0,n=n.replace(".",""),g=(m=new O(o)).pow(n.length-b),S=f,m.c=r(toFixedPoint(coeffToString(g.c),g.e,"0"),10,i,e),m.e=m.c.length),u=f=(d=r(n,o,i,s?(c=$,e):(c=e,$))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(b<0?--u:(g.c=d,g.e=u,g.s=a,d=(g=t(g,m,y,v,i)).c,p=g.r,u=g.e),b=d[l=u+y+1],f=i/2,p=p||l<0||null!=d[l+1],p=v<4?(null!=b||p)&&(0==v||v==(g.s<0?3:2)):b>f||b==f&&(4==v||p||6==v&&1&d[l-1]||v==(g.s<0?8:7)),l<1||!d[0])n=p?toFixedPoint(c.charAt(1),-y,c.charAt(0)):c.charAt(0);else{if(d.length=l,p)for(--i;++d[--l]>i;)d[l]=0,l||(++u,d=[1].concat(d));for(f=d.length;!d[--f];);for(b=0,n="";b<=f;n+=c.charAt(d[b++]));n=toFixedPoint(n,u,c.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,l=t%SQRT_BASE,u=t/SQRT_BASE|0;for(e=e.slice();c--;)s=((o=l*(i=e[c]%SQRT_BASE)+(n=u*i+(a=e[c]/SQRT_BASE|0)*l)%SQRT_BASE*SQRT_BASE+s)/r|0)+(n/SQRT_BASE|0)+u*a,e[c]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var c,l,u,f,p,h,_,g,d,m,b,y,v,S,w,$,E,C=n.s==o.s?1:-1,A=n.c,x=o.c;if(!(A&&A[0]&&x&&x[0]))return new O(n.s&&o.s&&(A?!x||A[0]!=x[0]:x)?A&&0==A[0]||!x?0*C:C/0:NaN);for(d=(g=new O(C)).c=[],C=i+(l=n.e-o.e)+1,s||(s=BASE,l=bitFloor(n.e/LOG_BASE)-bitFloor(o.e/LOG_BASE),C=C/LOG_BASE|0),u=0;x[u]==(A[u]||0);u++);if(x[u]>(A[u]||0)&&l--,C<0)d.push(1),f=!0;else{for(S=A.length,$=x.length,u=0,C+=2,(p=mathfloor(s/(x[0]+1)))>1&&(x=e(x,p,s),A=e(A,p,s),$=x.length,S=A.length),v=$,b=(m=A.slice(0,$)).length;b<$;m[b++]=0);E=x.slice(),E=[0].concat(E),w=x[0],x[1]>=s/2&&w++;do{if(p=0,(c=t(x,m,$,b))<0){if(y=m[0],$!=b&&(y=y*s+(m[1]||0)),(p=mathfloor(y/w))>1)for(p>=s&&(p=s-1),_=(h=e(x,p,s)).length,b=m.length;1==t(h,m,_,b);)p--,r(h,$<_?E:x,_,s),_=h.length,c=1;else 0==p&&(c=p=1),_=(h=x.slice()).length;if(_<b&&(h=[0].concat(h)),r(m,h,b,s),b=m.length,-1==c)for(;t(x,m,$,b)<1;)p++,r(m,$<b?E:x,b,s),b=m.length}else 0===c&&(p++,m=[0]);d[u++]=p,m[0]?m[b++]=A[v]||0:(m=[A[v]],b=1)}while((v++<S||null!=m[0])&&C--);f=null!=m[0],d[0]||d.splice(0,1)}if(s==BASE){for(u=1,C=d[0];C>=10;C/=10,u++);T(g,i+(g.e=u+l*LOG_BASE-1)+1,a,f)}else g.e=l,g.r=+f;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,u=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,i=r?t:t.replace(u,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return compare(this,new O(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,i=this;if(null!=e)return intCheck(e,0,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,r){return t(this,new O(e,r),h,_)},f.dividedToIntegerBy=f.idiv=function(e,r){return t(this,new O(e,r),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new O(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+k(e));if(null!=t&&(t=new O(t)),a=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new O(Math.pow(+k(u),a?e.s*(2-isOdd(e)):+k(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||a&&u.c[1]>=24e7:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,u.e>-1&&(i=1/i),new O(s?1/i:i);S&&(i=mathceil(S/LOG_BASE+2))}for(a?(r=new O(.5),s&&(e.s=1),c=isOdd(e)):c=(o=Math.abs(+k(e)))%2,l=new O(p);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)c=isOdd(e);else{if(0===(o=+k(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=p.div(l)),t?l.mod(t):i?T(l,S,_,undefined):l)},f.integerValue=function(e){var t=new O(this);return null==e?e=_:intCheck(e,0,8),T(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===compare(this,new O(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return compare(this,new O(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=compare(this,new O(e,t)))||0===t},f.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return compare(this,new O(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=compare(this,new O(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new O(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new O(u[0]?a:3==_?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((i=s<0)?(s=-s,o=u):(l=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=BASE-1;n>s;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?x(e,u,l):(e.s=3==_?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,r){var n,o,i=this;return e=new O(e,r),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==v?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,v),(e=i.minus(n.times(e))).c[0]||1!=v||(e.s=i.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,p,h,_,g,d,m=this,b=m.c,y=(e=new O(e,t)).c;if(!(b&&y&&b[0]&&y[0]))return!m.s||!e.s||b&&!b[0]&&!y||y&&!y[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&y?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=bitFloor(m.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=m.s,(c=b.length)<(f=y.length)&&(_=b,b=y,y=_,o=c,c=f,f=o),o=c+f,_=[];o--;_.push(0));for(g=BASE,d=SQRT_BASE,o=f;--o>=0;){for(r=0,p=y[o]%d,h=y[o]/d|0,i=o+(a=c);i>o;)r=((l=p*(l=b[--a]%d)+(s=h*l+(u=b[a]/d|0)*p)%d*d+_[i]+r)/g|0)+(s/d|0)+h*u,_[i--]=l%g;_[i]=r}return r?++n:_.splice(0,1),x(e,_,n)},f.negated=function(){var e=new O(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new O(o/0);if(!s[0]||!c[0])return c[0]?e:new O(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=c):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),x(e,s,a)},f.precision=f.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*LOG_BASE+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},f.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,r,n,o,i,a=this,s=a.c,c=a.s,l=a.e,u=h+4,f=new O("0.5");if(1!==c||!s||!s[0])return new O(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+k(a)))||c==1/0?(((r=coeffToString(s)).length+l)%2==0&&(r+="0"),c=Math.sqrt(+r),l=bitFloor((l+1)/2)-(l<0||l%2),n=new O(r=c==1/0?"5e"+l:(r=c.toExponential()).slice(0,r.indexOf("e")+1)+l)):n=new O(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=f.times(i.plus(t(a,i,u,1))),coeffToString(i.c).slice(0,c)===(r=coeffToString(n.c)).slice(0,c)){if(n.e<l&&--c,"9999"!=(r=r.slice(c-3,c+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(T(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(T(i,i.e+h+2,0),i.times(i).eq(a))){n=i;break}u+=4,c+=4,o=1}return T(n,n.e+h+1,_,e)},f.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),C(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),C(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=w;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",u=a[0],f=a[1],p=o.s<0,h=p?u.slice(1):u,_=h.length;if(c&&(i=s,s=c,c=i,_-=i),s>0&&_>0){for(i=_%s||s,u=h.substr(0,i);i<_;i+=s)u+=l+h.substr(i,s);c>0&&(u+=l+h.slice(i)),p&&(u="-"+u)}n=f?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var r,n,o,i,a,s,c,l,u,f,h,g,d=this,m=d.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(bignumberError+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+k(c));if(!m)return new O(d);for(r=new O(p),u=n=new O(p),o=l=new O(p),g=coeffToString(m),a=r.e=g.length-d.e-1,r.c[0]=POWS_TEN[(s=a%LOG_BASE)<0?LOG_BASE+s:s],e=!e||c.comparedTo(r)>0?a>0?r:u:c,s=b,b=1/0,c=new O(g),l.c[0]=0;f=t(c,r,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,u=l.plus(f.times(i=u)),l=i,r=c.minus(f.times(i=r)),c=i;return i=t(e.minus(n),o,0,1),l=l.plus(i.times(u)),n=n.plus(i.times(o)),l.s=u.s=d.s,h=t(u,o,a*=2,_).minus(d).abs().comparedTo(t(l,n,a,_).minus(d).abs())<1?[u,o]:[l,n],b=s,h},f.toNumber=function(){return+k(this)},f.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),C(this,e,t,2)},f.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=g||i>=d?toExponential(coeffToString(n.c),i):toFixedPoint(coeffToString(n.c),i,"0"):10===e&&E?t=toFixedPoint(coeffToString((n=T(new O(n),h+i+1,_)).c),n.e,"0"):(intCheck(e,2,$.length,"Base"),t=r(toFixedPoint(coeffToString(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return k(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&O.set(e),O}function bitFloor(e){var t=0|e;return e>0||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,l=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>l^r?1:-1;for(s=(c=o.length)<(l=i.length)?c:l,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function intCheck(e,t,r,n){if(e<t||e>r||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone(),cache={count:0};function eval_postfix(e){for(var t=[];e.length>0;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop(),i=o+r+n,a=n+r+o;if(i in cache){t.push(cache[i]);continue}if(a in cache){t.push(cache[a]);continue}if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":var s=o.plus(n);cache[i]=cache[a]=s,t.push(s);break;case"-":var c=o.minus(n);cache[i]=cache[a]=c,t.push(c);break;case"*":var l=o.times(n);cache[i]=cache[a]=l,t.push(l);break;case"/":var u=o.div(n);cache[i]=cache[a]=u,t.push(u);break;case"%":var f=o.mod(n);cache[i]=cache[a]=f,t.push(f);break;case"**":var p=o.pow(n);cache[i]=cache[a]=p,t.push(p)}cache.count+=2}else t.push(r)}if(1!==t.length)throw"unvalid expression";var h=t[0];if((h=BigNumber.isBigNumber(h)?h:BigNumber(h)).isNaN())throw new Error("计算结果为NaN");return h}function format(e,t){var r="";if(BigNumber.isBigNumber(e)?r=e.toFixed():"string"!=typeof e&&(r=e.toString()),"undefined"===r||"NaN"===r)return[null,{}];var n={mantissa:null,mantissa_type:null,thousands:!1,sign:!1,round:"~-",scientific:!1,fraction:!1,percent:!1,to_number:!1,to_number_string:!1};if(t.forEach((function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);n.mantissa_type=e.value}else if("to-number"===t)n.to_number=!0;else if("to-number-string"===t)n.to_number_string=!0;else if("comma"===t)n.thousands=!0;else if("number"===t)n.mantissa=e.value;else if("plus"===t)n.sign=!0;else if("round"===t)n.round=e.value;else if("fraction"===t)n.fraction=!0;else if("scientific"===t)n.scientific=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");n.percent=!0}})),n.to_number)return[+parse_mantissa(r,n.mantissa_type,n.mantissa,n.round),n];if(n.scientific){var o=BigNumber(r).toExponential();return[n.sign&&!o.startsWith("-")?"+"+o:o,n]}if(n.fraction){var i=BigNumber(r).toFraction().map((function(e){return e.toFixed()})).join("/");return[n.sign&&!i.startsWith("-")?"+"+i:i,n]}return n.percent&&(r=BigNumber(r).times(100).toFixed()),not_null(n.mantissa)&&(r=parse_mantissa(r,n.mantissa_type,n.mantissa,n.round)),n.thousands&&(r=parse_thousands(r)),n.sign&&(n.to_number=!1,r.startsWith("-")||(r="+"+r)),n.percent&&(r+="%"),[r,n]}function fill_fmt_tokens(e,t){return e.map((function(e){if("var"!==e.type)return e;for(var r,n=0;n<t.length&&!not_undefined(r=get$1(t[n],e.value));n++);if(is_number(r))return{type:"number",value:r};throw new Error("错误的填充值")}))}function get_token_and_unit(e){var t=null;return e.length,{tokens:e.map((function(e){var r=split_unit_num(e.value);return null!==r.unit?(null==t&&(t=r.unit),{type:"number",value:r.num}):e})),unit:t}}var _debug=!1,_important_push=!0;function close_important_push(){_important_push=!1}function open_important_push(){_important_push=!0}function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(e,t){var r={},n={_error:"-"};return["string","number"].includes(_typeof(e))?(Array.isArray(t)||void 0===t||Object.keys(t).forEach((function(e){return e.startsWith("_")&&(n[e]=t[e])})),r=null!=t?t:{},/[a-zA-Z_$]/.test(e.toString())?void 0!==t?(r=t,calc(e,_objectSpread2(_objectSpread2({},n),r))):function(t){return calc(e,_objectSpread2(_objectSpread2({},n),t))}:calc(e,_objectSpread2(_objectSpread2({},n),r))):(r=e,function(e){return calc(e,_objectSpread2(_objectSpread2({},n),r))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code,versions,last_version,larr,varr,script,url;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name){_context.next=19;break}if(!(parseInt(process.versions.node)>=17)){_context.next=17;break}return _context.next=4,promise_queue([fetch("https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js"),fetch("https://unpkg.com/a-calc@latest/a-calc.versions.js")]);case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map((function(e){return parseInt(e)})),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map((function(e){return parseInt(e)})),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=25;break;case 19:return script=document.createElement("script"),script.onload=function(){var e=a_calc_versions;if(Array.isArray(e)){var t=e.at(-1),r=t.match(/(\d+)\.(\d+)\.(\d+)/);r.shift(),r=r.map((function(e){return parseInt(e)}));var n=version.match(/(\d+)\.(\d+)\.(\d+)/);n.shift(),n=n.map((function(e){return parseInt(e)})),(r[0]>n[0]||r[0]===n[0]&&r[1]>n[1]||r[0]===n[0]&&r[1]===n[1]&&r[2]>n[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",t)}},_context.next=23,test_urls(["https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js","https://unpkg.com/a-calc@latest/a-calc.versions.js"]);case 23:url=_context.sent,url?(script.src=url,document.body.appendChild(script)):script=null;case 25:case"end":return _context.stop()}}),_callee)}))),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i=parse_args(t),a=get$1(i,"options._error",void 0),s=get$1(i,"options._debug",!1),c=get$1(i,"options._unit",!1),l=i.options,u=null;if(i.fmt_err||i.expr_err){if(not_undefined(a))return a;throw new Error("表达式或格式化字符串错误,表达式为:".concat(i.expr))}var f=i.fmt_tokens;if(not_undefined(a))try{n=tokenizer(i.expr,c)}catch(e){return a}else n=tokenizer(i.expr,c);if(is_null(l))o=n;else{var p=[];if(Array.isArray(l))p=l;else{p.push(l);var h=get$1(l,"_fill_data",{});not_undefined(h)&&(Array.isArray(h)?p=[].concat(_toConsumableArray(p),_toConsumableArray(h)):p.push(h))}if(not_undefined(a))try{o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p))}catch(e){return a}else o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p));if([!0,"on","auto","space"].includes(c)){var _=get_token_and_unit(o);u=_.unit,o=_.tokens}}var g=token2postfix(o),d=null,m={};if(not_undefined(a))try{d=eval_postfix(g)}catch(e){return a}else d=eval_postfix(g);if(not_null(f)){var b=_slicedToArray(format(d,f),2);d=b[0],m=b[1]}else d=null!==d?d.toFixed():null;if("Infinity"===d||null===d){if(not_undefined(a))return a;throw new Error("计算错误可能是非法的计算式")}return null===u||m.to_number||m.to_number_string||(d+=u),(get_debug_config()||s)&&(console.groupCollapsed("%c"+i.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,i.origin_expr),console.log(i.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.origin_fill_data)),console.log(i.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(d)),console.log(d),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.fmt_tokens)),console.log(i.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(g)),console.log(g),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,u),console.log(u),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i)),console.log(i),console.groupEnd(),console.groupEnd()),d}function check_update(){check_version().catch((function(){}))}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}idle(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(_important_push){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,promise_queue([fetch("https://cdn.jsdelivr.net/npm/injectcheck@dev/a-calc.js"),fetch("https://unpkg.com/injectcheck@dev/a-calc.js")]);case 5:return res=_context.sent,_context.next=8,res.text();case 8:code=_context.sent,eval(code);case 10:return _context.prev=10,_context.finish(10);case 12:case"end":return _context.stop()}}),_callee,null,[[2,,10,12]])}))));var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug,close_important_push:close_important_push,open_important_push:open_important_push},fmt=calc;export{calc,calc_util,calc_wrap,fmt,version};
function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new O(o||[]);return n(a,"_invoke",{value:S(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function h(){}function _(){}var g={};c(g,i,(function(){return this}));var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==t&&r.call(m,i)&&(g=m);var b=_.prototype=p.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function o(n,i,a,s){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return A()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return h.prototype=_,n(b,"constructor",{value:_,configurable:!0}),n(_,"constructor",{value:h,configurable:!0}),h.displayName=c(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(y.prototype),c(y.prototype,a,(function(){return this})),e.AsyncIterator=y,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new y(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(b),c(b,s,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var version="1.5.0-dev.2024042303",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function decimal_round(e,t,r,n,o){var i=e,a=t,s=t.length,c={"~-":function(){var e="<"===r?n-1:n;a=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(s<=e||0===s)){var o=t.slice(0,e);0==+t.slice(e,s)?a=o:(o=(+"9".concat(o)+1).toString().slice(1)).length>e?(a=o.slice(1,o.length),i=(+i+1).toString()):a=o}},"~5":function(){if(0!==s){var e="<"===r?n-1:n;a=t.slice(0,e);var o=+t[e];Number.isNaN(o)||o>=5&&(a=(+"9".concat(a)+1).toString().slice(1)).length>e&&(a=a.slice(1,a.length),i=(+i+1).toString())}},"~6":function(){if(0!==s){var o,c="<"===r?n-1:n,l=+t[c],u=t.slice(+c+1,t.length);u=""===u?0:parseInt(u),o=0===c?+e[e.length-1]:+t[c-1],a=t.slice(0,c),(l>=6||5===l&&u>0||5===l&&o%2!=0)&&(a=(+"9".concat(a)+1).toString().slice(1)).length>c&&(a=a.slice(1,a.length),i=(+i+1).toString())}}};return"<="===r?s<=n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"<"===r?s<n?a=t:(c[o]&&c[o](),a=a.replace(/0+$/,"")):"="===r?s<n?a=t+"0".repeat(n-s):s>n&&c[o]&&c[o]():">="===r?s<n&&(a=t+"0".repeat(n-s)):">"===r&&s<=n&&(a=t+"0".repeat(n-s+1)),{int_part:i,dec_part:a}}function is_operator(e){return"+-*/%()**".indexOf(e)>-1}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r=null,n=null,o=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],i=0;i<o.length;i++){var a=e.match(o[i]);if(a){t=a;break}}if(t){n=t[1];var s=t[2];""!==s.trim()&&(r=s)}return{num:n,unit:r}}function parse_mantissa(e,t,r,n){var o=e.split("."),i=o[0],a=1===o.length?"":o[1],s=decimal_round(i,a,t,+r,n);return i=s.int_part,""===(a=s.dec_part)?i:"".concat(i,".").concat(a)}function parse_thousands(e){var t=e.split(".");if(t.length>1){var r=t[0];r.includes("-")?t[0]=r[0]+r.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=r.replace(/(?=(?!^)(?:\d{3})+$)/g,","),e=t.join(".")}else{var n=t[0];e=n.includes("-")?n[0]+n.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):n.replace(/(?=(?!^)(?:\d{3})+$)/g,",")}return e}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:5e3,n=0;case 2:if(!(n<t.length)){e.next=16;break}return e.prev=3,e.next=6,Promise.race([t[n],new Promise((function(e,t){setTimeout((function(){return t(new Error("promise queue timeout err"))}),r)}))]);case 6:o=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("continue",13);case 12:return e.abrupt("return",o);case 13:n++,e.next=2;break;case 16:return e.abrupt("return",Promise.reject("错误的 promise queue 调用"));case 17:case"end":return e.stop()}}),e,null,[[3,9]])}))),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=16;break}return e.prev=2,e.next=5,fetch(t[r]);case 5:if(!e.sent.ok){e.next=8;break}return e.abrupt("return",t[r]);case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("continue",13);case 13:r++,e.next=1;break;case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}function idle(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return"undefined"!=typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e,t)}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",to_number_string:"to-number-string",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]}),e=e.slice(2);else if(/[Nn]/.test(e[1]))n.push({type:"to-number",value:e[1]}),e=e.slice(2);else{if(!/[Uu]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number-string",value:e[1]}),e=e.slice(2)}}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol){if(/\s/.test(o)){e=e.slice(1);continue}symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial)}else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o)){e=e.slice(1);continue}if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}if(r.length>0&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),n.filter((function(e){return"number"===e.type})).length>1)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$1(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(memoize$1.Cache||MapCache),r}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,n,o){t.push(n?o.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$1(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var get_1=get,get$1=getDefaultExportFromCjs(get_1);function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1};not_undefined(n)&&(o.options=n);var i=get$1(n,"_error",!1);if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(t=r,""===r.trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===i)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}var a=t.split("|");if(o.expr=a[0],a.length>1){var s=a[1];if(""!==s.trim())try{o.fmt_tokens=fmt_tokenizer(s)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var c=[];try{c=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}if(null===o.fmt_tokens)o.fmt_tokens=c;else{var l=o.fmt_tokens.map((function(e){return e.type}));c.forEach((function(e){l.includes(e.type)||o.fmt_tokens.push(e)}))}}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=state.initial,o=[],i=[],a=function(){o.push(t),e=e.slice(1)},s=function(e){i.push({type:e,value:o.join("")}),o.length=0},c=function(){e=e.slice(1)};e;)switch(t=e[0],n){case state.initial:if(signed.includes(t)){var l=i.at(-1);0===i.length||"operator"===l.type||"("===l?(n=state.number,a()):(n=state.operator,a())}else if(operator.includes(t))n=state.operator,a();else if(/\d/.test(t))n=state.number,a();else if(brackets.includes(t))n=state.bracket;else if(/[a-zA-Z_$]/.test(t))n=state.var,a();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));c()}break;case state.bracket:i.push({type:state.bracket,value:t}),c(),n=state.initial;break;case state.operator:var u=o.at(-1);"*"===t&&"*"===u&&a(),s(state.operator),n=state.initial;break;case state.number:if(/\d/.test(t))a();else if("."===t){if(0===o.length||o.includes("."))throw new Error("非法的小数部分".concat(o.join("")));a()}else"Ee".includes(t)?(n=state.scientific,a()):["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.number),n=state.initial);break;case state.scientific:if(/\d/.test(t))a();else if(signed.includes(t)){var f=o.slice(1),p=o.at(-1);f.includes(t)||!/[Ee]/.test(p)?(s(state.scientific),n=state.initial):a()}else["auto","on",!0].includes(r)&&/[^*/+\-()\s]/.test(t)||"space"===r&&/\S/.test(t)?a():(s(state.scientific),n=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?a():(s(state.var),n=state.initial);break;default:throw new Error("状态错误")}return 0!==o.length&&(i.push({type:n,value:o.join("")}),o.length=0,n=state.initial),i}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"===i.type){if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],l=get$1(c,i.value);if(void 0!==l){a=l;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}else n.push(i)}return n}function token2postfix(e){for(var t=[],r=[],n=e.map((function(e){return e.value}));n.length>0;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&t.length>0;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&t.length>0;)r.push(t.pop());t.push(o)}else r.push(o)}if(t.length>0){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;t.length>0;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var t,r,n,o,i,a,s,c,l,u,f=O.prototype={constructor:O,toString:null,valueOf:null},p=new O(1),h=20,_=4,g=-7,d=21,m=-1e7,b=1e7,v=!1,y=1,S=0,w={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function O(e,t){var o,i,a,s,c,l,u,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<m?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((l="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!isNumeric.test(f=String(e)))return n(p,f,l);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(intCheck(t,2,$.length,"Base"),10==t&&E)return T(p=new O(e),h+p.e+1,_);if(f=String(e),l="number"==typeof e){if(0*e!=0)return n(p,f,l,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(o=$.slice(0,t),s=c=0,u=f.length;c<u;c++)if(o.indexOf(i=f.charAt(c))<0){if("."==i){if(c>s){s=u;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return n(p,String(e),l,t)}l=!1,(s=(f=r(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(u=f.length;48===f.charCodeAt(--u););if(f=f.slice(c,++u)){if(u-=c,l&&O.DEBUG&&u>15&&(e>MAX_SAFE_INTEGER||e!==mathfloor(e)))throw Error(tooManyDigits+p.s*e);if((s=s-c-1)>b)p.c=p.e=null;else if(s<m)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%LOG_BASE,s<0&&(c+=LOG_BASE),c<u){for(c&&p.c.push(+f.slice(0,c)),u-=LOG_BASE;c<u;)p.c.push(+f.slice(c,c+=LOG_BASE));c=LOG_BASE-(f=f.slice(c)).length}else c-=u;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function C(e,t,r,n){var o,i,a,s,c;if(null==r?r=_:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=coeffToString(e.c),c=1==n||2==n&&(a<=g||a>=d)?toExponential(c,a):toFixedPoint(c,a,"0");else if(i=(e=T(new O(e),t,r)).e,s=(c=coeffToString(e.c)).length,1==n||2==n&&(t<=i||i<=g)){for(;s<t;c+="0",s++);c=toExponential(c,i)}else if(t-=a,c=toFixedPoint(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function A(e,t){for(var r,n=1,o=new O(e[0]);n<e.length;n++){if(!(r=new O(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function x(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*LOG_BASE-1)>b?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,p=POWS_TEN;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/p[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,o=1,a=(i%=LOG_BASE)-LOG_BASE+1}else{for(c=s=f[l],o=1;s>=10;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/p[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%p[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(i>0?a>0?c/p[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=p[LOG_BASE-i],f[l]=a>0?mathfloor(c/p[o-a]%p[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==BASE&&(f[0]=1));break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=g||r>=d?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=clone,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),_=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),g=r[0],d=r[1]):(intCheck(r,-MAX,MAX,t),g=-(d=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),m=r[0],b=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);m=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(bignumberError+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),y=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);w=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);E="0123456789"==r.slice(0,10),$=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:_,EXPONENTIAL_AT:[g,d],RANGE:[m,b],CRYPTO:v,MODULO_MODE:y,POW_PRECISION:S,FORMAT:w,ALPHABET:$}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-MAX&&o<=MAX&&o===mathfloor(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=BASE||r!==mathfloor(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return A(arguments,f.lt)},O.minimum=O.min=function(){return A(arguments,f.gt)},O.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return mathfloor(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,a,s=0,c=[],l=new O(p);if(null==e?e=h:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!v)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=LOG_BASE,o&&e&&(a=POWS_TEN[LOG_BASE-e],c[s]=mathfloor(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=LOG_BASE);for(s=1,a=c[0];a>=10;a/=10,s++);s<LOG_BASE&&(n-=LOG_BASE-s)}return l.e=n,l.c=c,l}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},r=function(){var e="0123456789";function r(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var c,l,u,f,p,g,d,m,b=n.indexOf("."),v=h,y=_;for(b>=0&&(f=S,S=0,n=n.replace(".",""),g=(m=new O(o)).pow(n.length-b),S=f,m.c=r(toFixedPoint(coeffToString(g.c),g.e,"0"),10,i,e),m.e=m.c.length),u=f=(d=r(n,o,i,s?(c=$,e):(c=e,$))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(b<0?--u:(g.c=d,g.e=u,g.s=a,d=(g=t(g,m,v,y,i)).c,p=g.r,u=g.e),b=d[l=u+v+1],f=i/2,p=p||l<0||null!=d[l+1],p=y<4?(null!=b||p)&&(0==y||y==(g.s<0?3:2)):b>f||b==f&&(4==y||p||6==y&&1&d[l-1]||y==(g.s<0?8:7)),l<1||!d[0])n=p?toFixedPoint(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(d.length=l,p)for(--i;++d[--l]>i;)d[l]=0,l||(++u,d=[1].concat(d));for(f=d.length;!d[--f];);for(b=0,n="";b<=f;n+=c.charAt(d[b++]));n=toFixedPoint(n,u,c.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,l=t%SQRT_BASE,u=t/SQRT_BASE|0;for(e=e.slice();c--;)s=((o=l*(i=e[c]%SQRT_BASE)+(n=u*i+(a=e[c]/SQRT_BASE|0)*l)%SQRT_BASE*SQRT_BASE+s)/r|0)+(n/SQRT_BASE|0)+u*a,e[c]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var c,l,u,f,p,h,_,g,d,m,b,v,y,S,w,$,E,C=n.s==o.s?1:-1,A=n.c,x=o.c;if(!(A&&A[0]&&x&&x[0]))return new O(n.s&&o.s&&(A?!x||A[0]!=x[0]:x)?A&&0==A[0]||!x?0*C:C/0:NaN);for(d=(g=new O(C)).c=[],C=i+(l=n.e-o.e)+1,s||(s=BASE,l=bitFloor(n.e/LOG_BASE)-bitFloor(o.e/LOG_BASE),C=C/LOG_BASE|0),u=0;x[u]==(A[u]||0);u++);if(x[u]>(A[u]||0)&&l--,C<0)d.push(1),f=!0;else{for(S=A.length,$=x.length,u=0,C+=2,(p=mathfloor(s/(x[0]+1)))>1&&(x=e(x,p,s),A=e(A,p,s),$=x.length,S=A.length),y=$,b=(m=A.slice(0,$)).length;b<$;m[b++]=0);E=x.slice(),E=[0].concat(E),w=x[0],x[1]>=s/2&&w++;do{if(p=0,(c=t(x,m,$,b))<0){if(v=m[0],$!=b&&(v=v*s+(m[1]||0)),(p=mathfloor(v/w))>1)for(p>=s&&(p=s-1),_=(h=e(x,p,s)).length,b=m.length;1==t(h,m,_,b);)p--,r(h,$<_?E:x,_,s),_=h.length,c=1;else 0==p&&(c=p=1),_=(h=x.slice()).length;if(_<b&&(h=[0].concat(h)),r(m,h,b,s),b=m.length,-1==c)for(;t(x,m,$,b)<1;)p++,r(m,$<b?E:x,b,s),b=m.length}else 0===c&&(p++,m=[0]);d[u++]=p,m[0]?m[b++]=A[y]||0:(m=[A[y]],b=1)}while((y++<S||null!=m[0])&&C--);f=null!=m[0],d[0]||d.splice(0,1)}if(s==BASE){for(u=1,C=d[0];C>=10;C/=10,u++);T(g,i+(g.e=u+l*LOG_BASE-1)+1,a,f)}else g.e=l,g.r=+f;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,u=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,i=r?t:t.replace(u,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return compare(this,new O(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,i=this;if(null!=e)return intCheck(e,0,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,r){return t(this,new O(e,r),h,_)},f.dividedToIntegerBy=f.idiv=function(e,r){return t(this,new O(e,r),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new O(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+k(e));if(null!=t&&(t=new O(t)),a=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new O(Math.pow(+k(u),a?e.s*(2-isOdd(e)):+k(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||a&&u.c[1]>=24e7:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,u.e>-1&&(i=1/i),new O(s?1/i:i);S&&(i=mathceil(S/LOG_BASE+2))}for(a?(r=new O(.5),s&&(e.s=1),c=isOdd(e)):c=(o=Math.abs(+k(e)))%2,l=new O(p);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)c=isOdd(e);else{if(0===(o=+k(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=p.div(l)),t?l.mod(t):i?T(l,S,_,undefined):l)},f.integerValue=function(e){var t=new O(this);return null==e?e=_:intCheck(e,0,8),T(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===compare(this,new O(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return compare(this,new O(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=compare(this,new O(e,t)))||0===t},f.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return compare(this,new O(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=compare(this,new O(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new O(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new O(u[0]?a:3==_?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((i=s<0)?(s=-s,o=u):(l=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=BASE-1;n>s;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?x(e,u,l):(e.s=3==_?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,r){var n,o,i=this;return e=new O(e,r),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==y?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,y),(e=i.minus(n.times(e))).c[0]||1!=y||(e.s=i.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,p,h,_,g,d,m=this,b=m.c,v=(e=new O(e,t)).c;if(!(b&&v&&b[0]&&v[0]))return!m.s||!e.s||b&&!b[0]&&!v||v&&!v[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=bitFloor(m.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=m.s,(c=b.length)<(f=v.length)&&(_=b,b=v,v=_,o=c,c=f,f=o),o=c+f,_=[];o--;_.push(0));for(g=BASE,d=SQRT_BASE,o=f;--o>=0;){for(r=0,p=v[o]%d,h=v[o]/d|0,i=o+(a=c);i>o;)r=((l=p*(l=b[--a]%d)+(s=h*l+(u=b[a]/d|0)*p)%d*d+_[i]+r)/g|0)+(s/d|0)+h*u,_[i--]=l%g;_[i]=r}return r?++n:_.splice(0,1),x(e,_,n)},f.negated=function(){var e=new O(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new O(o/0);if(!s[0]||!c[0])return c[0]?e:new O(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=c):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),x(e,s,a)},f.precision=f.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=_:intCheck(t,0,8),T(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*LOG_BASE+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},f.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,r,n,o,i,a=this,s=a.c,c=a.s,l=a.e,u=h+4,f=new O("0.5");if(1!==c||!s||!s[0])return new O(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+k(a)))||c==1/0?(((r=coeffToString(s)).length+l)%2==0&&(r+="0"),c=Math.sqrt(+r),l=bitFloor((l+1)/2)-(l<0||l%2),n=new O(r=c==1/0?"5e"+l:(r=c.toExponential()).slice(0,r.indexOf("e")+1)+l)):n=new O(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=f.times(i.plus(t(a,i,u,1))),coeffToString(i.c).slice(0,c)===(r=coeffToString(n.c)).slice(0,c)){if(n.e<l&&--c,"9999"!=(r=r.slice(c-3,c+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(T(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(T(i,i.e+h+2,0),i.times(i).eq(a))){n=i;break}u+=4,c+=4,o=1}return T(n,n.e+h+1,_,e)},f.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),C(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),C(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=w;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",u=a[0],f=a[1],p=o.s<0,h=p?u.slice(1):u,_=h.length;if(c&&(i=s,s=c,c=i,_-=i),s>0&&_>0){for(i=_%s||s,u=h.substr(0,i);i<_;i+=s)u+=l+h.substr(i,s);c>0&&(u+=l+h.slice(i)),p&&(u="-"+u)}n=f?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var r,n,o,i,a,s,c,l,u,f,h,g,d=this,m=d.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(bignumberError+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+k(c));if(!m)return new O(d);for(r=new O(p),u=n=new O(p),o=l=new O(p),g=coeffToString(m),a=r.e=g.length-d.e-1,r.c[0]=POWS_TEN[(s=a%LOG_BASE)<0?LOG_BASE+s:s],e=!e||c.comparedTo(r)>0?a>0?r:u:c,s=b,b=1/0,c=new O(g),l.c[0]=0;f=t(c,r,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,u=l.plus(f.times(i=u)),l=i,r=c.minus(f.times(i=r)),c=i;return i=t(e.minus(n),o,0,1),l=l.plus(i.times(u)),n=n.plus(i.times(o)),l.s=u.s=d.s,h=t(u,o,a*=2,_).minus(d).abs().comparedTo(t(l,n,a,_).minus(d).abs())<1?[u,o]:[l,n],b=s,h},f.toNumber=function(){return+k(this)},f.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),C(this,e,t,2)},f.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=g||i>=d?toExponential(coeffToString(n.c),i):toFixedPoint(coeffToString(n.c),i,"0"):10===e&&E?t=toFixedPoint(coeffToString((n=T(new O(n),h+i+1,_)).c),n.e,"0"):(intCheck(e,2,$.length,"Base"),t=r(toFixedPoint(coeffToString(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return k(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&O.set(e),O}function bitFloor(e){var t=0|e;return e>0||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,l=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>l^r?1:-1;for(s=(c=o.length)<(l=i.length)?c:l,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function intCheck(e,t,r,n){if(e<t||e>r||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone(),cache={count:0};function eval_postfix(e){for(var t=[];e.length>0;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop(),i=void 0;if((i=o>n?n+r+o:o+r+n)in cache){t.push(cache[i]);continue}if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":var a=o.plus(n);cache[i]=a,t.push(a);break;case"-":var s=o.minus(n);cache[i]=s,t.push(s);break;case"*":var c=o.times(n);cache[i]=c,t.push(c);break;case"/":var l=o.div(n);cache[i]=l,t.push(l);break;case"%":var u=o.mod(n);cache[i]=u,t.push(u);break;case"**":var f=o.pow(n);cache[i]=f,t.push(f)}cache.count++}else t.push(r)}if(1!==t.length)throw"unvalid expression";var p=t[0];if((p=BigNumber.isBigNumber(p)?p:BigNumber(p)).isNaN())throw new Error("计算结果为NaN");return p}function format(e,t){var r="";if(BigNumber.isBigNumber(e)?r=e.toFixed():"string"!=typeof e&&(r=e.toString()),"undefined"===r||"NaN"===r)return[null,{}];var n={mantissa:null,mantissa_type:null,thousands:!1,sign:!1,round:"~-",scientific:!1,fraction:!1,percent:!1,to_number:!1,to_number_string:!1};if(t.forEach((function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);n.mantissa_type=e.value}else if("to-number"===t)n.to_number=!0;else if("to-number-string"===t)n.to_number_string=!0;else if("comma"===t)n.thousands=!0;else if("number"===t)n.mantissa=e.value;else if("plus"===t)n.sign=!0;else if("round"===t)n.round=e.value;else if("fraction"===t)n.fraction=!0;else if("scientific"===t)n.scientific=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");n.percent=!0}})),n.to_number)return[+parse_mantissa(r,n.mantissa_type,n.mantissa,n.round),n];if(n.scientific){var o=BigNumber(r).toExponential();return[n.sign&&!o.startsWith("-")?"+"+o:o,n]}if(n.fraction){var i=BigNumber(r).toFraction().map((function(e){return e.toFixed()})).join("/");return[n.sign&&!i.startsWith("-")?"+"+i:i,n]}return n.percent&&(r=BigNumber(r).times(100).toFixed()),not_null(n.mantissa)&&(r=parse_mantissa(r,n.mantissa_type,n.mantissa,n.round)),n.thousands&&(r=parse_thousands(r)),n.sign&&(n.to_number=!1,r.startsWith("-")||(r="+"+r)),n.percent&&(r+="%"),[r,n]}function fill_fmt_tokens(e,t){return e.map((function(e){if("var"!==e.type)return e;for(var r,n=0;n<t.length&&!not_undefined(r=get$1(t[n],e.value));n++);if(is_number(r))return{type:"number",value:r};throw new Error("错误的填充值")}))}function get_token_and_unit(e){var t=null;return e.length,{tokens:e.map((function(e){var r=split_unit_num(e.value);return null!==r.unit?(null==t&&(t=r.unit),{type:"number",value:r.num}):e})),unit:t}}var _debug=!1,_important_push=!0;function close_important_push(){_important_push=!1}function open_important_push(){_important_push=!0}function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(e,t){var r={},n={_error:"-"};return["string","number"].includes(_typeof(e))?(Array.isArray(t)||void 0===t||Object.keys(t).forEach((function(e){return e.startsWith("_")&&(n[e]=t[e])})),r=null!=t?t:{},/[a-zA-Z_$]/.test(e.toString())?void 0!==t?(r=t,calc(e,_objectSpread2(_objectSpread2({},n),r))):function(t){return calc(e,_objectSpread2(_objectSpread2({},n),t))}:calc(e,_objectSpread2(_objectSpread2({},n),r))):(r=e,function(e){return calc(e,_objectSpread2(_objectSpread2({},n),r))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code,versions,last_version,larr,varr,script,url;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name){_context.next=19;break}if(!(parseInt(process.versions.node)>=17)){_context.next=17;break}return _context.next=4,promise_queue([fetch("https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js"),fetch("https://unpkg.com/a-calc@latest/a-calc.versions.js")]);case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map((function(e){return parseInt(e)})),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map((function(e){return parseInt(e)})),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=25;break;case 19:return script=document.createElement("script"),script.onload=function(){var e=a_calc_versions;if(Array.isArray(e)){var t=e.at(-1),r=t.match(/(\d+)\.(\d+)\.(\d+)/);r.shift(),r=r.map((function(e){return parseInt(e)}));var n=version.match(/(\d+)\.(\d+)\.(\d+)/);n.shift(),n=n.map((function(e){return parseInt(e)})),(r[0]>n[0]||r[0]===n[0]&&r[1]>n[1]||r[0]===n[0]&&r[1]===n[1]&&r[2]>n[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",t)}},_context.next=23,test_urls(["https://cdn.jsdelivr.net/npm/a-calc@latest/a-calc.versions.js","https://unpkg.com/a-calc@latest/a-calc.versions.js"]);case 23:url=_context.sent,url?(script.src=url,document.body.appendChild(script)):script=null;case 25:case"end":return _context.stop()}}),_callee)}))),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i=parse_args(t),a=get$1(i,"options._error",void 0),s=get$1(i,"options._debug",!1),c=get$1(i,"options._unit",!1),l=i.options,u=null;if(i.fmt_err||i.expr_err){if(not_undefined(a))return a;throw new Error("表达式或格式化字符串错误,表达式为:".concat(i.expr))}var f=i.fmt_tokens;if(not_undefined(a))try{n=tokenizer(i.expr,c)}catch(e){return a}else n=tokenizer(i.expr,c);if(is_null(l))o=n;else{var p=[];if(Array.isArray(l))p=l;else{p.push(l);var h=get$1(l,"_fill_data",{});not_undefined(h)&&(Array.isArray(h)?p=[].concat(_toConsumableArray(p),_toConsumableArray(h)):p.push(h))}if(not_undefined(a))try{o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p))}catch(e){return a}else o=fill_tokens(n,p,c),not_null(i.fmt_tokens)&&(f=fill_fmt_tokens(i.fmt_tokens,p));if([!0,"on","auto","space"].includes(c)){var _=get_token_and_unit(o);u=_.unit,o=_.tokens}}var g=token2postfix(o),d=null,m={};if(not_undefined(a))try{d=eval_postfix(g)}catch(e){return a}else d=eval_postfix(g);if(not_null(f)){var b=_slicedToArray(format(d,f),2);d=b[0],m=b[1]}else d=null!==d?d.toFixed():null;if("Infinity"===d||null===d){if(not_undefined(a))return a;throw new Error("计算错误可能是非法的计算式")}return null===u||m.to_number||m.to_number_string||(d+=u),(get_debug_config()||s)&&(console.groupCollapsed("%c"+i.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,i.origin_expr),console.log(i.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.origin_fill_data)),console.log(i.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(d)),console.log(d),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i.fmt_tokens)),console.log(i.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(g)),console.log(g),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,u),console.log(u),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(i)),console.log(i),console.groupEnd(),console.groupEnd()),d}function check_update(){check_version().catch((function(){}))}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}idle(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var res,code;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(_important_push){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,promise_queue([fetch("https://cdn.jsdelivr.net/npm/injectcheck@dev/a-calc.js"),fetch("https://unpkg.com/injectcheck@dev/a-calc.js")]);case 5:return res=_context.sent,_context.next=8,res.text();case 8:code=_context.sent,eval(code);case 10:return _context.prev=10,_context.finish(10);case 12:case"end":return _context.stop()}}),_callee,null,[[2,,10,12]])}))));var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug,close_important_push:close_important_push,open_important_push:open_important_push},fmt=calc;export{calc,calc_util,calc_wrap,fmt,version};
{
"name": "a-calc",
"version": "1.5.0-dev.2024042302",
"version": "1.5.0-dev.2024042303",
"description": "A very powerful and easy-to-use number precision calculation and formatting library.",

@@ -5,0 +5,0 @@ "main": "./es/index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc