@mxtommy/kip 4.8.0 → 4.8.1
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/CHANGELOG.md +22 -0
- package/README.md +19 -17
- package/package.json +24 -21
- package/plugin/history-series.service.js +3 -0
- package/plugin/index.js +1 -1
- package/plugin/sqlite-history-storage.service.js +4 -2
- package/plugin/src/history-series.service.js +634 -0
- package/plugin/src/index.js +1322 -0
- package/plugin/src/kip-series-contract.js +31 -0
- package/plugin/src/openApi.json +855 -0
- package/plugin/src/sqlite-history-storage.service.js +1122 -0
- package/public/3rdpartylicenses.txt +569 -727
- package/public/assets/help-docs/chartplotter.md +1 -1
- package/public/assets/help-docs/history-api.md +69 -71
- package/public/assets/help-docs/menu.json +25 -7
- package/public/assets/help-docs/time-series.md +81 -0
- package/public/assets/help-docs/welcome.md +1 -1
- package/public/chunk-00hwknVI.js +1 -0
- package/public/chunk-5U8d2Ygo.js +14 -0
- package/public/chunk-AANk-NXH.js +1015 -0
- package/public/chunk-B6bEhzNR.js +1 -0
- package/public/chunk-B82ADJSs.js +1 -0
- package/public/chunk-BJz7Ij9E.js +1 -0
- package/public/chunk-BKj60jdq.js +1 -0
- package/public/chunk-BOAD0N2a.js +2 -0
- package/public/chunk-BQr-tSkv.js +1 -0
- package/public/chunk-BX6skw5k.js +1 -0
- package/public/chunk-BdokyhBM.js +1 -0
- package/public/chunk-Blokg6Ds.js +1 -0
- package/public/chunk-BoNDCNGE.js +1 -0
- package/public/chunk-Bp0MQwPM.js +1 -0
- package/public/chunk-BwOIef42.js +1 -0
- package/public/chunk-By8ZVvDx.js +2 -0
- package/public/chunk-C2VQxCXa.js +1 -0
- package/public/chunk-C6UXF7BI.js +1 -0
- package/public/chunk-CA6RRaxd.js +1 -0
- package/public/chunk-CIlfzV9R.js +1 -0
- package/public/chunk-CL2xiH57.js +1 -0
- package/public/chunk-CNMFlw_H.js +1 -0
- package/public/chunk-CNNTuNlM.js +1 -0
- package/public/chunk-CQNVyz8q.js +1 -0
- package/public/chunk-CXvG8mMq.js +1 -0
- package/public/chunk-CaD3zVfK.js +1 -0
- package/public/chunk-CkXTl3su.js +1 -0
- package/public/chunk-CpMCBDvH.js +1 -0
- package/public/chunk-CpuB_ZZz.js +2 -0
- package/public/chunk-CrBxxZCe.js +1 -0
- package/public/chunk-CwSa_BNV.js +1 -0
- package/public/chunk-D4xZ2tGB.js +39 -0
- package/public/chunk-DDqeRiB0.js +1 -0
- package/public/chunk-DE4ylhpq.js +1 -0
- package/public/chunk-DNS-qsFC.js +1 -0
- package/public/chunk-DQnoPLyC.js +1 -0
- package/public/chunk-DWLISAZi.js +1 -0
- package/public/chunk-DXkKj21H.js +1 -0
- package/public/chunk-DchvLV_Y.js +1 -0
- package/public/chunk-DjZgzSiH.js +1 -0
- package/public/chunk-DumLX5k_.js +1 -0
- package/public/chunk-Dxlia2NE.js +1 -0
- package/public/chunk-DzTTqoF_.js +1 -0
- package/public/chunk-H9_eqTYx.js +1 -0
- package/public/chunk-Ii9n-oiL.js +1 -0
- package/public/chunk-JbEkcxJm.js +2 -0
- package/public/chunk-MjWuPUhu.js +1 -0
- package/public/chunk-PheXEqie.js +1 -0
- package/public/chunk-TakPRI3t.js +2 -0
- package/public/chunk-VgxMqRPk.js +3 -0
- package/public/chunk-dgaOX1wC.js +382 -0
- package/public/chunk-hd2_AKwt.js +1 -0
- package/public/chunk-nu4vZg-z.js +1 -0
- package/public/chunk-sNakMDHi.js +1 -0
- package/public/chunk-tAiV3ARh.js +1 -0
- package/public/chunk-y1imvaA-.js +1 -0
- package/public/index.html +4 -4
- package/public/main-BAV5VDOD.js +7109 -0
- package/public/polyfills-5MJXXCNC.js +1 -0
- package/public/styles-JZSMCSRO.css +1 -0
- package/public/assets/help-docs/widget-historical-series.md +0 -110
- package/public/chunk-2TP7C66X.js +0 -5
- package/public/chunk-3SJSLBCV.js +0 -6
- package/public/chunk-5SMHTIVS.js +0 -50
- package/public/chunk-6ISGIPNP.js +0 -1
- package/public/chunk-6ZR3M3IQ.js +0 -3
- package/public/chunk-ACY7HYMZ.js +0 -4
- package/public/chunk-C23GLDFH.js +0 -62
- package/public/chunk-CB4E7PPA.js +0 -4
- package/public/chunk-DNM5XUIF.js +0 -1
- package/public/chunk-GSM7FZE2.js +0 -2
- package/public/chunk-HF7V6XFA.js +0 -2
- package/public/chunk-HUCDJ6CS.js +0 -10
- package/public/chunk-ILQQCGMJ.js +0 -5
- package/public/chunk-IXUKD73N.js +0 -5
- package/public/chunk-JMZYPL54.js +0 -2
- package/public/chunk-KG4C6HZC.js +0 -1
- package/public/chunk-LEY6MANN.js +0 -16
- package/public/chunk-NS2OV2OW.js +0 -9
- package/public/chunk-O5BTKN5D.js +0 -1
- package/public/chunk-Q32FSCUX.js +0 -1
- package/public/chunk-SHJMXSDM.js +0 -1
- package/public/chunk-T4VTC6GW.js +0 -1
- package/public/chunk-VFJD3XKT.js +0 -1
- package/public/chunk-VFZSH4TC.js +0 -1
- package/public/chunk-W6MCE3GH.js +0 -6
- package/public/main-UBENKC2D.js +0 -1
- package/public/polyfills-BWA36QKG.js +0 -1
- package/public/scripts-M6PHZBML.js +0 -14
- package/public/styles-DYEO23GZ.css +0 -1
|
@@ -39,7 +39,7 @@ The transition is automatic; no manual toggle is required. The per‑dashboard c
|
|
|
39
39
|
2. Drag the split divider and release.
|
|
40
40
|
3. Press **Save** (check icon) to persist globally, or **Cancel** (X) to revert to the previous ratio.
|
|
41
41
|
|
|
42
|
-
<img src="
|
|
42
|
+
<img src="assets/help-docs/img/splitdeviderhandle.png" alt="Resize the split" title="Split handle" width="100%">
|
|
43
43
|
|
|
44
44
|
>**Notes:**
|
|
45
45
|
>- Width changes are only committed on Save (prevents accidental layout shifts).
|
|
@@ -1,126 +1,124 @@
|
|
|
1
|
-
## Using External History
|
|
1
|
+
## Using an External History API Provider
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
If you disable KIP's built-in Time-Series features and install a compatible History API provider plugin, you can still:
|
|
4
|
+
1. Pre-seed Data Chart and Wind Trends so they show recent trends immediately.
|
|
5
|
+
2. Populate historical views for widgets in your dashboards that use numeric value paths.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
The tradeoff is that you must configure the provider plugin to capture the paths you want to chart, and it must have enough recorded data to cover your chart time span. This is not automatic when using an external provider.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
- **Requirements**: Time scale = minutes or longer.
|
|
12
|
-
- See "Configure Time Scales" below for more details.
|
|
9
|
+
The benefit is greater control, including:
|
|
10
|
+
- Long-term record keeping.
|
|
11
|
+
- Custom retention and sampling rules.
|
|
12
|
+
- Analytics or integration with tools such as Grafana.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
- **Supported**: Yes, uses fixed paths (True Wind Direction and Speed).
|
|
16
|
-
- **Requirements**: Time Span of `5 minutes` or `30 minutes`.
|
|
17
|
-
- See Wind Trends Fixed Paths below for configuration details.
|
|
14
|
+
## Which Widgets Support History?
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
NOTE: This is the optional chart that can be display in the background of the Numeric Widget.
|
|
21
|
-
- **Supported**: No. Mini charts use very short time windows (12 seconds) and skip history seeding.
|
|
22
|
-
- Mini charts start live-only for performance reasons.
|
|
16
|
+
As with KIP's built-in Time-Series, most widgets that use numeric paths support history when using an external History API provider, including Horizon, Battery Monitor, Solar, and similar numeric-based widgets. Your provider plugin must be configured to capture the paths you want to chart.
|
|
23
17
|
|
|
24
|
-
##
|
|
18
|
+
## Required Plugins and Signal K Version
|
|
25
19
|
|
|
26
|
-
You
|
|
20
|
+
You need:
|
|
21
|
+
- Signal K support for History API v2 (introduced in Signal K v2.22.1).
|
|
22
|
+
- A compatible History API provider plugin.
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
- **Purpose**: Records Signal K data to an InfluxDB v2 time-series database. Requires pre-installed InfluxDB v2.
|
|
30
|
-
- **Link**: [signalk-to-influxdb2](https://www.npmjs.com/package/signalk-to-influxdb2)
|
|
31
|
-
- **Setup**: Consult the plugin documentation for installation and configuration.
|
|
32
|
-
- **Path Configuration**: By default, records all paths. Configure filters, resolution, and other settings to match the paths you want available in KIP charts.
|
|
24
|
+
Currently, two plugins support History API v2:
|
|
33
25
|
|
|
34
|
-
###
|
|
35
|
-
- **Purpose
|
|
36
|
-
- **Link
|
|
37
|
-
- **Setup
|
|
38
|
-
- **Path Configuration
|
|
26
|
+
### 1. signalk-to-influxdb2 (v2.0.0+)
|
|
27
|
+
- **Purpose:** Records Signal K data to an InfluxDB v2 time-series database (requires InfluxDB v2).
|
|
28
|
+
- **Link:** [signalk-to-influxdb2](https://www.npmjs.com/package/signalk-to-influxdb2)
|
|
29
|
+
- **Setup:** Follow the plugin documentation for installation and configuration.
|
|
30
|
+
- **Path Configuration:** By default, records all paths. Configure filters, resolution, and related settings for the paths you want available in KIP charts.
|
|
39
31
|
|
|
32
|
+
### 2. signalk-parquet
|
|
33
|
+
- **Purpose:** Records Signal K data to Parquet files for efficient storage and querying (no external database required).
|
|
34
|
+
- **Link:** [signalk-parquet](https://www.npmjs.com/package/signalk-parquet)
|
|
35
|
+
- **Setup:** Follow the plugin documentation for installation and configuration.
|
|
36
|
+
- **Path Configuration:** You must specify which paths to record; none are recorded by default.
|
|
40
37
|
|
|
41
38
|
## How History Data Works in KIP
|
|
42
39
|
|
|
43
40
|
### History Seeding
|
|
44
41
|
When you open a chart widget with a larger time scale (minutes/hours):
|
|
45
|
-
1. KIP checks
|
|
46
|
-
2. If available and the time window allows (resolution >=
|
|
47
|
-
3. The chart
|
|
42
|
+
1. KIP checks whether history data is available through the History API.
|
|
43
|
+
2. If available and the time window allows it (resolution >= 1000 ms), KIP requests historical data points.
|
|
44
|
+
3. The chart displays the historical trend immediately.
|
|
48
45
|
|
|
49
46
|
### Live Updates
|
|
50
47
|
After history data loads:
|
|
51
|
-
- New data points arrive
|
|
52
|
-
- The chart smoothly
|
|
53
|
-
- Old
|
|
48
|
+
- New data points continue to arrive through Signal K's live WebSocket connection.
|
|
49
|
+
- The chart transitions smoothly from history to live updates.
|
|
50
|
+
- Old points are removed to maintain a rolling window based on the configured time scale.
|
|
54
51
|
|
|
55
52
|
### When History Is Not Available
|
|
56
|
-
- If
|
|
57
|
-
- The chart
|
|
58
|
-
- This is
|
|
53
|
+
- If no History API plugin is installed, or the provider reports that a path is not recorded, history requests are skipped silently.
|
|
54
|
+
- The chart shows live data only, starting from when it was opened.
|
|
55
|
+
- This is expected behavior and does not indicate an error.
|
|
59
56
|
|
|
60
|
-
## Provider Configuration
|
|
57
|
+
## Provider Plugin Configuration
|
|
61
58
|
|
|
62
|
-
For performance reasons,
|
|
59
|
+
For performance reasons, KIP charts display a maximum of 120 datapoints. KIP uses the chart's configured time window and asks the provider to return data for that window as up to 120 datapoints.
|
|
63
60
|
|
|
64
|
-
When configuring
|
|
61
|
+
When configuring provider sampling rates, ensure your rules support this behavior:
|
|
62
|
+
- Slower sampling rates produce fewer datapoints (lower visual resolution).
|
|
63
|
+
- Faster sampling rates do not produce more than 120 datapoints in KIP charts.
|
|
65
64
|
|
|
66
|
-
### Historical
|
|
65
|
+
### Widget Historical Charts
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
For the smallest fixed window (**last 15 minutes**), collect enough samples to provide useful resolution. A sampling interval around 7.5 seconds is ideal; 15 seconds is also usable.
|
|
69
68
|
|
|
70
69
|
### Wind Trends Fixed Paths
|
|
71
70
|
|
|
72
71
|
The Wind Trends widget uses two fixed Signal K paths:
|
|
73
|
-
- **True Wind Direction
|
|
74
|
-
- **True Wind Speed
|
|
72
|
+
- **True Wind Direction:** `environment.wind.directionTrue`
|
|
73
|
+
- **True Wind Speed:** `environment.wind.speedTrue`
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
To display Wind Trends history, both paths **must be captured by your selected History API plugin**.
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
Choose a sampling rate that supports chart durations of 5 and 30 minutes.
|
|
79
78
|
|
|
80
79
|
## Limitations
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
To seed charts with historical data, you usually need to manually configure your provider to collect the required paths. Unlike KIP's built-in Time-Series, this is not automatic.
|
|
83
82
|
|
|
84
83
|
## Troubleshooting
|
|
85
84
|
|
|
86
85
|
### History Data Is Not Showing
|
|
87
86
|
|
|
88
|
-
**Check 1: Are the
|
|
89
|
-
- Confirm
|
|
87
|
+
**Check 1: Are the technical requirements met?**
|
|
88
|
+
- Confirm Signal K server v2.22.1 or later is installed.
|
|
90
89
|
|
|
91
|
-
**Check 2: Is
|
|
92
|
-
- Confirm
|
|
93
|
-
- Verify
|
|
90
|
+
**Check 2: Is a History API plugin installed?**
|
|
91
|
+
- Confirm a History API plugin is installed and only one provider plugin is enabled.
|
|
92
|
+
- Verify the plugin is running without errors (check server logs).
|
|
94
93
|
|
|
95
|
-
**Check 3: Are
|
|
96
|
-
- Open
|
|
97
|
-
- Confirm
|
|
94
|
+
**Check 3: Are paths configured in the plugin?**
|
|
95
|
+
- Open plugin configuration.
|
|
96
|
+
- Confirm the paths you are charting (for example, `navigation.speedThroughWater`) are included in the capture list.
|
|
98
97
|
|
|
99
98
|
**Check 4: Is there historical data available?**
|
|
100
|
-
- If the plugin was
|
|
101
|
-
- Charts
|
|
102
|
-
- Allow
|
|
99
|
+
- If the plugin was installed recently, data is only available from that point onward.
|
|
100
|
+
- Charts cannot display history for periods before the plugin was enabled or before the path was configured.
|
|
101
|
+
- Allow time for data to accumulate before expecting deeper history.
|
|
103
102
|
|
|
104
103
|
**Check 5: Is the chart time scale eligible?**
|
|
105
104
|
- Very short time scales (seconds) skip history seeding for performance.
|
|
106
|
-
- Use time scales of **minutes or longer**
|
|
107
|
-
|
|
108
|
-
**Check 6: Are there any network or permission issues?**
|
|
109
|
-
- Confirm that KIP can reach the Signal K server's History-API endpoint. Use the OpenApi link in the Server Admin pages to the test.
|
|
110
|
-
- Check browser console logs (F12) for any HTTP errors from history requests.
|
|
105
|
+
- Use chart time scales of **minutes or longer** for history seeding.
|
|
111
106
|
|
|
107
|
+
**Check 6: Are there network or permission issues?**
|
|
108
|
+
- Confirm KIP can reach the Signal K server History API endpoint.
|
|
109
|
+
- Use the OpenAPI link in Signal K Server Admin pages to test endpoint availability.
|
|
110
|
+
- Check browser console logs (F12) for HTTP errors from history requests.
|
|
112
111
|
|
|
113
112
|
## Next Steps
|
|
114
113
|
|
|
115
|
-
1. Verify that a History
|
|
114
|
+
1. Verify that a History API plugin is installed on your Signal K server.
|
|
116
115
|
2. Configure the plugin to capture the paths you want to chart.
|
|
117
|
-
3. Wait for plugin to
|
|
116
|
+
3. Wait for the plugin to collect enough data to fill your chart time span.
|
|
118
117
|
4. Open a Data Chart or Wind Trends widget with a time scale of minutes or longer.
|
|
119
|
-
5.
|
|
120
|
-
6. For more details, consult
|
|
121
|
-
|
|
118
|
+
5. Let the chart load; history appears when available.
|
|
119
|
+
6. For more details, consult plugin documentation and Signal K community resources.
|
|
122
120
|
|
|
123
121
|
## Questions or Issues?
|
|
124
122
|
|
|
125
|
-
- Refer to
|
|
126
|
-
- For general questions or issues, see
|
|
123
|
+
- Refer to plugin and History API documentation for provider-specific setup and troubleshooting.
|
|
124
|
+
- For general questions or issues, see the Contact-Us help page. The Signal K community is active on Discord and GitHub.
|
|
@@ -6,16 +6,34 @@
|
|
|
6
6
|
{ "title": "Chartplotter Mode", "file": "chartplotter.md" },
|
|
7
7
|
{ "title": "Zones, Notifications and Highlights", "file": "zones.md" },
|
|
8
8
|
{ "title": "Digital Switching and PUT", "file": "putcontrols.md" },
|
|
9
|
-
{ "title": "Historical Widget Data", "file": "
|
|
9
|
+
{ "title": "Historical Widget Data", "file": "time-series.md" },
|
|
10
10
|
{
|
|
11
11
|
"title": "Integrations",
|
|
12
12
|
"items": [
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
|
|
13
|
+
{
|
|
14
|
+
"title": "Node-RED (Getting Started)",
|
|
15
|
+
"file": "nodered-control-flows.md"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "The Embed Page Viewer",
|
|
19
|
+
"file": "embedwidget.md"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"title": "History-API Provider",
|
|
23
|
+
"file": "history-api.md"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": "InfluxDB and Signal K",
|
|
27
|
+
"file": "influxdb.md"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Using Grafana",
|
|
31
|
+
"file": "grafana.md"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "Contributing Widgets",
|
|
35
|
+
"file": "contributing-widgets.md"
|
|
36
|
+
}
|
|
19
37
|
]
|
|
20
38
|
},
|
|
21
39
|
{
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
## Historical Widget Data
|
|
2
|
+
|
|
3
|
+
KIP is primarily designed for live sailing data. To make charts useful immediately and provide easy access to recent widget history, KIP includes a purpose-built history feature called **Time-Series**.
|
|
4
|
+
|
|
5
|
+
The **Time-Series** feature manages data capture and pruning. It uses that data to:
|
|
6
|
+
1. Pre-seed Data Chart and Wind Trends so they show recent trends immediately.
|
|
7
|
+
2. Automatically provide a historical view for widgets in your dashboards that use numeric value paths.
|
|
8
|
+
|
|
9
|
+
It is meant for users who need simple, short-term history with:
|
|
10
|
+
* No extra configuration
|
|
11
|
+
* No plugin to install
|
|
12
|
+
* No data capture, storage rules, or retention policies to manage
|
|
13
|
+
|
|
14
|
+
It is designed for quick, hassle-free trend history, not data engineering.
|
|
15
|
+
|
|
16
|
+
## Time-Series
|
|
17
|
+
- Works automatically with your dashboards and widgets.
|
|
18
|
+
- Stores only the data KIP needs for widget history and chart startup.
|
|
19
|
+
- Keeps a small rolling history and removes older data.
|
|
20
|
+
- If you change widget configuration, KIP automatically adds, updates, or removes capture and retention rules.
|
|
21
|
+
|
|
22
|
+
### What Time-Series Does Not Do
|
|
23
|
+
- KIP’s built-in Time-Series is not a full data-logging solution. You cannot manually define capture paths, sampling policies, long-term retention, or advanced rules. For that, use another plugin with an external History API provider (see [History-API Provider](#/help/history-api.md).
|
|
24
|
+
- The widget history dialog offers **a fixed set** of time windows: the last 15 minutes, 1 hour, 8 hours, or 24 hours. If you need more flexible analytics, use purpose-built platforms such as Grafana.
|
|
25
|
+
|
|
26
|
+
## Accessing Time-Series
|
|
27
|
+
Access the Time-Series chart directly from a locked dashboard:
|
|
28
|
+
|
|
29
|
+
- **Touch devices:** Two-finger tap a numeric value widget.
|
|
30
|
+
- **Desktop / mouse:** Right-click a numeric value widget or two-finger click on trackpads.
|
|
31
|
+
|
|
32
|
+
The Time-Series chart displays recorded data only (no live stream overlay).
|
|
33
|
+
|
|
34
|
+
## Supported Widgets
|
|
35
|
+
Most widgets that use numeric paths support Time-Series, including Horizon, Battery Monitor, Solar, and similar numeric-based widgets.
|
|
36
|
+
|
|
37
|
+
### Chart Type Widgets Support
|
|
38
|
+
Time-Series automatically captures data according to each chart widget configuration and uses it to seed charts.
|
|
39
|
+
|
|
40
|
+
#### Data Chart Widget
|
|
41
|
+
- **Supported:** Yes, fully seeded with history data.
|
|
42
|
+
- **Requirements:** Time scale must be minutes or longer.
|
|
43
|
+
|
|
44
|
+
#### Wind Trends Widget
|
|
45
|
+
- **Supported:** Yes, fully seeded with history data.
|
|
46
|
+
- **Requirements:** Time span of `5 minutes` or `30 minutes`.
|
|
47
|
+
|
|
48
|
+
#### Numeric Widget's Mini Chart
|
|
49
|
+
- **Supported:** No. Mini charts use very short time windows (12 seconds) and skip history seeding.
|
|
50
|
+
- Mini charts start live-only for performance reasons.
|
|
51
|
+
|
|
52
|
+
## Time-Series Technical Requirements
|
|
53
|
+
- Node.js v20.5.0+: The built-in automatic Time-Series feature (integrated data management) uses `node:sqlite`, released in Node.js v20.5.0.
|
|
54
|
+
- Signal K v2.22.1+: The history query service uses History API v2, introduced in Signal K v2.22.1.
|
|
55
|
+
|
|
56
|
+
## Configuration Options
|
|
57
|
+
>The Time-Series feature is designed to work automatically without configuration. However, you can customize its behavior or disable it if you prefer not to use this feature or to use a different History API provider.
|
|
58
|
+
|
|
59
|
+
There are two sources of configuration:
|
|
60
|
+
1. KIP Plugin: found in Signal K's Admin, Server -> Plugin Config page under KIP. Use these options to manually toggle the server-side data capture and/or history provider features. Note that using the KIP Application options will also automatically turn off the server-side plugin features, so you don't need to configure both unless you are encountering issues.
|
|
61
|
+
2. KIP Application: Configuration options are found in **Settings → Options → Display** under the Widget Historical Data section.
|
|
62
|
+
|
|
63
|
+
You can:
|
|
64
|
+
- Disable KIP's automatic Time-Series in favor of a History API provider of your choice (see [History-API Provider](#/help/history-api.md) in the Integrations Help menu for details).
|
|
65
|
+
- Disable access to widget historical chart dialogs (disables two-finger tap, mouse right-click, or two-finger click on trackpads).
|
|
66
|
+
|
|
67
|
+
If you want to completely disable the history feature, under the **Settings → Options → Display** tab in the Widget Historical Data group:
|
|
68
|
+
- Select the "Other: Use a different History API provider and configure data logging manually" option. This stops the plugin's data capture and historical query services.
|
|
69
|
+
- Toggle the "Disable widget historical charts" switch. This disables pointer events that open the chart dialog window.
|
|
70
|
+
|
|
71
|
+
### Using Other History Provider For Greater Flexibility(advanced)
|
|
72
|
+
|
|
73
|
+
KIP's built-in Time-Series feature can be disabled, allowing you to register and use other History API provider-compatible plugin instead.
|
|
74
|
+
You then manually manage data capture and retention in that provider.
|
|
75
|
+
|
|
76
|
+
See [History-API Provider](#/help/history-api.md) for details.
|
|
77
|
+
|
|
78
|
+
## Questions or Issues?
|
|
79
|
+
|
|
80
|
+
- Refer to [History-API Provider](#/help/history-api.md) to learn how to use other History API providers.
|
|
81
|
+
- For general questions or issues, see the Contact-Us help page. The KIP community is active on Discord and GitHub.
|
|
@@ -13,7 +13,7 @@ KIP supports multiple input modes for seamless navigation across devices.
|
|
|
13
13
|
> Note that the words Touch and Tap are synonymous with mouse click.
|
|
14
14
|
|
|
15
15
|
## General Layout
|
|
16
|
-
<img src="
|
|
16
|
+
<img src="assets/help-docs/img/general-layout.png" alt="Sidebar Menus" title="Sidebar Menus" width="100%">
|
|
17
17
|
|
|
18
18
|
1. Actions menu
|
|
19
19
|
2. *Fullscreen toggle button
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {C,e as e$1}from'./chunk-B6bEhzNR.js';import {g as ge$1}from'./chunk-TakPRI3t.js';import {e9 as a,d1 as Hj,w,du as p,aS as De,bu as ut,aY as xe,$ as $j,v as vt,D as Dt,F as Fa,dn as ge,a_ as Gp,cv as G,cw as z,dx as n$1,J as JD,dC as x,c as $h,cn as wd,_ as _w,B as Bh,e as EE,M as Mw,f as eg,K as Kw,P as Pi,T as TT,u as ul}from'./main-BAV5VDOD.js';import {c,e}from'./chunk-Dxlia2NE.js';var ie=["acSvg"];function re(l,e){l&1&&(Pi(0,"div",3)(1,"div",4),TT(2,"No AC buses detected"),ul(),Pi(3,"div",5),TT(4,"Check Signal K AC paths or select buses in widget settings."),ul()());}var Y=class l{static AC_DESCRIPTOR=a("widget-ac");static SELF_ROOT_PATH=(()=>{let e=l.AC_DESCRIPTOR?.selfRootPath;if(!e)throw new Error("[WidgetAcComponent] Descriptor missing or selfRootPath not set; check widget registration.");return e})();static ROOT_PATTERN=`${l.SELF_ROOT_PATH}.*`;static ROOT_PREFIX=`${l.SELF_ROOT_PATH}.`;static VIEWBOX_WIDTH=200;static CARD_HEIGHT=100;static COMPACT_CARD_HEIGHT=100;static CARD_GAP=8;static PATH_BATCH_WINDOW_MS=500;static RESERVED_AC_AGGREGATE_IDS=new Set(["totalCurrent","totalPower"]);static DEFAULT_CONFIG={color:"contrast",ignoreZones:false,ac:{trackedDevices:[],optionsById:{}}};id=Hj.required();type=Hj.required();theme=Hj.required();renderMode=Hj(null);runtime=w(p);data=w(De);units=w(ut);destroyRef=w(xe);svgRef=$j.required("acSvg");svg;layer;pendingPathUpdates=new Map;pathBatchTimerId=null;initialPathPaintDone=false;renderFrameId=null;pendingRenderSnapshot=null;discoveredBusIds=vt([]);trackedDevices=vt([]);optionsById=vt({});cardMode=vt({displayMode:"full",metrics:["line1Voltage","line1Current","line1Frequency","line2Voltage"]});busesByKey=vt({});visibleBusKeys=Dt(()=>{let e=this.trackedDevices();if(e.length)return e.map(r=>r.key);let i=this.busesByKey(),t=new Set(this.discoveredBusIds());return Object.keys(i).filter(r=>{let s=i[r];return !!s&&t.has(s.id)}).sort((r,s)=>r.localeCompare(s))});visibleBuses=Dt(()=>{let e=this.visibleBusKeys(),i=this.busesByKey();return e.map(t=>i[t]).filter(t=>!!t)});hasBuses=Dt(()=>this.visibleBuses().length>0);activeDisplayMode=Dt(()=>this.renderMode()??this.cardMode().displayMode??"full");isCompactCardMode=Dt(()=>this.activeDisplayMode()==="compact");colorRole=Dt(()=>this.runtime.options()?.color??"contrast");ignoreZones=Dt(()=>this.runtime.options()?.ignoreZones??false);displayLabel=Dt(()=>{let e=this.visibleBuses();return e.length!==1?"AC Buses":this.resolveTitleText(e[0])});labelColor=Dt(()=>{let e=this.theme();return e?c(this.colorRole(),e).dim:"var(--kip-contrast-dim-color)"});widgetColors=Dt(()=>{let e=this.theme();return e?c(this.colorRole(),e):null});displayModels=Dt(()=>{let e$1=this.visibleBuses(),i=this.theme(),t=this.widgetColors(),r=this.ignoreZones(),s=new Map;e$1.forEach(n=>s.set(n.id,(s.get(n.id)??0)+1));let c=new Set([...s.entries()].filter(([,n])=>n>1).map(([n])=>n)),a={};for(let n of e$1){let d=n.deviceKey??n.id,o=!!n.source&&c.has(n.id),h=this.resolveMostSevereState(n.line1VoltageState??null,n.line1CurrentState??null,n.line2VoltageState??null,n.line2CurrentState??null,n.line3VoltageState??null,n.line3CurrentState??null,n.modeState??null),v=this.resolveMostSevereState(n.line1VoltageState??null,n.line1CurrentState??null,n.line1FrequencyState??null),T=this.resolveMostSevereState(n.line2VoltageState??null,n.line2CurrentState??null,n.line3VoltageState??null,n.line3CurrentState??null),[M,I]=this.buildMetricRows(n);a[d]={id:n.id,titleText:this.resolveTitleText(n),modeText:this.isCompactCardMode()?"":this.resolveModeText(n),busText:this.isCompactCardMode()?"":o?n.source??"-":n.associatedBus||n.location||"-",metricsLineOne:M,metricsLineTwo:I,stateBarColor:e(h,t?.dim??"var(--kip-contrast-color)",i,r),titleTextColor:e(h,"var(--kip-contrast-color)",i,r),metaTextColor:e(n.modeState??null,"var(--kip-contrast-dim-color)",i,r),primaryMetricsTextColor:e(v,"var(--kip-contrast-color)",i,r),secondaryMetricsTextColor:e(T,"var(--kip-contrast-color)",i,r)};}return a});constructor(){Fa(()=>{let t=this.runtime.options();t&&ge(()=>this.applyConfig(t));}),Fa(()=>{let t=this.displayModels(),r=this.visibleBuses(),s=this.widgetColors();!this.svg||!s||this.requestRender({buses:r,displayModels:t,widgetColors:s});});let e=[this.data.subscribePathTreeWithInitial(l.ROOT_PATTERN)],i=false;for(let t of e)if(t.initial.length){i=true;for(let r of t.initial)this.enqueuePathUpdate(r,true);}i&&(this.flushPendingPathUpdates(),this.initialPathPaintDone=true);for(let t of e)t.live$.pipe(Gp(this.destroyRef)).subscribe(r=>this.enqueuePathUpdate(r));}ngAfterViewInit(){this.initializeSvg(),this.requestRender();}ngOnDestroy(){this.pathBatchTimerId!==null&&(clearTimeout(this.pathBatchTimerId),this.pathBatchTimerId=null),this.renderFrameId!==null&&(cancelAnimationFrame(this.renderFrameId),this.renderFrameId=null),this.pendingRenderSnapshot=null;}initializeSvg(){this.svg=ge$1(this.svgRef().nativeElement),this.svg.attr("viewBox",`0 0 ${l.VIEWBOX_WIDTH} ${l.CARD_HEIGHT}`).attr("preserveAspectRatio","xMidYMid meet").attr("role","img").attr("aria-label","AC View"),this.layer=this.svg.append("g").attr("class","ac-layer");}applyConfig(e){let i=this.resolveAcConfig(e);this.trackedDevices.set(i.trackedDevices??[]),this.reprojectSnapshotsToDeviceKeys(i.trackedDevices??[]),this.optionsById.set(i.optionsById),this.cardMode.set(this.normalizeCardMode(i.cardMode));}reprojectSnapshotsToDeviceKeys(e){if(!e.length)return;let i=new Map;e.forEach(t=>{let r=i.get(t.id)??[];r.push(t.key),i.set(t.id,r);}),this.busesByKey.update(t=>{let r=t,s=false;return i.forEach((c,a)=>{let n=t[a];if(n){for(let d of c){if(t[d])continue;let o=e.find(h=>h.key===d);s||(r=G({},t),s=true),r[d]=z(G({},n),{source:o?.source??null,deviceKey:d});}s&&r[a]?.deviceKey===void 0&&delete r[a];}}),s?r:t});}resolveAcConfig(e){let i=e.ac;return {trackedDevices:this.normalizeAcTrackedDevices(i?.trackedDevices),optionsById:this.normalizeOptionsById(i?.optionsById),cardMode:this.normalizeCardMode(i?.cardMode)}}normalizeAcTrackedDevices(e){if(!Array.isArray(e))return [];let i=new Map;return e.forEach(t=>{if(!t||typeof t!="object")return;let r=t,s=this.normalizeOptionalString(r.id),c=this.normalizeOptionalString(r.source);if(!s||!c||l.RESERVED_AC_AGGREGATE_IDS.has(s))return;let a=this.normalizeOptionalString(r.key)??`${s}||${c}`;i.set(a,{id:s,source:c,key:a});}),[...i.values()].sort((t,r)=>t.key.localeCompare(r.key))}buildIdToDeviceKeysMap(){let e=new Map;return this.trackedDevices().forEach(i=>{let t=e.get(i.id)??[];t.push(i.key),e.set(i.id,t);}),e}normalizeCardMode(e){let i=e&&typeof e=="object"?e:null,t=this.normalizeStringList(i?.metrics);return {displayMode:i?.displayMode==="compact"?"compact":"full",metrics:t.length?t:["line1Voltage","line1Current","line1Frequency","line2Voltage"]}}normalizeStringList(e){if(!Array.isArray(e))return [];let i=new Set;return e.forEach(t=>{if(typeof t!="string")return;let r=t.trim();r.length>0&&i.add(r);}),[...i].sort((t,r)=>t.localeCompare(r))}normalizeOptionsById(e){if(!e||typeof e!="object")return {};let i={};return Object.entries(e).forEach(([t])=>{let r=this.normalizeOptionalString(t);r&&(i[r]={});}),i}normalizeOptionalString(e){if(typeof e!="string")return null;let i=e.trim();return i.length>0?i:null}enqueuePathUpdate(e,i=false){let t=this.parsePath(e.path);if(!t)return;let r=e.update?.data?.value??null,s=e.update?.state??null;if(this.pendingPathUpdates.set(`${t.id}::${t.key}`,{id:t.id,key:t.key,value:r,state:s}),!i){if(!this.initialPathPaintDone){this.initialPathPaintDone=true,this.flushPendingPathUpdates();return}this.pathBatchTimerId===null&&(this.pathBatchTimerId=setTimeout(()=>{this.pathBatchTimerId=null,this.flushPendingPathUpdates();},l.PATH_BATCH_WINDOW_MS));}}flushPendingPathUpdates(){if(!this.pendingPathUpdates.size)return;let e=Array.from(this.pendingPathUpdates.values());this.pendingPathUpdates.clear(),new Set(e.map(r=>r.id)).forEach(r=>this.trackDiscoveredBus(r));let t=this.buildIdToDeviceKeysMap();this.busesByKey.update(r=>{let s=r,c=false;for(let a of e){let n=t.get(a.id),d=n?.length?n:[a.id];for(let o of d){let h=!!n?.length,v=h?this.trackedDevices().find(Z=>Z.key===o):null,T=s[o]??{id:a.id,source:v?.source??null,deviceKey:h?o:void 0},M=G({},T);this.applyValue(M,a.key,a.value,a.state)&&(c||(s=G({},s),c=true),s[o]=M);}}return c?s:r});}parsePath(e){if(!e.startsWith(l.ROOT_PREFIX))return null;let i=e.slice(l.ROOT_PREFIX.length),t=i.indexOf(".");return t<=0||t===i.length-1?null:{id:i.slice(0,t),key:i.slice(t+1)}}normalizeMetricKey(e){let i=e.match(/^phase\.([^.]+)\.(current|frequency|lineNeutralVoltage|realPower)$/);if(i){let t=this.resolveLineKey(i[1]);if(!t)return null;let r=i[2];return r==="current"?`${t}.current`:r==="frequency"?`${t}.frequency`:r==="lineNeutralVoltage"?`${t}.voltage`:`${t}.realPower`}return e==="total.realPower"?"power":e}resolveLineKey(e){let i=e.trim().toLowerCase();return ["0","1","l1","line1","phase1","a"].includes(i)?"line1":["2","l2","line2","phase2","b"].includes(i)?"line2":["3","l3","line3","phase3","c"].includes(i)?"line3":null}trackDiscoveredBus(e){let i=this.discoveredBusIds();i.includes(e)||this.discoveredBusIds.set([...i,e].sort((t,r)=>t.localeCompare(r)));}applyValue(e,i,t,r){let s=this.normalizeMetricKey(i);if(!s)return false;switch(s){case "name":return this.setValue(e,"name",this.toStringValue(t));case "location":return this.setValue(e,"location",this.toStringValue(t));case "associatedBus":return this.setValue(e,"associatedBus",this.toStringValue(t));case "mode":return this.setMetricValue(e,"mode","modeState",this.toStringValue(t),r);case "voltage":return this.setMetricValue(e,"line1Voltage","line1VoltageState",this.toNumber(t,"V"),r);case "current":return this.setMetricValue(e,"line1Current","line1CurrentState",this.toNumber(t,"A"),r);case "frequency":return this.setMetricValue(e,"line1Frequency","line1FrequencyState",this.toNumber(t,"Hz"),r);case "line1.voltage":return this.setMetricValue(e,"line1Voltage","line1VoltageState",this.toNumber(t,"V"),r);case "line1.current":return this.setMetricValue(e,"line1Current","line1CurrentState",this.toNumber(t,"A"),r);case "line1.frequency":return this.setMetricValue(e,"line1Frequency","line1FrequencyState",this.toNumber(t,"Hz"),r);case "line1.realPower":return this.setMetricValue(e,"power","line1CurrentState",this.toNumber(t,"W"),r);case "line2.voltage":return this.setMetricValue(e,"line2Voltage","line2VoltageState",this.toNumber(t,"V"),r);case "line2.current":return this.setMetricValue(e,"line2Current","line2CurrentState",this.toNumber(t,"A"),r);case "line2.frequency":return this.setMetricValue(e,"line2Frequency","line2FrequencyState",this.toNumber(t,"Hz"),r);case "line2.realPower":return this.setMetricValue(e,"power","line2CurrentState",this.toNumber(t,"W"),r);case "line3.voltage":return this.setMetricValue(e,"line3Voltage","line3VoltageState",this.toNumber(t,"V"),r);case "line3.current":return this.setMetricValue(e,"line3Current","line3CurrentState",this.toNumber(t,"A"),r);case "line3.frequency":return this.setMetricValue(e,"line3Frequency","line3FrequencyState",this.toNumber(t,"Hz"),r);case "line3.realPower":return this.setMetricValue(e,"power","line3CurrentState",this.toNumber(t,"W"),r);case "power":return this.setMetricValue(e,"power","line1CurrentState",this.toNumber(t,"W"),r);default:return false}}setValue(e,i,t){return Object.is(e[i],t)?false:(e[i]=t,true)}setMetricValue(e,i,t,r,s){let c=!Object.is(e[i],r),a=!Object.is(e[t],s);return !c&&!a?false:(e[i]=r,e[t]=s,true)}requestRender(e){let i=this.widgetColors();!this.svg||!i||(this.pendingRenderSnapshot=e??{buses:this.visibleBuses(),displayModels:this.displayModels(),widgetColors:i},this.renderFrameId===null&&(this.renderFrameId=requestAnimationFrame(()=>{this.renderFrameId=null;let t=this.pendingRenderSnapshot;this.pendingRenderSnapshot=null,t&&this.render(t);})));}render(e){if(!this.layer||!this.svg)return;let i=this.isCompactCardMode(),t=i?C:e$1,r=i?l.COMPACT_CARD_HEIGHT:l.CARD_HEIGHT,s=e.buses.map((o,h)=>({key:o.deviceKey??o.id,bus:o,y:h*(r+l.CARD_GAP)})),c=s.length?s[s.length-1].y+r:r;this.svg.attr("viewBox",`0 0 ${l.VIEWBOX_WIDTH} ${c}`);let a=this.layer.selectAll("g.ac-card").data(s,o=>o.key),n=a.enter().append("g").attr("class","ac-card");n.append("rect").attr("class","ac-state-bar"),n.append("text").attr("class","ac-title"),n.append("text").attr("class","ac-id"),n.append("text").attr("class","ac-mode"),n.append("text").attr("class","ac-bus"),n.append("text").attr("class","ac-metrics-1"),n.append("text").attr("class","ac-metrics-2");let d=n.merge(a);d.attr("transform",o=>`translate(0, ${o.y})`),d.select("rect.ac-state-bar").attr("x",1.5).attr("y",1.5).attr("rx",t.stateBarCornerRadius).attr("ry",t.stateBarCornerRadius).attr("width",3).attr("height",r-3).attr("fill",o=>e.displayModels[o.key]?.stateBarColor??e.widgetColors.dim),e.buses.length>1?d.select("text.ac-title").attr("x",t.titleX).attr("y",t.titleY).attr("font-size",t.titleFontSize).attr("fill",o=>e.displayModels[o.key]?.titleTextColor??"var(--kip-contrast-color)").text(o=>e.displayModels[o.key]?.titleText??this.resolveTitleText(o.bus)):d.select("text.ac-title").text(""),d.select("text.ac-id").attr("x",t.idX).attr("y",t.idY).attr("text-anchor","end").attr("font-size",t.idFontSize).attr("fill","var(--kip-contrast-dim-color)").text(o=>o.bus.id),d.select("text.ac-mode").attr("x",t.metaLeftX).attr("y",t.metaY).attr("font-size",t.metaFontSize).attr("opacity",.8).attr("fill",o=>e.displayModels[o.key]?.metaTextColor??"var(--kip-contrast-dim-color)").text(o=>e.displayModels[o.key]?.modeText??""),d.select("text.ac-bus").attr("x",t.metaRightX).attr("y",t.metaY).attr("text-anchor","end").attr("font-size",t.metaFontSize).attr("opacity",.8).attr("fill",o=>e.displayModels[o.key]?.metaTextColor??"var(--kip-contrast-dim-color)").text(o=>e.displayModels[o.key]?.busText??""),d.select("text.ac-metrics-1").attr("x",t.lineOneX).attr("y",t.lineOneY).attr("font-size",t.lineOneFontSize).attr("fill",o=>e.displayModels[o.key]?.primaryMetricsTextColor??"var(--kip-contrast-color)").text(o=>e.displayModels[o.key]?.metricsLineOne??""),d.select("text.ac-metrics-2").attr("x",t.lineTwoX).attr("y",t.lineTwoY).attr("font-size",t.lineTwoFontSize).attr("opacity",.85).attr("fill",o=>e.displayModels[o.key]?.secondaryMetricsTextColor??"var(--kip-contrast-color)").text(o=>e.displayModels[o.key]?.metricsLineTwo??""),a.exit().remove();}displayName(e){return e.name?.trim()||e.id}resolveTitleText(e){return e.name||`AC ${e.id}`}resolveModeText(e){return e.mode?`Mode ${e.mode}`:"Mode -"}buildMetricRows(e){let i=this.cardMode(),t=(i.metrics.length?i.metrics:l.DEFAULT_CONFIG.ac?.cardMode?.metrics??[]).map(c=>this.toMetricLabel(c,e)).filter(c=>!!c);if(!t.length)return ["L1 - - -","L2 - - L3 - -"];let r=t.slice(0,2).join(" "),s=t.slice(2,4).join(" ");return [r||" ",s||" "]}toMetricLabel(e,i){switch(e){case "line1Voltage":return `L1V ${this.formatValue(i.line1Voltage,"V")}`;case "line1Current":return `L1A ${this.formatValue(i.line1Current,"A")}`;case "line1Frequency":return `L1Hz ${this.formatValue(i.line1Frequency,"Hz")}`;case "line2Voltage":return `L2V ${this.formatValue(i.line2Voltage,"V")}`;case "line2Current":return `L2A ${this.formatValue(i.line2Current,"A")}`;case "line2Frequency":return `L2Hz ${this.formatValue(i.line2Frequency,"Hz")}`;case "line3Voltage":return `L3V ${this.formatValue(i.line3Voltage,"V")}`;case "line3Current":return `L3A ${this.formatValue(i.line3Current,"A")}`;case "line3Frequency":return `L3Hz ${this.formatValue(i.line3Frequency,"Hz")}`;default:return null}}formatValue(e,i){return e==null||Number.isNaN(e)?"-":`${e.toFixed(1)} ${i}`}toStringValue(e){return typeof e=="string"?e:null}resolveMostSevereState(...e){return e.some(i=>i===n$1.Alert)?n$1.Alert:e.some(i=>i===n$1.Alarm)?n$1.Alarm:e.some(i=>i===n$1.Warn)?n$1.Warn:e.some(i=>i===n$1.Normal)?n$1.Normal:null}toNumber(e,i){if(e==null||typeof e=="boolean")return null;let t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t))return null;let r=this.units.convertToUnit(i,t);return typeof r=="number"&&Number.isFinite(r)?r:null}static \u0275fac=function(i){return new(i||l)};static \u0275cmp=JD({type:l,selectors:[["widget-ac"]],viewQuery:function(i,t){i&1&&eg(t.svgRef,ie,5),i&2&&Kw();},inputs:{id:[1,"id"],type:[1,"type"],theme:[1,"theme"],renderMode:[1,"renderMode"]},decls:4,vars:3,consts:[["acSvg",""],[3,"text","color"],["aria-hidden","false",1,"ac-svg"],[1,"ac-empty"],[1,"ac-empty-title"],[1,"ac-empty-sub"]],template:function(i,t){i&1&&($h(0,"widget-title",1),wd(),$h(1,"svg",2,0),_w(3,re,5,0,"div",3)),i&2&&(Bh("text",t.displayLabel())("color",t.labelColor()),EE(3),Mw(t.hasBuses()?-1:3));},dependencies:[x],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;position:relative;overflow:hidden}.ac-svg[_ngcontent-%COMP%]{display:block;position:absolute;left:0;right:0;top:15%;height:85%;width:100%;overflow:hidden;z-index:20;padding:0 10px 10px}.ac-empty[_ngcontent-%COMP%]{position:absolute;inset:0;margin:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;color:var(--mat-sys-on-surface);background:color-mix(in srgb,var(--kip-widget-card-background-color) 92%,transparent)}.ac-empty-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600}.ac-empty-sub[_ngcontent-%COMP%]{font-size:14px;opacity:.8}"]})};export{Y as WidgetAcComponent};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {w as w$1,n as G$1,N,i as ir,W as Wp,E as Em,D as Dt,J as JD,y as yt,b as wt,O as Op,o as eu,p as R,r as f,P as Pi,k as Qh,u as ul,T as TT,c as $h,e as EE,t as pT,B as Bh,x as DA,a as G$2,A as re,C as Ff,H as Dr,I as zA,L as Fp,S as ca,U as Kh,V as L,X as xw,Y as Aw,Z as TI,a0 as _,a1 as vA,a2 as Jt,a3 as Xt$1,a4 as Zt$1,a5 as st,_ as _w,M as Mw,a6 as Lr,a7 as Gj,a8 as H,a9 as ru,aa as N$1,ab as te,ac as Mr,ad as Qe,ae as be,af as Tu,ag as bu,ah as nn,ai as Ar,aj as zm,ak as nw,al as Zj,am as LT,an as Hh,s as sg,ao as ue,ap as Ki,aq as Bn,ar as S,as as ke$1,at as Tp,au as be$1,av as _t,aw as Cu,ax as ry,ay as lv,az as Yj,h as Fw,l as ud,g as qw,m as dd,aA as gg,d as ig,aB as gr,aC as L$1,aD as Ce$1,aE as Sr,v as vt,aF as Pr,aG as tD,aH as j,aI as ms,aJ as wm,aK as wr,aL as me,aM as At$1,aN as wt$1}from'./main-BAV5VDOD.js';function Pe(o){let t=o.cloneNode(true),e=t.querySelectorAll("[id]"),i=o.nodeName.toLowerCase();t.removeAttribute("id");for(let n=0;n<e.length;n++)e[n].removeAttribute("id");return i==="canvas"?Tt(o,t):(i==="input"||i==="select"||i==="textarea")&&It(o,t),Rt("canvas",o,t,Tt),Rt("input, textarea, select",o,t,It),t}function Rt(o,t,e,i){let n=t.querySelectorAll(o);if(n.length){let s=e.querySelectorAll(o);for(let r=0;r<n.length;r++)i(n[r],s[r]);}}var si=0;function It(o,t){t.type!=="file"&&(t.value=o.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${si++}`);}function Tt(o,t){let e=t.getContext("2d");if(e)try{e.drawImage(o,0,0);}catch(i){}}function Te(o){let t=o.getBoundingClientRect();return {top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function ye(o,t,e){let{top:i,bottom:n,left:s,right:r}=o;return e>=i&&e<=n&&t>=s&&t<=r}function oi(o,t){let e=t.left<o.left,i=t.left+t.width>o.right,n=t.top<o.top,s=t.top+t.height>o.bottom;return e||i||n||s}function G(o,t,e){o.top+=t,o.bottom=o.top+o.height,o.left+=e,o.right=o.left+o.width;}function kt(o,t,e,i){let{top:n,right:s,bottom:r,left:a,width:l,height:d}=o,h=l*t,v=d*t;return i>n-v&&i<r+v&&e>a-h&&e<s+h}var X=class{_document;positions=new Map;constructor(t){this._document=t;}clear(){this.positions.clear();}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Te(e)});});}handleScroll(t){let e=me(t),i=this.positions.get(e);if(!i)return null;let n=i.scrollPosition,s,r;if(e===this._document){let d=this.getViewportScrollPosition();s=d.top,r=d.left;}else s=e.scrollTop,r=e.scrollLeft;let a=n.top-s,l=n.left-r;return this.positions.forEach((d,h)=>{d.clientRect&&e!==h&&e.contains(h)&&G(d.clientRect,a,l);}),n.top=s,n.left=r,{top:a,left:l}}getViewportScrollPosition(){return {top:window.scrollY,left:window.scrollX}}};function Wt(o,t){let e=o.rootNodes;if(e.length===1&&e[0].nodeType===t.ELEMENT_NODE)return e[0];let i=t.createElement("div");return e.forEach(n=>i.appendChild(n)),i}function ke(o,t,e){for(let i in t)if(t.hasOwnProperty(i)){let n=t[i];n?o.setProperty(i,n,e?.has(i)?"important":""):o.removeProperty(i);}return o}function A(o,t){let e=t?"":"none";ke(o.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e});}function Ot(o,t,e){ke(o.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e);}function J(o,t){return t&&t!="none"?o+" "+t:o}function Mt(o,t){o.style.width=`${t.width}px`,o.style.height=`${t.height}px`,o.style.transform=$(t.left,t.top);}function $(o,t){return `translate3d(${Math.round(o)}px, ${Math.round(t)}px, 0)`}var V={capture:true},we={passive:false,capture:true},ri=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=JD({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,n){},styles:[`@layer cdk-resets {
|
|
2
|
+
.cdk-drag-preview {
|
|
3
|
+
background: none;
|
|
4
|
+
border: none;
|
|
5
|
+
padding: 0;
|
|
6
|
+
color: inherit;
|
|
7
|
+
inset: auto;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
.cdk-drag-placeholder *,
|
|
11
|
+
.cdk-drag-preview * {
|
|
12
|
+
pointer-events: none !important;
|
|
13
|
+
}
|
|
14
|
+
`],encapsulation:2})}return o})(),Oe=(()=>{class o{_ngZone=w$1(ue);_document=w$1(gr);_styleLoader=w$1(Ce$1);_renderer=w$1(Sr).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new te;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=vt([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new te;pointerUp=new te;registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e);}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,we);});}removeDropContainer(e){this._dropInstances.delete(e);}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.();}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(ri),this._activeDragInstances.update(n=>[...n,e]),this._activeDragInstances().length===1)){let n=i.type.startsWith("touch"),s=a=>this.pointerUp.next(a),r=[["scroll",a=>this._scroll.next(a),V],["selectstart",this._preventDefaultWhileDragging,we]];n?r.push(["touchend",s,V],["touchcancel",s,V]):r.push(["mouseup",s,V]),n||r.push(["mousemove",a=>this.pointerMove.next(a),we]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=r.map(([a,l,d])=>this._renderer.listen(this._document,a,l,d));});}}stopDragging(e){this._activeDragInstances.update(i=>{let n=i.indexOf(e);return n>-1?(i.splice(n,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners();}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let i=[this._scroll];return e&&e!==this._document&&i.push(new S(n=>this._ngZone.runOutsideAngular(()=>{let s=this._renderer.listen(e,"scroll",r=>{this._activeDragInstances().length&&n.next(r);},V);return ()=>{s();}}))),zm(...i)}registerDirectiveNode(e,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,i);}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e);}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete();}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault();};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e));};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0;}static \u0275fac=function(i){return new(i||o)};static \u0275prov=Pr({token:o,factory:o.\u0275fac})}return o})();function Lt(o){let t=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*t}function ai(o){let t=getComputedStyle(o),e=Se(t,"transition-property"),i=e.find(a=>a==="transform"||a==="all");if(!i)return 0;let n=e.indexOf(i),s=Se(t,"transition-duration"),r=Se(t,"transition-delay");return Lt(s[n])+Lt(r[n])}function Se(o,t){return o.getPropertyValue(t).split(",").map(i=>i.trim())}var li=new Set(["position"]),xe=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(t,e,i,n,s,r,a,l,d,h){this._document=t,this._rootElement=e,this._direction=i,this._initialDomRect=n,this._previewTemplate=s,this._previewClass=r,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=d,this._renderer=h;}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),At(this._preview)&&this._preview.showPopover();}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null;}setTransform(t){this._preview.style.transform=t;}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t);}getTransitionDuration(){return ai(this._preview)}addEventListener(t,e){return this._renderer.listen(this._preview,t,e)}_createPreview(){let t=this._previewTemplate,e=this._previewClass,i=t?t.template:null,n;if(i&&t){let s=t.matchSize?this._initialDomRect:null,r=t.viewContainer.createEmbeddedView(i,t.context);r.detectChanges(),n=Wt(r,this._document),this._previewEmbeddedView=r,t.matchSize?Mt(n,s):n.style.transform=$(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y);}else n=Pe(this._rootElement),Mt(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return ke(n.style,{"pointer-events":"none",margin:At(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},li),A(n,false),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>n.classList.add(s)):n.classList.add(e)),n}};function At(o){return "showPopover"in o}var di={passive:true},Nt={passive:false},ci={passive:false,capture:true},hi=800,Ft="cdk-drag-placeholder",Ht=new Set(["position"]);function pi(o,t,e={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let i=o.get(tD,null,{optional:true})||o.get(Sr).createRenderer(null,null);return new Ee(t,e,o.get(gr),o.get(ue),o.get(L$1),o.get(Oe),i)}var Ee=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=vt(false);_hasMoved=false;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new te;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=j.EMPTY;_pointerUpSubscription=j.EMPTY;_scrollSubscription=j.EMPTY;_resizeSubscription=j.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=true;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>A(e,t)));}_disabled=false;beforeStarted=new te;started=new te;released=new te;ended=new te;entered=new te;exited=new te;dropped=new te;moved=this._moveEvents;data;constrainPosition;constructor(t,e,i,n,s,r,a){this._config=e,this._document=i,this._ngZone=n,this._viewportRuler=s,this._dragDropRegistry=r,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new X(i),r.registerDragItem(this);}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>be$1(i)),this._handles.forEach(i=>A(i,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i);}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let e=be$1(t);if(e!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(e,"mousedown",this._pointerDown,Nt),i.listen(e,"touchstart",this._pointerDown,di),i.listen(e,"dragstart",this._nativeDragStart,Nt)]),this._initialTransform=void 0,this._rootElement=e;}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?be$1(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null;}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0};}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&oi(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let t=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),i=0,n=0;e.left<t.left?i=t.left-e.left:e.right>t.right&&(i=t.right-e.right),e.top<t.top?n=t.top-e.top:e.bottom>t.bottom&&(n=t.bottom-e.bottom);let s=this._activeTransform.x,r=this._activeTransform.y,a=s+i,l=r+n;this._rootElement.style.transform=$(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l};}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),A(t,true));}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),A(t,this.disabled));}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t;}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return {x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t);}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0;}_destroyPreview(){this._preview?.destroy(),this._preview=null;}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null;}_pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,t);}else this.disabled||this._initializeDragSequence(this._rootElement,t);};_pointerMove=t=>{let e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging()){let n=Math.abs(e.x-this._pickupPositionOnPage.x),s=Math.abs(e.y-this._pickupPositionOnPage.y);if(n+s>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),l=this._dropContainer;if(!a){this._endDragSequence(t);return}(!l||!l.isDragging()&&!l.isReceiving())&&(t.cancelable&&t.preventDefault(),this._hasStartedDragging.set(true),this._ngZone.run(()=>this._startDragSequence(t)));}return}t.cancelable&&t.preventDefault();let i=this._getConstrainedPointerPosition(e);if(this._hasMoved=true,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else {let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,s=this._activeTransform;s.x=i.x-n.x+this._passiveTransform.x,s.y=i.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(s.x,s.y);}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta});});};_pointerUp=t=>{this._endDragSequence(t);};_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);});else {this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t});}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);}}_startDragSequence(t){z(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",_i,ci);}),i){let n=this._rootElement,s=n.parentNode,r=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");s.insertBefore(a,n),this._initialTransform=n.style.transform||"",this._preview=new xe(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(s,e)),Ot(n,false,Ht),this._document.body.appendChild(s.replaceChild(r,n)),this.started.next({source:this,event:t}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this);}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[]);}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();let i=this.isDragging(),n=z(e),s=!n&&e.button!==0,r=this._rootElement,a=me(e),l=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+hi>Date.now(),d=n?At$1(e):wt$1(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),i||s||l||d)return;if(this._handles.length){let E=r.style;this._rootElementTapHighlight=E.webkitTapHighlightColor||"",E.webkitTapHighlightColor="transparent";}this._hasMoved=false,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(E=>this._updateOnScroll(E)),this._boundaryElement&&(this._boundaryRect=Te(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let v=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:v.x,y:v.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e);}_cleanupDragArtifacts(t){Ot(this._rootElement,true,Ht),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,i=e.getItemIndex(this),n=this._getPointerPositionOnPage(t),s=this._getDragDistance(n),r=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:s,dropPoint:n,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:s,dropPoint:n,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,r,s,n,t),this._dropContainer=this._initialContainer;});}_updateActiveDropContainer({x:t,y:e},{x:i,y:n}){let s=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{let r=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(r+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(s,this._dropContainer,a),this._dropContainer=s,this._dropContainer.enter(this,t,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)});}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y));}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let n=a=>{(!a||this._preview&&me(a)===this._preview.element&&a.propertyName==="transform")&&(r(),i(),clearTimeout(s));},s=setTimeout(n,e*1.5),r=this._preview.addEventListener("transitionend",n);}))}_createPlaceholderElement(){let t=this._placeholderTemplate,e=t?t.template:null,i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=Wt(this._placeholderRef,this._document)):i=Pe(this._rootElement),i.style.pointerEvents="none",i.classList.add(Ft),i}_getPointerPositionInElement(t,e,i){let n=e===this._rootElement?null:e,s=n?n.getBoundingClientRect():t,r=z(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=r.pageX-s.left-a.left,d=r.pageY-s.top-a.top;return {x:s.left-t.left+l,y:s.top-t.top+d}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),i=z(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,n=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){let r=this._ownerSVGElement.getScreenCTM();if(r){let a=this._ownerSVGElement.createSVGPoint();return a.x=n,a.y=s,a.matrixTransform(r.inverse())}}return {x:n,y:s}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:n}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:s,y:r}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+r,v=a.bottom-(d-r),E=a.left+s,te=a.right-(l-s);i=Bt(i,E,te),n=Bt(n,h,v);}return {x:i,y:n}}_updatePointerDirectionDelta(t){let{x:e,y:i}=t,n=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-s.x),a=Math.abs(i-s.y);return r>this._config.pointerDirectionChangeThreshold&&(n.x=e>s.x?1:-1,s.x=e),a>this._config.pointerDirectionChangeThreshold&&(n.y=i>s.y?1:-1,s.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,A(this._rootElement,t));}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0;}_applyRootElementTransform(t,e){let i=1/this.scale,n=$(t*i,e*i),s=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=s.transform&&s.transform!="none"?s.transform:""),s.transform=J(n,this._initialTransform);}_applyPreviewTransform(t,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,n=$(t,e);this._preview.setTransform(J(n,i));}_getDragDistance(t){let e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear();}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(t===0&&e===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||i.width===0&&i.height===0)return;let s=n.left-i.left,r=i.right-n.right,a=n.top-i.top,l=i.bottom-n.bottom;n.width>i.width?(s>0&&(t+=s),r>0&&(t-=r)):t=0,n.height>i.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t});}_getDragStartDelay(t){let e=this.dragStartDelay;return typeof e=="number"?e:z(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let i=me(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&G(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y));}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=wr(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let i=this._previewContainer||"global";if(i==="parent")return t;if(i==="global"){let n=this._document;return e||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return be$1(i)}_getPreviewRect(){return (!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=t=>{if(this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&t.preventDefault();}else this.disabled||t.preventDefault();};_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}_conditionallyInsertAnchor(t,e,i){if(t===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let n=this._anchor??=Pe(this._placeholder);n.classList.remove(Ft),n.classList.add("cdk-drag-anchor"),n.style.transform="",i?i.before(n):be$1(e.element).appendChild(n);}}};function Bt(o,t,e){return Math.max(t,Math.min(e,o))}function z(o){return o.type[0]==="t"}function _i(o){o.preventDefault();}function ee(o,t,e){let i=Vt(t,o.length-1),n=Vt(e,o.length-1);if(i===n)return;let s=o[i],r=n<i?-1:1;for(let a=i;a!==n;a+=r)o[a]=o[a+r];o[n]=s;}function Vt(o,t){return Math.max(0,Math.min(t,o))}var Q=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction="ltr";constructor(t){this._dragDropRegistry=t;}_previousSwap={drag:null,delta:0,overlaps:false};start(t){this.withItems(t);}sort(t,e,i,n){let s=this._itemPositions,r=this._getItemIndexFromPointerPosition(t,e,i,n);if(r===-1&&s.length>0)return null;let a=this.orientation==="horizontal",l=s.findIndex(D=>D.drag===t),d=s[r],h=s[l].clientRect,v=d.clientRect,E=l>r?1:-1,te=this._getItemOffsetPx(h,v,E),ti=this._getSiblingOffsetPx(l,s,E),ii=s.slice();return ee(s,l,r),s.forEach((D,ni)=>{if(ii[ni]===D)return;let Me=D.drag===t,ie=Me?te:ti,Le=Me?t.getPlaceholderElement():D.drag.getRootElement();D.offset+=ie;let Ae=Math.round(D.offset*(1/D.drag.scale));a?(Le.style.transform=J(`translate3d(${Ae}px, 0, 0)`,D.initialTransform),G(D.clientRect,0,ie)):(Le.style.transform=J(`translate3d(0, ${Ae}px, 0)`,D.initialTransform),G(D.clientRect,ie,0));}),this._previousSwap.overlaps=ye(v,e,i),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?n.x:n.y,{previousIndex:l,currentIndex:r}}enter(t,e,i,n){let s=this._activeDraggables,r=s.indexOf(t),a=t.getPlaceholderElement();r>-1&&s.splice(r,1);let l=n==null||n<0?this._getItemIndexFromPointerPosition(t,e,i):n,d=s[l];if(d===t&&(d=s[l+1]),!d&&(l==null||l===-1||l<s.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(d=s[0]),d&&!this._dragDropRegistry.isDragging(d)){let h=d.getRootElement();h.parentElement.insertBefore(a,h),s.splice(l,0,t);}else this._element.appendChild(a),s.push(t);a.style.transform="",this._cacheItemPositions();}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions();}withSortPredicate(t){this._sortPredicate=t;}reset(){this._activeDraggables?.forEach(t=>{let e=t.getRootElement();if(e){let i=this._itemPositions.find(n=>n.drag===t)?.initialTransform;e.style.transform=i||"";}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=false;}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return this._getVisualItemPositions().findIndex(e=>e.drag===t)}getItemAtIndex(t){return this._getVisualItemPositions()[t]?.drag||null}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{G(i,t,e);}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition();});}withElementContainer(t){this._element=t;}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let i=e.getVisibleElement();return {drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:Te(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top);}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(t,e,i){let n=this.orientation==="horizontal",s=n?e.left-t.left:e.top-t.top;return i===-1&&(s+=n?e.width-t.width:e.height-t.height),s}_getSiblingOffsetPx(t,e,i){let n=this.orientation==="horizontal",s=e[t].clientRect,r=e[t+i*-1],a=s[n?"width":"height"]*i;if(r){let l=n?"left":"top",d=n?"right":"bottom";i===-1?a-=r.clientRect[l]-s[d]:a+=s[l]-r.clientRect[d];}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return false;let i=this._itemPositions,n=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let r=i[i.length-1].clientRect;return n?t>=r.right:e>=r.bottom}else {let r=i[0].clientRect;return n?t<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(t,e,i,n){let s=this.orientation==="horizontal",r=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return false;if(n){let d=s?n.x:n.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return false}return s?e>=Math.floor(l.left)&&e<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return r===-1||!this._sortPredicate(r,t)?-1:r}},Ce=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:false};_relatedNodes=[];constructor(t,e){this._document=t,this._dragDropRegistry=e;}start(t){let e=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<e.length;i++){let n=e[i];this._relatedNodes.push([n,n.nextSibling]);}this.withItems(t);}sort(t,e,i,n){let s=this._getItemIndexFromPointerPosition(t,e,i),r=this._previousSwap;if(s===-1||this._activeItems[s]===t)return null;let a=this._activeItems[s];if(r.drag===a&&r.overlaps&&r.deltaX===n.x&&r.deltaY===n.y)return null;let l=this.getItemIndex(t),d=t.getPlaceholderElement(),h=a.getRootElement();s>l?h.after(d):h.before(d),ee(this._activeItems,l,s);let v=this._getRootNode().elementFromPoint(e,i);return r.deltaX=n.x,r.deltaY=n.y,r.drag=a,r.overlaps=h===v||h.contains(v),{previousIndex:l,currentIndex:s}}enter(t,e,i,n){let s=this._activeItems.indexOf(t);s>-1&&this._activeItems.splice(s,1);let r=n==null||n<0?this._getItemIndexFromPointerPosition(t,e,i):n;r===-1&&(r=this._getClosestItemIndexToPointer(t,e,i));let a=this._activeItems[r];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(r,0,t),a.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()));}withItems(t){this._activeItems=t.slice();}withSortPredicate(t){this._sortPredicate=t;}reset(){let t=this._element,e=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[n,s]=this._relatedNodes[i];n.parentNode===t&&n.nextSibling!==s&&(s===null?t.appendChild(n):s.parentNode===t&&t.insertBefore(n,s));}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=false;}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}getItemAtIndex(t){return this._activeItems[t]||null}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition();});}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0);}_getItemIndexFromPointerPosition(t,e,i){let n=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),s=n?this._activeItems.findIndex(r=>{let a=r.getRootElement();return n===a||a.contains(n)}):-1;return s===-1||!this._sortPredicate(s,t)?-1:s}_getRootNode(){return this._rootNode||(this._rootNode=wr(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,e,i){if(this._activeItems.length===0)return -1;if(this._activeItems.length===1)return 0;let n=1/0,s=-1;for(let r=0;r<this._activeItems.length;r++){let a=this._activeItems[r];if(a!==t){let{x:l,y:d}=a.getRootElement().getBoundingClientRect(),h=Math.hypot(e-l,i-d);h<n&&(n=h,s=r);}}return s}},zt=.05,Ut=.05,w=(function(o){return o[o.NONE=0]="NONE",o[o.UP=1]="UP",o[o.DOWN=2]="DOWN",o})(w||{}),u=(function(o){return o[o.NONE=0]="NONE",o[o.LEFT=1]="LEFT",o[o.RIGHT=2]="RIGHT",o})(u||{});function gi(o,t){return new Re(t,o.get(Oe),o.get(gr),o.get(ue),o.get(L$1))}var Re=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=false;sortingDisabled=false;lockAxis=null;autoScrollDisabled=false;autoScrollStep=2;hasAnchor=false;enterPredicate=()=>true;sortPredicate=()=>true;beforeStarted=new te;entered=new te;exited=new te;dropped=new te;sorted=new te;receivingStarted=new te;receivingStopped=new te;data;_container;_isDragging=false;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=j.EMPTY;_verticalScrollDirection=w.NONE;_horizontalScrollDirection=u.NONE;_scrollNode;_stopScrollTimers=new te;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,i,n,s){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=s;let r=this.element=be$1(t);this._document=i,this.withOrientation("vertical").withElementContainer(r),e.registerDropContainer(this),this._parentPositions=new X(i);}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this);}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings();}enter(t,e,i,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)});}exit(t){this._reset(),this.exited.next({item:t,container:this});}drop(t,e,i,n,s,r,a,l){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:n,isPointerOverContainer:s,distance:r,dropPoint:a,event:l});}withItems(t){let e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(n=>n.isDragging()).every(n=>t.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof Q&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new Ce(this._document,this._dragDropRegistry);else {let e=new Q(this._dragDropRegistry);e.direction=this._direction,e.orientation=t,this._sortStrategy=e;}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,i)=>this.sortPredicate(e,i,this)),this}withScrollableParents(t){let e=this._container;return this._scrollableElements=t.indexOf(e)===-1?[e,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;be$1(this.element);let i=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(t);return i>-1&&this._scrollableElements.splice(i,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}getItemAtIndex(t){return this._isDragging?this._sortStrategy.getItemAtIndex(t):this._draggables[t]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,n){if(this.sortingDisabled||!this._domRect||!kt(this._domRect,zt,e,i))return;let s=this._sortStrategy.sort(t,e,i,n);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:t});}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,n=w.NONE,s=u.NONE;if(this._parentPositions.positions.forEach((r,a)=>{a===this._document||!r.clientRect||i||kt(r.clientRect,zt,t,e)&&([n,s]=mi(a,r.clientRect,this._direction,t,e),(n||s)&&(i=a));}),!n&&!s){let{width:r,height:a}=this._viewportRuler.getViewportSize(),l={width:r,height:a,top:0,right:r,bottom:a,left:0};n=Zt(l,e),s=qt(l,t),i=window;}i&&(n!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=s,this._scrollNode=i,(n||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling());}_stopScrolling(){this._stopScrollTimers.next();}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=true,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents();}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect;}_reset(){this._isDragging=false;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear();}_startScrollInterval=()=>{this._stopScrolling(),ms(0,wm).pipe(bu(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===w.UP?t.scrollBy(0,-e):this._verticalScrollDirection===w.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===u.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===u.RIGHT&&t.scrollBy(e,0);});};_isOverContainer(t,e){return this._domRect!=null&&ye(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(n=>n._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._domRect||!ye(this._domRect,e,i)||!this.enterPredicate(t,this))return false;let n=this._getShadowRoot().elementFromPoint(e,i);return n?n===this._container||this._container.contains(n):false}_startReceiving(t,e){let i=this._activeSiblings;!i.has(t)&&e.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}));}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this});}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left);}else this.isReceiving()&&this._cacheParentPositions();});}_getShadowRoot(){if(!this._cachedShadowRoot){let t=wr(this._container);this._cachedShadowRoot=t||this._document;}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t));}};function Zt(o,t){let{top:e,bottom:i,height:n}=o,s=n*Ut;return t>=e-s&&t<=e+s?w.UP:t>=i-s&&t<=i+s?w.DOWN:w.NONE}function qt(o,t){let{left:e,right:i,width:n}=o,s=n*Ut;return t>=e-s&&t<=e+s?u.LEFT:t>=i-s&&t<=i+s?u.RIGHT:u.NONE}function mi(o,t,e,i,n){let s=Zt(t,n),r=qt(t,i),a=w.NONE,l=u.NONE;if(s){let d=o.scrollTop;s===w.UP?d>0&&(a=w.UP):o.scrollHeight-d>o.clientHeight&&(a=w.DOWN);}if(r){let d=o.scrollLeft;e==="rtl"?r===u.RIGHT?d<0&&(l=u.RIGHT):o.scrollWidth+d>o.clientWidth&&(l=u.LEFT):r===u.LEFT?d>0&&(l=u.LEFT):o.scrollWidth-d>o.clientWidth&&(l=u.RIGHT);}return [a,l]}var Gt=new N$1("CDK_DRAG_PARENT");var ui=new N$1("CdkDragHandle");var jt=new N$1("CDK_DRAG_CONFIG"),Kt=new N$1("CdkDropList"),Yt=(()=>{class o{element=w$1(Lr);dropContainer=w$1(Kt,{optional:true,skipSelf:true});_ngZone=w$1(ue);_viewContainerRef=w$1(Ki);_dir=w$1(ru,{optional:true});_changeDetectorRef=w$1(Gj);_selfHandle=w$1(ui,{optional:true,self:true});_parentDrag=w$1(Gt,{optional:true,skipSelf:true});_dragDropRegistry=w$1(Oe);_destroyed=new te;_handles=new Bn([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled;}_disabled=false;constrainPosition;previewClass;previewContainer;scale=1;started=new Qe;released=new Qe;ended=new Qe;entered=new Qe;exited=new Qe;dropped=new Qe;moved=new S(e=>{let i=this._dragRef.moved.pipe(ke$1(n=>({source:this,pointerPosition:n.pointerPosition,event:n.event,delta:n.delta,distance:n.distance}))).subscribe(e);return ()=>{i.unsubscribe();}});_injector=w$1(be);constructor(){let e=this.dropContainer,i=w$1(jt,{optional:true});this._dragRef=pi(this._injector,this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),e&&(e.addItem(this),e._dropListRef.beforeStarted.pipe(bu(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale;})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef);}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset();}resetToBoundary(){this._dragRef.resetToBoundary();}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e);}ngAfterViewInit(){Tp(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);},{injector:this._injector});}ngOnChanges(e){let i=e.rootElementSelector,n=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose();});}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i);}_removeHandle(e){let i=this._handles.getValue(),n=i.indexOf(e);n>-1&&(i.splice(n,1),this._handles.next(i));}_setPreviewTemplate(e){this._previewTemplate=e;}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null);}_setPlaceholderTemplate(e){this._placeholderTemplate=e;}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null);}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e);}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):be$1(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,n=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof n=="object"&&n?n:Ar(n),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value);}}),e.beforeStarted.pipe(_t(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let n=this._dragDropRegistry.getDragDirectiveForNode(i);if(n){e.withParent(n._dragRef);break}i=i.parentElement;}});}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck();}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event});}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck();}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex});}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this});}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event});});}_assignDefaults(e){let{lockAxis:i,dragStartDelay:n,constrainPosition:s,previewClass:r,boundaryElement:a,draggingDisabled:l,rootElementSelector:d,previewContainer:h}=e;this.disabled=l??false,this.dragStartDelay=n||0,this.lockAxis=i||null,s&&(this.constrainPosition=s),r&&(this.previewClass=r),a&&(this.boundaryElement=a),d&&(this.rootElementSelector=d),h&&(this.previewContainer=h);}_setupHandlesListener(){this._handles.pipe(Cu(e=>{let i=e.map(n=>n.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i);}),ry(e=>zm(...e.map(i=>i._stateChanges.pipe(Tu(i))))),bu(this._destroyed)).subscribe(e=>{let i=this._dragRef,n=e.element.nativeElement;e.disabled?i.disableHandle(n):i.enableHandle(n);});}static \u0275fac=function(i){return new(i||o)};static \u0275dir=nw({type:o,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,n){i&2&&sg("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._dragRef.isDragging());},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Zj],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Yj]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[LT([{provide:Gt,useExisting:o}]),lv]})}return o})(),$t=new N$1("CdkDropListGroup");var Xt=(()=>{class o{element=w$1(Lr);_changeDetectorRef=w$1(Gj);_scrollDispatcher=w$1(H);_dir=w$1(ru,{optional:true});_group=w$1($t,{optional:true,skipSelf:true});_latestSortedRefs;_destroyed=new te;_scrollableParentsResolved=false;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation="vertical";id=w$1(Mr).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e;}_disabled=false;sortingDisabled=false;enterPredicate=()=>true;sortPredicate=()=>true;autoScrollDisabled=false;autoScrollStep;elementContainerSelector=null;hasAnchor=false;dropped=new Qe;entered=new Qe;exited=new Qe;sorted=new Qe;_unsortedItems=new Set;constructor(){let e=w$1(jt,{optional:true}),i=w$1(be);this._dropListRef=gi(i,this.element),this._dropListRef.data=this,e&&this._assignDefaults(e),this._dropListRef.enterPredicate=(n,s)=>this.enterPredicate(n.data,s.data),this._dropListRef.sortPredicate=(n,s,r)=>this.sortPredicate(n,s.data,r.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),o._dropLists.push(this),this._group&&this._group._items.add(this);}addItem(e){this._unsortedItems.add(e),e._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef));}removeItem(e){if(this._unsortedItems.delete(e),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(e._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs));}}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=o._dropLists.indexOf(this);e>-1&&o._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete();}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(Tu(this._dir.value),bu(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=nn(this.connectedTo).map(n=>{if(typeof n=="string"){let s=o._dropLists.find(r=>r.id===n);return s}return n});if(this._group&&this._group._items.forEach(n=>{i.indexOf(n)===-1&&i.push(n);}),!this._scrollableParentsResolved){let n=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(n),this._scrollableParentsResolved=true;}if(this.elementContainerSelector){let n=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(n);}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=Ar(this.autoScrollStep,2),e.hasAnchor=this.hasAnchor,e.connectedTo(i.filter(n=>n&&n!==this).map(n=>n._dropListRef)).withOrientation(this.orientation);});}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck();}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex});}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck();}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data});}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck();}),zm(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck());}_assignDefaults(e){let{lockAxis:i,draggingDisabled:n,sortingDisabled:s,listAutoScrollDisabled:r,listOrientation:a}=e;this.disabled=n??false,this.sortingDisabled=s??false,this.autoScrollDisabled=r??false,this.orientation=a||"vertical",this.lockAxis=i||null;}_syncItemsWithRef(e){this._latestSortedRefs=e,this._dropListRef.withItems(e);}static \u0275fac=function(i){return new(i||o)};static \u0275dir=nw({type:o,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,n){i&2&&(Hh("id",n.id),sg("cdk-drop-list-disabled",n.disabled)("cdk-drop-list-dragging",n._dropListRef.isDragging())("cdk-drop-list-receiving",n._dropListRef.isReceiving()));},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",Zj],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",Zj],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",Zj],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",Zj]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[LT([{provide:$t,useValue:void 0},{provide:Kt,useExisting:o}])]})}return o})();function fi(o,t){if(o&1){let e=Fw();Pi(0,"button",0),Qh("click",function(){ud(e);let n=qw();return dd(n.clickAction("cancel"))}),Pi(1,"mat-icon",1),TT(2,"close"),ul(),Pi(3,"span"),TT(4,"Close"),ul()();}}var Qt=(()=>{class o{_bottomSheetRef=w$1(_);data=w$1(vA);showCancel=!!(this.data&&this.data.showCancel);clickAction(e){this._bottomSheetRef.dismiss(e);}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=JD({type:o,selectors:[["dashboards-bottom-sheet"]],decls:12,vars:1,consts:[["mat-list-item","",3,"click"],["matListItemIcon",""],["mat-list-item",""]],template:function(i,n){i&1&&(Pi(0,"mat-action-list")(1,"button",0),Qh("click",function(){return n.clickAction("duplicate")}),Pi(2,"mat-icon",1),TT(3,"content_copy"),ul(),Pi(4,"span"),TT(5,"Duplicate"),ul()(),Pi(6,"button",0),Qh("click",function(){return n.clickAction("delete")}),Pi(7,"mat-icon",1),TT(8,"delete_forever"),ul(),Pi(9,"span"),TT(10,"Delete"),ul()(),_w(11,fi,5,0,"button",2),ul()),i&2&&(EE(11),Mw(n.showCancel?11:-1));},dependencies:[Jt,Xt$1,Zt$1,st,yt,wt],encapsulation:2})}return o})();var Di=(o,t)=>t.id;function bi(o,t){if(o&1){let e=Fw();Pi(0,"div",5),Qh("cdkDragStarted",function(){ud(e);let n=qw();return dd(n.dragStart())})("cdkDragMoved",function(n){ud(e);let s=qw();return dd(s.onDragMoved(n))})("cdkDragEnded",function(){ud(e);let n=qw();return dd(n.dragEnd())})("press",function(){let n=ud(e).$index,s=qw();return dd(s.onPress(n))})("doubletap",function(){let n=ud(e).$index,s=qw();return dd(s.editDashboard(n))})("keydown.enter",function(){let n=ud(e).$index,s=qw();return dd(s.editDashboard(n))})("keydown.space",function(){let n=ud(e).$index,s=qw();return dd(s.onPress(n))}),Pi(1,"div",6),TT(2),ul(),Pi(3,"div"),$h(4,"mat-icon",7),ul(),Pi(5,"p",8),TT(6),ul()();}if(o&2){let e=t.$implicit,i=t.$index,n=qw();Bh("mode","editor")("disableGestures",n._sheetOpen||n.suppressDrag)("cdkDragDisabled",n._sheetOpen||n.suppressDrag),Hh("aria-label",e.name),EE(2),gg(i+1),EE(2),ig("width",72,"px")("height",72,"px"),Bh("svgIcon",e.icon||"dashboard"),EE(2),gg(e.name);}}var ei=(()=>{class o{pageTitle="Dashboards";_bottomSheet=w$1(DA);_dashboard=w$1(G$2);_uiEvent=w$1(re);_dialog=w$1(Ff);_sanitizer=w$1(Dr);_sheetOpen=false;suppressDrag=false;_dragActive=false;_dragMoved=false;_dragSuppressThresholdPx=4;addDashboard(){this._dialog.openDashboardPageEditorDialog({title:"New Dashboard",name:`Dashboard ${this._dashboard.dashboards().length+1}`,icon:"dashboard-dashboard",confirmBtnText:"Create",cancelBtnText:"Cancel"}).afterClosed().subscribe(e=>{e&&this._dashboard.add(e.name,[],e.icon,e.collapseSplitShell);});}openBottomSheet(e){if(this._sheetOpen)return;this._sheetOpen=true;let i=typeof navigator<"u"&&/Linux/.test(navigator.platform)&&/Firefox/.test(navigator.userAgent);this._bottomSheet.open(Qt,i?{disableClose:true,data:{showCancel:true}}:{}).afterDismissed().subscribe(s=>{switch(this._sheetOpen=false,s){case "delete":this.deleteDashboard(e);break;case "duplicate":this.duplicateDashboard(e,`${this._dashboard.dashboards()[e].name}`);break;}});}editDashboard(e){let i=this._dashboard.dashboards()[e];i&&this._dialog.openDashboardPageEditorDialog({title:"Dashboard Options",name:i.name??"",icon:i.icon||"dashboard-dashboard",confirmBtnText:"Save",cancelBtnText:"Cancel",collapseSplitShell:i.collapseSplitShell??false}).afterClosed().subscribe(n=>{n&&this._dashboard.update(e,n.name,n.icon,n.collapseSplitShell);});}deleteDashboard(e){this._dashboard.delete(e);}duplicateDashboard(e,i){let n=this._dashboard.dashboards()[e];this._dialog.openDashboardPageEditorDialog({title:"Duplicate Dashboard",name:`${i} copy`,icon:n.icon||"dashboard-dashboard",confirmBtnText:"Save",cancelBtnText:"Cancel",collapseSplitShell:n.collapseSplitShell??false}).afterClosed().subscribe(s=>{s&&this._dashboard.duplicate(e,s.name,s.icon,s.collapseSplitShell);});}drop(e){this._dashboard.dashboards.update(i=>{let n=[...i];ee(n,e.previousIndex,e.currentIndex);let s=this._dashboard.activeDashboard();return s===null||(s===e.previousIndex?this._dashboard.activeDashboard.set(e.currentIndex):s>e.previousIndex&&s<=e.currentIndex?this._dashboard.activeDashboard.set(s-1):s<e.previousIndex&&s>=e.currentIndex&&this._dashboard.activeDashboard.set(s+1)),n});}dragStart(){this._sheetOpen||this.suppressDrag||(this._uiEvent.isDragging.set(true),this._dragActive=true,this._dragMoved=false);}dragEnd(){this._uiEvent.isDragging.set(false),this._dragActive=false,setTimeout(()=>{this._dragMoved=false;},60);}onDragMoved(e){if(!this._dragActive||this._dragMoved)return;Math.hypot(e.distance.x,e.distance.y)>this._dragSuppressThresholdPx&&(this._dragMoved=true);}onPress(e){this._sheetOpen||this._dragMoved||(this.cancelPointerSequence(),this.openBottomSheet(e));}cancelPointerSequence(){this.suppressDrag=true,this._dragActive=false,this._dragMoved=false,["pointerup","mouseup","touchend"].forEach(e=>{document.dispatchEvent(new Event(e,{bubbles:true}));});}onPointerRelease(){this._sheetOpen||(this.suppressDrag=false);}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=JD({type:o,selectors:[["dashboards-editor"]],hostBindings:function(i,n){i&1&&Qh("mouseup",function(){return n.onPointerRelease()},TI)("touchend",function(){return n.onPointerRelease()},TI);},decls:10,vars:0,consts:[["cdkDropList","","cdkDropListOrientation","mixed",1,"dashboard-manage",3,"cdkDropListDropped"],["kipGestures","","matRipple","","cdkDrag","","cdkDragBoundary",".dashboard-manage","tabindex","0",1,"dashboard-card","dashboard-item",3,"mode","disableGestures","cdkDragDisabled"],["tabindex","0",1,"dashboard-card","dashboard-item-add","dashboard-add-btn",3,"click","keydown"],["mat-fab",""],[2,"margin-top","10px"],["kipGestures","","matRipple","","cdkDrag","","cdkDragBoundary",".dashboard-manage","tabindex","0",1,"dashboard-card","dashboard-item",3,"cdkDragStarted","cdkDragMoved","cdkDragEnded","press","doubletap","keydown.enter","keydown.space","mode","disableGestures","cdkDragDisabled"],[1,"item-index"],["aria-hidden","false",1,"dashboard-icon",3,"svgIcon"],[1,"dashboard-name"]],template:function(i,n){i&1&&(Pi(0,"div",0),Qh("cdkDropListDropped",function(r){return n.drop(r)}),xw(1,bi,7,11,"div",1,Di),Pi(3,"div",2),Qh("click",function(){return n.addDashboard()})("keydown",function(){return n.addDashboard()}),Pi(4,"button",3)(5,"mat-icon"),TT(6,"add_box"),ul()(),Pi(7,"p",4)(8,"i"),TT(9,"Add Dashboard"),ul()()()()),i&2&&(EE(),Aw(n._dashboard.dashboards()));},dependencies:[zA,Op,Fp,yt,wt,Xt,Yt,ca,Kh,L],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow-y:auto;scroll-behavior:smooth}.dashboard-manage[_ngcontent-%COMP%]{box-sizing:border-box;padding:0 60px;width:100%;height:100%;display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-around;overflow-y:auto;scroll-behavior:smooth}.dashboard-card[_ngcontent-%COMP%]{position:relative;height:200px;width:300px;margin:10px;border-radius:15px;padding:10px;align-content:center;text-align:center;border:2px solid transparent}@media(max-width:600px)and (orientation:portrait){.dashboard-manage[_ngcontent-%COMP%]{padding:0 70px}.dashboard-card[_ngcontent-%COMP%]{height:175px}}.dashboard-item[_ngcontent-%COMP%]{background-color:var(--mat-sys-surface-container-highest);cursor:pointer}.dashboard-item[_ngcontent-%COMP%]:hover{border:2px solid var(--mat-sys-outline)}.dashboard-item-add[_ngcontent-%COMP%]{background-color:var(--mat-sys-surface-container);cursor:pointer}.dashboard-item-add[_ngcontent-%COMP%]:hover{border:2px solid var(--mat-sys-outline)}.dashboard-add-btn[_ngcontent-%COMP%]{align-content:center;text-align:center;border:dashed 1px var(--mat-sys-outline)}.item-index[_ngcontent-%COMP%]{position:absolute;top:20px;left:20px;display:inline-flex;flex-wrap:wrap;height:42px;width:42px;background-color:var(--kip-contrast-dim-color);color:var(--mat-sys-surface-bright);border-radius:25%;align-content:center;align-items:center;justify-content:center;font-weight:700;font-size:1.25em;z-index:1}.dashboard-icon[_ngcontent-%COMP%]{opacity:.5}.dashboard-name[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:0;font-size:1.1em}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px var(--mat-sys-on-primary-container),0 8px 10px 1px var(--mat-sys-on-primary-container),0 3px 14px 2px var(--mat-sys-on-primary-container)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}"]})}return o})();var yn=(()=>{class o{_router=w$1(G$1);app=w$1(N);_responsive=w$1(ir);_isPhonePortrait=Wp(this._responsive.observe(Em.HandsetPortrait),{initialValue:{matches:false,breakpoints:{}}});_isPhoneLandscape=Wp(this._responsive.observe(Em.HandsetLandscape),{initialValue:{matches:false,breakpoints:{}}});isPhonePortrait=Dt(()=>this._isPhonePortrait()?.matches??false);isPhoneLandscape=Dt(()=>this._isPhoneLandscape()?.matches??false);closePage(){this._router.navigate(["/dashboard"]);}onActionItem(e){switch(e){case "help":this._router.navigate(["/help"]);break;case "datainspector":this._router.navigate(["/data"]);break;case "remotecontrol":this._router.navigate(["/remote"]);break;case "options":this._router.navigate(["/options"]);break;}}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=JD({type:o,selectors:[["settings"]],decls:11,vars:20,consts:[[1,"home-container"],[1,"actions-header-container"],[1,"actions-buttons-container"],["svgIcon","settings","label","Options",3,"click","keydown.enter","keydown.space","iconOnly","compact","iconSize"],["svgIcon","troubleshoot","label","Data Inspector",3,"click","keydown.enter","keydown.space","iconOnly","compact","iconSize"],["svgIcon","remote-control","label","Remote Control",3,"click","keydown.enter","keydown.space","iconOnly","compact","iconSize"],["svgIcon","help-center","label","Help",3,"click","keydown.enter","keydown.space","iconOnly","compact","iconSize"],["mat-icon-button","",1,"dialog-close-icon",3,"click"],[1,"dashboards-editor"]],template:function(i,n){i&1&&(Pi(0,"div",0)(1,"div",1)(2,"div",2)(3,"tile-large-icon",3),Qh("click",function(){return n.onActionItem("options")})("keydown.enter",function(){return n.onActionItem("options")})("keydown.space",function(){return n.onActionItem("options")}),ul(),Pi(4,"tile-large-icon",4),Qh("click",function(){return n.onActionItem("datainspector")})("keydown.enter",function(){return n.onActionItem("datainspector")})("keydown.space",function(){return n.onActionItem("datainspector")}),ul(),Pi(5,"tile-large-icon",5),Qh("click",function(){return n.onActionItem("remotecontrol")})("keydown.enter",function(){return n.onActionItem("remotecontrol")})("keydown.space",function(){return n.onActionItem("remotecontrol")}),ul(),Pi(6,"tile-large-icon",6),Qh("click",function(){return n.onActionItem("help")})("keydown.enter",function(){return n.onActionItem("help")})("keydown.space",function(){return n.onActionItem("help ")}),ul()(),Pi(7,"button",7),Qh("click",function(){return n.closePage()}),Pi(8,"mat-icon"),TT(9,"close"),ul()()(),$h(10,"dashboards-editor",8),ul()),i&2&&(EE(3),pT(`${n.isPhonePortrait()?"no-label":"with-label"}`),Bh("iconOnly",n.isPhonePortrait())("compact",true)("iconSize",48),EE(),pT(`${n.isPhonePortrait()?"no-label":"with-label"}`),Bh("iconOnly",n.isPhonePortrait())("compact",true)("iconSize",48),EE(),pT(`${n.isPhonePortrait()?"no-label":"with-label"}`),Bh("iconOnly",n.isPhonePortrait())("compact",true)("iconSize",48),EE(),pT(`${n.isPhonePortrait()?"no-label":"with-label"}`),Bh("iconOnly",n.isPhonePortrait())("compact",true)("iconSize",48));},dependencies:[yt,wt,Op,eu,R,f,ei],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.home-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.actions-header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;width:100%;padding:5px 0 5px 10px}.with-label[_ngcontent-%COMP%]{height:80px;width:100px}.no-label[_ngcontent-%COMP%]{height:58px;width:63px}.dashboard-editor[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:auto}.actions-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px;margin-top:6px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();export{yn as SettingsComponent};
|