Files
ruo-shan-cloud-pharmacy/miniprogram/package-live/volc-mini-sdk/utils/utils.js
T
陈誉午 994b267f5c feat: 电子药箱小程序 - 4Tab药品管理
- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡
- 药品百科: 搜索 + 分类筛选 + 20种药品静态数据
- 惠教中心: 4条药品使用指南课程
- 我的: 家庭成员信息管理
- 自定义TabBar + navigation-bar组件
- SVG药品分类插图
2026-07-29 11:20:52 +08:00

1 line
20 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}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 _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}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 _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var a=t&&t.prototype instanceof p?t:p,i=Object.create(a.prototype),u=new w(o||[]);return n(i,"_invoke",{value:E(e,r,u)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function d(){}function v(){}var y={};c(y,a,function(){return this});var h=Object.getPrototypeOf,m=h&&h(h(I([])));m&&m!==t&&r.call(m,a)&&(y=m);var g=v.prototype=p.prototype=Object.create(y);function x(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function b(e,t){function o(n,a,i,u){var c=s(e[n],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==_typeof(f)&&r.call(f,"__await")?t.resolve(f.__await).then(function(e){o("next",e,i,u)},function(e){o("throw",e,i,u)}):t.resolve(f).then(function(e){l.value=e,i(l)},function(e){return o("throw",e,i,u)})}u(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t(function(t,n){o(e,r,t,n)})}return a=a?a.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=_(i,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=s(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=v,n(g,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:d,configurable:!0}),d.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,u,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},x(b.prototype),c(b.prototype,i,function(){return this}),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},x(g),c(g,u,"Generator"),c(g,a,function(){return this}),c(g,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=I,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,u,"next",e)}function u(e){asyncGeneratorStep(a,n,o,i,u,"throw",e)}i(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&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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,i=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.waitNumSeconds=exports.toSafeInt=exports.setDataIfChanged=exports.scaleNumberBySystemFont=exports.safeDecodeURIComponent=exports.resolveDevicePerformanceLevel=exports.parseTextWithLinks=exports.omitUndefined=exports.normalizePullUrl=exports.normalizeArrayResult=exports.isWeakNetwork=exports.isSmallPlainDataEqual=exports.isPlainObject=exports.isHighPerformanceDevice=exports.hexToRGBA=exports.getValueByPath=exports.getDevicePerformanceProfile=exports.getCurrentLoopVideoProgram=exports.getChangedPatch=exports.getBySplit=exports.default=exports.deepGet=exports.compareVersion=exports.DEVICE_PERFORMANCE_LEVEL=void 0;var isString=function(e){return"string"==typeof e},isObj=function(e){return"[object Object]"===Object.prototype.toString.call(e)},isPlainObject=isObj;exports.isPlainObject=isPlainObject;var deepGet=function(e,t){if(e&&"string"==typeof t&&t){for(var r=e,n=t.split("."),o=0;o<n.length;o+=1){if(null==r)return;r=r[n[o]]}return r}};exports.deepGet=deepGet;var omitUndefined=function(e){if(!e||"object"!==_typeof(e))return{};var t={};return Object.keys(e).forEach(function(r){void 0!==e[r]&&(t[r]=e[r])}),t};exports.omitUndefined=omitUndefined;var getValueByPath=function(e,t){for(var r=t.replace(/\[(\d+)\]/g,".$1").split("."),n=e,o=0;o<r.length;o+=1){if(null==n)return;n=n[r[o]]}return n};exports.getValueByPath=getValueByPath;var getChangedPatch=function(e,t){var r={};return Object.keys(t||{}).forEach(function(n){var o=n.includes(".")||n.includes("[")?getValueByPath(e,n):null==e?void 0:e[n];Object.is(o,t[n])||(r[n]=t[n])}),r};exports.getChangedPatch=getChangedPatch;var setDataIfChanged=function(e,t,r){var n=getChangedPatch((null==e?void 0:e.data)||{},t||{});return 0!==Object.keys(n).length&&(e.setData(n,r),!0)};exports.setDataIfChanged=setDataIfChanged;var stringifySmallPlainData=function(e){try{return JSON.stringify(e)}catch(e){return""}},isSmallPlainDataEqual=function(e,t){return stringifySmallPlainData(e)===stringifySmallPlainData(t)};exports.isSmallPlainDataEqual=isSmallPlainDataEqual;var normalizeArrayResult=function(e){if(Array.isArray(e))return e;if(!e||"object"!==_typeof(e))return[];var t=Object.keys(e).filter(function(e){return/^\d+$/.test(e)}).sort(function(e,t){return Number(e)-Number(t)});return t.length?t.map(function(t){return e[t]}):[]};exports.normalizeArrayResult=normalizeArrayResult;var normalizePullUrl=function(e){return"string"==typeof e&&e?e.startsWith("http://")||e.startsWith("https://")||e.startsWith("rtmp://")?e:e.startsWith("//")?"https:"+e:e:""};exports.normalizePullUrl=normalizePullUrl;var toSafeInt=function(e,t){var r=Number(e);return Number.isFinite(r)?r:t};exports.toSafeInt=toSafeInt;var parseVersionSegments=function(e){if("string"!=typeof e)return null;var t=e.trim(),r=t.split("-")[0].match(/^(\d+)\.(\d+)\.(\d+)$/)||t.match(/(\d+)\.(\d+)\.(\d+)/);return r?[Number(r[1]),Number(r[2]),Number(r[3])]:null},compareVersion=function(e,t){var r=parseVersionSegments(e),n=parseVersionSegments(t);if(!r||!n)return null;for(var o=0;o<3;o+=1){if(r[o]>n[o])return 1;if(r[o]<n[o])return-1}return 0};exports.compareVersion=compareVersion;var DEVICE_PERFORMANCE_LEVEL={HIGH:"high",MIDDLE:"middle",LOW:"low",UNKNOWN:"unknown"};exports.DEVICE_PERFORMANCE_LEVEL=DEVICE_PERFORMANCE_LEVEL;var HIGH_DEVICE_BENCHMARK_LEVEL=30,MIDDLE_DEVICE_BENCHMARK_LEVEL=20,resolveDevicePerformanceLevel=function(e){var t=Number(e);return!Number.isFinite(t)||t<0?DEVICE_PERFORMANCE_LEVEL.UNKNOWN:t>=HIGH_DEVICE_BENCHMARK_LEVEL?DEVICE_PERFORMANCE_LEVEL.HIGH:t>=MIDDLE_DEVICE_BENCHMARK_LEVEL?DEVICE_PERFORMANCE_LEVEL.MIDDLE:DEVICE_PERFORMANCE_LEVEL.LOW};exports.resolveDevicePerformanceLevel=resolveDevicePerformanceLevel;var getDevicePerformanceProfile=function(){var e,t,r,n,o,a,i,u,c=null;try{var l,s,f;"function"==typeof(null===(l=wx)||void 0===l?void 0:l.getDeviceBenchmarkInfo)&&(u=wx.getDeviceBenchmarkInfo()),"number"!=typeof u&&"function"==typeof(null===(s=wx)||void 0===s?void 0:s.getDeviceInfo)?c=wx.getDeviceInfo():"number"!=typeof u&&"function"==typeof(null===(f=wx)||void 0===f?void 0:f.getSystemInfoSync)&&(c=wx.getSystemInfoSync())}catch(e){}var p=Number(null===(e=c)||void 0===e?void 0:e.benchmarkLevel),d=Number.isFinite(Number(u))?Number(u):Number.isFinite(p)?p:-1,v=resolveDevicePerformanceLevel(d);return omitUndefined({brand:null===(t=c)||void 0===t?void 0:t.brand,model:null===(r=c)||void 0===r?void 0:r.model,platform:null===(n=c)||void 0===n?void 0:n.platform,system:null===(o=c)||void 0===o?void 0:o.system,abi:null===(a=c)||void 0===a?void 0:a.abi,deviceAbi:null===(i=c)||void 0===i?void 0:i.deviceAbi,benchmarkLevel:d,performanceLevel:v})};exports.getDevicePerformanceProfile=getDevicePerformanceProfile;var isHighPerformanceDevice=function(e){return(null==e?void 0:e.performanceLevel)===DEVICE_PERFORMANCE_LEVEL.HIGH};exports.isHighPerformanceDevice=isHighPerformanceDevice;var isWeakNetwork=function(e){if(!e)return!1;if(!0===e.weakNet)return!0;var t=e.networkType;return"2g"===t||"3g"===t||"none"===t};exports.isWeakNetwork=isWeakNetwork;var safeDecodeURIComponent=function(e){if("string"!=typeof e||!e)return e;try{return decodeURIComponent(e)}catch(t){return e}};exports.safeDecodeURIComponent=safeDecodeURIComponent;var getDefaultUniqueId=function(){var e="volcmini_live_unique_id",t="".concat(Date.now()).concat(Math.random().toString().slice(2,5));try{var r=wx.getStorageSync(e);return r||(wx.setStorage({key:e,data:t}),r=t),r}catch(e){return console.error(e.message),t||""}},setJwtToken=function(e,t,r){var n="VOLCMINILive-".concat(r);e&&1===t&&wx.setStorage({key:n,data:JSON.stringify({time:(new Date).getTime(),token:e})})},getJwtToken=function(e){var t="",r="VOLCMINILive-".concat(e);try{var n=wx.getStorageSync(r),o=JSON.parse(n||"{}");o.time&&(new Date).getTime()-o.time<130464e4?t=o.token:wx.removeStorageSync({key:r})}catch(e){console.error("error",e)}return t},hexToRGBA=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ff",r=/^#?([a-fA-F\d]{2})([a-fA-F\d]{2})([a-fA-F\d]{2})$/i.exec(e),n=e.includes("#")&&e.length<=4;n&&(r=/^#?([a-fA-F\d]{1})([a-fA-F\d]{1})([a-fA-F\d]{1})$/i.exec(e));var o=("0x".concat(t)/255).toFixed(2);if(null==r)return"rgba(255, 255, 255, ".concat(o,")");var a=r.map(function(e){return n?parseInt("".concat(e).concat(e),16):parseInt(e,16)}),i=a[1],u=a[2],c=a[3];return t?"rgba(".concat(i,", ").concat(u,", ").concat(c,", ").concat(o,")"):"rgb(".concat(i,", ").concat(u,", ").concat(c,")")};exports.hexToRGBA=hexToRGBA;var getValidStr=function(e){var t,r=_createForOfIteratorHelper(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n&&n.length>0)return n}}catch(e){r.e(e)}finally{r.f()}return""},getBySplit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)return"";var t=e.split(/\||/);return getValidStr([t[0],t[-1],t[0],e])};exports.getBySplit=getBySplit;var HTTP_LINK_REG=/https?:\/\/(?:(?!https?:\/\/)[a-zA-Z]|[0-9]|[$\-_@.&+/]|[?!*(),=]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/g,parseTextWithLinks=function(){var e,t=String((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||""),r=[],n=0;for(HTTP_LINK_REG.lastIndex=0;e=HTTP_LINK_REG.exec(t);){var o=e[0];e.index>n&&r.push({type:"text",text:t.slice(n,e.index)}),r.push({type:"link",text:o,url:o}),n=e.index+o.length}return n<t.length&&r.push({type:"text",text:t.slice(n)}),r.length?r:[{type:"text",text:t}]};exports.parseTextWithLinks=parseTextWithLinks;var getCurrentLoopVideoProgram=function(e,t){var r,n,o,a,i=Array.isArray(null==e?void 0:e.LoopVideoMsg)?e.LoopVideoMsg:[];if(!i.length)return null;var u=(null==t||null===(r=t[0])||void 0===r?void 0:r.LineId)||(null==e||null===(n=e.VodLoopVideoConfig)||void 0===n||null===(o=n.LineConfigs)||void 0===o||null===(a=o[0])||void 0===a?void 0:a.LineId);return i.find(function(e){return(null==e?void 0:e.LineId)===u})||null};exports.getCurrentLoopVideoProgram=getCurrentLoopVideoProgram;var waitNumSeconds=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(e){return setTimeout(e,t)});case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();exports.waitNumSeconds=waitNumSeconds;var SYSTEM_FONT_BASE_PX=16,SYSTEM_FONT_SCALE_FACTOR=.5,SYSTEM_FONT_SKIP_FUNCTIONS=["calc","var","env","constant","clamp","min","max"],SYSTEM_FONT_SKIP_KEYWORDS=["auto"],shouldSkipSystemFontValue=function(e){var t="".concat(e||"").trim();if(!t)return!0;var r=t.toLowerCase();if(SYSTEM_FONT_SKIP_KEYWORDS.includes(r))return!0;if(SYSTEM_FONT_SKIP_FUNCTIONS.some(function(e){return r.includes("".concat(e,"("))}))return!0;var n=t.match(/^(-?\d*\.?\d+)([a-z%]+)$/i);if(!n)return!1;var o=_slicedToArray(n,3),a=o[1],i=o[2];return 0===Number(a)||"%"===i},buildSystemFontCalcValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SYSTEM_FONT_SCALE_FACTOR;return"calc(".concat(e.trim()," + ").concat(t," * (1rem - ").concat(SYSTEM_FONT_BASE_PX,"px))")},scaleNumberBySystemFont=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SYSTEM_FONT_SCALE_FACTOR;if(null==e||""===e)return"";var n="".concat(e).concat(t);return shouldSkipSystemFontValue(n)?n:buildSystemFontCalcValue(n,r)};exports.scaleNumberBySystemFont=scaleNumberBySystemFont;var generateUUID=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)})};function deepCopy(e){if("object"!==_typeof(e)||null===e)return e;var t={};return Object.keys(e).forEach(function(r){var n=e[r];"object"!==_typeof(n)||null===n?t[r]=n:Array.isArray(n)?t[r]=_toConsumableArray(n):n instanceof Set?t[r]=new Set(_toConsumableArray(n)):n instanceof Map?t[r]=new Map(_toConsumableArray(n)):t[r]=deepCopy(n)}),t}var _default={isString:isString,isObj:isObj,omitUndefined:omitUndefined,getValueByPath:getValueByPath,getChangedPatch:getChangedPatch,setDataIfChanged:setDataIfChanged,normalizePullUrl:normalizePullUrl,toSafeInt:toSafeInt,compareVersion:compareVersion,isWeakNetwork:isWeakNetwork,getCurrentLoopVideoProgram:getCurrentLoopVideoProgram,safeDecodeURIComponent:safeDecodeURIComponent,getDefaultUniqueId:getDefaultUniqueId,setJwtToken:setJwtToken,getJwtToken:getJwtToken,hexToRGBA:hexToRGBA,scaleNumberBySystemFont:scaleNumberBySystemFont,generateUUID:generateUUID,deepCopy:deepCopy};exports.default=_default;