@careevolution/mydatahelps-ui 3.6.1-SurveyAnswerLog.1 → 3.6.1-SurveyAnswerLog.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/dist/esm/index.js +42 -34
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -41825,46 +41825,54 @@ const coerce$2 = (version, options) => {
|
|
|
41825
41825
|
};
|
|
41826
41826
|
var coerce_1 = coerce$2;
|
|
41827
41827
|
|
|
41828
|
-
|
|
41829
|
-
|
|
41830
|
-
|
|
41831
|
-
|
|
41832
|
-
|
|
41828
|
+
var lrucache;
|
|
41829
|
+
var hasRequiredLrucache;
|
|
41830
|
+
|
|
41831
|
+
function requireLrucache () {
|
|
41832
|
+
if (hasRequiredLrucache) return lrucache;
|
|
41833
|
+
hasRequiredLrucache = 1;
|
|
41834
|
+
class LRUCache {
|
|
41835
|
+
constructor () {
|
|
41836
|
+
this.max = 1000;
|
|
41837
|
+
this.map = new Map();
|
|
41838
|
+
}
|
|
41833
41839
|
|
|
41834
|
-
|
|
41835
|
-
|
|
41836
|
-
|
|
41837
|
-
|
|
41838
|
-
|
|
41839
|
-
|
|
41840
|
-
|
|
41841
|
-
|
|
41842
|
-
|
|
41843
|
-
|
|
41844
|
-
|
|
41840
|
+
get (key) {
|
|
41841
|
+
const value = this.map.get(key);
|
|
41842
|
+
if (value === undefined) {
|
|
41843
|
+
return undefined
|
|
41844
|
+
} else {
|
|
41845
|
+
// Remove the key from the map and add it to the end
|
|
41846
|
+
this.map.delete(key);
|
|
41847
|
+
this.map.set(key, value);
|
|
41848
|
+
return value
|
|
41849
|
+
}
|
|
41850
|
+
}
|
|
41845
41851
|
|
|
41846
|
-
|
|
41847
|
-
|
|
41848
|
-
|
|
41852
|
+
delete (key) {
|
|
41853
|
+
return this.map.delete(key)
|
|
41854
|
+
}
|
|
41849
41855
|
|
|
41850
|
-
|
|
41851
|
-
|
|
41856
|
+
set (key, value) {
|
|
41857
|
+
const deleted = this.delete(key);
|
|
41852
41858
|
|
|
41853
|
-
|
|
41854
|
-
|
|
41855
|
-
|
|
41856
|
-
|
|
41857
|
-
|
|
41858
|
-
|
|
41859
|
+
if (!deleted && value !== undefined) {
|
|
41860
|
+
// If cache is full, delete the least recently used item
|
|
41861
|
+
if (this.map.size >= this.max) {
|
|
41862
|
+
const firstKey = this.map.keys().next().value;
|
|
41863
|
+
this.delete(firstKey);
|
|
41864
|
+
}
|
|
41859
41865
|
|
|
41860
|
-
|
|
41861
|
-
|
|
41866
|
+
this.map.set(key, value);
|
|
41867
|
+
}
|
|
41862
41868
|
|
|
41863
|
-
|
|
41864
|
-
|
|
41865
|
-
}
|
|
41869
|
+
return this
|
|
41870
|
+
}
|
|
41871
|
+
}
|
|
41866
41872
|
|
|
41867
|
-
|
|
41873
|
+
lrucache = LRUCache;
|
|
41874
|
+
return lrucache;
|
|
41875
|
+
}
|
|
41868
41876
|
|
|
41869
41877
|
var range$4;
|
|
41870
41878
|
var hasRequiredRange;
|
|
@@ -42086,7 +42094,7 @@ function requireRange () {
|
|
|
42086
42094
|
|
|
42087
42095
|
range$4 = Range;
|
|
42088
42096
|
|
|
42089
|
-
const LRU =
|
|
42097
|
+
const LRU = requireLrucache();
|
|
42090
42098
|
const cache = new LRU();
|
|
42091
42099
|
|
|
42092
42100
|
const parseOptions = parseOptions_1;
|