@regulaforensics/idv-gui 3.10.523-nightly → 3.10.526-nightly
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.d.ts +9 -0
- package/dist/main.iife.js +3 -3
- package/dist/main.js +954 -932
- package/dist/main.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -738,7 +738,9 @@ var Ct = ({ dataUrl: e, isFullSize: t = !1 }) => {
|
|
|
738
738
|
EMAIL: "EMAIL",
|
|
739
739
|
NUMBER: "NUMBER",
|
|
740
740
|
SECURE: "SECURE"
|
|
741
|
-
}, At =
|
|
741
|
+
}, At = /* @__PURE__ */ function(e) {
|
|
742
|
+
return e.HIGH = "HIGH", e.BALANCED = "BALANCED", e.LOW = "LOW", e.PASSIVE = "PASSIVE", e;
|
|
743
|
+
}({}), jt = { SCAFFOLD: "scaffold" }, Mt = {
|
|
742
744
|
LABEL: "label",
|
|
743
745
|
IMAGE: "image",
|
|
744
746
|
IMAGE_BUTTON: "imageButton",
|
|
@@ -747,11 +749,11 @@ var Ct = ({ dataUrl: e, isFullSize: t = !1 }) => {
|
|
|
747
749
|
ROW: "row",
|
|
748
750
|
SPACER: "spacer",
|
|
749
751
|
PROGRESS_VIEW: "progressView"
|
|
750
|
-
},
|
|
752
|
+
}, Nt = {
|
|
751
753
|
TOP: "TOP",
|
|
752
754
|
CENTER: "CENTER",
|
|
753
755
|
BOTTOM: "BOTTOM"
|
|
754
|
-
},
|
|
756
|
+
}, Pt = {
|
|
755
757
|
START: "START",
|
|
756
758
|
LEFT: "LEFT",
|
|
757
759
|
CENTER: "CENTER",
|
|
@@ -760,7 +762,7 @@ var Ct = ({ dataUrl: e, isFullSize: t = !1 }) => {
|
|
|
760
762
|
};
|
|
761
763
|
//#endregion
|
|
762
764
|
//#region src/utils/ui-helpers.tsx
|
|
763
|
-
function
|
|
765
|
+
function Ft(e) {
|
|
764
766
|
let t = /\[([^\]]+)\]\(((https?:\/\/|www\.)?[^\s)]+\.[^\s)]+)\)/g, n = [], r = 0;
|
|
765
767
|
for (let a of e.matchAll(t)) {
|
|
766
768
|
var i;
|
|
@@ -776,55 +778,55 @@ function Pt(e) {
|
|
|
776
778
|
}
|
|
777
779
|
return r < e.length && n.push(e.slice(r)), n;
|
|
778
780
|
}
|
|
779
|
-
function
|
|
781
|
+
function It(e) {
|
|
780
782
|
let t = e.split("\n");
|
|
781
783
|
return t.flatMap((e, n) => {
|
|
782
|
-
let r =
|
|
784
|
+
let r = Ft(e);
|
|
783
785
|
return n === t.length - 1 ? r : [...r, /* @__PURE__ */ B("br", {}, "br-" + n)];
|
|
784
786
|
});
|
|
785
787
|
}
|
|
786
|
-
var
|
|
788
|
+
var Lt = (e) => !!(e != null && e.base64 || e != null && e.imageURL || e != null && e.imageId), Rt = (e) => {
|
|
787
789
|
if (typeof e == "number") return `${e}px`;
|
|
788
790
|
};
|
|
789
|
-
function
|
|
791
|
+
function zt(e) {
|
|
790
792
|
return e ? {
|
|
791
|
-
paddingTop:
|
|
792
|
-
paddingRight:
|
|
793
|
-
paddingBottom:
|
|
794
|
-
paddingLeft:
|
|
793
|
+
paddingTop: Rt(e.top),
|
|
794
|
+
paddingRight: Rt(e.right),
|
|
795
|
+
paddingBottom: Rt(e.bottom),
|
|
796
|
+
paddingLeft: Rt(e.left)
|
|
795
797
|
} : {};
|
|
796
798
|
}
|
|
797
|
-
var
|
|
799
|
+
var Bt = (e, t) => !!(e.base64 && !(t != null && t.base64.has(e.base64)) || e.imageId && e.imageId in Kt || e.imageURL && !(t != null && t.imageURL.has(e.imageURL))), Vt = (e, t) => {
|
|
798
800
|
let n = [], r = e == null ? null : e;
|
|
799
|
-
for (; r;)
|
|
801
|
+
for (; r;) Bt(r, t) && n.push(r), r = r.failurePolicy === "placeholderImage" && r.placeholderImage || null;
|
|
800
802
|
return n;
|
|
801
|
-
},
|
|
803
|
+
}, Ht = (e) => {
|
|
802
804
|
if (e === Et.ASPECT_FILL) return "cover";
|
|
803
805
|
if (e === Et.ASPECT_FIT) return "contain";
|
|
804
806
|
if (e === Et.FILL) return "fill";
|
|
805
|
-
},
|
|
806
|
-
let n =
|
|
807
|
+
}, Ut = (e, t) => {
|
|
808
|
+
let n = Vt(e, t)[0];
|
|
807
809
|
if (n) {
|
|
808
810
|
if (n.imageURL) return n.imageURL;
|
|
809
811
|
if (n.base64) return n.base64;
|
|
810
812
|
if (n.imageId) {
|
|
811
813
|
var r;
|
|
812
|
-
return (r =
|
|
814
|
+
return (r = Kt[n.imageId]) == null ? void 0 : r.call(Kt);
|
|
813
815
|
}
|
|
814
816
|
}
|
|
815
|
-
},
|
|
817
|
+
}, Wt = (e, t) => {
|
|
816
818
|
var n;
|
|
817
|
-
if (!e || !
|
|
818
|
-
let r =
|
|
819
|
+
if (!e || !Lt(e)) return {};
|
|
820
|
+
let r = Ut(e, t);
|
|
819
821
|
if (!r) return {};
|
|
820
822
|
let i = (n = e.contentMode) == null ? Et.ASPECT_FILL : n;
|
|
821
823
|
return {
|
|
822
824
|
backgroundImage: `url("${r}")`,
|
|
823
|
-
backgroundSize:
|
|
825
|
+
backgroundSize: Ht(i),
|
|
824
826
|
backgroundRepeat: "no-repeat",
|
|
825
827
|
backgroundPosition: "center"
|
|
826
828
|
};
|
|
827
|
-
},
|
|
829
|
+
}, Gt = (e) => e === Dt.BOLD ? 700 : (Dt.NORMAL, 400), V = {
|
|
828
830
|
WARNING: "warning_icon",
|
|
829
831
|
SPINNER: "spinner",
|
|
830
832
|
LOADER: "loader",
|
|
@@ -855,7 +857,7 @@ var zt = (e, t) => !!(e.base64 && !(t != null && t.base64.has(e.base64)) || e.im
|
|
|
855
857
|
OK: "ok",
|
|
856
858
|
FILE: "file",
|
|
857
859
|
RELOAD: "reload"
|
|
858
|
-
},
|
|
860
|
+
}, Kt = {
|
|
859
861
|
[V.SPINNER]: (e) => {
|
|
860
862
|
let t = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHlsZT0idHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7Ij4KICA8Y2lyY2xlIGN4PSIzMCIgY3k9IjMwIiByPSIyNy41IiBmaWxsPSJub25lIiBzdHJva2U9IiM3RTU3QzUiIHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTI5LjU5MDY5Njk2MDU3ODk4IDQzLjE5Njg5ODk4Njg1OTY2IiBzdHJva2UtZGFzaG9mZnNldD0iMCIgc3Ryb2tlLWxpbmVjYXA9ImJ1dHQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAzMCAzMCkiLz4KPC9zdmc+Cg==";
|
|
861
863
|
if (!e) return t;
|
|
@@ -900,8 +902,8 @@ var zt = (e, t) => !!(e.base64 && !(t != null && t.base64.has(e.base64)) || e.im
|
|
|
900
902
|
[V.FILE]: () => "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgM0M0IDIuNDQ3NzIgNC40NDc3MiAyIDUgMkgxMkwxNCA0TDE2IDZWMTdDMTYgMTcuNTUyMyAxNS41NTIzIDE4IDE1IDE4SDVDNC40NDc3MiAxOCA0IDE3LjU1MjMgNCAxN1YzWiIgZmlsbD0iIzNGNDM0QSIvPgo8cGF0aCBkPSJNMTIgMkwxNCA0TDE2IDZIMTJWMloiIGZpbGw9IiM4QTkwOTkiLz4KPHJlY3QgeD0iOS41IiB5PSIxMiIgd2lkdGg9IjEiIGhlaWdodD0iNiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTggMTRMMTAgMTFMMTIgMTRIOFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",
|
|
901
903
|
[V.RELOAD]: () => "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCAzNiAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgb3BhY2l0eT0iMC42Ij4KPHJlY3Qgd2lkdGg9IjM2IiBoZWlnaHQ9IjM2IiByeD0iMTgiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yNS43MTczIDEwTDI1LjcxNzMgMTUuNzQyN0wyMC41IDE1Ljc0MjciIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yNS41OTE5IDIwLjUyMjZDMjQuOTkzNCAyMi4zMjM4IDIzLjc3NCAyMy44NTM1IDIyLjE1MTUgMjQuODM4NUMyMC41MjkxIDI1LjgyMzUgMTguNjA5MyAyNi4xOTk1IDE2LjczNTIgMjUuODk5NEMxNC44NjEgMjUuNTk5MyAxMy4xNTQ2IDI0LjY0MjcgMTEuOTIwOCAyMy4yMDA0QzEwLjY4NyAyMS43NTgxIDEwLjAwNjIgMTkuOTI0MSAxMCAxOC4wMjYxQzkuOTkzODYgMTYuMTI4MSAxMC42NjI3IDE0LjI4OTcgMTEuODg3MSAxMi44Mzk0QzEzLjExMTQgMTEuMzg5MSAxNC44MTE2IDEwLjQyMTMgMTYuNjgzNyAxMC4xMDkxQzE4LjU1NTggOS43OTY3NiAyMC40NzggMTAuMTYwMyAyMi4xMDY5IDExLjEzNDZDMjMuNzM1NyAxMi4xMDkgMjQuOTY1IDEzLjYzMDcgMjUuNTc1MyAxNS40MjgiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg==",
|
|
902
904
|
[V.DEFAULT]: () => ""
|
|
903
|
-
},
|
|
904
|
-
let o =
|
|
905
|
+
}, qt = ({ type: e, color: t, contentMode: n = Et.ASPECT_FILL, cornerRadius: r, backgroundColor: i, isFullSize: a = !1 }) => {
|
|
906
|
+
let o = Kt[e] || Kt[V.DEFAULT], s = o == null ? void 0 : o(t);
|
|
905
907
|
return e === V.SPINNER || e === V.LOADER ? /* @__PURE__ */ B(Ct, {
|
|
906
908
|
dataUrl: s,
|
|
907
909
|
isFullSize: a
|
|
@@ -916,22 +918,22 @@ var zt = (e, t) => !!(e.base64 && !(t != null && t.base64.has(e.base64)) || e.im
|
|
|
916
918
|
maxWidth: "100%",
|
|
917
919
|
maxHeight: "100%"
|
|
918
920
|
}), {}, {
|
|
919
|
-
objectFit:
|
|
921
|
+
objectFit: Ht(n),
|
|
920
922
|
borderRadius: r,
|
|
921
923
|
backgroundColor: i
|
|
922
924
|
})
|
|
923
925
|
});
|
|
924
|
-
},
|
|
926
|
+
}, Jt = "#005fcc", Yt = "idv-gui", Xt = {
|
|
925
927
|
DECODING_FAILED: 0,
|
|
926
928
|
IMAGE_LOADING_FAILED: 1
|
|
927
|
-
},
|
|
929
|
+
}, Zt = {
|
|
928
930
|
text: "text",
|
|
929
931
|
selector: "selector",
|
|
930
932
|
multiSelector: "multiSelector"
|
|
931
|
-
},
|
|
933
|
+
}, Qt = {
|
|
932
934
|
NOT_EMPTY: "notEmpty",
|
|
933
935
|
REGEX: "regex"
|
|
934
|
-
},
|
|
936
|
+
}, $t = {
|
|
935
937
|
APP_DENIED: "app_denied",
|
|
936
938
|
SYSTEM_RESTRICTED: "system_restricted",
|
|
937
939
|
FILES_NOT_SELECTED: "files_not_selected",
|
|
@@ -939,7 +941,7 @@ var zt = (e, t) => !!(e.base64 && !(t != null && t.base64.has(e.base64)) || e.im
|
|
|
939
941
|
};
|
|
940
942
|
//#endregion
|
|
941
943
|
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/asyncToGenerator.js
|
|
942
|
-
function
|
|
944
|
+
function en(e, t, n, r, i, a, o) {
|
|
943
945
|
try {
|
|
944
946
|
var s = e[a](o), c = s.value;
|
|
945
947
|
} catch (e) {
|
|
@@ -954,10 +956,10 @@ function H(e) {
|
|
|
954
956
|
return new Promise(function(r, i) {
|
|
955
957
|
var a = e.apply(t, n);
|
|
956
958
|
function o(e) {
|
|
957
|
-
|
|
959
|
+
en(a, r, i, o, s, "next", e);
|
|
958
960
|
}
|
|
959
961
|
function s(e) {
|
|
960
|
-
|
|
962
|
+
en(a, r, i, o, s, "throw", e);
|
|
961
963
|
}
|
|
962
964
|
o(void 0);
|
|
963
965
|
});
|
|
@@ -965,42 +967,42 @@ function H(e) {
|
|
|
965
967
|
}
|
|
966
968
|
//#endregion
|
|
967
969
|
//#region src/utils/index.ts
|
|
968
|
-
function
|
|
970
|
+
function tn(e) {
|
|
969
971
|
return e === Tt.CENTER ? "center" : e === Tt.RIGHT || e === Tt.END ? "end" : "start";
|
|
970
972
|
}
|
|
971
|
-
function
|
|
973
|
+
function nn(e) {
|
|
972
974
|
return e === Tt.CENTER ? "center" : e === Tt.END ? "end" : e === Tt.LEFT ? "left" : e === Tt.RIGHT ? "right" : "start";
|
|
973
975
|
}
|
|
974
|
-
function
|
|
975
|
-
if (typeof e == "object" && e) for (let t in e) typeof e[t] == "object" ?
|
|
976
|
+
function rn(e) {
|
|
977
|
+
if (typeof e == "object" && e) for (let t in e) typeof e[t] == "object" ? rn(e[t]) : e[t] === "true" ? e[t] = !0 : e[t] === "false" && (e[t] = !1);
|
|
976
978
|
return e;
|
|
977
979
|
}
|
|
978
|
-
function
|
|
980
|
+
function an(e) {
|
|
979
981
|
return Object.entries(e).map(([e, t]) => ({
|
|
980
982
|
id: e,
|
|
981
983
|
value: typeof t == "string" ? t.trim() : t
|
|
982
984
|
})).filter((e) => !!e.value);
|
|
983
985
|
}
|
|
984
|
-
var
|
|
986
|
+
var on = (e) => Array.isArray(e) ? e.length === 0 : e === 0 ? !1 : !e;
|
|
985
987
|
function U(e) {
|
|
986
988
|
if (e) return /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e) ? e : void 0;
|
|
987
989
|
}
|
|
988
|
-
var
|
|
989
|
-
if (n.answerType ===
|
|
990
|
+
var sn = (e, t) => e.reduce((e, n) => {
|
|
991
|
+
if (n.answerType === Zt.text) {
|
|
990
992
|
var r;
|
|
991
993
|
if ((r = n.property) != null && r.id) {
|
|
992
994
|
let r = t.find((e) => e.name === n.property.id);
|
|
993
995
|
if (r != null && r.string) return z(z({}, e), {}, { [n.id]: r.string });
|
|
994
996
|
}
|
|
995
997
|
}
|
|
996
|
-
if (n.answerType ===
|
|
998
|
+
if (n.answerType === Zt.selector) {
|
|
997
999
|
var i;
|
|
998
1000
|
if ((i = n.property) != null && i.id) {
|
|
999
1001
|
let r = t.find((e) => e.name === n.property.id);
|
|
1000
1002
|
if (r != null && r.string) return z(z({}, e), {}, { [n.id]: r.string });
|
|
1001
1003
|
}
|
|
1002
1004
|
}
|
|
1003
|
-
if (n.answerType ===
|
|
1005
|
+
if (n.answerType === Zt.multiSelector) {
|
|
1004
1006
|
var a;
|
|
1005
1007
|
if ((a = n.property) != null && a.id) {
|
|
1006
1008
|
let r = t.find((e) => e.name === n.property.id);
|
|
@@ -1008,7 +1010,7 @@ var on = (e, t) => e.reduce((e, n) => {
|
|
|
1008
1010
|
}
|
|
1009
1011
|
}
|
|
1010
1012
|
return e;
|
|
1011
|
-
}, {}),
|
|
1013
|
+
}, {}), cn = (e) => new Promise((t, n) => {
|
|
1012
1014
|
let r = new FileReader();
|
|
1013
1015
|
r.onload = () => {
|
|
1014
1016
|
let e = r.result;
|
|
@@ -1017,7 +1019,7 @@ var on = (e, t) => e.reduce((e, n) => {
|
|
|
1017
1019
|
t(n);
|
|
1018
1020
|
} else n(/* @__PURE__ */ Error("Unexpected result type"));
|
|
1019
1021
|
}, r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
1020
|
-
}),
|
|
1022
|
+
}), ln = function() {
|
|
1021
1023
|
var e = H(function* () {
|
|
1022
1024
|
try {
|
|
1023
1025
|
return (yield navigator.mediaDevices.getUserMedia({ video: !0 })).getTracks().forEach((e) => e.stop()), "allowed";
|
|
@@ -1028,10 +1030,10 @@ var on = (e, t) => e.reduce((e, n) => {
|
|
|
1028
1030
|
return function() {
|
|
1029
1031
|
return e.apply(this, arguments);
|
|
1030
1032
|
};
|
|
1031
|
-
}(),
|
|
1033
|
+
}(), un = () => String.fromCharCode(Math.floor(Math.random() * 26) + 97) + Number(Math.random()).toString(16).slice(2) + Date.now().toString(16).slice(4);
|
|
1032
1034
|
//#endregion
|
|
1033
1035
|
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1034
|
-
function
|
|
1036
|
+
function dn(e, t) {
|
|
1035
1037
|
if (e == null) return {};
|
|
1036
1038
|
var n = {};
|
|
1037
1039
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -1042,9 +1044,9 @@ function un(e, t) {
|
|
|
1042
1044
|
}
|
|
1043
1045
|
//#endregion
|
|
1044
1046
|
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/objectWithoutProperties.js
|
|
1045
|
-
function
|
|
1047
|
+
function fn(e, t) {
|
|
1046
1048
|
if (e == null) return {};
|
|
1047
|
-
var n, r, i =
|
|
1049
|
+
var n, r, i = dn(e, t);
|
|
1048
1050
|
if (Object.getOwnPropertySymbols) {
|
|
1049
1051
|
var a = Object.getOwnPropertySymbols(e);
|
|
1050
1052
|
for (r = 0; r < a.length; r++) n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
@@ -1054,8 +1056,8 @@ function dn(e, t) {
|
|
|
1054
1056
|
//#endregion
|
|
1055
1057
|
//#region src/components/image/index.tsx
|
|
1056
1058
|
R();
|
|
1057
|
-
var
|
|
1058
|
-
let { isFullSize: t = !1 } = e, n =
|
|
1059
|
+
var pn = ["isFullSize"], W = (e) => {
|
|
1060
|
+
let { isFullSize: t = !1 } = e, n = fn(e, pn), { failedAssets: r } = bt(), i = Vt(n, r), [a, o] = N(0), s = i[a];
|
|
1059
1061
|
if (!s) return null;
|
|
1060
1062
|
let { imageId: c, imageURL: l, base64: u, contentMode: d = Et.ASPECT_FILL, cornerRadius: f, backgroundColor: p } = s, [h, g] = N(!0), _ = h && l, v = () => {
|
|
1061
1063
|
g(!1);
|
|
@@ -1072,15 +1074,15 @@ var fn = ["isFullSize"], W = (e) => {
|
|
|
1072
1074
|
};
|
|
1073
1075
|
return u ? /* @__PURE__ */ B("img", {
|
|
1074
1076
|
style: z(z({}, b), {}, {
|
|
1075
|
-
objectFit:
|
|
1077
|
+
objectFit: Ht(d),
|
|
1076
1078
|
borderRadius: f,
|
|
1077
1079
|
backgroundColor: U(p) || "transparent",
|
|
1078
1080
|
display: "block"
|
|
1079
1081
|
}),
|
|
1080
1082
|
src: u,
|
|
1081
1083
|
onError: y
|
|
1082
|
-
}) : c ? /* @__PURE__ */ B(
|
|
1083
|
-
type: c in
|
|
1084
|
+
}) : c ? /* @__PURE__ */ B(qt, {
|
|
1085
|
+
type: c in Kt ? c : "default",
|
|
1084
1086
|
contentMode: d,
|
|
1085
1087
|
cornerRadius: f,
|
|
1086
1088
|
backgroundColor: U(p) || "transparent",
|
|
@@ -1092,7 +1094,7 @@ var fn = ["isFullSize"], W = (e) => {
|
|
|
1092
1094
|
borderRadius: f
|
|
1093
1095
|
} }), /* @__PURE__ */ B("img", {
|
|
1094
1096
|
style: z(z({}, b), {}, {
|
|
1095
|
-
objectFit:
|
|
1097
|
+
objectFit: Ht(d),
|
|
1096
1098
|
borderRadius: f,
|
|
1097
1099
|
backgroundColor: U(p) || "transparent",
|
|
1098
1100
|
display: _ ? "none" : "block"
|
|
@@ -1101,7 +1103,7 @@ var fn = ["isFullSize"], W = (e) => {
|
|
|
1101
1103
|
onLoad: v,
|
|
1102
1104
|
onError: y
|
|
1103
1105
|
})] }) : null;
|
|
1104
|
-
},
|
|
1106
|
+
}, mn = ({ signature: e }) => /* @__PURE__ */ B("footer", {
|
|
1105
1107
|
"data-ui": "gui-footer",
|
|
1106
1108
|
part: "gui-footer",
|
|
1107
1109
|
style: {
|
|
@@ -1124,7 +1126,7 @@ var fn = ["isFullSize"], W = (e) => {
|
|
|
1124
1126
|
//#endregion
|
|
1125
1127
|
//#region src/components/header/components/close-button/index.tsx
|
|
1126
1128
|
R();
|
|
1127
|
-
var
|
|
1129
|
+
var hn = {
|
|
1128
1130
|
display: "flex",
|
|
1129
1131
|
justifyContent: "center",
|
|
1130
1132
|
alignItems: "center",
|
|
@@ -1133,7 +1135,7 @@ var mn = {
|
|
|
1133
1135
|
border: "none",
|
|
1134
1136
|
cursor: "pointer",
|
|
1135
1137
|
padding: 0
|
|
1136
|
-
},
|
|
1138
|
+
}, gn = ({ dataTestId: e, responseBody: t, image: n, title: r, backgroundColor: i = "transparent", cornerRadius: a, highlightColor: o }) => {
|
|
1137
1139
|
var s;
|
|
1138
1140
|
let [c, l] = N(!1), u = c && o ? o : i, { perform: d } = vt();
|
|
1139
1141
|
return /* @__PURE__ */ B("button", {
|
|
@@ -1142,10 +1144,10 @@ var mn = {
|
|
|
1142
1144
|
"data-test": e,
|
|
1143
1145
|
onClick: () => {
|
|
1144
1146
|
let e = JSON.parse(JSON.stringify(t));
|
|
1145
|
-
|
|
1147
|
+
rn(e), d(e, ut.DATA);
|
|
1146
1148
|
},
|
|
1147
1149
|
className: "hover-button",
|
|
1148
|
-
style: z(z(z({},
|
|
1150
|
+
style: z(z(z({}, hn), a && { borderRadius: a }), {}, { backgroundColor: (s = U(u)) == null ? "transparent" : s }),
|
|
1149
1151
|
onMouseEnter: () => l(!0),
|
|
1150
1152
|
onMouseLeave: () => l(!1),
|
|
1151
1153
|
children: [n && /* @__PURE__ */ B("div", {
|
|
@@ -1160,7 +1162,7 @@ var mn = {
|
|
|
1160
1162
|
children: /* @__PURE__ */ B(G, z({}, r))
|
|
1161
1163
|
})]
|
|
1162
1164
|
});
|
|
1163
|
-
},
|
|
1165
|
+
}, _n = ({ closeButton: e }) => /* @__PURE__ */ B("header", {
|
|
1164
1166
|
style: {
|
|
1165
1167
|
width: "100%",
|
|
1166
1168
|
height: "100%",
|
|
@@ -1171,9 +1173,9 @@ var mn = {
|
|
|
1171
1173
|
},
|
|
1172
1174
|
"data-ui": "gui-header",
|
|
1173
1175
|
part: "gui-header",
|
|
1174
|
-
children: /* @__PURE__ */ B("div", { children: e && /* @__PURE__ */ B(
|
|
1176
|
+
children: /* @__PURE__ */ B("div", { children: e && /* @__PURE__ */ B(gn, z({ dataTestId: "close-btn" }, e)) })
|
|
1175
1177
|
}), G = ({ text: e, fontName: t = "", fontSize: n = "17px", fontColor: r, alignment: i, backgroundColor: a, cornerRadius: o = 0, paddings: s, fontWeight: c = Dt.NORMAL, htmlFor: l, isGenericTemplate: u = !1 }) => {
|
|
1176
|
-
let d = u ? Tt.START : Tt.LEFT, f = i || d, p = u ?
|
|
1178
|
+
let d = u ? Tt.START : Tt.LEFT, f = i || d, p = u ? nn(f) : tn(f), m = z(z({
|
|
1177
1179
|
fontFamily: [
|
|
1178
1180
|
t,
|
|
1179
1181
|
"-apple-system",
|
|
@@ -1181,13 +1183,13 @@ var mn = {
|
|
|
1181
1183
|
"sans-serif"
|
|
1182
1184
|
].filter(Boolean).join(", "),
|
|
1183
1185
|
fontSize: n
|
|
1184
|
-
}, u && { fontWeight:
|
|
1186
|
+
}, u && { fontWeight: Gt(c) }), {}, {
|
|
1185
1187
|
color: U(r) || "#000000",
|
|
1186
1188
|
textAlign: p,
|
|
1187
1189
|
backgroundColor: U(a) || "transparent",
|
|
1188
1190
|
borderRadius: o,
|
|
1189
1191
|
overflowWrap: "break-word"
|
|
1190
|
-
}, u &&
|
|
1192
|
+
}, u && zt(s)), h = typeof e == "string" && e.trim() && It(e);
|
|
1191
1193
|
return l ? /* @__PURE__ */ B("label", {
|
|
1192
1194
|
"data-ui": "gui-label",
|
|
1193
1195
|
part: "gui-label",
|
|
@@ -1204,7 +1206,7 @@ var mn = {
|
|
|
1204
1206
|
//#endregion
|
|
1205
1207
|
//#region src/hooks/useButtonInteractionState.ts
|
|
1206
1208
|
R();
|
|
1207
|
-
var
|
|
1209
|
+
var vn = () => {
|
|
1208
1210
|
let [e, t] = N(!1), [n, r] = N(!1);
|
|
1209
1211
|
return {
|
|
1210
1212
|
isHovered: e,
|
|
@@ -1218,12 +1220,12 @@ var _n = () => {
|
|
|
1218
1220
|
onMouseLeave: () => t(!1)
|
|
1219
1221
|
}
|
|
1220
1222
|
};
|
|
1221
|
-
},
|
|
1223
|
+
}, yn = ({ isGenericTemplate: e, isPressed: t, isHovered: n, backgroundColor: r, highlightColor: i, hoverColor: a }) => {
|
|
1222
1224
|
let o = U(r) || "transparent", s = U(i), c = U(a);
|
|
1223
1225
|
return e && t ? s || o : e && n ? c || o : !e && n && s || o;
|
|
1224
|
-
},
|
|
1226
|
+
}, bn = ({ title: e, image: t, responseBody: n, backgroundColor: r = "transparent", cornerRadius: i, highlightColor: a, hoverColor: o, dataTestId: s, borderColor: c, borderWidth: l, type: u = "RESPONSE_BODY", paddings: d, isGenericTemplate: f = !1, onClick: p }) => {
|
|
1225
1227
|
var m;
|
|
1226
|
-
let { perform: h } = vt(), { isHovered: g, isPressed: _, interactionHandlers: v } =
|
|
1228
|
+
let { perform: h } = vt(), { isHovered: g, isPressed: _, interactionHandlers: v } = vn(), y = yn({
|
|
1227
1229
|
isGenericTemplate: f,
|
|
1228
1230
|
isPressed: _,
|
|
1229
1231
|
isHovered: g,
|
|
@@ -1233,8 +1235,8 @@ var _n = () => {
|
|
|
1233
1235
|
}), b = (e) => {
|
|
1234
1236
|
if (p && p(e), u !== "RESPONSE_BODY" && !(u === "FORM" && n)) return;
|
|
1235
1237
|
let t = JSON.parse(JSON.stringify(n));
|
|
1236
|
-
|
|
1237
|
-
}, x = f ? z({},
|
|
1238
|
+
rn(t), h(t, u === "FORM" ? ut.FORM : ut.DATA);
|
|
1239
|
+
}, x = f ? z({}, zt(d)) : {
|
|
1238
1240
|
padding: "10px 16px",
|
|
1239
1241
|
height: "50px"
|
|
1240
1242
|
}, S = z(z({
|
|
@@ -1255,7 +1257,7 @@ var _n = () => {
|
|
|
1255
1257
|
borderWidth: l == null ? 0 : l,
|
|
1256
1258
|
overflow: "hidden",
|
|
1257
1259
|
transition: ".3s",
|
|
1258
|
-
outlineColor:
|
|
1260
|
+
outlineColor: Jt
|
|
1259
1261
|
}, f && { WebkitTapHighlightColor: "transparent" }), x);
|
|
1260
1262
|
return /* @__PURE__ */ B("button", z(z({
|
|
1261
1263
|
"data-ui": "gui-button",
|
|
@@ -1279,8 +1281,8 @@ var _n = () => {
|
|
|
1279
1281
|
children: /* @__PURE__ */ B(G, z(z({}, e), {}, { isGenericTemplate: f }))
|
|
1280
1282
|
})]
|
|
1281
1283
|
}));
|
|
1282
|
-
},
|
|
1283
|
-
let { items: t } = e, n =
|
|
1284
|
+
}, xn = ["items"], Sn = (e) => {
|
|
1285
|
+
let { items: t } = e, n = fn(e, xn);
|
|
1284
1286
|
return /* @__PURE__ */ B("div", {
|
|
1285
1287
|
part: "gui-buttons",
|
|
1286
1288
|
"data-ui": "gui-buttons",
|
|
@@ -1299,10 +1301,10 @@ var _n = () => {
|
|
|
1299
1301
|
}), n),
|
|
1300
1302
|
children: t.map((e) => {
|
|
1301
1303
|
var t;
|
|
1302
|
-
return /* @__PURE__ */ B(
|
|
1304
|
+
return /* @__PURE__ */ B(bn, z({ dataTestId: "button-" + ((t = e.title) == null ? void 0 : t.text) }, e), un());
|
|
1303
1305
|
})
|
|
1304
1306
|
});
|
|
1305
|
-
},
|
|
1307
|
+
}, Cn = ({ children: e, header: t, footer: n, backgroundColor: r = "white", backgroundImage: i, buttons: a }) => {
|
|
1306
1308
|
let { failedAssets: o } = bt(), s = t ? 60 : 10, c = n ? 66 : 32;
|
|
1307
1309
|
return /* @__PURE__ */ B("div", {
|
|
1308
1310
|
part: "gui-base-container",
|
|
@@ -1323,7 +1325,7 @@ var _n = () => {
|
|
|
1323
1325
|
height: "100%",
|
|
1324
1326
|
width: "100%",
|
|
1325
1327
|
backgroundColor: U(r)
|
|
1326
|
-
},
|
|
1328
|
+
}, Wt(i, o))),
|
|
1327
1329
|
children: [
|
|
1328
1330
|
t && /* @__PURE__ */ B("div", {
|
|
1329
1331
|
style: {
|
|
@@ -1333,7 +1335,7 @@ var _n = () => {
|
|
|
1333
1335
|
width: "100%",
|
|
1334
1336
|
height: s
|
|
1335
1337
|
},
|
|
1336
|
-
children: /* @__PURE__ */ B(
|
|
1338
|
+
children: /* @__PURE__ */ B(_n, { closeButton: t.closeButton })
|
|
1337
1339
|
}),
|
|
1338
1340
|
/* @__PURE__ */ B("div", {
|
|
1339
1341
|
style: {
|
|
@@ -1344,7 +1346,7 @@ var _n = () => {
|
|
|
1344
1346
|
},
|
|
1345
1347
|
children: e
|
|
1346
1348
|
}),
|
|
1347
|
-
(a == null ? void 0 : a.length) && /* @__PURE__ */ B(
|
|
1349
|
+
(a == null ? void 0 : a.length) && /* @__PURE__ */ B(Sn, { items: a }),
|
|
1348
1350
|
n && /* @__PURE__ */ B("div", {
|
|
1349
1351
|
style: {
|
|
1350
1352
|
position: "absolute",
|
|
@@ -1354,11 +1356,11 @@ var _n = () => {
|
|
|
1354
1356
|
height: c,
|
|
1355
1357
|
padding: "16px 20px"
|
|
1356
1358
|
},
|
|
1357
|
-
children: /* @__PURE__ */ B(
|
|
1359
|
+
children: /* @__PURE__ */ B(mn, z({}, n))
|
|
1358
1360
|
})
|
|
1359
1361
|
]
|
|
1360
1362
|
});
|
|
1361
|
-
},
|
|
1363
|
+
}, wn = ({ text: e, fontName: t = "", fontColor: n, alignment: r = Tt.LEFT, fontSize: i = 17, backgroundColor: a, cornerRadius: o = 0 }) => /* @__PURE__ */ B("div", {
|
|
1362
1364
|
"data-ui": "gui-description",
|
|
1363
1365
|
part: "gui-description",
|
|
1364
1366
|
style: {
|
|
@@ -1369,23 +1371,23 @@ var _n = () => {
|
|
|
1369
1371
|
"sans-serif"
|
|
1370
1372
|
].filter(Boolean).join(", "),
|
|
1371
1373
|
fontSize: i,
|
|
1372
|
-
textAlign:
|
|
1374
|
+
textAlign: tn(r),
|
|
1373
1375
|
color: U(n) || "#000000",
|
|
1374
1376
|
borderRadius: o,
|
|
1375
1377
|
backgroundColor: U(a) || "transparent",
|
|
1376
1378
|
whiteSpace: "pre-line",
|
|
1377
1379
|
overflowWrap: "break-word"
|
|
1378
1380
|
},
|
|
1379
|
-
children: e &&
|
|
1381
|
+
children: e && It(e)
|
|
1380
1382
|
});
|
|
1381
1383
|
//#endregion
|
|
1382
1384
|
//#region src/screens/status-screen/index.tsx
|
|
1383
1385
|
R();
|
|
1384
|
-
var
|
|
1386
|
+
var Tn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a, backgroundColor: o, backgroundImage: s }) => {
|
|
1385
1387
|
let c = F(null), [l, u] = N(!1);
|
|
1386
1388
|
return P(() => {
|
|
1387
1389
|
c.current && u(c.current.scrollHeight > c.current.clientHeight + 2);
|
|
1388
|
-
}, []), /* @__PURE__ */ B(
|
|
1390
|
+
}, []), /* @__PURE__ */ B(Cn, {
|
|
1389
1391
|
header: e,
|
|
1390
1392
|
buttons: a,
|
|
1391
1393
|
footer: t,
|
|
@@ -1436,17 +1438,17 @@ var wn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a
|
|
|
1436
1438
|
fontWeight: "400",
|
|
1437
1439
|
marginTop: "16px"
|
|
1438
1440
|
},
|
|
1439
|
-
children: /* @__PURE__ */ B(
|
|
1441
|
+
children: /* @__PURE__ */ B(wn, z({}, i))
|
|
1440
1442
|
})
|
|
1441
1443
|
]
|
|
1442
1444
|
})
|
|
1443
1445
|
});
|
|
1444
|
-
},
|
|
1446
|
+
}, En = {
|
|
1445
1447
|
width: "100%",
|
|
1446
1448
|
height: "auto",
|
|
1447
1449
|
marginBottom: "32px",
|
|
1448
1450
|
aspectRatio: "1.68"
|
|
1449
|
-
},
|
|
1451
|
+
}, Dn = {
|
|
1450
1452
|
position: "relative",
|
|
1451
1453
|
display: "flex",
|
|
1452
1454
|
flexDirection: "column",
|
|
@@ -1457,7 +1459,7 @@ var wn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a
|
|
|
1457
1459
|
width: "100%",
|
|
1458
1460
|
minHeight: "100%",
|
|
1459
1461
|
overflow: "auto"
|
|
1460
|
-
},
|
|
1462
|
+
}, On = ({ title: e, header: t, footer: n, image: r, description: i, buttons: a, backgroundColor: o, backgroundImage: s }) => /* @__PURE__ */ B(Cn, {
|
|
1461
1463
|
header: t,
|
|
1462
1464
|
footer: n,
|
|
1463
1465
|
buttons: a,
|
|
@@ -1467,10 +1469,10 @@ var wn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a
|
|
|
1467
1469
|
part: "gui-info-screen-container",
|
|
1468
1470
|
"data-ui": "gui-info-screen-container",
|
|
1469
1471
|
id: "info-screen-container",
|
|
1470
|
-
style: z(z({},
|
|
1472
|
+
style: z(z({}, Dn), {}, { justifyContent: r ? "flex-start" : "center" }),
|
|
1471
1473
|
children: [
|
|
1472
1474
|
r && /* @__PURE__ */ B("div", {
|
|
1473
|
-
style:
|
|
1475
|
+
style: En,
|
|
1474
1476
|
children: /* @__PURE__ */ B(W, z({}, r))
|
|
1475
1477
|
}),
|
|
1476
1478
|
e && /* @__PURE__ */ B("div", {
|
|
@@ -1485,15 +1487,15 @@ var wn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a
|
|
|
1485
1487
|
lineHeight: "28px",
|
|
1486
1488
|
fontWeight: "400"
|
|
1487
1489
|
},
|
|
1488
|
-
children: /* @__PURE__ */ B(
|
|
1490
|
+
children: /* @__PURE__ */ B(wn, z({}, i))
|
|
1489
1491
|
})
|
|
1490
1492
|
]
|
|
1491
1493
|
}) })
|
|
1492
|
-
}),
|
|
1494
|
+
}), kn = ({ indicatorColor: e = "#7E57C5", isFullSize: t = !1 }) => /* @__PURE__ */ B(qt, {
|
|
1493
1495
|
type: V.SPINNER,
|
|
1494
1496
|
color: e,
|
|
1495
1497
|
isFullSize: t
|
|
1496
|
-
}),
|
|
1498
|
+
}), An = ({ progressView: e, footer: t, backgroundColor: n, backgroundImage: r }) => /* @__PURE__ */ B(Cn, {
|
|
1497
1499
|
footer: t,
|
|
1498
1500
|
backgroundColor: n,
|
|
1499
1501
|
backgroundImage: r,
|
|
@@ -1509,9 +1511,9 @@ var wn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a
|
|
|
1509
1511
|
height: "100%",
|
|
1510
1512
|
width: "100%"
|
|
1511
1513
|
},
|
|
1512
|
-
children: /* @__PURE__ */ B(
|
|
1514
|
+
children: /* @__PURE__ */ B(kn, { indicatorColor: U(e == null ? void 0 : e.indicatorColor) || "#000000" })
|
|
1513
1515
|
})
|
|
1514
|
-
}),
|
|
1516
|
+
}), jn = ({ title: e, description: t, image: n, backgroundColor: r, cornerRadius: i = 0, isLastChild: a }) => /* @__PURE__ */ B("div", {
|
|
1515
1517
|
className: "details-item",
|
|
1516
1518
|
style: z(z({}, {
|
|
1517
1519
|
display: "flex",
|
|
@@ -1541,7 +1543,7 @@ var wn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a
|
|
|
1541
1543
|
lineHeight: "21px",
|
|
1542
1544
|
fontWeight: "400"
|
|
1543
1545
|
},
|
|
1544
|
-
children: /* @__PURE__ */ B(
|
|
1546
|
+
children: /* @__PURE__ */ B(wn, z({}, t))
|
|
1545
1547
|
})]
|
|
1546
1548
|
}), /* @__PURE__ */ B("div", {
|
|
1547
1549
|
style: {
|
|
@@ -1552,26 +1554,26 @@ var wn = ({ header: e, footer: t, image: n, title: r, description: i, buttons: a
|
|
|
1552
1554
|
},
|
|
1553
1555
|
children: /* @__PURE__ */ B(W, z({}, n))
|
|
1554
1556
|
})]
|
|
1555
|
-
}),
|
|
1557
|
+
}), Mn = {
|
|
1556
1558
|
display: "flex",
|
|
1557
1559
|
flexDirection: "column",
|
|
1558
1560
|
padding: "0 16px"
|
|
1559
|
-
},
|
|
1561
|
+
}, Nn = ({ items: e, backgroundColor: t, cornerRadius: n = 16 }) => /* @__PURE__ */ B("div", {
|
|
1560
1562
|
className: "details",
|
|
1561
|
-
style: z(z({},
|
|
1563
|
+
style: z(z({}, Mn), {}, {
|
|
1562
1564
|
backgroundColor: U(t) || "white",
|
|
1563
1565
|
borderRadius: n
|
|
1564
1566
|
}),
|
|
1565
|
-
children: e.map((t, n) => /* @__PURE__ */ B(
|
|
1567
|
+
children: e.map((t, n) => /* @__PURE__ */ B(jn, z({ isLastChild: n === e.length - 1 }, t), n))
|
|
1566
1568
|
});
|
|
1567
1569
|
//#endregion
|
|
1568
1570
|
//#region src/screens/details-screen/index.tsx
|
|
1569
1571
|
R();
|
|
1570
|
-
var
|
|
1572
|
+
var Pn = ({ title: e, header: t, footer: n, details: r, buttons: i, backgroundColor: a, backgroundImage: o }) => {
|
|
1571
1573
|
let s = F(null), [c, l] = N(!1);
|
|
1572
1574
|
return P(() => {
|
|
1573
1575
|
s.current && l(s.current.scrollHeight > s.current.clientHeight);
|
|
1574
|
-
}, []), /* @__PURE__ */ B(
|
|
1576
|
+
}, []), /* @__PURE__ */ B(Cn, {
|
|
1575
1577
|
header: t,
|
|
1576
1578
|
buttons: i,
|
|
1577
1579
|
footer: n,
|
|
@@ -1594,84 +1596,84 @@ var Nn = ({ title: e, header: t, footer: n, details: r, buttons: i, backgroundCo
|
|
|
1594
1596
|
fontSize: "28px"
|
|
1595
1597
|
},
|
|
1596
1598
|
children: e && /* @__PURE__ */ B(G, z({}, e))
|
|
1597
|
-
}), r && /* @__PURE__ */ B(
|
|
1599
|
+
}), r && /* @__PURE__ */ B(Nn, z({}, r))]
|
|
1598
1600
|
})
|
|
1599
1601
|
});
|
|
1600
|
-
},
|
|
1601
|
-
Children: () =>
|
|
1602
|
+
}, Fn = /* @__PURE__ */ o({
|
|
1603
|
+
Children: () => mr,
|
|
1602
1604
|
Component: () => h,
|
|
1603
1605
|
Fragment: () => m,
|
|
1604
|
-
PureComponent: () =>
|
|
1606
|
+
PureComponent: () => Un,
|
|
1605
1607
|
StrictMode: () => m,
|
|
1606
|
-
Suspense: () =>
|
|
1607
|
-
SuspenseList: () =>
|
|
1608
|
-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: () =>
|
|
1609
|
-
cloneElement: () =>
|
|
1608
|
+
Suspense: () => Jn,
|
|
1609
|
+
SuspenseList: () => Zn,
|
|
1610
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: () => Ar,
|
|
1611
|
+
cloneElement: () => sr,
|
|
1610
1612
|
createContext: () => ce,
|
|
1611
1613
|
createElement: () => d,
|
|
1612
|
-
createFactory: () =>
|
|
1613
|
-
createPortal: () =>
|
|
1614
|
+
createFactory: () => rr,
|
|
1615
|
+
createPortal: () => er,
|
|
1614
1616
|
createRef: () => p,
|
|
1615
1617
|
default: () => K,
|
|
1616
|
-
findDOMNode: () =>
|
|
1617
|
-
flushSync: () =>
|
|
1618
|
-
forwardRef: () =>
|
|
1619
|
-
hydrate: () =>
|
|
1620
|
-
isElement: () =>
|
|
1621
|
-
isFragment: () =>
|
|
1622
|
-
isMemo: () =>
|
|
1623
|
-
isValidElement: () =>
|
|
1624
|
-
lazy: () =>
|
|
1625
|
-
memo: () =>
|
|
1626
|
-
render: () =>
|
|
1627
|
-
startTransition: () =>
|
|
1628
|
-
unmountComponentAtNode: () =>
|
|
1629
|
-
unstable_batchedUpdates: () =>
|
|
1618
|
+
findDOMNode: () => lr,
|
|
1619
|
+
flushSync: () => Nr,
|
|
1620
|
+
forwardRef: () => Gn,
|
|
1621
|
+
hydrate: () => nr,
|
|
1622
|
+
isElement: () => Pr,
|
|
1623
|
+
isFragment: () => ar,
|
|
1624
|
+
isMemo: () => or,
|
|
1625
|
+
isValidElement: () => ir,
|
|
1626
|
+
lazy: () => Xn,
|
|
1627
|
+
memo: () => Wn,
|
|
1628
|
+
render: () => tr,
|
|
1629
|
+
startTransition: () => Bn,
|
|
1630
|
+
unmountComponentAtNode: () => cr,
|
|
1631
|
+
unstable_batchedUpdates: () => Mr,
|
|
1630
1632
|
useCallback: () => Ne,
|
|
1631
1633
|
useContext: () => Pe,
|
|
1632
1634
|
useDebugValue: () => Fe,
|
|
1633
|
-
useDeferredValue: () =>
|
|
1635
|
+
useDeferredValue: () => Vn,
|
|
1634
1636
|
useEffect: () => P,
|
|
1635
1637
|
useErrorBoundary: () => Ie,
|
|
1636
1638
|
useId: () => Le,
|
|
1637
1639
|
useImperativeHandle: () => je,
|
|
1638
|
-
useInsertionEffect: () =>
|
|
1640
|
+
useInsertionEffect: () => ur,
|
|
1639
1641
|
useLayoutEffect: () => Ae,
|
|
1640
1642
|
useMemo: () => Me,
|
|
1641
1643
|
useReducer: () => ke,
|
|
1642
1644
|
useRef: () => F,
|
|
1643
1645
|
useState: () => N,
|
|
1644
|
-
useSyncExternalStore: () =>
|
|
1645
|
-
useTransition: () =>
|
|
1646
|
-
version: () =>
|
|
1646
|
+
useSyncExternalStore: () => Rn,
|
|
1647
|
+
useTransition: () => Hn,
|
|
1648
|
+
version: () => jr
|
|
1647
1649
|
});
|
|
1648
|
-
function
|
|
1650
|
+
function In(e, t) {
|
|
1649
1651
|
for (var n in t) e[n] = t[n];
|
|
1650
1652
|
return e;
|
|
1651
1653
|
}
|
|
1652
|
-
function
|
|
1654
|
+
function Ln(e, t) {
|
|
1653
1655
|
for (var n in e) if (n !== "__source" && !(n in t)) return !0;
|
|
1654
1656
|
for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
|
|
1655
1657
|
return !1;
|
|
1656
1658
|
}
|
|
1657
|
-
function
|
|
1659
|
+
function Rn(e, t) {
|
|
1658
1660
|
var n = t(), r = N({ t: {
|
|
1659
1661
|
__: n,
|
|
1660
1662
|
u: t
|
|
1661
1663
|
} }), i = r[0].t, a = r[1];
|
|
1662
1664
|
return Ae(function() {
|
|
1663
|
-
i.__ = n, i.u = t,
|
|
1665
|
+
i.__ = n, i.u = t, zn(i) && a({ t: i });
|
|
1664
1666
|
}, [
|
|
1665
1667
|
e,
|
|
1666
1668
|
n,
|
|
1667
1669
|
t
|
|
1668
1670
|
]), P(function() {
|
|
1669
|
-
return
|
|
1670
|
-
|
|
1671
|
+
return zn(i) && a({ t: i }), e(function() {
|
|
1672
|
+
zn(i) && a({ t: i });
|
|
1671
1673
|
});
|
|
1672
1674
|
}, [e]), n;
|
|
1673
1675
|
}
|
|
1674
|
-
function
|
|
1676
|
+
function zn(e) {
|
|
1675
1677
|
try {
|
|
1676
1678
|
return !((t = e.__) === (n = e.u()) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
|
|
1677
1679
|
} catch (e) {
|
|
@@ -1679,55 +1681,55 @@ function Rn(e) {
|
|
|
1679
1681
|
}
|
|
1680
1682
|
var t, n;
|
|
1681
1683
|
}
|
|
1682
|
-
function
|
|
1684
|
+
function Bn(e) {
|
|
1683
1685
|
e();
|
|
1684
1686
|
}
|
|
1685
|
-
function
|
|
1687
|
+
function Vn(e) {
|
|
1686
1688
|
return e;
|
|
1687
1689
|
}
|
|
1688
|
-
function
|
|
1689
|
-
return [!1,
|
|
1690
|
+
function Hn() {
|
|
1691
|
+
return [!1, Bn];
|
|
1690
1692
|
}
|
|
1691
|
-
function
|
|
1693
|
+
function Un(e, t) {
|
|
1692
1694
|
this.props = e, this.context = t;
|
|
1693
1695
|
}
|
|
1694
|
-
function
|
|
1696
|
+
function Wn(e, t) {
|
|
1695
1697
|
function n(e) {
|
|
1696
1698
|
var n = this.props.ref;
|
|
1697
|
-
return n != e.ref && n && (typeof n == "function" ? n(null) : n.current = null), t ? !t(this.props, e) || n != e.ref :
|
|
1699
|
+
return n != e.ref && n && (typeof n == "function" ? n(null) : n.current = null), t ? !t(this.props, e) || n != e.ref : Ln(this.props, e);
|
|
1698
1700
|
}
|
|
1699
1701
|
function r(t) {
|
|
1700
1702
|
return this.shouldComponentUpdate = n, d(e, t);
|
|
1701
1703
|
}
|
|
1702
1704
|
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.__f = r.prototype.isReactComponent = !0, r.type = e, r;
|
|
1703
1705
|
}
|
|
1704
|
-
function
|
|
1706
|
+
function Gn(e) {
|
|
1705
1707
|
function t(t) {
|
|
1706
|
-
var n =
|
|
1708
|
+
var n = In({}, t);
|
|
1707
1709
|
return delete n.ref, e(n, t.ref || null);
|
|
1708
1710
|
}
|
|
1709
|
-
return t.$$typeof =
|
|
1711
|
+
return t.$$typeof = fr, t.render = e, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
|
|
1710
1712
|
}
|
|
1711
|
-
function
|
|
1713
|
+
function Kn(e, t, n) {
|
|
1712
1714
|
return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(e) {
|
|
1713
1715
|
typeof e.__c == "function" && e.__c();
|
|
1714
|
-
}), e.__c.__H = null), (e =
|
|
1715
|
-
return
|
|
1716
|
+
}), e.__c.__H = null), (e = In({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(e) {
|
|
1717
|
+
return Kn(e, t, n);
|
|
1716
1718
|
})), e;
|
|
1717
1719
|
}
|
|
1718
|
-
function
|
|
1720
|
+
function qn(e, t, n) {
|
|
1719
1721
|
return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(e) {
|
|
1720
|
-
return
|
|
1722
|
+
return qn(e, t, n);
|
|
1721
1723
|
}), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
|
|
1722
1724
|
}
|
|
1723
|
-
function
|
|
1725
|
+
function Jn() {
|
|
1724
1726
|
this.__u = 0, this.o = null, this.__b = null;
|
|
1725
1727
|
}
|
|
1726
|
-
function
|
|
1728
|
+
function Yn(e) {
|
|
1727
1729
|
var t = e.__ && e.__.__c;
|
|
1728
1730
|
return t && t.__a && t.__a(e);
|
|
1729
1731
|
}
|
|
1730
|
-
function
|
|
1732
|
+
function Xn(e) {
|
|
1731
1733
|
var t, n, r, i = null;
|
|
1732
1734
|
function a(a) {
|
|
1733
1735
|
if (t || (t = e()).then(function(e) {
|
|
@@ -1740,15 +1742,15 @@ function Yn(e) {
|
|
|
1740
1742
|
}
|
|
1741
1743
|
return a.displayName = "Lazy", a.__f = !0, a;
|
|
1742
1744
|
}
|
|
1743
|
-
function
|
|
1745
|
+
function Zn() {
|
|
1744
1746
|
this.i = null, this.l = null;
|
|
1745
1747
|
}
|
|
1746
|
-
function
|
|
1748
|
+
function Qn(e) {
|
|
1747
1749
|
return this.getChildContext = function() {
|
|
1748
1750
|
return e.context;
|
|
1749
1751
|
}, e.children;
|
|
1750
1752
|
}
|
|
1751
|
-
function
|
|
1753
|
+
function $n(e) {
|
|
1752
1754
|
var t = this, n = e.h;
|
|
1753
1755
|
if (t.componentWillUnmount = function() {
|
|
1754
1756
|
j(null, t.v), t.v = null, t.h = null;
|
|
@@ -1771,52 +1773,52 @@ function Qn(e) {
|
|
|
1771
1773
|
}
|
|
1772
1774
|
};
|
|
1773
1775
|
}
|
|
1774
|
-
j(d(
|
|
1776
|
+
j(d(Qn, { context: t.context }, e.__v), t.v);
|
|
1775
1777
|
}
|
|
1776
|
-
function
|
|
1777
|
-
var n = d(
|
|
1778
|
+
function er(e, t) {
|
|
1779
|
+
var n = d($n, {
|
|
1778
1780
|
__v: e,
|
|
1779
1781
|
h: t
|
|
1780
1782
|
});
|
|
1781
1783
|
return n.containerInfo = t, n;
|
|
1782
1784
|
}
|
|
1783
|
-
function
|
|
1785
|
+
function tr(e, t, n) {
|
|
1784
1786
|
return t.__k == null && (t.textContent = ""), j(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
1785
1787
|
}
|
|
1786
|
-
function
|
|
1788
|
+
function nr(e, t, n) {
|
|
1787
1789
|
return oe(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
1788
1790
|
}
|
|
1789
|
-
function nr(e) {
|
|
1790
|
-
return d.bind(null, e);
|
|
1791
|
-
}
|
|
1792
1791
|
function rr(e) {
|
|
1793
|
-
return
|
|
1792
|
+
return d.bind(null, e);
|
|
1794
1793
|
}
|
|
1795
1794
|
function ir(e) {
|
|
1796
|
-
return
|
|
1795
|
+
return !!e && e.$$typeof === vr;
|
|
1797
1796
|
}
|
|
1798
1797
|
function ar(e) {
|
|
1799
|
-
return
|
|
1798
|
+
return ir(e) && e.type === m;
|
|
1800
1799
|
}
|
|
1801
1800
|
function or(e) {
|
|
1802
|
-
return
|
|
1801
|
+
return !!e && typeof e.displayName == "string" && e.displayName.indexOf("Memo(") == 0;
|
|
1803
1802
|
}
|
|
1804
1803
|
function sr(e) {
|
|
1805
|
-
return
|
|
1804
|
+
return ir(e) ? se.apply(null, arguments) : e;
|
|
1806
1805
|
}
|
|
1807
1806
|
function cr(e) {
|
|
1807
|
+
return !!e.__k && (j(null, e), !0);
|
|
1808
|
+
}
|
|
1809
|
+
function lr(e) {
|
|
1808
1810
|
return e && (e.base || e.nodeType === 1 && e) || null;
|
|
1809
1811
|
}
|
|
1810
|
-
var
|
|
1811
|
-
De(), R(), R(),
|
|
1812
|
-
return
|
|
1813
|
-
},
|
|
1814
|
-
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null),
|
|
1815
|
-
},
|
|
1812
|
+
var ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, wr, Tr, Er, Dr, Or, kr, Ar, jr, Mr, Nr, Pr, K, Fr = i((() => {
|
|
1813
|
+
De(), R(), R(), ur = Ae, (Un.prototype = new h()).isPureReactComponent = !0, Un.prototype.shouldComponentUpdate = function(e, t) {
|
|
1814
|
+
return Ln(this.props, e) || Ln(this.state, t);
|
|
1815
|
+
}, dr = M.__b, M.__b = function(e) {
|
|
1816
|
+
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), dr && dr(e);
|
|
1817
|
+
}, fr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911, pr = function(e, t) {
|
|
1816
1818
|
return e == null ? null : w(w(e).map(t));
|
|
1817
|
-
},
|
|
1818
|
-
map:
|
|
1819
|
-
forEach:
|
|
1819
|
+
}, mr = {
|
|
1820
|
+
map: pr,
|
|
1821
|
+
forEach: pr,
|
|
1820
1822
|
count: function(e) {
|
|
1821
1823
|
return e ? w(e).length : 0;
|
|
1822
1824
|
},
|
|
@@ -1826,18 +1828,18 @@ var lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, wr, Tr, Er, Dr,
|
|
|
1826
1828
|
return t[0];
|
|
1827
1829
|
},
|
|
1828
1830
|
toArray: w
|
|
1829
|
-
},
|
|
1831
|
+
}, hr = M.__e, M.__e = function(e, t, n, r) {
|
|
1830
1832
|
if (e.then) {
|
|
1831
1833
|
for (var i, a = t; a = a.__;) if ((i = a.__c) && i.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k), i.__c(e, t);
|
|
1832
1834
|
}
|
|
1833
|
-
|
|
1834
|
-
},
|
|
1835
|
+
hr(e, t, n, r);
|
|
1836
|
+
}, gr = M.unmount, M.unmount = function(e) {
|
|
1835
1837
|
var t = e.__c;
|
|
1836
|
-
t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null),
|
|
1837
|
-
}, (
|
|
1838
|
+
t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), gr && gr(e);
|
|
1839
|
+
}, (Jn.prototype = new h()).__c = function(e, t) {
|
|
1838
1840
|
var n = t.__c, r = this;
|
|
1839
1841
|
r.o == null && (r.o = []), r.o.push(n);
|
|
1840
|
-
var i =
|
|
1842
|
+
var i = Yn(r.__v), a = !1, o = function() {
|
|
1841
1843
|
a || r.__z || (a = !0, n.__R = null, i ? i(c) : c());
|
|
1842
1844
|
};
|
|
1843
1845
|
n.__R = o;
|
|
@@ -1847,40 +1849,40 @@ var lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, wr, Tr, Er, Dr,
|
|
|
1847
1849
|
if (!--r.__u) {
|
|
1848
1850
|
if (r.state.__a) {
|
|
1849
1851
|
var e = r.state.__a;
|
|
1850
|
-
r.__v.__k[0] =
|
|
1852
|
+
r.__v.__k[0] = qn(e, e.__c.__P, e.__c.__O);
|
|
1851
1853
|
}
|
|
1852
1854
|
var t;
|
|
1853
1855
|
for (r.setState({ __a: r.__b = null }); t = r.o.pop();) t.__P = s, t.forceUpdate();
|
|
1854
1856
|
}
|
|
1855
1857
|
};
|
|
1856
1858
|
r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(o, o);
|
|
1857
|
-
},
|
|
1859
|
+
}, Jn.prototype.componentWillUnmount = function() {
|
|
1858
1860
|
this.o = [];
|
|
1859
|
-
},
|
|
1861
|
+
}, Jn.prototype.render = function(e, t) {
|
|
1860
1862
|
if (this.__b) {
|
|
1861
1863
|
if (this.__v.__k) {
|
|
1862
1864
|
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
1863
|
-
this.__v.__k[0] =
|
|
1865
|
+
this.__v.__k[0] = Kn(this.__b, n, r.__O = r.__P);
|
|
1864
1866
|
}
|
|
1865
1867
|
this.__b = null;
|
|
1866
1868
|
}
|
|
1867
1869
|
var i = t.__a && d(m, null, e.fallback);
|
|
1868
1870
|
return i && (i.__u &= -33), [d(m, null, t.__a ? null : e.children), i];
|
|
1869
|
-
},
|
|
1871
|
+
}, _r = function(e, t, n) {
|
|
1870
1872
|
if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n;) {
|
|
1871
1873
|
for (; n.length > 3;) n.pop()();
|
|
1872
1874
|
if (n[1] < n[0]) break;
|
|
1873
1875
|
e.i = n = n[2];
|
|
1874
1876
|
}
|
|
1875
|
-
}, (
|
|
1876
|
-
var t = this, n =
|
|
1877
|
+
}, (Zn.prototype = new h()).__a = function(e) {
|
|
1878
|
+
var t = this, n = Yn(t.__v), r = t.l.get(e);
|
|
1877
1879
|
return r[0]++, function(i) {
|
|
1878
1880
|
var a = function() {
|
|
1879
|
-
t.props.revealOrder ? (r.push(i),
|
|
1881
|
+
t.props.revealOrder ? (r.push(i), _r(t, e, r)) : i();
|
|
1880
1882
|
};
|
|
1881
1883
|
n ? n(a) : a();
|
|
1882
1884
|
};
|
|
1883
|
-
},
|
|
1885
|
+
}, Zn.prototype.render = function(e) {
|
|
1884
1886
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
1885
1887
|
var t = w(e.children);
|
|
1886
1888
|
e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
|
|
@@ -1890,12 +1892,12 @@ var lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, wr, Tr, Er, Dr,
|
|
|
1890
1892
|
this.i
|
|
1891
1893
|
]);
|
|
1892
1894
|
return e.children;
|
|
1893
|
-
},
|
|
1895
|
+
}, Zn.prototype.componentDidUpdate = Zn.prototype.componentDidMount = function() {
|
|
1894
1896
|
var e = this;
|
|
1895
1897
|
this.l.forEach(function(t, n) {
|
|
1896
|
-
|
|
1898
|
+
_r(e, n, t);
|
|
1897
1899
|
});
|
|
1898
|
-
},
|
|
1900
|
+
}, vr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, yr = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, br = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, xr = /[A-Z0-9]/g, Sr = typeof document < "u", Cr = function(e) {
|
|
1899
1901
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
1900
1902
|
}, h.prototype.isReactComponent = !0, [
|
|
1901
1903
|
"componentWillMount",
|
|
@@ -1915,78 +1917,78 @@ var lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, wr, Tr, Er, Dr,
|
|
|
1915
1917
|
});
|
|
1916
1918
|
}
|
|
1917
1919
|
});
|
|
1918
|
-
}),
|
|
1919
|
-
return
|
|
1920
|
+
}), wr = M.event, M.event = function(e) {
|
|
1921
|
+
return wr && (e = wr(e)), e.persist = function() {}, e.isPropagationStopped = function() {
|
|
1920
1922
|
return this.cancelBubble;
|
|
1921
1923
|
}, e.isDefaultPrevented = function() {
|
|
1922
1924
|
return this.defaultPrevented;
|
|
1923
1925
|
}, e.nativeEvent = e;
|
|
1924
|
-
},
|
|
1926
|
+
}, Er = {
|
|
1925
1927
|
configurable: !0,
|
|
1926
1928
|
get: function() {
|
|
1927
1929
|
return this.class;
|
|
1928
1930
|
}
|
|
1929
|
-
},
|
|
1931
|
+
}, Dr = M.vnode, M.vnode = function(e) {
|
|
1930
1932
|
typeof e.type == "string" && function(e) {
|
|
1931
1933
|
var t = e.props, n = e.type, r = {}, i = n.indexOf("-") == -1;
|
|
1932
1934
|
for (var a in t) {
|
|
1933
1935
|
var o = t[a];
|
|
1934
|
-
if (!(a === "value" && "defaultValue" in t && o == null ||
|
|
1936
|
+
if (!(a === "value" && "defaultValue" in t && o == null || Sr && a === "children" && n === "noscript" || a === "class" || a === "className")) {
|
|
1935
1937
|
var s = a.toLowerCase();
|
|
1936
|
-
a === "defaultValue" && "value" in t && t.value == null ? a = "value" : a === "download" && !0 === o ? o = "" : s === "translate" && o === "no" ? o = !1 : s[0] === "o" && s[1] === "n" ? s === "ondoubleclick" ? a = "ondblclick" : s !== "onchange" || n !== "input" && n !== "textarea" ||
|
|
1938
|
+
a === "defaultValue" && "value" in t && t.value == null ? a = "value" : a === "download" && !0 === o ? o = "" : s === "translate" && o === "no" ? o = !1 : s[0] === "o" && s[1] === "n" ? s === "ondoubleclick" ? a = "ondblclick" : s !== "onchange" || n !== "input" && n !== "textarea" || Cr(t.type) ? s === "onfocus" ? a = "onfocusin" : s === "onblur" ? a = "onfocusout" : br.test(a) && (a = s) : s = a = "oninput" : i && yr.test(a) ? a = a.replace(xr, "-$&").toLowerCase() : o === null && (o = void 0), s === "oninput" && r[a = s] && (a = "oninputCapture"), r[a] = o;
|
|
1937
1939
|
}
|
|
1938
1940
|
}
|
|
1939
1941
|
n == "select" && (r.multiple && Array.isArray(r.value) && (r.value = w(t.children).forEach(function(e) {
|
|
1940
1942
|
e.props.selected = r.value.indexOf(e.props.value) != -1;
|
|
1941
1943
|
})), r.defaultValue != null && (r.value = w(t.children).forEach(function(e) {
|
|
1942
1944
|
e.props.selected = r.multiple ? r.defaultValue.indexOf(e.props.value) != -1 : r.defaultValue == e.props.value;
|
|
1943
|
-
}))), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className",
|
|
1944
|
-
}(e), e.$$typeof =
|
|
1945
|
-
},
|
|
1946
|
-
|
|
1947
|
-
},
|
|
1948
|
-
|
|
1945
|
+
}))), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className", Er)) : t.className && (r.class = r.className = t.className), e.props = r;
|
|
1946
|
+
}(e), e.$$typeof = vr, Dr && Dr(e);
|
|
1947
|
+
}, Or = M.__r, M.__r = function(e) {
|
|
1948
|
+
Or && Or(e), Tr = e.__c;
|
|
1949
|
+
}, kr = M.diffed, M.diffed = function(e) {
|
|
1950
|
+
kr && kr(e);
|
|
1949
1951
|
var t = e.props, n = e.__e;
|
|
1950
|
-
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value),
|
|
1951
|
-
},
|
|
1952
|
+
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Tr = null;
|
|
1953
|
+
}, Ar = { ReactCurrentDispatcher: { current: {
|
|
1952
1954
|
readContext: function(e) {
|
|
1953
|
-
return
|
|
1955
|
+
return Tr.__n[e.__c].props.value;
|
|
1954
1956
|
},
|
|
1955
1957
|
useCallback: Ne,
|
|
1956
1958
|
useContext: Pe,
|
|
1957
1959
|
useDebugValue: Fe,
|
|
1958
|
-
useDeferredValue:
|
|
1960
|
+
useDeferredValue: Vn,
|
|
1959
1961
|
useEffect: P,
|
|
1960
1962
|
useId: Le,
|
|
1961
1963
|
useImperativeHandle: je,
|
|
1962
|
-
useInsertionEffect:
|
|
1964
|
+
useInsertionEffect: ur,
|
|
1963
1965
|
useLayoutEffect: Ae,
|
|
1964
1966
|
useMemo: Me,
|
|
1965
1967
|
useReducer: ke,
|
|
1966
1968
|
useRef: F,
|
|
1967
1969
|
useState: N,
|
|
1968
|
-
useSyncExternalStore:
|
|
1969
|
-
useTransition:
|
|
1970
|
-
} } },
|
|
1970
|
+
useSyncExternalStore: Rn,
|
|
1971
|
+
useTransition: Hn
|
|
1972
|
+
} } }, jr = "18.3.1", Mr = function(e, t) {
|
|
1971
1973
|
return e(t);
|
|
1972
|
-
},
|
|
1974
|
+
}, Nr = function(e, t) {
|
|
1973
1975
|
var n = M.debounceRendering;
|
|
1974
1976
|
M.debounceRendering = function(e) {
|
|
1975
1977
|
return e();
|
|
1976
1978
|
};
|
|
1977
1979
|
var r = e(t);
|
|
1978
1980
|
return M.debounceRendering = n, r;
|
|
1979
|
-
},
|
|
1981
|
+
}, Pr = ir, K = {
|
|
1980
1982
|
useState: N,
|
|
1981
1983
|
useId: Le,
|
|
1982
1984
|
useReducer: ke,
|
|
1983
1985
|
useEffect: P,
|
|
1984
1986
|
useLayoutEffect: Ae,
|
|
1985
|
-
useInsertionEffect:
|
|
1986
|
-
useTransition:
|
|
1987
|
-
useDeferredValue:
|
|
1988
|
-
useSyncExternalStore:
|
|
1989
|
-
startTransition:
|
|
1987
|
+
useInsertionEffect: ur,
|
|
1988
|
+
useTransition: Hn,
|
|
1989
|
+
useDeferredValue: Vn,
|
|
1990
|
+
useSyncExternalStore: Rn,
|
|
1991
|
+
startTransition: Bn,
|
|
1990
1992
|
useRef: F,
|
|
1991
1993
|
useImperativeHandle: je,
|
|
1992
1994
|
useMemo: Me,
|
|
@@ -1994,70 +1996,70 @@ var lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, wr, Tr, Er, Dr,
|
|
|
1994
1996
|
useContext: Pe,
|
|
1995
1997
|
useDebugValue: Fe,
|
|
1996
1998
|
version: "18.3.1",
|
|
1997
|
-
Children:
|
|
1998
|
-
render:
|
|
1999
|
-
hydrate:
|
|
2000
|
-
unmountComponentAtNode:
|
|
2001
|
-
createPortal:
|
|
1999
|
+
Children: mr,
|
|
2000
|
+
render: tr,
|
|
2001
|
+
hydrate: nr,
|
|
2002
|
+
unmountComponentAtNode: cr,
|
|
2003
|
+
createPortal: er,
|
|
2002
2004
|
createElement: d,
|
|
2003
2005
|
createContext: ce,
|
|
2004
|
-
createFactory:
|
|
2005
|
-
cloneElement:
|
|
2006
|
+
createFactory: rr,
|
|
2007
|
+
cloneElement: sr,
|
|
2006
2008
|
createRef: p,
|
|
2007
2009
|
Fragment: m,
|
|
2008
|
-
isValidElement:
|
|
2009
|
-
isElement:
|
|
2010
|
-
isFragment:
|
|
2011
|
-
isMemo:
|
|
2012
|
-
findDOMNode:
|
|
2010
|
+
isValidElement: ir,
|
|
2011
|
+
isElement: Pr,
|
|
2012
|
+
isFragment: ar,
|
|
2013
|
+
isMemo: or,
|
|
2014
|
+
findDOMNode: lr,
|
|
2013
2015
|
Component: h,
|
|
2014
|
-
PureComponent:
|
|
2015
|
-
memo:
|
|
2016
|
-
forwardRef:
|
|
2017
|
-
flushSync:
|
|
2018
|
-
unstable_batchedUpdates:
|
|
2016
|
+
PureComponent: Un,
|
|
2017
|
+
memo: Wn,
|
|
2018
|
+
forwardRef: Gn,
|
|
2019
|
+
flushSync: Nr,
|
|
2020
|
+
unstable_batchedUpdates: Mr,
|
|
2019
2021
|
StrictMode: m,
|
|
2020
|
-
Suspense:
|
|
2021
|
-
SuspenseList:
|
|
2022
|
-
lazy:
|
|
2023
|
-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:
|
|
2022
|
+
Suspense: Jn,
|
|
2023
|
+
SuspenseList: Zn,
|
|
2024
|
+
lazy: Xn,
|
|
2025
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ar
|
|
2024
2026
|
};
|
|
2025
2027
|
}));
|
|
2026
2028
|
//#endregion
|
|
2027
2029
|
//#region ../../node_modules/react-hook-form/dist/index.esm.mjs
|
|
2028
|
-
|
|
2029
|
-
var
|
|
2030
|
+
Fr();
|
|
2031
|
+
var Ir = ["_f"], Lr = ["name"], Rr = ["_f"], zr = [
|
|
2030
2032
|
"ref",
|
|
2031
2033
|
"message",
|
|
2032
2034
|
"type"
|
|
2033
|
-
],
|
|
2035
|
+
], Br = ["formControl"], Vr = (e) => e.type === "checkbox", Hr = (e) => e instanceof Date, Ur = (e) => e == null, Wr = (e) => typeof e == "object", q = (e) => !Ur(e) && !Array.isArray(e) && Wr(e) && !Hr(e), Gr = (e) => q(e) && e.target ? Vr(e.target) ? e.target.checked : e.target.value : e, Kr = (e, t) => t.split(".").some((t, n, r) => !isNaN(Number(t)) && e.has(r.slice(0, n).join("."))), qr = (e) => {
|
|
2034
2036
|
let t = e.constructor && e.constructor.prototype;
|
|
2035
2037
|
return q(t) && t.hasOwnProperty("isPrototypeOf");
|
|
2036
|
-
},
|
|
2038
|
+
}, Jr = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
2037
2039
|
function J(e) {
|
|
2038
2040
|
if (e instanceof Date) return new Date(e);
|
|
2039
2041
|
let t = typeof FileList < "u" && e instanceof FileList;
|
|
2040
|
-
if (
|
|
2042
|
+
if (Jr && (e instanceof Blob || t)) return e;
|
|
2041
2043
|
let n = Array.isArray(e);
|
|
2042
|
-
if (!n && !(q(e) &&
|
|
2044
|
+
if (!n && !(q(e) && qr(e))) return e;
|
|
2043
2045
|
let r = n ? [] : Object.create(Object.getPrototypeOf(e));
|
|
2044
2046
|
for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (r[t] = J(e[t]));
|
|
2045
2047
|
return r;
|
|
2046
2048
|
}
|
|
2047
|
-
var
|
|
2049
|
+
var Yr = {
|
|
2048
2050
|
BLUR: "blur",
|
|
2049
2051
|
FOCUS_OUT: "focusout",
|
|
2050
2052
|
CHANGE: "change",
|
|
2051
2053
|
SUBMIT: "submit",
|
|
2052
2054
|
TRIGGER: "trigger",
|
|
2053
2055
|
VALID: "valid"
|
|
2054
|
-
},
|
|
2056
|
+
}, Xr = {
|
|
2055
2057
|
onBlur: "onBlur",
|
|
2056
2058
|
onChange: "onChange",
|
|
2057
2059
|
onSubmit: "onSubmit",
|
|
2058
2060
|
onTouched: "onTouched",
|
|
2059
2061
|
all: "all"
|
|
2060
|
-
},
|
|
2062
|
+
}, Zr = {
|
|
2061
2063
|
max: "max",
|
|
2062
2064
|
min: "min",
|
|
2063
2065
|
maxLength: "maxLength",
|
|
@@ -2065,39 +2067,39 @@ var Jr = {
|
|
|
2065
2067
|
pattern: "pattern",
|
|
2066
2068
|
required: "required",
|
|
2067
2069
|
validate: "validate"
|
|
2068
|
-
},
|
|
2070
|
+
}, Qr = "form", $r = "root", ei = [
|
|
2069
2071
|
"__proto__",
|
|
2070
2072
|
"constructor",
|
|
2071
2073
|
"prototype"
|
|
2072
|
-
],
|
|
2074
|
+
], ti = (e) => /^\w*$/.test(e), Y = (e) => e === void 0, ni = (e) => e.split(/[.[\]'"]/g).filter(Boolean), X = (e, t, n) => {
|
|
2073
2075
|
if (!t || !q(e)) return n;
|
|
2074
|
-
let r =
|
|
2075
|
-
if (r.some((e) =>
|
|
2076
|
-
let i = r.reduce((e, t) =>
|
|
2076
|
+
let r = ti(t) ? [t] : ni(t);
|
|
2077
|
+
if (r.some((e) => ei.includes(e))) return n;
|
|
2078
|
+
let i = r.reduce((e, t) => Ur(e) ? void 0 : e[t], e);
|
|
2077
2079
|
return Y(i) || i === e ? Y(e[t]) ? n : e[t] : i;
|
|
2078
|
-
},
|
|
2079
|
-
let r = -1, i =
|
|
2080
|
+
}, ri = (e) => typeof e == "boolean", ii = (e) => typeof e == "function", Z = (e, t, n) => {
|
|
2081
|
+
let r = -1, i = ti(t) ? [t] : ni(t), a = i.length, o = a - 1;
|
|
2080
2082
|
for (; ++r < a;) {
|
|
2081
2083
|
let t = i[r], a = n;
|
|
2082
2084
|
if (r !== o) {
|
|
2083
2085
|
let n = e[t];
|
|
2084
2086
|
a = q(n) || Array.isArray(n) ? n : isNaN(+i[r + 1]) ? {} : [];
|
|
2085
2087
|
}
|
|
2086
|
-
if (
|
|
2088
|
+
if (ei.includes(t)) return;
|
|
2087
2089
|
e[t] = a, e = e[t];
|
|
2088
2090
|
}
|
|
2089
|
-
},
|
|
2090
|
-
|
|
2091
|
-
var
|
|
2091
|
+
}, ai = K.createContext(null);
|
|
2092
|
+
ai.displayName = "HookFormControlContext";
|
|
2093
|
+
var oi = () => K.useContext(ai), si = (e, t, n, r = !0) => {
|
|
2092
2094
|
let i = {};
|
|
2093
2095
|
for (let a in e) Object.defineProperty(i, a, { get: () => {
|
|
2094
2096
|
let i = a;
|
|
2095
|
-
return t._proxyFormState[i] !==
|
|
2097
|
+
return t._proxyFormState[i] !== Xr.all && (t._proxyFormState[i] = !r || Xr.all), n && (n[i] = !0), e[i];
|
|
2096
2098
|
} });
|
|
2097
2099
|
return i;
|
|
2098
|
-
},
|
|
2099
|
-
function
|
|
2100
|
-
let t =
|
|
2100
|
+
}, ci = Jr ? K.useLayoutEffect : K.useEffect;
|
|
2101
|
+
function li(e) {
|
|
2102
|
+
let t = oi(), { control: n = t, disabled: r, name: i, exact: a } = e || {}, [o, s] = K.useState(() => z(z({}, n._formState), {}, { defaultValues: n._defaultValues })), c = K.useRef({
|
|
2101
2103
|
isDirty: !1,
|
|
2102
2104
|
isLoading: !1,
|
|
2103
2105
|
dirtyFields: !1,
|
|
@@ -2107,7 +2109,7 @@ function ci(e) {
|
|
|
2107
2109
|
isValid: !1,
|
|
2108
2110
|
errors: !1
|
|
2109
2111
|
});
|
|
2110
|
-
return
|
|
2112
|
+
return ci(() => n._subscribe({
|
|
2111
2113
|
name: i,
|
|
2112
2114
|
formState: c.current,
|
|
2113
2115
|
exact: a,
|
|
@@ -2120,16 +2122,16 @@ function ci(e) {
|
|
|
2120
2122
|
a
|
|
2121
2123
|
]), K.useEffect(() => {
|
|
2122
2124
|
c.current.isValid && n._setValid(!0);
|
|
2123
|
-
}, [n]), K.useMemo(() =>
|
|
2125
|
+
}, [n]), K.useMemo(() => si(o, n, c.current, !1), [o, n]);
|
|
2124
2126
|
}
|
|
2125
|
-
var
|
|
2126
|
-
function
|
|
2127
|
+
var ui = (e) => typeof e == "string", di = (e, t, n, r, i) => ui(e) ? (r && t.watch.add(e), X(n, e, i)) : Array.isArray(e) ? e.map((e) => (r && t.watch.add(e), X(n, e))) : (r && (t.watchAll = !0), n), fi = (e) => Ur(e) || !Wr(e), pi = (e, t) => t.length === 0 && !Array.isArray(e) && !qr(e);
|
|
2128
|
+
function mi(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
2127
2129
|
if (e === t) return !0;
|
|
2128
|
-
if (
|
|
2129
|
-
if (
|
|
2130
|
+
if (fi(e) || fi(t)) return Object.is(e, t);
|
|
2131
|
+
if (Hr(e) && Hr(t)) return Object.is(e.getTime(), t.getTime());
|
|
2130
2132
|
let r = Object.keys(e), i = Object.keys(t);
|
|
2131
2133
|
if (r.length !== i.length) return !1;
|
|
2132
|
-
if (
|
|
2134
|
+
if (pi(e, r) || pi(t, i)) return Object.is(e, t);
|
|
2133
2135
|
let a = n.get(e);
|
|
2134
2136
|
if (a && a.has(t)) return !0;
|
|
2135
2137
|
a ? a.add(t) : n.set(e, new WeakSet([t]));
|
|
@@ -2138,19 +2140,19 @@ function pi(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
|
2138
2140
|
if (!(i in t)) return !1;
|
|
2139
2141
|
if (i !== "ref") {
|
|
2140
2142
|
let e = t[i];
|
|
2141
|
-
if (
|
|
2143
|
+
if (Hr(r) && Hr(e) || (q(r) || Array.isArray(r)) && (q(e) || Array.isArray(e)) ? !mi(r, e, n) : !Object.is(r, e)) return !1;
|
|
2142
2144
|
}
|
|
2143
2145
|
}
|
|
2144
2146
|
return !0;
|
|
2145
2147
|
}
|
|
2146
|
-
function
|
|
2147
|
-
let t =
|
|
2148
|
+
function hi(e) {
|
|
2149
|
+
let t = oi(), { control: n = t, name: r, defaultValue: i, disabled: a, exact: o, compute: s } = e || {}, c = K.useRef(i), l = K.useRef(s), u = K.useRef(void 0), d = K.useRef(n), f = K.useRef(r);
|
|
2148
2150
|
l.current = s;
|
|
2149
2151
|
let [p, m] = K.useState(() => {
|
|
2150
2152
|
let e = n._getWatch(r, c.current);
|
|
2151
2153
|
return l.current ? l.current(e) : e;
|
|
2152
2154
|
}), h = K.useCallback((e) => {
|
|
2153
|
-
let t =
|
|
2155
|
+
let t = di(r, n._names, e || n._formValues, !1, c.current);
|
|
2154
2156
|
return l.current ? l.current(t) : t;
|
|
2155
2157
|
}, [
|
|
2156
2158
|
n._formValues,
|
|
@@ -2158,10 +2160,10 @@ function mi(e) {
|
|
|
2158
2160
|
r
|
|
2159
2161
|
]), g = K.useCallback((e) => {
|
|
2160
2162
|
if (!a) {
|
|
2161
|
-
let t =
|
|
2163
|
+
let t = di(r, n._names, e || n._formValues, !1, c.current);
|
|
2162
2164
|
if (l.current) {
|
|
2163
2165
|
let e = l.current(t);
|
|
2164
|
-
|
|
2166
|
+
mi(e, u.current) || (m(e), u.current = e);
|
|
2165
2167
|
} else m(t);
|
|
2166
2168
|
}
|
|
2167
2169
|
}, [
|
|
@@ -2170,7 +2172,7 @@ function mi(e) {
|
|
|
2170
2172
|
a,
|
|
2171
2173
|
r
|
|
2172
2174
|
]);
|
|
2173
|
-
|
|
2175
|
+
ci(() => ((d.current !== n || !mi(f.current, r)) && (d.current = n, f.current = r, g()), n._subscribe({
|
|
2174
2176
|
name: r,
|
|
2175
2177
|
formState: { values: !0 },
|
|
2176
2178
|
exact: o,
|
|
@@ -2185,7 +2187,7 @@ function mi(e) {
|
|
|
2185
2187
|
]), K.useEffect(() => n._removeUnmounted());
|
|
2186
2188
|
let _ = d.current !== n, v = f.current, y = K.useMemo(() => {
|
|
2187
2189
|
if (a) return null;
|
|
2188
|
-
let e = !_ && !
|
|
2190
|
+
let e = !_ && !mi(v, r);
|
|
2189
2191
|
return _ || e ? h() : null;
|
|
2190
2192
|
}, [
|
|
2191
2193
|
a,
|
|
@@ -2196,8 +2198,8 @@ function mi(e) {
|
|
|
2196
2198
|
]);
|
|
2197
2199
|
return y === null ? p : y;
|
|
2198
2200
|
}
|
|
2199
|
-
function
|
|
2200
|
-
let t =
|
|
2201
|
+
function gi(e) {
|
|
2202
|
+
let t = oi(), { name: n, disabled: r, control: i = t, shouldUnregister: a, defaultValue: o, exact: s = !0 } = e, c = Kr(i._names.array, n), l = hi({
|
|
2201
2203
|
control: i,
|
|
2202
2204
|
name: n,
|
|
2203
2205
|
defaultValue: K.useMemo(() => X(i._formValues, n, X(i._defaultValues, n, o)), [
|
|
@@ -2206,11 +2208,11 @@ function hi(e) {
|
|
|
2206
2208
|
o
|
|
2207
2209
|
]),
|
|
2208
2210
|
exact: s
|
|
2209
|
-
}), u =
|
|
2211
|
+
}), u = li({
|
|
2210
2212
|
control: i,
|
|
2211
2213
|
name: n,
|
|
2212
2214
|
exact: s
|
|
2213
|
-
}), d = K.useRef(e), f = K.useRef(null), p = K.useRef(i.register(n, z(z({}, e.rules), {}, { value: l },
|
|
2215
|
+
}), d = K.useRef(e), f = K.useRef(null), p = K.useRef(i.register(n, z(z({}, e.rules), {}, { value: l }, ri(e.disabled) ? { disabled: e.disabled } : {})));
|
|
2214
2216
|
d.current = e;
|
|
2215
2217
|
let m = K.useMemo(() => Object.defineProperties({}, {
|
|
2216
2218
|
invalid: {
|
|
@@ -2234,33 +2236,33 @@ function hi(e) {
|
|
|
2234
2236
|
get: () => X(u.errors, n)
|
|
2235
2237
|
}
|
|
2236
2238
|
}), [u, n]), h = K.useCallback((e) => {
|
|
2237
|
-
let t =
|
|
2239
|
+
let t = Gr(e);
|
|
2238
2240
|
return X(i._fields, n) || (p.current = i.register(n, z(z({}, d.current.rules), {}, { value: t }))), p.current.onChange({
|
|
2239
2241
|
target: {
|
|
2240
|
-
value:
|
|
2242
|
+
value: Gr(e),
|
|
2241
2243
|
name: n
|
|
2242
2244
|
},
|
|
2243
|
-
type:
|
|
2245
|
+
type: Yr.CHANGE
|
|
2244
2246
|
});
|
|
2245
2247
|
}, [n, i]), g = K.useCallback(() => p.current.onBlur({
|
|
2246
2248
|
target: {
|
|
2247
2249
|
value: X(i._formValues, n),
|
|
2248
2250
|
name: n
|
|
2249
2251
|
},
|
|
2250
|
-
type:
|
|
2252
|
+
type: Yr.BLUR
|
|
2251
2253
|
}), [n, i._formValues]), _ = K.useCallback((e) => {
|
|
2252
2254
|
e && (f.current = {
|
|
2253
|
-
focus: () =>
|
|
2254
|
-
select: () =>
|
|
2255
|
-
setCustomValidity: (t) =>
|
|
2256
|
-
reportValidity: () =>
|
|
2255
|
+
focus: () => ii(e.focus) && e.focus(),
|
|
2256
|
+
select: () => ii(e.select) && e.select(),
|
|
2257
|
+
setCustomValidity: (t) => ii(e.setCustomValidity) && e.setCustomValidity(t),
|
|
2258
|
+
reportValidity: () => ii(e.reportValidity) && e.reportValidity()
|
|
2257
2259
|
});
|
|
2258
2260
|
let t = X(i._fields, n);
|
|
2259
2261
|
t && t._f && e && (t._f.ref = f.current);
|
|
2260
2262
|
}, [i._fields, n]), v = K.useMemo(() => z(z({
|
|
2261
2263
|
name: n,
|
|
2262
2264
|
value: l
|
|
2263
|
-
},
|
|
2265
|
+
}, ri(r) || u.disabled ? { disabled: u.disabled || r } : {}), {}, {
|
|
2264
2266
|
onChange: h,
|
|
2265
2267
|
onBlur: g,
|
|
2266
2268
|
ref: _
|
|
@@ -2275,7 +2277,7 @@ function hi(e) {
|
|
|
2275
2277
|
]);
|
|
2276
2278
|
return K.useEffect(() => {
|
|
2277
2279
|
let e = i._options.shouldUnregister || a;
|
|
2278
|
-
i.register(n, z(z({}, d.current.rules),
|
|
2280
|
+
i.register(n, z(z({}, d.current.rules), ri(d.current.disabled) ? { disabled: d.current.disabled } : {}));
|
|
2279
2281
|
let t = (e, t) => {
|
|
2280
2282
|
let n = X(i._fields, e);
|
|
2281
2283
|
n && n._f && (n._f.mount = t);
|
|
@@ -2315,9 +2317,9 @@ function hi(e) {
|
|
|
2315
2317
|
m
|
|
2316
2318
|
]);
|
|
2317
2319
|
}
|
|
2318
|
-
var
|
|
2319
|
-
|
|
2320
|
-
var
|
|
2320
|
+
var _i = (e) => e.render(gi(e)), vi = K.createContext(null);
|
|
2321
|
+
vi.displayName = "HookFormContext";
|
|
2322
|
+
var yi = (e, t, n, r, i) => t ? z(z({}, n[e]), {}, { types: z(z({}, n[e] && n[e].types ? n[e].types : {}), {}, { [r]: i || !0 }) }) : {}, bi = (e) => Array.isArray(e) ? e.filter(Boolean) : [], xi = (e) => Array.isArray(e) ? e : [e], Si = () => {
|
|
2321
2323
|
let e = [];
|
|
2322
2324
|
return {
|
|
2323
2325
|
get observers() {
|
|
@@ -2334,26 +2336,26 @@ var vi = (e, t, n, r, i) => t ? z(z({}, n[e]), {}, { types: z(z({}, n[e] && n[e]
|
|
|
2334
2336
|
}
|
|
2335
2337
|
};
|
|
2336
2338
|
};
|
|
2337
|
-
function
|
|
2339
|
+
function Ci(e, t) {
|
|
2338
2340
|
let n = {};
|
|
2339
2341
|
for (let r in e) if (e.hasOwnProperty(r)) {
|
|
2340
2342
|
let i = e[r], a = t[r];
|
|
2341
2343
|
if (i && q(i) && a) {
|
|
2342
|
-
let e =
|
|
2344
|
+
let e = Ci(i, a);
|
|
2343
2345
|
q(e) && (n[r] = e);
|
|
2344
2346
|
} else e[r] && (n[r] = a);
|
|
2345
2347
|
}
|
|
2346
2348
|
return n;
|
|
2347
2349
|
}
|
|
2348
|
-
var
|
|
2349
|
-
if (!
|
|
2350
|
+
var wi = (e) => q(e) && !Object.keys(e).length, Ti = (e) => e.type === "file", Ei = (e) => {
|
|
2351
|
+
if (!Jr) return !1;
|
|
2350
2352
|
let t = e ? e.ownerDocument : 0;
|
|
2351
2353
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
2352
|
-
},
|
|
2353
|
-
function
|
|
2354
|
+
}, Di = (e) => e.type === "select-multiple", Oi = (e) => e.type === "radio", ki = (e) => Oi(e) || Vr(e), Ai = (e) => Ei(e) && e.isConnected;
|
|
2355
|
+
function ji(e, t) {
|
|
2354
2356
|
let n = t.slice(0, -1).length, r = 0;
|
|
2355
2357
|
for (; r < n;) {
|
|
2356
|
-
if (
|
|
2358
|
+
if (Ur(e)) {
|
|
2357
2359
|
e = void 0;
|
|
2358
2360
|
break;
|
|
2359
2361
|
}
|
|
@@ -2361,65 +2363,65 @@ function Ai(e, t) {
|
|
|
2361
2363
|
}
|
|
2362
2364
|
return e;
|
|
2363
2365
|
}
|
|
2364
|
-
function
|
|
2366
|
+
function Mi(e) {
|
|
2365
2367
|
for (let t in e) if (e.hasOwnProperty(t) && !Y(e[t])) return !1;
|
|
2366
2368
|
return !0;
|
|
2367
2369
|
}
|
|
2368
2370
|
function Q(e, t) {
|
|
2369
|
-
if (
|
|
2370
|
-
let n = Array.isArray(t) ? t :
|
|
2371
|
-
return r && delete r[a], i !== 0 && (q(r) &&
|
|
2371
|
+
if (ui(t) && Object.prototype.hasOwnProperty.call(e, t)) return delete e[t], e;
|
|
2372
|
+
let n = Array.isArray(t) ? t : ti(t) ? [t] : ni(t), r = n.length === 1 ? e : ji(e, n), i = n.length - 1, a = n[i];
|
|
2373
|
+
return r && delete r[a], i !== 0 && (q(r) && wi(r) || Array.isArray(r) && Mi(r)) && Q(e, n.slice(0, -1)), e;
|
|
2372
2374
|
}
|
|
2373
|
-
var
|
|
2374
|
-
for (let t in e) if (
|
|
2375
|
+
var Ni = (e) => {
|
|
2376
|
+
for (let t in e) if (ii(e[t])) return !0;
|
|
2375
2377
|
return !1;
|
|
2376
2378
|
};
|
|
2377
|
-
function
|
|
2378
|
-
return Array.isArray(e) || q(e) && !
|
|
2379
|
+
function Pi(e) {
|
|
2380
|
+
return Array.isArray(e) || q(e) && !Ni(e);
|
|
2379
2381
|
}
|
|
2380
|
-
function
|
|
2382
|
+
function Fi(e, t = {}) {
|
|
2381
2383
|
for (let n in e) {
|
|
2382
2384
|
let r = e[n];
|
|
2383
|
-
|
|
2385
|
+
Pi(r) ? (t[n] = Array.isArray(r) ? [] : {}, Fi(r, t[n])) : Y(r) || (t[n] = !0);
|
|
2384
2386
|
}
|
|
2385
2387
|
return t;
|
|
2386
2388
|
}
|
|
2387
|
-
function
|
|
2389
|
+
function Ii(e) {
|
|
2388
2390
|
if (e !== !1) {
|
|
2389
2391
|
if (e === !0) return !0;
|
|
2390
2392
|
if (Array.isArray(e)) {
|
|
2391
|
-
let t = e.map((e) =>
|
|
2393
|
+
let t = e.map((e) => Ii(e));
|
|
2392
2394
|
return t.some((e) => e !== void 0) ? t : void 0;
|
|
2393
2395
|
}
|
|
2394
2396
|
if (q(e)) {
|
|
2395
2397
|
let t = {};
|
|
2396
2398
|
for (let n in e) {
|
|
2397
|
-
let r =
|
|
2399
|
+
let r = Ii(e[n]);
|
|
2398
2400
|
Y(r) || (t[n] = r);
|
|
2399
2401
|
}
|
|
2400
2402
|
return Object.keys(t).length ? t : void 0;
|
|
2401
2403
|
}
|
|
2402
2404
|
}
|
|
2403
2405
|
}
|
|
2404
|
-
function
|
|
2405
|
-
n || (n =
|
|
2406
|
+
function Li(e, t, n) {
|
|
2407
|
+
n || (n = Fi(t));
|
|
2406
2408
|
for (let r in e) {
|
|
2407
2409
|
let i = e[r];
|
|
2408
|
-
if (
|
|
2410
|
+
if (Pi(i)) Y(t) || fi(n[r]) ? n[r] = Fi(i, Array.isArray(i) ? [] : {}) : Li(i, Ur(t) ? {} : t[r], n[r]);
|
|
2409
2411
|
else {
|
|
2410
2412
|
let e = t[r];
|
|
2411
|
-
n[r] = !
|
|
2413
|
+
n[r] = !mi(i, e);
|
|
2412
2414
|
}
|
|
2413
2415
|
}
|
|
2414
|
-
return
|
|
2416
|
+
return Ii(n) || {};
|
|
2415
2417
|
}
|
|
2416
|
-
var
|
|
2418
|
+
var Ri = {
|
|
2417
2419
|
value: !1,
|
|
2418
2420
|
isValid: !1
|
|
2419
|
-
},
|
|
2421
|
+
}, zi = {
|
|
2420
2422
|
value: !0,
|
|
2421
2423
|
isValid: !0
|
|
2422
|
-
},
|
|
2424
|
+
}, Bi = (e) => {
|
|
2423
2425
|
if (Array.isArray(e)) {
|
|
2424
2426
|
if (e.length > 1) {
|
|
2425
2427
|
let t = e.filter((e) => e && e.checked && !e.disabled).map((e) => e.value);
|
|
@@ -2428,24 +2430,24 @@ var Li = {
|
|
|
2428
2430
|
isValid: !!t.length
|
|
2429
2431
|
};
|
|
2430
2432
|
}
|
|
2431
|
-
return e[0].checked && !e[0].disabled ? e[0].attributes && !Y(e[0].attributes.value) ? Y(e[0].value) || e[0].value === "" ?
|
|
2433
|
+
return e[0].checked && !e[0].disabled ? e[0].attributes && !Y(e[0].attributes.value) ? Y(e[0].value) || e[0].value === "" ? zi : {
|
|
2432
2434
|
value: e[0].value,
|
|
2433
2435
|
isValid: !0
|
|
2434
|
-
} :
|
|
2436
|
+
} : zi : Ri;
|
|
2435
2437
|
}
|
|
2436
|
-
return
|
|
2437
|
-
},
|
|
2438
|
+
return Ri;
|
|
2439
|
+
}, Vi = (e, { valueAsNumber: t, valueAsDate: n, setValueAs: r }) => Y(e) ? e : t ? e === "" ? NaN : e && +e : n && ui(e) ? new Date(e) : r ? r(e) : e, Hi = {
|
|
2438
2440
|
isValid: !1,
|
|
2439
2441
|
value: null
|
|
2440
|
-
},
|
|
2442
|
+
}, Ui = (e) => Array.isArray(e) ? e.reduce((e, t) => t && t.checked && !t.disabled ? {
|
|
2441
2443
|
isValid: !0,
|
|
2442
2444
|
value: t.value
|
|
2443
|
-
} : e,
|
|
2444
|
-
function
|
|
2445
|
+
} : e, Hi) : Hi;
|
|
2446
|
+
function Wi(e) {
|
|
2445
2447
|
let t = e.ref;
|
|
2446
|
-
return
|
|
2448
|
+
return Ti(t) ? t.files : Oi(t) ? Ui(e.refs).value : Di(t) ? [...t.selectedOptions].map(({ value: e }) => e) : Vr(t) ? Bi(e.refs).value : Vi(Y(t.value) ? e.ref.value : t.value, e);
|
|
2447
2449
|
}
|
|
2448
|
-
var
|
|
2450
|
+
var Gi = (e, t, n, r) => {
|
|
2449
2451
|
let i = {};
|
|
2450
2452
|
for (let n of e) {
|
|
2451
2453
|
let e = X(t, n);
|
|
@@ -2457,27 +2459,27 @@ var Wi = (e, t, n, r) => {
|
|
|
2457
2459
|
fields: i,
|
|
2458
2460
|
shouldUseNativeValidation: r
|
|
2459
2461
|
};
|
|
2460
|
-
},
|
|
2461
|
-
isOnSubmit: !e || e ===
|
|
2462
|
-
isOnBlur: e ===
|
|
2463
|
-
isOnChange: e ===
|
|
2464
|
-
isOnAll: e ===
|
|
2465
|
-
isOnTouch: e ===
|
|
2466
|
-
}),
|
|
2462
|
+
}, Ki = (e) => e instanceof RegExp, qi = (e) => Y(e) ? e : Ki(e) ? e.source : q(e) ? Ki(e.value) ? e.value.source : e.value : e, Ji = (e) => ({
|
|
2463
|
+
isOnSubmit: !e || e === Xr.onSubmit,
|
|
2464
|
+
isOnBlur: e === Xr.onBlur,
|
|
2465
|
+
isOnChange: e === Xr.onChange,
|
|
2466
|
+
isOnAll: e === Xr.all,
|
|
2467
|
+
isOnTouch: e === Xr.onTouched
|
|
2468
|
+
}), Yi = "AsyncFunction", Xi = (e) => !!e && !!e.validate && !!(ii(e.validate) && e.validate.constructor.name === Yi || q(e.validate) && Object.values(e.validate).find((e) => e.constructor.name === Yi)), Zi = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Qi = (e, t, n) => !n && (t.watchAll || t.watch.has(e) || [...t.watch].some((t) => e.startsWith(`${t}.`))), $i = (e, t, n, r) => {
|
|
2467
2469
|
for (let i of n || Object.keys(e)) {
|
|
2468
2470
|
let n = X(e, i);
|
|
2469
2471
|
if (n) {
|
|
2470
|
-
let { _f: e } = n, a =
|
|
2472
|
+
let { _f: e } = n, a = fn(n, Ir);
|
|
2471
2473
|
if (e) {
|
|
2472
2474
|
if (e.refs && e.refs[0] && t(e.refs[0], i) && !r || e.ref && t(e.ref, e.name) && !r) return !0;
|
|
2473
|
-
if (
|
|
2474
|
-
} else if (q(a) &&
|
|
2475
|
+
if ($i(a, t)) break;
|
|
2476
|
+
} else if (q(a) && $i(a, t)) break;
|
|
2475
2477
|
}
|
|
2476
2478
|
}
|
|
2477
2479
|
};
|
|
2478
|
-
function
|
|
2480
|
+
function ea(e, t, n) {
|
|
2479
2481
|
let r = X(e, n);
|
|
2480
|
-
if (r ||
|
|
2482
|
+
if (r || ti(n)) return {
|
|
2481
2483
|
error: r,
|
|
2482
2484
|
name: n
|
|
2483
2485
|
};
|
|
@@ -2497,34 +2499,34 @@ function $i(e, t, n) {
|
|
|
2497
2499
|
}
|
|
2498
2500
|
return { name: n };
|
|
2499
2501
|
}
|
|
2500
|
-
var
|
|
2502
|
+
var ta = (e, t, n, r) => {
|
|
2501
2503
|
n(e);
|
|
2502
|
-
let { name: i } = e, a =
|
|
2503
|
-
return
|
|
2504
|
-
},
|
|
2504
|
+
let { name: i } = e, a = fn(e, Lr);
|
|
2505
|
+
return wi(a) || r && Object.keys(a).length >= Object.keys(t).length || Object.keys(a).find((e) => t[e] === (!r || Xr.all));
|
|
2506
|
+
}, na = (e, t, n) => !e || !t || e === t || xi(e).some((e) => e && (n ? e === t : e.startsWith(t) || t.startsWith(e))), ra = (e, t, n, r, i) => i.isOnAll ? !1 : !n && i.isOnTouch ? !(t || e) : (n ? r.isOnBlur : i.isOnBlur) ? !e : (n ? r.isOnChange : i.isOnChange) ? e : !0, ia = (e, t) => !bi(X(e, t)).length && Q(e, t), aa = (e, t, n) => {
|
|
2505
2507
|
let r = X(e, n), i = Array.isArray(r) ? r : [];
|
|
2506
|
-
return Z(i,
|
|
2508
|
+
return Z(i, $r, t[n]), Z(e, n, i), e;
|
|
2507
2509
|
};
|
|
2508
|
-
function
|
|
2509
|
-
if (
|
|
2510
|
+
function oa(e, t, n = "validate") {
|
|
2511
|
+
if (ui(e) || Array.isArray(e) && e.every(ui) || ri(e) && !e) return {
|
|
2510
2512
|
type: n,
|
|
2511
|
-
message:
|
|
2513
|
+
message: ui(e) ? e : "",
|
|
2512
2514
|
ref: t
|
|
2513
2515
|
};
|
|
2514
2516
|
}
|
|
2515
|
-
var
|
|
2517
|
+
var sa = (e) => q(e) && !Ki(e) ? e : {
|
|
2516
2518
|
value: e,
|
|
2517
2519
|
message: ""
|
|
2518
|
-
},
|
|
2520
|
+
}, ca = function() {
|
|
2519
2521
|
var e = H(function* (e, t, n, r, i, a) {
|
|
2520
2522
|
let { ref: o, refs: s, required: c, maxLength: l, minLength: u, min: d, max: f, pattern: p, validate: m, name: h, valueAsNumber: g, mount: _ } = e._f, v = X(n, h);
|
|
2521
2523
|
if (!_ || t.has(h)) return {};
|
|
2522
2524
|
let y = s ? s[0] : o, b = (e) => {
|
|
2523
2525
|
if (i && y.reportValidity) {
|
|
2524
|
-
let t =
|
|
2526
|
+
let t = ri(e) ? "" : e || "";
|
|
2525
2527
|
s ? s.forEach((e) => e.setCustomValidity(t)) : y.setCustomValidity(t), y.reportValidity();
|
|
2526
2528
|
}
|
|
2527
|
-
}, x = {}, S =
|
|
2529
|
+
}, x = {}, S = Oi(o), C = Vr(o), w = S || C, T = (g || Ti(o)) && Y(o.value) && Y(v) || Ei(o) && o.value === "" || v === "" || Array.isArray(v) && !v.length, E = yi.bind(null, h, r, x), D = (e, t, n, r = Zr.maxLength, i = Zr.minLength) => {
|
|
2528
2530
|
let a = e ? t : n;
|
|
2529
2531
|
x[h] = z({
|
|
2530
2532
|
type: e ? r : i,
|
|
@@ -2532,52 +2534,52 @@ var oa = (e) => q(e) && !Gi(e) ? e : {
|
|
|
2532
2534
|
ref: o
|
|
2533
2535
|
}, E(e ? r : i, a));
|
|
2534
2536
|
};
|
|
2535
|
-
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T ||
|
|
2536
|
-
let { value: e, message: t } =
|
|
2537
|
+
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T || Ur(v)) || ri(v) && !v || C && !Bi(s).isValid || S && !Ui(s).isValid)) {
|
|
2538
|
+
let { value: e, message: t } = ui(c) ? {
|
|
2537
2539
|
value: !!c,
|
|
2538
2540
|
message: c
|
|
2539
|
-
} :
|
|
2541
|
+
} : sa(c);
|
|
2540
2542
|
if (e && (x[h] = z({
|
|
2541
|
-
type:
|
|
2543
|
+
type: Zr.required,
|
|
2542
2544
|
message: t,
|
|
2543
2545
|
ref: y
|
|
2544
|
-
}, E(
|
|
2546
|
+
}, E(Zr.required, t)), !r)) return b(t), x;
|
|
2545
2547
|
}
|
|
2546
|
-
if (!T && (!
|
|
2547
|
-
let e, t, n =
|
|
2548
|
-
if (!
|
|
2548
|
+
if (!T && (!Ur(d) || !Ur(f))) {
|
|
2549
|
+
let e, t, n = sa(f), i = sa(d);
|
|
2550
|
+
if (!Ur(v) && !isNaN(v)) {
|
|
2549
2551
|
let r = o.valueAsNumber || v && +v;
|
|
2550
|
-
|
|
2552
|
+
Ur(n.value) || (e = r > n.value), Ur(i.value) || (t = r < i.value);
|
|
2551
2553
|
} else {
|
|
2552
2554
|
let r = o.valueAsDate || new Date(v), a = (e) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + e), s = o.type == "time", c = o.type == "week";
|
|
2553
|
-
|
|
2555
|
+
ui(n.value) && v && (e = s ? a(v) > a(n.value) : c ? v > n.value : r > new Date(n.value)), ui(i.value) && v && (t = s ? a(v) < a(i.value) : c ? v < i.value : r < new Date(i.value));
|
|
2554
2556
|
}
|
|
2555
|
-
if ((e || t) && (D(!!e, n.message, i.message,
|
|
2557
|
+
if ((e || t) && (D(!!e, n.message, i.message, Zr.max, Zr.min), !r)) return b(x[h].message), x;
|
|
2556
2558
|
}
|
|
2557
|
-
if ((l || u) && !T && (
|
|
2558
|
-
let e =
|
|
2559
|
+
if ((l || u) && !T && (ui(v) || a && Array.isArray(v))) {
|
|
2560
|
+
let e = sa(l), t = sa(u), n = !Ur(e.value) && v.length > +e.value, i = !Ur(t.value) && v.length < +t.value;
|
|
2559
2561
|
if ((n || i) && (D(n, e.message, t.message), !r)) return b(x[h].message), x;
|
|
2560
2562
|
}
|
|
2561
|
-
if (p && !T &&
|
|
2562
|
-
let { value: e, message: t } =
|
|
2563
|
-
if (
|
|
2564
|
-
type:
|
|
2563
|
+
if (p && !T && ui(v)) {
|
|
2564
|
+
let { value: e, message: t } = sa(p);
|
|
2565
|
+
if (Ki(e) && !v.match(e) && (x[h] = z({
|
|
2566
|
+
type: Zr.pattern,
|
|
2565
2567
|
message: t,
|
|
2566
2568
|
ref: o
|
|
2567
|
-
}, E(
|
|
2569
|
+
}, E(Zr.pattern, t)), !r)) return b(t), x;
|
|
2568
2570
|
}
|
|
2569
2571
|
if (m) {
|
|
2570
|
-
if (
|
|
2571
|
-
let e =
|
|
2572
|
-
if (e && (x[h] = z(z({}, e), E(
|
|
2572
|
+
if (ii(m)) {
|
|
2573
|
+
let e = oa(yield m(v, n), y);
|
|
2574
|
+
if (e && (x[h] = z(z({}, e), E(Zr.validate, e.message)), !r)) return b(e.message), x;
|
|
2573
2575
|
} else if (q(m)) {
|
|
2574
2576
|
let e = {};
|
|
2575
2577
|
for (let t in m) {
|
|
2576
|
-
if (!
|
|
2577
|
-
let i =
|
|
2578
|
+
if (!wi(e) && !r) break;
|
|
2579
|
+
let i = oa(yield m[t](v, n), y, t);
|
|
2578
2580
|
i && (e = z(z({}, i), E(t, i.message)), b(i.message), r && (x[h] = e));
|
|
2579
2581
|
}
|
|
2580
|
-
if (!
|
|
2582
|
+
if (!wi(e) && (x[h] = z({ ref: y }, e), !r)) return x;
|
|
2581
2583
|
}
|
|
2582
2584
|
}
|
|
2583
2585
|
return b(!0), x;
|
|
@@ -2585,11 +2587,11 @@ var oa = (e) => q(e) && !Gi(e) ? e : {
|
|
|
2585
2587
|
return function(t, n, r, i, a, o) {
|
|
2586
2588
|
return e.apply(this, arguments);
|
|
2587
2589
|
};
|
|
2588
|
-
}(),
|
|
2589
|
-
mode:
|
|
2590
|
-
reValidateMode:
|
|
2590
|
+
}(), la = {
|
|
2591
|
+
mode: Xr.onSubmit,
|
|
2592
|
+
reValidateMode: Xr.onChange,
|
|
2591
2593
|
shouldFocusError: !0
|
|
2592
|
-
},
|
|
2594
|
+
}, ua = {
|
|
2593
2595
|
submitCount: 0,
|
|
2594
2596
|
isDirty: !1,
|
|
2595
2597
|
isReady: !1,
|
|
@@ -2602,9 +2604,9 @@ var oa = (e) => q(e) && !Gi(e) ? e : {
|
|
|
2602
2604
|
dirtyFields: {},
|
|
2603
2605
|
validatingFields: {}
|
|
2604
2606
|
};
|
|
2605
|
-
function
|
|
2606
|
-
let t = z(z({},
|
|
2607
|
-
isLoading:
|
|
2607
|
+
function da(e = {}) {
|
|
2608
|
+
let t = z(z({}, la), e), n = z(z({}, J(ua)), {}, {
|
|
2609
|
+
isLoading: ii(t.defaultValues),
|
|
2608
2610
|
errors: t.errors || {},
|
|
2609
2611
|
disabled: t.disabled || !1
|
|
2610
2612
|
}), r = {}, i = (q(t.defaultValues) || q(t.values)) && J(t.defaultValues || t.values) || {}, a = t.shouldUnregister ? {} : J(i), o = {
|
|
@@ -2628,18 +2630,18 @@ function ua(e = {}) {
|
|
|
2628
2630
|
isValid: !1,
|
|
2629
2631
|
errors: !1
|
|
2630
2632
|
}, d = z({}, u), f = z({}, d), p = {
|
|
2631
|
-
array:
|
|
2632
|
-
state:
|
|
2633
|
-
}, m = t.criteriaMode ===
|
|
2633
|
+
array: Si(),
|
|
2634
|
+
state: Si()
|
|
2635
|
+
}, m = t.criteriaMode === Xr.all, h = (e) => (t) => {
|
|
2634
2636
|
clearTimeout(l), l = setTimeout(e, t);
|
|
2635
2637
|
}, g = function() {
|
|
2636
2638
|
var e = H(function* (e) {
|
|
2637
2639
|
if (!o.keepIsValid && !t.disabled && (d.isValid || f.isValid || e)) {
|
|
2638
2640
|
let e;
|
|
2639
|
-
t.resolver ? (e =
|
|
2641
|
+
t.resolver ? (e = wi((yield E()).errors), _()) : e = yield O({
|
|
2640
2642
|
fields: r,
|
|
2641
2643
|
onlyCheckValid: !0,
|
|
2642
|
-
eventType:
|
|
2644
|
+
eventType: Yr.VALID
|
|
2643
2645
|
}), e !== n.isValid && p.state.next({ isValid: e });
|
|
2644
2646
|
}
|
|
2645
2647
|
});
|
|
@@ -2651,10 +2653,10 @@ function ua(e = {}) {
|
|
|
2651
2653
|
e && (r ? Z(n.validatingFields, e, r) : Q(n.validatingFields, e));
|
|
2652
2654
|
}), p.state.next({
|
|
2653
2655
|
validatingFields: n.validatingFields,
|
|
2654
|
-
isValidating: !
|
|
2656
|
+
isValidating: !wi(n.validatingFields)
|
|
2655
2657
|
}));
|
|
2656
2658
|
}, v = () => {
|
|
2657
|
-
n.dirtyFields =
|
|
2659
|
+
n.dirtyFields = Li(i, a);
|
|
2658
2660
|
}, y = (e, i = [], s, c, l = !0, u = !0) => {
|
|
2659
2661
|
if (c && s && !t.disabled) {
|
|
2660
2662
|
if (o.action = !0, u && Array.isArray(X(r, e))) {
|
|
@@ -2663,7 +2665,7 @@ function ua(e = {}) {
|
|
|
2663
2665
|
}
|
|
2664
2666
|
if (u && Array.isArray(X(n.errors, e))) {
|
|
2665
2667
|
let t = s(X(n.errors, e), c.argA, c.argB);
|
|
2666
|
-
l && Z(n.errors, e, t),
|
|
2668
|
+
l && Z(n.errors, e, t), ia(n.errors, e);
|
|
2667
2669
|
}
|
|
2668
2670
|
if ((d.touchedFields || f.touchedFields) && u && Array.isArray(X(n.touchedFields, e))) {
|
|
2669
2671
|
let t = s(X(n.touchedFields, e), c.argA, c.argB);
|
|
@@ -2685,10 +2687,10 @@ function ua(e = {}) {
|
|
|
2685
2687
|
isValid: !1
|
|
2686
2688
|
});
|
|
2687
2689
|
}, S = (e) => {
|
|
2688
|
-
let t =
|
|
2690
|
+
let t = ti(e) ? [e] : ni(e), n = a, r = i;
|
|
2689
2691
|
for (let e = 0; e < t.length - 1; e++) {
|
|
2690
2692
|
let i = t[e];
|
|
2691
|
-
if (n =
|
|
2693
|
+
if (n = Ur(n) ? n : n[i], r = Ur(r) ? r : r[i], n === null && r !== null) return !0;
|
|
2692
2694
|
}
|
|
2693
2695
|
return !1;
|
|
2694
2696
|
}, C = (t, c, l, u) => {
|
|
@@ -2696,15 +2698,15 @@ function ua(e = {}) {
|
|
|
2696
2698
|
if (m) {
|
|
2697
2699
|
if (S(t)) return;
|
|
2698
2700
|
let r = Y(X(a, t)), h = X(a, t, Y(l) ? X(i, t) : l);
|
|
2699
|
-
Y(h) || u && u.defaultChecked || c ? Z(a, t, c ? h :
|
|
2701
|
+
Y(h) || u && u.defaultChecked || c ? Z(a, t, c ? h : Wi(m._f)) : re(t, h), o.mount && !o.action && (g(), r && n.isDirty && (d.isDirty || f.isDirty) && (k() || (n.isDirty = !1, p.state.next(z({}, n)))), e.shouldUnregister && r && !Y(X(a, t)) && Qi(t, s) && (o.watch = !0));
|
|
2700
2702
|
}
|
|
2701
2703
|
}, w = (e, r, o, s, c) => {
|
|
2702
2704
|
let l = !1, u = !1, m = { name: e };
|
|
2703
2705
|
if (!t.disabled) {
|
|
2704
2706
|
if (!o || s) {
|
|
2705
2707
|
(d.isDirty || f.isDirty) && (u = n.isDirty, n.isDirty = m.isDirty = k(), l = u !== m.isDirty);
|
|
2706
|
-
let t =
|
|
2707
|
-
u = !!X(n.dirtyFields, e), t === n.isDirty ? t ? Q(n.dirtyFields, e) : Z(n.dirtyFields, e, !0) : n.dirtyFields =
|
|
2708
|
+
let t = mi(X(i, e), r);
|
|
2709
|
+
u = !!X(n.dirtyFields, e), t === n.isDirty ? t ? Q(n.dirtyFields, e) : Z(n.dirtyFields, e, !0) : n.dirtyFields = Li(i, a), m.dirtyFields = n.dirtyFields, l = l || (d.dirtyFields || f.dirtyFields) && u !== !t;
|
|
2708
2710
|
}
|
|
2709
2711
|
if (o) {
|
|
2710
2712
|
let t = X(n.touchedFields, e);
|
|
@@ -2714,9 +2716,9 @@ function ua(e = {}) {
|
|
|
2714
2716
|
}
|
|
2715
2717
|
return l ? m : {};
|
|
2716
2718
|
}, T = (e, r, i, a) => {
|
|
2717
|
-
let o = X(n.errors, e), s = (d.isValid || f.isValid) &&
|
|
2718
|
-
if (t.delayError && i ? (c = h(() => b(e, i)), c(t.delayError)) : (clearTimeout(l), c = null, i ? Z(n.errors, e, i) : Q(n.errors, e), n.errors = z({}, n.errors)), (i ? !
|
|
2719
|
-
let t = z(z(z({}, a), s &&
|
|
2719
|
+
let o = X(n.errors, e), s = (d.isValid || f.isValid) && ri(r) && n.isValid !== r;
|
|
2720
|
+
if (t.delayError && i ? (c = h(() => b(e, i)), c(t.delayError)) : (clearTimeout(l), c = null, i ? Z(n.errors, e, i) : Q(n.errors, e), n.errors = z({}, n.errors)), (i ? !mi(o, i) : o) || !wi(a) || s) {
|
|
2721
|
+
let t = z(z(z({}, a), s && ri(r) ? { isValid: r } : {}), {}, {
|
|
2720
2722
|
errors: n.errors,
|
|
2721
2723
|
name: e
|
|
2722
2724
|
});
|
|
@@ -2724,7 +2726,7 @@ function ua(e = {}) {
|
|
|
2724
2726
|
}
|
|
2725
2727
|
}, E = function() {
|
|
2726
2728
|
var e = H(function* (e) {
|
|
2727
|
-
return _(e, !0), yield t.resolver(a, t.context,
|
|
2729
|
+
return _(e, !0), yield t.resolver(a, t.context, Gi(e || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
|
|
2728
2730
|
});
|
|
2729
2731
|
return function(t) {
|
|
2730
2732
|
return e.apply(this, arguments);
|
|
@@ -2735,7 +2737,7 @@ function ua(e = {}) {
|
|
|
2735
2737
|
if (_(e), e) {
|
|
2736
2738
|
for (let r of e) {
|
|
2737
2739
|
let e = X(t, r);
|
|
2738
|
-
e ? s.array.has(r) && q(e) && !Object.keys(e).some((e) => !Number.isNaN(Number(e))) ?
|
|
2740
|
+
e ? s.array.has(r) && q(e) && !Object.keys(e).some((e) => !Number.isNaN(Number(e))) ? aa(n.errors, { [r]: e }, r) : Z(n.errors, r, e) : Q(n.errors, r);
|
|
2739
2741
|
}
|
|
2740
2742
|
n.errors = z({}, n.errors);
|
|
2741
2743
|
} else n.errors = t;
|
|
@@ -2755,15 +2757,15 @@ function ua(e = {}) {
|
|
|
2755
2757
|
});
|
|
2756
2758
|
if (q(i)) for (let e in i) {
|
|
2757
2759
|
let t = i[e];
|
|
2758
|
-
t && fe(`${
|
|
2759
|
-
message:
|
|
2760
|
-
type: t.type ||
|
|
2760
|
+
t && fe(`${Qr}.${e}`, {
|
|
2761
|
+
message: ui(t.message) ? t.message : "",
|
|
2762
|
+
type: t.type || Zr.validate
|
|
2761
2763
|
});
|
|
2762
2764
|
}
|
|
2763
|
-
else
|
|
2765
|
+
else ui(i) || !i ? fe(Qr, {
|
|
2764
2766
|
message: i || "",
|
|
2765
|
-
type:
|
|
2766
|
-
}) : de(
|
|
2767
|
+
type: Zr.validate
|
|
2768
|
+
}) : de(Qr);
|
|
2767
2769
|
return i;
|
|
2768
2770
|
}
|
|
2769
2771
|
return !0;
|
|
@@ -2783,14 +2785,14 @@ function ua(e = {}) {
|
|
|
2783
2785
|
for (let o in r) {
|
|
2784
2786
|
let u = r[o];
|
|
2785
2787
|
if (u) {
|
|
2786
|
-
let { _f: r } = u, p =
|
|
2788
|
+
let { _f: r } = u, p = fn(u, Rr);
|
|
2787
2789
|
if (r) {
|
|
2788
|
-
let o = s.array.has(r.name), c = u._f &&
|
|
2790
|
+
let o = s.array.has(r.name), c = u._f && Xi(u._f), p = d.validatingFields || d.isValidating || f.validatingFields || f.isValidating;
|
|
2789
2791
|
c && p && _([r.name], !0);
|
|
2790
|
-
let h = yield
|
|
2791
|
-
if (c && p && _([r.name]), h[r.name] && (l.valid = !1, i) || (!i && (X(h, r.name) ? o ?
|
|
2792
|
+
let h = yield ca(u, s.disabled, a, m, t.shouldUseNativeValidation && !i, o);
|
|
2793
|
+
if (c && p && _([r.name]), h[r.name] && (l.valid = !1, i) || (!i && (X(h, r.name) ? o ? aa(n.errors, h, r.name) : Z(n.errors, r.name, h[r.name]) : Q(n.errors, r.name)), e.shouldUseNativeValidation && h[r.name])) break;
|
|
2792
2794
|
}
|
|
2793
|
-
!
|
|
2795
|
+
!wi(p) && (yield O({
|
|
2794
2796
|
context: l,
|
|
2795
2797
|
onlyCheckValid: i,
|
|
2796
2798
|
fields: p,
|
|
@@ -2807,16 +2809,16 @@ function ua(e = {}) {
|
|
|
2807
2809
|
}(), te = () => {
|
|
2808
2810
|
for (let e of s.unMount) {
|
|
2809
2811
|
let t = X(r, e);
|
|
2810
|
-
t && (t._f.refs ? t._f.refs.every((e) => !
|
|
2812
|
+
t && (t._f.refs ? t._f.refs.every((e) => !Ai(e)) : !Ai(t._f.ref)) && ge(e);
|
|
2811
2813
|
}
|
|
2812
2814
|
s.unMount = /* @__PURE__ */ new Set();
|
|
2813
|
-
}, k = (e, n) => !t.disabled && (e && n && Z(a, e, n), !
|
|
2815
|
+
}, k = (e, n) => !t.disabled && (e && n && Z(a, e, n), !mi(M(), i)), A = (e, t, n) => di(e, s, z({}, o.mount ? a : Y(t) ? i : ui(e) ? { [e]: t } : t), n, t), ne = (e) => bi(X(o.mount ? a : i, e, t.shouldUnregister ? X(i, e, []) : [])), re = (e, t, n = {}, i = !1) => {
|
|
2814
2816
|
let o = X(r, e), s = t;
|
|
2815
2817
|
if (o) {
|
|
2816
2818
|
let n = o._f;
|
|
2817
|
-
n && (!n.disabled && Z(a, e,
|
|
2819
|
+
n && (!n.disabled && Z(a, e, Vi(t, n)), s = Ei(n.ref) && Ur(t) ? "" : t, Di(n.ref) ? [...n.ref.options].forEach((e) => e.selected = s.includes(e.value)) : n.refs ? Vr(n.ref) ? n.refs.forEach((e) => {
|
|
2818
2820
|
(!e.defaultChecked || !e.disabled) && (Array.isArray(s) ? e.checked = !!s.find((t) => t === e.value) : e.checked = s === e.value || !!s);
|
|
2819
|
-
}) : n.refs.forEach((e) => e.checked = e.value === s) :
|
|
2821
|
+
}) : n.refs.forEach((e) => e.checked = e.value === s) : Ti(n.ref) ? n.ref.value = "" : (n.ref.value = s, n.ref.type || p.state.next({
|
|
2820
2822
|
name: e,
|
|
2821
2823
|
values: i ? a : J(a)
|
|
2822
2824
|
})));
|
|
@@ -2826,10 +2828,10 @@ function ua(e = {}) {
|
|
|
2826
2828
|
for (let a in t) {
|
|
2827
2829
|
if (!t.hasOwnProperty(a)) return;
|
|
2828
2830
|
let o = t[a], c = e + "." + a, l = X(r, c);
|
|
2829
|
-
(s.array.has(e) || q(o) || l && !l._f) && !
|
|
2831
|
+
(s.array.has(e) || q(o) || l && !l._f) && !Hr(o) ? ie(c, o, n, i) : re(c, o, n, i);
|
|
2830
2832
|
}
|
|
2831
2833
|
}, ae = (e, t, i, c) => {
|
|
2832
|
-
let l = X(r, e), u = s.array.has(e), m = c ? t : J(t), h =
|
|
2834
|
+
let l = X(r, e), u = s.array.has(e), m = c ? t : J(t), h = mi(X(a, e), m);
|
|
2833
2835
|
if (h || Z(a, e, m), u) p.array.next({
|
|
2834
2836
|
name: e,
|
|
2835
2837
|
values: c ? a : J(a)
|
|
@@ -2839,19 +2841,19 @@ function ua(e = {}) {
|
|
|
2839
2841
|
isDirty: k(e, m)
|
|
2840
2842
|
}));
|
|
2841
2843
|
else {
|
|
2842
|
-
let t = Array.isArray(m) && !m.length ||
|
|
2843
|
-
!l || l._f ||
|
|
2844
|
+
let t = Array.isArray(m) && !m.length || wi(m);
|
|
2845
|
+
!l || l._f || Ur(m) || t ? re(e, m, i, c) : ie(e, m, i, c);
|
|
2844
2846
|
}
|
|
2845
2847
|
if (!h) {
|
|
2846
|
-
let t =
|
|
2848
|
+
let t = Qi(e, s), r = c ? a : J(a);
|
|
2847
2849
|
p.state.next(z(z({}, t && n), {}, {
|
|
2848
2850
|
name: o.mount || t ? e : void 0,
|
|
2849
2851
|
values: r
|
|
2850
2852
|
}));
|
|
2851
2853
|
}
|
|
2852
2854
|
}, j = (e, t, n = {}) => ae(e, t, n, !1), oe = (e, t = {}) => {
|
|
2853
|
-
let r =
|
|
2854
|
-
if (!
|
|
2855
|
+
let r = ii(e) ? e(a) : e;
|
|
2856
|
+
if (!mi(a, r)) {
|
|
2855
2857
|
a = z(z({}, a), r);
|
|
2856
2858
|
for (let e of s.mount) ae(e, X(r, e), t, !0);
|
|
2857
2859
|
p.state.next(z(z({}, n), {}, {
|
|
@@ -2864,12 +2866,12 @@ function ua(e = {}) {
|
|
|
2864
2866
|
var i = H(function* (i) {
|
|
2865
2867
|
o.mount = !0;
|
|
2866
2868
|
let l = i.target, u = l.name, h = !0, v = X(r, u), y = (e) => {
|
|
2867
|
-
h = Number.isNaN(e) ||
|
|
2868
|
-
}, b =
|
|
2869
|
+
h = Number.isNaN(e) || Hr(e) && isNaN(e.getTime()) || mi(e, X(a, u, e));
|
|
2870
|
+
}, b = Ji(t.mode), x = Ji(t.reValidateMode);
|
|
2869
2871
|
if (v) {
|
|
2870
|
-
let o, S, C = l.type ?
|
|
2872
|
+
let o, S, C = l.type ? Wi(v._f) : Gr(i), D = i.type === Yr.BLUR || i.type === Yr.FOCUS_OUT, te = !Zi(v._f) && !e.validate && !t.resolver && !X(n.errors, u) && !v._f.deps || ra(D, X(n.touchedFields, u), n.isSubmitted, x, b), k = Qi(u, s, D);
|
|
2871
2873
|
Z(a, u, C), D ? (!l || !l.readOnly) && (v._f.onBlur && v._f.onBlur(i), c && c(0)) : v._f.onChange && v._f.onChange(i);
|
|
2872
|
-
let A = w(u, C, D), ne = !
|
|
2874
|
+
let A = w(u, C, D), ne = !wi(A) || k;
|
|
2873
2875
|
if (!D && p.state.next({
|
|
2874
2876
|
name: u,
|
|
2875
2877
|
type: i.type,
|
|
@@ -2881,12 +2883,12 @@ function ua(e = {}) {
|
|
|
2881
2883
|
})), !D && k && p.state.next(z({}, n)), t.resolver) {
|
|
2882
2884
|
let { errors: e } = yield E([u]);
|
|
2883
2885
|
if (_([u]), y(C), !h) {
|
|
2884
|
-
!
|
|
2886
|
+
!wi(A) && p.state.next(A);
|
|
2885
2887
|
return;
|
|
2886
2888
|
}
|
|
2887
|
-
let t =
|
|
2888
|
-
o = i.error, u = i.name, S =
|
|
2889
|
-
} else _([u], !0), o = (yield
|
|
2889
|
+
let t = ea(n.errors, r, u), i = ea(e, r, t.name || u);
|
|
2890
|
+
o = i.error, u = i.name, S = wi(e);
|
|
2891
|
+
} else _([u], !0), o = (yield ca(v, s.disabled, a, m, t.shouldUseNativeValidation))[u], _([u]), y(C), h && (o ? S = !1 : (d.isValid || f.isValid) && (S = yield O({
|
|
2890
2892
|
fields: r,
|
|
2891
2893
|
onlyCheckValid: !0,
|
|
2892
2894
|
name: u,
|
|
@@ -2902,16 +2904,16 @@ function ua(e = {}) {
|
|
|
2902
2904
|
if (X(n.errors, t) && e.focus) return e.focus(), 1;
|
|
2903
2905
|
}, le = function() {
|
|
2904
2906
|
var e = H(function* (e, i = {}) {
|
|
2905
|
-
let a, o, c =
|
|
2907
|
+
let a, o, c = xi(e);
|
|
2906
2908
|
if (t.resolver) {
|
|
2907
2909
|
let t = yield D(Y(e) ? e : c);
|
|
2908
|
-
a =
|
|
2910
|
+
a = wi(t), o = e ? !c.some((e) => X(t, e)) : a;
|
|
2909
2911
|
} else e ? (o = (yield Promise.all(c.map(function() {
|
|
2910
2912
|
var e = H(function* (e) {
|
|
2911
2913
|
let t = X(r, e);
|
|
2912
2914
|
return yield O({
|
|
2913
2915
|
fields: t && t._f ? { [e]: t } : t,
|
|
2914
|
-
eventType:
|
|
2916
|
+
eventType: Yr.TRIGGER
|
|
2915
2917
|
});
|
|
2916
2918
|
});
|
|
2917
2919
|
return function(t) {
|
|
@@ -2920,16 +2922,16 @@ function ua(e = {}) {
|
|
|
2920
2922
|
}()))).every(Boolean), !(!o && !n.isValid) && g()) : o = a = yield O({
|
|
2921
2923
|
fields: r,
|
|
2922
2924
|
name: e,
|
|
2923
|
-
eventType:
|
|
2925
|
+
eventType: Yr.TRIGGER
|
|
2924
2926
|
});
|
|
2925
|
-
return p.state.next(z(z(z({}, !
|
|
2927
|
+
return p.state.next(z(z(z({}, !ui(e) || (d.isValid || f.isValid) && a !== n.isValid ? {} : { name: e }), t.resolver || !e ? { isValid: a } : {}), {}, { errors: n.errors })), i.shouldFocus && !o && $i(r, ce, e ? c : s.mount), o;
|
|
2926
2928
|
});
|
|
2927
2929
|
return function(t) {
|
|
2928
2930
|
return e.apply(this, arguments);
|
|
2929
2931
|
};
|
|
2930
2932
|
}(), M = (e, t) => {
|
|
2931
2933
|
let r = z({}, o.mount ? a : i);
|
|
2932
|
-
return t && (r =
|
|
2934
|
+
return t && (r = Ci(t.dirtyFields ? n.dirtyFields : n.touchedFields, r)), Y(e) ? r : ui(e) ? X(r, e) : e.map((e) => X(r, e));
|
|
2933
2935
|
}, ue = (e, t) => ({
|
|
2934
2936
|
invalid: !!X((t || n).errors, e),
|
|
2935
2937
|
isDirty: !!X((t || n).dirtyFields, e),
|
|
@@ -2937,7 +2939,7 @@ function ua(e = {}) {
|
|
|
2937
2939
|
isValidating: !!X(n.validatingFields, e),
|
|
2938
2940
|
isTouched: !!X((t || n).touchedFields, e)
|
|
2939
2941
|
}), de = (e) => {
|
|
2940
|
-
let t = e ?
|
|
2942
|
+
let t = e ? xi(e) : void 0;
|
|
2941
2943
|
t == null || t.forEach((e) => Q(n.errors, e)), t ? t.forEach((e) => {
|
|
2942
2944
|
p.state.next({
|
|
2943
2945
|
name: e,
|
|
@@ -2945,40 +2947,40 @@ function ua(e = {}) {
|
|
|
2945
2947
|
});
|
|
2946
2948
|
}) : p.state.next({ errors: {} });
|
|
2947
2949
|
}, fe = (e, t, i) => {
|
|
2948
|
-
let a = (X(r, e, { _f: {} })._f || {}).ref, o = X(n.errors, e) || {}, { ref: s, message: c, type: l } = o, u =
|
|
2950
|
+
let a = (X(r, e, { _f: {} })._f || {}).ref, o = X(n.errors, e) || {}, { ref: s, message: c, type: l } = o, u = fn(o, zr);
|
|
2949
2951
|
Z(n.errors, e, z(z(z({}, u), t), {}, { ref: a })), p.state.next({
|
|
2950
2952
|
name: e,
|
|
2951
2953
|
errors: n.errors,
|
|
2952
2954
|
isValid: !1
|
|
2953
2955
|
}), i && i.shouldFocus && a && a.focus && a.focus();
|
|
2954
|
-
}, pe = (e, t) =>
|
|
2955
|
-
if (
|
|
2956
|
+
}, pe = (e, t) => ii(e) ? p.state.subscribe({ next: (n) => "values" in n && e(n.values || A(void 0, t), n) }) : A(e, t, !0), me = (e) => p.state.subscribe({ next: (t) => {
|
|
2957
|
+
if (na(e.name, t.name, e.exact) && ta(t, e.formState || d, Ee, e.reRenderRoot)) {
|
|
2956
2958
|
let r = z({}, a);
|
|
2957
2959
|
e.callback(z(z(z({ values: r }, n), t), {}, { defaultValues: i }));
|
|
2958
2960
|
}
|
|
2959
2961
|
} }).unsubscribe, he = (e) => (o.mount = !0, f = z(z({}, f), e.formState), me(z(z({}, e), {}, { formState: z(z({}, u), e.formState) }))), ge = (e, o = {}) => {
|
|
2960
|
-
for (let c of e ?
|
|
2962
|
+
for (let c of e ? xi(e) : s.mount) s.mount.delete(c), s.array.delete(c), o.keepValue || (Q(r, c), Q(a, c)), !o.keepError && Q(n.errors, c), !o.keepDirty && Q(n.dirtyFields, c), !o.keepTouched && Q(n.touchedFields, c), !o.keepIsValidating && Q(n.validatingFields, c), !t.shouldUnregister && !o.keepDefaultValue && Q(i, c);
|
|
2961
2963
|
p.state.next({ values: J(a) }), p.state.next(z(z({}, n), o.keepDirty ? { isDirty: k() } : {})), !o.keepIsValid && g();
|
|
2962
2964
|
}, _e = ({ disabled: e, name: t }) => {
|
|
2963
|
-
if (
|
|
2965
|
+
if (ri(e) && o.mount || e || s.disabled.has(t)) {
|
|
2964
2966
|
let n = s.disabled.has(t) !== !!e;
|
|
2965
2967
|
e ? s.disabled.add(t) : s.disabled.delete(t), n && o.mount && !o.action && g();
|
|
2966
2968
|
}
|
|
2967
2969
|
}, ve = (e, n = {}) => {
|
|
2968
|
-
let a = X(r, e), c =
|
|
2970
|
+
let a = X(r, e), c = ri(n.disabled) || ri(t.disabled), l = !s.registerName.has(e) && a && a._f && !a._f.mount;
|
|
2969
2971
|
return Z(r, e, z(z({}, a || {}), {}, { _f: z(z({}, a && a._f ? a._f : { ref: { name: e } }), {}, {
|
|
2970
2972
|
name: e,
|
|
2971
2973
|
mount: !0
|
|
2972
2974
|
}, n) })), s.mount.add(e), a && !l ? _e({
|
|
2973
|
-
disabled:
|
|
2975
|
+
disabled: ri(n.disabled) ? n.disabled : t.disabled,
|
|
2974
2976
|
name: e
|
|
2975
2977
|
}) : C(e, !0, n.value), z(z(z({}, c ? { disabled: n.disabled || t.disabled } : {}), t.progressive ? {
|
|
2976
2978
|
required: !!n.required,
|
|
2977
|
-
min:
|
|
2978
|
-
max:
|
|
2979
|
-
minLength:
|
|
2980
|
-
maxLength:
|
|
2981
|
-
pattern:
|
|
2979
|
+
min: qi(n.min),
|
|
2980
|
+
max: qi(n.max),
|
|
2981
|
+
minLength: qi(n.minLength),
|
|
2982
|
+
maxLength: qi(n.maxLength),
|
|
2983
|
+
pattern: qi(n.pattern)
|
|
2982
2984
|
} : {}), {}, {
|
|
2983
2985
|
name: e,
|
|
2984
2986
|
onChange: se,
|
|
@@ -2986,11 +2988,11 @@ function ua(e = {}) {
|
|
|
2986
2988
|
ref: (c) => {
|
|
2987
2989
|
if (c) {
|
|
2988
2990
|
s.registerName.add(e), ve(e, n), s.registerName.delete(e), a = X(r, e);
|
|
2989
|
-
let t = Y(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, o =
|
|
2991
|
+
let t = Y(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, o = ki(t), l = a._f.refs || [];
|
|
2990
2992
|
if (o ? l.find((e) => e === t) : t === a._f.ref) return;
|
|
2991
2993
|
Z(r, e, { _f: z(z({}, a._f), o ? {
|
|
2992
2994
|
refs: [
|
|
2993
|
-
...l.filter(
|
|
2995
|
+
...l.filter(Ai),
|
|
2994
2996
|
t,
|
|
2995
2997
|
...Array.isArray(X(i, e)) ? [{}] : []
|
|
2996
2998
|
],
|
|
@@ -2999,11 +3001,11 @@ function ua(e = {}) {
|
|
|
2999
3001
|
name: e
|
|
3000
3002
|
}
|
|
3001
3003
|
} : { ref: t }) }), C(e, !1, void 0, t);
|
|
3002
|
-
} else a = X(r, e, {}), a._f && (a._f.mount = !1), (t.shouldUnregister || n.shouldUnregister) && !(
|
|
3004
|
+
} else a = X(r, e, {}), a._f && (a._f.mount = !1), (t.shouldUnregister || n.shouldUnregister) && !(Kr(s.array, e) && o.action) && s.unMount.add(e);
|
|
3003
3005
|
}
|
|
3004
3006
|
});
|
|
3005
|
-
}, ye = () => t.shouldFocusError && !t.shouldUseNativeValidation &&
|
|
3006
|
-
|
|
3007
|
+
}, ye = () => t.shouldFocusError && !t.shouldUseNativeValidation && $i(r, ce, s.mount), be = (e) => {
|
|
3008
|
+
ri(e) && (p.state.next({ disabled: e }), $i(r, (t, n) => {
|
|
3007
3009
|
let i = X(r, n);
|
|
3008
3010
|
i && (t.disabled = i._f.disabled || e, Array.isArray(i._f.refs) && i._f.refs.forEach((t) => {
|
|
3009
3011
|
t.disabled = i._f.disabled || e;
|
|
@@ -3019,10 +3021,10 @@ function ua(e = {}) {
|
|
|
3019
3021
|
_(), n.errors = e, l = J(t);
|
|
3020
3022
|
} else yield O({
|
|
3021
3023
|
fields: r,
|
|
3022
|
-
eventType:
|
|
3024
|
+
eventType: Yr.SUBMIT
|
|
3023
3025
|
});
|
|
3024
3026
|
if (s.disabled.size) for (let e of s.disabled) Q(l, e);
|
|
3025
|
-
if (Q(n.errors,
|
|
3027
|
+
if (Q(n.errors, $r), wi(n.errors)) {
|
|
3026
3028
|
p.state.next({ errors: {} });
|
|
3027
3029
|
try {
|
|
3028
3030
|
yield e(l, o);
|
|
@@ -3033,7 +3035,7 @@ function ua(e = {}) {
|
|
|
3033
3035
|
if (p.state.next({
|
|
3034
3036
|
isSubmitted: !0,
|
|
3035
3037
|
isSubmitting: !1,
|
|
3036
|
-
isSubmitSuccessful:
|
|
3038
|
+
isSubmitSuccessful: wi(n.errors) && !c,
|
|
3037
3039
|
submitCount: n.submitCount + 1,
|
|
3038
3040
|
errors: n.errors
|
|
3039
3041
|
}), c) throw c;
|
|
@@ -3044,20 +3046,20 @@ function ua(e = {}) {
|
|
|
3044
3046
|
}(), Se = (e, t = {}) => {
|
|
3045
3047
|
X(r, e) && (Y(t.defaultValue) ? j(e, J(X(i, e))) : (j(e, t.defaultValue), Z(i, e, J(t.defaultValue))), t.keepTouched || Q(n.touchedFields, e), t.keepDirty || (Q(n.dirtyFields, e), n.isDirty = t.defaultValue ? k(e, J(X(i, e))) : k()), t.keepError || (Q(n.errors, e), d.isValid && g()), p.state.next(z({}, n)));
|
|
3046
3048
|
}, Ce = (e, c = {}) => {
|
|
3047
|
-
let l = e ? J(e) : i, u = J(l), f =
|
|
3049
|
+
let l = e ? J(e) : i, u = J(l), f = wi(e), m = u;
|
|
3048
3050
|
if (c.keepDefaultValues || (i = l), !c.keepValues) {
|
|
3049
3051
|
if (c.keepDirtyValues) {
|
|
3050
|
-
let e = new Set([...s.mount, ...Object.keys(
|
|
3052
|
+
let e = new Set([...s.mount, ...Object.keys(Li(i, a))]);
|
|
3051
3053
|
for (let t of Array.from(e)) {
|
|
3052
3054
|
let e = X(n.dirtyFields, t), r = X(a, t), i = X(m, t);
|
|
3053
3055
|
e && !Y(r) ? Z(m, t, r) : !e && !Y(i) && j(t, i);
|
|
3054
3056
|
}
|
|
3055
3057
|
} else {
|
|
3056
|
-
if (
|
|
3058
|
+
if (Jr && Y(e)) for (let e of s.mount) {
|
|
3057
3059
|
let t = X(r, e);
|
|
3058
3060
|
if (t && t._f) {
|
|
3059
3061
|
let e = Array.isArray(t._f.refs) ? t._f.refs[0] : t._f.ref;
|
|
3060
|
-
if (
|
|
3062
|
+
if (Ei(e)) {
|
|
3061
3063
|
let t = e.closest("form");
|
|
3062
3064
|
if (t) {
|
|
3063
3065
|
t.reset();
|
|
@@ -3083,23 +3085,23 @@ function ua(e = {}) {
|
|
|
3083
3085
|
watch: /* @__PURE__ */ new Set(),
|
|
3084
3086
|
watchAll: !1,
|
|
3085
3087
|
focus: ""
|
|
3086
|
-
}, o.mount = !d.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !t.shouldUnregister && !
|
|
3088
|
+
}, o.mount = !d.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !t.shouldUnregister && !wi(m), o.watch = !!t.shouldUnregister, o.keepIsValid = !!c.keepIsValid, o.action = !1, c.keepErrors || (n.errors = {}), p.state.next({
|
|
3087
3089
|
submitCount: c.keepSubmitCount ? n.submitCount : 0,
|
|
3088
|
-
isDirty: f ? !1 : c.keepDirty ? n.isDirty : c.keepValues ? k() : !!(c.keepDefaultValues && !
|
|
3090
|
+
isDirty: f ? !1 : c.keepDirty ? n.isDirty : c.keepValues ? k() : !!(c.keepDefaultValues && !mi(e, i)),
|
|
3089
3091
|
isSubmitted: c.keepIsSubmitted ? n.isSubmitted : !1,
|
|
3090
|
-
dirtyFields: f ? {} : c.keepDirtyValues ? c.keepDefaultValues && a ?
|
|
3092
|
+
dirtyFields: f ? {} : c.keepDirtyValues ? c.keepDefaultValues && a ? Li(i, a) : n.dirtyFields : c.keepDefaultValues && e ? Li(i, e) : c.keepDirty ? n.dirtyFields : {},
|
|
3091
3093
|
touchedFields: c.keepTouched ? n.touchedFields : {},
|
|
3092
3094
|
errors: c.keepErrors ? n.errors : {},
|
|
3093
3095
|
isSubmitSuccessful: c.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
|
|
3094
3096
|
isSubmitting: !1,
|
|
3095
3097
|
defaultValues: i
|
|
3096
3098
|
});
|
|
3097
|
-
}, we = (e, n) => Ce(
|
|
3099
|
+
}, we = (e, n) => Ce(ii(e) ? e(a) : e, z(z({}, t.resetOptions), n)), Te = (e, t = {}) => {
|
|
3098
3100
|
let n = X(r, e), i = n && n._f;
|
|
3099
3101
|
if (i) {
|
|
3100
3102
|
let e = i.refs ? i.refs[0] : i.ref;
|
|
3101
3103
|
e.focus && setTimeout(() => {
|
|
3102
|
-
e.focus(), t.shouldSelect &&
|
|
3104
|
+
e.focus(), t.shouldSelect && ii(e.select) && e.select();
|
|
3103
3105
|
});
|
|
3104
3106
|
}
|
|
3105
3107
|
}, Ee = (e) => {
|
|
@@ -3123,7 +3125,7 @@ function ua(e = {}) {
|
|
|
3123
3125
|
_setErrors: x,
|
|
3124
3126
|
_getFieldArray: ne,
|
|
3125
3127
|
_reset: Ce,
|
|
3126
|
-
_resetDefaultValues: () =>
|
|
3128
|
+
_resetDefaultValues: () => ii(t.defaultValues) && t.defaultValues().then((e) => {
|
|
3127
3129
|
we(e, t.resetOptions), p.state.next({ isLoading: !1 });
|
|
3128
3130
|
}),
|
|
3129
3131
|
_removeUnmounted: te,
|
|
@@ -3173,8 +3175,8 @@ function ua(e = {}) {
|
|
|
3173
3175
|
resetField: Se,
|
|
3174
3176
|
resetDefaultValues: (e, t = {}) => {
|
|
3175
3177
|
if (i = J(e), !t.keepDirty) {
|
|
3176
|
-
let e =
|
|
3177
|
-
n.dirtyFields = e, n.isDirty = !
|
|
3178
|
+
let e = Li(i, a);
|
|
3179
|
+
n.dirtyFields = e, n.isDirty = !wi(e);
|
|
3178
3180
|
}
|
|
3179
3181
|
t.keepIsValid || g(), p.state.next(z(z({}, n), {}, { defaultValues: i }));
|
|
3180
3182
|
},
|
|
@@ -3186,20 +3188,20 @@ function ua(e = {}) {
|
|
|
3186
3188
|
};
|
|
3187
3189
|
return z(z({}, De), {}, { formControl: De });
|
|
3188
3190
|
}
|
|
3189
|
-
function
|
|
3190
|
-
let t = K.useRef(void 0), n = K.useRef(void 0), r = K.useRef(e.formControl), [i, a] = K.useState(() => z(z({}, J(
|
|
3191
|
-
isLoading:
|
|
3191
|
+
function fa(e = {}) {
|
|
3192
|
+
let t = K.useRef(void 0), n = K.useRef(void 0), r = K.useRef(e.formControl), [i, a] = K.useState(() => z(z({}, J(ua)), {}, {
|
|
3193
|
+
isLoading: ii(e.defaultValues),
|
|
3192
3194
|
errors: e.errors || {},
|
|
3193
3195
|
disabled: e.disabled || !1,
|
|
3194
|
-
defaultValues:
|
|
3196
|
+
defaultValues: ii(e.defaultValues) ? void 0 : e.defaultValues
|
|
3195
3197
|
}));
|
|
3196
|
-
if (!t.current || e.formControl && r.current !== e.formControl) if (r.current = e.formControl, e.formControl) t.current = z(z({}, e.formControl), {}, { formState: i }), e.defaultValues && !
|
|
3198
|
+
if (!t.current || e.formControl && r.current !== e.formControl) if (r.current = e.formControl, e.formControl) t.current = z(z({}, e.formControl), {}, { formState: i }), e.defaultValues && !ii(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
3197
3199
|
else {
|
|
3198
|
-
let n =
|
|
3199
|
-
t.current = z(z({},
|
|
3200
|
+
let n = da(e), { formControl: r } = n;
|
|
3201
|
+
t.current = z(z({}, fn(n, Br)), {}, { formState: i });
|
|
3200
3202
|
}
|
|
3201
3203
|
let o = t.current.control;
|
|
3202
|
-
return o._options = e,
|
|
3204
|
+
return o._options = e, ci(() => {
|
|
3203
3205
|
let e = o._subscribe({
|
|
3204
3206
|
formState: o._proxyFormState,
|
|
3205
3207
|
callback: () => a(z(z({}, o._formState), {}, { defaultValues: o._defaultValues })),
|
|
@@ -3223,17 +3225,17 @@ function da(e = {}) {
|
|
|
3223
3225
|
}
|
|
3224
3226
|
}, [o, i.isDirty]), K.useEffect(() => {
|
|
3225
3227
|
var t;
|
|
3226
|
-
e.values && !
|
|
3228
|
+
e.values && !mi(e.values, n.current) ? (o._reset(e.values, z({ keepFieldsRef: !0 }, o._options.resetOptions)), (t = o._options.resetOptions) != null && t.keepIsValid || o._setValid(), n.current = e.values, a((e) => z({}, e))) : o._resetDefaultValues();
|
|
3227
3229
|
}, [o, e.values]), K.useEffect(() => {
|
|
3228
3230
|
o._state.mount || (o._setValid(), o._state.mount = !0), o._state.watch && (o._state.watch = !1, o._subjects.state.next(z({}, o._formState))), o._removeUnmounted();
|
|
3229
|
-
}), t.current.formState = K.useMemo(() =>
|
|
3231
|
+
}), t.current.formState = K.useMemo(() => si(i, o), [o, i]), t.current;
|
|
3230
3232
|
}
|
|
3231
3233
|
//#endregion
|
|
3232
3234
|
//#region src/utils/getValidateObjectHelper.ts
|
|
3233
|
-
var
|
|
3235
|
+
var pa = (e, t) => {
|
|
3234
3236
|
let n = {};
|
|
3235
3237
|
return e.forEach((e, r) => {
|
|
3236
|
-
if (e.type ===
|
|
3238
|
+
if (e.type === Qt.NOT_EMPTY && (n.required = (n) => t && on(n) ? e.message : !0), e.type === Qt.REGEX) {
|
|
3237
3239
|
let i = new RegExp(e.regex);
|
|
3238
3240
|
n[`regex_${r}`] = (n) => !t && !n ? !0 : typeof n == "string" && i.test(n) || e.message;
|
|
3239
3241
|
}
|
|
@@ -3242,7 +3244,7 @@ var fa = (e, t) => {
|
|
|
3242
3244
|
//#endregion
|
|
3243
3245
|
//#region src/screens/questions-screen/components/questions/select-input-custom/SelectInputCustom.tsx
|
|
3244
3246
|
R();
|
|
3245
|
-
var
|
|
3247
|
+
var ma = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
3246
3248
|
"data-ui": "gui-custom-select-chevron",
|
|
3247
3249
|
style: {
|
|
3248
3250
|
width: "16px",
|
|
@@ -3256,7 +3258,7 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3256
3258
|
flexShrink: 0
|
|
3257
3259
|
},
|
|
3258
3260
|
children: t ? /* @__PURE__ */ B(W, z({}, t)) : /* @__PURE__ */ B(W, { imageId: "chevronDown" })
|
|
3259
|
-
}),
|
|
3261
|
+
}), ha = ({ isChosen: e, option: t, onOptionClickCallback: n, isHovered: r, onHover: i, onHoverEnd: a }) => {
|
|
3260
3262
|
let o = e ? t.layoutSelected.image : t.layout.image;
|
|
3261
3263
|
return /* @__PURE__ */ B("div", {
|
|
3262
3264
|
style: {
|
|
@@ -3288,7 +3290,7 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3288
3290
|
children: /* @__PURE__ */ B(W, z({}, o))
|
|
3289
3291
|
})]
|
|
3290
3292
|
}, t.value);
|
|
3291
|
-
},
|
|
3293
|
+
}, ga = ({ name: e, options: t, isMulti: n = !1, isClearable: r = !1, value: i, onChange: a, placeholder: o, closeMenuOnSelect: s = !0, onBlur: c, parentElementRef: l, controlLayout: u, pickerLayout: d }) => {
|
|
3292
3294
|
var f, p, m, h, g, _, v, y;
|
|
3293
3295
|
let [b, x] = N(!1), [S, C] = N(i), [w, T] = N("down"), [E, D] = N(null), ee = F(null), O = F(null);
|
|
3294
3296
|
Ae(() => {
|
|
@@ -3420,7 +3422,7 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3420
3422
|
alignSelf: "stretch",
|
|
3421
3423
|
backgroundColor: "#D9D9D9"
|
|
3422
3424
|
} }) : null,
|
|
3423
|
-
/* @__PURE__ */ B(
|
|
3425
|
+
/* @__PURE__ */ B(ma, {
|
|
3424
3426
|
isOpen: b,
|
|
3425
3427
|
image: u == null ? void 0 : u.expandButton
|
|
3426
3428
|
}),
|
|
@@ -3447,7 +3449,7 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3447
3449
|
cursor: "default"
|
|
3448
3450
|
}),
|
|
3449
3451
|
onClick: (e) => e.stopPropagation(),
|
|
3450
|
-
children: t.map((e) => /* @__PURE__ */ B(
|
|
3452
|
+
children: t.map((e) => /* @__PURE__ */ B(ha, {
|
|
3451
3453
|
isChosen: S.some((t) => t.value === e.value),
|
|
3452
3454
|
option: e,
|
|
3453
3455
|
onOptionClickCallback: te,
|
|
@@ -3459,7 +3461,7 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3459
3461
|
]
|
|
3460
3462
|
})
|
|
3461
3463
|
});
|
|
3462
|
-
},
|
|
3464
|
+
}, _a = ({ control: e, layout: t, dataSourceQuestion: n, parentElementRef: r }) => {
|
|
3463
3465
|
let i = n.options.map((e) => ({
|
|
3464
3466
|
value: String(e.id),
|
|
3465
3467
|
label: e.text,
|
|
@@ -3476,16 +3478,16 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3476
3478
|
children: [t.title && /* @__PURE__ */ B(G, z(z({}, t.title), {}, {
|
|
3477
3479
|
text: n.text,
|
|
3478
3480
|
htmlFor: a
|
|
3479
|
-
})), /* @__PURE__ */ B(
|
|
3481
|
+
})), /* @__PURE__ */ B(_i, {
|
|
3480
3482
|
name: a,
|
|
3481
3483
|
control: e,
|
|
3482
3484
|
rules: {
|
|
3483
3485
|
required: !!n.required,
|
|
3484
|
-
validate:
|
|
3486
|
+
validate: pa(n.validators, !!n.required)
|
|
3485
3487
|
},
|
|
3486
3488
|
render: ({ field: e }) => {
|
|
3487
3489
|
let a = i.find((t) => t.value === e.value);
|
|
3488
|
-
return /* @__PURE__ */ B(
|
|
3490
|
+
return /* @__PURE__ */ B(ga, {
|
|
3489
3491
|
options: i,
|
|
3490
3492
|
placeholder: n.placeholder,
|
|
3491
3493
|
closeMenuOnSelect: !0,
|
|
@@ -3504,7 +3506,7 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3504
3506
|
}
|
|
3505
3507
|
})]
|
|
3506
3508
|
});
|
|
3507
|
-
},
|
|
3509
|
+
}, va = ({ control: e, layout: t, dataSourceQuestion: n, parentElementRef: r }) => {
|
|
3508
3510
|
let i = n.options.map((e) => ({
|
|
3509
3511
|
value: String(e.id),
|
|
3510
3512
|
label: e.text,
|
|
@@ -3521,19 +3523,19 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3521
3523
|
children: [t.title && /* @__PURE__ */ B(G, z(z({}, t.title), {}, {
|
|
3522
3524
|
text: n.text,
|
|
3523
3525
|
htmlFor: a
|
|
3524
|
-
})), /* @__PURE__ */ B(
|
|
3526
|
+
})), /* @__PURE__ */ B(_i, {
|
|
3525
3527
|
name: a,
|
|
3526
3528
|
control: e,
|
|
3527
3529
|
rules: {
|
|
3528
3530
|
required: !!n.required,
|
|
3529
|
-
validate:
|
|
3531
|
+
validate: pa(n.validators, !!n.required)
|
|
3530
3532
|
},
|
|
3531
3533
|
render: ({ field: e }) => {
|
|
3532
3534
|
let o = i.filter((t) => {
|
|
3533
3535
|
var n;
|
|
3534
3536
|
return (n = e.value) == null ? void 0 : n.includes(t.value);
|
|
3535
3537
|
});
|
|
3536
|
-
return /* @__PURE__ */ B(
|
|
3538
|
+
return /* @__PURE__ */ B(ga, {
|
|
3537
3539
|
name: a,
|
|
3538
3540
|
options: i,
|
|
3539
3541
|
placeholder: n.placeholder,
|
|
@@ -3556,7 +3558,7 @@ var pa = ({ isOpen: e, image: t }) => /* @__PURE__ */ B("div", {
|
|
|
3556
3558
|
//#endregion
|
|
3557
3559
|
//#region src/hooks/useIsKeyboard.ts
|
|
3558
3560
|
R();
|
|
3559
|
-
var
|
|
3561
|
+
var ya = () => {
|
|
3560
3562
|
let [e, t] = N(!1);
|
|
3561
3563
|
return P(() => {
|
|
3562
3564
|
let e = () => t(!0), n = () => t(!1);
|
|
@@ -3568,14 +3570,14 @@ var va = () => {
|
|
|
3568
3570
|
//#endregion
|
|
3569
3571
|
//#region src/screens/questions-screen/components/questions/multi-selector-options-question/MultiSelectorOptionsOption.tsx
|
|
3570
3572
|
R();
|
|
3571
|
-
var
|
|
3572
|
-
let [a, o] = N(!1), s =
|
|
3573
|
+
var ba = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle: i }) => {
|
|
3574
|
+
let [a, o] = N(!1), s = ya(), c = String(n.id), l = t.option, u = t.optionSelected, d = {
|
|
3573
3575
|
backgroundColor: U(u == null ? void 0 : u.backgroundColor),
|
|
3574
3576
|
borderRadius: u.cornerRadius
|
|
3575
3577
|
}, f = {
|
|
3576
3578
|
backgroundColor: U(l == null ? void 0 : l.backgroundColor),
|
|
3577
3579
|
borderRadius: l.cornerRadius
|
|
3578
|
-
}, p = a && s ? { filter: `drop-shadow(0 0 1px ${
|
|
3580
|
+
}, p = a && s ? { filter: `drop-shadow(0 0 1px ${Jt})` } : {};
|
|
3579
3581
|
return /* @__PURE__ */ B("div", { children: /* @__PURE__ */ B("label", {
|
|
3580
3582
|
style: z({
|
|
3581
3583
|
display: "flex",
|
|
@@ -3613,7 +3615,7 @@ var ya = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3613
3615
|
})
|
|
3614
3616
|
]
|
|
3615
3617
|
}) }, e.id);
|
|
3616
|
-
},
|
|
3618
|
+
}, xa = ({ control: e, layout: t, dataSourceQuestion: n }) => {
|
|
3617
3619
|
let r = String(n.id);
|
|
3618
3620
|
return /* @__PURE__ */ B("div", {
|
|
3619
3621
|
style: { boxSizing: "border-box" },
|
|
@@ -3633,19 +3635,19 @@ var ya = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3633
3635
|
marginBottom: "16px"
|
|
3634
3636
|
},
|
|
3635
3637
|
children: /* @__PURE__ */ B(G, z(z({}, t.title), {}, { text: n.text }))
|
|
3636
|
-
}), /* @__PURE__ */ B(
|
|
3638
|
+
}), /* @__PURE__ */ B(_i, {
|
|
3637
3639
|
name: r,
|
|
3638
3640
|
control: e,
|
|
3639
3641
|
rules: {
|
|
3640
3642
|
required: !!n.required,
|
|
3641
|
-
validate:
|
|
3643
|
+
validate: pa(n.validators, !!n.required)
|
|
3642
3644
|
},
|
|
3643
3645
|
render: ({ field: e }) => {
|
|
3644
3646
|
var r;
|
|
3645
3647
|
let i = (r = e.value) == null ? [] : r;
|
|
3646
3648
|
return /* @__PURE__ */ B(m, { children: n.options.map((r) => {
|
|
3647
3649
|
let a = String(r.id), o = i.includes(a);
|
|
3648
|
-
return /* @__PURE__ */ B(
|
|
3650
|
+
return /* @__PURE__ */ B(ba, {
|
|
3649
3651
|
dataSourceQuestion: n,
|
|
3650
3652
|
layout: t,
|
|
3651
3653
|
option: r,
|
|
@@ -3664,8 +3666,8 @@ var ya = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3664
3666
|
//#endregion
|
|
3665
3667
|
//#region src/screens/questions-screen/components/questions/multi-selector-buttons-question/MultiSelectorButtonsOption.tsx
|
|
3666
3668
|
R();
|
|
3667
|
-
var
|
|
3668
|
-
let [a, o] = N(!1), s =
|
|
3669
|
+
var Sa = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle: i }) => {
|
|
3670
|
+
let [a, o] = N(!1), s = ya(), c = String(n.id), l = t.option, u = t.optionSelected, d = {
|
|
3669
3671
|
borderRadius: l == null ? void 0 : l.cornerRadius,
|
|
3670
3672
|
background: U(l == null ? void 0 : l.backgroundColor),
|
|
3671
3673
|
borderColor: U(l == null ? void 0 : l.borderColor),
|
|
@@ -3675,7 +3677,7 @@ var xa = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3675
3677
|
background: U(u == null ? void 0 : u.backgroundColor),
|
|
3676
3678
|
borderColor: U(u == null ? void 0 : u.borderColor),
|
|
3677
3679
|
borderWidth: u == null ? void 0 : u.borderWidth
|
|
3678
|
-
}, p = a && s ? { outline: `2px solid ${
|
|
3680
|
+
}, p = a && s ? { outline: `2px solid ${Jt}` } : {};
|
|
3679
3681
|
return /* @__PURE__ */ B("div", {
|
|
3680
3682
|
style: {
|
|
3681
3683
|
display: "flex",
|
|
@@ -3707,7 +3709,7 @@ var xa = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3707
3709
|
}), /* @__PURE__ */ B(G, z(z({}, r ? u.title : l.title), {}, { text: e.text }))]
|
|
3708
3710
|
})
|
|
3709
3711
|
});
|
|
3710
|
-
},
|
|
3712
|
+
}, Ca = ({ control: e, layout: t, dataSourceQuestion: n }) => {
|
|
3711
3713
|
let r = String(n.id);
|
|
3712
3714
|
return /* @__PURE__ */ B("div", {
|
|
3713
3715
|
style: { boxSizing: "border-box" },
|
|
@@ -3724,12 +3726,12 @@ var xa = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3724
3726
|
marginBottom: "16px"
|
|
3725
3727
|
},
|
|
3726
3728
|
children: /* @__PURE__ */ B(G, z(z({}, t.title), {}, { text: n.text }))
|
|
3727
|
-
}), /* @__PURE__ */ B(
|
|
3729
|
+
}), /* @__PURE__ */ B(_i, {
|
|
3728
3730
|
name: r,
|
|
3729
3731
|
control: e,
|
|
3730
3732
|
rules: {
|
|
3731
3733
|
required: !!n.required,
|
|
3732
|
-
validate:
|
|
3734
|
+
validate: pa(n.validators, !!n.required)
|
|
3733
3735
|
},
|
|
3734
3736
|
render: ({ field: e }) => {
|
|
3735
3737
|
var r;
|
|
@@ -3742,7 +3744,7 @@ var xa = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3742
3744
|
},
|
|
3743
3745
|
children: n.options.map((r) => {
|
|
3744
3746
|
let a = String(r.id), o = i.includes(a);
|
|
3745
|
-
return /* @__PURE__ */ B(
|
|
3747
|
+
return /* @__PURE__ */ B(Sa, {
|
|
3746
3748
|
dataSourceQuestion: n,
|
|
3747
3749
|
layout: t,
|
|
3748
3750
|
option: r,
|
|
@@ -3762,14 +3764,14 @@ var xa = ({ option: e, layout: t, dataSourceQuestion: n, isChosen: r, onToggle:
|
|
|
3762
3764
|
//#endregion
|
|
3763
3765
|
//#region src/screens/questions-screen/components/questions/selector-options-question/SelectorOptionsOption.tsx
|
|
3764
3766
|
R();
|
|
3765
|
-
var
|
|
3766
|
-
let [a, o] = N(!1), s =
|
|
3767
|
+
var wa = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }) => {
|
|
3768
|
+
let [a, o] = N(!1), s = ya(), c = String(n.id), l = i(c) === String(e.id), u = t.option, d = t.optionSelected, f = {
|
|
3767
3769
|
backgroundColor: U(d == null ? void 0 : d.backgroundColor),
|
|
3768
3770
|
borderRadius: d.cornerRadius
|
|
3769
3771
|
}, p = {
|
|
3770
3772
|
backgroundColor: U(u == null ? void 0 : u.backgroundColor),
|
|
3771
3773
|
borderRadius: u.cornerRadius
|
|
3772
|
-
}, m = a && s ? { filter: `drop-shadow(0 0 1px ${
|
|
3774
|
+
}, m = a && s ? { filter: `drop-shadow(0 0 1px ${Jt})` } : {};
|
|
3773
3775
|
return /* @__PURE__ */ B("div", { children: /* @__PURE__ */ B("label", {
|
|
3774
3776
|
style: z({
|
|
3775
3777
|
display: "flex",
|
|
@@ -3797,7 +3799,7 @@ var Ca = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3797
3799
|
left: "50%"
|
|
3798
3800
|
} }, r(c, {
|
|
3799
3801
|
required: !!n.required,
|
|
3800
|
-
validate:
|
|
3802
|
+
validate: pa(n.validators, !!n.required)
|
|
3801
3803
|
})), {}, {
|
|
3802
3804
|
value: e.id,
|
|
3803
3805
|
type: "radio",
|
|
@@ -3806,7 +3808,7 @@ var Ca = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3806
3808
|
}))
|
|
3807
3809
|
]
|
|
3808
3810
|
}) }, e.id);
|
|
3809
|
-
},
|
|
3811
|
+
}, Ta = ({ layout: e, register: t, watch: n, dataSourceQuestion: r }) => /* @__PURE__ */ B("div", {
|
|
3810
3812
|
style: { boxSizing: "border-box" },
|
|
3811
3813
|
children: /* @__PURE__ */ B("fieldset", {
|
|
3812
3814
|
style: {
|
|
@@ -3824,7 +3826,7 @@ var Ca = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3824
3826
|
marginBottom: "16px"
|
|
3825
3827
|
},
|
|
3826
3828
|
children: /* @__PURE__ */ B(G, z(z({}, e.title), {}, { text: r.text }))
|
|
3827
|
-
}), r.options.map((i) => /* @__PURE__ */ B(
|
|
3829
|
+
}), r.options.map((i) => /* @__PURE__ */ B(wa, {
|
|
3828
3830
|
register: t,
|
|
3829
3831
|
watch: n,
|
|
3830
3832
|
layout: e,
|
|
@@ -3836,8 +3838,8 @@ var Ca = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3836
3838
|
//#endregion
|
|
3837
3839
|
//#region src/screens/questions-screen/components/questions/selector-buttons-question/SelectorButtonsOption.tsx
|
|
3838
3840
|
R();
|
|
3839
|
-
var
|
|
3840
|
-
let [a, o] = N(!1), s =
|
|
3841
|
+
var Ea = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }) => {
|
|
3842
|
+
let [a, o] = N(!1), s = ya(), c = String(n.id), l = i(c) === String(e.id), u = t.option, d = t.optionSelected, f = {
|
|
3841
3843
|
borderRadius: u == null ? void 0 : u.cornerRadius,
|
|
3842
3844
|
background: U(u == null ? void 0 : u.backgroundColor),
|
|
3843
3845
|
borderColor: U(u == null ? void 0 : u.borderColor),
|
|
@@ -3847,7 +3849,7 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3847
3849
|
background: U(d == null ? void 0 : d.backgroundColor),
|
|
3848
3850
|
borderColor: U(d == null ? void 0 : d.borderColor),
|
|
3849
3851
|
borderWidth: d == null ? void 0 : d.borderWidth
|
|
3850
|
-
}, m = a && s ? { outline: `2px solid ${
|
|
3852
|
+
}, m = a && s ? { outline: `2px solid ${Jt}` } : {};
|
|
3851
3853
|
return /* @__PURE__ */ B("div", {
|
|
3852
3854
|
style: {
|
|
3853
3855
|
display: "flex",
|
|
@@ -3869,7 +3871,7 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3869
3871
|
left: "50%"
|
|
3870
3872
|
} }, r(c, {
|
|
3871
3873
|
required: !!n.required,
|
|
3872
|
-
validate:
|
|
3874
|
+
validate: pa(n.validators, !!n.required)
|
|
3873
3875
|
})), {}, {
|
|
3874
3876
|
value: e.id,
|
|
3875
3877
|
type: "radio",
|
|
@@ -3878,7 +3880,7 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3878
3880
|
})), /* @__PURE__ */ B(G, z(z({}, l ? d.title : u.title), {}, { text: e.text }))]
|
|
3879
3881
|
})
|
|
3880
3882
|
}, e.id);
|
|
3881
|
-
},
|
|
3883
|
+
}, Da = ({ layout: e, watch: t, register: n, dataSourceQuestion: r }) => /* @__PURE__ */ B("div", {
|
|
3882
3884
|
style: { boxSizing: "border-box" },
|
|
3883
3885
|
children: /* @__PURE__ */ B("fieldset", {
|
|
3884
3886
|
style: {
|
|
@@ -3899,7 +3901,7 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3899
3901
|
justifyContent: "center",
|
|
3900
3902
|
gap: 5
|
|
3901
3903
|
},
|
|
3902
|
-
children: r.options.map((i) => /* @__PURE__ */ B(
|
|
3904
|
+
children: r.options.map((i) => /* @__PURE__ */ B(Ea, {
|
|
3903
3905
|
register: n,
|
|
3904
3906
|
watch: t,
|
|
3905
3907
|
layout: e,
|
|
@@ -3908,7 +3910,7 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3908
3910
|
}, i.id))
|
|
3909
3911
|
})]
|
|
3910
3912
|
})
|
|
3911
|
-
}),
|
|
3913
|
+
}), Oa = ({ children: e, backgroundColor: t, cornerRadius: n = 0, isError: r, isRequired: i, validationBorderColor: a, validationBorderWidth: o }) => /* @__PURE__ */ B("div", {
|
|
3912
3914
|
style: z({
|
|
3913
3915
|
position: "relative",
|
|
3914
3916
|
flexShrink: 0,
|
|
@@ -3933,13 +3935,13 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3933
3935
|
},
|
|
3934
3936
|
children: "*"
|
|
3935
3937
|
}), e]
|
|
3936
|
-
}),
|
|
3938
|
+
}), ka = ({ validationErrorsTypes: e, title: t }) => e ? /* @__PURE__ */ B("div", {
|
|
3937
3939
|
style: {
|
|
3938
3940
|
width: "100%",
|
|
3939
3941
|
fontSize: 12
|
|
3940
3942
|
},
|
|
3941
3943
|
children: Object.entries(e).map(([e, n]) => /* @__PURE__ */ B(G, z(z({}, t), {}, { text: n }), e))
|
|
3942
|
-
}) : null,
|
|
3944
|
+
}) : null, Aa = ({ layout: e, dataSourceQuestion: t, register: n }) => {
|
|
3943
3945
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v;
|
|
3944
3946
|
let y = String(t.id);
|
|
3945
3947
|
return /* @__PURE__ */ B("div", {
|
|
@@ -3953,7 +3955,7 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3953
3955
|
htmlFor: y
|
|
3954
3956
|
})), /* @__PURE__ */ B("input", z(z({}, n(y, {
|
|
3955
3957
|
required: !!t.required,
|
|
3956
|
-
validate:
|
|
3958
|
+
validate: pa(t.validators, !!t.required)
|
|
3957
3959
|
})), {}, {
|
|
3958
3960
|
id: y,
|
|
3959
3961
|
type: ((e) => e ? e === kt.EMAIL ? "email" : e === kt.FREE_TEXT ? "text" : e === kt.NUMBER ? "number" : e === kt.SECURE ? "password" : "text" : "text")((r = e.textField) == null ? void 0 : r.inputType),
|
|
@@ -3969,13 +3971,13 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3969
3971
|
padding: "11px",
|
|
3970
3972
|
boxSizing: "border-box",
|
|
3971
3973
|
backgroundColor: (g = U(e == null || (_ = e.textField) == null ? void 0 : _.backgroundColor)) == null ? "#FFFFFF" : g,
|
|
3972
|
-
outlineColor:
|
|
3974
|
+
outlineColor: Jt
|
|
3973
3975
|
},
|
|
3974
3976
|
placeholder: (v = t.placeholder) == null ? "" : v,
|
|
3975
3977
|
"data-id": y
|
|
3976
3978
|
}))]
|
|
3977
3979
|
});
|
|
3978
|
-
},
|
|
3980
|
+
}, ja = ({ layout: e, dataSourceQuestion: t, register: n }) => {
|
|
3979
3981
|
var r, i, a, o, s, c, l, u, d, f, p, m, h;
|
|
3980
3982
|
let g = String(t.id);
|
|
3981
3983
|
return /* @__PURE__ */ B("div", {
|
|
@@ -3989,7 +3991,7 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
3989
3991
|
htmlFor: g
|
|
3990
3992
|
})), /* @__PURE__ */ B("textarea", z(z({}, n(g, {
|
|
3991
3993
|
required: !!t.required,
|
|
3992
|
-
validate:
|
|
3994
|
+
validate: pa(t.validators, !!t.required)
|
|
3993
3995
|
})), {}, {
|
|
3994
3996
|
id: g,
|
|
3995
3997
|
placeholder: (r = t.placeholder) == null ? "" : r,
|
|
@@ -4012,13 +4014,13 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
4012
4014
|
padding: "11px",
|
|
4013
4015
|
boxSizing: "border-box",
|
|
4014
4016
|
backgroundColor: (m = U(e == null || (h = e.textField) == null ? void 0 : h.backgroundColor)) == null ? "#FFFFFF" : m,
|
|
4015
|
-
outlineColor:
|
|
4017
|
+
outlineColor: Jt
|
|
4016
4018
|
}
|
|
4017
4019
|
}))]
|
|
4018
4020
|
});
|
|
4019
|
-
},
|
|
4021
|
+
}, Ma, Na = class e extends st {
|
|
4020
4022
|
constructor({ errorCode: t, message: n, underlyingError: r, underlyingBaseError: i }) {
|
|
4021
|
-
let a = st.getErrorKey(t,
|
|
4023
|
+
let a = st.getErrorKey(t, Xt);
|
|
4022
4024
|
super({
|
|
4023
4025
|
errorCode: t,
|
|
4024
4026
|
errorCodeKey: a,
|
|
@@ -4032,30 +4034,30 @@ var Ta = ({ option: e, layout: t, dataSourceQuestion: n, register: r, watch: i }
|
|
|
4032
4034
|
});
|
|
4033
4035
|
}
|
|
4034
4036
|
};
|
|
4035
|
-
|
|
4036
|
-
var
|
|
4037
|
+
Ma = Na, Ma.MODULE = Yt, Ma.ERROR_ENUM_NAME = "GuiModuleError", Ma.SHORT_CODE = "GM", De(), R();
|
|
4038
|
+
var Pa = ({ header: e, title: t, buttons: n, footer: r, questions: i, dataSource: a, properties: o, backgroundColor: s, backgroundImage: c }) => {
|
|
4037
4039
|
var l;
|
|
4038
4040
|
let u = ut.FORM, { perform: d } = vt();
|
|
4039
|
-
if (!a || (a == null ? void 0 : a.questions.length) === 0) return d(new
|
|
4040
|
-
errorCode:
|
|
4041
|
+
if (!a || (a == null ? void 0 : a.questions.length) === 0) return d(new Na({
|
|
4042
|
+
errorCode: Xt.DECODING_FAILED,
|
|
4041
4043
|
message: "No dataSource or no data for questions in the dataSource"
|
|
4042
4044
|
})), null;
|
|
4043
|
-
if (!(i != null && i.itemTypes) || Array.isArray(i == null ? void 0 : i.itemTypes) && (i == null || (l = i.itemTypes) == null ? void 0 : l.length) === 0) return d(new
|
|
4044
|
-
errorCode:
|
|
4045
|
+
if (!(i != null && i.itemTypes) || Array.isArray(i == null ? void 0 : i.itemTypes) && (i == null || (l = i.itemTypes) == null ? void 0 : l.length) === 0) return d(new Na({
|
|
4046
|
+
errorCode: Xt.DECODING_FAILED,
|
|
4045
4047
|
message: "No questions in the itemTypes field or itemTypes is not an array"
|
|
4046
4048
|
})), null;
|
|
4047
|
-
let f = o ?
|
|
4049
|
+
let f = o ? sn(a.questions, o) : {}, p = F(null), { register: h, handleSubmit: g, formState: { errors: _ }, reset: v, watch: y, control: b } = fa({
|
|
4048
4050
|
criteriaMode: "all",
|
|
4049
4051
|
defaultValues: f
|
|
4050
4052
|
});
|
|
4051
|
-
return /* @__PURE__ */ B(
|
|
4053
|
+
return /* @__PURE__ */ B(Cn, {
|
|
4052
4054
|
header: e,
|
|
4053
4055
|
footer: r,
|
|
4054
4056
|
backgroundColor: s,
|
|
4055
4057
|
backgroundImage: c,
|
|
4056
4058
|
children: /* @__PURE__ */ B("form", {
|
|
4057
4059
|
onSubmit: g((e) => {
|
|
4058
|
-
d(
|
|
4060
|
+
d(an(e), u), v();
|
|
4059
4061
|
}),
|
|
4060
4062
|
style: {
|
|
4061
4063
|
height: "100%",
|
|
@@ -4103,14 +4105,14 @@ var Na = ({ header: e, title: t, buttons: n, footer: r, questions: i, dataSource
|
|
|
4103
4105
|
if ((n = t.questionIds) != null && n.length) return t.questionIds.find((t) => e === t);
|
|
4104
4106
|
}))(String(e.id), i.itemTypes) || ((e, t) => t.find((t) => !t.questionIds && t.answerType === e))(e.answerType, i.itemTypes) : i.itemTypes.find((t) => t.answerType === e.answerType);
|
|
4105
4107
|
if (!n) {
|
|
4106
|
-
d(new
|
|
4107
|
-
errorCode:
|
|
4108
|
+
d(new Na({
|
|
4109
|
+
errorCode: Xt.DECODING_FAILED,
|
|
4108
4110
|
message: "The question template has not been found"
|
|
4109
4111
|
}));
|
|
4110
4112
|
return;
|
|
4111
4113
|
}
|
|
4112
4114
|
let r = n == null ? void 0 : n.displayType, o = e.id in _ && ((t = _[e.id]) == null ? void 0 : t.types);
|
|
4113
|
-
return /* @__PURE__ */ B(m, { children: [/* @__PURE__ */ B(
|
|
4115
|
+
return /* @__PURE__ */ B(m, { children: [/* @__PURE__ */ B(Oa, {
|
|
4114
4116
|
backgroundColor: n == null ? void 0 : n.backgroundColor,
|
|
4115
4117
|
cornerRadius: n == null ? void 0 : n.cornerRadius,
|
|
4116
4118
|
isError: !!o,
|
|
@@ -4118,52 +4120,52 @@ var Na = ({ header: e, title: t, buttons: n, footer: r, questions: i, dataSource
|
|
|
4118
4120
|
validationBorderColor: n == null ? void 0 : n.validationBorderColor,
|
|
4119
4121
|
validationBorderWidth: n == null ? void 0 : n.validationBorderWidth,
|
|
4120
4122
|
children: [
|
|
4121
|
-
r === Ot.TEXT_EXPANDABLE && /* @__PURE__ */ B(
|
|
4123
|
+
r === Ot.TEXT_EXPANDABLE && /* @__PURE__ */ B(ja, {
|
|
4122
4124
|
layout: n,
|
|
4123
4125
|
dataSourceQuestion: e,
|
|
4124
4126
|
register: h
|
|
4125
4127
|
}),
|
|
4126
|
-
r === Ot.TEXT_SINGLE_LINE && /* @__PURE__ */ B(
|
|
4128
|
+
r === Ot.TEXT_SINGLE_LINE && /* @__PURE__ */ B(Aa, {
|
|
4127
4129
|
layout: n,
|
|
4128
4130
|
dataSourceQuestion: e,
|
|
4129
4131
|
register: h
|
|
4130
4132
|
}),
|
|
4131
|
-
r === Ot.SELECTOR_OPTIONS && /* @__PURE__ */ B(
|
|
4133
|
+
r === Ot.SELECTOR_OPTIONS && /* @__PURE__ */ B(Ta, {
|
|
4132
4134
|
layout: n,
|
|
4133
4135
|
dataSourceQuestion: e,
|
|
4134
4136
|
watch: y,
|
|
4135
4137
|
register: h
|
|
4136
4138
|
}),
|
|
4137
|
-
r === Ot.SELECTOR_BUTTONS && /* @__PURE__ */ B(
|
|
4139
|
+
r === Ot.SELECTOR_BUTTONS && /* @__PURE__ */ B(Da, {
|
|
4138
4140
|
layout: n,
|
|
4139
4141
|
dataSourceQuestion: e,
|
|
4140
4142
|
watch: y,
|
|
4141
4143
|
register: h
|
|
4142
4144
|
}),
|
|
4143
|
-
r === Ot.SELECTOR_DROPDOWN && /* @__PURE__ */ B(
|
|
4145
|
+
r === Ot.SELECTOR_DROPDOWN && /* @__PURE__ */ B(_a, {
|
|
4144
4146
|
control: b,
|
|
4145
4147
|
layout: n,
|
|
4146
4148
|
dataSourceQuestion: e,
|
|
4147
4149
|
parentElementRef: p
|
|
4148
4150
|
}),
|
|
4149
|
-
r === Ot.MULTI_SELECTOR_DROPDOWN && /* @__PURE__ */ B(
|
|
4151
|
+
r === Ot.MULTI_SELECTOR_DROPDOWN && /* @__PURE__ */ B(va, {
|
|
4150
4152
|
control: b,
|
|
4151
4153
|
layout: n,
|
|
4152
4154
|
dataSourceQuestion: e,
|
|
4153
4155
|
parentElementRef: p
|
|
4154
4156
|
}),
|
|
4155
|
-
r === Ot.MULTI_SELECTOR_OPTIONS && /* @__PURE__ */ B(
|
|
4157
|
+
r === Ot.MULTI_SELECTOR_OPTIONS && /* @__PURE__ */ B(xa, {
|
|
4156
4158
|
control: b,
|
|
4157
4159
|
layout: n,
|
|
4158
4160
|
dataSourceQuestion: e
|
|
4159
4161
|
}),
|
|
4160
|
-
r === Ot.MULTI_SELECTOR_BUTTONS && /* @__PURE__ */ B(
|
|
4162
|
+
r === Ot.MULTI_SELECTOR_BUTTONS && /* @__PURE__ */ B(Ca, {
|
|
4161
4163
|
control: b,
|
|
4162
4164
|
layout: n,
|
|
4163
4165
|
dataSourceQuestion: e
|
|
4164
4166
|
})
|
|
4165
4167
|
]
|
|
4166
|
-
}), o && /* @__PURE__ */ B(
|
|
4168
|
+
}), o && /* @__PURE__ */ B(ka, {
|
|
4167
4169
|
validationErrorsTypes: o,
|
|
4168
4170
|
title: n.validationMessage
|
|
4169
4171
|
})] }, e.id);
|
|
@@ -4179,11 +4181,11 @@ var Na = ({ header: e, title: t, buttons: n, footer: r, questions: i, dataSource
|
|
|
4179
4181
|
alignItems: "flex-end",
|
|
4180
4182
|
padding: "2px"
|
|
4181
4183
|
},
|
|
4182
|
-
children: n.map((e, t) => /* @__PURE__ */ B(
|
|
4184
|
+
children: n.map((e, t) => /* @__PURE__ */ B(bn, z({ dataTestId: "question-button" }, e), t))
|
|
4183
4185
|
})]
|
|
4184
4186
|
})
|
|
4185
4187
|
});
|
|
4186
|
-
},
|
|
4188
|
+
}, Fa = { display: "none" }, Ia = {
|
|
4187
4189
|
display: "flex",
|
|
4188
4190
|
alignItems: "center",
|
|
4189
4191
|
justifyContent: "center",
|
|
@@ -4193,7 +4195,7 @@ var Na = ({ header: e, title: t, buttons: n, footer: r, questions: i, dataSource
|
|
|
4193
4195
|
borderRadius: "16px",
|
|
4194
4196
|
backgroundColor: "#7e57c5",
|
|
4195
4197
|
cursor: "pointer"
|
|
4196
|
-
},
|
|
4198
|
+
}, La = {
|
|
4197
4199
|
position: "relative",
|
|
4198
4200
|
display: "flex",
|
|
4199
4201
|
flexGrow: 1,
|
|
@@ -4209,7 +4211,7 @@ var Na = ({ header: e, title: t, buttons: n, footer: r, questions: i, dataSource
|
|
|
4209
4211
|
//#endregion
|
|
4210
4212
|
//#region src/screens/gallery-screen/index.tsx
|
|
4211
4213
|
R();
|
|
4212
|
-
var
|
|
4214
|
+
var Ra = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImage: i, selectionLimit: a }) => {
|
|
4213
4215
|
var o;
|
|
4214
4216
|
let { perform: s } = vt(), c = F(null), l = typeof a == "number" && (a === 0 || a > 1), u = function() {
|
|
4215
4217
|
var e = H(function* (e) {
|
|
@@ -4222,7 +4224,7 @@ var La = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImag
|
|
|
4222
4224
|
files: (yield Promise.allSettled(n.map(function() {
|
|
4223
4225
|
var e = H(function* (e) {
|
|
4224
4226
|
return {
|
|
4225
|
-
content: yield
|
|
4227
|
+
content: yield cn(e),
|
|
4226
4228
|
metadata: {
|
|
4227
4229
|
name: e.name,
|
|
4228
4230
|
type: e.type,
|
|
@@ -4244,20 +4246,20 @@ var La = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImag
|
|
|
4244
4246
|
return e.apply(this, arguments);
|
|
4245
4247
|
};
|
|
4246
4248
|
}();
|
|
4247
|
-
return /* @__PURE__ */ B(
|
|
4249
|
+
return /* @__PURE__ */ B(Cn, {
|
|
4248
4250
|
header: e,
|
|
4249
4251
|
footer: t,
|
|
4250
4252
|
backgroundColor: r,
|
|
4251
4253
|
backgroundImage: i,
|
|
4252
4254
|
children: /* @__PURE__ */ B(m, { children: /* @__PURE__ */ B("div", {
|
|
4253
|
-
style: z(z({},
|
|
4255
|
+
style: z(z({}, La), {}, { justifyContent: "center" }),
|
|
4254
4256
|
children: [/* @__PURE__ */ B("input", z(z({
|
|
4255
|
-
style:
|
|
4257
|
+
style: Fa,
|
|
4256
4258
|
ref: c,
|
|
4257
4259
|
type: "file",
|
|
4258
4260
|
accept: "image/*"
|
|
4259
4261
|
}, l ? { multiple: !0 } : {}), {}, { onInput: u })), /* @__PURE__ */ B("button", {
|
|
4260
|
-
style:
|
|
4262
|
+
style: Ia,
|
|
4261
4263
|
onClick: () => {
|
|
4262
4264
|
var e;
|
|
4263
4265
|
(e = c.current) == null || e.showPicker();
|
|
@@ -4266,7 +4268,7 @@ var La = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImag
|
|
|
4266
4268
|
})]
|
|
4267
4269
|
}) })
|
|
4268
4270
|
});
|
|
4269
|
-
},
|
|
4271
|
+
}, za = /* @__PURE__ */ a(((e, t) => {
|
|
4270
4272
|
(function(n, r) {
|
|
4271
4273
|
var i = "1.0.41", a = "", o = "?", s = "function", c = "undefined", l = "object", u = "string", d = "major", f = "model", p = "name", m = "type", h = "vendor", g = "version", _ = "architecture", v = "console", y = "mobile", b = "tablet", x = "smarttv", S = "wearable", C = "embedded", w = 500, T = "Amazon", E = "Apple", D = "ASUS", ee = "BlackBerry", O = "Browser", te = "Chrome", k = "Edge", A = "Firefox", ne = "Google", re = "Honor", ie = "Huawei", ae = "Lenovo", j = "LG", oe = "Microsoft", se = "Motorola", ce = "Nvidia", le = "OnePlus", M = "Opera", ue = "OPPO", de = "Samsung", fe = "Sharp", pe = "Sony", me = "Xiaomi", he = "Zebra", ge = "Facebook", _e = "Chromium OS", ve = "Mac OS", ye = " Browser", be = function(e, t) {
|
|
4272
4274
|
var n = {};
|
|
@@ -5425,13 +5427,13 @@ var La = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImag
|
|
|
5425
5427
|
};
|
|
5426
5428
|
}
|
|
5427
5429
|
})(typeof window == "object" ? window : e);
|
|
5428
|
-
})),
|
|
5430
|
+
})), Ba = (/* @__PURE__ */ a(((e) => {
|
|
5429
5431
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5430
5432
|
function t(e) {
|
|
5431
5433
|
return e && typeof e == "object" && "default" in e ? e.default : e;
|
|
5432
5434
|
}
|
|
5433
|
-
t((
|
|
5434
|
-
var n = new (
|
|
5435
|
+
t((Fr(), c(Fn)));
|
|
5436
|
+
var n = new (za())(), r = n.getBrowser();
|
|
5435
5437
|
n.getCPU();
|
|
5436
5438
|
var i = n.getDevice(), a = n.getEngine(), o = n.getOS(), s = n.getUA(), l = {
|
|
5437
5439
|
Mobile: "mobile",
|
|
@@ -5572,7 +5574,7 @@ var La = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImag
|
|
|
5572
5574
|
E(o), O(o), te(o) || ye(), ne(r), re(r);
|
|
5573
5575
|
var we = oe(r);
|
|
5574
5576
|
ce(r), le(r), k(o), A(o), de(r), fe(r), pe(r), C(i), w(i), me(a), he(a), Se(s), ae(r) || _e(s), j(r), T(i), ve(), ye(), be(), xe(), ge(), _e(s), ae(r) && _e(s), D(o), ee(o), M(r), ue(r), e.isDesktop = Ce, e.isSafari = we;
|
|
5575
|
-
})))(),
|
|
5577
|
+
})))(), Va = { display: "none" }, Ha = {
|
|
5576
5578
|
display: "flex",
|
|
5577
5579
|
alignItems: "center",
|
|
5578
5580
|
justifyContent: "center",
|
|
@@ -5582,7 +5584,7 @@ var La = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImag
|
|
|
5582
5584
|
borderRadius: "16px",
|
|
5583
5585
|
background: "#7e57c5",
|
|
5584
5586
|
cursor: "pointer"
|
|
5585
|
-
},
|
|
5587
|
+
}, Ua = {
|
|
5586
5588
|
position: "relative",
|
|
5587
5589
|
display: "flex",
|
|
5588
5590
|
alignItems: "center",
|
|
@@ -5595,7 +5597,7 @@ var La = ({ header: e, footer: t, buttons: n, backgroundColor: r, backgroundImag
|
|
|
5595
5597
|
//#endregion
|
|
5596
5598
|
//#region src/screens/camera-screen/index.tsx
|
|
5597
5599
|
R();
|
|
5598
|
-
var
|
|
5600
|
+
var Wa = ({ header: e, footer: t, backgroundColor: n, backgroundImage: r, buttons: i, selectionLimit: a }) => {
|
|
5599
5601
|
var o;
|
|
5600
5602
|
let { perform: s } = vt(), c = F(null), l = typeof a == "number" && (a === 0 || a > 1), u = function() {
|
|
5601
5603
|
var e = H(function* (e) {
|
|
@@ -5608,7 +5610,7 @@ var Ua = ({ header: e, footer: t, backgroundColor: n, backgroundImage: r, button
|
|
|
5608
5610
|
files: (yield Promise.allSettled(n.map(function() {
|
|
5609
5611
|
var e = H(function* (e) {
|
|
5610
5612
|
return {
|
|
5611
|
-
content: yield
|
|
5613
|
+
content: yield cn(e),
|
|
5612
5614
|
metadata: {
|
|
5613
5615
|
name: e.name,
|
|
5614
5616
|
type: e.type,
|
|
@@ -5640,35 +5642,35 @@ var Ua = ({ header: e, footer: t, backgroundColor: n, backgroundImage: r, button
|
|
|
5640
5642
|
}();
|
|
5641
5643
|
return P(() => {
|
|
5642
5644
|
H(function* () {
|
|
5643
|
-
if (
|
|
5644
|
-
let e = yield
|
|
5645
|
+
if (Ba.isDesktop) return;
|
|
5646
|
+
let e = yield ln();
|
|
5645
5647
|
(e === "denied" || e === "error") && s({
|
|
5646
5648
|
cancel: !1,
|
|
5647
5649
|
permissionDenied: !0,
|
|
5648
5650
|
files: []
|
|
5649
5651
|
});
|
|
5650
5652
|
})();
|
|
5651
|
-
}, []), /* @__PURE__ */ B(
|
|
5653
|
+
}, []), /* @__PURE__ */ B(Cn, {
|
|
5652
5654
|
header: e,
|
|
5653
5655
|
footer: t,
|
|
5654
5656
|
backgroundColor: n,
|
|
5655
5657
|
backgroundImage: r,
|
|
5656
5658
|
children: /* @__PURE__ */ B(m, { children: /* @__PURE__ */ B("div", {
|
|
5657
|
-
style: z(z({},
|
|
5659
|
+
style: z(z({}, Ua), {}, { justifyContent: "center" }),
|
|
5658
5660
|
children: [/* @__PURE__ */ B("input", z(z({
|
|
5659
|
-
style:
|
|
5661
|
+
style: Va,
|
|
5660
5662
|
ref: c,
|
|
5661
5663
|
type: "file",
|
|
5662
5664
|
accept: "image/*",
|
|
5663
5665
|
capture: "user"
|
|
5664
5666
|
}, l ? { multiple: !0 } : {}), {}, { onInput: u })), /* @__PURE__ */ B("button", {
|
|
5665
|
-
style:
|
|
5667
|
+
style: Ha,
|
|
5666
5668
|
onClick: d,
|
|
5667
5669
|
children: /* @__PURE__ */ B(W, { imageId: i == null || (o = i[0]) == null || (o = o.image) == null ? void 0 : o.imageId })
|
|
5668
5670
|
})]
|
|
5669
5671
|
}) })
|
|
5670
5672
|
});
|
|
5671
|
-
},
|
|
5673
|
+
}, Ga = function() {
|
|
5672
5674
|
var e = H(function* () {
|
|
5673
5675
|
try {
|
|
5674
5676
|
var e;
|
|
@@ -5681,7 +5683,7 @@ var Ua = ({ header: e, footer: t, backgroundColor: n, backgroundImage: r, button
|
|
|
5681
5683
|
return function() {
|
|
5682
5684
|
return e.apply(this, arguments);
|
|
5683
5685
|
};
|
|
5684
|
-
}(),
|
|
5686
|
+
}(), Ka = function() {
|
|
5685
5687
|
var e = H(function* () {
|
|
5686
5688
|
try {
|
|
5687
5689
|
return yield navigator.permissions.query({ name: "geolocation" });
|
|
@@ -5692,7 +5694,7 @@ var Ua = ({ header: e, footer: t, backgroundColor: n, backgroundImage: r, button
|
|
|
5692
5694
|
return function() {
|
|
5693
5695
|
return e.apply(this, arguments);
|
|
5694
5696
|
};
|
|
5695
|
-
}(),
|
|
5697
|
+
}(), qa = function() {
|
|
5696
5698
|
var e = H(function* (e) {
|
|
5697
5699
|
return new Promise((t) => {
|
|
5698
5700
|
if (!navigator.geolocation) return t({ location: {
|
|
@@ -5724,101 +5726,118 @@ var Ua = ({ header: e, footer: t, backgroundColor: n, backgroundImage: r, button
|
|
|
5724
5726
|
return function(t) {
|
|
5725
5727
|
return e.apply(this, arguments);
|
|
5726
5728
|
};
|
|
5727
|
-
}();
|
|
5729
|
+
}(), Ja = (e, t) => typeof t == "number" && t > 0 ? t * 1e3 : e;
|
|
5728
5730
|
//#endregion
|
|
5729
5731
|
//#region src/hooks/useGeolocationLogic.ts
|
|
5730
5732
|
R();
|
|
5731
|
-
var
|
|
5732
|
-
var
|
|
5733
|
-
let
|
|
5733
|
+
var Ya = ({ askEveryTime: e, getLocationTimeout: t, locationAccuracy: n }) => {
|
|
5734
|
+
var r;
|
|
5735
|
+
let i = {
|
|
5736
|
+
[At.HIGH]: {
|
|
5737
|
+
enableHighAccuracy: !0,
|
|
5738
|
+
timeout: Ja(15e3, t),
|
|
5739
|
+
maximumAge: 0
|
|
5740
|
+
},
|
|
5741
|
+
[At.BALANCED]: {
|
|
5742
|
+
enableHighAccuracy: !1,
|
|
5743
|
+
timeout: Ja(12e3, t),
|
|
5744
|
+
maximumAge: 3e4
|
|
5745
|
+
},
|
|
5746
|
+
[At.LOW]: {
|
|
5747
|
+
enableHighAccuracy: !1,
|
|
5748
|
+
timeout: Ja(8e3, t),
|
|
5749
|
+
maximumAge: 6e4
|
|
5750
|
+
},
|
|
5751
|
+
[At.PASSIVE]: {
|
|
5752
|
+
enableHighAccuracy: !1,
|
|
5753
|
+
timeout: Ja(5e3, t),
|
|
5754
|
+
maximumAge: 3e5
|
|
5755
|
+
}
|
|
5756
|
+
}[n || At.PASSIVE], a = ut.FORM, { perform: o } = vt(), { setIsProcessingCallback: s } = yt(), [c, l] = N(!1), { devSettings: u } = _t(), d = !!(!(u == null || (r = u.popups) == null || (r = r.system_restricted) == null) && r.isOpen);
|
|
5734
5757
|
P(() => {
|
|
5735
|
-
|
|
5736
|
-
}, [
|
|
5737
|
-
let
|
|
5758
|
+
u && l(d);
|
|
5759
|
+
}, [d, u]);
|
|
5760
|
+
let f = () => {
|
|
5738
5761
|
var e;
|
|
5739
|
-
!(
|
|
5740
|
-
},
|
|
5762
|
+
!(u == null || (e = u.popups) == null) && e.system_restricted || l(!0);
|
|
5763
|
+
}, p = () => {
|
|
5741
5764
|
var e;
|
|
5742
|
-
!(
|
|
5743
|
-
}, f = {
|
|
5744
|
-
enableHighAccuracy: !0,
|
|
5745
|
-
timeout: typeof t == "number" && t > 0 ? t * 1e3 : 15e3,
|
|
5746
|
-
maximumAge: 6e4
|
|
5765
|
+
!(u == null || (e = u.popups) == null) && e.system_restricted || l(!1);
|
|
5747
5766
|
};
|
|
5748
5767
|
Ae(() => {
|
|
5749
|
-
|
|
5768
|
+
Ba.isSafari || e || s == null || s(!0);
|
|
5750
5769
|
}, []), P(() => {
|
|
5751
|
-
if (
|
|
5770
|
+
if (Ba.isSafari || e) return;
|
|
5752
5771
|
let t = !0;
|
|
5753
5772
|
return H(function* () {
|
|
5754
|
-
if ((yield
|
|
5755
|
-
|
|
5773
|
+
if ((yield Ga()) !== "granted") {
|
|
5774
|
+
s == null || s(!1);
|
|
5756
5775
|
return;
|
|
5757
5776
|
}
|
|
5758
|
-
let e = yield
|
|
5759
|
-
t &&
|
|
5777
|
+
let e = yield qa(i);
|
|
5778
|
+
t && o(e, a);
|
|
5760
5779
|
})(), () => {
|
|
5761
|
-
|
|
5780
|
+
Ba.isSafari || e || (t = !1);
|
|
5762
5781
|
};
|
|
5763
5782
|
}, []), P(() => {
|
|
5764
|
-
if (
|
|
5783
|
+
if (Ba.isSafari) return;
|
|
5765
5784
|
let e = !0, t = null;
|
|
5766
5785
|
return H(function* () {
|
|
5767
|
-
let n = yield
|
|
5786
|
+
let n = yield Ka();
|
|
5768
5787
|
n && (t = n, n.onchange = H(function* () {
|
|
5769
|
-
if (n.state === "denied" && (
|
|
5788
|
+
if (n.state === "denied" && (s == null || s(!0), o({ location: {
|
|
5770
5789
|
locationState: "application_location_restricted",
|
|
5771
5790
|
lat: null,
|
|
5772
5791
|
lon: null,
|
|
5773
5792
|
error: "Application location services restricted or unavailable"
|
|
5774
|
-
} },
|
|
5775
|
-
|
|
5776
|
-
let t = yield
|
|
5793
|
+
} }, a)), n.state === "granted") {
|
|
5794
|
+
s == null || s(!0);
|
|
5795
|
+
let t = yield qa(i);
|
|
5777
5796
|
if (!e) return;
|
|
5778
|
-
|
|
5797
|
+
o(t, a);
|
|
5779
5798
|
}
|
|
5780
5799
|
}));
|
|
5781
5800
|
})(), () => {
|
|
5782
|
-
|
|
5801
|
+
Ba.isSafari || (e = !1, t && (t.onchange = null));
|
|
5783
5802
|
};
|
|
5784
5803
|
}, []);
|
|
5785
|
-
let
|
|
5804
|
+
let m = function() {
|
|
5786
5805
|
var e = H(function* (e) {
|
|
5787
5806
|
e.preventDefault();
|
|
5788
|
-
let t = yield
|
|
5807
|
+
let t = yield Ga();
|
|
5789
5808
|
if (t === "denied") {
|
|
5790
|
-
|
|
5809
|
+
f();
|
|
5791
5810
|
return;
|
|
5792
5811
|
}
|
|
5793
|
-
t === "prompt" && (yield
|
|
5812
|
+
t === "prompt" && (yield qa()), t === "granted" && o(yield qa(i), a);
|
|
5794
5813
|
});
|
|
5795
5814
|
return function(t) {
|
|
5796
5815
|
return e.apply(this, arguments);
|
|
5797
5816
|
};
|
|
5798
|
-
}(),
|
|
5817
|
+
}(), h = function() {
|
|
5799
5818
|
var e = H(function* (e) {
|
|
5800
|
-
if (e.preventDefault(), (yield
|
|
5801
|
-
|
|
5819
|
+
if (e.preventDefault(), (yield Ga()) === "denied") {
|
|
5820
|
+
f();
|
|
5802
5821
|
return;
|
|
5803
5822
|
}
|
|
5804
|
-
|
|
5823
|
+
s == null || s(!0), o(yield qa(i), a);
|
|
5805
5824
|
});
|
|
5806
5825
|
return function(t) {
|
|
5807
5826
|
return e.apply(this, arguments);
|
|
5808
5827
|
};
|
|
5809
5828
|
}();
|
|
5810
5829
|
return {
|
|
5811
|
-
isPopupOpen:
|
|
5812
|
-
handleAllowButtonClick:
|
|
5813
|
-
closePopup:
|
|
5830
|
+
isPopupOpen: c,
|
|
5831
|
+
handleAllowButtonClick: Ba.isSafari ? h : m,
|
|
5832
|
+
closePopup: p
|
|
5814
5833
|
};
|
|
5815
|
-
},
|
|
5834
|
+
}, Xa = {
|
|
5816
5835
|
height: "100%",
|
|
5817
5836
|
fontFamily: "sans-serif",
|
|
5818
5837
|
display: "flex",
|
|
5819
5838
|
flexDirection: "column",
|
|
5820
5839
|
gap: "15px"
|
|
5821
|
-
},
|
|
5840
|
+
}, Za = {
|
|
5822
5841
|
flex: "1 1 100%",
|
|
5823
5842
|
display: "flex",
|
|
5824
5843
|
justifyContent: "flex-start",
|
|
@@ -5830,7 +5849,7 @@ var qa = ({ askEveryTime: e, getLocationTimeout: t }) => {
|
|
|
5830
5849
|
width: "100%",
|
|
5831
5850
|
overflow: "auto",
|
|
5832
5851
|
position: "relative"
|
|
5833
|
-
},
|
|
5852
|
+
}, Qa = {
|
|
5834
5853
|
position: "absolute",
|
|
5835
5854
|
width: "100%",
|
|
5836
5855
|
height: "100%",
|
|
@@ -5844,25 +5863,25 @@ var qa = ({ askEveryTime: e, getLocationTimeout: t }) => {
|
|
|
5844
5863
|
zIndex: 1e3,
|
|
5845
5864
|
pointerEvents: "auto",
|
|
5846
5865
|
cursor: "default"
|
|
5847
|
-
},
|
|
5866
|
+
}, $a = {
|
|
5848
5867
|
width: "100%",
|
|
5849
5868
|
height: "auto",
|
|
5850
5869
|
marginBottom: "32px",
|
|
5851
5870
|
aspectRatio: "1.61"
|
|
5852
|
-
},
|
|
5871
|
+
}, eo = {
|
|
5853
5872
|
marginBottom: 20,
|
|
5854
5873
|
lineHeight: "39.2px",
|
|
5855
5874
|
width: "100%"
|
|
5856
|
-
},
|
|
5875
|
+
}, to = {
|
|
5857
5876
|
lineHeight: "28px",
|
|
5858
5877
|
fontWeight: "400",
|
|
5859
5878
|
width: "100%"
|
|
5860
|
-
},
|
|
5879
|
+
}, no = {
|
|
5861
5880
|
position: "relative",
|
|
5862
5881
|
padding: "32px 24px 0",
|
|
5863
5882
|
border: "1px solid rgba(0, 0, 0, 0.06)",
|
|
5864
5883
|
width: "min(400px, calc(100vw - 32px))"
|
|
5865
|
-
},
|
|
5884
|
+
}, ro = {
|
|
5866
5885
|
marginBottom: "10px",
|
|
5867
5886
|
fontWeight: 500,
|
|
5868
5887
|
display: "-webkit-box",
|
|
@@ -5871,48 +5890,49 @@ var qa = ({ askEveryTime: e, getLocationTimeout: t }) => {
|
|
|
5871
5890
|
overflow: "hidden",
|
|
5872
5891
|
textOverflow: "ellipsis",
|
|
5873
5892
|
lineClamp: 2
|
|
5874
|
-
},
|
|
5893
|
+
}, io = {
|
|
5875
5894
|
marginBottom: "84px",
|
|
5876
5895
|
fontWeight: 400
|
|
5877
|
-
},
|
|
5896
|
+
}, ao = {
|
|
5878
5897
|
height: "100%",
|
|
5879
5898
|
overflow: "scroll",
|
|
5880
5899
|
maxHeight: "calc(100dvh - 190px)"
|
|
5881
|
-
},
|
|
5900
|
+
}, oo = {
|
|
5882
5901
|
position: "absolute",
|
|
5883
5902
|
bottom: 0,
|
|
5884
5903
|
insetInline: 0,
|
|
5885
5904
|
padding: "24px",
|
|
5886
5905
|
width: "100%"
|
|
5887
|
-
},
|
|
5888
|
-
let
|
|
5906
|
+
}, so = ({ title: e, header: t, footer: n, image: r, description: i, buttons: a, backgroundColor: o, backgroundImage: s, popups: c, askEveryTime: l, getLocationTimeout: u, locationAccuracy: d }) => {
|
|
5907
|
+
let f = c == null ? void 0 : c.find((e) => e.reason === $t.SYSTEM_RESTRICTED), { isPopupOpen: p, handleAllowButtonClick: m, closePopup: h } = Ya({
|
|
5889
5908
|
askEveryTime: l,
|
|
5890
|
-
getLocationTimeout: u
|
|
5909
|
+
getLocationTimeout: u,
|
|
5910
|
+
locationAccuracy: d
|
|
5891
5911
|
});
|
|
5892
|
-
return /* @__PURE__ */ B(
|
|
5912
|
+
return /* @__PURE__ */ B(Cn, {
|
|
5893
5913
|
header: t,
|
|
5894
5914
|
footer: n,
|
|
5895
5915
|
backgroundColor: o,
|
|
5896
5916
|
backgroundImage: s,
|
|
5897
5917
|
children: [/* @__PURE__ */ B("div", {
|
|
5898
|
-
style:
|
|
5918
|
+
style: Xa,
|
|
5899
5919
|
children: [/* @__PURE__ */ B("div", {
|
|
5900
5920
|
part: "gui-geolocation-screen-container",
|
|
5901
5921
|
"data-ui": "gui-geolocation-screen-container",
|
|
5902
5922
|
id: "geolocation-screen-container",
|
|
5903
|
-
style:
|
|
5923
|
+
style: Za,
|
|
5904
5924
|
children: [
|
|
5905
5925
|
r && /* @__PURE__ */ B("div", {
|
|
5906
|
-
style:
|
|
5926
|
+
style: $a,
|
|
5907
5927
|
children: /* @__PURE__ */ B(W, z({}, r))
|
|
5908
5928
|
}),
|
|
5909
5929
|
e && /* @__PURE__ */ B("div", {
|
|
5910
|
-
style:
|
|
5930
|
+
style: eo,
|
|
5911
5931
|
children: /* @__PURE__ */ B(G, z({}, e))
|
|
5912
5932
|
}),
|
|
5913
5933
|
i && /* @__PURE__ */ B("div", {
|
|
5914
|
-
style:
|
|
5915
|
-
children: /* @__PURE__ */ B(
|
|
5934
|
+
style: to,
|
|
5935
|
+
children: /* @__PURE__ */ B(wn, z({}, i))
|
|
5916
5936
|
})
|
|
5917
5937
|
]
|
|
5918
5938
|
}), !!(a != null && a.length) && /* @__PURE__ */ B("div", {
|
|
@@ -5922,37 +5942,37 @@ var qa = ({ askEveryTime: e, getLocationTimeout: t }) => {
|
|
|
5922
5942
|
},
|
|
5923
5943
|
children: a.map((e, t) => /* @__PURE__ */ B("div", {
|
|
5924
5944
|
style: { padding: "5px" },
|
|
5925
|
-
children: /* @__PURE__ */ B(
|
|
5945
|
+
children: /* @__PURE__ */ B(bn, z(z({ dataTestId: "question-button" }, e), e.type === "FORM" && { onClick: m }))
|
|
5926
5946
|
}, t))
|
|
5927
5947
|
})]
|
|
5928
|
-
}),
|
|
5929
|
-
style:
|
|
5948
|
+
}), f && p && /* @__PURE__ */ B("div", {
|
|
5949
|
+
style: Qa,
|
|
5930
5950
|
onPointerDown: (e) => {
|
|
5931
|
-
e.preventDefault(), e.stopPropagation(),
|
|
5951
|
+
e.preventDefault(), e.stopPropagation(), h();
|
|
5932
5952
|
},
|
|
5933
5953
|
children: /* @__PURE__ */ B("div", {
|
|
5934
|
-
style: z(z({},
|
|
5935
|
-
borderRadius: (
|
|
5936
|
-
backgroundColor: (
|
|
5954
|
+
style: z(z({}, no), {}, {
|
|
5955
|
+
borderRadius: (f == null ? void 0 : f.cornerRadius) || "27px",
|
|
5956
|
+
backgroundColor: (f == null ? void 0 : f.backgroundColor) || "#ffffff"
|
|
5937
5957
|
}),
|
|
5938
5958
|
onPointerDown: (e) => {
|
|
5939
5959
|
e.stopPropagation();
|
|
5940
5960
|
},
|
|
5941
5961
|
children: [
|
|
5942
5962
|
/* @__PURE__ */ B("div", {
|
|
5943
|
-
style:
|
|
5944
|
-
children: /* @__PURE__ */ B(G, z({ fontSize: "24px" },
|
|
5963
|
+
style: ro,
|
|
5964
|
+
children: /* @__PURE__ */ B(G, z({ fontSize: "24px" }, f.title))
|
|
5945
5965
|
}),
|
|
5946
5966
|
/* @__PURE__ */ B("div", {
|
|
5947
|
-
style:
|
|
5967
|
+
style: io,
|
|
5948
5968
|
children: /* @__PURE__ */ B("div", {
|
|
5949
|
-
style:
|
|
5950
|
-
children: /* @__PURE__ */ B(G, z({ fontSize: "17px" },
|
|
5969
|
+
style: ao,
|
|
5970
|
+
children: /* @__PURE__ */ B(G, z({ fontSize: "17px" }, f.message))
|
|
5951
5971
|
})
|
|
5952
5972
|
}),
|
|
5953
|
-
|
|
5954
|
-
style:
|
|
5955
|
-
children: /* @__PURE__ */ B(
|
|
5973
|
+
f.actionButton1 && /* @__PURE__ */ B("div", {
|
|
5974
|
+
style: oo,
|
|
5975
|
+
children: /* @__PURE__ */ B(bn, z(z({ dataTestId: "question-button" }, f.actionButton1), f.actionButton1.type === "FORM" ? { onClick: h } : {}))
|
|
5956
5976
|
})
|
|
5957
5977
|
]
|
|
5958
5978
|
})
|
|
@@ -5960,12 +5980,12 @@ var qa = ({ askEveryTime: e, getLocationTimeout: t }) => {
|
|
|
5960
5980
|
});
|
|
5961
5981
|
};
|
|
5962
5982
|
De(), R();
|
|
5963
|
-
var
|
|
5983
|
+
var co = ce(void 0), lo = ({ children: e, handlers: t }) => /* @__PURE__ */ B(co.Provider, {
|
|
5964
5984
|
value: { handlers: t },
|
|
5965
5985
|
children: e
|
|
5966
|
-
}),
|
|
5967
|
-
let t =
|
|
5968
|
-
return e.type === "FORM" && e.actionId && n && n[e.actionId] && (r = n[e.actionId]), /* @__PURE__ */ B(
|
|
5986
|
+
}), uo = () => Pe(co), fo = (e) => {
|
|
5987
|
+
let t = uo(), n = t == null ? void 0 : t.handlers, r;
|
|
5988
|
+
return e.type === "FORM" && e.actionId && n && n[e.actionId] && (r = n[e.actionId]), /* @__PURE__ */ B(bn, z({
|
|
5969
5989
|
title: e.title,
|
|
5970
5990
|
image: e.image,
|
|
5971
5991
|
responseBody: e.responseBody,
|
|
@@ -5979,17 +5999,17 @@ var oo = ce(void 0), so = ({ children: e, handlers: t }) => /* @__PURE__ */ B(oo
|
|
|
5979
5999
|
paddings: e.paddings,
|
|
5980
6000
|
isGenericTemplate: !0
|
|
5981
6001
|
}, r && { onClick: r }));
|
|
5982
|
-
},
|
|
6002
|
+
}, po = ({ isPressed: e, isHovered: t, backgroundColor: n, highlightColor: r, hoverColor: i }) => {
|
|
5983
6003
|
let a = U(n) || "transparent", o = U(r), s = U(i);
|
|
5984
6004
|
return e ? o || a : t && s || a;
|
|
5985
6005
|
};
|
|
5986
6006
|
//#endregion
|
|
5987
6007
|
//#region src/components/imageButton/index.tsx
|
|
5988
6008
|
R();
|
|
5989
|
-
var
|
|
5990
|
-
let { image: t, responseBody: n, paddings: r, backgroundColor: i, highlightColor: a, hoverColor: o, cornerRadius: s, onClick: c } = e, { perform: l } = vt(), [u, d] = N(!0), [f, p] = N(0), { failedAssets: h } = bt(), { isHovered: g, isPressed: _, interactionHandlers: v } =
|
|
6009
|
+
var mo = (e) => {
|
|
6010
|
+
let { image: t, responseBody: n, paddings: r, backgroundColor: i, highlightColor: a, hoverColor: o, cornerRadius: s, onClick: c } = e, { perform: l } = vt(), [u, d] = N(!0), [f, p] = N(0), { failedAssets: h } = bt(), { isHovered: g, isPressed: _, interactionHandlers: v } = vn(), y = Vt(t, h)[f];
|
|
5991
6011
|
if (!y) return null;
|
|
5992
|
-
let { imageId: b, imageURL: x, base64: S, contentMode: C = Et.ASPECT_FILL, cornerRadius: w, backgroundColor: T } = y, E =
|
|
6012
|
+
let { imageId: b, imageURL: x, base64: S, contentMode: C = Et.ASPECT_FILL, cornerRadius: w, backgroundColor: T } = y, E = po({
|
|
5993
6013
|
isPressed: _,
|
|
5994
6014
|
isHovered: g,
|
|
5995
6015
|
backgroundColor: i,
|
|
@@ -6002,7 +6022,7 @@ var fo = (e) => {
|
|
|
6002
6022
|
}, te = (e) => {
|
|
6003
6023
|
if (n) {
|
|
6004
6024
|
let e = JSON.parse(JSON.stringify(n));
|
|
6005
|
-
|
|
6025
|
+
rn(e), l(e, ut.DATA);
|
|
6006
6026
|
}
|
|
6007
6027
|
c && c(e);
|
|
6008
6028
|
}, k = {
|
|
@@ -6011,15 +6031,15 @@ var fo = (e) => {
|
|
|
6011
6031
|
}, A, ne = U(T) || "transparent";
|
|
6012
6032
|
return S && (A = /* @__PURE__ */ B("img", {
|
|
6013
6033
|
style: z(z({}, k), {}, {
|
|
6014
|
-
objectFit:
|
|
6034
|
+
objectFit: Ht(C),
|
|
6015
6035
|
borderRadius: w,
|
|
6016
6036
|
backgroundColor: ne,
|
|
6017
6037
|
display: "block"
|
|
6018
6038
|
}),
|
|
6019
6039
|
src: S,
|
|
6020
6040
|
onError: O
|
|
6021
|
-
})), b && (A = /* @__PURE__ */ B(
|
|
6022
|
-
type: b in
|
|
6041
|
+
})), b && (A = /* @__PURE__ */ B(qt, {
|
|
6042
|
+
type: b in Kt ? b : "default",
|
|
6023
6043
|
contentMode: C,
|
|
6024
6044
|
cornerRadius: w,
|
|
6025
6045
|
backgroundColor: ne,
|
|
@@ -6029,7 +6049,7 @@ var fo = (e) => {
|
|
|
6029
6049
|
borderRadius: w
|
|
6030
6050
|
}) }), /* @__PURE__ */ B("img", {
|
|
6031
6051
|
style: z(z({}, k), {}, {
|
|
6032
|
-
objectFit:
|
|
6052
|
+
objectFit: Ht(C),
|
|
6033
6053
|
borderRadius: w,
|
|
6034
6054
|
backgroundColor: ne,
|
|
6035
6055
|
display: D ? "none" : "block"
|
|
@@ -6051,14 +6071,14 @@ var fo = (e) => {
|
|
|
6051
6071
|
cursor: "pointer",
|
|
6052
6072
|
backgroundColor: E,
|
|
6053
6073
|
borderRadius: s
|
|
6054
|
-
},
|
|
6074
|
+
}, zt(r))
|
|
6055
6075
|
}, v), {}, {
|
|
6056
6076
|
onClick: te,
|
|
6057
6077
|
children: A
|
|
6058
6078
|
}));
|
|
6059
|
-
},
|
|
6060
|
-
let t =
|
|
6061
|
-
return e.type === "FORM" && e.actionId && n && n[e.actionId] && (r = n[e.actionId]), /* @__PURE__ */ B(
|
|
6079
|
+
}, ho = (e) => {
|
|
6080
|
+
let t = uo(), n = t == null ? void 0 : t.handlers, r;
|
|
6081
|
+
return e.type === "FORM" && e.actionId && n && n[e.actionId] && (r = n[e.actionId]), /* @__PURE__ */ B(mo, z({
|
|
6062
6082
|
image: {
|
|
6063
6083
|
imageId: e.image.imageId,
|
|
6064
6084
|
imageURL: e.image.imageURL,
|
|
@@ -6078,18 +6098,18 @@ var fo = (e) => {
|
|
|
6078
6098
|
highlightColor: e.highlightColor,
|
|
6079
6099
|
hoverColor: e.hoverColor
|
|
6080
6100
|
}, r && { onClick: r }));
|
|
6081
|
-
},
|
|
6082
|
-
[
|
|
6083
|
-
[Mt.CENTER]: "center",
|
|
6084
|
-
[Mt.BOTTOM]: "flex-end"
|
|
6085
|
-
}, ho = mo[Mt.TOP], go = mo[Mt.TOP], _o = (e) => ({
|
|
6086
|
-
[Nt.START]: "flex-start",
|
|
6087
|
-
[Nt.LEFT]: e === dt.RTL ? "flex-end" : "flex-start",
|
|
6101
|
+
}, go = {
|
|
6102
|
+
[Nt.TOP]: "flex-start",
|
|
6088
6103
|
[Nt.CENTER]: "center",
|
|
6089
|
-
[Nt.
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6104
|
+
[Nt.BOTTOM]: "flex-end"
|
|
6105
|
+
}, _o = go[Nt.TOP], vo = go[Nt.TOP], yo = (e) => ({
|
|
6106
|
+
[Pt.START]: "flex-start",
|
|
6107
|
+
[Pt.LEFT]: e === dt.RTL ? "flex-end" : "flex-start",
|
|
6108
|
+
[Pt.CENTER]: "center",
|
|
6109
|
+
[Pt.RIGHT]: e === dt.RTL ? "flex-start" : "flex-end",
|
|
6110
|
+
[Pt.END]: "flex-end"
|
|
6111
|
+
}), bo = ({ elements: e, verticalAlignment: t, horizontalAlignment: n, backgroundColor: r, cornerRadius: i, paddings: a }) => {
|
|
6112
|
+
let { layoutDirection: o } = xt(), s = yo(o), c = s[Pt.START];
|
|
6093
6113
|
return /* @__PURE__ */ B("div", {
|
|
6094
6114
|
"data-ui": "gui-row",
|
|
6095
6115
|
part: "gui-row",
|
|
@@ -6097,22 +6117,22 @@ var fo = (e) => {
|
|
|
6097
6117
|
width: "100%",
|
|
6098
6118
|
display: "flex",
|
|
6099
6119
|
flexDirection: "row",
|
|
6100
|
-
alignItems: t &&
|
|
6120
|
+
alignItems: t && go[t] || vo,
|
|
6101
6121
|
justifyContent: n && s[n] || c,
|
|
6102
6122
|
backgroundColor: U(r) || "transparent",
|
|
6103
6123
|
borderRadius: i
|
|
6104
|
-
},
|
|
6124
|
+
}, zt(a)),
|
|
6105
6125
|
children: e == null ? void 0 : e.map((e) => {
|
|
6106
|
-
let t = e.type ===
|
|
6126
|
+
let t = e.type === Mt.IMAGE, n = e.type === Mt.IMAGE_BUTTON, r = e.type === Mt.SPACER, i = e.type === Mt.PROGRESS_VIEW, a = (t || n || r) && e.content.width || i;
|
|
6107
6127
|
return /* @__PURE__ */ B("div", {
|
|
6108
6128
|
"data-ui": "gui-row-item",
|
|
6109
6129
|
part: "gui-row-item",
|
|
6110
6130
|
style: z(z(z(z(z({ flex: a ? "0 0 auto" : `${e.content.weight || 1} 1 0` }, a && !i && { width: e.content.width }), i && { width: e.content.width || e.content.height || 60 }), r && e.content.height && { height: e.content.height }), (t || n) && { height: e.content.height || 120 }), i && { height: e.content.height || e.content.width || 60 }),
|
|
6111
|
-
children:
|
|
6131
|
+
children: Co(e)
|
|
6112
6132
|
});
|
|
6113
6133
|
})
|
|
6114
6134
|
});
|
|
6115
|
-
},
|
|
6135
|
+
}, xo = ({ backgroundColor: e, cornerRadius: t }) => /* @__PURE__ */ B("div", {
|
|
6116
6136
|
"data-ui": "gui-spacer",
|
|
6117
6137
|
part: "gui-spacer",
|
|
6118
6138
|
style: {
|
|
@@ -6121,8 +6141,8 @@ var fo = (e) => {
|
|
|
6121
6141
|
backgroundColor: U(e) || "transparent",
|
|
6122
6142
|
borderRadius: t
|
|
6123
6143
|
}
|
|
6124
|
-
}),
|
|
6125
|
-
[
|
|
6144
|
+
}), So = {
|
|
6145
|
+
[Mt.LABEL]: (e) => /* @__PURE__ */ B(G, {
|
|
6126
6146
|
text: e.content.text,
|
|
6127
6147
|
fontName: e.content.fontName,
|
|
6128
6148
|
fontSize: e.content.fontSize,
|
|
@@ -6134,7 +6154,7 @@ var fo = (e) => {
|
|
|
6134
6154
|
fontWeight: e.content.fontWeight,
|
|
6135
6155
|
isGenericTemplate: !0
|
|
6136
6156
|
}),
|
|
6137
|
-
[
|
|
6157
|
+
[Mt.IMAGE]: (e) => /* @__PURE__ */ B(W, {
|
|
6138
6158
|
imageId: e.content.imageId,
|
|
6139
6159
|
imageURL: e.content.imageURL,
|
|
6140
6160
|
base64: e.content.base64,
|
|
@@ -6147,7 +6167,7 @@ var fo = (e) => {
|
|
|
6147
6167
|
timeout: e.content.timeout,
|
|
6148
6168
|
placeholderImage: e.content.placeholderImage
|
|
6149
6169
|
}),
|
|
6150
|
-
[
|
|
6170
|
+
[Mt.IMAGE_BUTTON]: (e) => /* @__PURE__ */ B(ho, {
|
|
6151
6171
|
type: e.content.type,
|
|
6152
6172
|
actionId: e.content.actionId,
|
|
6153
6173
|
image: {
|
|
@@ -6169,7 +6189,7 @@ var fo = (e) => {
|
|
|
6169
6189
|
hoverColor: e.content.hoverColor,
|
|
6170
6190
|
paddings: e.content.paddings
|
|
6171
6191
|
}),
|
|
6172
|
-
[
|
|
6192
|
+
[Mt.BUTTON]: (e) => /* @__PURE__ */ B(fo, {
|
|
6173
6193
|
actionId: e.content.actionId,
|
|
6174
6194
|
title: e.content.title,
|
|
6175
6195
|
image: e.content.image,
|
|
@@ -6183,14 +6203,14 @@ var fo = (e) => {
|
|
|
6183
6203
|
hoverColor: e.content.hoverColor,
|
|
6184
6204
|
paddings: e.content.paddings
|
|
6185
6205
|
}),
|
|
6186
|
-
[
|
|
6206
|
+
[Mt.COLUMN]: (e) => /* @__PURE__ */ B(wo, {
|
|
6187
6207
|
elements: e.content.elements,
|
|
6188
6208
|
horizontalAlignment: e.content.horizontalAlignment,
|
|
6189
6209
|
cornerRadius: e.content.cornerRadius,
|
|
6190
6210
|
backgroundColor: e.content.backgroundColor,
|
|
6191
6211
|
paddings: e.content.paddings
|
|
6192
6212
|
}),
|
|
6193
|
-
[
|
|
6213
|
+
[Mt.ROW]: (e) => /* @__PURE__ */ B(bo, {
|
|
6194
6214
|
elements: e.content.elements,
|
|
6195
6215
|
horizontalAlignment: e.content.horizontalAlignment,
|
|
6196
6216
|
verticalAlignment: e.content.verticalAlignment,
|
|
@@ -6198,23 +6218,23 @@ var fo = (e) => {
|
|
|
6198
6218
|
backgroundColor: e.content.backgroundColor,
|
|
6199
6219
|
paddings: e.content.paddings
|
|
6200
6220
|
}),
|
|
6201
|
-
[
|
|
6221
|
+
[Mt.SPACER]: (e) => /* @__PURE__ */ B(xo, {
|
|
6202
6222
|
backgroundColor: e.content.backgroundColor,
|
|
6203
6223
|
cornerRadius: e.content.cornerRadius
|
|
6204
6224
|
}),
|
|
6205
|
-
[
|
|
6225
|
+
[Mt.PROGRESS_VIEW]: (e) => /* @__PURE__ */ B(kn, {
|
|
6206
6226
|
isFullSize: !0,
|
|
6207
6227
|
indicatorColor: e.content.indicatorColor
|
|
6208
6228
|
})
|
|
6209
6229
|
};
|
|
6210
|
-
function
|
|
6211
|
-
let t =
|
|
6230
|
+
function Co(e) {
|
|
6231
|
+
let t = So[e.type];
|
|
6212
6232
|
return t ? t(e) : null;
|
|
6213
6233
|
}
|
|
6214
6234
|
//#endregion
|
|
6215
6235
|
//#region src/screens/generic/components/column/index.tsx
|
|
6216
|
-
var
|
|
6217
|
-
let { layoutDirection: a } = xt(), o =
|
|
6236
|
+
var wo = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadius: r, paddings: i }) => {
|
|
6237
|
+
let { layoutDirection: a } = xt(), o = yo(a), s = o[Pt.START];
|
|
6218
6238
|
return /* @__PURE__ */ B("div", {
|
|
6219
6239
|
"data-ui": "gui-column",
|
|
6220
6240
|
part: "gui-column",
|
|
@@ -6224,18 +6244,18 @@ var So = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadiu
|
|
|
6224
6244
|
alignItems: t && o[t] || s,
|
|
6225
6245
|
backgroundColor: U(n) || "transparent",
|
|
6226
6246
|
borderRadius: r
|
|
6227
|
-
},
|
|
6247
|
+
}, zt(i)),
|
|
6228
6248
|
children: e == null ? void 0 : e.map((e) => {
|
|
6229
|
-
let t = e.type ===
|
|
6249
|
+
let t = e.type === Mt.IMAGE, n = e.type === Mt.IMAGE_BUTTON, r = e.type === Mt.SPACER, i = e.type === Mt.PROGRESS_VIEW, a = (t || n || r) && e.content.width || i;
|
|
6230
6250
|
return /* @__PURE__ */ B("div", {
|
|
6231
6251
|
"data-ui": "gui-column-item",
|
|
6232
6252
|
part: "gui-column-item",
|
|
6233
6253
|
style: z(z(z(z(z(z({}, !a && { alignSelf: "stretch" }), a && !i && { width: e.content.width }), i && { width: e.content.width || e.content.height || 60 }), r && e.content.height && { height: e.content.height }), (t || n) && { height: e.content.height || 120 }), i && { height: e.content.height || e.content.width || 60 }),
|
|
6234
|
-
children:
|
|
6254
|
+
children: Co(e)
|
|
6235
6255
|
});
|
|
6236
6256
|
})
|
|
6237
6257
|
});
|
|
6238
|
-
},
|
|
6258
|
+
}, To = ({ topColumn: e, mainColumn: t, bottomColumn: n, backgroundColor: r = "#ffffff00", backgroundImage: i, cornerRadius: a, isInModal: o = !1 }) => {
|
|
6239
6259
|
let { failedAssets: s } = bt();
|
|
6240
6260
|
return /* @__PURE__ */ B("div", {
|
|
6241
6261
|
"data-ui": "gui-scaffold-container",
|
|
@@ -6248,13 +6268,13 @@ var So = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadiu
|
|
|
6248
6268
|
}, o && { minHeight: 0 }), {}, {
|
|
6249
6269
|
backgroundColor: U(r) || "transparent",
|
|
6250
6270
|
borderRadius: a
|
|
6251
|
-
},
|
|
6271
|
+
}, Wt(i, s)),
|
|
6252
6272
|
children: [
|
|
6253
6273
|
e && /* @__PURE__ */ B("div", {
|
|
6254
6274
|
"data-ui": "gui-top-column",
|
|
6255
6275
|
part: "gui-top-column",
|
|
6256
6276
|
style: { flex: "0 0 auto" },
|
|
6257
|
-
children: /* @__PURE__ */ B(
|
|
6277
|
+
children: /* @__PURE__ */ B(wo, z({}, e))
|
|
6258
6278
|
}),
|
|
6259
6279
|
t && /* @__PURE__ */ B("div", {
|
|
6260
6280
|
"data-ui": "gui-main-column-container",
|
|
@@ -6273,24 +6293,24 @@ var So = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadiu
|
|
|
6273
6293
|
display: "flex",
|
|
6274
6294
|
flexDirection: "column",
|
|
6275
6295
|
minHeight: "100%",
|
|
6276
|
-
justifyContent: t.verticalAlignment &&
|
|
6296
|
+
justifyContent: t.verticalAlignment && go[t.verticalAlignment] || _o
|
|
6277
6297
|
},
|
|
6278
|
-
children: /* @__PURE__ */ B(
|
|
6298
|
+
children: /* @__PURE__ */ B(wo, z(z({}, t), {}, { backgroundColor: "transparent" }))
|
|
6279
6299
|
})
|
|
6280
6300
|
}),
|
|
6281
6301
|
n && /* @__PURE__ */ B("div", {
|
|
6282
6302
|
"data-ui": "gui-bottom-column",
|
|
6283
6303
|
part: "gui-bottom-column",
|
|
6284
6304
|
style: { flex: "0 0 auto" },
|
|
6285
|
-
children: /* @__PURE__ */ B(
|
|
6305
|
+
children: /* @__PURE__ */ B(wo, z({}, n))
|
|
6286
6306
|
})
|
|
6287
6307
|
]
|
|
6288
6308
|
});
|
|
6289
|
-
},
|
|
6309
|
+
}, Eo = ({ rootElement: e }) => {
|
|
6290
6310
|
let { type: t, content: n } = e;
|
|
6291
|
-
if (t ===
|
|
6311
|
+
if (t === jt.SCAFFOLD) {
|
|
6292
6312
|
let { topColumn: e, mainColumn: t, bottomColumn: r, backgroundColor: i, backgroundImage: a, cornerRadius: o } = n;
|
|
6293
|
-
return /* @__PURE__ */ B(
|
|
6313
|
+
return /* @__PURE__ */ B(To, {
|
|
6294
6314
|
topColumn: e,
|
|
6295
6315
|
mainColumn: t,
|
|
6296
6316
|
bottomColumn: r,
|
|
@@ -6300,7 +6320,7 @@ var So = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadiu
|
|
|
6300
6320
|
});
|
|
6301
6321
|
}
|
|
6302
6322
|
return null;
|
|
6303
|
-
},
|
|
6323
|
+
}, Do = ({ width: e = 400, shouldCloseOnClickOutside: t = !1, close: n, children: r }) => /* @__PURE__ */ B("div", {
|
|
6304
6324
|
style: {
|
|
6305
6325
|
position: "absolute",
|
|
6306
6326
|
width: "100%",
|
|
@@ -6333,35 +6353,36 @@ var So = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadiu
|
|
|
6333
6353
|
},
|
|
6334
6354
|
children: r
|
|
6335
6355
|
})
|
|
6336
|
-
}),
|
|
6337
|
-
let r = e == null ? void 0 : e.find((e) => e.reason ===
|
|
6356
|
+
}), Oo = ({ popups: e, rootElement: t, settings: n }) => {
|
|
6357
|
+
let r = e == null ? void 0 : e.find((e) => e.reason === $t.SYSTEM_RESTRICTED), { isPopupOpen: i, handleAllowButtonClick: a, closePopup: o } = Ya({
|
|
6338
6358
|
askEveryTime: n == null ? void 0 : n.askEveryTime,
|
|
6339
|
-
getLocationTimeout: n == null ? void 0 : n.getLocationTimeout
|
|
6359
|
+
getLocationTimeout: n == null ? void 0 : n.getLocationTimeout,
|
|
6360
|
+
locationAccuracy: n == null ? void 0 : n.locationAccuracy
|
|
6340
6361
|
}), s = {
|
|
6341
6362
|
ALLOW_LOCATION: a,
|
|
6342
6363
|
HIDE_POPUP: o
|
|
6343
6364
|
}, { type: c, content: l } = t;
|
|
6344
|
-
if (c !==
|
|
6365
|
+
if (c !== jt.SCAFFOLD) return null;
|
|
6345
6366
|
let { topColumn: u, mainColumn: d, bottomColumn: f, backgroundColor: p, cornerRadius: m, backgroundImage: h } = l;
|
|
6346
6367
|
return /* @__PURE__ */ B("div", {
|
|
6347
6368
|
style: {
|
|
6348
6369
|
position: "relative",
|
|
6349
6370
|
height: "100%"
|
|
6350
6371
|
},
|
|
6351
|
-
children: /* @__PURE__ */ B(
|
|
6372
|
+
children: /* @__PURE__ */ B(lo, {
|
|
6352
6373
|
handlers: s,
|
|
6353
|
-
children: [/* @__PURE__ */ B(
|
|
6374
|
+
children: [/* @__PURE__ */ B(To, {
|
|
6354
6375
|
topColumn: u,
|
|
6355
6376
|
mainColumn: d,
|
|
6356
6377
|
bottomColumn: f,
|
|
6357
6378
|
backgroundColor: p,
|
|
6358
6379
|
cornerRadius: m,
|
|
6359
6380
|
backgroundImage: h
|
|
6360
|
-
}), r && i && /* @__PURE__ */ B(
|
|
6381
|
+
}), r && i && /* @__PURE__ */ B(Do, {
|
|
6361
6382
|
width: 400,
|
|
6362
6383
|
close: o,
|
|
6363
6384
|
shouldCloseOnClickOutside: !0,
|
|
6364
|
-
children: /* @__PURE__ */ B(
|
|
6385
|
+
children: /* @__PURE__ */ B(To, {
|
|
6365
6386
|
isInModal: !0,
|
|
6366
6387
|
topColumn: r.rootElement.content.topColumn,
|
|
6367
6388
|
mainColumn: r.rootElement.content.mainColumn,
|
|
@@ -6373,11 +6394,11 @@ var So = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadiu
|
|
|
6373
6394
|
})]
|
|
6374
6395
|
})
|
|
6375
6396
|
});
|
|
6376
|
-
},
|
|
6397
|
+
}, ko = ({ rootElement: e }) => {
|
|
6377
6398
|
let { type: t, content: n } = e;
|
|
6378
|
-
if (t ===
|
|
6399
|
+
if (t === jt.SCAFFOLD) {
|
|
6379
6400
|
let { topColumn: e, mainColumn: t, bottomColumn: r, backgroundColor: i, cornerRadius: a, backgroundImage: o } = n;
|
|
6380
|
-
return /* @__PURE__ */ B(
|
|
6401
|
+
return /* @__PURE__ */ B(To, {
|
|
6381
6402
|
topColumn: e,
|
|
6382
6403
|
mainColumn: t,
|
|
6383
6404
|
bottomColumn: r,
|
|
@@ -6390,22 +6411,22 @@ var So = ({ elements: e, horizontalAlignment: t, backgroundColor: n, cornerRadiu
|
|
|
6390
6411
|
};
|
|
6391
6412
|
//#endregion
|
|
6392
6413
|
//#region ../../node_modules/qrcode.react/lib/esm/index.js
|
|
6393
|
-
|
|
6394
|
-
var
|
|
6414
|
+
Fr();
|
|
6415
|
+
var Ao = Object.defineProperty, jo = Object.getOwnPropertySymbols, Mo = Object.prototype.hasOwnProperty, No = Object.prototype.propertyIsEnumerable, Po = (e, t, n) => t in e ? Ao(e, t, {
|
|
6395
6416
|
enumerable: !0,
|
|
6396
6417
|
configurable: !0,
|
|
6397
6418
|
writable: !0,
|
|
6398
6419
|
value: n
|
|
6399
|
-
}) : e[t] = n,
|
|
6400
|
-
for (var n in t || (t = {}))
|
|
6401
|
-
if (
|
|
6420
|
+
}) : e[t] = n, Fo = (e, t) => {
|
|
6421
|
+
for (var n in t || (t = {})) Mo.call(t, n) && Po(e, n, t[n]);
|
|
6422
|
+
if (jo) for (var n of jo(t)) No.call(t, n) && Po(e, n, t[n]);
|
|
6402
6423
|
return e;
|
|
6403
|
-
},
|
|
6424
|
+
}, Io = (e, t) => {
|
|
6404
6425
|
var n = {};
|
|
6405
|
-
for (var r in e)
|
|
6406
|
-
if (e != null &&
|
|
6426
|
+
for (var r in e) Mo.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
6427
|
+
if (e != null && jo) for (var r of jo(e)) t.indexOf(r) < 0 && No.call(e, r) && (n[r] = e[r]);
|
|
6407
6428
|
return n;
|
|
6408
|
-
},
|
|
6429
|
+
}, Lo;
|
|
6409
6430
|
((e) => {
|
|
6410
6431
|
let t = class t {
|
|
6411
6432
|
constructor(e, n, r, a) {
|
|
@@ -7095,7 +7116,7 @@ var Oo = Object.defineProperty, ko = Object.getOwnPropertySymbols, Ao = Object.p
|
|
|
7095
7116
|
a.NUMERIC_REGEX = /^[0-9]*$/, a.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, a.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
|
|
7096
7117
|
let o = a;
|
|
7097
7118
|
e.QrSegment = a;
|
|
7098
|
-
})(
|
|
7119
|
+
})(Lo || (Lo = {})), ((e) => {
|
|
7099
7120
|
((e) => {
|
|
7100
7121
|
let t = class {
|
|
7101
7122
|
constructor(e, t) {
|
|
@@ -7104,7 +7125,7 @@ var Oo = Object.defineProperty, ko = Object.getOwnPropertySymbols, Ao = Object.p
|
|
|
7104
7125
|
};
|
|
7105
7126
|
t.LOW = new t(0, 1), t.MEDIUM = new t(1, 0), t.QUARTILE = new t(2, 3), t.HIGH = new t(3, 2), e.Ecc = t;
|
|
7106
7127
|
})(e.QrCode || (e.QrCode = {}));
|
|
7107
|
-
})(
|
|
7128
|
+
})(Lo || (Lo = {})), ((e) => {
|
|
7108
7129
|
((e) => {
|
|
7109
7130
|
let t = class {
|
|
7110
7131
|
constructor(e, t) {
|
|
@@ -7136,14 +7157,14 @@ var Oo = Object.defineProperty, ko = Object.getOwnPropertySymbols, Ao = Object.p
|
|
|
7136
7157
|
0
|
|
7137
7158
|
]), e.Mode = t;
|
|
7138
7159
|
})(e.QrSegment || (e.QrSegment = {}));
|
|
7139
|
-
})(
|
|
7140
|
-
var
|
|
7141
|
-
L:
|
|
7142
|
-
M:
|
|
7143
|
-
Q:
|
|
7144
|
-
H:
|
|
7145
|
-
},
|
|
7146
|
-
function
|
|
7160
|
+
})(Lo || (Lo = {}));
|
|
7161
|
+
var Ro = Lo, zo = {
|
|
7162
|
+
L: Ro.QrCode.Ecc.LOW,
|
|
7163
|
+
M: Ro.QrCode.Ecc.MEDIUM,
|
|
7164
|
+
Q: Ro.QrCode.Ecc.QUARTILE,
|
|
7165
|
+
H: Ro.QrCode.Ecc.HIGH
|
|
7166
|
+
}, Bo = 128, Vo = "L", Ho = "#FFFFFF", Uo = "#000000", Wo = !1, Go = 1, Ko = 4, qo = 0, Jo = .1;
|
|
7167
|
+
function Yo(e, t = 0) {
|
|
7147
7168
|
let n = [];
|
|
7148
7169
|
return e.forEach(function(e, r) {
|
|
7149
7170
|
let i = null;
|
|
@@ -7161,12 +7182,12 @@ function qo(e, t = 0) {
|
|
|
7161
7182
|
});
|
|
7162
7183
|
}), n.join("");
|
|
7163
7184
|
}
|
|
7164
|
-
function
|
|
7185
|
+
function Xo(e, t) {
|
|
7165
7186
|
return e.slice().map((e, n) => n < t.y || n >= t.y + t.h ? e : e.map((e, n) => n < t.x || n >= t.x + t.w ? e : !1));
|
|
7166
7187
|
}
|
|
7167
|
-
function
|
|
7188
|
+
function Zo(e, t, n, r) {
|
|
7168
7189
|
if (r == null) return null;
|
|
7169
|
-
let i = e.length + n * 2, a = Math.floor(t *
|
|
7190
|
+
let i = e.length + n * 2, a = Math.floor(t * Jo), o = i / t, s = (r.width || a) * o, c = (r.height || a) * o, l = r.x == null ? e.length / 2 - s / 2 : r.x * o, u = r.y == null ? e.length / 2 - c / 2 : r.y * o, d = r.opacity == null ? 1 : r.opacity, f = null;
|
|
7170
7191
|
if (r.excavate) {
|
|
7171
7192
|
let e = Math.floor(l), t = Math.floor(u);
|
|
7172
7193
|
f = {
|
|
@@ -7187,25 +7208,25 @@ function Yo(e, t, n, r) {
|
|
|
7187
7208
|
crossOrigin: p
|
|
7188
7209
|
};
|
|
7189
7210
|
}
|
|
7190
|
-
function
|
|
7191
|
-
return t == null ? e ?
|
|
7211
|
+
function Qo(e, t) {
|
|
7212
|
+
return t == null ? e ? Ko : qo : Math.max(Math.floor(t), 0);
|
|
7192
7213
|
}
|
|
7193
|
-
function
|
|
7214
|
+
function $o({ value: e, level: t, minVersion: n, includeMargin: r, marginSize: i, imageSettings: a, size: o, boostLevel: s }) {
|
|
7194
7215
|
let c = K.useMemo(() => {
|
|
7195
|
-
let r = (Array.isArray(e) ? e : [e]).reduce((e, t) => (e.push(...
|
|
7196
|
-
return
|
|
7216
|
+
let r = (Array.isArray(e) ? e : [e]).reduce((e, t) => (e.push(...Ro.QrSegment.makeSegments(t)), e), []);
|
|
7217
|
+
return Ro.QrCode.encodeSegments(r, zo[t], n, void 0, void 0, s);
|
|
7197
7218
|
}, [
|
|
7198
7219
|
e,
|
|
7199
7220
|
t,
|
|
7200
7221
|
n,
|
|
7201
7222
|
s
|
|
7202
7223
|
]), { cells: l, margin: u, numCells: d, calculatedImageSettings: f } = K.useMemo(() => {
|
|
7203
|
-
let e = c.getModules(), t =
|
|
7224
|
+
let e = c.getModules(), t = Qo(r, i);
|
|
7204
7225
|
return {
|
|
7205
7226
|
cells: e,
|
|
7206
7227
|
margin: t,
|
|
7207
7228
|
numCells: e.length + t * 2,
|
|
7208
|
-
calculatedImageSettings:
|
|
7229
|
+
calculatedImageSettings: Zo(e, o, t, a)
|
|
7209
7230
|
};
|
|
7210
7231
|
}, [
|
|
7211
7232
|
c,
|
|
@@ -7222,15 +7243,15 @@ function Zo({ value: e, level: t, minVersion: n, includeMargin: r, marginSize: i
|
|
|
7222
7243
|
calculatedImageSettings: f
|
|
7223
7244
|
};
|
|
7224
7245
|
}
|
|
7225
|
-
var
|
|
7246
|
+
var es = function() {
|
|
7226
7247
|
try {
|
|
7227
7248
|
new Path2D().addPath(new Path2D());
|
|
7228
7249
|
} catch (e) {
|
|
7229
7250
|
return !1;
|
|
7230
7251
|
}
|
|
7231
7252
|
return !0;
|
|
7232
|
-
}(),
|
|
7233
|
-
let n = e, { value: r, size: i =
|
|
7253
|
+
}(), ts = K.forwardRef(function(e, t) {
|
|
7254
|
+
let n = e, { value: r, size: i = Bo, level: a = Vo, bgColor: o = Ho, fgColor: s = Uo, includeMargin: c = Wo, minVersion: l = Go, boostLevel: u, marginSize: d, imageSettings: f } = n, p = Io(n, [
|
|
7234
7255
|
"value",
|
|
7235
7256
|
"size",
|
|
7236
7257
|
"level",
|
|
@@ -7241,9 +7262,9 @@ var Qo = function() {
|
|
|
7241
7262
|
"boostLevel",
|
|
7242
7263
|
"marginSize",
|
|
7243
7264
|
"imageSettings"
|
|
7244
|
-
]), { style: m } = p, h =
|
|
7265
|
+
]), { style: m } = p, h = Io(p, ["style"]), g = f == null ? void 0 : f.src, _ = K.useRef(null), v = K.useRef(null), y = K.useCallback((e) => {
|
|
7245
7266
|
_.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
|
|
7246
|
-
}, [t]), [b, x] = K.useState(!1), { margin: S, cells: C, numCells: w, calculatedImageSettings: T } =
|
|
7267
|
+
}, [t]), [b, x] = K.useState(!1), { margin: S, cells: C, numCells: w, calculatedImageSettings: T } = $o({
|
|
7247
7268
|
value: r,
|
|
7248
7269
|
level: a,
|
|
7249
7270
|
minVersion: l,
|
|
@@ -7258,11 +7279,11 @@ var Qo = function() {
|
|
|
7258
7279
|
let e = _.current, t = e.getContext("2d");
|
|
7259
7280
|
if (!t) return;
|
|
7260
7281
|
let n = C, r = v.current, a = T != null && r !== null && r.complete && r.naturalHeight !== 0 && r.naturalWidth !== 0;
|
|
7261
|
-
a && T.excavation != null && (n =
|
|
7282
|
+
a && T.excavation != null && (n = Xo(C, T.excavation));
|
|
7262
7283
|
let c = window.devicePixelRatio || 1;
|
|
7263
7284
|
e.height = e.width = i * c;
|
|
7264
7285
|
let l = i / w * c;
|
|
7265
|
-
t.scale(l, l), t.fillStyle = o, t.fillRect(0, 0, w, w), t.fillStyle = s,
|
|
7286
|
+
t.scale(l, l), t.fillStyle = o, t.fillRect(0, 0, w, w), t.fillStyle = s, es ? t.fill(new Path2D(Yo(n, S))) : C.forEach(function(e, n) {
|
|
7266
7287
|
e.forEach(function(e, r) {
|
|
7267
7288
|
e && t.fillRect(r + S, n + S, 1, 1);
|
|
7268
7289
|
});
|
|
@@ -7271,7 +7292,7 @@ var Qo = function() {
|
|
|
7271
7292
|
}), K.useEffect(() => {
|
|
7272
7293
|
x(!1);
|
|
7273
7294
|
}, [g]);
|
|
7274
|
-
let E =
|
|
7295
|
+
let E = Fo({
|
|
7275
7296
|
height: i,
|
|
7276
7297
|
width: i
|
|
7277
7298
|
}, m), D = null;
|
|
@@ -7284,7 +7305,7 @@ var Qo = function() {
|
|
|
7284
7305
|
},
|
|
7285
7306
|
ref: v,
|
|
7286
7307
|
crossOrigin: T == null ? void 0 : T.crossOrigin
|
|
7287
|
-
})), /* @__PURE__ */ K.createElement(K.Fragment, null, /* @__PURE__ */ K.createElement("canvas",
|
|
7308
|
+
})), /* @__PURE__ */ K.createElement(K.Fragment, null, /* @__PURE__ */ K.createElement("canvas", Fo({
|
|
7288
7309
|
style: E,
|
|
7289
7310
|
height: i,
|
|
7290
7311
|
width: i,
|
|
@@ -7292,9 +7313,9 @@ var Qo = function() {
|
|
|
7292
7313
|
role: "img"
|
|
7293
7314
|
}, h)), D);
|
|
7294
7315
|
});
|
|
7295
|
-
|
|
7296
|
-
var
|
|
7297
|
-
let n = e, { value: r, size: i =
|
|
7316
|
+
ts.displayName = "QRCodeCanvas";
|
|
7317
|
+
var ns = K.forwardRef(function(e, t) {
|
|
7318
|
+
let n = e, { value: r, size: i = Bo, level: a = Vo, bgColor: o = Ho, fgColor: s = Uo, includeMargin: c = Wo, minVersion: l = Go, boostLevel: u, title: d, marginSize: f, imageSettings: p } = n, m = Io(n, [
|
|
7298
7319
|
"value",
|
|
7299
7320
|
"size",
|
|
7300
7321
|
"level",
|
|
@@ -7306,7 +7327,7 @@ var es = K.forwardRef(function(e, t) {
|
|
|
7306
7327
|
"title",
|
|
7307
7328
|
"marginSize",
|
|
7308
7329
|
"imageSettings"
|
|
7309
|
-
]), { margin: h, cells: g, numCells: _, calculatedImageSettings: v } =
|
|
7330
|
+
]), { margin: h, cells: g, numCells: _, calculatedImageSettings: v } = $o({
|
|
7310
7331
|
value: r,
|
|
7311
7332
|
level: a,
|
|
7312
7333
|
minVersion: l,
|
|
@@ -7316,7 +7337,7 @@ var es = K.forwardRef(function(e, t) {
|
|
|
7316
7337
|
imageSettings: p,
|
|
7317
7338
|
size: i
|
|
7318
7339
|
}), y = g, b = null;
|
|
7319
|
-
p != null && v != null && (v.excavation != null && (y =
|
|
7340
|
+
p != null && v != null && (v.excavation != null && (y = Xo(g, v.excavation)), b = /* @__PURE__ */ K.createElement("image", {
|
|
7320
7341
|
href: p.src,
|
|
7321
7342
|
height: v.h,
|
|
7322
7343
|
width: v.w,
|
|
@@ -7326,8 +7347,8 @@ var es = K.forwardRef(function(e, t) {
|
|
|
7326
7347
|
opacity: v.opacity,
|
|
7327
7348
|
crossOrigin: v.crossOrigin
|
|
7328
7349
|
}));
|
|
7329
|
-
let x =
|
|
7330
|
-
return /* @__PURE__ */ K.createElement("svg",
|
|
7350
|
+
let x = Yo(y, h);
|
|
7351
|
+
return /* @__PURE__ */ K.createElement("svg", Fo({
|
|
7331
7352
|
height: i,
|
|
7332
7353
|
width: i,
|
|
7333
7354
|
viewBox: `0 0 ${_} ${_}`,
|
|
@@ -7343,10 +7364,10 @@ var es = K.forwardRef(function(e, t) {
|
|
|
7343
7364
|
shapeRendering: "crispEdges"
|
|
7344
7365
|
}), b);
|
|
7345
7366
|
});
|
|
7346
|
-
|
|
7367
|
+
ns.displayName = "QRCodeSVG";
|
|
7347
7368
|
//#endregion
|
|
7348
7369
|
//#region src/screens/device-transfer/styles.ts
|
|
7349
|
-
var
|
|
7370
|
+
var rs = {
|
|
7350
7371
|
width: "100%",
|
|
7351
7372
|
height: "auto",
|
|
7352
7373
|
display: "flex",
|
|
@@ -7354,7 +7375,7 @@ var ts = {
|
|
|
7354
7375
|
justifyContent: "center",
|
|
7355
7376
|
alignItems: "center",
|
|
7356
7377
|
marginBottom: "40px"
|
|
7357
|
-
},
|
|
7378
|
+
}, is = {
|
|
7358
7379
|
position: "relative",
|
|
7359
7380
|
display: "flex",
|
|
7360
7381
|
flexDirection: "column",
|
|
@@ -7365,18 +7386,18 @@ var ts = {
|
|
|
7365
7386
|
width: "100%",
|
|
7366
7387
|
minHeight: "100%",
|
|
7367
7388
|
overflow: "auto"
|
|
7368
|
-
},
|
|
7389
|
+
}, as = {
|
|
7369
7390
|
marginBottom: 20,
|
|
7370
7391
|
lineHeight: "140%"
|
|
7371
|
-
},
|
|
7392
|
+
}, os = {
|
|
7372
7393
|
fontWeight: "400",
|
|
7373
7394
|
lineHeight: "140%"
|
|
7374
|
-
},
|
|
7395
|
+
}, ss = ({ header: e, footer: t, buttons: n, title: r, description: i, qr: a, url: o, backgroundColor: s, backgroundImage: c }) => {
|
|
7375
7396
|
let { perform: l } = vt();
|
|
7376
|
-
return !o && typeof o != "string" ? (l(new
|
|
7377
|
-
errorCode:
|
|
7397
|
+
return !o && typeof o != "string" ? (l(new Na({
|
|
7398
|
+
errorCode: Xt.DECODING_FAILED,
|
|
7378
7399
|
message: "No QR URL in the client config"
|
|
7379
|
-
})), null) : /* @__PURE__ */ B(
|
|
7400
|
+
})), null) : /* @__PURE__ */ B(Cn, {
|
|
7380
7401
|
header: e,
|
|
7381
7402
|
footer: t,
|
|
7382
7403
|
buttons: n,
|
|
@@ -7386,88 +7407,88 @@ var ts = {
|
|
|
7386
7407
|
part: "gui-device-transfer-screen-container",
|
|
7387
7408
|
"data-ui": "gui-device-transfer-screen-container",
|
|
7388
7409
|
id: "device-transfer-screen-container",
|
|
7389
|
-
style: z(z({},
|
|
7410
|
+
style: z(z({}, is), {}, { justifyContent: "flex-start" }),
|
|
7390
7411
|
children: [
|
|
7391
7412
|
/* @__PURE__ */ B("div", {
|
|
7392
7413
|
part: "gui-device-transfer-qr-container",
|
|
7393
|
-
style:
|
|
7394
|
-
children: /* @__PURE__ */ B(
|
|
7414
|
+
style: rs,
|
|
7415
|
+
children: /* @__PURE__ */ B(ns, {
|
|
7395
7416
|
value: o,
|
|
7396
7417
|
size: 300,
|
|
7397
7418
|
fgColor: a == null ? void 0 : a.color
|
|
7398
7419
|
})
|
|
7399
7420
|
}),
|
|
7400
7421
|
r && /* @__PURE__ */ B("div", {
|
|
7401
|
-
style:
|
|
7422
|
+
style: as,
|
|
7402
7423
|
children: /* @__PURE__ */ B(G, z({}, r))
|
|
7403
7424
|
}),
|
|
7404
7425
|
i && /* @__PURE__ */ B("div", {
|
|
7405
|
-
style:
|
|
7406
|
-
children: /* @__PURE__ */ B(
|
|
7426
|
+
style: os,
|
|
7427
|
+
children: /* @__PURE__ */ B(wn, z({}, i))
|
|
7407
7428
|
})
|
|
7408
7429
|
]
|
|
7409
7430
|
})
|
|
7410
7431
|
});
|
|
7411
|
-
},
|
|
7432
|
+
}, cs = /* @__PURE__ */ function(e) {
|
|
7412
7433
|
return e.IDLE = "idle", e.UPLOADING = "uploading", e.DONE = "done", e;
|
|
7413
7434
|
}({}), $ = /* @__PURE__ */ function(e) {
|
|
7414
7435
|
return e.IDLE = "idle", e.UPLOADING = "uploading", e.SUCCESS = "success", e.ERROR = "error", e;
|
|
7415
|
-
}({}),
|
|
7436
|
+
}({}), ls = /* @__PURE__ */ function(e) {
|
|
7416
7437
|
return e.OK = "ok", e.SIZE = "size", e.FORMAT = "format", e;
|
|
7417
7438
|
}({});
|
|
7418
7439
|
//#endregion
|
|
7419
7440
|
//#region src/screens/upload-files/utils.ts
|
|
7420
|
-
function
|
|
7441
|
+
function us(e) {
|
|
7421
7442
|
if (e < 1024) return `${e} B`;
|
|
7422
7443
|
let t = e / 1024;
|
|
7423
7444
|
if (t < 1024) return `${t < 10 ? t.toFixed(1) : Math.round(t)} kB`;
|
|
7424
7445
|
let n = t / 1024;
|
|
7425
7446
|
return `${n < 10 ? n.toFixed(1) : Math.round(n)} MB`;
|
|
7426
7447
|
}
|
|
7427
|
-
function
|
|
7448
|
+
function ds(e) {
|
|
7428
7449
|
let t = e.lastIndexOf(".");
|
|
7429
7450
|
return t < 0 ? "" : e.slice(t).toLowerCase();
|
|
7430
7451
|
}
|
|
7431
|
-
function
|
|
7432
|
-
let n =
|
|
7452
|
+
function fs(e, t) {
|
|
7453
|
+
let n = ds(e);
|
|
7433
7454
|
return n ? new Set(t.map((e) => e.startsWith(".") ? e.toLowerCase() : `.${e.toLowerCase()}`)).has(n) : !1;
|
|
7434
7455
|
}
|
|
7435
|
-
function
|
|
7436
|
-
return e.size > t ?
|
|
7456
|
+
function ps(e, t, n) {
|
|
7457
|
+
return e.size > t ? ls.SIZE : fs(e.name, n) ? ls.OK : ls.FORMAT;
|
|
7437
7458
|
}
|
|
7438
|
-
function
|
|
7459
|
+
function ms(e) {
|
|
7439
7460
|
return `${e.name}\0${e.size}\0${e.lastModified}`;
|
|
7440
7461
|
}
|
|
7441
|
-
var
|
|
7462
|
+
var hs = (e) => {
|
|
7442
7463
|
let t = getComputedStyle(e), n = parseFloat(t.lineHeight);
|
|
7443
7464
|
if (!Number.isFinite(n) || n <= 0) {
|
|
7444
7465
|
let e = parseFloat(t.fontSize);
|
|
7445
7466
|
n = Number.isFinite(e) ? e * 1.35 : 20;
|
|
7446
7467
|
}
|
|
7447
7468
|
return e.scrollHeight > n + 2;
|
|
7448
|
-
},
|
|
7469
|
+
}, gs = {
|
|
7449
7470
|
display: "grid",
|
|
7450
7471
|
gridTemplateColumns: "auto minmax(0, 1fr) auto auto",
|
|
7451
7472
|
columnGap: "8px",
|
|
7452
7473
|
minWidth: 0,
|
|
7453
7474
|
width: "100%"
|
|
7454
|
-
},
|
|
7475
|
+
}, _s = {
|
|
7455
7476
|
width: "20px",
|
|
7456
7477
|
height: "20px",
|
|
7457
7478
|
color: "#555"
|
|
7458
|
-
},
|
|
7479
|
+
}, vs = {
|
|
7459
7480
|
fontSize: "15px",
|
|
7460
7481
|
wordBreak: "break-all"
|
|
7461
|
-
},
|
|
7482
|
+
}, ys = {
|
|
7462
7483
|
display: "flex",
|
|
7463
7484
|
gap: 3
|
|
7464
|
-
},
|
|
7485
|
+
}, bs = {
|
|
7465
7486
|
display: "flex",
|
|
7466
7487
|
alignItems: "center",
|
|
7467
7488
|
justifyContent: "center",
|
|
7468
7489
|
height: "36px",
|
|
7469
7490
|
width: "36px"
|
|
7470
|
-
},
|
|
7491
|
+
}, xs = {
|
|
7471
7492
|
border: "none",
|
|
7472
7493
|
background: "none",
|
|
7473
7494
|
cursor: "pointer",
|
|
@@ -7476,10 +7497,10 @@ var ps = (e) => {
|
|
|
7476
7497
|
//#endregion
|
|
7477
7498
|
//#region src/screens/upload-files/components/upload-file-row/UploadFileRow.tsx
|
|
7478
7499
|
R();
|
|
7479
|
-
var
|
|
7500
|
+
var Ss = ({ uploadFile: e, uploadPhase: t, onRetryFile: n, onRemoveFile: r }) => {
|
|
7480
7501
|
let [i, a] = N(!1), o = F(null), s = Ne(() => {
|
|
7481
7502
|
let e = o.current;
|
|
7482
|
-
e && a(
|
|
7503
|
+
e && a(hs(e));
|
|
7483
7504
|
}, []);
|
|
7484
7505
|
return Ae(() => {
|
|
7485
7506
|
s();
|
|
@@ -7494,56 +7515,56 @@ var bs = ({ uploadFile: e, uploadPhase: t, onRetryFile: n, onRemoveFile: r }) =>
|
|
|
7494
7515
|
t,
|
|
7495
7516
|
s
|
|
7496
7517
|
]), /* @__PURE__ */ B("div", {
|
|
7497
|
-
style: z(z({},
|
|
7518
|
+
style: z(z({}, gs), {}, { alignItems: i ? "start" : "center" }),
|
|
7498
7519
|
children: [
|
|
7499
7520
|
/* @__PURE__ */ B("div", {
|
|
7500
|
-
style:
|
|
7501
|
-
children: /* @__PURE__ */ B(
|
|
7521
|
+
style: _s,
|
|
7522
|
+
children: /* @__PURE__ */ B(qt, { type: "file" })
|
|
7502
7523
|
}),
|
|
7503
7524
|
/* @__PURE__ */ B("div", {
|
|
7504
7525
|
ref: o,
|
|
7505
7526
|
children: /* @__PURE__ */ B("span", {
|
|
7506
|
-
style:
|
|
7527
|
+
style: vs,
|
|
7507
7528
|
children: e.file.name
|
|
7508
7529
|
})
|
|
7509
7530
|
}),
|
|
7510
7531
|
/* @__PURE__ */ B("div", { children: /* @__PURE__ */ B("span", {
|
|
7511
|
-
style:
|
|
7532
|
+
style: vs,
|
|
7512
7533
|
children: [
|
|
7513
7534
|
" (",
|
|
7514
|
-
|
|
7535
|
+
us(e.file.size),
|
|
7515
7536
|
")"
|
|
7516
7537
|
]
|
|
7517
7538
|
}) }),
|
|
7518
7539
|
/* @__PURE__ */ B("div", {
|
|
7519
|
-
style:
|
|
7540
|
+
style: ys,
|
|
7520
7541
|
children: [/* @__PURE__ */ B("div", {
|
|
7521
|
-
style:
|
|
7522
|
-
children: e.uploadState === $.ERROR && t ===
|
|
7542
|
+
style: bs,
|
|
7543
|
+
children: e.uploadState === $.ERROR && t === cs.DONE && /* @__PURE__ */ B("button", {
|
|
7523
7544
|
type: "button",
|
|
7524
7545
|
"aria-label": "Retry",
|
|
7525
7546
|
onClick: () => n(e.id),
|
|
7526
|
-
style:
|
|
7527
|
-
children: /* @__PURE__ */ B(
|
|
7547
|
+
style: xs,
|
|
7548
|
+
children: /* @__PURE__ */ B(qt, { type: "reload" })
|
|
7528
7549
|
})
|
|
7529
7550
|
}), /* @__PURE__ */ B("div", {
|
|
7530
|
-
style:
|
|
7551
|
+
style: bs,
|
|
7531
7552
|
children: [
|
|
7532
|
-
(t ===
|
|
7533
|
-
e.uploadState === $.SUCCESS && /* @__PURE__ */ B(
|
|
7534
|
-
t !==
|
|
7553
|
+
(t === cs.UPLOADING || e.uploadState === $.UPLOADING) && e.uploadState !== $.SUCCESS && /* @__PURE__ */ B(qt, { type: "loader" }),
|
|
7554
|
+
e.uploadState === $.SUCCESS && /* @__PURE__ */ B(qt, { type: "ok" }),
|
|
7555
|
+
t !== cs.UPLOADING && (e.uploadState === $.IDLE || e.uploadState === $.ERROR) && /* @__PURE__ */ B("button", {
|
|
7535
7556
|
type: "button",
|
|
7536
7557
|
"aria-label": "Remove",
|
|
7537
7558
|
onClick: () => r(e.id),
|
|
7538
|
-
style:
|
|
7539
|
-
children: /* @__PURE__ */ B(
|
|
7559
|
+
style: xs,
|
|
7560
|
+
children: /* @__PURE__ */ B(qt, { type: "close_icon" })
|
|
7540
7561
|
})
|
|
7541
7562
|
]
|
|
7542
7563
|
})]
|
|
7543
7564
|
})
|
|
7544
7565
|
]
|
|
7545
7566
|
});
|
|
7546
|
-
},
|
|
7567
|
+
}, Cs = ({ range: e, color: t = "#00A028" }) => /* @__PURE__ */ B("div", {
|
|
7547
7568
|
style: {
|
|
7548
7569
|
position: "absolute",
|
|
7549
7570
|
bottom: "2px",
|
|
@@ -7560,42 +7581,42 @@ var bs = ({ uploadFile: e, uploadPhase: t, onRetryFile: n, onRemoveFile: r }) =>
|
|
|
7560
7581
|
backgroundColor: t,
|
|
7561
7582
|
transition: "width 0.15s ease-out"
|
|
7562
7583
|
} })
|
|
7563
|
-
}),
|
|
7564
|
-
for (let e = 0; e < 256; ++e)
|
|
7565
|
-
function
|
|
7566
|
-
return (
|
|
7584
|
+
}), ws = [];
|
|
7585
|
+
for (let e = 0; e < 256; ++e) ws.push((e + 256).toString(16).slice(1));
|
|
7586
|
+
function Ts(e, t = 0) {
|
|
7587
|
+
return (ws[e[t + 0]] + ws[e[t + 1]] + ws[e[t + 2]] + ws[e[t + 3]] + "-" + ws[e[t + 4]] + ws[e[t + 5]] + "-" + ws[e[t + 6]] + ws[e[t + 7]] + "-" + ws[e[t + 8]] + ws[e[t + 9]] + "-" + ws[e[t + 10]] + ws[e[t + 11]] + ws[e[t + 12]] + ws[e[t + 13]] + ws[e[t + 14]] + ws[e[t + 15]]).toLowerCase();
|
|
7567
7588
|
}
|
|
7568
7589
|
//#endregion
|
|
7569
7590
|
//#region ../../node_modules/uuid/dist/rng.js
|
|
7570
|
-
var
|
|
7571
|
-
function
|
|
7572
|
-
return crypto.getRandomValues(
|
|
7591
|
+
var Es = new Uint8Array(16);
|
|
7592
|
+
function Ds() {
|
|
7593
|
+
return crypto.getRandomValues(Es);
|
|
7573
7594
|
}
|
|
7574
7595
|
//#endregion
|
|
7575
7596
|
//#region ../../node_modules/uuid/dist/v4.js
|
|
7576
|
-
function
|
|
7577
|
-
return !t && !e && crypto.randomUUID ? crypto.randomUUID() :
|
|
7597
|
+
function Os(e, t, n) {
|
|
7598
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : ks(e, t, n);
|
|
7578
7599
|
}
|
|
7579
|
-
function
|
|
7600
|
+
function ks(e, t, n) {
|
|
7580
7601
|
var r, i, a;
|
|
7581
7602
|
e = e || {};
|
|
7582
|
-
let o = (r = (i = e.random) == null ? (a = e.rng) == null ? void 0 : a.call(e) : i) == null ?
|
|
7603
|
+
let o = (r = (i = e.random) == null ? (a = e.rng) == null ? void 0 : a.call(e) : i) == null ? Ds() : r;
|
|
7583
7604
|
if (o.length < 16) throw Error("Random bytes length must be >= 16");
|
|
7584
7605
|
if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, t) {
|
|
7585
7606
|
if (n = n || 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
7586
7607
|
for (let e = 0; e < 16; ++e) t[n + e] = o[e];
|
|
7587
7608
|
return t;
|
|
7588
7609
|
}
|
|
7589
|
-
return
|
|
7610
|
+
return Ts(o);
|
|
7590
7611
|
}
|
|
7591
7612
|
//#endregion
|
|
7592
7613
|
//#region src/screens/upload-files/hooks/useUploadFiles.ts
|
|
7593
7614
|
R();
|
|
7594
|
-
var
|
|
7615
|
+
var As = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r, abortRequest: i }) => {
|
|
7595
7616
|
var a;
|
|
7596
|
-
let { perform: o } = vt(), [s, c] = N([]), [l, u] = N(
|
|
7617
|
+
let { perform: o } = vt(), [s, c] = N([]), [l, u] = N(cs.IDLE), d = F([]), f = F(!1);
|
|
7597
7618
|
d.current = s;
|
|
7598
|
-
let p = s.some((e) => e.clientValidation !==
|
|
7619
|
+
let p = s.some((e) => e.clientValidation !== ls.OK), m = s.filter((e) => e.clientValidation === ls.OK), h = m.length > 0 && m.every((e) => e.uploadState === $.SUCCESS && e.tempFileId), g = l === cs.UPLOADING, _ = l === cs.DONE && h && !p, { devSettings: v } = _t(), y = v == null || (a = v.screens) == null || (a = a[wt.UPLOAD_FILES]) == null ? void 0 : a.files, b = !!y, x = (e) => {
|
|
7599
7620
|
b || g || c((t) => {
|
|
7600
7621
|
let n = t.find((t) => t.id === e);
|
|
7601
7622
|
return !n || n.uploadState === $.UPLOADING || n.uploadState === $.SUCCESS ? t : t.filter((t) => t.id !== e);
|
|
@@ -7654,20 +7675,20 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7654
7675
|
if (t.currentTarget.value = "", !r.length) return;
|
|
7655
7676
|
let i = [];
|
|
7656
7677
|
c((t) => {
|
|
7657
|
-
let n = new Set(t.map((e) =>
|
|
7678
|
+
let n = new Set(t.map((e) => ms(e.file))), a = Math.max(0, e.selectionLimit - t.length), o = [...t];
|
|
7658
7679
|
for (let t of r) {
|
|
7659
7680
|
if (a <= 0) break;
|
|
7660
|
-
let r =
|
|
7681
|
+
let r = ms(t);
|
|
7661
7682
|
if (n.has(r)) continue;
|
|
7662
7683
|
n.add(r);
|
|
7663
|
-
let s =
|
|
7664
|
-
id:
|
|
7684
|
+
let s = ps(t, e.fileMaxSize, e.supportedFileFormats), c = {
|
|
7685
|
+
id: Os(),
|
|
7665
7686
|
file: t,
|
|
7666
7687
|
clientValidation: s,
|
|
7667
7688
|
uploadState: $.IDLE,
|
|
7668
7689
|
progressBarRange: 0
|
|
7669
7690
|
};
|
|
7670
|
-
o.push(c), s ===
|
|
7691
|
+
o.push(c), s === ls.OK && i.push(c), --a;
|
|
7671
7692
|
}
|
|
7672
7693
|
return o;
|
|
7673
7694
|
}), i.length;
|
|
@@ -7679,14 +7700,14 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7679
7700
|
var e = H(function* (e) {
|
|
7680
7701
|
if (b || g || _ || p) return;
|
|
7681
7702
|
c((e) => e.map((e) => z(z({}, e), {}, { serverError: void 0 })));
|
|
7682
|
-
let t = d.current.filter((e) => e.clientValidation ===
|
|
7703
|
+
let t = d.current.filter((e) => e.clientValidation === ls.OK).map((e) => e.id);
|
|
7683
7704
|
if (!t.length) return;
|
|
7684
|
-
u(
|
|
7705
|
+
u(cs.UPLOADING), f.current = !1;
|
|
7685
7706
|
let n = [], r = !1;
|
|
7686
7707
|
for (let e of t) {
|
|
7687
7708
|
if (f.current) break;
|
|
7688
7709
|
let t = d.current.find((t) => t.id === e);
|
|
7689
|
-
if (!t || t.clientValidation !==
|
|
7710
|
+
if (!t || t.clientValidation !== ls.OK) continue;
|
|
7690
7711
|
if (t.uploadState === $.SUCCESS && t.tempFileId) {
|
|
7691
7712
|
n.push(t.tempFileId);
|
|
7692
7713
|
continue;
|
|
@@ -7698,14 +7719,14 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7698
7719
|
!r && n.length === t.length && o({
|
|
7699
7720
|
files: n,
|
|
7700
7721
|
upload_complete: !0
|
|
7701
|
-
}, e), u(
|
|
7722
|
+
}, e), u(cs.DONE);
|
|
7702
7723
|
});
|
|
7703
7724
|
return function(t) {
|
|
7704
7725
|
return e.apply(this, arguments);
|
|
7705
7726
|
};
|
|
7706
7727
|
}(), T = function() {
|
|
7707
7728
|
var e = H(function* (e) {
|
|
7708
|
-
if (b || l ===
|
|
7729
|
+
if (b || l === cs.UPLOADING || _) return;
|
|
7709
7730
|
f.current = !1;
|
|
7710
7731
|
let t;
|
|
7711
7732
|
c((n) => {
|
|
@@ -7715,13 +7736,13 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7715
7736
|
progressBarRange: 0
|
|
7716
7737
|
}) : t);
|
|
7717
7738
|
return t = r.find((t) => t.id === e), r;
|
|
7718
|
-
}), !(!t || t.clientValidation !==
|
|
7719
|
-
let t = e.filter((e) => e.clientValidation ===
|
|
7739
|
+
}), !(!t || t.clientValidation !== ls.OK) && ((yield S(t)) && !f.current && c((e) => {
|
|
7740
|
+
let t = e.filter((e) => e.clientValidation === ls.OK);
|
|
7720
7741
|
return t.length > 0 && t.every((e) => e.uploadState === $.SUCCESS && e.tempFileId) && o({
|
|
7721
7742
|
files: t.map((e) => e.tempFileId),
|
|
7722
7743
|
upload_complete: !0
|
|
7723
7744
|
}, ut.FORM), e;
|
|
7724
|
-
}), u(
|
|
7745
|
+
}), u(cs.DONE));
|
|
7725
7746
|
});
|
|
7726
7747
|
return function(t) {
|
|
7727
7748
|
return e.apply(this, arguments);
|
|
@@ -7740,7 +7761,7 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7740
7761
|
uploadState: e.uploadState,
|
|
7741
7762
|
progressBarRange: (i = e.progressBarRange) == null ? 0 : i
|
|
7742
7763
|
};
|
|
7743
|
-
})), u(
|
|
7764
|
+
})), u(cs.DONE));
|
|
7744
7765
|
}, [v, y]), {
|
|
7745
7766
|
uploadFileRows: s,
|
|
7746
7767
|
uploadPhase: l,
|
|
@@ -7752,7 +7773,7 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7752
7773
|
submit: w,
|
|
7753
7774
|
retryFile: T
|
|
7754
7775
|
};
|
|
7755
|
-
},
|
|
7776
|
+
}, js = {
|
|
7756
7777
|
position: "relative",
|
|
7757
7778
|
display: "flex",
|
|
7758
7779
|
flexDirection: "column",
|
|
@@ -7760,7 +7781,7 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7760
7781
|
width: "100%",
|
|
7761
7782
|
minHeight: 0,
|
|
7762
7783
|
fontFamily: "-apple-system, sans-serif"
|
|
7763
|
-
},
|
|
7784
|
+
}, Ms = {
|
|
7764
7785
|
flex: "1 1 auto",
|
|
7765
7786
|
minHeight: 0,
|
|
7766
7787
|
overflowY: "auto",
|
|
@@ -7768,20 +7789,20 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7768
7789
|
display: "flex",
|
|
7769
7790
|
flexDirection: "column",
|
|
7770
7791
|
alignItems: "stretch"
|
|
7771
|
-
},
|
|
7792
|
+
}, Ns = { marginBottom: "8px" }, Ps = {
|
|
7772
7793
|
minHeight: "54px",
|
|
7773
7794
|
position: "relative",
|
|
7774
7795
|
backgroundColor: "#fff",
|
|
7775
7796
|
borderRadius: "12px",
|
|
7776
7797
|
padding: "8px 16px",
|
|
7777
7798
|
marginBottom: "2px"
|
|
7778
|
-
},
|
|
7799
|
+
}, Fs = { boxShadow: "inset 0 0 0 2px #d32f2f" }, Is = {
|
|
7779
7800
|
fontSize: "13px",
|
|
7780
7801
|
color: "#d32f2f",
|
|
7781
7802
|
marginTop: "4px",
|
|
7782
7803
|
marginBottom: "4px",
|
|
7783
7804
|
marginLeft: "2px"
|
|
7784
|
-
},
|
|
7805
|
+
}, Ls = {
|
|
7785
7806
|
position: "absolute",
|
|
7786
7807
|
width: "100%",
|
|
7787
7808
|
height: "100%",
|
|
@@ -7795,18 +7816,18 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7795
7816
|
zIndex: 1e3,
|
|
7796
7817
|
pointerEvents: "auto",
|
|
7797
7818
|
cursor: "default"
|
|
7798
|
-
},
|
|
7819
|
+
}, Rs = {
|
|
7799
7820
|
position: "relative",
|
|
7800
7821
|
padding: "32px 24px 0",
|
|
7801
7822
|
border: "1px solid rgba(0, 0, 0, 0.06)",
|
|
7802
7823
|
width: "min(400px, calc(100vw - 32px))"
|
|
7803
|
-
},
|
|
7824
|
+
}, zs = {
|
|
7804
7825
|
marginBottom: "10px",
|
|
7805
7826
|
fontWeight: 600
|
|
7806
|
-
},
|
|
7827
|
+
}, Bs = { marginBottom: "84px" }, Vs = {
|
|
7807
7828
|
maxHeight: "calc(100dvh - 190px)",
|
|
7808
7829
|
overflow: "auto"
|
|
7809
|
-
},
|
|
7830
|
+
}, Hs = {
|
|
7810
7831
|
position: "absolute",
|
|
7811
7832
|
bottom: 0,
|
|
7812
7833
|
insetInline: 0,
|
|
@@ -7816,15 +7837,15 @@ var Os = ({ settings: e, errorMessages: t, serviceToken: n, uploadFileToTemp: r,
|
|
|
7816
7837
|
//#endregion
|
|
7817
7838
|
//#region src/screens/upload-files/index.tsx
|
|
7818
7839
|
R();
|
|
7819
|
-
var
|
|
7840
|
+
var Us = (e) => {
|
|
7820
7841
|
var t, n, r, i, a;
|
|
7821
|
-
let { title: o, description: s, header: c, buttons: l, footer: u, backgroundColor: d, backgroundImage: f, popups: p, settings: m, errorMessages: h, serviceToken: g, uploadFileToTemp: _, abortRequest: v } = e, y = F(null), [b, x] = N(!1), [S, C] = N(!1), { uploadFileRows: w, uploadPhase: T, pickFiles: E, removeFile: D, onChangeFileInput: ee, submit: O, retryFile: te } =
|
|
7842
|
+
let { title: o, description: s, header: c, buttons: l, footer: u, backgroundColor: d, backgroundImage: f, popups: p, settings: m, errorMessages: h, serviceToken: g, uploadFileToTemp: _, abortRequest: v } = e, y = F(null), [b, x] = N(!1), [S, C] = N(!1), { uploadFileRows: w, uploadPhase: T, pickFiles: E, removeFile: D, onChangeFileInput: ee, submit: O, retryFile: te } = As({
|
|
7822
7843
|
serviceToken: g,
|
|
7823
7844
|
settings: m,
|
|
7824
7845
|
errorMessages: h,
|
|
7825
7846
|
uploadFileToTemp: _,
|
|
7826
7847
|
abortRequest: v
|
|
7827
|
-
}), { devSettings: k } = _t(), A = k == null || (t = k.popups) == null ? void 0 : t.files_not_selected, ne = k == null || (n = k.popups) == null ? void 0 : n.files_limit_exceeded, re = !!A || !!ne || !!(!(k == null || (r = k.screens) == null) && r[wt.UPLOAD_FILES]), ie = !!(A != null && A.isOpen), ae = !!(ne != null && ne.isOpen), j = p == null ? void 0 : p.find((e) => e.reason ===
|
|
7848
|
+
}), { devSettings: k } = _t(), A = k == null || (t = k.popups) == null ? void 0 : t.files_not_selected, ne = k == null || (n = k.popups) == null ? void 0 : n.files_limit_exceeded, re = !!A || !!ne || !!(!(k == null || (r = k.screens) == null) && r[wt.UPLOAD_FILES]), ie = !!(A != null && A.isOpen), ae = !!(ne != null && ne.isOpen), j = p == null ? void 0 : p.find((e) => e.reason === $t.FILES_NOT_SELECTED), oe = p == null ? void 0 : p.find((e) => e.reason === $t.FILES_LIMIT_EXCEEDED), se = () => {
|
|
7828
7849
|
re || x(!1);
|
|
7829
7850
|
}, ce = () => {
|
|
7830
7851
|
re || C(!1);
|
|
@@ -7848,50 +7869,50 @@ var Vs = (e) => {
|
|
|
7848
7869
|
ie,
|
|
7849
7870
|
ae,
|
|
7850
7871
|
k
|
|
7851
|
-
]), /* @__PURE__ */ B(
|
|
7872
|
+
]), /* @__PURE__ */ B(Cn, {
|
|
7852
7873
|
header: c,
|
|
7853
7874
|
footer: u,
|
|
7854
7875
|
backgroundColor: d == null ? "#f5f5f5" : d,
|
|
7855
7876
|
backgroundImage: f,
|
|
7856
7877
|
children: [
|
|
7857
7878
|
/* @__PURE__ */ B("div", {
|
|
7858
|
-
style:
|
|
7879
|
+
style: js,
|
|
7859
7880
|
part: "gui-file-upload-root",
|
|
7860
7881
|
"data-ui": "gui-file-upload",
|
|
7861
7882
|
children: [/* @__PURE__ */ B("div", {
|
|
7862
|
-
style:
|
|
7883
|
+
style: Ms,
|
|
7863
7884
|
children: [
|
|
7864
7885
|
/* @__PURE__ */ B("div", {
|
|
7865
|
-
style:
|
|
7886
|
+
style: Ns,
|
|
7866
7887
|
children: /* @__PURE__ */ B(G, z({}, o))
|
|
7867
7888
|
}),
|
|
7868
7889
|
w.length === 0 && /* @__PURE__ */ B(G, z({}, s)),
|
|
7869
7890
|
w.length > 0 && w.map((e) => {
|
|
7870
7891
|
var t;
|
|
7871
|
-
let n = e.clientValidation !==
|
|
7892
|
+
let n = e.clientValidation !== ls.OK || e.uploadState === $.ERROR && T !== cs.UPLOADING;
|
|
7872
7893
|
return /* @__PURE__ */ B("div", {
|
|
7873
7894
|
style: { width: "100%" },
|
|
7874
7895
|
children: [
|
|
7875
7896
|
/* @__PURE__ */ B("div", {
|
|
7876
7897
|
"data-ui": "gui-file-card",
|
|
7877
|
-
style: z(z({},
|
|
7878
|
-
children: [/* @__PURE__ */ B(
|
|
7898
|
+
style: z(z({}, Ps), n ? Fs : {}),
|
|
7899
|
+
children: [/* @__PURE__ */ B(Ss, {
|
|
7879
7900
|
uploadFile: e,
|
|
7880
7901
|
uploadPhase: T,
|
|
7881
7902
|
onRetryFile: te,
|
|
7882
7903
|
onRemoveFile: D
|
|
7883
|
-
}), e.uploadState === $.UPLOADING && /* @__PURE__ */ B(
|
|
7904
|
+
}), e.uploadState === $.UPLOADING && /* @__PURE__ */ B(Cs, { range: e.progressBarRange })]
|
|
7884
7905
|
}),
|
|
7885
|
-
e.clientValidation !==
|
|
7886
|
-
style:
|
|
7906
|
+
e.clientValidation !== ls.OK && /* @__PURE__ */ B("div", {
|
|
7907
|
+
style: Is,
|
|
7887
7908
|
children: /* @__PURE__ */ B(G, {
|
|
7888
7909
|
text: le(e.clientValidation),
|
|
7889
7910
|
fontSize: "13px",
|
|
7890
7911
|
fontColor: "#d32f2f"
|
|
7891
7912
|
})
|
|
7892
7913
|
}),
|
|
7893
|
-
T !==
|
|
7894
|
-
style:
|
|
7914
|
+
T !== cs.UPLOADING && e.uploadState === $.ERROR && e.clientValidation === ls.OK && /* @__PURE__ */ B("div", {
|
|
7915
|
+
style: Is,
|
|
7895
7916
|
children: /* @__PURE__ */ B(G, {
|
|
7896
7917
|
text: (t = e.serverError) == null ? h.fileNotLoaded : t,
|
|
7897
7918
|
fontSize: "13px",
|
|
@@ -7917,73 +7938,73 @@ var Vs = (e) => {
|
|
|
7917
7938
|
accept: m.supportedFileFormats.map((e) => e.toLowerCase()).join(","),
|
|
7918
7939
|
style: { display: "none" },
|
|
7919
7940
|
onChange: ee
|
|
7920
|
-
}), l.map((e, t) => /* @__PURE__ */ B(
|
|
7941
|
+
}), l.map((e, t) => /* @__PURE__ */ B(bn, z(z({ dataTestId: `file-upload-button$-${t}` }, e), {}, { onClick: () => M(e) }), t))]
|
|
7921
7942
|
})]
|
|
7922
7943
|
}),
|
|
7923
7944
|
S && oe && /* @__PURE__ */ B("div", {
|
|
7924
|
-
style:
|
|
7945
|
+
style: Ls,
|
|
7925
7946
|
onPointerDown: (e) => {
|
|
7926
7947
|
e.preventDefault(), e.stopPropagation(), ce();
|
|
7927
7948
|
},
|
|
7928
7949
|
children: /* @__PURE__ */ B("div", {
|
|
7929
|
-
style: z(z({},
|
|
7950
|
+
style: z(z({}, Rs), {}, {
|
|
7930
7951
|
borderRadius: (j == null ? void 0 : j.cornerRadius) || "27px",
|
|
7931
7952
|
backgroundColor: (j == null ? void 0 : j.backgroundColor) || "#ffffff"
|
|
7932
7953
|
}),
|
|
7933
7954
|
children: [
|
|
7934
7955
|
/* @__PURE__ */ B("div", {
|
|
7935
|
-
style:
|
|
7956
|
+
style: zs,
|
|
7936
7957
|
children: /* @__PURE__ */ B(G, z({ fontSize: "24px" }, oe.title))
|
|
7937
7958
|
}),
|
|
7938
7959
|
/* @__PURE__ */ B("div", {
|
|
7939
|
-
style:
|
|
7960
|
+
style: Bs,
|
|
7940
7961
|
children: /* @__PURE__ */ B("div", {
|
|
7941
|
-
style:
|
|
7962
|
+
style: Vs,
|
|
7942
7963
|
children: /* @__PURE__ */ B(G, z({ fontSize: "17px" }, oe.message))
|
|
7943
7964
|
})
|
|
7944
7965
|
}),
|
|
7945
7966
|
oe.actionButton1 && /* @__PURE__ */ B("div", {
|
|
7946
|
-
style:
|
|
7947
|
-
children: /* @__PURE__ */ B(
|
|
7967
|
+
style: Hs,
|
|
7968
|
+
children: /* @__PURE__ */ B(bn, z(z({ dataTestId: "files-limit-exceeded-modal-ok-button" }, oe.actionButton1), (oe == null || (i = oe.actionButton1) == null ? void 0 : i.type) === "FORM" ? { onClick: ce } : {}))
|
|
7948
7969
|
})
|
|
7949
7970
|
]
|
|
7950
7971
|
})
|
|
7951
7972
|
}),
|
|
7952
7973
|
b && j && /* @__PURE__ */ B("div", {
|
|
7953
|
-
style:
|
|
7974
|
+
style: Ls,
|
|
7954
7975
|
onPointerDown: (e) => {
|
|
7955
7976
|
e.preventDefault(), e.stopPropagation(), se();
|
|
7956
7977
|
},
|
|
7957
7978
|
children: /* @__PURE__ */ B("div", {
|
|
7958
|
-
style: z(z({},
|
|
7979
|
+
style: z(z({}, Rs), {}, {
|
|
7959
7980
|
borderRadius: (j == null ? void 0 : j.cornerRadius) || "27px",
|
|
7960
7981
|
backgroundColor: (j == null ? void 0 : j.backgroundColor) || "#ffffff"
|
|
7961
7982
|
}),
|
|
7962
7983
|
children: [
|
|
7963
7984
|
/* @__PURE__ */ B("div", {
|
|
7964
|
-
style:
|
|
7985
|
+
style: zs,
|
|
7965
7986
|
children: /* @__PURE__ */ B(G, z({ fontSize: "24px" }, j.title))
|
|
7966
7987
|
}),
|
|
7967
7988
|
/* @__PURE__ */ B("div", {
|
|
7968
|
-
style:
|
|
7989
|
+
style: Bs,
|
|
7969
7990
|
children: /* @__PURE__ */ B("div", {
|
|
7970
|
-
style:
|
|
7991
|
+
style: Vs,
|
|
7971
7992
|
children: /* @__PURE__ */ B(G, z({ fontSize: "17px" }, j.message))
|
|
7972
7993
|
})
|
|
7973
7994
|
}),
|
|
7974
7995
|
j.actionButton1 && /* @__PURE__ */ B("div", {
|
|
7975
|
-
style:
|
|
7976
|
-
children: /* @__PURE__ */ B(
|
|
7996
|
+
style: Hs,
|
|
7997
|
+
children: /* @__PURE__ */ B(bn, z(z({ dataTestId: "no-files-modal-ok-button" }, j.actionButton1), (j == null || (a = j.actionButton1) == null ? void 0 : a.type) === "FORM" ? { onClick: se } : {}))
|
|
7977
7998
|
})
|
|
7978
7999
|
]
|
|
7979
8000
|
})
|
|
7980
8001
|
})
|
|
7981
8002
|
]
|
|
7982
8003
|
});
|
|
7983
|
-
},
|
|
8004
|
+
}, Ws = ({ moduleProps: e }) => {
|
|
7984
8005
|
let { templateId: t, templateLayout: n } = e, { perform: r } = vt();
|
|
7985
|
-
if (!t || !n) return /* @__PURE__ */ B(
|
|
7986
|
-
if (t === wt.STATUS) return /* @__PURE__ */ B(
|
|
8006
|
+
if (!t || !n) return /* @__PURE__ */ B(An, {});
|
|
8007
|
+
if (t === wt.STATUS) return /* @__PURE__ */ B(Tn, {
|
|
7987
8008
|
header: n == null ? void 0 : n.header,
|
|
7988
8009
|
footer: n == null ? void 0 : n.footer,
|
|
7989
8010
|
image: n == null ? void 0 : n.image,
|
|
@@ -7993,7 +8014,7 @@ var Vs = (e) => {
|
|
|
7993
8014
|
backgroundColor: n == null ? void 0 : n.backgroundColor,
|
|
7994
8015
|
backgroundImage: n == null ? void 0 : n.backgroundImage
|
|
7995
8016
|
});
|
|
7996
|
-
if (t === wt.INFO) return /* @__PURE__ */ B(
|
|
8017
|
+
if (t === wt.INFO) return /* @__PURE__ */ B(On, {
|
|
7997
8018
|
header: n == null ? void 0 : n.header,
|
|
7998
8019
|
footer: n == null ? void 0 : n.footer,
|
|
7999
8020
|
image: n == null ? void 0 : n.image,
|
|
@@ -8003,7 +8024,7 @@ var Vs = (e) => {
|
|
|
8003
8024
|
backgroundColor: n == null ? void 0 : n.backgroundColor,
|
|
8004
8025
|
backgroundImage: n == null ? void 0 : n.backgroundImage
|
|
8005
8026
|
});
|
|
8006
|
-
if (t === wt.GEOLOCATION) return /* @__PURE__ */ B(
|
|
8027
|
+
if (t === wt.GEOLOCATION) return /* @__PURE__ */ B(so, {
|
|
8007
8028
|
header: n == null ? void 0 : n.header,
|
|
8008
8029
|
footer: n == null ? void 0 : n.footer,
|
|
8009
8030
|
image: n == null ? void 0 : n.image,
|
|
@@ -8014,21 +8035,22 @@ var Vs = (e) => {
|
|
|
8014
8035
|
backgroundImage: n == null ? void 0 : n.backgroundImage,
|
|
8015
8036
|
popups: n == null ? void 0 : n.popups,
|
|
8016
8037
|
askEveryTime: n == null ? void 0 : n.askEveryTime,
|
|
8017
|
-
getLocationTimeout: e.getLocationTimeout
|
|
8038
|
+
getLocationTimeout: e.getLocationTimeout,
|
|
8039
|
+
locationAccuracy: e.locationAccuracy
|
|
8018
8040
|
});
|
|
8019
|
-
if (t === wt.GENERIC_LOCATION) return /* @__PURE__ */ B(
|
|
8041
|
+
if (t === wt.GENERIC_LOCATION) return /* @__PURE__ */ B(Oo, {
|
|
8020
8042
|
rootElement: n.rootElement,
|
|
8021
8043
|
popups: n.popups,
|
|
8022
8044
|
settings: n.settings
|
|
8023
8045
|
});
|
|
8024
|
-
if (t === wt.PROGRESS) return /* @__PURE__ */ B(
|
|
8046
|
+
if (t === wt.PROGRESS) return /* @__PURE__ */ B(An, {
|
|
8025
8047
|
header: n == null ? void 0 : n.header,
|
|
8026
8048
|
footer: n == null ? void 0 : n.footer,
|
|
8027
8049
|
progressView: n == null ? void 0 : n.progressView,
|
|
8028
8050
|
backgroundColor: n == null ? void 0 : n.backgroundColor,
|
|
8029
8051
|
backgroundImage: n == null ? void 0 : n.backgroundImage
|
|
8030
8052
|
});
|
|
8031
|
-
if (t === wt.INFO_DETAILS) return /* @__PURE__ */ B(
|
|
8053
|
+
if (t === wt.INFO_DETAILS) return /* @__PURE__ */ B(Pn, {
|
|
8032
8054
|
header: n == null ? void 0 : n.header,
|
|
8033
8055
|
title: n == null ? void 0 : n.title,
|
|
8034
8056
|
details: n == null ? void 0 : n.details,
|
|
@@ -8037,7 +8059,7 @@ var Vs = (e) => {
|
|
|
8037
8059
|
backgroundColor: n == null ? void 0 : n.backgroundColor,
|
|
8038
8060
|
backgroundImage: n == null ? void 0 : n.backgroundImage
|
|
8039
8061
|
});
|
|
8040
|
-
if (t === wt.CAMERA) return /* @__PURE__ */ B(
|
|
8062
|
+
if (t === wt.CAMERA) return /* @__PURE__ */ B(Wa, {
|
|
8041
8063
|
header: n == null ? void 0 : n.header,
|
|
8042
8064
|
buttons: n == null ? void 0 : n.buttons,
|
|
8043
8065
|
footer: n == null ? void 0 : n.footer,
|
|
@@ -8045,7 +8067,7 @@ var Vs = (e) => {
|
|
|
8045
8067
|
selectionLimit: e.selectionLimit,
|
|
8046
8068
|
backgroundImage: n == null ? void 0 : n.backgroundImage
|
|
8047
8069
|
});
|
|
8048
|
-
if (t === wt.GALLERY) return /* @__PURE__ */ B(
|
|
8070
|
+
if (t === wt.GALLERY) return /* @__PURE__ */ B(Ra, {
|
|
8049
8071
|
header: n == null ? void 0 : n.header,
|
|
8050
8072
|
buttons: n == null ? void 0 : n.buttons,
|
|
8051
8073
|
footer: n == null ? void 0 : n.footer,
|
|
@@ -8056,7 +8078,7 @@ var Vs = (e) => {
|
|
|
8056
8078
|
if (t === wt.QUESTIONS) {
|
|
8057
8079
|
var i;
|
|
8058
8080
|
let t = (i = e.properties) != null && i.length ? JSON.stringify(e.properties) : "default-key";
|
|
8059
|
-
return /* @__PURE__ */ B(
|
|
8081
|
+
return /* @__PURE__ */ B(Pa, {
|
|
8060
8082
|
dataSource: e.dataSource,
|
|
8061
8083
|
properties: e.properties,
|
|
8062
8084
|
questions: n == null ? void 0 : n.questions,
|
|
@@ -8068,7 +8090,7 @@ var Vs = (e) => {
|
|
|
8068
8090
|
backgroundImage: n == null ? void 0 : n.backgroundImage
|
|
8069
8091
|
}, t);
|
|
8070
8092
|
}
|
|
8071
|
-
return t === wt.DEVICE_TRANSFER ? /* @__PURE__ */ B(
|
|
8093
|
+
return t === wt.DEVICE_TRANSFER ? /* @__PURE__ */ B(ss, {
|
|
8072
8094
|
header: n == null ? void 0 : n.header,
|
|
8073
8095
|
buttons: n == null ? void 0 : n.buttons,
|
|
8074
8096
|
footer: n == null ? void 0 : n.footer,
|
|
@@ -8078,7 +8100,7 @@ var Vs = (e) => {
|
|
|
8078
8100
|
backgroundImage: n == null ? void 0 : n.backgroundImage,
|
|
8079
8101
|
qr: n == null ? void 0 : n.qr,
|
|
8080
8102
|
url: e == null ? void 0 : e.url
|
|
8081
|
-
}) : t === wt.GENERIC ? /* @__PURE__ */ B(
|
|
8103
|
+
}) : t === wt.GENERIC ? /* @__PURE__ */ B(Eo, { rootElement: n.rootElement }) : t === wt.GENERIC_PROGRESS ? /* @__PURE__ */ B(ko, { rootElement: n.rootElement }) : t === wt.UPLOAD_FILES ? /* @__PURE__ */ B(Us, {
|
|
8082
8104
|
title: n.title,
|
|
8083
8105
|
description: n.description,
|
|
8084
8106
|
header: n.header,
|
|
@@ -8092,13 +8114,13 @@ var Vs = (e) => {
|
|
|
8092
8114
|
serviceToken: e.serviceToken,
|
|
8093
8115
|
uploadFileToTemp: e.uploadFileToTemp,
|
|
8094
8116
|
abortRequest: e.abortRequest
|
|
8095
|
-
}) : (r(new
|
|
8096
|
-
errorCode:
|
|
8117
|
+
}) : (r(new Na({
|
|
8118
|
+
errorCode: Xt.DECODING_FAILED,
|
|
8097
8119
|
message: "Unsupported step template id"
|
|
8098
8120
|
})), null);
|
|
8099
8121
|
};
|
|
8100
8122
|
De(), R();
|
|
8101
|
-
var
|
|
8123
|
+
var Gs, Ks = !1, qs = ({ children: e }) => /* @__PURE__ */ B(m, { children: [/* @__PURE__ */ B("style", { children: "#gui-idv-web-c *, #gui-idv-web-c *::before, #gui-idv-web-c *::after {box-sizing: border-box;}" }), e] }), Js = ({ children: e, locale: t, direction: n }) => /* @__PURE__ */ B("div", {
|
|
8102
8124
|
part: "gui-idv",
|
|
8103
8125
|
id: "gui-idv-web-c",
|
|
8104
8126
|
dir: n,
|
|
@@ -8109,7 +8131,7 @@ var Us, Ws = !1, Gs = ({ children: e }) => /* @__PURE__ */ B(m, { children: [/*
|
|
|
8109
8131
|
width: "100%"
|
|
8110
8132
|
},
|
|
8111
8133
|
children: e
|
|
8112
|
-
}),
|
|
8134
|
+
}), Ys = ({ isProcessing: e, moduleProps: t, perform: n, devSettings: r, idvEventListener: i }) => {
|
|
8113
8135
|
let a = pt(t.locale);
|
|
8114
8136
|
return P(() => {
|
|
8115
8137
|
i == null || i("idv-gui", "Gui component was rendered");
|
|
@@ -8119,13 +8141,13 @@ var Us, Ws = !1, Gs = ({ children: e }) => /* @__PURE__ */ B(m, { children: [/*
|
|
|
8119
8141
|
devSettings: r,
|
|
8120
8142
|
failedAssets: t.failedAssets,
|
|
8121
8143
|
layoutDirection: a,
|
|
8122
|
-
children: /* @__PURE__ */ B(
|
|
8144
|
+
children: /* @__PURE__ */ B(Js, {
|
|
8123
8145
|
locale: t.locale,
|
|
8124
8146
|
direction: a,
|
|
8125
|
-
children: /* @__PURE__ */ B(
|
|
8147
|
+
children: /* @__PURE__ */ B(Ws, { moduleProps: t })
|
|
8126
8148
|
})
|
|
8127
8149
|
});
|
|
8128
|
-
},
|
|
8150
|
+
}, Xs = class extends ct {
|
|
8129
8151
|
constructor() {
|
|
8130
8152
|
super(), this._mounted = !1, this._shadowRoot = this.attachShadow({ mode: "open" }), this._renderVersion = 0, this.props = null;
|
|
8131
8153
|
}
|
|
@@ -8133,8 +8155,8 @@ var Us, Ws = !1, Gs = ({ children: e }) => /* @__PURE__ */ B(m, { children: [/*
|
|
|
8133
8155
|
let t = e.moduleProps.failedAssets;
|
|
8134
8156
|
if (t && t.blockingAssets.size > 0) {
|
|
8135
8157
|
var n;
|
|
8136
|
-
let r = new
|
|
8137
|
-
errorCode:
|
|
8158
|
+
let r = new Na({
|
|
8159
|
+
errorCode: Xt.IMAGE_LOADING_FAILED,
|
|
8138
8160
|
message: `Failed to load image asset${t.blockingAssets.size > 1 ? "s" : ""}: ${[...t.blockingAssets].join(", ")}`
|
|
8139
8161
|
});
|
|
8140
8162
|
(n = e.perform) == null || n.call(e, r);
|
|
@@ -8156,7 +8178,7 @@ var Us, Ws = !1, Gs = ({ children: e }) => /* @__PURE__ */ B(m, { children: [/*
|
|
|
8156
8178
|
let e = document.createElement("style");
|
|
8157
8179
|
e.id = "idv-gui-styles", e.textContent = "\n *, *::before, *::after {\n box-sizing: border-box;\n }\n h1, h2, h3, h4, p, ul {\n margin: 0;\n padding: 0;\n }\n li {\n list-style: none;\n }\n :host {\n display: block;\n container-type: inline-size;\n container-name: host;\n width: 100%;\n height: 100%;\n }\n ", this.shadowRoot.querySelector("#idv-gui-styles") || this.shadowRoot.appendChild(e);
|
|
8158
8180
|
}
|
|
8159
|
-
j(/* @__PURE__ */ B(
|
|
8181
|
+
j(/* @__PURE__ */ B(Ys, {
|
|
8160
8182
|
moduleProps: this.props.moduleProps,
|
|
8161
8183
|
perform: this.props.perform,
|
|
8162
8184
|
idvEventListener: this.props.idvEventListener,
|
|
@@ -8170,15 +8192,15 @@ var Us, Ws = !1, Gs = ({ children: e }) => /* @__PURE__ */ B(m, { children: [/*
|
|
|
8170
8192
|
});
|
|
8171
8193
|
}
|
|
8172
8194
|
static isReady() {
|
|
8173
|
-
return
|
|
8195
|
+
return Ks;
|
|
8174
8196
|
}
|
|
8175
8197
|
static initialize(e) {
|
|
8176
|
-
|
|
8198
|
+
Ks = !0;
|
|
8177
8199
|
}
|
|
8178
8200
|
static deinitialize() {
|
|
8179
|
-
|
|
8201
|
+
Ks = !1;
|
|
8180
8202
|
}
|
|
8181
8203
|
};
|
|
8182
|
-
|
|
8204
|
+
Gs = Xs, Gs.displayName = Yt, Gs.getSupportedTemplates = () => Object.values(wt), Gs.getIdentifier = () => Yt, lt(Yt, Xs);
|
|
8183
8205
|
//#endregion
|
|
8184
|
-
export {
|
|
8206
|
+
export { Xs as GuiIdv, Ys as GuiIdvReactComponent, wt as GuiIdvSteps, qs as GuiIdvStyleInjectionWrapper, Xt as GuiModuleError, V as IDV_UI_ICONS, $t as PopupReason, Kt as idvIconDataUrlMap };
|