@measured/puck-plugin-heading-analyzer 0.14.2-canary.dc93789 → 0.14.2-canary.e529e85
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/index.js +3061 -186
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -62,6 +62,60 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
62
62
|
mod
|
63
63
|
));
|
64
64
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
65
|
+
var __publicField = (obj, key, value) => {
|
66
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
67
|
+
return value;
|
68
|
+
};
|
69
|
+
var __accessCheck = (obj, member, msg) => {
|
70
|
+
if (!member.has(obj))
|
71
|
+
throw TypeError("Cannot " + msg);
|
72
|
+
};
|
73
|
+
var __privateGet = (obj, member, getter) => {
|
74
|
+
__accessCheck(obj, member, "read from private field");
|
75
|
+
return getter ? getter.call(obj) : member.get(obj);
|
76
|
+
};
|
77
|
+
var __privateAdd = (obj, member, value) => {
|
78
|
+
if (member.has(obj))
|
79
|
+
throw TypeError("Cannot add the same private member more than once");
|
80
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
81
|
+
};
|
82
|
+
var __privateSet = (obj, member, value, setter) => {
|
83
|
+
__accessCheck(obj, member, "write to private field");
|
84
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
85
|
+
return value;
|
86
|
+
};
|
87
|
+
var __privateWrapper = (obj, member, setter, getter) => ({
|
88
|
+
set _(value) {
|
89
|
+
__privateSet(obj, member, value, setter);
|
90
|
+
},
|
91
|
+
get _() {
|
92
|
+
return __privateGet(obj, member, getter);
|
93
|
+
}
|
94
|
+
});
|
95
|
+
var __privateMethod = (obj, member, method) => {
|
96
|
+
__accessCheck(obj, member, "access private method");
|
97
|
+
return method;
|
98
|
+
};
|
99
|
+
var __async = (__this, __arguments, generator) => {
|
100
|
+
return new Promise((resolve, reject) => {
|
101
|
+
var fulfilled = (value) => {
|
102
|
+
try {
|
103
|
+
step(generator.next(value));
|
104
|
+
} catch (e2) {
|
105
|
+
reject(e2);
|
106
|
+
}
|
107
|
+
};
|
108
|
+
var rejected = (value) => {
|
109
|
+
try {
|
110
|
+
step(generator.throw(value));
|
111
|
+
} catch (e2) {
|
112
|
+
reject(e2);
|
113
|
+
}
|
114
|
+
};
|
115
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
116
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
117
|
+
});
|
118
|
+
};
|
65
119
|
|
66
120
|
// ../tsup-config/react-import.js
|
67
121
|
var import_react;
|
@@ -198,8 +252,8 @@ var init_colors = __esm({
|
|
198
252
|
});
|
199
253
|
|
200
254
|
// ../../node_modules/react-spinners/esm/BarLoader.js
|
201
|
-
function BarLoader(
|
202
|
-
var _b =
|
255
|
+
function BarLoader(_a3) {
|
256
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.height, height = _f === void 0 ? 4 : _f, _g = _a3.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width"]);
|
203
257
|
var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(width), height: cssValue(height), overflow: "hidden", backgroundColor: calculateRgba(color, 0.2), backgroundClip: "padding-box" }, cssOverride);
|
204
258
|
var style2 = function(i2) {
|
205
259
|
return {
|
@@ -264,8 +318,8 @@ var init_BarLoader = __esm({
|
|
264
318
|
});
|
265
319
|
|
266
320
|
// ../../node_modules/react-spinners/esm/BeatLoader.js
|
267
|
-
function BeatLoader(
|
268
|
-
var _b =
|
321
|
+
function BeatLoader(_a3) {
|
322
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest2(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
|
269
323
|
var wrapper = __assign2({ display: "inherit" }, cssOverride);
|
270
324
|
var style2 = function(i2) {
|
271
325
|
return {
|
@@ -327,8 +381,8 @@ var init_BeatLoader = __esm({
|
|
327
381
|
});
|
328
382
|
|
329
383
|
// ../../node_modules/react-spinners/esm/BounceLoader.js
|
330
|
-
function BounceLoader(
|
331
|
-
var _b =
|
384
|
+
function BounceLoader(_a3) {
|
385
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest3(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
332
386
|
var style2 = function(i2) {
|
333
387
|
var animationTiming = i2 === 1 ? "".concat(1 / speedMultiplier, "s") : "0s";
|
334
388
|
return {
|
@@ -392,11 +446,11 @@ var init_BounceLoader = __esm({
|
|
392
446
|
});
|
393
447
|
|
394
448
|
// ../../node_modules/react-spinners/esm/CircleLoader.js
|
395
|
-
function CircleLoader(
|
396
|
-
var _b =
|
449
|
+
function CircleLoader(_a3) {
|
450
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest4(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
397
451
|
var wrapper = __assign4({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size) }, cssOverride);
|
398
452
|
var style2 = function(i2) {
|
399
|
-
var
|
453
|
+
var _a4 = parseLengthAndUnit(size), value = _a4.value, unit = _a4.unit;
|
400
454
|
return {
|
401
455
|
position: "absolute",
|
402
456
|
height: "".concat(value * (1 - i2 / 10)).concat(unit),
|
@@ -462,8 +516,8 @@ var init_CircleLoader = __esm({
|
|
462
516
|
});
|
463
517
|
|
464
518
|
// ../../node_modules/react-spinners/esm/ClimbingBoxLoader.js
|
465
|
-
function ClimbingBoxLoader(
|
466
|
-
var _b =
|
519
|
+
function ClimbingBoxLoader(_a3) {
|
520
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest5(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
467
521
|
var container = __assign5({ display: "inherit", position: "relative", width: "7.1em", height: "7.1em" }, cssOverride);
|
468
522
|
var wrapper = {
|
469
523
|
position: "absolute",
|
@@ -548,8 +602,8 @@ var init_ClimbingBoxLoader = __esm({
|
|
548
602
|
});
|
549
603
|
|
550
604
|
// ../../node_modules/react-spinners/esm/ClipLoader.js
|
551
|
-
function ClipLoader(
|
552
|
-
var _b =
|
605
|
+
function ClipLoader(_a3) {
|
606
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest6(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
553
607
|
var style2 = __assign6({ background: "transparent !important", width: cssValue(size), height: cssValue(size), borderRadius: "100%", border: "2px solid", borderTopColor: color, borderBottomColor: "transparent", borderLeftColor: color, borderRightColor: color, display: "inline-block", animation: "".concat(clip, " ").concat(0.75 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "both" }, cssOverride);
|
554
608
|
if (!loading) {
|
555
609
|
return null;
|
@@ -593,8 +647,8 @@ var init_ClipLoader = __esm({
|
|
593
647
|
});
|
594
648
|
|
595
649
|
// ../../node_modules/react-spinners/esm/ClockLoader.js
|
596
|
-
function ClockLoader(
|
597
|
-
var _b =
|
650
|
+
function ClockLoader(_a3) {
|
651
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest7(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
598
652
|
var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
|
599
653
|
var wrapper = __assign7({ display: "inherit", position: "relative", width: "".concat(value).concat(unit), height: "".concat(value).concat(unit), backgroundColor: "transparent", boxShadow: "inset 0px 0px 0px 2px ".concat(color), borderRadius: "50%" }, cssOverride);
|
600
654
|
var minute = {
|
@@ -664,11 +718,11 @@ var init_ClockLoader = __esm({
|
|
664
718
|
});
|
665
719
|
|
666
720
|
// ../../node_modules/react-spinners/esm/DotLoader.js
|
667
|
-
function DotLoader(
|
668
|
-
var _b =
|
721
|
+
function DotLoader(_a3) {
|
722
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest8(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
669
723
|
var wrapper = __assign8({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size), animationFillMode: "forwards", animation: "".concat(rotate2, " ").concat(2 / speedMultiplier, "s 0s infinite linear") }, cssOverride);
|
670
724
|
var style2 = function(i2) {
|
671
|
-
var
|
725
|
+
var _a4 = parseLengthAndUnit(size), value = _a4.value, unit = _a4.unit;
|
672
726
|
return {
|
673
727
|
position: "absolute",
|
674
728
|
top: i2 % 2 ? "0" : "auto",
|
@@ -729,8 +783,8 @@ var init_DotLoader = __esm({
|
|
729
783
|
});
|
730
784
|
|
731
785
|
// ../../node_modules/react-spinners/esm/FadeLoader.js
|
732
|
-
function FadeLoader(
|
733
|
-
var _b =
|
786
|
+
function FadeLoader(_a3) {
|
787
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.height, height = _f === void 0 ? 15 : _f, _g = _a3.width, width = _g === void 0 ? 5 : _g, _h = _a3.radius, radius = _h === void 0 ? 2 : _h, _j = _a3.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest9(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]);
|
734
788
|
var value = parseLengthAndUnit(margin).value;
|
735
789
|
var radiusValue = value + 18;
|
736
790
|
var quarter = radiusValue / 2 + radiusValue / 5.5;
|
@@ -809,8 +863,8 @@ var init_FadeLoader = __esm({
|
|
809
863
|
});
|
810
864
|
|
811
865
|
// ../../node_modules/react-spinners/esm/GridLoader.js
|
812
|
-
function GridLoader(
|
813
|
-
var _b =
|
866
|
+
function GridLoader(_a3) {
|
867
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest10(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
|
814
868
|
var sizeWithUnit = parseLengthAndUnit(size);
|
815
869
|
var marginWithUnit = parseLengthAndUnit(margin);
|
816
870
|
var width = parseFloat(sizeWithUnit.value.toString()) * 3 + parseFloat(marginWithUnit.value.toString()) * 6;
|
@@ -888,8 +942,8 @@ var init_GridLoader = __esm({
|
|
888
942
|
});
|
889
943
|
|
890
944
|
// ../../node_modules/react-spinners/esm/HashLoader.js
|
891
|
-
function HashLoader(
|
892
|
-
var _b =
|
945
|
+
function HashLoader(_a3) {
|
946
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest11(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
893
947
|
var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
|
894
948
|
var wrapper = __assign11({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size), transform: "rotate(165deg)" }, cssOverride);
|
895
949
|
var thickness = value / 5;
|
@@ -959,8 +1013,8 @@ var init_HashLoader = __esm({
|
|
959
1013
|
});
|
960
1014
|
|
961
1015
|
// ../../node_modules/react-spinners/esm/MoonLoader.js
|
962
|
-
function MoonLoader(
|
963
|
-
var _b =
|
1016
|
+
function MoonLoader(_a3) {
|
1017
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest12(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
964
1018
|
var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
|
965
1019
|
var moonSize = value / 7;
|
966
1020
|
var wrapper = __assign12({ display: "inherit", position: "relative", width: "".concat("".concat(value + moonSize * 2).concat(unit)), height: "".concat("".concat(value + moonSize * 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }, cssOverride);
|
@@ -1020,8 +1074,8 @@ var init_MoonLoader = __esm({
|
|
1020
1074
|
});
|
1021
1075
|
|
1022
1076
|
// ../../node_modules/react-spinners/esm/PacmanLoader.js
|
1023
|
-
function PacmanLoader(
|
1024
|
-
var _b =
|
1077
|
+
function PacmanLoader(_a3) {
|
1078
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 25 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest13(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
|
1025
1079
|
var _h = parseLengthAndUnit(size), value = _h.value, unit = _h.unit;
|
1026
1080
|
var wrapper = __assign13({ display: "inherit", position: "relative", fontSize: 0, height: "".concat(value * 2).concat(unit), width: "".concat(value * 2).concat(unit) }, cssOverride);
|
1027
1081
|
var ball = createAnimation("PacmanLoader", "75% {opacity: 0.7}\n 100% {transform: translate(".concat("".concat(-4 * value).concat(unit), ", ").concat("".concat(-value / 4).concat(unit), ")}"), "ball");
|
@@ -1112,8 +1166,8 @@ var init_PacmanLoader = __esm({
|
|
1112
1166
|
});
|
1113
1167
|
|
1114
1168
|
// ../../node_modules/react-spinners/esm/PropagateLoader.js
|
1115
|
-
function PropagateLoader(
|
1116
|
-
var _b =
|
1169
|
+
function PropagateLoader(_a3) {
|
1170
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest14(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
1117
1171
|
var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
|
1118
1172
|
var wrapper = __assign14({ display: "inherit", position: "relative" }, cssOverride);
|
1119
1173
|
var style2 = function(i2) {
|
@@ -1187,8 +1241,8 @@ var init_PropagateLoader = __esm({
|
|
1187
1241
|
});
|
1188
1242
|
|
1189
1243
|
// ../../node_modules/react-spinners/esm/PulseLoader.js
|
1190
|
-
function PulseLoader(
|
1191
|
-
var _b =
|
1244
|
+
function PulseLoader(_a3) {
|
1245
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest15(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
|
1192
1246
|
var wrapper = __assign15({ display: "inherit" }, cssOverride);
|
1193
1247
|
var style2 = function(i2) {
|
1194
1248
|
return {
|
@@ -1250,8 +1304,8 @@ var init_PulseLoader = __esm({
|
|
1250
1304
|
});
|
1251
1305
|
|
1252
1306
|
// ../../node_modules/react-spinners/esm/PuffLoader.js
|
1253
|
-
function PuffLoader(
|
1254
|
-
var _b =
|
1307
|
+
function PuffLoader(_a3) {
|
1308
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest16(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
1255
1309
|
var wrapper = __assign16({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size) }, cssOverride);
|
1256
1310
|
var style2 = function(i2) {
|
1257
1311
|
return {
|
@@ -1321,8 +1375,8 @@ var init_PuffLoader = __esm({
|
|
1321
1375
|
});
|
1322
1376
|
|
1323
1377
|
// ../../node_modules/react-spinners/esm/RingLoader.js
|
1324
|
-
function RingLoader(
|
1325
|
-
var _b =
|
1378
|
+
function RingLoader(_a3) {
|
1379
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest17(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
1326
1380
|
var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
|
1327
1381
|
var wrapper = __assign17({ display: "inherit", width: cssValue(size), height: cssValue(size), position: "relative" }, cssOverride);
|
1328
1382
|
var style2 = function(i2) {
|
@@ -1388,8 +1442,8 @@ var init_RingLoader = __esm({
|
|
1388
1442
|
});
|
1389
1443
|
|
1390
1444
|
// ../../node_modules/react-spinners/esm/RiseLoader.js
|
1391
|
-
function RiseLoader(
|
1392
|
-
var _b =
|
1445
|
+
function RiseLoader(_a3) {
|
1446
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest18(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
|
1393
1447
|
var wrapper = __assign18({ display: "inherit" }, cssOverride);
|
1394
1448
|
var even = createAnimation("RiseLoader", "0% {transform: scale(1.1)}\n 25% {transform: translateY(-".concat(size, "px)}\n 50% {transform: scale(0.4)}\n 75% {transform: translateY(").concat(size, "px)}\n 100% {transform: translateY(0) scale(1.0)}"), "even");
|
1395
1449
|
var odd = createAnimation("RiseLoader", "0% {transform: scale(0.4)}\n 25% {transform: translateY(".concat(size, "px)}\n 50% {transform: scale(1.1)}\n 75% {transform: translateY(").concat(-size, "px)}\n 100% {transform: translateY(0) scale(0.75)}"), "odd");
|
@@ -1454,8 +1508,8 @@ var init_RiseLoader = __esm({
|
|
1454
1508
|
});
|
1455
1509
|
|
1456
1510
|
// ../../node_modules/react-spinners/esm/RotateLoader.js
|
1457
|
-
function RotateLoader(
|
1458
|
-
var _b =
|
1511
|
+
function RotateLoader(_a3) {
|
1512
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest19(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
|
1459
1513
|
var _h = parseLengthAndUnit(margin), value = _h.value, unit = _h.unit;
|
1460
1514
|
var ball = {
|
1461
1515
|
backgroundColor: color,
|
@@ -1520,8 +1574,8 @@ var init_RotateLoader = __esm({
|
|
1520
1574
|
});
|
1521
1575
|
|
1522
1576
|
// ../../node_modules/react-spinners/esm/ScaleLoader.js
|
1523
|
-
function ScaleLoader(
|
1524
|
-
var _b =
|
1577
|
+
function ScaleLoader(_a3) {
|
1578
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.height, height = _f === void 0 ? 35 : _f, _g = _a3.width, width = _g === void 0 ? 4 : _g, _h = _a3.radius, radius = _h === void 0 ? 2 : _h, _j = _a3.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest20(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]);
|
1525
1579
|
var wrapper = __assign20({ display: "inherit" }, cssOverride);
|
1526
1580
|
var style2 = function(i2) {
|
1527
1581
|
return {
|
@@ -1585,8 +1639,8 @@ var init_ScaleLoader = __esm({
|
|
1585
1639
|
});
|
1586
1640
|
|
1587
1641
|
// ../../node_modules/react-spinners/esm/SkewLoader.js
|
1588
|
-
function SkewLoader(
|
1589
|
-
var _b =
|
1642
|
+
function SkewLoader(_a3) {
|
1643
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 20 : _f, additionalprops = __rest21(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
1590
1644
|
var style2 = __assign21({ width: "0", height: "0", borderLeft: "".concat(cssValue(size), " solid transparent"), borderRight: "".concat(cssValue(size), " solid transparent"), borderBottom: "".concat(cssValue(size), " solid ").concat(color), display: "inline-block", animation: "".concat(skew, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride);
|
1591
1645
|
if (!loading) {
|
1592
1646
|
return null;
|
@@ -1630,8 +1684,8 @@ var init_SkewLoader = __esm({
|
|
1630
1684
|
});
|
1631
1685
|
|
1632
1686
|
// ../../node_modules/react-spinners/esm/SquareLoader.js
|
1633
|
-
function SquareLoader(
|
1634
|
-
var _b =
|
1687
|
+
function SquareLoader(_a3) {
|
1688
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest22(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
1635
1689
|
var style2 = __assign22({ backgroundColor: color, width: cssValue(size), height: cssValue(size), display: "inline-block", animation: "".concat(square, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride);
|
1636
1690
|
if (!loading) {
|
1637
1691
|
return null;
|
@@ -1675,8 +1729,8 @@ var init_SquareLoader = __esm({
|
|
1675
1729
|
});
|
1676
1730
|
|
1677
1731
|
// ../../node_modules/react-spinners/esm/SyncLoader.js
|
1678
|
-
function SyncLoader(
|
1679
|
-
var _b =
|
1732
|
+
function SyncLoader(_a3) {
|
1733
|
+
var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest23(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
|
1680
1734
|
var wrapper = __assign23({ display: "inherit" }, cssOverride);
|
1681
1735
|
var style2 = function(i2) {
|
1682
1736
|
return {
|
@@ -24768,7 +24822,7 @@ var require_react_dom_development = __commonJS({
|
|
24768
24822
|
break;
|
24769
24823
|
}
|
24770
24824
|
case "backwards": {
|
24771
|
-
var
|
24825
|
+
var _tail2 = null;
|
24772
24826
|
var row = workInProgress2.child;
|
24773
24827
|
workInProgress2.child = null;
|
24774
24828
|
while (row !== null) {
|
@@ -24778,15 +24832,15 @@ var require_react_dom_development = __commonJS({
|
|
24778
24832
|
break;
|
24779
24833
|
}
|
24780
24834
|
var nextRow = row.sibling;
|
24781
|
-
row.sibling =
|
24782
|
-
|
24835
|
+
row.sibling = _tail2;
|
24836
|
+
_tail2 = row;
|
24783
24837
|
row = nextRow;
|
24784
24838
|
}
|
24785
24839
|
initSuspenseListRenderState(
|
24786
24840
|
workInProgress2,
|
24787
24841
|
true,
|
24788
24842
|
// isBackwards
|
24789
|
-
|
24843
|
+
_tail2,
|
24790
24844
|
null,
|
24791
24845
|
// last
|
24792
24846
|
tailMode
|
@@ -28432,10 +28486,10 @@ var require_react_dom_development = __commonJS({
|
|
28432
28486
|
return;
|
28433
28487
|
}
|
28434
28488
|
} else {
|
28435
|
-
var
|
28436
|
-
if (
|
28437
|
-
|
28438
|
-
workInProgress =
|
28489
|
+
var _next2 = unwindWork(current2, completedWork);
|
28490
|
+
if (_next2 !== null) {
|
28491
|
+
_next2.flags &= HostEffectMask;
|
28492
|
+
workInProgress = _next2;
|
28439
28493
|
return;
|
28440
28494
|
}
|
28441
28495
|
if ((completedWork.mode & ProfileMode) !== NoMode) {
|
@@ -33511,6 +33565,1370 @@ var init_raf_schd_esm = __esm({
|
|
33511
33565
|
}
|
33512
33566
|
});
|
33513
33567
|
|
33568
|
+
// ../../node_modules/@measured/dnd/node_modules/lru-cache/dist/esm/index.js
|
33569
|
+
var perf, warned, PROCESS, emitWarning, AC, AS, _a, shouldWarn, TYPE, isPosInt, getUintArray, ZeroArray, _constructing, _Stack, Stack, _max, _maxSize, _dispose, _disposeAfter, _fetchMethod, _size, _calculatedSize, _keyMap, _keyList, _valList, _next, _prev, _head, _tail, _free, _disposed, _sizes, _starts, _ttls, _hasDispose, _hasFetchMethod, _hasDisposeAfter, _initializeTTLTracking, initializeTTLTracking_fn, _updateItemAge, _statusTTL, _setItemTTL, _isStale, _initializeSizeTracking, initializeSizeTracking_fn, _removeItemSize, _addItemSize, _requireSize, _indexes, indexes_fn, _rindexes, rindexes_fn, _isValidIndex, isValidIndex_fn, _a2, _evict, evict_fn, _backgroundFetch, backgroundFetch_fn, _isBackgroundFetch, isBackgroundFetch_fn, _connect, connect_fn, _moveToTail, moveToTail_fn, _LRUCache, LRUCache;
|
33570
|
+
var init_esm2 = __esm({
|
33571
|
+
"../../node_modules/@measured/dnd/node_modules/lru-cache/dist/esm/index.js"() {
|
33572
|
+
init_react_import();
|
33573
|
+
perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
33574
|
+
warned = /* @__PURE__ */ new Set();
|
33575
|
+
PROCESS = typeof process === "object" && !!process ? process : {};
|
33576
|
+
emitWarning = (msg, type, code, fn) => {
|
33577
|
+
typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`);
|
33578
|
+
};
|
33579
|
+
AC = globalThis.AbortController;
|
33580
|
+
AS = globalThis.AbortSignal;
|
33581
|
+
if (typeof AC === "undefined") {
|
33582
|
+
AS = class AbortSignal {
|
33583
|
+
constructor() {
|
33584
|
+
__publicField(this, "onabort");
|
33585
|
+
__publicField(this, "_onabort", []);
|
33586
|
+
__publicField(this, "reason");
|
33587
|
+
__publicField(this, "aborted", false);
|
33588
|
+
}
|
33589
|
+
addEventListener(_, fn) {
|
33590
|
+
this._onabort.push(fn);
|
33591
|
+
}
|
33592
|
+
};
|
33593
|
+
AC = class AbortController {
|
33594
|
+
constructor() {
|
33595
|
+
__publicField(this, "signal", new AS());
|
33596
|
+
warnACPolyfill();
|
33597
|
+
}
|
33598
|
+
abort(reason) {
|
33599
|
+
var _a3, _b;
|
33600
|
+
if (this.signal.aborted)
|
33601
|
+
return;
|
33602
|
+
this.signal.reason = reason;
|
33603
|
+
this.signal.aborted = true;
|
33604
|
+
for (const fn of this.signal._onabort) {
|
33605
|
+
fn(reason);
|
33606
|
+
}
|
33607
|
+
(_b = (_a3 = this.signal).onabort) == null ? void 0 : _b.call(_a3, reason);
|
33608
|
+
}
|
33609
|
+
};
|
33610
|
+
let printACPolyfillWarning = ((_a = PROCESS.env) == null ? void 0 : _a.LRU_CACHE_IGNORE_AC_WARNING) !== "1";
|
33611
|
+
const warnACPolyfill = () => {
|
33612
|
+
if (!printACPolyfillWarning)
|
33613
|
+
return;
|
33614
|
+
printACPolyfillWarning = false;
|
33615
|
+
emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill);
|
33616
|
+
};
|
33617
|
+
}
|
33618
|
+
shouldWarn = (code) => !warned.has(code);
|
33619
|
+
TYPE = Symbol("type");
|
33620
|
+
isPosInt = (n2) => n2 && n2 === Math.floor(n2) && n2 > 0 && isFinite(n2);
|
33621
|
+
getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
|
33622
|
+
ZeroArray = class extends Array {
|
33623
|
+
constructor(size) {
|
33624
|
+
super(size);
|
33625
|
+
this.fill(0);
|
33626
|
+
}
|
33627
|
+
};
|
33628
|
+
_Stack = class {
|
33629
|
+
constructor(max, HeapCls) {
|
33630
|
+
__publicField(this, "heap");
|
33631
|
+
__publicField(this, "length");
|
33632
|
+
if (!__privateGet(_Stack, _constructing)) {
|
33633
|
+
throw new TypeError("instantiate Stack using Stack.create(n)");
|
33634
|
+
}
|
33635
|
+
this.heap = new HeapCls(max);
|
33636
|
+
this.length = 0;
|
33637
|
+
}
|
33638
|
+
static create(max) {
|
33639
|
+
const HeapCls = getUintArray(max);
|
33640
|
+
if (!HeapCls)
|
33641
|
+
return [];
|
33642
|
+
__privateSet(_Stack, _constructing, true);
|
33643
|
+
const s = new _Stack(max, HeapCls);
|
33644
|
+
__privateSet(_Stack, _constructing, false);
|
33645
|
+
return s;
|
33646
|
+
}
|
33647
|
+
push(n2) {
|
33648
|
+
this.heap[this.length++] = n2;
|
33649
|
+
}
|
33650
|
+
pop() {
|
33651
|
+
return this.heap[--this.length];
|
33652
|
+
}
|
33653
|
+
};
|
33654
|
+
Stack = _Stack;
|
33655
|
+
_constructing = new WeakMap();
|
33656
|
+
// private constructor
|
33657
|
+
__privateAdd(Stack, _constructing, false);
|
33658
|
+
_LRUCache = class {
|
33659
|
+
constructor(options) {
|
33660
|
+
__privateAdd(this, _initializeTTLTracking);
|
33661
|
+
__privateAdd(this, _initializeSizeTracking);
|
33662
|
+
__privateAdd(this, _indexes);
|
33663
|
+
__privateAdd(this, _rindexes);
|
33664
|
+
__privateAdd(this, _isValidIndex);
|
33665
|
+
__privateAdd(this, _evict);
|
33666
|
+
__privateAdd(this, _backgroundFetch);
|
33667
|
+
__privateAdd(this, _isBackgroundFetch);
|
33668
|
+
__privateAdd(this, _connect);
|
33669
|
+
__privateAdd(this, _moveToTail);
|
33670
|
+
// properties coming in from the options of these, only max and maxSize
|
33671
|
+
// really *need* to be protected. The rest can be modified, as they just
|
33672
|
+
// set defaults for various methods.
|
33673
|
+
__privateAdd(this, _max, void 0);
|
33674
|
+
__privateAdd(this, _maxSize, void 0);
|
33675
|
+
__privateAdd(this, _dispose, void 0);
|
33676
|
+
__privateAdd(this, _disposeAfter, void 0);
|
33677
|
+
__privateAdd(this, _fetchMethod, void 0);
|
33678
|
+
/**
|
33679
|
+
* {@link LRUCache.OptionsBase.ttl}
|
33680
|
+
*/
|
33681
|
+
__publicField(this, "ttl");
|
33682
|
+
/**
|
33683
|
+
* {@link LRUCache.OptionsBase.ttlResolution}
|
33684
|
+
*/
|
33685
|
+
__publicField(this, "ttlResolution");
|
33686
|
+
/**
|
33687
|
+
* {@link LRUCache.OptionsBase.ttlAutopurge}
|
33688
|
+
*/
|
33689
|
+
__publicField(this, "ttlAutopurge");
|
33690
|
+
/**
|
33691
|
+
* {@link LRUCache.OptionsBase.updateAgeOnGet}
|
33692
|
+
*/
|
33693
|
+
__publicField(this, "updateAgeOnGet");
|
33694
|
+
/**
|
33695
|
+
* {@link LRUCache.OptionsBase.updateAgeOnHas}
|
33696
|
+
*/
|
33697
|
+
__publicField(this, "updateAgeOnHas");
|
33698
|
+
/**
|
33699
|
+
* {@link LRUCache.OptionsBase.allowStale}
|
33700
|
+
*/
|
33701
|
+
__publicField(this, "allowStale");
|
33702
|
+
/**
|
33703
|
+
* {@link LRUCache.OptionsBase.noDisposeOnSet}
|
33704
|
+
*/
|
33705
|
+
__publicField(this, "noDisposeOnSet");
|
33706
|
+
/**
|
33707
|
+
* {@link LRUCache.OptionsBase.noUpdateTTL}
|
33708
|
+
*/
|
33709
|
+
__publicField(this, "noUpdateTTL");
|
33710
|
+
/**
|
33711
|
+
* {@link LRUCache.OptionsBase.maxEntrySize}
|
33712
|
+
*/
|
33713
|
+
__publicField(this, "maxEntrySize");
|
33714
|
+
/**
|
33715
|
+
* {@link LRUCache.OptionsBase.sizeCalculation}
|
33716
|
+
*/
|
33717
|
+
__publicField(this, "sizeCalculation");
|
33718
|
+
/**
|
33719
|
+
* {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
|
33720
|
+
*/
|
33721
|
+
__publicField(this, "noDeleteOnFetchRejection");
|
33722
|
+
/**
|
33723
|
+
* {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
|
33724
|
+
*/
|
33725
|
+
__publicField(this, "noDeleteOnStaleGet");
|
33726
|
+
/**
|
33727
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
|
33728
|
+
*/
|
33729
|
+
__publicField(this, "allowStaleOnFetchAbort");
|
33730
|
+
/**
|
33731
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
|
33732
|
+
*/
|
33733
|
+
__publicField(this, "allowStaleOnFetchRejection");
|
33734
|
+
/**
|
33735
|
+
* {@link LRUCache.OptionsBase.ignoreFetchAbort}
|
33736
|
+
*/
|
33737
|
+
__publicField(this, "ignoreFetchAbort");
|
33738
|
+
// computed properties
|
33739
|
+
__privateAdd(this, _size, void 0);
|
33740
|
+
__privateAdd(this, _calculatedSize, void 0);
|
33741
|
+
__privateAdd(this, _keyMap, void 0);
|
33742
|
+
__privateAdd(this, _keyList, void 0);
|
33743
|
+
__privateAdd(this, _valList, void 0);
|
33744
|
+
__privateAdd(this, _next, void 0);
|
33745
|
+
__privateAdd(this, _prev, void 0);
|
33746
|
+
__privateAdd(this, _head, void 0);
|
33747
|
+
__privateAdd(this, _tail, void 0);
|
33748
|
+
__privateAdd(this, _free, void 0);
|
33749
|
+
__privateAdd(this, _disposed, void 0);
|
33750
|
+
__privateAdd(this, _sizes, void 0);
|
33751
|
+
__privateAdd(this, _starts, void 0);
|
33752
|
+
__privateAdd(this, _ttls, void 0);
|
33753
|
+
__privateAdd(this, _hasDispose, void 0);
|
33754
|
+
__privateAdd(this, _hasFetchMethod, void 0);
|
33755
|
+
__privateAdd(this, _hasDisposeAfter, void 0);
|
33756
|
+
// conditionally set private methods related to TTL
|
33757
|
+
__privateAdd(this, _updateItemAge, () => {
|
33758
|
+
});
|
33759
|
+
__privateAdd(this, _statusTTL, () => {
|
33760
|
+
});
|
33761
|
+
__privateAdd(this, _setItemTTL, () => {
|
33762
|
+
});
|
33763
|
+
/* c8 ignore stop */
|
33764
|
+
__privateAdd(this, _isStale, () => false);
|
33765
|
+
__privateAdd(this, _removeItemSize, (_i) => {
|
33766
|
+
});
|
33767
|
+
__privateAdd(this, _addItemSize, (_i, _s, _st) => {
|
33768
|
+
});
|
33769
|
+
__privateAdd(this, _requireSize, (_k, _v, size, sizeCalculation) => {
|
33770
|
+
if (size || sizeCalculation) {
|
33771
|
+
throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
33772
|
+
}
|
33773
|
+
return 0;
|
33774
|
+
});
|
33775
|
+
/**
|
33776
|
+
* A String value that is used in the creation of the default string description of an object.
|
33777
|
+
* Called by the built-in method Object.prototype.toString.
|
33778
|
+
*/
|
33779
|
+
__publicField(this, _a2, "LRUCache");
|
33780
|
+
const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
|
33781
|
+
if (max !== 0 && !isPosInt(max)) {
|
33782
|
+
throw new TypeError("max option must be a nonnegative integer");
|
33783
|
+
}
|
33784
|
+
const UintArray = max ? getUintArray(max) : Array;
|
33785
|
+
if (!UintArray) {
|
33786
|
+
throw new Error("invalid max value: " + max);
|
33787
|
+
}
|
33788
|
+
__privateSet(this, _max, max);
|
33789
|
+
__privateSet(this, _maxSize, maxSize);
|
33790
|
+
this.maxEntrySize = maxEntrySize || __privateGet(this, _maxSize);
|
33791
|
+
this.sizeCalculation = sizeCalculation;
|
33792
|
+
if (this.sizeCalculation) {
|
33793
|
+
if (!__privateGet(this, _maxSize) && !this.maxEntrySize) {
|
33794
|
+
throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
33795
|
+
}
|
33796
|
+
if (typeof this.sizeCalculation !== "function") {
|
33797
|
+
throw new TypeError("sizeCalculation set to non-function");
|
33798
|
+
}
|
33799
|
+
}
|
33800
|
+
if (fetchMethod !== void 0 && typeof fetchMethod !== "function") {
|
33801
|
+
throw new TypeError("fetchMethod must be a function if specified");
|
33802
|
+
}
|
33803
|
+
__privateSet(this, _fetchMethod, fetchMethod);
|
33804
|
+
__privateSet(this, _hasFetchMethod, !!fetchMethod);
|
33805
|
+
__privateSet(this, _keyMap, /* @__PURE__ */ new Map());
|
33806
|
+
__privateSet(this, _keyList, new Array(max).fill(void 0));
|
33807
|
+
__privateSet(this, _valList, new Array(max).fill(void 0));
|
33808
|
+
__privateSet(this, _next, new UintArray(max));
|
33809
|
+
__privateSet(this, _prev, new UintArray(max));
|
33810
|
+
__privateSet(this, _head, 0);
|
33811
|
+
__privateSet(this, _tail, 0);
|
33812
|
+
__privateSet(this, _free, Stack.create(max));
|
33813
|
+
__privateSet(this, _size, 0);
|
33814
|
+
__privateSet(this, _calculatedSize, 0);
|
33815
|
+
if (typeof dispose === "function") {
|
33816
|
+
__privateSet(this, _dispose, dispose);
|
33817
|
+
}
|
33818
|
+
if (typeof disposeAfter === "function") {
|
33819
|
+
__privateSet(this, _disposeAfter, disposeAfter);
|
33820
|
+
__privateSet(this, _disposed, []);
|
33821
|
+
} else {
|
33822
|
+
__privateSet(this, _disposeAfter, void 0);
|
33823
|
+
__privateSet(this, _disposed, void 0);
|
33824
|
+
}
|
33825
|
+
__privateSet(this, _hasDispose, !!__privateGet(this, _dispose));
|
33826
|
+
__privateSet(this, _hasDisposeAfter, !!__privateGet(this, _disposeAfter));
|
33827
|
+
this.noDisposeOnSet = !!noDisposeOnSet;
|
33828
|
+
this.noUpdateTTL = !!noUpdateTTL;
|
33829
|
+
this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
|
33830
|
+
this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
|
33831
|
+
this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
|
33832
|
+
this.ignoreFetchAbort = !!ignoreFetchAbort;
|
33833
|
+
if (this.maxEntrySize !== 0) {
|
33834
|
+
if (__privateGet(this, _maxSize) !== 0) {
|
33835
|
+
if (!isPosInt(__privateGet(this, _maxSize))) {
|
33836
|
+
throw new TypeError("maxSize must be a positive integer if specified");
|
33837
|
+
}
|
33838
|
+
}
|
33839
|
+
if (!isPosInt(this.maxEntrySize)) {
|
33840
|
+
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
33841
|
+
}
|
33842
|
+
__privateMethod(this, _initializeSizeTracking, initializeSizeTracking_fn).call(this);
|
33843
|
+
}
|
33844
|
+
this.allowStale = !!allowStale;
|
33845
|
+
this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
|
33846
|
+
this.updateAgeOnGet = !!updateAgeOnGet;
|
33847
|
+
this.updateAgeOnHas = !!updateAgeOnHas;
|
33848
|
+
this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
|
33849
|
+
this.ttlAutopurge = !!ttlAutopurge;
|
33850
|
+
this.ttl = ttl || 0;
|
33851
|
+
if (this.ttl) {
|
33852
|
+
if (!isPosInt(this.ttl)) {
|
33853
|
+
throw new TypeError("ttl must be a positive integer if specified");
|
33854
|
+
}
|
33855
|
+
__privateMethod(this, _initializeTTLTracking, initializeTTLTracking_fn).call(this);
|
33856
|
+
}
|
33857
|
+
if (__privateGet(this, _max) === 0 && this.ttl === 0 && __privateGet(this, _maxSize) === 0) {
|
33858
|
+
throw new TypeError("At least one of max, maxSize, or ttl is required");
|
33859
|
+
}
|
33860
|
+
if (!this.ttlAutopurge && !__privateGet(this, _max) && !__privateGet(this, _maxSize)) {
|
33861
|
+
const code = "LRU_CACHE_UNBOUNDED";
|
33862
|
+
if (shouldWarn(code)) {
|
33863
|
+
warned.add(code);
|
33864
|
+
const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
|
33865
|
+
emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
|
33866
|
+
}
|
33867
|
+
}
|
33868
|
+
}
|
33869
|
+
/**
|
33870
|
+
* Do not call this method unless you need to inspect the
|
33871
|
+
* inner workings of the cache. If anything returned by this
|
33872
|
+
* object is modified in any way, strange breakage may occur.
|
33873
|
+
*
|
33874
|
+
* These fields are private for a reason!
|
33875
|
+
*
|
33876
|
+
* @internal
|
33877
|
+
*/
|
33878
|
+
static unsafeExposeInternals(c2) {
|
33879
|
+
return {
|
33880
|
+
// properties
|
33881
|
+
starts: __privateGet(c2, _starts),
|
33882
|
+
ttls: __privateGet(c2, _ttls),
|
33883
|
+
sizes: __privateGet(c2, _sizes),
|
33884
|
+
keyMap: __privateGet(c2, _keyMap),
|
33885
|
+
keyList: __privateGet(c2, _keyList),
|
33886
|
+
valList: __privateGet(c2, _valList),
|
33887
|
+
next: __privateGet(c2, _next),
|
33888
|
+
prev: __privateGet(c2, _prev),
|
33889
|
+
get head() {
|
33890
|
+
return __privateGet(c2, _head);
|
33891
|
+
},
|
33892
|
+
get tail() {
|
33893
|
+
return __privateGet(c2, _tail);
|
33894
|
+
},
|
33895
|
+
free: __privateGet(c2, _free),
|
33896
|
+
// methods
|
33897
|
+
isBackgroundFetch: (p) => {
|
33898
|
+
var _a3;
|
33899
|
+
return __privateMethod(_a3 = c2, _isBackgroundFetch, isBackgroundFetch_fn).call(_a3, p);
|
33900
|
+
},
|
33901
|
+
backgroundFetch: (k, index, options, context) => {
|
33902
|
+
var _a3;
|
33903
|
+
return __privateMethod(_a3 = c2, _backgroundFetch, backgroundFetch_fn).call(_a3, k, index, options, context);
|
33904
|
+
},
|
33905
|
+
moveToTail: (index) => {
|
33906
|
+
var _a3;
|
33907
|
+
return __privateMethod(_a3 = c2, _moveToTail, moveToTail_fn).call(_a3, index);
|
33908
|
+
},
|
33909
|
+
indexes: (options) => {
|
33910
|
+
var _a3;
|
33911
|
+
return __privateMethod(_a3 = c2, _indexes, indexes_fn).call(_a3, options);
|
33912
|
+
},
|
33913
|
+
rindexes: (options) => {
|
33914
|
+
var _a3;
|
33915
|
+
return __privateMethod(_a3 = c2, _rindexes, rindexes_fn).call(_a3, options);
|
33916
|
+
},
|
33917
|
+
isStale: (index) => {
|
33918
|
+
var _a3;
|
33919
|
+
return __privateGet(_a3 = c2, _isStale).call(_a3, index);
|
33920
|
+
}
|
33921
|
+
};
|
33922
|
+
}
|
33923
|
+
// Protected read-only members
|
33924
|
+
/**
|
33925
|
+
* {@link LRUCache.OptionsBase.max} (read-only)
|
33926
|
+
*/
|
33927
|
+
get max() {
|
33928
|
+
return __privateGet(this, _max);
|
33929
|
+
}
|
33930
|
+
/**
|
33931
|
+
* {@link LRUCache.OptionsBase.maxSize} (read-only)
|
33932
|
+
*/
|
33933
|
+
get maxSize() {
|
33934
|
+
return __privateGet(this, _maxSize);
|
33935
|
+
}
|
33936
|
+
/**
|
33937
|
+
* The total computed size of items in the cache (read-only)
|
33938
|
+
*/
|
33939
|
+
get calculatedSize() {
|
33940
|
+
return __privateGet(this, _calculatedSize);
|
33941
|
+
}
|
33942
|
+
/**
|
33943
|
+
* The number of items stored in the cache (read-only)
|
33944
|
+
*/
|
33945
|
+
get size() {
|
33946
|
+
return __privateGet(this, _size);
|
33947
|
+
}
|
33948
|
+
/**
|
33949
|
+
* {@link LRUCache.OptionsBase.fetchMethod} (read-only)
|
33950
|
+
*/
|
33951
|
+
get fetchMethod() {
|
33952
|
+
return __privateGet(this, _fetchMethod);
|
33953
|
+
}
|
33954
|
+
/**
|
33955
|
+
* {@link LRUCache.OptionsBase.dispose} (read-only)
|
33956
|
+
*/
|
33957
|
+
get dispose() {
|
33958
|
+
return __privateGet(this, _dispose);
|
33959
|
+
}
|
33960
|
+
/**
|
33961
|
+
* {@link LRUCache.OptionsBase.disposeAfter} (read-only)
|
33962
|
+
*/
|
33963
|
+
get disposeAfter() {
|
33964
|
+
return __privateGet(this, _disposeAfter);
|
33965
|
+
}
|
33966
|
+
/**
|
33967
|
+
* Return the remaining TTL time for a given entry key
|
33968
|
+
*/
|
33969
|
+
getRemainingTTL(key) {
|
33970
|
+
return __privateGet(this, _keyMap).has(key) ? Infinity : 0;
|
33971
|
+
}
|
33972
|
+
/**
|
33973
|
+
* Return a generator yielding `[key, value]` pairs,
|
33974
|
+
* in order from most recently used to least recently used.
|
33975
|
+
*/
|
33976
|
+
*entries() {
|
33977
|
+
for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
|
33978
|
+
if (__privateGet(this, _valList)[i2] !== void 0 && __privateGet(this, _keyList)[i2] !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
|
33979
|
+
yield [__privateGet(this, _keyList)[i2], __privateGet(this, _valList)[i2]];
|
33980
|
+
}
|
33981
|
+
}
|
33982
|
+
}
|
33983
|
+
/**
|
33984
|
+
* Inverse order version of {@link LRUCache.entries}
|
33985
|
+
*
|
33986
|
+
* Return a generator yielding `[key, value]` pairs,
|
33987
|
+
* in order from least recently used to most recently used.
|
33988
|
+
*/
|
33989
|
+
*rentries() {
|
33990
|
+
for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
|
33991
|
+
if (__privateGet(this, _valList)[i2] !== void 0 && __privateGet(this, _keyList)[i2] !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
|
33992
|
+
yield [__privateGet(this, _keyList)[i2], __privateGet(this, _valList)[i2]];
|
33993
|
+
}
|
33994
|
+
}
|
33995
|
+
}
|
33996
|
+
/**
|
33997
|
+
* Return a generator yielding the keys in the cache,
|
33998
|
+
* in order from most recently used to least recently used.
|
33999
|
+
*/
|
34000
|
+
*keys() {
|
34001
|
+
for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
|
34002
|
+
const k = __privateGet(this, _keyList)[i2];
|
34003
|
+
if (k !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
|
34004
|
+
yield k;
|
34005
|
+
}
|
34006
|
+
}
|
34007
|
+
}
|
34008
|
+
/**
|
34009
|
+
* Inverse order version of {@link LRUCache.keys}
|
34010
|
+
*
|
34011
|
+
* Return a generator yielding the keys in the cache,
|
34012
|
+
* in order from least recently used to most recently used.
|
34013
|
+
*/
|
34014
|
+
*rkeys() {
|
34015
|
+
for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
|
34016
|
+
const k = __privateGet(this, _keyList)[i2];
|
34017
|
+
if (k !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
|
34018
|
+
yield k;
|
34019
|
+
}
|
34020
|
+
}
|
34021
|
+
}
|
34022
|
+
/**
|
34023
|
+
* Return a generator yielding the values in the cache,
|
34024
|
+
* in order from most recently used to least recently used.
|
34025
|
+
*/
|
34026
|
+
*values() {
|
34027
|
+
for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
|
34028
|
+
const v = __privateGet(this, _valList)[i2];
|
34029
|
+
if (v !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
|
34030
|
+
yield __privateGet(this, _valList)[i2];
|
34031
|
+
}
|
34032
|
+
}
|
34033
|
+
}
|
34034
|
+
/**
|
34035
|
+
* Inverse order version of {@link LRUCache.values}
|
34036
|
+
*
|
34037
|
+
* Return a generator yielding the values in the cache,
|
34038
|
+
* in order from least recently used to most recently used.
|
34039
|
+
*/
|
34040
|
+
*rvalues() {
|
34041
|
+
for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
|
34042
|
+
const v = __privateGet(this, _valList)[i2];
|
34043
|
+
if (v !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
|
34044
|
+
yield __privateGet(this, _valList)[i2];
|
34045
|
+
}
|
34046
|
+
}
|
34047
|
+
}
|
34048
|
+
/**
|
34049
|
+
* Iterating over the cache itself yields the same results as
|
34050
|
+
* {@link LRUCache.entries}
|
34051
|
+
*/
|
34052
|
+
[Symbol.iterator]() {
|
34053
|
+
return this.entries();
|
34054
|
+
}
|
34055
|
+
/**
|
34056
|
+
* Find a value for which the supplied fn method returns a truthy value,
|
34057
|
+
* similar to Array.find(). fn is called as fn(value, key, cache).
|
34058
|
+
*/
|
34059
|
+
find(fn, getOptions2 = {}) {
|
34060
|
+
for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
|
34061
|
+
const v = __privateGet(this, _valList)[i2];
|
34062
|
+
const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
|
34063
|
+
if (value === void 0)
|
34064
|
+
continue;
|
34065
|
+
if (fn(value, __privateGet(this, _keyList)[i2], this)) {
|
34066
|
+
return this.get(__privateGet(this, _keyList)[i2], getOptions2);
|
34067
|
+
}
|
34068
|
+
}
|
34069
|
+
}
|
34070
|
+
/**
|
34071
|
+
* Call the supplied function on each item in the cache, in order from
|
34072
|
+
* most recently used to least recently used. fn is called as
|
34073
|
+
* fn(value, key, cache). Does not update age or recenty of use.
|
34074
|
+
* Does not iterate over stale values.
|
34075
|
+
*/
|
34076
|
+
forEach(fn, thisp = this) {
|
34077
|
+
for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
|
34078
|
+
const v = __privateGet(this, _valList)[i2];
|
34079
|
+
const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
|
34080
|
+
if (value === void 0)
|
34081
|
+
continue;
|
34082
|
+
fn.call(thisp, value, __privateGet(this, _keyList)[i2], this);
|
34083
|
+
}
|
34084
|
+
}
|
34085
|
+
/**
|
34086
|
+
* The same as {@link LRUCache.forEach} but items are iterated over in
|
34087
|
+
* reverse order. (ie, less recently used items are iterated over first.)
|
34088
|
+
*/
|
34089
|
+
rforEach(fn, thisp = this) {
|
34090
|
+
for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
|
34091
|
+
const v = __privateGet(this, _valList)[i2];
|
34092
|
+
const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
|
34093
|
+
if (value === void 0)
|
34094
|
+
continue;
|
34095
|
+
fn.call(thisp, value, __privateGet(this, _keyList)[i2], this);
|
34096
|
+
}
|
34097
|
+
}
|
34098
|
+
/**
|
34099
|
+
* Delete any stale entries. Returns true if anything was removed,
|
34100
|
+
* false otherwise.
|
34101
|
+
*/
|
34102
|
+
purgeStale() {
|
34103
|
+
let deleted = false;
|
34104
|
+
for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this, { allowStale: true })) {
|
34105
|
+
if (__privateGet(this, _isStale).call(this, i2)) {
|
34106
|
+
this.delete(__privateGet(this, _keyList)[i2]);
|
34107
|
+
deleted = true;
|
34108
|
+
}
|
34109
|
+
}
|
34110
|
+
return deleted;
|
34111
|
+
}
|
34112
|
+
/**
|
34113
|
+
* Get the extended info about a given entry, to get its value, size, and
|
34114
|
+
* TTL info simultaneously. Like {@link LRUCache#dump}, but just for a
|
34115
|
+
* single key. Always returns stale values, if their info is found in the
|
34116
|
+
* cache, so be sure to check for expired TTLs if relevant.
|
34117
|
+
*/
|
34118
|
+
info(key) {
|
34119
|
+
const i2 = __privateGet(this, _keyMap).get(key);
|
34120
|
+
if (i2 === void 0)
|
34121
|
+
return void 0;
|
34122
|
+
const v = __privateGet(this, _valList)[i2];
|
34123
|
+
const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
|
34124
|
+
if (value === void 0)
|
34125
|
+
return void 0;
|
34126
|
+
const entry = { value };
|
34127
|
+
if (__privateGet(this, _ttls) && __privateGet(this, _starts)) {
|
34128
|
+
const ttl = __privateGet(this, _ttls)[i2];
|
34129
|
+
const start2 = __privateGet(this, _starts)[i2];
|
34130
|
+
if (ttl && start2) {
|
34131
|
+
const remain = ttl - (perf.now() - start2);
|
34132
|
+
entry.ttl = remain;
|
34133
|
+
entry.start = Date.now();
|
34134
|
+
}
|
34135
|
+
}
|
34136
|
+
if (__privateGet(this, _sizes)) {
|
34137
|
+
entry.size = __privateGet(this, _sizes)[i2];
|
34138
|
+
}
|
34139
|
+
return entry;
|
34140
|
+
}
|
34141
|
+
/**
|
34142
|
+
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
|
34143
|
+
* passed to cache.load()
|
34144
|
+
*/
|
34145
|
+
dump() {
|
34146
|
+
const arr = [];
|
34147
|
+
for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this, { allowStale: true })) {
|
34148
|
+
const key = __privateGet(this, _keyList)[i2];
|
34149
|
+
const v = __privateGet(this, _valList)[i2];
|
34150
|
+
const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
|
34151
|
+
if (value === void 0 || key === void 0)
|
34152
|
+
continue;
|
34153
|
+
const entry = { value };
|
34154
|
+
if (__privateGet(this, _ttls) && __privateGet(this, _starts)) {
|
34155
|
+
entry.ttl = __privateGet(this, _ttls)[i2];
|
34156
|
+
const age = perf.now() - __privateGet(this, _starts)[i2];
|
34157
|
+
entry.start = Math.floor(Date.now() - age);
|
34158
|
+
}
|
34159
|
+
if (__privateGet(this, _sizes)) {
|
34160
|
+
entry.size = __privateGet(this, _sizes)[i2];
|
34161
|
+
}
|
34162
|
+
arr.unshift([key, entry]);
|
34163
|
+
}
|
34164
|
+
return arr;
|
34165
|
+
}
|
34166
|
+
/**
|
34167
|
+
* Reset the cache and load in the items in entries in the order listed.
|
34168
|
+
* Note that the shape of the resulting cache may be different if the
|
34169
|
+
* same options are not used in both caches.
|
34170
|
+
*/
|
34171
|
+
load(arr) {
|
34172
|
+
this.clear();
|
34173
|
+
for (const [key, entry] of arr) {
|
34174
|
+
if (entry.start) {
|
34175
|
+
const age = Date.now() - entry.start;
|
34176
|
+
entry.start = perf.now() - age;
|
34177
|
+
}
|
34178
|
+
this.set(key, entry.value, entry);
|
34179
|
+
}
|
34180
|
+
}
|
34181
|
+
/**
|
34182
|
+
* Add a value to the cache.
|
34183
|
+
*
|
34184
|
+
* Note: if `undefined` is specified as a value, this is an alias for
|
34185
|
+
* {@link LRUCache#delete}
|
34186
|
+
*/
|
34187
|
+
set(k, v, setOptions = {}) {
|
34188
|
+
var _a3, _b, _c, _d, _e;
|
34189
|
+
if (v === void 0) {
|
34190
|
+
this.delete(k);
|
34191
|
+
return this;
|
34192
|
+
}
|
34193
|
+
const { ttl = this.ttl, start: start2, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
|
34194
|
+
let { noUpdateTTL = this.noUpdateTTL } = setOptions;
|
34195
|
+
const size = __privateGet(this, _requireSize).call(this, k, v, setOptions.size || 0, sizeCalculation);
|
34196
|
+
if (this.maxEntrySize && size > this.maxEntrySize) {
|
34197
|
+
if (status) {
|
34198
|
+
status.set = "miss";
|
34199
|
+
status.maxEntrySizeExceeded = true;
|
34200
|
+
}
|
34201
|
+
this.delete(k);
|
34202
|
+
return this;
|
34203
|
+
}
|
34204
|
+
let index = __privateGet(this, _size) === 0 ? void 0 : __privateGet(this, _keyMap).get(k);
|
34205
|
+
if (index === void 0) {
|
34206
|
+
index = __privateGet(this, _size) === 0 ? __privateGet(this, _tail) : __privateGet(this, _free).length !== 0 ? __privateGet(this, _free).pop() : __privateGet(this, _size) === __privateGet(this, _max) ? __privateMethod(this, _evict, evict_fn).call(this, false) : __privateGet(this, _size);
|
34207
|
+
__privateGet(this, _keyList)[index] = k;
|
34208
|
+
__privateGet(this, _valList)[index] = v;
|
34209
|
+
__privateGet(this, _keyMap).set(k, index);
|
34210
|
+
__privateGet(this, _next)[__privateGet(this, _tail)] = index;
|
34211
|
+
__privateGet(this, _prev)[index] = __privateGet(this, _tail);
|
34212
|
+
__privateSet(this, _tail, index);
|
34213
|
+
__privateWrapper(this, _size)._++;
|
34214
|
+
__privateGet(this, _addItemSize).call(this, index, size, status);
|
34215
|
+
if (status)
|
34216
|
+
status.set = "add";
|
34217
|
+
noUpdateTTL = false;
|
34218
|
+
} else {
|
34219
|
+
__privateMethod(this, _moveToTail, moveToTail_fn).call(this, index);
|
34220
|
+
const oldVal = __privateGet(this, _valList)[index];
|
34221
|
+
if (v !== oldVal) {
|
34222
|
+
if (__privateGet(this, _hasFetchMethod) && __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, oldVal)) {
|
34223
|
+
oldVal.__abortController.abort(new Error("replaced"));
|
34224
|
+
const { __staleWhileFetching: s } = oldVal;
|
34225
|
+
if (s !== void 0 && !noDisposeOnSet) {
|
34226
|
+
if (__privateGet(this, _hasDispose)) {
|
34227
|
+
(_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, s, k, "set");
|
34228
|
+
}
|
34229
|
+
if (__privateGet(this, _hasDisposeAfter)) {
|
34230
|
+
(_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([s, k, "set"]);
|
34231
|
+
}
|
34232
|
+
}
|
34233
|
+
} else if (!noDisposeOnSet) {
|
34234
|
+
if (__privateGet(this, _hasDispose)) {
|
34235
|
+
(_c = __privateGet(this, _dispose)) == null ? void 0 : _c.call(this, oldVal, k, "set");
|
34236
|
+
}
|
34237
|
+
if (__privateGet(this, _hasDisposeAfter)) {
|
34238
|
+
(_d = __privateGet(this, _disposed)) == null ? void 0 : _d.push([oldVal, k, "set"]);
|
34239
|
+
}
|
34240
|
+
}
|
34241
|
+
__privateGet(this, _removeItemSize).call(this, index);
|
34242
|
+
__privateGet(this, _addItemSize).call(this, index, size, status);
|
34243
|
+
__privateGet(this, _valList)[index] = v;
|
34244
|
+
if (status) {
|
34245
|
+
status.set = "replace";
|
34246
|
+
const oldValue = oldVal && __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, oldVal) ? oldVal.__staleWhileFetching : oldVal;
|
34247
|
+
if (oldValue !== void 0)
|
34248
|
+
status.oldValue = oldValue;
|
34249
|
+
}
|
34250
|
+
} else if (status) {
|
34251
|
+
status.set = "update";
|
34252
|
+
}
|
34253
|
+
}
|
34254
|
+
if (ttl !== 0 && !__privateGet(this, _ttls)) {
|
34255
|
+
__privateMethod(this, _initializeTTLTracking, initializeTTLTracking_fn).call(this);
|
34256
|
+
}
|
34257
|
+
if (__privateGet(this, _ttls)) {
|
34258
|
+
if (!noUpdateTTL) {
|
34259
|
+
__privateGet(this, _setItemTTL).call(this, index, ttl, start2);
|
34260
|
+
}
|
34261
|
+
if (status)
|
34262
|
+
__privateGet(this, _statusTTL).call(this, status, index);
|
34263
|
+
}
|
34264
|
+
if (!noDisposeOnSet && __privateGet(this, _hasDisposeAfter) && __privateGet(this, _disposed)) {
|
34265
|
+
const dt = __privateGet(this, _disposed);
|
34266
|
+
let task;
|
34267
|
+
while (task = dt == null ? void 0 : dt.shift()) {
|
34268
|
+
(_e = __privateGet(this, _disposeAfter)) == null ? void 0 : _e.call(this, ...task);
|
34269
|
+
}
|
34270
|
+
}
|
34271
|
+
return this;
|
34272
|
+
}
|
34273
|
+
/**
|
34274
|
+
* Evict the least recently used item, returning its value or
|
34275
|
+
* `undefined` if cache is empty.
|
34276
|
+
*/
|
34277
|
+
pop() {
|
34278
|
+
var _a3;
|
34279
|
+
try {
|
34280
|
+
while (__privateGet(this, _size)) {
|
34281
|
+
const val = __privateGet(this, _valList)[__privateGet(this, _head)];
|
34282
|
+
__privateMethod(this, _evict, evict_fn).call(this, true);
|
34283
|
+
if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, val)) {
|
34284
|
+
if (val.__staleWhileFetching) {
|
34285
|
+
return val.__staleWhileFetching;
|
34286
|
+
}
|
34287
|
+
} else if (val !== void 0) {
|
34288
|
+
return val;
|
34289
|
+
}
|
34290
|
+
}
|
34291
|
+
} finally {
|
34292
|
+
if (__privateGet(this, _hasDisposeAfter) && __privateGet(this, _disposed)) {
|
34293
|
+
const dt = __privateGet(this, _disposed);
|
34294
|
+
let task;
|
34295
|
+
while (task = dt == null ? void 0 : dt.shift()) {
|
34296
|
+
(_a3 = __privateGet(this, _disposeAfter)) == null ? void 0 : _a3.call(this, ...task);
|
34297
|
+
}
|
34298
|
+
}
|
34299
|
+
}
|
34300
|
+
}
|
34301
|
+
/**
|
34302
|
+
* Check if a key is in the cache, without updating the recency of use.
|
34303
|
+
* Will return false if the item is stale, even though it is technically
|
34304
|
+
* in the cache.
|
34305
|
+
*
|
34306
|
+
* Will not update item age unless
|
34307
|
+
* {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
|
34308
|
+
*/
|
34309
|
+
has(k, hasOptions = {}) {
|
34310
|
+
const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
|
34311
|
+
const index = __privateGet(this, _keyMap).get(k);
|
34312
|
+
if (index !== void 0) {
|
34313
|
+
const v = __privateGet(this, _valList)[index];
|
34314
|
+
if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) && v.__staleWhileFetching === void 0) {
|
34315
|
+
return false;
|
34316
|
+
}
|
34317
|
+
if (!__privateGet(this, _isStale).call(this, index)) {
|
34318
|
+
if (updateAgeOnHas) {
|
34319
|
+
__privateGet(this, _updateItemAge).call(this, index);
|
34320
|
+
}
|
34321
|
+
if (status) {
|
34322
|
+
status.has = "hit";
|
34323
|
+
__privateGet(this, _statusTTL).call(this, status, index);
|
34324
|
+
}
|
34325
|
+
return true;
|
34326
|
+
} else if (status) {
|
34327
|
+
status.has = "stale";
|
34328
|
+
__privateGet(this, _statusTTL).call(this, status, index);
|
34329
|
+
}
|
34330
|
+
} else if (status) {
|
34331
|
+
status.has = "miss";
|
34332
|
+
}
|
34333
|
+
return false;
|
34334
|
+
}
|
34335
|
+
/**
|
34336
|
+
* Like {@link LRUCache#get} but doesn't update recency or delete stale
|
34337
|
+
* items.
|
34338
|
+
*
|
34339
|
+
* Returns `undefined` if the item is stale, unless
|
34340
|
+
* {@link LRUCache.OptionsBase.allowStale} is set.
|
34341
|
+
*/
|
34342
|
+
peek(k, peekOptions = {}) {
|
34343
|
+
const { allowStale = this.allowStale } = peekOptions;
|
34344
|
+
const index = __privateGet(this, _keyMap).get(k);
|
34345
|
+
if (index === void 0 || !allowStale && __privateGet(this, _isStale).call(this, index)) {
|
34346
|
+
return;
|
34347
|
+
}
|
34348
|
+
const v = __privateGet(this, _valList)[index];
|
34349
|
+
return __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
|
34350
|
+
}
|
34351
|
+
fetch(_0) {
|
34352
|
+
return __async(this, arguments, function* (k, fetchOptions = {}) {
|
34353
|
+
const {
|
34354
|
+
// get options
|
34355
|
+
allowStale = this.allowStale,
|
34356
|
+
updateAgeOnGet = this.updateAgeOnGet,
|
34357
|
+
noDeleteOnStaleGet = this.noDeleteOnStaleGet,
|
34358
|
+
// set options
|
34359
|
+
ttl = this.ttl,
|
34360
|
+
noDisposeOnSet = this.noDisposeOnSet,
|
34361
|
+
size = 0,
|
34362
|
+
sizeCalculation = this.sizeCalculation,
|
34363
|
+
noUpdateTTL = this.noUpdateTTL,
|
34364
|
+
// fetch exclusive options
|
34365
|
+
noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,
|
34366
|
+
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
34367
|
+
ignoreFetchAbort = this.ignoreFetchAbort,
|
34368
|
+
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
34369
|
+
context,
|
34370
|
+
forceRefresh = false,
|
34371
|
+
status,
|
34372
|
+
signal
|
34373
|
+
} = fetchOptions;
|
34374
|
+
if (!__privateGet(this, _hasFetchMethod)) {
|
34375
|
+
if (status)
|
34376
|
+
status.fetch = "get";
|
34377
|
+
return this.get(k, {
|
34378
|
+
allowStale,
|
34379
|
+
updateAgeOnGet,
|
34380
|
+
noDeleteOnStaleGet,
|
34381
|
+
status
|
34382
|
+
});
|
34383
|
+
}
|
34384
|
+
const options = {
|
34385
|
+
allowStale,
|
34386
|
+
updateAgeOnGet,
|
34387
|
+
noDeleteOnStaleGet,
|
34388
|
+
ttl,
|
34389
|
+
noDisposeOnSet,
|
34390
|
+
size,
|
34391
|
+
sizeCalculation,
|
34392
|
+
noUpdateTTL,
|
34393
|
+
noDeleteOnFetchRejection,
|
34394
|
+
allowStaleOnFetchRejection,
|
34395
|
+
allowStaleOnFetchAbort,
|
34396
|
+
ignoreFetchAbort,
|
34397
|
+
status,
|
34398
|
+
signal
|
34399
|
+
};
|
34400
|
+
let index = __privateGet(this, _keyMap).get(k);
|
34401
|
+
if (index === void 0) {
|
34402
|
+
if (status)
|
34403
|
+
status.fetch = "miss";
|
34404
|
+
const p = __privateMethod(this, _backgroundFetch, backgroundFetch_fn).call(this, k, index, options, context);
|
34405
|
+
return p.__returned = p;
|
34406
|
+
} else {
|
34407
|
+
const v = __privateGet(this, _valList)[index];
|
34408
|
+
if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
|
34409
|
+
const stale = allowStale && v.__staleWhileFetching !== void 0;
|
34410
|
+
if (status) {
|
34411
|
+
status.fetch = "inflight";
|
34412
|
+
if (stale)
|
34413
|
+
status.returnedStale = true;
|
34414
|
+
}
|
34415
|
+
return stale ? v.__staleWhileFetching : v.__returned = v;
|
34416
|
+
}
|
34417
|
+
const isStale = __privateGet(this, _isStale).call(this, index);
|
34418
|
+
if (!forceRefresh && !isStale) {
|
34419
|
+
if (status)
|
34420
|
+
status.fetch = "hit";
|
34421
|
+
__privateMethod(this, _moveToTail, moveToTail_fn).call(this, index);
|
34422
|
+
if (updateAgeOnGet) {
|
34423
|
+
__privateGet(this, _updateItemAge).call(this, index);
|
34424
|
+
}
|
34425
|
+
if (status)
|
34426
|
+
__privateGet(this, _statusTTL).call(this, status, index);
|
34427
|
+
return v;
|
34428
|
+
}
|
34429
|
+
const p = __privateMethod(this, _backgroundFetch, backgroundFetch_fn).call(this, k, index, options, context);
|
34430
|
+
const hasStale = p.__staleWhileFetching !== void 0;
|
34431
|
+
const staleVal = hasStale && allowStale;
|
34432
|
+
if (status) {
|
34433
|
+
status.fetch = isStale ? "stale" : "refresh";
|
34434
|
+
if (staleVal && isStale)
|
34435
|
+
status.returnedStale = true;
|
34436
|
+
}
|
34437
|
+
return staleVal ? p.__staleWhileFetching : p.__returned = p;
|
34438
|
+
}
|
34439
|
+
});
|
34440
|
+
}
|
34441
|
+
/**
|
34442
|
+
* Return a value from the cache. Will update the recency of the cache
|
34443
|
+
* entry found.
|
34444
|
+
*
|
34445
|
+
* If the key is not found, get() will return `undefined`.
|
34446
|
+
*/
|
34447
|
+
get(k, getOptions2 = {}) {
|
34448
|
+
const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions2;
|
34449
|
+
const index = __privateGet(this, _keyMap).get(k);
|
34450
|
+
if (index !== void 0) {
|
34451
|
+
const value = __privateGet(this, _valList)[index];
|
34452
|
+
const fetching = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, value);
|
34453
|
+
if (status)
|
34454
|
+
__privateGet(this, _statusTTL).call(this, status, index);
|
34455
|
+
if (__privateGet(this, _isStale).call(this, index)) {
|
34456
|
+
if (status)
|
34457
|
+
status.get = "stale";
|
34458
|
+
if (!fetching) {
|
34459
|
+
if (!noDeleteOnStaleGet) {
|
34460
|
+
this.delete(k);
|
34461
|
+
}
|
34462
|
+
if (status && allowStale)
|
34463
|
+
status.returnedStale = true;
|
34464
|
+
return allowStale ? value : void 0;
|
34465
|
+
} else {
|
34466
|
+
if (status && allowStale && value.__staleWhileFetching !== void 0) {
|
34467
|
+
status.returnedStale = true;
|
34468
|
+
}
|
34469
|
+
return allowStale ? value.__staleWhileFetching : void 0;
|
34470
|
+
}
|
34471
|
+
} else {
|
34472
|
+
if (status)
|
34473
|
+
status.get = "hit";
|
34474
|
+
if (fetching) {
|
34475
|
+
return value.__staleWhileFetching;
|
34476
|
+
}
|
34477
|
+
__privateMethod(this, _moveToTail, moveToTail_fn).call(this, index);
|
34478
|
+
if (updateAgeOnGet) {
|
34479
|
+
__privateGet(this, _updateItemAge).call(this, index);
|
34480
|
+
}
|
34481
|
+
return value;
|
34482
|
+
}
|
34483
|
+
} else if (status) {
|
34484
|
+
status.get = "miss";
|
34485
|
+
}
|
34486
|
+
}
|
34487
|
+
/**
|
34488
|
+
* Deletes a key out of the cache.
|
34489
|
+
* Returns true if the key was deleted, false otherwise.
|
34490
|
+
*/
|
34491
|
+
delete(k) {
|
34492
|
+
var _a3, _b, _c, _d;
|
34493
|
+
let deleted = false;
|
34494
|
+
if (__privateGet(this, _size) !== 0) {
|
34495
|
+
const index = __privateGet(this, _keyMap).get(k);
|
34496
|
+
if (index !== void 0) {
|
34497
|
+
deleted = true;
|
34498
|
+
if (__privateGet(this, _size) === 1) {
|
34499
|
+
this.clear();
|
34500
|
+
} else {
|
34501
|
+
__privateGet(this, _removeItemSize).call(this, index);
|
34502
|
+
const v = __privateGet(this, _valList)[index];
|
34503
|
+
if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
|
34504
|
+
v.__abortController.abort(new Error("deleted"));
|
34505
|
+
} else if (__privateGet(this, _hasDispose) || __privateGet(this, _hasDisposeAfter)) {
|
34506
|
+
if (__privateGet(this, _hasDispose)) {
|
34507
|
+
(_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, v, k, "delete");
|
34508
|
+
}
|
34509
|
+
if (__privateGet(this, _hasDisposeAfter)) {
|
34510
|
+
(_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([v, k, "delete"]);
|
34511
|
+
}
|
34512
|
+
}
|
34513
|
+
__privateGet(this, _keyMap).delete(k);
|
34514
|
+
__privateGet(this, _keyList)[index] = void 0;
|
34515
|
+
__privateGet(this, _valList)[index] = void 0;
|
34516
|
+
if (index === __privateGet(this, _tail)) {
|
34517
|
+
__privateSet(this, _tail, __privateGet(this, _prev)[index]);
|
34518
|
+
} else if (index === __privateGet(this, _head)) {
|
34519
|
+
__privateSet(this, _head, __privateGet(this, _next)[index]);
|
34520
|
+
} else {
|
34521
|
+
const pi = __privateGet(this, _prev)[index];
|
34522
|
+
__privateGet(this, _next)[pi] = __privateGet(this, _next)[index];
|
34523
|
+
const ni = __privateGet(this, _next)[index];
|
34524
|
+
__privateGet(this, _prev)[ni] = __privateGet(this, _prev)[index];
|
34525
|
+
}
|
34526
|
+
__privateWrapper(this, _size)._--;
|
34527
|
+
__privateGet(this, _free).push(index);
|
34528
|
+
}
|
34529
|
+
}
|
34530
|
+
}
|
34531
|
+
if (__privateGet(this, _hasDisposeAfter) && ((_c = __privateGet(this, _disposed)) == null ? void 0 : _c.length)) {
|
34532
|
+
const dt = __privateGet(this, _disposed);
|
34533
|
+
let task;
|
34534
|
+
while (task = dt == null ? void 0 : dt.shift()) {
|
34535
|
+
(_d = __privateGet(this, _disposeAfter)) == null ? void 0 : _d.call(this, ...task);
|
34536
|
+
}
|
34537
|
+
}
|
34538
|
+
return deleted;
|
34539
|
+
}
|
34540
|
+
/**
|
34541
|
+
* Clear the cache entirely, throwing away all values.
|
34542
|
+
*/
|
34543
|
+
clear() {
|
34544
|
+
var _a3, _b, _c;
|
34545
|
+
for (const index of __privateMethod(this, _rindexes, rindexes_fn).call(this, { allowStale: true })) {
|
34546
|
+
const v = __privateGet(this, _valList)[index];
|
34547
|
+
if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
|
34548
|
+
v.__abortController.abort(new Error("deleted"));
|
34549
|
+
} else {
|
34550
|
+
const k = __privateGet(this, _keyList)[index];
|
34551
|
+
if (__privateGet(this, _hasDispose)) {
|
34552
|
+
(_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, v, k, "delete");
|
34553
|
+
}
|
34554
|
+
if (__privateGet(this, _hasDisposeAfter)) {
|
34555
|
+
(_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([v, k, "delete"]);
|
34556
|
+
}
|
34557
|
+
}
|
34558
|
+
}
|
34559
|
+
__privateGet(this, _keyMap).clear();
|
34560
|
+
__privateGet(this, _valList).fill(void 0);
|
34561
|
+
__privateGet(this, _keyList).fill(void 0);
|
34562
|
+
if (__privateGet(this, _ttls) && __privateGet(this, _starts)) {
|
34563
|
+
__privateGet(this, _ttls).fill(0);
|
34564
|
+
__privateGet(this, _starts).fill(0);
|
34565
|
+
}
|
34566
|
+
if (__privateGet(this, _sizes)) {
|
34567
|
+
__privateGet(this, _sizes).fill(0);
|
34568
|
+
}
|
34569
|
+
__privateSet(this, _head, 0);
|
34570
|
+
__privateSet(this, _tail, 0);
|
34571
|
+
__privateGet(this, _free).length = 0;
|
34572
|
+
__privateSet(this, _calculatedSize, 0);
|
34573
|
+
__privateSet(this, _size, 0);
|
34574
|
+
if (__privateGet(this, _hasDisposeAfter) && __privateGet(this, _disposed)) {
|
34575
|
+
const dt = __privateGet(this, _disposed);
|
34576
|
+
let task;
|
34577
|
+
while (task = dt == null ? void 0 : dt.shift()) {
|
34578
|
+
(_c = __privateGet(this, _disposeAfter)) == null ? void 0 : _c.call(this, ...task);
|
34579
|
+
}
|
34580
|
+
}
|
34581
|
+
}
|
34582
|
+
};
|
34583
|
+
LRUCache = _LRUCache;
|
34584
|
+
_a2 = Symbol.toStringTag;
|
34585
|
+
_max = new WeakMap();
|
34586
|
+
_maxSize = new WeakMap();
|
34587
|
+
_dispose = new WeakMap();
|
34588
|
+
_disposeAfter = new WeakMap();
|
34589
|
+
_fetchMethod = new WeakMap();
|
34590
|
+
_size = new WeakMap();
|
34591
|
+
_calculatedSize = new WeakMap();
|
34592
|
+
_keyMap = new WeakMap();
|
34593
|
+
_keyList = new WeakMap();
|
34594
|
+
_valList = new WeakMap();
|
34595
|
+
_next = new WeakMap();
|
34596
|
+
_prev = new WeakMap();
|
34597
|
+
_head = new WeakMap();
|
34598
|
+
_tail = new WeakMap();
|
34599
|
+
_free = new WeakMap();
|
34600
|
+
_disposed = new WeakMap();
|
34601
|
+
_sizes = new WeakMap();
|
34602
|
+
_starts = new WeakMap();
|
34603
|
+
_ttls = new WeakMap();
|
34604
|
+
_hasDispose = new WeakMap();
|
34605
|
+
_hasFetchMethod = new WeakMap();
|
34606
|
+
_hasDisposeAfter = new WeakMap();
|
34607
|
+
_initializeTTLTracking = new WeakSet();
|
34608
|
+
initializeTTLTracking_fn = function() {
|
34609
|
+
const ttls = new ZeroArray(__privateGet(this, _max));
|
34610
|
+
const starts = new ZeroArray(__privateGet(this, _max));
|
34611
|
+
__privateSet(this, _ttls, ttls);
|
34612
|
+
__privateSet(this, _starts, starts);
|
34613
|
+
__privateSet(this, _setItemTTL, (index, ttl, start2 = perf.now()) => {
|
34614
|
+
starts[index] = ttl !== 0 ? start2 : 0;
|
34615
|
+
ttls[index] = ttl;
|
34616
|
+
if (ttl !== 0 && this.ttlAutopurge) {
|
34617
|
+
const t2 = setTimeout(() => {
|
34618
|
+
if (__privateGet(this, _isStale).call(this, index)) {
|
34619
|
+
this.delete(__privateGet(this, _keyList)[index]);
|
34620
|
+
}
|
34621
|
+
}, ttl + 1);
|
34622
|
+
if (t2.unref) {
|
34623
|
+
t2.unref();
|
34624
|
+
}
|
34625
|
+
}
|
34626
|
+
});
|
34627
|
+
__privateSet(this, _updateItemAge, (index) => {
|
34628
|
+
starts[index] = ttls[index] !== 0 ? perf.now() : 0;
|
34629
|
+
});
|
34630
|
+
__privateSet(this, _statusTTL, (status, index) => {
|
34631
|
+
if (ttls[index]) {
|
34632
|
+
const ttl = ttls[index];
|
34633
|
+
const start2 = starts[index];
|
34634
|
+
if (!ttl || !start2)
|
34635
|
+
return;
|
34636
|
+
status.ttl = ttl;
|
34637
|
+
status.start = start2;
|
34638
|
+
status.now = cachedNow || getNow();
|
34639
|
+
const age = status.now - start2;
|
34640
|
+
status.remainingTTL = ttl - age;
|
34641
|
+
}
|
34642
|
+
});
|
34643
|
+
let cachedNow = 0;
|
34644
|
+
const getNow = () => {
|
34645
|
+
const n2 = perf.now();
|
34646
|
+
if (this.ttlResolution > 0) {
|
34647
|
+
cachedNow = n2;
|
34648
|
+
const t2 = setTimeout(() => cachedNow = 0, this.ttlResolution);
|
34649
|
+
if (t2.unref) {
|
34650
|
+
t2.unref();
|
34651
|
+
}
|
34652
|
+
}
|
34653
|
+
return n2;
|
34654
|
+
};
|
34655
|
+
this.getRemainingTTL = (key) => {
|
34656
|
+
const index = __privateGet(this, _keyMap).get(key);
|
34657
|
+
if (index === void 0) {
|
34658
|
+
return 0;
|
34659
|
+
}
|
34660
|
+
const ttl = ttls[index];
|
34661
|
+
const start2 = starts[index];
|
34662
|
+
if (!ttl || !start2) {
|
34663
|
+
return Infinity;
|
34664
|
+
}
|
34665
|
+
const age = (cachedNow || getNow()) - start2;
|
34666
|
+
return ttl - age;
|
34667
|
+
};
|
34668
|
+
__privateSet(this, _isStale, (index) => {
|
34669
|
+
const s = starts[index];
|
34670
|
+
const t2 = ttls[index];
|
34671
|
+
return !!t2 && !!s && (cachedNow || getNow()) - s > t2;
|
34672
|
+
});
|
34673
|
+
};
|
34674
|
+
_updateItemAge = new WeakMap();
|
34675
|
+
_statusTTL = new WeakMap();
|
34676
|
+
_setItemTTL = new WeakMap();
|
34677
|
+
_isStale = new WeakMap();
|
34678
|
+
_initializeSizeTracking = new WeakSet();
|
34679
|
+
initializeSizeTracking_fn = function() {
|
34680
|
+
const sizes = new ZeroArray(__privateGet(this, _max));
|
34681
|
+
__privateSet(this, _calculatedSize, 0);
|
34682
|
+
__privateSet(this, _sizes, sizes);
|
34683
|
+
__privateSet(this, _removeItemSize, (index) => {
|
34684
|
+
__privateSet(this, _calculatedSize, __privateGet(this, _calculatedSize) - sizes[index]);
|
34685
|
+
sizes[index] = 0;
|
34686
|
+
});
|
34687
|
+
__privateSet(this, _requireSize, (k, v, size, sizeCalculation) => {
|
34688
|
+
if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
|
34689
|
+
return 0;
|
34690
|
+
}
|
34691
|
+
if (!isPosInt(size)) {
|
34692
|
+
if (sizeCalculation) {
|
34693
|
+
if (typeof sizeCalculation !== "function") {
|
34694
|
+
throw new TypeError("sizeCalculation must be a function");
|
34695
|
+
}
|
34696
|
+
size = sizeCalculation(v, k);
|
34697
|
+
if (!isPosInt(size)) {
|
34698
|
+
throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
34699
|
+
}
|
34700
|
+
} else {
|
34701
|
+
throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
34702
|
+
}
|
34703
|
+
}
|
34704
|
+
return size;
|
34705
|
+
});
|
34706
|
+
__privateSet(this, _addItemSize, (index, size, status) => {
|
34707
|
+
sizes[index] = size;
|
34708
|
+
if (__privateGet(this, _maxSize)) {
|
34709
|
+
const maxSize = __privateGet(this, _maxSize) - sizes[index];
|
34710
|
+
while (__privateGet(this, _calculatedSize) > maxSize) {
|
34711
|
+
__privateMethod(this, _evict, evict_fn).call(this, true);
|
34712
|
+
}
|
34713
|
+
}
|
34714
|
+
__privateSet(this, _calculatedSize, __privateGet(this, _calculatedSize) + sizes[index]);
|
34715
|
+
if (status) {
|
34716
|
+
status.entrySize = size;
|
34717
|
+
status.totalCalculatedSize = __privateGet(this, _calculatedSize);
|
34718
|
+
}
|
34719
|
+
});
|
34720
|
+
};
|
34721
|
+
_removeItemSize = new WeakMap();
|
34722
|
+
_addItemSize = new WeakMap();
|
34723
|
+
_requireSize = new WeakMap();
|
34724
|
+
_indexes = new WeakSet();
|
34725
|
+
indexes_fn = function* ({ allowStale = this.allowStale } = {}) {
|
34726
|
+
if (__privateGet(this, _size)) {
|
34727
|
+
for (let i2 = __privateGet(this, _tail); true; ) {
|
34728
|
+
if (!__privateMethod(this, _isValidIndex, isValidIndex_fn).call(this, i2)) {
|
34729
|
+
break;
|
34730
|
+
}
|
34731
|
+
if (allowStale || !__privateGet(this, _isStale).call(this, i2)) {
|
34732
|
+
yield i2;
|
34733
|
+
}
|
34734
|
+
if (i2 === __privateGet(this, _head)) {
|
34735
|
+
break;
|
34736
|
+
} else {
|
34737
|
+
i2 = __privateGet(this, _prev)[i2];
|
34738
|
+
}
|
34739
|
+
}
|
34740
|
+
}
|
34741
|
+
};
|
34742
|
+
_rindexes = new WeakSet();
|
34743
|
+
rindexes_fn = function* ({ allowStale = this.allowStale } = {}) {
|
34744
|
+
if (__privateGet(this, _size)) {
|
34745
|
+
for (let i2 = __privateGet(this, _head); true; ) {
|
34746
|
+
if (!__privateMethod(this, _isValidIndex, isValidIndex_fn).call(this, i2)) {
|
34747
|
+
break;
|
34748
|
+
}
|
34749
|
+
if (allowStale || !__privateGet(this, _isStale).call(this, i2)) {
|
34750
|
+
yield i2;
|
34751
|
+
}
|
34752
|
+
if (i2 === __privateGet(this, _tail)) {
|
34753
|
+
break;
|
34754
|
+
} else {
|
34755
|
+
i2 = __privateGet(this, _next)[i2];
|
34756
|
+
}
|
34757
|
+
}
|
34758
|
+
}
|
34759
|
+
};
|
34760
|
+
_isValidIndex = new WeakSet();
|
34761
|
+
isValidIndex_fn = function(index) {
|
34762
|
+
return index !== void 0 && __privateGet(this, _keyMap).get(__privateGet(this, _keyList)[index]) === index;
|
34763
|
+
};
|
34764
|
+
_evict = new WeakSet();
|
34765
|
+
evict_fn = function(free) {
|
34766
|
+
var _a3, _b;
|
34767
|
+
const head = __privateGet(this, _head);
|
34768
|
+
const k = __privateGet(this, _keyList)[head];
|
34769
|
+
const v = __privateGet(this, _valList)[head];
|
34770
|
+
if (__privateGet(this, _hasFetchMethod) && __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
|
34771
|
+
v.__abortController.abort(new Error("evicted"));
|
34772
|
+
} else if (__privateGet(this, _hasDispose) || __privateGet(this, _hasDisposeAfter)) {
|
34773
|
+
if (__privateGet(this, _hasDispose)) {
|
34774
|
+
(_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, v, k, "evict");
|
34775
|
+
}
|
34776
|
+
if (__privateGet(this, _hasDisposeAfter)) {
|
34777
|
+
(_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([v, k, "evict"]);
|
34778
|
+
}
|
34779
|
+
}
|
34780
|
+
__privateGet(this, _removeItemSize).call(this, head);
|
34781
|
+
if (free) {
|
34782
|
+
__privateGet(this, _keyList)[head] = void 0;
|
34783
|
+
__privateGet(this, _valList)[head] = void 0;
|
34784
|
+
__privateGet(this, _free).push(head);
|
34785
|
+
}
|
34786
|
+
if (__privateGet(this, _size) === 1) {
|
34787
|
+
__privateSet(this, _head, __privateSet(this, _tail, 0));
|
34788
|
+
__privateGet(this, _free).length = 0;
|
34789
|
+
} else {
|
34790
|
+
__privateSet(this, _head, __privateGet(this, _next)[head]);
|
34791
|
+
}
|
34792
|
+
__privateGet(this, _keyMap).delete(k);
|
34793
|
+
__privateWrapper(this, _size)._--;
|
34794
|
+
return head;
|
34795
|
+
};
|
34796
|
+
_backgroundFetch = new WeakSet();
|
34797
|
+
backgroundFetch_fn = function(k, index, options, context) {
|
34798
|
+
const v = index === void 0 ? void 0 : __privateGet(this, _valList)[index];
|
34799
|
+
if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
|
34800
|
+
return v;
|
34801
|
+
}
|
34802
|
+
const ac = new AC();
|
34803
|
+
const { signal } = options;
|
34804
|
+
signal == null ? void 0 : signal.addEventListener("abort", () => ac.abort(signal.reason), {
|
34805
|
+
signal: ac.signal
|
34806
|
+
});
|
34807
|
+
const fetchOpts = {
|
34808
|
+
signal: ac.signal,
|
34809
|
+
options,
|
34810
|
+
context
|
34811
|
+
};
|
34812
|
+
const cb = (v2, updateCache = false) => {
|
34813
|
+
const { aborted } = ac.signal;
|
34814
|
+
const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0;
|
34815
|
+
if (options.status) {
|
34816
|
+
if (aborted && !updateCache) {
|
34817
|
+
options.status.fetchAborted = true;
|
34818
|
+
options.status.fetchError = ac.signal.reason;
|
34819
|
+
if (ignoreAbort)
|
34820
|
+
options.status.fetchAbortIgnored = true;
|
34821
|
+
} else {
|
34822
|
+
options.status.fetchResolved = true;
|
34823
|
+
}
|
34824
|
+
}
|
34825
|
+
if (aborted && !ignoreAbort && !updateCache) {
|
34826
|
+
return fetchFail(ac.signal.reason);
|
34827
|
+
}
|
34828
|
+
const bf2 = p;
|
34829
|
+
if (__privateGet(this, _valList)[index] === p) {
|
34830
|
+
if (v2 === void 0) {
|
34831
|
+
if (bf2.__staleWhileFetching) {
|
34832
|
+
__privateGet(this, _valList)[index] = bf2.__staleWhileFetching;
|
34833
|
+
} else {
|
34834
|
+
this.delete(k);
|
34835
|
+
}
|
34836
|
+
} else {
|
34837
|
+
if (options.status)
|
34838
|
+
options.status.fetchUpdated = true;
|
34839
|
+
this.set(k, v2, fetchOpts.options);
|
34840
|
+
}
|
34841
|
+
}
|
34842
|
+
return v2;
|
34843
|
+
};
|
34844
|
+
const eb = (er) => {
|
34845
|
+
if (options.status) {
|
34846
|
+
options.status.fetchRejected = true;
|
34847
|
+
options.status.fetchError = er;
|
34848
|
+
}
|
34849
|
+
return fetchFail(er);
|
34850
|
+
};
|
34851
|
+
const fetchFail = (er) => {
|
34852
|
+
const { aborted } = ac.signal;
|
34853
|
+
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
34854
|
+
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
34855
|
+
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
34856
|
+
const bf2 = p;
|
34857
|
+
if (__privateGet(this, _valList)[index] === p) {
|
34858
|
+
const del = !noDelete || bf2.__staleWhileFetching === void 0;
|
34859
|
+
if (del) {
|
34860
|
+
this.delete(k);
|
34861
|
+
} else if (!allowStaleAborted) {
|
34862
|
+
__privateGet(this, _valList)[index] = bf2.__staleWhileFetching;
|
34863
|
+
}
|
34864
|
+
}
|
34865
|
+
if (allowStale) {
|
34866
|
+
if (options.status && bf2.__staleWhileFetching !== void 0) {
|
34867
|
+
options.status.returnedStale = true;
|
34868
|
+
}
|
34869
|
+
return bf2.__staleWhileFetching;
|
34870
|
+
} else if (bf2.__returned === bf2) {
|
34871
|
+
throw er;
|
34872
|
+
}
|
34873
|
+
};
|
34874
|
+
const pcall = (res, rej) => {
|
34875
|
+
var _a3;
|
34876
|
+
const fmp = (_a3 = __privateGet(this, _fetchMethod)) == null ? void 0 : _a3.call(this, k, v, fetchOpts);
|
34877
|
+
if (fmp && fmp instanceof Promise) {
|
34878
|
+
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
34879
|
+
}
|
34880
|
+
ac.signal.addEventListener("abort", () => {
|
34881
|
+
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
34882
|
+
res(void 0);
|
34883
|
+
if (options.allowStaleOnFetchAbort) {
|
34884
|
+
res = (v2) => cb(v2, true);
|
34885
|
+
}
|
34886
|
+
}
|
34887
|
+
});
|
34888
|
+
};
|
34889
|
+
if (options.status)
|
34890
|
+
options.status.fetchDispatched = true;
|
34891
|
+
const p = new Promise(pcall).then(cb, eb);
|
34892
|
+
const bf = Object.assign(p, {
|
34893
|
+
__abortController: ac,
|
34894
|
+
__staleWhileFetching: v,
|
34895
|
+
__returned: void 0
|
34896
|
+
});
|
34897
|
+
if (index === void 0) {
|
34898
|
+
this.set(k, bf, __spreadProps(__spreadValues({}, fetchOpts.options), { status: void 0 }));
|
34899
|
+
index = __privateGet(this, _keyMap).get(k);
|
34900
|
+
} else {
|
34901
|
+
__privateGet(this, _valList)[index] = bf;
|
34902
|
+
}
|
34903
|
+
return bf;
|
34904
|
+
};
|
34905
|
+
_isBackgroundFetch = new WeakSet();
|
34906
|
+
isBackgroundFetch_fn = function(p) {
|
34907
|
+
if (!__privateGet(this, _hasFetchMethod))
|
34908
|
+
return false;
|
34909
|
+
const b = p;
|
34910
|
+
return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
|
34911
|
+
};
|
34912
|
+
_connect = new WeakSet();
|
34913
|
+
connect_fn = function(p, n2) {
|
34914
|
+
__privateGet(this, _prev)[n2] = p;
|
34915
|
+
__privateGet(this, _next)[p] = n2;
|
34916
|
+
};
|
34917
|
+
_moveToTail = new WeakSet();
|
34918
|
+
moveToTail_fn = function(index) {
|
34919
|
+
if (index !== __privateGet(this, _tail)) {
|
34920
|
+
if (index === __privateGet(this, _head)) {
|
34921
|
+
__privateSet(this, _head, __privateGet(this, _next)[index]);
|
34922
|
+
} else {
|
34923
|
+
__privateMethod(this, _connect, connect_fn).call(this, __privateGet(this, _prev)[index], __privateGet(this, _next)[index]);
|
34924
|
+
}
|
34925
|
+
__privateMethod(this, _connect, connect_fn).call(this, __privateGet(this, _tail), index);
|
34926
|
+
__privateSet(this, _tail, index);
|
34927
|
+
}
|
34928
|
+
};
|
34929
|
+
}
|
34930
|
+
});
|
34931
|
+
|
33514
34932
|
// ../../node_modules/@measured/dnd/node_modules/@babel/runtime/helpers/esm/extends.js
|
33515
34933
|
function _extends2() {
|
33516
34934
|
_extends2 = Object.assign ? Object.assign.bind() : function(target) {
|
@@ -33576,7 +34994,7 @@ function bindEvent(win, binding, options) {
|
|
33576
34994
|
}
|
33577
34995
|
function bindEvents(el, bindings, sharedOptions) {
|
33578
34996
|
const unbindings = bindings.flatMap((binding) => {
|
33579
|
-
const iframes = querySelectorAll(window.document, "iframe");
|
34997
|
+
const iframes = querySelectorAll(window.document, "[data-rfd-iframe]");
|
33580
34998
|
const windows = [el, ...iframes.map((iframe) => iframe.contentWindow)];
|
33581
34999
|
return windows.map((win) => {
|
33582
35000
|
if (!win)
|
@@ -33786,6 +35204,26 @@ function getFurthestAway({
|
|
33786
35204
|
}).sort((a2, b) => b.distance - a2.distance);
|
33787
35205
|
return sorted[0] ? sorted[0].id : null;
|
33788
35206
|
}
|
35207
|
+
function normalizeFamilies(pageBorderBox, candidates) {
|
35208
|
+
const families = candidates.reduce((acc, candidate) => {
|
35209
|
+
var _a3;
|
35210
|
+
const familyName = ((_a3 = candidate.parents[0]) == null ? void 0 : _a3.id) || candidate.descriptor.id;
|
35211
|
+
const family = acc[familyName] || [];
|
35212
|
+
const generation = candidate.parents.length;
|
35213
|
+
family[generation] = [...family[generation] || [], candidate];
|
35214
|
+
return __spreadProps(__spreadValues({}, acc), {
|
35215
|
+
[familyName]: family
|
35216
|
+
});
|
35217
|
+
}, {});
|
35218
|
+
return Object.keys(families).map((familyName) => {
|
35219
|
+
const family = families[familyName].flat();
|
35220
|
+
const reversedFamily = [...family].reverse();
|
35221
|
+
const chosenMember = reversedFamily.find((member) => {
|
35222
|
+
return pageBorderBox.center.x < member.page.borderBox.right && pageBorderBox.center.x > member.page.borderBox.left && pageBorderBox.center.y > member.page.borderBox.top && pageBorderBox.center.y < member.page.borderBox.bottom;
|
35223
|
+
});
|
35224
|
+
return chosenMember || family[0];
|
35225
|
+
});
|
35226
|
+
}
|
33789
35227
|
function getDroppableOver({
|
33790
35228
|
pageBorderBox,
|
33791
35229
|
draggable: draggable2,
|
@@ -33826,10 +35264,14 @@ function getDroppableOver({
|
|
33826
35264
|
if (candidates.length === 1) {
|
33827
35265
|
return candidates[0].descriptor.id;
|
33828
35266
|
}
|
35267
|
+
const normalizedCandidates = normalizeFamilies(pageBorderBox, candidates);
|
35268
|
+
if (normalizedCandidates.length === 1) {
|
35269
|
+
return normalizedCandidates[0].descriptor.id;
|
35270
|
+
}
|
33829
35271
|
return getFurthestAway({
|
33830
35272
|
pageBorderBox,
|
33831
35273
|
draggable: draggable2,
|
33832
|
-
candidates
|
35274
|
+
candidates: normalizedCandidates
|
33833
35275
|
});
|
33834
35276
|
}
|
33835
35277
|
function getIsDisplaced({
|
@@ -34046,8 +35488,16 @@ function shouldPublishUpdate(registry, dragging, entry) {
|
|
34046
35488
|
return true;
|
34047
35489
|
}
|
34048
35490
|
function querySelectorAllIframe(selector) {
|
34049
|
-
|
34050
|
-
|
35491
|
+
let iframes = iframeCache.get("iframes");
|
35492
|
+
if (!iframes) {
|
35493
|
+
iframes = querySelectorAll(document, "iframe");
|
35494
|
+
iframes = iframes.filter((iframe) => iframe.hasAttribute("data-rfd-iframe"));
|
35495
|
+
iframeCache.set("iframes", iframes);
|
35496
|
+
}
|
35497
|
+
const iframePossible = iframes.reduce((acc, iframe) => {
|
35498
|
+
var _a3;
|
35499
|
+
return [...acc, ...((_a3 = iframe.contentWindow) == null ? void 0 : _a3.document) ? querySelectorAll(iframe.contentWindow.document, selector) : []];
|
35500
|
+
}, []);
|
34051
35501
|
return [...querySelectorAll(document, selector), ...iframePossible];
|
34052
35502
|
}
|
34053
35503
|
function useStyleMarshal(contextId, nonce) {
|
@@ -34069,7 +35519,10 @@ function useStyleMarshal(contextId, nonce) {
|
|
34069
35519
|
useLayoutEffect2(() => {
|
34070
35520
|
const alwaysSelector = `[${alwaysDataAttr}="${contextId}"]`;
|
34071
35521
|
const dynamicSelector = `[${dynamicDataAttr}="${contextId}"]`;
|
34072
|
-
const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).
|
35522
|
+
const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).filter((iframe) => {
|
35523
|
+
var _a3;
|
35524
|
+
return (_a3 = iframe.contentWindow) == null ? void 0 : _a3.document;
|
35525
|
+
}).map((iframe) => getHead(iframe.contentWindow.document))];
|
34073
35526
|
heads.forEach((head) => {
|
34074
35527
|
if (!head)
|
34075
35528
|
return;
|
@@ -34122,6 +35575,10 @@ function isHtmlElement(el) {
|
|
34122
35575
|
}
|
34123
35576
|
function findDragHandle(contextId, draggableId) {
|
34124
35577
|
const selector = `[${dragHandle.contextId}="${contextId}"]`;
|
35578
|
+
const cachedHandle = dragHandleCache.get(selector);
|
35579
|
+
if (cachedHandle) {
|
35580
|
+
return cachedHandle;
|
35581
|
+
}
|
34125
35582
|
const possible = querySelectorAllIframe(selector);
|
34126
35583
|
if (!possible.length) {
|
34127
35584
|
process.env.NODE_ENV !== "production" ? warning2(`Unable to find any drag handles in the context "${contextId}" ${selector}`) : void 0;
|
@@ -34138,6 +35595,7 @@ function findDragHandle(contextId, draggableId) {
|
|
34138
35595
|
process.env.NODE_ENV !== "production" ? warning2("drag handle needs to be a HTMLElement") : void 0;
|
34139
35596
|
return null;
|
34140
35597
|
}
|
35598
|
+
dragHandleCache.set(selector, handle);
|
34141
35599
|
return handle;
|
34142
35600
|
}
|
34143
35601
|
function useFocusMarshal(contextId) {
|
@@ -35207,10 +36665,10 @@ function isActive({
|
|
35207
36665
|
expected,
|
35208
36666
|
phase,
|
35209
36667
|
isLockActive,
|
35210
|
-
shouldWarn
|
36668
|
+
shouldWarn: shouldWarn2
|
35211
36669
|
}) {
|
35212
36670
|
if (!isLockActive()) {
|
35213
|
-
if (
|
36671
|
+
if (shouldWarn2) {
|
35214
36672
|
process.env.NODE_ENV !== "production" ? warning2(`
|
35215
36673
|
Cannot perform action.
|
35216
36674
|
The sensor no longer has an action lock.
|
@@ -35224,7 +36682,7 @@ function isActive({
|
|
35224
36682
|
return false;
|
35225
36683
|
}
|
35226
36684
|
if (expected !== phase) {
|
35227
|
-
if (
|
36685
|
+
if (shouldWarn2) {
|
35228
36686
|
process.env.NODE_ENV !== "production" ? warning2(`
|
35229
36687
|
Cannot perform action.
|
35230
36688
|
The actions you used belong to an outdated phase
|
@@ -35636,7 +37094,7 @@ function DragDropContext(props) {
|
|
35636
37094
|
}, props.children));
|
35637
37095
|
}
|
35638
37096
|
function getDraggingStyle(dragging) {
|
35639
|
-
var
|
37097
|
+
var _a3, _b, _c, _d, _e, _f;
|
35640
37098
|
const dimension = dragging.dimension;
|
35641
37099
|
const box = dimension.client;
|
35642
37100
|
const {
|
@@ -35648,7 +37106,7 @@ function getDraggingStyle(dragging) {
|
|
35648
37106
|
const shouldAnimate = getShouldDraggingAnimate(dragging);
|
35649
37107
|
const isDropAnimating = Boolean(dropping);
|
35650
37108
|
const untransformedOffset = {
|
35651
|
-
x: offset3.x / (((
|
37109
|
+
x: offset3.x / (((_a3 = dimension == null ? void 0 : dimension.transform) == null ? void 0 : _a3.matrix.scaleX) || 1),
|
35652
37110
|
y: offset3.y / (((_b = dimension == null ? void 0 : dimension.transform) == null ? void 0 : _b.matrix.scaleY) || 1)
|
35653
37111
|
};
|
35654
37112
|
const transform = isDropAnimating ? transforms.drop(untransformedOffset, isCombining) : transforms.moveTo(untransformedOffset);
|
@@ -35668,14 +37126,14 @@ function getDraggingStyle(dragging) {
|
|
35668
37126
|
return style2;
|
35669
37127
|
}
|
35670
37128
|
function getSecondaryStyle(secondary) {
|
35671
|
-
var
|
37129
|
+
var _a3, _b;
|
35672
37130
|
const {
|
35673
37131
|
offset: offset3,
|
35674
37132
|
sourceDroppable
|
35675
37133
|
} = secondary;
|
35676
37134
|
return {
|
35677
37135
|
transform: transforms.moveTo({
|
35678
|
-
x: offset3.x / (((
|
37136
|
+
x: offset3.x / (((_a3 = sourceDroppable == null ? void 0 : sourceDroppable.transform) == null ? void 0 : _a3.matrix.scaleX) || 1),
|
35679
37137
|
y: offset3.y / (((_b = sourceDroppable == null ? void 0 : sourceDroppable.transform) == null ? void 0 : _b.matrix.scaleY) || 1)
|
35680
37138
|
}),
|
35681
37139
|
transition: secondary.shouldAnimateDisplacement ? void 0 : "none"
|
@@ -35710,7 +37168,7 @@ function getIframeOffset(el) {
|
|
35710
37168
|
return offset3;
|
35711
37169
|
}
|
35712
37170
|
function applyOffset(rect, offset3) {
|
35713
|
-
var
|
37171
|
+
var _a3, _b;
|
35714
37172
|
return __spreadProps(__spreadValues({}, rect), {
|
35715
37173
|
top: (rect.top || 0) + offset3.top,
|
35716
37174
|
left: (rect.left || 0) + offset3.left,
|
@@ -35719,7 +37177,7 @@ function applyOffset(rect, offset3) {
|
|
35719
37177
|
x: (rect.x || 0) + offset3.left,
|
35720
37178
|
y: (rect.y || 0) + offset3.top,
|
35721
37179
|
center: {
|
35722
|
-
x: (((
|
37180
|
+
x: (((_a3 = rect.center) == null ? void 0 : _a3.x) || 0) + offset3.left,
|
35723
37181
|
y: (((_b = rect.center) == null ? void 0 : _b.y) || 0) + offset3.top
|
35724
37182
|
},
|
35725
37183
|
width: rect.width || 0,
|
@@ -36184,7 +37642,7 @@ function getBody() {
|
|
36184
37642
|
!document.body ? process.env.NODE_ENV !== "production" ? invariant2(false, "document.body is not ready") : invariant2(false) : void 0;
|
36185
37643
|
return document.body;
|
36186
37644
|
}
|
36187
|
-
var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, loaded, isProduction2, prefix$1, RbdInvariant, ErrorBoundary, dragHandleUsageInstructions, position, onDragStart, withLocation, withCombine, onDragUpdate, returnedToStart, onDragEnd, preset, preset$1, origin, add, subtract, isEqual$1, negate, patch, distance2, closest$1, apply, executeClip, offsetByPosition, getCorners, noSpacing2, scroll$1, increase, clip2, getSubject, scrollDroppable, toDroppableMap, toDraggableMap, toDroppableList, toDraggableList, getDraggablesInsideDroppable, removeDraggableFromList, moveToNextCombine, isHomeOf, noDisplacedBy, emptyGroups, noImpact, noImpact$1, isWithin, isPartiallyVisibleThroughFrame, isTotallyVisibleThroughFrame, vertical, horizontal, isTotallyVisibleThroughFrameOnAxis, getDroppableDisplaced, isVisibleInDroppable, isVisibleInViewport, isVisible$1, isPartiallyVisible, isTotallyVisible, isTotallyVisibleOnAxis, getShouldAnimate, fromCombine, fromReorder, moveToNextIndex, getCombinedItemDisplacement, whenCombining, distanceFromStartToBorderBoxCenter, distanceFromEndToBorderBoxCenter, getCrossAxisBorderBoxCenter, goAfter, goBefore, goIntoStart, whenReordering, withDroppableDisplacement, getResultWithoutDroppableDisplacement, getPageBorderBoxCenterFromImpact, scrollViewport, speculativelyIncrease, withViewportDisplacement, getClientFromPageBorderBoxCenter, isTotallyVisibleInNewLocation, moveToNextPlace, getKnownActive, getBestCrossAxisDroppable, getCurrentPageBorderBoxCenter, getCurrentPageBorderBox, getClosestDraggable, getDisplacedBy, getRequiredGrowthForPlaceholder, withMaxScroll, addPlaceholder, removePlaceholder, moveToNewDroppable, moveCrossAxis, whatIsDraggedOver, getDroppableOver$1, moveInDirection, offsetRectByPosition, withDroppableScroll, getReorderImpact, combineThresholdDivisor, getCombineImpact, getDragImpact, patchDroppableMap, clearUnusedPlaceholder, recomputePlaceholders, update, recompute, getClientBorderBoxCenter, refreshSnap, getHomeLocation, getLiftEffect, patchDimensionMap, start, finish, offsetDraggable, getFrame, adjustAdditionsForScrollChanges, timingsKey, publishWhileDraggingInVirtual, isSnapping, postDroppableChange, idle$2, reducer, beforeInitialCapture, lift$1, initialPublish, publishWhileDragging, collectionStarting, updateDroppableScroll, updateDroppableIsEnabled, updateDroppableIsCombineEnabled, move, moveByWindowScroll, updateViewportMaxScroll, moveUp, moveDown, moveRight, moveLeft, flush, animateDrop, completeDrop, drop$1, dropPending, dropAnimationFinished, lift, style, curves, combine, timings, outOfTheWayTiming, transitions, moveTo, transforms, minDropTime, maxDropTime, dropTimeRange, maxDropTimeAtDistance, cancelDropModifier, getDropDuration, getNewHomeClientOffset, getDropImpact, dropMiddleware, drop, getWindowScroll3, shouldEnd, scrollListener, scrollListener$1, getExpiringAnnounce, getAsyncMarshal, areLocationsEqual, isCombineEqual, isCriticalEqual, withTimings, getDragStart, getPublisher, responders, dropAnimationFinishMiddleware, dropAnimationFinish, dropAnimationFlushOnScrollMiddleware, dropAnimationFlushOnScroll, dimensionMarshalStopper, focus, shouldStop, autoScroll, pendingDrop, pendingDrop$1, composeEnhancers, createStore2, clean$1, getMaxScroll, getDocumentElement, getMaxWindowScroll, getViewport, getInitialPublish, createDimensionMarshal, canStartDrag, scrollWindow, getScrollableDroppables, getScrollableDroppableOver, getBestScrollableDroppable, defaultAutoScrollerOptions, getDistanceThresholds, getPercentage, minScroll, getValueFromDistance, dampenValueByTime, getValue, getScrollOnAxis, adjustForSizeLimits, clean, getScroll$1, smallestSigned, getOverlap, canPartiallyScroll, canScrollWindow, getWindowOverlap, canScrollDroppable, getDroppableOverlap, getWindowScrollChange, getDroppableScrollChange, createCol, matrixPattern, getMatrix, getOrigin, findNearestTransform, defaultTransform, getTransform, applyTransformPoint, applyTransformRect, applyTransformSpacing, applyTransformBox, resetToOrigin, getIframeScroll, scroll, createFluidScroller, createJumpScroller, createAutoScroller, prefix2, dragHandle, draggable, droppable, scrollContainer, makeGetSelector, getStyles, noPointerEvents, getStyles$1, useIsomorphicLayoutEffect2, useLayoutEffect2, getHead, createStyleEl, alwaysDataAttr, dynamicDataAttr, getWindowFromEl, StoreContext, getBodyElement, visuallyHidden, visuallyHidden$1, getId, count$1, defaults, useUniqueId$1, AppContext, peerDependencies, semver, getVersion, isSatisfied, checkReactVersion, suffix, checkDoctype, tab, enter, escape, space, pageUp, pageDown, end, home, arrowLeft, arrowUp, arrowRight, arrowDown, preventedKeys, preventStandardKeyEvents, supportedEventName, supportedPageVisibilityEventName, primaryButton, sloppyClickThreshold, idle$1, scrollJumpKeys, idle, timeForLongPress, forcePressThreshold, interactiveTagNames, getBorderBoxCenterPosition, supportedMatchesName, defaultSensors, createResponders, createAutoScrollerOptions, count, useUniqueContextId$1, zIndexOptions, getDraggingTransition, getDraggingOpacity, getShouldDraggingAnimate, applyOffsetBox, DroppableContext, Draggable, Draggable$1, isStrictEqual, whatIsDraggedOverFromResult, getCombineWithFromResult, getCombineWithFromImpact, atRest, makeMapStateToProps$1, mapDispatchToProps$1, ConnectedDraggable, ConnectedDraggable$1, getScroll, isEqual2, isScroll, isAuto, isVisible, isEither, isBoth, isElementScrollable, isBodyScrollable, getClosestScrollable, getClosestScrollable$1, getIsFixed, getEnv, getDroppableDimension, getClient, getDimension, immediate, delayed, getListenerOptions, getScrollable, getClosestScrollableFromDrag, empty, getSize, getStyle, Placeholder, Placeholder$1, shared, standard, virtual, AnimateInOut, Droppable, Droppable$1, defaultProps, attachDefaultPropsToOwnProps, isMatchingType, getDraggable, makeMapStateToProps, mapDispatchToProps, ConnectedDroppable, ConnectedDroppable$1;
|
37645
|
+
var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, loaded, isProduction2, prefix$1, RbdInvariant, ErrorBoundary, dragHandleUsageInstructions, position, onDragStart, withLocation, withCombine, onDragUpdate, returnedToStart, onDragEnd, preset, preset$1, origin, add, subtract, isEqual$1, negate, patch, distance2, closest$1, apply, executeClip, offsetByPosition, getCorners, noSpacing2, scroll$1, increase, clip2, getSubject, scrollDroppable, toDroppableMap, toDraggableMap, toDroppableList, toDraggableList, getDraggablesInsideDroppable, removeDraggableFromList, moveToNextCombine, isHomeOf, noDisplacedBy, emptyGroups, noImpact, noImpact$1, isWithin, isPartiallyVisibleThroughFrame, isTotallyVisibleThroughFrame, vertical, horizontal, isTotallyVisibleThroughFrameOnAxis, getDroppableDisplaced, isVisibleInDroppable, isVisibleInViewport, isVisible$1, isPartiallyVisible, isTotallyVisible, isTotallyVisibleOnAxis, getShouldAnimate, fromCombine, fromReorder, moveToNextIndex, getCombinedItemDisplacement, whenCombining, distanceFromStartToBorderBoxCenter, distanceFromEndToBorderBoxCenter, getCrossAxisBorderBoxCenter, goAfter, goBefore, goIntoStart, whenReordering, withDroppableDisplacement, getResultWithoutDroppableDisplacement, getPageBorderBoxCenterFromImpact, scrollViewport, speculativelyIncrease, withViewportDisplacement, getClientFromPageBorderBoxCenter, isTotallyVisibleInNewLocation, moveToNextPlace, getKnownActive, getBestCrossAxisDroppable, getCurrentPageBorderBoxCenter, getCurrentPageBorderBox, getClosestDraggable, getDisplacedBy, getRequiredGrowthForPlaceholder, withMaxScroll, addPlaceholder, removePlaceholder, moveToNewDroppable, moveCrossAxis, whatIsDraggedOver, getDroppableOver$1, moveInDirection, offsetRectByPosition, withDroppableScroll, getReorderImpact, combineThresholdDivisor, getCombineImpact, getDragImpact, patchDroppableMap, clearUnusedPlaceholder, recomputePlaceholders, update, recompute, getClientBorderBoxCenter, refreshSnap, getHomeLocation, getLiftEffect, patchDimensionMap, start, finish, offsetDraggable, getFrame, adjustAdditionsForScrollChanges, timingsKey, publishWhileDraggingInVirtual, isSnapping, postDroppableChange, idle$2, reducer, beforeInitialCapture, lift$1, initialPublish, publishWhileDragging, collectionStarting, updateDroppableScroll, updateDroppableIsEnabled, updateDroppableIsCombineEnabled, move, moveByWindowScroll, updateViewportMaxScroll, moveUp, moveDown, moveRight, moveLeft, flush, animateDrop, completeDrop, drop$1, dropPending, dropAnimationFinished, lift, style, curves, combine, timings, outOfTheWayTiming, transitions, moveTo, transforms, minDropTime, maxDropTime, dropTimeRange, maxDropTimeAtDistance, cancelDropModifier, getDropDuration, getNewHomeClientOffset, getDropImpact, dropMiddleware, drop, getWindowScroll3, shouldEnd, scrollListener, scrollListener$1, getExpiringAnnounce, getAsyncMarshal, areLocationsEqual, isCombineEqual, isCriticalEqual, withTimings, getDragStart, getPublisher, responders, dropAnimationFinishMiddleware, dropAnimationFinish, dropAnimationFlushOnScrollMiddleware, dropAnimationFlushOnScroll, dimensionMarshalStopper, focus, shouldStop, autoScroll, pendingDrop, pendingDrop$1, composeEnhancers, createStore2, clean$1, getMaxScroll, getDocumentElement, getMaxWindowScroll, getViewport, getInitialPublish, createDimensionMarshal, canStartDrag, scrollWindow, getScrollableDroppables, getScrollableDroppableOver, getBestScrollableDroppable, defaultAutoScrollerOptions, getDistanceThresholds, getPercentage, minScroll, getValueFromDistance, dampenValueByTime, getValue, getScrollOnAxis, adjustForSizeLimits, clean, getScroll$1, smallestSigned, getOverlap, canPartiallyScroll, canScrollWindow, getWindowOverlap, canScrollDroppable, getDroppableOverlap, getWindowScrollChange, getDroppableScrollChange, iframeCache, createCol, matrixPattern, getMatrix, getOrigin, findNearestTransform, defaultTransform, getTransform, applyTransformPoint, applyTransformRect, applyTransformSpacing, applyTransformBox, resetToOrigin, getIframeScroll, scroll, createFluidScroller, createJumpScroller, createAutoScroller, prefix2, dragHandle, draggable, droppable, scrollContainer, makeGetSelector, getStyles, noPointerEvents, getStyles$1, useIsomorphicLayoutEffect2, useLayoutEffect2, getHead, createStyleEl, alwaysDataAttr, dynamicDataAttr, getWindowFromEl, dragHandleCache, StoreContext, getBodyElement, visuallyHidden, visuallyHidden$1, getId, count$1, defaults, useUniqueId$1, AppContext, peerDependencies, semver, getVersion, isSatisfied, checkReactVersion, suffix, checkDoctype, tab, enter, escape, space, pageUp, pageDown, end, home, arrowLeft, arrowUp, arrowRight, arrowDown, preventedKeys, preventStandardKeyEvents, supportedEventName, supportedPageVisibilityEventName, primaryButton, sloppyClickThreshold, idle$1, scrollJumpKeys, idle, timeForLongPress, forcePressThreshold, interactiveTagNames, getBorderBoxCenterPosition, supportedMatchesName, defaultSensors, createResponders, createAutoScrollerOptions, count, useUniqueContextId$1, zIndexOptions, getDraggingTransition, getDraggingOpacity, getShouldDraggingAnimate, applyOffsetBox, DroppableContext, Draggable, Draggable$1, isStrictEqual, whatIsDraggedOverFromResult, getCombineWithFromResult, getCombineWithFromImpact, atRest, makeMapStateToProps$1, mapDispatchToProps$1, ConnectedDraggable, ConnectedDraggable$1, getScroll, isEqual2, isScroll, isAuto, isVisible, isEither, isBoth, isElementScrollable, isBodyScrollable, getClosestScrollable, getClosestScrollable$1, getIsFixed, getEnv, getDroppableDimension, getClient, getParents, getDimension, immediate, delayed, getListenerOptions, getScrollable, getClosestScrollableFromDrag, empty, getSize, getStyle, Placeholder, Placeholder$1, shared, standard, virtual, AnimateInOut, Droppable, Droppable$1, defaultProps, attachDefaultPropsToOwnProps, isMatchingType, getDraggable, makeMapStateToProps, mapDispatchToProps, ConnectedDroppable, ConnectedDroppable$1;
|
36188
37646
|
var init_dnd_esm = __esm({
|
36189
37647
|
"../../node_modules/@measured/dnd/dist/dnd.esm.js"() {
|
36190
37648
|
init_react_import();
|
@@ -36196,6 +37654,7 @@ var init_dnd_esm = __esm({
|
|
36196
37654
|
init_css_box_model_esm();
|
36197
37655
|
init_memoize_one_esm();
|
36198
37656
|
init_raf_schd_esm();
|
37657
|
+
init_esm2();
|
36199
37658
|
init_extends2();
|
36200
37659
|
isProduction$1 = process.env.NODE_ENV === "production";
|
36201
37660
|
spacesAndTabs = /[ \t]{2,}/g;
|
@@ -39553,6 +41012,10 @@ var init_dnd_esm = __esm({
|
|
39553
41012
|
});
|
39554
41013
|
return scroll2 && canScrollDroppable(droppable2, scroll2) ? scroll2 : null;
|
39555
41014
|
};
|
41015
|
+
iframeCache = new LRUCache({
|
41016
|
+
max: 1,
|
41017
|
+
ttl: 1e3
|
41018
|
+
});
|
39556
41019
|
createCol = (name) => `((?<${name}>-?((\\d|\\.)+))(,\\s)?)`;
|
39557
41020
|
matrixPattern = new RegExp(`^matrix\\(${createCol("scaleX")}${createCol("skewY")}${createCol("skewX")}${createCol("scaleY")}${createCol("translateX")}${createCol("translateY")}\\)`);
|
39558
41021
|
getMatrix = (transform) => {
|
@@ -40070,6 +41533,10 @@ var init_dnd_esm = __esm({
|
|
40070
41533
|
}
|
40071
41534
|
return window;
|
40072
41535
|
};
|
41536
|
+
dragHandleCache = new LRUCache({
|
41537
|
+
max: 5e3,
|
41538
|
+
ttl: 1e3
|
41539
|
+
});
|
40073
41540
|
StoreContext = import_react5.default.createContext(null);
|
40074
41541
|
getBodyElement = () => {
|
40075
41542
|
const body = document.body;
|
@@ -40495,7 +41962,7 @@ var init_dnd_esm = __esm({
|
|
40495
41962
|
return false;
|
40496
41963
|
};
|
40497
41964
|
getClosestScrollable = (el) => {
|
40498
|
-
var
|
41965
|
+
var _a3, _b;
|
40499
41966
|
if (el == null) {
|
40500
41967
|
return null;
|
40501
41968
|
}
|
@@ -40503,7 +41970,7 @@ var init_dnd_esm = __esm({
|
|
40503
41970
|
if (isBodyScrollable(el)) {
|
40504
41971
|
return el;
|
40505
41972
|
}
|
40506
|
-
if ((
|
41973
|
+
if ((_a3 = el.ownerDocument.defaultView) == null ? void 0 : _a3.frameElement) {
|
40507
41974
|
return (_b = el.ownerDocument.defaultView) == null ? void 0 : _b.frameElement;
|
40508
41975
|
}
|
40509
41976
|
return null;
|
@@ -40544,7 +42011,8 @@ var init_dnd_esm = __esm({
|
|
40544
42011
|
client,
|
40545
42012
|
page,
|
40546
42013
|
closest: closest2,
|
40547
|
-
transform
|
42014
|
+
transform,
|
42015
|
+
parents
|
40548
42016
|
}) => {
|
40549
42017
|
const frame = (() => {
|
40550
42018
|
if (!closest2) {
|
@@ -40593,7 +42061,8 @@ var init_dnd_esm = __esm({
|
|
40593
42061
|
page,
|
40594
42062
|
frame,
|
40595
42063
|
subject,
|
40596
|
-
transform
|
42064
|
+
transform,
|
42065
|
+
parents
|
40597
42066
|
};
|
40598
42067
|
return dimension;
|
40599
42068
|
};
|
@@ -40630,6 +42099,27 @@ var init_dnd_esm = __esm({
|
|
40630
42099
|
});
|
40631
42100
|
return client;
|
40632
42101
|
};
|
42102
|
+
getParents = (ref2) => {
|
42103
|
+
var _a3;
|
42104
|
+
const contextId = ref2.getAttribute(`${prefix2}-droppable-context-id`);
|
42105
|
+
const parentDescriptors = [];
|
42106
|
+
if (!contextId)
|
42107
|
+
return [];
|
42108
|
+
let currentEl = ref2;
|
42109
|
+
while (currentEl) {
|
42110
|
+
currentEl = (_a3 = currentEl.parentElement) == null ? void 0 : _a3.closest(`[${prefix2}-droppable-context-id="${contextId}"]`);
|
42111
|
+
const id = currentEl == null ? void 0 : currentEl.getAttribute(`${prefix2}-droppable-id`);
|
42112
|
+
if (id) {
|
42113
|
+
parentDescriptors.push({
|
42114
|
+
id,
|
42115
|
+
mode: "standard",
|
42116
|
+
type: "DEFAULT"
|
42117
|
+
});
|
42118
|
+
}
|
42119
|
+
}
|
42120
|
+
parentDescriptors.reverse();
|
42121
|
+
return parentDescriptors;
|
42122
|
+
};
|
40633
42123
|
getDimension = ({
|
40634
42124
|
ref: ref2,
|
40635
42125
|
descriptor,
|
@@ -40665,6 +42155,7 @@ var init_dnd_esm = __esm({
|
|
40665
42155
|
shouldClipSubject
|
40666
42156
|
};
|
40667
42157
|
})();
|
42158
|
+
const parents = getParents(ref2);
|
40668
42159
|
const dimension = getDroppableDimension({
|
40669
42160
|
descriptor,
|
40670
42161
|
isEnabled: !isDropDisabled,
|
@@ -40674,7 +42165,8 @@ var init_dnd_esm = __esm({
|
|
40674
42165
|
client,
|
40675
42166
|
page,
|
40676
42167
|
closest: closest2,
|
40677
|
-
transform
|
42168
|
+
transform,
|
42169
|
+
parents
|
40678
42170
|
});
|
40679
42171
|
return dimension;
|
40680
42172
|
};
|
@@ -41145,6 +42637,1291 @@ var init_dnd_esm = __esm({
|
|
41145
42637
|
}
|
41146
42638
|
});
|
41147
42639
|
|
42640
|
+
// ../../node_modules/ua-parser-js/src/ua-parser.js
|
42641
|
+
var require_ua_parser = __commonJS({
|
42642
|
+
"../../node_modules/ua-parser-js/src/ua-parser.js"(exports, module2) {
|
42643
|
+
init_react_import();
|
42644
|
+
(function(window2, undefined2) {
|
42645
|
+
"use strict";
|
42646
|
+
var LIBVERSION = "1.0.37", EMPTY = "", UNKNOWN = "?", FUNC_TYPE = "function", UNDEF_TYPE = "undefined", OBJ_TYPE = "object", STR_TYPE = "string", MAJOR = "major", MODEL = "model", NAME = "name", TYPE2 = "type", VENDOR = "vendor", VERSION = "version", ARCHITECTURE = "architecture", CONSOLE = "console", MOBILE = "mobile", TABLET = "tablet", SMARTTV = "smarttv", WEARABLE = "wearable", EMBEDDED = "embedded", UA_MAX_LENGTH = 500;
|
42647
|
+
var AMAZON = "Amazon", APPLE = "Apple", ASUS = "ASUS", BLACKBERRY = "BlackBerry", BROWSER = "Browser", CHROME = "Chrome", EDGE = "Edge", FIREFOX = "Firefox", GOOGLE = "Google", HUAWEI = "Huawei", LG = "LG", MICROSOFT = "Microsoft", MOTOROLA = "Motorola", OPERA = "Opera", SAMSUNG = "Samsung", SHARP = "Sharp", SONY = "Sony", XIAOMI = "Xiaomi", ZEBRA = "Zebra", FACEBOOK = "Facebook", CHROMIUM_OS = "Chromium OS", MAC_OS = "Mac OS";
|
42648
|
+
var extend = function(regexes2, extensions) {
|
42649
|
+
var mergedRegexes = {};
|
42650
|
+
for (var i2 in regexes2) {
|
42651
|
+
if (extensions[i2] && extensions[i2].length % 2 === 0) {
|
42652
|
+
mergedRegexes[i2] = extensions[i2].concat(regexes2[i2]);
|
42653
|
+
} else {
|
42654
|
+
mergedRegexes[i2] = regexes2[i2];
|
42655
|
+
}
|
42656
|
+
}
|
42657
|
+
return mergedRegexes;
|
42658
|
+
}, enumerize = function(arr) {
|
42659
|
+
var enums = {};
|
42660
|
+
for (var i2 = 0; i2 < arr.length; i2++) {
|
42661
|
+
enums[arr[i2].toUpperCase()] = arr[i2];
|
42662
|
+
}
|
42663
|
+
return enums;
|
42664
|
+
}, has = function(str1, str2) {
|
42665
|
+
return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
42666
|
+
}, lowerize = function(str) {
|
42667
|
+
return str.toLowerCase();
|
42668
|
+
}, majorize = function(version2) {
|
42669
|
+
return typeof version2 === STR_TYPE ? version2.replace(/[^\d\.]/g, EMPTY).split(".")[0] : undefined2;
|
42670
|
+
}, trim = function(str, len) {
|
42671
|
+
if (typeof str === STR_TYPE) {
|
42672
|
+
str = str.replace(/^\s\s*/, EMPTY);
|
42673
|
+
return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
|
42674
|
+
}
|
42675
|
+
};
|
42676
|
+
var rgxMapper = function(ua, arrays) {
|
42677
|
+
var i2 = 0, j, k, p, q, matches, match;
|
42678
|
+
while (i2 < arrays.length && !matches) {
|
42679
|
+
var regex = arrays[i2], props = arrays[i2 + 1];
|
42680
|
+
j = k = 0;
|
42681
|
+
while (j < regex.length && !matches) {
|
42682
|
+
if (!regex[j]) {
|
42683
|
+
break;
|
42684
|
+
}
|
42685
|
+
matches = regex[j++].exec(ua);
|
42686
|
+
if (!!matches) {
|
42687
|
+
for (p = 0; p < props.length; p++) {
|
42688
|
+
match = matches[++k];
|
42689
|
+
q = props[p];
|
42690
|
+
if (typeof q === OBJ_TYPE && q.length > 0) {
|
42691
|
+
if (q.length === 2) {
|
42692
|
+
if (typeof q[1] == FUNC_TYPE) {
|
42693
|
+
this[q[0]] = q[1].call(this, match);
|
42694
|
+
} else {
|
42695
|
+
this[q[0]] = q[1];
|
42696
|
+
}
|
42697
|
+
} else if (q.length === 3) {
|
42698
|
+
if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
|
42699
|
+
this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined2;
|
42700
|
+
} else {
|
42701
|
+
this[q[0]] = match ? match.replace(q[1], q[2]) : undefined2;
|
42702
|
+
}
|
42703
|
+
} else if (q.length === 4) {
|
42704
|
+
this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined2;
|
42705
|
+
}
|
42706
|
+
} else {
|
42707
|
+
this[q] = match ? match : undefined2;
|
42708
|
+
}
|
42709
|
+
}
|
42710
|
+
}
|
42711
|
+
}
|
42712
|
+
i2 += 2;
|
42713
|
+
}
|
42714
|
+
}, strMapper = function(str, map) {
|
42715
|
+
for (var i2 in map) {
|
42716
|
+
if (typeof map[i2] === OBJ_TYPE && map[i2].length > 0) {
|
42717
|
+
for (var j = 0; j < map[i2].length; j++) {
|
42718
|
+
if (has(map[i2][j], str)) {
|
42719
|
+
return i2 === UNKNOWN ? undefined2 : i2;
|
42720
|
+
}
|
42721
|
+
}
|
42722
|
+
} else if (has(map[i2], str)) {
|
42723
|
+
return i2 === UNKNOWN ? undefined2 : i2;
|
42724
|
+
}
|
42725
|
+
}
|
42726
|
+
return str;
|
42727
|
+
};
|
42728
|
+
var oldSafariMap = {
|
42729
|
+
"1.0": "/8",
|
42730
|
+
"1.2": "/1",
|
42731
|
+
"1.3": "/3",
|
42732
|
+
"2.0": "/412",
|
42733
|
+
"2.0.2": "/416",
|
42734
|
+
"2.0.3": "/417",
|
42735
|
+
"2.0.4": "/419",
|
42736
|
+
"?": "/"
|
42737
|
+
}, windowsVersionMap = {
|
42738
|
+
"ME": "4.90",
|
42739
|
+
"NT 3.11": "NT3.51",
|
42740
|
+
"NT 4.0": "NT4.0",
|
42741
|
+
"2000": "NT 5.0",
|
42742
|
+
"XP": ["NT 5.1", "NT 5.2"],
|
42743
|
+
"Vista": "NT 6.0",
|
42744
|
+
"7": "NT 6.1",
|
42745
|
+
"8": "NT 6.2",
|
42746
|
+
"8.1": "NT 6.3",
|
42747
|
+
"10": ["NT 6.4", "NT 10.0"],
|
42748
|
+
"RT": "ARM"
|
42749
|
+
};
|
42750
|
+
var regexes = {
|
42751
|
+
browser: [
|
42752
|
+
[
|
42753
|
+
/\b(?:crmo|crios)\/([\w\.]+)/i
|
42754
|
+
// Chrome for Android/iOS
|
42755
|
+
],
|
42756
|
+
[VERSION, [NAME, "Chrome"]],
|
42757
|
+
[
|
42758
|
+
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
42759
|
+
// Microsoft Edge
|
42760
|
+
],
|
42761
|
+
[VERSION, [NAME, "Edge"]],
|
42762
|
+
[
|
42763
|
+
// Presto based
|
42764
|
+
/(opera mini)\/([-\w\.]+)/i,
|
42765
|
+
// Opera Mini
|
42766
|
+
/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
|
42767
|
+
// Opera Mobi/Tablet
|
42768
|
+
/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
|
42769
|
+
// Opera
|
42770
|
+
],
|
42771
|
+
[NAME, VERSION],
|
42772
|
+
[
|
42773
|
+
/opios[\/ ]+([\w\.]+)/i
|
42774
|
+
// Opera mini on iphone >= 8.0
|
42775
|
+
],
|
42776
|
+
[VERSION, [NAME, OPERA + " Mini"]],
|
42777
|
+
[
|
42778
|
+
/\bopr\/([\w\.]+)/i
|
42779
|
+
// Opera Webkit
|
42780
|
+
],
|
42781
|
+
[VERSION, [NAME, OPERA]],
|
42782
|
+
[
|
42783
|
+
// Mixed
|
42784
|
+
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
|
42785
|
+
// Baidu
|
42786
|
+
],
|
42787
|
+
[VERSION, [NAME, "Baidu"]],
|
42788
|
+
[
|
42789
|
+
/(kindle)\/([\w\.]+)/i,
|
42790
|
+
// Kindle
|
42791
|
+
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
|
42792
|
+
// Lunascape/Maxthon/Netfront/Jasmine/Blazer
|
42793
|
+
// Trident based
|
42794
|
+
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,
|
42795
|
+
// Avant/IEMobile/SlimBrowser
|
42796
|
+
/(?:ms|\()(ie) ([\w\.]+)/i,
|
42797
|
+
// Internet Explorer
|
42798
|
+
// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
|
42799
|
+
/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
|
42800
|
+
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
|
42801
|
+
/(heytap|ovi)browser\/([\d\.]+)/i,
|
42802
|
+
// Heytap/Ovi
|
42803
|
+
/(weibo)__([\d\.]+)/i
|
42804
|
+
// Weibo
|
42805
|
+
],
|
42806
|
+
[NAME, VERSION],
|
42807
|
+
[
|
42808
|
+
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
|
42809
|
+
// UCBrowser
|
42810
|
+
],
|
42811
|
+
[VERSION, [NAME, "UC" + BROWSER]],
|
42812
|
+
[
|
42813
|
+
/microm.+\bqbcore\/([\w\.]+)/i,
|
42814
|
+
// WeChat Desktop for Windows Built-in Browser
|
42815
|
+
/\bqbcore\/([\w\.]+).+microm/i,
|
42816
|
+
/micromessenger\/([\w\.]+)/i
|
42817
|
+
// WeChat
|
42818
|
+
],
|
42819
|
+
[VERSION, [NAME, "WeChat"]],
|
42820
|
+
[
|
42821
|
+
/konqueror\/([\w\.]+)/i
|
42822
|
+
// Konqueror
|
42823
|
+
],
|
42824
|
+
[VERSION, [NAME, "Konqueror"]],
|
42825
|
+
[
|
42826
|
+
/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
|
42827
|
+
// IE11
|
42828
|
+
],
|
42829
|
+
[VERSION, [NAME, "IE"]],
|
42830
|
+
[
|
42831
|
+
/ya(?:search)?browser\/([\w\.]+)/i
|
42832
|
+
// Yandex
|
42833
|
+
],
|
42834
|
+
[VERSION, [NAME, "Yandex"]],
|
42835
|
+
[
|
42836
|
+
/slbrowser\/([\w\.]+)/i
|
42837
|
+
// Smart Lenovo Browser
|
42838
|
+
],
|
42839
|
+
[VERSION, [NAME, "Smart Lenovo " + BROWSER]],
|
42840
|
+
[
|
42841
|
+
/(avast|avg)\/([\w\.]+)/i
|
42842
|
+
// Avast/AVG Secure Browser
|
42843
|
+
],
|
42844
|
+
[[NAME, /(.+)/, "$1 Secure " + BROWSER], VERSION],
|
42845
|
+
[
|
42846
|
+
/\bfocus\/([\w\.]+)/i
|
42847
|
+
// Firefox Focus
|
42848
|
+
],
|
42849
|
+
[VERSION, [NAME, FIREFOX + " Focus"]],
|
42850
|
+
[
|
42851
|
+
/\bopt\/([\w\.]+)/i
|
42852
|
+
// Opera Touch
|
42853
|
+
],
|
42854
|
+
[VERSION, [NAME, OPERA + " Touch"]],
|
42855
|
+
[
|
42856
|
+
/coc_coc\w+\/([\w\.]+)/i
|
42857
|
+
// Coc Coc Browser
|
42858
|
+
],
|
42859
|
+
[VERSION, [NAME, "Coc Coc"]],
|
42860
|
+
[
|
42861
|
+
/dolfin\/([\w\.]+)/i
|
42862
|
+
// Dolphin
|
42863
|
+
],
|
42864
|
+
[VERSION, [NAME, "Dolphin"]],
|
42865
|
+
[
|
42866
|
+
/coast\/([\w\.]+)/i
|
42867
|
+
// Opera Coast
|
42868
|
+
],
|
42869
|
+
[VERSION, [NAME, OPERA + " Coast"]],
|
42870
|
+
[
|
42871
|
+
/miuibrowser\/([\w\.]+)/i
|
42872
|
+
// MIUI Browser
|
42873
|
+
],
|
42874
|
+
[VERSION, [NAME, "MIUI " + BROWSER]],
|
42875
|
+
[
|
42876
|
+
/fxios\/([-\w\.]+)/i
|
42877
|
+
// Firefox for iOS
|
42878
|
+
],
|
42879
|
+
[VERSION, [NAME, FIREFOX]],
|
42880
|
+
[
|
42881
|
+
/\bqihu|(qi?ho?o?|360)browser/i
|
42882
|
+
// 360
|
42883
|
+
],
|
42884
|
+
[[NAME, "360 " + BROWSER]],
|
42885
|
+
[
|
42886
|
+
/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
|
42887
|
+
],
|
42888
|
+
[[NAME, /(.+)/, "$1 " + BROWSER], VERSION],
|
42889
|
+
[
|
42890
|
+
// Oculus/Sailfish/HuaweiBrowser/VivoBrowser
|
42891
|
+
/samsungbrowser\/([\w\.]+)/i
|
42892
|
+
// Samsung Internet
|
42893
|
+
],
|
42894
|
+
[VERSION, [NAME, SAMSUNG + " Internet"]],
|
42895
|
+
[
|
42896
|
+
/(comodo_dragon)\/([\w\.]+)/i
|
42897
|
+
// Comodo Dragon
|
42898
|
+
],
|
42899
|
+
[[NAME, /_/g, " "], VERSION],
|
42900
|
+
[
|
42901
|
+
/metasr[\/ ]?([\d\.]+)/i
|
42902
|
+
// Sogou Explorer
|
42903
|
+
],
|
42904
|
+
[VERSION, [NAME, "Sogou Explorer"]],
|
42905
|
+
[
|
42906
|
+
/(sogou)mo\w+\/([\d\.]+)/i
|
42907
|
+
// Sogou Mobile
|
42908
|
+
],
|
42909
|
+
[[NAME, "Sogou Mobile"], VERSION],
|
42910
|
+
[
|
42911
|
+
/(electron)\/([\w\.]+) safari/i,
|
42912
|
+
// Electron-based App
|
42913
|
+
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
|
42914
|
+
// Tesla
|
42915
|
+
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
|
42916
|
+
// QQBrowser/2345 Browser
|
42917
|
+
],
|
42918
|
+
[NAME, VERSION],
|
42919
|
+
[
|
42920
|
+
/(lbbrowser)/i,
|
42921
|
+
// LieBao Browser
|
42922
|
+
/\[(linkedin)app\]/i
|
42923
|
+
// LinkedIn App for iOS & Android
|
42924
|
+
],
|
42925
|
+
[NAME],
|
42926
|
+
[
|
42927
|
+
// WebView
|
42928
|
+
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
|
42929
|
+
// Facebook App for iOS & Android
|
42930
|
+
],
|
42931
|
+
[[NAME, FACEBOOK], VERSION],
|
42932
|
+
[
|
42933
|
+
/(Klarna)\/([\w\.]+)/i,
|
42934
|
+
// Klarna Shopping Browser for iOS & Android
|
42935
|
+
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
|
42936
|
+
// Kakao App
|
42937
|
+
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
|
42938
|
+
// Naver InApp
|
42939
|
+
/safari (line)\/([\w\.]+)/i,
|
42940
|
+
// Line App for iOS
|
42941
|
+
/\b(line)\/([\w\.]+)\/iab/i,
|
42942
|
+
// Line App for Android
|
42943
|
+
/(alipay)client\/([\w\.]+)/i,
|
42944
|
+
// Alipay
|
42945
|
+
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
|
42946
|
+
// Chromium/Instagram/Snapchat
|
42947
|
+
],
|
42948
|
+
[NAME, VERSION],
|
42949
|
+
[
|
42950
|
+
/\bgsa\/([\w\.]+) .*safari\//i
|
42951
|
+
// Google Search Appliance on iOS
|
42952
|
+
],
|
42953
|
+
[VERSION, [NAME, "GSA"]],
|
42954
|
+
[
|
42955
|
+
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
|
42956
|
+
// TikTok
|
42957
|
+
],
|
42958
|
+
[VERSION, [NAME, "TikTok"]],
|
42959
|
+
[
|
42960
|
+
/headlesschrome(?:\/([\w\.]+)| )/i
|
42961
|
+
// Chrome Headless
|
42962
|
+
],
|
42963
|
+
[VERSION, [NAME, CHROME + " Headless"]],
|
42964
|
+
[
|
42965
|
+
/ wv\).+(chrome)\/([\w\.]+)/i
|
42966
|
+
// Chrome WebView
|
42967
|
+
],
|
42968
|
+
[[NAME, CHROME + " WebView"], VERSION],
|
42969
|
+
[
|
42970
|
+
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
42971
|
+
// Android Browser
|
42972
|
+
],
|
42973
|
+
[VERSION, [NAME, "Android " + BROWSER]],
|
42974
|
+
[
|
42975
|
+
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
|
42976
|
+
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
42977
|
+
],
|
42978
|
+
[NAME, VERSION],
|
42979
|
+
[
|
42980
|
+
/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
|
42981
|
+
// Mobile Safari
|
42982
|
+
],
|
42983
|
+
[VERSION, [NAME, "Mobile Safari"]],
|
42984
|
+
[
|
42985
|
+
/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
|
42986
|
+
// Safari & Safari Mobile
|
42987
|
+
],
|
42988
|
+
[VERSION, NAME],
|
42989
|
+
[
|
42990
|
+
/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
|
42991
|
+
// Safari < 3.0
|
42992
|
+
],
|
42993
|
+
[NAME, [VERSION, strMapper, oldSafariMap]],
|
42994
|
+
[
|
42995
|
+
/(webkit|khtml)\/([\w\.]+)/i
|
42996
|
+
],
|
42997
|
+
[NAME, VERSION],
|
42998
|
+
[
|
42999
|
+
// Gecko based
|
43000
|
+
/(navigator|netscape\d?)\/([-\w\.]+)/i
|
43001
|
+
// Netscape
|
43002
|
+
],
|
43003
|
+
[[NAME, "Netscape"], VERSION],
|
43004
|
+
[
|
43005
|
+
/mobile vr; rv:([\w\.]+)\).+firefox/i
|
43006
|
+
// Firefox Reality
|
43007
|
+
],
|
43008
|
+
[VERSION, [NAME, FIREFOX + " Reality"]],
|
43009
|
+
[
|
43010
|
+
/ekiohf.+(flow)\/([\w\.]+)/i,
|
43011
|
+
// Flow
|
43012
|
+
/(swiftfox)/i,
|
43013
|
+
// Swiftfox
|
43014
|
+
/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
|
43015
|
+
// IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar
|
43016
|
+
/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
|
43017
|
+
// Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
|
43018
|
+
/(firefox)\/([\w\.]+)/i,
|
43019
|
+
// Other Firefox-based
|
43020
|
+
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
|
43021
|
+
// Mozilla
|
43022
|
+
// Other
|
43023
|
+
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
43024
|
+
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
|
43025
|
+
/(links) \(([\w\.]+)/i,
|
43026
|
+
// Links
|
43027
|
+
/panasonic;(viera)/i
|
43028
|
+
// Panasonic Viera
|
43029
|
+
],
|
43030
|
+
[NAME, VERSION],
|
43031
|
+
[
|
43032
|
+
/(cobalt)\/([\w\.]+)/i
|
43033
|
+
// Cobalt
|
43034
|
+
],
|
43035
|
+
[NAME, [VERSION, /master.|lts./, ""]]
|
43036
|
+
],
|
43037
|
+
cpu: [
|
43038
|
+
[
|
43039
|
+
/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i
|
43040
|
+
// AMD64 (x64)
|
43041
|
+
],
|
43042
|
+
[[ARCHITECTURE, "amd64"]],
|
43043
|
+
[
|
43044
|
+
/(ia32(?=;))/i
|
43045
|
+
// IA32 (quicktime)
|
43046
|
+
],
|
43047
|
+
[[ARCHITECTURE, lowerize]],
|
43048
|
+
[
|
43049
|
+
/((?:i[346]|x)86)[;\)]/i
|
43050
|
+
// IA32 (x86)
|
43051
|
+
],
|
43052
|
+
[[ARCHITECTURE, "ia32"]],
|
43053
|
+
[
|
43054
|
+
/\b(aarch64|arm(v?8e?l?|_?64))\b/i
|
43055
|
+
// ARM64
|
43056
|
+
],
|
43057
|
+
[[ARCHITECTURE, "arm64"]],
|
43058
|
+
[
|
43059
|
+
/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
|
43060
|
+
// ARMHF
|
43061
|
+
],
|
43062
|
+
[[ARCHITECTURE, "armhf"]],
|
43063
|
+
[
|
43064
|
+
// PocketPC mistakenly identified as PowerPC
|
43065
|
+
/windows (ce|mobile); ppc;/i
|
43066
|
+
],
|
43067
|
+
[[ARCHITECTURE, "arm"]],
|
43068
|
+
[
|
43069
|
+
/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
|
43070
|
+
// PowerPC
|
43071
|
+
],
|
43072
|
+
[[ARCHITECTURE, /ower/, EMPTY, lowerize]],
|
43073
|
+
[
|
43074
|
+
/(sun4\w)[;\)]/i
|
43075
|
+
// SPARC
|
43076
|
+
],
|
43077
|
+
[[ARCHITECTURE, "sparc"]],
|
43078
|
+
[
|
43079
|
+
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
|
43080
|
+
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
43081
|
+
],
|
43082
|
+
[[ARCHITECTURE, lowerize]]
|
43083
|
+
],
|
43084
|
+
device: [
|
43085
|
+
[
|
43086
|
+
//////////////////////////
|
43087
|
+
// MOBILES & TABLETS
|
43088
|
+
/////////////////////////
|
43089
|
+
// Samsung
|
43090
|
+
/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
|
43091
|
+
],
|
43092
|
+
[MODEL, [VENDOR, SAMSUNG], [TYPE2, TABLET]],
|
43093
|
+
[
|
43094
|
+
/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
43095
|
+
/samsung[- ]([-\w]+)/i,
|
43096
|
+
/sec-(sgh\w+)/i
|
43097
|
+
],
|
43098
|
+
[MODEL, [VENDOR, SAMSUNG], [TYPE2, MOBILE]],
|
43099
|
+
[
|
43100
|
+
// Apple
|
43101
|
+
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
|
43102
|
+
// iPod/iPhone
|
43103
|
+
],
|
43104
|
+
[MODEL, [VENDOR, APPLE], [TYPE2, MOBILE]],
|
43105
|
+
[
|
43106
|
+
/\((ipad);[-\w\),; ]+apple/i,
|
43107
|
+
// iPad
|
43108
|
+
/applecoremedia\/[\w\.]+ \((ipad)/i,
|
43109
|
+
/\b(ipad)\d\d?,\d\d?[;\]].+ios/i
|
43110
|
+
],
|
43111
|
+
[MODEL, [VENDOR, APPLE], [TYPE2, TABLET]],
|
43112
|
+
[
|
43113
|
+
/(macintosh);/i
|
43114
|
+
],
|
43115
|
+
[MODEL, [VENDOR, APPLE]],
|
43116
|
+
[
|
43117
|
+
// Sharp
|
43118
|
+
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
43119
|
+
],
|
43120
|
+
[MODEL, [VENDOR, SHARP], [TYPE2, MOBILE]],
|
43121
|
+
[
|
43122
|
+
// Huawei
|
43123
|
+
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
43124
|
+
],
|
43125
|
+
[MODEL, [VENDOR, HUAWEI], [TYPE2, TABLET]],
|
43126
|
+
[
|
43127
|
+
/(?:huawei|honor)([-\w ]+)[;\)]/i,
|
43128
|
+
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
43129
|
+
],
|
43130
|
+
[MODEL, [VENDOR, HUAWEI], [TYPE2, MOBILE]],
|
43131
|
+
[
|
43132
|
+
// Xiaomi
|
43133
|
+
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
|
43134
|
+
// Xiaomi POCO
|
43135
|
+
/\b; (\w+) build\/hm\1/i,
|
43136
|
+
// Xiaomi Hongmi 'numeric' models
|
43137
|
+
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
|
43138
|
+
// Xiaomi Hongmi
|
43139
|
+
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
|
43140
|
+
// Xiaomi Redmi
|
43141
|
+
/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
|
43142
|
+
// Xiaomi Redmi 'numeric' models
|
43143
|
+
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
|
43144
|
+
// Xiaomi Mi
|
43145
|
+
],
|
43146
|
+
[[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, MOBILE]],
|
43147
|
+
[
|
43148
|
+
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
|
43149
|
+
// Redmi Pad
|
43150
|
+
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
|
43151
|
+
// Mi Pad tablets
|
43152
|
+
],
|
43153
|
+
[[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, TABLET]],
|
43154
|
+
[
|
43155
|
+
// OPPO
|
43156
|
+
/; (\w+) bui.+ oppo/i,
|
43157
|
+
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
|
43158
|
+
],
|
43159
|
+
[MODEL, [VENDOR, "OPPO"], [TYPE2, MOBILE]],
|
43160
|
+
[
|
43161
|
+
// Vivo
|
43162
|
+
/vivo (\w+)(?: bui|\))/i,
|
43163
|
+
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i
|
43164
|
+
],
|
43165
|
+
[MODEL, [VENDOR, "Vivo"], [TYPE2, MOBILE]],
|
43166
|
+
[
|
43167
|
+
// Realme
|
43168
|
+
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i
|
43169
|
+
],
|
43170
|
+
[MODEL, [VENDOR, "Realme"], [TYPE2, MOBILE]],
|
43171
|
+
[
|
43172
|
+
// Motorola
|
43173
|
+
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
|
43174
|
+
/\bmot(?:orola)?[- ](\w*)/i,
|
43175
|
+
/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
43176
|
+
],
|
43177
|
+
[MODEL, [VENDOR, MOTOROLA], [TYPE2, MOBILE]],
|
43178
|
+
[
|
43179
|
+
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
43180
|
+
],
|
43181
|
+
[MODEL, [VENDOR, MOTOROLA], [TYPE2, TABLET]],
|
43182
|
+
[
|
43183
|
+
// LG
|
43184
|
+
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
43185
|
+
],
|
43186
|
+
[MODEL, [VENDOR, LG], [TYPE2, TABLET]],
|
43187
|
+
[
|
43188
|
+
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
43189
|
+
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
|
43190
|
+
/\blg-?([\d\w]+) bui/i
|
43191
|
+
],
|
43192
|
+
[MODEL, [VENDOR, LG], [TYPE2, MOBILE]],
|
43193
|
+
[
|
43194
|
+
// Lenovo
|
43195
|
+
/(ideatab[-\w ]+)/i,
|
43196
|
+
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
|
43197
|
+
],
|
43198
|
+
[MODEL, [VENDOR, "Lenovo"], [TYPE2, TABLET]],
|
43199
|
+
[
|
43200
|
+
// Nokia
|
43201
|
+
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
43202
|
+
/nokia[-_ ]?([-\w\.]*)/i
|
43203
|
+
],
|
43204
|
+
[[MODEL, /_/g, " "], [VENDOR, "Nokia"], [TYPE2, MOBILE]],
|
43205
|
+
[
|
43206
|
+
// Google
|
43207
|
+
/(pixel c)\b/i
|
43208
|
+
// Google Pixel C
|
43209
|
+
],
|
43210
|
+
[MODEL, [VENDOR, GOOGLE], [TYPE2, TABLET]],
|
43211
|
+
[
|
43212
|
+
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
|
43213
|
+
// Google Pixel
|
43214
|
+
],
|
43215
|
+
[MODEL, [VENDOR, GOOGLE], [TYPE2, MOBILE]],
|
43216
|
+
[
|
43217
|
+
// Sony
|
43218
|
+
/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
43219
|
+
],
|
43220
|
+
[MODEL, [VENDOR, SONY], [TYPE2, MOBILE]],
|
43221
|
+
[
|
43222
|
+
/sony tablet [ps]/i,
|
43223
|
+
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
43224
|
+
],
|
43225
|
+
[[MODEL, "Xperia Tablet"], [VENDOR, SONY], [TYPE2, TABLET]],
|
43226
|
+
[
|
43227
|
+
// OnePlus
|
43228
|
+
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
43229
|
+
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
43230
|
+
],
|
43231
|
+
[MODEL, [VENDOR, "OnePlus"], [TYPE2, MOBILE]],
|
43232
|
+
[
|
43233
|
+
// Amazon
|
43234
|
+
/(alexa)webm/i,
|
43235
|
+
/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
|
43236
|
+
// Kindle Fire without Silk / Echo Show
|
43237
|
+
/(kf[a-z]+)( bui|\)).+silk\//i
|
43238
|
+
// Kindle Fire HD
|
43239
|
+
],
|
43240
|
+
[MODEL, [VENDOR, AMAZON], [TYPE2, TABLET]],
|
43241
|
+
[
|
43242
|
+
/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
|
43243
|
+
// Fire Phone
|
43244
|
+
],
|
43245
|
+
[[MODEL, /(.+)/g, "Fire Phone $1"], [VENDOR, AMAZON], [TYPE2, MOBILE]],
|
43246
|
+
[
|
43247
|
+
// BlackBerry
|
43248
|
+
/(playbook);[-\w\),; ]+(rim)/i
|
43249
|
+
// BlackBerry PlayBook
|
43250
|
+
],
|
43251
|
+
[MODEL, VENDOR, [TYPE2, TABLET]],
|
43252
|
+
[
|
43253
|
+
/\b((?:bb[a-f]|st[hv])100-\d)/i,
|
43254
|
+
/\(bb10; (\w+)/i
|
43255
|
+
// BlackBerry 10
|
43256
|
+
],
|
43257
|
+
[MODEL, [VENDOR, BLACKBERRY], [TYPE2, MOBILE]],
|
43258
|
+
[
|
43259
|
+
// Asus
|
43260
|
+
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
43261
|
+
],
|
43262
|
+
[MODEL, [VENDOR, ASUS], [TYPE2, TABLET]],
|
43263
|
+
[
|
43264
|
+
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
43265
|
+
],
|
43266
|
+
[MODEL, [VENDOR, ASUS], [TYPE2, MOBILE]],
|
43267
|
+
[
|
43268
|
+
// HTC
|
43269
|
+
/(nexus 9)/i
|
43270
|
+
// HTC Nexus 9
|
43271
|
+
],
|
43272
|
+
[MODEL, [VENDOR, "HTC"], [TYPE2, TABLET]],
|
43273
|
+
[
|
43274
|
+
/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
|
43275
|
+
// HTC
|
43276
|
+
// ZTE
|
43277
|
+
/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
|
43278
|
+
/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
|
43279
|
+
// Alcatel/GeeksPhone/Nexian/Panasonic/Sony
|
43280
|
+
],
|
43281
|
+
[VENDOR, [MODEL, /_/g, " "], [TYPE2, MOBILE]],
|
43282
|
+
[
|
43283
|
+
// Acer
|
43284
|
+
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
|
43285
|
+
],
|
43286
|
+
[MODEL, [VENDOR, "Acer"], [TYPE2, TABLET]],
|
43287
|
+
[
|
43288
|
+
// Meizu
|
43289
|
+
/droid.+; (m[1-5] note) bui/i,
|
43290
|
+
/\bmz-([-\w]{2,})/i
|
43291
|
+
],
|
43292
|
+
[MODEL, [VENDOR, "Meizu"], [TYPE2, MOBILE]],
|
43293
|
+
[
|
43294
|
+
// Ulefone
|
43295
|
+
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
|
43296
|
+
],
|
43297
|
+
[MODEL, [VENDOR, "Ulefone"], [TYPE2, MOBILE]],
|
43298
|
+
[
|
43299
|
+
// MIXED
|
43300
|
+
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
|
43301
|
+
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
|
43302
|
+
/(hp) ([\w ]+\w)/i,
|
43303
|
+
// HP iPAQ
|
43304
|
+
/(asus)-?(\w+)/i,
|
43305
|
+
// Asus
|
43306
|
+
/(microsoft); (lumia[\w ]+)/i,
|
43307
|
+
// Microsoft Lumia
|
43308
|
+
/(lenovo)[-_ ]?([-\w]+)/i,
|
43309
|
+
// Lenovo
|
43310
|
+
/(jolla)/i,
|
43311
|
+
// Jolla
|
43312
|
+
/(oppo) ?([\w ]+) bui/i
|
43313
|
+
// OPPO
|
43314
|
+
],
|
43315
|
+
[VENDOR, MODEL, [TYPE2, MOBILE]],
|
43316
|
+
[
|
43317
|
+
/(kobo)\s(ereader|touch)/i,
|
43318
|
+
// Kobo
|
43319
|
+
/(archos) (gamepad2?)/i,
|
43320
|
+
// Archos
|
43321
|
+
/(hp).+(touchpad(?!.+tablet)|tablet)/i,
|
43322
|
+
// HP TouchPad
|
43323
|
+
/(kindle)\/([\w\.]+)/i,
|
43324
|
+
// Kindle
|
43325
|
+
/(nook)[\w ]+build\/(\w+)/i,
|
43326
|
+
// Nook
|
43327
|
+
/(dell) (strea[kpr\d ]*[\dko])/i,
|
43328
|
+
// Dell Streak
|
43329
|
+
/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
|
43330
|
+
// Le Pan Tablets
|
43331
|
+
/(trinity)[- ]*(t\d{3}) bui/i,
|
43332
|
+
// Trinity Tablets
|
43333
|
+
/(gigaset)[- ]+(q\w{1,9}) bui/i,
|
43334
|
+
// Gigaset Tablets
|
43335
|
+
/(vodafone) ([\w ]+)(?:\)| bui)/i
|
43336
|
+
// Vodafone
|
43337
|
+
],
|
43338
|
+
[VENDOR, MODEL, [TYPE2, TABLET]],
|
43339
|
+
[
|
43340
|
+
/(surface duo)/i
|
43341
|
+
// Surface Duo
|
43342
|
+
],
|
43343
|
+
[MODEL, [VENDOR, MICROSOFT], [TYPE2, TABLET]],
|
43344
|
+
[
|
43345
|
+
/droid [\d\.]+; (fp\du?)(?: b|\))/i
|
43346
|
+
// Fairphone
|
43347
|
+
],
|
43348
|
+
[MODEL, [VENDOR, "Fairphone"], [TYPE2, MOBILE]],
|
43349
|
+
[
|
43350
|
+
/(u304aa)/i
|
43351
|
+
// AT&T
|
43352
|
+
],
|
43353
|
+
[MODEL, [VENDOR, "AT&T"], [TYPE2, MOBILE]],
|
43354
|
+
[
|
43355
|
+
/\bsie-(\w*)/i
|
43356
|
+
// Siemens
|
43357
|
+
],
|
43358
|
+
[MODEL, [VENDOR, "Siemens"], [TYPE2, MOBILE]],
|
43359
|
+
[
|
43360
|
+
/\b(rct\w+) b/i
|
43361
|
+
// RCA Tablets
|
43362
|
+
],
|
43363
|
+
[MODEL, [VENDOR, "RCA"], [TYPE2, TABLET]],
|
43364
|
+
[
|
43365
|
+
/\b(venue[\d ]{2,7}) b/i
|
43366
|
+
// Dell Venue Tablets
|
43367
|
+
],
|
43368
|
+
[MODEL, [VENDOR, "Dell"], [TYPE2, TABLET]],
|
43369
|
+
[
|
43370
|
+
/\b(q(?:mv|ta)\w+) b/i
|
43371
|
+
// Verizon Tablet
|
43372
|
+
],
|
43373
|
+
[MODEL, [VENDOR, "Verizon"], [TYPE2, TABLET]],
|
43374
|
+
[
|
43375
|
+
/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i
|
43376
|
+
// Barnes & Noble Tablet
|
43377
|
+
],
|
43378
|
+
[MODEL, [VENDOR, "Barnes & Noble"], [TYPE2, TABLET]],
|
43379
|
+
[
|
43380
|
+
/\b(tm\d{3}\w+) b/i
|
43381
|
+
],
|
43382
|
+
[MODEL, [VENDOR, "NuVision"], [TYPE2, TABLET]],
|
43383
|
+
[
|
43384
|
+
/\b(k88) b/i
|
43385
|
+
// ZTE K Series Tablet
|
43386
|
+
],
|
43387
|
+
[MODEL, [VENDOR, "ZTE"], [TYPE2, TABLET]],
|
43388
|
+
[
|
43389
|
+
/\b(nx\d{3}j) b/i
|
43390
|
+
// ZTE Nubia
|
43391
|
+
],
|
43392
|
+
[MODEL, [VENDOR, "ZTE"], [TYPE2, MOBILE]],
|
43393
|
+
[
|
43394
|
+
/\b(gen\d{3}) b.+49h/i
|
43395
|
+
// Swiss GEN Mobile
|
43396
|
+
],
|
43397
|
+
[MODEL, [VENDOR, "Swiss"], [TYPE2, MOBILE]],
|
43398
|
+
[
|
43399
|
+
/\b(zur\d{3}) b/i
|
43400
|
+
// Swiss ZUR Tablet
|
43401
|
+
],
|
43402
|
+
[MODEL, [VENDOR, "Swiss"], [TYPE2, TABLET]],
|
43403
|
+
[
|
43404
|
+
/\b((zeki)?tb.*\b) b/i
|
43405
|
+
// Zeki Tablets
|
43406
|
+
],
|
43407
|
+
[MODEL, [VENDOR, "Zeki"], [TYPE2, TABLET]],
|
43408
|
+
[
|
43409
|
+
/\b([yr]\d{2}) b/i,
|
43410
|
+
/\b(dragon[- ]+touch |dt)(\w{5}) b/i
|
43411
|
+
// Dragon Touch Tablet
|
43412
|
+
],
|
43413
|
+
[[VENDOR, "Dragon Touch"], MODEL, [TYPE2, TABLET]],
|
43414
|
+
[
|
43415
|
+
/\b(ns-?\w{0,9}) b/i
|
43416
|
+
// Insignia Tablets
|
43417
|
+
],
|
43418
|
+
[MODEL, [VENDOR, "Insignia"], [TYPE2, TABLET]],
|
43419
|
+
[
|
43420
|
+
/\b((nxa|next)-?\w{0,9}) b/i
|
43421
|
+
// NextBook Tablets
|
43422
|
+
],
|
43423
|
+
[MODEL, [VENDOR, "NextBook"], [TYPE2, TABLET]],
|
43424
|
+
[
|
43425
|
+
/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i
|
43426
|
+
// Voice Xtreme Phones
|
43427
|
+
],
|
43428
|
+
[[VENDOR, "Voice"], MODEL, [TYPE2, MOBILE]],
|
43429
|
+
[
|
43430
|
+
/\b(lvtel\-)?(v1[12]) b/i
|
43431
|
+
// LvTel Phones
|
43432
|
+
],
|
43433
|
+
[[VENDOR, "LvTel"], MODEL, [TYPE2, MOBILE]],
|
43434
|
+
[
|
43435
|
+
/\b(ph-1) /i
|
43436
|
+
// Essential PH-1
|
43437
|
+
],
|
43438
|
+
[MODEL, [VENDOR, "Essential"], [TYPE2, MOBILE]],
|
43439
|
+
[
|
43440
|
+
/\b(v(100md|700na|7011|917g).*\b) b/i
|
43441
|
+
// Envizen Tablets
|
43442
|
+
],
|
43443
|
+
[MODEL, [VENDOR, "Envizen"], [TYPE2, TABLET]],
|
43444
|
+
[
|
43445
|
+
/\b(trio[-\w\. ]+) b/i
|
43446
|
+
// MachSpeed Tablets
|
43447
|
+
],
|
43448
|
+
[MODEL, [VENDOR, "MachSpeed"], [TYPE2, TABLET]],
|
43449
|
+
[
|
43450
|
+
/\btu_(1491) b/i
|
43451
|
+
// Rotor Tablets
|
43452
|
+
],
|
43453
|
+
[MODEL, [VENDOR, "Rotor"], [TYPE2, TABLET]],
|
43454
|
+
[
|
43455
|
+
/(shield[\w ]+) b/i
|
43456
|
+
// Nvidia Shield Tablets
|
43457
|
+
],
|
43458
|
+
[MODEL, [VENDOR, "Nvidia"], [TYPE2, TABLET]],
|
43459
|
+
[
|
43460
|
+
/(sprint) (\w+)/i
|
43461
|
+
// Sprint Phones
|
43462
|
+
],
|
43463
|
+
[VENDOR, MODEL, [TYPE2, MOBILE]],
|
43464
|
+
[
|
43465
|
+
/(kin\.[onetw]{3})/i
|
43466
|
+
// Microsoft Kin
|
43467
|
+
],
|
43468
|
+
[[MODEL, /\./g, " "], [VENDOR, MICROSOFT], [TYPE2, MOBILE]],
|
43469
|
+
[
|
43470
|
+
/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
|
43471
|
+
// Zebra
|
43472
|
+
],
|
43473
|
+
[MODEL, [VENDOR, ZEBRA], [TYPE2, TABLET]],
|
43474
|
+
[
|
43475
|
+
/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
|
43476
|
+
],
|
43477
|
+
[MODEL, [VENDOR, ZEBRA], [TYPE2, MOBILE]],
|
43478
|
+
[
|
43479
|
+
///////////////////
|
43480
|
+
// SMARTTVS
|
43481
|
+
///////////////////
|
43482
|
+
/smart-tv.+(samsung)/i
|
43483
|
+
// Samsung
|
43484
|
+
],
|
43485
|
+
[VENDOR, [TYPE2, SMARTTV]],
|
43486
|
+
[
|
43487
|
+
/hbbtv.+maple;(\d+)/i
|
43488
|
+
],
|
43489
|
+
[[MODEL, /^/, "SmartTV"], [VENDOR, SAMSUNG], [TYPE2, SMARTTV]],
|
43490
|
+
[
|
43491
|
+
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
43492
|
+
// LG SmartTV
|
43493
|
+
],
|
43494
|
+
[[VENDOR, LG], [TYPE2, SMARTTV]],
|
43495
|
+
[
|
43496
|
+
/(apple) ?tv/i
|
43497
|
+
// Apple TV
|
43498
|
+
],
|
43499
|
+
[VENDOR, [MODEL, APPLE + " TV"], [TYPE2, SMARTTV]],
|
43500
|
+
[
|
43501
|
+
/crkey/i
|
43502
|
+
// Google Chromecast
|
43503
|
+
],
|
43504
|
+
[[MODEL, CHROME + "cast"], [VENDOR, GOOGLE], [TYPE2, SMARTTV]],
|
43505
|
+
[
|
43506
|
+
/droid.+aft(\w+)( bui|\))/i
|
43507
|
+
// Fire TV
|
43508
|
+
],
|
43509
|
+
[MODEL, [VENDOR, AMAZON], [TYPE2, SMARTTV]],
|
43510
|
+
[
|
43511
|
+
/\(dtv[\);].+(aquos)/i,
|
43512
|
+
/(aquos-tv[\w ]+)\)/i
|
43513
|
+
// Sharp
|
43514
|
+
],
|
43515
|
+
[MODEL, [VENDOR, SHARP], [TYPE2, SMARTTV]],
|
43516
|
+
[
|
43517
|
+
/(bravia[\w ]+)( bui|\))/i
|
43518
|
+
// Sony
|
43519
|
+
],
|
43520
|
+
[MODEL, [VENDOR, SONY], [TYPE2, SMARTTV]],
|
43521
|
+
[
|
43522
|
+
/(mitv-\w{5}) bui/i
|
43523
|
+
// Xiaomi
|
43524
|
+
],
|
43525
|
+
[MODEL, [VENDOR, XIAOMI], [TYPE2, SMARTTV]],
|
43526
|
+
[
|
43527
|
+
/Hbbtv.*(technisat) (.*);/i
|
43528
|
+
// TechniSAT
|
43529
|
+
],
|
43530
|
+
[VENDOR, MODEL, [TYPE2, SMARTTV]],
|
43531
|
+
[
|
43532
|
+
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
|
43533
|
+
// Roku
|
43534
|
+
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
|
43535
|
+
// HbbTV devices
|
43536
|
+
],
|
43537
|
+
[[VENDOR, trim], [MODEL, trim], [TYPE2, SMARTTV]],
|
43538
|
+
[
|
43539
|
+
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
|
43540
|
+
// SmartTV from Unidentified Vendors
|
43541
|
+
],
|
43542
|
+
[[TYPE2, SMARTTV]],
|
43543
|
+
[
|
43544
|
+
///////////////////
|
43545
|
+
// CONSOLES
|
43546
|
+
///////////////////
|
43547
|
+
/(ouya)/i,
|
43548
|
+
// Ouya
|
43549
|
+
/(nintendo) ([wids3utch]+)/i
|
43550
|
+
// Nintendo
|
43551
|
+
],
|
43552
|
+
[VENDOR, MODEL, [TYPE2, CONSOLE]],
|
43553
|
+
[
|
43554
|
+
/droid.+; (shield) bui/i
|
43555
|
+
// Nvidia
|
43556
|
+
],
|
43557
|
+
[MODEL, [VENDOR, "Nvidia"], [TYPE2, CONSOLE]],
|
43558
|
+
[
|
43559
|
+
/(playstation [345portablevi]+)/i
|
43560
|
+
// Playstation
|
43561
|
+
],
|
43562
|
+
[MODEL, [VENDOR, SONY], [TYPE2, CONSOLE]],
|
43563
|
+
[
|
43564
|
+
/\b(xbox(?: one)?(?!; xbox))[\); ]/i
|
43565
|
+
// Microsoft Xbox
|
43566
|
+
],
|
43567
|
+
[MODEL, [VENDOR, MICROSOFT], [TYPE2, CONSOLE]],
|
43568
|
+
[
|
43569
|
+
///////////////////
|
43570
|
+
// WEARABLES
|
43571
|
+
///////////////////
|
43572
|
+
/((pebble))app/i
|
43573
|
+
// Pebble
|
43574
|
+
],
|
43575
|
+
[VENDOR, MODEL, [TYPE2, WEARABLE]],
|
43576
|
+
[
|
43577
|
+
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
|
43578
|
+
// Apple Watch
|
43579
|
+
],
|
43580
|
+
[MODEL, [VENDOR, APPLE], [TYPE2, WEARABLE]],
|
43581
|
+
[
|
43582
|
+
/droid.+; (glass) \d/i
|
43583
|
+
// Google Glass
|
43584
|
+
],
|
43585
|
+
[MODEL, [VENDOR, GOOGLE], [TYPE2, WEARABLE]],
|
43586
|
+
[
|
43587
|
+
/droid.+; (wt63?0{2,3})\)/i
|
43588
|
+
],
|
43589
|
+
[MODEL, [VENDOR, ZEBRA], [TYPE2, WEARABLE]],
|
43590
|
+
[
|
43591
|
+
/(quest( 2| pro)?)/i
|
43592
|
+
// Oculus Quest
|
43593
|
+
],
|
43594
|
+
[MODEL, [VENDOR, FACEBOOK], [TYPE2, WEARABLE]],
|
43595
|
+
[
|
43596
|
+
///////////////////
|
43597
|
+
// EMBEDDED
|
43598
|
+
///////////////////
|
43599
|
+
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
|
43600
|
+
// Tesla
|
43601
|
+
],
|
43602
|
+
[VENDOR, [TYPE2, EMBEDDED]],
|
43603
|
+
[
|
43604
|
+
/(aeobc)\b/i
|
43605
|
+
// Echo Dot
|
43606
|
+
],
|
43607
|
+
[MODEL, [VENDOR, AMAZON], [TYPE2, EMBEDDED]],
|
43608
|
+
[
|
43609
|
+
////////////////////
|
43610
|
+
// MIXED (GENERIC)
|
43611
|
+
///////////////////
|
43612
|
+
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
|
43613
|
+
// Android Phones from Unidentified Vendors
|
43614
|
+
],
|
43615
|
+
[MODEL, [TYPE2, MOBILE]],
|
43616
|
+
[
|
43617
|
+
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
|
43618
|
+
// Android Tablets from Unidentified Vendors
|
43619
|
+
],
|
43620
|
+
[MODEL, [TYPE2, TABLET]],
|
43621
|
+
[
|
43622
|
+
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
|
43623
|
+
// Unidentifiable Tablet
|
43624
|
+
],
|
43625
|
+
[[TYPE2, TABLET]],
|
43626
|
+
[
|
43627
|
+
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
|
43628
|
+
// Unidentifiable Mobile
|
43629
|
+
],
|
43630
|
+
[[TYPE2, MOBILE]],
|
43631
|
+
[
|
43632
|
+
/(android[-\w\. ]{0,9});.+buil/i
|
43633
|
+
// Generic Android Device
|
43634
|
+
],
|
43635
|
+
[MODEL, [VENDOR, "Generic"]]
|
43636
|
+
],
|
43637
|
+
engine: [
|
43638
|
+
[
|
43639
|
+
/windows.+ edge\/([\w\.]+)/i
|
43640
|
+
// EdgeHTML
|
43641
|
+
],
|
43642
|
+
[VERSION, [NAME, EDGE + "HTML"]],
|
43643
|
+
[
|
43644
|
+
/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
|
43645
|
+
// Blink
|
43646
|
+
],
|
43647
|
+
[VERSION, [NAME, "Blink"]],
|
43648
|
+
[
|
43649
|
+
/(presto)\/([\w\.]+)/i,
|
43650
|
+
// Presto
|
43651
|
+
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
|
43652
|
+
// WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
|
43653
|
+
/ekioh(flow)\/([\w\.]+)/i,
|
43654
|
+
// Flow
|
43655
|
+
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
|
43656
|
+
// KHTML/Tasman/Links
|
43657
|
+
/(icab)[\/ ]([23]\.[\d\.]+)/i,
|
43658
|
+
// iCab
|
43659
|
+
/\b(libweb)/i
|
43660
|
+
],
|
43661
|
+
[NAME, VERSION],
|
43662
|
+
[
|
43663
|
+
/rv\:([\w\.]{1,9})\b.+(gecko)/i
|
43664
|
+
// Gecko
|
43665
|
+
],
|
43666
|
+
[VERSION, NAME]
|
43667
|
+
],
|
43668
|
+
os: [
|
43669
|
+
[
|
43670
|
+
// Windows
|
43671
|
+
/microsoft (windows) (vista|xp)/i
|
43672
|
+
// Windows (iTunes)
|
43673
|
+
],
|
43674
|
+
[NAME, VERSION],
|
43675
|
+
[
|
43676
|
+
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
|
43677
|
+
// Windows Phone
|
43678
|
+
],
|
43679
|
+
[NAME, [VERSION, strMapper, windowsVersionMap]],
|
43680
|
+
[
|
43681
|
+
/windows nt 6\.2; (arm)/i,
|
43682
|
+
// Windows RT
|
43683
|
+
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
43684
|
+
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
43685
|
+
],
|
43686
|
+
[[VERSION, strMapper, windowsVersionMap], [NAME, "Windows"]],
|
43687
|
+
[
|
43688
|
+
// iOS/macOS
|
43689
|
+
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
43690
|
+
// iOS
|
43691
|
+
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
|
43692
|
+
/cfnetwork\/.+darwin/i
|
43693
|
+
],
|
43694
|
+
[[VERSION, /_/g, "."], [NAME, "iOS"]],
|
43695
|
+
[
|
43696
|
+
/(mac os x) ?([\w\. ]*)/i,
|
43697
|
+
/(macintosh|mac_powerpc\b)(?!.+haiku)/i
|
43698
|
+
// Mac OS
|
43699
|
+
],
|
43700
|
+
[[NAME, MAC_OS], [VERSION, /_/g, "."]],
|
43701
|
+
[
|
43702
|
+
// Mobile OSes
|
43703
|
+
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
|
43704
|
+
// Android-x86/HarmonyOS
|
43705
|
+
],
|
43706
|
+
[VERSION, NAME],
|
43707
|
+
[
|
43708
|
+
// Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
|
43709
|
+
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
|
43710
|
+
/(blackberry)\w*\/([\w\.]*)/i,
|
43711
|
+
// Blackberry
|
43712
|
+
/(tizen|kaios)[\/ ]([\w\.]+)/i,
|
43713
|
+
// Tizen/KaiOS
|
43714
|
+
/\((series40);/i
|
43715
|
+
// Series 40
|
43716
|
+
],
|
43717
|
+
[NAME, VERSION],
|
43718
|
+
[
|
43719
|
+
/\(bb(10);/i
|
43720
|
+
// BlackBerry 10
|
43721
|
+
],
|
43722
|
+
[VERSION, [NAME, BLACKBERRY]],
|
43723
|
+
[
|
43724
|
+
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
|
43725
|
+
// Symbian
|
43726
|
+
],
|
43727
|
+
[VERSION, [NAME, "Symbian"]],
|
43728
|
+
[
|
43729
|
+
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
|
43730
|
+
// Firefox OS
|
43731
|
+
],
|
43732
|
+
[VERSION, [NAME, FIREFOX + " OS"]],
|
43733
|
+
[
|
43734
|
+
/web0s;.+rt(tv)/i,
|
43735
|
+
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
|
43736
|
+
// WebOS
|
43737
|
+
],
|
43738
|
+
[VERSION, [NAME, "webOS"]],
|
43739
|
+
[
|
43740
|
+
/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
|
43741
|
+
// watchOS
|
43742
|
+
],
|
43743
|
+
[VERSION, [NAME, "watchOS"]],
|
43744
|
+
[
|
43745
|
+
// Google Chromecast
|
43746
|
+
/crkey\/([\d\.]+)/i
|
43747
|
+
// Google Chromecast
|
43748
|
+
],
|
43749
|
+
[VERSION, [NAME, CHROME + "cast"]],
|
43750
|
+
[
|
43751
|
+
/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
|
43752
|
+
// Chromium OS
|
43753
|
+
],
|
43754
|
+
[[NAME, CHROMIUM_OS], VERSION],
|
43755
|
+
[
|
43756
|
+
// Smart TVs
|
43757
|
+
/panasonic;(viera)/i,
|
43758
|
+
// Panasonic Viera
|
43759
|
+
/(netrange)mmh/i,
|
43760
|
+
// Netrange
|
43761
|
+
/(nettv)\/(\d+\.[\w\.]+)/i,
|
43762
|
+
// NetTV
|
43763
|
+
// Console
|
43764
|
+
/(nintendo|playstation) ([wids345portablevuch]+)/i,
|
43765
|
+
// Nintendo/Playstation
|
43766
|
+
/(xbox); +xbox ([^\);]+)/i,
|
43767
|
+
// Microsoft Xbox (360, One, X, S, Series X, Series S)
|
43768
|
+
// Other
|
43769
|
+
/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
|
43770
|
+
// Joli/Palm
|
43771
|
+
/(mint)[\/\(\) ]?(\w*)/i,
|
43772
|
+
// Mint
|
43773
|
+
/(mageia|vectorlinux)[; ]/i,
|
43774
|
+
// Mageia/VectorLinux
|
43775
|
+
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
43776
|
+
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
|
43777
|
+
/(hurd|linux) ?([\w\.]*)/i,
|
43778
|
+
// Hurd/Linux
|
43779
|
+
/(gnu) ?([\w\.]*)/i,
|
43780
|
+
// GNU
|
43781
|
+
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
|
43782
|
+
// FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
|
43783
|
+
/(haiku) (\w+)/i
|
43784
|
+
// Haiku
|
43785
|
+
],
|
43786
|
+
[NAME, VERSION],
|
43787
|
+
[
|
43788
|
+
/(sunos) ?([\w\.\d]*)/i
|
43789
|
+
// Solaris
|
43790
|
+
],
|
43791
|
+
[[NAME, "Solaris"], VERSION],
|
43792
|
+
[
|
43793
|
+
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
|
43794
|
+
// Solaris
|
43795
|
+
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
|
43796
|
+
// AIX
|
43797
|
+
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
|
43798
|
+
// BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
|
43799
|
+
/(unix) ?([\w\.]*)/i
|
43800
|
+
// UNIX
|
43801
|
+
],
|
43802
|
+
[NAME, VERSION]
|
43803
|
+
]
|
43804
|
+
};
|
43805
|
+
var UAParser2 = function(ua, extensions) {
|
43806
|
+
if (typeof ua === OBJ_TYPE) {
|
43807
|
+
extensions = ua;
|
43808
|
+
ua = undefined2;
|
43809
|
+
}
|
43810
|
+
if (!(this instanceof UAParser2)) {
|
43811
|
+
return new UAParser2(ua, extensions).getResult();
|
43812
|
+
}
|
43813
|
+
var _navigator = typeof window2 !== UNDEF_TYPE && window2.navigator ? window2.navigator : undefined2;
|
43814
|
+
var _ua = ua || (_navigator && _navigator.userAgent ? _navigator.userAgent : EMPTY);
|
43815
|
+
var _uach = _navigator && _navigator.userAgentData ? _navigator.userAgentData : undefined2;
|
43816
|
+
var _rgxmap = extensions ? extend(regexes, extensions) : regexes;
|
43817
|
+
var _isSelfNav = _navigator && _navigator.userAgent == _ua;
|
43818
|
+
this.getBrowser = function() {
|
43819
|
+
var _browser = {};
|
43820
|
+
_browser[NAME] = undefined2;
|
43821
|
+
_browser[VERSION] = undefined2;
|
43822
|
+
rgxMapper.call(_browser, _ua, _rgxmap.browser);
|
43823
|
+
_browser[MAJOR] = majorize(_browser[VERSION]);
|
43824
|
+
if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) {
|
43825
|
+
_browser[NAME] = "Brave";
|
43826
|
+
}
|
43827
|
+
return _browser;
|
43828
|
+
};
|
43829
|
+
this.getCPU = function() {
|
43830
|
+
var _cpu = {};
|
43831
|
+
_cpu[ARCHITECTURE] = undefined2;
|
43832
|
+
rgxMapper.call(_cpu, _ua, _rgxmap.cpu);
|
43833
|
+
return _cpu;
|
43834
|
+
};
|
43835
|
+
this.getDevice = function() {
|
43836
|
+
var _device = {};
|
43837
|
+
_device[VENDOR] = undefined2;
|
43838
|
+
_device[MODEL] = undefined2;
|
43839
|
+
_device[TYPE2] = undefined2;
|
43840
|
+
rgxMapper.call(_device, _ua, _rgxmap.device);
|
43841
|
+
if (_isSelfNav && !_device[TYPE2] && _uach && _uach.mobile) {
|
43842
|
+
_device[TYPE2] = MOBILE;
|
43843
|
+
}
|
43844
|
+
if (_isSelfNav && _device[MODEL] == "Macintosh" && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) {
|
43845
|
+
_device[MODEL] = "iPad";
|
43846
|
+
_device[TYPE2] = TABLET;
|
43847
|
+
}
|
43848
|
+
return _device;
|
43849
|
+
};
|
43850
|
+
this.getEngine = function() {
|
43851
|
+
var _engine = {};
|
43852
|
+
_engine[NAME] = undefined2;
|
43853
|
+
_engine[VERSION] = undefined2;
|
43854
|
+
rgxMapper.call(_engine, _ua, _rgxmap.engine);
|
43855
|
+
return _engine;
|
43856
|
+
};
|
43857
|
+
this.getOS = function() {
|
43858
|
+
var _os = {};
|
43859
|
+
_os[NAME] = undefined2;
|
43860
|
+
_os[VERSION] = undefined2;
|
43861
|
+
rgxMapper.call(_os, _ua, _rgxmap.os);
|
43862
|
+
if (_isSelfNav && !_os[NAME] && _uach && _uach.platform != "Unknown") {
|
43863
|
+
_os[NAME] = _uach.platform.replace(/chrome os/i, CHROMIUM_OS).replace(/macos/i, MAC_OS);
|
43864
|
+
}
|
43865
|
+
return _os;
|
43866
|
+
};
|
43867
|
+
this.getResult = function() {
|
43868
|
+
return {
|
43869
|
+
ua: this.getUA(),
|
43870
|
+
browser: this.getBrowser(),
|
43871
|
+
engine: this.getEngine(),
|
43872
|
+
os: this.getOS(),
|
43873
|
+
device: this.getDevice(),
|
43874
|
+
cpu: this.getCPU()
|
43875
|
+
};
|
43876
|
+
};
|
43877
|
+
this.getUA = function() {
|
43878
|
+
return _ua;
|
43879
|
+
};
|
43880
|
+
this.setUA = function(ua2) {
|
43881
|
+
_ua = typeof ua2 === STR_TYPE && ua2.length > UA_MAX_LENGTH ? trim(ua2, UA_MAX_LENGTH) : ua2;
|
43882
|
+
return this;
|
43883
|
+
};
|
43884
|
+
this.setUA(_ua);
|
43885
|
+
return this;
|
43886
|
+
};
|
43887
|
+
UAParser2.VERSION = LIBVERSION;
|
43888
|
+
UAParser2.BROWSER = enumerize([NAME, VERSION, MAJOR]);
|
43889
|
+
UAParser2.CPU = enumerize([ARCHITECTURE]);
|
43890
|
+
UAParser2.DEVICE = enumerize([MODEL, VENDOR, TYPE2, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);
|
43891
|
+
UAParser2.ENGINE = UAParser2.OS = enumerize([NAME, VERSION]);
|
43892
|
+
if (typeof exports !== UNDEF_TYPE) {
|
43893
|
+
if (typeof module2 !== UNDEF_TYPE && module2.exports) {
|
43894
|
+
exports = module2.exports = UAParser2;
|
43895
|
+
}
|
43896
|
+
exports.UAParser = UAParser2;
|
43897
|
+
} else {
|
43898
|
+
if (typeof define === FUNC_TYPE && define.amd) {
|
43899
|
+
define(function() {
|
43900
|
+
return UAParser2;
|
43901
|
+
});
|
43902
|
+
} else if (typeof window2 !== UNDEF_TYPE) {
|
43903
|
+
window2.UAParser = UAParser2;
|
43904
|
+
}
|
43905
|
+
}
|
43906
|
+
var $ = typeof window2 !== UNDEF_TYPE && (window2.jQuery || window2.Zepto);
|
43907
|
+
if ($ && !$.ua) {
|
43908
|
+
var parser = new UAParser2();
|
43909
|
+
$.ua = parser.getResult();
|
43910
|
+
$.ua.get = function() {
|
43911
|
+
return parser.getUA();
|
43912
|
+
};
|
43913
|
+
$.ua.set = function(ua) {
|
43914
|
+
parser.setUA(ua);
|
43915
|
+
var result = parser.getResult();
|
43916
|
+
for (var prop in result) {
|
43917
|
+
$.ua[prop] = result[prop];
|
43918
|
+
}
|
43919
|
+
};
|
43920
|
+
}
|
43921
|
+
})(typeof window === "object" ? window : exports);
|
43922
|
+
}
|
43923
|
+
});
|
43924
|
+
|
41148
43925
|
// ../../node_modules/use-debounce/dist/index.module.js
|
41149
43926
|
var index_module_exports = {};
|
41150
43927
|
__export(index_module_exports, {
|
@@ -43089,6 +45866,26 @@ var require_dist = __commonJS({
|
|
43089
45866
|
mod
|
43090
45867
|
));
|
43091
45868
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
45869
|
+
var __async2 = (__this, __arguments, generator) => {
|
45870
|
+
return new Promise((resolve, reject) => {
|
45871
|
+
var fulfilled = (value) => {
|
45872
|
+
try {
|
45873
|
+
step(generator.next(value));
|
45874
|
+
} catch (e2) {
|
45875
|
+
reject(e2);
|
45876
|
+
}
|
45877
|
+
};
|
45878
|
+
var rejected = (value) => {
|
45879
|
+
try {
|
45880
|
+
step(generator.throw(value));
|
45881
|
+
} catch (e2) {
|
45882
|
+
reject(e2);
|
45883
|
+
}
|
45884
|
+
};
|
45885
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
45886
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
45887
|
+
});
|
45888
|
+
};
|
43092
45889
|
var auto_frame_component_exports = {};
|
43093
45890
|
__export2(auto_frame_component_exports, {
|
43094
45891
|
default: () => AutoFrameComponent_default
|
@@ -43107,6 +45904,23 @@ var require_dist = __commonJS({
|
|
43107
45904
|
});
|
43108
45905
|
return collected;
|
43109
45906
|
};
|
45907
|
+
var getStyleSheet = (el) => {
|
45908
|
+
return Array.from(document.styleSheets).find((ss) => ss.ownerNode === el);
|
45909
|
+
};
|
45910
|
+
var getStyles2 = (styleSheet) => {
|
45911
|
+
if (styleSheet) {
|
45912
|
+
try {
|
45913
|
+
return [...styleSheet.cssRules].map((rule) => rule.cssText).join("");
|
45914
|
+
} catch (e2) {
|
45915
|
+
console.warn(
|
45916
|
+
"Access to stylesheet %s is denied. Ignoring\u2026",
|
45917
|
+
styleSheet.href
|
45918
|
+
);
|
45919
|
+
}
|
45920
|
+
}
|
45921
|
+
return "";
|
45922
|
+
};
|
45923
|
+
var defer = (fn) => setTimeout(fn, 0);
|
43110
45924
|
var CopyHostStyles = ({
|
43111
45925
|
children,
|
43112
45926
|
debug = false,
|
@@ -43121,7 +45935,7 @@ var require_dist = __commonJS({
|
|
43121
45935
|
const elements = [];
|
43122
45936
|
const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
|
43123
45937
|
const addEl = (el, onLoad = () => {
|
43124
|
-
}) => {
|
45938
|
+
}) => __async2(void 0, null, function* () {
|
43125
45939
|
const index = lookupEl(el);
|
43126
45940
|
if (index > -1) {
|
43127
45941
|
if (debug)
|
@@ -43132,10 +45946,34 @@ var require_dist = __commonJS({
|
|
43132
45946
|
onLoad();
|
43133
45947
|
return;
|
43134
45948
|
}
|
43135
|
-
|
45949
|
+
let mirror;
|
45950
|
+
if (el.nodeName === "LINK") {
|
45951
|
+
mirror = document.createElement("style");
|
45952
|
+
mirror.type = "text/css";
|
45953
|
+
let styleSheet = getStyleSheet(el);
|
45954
|
+
if (!styleSheet) {
|
45955
|
+
yield new Promise((resolve) => el.onload = resolve);
|
45956
|
+
styleSheet = getStyleSheet(el);
|
45957
|
+
}
|
45958
|
+
const styles = getStyles2(styleSheet);
|
45959
|
+
if (!styles) {
|
45960
|
+
if (debug) {
|
45961
|
+
console.warn(
|
45962
|
+
`Tried to load styles for link element, but couldn't find them. Skipping...`
|
45963
|
+
);
|
45964
|
+
}
|
45965
|
+
onLoad();
|
45966
|
+
return;
|
45967
|
+
}
|
45968
|
+
mirror.innerHTML = styles;
|
45969
|
+
mirror.setAttribute("data-href", el.getAttribute("href"));
|
45970
|
+
} else {
|
45971
|
+
mirror = el.cloneNode(true);
|
45972
|
+
}
|
45973
|
+
const elHash = (0, import_object_hash.default)(mirror.outerHTML);
|
43136
45974
|
const existingHashes = collectStyles(doc).map(
|
43137
|
-
(existingStyle) => (0, import_object_hash.default)(existingStyle.outerHTML)
|
43138
|
-
);
|
45975
|
+
(existingStyle) => existingStyle !== mirror && (0, import_object_hash.default)(existingStyle.outerHTML)
|
45976
|
+
).filter(Boolean);
|
43139
45977
|
if (existingHashes.indexOf(elHash) > -1) {
|
43140
45978
|
if (debug)
|
43141
45979
|
console.log(
|
@@ -43144,13 +45982,12 @@ var require_dist = __commonJS({
|
|
43144
45982
|
onLoad();
|
43145
45983
|
return;
|
43146
45984
|
}
|
43147
|
-
const mirror = el.cloneNode(true);
|
43148
45985
|
mirror.onload = onLoad;
|
43149
45986
|
doc.head.append(mirror);
|
43150
45987
|
elements.push({ original: el, mirror });
|
43151
45988
|
if (debug)
|
43152
45989
|
console.log(`Added style node ${el.outerHTML}`);
|
43153
|
-
};
|
45990
|
+
});
|
43154
45991
|
const removeEl = (el) => {
|
43155
45992
|
const index = lookupEl(el);
|
43156
45993
|
if (index === -1) {
|
@@ -43171,7 +46008,7 @@ var require_dist = __commonJS({
|
|
43171
46008
|
if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
|
43172
46009
|
const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
|
43173
46010
|
if (el && el.matches(styleSelector)) {
|
43174
|
-
addEl(el);
|
46011
|
+
defer(() => addEl(el));
|
43175
46012
|
}
|
43176
46013
|
}
|
43177
46014
|
});
|
@@ -43179,7 +46016,7 @@ var require_dist = __commonJS({
|
|
43179
46016
|
if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
|
43180
46017
|
const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
|
43181
46018
|
if (el && el.matches(styleSelector)) {
|
43182
|
-
removeEl(el);
|
46019
|
+
defer(() => removeEl(el));
|
43183
46020
|
}
|
43184
46021
|
}
|
43185
46022
|
});
|
@@ -43190,12 +46027,14 @@ var require_dist = __commonJS({
|
|
43190
46027
|
const collectedStyles = collectStyles(parentDocument);
|
43191
46028
|
let mountedCounter = 0;
|
43192
46029
|
collectedStyles.forEach((styleNode) => {
|
43193
|
-
|
43194
|
-
|
43195
|
-
|
43196
|
-
|
43197
|
-
|
43198
|
-
|
46030
|
+
defer(
|
46031
|
+
() => addEl(styleNode, () => {
|
46032
|
+
mountedCounter += 1;
|
46033
|
+
if (mountedCounter === collectedStyles.length) {
|
46034
|
+
onStylesLoaded();
|
46035
|
+
}
|
46036
|
+
})
|
46037
|
+
);
|
43199
46038
|
});
|
43200
46039
|
observer.observe(parentDocument.head, { childList: true, subtree: true });
|
43201
46040
|
return () => {
|
@@ -43204,10 +46043,14 @@ var require_dist = __commonJS({
|
|
43204
46043
|
}, []);
|
43205
46044
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children });
|
43206
46045
|
};
|
43207
|
-
var
|
43208
|
-
|
43209
|
-
|
43210
|
-
|
46046
|
+
var AutoFrameComponent = import_react22.default.forwardRef(
|
46047
|
+
function(_a3, ref2) {
|
46048
|
+
var _b = _a3, { children, debug, onStylesLoaded } = _b, props = __objRest2(_b, ["children", "debug", "onStylesLoaded"]);
|
46049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_frame_component.default, __spreadProps2(__spreadValues2({}, props), { ref: ref2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CopyHostStyles, { debug, onStylesLoaded, children }) }));
|
46050
|
+
}
|
46051
|
+
);
|
46052
|
+
AutoFrameComponent.displayName = "AutoFrameComponent";
|
46053
|
+
var AutoFrameComponent_default = AutoFrameComponent;
|
43211
46054
|
}
|
43212
46055
|
});
|
43213
46056
|
|
@@ -43746,7 +46589,7 @@ var require_dist2 = __commonJS({
|
|
43746
46589
|
mod
|
43747
46590
|
));
|
43748
46591
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
43749
|
-
var
|
46592
|
+
var __async2 = (__this, __arguments, generator) => {
|
43750
46593
|
return new Promise((resolve, reject) => {
|
43751
46594
|
var fulfilled = (value) => {
|
43752
46595
|
try {
|
@@ -66789,7 +69632,7 @@ var require_dist2 = __commonJS({
|
|
66789
69632
|
break;
|
66790
69633
|
}
|
66791
69634
|
case "backwards": {
|
66792
|
-
var
|
69635
|
+
var _tail2 = null;
|
66793
69636
|
var row = workInProgress2.child;
|
66794
69637
|
workInProgress2.child = null;
|
66795
69638
|
while (row !== null) {
|
@@ -66799,15 +69642,15 @@ var require_dist2 = __commonJS({
|
|
66799
69642
|
break;
|
66800
69643
|
}
|
66801
69644
|
var nextRow = row.sibling;
|
66802
|
-
row.sibling =
|
66803
|
-
|
69645
|
+
row.sibling = _tail2;
|
69646
|
+
_tail2 = row;
|
66804
69647
|
row = nextRow;
|
66805
69648
|
}
|
66806
69649
|
initSuspenseListRenderState(
|
66807
69650
|
workInProgress2,
|
66808
69651
|
true,
|
66809
69652
|
// isBackwards
|
66810
|
-
|
69653
|
+
_tail2,
|
66811
69654
|
null,
|
66812
69655
|
// last
|
66813
69656
|
tailMode
|
@@ -70453,10 +73296,10 @@ var require_dist2 = __commonJS({
|
|
70453
73296
|
return;
|
70454
73297
|
}
|
70455
73298
|
} else {
|
70456
|
-
var
|
70457
|
-
if (
|
70458
|
-
|
70459
|
-
workInProgress =
|
73299
|
+
var _next2 = unwindWork(current2, completedWork);
|
73300
|
+
if (_next2 !== null) {
|
73301
|
+
_next2.flags &= HostEffectMask;
|
73302
|
+
workInProgress = _next2;
|
70460
73303
|
return;
|
70461
73304
|
}
|
70462
73305
|
if ((completedWork.mode & ProfileMode) !== NoMode) {
|
@@ -72937,10 +75780,10 @@ var require_dist2 = __commonJS({
|
|
72937
75780
|
var getItem2 = (selector, data, dynamicProps = {}) => {
|
72938
75781
|
if (!selector.zone || selector.zone === rootDroppableId2) {
|
72939
75782
|
const item2 = data.content[selector.index];
|
72940
|
-
return __spreadProps2(__spreadValues2({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
|
75783
|
+
return (item2 == null ? void 0 : item2.props) ? __spreadProps2(__spreadValues2({}, item2), { props: dynamicProps[item2.props.id] || item2.props }) : void 0;
|
72941
75784
|
}
|
72942
75785
|
const item = setupZone2(data, selector.zone).zones[selector.zone][selector.index];
|
72943
|
-
return __spreadProps2(__spreadValues2({}, item), { props: dynamicProps[item.props.id] || item.props });
|
75786
|
+
return (item == null ? void 0 : item.props) ? __spreadProps2(__spreadValues2({}, item), { props: dynamicProps[item.props.id] || item.props }) : void 0;
|
72944
75787
|
};
|
72945
75788
|
init_react_import2();
|
72946
75789
|
var defaultViewports2 = [
|
@@ -72948,6 +75791,7 @@ var require_dist2 = __commonJS({
|
|
72948
75791
|
{ width: 768, height: "auto", icon: "Tablet", label: "Medium" },
|
72949
75792
|
{ width: 1280, height: "auto", icon: "Monitor", label: "Large" }
|
72950
75793
|
];
|
75794
|
+
var import_ua_parser_js2 = require_ua_parser();
|
72951
75795
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
72952
75796
|
var defaultAppState2 = {
|
72953
75797
|
data: { content: [], root: { props: { title: "" } } },
|
@@ -72987,7 +75831,8 @@ var require_dist2 = __commonJS({
|
|
72987
75831
|
setZoomConfig: () => null,
|
72988
75832
|
status: "LOADING",
|
72989
75833
|
setStatus: () => null,
|
72990
|
-
iframe: {}
|
75834
|
+
iframe: {},
|
75835
|
+
safariFallbackMode: false
|
72991
75836
|
};
|
72992
75837
|
var appContext2 = (0, import_react32.createContext)(defaultContext2);
|
72993
75838
|
var AppProvider = ({
|
@@ -72999,10 +75844,34 @@ var require_dist2 = __commonJS({
|
|
72999
75844
|
(0, import_react32.useEffect)(() => {
|
73000
75845
|
setStatus("MOUNTED");
|
73001
75846
|
}, []);
|
75847
|
+
const [safariFallbackMode, setSafariFallbackMode] = (0, import_react32.useState)(false);
|
75848
|
+
(0, import_react32.useEffect)(() => {
|
75849
|
+
var _a3, _b, _c;
|
75850
|
+
const ua = new import_ua_parser_js2.UAParser(navigator.userAgent);
|
75851
|
+
const { browser } = ua.getResult();
|
75852
|
+
if (browser.name === "Safari" && (((_a3 = browser.version) == null ? void 0 : _a3.indexOf("17.2.")) || ((_b = browser.version) == null ? void 0 : _b.indexOf("17.3.")) || ((_c = browser.version) == null ? void 0 : _c.indexOf("17.4.")))) {
|
75853
|
+
if (process.env.NODE_ENV !== "production" && value.iframe.enabled) {
|
75854
|
+
console.warn(
|
75855
|
+
`Detected Safari ${browser.version}, which contains a bug that prevents Puck DropZones from detecting a mouseover event within an iframe. This affects Safari versions 17.2, 17.3 and 17.4.
|
75856
|
+
|
75857
|
+
Running in compatibility mode, which may have some DropZone side-effects. Alternatively, consider disabling iframes: https://puckeditor.com/docs/integrating-puck/viewports#opting-out-of-iframes.
|
75858
|
+
|
75859
|
+
See https://github.com/measuredco/puck/issues/411 for more information. This message will not show in production.`
|
75860
|
+
);
|
75861
|
+
}
|
75862
|
+
setSafariFallbackMode(true);
|
75863
|
+
}
|
75864
|
+
}, []);
|
73002
75865
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
73003
75866
|
appContext2.Provider,
|
73004
75867
|
{
|
73005
|
-
value: __spreadProps2(__spreadValues2({}, value), {
|
75868
|
+
value: __spreadProps2(__spreadValues2({}, value), {
|
75869
|
+
zoomConfig,
|
75870
|
+
setZoomConfig,
|
75871
|
+
status,
|
75872
|
+
setStatus,
|
75873
|
+
safariFallbackMode
|
75874
|
+
}),
|
73006
75875
|
children
|
73007
75876
|
}
|
73008
75877
|
);
|
@@ -73084,7 +75953,7 @@ var require_dist2 = __commonJS({
|
|
73084
75953
|
const { status } = useAppContext2();
|
73085
75954
|
const El = status !== "LOADING" ? import_dnd2.Draggable : DefaultDraggable;
|
73086
75955
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(El, { draggableId: id, index, isDragDisabled, children: (provided, snapshot) => {
|
73087
|
-
var
|
75956
|
+
var _a3;
|
73088
75957
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
73089
75958
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
73090
75959
|
"div",
|
@@ -73093,7 +75962,7 @@ var require_dist2 = __commonJS({
|
|
73093
75962
|
ref: provided.innerRef
|
73094
75963
|
}, provided.draggableProps), provided.dragHandleProps), {
|
73095
75964
|
style: __spreadProps2(__spreadValues2({}, provided.draggableProps.style), {
|
73096
|
-
transform: snapshot.isDragging || !disableAnimations ? (
|
75965
|
+
transform: snapshot.isDragging || !disableAnimations ? (_a3 = provided.draggableProps.style) == null ? void 0 : _a3.transform : "translate(0px, 0px)"
|
73097
75966
|
}),
|
73098
75967
|
children: children(provided, snapshot)
|
73099
75968
|
})
|
@@ -73198,7 +76067,7 @@ var require_dist2 = __commonJS({
|
|
73198
76067
|
var import_react72 = require("react");
|
73199
76068
|
var import_dnd3 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
|
73200
76069
|
init_react_import2();
|
73201
|
-
var styles_module_default32 = { "DraggableComponent": "
|
76070
|
+
var styles_module_default32 = { "DraggableComponent": "_DraggableComponent_59z7f_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_59z7f_11", "DraggableComponent-contents": "_DraggableComponent-contents_59z7f_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_59z7f_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_59z7f_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_59z7f_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_59z7f_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_59z7f_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_59z7f_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_59z7f_97", "DraggableComponent-actions": "_DraggableComponent-actions_59z7f_97", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_59z7f_127", "DraggableComponent-action": "_DraggableComponent-action_59z7f_97" };
|
73202
76071
|
init_react_import2();
|
73203
76072
|
init_react_import2();
|
73204
76073
|
var import_react52 = require("react");
|
@@ -73217,8 +76086,8 @@ var require_dist2 = __commonJS({
|
|
73217
76086
|
var toKebabCase2 = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
|
73218
76087
|
var createLucideIcon2 = (iconName, iconNode) => {
|
73219
76088
|
const Component = (0, import_react52.forwardRef)(
|
73220
|
-
(
|
73221
|
-
var _b =
|
76089
|
+
(_a3, ref2) => {
|
76090
|
+
var _b = _a3, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest2(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
|
73222
76091
|
return (0, import_react52.createElement)(
|
73223
76092
|
"svg",
|
73224
76093
|
__spreadValues2(__spreadProps2(__spreadValues2({
|
@@ -73539,7 +76408,7 @@ var require_dist2 = __commonJS({
|
|
73539
76408
|
);
|
73540
76409
|
};
|
73541
76410
|
init_react_import2();
|
73542
|
-
var styles_module_default42 = { "DropZone": "
|
76411
|
+
var styles_module_default42 = { "DropZone": "_DropZone_djoti_1", "DropZone-content": "_DropZone-content_djoti_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_djoti_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_djoti_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_djoti_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_djoti_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_djoti_27", "DropZone--isDisabled": "_DropZone--isDisabled_djoti_28", "DropZone--isRootZone": "_DropZone--isRootZone_djoti_29", "DropZone--hasChildren": "_DropZone--hasChildren_djoti_30", "DropZone--isDestination": "_DropZone--isDestination_djoti_40", "DropZone-item": "_DropZone-item_djoti_52", "DropZone-hitbox": "_DropZone-hitbox_djoti_56" };
|
73543
76412
|
init_react_import2();
|
73544
76413
|
var import_react82 = require("react");
|
73545
76414
|
var import_use_debounce = (init_index_module(), __toCommonJS(index_module_exports));
|
@@ -73658,7 +76527,7 @@ var require_dist2 = __commonJS({
|
|
73658
76527
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
73659
76528
|
var getClassName5 = get_class_name_factory_default2("DropZone", styles_module_default42);
|
73660
76529
|
function DropZoneEdit({ zone, allow, disallow, style: style2 }) {
|
73661
|
-
var
|
76530
|
+
var _a3;
|
73662
76531
|
const appContext22 = useAppContext2();
|
73663
76532
|
const ctx = (0, import_react92.useContext)(dropZoneContext2);
|
73664
76533
|
const {
|
@@ -73702,7 +76571,7 @@ var require_dist2 = __commonJS({
|
|
73702
76571
|
}
|
73703
76572
|
const isRootZone = zoneCompound === rootDroppableId2 || zone === rootDroppableId2 || areaId === "root";
|
73704
76573
|
const draggedSourceId = draggedItem && draggedItem.source.droppableId;
|
73705
|
-
const draggedDestinationId = draggedItem && ((
|
76574
|
+
const draggedDestinationId = draggedItem && ((_a3 = draggedItem.destination) == null ? void 0 : _a3.droppableId);
|
73706
76575
|
const [zoneArea] = getZoneId2(zoneCompound);
|
73707
76576
|
const [draggedSourceArea] = getZoneId2(draggedSourceId);
|
73708
76577
|
const userWillDrag = zoneWillDrag === zone;
|
@@ -73724,7 +76593,11 @@ var require_dist2 = __commonJS({
|
|
73724
76593
|
let isEnabled = userWillDrag;
|
73725
76594
|
if (userIsDragging) {
|
73726
76595
|
if (draggingNewComponent) {
|
73727
|
-
|
76596
|
+
if (appContext22.safariFallbackMode) {
|
76597
|
+
isEnabled = true;
|
76598
|
+
} else {
|
76599
|
+
isEnabled = hoveringOverArea;
|
76600
|
+
}
|
73728
76601
|
} else {
|
73729
76602
|
isEnabled = draggingOverArea && hoveringOverZone;
|
73730
76603
|
}
|
@@ -73785,9 +76658,9 @@ var require_dist2 = __commonJS({
|
|
73785
76658
|
},
|
73786
76659
|
children: [
|
73787
76660
|
content.map((item, i2) => {
|
73788
|
-
var
|
76661
|
+
var _a22, _b, _c;
|
73789
76662
|
const componentId = item.props.id;
|
73790
|
-
const defaultedProps = __spreadProps2(__spreadValues2(__spreadValues2({}, (
|
76663
|
+
const defaultedProps = __spreadProps2(__spreadValues2(__spreadValues2({}, (_a22 = config.components[item.type]) == null ? void 0 : _a22.defaultProps), item.props), {
|
73791
76664
|
puck: { renderDropZone: DropZone },
|
73792
76665
|
editMode: true
|
73793
76666
|
});
|
@@ -74034,7 +76907,7 @@ var require_dist2 = __commonJS({
|
|
74034
76907
|
const queryAttr = "data-rfd-drag-handle-draggable-id";
|
74035
76908
|
const [placeholderStyle, setPlaceholderStyle] = (0, import_react112.useState)();
|
74036
76909
|
const onDragStartOrUpdate = (draggedItem) => {
|
74037
|
-
var
|
76910
|
+
var _a3;
|
74038
76911
|
const draggableId = draggedItem.draggableId;
|
74039
76912
|
const destinationIndex = (draggedItem.destination || draggedItem.source).index;
|
74040
76913
|
const droppableId = (draggedItem.destination || draggedItem.source).droppableId;
|
@@ -74052,7 +76925,7 @@ var require_dist2 = __commonJS({
|
|
74052
76925
|
return;
|
74053
76926
|
}
|
74054
76927
|
let clientY = 0;
|
74055
|
-
const isSameDroppable = draggedItem.source.droppableId === ((
|
76928
|
+
const isSameDroppable = draggedItem.source.droppableId === ((_a3 = draggedItem.destination) == null ? void 0 : _a3.droppableId);
|
74056
76929
|
if (destinationIndex > 0) {
|
74057
76930
|
const end2 = destinationIndex > draggedItem.source.index && isSameDroppable ? destinationIndex + 1 : destinationIndex;
|
74058
76931
|
const children = Array.from(targetListElement.children).filter(
|
@@ -74539,9 +77412,9 @@ var require_dist2 = __commonJS({
|
|
74539
77412
|
var import_react132 = require("react");
|
74540
77413
|
init_react_import2();
|
74541
77414
|
var cache = { lastChange: {} };
|
74542
|
-
var resolveAllComponentData = (content, config, onResolveStart, onResolveEnd) =>
|
77415
|
+
var resolveAllComponentData = (content, config, onResolveStart, onResolveEnd) => __async2(void 0, null, function* () {
|
74543
77416
|
return yield Promise.all(
|
74544
|
-
content.map((item) =>
|
77417
|
+
content.map((item) => __async2(void 0, null, function* () {
|
74545
77418
|
return yield resolveComponentData(
|
74546
77419
|
item,
|
74547
77420
|
config,
|
@@ -74551,7 +77424,7 @@ var require_dist2 = __commonJS({
|
|
74551
77424
|
}))
|
74552
77425
|
);
|
74553
77426
|
});
|
74554
|
-
var resolveComponentData = (item, config, onResolveStart, onResolveEnd) =>
|
77427
|
+
var resolveComponentData = (item, config, onResolveStart, onResolveEnd) => __async2(void 0, null, function* () {
|
74555
77428
|
const configForItem = config.components[item.type];
|
74556
77429
|
if (configForItem.resolveData) {
|
74557
77430
|
let changed = Object.keys(item.props).reduce(
|
@@ -74610,9 +77483,9 @@ var require_dist2 = __commonJS({
|
|
74610
77483
|
};
|
74611
77484
|
init_react_import2();
|
74612
77485
|
var cache2 = {};
|
74613
|
-
var resolveRootData = (data, config) =>
|
74614
|
-
var
|
74615
|
-
if (((
|
77486
|
+
var resolveRootData = (data, config) => __async2(void 0, null, function* () {
|
77487
|
+
var _a3, _b;
|
77488
|
+
if (((_a3 = config.root) == null ? void 0 : _a3.resolveData) && data.root.props) {
|
74616
77489
|
let changed = Object.keys(data.root.props).reduce(
|
74617
77490
|
(acc, item) => __spreadProps2(__spreadValues2({}, acc), { [item]: true }),
|
74618
77491
|
{}
|
@@ -74664,11 +77537,11 @@ var require_dist2 = __commonJS({
|
|
74664
77537
|
},
|
74665
77538
|
[]
|
74666
77539
|
);
|
74667
|
-
const runResolvers = () =>
|
77540
|
+
const runResolvers = () => __async2(void 0, null, function* () {
|
74668
77541
|
const newData = newAppState.data;
|
74669
77542
|
const flatContent = Object.keys(newData.zones || {}).reduce((acc, zone) => [...acc, ...newData.zones[zone]], newData.content).filter((item) => {
|
74670
|
-
var
|
74671
|
-
return !!((
|
77543
|
+
var _a3;
|
77544
|
+
return !!((_a3 = config.components[item.type]) == null ? void 0 : _a3.resolveData);
|
74672
77545
|
});
|
74673
77546
|
const applyIfChange = (dynamicDataMap, dynamicRoot) => {
|
74674
77547
|
const processed = applyDynamicProps(
|
@@ -74691,7 +77564,7 @@ var require_dist2 = __commonJS({
|
|
74691
77564
|
};
|
74692
77565
|
const promises = [];
|
74693
77566
|
promises.push(
|
74694
|
-
(() =>
|
77567
|
+
(() => __async2(void 0, null, function* () {
|
74695
77568
|
setComponentLoading("puck-root", true, 50);
|
74696
77569
|
const dynamicRoot = yield resolveRootData(newData, config);
|
74697
77570
|
applyIfChange({}, dynamicRoot);
|
@@ -74700,7 +77573,7 @@ var require_dist2 = __commonJS({
|
|
74700
77573
|
);
|
74701
77574
|
flatContent.forEach((item) => {
|
74702
77575
|
promises.push(
|
74703
|
-
(() =>
|
77576
|
+
(() => __async2(void 0, null, function* () {
|
74704
77577
|
const dynamicData = yield resolveComponentData(
|
74705
77578
|
item,
|
74706
77579
|
config,
|
@@ -74756,12 +77629,12 @@ var require_dist2 = __commonJS({
|
|
74756
77629
|
{
|
74757
77630
|
className: getClassName9({ menuOpen }),
|
74758
77631
|
onClick: (event) => {
|
74759
|
-
var
|
77632
|
+
var _a3;
|
74760
77633
|
const element = event.target;
|
74761
77634
|
if (window.matchMedia("(min-width: 638px)").matches) {
|
74762
77635
|
return;
|
74763
77636
|
}
|
74764
|
-
if (element.tagName === "A" && ((
|
77637
|
+
if (element.tagName === "A" && ((_a3 = element.getAttribute("href")) == null ? void 0 : _a3.startsWith("#"))) {
|
74765
77638
|
setMenuOpen(false);
|
74766
77639
|
}
|
74767
77640
|
},
|
@@ -74870,11 +77743,11 @@ var require_dist2 = __commonJS({
|
|
74870
77743
|
(value2) => {
|
74871
77744
|
let highestIndex = getHighestIndex();
|
74872
77745
|
const newItems = Array.from(value2 || []).map((item, idx) => {
|
74873
|
-
var
|
77746
|
+
var _a3;
|
74874
77747
|
const arrayStateItem = arrayState.items[idx];
|
74875
77748
|
const newItem = {
|
74876
77749
|
_originalIndex: typeof (arrayStateItem == null ? void 0 : arrayStateItem._originalIndex) !== "undefined" ? arrayStateItem._originalIndex : highestIndex + 1,
|
74877
|
-
_arrayId: ((
|
77750
|
+
_arrayId: ((_a3 = arrayState.items[idx]) == null ? void 0 : _a3._arrayId) || `${id}-${highestIndex + 1}`
|
74878
77751
|
};
|
74879
77752
|
if (newItem._originalIndex > highestIndex) {
|
74880
77753
|
highestIndex = newItem._originalIndex;
|
@@ -74906,12 +77779,12 @@ var require_dist2 = __commonJS({
|
|
74906
77779
|
DragDropContext2,
|
74907
77780
|
{
|
74908
77781
|
onDragEnd: (event) => {
|
74909
|
-
var
|
77782
|
+
var _a3, _b;
|
74910
77783
|
if (event.destination) {
|
74911
77784
|
const newValue = reorder(
|
74912
77785
|
value,
|
74913
77786
|
event.source.index,
|
74914
|
-
(
|
77787
|
+
(_a3 = event.destination) == null ? void 0 : _a3.index
|
74915
77788
|
);
|
74916
77789
|
const newArrayStateItems = reorder(
|
74917
77790
|
arrayState.items,
|
@@ -75198,7 +78071,7 @@ var require_dist2 = __commonJS({
|
|
75198
78071
|
}, [mappedData]);
|
75199
78072
|
const [searchQuery, setSearchQuery] = (0, import_react16.useState)(field.initialQuery || "");
|
75200
78073
|
const search = (0, import_react16.useCallback)(
|
75201
|
-
(query, filters2) =>
|
78074
|
+
(query, filters2) => __async2(void 0, null, function* () {
|
75202
78075
|
setIsLoading(true);
|
75203
78076
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
75204
78077
|
const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
|
@@ -75366,7 +78239,7 @@ var require_dist2 = __commonJS({
|
|
75366
78239
|
label,
|
75367
78240
|
id
|
75368
78241
|
}) => {
|
75369
|
-
var
|
78242
|
+
var _a3, _b, _c;
|
75370
78243
|
const validField = field;
|
75371
78244
|
const deprecatedField = field;
|
75372
78245
|
(0, import_react17.useEffect)(() => {
|
@@ -75391,10 +78264,10 @@ var require_dist2 = __commonJS({
|
|
75391
78264
|
name,
|
75392
78265
|
field: __spreadProps2(__spreadValues2({}, validField), {
|
75393
78266
|
// DEPRECATED
|
75394
|
-
placeholder: ((
|
78267
|
+
placeholder: ((_a3 = deprecatedField.adaptor) == null ? void 0 : _a3.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
|
75395
78268
|
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
75396
78269
|
mapRow: validField.mapRow,
|
75397
|
-
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () =>
|
78270
|
+
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async2(void 0, null, function* () {
|
75398
78271
|
return yield deprecatedField.adaptor.fetchList(
|
75399
78272
|
deprecatedField.adaptorParams
|
75400
78273
|
);
|
@@ -75490,7 +78363,7 @@ var require_dist2 = __commonJS({
|
|
75490
78363
|
disabled: readOnly,
|
75491
78364
|
onChange: (e2) => {
|
75492
78365
|
if (e2.currentTarget.value === "true" || e2.currentTarget.value === "false") {
|
75493
|
-
onChange(
|
78366
|
+
onChange(JSON.parse(e2.currentTarget.value));
|
75494
78367
|
return;
|
75495
78368
|
}
|
75496
78369
|
onChange(e2.currentTarget.value);
|
@@ -75644,9 +78517,9 @@ var require_dist2 = __commonJS({
|
|
75644
78517
|
}
|
75645
78518
|
);
|
75646
78519
|
};
|
75647
|
-
var InputOrGroup = (
|
75648
|
-
var _b =
|
75649
|
-
var
|
78520
|
+
var InputOrGroup = (_a3) => {
|
78521
|
+
var _b = _a3, { onChange } = _b, props = __objRest2(_b, ["onChange"]);
|
78522
|
+
var _a22, _b2, _c, _d, _e, _f, _g, _h;
|
75650
78523
|
const { overrides } = useAppContext2();
|
75651
78524
|
const { name, field, value, readOnly } = props;
|
75652
78525
|
const [localValue, setLocalValue] = (0, import_react18.useState)(value);
|
@@ -75689,7 +78562,7 @@ var require_dist2 = __commonJS({
|
|
75689
78562
|
number: DefaultField
|
75690
78563
|
};
|
75691
78564
|
const render = __spreadProps2(__spreadValues2({}, overrides.fieldTypes), {
|
75692
|
-
array: ((
|
78565
|
+
array: ((_a22 = overrides.fieldTypes) == null ? void 0 : _a22.array) || defaultFields.array,
|
75693
78566
|
external: ((_b2 = overrides.fieldTypes) == null ? void 0 : _b2.external) || defaultFields.external,
|
75694
78567
|
object: ((_c = overrides.fieldTypes) == null ? void 0 : _c.object) || defaultFields.object,
|
75695
78568
|
select: ((_d = overrides.fieldTypes) == null ? void 0 : _d.select) || defaultFields.select,
|
@@ -75721,7 +78594,7 @@ var require_dist2 = __commonJS({
|
|
75721
78594
|
] });
|
75722
78595
|
};
|
75723
78596
|
var Fields = () => {
|
75724
|
-
var
|
78597
|
+
var _a3, _b, _c, _d;
|
75725
78598
|
const {
|
75726
78599
|
selectedItem,
|
75727
78600
|
state,
|
@@ -75733,7 +78606,7 @@ var require_dist2 = __commonJS({
|
|
75733
78606
|
} = useAppContext2();
|
75734
78607
|
const { data, ui } = state;
|
75735
78608
|
const { itemSelector } = ui;
|
75736
|
-
const rootFields = ((
|
78609
|
+
const rootFields = ((_a3 = config.root) == null ? void 0 : _a3.fields) || defaultPageFields;
|
75737
78610
|
const fields = selectedItem ? ((_b = config.components[selectedItem.type]) == null ? void 0 : _b.fields) || {} : rootFields;
|
75738
78611
|
const isLoading = selectedItem ? (_c = componentState[selectedItem == null ? void 0 : selectedItem.props.id]) == null ? void 0 : _c.loading : (_d = componentState["puck-root"]) == null ? void 0 : _d.loading;
|
75739
78612
|
const rootProps = data.root.props || data.root;
|
@@ -75748,7 +78621,7 @@ var require_dist2 = __commonJS({
|
|
75748
78621
|
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
|
75749
78622
|
const field = fields[fieldName];
|
75750
78623
|
const onChange = (value, updatedUi) => {
|
75751
|
-
var
|
78624
|
+
var _a22, _b2;
|
75752
78625
|
let currentProps;
|
75753
78626
|
if (selectedItem) {
|
75754
78627
|
currentProps = selectedItem.props;
|
@@ -75773,7 +78646,7 @@ var require_dist2 = __commonJS({
|
|
75773
78646
|
ui: __spreadValues2(__spreadValues2({}, ui), updatedUi)
|
75774
78647
|
}
|
75775
78648
|
};
|
75776
|
-
if ((
|
78649
|
+
if ((_a22 = config.components[selectedItem.type]) == null ? void 0 : _a22.resolveData) {
|
75777
78650
|
resolveData(setAction(state, setActionData));
|
75778
78651
|
} else {
|
75779
78652
|
dispatch(__spreadProps2(__spreadValues2({}, setActionData), {
|
@@ -75889,11 +78762,11 @@ var require_dist2 = __commonJS({
|
|
75889
78762
|
}
|
75890
78763
|
),
|
75891
78764
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName20("content"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Drawer, { droppableId: `component-list${title ? `:${title}` : ""}`, children: children || Object.keys(config.components).map((componentKey, i2) => {
|
75892
|
-
var
|
78765
|
+
var _a3;
|
75893
78766
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
75894
78767
|
ComponentListItem,
|
75895
78768
|
{
|
75896
|
-
label: (
|
78769
|
+
label: (_a3 = config.components[componentKey]["label"]) != null ? _a3 : componentKey,
|
75897
78770
|
name: componentKey,
|
75898
78771
|
index: i2
|
75899
78772
|
},
|
@@ -75907,7 +78780,7 @@ var require_dist2 = __commonJS({
|
|
75907
78780
|
var useComponentList = (config, ui) => {
|
75908
78781
|
const [componentList, setComponentList] = (0, import_react20.useState)();
|
75909
78782
|
(0, import_react20.useEffect)(() => {
|
75910
|
-
var
|
78783
|
+
var _a3, _b, _c;
|
75911
78784
|
if (Object.keys(ui.componentList).length > 0) {
|
75912
78785
|
const matchedComponents = [];
|
75913
78786
|
let _componentList;
|
@@ -75922,13 +78795,13 @@ var require_dist2 = __commonJS({
|
|
75922
78795
|
id: categoryKey,
|
75923
78796
|
title: category.title || categoryKey,
|
75924
78797
|
children: category.components.map((componentName, i2) => {
|
75925
|
-
var
|
78798
|
+
var _a22;
|
75926
78799
|
matchedComponents.push(componentName);
|
75927
78800
|
const componentConf = config.components[componentName] || {};
|
75928
78801
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
75929
78802
|
ComponentList.Item,
|
75930
78803
|
{
|
75931
|
-
label: (
|
78804
|
+
label: (_a22 = componentConf["label"]) != null ? _a22 : componentName,
|
75932
78805
|
name: componentName,
|
75933
78806
|
index: i2
|
75934
78807
|
},
|
@@ -75943,7 +78816,7 @@ var require_dist2 = __commonJS({
|
|
75943
78816
|
const remainingComponents = Object.keys(config.components).filter(
|
75944
78817
|
(component) => matchedComponents.indexOf(component) === -1
|
75945
78818
|
);
|
75946
|
-
if (remainingComponents.length > 0 && !((
|
78819
|
+
if (remainingComponents.length > 0 && !((_a3 = ui.componentList.other) == null ? void 0 : _a3.components) && ((_b = ui.componentList.other) == null ? void 0 : _b.visible) !== false) {
|
75947
78820
|
_componentList.push(
|
75948
78821
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
75949
78822
|
ComponentList,
|
@@ -75951,13 +78824,13 @@ var require_dist2 = __commonJS({
|
|
75951
78824
|
id: "other",
|
75952
78825
|
title: ((_c = ui.componentList.other) == null ? void 0 : _c.title) || "Other",
|
75953
78826
|
children: remainingComponents.map((componentName, i2) => {
|
75954
|
-
var
|
78827
|
+
var _a22;
|
75955
78828
|
const componentConf = config.components[componentName] || {};
|
75956
78829
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
75957
78830
|
ComponentList.Item,
|
75958
78831
|
{
|
75959
78832
|
name: componentName,
|
75960
|
-
label: (
|
78833
|
+
label: (_a22 = componentConf["label"]) != null ? _a22 : componentName,
|
75961
78834
|
index: i2
|
75962
78835
|
},
|
75963
78836
|
componentName
|
@@ -75985,15 +78858,15 @@ var require_dist2 = __commonJS({
|
|
75985
78858
|
var import_react222 = require("react");
|
75986
78859
|
var import_auto_frame_component = __toESM2(require_dist());
|
75987
78860
|
init_react_import2();
|
75988
|
-
var styles_module_default16 = { "PuckPreview": "
|
78861
|
+
var styles_module_default16 = { "PuckPreview": "_PuckPreview_rxwlr_1", "PuckPreview-frame": "_PuckPreview-frame_rxwlr_5" };
|
75989
78862
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
75990
78863
|
var getClassName21 = get_class_name_factory_default2("PuckPreview", styles_module_default16);
|
75991
78864
|
var Preview = ({ id = "puck-preview" }) => {
|
75992
78865
|
const { config, dispatch, state, setStatus, iframe } = useAppContext2();
|
75993
78866
|
const Page = (0, import_react222.useCallback)(
|
75994
78867
|
(pageProps) => {
|
75995
|
-
var
|
75996
|
-
return ((
|
78868
|
+
var _a3, _b;
|
78869
|
+
return ((_a3 = config.root) == null ? void 0 : _a3.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadProps2(__spreadValues2({
|
75997
78870
|
id: "puck-root"
|
75998
78871
|
}, pageProps), {
|
75999
78872
|
editMode: true,
|
@@ -76059,9 +78932,9 @@ var require_dist2 = __commonJS({
|
|
76059
78932
|
var import_react23 = require("react");
|
76060
78933
|
init_react_import2();
|
76061
78934
|
var isChildOfZone = (item, maybeChild, ctx) => {
|
76062
|
-
var
|
78935
|
+
var _a3;
|
76063
78936
|
const { data, pathData = {} } = ctx || {};
|
76064
|
-
return maybeChild && data ? !!((
|
78937
|
+
return maybeChild && data ? !!((_a3 = pathData[maybeChild.props.id]) == null ? void 0 : _a3.path.find((zoneCompound) => {
|
76065
78938
|
const [area] = getZoneId2(zoneCompound);
|
76066
78939
|
return area === item.props.id;
|
76067
78940
|
})) : false;
|
@@ -76089,7 +78962,7 @@ var require_dist2 = __commonJS({
|
|
76089
78962
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("ul", { className: getClassName222(), children: [
|
76090
78963
|
zoneContent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassName222("helper"), children: "No items" }),
|
76091
78964
|
zoneContent.map((item, i2) => {
|
76092
|
-
var
|
78965
|
+
var _a3;
|
76093
78966
|
const isSelected = (itemSelector == null ? void 0 : itemSelector.index) === i2 && (itemSelector.zone === zone || itemSelector.zone === rootDroppableId2 && !zone);
|
76094
78967
|
const zonesForItem = findZonesForArea(data, item.props.id);
|
76095
78968
|
const containsZone = Object.keys(zonesForItem).length > 0;
|
@@ -76155,7 +79028,7 @@ var require_dist2 = __commonJS({
|
|
76155
79028
|
),
|
76156
79029
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: getClassNameLayer("title"), children: [
|
76157
79030
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LayoutGrid, { size: "16" }) }),
|
76158
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("name"), children: (
|
79031
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("name"), children: (_a3 = config.components[item.type]["label"]) != null ? _a3 : item.type })
|
76159
79032
|
] })
|
76160
79033
|
]
|
76161
79034
|
}
|
@@ -76264,11 +79137,11 @@ var require_dist2 = __commonJS({
|
|
76264
79137
|
historyStore
|
76265
79138
|
}) {
|
76266
79139
|
const back = () => {
|
76267
|
-
var
|
79140
|
+
var _a3;
|
76268
79141
|
if (historyStore.hasPast) {
|
76269
79142
|
dispatch({
|
76270
79143
|
type: "set",
|
76271
|
-
state: ((
|
79144
|
+
state: ((_a3 = historyStore.prevHistory) == null ? void 0 : _a3.data) || initialAppState
|
76272
79145
|
});
|
76273
79146
|
historyStore.back();
|
76274
79147
|
}
|
@@ -76497,7 +79370,7 @@ var require_dist2 = __commonJS({
|
|
76497
79370
|
onViewportChange,
|
76498
79371
|
onZoom
|
76499
79372
|
}) => {
|
76500
|
-
var
|
79373
|
+
var _a3, _b;
|
76501
79374
|
const { viewports } = useAppContext2();
|
76502
79375
|
const defaultsContainAutoZoom = defaultZoomOptions.find(
|
76503
79376
|
(option) => option.value === autoZoom
|
@@ -76531,7 +79404,7 @@ var require_dist2 = __commonJS({
|
|
76531
79404
|
IconButton,
|
76532
79405
|
{
|
76533
79406
|
title: "Zoom viewport out",
|
76534
|
-
disabled: zoom <= ((
|
79407
|
+
disabled: zoom <= ((_a3 = zoomOptions[0]) == null ? void 0 : _a3.value),
|
76535
79408
|
onClick: (e2) => {
|
76536
79409
|
e2.stopPropagation();
|
76537
79410
|
onZoom(
|
@@ -76713,7 +79586,7 @@ var require_dist2 = __commonJS({
|
|
76713
79586
|
{
|
76714
79587
|
className: getClassName24("root"),
|
76715
79588
|
style: {
|
76716
|
-
width: iframe.enabled ? ui.viewports.current.width :
|
79589
|
+
width: iframe.enabled ? ui.viewports.current.width : "100%",
|
76717
79590
|
height: zoomConfig.rootHeight,
|
76718
79591
|
transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : void 0,
|
76719
79592
|
transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : "",
|
@@ -76747,13 +79620,13 @@ var require_dist2 = __commonJS({
|
|
76747
79620
|
enabled: true
|
76748
79621
|
}
|
76749
79622
|
}) {
|
76750
|
-
var
|
79623
|
+
var _a3;
|
76751
79624
|
const historyStore = useHistoryStore();
|
76752
79625
|
const [reducer2] = (0, import_react28.useState)(
|
76753
79626
|
() => createReducer({ config, record: historyStore.record })
|
76754
79627
|
);
|
76755
79628
|
const [initialAppState] = (0, import_react28.useState)(() => {
|
76756
|
-
var
|
79629
|
+
var _a22, _b, _c, _d;
|
76757
79630
|
const initial = __spreadValues2(__spreadValues2({}, defaultAppState2.ui), initialUi);
|
76758
79631
|
let clientUiState = {};
|
76759
79632
|
if (typeof window !== "undefined") {
|
@@ -76773,7 +79646,7 @@ var require_dist2 = __commonJS({
|
|
76773
79646
|
clientUiState = {
|
76774
79647
|
viewports: __spreadProps2(__spreadValues2({}, initial.viewports), {
|
76775
79648
|
current: __spreadProps2(__spreadValues2({}, initial.viewports.current), {
|
76776
|
-
height: ((_b = (
|
79649
|
+
height: ((_b = (_a22 = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _a22.current) == null ? void 0 : _b.height) || viewports[closestViewport].height || "auto",
|
76777
79650
|
width: ((_d = (_c = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _c.current) == null ? void 0 : _d.width) || viewports[closestViewport].width
|
76778
79651
|
})
|
76779
79652
|
})
|
@@ -76886,8 +79759,8 @@ var require_dist2 = __commonJS({
|
|
76886
79759
|
console.warn(
|
76887
79760
|
"`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
|
76888
79761
|
);
|
76889
|
-
const RenderHeader = (
|
76890
|
-
var _b =
|
79762
|
+
const RenderHeader = (_a22) => {
|
79763
|
+
var _b = _a22, { actions } = _b, props = __objRest2(_b, ["actions"]);
|
76891
79764
|
const Comp = renderHeader;
|
76892
79765
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState, children: actions }));
|
76893
79766
|
};
|
@@ -77106,7 +79979,7 @@ var require_dist2 = __commonJS({
|
|
77106
79979
|
noPadding: true,
|
77107
79980
|
noBorderTop: true,
|
77108
79981
|
showBreadcrumbs: true,
|
77109
|
-
title: selectedItem ? (
|
79982
|
+
title: selectedItem ? (_a3 = config.components[selectedItem.type]["label"]) != null ? _a3 : selectedItem.type : "Page",
|
77110
79983
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Fields, {})
|
77111
79984
|
}
|
77112
79985
|
) })
|
@@ -77138,10 +80011,10 @@ var require_dist2 = __commonJS({
|
|
77138
80011
|
config,
|
77139
80012
|
data
|
77140
80013
|
}) {
|
77141
|
-
var
|
80014
|
+
var _a3;
|
77142
80015
|
const rootProps = data.root.props || data.root;
|
77143
80016
|
const title = (rootProps == null ? void 0 : rootProps.title) || "";
|
77144
|
-
if ((
|
80017
|
+
if ((_a3 = config.root) == null ? void 0 : _a3.render) {
|
77145
80018
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
77146
80019
|
config.root.render,
|
77147
80020
|
__spreadProps2(__spreadValues2({}, rootProps), {
|
@@ -77211,7 +80084,7 @@ var require_dist2 = __commonJS({
|
|
77211
80084
|
}
|
77212
80085
|
init_react_import2();
|
77213
80086
|
function resolveAllData(data, config, onResolveStart, onResolveEnd) {
|
77214
|
-
return
|
80087
|
+
return __async2(this, null, function* () {
|
77215
80088
|
const dynamicRoot = yield resolveRootData(data, config);
|
77216
80089
|
const { zones = {} } = data;
|
77217
80090
|
const zoneKeys = Object.keys(zones);
|
@@ -77409,8 +80282,8 @@ var defaultAttributes = {
|
|
77409
80282
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
|
77410
80283
|
var createLucideIcon = (iconName, iconNode) => {
|
77411
80284
|
const Component = (0, import_react8.forwardRef)(
|
77412
|
-
(
|
77413
|
-
var _b =
|
80285
|
+
(_a3, ref2) => {
|
80286
|
+
var _b = _a3, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
|
77414
80287
|
return (0, import_react8.createElement)(
|
77415
80288
|
"svg",
|
77416
80289
|
__spreadValues(__spreadProps(__spreadValues({
|
@@ -77470,10 +80343,10 @@ var setupZone = (data, zoneKey) => {
|
|
77470
80343
|
var getItem = (selector, data, dynamicProps = {}) => {
|
77471
80344
|
if (!selector.zone || selector.zone === rootDroppableId) {
|
77472
80345
|
const item2 = data.content[selector.index];
|
77473
|
-
return __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
|
80346
|
+
return (item2 == null ? void 0 : item2.props) ? __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props }) : void 0;
|
77474
80347
|
}
|
77475
80348
|
const item = setupZone(data, selector.zone).zones[selector.zone][selector.index];
|
77476
|
-
return __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props });
|
80349
|
+
return (item == null ? void 0 : item.props) ? __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props }) : void 0;
|
77477
80350
|
};
|
77478
80351
|
|
77479
80352
|
// ../core/lib/get-zone-id.ts
|
@@ -77505,6 +80378,7 @@ var defaultViewports = [
|
|
77505
80378
|
];
|
77506
80379
|
|
77507
80380
|
// ../core/components/Puck/context.tsx
|
80381
|
+
var import_ua_parser_js = __toESM(require_ua_parser());
|
77508
80382
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
77509
80383
|
var defaultAppState = {
|
77510
80384
|
data: { content: [], root: { props: { title: "" } } },
|
@@ -77544,7 +80418,8 @@ var defaultContext = {
|
|
77544
80418
|
setZoomConfig: () => null,
|
77545
80419
|
status: "LOADING",
|
77546
80420
|
setStatus: () => null,
|
77547
|
-
iframe: {}
|
80421
|
+
iframe: {},
|
80422
|
+
safariFallbackMode: false
|
77548
80423
|
};
|
77549
80424
|
var appContext = (0, import_react10.createContext)(defaultContext);
|
77550
80425
|
function useAppContext() {
|
@@ -77742,7 +80617,7 @@ var getOutline = ({
|
|
77742
80617
|
return _outline;
|
77743
80618
|
};
|
77744
80619
|
function buildHierarchy(frame) {
|
77745
|
-
var
|
80620
|
+
var _a3, _b;
|
77746
80621
|
const headings = getOutline({ addDataAttr: true, frame });
|
77747
80622
|
const root = { rank: 0, children: [], text: "" };
|
77748
80623
|
let path = [root];
|
@@ -77766,7 +80641,7 @@ function buildHierarchy(frame) {
|
|
77766
80641
|
children: [],
|
77767
80642
|
text: ""
|
77768
80643
|
};
|
77769
|
-
(
|
80644
|
+
(_a3 = path[path.length - 1].children) == null ? void 0 : _a3.push(missingNode);
|
77770
80645
|
path.push(missingNode);
|
77771
80646
|
}
|
77772
80647
|
}
|