homebridge-config-ui-x 5.4.2-beta.9 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -8
- package/dist/core/config/config.service.d.ts +1 -1
- package/dist/core/config/config.service.js +2 -2
- package/dist/core/config/config.service.js.map +1 -1
- package/dist/core/config/config.startup.js +3 -3
- package/dist/core/config/config.startup.js.map +1 -1
- package/dist/modules/accessories/accessories.service.js +1 -5
- package/dist/modules/accessories/accessories.service.js.map +1 -1
- package/dist/modules/plugins/plugins.service.d.ts +0 -1
- package/dist/modules/plugins/plugins.service.js +15 -27
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/package.json +8 -8
- package/public/3rdpartylicenses.txt +29 -1
- package/public/assets/hap-icons/light-bulb.svg +25 -0
- package/public/assets/hap-icons/outlet.svg +25 -0
- package/public/assets/hap-icons/switch.svg +25 -0
- package/public/assets/hap-icons/unknown.svg +25 -0
- package/public/{chunk-VU6MPE5H.js → chunk-2TN4MWRG.js} +1 -1
- package/public/{chunk-L452FIUI.js → chunk-4HE4ZOV2.js} +1 -1
- package/public/{chunk-MLQP4BIF.js → chunk-4VRTWDLC.js} +1 -1
- package/public/{chunk-I2TETZLW.js → chunk-5PCDPQTV.js} +1 -1
- package/public/{chunk-V2P2FPJ7.js → chunk-6BYNCIUB.js} +1 -1
- package/public/chunk-6NTI6OJP.js +1 -0
- package/public/chunk-6U5EVCLL.js +1 -0
- package/public/chunk-6XPBXGXL.js +1 -0
- package/public/{chunk-UHWT4HS2.js → chunk-6ZQMSK4C.js} +1 -1
- package/public/{chunk-5VA2P7IY.js → chunk-APPIBA3A.js} +1 -1
- package/public/chunk-BLACXXS5.js +1 -0
- package/public/{chunk-H3PPMCMP.js → chunk-CDYGLUTV.js} +1 -1
- package/public/{chunk-BOJ5G5BR.js → chunk-CH37ERZR.js} +1 -1
- package/public/{chunk-CNMM42I5.js → chunk-CHVOUSYH.js} +1 -1
- package/public/chunk-CNO7HM45.js +1 -0
- package/public/{chunk-CCPSSGRZ.js → chunk-COTJCJ2Q.js} +1 -1
- package/public/chunk-DA7RMT4Z.js +12 -0
- package/public/{chunk-DYJDYESS.js → chunk-EJCUIKT3.js} +1 -1
- package/public/{chunk-5TCYRJ6A.js → chunk-EQZV7W2F.js} +1 -1
- package/public/chunk-ESVHJP54.js +1 -0
- package/public/{chunk-KJ7TFOAF.js → chunk-FWGBG4GE.js} +1 -1
- package/public/chunk-FY5GOYXM.js +1 -0
- package/public/chunk-GK2FJAIA.js +9 -0
- package/public/{chunk-7LW4MGOQ.js → chunk-HJJYHJFU.js} +1 -1
- package/public/{chunk-NQUU3I4B.js → chunk-IISL7R2U.js} +1 -1
- package/public/{chunk-GSI45GAI.js → chunk-JKYIXL2W.js} +1 -1
- package/public/{chunk-UKLR7UOX.js → chunk-JLXHBDV4.js} +2 -2
- package/public/{chunk-QTPZZ54U.js → chunk-JU5TVELH.js} +1 -1
- package/public/{chunk-H5ZWWQ4N.js → chunk-KYYR7BKL.js} +1 -1
- package/public/{chunk-TGOCI72Q.js → chunk-L2Z3AXVM.js} +1 -1
- package/public/chunk-LCNBB75Q.js +1 -0
- package/public/{chunk-YXI6VAVI.js → chunk-LJ2VDV7E.js} +1 -1
- package/public/{chunk-ZHPB347D.js → chunk-LVQGJ2B5.js} +1 -1
- package/public/{chunk-Q76LRRNA.js → chunk-LYUFPCJS.js} +1 -1
- package/public/{chunk-4WAU3AJS.js → chunk-MCHXOMUK.js} +1 -1
- package/public/{chunk-BU65ZOCD.js → chunk-MNU7VJ4F.js} +1 -1
- package/public/{chunk-LPHTUMGC.js → chunk-MPEVLH5I.js} +1 -1
- package/public/{chunk-RVZECQBJ.js → chunk-MSFNTB56.js} +1 -1
- package/public/chunk-O4QZ4POF.js +2 -0
- package/public/{chunk-NFWGYMP7.js → chunk-OCIXLP3Q.js} +1 -1
- package/public/{chunk-Z3CXF63X.js → chunk-OIGVYJ2D.js} +1 -1
- package/public/chunk-OTQCO6QF.js +4 -0
- package/public/{chunk-YATJTZML.js → chunk-PETLNERF.js} +2 -2
- package/public/{chunk-Z7BM53JV.js → chunk-PM76DNNB.js} +1 -1
- package/public/{chunk-BBMQHM5Y.js → chunk-PSA5BJ4O.js} +1 -1
- package/public/{chunk-XJZGI5OR.js → chunk-PT7VJPA5.js} +1 -1
- package/public/chunk-PXTRJNWG.js +30 -0
- package/public/{chunk-F5LCQLBC.js → chunk-Q47QL6G5.js} +1 -1
- package/public/chunk-Q6EFZDOI.js +1 -0
- package/public/chunk-QA4W42HX.js +1 -0
- package/public/chunk-QBUMDNNR.js +1 -0
- package/public/{chunk-EA3EXGPZ.js → chunk-QUAAVQGQ.js} +2 -2
- package/public/{chunk-XHYVOBCA.js → chunk-QUNHDVU7.js} +1 -1
- package/public/chunk-RD5FVAI2.js +4 -0
- package/public/{chunk-77JZBWAC.js → chunk-RKGFBHJG.js} +1 -1
- package/public/chunk-TGY4SBYK.js +20 -0
- package/public/chunk-TJXKMEJL.js +1 -0
- package/public/{chunk-ICTLVT6T.js → chunk-V2CYUM6X.js} +1 -1
- package/public/chunk-VDXOHOIZ.js +23 -0
- package/public/{chunk-OPI4KEXA.js → chunk-VEO6347U.js} +1 -1
- package/public/{chunk-J2QJA4E5.js → chunk-VPT3FTAG.js} +1 -1
- package/public/{chunk-SNHTHMX3.js → chunk-WBSZIAJG.js} +1 -1
- package/public/{chunk-NJOBXAPT.js → chunk-X4BK4EIR.js} +1 -1
- package/public/{chunk-SJ3DSNFF.js → chunk-X5R4UHSV.js} +1 -1
- package/public/{chunk-PJQJ4U6H.js → chunk-XFT7CDBN.js} +1 -1
- package/public/chunk-XNPJRZJU.js +3 -0
- package/public/chunk-Z5XI7ADB.js +1 -0
- package/public/{chunk-QKX6ZW6V.js → chunk-ZEHWCP2W.js} +1 -1
- package/public/chunk-ZESBGGVH.js +1 -0
- package/public/index.html +2 -2
- package/public/{main-BZ3XOOI6.js → main-UIFNF6J4.js} +1 -1
- package/public/polyfills-5KWHJ7II.js +2 -0
- package/public/styles-YBNX7ZGB.css +1 -0
- package/public/chunk-2CO3VBPY.js +0 -1
- package/public/chunk-3I6K5KUV.js +0 -1
- package/public/chunk-6GMXEQVA.js +0 -2
- package/public/chunk-AE7VAWOU.js +0 -9
- package/public/chunk-D3JHDB7S.js +0 -1
- package/public/chunk-DP64F7AR.js +0 -1
- package/public/chunk-E6YWZCLV.js +0 -1
- package/public/chunk-EOD26MLT.js +0 -20
- package/public/chunk-FXX7OM3C.js +0 -40
- package/public/chunk-G7FA4DP4.js +0 -1
- package/public/chunk-H36QJYLQ.js +0 -4
- package/public/chunk-JIAMQ2VI.js +0 -1
- package/public/chunk-N2DFJK5J.js +0 -1
- package/public/chunk-NGCBLX4N.js +0 -1
- package/public/chunk-OKJ3EDLI.js +0 -1
- package/public/chunk-PGN4W67A.js +0 -1
- package/public/chunk-R2OFMY4D.js +0 -1
- package/public/chunk-SAZZA33Y.js +0 -23
- package/public/chunk-U2KAF42T.js +0 -3
- package/public/chunk-UOLP7IQJ.js +0 -1
- package/public/chunk-UQX3UTFZ.js +0 -4
- package/public/chunk-WV56IURB.js +0 -30
- package/public/chunk-X7YL6WTA.js +0 -1
- package/public/polyfills-WE4HA5DL.js +0 -2
- package/public/styles-AUT3PDLG.css +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-config-ui-x",
|
|
3
3
|
"displayName": "Homebridge UI",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.5.0",
|
|
5
5
|
"description": "A web based management, configuration and control platform for Homebridge.",
|
|
6
6
|
"author": "oznu <dev@oz.nu>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"class-transformer": "0.5.1",
|
|
98
98
|
"class-validator": "0.14.2",
|
|
99
99
|
"commander": "14.0.0",
|
|
100
|
-
"dayjs": "1.11.
|
|
100
|
+
"dayjs": "1.11.15",
|
|
101
101
|
"fastify": "5.5.0",
|
|
102
102
|
"fs-extra": "11.3.1",
|
|
103
103
|
"jsonwebtoken": "9.0.2",
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
"node-schedule": "2.1.1",
|
|
107
107
|
"ora": "8.2.0",
|
|
108
108
|
"otplib": "12.0.1",
|
|
109
|
-
"p-limit": "7.
|
|
109
|
+
"p-limit": "7.1.0",
|
|
110
110
|
"passport": "0.7.0",
|
|
111
111
|
"passport-jwt": "4.0.1",
|
|
112
112
|
"reflect-metadata": "0.2.2",
|
|
113
113
|
"rxjs": "7.8.2",
|
|
114
114
|
"semver": "7.7.2",
|
|
115
|
-
"systeminformation": "5.27.
|
|
115
|
+
"systeminformation": "5.27.8",
|
|
116
116
|
"tail": "2.2.6",
|
|
117
117
|
"tar": "7.4.3",
|
|
118
118
|
"tcp-port-used": "1.0.2",
|
|
@@ -132,21 +132,21 @@
|
|
|
132
132
|
"@types/tcp-port-used": "^1.0.4",
|
|
133
133
|
"@types/unzipper": "^0.10.11",
|
|
134
134
|
"@vitest/coverage-v8": "^3.2.4",
|
|
135
|
-
"concurrently": "^9.2.
|
|
135
|
+
"concurrently": "^9.2.1",
|
|
136
136
|
"eslint-plugin-format": "^1.0.1",
|
|
137
137
|
"form-data": "^4.0.4",
|
|
138
138
|
"nodemon": "^3.1.10",
|
|
139
139
|
"rimraf": "^6.0.1",
|
|
140
|
-
"ts-loader": "^9.5.
|
|
140
|
+
"ts-loader": "^9.5.4",
|
|
141
141
|
"ts-node": "^10.9.2",
|
|
142
142
|
"tsconfig-paths": "^4.2.0",
|
|
143
143
|
"typescript": "^5.9.2",
|
|
144
|
-
"unplugin-swc": "^1.5.
|
|
144
|
+
"unplugin-swc": "^1.5.7",
|
|
145
145
|
"vitest": "^3.2.4"
|
|
146
146
|
},
|
|
147
147
|
"overrides": {
|
|
148
148
|
"@nestjs/platform-fastify": {
|
|
149
|
-
"fastify": "
|
|
149
|
+
"fastify": "5.5.0"
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"maintainers": [
|
|
@@ -285,6 +285,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
285
285
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
286
286
|
SOFTWARE.
|
|
287
287
|
|
|
288
|
+
--------------------------------------------------------------------------------
|
|
289
|
+
Package: ng-inline-svg-2
|
|
290
|
+
License: "MIT"
|
|
291
|
+
|
|
292
|
+
The MIT License (MIT)
|
|
293
|
+
|
|
294
|
+
Copyright (c) 2016 Eugene Cheung
|
|
295
|
+
|
|
296
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
297
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
298
|
+
in the Software without restriction, including without limitation the rights
|
|
299
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
300
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
301
|
+
furnished to do so, subject to the following conditions:
|
|
302
|
+
|
|
303
|
+
The above copyright notice and this permission notice shall be included in
|
|
304
|
+
all copies or substantial portions of the Software.
|
|
305
|
+
|
|
306
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
307
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
308
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
309
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
310
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
311
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
312
|
+
THE SOFTWARE.
|
|
313
|
+
|
|
288
314
|
--------------------------------------------------------------------------------
|
|
289
315
|
Package: @kurkle/color
|
|
290
316
|
License: "MIT"
|
|
@@ -545,10 +571,12 @@ SOFTWARE.
|
|
|
545
571
|
Package: fast-uri
|
|
546
572
|
License: "BSD-3-Clause"
|
|
547
573
|
|
|
548
|
-
Copyright (c) 2021 The Fastify Team
|
|
549
574
|
Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
|
|
575
|
+
Copyright (c) 2021-present The Fastify team
|
|
550
576
|
All rights reserved.
|
|
551
577
|
|
|
578
|
+
The Fastify team members are listed at https://github.com/fastify/fastify#team.
|
|
579
|
+
|
|
552
580
|
Redistribution and use in source and binary forms, with or without
|
|
553
581
|
modification, are permitted provided that the following conditions are met:
|
|
554
582
|
* Redistributions of source code must retain the above copyright
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
2
|
+
<svg
|
|
3
|
+
width="32px"
|
|
4
|
+
height="32px"
|
|
5
|
+
viewBox="0 0 32 32"
|
|
6
|
+
version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
+
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
|
|
10
|
+
>
|
|
11
|
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
|
12
|
+
<title>bulb</title>
|
|
13
|
+
<desc>Created with Sketch.</desc>
|
|
14
|
+
<defs />
|
|
15
|
+
<g id="flatten" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
|
16
|
+
<g id="z-copy" sketch:type="MSArtboardGroup" transform="translate(-4.000000, -4.000000)" fill="#000000">
|
|
17
|
+
<g id="accessoryIcon" sketch:type="MSLayerGroup" transform="translate(4.000000, 4.000000)">
|
|
18
|
+
<path
|
|
19
|
+
d="M8.04893656,20.9879868 C5.56555168,18.7894577 4,15.5775559 4,12 C4,5.372583 9.372583,0 16,0 C22.627417,0 28,5.372583 28,12 C28,15.5351969 26.4713018,18.7133471 24.0388879,20.9094684 C22.8714144,21.9635298 22.3935361,26.314352 21.2275404,29.0298342 C20.2686082,31.263087 18.8677424,32.0416197 16.0327148,31.9748535 C13.2665152,31.9097083 11.7263284,31.2123902 10.7692871,29.0864258 C9.55282281,26.3841811 9.23382169,22.0369601 8.04893656,20.9879868 L8.04893656,20.9879868 Z M6,12 C6,6.4771525 10.4771525,2 16,2 C21.5228475,2 26,6.4771525 26,12 C26,13.4039787 25.7097455,14.7600975 25.1685764,16 L6.83144854,16 C6.29038009,14.7602736 6,13.4041311 6,12 L6,12 Z M10.4462142,21 C10.1610402,20.3571063 9.8320342,19.8954144 9.37465546,19.4904991 C8.55828153,18.7677671 7.87243458,17.9262861 7.33680389,17 L7.33680389,17 L24.66319,17 C24.1437667,17.8981932 23.482983,18.7168207 22.6986172,19.4249906 C22.2402726,19.8388101 21.9047051,20.3213336 21.6043283,21 L10.4462142,21 L10.4462142,21 L10.4462142,21 Z M11.1018052,23 C11.1720882,23.2658547 11.2440709,23.5508756 11.3192464,23.8572605 C11.3437376,23.9570767 11.5960867,25.004759 11.7045027,25.4435106 L11.7045027,25.4435106 L20.8873043,23.1382947 C20.9002539,23.0916455 20.9131357,23.0455506 20.9259569,23 L11.1018052,23 L11.1018052,23 L11.1018052,23 Z M12.5749549,28.2249957 C12.3621958,27.7446626 12.1664961,27.1655223 11.9572719,26.4110846 L11.9572719,26.4110846 L20.5928403,24.2432441 C20.4835056,24.6645271 20.3300954,25.2573517 20.2770527,25.4580134 C20.1911713,25.7829042 20.1100328,26.0797864 20.0319804,26.353012 L12.5749542,28.2249958 L12.5749549,28.2249957 L12.5749549,28.2249957 Z M13.1241608,29.1181532 C13.6755154,29.7210257 14.4995511,29.9381923 16.0798027,29.9754079 C18.1496378,30.0241534 18.7757989,29.6706585 19.3897941,28.2407279 C19.4897734,28.0078865 19.586616,27.7549737 19.6843919,27.4712975 L13.1241608,29.1181532 L13.1241608,29.1181532 L13.1241608,29.1181532 Z M8.49999999,12.0473103 C8,12.0473103 8.02221433,11.3092774 8.06530214,10.9730396 C8.52717694,7.36877756 11.387523,4.51476445 14.9947964,4.06254437 C15.2453908,4.031129 16.0447247,4.00000003 16.0447247,4.50000001 C16.0447247,5 14.9166805,5.08331953 14.9166805,5.08331953 C11.918172,5.5491681 9.5491681,7.91817199 9.08331953,10.9166805 C9.08331953,10.9166805 8.99999997,12.0473103 8.49999999,12.0473103 L8.49999999,12.0473103 Z"
|
|
20
|
+
sketch:type="MSShapeGroup"
|
|
21
|
+
/>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
2
|
+
<svg
|
|
3
|
+
width="32px"
|
|
4
|
+
height="32px"
|
|
5
|
+
viewBox="0 0 32 32"
|
|
6
|
+
version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
+
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
|
|
10
|
+
>
|
|
11
|
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
|
12
|
+
<title>socket i</title>
|
|
13
|
+
<desc>Created with Sketch.</desc>
|
|
14
|
+
<defs />
|
|
15
|
+
<g id="flatten" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
|
16
|
+
<g id="z-copy" sketch:type="MSArtboardGroup" transform="translate(-36.000000, -132.000000)" fill="#000000">
|
|
17
|
+
<g id="accessoryIcon" sketch:type="MSLayerGroup" transform="translate(36.000000, 132.000000)">
|
|
18
|
+
<path
|
|
19
|
+
d="M0,6.00017566 C0,2.68637015 2.68697795,0 6.00017566,0 L25.9998243,0 C29.3136299,0 32,2.68697795 32,6.00017566 L32,25.9998243 C32,29.3136299 29.3130221,32 25.9998243,32 L6.00017566,32 C2.68637015,32 0,29.3130221 0,25.9998243 L0,6.00017566 L0,6.00017566 Z M2,6.00017566 L2,25.9998243 C2,28.2086938 3.79118088,30 6.00017566,30 L25.9998243,30 C28.2086938,30 30,28.2088191 30,25.9998243 L30,6.00017566 C30,3.7913062 28.2088191,2 25.9998243,2 L6.00017566,2 C3.7913062,2 2,3.79118088 2,6.00017566 L2,6.00017566 Z M4,9.00197269 C4,6.23945945 6.23630996,4 9.00197269,4 L22.9980273,4 C25.7605405,4 28,6.23630996 28,9.00197269 L28,22.9980273 C28,25.7605405 25.76369,28 22.9980273,28 L9.00197269,28 C6.23945945,28 4,25.76369 4,22.9980273 L4,9.00197269 L4,9.00197269 Z M5,9.00197269 L5,22.9980273 C5,25.2102201 6.79055863,27 9.00197269,27 L22.9980273,27 C25.2102201,27 27,25.2094414 27,22.9980273 L27,9.00197269 C27,6.78977986 25.2094414,5 22.9980273,5 L9.00197269,5 C6.78977986,5 5,6.79055863 5,9.00197269 L5,9.00197269 Z M16,25 C11.0294373,25 7,20.9705627 7,16 C7,11.0294373 11.0294373,7 16,7 C20.9705627,7 25,11.0294373 25,16 C25,20.9705627 20.9705627,25 16,25 L16,25 Z M16,24 C20.418278,24 24,20.418278 24,16 C24,11.581722 20.418278,8 16,8 C11.581722,8 8,11.581722 8,16 C8,20.418278 11.581722,24 16,24 L16,24 Z M16,21 C15.4477153,21 15,20.5566468 15,19.9906311 L15,18.0093689 C15,17.4519098 15.4438648,17 16,17 C16.5522847,17 17,17.4433532 17,18.0093689 L17,19.9906311 C17,20.5480902 16.5561352,21 16,21 L16,21 Z M17.2679492,13 C17.5440916,12.5217074 18.1519043,12.3556512 18.6420883,12.638659 L20.3579117,13.6292901 C20.8406854,13.9080197 21.0101184,14.5183728 20.7320508,15 C20.4559084,15.4782926 19.8480957,15.6443488 19.3579117,15.361341 L17.6420883,14.3707099 C17.1593146,14.0919803 16.9898816,13.4816272 17.2679492,13 L17.2679492,13 Z M11.2679492,15 C10.9918068,14.5217074 11.1519043,13.912298 11.6420883,13.6292901 L13.3579117,12.638659 C13.8406854,12.3599295 14.4539832,12.5183728 14.7320508,13 C15.0081932,13.4782926 14.8480957,14.087702 14.3579117,14.3707099 L12.6420883,15.361341 C12.1593146,15.6400705 11.5460168,15.4816272 11.2679492,15 L11.2679492,15 Z"
|
|
20
|
+
sketch:type="MSShapeGroup"
|
|
21
|
+
/>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
2
|
+
<svg
|
|
3
|
+
width="32px"
|
|
4
|
+
height="32px"
|
|
5
|
+
viewBox="0 0 32 32"
|
|
6
|
+
version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
+
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
|
|
10
|
+
>
|
|
11
|
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
|
12
|
+
<title>power button</title>
|
|
13
|
+
<desc>Created with Sketch.</desc>
|
|
14
|
+
<defs />
|
|
15
|
+
<g id="flatten" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
|
16
|
+
<g id="z-copy" sketch:type="MSArtboardGroup" transform="translate(-100.000000, -132.000000)" fill="#000000">
|
|
17
|
+
<g id="accessoryIcon" sketch:type="MSLayerGroup" transform="translate(100.000000, 132.000000)">
|
|
18
|
+
<path
|
|
19
|
+
d="M16,32 C24.836556,32 32,24.836556 32,16 C32,7.163444 24.836556,0 16,0 C7.163444,0 0,7.163444 0,16 C0,24.836556 7.163444,32 16,32 Z M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 Z M15,7.99754465 C15,7.44661595 15.4438648,7 16,7 C16.5522847,7 17,7.4463114 17,7.99754465 L17,15.0024554 C17,15.553384 16.5561352,16 16,16 C15.4477153,16 15,15.5536886 15,15.0024554 L15,7.99754465 Z M21.4589329,9.49999998 C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426 C22.4505994,12.4811551 23,14.065977 23,15.7447101 C23,19.7640218 19.8532802,23 16,23 C12.1467198,23 9,19.7640218 9,15.7447101 C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389 C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999 C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372 C7.75536735,11.4998488 7,13.5315645 7,15.7447101 C7,20.8562656 11.0294373,25 16,25 C20.9705627,25 25,20.8562656 25,15.7447101 C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685 C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z"
|
|
20
|
+
sketch:type="MSShapeGroup"
|
|
21
|
+
/>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
2
|
+
<svg
|
|
3
|
+
width="32px"
|
|
4
|
+
height="32px"
|
|
5
|
+
viewBox="0 0 32 32"
|
|
6
|
+
version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
+
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
|
|
10
|
+
>
|
|
11
|
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
|
12
|
+
<title>power</title>
|
|
13
|
+
<desc>Created with Sketch.</desc>
|
|
14
|
+
<defs />
|
|
15
|
+
<g id="flatten" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
|
16
|
+
<g id="z-copy" sketch:type="MSArtboardGroup" transform="translate(-4.000000, -36.000000)" fill="#000000">
|
|
17
|
+
<g id="accessoryIcon" sketch:type="MSLayerGroup" transform="translate(4.000000, 36.000000)">
|
|
18
|
+
<path
|
|
19
|
+
d="M16,32 C24.836556,32 32,24.836556 32,16 C32,7.163444 24.836556,0 16,0 C7.163444,0 0,7.163444 0,16 C0,24.836556 7.163444,32 16,32 L16,32 Z M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 L16,30 Z M12.2575393,17.7112593 L12.1868707,17.7112593 C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726 L16.4805582,7.35415962 C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963 L15.7252918,12.6132252 C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291 L20.1977772,14.5048291 L20.1846183,14.5177121 L20.2552868,14.5177121 C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988 L16.1844844,24.5082506 C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402 L16.7168658,19.6157462 C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422 L12.2443804,17.7241422 L12.2575393,17.7112593 L12.2575393,17.7112593 Z"
|
|
20
|
+
sketch:type="MSShapeGroup"
|
|
21
|
+
/>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./chunk-
|
|
1
|
+
import{c as t}from"./chunk-VPT3FTAG.js";import{b as i}from"./chunk-LVQGJ2B5.js";import{ha as o,qb as r}from"./chunk-OTQCO6QF.js";var f=(()=>{class e{static \u0275fac=function(s){return new(s||e)};static \u0275mod=r({type:e});static \u0275inj=o({providers:[t],imports:[i]})}return e})();export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-X5R4UHSV.js";import{a as S}from"./chunk-V2CYUM6X.js";import"./chunk-GK2FJAIA.js";import"./chunk-MCHXOMUK.js";import"./chunk-QUAAVQGQ.js";import"./chunk-CHVOUSYH.js";import"./chunk-TJXKMEJL.js";import"./chunk-Z5XI7ADB.js";import{b as C}from"./chunk-QBUMDNNR.js";import"./chunk-LCNBB75Q.js";import{b as w}from"./chunk-6U5EVCLL.js";import"./chunk-O4QZ4POF.js";import{Oc as y,Pc as b,Xb as m,Yb as l,Zb as h,Zc as $,cb as a,db as c,gc as v,la as o,n as d,pb as u,pc as f,qc as p,vc as g,wc as T}from"./chunk-OTQCO6QF.js";var _=["terminaloutput"],A=(()=>{class r{$terminal=o(S);$settings=o(C);$navigationGuard=o(E);resizeEvent=new d;termTarget=$("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(t){return this.$navigationGuard.handleBeforeUnload(t)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),{},this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent)),setTimeout(()=>{this.activateTerminal()},100)}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&setTimeout(()=>{this.activateTerminal()},100)}canDeactivate(){return this.$navigationGuard.canDeactivate()}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("bg-black"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=u({type:r,selectors:[["ng-component"]],viewQuery:function(e,i){e&1&&f(i.termTarget,_,5),e&2&&p()},hostBindings:function(e,i){e&1&&v("resize",function(n){return i.onWindowResize(n)},a)("beforeunload",function(n){return i.onBeforeUnload(n)},a)("focus",function(n){return i.onWindowFocus(n)},a)("click",function(n){return i.onClick(n)})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,i){e&1&&(m(0,"div",1)(1,"div",2)(2,"h3",3),g(3),y(4,"translate"),l()()(),m(5,"div",4),h(6,"div",5,0),l()),e&2&&(c(3),T(b(4,1,"menu.linux.label_terminal")))},dependencies:[w],encapsulation:2})}return r})();export{A as TerminalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as i}from"./chunk-
|
|
1
|
+
import{g as i}from"./chunk-CNO7HM45.js";import"./chunk-O4QZ4POF.js";import{ha as t,qb as e}from"./chunk-OTQCO6QF.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-LJ2VDV7E.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-LYUFPCJS.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-PM76DNNB.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as H}from"./chunk-
|
|
1
|
+
import{b as H}from"./chunk-PETLNERF.js";import{a as L,b as S}from"./chunk-LVQGJ2B5.js";import{m as T}from"./chunk-QUAAVQGQ.js";import{b as B}from"./chunk-6U5EVCLL.js";import{$a as O,Fc as I,Kb as C,Nb as r,Ob as l,Oc as g,Pc as _,Tb as p,Ub as i,Vb as a,Wb as m,_a as u,db as o,dc as k,gc as b,ic as d,la as h,pb as v,ra as x,sa as P,uc as y,vc as f,wc as w,xc as M}from"./chunk-OTQCO6QF.js";function E(t,c){if(t&1&&m(0,"i",16),t&2){let n=d();y(I("fas fa-fw ",n.faIconClass," mb-3"))}}function z(t,c){if(t&1&&m(0,"h5",6),t&2){let n=d();p("innerHTML",n.subtitle,u)}}function V(t,c){if(t&1&&m(0,"p",8),t&2){let n=d();p("innerHTML",n.message2,u)}}function D(t,c){if(t&1&&m(0,"markdown",9),t&2){let n=d();p("data",n.markdownMessage2)}}function N(t,c){if(t&1){let n=k();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return P(e.dismissModal())}),f(2),g(3,"translate"),a()}t&2&&(C("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function j(t,c){if(t&1){let n=k();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return P(e.dismissModal())}),f(2),g(3,"translate"),a()}t&2&&(C("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function A(t,c){if(t&1&&(i(0,"a",15),f(1),m(2,"i",18),a()),t&2){let n=d();p("href",n.ctaButtonLink,O),o(),M(" ",n.ctaButtonLabel," ")}}var X=(()=>{class t{$activeModal=h(T);title;subtitle;message;message2;ctaButtonLabel;ctaButtonLink;faIconClass;markdownMessage2;dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=v({type:t,selectors:[["ng-component"]],inputs:{title:"title",subtitle:"subtitle",message:"message",message2:"message2",ctaButtonLabel:"ctaButtonLabel",ctaButtonLink:"ctaButtonLink",faIconClass:"faIconClass",markdownMessage2:"markdownMessage2"},decls:19,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-3",3,"innerHTML"],[1,"mb-0",3,"innerHTML"],[1,"mb-0","mt-3",3,"innerHTML"],[1,"plugin-md",3,"data"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-fw","fa-external-link-alt"]],template:function(s,e){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),f(3),a(),i(4,"button",3),g(5,"translate"),b("click",function(){return e.dismissModal()}),a()(),i(6,"div",4),r(7,E,1,3,"i",5),r(8,z,1,1,"h5",6),m(9,"p",7),r(10,V,1,1,"p",8),r(11,D,1,1,"markdown",9),a(),i(12,"div",10)(13,"div",11),r(14,N,4,6,"button",12),a(),i(15,"div",13),r(16,j,4,6,"button",12),a(),i(17,"div",14),r(18,A,3,2,"a",15),a()()()),s&2&&(o(3),w(e.title),o(),C("aria-label",_(5,10,"form.button_close")),o(3),l(e.faIconClass?7:-1),o(),l(e.subtitle?8:-1),o(),p("innerHTML",e.message,u),o(),l(e.message2?10:-1),o(),l(e.markdownMessage2?11:-1),o(3),l(e.ctaButtonLink?14:-1),o(2),l(e.ctaButtonLink?-1:16),o(2),l(e.ctaButtonLink?18:-1))},dependencies:[S,L,H,B],styles:["[_nghost-%COMP%] .plugin-md{display:block!important;background-color:#f6f8fa!important;border-radius:6px!important;padding:16px!important;margin:16px auto!important;width:100%!important;max-width:632px!important}[_nghost-%COMP%] .plugin-md table{width:100%;max-width:600px;margin:0 auto!important;border-collapse:collapse;border:1px solid #d0d7de!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif!important;font-size:14px!important;color:#24292e!important}[_nghost-%COMP%] .plugin-md th, [_nghost-%COMP%] .plugin-md td{padding:6px 13px!important;border:1px solid #d0d7de!important;text-align:left;color:#24292e!important}[_nghost-%COMP%] .plugin-md th{background-color:#f6f8fa!important;font-weight:600!important;text-align:center!important}[_nghost-%COMP%] .plugin-md td[align=center]{text-align:center!important}[_nghost-%COMP%] .plugin-md tr{color:#24292e!important}[_nghost-%COMP%] .plugin-md tr:nth-child(odd){background-color:#fff!important}[_nghost-%COMP%] .plugin-md tr:nth-child(2n){background-color:#f6f8fa!important}[_nghost-%COMP%] .plugin-md tr:hover{background-color:#f0f2f5!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%]{background-color:#2b2b2b!important;color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] table[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#3c3c3c!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#323232!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#2b2b2b!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#454545!important}"]})}return t})();export{X as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b}from"./chunk-
|
|
1
|
+
import{e as b}from"./chunk-OTQCO6QF.js";var L=b((p,v)=>{(function(d,r){typeof define=="function"&&define.amd?define([],r):typeof p<"u"?r():(r(),d.FileSaver={})})(p,function(){"use strict";function d(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,i)},n.onerror=function(){console.error("could not download file")},n.send()}function w(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,i){var n=a.URL||a.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?s(o):w(o.href)?r(e,t,i):s(o,o.target="_blank")):(o.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){s(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(d(e,i),t);else if(w(e))r(e,t,i);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){s(n)})}}:function(e,t,i,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var o=e.type==="application/octet-stream",E=/constructor/i.test(a.HTMLElement)||a.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&E||m)&&typeof FileReader<"u"){var u=new FileReader;u.onloadend=function(){var c=u.result;c=y?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=c:location=c,n=null},u.readAsDataURL(e)}else{var h=a.URL||a.webkitURL,f=h.createObjectURL(e);n?n.location=f:location.href=f,n=null,setTimeout(function(){h.revokeObjectURL(f)},4e4)}});a.saveAs=l.saveAs=l,typeof v<"u"&&(v.exports=l)})});export{L as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-OIGVYJ2D.js";import"./chunk-Z5XI7ADB.js";import{g as r}from"./chunk-CNO7HM45.js";import"./chunk-QBUMDNNR.js";import"./chunk-LCNBB75Q.js";import"./chunk-6U5EVCLL.js";import"./chunk-O4QZ4POF.js";import{ha as o,qb as e}from"./chunk-OTQCO6QF.js";var c=[{path:"",loadComponent:()=>import("./chunk-FWGBG4GE.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as A,$c as H,B as D,C as I,D as E,Fa as k,L as K,O as L,Y as O,a as w,e as G,ga as u,ja as B,la as o,n as T,r as m,sb as z,t as h,x as S}from"./chunk-OTQCO6QF.js";var J=G((Fe,oe)=>{oe.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.5.0",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.1","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.6","@nestjs/core":"11.1.6","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.6","@nestjs/platform-socket.io":"11.1.6","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.6",axios:"1.11.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.15",fastify:"5.5.0","fs-extra":"11.3.1",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"8.2.0",otplib:"12.0.1","p-limit":"7.1.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.8",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^5.2.1","@nestjs/testing":"^11.1.6","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.3.0","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.1","eslint-plugin-format":"^1.0.1","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.4","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.9.2","unplugin-swc":"^1.5.7",vitest:"^3.2.4"},overrides:{"@nestjs/platform-fastify":{fastify:"5.5.0"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=class{},W=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),f=class{},Z=(()=>{class t extends f{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=k(t)))(r||t)}})();static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),p=class{},Q=(()=>{class t extends p{getTranslation(e){return m({})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=k(t)))(r||t)}})();static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})();function F(t,a){if(t===a)return!0;if(t===null||a===null)return!1;if(t!==t&&a!==a)return!0;let e=typeof t,n=typeof a,r;if(e==n&&e=="object")if(Array.isArray(t)){if(!Array.isArray(a))return!1;if((r=t.length)==a.length){for(let s=0;s<r;s++)if(!F(t[s],a[s]))return!1;return!0}}else{if(Array.isArray(a))return!1;if(l(t)&&l(a)){let s=Object.create(null);for(let i in t){if(!F(t[i],a[i]))return!1;s[i]=!0}for(let i in a)if(!(i in s)&&typeof a[i]<"u")return!1;return!0}}return!1}function c(t){return typeof t<"u"&&t!==null}function _(t){return t!==void 0}function l(t){return y(t)&&!d(t)&&t!==null}function y(t){return typeof t=="object"&&t!==null}function d(t){return Array.isArray(t)}function x(t){return typeof t=="string"}function X(t){return typeof t=="function"}function j(t){if(d(t))return t.map(a=>j(a));if(l(t)){let a={};return Object.keys(t).forEach(e=>{a[e]=j(t[e])}),a}else return t}function V(t,a){if(!y(t))return j(a);let e=j(t);return y(e)&&y(a)&&Object.keys(a).forEach(n=>{l(a[n])?n in t?e[n]=V(t[n],a[n]):Object.assign(e,{[n]:a[n]}):Object.assign(e,{[n]:a[n]})}),e}function $(t,a){let e=a.split(".");a="";do{a+=e.shift();let n=!e.length;if(c(t)){if(l(t)&&_(t[a])&&(l(t[a])||d(t[a])||n)){t=t[a],a="";continue}if(d(t)){let r=parseInt(a,10);if(_(t[r])&&(l(t[r])||d(t[r])||n)){t=t[r],a="";continue}}}if(n){t=void 0;continue}a+="."}while(e.length);return t}function Y(t,a,e){return V(t,ee(a,e))}function ee(t,a){return t.split(".").reduceRight((e,n)=>({[n]:e}),a)}var b=class{},te=(()=>{class t extends b{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(x(e))return this.interpolateString(e,n);if(X(e))return this.interpolateFunction(e,n)}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(r,s)=>{let i=this.getInterpolationReplacement(n,s);return i!==void 0?i:r}):e}getInterpolationReplacement(e,n){return this.formatValue($(e,n))}formatValue(e){if(x(e))return e;if(typeof e=="number"||typeof e=="boolean")return e.toString();if(e===null)return"null";if(d(e))return e.join(", ");if(y(e))return typeof e.toString=="function"&&e.toString!==Object.prototype.toString?e.toString():JSON.stringify(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=k(t)))(r||t)}})();static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),P=(()=>{class t{_onTranslationChange=new T;_onLangChange=new T;_onFallbackLangChange=new T;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(e){return this.translations[e]}setTranslations(e,n,r){this.translations[e]=r&&this.hasTranslationFor(e)?V(this.translations[e],n):n,this.addLanguages([e]),this._onTranslationChange.next({lang:e,translations:this.getTranslations(e)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(e,n=!0){this.fallbackLang=e,n&&this._onFallbackLangChange.next({lang:e,translations:this.translations[e]})}setCurrentLang(e,n=!0){this.currentLang=e,n&&this._onLangChange.next({lang:e,translations:this.translations[e]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(e){this.languages=Array.from(new Set([...this.languages,...e]))}hasTranslationFor(e){return typeof this.translations[e]<"u"}deleteTranslations(e){delete this.translations[e]}getTranslation(e){let n=this.getValue(this.currentLang,e);return n===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(n=this.getValue(this.fallbackLang,e)),n}getValue(e,n){return $(this.getTranslations(e),n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),R=new B("TRANSLATE_CONFIG"),C=t=>h(t)?t:m(t);var M=(()=>{class t{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=o(p);compiler=o(f);parser=o(b);missingTranslationHandler=o(v);store=o(P);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let e=w({extend:!1,fallbackLang:null},o(R,{optional:!0}));e.lang&&this.use(e.lang),e.fallbackLang&&this.setFallbackLang(e.fallbackLang),e.extend&&(this.extend=!0)}setFallbackLang(e){this.getFallbackLang()||this.store.setFallbackLang(e,!1);let n=this.loadOrExtendLanguage(e);return h(n)?(n.pipe(L(1)).subscribe({next:()=>{this.store.setFallbackLang(e)},error:()=>{}}),n):(this.store.setFallbackLang(e),m(this.store.getTranslations(e)))}use(e){this.lastUseLanguage=e,this.getCurrentLang()||this.store.setCurrentLang(e,!1);let n=this.loadOrExtendLanguage(e);return h(n)?(n.pipe(L(1)).subscribe({next:()=>{this.changeLang(e)},error:()=>{}}),n):(this.changeLang(e),m(this.store.getTranslations(e)))}loadOrExtendLanguage(e){if(!this.store.hasTranslationFor(e)||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}changeLang(e){e===this.lastUseLanguage&&this.store.setCurrentLang(e)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(e){this.pending=!0;let n=this.currentLoader.getTranslation(e).pipe(O(1),L(1));return this.loadingTranslations=n.pipe(S(r=>this.compiler.compileTranslations(r,e)),O(1),L(1)),this.loadingTranslations.subscribe({next:r=>{this.store.setTranslations(e,r,this.extend),this.pending=!1},error:r=>{this.pending=!1}}),n}setTranslation(e,n,r=!1){let s=this.compiler.compileTranslations(n,e);this.store.setTranslations(e,s,r||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(e){this.store.addLanguages(e)}getParsedResultForKey(e,n){let r=this.getTextToInterpolate(e);if(c(r))return this.runInterpolation(r,n);let s=this.missingTranslationHandler.handle(w({key:e,translateService:this},n!==void 0&&{interpolateParams:n}));return s!==void 0?s:e}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(e){return this.store.getTranslation(e)}runInterpolation(e,n){if(c(e))return d(e)?this.runInterpolationOnArray(e,n):l(e)?this.runInterpolationOnDict(e,n):this.parser.interpolate(e,n)}runInterpolationOnArray(e,n){return e.map(r=>this.runInterpolation(r,n))}runInterpolationOnDict(e,n){let r={};for(let s in e){let i=this.runInterpolation(e[s],n);i!==void 0&&(r[s]=i)}return r}getParsedResult(e,n){return e instanceof Array?this.getParsedResultForArray(e,n):this.getParsedResultForKey(e,n)}getParsedResultForArray(e,n){let r={},s=!1;for(let g of e)r[g]=this.getParsedResultForKey(g,n),s=s||h(r[g]);if(!s)return r;let i=e.map(g=>C(r[g]));return E(i).pipe(S(g=>{let N={};return g.forEach((U,q)=>{N[e[q]]=U}),N}))}get(e,n){if(!c(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(K(()=>C(this.getParsedResult(e,n)))):C(this.getParsedResult(e,n))}getStreamOnTranslationChange(e,n){if(!c(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return D(I(()=>this.get(e,n)),this.onTranslationChange.pipe(A(()=>{let r=this.getParsedResult(e,n);return C(r)})))}stream(e,n){if(!c(e)||!e.length)throw new Error('Parameter "key" required');return D(I(()=>this.get(e,n)),this.onLangChange.pipe(A(()=>{let r=this.getParsedResult(e,n);return C(r)})))}instant(e,n){if(!c(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let r=this.getParsedResult(e,n);return h(r)?Array.isArray(e)?e.reduce((s,i)=>(s[i]=i,s),{}):e:r}set(e,n,r=this.getCurrentLang()){this.store.setTranslations(r,Y(this.store.getTranslations(r),e,x(n)?this.compiler.compile(n,r):this.compiler.compileTranslations(n,r)),!1)}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],this.store.deleteTranslations(e)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return t.getBrowserLang()}getBrowserCultureLang(){return t.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(e){return this.setFallbackLang(e)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})();var ve=(()=>{class t{translate=o(M);_ref=o(H);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(e,n,r){let s=i=>{this.value=i!==void 0?i:e,this.lastKey=e,this._ref.markForCheck()};if(r){let i=this.translate.getParsedResult(e,n);h(i)?i.subscribe(s):s(i)}this.translate.get(e,n).subscribe(s)}transform(e,...n){if(!e||!e.length)return e;if(F(e,this.lastKey)&&F(n,this.lastParams))return this.value;let r;if(c(n[0])&&n.length)if(x(n[0])&&n[0].length){let s=n[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{r=JSON.parse(s)}catch(i){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else l(n[0])&&(r=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,r),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(s=>{(this.lastKey&&s.lang===this.translate.getCurrentLang()||s.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(e,r,s.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(s=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r,s.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=z({name:"translate",type:t,pure:!1});static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})();function ne(t){return{provide:p,useClass:t}}function re(t){return{provide:f,useClass:t}}function ae(t){return{provide:b,useClass:t}}function se(t){return{provide:v,useClass:t}}function we(t={}){return ie(w({compiler:re(Z),parser:ae(te),loader:ne(Q),missingTranslationHandler:se(W)},t),!0)}function ie(t={},a){let e=[];t.loader&&e.push(t.loader),t.compiler&&e.push(t.compiler),t.parser&&e.push(t.parser),t.missingTranslationHandler&&e.push(t.missingTranslationHandler),a&&e.push(P),(t.useDefaultLang||t.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),t.useDefaultLang===!0&&t.defaultLanguage&&(t.fallbackLang=t.defaultLanguage));let n={fallbackLang:t.fallbackLang??null,lang:t.lang,extend:t.extend??!1};return e.push({provide:R,useValue:n}),e.push({provide:M,useClass:M,deps:[P,p,f,b,v,R]}),e}var xe={serverTarget:J().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};export{M as a,ve as b,we as c,xe as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as Q,c as $,d as C,e as B,f as O,g as T,j as w,m as q,p as z,q as D,w as H,x as A,z as G}from"./chunk-CHVOUSYH.js";import{b as K}from"./chunk-Z5XI7ADB.js";import{d as U}from"./chunk-CNO7HM45.js";import{b as J}from"./chunk-QBUMDNNR.js";import"./chunk-LCNBB75Q.js";import{b as j,d as W}from"./chunk-6U5EVCLL.js";import"./chunk-O4QZ4POF.js";import{$c as L,Gd as P,Ic as f,M as I,Nb as u,Ob as c,Oc as l,Pc as d,Tb as m,Ub as r,Vb as a,Wb as s,Zc as b,_a as x,db as i,gc as E,h as y,ic as M,la as p,pb as k,pc as v,pd as N,qc as F,sd as V,vc as g,w as S,wc as h,xc as R}from"./chunk-OTQCO6QF.js";var Y=["password"],Z=["username"],ee=["otp"],te=e=>({background:e}),ie=e=>({anim:e}),X=e=>({"is-invalid":e});function ne(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let n=M();i(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",f(8,X,n.form.controls.username.dirty&&n.form.controls.username.errors)),i(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",f(10,X,n.form.controls.password.dirty&&n.form.controls.password.errors))}}function oe(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(i(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function ae(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_credentials")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_code")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var _e=(()=>{class e{$auth=p(K);$cdr=p(L);$router=p(U);$settings=p(J);targetRoute;validNonAdminRoutes=["/accessories","/plugins","/logs","/support"];passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;form;ngOnInit(){this.form=new T({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(n=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==n.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.$cdr.detectChanges()}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let n=this.passwordInput()?.nativeElement.value;n&&n!==this.form.get("password").value&&this.form.controls.password.setValue(n);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),!this.$auth.user.admin&&!this.validNonAdminRoutes.includes(this.targetRoute)&&(this.targetRoute="/"),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let n=`${W.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${n}') center/cover`}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Y,5),v(t.usernameInput,Z,5),v(t.otpInput,ee,5)),o&2&&F(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),E("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),g(5),l(6,"translate"),a(),u(7,ne,12,12),u(8,oe,6,3,"div",8),u(9,ae,9,6,"div",9),u(10,re,9,6,"div",9),r(11,"div",10)(12,"button",11),g(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",f(14,te,t.backgroundStyle))("ngClass",f(16,ie,!t.backgroundStyle)),i(3),m("formGroup",t.form),i(2),h(d(6,10,"setup.welcome_to_homebridge")),i(2),c(t.twoFactorCodeRequired?-1:7),i(),c(t.twoFactorCodeRequired?8:-1),i(),c(t.invalidCredentials?9:-1),i(),c(t.invalid2faCode?10:-1),i(2),m("disabled",t.form.invalid),i(),R(" ",d(14,12,"form.button_continue")," "))},dependencies:[V,G,q,$,B,O,H,A,Q,z,D,N,P,j],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{_e as LoginComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ca as xe,Fa as Se,H as ee,e as $,fa as Ce,g as yt,ga as Me,gb as te,i as Q,ja as ye,n as Z,nb as Oe,ob as ke,ub as Ie,x as we}from"./chunk-H36QJYLQ.js";var $e=$((Jt,De)=>{De.exports=function(r,a){return Array.prototype.slice.call(r,a)}});var Ne=$((Qt,Re)=>{var xt=typeof setImmediate=="function",re;xt?re=function(e){setImmediate(e)}:re=function(e){setTimeout(e,0)};Re.exports=re});var Ye=$((Zt,Xe)=>{"use strict";var St=Ne();Xe.exports=function(r,a,t){r&&St(function(){r.apply(t||null,a||[])})}});var Be=$((er,je)=>{"use strict";var Fe=$e(),Ot=Ye();je.exports=function(r,a){var t=a||{},n={};return r===void 0&&(r={}),r.on=function(i,s){return n[i]?n[i].push(s):n[i]=[s],r},r.once=function(i,s){return s._once=!0,r.on(i,s),r},r.off=function(i,s){var u=arguments.length;if(u===1)delete n[i];else if(u===0)n={};else{var f=n[i];if(!f)return r;f.splice(f.indexOf(s),1)}return r},r.emit=function(){var i=Fe(arguments);return r.emitterSnapshot(i.shift()).apply(this,i)},r.emitterSnapshot=function(i){var s=(n[i]||[]).slice(0);return function(){var u=Fe(arguments),f=this||r;if(i==="error"&&t.throws!==!1&&!s.length)throw u.length===1?u[0]:u;return s.forEach(function(p){t.async?Ot(p,u,f):p.apply(f,u),p._once&&r.off(i,p)}),r}},r}});var qe=$((tr,Ae)=>{var Pe=global.CustomEvent;function kt(){try{var e=new Pe("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}Ae.exports=kt()?Pe:typeof document<"u"&&typeof document.createEvent=="function"?function(r,a){var t=document.createEvent("CustomEvent");return a?t.initCustomEvent(r,a.bubbles,a.cancelable,a.detail):t.initCustomEvent(r,!1,!1,void 0),t}:function(r,a){var t=document.createEventObject();return t.type=r,a?(t.bubbles=!!a.bubbles,t.cancelable=!!a.cancelable,t.detail=a.detail):(t.bubbles=!1,t.cancelable=!1,t.detail=void 0),t}});var Ge=$((rr,Ve)=>{"use strict";var Te=[],ne="",It=/^on/;for(ne in global)It.test(ne)&&Te.push(ne.slice(2));Ve.exports=Te});var Ke=$((nr,ze)=>{"use strict";var Dt=qe(),$t=Ge(),H=global.document,He=Rt,Le=Xt,q=[];global.addEventListener||(He=Nt,Le=Yt);ze.exports={add:He,remove:Le,fabricate:Ft};function Rt(e,r,a,t){return e.addEventListener(r,a,t)}function Nt(e,r,a){return e.attachEvent("on"+r,Bt(e,r,a))}function Xt(e,r,a,t){return e.removeEventListener(r,a,t)}function Yt(e,r,a){var t=_e(e,r,a);if(t)return e.detachEvent("on"+r,t)}function Ft(e,r,a){var t=$t.indexOf(r)===-1?i():n();e.dispatchEvent?e.dispatchEvent(t):e.fireEvent("on"+r,t);function n(){var s;return H.createEvent?(s=H.createEvent("Event"),s.initEvent(r,!0,!0)):H.createEventObject&&(s=H.createEventObject()),s}function i(){return new Dt(r,{detail:a})}}function jt(e,r,a){return function(n){var i=n||global.event;i.target=i.target||i.srcElement,i.preventDefault=i.preventDefault||function(){i.returnValue=!1},i.stopPropagation=i.stopPropagation||function(){i.cancelBubble=!0},i.which=i.which||i.keyCode,a.call(e,i)}}function Bt(e,r,a){var t=_e(e,r,a)||jt(e,r,a);return q.push({wrapper:t,element:e,type:r,fn:a}),t}function _e(e,r,a){var t=Pt(e,r,a);if(t){var n=q[t].wrapper;return q.splice(t,1),n}}function Pt(e,r,a){var t,n;for(t=0;t<q.length;t++)if(n=q[t],n.element===e&&n.type===r&&n.fn===a)return t}});var Qe=$((ir,Je)=>{"use strict";var Ue={},At="(?:^|\\s)",qt="(?:\\s|$)";function We(e){var r=Ue[e];return r?r.lastIndex=0:Ue[e]=r=new RegExp(At+e+qt,"g"),r}function Tt(e,r){var a=e.className;a.length?We(r).test(a)||(e.className+=" "+r):e.className=r}function Vt(e,r){e.className=e.className.replace(We(r)," ").trim()}Je.exports={add:Tt,rm:Vt}});var ut=$((or,st)=>{"use strict";var Gt=Be(),P=Ke(),X=Qe(),A=document,D=A.documentElement;function Ht(e,r){var a=arguments.length;a===1&&Array.isArray(e)===!1&&(r=e,e=[]);var t,n,i,s,u,f,b,p,C,h,w,M=null,O,c=r||{};c.moves===void 0&&(c.moves=rt),c.accepts===void 0&&(c.accepts=rt),c.invalid===void 0&&(c.invalid=ht),c.containers===void 0&&(c.containers=e||[]),c.isContainer===void 0&&(c.isContainer=_t),c.copy===void 0&&(c.copy=!1),c.copySortSource===void 0&&(c.copySortSource=!1),c.revertOnSpill===void 0&&(c.revertOnSpill=!1),c.removeOnSpill===void 0&&(c.removeOnSpill=!1),c.direction===void 0&&(c.direction="vertical"),c.ignoreInputTextSelection===void 0&&(c.ignoreInputTextSelection=!0),c.mirrorContainer===void 0&&(c.mirrorContainer=A.body);var g=Gt({containers:c.containers,start:vt,end:fe,cancel:pe,remove:me,destroy:ct,canMove:ft,dragging:!1});return c.removeOnSpill===!0&&g.on("over",mt).on("out",pt),ue(),g;function L(o){return g.containers.indexOf(o)!==-1||c.isContainer(o)}function ue(o){var l=o?"remove":"add";T(D,l,"mousedown",lt),T(D,l,"mouseup",K)}function _(o){var l=o?"remove":"add";T(D,l,"mousemove",dt)}function ce(o){var l=o?"remove":"add";P[l](D,"selectstart",le),P[l](D,"click",le)}function ct(){ue(!0),K({})}function le(o){O&&o.preventDefault()}function lt(o){f=o.clientX,b=o.clientY;var l=Ze(o)!==1||o.metaKey||o.ctrlKey;if(!l){var d=o.target,m=z(d);m&&(O=m,_(),o.type==="mousedown"&&(ot(d)?d.focus():o.preventDefault()))}}function dt(o){if(O){if(Ze(o)===0){K({});return}if(!(o.clientX!==void 0&&Math.abs(o.clientX-f)<=(c.slideFactorX||0)&&o.clientY!==void 0&&Math.abs(o.clientY-b)<=(c.slideFactorY||0))){if(c.ignoreInputTextSelection){var l=Y("clientX",o)||0,d=Y("clientY",o)||0,m=A.elementFromPoint(l,d);if(ot(m))return}var x=O;_(!0),ce(),fe(),de(x);var E=Lt(i);s=Y("pageX",o)-E.left,u=Y("pageY",o)-E.top,X.add(h||i,"gu-transit"),gt(),J(o)}}}function z(o){if(!(g.dragging&&t)&&!L(o)){for(var l=o;S(o)&&L(S(o))===!1;)if(c.invalid(o,l)||(o=S(o),!o))return;var d=S(o);if(d&&!c.invalid(o,l)){var m=c.moves(o,d,l,V(o));if(m)return{item:o,source:d}}}}function ft(o){return!!z(o)}function vt(o){var l=z(o);l&&de(l)}function de(o){Et(o.item,o.source)&&(h=o.item.cloneNode(!0),g.emit("cloned",h,o.item,"copy")),n=o.source,i=o.item,p=C=V(o.item),g.dragging=!0,g.emit("drag",i,n)}function ht(){return!1}function fe(){if(g.dragging){var o=h||i;he(o,S(o))}}function ve(){O=!1,_(!0),ce(!0)}function K(o){if(ve(),!!g.dragging){var l=h||i,d=Y("clientX",o)||0,m=Y("clientY",o)||0,x=tt(t,d,m),E=ge(x,d,m);E&&(h&&c.copySortSource||!h||E!==n)?he(l,E):c.removeOnSpill?me():pe()}}function he(o,l){var d=S(o);h&&c.copySortSource&&l===n&&d.removeChild(i),W(l)?g.emit("cancel",o,n,n):g.emit("drop",o,l,n,C),U()}function me(){if(g.dragging){var o=h||i,l=S(o);l&&l.removeChild(o),g.emit(h?"cancel":"remove",o,l,n),U()}}function pe(o){if(g.dragging){var l=arguments.length>0?o:c.revertOnSpill,d=h||i,m=S(d),x=W(m);x===!1&&l&&(h?m&&m.removeChild(h):n.insertBefore(d,p)),x||l?g.emit("cancel",d,n,n):g.emit("drop",d,m,n,C),U()}}function U(){var o=h||i;ve(),bt(),o&&X.rm(o,"gu-transit"),w&&clearTimeout(w),g.dragging=!1,M&&g.emit("out",o,M,n),g.emit("dragend",o),n=i=h=p=C=w=M=null}function W(o,l){var d;return l!==void 0?d=l:t?d=C:d=V(h||i),o===n&&d===p}function ge(o,l,d){for(var m=o;m&&!x();)m=S(m);return m;function x(){var E=L(m);if(E===!1)return!1;var B=be(m,o),y=Ee(m,B,l,d),R=W(m,y);return R?!0:c.accepts(i,m,n,y)}}function J(o){if(!t)return;o.preventDefault();var l=Y("clientX",o)||0,d=Y("clientY",o)||0,m=l-s,x=d-u;t.style.left=m+"px",t.style.top=x+"px";var E=h||i,B=tt(t,l,d),y=ge(B,l,d),R=y!==null&&y!==M;(R||y===null)&&(Ct(),M=y,wt());var k=S(E);if(y===n&&h&&!c.copySortSource){k&&k.removeChild(E);return}var I,F=be(y,B);if(F!==null)I=Ee(y,F,l,d);else if(c.revertOnSpill===!0&&!h)I=p,y=n;else{h&&k&&k.removeChild(E);return}(I===null&&R||I!==E&&I!==V(E))&&(C=I,y.insertBefore(E,I),g.emit("shadow",E,y,n));function N(Mt){g.emit(Mt,E,M,n)}function wt(){R&&N("over")}function Ct(){M&&N("out")}}function mt(o){X.rm(o,"gu-hide")}function pt(o){g.dragging&&X.add(o,"gu-hide")}function gt(){if(!t){var o=i.getBoundingClientRect();t=i.cloneNode(!0),t.style.width=nt(o)+"px",t.style.height=it(o)+"px",X.rm(t,"gu-transit"),X.add(t,"gu-mirror"),c.mirrorContainer.appendChild(t),T(D,"add","mousemove",J),X.add(c.mirrorContainer,"gu-unselectable"),g.emit("cloned",t,i,"mirror")}}function bt(){t&&(X.rm(c.mirrorContainer,"gu-unselectable"),T(D,"remove","mousemove",J),S(t).removeChild(t),t=null)}function be(o,l){for(var d=l;d!==o&&S(d)!==o;)d=S(d);return d===D?null:d}function Ee(o,l,d,m){var x=c.direction==="horizontal",E=l!==o?y():B();return E;function B(){var k=o.children.length,I,F,N;for(I=0;I<k;I++)if(F=o.children[I],N=F.getBoundingClientRect(),x&&N.left+N.width/2>d||!x&&N.top+N.height/2>m)return F;return null}function y(){var k=l.getBoundingClientRect();return R(x?d>k.left+nt(k)/2:m>k.top+it(k)/2)}function R(k){return k?V(l):l}}function Et(o,l){return typeof c.copy=="boolean"?c.copy:c.copy(o,l)}}function T(e,r,a,t){var n={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},i={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},s={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};global.navigator.pointerEnabled?P[r](e,i[a],t):global.navigator.msPointerEnabled?P[r](e,s[a],t):(P[r](e,n[a],t),P[r](e,a,t))}function Ze(e){if(e.touches!==void 0)return e.touches.length;if(e.which!==void 0&&e.which!==0)return e.which;if(e.buttons!==void 0)return e.buttons;var r=e.button;if(r!==void 0)return r&1?1:r&2?3:r&4?2:0}function Lt(e){var r=e.getBoundingClientRect();return{left:r.left+et("scrollLeft","pageXOffset"),top:r.top+et("scrollTop","pageYOffset")}}function et(e,r){return typeof global[r]<"u"?global[r]:D.clientHeight?D[e]:A.body[e]}function tt(e,r,a){e=e||{};var t=e.className||"",n;return e.className+=" gu-hide",n=A.elementFromPoint(r,a),e.className=t,n}function _t(){return!1}function rt(){return!0}function nt(e){return e.width||e.right-e.left}function it(e){return e.height||e.bottom-e.top}function S(e){return e.parentNode===A?null:e.parentNode}function ot(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"||at(e)}function at(e){return!e||e.contentEditable==="false"?!1:e.contentEditable==="true"?!0:at(S(e))}function V(e){return e.nextElementSibling||r();function r(){var a=e;do a=a.nextSibling;while(a&&a.nodeType!==1);return a}}function zt(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function Y(e,r){var a=zt(r),t={pageX:"clientX",pageY:"clientY"};return e in t&&!(e in a)&&t[e]in a&&(e=t[e]),a[e]}st.exports=Ht});var se=yt(ut(),1),ie=class{constructor(r,a,t){this.name=r,this.drake=a,this.options=t,this.initEvents=!1}},v=function(e){return e.Cancel="cancel",e.Cloned="cloned",e.Drag="drag",e.DragEnd="dragend",e.Drop="drop",e.Out="out",e.Over="over",e.Remove="remove",e.Shadow="shadow",e.DropModel="dropModel",e.RemoveModel="removeModel",e}(v||{}),Kt=Object.keys(v).map(e=>v[e]),Ut=se.default||se,G=class{constructor(r=Ut){this.build=r}},j=(e,r,a)=>t=>t.pipe(ee(({event:n,name:i})=>n===e&&(r===void 0||i===r)),we(({name:n,args:i})=>a(n,i))),Wt=(e,[r,a,t])=>({name:e,el:r,container:a,source:t}),oe=(()=>{let r=class r{constructor(t){this.drakeFactory=t,this.groups={},this.dispatch$=new Z,this.elContainerSource=n=>i=>this.dispatch$.pipe(j(n,i,Wt)),this.cancel=this.elContainerSource(v.Cancel),this.remove=this.elContainerSource(v.Remove),this.shadow=this.elContainerSource(v.Shadow),this.over=this.elContainerSource(v.Over),this.out=this.elContainerSource(v.Out),this.drag=n=>this.dispatch$.pipe(j(v.Drag,n,(i,[s,u])=>({name:i,el:s,source:u}))),this.dragend=n=>this.dispatch$.pipe(j(v.DragEnd,n,(i,[s])=>({name:i,el:s}))),this.drop=n=>this.dispatch$.pipe(j(v.Drop,n,(i,[s,u,f,b])=>({name:i,el:s,target:u,source:f,sibling:b}))),this.cloned=n=>this.dispatch$.pipe(j(v.Cloned,n,(i,[s,u,f])=>({name:i,clone:s,original:u,cloneType:f}))),this.dropModel=n=>this.dispatch$.pipe(j(v.DropModel,n,(i,[s,u,f,b,p,C,h,w,M])=>({name:i,el:s,target:u,source:f,sibling:b,item:p,sourceModel:C,targetModel:h,sourceIndex:w,targetIndex:M}))),this.removeModel=n=>this.dispatch$.pipe(j(v.RemoveModel,n,(i,[s,u,f,b,p,C])=>({name:i,el:s,container:u,source:f,item:b,sourceModel:p,sourceIndex:C}))),(this.drakeFactory===null||this.drakeFactory===void 0)&&(this.drakeFactory=new G)}add(t){if(this.find(t.name))throw new Error('Group named: "'+t.name+'" already exists.');return this.groups[t.name]=t,this.handleModels(t),this.setupEvents(t),t}find(t){return this.groups[t]}destroy(t){let n=this.find(t);n&&(n.drake&&n.drake.destroy(),delete this.groups[t])}createGroup(t,n){return this.add(new ie(t,this.drakeFactory.build([],n),n))}handleModels({name:t,drake:n,options:i}){let s,u,f;n.on("remove",(b,p,C)=>{if(!n.models)return;let h=n.models[n.containers.indexOf(C)];h=h.slice(0);let w=h.splice(u,1)[0];this.dispatch$.next({event:v.RemoveModel,name:t,args:[b,p,C,w,h,u]})}),n.on("drag",(b,p)=>{n.models&&(s=b,u=this.domIndexOf(b,p))}),n.on("drop",(b,p,C,h)=>{if(!n.models||!p)return;f=this.domIndexOf(b,p);let w=n.models[n.containers.indexOf(C)],M=n.models[n.containers.indexOf(p)],O;if(p===C)w=w.slice(0),O=w.splice(u,1)[0],w.splice(f,0,O),M=w;else{let c=s!==b;if(O=w[u],c){if(!i.copyItem)throw new Error("If you have enabled `copy` on a group, you must provide a `copyItem` function.");O=i.copyItem(O)}if(c||(w=w.slice(0),w.splice(u,1)),M=M.slice(0),M.splice(f,0,O),c)try{p.removeChild(b)}catch{}}this.dispatch$.next({event:v.DropModel,name:t,args:[b,p,C,h,O,w,M,u,f]})})}setupEvents(t){if(t.initEvents)return;t.initEvents=!0;let n=t.name,i=this,s=u=>{switch(u){case v.Drag:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.Drop:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.DragEnd:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.Cancel:case v.Remove:case v.Shadow:case v.Over:case v.Out:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.Cloned:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.DropModel:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.RemoveModel:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;default:break}};Kt.forEach(s)}domIndexOf(t,n){if(n)return Array.prototype.indexOf.call(n.children,t)}};r.\u0275fac=function(n){return new(n||r)(ye(G,8))},r.\u0275prov=Ce({token:r,factory:r.\u0275fac,providedIn:"root"});let e=r;return e})(),pr=(()=>{let r=class r{get container(){return this.el&&this.el.nativeElement}constructor(t,n){this.el=t,this.dragulaService=n,this.dragulaModelChange=new Ie}ngOnChanges(t){if(t&&t.dragula){let{previousValue:n,currentValue:i}=t.dragula,s=!!n,u=!!i;s&&this.teardown(n),u&&this.setup()}else if(t&&t.dragulaModel){let{previousValue:n,currentValue:i}=t.dragulaModel,s=this.group?.drake;if(this.dragula&&s){s.models=s.models||[];let u=s.models.indexOf(n);u!==-1?(s.models.splice(u,1),i&&s.models.splice(u,0,i)):i&&s.models.push(i)}}}setup(){let t=i=>{this.dragulaModel&&(i.drake?.models?i.drake?.models?.push(this.dragulaModel):i.drake&&(i.drake.models=[this.dragulaModel]))};if(!this.dragula)return;let n=this.dragulaService.find(this.dragula);if(!n){let i={};n=this.dragulaService.createGroup(this.dragula,i)}t(n),n.drake?.containers.push(this.container),this.subscribe(this.dragula),this.group=n}subscribe(t){this.subs=new Q,this.subs.add(this.dragulaService.dropModel(t).subscribe(({source:n,target:i,sourceModel:s,targetModel:u})=>{n===this.el.nativeElement?this.dragulaModelChange.emit(s):i===this.el.nativeElement&&this.dragulaModelChange.emit(u)})),this.subs.add(this.dragulaService.removeModel(t).subscribe(({source:n,sourceModel:i})=>{n===this.el.nativeElement&&this.dragulaModelChange.emit(i)}))}teardown(t){this.subs?.unsubscribe();let n=this.dragulaService.find(t);if(n){let i=n.drake?.containers.indexOf(this.el.nativeElement);if(i!==-1&&n.drake?.containers.splice(i,1),this.dragulaModel&&n.drake&&n.drake.models){let s=n.drake.models.indexOf(this.dragulaModel);s!==-1&&n.drake.models.splice(s,1)}}}ngOnDestroy(){this.dragula&&this.teardown(this.dragula)}};r.\u0275fac=function(n){return new(n||r)(te(Se),te(oe))},r.\u0275dir=ke({type:r,selectors:[["","dragula",""]],inputs:{dragula:"dragula",dragulaModel:"dragulaModel"},outputs:{dragulaModelChange:"dragulaModelChange"},standalone:!1,features:[xe]});let e=r;return e})(),gr=(()=>{let r=class r{static forRoot(){return{ngModule:r,providers:[oe]}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275mod=Oe({type:r}),r.\u0275inj=Me({providers:[oe]});let e=r;return e})(),br=new G((e,r)=>new ae(e,r)),ae=class{constructor(r=[],a={},t){this.containers=r,this.options=a,this.models=t,this.emitter$=new Z,this.subs=new Q,this.dragging=!1}on(r,a){this.subs.add(this.emitter$.pipe(ee(({eventType:t})=>t===r)).subscribe(({eventType:t,args:n})=>{if(t===v.Drag){let i=Array.from(n),s=i[0],u=i[1];a(s,u);return}if(t===v.Drop){let i=Array.from(n),s=i[0],u=i[1],f=i[2],b=i[3];a(s,u,f,b);return}if(t===v.Remove){let i=Array.from(n),s=i[0],u=i[1],f=i[2];a(s,u,f);return}a(n)}))}start(r){this.dragging=!0}end(){this.dragging=!1}cancel(r){this.dragging=!1}canMove(r){return this.options.accepts?this.options.accepts(r):!1}remove(){this.dragging=!1}destroy(){this.subs.unsubscribe()}emit(r,...a){this.emitter$.next({eventType:r,args:a})}};export{oe as a,pr as b,gr as c};
|
|
1
|
+
import{Ea as xe,H as ee,Ha as Se,e as $,g as yt,ga as Ce,ha as Me,i as Q,jb as te,ka as ye,n as Z,qb as Oe,rb as ke,x as we,xb as Ie}from"./chunk-OTQCO6QF.js";var $e=$((Jt,De)=>{De.exports=function(r,a){return Array.prototype.slice.call(r,a)}});var Ne=$((Qt,Re)=>{var xt=typeof setImmediate=="function",re;xt?re=function(e){setImmediate(e)}:re=function(e){setTimeout(e,0)};Re.exports=re});var Ye=$((Zt,Xe)=>{"use strict";var St=Ne();Xe.exports=function(r,a,t){r&&St(function(){r.apply(t||null,a||[])})}});var Be=$((er,je)=>{"use strict";var Fe=$e(),Ot=Ye();je.exports=function(r,a){var t=a||{},n={};return r===void 0&&(r={}),r.on=function(i,s){return n[i]?n[i].push(s):n[i]=[s],r},r.once=function(i,s){return s._once=!0,r.on(i,s),r},r.off=function(i,s){var u=arguments.length;if(u===1)delete n[i];else if(u===0)n={};else{var f=n[i];if(!f)return r;f.splice(f.indexOf(s),1)}return r},r.emit=function(){var i=Fe(arguments);return r.emitterSnapshot(i.shift()).apply(this,i)},r.emitterSnapshot=function(i){var s=(n[i]||[]).slice(0);return function(){var u=Fe(arguments),f=this||r;if(i==="error"&&t.throws!==!1&&!s.length)throw u.length===1?u[0]:u;return s.forEach(function(p){t.async?Ot(p,u,f):p.apply(f,u),p._once&&r.off(i,p)}),r}},r}});var qe=$((tr,Ae)=>{var Pe=global.CustomEvent;function kt(){try{var e=new Pe("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}Ae.exports=kt()?Pe:typeof document<"u"&&typeof document.createEvent=="function"?function(r,a){var t=document.createEvent("CustomEvent");return a?t.initCustomEvent(r,a.bubbles,a.cancelable,a.detail):t.initCustomEvent(r,!1,!1,void 0),t}:function(r,a){var t=document.createEventObject();return t.type=r,a?(t.bubbles=!!a.bubbles,t.cancelable=!!a.cancelable,t.detail=a.detail):(t.bubbles=!1,t.cancelable=!1,t.detail=void 0),t}});var Ge=$((rr,Ve)=>{"use strict";var Te=[],ne="",It=/^on/;for(ne in global)It.test(ne)&&Te.push(ne.slice(2));Ve.exports=Te});var Ke=$((nr,ze)=>{"use strict";var Dt=qe(),$t=Ge(),H=global.document,He=Rt,Le=Xt,q=[];global.addEventListener||(He=Nt,Le=Yt);ze.exports={add:He,remove:Le,fabricate:Ft};function Rt(e,r,a,t){return e.addEventListener(r,a,t)}function Nt(e,r,a){return e.attachEvent("on"+r,Bt(e,r,a))}function Xt(e,r,a,t){return e.removeEventListener(r,a,t)}function Yt(e,r,a){var t=_e(e,r,a);if(t)return e.detachEvent("on"+r,t)}function Ft(e,r,a){var t=$t.indexOf(r)===-1?i():n();e.dispatchEvent?e.dispatchEvent(t):e.fireEvent("on"+r,t);function n(){var s;return H.createEvent?(s=H.createEvent("Event"),s.initEvent(r,!0,!0)):H.createEventObject&&(s=H.createEventObject()),s}function i(){return new Dt(r,{detail:a})}}function jt(e,r,a){return function(n){var i=n||global.event;i.target=i.target||i.srcElement,i.preventDefault=i.preventDefault||function(){i.returnValue=!1},i.stopPropagation=i.stopPropagation||function(){i.cancelBubble=!0},i.which=i.which||i.keyCode,a.call(e,i)}}function Bt(e,r,a){var t=_e(e,r,a)||jt(e,r,a);return q.push({wrapper:t,element:e,type:r,fn:a}),t}function _e(e,r,a){var t=Pt(e,r,a);if(t){var n=q[t].wrapper;return q.splice(t,1),n}}function Pt(e,r,a){var t,n;for(t=0;t<q.length;t++)if(n=q[t],n.element===e&&n.type===r&&n.fn===a)return t}});var Qe=$((ir,Je)=>{"use strict";var Ue={},At="(?:^|\\s)",qt="(?:\\s|$)";function We(e){var r=Ue[e];return r?r.lastIndex=0:Ue[e]=r=new RegExp(At+e+qt,"g"),r}function Tt(e,r){var a=e.className;a.length?We(r).test(a)||(e.className+=" "+r):e.className=r}function Vt(e,r){e.className=e.className.replace(We(r)," ").trim()}Je.exports={add:Tt,rm:Vt}});var ut=$((or,st)=>{"use strict";var Gt=Be(),P=Ke(),X=Qe(),A=document,D=A.documentElement;function Ht(e,r){var a=arguments.length;a===1&&Array.isArray(e)===!1&&(r=e,e=[]);var t,n,i,s,u,f,b,p,C,h,w,M=null,O,c=r||{};c.moves===void 0&&(c.moves=rt),c.accepts===void 0&&(c.accepts=rt),c.invalid===void 0&&(c.invalid=ht),c.containers===void 0&&(c.containers=e||[]),c.isContainer===void 0&&(c.isContainer=_t),c.copy===void 0&&(c.copy=!1),c.copySortSource===void 0&&(c.copySortSource=!1),c.revertOnSpill===void 0&&(c.revertOnSpill=!1),c.removeOnSpill===void 0&&(c.removeOnSpill=!1),c.direction===void 0&&(c.direction="vertical"),c.ignoreInputTextSelection===void 0&&(c.ignoreInputTextSelection=!0),c.mirrorContainer===void 0&&(c.mirrorContainer=A.body);var g=Gt({containers:c.containers,start:vt,end:fe,cancel:pe,remove:me,destroy:ct,canMove:ft,dragging:!1});return c.removeOnSpill===!0&&g.on("over",mt).on("out",pt),ue(),g;function L(o){return g.containers.indexOf(o)!==-1||c.isContainer(o)}function ue(o){var l=o?"remove":"add";T(D,l,"mousedown",lt),T(D,l,"mouseup",K)}function _(o){var l=o?"remove":"add";T(D,l,"mousemove",dt)}function ce(o){var l=o?"remove":"add";P[l](D,"selectstart",le),P[l](D,"click",le)}function ct(){ue(!0),K({})}function le(o){O&&o.preventDefault()}function lt(o){f=o.clientX,b=o.clientY;var l=Ze(o)!==1||o.metaKey||o.ctrlKey;if(!l){var d=o.target,m=z(d);m&&(O=m,_(),o.type==="mousedown"&&(ot(d)?d.focus():o.preventDefault()))}}function dt(o){if(O){if(Ze(o)===0){K({});return}if(!(o.clientX!==void 0&&Math.abs(o.clientX-f)<=(c.slideFactorX||0)&&o.clientY!==void 0&&Math.abs(o.clientY-b)<=(c.slideFactorY||0))){if(c.ignoreInputTextSelection){var l=Y("clientX",o)||0,d=Y("clientY",o)||0,m=A.elementFromPoint(l,d);if(ot(m))return}var x=O;_(!0),ce(),fe(),de(x);var E=Lt(i);s=Y("pageX",o)-E.left,u=Y("pageY",o)-E.top,X.add(h||i,"gu-transit"),gt(),J(o)}}}function z(o){if(!(g.dragging&&t)&&!L(o)){for(var l=o;S(o)&&L(S(o))===!1;)if(c.invalid(o,l)||(o=S(o),!o))return;var d=S(o);if(d&&!c.invalid(o,l)){var m=c.moves(o,d,l,V(o));if(m)return{item:o,source:d}}}}function ft(o){return!!z(o)}function vt(o){var l=z(o);l&&de(l)}function de(o){Et(o.item,o.source)&&(h=o.item.cloneNode(!0),g.emit("cloned",h,o.item,"copy")),n=o.source,i=o.item,p=C=V(o.item),g.dragging=!0,g.emit("drag",i,n)}function ht(){return!1}function fe(){if(g.dragging){var o=h||i;he(o,S(o))}}function ve(){O=!1,_(!0),ce(!0)}function K(o){if(ve(),!!g.dragging){var l=h||i,d=Y("clientX",o)||0,m=Y("clientY",o)||0,x=tt(t,d,m),E=ge(x,d,m);E&&(h&&c.copySortSource||!h||E!==n)?he(l,E):c.removeOnSpill?me():pe()}}function he(o,l){var d=S(o);h&&c.copySortSource&&l===n&&d.removeChild(i),W(l)?g.emit("cancel",o,n,n):g.emit("drop",o,l,n,C),U()}function me(){if(g.dragging){var o=h||i,l=S(o);l&&l.removeChild(o),g.emit(h?"cancel":"remove",o,l,n),U()}}function pe(o){if(g.dragging){var l=arguments.length>0?o:c.revertOnSpill,d=h||i,m=S(d),x=W(m);x===!1&&l&&(h?m&&m.removeChild(h):n.insertBefore(d,p)),x||l?g.emit("cancel",d,n,n):g.emit("drop",d,m,n,C),U()}}function U(){var o=h||i;ve(),bt(),o&&X.rm(o,"gu-transit"),w&&clearTimeout(w),g.dragging=!1,M&&g.emit("out",o,M,n),g.emit("dragend",o),n=i=h=p=C=w=M=null}function W(o,l){var d;return l!==void 0?d=l:t?d=C:d=V(h||i),o===n&&d===p}function ge(o,l,d){for(var m=o;m&&!x();)m=S(m);return m;function x(){var E=L(m);if(E===!1)return!1;var B=be(m,o),y=Ee(m,B,l,d),R=W(m,y);return R?!0:c.accepts(i,m,n,y)}}function J(o){if(!t)return;o.preventDefault();var l=Y("clientX",o)||0,d=Y("clientY",o)||0,m=l-s,x=d-u;t.style.left=m+"px",t.style.top=x+"px";var E=h||i,B=tt(t,l,d),y=ge(B,l,d),R=y!==null&&y!==M;(R||y===null)&&(Ct(),M=y,wt());var k=S(E);if(y===n&&h&&!c.copySortSource){k&&k.removeChild(E);return}var I,F=be(y,B);if(F!==null)I=Ee(y,F,l,d);else if(c.revertOnSpill===!0&&!h)I=p,y=n;else{h&&k&&k.removeChild(E);return}(I===null&&R||I!==E&&I!==V(E))&&(C=I,y.insertBefore(E,I),g.emit("shadow",E,y,n));function N(Mt){g.emit(Mt,E,M,n)}function wt(){R&&N("over")}function Ct(){M&&N("out")}}function mt(o){X.rm(o,"gu-hide")}function pt(o){g.dragging&&X.add(o,"gu-hide")}function gt(){if(!t){var o=i.getBoundingClientRect();t=i.cloneNode(!0),t.style.width=nt(o)+"px",t.style.height=it(o)+"px",X.rm(t,"gu-transit"),X.add(t,"gu-mirror"),c.mirrorContainer.appendChild(t),T(D,"add","mousemove",J),X.add(c.mirrorContainer,"gu-unselectable"),g.emit("cloned",t,i,"mirror")}}function bt(){t&&(X.rm(c.mirrorContainer,"gu-unselectable"),T(D,"remove","mousemove",J),S(t).removeChild(t),t=null)}function be(o,l){for(var d=l;d!==o&&S(d)!==o;)d=S(d);return d===D?null:d}function Ee(o,l,d,m){var x=c.direction==="horizontal",E=l!==o?y():B();return E;function B(){var k=o.children.length,I,F,N;for(I=0;I<k;I++)if(F=o.children[I],N=F.getBoundingClientRect(),x&&N.left+N.width/2>d||!x&&N.top+N.height/2>m)return F;return null}function y(){var k=l.getBoundingClientRect();return R(x?d>k.left+nt(k)/2:m>k.top+it(k)/2)}function R(k){return k?V(l):l}}function Et(o,l){return typeof c.copy=="boolean"?c.copy:c.copy(o,l)}}function T(e,r,a,t){var n={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},i={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},s={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};global.navigator.pointerEnabled?P[r](e,i[a],t):global.navigator.msPointerEnabled?P[r](e,s[a],t):(P[r](e,n[a],t),P[r](e,a,t))}function Ze(e){if(e.touches!==void 0)return e.touches.length;if(e.which!==void 0&&e.which!==0)return e.which;if(e.buttons!==void 0)return e.buttons;var r=e.button;if(r!==void 0)return r&1?1:r&2?3:r&4?2:0}function Lt(e){var r=e.getBoundingClientRect();return{left:r.left+et("scrollLeft","pageXOffset"),top:r.top+et("scrollTop","pageYOffset")}}function et(e,r){return typeof global[r]<"u"?global[r]:D.clientHeight?D[e]:A.body[e]}function tt(e,r,a){e=e||{};var t=e.className||"",n;return e.className+=" gu-hide",n=A.elementFromPoint(r,a),e.className=t,n}function _t(){return!1}function rt(){return!0}function nt(e){return e.width||e.right-e.left}function it(e){return e.height||e.bottom-e.top}function S(e){return e.parentNode===A?null:e.parentNode}function ot(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"||at(e)}function at(e){return!e||e.contentEditable==="false"?!1:e.contentEditable==="true"?!0:at(S(e))}function V(e){return e.nextElementSibling||r();function r(){var a=e;do a=a.nextSibling;while(a&&a.nodeType!==1);return a}}function zt(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function Y(e,r){var a=zt(r),t={pageX:"clientX",pageY:"clientY"};return e in t&&!(e in a)&&t[e]in a&&(e=t[e]),a[e]}st.exports=Ht});var se=yt(ut(),1),ie=class{constructor(r,a,t){this.name=r,this.drake=a,this.options=t,this.initEvents=!1}},v=(function(e){return e.Cancel="cancel",e.Cloned="cloned",e.Drag="drag",e.DragEnd="dragend",e.Drop="drop",e.Out="out",e.Over="over",e.Remove="remove",e.Shadow="shadow",e.DropModel="dropModel",e.RemoveModel="removeModel",e})(v||{}),Kt=Object.keys(v).map(e=>v[e]),Ut=se.default||se,G=class{constructor(r=Ut){this.build=r}},j=(e,r,a)=>t=>t.pipe(ee(({event:n,name:i})=>n===e&&(r===void 0||i===r)),we(({name:n,args:i})=>a(n,i))),Wt=(e,[r,a,t])=>({name:e,el:r,container:a,source:t}),oe=(()=>{let r=class r{constructor(t){this.drakeFactory=t,this.groups={},this.dispatch$=new Z,this.elContainerSource=n=>i=>this.dispatch$.pipe(j(n,i,Wt)),this.cancel=this.elContainerSource(v.Cancel),this.remove=this.elContainerSource(v.Remove),this.shadow=this.elContainerSource(v.Shadow),this.over=this.elContainerSource(v.Over),this.out=this.elContainerSource(v.Out),this.drag=n=>this.dispatch$.pipe(j(v.Drag,n,(i,[s,u])=>({name:i,el:s,source:u}))),this.dragend=n=>this.dispatch$.pipe(j(v.DragEnd,n,(i,[s])=>({name:i,el:s}))),this.drop=n=>this.dispatch$.pipe(j(v.Drop,n,(i,[s,u,f,b])=>({name:i,el:s,target:u,source:f,sibling:b}))),this.cloned=n=>this.dispatch$.pipe(j(v.Cloned,n,(i,[s,u,f])=>({name:i,clone:s,original:u,cloneType:f}))),this.dropModel=n=>this.dispatch$.pipe(j(v.DropModel,n,(i,[s,u,f,b,p,C,h,w,M])=>({name:i,el:s,target:u,source:f,sibling:b,item:p,sourceModel:C,targetModel:h,sourceIndex:w,targetIndex:M}))),this.removeModel=n=>this.dispatch$.pipe(j(v.RemoveModel,n,(i,[s,u,f,b,p,C])=>({name:i,el:s,container:u,source:f,item:b,sourceModel:p,sourceIndex:C}))),(this.drakeFactory===null||this.drakeFactory===void 0)&&(this.drakeFactory=new G)}add(t){if(this.find(t.name))throw new Error('Group named: "'+t.name+'" already exists.');return this.groups[t.name]=t,this.handleModels(t),this.setupEvents(t),t}find(t){return this.groups[t]}destroy(t){let n=this.find(t);n&&(n.drake&&n.drake.destroy(),delete this.groups[t])}createGroup(t,n){return this.add(new ie(t,this.drakeFactory.build([],n),n))}handleModels({name:t,drake:n,options:i}){let s,u,f;n.on("remove",(b,p,C)=>{if(!n.models)return;let h=n.models[n.containers.indexOf(C)];h=h.slice(0);let w=h.splice(u,1)[0];this.dispatch$.next({event:v.RemoveModel,name:t,args:[b,p,C,w,h,u]})}),n.on("drag",(b,p)=>{n.models&&(s=b,u=this.domIndexOf(b,p))}),n.on("drop",(b,p,C,h)=>{if(!n.models||!p)return;f=this.domIndexOf(b,p);let w=n.models[n.containers.indexOf(C)],M=n.models[n.containers.indexOf(p)],O;if(p===C)w=w.slice(0),O=w.splice(u,1)[0],w.splice(f,0,O),M=w;else{let c=s!==b;if(O=w[u],c){if(!i.copyItem)throw new Error("If you have enabled `copy` on a group, you must provide a `copyItem` function.");O=i.copyItem(O)}if(c||(w=w.slice(0),w.splice(u,1)),M=M.slice(0),M.splice(f,0,O),c)try{p.removeChild(b)}catch{}}this.dispatch$.next({event:v.DropModel,name:t,args:[b,p,C,h,O,w,M,u,f]})})}setupEvents(t){if(t.initEvents)return;t.initEvents=!0;let n=t.name,i=this,s=u=>{switch(u){case v.Drag:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.Drop:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.DragEnd:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.Cancel:case v.Remove:case v.Shadow:case v.Over:case v.Out:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.Cloned:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.DropModel:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;case v.RemoveModel:t.drake.on(u,(...f)=>{this.dispatch$.next({event:u,name:n,args:f})});break;default:break}};Kt.forEach(s)}domIndexOf(t,n){if(n)return Array.prototype.indexOf.call(n.children,t)}};r.\u0275fac=function(n){return new(n||r)(ye(G,8))},r.\u0275prov=Ce({token:r,factory:r.\u0275fac,providedIn:"root"});let e=r;return e})(),pr=(()=>{let r=class r{get container(){return this.el&&this.el.nativeElement}constructor(t,n){this.el=t,this.dragulaService=n,this.dragulaModelChange=new Ie}ngOnChanges(t){if(t&&t.dragula){let{previousValue:n,currentValue:i}=t.dragula,s=!!n,u=!!i;s&&this.teardown(n),u&&this.setup()}else if(t&&t.dragulaModel){let{previousValue:n,currentValue:i}=t.dragulaModel,s=this.group?.drake;if(this.dragula&&s){s.models=s.models||[];let u=s.models.indexOf(n);u!==-1?(s.models.splice(u,1),i&&s.models.splice(u,0,i)):i&&s.models.push(i)}}}setup(){let t=i=>{this.dragulaModel&&(i.drake?.models?i.drake?.models?.push(this.dragulaModel):i.drake&&(i.drake.models=[this.dragulaModel]))};if(!this.dragula)return;let n=this.dragulaService.find(this.dragula);if(!n){let i={};n=this.dragulaService.createGroup(this.dragula,i)}t(n),n.drake?.containers.push(this.container),this.subscribe(this.dragula),this.group=n}subscribe(t){this.subs=new Q,this.subs.add(this.dragulaService.dropModel(t).subscribe(({source:n,target:i,sourceModel:s,targetModel:u})=>{n===this.el.nativeElement?this.dragulaModelChange.emit(s):i===this.el.nativeElement&&this.dragulaModelChange.emit(u)})),this.subs.add(this.dragulaService.removeModel(t).subscribe(({source:n,sourceModel:i})=>{n===this.el.nativeElement&&this.dragulaModelChange.emit(i)}))}teardown(t){this.subs?.unsubscribe();let n=this.dragulaService.find(t);if(n){let i=n.drake?.containers.indexOf(this.el.nativeElement);if(i!==-1&&n.drake?.containers.splice(i,1),this.dragulaModel&&n.drake&&n.drake.models){let s=n.drake.models.indexOf(this.dragulaModel);s!==-1&&n.drake.models.splice(s,1)}}}ngOnDestroy(){this.dragula&&this.teardown(this.dragula)}};r.\u0275fac=function(n){return new(n||r)(te(Se),te(oe))},r.\u0275dir=ke({type:r,selectors:[["","dragula",""]],inputs:{dragula:"dragula",dragulaModel:"dragulaModel"},outputs:{dragulaModelChange:"dragulaModelChange"},standalone:!1,features:[xe]});let e=r;return e})(),gr=(()=>{let r=class r{static forRoot(){return{ngModule:r,providers:[oe]}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275mod=Oe({type:r}),r.\u0275inj=Me({providers:[oe]});let e=r;return e})(),br=new G((e,r)=>new ae(e,r)),ae=class{constructor(r=[],a={},t){this.containers=r,this.options=a,this.models=t,this.emitter$=new Z,this.subs=new Q,this.dragging=!1}on(r,a){this.subs.add(this.emitter$.pipe(ee(({eventType:t})=>t===r)).subscribe(({eventType:t,args:n})=>{if(t===v.Drag){let i=Array.from(n),s=i[0],u=i[1];a(s,u);return}if(t===v.Drop){let i=Array.from(n),s=i[0],u=i[1],f=i[2],b=i[3];a(s,u,f,b);return}if(t===v.Remove){let i=Array.from(n),s=i[0],u=i[1],f=i[2];a(s,u,f);return}a(n)}))}start(r){this.dragging=!0}end(){this.dragging=!1}cancel(r){this.dragging=!1}canMove(r){return this.options.accepts?this.options.accepts(r):!1}remove(){this.dragging=!1}destroy(){this.subs.unsubscribe()}emit(r,...a){this.emitter$.next({eventType:r,args:a})}};export{oe as a,pr as b,gr as c};
|