a-calc 3.0.0-beta.20250123.11 → 3.0.0-beta.20250123.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var a_calc=function(exports){"use strict";var _documentCurrentScript="undefined"!=typeof document?document.currentScript:null;function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),_=s.value}catch(e){return void r(e)}s.done?t(_):Promise.resolve(_).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,s,"next",e)}function s(e){asyncGeneratorStep(a,n,i,o,s,"throw",e)}o(void 0)})}}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}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 _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],_=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;_=!1}else for(;!(_=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);_=!0);}catch(e){u=!0,i=e}finally{try{if(!_&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}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 _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 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 _regenerator(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var _=n&&n.prototype instanceof s?n:s,u=Object.create(_.prototype);return _regeneratorDefine(u,"_invoke",function(r,n,i){var a,s,_,u=0,c=i||[],l=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,_=e,p.n=r,o}};function d(r,n){for(s=r,_=n,t=0;!l&&u&&!i&&t<c.length;t++){var i,a=c[t],d=p.p,f=a[2];r>3?(i=f===n)&&(_=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,p.v=n,p.n=a[1]):d<f&&(i=r<3||a[0]>n||n>f)&&(a[4]=r,a[5]=n,p.n=f,s=0))}if(i||r>1)return o;throw l=!0,n}return function(i,c,f){if(u>1)throw TypeError("Generator is already running");for(l&&1===c&&d(c,f),s=c,_=f;(t=s<2?e:_)||!l;){a||(s?s<3?(s>1&&(p.n=-1),d(s,_)):p.n=_:p.v=_);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(_=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(l=p.n<0)?_:r.call(n,p))!==o)break}catch(t){a=e,s=1,_=t}finally{u=1}}return{value:t,done:l}}}(r,i,a),!0),u}var o={};function s(){}function _(){}function u(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),l=u.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return _.prototype=u,_regeneratorDefine(l,"constructor",u),_regeneratorDefine(u,"constructor",_),_.displayName="GeneratorFunction",_regeneratorDefine(u,i,"GeneratorFunction"),_regeneratorDefine(l),_regeneratorDefine(l,i,"Generator"),_regeneratorDefine(l,n,function(){return this}),_regeneratorDefine(l,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:p}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}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 _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);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:t+""}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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.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}}var version="3.0.0-beta.20250123.8";function decimal_round(e,t,r,n,i){var a=e.startsWith("-"),o=a?e.slice(1):e,s=o,_=t,u=t.length;function c(){s=(+s+1).toString()}var l={"~-":function(){var e="<"===r?n-1:n;_=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(u<=e||0===u)){var i=t.slice(0,e);0===+t.slice(e,u)?_=i:(i=(+"9".concat(i)+1).toString().slice(1)).length>e?(_=i.slice(1,i.length),c()):_=i}},"~5":function(){if(0!==u){var e="<"===r?n-1:n;_=t.slice(0,e);var i=+t[e];Number.isNaN(i)||i>=5&&(_=(+"9".concat(_)+1).toString().slice(1)).length>e&&(_=_.slice(1,_.length),c())}},"~6":function(){if(0!==u){var e,i="<"===r?n-1:n,a=+t[i],s=t.slice(+i+1,t.length);s=""===s?0:parseInt(s),e=0===i?+o[o.length-1]:+t[i-1],_=t.slice(0,i),(a>=6||5===a&&s>0||5===a&&e%2!=0)&&(_=(+"9".concat(_)+1).toString().slice(1)).length>i&&(_=_.slice(1,_.length),c())}}};return"<="===r?u<=n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"<"===r?u<n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"="===r?u<n?_=t+"0".repeat(n-u):u>n&&l[i]&&l[i]():">="===r?u<n&&(_=t+"0".repeat(n-u)):">"===r&&u<=n&&(_=t+"0".repeat(n-u+1)),{int_part:a?"-".concat(s):s,dec_part:_}}var number_char="0123456789",var_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",number_first_char="0123456789-+",var_members_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$[].'\"",var_first_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",pure_number_var_first_char="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",empty_char=" \n\r\t",number_char_set=new Set(number_char),var_char_set=new Set(var_char),var_members_char_set=new Set(var_members_char),var_first_char_set=new Set(var_first_char);new Set(number_first_char);var pure_number_var_first_char_set=new Set(pure_number_var_first_char),empty_char_set=new Set(empty_char),state_initial="initial",state_number="number",state_scientific="scientific",state_operator="operator",state_bracket="bracket",state_var="var",state_symbol="symbol",state_percent="percent",state_round="round",state_plus="plus",state_comma="comma",state_fraction="fraction",state_to_number="to-number",state_to_number_string="to-number-string",state_fallback_var="fallback_var",state_integer_padding="integer_padding",state_volume="volume",state_unit_after="unit_after",state_unit_before="unit_before",state_unit_middle="unit_middle",state_unit_hide="unit_hide",state_unit_default="unit_default",state_thousands="thousands",state_fmt_group="fmt_group",state_comparison="comparison",state_logical="logical",state_logical_not="logical_not",state_ternary_question="ternary_question",state_ternary_colon="ternary_colon",state_function="function",state_range_start="range_start",state_range_end="range_end",state_range_clamp="range_clamp",comparison_operators=new Set([">","<",">=","<=","==","!="]),logical_operators=new Set(["&&","||"]),operator_precedence={"|":0,"?":1,":":1,"||":2,"&&":3,"==":4,"!=":4,">":5,"<":5,">=":5,"<=":5,"+":6,"-":6,"*":7,"/":7,"%":7,"//":7,"**":8,"!":9,"unary-":9,"unary+":9},isArray=Array.isArray,freeGlobal="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),_Symbol=root.Symbol,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(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 i=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),i}var objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==_typeof(e)}var symbolTag="[object Symbol]";function isSymbol(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag(e)==symbolTag}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isObject(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var 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(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty.call(t,e)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function Hash(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])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ListCache(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.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function MapCache(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.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e}),r=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,r,n,i){t.push(n?i.replace(reEscapeChar,"$1"):r||e)}),t});function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function toString(e){return null==e?"":baseToString(e)}function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function baseGet(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}function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var REG_UNIT_NUM_SCIENTIFIC=/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,REG_UNIT_NUM_NORMAL=/^([+-]?[\d.]+)(.*)$/;function split_unit_num(e){var t,r,n=(e="string"!=typeof e?e.toString():e).match(REG_UNIT_NUM_SCIENTIFIC)||e.match(REG_UNIT_NUM_NORMAL);if(n){r=n[1];var i=n[2];""!==i.trim()&&(t=i)}return{num:r,unit:t}}function find_value(e,t,r){var n,i,a,o;return Array.isArray(e)?e.length>1?null!==(n=null!==(i=get(e[0],t))&&void 0!==i?i:get(e.at(-1),t))&&void 0!==n?n:r:1===e.length&&null!==(a=get(e[0],t))&&void 0!==a?a:r:null!==(o=get(e,t,r))&&void 0!==o?o:r}function parse_mantissa(e,t,r,n){var i=e.split("."),a=i[0],o=1===i.length?"":i[1],s=decimal_round(a,o,t,+r,n);return a=s.int_part,""===(o=s.dec_part)?a:"".concat(a,".").concat(o)}function integer_thousands(e){for(var t=e.length,r="";t>0;)r=e.substring(t-3,t)+(""!==r?",":"")+r,t-=3;return r}function parse_thousands(e){var t=e.split("."),r=t[0];return"-"===r[0]?t[0]="-"+integer_thousands(r.slice(1)):t[0]=integer_thousands(r),t.join(".")}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=a.length>1&&void 0!==a[1]?a[1]:5e3,n=0;case 1:if(!(n<t.length)){e.n=7;break}return e.p=2,e.n=3,Promise.race([t[n],new Promise(function(e,t){setTimeout(function(){return t(new Error("promise queue timeout err"))},r)})]);case 3:i=e.v,e.n=5;break;case 4:return e.p=4,e.v,e.a(3,6);case 5:return e.a(2,i);case 6:n++,e.n=1;break;case 7:return e.a(2,Promise.reject("错误的 promise queue 调用"))}},e,null,[[2,4]])})),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=0;case 1:if(!(r<t.length)){e.n=7;break}return e.p=2,e.n=3,fetch(t[r]);case 3:if(!e.v.ok){e.n=4;break}return e.a(2,t[r]);case 4:e.n=6;break;case 5:return e.p=5,e.v,e.a(3,6);case 6:r++,e.n=1;break;case 7:return e.a(2,null)}},e,null,[[2,5]])}))).apply(this,arguments)}function get_real_value(e,t){if(Array.isArray(e)){for(var r,n=0,i=e.length;n<i;n++){var a;if(void 0!==(r=null!==(a=get(e[n],t))&&void 0!==a?a:void 0))break}if(void 0===r)throw new Error("填充变量".concat(t,"失败"));return r}var o;return null!==(o=get(e,t))&&void 0!==o?o:void 0}function is_empty_for_fallback(e,t,r){return r&&"function"==typeof r._empty_check?r._empty_check(e,t):r&&Array.isArray(r._empty_values)?r._empty_values.some(function(t){return!(!Number.isNaN(t)||!Number.isNaN(e))||e===t}):null==e}function get_fallback_value(e,t,r){for(var n=0;n<t.length;n++){var i=t[n].trim(),a=void 0;try{if(Array.isArray(e))for(var o=0;o<e.length;o++){var s=get(e[o],i);if(void 0!==s){a=s;break}}else a=get(e,i)}catch(e){continue}if(!is_empty_for_fallback(a,i,r))return{value:a,path:i}}throw new Error("多路取值失败,所有路径均为空值: ".concat(t.join(" | ")))}function get_next_nonempty_char(e,t,r){var n;for(t++;t<r;){if(n=e[t],!empty_char_set.has(n))return n;t++}}function split_expr_and_fmt(e){for(var t=0,r=0;r<e.length;r++){var n=e[r];if("("===n)t++;else if(")"===n)t--;else if("|"===n&&0===t){if(r+1<e.length&&"|"===e[r+1]){r++;continue}return{expr:e.slice(0,r),fmt:e.slice(r+1).trim()}}}return{expr:e,fmt:""}}function parse_args(e,t){var r="",n={origin_expr:e,origin_fill_data:t,expr:"",fmt_expr:"",options:void 0,fill_data:void 0,_unit:void 0,_fmt:void 0,_empty_values:void 0,_empty_check:void 0,_vol_units:void 0,_vol_step:void 0,_thousands:void 0};if(null!=t&&(n.options=t,Array.isArray(t)?n.fill_data=t:n.fill_data=[t]),n._fmt=find_value(t,"_fmt"),n._unit=find_value(t,"_unit",!1),n._empty_values=find_value(t,"_empty_values"),n._empty_check=find_value(t,"_empty_check"),n._vol_units=find_value(t,"_vol_units"),n._vol_step=find_value(t,"_vol_step"),n._thousands=find_value(t,"_thousands"),"string"==typeof e){if(r=e,""===e.trim()||e.includes("NaN"))throw new Error("非法的表达式:".concat(e))}else{if("number"!=typeof e)throw new Error("错误的第一个参数类型: ".concat(e," 类型为:").concat(_typeof(e)));if(isNaN(e))throw new Error("传入了一个非法数字NaN");r=e.toString()}var i=split_expr_and_fmt(r),a=i.expr,o=i.fmt;return n.expr=a,n.fmt_expr=o,n}function detect_fallback_var$1(e,t){if("("!==e[t])return null;for(var r=0,n=!1,i=[],a="",o=t;o<e.length;){var s=e[o];if("("===s){if(0===r){r++,o++;continue}r++,a+=s}else if(")"===s){if(0===--r)return n?(i.push(a.trim()),{paths:i,end_index:o}):null;a+=s}else"|"===s&&1===r?(n=!0,i.push(a.trim()),a=""):a+=s;o++}return null}function detect_function_call(e,t,r){for(var n=t;n<e.length&&" "===e[n];)n++;return n<e.length&&"("===e[n]}function parse_function_args(e,t){if("("!==e[t])return null;for(var r=1,n=[],i="",a=t+1;a<e.length&&r>0;){var o=e[a];if("("===o)r++,i+=o;else if(")"===o){if(0===--r)return i.trim()&&n.push(i.trim()),{args:n,end_index:a};i+=o}else","===o&&1===r?(n.push(i.trim()),i=""):i+=o;a++}return null}function push_token$3(e,t){if(t.curr_state===state_number||t.curr_state===state_scientific){var r=t.expr.slice(t.prev_index,t.cur_index);if("+"===r||"-"===r)return e.push({type:state_operator,value:r}),t.curr_state=state_initial,void(t.prev_index=t.cur_index);if(t._unit){var n,i=split_unit_num(r),a=i.num,o=i.unit;if(void 0===o)e.push({type:state_number,value:a,real_value:a,has_unit:!1});else t.has_unit=!0,null!==(n=t.unit_str)&&void 0!==n||(t.unit_str=o),e.push({type:state_number,value:a,real_value:a,has_unit:!0,unit:o})}else e.push({type:state_number,value:r,real_value:r,has_unit:!1})}else if(t.curr_state===state_var){t.has_var=!0;var s=t.expr.slice(t.prev_index,t.cur_index);if("true"===s)e.push({type:"boolean",value:!0});else if("false"===s)e.push({type:"boolean",value:!1});else if(detect_function_call(t.expr,t.cur_index)){for(var _=t.cur_index;_<t.expr.length&&" "===t.expr[_];)_++;var u=parse_function_args(t.expr,_);if(u)return e.push({type:state_function,value:s,args:u.args}),t.cur_index=u.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}else{var c=get_real_value(t.fill_data,s);if("function"==typeof c){for(var l=t.cur_index;l<t.expr.length&&" "===t.expr[l];)l++;if(l<t.expr.length&&"("===t.expr[l]){var p=parse_function_args(t.expr,l);if(p)return e.push({type:state_function,value:s,args:p.args,fn:c}),t.cur_index=p.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}}if(t._unit){var d,f=split_unit_num(c),g=f.num,m=f.unit;if(void 0===m)e.push({type:"var",value:s,real_value:g,has_unit:!1});else t.has_unit=!0,null!==(d=t.unit_str)&&void 0!==d||(t.unit_str=m),e.push({type:"var",value:s,real_value:g,has_unit:!0,unit:m})}else e.push({type:"var",value:s,real_value:c,has_unit:!1})}}else e.push({type:t.curr_state,value:t.expr.slice(t.prev_index,t.cur_index)});t.curr_state=state_initial,t.prev_index=t.cur_index}function tokenizer(e,t,r,n){for(var i,a={has_var:!1,has_unit:!1,unit_str:void 0,fill_data:t,cur_index:0,prev_index:0,curr_state:state_initial,expr:e,_unit:r},o=e.length,s=[];a.cur_index<o;)switch(i=e[a.cur_index],a.curr_state){case state_initial:if(number_char_set.has(i))a.curr_state=state_number,a.cur_index++;else if(" "===i)a.cur_index++,a.prev_index=a.cur_index;else if("+-".includes(i)){var _=s.at(-1);0===a.cur_index||"operator"===(null==_?void 0:_.type)||"comparison"===(null==_?void 0:_.type)||"logical"===(null==_?void 0:_.type)||"logical_not"===(null==_?void 0:_.type)||"ternary_question"===(null==_?void 0:_.type)||"ternary_colon"===(null==_?void 0:_.type)||"("===(null==_?void 0:_.value)||"["===(null==_?void 0:_.value)||","===(null==_?void 0:_.value)?(a.curr_state=state_number,a.cur_index++):(a.cur_index++,s.push({type:state_operator,value:e.slice(a.prev_index,a.cur_index)}),a.prev_index=a.cur_index)}else if("*/%".includes(i))a.curr_state=state_operator,a.cur_index++;else if(">"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:">="})):s.push({type:state_comparison,value:">"}),a.prev_index=a.cur_index;else if("<"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:"<="})):s.push({type:state_comparison,value:"<"}),a.prev_index=a.cur_index;else if("="===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"=="}),a.prev_index=a.cur_index;else if("!"===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"!="}),a.prev_index=a.cur_index;else if("&"===i&&a.cur_index+1<o&&"&"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"&&"}),a.prev_index=a.cur_index;else if("|"===i&&a.cur_index+1<o&&"|"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"||"}),a.prev_index=a.cur_index;else if("!"===i)a.cur_index++,s.push({type:state_logical_not,value:"!"}),a.prev_index=a.cur_index;else if("?"===i)a.cur_index++,s.push({type:state_ternary_question,value:"?"}),a.prev_index=a.cur_index;else if(":"===i)a.cur_index++,s.push({type:state_ternary_colon,value:":"}),a.prev_index=a.cur_index;else if("["===i)a.cur_index++,s.push({type:state_range_start,value:"["}),a.prev_index=a.cur_index;else if("]"===i)a.cur_index++,s.push({type:state_range_end,value:"]"}),a.prev_index=a.cur_index;else if(","===i)a.cur_index++,s.push({type:"comma",value:","}),a.prev_index=a.cur_index;else if(var_char_set.has(i))a.curr_state=state_var,a.cur_index++;else if('"'===i||"'"===i){var u=i;a.cur_index++;for(var c="";a.cur_index<o&&e[a.cur_index]!==u;)"\\"===e[a.cur_index]&&a.cur_index+1<o?(a.cur_index++,c+=e[a.cur_index]):c+=e[a.cur_index],a.cur_index++;a.cur_index++,s.push({type:"string",value:c}),a.prev_index=a.cur_index}else if("("===i){var l=detect_fallback_var$1(e,a.cur_index);if(l){a.has_var=!0;var p=get_fallback_value(t,l.paths,n),d=p.value,f=p.path;if(r){var g,m=split_unit_num(d),v=m.num,h=m.unit;if(void 0!==h)a.has_unit=!0,null!==(g=a.unit_str)&&void 0!==g||(a.unit_str=h),s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!0,unit:h});else s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!1})}else s.push({type:state_fallback_var,value:l.paths,real_value:d,matched_path:f,has_unit:!1});a.cur_index=l.end_index+1,a.prev_index=a.cur_index}else s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index}else")"===i?(s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index):(a.cur_index++,a.prev_index=a.cur_index);break;case state_number:if(number_char_set.has(i))a.cur_index++;else if("."===i){if(a.cur_index===a.prev_index||e.slice(a.prev_index,a.cur_index).includes("."))throw new Error("非法的小数部分".concat(e.slice(a.prev_index,a.cur_index)));a.cur_index++}else"e"===i?(a.curr_state=state_scientific,a.cur_index++):r?"*/+-() ".indexOf(i)>-1||">"===i||"<"===i||"="===i||"!"===i||"&"===i||"|"===i||"?"===i||":"===i||"["===i||"]"===i||","===i||"%"===i&&number_char_set.has(e[a.cur_index-1])&&pure_number_var_first_char_set.has(get_next_nonempty_char(e,a.cur_index,o))?push_token$3(s,a):a.cur_index++:push_token$3(s,a);break;case state_operator:var w=e[a.cur_index-1];"*"===i&&"*"===w?(a.cur_index++,s.push({type:state_operator,value:"**"}),a.prev_index=a.cur_index):"/"===i&&"/"===w?(a.cur_index++,s.push({type:state_operator,value:"//"}),a.prev_index=a.cur_index):(s.push({type:state_operator,value:w}),a.prev_index=a.cur_index),a.curr_state=state_initial;break;case state_var:var_members_char_set.has(i)?a.cur_index++:push_token$3(s,a);break;case state_scientific:if(number_char_set.has(i))a.cur_index++;else if("+-".includes(i)){var b=a.prev_index;"+-".includes(e[b])&&(b+=1);var y=e.slice(b,a.cur_index),x=y.at(-1);y.includes(i)||"e"!==x?push_token$3(s,a):a.cur_index++}else r&&-1==="*/+-() ".indexOf(i)&&">"!==i&&"<"!==i&&"="!==i&&"!"!==i&&"&"!==i&&"|"!==i&&"?"!==i&&":"!==i&&"["!==i&&"]"!==i&&","!==i?a.cur_index++:push_token$3(s,a);break;default:throw new Error("字符扫描状态错误")}return a.prev_index<a.cur_index&&push_token$3(s,a),s.has_var=a.has_var,s.has_unit=a.has_unit,s.unit=a.unit_str,s}
3
+ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var _=n&&n.prototype instanceof s?n:s,u=Object.create(_.prototype);return _regeneratorDefine(u,"_invoke",function(r,n,i){var a,s,_,u=0,c=i||[],l=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,_=e,p.n=r,o}};function d(r,n){for(s=r,_=n,t=0;!l&&u&&!i&&t<c.length;t++){var i,a=c[t],d=p.p,f=a[2];r>3?(i=f===n)&&(_=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,p.v=n,p.n=a[1]):d<f&&(i=r<3||a[0]>n||n>f)&&(a[4]=r,a[5]=n,p.n=f,s=0))}if(i||r>1)return o;throw l=!0,n}return function(i,c,f){if(u>1)throw TypeError("Generator is already running");for(l&&1===c&&d(c,f),s=c,_=f;(t=s<2?e:_)||!l;){a||(s?s<3?(s>1&&(p.n=-1),d(s,_)):p.n=_:p.v=_);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(_=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(l=p.n<0)?_:r.call(n,p))!==o)break}catch(t){a=e,s=1,_=t}finally{u=1}}return{value:t,done:l}}}(r,i,a),!0),u}var o={};function s(){}function _(){}function u(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),l=u.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return _.prototype=u,_regeneratorDefine(l,"constructor",u),_regeneratorDefine(u,"constructor",_),_.displayName="GeneratorFunction",_regeneratorDefine(u,i,"GeneratorFunction"),_regeneratorDefine(l),_regeneratorDefine(l,i,"Generator"),_regeneratorDefine(l,n,function(){return this}),_regeneratorDefine(l,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:p}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}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 _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);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:t+""}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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.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}}var version="3.0.0-beta.20250123.2";function decimal_round(e,t,r,n,i){var a=e.startsWith("-"),o=a?e.slice(1):e,s=o,_=t,u=t.length;function c(){s=(+s+1).toString()}var l={"~-":function(){var e="<"===r?n-1:n;_=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(u<=e||0===u)){var i=t.slice(0,e);0===+t.slice(e,u)?_=i:(i=(+"9".concat(i)+1).toString().slice(1)).length>e?(_=i.slice(1,i.length),c()):_=i}},"~5":function(){if(0!==u){var e="<"===r?n-1:n;_=t.slice(0,e);var i=+t[e];Number.isNaN(i)||i>=5&&(_=(+"9".concat(_)+1).toString().slice(1)).length>e&&(_=_.slice(1,_.length),c())}},"~6":function(){if(0!==u){var e,i="<"===r?n-1:n,a=+t[i],s=t.slice(+i+1,t.length);s=""===s?0:parseInt(s),e=0===i?+o[o.length-1]:+t[i-1],_=t.slice(0,i),(a>=6||5===a&&s>0||5===a&&e%2!=0)&&(_=(+"9".concat(_)+1).toString().slice(1)).length>i&&(_=_.slice(1,_.length),c())}}};return"<="===r?u<=n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"<"===r?u<n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"="===r?u<n?_=t+"0".repeat(n-u):u>n&&l[i]&&l[i]():">="===r?u<n&&(_=t+"0".repeat(n-u)):">"===r&&u<=n&&(_=t+"0".repeat(n-u+1)),{int_part:a?"-".concat(s):s,dec_part:_}}var number_char="0123456789",var_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",number_first_char="0123456789-+",var_members_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$[].'\"",var_first_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",pure_number_var_first_char="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",empty_char=" \n\r\t",number_char_set=new Set(number_char),var_char_set=new Set(var_char),var_members_char_set=new Set(var_members_char),var_first_char_set=new Set(var_first_char);new Set(number_first_char);var pure_number_var_first_char_set=new Set(pure_number_var_first_char),empty_char_set=new Set(empty_char),state_initial="initial",state_number="number",state_scientific="scientific",state_operator="operator",state_bracket="bracket",state_var="var",state_symbol="symbol",state_percent="percent",state_round="round",state_plus="plus",state_comma="comma",state_fraction="fraction",state_to_number="to-number",state_to_number_string="to-number-string",state_fallback_var="fallback_var",state_integer_padding="integer_padding",state_volume="volume",state_unit_after="unit_after",state_unit_before="unit_before",state_unit_middle="unit_middle",state_unit_hide="unit_hide",state_unit_default="unit_default",state_thousands="thousands",state_fmt_group="fmt_group",state_comparison="comparison",state_logical="logical",state_logical_not="logical_not",state_ternary_question="ternary_question",state_ternary_colon="ternary_colon",state_function="function",state_range_start="range_start",state_range_end="range_end",state_range_clamp="range_clamp",comparison_operators=new Set([">","<",">=","<=","==","!="]),logical_operators=new Set(["&&","||"]),operator_precedence={"|":0,"?":1,":":1,"||":2,"&&":3,"==":4,"!=":4,">":5,"<":5,">=":5,"<=":5,"+":6,"-":6,"*":7,"/":7,"%":7,"//":7,"**":8,"!":9,"unary-":9,"unary+":9},isArray=Array.isArray,freeGlobal="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),_Symbol=root.Symbol,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(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 i=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),i}var objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==_typeof(e)}var symbolTag="[object Symbol]";function isSymbol(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag(e)==symbolTag}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isObject(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var 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(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty.call(t,e)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function Hash(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])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ListCache(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.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function MapCache(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.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e}),r=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,r,n,i){t.push(n?i.replace(reEscapeChar,"$1"):r||e)}),t});function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function toString(e){return null==e?"":baseToString(e)}function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function baseGet(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}function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var REG_UNIT_NUM_SCIENTIFIC=/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,REG_UNIT_NUM_NORMAL=/^([+-]?[\d.]+)(.*)$/;function split_unit_num(e){var t,r,n=(e="string"!=typeof e?e.toString():e).match(REG_UNIT_NUM_SCIENTIFIC)||e.match(REG_UNIT_NUM_NORMAL);if(n){r=n[1];var i=n[2];""!==i.trim()&&(t=i)}return{num:r,unit:t}}function find_value(e,t,r){var n,i,a,o;return Array.isArray(e)?e.length>1?null!==(n=null!==(i=get(e[0],t))&&void 0!==i?i:get(e.at(-1),t))&&void 0!==n?n:r:1===e.length&&null!==(a=get(e[0],t))&&void 0!==a?a:r:null!==(o=get(e,t,r))&&void 0!==o?o:r}function parse_mantissa(e,t,r,n){var i=e.split("."),a=i[0],o=1===i.length?"":i[1],s=decimal_round(a,o,t,+r,n);return a=s.int_part,""===(o=s.dec_part)?a:"".concat(a,".").concat(o)}function integer_thousands(e){for(var t=e.length,r="";t>0;)r=e.substring(t-3,t)+(""!==r?",":"")+r,t-=3;return r}function parse_thousands(e){var t=e.split("."),r=t[0];return"-"===r[0]?t[0]="-"+integer_thousands(r.slice(1)):t[0]=integer_thousands(r),t.join(".")}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=a.length>1&&void 0!==a[1]?a[1]:5e3,n=0;case 1:if(!(n<t.length)){e.n=7;break}return e.p=2,e.n=3,Promise.race([t[n],new Promise(function(e,t){setTimeout(function(){return t(new Error("promise queue timeout err"))},r)})]);case 3:i=e.v,e.n=5;break;case 4:return e.p=4,e.v,e.a(3,6);case 5:return e.a(2,i);case 6:n++,e.n=1;break;case 7:return e.a(2,Promise.reject("错误的 promise queue 调用"))}},e,null,[[2,4]])})),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=0;case 1:if(!(r<t.length)){e.n=7;break}return e.p=2,e.n=3,fetch(t[r]);case 3:if(!e.v.ok){e.n=4;break}return e.a(2,t[r]);case 4:e.n=6;break;case 5:return e.p=5,e.v,e.a(3,6);case 6:r++,e.n=1;break;case 7:return e.a(2,null)}},e,null,[[2,5]])}))).apply(this,arguments)}function get_real_value(e,t){if(Array.isArray(e)){for(var r,n=0,i=e.length;n<i;n++){var a;if(void 0!==(r=null!==(a=get(e[n],t))&&void 0!==a?a:void 0))break}if(void 0===r)throw new Error("填充变量".concat(t,"失败"));return r}var o;return null!==(o=get(e,t))&&void 0!==o?o:void 0}function is_empty_for_fallback(e,t,r){return r&&"function"==typeof r._empty_check?r._empty_check(e,t):r&&Array.isArray(r._empty_values)?r._empty_values.some(function(t){return!(!Number.isNaN(t)||!Number.isNaN(e))||e===t}):null==e}function get_fallback_value(e,t,r){for(var n=0;n<t.length;n++){var i=t[n].trim(),a=void 0;try{if(Array.isArray(e))for(var o=0;o<e.length;o++){var s=get(e[o],i);if(void 0!==s){a=s;break}}else a=get(e,i)}catch(e){continue}if(!is_empty_for_fallback(a,i,r))return{value:a,path:i}}throw new Error("多路取值失败,所有路径均为空值: ".concat(t.join(" | ")))}function get_next_nonempty_char(e,t,r){var n;for(t++;t<r;){if(n=e[t],!empty_char_set.has(n))return n;t++}}function split_expr_and_fmt(e){for(var t=0,r=0;r<e.length;r++){var n=e[r];if("("===n)t++;else if(")"===n)t--;else if("|"===n&&0===t){if(r+1<e.length&&"|"===e[r+1]){r++;continue}return{expr:e.slice(0,r),fmt:e.slice(r+1).trim()}}}return{expr:e,fmt:""}}function parse_args(e,t){var r="",n={origin_expr:e,origin_fill_data:t,expr:"",fmt_expr:"",options:void 0,fill_data:void 0,_unit:void 0,_fmt:void 0,_empty_values:void 0,_empty_check:void 0,_vol_units:void 0,_vol_step:void 0,_thousands:void 0};if(null!=t&&(n.options=t,Array.isArray(t)?n.fill_data=t:n.fill_data=[t]),n._fmt=find_value(t,"_fmt"),n._unit=find_value(t,"_unit",!1),n._empty_values=find_value(t,"_empty_values"),n._empty_check=find_value(t,"_empty_check"),n._vol_units=find_value(t,"_vol_units"),n._vol_step=find_value(t,"_vol_step"),n._thousands=find_value(t,"_thousands"),"string"==typeof e){if(r=e,""===e.trim()||e.includes("NaN"))throw new Error("非法的表达式:".concat(e))}else{if("number"!=typeof e)throw new Error("错误的第一个参数类型: ".concat(e," 类型为:").concat(_typeof(e)));if(isNaN(e))throw new Error("传入了一个非法数字NaN");r=e.toString()}var i=split_expr_and_fmt(r),a=i.expr,o=i.fmt;return n.expr=a,n.fmt_expr=o,n}function detect_fallback_var$1(e,t){if("("!==e[t])return null;for(var r=0,n=!1,i=[],a="",o=t;o<e.length;){var s=e[o];if("("===s){if(0===r){r++,o++;continue}r++,a+=s}else if(")"===s){if(0===--r)return n?(i.push(a.trim()),{paths:i,end_index:o}):null;a+=s}else"|"===s&&1===r?(n=!0,i.push(a.trim()),a=""):a+=s;o++}return null}function detect_function_call(e,t,r){for(var n=t;n<e.length&&" "===e[n];)n++;return n<e.length&&"("===e[n]}function parse_function_args(e,t){if("("!==e[t])return null;for(var r=1,n=[],i="",a=t+1;a<e.length&&r>0;){var o=e[a];if("("===o)r++,i+=o;else if(")"===o){if(0===--r)return i.trim()&&n.push(i.trim()),{args:n,end_index:a};i+=o}else","===o&&1===r?(n.push(i.trim()),i=""):i+=o;a++}return null}function push_token$3(e,t){if(t.curr_state===state_number||t.curr_state===state_scientific){var r=t.expr.slice(t.prev_index,t.cur_index);if("+"===r||"-"===r)return e.push({type:state_operator,value:r}),t.curr_state=state_initial,void(t.prev_index=t.cur_index);if(t._unit){var n,i=split_unit_num(r),a=i.num,o=i.unit;if(void 0===o)e.push({type:state_number,value:a,real_value:a,has_unit:!1});else t.has_unit=!0,null!==(n=t.unit_str)&&void 0!==n||(t.unit_str=o),e.push({type:state_number,value:a,real_value:a,has_unit:!0,unit:o})}else e.push({type:state_number,value:r,real_value:r,has_unit:!1})}else if(t.curr_state===state_var){t.has_var=!0;var s=t.expr.slice(t.prev_index,t.cur_index);if("true"===s)e.push({type:"boolean",value:!0});else if("false"===s)e.push({type:"boolean",value:!1});else if(detect_function_call(t.expr,t.cur_index)){for(var _=t.cur_index;_<t.expr.length&&" "===t.expr[_];)_++;var u=parse_function_args(t.expr,_);if(u)return e.push({type:state_function,value:s,args:u.args}),t.cur_index=u.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}else{var c=get_real_value(t.fill_data,s);if("function"==typeof c){for(var l=t.cur_index;l<t.expr.length&&" "===t.expr[l];)l++;if(l<t.expr.length&&"("===t.expr[l]){var p=parse_function_args(t.expr,l);if(p)return e.push({type:state_function,value:s,args:p.args,fn:c}),t.cur_index=p.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}}if(t._unit){var d,f=split_unit_num(c),g=f.num,m=f.unit;if(void 0===m)e.push({type:"var",value:s,real_value:g,has_unit:!1});else t.has_unit=!0,null!==(d=t.unit_str)&&void 0!==d||(t.unit_str=m),e.push({type:"var",value:s,real_value:g,has_unit:!0,unit:m})}else e.push({type:"var",value:s,real_value:c,has_unit:!1})}}else e.push({type:t.curr_state,value:t.expr.slice(t.prev_index,t.cur_index)});t.curr_state=state_initial,t.prev_index=t.cur_index}function tokenizer(e,t,r,n){for(var i,a={has_var:!1,has_unit:!1,unit_str:void 0,fill_data:t,cur_index:0,prev_index:0,curr_state:state_initial,expr:e,_unit:r},o=e.length,s=[];a.cur_index<o;)switch(i=e[a.cur_index],a.curr_state){case state_initial:if(number_char_set.has(i))a.curr_state=state_number,a.cur_index++;else if(" "===i)a.cur_index++,a.prev_index=a.cur_index;else if("+-".includes(i)){var _=s.at(-1);0===a.cur_index||"operator"===(null==_?void 0:_.type)||"comparison"===(null==_?void 0:_.type)||"logical"===(null==_?void 0:_.type)||"logical_not"===(null==_?void 0:_.type)||"ternary_question"===(null==_?void 0:_.type)||"ternary_colon"===(null==_?void 0:_.type)||"("===(null==_?void 0:_.value)||"["===(null==_?void 0:_.value)||","===(null==_?void 0:_.value)?(a.curr_state=state_number,a.cur_index++):(a.cur_index++,s.push({type:state_operator,value:e.slice(a.prev_index,a.cur_index)}),a.prev_index=a.cur_index)}else if("*/%".includes(i))a.curr_state=state_operator,a.cur_index++;else if(">"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:">="})):s.push({type:state_comparison,value:">"}),a.prev_index=a.cur_index;else if("<"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:"<="})):s.push({type:state_comparison,value:"<"}),a.prev_index=a.cur_index;else if("="===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"=="}),a.prev_index=a.cur_index;else if("!"===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"!="}),a.prev_index=a.cur_index;else if("&"===i&&a.cur_index+1<o&&"&"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"&&"}),a.prev_index=a.cur_index;else if("|"===i&&a.cur_index+1<o&&"|"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"||"}),a.prev_index=a.cur_index;else if("!"===i)a.cur_index++,s.push({type:state_logical_not,value:"!"}),a.prev_index=a.cur_index;else if("?"===i)a.cur_index++,s.push({type:state_ternary_question,value:"?"}),a.prev_index=a.cur_index;else if(":"===i)a.cur_index++,s.push({type:state_ternary_colon,value:":"}),a.prev_index=a.cur_index;else if("["===i)a.cur_index++,s.push({type:state_range_start,value:"["}),a.prev_index=a.cur_index;else if("]"===i)a.cur_index++,s.push({type:state_range_end,value:"]"}),a.prev_index=a.cur_index;else if(","===i)a.cur_index++,s.push({type:"comma",value:","}),a.prev_index=a.cur_index;else if(var_char_set.has(i))a.curr_state=state_var,a.cur_index++;else if('"'===i||"'"===i){var u=i;a.cur_index++;for(var c="";a.cur_index<o&&e[a.cur_index]!==u;)"\\"===e[a.cur_index]&&a.cur_index+1<o?(a.cur_index++,c+=e[a.cur_index]):c+=e[a.cur_index],a.cur_index++;a.cur_index++,s.push({type:"string",value:c}),a.prev_index=a.cur_index}else if("("===i){var l=detect_fallback_var$1(e,a.cur_index);if(l){a.has_var=!0;var p=get_fallback_value(t,l.paths,n),d=p.value,f=p.path;if(r){var g,m=split_unit_num(d),v=m.num,h=m.unit;if(void 0!==h)a.has_unit=!0,null!==(g=a.unit_str)&&void 0!==g||(a.unit_str=h),s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!0,unit:h});else s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!1})}else s.push({type:state_fallback_var,value:l.paths,real_value:d,matched_path:f,has_unit:!1});a.cur_index=l.end_index+1,a.prev_index=a.cur_index}else s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index}else")"===i?(s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index):(a.cur_index++,a.prev_index=a.cur_index);break;case state_number:if(number_char_set.has(i))a.cur_index++;else if("."===i){if(a.cur_index===a.prev_index||e.slice(a.prev_index,a.cur_index).includes("."))throw new Error("非法的小数部分".concat(e.slice(a.prev_index,a.cur_index)));a.cur_index++}else"e"===i?(a.curr_state=state_scientific,a.cur_index++):r?"*/+-() ".indexOf(i)>-1||">"===i||"<"===i||"="===i||"!"===i||"&"===i||"|"===i||"?"===i||":"===i||"["===i||"]"===i||","===i||"%"===i&&number_char_set.has(e[a.cur_index-1])&&pure_number_var_first_char_set.has(get_next_nonempty_char(e,a.cur_index,o))?push_token$3(s,a):a.cur_index++:push_token$3(s,a);break;case state_operator:var w=e[a.cur_index-1];"*"===i&&"*"===w?(a.cur_index++,s.push({type:state_operator,value:"**"}),a.prev_index=a.cur_index):"/"===i&&"/"===w?(a.cur_index++,s.push({type:state_operator,value:"//"}),a.prev_index=a.cur_index):(s.push({type:state_operator,value:w}),a.prev_index=a.cur_index),a.curr_state=state_initial;break;case state_var:var_members_char_set.has(i)?a.cur_index++:push_token$3(s,a);break;case state_scientific:if(number_char_set.has(i))a.cur_index++;else if("+-".includes(i)){var b=a.prev_index;"+-".includes(e[b])&&(b+=1);var y=e.slice(b,a.cur_index),x=y.at(-1);y.includes(i)||"e"!==x?push_token$3(s,a):a.cur_index++}else r&&-1==="*/+-() ".indexOf(i)&&">"!==i&&"<"!==i&&"="!==i&&"!"!==i&&"&"!==i&&"|"!==i&&"?"!==i&&":"!==i&&"["!==i&&"]"!==i&&","!==i?a.cur_index++:push_token$3(s,a);break;default:throw new Error("字符扫描状态错误")}return a.prev_index<a.cur_index&&push_token$3(s,a),s.has_var=a.has_var,s.has_unit=a.has_unit,s.unit=a.unit_str,s}
4
4
  /*!
5
5
  * decimal.js v10.6.0
6
6
  * An arbitrary-precision Decimal type for JavaScript.
package/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";var _documentCurrentScript="undefined"!=typeof document?document.currentScript:null;function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),_=s.value}catch(e){return void r(e)}s.done?t(_):Promise.resolve(_).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,s,"next",e)}function s(e){asyncGeneratorStep(a,n,i,o,s,"throw",e)}o(void 0)})}}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}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 _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],_=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;_=!1}else for(;!(_=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);_=!0);}catch(e){u=!0,i=e}finally{try{if(!_&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}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 _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 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 _regenerator(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var _=n&&n.prototype instanceof s?n:s,u=Object.create(_.prototype);return _regeneratorDefine(u,"_invoke",function(r,n,i){var a,s,_,u=0,c=i||[],l=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,_=e,p.n=r,o}};function d(r,n){for(s=r,_=n,t=0;!l&&u&&!i&&t<c.length;t++){var i,a=c[t],d=p.p,f=a[2];r>3?(i=f===n)&&(_=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,p.v=n,p.n=a[1]):d<f&&(i=r<3||a[0]>n||n>f)&&(a[4]=r,a[5]=n,p.n=f,s=0))}if(i||r>1)return o;throw l=!0,n}return function(i,c,f){if(u>1)throw TypeError("Generator is already running");for(l&&1===c&&d(c,f),s=c,_=f;(t=s<2?e:_)||!l;){a||(s?s<3?(s>1&&(p.n=-1),d(s,_)):p.n=_:p.v=_);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(_=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(l=p.n<0)?_:r.call(n,p))!==o)break}catch(t){a=e,s=1,_=t}finally{u=1}}return{value:t,done:l}}}(r,i,a),!0),u}var o={};function s(){}function _(){}function u(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),l=u.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return _.prototype=u,_regeneratorDefine(l,"constructor",u),_regeneratorDefine(u,"constructor",_),_.displayName="GeneratorFunction",_regeneratorDefine(u,i,"GeneratorFunction"),_regeneratorDefine(l),_regeneratorDefine(l,i,"Generator"),_regeneratorDefine(l,n,function(){return this}),_regeneratorDefine(l,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:p}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}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 _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);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:t+""}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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.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}}var version="3.0.0-beta.20250123.8";function decimal_round(e,t,r,n,i){var a=e.startsWith("-"),o=a?e.slice(1):e,s=o,_=t,u=t.length;function c(){s=(+s+1).toString()}var l={"~-":function(){var e="<"===r?n-1:n;_=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(u<=e||0===u)){var i=t.slice(0,e);0===+t.slice(e,u)?_=i:(i=(+"9".concat(i)+1).toString().slice(1)).length>e?(_=i.slice(1,i.length),c()):_=i}},"~5":function(){if(0!==u){var e="<"===r?n-1:n;_=t.slice(0,e);var i=+t[e];Number.isNaN(i)||i>=5&&(_=(+"9".concat(_)+1).toString().slice(1)).length>e&&(_=_.slice(1,_.length),c())}},"~6":function(){if(0!==u){var e,i="<"===r?n-1:n,a=+t[i],s=t.slice(+i+1,t.length);s=""===s?0:parseInt(s),e=0===i?+o[o.length-1]:+t[i-1],_=t.slice(0,i),(a>=6||5===a&&s>0||5===a&&e%2!=0)&&(_=(+"9".concat(_)+1).toString().slice(1)).length>i&&(_=_.slice(1,_.length),c())}}};return"<="===r?u<=n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"<"===r?u<n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"="===r?u<n?_=t+"0".repeat(n-u):u>n&&l[i]&&l[i]():">="===r?u<n&&(_=t+"0".repeat(n-u)):">"===r&&u<=n&&(_=t+"0".repeat(n-u+1)),{int_part:a?"-".concat(s):s,dec_part:_}}var number_char="0123456789",var_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",number_first_char="0123456789-+",var_members_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$[].'\"",var_first_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",pure_number_var_first_char="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",empty_char=" \n\r\t",number_char_set=new Set(number_char),var_char_set=new Set(var_char),var_members_char_set=new Set(var_members_char),var_first_char_set=new Set(var_first_char);new Set(number_first_char);var pure_number_var_first_char_set=new Set(pure_number_var_first_char),empty_char_set=new Set(empty_char),state_initial="initial",state_number="number",state_scientific="scientific",state_operator="operator",state_bracket="bracket",state_var="var",state_symbol="symbol",state_percent="percent",state_round="round",state_plus="plus",state_comma="comma",state_fraction="fraction",state_to_number="to-number",state_to_number_string="to-number-string",state_fallback_var="fallback_var",state_integer_padding="integer_padding",state_volume="volume",state_unit_after="unit_after",state_unit_before="unit_before",state_unit_middle="unit_middle",state_unit_hide="unit_hide",state_unit_default="unit_default",state_thousands="thousands",state_fmt_group="fmt_group",state_comparison="comparison",state_logical="logical",state_logical_not="logical_not",state_ternary_question="ternary_question",state_ternary_colon="ternary_colon",state_function="function",state_range_start="range_start",state_range_end="range_end",state_range_clamp="range_clamp",comparison_operators=new Set([">","<",">=","<=","==","!="]),logical_operators=new Set(["&&","||"]),operator_precedence={"|":0,"?":1,":":1,"||":2,"&&":3,"==":4,"!=":4,">":5,"<":5,">=":5,"<=":5,"+":6,"-":6,"*":7,"/":7,"%":7,"//":7,"**":8,"!":9,"unary-":9,"unary+":9},isArray=Array.isArray,freeGlobal="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),_Symbol=root.Symbol,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(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 i=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),i}var objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==_typeof(e)}var symbolTag="[object Symbol]";function isSymbol(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag(e)==symbolTag}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isObject(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var 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(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty.call(t,e)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function Hash(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])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ListCache(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.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function MapCache(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.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e}),r=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,r,n,i){t.push(n?i.replace(reEscapeChar,"$1"):r||e)}),t});function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function toString(e){return null==e?"":baseToString(e)}function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function baseGet(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}function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var REG_UNIT_NUM_SCIENTIFIC=/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,REG_UNIT_NUM_NORMAL=/^([+-]?[\d.]+)(.*)$/;function split_unit_num(e){var t,r,n=(e="string"!=typeof e?e.toString():e).match(REG_UNIT_NUM_SCIENTIFIC)||e.match(REG_UNIT_NUM_NORMAL);if(n){r=n[1];var i=n[2];""!==i.trim()&&(t=i)}return{num:r,unit:t}}function find_value(e,t,r){var n,i,a,o;return Array.isArray(e)?e.length>1?null!==(n=null!==(i=get(e[0],t))&&void 0!==i?i:get(e.at(-1),t))&&void 0!==n?n:r:1===e.length&&null!==(a=get(e[0],t))&&void 0!==a?a:r:null!==(o=get(e,t,r))&&void 0!==o?o:r}function parse_mantissa(e,t,r,n){var i=e.split("."),a=i[0],o=1===i.length?"":i[1],s=decimal_round(a,o,t,+r,n);return a=s.int_part,""===(o=s.dec_part)?a:"".concat(a,".").concat(o)}function integer_thousands(e){for(var t=e.length,r="";t>0;)r=e.substring(t-3,t)+(""!==r?",":"")+r,t-=3;return r}function parse_thousands(e){var t=e.split("."),r=t[0];return"-"===r[0]?t[0]="-"+integer_thousands(r.slice(1)):t[0]=integer_thousands(r),t.join(".")}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=a.length>1&&void 0!==a[1]?a[1]:5e3,n=0;case 1:if(!(n<t.length)){e.n=7;break}return e.p=2,e.n=3,Promise.race([t[n],new Promise(function(e,t){setTimeout(function(){return t(new Error("promise queue timeout err"))},r)})]);case 3:i=e.v,e.n=5;break;case 4:return e.p=4,e.v,e.a(3,6);case 5:return e.a(2,i);case 6:n++,e.n=1;break;case 7:return e.a(2,Promise.reject("错误的 promise queue 调用"))}},e,null,[[2,4]])})),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=0;case 1:if(!(r<t.length)){e.n=7;break}return e.p=2,e.n=3,fetch(t[r]);case 3:if(!e.v.ok){e.n=4;break}return e.a(2,t[r]);case 4:e.n=6;break;case 5:return e.p=5,e.v,e.a(3,6);case 6:r++,e.n=1;break;case 7:return e.a(2,null)}},e,null,[[2,5]])}))).apply(this,arguments)}function get_real_value(e,t){if(Array.isArray(e)){for(var r,n=0,i=e.length;n<i;n++){var a;if(void 0!==(r=null!==(a=get(e[n],t))&&void 0!==a?a:void 0))break}if(void 0===r)throw new Error("填充变量".concat(t,"失败"));return r}var o;return null!==(o=get(e,t))&&void 0!==o?o:void 0}function is_empty_for_fallback(e,t,r){return r&&"function"==typeof r._empty_check?r._empty_check(e,t):r&&Array.isArray(r._empty_values)?r._empty_values.some(function(t){return!(!Number.isNaN(t)||!Number.isNaN(e))||e===t}):null==e}function get_fallback_value(e,t,r){for(var n=0;n<t.length;n++){var i=t[n].trim(),a=void 0;try{if(Array.isArray(e))for(var o=0;o<e.length;o++){var s=get(e[o],i);if(void 0!==s){a=s;break}}else a=get(e,i)}catch(e){continue}if(!is_empty_for_fallback(a,i,r))return{value:a,path:i}}throw new Error("多路取值失败,所有路径均为空值: ".concat(t.join(" | ")))}function get_next_nonempty_char(e,t,r){var n;for(t++;t<r;){if(n=e[t],!empty_char_set.has(n))return n;t++}}function split_expr_and_fmt(e){for(var t=0,r=0;r<e.length;r++){var n=e[r];if("("===n)t++;else if(")"===n)t--;else if("|"===n&&0===t){if(r+1<e.length&&"|"===e[r+1]){r++;continue}return{expr:e.slice(0,r),fmt:e.slice(r+1).trim()}}}return{expr:e,fmt:""}}function parse_args(e,t){var r="",n={origin_expr:e,origin_fill_data:t,expr:"",fmt_expr:"",options:void 0,fill_data:void 0,_unit:void 0,_fmt:void 0,_empty_values:void 0,_empty_check:void 0,_vol_units:void 0,_vol_step:void 0,_thousands:void 0};if(null!=t&&(n.options=t,Array.isArray(t)?n.fill_data=t:n.fill_data=[t]),n._fmt=find_value(t,"_fmt"),n._unit=find_value(t,"_unit",!1),n._empty_values=find_value(t,"_empty_values"),n._empty_check=find_value(t,"_empty_check"),n._vol_units=find_value(t,"_vol_units"),n._vol_step=find_value(t,"_vol_step"),n._thousands=find_value(t,"_thousands"),"string"==typeof e){if(r=e,""===e.trim()||e.includes("NaN"))throw new Error("非法的表达式:".concat(e))}else{if("number"!=typeof e)throw new Error("错误的第一个参数类型: ".concat(e," 类型为:").concat(_typeof(e)));if(isNaN(e))throw new Error("传入了一个非法数字NaN");r=e.toString()}var i=split_expr_and_fmt(r),a=i.expr,o=i.fmt;return n.expr=a,n.fmt_expr=o,n}function detect_fallback_var$1(e,t){if("("!==e[t])return null;for(var r=0,n=!1,i=[],a="",o=t;o<e.length;){var s=e[o];if("("===s){if(0===r){r++,o++;continue}r++,a+=s}else if(")"===s){if(0===--r)return n?(i.push(a.trim()),{paths:i,end_index:o}):null;a+=s}else"|"===s&&1===r?(n=!0,i.push(a.trim()),a=""):a+=s;o++}return null}function detect_function_call(e,t,r){for(var n=t;n<e.length&&" "===e[n];)n++;return n<e.length&&"("===e[n]}function parse_function_args(e,t){if("("!==e[t])return null;for(var r=1,n=[],i="",a=t+1;a<e.length&&r>0;){var o=e[a];if("("===o)r++,i+=o;else if(")"===o){if(0===--r)return i.trim()&&n.push(i.trim()),{args:n,end_index:a};i+=o}else","===o&&1===r?(n.push(i.trim()),i=""):i+=o;a++}return null}function push_token$3(e,t){if(t.curr_state===state_number||t.curr_state===state_scientific){var r=t.expr.slice(t.prev_index,t.cur_index);if("+"===r||"-"===r)return e.push({type:state_operator,value:r}),t.curr_state=state_initial,void(t.prev_index=t.cur_index);if(t._unit){var n,i=split_unit_num(r),a=i.num,o=i.unit;if(void 0===o)e.push({type:state_number,value:a,real_value:a,has_unit:!1});else t.has_unit=!0,null!==(n=t.unit_str)&&void 0!==n||(t.unit_str=o),e.push({type:state_number,value:a,real_value:a,has_unit:!0,unit:o})}else e.push({type:state_number,value:r,real_value:r,has_unit:!1})}else if(t.curr_state===state_var){t.has_var=!0;var s=t.expr.slice(t.prev_index,t.cur_index);if("true"===s)e.push({type:"boolean",value:!0});else if("false"===s)e.push({type:"boolean",value:!1});else if(detect_function_call(t.expr,t.cur_index)){for(var _=t.cur_index;_<t.expr.length&&" "===t.expr[_];)_++;var u=parse_function_args(t.expr,_);if(u)return e.push({type:state_function,value:s,args:u.args}),t.cur_index=u.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}else{var c=get_real_value(t.fill_data,s);if("function"==typeof c){for(var l=t.cur_index;l<t.expr.length&&" "===t.expr[l];)l++;if(l<t.expr.length&&"("===t.expr[l]){var p=parse_function_args(t.expr,l);if(p)return e.push({type:state_function,value:s,args:p.args,fn:c}),t.cur_index=p.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}}if(t._unit){var d,f=split_unit_num(c),g=f.num,m=f.unit;if(void 0===m)e.push({type:"var",value:s,real_value:g,has_unit:!1});else t.has_unit=!0,null!==(d=t.unit_str)&&void 0!==d||(t.unit_str=m),e.push({type:"var",value:s,real_value:g,has_unit:!0,unit:m})}else e.push({type:"var",value:s,real_value:c,has_unit:!1})}}else e.push({type:t.curr_state,value:t.expr.slice(t.prev_index,t.cur_index)});t.curr_state=state_initial,t.prev_index=t.cur_index}function tokenizer(e,t,r,n){for(var i,a={has_var:!1,has_unit:!1,unit_str:void 0,fill_data:t,cur_index:0,prev_index:0,curr_state:state_initial,expr:e,_unit:r},o=e.length,s=[];a.cur_index<o;)switch(i=e[a.cur_index],a.curr_state){case state_initial:if(number_char_set.has(i))a.curr_state=state_number,a.cur_index++;else if(" "===i)a.cur_index++,a.prev_index=a.cur_index;else if("+-".includes(i)){var _=s.at(-1);0===a.cur_index||"operator"===(null==_?void 0:_.type)||"comparison"===(null==_?void 0:_.type)||"logical"===(null==_?void 0:_.type)||"logical_not"===(null==_?void 0:_.type)||"ternary_question"===(null==_?void 0:_.type)||"ternary_colon"===(null==_?void 0:_.type)||"("===(null==_?void 0:_.value)||"["===(null==_?void 0:_.value)||","===(null==_?void 0:_.value)?(a.curr_state=state_number,a.cur_index++):(a.cur_index++,s.push({type:state_operator,value:e.slice(a.prev_index,a.cur_index)}),a.prev_index=a.cur_index)}else if("*/%".includes(i))a.curr_state=state_operator,a.cur_index++;else if(">"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:">="})):s.push({type:state_comparison,value:">"}),a.prev_index=a.cur_index;else if("<"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:"<="})):s.push({type:state_comparison,value:"<"}),a.prev_index=a.cur_index;else if("="===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"=="}),a.prev_index=a.cur_index;else if("!"===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"!="}),a.prev_index=a.cur_index;else if("&"===i&&a.cur_index+1<o&&"&"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"&&"}),a.prev_index=a.cur_index;else if("|"===i&&a.cur_index+1<o&&"|"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"||"}),a.prev_index=a.cur_index;else if("!"===i)a.cur_index++,s.push({type:state_logical_not,value:"!"}),a.prev_index=a.cur_index;else if("?"===i)a.cur_index++,s.push({type:state_ternary_question,value:"?"}),a.prev_index=a.cur_index;else if(":"===i)a.cur_index++,s.push({type:state_ternary_colon,value:":"}),a.prev_index=a.cur_index;else if("["===i)a.cur_index++,s.push({type:state_range_start,value:"["}),a.prev_index=a.cur_index;else if("]"===i)a.cur_index++,s.push({type:state_range_end,value:"]"}),a.prev_index=a.cur_index;else if(","===i)a.cur_index++,s.push({type:"comma",value:","}),a.prev_index=a.cur_index;else if(var_char_set.has(i))a.curr_state=state_var,a.cur_index++;else if('"'===i||"'"===i){var u=i;a.cur_index++;for(var c="";a.cur_index<o&&e[a.cur_index]!==u;)"\\"===e[a.cur_index]&&a.cur_index+1<o?(a.cur_index++,c+=e[a.cur_index]):c+=e[a.cur_index],a.cur_index++;a.cur_index++,s.push({type:"string",value:c}),a.prev_index=a.cur_index}else if("("===i){var l=detect_fallback_var$1(e,a.cur_index);if(l){a.has_var=!0;var p=get_fallback_value(t,l.paths,n),d=p.value,f=p.path;if(r){var g,m=split_unit_num(d),v=m.num,h=m.unit;if(void 0!==h)a.has_unit=!0,null!==(g=a.unit_str)&&void 0!==g||(a.unit_str=h),s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!0,unit:h});else s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!1})}else s.push({type:state_fallback_var,value:l.paths,real_value:d,matched_path:f,has_unit:!1});a.cur_index=l.end_index+1,a.prev_index=a.cur_index}else s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index}else")"===i?(s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index):(a.cur_index++,a.prev_index=a.cur_index);break;case state_number:if(number_char_set.has(i))a.cur_index++;else if("."===i){if(a.cur_index===a.prev_index||e.slice(a.prev_index,a.cur_index).includes("."))throw new Error("非法的小数部分".concat(e.slice(a.prev_index,a.cur_index)));a.cur_index++}else"e"===i?(a.curr_state=state_scientific,a.cur_index++):r?"*/+-() ".indexOf(i)>-1||">"===i||"<"===i||"="===i||"!"===i||"&"===i||"|"===i||"?"===i||":"===i||"["===i||"]"===i||","===i||"%"===i&&number_char_set.has(e[a.cur_index-1])&&pure_number_var_first_char_set.has(get_next_nonempty_char(e,a.cur_index,o))?push_token$3(s,a):a.cur_index++:push_token$3(s,a);break;case state_operator:var w=e[a.cur_index-1];"*"===i&&"*"===w?(a.cur_index++,s.push({type:state_operator,value:"**"}),a.prev_index=a.cur_index):"/"===i&&"/"===w?(a.cur_index++,s.push({type:state_operator,value:"//"}),a.prev_index=a.cur_index):(s.push({type:state_operator,value:w}),a.prev_index=a.cur_index),a.curr_state=state_initial;break;case state_var:var_members_char_set.has(i)?a.cur_index++:push_token$3(s,a);break;case state_scientific:if(number_char_set.has(i))a.cur_index++;else if("+-".includes(i)){var b=a.prev_index;"+-".includes(e[b])&&(b+=1);var y=e.slice(b,a.cur_index),x=y.at(-1);y.includes(i)||"e"!==x?push_token$3(s,a):a.cur_index++}else r&&-1==="*/+-() ".indexOf(i)&&">"!==i&&"<"!==i&&"="!==i&&"!"!==i&&"&"!==i&&"|"!==i&&"?"!==i&&":"!==i&&"["!==i&&"]"!==i&&","!==i?a.cur_index++:push_token$3(s,a);break;default:throw new Error("字符扫描状态错误")}return a.prev_index<a.cur_index&&push_token$3(s,a),s.has_var=a.has_var,s.has_unit=a.has_unit,s.unit=a.unit_str,s}
3
+ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var _=n&&n.prototype instanceof s?n:s,u=Object.create(_.prototype);return _regeneratorDefine(u,"_invoke",function(r,n,i){var a,s,_,u=0,c=i||[],l=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,_=e,p.n=r,o}};function d(r,n){for(s=r,_=n,t=0;!l&&u&&!i&&t<c.length;t++){var i,a=c[t],d=p.p,f=a[2];r>3?(i=f===n)&&(_=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,p.v=n,p.n=a[1]):d<f&&(i=r<3||a[0]>n||n>f)&&(a[4]=r,a[5]=n,p.n=f,s=0))}if(i||r>1)return o;throw l=!0,n}return function(i,c,f){if(u>1)throw TypeError("Generator is already running");for(l&&1===c&&d(c,f),s=c,_=f;(t=s<2?e:_)||!l;){a||(s?s<3?(s>1&&(p.n=-1),d(s,_)):p.n=_:p.v=_);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(_=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(l=p.n<0)?_:r.call(n,p))!==o)break}catch(t){a=e,s=1,_=t}finally{u=1}}return{value:t,done:l}}}(r,i,a),!0),u}var o={};function s(){}function _(){}function u(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),l=u.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return _.prototype=u,_regeneratorDefine(l,"constructor",u),_regeneratorDefine(u,"constructor",_),_.displayName="GeneratorFunction",_regeneratorDefine(u,i,"GeneratorFunction"),_regeneratorDefine(l),_regeneratorDefine(l,i,"Generator"),_regeneratorDefine(l,n,function(){return this}),_regeneratorDefine(l,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:p}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}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 _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);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:t+""}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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.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}}var version="3.0.0-beta.20250123.2";function decimal_round(e,t,r,n,i){var a=e.startsWith("-"),o=a?e.slice(1):e,s=o,_=t,u=t.length;function c(){s=(+s+1).toString()}var l={"~-":function(){var e="<"===r?n-1:n;_=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(u<=e||0===u)){var i=t.slice(0,e);0===+t.slice(e,u)?_=i:(i=(+"9".concat(i)+1).toString().slice(1)).length>e?(_=i.slice(1,i.length),c()):_=i}},"~5":function(){if(0!==u){var e="<"===r?n-1:n;_=t.slice(0,e);var i=+t[e];Number.isNaN(i)||i>=5&&(_=(+"9".concat(_)+1).toString().slice(1)).length>e&&(_=_.slice(1,_.length),c())}},"~6":function(){if(0!==u){var e,i="<"===r?n-1:n,a=+t[i],s=t.slice(+i+1,t.length);s=""===s?0:parseInt(s),e=0===i?+o[o.length-1]:+t[i-1],_=t.slice(0,i),(a>=6||5===a&&s>0||5===a&&e%2!=0)&&(_=(+"9".concat(_)+1).toString().slice(1)).length>i&&(_=_.slice(1,_.length),c())}}};return"<="===r?u<=n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"<"===r?u<n?_=t.replace(/0*$/,""):(l[i]&&l[i](),_=_.replace(/0+$/,"")):"="===r?u<n?_=t+"0".repeat(n-u):u>n&&l[i]&&l[i]():">="===r?u<n&&(_=t+"0".repeat(n-u)):">"===r&&u<=n&&(_=t+"0".repeat(n-u+1)),{int_part:a?"-".concat(s):s,dec_part:_}}var number_char="0123456789",var_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",number_first_char="0123456789-+",var_members_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$[].'\"",var_first_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",pure_number_var_first_char="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",empty_char=" \n\r\t",number_char_set=new Set(number_char),var_char_set=new Set(var_char),var_members_char_set=new Set(var_members_char),var_first_char_set=new Set(var_first_char);new Set(number_first_char);var pure_number_var_first_char_set=new Set(pure_number_var_first_char),empty_char_set=new Set(empty_char),state_initial="initial",state_number="number",state_scientific="scientific",state_operator="operator",state_bracket="bracket",state_var="var",state_symbol="symbol",state_percent="percent",state_round="round",state_plus="plus",state_comma="comma",state_fraction="fraction",state_to_number="to-number",state_to_number_string="to-number-string",state_fallback_var="fallback_var",state_integer_padding="integer_padding",state_volume="volume",state_unit_after="unit_after",state_unit_before="unit_before",state_unit_middle="unit_middle",state_unit_hide="unit_hide",state_unit_default="unit_default",state_thousands="thousands",state_fmt_group="fmt_group",state_comparison="comparison",state_logical="logical",state_logical_not="logical_not",state_ternary_question="ternary_question",state_ternary_colon="ternary_colon",state_function="function",state_range_start="range_start",state_range_end="range_end",state_range_clamp="range_clamp",comparison_operators=new Set([">","<",">=","<=","==","!="]),logical_operators=new Set(["&&","||"]),operator_precedence={"|":0,"?":1,":":1,"||":2,"&&":3,"==":4,"!=":4,">":5,"<":5,">=":5,"<=":5,"+":6,"-":6,"*":7,"/":7,"%":7,"//":7,"**":8,"!":9,"unary-":9,"unary+":9},isArray=Array.isArray,freeGlobal="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),_Symbol=root.Symbol,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(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 i=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),i}var objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==_typeof(e)}var symbolTag="[object Symbol]";function isSymbol(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag(e)==symbolTag}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isObject(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var 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(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty.call(t,e)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function Hash(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])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ListCache(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.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function MapCache(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.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e}),r=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,r,n,i){t.push(n?i.replace(reEscapeChar,"$1"):r||e)}),t});function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function toString(e){return null==e?"":baseToString(e)}function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function baseGet(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}function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var REG_UNIT_NUM_SCIENTIFIC=/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,REG_UNIT_NUM_NORMAL=/^([+-]?[\d.]+)(.*)$/;function split_unit_num(e){var t,r,n=(e="string"!=typeof e?e.toString():e).match(REG_UNIT_NUM_SCIENTIFIC)||e.match(REG_UNIT_NUM_NORMAL);if(n){r=n[1];var i=n[2];""!==i.trim()&&(t=i)}return{num:r,unit:t}}function find_value(e,t,r){var n,i,a,o;return Array.isArray(e)?e.length>1?null!==(n=null!==(i=get(e[0],t))&&void 0!==i?i:get(e.at(-1),t))&&void 0!==n?n:r:1===e.length&&null!==(a=get(e[0],t))&&void 0!==a?a:r:null!==(o=get(e,t,r))&&void 0!==o?o:r}function parse_mantissa(e,t,r,n){var i=e.split("."),a=i[0],o=1===i.length?"":i[1],s=decimal_round(a,o,t,+r,n);return a=s.int_part,""===(o=s.dec_part)?a:"".concat(a,".").concat(o)}function integer_thousands(e){for(var t=e.length,r="";t>0;)r=e.substring(t-3,t)+(""!==r?",":"")+r,t-=3;return r}function parse_thousands(e){var t=e.split("."),r=t[0];return"-"===r[0]?t[0]="-"+integer_thousands(r.slice(1)):t[0]=integer_thousands(r),t.join(".")}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=a.length>1&&void 0!==a[1]?a[1]:5e3,n=0;case 1:if(!(n<t.length)){e.n=7;break}return e.p=2,e.n=3,Promise.race([t[n],new Promise(function(e,t){setTimeout(function(){return t(new Error("promise queue timeout err"))},r)})]);case 3:i=e.v,e.n=5;break;case 4:return e.p=4,e.v,e.a(3,6);case 5:return e.a(2,i);case 6:n++,e.n=1;break;case 7:return e.a(2,Promise.reject("错误的 promise queue 调用"))}},e,null,[[2,4]])})),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=0;case 1:if(!(r<t.length)){e.n=7;break}return e.p=2,e.n=3,fetch(t[r]);case 3:if(!e.v.ok){e.n=4;break}return e.a(2,t[r]);case 4:e.n=6;break;case 5:return e.p=5,e.v,e.a(3,6);case 6:r++,e.n=1;break;case 7:return e.a(2,null)}},e,null,[[2,5]])}))).apply(this,arguments)}function get_real_value(e,t){if(Array.isArray(e)){for(var r,n=0,i=e.length;n<i;n++){var a;if(void 0!==(r=null!==(a=get(e[n],t))&&void 0!==a?a:void 0))break}if(void 0===r)throw new Error("填充变量".concat(t,"失败"));return r}var o;return null!==(o=get(e,t))&&void 0!==o?o:void 0}function is_empty_for_fallback(e,t,r){return r&&"function"==typeof r._empty_check?r._empty_check(e,t):r&&Array.isArray(r._empty_values)?r._empty_values.some(function(t){return!(!Number.isNaN(t)||!Number.isNaN(e))||e===t}):null==e}function get_fallback_value(e,t,r){for(var n=0;n<t.length;n++){var i=t[n].trim(),a=void 0;try{if(Array.isArray(e))for(var o=0;o<e.length;o++){var s=get(e[o],i);if(void 0!==s){a=s;break}}else a=get(e,i)}catch(e){continue}if(!is_empty_for_fallback(a,i,r))return{value:a,path:i}}throw new Error("多路取值失败,所有路径均为空值: ".concat(t.join(" | ")))}function get_next_nonempty_char(e,t,r){var n;for(t++;t<r;){if(n=e[t],!empty_char_set.has(n))return n;t++}}function split_expr_and_fmt(e){for(var t=0,r=0;r<e.length;r++){var n=e[r];if("("===n)t++;else if(")"===n)t--;else if("|"===n&&0===t){if(r+1<e.length&&"|"===e[r+1]){r++;continue}return{expr:e.slice(0,r),fmt:e.slice(r+1).trim()}}}return{expr:e,fmt:""}}function parse_args(e,t){var r="",n={origin_expr:e,origin_fill_data:t,expr:"",fmt_expr:"",options:void 0,fill_data:void 0,_unit:void 0,_fmt:void 0,_empty_values:void 0,_empty_check:void 0,_vol_units:void 0,_vol_step:void 0,_thousands:void 0};if(null!=t&&(n.options=t,Array.isArray(t)?n.fill_data=t:n.fill_data=[t]),n._fmt=find_value(t,"_fmt"),n._unit=find_value(t,"_unit",!1),n._empty_values=find_value(t,"_empty_values"),n._empty_check=find_value(t,"_empty_check"),n._vol_units=find_value(t,"_vol_units"),n._vol_step=find_value(t,"_vol_step"),n._thousands=find_value(t,"_thousands"),"string"==typeof e){if(r=e,""===e.trim()||e.includes("NaN"))throw new Error("非法的表达式:".concat(e))}else{if("number"!=typeof e)throw new Error("错误的第一个参数类型: ".concat(e," 类型为:").concat(_typeof(e)));if(isNaN(e))throw new Error("传入了一个非法数字NaN");r=e.toString()}var i=split_expr_and_fmt(r),a=i.expr,o=i.fmt;return n.expr=a,n.fmt_expr=o,n}function detect_fallback_var$1(e,t){if("("!==e[t])return null;for(var r=0,n=!1,i=[],a="",o=t;o<e.length;){var s=e[o];if("("===s){if(0===r){r++,o++;continue}r++,a+=s}else if(")"===s){if(0===--r)return n?(i.push(a.trim()),{paths:i,end_index:o}):null;a+=s}else"|"===s&&1===r?(n=!0,i.push(a.trim()),a=""):a+=s;o++}return null}function detect_function_call(e,t,r){for(var n=t;n<e.length&&" "===e[n];)n++;return n<e.length&&"("===e[n]}function parse_function_args(e,t){if("("!==e[t])return null;for(var r=1,n=[],i="",a=t+1;a<e.length&&r>0;){var o=e[a];if("("===o)r++,i+=o;else if(")"===o){if(0===--r)return i.trim()&&n.push(i.trim()),{args:n,end_index:a};i+=o}else","===o&&1===r?(n.push(i.trim()),i=""):i+=o;a++}return null}function push_token$3(e,t){if(t.curr_state===state_number||t.curr_state===state_scientific){var r=t.expr.slice(t.prev_index,t.cur_index);if("+"===r||"-"===r)return e.push({type:state_operator,value:r}),t.curr_state=state_initial,void(t.prev_index=t.cur_index);if(t._unit){var n,i=split_unit_num(r),a=i.num,o=i.unit;if(void 0===o)e.push({type:state_number,value:a,real_value:a,has_unit:!1});else t.has_unit=!0,null!==(n=t.unit_str)&&void 0!==n||(t.unit_str=o),e.push({type:state_number,value:a,real_value:a,has_unit:!0,unit:o})}else e.push({type:state_number,value:r,real_value:r,has_unit:!1})}else if(t.curr_state===state_var){t.has_var=!0;var s=t.expr.slice(t.prev_index,t.cur_index);if("true"===s)e.push({type:"boolean",value:!0});else if("false"===s)e.push({type:"boolean",value:!1});else if(detect_function_call(t.expr,t.cur_index)){for(var _=t.cur_index;_<t.expr.length&&" "===t.expr[_];)_++;var u=parse_function_args(t.expr,_);if(u)return e.push({type:state_function,value:s,args:u.args}),t.cur_index=u.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}else{var c=get_real_value(t.fill_data,s);if("function"==typeof c){for(var l=t.cur_index;l<t.expr.length&&" "===t.expr[l];)l++;if(l<t.expr.length&&"("===t.expr[l]){var p=parse_function_args(t.expr,l);if(p)return e.push({type:state_function,value:s,args:p.args,fn:c}),t.cur_index=p.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}}if(t._unit){var d,f=split_unit_num(c),g=f.num,m=f.unit;if(void 0===m)e.push({type:"var",value:s,real_value:g,has_unit:!1});else t.has_unit=!0,null!==(d=t.unit_str)&&void 0!==d||(t.unit_str=m),e.push({type:"var",value:s,real_value:g,has_unit:!0,unit:m})}else e.push({type:"var",value:s,real_value:c,has_unit:!1})}}else e.push({type:t.curr_state,value:t.expr.slice(t.prev_index,t.cur_index)});t.curr_state=state_initial,t.prev_index=t.cur_index}function tokenizer(e,t,r,n){for(var i,a={has_var:!1,has_unit:!1,unit_str:void 0,fill_data:t,cur_index:0,prev_index:0,curr_state:state_initial,expr:e,_unit:r},o=e.length,s=[];a.cur_index<o;)switch(i=e[a.cur_index],a.curr_state){case state_initial:if(number_char_set.has(i))a.curr_state=state_number,a.cur_index++;else if(" "===i)a.cur_index++,a.prev_index=a.cur_index;else if("+-".includes(i)){var _=s.at(-1);0===a.cur_index||"operator"===(null==_?void 0:_.type)||"comparison"===(null==_?void 0:_.type)||"logical"===(null==_?void 0:_.type)||"logical_not"===(null==_?void 0:_.type)||"ternary_question"===(null==_?void 0:_.type)||"ternary_colon"===(null==_?void 0:_.type)||"("===(null==_?void 0:_.value)||"["===(null==_?void 0:_.value)||","===(null==_?void 0:_.value)?(a.curr_state=state_number,a.cur_index++):(a.cur_index++,s.push({type:state_operator,value:e.slice(a.prev_index,a.cur_index)}),a.prev_index=a.cur_index)}else if("*/%".includes(i))a.curr_state=state_operator,a.cur_index++;else if(">"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:">="})):s.push({type:state_comparison,value:">"}),a.prev_index=a.cur_index;else if("<"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:"<="})):s.push({type:state_comparison,value:"<"}),a.prev_index=a.cur_index;else if("="===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"=="}),a.prev_index=a.cur_index;else if("!"===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"!="}),a.prev_index=a.cur_index;else if("&"===i&&a.cur_index+1<o&&"&"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"&&"}),a.prev_index=a.cur_index;else if("|"===i&&a.cur_index+1<o&&"|"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"||"}),a.prev_index=a.cur_index;else if("!"===i)a.cur_index++,s.push({type:state_logical_not,value:"!"}),a.prev_index=a.cur_index;else if("?"===i)a.cur_index++,s.push({type:state_ternary_question,value:"?"}),a.prev_index=a.cur_index;else if(":"===i)a.cur_index++,s.push({type:state_ternary_colon,value:":"}),a.prev_index=a.cur_index;else if("["===i)a.cur_index++,s.push({type:state_range_start,value:"["}),a.prev_index=a.cur_index;else if("]"===i)a.cur_index++,s.push({type:state_range_end,value:"]"}),a.prev_index=a.cur_index;else if(","===i)a.cur_index++,s.push({type:"comma",value:","}),a.prev_index=a.cur_index;else if(var_char_set.has(i))a.curr_state=state_var,a.cur_index++;else if('"'===i||"'"===i){var u=i;a.cur_index++;for(var c="";a.cur_index<o&&e[a.cur_index]!==u;)"\\"===e[a.cur_index]&&a.cur_index+1<o?(a.cur_index++,c+=e[a.cur_index]):c+=e[a.cur_index],a.cur_index++;a.cur_index++,s.push({type:"string",value:c}),a.prev_index=a.cur_index}else if("("===i){var l=detect_fallback_var$1(e,a.cur_index);if(l){a.has_var=!0;var p=get_fallback_value(t,l.paths,n),d=p.value,f=p.path;if(r){var g,m=split_unit_num(d),v=m.num,h=m.unit;if(void 0!==h)a.has_unit=!0,null!==(g=a.unit_str)&&void 0!==g||(a.unit_str=h),s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!0,unit:h});else s.push({type:state_fallback_var,value:l.paths,real_value:v,matched_path:f,has_unit:!1})}else s.push({type:state_fallback_var,value:l.paths,real_value:d,matched_path:f,has_unit:!1});a.cur_index=l.end_index+1,a.prev_index=a.cur_index}else s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index}else")"===i?(s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index):(a.cur_index++,a.prev_index=a.cur_index);break;case state_number:if(number_char_set.has(i))a.cur_index++;else if("."===i){if(a.cur_index===a.prev_index||e.slice(a.prev_index,a.cur_index).includes("."))throw new Error("非法的小数部分".concat(e.slice(a.prev_index,a.cur_index)));a.cur_index++}else"e"===i?(a.curr_state=state_scientific,a.cur_index++):r?"*/+-() ".indexOf(i)>-1||">"===i||"<"===i||"="===i||"!"===i||"&"===i||"|"===i||"?"===i||":"===i||"["===i||"]"===i||","===i||"%"===i&&number_char_set.has(e[a.cur_index-1])&&pure_number_var_first_char_set.has(get_next_nonempty_char(e,a.cur_index,o))?push_token$3(s,a):a.cur_index++:push_token$3(s,a);break;case state_operator:var w=e[a.cur_index-1];"*"===i&&"*"===w?(a.cur_index++,s.push({type:state_operator,value:"**"}),a.prev_index=a.cur_index):"/"===i&&"/"===w?(a.cur_index++,s.push({type:state_operator,value:"//"}),a.prev_index=a.cur_index):(s.push({type:state_operator,value:w}),a.prev_index=a.cur_index),a.curr_state=state_initial;break;case state_var:var_members_char_set.has(i)?a.cur_index++:push_token$3(s,a);break;case state_scientific:if(number_char_set.has(i))a.cur_index++;else if("+-".includes(i)){var b=a.prev_index;"+-".includes(e[b])&&(b+=1);var y=e.slice(b,a.cur_index),x=y.at(-1);y.includes(i)||"e"!==x?push_token$3(s,a):a.cur_index++}else r&&-1==="*/+-() ".indexOf(i)&&">"!==i&&"<"!==i&&"="!==i&&"!"!==i&&"&"!==i&&"|"!==i&&"?"!==i&&":"!==i&&"["!==i&&"]"!==i&&","!==i?a.cur_index++:push_token$3(s,a);break;default:throw new Error("字符扫描状态错误")}return a.prev_index<a.cur_index&&push_token$3(s,a),s.has_var=a.has_var,s.has_unit=a.has_unit,s.unit=a.unit_str,s}
4
4
  /*!
5
5
  * decimal.js v10.6.0
6
6
  * An arbitrary-precision Decimal type for JavaScript.
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),_=s.value}catch(e){return void r(e)}s.done?t(_):Promise.resolve(_).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,s,"next",e)}function s(e){asyncGeneratorStep(a,n,i,o,s,"throw",e)}o(void 0)})}}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}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 _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],_=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;_=!1}else for(;!(_=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);_=!0);}catch(e){u=!0,i=e}finally{try{if(!_&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}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 _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 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 _regenerator(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var _=n&&n.prototype instanceof s?n:s,u=Object.create(_.prototype);return _regeneratorDefine(u,"_invoke",function(r,n,i){var a,s,_,u=0,l=i||[],c=!1,f={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,_=e,f.n=r,o}};function d(r,n){for(s=r,_=n,t=0;!c&&u&&!i&&t<l.length;t++){var i,a=l[t],d=f.p,p=a[2];r>3?(i=p===n)&&(_=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,f.v=n,f.n=a[1]):d<p&&(i=r<3||a[0]>n||n>p)&&(a[4]=r,a[5]=n,f.n=p,s=0))}if(i||r>1)return o;throw c=!0,n}return function(i,l,p){if(u>1)throw TypeError("Generator is already running");for(c&&1===l&&d(l,p),s=l,_=p;(t=s<2?e:_)||!c;){a||(s?s<3?(s>1&&(f.n=-1),d(s,_)):f.n=_:f.v=_);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(_=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(c=f.n<0)?_:r.call(n,f))!==o)break}catch(t){a=e,s=1,_=t}finally{u=1}}return{value:t,done:c}}}(r,i,a),!0),u}var o={};function s(){}function _(){}function u(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),c=u.prototype=s.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(c),e}return _.prototype=u,_regeneratorDefine(c,"constructor",u),_regeneratorDefine(u,"constructor",_),_.displayName="GeneratorFunction",_regeneratorDefine(u,i,"GeneratorFunction"),_regeneratorDefine(c),_regeneratorDefine(c,i,"Generator"),_regeneratorDefine(c,n,function(){return this}),_regeneratorDefine(c,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:f}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}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 _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);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:t+""}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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.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}}var version="3.0.0-beta.20250123.8";function decimal_round(e,t,r,n,i){var a=e.startsWith("-"),o=a?e.slice(1):e,s=o,_=t,u=t.length;function l(){s=(+s+1).toString()}var c={"~-":function(){var e="<"===r?n-1:n;_=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(u<=e||0===u)){var i=t.slice(0,e);0===+t.slice(e,u)?_=i:(i=(+"9".concat(i)+1).toString().slice(1)).length>e?(_=i.slice(1,i.length),l()):_=i}},"~5":function(){if(0!==u){var e="<"===r?n-1:n;_=t.slice(0,e);var i=+t[e];Number.isNaN(i)||i>=5&&(_=(+"9".concat(_)+1).toString().slice(1)).length>e&&(_=_.slice(1,_.length),l())}},"~6":function(){if(0!==u){var e,i="<"===r?n-1:n,a=+t[i],s=t.slice(+i+1,t.length);s=""===s?0:parseInt(s),e=0===i?+o[o.length-1]:+t[i-1],_=t.slice(0,i),(a>=6||5===a&&s>0||5===a&&e%2!=0)&&(_=(+"9".concat(_)+1).toString().slice(1)).length>i&&(_=_.slice(1,_.length),l())}}};return"<="===r?u<=n?_=t.replace(/0*$/,""):(c[i]&&c[i](),_=_.replace(/0+$/,"")):"<"===r?u<n?_=t.replace(/0*$/,""):(c[i]&&c[i](),_=_.replace(/0+$/,"")):"="===r?u<n?_=t+"0".repeat(n-u):u>n&&c[i]&&c[i]():">="===r?u<n&&(_=t+"0".repeat(n-u)):">"===r&&u<=n&&(_=t+"0".repeat(n-u+1)),{int_part:a?"-".concat(s):s,dec_part:_}}var number_char="0123456789",var_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",number_first_char="0123456789-+",var_members_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$[].'\"",var_first_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",pure_number_var_first_char="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",empty_char=" \n\r\t",number_char_set=new Set(number_char),var_char_set=new Set(var_char),var_members_char_set=new Set(var_members_char),var_first_char_set=new Set(var_first_char);new Set(number_first_char);var pure_number_var_first_char_set=new Set(pure_number_var_first_char),empty_char_set=new Set(empty_char),state_initial="initial",state_number="number",state_scientific="scientific",state_operator="operator",state_bracket="bracket",state_var="var",state_symbol="symbol",state_percent="percent",state_round="round",state_plus="plus",state_comma="comma",state_fraction="fraction",state_to_number="to-number",state_to_number_string="to-number-string",state_fallback_var="fallback_var",state_integer_padding="integer_padding",state_volume="volume",state_unit_after="unit_after",state_unit_before="unit_before",state_unit_middle="unit_middle",state_unit_hide="unit_hide",state_unit_default="unit_default",state_thousands="thousands",state_fmt_group="fmt_group",state_comparison="comparison",state_logical="logical",state_logical_not="logical_not",state_ternary_question="ternary_question",state_ternary_colon="ternary_colon",state_function="function",state_range_start="range_start",state_range_end="range_end",state_range_clamp="range_clamp",comparison_operators=new Set([">","<",">=","<=","==","!="]),logical_operators=new Set(["&&","||"]),operator_precedence={"|":0,"?":1,":":1,"||":2,"&&":3,"==":4,"!=":4,">":5,"<":5,">=":5,"<=":5,"+":6,"-":6,"*":7,"/":7,"%":7,"//":7,"**":8,"!":9,"unary-":9,"unary+":9},isArray=Array.isArray,freeGlobal="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),_Symbol=root.Symbol,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(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 i=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),i}var objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==_typeof(e)}var symbolTag="[object Symbol]";function isSymbol(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag(e)==symbolTag}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isObject(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var 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(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty.call(t,e)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function Hash(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])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ListCache(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.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function MapCache(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.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e}),r=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,r,n,i){t.push(n?i.replace(reEscapeChar,"$1"):r||e)}),t});function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function toString(e){return null==e?"":baseToString(e)}function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function baseGet(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}function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var REG_UNIT_NUM_SCIENTIFIC=/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,REG_UNIT_NUM_NORMAL=/^([+-]?[\d.]+)(.*)$/;function split_unit_num(e){var t,r,n=(e="string"!=typeof e?e.toString():e).match(REG_UNIT_NUM_SCIENTIFIC)||e.match(REG_UNIT_NUM_NORMAL);if(n){r=n[1];var i=n[2];""!==i.trim()&&(t=i)}return{num:r,unit:t}}function find_value(e,t,r){var n,i,a,o;return Array.isArray(e)?e.length>1?null!==(n=null!==(i=get(e[0],t))&&void 0!==i?i:get(e.at(-1),t))&&void 0!==n?n:r:1===e.length&&null!==(a=get(e[0],t))&&void 0!==a?a:r:null!==(o=get(e,t,r))&&void 0!==o?o:r}function parse_mantissa(e,t,r,n){var i=e.split("."),a=i[0],o=1===i.length?"":i[1],s=decimal_round(a,o,t,+r,n);return a=s.int_part,""===(o=s.dec_part)?a:"".concat(a,".").concat(o)}function integer_thousands(e){for(var t=e.length,r="";t>0;)r=e.substring(t-3,t)+(""!==r?",":"")+r,t-=3;return r}function parse_thousands(e){var t=e.split("."),r=t[0];return"-"===r[0]?t[0]="-"+integer_thousands(r.slice(1)):t[0]=integer_thousands(r),t.join(".")}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=a.length>1&&void 0!==a[1]?a[1]:5e3,n=0;case 1:if(!(n<t.length)){e.n=7;break}return e.p=2,e.n=3,Promise.race([t[n],new Promise(function(e,t){setTimeout(function(){return t(new Error("promise queue timeout err"))},r)})]);case 3:i=e.v,e.n=5;break;case 4:return e.p=4,e.v,e.a(3,6);case 5:return e.a(2,i);case 6:n++,e.n=1;break;case 7:return e.a(2,Promise.reject("错误的 promise queue 调用"))}},e,null,[[2,4]])})),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=0;case 1:if(!(r<t.length)){e.n=7;break}return e.p=2,e.n=3,fetch(t[r]);case 3:if(!e.v.ok){e.n=4;break}return e.a(2,t[r]);case 4:e.n=6;break;case 5:return e.p=5,e.v,e.a(3,6);case 6:r++,e.n=1;break;case 7:return e.a(2,null)}},e,null,[[2,5]])}))).apply(this,arguments)}function get_real_value(e,t){if(Array.isArray(e)){for(var r,n=0,i=e.length;n<i;n++){var a;if(void 0!==(r=null!==(a=get(e[n],t))&&void 0!==a?a:void 0))break}if(void 0===r)throw new Error("填充变量".concat(t,"失败"));return r}var o;return null!==(o=get(e,t))&&void 0!==o?o:void 0}function is_empty_for_fallback(e,t,r){return r&&"function"==typeof r._empty_check?r._empty_check(e,t):r&&Array.isArray(r._empty_values)?r._empty_values.some(function(t){return!(!Number.isNaN(t)||!Number.isNaN(e))||e===t}):null==e}function get_fallback_value(e,t,r){for(var n=0;n<t.length;n++){var i=t[n].trim(),a=void 0;try{if(Array.isArray(e))for(var o=0;o<e.length;o++){var s=get(e[o],i);if(void 0!==s){a=s;break}}else a=get(e,i)}catch(e){continue}if(!is_empty_for_fallback(a,i,r))return{value:a,path:i}}throw new Error("多路取值失败,所有路径均为空值: ".concat(t.join(" | ")))}function get_next_nonempty_char(e,t,r){var n;for(t++;t<r;){if(n=e[t],!empty_char_set.has(n))return n;t++}}function split_expr_and_fmt(e){for(var t=0,r=0;r<e.length;r++){var n=e[r];if("("===n)t++;else if(")"===n)t--;else if("|"===n&&0===t){if(r+1<e.length&&"|"===e[r+1]){r++;continue}return{expr:e.slice(0,r),fmt:e.slice(r+1).trim()}}}return{expr:e,fmt:""}}function parse_args(e,t){var r="",n={origin_expr:e,origin_fill_data:t,expr:"",fmt_expr:"",options:void 0,fill_data:void 0,_unit:void 0,_fmt:void 0,_empty_values:void 0,_empty_check:void 0,_vol_units:void 0,_vol_step:void 0,_thousands:void 0};if(null!=t&&(n.options=t,Array.isArray(t)?n.fill_data=t:n.fill_data=[t]),n._fmt=find_value(t,"_fmt"),n._unit=find_value(t,"_unit",!1),n._empty_values=find_value(t,"_empty_values"),n._empty_check=find_value(t,"_empty_check"),n._vol_units=find_value(t,"_vol_units"),n._vol_step=find_value(t,"_vol_step"),n._thousands=find_value(t,"_thousands"),"string"==typeof e){if(r=e,""===e.trim()||e.includes("NaN"))throw new Error("非法的表达式:".concat(e))}else{if("number"!=typeof e)throw new Error("错误的第一个参数类型: ".concat(e," 类型为:").concat(_typeof(e)));if(isNaN(e))throw new Error("传入了一个非法数字NaN");r=e.toString()}var i=split_expr_and_fmt(r),a=i.expr,o=i.fmt;return n.expr=a,n.fmt_expr=o,n}function detect_fallback_var$1(e,t){if("("!==e[t])return null;for(var r=0,n=!1,i=[],a="",o=t;o<e.length;){var s=e[o];if("("===s){if(0===r){r++,o++;continue}r++,a+=s}else if(")"===s){if(0===--r)return n?(i.push(a.trim()),{paths:i,end_index:o}):null;a+=s}else"|"===s&&1===r?(n=!0,i.push(a.trim()),a=""):a+=s;o++}return null}function detect_function_call(e,t,r){for(var n=t;n<e.length&&" "===e[n];)n++;return n<e.length&&"("===e[n]}function parse_function_args(e,t){if("("!==e[t])return null;for(var r=1,n=[],i="",a=t+1;a<e.length&&r>0;){var o=e[a];if("("===o)r++,i+=o;else if(")"===o){if(0===--r)return i.trim()&&n.push(i.trim()),{args:n,end_index:a};i+=o}else","===o&&1===r?(n.push(i.trim()),i=""):i+=o;a++}return null}function push_token$3(e,t){if(t.curr_state===state_number||t.curr_state===state_scientific){var r=t.expr.slice(t.prev_index,t.cur_index);if("+"===r||"-"===r)return e.push({type:state_operator,value:r}),t.curr_state=state_initial,void(t.prev_index=t.cur_index);if(t._unit){var n,i=split_unit_num(r),a=i.num,o=i.unit;if(void 0===o)e.push({type:state_number,value:a,real_value:a,has_unit:!1});else t.has_unit=!0,null!==(n=t.unit_str)&&void 0!==n||(t.unit_str=o),e.push({type:state_number,value:a,real_value:a,has_unit:!0,unit:o})}else e.push({type:state_number,value:r,real_value:r,has_unit:!1})}else if(t.curr_state===state_var){t.has_var=!0;var s=t.expr.slice(t.prev_index,t.cur_index);if("true"===s)e.push({type:"boolean",value:!0});else if("false"===s)e.push({type:"boolean",value:!1});else if(detect_function_call(t.expr,t.cur_index)){for(var _=t.cur_index;_<t.expr.length&&" "===t.expr[_];)_++;var u=parse_function_args(t.expr,_);if(u)return e.push({type:state_function,value:s,args:u.args}),t.cur_index=u.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}else{var l=get_real_value(t.fill_data,s);if("function"==typeof l){for(var c=t.cur_index;c<t.expr.length&&" "===t.expr[c];)c++;if(c<t.expr.length&&"("===t.expr[c]){var f=parse_function_args(t.expr,c);if(f)return e.push({type:state_function,value:s,args:f.args,fn:l}),t.cur_index=f.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}}if(t._unit){var d,p=split_unit_num(l),g=p.num,m=p.unit;if(void 0===m)e.push({type:"var",value:s,real_value:g,has_unit:!1});else t.has_unit=!0,null!==(d=t.unit_str)&&void 0!==d||(t.unit_str=m),e.push({type:"var",value:s,real_value:g,has_unit:!0,unit:m})}else e.push({type:"var",value:s,real_value:l,has_unit:!1})}}else e.push({type:t.curr_state,value:t.expr.slice(t.prev_index,t.cur_index)});t.curr_state=state_initial,t.prev_index=t.cur_index}function tokenizer(e,t,r,n){for(var i,a={has_var:!1,has_unit:!1,unit_str:void 0,fill_data:t,cur_index:0,prev_index:0,curr_state:state_initial,expr:e,_unit:r},o=e.length,s=[];a.cur_index<o;)switch(i=e[a.cur_index],a.curr_state){case state_initial:if(number_char_set.has(i))a.curr_state=state_number,a.cur_index++;else if(" "===i)a.cur_index++,a.prev_index=a.cur_index;else if("+-".includes(i)){var _=s.at(-1);0===a.cur_index||"operator"===(null==_?void 0:_.type)||"comparison"===(null==_?void 0:_.type)||"logical"===(null==_?void 0:_.type)||"logical_not"===(null==_?void 0:_.type)||"ternary_question"===(null==_?void 0:_.type)||"ternary_colon"===(null==_?void 0:_.type)||"("===(null==_?void 0:_.value)||"["===(null==_?void 0:_.value)||","===(null==_?void 0:_.value)?(a.curr_state=state_number,a.cur_index++):(a.cur_index++,s.push({type:state_operator,value:e.slice(a.prev_index,a.cur_index)}),a.prev_index=a.cur_index)}else if("*/%".includes(i))a.curr_state=state_operator,a.cur_index++;else if(">"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:">="})):s.push({type:state_comparison,value:">"}),a.prev_index=a.cur_index;else if("<"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:"<="})):s.push({type:state_comparison,value:"<"}),a.prev_index=a.cur_index;else if("="===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"=="}),a.prev_index=a.cur_index;else if("!"===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"!="}),a.prev_index=a.cur_index;else if("&"===i&&a.cur_index+1<o&&"&"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"&&"}),a.prev_index=a.cur_index;else if("|"===i&&a.cur_index+1<o&&"|"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"||"}),a.prev_index=a.cur_index;else if("!"===i)a.cur_index++,s.push({type:state_logical_not,value:"!"}),a.prev_index=a.cur_index;else if("?"===i)a.cur_index++,s.push({type:state_ternary_question,value:"?"}),a.prev_index=a.cur_index;else if(":"===i)a.cur_index++,s.push({type:state_ternary_colon,value:":"}),a.prev_index=a.cur_index;else if("["===i)a.cur_index++,s.push({type:state_range_start,value:"["}),a.prev_index=a.cur_index;else if("]"===i)a.cur_index++,s.push({type:state_range_end,value:"]"}),a.prev_index=a.cur_index;else if(","===i)a.cur_index++,s.push({type:"comma",value:","}),a.prev_index=a.cur_index;else if(var_char_set.has(i))a.curr_state=state_var,a.cur_index++;else if('"'===i||"'"===i){var u=i;a.cur_index++;for(var l="";a.cur_index<o&&e[a.cur_index]!==u;)"\\"===e[a.cur_index]&&a.cur_index+1<o?(a.cur_index++,l+=e[a.cur_index]):l+=e[a.cur_index],a.cur_index++;a.cur_index++,s.push({type:"string",value:l}),a.prev_index=a.cur_index}else if("("===i){var c=detect_fallback_var$1(e,a.cur_index);if(c){a.has_var=!0;var f=get_fallback_value(t,c.paths,n),d=f.value,p=f.path;if(r){var g,m=split_unit_num(d),v=m.num,h=m.unit;if(void 0!==h)a.has_unit=!0,null!==(g=a.unit_str)&&void 0!==g||(a.unit_str=h),s.push({type:state_fallback_var,value:c.paths,real_value:v,matched_path:p,has_unit:!0,unit:h});else s.push({type:state_fallback_var,value:c.paths,real_value:v,matched_path:p,has_unit:!1})}else s.push({type:state_fallback_var,value:c.paths,real_value:d,matched_path:p,has_unit:!1});a.cur_index=c.end_index+1,a.prev_index=a.cur_index}else s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index}else")"===i?(s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index):(a.cur_index++,a.prev_index=a.cur_index);break;case state_number:if(number_char_set.has(i))a.cur_index++;else if("."===i){if(a.cur_index===a.prev_index||e.slice(a.prev_index,a.cur_index).includes("."))throw new Error("非法的小数部分".concat(e.slice(a.prev_index,a.cur_index)));a.cur_index++}else"e"===i?(a.curr_state=state_scientific,a.cur_index++):r?"*/+-() ".indexOf(i)>-1||">"===i||"<"===i||"="===i||"!"===i||"&"===i||"|"===i||"?"===i||":"===i||"["===i||"]"===i||","===i||"%"===i&&number_char_set.has(e[a.cur_index-1])&&pure_number_var_first_char_set.has(get_next_nonempty_char(e,a.cur_index,o))?push_token$3(s,a):a.cur_index++:push_token$3(s,a);break;case state_operator:var w=e[a.cur_index-1];"*"===i&&"*"===w?(a.cur_index++,s.push({type:state_operator,value:"**"}),a.prev_index=a.cur_index):"/"===i&&"/"===w?(a.cur_index++,s.push({type:state_operator,value:"//"}),a.prev_index=a.cur_index):(s.push({type:state_operator,value:w}),a.prev_index=a.cur_index),a.curr_state=state_initial;break;case state_var:var_members_char_set.has(i)?a.cur_index++:push_token$3(s,a);break;case state_scientific:if(number_char_set.has(i))a.cur_index++;else if("+-".includes(i)){var b=a.prev_index;"+-".includes(e[b])&&(b+=1);var y=e.slice(b,a.cur_index),x=y.at(-1);y.includes(i)||"e"!==x?push_token$3(s,a):a.cur_index++}else r&&-1==="*/+-() ".indexOf(i)&&">"!==i&&"<"!==i&&"="!==i&&"!"!==i&&"&"!==i&&"|"!==i&&"?"!==i&&":"!==i&&"["!==i&&"]"!==i&&","!==i?a.cur_index++:push_token$3(s,a);break;default:throw new Error("字符扫描状态错误")}return a.prev_index<a.cur_index&&push_token$3(s,a),s.has_var=a.has_var,s.has_unit=a.has_unit,s.unit=a.unit_str,s}
3
+ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var _=n&&n.prototype instanceof s?n:s,u=Object.create(_.prototype);return _regeneratorDefine(u,"_invoke",function(r,n,i){var a,s,_,u=0,l=i||[],c=!1,f={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,_=e,f.n=r,o}};function d(r,n){for(s=r,_=n,t=0;!c&&u&&!i&&t<l.length;t++){var i,a=l[t],d=f.p,p=a[2];r>3?(i=p===n)&&(_=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,f.v=n,f.n=a[1]):d<p&&(i=r<3||a[0]>n||n>p)&&(a[4]=r,a[5]=n,f.n=p,s=0))}if(i||r>1)return o;throw c=!0,n}return function(i,l,p){if(u>1)throw TypeError("Generator is already running");for(c&&1===l&&d(l,p),s=l,_=p;(t=s<2?e:_)||!c;){a||(s?s<3?(s>1&&(f.n=-1),d(s,_)):f.n=_:f.v=_);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(_=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(c=f.n<0)?_:r.call(n,f))!==o)break}catch(t){a=e,s=1,_=t}finally{u=1}}return{value:t,done:c}}}(r,i,a),!0),u}var o={};function s(){}function _(){}function u(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),c=u.prototype=s.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(c),e}return _.prototype=u,_regeneratorDefine(c,"constructor",u),_regeneratorDefine(u,"constructor",_),_.displayName="GeneratorFunction",_regeneratorDefine(u,i,"GeneratorFunction"),_regeneratorDefine(c),_regeneratorDefine(c,i,"Generator"),_regeneratorDefine(c,n,function(){return this}),_regeneratorDefine(c,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:f}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}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 _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);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:t+""}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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.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}}var version="3.0.0-beta.20250123.2";function decimal_round(e,t,r,n,i){var a=e.startsWith("-"),o=a?e.slice(1):e,s=o,_=t,u=t.length;function l(){s=(+s+1).toString()}var c={"~-":function(){var e="<"===r?n-1:n;_=t.slice(0,e)},"~+":function(){var e="<"===r?n-1:n;if(!(u<=e||0===u)){var i=t.slice(0,e);0===+t.slice(e,u)?_=i:(i=(+"9".concat(i)+1).toString().slice(1)).length>e?(_=i.slice(1,i.length),l()):_=i}},"~5":function(){if(0!==u){var e="<"===r?n-1:n;_=t.slice(0,e);var i=+t[e];Number.isNaN(i)||i>=5&&(_=(+"9".concat(_)+1).toString().slice(1)).length>e&&(_=_.slice(1,_.length),l())}},"~6":function(){if(0!==u){var e,i="<"===r?n-1:n,a=+t[i],s=t.slice(+i+1,t.length);s=""===s?0:parseInt(s),e=0===i?+o[o.length-1]:+t[i-1],_=t.slice(0,i),(a>=6||5===a&&s>0||5===a&&e%2!=0)&&(_=(+"9".concat(_)+1).toString().slice(1)).length>i&&(_=_.slice(1,_.length),l())}}};return"<="===r?u<=n?_=t.replace(/0*$/,""):(c[i]&&c[i](),_=_.replace(/0+$/,"")):"<"===r?u<n?_=t.replace(/0*$/,""):(c[i]&&c[i](),_=_.replace(/0+$/,"")):"="===r?u<n?_=t+"0".repeat(n-u):u>n&&c[i]&&c[i]():">="===r?u<n&&(_=t+"0".repeat(n-u)):">"===r&&u<=n&&(_=t+"0".repeat(n-u+1)),{int_part:a?"-".concat(s):s,dec_part:_}}var number_char="0123456789",var_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",number_first_char="0123456789-+",var_members_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$[].'\"",var_first_char="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",pure_number_var_first_char="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",empty_char=" \n\r\t",number_char_set=new Set(number_char),var_char_set=new Set(var_char),var_members_char_set=new Set(var_members_char),var_first_char_set=new Set(var_first_char);new Set(number_first_char);var pure_number_var_first_char_set=new Set(pure_number_var_first_char),empty_char_set=new Set(empty_char),state_initial="initial",state_number="number",state_scientific="scientific",state_operator="operator",state_bracket="bracket",state_var="var",state_symbol="symbol",state_percent="percent",state_round="round",state_plus="plus",state_comma="comma",state_fraction="fraction",state_to_number="to-number",state_to_number_string="to-number-string",state_fallback_var="fallback_var",state_integer_padding="integer_padding",state_volume="volume",state_unit_after="unit_after",state_unit_before="unit_before",state_unit_middle="unit_middle",state_unit_hide="unit_hide",state_unit_default="unit_default",state_thousands="thousands",state_fmt_group="fmt_group",state_comparison="comparison",state_logical="logical",state_logical_not="logical_not",state_ternary_question="ternary_question",state_ternary_colon="ternary_colon",state_function="function",state_range_start="range_start",state_range_end="range_end",state_range_clamp="range_clamp",comparison_operators=new Set([">","<",">=","<=","==","!="]),logical_operators=new Set(["&&","||"]),operator_precedence={"|":0,"?":1,":":1,"||":2,"&&":3,"==":4,"!=":4,">":5,"<":5,">=":5,"<=":5,"+":6,"-":6,"*":7,"/":7,"%":7,"//":7,"**":8,"!":9,"unary-":9,"unary+":9},isArray=Array.isArray,freeGlobal="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),_Symbol=root.Symbol,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(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 i=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),i}var objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==_typeof(e)}var symbolTag="[object Symbol]";function isSymbol(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag(e)==symbolTag}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var r=_typeof(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isObject(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var 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(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty.call(t,e)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function Hash(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])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ListCache(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.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function MapCache(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.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e}),r=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,r,n,i){t.push(n?i.replace(reEscapeChar,"$1"):r||e)}),t});function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function toString(e){return null==e?"":baseToString(e)}function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function baseGet(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}function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var REG_UNIT_NUM_SCIENTIFIC=/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,REG_UNIT_NUM_NORMAL=/^([+-]?[\d.]+)(.*)$/;function split_unit_num(e){var t,r,n=(e="string"!=typeof e?e.toString():e).match(REG_UNIT_NUM_SCIENTIFIC)||e.match(REG_UNIT_NUM_NORMAL);if(n){r=n[1];var i=n[2];""!==i.trim()&&(t=i)}return{num:r,unit:t}}function find_value(e,t,r){var n,i,a,o;return Array.isArray(e)?e.length>1?null!==(n=null!==(i=get(e[0],t))&&void 0!==i?i:get(e.at(-1),t))&&void 0!==n?n:r:1===e.length&&null!==(a=get(e[0],t))&&void 0!==a?a:r:null!==(o=get(e,t,r))&&void 0!==o?o:r}function parse_mantissa(e,t,r,n){var i=e.split("."),a=i[0],o=1===i.length?"":i[1],s=decimal_round(a,o,t,+r,n);return a=s.int_part,""===(o=s.dec_part)?a:"".concat(a,".").concat(o)}function integer_thousands(e){for(var t=e.length,r="";t>0;)r=e.substring(t-3,t)+(""!==r?",":"")+r,t-=3;return r}function parse_thousands(e){var t=e.split("."),r=t[0];return"-"===r[0]?t[0]="-"+integer_thousands(r.slice(1)):t[0]=integer_thousands(r),t.join(".")}function promise_queue(e){return _promise_queue.apply(this,arguments)}function _promise_queue(){return _promise_queue=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=a.length>1&&void 0!==a[1]?a[1]:5e3,n=0;case 1:if(!(n<t.length)){e.n=7;break}return e.p=2,e.n=3,Promise.race([t[n],new Promise(function(e,t){setTimeout(function(){return t(new Error("promise queue timeout err"))},r)})]);case 3:i=e.v,e.n=5;break;case 4:return e.p=4,e.v,e.a(3,6);case 5:return e.a(2,i);case 6:n++,e.n=1;break;case 7:return e.a(2,Promise.reject("错误的 promise queue 调用"))}},e,null,[[2,4]])})),_promise_queue.apply(this,arguments)}function test_urls(e){return _test_urls.apply(this,arguments)}function _test_urls(){return(_test_urls=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=0;case 1:if(!(r<t.length)){e.n=7;break}return e.p=2,e.n=3,fetch(t[r]);case 3:if(!e.v.ok){e.n=4;break}return e.a(2,t[r]);case 4:e.n=6;break;case 5:return e.p=5,e.v,e.a(3,6);case 6:r++,e.n=1;break;case 7:return e.a(2,null)}},e,null,[[2,5]])}))).apply(this,arguments)}function get_real_value(e,t){if(Array.isArray(e)){for(var r,n=0,i=e.length;n<i;n++){var a;if(void 0!==(r=null!==(a=get(e[n],t))&&void 0!==a?a:void 0))break}if(void 0===r)throw new Error("填充变量".concat(t,"失败"));return r}var o;return null!==(o=get(e,t))&&void 0!==o?o:void 0}function is_empty_for_fallback(e,t,r){return r&&"function"==typeof r._empty_check?r._empty_check(e,t):r&&Array.isArray(r._empty_values)?r._empty_values.some(function(t){return!(!Number.isNaN(t)||!Number.isNaN(e))||e===t}):null==e}function get_fallback_value(e,t,r){for(var n=0;n<t.length;n++){var i=t[n].trim(),a=void 0;try{if(Array.isArray(e))for(var o=0;o<e.length;o++){var s=get(e[o],i);if(void 0!==s){a=s;break}}else a=get(e,i)}catch(e){continue}if(!is_empty_for_fallback(a,i,r))return{value:a,path:i}}throw new Error("多路取值失败,所有路径均为空值: ".concat(t.join(" | ")))}function get_next_nonempty_char(e,t,r){var n;for(t++;t<r;){if(n=e[t],!empty_char_set.has(n))return n;t++}}function split_expr_and_fmt(e){for(var t=0,r=0;r<e.length;r++){var n=e[r];if("("===n)t++;else if(")"===n)t--;else if("|"===n&&0===t){if(r+1<e.length&&"|"===e[r+1]){r++;continue}return{expr:e.slice(0,r),fmt:e.slice(r+1).trim()}}}return{expr:e,fmt:""}}function parse_args(e,t){var r="",n={origin_expr:e,origin_fill_data:t,expr:"",fmt_expr:"",options:void 0,fill_data:void 0,_unit:void 0,_fmt:void 0,_empty_values:void 0,_empty_check:void 0,_vol_units:void 0,_vol_step:void 0,_thousands:void 0};if(null!=t&&(n.options=t,Array.isArray(t)?n.fill_data=t:n.fill_data=[t]),n._fmt=find_value(t,"_fmt"),n._unit=find_value(t,"_unit",!1),n._empty_values=find_value(t,"_empty_values"),n._empty_check=find_value(t,"_empty_check"),n._vol_units=find_value(t,"_vol_units"),n._vol_step=find_value(t,"_vol_step"),n._thousands=find_value(t,"_thousands"),"string"==typeof e){if(r=e,""===e.trim()||e.includes("NaN"))throw new Error("非法的表达式:".concat(e))}else{if("number"!=typeof e)throw new Error("错误的第一个参数类型: ".concat(e," 类型为:").concat(_typeof(e)));if(isNaN(e))throw new Error("传入了一个非法数字NaN");r=e.toString()}var i=split_expr_and_fmt(r),a=i.expr,o=i.fmt;return n.expr=a,n.fmt_expr=o,n}function detect_fallback_var$1(e,t){if("("!==e[t])return null;for(var r=0,n=!1,i=[],a="",o=t;o<e.length;){var s=e[o];if("("===s){if(0===r){r++,o++;continue}r++,a+=s}else if(")"===s){if(0===--r)return n?(i.push(a.trim()),{paths:i,end_index:o}):null;a+=s}else"|"===s&&1===r?(n=!0,i.push(a.trim()),a=""):a+=s;o++}return null}function detect_function_call(e,t,r){for(var n=t;n<e.length&&" "===e[n];)n++;return n<e.length&&"("===e[n]}function parse_function_args(e,t){if("("!==e[t])return null;for(var r=1,n=[],i="",a=t+1;a<e.length&&r>0;){var o=e[a];if("("===o)r++,i+=o;else if(")"===o){if(0===--r)return i.trim()&&n.push(i.trim()),{args:n,end_index:a};i+=o}else","===o&&1===r?(n.push(i.trim()),i=""):i+=o;a++}return null}function push_token$3(e,t){if(t.curr_state===state_number||t.curr_state===state_scientific){var r=t.expr.slice(t.prev_index,t.cur_index);if("+"===r||"-"===r)return e.push({type:state_operator,value:r}),t.curr_state=state_initial,void(t.prev_index=t.cur_index);if(t._unit){var n,i=split_unit_num(r),a=i.num,o=i.unit;if(void 0===o)e.push({type:state_number,value:a,real_value:a,has_unit:!1});else t.has_unit=!0,null!==(n=t.unit_str)&&void 0!==n||(t.unit_str=o),e.push({type:state_number,value:a,real_value:a,has_unit:!0,unit:o})}else e.push({type:state_number,value:r,real_value:r,has_unit:!1})}else if(t.curr_state===state_var){t.has_var=!0;var s=t.expr.slice(t.prev_index,t.cur_index);if("true"===s)e.push({type:"boolean",value:!0});else if("false"===s)e.push({type:"boolean",value:!1});else if(detect_function_call(t.expr,t.cur_index)){for(var _=t.cur_index;_<t.expr.length&&" "===t.expr[_];)_++;var u=parse_function_args(t.expr,_);if(u)return e.push({type:state_function,value:s,args:u.args}),t.cur_index=u.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}else{var l=get_real_value(t.fill_data,s);if("function"==typeof l){for(var c=t.cur_index;c<t.expr.length&&" "===t.expr[c];)c++;if(c<t.expr.length&&"("===t.expr[c]){var f=parse_function_args(t.expr,c);if(f)return e.push({type:state_function,value:s,args:f.args,fn:l}),t.cur_index=f.end_index+1,t.prev_index=t.cur_index,void(t.curr_state=state_initial)}}if(t._unit){var d,p=split_unit_num(l),g=p.num,m=p.unit;if(void 0===m)e.push({type:"var",value:s,real_value:g,has_unit:!1});else t.has_unit=!0,null!==(d=t.unit_str)&&void 0!==d||(t.unit_str=m),e.push({type:"var",value:s,real_value:g,has_unit:!0,unit:m})}else e.push({type:"var",value:s,real_value:l,has_unit:!1})}}else e.push({type:t.curr_state,value:t.expr.slice(t.prev_index,t.cur_index)});t.curr_state=state_initial,t.prev_index=t.cur_index}function tokenizer(e,t,r,n){for(var i,a={has_var:!1,has_unit:!1,unit_str:void 0,fill_data:t,cur_index:0,prev_index:0,curr_state:state_initial,expr:e,_unit:r},o=e.length,s=[];a.cur_index<o;)switch(i=e[a.cur_index],a.curr_state){case state_initial:if(number_char_set.has(i))a.curr_state=state_number,a.cur_index++;else if(" "===i)a.cur_index++,a.prev_index=a.cur_index;else if("+-".includes(i)){var _=s.at(-1);0===a.cur_index||"operator"===(null==_?void 0:_.type)||"comparison"===(null==_?void 0:_.type)||"logical"===(null==_?void 0:_.type)||"logical_not"===(null==_?void 0:_.type)||"ternary_question"===(null==_?void 0:_.type)||"ternary_colon"===(null==_?void 0:_.type)||"("===(null==_?void 0:_.value)||"["===(null==_?void 0:_.value)||","===(null==_?void 0:_.value)?(a.curr_state=state_number,a.cur_index++):(a.cur_index++,s.push({type:state_operator,value:e.slice(a.prev_index,a.cur_index)}),a.prev_index=a.cur_index)}else if("*/%".includes(i))a.curr_state=state_operator,a.cur_index++;else if(">"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:">="})):s.push({type:state_comparison,value:">"}),a.prev_index=a.cur_index;else if("<"===i)a.cur_index++,a.cur_index<o&&"="===e[a.cur_index]?(a.cur_index++,s.push({type:state_comparison,value:"<="})):s.push({type:state_comparison,value:"<"}),a.prev_index=a.cur_index;else if("="===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"=="}),a.prev_index=a.cur_index;else if("!"===i&&a.cur_index+1<o&&"="===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_comparison,value:"!="}),a.prev_index=a.cur_index;else if("&"===i&&a.cur_index+1<o&&"&"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"&&"}),a.prev_index=a.cur_index;else if("|"===i&&a.cur_index+1<o&&"|"===e[a.cur_index+1])a.cur_index+=2,s.push({type:state_logical,value:"||"}),a.prev_index=a.cur_index;else if("!"===i)a.cur_index++,s.push({type:state_logical_not,value:"!"}),a.prev_index=a.cur_index;else if("?"===i)a.cur_index++,s.push({type:state_ternary_question,value:"?"}),a.prev_index=a.cur_index;else if(":"===i)a.cur_index++,s.push({type:state_ternary_colon,value:":"}),a.prev_index=a.cur_index;else if("["===i)a.cur_index++,s.push({type:state_range_start,value:"["}),a.prev_index=a.cur_index;else if("]"===i)a.cur_index++,s.push({type:state_range_end,value:"]"}),a.prev_index=a.cur_index;else if(","===i)a.cur_index++,s.push({type:"comma",value:","}),a.prev_index=a.cur_index;else if(var_char_set.has(i))a.curr_state=state_var,a.cur_index++;else if('"'===i||"'"===i){var u=i;a.cur_index++;for(var l="";a.cur_index<o&&e[a.cur_index]!==u;)"\\"===e[a.cur_index]&&a.cur_index+1<o?(a.cur_index++,l+=e[a.cur_index]):l+=e[a.cur_index],a.cur_index++;a.cur_index++,s.push({type:"string",value:l}),a.prev_index=a.cur_index}else if("("===i){var c=detect_fallback_var$1(e,a.cur_index);if(c){a.has_var=!0;var f=get_fallback_value(t,c.paths,n),d=f.value,p=f.path;if(r){var g,m=split_unit_num(d),v=m.num,h=m.unit;if(void 0!==h)a.has_unit=!0,null!==(g=a.unit_str)&&void 0!==g||(a.unit_str=h),s.push({type:state_fallback_var,value:c.paths,real_value:v,matched_path:p,has_unit:!0,unit:h});else s.push({type:state_fallback_var,value:c.paths,real_value:v,matched_path:p,has_unit:!1})}else s.push({type:state_fallback_var,value:c.paths,real_value:d,matched_path:p,has_unit:!1});a.cur_index=c.end_index+1,a.prev_index=a.cur_index}else s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index}else")"===i?(s.push({type:state_bracket,value:i}),a.curr_state=state_initial,a.cur_index++,a.prev_index=a.cur_index):(a.cur_index++,a.prev_index=a.cur_index);break;case state_number:if(number_char_set.has(i))a.cur_index++;else if("."===i){if(a.cur_index===a.prev_index||e.slice(a.prev_index,a.cur_index).includes("."))throw new Error("非法的小数部分".concat(e.slice(a.prev_index,a.cur_index)));a.cur_index++}else"e"===i?(a.curr_state=state_scientific,a.cur_index++):r?"*/+-() ".indexOf(i)>-1||">"===i||"<"===i||"="===i||"!"===i||"&"===i||"|"===i||"?"===i||":"===i||"["===i||"]"===i||","===i||"%"===i&&number_char_set.has(e[a.cur_index-1])&&pure_number_var_first_char_set.has(get_next_nonempty_char(e,a.cur_index,o))?push_token$3(s,a):a.cur_index++:push_token$3(s,a);break;case state_operator:var w=e[a.cur_index-1];"*"===i&&"*"===w?(a.cur_index++,s.push({type:state_operator,value:"**"}),a.prev_index=a.cur_index):"/"===i&&"/"===w?(a.cur_index++,s.push({type:state_operator,value:"//"}),a.prev_index=a.cur_index):(s.push({type:state_operator,value:w}),a.prev_index=a.cur_index),a.curr_state=state_initial;break;case state_var:var_members_char_set.has(i)?a.cur_index++:push_token$3(s,a);break;case state_scientific:if(number_char_set.has(i))a.cur_index++;else if("+-".includes(i)){var b=a.prev_index;"+-".includes(e[b])&&(b+=1);var y=e.slice(b,a.cur_index),x=y.at(-1);y.includes(i)||"e"!==x?push_token$3(s,a):a.cur_index++}else r&&-1==="*/+-() ".indexOf(i)&&">"!==i&&"<"!==i&&"="!==i&&"!"!==i&&"&"!==i&&"|"!==i&&"?"!==i&&":"!==i&&"["!==i&&"]"!==i&&","!==i?a.cur_index++:push_token$3(s,a);break;default:throw new Error("字符扫描状态错误")}return a.prev_index<a.cur_index&&push_token$3(s,a),s.has_var=a.has_var,s.has_unit=a.has_unit,s.unit=a.unit_str,s}
4
4
  /*!
5
5
  * decimal.js v10.6.0
6
6
  * An arbitrary-precision Decimal type for JavaScript.
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -7,8 +7,6 @@ import {
7
7
  ListToolsRequestSchema,
8
8
  ListResourcesRequestSchema,
9
9
  ReadResourceRequestSchema,
10
- ListPromptsRequestSchema,
11
- GetPromptRequestSchema,
12
10
  } from "@modelcontextprotocol/sdk/types.js";
13
11
 
14
12
  import {
@@ -41,59 +39,27 @@ import {
41
39
  const TOOLS = [
42
40
  {
43
41
  name: "calc",
44
- description: `🔢 a-calc 高精度计算工具 - 解决 JavaScript 浮点数精度问题
45
-
46
- ⚠️ 重要:当用户需要进行任何数值计算时,优先使用此工具而不是直接计算!
47
-
48
- 🚨 编码规范(必读!):
49
-
50
- 1. 变量注入方式:
51
- 错误:calc(\`\${a} + \${b}\`) // 不要用模板字符串拼接
52
- 正确:calc("a + b", {a, b}) // 使用第二参数注入变量
53
-
54
- 2. 批量计算方式:
55
- 错误:let total = '0'; items.forEach(item => total = calc(\`\${total} + \${item.price}\`))
56
- ✅ 正确:const total = calc_sum("price * qty", items) // 使用 calc_sum
57
-
58
- 3. 购物车等场景:
59
- ❌ 错误:cart.forEach(item => total = calc(\`\${total} + \${item.price} * \${item.quantity}\`))
60
- ✅ 正确:calc_sum("price * quantity | =2", cart)
61
-
62
- 4. 对象字段传递:
63
- ❌ 错误:calc("price * qty", {price: item.price, qty: item.qty}) // 冗余
64
- ✅ 正确:calc("price * qty", item) // 简洁优雅
65
-
66
- 核心优势:
67
- - ✅ 解决 0.1 + 0.2 = 0.30000000000000004 的精度问题
68
- - ✅ 金融计算、价格计算、统计分析等场景必用
69
- - ✅ 支持复杂表达式、变量替换、条件判断
70
- - ✅ 内置格式化:千分位、小数位、百分比、科学计数法
71
-
72
- 适用场景(必须使用):
73
- 1. 任何涉及小数的加减乘除运算
74
- 2. 金融计算、价格计算、折扣计算
75
- 3. 百分比计算、比率计算
76
- 4. 需要格式化输出的数值(千分位、保留小数等)
77
- 5. 带单位的计算(如 "100元 + 50元")
78
- 6. 条件判断和比较运算
79
-
80
- 快速示例:
81
- - calc("0.1 + 0.2") → "0.3" (精确!)
82
- - calc("price * qty | =2", {price: 99.9, qty: 3}) → "299.70"
83
- - calc("1234567 | ,") → "1,234,567" (千分位)
84
- - calc("score >= 60 ? '及格' : '不及格'", {score: 75}) → "及格"
85
-
86
- 变量注入最佳实践:
87
- - 如果对象已有所需字段,直接传入:calc("price * qty", item)
88
- - 如果需要多个独立变量,使用简写:calc("a + b", {a, b})
89
- - 避免冗余:❌ calc("price * qty", {price: item.price, qty: item.qty})
42
+ description: `a-calc 核心计算函数 - 支持表达式计算、变量填充、格式化
43
+
44
+ 功能特点:
45
+ - 高精度计算,避免 JavaScript 浮点数精度问题
46
+ - 支持运算符: + - * / % ** //
47
+ - 支持变量填充和单位计算
48
+ - 支持条件表达式: a > b ? x : y
49
+ - 支持比较运算: > < >= <= == !=
50
+ - 支持逻辑运算: && || !
51
+ - 支持链式比较: 1 < x < 10
52
+ - 支持内置数学函数: sqrt, sin, cos, pow, max, min 等
53
+ - 支持丰富的格式化选项
90
54
 
91
- 支持的运算:
92
- - 基础运算: + - * / % ** // (加减乘除、取模、幂、整除)
93
- - 比较运算: > < >= <= == !=
94
- - 逻辑运算: && || !
95
- - 数学函数: sqrt, sin, cos, tan, pow, max, min, abs, floor, ceil 等
96
- - 格式化: =N(小数位), ,(千分位), %(百分比), !e(科学计数), !v(交易量)`,
55
+ 使用示例:
56
+ - calc("0.1 + 0.2") "0.3"
57
+ - calc("a + b", {a: 1, b: 2}) → "3"
58
+ - calc("10 / 3 | =2") → "3.33"
59
+ - calc("1000000 | ,") "1,000,000"
60
+ - calc("100元 + 50元", {_unit: true}) → "150元"
61
+ - calc("score >= 60 ? '及格' : '不及格'", {score: 75}) → "及格"
62
+ - calc("sqrt(16) + pow(2, 3)") → "12"`,
97
63
  inputSchema: {
98
64
  type: "object",
99
65
  properties: {
@@ -135,29 +101,20 @@ const TOOLS = [
135
101
  },
136
102
  {
137
103
  name: "fmt",
138
- description: `📊 a-calc 数值格式化工具 - 专业的数字格式化,性能最优
139
-
140
- ⚠️ 使用场景:当需要格式化数字(千分位、小数位、百分比等)但不需要计算时使用
141
-
142
- 性能优势:
143
- - 跳过表达式解析,比 calc 更快
144
- - 适合纯格式化场景
145
-
146
- 常用格式化规则:
147
- - =N: 精确N位小数 ( =2 "100.00")
148
- - <=N: 最多N位小数 (如 <=2 → "3.14")
149
- - >=N: 至少N位小数 (如 >=3 → "3.100")
150
- - ~5: 四舍五入 (如 ~5=2 → "1.13")
151
- - ~6: 银行家舍入
152
- - ,: 千分位分隔 (如 , → "1,234,567")
153
- - %: 百分比 (如 %=2 → "12.34%")
154
- - !e: 科学计数法 (如 !e=2 → "1.23e+8")
155
- - +: 显示正号 (如 + → "+100")
156
- - !n: 返回数字类型
157
- - !v: 交易量缩写 (如 !v → "1.23M")
158
- - !t:us/eu/indian/cn4: 千分位预设
159
-
160
- 快速示例:
104
+ description: `a-calc 专用格式化函数 - 跳过表达式解析,性能更优
105
+
106
+ 格式化规则:
107
+ - 小数位: =N(精确N位), <=N(最多N位), >=N(至少N位)
108
+ - 舍入: ~-(截断), ~+(进位), ~5(四舍五入), ~6(银行家舍入)
109
+ - 千分位: , (如 1,234,567)
110
+ - 百分比: % (如 12.34%)
111
+ - 科学计数: !e (如 1.23e+8)
112
+ - 正负号: + (如 +100)
113
+ - 返回数字: !n (返回 number 类型而非 string)
114
+ - 交易量缩写: !v (如 1.23M, 1.23万)
115
+ - 千分位预设: !t:us, !t:eu, !t:indian, !t:cn4
116
+
117
+ 使用示例:
161
118
  - fmt(100, "=2") → "100.00"
162
119
  - fmt(1234567, ",") → "1,234,567"
163
120
  - fmt(0.1234, "%=2") → "12.34%"
@@ -186,55 +143,16 @@ const TOOLS = [
186
143
  },
187
144
  {
188
145
  name: "calc_sum",
189
- description: `📈 a-calc 批量聚合计算工具 - 对数组数据进行批量计算并求和
146
+ description: `a-calc 聚合计算函数 - 对数组数据进行批量计算并求和
190
147
 
191
- ⚠️ 使用场景:处理数组数据、批量计算、统计汇总时使用
148
+ 适用场景:
149
+ - 计算订单总价
150
+ - 统计销售额
151
+ - 汇总报表数据
192
152
 
193
- 🚨 这是处理数组数据的正确方式!不要用 forEach 累加!
194
-
195
- 典型应用场景:
196
- 1. 计算订单总价:多个商品的 price * quantity 求和
197
- 2. 统计销售额:多条销售记录的金额汇总
198
- 3. 报表数据汇总:批量计算并求和
199
- 4. 购物车总价计算
200
-
201
- 编码规范对比(必读!):
202
-
203
- ❌ 错误写法(不要这样做):
204
- \`\`\`javascript
205
- // 购物车总价 - 错误示例
206
- let total = '0'
207
- cart.forEach(item => {
208
- total = calc(\`\${total} + \${item.price} * \${item.quantity}\`)
209
- })
210
- \`\`\`
211
- 问题:使用模板字符串拼接、forEach 累加,代码不清晰、性能差
212
-
213
- ✅ 正确写法(推荐):
214
- \`\`\`javascript
215
- // 购物车总价 - 使用 calc_sum
216
- const total = calc_sum("price * quantity | =2", cart)
217
-
218
- // 单个商品小计 - 直接传入对象(最优雅)
219
- const itemTotal = calc("price * quantity | =2", item)
220
- \`\`\`
221
- 优势:代码简洁、性能好、自动处理精度
222
-
223
- 🎯 最佳实践:
224
- - 对象已有所需字段 → 直接传入:calc("a + b", obj)
225
- - 需要多个独立变量 → 使用简写:calc("a + b", {a, b})
226
- - 避免冗余写法 → ❌ calc("a + b", {a: obj.a, b: obj.b})
227
-
228
- 快速示例:
153
+ 使用示例:
229
154
  - calc_sum("a + b", [{a:1,b:2}, {a:3,b:4}]) → "10"
230
- - calc_sum("price * qty", [{price:99.9,qty:2}, {price:49.9,qty:3}]) → "349.50"
231
- - calc_sum("price * qty * 0.9 | =2", orders) → 计算所有订单9折后总价
232
-
233
- 优势:
234
- - 自动处理精度问题
235
- - 支持复杂表达式
236
- - 支持格式化输出
237
- - 性能优于手动累加`,
155
+ - calc_sum("price * qty | =2", [{price:99.9,qty:2}, {price:49.9,qty:1}]) → "249.70"`,
238
156
  inputSchema: {
239
157
  type: "object",
240
158
  properties: {
@@ -379,24 +297,6 @@ const itemTotal = calc("price * quantity | =2", item)
379
297
  required: ["topic"],
380
298
  },
381
299
  },
382
- {
383
- name: "debug_info",
384
- description: `🔍 调试工具 - 获取 MCP 服务器的运行环境信息
385
-
386
- 返回信息:
387
- - cwd: 当前工作目录 (process.cwd())
388
- - __dirname: 脚本所在目录
389
- - __filename: 脚本文件路径
390
- - node_version: Node.js 版本
391
- - platform: 操作系统平台
392
- - env: 相关环境变量
393
-
394
- 用途:调试 MCP 服务器配置问题`,
395
- inputSchema: {
396
- type: "object",
397
- properties: {},
398
- },
399
- },
400
300
  ];
401
301
 
402
302
  // ==================== Resources 定义 ====================
@@ -760,27 +660,35 @@ calc("(age >= 18 && hasLicense) ? 'can drive' : 'cannot drive'", {
760
660
 
761
661
  ### 价格计算
762
662
  \`\`\`javascript
763
- // 含税价格 - 如果有 product 对象包含 price 和 taxRate
764
- const product = {price: 100, taxRate: 0.13}
765
- calc("price * (1 + taxRate) | =2", product) // "113.00"
766
-
767
- // 折扣价格 - 直接传入商品对象
768
- const item = {price: 199.9, discount: 0.8}
769
- calc("price * discount | =2", item) // "159.92"
770
-
771
- // 订单总价 - 直接传入订单对象
772
- const order = {price: 99.9, qty: 3, shipping: 15}
773
- calc("price * qty + shipping | =2,", order) // "314.70"
663
+ // 含税价格
664
+ calc("price * (1 + taxRate) | =2", {price: 100, taxRate: 0.13}) // "113.00"
665
+
666
+ // 折扣价格
667
+ calc("price * discount | =2", {price: 199.9, discount: 0.8}) // "159.92"
668
+
669
+ // 订单总价
670
+ calc("price * qty + shipping | =2,", {
671
+ price: 99.9,
672
+ qty: 3,
673
+ shipping: 15
674
+ }) // "314.70"
774
675
  \`\`\`
775
676
 
776
677
  ### 利率计算
777
678
  \`\`\`javascript
778
- // 单利 - 直接传入投资对象
779
- const investment = {principal: 10000, rate: 0.05, time: 2}
780
- calc("principal * rate * time | =2", investment) // "1000.00"
679
+ // 单利
680
+ calc("principal * rate * time | =2", {
681
+ principal: 10000,
682
+ rate: 0.05,
683
+ time: 2
684
+ }) // "1000.00"
781
685
 
782
686
  // 复利
783
- calc("principal * pow(1 + rate, time) - principal | =2", investment) // "1025.00"
687
+ calc("principal * pow(1 + rate, time) - principal | =2", {
688
+ principal: 10000,
689
+ rate: 0.05,
690
+ time: 2
691
+ }) // "1025.00"
784
692
  \`\`\`
785
693
 
786
694
  ## 电商场景
@@ -798,8 +706,7 @@ calc_sum("price * qty | =2", items) // "548.50"
798
706
 
799
707
  ### 优惠券计算
800
708
  \`\`\`javascript
801
- const cart = {total: 250}
802
- calc("total > 200 ? total * 0.9 : total | =2", cart) // "225.00"
709
+ calc("total > 200 ? total * 0.9 : total | =2", {total: 250}) // "225.00"
803
710
  \`\`\`
804
711
 
805
712
  ## 数据格式化
@@ -868,170 +775,6 @@ cmul(99.9, 3) // 单价 * 数量
868
775
  `
869
776
  };
870
777
 
871
- // ==================== Prompts 定义 ====================
872
-
873
- const PROMPTS = [
874
- {
875
- name: "a-calc",
876
- description: "强制在所有数值计算中使用 a-calc(推荐)",
877
- arguments: [],
878
- },
879
- ];
880
-
881
- const PROMPT_CONTENTS = {
882
- "a-calc": {
883
- messages: [
884
- {
885
- role: "user",
886
- content: {
887
- type: "text",
888
- text: `# 数值计算强制规则
889
-
890
- ⚠️ **重要:在本次对话中,所有数值计算必须使用 a-calc MCP 工具!**
891
-
892
- ## 强制使用场景
893
-
894
- ### 1. 任何涉及小数的运算(必须使用)
895
- - ✅ 使用 calc("0.1 + 0.2")
896
- - ❌ 不要直接计算 0.1 + 0.2
897
-
898
- ### 2. 价格和金额计算(必须使用)
899
- - ✅ 使用 calc("price * qty | =2", item) // 直接传入对象
900
- - ❌ 不要使用 JavaScript 的 * 运算符
901
-
902
- ### 3. 百分比和折扣计算(必须使用)
903
- - ✅ 使用 calc("price * 0.9 | =2", product) // 直接传入对象
904
- - ❌ 不要直接计算
905
-
906
- ### 4. 需要格式化的数值(必须使用)
907
- - ✅ 使用 fmt(1234567, ",") 或 calc("value | ,", data)
908
- - ❌ 不要使用 toLocaleString()
909
-
910
- ### 5. 批量数据计算(必须使用)
911
- - ✅ 使用 calc_sum("price * qty", items)
912
- - ❌ 不要使用 reduce() 或 forEach() 手动累加
913
-
914
- ## 可以不使用的场景
915
-
916
- 只有以下情况可以不使用 a-calc:
917
- - 简单的整数加减:1 + 1, 10 - 5
918
- - 数组长度、索引等非计算场景
919
-
920
- ## 为什么必须使用 a-calc?
921
-
922
- JavaScript 的浮点数精度问题:
923
- - 0.1 + 0.2 = 0.30000000000000004 ❌
924
- - 0.3 - 0.1 = 0.19999999999999998 ❌
925
- - 99.9 * 3 = 299.70000000000005 ❌
926
-
927
- 使用 a-calc 后:
928
- - calc("0.1 + 0.2") = "0.3" ✅
929
- - calc("0.3 - 0.1") = "0.2" ✅
930
- - calc("99.9 * 3") = "299.7" ✅
931
-
932
- ## 编码规范和最佳实践
933
-
934
- ### ❌ 错误写法 1:使用模板字符串拼接
935
- \`\`\`javascript
936
- // 不要这样写!
937
- let total = '0'
938
- cart.forEach(item => {
939
- total = calc(\`\${total} + \${item.price} * \${item.quantity}\`)
940
- })
941
- \`\`\`
942
- **问题**:代码不清晰、难以维护、性能差
943
-
944
- ### ❌ 错误写法 2:重复写字段名(冗余)
945
- \`\`\`javascript
946
- // 不要这样写!
947
- const itemTotal = calc("price * qty | =2", {
948
- price: item.price,
949
- qty: item.qty
950
- })
951
- \`\`\`
952
- **问题**:代码冗余、不简洁、重复劳动
953
-
954
- ### ✅ 正确写法 1:使用 calc_sum(批量计算)
955
- \`\`\`javascript
956
- const total = calc_sum("price * qty | =2", cart)
957
- \`\`\`
958
-
959
- ### ✅ 正确写法 2:直接传入对象(最优雅)
960
- \`\`\`javascript
961
- // 对象已有所需字段,直接传入
962
- const itemTotal = calc("price * qty | =2", item)
963
- \`\`\`
964
-
965
- ### ✅ 正确写法 3:使用变量简写
966
- \`\`\`javascript
967
- // 多个独立变量,使用简写
968
- const result = calc("a + b", {a, b})
969
- \`\`\`
970
-
971
- ### ✅ 正确写法 4:数组映射
972
- \`\`\`javascript
973
- // 对每个对象进行计算
974
- const results = items.map(item => calc("price * qty | =2", item))
975
- \`\`\`
976
-
977
- ### 完整示例:购物车计算
978
-
979
- \`\`\`javascript
980
- import { calc, calc_sum, fmt } from 'a-calc'
981
-
982
- // ❌ 错误:使用模板字符串累加
983
- const wrongTotal = () => {
984
- let total = '0'
985
- cart.forEach(item => {
986
- total = calc(\`\${total} + \${item.price} * \${item.quantity}\`)
987
- })
988
- return total
989
- }
990
-
991
- // ✅ 正确:使用 calc_sum
992
- const correctTotal = () => {
993
- return calc_sum("price * quantity | =2", cart)
994
- }
995
-
996
- // ✅ 正确:单个商品小计(直接传入 item 对象)
997
- const itemSubtotal = (item) => {
998
- return calc("price * quantity | =2", item)
999
- }
1000
-
1001
- // ✅ 正确:应用折扣(直接传入对象)
1002
- const applyDiscount = (order) => {
1003
- return calc("total * (1 - discountRate) | =2", order)
1004
- }
1005
-
1006
- // ✅ 正确:含税价格(直接传入对象)
1007
- const withTax = (order) => {
1008
- return calc("subtotal * (1 + taxRate) | =2", order)
1009
- }
1010
- \`\`\`
1011
-
1012
- ## 核心原则
1013
-
1014
- 1. **批量计算用 calc_sum** - 不要用 forEach 累加
1015
- 2. **变量用第二参数注入** - 不要用模板字符串拼接
1016
- 3. **保持表达式简洁** - 一次计算完成,不要分步累加
1017
- 4. **使用格式化** - 用 \`| =2\` 保留小数位
1018
-
1019
- ## 实施要求
1020
-
1021
- 在编写代码时:
1022
- 1. 遇到数值计算,立即考虑是否需要使用 a-calc
1023
- 2. 涉及小数、金额、价格的,必须使用 a-calc
1024
- 3. 优先使用 calc_sum 处理数组数据
1025
- 4. 使用第二参数注入变量,不要用模板字符串
1026
- 5. 在代码注释中说明为什么使用 a-calc
1027
-
1028
- 请确认你理解并将严格遵守这些规则。`,
1029
- },
1030
- },
1031
- ],
1032
- },
1033
- };
1034
-
1035
778
  // ==================== Server Setup ====================
1036
779
 
1037
780
  const server = new Server(
@@ -1043,7 +786,6 @@ const server = new Server(
1043
786
  capabilities: {
1044
787
  tools: {},
1045
788
  resources: {},
1046
- prompts: {},
1047
789
  },
1048
790
  }
1049
791
  );
@@ -1247,31 +989,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
1247
989
  };
1248
990
  }
1249
991
 
1250
- case "debug_info": {
1251
- const debugInfo = {
1252
- cwd: process.cwd(),
1253
- __dirname: import.meta.url,
1254
- node_version: process.version,
1255
- platform: process.platform,
1256
- arch: process.arch,
1257
- env: {
1258
- HOME: process.env.HOME,
1259
- USERPROFILE: process.env.USERPROFILE,
1260
- PATH: process.env.PATH?.split(process.platform === 'win32' ? ';' : ':').slice(0, 5).join('\n '),
1261
- NODE_ENV: process.env.NODE_ENV,
1262
- },
1263
- };
1264
-
1265
- return {
1266
- content: [
1267
- {
1268
- type: "text",
1269
- text: JSON.stringify(debugInfo, null, 2),
1270
- },
1271
- ],
1272
- };
1273
- }
1274
-
1275
992
  default:
1276
993
  throw new Error(`Unknown tool: ${name}`);
1277
994
  }
@@ -1315,22 +1032,6 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
1315
1032
  throw new Error(`Resource not found: ${uri}`);
1316
1033
  });
1317
1034
 
1318
- // ==================== Prompt Handlers ====================
1319
-
1320
- server.setRequestHandler(ListPromptsRequestSchema, async () => {
1321
- return { prompts: PROMPTS };
1322
- });
1323
-
1324
- server.setRequestHandler(GetPromptRequestSchema, async (request) => {
1325
- const { name } = request.params;
1326
-
1327
- if (PROMPT_CONTENTS[name]) {
1328
- return PROMPT_CONTENTS[name];
1329
- }
1330
-
1331
- throw new Error(`Prompt not found: ${name}`);
1332
- });
1333
-
1334
1035
  // ==================== Start Server ====================
1335
1036
 
1336
1037
  async function main() {
package/package.json CHANGED
@@ -1,132 +1,131 @@
1
1
  {
2
- "name": "a-calc",
3
- "version": "3.0.0-beta.20250123.11",
4
- "description": "A very powerful and easy-to-use number precision calculation and formatting library.",
5
- "main": "./cjs/index.js",
6
- "exports": {
7
- ".": {
8
- "types": "./calc.d.ts",
9
- "import": "./es/index.js",
10
- "require": "./cjs/index.js"
2
+ "name": "a-calc",
3
+ "version": "3.0.0-beta.20250123.2",
4
+ "description": "A very powerful and easy-to-use number precision calculation and formatting library.",
5
+ "main": "./cjs/index.js",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./calc.d.ts",
9
+ "import": "./es/index.js",
10
+ "require": "./cjs/index.js"
11
+ },
12
+ "./es": {
13
+ "types": "./calc.d.ts",
14
+ "import": "./es/index.js",
15
+ "default": "./es/index.js"
16
+ },
17
+ "./cjs": {
18
+ "types": "./calc.d.ts",
19
+ "require": "./cjs/index.js",
20
+ "default": "./cjs/index.js"
21
+ },
22
+ "./mcp-server/src/index.js": "./mcp-server/src/index.js"
11
23
  },
12
- "./es": {
13
- "types": "./calc.d.ts",
14
- "import": "./es/index.js",
15
- "default": "./es/index.js"
24
+ "browser": "browser/index.js",
25
+ "module": "es/index.js",
26
+ "types": "calc.d.ts",
27
+ "typings": "calc.d.ts",
28
+ "scripts": {
29
+ "dev": "rollup -c --environment build:dev",
30
+ "dev:w": "rollup -c -w --environment build:dev",
31
+ "build": "run-p gen:version build-test",
32
+ "build-test": "rollup -c --environment build:build & npm run test",
33
+ "build-only": "rollup -c --environment build:build",
34
+ "build:w": "rollup -c -w --environment build:build",
35
+ "build:docs": "pnpm install --frozen-lockfile=false && vitepress build docs",
36
+ "test": "vitest run",
37
+ "test:type": "tsc --noEmit type-check.ts",
38
+ "gen:version": "node gen_version_info.cjs",
39
+ "docs:dev": "vitepress dev docs",
40
+ "docs:build": "vitepress build docs",
41
+ "docs:preview": "vitepress preview docs"
16
42
  },
17
- "./cjs": {
18
- "types": "./calc.d.ts",
19
- "require": "./cjs/index.js",
20
- "default": "./cjs/index.js"
43
+ "bin": {
44
+ "a-calc-mcp": "./mcp-server/src/index.js"
21
45
  },
22
- "./mcp-server/src/index.js": "./mcp-server/src/index.js"
23
- },
24
- "browser": "browser/index.js",
25
- "module": "es/index.js",
26
- "types": "calc.d.ts",
27
- "typings": "calc.d.ts",
28
- "bin": {
29
- "a-calc-mcp": "./mcp-server/src/index.js"
30
- },
31
- "files": [
32
- "es",
33
- "cjs",
34
- "browser",
35
- "calc.d.ts",
36
- "a-calc.versions.js",
37
- "mcp-server/src",
38
- "mcp-server/package.json",
39
- "mcp-server/README.md"
40
- ],
41
- "repository": {
42
- "type": "git",
43
- "url": "git+https://github.com/Autumn-one/a-calc-old.git"
44
- },
45
- "keywords": [
46
- "decimal",
47
- "math",
48
- "expression",
49
- "evaluator",
50
- "arbitrary",
51
- "precision",
52
- "arithmetic",
53
- "big",
54
- "number",
55
- "parser",
56
- "float",
57
- "biginteger",
58
- "bigdecimal",
59
- "bignumber",
60
- "bigint",
61
- "bignum",
62
- "a-calc",
63
- "四则运算",
64
- "数学",
65
- "运算",
66
- "浮点数",
67
- "精度",
68
- "金融计算"
69
- ],
70
- "author": "Autumn",
71
- "bugs": {
72
- "url": "https://github.com/Autumn-one/a-calc-old/issues"
73
- },
74
- "homepage": "https://github.com/Autumn-one/a-calc-old#readme",
75
- "devDependencies": {
76
- "@babel/core": "^7.21.4",
77
- "@babel/preset-env": "^7.21.4",
78
- "@codemirror/commands": "^6.10.1",
79
- "@codemirror/lang-javascript": "^6.2.4",
80
- "@codemirror/language": "^6.12.1",
81
- "@codemirror/state": "^6.5.3",
82
- "@codemirror/theme-one-dark": "^6.1.3",
83
- "@codemirror/view": "^6.39.8",
84
- "@rollup/plugin-babel": "^6.0.4",
85
- "@rollup/plugin-commonjs": "^25.0.7",
86
- "@rollup/plugin-json": "^6.0.1",
87
- "@rollup/plugin-node-resolve": "^15.2.3",
88
- "@rollup/plugin-terser": "^0.4.4",
89
- "@vitest/coverage-v8": "^2.1.9",
90
- "a-calc": "^2.2.15",
91
- "benchmark": "^2.1.4",
92
- "bignumber.js": "^9.3.1",
93
- "codemirror": "^6.0.2",
94
- "cross-env": "^7.0.3",
95
- "decimal.js": "^10.6.0",
96
- "fast-deep-equal": "^3.1.3",
97
- "glob": "^8.1.0",
98
- "husky": "^9.1.7",
99
- "json-stringify-safe": "^5.0.1",
100
- "lodash-es": "^4.17.21",
101
- "math-expression-evaluator": "^2.0.7",
102
- "mathjs": "^15.1.0",
103
- "npm-run-all": "^4.1.5",
104
- "rollup": "^4.6.0",
105
- "rollup-plugin-livereload": "^2.0.5",
106
- "rollup-plugin-serve": "^1.1.0",
107
- "typescript": "^5.1.6",
108
- "vitepress": "^1.6.4",
109
- "vitest": "^2.1.0",
110
- "vue": "^3.5.25",
111
- "@uiw/codemirror-themes-all": "^4.25.4"
112
- },
113
- "dependencies": {
114
- "typescript-treasure": "0.0.9",
115
- "@modelcontextprotocol/sdk": "^1.0.0"
116
- },
117
- "scripts": {
118
- "dev": "rollup -c --environment build:dev",
119
- "dev:w": "rollup -c -w --environment build:dev",
120
- "build": "run-p gen:version build-test",
121
- "build-test": "rollup -c --environment build:build & npm run test",
122
- "build-only": "rollup -c --environment build:build",
123
- "build:w": "rollup -c -w --environment build:build",
124
- "build:docs": "pnpm install --frozen-lockfile=false && vitepress build docs",
125
- "test": "vitest run",
126
- "test:type": "tsc --noEmit type-check.ts",
127
- "gen:version": "node gen_version_info.cjs",
128
- "docs:dev": "vitepress dev docs",
129
- "docs:build": "vitepress build docs",
130
- "docs:preview": "vitepress preview docs"
131
- }
46
+ "files": [
47
+ "es",
48
+ "cjs",
49
+ "browser",
50
+ "calc.d.ts",
51
+ "a-calc.versions.js",
52
+ "mcp-server/src",
53
+ "mcp-server/package.json",
54
+ "mcp-server/README.md"
55
+ ],
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/Autumn-one/a-calc-old.git"
59
+ },
60
+ "keywords": [
61
+ "decimal",
62
+ "math",
63
+ "expression",
64
+ "evaluator",
65
+ "arbitrary",
66
+ "precision",
67
+ "arithmetic",
68
+ "big",
69
+ "number",
70
+ "parser",
71
+ "float",
72
+ "biginteger",
73
+ "bigdecimal",
74
+ "bignumber",
75
+ "bigint",
76
+ "bignum",
77
+ "a-calc",
78
+ "四则运算",
79
+ "数学",
80
+ "运算",
81
+ "浮点数",
82
+ "精度",
83
+ "金融计算"
84
+ ],
85
+ "author": "Autumn",
86
+ "bugs": {
87
+ "url": "https://github.com/Autumn-one/a-calc-old/issues"
88
+ },
89
+ "homepage": "https://github.com/Autumn-one/a-calc-old#readme",
90
+ "devDependencies": {
91
+ "@babel/core": "^7.21.4",
92
+ "@babel/preset-env": "^7.21.4",
93
+ "@codemirror/commands": "^6.10.1",
94
+ "@codemirror/lang-javascript": "^6.2.4",
95
+ "@codemirror/language": "^6.12.1",
96
+ "@codemirror/state": "^6.5.3",
97
+ "@codemirror/theme-one-dark": "^6.1.3",
98
+ "@codemirror/view": "^6.39.8",
99
+ "@rollup/plugin-babel": "^6.0.4",
100
+ "@rollup/plugin-commonjs": "^25.0.7",
101
+ "@rollup/plugin-json": "^6.0.1",
102
+ "@rollup/plugin-node-resolve": "^15.2.3",
103
+ "@rollup/plugin-terser": "^0.4.4",
104
+ "@vitest/coverage-v8": "^2.1.9",
105
+ "a-calc": "^2.2.15",
106
+ "benchmark": "^2.1.4",
107
+ "bignumber.js": "^9.3.1",
108
+ "codemirror": "^6.0.2",
109
+ "cross-env": "^7.0.3",
110
+ "decimal.js": "^10.6.0",
111
+ "fast-deep-equal": "^3.1.3",
112
+ "glob": "^8.1.0",
113
+ "husky": "^9.1.7",
114
+ "json-stringify-safe": "^5.0.1",
115
+ "lodash-es": "^4.17.21",
116
+ "math-expression-evaluator": "^2.0.7",
117
+ "mathjs": "^15.1.0",
118
+ "npm-run-all": "^4.1.5",
119
+ "rollup": "^4.6.0",
120
+ "rollup-plugin-livereload": "^2.0.5",
121
+ "rollup-plugin-serve": "^1.1.0",
122
+ "typescript": "^5.1.6",
123
+ "vitepress": "^1.6.4",
124
+ "vitest": "^2.1.0",
125
+ "vue": "^3.5.25",
126
+ "@uiw/codemirror-themes-all": "^4.25.4"
127
+ },
128
+ "dependencies": {
129
+ "typescript-treasure": "0.0.9"
130
+ }
132
131
  }