@sinequa/atomic 2.10.0 → 2.11.0
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/README.md +119 -0
- package/dist/atomic.cjs +1 -1
- package/dist/atomic.js +1 -1
- package/dist/spfx/index.cjs +1 -1
- package/dist/spfx/index.js +1 -1
- package/dist/src-DwKhKgxj.cjs +1 -0
- package/dist/{src-s3KlD6YE.js → src-bQIJ_J2j.js} +406 -391
- package/dist/web-api/helpers/methods/patch-raw.d.ts +14 -0
- package/dist/web-api/helpers/methods/patch-raw.d.ts.map +1 -0
- package/dist/web-api/helpers/methods/patch.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/send-patch.d.ts +11 -0
- package/dist/web-api/helpers/methods/send-patch.d.ts.map +1 -0
- package/dist/web-api/v2/fetch-user-profile.d.ts +5 -0
- package/dist/web-api/v2/fetch-user-profile.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src-CPlI3qi5.cjs +0 -1
|
@@ -846,8 +846,8 @@ async function Mt(e, t, n) {
|
|
|
846
846
|
return z(g, e, t, n);
|
|
847
847
|
}
|
|
848
848
|
//#endregion
|
|
849
|
-
//#region src/web-api/helpers/methods/patch.ts
|
|
850
|
-
async function
|
|
849
|
+
//#region src/web-api/helpers/methods/send-patch.ts
|
|
850
|
+
async function Nt(e, t, n, r) {
|
|
851
851
|
let i = D(e, r?.headers);
|
|
852
852
|
i.append("content-type", "application/json");
|
|
853
853
|
let a = O(e, t);
|
|
@@ -856,18 +856,23 @@ async function B(e, t, n, r) {
|
|
|
856
856
|
return await P(e, a, {
|
|
857
857
|
method: "PATCH",
|
|
858
858
|
headers: i,
|
|
859
|
-
body:
|
|
859
|
+
body: n
|
|
860
860
|
}, r);
|
|
861
861
|
} catch (t) {
|
|
862
862
|
throw _(e).error("Error making PATCH request:", t), t;
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
|
-
|
|
866
|
-
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region src/web-api/helpers/methods/patch.ts
|
|
867
|
+
async function Pt(e, t, n, r) {
|
|
868
|
+
return Nt(e, t, F(e, n, r), r);
|
|
869
|
+
}
|
|
870
|
+
async function Ft(e, t, n) {
|
|
871
|
+
return Pt(g, e, t, n);
|
|
867
872
|
}
|
|
868
873
|
//#endregion
|
|
869
874
|
//#region src/web-api/helpers/methods/put.ts
|
|
870
|
-
async function
|
|
875
|
+
async function B(e, t, n, r) {
|
|
871
876
|
let i = D(e, r?.headers);
|
|
872
877
|
i.has("Content-Type") || i.set("Content-Type", "application/json");
|
|
873
878
|
let a = O(e, t);
|
|
@@ -882,23 +887,23 @@ async function V(e, t, n, r) {
|
|
|
882
887
|
throw _(e).error("Error making PUT request:", t), t;
|
|
883
888
|
}
|
|
884
889
|
}
|
|
885
|
-
async function
|
|
886
|
-
return
|
|
890
|
+
async function It(e, t, n) {
|
|
891
|
+
return B(g, e, t, n);
|
|
887
892
|
}
|
|
888
893
|
//#endregion
|
|
889
894
|
//#region src/web-api/v1/fetch-app.ts
|
|
890
|
-
async function
|
|
895
|
+
async function Lt(e, t = g) {
|
|
891
896
|
let n = e || t.config.app;
|
|
892
897
|
return R(t, "api/v1/app", new URLSearchParams({ app: n || "" }));
|
|
893
898
|
}
|
|
894
|
-
async function
|
|
899
|
+
async function Rt(e = g) {
|
|
895
900
|
let { app: t } = e.config;
|
|
896
901
|
return R(e, "api/v1/app", new URLSearchParams({
|
|
897
902
|
app: t || "",
|
|
898
903
|
preLogin: "true"
|
|
899
904
|
}));
|
|
900
905
|
}
|
|
901
|
-
function
|
|
906
|
+
function zt(e = g) {
|
|
902
907
|
let { backendUrl: t, app: n } = e.config;
|
|
903
908
|
if (typeof window < "u") {
|
|
904
909
|
if (t ||= window.location.origin, !n) {
|
|
@@ -915,7 +920,7 @@ function Lt(e = g) {
|
|
|
915
920
|
autoOAuthProvider: void 0,
|
|
916
921
|
autoSAMLProvider: void 0,
|
|
917
922
|
bearerToken: void 0
|
|
918
|
-
}), Promise.resolve({})) :
|
|
923
|
+
}), Promise.resolve({})) : Rt(e).then((t) => (b(e, {
|
|
919
924
|
authMode: Je(e.config, t),
|
|
920
925
|
autoOAuthProvider: e.config.autoOAuthProvider || t.autoOAuthProvider,
|
|
921
926
|
autoSAMLProvider: e.config.autoSAMLProvider || t.autoSAMLProvider
|
|
@@ -923,25 +928,25 @@ function Lt(e = g) {
|
|
|
923
928
|
throw _(e).error("atomic:fetchAppPreLogin error", t), t;
|
|
924
929
|
});
|
|
925
930
|
}
|
|
926
|
-
var
|
|
927
|
-
function
|
|
931
|
+
var Bt = zt, Vt = 10;
|
|
932
|
+
function Ht(e, t) {
|
|
928
933
|
let n = t?.aggregations;
|
|
929
934
|
if (!n || Array.isArray(n)) return;
|
|
930
935
|
let r = n[e]?.count;
|
|
931
936
|
return typeof r == "number" ? r : void 0;
|
|
932
937
|
}
|
|
933
|
-
function
|
|
934
|
-
let r =
|
|
938
|
+
function Ut(e, t, n) {
|
|
939
|
+
let r = Ht(e, t);
|
|
935
940
|
if (r !== void 0) return r;
|
|
936
941
|
let i = n?.[e];
|
|
937
942
|
return typeof i == "number" ? i : 10;
|
|
938
943
|
}
|
|
939
|
-
function
|
|
944
|
+
function Wt(e, t) {
|
|
940
945
|
return e.isDistribution || e.isTree || !e.items ? !1 : e.items.length > t;
|
|
941
946
|
}
|
|
942
947
|
//#endregion
|
|
943
948
|
//#region src/helpers/column-resolver.ts
|
|
944
|
-
function
|
|
949
|
+
function Gt(e, t, n) {
|
|
945
950
|
if (!e || !t) return;
|
|
946
951
|
if (n) {
|
|
947
952
|
let r = Object.keys(t.queries).find((e) => e === n?.toLowerCase()), i;
|
|
@@ -956,93 +961,93 @@ function Ut(e, t, n) {
|
|
|
956
961
|
}
|
|
957
962
|
//#endregion
|
|
958
963
|
//#region src/types/audit/AuditEventType.ts
|
|
959
|
-
var
|
|
964
|
+
var V = /* @__PURE__ */ function(e) {
|
|
960
965
|
return e.None = "None", e.Search_FirstPage = "Search_FirstPage", e.Search_Text = "Search_Text", e.Search_Refine = "Search_Refine", e.Search_Select_Item = "Search_Select_Item", e.Search_Select_Custom = "Search_Select_Custom", e.Search_Select_Concept = "Search_Select_Concept", e.Search_Select_Correction = "Search_Select_Correction", e.Search_GotoPage = "Search_GotoPage", e.Search_GotoTab = "Search_GotoTab", e.Search_DisplayResult = "Search_DisplayResult", e.Search_RemoveResult = "Search_RemoveResult", e.Search_RemoveAdvanced = "Search_RemoveAdvanced", e.Search_SavedQuery = "Search_SavedQuery", e.Search_WebService = "Search_WebService", e.Search_DidYouMean_Original = "Search_DidYouMean_Original", e.Search_DidYouMean_Correction = "Search_DidYouMean_Correction", e.Search_ExportCSV = "Search_ExportCSV", e.Search_SavedQuery_ExportCSV = "Search_SavedQuery_ExportCSV", e.Search_Selection_ExportCSV = "Search_Selection_ExportCSV", e.Search_AlertQuery = "Search_AlertQuery", e.Search_Select_AnalyticsItem = "Search_Select_AnalyticsItem", e.Search_Sort = "Search_Sort", e.Search_Exit_Logout = "Search_Exit_Logout", e.Search_Timeline_Usage = "Search_Timeline_Usage", e.Search_AutoComplete = "Search_Autocomplete", e.Search_Login_Success = "Login_Success_Form", e.Search_QueryIntent_Detected = "Search_QueryIntent_Detected", e.SavedQuery_Add = "SavedQuery_Add", e.SavedQuery_Delete = "SavedQuery_Delete", e.SavedQuery_DeleteAll = "SavedQuery_DeleteAll", e.SavedQuery_Rename = "SavedQuery_Rename", e.Alert_Edit = "Alert_Edit", e.Alert_Delete = "Alert_Delete", e.Alert_DeleteAll = "Alert_DeleteAll", e.Link_Display = "Link_Display", e.Link_Click = "Link_Click", e.Basket_Add = "Basket_Add", e.Basket_Delete = "Basket_Delete", e.Basket_DeleteAll = "Basket_DeleteAll", e.Basket_Rename = "Basket_Rename", e.Basket_AddDoc = "Basket_AddDoc", e.Basket_RemoveDoc = "Basket_RemoveDoc", e.Basket_Open = "Basket_Open", e.Basket_ExportCSV = "Basket_ExportCSV", e.Label_Add = "Label_Add", e.Label_Delete = "Label_Delete", e.Label_Rename = "Label_Rename", e.Label_Open = "Label_Open", e.Label_AddDoc = "Label_AddDoc", e.Label_RemoveDoc = "Label_RemoveDoc", e.Label_ExportCSV = "Label_ExportCSV", e.Label_Menu_ExportCSV = "Label_Menu_ExportCSV", e.Rating_Set = "Rating_Set", e.Rating_Delete = "Rating_Delete", e.Doc_Preview = "Doc_Preview", e.Doc_CacheHtml = "Doc_CacheHtml", e.Doc_CachePdf = "Doc_CachePdf", e.Doc_CacheOriginal = "Doc_CacheOriginal", e.Doc_Url1 = "Doc_Url1", e.Doc_Url2 = "Doc_Url2", e.Preview_Close = "Preview_Close", e.Click_ResultLink = "Click_ResultLink", e.Click_ResultLink1 = "Click_ResultLink1", e.Click_ResultLink2 = "Click_ResultLink2", e.Click_ResultLink3 = "Click_ResultLink3", e.Click_ResultLink4 = "Click_ResultLink4", e.Click_ResultLink5 = "Click_ResultLink5", e.Click_ResultLink6 = "Click_ResultLink6", e.Click_ResultLink7 = "Click_ResultLink7", e.Click_ResultLink8 = "Click_ResultLink8", e.Click_ResultLink9 = "Click_ResultLink9", e.Click_ResultLink10 = "Click_ResultLink10", e.Click_PreviewLink1 = "Click_PreviewLink1", e.Click_PreviewLink2 = "Click_PreviewLink2", e.Click_PreviewLink3 = "Click_PreviewLink3", e.Click_PreviewLink4 = "Click_PreviewLink4", e.Click_PreviewLink5 = "Click_PreviewLink5", e.Click_PreviewLink6 = "Click_PreviewLink6", e.Click_PreviewLink7 = "Click_PreviewLink7", e.Click_PreviewLink8 = "Click_PreviewLink8", e.Click_PreviewLink9 = "Click_PreviewLink9", e.Click_PreviewLink10 = "Click_PreviewLink10", e.RFM_ClickSet = "RFM_ClickSet", e.RFM_ClickReset = "RFM_ClickReset", e.RFM_Like = "RFM_Like", e.RFM_LikeReset = "RFM_LikeReset", e.RFM_Dislike = "RFM_Dislike", e.RFM_Important = "RFM_Important", e.RFM_ImportantReset = "RFM_ImportantReset", e.RFM_Ban = "RFM_Ban", e.Navigation_Exit = "Navigation_Exit", e.Navigation_Return = "Navigation_Return", e.Navigation_Route = "Navigation_Route", e.Answer_Display = "Answer_Display", e.Answer_Click = "Answer_Click", e.Answer_Result = "Answer_Result", e.Answer_Liked = "Answer_Liked", e.Answer_Disliked = "Answer_Disliked", e.Answer_Liked_Cancelled = "Answer_Liked_Cancelled", e.Answer_Disliked_Cancelled = "Answer_Disliked_Cancelled", e.TopPassages_Display = "TopPassages_Display", e.TopPassages_Click = "TopPassages_Click", e.UserSettings_Reset = "UserSettings_Reset", e.Change_Password_Failed = "change.password.failed", e.Change_Password_Success_Form = "change.password.success.form", e.Forgot_Password_Request = "forgot.password.request", e.Login_Denied = "login.denied", e.Login_Success_Form = "login.success.form", e.Send_Reset_Password_Link = "send.reset.password.link", e.Xrest_ChangePassword = "xrest.changepassword", e;
|
|
961
|
-
}({}),
|
|
966
|
+
}({}), H = /* @__PURE__ */ function(e) {
|
|
962
967
|
return e[e.none = 0] = "none", e[e.bool = 1] = "bool", e[e.date = 2] = "date", e[e.dateTime = 3] = "dateTime", e[e.time = 4] = "time", e[e.unsigned = 5] = "unsigned", e[e.integer = 6] = "integer", e[e.float = 7] = "float", e[e.double = 8] = "double", e[e.dates = 9] = "dates", e[e.dateTimes = 10] = "dateTimes", e[e.times = 11] = "times", e[e.varchar = 12] = "varchar", e[e.binary = 13] = "binary", e[e.string = 14] = "string", e[e.csv = 15] = "csv", e;
|
|
963
|
-
}({}),
|
|
968
|
+
}({}), U = /* @__PURE__ */ function(e) {
|
|
964
969
|
return e[e.none = 0] = "none", e[e.a = 2053] = "a", e[e.c = 4] = "c", e[e.d = 8] = "d", e[e.e = 2068] = "e", e[e.i = 256] = "i", e[e.l = 2052] = "l", e[e.n = 8192] = "n", e[e.t = 524292] = "t", e[e.x = 8388608] = "x", e[e.z = 33554432] = "z", e[e.f_ordinal = 8192] = "f_ordinal", e[e.f_multidates = 8192] = "f_multidates", e[e.f_varchar = 33554432] = "f_varchar", e[e.f_binary = 33562624] = "f_binary", e[e.f_string = 33562888] = "f_string", e[e.f_csv = 42477853] = "f_csv", e[e.f_overridable = 33554696] = "f_overridable", e;
|
|
965
|
-
}({}),
|
|
970
|
+
}({}), Kt = "1.0", qt = /* @__PURE__ */ function(e) {
|
|
966
971
|
return e[e.Original = 0] = "Original", e[e.Corrected = 1] = "Corrected", e;
|
|
967
|
-
}({}),
|
|
972
|
+
}({}), Jt = /* @__PURE__ */ function(e) {
|
|
968
973
|
return e[e.none = 0] = "none", e[e.positiveRate = 1] = "positiveRate", e[e.mainlyPosRate = 2] = "mainlyPosRate", e[e.unrate = 4] = "unrate", e[e.mainlyNegRate = 8] = "mainlyNegRate", e[e.negativeRate = 16] = "negativeRate", e[e.all = 31] = "all", e[e.positiveOnly = 7] = "positiveOnly", e[e.negativeOnly = 28] = "negativeOnly", e[e.personalAll = 21] = "personalAll", e[e.personalPosOnly = 5] = "personalPosOnly", e[e.personalNegOnly = 20] = "personalNegOnly", e;
|
|
969
974
|
}({});
|
|
970
975
|
//#endregion
|
|
971
976
|
//#region src/helpers/columns.ts
|
|
972
|
-
function
|
|
973
|
-
if (!e) return
|
|
977
|
+
function Yt(e) {
|
|
978
|
+
if (!e) return H.none;
|
|
974
979
|
switch (e.toLocaleLowerCase()) {
|
|
975
980
|
case "bool":
|
|
976
|
-
case "boolean": return
|
|
977
|
-
case "date": return
|
|
978
|
-
case "datetime": return
|
|
979
|
-
case "time": return
|
|
980
|
-
case "unsigned": return
|
|
981
|
-
case "integer": return
|
|
982
|
-
case "float": return
|
|
983
|
-
case "double": return
|
|
984
|
-
case "dates": return
|
|
985
|
-
case "datetimes": return
|
|
986
|
-
case "times": return
|
|
987
|
-
case "varchar": return
|
|
988
|
-
case "binary": return
|
|
989
|
-
case "string": return
|
|
990
|
-
case "csv": return
|
|
991
|
-
default: return
|
|
981
|
+
case "boolean": return H.bool;
|
|
982
|
+
case "date": return H.date;
|
|
983
|
+
case "datetime": return H.dateTime;
|
|
984
|
+
case "time": return H.time;
|
|
985
|
+
case "unsigned": return H.unsigned;
|
|
986
|
+
case "integer": return H.integer;
|
|
987
|
+
case "float": return H.float;
|
|
988
|
+
case "double": return H.double;
|
|
989
|
+
case "dates": return H.dates;
|
|
990
|
+
case "datetimes": return H.dateTimes;
|
|
991
|
+
case "times": return H.times;
|
|
992
|
+
case "varchar": return H.varchar;
|
|
993
|
+
case "binary": return H.binary;
|
|
994
|
+
case "string": return H.string;
|
|
995
|
+
case "csv": return H.csv;
|
|
996
|
+
default: return H.none;
|
|
992
997
|
}
|
|
993
998
|
}
|
|
994
|
-
function
|
|
999
|
+
function Xt(e) {
|
|
995
1000
|
switch (e) {
|
|
996
|
-
case "a": return
|
|
997
|
-
case "c": return
|
|
998
|
-
case "d": return
|
|
999
|
-
case "e": return
|
|
1000
|
-
case "i": return
|
|
1001
|
-
case "l": return
|
|
1002
|
-
case "n": return
|
|
1003
|
-
case "t": return
|
|
1004
|
-
case "x": return
|
|
1005
|
-
case "z": return
|
|
1006
|
-
default: return
|
|
1001
|
+
case "a": return U.a;
|
|
1002
|
+
case "c": return U.c;
|
|
1003
|
+
case "d": return U.d;
|
|
1004
|
+
case "e": return U.e;
|
|
1005
|
+
case "i": return U.i;
|
|
1006
|
+
case "l": return U.l;
|
|
1007
|
+
case "n": return U.n;
|
|
1008
|
+
case "t": return U.t;
|
|
1009
|
+
case "x": return U.x;
|
|
1010
|
+
case "z": return U.z;
|
|
1011
|
+
default: return U.none;
|
|
1007
1012
|
}
|
|
1008
1013
|
}
|
|
1009
|
-
function
|
|
1010
|
-
let t =
|
|
1011
|
-
if (e) for (let n of e) t |=
|
|
1014
|
+
function Zt(e) {
|
|
1015
|
+
let t = U.none;
|
|
1016
|
+
if (e) for (let n of e) t |= Xt(n);
|
|
1012
1017
|
return t;
|
|
1013
1018
|
}
|
|
1014
|
-
function
|
|
1019
|
+
function W(e, t, n, r) {
|
|
1015
1020
|
return {
|
|
1016
1021
|
name: e,
|
|
1017
1022
|
type: t,
|
|
1018
1023
|
typeModifier: n,
|
|
1019
|
-
eType:
|
|
1020
|
-
eTypeModifier:
|
|
1024
|
+
eType: Yt(t),
|
|
1025
|
+
eTypeModifier: Zt(n || ""),
|
|
1021
1026
|
aliases: r
|
|
1022
1027
|
};
|
|
1023
1028
|
}
|
|
1024
|
-
var
|
|
1025
|
-
id:
|
|
1026
|
-
text:
|
|
1027
|
-
documentlanguages:
|
|
1028
|
-
databasealias:
|
|
1029
|
-
globalrelevance:
|
|
1030
|
-
matchingpartnames:
|
|
1031
|
-
matchlocations:
|
|
1032
|
-
matchlocationsperpartname:
|
|
1033
|
-
extracts:
|
|
1034
|
-
extractsperpartname:
|
|
1035
|
-
extractslocations:
|
|
1036
|
-
documentweight:
|
|
1037
|
-
groupcount:
|
|
1038
|
-
accesslists:
|
|
1029
|
+
var Qt = {
|
|
1030
|
+
id: W("id", "string"),
|
|
1031
|
+
text: W("text", "varchar"),
|
|
1032
|
+
documentlanguages: W("documentlanguages", "csv", "ci", ["language"]),
|
|
1033
|
+
databasealias: W("databasealias", "varchar"),
|
|
1034
|
+
globalrelevance: W("globalrelevance", "double"),
|
|
1035
|
+
matchingpartnames: W("matchingpartnames", "csv"),
|
|
1036
|
+
matchlocations: W("matchlocations", "csv"),
|
|
1037
|
+
matchlocationsperpartname: W("matchlocationsperpartname", "varchar"),
|
|
1038
|
+
extracts: W("extracts", "csv"),
|
|
1039
|
+
extractsperpartname: W("extractsperpartname", "varchar"),
|
|
1040
|
+
extractslocations: W("extractslocations", "csv"),
|
|
1041
|
+
documentweight: W("documentweight", "varchar"),
|
|
1042
|
+
groupcount: W("groupcount", "integer"),
|
|
1043
|
+
accesslists: W("accesslists", "varchar", void 0, ["accessLists"])
|
|
1039
1044
|
};
|
|
1040
1045
|
//#endregion
|
|
1041
1046
|
//#region src/helpers/filters.ts
|
|
1042
|
-
function
|
|
1047
|
+
function $t(e) {
|
|
1043
1048
|
return e.filter((e) => !!e);
|
|
1044
1049
|
}
|
|
1045
|
-
var
|
|
1050
|
+
var G = {
|
|
1046
1051
|
eq: (e, t) => ({
|
|
1047
1052
|
field: e,
|
|
1048
1053
|
operator: "eq",
|
|
@@ -1113,44 +1118,44 @@ var K = {
|
|
|
1113
1118
|
if (!n) return;
|
|
1114
1119
|
let r = n.split(" AND ").map((e) => e.trim()).filter(Boolean).map((t) => {
|
|
1115
1120
|
let n = t.substring(t.search(/\s/) + 1).trim();
|
|
1116
|
-
return t.startsWith(">=") ?
|
|
1121
|
+
return t.startsWith(">=") ? G.gte(e, n) : t.startsWith(">") ? G.gt(e, n) : t.startsWith("<=") ? G.lte(e, n) : G.lt(e, n);
|
|
1117
1122
|
});
|
|
1118
|
-
return
|
|
1123
|
+
return G.and(...r);
|
|
1119
1124
|
},
|
|
1120
|
-
and: (...e) =>
|
|
1121
|
-
or: (...e) =>
|
|
1125
|
+
and: (...e) => en("and", e),
|
|
1126
|
+
or: (...e) => en("or", e),
|
|
1122
1127
|
not: (...e) => {
|
|
1123
|
-
let t =
|
|
1128
|
+
let t = $t(e);
|
|
1124
1129
|
return t.length ? {
|
|
1125
1130
|
operator: "not",
|
|
1126
1131
|
filters: t
|
|
1127
1132
|
} : void 0;
|
|
1128
1133
|
}
|
|
1129
1134
|
};
|
|
1130
|
-
function
|
|
1131
|
-
let n =
|
|
1135
|
+
function en(e, t) {
|
|
1136
|
+
let n = $t(t);
|
|
1132
1137
|
if (n.length !== 0) return n.length === 1 ? n[0] : {
|
|
1133
1138
|
operator: e,
|
|
1134
1139
|
filters: n
|
|
1135
1140
|
};
|
|
1136
1141
|
}
|
|
1137
|
-
function
|
|
1142
|
+
function tn(e) {
|
|
1138
1143
|
if (!e) return;
|
|
1139
1144
|
let { operator: t, field: n } = e;
|
|
1140
1145
|
switch (t) {
|
|
1141
1146
|
case "and":
|
|
1142
1147
|
case "or": {
|
|
1143
|
-
let n = (e.filters ?? []).map((e) =>
|
|
1144
|
-
return t === "and" ?
|
|
1148
|
+
let n = (e.filters ?? []).map((e) => tn(e));
|
|
1149
|
+
return t === "and" ? G.and(...n) : G.or(...n);
|
|
1145
1150
|
}
|
|
1146
1151
|
case "not": {
|
|
1147
|
-
let t = (e.filters ?? []).map((e) =>
|
|
1148
|
-
return
|
|
1152
|
+
let t = (e.filters ?? []).map((e) => tn(e));
|
|
1153
|
+
return G.not(...t);
|
|
1149
1154
|
}
|
|
1150
|
-
case "in": return n && e.values?.length ?
|
|
1151
|
-
case "between": return n && e.start !== void 0 && e.end !== void 0 ?
|
|
1152
|
-
case "null": return n ?
|
|
1153
|
-
case "notnull": return n ?
|
|
1155
|
+
case "in": return n && e.values?.length ? G.in(n, e.values) : void 0;
|
|
1156
|
+
case "between": return n && e.start !== void 0 && e.end !== void 0 ? G.between(n, e.start, e.end) : void 0;
|
|
1157
|
+
case "null": return n ? G.isNull(n) : void 0;
|
|
1158
|
+
case "notnull": return n ? G.isNotNull(n) : void 0;
|
|
1154
1159
|
case "eq":
|
|
1155
1160
|
case "neq":
|
|
1156
1161
|
case "gt":
|
|
@@ -1159,12 +1164,12 @@ function $t(e) {
|
|
|
1159
1164
|
case "lte":
|
|
1160
1165
|
case "like":
|
|
1161
1166
|
case "contains":
|
|
1162
|
-
case "regex": return n && e.value !== void 0 ?
|
|
1163
|
-
case void 0: return n && e.value !== void 0 ?
|
|
1167
|
+
case "regex": return n && e.value !== void 0 ? G[t](n, e.value) : void 0;
|
|
1168
|
+
case void 0: return n && e.value !== void 0 ? G.eq(n, e.value) : void 0;
|
|
1164
1169
|
default: return;
|
|
1165
1170
|
}
|
|
1166
1171
|
}
|
|
1167
|
-
function
|
|
1172
|
+
function nn(e) {
|
|
1168
1173
|
let t = [];
|
|
1169
1174
|
function n(e) {
|
|
1170
1175
|
for (let r of e) r.value ? (t.push(r.value), r.display && t.push(r.display)) : r.values && t.push(...r.values), r.filters && n(r.filters);
|
|
@@ -1173,14 +1178,14 @@ function en(e) {
|
|
|
1173
1178
|
}
|
|
1174
1179
|
//#endregion
|
|
1175
1180
|
//#region src/helpers/metadata.ts
|
|
1176
|
-
function
|
|
1181
|
+
function rn(e, t) {
|
|
1177
1182
|
let n = e[t];
|
|
1178
1183
|
return n === void 0 ? [] : (typeof n == "string" && (n = String(n).split(",")), Array.isArray(n) ? n.map((e) => {
|
|
1179
1184
|
if (typeof e == "string") return e.trim();
|
|
1180
1185
|
if (typeof e == "object" && e && "display" in e) return e.display.trim();
|
|
1181
1186
|
}).filter((e) => e !== void 0) : [String(n).trim()]);
|
|
1182
1187
|
}
|
|
1183
|
-
function
|
|
1188
|
+
function an(e, t) {
|
|
1184
1189
|
let n = e[t];
|
|
1185
1190
|
if (n === void 0) return [];
|
|
1186
1191
|
if (typeof n == "string" && (n = String(n).split(",")), Array.isArray(n)) return n.map((e) => {
|
|
@@ -1204,7 +1209,7 @@ function nn(e, t) {
|
|
|
1204
1209
|
}
|
|
1205
1210
|
//#endregion
|
|
1206
1211
|
//#region src/helpers/pagination.ts
|
|
1207
|
-
function
|
|
1212
|
+
function on(e) {
|
|
1208
1213
|
let { page: t, pageSize: n, rowCount: r } = e;
|
|
1209
1214
|
return t === void 0 || !n || r === void 0 ? {
|
|
1210
1215
|
nextPage: void 0,
|
|
@@ -1216,35 +1221,35 @@ function rn(e) {
|
|
|
1216
1221
|
}
|
|
1217
1222
|
//#endregion
|
|
1218
1223
|
//#region src/helpers/utils.ts
|
|
1219
|
-
function
|
|
1224
|
+
function K(e) {
|
|
1220
1225
|
return typeof e == "object" && !!e;
|
|
1221
1226
|
}
|
|
1222
|
-
function an(e) {
|
|
1223
|
-
return q(e) && Object.prototype.toString.call(e) === "[object ArrayBuffer]";
|
|
1224
|
-
}
|
|
1225
|
-
function on(e) {
|
|
1226
|
-
return q(e) && Object.prototype.toString.call(e) === "[object Blob]";
|
|
1227
|
-
}
|
|
1228
1227
|
function sn(e) {
|
|
1229
|
-
return Object.prototype.toString.call(e) === "[object
|
|
1228
|
+
return K(e) && Object.prototype.toString.call(e) === "[object ArrayBuffer]";
|
|
1230
1229
|
}
|
|
1231
1230
|
function cn(e) {
|
|
1232
|
-
return
|
|
1231
|
+
return K(e) && Object.prototype.toString.call(e) === "[object Blob]";
|
|
1233
1232
|
}
|
|
1234
1233
|
function ln(e) {
|
|
1235
|
-
return
|
|
1234
|
+
return Object.prototype.toString.call(e) === "[object Date]";
|
|
1236
1235
|
}
|
|
1237
1236
|
function un(e) {
|
|
1237
|
+
return typeof e == "string";
|
|
1238
|
+
}
|
|
1239
|
+
function dn(e) {
|
|
1240
|
+
return (K(e) || Array.isArray(e)) && !sn(e) && !cn(e) && !un(e);
|
|
1241
|
+
}
|
|
1242
|
+
function fn(e) {
|
|
1238
1243
|
return e ? (e.getHours() * 60 * 60 + e.getMinutes() * 60 + e.getSeconds()) * 1e3 + e.getMilliseconds() : 0;
|
|
1239
1244
|
}
|
|
1240
|
-
function
|
|
1245
|
+
function pn(e = !0) {
|
|
1241
1246
|
let t = Date.now();
|
|
1242
1247
|
return (e ? "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" : "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx").replace(/[xy]/g, (e) => {
|
|
1243
1248
|
let n = (t + Math.random() * 16) % 16 | 0;
|
|
1244
1249
|
return t = Math.floor(t / 16), (e === "x" ? n : n & 3 | 8).toString(16);
|
|
1245
1250
|
});
|
|
1246
1251
|
}
|
|
1247
|
-
function
|
|
1252
|
+
function mn(e) {
|
|
1248
1253
|
if (!e) return "``";
|
|
1249
1254
|
if (e = String(e), e.search(/[\\`]/) === -1) return `\`${e}\``;
|
|
1250
1255
|
let t = ["`"];
|
|
@@ -1254,13 +1259,13 @@ function fn(e) {
|
|
|
1254
1259
|
}
|
|
1255
1260
|
return t.push("`"), t.join("");
|
|
1256
1261
|
}
|
|
1257
|
-
async function
|
|
1262
|
+
async function hn(e) {
|
|
1258
1263
|
let t = globalThis.crypto?.subtle;
|
|
1259
1264
|
if (typeof t?.digest != "function") throw Error("sha512 requires the Web Crypto API, and `crypto.subtle` is unavailable here. That usually means an insecure context: it is exposed over HTTPS and on localhost, but not over plain HTTP. Serve the application over HTTPS.");
|
|
1260
1265
|
let n = await t.digest("SHA-512", new TextEncoder().encode(e));
|
|
1261
1266
|
return Array.from(new Uint8Array(n), (e) => e.toString(16).padStart(2, "0")).join("");
|
|
1262
1267
|
}
|
|
1263
|
-
function
|
|
1268
|
+
function gn(e, t = 0) {
|
|
1264
1269
|
let n = 3735928559 ^ t, r = 1103547991 ^ t;
|
|
1265
1270
|
for (let t = 0; t < e.length; t++) {
|
|
1266
1271
|
let i = e.charCodeAt(t);
|
|
@@ -1270,52 +1275,52 @@ function mn(e, t = 0) {
|
|
|
1270
1275
|
}
|
|
1271
1276
|
//#endregion
|
|
1272
1277
|
//#region src/web-api/v1/fetch-audit.ts
|
|
1273
|
-
var
|
|
1274
|
-
function
|
|
1275
|
-
let n =
|
|
1276
|
-
n && (
|
|
1278
|
+
var _n, vn;
|
|
1279
|
+
function q(e, t = !0) {
|
|
1280
|
+
let n = yn(e.$auditRecord);
|
|
1281
|
+
n && (bn(n), t && xn(n)), e.$auditRecord = n;
|
|
1277
1282
|
}
|
|
1278
|
-
function
|
|
1283
|
+
function yn(e) {
|
|
1279
1284
|
if (!e) return;
|
|
1280
1285
|
let t;
|
|
1281
1286
|
if (Array.isArray(e)) t = e;
|
|
1282
|
-
else if (
|
|
1287
|
+
else if (K(e)) {
|
|
1283
1288
|
let n = e;
|
|
1284
1289
|
if (n.auditEvents || n.mlAuditEvents) return n;
|
|
1285
1290
|
t = [e];
|
|
1286
1291
|
}
|
|
1287
1292
|
return { auditEvents: t };
|
|
1288
1293
|
}
|
|
1289
|
-
function
|
|
1290
|
-
let t =
|
|
1294
|
+
function bn(e) {
|
|
1295
|
+
let t = Sn();
|
|
1291
1296
|
return e.auditEvents?.forEach((e) => {
|
|
1292
1297
|
e.detail ||= {}, e.detail.sessionid = t;
|
|
1293
1298
|
}), e;
|
|
1294
1299
|
}
|
|
1295
|
-
function
|
|
1300
|
+
function xn(e) {
|
|
1296
1301
|
let t = typeof window < "u" ? decodeURIComponent(window.location.href) : "http://localhost";
|
|
1297
1302
|
return e?.auditEvents?.forEach((e) => {
|
|
1298
1303
|
e.detail ||= {}, e.detail.url = t;
|
|
1299
1304
|
}), e;
|
|
1300
1305
|
}
|
|
1301
|
-
function
|
|
1302
|
-
return (!
|
|
1306
|
+
function Sn() {
|
|
1307
|
+
return (!_n || Cn()) && (_n = pn()), vn = /* @__PURE__ */ new Date(), _n;
|
|
1303
1308
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return Date.now() -
|
|
1309
|
+
function Cn() {
|
|
1310
|
+
return Date.now() - vn.getTime() > 6e5;
|
|
1306
1311
|
}
|
|
1307
|
-
async function
|
|
1312
|
+
async function wn(e, t = !0, n = g) {
|
|
1308
1313
|
let r = {
|
|
1309
|
-
event:
|
|
1314
|
+
event: V.None,
|
|
1310
1315
|
$auditRecord: e
|
|
1311
1316
|
};
|
|
1312
|
-
return
|
|
1317
|
+
return q(r, t), I(n, "api/v1/audit.notify", r, { noRecovery: !0 });
|
|
1313
1318
|
}
|
|
1314
|
-
var
|
|
1319
|
+
var Tn = { notify: wn };
|
|
1315
1320
|
//#endregion
|
|
1316
1321
|
//#region src/web-api/v1/fetch-aggregation.ts
|
|
1317
|
-
async function
|
|
1318
|
-
let a = r ??
|
|
1322
|
+
async function En(e, t, n, r, i = g) {
|
|
1323
|
+
let a = r ?? Ut(e.name, t, i.config.aggregationCounts), o = e.items?.length || 0, s = {
|
|
1319
1324
|
query: {
|
|
1320
1325
|
...t,
|
|
1321
1326
|
action: "aggregate",
|
|
@@ -1326,30 +1331,30 @@ async function wn(e, t, n, r, i = g) {
|
|
|
1326
1331
|
},
|
|
1327
1332
|
...n ? { $auditRecord: { auditEvents: [n] } } : {}
|
|
1328
1333
|
};
|
|
1329
|
-
|
|
1334
|
+
q(s);
|
|
1330
1335
|
let c = (await I(i, "api/v1/query", s)).aggregations[0];
|
|
1331
|
-
return c.$hasMore =
|
|
1336
|
+
return c.$hasMore = Wt(c, a), c.items = [...e.items ?? [], ...c.items ?? []], Promise.resolve(c);
|
|
1332
1337
|
}
|
|
1333
1338
|
//#endregion
|
|
1334
1339
|
//#region src/web-api/v1/fetch-dataset.ts
|
|
1335
|
-
async function
|
|
1340
|
+
async function Dn(e, t, n = {}, r = g) {
|
|
1336
1341
|
let i = await I(r, `api/v1/search.dataset/${e}/${t}`, { parameters: n }), a = t[0].toLowerCase() + t.slice(1), o = i.datasets[a];
|
|
1337
1342
|
if ("errorCode" in o && "errorMessage" in o) throw Error(o.errorMessage);
|
|
1338
1343
|
return o;
|
|
1339
1344
|
}
|
|
1340
|
-
async function
|
|
1345
|
+
async function On(e, t, n = g) {
|
|
1341
1346
|
let r = `api/v1/search.dataset/${e}`, { parameters: i = {}, datasets: a = [] } = t;
|
|
1342
1347
|
return (await I(n, r, {
|
|
1343
1348
|
parameters: i,
|
|
1344
1349
|
datasets: a
|
|
1345
1350
|
})).datasets;
|
|
1346
1351
|
}
|
|
1347
|
-
async function
|
|
1352
|
+
async function kn(e, t = g) {
|
|
1348
1353
|
return await R(t, `api/v1/search.dataset/${e}`);
|
|
1349
1354
|
}
|
|
1350
1355
|
//#endregion
|
|
1351
1356
|
//#region src/web-api/v1/fetch-labels.ts
|
|
1352
|
-
async function
|
|
1357
|
+
async function An(e, t = !0, n, r = g) {
|
|
1353
1358
|
try {
|
|
1354
1359
|
return (await I(r, "api/v1/labels", {
|
|
1355
1360
|
action: "list",
|
|
@@ -1362,7 +1367,7 @@ async function On(e, t = !0, n, r = g) {
|
|
|
1362
1367
|
throw l("Error in fetchLabels", e), e;
|
|
1363
1368
|
}
|
|
1364
1369
|
}
|
|
1365
|
-
async function
|
|
1370
|
+
async function jn(e = g) {
|
|
1366
1371
|
try {
|
|
1367
1372
|
let { app: t = "" } = e.config;
|
|
1368
1373
|
return await R(e, "api/v1/labels", new URLSearchParams({
|
|
@@ -1373,7 +1378,7 @@ async function kn(e = g) {
|
|
|
1373
1378
|
throw l("Error in getUserRights", e), e;
|
|
1374
1379
|
}
|
|
1375
1380
|
}
|
|
1376
|
-
async function
|
|
1381
|
+
async function Mn(e, t, n = !0, r = g) {
|
|
1377
1382
|
try {
|
|
1378
1383
|
let i = {
|
|
1379
1384
|
action: "add",
|
|
@@ -1382,7 +1387,7 @@ async function An(e, t, n = !0, r = g) {
|
|
|
1382
1387
|
public: n,
|
|
1383
1388
|
$auditRecord: {
|
|
1384
1389
|
auditEvents: [{
|
|
1385
|
-
type:
|
|
1390
|
+
type: V.Label_AddDoc,
|
|
1386
1391
|
detail: {
|
|
1387
1392
|
public: n,
|
|
1388
1393
|
label: e ? e.toString() : null,
|
|
@@ -1395,12 +1400,12 @@ async function An(e, t, n = !0, r = g) {
|
|
|
1395
1400
|
}]
|
|
1396
1401
|
}
|
|
1397
1402
|
};
|
|
1398
|
-
return
|
|
1403
|
+
return q(i), await I(r, "api/v1/labels", i);
|
|
1399
1404
|
} catch (e) {
|
|
1400
1405
|
throw l("Error in add", e), e;
|
|
1401
1406
|
}
|
|
1402
1407
|
}
|
|
1403
|
-
async function
|
|
1408
|
+
async function Nn(e, t, n = !0, r = g) {
|
|
1404
1409
|
try {
|
|
1405
1410
|
let i = {
|
|
1406
1411
|
action: "remove",
|
|
@@ -1409,7 +1414,7 @@ async function jn(e, t, n = !0, r = g) {
|
|
|
1409
1414
|
public: n,
|
|
1410
1415
|
$auditRecord: {
|
|
1411
1416
|
auditEvents: [{
|
|
1412
|
-
type:
|
|
1417
|
+
type: V.Label_RemoveDoc,
|
|
1413
1418
|
detail: {
|
|
1414
1419
|
public: n,
|
|
1415
1420
|
label: e ? e.toString() : null,
|
|
@@ -1422,12 +1427,12 @@ async function jn(e, t, n = !0, r = g) {
|
|
|
1422
1427
|
}]
|
|
1423
1428
|
}
|
|
1424
1429
|
};
|
|
1425
|
-
return
|
|
1430
|
+
return q(i), await I(r, "api/v1/labels", i);
|
|
1426
1431
|
} catch (e) {
|
|
1427
1432
|
throw l("Error in remove", e), e;
|
|
1428
1433
|
}
|
|
1429
1434
|
}
|
|
1430
|
-
async function
|
|
1435
|
+
async function Pn(e, t, n = !0, r = g) {
|
|
1431
1436
|
try {
|
|
1432
1437
|
let i = {
|
|
1433
1438
|
action: "rename",
|
|
@@ -1435,7 +1440,7 @@ async function Mn(e, t, n = !0, r = g) {
|
|
|
1435
1440
|
newLabel: t,
|
|
1436
1441
|
public: n,
|
|
1437
1442
|
$auditRecord: { auditEvents: [{
|
|
1438
|
-
type:
|
|
1443
|
+
type: V.Label_Rename,
|
|
1439
1444
|
detail: {
|
|
1440
1445
|
public: n,
|
|
1441
1446
|
oldlabel: e ? e.toString() : null,
|
|
@@ -1443,31 +1448,31 @@ async function Mn(e, t, n = !0, r = g) {
|
|
|
1443
1448
|
}
|
|
1444
1449
|
}] }
|
|
1445
1450
|
};
|
|
1446
|
-
return
|
|
1451
|
+
return q(i), await I(r, "api/v1/labels", i);
|
|
1447
1452
|
} catch (e) {
|
|
1448
1453
|
throw l("Error in rename", e), e;
|
|
1449
1454
|
}
|
|
1450
1455
|
}
|
|
1451
|
-
async function
|
|
1456
|
+
async function Fn(e, t = !0, n = g) {
|
|
1452
1457
|
try {
|
|
1453
1458
|
let r = {
|
|
1454
1459
|
action: "delete",
|
|
1455
1460
|
labels: e,
|
|
1456
1461
|
public: t,
|
|
1457
1462
|
$auditRecord: { auditEvents: [{
|
|
1458
|
-
type:
|
|
1463
|
+
type: V.Label_Delete,
|
|
1459
1464
|
detail: {
|
|
1460
1465
|
public: t,
|
|
1461
1466
|
label: e ? e.toString() : null
|
|
1462
1467
|
}
|
|
1463
1468
|
}] }
|
|
1464
1469
|
};
|
|
1465
|
-
return
|
|
1470
|
+
return q(r), await I(n, "api/v1/labels", r);
|
|
1466
1471
|
} catch (e) {
|
|
1467
1472
|
throw l("Error in deleteLabels", e), e;
|
|
1468
1473
|
}
|
|
1469
1474
|
}
|
|
1470
|
-
async function
|
|
1475
|
+
async function In(e, t, n = !0, r = g) {
|
|
1471
1476
|
try {
|
|
1472
1477
|
let i = {
|
|
1473
1478
|
action: "bulkAdd",
|
|
@@ -1475,7 +1480,7 @@ async function Pn(e, t, n = !0, r = g) {
|
|
|
1475
1480
|
query: t,
|
|
1476
1481
|
public: n,
|
|
1477
1482
|
$auditRecord: { auditEvents: [{
|
|
1478
|
-
type:
|
|
1483
|
+
type: V.Label_Add,
|
|
1479
1484
|
detail: {
|
|
1480
1485
|
public: n,
|
|
1481
1486
|
label: e ? e.toString() : null,
|
|
@@ -1483,12 +1488,12 @@ async function Pn(e, t, n = !0, r = g) {
|
|
|
1483
1488
|
}
|
|
1484
1489
|
}] }
|
|
1485
1490
|
};
|
|
1486
|
-
return
|
|
1491
|
+
return q(i), await I(r, "api/v1/labels", i);
|
|
1487
1492
|
} catch (e) {
|
|
1488
1493
|
throw l("Error in bulkAdd", e), e;
|
|
1489
1494
|
}
|
|
1490
1495
|
}
|
|
1491
|
-
async function
|
|
1496
|
+
async function Ln(e, t, n = !0, r = g) {
|
|
1492
1497
|
try {
|
|
1493
1498
|
let i = {
|
|
1494
1499
|
action: "bulkRemove",
|
|
@@ -1496,7 +1501,7 @@ async function Fn(e, t, n = !0, r = g) {
|
|
|
1496
1501
|
query: t,
|
|
1497
1502
|
public: n,
|
|
1498
1503
|
$auditRecord: { auditEvents: [{
|
|
1499
|
-
type:
|
|
1504
|
+
type: V.Label_Delete,
|
|
1500
1505
|
detail: {
|
|
1501
1506
|
public: n,
|
|
1502
1507
|
label: e ? e.toString() : null,
|
|
@@ -1504,23 +1509,23 @@ async function Fn(e, t, n = !0, r = g) {
|
|
|
1504
1509
|
}
|
|
1505
1510
|
}] }
|
|
1506
1511
|
};
|
|
1507
|
-
return
|
|
1512
|
+
return q(i), await I(r, "api/v1/labels", i);
|
|
1508
1513
|
} catch (e) {
|
|
1509
1514
|
throw l("Error in bulkRemove", e), e;
|
|
1510
1515
|
}
|
|
1511
1516
|
}
|
|
1512
|
-
var
|
|
1513
|
-
getUserRights:
|
|
1514
|
-
add:
|
|
1515
|
-
remove:
|
|
1516
|
-
rename:
|
|
1517
|
-
delete:
|
|
1518
|
-
bulkAdd:
|
|
1519
|
-
bulkRemove:
|
|
1517
|
+
var J = {
|
|
1518
|
+
getUserRights: jn,
|
|
1519
|
+
add: Mn,
|
|
1520
|
+
remove: Nn,
|
|
1521
|
+
rename: Pn,
|
|
1522
|
+
delete: Fn,
|
|
1523
|
+
bulkAdd: In,
|
|
1524
|
+
bulkRemove: Ln
|
|
1520
1525
|
};
|
|
1521
1526
|
//#endregion
|
|
1522
1527
|
//#region src/web-api/v1/fetch-preview.ts
|
|
1523
|
-
async function
|
|
1528
|
+
async function Rn(e, t, n = g) {
|
|
1524
1529
|
if (typeof window > "u") return I(n, "api/v1/preview", {
|
|
1525
1530
|
action: "get",
|
|
1526
1531
|
id: e,
|
|
@@ -1537,7 +1542,7 @@ async function In(e, t, n = g) {
|
|
|
1537
1542
|
browserUrl: r
|
|
1538
1543
|
});
|
|
1539
1544
|
}
|
|
1540
|
-
async function
|
|
1545
|
+
async function zn(e, t = g) {
|
|
1541
1546
|
return P(t, /^[a-z][a-z0-9+.-]*:\/\//i.test(e) ? e : O(t, e.replace(/^\//, "")), {
|
|
1542
1547
|
method: "GET",
|
|
1543
1548
|
headers: D(t)
|
|
@@ -1545,58 +1550,58 @@ async function Ln(e, t = g) {
|
|
|
1545
1550
|
}
|
|
1546
1551
|
//#endregion
|
|
1547
1552
|
//#region src/web-api/v1/fetch-principal.ts
|
|
1548
|
-
async function
|
|
1553
|
+
async function Bn(e, t = g) {
|
|
1549
1554
|
return R(t, "api/v1/principal", new URLSearchParams({ action: "get" }), {
|
|
1550
1555
|
noAutoAuthentication: N(t),
|
|
1551
1556
|
...e
|
|
1552
1557
|
});
|
|
1553
1558
|
}
|
|
1554
|
-
async function
|
|
1559
|
+
async function Vn(e, t = g) {
|
|
1555
1560
|
let n = new URLSearchParams();
|
|
1556
1561
|
return Object.entries(e).forEach(([e, t]) => {
|
|
1557
1562
|
t !== void 0 && n.append(e, String(t));
|
|
1558
1563
|
}), R(t, "api/v1/principal/list", n, { noAutoAuthentication: N(t) });
|
|
1559
1564
|
}
|
|
1560
|
-
async function
|
|
1565
|
+
async function Hn(e, t = g) {
|
|
1561
1566
|
return e ? R(t, "api/v1/principal", new URLSearchParams({
|
|
1562
1567
|
action: "userid",
|
|
1563
1568
|
userid: e
|
|
1564
1569
|
}), { noAutoAuthentication: N(t) }) : Promise.reject(/* @__PURE__ */ Error("userid is required"));
|
|
1565
1570
|
}
|
|
1566
|
-
async function
|
|
1571
|
+
async function Un(e, t = g) {
|
|
1567
1572
|
return e.length === 0 ? Promise.reject(/* @__PURE__ */ Error("userids is required")) : R(t, "api/v1/principal/userids", new URLSearchParams({ userids: [...e].join(",") }), { noAutoAuthentication: N(t) });
|
|
1568
1573
|
}
|
|
1569
|
-
var
|
|
1570
|
-
get:
|
|
1571
|
-
list:
|
|
1572
|
-
userid:
|
|
1573
|
-
userids:
|
|
1574
|
+
var Wn = { principal: {
|
|
1575
|
+
get: Bn,
|
|
1576
|
+
list: Vn,
|
|
1577
|
+
userid: Hn,
|
|
1578
|
+
userids: Un
|
|
1574
1579
|
} };
|
|
1575
1580
|
//#endregion
|
|
1576
1581
|
//#region src/web-api/v1/fetch-query.ts
|
|
1577
|
-
function
|
|
1582
|
+
function Gn(e, t, n) {
|
|
1578
1583
|
let r = n.config.aggregationCounts;
|
|
1579
1584
|
e.aggregations?.forEach((e) => {
|
|
1580
|
-
e.$hasMore =
|
|
1585
|
+
e.$hasMore = Wt(e, Ut(e.name, t, r)), e.isTree && Jn(e);
|
|
1581
1586
|
});
|
|
1582
1587
|
}
|
|
1583
|
-
async function
|
|
1588
|
+
async function Kn(e, t, n, r = g) {
|
|
1584
1589
|
let i = await I(r, "api/v1/query", {
|
|
1585
1590
|
query: e,
|
|
1586
1591
|
$auditRecord: t,
|
|
1587
1592
|
queryIntentData: n
|
|
1588
1593
|
});
|
|
1589
|
-
|
|
1594
|
+
Gn(i, e, r), i.records?.map((e) => Object.assign(e, {
|
|
1590
1595
|
value: e.title,
|
|
1591
1596
|
type: "default"
|
|
1592
1597
|
}));
|
|
1593
1598
|
let a = {
|
|
1594
1599
|
...i,
|
|
1595
|
-
...
|
|
1600
|
+
...on(i)
|
|
1596
1601
|
};
|
|
1597
1602
|
return Promise.resolve(a);
|
|
1598
1603
|
}
|
|
1599
|
-
async function
|
|
1604
|
+
async function qn(e, t, n, r = g) {
|
|
1600
1605
|
let { app: i = "" } = r.config, a = {
|
|
1601
1606
|
methods: [],
|
|
1602
1607
|
mode: t,
|
|
@@ -1610,7 +1615,7 @@ async function Gn(e, t, n, r = g) {
|
|
|
1610
1615
|
});
|
|
1611
1616
|
let o = await I(r, "api/v1/multi", a);
|
|
1612
1617
|
o.results.forEach((t, n) => {
|
|
1613
|
-
|
|
1618
|
+
Gn(t, e[n], r);
|
|
1614
1619
|
}), o.results.forEach((e) => {
|
|
1615
1620
|
e.records?.map((e) => Object.assign(e, {
|
|
1616
1621
|
value: e.title,
|
|
@@ -1619,23 +1624,23 @@ async function Gn(e, t, n, r = g) {
|
|
|
1619
1624
|
});
|
|
1620
1625
|
let s = o.results.map((e) => ({
|
|
1621
1626
|
...e,
|
|
1622
|
-
...
|
|
1627
|
+
...on(e)
|
|
1623
1628
|
}));
|
|
1624
1629
|
return Promise.resolve(s);
|
|
1625
1630
|
}
|
|
1626
|
-
function
|
|
1631
|
+
function Jn(e, t = "", n = 0) {
|
|
1627
1632
|
let r = [];
|
|
1628
1633
|
return e.items && e.items.forEach((e) => {
|
|
1629
1634
|
let i = t ? `${t}/${e.value}` : e.value, a = n + 1;
|
|
1630
1635
|
r.push({
|
|
1631
1636
|
path: i,
|
|
1632
1637
|
level: a
|
|
1633
|
-
}), e.$path = i, e.$level = a, e.hasChildren ? r = r.concat(
|
|
1638
|
+
}), e.$path = i, e.$level = a, e.hasChildren ? r = r.concat(Jn(e, i, a)) : e.hasChildren = !1;
|
|
1634
1639
|
}), r;
|
|
1635
1640
|
}
|
|
1636
1641
|
//#endregion
|
|
1637
1642
|
//#region src/web-api/v1/fetch-query-export.ts
|
|
1638
|
-
async function
|
|
1643
|
+
async function Yn({ model: e, appName: t, query: n, article: r }, i = g) {
|
|
1639
1644
|
let { webservice: a, format: o, maxcount: s, exportedColumns: c, export: l } = e, u = {
|
|
1640
1645
|
app: t,
|
|
1641
1646
|
webservice: a,
|
|
@@ -1649,24 +1654,24 @@ async function qn({ model: e, appName: t, query: n, article: r }, i = g) {
|
|
|
1649
1654
|
detail: { resultid: r ? r.id : void 0 }
|
|
1650
1655
|
}] }
|
|
1651
1656
|
};
|
|
1652
|
-
return
|
|
1657
|
+
return q(u), await I(i, "api/v1/search.queryexport", u, { responseType: "blob" });
|
|
1653
1658
|
}
|
|
1654
1659
|
//#endregion
|
|
1655
1660
|
//#region src/web-api/v1/fetch-query-intent.ts
|
|
1656
|
-
async function
|
|
1661
|
+
async function Xn(e, t = g) {
|
|
1657
1662
|
return (await I(t, "api/v1/queryintent", { query: e }))?.intents;
|
|
1658
1663
|
}
|
|
1659
1664
|
//#endregion
|
|
1660
1665
|
//#region src/web-api/v1/fetch-security-principal.ts
|
|
1661
|
-
var
|
|
1662
|
-
function
|
|
1663
|
-
return I(n,
|
|
1666
|
+
var Zn = "api/v1/security.principal";
|
|
1667
|
+
function Qn(e, t, n = g) {
|
|
1668
|
+
return I(n, Zn, {
|
|
1664
1669
|
action: "list",
|
|
1665
1670
|
...e
|
|
1666
1671
|
}, { signal: t });
|
|
1667
1672
|
}
|
|
1668
|
-
async function
|
|
1669
|
-
return e.length ? (await I(t,
|
|
1673
|
+
async function $n(e, t = g) {
|
|
1674
|
+
return e.length ? (await I(t, Zn, {
|
|
1670
1675
|
action: "userids",
|
|
1671
1676
|
userids: e,
|
|
1672
1677
|
limit: e.length
|
|
@@ -1674,7 +1679,7 @@ async function Zn(e, t = g) {
|
|
|
1674
1679
|
}
|
|
1675
1680
|
//#endregion
|
|
1676
1681
|
//#region src/web-api/v1/fetch-similar-documents.ts
|
|
1677
|
-
async function
|
|
1682
|
+
async function er(e, t, n, r = g) {
|
|
1678
1683
|
return (await I(r, "api/v1/similardocuments", {
|
|
1679
1684
|
sourceDocumentId: e,
|
|
1680
1685
|
query: { name: t }
|
|
@@ -1682,7 +1687,7 @@ async function Qn(e, t, n, r = g) {
|
|
|
1682
1687
|
}
|
|
1683
1688
|
//#endregion
|
|
1684
1689
|
//#region src/web-api/v1/fetch-sponsored-links.ts
|
|
1685
|
-
async function
|
|
1690
|
+
async function tr(e, t, n = g) {
|
|
1686
1691
|
return (await I(n, "api/v1/query.links", {
|
|
1687
1692
|
webservice: e,
|
|
1688
1693
|
query: t
|
|
@@ -1693,9 +1698,9 @@ async function $n(e, t, n = g) {
|
|
|
1693
1698
|
}
|
|
1694
1699
|
//#endregion
|
|
1695
1700
|
//#region src/utils/to-sql.ts
|
|
1696
|
-
function
|
|
1701
|
+
function nr(e, t) {
|
|
1697
1702
|
if (typeof e == "number") return `${e}`;
|
|
1698
|
-
if (
|
|
1703
|
+
if (ln(e)) return t ? `'${rr(e)}'` : rr(e);
|
|
1699
1704
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
1700
1705
|
if (e === null) return "null";
|
|
1701
1706
|
if (Array.isArray(e)) {
|
|
@@ -1706,10 +1711,10 @@ function er(e, t) {
|
|
|
1706
1711
|
}
|
|
1707
1712
|
return t ? `'${e}'` : e;
|
|
1708
1713
|
}
|
|
1709
|
-
function
|
|
1714
|
+
function rr(e) {
|
|
1710
1715
|
if (!e) return "";
|
|
1711
1716
|
try {
|
|
1712
|
-
return
|
|
1717
|
+
return fn(e) === 0 ? new Intl.DateTimeFormat("en-CA", {
|
|
1713
1718
|
year: "numeric",
|
|
1714
1719
|
month: "2-digit",
|
|
1715
1720
|
day: "2-digit"
|
|
@@ -1725,7 +1730,7 @@ function tr(e) {
|
|
|
1725
1730
|
}
|
|
1726
1731
|
//#endregion
|
|
1727
1732
|
//#region src/web-api/v1/fetch-suggest.ts
|
|
1728
|
-
async function
|
|
1733
|
+
async function ir(e, t, n, r, i, a = g) {
|
|
1729
1734
|
let { app: o } = a.config, s = {
|
|
1730
1735
|
app: o || "",
|
|
1731
1736
|
suggestQuery: e,
|
|
@@ -1740,7 +1745,7 @@ async function nr(e, t, n, r, i, a = g) {
|
|
|
1740
1745
|
throw console.error("Error fetching suggestions:", e), e;
|
|
1741
1746
|
}
|
|
1742
1747
|
}
|
|
1743
|
-
async function
|
|
1748
|
+
async function ar(e, t, n, r, i = g) {
|
|
1744
1749
|
let { app: a } = i.config;
|
|
1745
1750
|
return (await I(i, "api/v1/suggestquery", {
|
|
1746
1751
|
app: a || "",
|
|
@@ -1750,7 +1755,7 @@ async function rr(e, t, n, r, i = g) {
|
|
|
1750
1755
|
kinds: r
|
|
1751
1756
|
})).suggests;
|
|
1752
1757
|
}
|
|
1753
|
-
async function
|
|
1758
|
+
async function or(e, t, n, r = g) {
|
|
1754
1759
|
if (!t) return Promise.resolve([]);
|
|
1755
1760
|
let { app: i } = r.config, a = await I(r, "api/v1/suggestfield", {
|
|
1756
1761
|
app: i || "",
|
|
@@ -1759,12 +1764,12 @@ async function ir(e, t, n, r = g) {
|
|
|
1759
1764
|
query: n
|
|
1760
1765
|
});
|
|
1761
1766
|
return a.suggests.forEach((e) => {
|
|
1762
|
-
e.display =
|
|
1767
|
+
e.display = nr(e.display);
|
|
1763
1768
|
}), a.suggests;
|
|
1764
1769
|
}
|
|
1765
1770
|
//#endregion
|
|
1766
1771
|
//#region src/web-api/v1/fetch-text-chunk.ts
|
|
1767
|
-
async function
|
|
1772
|
+
async function sr(e, t, n, r, i, a, o = g) {
|
|
1768
1773
|
return I(o, "api/v1/doc.textchunks", {
|
|
1769
1774
|
id: e,
|
|
1770
1775
|
textChunks: t,
|
|
@@ -1776,35 +1781,35 @@ async function ar(e, t, n, r, i, a, o = g) {
|
|
|
1776
1781
|
}
|
|
1777
1782
|
//#endregion
|
|
1778
1783
|
//#region src/web-api/v1/fetch-user-settings.ts
|
|
1779
|
-
async function
|
|
1784
|
+
async function cr(e = g) {
|
|
1780
1785
|
let { app: t } = e.config;
|
|
1781
1786
|
return R(e, "api/v1/usersettings", new URLSearchParams({
|
|
1782
1787
|
app: t || "",
|
|
1783
1788
|
action: "load"
|
|
1784
1789
|
}));
|
|
1785
1790
|
}
|
|
1786
|
-
async function
|
|
1791
|
+
async function lr(e, t, n = g) {
|
|
1787
1792
|
let r = {
|
|
1788
1793
|
action: "save",
|
|
1789
1794
|
userSettings: e,
|
|
1790
1795
|
$auditRecord: { auditEvents: [t] }
|
|
1791
1796
|
};
|
|
1792
|
-
return
|
|
1797
|
+
return q(r), I(n, "api/v1/usersettings", r);
|
|
1793
1798
|
}
|
|
1794
|
-
async function
|
|
1799
|
+
async function ur(e, t, n = g) {
|
|
1795
1800
|
let r = {
|
|
1796
1801
|
action: "patch",
|
|
1797
1802
|
userSettings: e,
|
|
1798
1803
|
$auditRecord: t ? { auditEvents: [t] } : void 0
|
|
1799
1804
|
};
|
|
1800
|
-
return
|
|
1805
|
+
return q(r), I(n, "api/v1/usersettings", r);
|
|
1801
1806
|
}
|
|
1802
|
-
async function
|
|
1803
|
-
return
|
|
1807
|
+
async function dr(e = g) {
|
|
1808
|
+
return lr({}, { type: "UserSettings_Reset" }, e);
|
|
1804
1809
|
}
|
|
1805
1810
|
//#endregion
|
|
1806
1811
|
//#region src/web-api/v2/fetch-change-password.ts
|
|
1807
|
-
async function
|
|
1812
|
+
async function fr(e, t, n = g) {
|
|
1808
1813
|
return I(n, "api/v2/security/password/change", {
|
|
1809
1814
|
newPassword: e,
|
|
1810
1815
|
currentPassword: t
|
|
@@ -1812,59 +1817,59 @@ async function ur(e, t, n = g) {
|
|
|
1812
1817
|
}
|
|
1813
1818
|
//#endregion
|
|
1814
1819
|
//#region src/web-api/v2/fetch-agent-workspace.ts
|
|
1815
|
-
var
|
|
1816
|
-
function
|
|
1820
|
+
var Y = "api/v2/agent-workspace/workspace";
|
|
1821
|
+
function pr(e) {
|
|
1817
1822
|
let t = new URLSearchParams();
|
|
1818
1823
|
return e.page !== void 0 && t.set("pageNumber", String(e.page)), e.pageSize !== void 0 && t.set("pageSize", String(e.pageSize)), t;
|
|
1819
1824
|
}
|
|
1820
|
-
function
|
|
1825
|
+
function mr(e) {
|
|
1821
1826
|
let { pageNumber: t, ...n } = e;
|
|
1822
1827
|
return {
|
|
1823
1828
|
...n,
|
|
1824
1829
|
page: t
|
|
1825
1830
|
};
|
|
1826
1831
|
}
|
|
1827
|
-
async function
|
|
1828
|
-
return
|
|
1832
|
+
async function hr(e = {}, t = g) {
|
|
1833
|
+
return mr(await R(t, Y, pr(e)));
|
|
1829
1834
|
}
|
|
1830
|
-
function
|
|
1831
|
-
return R(t, `${
|
|
1835
|
+
function gr(e, t = g) {
|
|
1836
|
+
return R(t, `${Y}/${encodeURIComponent(e)}`);
|
|
1832
1837
|
}
|
|
1833
|
-
function
|
|
1834
|
-
return I(t,
|
|
1838
|
+
function _r(e, t = g) {
|
|
1839
|
+
return I(t, Y, e);
|
|
1835
1840
|
}
|
|
1836
|
-
function
|
|
1837
|
-
return
|
|
1841
|
+
function vr(e, t, n = g) {
|
|
1842
|
+
return B(n, `${Y}/${encodeURIComponent(e)}`, t);
|
|
1838
1843
|
}
|
|
1839
|
-
async function
|
|
1844
|
+
async function yr(e, t = g) {
|
|
1840
1845
|
let n = (await z(t, "api/v2/agent-workspace/workspaces", void 0, { body: { workspaceIds: e } }))?.failed ?? [], r = new Set(n.map((e) => e.workspaceId));
|
|
1841
1846
|
return {
|
|
1842
1847
|
succeeded: e.filter((e) => !r.has(e)),
|
|
1843
1848
|
failed: n
|
|
1844
1849
|
};
|
|
1845
1850
|
}
|
|
1846
|
-
async function
|
|
1847
|
-
return
|
|
1851
|
+
async function br(e, t, n, r = g) {
|
|
1852
|
+
return mr(await R(r, `${Y}/${encodeURIComponent(e)}/documents`, pr(t ?? {}), n));
|
|
1848
1853
|
}
|
|
1849
|
-
async function
|
|
1850
|
-
return (await I(n, `${
|
|
1854
|
+
async function xr(e, t, n = g) {
|
|
1855
|
+
return (await I(n, `${Y}/${encodeURIComponent(e)}/documents`, { documents: t })).documents;
|
|
1851
1856
|
}
|
|
1852
|
-
function
|
|
1853
|
-
return z(n, `${
|
|
1857
|
+
function Sr(e, t, n = g) {
|
|
1858
|
+
return z(n, `${Y}/${encodeURIComponent(e)}/documents`, void 0, { body: { fileIds: t } });
|
|
1854
1859
|
}
|
|
1855
1860
|
//#endregion
|
|
1856
1861
|
//#region src/web-api/v2/fetch-agent-workspace-status.ts
|
|
1857
|
-
async function
|
|
1862
|
+
async function Cr(e, t, n = g) {
|
|
1858
1863
|
let r = new URLSearchParams();
|
|
1859
1864
|
return e?.workspaceId !== void 0 && r.set("workspaceId", e.workspaceId), e?.initiatedBy !== void 0 && r.set("initiatedBy", e.initiatedBy), e?.skip !== void 0 && r.set("skip", String(e.skip)), e?.take !== void 0 && r.set("take", String(e.take)), R(n, "api/v2/agent-workspace/status", r, t);
|
|
1860
1865
|
}
|
|
1861
1866
|
//#endregion
|
|
1862
1867
|
//#region src/web-api/v2/fetch-forgot-password.ts
|
|
1863
|
-
function
|
|
1868
|
+
function wr() {
|
|
1864
1869
|
return typeof window > "u" ? void 0 : `${window.location.origin}/login?mode=changepassword`;
|
|
1865
1870
|
}
|
|
1866
|
-
async function
|
|
1867
|
-
let r = t ??
|
|
1871
|
+
async function Tr(e, t, n = g) {
|
|
1872
|
+
let r = t ?? wr();
|
|
1868
1873
|
if (!r) throw Error("fetchSendPasswordResetEmail needs a changePasswordRedirectUrl outside a browser: there is no page origin to derive it from. Pass the URL the reset email should link to.");
|
|
1869
1874
|
return I(n, "api/v2/security/password/ask-reset-email", {
|
|
1870
1875
|
changePasswordRedirectUrl: r,
|
|
@@ -1872,115 +1877,125 @@ async function Cr(e, t, n = g) {
|
|
|
1872
1877
|
});
|
|
1873
1878
|
}
|
|
1874
1879
|
//#endregion
|
|
1880
|
+
//#region src/web-api/helpers/methods/patch-raw.ts
|
|
1881
|
+
async function Er(e, t, n, r) {
|
|
1882
|
+
return Nt(e, t, JSON.stringify(n ?? null), r);
|
|
1883
|
+
}
|
|
1884
|
+
//#endregion
|
|
1875
1885
|
//#region src/web-api/v2/fetch-user-profile.ts
|
|
1876
|
-
async function
|
|
1886
|
+
async function Dr(e, t = g) {
|
|
1877
1887
|
return await R(t, `api/v2/user-profile/${e}`);
|
|
1878
1888
|
}
|
|
1879
|
-
async function
|
|
1889
|
+
async function Or(e, t = g) {
|
|
1880
1890
|
return await I(t, "api/v2/user-profile", e);
|
|
1881
1891
|
}
|
|
1882
|
-
async function
|
|
1883
|
-
|
|
1892
|
+
async function kr(e, t, n, r = g) {
|
|
1893
|
+
let i = e.data?.id;
|
|
1894
|
+
if (!i) throw Error("patchUserProfile: `userProfile.data.id` is required");
|
|
1895
|
+
let a = e[t]?.[n];
|
|
1896
|
+
return await Er(r, `api/v2/user-profile/${encodeURIComponent(i)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}`, a);
|
|
1884
1897
|
}
|
|
1885
|
-
async function
|
|
1886
|
-
|
|
1898
|
+
async function Ar(e, t, n, r = g) {
|
|
1899
|
+
let i = e.data?.id;
|
|
1900
|
+
if (!i) throw Error("deleteUserProfileProperty: `userProfile.data.id` is required");
|
|
1901
|
+
return (await z(r, `api/v2/user-profile/${encodeURIComponent(i)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}`)).success === !0;
|
|
1887
1902
|
}
|
|
1888
1903
|
//#endregion
|
|
1889
1904
|
//#region src/web-api/v2/fetch-version.ts
|
|
1890
|
-
async function
|
|
1905
|
+
async function jr(e = g) {
|
|
1891
1906
|
return await R(e, "api/v2/version");
|
|
1892
1907
|
}
|
|
1893
1908
|
//#endregion
|
|
1894
1909
|
//#region src/client/create-api.ts
|
|
1895
|
-
var
|
|
1910
|
+
var X = (e, t) => (...n) => {
|
|
1896
1911
|
let r = Array(Math.max(0, e.length - n.length)).fill(void 0);
|
|
1897
1912
|
return e(...n, ...r, t);
|
|
1898
1913
|
};
|
|
1899
|
-
function
|
|
1914
|
+
function Mr(e) {
|
|
1900
1915
|
return {
|
|
1901
1916
|
app: {
|
|
1902
|
-
get:
|
|
1903
|
-
preLogin:
|
|
1917
|
+
get: X(Lt, e),
|
|
1918
|
+
preLogin: X(Rt, e)
|
|
1904
1919
|
},
|
|
1905
1920
|
principal: {
|
|
1906
|
-
get:
|
|
1907
|
-
list:
|
|
1908
|
-
userid:
|
|
1909
|
-
userids:
|
|
1910
|
-
search:
|
|
1911
|
-
byIds:
|
|
1921
|
+
get: X(Bn, e),
|
|
1922
|
+
list: X(Vn, e),
|
|
1923
|
+
userid: X(Hn, e),
|
|
1924
|
+
userids: X(Un, e),
|
|
1925
|
+
search: X(Qn, e),
|
|
1926
|
+
byIds: X($n, e)
|
|
1912
1927
|
},
|
|
1913
1928
|
query: {
|
|
1914
|
-
search:
|
|
1915
|
-
bulk:
|
|
1916
|
-
intent:
|
|
1917
|
-
export:
|
|
1918
|
-
aggregate:
|
|
1919
|
-
sponsoredLinks:
|
|
1920
|
-
similarDocuments:
|
|
1929
|
+
search: X(Kn, e),
|
|
1930
|
+
bulk: X(qn, e),
|
|
1931
|
+
intent: X(Xn, e),
|
|
1932
|
+
export: X(Yn, e),
|
|
1933
|
+
aggregate: X(En, e),
|
|
1934
|
+
sponsoredLinks: X(tr, e),
|
|
1935
|
+
similarDocuments: X(er, e)
|
|
1921
1936
|
},
|
|
1922
1937
|
suggest: {
|
|
1923
|
-
get:
|
|
1924
|
-
query:
|
|
1925
|
-
field:
|
|
1938
|
+
get: X(ir, e),
|
|
1939
|
+
query: X(ar, e),
|
|
1940
|
+
field: X(or, e)
|
|
1926
1941
|
},
|
|
1927
1942
|
preview: {
|
|
1928
|
-
get:
|
|
1929
|
-
textChunks:
|
|
1943
|
+
get: X(Rn, e),
|
|
1944
|
+
textChunks: X(sr, e)
|
|
1930
1945
|
},
|
|
1931
1946
|
labels: {
|
|
1932
|
-
get:
|
|
1933
|
-
rights:
|
|
1934
|
-
add:
|
|
1935
|
-
remove:
|
|
1936
|
-
rename:
|
|
1937
|
-
delete:
|
|
1938
|
-
bulkAdd:
|
|
1939
|
-
bulkRemove:
|
|
1947
|
+
get: X(An, e),
|
|
1948
|
+
rights: X(J.getUserRights, e),
|
|
1949
|
+
add: X(J.add, e),
|
|
1950
|
+
remove: X(J.remove, e),
|
|
1951
|
+
rename: X(J.rename, e),
|
|
1952
|
+
delete: X(J.delete, e),
|
|
1953
|
+
bulkAdd: X(J.bulkAdd, e),
|
|
1954
|
+
bulkRemove: X(J.bulkRemove, e)
|
|
1940
1955
|
},
|
|
1941
1956
|
dataset: {
|
|
1942
|
-
get:
|
|
1943
|
-
getMany:
|
|
1944
|
-
list:
|
|
1957
|
+
get: X(Dn, e),
|
|
1958
|
+
getMany: X(On, e),
|
|
1959
|
+
list: X(kn, e)
|
|
1945
1960
|
},
|
|
1946
1961
|
userSettings: {
|
|
1947
|
-
get:
|
|
1948
|
-
save:
|
|
1949
|
-
patch:
|
|
1950
|
-
reset:
|
|
1962
|
+
get: X(cr, e),
|
|
1963
|
+
save: X(lr, e),
|
|
1964
|
+
patch: X(ur, e),
|
|
1965
|
+
reset: X(dr, e)
|
|
1951
1966
|
},
|
|
1952
1967
|
userProfile: {
|
|
1953
|
-
get:
|
|
1954
|
-
create:
|
|
1955
|
-
patch:
|
|
1956
|
-
deleteProperty:
|
|
1968
|
+
get: X(Dr, e),
|
|
1969
|
+
create: X(Or, e),
|
|
1970
|
+
patch: X(kr, e),
|
|
1971
|
+
deleteProperty: X(Ar, e)
|
|
1957
1972
|
},
|
|
1958
1973
|
workspaces: {
|
|
1959
|
-
list:
|
|
1960
|
-
get:
|
|
1961
|
-
create:
|
|
1962
|
-
update:
|
|
1963
|
-
delete:
|
|
1964
|
-
listDocuments:
|
|
1965
|
-
addDocuments:
|
|
1966
|
-
deleteDocuments:
|
|
1967
|
-
uploadStatus:
|
|
1974
|
+
list: X(hr, e),
|
|
1975
|
+
get: X(gr, e),
|
|
1976
|
+
create: X(_r, e),
|
|
1977
|
+
update: X(vr, e),
|
|
1978
|
+
delete: X(yr, e),
|
|
1979
|
+
listDocuments: X(br, e),
|
|
1980
|
+
addDocuments: X(xr, e),
|
|
1981
|
+
deleteDocuments: X(Sr, e),
|
|
1982
|
+
uploadStatus: X(Cr, e)
|
|
1968
1983
|
},
|
|
1969
1984
|
password: {
|
|
1970
|
-
change:
|
|
1971
|
-
sendResetEmail:
|
|
1985
|
+
change: X(fr, e),
|
|
1986
|
+
sendResetEmail: X(Tr, e)
|
|
1972
1987
|
},
|
|
1973
|
-
version:
|
|
1988
|
+
version: X(jr, e)
|
|
1974
1989
|
};
|
|
1975
1990
|
}
|
|
1976
1991
|
//#endregion
|
|
1977
1992
|
//#region src/client/create-atomic-client.ts
|
|
1978
|
-
function
|
|
1993
|
+
function Nr(e) {
|
|
1979
1994
|
return {
|
|
1980
1995
|
config: e.config,
|
|
1981
1996
|
storagePrefix: e.storagePrefix,
|
|
1982
1997
|
configure: (t) => b(e, t),
|
|
1983
|
-
initializeConfig: () =>
|
|
1998
|
+
initializeConfig: () => zt(e),
|
|
1984
1999
|
auth: {
|
|
1985
2000
|
login: (t) => vt(e, t),
|
|
1986
2001
|
logout: () => wt(e),
|
|
@@ -1995,36 +2010,36 @@ function Ar(e) {
|
|
|
1995
2010
|
http: {
|
|
1996
2011
|
get: (t, n, r) => R(e, t, n, r),
|
|
1997
2012
|
post: (t, n, r) => I(e, t, n, r),
|
|
1998
|
-
put: (t, n, r) =>
|
|
1999
|
-
patch: (t, n, r) =>
|
|
2013
|
+
put: (t, n, r) => B(e, t, n, r),
|
|
2014
|
+
patch: (t, n, r) => Pt(e, t, n, r),
|
|
2000
2015
|
del: (t, n, r) => z(e, t, n, r)
|
|
2001
2016
|
},
|
|
2002
|
-
api:
|
|
2017
|
+
api: Mr(e),
|
|
2003
2018
|
context: e
|
|
2004
2019
|
};
|
|
2005
2020
|
}
|
|
2006
|
-
function
|
|
2021
|
+
function Pr(e) {
|
|
2007
2022
|
let { httpAdapter: t, storagePrefix: n, ...r } = e, i = pe({
|
|
2008
2023
|
config: {},
|
|
2009
2024
|
storagePrefix: n,
|
|
2010
2025
|
httpAdapter: t
|
|
2011
2026
|
});
|
|
2012
|
-
return b(i, r),
|
|
2027
|
+
return b(i, r), Nr(i);
|
|
2013
2028
|
}
|
|
2014
|
-
var
|
|
2015
|
-
function
|
|
2016
|
-
return
|
|
2029
|
+
var Fr = Nr(g);
|
|
2030
|
+
function Ir() {
|
|
2031
|
+
return Fr;
|
|
2017
2032
|
}
|
|
2018
2033
|
//#endregion
|
|
2019
2034
|
//#region src/utils/aggregations.ts
|
|
2020
|
-
var
|
|
2021
|
-
function
|
|
2035
|
+
var Lr = /.*:\(?([><=\d\-.AND ]+)\)?/;
|
|
2036
|
+
function Rr(e) {
|
|
2022
2037
|
if (typeof e == "string") {
|
|
2023
2038
|
if (/^\d{4}$/.test(e)) return "YYYY";
|
|
2024
2039
|
if (/^\d{4}-(0[1-9]|1[0-2])$/.test(e)) return "YYYY-MM";
|
|
2025
2040
|
}
|
|
2026
2041
|
}
|
|
2027
|
-
function
|
|
2042
|
+
function zr(e, t) {
|
|
2028
2043
|
let [n, r] = e.split("-").map(Number);
|
|
2029
2044
|
return t === "YYYY" ? {
|
|
2030
2045
|
from: `${e}-01-01`,
|
|
@@ -2034,12 +2049,12 @@ function Ir(e, t) {
|
|
|
2034
2049
|
to: r === 12 ? `${n + 1}-01-01` : `${n}-${String(r + 1).padStart(2, "0")}-01`
|
|
2035
2050
|
};
|
|
2036
2051
|
}
|
|
2037
|
-
function
|
|
2052
|
+
function Br(e, t) {
|
|
2038
2053
|
return !e?.items || e?.items?.length === 0 ? [] : e.items.reduce((n, r) => {
|
|
2039
2054
|
if (!r.value || r.value === "") return n;
|
|
2040
|
-
let i =
|
|
2055
|
+
let i = Gr(r, e.column), a = Rr(r.value);
|
|
2041
2056
|
if (a) {
|
|
2042
|
-
let { from: t, to: n } =
|
|
2057
|
+
let { from: t, to: n } = zr(r.value, a), o = e.column;
|
|
2043
2058
|
i.operator = "and", i.filters = [{
|
|
2044
2059
|
field: o,
|
|
2045
2060
|
operator: "gte",
|
|
@@ -2061,29 +2076,29 @@ function Lr(e, t) {
|
|
|
2061
2076
|
}), n;
|
|
2062
2077
|
}, []);
|
|
2063
2078
|
}
|
|
2064
|
-
function
|
|
2079
|
+
function Vr(e) {
|
|
2065
2080
|
return e.match(/^[^`]*`([^`]*)`:/)?.[1] || void 0;
|
|
2066
2081
|
}
|
|
2067
|
-
var
|
|
2082
|
+
var Hr = {
|
|
2068
2083
|
gte: "≥",
|
|
2069
2084
|
gt: ">",
|
|
2070
2085
|
lte: "≤",
|
|
2071
2086
|
lt: "<"
|
|
2072
2087
|
};
|
|
2073
|
-
function
|
|
2088
|
+
function Ur(e) {
|
|
2074
2089
|
let t = e.trim();
|
|
2075
2090
|
return t.startsWith(">=") ? "gte" : t.startsWith(">") ? "gt" : t.startsWith("<=") ? "lte" : "lt";
|
|
2076
2091
|
}
|
|
2077
|
-
function
|
|
2078
|
-
return e.length === 2 ? `${e[0].value} → ${e[1].value}` : `${
|
|
2092
|
+
function Wr(e) {
|
|
2093
|
+
return e.length === 2 ? `${e[0].value} → ${e[1].value}` : `${Hr[e[0].operator]} ${e[0].value}`;
|
|
2079
2094
|
}
|
|
2080
|
-
function
|
|
2081
|
-
let n = t, r = e.value.match(
|
|
2095
|
+
function Gr(e, t) {
|
|
2096
|
+
let n = t, r = e.value.match(Lr);
|
|
2082
2097
|
if (r?.[1]) {
|
|
2083
2098
|
let t = (r?.[1].split(" AND ")).map((e) => ({
|
|
2084
|
-
operator:
|
|
2099
|
+
operator: Ur(e),
|
|
2085
2100
|
value: e.substring(e.indexOf(" ") + 1)
|
|
2086
|
-
})), i = e.display ||
|
|
2101
|
+
})), i = e.display || Vr(e.value) || Wr(t), a = t.map(({ operator: e, value: t }) => ({
|
|
2087
2102
|
field: n,
|
|
2088
2103
|
operator: e,
|
|
2089
2104
|
value: t,
|
|
@@ -2109,26 +2124,26 @@ function Hr(e, t) {
|
|
|
2109
2124
|
display: e.display
|
|
2110
2125
|
};
|
|
2111
2126
|
}
|
|
2112
|
-
function
|
|
2127
|
+
function Kr(e, t, n) {
|
|
2113
2128
|
return e.valuesAreExpressions ? t.display === n.display : t.value === n.value;
|
|
2114
2129
|
}
|
|
2115
|
-
function
|
|
2116
|
-
return e.items &&= e.items.map((e) =>
|
|
2130
|
+
function qr(e) {
|
|
2131
|
+
return e.items &&= e.items.map((e) => qr(e)), e.items?.some((e) => e.$selected || e.$opened) && (e.$opened = !0), e;
|
|
2117
2132
|
}
|
|
2118
|
-
function
|
|
2133
|
+
function Jr(e, t) {
|
|
2119
2134
|
let n = [];
|
|
2120
2135
|
if (e.length > 0) {
|
|
2121
2136
|
let r = /* @__PURE__ */ new Map(), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g, ""), a = RegExp(`\\b${i}`, "i");
|
|
2122
2137
|
e.forEach((e) => {
|
|
2123
2138
|
if (e.display.length > 1) {
|
|
2124
2139
|
let i = e.display.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), o = a.exec(i);
|
|
2125
|
-
|
|
2140
|
+
Yr(n, r, "/", e.display, +(e.frequency || 0), 1, (o?.index || 0) + t.length);
|
|
2126
2141
|
}
|
|
2127
2142
|
});
|
|
2128
2143
|
}
|
|
2129
2144
|
return n;
|
|
2130
2145
|
}
|
|
2131
|
-
function
|
|
2146
|
+
function Yr(e, t, n, r, i, a, o) {
|
|
2132
2147
|
let s = r.indexOf("/", n.length), c = r.substring(0, s + 1), l = t.get(c);
|
|
2133
2148
|
if (!l) {
|
|
2134
2149
|
let u = c.replace(/^\/|\/$/g, "");
|
|
@@ -2142,11 +2157,11 @@ function Kr(e, t, n, r, i, a, o) {
|
|
|
2142
2157
|
$path: u
|
|
2143
2158
|
}, t.set(c, l), e.push(l);
|
|
2144
2159
|
}
|
|
2145
|
-
c.length < r.length && (l.hasChildren = !0,
|
|
2160
|
+
c.length < r.length && (l.hasChildren = !0, Yr(l.items, t, c, r, i, a + 1, o));
|
|
2146
2161
|
}
|
|
2147
2162
|
//#endregion
|
|
2148
2163
|
//#region src/utils/bisect.ts
|
|
2149
|
-
function
|
|
2164
|
+
function Xr(e, t) {
|
|
2150
2165
|
return e.reduce((e, n) => (t(n) ? e.true.push(n) : e.false.push(n), e), {
|
|
2151
2166
|
true: [],
|
|
2152
2167
|
false: []
|
|
@@ -2154,34 +2169,34 @@ function qr(e, t) {
|
|
|
2154
2169
|
}
|
|
2155
2170
|
//#endregion
|
|
2156
2171
|
//#region src/utils/concepts.ts
|
|
2157
|
-
var
|
|
2158
|
-
function
|
|
2172
|
+
var Zr = /(([+-])?\(([^)]+)\))|(([+-])?\[([^\]]+)\])|(([+-])?"([^"]+)")|(([+-])?\/([^/]+)\/)|(([+-])?(\S+))/g, Qr = 2, $r = 3, ei = 5, ti = 6, ni = 8, ri = 9, ii = 11, ai = 12, oi = 14, si = 15;
|
|
2173
|
+
function Z(e) {
|
|
2159
2174
|
if (!e) return [];
|
|
2160
|
-
let t = [], n = e.matchAll(
|
|
2161
|
-
for (let e of n) e[
|
|
2175
|
+
let t = [], n = e.matchAll(Zr);
|
|
2176
|
+
for (let e of n) e[$r] ? t.push({
|
|
2162
2177
|
type: "group",
|
|
2163
|
-
value: e[
|
|
2164
|
-
op: e[
|
|
2165
|
-
}) : e[
|
|
2178
|
+
value: e[$r],
|
|
2179
|
+
op: e[Qr]
|
|
2180
|
+
}) : e[ti] ? t.push({
|
|
2166
2181
|
type: "adjacent",
|
|
2167
|
-
value: e[
|
|
2168
|
-
op: e[
|
|
2169
|
-
}) : e[
|
|
2182
|
+
value: e[ti],
|
|
2183
|
+
op: e[ei]
|
|
2184
|
+
}) : e[ri] ? t.push({
|
|
2170
2185
|
type: "exact",
|
|
2171
|
-
value: e[
|
|
2172
|
-
op: e[
|
|
2173
|
-
}) : e[
|
|
2186
|
+
value: e[ri],
|
|
2187
|
+
op: e[ni]
|
|
2188
|
+
}) : e[ai] ? t.push({
|
|
2174
2189
|
type: "regex",
|
|
2175
|
-
value: e[
|
|
2176
|
-
op: e[
|
|
2177
|
-
}) : e[
|
|
2190
|
+
value: e[ai],
|
|
2191
|
+
op: e[ii]
|
|
2192
|
+
}) : e[si] && t.push({
|
|
2178
2193
|
type: "token",
|
|
2179
|
-
value: e[
|
|
2180
|
-
op: e[
|
|
2194
|
+
value: e[si],
|
|
2195
|
+
op: e[oi]
|
|
2181
2196
|
});
|
|
2182
2197
|
return t;
|
|
2183
2198
|
}
|
|
2184
|
-
function
|
|
2199
|
+
function Q(e) {
|
|
2185
2200
|
return e.map((e) => {
|
|
2186
2201
|
let t = e.op || "";
|
|
2187
2202
|
switch (e.type) {
|
|
@@ -2194,39 +2209,39 @@ function ai(e) {
|
|
|
2194
2209
|
}
|
|
2195
2210
|
}).join(" ");
|
|
2196
2211
|
}
|
|
2197
|
-
function
|
|
2198
|
-
let r =
|
|
2212
|
+
function ci(e, t, n) {
|
|
2213
|
+
let r = Z(e);
|
|
2199
2214
|
for (let e of t) r.push({
|
|
2200
2215
|
type: "adjacent",
|
|
2201
2216
|
value: e,
|
|
2202
2217
|
op: n
|
|
2203
2218
|
});
|
|
2204
|
-
return
|
|
2219
|
+
return Q(r);
|
|
2205
2220
|
}
|
|
2206
|
-
function
|
|
2207
|
-
let n =
|
|
2208
|
-
return r === -1 ? t : (n.splice(r, 1),
|
|
2221
|
+
function li(e, t) {
|
|
2222
|
+
let n = Z(t), r = n.findIndex((t) => t.value === e);
|
|
2223
|
+
return r === -1 ? t : (n.splice(r, 1), Q(n));
|
|
2209
2224
|
}
|
|
2210
|
-
function
|
|
2211
|
-
return
|
|
2225
|
+
function ui(e) {
|
|
2226
|
+
return Q(Z(e).filter((e) => e.type !== "adjacent"));
|
|
2212
2227
|
}
|
|
2213
|
-
function
|
|
2214
|
-
return
|
|
2228
|
+
function di(e) {
|
|
2229
|
+
return Z(e).filter((e) => e.type === "adjacent").map((e) => e.value);
|
|
2215
2230
|
}
|
|
2216
2231
|
//#endregion
|
|
2217
2232
|
//#region src/utils/date.ts
|
|
2218
|
-
function
|
|
2219
|
-
let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } =
|
|
2233
|
+
function fi(e, t, n) {
|
|
2234
|
+
let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } = mi(t, n);
|
|
2220
2235
|
return r.format(i * (o ? 1 : -1), a);
|
|
2221
2236
|
}
|
|
2222
|
-
var
|
|
2237
|
+
var pi = [
|
|
2223
2238
|
["year", 365],
|
|
2224
2239
|
["month", 30],
|
|
2225
2240
|
["week", 7],
|
|
2226
2241
|
["day", 1]
|
|
2227
2242
|
];
|
|
2228
|
-
function
|
|
2229
|
-
let n = new Date(e), r = t ? new Date(t) : /* @__PURE__ */ new Date(), i = Math.abs(r.getTime() - n.getTime()), a = Math.floor(i / 864e5), [o, s] =
|
|
2243
|
+
function mi(e, t) {
|
|
2244
|
+
let n = new Date(e), r = t ? new Date(t) : /* @__PURE__ */ new Date(), i = Math.abs(r.getTime() - n.getTime()), a = Math.floor(i / 864e5), [o, s] = pi.find(([, e]) => a >= e) ?? ["day", 1];
|
|
2230
2245
|
return {
|
|
2231
2246
|
offset: Math.floor(a / s),
|
|
2232
2247
|
unit: o,
|
|
@@ -2235,13 +2250,13 @@ function fi(e, t) {
|
|
|
2235
2250
|
}
|
|
2236
2251
|
//#endregion
|
|
2237
2252
|
//#region src/utils/is-not-input-event.ts
|
|
2238
|
-
function
|
|
2253
|
+
function hi(e) {
|
|
2239
2254
|
let t = e.target;
|
|
2240
2255
|
return t && t.nodeName !== "INPUT" && t.nodeName !== "TEXTAREA";
|
|
2241
2256
|
}
|
|
2242
2257
|
//#endregion
|
|
2243
2258
|
//#region src/utils/notification.ts
|
|
2244
|
-
function
|
|
2259
|
+
function gi(e) {
|
|
2245
2260
|
let t = new CustomEvent("notification", {
|
|
2246
2261
|
bubbles: !0,
|
|
2247
2262
|
cancelable: !1,
|
|
@@ -2249,30 +2264,30 @@ function mi(e) {
|
|
|
2249
2264
|
});
|
|
2250
2265
|
dispatchEvent(t);
|
|
2251
2266
|
}
|
|
2252
|
-
var
|
|
2267
|
+
var _i = {
|
|
2253
2268
|
success: (e, t) => {
|
|
2254
|
-
|
|
2269
|
+
gi({
|
|
2255
2270
|
type: "success",
|
|
2256
2271
|
message: e,
|
|
2257
2272
|
options: t
|
|
2258
2273
|
});
|
|
2259
2274
|
},
|
|
2260
2275
|
info: (e, t) => {
|
|
2261
|
-
|
|
2276
|
+
gi({
|
|
2262
2277
|
type: "info",
|
|
2263
2278
|
message: e,
|
|
2264
2279
|
options: t
|
|
2265
2280
|
});
|
|
2266
2281
|
},
|
|
2267
2282
|
warning: (e, t) => {
|
|
2268
|
-
|
|
2283
|
+
gi({
|
|
2269
2284
|
type: "warning",
|
|
2270
2285
|
message: e,
|
|
2271
2286
|
options: t
|
|
2272
2287
|
});
|
|
2273
2288
|
},
|
|
2274
2289
|
error: (e, t) => {
|
|
2275
|
-
|
|
2290
|
+
gi({
|
|
2276
2291
|
type: "error",
|
|
2277
2292
|
message: e,
|
|
2278
2293
|
options: t
|
|
@@ -2281,13 +2296,13 @@ var hi = {
|
|
|
2281
2296
|
};
|
|
2282
2297
|
//#endregion
|
|
2283
2298
|
//#region src/utils/query-params.ts
|
|
2284
|
-
function
|
|
2299
|
+
function vi(e) {
|
|
2285
2300
|
if (e === void 0) return;
|
|
2286
2301
|
let { q: t, f: n, p: r, s: i, t: a, n: o, b: s } = $(e), [c] = e.split("?");
|
|
2287
2302
|
return {
|
|
2288
2303
|
path: c,
|
|
2289
2304
|
text: t,
|
|
2290
|
-
filters: n ?
|
|
2305
|
+
filters: n ? xi(n) : void 0,
|
|
2291
2306
|
page: r ? parseInt(r, 10) : void 0,
|
|
2292
2307
|
sort: i,
|
|
2293
2308
|
tab: a,
|
|
@@ -2295,17 +2310,17 @@ function gi(e) {
|
|
|
2295
2310
|
basket: s
|
|
2296
2311
|
};
|
|
2297
2312
|
}
|
|
2298
|
-
function
|
|
2313
|
+
function yi(e) {
|
|
2299
2314
|
if (!e) return "";
|
|
2300
2315
|
let { text: t, filters: n, page: r, sort: i, tab: a, name: o, basket: s } = e, c = {};
|
|
2301
2316
|
return t && (c.q = t), n && (c.f = JSON.stringify(n)), r && (c.p = r.toString()), i && (c.s = i), a && (c.t = a), o && (c.n = o), s && (c.b = s), new URLSearchParams(c).toString() || "";
|
|
2302
2317
|
}
|
|
2303
|
-
function
|
|
2318
|
+
function bi(e) {
|
|
2304
2319
|
if (e === void 0) return [];
|
|
2305
2320
|
let { f: t } = $(e);
|
|
2306
|
-
return
|
|
2321
|
+
return xi(t);
|
|
2307
2322
|
}
|
|
2308
|
-
function
|
|
2323
|
+
function xi(e) {
|
|
2309
2324
|
let t = decodeURIComponent(e);
|
|
2310
2325
|
try {
|
|
2311
2326
|
return JSON.parse(t ?? "[]");
|
|
@@ -2319,41 +2334,41 @@ function $(e) {
|
|
|
2319
2334
|
let n = new URLSearchParams(t);
|
|
2320
2335
|
return Object.fromEntries(n);
|
|
2321
2336
|
}
|
|
2322
|
-
function
|
|
2337
|
+
function Si(e) {
|
|
2323
2338
|
let { q: t = "" } = $(e);
|
|
2324
2339
|
return t;
|
|
2325
2340
|
}
|
|
2326
|
-
function
|
|
2341
|
+
function Ci(e) {
|
|
2327
2342
|
let { id: t } = $(e);
|
|
2328
2343
|
return t === void 0 ? void 0 : decodeURIComponent(t);
|
|
2329
2344
|
}
|
|
2330
|
-
function
|
|
2345
|
+
function wi(e) {
|
|
2331
2346
|
let { p: t = "0" } = $(e);
|
|
2332
2347
|
return parseInt(t, 10);
|
|
2333
2348
|
}
|
|
2334
|
-
function
|
|
2349
|
+
function Ti(e) {
|
|
2335
2350
|
let { t } = $(e);
|
|
2336
2351
|
return t;
|
|
2337
2352
|
}
|
|
2338
2353
|
//#endregion
|
|
2339
2354
|
//#region src/utils/syslang.ts
|
|
2340
|
-
function
|
|
2355
|
+
function Ei(e, t) {
|
|
2341
2356
|
if (!e) return e;
|
|
2342
2357
|
let n = 0, r = e.length, i = 0;
|
|
2343
2358
|
if (e[i] === "[") {
|
|
2344
2359
|
for (; i < r && /[0-9]/.test(e[i]);) i++;
|
|
2345
2360
|
e[i] === "]" && (n = i + 1);
|
|
2346
2361
|
}
|
|
2347
|
-
let a =
|
|
2362
|
+
let a = Di(e, n, !1);
|
|
2348
2363
|
if (!a) return e;
|
|
2349
2364
|
let o = t.charCodeAt(0), s = t.charCodeAt(1), c = a;
|
|
2350
2365
|
for (; c;) if (o === c.lang1 && s === c.lang2) {
|
|
2351
|
-
let t =
|
|
2366
|
+
let t = Di(e, c.end + 4, !0);
|
|
2352
2367
|
return e.substring(t.start, t.end);
|
|
2353
|
-
} else c =
|
|
2368
|
+
} else c = Di(e, c.end + 4, !1);
|
|
2354
2369
|
return e.substring(a.start, a.end) || e;
|
|
2355
2370
|
}
|
|
2356
|
-
function
|
|
2371
|
+
function Di(e, t, n) {
|
|
2357
2372
|
for (let n = t, r = e.length - 3; n < r; n++) if (e[n] === "[" && e[n + 3] === "]") return {
|
|
2358
2373
|
start: t,
|
|
2359
2374
|
end: n,
|
|
@@ -2369,7 +2384,7 @@ function Ti(e, t, n) {
|
|
|
2369
2384
|
}
|
|
2370
2385
|
//#endregion
|
|
2371
2386
|
//#region src/utils/utilities.ts
|
|
2372
|
-
function
|
|
2387
|
+
function Oi(e, t) {
|
|
2373
2388
|
let { useLocale: n, useLocaleAsPrefix: r, indexFile: i, path: a, folder: o } = t, s = n ? `${e}/` : null, c = r ? `${e}.${i}` : i ?? "";
|
|
2374
2389
|
return [
|
|
2375
2390
|
a,
|
|
@@ -2379,24 +2394,24 @@ function Ei(e, t) {
|
|
|
2379
2394
|
}
|
|
2380
2395
|
//#endregion
|
|
2381
2396
|
//#region src/web-api/helpers/utils/date-utils.ts
|
|
2382
|
-
function
|
|
2397
|
+
function ki(e) {
|
|
2383
2398
|
if (!e) return;
|
|
2384
2399
|
let t = new Date(e);
|
|
2385
2400
|
return Number.isNaN(t.getTime()) ? void 0 : t;
|
|
2386
2401
|
}
|
|
2387
|
-
function
|
|
2388
|
-
let t =
|
|
2402
|
+
function Ai(e) {
|
|
2403
|
+
let t = ki(e);
|
|
2389
2404
|
return !!t && t.getTime() <= Date.now();
|
|
2390
2405
|
}
|
|
2391
|
-
function
|
|
2392
|
-
let n =
|
|
2406
|
+
function ji(e, t = 7) {
|
|
2407
|
+
let n = ki(e);
|
|
2393
2408
|
if (!n) return !1;
|
|
2394
2409
|
let r = Date.now(), i = r + t * 24 * 60 * 60 * 1e3, a = n.getTime();
|
|
2395
2410
|
return a > r && a <= i;
|
|
2396
2411
|
}
|
|
2397
2412
|
//#endregion
|
|
2398
2413
|
//#region src/web-api/helpers/utils/with-retry.ts
|
|
2399
|
-
async function
|
|
2414
|
+
async function Mi(e, t = 0, n = 1e3) {
|
|
2400
2415
|
let r;
|
|
2401
2416
|
for (let i = 0; i <= t; i++) try {
|
|
2402
2417
|
return await e();
|
|
@@ -2407,4 +2422,4 @@ async function Ai(e, t = 0, n = 1e3) {
|
|
|
2407
2422
|
throw r;
|
|
2408
2423
|
}
|
|
2409
2424
|
//#endregion
|
|
2410
|
-
export {
|
|
2425
|
+
export { dr as $, h as $n, Jt as $t, zr as A, Ze as An, Tn as At, Dr as B, Ne as Bn, ln as Bt, li as C, Ct as Cn, zn as Ct, Lr as D, rt as Dn, kn as Dt, Xr as E, it as En, Dn as Et, Pr as F, Ge as Fn, fn as Ft, _r as G, ke as Gn, on as Gt, Tr as H, je as Hn, K as Ht, Ir as I, L as In, pn as It, gr as J, Oe as Jn, G as Jt, Sr as K, A as Kn, rn as Kt, jr as L, Ve as Ln, gn as Lt, Gr as M, R as Mn, bn as Mt, Jr as N, Je as Nn, xn as Nt, Kr as O, tt as On, On as Ot, Br as P, qe as Pn, mn as Pt, fr as Q, de as Qn, W as Qt, Or as R, Be as Rn, sn as Rt, Z as S, Tt as Sn, Rn as St, Q as T, mt as Tn, J as Tt, Cr as U, M as Un, un as Ut, kr as V, N as Vn, dn as Vt, xr as W, Ae as Wn, hn as Wt, hr as X, De as Xn, tn as Xt, br as Y, D as Yn, nn as Yt, vr as Z, Ee as Zn, Qt as Zt, hi as _, Mt as _n, Wn as _t, Oi as a, Gt as an, ne as ar, or as at, ci as b, kt as bn, Hn as bt, bi as c, Ut as cn, ee as cr, tr as ct, vi as d, Rt as dn, d as dr, Qn as dt, qt as en, ue as er, cr as et, Ti as f, zt as fn, o as fr, Xn as ft, _i as g, Pt as gn, n as gr, Kn as gt, $ as h, Ft as hn, c as hr, qn as ht, ki as i, V as in, f as ir, ir as it, qr as j, Ye as jn, q as jt, Rr as k, et as kn, En as kt, Ci as l, Bt as ln, te as lr, er as lt, yi as m, B as mn, s as mr, Jn as mt, ji as n, U as nn, m as nr, lr as nt, Ei as o, Vt as on, re as or, ar as ot, Si as p, It as pn, l as pr, Yn as pt, yr as q, k as qn, an as qt, Ai as r, H as rn, ie as rr, sr as rt, xi as s, Wt as sn, p as sr, nr as st, Mi as t, Kt as tn, ae as tr, ur as tt, wi as u, Lt as un, r as ur, $n as ut, mi as v, z as vn, Bn as vt, ui as w, yt as wn, An as wt, di as x, Dt as xn, Un as xt, fi as y, jt as yn, Vn as yt, Ar as z, I as zn, cn as zt };
|