@sisense/sdk-ui-vue 2.24.0 → 2.25.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/dist/ai.cjs +1 -906
- package/dist/ai.js +101 -5814
- package/dist/index.cjs +1 -1
- package/dist/index.js +499 -2897
- package/dist/packages/sdk-ui-vue/src/sdk-ui-core-exports.d.ts +1 -1
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +2 -446
- package/dist/translations/en-us.cjs +1 -1
- package/dist/translations/en-us.js +2 -7
- package/dist/translations/es-ar.cjs +1 -1
- package/dist/translations/es-ar.js +2 -446
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +2 -446
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +2 -446
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +1 -445
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +1 -445
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +1 -445
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +2 -446
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +2 -446
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +1 -445
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +2 -446
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +1 -445
- package/dist/use-tracking-52aab296.cjs +1 -0
- package/dist/use-tracking-9217c553.js +503 -0
- package/package.json +3 -2
- package/dist/index-r66Tjiqj-bb24c939-5da584fa.cjs +0 -1
- package/dist/index-r66Tjiqj-bb24c939-bb24c939.js +0 -448
- package/dist/use-tracking-a88b968c.cjs +0 -3233
- package/dist/use-tracking-bca10d2a.js +0 -122281
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import "./
|
|
8
|
-
|
|
1
|
+
var K = Object.defineProperty;
|
|
2
|
+
var U = (t, e, n) => e in t ? K(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var E = (t, e, n) => (U(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
import { DrilldownBreadcrumbs as X, AreaChart as Y, BarChart as Z, CalendarHeatmapChart as tt, ColumnChart as et, FunnelChart as nt, LineChart as rt, PieChart as ot, ScatterChart as it, Table as st, PivotTable as at, TreemapChart as ct, SunburstChart as ut, PolarChart as lt, IndicatorChart as dt, Chart as pt, BoxplotChart as yt, AreamapChart as bt, ScattermapChart as ht, StreamgraphChart as gt, AreaRangeChart as Ot, DateRangeFilterTile as St, MemberFilterTile as Ft, CriteriaFilterTile as ft, RelativeDateFilterTile as Ct, FilterTile as Dt, FiltersPanel as jt, queryStateReducer as J, executeQuery as mt, executeQueryByWidgetId as vt, HookAdapter as w, useExecuteCsvQueryInternal as Pt, useExecutePivotQueryInternal as xt, useExecuteCustomWidgetQueryInternal as At, useGetFilterMembers as wt, translateToDashboardResponse as Mt, dataLoadStateReducer as B, getDashboardModel as qt, translateToDashboardsResponse as Rt, getDashboardModels as Tt, useGetSharedFormulaInternal as Wt, getWidgetModel as Et, getHierarchyModels as Bt, createElement as $t, ExternalComponentAdapterElement as kt, useComposedDashboardInternal as Qt, createHookApiFacade as _, useJtdWidget as It, ContextMenu as Lt, translateColumnToAttribute as Gt, isSameAttribute as H, updateDrilldownSelections as _t, processDrilldownSelections as Ht, getSelectionTitleMenuItem as Vt, getDrilldownMenuItems as Jt, ChartWidget as Nt, WidgetById as zt, TableWidget as Kt, PivotTableWidget as Ut, Widget as Xt, DashboardById as Yt, Dashboard as Zt, dashboardModelTranslator as te, dashboardHelpers as T, widgetModelTranslator as v } from "@sisense/sdk-ui-preact";
|
|
5
|
+
import { boxWhiskerProcessResult as Hn, extractDimensionsAndMeasures as Vn } from "@sisense/sdk-ui-preact";
|
|
6
|
+
import { defineComponent as c, watch as g, toRefs as b, ref as m, onBeforeUnmount as M, createApp as ee, h as ne, toValue as re, computed as I, openBlock as oe, createElementBlock as ie, renderSlot as Q, createVNode as V, unref as C, createElementVNode as se } from "vue";
|
|
7
|
+
import { d as N, s as l, a as q, g as x, u as F, b as h, t as d, e as L, f as R, h as W, i as ae, j as ce, k as ue, l as le, m as de, n as pe } from "./use-tracking-9217c553.js";
|
|
8
|
+
import { C as Nn, S as zn, T as Kn } from "./use-tracking-9217c553.js";
|
|
9
|
+
import { getFilterListAndRelationsJaql as z, isMembersFilter as ye, MetadataTypes as be } from "@sisense/sdk-data";
|
|
10
|
+
const he = c({
|
|
9
11
|
props: {
|
|
10
12
|
/**
|
|
11
13
|
* {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.clearDrilldownSelections}
|
|
@@ -44,8 +46,8 @@ const Rr = m({
|
|
|
44
46
|
required: !0
|
|
45
47
|
}
|
|
46
48
|
},
|
|
47
|
-
setup: (
|
|
48
|
-
}),
|
|
49
|
+
setup: (t, { slots: e }) => N(X, t, e, [])
|
|
50
|
+
}), _e = c({
|
|
49
51
|
props: {
|
|
50
52
|
/**
|
|
51
53
|
* {@inheritDoc @sisense/sdk-ui!AreaChartProps.dataOptions}
|
|
@@ -111,8 +113,8 @@ const Rr = m({
|
|
|
111
113
|
*/
|
|
112
114
|
onDataPointsSelected: Function
|
|
113
115
|
},
|
|
114
|
-
setup: (
|
|
115
|
-
}),
|
|
116
|
+
setup: (t) => l(Y, t)
|
|
117
|
+
}), He = c({
|
|
116
118
|
props: {
|
|
117
119
|
/**
|
|
118
120
|
* {@inheritDoc @sisense/sdk-ui!BarChartProps.dataOptions}
|
|
@@ -178,8 +180,8 @@ const Rr = m({
|
|
|
178
180
|
*/
|
|
179
181
|
styleOptions: Object
|
|
180
182
|
},
|
|
181
|
-
setup: (
|
|
182
|
-
}),
|
|
183
|
+
setup: (t) => l(Z, t)
|
|
184
|
+
}), Ve = c({
|
|
183
185
|
props: {
|
|
184
186
|
/**
|
|
185
187
|
* {@inheritDoc @sisense/sdk-ui!CalendarHeatmapChartProps.dataOptions}
|
|
@@ -245,8 +247,8 @@ const Rr = m({
|
|
|
245
247
|
*/
|
|
246
248
|
onDataPointsSelected: Function
|
|
247
249
|
},
|
|
248
|
-
setup: (
|
|
249
|
-
}),
|
|
250
|
+
setup: (t) => l(tt, t)
|
|
251
|
+
}), Je = c({
|
|
250
252
|
props: {
|
|
251
253
|
/**
|
|
252
254
|
* {@inheritDoc @sisense/sdk-ui!ColumnChartProps.dataOptions}
|
|
@@ -312,8 +314,8 @@ const Rr = m({
|
|
|
312
314
|
*/
|
|
313
315
|
styleOptions: Object
|
|
314
316
|
},
|
|
315
|
-
setup: (
|
|
316
|
-
}),
|
|
317
|
+
setup: (t) => l(et, t)
|
|
318
|
+
}), Ne = c({
|
|
317
319
|
props: {
|
|
318
320
|
/**
|
|
319
321
|
* {@inheritDoc @sisense/sdk-ui!FunnelChartProps.dataOptions}
|
|
@@ -379,8 +381,8 @@ const Rr = m({
|
|
|
379
381
|
*/
|
|
380
382
|
styleOptions: Object
|
|
381
383
|
},
|
|
382
|
-
setup: (
|
|
383
|
-
}),
|
|
384
|
+
setup: (t) => l(nt, t)
|
|
385
|
+
}), ze = c({
|
|
384
386
|
props: {
|
|
385
387
|
/**
|
|
386
388
|
* {@inheritDoc @sisense/sdk-ui!LineChartProps.dataOptions}
|
|
@@ -446,8 +448,8 @@ const Rr = m({
|
|
|
446
448
|
*/
|
|
447
449
|
styleOptions: Object
|
|
448
450
|
},
|
|
449
|
-
setup: (
|
|
450
|
-
}),
|
|
451
|
+
setup: (t) => l(rt, t)
|
|
452
|
+
}), Ke = c({
|
|
451
453
|
props: {
|
|
452
454
|
/**
|
|
453
455
|
* {@inheritDoc @sisense/sdk-ui!PieChartProps.dataOptions}
|
|
@@ -513,8 +515,8 @@ const Rr = m({
|
|
|
513
515
|
*/
|
|
514
516
|
styleOptions: Object
|
|
515
517
|
},
|
|
516
|
-
setup: (
|
|
517
|
-
}),
|
|
518
|
+
setup: (t) => l(ot, t)
|
|
519
|
+
}), Ue = c({
|
|
518
520
|
props: {
|
|
519
521
|
/**
|
|
520
522
|
* {@inheritDoc @sisense/sdk-ui!ScatterChartProps.dataOptions}
|
|
@@ -580,8 +582,8 @@ const Rr = m({
|
|
|
580
582
|
*/
|
|
581
583
|
styleOptions: Object
|
|
582
584
|
},
|
|
583
|
-
setup: (
|
|
584
|
-
}),
|
|
585
|
+
setup: (t) => l(it, t)
|
|
586
|
+
}), Xe = c({
|
|
585
587
|
props: {
|
|
586
588
|
/**
|
|
587
589
|
* {@inheritDoc @sisense/sdk-ui!TableProps.dataOptions}
|
|
@@ -619,8 +621,8 @@ const Rr = m({
|
|
|
619
621
|
*/
|
|
620
622
|
onDataReady: Function
|
|
621
623
|
},
|
|
622
|
-
setup: (
|
|
623
|
-
}),
|
|
624
|
+
setup: (t) => l(st, t)
|
|
625
|
+
}), Ye = c({
|
|
624
626
|
props: {
|
|
625
627
|
/**
|
|
626
628
|
* {@inheritDoc @sisense/sdk-ui!PivotTableProps.dataOptions}
|
|
@@ -670,8 +672,8 @@ const Rr = m({
|
|
|
670
672
|
*/
|
|
671
673
|
onDataPointContextMenu: Function
|
|
672
674
|
},
|
|
673
|
-
setup: (
|
|
674
|
-
}),
|
|
675
|
+
setup: (t) => l(at, t)
|
|
676
|
+
}), Ze = c({
|
|
675
677
|
props: {
|
|
676
678
|
/**
|
|
677
679
|
* {@inheritDoc @sisense/sdk-ui!TreemapChartProps.dataOptions}
|
|
@@ -737,8 +739,8 @@ const Rr = m({
|
|
|
737
739
|
*/
|
|
738
740
|
styleOptions: Object
|
|
739
741
|
},
|
|
740
|
-
setup: (
|
|
741
|
-
}),
|
|
742
|
+
setup: (t) => l(ct, t)
|
|
743
|
+
}), tn = c({
|
|
742
744
|
props: {
|
|
743
745
|
/**
|
|
744
746
|
* {@inheritDoc @sisense/sdk-ui!SunburstChartProps.dataOptions}
|
|
@@ -804,8 +806,8 @@ const Rr = m({
|
|
|
804
806
|
*/
|
|
805
807
|
styleOptions: Object
|
|
806
808
|
},
|
|
807
|
-
setup: (
|
|
808
|
-
}),
|
|
809
|
+
setup: (t) => l(ut, t)
|
|
810
|
+
}), en = c({
|
|
809
811
|
props: {
|
|
810
812
|
/**
|
|
811
813
|
* {@inheritDoc @sisense/sdk-ui!PolarChartProps.dataOptions}
|
|
@@ -871,8 +873,8 @@ const Rr = m({
|
|
|
871
873
|
*/
|
|
872
874
|
styleOptions: Object
|
|
873
875
|
},
|
|
874
|
-
setup: (
|
|
875
|
-
}),
|
|
876
|
+
setup: (t) => l(lt, t)
|
|
877
|
+
}), nn = c({
|
|
876
878
|
props: {
|
|
877
879
|
/**
|
|
878
880
|
* {@inheritDoc @sisense/sdk-ui!IndicatorChartProps.dataOptions}
|
|
@@ -920,8 +922,8 @@ const Rr = m({
|
|
|
920
922
|
*/
|
|
921
923
|
onDataReady: Function
|
|
922
924
|
},
|
|
923
|
-
setup: (
|
|
924
|
-
}),
|
|
925
|
+
setup: (t) => l(dt, t)
|
|
926
|
+
}), rn = c({
|
|
925
927
|
props: {
|
|
926
928
|
/**
|
|
927
929
|
* {@inheritDoc @sisense/sdk-ui!ChartProps.chartType}
|
|
@@ -1000,8 +1002,8 @@ const Rr = m({
|
|
|
1000
1002
|
*/
|
|
1001
1003
|
refreshCounter: Number
|
|
1002
1004
|
},
|
|
1003
|
-
setup: (
|
|
1004
|
-
}),
|
|
1005
|
+
setup: (t) => l(pt, t)
|
|
1006
|
+
}), on = c({
|
|
1005
1007
|
props: {
|
|
1006
1008
|
/**
|
|
1007
1009
|
* {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.dataOptions}
|
|
@@ -1067,8 +1069,8 @@ const Rr = m({
|
|
|
1067
1069
|
*/
|
|
1068
1070
|
onDataPointsSelected: Function
|
|
1069
1071
|
},
|
|
1070
|
-
setup: (
|
|
1071
|
-
}),
|
|
1072
|
+
setup: (t) => l(yt, t)
|
|
1073
|
+
}), sn = c({
|
|
1072
1074
|
props: {
|
|
1073
1075
|
/**
|
|
1074
1076
|
* {@inheritDoc @sisense/sdk-ui!AreamapChartProps.dataOptions}
|
|
@@ -1116,8 +1118,8 @@ const Rr = m({
|
|
|
1116
1118
|
*/
|
|
1117
1119
|
onDataPointClick: Function
|
|
1118
1120
|
},
|
|
1119
|
-
setup: (
|
|
1120
|
-
}),
|
|
1121
|
+
setup: (t) => l(bt, t)
|
|
1122
|
+
}), an = c({
|
|
1121
1123
|
props: {
|
|
1122
1124
|
/**
|
|
1123
1125
|
* {@inheritDoc @sisense/sdk-ui!ScattermapChartProps.dataOptions}
|
|
@@ -1165,8 +1167,8 @@ const Rr = m({
|
|
|
1165
1167
|
*/
|
|
1166
1168
|
onDataPointClick: Object
|
|
1167
1169
|
},
|
|
1168
|
-
setup: (
|
|
1169
|
-
}),
|
|
1170
|
+
setup: (t) => l(ht, t)
|
|
1171
|
+
}), cn = c({
|
|
1170
1172
|
props: {
|
|
1171
1173
|
/**
|
|
1172
1174
|
* {@inheritDoc @sisense/sdk-ui!StreamgraphChartProps.dataOptions}
|
|
@@ -1232,8 +1234,8 @@ const Rr = m({
|
|
|
1232
1234
|
*/
|
|
1233
1235
|
onDataPointsSelected: Function
|
|
1234
1236
|
},
|
|
1235
|
-
setup: (
|
|
1236
|
-
}),
|
|
1237
|
+
setup: (t) => l(gt, t)
|
|
1238
|
+
}), un = c({
|
|
1237
1239
|
props: {
|
|
1238
1240
|
/**
|
|
1239
1241
|
* {@inheritDoc @sisense/sdk-ui!AreaRangeChartProps.dataOptions}
|
|
@@ -1299,8 +1301,8 @@ const Rr = m({
|
|
|
1299
1301
|
*/
|
|
1300
1302
|
styleOptions: Object
|
|
1301
1303
|
},
|
|
1302
|
-
setup: (
|
|
1303
|
-
}),
|
|
1304
|
+
setup: (t) => l(Ot, t)
|
|
1305
|
+
}), ln = c({
|
|
1304
1306
|
props: {
|
|
1305
1307
|
/**
|
|
1306
1308
|
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.attribute}
|
|
@@ -1360,8 +1362,8 @@ const Rr = m({
|
|
|
1360
1362
|
*/
|
|
1361
1363
|
onEdit: Function
|
|
1362
1364
|
},
|
|
1363
|
-
setup: (
|
|
1364
|
-
}),
|
|
1365
|
+
setup: (t) => l(St, t)
|
|
1366
|
+
}), dn = c({
|
|
1365
1367
|
props: {
|
|
1366
1368
|
/**
|
|
1367
1369
|
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.attribute}
|
|
@@ -1408,8 +1410,8 @@ const Rr = m({
|
|
|
1408
1410
|
*/
|
|
1409
1411
|
onEdit: Function
|
|
1410
1412
|
},
|
|
1411
|
-
setup: (
|
|
1412
|
-
}),
|
|
1413
|
+
setup: (t) => l(Ft, t)
|
|
1414
|
+
}), pn = c({
|
|
1413
1415
|
props: {
|
|
1414
1416
|
/**
|
|
1415
1417
|
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.arrangement}
|
|
@@ -1449,8 +1451,8 @@ const Rr = m({
|
|
|
1449
1451
|
*/
|
|
1450
1452
|
onEdit: Function
|
|
1451
1453
|
},
|
|
1452
|
-
setup: (
|
|
1453
|
-
}),
|
|
1454
|
+
setup: (t) => l(ft, t)
|
|
1455
|
+
}), yn = c({
|
|
1454
1456
|
props: {
|
|
1455
1457
|
/**
|
|
1456
1458
|
* {@inheritDoc @sisense/sdk-ui!RelativeDateFilterTileProps.title}
|
|
@@ -1495,8 +1497,8 @@ const Rr = m({
|
|
|
1495
1497
|
*/
|
|
1496
1498
|
onEdit: Function
|
|
1497
1499
|
},
|
|
1498
|
-
setup: (
|
|
1499
|
-
}),
|
|
1500
|
+
setup: (t) => l(Ct, t)
|
|
1501
|
+
}), bn = c({
|
|
1500
1502
|
props: {
|
|
1501
1503
|
/**
|
|
1502
1504
|
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.filter}
|
|
@@ -1525,8 +1527,8 @@ const Rr = m({
|
|
|
1525
1527
|
*/
|
|
1526
1528
|
onEdit: Function
|
|
1527
1529
|
},
|
|
1528
|
-
setup: (
|
|
1529
|
-
}),
|
|
1530
|
+
setup: (t) => l(Dt, t)
|
|
1531
|
+
}), hn = c({
|
|
1530
1532
|
props: {
|
|
1531
1533
|
/**
|
|
1532
1534
|
* {@inheritDoc @sisense/sdk-ui!FiltersPanelProps.filters}
|
|
@@ -1557,2503 +1559,103 @@ const Rr = m({
|
|
|
1557
1559
|
required: !0
|
|
1558
1560
|
}
|
|
1559
1561
|
},
|
|
1560
|
-
setup: (
|
|
1561
|
-
}),
|
|
1562
|
-
|
|
1563
|
-
log(e) {
|
|
1564
|
-
this.output("log", e);
|
|
1565
|
-
},
|
|
1566
|
-
warn(e) {
|
|
1567
|
-
this.output("warn", e);
|
|
1568
|
-
},
|
|
1569
|
-
error(e) {
|
|
1570
|
-
this.output("error", e);
|
|
1571
|
-
},
|
|
1572
|
-
output(e, t) {
|
|
1573
|
-
console && console[e] && console[e].apply(console, t);
|
|
1574
|
-
}
|
|
1575
|
-
};
|
|
1576
|
-
class we {
|
|
1577
|
-
constructor(t) {
|
|
1578
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1579
|
-
this.init(t, n);
|
|
1580
|
-
}
|
|
1581
|
-
init(t) {
|
|
1582
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1583
|
-
this.prefix = n.prefix || "i18next:", this.logger = t || Tr, this.options = n, this.debug = n.debug;
|
|
1584
|
-
}
|
|
1585
|
-
log() {
|
|
1586
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1587
|
-
n[r] = arguments[r];
|
|
1588
|
-
return this.forward(n, "log", "", !0);
|
|
1589
|
-
}
|
|
1590
|
-
warn() {
|
|
1591
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1592
|
-
n[r] = arguments[r];
|
|
1593
|
-
return this.forward(n, "warn", "", !0);
|
|
1594
|
-
}
|
|
1595
|
-
error() {
|
|
1596
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1597
|
-
n[r] = arguments[r];
|
|
1598
|
-
return this.forward(n, "error", "");
|
|
1599
|
-
}
|
|
1600
|
-
deprecate() {
|
|
1601
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1602
|
-
n[r] = arguments[r];
|
|
1603
|
-
return this.forward(n, "warn", "WARNING DEPRECATED: ", !0);
|
|
1604
|
-
}
|
|
1605
|
-
forward(t, n, r, s) {
|
|
1606
|
-
return s && !this.debug ? null : (typeof t[0] == "string" && (t[0] = `${r}${this.prefix} ${t[0]}`), this.logger[n](t));
|
|
1607
|
-
}
|
|
1608
|
-
create(t) {
|
|
1609
|
-
return new we(this.logger, {
|
|
1610
|
-
prefix: `${this.prefix}:${t}:`,
|
|
1611
|
-
...this.options
|
|
1612
|
-
});
|
|
1613
|
-
}
|
|
1614
|
-
clone(t) {
|
|
1615
|
-
return t = t || this.options, t.prefix = t.prefix || this.prefix, new we(this.logger, t);
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
var k = new we();
|
|
1619
|
-
class Le {
|
|
1620
|
-
constructor() {
|
|
1621
|
-
this.observers = {};
|
|
1622
|
-
}
|
|
1623
|
-
on(t, n) {
|
|
1624
|
-
return t.split(" ").forEach((r) => {
|
|
1625
|
-
this.observers[r] = this.observers[r] || [], this.observers[r].push(n);
|
|
1626
|
-
}), this;
|
|
1627
|
-
}
|
|
1628
|
-
off(t, n) {
|
|
1629
|
-
if (this.observers[t]) {
|
|
1630
|
-
if (!n) {
|
|
1631
|
-
delete this.observers[t];
|
|
1632
|
-
return;
|
|
1633
|
-
}
|
|
1634
|
-
this.observers[t] = this.observers[t].filter((r) => r !== n);
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
emit(t) {
|
|
1638
|
-
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++)
|
|
1639
|
-
r[s - 1] = arguments[s];
|
|
1640
|
-
this.observers[t] && [].concat(this.observers[t]).forEach((a) => {
|
|
1641
|
-
a(...r);
|
|
1642
|
-
}), this.observers["*"] && [].concat(this.observers["*"]).forEach((a) => {
|
|
1643
|
-
a.apply(a, [t, ...r]);
|
|
1644
|
-
});
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
function le() {
|
|
1648
|
-
let e, t;
|
|
1649
|
-
const n = new Promise((r, s) => {
|
|
1650
|
-
e = r, t = s;
|
|
1651
|
-
});
|
|
1652
|
-
return n.resolve = e, n.reject = t, n;
|
|
1653
|
-
}
|
|
1654
|
-
function ct(e) {
|
|
1655
|
-
return e == null ? "" : "" + e;
|
|
1656
|
-
}
|
|
1657
|
-
function Mr(e, t, n) {
|
|
1658
|
-
e.forEach((r) => {
|
|
1659
|
-
t[r] && (n[r] = t[r]);
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
function Xe(e, t, n) {
|
|
1663
|
-
function r(a) {
|
|
1664
|
-
return a && a.indexOf("###") > -1 ? a.replace(/###/g, ".") : a;
|
|
1665
|
-
}
|
|
1666
|
-
function s() {
|
|
1667
|
-
return !e || typeof e == "string";
|
|
1668
|
-
}
|
|
1669
|
-
const i = typeof t != "string" ? [].concat(t) : t.split(".");
|
|
1670
|
-
for (; i.length > 1; ) {
|
|
1671
|
-
if (s())
|
|
1672
|
-
return {};
|
|
1673
|
-
const a = r(i.shift());
|
|
1674
|
-
!e[a] && n && (e[a] = new n()), Object.prototype.hasOwnProperty.call(e, a) ? e = e[a] : e = {};
|
|
1675
|
-
}
|
|
1676
|
-
return s() ? {} : {
|
|
1677
|
-
obj: e,
|
|
1678
|
-
k: r(i.shift())
|
|
1679
|
-
};
|
|
1680
|
-
}
|
|
1681
|
-
function dt(e, t, n) {
|
|
1682
|
-
const {
|
|
1683
|
-
obj: r,
|
|
1684
|
-
k: s
|
|
1685
|
-
} = Xe(e, t, Object);
|
|
1686
|
-
r[s] = n;
|
|
1687
|
-
}
|
|
1688
|
-
function $r(e, t, n, r) {
|
|
1689
|
-
const {
|
|
1690
|
-
obj: s,
|
|
1691
|
-
k: i
|
|
1692
|
-
} = Xe(e, t, Object);
|
|
1693
|
-
s[i] = s[i] || [], r && (s[i] = s[i].concat(n)), r || s[i].push(n);
|
|
1694
|
-
}
|
|
1695
|
-
function De(e, t) {
|
|
1696
|
-
const {
|
|
1697
|
-
obj: n,
|
|
1698
|
-
k: r
|
|
1699
|
-
} = Xe(e, t);
|
|
1700
|
-
if (n)
|
|
1701
|
-
return n[r];
|
|
1702
|
-
}
|
|
1703
|
-
function Ir(e, t, n) {
|
|
1704
|
-
const r = De(e, n);
|
|
1705
|
-
return r !== void 0 ? r : De(t, n);
|
|
1706
|
-
}
|
|
1707
|
-
function Ht(e, t, n) {
|
|
1708
|
-
for (const r in t)
|
|
1709
|
-
r !== "__proto__" && r !== "constructor" && (r in e ? typeof e[r] == "string" || e[r] instanceof String || typeof t[r] == "string" || t[r] instanceof String ? n && (e[r] = t[r]) : Ht(e[r], t[r], n) : e[r] = t[r]);
|
|
1710
|
-
return e;
|
|
1711
|
-
}
|
|
1712
|
-
function Z(e) {
|
|
1713
|
-
return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
1714
|
-
}
|
|
1715
|
-
var _r = {
|
|
1716
|
-
"&": "&",
|
|
1717
|
-
"<": "<",
|
|
1718
|
-
">": ">",
|
|
1719
|
-
'"': """,
|
|
1720
|
-
"'": "'",
|
|
1721
|
-
"/": "/"
|
|
1722
|
-
};
|
|
1723
|
-
function kr(e) {
|
|
1724
|
-
return typeof e == "string" ? e.replace(/[&<>"'\/]/g, (t) => _r[t]) : e;
|
|
1725
|
-
}
|
|
1726
|
-
const Br = [" ", ",", "?", "!", ";"];
|
|
1727
|
-
function Ur(e, t, n) {
|
|
1728
|
-
t = t || "", n = n || "";
|
|
1729
|
-
const r = Br.filter((a) => t.indexOf(a) < 0 && n.indexOf(a) < 0);
|
|
1730
|
-
if (r.length === 0)
|
|
1731
|
-
return !0;
|
|
1732
|
-
const s = new RegExp(`(${r.map((a) => a === "?" ? "\\?" : a).join("|")})`);
|
|
1733
|
-
let i = !s.test(e);
|
|
1734
|
-
if (!i) {
|
|
1735
|
-
const a = e.indexOf(n);
|
|
1736
|
-
a > 0 && !s.test(e.substring(0, a)) && (i = !0);
|
|
1737
|
-
}
|
|
1738
|
-
return i;
|
|
1739
|
-
}
|
|
1740
|
-
function je(e, t) {
|
|
1741
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
|
|
1742
|
-
if (!e)
|
|
1743
|
-
return;
|
|
1744
|
-
if (e[t])
|
|
1745
|
-
return e[t];
|
|
1746
|
-
const r = t.split(n);
|
|
1747
|
-
let s = e;
|
|
1748
|
-
for (let i = 0; i < r.length; ++i) {
|
|
1749
|
-
if (!s || typeof s[r[i]] == "string" && i + 1 < r.length)
|
|
1750
|
-
return;
|
|
1751
|
-
if (s[r[i]] === void 0) {
|
|
1752
|
-
let a = 2, o = r.slice(i, i + a).join(n), u = s[o];
|
|
1753
|
-
for (; u === void 0 && r.length > i + a; )
|
|
1754
|
-
a++, o = r.slice(i, i + a).join(n), u = s[o];
|
|
1755
|
-
if (u === void 0)
|
|
1756
|
-
return;
|
|
1757
|
-
if (u === null)
|
|
1758
|
-
return null;
|
|
1759
|
-
if (t.endsWith(o)) {
|
|
1760
|
-
if (typeof u == "string")
|
|
1761
|
-
return u;
|
|
1762
|
-
if (o && typeof u[o] == "string")
|
|
1763
|
-
return u[o];
|
|
1764
|
-
}
|
|
1765
|
-
const c = r.slice(i + a).join(n);
|
|
1766
|
-
return c ? je(u, c, n) : void 0;
|
|
1767
|
-
}
|
|
1768
|
-
s = s[r[i]];
|
|
1769
|
-
}
|
|
1770
|
-
return s;
|
|
1771
|
-
}
|
|
1772
|
-
function Pe(e) {
|
|
1773
|
-
return e && e.indexOf("_") > 0 ? e.replace("_", "-") : e;
|
|
1774
|
-
}
|
|
1775
|
-
class ft extends Le {
|
|
1776
|
-
constructor(t) {
|
|
1777
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
1778
|
-
ns: ["translation"],
|
|
1779
|
-
defaultNS: "translation"
|
|
1780
|
-
};
|
|
1781
|
-
super(), this.data = t || {}, this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
|
|
1782
|
-
}
|
|
1783
|
-
addNamespaces(t) {
|
|
1784
|
-
this.options.ns.indexOf(t) < 0 && this.options.ns.push(t);
|
|
1785
|
-
}
|
|
1786
|
-
removeNamespaces(t) {
|
|
1787
|
-
const n = this.options.ns.indexOf(t);
|
|
1788
|
-
n > -1 && this.options.ns.splice(n, 1);
|
|
1789
|
-
}
|
|
1790
|
-
getResource(t, n, r) {
|
|
1791
|
-
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1792
|
-
const i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, a = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
1793
|
-
let o = [t, n];
|
|
1794
|
-
r && typeof r != "string" && (o = o.concat(r)), r && typeof r == "string" && (o = o.concat(i ? r.split(i) : r)), t.indexOf(".") > -1 && (o = t.split("."));
|
|
1795
|
-
const u = De(this.data, o);
|
|
1796
|
-
return u || !a || typeof r != "string" ? u : je(this.data && this.data[t] && this.data[t][n], r, i);
|
|
1797
|
-
}
|
|
1798
|
-
addResource(t, n, r, s) {
|
|
1799
|
-
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
1800
|
-
silent: !1
|
|
1801
|
-
};
|
|
1802
|
-
const a = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator;
|
|
1803
|
-
let o = [t, n];
|
|
1804
|
-
r && (o = o.concat(a ? r.split(a) : r)), t.indexOf(".") > -1 && (o = t.split("."), s = n, n = o[1]), this.addNamespaces(n), dt(this.data, o, s), i.silent || this.emit("added", t, n, r, s);
|
|
1805
|
-
}
|
|
1806
|
-
addResources(t, n, r) {
|
|
1807
|
-
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
|
|
1808
|
-
silent: !1
|
|
1809
|
-
};
|
|
1810
|
-
for (const i in r)
|
|
1811
|
-
(typeof r[i] == "string" || Object.prototype.toString.apply(r[i]) === "[object Array]") && this.addResource(t, n, i, r[i], {
|
|
1812
|
-
silent: !0
|
|
1813
|
-
});
|
|
1814
|
-
s.silent || this.emit("added", t, n, r);
|
|
1815
|
-
}
|
|
1816
|
-
addResourceBundle(t, n, r, s, i) {
|
|
1817
|
-
let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
|
|
1818
|
-
silent: !1
|
|
1819
|
-
}, o = [t, n];
|
|
1820
|
-
t.indexOf(".") > -1 && (o = t.split("."), s = r, r = n, n = o[1]), this.addNamespaces(n);
|
|
1821
|
-
let u = De(this.data, o) || {};
|
|
1822
|
-
s ? Ht(u, r, i) : u = {
|
|
1823
|
-
...u,
|
|
1824
|
-
...r
|
|
1825
|
-
}, dt(this.data, o, u), a.silent || this.emit("added", t, n, r);
|
|
1826
|
-
}
|
|
1827
|
-
removeResourceBundle(t, n) {
|
|
1828
|
-
this.hasResourceBundle(t, n) && delete this.data[t][n], this.removeNamespaces(n), this.emit("removed", t, n);
|
|
1829
|
-
}
|
|
1830
|
-
hasResourceBundle(t, n) {
|
|
1831
|
-
return this.getResource(t, n) !== void 0;
|
|
1832
|
-
}
|
|
1833
|
-
getResourceBundle(t, n) {
|
|
1834
|
-
return n || (n = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? {
|
|
1835
|
-
...this.getResource(t, n)
|
|
1836
|
-
} : this.getResource(t, n);
|
|
1837
|
-
}
|
|
1838
|
-
getDataByLanguage(t) {
|
|
1839
|
-
return this.data[t];
|
|
1840
|
-
}
|
|
1841
|
-
hasLanguageSomeTranslations(t) {
|
|
1842
|
-
const n = this.getDataByLanguage(t);
|
|
1843
|
-
return !!(n && Object.keys(n) || []).find((s) => n[s] && Object.keys(n[s]).length > 0);
|
|
1844
|
-
}
|
|
1845
|
-
toJSON() {
|
|
1846
|
-
return this.data;
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1849
|
-
var Kt = {
|
|
1850
|
-
processors: {},
|
|
1851
|
-
addPostProcessor(e) {
|
|
1852
|
-
this.processors[e.name] = e;
|
|
1853
|
-
},
|
|
1854
|
-
handle(e, t, n, r, s) {
|
|
1855
|
-
return e.forEach((i) => {
|
|
1856
|
-
this.processors[i] && (t = this.processors[i].process(t, n, r, s));
|
|
1857
|
-
}), t;
|
|
1858
|
-
}
|
|
1859
|
-
};
|
|
1860
|
-
const pt = {};
|
|
1861
|
-
class Fe extends Le {
|
|
1862
|
-
constructor(t) {
|
|
1863
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1864
|
-
super(), Mr(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = k.create("translator");
|
|
1865
|
-
}
|
|
1866
|
-
changeLanguage(t) {
|
|
1867
|
-
t && (this.language = t);
|
|
1868
|
-
}
|
|
1869
|
-
exists(t) {
|
|
1870
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
1871
|
-
interpolation: {}
|
|
1872
|
-
};
|
|
1873
|
-
if (t == null)
|
|
1874
|
-
return !1;
|
|
1875
|
-
const r = this.resolve(t, n);
|
|
1876
|
-
return r && r.res !== void 0;
|
|
1877
|
-
}
|
|
1878
|
-
extractFromKey(t, n) {
|
|
1879
|
-
let r = n.nsSeparator !== void 0 ? n.nsSeparator : this.options.nsSeparator;
|
|
1880
|
-
r === void 0 && (r = ":");
|
|
1881
|
-
const s = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
|
|
1882
|
-
let i = n.ns || this.options.defaultNS || [];
|
|
1883
|
-
const a = r && t.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !Ur(t, r, s);
|
|
1884
|
-
if (a && !o) {
|
|
1885
|
-
const u = t.match(this.interpolator.nestingRegexp);
|
|
1886
|
-
if (u && u.length > 0)
|
|
1887
|
-
return {
|
|
1888
|
-
key: t,
|
|
1889
|
-
namespaces: i
|
|
1890
|
-
};
|
|
1891
|
-
const c = t.split(r);
|
|
1892
|
-
(r !== s || r === s && this.options.ns.indexOf(c[0]) > -1) && (i = c.shift()), t = c.join(s);
|
|
1893
|
-
}
|
|
1894
|
-
return typeof i == "string" && (i = [i]), {
|
|
1895
|
-
key: t,
|
|
1896
|
-
namespaces: i
|
|
1897
|
-
};
|
|
1898
|
-
}
|
|
1899
|
-
translate(t, n, r) {
|
|
1900
|
-
if (typeof n != "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)), typeof n == "object" && (n = {
|
|
1901
|
-
...n
|
|
1902
|
-
}), n || (n = {}), t == null)
|
|
1903
|
-
return "";
|
|
1904
|
-
Array.isArray(t) || (t = [String(t)]);
|
|
1905
|
-
const s = n.returnDetails !== void 0 ? n.returnDetails : this.options.returnDetails, i = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, {
|
|
1906
|
-
key: a,
|
|
1907
|
-
namespaces: o
|
|
1908
|
-
} = this.extractFromKey(t[t.length - 1], n), u = o[o.length - 1], c = n.lng || this.language, d = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1909
|
-
if (c && c.toLowerCase() === "cimode") {
|
|
1910
|
-
if (d) {
|
|
1911
|
-
const C = n.nsSeparator || this.options.nsSeparator;
|
|
1912
|
-
return s ? {
|
|
1913
|
-
res: `${u}${C}${a}`,
|
|
1914
|
-
usedKey: a,
|
|
1915
|
-
exactUsedKey: a,
|
|
1916
|
-
usedLng: c,
|
|
1917
|
-
usedNS: u
|
|
1918
|
-
} : `${u}${C}${a}`;
|
|
1919
|
-
}
|
|
1920
|
-
return s ? {
|
|
1921
|
-
res: a,
|
|
1922
|
-
usedKey: a,
|
|
1923
|
-
exactUsedKey: a,
|
|
1924
|
-
usedLng: c,
|
|
1925
|
-
usedNS: u
|
|
1926
|
-
} : a;
|
|
1927
|
-
}
|
|
1928
|
-
const f = this.resolve(t, n);
|
|
1929
|
-
let l = f && f.res;
|
|
1930
|
-
const g = f && f.usedKey || a, p = f && f.exactUsedKey || a, y = Object.prototype.toString.apply(l), h = ["[object Number]", "[object Function]", "[object RegExp]"], x = n.joinArrays !== void 0 ? n.joinArrays : this.options.joinArrays, w = !this.i18nFormat || this.i18nFormat.handleAsObject;
|
|
1931
|
-
if (w && l && (typeof l != "string" && typeof l != "boolean" && typeof l != "number") && h.indexOf(y) < 0 && !(typeof x == "string" && y === "[object Array]")) {
|
|
1932
|
-
if (!n.returnObjects && !this.options.returnObjects) {
|
|
1933
|
-
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
1934
|
-
const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, l, {
|
|
1935
|
-
...n,
|
|
1936
|
-
ns: o
|
|
1937
|
-
}) : `key '${a} (${this.language})' returned an object instead of string.`;
|
|
1938
|
-
return s ? (f.res = C, f) : C;
|
|
1939
|
-
}
|
|
1940
|
-
if (i) {
|
|
1941
|
-
const C = y === "[object Array]", E = C ? [] : {}, $ = C ? p : g;
|
|
1942
|
-
for (const P in l)
|
|
1943
|
-
if (Object.prototype.hasOwnProperty.call(l, P)) {
|
|
1944
|
-
const ge = `${$}${i}${P}`;
|
|
1945
|
-
E[P] = this.translate(ge, {
|
|
1946
|
-
...n,
|
|
1947
|
-
joinArrays: !1,
|
|
1948
|
-
ns: o
|
|
1949
|
-
}), E[P] === ge && (E[P] = l[P]);
|
|
1950
|
-
}
|
|
1951
|
-
l = E;
|
|
1952
|
-
}
|
|
1953
|
-
} else if (w && typeof x == "string" && y === "[object Array]")
|
|
1954
|
-
l = l.join(x), l && (l = this.extendTranslation(l, t, n, r));
|
|
1955
|
-
else {
|
|
1956
|
-
let C = !1, E = !1;
|
|
1957
|
-
const $ = n.count !== void 0 && typeof n.count != "string", P = Fe.hasDefaultValue(n), ge = $ ? this.pluralResolver.getSuffix(c, n.count, n) : "", un = n.ordinal && $ ? this.pluralResolver.getSuffix(c, n.count, {
|
|
1958
|
-
ordinal: !1
|
|
1959
|
-
}) : "", ie = n[`defaultValue${ge}`] || n[`defaultValue${un}`] || n.defaultValue;
|
|
1960
|
-
!this.isValidLookup(l) && P && (C = !0, l = ie), this.isValidLookup(l) || (E = !0, l = a);
|
|
1961
|
-
const ln = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && E ? void 0 : l, ae = P && ie !== l && this.options.updateMissing;
|
|
1962
|
-
if (E || C || ae) {
|
|
1963
|
-
if (this.logger.log(ae ? "updateKey" : "missingKey", c, u, a, ae ? ie : l), i) {
|
|
1964
|
-
const N = this.resolve(a, {
|
|
1965
|
-
...n,
|
|
1966
|
-
keySeparator: !1
|
|
1967
|
-
});
|
|
1968
|
-
N && N.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
1969
|
-
}
|
|
1970
|
-
let oe = [];
|
|
1971
|
-
const he = this.languageUtils.getFallbackCodes(this.options.fallbackLng, n.lng || this.language);
|
|
1972
|
-
if (this.options.saveMissingTo === "fallback" && he && he[0])
|
|
1973
|
-
for (let N = 0; N < he.length; N++)
|
|
1974
|
-
oe.push(he[N]);
|
|
1975
|
-
else
|
|
1976
|
-
this.options.saveMissingTo === "all" ? oe = this.languageUtils.toResolveHierarchy(n.lng || this.language) : oe.push(n.lng || this.language);
|
|
1977
|
-
const rt = (N, X, st) => {
|
|
1978
|
-
const it = P && st !== l ? st : ln;
|
|
1979
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(N, u, X, it, ae, n) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(N, u, X, it, ae, n), this.emit("missingKey", N, u, X, l);
|
|
1980
|
-
};
|
|
1981
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && $ ? oe.forEach((N) => {
|
|
1982
|
-
this.pluralResolver.getSuffixes(N, n).forEach((X) => {
|
|
1983
|
-
rt([N], a + X, n[`defaultValue${X}`] || ie);
|
|
1984
|
-
});
|
|
1985
|
-
}) : rt(oe, a, ie));
|
|
1986
|
-
}
|
|
1987
|
-
l = this.extendTranslation(l, t, n, f, r), E && l === a && this.options.appendNamespaceToMissingKey && (l = `${u}:${a}`), (E || C) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? l = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${a}` : a, C ? l : void 0) : l = this.options.parseMissingKeyHandler(l));
|
|
1988
|
-
}
|
|
1989
|
-
return s ? (f.res = l, f) : l;
|
|
1990
|
-
}
|
|
1991
|
-
extendTranslation(t, n, r, s, i) {
|
|
1992
|
-
var a = this;
|
|
1993
|
-
if (this.i18nFormat && this.i18nFormat.parse)
|
|
1994
|
-
t = this.i18nFormat.parse(t, {
|
|
1995
|
-
...this.options.interpolation.defaultVariables,
|
|
1996
|
-
...r
|
|
1997
|
-
}, s.usedLng, s.usedNS, s.usedKey, {
|
|
1998
|
-
resolved: s
|
|
1999
|
-
});
|
|
2000
|
-
else if (!r.skipInterpolation) {
|
|
2001
|
-
r.interpolation && this.interpolator.init({
|
|
2002
|
-
...r,
|
|
2003
|
-
interpolation: {
|
|
2004
|
-
...this.options.interpolation,
|
|
2005
|
-
...r.interpolation
|
|
2006
|
-
}
|
|
2007
|
-
});
|
|
2008
|
-
const c = typeof t == "string" && (r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
2009
|
-
let d;
|
|
2010
|
-
if (c) {
|
|
2011
|
-
const l = t.match(this.interpolator.nestingRegexp);
|
|
2012
|
-
d = l && l.length;
|
|
2013
|
-
}
|
|
2014
|
-
let f = r.replace && typeof r.replace != "string" ? r.replace : r;
|
|
2015
|
-
if (this.options.interpolation.defaultVariables && (f = {
|
|
2016
|
-
...this.options.interpolation.defaultVariables,
|
|
2017
|
-
...f
|
|
2018
|
-
}), t = this.interpolator.interpolate(t, f, r.lng || this.language, r), c) {
|
|
2019
|
-
const l = t.match(this.interpolator.nestingRegexp), g = l && l.length;
|
|
2020
|
-
d < g && (r.nest = !1);
|
|
2021
|
-
}
|
|
2022
|
-
!r.lng && this.options.compatibilityAPI !== "v1" && s && s.res && (r.lng = s.usedLng), r.nest !== !1 && (t = this.interpolator.nest(t, function() {
|
|
2023
|
-
for (var l = arguments.length, g = new Array(l), p = 0; p < l; p++)
|
|
2024
|
-
g[p] = arguments[p];
|
|
2025
|
-
return i && i[0] === g[0] && !r.context ? (a.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`), null) : a.translate(...g, n);
|
|
2026
|
-
}, r)), r.interpolation && this.interpolator.reset();
|
|
2027
|
-
}
|
|
2028
|
-
const o = r.postProcess || this.options.postProcess, u = typeof o == "string" ? [o] : o;
|
|
2029
|
-
return t != null && u && u.length && r.applyPostProcessor !== !1 && (t = Kt.handle(u, t, n, this.options && this.options.postProcessPassResolved ? {
|
|
2030
|
-
i18nResolved: s,
|
|
2031
|
-
...r
|
|
2032
|
-
} : r, this)), t;
|
|
2033
|
-
}
|
|
2034
|
-
resolve(t) {
|
|
2035
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, s, i, a, o;
|
|
2036
|
-
return typeof t == "string" && (t = [t]), t.forEach((u) => {
|
|
2037
|
-
if (this.isValidLookup(r))
|
|
2038
|
-
return;
|
|
2039
|
-
const c = this.extractFromKey(u, n), d = c.key;
|
|
2040
|
-
s = d;
|
|
2041
|
-
let f = c.namespaces;
|
|
2042
|
-
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
2043
|
-
const l = n.count !== void 0 && typeof n.count != "string", g = l && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), p = n.context !== void 0 && (typeof n.context == "string" || typeof n.context == "number") && n.context !== "", y = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
|
|
2044
|
-
f.forEach((h) => {
|
|
2045
|
-
this.isValidLookup(r) || (o = h, !pt[`${y[0]}-${h}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(o) && (pt[`${y[0]}-${h}`] = !0, this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), y.forEach((x) => {
|
|
2046
|
-
if (this.isValidLookup(r))
|
|
2047
|
-
return;
|
|
2048
|
-
a = x;
|
|
2049
|
-
const w = [d];
|
|
2050
|
-
if (this.i18nFormat && this.i18nFormat.addLookupKeys)
|
|
2051
|
-
this.i18nFormat.addLookupKeys(w, d, x, h, n);
|
|
2052
|
-
else {
|
|
2053
|
-
let C;
|
|
2054
|
-
l && (C = this.pluralResolver.getSuffix(x, n.count, n));
|
|
2055
|
-
const E = `${this.options.pluralSeparator}zero`, $ = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
2056
|
-
if (l && (w.push(d + C), n.ordinal && C.indexOf($) === 0 && w.push(d + C.replace($, this.options.pluralSeparator)), g && w.push(d + E)), p) {
|
|
2057
|
-
const P = `${d}${this.options.contextSeparator}${n.context}`;
|
|
2058
|
-
w.push(P), l && (w.push(P + C), n.ordinal && C.indexOf($) === 0 && w.push(P + C.replace($, this.options.pluralSeparator)), g && w.push(P + E));
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
let D;
|
|
2062
|
-
for (; D = w.pop(); )
|
|
2063
|
-
this.isValidLookup(r) || (i = D, r = this.getResource(x, h, D, n));
|
|
2064
|
-
}));
|
|
2065
|
-
});
|
|
2066
|
-
}), {
|
|
2067
|
-
res: r,
|
|
2068
|
-
usedKey: s,
|
|
2069
|
-
exactUsedKey: i,
|
|
2070
|
-
usedLng: a,
|
|
2071
|
-
usedNS: o
|
|
2072
|
-
};
|
|
2073
|
-
}
|
|
2074
|
-
isValidLookup(t) {
|
|
2075
|
-
return t !== void 0 && !(!this.options.returnNull && t === null) && !(!this.options.returnEmptyString && t === "");
|
|
2076
|
-
}
|
|
2077
|
-
getResource(t, n, r) {
|
|
2078
|
-
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
2079
|
-
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(t, n, r, s) : this.resourceStore.getResource(t, n, r, s);
|
|
2080
|
-
}
|
|
2081
|
-
static hasDefaultValue(t) {
|
|
2082
|
-
const n = "defaultValue";
|
|
2083
|
-
for (const r in t)
|
|
2084
|
-
if (Object.prototype.hasOwnProperty.call(t, r) && n === r.substring(0, n.length) && t[r] !== void 0)
|
|
2085
|
-
return !0;
|
|
2086
|
-
return !1;
|
|
2087
|
-
}
|
|
2088
|
-
}
|
|
2089
|
-
function Me(e) {
|
|
2090
|
-
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2091
|
-
}
|
|
2092
|
-
class gt {
|
|
2093
|
-
constructor(t) {
|
|
2094
|
-
this.options = t, this.supportedLngs = this.options.supportedLngs || !1, this.logger = k.create("languageUtils");
|
|
2095
|
-
}
|
|
2096
|
-
getScriptPartFromCode(t) {
|
|
2097
|
-
if (t = Pe(t), !t || t.indexOf("-") < 0)
|
|
2098
|
-
return null;
|
|
2099
|
-
const n = t.split("-");
|
|
2100
|
-
return n.length === 2 || (n.pop(), n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-"));
|
|
2101
|
-
}
|
|
2102
|
-
getLanguagePartFromCode(t) {
|
|
2103
|
-
if (t = Pe(t), !t || t.indexOf("-") < 0)
|
|
2104
|
-
return t;
|
|
2105
|
-
const n = t.split("-");
|
|
2106
|
-
return this.formatLanguageCode(n[0]);
|
|
2107
|
-
}
|
|
2108
|
-
formatLanguageCode(t) {
|
|
2109
|
-
if (typeof t == "string" && t.indexOf("-") > -1) {
|
|
2110
|
-
const n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
|
|
2111
|
-
let r = t.split("-");
|
|
2112
|
-
return this.options.lowerCaseLng ? r = r.map((s) => s.toLowerCase()) : r.length === 2 ? (r[0] = r[0].toLowerCase(), r[1] = r[1].toUpperCase(), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = Me(r[1].toLowerCase()))) : r.length === 3 && (r[0] = r[0].toLowerCase(), r[1].length === 2 && (r[1] = r[1].toUpperCase()), r[0] !== "sgn" && r[2].length === 2 && (r[2] = r[2].toUpperCase()), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = Me(r[1].toLowerCase())), n.indexOf(r[2].toLowerCase()) > -1 && (r[2] = Me(r[2].toLowerCase()))), r.join("-");
|
|
2113
|
-
}
|
|
2114
|
-
return this.options.cleanCode || this.options.lowerCaseLng ? t.toLowerCase() : t;
|
|
2115
|
-
}
|
|
2116
|
-
isSupportedCode(t) {
|
|
2117
|
-
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (t = this.getLanguagePartFromCode(t)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(t) > -1;
|
|
2118
|
-
}
|
|
2119
|
-
getBestMatchFromCodes(t) {
|
|
2120
|
-
if (!t)
|
|
2121
|
-
return null;
|
|
2122
|
-
let n;
|
|
2123
|
-
return t.forEach((r) => {
|
|
2124
|
-
if (n)
|
|
2125
|
-
return;
|
|
2126
|
-
const s = this.formatLanguageCode(r);
|
|
2127
|
-
(!this.options.supportedLngs || this.isSupportedCode(s)) && (n = s);
|
|
2128
|
-
}), !n && this.options.supportedLngs && t.forEach((r) => {
|
|
2129
|
-
if (n)
|
|
2130
|
-
return;
|
|
2131
|
-
const s = this.getLanguagePartFromCode(r);
|
|
2132
|
-
if (this.isSupportedCode(s))
|
|
2133
|
-
return n = s;
|
|
2134
|
-
n = this.options.supportedLngs.find((i) => {
|
|
2135
|
-
if (i === s)
|
|
2136
|
-
return i;
|
|
2137
|
-
if (!(i.indexOf("-") < 0 && s.indexOf("-") < 0) && i.indexOf(s) === 0)
|
|
2138
|
-
return i;
|
|
2139
|
-
});
|
|
2140
|
-
}), n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]), n;
|
|
2141
|
-
}
|
|
2142
|
-
getFallbackCodes(t, n) {
|
|
2143
|
-
if (!t)
|
|
2144
|
-
return [];
|
|
2145
|
-
if (typeof t == "function" && (t = t(n)), typeof t == "string" && (t = [t]), Object.prototype.toString.apply(t) === "[object Array]")
|
|
2146
|
-
return t;
|
|
2147
|
-
if (!n)
|
|
2148
|
-
return t.default || [];
|
|
2149
|
-
let r = t[n];
|
|
2150
|
-
return r || (r = t[this.getScriptPartFromCode(n)]), r || (r = t[this.formatLanguageCode(n)]), r || (r = t[this.getLanguagePartFromCode(n)]), r || (r = t.default), r || [];
|
|
2151
|
-
}
|
|
2152
|
-
toResolveHierarchy(t, n) {
|
|
2153
|
-
const r = this.getFallbackCodes(n || this.options.fallbackLng || [], t), s = [], i = (a) => {
|
|
2154
|
-
a && (this.isSupportedCode(a) ? s.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
|
|
2155
|
-
};
|
|
2156
|
-
return typeof t == "string" && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(t))) : typeof t == "string" && i(this.formatLanguageCode(t)), r.forEach((a) => {
|
|
2157
|
-
s.indexOf(a) < 0 && i(this.formatLanguageCode(a));
|
|
2158
|
-
}), s;
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
let qr = [{
|
|
2162
|
-
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
|
|
2163
|
-
nr: [1, 2],
|
|
2164
|
-
fc: 1
|
|
2165
|
-
}, {
|
|
2166
|
-
lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"],
|
|
2167
|
-
nr: [1, 2],
|
|
2168
|
-
fc: 2
|
|
2169
|
-
}, {
|
|
2170
|
-
lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
|
|
2171
|
-
nr: [1],
|
|
2172
|
-
fc: 3
|
|
2173
|
-
}, {
|
|
2174
|
-
lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
|
|
2175
|
-
nr: [1, 2, 5],
|
|
2176
|
-
fc: 4
|
|
2177
|
-
}, {
|
|
2178
|
-
lngs: ["ar"],
|
|
2179
|
-
nr: [0, 1, 2, 3, 11, 100],
|
|
2180
|
-
fc: 5
|
|
2181
|
-
}, {
|
|
2182
|
-
lngs: ["cs", "sk"],
|
|
2183
|
-
nr: [1, 2, 5],
|
|
2184
|
-
fc: 6
|
|
2185
|
-
}, {
|
|
2186
|
-
lngs: ["csb", "pl"],
|
|
2187
|
-
nr: [1, 2, 5],
|
|
2188
|
-
fc: 7
|
|
2189
|
-
}, {
|
|
2190
|
-
lngs: ["cy"],
|
|
2191
|
-
nr: [1, 2, 3, 8],
|
|
2192
|
-
fc: 8
|
|
2193
|
-
}, {
|
|
2194
|
-
lngs: ["fr"],
|
|
2195
|
-
nr: [1, 2],
|
|
2196
|
-
fc: 9
|
|
2197
|
-
}, {
|
|
2198
|
-
lngs: ["ga"],
|
|
2199
|
-
nr: [1, 2, 3, 7, 11],
|
|
2200
|
-
fc: 10
|
|
2201
|
-
}, {
|
|
2202
|
-
lngs: ["gd"],
|
|
2203
|
-
nr: [1, 2, 3, 20],
|
|
2204
|
-
fc: 11
|
|
2205
|
-
}, {
|
|
2206
|
-
lngs: ["is"],
|
|
2207
|
-
nr: [1, 2],
|
|
2208
|
-
fc: 12
|
|
2209
|
-
}, {
|
|
2210
|
-
lngs: ["jv"],
|
|
2211
|
-
nr: [0, 1],
|
|
2212
|
-
fc: 13
|
|
2213
|
-
}, {
|
|
2214
|
-
lngs: ["kw"],
|
|
2215
|
-
nr: [1, 2, 3, 4],
|
|
2216
|
-
fc: 14
|
|
2217
|
-
}, {
|
|
2218
|
-
lngs: ["lt"],
|
|
2219
|
-
nr: [1, 2, 10],
|
|
2220
|
-
fc: 15
|
|
2221
|
-
}, {
|
|
2222
|
-
lngs: ["lv"],
|
|
2223
|
-
nr: [1, 2, 0],
|
|
2224
|
-
fc: 16
|
|
2225
|
-
}, {
|
|
2226
|
-
lngs: ["mk"],
|
|
2227
|
-
nr: [1, 2],
|
|
2228
|
-
fc: 17
|
|
2229
|
-
}, {
|
|
2230
|
-
lngs: ["mnk"],
|
|
2231
|
-
nr: [0, 1, 2],
|
|
2232
|
-
fc: 18
|
|
2233
|
-
}, {
|
|
2234
|
-
lngs: ["mt"],
|
|
2235
|
-
nr: [1, 2, 11, 20],
|
|
2236
|
-
fc: 19
|
|
2237
|
-
}, {
|
|
2238
|
-
lngs: ["or"],
|
|
2239
|
-
nr: [2, 1],
|
|
2240
|
-
fc: 2
|
|
2241
|
-
}, {
|
|
2242
|
-
lngs: ["ro"],
|
|
2243
|
-
nr: [1, 2, 20],
|
|
2244
|
-
fc: 20
|
|
2245
|
-
}, {
|
|
2246
|
-
lngs: ["sl"],
|
|
2247
|
-
nr: [5, 1, 2, 3],
|
|
2248
|
-
fc: 21
|
|
2249
|
-
}, {
|
|
2250
|
-
lngs: ["he", "iw"],
|
|
2251
|
-
nr: [1, 2, 20, 21],
|
|
2252
|
-
fc: 22
|
|
2253
|
-
}], Vr = {
|
|
2254
|
-
1: function(e) {
|
|
2255
|
-
return +(e > 1);
|
|
2256
|
-
},
|
|
2257
|
-
2: function(e) {
|
|
2258
|
-
return +(e != 1);
|
|
2259
|
-
},
|
|
2260
|
-
3: function(e) {
|
|
2261
|
-
return 0;
|
|
2262
|
-
},
|
|
2263
|
-
4: function(e) {
|
|
2264
|
-
return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
|
|
2265
|
-
},
|
|
2266
|
-
5: function(e) {
|
|
2267
|
-
return e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5;
|
|
2268
|
-
},
|
|
2269
|
-
6: function(e) {
|
|
2270
|
-
return e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2;
|
|
2271
|
-
},
|
|
2272
|
-
7: function(e) {
|
|
2273
|
-
return e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
|
|
2274
|
-
},
|
|
2275
|
-
8: function(e) {
|
|
2276
|
-
return e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3;
|
|
2277
|
-
},
|
|
2278
|
-
9: function(e) {
|
|
2279
|
-
return +(e >= 2);
|
|
2280
|
-
},
|
|
2281
|
-
10: function(e) {
|
|
2282
|
-
return e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4;
|
|
2283
|
-
},
|
|
2284
|
-
11: function(e) {
|
|
2285
|
-
return e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3;
|
|
2286
|
-
},
|
|
2287
|
-
12: function(e) {
|
|
2288
|
-
return +(e % 10 != 1 || e % 100 == 11);
|
|
2289
|
-
},
|
|
2290
|
-
13: function(e) {
|
|
2291
|
-
return +(e !== 0);
|
|
2292
|
-
},
|
|
2293
|
-
14: function(e) {
|
|
2294
|
-
return e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3;
|
|
2295
|
-
},
|
|
2296
|
-
15: function(e) {
|
|
2297
|
-
return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
|
|
2298
|
-
},
|
|
2299
|
-
16: function(e) {
|
|
2300
|
-
return e % 10 == 1 && e % 100 != 11 ? 0 : e !== 0 ? 1 : 2;
|
|
2301
|
-
},
|
|
2302
|
-
17: function(e) {
|
|
2303
|
-
return e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1;
|
|
2304
|
-
},
|
|
2305
|
-
18: function(e) {
|
|
2306
|
-
return e == 0 ? 0 : e == 1 ? 1 : 2;
|
|
2307
|
-
},
|
|
2308
|
-
19: function(e) {
|
|
2309
|
-
return e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3;
|
|
2310
|
-
},
|
|
2311
|
-
20: function(e) {
|
|
2312
|
-
return e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2;
|
|
2313
|
-
},
|
|
2314
|
-
21: function(e) {
|
|
2315
|
-
return e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0;
|
|
2316
|
-
},
|
|
2317
|
-
22: function(e) {
|
|
2318
|
-
return e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3;
|
|
2319
|
-
}
|
|
2320
|
-
};
|
|
2321
|
-
const Wr = ["v1", "v2", "v3"], Hr = ["v4"], ht = {
|
|
2322
|
-
zero: 0,
|
|
2323
|
-
one: 1,
|
|
2324
|
-
two: 2,
|
|
2325
|
-
few: 3,
|
|
2326
|
-
many: 4,
|
|
2327
|
-
other: 5
|
|
2328
|
-
};
|
|
2329
|
-
function Kr() {
|
|
2330
|
-
const e = {};
|
|
2331
|
-
return qr.forEach((t) => {
|
|
2332
|
-
t.lngs.forEach((n) => {
|
|
2333
|
-
e[n] = {
|
|
2334
|
-
numbers: t.nr,
|
|
2335
|
-
plurals: Vr[t.fc]
|
|
2336
|
-
};
|
|
2337
|
-
});
|
|
2338
|
-
}), e;
|
|
2339
|
-
}
|
|
2340
|
-
class Gr {
|
|
2341
|
-
constructor(t) {
|
|
2342
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2343
|
-
this.languageUtils = t, this.options = n, this.logger = k.create("pluralResolver"), (!this.options.compatibilityJSON || Hr.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = Kr();
|
|
2344
|
-
}
|
|
2345
|
-
addRule(t, n) {
|
|
2346
|
-
this.rules[t] = n;
|
|
2347
|
-
}
|
|
2348
|
-
getRule(t) {
|
|
2349
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2350
|
-
if (this.shouldUseIntlApi())
|
|
2351
|
-
try {
|
|
2352
|
-
return new Intl.PluralRules(Pe(t), {
|
|
2353
|
-
type: n.ordinal ? "ordinal" : "cardinal"
|
|
2354
|
-
});
|
|
2355
|
-
} catch {
|
|
2356
|
-
return;
|
|
2357
|
-
}
|
|
2358
|
-
return this.rules[t] || this.rules[this.languageUtils.getLanguagePartFromCode(t)];
|
|
2359
|
-
}
|
|
2360
|
-
needsPlural(t) {
|
|
2361
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2362
|
-
const r = this.getRule(t, n);
|
|
2363
|
-
return this.shouldUseIntlApi() ? r && r.resolvedOptions().pluralCategories.length > 1 : r && r.numbers.length > 1;
|
|
2364
|
-
}
|
|
2365
|
-
getPluralFormsOfKey(t, n) {
|
|
2366
|
-
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2367
|
-
return this.getSuffixes(t, r).map((s) => `${n}${s}`);
|
|
2368
|
-
}
|
|
2369
|
-
getSuffixes(t) {
|
|
2370
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2371
|
-
const r = this.getRule(t, n);
|
|
2372
|
-
return r ? this.shouldUseIntlApi() ? r.resolvedOptions().pluralCategories.sort((s, i) => ht[s] - ht[i]).map((s) => `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${s}`) : r.numbers.map((s) => this.getSuffix(t, s, n)) : [];
|
|
2373
|
-
}
|
|
2374
|
-
getSuffix(t, n) {
|
|
2375
|
-
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2376
|
-
const s = this.getRule(t, r);
|
|
2377
|
-
return s ? this.shouldUseIntlApi() ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${s.select(n)}` : this.getSuffixRetroCompatible(s, n) : (this.logger.warn(`no plural rule found for: ${t}`), "");
|
|
2378
|
-
}
|
|
2379
|
-
getSuffixRetroCompatible(t, n) {
|
|
2380
|
-
const r = t.noAbs ? t.plurals(n) : t.plurals(Math.abs(n));
|
|
2381
|
-
let s = t.numbers[r];
|
|
2382
|
-
this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (s === 2 ? s = "plural" : s === 1 && (s = ""));
|
|
2383
|
-
const i = () => this.options.prepend && s.toString() ? this.options.prepend + s.toString() : s.toString();
|
|
2384
|
-
return this.options.compatibilityJSON === "v1" ? s === 1 ? "" : typeof s == "number" ? `_plural_${s.toString()}` : i() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 ? i() : this.options.prepend && r.toString() ? this.options.prepend + r.toString() : r.toString();
|
|
2385
|
-
}
|
|
2386
|
-
shouldUseIntlApi() {
|
|
2387
|
-
return !Wr.includes(this.options.compatibilityJSON);
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
function mt(e, t, n) {
|
|
2391
|
-
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = Ir(e, t, n);
|
|
2392
|
-
return !i && s && typeof n == "string" && (i = je(e, n, r), i === void 0 && (i = je(t, n, r))), i;
|
|
2393
|
-
}
|
|
2394
|
-
class zr {
|
|
2395
|
-
constructor() {
|
|
2396
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2397
|
-
this.logger = k.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || ((n) => n), this.init(t);
|
|
2398
|
-
}
|
|
2399
|
-
init() {
|
|
2400
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2401
|
-
t.interpolation || (t.interpolation = {
|
|
2402
|
-
escapeValue: !0
|
|
2403
|
-
});
|
|
2404
|
-
const n = t.interpolation;
|
|
2405
|
-
this.escape = n.escape !== void 0 ? n.escape : kr, this.escapeValue = n.escapeValue !== void 0 ? n.escapeValue : !0, this.useRawValueToEscape = n.useRawValueToEscape !== void 0 ? n.useRawValueToEscape : !1, this.prefix = n.prefix ? Z(n.prefix) : n.prefixEscaped || "{{", this.suffix = n.suffix ? Z(n.suffix) : n.suffixEscaped || "}}", this.formatSeparator = n.formatSeparator ? n.formatSeparator : n.formatSeparator || ",", this.unescapePrefix = n.unescapeSuffix ? "" : n.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : n.unescapeSuffix || "", this.nestingPrefix = n.nestingPrefix ? Z(n.nestingPrefix) : n.nestingPrefixEscaped || Z("$t("), this.nestingSuffix = n.nestingSuffix ? Z(n.nestingSuffix) : n.nestingSuffixEscaped || Z(")"), this.nestingOptionsSeparator = n.nestingOptionsSeparator ? n.nestingOptionsSeparator : n.nestingOptionsSeparator || ",", this.maxReplaces = n.maxReplaces ? n.maxReplaces : 1e3, this.alwaysFormat = n.alwaysFormat !== void 0 ? n.alwaysFormat : !1, this.resetRegExp();
|
|
2406
|
-
}
|
|
2407
|
-
reset() {
|
|
2408
|
-
this.options && this.init(this.options);
|
|
2409
|
-
}
|
|
2410
|
-
resetRegExp() {
|
|
2411
|
-
const t = `${this.prefix}(.+?)${this.suffix}`;
|
|
2412
|
-
this.regexp = new RegExp(t, "g");
|
|
2413
|
-
const n = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
|
|
2414
|
-
this.regexpUnescape = new RegExp(n, "g");
|
|
2415
|
-
const r = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
|
|
2416
|
-
this.nestingRegexp = new RegExp(r, "g");
|
|
2417
|
-
}
|
|
2418
|
-
interpolate(t, n, r, s) {
|
|
2419
|
-
let i, a, o;
|
|
2420
|
-
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
2421
|
-
function c(p) {
|
|
2422
|
-
return p.replace(/\$/g, "$$$$");
|
|
2423
|
-
}
|
|
2424
|
-
const d = (p) => {
|
|
2425
|
-
if (p.indexOf(this.formatSeparator) < 0) {
|
|
2426
|
-
const w = mt(n, u, p, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
2427
|
-
return this.alwaysFormat ? this.format(w, void 0, r, {
|
|
2428
|
-
...s,
|
|
2429
|
-
...n,
|
|
2430
|
-
interpolationkey: p
|
|
2431
|
-
}) : w;
|
|
2432
|
-
}
|
|
2433
|
-
const y = p.split(this.formatSeparator), h = y.shift().trim(), x = y.join(this.formatSeparator).trim();
|
|
2434
|
-
return this.format(mt(n, u, h, this.options.keySeparator, this.options.ignoreJSONStructure), x, r, {
|
|
2435
|
-
...s,
|
|
2436
|
-
...n,
|
|
2437
|
-
interpolationkey: h
|
|
2438
|
-
});
|
|
2439
|
-
};
|
|
2440
|
-
this.resetRegExp();
|
|
2441
|
-
const f = s && s.missingInterpolationHandler || this.options.missingInterpolationHandler, l = s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
2442
|
-
return [{
|
|
2443
|
-
regex: this.regexpUnescape,
|
|
2444
|
-
safeValue: (p) => c(p)
|
|
2445
|
-
}, {
|
|
2446
|
-
regex: this.regexp,
|
|
2447
|
-
safeValue: (p) => this.escapeValue ? c(this.escape(p)) : c(p)
|
|
2448
|
-
}].forEach((p) => {
|
|
2449
|
-
for (o = 0; i = p.regex.exec(t); ) {
|
|
2450
|
-
const y = i[1].trim();
|
|
2451
|
-
if (a = d(y), a === void 0)
|
|
2452
|
-
if (typeof f == "function") {
|
|
2453
|
-
const x = f(t, i, s);
|
|
2454
|
-
a = typeof x == "string" ? x : "";
|
|
2455
|
-
} else if (s && Object.prototype.hasOwnProperty.call(s, y))
|
|
2456
|
-
a = "";
|
|
2457
|
-
else if (l) {
|
|
2458
|
-
a = i[0];
|
|
2459
|
-
continue;
|
|
2460
|
-
} else
|
|
2461
|
-
this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`), a = "";
|
|
2462
|
-
else
|
|
2463
|
-
typeof a != "string" && !this.useRawValueToEscape && (a = ct(a));
|
|
2464
|
-
const h = p.safeValue(a);
|
|
2465
|
-
if (t = t.replace(i[0], h), l ? (p.regex.lastIndex += a.length, p.regex.lastIndex -= i[0].length) : p.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
2466
|
-
break;
|
|
2467
|
-
}
|
|
2468
|
-
}), t;
|
|
2469
|
-
}
|
|
2470
|
-
nest(t, n) {
|
|
2471
|
-
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s, i, a;
|
|
2472
|
-
function o(u, c) {
|
|
2473
|
-
const d = this.nestingOptionsSeparator;
|
|
2474
|
-
if (u.indexOf(d) < 0)
|
|
2475
|
-
return u;
|
|
2476
|
-
const f = u.split(new RegExp(`${d}[ ]*{`));
|
|
2477
|
-
let l = `{${f[1]}`;
|
|
2478
|
-
u = f[0], l = this.interpolate(l, a);
|
|
2479
|
-
const g = l.match(/'/g), p = l.match(/"/g);
|
|
2480
|
-
(g && g.length % 2 === 0 && !p || p.length % 2 !== 0) && (l = l.replace(/'/g, '"'));
|
|
2481
|
-
try {
|
|
2482
|
-
a = JSON.parse(l), c && (a = {
|
|
2483
|
-
...c,
|
|
2484
|
-
...a
|
|
2485
|
-
});
|
|
2486
|
-
} catch (y) {
|
|
2487
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${u}`, y), `${u}${d}${l}`;
|
|
2488
|
-
}
|
|
2489
|
-
return delete a.defaultValue, u;
|
|
2490
|
-
}
|
|
2491
|
-
for (; s = this.nestingRegexp.exec(t); ) {
|
|
2492
|
-
let u = [];
|
|
2493
|
-
a = {
|
|
2494
|
-
...r
|
|
2495
|
-
}, a = a.replace && typeof a.replace != "string" ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
|
|
2496
|
-
let c = !1;
|
|
2497
|
-
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
2498
|
-
const d = s[1].split(this.formatSeparator).map((f) => f.trim());
|
|
2499
|
-
s[1] = d.shift(), u = d, c = !0;
|
|
2500
|
-
}
|
|
2501
|
-
if (i = n(o.call(this, s[1].trim(), a), a), i && s[0] === t && typeof i != "string")
|
|
2502
|
-
return i;
|
|
2503
|
-
typeof i != "string" && (i = ct(i)), i || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`), i = ""), c && (i = u.reduce((d, f) => this.format(d, f, r.lng, {
|
|
2504
|
-
...r,
|
|
2505
|
-
interpolationkey: s[1].trim()
|
|
2506
|
-
}), i.trim())), t = t.replace(s[0], i), this.regexp.lastIndex = 0;
|
|
2507
|
-
}
|
|
2508
|
-
return t;
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
function Jr(e) {
|
|
2512
|
-
let t = e.toLowerCase().trim();
|
|
2513
|
-
const n = {};
|
|
2514
|
-
if (e.indexOf("(") > -1) {
|
|
2515
|
-
const r = e.split("(");
|
|
2516
|
-
t = r[0].toLowerCase().trim();
|
|
2517
|
-
const s = r[1].substring(0, r[1].length - 1);
|
|
2518
|
-
t === "currency" && s.indexOf(":") < 0 ? n.currency || (n.currency = s.trim()) : t === "relativetime" && s.indexOf(":") < 0 ? n.range || (n.range = s.trim()) : s.split(";").forEach((a) => {
|
|
2519
|
-
if (!a)
|
|
2520
|
-
return;
|
|
2521
|
-
const [o, ...u] = a.split(":"), c = u.join(":").trim().replace(/^'+|'+$/g, "");
|
|
2522
|
-
n[o.trim()] || (n[o.trim()] = c), c === "false" && (n[o.trim()] = !1), c === "true" && (n[o.trim()] = !0), isNaN(c) || (n[o.trim()] = parseInt(c, 10));
|
|
2523
|
-
});
|
|
2524
|
-
}
|
|
2525
|
-
return {
|
|
2526
|
-
formatName: t,
|
|
2527
|
-
formatOptions: n
|
|
2528
|
-
};
|
|
2529
|
-
}
|
|
2530
|
-
function ee(e) {
|
|
2531
|
-
const t = {};
|
|
2532
|
-
return function(r, s, i) {
|
|
2533
|
-
const a = s + JSON.stringify(i);
|
|
2534
|
-
let o = t[a];
|
|
2535
|
-
return o || (o = e(Pe(s), i), t[a] = o), o(r);
|
|
2536
|
-
};
|
|
2537
|
-
}
|
|
2538
|
-
class Qr {
|
|
2539
|
-
constructor() {
|
|
2540
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2541
|
-
this.logger = k.create("formatter"), this.options = t, this.formats = {
|
|
2542
|
-
number: ee((n, r) => {
|
|
2543
|
-
const s = new Intl.NumberFormat(n, {
|
|
2544
|
-
...r
|
|
2545
|
-
});
|
|
2546
|
-
return (i) => s.format(i);
|
|
2547
|
-
}),
|
|
2548
|
-
currency: ee((n, r) => {
|
|
2549
|
-
const s = new Intl.NumberFormat(n, {
|
|
2550
|
-
...r,
|
|
2551
|
-
style: "currency"
|
|
2552
|
-
});
|
|
2553
|
-
return (i) => s.format(i);
|
|
2554
|
-
}),
|
|
2555
|
-
datetime: ee((n, r) => {
|
|
2556
|
-
const s = new Intl.DateTimeFormat(n, {
|
|
2557
|
-
...r
|
|
2558
|
-
});
|
|
2559
|
-
return (i) => s.format(i);
|
|
2560
|
-
}),
|
|
2561
|
-
relativetime: ee((n, r) => {
|
|
2562
|
-
const s = new Intl.RelativeTimeFormat(n, {
|
|
2563
|
-
...r
|
|
2564
|
-
});
|
|
2565
|
-
return (i) => s.format(i, r.range || "day");
|
|
2566
|
-
}),
|
|
2567
|
-
list: ee((n, r) => {
|
|
2568
|
-
const s = new Intl.ListFormat(n, {
|
|
2569
|
-
...r
|
|
2570
|
-
});
|
|
2571
|
-
return (i) => s.format(i);
|
|
2572
|
-
})
|
|
2573
|
-
}, this.init(t);
|
|
2574
|
-
}
|
|
2575
|
-
init(t) {
|
|
2576
|
-
const r = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
2577
|
-
interpolation: {}
|
|
2578
|
-
}).interpolation;
|
|
2579
|
-
this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ",";
|
|
2580
|
-
}
|
|
2581
|
-
add(t, n) {
|
|
2582
|
-
this.formats[t.toLowerCase().trim()] = n;
|
|
2583
|
-
}
|
|
2584
|
-
addCached(t, n) {
|
|
2585
|
-
this.formats[t.toLowerCase().trim()] = ee(n);
|
|
2586
|
-
}
|
|
2587
|
-
format(t, n, r) {
|
|
2588
|
-
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
2589
|
-
return n.split(this.formatSeparator).reduce((o, u) => {
|
|
2590
|
-
const {
|
|
2591
|
-
formatName: c,
|
|
2592
|
-
formatOptions: d
|
|
2593
|
-
} = Jr(u);
|
|
2594
|
-
if (this.formats[c]) {
|
|
2595
|
-
let f = o;
|
|
2596
|
-
try {
|
|
2597
|
-
const l = s && s.formatParams && s.formatParams[s.interpolationkey] || {}, g = l.locale || l.lng || s.locale || s.lng || r;
|
|
2598
|
-
f = this.formats[c](o, g, {
|
|
2599
|
-
...d,
|
|
2600
|
-
...s,
|
|
2601
|
-
...l
|
|
2602
|
-
});
|
|
2603
|
-
} catch (l) {
|
|
2604
|
-
this.logger.warn(l);
|
|
2605
|
-
}
|
|
2606
|
-
return f;
|
|
2607
|
-
} else
|
|
2608
|
-
this.logger.warn(`there was no format function for ${c}`);
|
|
2609
|
-
return o;
|
|
2610
|
-
}, t);
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
|
-
function Yr(e, t) {
|
|
2614
|
-
e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
|
|
2615
|
-
}
|
|
2616
|
-
class Xr extends Le {
|
|
2617
|
-
constructor(t, n, r) {
|
|
2618
|
-
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
2619
|
-
super(), this.backend = t, this.store = n, this.services = r, this.languageUtils = r.languageUtils, this.options = s, this.logger = k.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(r, s.backend, s);
|
|
2620
|
-
}
|
|
2621
|
-
queueLoad(t, n, r, s) {
|
|
2622
|
-
const i = {}, a = {}, o = {}, u = {};
|
|
2623
|
-
return t.forEach((c) => {
|
|
2624
|
-
let d = !0;
|
|
2625
|
-
n.forEach((f) => {
|
|
2626
|
-
const l = `${c}|${f}`;
|
|
2627
|
-
!r.reload && this.store.hasResourceBundle(c, f) ? this.state[l] = 2 : this.state[l] < 0 || (this.state[l] === 1 ? a[l] === void 0 && (a[l] = !0) : (this.state[l] = 1, d = !1, a[l] === void 0 && (a[l] = !0), i[l] === void 0 && (i[l] = !0), u[f] === void 0 && (u[f] = !0)));
|
|
2628
|
-
}), d || (o[c] = !0);
|
|
2629
|
-
}), (Object.keys(i).length || Object.keys(a).length) && this.queue.push({
|
|
2630
|
-
pending: a,
|
|
2631
|
-
pendingCount: Object.keys(a).length,
|
|
2632
|
-
loaded: {},
|
|
2633
|
-
errors: [],
|
|
2634
|
-
callback: s
|
|
2635
|
-
}), {
|
|
2636
|
-
toLoad: Object.keys(i),
|
|
2637
|
-
pending: Object.keys(a),
|
|
2638
|
-
toLoadLanguages: Object.keys(o),
|
|
2639
|
-
toLoadNamespaces: Object.keys(u)
|
|
2640
|
-
};
|
|
2641
|
-
}
|
|
2642
|
-
loaded(t, n, r) {
|
|
2643
|
-
const s = t.split("|"), i = s[0], a = s[1];
|
|
2644
|
-
n && this.emit("failedLoading", i, a, n), r && this.store.addResourceBundle(i, a, r), this.state[t] = n ? -1 : 2;
|
|
2645
|
-
const o = {};
|
|
2646
|
-
this.queue.forEach((u) => {
|
|
2647
|
-
$r(u.loaded, [i], a), Yr(u, t), n && u.errors.push(n), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
|
|
2648
|
-
o[c] || (o[c] = {});
|
|
2649
|
-
const d = u.loaded[c];
|
|
2650
|
-
d.length && d.forEach((f) => {
|
|
2651
|
-
o[c][f] === void 0 && (o[c][f] = !0);
|
|
2652
|
-
});
|
|
2653
|
-
}), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
|
|
2654
|
-
}), this.emit("loaded", o), this.queue = this.queue.filter((u) => !u.done);
|
|
2655
|
-
}
|
|
2656
|
-
read(t, n, r) {
|
|
2657
|
-
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, a = arguments.length > 5 ? arguments[5] : void 0;
|
|
2658
|
-
if (!t.length)
|
|
2659
|
-
return a(null, {});
|
|
2660
|
-
if (this.readingCalls >= this.maxParallelReads) {
|
|
2661
|
-
this.waitingReads.push({
|
|
2662
|
-
lng: t,
|
|
2663
|
-
ns: n,
|
|
2664
|
-
fcName: r,
|
|
2665
|
-
tried: s,
|
|
2666
|
-
wait: i,
|
|
2667
|
-
callback: a
|
|
2668
|
-
});
|
|
2669
|
-
return;
|
|
2670
|
-
}
|
|
2671
|
-
this.readingCalls++;
|
|
2672
|
-
const o = (c, d) => {
|
|
2673
|
-
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
2674
|
-
const f = this.waitingReads.shift();
|
|
2675
|
-
this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
|
|
2676
|
-
}
|
|
2677
|
-
if (c && d && s < this.maxRetries) {
|
|
2678
|
-
setTimeout(() => {
|
|
2679
|
-
this.read.call(this, t, n, r, s + 1, i * 2, a);
|
|
2680
|
-
}, i);
|
|
2681
|
-
return;
|
|
2682
|
-
}
|
|
2683
|
-
a(c, d);
|
|
2684
|
-
}, u = this.backend[r].bind(this.backend);
|
|
2685
|
-
if (u.length === 2) {
|
|
2686
|
-
try {
|
|
2687
|
-
const c = u(t, n);
|
|
2688
|
-
c && typeof c.then == "function" ? c.then((d) => o(null, d)).catch(o) : o(null, c);
|
|
2689
|
-
} catch (c) {
|
|
2690
|
-
o(c);
|
|
2691
|
-
}
|
|
2692
|
-
return;
|
|
2693
|
-
}
|
|
2694
|
-
return u(t, n, o);
|
|
2695
|
-
}
|
|
2696
|
-
prepareLoading(t, n) {
|
|
2697
|
-
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
|
|
2698
|
-
if (!this.backend)
|
|
2699
|
-
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
2700
|
-
typeof t == "string" && (t = this.languageUtils.toResolveHierarchy(t)), typeof n == "string" && (n = [n]);
|
|
2701
|
-
const i = this.queueLoad(t, n, r, s);
|
|
2702
|
-
if (!i.toLoad.length)
|
|
2703
|
-
return i.pending.length || s(), null;
|
|
2704
|
-
i.toLoad.forEach((a) => {
|
|
2705
|
-
this.loadOne(a);
|
|
2706
|
-
});
|
|
2707
|
-
}
|
|
2708
|
-
load(t, n, r) {
|
|
2709
|
-
this.prepareLoading(t, n, {}, r);
|
|
2710
|
-
}
|
|
2711
|
-
reload(t, n, r) {
|
|
2712
|
-
this.prepareLoading(t, n, {
|
|
2713
|
-
reload: !0
|
|
2714
|
-
}, r);
|
|
2715
|
-
}
|
|
2716
|
-
loadOne(t) {
|
|
2717
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
2718
|
-
const r = t.split("|"), s = r[0], i = r[1];
|
|
2719
|
-
this.read(s, i, "read", void 0, void 0, (a, o) => {
|
|
2720
|
-
a && this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`, a), !a && o && this.logger.log(`${n}loaded namespace ${i} for language ${s}`, o), this.loaded(t, a, o);
|
|
2721
|
-
});
|
|
2722
|
-
}
|
|
2723
|
-
saveMissing(t, n, r, s, i) {
|
|
2724
|
-
let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
|
|
2725
|
-
};
|
|
2726
|
-
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(n)) {
|
|
2727
|
-
this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
2728
|
-
return;
|
|
2729
|
-
}
|
|
2730
|
-
if (!(r == null || r === "")) {
|
|
2731
|
-
if (this.backend && this.backend.create) {
|
|
2732
|
-
const u = {
|
|
2733
|
-
...a,
|
|
2734
|
-
isUpdate: i
|
|
2735
|
-
}, c = this.backend.create.bind(this.backend);
|
|
2736
|
-
if (c.length < 6)
|
|
2737
|
-
try {
|
|
2738
|
-
let d;
|
|
2739
|
-
c.length === 5 ? d = c(t, n, r, s, u) : d = c(t, n, r, s), d && typeof d.then == "function" ? d.then((f) => o(null, f)).catch(o) : o(null, d);
|
|
2740
|
-
} catch (d) {
|
|
2741
|
-
o(d);
|
|
2742
|
-
}
|
|
2743
|
-
else
|
|
2744
|
-
c(t, n, r, s, o, u);
|
|
2745
|
-
}
|
|
2746
|
-
!t || !t[0] || this.store.addResource(t[0], n, r, s);
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
}
|
|
2750
|
-
function yt() {
|
|
2751
|
-
return {
|
|
2752
|
-
debug: !1,
|
|
2753
|
-
initImmediate: !0,
|
|
2754
|
-
ns: ["translation"],
|
|
2755
|
-
defaultNS: ["translation"],
|
|
2756
|
-
fallbackLng: ["dev"],
|
|
2757
|
-
fallbackNS: !1,
|
|
2758
|
-
supportedLngs: !1,
|
|
2759
|
-
nonExplicitSupportedLngs: !1,
|
|
2760
|
-
load: "all",
|
|
2761
|
-
preload: !1,
|
|
2762
|
-
simplifyPluralSuffix: !0,
|
|
2763
|
-
keySeparator: ".",
|
|
2764
|
-
nsSeparator: ":",
|
|
2765
|
-
pluralSeparator: "_",
|
|
2766
|
-
contextSeparator: "_",
|
|
2767
|
-
partialBundledLanguages: !1,
|
|
2768
|
-
saveMissing: !1,
|
|
2769
|
-
updateMissing: !1,
|
|
2770
|
-
saveMissingTo: "fallback",
|
|
2771
|
-
saveMissingPlurals: !0,
|
|
2772
|
-
missingKeyHandler: !1,
|
|
2773
|
-
missingInterpolationHandler: !1,
|
|
2774
|
-
postProcess: !1,
|
|
2775
|
-
postProcessPassResolved: !1,
|
|
2776
|
-
returnNull: !1,
|
|
2777
|
-
returnEmptyString: !0,
|
|
2778
|
-
returnObjects: !1,
|
|
2779
|
-
joinArrays: !1,
|
|
2780
|
-
returnedObjectHandler: !1,
|
|
2781
|
-
parseMissingKeyHandler: !1,
|
|
2782
|
-
appendNamespaceToMissingKey: !1,
|
|
2783
|
-
appendNamespaceToCIMode: !1,
|
|
2784
|
-
overloadTranslationOptionHandler: function(t) {
|
|
2785
|
-
let n = {};
|
|
2786
|
-
if (typeof t[1] == "object" && (n = t[1]), typeof t[1] == "string" && (n.defaultValue = t[1]), typeof t[2] == "string" && (n.tDescription = t[2]), typeof t[2] == "object" || typeof t[3] == "object") {
|
|
2787
|
-
const r = t[3] || t[2];
|
|
2788
|
-
Object.keys(r).forEach((s) => {
|
|
2789
|
-
n[s] = r[s];
|
|
2790
|
-
});
|
|
2791
|
-
}
|
|
2792
|
-
return n;
|
|
2793
|
-
},
|
|
2794
|
-
interpolation: {
|
|
2795
|
-
escapeValue: !0,
|
|
2796
|
-
format: (e, t, n, r) => e,
|
|
2797
|
-
prefix: "{{",
|
|
2798
|
-
suffix: "}}",
|
|
2799
|
-
formatSeparator: ",",
|
|
2800
|
-
unescapePrefix: "-",
|
|
2801
|
-
nestingPrefix: "$t(",
|
|
2802
|
-
nestingSuffix: ")",
|
|
2803
|
-
nestingOptionsSeparator: ",",
|
|
2804
|
-
maxReplaces: 1e3,
|
|
2805
|
-
skipOnVariables: !0
|
|
2806
|
-
}
|
|
2807
|
-
};
|
|
2808
|
-
}
|
|
2809
|
-
function bt(e) {
|
|
2810
|
-
return typeof e.ns == "string" && (e.ns = [e.ns]), typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]), typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e;
|
|
2811
|
-
}
|
|
2812
|
-
function me() {
|
|
2813
|
-
}
|
|
2814
|
-
function Zr(e) {
|
|
2815
|
-
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((n) => {
|
|
2816
|
-
typeof e[n] == "function" && (e[n] = e[n].bind(e));
|
|
2817
|
-
});
|
|
2818
|
-
}
|
|
2819
|
-
class ce extends Le {
|
|
2820
|
-
constructor() {
|
|
2821
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
|
2822
|
-
if (super(), this.options = bt(t), this.services = {}, this.logger = k, this.modules = {
|
|
2823
|
-
external: []
|
|
2824
|
-
}, Zr(this), n && !this.isInitialized && !t.isClone) {
|
|
2825
|
-
if (!this.options.initImmediate)
|
|
2826
|
-
return this.init(t, n), this;
|
|
2827
|
-
setTimeout(() => {
|
|
2828
|
-
this.init(t, n);
|
|
2829
|
-
}, 0);
|
|
2830
|
-
}
|
|
2831
|
-
}
|
|
2832
|
-
init() {
|
|
2833
|
-
var t = this;
|
|
2834
|
-
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
|
|
2835
|
-
typeof n == "function" && (r = n, n = {}), !n.defaultNS && n.defaultNS !== !1 && n.ns && (typeof n.ns == "string" ? n.defaultNS = n.ns : n.ns.indexOf("translation") < 0 && (n.defaultNS = n.ns[0]));
|
|
2836
|
-
const s = yt();
|
|
2837
|
-
this.options = {
|
|
2838
|
-
...s,
|
|
2839
|
-
...this.options,
|
|
2840
|
-
...bt(n)
|
|
2841
|
-
}, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
|
|
2842
|
-
...s.interpolation,
|
|
2843
|
-
...this.options.interpolation
|
|
2844
|
-
}), n.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = n.keySeparator), n.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = n.nsSeparator);
|
|
2845
|
-
function i(d) {
|
|
2846
|
-
return d ? typeof d == "function" ? new d() : d : null;
|
|
2847
|
-
}
|
|
2848
|
-
if (!this.options.isClone) {
|
|
2849
|
-
this.modules.logger ? k.init(i(this.modules.logger), this.options) : k.init(null, this.options);
|
|
2850
|
-
let d;
|
|
2851
|
-
this.modules.formatter ? d = this.modules.formatter : typeof Intl < "u" && (d = Qr);
|
|
2852
|
-
const f = new gt(this.options);
|
|
2853
|
-
this.store = new ft(this.options.resources, this.options);
|
|
2854
|
-
const l = this.services;
|
|
2855
|
-
l.logger = k, l.resourceStore = this.store, l.languageUtils = f, l.pluralResolver = new Gr(f, {
|
|
2856
|
-
prepend: this.options.pluralSeparator,
|
|
2857
|
-
compatibilityJSON: this.options.compatibilityJSON,
|
|
2858
|
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
2859
|
-
}), d && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (l.formatter = i(d), l.formatter.init(l, this.options), this.options.interpolation.format = l.formatter.format.bind(l.formatter)), l.interpolator = new zr(this.options), l.utils = {
|
|
2860
|
-
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
2861
|
-
}, l.backendConnector = new Xr(i(this.modules.backend), l.resourceStore, l, this.options), l.backendConnector.on("*", function(g) {
|
|
2862
|
-
for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), h = 1; h < p; h++)
|
|
2863
|
-
y[h - 1] = arguments[h];
|
|
2864
|
-
t.emit(g, ...y);
|
|
2865
|
-
}), this.modules.languageDetector && (l.languageDetector = i(this.modules.languageDetector), l.languageDetector.init && l.languageDetector.init(l, this.options.detection, this.options)), this.modules.i18nFormat && (l.i18nFormat = i(this.modules.i18nFormat), l.i18nFormat.init && l.i18nFormat.init(this)), this.translator = new Fe(this.services, this.options), this.translator.on("*", function(g) {
|
|
2866
|
-
for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), h = 1; h < p; h++)
|
|
2867
|
-
y[h - 1] = arguments[h];
|
|
2868
|
-
t.emit(g, ...y);
|
|
2869
|
-
}), this.modules.external.forEach((g) => {
|
|
2870
|
-
g.init && g.init(this);
|
|
2871
|
-
});
|
|
2872
|
-
}
|
|
2873
|
-
if (this.format = this.options.interpolation.format, r || (r = me), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2874
|
-
const d = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2875
|
-
d.length > 0 && d[0] !== "dev" && (this.options.lng = d[0]);
|
|
2876
|
-
}
|
|
2877
|
-
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((d) => {
|
|
2878
|
-
this[d] = function() {
|
|
2879
|
-
return t.store[d](...arguments);
|
|
2880
|
-
};
|
|
2881
|
-
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((d) => {
|
|
2882
|
-
this[d] = function() {
|
|
2883
|
-
return t.store[d](...arguments), t;
|
|
2884
|
-
};
|
|
2885
|
-
});
|
|
2886
|
-
const u = le(), c = () => {
|
|
2887
|
-
const d = (f, l) => {
|
|
2888
|
-
this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), u.resolve(l), r(f, l);
|
|
2889
|
-
};
|
|
2890
|
-
if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized)
|
|
2891
|
-
return d(null, this.t.bind(this));
|
|
2892
|
-
this.changeLanguage(this.options.lng, d);
|
|
2893
|
-
};
|
|
2894
|
-
return this.options.resources || !this.options.initImmediate ? c() : setTimeout(c, 0), u;
|
|
2895
|
-
}
|
|
2896
|
-
loadResources(t) {
|
|
2897
|
-
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : me;
|
|
2898
|
-
const s = typeof t == "string" ? t : this.language;
|
|
2899
|
-
if (typeof t == "function" && (r = t), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2900
|
-
if (s && s.toLowerCase() === "cimode")
|
|
2901
|
-
return r();
|
|
2902
|
-
const i = [], a = (o) => {
|
|
2903
|
-
if (!o)
|
|
2904
|
-
return;
|
|
2905
|
-
this.services.languageUtils.toResolveHierarchy(o).forEach((c) => {
|
|
2906
|
-
i.indexOf(c) < 0 && i.push(c);
|
|
2907
|
-
});
|
|
2908
|
-
};
|
|
2909
|
-
s ? a(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((u) => a(u)), this.options.preload && this.options.preload.forEach((o) => a(o)), this.services.backendConnector.load(i, this.options.ns, (o) => {
|
|
2910
|
-
!o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(o);
|
|
2911
|
-
});
|
|
2912
|
-
} else
|
|
2913
|
-
r(null);
|
|
2914
|
-
}
|
|
2915
|
-
reloadResources(t, n, r) {
|
|
2916
|
-
const s = le();
|
|
2917
|
-
return t || (t = this.languages), n || (n = this.options.ns), r || (r = me), this.services.backendConnector.reload(t, n, (i) => {
|
|
2918
|
-
s.resolve(), r(i);
|
|
2919
|
-
}), s;
|
|
2920
|
-
}
|
|
2921
|
-
use(t) {
|
|
2922
|
-
if (!t)
|
|
2923
|
-
throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
2924
|
-
if (!t.type)
|
|
2925
|
-
throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
2926
|
-
return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" && Kt.addPostProcessor(t), t.type === "formatter" && (this.modules.formatter = t), t.type === "3rdParty" && this.modules.external.push(t), this;
|
|
2927
|
-
}
|
|
2928
|
-
setResolvedLanguage(t) {
|
|
2929
|
-
if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1))
|
|
2930
|
-
for (let n = 0; n < this.languages.length; n++) {
|
|
2931
|
-
const r = this.languages[n];
|
|
2932
|
-
if (!(["cimode", "dev"].indexOf(r) > -1) && this.store.hasLanguageSomeTranslations(r)) {
|
|
2933
|
-
this.resolvedLanguage = r;
|
|
2934
|
-
break;
|
|
2935
|
-
}
|
|
2936
|
-
}
|
|
2937
|
-
}
|
|
2938
|
-
changeLanguage(t, n) {
|
|
2939
|
-
var r = this;
|
|
2940
|
-
this.isLanguageChangingTo = t;
|
|
2941
|
-
const s = le();
|
|
2942
|
-
this.emit("languageChanging", t);
|
|
2943
|
-
const i = (u) => {
|
|
2944
|
-
this.language = u, this.languages = this.services.languageUtils.toResolveHierarchy(u), this.resolvedLanguage = void 0, this.setResolvedLanguage(u);
|
|
2945
|
-
}, a = (u, c) => {
|
|
2946
|
-
c ? (i(c), this.translator.changeLanguage(c), this.isLanguageChangingTo = void 0, this.emit("languageChanged", c), this.logger.log("languageChanged", c)) : this.isLanguageChangingTo = void 0, s.resolve(function() {
|
|
2947
|
-
return r.t(...arguments);
|
|
2948
|
-
}), n && n(u, function() {
|
|
2949
|
-
return r.t(...arguments);
|
|
2950
|
-
});
|
|
2951
|
-
}, o = (u) => {
|
|
2952
|
-
!t && !u && this.services.languageDetector && (u = []);
|
|
2953
|
-
const c = typeof u == "string" ? u : this.services.languageUtils.getBestMatchFromCodes(u);
|
|
2954
|
-
c && (this.language || i(c), this.translator.language || this.translator.changeLanguage(c), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(c)), this.loadResources(c, (d) => {
|
|
2955
|
-
a(d, c);
|
|
2956
|
-
});
|
|
2957
|
-
};
|
|
2958
|
-
return !t && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !t && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(t), s;
|
|
2959
|
-
}
|
|
2960
|
-
getFixedT(t, n, r) {
|
|
2961
|
-
var s = this;
|
|
2962
|
-
const i = function(a, o) {
|
|
2963
|
-
let u;
|
|
2964
|
-
if (typeof o != "object") {
|
|
2965
|
-
for (var c = arguments.length, d = new Array(c > 2 ? c - 2 : 0), f = 2; f < c; f++)
|
|
2966
|
-
d[f - 2] = arguments[f];
|
|
2967
|
-
u = s.options.overloadTranslationOptionHandler([a, o].concat(d));
|
|
2968
|
-
} else
|
|
2969
|
-
u = {
|
|
2970
|
-
...o
|
|
2971
|
-
};
|
|
2972
|
-
u.lng = u.lng || i.lng, u.lngs = u.lngs || i.lngs, u.ns = u.ns || i.ns, u.keyPrefix = u.keyPrefix || r || i.keyPrefix;
|
|
2973
|
-
const l = s.options.keySeparator || ".";
|
|
2974
|
-
let g;
|
|
2975
|
-
return u.keyPrefix && Array.isArray(a) ? g = a.map((p) => `${u.keyPrefix}${l}${p}`) : g = u.keyPrefix ? `${u.keyPrefix}${l}${a}` : a, s.t(g, u);
|
|
2976
|
-
};
|
|
2977
|
-
return typeof t == "string" ? i.lng = t : i.lngs = t, i.ns = n, i.keyPrefix = r, i;
|
|
2978
|
-
}
|
|
2979
|
-
t() {
|
|
2980
|
-
return this.translator && this.translator.translate(...arguments);
|
|
2981
|
-
}
|
|
2982
|
-
exists() {
|
|
2983
|
-
return this.translator && this.translator.exists(...arguments);
|
|
2984
|
-
}
|
|
2985
|
-
setDefaultNamespace(t) {
|
|
2986
|
-
this.options.defaultNS = t;
|
|
2987
|
-
}
|
|
2988
|
-
hasLoadedNamespace(t) {
|
|
2989
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2990
|
-
if (!this.isInitialized)
|
|
2991
|
-
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
2992
|
-
if (!this.languages || !this.languages.length)
|
|
2993
|
-
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
2994
|
-
const r = n.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1];
|
|
2995
|
-
if (r.toLowerCase() === "cimode")
|
|
2996
|
-
return !0;
|
|
2997
|
-
const a = (o, u) => {
|
|
2998
|
-
const c = this.services.backendConnector.state[`${o}|${u}`];
|
|
2999
|
-
return c === -1 || c === 2;
|
|
3000
|
-
};
|
|
3001
|
-
if (n.precheck) {
|
|
3002
|
-
const o = n.precheck(this, a);
|
|
3003
|
-
if (o !== void 0)
|
|
3004
|
-
return o;
|
|
3005
|
-
}
|
|
3006
|
-
return !!(this.hasResourceBundle(r, t) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(r, t) && (!s || a(i, t)));
|
|
3007
|
-
}
|
|
3008
|
-
loadNamespaces(t, n) {
|
|
3009
|
-
const r = le();
|
|
3010
|
-
return this.options.ns ? (typeof t == "string" && (t = [t]), t.forEach((s) => {
|
|
3011
|
-
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
3012
|
-
}), this.loadResources((s) => {
|
|
3013
|
-
r.resolve(), n && n(s);
|
|
3014
|
-
}), r) : (n && n(), Promise.resolve());
|
|
3015
|
-
}
|
|
3016
|
-
loadLanguages(t, n) {
|
|
3017
|
-
const r = le();
|
|
3018
|
-
typeof t == "string" && (t = [t]);
|
|
3019
|
-
const s = this.options.preload || [], i = t.filter((a) => s.indexOf(a) < 0);
|
|
3020
|
-
return i.length ? (this.options.preload = s.concat(i), this.loadResources((a) => {
|
|
3021
|
-
r.resolve(), n && n(a);
|
|
3022
|
-
}), r) : (n && n(), Promise.resolve());
|
|
3023
|
-
}
|
|
3024
|
-
dir(t) {
|
|
3025
|
-
if (t || (t = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !t)
|
|
3026
|
-
return "rtl";
|
|
3027
|
-
const n = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = this.services && this.services.languageUtils || new gt(yt());
|
|
3028
|
-
return n.indexOf(r.getLanguagePartFromCode(t)) > -1 || t.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
3029
|
-
}
|
|
3030
|
-
static createInstance() {
|
|
3031
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
|
3032
|
-
return new ce(t, n);
|
|
3033
|
-
}
|
|
3034
|
-
cloneInstance() {
|
|
3035
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : me;
|
|
3036
|
-
const r = t.forkResourceStore;
|
|
3037
|
-
r && delete t.forkResourceStore;
|
|
3038
|
-
const s = {
|
|
3039
|
-
...this.options,
|
|
3040
|
-
...t,
|
|
3041
|
-
isClone: !0
|
|
3042
|
-
}, i = new ce(s);
|
|
3043
|
-
return (t.debug !== void 0 || t.prefix !== void 0) && (i.logger = i.logger.clone(t)), ["store", "services", "language"].forEach((o) => {
|
|
3044
|
-
i[o] = this[o];
|
|
3045
|
-
}), i.services = {
|
|
3046
|
-
...this.services
|
|
3047
|
-
}, i.services.utils = {
|
|
3048
|
-
hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
|
|
3049
|
-
}, r && (i.store = new ft(this.store.data, s), i.services.resourceStore = i.store), i.translator = new Fe(i.services, s), i.translator.on("*", function(o) {
|
|
3050
|
-
for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), d = 1; d < u; d++)
|
|
3051
|
-
c[d - 1] = arguments[d];
|
|
3052
|
-
i.emit(o, ...c);
|
|
3053
|
-
}), i.init(s, n), i.translator.options = s, i.translator.backendConnector.services.utils = {
|
|
3054
|
-
hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
|
|
3055
|
-
}, i;
|
|
3056
|
-
}
|
|
3057
|
-
toJSON() {
|
|
3058
|
-
return {
|
|
3059
|
-
options: this.options,
|
|
3060
|
-
store: this.store,
|
|
3061
|
-
language: this.language,
|
|
3062
|
-
languages: this.languages,
|
|
3063
|
-
resolvedLanguage: this.resolvedLanguage
|
|
3064
|
-
};
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
|
-
const j = ce.createInstance();
|
|
3068
|
-
j.createInstance = ce.createInstance;
|
|
3069
|
-
j.createInstance;
|
|
3070
|
-
j.dir;
|
|
3071
|
-
j.init;
|
|
3072
|
-
j.loadResources;
|
|
3073
|
-
j.reloadResources;
|
|
3074
|
-
j.use;
|
|
3075
|
-
j.changeLanguage;
|
|
3076
|
-
j.getFixedT;
|
|
3077
|
-
j.t;
|
|
3078
|
-
j.exists;
|
|
3079
|
-
j.setDefaultNamespace;
|
|
3080
|
-
j.hasLoadedNamespace;
|
|
3081
|
-
j.loadNamespaces;
|
|
3082
|
-
j.loadLanguages;
|
|
3083
|
-
const es = {
|
|
3084
|
-
error: "Error"
|
|
3085
|
-
}, ts = {
|
|
3086
|
-
error: "Помилка"
|
|
3087
|
-
}, St = "common", ns = {
|
|
3088
|
-
en: es,
|
|
3089
|
-
uk: ts
|
|
3090
|
-
}, I = j.createInstance({
|
|
3091
|
-
defaultNS: St,
|
|
3092
|
-
resources: ss(ns, St),
|
|
3093
|
-
lng: "en",
|
|
3094
|
-
fallbackLng: "en"
|
|
3095
|
-
}), Gt = {
|
|
3096
|
-
i18nextInstance: I,
|
|
3097
|
-
initPromise: I.init().then(() => I)
|
|
3098
|
-
}, ye = /* @__PURE__ */ new Map();
|
|
3099
|
-
ye.set("common", Gt);
|
|
3100
|
-
const rs = (e) => {
|
|
3101
|
-
if (ye.has(e.namespace))
|
|
3102
|
-
return ye.get(e.namespace);
|
|
3103
|
-
if (e.plugins)
|
|
3104
|
-
for (const i of e.plugins)
|
|
3105
|
-
I.use(i);
|
|
3106
|
-
Object.keys(e.resource).forEach((i) => {
|
|
3107
|
-
I.addResourceBundle(i, e.namespace, e.resource[i]);
|
|
3108
|
-
});
|
|
3109
|
-
const t = I.cloneInstance({
|
|
3110
|
-
defaultNS: e.namespace
|
|
3111
|
-
});
|
|
3112
|
-
let n = Gt.initPromise.then(() => t);
|
|
3113
|
-
t.on("languageChanged", (i) => {
|
|
3114
|
-
I.language !== i && I.changeLanguage(i);
|
|
3115
|
-
}), I.on("languageChanged", (i) => {
|
|
3116
|
-
t.language !== i && t.changeLanguage(i);
|
|
3117
|
-
});
|
|
3118
|
-
const r = e.language || "en";
|
|
3119
|
-
I.language !== r && (n = n.then(() => t.changeLanguage(r)).then(() => t));
|
|
3120
|
-
const s = { initPromise: n, i18nextInstance: t };
|
|
3121
|
-
return ye.set(e.namespace, s), s;
|
|
3122
|
-
};
|
|
3123
|
-
function ss(e, t) {
|
|
3124
|
-
return Object.keys(e).reduce((n, r) => (n[r] = {
|
|
3125
|
-
[t]: e[r]
|
|
3126
|
-
}, n), {});
|
|
3127
|
-
}
|
|
3128
|
-
function is(e) {
|
|
3129
|
-
return e && e.replace(new RegExp("(?<!\\\\)'", "g"), "\\'");
|
|
3130
|
-
}
|
|
3131
|
-
const as = {
|
|
3132
|
-
errors: {
|
|
3133
|
-
measure: {
|
|
3134
|
-
unsupportedType: "Unsupported measure type for measure: {{measureName}}",
|
|
3135
|
-
dimensionalCalculatedMeasure: {
|
|
3136
|
-
noContext: "DimensionalCalculatedMeasure {{measureName}} must have 'context' property"
|
|
3137
|
-
},
|
|
3138
|
-
dimensionalBaseMeasure: {
|
|
3139
|
-
noAttributeDimExpression: "DimensionalBaseMeasure {{measureName}} must have 'attribute'/'dim'/'expression' property",
|
|
3140
|
-
noAggAggregation: "DimensionalBaseMeasure {{measureName}} must have 'agg' or 'aggregation' property"
|
|
3141
|
-
}
|
|
3142
|
-
},
|
|
3143
|
-
dataModel: {
|
|
3144
|
-
noName: "'name' must be specified in config for DataModel",
|
|
3145
|
-
noMetadata: "'metadata' must be specified in config for DataModel"
|
|
3146
|
-
},
|
|
3147
|
-
filter: {
|
|
3148
|
-
unsupportedType: "Unsupported filter type: {{filterType}}",
|
|
3149
|
-
unsupportedDatetimeLevel: 'Filters do not support the following "datetime" levels: Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',
|
|
3150
|
-
membersFilterNullMember: "MembersFilter of {{attributeId}} - member cannot be null",
|
|
3151
|
-
unsupportedConditionFilter: "Jaql for {{attributeName}} contains unsupported condition filter: {{filter}}",
|
|
3152
|
-
formulaFiltersNotSupported: "Formula-based filter for {{attributeName}} not supported yet: {{filter}}"
|
|
3153
|
-
},
|
|
3154
|
-
unsupportedDimensionalElement: "Unsupported dimensional element type"
|
|
3155
|
-
}
|
|
3156
|
-
}, os = {
|
|
3157
|
-
errors: {
|
|
3158
|
-
measure: {
|
|
3159
|
-
unsupportedType: "Непідтримуваний тип measure: {{measureName}}",
|
|
3160
|
-
dimensionalCalculatedMeasure: {
|
|
3161
|
-
noContext: "DimensionalCalculatedMeasure {{measureName}} має мати властивість 'context'"
|
|
3162
|
-
},
|
|
3163
|
-
dimensionalBaseMeasure: {
|
|
3164
|
-
noAttributeDimExpression: "DimensionalBaseMeasure {{measureName}} має мати властивість 'attribute'/'dim'/'expression'",
|
|
3165
|
-
noAggAggregation: "DimensionalBaseMeasure {{measureName}} має мати властивість 'agg' або 'aggregation'"
|
|
3166
|
-
}
|
|
3167
|
-
},
|
|
3168
|
-
dataModel: {
|
|
3169
|
-
noName: "'name' має бути вказано в конфігурації для DataModel",
|
|
3170
|
-
noMetadata: "'metadata' має бути вказано в конфігурації для DataModel"
|
|
3171
|
-
},
|
|
3172
|
-
filter: {
|
|
3173
|
-
unsupportedType: "Непідтримуваний тип фільтра: {{filterType}}",
|
|
3174
|
-
unsupportedDatetimeLevel: 'Фільтри не підтримують наступні рівні "datetime": Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',
|
|
3175
|
-
membersFilterNullMember: "MembersFilter у {{attributeId}} - member не може бути нульовим",
|
|
3176
|
-
unsupportedConditionFilter: "Jaql для {{attributeName}} містить непідтримуваний condition фільтр: {{filter}}",
|
|
3177
|
-
formulaFiltersNotSupported: "Фільтри, що містять формули для {{attributeName}} наразі не підтримуються: {{filter}}"
|
|
3178
|
-
},
|
|
3179
|
-
unsupportedDimensionalElement: "Непідтримуваний тип елемента"
|
|
3180
|
-
}
|
|
3181
|
-
}, us = "sdkData", ls = {
|
|
3182
|
-
en: as,
|
|
3183
|
-
uk: os
|
|
3184
|
-
};
|
|
3185
|
-
function cs() {
|
|
3186
|
-
return rs({
|
|
3187
|
-
resource: ls,
|
|
3188
|
-
language: "en",
|
|
3189
|
-
namespace: us
|
|
3190
|
-
});
|
|
3191
|
-
}
|
|
3192
|
-
cs();
|
|
3193
|
-
function ds() {
|
|
3194
|
-
this.__data__ = [], this.size = 0;
|
|
3195
|
-
}
|
|
3196
|
-
function zt(e, t) {
|
|
3197
|
-
return e === t || e !== e && t !== t;
|
|
3198
|
-
}
|
|
3199
|
-
function Ee(e, t) {
|
|
3200
|
-
for (var n = e.length; n--; )
|
|
3201
|
-
if (zt(e[n][0], t))
|
|
3202
|
-
return n;
|
|
3203
|
-
return -1;
|
|
3204
|
-
}
|
|
3205
|
-
var fs = Array.prototype, ps = fs.splice;
|
|
3206
|
-
function gs(e) {
|
|
3207
|
-
var t = this.__data__, n = Ee(t, e);
|
|
3208
|
-
if (n < 0)
|
|
3209
|
-
return !1;
|
|
3210
|
-
var r = t.length - 1;
|
|
3211
|
-
return n == r ? t.pop() : ps.call(t, n, 1), --this.size, !0;
|
|
3212
|
-
}
|
|
3213
|
-
function hs(e) {
|
|
3214
|
-
var t = this.__data__, n = Ee(t, e);
|
|
3215
|
-
return n < 0 ? void 0 : t[n][1];
|
|
3216
|
-
}
|
|
3217
|
-
function ms(e) {
|
|
3218
|
-
return Ee(this.__data__, e) > -1;
|
|
3219
|
-
}
|
|
3220
|
-
function ys(e, t) {
|
|
3221
|
-
var n = this.__data__, r = Ee(n, e);
|
|
3222
|
-
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
|
|
3223
|
-
}
|
|
3224
|
-
function U(e) {
|
|
3225
|
-
var t = -1, n = e == null ? 0 : e.length;
|
|
3226
|
-
for (this.clear(); ++t < n; ) {
|
|
3227
|
-
var r = e[t];
|
|
3228
|
-
this.set(r[0], r[1]);
|
|
3229
|
-
}
|
|
3230
|
-
}
|
|
3231
|
-
U.prototype.clear = ds;
|
|
3232
|
-
U.prototype.delete = gs;
|
|
3233
|
-
U.prototype.get = hs;
|
|
3234
|
-
U.prototype.has = ms;
|
|
3235
|
-
U.prototype.set = ys;
|
|
3236
|
-
function bs() {
|
|
3237
|
-
this.__data__ = new U(), this.size = 0;
|
|
3238
|
-
}
|
|
3239
|
-
function Ss(e) {
|
|
3240
|
-
var t = this.__data__, n = t.delete(e);
|
|
3241
|
-
return this.size = t.size, n;
|
|
3242
|
-
}
|
|
3243
|
-
function Os(e) {
|
|
3244
|
-
return this.__data__.get(e);
|
|
3245
|
-
}
|
|
3246
|
-
function vs(e) {
|
|
3247
|
-
return this.__data__.has(e);
|
|
3248
|
-
}
|
|
3249
|
-
var xs = q["__core-js_shared__"];
|
|
3250
|
-
const $e = xs;
|
|
3251
|
-
var Ot = function() {
|
|
3252
|
-
var e = /[^.]+$/.exec($e && $e.keys && $e.keys.IE_PROTO || "");
|
|
3253
|
-
return e ? "Symbol(src)_1." + e : "";
|
|
3254
|
-
}();
|
|
3255
|
-
function Cs(e) {
|
|
3256
|
-
return !!Ot && Ot in e;
|
|
3257
|
-
}
|
|
3258
|
-
var ws = Function.prototype, Ds = ws.toString;
|
|
3259
|
-
function Q(e) {
|
|
3260
|
-
if (e != null) {
|
|
3261
|
-
try {
|
|
3262
|
-
return Ds.call(e);
|
|
3263
|
-
} catch {
|
|
3264
|
-
}
|
|
3265
|
-
try {
|
|
3266
|
-
return e + "";
|
|
3267
|
-
} catch {
|
|
3268
|
-
}
|
|
3269
|
-
}
|
|
3270
|
-
return "";
|
|
3271
|
-
}
|
|
3272
|
-
var js = /[\\^$.*+?()[\]{}|]/g, Ps = /^\[object .+?Constructor\]$/, Fs = Function.prototype, As = Object.prototype, Ls = Fs.toString, Es = As.hasOwnProperty, Ns = RegExp(
|
|
3273
|
-
"^" + Ls.call(Es).replace(js, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
3274
|
-
);
|
|
3275
|
-
function Rs(e) {
|
|
3276
|
-
if (!Ae(e) || Cs(e))
|
|
3277
|
-
return !1;
|
|
3278
|
-
var t = kn(e) ? Ns : Ps;
|
|
3279
|
-
return t.test(Q(e));
|
|
3280
|
-
}
|
|
3281
|
-
function Ts(e, t) {
|
|
3282
|
-
return e == null ? void 0 : e[t];
|
|
3283
|
-
}
|
|
3284
|
-
function Y(e, t) {
|
|
3285
|
-
var n = Ts(e, t);
|
|
3286
|
-
return Rs(n) ? n : void 0;
|
|
3287
|
-
}
|
|
3288
|
-
var Ms = Y(q, "Map");
|
|
3289
|
-
const de = Ms;
|
|
3290
|
-
var $s = Y(Object, "create");
|
|
3291
|
-
const fe = $s;
|
|
3292
|
-
function Is() {
|
|
3293
|
-
this.__data__ = fe ? fe(null) : {}, this.size = 0;
|
|
3294
|
-
}
|
|
3295
|
-
function _s(e) {
|
|
3296
|
-
var t = this.has(e) && delete this.__data__[e];
|
|
3297
|
-
return this.size -= t ? 1 : 0, t;
|
|
3298
|
-
}
|
|
3299
|
-
var ks = "__lodash_hash_undefined__", Bs = Object.prototype, Us = Bs.hasOwnProperty;
|
|
3300
|
-
function qs(e) {
|
|
3301
|
-
var t = this.__data__;
|
|
3302
|
-
if (fe) {
|
|
3303
|
-
var n = t[e];
|
|
3304
|
-
return n === ks ? void 0 : n;
|
|
3305
|
-
}
|
|
3306
|
-
return Us.call(t, e) ? t[e] : void 0;
|
|
3307
|
-
}
|
|
3308
|
-
var Vs = Object.prototype, Ws = Vs.hasOwnProperty;
|
|
3309
|
-
function Hs(e) {
|
|
3310
|
-
var t = this.__data__;
|
|
3311
|
-
return fe ? t[e] !== void 0 : Ws.call(t, e);
|
|
3312
|
-
}
|
|
3313
|
-
var Ks = "__lodash_hash_undefined__";
|
|
3314
|
-
function Gs(e, t) {
|
|
3315
|
-
var n = this.__data__;
|
|
3316
|
-
return this.size += this.has(e) ? 0 : 1, n[e] = fe && t === void 0 ? Ks : t, this;
|
|
3317
|
-
}
|
|
3318
|
-
function H(e) {
|
|
3319
|
-
var t = -1, n = e == null ? 0 : e.length;
|
|
3320
|
-
for (this.clear(); ++t < n; ) {
|
|
3321
|
-
var r = e[t];
|
|
3322
|
-
this.set(r[0], r[1]);
|
|
3323
|
-
}
|
|
3324
|
-
}
|
|
3325
|
-
H.prototype.clear = Is;
|
|
3326
|
-
H.prototype.delete = _s;
|
|
3327
|
-
H.prototype.get = qs;
|
|
3328
|
-
H.prototype.has = Hs;
|
|
3329
|
-
H.prototype.set = Gs;
|
|
3330
|
-
function zs() {
|
|
3331
|
-
this.size = 0, this.__data__ = {
|
|
3332
|
-
hash: new H(),
|
|
3333
|
-
map: new (de || U)(),
|
|
3334
|
-
string: new H()
|
|
3335
|
-
};
|
|
3336
|
-
}
|
|
3337
|
-
function Js(e) {
|
|
3338
|
-
var t = typeof e;
|
|
3339
|
-
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
3340
|
-
}
|
|
3341
|
-
function Ne(e, t) {
|
|
3342
|
-
var n = e.__data__;
|
|
3343
|
-
return Js(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
|
3344
|
-
}
|
|
3345
|
-
function Qs(e) {
|
|
3346
|
-
var t = Ne(this, e).delete(e);
|
|
3347
|
-
return this.size -= t ? 1 : 0, t;
|
|
3348
|
-
}
|
|
3349
|
-
function Ys(e) {
|
|
3350
|
-
return Ne(this, e).get(e);
|
|
3351
|
-
}
|
|
3352
|
-
function Xs(e) {
|
|
3353
|
-
return Ne(this, e).has(e);
|
|
3354
|
-
}
|
|
3355
|
-
function Zs(e, t) {
|
|
3356
|
-
var n = Ne(this, e), r = n.size;
|
|
3357
|
-
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
|
|
3358
|
-
}
|
|
3359
|
-
function re(e) {
|
|
3360
|
-
var t = -1, n = e == null ? 0 : e.length;
|
|
3361
|
-
for (this.clear(); ++t < n; ) {
|
|
3362
|
-
var r = e[t];
|
|
3363
|
-
this.set(r[0], r[1]);
|
|
3364
|
-
}
|
|
3365
|
-
}
|
|
3366
|
-
re.prototype.clear = zs;
|
|
3367
|
-
re.prototype.delete = Qs;
|
|
3368
|
-
re.prototype.get = Ys;
|
|
3369
|
-
re.prototype.has = Xs;
|
|
3370
|
-
re.prototype.set = Zs;
|
|
3371
|
-
var ei = 200;
|
|
3372
|
-
function ti(e, t) {
|
|
3373
|
-
var n = this.__data__;
|
|
3374
|
-
if (n instanceof U) {
|
|
3375
|
-
var r = n.__data__;
|
|
3376
|
-
if (!de || r.length < ei - 1)
|
|
3377
|
-
return r.push([e, t]), this.size = ++n.size, this;
|
|
3378
|
-
n = this.__data__ = new re(r);
|
|
3379
|
-
}
|
|
3380
|
-
return n.set(e, t), this.size = n.size, this;
|
|
3381
|
-
}
|
|
3382
|
-
function se(e) {
|
|
3383
|
-
var t = this.__data__ = new U(e);
|
|
3384
|
-
this.size = t.size;
|
|
3385
|
-
}
|
|
3386
|
-
se.prototype.clear = bs;
|
|
3387
|
-
se.prototype.delete = Ss;
|
|
3388
|
-
se.prototype.get = Os;
|
|
3389
|
-
se.prototype.has = vs;
|
|
3390
|
-
se.prototype.set = ti;
|
|
3391
|
-
function ni(e, t) {
|
|
3392
|
-
for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; )
|
|
3393
|
-
;
|
|
3394
|
-
return e;
|
|
3395
|
-
}
|
|
3396
|
-
var ri = function() {
|
|
3397
|
-
try {
|
|
3398
|
-
var e = Y(Object, "defineProperty");
|
|
3399
|
-
return e({}, "", {}), e;
|
|
3400
|
-
} catch {
|
|
3401
|
-
}
|
|
3402
|
-
}();
|
|
3403
|
-
const vt = ri;
|
|
3404
|
-
function Jt(e, t, n) {
|
|
3405
|
-
t == "__proto__" && vt ? vt(e, t, {
|
|
3406
|
-
configurable: !0,
|
|
3407
|
-
enumerable: !0,
|
|
3408
|
-
value: n,
|
|
3409
|
-
writable: !0
|
|
3410
|
-
}) : e[t] = n;
|
|
3411
|
-
}
|
|
3412
|
-
var si = Object.prototype, ii = si.hasOwnProperty;
|
|
3413
|
-
function Qt(e, t, n) {
|
|
3414
|
-
var r = e[t];
|
|
3415
|
-
(!(ii.call(e, t) && zt(r, n)) || n === void 0 && !(t in e)) && Jt(e, t, n);
|
|
3416
|
-
}
|
|
3417
|
-
function Re(e, t, n, r) {
|
|
3418
|
-
var s = !n;
|
|
3419
|
-
n || (n = {});
|
|
3420
|
-
for (var i = -1, a = t.length; ++i < a; ) {
|
|
3421
|
-
var o = t[i], u = r ? r(n[o], e[o], o, n, e) : void 0;
|
|
3422
|
-
u === void 0 && (u = e[o]), s ? Jt(n, o, u) : Qt(n, o, u);
|
|
3423
|
-
}
|
|
3424
|
-
return n;
|
|
3425
|
-
}
|
|
3426
|
-
function ai(e, t) {
|
|
3427
|
-
return e && Re(t, Qe(t), e);
|
|
3428
|
-
}
|
|
3429
|
-
function oi(e) {
|
|
3430
|
-
var t = [];
|
|
3431
|
-
if (e != null)
|
|
3432
|
-
for (var n in Object(e))
|
|
3433
|
-
t.push(n);
|
|
3434
|
-
return t;
|
|
3435
|
-
}
|
|
3436
|
-
var ui = Object.prototype, li = ui.hasOwnProperty;
|
|
3437
|
-
function ci(e) {
|
|
3438
|
-
if (!Ae(e))
|
|
3439
|
-
return oi(e);
|
|
3440
|
-
var t = kt(e), n = [];
|
|
3441
|
-
for (var r in e)
|
|
3442
|
-
r == "constructor" && (t || !li.call(e, r)) || n.push(r);
|
|
3443
|
-
return n;
|
|
3444
|
-
}
|
|
3445
|
-
function Ze(e) {
|
|
3446
|
-
return Bn(e) ? Un(e, !0) : ci(e);
|
|
3447
|
-
}
|
|
3448
|
-
function di(e, t) {
|
|
3449
|
-
return e && Re(t, Ze(t), e);
|
|
3450
|
-
}
|
|
3451
|
-
var Yt = typeof exports == "object" && exports && !exports.nodeType && exports, xt = Yt && typeof module == "object" && module && !module.nodeType && module, fi = xt && xt.exports === Yt, Ct = fi ? q.Buffer : void 0, wt = Ct ? Ct.allocUnsafe : void 0;
|
|
3452
|
-
function pi(e, t) {
|
|
3453
|
-
if (t)
|
|
3454
|
-
return e.slice();
|
|
3455
|
-
var n = e.length, r = wt ? wt(n) : new e.constructor(n);
|
|
3456
|
-
return e.copy(r), r;
|
|
3457
|
-
}
|
|
3458
|
-
function gi(e, t) {
|
|
3459
|
-
var n = -1, r = e.length;
|
|
3460
|
-
for (t || (t = Array(r)); ++n < r; )
|
|
3461
|
-
t[n] = e[n];
|
|
3462
|
-
return t;
|
|
3463
|
-
}
|
|
3464
|
-
function hi(e, t) {
|
|
3465
|
-
for (var n = -1, r = e == null ? 0 : e.length, s = 0, i = []; ++n < r; ) {
|
|
3466
|
-
var a = e[n];
|
|
3467
|
-
t(a, n, e) && (i[s++] = a);
|
|
3468
|
-
}
|
|
3469
|
-
return i;
|
|
3470
|
-
}
|
|
3471
|
-
function Xt() {
|
|
3472
|
-
return [];
|
|
3473
|
-
}
|
|
3474
|
-
var mi = Object.prototype, yi = mi.propertyIsEnumerable, Dt = Object.getOwnPropertySymbols, bi = Dt ? function(e) {
|
|
3475
|
-
return e == null ? [] : (e = Object(e), hi(Dt(e), function(t) {
|
|
3476
|
-
return yi.call(e, t);
|
|
3477
|
-
}));
|
|
3478
|
-
} : Xt;
|
|
3479
|
-
const et = bi;
|
|
3480
|
-
function Si(e, t) {
|
|
3481
|
-
return Re(e, et(e), t);
|
|
3482
|
-
}
|
|
3483
|
-
function Zt(e, t) {
|
|
3484
|
-
for (var n = -1, r = t.length, s = e.length; ++n < r; )
|
|
3485
|
-
e[s + n] = t[n];
|
|
3486
|
-
return e;
|
|
3487
|
-
}
|
|
3488
|
-
var Oi = qn(Object.getPrototypeOf, Object);
|
|
3489
|
-
const en = Oi;
|
|
3490
|
-
var vi = Object.getOwnPropertySymbols, xi = vi ? function(e) {
|
|
3491
|
-
for (var t = []; e; )
|
|
3492
|
-
Zt(t, et(e)), e = en(e);
|
|
3493
|
-
return t;
|
|
3494
|
-
} : Xt;
|
|
3495
|
-
const tn = xi;
|
|
3496
|
-
function Ci(e, t) {
|
|
3497
|
-
return Re(e, tn(e), t);
|
|
3498
|
-
}
|
|
3499
|
-
function nn(e, t, n) {
|
|
3500
|
-
var r = t(e);
|
|
3501
|
-
return Bt(e) ? r : Zt(r, n(e));
|
|
3502
|
-
}
|
|
3503
|
-
function wi(e) {
|
|
3504
|
-
return nn(e, Qe, et);
|
|
3505
|
-
}
|
|
3506
|
-
function Di(e) {
|
|
3507
|
-
return nn(e, Ze, tn);
|
|
3508
|
-
}
|
|
3509
|
-
var ji = Y(q, "DataView");
|
|
3510
|
-
const He = ji;
|
|
3511
|
-
var Pi = Y(q, "Promise");
|
|
3512
|
-
const Ke = Pi;
|
|
3513
|
-
var Fi = Y(q, "Set");
|
|
3514
|
-
const Ge = Fi;
|
|
3515
|
-
var Ai = Y(q, "WeakMap");
|
|
3516
|
-
const ze = Ai;
|
|
3517
|
-
var jt = "[object Map]", Li = "[object Object]", Pt = "[object Promise]", Ft = "[object Set]", At = "[object WeakMap]", Lt = "[object DataView]", Ei = Q(He), Ni = Q(de), Ri = Q(Ke), Ti = Q(Ge), Mi = Q(ze), W = Ut;
|
|
3518
|
-
(He && W(new He(new ArrayBuffer(1))) != Lt || de && W(new de()) != jt || Ke && W(Ke.resolve()) != Pt || Ge && W(new Ge()) != Ft || ze && W(new ze()) != At) && (W = function(e) {
|
|
3519
|
-
var t = Ut(e), n = t == Li ? e.constructor : void 0, r = n ? Q(n) : "";
|
|
3520
|
-
if (r)
|
|
3521
|
-
switch (r) {
|
|
3522
|
-
case Ei:
|
|
3523
|
-
return Lt;
|
|
3524
|
-
case Ni:
|
|
3525
|
-
return jt;
|
|
3526
|
-
case Ri:
|
|
3527
|
-
return Pt;
|
|
3528
|
-
case Ti:
|
|
3529
|
-
return Ft;
|
|
3530
|
-
case Mi:
|
|
3531
|
-
return At;
|
|
3532
|
-
}
|
|
3533
|
-
return t;
|
|
3534
|
-
});
|
|
3535
|
-
const tt = W;
|
|
3536
|
-
var $i = Object.prototype, Ii = $i.hasOwnProperty;
|
|
3537
|
-
function _i(e) {
|
|
3538
|
-
var t = e.length, n = new e.constructor(t);
|
|
3539
|
-
return t && typeof e[0] == "string" && Ii.call(e, "index") && (n.index = e.index, n.input = e.input), n;
|
|
3540
|
-
}
|
|
3541
|
-
var ki = q.Uint8Array;
|
|
3542
|
-
const Et = ki;
|
|
3543
|
-
function nt(e) {
|
|
3544
|
-
var t = new e.constructor(e.byteLength);
|
|
3545
|
-
return new Et(t).set(new Et(e)), t;
|
|
3546
|
-
}
|
|
3547
|
-
function Bi(e, t) {
|
|
3548
|
-
var n = t ? nt(e.buffer) : e.buffer;
|
|
3549
|
-
return new e.constructor(n, e.byteOffset, e.byteLength);
|
|
3550
|
-
}
|
|
3551
|
-
var Ui = /\w*$/;
|
|
3552
|
-
function qi(e) {
|
|
3553
|
-
var t = new e.constructor(e.source, Ui.exec(e));
|
|
3554
|
-
return t.lastIndex = e.lastIndex, t;
|
|
3555
|
-
}
|
|
3556
|
-
var Nt = at ? at.prototype : void 0, Rt = Nt ? Nt.valueOf : void 0;
|
|
3557
|
-
function Vi(e) {
|
|
3558
|
-
return Rt ? Object(Rt.call(e)) : {};
|
|
3559
|
-
}
|
|
3560
|
-
function Wi(e, t) {
|
|
3561
|
-
var n = t ? nt(e.buffer) : e.buffer;
|
|
3562
|
-
return new e.constructor(n, e.byteOffset, e.length);
|
|
3563
|
-
}
|
|
3564
|
-
var Hi = "[object Boolean]", Ki = "[object Date]", Gi = "[object Map]", zi = "[object Number]", Ji = "[object RegExp]", Qi = "[object Set]", Yi = "[object String]", Xi = "[object Symbol]", Zi = "[object ArrayBuffer]", ea = "[object DataView]", ta = "[object Float32Array]", na = "[object Float64Array]", ra = "[object Int8Array]", sa = "[object Int16Array]", ia = "[object Int32Array]", aa = "[object Uint8Array]", oa = "[object Uint8ClampedArray]", ua = "[object Uint16Array]", la = "[object Uint32Array]";
|
|
3565
|
-
function ca(e, t, n) {
|
|
3566
|
-
var r = e.constructor;
|
|
3567
|
-
switch (t) {
|
|
3568
|
-
case Zi:
|
|
3569
|
-
return nt(e);
|
|
3570
|
-
case Hi:
|
|
3571
|
-
case Ki:
|
|
3572
|
-
return new r(+e);
|
|
3573
|
-
case ea:
|
|
3574
|
-
return Bi(e, n);
|
|
3575
|
-
case ta:
|
|
3576
|
-
case na:
|
|
3577
|
-
case ra:
|
|
3578
|
-
case sa:
|
|
3579
|
-
case ia:
|
|
3580
|
-
case aa:
|
|
3581
|
-
case oa:
|
|
3582
|
-
case ua:
|
|
3583
|
-
case la:
|
|
3584
|
-
return Wi(e, n);
|
|
3585
|
-
case Gi:
|
|
3586
|
-
return new r();
|
|
3587
|
-
case zi:
|
|
3588
|
-
case Yi:
|
|
3589
|
-
return new r(e);
|
|
3590
|
-
case Ji:
|
|
3591
|
-
return qi(e);
|
|
3592
|
-
case Qi:
|
|
3593
|
-
return new r();
|
|
3594
|
-
case Xi:
|
|
3595
|
-
return Vi(e);
|
|
3596
|
-
}
|
|
3597
|
-
}
|
|
3598
|
-
var Tt = Object.create, da = function() {
|
|
3599
|
-
function e() {
|
|
3600
|
-
}
|
|
3601
|
-
return function(t) {
|
|
3602
|
-
if (!Ae(t))
|
|
3603
|
-
return {};
|
|
3604
|
-
if (Tt)
|
|
3605
|
-
return Tt(t);
|
|
3606
|
-
e.prototype = t;
|
|
3607
|
-
var n = new e();
|
|
3608
|
-
return e.prototype = void 0, n;
|
|
3609
|
-
};
|
|
3610
|
-
}();
|
|
3611
|
-
const fa = da;
|
|
3612
|
-
function pa(e) {
|
|
3613
|
-
return typeof e.constructor == "function" && !kt(e) ? fa(en(e)) : {};
|
|
3614
|
-
}
|
|
3615
|
-
var ga = "[object Map]";
|
|
3616
|
-
function ha(e) {
|
|
3617
|
-
return qt(e) && tt(e) == ga;
|
|
3618
|
-
}
|
|
3619
|
-
var Mt = Ce && Ce.isMap, ma = Mt ? Vt(Mt) : ha;
|
|
3620
|
-
const ya = ma;
|
|
3621
|
-
var ba = "[object Set]";
|
|
3622
|
-
function Sa(e) {
|
|
3623
|
-
return qt(e) && tt(e) == ba;
|
|
3624
|
-
}
|
|
3625
|
-
var $t = Ce && Ce.isSet, Oa = $t ? Vt($t) : Sa;
|
|
3626
|
-
const va = Oa;
|
|
3627
|
-
var xa = 1, Ca = 2, wa = 4, rn = "[object Arguments]", Da = "[object Array]", ja = "[object Boolean]", Pa = "[object Date]", Fa = "[object Error]", sn = "[object Function]", Aa = "[object GeneratorFunction]", La = "[object Map]", Ea = "[object Number]", an = "[object Object]", Na = "[object RegExp]", Ra = "[object Set]", Ta = "[object String]", Ma = "[object Symbol]", $a = "[object WeakMap]", Ia = "[object ArrayBuffer]", _a = "[object DataView]", ka = "[object Float32Array]", Ba = "[object Float64Array]", Ua = "[object Int8Array]", qa = "[object Int16Array]", Va = "[object Int32Array]", Wa = "[object Uint8Array]", Ha = "[object Uint8ClampedArray]", Ka = "[object Uint16Array]", Ga = "[object Uint32Array]", v = {};
|
|
3628
|
-
v[rn] = v[Da] = v[Ia] = v[_a] = v[ja] = v[Pa] = v[ka] = v[Ba] = v[Ua] = v[qa] = v[Va] = v[La] = v[Ea] = v[an] = v[Na] = v[Ra] = v[Ta] = v[Ma] = v[Wa] = v[Ha] = v[Ka] = v[Ga] = !0;
|
|
3629
|
-
v[Fa] = v[sn] = v[$a] = !1;
|
|
3630
|
-
function be(e, t, n, r, s, i) {
|
|
3631
|
-
var a, o = t & xa, u = t & Ca, c = t & wa;
|
|
3632
|
-
if (n && (a = s ? n(e, r, s, i) : n(e)), a !== void 0)
|
|
3633
|
-
return a;
|
|
3634
|
-
if (!Ae(e))
|
|
3635
|
-
return e;
|
|
3636
|
-
var d = Bt(e);
|
|
3637
|
-
if (d) {
|
|
3638
|
-
if (a = _i(e), !o)
|
|
3639
|
-
return gi(e, a);
|
|
3640
|
-
} else {
|
|
3641
|
-
var f = tt(e), l = f == sn || f == Aa;
|
|
3642
|
-
if (Vn(e))
|
|
3643
|
-
return pi(e, o);
|
|
3644
|
-
if (f == an || f == rn || l && !s) {
|
|
3645
|
-
if (a = u || l ? {} : pa(e), !o)
|
|
3646
|
-
return u ? Ci(e, di(a, e)) : Si(e, ai(a, e));
|
|
3647
|
-
} else {
|
|
3648
|
-
if (!v[f])
|
|
3649
|
-
return s ? e : {};
|
|
3650
|
-
a = ca(e, f, o);
|
|
3651
|
-
}
|
|
3652
|
-
}
|
|
3653
|
-
i || (i = new se());
|
|
3654
|
-
var g = i.get(e);
|
|
3655
|
-
if (g)
|
|
3656
|
-
return g;
|
|
3657
|
-
i.set(e, a), va(e) ? e.forEach(function(h) {
|
|
3658
|
-
a.add(be(h, t, n, h, e, i));
|
|
3659
|
-
}) : ya(e) && e.forEach(function(h, x) {
|
|
3660
|
-
a.set(x, be(h, t, n, x, e, i));
|
|
3661
|
-
});
|
|
3662
|
-
var p = c ? u ? Di : wi : u ? Ze : Qe, y = d ? void 0 : p(e);
|
|
3663
|
-
return ni(y || e, function(h, x) {
|
|
3664
|
-
y && (x = h, h = e[x]), Qt(a, x, be(h, t, n, x, e, i));
|
|
3665
|
-
}), a;
|
|
3666
|
-
}
|
|
3667
|
-
var za = 1, Ja = 4;
|
|
3668
|
-
function Qa(e) {
|
|
3669
|
-
return be(e, za | Ja);
|
|
3670
|
-
}
|
|
3671
|
-
function Ya(e) {
|
|
3672
|
-
return Buffer.from(e).toString("utf8");
|
|
3673
|
-
}
|
|
3674
|
-
function Xa(e) {
|
|
3675
|
-
return String.fromCharCode.apply(null, new Uint16Array(e));
|
|
3676
|
-
}
|
|
3677
|
-
function Za() {
|
|
3678
|
-
return "UNSUPPORTED";
|
|
3679
|
-
}
|
|
3680
|
-
typeof Buffer < "u" && Buffer.from;
|
|
3681
|
-
var Ie;
|
|
3682
|
-
(function(e) {
|
|
3683
|
-
e[e.None = 0] = "None", e[e.Ascending = 1] = "Ascending", e[e.Descending = 2] = "Descending";
|
|
3684
|
-
})(Ie = Ie || (Ie = {}));
|
|
3685
|
-
const O = {
|
|
3686
|
-
Measure: "measure",
|
|
3687
|
-
MeasureTemplate: "measuretemplate",
|
|
3688
|
-
BaseMeasure: "basemeasure",
|
|
3689
|
-
CalculatedMeasure: "calculatedmeasure",
|
|
3690
|
-
Dimension: "dimension",
|
|
3691
|
-
DateDimension: "datedimension",
|
|
3692
|
-
TextDimension: "textdimension",
|
|
3693
|
-
NumericDimension: "numericdimension",
|
|
3694
|
-
DateLevel: "datelevel",
|
|
3695
|
-
Attribute: "attribute",
|
|
3696
|
-
TextAttribute: "text-attribute",
|
|
3697
|
-
NumericAttribute: "numeric-attribute",
|
|
3698
|
-
Filter: "filter",
|
|
3699
|
-
DimensionFilter: "dimensionfilter",
|
|
3700
|
-
MeasureFilter: "measurefilter",
|
|
3701
|
-
/**
|
|
3702
|
-
* Checks whether the given object or type is a metadata element
|
|
3703
|
-
*
|
|
3704
|
-
* @param o - object to check
|
|
3705
|
-
* @returns true if the object or type is a metadata element
|
|
3706
|
-
*/
|
|
3707
|
-
isMetadata(e) {
|
|
3708
|
-
return O.isMeasure(e) || O.isDimension(e) || O.isAttribute(e) || O.isFilter(e);
|
|
3709
|
-
},
|
|
3710
|
-
/**
|
|
3711
|
-
* Checks whether the given object or type is a measure template
|
|
3712
|
-
*
|
|
3713
|
-
* @param o - object to check
|
|
3714
|
-
* @returns true if the object or type is a measure template
|
|
3715
|
-
*/
|
|
3716
|
-
isMeasureTemplate(e) {
|
|
3717
|
-
return e ? typeof e == "string" ? e.toLowerCase() === O.MeasureTemplate : e.agg === "*" || e.aggregation === "*" || e.type && e.type.toLowerCase() === O.MeasureTemplate : !1;
|
|
3718
|
-
},
|
|
3719
|
-
/**
|
|
3720
|
-
* Checks whether the given object or type is a base measure
|
|
3721
|
-
*
|
|
3722
|
-
* @param o - object to check
|
|
3723
|
-
* @returns true if the object or type is a base measure
|
|
3724
|
-
*/
|
|
3725
|
-
isBaseMeasure(e) {
|
|
3726
|
-
return e ? typeof e == "string" ? e.toLowerCase() === O.BaseMeasure : (e.agg || e.aggregation) && (e.attribute || e.jaql || e.dim || e.expression) && !this.isMeasureTemplate(e) : !1;
|
|
3727
|
-
},
|
|
3728
|
-
/**
|
|
3729
|
-
* Checks whether the given object or type is a measure - of any type
|
|
3730
|
-
*
|
|
3731
|
-
* @param o - object to check
|
|
3732
|
-
* @returns true if the object or type is a measure - of any type
|
|
3733
|
-
*/
|
|
3734
|
-
isMeasure(e) {
|
|
3735
|
-
if (!e)
|
|
3736
|
-
return !1;
|
|
3737
|
-
if (typeof e == "string") {
|
|
3738
|
-
const t = e;
|
|
3739
|
-
return t.toLowerCase() === O.Measure || t.toLowerCase() === O.BaseMeasure || t.toLowerCase() === O.MeasureTemplate || t.toLowerCase() === O.CalculatedMeasure;
|
|
3740
|
-
}
|
|
3741
|
-
return this.isBaseMeasure(e) || this.isCalculatedMeasure(e) || this.isMeasureTemplate(e);
|
|
3742
|
-
},
|
|
3743
|
-
/**
|
|
3744
|
-
* Checks whether the given object or type is a calculated measure
|
|
3745
|
-
*
|
|
3746
|
-
* @param o - object to check
|
|
3747
|
-
* @returns true if the object or type is a calculated measure
|
|
3748
|
-
*/
|
|
3749
|
-
isCalculatedMeasure(e) {
|
|
3750
|
-
return e ? typeof e == "string" ? e.toLowerCase() === O.CalculatedMeasure : (e.expression || e.formula) && e.context : !1;
|
|
3751
|
-
},
|
|
3752
|
-
/**
|
|
3753
|
-
* Checks whether the given object or type is a date dimension
|
|
3754
|
-
*
|
|
3755
|
-
* @param o - object to check
|
|
3756
|
-
* @returns true if the object or type is a date dimension
|
|
3757
|
-
*/
|
|
3758
|
-
isDateDimension(e) {
|
|
3759
|
-
return e ? typeof e == "string" ? e.toLowerCase() === O.DateDimension : (e.dim || e.expression) && e.level : !1;
|
|
3760
|
-
},
|
|
3761
|
-
/**
|
|
3762
|
-
* Checks whether the given object or type is a text dimension
|
|
3763
|
-
*
|
|
3764
|
-
* @param o - object to check
|
|
3765
|
-
* @returns true if the object or type is a text dimension
|
|
3766
|
-
*/
|
|
3767
|
-
isTextDimension(e) {
|
|
3768
|
-
return e && typeof e == "string" ? e.toLowerCase() === O.TextDimension : !1;
|
|
3769
|
-
},
|
|
3770
|
-
/**
|
|
3771
|
-
* Checks whether the given object or type is a numeric dimension
|
|
3772
|
-
*
|
|
3773
|
-
* @param o - object to check
|
|
3774
|
-
* @returns true if the object or type is a numeric dimension
|
|
3775
|
-
*/
|
|
3776
|
-
isNumericDimension(e) {
|
|
3777
|
-
return e && typeof e == "string" ? e.toLowerCase() === O.NumericDimension : !1;
|
|
3778
|
-
},
|
|
3779
|
-
/**
|
|
3780
|
-
* Checks whether the given object or type is a dimension - of any type
|
|
3781
|
-
*
|
|
3782
|
-
* @param o - object to check
|
|
3783
|
-
* @returns true if the object or type is a dimension - of any type
|
|
3784
|
-
*/
|
|
3785
|
-
isDimension(e) {
|
|
3786
|
-
if (e && typeof e == "object" && (e = e.type), typeof e == "string") {
|
|
3787
|
-
const t = e;
|
|
3788
|
-
return t.toLowerCase() === O.DateDimension || t.toLowerCase() === O.Dimension || t.toLowerCase() === O.TextDimension || t.toLowerCase() === O.NumericDimension;
|
|
3789
|
-
}
|
|
3790
|
-
return !1;
|
|
3791
|
-
},
|
|
3792
|
-
/**
|
|
3793
|
-
* Checks whether the given object or type is an attribute - of any type
|
|
3794
|
-
*
|
|
3795
|
-
* @param o - object to check
|
|
3796
|
-
* @returns true if the object or type is an attribute - of any type
|
|
3797
|
-
*/
|
|
3798
|
-
isAttribute(e) {
|
|
3799
|
-
if (typeof e == "string") {
|
|
3800
|
-
const t = e;
|
|
3801
|
-
return t.toLowerCase() === O.Attribute || t.toLowerCase() === O.TextAttribute || t.toLowerCase() === O.NumericAttribute || t.toLowerCase() === O.DateLevel;
|
|
3802
|
-
}
|
|
3803
|
-
return e && e.type ? this.isAttribute(e.type) : !1;
|
|
3804
|
-
},
|
|
3805
|
-
/**
|
|
3806
|
-
* Checks whether the given object or type is a filter
|
|
3807
|
-
*
|
|
3808
|
-
* @param o - object to check
|
|
3809
|
-
* @returns true if the object or type is a filter
|
|
3810
|
-
*/
|
|
3811
|
-
isFilter(e) {
|
|
3812
|
-
if (e && typeof e == "object" && (e = e.type), typeof e == "string") {
|
|
3813
|
-
const t = e;
|
|
3814
|
-
return t.toLowerCase() === O.Filter || t.toLowerCase() === O.DimensionFilter || t.toLowerCase() === O.MeasureFilter;
|
|
3815
|
-
}
|
|
3816
|
-
return !1;
|
|
3817
|
-
}
|
|
3818
|
-
};
|
|
3819
|
-
var _e;
|
|
3820
|
-
(function(e) {
|
|
3821
|
-
e.TEXT = "text", e.NUMERIC = "numeric", e.DATETIME = "datetime";
|
|
3822
|
-
})(_e = _e || (_e = {}));
|
|
3823
|
-
var ke;
|
|
3824
|
-
(function(e) {
|
|
3825
|
-
e.ASC = "asc", e.DESC = "desc";
|
|
3826
|
-
})(ke = ke || (ke = {}));
|
|
3827
|
-
var Be;
|
|
3828
|
-
(function(e) {
|
|
3829
|
-
e.PRE = "pre", e.POST = "post";
|
|
3830
|
-
})(Be = Be || (Be = {}));
|
|
3831
|
-
function Je(e, t = []) {
|
|
3832
|
-
try {
|
|
3833
|
-
return e == null ? String(e) : typeof e == "string" ? `'${is(e)}'` : typeof e == "number" || typeof e == "boolean" ? String(e) : e instanceof Date ? `new Date('${e.toISOString()}')` : Array.isArray(e) ? `[${e.map((n) => Je(n, t)).join(", ")}]` : typeof e == "object" && e !== null ? "composeCode" in e ? e.composeCode : `{ ${Object.entries(e).filter(([r]) => !t.includes(r)).map(([r, s]) => `${/[^a-zA-Z0-9_$]/.test(r) ? `'${r}'` : r}: ${Je(s, t)}`).join(", ")} }` : JSON.stringify(e);
|
|
3834
|
-
} catch (n) {
|
|
3835
|
-
return console.error(n, JSON.stringify(e, null, 2)), JSON.stringify(e);
|
|
3836
|
-
}
|
|
3837
|
-
}
|
|
3838
|
-
function eo(e) {
|
|
3839
|
-
let t = e.length;
|
|
3840
|
-
for (; t > 0 && e[t - 1] === void 0; )
|
|
3841
|
-
t--;
|
|
3842
|
-
return e.slice(0, t);
|
|
3843
|
-
}
|
|
3844
|
-
function to(e, t) {
|
|
3845
|
-
return function(n) {
|
|
3846
|
-
return function(...r) {
|
|
3847
|
-
const s = eo(r), i = s.length, a = s.map((c) => Je(c, ["guid"])).filter((c, d) => !(["", "{ }", "{}", "undefined", "null"].includes(c) && d === i - 1)).join(", "), o = `${e}.${t ?? n.name}(${a})`, u = n(...r);
|
|
3848
|
-
return u.composeCode = o, u;
|
|
3849
|
-
};
|
|
3850
|
-
};
|
|
3851
|
-
}
|
|
3852
|
-
function It(e, t) {
|
|
3853
|
-
return to("filterFactory.logic", t)(e);
|
|
3854
|
-
}
|
|
3855
|
-
function no(e) {
|
|
3856
|
-
return e && e.__serializable === "MembersFilter";
|
|
3857
|
-
}
|
|
3858
|
-
function ro(e) {
|
|
3859
|
-
return e && e.__serializable === "CascadingFilter";
|
|
3860
|
-
}
|
|
3861
|
-
var Ue;
|
|
3862
|
-
(function(e) {
|
|
3863
|
-
const t = (n) => {
|
|
3864
|
-
if (Array.isArray(n)) {
|
|
3865
|
-
const [r, ...s] = n;
|
|
3866
|
-
return s.length === 0 ? t(r) : {
|
|
3867
|
-
operator: "AND",
|
|
3868
|
-
left: t(r),
|
|
3869
|
-
right: t(s)
|
|
3870
|
-
};
|
|
3871
|
-
}
|
|
3872
|
-
return n;
|
|
3873
|
-
};
|
|
3874
|
-
e.and = It((n, r) => ({
|
|
3875
|
-
operator: "AND",
|
|
3876
|
-
left: t(n),
|
|
3877
|
-
right: t(r)
|
|
3878
|
-
}), "and"), e.or = It((n, r) => ({
|
|
3879
|
-
operator: "OR",
|
|
3880
|
-
left: t(n),
|
|
3881
|
-
right: t(r)
|
|
3882
|
-
}), "or");
|
|
3883
|
-
})(Ue = Ue || (Ue = {}));
|
|
3884
|
-
var Se;
|
|
3885
|
-
(function(e) {
|
|
3886
|
-
e.INCLUDE_ALL = "INCLUDE_ALL", e.ADVANCED = "ADVANCED", e.INVALID = "INVALID", e.CONDITION = "CONDITION", e.SPECIFIC_ITEMS = "SPECIFIC_ITEMS";
|
|
3887
|
-
})(Se = Se || (Se = {}));
|
|
3888
|
-
var Oe;
|
|
3889
|
-
(function(e) {
|
|
3890
|
-
e.PERIOD = "PERIOD", e.DATE_RANGE = "DATE_RANGE";
|
|
3891
|
-
})(Oe = Oe || (Oe = {}));
|
|
3892
|
-
var ve;
|
|
3893
|
-
(function(e) {
|
|
3894
|
-
e.NUMERIC_RANGE = "NUMERIC_RANGE";
|
|
3895
|
-
})(ve = ve || (ve = {}));
|
|
3896
|
-
var xe;
|
|
3897
|
-
(function(e) {
|
|
3898
|
-
e.YEARS = "years", e.QUARTERS = "quarters", e.MONTHS = "months", e.WEEKS = "weeks", e.DAYS = "days", e.HOURS = "hours", e.MINUTES = "minutes";
|
|
3899
|
-
})(xe = xe || (xe = {}));
|
|
3900
|
-
var qe;
|
|
3901
|
-
(function(e) {
|
|
3902
|
-
e.DATE_TIME = "datetime", e.NUMERIC = "numeric", e.TEXT = "text";
|
|
3903
|
-
})(qe = qe || (qe = {}));
|
|
3904
|
-
const M = Object.assign(Object.assign(Object.assign({}, Se), Oe), ve), so = {
|
|
3905
|
-
[M.INCLUDE_ALL]: {
|
|
3906
|
-
all: !0,
|
|
3907
|
-
filterType: M.INCLUDE_ALL
|
|
3908
|
-
},
|
|
3909
|
-
[M.PERIOD]: {
|
|
3910
|
-
last: { count: 1, offset: 1 },
|
|
3911
|
-
isNotCurrentPeriod: !0,
|
|
3912
|
-
filterType: M.PERIOD
|
|
3913
|
-
},
|
|
3914
|
-
[M.DATE_RANGE]: {
|
|
3915
|
-
filterType: M.DATE_RANGE
|
|
3916
|
-
},
|
|
3917
|
-
[M.NUMERIC_RANGE]: {
|
|
3918
|
-
filterType: M.NUMERIC_RANGE
|
|
3919
|
-
},
|
|
3920
|
-
[M.CONDITION]: {
|
|
3921
|
-
explicit: !1,
|
|
3922
|
-
multiSelection: !0,
|
|
3923
|
-
exclude: { members: [] },
|
|
3924
|
-
filterType: M.CONDITION
|
|
3925
|
-
},
|
|
3926
|
-
[M.SPECIFIC_ITEMS]: {
|
|
3927
|
-
explicit: !0,
|
|
3928
|
-
multiSelection: !0,
|
|
3929
|
-
members: [],
|
|
3930
|
-
filterType: M.SPECIFIC_ITEMS
|
|
3931
|
-
}
|
|
3932
|
-
};
|
|
3933
|
-
so.INCLUDE_ALL, xe.YEARS;
|
|
3934
|
-
var Ve;
|
|
3935
|
-
(function(e) {
|
|
3936
|
-
e.IS = "members", e.IS_NOT = "exclude", e.IS_WITHIN = "isWithin", e.TOP = "top", e.BOTTOM = "bottom", e.AFTER = "after", e.BEFORE = "before", e.STARTS_WITH = "startsWith", e.DOESNT_START_WITH = "doesntStartWith", e.ENDS_WITH = "endsWith", e.DOESNT_END_WITH = "doesntEndWith", e.CONTAINS = "contains", e.DOESNT_CONTAIN = "doesntContain", e.EQUALS = "equals", e.DOESNT_EQUAL = "doesntEqual", e.IS_EMPTY = "isEmpty", e.IS_NOT_EMPTY = "isNotEmpty", e.GREATER_THAN = "fromNotEqual", e.GREATER_THAN_OR_EQUAL = "from", e.LESS_THAN = "toNotEqual", e.LESS_THAN_OR_EQUAL = "to", e.BETWEEN = "between", e.IS_NOT_BETWEEN = "isNotBetween", e.MULTIPLE_CONDITION = "multipleCondition", e.NONE = "none";
|
|
3937
|
-
})(Ve = Ve || (Ve = {}));
|
|
3938
|
-
const on = (e) => {
|
|
3939
|
-
if (!e)
|
|
3940
|
-
return { filters: void 0, relations: void 0 };
|
|
3941
|
-
if (Array.isArray(e))
|
|
3942
|
-
return { filters: e, relations: void 0 };
|
|
3943
|
-
const t = /* @__PURE__ */ new Set();
|
|
3944
|
-
function n(a) {
|
|
3945
|
-
const [o, ...u] = a;
|
|
3946
|
-
if (t.add(o), !u.length)
|
|
3947
|
-
return r({ instanceid: o.config.guid });
|
|
3948
|
-
const c = r(o), d = n(u);
|
|
3949
|
-
return { left: c, right: d, operator: "AND" };
|
|
3950
|
-
}
|
|
3951
|
-
function r(a) {
|
|
3952
|
-
return a && (io(a) ? ro(a) ? n(a.filters) : (t.add(a), { instanceid: a.config.guid }) : ("left" in a && (a.left = r(a.left)), "right" in a && (a.right = r(a.right)), "composeCode" in a && delete a.composeCode, a));
|
|
3953
|
-
}
|
|
3954
|
-
const s = Qa(e), i = r(s);
|
|
3955
|
-
return { filters: Array.from(t), relations: i };
|
|
3956
|
-
};
|
|
3957
|
-
function io(e) {
|
|
3958
|
-
return "config" in e && "guid" in e.config;
|
|
3959
|
-
}
|
|
3960
|
-
O.TextAttribute, O.NumericAttribute, O.DateLevel;
|
|
3961
|
-
const au = (e) => {
|
|
3962
|
-
const [t, n] = K(Wt, {
|
|
1562
|
+
setup: (t) => l(jt, t)
|
|
1563
|
+
}), gn = (t) => {
|
|
1564
|
+
const [e, n] = q(J, {
|
|
3963
1565
|
isLoading: !0,
|
|
3964
1566
|
isError: !1,
|
|
3965
1567
|
isSuccess: !1,
|
|
3966
1568
|
status: "loading",
|
|
3967
1569
|
error: void 0,
|
|
3968
1570
|
data: void 0
|
|
3969
|
-
}),
|
|
3970
|
-
|
|
3971
|
-
const
|
|
1571
|
+
}), i = x();
|
|
1572
|
+
F("useExecuteQuery");
|
|
1573
|
+
const o = async (s) => {
|
|
3972
1574
|
try {
|
|
3973
1575
|
const {
|
|
3974
|
-
dataSource:
|
|
3975
|
-
dimensions:
|
|
1576
|
+
dataSource: r,
|
|
1577
|
+
dimensions: a,
|
|
3976
1578
|
measures: u,
|
|
3977
|
-
filters:
|
|
3978
|
-
highlights:
|
|
1579
|
+
filters: y,
|
|
1580
|
+
highlights: O,
|
|
3979
1581
|
count: f,
|
|
3980
|
-
offset:
|
|
3981
|
-
ungroup:
|
|
3982
|
-
onBeforeQuery:
|
|
3983
|
-
} =
|
|
1582
|
+
offset: p,
|
|
1583
|
+
ungroup: S,
|
|
1584
|
+
onBeforeQuery: j
|
|
1585
|
+
} = d(t), { filters: P, relations: A } = z(y);
|
|
3984
1586
|
n({ type: "loading" });
|
|
3985
|
-
const
|
|
1587
|
+
const $ = await mt(
|
|
3986
1588
|
{
|
|
3987
|
-
dataSource:
|
|
3988
|
-
dimensions:
|
|
1589
|
+
dataSource: r,
|
|
1590
|
+
dimensions: a,
|
|
3989
1591
|
measures: u,
|
|
3990
|
-
filters:
|
|
3991
|
-
filterRelations:
|
|
3992
|
-
highlights:
|
|
1592
|
+
filters: P,
|
|
1593
|
+
filterRelations: A,
|
|
1594
|
+
highlights: O,
|
|
3993
1595
|
count: f,
|
|
3994
|
-
offset:
|
|
3995
|
-
ungroup:
|
|
1596
|
+
offset: p,
|
|
1597
|
+
ungroup: S
|
|
3996
1598
|
},
|
|
3997
|
-
|
|
3998
|
-
{ onBeforeQuery:
|
|
1599
|
+
s,
|
|
1600
|
+
{ onBeforeQuery: L(j) }
|
|
3999
1601
|
);
|
|
4000
|
-
n({ type: "success", data:
|
|
4001
|
-
} catch (
|
|
4002
|
-
n({ type: "error", error:
|
|
1602
|
+
n({ type: "success", data: $ });
|
|
1603
|
+
} catch (r) {
|
|
1604
|
+
n({ type: "error", error: r });
|
|
4003
1605
|
}
|
|
4004
1606
|
};
|
|
4005
|
-
return
|
|
4006
|
-
[...
|
|
1607
|
+
return g(
|
|
1608
|
+
[...h(t), i],
|
|
4007
1609
|
() => {
|
|
4008
|
-
const { app:
|
|
4009
|
-
!
|
|
1610
|
+
const { app: s } = i.value, { enabled: r } = d(t);
|
|
1611
|
+
!s || !(r === void 0 || r === !0) || o(s);
|
|
4010
1612
|
},
|
|
4011
1613
|
{ immediate: !0 }
|
|
4012
|
-
),
|
|
4013
|
-
},
|
|
4014
|
-
const
|
|
4015
|
-
|
|
4016
|
-
const [
|
|
1614
|
+
), b(e.value);
|
|
1615
|
+
}, On = (t) => {
|
|
1616
|
+
const e = m(void 0), n = m(void 0);
|
|
1617
|
+
F("useExecuteQueryByWidgetId");
|
|
1618
|
+
const [i, o] = q(J, {
|
|
4017
1619
|
isLoading: !0,
|
|
4018
1620
|
isError: !1,
|
|
4019
1621
|
isSuccess: !1,
|
|
4020
1622
|
status: "loading",
|
|
4021
1623
|
error: void 0,
|
|
4022
1624
|
data: void 0
|
|
4023
|
-
}),
|
|
1625
|
+
}), s = x(), r = async (a) => {
|
|
4024
1626
|
try {
|
|
4025
|
-
|
|
4026
|
-
const { filters: u, ...
|
|
1627
|
+
o({ type: "loading" });
|
|
1628
|
+
const { filters: u, ...y } = d(t), { filters: O } = z(L(u)), {
|
|
4027
1629
|
data: f,
|
|
4028
|
-
query:
|
|
4029
|
-
pivotQuery:
|
|
4030
|
-
} = await
|
|
4031
|
-
...
|
|
4032
|
-
filters:
|
|
4033
|
-
app:
|
|
1630
|
+
query: p,
|
|
1631
|
+
pivotQuery: S
|
|
1632
|
+
} = await vt({
|
|
1633
|
+
...y,
|
|
1634
|
+
filters: O,
|
|
1635
|
+
app: a
|
|
4034
1636
|
});
|
|
4035
|
-
|
|
1637
|
+
o({ type: "success", data: f }), e.value = p, n.value = S;
|
|
4036
1638
|
} catch (u) {
|
|
4037
|
-
|
|
1639
|
+
o({ type: "error", error: u });
|
|
4038
1640
|
}
|
|
4039
1641
|
};
|
|
4040
|
-
return
|
|
4041
|
-
[...
|
|
1642
|
+
return g(
|
|
1643
|
+
[...h(t), s],
|
|
4042
1644
|
() => {
|
|
4043
|
-
const { app:
|
|
4044
|
-
!
|
|
1645
|
+
const { app: a } = s.value, { enabled: u } = d(t);
|
|
1646
|
+
!a || !(u === void 0 || u === !0) || r(a);
|
|
4045
1647
|
},
|
|
4046
1648
|
{ immediate: !0 }
|
|
4047
1649
|
), {
|
|
4048
|
-
...
|
|
4049
|
-
query:
|
|
1650
|
+
...b(i.value),
|
|
1651
|
+
query: e,
|
|
4050
1652
|
pivotQuery: n
|
|
4051
1653
|
};
|
|
4052
|
-
},
|
|
4053
|
-
|
|
4054
|
-
const
|
|
4055
|
-
|
|
4056
|
-
]), [n,
|
|
1654
|
+
}, Sn = (t) => {
|
|
1655
|
+
F("useExecuteCsvQuery");
|
|
1656
|
+
const e = new w(Pt, [
|
|
1657
|
+
R()
|
|
1658
|
+
]), [n, i] = W({
|
|
4057
1659
|
isLoading: !0,
|
|
4058
1660
|
isError: !1,
|
|
4059
1661
|
isSuccess: !1,
|
|
@@ -4061,18 +1663,18 @@ const au = (e) => {
|
|
|
4061
1663
|
error: void 0,
|
|
4062
1664
|
data: void 0
|
|
4063
1665
|
});
|
|
4064
|
-
return
|
|
4065
|
-
|
|
4066
|
-
}),
|
|
4067
|
-
|
|
4068
|
-
}),
|
|
4069
|
-
|
|
4070
|
-
}),
|
|
4071
|
-
},
|
|
4072
|
-
|
|
4073
|
-
const
|
|
4074
|
-
|
|
4075
|
-
]), [n,
|
|
1666
|
+
return e.subscribe((o) => {
|
|
1667
|
+
i(o);
|
|
1668
|
+
}), e.run(d(t)), g([...h(t)], () => {
|
|
1669
|
+
e.run(d(t));
|
|
1670
|
+
}), M(() => {
|
|
1671
|
+
e.destroy();
|
|
1672
|
+
}), b(n.value);
|
|
1673
|
+
}, Fn = (t) => {
|
|
1674
|
+
F("useExecutePivotQuery");
|
|
1675
|
+
const e = new w(xt, [
|
|
1676
|
+
R()
|
|
1677
|
+
]), [n, i] = W({
|
|
4076
1678
|
isLoading: !0,
|
|
4077
1679
|
isError: !1,
|
|
4078
1680
|
isSuccess: !1,
|
|
@@ -4080,18 +1682,18 @@ const au = (e) => {
|
|
|
4080
1682
|
error: void 0,
|
|
4081
1683
|
data: void 0
|
|
4082
1684
|
});
|
|
4083
|
-
return
|
|
4084
|
-
|
|
4085
|
-
}),
|
|
4086
|
-
|
|
4087
|
-
}),
|
|
4088
|
-
|
|
4089
|
-
}),
|
|
4090
|
-
},
|
|
4091
|
-
|
|
4092
|
-
const
|
|
4093
|
-
|
|
4094
|
-
]), [n,
|
|
1685
|
+
return e.subscribe((o) => {
|
|
1686
|
+
i(o);
|
|
1687
|
+
}), e.run(d(t)), g([...h(t)], () => {
|
|
1688
|
+
e.run(d(t));
|
|
1689
|
+
}), M(() => {
|
|
1690
|
+
e.destroy();
|
|
1691
|
+
}), b(n.value);
|
|
1692
|
+
}, fn = (t) => {
|
|
1693
|
+
F("useExecuteCustomWidgetQuery");
|
|
1694
|
+
const e = new w(At, [
|
|
1695
|
+
R()
|
|
1696
|
+
]), [n, i] = W({
|
|
4095
1697
|
data: void 0,
|
|
4096
1698
|
isLoading: !0,
|
|
4097
1699
|
isError: !1,
|
|
@@ -4099,107 +1701,107 @@ const au = (e) => {
|
|
|
4099
1701
|
status: "loading",
|
|
4100
1702
|
error: void 0
|
|
4101
1703
|
});
|
|
4102
|
-
return
|
|
4103
|
-
|
|
4104
|
-
}),
|
|
4105
|
-
|
|
4106
|
-
}),
|
|
4107
|
-
|
|
4108
|
-
}),
|
|
4109
|
-
},
|
|
4110
|
-
|
|
4111
|
-
const { filter:
|
|
1704
|
+
return e.subscribe((o) => {
|
|
1705
|
+
i(o);
|
|
1706
|
+
}), e.run(d(t)), g([...h(t)], () => {
|
|
1707
|
+
e.run(d(t));
|
|
1708
|
+
}), M(() => {
|
|
1709
|
+
e.destroy();
|
|
1710
|
+
}), b(n.value);
|
|
1711
|
+
}, Cn = (t) => {
|
|
1712
|
+
F("useGetFilterMembers");
|
|
1713
|
+
const { filter: e, parentFilters: n = [] } = d(t), i = {
|
|
4112
1714
|
selectedMembers: [],
|
|
4113
1715
|
allMembers: [],
|
|
4114
|
-
...
|
|
4115
|
-
excludeMembers:
|
|
4116
|
-
enableMultiSelection:
|
|
4117
|
-
hasBackgroundFilter: !!
|
|
1716
|
+
...ye(e) ? {
|
|
1717
|
+
excludeMembers: e.config.excludeMembers,
|
|
1718
|
+
enableMultiSelection: e.config.enableMultiSelection,
|
|
1719
|
+
hasBackgroundFilter: !!e.config.backgroundFilter && n.length === 0
|
|
4118
1720
|
} : {
|
|
4119
1721
|
excludeMembers: !1,
|
|
4120
1722
|
enableMultiSelection: !1,
|
|
4121
1723
|
hasBackgroundFilter: !1
|
|
4122
1724
|
}
|
|
4123
|
-
},
|
|
1725
|
+
}, o = new w(wt, [R()]), [s, r] = W({
|
|
4124
1726
|
isLoading: !0,
|
|
4125
1727
|
isError: !1,
|
|
4126
1728
|
isSuccess: !1,
|
|
4127
1729
|
status: "loading",
|
|
4128
1730
|
error: void 0,
|
|
4129
|
-
data:
|
|
1731
|
+
data: i,
|
|
4130
1732
|
isAllItemsLoaded: !1
|
|
4131
1733
|
});
|
|
4132
|
-
return
|
|
4133
|
-
a
|
|
4134
|
-
}),
|
|
4135
|
-
|
|
4136
|
-
}),
|
|
4137
|
-
|
|
4138
|
-
}),
|
|
4139
|
-
},
|
|
4140
|
-
|
|
4141
|
-
const [
|
|
1734
|
+
return o.subscribe((a) => {
|
|
1735
|
+
r(a);
|
|
1736
|
+
}), o.run(d(t)), g([...h(t)], () => {
|
|
1737
|
+
o.run(d(t));
|
|
1738
|
+
}), M(() => {
|
|
1739
|
+
o.destroy();
|
|
1740
|
+
}), b(s.value);
|
|
1741
|
+
}, Dn = (t) => {
|
|
1742
|
+
F("useGetDashboardModel");
|
|
1743
|
+
const [e, n] = q(B, {
|
|
4142
1744
|
isLoading: !0,
|
|
4143
1745
|
isError: !1,
|
|
4144
1746
|
isSuccess: !1,
|
|
4145
1747
|
status: "loading",
|
|
4146
1748
|
error: void 0,
|
|
4147
1749
|
data: void 0
|
|
4148
|
-
}),
|
|
1750
|
+
}), i = x(), o = async (r) => {
|
|
4149
1751
|
try {
|
|
4150
1752
|
n({ type: "loading" });
|
|
4151
|
-
const { dashboardOid:
|
|
1753
|
+
const { dashboardOid: a, includeWidgets: u, includeFilters: y } = d(t), O = await qt(r.httpClient, a, {
|
|
4152
1754
|
includeWidgets: u,
|
|
4153
|
-
includeFilters:
|
|
1755
|
+
includeFilters: y
|
|
4154
1756
|
});
|
|
4155
|
-
n({ type: "success", data:
|
|
4156
|
-
} catch (
|
|
4157
|
-
n({ type: "error", error:
|
|
1757
|
+
n({ type: "success", data: O });
|
|
1758
|
+
} catch (a) {
|
|
1759
|
+
n({ type: "error", error: a });
|
|
4158
1760
|
}
|
|
4159
1761
|
};
|
|
4160
|
-
|
|
4161
|
-
[...
|
|
1762
|
+
g(
|
|
1763
|
+
[...h(t), i],
|
|
4162
1764
|
() => {
|
|
4163
|
-
const { app:
|
|
4164
|
-
!
|
|
1765
|
+
const { app: r } = i.value, { enabled: a } = d(t);
|
|
1766
|
+
!r || !(a === void 0 || a === !0) || o(r);
|
|
4165
1767
|
},
|
|
4166
1768
|
{ immediate: !0 }
|
|
4167
1769
|
);
|
|
4168
|
-
const
|
|
4169
|
-
return
|
|
4170
|
-
},
|
|
4171
|
-
|
|
4172
|
-
const [
|
|
1770
|
+
const s = b(e.value);
|
|
1771
|
+
return b(Mt(s));
|
|
1772
|
+
}, jn = (t) => {
|
|
1773
|
+
F("useGetDashboardModels");
|
|
1774
|
+
const [e, n] = q(B, {
|
|
4173
1775
|
isLoading: !0,
|
|
4174
1776
|
isError: !1,
|
|
4175
1777
|
isSuccess: !1,
|
|
4176
1778
|
status: "loading",
|
|
4177
1779
|
error: void 0,
|
|
4178
1780
|
data: void 0
|
|
4179
|
-
}),
|
|
1781
|
+
}), i = x(), o = async (r) => {
|
|
4180
1782
|
try {
|
|
4181
1783
|
n({ type: "loading" });
|
|
4182
|
-
const
|
|
1784
|
+
const a = d(t), u = await Tt(r.httpClient, a);
|
|
4183
1785
|
n({ type: "success", data: u });
|
|
4184
|
-
} catch (
|
|
4185
|
-
n({ type: "error", error:
|
|
1786
|
+
} catch (a) {
|
|
1787
|
+
n({ type: "error", error: a });
|
|
4186
1788
|
}
|
|
4187
1789
|
};
|
|
4188
|
-
|
|
4189
|
-
[...
|
|
1790
|
+
g(
|
|
1791
|
+
[...h(t), i],
|
|
4190
1792
|
() => {
|
|
4191
|
-
const { app:
|
|
4192
|
-
!
|
|
1793
|
+
const { app: r } = i.value, { enabled: a } = d(t);
|
|
1794
|
+
!r || !(a === void 0 || a === !0) || o(r);
|
|
4193
1795
|
},
|
|
4194
1796
|
{ immediate: !0 }
|
|
4195
1797
|
);
|
|
4196
|
-
const
|
|
4197
|
-
return
|
|
4198
|
-
},
|
|
4199
|
-
|
|
4200
|
-
const
|
|
4201
|
-
|
|
4202
|
-
]), [n,
|
|
1798
|
+
const s = b(e.value);
|
|
1799
|
+
return b(Rt(s));
|
|
1800
|
+
}, mn = (t) => {
|
|
1801
|
+
F("useGetSharedFormula");
|
|
1802
|
+
const e = new w(Wt, [
|
|
1803
|
+
R()
|
|
1804
|
+
]), [n, i] = W({
|
|
4203
1805
|
isLoading: !0,
|
|
4204
1806
|
isError: !1,
|
|
4205
1807
|
isSuccess: !1,
|
|
@@ -4207,105 +1809,105 @@ const au = (e) => {
|
|
|
4207
1809
|
error: void 0,
|
|
4208
1810
|
formula: null
|
|
4209
1811
|
});
|
|
4210
|
-
return
|
|
4211
|
-
|
|
4212
|
-
}),
|
|
4213
|
-
|
|
4214
|
-
}),
|
|
4215
|
-
|
|
4216
|
-
}),
|
|
4217
|
-
},
|
|
4218
|
-
|
|
4219
|
-
const [
|
|
1812
|
+
return e.subscribe((o) => {
|
|
1813
|
+
i(o);
|
|
1814
|
+
}), e.run(d(t)), g([...h(t)], () => {
|
|
1815
|
+
e.run(d(t));
|
|
1816
|
+
}), M(() => {
|
|
1817
|
+
e.destroy();
|
|
1818
|
+
}), b(n.value);
|
|
1819
|
+
}, vn = (t) => {
|
|
1820
|
+
F("useGetWidgetModel");
|
|
1821
|
+
const [e, n] = q(B, {
|
|
4220
1822
|
isLoading: !0,
|
|
4221
1823
|
isError: !1,
|
|
4222
1824
|
isSuccess: !1,
|
|
4223
1825
|
status: "loading",
|
|
4224
1826
|
error: void 0,
|
|
4225
1827
|
data: void 0
|
|
4226
|
-
}),
|
|
1828
|
+
}), i = x(), o = async (s) => {
|
|
4227
1829
|
try {
|
|
4228
1830
|
n({ type: "loading" });
|
|
4229
|
-
const { dashboardOid:
|
|
1831
|
+
const { dashboardOid: r, widgetOid: a } = d(t), u = await Et(s.httpClient, r, a);
|
|
4230
1832
|
n({ type: "success", data: u });
|
|
4231
|
-
} catch (
|
|
4232
|
-
n({ type: "error", error:
|
|
1833
|
+
} catch (r) {
|
|
1834
|
+
n({ type: "error", error: r });
|
|
4233
1835
|
}
|
|
4234
1836
|
};
|
|
4235
|
-
return
|
|
4236
|
-
[...
|
|
1837
|
+
return g(
|
|
1838
|
+
[...h(t), i],
|
|
4237
1839
|
() => {
|
|
4238
|
-
const { app:
|
|
4239
|
-
!
|
|
1840
|
+
const { app: s } = i.value, { enabled: r } = d(t);
|
|
1841
|
+
!s || !(r === void 0 || r === !0) || o(s);
|
|
4240
1842
|
},
|
|
4241
1843
|
{ immediate: !0 }
|
|
4242
|
-
),
|
|
4243
|
-
},
|
|
4244
|
-
|
|
4245
|
-
const [
|
|
1844
|
+
), b(e.value);
|
|
1845
|
+
}, Pn = (t) => {
|
|
1846
|
+
F("useGetHierarchyModels");
|
|
1847
|
+
const [e, n] = q(B, {
|
|
4246
1848
|
isLoading: !0,
|
|
4247
1849
|
isError: !1,
|
|
4248
1850
|
isSuccess: !1,
|
|
4249
1851
|
status: "loading",
|
|
4250
1852
|
error: void 0,
|
|
4251
1853
|
data: void 0
|
|
4252
|
-
}),
|
|
1854
|
+
}), i = x(), o = async (s) => {
|
|
4253
1855
|
try {
|
|
4254
1856
|
n({ type: "loading" });
|
|
4255
|
-
const
|
|
4256
|
-
n({ type: "success", data:
|
|
4257
|
-
} catch (
|
|
4258
|
-
n({ type: "error", error:
|
|
1857
|
+
const r = await Bt(s.httpClient, d(t));
|
|
1858
|
+
n({ type: "success", data: r });
|
|
1859
|
+
} catch (r) {
|
|
1860
|
+
n({ type: "error", error: r });
|
|
4259
1861
|
}
|
|
4260
1862
|
};
|
|
4261
|
-
return
|
|
4262
|
-
[...
|
|
1863
|
+
return g(
|
|
1864
|
+
[...h(t), i],
|
|
4263
1865
|
() => {
|
|
4264
|
-
const { app:
|
|
4265
|
-
!
|
|
1866
|
+
const { app: s } = i.value, { enabled: r } = d(t);
|
|
1867
|
+
!s || !(r === void 0 || r === !0) || o(s);
|
|
4266
1868
|
},
|
|
4267
1869
|
{ immediate: !0 }
|
|
4268
|
-
),
|
|
4269
|
-
},
|
|
4270
|
-
const [
|
|
1870
|
+
), b(e.value);
|
|
1871
|
+
}, xn = (t, e, n) => {
|
|
1872
|
+
const [i, o] = q(B, {
|
|
4271
1873
|
isLoading: !0,
|
|
4272
1874
|
isError: !1,
|
|
4273
1875
|
isSuccess: !1,
|
|
4274
1876
|
status: "loading",
|
|
4275
1877
|
error: void 0,
|
|
4276
1878
|
data: void 0
|
|
4277
|
-
}),
|
|
1879
|
+
}), s = x(), r = async (a) => {
|
|
4278
1880
|
try {
|
|
4279
|
-
|
|
4280
|
-
const u =
|
|
4281
|
-
requestConfig:
|
|
1881
|
+
o({ type: "loading" });
|
|
1882
|
+
const u = L(t), y = e ? d(e) : {}, O = n ? d(n) : {}, f = {
|
|
1883
|
+
requestConfig: O.requestConfig ? d(O.requestConfig) : {},
|
|
4282
1884
|
skipTrackingParam: !0
|
|
4283
|
-
},
|
|
4284
|
-
|
|
4285
|
-
|
|
1885
|
+
}, p = await a.call(
|
|
1886
|
+
a.url + u,
|
|
1887
|
+
y,
|
|
4286
1888
|
f
|
|
4287
1889
|
);
|
|
4288
|
-
|
|
1890
|
+
o({ type: "success", data: p });
|
|
4289
1891
|
} catch (u) {
|
|
4290
|
-
|
|
1892
|
+
o({ type: "error", error: u });
|
|
4291
1893
|
}
|
|
4292
1894
|
};
|
|
4293
|
-
return
|
|
4294
|
-
[...
|
|
1895
|
+
return g(
|
|
1896
|
+
[...h(t, e, n), s],
|
|
4295
1897
|
() => {
|
|
4296
|
-
const { app:
|
|
4297
|
-
!
|
|
1898
|
+
const { app: a } = s.value, u = d(n || {}).enabled;
|
|
1899
|
+
!a || !(u === void 0 || u === !0) || r(a.httpClient);
|
|
4298
1900
|
},
|
|
4299
1901
|
{ immediate: !0 }
|
|
4300
|
-
),
|
|
1902
|
+
), b(i.value);
|
|
4301
1903
|
};
|
|
4302
|
-
class
|
|
4303
|
-
constructor(
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
this.componentClass =
|
|
1904
|
+
class ge {
|
|
1905
|
+
constructor(e, n) {
|
|
1906
|
+
E(this, "app", null);
|
|
1907
|
+
E(this, "container", null);
|
|
1908
|
+
E(this, "isDestroyed", !1);
|
|
1909
|
+
E(this, "propsRef", null);
|
|
1910
|
+
this.componentClass = e, this.contexts = n;
|
|
4309
1911
|
}
|
|
4310
1912
|
/**
|
|
4311
1913
|
* Mounts the Vue component into the container element.
|
|
@@ -4314,14 +1916,14 @@ class ao {
|
|
|
4314
1916
|
* @param container - The DOM element to mount the Vue component into
|
|
4315
1917
|
* @param props - Initial props to pass to the component
|
|
4316
1918
|
*/
|
|
4317
|
-
mount(
|
|
1919
|
+
mount(e, n) {
|
|
4318
1920
|
if (this.app || this.isDestroyed)
|
|
4319
1921
|
return;
|
|
4320
|
-
this.container =
|
|
4321
|
-
const
|
|
4322
|
-
setup: () => () =>
|
|
1922
|
+
this.container = e, this.propsRef = m(n);
|
|
1923
|
+
const i = {
|
|
1924
|
+
setup: () => () => ne(this.componentClass, this.propsRef.value)
|
|
4323
1925
|
};
|
|
4324
|
-
this.app =
|
|
1926
|
+
this.app = ee(i), this.app.provide(ae, this.contexts.sisenseContext), this.app.provide(ce, this.contexts.themeContext), this.app.provide(ue, this.contexts.customWidgetsContext), this.app.mount(e);
|
|
4325
1927
|
}
|
|
4326
1928
|
/**
|
|
4327
1929
|
* Updates the props on the existing Vue component instance.
|
|
@@ -4330,8 +1932,8 @@ class ao {
|
|
|
4330
1932
|
*
|
|
4331
1933
|
* @param props - New props to apply to the component
|
|
4332
1934
|
*/
|
|
4333
|
-
update(
|
|
4334
|
-
!this.propsRef || this.isDestroyed || (this.propsRef.value =
|
|
1935
|
+
update(e) {
|
|
1936
|
+
!this.propsRef || this.isDestroyed || (this.propsRef.value = e);
|
|
4335
1937
|
}
|
|
4336
1938
|
/**
|
|
4337
1939
|
* Destroys the Vue component and cleans up resources.
|
|
@@ -4347,8 +1949,8 @@ class ao {
|
|
|
4347
1949
|
return this.app !== null && !this.isDestroyed;
|
|
4348
1950
|
}
|
|
4349
1951
|
}
|
|
4350
|
-
const
|
|
4351
|
-
const
|
|
1952
|
+
const An = () => {
|
|
1953
|
+
const t = le(), e = x(), n = de(), i = t;
|
|
4352
1954
|
return {
|
|
4353
1955
|
/**
|
|
4354
1956
|
* Registers a new custom widget.
|
|
@@ -4356,17 +1958,17 @@ const bu = () => {
|
|
|
4356
1958
|
* @param customWidgetType - The unique identifier for the custom widget type.
|
|
4357
1959
|
* @param customWidget - The custom widget component to register.
|
|
4358
1960
|
*/
|
|
4359
|
-
registerCustomWidget: (
|
|
4360
|
-
const
|
|
4361
|
-
sisenseContext:
|
|
1961
|
+
registerCustomWidget: (o, s) => {
|
|
1962
|
+
const r = {
|
|
1963
|
+
sisenseContext: e,
|
|
4362
1964
|
themeContext: n,
|
|
4363
|
-
customWidgetsContext:
|
|
4364
|
-
},
|
|
4365
|
-
adapterFactory:
|
|
4366
|
-
componentProps:
|
|
1965
|
+
customWidgetsContext: i
|
|
1966
|
+
}, a = () => new ge(s, r), u = (y) => $t(kt, {
|
|
1967
|
+
adapterFactory: a,
|
|
1968
|
+
componentProps: y
|
|
4367
1969
|
});
|
|
4368
|
-
|
|
4369
|
-
|
|
1970
|
+
t.value.customWidgetsMap.has(o) || t.value.customWidgetsMap.set(
|
|
1971
|
+
o,
|
|
4370
1972
|
u
|
|
4371
1973
|
);
|
|
4372
1974
|
},
|
|
@@ -4376,45 +1978,45 @@ const bu = () => {
|
|
|
4376
1978
|
* @param customWidgetType - The type of the custom widget.
|
|
4377
1979
|
* @returns True if the custom widget is registered, false otherwise.
|
|
4378
1980
|
*/
|
|
4379
|
-
hasCustomWidget: (
|
|
1981
|
+
hasCustomWidget: (o) => t.value.customWidgetsMap.has(o)
|
|
4380
1982
|
};
|
|
4381
|
-
},
|
|
4382
|
-
|
|
4383
|
-
const n = new
|
|
4384
|
-
|
|
4385
|
-
]), [
|
|
4386
|
-
n.subscribe(({ dashboard:
|
|
4387
|
-
|
|
4388
|
-
}), n.run(
|
|
4389
|
-
n.run(
|
|
4390
|
-
}),
|
|
1983
|
+
}, wn = (t, e = {}) => {
|
|
1984
|
+
F("useComposedDashboard");
|
|
1985
|
+
const n = new w(Qt, [
|
|
1986
|
+
R()
|
|
1987
|
+
]), [i, o] = W(d(t));
|
|
1988
|
+
n.subscribe(({ dashboard: a }) => {
|
|
1989
|
+
o(a);
|
|
1990
|
+
}), n.run(d(t), e), g([...h(t)], () => {
|
|
1991
|
+
n.run(d(t), e);
|
|
1992
|
+
}), M(() => {
|
|
4391
1993
|
n.destroy();
|
|
4392
1994
|
});
|
|
4393
|
-
const
|
|
1995
|
+
const s = _(n, "setFilters"), r = _(n, "setWidgetsLayout");
|
|
4394
1996
|
return {
|
|
4395
|
-
dashboard:
|
|
4396
|
-
setFilters:
|
|
4397
|
-
setWidgetsLayout:
|
|
1997
|
+
dashboard: i,
|
|
1998
|
+
setFilters: s,
|
|
1999
|
+
setWidgetsLayout: r
|
|
4398
2000
|
};
|
|
4399
|
-
},
|
|
4400
|
-
|
|
4401
|
-
const n = new
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
]),
|
|
4405
|
-
n.subscribe((
|
|
4406
|
-
|
|
2001
|
+
}, Mn = (t, e) => {
|
|
2002
|
+
F("useJtdWidget");
|
|
2003
|
+
const n = new w(It, [
|
|
2004
|
+
R(),
|
|
2005
|
+
pe()
|
|
2006
|
+
]), i = m(null);
|
|
2007
|
+
n.subscribe((s) => {
|
|
2008
|
+
i.value = s;
|
|
4407
2009
|
});
|
|
4408
|
-
const
|
|
4409
|
-
const
|
|
4410
|
-
n.run(
|
|
2010
|
+
const o = () => {
|
|
2011
|
+
const s = re(t), r = d(e);
|
|
2012
|
+
n.run(s, r);
|
|
4411
2013
|
};
|
|
4412
|
-
return
|
|
4413
|
-
|
|
4414
|
-
}),
|
|
2014
|
+
return o(), g([...h(t), ...h(e)], () => {
|
|
2015
|
+
o();
|
|
2016
|
+
}), M(() => {
|
|
4415
2017
|
n.destroy();
|
|
4416
|
-
}),
|
|
4417
|
-
},
|
|
2018
|
+
}), i;
|
|
2019
|
+
}, Oe = c({
|
|
4418
2020
|
props: {
|
|
4419
2021
|
/**
|
|
4420
2022
|
* {@inheritDoc @sisense/sdk-ui!ContextMenuProps.closeContextMenu}
|
|
@@ -4432,61 +2034,61 @@ const bu = () => {
|
|
|
4432
2034
|
*/
|
|
4433
2035
|
position: Object
|
|
4434
2036
|
},
|
|
4435
|
-
setup: (
|
|
4436
|
-
}),
|
|
4437
|
-
drilldownPaths:
|
|
4438
|
-
initialDimension:
|
|
2037
|
+
setup: (t, { slots: e }) => N(Lt, t, e, [])
|
|
2038
|
+
}), Se = ({
|
|
2039
|
+
drilldownPaths: t,
|
|
2040
|
+
initialDimension: e
|
|
4439
2041
|
}) => {
|
|
4440
|
-
if (!
|
|
2042
|
+
if (!e)
|
|
4441
2043
|
throw new Error(
|
|
4442
2044
|
"Initial dimension has to be specified to use drilldown with custom components"
|
|
4443
2045
|
);
|
|
4444
|
-
const n =
|
|
4445
|
-
|
|
4446
|
-
...n.value.map(({ nextDimension:
|
|
4447
|
-
]),
|
|
4448
|
-
() =>
|
|
4449
|
-
if (
|
|
4450
|
-
const
|
|
4451
|
-
return
|
|
4452
|
-
(
|
|
2046
|
+
const n = m([]), i = m(), o = m([]), s = m([]), r = I(() => [
|
|
2047
|
+
Gt(e),
|
|
2048
|
+
...n.value.map(({ nextDimension: p }) => p)
|
|
2049
|
+
]), a = I(
|
|
2050
|
+
() => t.value.filter((p) => {
|
|
2051
|
+
if (be.isAttribute(p)) {
|
|
2052
|
+
const P = p;
|
|
2053
|
+
return r.value.every(
|
|
2054
|
+
(A) => !H(A, P)
|
|
4453
2055
|
);
|
|
4454
2056
|
}
|
|
4455
|
-
const
|
|
4456
|
-
return
|
|
4457
|
-
(
|
|
2057
|
+
const j = p;
|
|
2058
|
+
return r.value.every(
|
|
2059
|
+
(P, A) => H(P, j.levels[A])
|
|
4458
2060
|
);
|
|
4459
2061
|
})
|
|
4460
|
-
), u = (
|
|
4461
|
-
n.value =
|
|
2062
|
+
), u = (p, S, j) => {
|
|
2063
|
+
n.value = _t(
|
|
4462
2064
|
n.value,
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
2065
|
+
p,
|
|
2066
|
+
S,
|
|
2067
|
+
j
|
|
4466
2068
|
), f();
|
|
4467
|
-
},
|
|
4468
|
-
n.value = n.value.slice(0,
|
|
4469
|
-
},
|
|
2069
|
+
}, y = (p) => {
|
|
2070
|
+
n.value = n.value.slice(0, p), f();
|
|
2071
|
+
}, O = () => {
|
|
4470
2072
|
n.value = [], f();
|
|
4471
2073
|
}, f = () => {
|
|
4472
|
-
const
|
|
2074
|
+
const p = (j) => j === "drilldown.breadcrumbsAllSuffix" ? "All" : j, S = Ht(
|
|
4473
2075
|
n.value,
|
|
4474
|
-
|
|
4475
|
-
|
|
2076
|
+
e,
|
|
2077
|
+
p
|
|
4476
2078
|
);
|
|
4477
|
-
|
|
2079
|
+
i.value = S.drilldownDimension, o.value = S.drilldownFilters, s.value = S.drilldownFiltersDisplayValues;
|
|
4478
2080
|
};
|
|
4479
2081
|
return f(), {
|
|
4480
2082
|
drilldownSelections: n,
|
|
4481
|
-
availableDrilldownPaths:
|
|
4482
|
-
drilldownDimension:
|
|
4483
|
-
drilldownFilters:
|
|
4484
|
-
drilldownFiltersDisplayValues:
|
|
2083
|
+
availableDrilldownPaths: a,
|
|
2084
|
+
drilldownDimension: i,
|
|
2085
|
+
drilldownFilters: o,
|
|
2086
|
+
drilldownFiltersDisplayValues: s,
|
|
4485
2087
|
selectDrilldown: u,
|
|
4486
|
-
sliceDrilldownSelections:
|
|
4487
|
-
clearDrilldownSelections:
|
|
2088
|
+
sliceDrilldownSelections: y,
|
|
2089
|
+
clearDrilldownSelections: O
|
|
4488
2090
|
};
|
|
4489
|
-
},
|
|
2091
|
+
}, Fe = c({
|
|
4490
2092
|
props: {
|
|
4491
2093
|
/**
|
|
4492
2094
|
* {@inheritDoc @sisense/sdk-ui!DrilldownWidgetProps.config}
|
|
@@ -4522,81 +2124,81 @@ const bu = () => {
|
|
|
4522
2124
|
},
|
|
4523
2125
|
setup: () => {
|
|
4524
2126
|
}
|
|
4525
|
-
}),
|
|
2127
|
+
}), fe = { style: { display: "flex", "flex-direction": "column", height: "100%" } }, Ce = { style: { "flex-grow": "1", "min-wdith": "0", "min-height": "0" } }, qn = /* @__PURE__ */ c({
|
|
4526
2128
|
__name: "drilldown-widget",
|
|
4527
|
-
props:
|
|
4528
|
-
setup(
|
|
4529
|
-
const
|
|
4530
|
-
drilldownFilters:
|
|
2129
|
+
props: Fe.props,
|
|
2130
|
+
setup(t) {
|
|
2131
|
+
const e = t, { drilldownPaths: n, initialDimension: i, config: o } = b(e), s = m(null), r = m([]), {
|
|
2132
|
+
drilldownFilters: a,
|
|
4531
2133
|
// computed
|
|
4532
2134
|
drilldownDimension: u,
|
|
4533
2135
|
// computed
|
|
4534
|
-
drilldownFiltersDisplayValues:
|
|
2136
|
+
drilldownFiltersDisplayValues: y,
|
|
4535
2137
|
// computed
|
|
4536
|
-
availableDrilldownPaths:
|
|
2138
|
+
availableDrilldownPaths: O,
|
|
4537
2139
|
// computed
|
|
4538
2140
|
selectDrilldown: f,
|
|
4539
|
-
sliceDrilldownSelections:
|
|
4540
|
-
clearDrilldownSelections:
|
|
4541
|
-
} =
|
|
2141
|
+
sliceDrilldownSelections: p,
|
|
2142
|
+
clearDrilldownSelections: S
|
|
2143
|
+
} = Se({
|
|
4542
2144
|
drilldownPaths: n,
|
|
4543
|
-
initialDimension:
|
|
4544
|
-
}),
|
|
4545
|
-
f(
|
|
4546
|
-
},
|
|
4547
|
-
const D = (
|
|
2145
|
+
initialDimension: i.value
|
|
2146
|
+
}), j = (D) => {
|
|
2147
|
+
f(r.value, D);
|
|
2148
|
+
}, P = I(() => {
|
|
2149
|
+
const D = (k) => k === "drilldown.drillMenuItem" ? "Drill" : k;
|
|
4548
2150
|
return [
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
2151
|
+
Vt(r.value, u.value),
|
|
2152
|
+
Jt(
|
|
2153
|
+
O.value,
|
|
4552
2154
|
u.value,
|
|
4553
|
-
|
|
2155
|
+
j,
|
|
4554
2156
|
D
|
|
4555
2157
|
)
|
|
4556
2158
|
];
|
|
4557
|
-
}),
|
|
4558
|
-
|
|
4559
|
-
},
|
|
4560
|
-
|
|
4561
|
-
},
|
|
4562
|
-
|
|
2159
|
+
}), A = (D) => {
|
|
2160
|
+
s.value = D;
|
|
2161
|
+
}, $ = (D) => {
|
|
2162
|
+
r.value = D;
|
|
2163
|
+
}, G = () => {
|
|
2164
|
+
s.value = null;
|
|
4563
2165
|
};
|
|
4564
|
-
return (D,
|
|
4565
|
-
|
|
4566
|
-
contextMenuProps: { position:
|
|
2166
|
+
return (D, k) => (oe(), ie("div", fe, [
|
|
2167
|
+
Q(D.$slots, "contextMenu", {
|
|
2168
|
+
contextMenuProps: { position: s.value, itemSections: P.value, closeContextMenu: G }
|
|
4567
2169
|
}, () => [
|
|
4568
|
-
|
|
4569
|
-
position:
|
|
4570
|
-
itemSections:
|
|
4571
|
-
closeContextMenu:
|
|
2170
|
+
V(C(Oe), {
|
|
2171
|
+
position: s.value,
|
|
2172
|
+
itemSections: P.value,
|
|
2173
|
+
closeContextMenu: G
|
|
4572
2174
|
}, null, 8, ["position", "itemSections"])
|
|
4573
2175
|
]),
|
|
4574
|
-
|
|
2176
|
+
Q(D.$slots, "breadcrumbs", {
|
|
4575
2177
|
drilldownBreadcrumbsProps: {
|
|
4576
|
-
clearDrilldownSelections:
|
|
4577
|
-
sliceDrilldownSelections:
|
|
4578
|
-
drilldownFiltersDisplayValues:
|
|
4579
|
-
drilldownDimension:
|
|
2178
|
+
clearDrilldownSelections: C(S),
|
|
2179
|
+
sliceDrilldownSelections: C(p),
|
|
2180
|
+
drilldownFiltersDisplayValues: C(y),
|
|
2181
|
+
drilldownDimension: C(u)
|
|
4580
2182
|
}
|
|
4581
2183
|
}, () => [
|
|
4582
|
-
|
|
4583
|
-
"clear-drilldown-selections":
|
|
4584
|
-
"slice-drilldown-selections":
|
|
4585
|
-
"filters-display-values":
|
|
4586
|
-
"current-dimension":
|
|
2184
|
+
V(C(he), {
|
|
2185
|
+
"clear-drilldown-selections": C(S),
|
|
2186
|
+
"slice-drilldown-selections": C(p),
|
|
2187
|
+
"filters-display-values": C(y),
|
|
2188
|
+
"current-dimension": C(u)
|
|
4587
2189
|
}, null, 8, ["clear-drilldown-selections", "slice-drilldown-selections", "filters-display-values", "current-dimension"])
|
|
4588
2190
|
]),
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
drilldownFilters:
|
|
4592
|
-
drilldownDimension:
|
|
4593
|
-
onDataPointsSelected:
|
|
4594
|
-
onContextMenu:
|
|
2191
|
+
se("div", Ce, [
|
|
2192
|
+
Q(D.$slots, "chart", {
|
|
2193
|
+
drilldownFilters: C(a),
|
|
2194
|
+
drilldownDimension: C(u),
|
|
2195
|
+
onDataPointsSelected: $,
|
|
2196
|
+
onContextMenu: A
|
|
4595
2197
|
})
|
|
4596
2198
|
])
|
|
4597
2199
|
]));
|
|
4598
2200
|
}
|
|
4599
|
-
}),
|
|
2201
|
+
}), Rn = c({
|
|
4600
2202
|
props: {
|
|
4601
2203
|
/**
|
|
4602
2204
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.bottomSlot}
|
|
@@ -4717,8 +2319,8 @@ const bu = () => {
|
|
|
4717
2319
|
*/
|
|
4718
2320
|
onDataReady: Function
|
|
4719
2321
|
},
|
|
4720
|
-
setup: (
|
|
4721
|
-
}),
|
|
2322
|
+
setup: (t) => l(Nt, t)
|
|
2323
|
+
}), Tn = c({
|
|
4722
2324
|
props: {
|
|
4723
2325
|
/** @internal */
|
|
4724
2326
|
bottomSlot: Object,
|
|
@@ -4825,8 +2427,8 @@ const bu = () => {
|
|
|
4825
2427
|
*/
|
|
4826
2428
|
onDataReady: Function
|
|
4827
2429
|
},
|
|
4828
|
-
setup: (
|
|
4829
|
-
}),
|
|
2430
|
+
setup: (t) => l(zt, t)
|
|
2431
|
+
}), Wn = c({
|
|
4830
2432
|
props: {
|
|
4831
2433
|
bottomSlot: Object,
|
|
4832
2434
|
dataOptions: {
|
|
@@ -4841,8 +2443,8 @@ const bu = () => {
|
|
|
4841
2443
|
topSlot: Object,
|
|
4842
2444
|
widgetStyleOptions: Object
|
|
4843
2445
|
},
|
|
4844
|
-
setup: (
|
|
4845
|
-
}),
|
|
2446
|
+
setup: (t) => l(Kt, t)
|
|
2447
|
+
}), En = c({
|
|
4846
2448
|
props: {
|
|
4847
2449
|
/**
|
|
4848
2450
|
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.dataOptions}
|
|
@@ -4936,8 +2538,8 @@ const bu = () => {
|
|
|
4936
2538
|
*/
|
|
4937
2539
|
onHeaderCellFormat: Function
|
|
4938
2540
|
},
|
|
4939
|
-
setup: (
|
|
4940
|
-
}),
|
|
2541
|
+
setup: (t) => l(Ut, t)
|
|
2542
|
+
}), Bn = c({
|
|
4941
2543
|
props: {
|
|
4942
2544
|
/**
|
|
4943
2545
|
* Unique identifier of the widget
|
|
@@ -5062,8 +2664,8 @@ const bu = () => {
|
|
|
5062
2664
|
*/
|
|
5063
2665
|
onDataPointsSelected: Function
|
|
5064
2666
|
},
|
|
5065
|
-
setup: (
|
|
5066
|
-
}),
|
|
2667
|
+
setup: (t) => l(Xt, t)
|
|
2668
|
+
}), $n = c({
|
|
5067
2669
|
props: {
|
|
5068
2670
|
/**
|
|
5069
2671
|
* {@inheritDoc @sisense/sdk-ui!DashboardByIdProps.dashboardOid}
|
|
@@ -5077,8 +2679,8 @@ const bu = () => {
|
|
|
5077
2679
|
*/
|
|
5078
2680
|
config: Object
|
|
5079
2681
|
},
|
|
5080
|
-
setup: (
|
|
5081
|
-
}),
|
|
2682
|
+
setup: (t) => l(Yt, t)
|
|
2683
|
+
}), kn = c({
|
|
5082
2684
|
props: {
|
|
5083
2685
|
/**
|
|
5084
2686
|
* {@inheritDoc @sisense/sdk-ui!DashboardProps.title}
|
|
@@ -5116,118 +2718,118 @@ const bu = () => {
|
|
|
5116
2718
|
*/
|
|
5117
2719
|
styleOptions: Object
|
|
5118
2720
|
},
|
|
5119
|
-
setup: (
|
|
2721
|
+
setup: (t) => l(Zt, t)
|
|
5120
2722
|
});
|
|
5121
|
-
function
|
|
5122
|
-
return
|
|
2723
|
+
function De(t) {
|
|
2724
|
+
return te.toDashboardProps(t);
|
|
5123
2725
|
}
|
|
5124
|
-
const
|
|
2726
|
+
const Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5125
2727
|
__proto__: null,
|
|
5126
|
-
toDashboardProps:
|
|
5127
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5128
|
-
e,
|
|
2728
|
+
toDashboardProps: De
|
|
2729
|
+
}, Symbol.toStringTag, { value: "Module" })), je = (t, e) => T.replaceFilters(t, e), me = (t, e) => T.addFilter(t, e), ve = (t, e) => T.addFilters(t, e), Pe = (t, e, n) => T.replaceFilter(
|
|
5129
2730
|
t,
|
|
2731
|
+
e,
|
|
5130
2732
|
n
|
|
5131
|
-
),
|
|
2733
|
+
), xe = (t, e) => T.removeFilter(t, e), Ae = (t, e) => T.removeFilters(t, e), In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5132
2734
|
__proto__: null,
|
|
5133
|
-
addFilter:
|
|
5134
|
-
addFilters:
|
|
5135
|
-
removeFilter:
|
|
5136
|
-
removeFilters:
|
|
5137
|
-
replaceFilter:
|
|
5138
|
-
replaceFilters:
|
|
5139
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5140
|
-
function
|
|
5141
|
-
return
|
|
2735
|
+
addFilter: me,
|
|
2736
|
+
addFilters: ve,
|
|
2737
|
+
removeFilter: xe,
|
|
2738
|
+
removeFilters: Ae,
|
|
2739
|
+
replaceFilter: Pe,
|
|
2740
|
+
replaceFilters: je
|
|
2741
|
+
}, Symbol.toStringTag, { value: "Module" })), we = (t) => v.toExecuteQueryParams(t), Me = (t) => v.toExecutePivotQueryParams(t);
|
|
2742
|
+
function qe(t) {
|
|
2743
|
+
return v.toChartProps(t);
|
|
5142
2744
|
}
|
|
5143
|
-
function
|
|
5144
|
-
return
|
|
2745
|
+
function Re(t) {
|
|
2746
|
+
return v.toTableProps(t);
|
|
5145
2747
|
}
|
|
5146
|
-
function
|
|
5147
|
-
return
|
|
2748
|
+
function Te(t) {
|
|
2749
|
+
return v.toPivotTableProps(t);
|
|
5148
2750
|
}
|
|
5149
|
-
function
|
|
5150
|
-
return
|
|
2751
|
+
function We(t) {
|
|
2752
|
+
return v.toChartWidgetProps(t);
|
|
5151
2753
|
}
|
|
5152
|
-
function
|
|
5153
|
-
return
|
|
2754
|
+
function Ee(t) {
|
|
2755
|
+
return v.toPivotTableWidgetProps(t);
|
|
5154
2756
|
}
|
|
5155
|
-
function
|
|
5156
|
-
return
|
|
2757
|
+
function Be(t) {
|
|
2758
|
+
return v.toTextWidgetProps(t);
|
|
5157
2759
|
}
|
|
5158
|
-
function
|
|
5159
|
-
return
|
|
2760
|
+
function $e(t) {
|
|
2761
|
+
return v.toWidgetProps(t);
|
|
5160
2762
|
}
|
|
5161
|
-
const
|
|
2763
|
+
const Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5162
2764
|
__proto__: null,
|
|
5163
|
-
toChartProps:
|
|
5164
|
-
toChartWidgetProps:
|
|
5165
|
-
toExecutePivotQueryParams:
|
|
5166
|
-
toExecuteQueryParams:
|
|
5167
|
-
toPivotTableProps:
|
|
5168
|
-
toPivotTableWidgetProps:
|
|
5169
|
-
toTableProps:
|
|
5170
|
-
toTextWidgetProps:
|
|
5171
|
-
toWidgetProps:
|
|
2765
|
+
toChartProps: qe,
|
|
2766
|
+
toChartWidgetProps: We,
|
|
2767
|
+
toExecutePivotQueryParams: Me,
|
|
2768
|
+
toExecuteQueryParams: we,
|
|
2769
|
+
toPivotTableProps: Te,
|
|
2770
|
+
toPivotTableWidgetProps: Ee,
|
|
2771
|
+
toTableProps: Re,
|
|
2772
|
+
toTextWidgetProps: Be,
|
|
2773
|
+
toWidgetProps: $e
|
|
5172
2774
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5173
2775
|
export {
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
2776
|
+
_e as AreaChart,
|
|
2777
|
+
un as AreaRangeChart,
|
|
2778
|
+
sn as AreamapChart,
|
|
2779
|
+
He as BarChart,
|
|
2780
|
+
on as BoxplotChart,
|
|
2781
|
+
Ve as CalendarHeatmapChart,
|
|
2782
|
+
rn as Chart,
|
|
2783
|
+
Rn as ChartWidget,
|
|
2784
|
+
Je as ColumnChart,
|
|
2785
|
+
Oe as ContextMenu,
|
|
2786
|
+
pn as CriteriaFilterTile,
|
|
2787
|
+
Nn as CustomWidgetsProvider,
|
|
2788
|
+
kn as Dashboard,
|
|
2789
|
+
$n as DashboardById,
|
|
2790
|
+
ln as DateRangeFilterTile,
|
|
2791
|
+
he as DrilldownBreadcrumbs,
|
|
2792
|
+
qn as DrilldownWidget,
|
|
2793
|
+
bn as FilterTile,
|
|
2794
|
+
hn as FiltersPanel,
|
|
2795
|
+
Ne as FunnelChart,
|
|
2796
|
+
nn as IndicatorChart,
|
|
2797
|
+
ze as LineChart,
|
|
2798
|
+
dn as MemberFilterTile,
|
|
2799
|
+
Ke as PieChart,
|
|
2800
|
+
Ye as PivotTable,
|
|
2801
|
+
En as PivotTableWidget,
|
|
2802
|
+
en as PolarChart,
|
|
2803
|
+
yn as RelativeDateFilterTile,
|
|
2804
|
+
Ue as ScatterChart,
|
|
2805
|
+
an as ScattermapChart,
|
|
2806
|
+
zn as SisenseContextProvider,
|
|
2807
|
+
cn as StreamgraphChart,
|
|
2808
|
+
tn as SunburstChart,
|
|
2809
|
+
Xe as Table,
|
|
2810
|
+
Wn as TableWidget,
|
|
2811
|
+
Kn as ThemeProvider,
|
|
2812
|
+
Ze as TreemapChart,
|
|
2813
|
+
Bn as Widget,
|
|
2814
|
+
Tn as WidgetById,
|
|
2815
|
+
Hn as boxWhiskerProcessResult,
|
|
2816
|
+
In as dashboardHelpers,
|
|
2817
|
+
Qn as dashboardModelTranslator,
|
|
2818
|
+
Vn as extractDimensionsAndMeasures,
|
|
2819
|
+
wn as useComposedDashboard,
|
|
2820
|
+
An as useCustomWidgets,
|
|
2821
|
+
Sn as useExecuteCsvQuery,
|
|
2822
|
+
fn as useExecuteCustomWidgetQuery,
|
|
2823
|
+
Fn as useExecutePivotQuery,
|
|
2824
|
+
gn as useExecuteQuery,
|
|
2825
|
+
On as useExecuteQueryByWidgetId,
|
|
2826
|
+
xn as useFetch,
|
|
2827
|
+
Dn as useGetDashboardModel,
|
|
2828
|
+
jn as useGetDashboardModels,
|
|
2829
|
+
Cn as useGetFilterMembers,
|
|
2830
|
+
Pn as useGetHierarchyModels,
|
|
2831
|
+
mn as useGetSharedFormula,
|
|
2832
|
+
vn as useGetWidgetModel,
|
|
2833
|
+
Mn as useJtdWidget,
|
|
2834
|
+
Ln as widgetModelTranslator
|
|
5233
2835
|
};
|