@nice2dev/ui-tools 1.0.10

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.
Files changed (158) hide show
  1. package/README.md +36 -0
  2. package/dist/access-control.d.ts +726 -0
  3. package/dist/access-control.d.ts.map +1 -0
  4. package/dist/accessibility-i18n.d.ts +1017 -0
  5. package/dist/accessibility-i18n.d.ts.map +1 -0
  6. package/dist/ai-assistant.d.ts +263 -0
  7. package/dist/ai-assistant.d.ts.map +1 -0
  8. package/dist/ai-playgrounds.d.ts +842 -0
  9. package/dist/ai-playgrounds.d.ts.map +1 -0
  10. package/dist/alerting-incidents.d.ts +558 -0
  11. package/dist/alerting-incidents.d.ts.map +1 -0
  12. package/dist/api-designer.d.ts +1568 -0
  13. package/dist/api-designer.d.ts.map +1 -0
  14. package/dist/api-testing.d.ts +1146 -0
  15. package/dist/api-testing.d.ts.map +1 -0
  16. package/dist/apm-profiling.d.ts +656 -0
  17. package/dist/apm-profiling.d.ts.map +1 -0
  18. package/dist/artifacts.d.ts +421 -0
  19. package/dist/artifacts.d.ts.map +1 -0
  20. package/dist/audit-compliance.d.ts +752 -0
  21. package/dist/audit-compliance.d.ts.map +1 -0
  22. package/dist/certificates.d.ts +256 -0
  23. package/dist/certificates.d.ts.map +1 -0
  24. package/dist/chart-builder.d.ts +1404 -0
  25. package/dist/chart-builder.d.ts.map +1 -0
  26. package/dist/cloud-instances.d.ts +169 -0
  27. package/dist/cloud-instances.d.ts.map +1 -0
  28. package/dist/config-management.d.ts +350 -0
  29. package/dist/config-management.d.ts.map +1 -0
  30. package/dist/containers.d.ts +256 -0
  31. package/dist/containers.d.ts.map +1 -0
  32. package/dist/dashboard-designer.d.ts +1238 -0
  33. package/dist/dashboard-designer.d.ts.map +1 -0
  34. package/dist/data-management.d.ts +496 -0
  35. package/dist/data-management.d.ts.map +1 -0
  36. package/dist/data-pipeline.d.ts +1105 -0
  37. package/dist/data-pipeline.d.ts.map +1 -0
  38. package/dist/data-warehouse.d.ts +1097 -0
  39. package/dist/data-warehouse.d.ts.map +1 -0
  40. package/dist/dataset-management.d.ts +782 -0
  41. package/dist/dataset-management.d.ts.map +1 -0
  42. package/dist/db-adapters.d.ts +704 -0
  43. package/dist/db-adapters.d.ts.map +1 -0
  44. package/dist/db-admin.d.ts +699 -0
  45. package/dist/db-admin.d.ts.map +1 -0
  46. package/dist/db-designer.d.ts +366 -0
  47. package/dist/db-designer.d.ts.map +1 -0
  48. package/dist/debugger.d.ts +356 -0
  49. package/dist/debugger.d.ts.map +1 -0
  50. package/dist/device-management.d.ts +871 -0
  51. package/dist/device-management.d.ts.map +1 -0
  52. package/dist/distributed-tracing.d.ts +427 -0
  53. package/dist/distributed-tracing.d.ts.map +1 -0
  54. package/dist/dns-management.d.ts +215 -0
  55. package/dist/dns-management.d.ts.map +1 -0
  56. package/dist/download-manager.d.ts +271 -0
  57. package/dist/download-manager.d.ts.map +1 -0
  58. package/dist/download-torrent.d.ts +1062 -0
  59. package/dist/download-torrent.d.ts.map +1 -0
  60. package/dist/edge-computing.d.ts +720 -0
  61. package/dist/edge-computing.d.ts.map +1 -0
  62. package/dist/education.d.ts +1135 -0
  63. package/dist/education.d.ts.map +1 -0
  64. package/dist/email-template.d.ts +1141 -0
  65. package/dist/email-template.d.ts.map +1 -0
  66. package/dist/erp-enterprise.d.ts +1270 -0
  67. package/dist/erp-enterprise.d.ts.map +1 -0
  68. package/dist/form-builder.d.ts +1117 -0
  69. package/dist/form-builder.d.ts.map +1 -0
  70. package/dist/game-engine-advanced.d.ts +1049 -0
  71. package/dist/game-engine-advanced.d.ts.map +1 -0
  72. package/dist/git.d.ts +415 -0
  73. package/dist/git.d.ts.map +1 -0
  74. package/dist/hardware-integration.d.ts +966 -0
  75. package/dist/hardware-integration.d.ts.map +1 -0
  76. package/dist/iac.d.ts +318 -0
  77. package/dist/iac.d.ts.map +1 -0
  78. package/dist/icon-tools.d.ts +1023 -0
  79. package/dist/icon-tools.d.ts.map +1 -0
  80. package/dist/ide.d.ts +322 -0
  81. package/dist/ide.d.ts.map +1 -0
  82. package/dist/index.cjs +2 -0
  83. package/dist/index.cjs.map +1 -0
  84. package/dist/index.d.ts +176 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.mjs +1887 -0
  87. package/dist/index.mjs.map +1 -0
  88. package/dist/integration-platform.d.ts +857 -0
  89. package/dist/integration-platform.d.ts.map +1 -0
  90. package/dist/kubernetes.d.ts +278 -0
  91. package/dist/kubernetes.d.ts.map +1 -0
  92. package/dist/life-management.d.ts +1132 -0
  93. package/dist/life-management.d.ts.map +1 -0
  94. package/dist/log-management.d.ts +473 -0
  95. package/dist/log-management.d.ts.map +1 -0
  96. package/dist/mathematics.d.ts +870 -0
  97. package/dist/mathematics.d.ts.map +1 -0
  98. package/dist/message-queue.d.ts +1006 -0
  99. package/dist/message-queue.d.ts.map +1 -0
  100. package/dist/metrics-dashboard.d.ts +596 -0
  101. package/dist/metrics-dashboard.d.ts.map +1 -0
  102. package/dist/mobile-components.d.ts +766 -0
  103. package/dist/mobile-components.d.ts.map +1 -0
  104. package/dist/model-deployment.d.ts +787 -0
  105. package/dist/model-deployment.d.ts.map +1 -0
  106. package/dist/model-registry.d.ts +740 -0
  107. package/dist/model-registry.d.ts.map +1 -0
  108. package/dist/model-training.d.ts +706 -0
  109. package/dist/model-training.d.ts.map +1 -0
  110. package/dist/network-config.d.ts +334 -0
  111. package/dist/network-config.d.ts.map +1 -0
  112. package/dist/network-monitoring.d.ts +291 -0
  113. package/dist/network-monitoring.d.ts.map +1 -0
  114. package/dist/pdf-tools.d.ts +1003 -0
  115. package/dist/pdf-tools.d.ts.map +1 -0
  116. package/dist/pipelines.d.ts +250 -0
  117. package/dist/pipelines.d.ts.map +1 -0
  118. package/dist/remote-desktop.d.ts +207 -0
  119. package/dist/remote-desktop.d.ts.map +1 -0
  120. package/dist/report-designer.d.ts +1153 -0
  121. package/dist/report-designer.d.ts.map +1 -0
  122. package/dist/scada-industrial.d.ts +848 -0
  123. package/dist/scada-industrial.d.ts.map +1 -0
  124. package/dist/scientific-research.d.ts +1149 -0
  125. package/dist/scientific-research.d.ts.map +1 -0
  126. package/dist/secret-management.d.ts +617 -0
  127. package/dist/secret-management.d.ts.map +1 -0
  128. package/dist/security-scanning.d.ts +714 -0
  129. package/dist/security-scanning.d.ts.map +1 -0
  130. package/dist/self-service-analytics.d.ts +1208 -0
  131. package/dist/self-service-analytics.d.ts.map +1 -0
  132. package/dist/sensor-dashboard.d.ts +845 -0
  133. package/dist/sensor-dashboard.d.ts.map +1 -0
  134. package/dist/server-management.d.ts +331 -0
  135. package/dist/server-management.d.ts.map +1 -0
  136. package/dist/smart-home.d.ts +861 -0
  137. package/dist/smart-home.d.ts.map +1 -0
  138. package/dist/spreadsheet.d.ts +1043 -0
  139. package/dist/spreadsheet.d.ts.map +1 -0
  140. package/dist/sql-editor.d.ts +402 -0
  141. package/dist/sql-editor.d.ts.map +1 -0
  142. package/dist/terminal.d.ts +245 -0
  143. package/dist/terminal.d.ts.map +1 -0
  144. package/dist/testing-qa.d.ts +1013 -0
  145. package/dist/testing-qa.d.ts.map +1 -0
  146. package/dist/torrent-client.d.ts +298 -0
  147. package/dist/torrent-client.d.ts.map +1 -0
  148. package/dist/traceless.d.ts +759 -0
  149. package/dist/traceless.d.ts.map +1 -0
  150. package/dist/virtual-machines.d.ts +199 -0
  151. package/dist/virtual-machines.d.ts.map +1 -0
  152. package/dist/visual-scripting.d.ts +381 -0
  153. package/dist/visual-scripting.d.ts.map +1 -0
  154. package/dist/word-processor.d.ts +1124 -0
  155. package/dist/word-processor.d.ts.map +1 -0
  156. package/dist/workspace.d.ts +333 -0
  157. package/dist/workspace.d.ts.map +1 -0
  158. package/package.json +62 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,1887 @@
1
+ import { CURRENT_SCHEMA_VERSION as It, NiceAuditLog as Et, NiceChat as Nt, NiceColumnChooser as Ft, NiceComponentTypeMapping as Bt, NiceDesignTokens as Rt, NiceDiagramDesigner as Ut, NiceDisplayStylePicker as Vt, NiceDocumentViewer as Qt, NiceDraggable as Ht, NiceFeatureFlagsProvider as $t, NiceFeatureGate as qt, NiceFileManager as Gt, NiceFileUploader as Wt, NiceFilterBuilder as Kt, NiceGallery as Xt, NiceGitManager as Jt, NiceMap as Yt, NiceModuleHotSwap as Zt, NiceModuleLoaderProvider as eo, NiceModuleRoute as to, NicePermissionMatrix as oo, NicePrintPreview as no, NiceShowcase as ro, NiceSortable as so, NiceSpeechToText as ao, NiceThemeBuilder as io, NiceThemeDesigner as lo, NiceUndoManager as co, NiceUndoProvider as uo, NiceValidationGroup as po, NiceValidationSummary as fo, NiceValidator as go, NiceViewCache as mo, NiceViewFetchError as ho, NiceViewFetcher as bo, NiceViewHotReload as wo, NiceViewRegistry as yo, NiceViewRenderer as So, autoDetectColumns as _o, checkModuleHealth as vo, checkPermissions as Mo, checkSingleModule as To, compareSemver as Do, createStandardErpContracts as Oo, createUndoMiddleware as Ao, defaultTypeMapping as jo, defaultViewRegistry as Po, deserializeManifest as zo, deserializeRbacPolicy as Co, deserializeViewV2 as ko, diffObjects as xo, diffViews as Lo, downloadCSV as Io, downloadHTML as Eo, downloadJSON as No, downloadPDF as Fo, downloadXLSX as Bo, exportToCSV as Ro, exportToHTML as Uo, exportToJSON as Vo, exportToPDF as Qo, exportToXLSX as Ho, extractControlTypes as $o, extractTokensFromTheme as qo, formatDiffAsText as Go, generateAllForRbac as Wo, generateAllForView as Ko, generateDartModel as Xo, generateMermaidSyntax as Jo, generateRbacDart as Yo, generateRbacTypescript as Zo, generateScaffold as en, generateStoriesFromViews as tn, generateStoryFromView as on, generateTokens as nn, generateTypescriptModel as rn, generateViewCatalog as sn, isAllowed as an, isVersionCompatible as ln, isViewCompatibleWith as dn, listScaffoldTemplates as cn, niceExport as un, resolvePermissions as pn, runContractTests as fn, serializeManifest as gn, serializeRbacPolicy as mn, serializeViewV2 as hn, useAuditLog as bn, useColumnChooser as wn, useFeatureFlag as yn, useFeatureFlags as Sn, useModuleLoader as _n, useNiceValidation as vn, usePrintPreview as Mn, useUndoKeyboard as Tn, useUndoManager as Dn, validateCrossPlatformView as On, validateDiagramSchema as An, validateModuleManifest as jn, validateRbacPolicy as Pn, validateViewDefinitionV2 as zn, validateViewForDeploy as Cn, validateViewsBatch as kn } from "@nice2dev/ui";
2
+ import { useMemo as S, useState as _, useEffect as A, useCallback as c } from "react";
3
+ const te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
+ __proto__: null
5
+ }, Symbol.toStringTag, { value: "Module" })), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
+ __proto__: null
7
+ }, Symbol.toStringTag, { value: "Module" })), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8
+ __proto__: null
9
+ }, Symbol.toStringTag, { value: "Module" })), re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
+ __proto__: null
11
+ }, Symbol.toStringTag, { value: "Module" })), se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
+ __proto__: null
13
+ }, Symbol.toStringTag, { value: "Module" })), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14
+ __proto__: null
15
+ }, Symbol.toStringTag, { value: "Module" })), ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16
+ __proto__: null
17
+ }, Symbol.toStringTag, { value: "Module" })), le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18
+ __proto__: null
19
+ }, Symbol.toStringTag, { value: "Module" })), de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20
+ __proto__: null
21
+ }, Symbol.toStringTag, { value: "Module" })), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22
+ __proto__: null
23
+ }, Symbol.toStringTag, { value: "Module" })), ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
+ __proto__: null
25
+ }, Symbol.toStringTag, { value: "Module" })), pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
26
+ __proto__: null
27
+ }, Symbol.toStringTag, { value: "Module" })), fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
+ __proto__: null
29
+ }, Symbol.toStringTag, { value: "Module" })), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
30
+ __proto__: null
31
+ }, Symbol.toStringTag, { value: "Module" })), me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32
+ __proto__: null
33
+ }, Symbol.toStringTag, { value: "Module" })), he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
34
+ __proto__: null
35
+ }, Symbol.toStringTag, { value: "Module" })), be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
36
+ __proto__: null
37
+ }, Symbol.toStringTag, { value: "Module" })), we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38
+ __proto__: null
39
+ }, Symbol.toStringTag, { value: "Module" })), ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
40
+ __proto__: null
41
+ }, Symbol.toStringTag, { value: "Module" })), Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42
+ __proto__: null
43
+ }, Symbol.toStringTag, { value: "Module" })), _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
44
+ __proto__: null
45
+ }, Symbol.toStringTag, { value: "Module" })), ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
46
+ __proto__: null
47
+ }, Symbol.toStringTag, { value: "Module" })), Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
48
+ __proto__: null
49
+ }, Symbol.toStringTag, { value: "Module" })), Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
50
+ __proto__: null
51
+ }, Symbol.toStringTag, { value: "Module" })), De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
52
+ __proto__: null
53
+ }, Symbol.toStringTag, { value: "Module" })), Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
54
+ __proto__: null
55
+ }, Symbol.toStringTag, { value: "Module" })), Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
56
+ __proto__: null
57
+ }, Symbol.toStringTag, { value: "Module" })), je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
+ __proto__: null
59
+ }, Symbol.toStringTag, { value: "Module" })), Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
60
+ __proto__: null
61
+ }, Symbol.toStringTag, { value: "Module" })), ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
62
+ __proto__: null
63
+ }, Symbol.toStringTag, { value: "Module" })), Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
64
+ __proto__: null
65
+ }, Symbol.toStringTag, { value: "Module" })), ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
66
+ __proto__: null
67
+ }, Symbol.toStringTag, { value: "Module" })), xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68
+ __proto__: null
69
+ }, Symbol.toStringTag, { value: "Module" })), Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70
+ __proto__: null
71
+ }, Symbol.toStringTag, { value: "Module" })), Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
72
+ __proto__: null
73
+ }, Symbol.toStringTag, { value: "Module" })), z = {
74
+ "operation-operationId": {
75
+ name: "operation-operationId",
76
+ description: "Operation must have an operationId",
77
+ severity: "error",
78
+ category: "structure",
79
+ fixable: !1
80
+ },
81
+ "operation-description": {
82
+ name: "operation-description",
83
+ description: "Operation should have a description",
84
+ severity: "warn",
85
+ category: "documentation",
86
+ fixable: !1
87
+ },
88
+ "info-contact": {
89
+ name: "info-contact",
90
+ description: "Info object should have contact information",
91
+ severity: "warn",
92
+ category: "documentation",
93
+ fixable: !1
94
+ },
95
+ "no-$ref-siblings": {
96
+ name: "no-$ref-siblings",
97
+ description: "A $ref object must not have sibling properties",
98
+ severity: "error",
99
+ category: "structure",
100
+ fixable: !1
101
+ },
102
+ "path-params": {
103
+ name: "path-params",
104
+ description: "Path parameters must be defined",
105
+ severity: "error",
106
+ category: "structure",
107
+ fixable: !1
108
+ }
109
+ }, Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
110
+ __proto__: null,
111
+ OPENAPI_LINT_RULES: z
112
+ }, Symbol.toStringTag, { value: "Module" })), Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
113
+ __proto__: null
114
+ }, Symbol.toStringTag, { value: "Module" })), Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
115
+ __proto__: null
116
+ }, Symbol.toStringTag, { value: "Module" })), Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
117
+ __proto__: null
118
+ }, Symbol.toStringTag, { value: "Module" })), Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
119
+ __proto__: null
120
+ }, Symbol.toStringTag, { value: "Module" })), Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
121
+ __proto__: null
122
+ }, Symbol.toStringTag, { value: "Module" })), Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
123
+ __proto__: null
124
+ }, Symbol.toStringTag, { value: "Module" })), Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
125
+ __proto__: null
126
+ }, Symbol.toStringTag, { value: "Module" })), He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
127
+ __proto__: null
128
+ }, Symbol.toStringTag, { value: "Module" })), $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
129
+ __proto__: null
130
+ }, Symbol.toStringTag, { value: "Module" })), qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
131
+ __proto__: null
132
+ }, Symbol.toStringTag, { value: "Module" })), Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
133
+ __proto__: null
134
+ }, Symbol.toStringTag, { value: "Module" })), We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
135
+ __proto__: null
136
+ }, Symbol.toStringTag, { value: "Module" })), Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
137
+ __proto__: null
138
+ }, Symbol.toStringTag, { value: "Module" })), Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
139
+ __proto__: null
140
+ }, Symbol.toStringTag, { value: "Module" })), Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
141
+ __proto__: null
142
+ }, Symbol.toStringTag, { value: "Module" })), Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
143
+ __proto__: null
144
+ }, Symbol.toStringTag, { value: "Module" })), Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
145
+ __proto__: null
146
+ }, Symbol.toStringTag, { value: "Module" })), et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
147
+ __proto__: null
148
+ }, Symbol.toStringTag, { value: "Module" })), tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
149
+ __proto__: null
150
+ }, Symbol.toStringTag, { value: "Module" })), ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
151
+ __proto__: null
152
+ }, Symbol.toStringTag, { value: "Module" })), nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
153
+ __proto__: null
154
+ }, Symbol.toStringTag, { value: "Module" })), rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
155
+ __proto__: null
156
+ }, Symbol.toStringTag, { value: "Module" })), st = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
157
+ __proto__: null
158
+ }, Symbol.toStringTag, { value: "Module" })), at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
159
+ __proto__: null
160
+ }, Symbol.toStringTag, { value: "Module" })), it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
161
+ __proto__: null
162
+ }, Symbol.toStringTag, { value: "Module" })), lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
163
+ __proto__: null
164
+ }, Symbol.toStringTag, { value: "Module" })), dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
165
+ __proto__: null
166
+ }, Symbol.toStringTag, { value: "Module" })), ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
167
+ __proto__: null
168
+ }, Symbol.toStringTag, { value: "Module" })), ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
169
+ __proto__: null
170
+ }, Symbol.toStringTag, { value: "Module" })), pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
171
+ __proto__: null
172
+ }, Symbol.toStringTag, { value: "Module" })), ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
173
+ __proto__: null
174
+ }, Symbol.toStringTag, { value: "Module" })), gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
175
+ __proto__: null
176
+ }, Symbol.toStringTag, { value: "Module" })), mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
177
+ __proto__: null
178
+ }, Symbol.toStringTag, { value: "Module" }));
179
+ function ht(r, e = 2) {
180
+ if (r === 0)
181
+ return "0 B";
182
+ const t = 1024, o = e < 0 ? 0 : e, n = ["B", "KB", "MB", "GB", "TB", "PB"], s = Math.floor(Math.log(r) / Math.log(t));
183
+ return parseFloat((r / Math.pow(t, s)).toFixed(o)) + " " + n[s];
184
+ }
185
+ function g(r) {
186
+ let t = "B/s", o = r;
187
+ return r >= 1024 * 1024 * 1024 ? (t = "GB/s", o = r / (1024 * 1024 * 1024)) : r >= 1024 * 1024 ? (t = "MB/s", o = r / (1024 * 1024)) : r >= 1024 && (t = "KB/s", o = r / 1024), {
188
+ bytesPerSecond: r,
189
+ displayValue: o.toFixed(2),
190
+ displayUnit: t
191
+ };
192
+ }
193
+ function bt(r) {
194
+ if (!isFinite(r) || r < 0)
195
+ return "∞";
196
+ const e = Math.floor(r / 3600), t = Math.floor(r % 3600 / 60), o = Math.floor(r % 60);
197
+ return e > 0 ? `${e}h ${t}m` : t > 0 ? `${t}m ${o}s` : `${o}s`;
198
+ }
199
+ function M(r, e) {
200
+ if (!(e <= 0))
201
+ return Math.ceil(r / e);
202
+ }
203
+ function C(r) {
204
+ var e;
205
+ if (r.startsWith("magnet:"))
206
+ return k(r);
207
+ try {
208
+ const t = new URL(r), n = decodeURIComponent(t.pathname).split("/").pop() || "download", s = n.includes(".") ? (e = n.split(".").pop()) == null ? void 0 : e.toLowerCase() : void 0;
209
+ let a = "https";
210
+ return t.protocol === "http:" ? a = "http" : t.protocol === "ftp:" ? a = "ftp" : t.protocol === "sftp:" && (a = "sftp"), {
211
+ url: r,
212
+ protocol: a,
213
+ host: t.host,
214
+ filename: n,
215
+ extension: s,
216
+ fileType: s ? x(s) : void 0,
217
+ resumable: a === "https" || a === "http",
218
+ // Likely resumable for HTTP(S)
219
+ requiresAuth: !!t.username,
220
+ isMagnet: !1,
221
+ isMetalink: !1
222
+ };
223
+ } catch {
224
+ return {
225
+ url: r,
226
+ protocol: "https",
227
+ host: "unknown",
228
+ filename: "download",
229
+ resumable: !1,
230
+ isMagnet: !1,
231
+ isMetalink: !1
232
+ };
233
+ }
234
+ }
235
+ function k(r) {
236
+ var m;
237
+ const e = new URLSearchParams(r.replace("magnet:?", "")), o = (e.get("xt") || "").replace("urn:btih:", ""), n = e.get("dn") || "Unknown Torrent", s = e.getAll("tr"), a = e.get("xl") ? parseInt(e.get("xl"), 10) : void 0, d = ((m = e.get("kt")) == null ? void 0 : m.split("+")) || [];
238
+ return {
239
+ url: r,
240
+ protocol: "bittorrent",
241
+ host: "bittorrent",
242
+ filename: n,
243
+ size: a,
244
+ resumable: !0,
245
+ isMagnet: !0,
246
+ isMetalink: !1,
247
+ magnetInfo: {
248
+ infoHash: o,
249
+ displayName: n,
250
+ trackers: s,
251
+ exactLength: a,
252
+ keywords: d
253
+ }
254
+ };
255
+ }
256
+ function x(r) {
257
+ const e = {
258
+ video: ["mp4", "mkv", "avi", "mov", "wmv", "flv", "webm", "m4v", "mpeg", "mpg", "3gp"],
259
+ audio: ["mp3", "flac", "wav", "aac", "ogg", "wma", "m4a", "opus", "aiff"],
260
+ image: ["jpg", "jpeg", "png", "gif", "bmp", "svg", "webp", "ico", "tiff", "raw"],
261
+ document: ["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "rtf", "odt"],
262
+ archive: ["zip", "rar", "7z", "tar", "gz", "bz2", "xz", "iso"],
263
+ executable: ["exe", "msi", "dmg", "app", "deb", "rpm", "apk"],
264
+ code: ["js", "ts", "py", "java", "cpp", "c", "cs", "go", "rs", "rb", "php"]
265
+ };
266
+ for (const [t, o] of Object.entries(e))
267
+ if (o.includes(r.toLowerCase()))
268
+ return t;
269
+ return "other";
270
+ }
271
+ function L() {
272
+ return `dl_${Date.now().toString(36)}_${Math.random().toString(36).substring(2, 9)}`;
273
+ }
274
+ async function I(r, e) {
275
+ if (typeof crypto > "u" || !crypto.subtle)
276
+ return console.warn("Web Crypto API not available for checksum validation"), !0;
277
+ const o = {
278
+ sha256: "SHA-256",
279
+ sha512: "SHA-512",
280
+ sha1: "SHA-1"
281
+ }[e.algorithm];
282
+ if (!o)
283
+ return console.warn(`Unsupported checksum algorithm: ${e.algorithm}`), !0;
284
+ const n = await crypto.subtle.digest(o, r);
285
+ return Array.from(new Uint8Array(n)).map((d) => d.toString(16).padStart(2, "0")).join("").toLowerCase() === e.value.toLowerCase();
286
+ }
287
+ function wt(r, e) {
288
+ if (r <= 0 || e <= 0)
289
+ return [];
290
+ const t = Math.ceil(r / e), o = [];
291
+ for (let n = 0; n < e; n++) {
292
+ const s = n * t, a = Math.min(s + t - 1, r - 1);
293
+ o.push({
294
+ index: n,
295
+ start: s,
296
+ end: a,
297
+ downloaded: 0,
298
+ status: "pending",
299
+ retries: 0
300
+ });
301
+ }
302
+ return o;
303
+ }
304
+ class E {
305
+ constructor(e = {}) {
306
+ this.downloads = /* @__PURE__ */ new Map(), this.activeDownloads = /* @__PURE__ */ new Set(), this.abortControllers = /* @__PURE__ */ new Map(), this.speedSamples = /* @__PURE__ */ new Map(), this.eventListeners = /* @__PURE__ */ new Map(), this.updateInterval = null, this.config = {
307
+ defaultDownloadPath: e.defaultDownloadPath ?? "/downloads",
308
+ maxConcurrentDownloads: e.maxConcurrentDownloads ?? 3,
309
+ bandwidthLimit: e.bandwidthLimit,
310
+ retryAttempts: e.retryAttempts ?? 3,
311
+ retryDelay: e.retryDelay ?? 5e3,
312
+ autoStart: e.autoStart ?? !0,
313
+ resumeOnStartup: e.resumeOnStartup ?? !0,
314
+ categories: e.categories ?? [],
315
+ fileTypeFilters: e.fileTypeFilters ?? []
316
+ };
317
+ }
318
+ /* ─────────────────────────────────────────────────────────────────────────────
319
+ Event Handling
320
+ ───────────────────────────────────────────────────────────────────────────── */
321
+ /**
322
+ * Subscribes to download events.
323
+ */
324
+ on(e, t) {
325
+ return this.eventListeners.has(e) || this.eventListeners.set(e, /* @__PURE__ */ new Set()), this.eventListeners.get(e).add(t), () => {
326
+ var o;
327
+ return (o = this.eventListeners.get(e)) == null ? void 0 : o.delete(t);
328
+ };
329
+ }
330
+ /**
331
+ * Emits a download event.
332
+ */
333
+ emit(e) {
334
+ const t = this.eventListeners.get(e.type);
335
+ if (t)
336
+ for (const o of t)
337
+ try {
338
+ o(e);
339
+ } catch (n) {
340
+ console.error("Download event listener error:", n);
341
+ }
342
+ }
343
+ /* ─────────────────────────────────────────────────────────────────────────────
344
+ Queue Management
345
+ ───────────────────────────────────────────────────────────────────────────── */
346
+ /**
347
+ * Adds a download to the queue.
348
+ */
349
+ addDownload(e, t = {}) {
350
+ const o = C(e), n = L(), s = {
351
+ id: n,
352
+ url: e,
353
+ filename: t.filename ?? o.filename,
354
+ path: t.path ?? this.config.defaultDownloadPath,
355
+ status: "queued",
356
+ priority: t.priority ?? "normal",
357
+ size: o.size,
358
+ downloadedBytes: 0,
359
+ progress: 0,
360
+ speed: g(0),
361
+ addedDate: /* @__PURE__ */ new Date(),
362
+ retryCount: 0,
363
+ category: t.category ?? this.detectCategory(o.extension),
364
+ source: {
365
+ type: o.isMagnet ? "magnet" : "direct",
366
+ protocol: o.protocol,
367
+ host: o.host
368
+ },
369
+ checksum: t.checksum
370
+ };
371
+ return this.downloads.set(n, s), this.emit({ type: "added", download: s }), this.emitQueueChanged(), (t.autoStart ?? this.config.autoStart) && this.activeDownloads.size < this.config.maxConcurrentDownloads && this.startDownload(n), s;
372
+ }
373
+ /**
374
+ * Adds multiple downloads from URLs.
375
+ */
376
+ addDownloads(e, t = {}) {
377
+ return e.map((o) => this.addDownload(o, t));
378
+ }
379
+ /**
380
+ * Removes a download from the queue.
381
+ */
382
+ removeDownload(e, t = !1) {
383
+ return this.downloads.get(e) ? (this.cancelDownload(e), this.downloads.delete(e), this.emitQueueChanged(), t && console.warn("File deletion not implemented in browser environment"), !0) : !1;
384
+ }
385
+ /**
386
+ * Gets a download by ID.
387
+ */
388
+ getDownload(e) {
389
+ return this.downloads.get(e);
390
+ }
391
+ /**
392
+ * Gets all downloads.
393
+ */
394
+ getAllDownloads() {
395
+ return Array.from(this.downloads.values());
396
+ }
397
+ /**
398
+ * Gets the download queue summary.
399
+ */
400
+ getQueue() {
401
+ const e = this.getAllDownloads(), t = e.reduce((n, s) => n + (s.size ?? 0), 0), o = e.reduce((n, s) => n + s.downloadedBytes, 0);
402
+ return {
403
+ items: e,
404
+ totalSize: t,
405
+ totalProgress: t > 0 ? o / t * 100 : 0,
406
+ activeDownloads: this.activeDownloads.size,
407
+ queuedDownloads: e.filter((n) => n.status === "queued").length,
408
+ completedDownloads: e.filter((n) => n.status === "completed").length
409
+ };
410
+ }
411
+ /**
412
+ * Gets downloads by status.
413
+ */
414
+ getDownloadsByStatus(e) {
415
+ return this.getAllDownloads().filter((t) => t.status === e);
416
+ }
417
+ /**
418
+ * Gets downloads by category.
419
+ */
420
+ getDownloadsByCategory(e) {
421
+ return this.getAllDownloads().filter((t) => t.category === e);
422
+ }
423
+ /* ─────────────────────────────────────────────────────────────────────────────
424
+ Download Control
425
+ ───────────────────────────────────────────────────────────────────────────── */
426
+ /**
427
+ * Starts a download.
428
+ */
429
+ async startDownload(e) {
430
+ const t = this.downloads.get(e);
431
+ if (!t || t.status === "downloading")
432
+ return;
433
+ if (this.activeDownloads.size >= this.config.maxConcurrentDownloads) {
434
+ t.status = "queued";
435
+ return;
436
+ }
437
+ t.status = "downloading", t.startedDate = /* @__PURE__ */ new Date(), this.activeDownloads.add(e);
438
+ const o = new AbortController();
439
+ this.abortControllers.set(e, o), this.speedSamples.set(e, []), this.emit({ type: "started", download: t });
440
+ try {
441
+ await this.executeDownload(t, o.signal), t.status = "completed", t.completedDate = /* @__PURE__ */ new Date(), t.progress = 100, this.emit({ type: "completed", download: t });
442
+ } catch (n) {
443
+ if (o.signal.aborted)
444
+ return;
445
+ t.errorMessage = n instanceof Error ? n.message : "Download failed", t.retryCount < this.config.retryAttempts ? (t.retryCount++, t.status = "queued", setTimeout(() => this.startDownload(e), this.config.retryDelay)) : (t.status = "failed", this.emit({
446
+ type: "failed",
447
+ download: t,
448
+ error: n instanceof Error ? n : new Error(String(n))
449
+ }));
450
+ } finally {
451
+ this.activeDownloads.delete(e), this.abortControllers.delete(e), this.speedSamples.delete(e), this.emitQueueChanged(), this.processQueue();
452
+ }
453
+ }
454
+ /**
455
+ * Pauses a download.
456
+ */
457
+ pauseDownload(e) {
458
+ const t = this.downloads.get(e);
459
+ if (!t || t.status !== "downloading")
460
+ return;
461
+ const o = this.abortControllers.get(e);
462
+ o && o.abort(), t.status = "paused", this.activeDownloads.delete(e), this.emit({ type: "paused", download: t }), this.emitQueueChanged(), this.processQueue();
463
+ }
464
+ /**
465
+ * Resumes a paused download.
466
+ */
467
+ resumeDownload(e) {
468
+ const t = this.downloads.get(e);
469
+ !t || t.status !== "paused" || (t.status = "queued", this.emit({ type: "resumed", download: t }), this.startDownload(e));
470
+ }
471
+ /**
472
+ * Cancels a download.
473
+ */
474
+ cancelDownload(e) {
475
+ const t = this.downloads.get(e);
476
+ if (!t)
477
+ return;
478
+ const o = this.abortControllers.get(e);
479
+ o && o.abort(), t.status = "cancelled", this.activeDownloads.delete(e), this.emit({ type: "cancelled", download: t }), this.emitQueueChanged(), this.processQueue();
480
+ }
481
+ /**
482
+ * Pauses all active downloads.
483
+ */
484
+ pauseAll() {
485
+ for (const e of this.activeDownloads)
486
+ this.pauseDownload(e);
487
+ }
488
+ /**
489
+ * Resumes all paused downloads.
490
+ */
491
+ resumeAll() {
492
+ for (const e of this.downloads.values())
493
+ e.status === "paused" && this.resumeDownload(e.id);
494
+ }
495
+ /**
496
+ * Cancels all downloads.
497
+ */
498
+ cancelAll() {
499
+ for (const e of this.downloads.keys())
500
+ this.cancelDownload(e);
501
+ }
502
+ /**
503
+ * Changes download priority.
504
+ */
505
+ setPriority(e, t) {
506
+ const o = this.downloads.get(e);
507
+ o && (o.priority = t, this.emitQueueChanged());
508
+ }
509
+ /**
510
+ * Moves a download in the queue.
511
+ */
512
+ moveInQueue(e, t) {
513
+ const o = this.getAllDownloads().filter((s) => s.status === "queued"), n = o.findIndex((s) => s.id === e);
514
+ if (n !== -1) {
515
+ switch (t) {
516
+ case "top":
517
+ o[n].priority = "critical";
518
+ break;
519
+ case "up":
520
+ o[n].priority === "normal" ? o[n].priority = "high" : o[n].priority === "low" && (o[n].priority = "normal");
521
+ break;
522
+ case "down":
523
+ o[n].priority === "normal" ? o[n].priority = "low" : o[n].priority === "high" && (o[n].priority = "normal");
524
+ break;
525
+ case "bottom":
526
+ o[n].priority = "low";
527
+ break;
528
+ }
529
+ this.emitQueueChanged();
530
+ }
531
+ }
532
+ /* ─────────────────────────────────────────────────────────────────────────────
533
+ Configuration
534
+ ───────────────────────────────────────────────────────────────────────────── */
535
+ /**
536
+ * Gets the current configuration.
537
+ */
538
+ getConfig() {
539
+ return { ...this.config };
540
+ }
541
+ /**
542
+ * Updates the configuration.
543
+ */
544
+ updateConfig(e) {
545
+ this.config = { ...this.config, ...e };
546
+ }
547
+ /**
548
+ * Sets bandwidth limit.
549
+ */
550
+ setBandwidthLimit(e) {
551
+ this.config.bandwidthLimit = e;
552
+ }
553
+ /**
554
+ * Sets maximum concurrent downloads.
555
+ */
556
+ setMaxConcurrentDownloads(e) {
557
+ this.config.maxConcurrentDownloads = e, this.processQueue();
558
+ }
559
+ /**
560
+ * Adds a download category.
561
+ */
562
+ addCategory(e) {
563
+ this.config.categories = [...this.config.categories ?? [], e];
564
+ }
565
+ /* ─────────────────────────────────────────────────────────────────────────────
566
+ Statistics
567
+ ───────────────────────────────────────────────────────────────────────────── */
568
+ /**
569
+ * Gets overall transfer statistics.
570
+ */
571
+ getStats() {
572
+ const e = this.getAllDownloads(), t = e.reduce((s, a) => s + a.downloadedBytes, 0), o = e.reduce((s, a) => s + (a.size ?? 0), 0);
573
+ let n = 0;
574
+ for (const s of this.activeDownloads) {
575
+ const a = this.downloads.get(s);
576
+ a && (n += a.speed.bytesPerSecond);
577
+ }
578
+ return {
579
+ downloaded: t,
580
+ uploaded: 0,
581
+ remaining: o - t,
582
+ total: o,
583
+ progress: o > 0 ? t / o * 100 : 0,
584
+ downloadSpeed: g(n),
585
+ uploadSpeed: g(0),
586
+ eta: n > 0 ? M(o - t, n) : void 0
587
+ };
588
+ }
589
+ /* ─────────────────────────────────────────────────────────────────────────────
590
+ Private Methods
591
+ ───────────────────────────────────────────────────────────────────────────── */
592
+ /**
593
+ * Executes the actual download using Fetch API.
594
+ */
595
+ async executeDownload(e, t) {
596
+ var p, l;
597
+ const o = await fetch(e.url, {
598
+ signal: t,
599
+ headers: (p = e.source) != null && p.auth ? this.buildAuthHeaders(e.source.auth) : void 0
600
+ });
601
+ if (!o.ok)
602
+ throw new Error(`HTTP ${o.status}: ${o.statusText}`);
603
+ const n = o.headers.get("content-length");
604
+ n && (e.size = parseInt(n, 10));
605
+ const s = (l = o.body) == null ? void 0 : l.getReader();
606
+ if (!s)
607
+ throw new Error("Response body is not readable");
608
+ const a = [];
609
+ let d = Date.now(), f = 0;
610
+ for (; ; ) {
611
+ const { done: u, value: h } = await s.read();
612
+ if (u)
613
+ break;
614
+ a.push(h), e.downloadedBytes += h.length, f += h.length, e.size && (e.progress = e.downloadedBytes / e.size * 100);
615
+ const y = Date.now(), D = y - d;
616
+ if (D >= 500) {
617
+ const v = f / D * 1e3;
618
+ this.updateSpeed(e.id, v), e.speed = g(v), e.eta = e.size ? M(e.size - e.downloadedBytes, v) : void 0, this.emit({ type: "progress", download: e }), d = y, f = 0;
619
+ }
620
+ }
621
+ const m = new Uint8Array(e.downloadedBytes);
622
+ let i = 0;
623
+ for (const u of a)
624
+ m.set(u, i), i += u.length;
625
+ if (e.checksum) {
626
+ if (!await I(m.buffer, e.checksum))
627
+ throw new Error("Checksum validation failed");
628
+ e.checksum.verified = !0;
629
+ }
630
+ this.handleDownloadComplete(e, m);
631
+ }
632
+ /**
633
+ * Handles completed download data.
634
+ */
635
+ handleDownloadComplete(e, t) {
636
+ if (typeof window < "u" && typeof document < "u") {
637
+ const o = new Blob([new Uint8Array(t)]), n = URL.createObjectURL(o), s = document.createElement("a");
638
+ s.href = n, s.download = e.filename, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(n);
639
+ }
640
+ }
641
+ /**
642
+ * Builds authentication headers.
643
+ */
644
+ buildAuthHeaders(e) {
645
+ if (!e)
646
+ return {};
647
+ switch (e.type) {
648
+ case "basic":
649
+ return { Authorization: `Basic ${btoa(`${e.username}:${e.password}`)}` };
650
+ case "bearer":
651
+ return { Authorization: `Bearer ${e.token}` };
652
+ case "api_key":
653
+ return { "X-API-Key": e.apiKey ?? "" };
654
+ default:
655
+ return {};
656
+ }
657
+ }
658
+ /**
659
+ * Updates speed tracking for a download.
660
+ */
661
+ updateSpeed(e, t) {
662
+ const o = this.speedSamples.get(e) || [];
663
+ o.push(t), o.length > 10 && o.shift(), this.speedSamples.set(e, o);
664
+ }
665
+ /**
666
+ * Processes the download queue.
667
+ */
668
+ processQueue() {
669
+ if (this.activeDownloads.size >= this.config.maxConcurrentDownloads)
670
+ return;
671
+ const e = this.getDownloadsByStatus("queued").sort((t, o) => {
672
+ const n = { critical: 0, high: 1, normal: 2, low: 3 };
673
+ return n[t.priority] - n[o.priority];
674
+ });
675
+ for (const t of e) {
676
+ if (this.activeDownloads.size >= this.config.maxConcurrentDownloads)
677
+ break;
678
+ this.startDownload(t.id);
679
+ }
680
+ }
681
+ /**
682
+ * Detects category from file extension.
683
+ */
684
+ detectCategory(e) {
685
+ var t;
686
+ if (!(!e || !this.config.categories)) {
687
+ for (const o of this.config.categories)
688
+ if ((t = o.fileTypes) != null && t.includes(e.toLowerCase()))
689
+ return o.id;
690
+ }
691
+ }
692
+ /**
693
+ * Emits a queue changed event.
694
+ */
695
+ emitQueueChanged() {
696
+ this.emit({ type: "queue-changed", queue: this.getQueue() });
697
+ }
698
+ /**
699
+ * Disposes the download manager.
700
+ */
701
+ dispose() {
702
+ this.cancelAll(), this.updateInterval && clearInterval(this.updateInterval), this.eventListeners.clear(), this.downloads.clear();
703
+ }
704
+ }
705
+ let b = null;
706
+ function N(r) {
707
+ return b || (b = new E(r)), b;
708
+ }
709
+ function yt() {
710
+ b == null || b.dispose(), b = null;
711
+ }
712
+ function St(r = {}) {
713
+ const { config: e, autoRefresh: t = !0, refreshInterval: o = 1e3 } = r, n = S(() => N(e), [e]), [s, a] = _(n.getQueue()), [d, f] = _(n.getStats());
714
+ A(() => {
715
+ const l = () => {
716
+ a(n.getQueue()), f(n.getStats());
717
+ }, u = [
718
+ n.on("added", l),
719
+ n.on("started", l),
720
+ n.on("progress", l),
721
+ n.on("paused", l),
722
+ n.on("resumed", l),
723
+ n.on("completed", l),
724
+ n.on("failed", l),
725
+ n.on("cancelled", l),
726
+ n.on("queue-changed", l)
727
+ ];
728
+ let h;
729
+ return t && (h = setInterval(() => {
730
+ n.getQueue().activeDownloads > 0 && l();
731
+ }, o)), () => {
732
+ u.forEach((y) => y()), h && clearInterval(h);
733
+ };
734
+ }, [n, t, o]);
735
+ const m = S(
736
+ () => s.items.filter((l) => l.status === "downloading"),
737
+ [s]
738
+ ), i = c(
739
+ (l, u) => n.addDownload(l, u),
740
+ [n]
741
+ ), p = c(
742
+ (l, u) => n.addDownloads(l, u),
743
+ [n]
744
+ );
745
+ return {
746
+ queue: s,
747
+ stats: d,
748
+ activeDownloads: m,
749
+ addDownload: i,
750
+ addDownloads: p,
751
+ startDownload: c((l) => n.startDownload(l), [n]),
752
+ pauseDownload: c((l) => n.pauseDownload(l), [n]),
753
+ resumeDownload: c((l) => n.resumeDownload(l), [n]),
754
+ cancelDownload: c((l) => n.cancelDownload(l), [n]),
755
+ removeDownload: c(
756
+ (l, u) => n.removeDownload(l, u),
757
+ [n]
758
+ ),
759
+ pauseAll: c(() => n.pauseAll(), [n]),
760
+ resumeAll: c(() => n.resumeAll(), [n]),
761
+ setBandwidthLimit: c((l) => n.setBandwidthLimit(l), [n]),
762
+ setPriority: c((l, u) => n.setPriority(l, u), [n])
763
+ };
764
+ }
765
+ function j() {
766
+ const r = "0123456789abcdef";
767
+ let e = "";
768
+ for (let t = 0; t < 40; t++)
769
+ e += r[Math.floor(Math.random() * r.length)];
770
+ return e;
771
+ }
772
+ function F() {
773
+ const r = "-NI0100-", e = Array.from(
774
+ { length: 12 },
775
+ () => Math.floor(Math.random() * 256).toString(16).padStart(2, "0")
776
+ ).join("");
777
+ return r + e;
778
+ }
779
+ function B(r) {
780
+ var f;
781
+ if (!r.startsWith("magnet:?"))
782
+ return null;
783
+ const e = new URLSearchParams(r.replace("magnet:?", "")), t = e.get("xt");
784
+ if (!t)
785
+ return null;
786
+ const o = t.replace("urn:btih:", ""), n = e.get("dn") || void 0, s = e.getAll("tr"), a = e.get("xl") ? parseInt(e.get("xl"), 10) : void 0, d = ((f = e.get("kt")) == null ? void 0 : f.split("+")) || void 0;
787
+ return {
788
+ infoHash: o,
789
+ displayName: n,
790
+ trackers: s.length > 0 ? s : void 0,
791
+ exactLength: a,
792
+ keywords: d
793
+ };
794
+ }
795
+ function R(r) {
796
+ const e = new URLSearchParams();
797
+ if (e.set("xt", `urn:btih:${r.infoHash}`), e.set("dn", r.name), r.size && e.set("xl", r.size.toString()), r.trackers)
798
+ for (const t of r.trackers)
799
+ e.append("tr", t);
800
+ return `magnet:?${e.toString()}`;
801
+ }
802
+ function T(r, e = 262144) {
803
+ return Math.ceil(r / e);
804
+ }
805
+ function O(r) {
806
+ return Array.from({ length: r }, () => "missing");
807
+ }
808
+ function _t(r, e) {
809
+ return `${r}/${e}`;
810
+ }
811
+ function vt(r, e) {
812
+ if (r === 0)
813
+ return "dead";
814
+ const t = r / (e + 1);
815
+ return t >= 2 && r >= 10 ? "excellent" : t >= 1 && r >= 5 ? "good" : r >= 1 ? "fair" : "poor";
816
+ }
817
+ function Mt(r) {
818
+ return new Map(r.map((e) => [e.index, e.wanted]));
819
+ }
820
+ function P(r, e) {
821
+ return r.filter((t) => {
822
+ var n;
823
+ const o = (n = t.name.split(".").pop()) == null ? void 0 : n.toLowerCase();
824
+ return o && e.includes(o);
825
+ });
826
+ }
827
+ function Tt(r) {
828
+ return P(r, ["mp4", "mkv", "avi", "mov", "wmv", "flv", "webm", "m4v", "mpeg", "mpg"]);
829
+ }
830
+ function Dt(r) {
831
+ return P(r, ["mp3", "flac", "wav", "aac", "ogg", "wma", "m4a", "opus"]);
832
+ }
833
+ function Ot(r) {
834
+ return r.reduce(
835
+ (e, t) => t.size > ((e == null ? void 0 : e.size) ?? 0) ? t : e,
836
+ void 0
837
+ );
838
+ }
839
+ class U {
840
+ constructor(e = {}) {
841
+ this.torrents = /* @__PURE__ */ new Map(), this.eventListeners = /* @__PURE__ */ new Map(), this.updateIntervals = /* @__PURE__ */ new Map(), this.peerId = F(), this.config = {
842
+ downloadPath: e.downloadPath ?? "/downloads/torrents",
843
+ tempPath: e.tempPath,
844
+ maxActiveTorrents: e.maxActiveTorrents ?? 5,
845
+ maxActiveSeedsperTorrent: e.maxActiveSeedsperTorrent ?? 50,
846
+ maxConnectionsPerTorrent: e.maxConnectionsPerTorrent ?? 50,
847
+ maxGlobalConnections: e.maxGlobalConnections ?? 200,
848
+ bandwidthLimit: e.bandwidthLimit ?? { enabled: !1, unit: "MB/s" },
849
+ dhtEnabled: e.dhtEnabled ?? !0,
850
+ pexEnabled: e.pexEnabled ?? !0,
851
+ lpdEnabled: e.lpdEnabled ?? !0,
852
+ upnpEnabled: e.upnpEnabled ?? !0,
853
+ natPmpEnabled: e.natPmpEnabled ?? !0,
854
+ encryptionMode: e.encryptionMode ?? "enabled",
855
+ ipv6Enabled: e.ipv6Enabled ?? !0,
856
+ listeningPort: e.listeningPort ?? 6881,
857
+ proxySettings: e.proxySettings
858
+ }, this.config.dhtEnabled && this.initDHT(), this.config.pexEnabled && this.initPEX();
859
+ }
860
+ /* ─────────────────────────────────────────────────────────────────────────────
861
+ Event Handling
862
+ ───────────────────────────────────────────────────────────────────────────── */
863
+ /**
864
+ * Subscribes to torrent events.
865
+ */
866
+ on(e, t) {
867
+ return this.eventListeners.has(e) || this.eventListeners.set(e, /* @__PURE__ */ new Set()), this.eventListeners.get(e).add(t), () => {
868
+ var o;
869
+ return (o = this.eventListeners.get(e)) == null ? void 0 : o.delete(t);
870
+ };
871
+ }
872
+ /**
873
+ * Emits a torrent event.
874
+ */
875
+ emit(e) {
876
+ const t = this.eventListeners.get(e.type);
877
+ if (t)
878
+ for (const o of t)
879
+ try {
880
+ o(e);
881
+ } catch (n) {
882
+ console.error("Torrent event listener error:", n);
883
+ }
884
+ }
885
+ /* ─────────────────────────────────────────────────────────────────────────────
886
+ Torrent Management
887
+ ───────────────────────────────────────────────────────────────────────────── */
888
+ /**
889
+ * Adds a torrent from magnet URI.
890
+ */
891
+ addMagnet(e, t = {}) {
892
+ const o = B(e);
893
+ if (!o)
894
+ return console.error("Invalid magnet URI"), null;
895
+ if (this.torrents.has(o.infoHash))
896
+ return this.torrents.get(o.infoHash);
897
+ const n = this.createTorrent({
898
+ infoHash: o.infoHash,
899
+ name: o.displayName ?? "Unknown Torrent",
900
+ size: o.exactLength,
901
+ trackers: o.trackers,
902
+ magnetUri: e,
903
+ ...t
904
+ });
905
+ return this.torrents.set(n.infoHash, n), this.emit({ type: "added", torrent: n }), t.autoStart !== !1 && this.startTorrent(n.infoHash), n;
906
+ }
907
+ /**
908
+ * Adds a torrent from .torrent file data.
909
+ */
910
+ addTorrentFile(e, t = {}) {
911
+ const o = j(), n = this.createTorrent({
912
+ infoHash: o,
913
+ name: "Torrent from file",
914
+ ...t
915
+ });
916
+ return this.torrents.set(n.infoHash, n), this.emit({ type: "added", torrent: n }), t.autoStart !== !1 && this.startTorrent(n.infoHash), n;
917
+ }
918
+ /**
919
+ * Creates a new torrent structure.
920
+ */
921
+ createTorrent(e) {
922
+ const t = e.size ? T(e.size) : 0, o = (e.trackers || this.getDefaultTrackers()).filter((n, s, a) => a.indexOf(n) === s).map((n, s) => ({
923
+ url: n,
924
+ tier: Math.floor(s / 3),
925
+ status: "not_contacted",
926
+ seeds: void 0,
927
+ leechers: void 0
928
+ }));
929
+ return {
930
+ id: `torrent_${Date.now().toString(36)}_${Math.random().toString(36).substring(2, 9)}`,
931
+ infoHash: e.infoHash,
932
+ name: e.name,
933
+ status: "queued",
934
+ priority: e.priority ?? "normal",
935
+ // Size info
936
+ size: e.size ?? 0,
937
+ downloadedBytes: 0,
938
+ uploadedBytes: 0,
939
+ progress: 0,
940
+ ratio: 0,
941
+ // Speed
942
+ downloadSpeed: g(0),
943
+ uploadSpeed: g(0),
944
+ // Peers
945
+ seeds: 0,
946
+ peers: 0,
947
+ // Trackers
948
+ trackers: o,
949
+ // Files
950
+ files: [],
951
+ pieces: O(t),
952
+ // Configuration
953
+ savePath: e.path ?? this.config.downloadPath,
954
+ isPrivate: !1,
955
+ // Metadata
956
+ magnetUri: e.magnetUri,
957
+ addedDate: /* @__PURE__ */ new Date(),
958
+ sequentialDownload: e.sequentialDownload ?? !1,
959
+ selectedFiles: e.selectedFiles ?? []
960
+ };
961
+ }
962
+ /**
963
+ * Removes a torrent.
964
+ */
965
+ removeTorrent(e, t = !1) {
966
+ const o = this.torrents.get(e);
967
+ return o ? (this.stopTorrent(e), this.torrents.delete(e), this.emit({ type: "removed", torrent: o }), t && console.warn("Data deletion not implemented in browser environment"), !0) : !1;
968
+ }
969
+ /**
970
+ * Gets a torrent by info hash.
971
+ */
972
+ getTorrent(e) {
973
+ return this.torrents.get(e);
974
+ }
975
+ /**
976
+ * Gets all torrents.
977
+ */
978
+ getAllTorrents() {
979
+ return Array.from(this.torrents.values());
980
+ }
981
+ /**
982
+ * Gets torrents by status.
983
+ */
984
+ getTorrentsByStatus(e) {
985
+ return this.getAllTorrents().filter((t) => t.status === e);
986
+ }
987
+ /* ─────────────────────────────────────────────────────────────────────────────
988
+ Torrent Control
989
+ ───────────────────────────────────────────────────────────────────────────── */
990
+ /**
991
+ * Starts a torrent.
992
+ */
993
+ startTorrent(e) {
994
+ const t = this.torrents.get(e);
995
+ t && (t.status === "downloading" || t.status === "seeding" || (t.files.length === 0 && t.magnetUri ? (t.status = "checking", this.fetchMetadata(t)) : (t.status = "downloading", t.startedDate = /* @__PURE__ */ new Date()), this.emit({ type: "started", torrent: t }), this.simulateTorrentProgress(e)));
996
+ }
997
+ /**
998
+ * Pauses a torrent.
999
+ */
1000
+ pauseTorrent(e) {
1001
+ const t = this.torrents.get(e);
1002
+ if (!t)
1003
+ return;
1004
+ const o = this.updateIntervals.get(e);
1005
+ o && (clearInterval(o), this.updateIntervals.delete(e)), t.status = "paused", t.downloadSpeed = g(0), t.uploadSpeed = g(0), this.emit({ type: "paused", torrent: t });
1006
+ }
1007
+ /**
1008
+ * Resumes a torrent.
1009
+ */
1010
+ resumeTorrent(e) {
1011
+ const t = this.torrents.get(e);
1012
+ !t || t.status !== "paused" || (t.status = t.progress >= 100 ? "seeding" : "downloading", this.emit({ type: "resumed", torrent: t }), this.simulateTorrentProgress(e));
1013
+ }
1014
+ /**
1015
+ * Stops a torrent.
1016
+ */
1017
+ stopTorrent(e) {
1018
+ const t = this.torrents.get(e);
1019
+ if (!t)
1020
+ return;
1021
+ const o = this.updateIntervals.get(e);
1022
+ o && (clearInterval(o), this.updateIntervals.delete(e)), t.status = "stopped", t.downloadSpeed = g(0), t.uploadSpeed = g(0);
1023
+ }
1024
+ /**
1025
+ * Forces recheck of torrent.
1026
+ */
1027
+ recheckTorrent(e) {
1028
+ const t = this.torrents.get(e);
1029
+ t && (t.status = "checking", setTimeout(() => {
1030
+ t.status === "checking" && (t.status = t.progress >= 100 ? "seeding" : "queued");
1031
+ }, 2e3));
1032
+ }
1033
+ /**
1034
+ * Force announces to trackers.
1035
+ */
1036
+ announceToTrackers(e) {
1037
+ const t = this.torrents.get(e);
1038
+ if (t)
1039
+ for (const o of t.trackers)
1040
+ o.status = "updating", setTimeout(
1041
+ () => {
1042
+ o.status = "working", o.lastAnnounce = /* @__PURE__ */ new Date(), o.seeds = Math.floor(Math.random() * 100), o.leechers = Math.floor(Math.random() * 50), this.emit({ type: "tracker-update", torrent: t, tracker: o });
1043
+ },
1044
+ 1e3 + Math.random() * 2e3
1045
+ );
1046
+ }
1047
+ /* ─────────────────────────────────────────────────────────────────────────────
1048
+ File Selection
1049
+ ───────────────────────────────────────────────────────────────────────────── */
1050
+ /**
1051
+ * Sets file priority/selection.
1052
+ */
1053
+ setFileSelection(e, t, o) {
1054
+ const n = this.torrents.get(e);
1055
+ if (!n)
1056
+ return;
1057
+ const s = n.files.find((a) => a.index === t);
1058
+ s && (s.wanted = o, s.priority = o ? "normal" : "skip", n.selectedFiles && (o && !n.selectedFiles.includes(t) ? n.selectedFiles.push(t) : o || (n.selectedFiles = n.selectedFiles.filter((a) => a !== t))));
1059
+ }
1060
+ /**
1061
+ * Sets priority for a file.
1062
+ */
1063
+ setFilePriority(e, t, o) {
1064
+ const n = this.torrents.get(e);
1065
+ if (!n)
1066
+ return;
1067
+ const s = n.files.find((a) => a.index === t);
1068
+ s && (s.priority = o, s.wanted = o !== "skip");
1069
+ }
1070
+ /**
1071
+ * Selects all files.
1072
+ */
1073
+ selectAllFiles(e) {
1074
+ const t = this.torrents.get(e);
1075
+ if (t) {
1076
+ for (const o of t.files)
1077
+ o.wanted = !0, o.priority = "normal";
1078
+ t.selectedFiles !== void 0 && (t.selectedFiles = t.files.map((o) => o.index));
1079
+ }
1080
+ }
1081
+ /**
1082
+ * Deselects all files.
1083
+ */
1084
+ deselectAllFiles(e) {
1085
+ const t = this.torrents.get(e);
1086
+ if (t) {
1087
+ for (const o of t.files)
1088
+ o.wanted = !1, o.priority = "skip";
1089
+ t.selectedFiles !== void 0 && (t.selectedFiles = []);
1090
+ }
1091
+ }
1092
+ /**
1093
+ * Sets sequential download mode.
1094
+ */
1095
+ setSequentialDownload(e, t) {
1096
+ const o = this.torrents.get(e);
1097
+ o && (o.sequentialDownload = t);
1098
+ }
1099
+ /* ─────────────────────────────────────────────────────────────────────────────
1100
+ Configuration
1101
+ ───────────────────────────────────────────────────────────────────────────── */
1102
+ /**
1103
+ * Gets client configuration.
1104
+ */
1105
+ getConfig() {
1106
+ return { ...this.config };
1107
+ }
1108
+ /**
1109
+ * Updates client configuration.
1110
+ */
1111
+ updateConfig(e) {
1112
+ this.config = { ...this.config, ...e };
1113
+ }
1114
+ /**
1115
+ * Sets download speed limit.
1116
+ */
1117
+ setDownloadLimit(e) {
1118
+ e !== void 0 ? this.config.bandwidthLimit = {
1119
+ ...this.config.bandwidthLimit,
1120
+ download: e,
1121
+ enabled: !0
1122
+ } : this.config.bandwidthLimit = {
1123
+ ...this.config.bandwidthLimit,
1124
+ download: void 0
1125
+ };
1126
+ }
1127
+ /**
1128
+ * Sets upload speed limit.
1129
+ */
1130
+ setUploadLimit(e) {
1131
+ e !== void 0 ? this.config.bandwidthLimit = {
1132
+ ...this.config.bandwidthLimit,
1133
+ upload: e,
1134
+ enabled: !0
1135
+ } : this.config.bandwidthLimit = {
1136
+ ...this.config.bandwidthLimit,
1137
+ upload: void 0
1138
+ };
1139
+ }
1140
+ /**
1141
+ * Enables or disables DHT.
1142
+ */
1143
+ setDHTEnabled(e) {
1144
+ this.config.dhtEnabled = e, e && this.initDHT();
1145
+ }
1146
+ /**
1147
+ * Enables or disables PEX.
1148
+ */
1149
+ setPEXEnabled(e) {
1150
+ this.config.pexEnabled = e, e && this.initPEX();
1151
+ }
1152
+ /* ─────────────────────────────────────────────────────────────────────────────
1153
+ Statistics
1154
+ ───────────────────────────────────────────────────────────────────────────── */
1155
+ /**
1156
+ * Gets overall client statistics.
1157
+ */
1158
+ getStatistics() {
1159
+ const e = this.getAllTorrents();
1160
+ let t = 0, o = 0, n = 0, s = 0, a = 0;
1161
+ for (const d of e)
1162
+ t += d.downloadedBytes, o += d.uploadedBytes, n += d.downloadSpeed.bytesPerSecond, s += d.uploadSpeed.bytesPerSecond, a += d.peers;
1163
+ return {
1164
+ activeSeeders: e.filter((d) => d.status === "seeding").length,
1165
+ activeDownloads: e.filter((d) => d.status === "downloading").length,
1166
+ totalDownloaded: t,
1167
+ totalUploaded: o,
1168
+ downloadSpeed: g(n),
1169
+ uploadSpeed: g(s),
1170
+ globalRatio: t > 0 ? o / t : 0,
1171
+ dhtNodes: this.config.dhtEnabled ? Math.floor(Math.random() * 500 + 100) : 0,
1172
+ totalPeers: a,
1173
+ sessionDuration: 0
1174
+ // Would track actual session time
1175
+ };
1176
+ }
1177
+ /* ─────────────────────────────────────────────────────────────────────────────
1178
+ Private Methods
1179
+ ───────────────────────────────────────────────────────────────────────────── */
1180
+ /**
1181
+ * Gets default trackers.
1182
+ */
1183
+ getDefaultTrackers() {
1184
+ return [
1185
+ "udp://tracker.opentrackr.org:1337/announce",
1186
+ "udp://tracker.openbittorrent.com:6969/announce",
1187
+ "udp://open.stealth.si:80/announce",
1188
+ "udp://tracker.torrent.eu.org:451/announce"
1189
+ ];
1190
+ }
1191
+ /**
1192
+ * Initializes DHT.
1193
+ */
1194
+ initDHT() {
1195
+ console.log("DHT initialized");
1196
+ }
1197
+ /**
1198
+ * Initializes PEX.
1199
+ */
1200
+ initPEX() {
1201
+ console.log("PEX initialized");
1202
+ }
1203
+ /**
1204
+ * Fetches torrent metadata from magnet.
1205
+ */
1206
+ fetchMetadata(e) {
1207
+ setTimeout(
1208
+ () => {
1209
+ e.status === "checking" && (e.files = [
1210
+ {
1211
+ index: 0,
1212
+ name: `${e.name}.mkv`,
1213
+ path: `${e.name}/${e.name}.mkv`,
1214
+ size: Math.floor(Math.random() * 2e9) + 5e8,
1215
+ // 500MB - 2.5GB
1216
+ progress: 0,
1217
+ downloaded: 0,
1218
+ priority: "normal",
1219
+ wanted: !0
1220
+ },
1221
+ {
1222
+ index: 1,
1223
+ name: "sample.mp4",
1224
+ path: `${e.name}/sample.mp4`,
1225
+ size: Math.floor(Math.random() * 5e7) + 1e7,
1226
+ // 10-60MB
1227
+ progress: 0,
1228
+ downloaded: 0,
1229
+ priority: "normal",
1230
+ wanted: !0
1231
+ },
1232
+ {
1233
+ index: 2,
1234
+ name: "readme.txt",
1235
+ path: `${e.name}/readme.txt`,
1236
+ size: 1024,
1237
+ progress: 0,
1238
+ downloaded: 0,
1239
+ priority: "low",
1240
+ wanted: !0
1241
+ }
1242
+ ], e.size = e.files.reduce((t, o) => t + o.size, 0), e.selectedFiles = e.files.map((t) => t.index), e.pieces = O(T(e.size)), e.status = "downloading", this.emit({ type: "metadata", torrent: e }), this.emit({ type: "started", torrent: e }));
1243
+ },
1244
+ 2e3 + Math.random() * 3e3
1245
+ );
1246
+ }
1247
+ /**
1248
+ * Simulates torrent progress for demo purposes.
1249
+ */
1250
+ simulateTorrentProgress(e) {
1251
+ this.updateIntervals.has(e) && clearInterval(this.updateIntervals.get(e));
1252
+ const t = setInterval(() => {
1253
+ const o = this.torrents.get(e);
1254
+ if (!o) {
1255
+ clearInterval(t);
1256
+ return;
1257
+ }
1258
+ if (!(o.status !== "downloading" && o.status !== "seeding")) {
1259
+ if (o.status === "downloading" && o.size > 0) {
1260
+ const n = 1e6 + Math.random() * 5e6, s = this.config.bandwidthLimit.download ? Math.min(n, this.config.bandwidthLimit.download) : n, a = s * (1 + Math.random() * 0.5);
1261
+ o.downloadedBytes = Math.min(o.downloadedBytes + a, o.size), o.progress = o.downloadedBytes / o.size * 100, o.downloadSpeed = g(s), o.uploadSpeed = g(s * 0.1 * Math.random());
1262
+ for (const d of o.files)
1263
+ d.wanted && (d.downloaded = Math.min(
1264
+ d.downloaded + a * (d.size / o.size),
1265
+ d.size
1266
+ ), d.progress = d.downloaded / d.size * 100);
1267
+ o.peers = Math.floor(Math.random() * 30) + 5, o.seeds = Math.floor(o.peers * 0.6), o.eta = M(o.size - o.downloadedBytes, s), this.emit({ type: "progress", torrent: o }), o.progress >= 100 && (o.status = "seeding", o.completedDate = /* @__PURE__ */ new Date(), o.progress = 100, o.downloadedBytes = o.size, this.emit({ type: "completed", torrent: o }), this.emit({ type: "seeding", torrent: o }));
1268
+ }
1269
+ if (o.status === "seeding") {
1270
+ const n = 5e5 + Math.random() * 2e6;
1271
+ o.uploadedBytes += n, o.uploadSpeed = g(n), o.downloadSpeed = g(0), o.ratio = o.size > 0 ? o.uploadedBytes / o.size : 0, o.peers = Math.floor(Math.random() * 10) + 1, o.seeds = 0;
1272
+ }
1273
+ }
1274
+ }, 1e3);
1275
+ this.updateIntervals.set(e, t);
1276
+ }
1277
+ /**
1278
+ * Disposes the client.
1279
+ */
1280
+ dispose() {
1281
+ for (const e of this.updateIntervals.values())
1282
+ clearInterval(e);
1283
+ this.updateIntervals.clear(), this.torrents.clear(), this.eventListeners.clear();
1284
+ }
1285
+ }
1286
+ async function V(r) {
1287
+ const {
1288
+ name: e,
1289
+ files: t,
1290
+ trackers: o = [],
1291
+ comment: n,
1292
+ isPrivate: s = !1,
1293
+ pieceSize: a = 262144,
1294
+ webSeeds: d = []
1295
+ } = r, f = t.reduce((h, y) => h + y.size, 0), m = j(), i = T(f, a), p = R({ infoHash: m, name: e, trackers: o, size: f }), u = new TextEncoder().encode(
1296
+ JSON.stringify({
1297
+ announce: o[0] || "",
1298
+ info: {
1299
+ name: e,
1300
+ "piece length": a,
1301
+ length: f,
1302
+ private: s ? 1 : 0
1303
+ },
1304
+ comment: n,
1305
+ "url-list": d
1306
+ })
1307
+ );
1308
+ return {
1309
+ infoHash: m,
1310
+ magnetLink: p,
1311
+ torrentFile: u,
1312
+ size: f,
1313
+ pieceCount: i,
1314
+ pieceSize: a
1315
+ };
1316
+ }
1317
+ let w = null;
1318
+ function Q(r) {
1319
+ return w || (w = new U(r)), w;
1320
+ }
1321
+ function At() {
1322
+ w == null || w.dispose(), w = null;
1323
+ }
1324
+ function jt(r = {}) {
1325
+ const { config: e, autoRefresh: t = !0, refreshInterval: o = 1e3 } = r, n = S(() => Q(e), [e]), [s, a] = _(n.getAllTorrents()), [d, f] = _(n.getStatistics());
1326
+ A(() => {
1327
+ const i = () => {
1328
+ a([...n.getAllTorrents()]), f(n.getStatistics());
1329
+ }, p = [
1330
+ n.on("added", i),
1331
+ n.on("metadata", i),
1332
+ n.on("started", i),
1333
+ n.on("progress", i),
1334
+ n.on("paused", i),
1335
+ n.on("resumed", i),
1336
+ n.on("completed", i),
1337
+ n.on("seeding", i),
1338
+ n.on("failed", i),
1339
+ n.on("removed", i)
1340
+ ];
1341
+ let l;
1342
+ return t && (l = setInterval(() => {
1343
+ (n.getStatistics().activeDownloads > 0 || n.getStatistics().activeSeeders > 0) && i();
1344
+ }, o)), () => {
1345
+ p.forEach((u) => u()), l && clearInterval(l);
1346
+ };
1347
+ }, [n, t, o]);
1348
+ const m = S(
1349
+ () => s.filter((i) => i.status === "downloading" || i.status === "seeding"),
1350
+ [s]
1351
+ );
1352
+ return {
1353
+ torrents: s,
1354
+ statistics: d,
1355
+ activeTorrents: m,
1356
+ addMagnet: c((i, p) => n.addMagnet(i, p), [n]),
1357
+ addTorrentFile: c((i, p) => n.addTorrentFile(i, p), [n]),
1358
+ removeTorrent: c((i, p) => n.removeTorrent(i, p), [n]),
1359
+ startTorrent: c((i) => n.startTorrent(i), [n]),
1360
+ pauseTorrent: c((i) => n.pauseTorrent(i), [n]),
1361
+ resumeTorrent: c((i) => n.resumeTorrent(i), [n]),
1362
+ stopTorrent: c((i) => n.stopTorrent(i), [n]),
1363
+ setFileSelection: c(
1364
+ (i, p, l) => n.setFileSelection(i, p, l),
1365
+ [n]
1366
+ ),
1367
+ setSequentialDownload: c(
1368
+ (i, p) => n.setSequentialDownload(i, p),
1369
+ [n]
1370
+ ),
1371
+ setDownloadLimit: c((i) => n.setDownloadLimit(i), [n]),
1372
+ setUploadLimit: c((i) => n.setUploadLimit(i), [n]),
1373
+ createTorrent: V
1374
+ };
1375
+ }
1376
+ const H = {
1377
+ cookiesAllowed: !1,
1378
+ localStorageAllowed: !1,
1379
+ sessionStorageAllowed: !1,
1380
+ indexedDBAllowed: !1,
1381
+ webSQLAllowed: !1,
1382
+ serviceWorkerCacheAllowed: !1,
1383
+ effectiveMode: "traceless",
1384
+ consentRequired: !1,
1385
+ canPersist: !1,
1386
+ policySource: "instance",
1387
+ resolvedAt: (/* @__PURE__ */ new Date()).toISOString()
1388
+ }, $ = {
1389
+ cookiesAllowed: !0,
1390
+ localStorageAllowed: !0,
1391
+ sessionStorageAllowed: !0,
1392
+ indexedDBAllowed: !0,
1393
+ webSQLAllowed: !0,
1394
+ serviceWorkerCacheAllowed: !0,
1395
+ effectiveMode: "full",
1396
+ consentRequired: !0,
1397
+ canPersist: !0,
1398
+ policySource: "instance",
1399
+ resolvedAt: (/* @__PURE__ */ new Date()).toISOString()
1400
+ }, q = {
1401
+ traceless: {
1402
+ cookiesAllowed: !1,
1403
+ localStorageAllowed: !1,
1404
+ sessionStorageAllowed: !1,
1405
+ indexedDBAllowed: !1,
1406
+ webSQLAllowed: !1,
1407
+ serviceWorkerCacheAllowed: !1
1408
+ },
1409
+ ephemeral: {
1410
+ cookiesAllowed: !1,
1411
+ localStorageAllowed: !1,
1412
+ sessionStorageAllowed: !0,
1413
+ indexedDBAllowed: !1,
1414
+ webSQLAllowed: !1,
1415
+ serviceWorkerCacheAllowed: !1
1416
+ },
1417
+ private: {
1418
+ cookiesAllowed: !1,
1419
+ // except httpOnly auth
1420
+ localStorageAllowed: !1,
1421
+ sessionStorageAllowed: !0,
1422
+ indexedDBAllowed: !1,
1423
+ webSQLAllowed: !1,
1424
+ serviceWorkerCacheAllowed: !1
1425
+ },
1426
+ balanced: {
1427
+ cookiesAllowed: !1,
1428
+ localStorageAllowed: !0,
1429
+ sessionStorageAllowed: !0,
1430
+ indexedDBAllowed: !0,
1431
+ webSQLAllowed: !1,
1432
+ serviceWorkerCacheAllowed: !0
1433
+ },
1434
+ full: {
1435
+ cookiesAllowed: !0,
1436
+ localStorageAllowed: !0,
1437
+ sessionStorageAllowed: !0,
1438
+ indexedDBAllowed: !0,
1439
+ webSQLAllowed: !0,
1440
+ serviceWorkerCacheAllowed: !0
1441
+ },
1442
+ custom: {
1443
+ cookiesAllowed: !1,
1444
+ localStorageAllowed: !1,
1445
+ sessionStorageAllowed: !1,
1446
+ indexedDBAllowed: !1,
1447
+ webSQLAllowed: !1,
1448
+ serviceWorkerCacheAllowed: !1
1449
+ }
1450
+ }, Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1451
+ __proto__: null,
1452
+ DEFAULT_FULL_POLICY: $,
1453
+ DEFAULT_TRACELESS_POLICY: H,
1454
+ MODE_CAPABILITIES: q
1455
+ }, Symbol.toStringTag, { value: "Module" })), G = {
1456
+ normalText: 4.5,
1457
+ largeText: 3,
1458
+ uiComponents: 3,
1459
+ graphicalObjects: 3,
1460
+ focusIndicators: 3
1461
+ }, W = {
1462
+ normalText: 7,
1463
+ largeText: 4.5,
1464
+ uiComponents: 3,
1465
+ graphicalObjects: 3,
1466
+ focusIndicators: 4.5
1467
+ }, K = {
1468
+ targetLevel: "AA",
1469
+ wcagVersion: "2.1",
1470
+ screenReaderOptimizations: !0,
1471
+ keyboardNavigation: !0,
1472
+ enforceColorContrast: !0,
1473
+ minContrastRatio: 4.5,
1474
+ respectReducedMotion: !0,
1475
+ focusVisible: !0,
1476
+ highContrastSupport: !0,
1477
+ forcedColorsSupport: !0,
1478
+ automatedTesting: !0
1479
+ }, X = [
1480
+ "en",
1481
+ "en-US",
1482
+ "en-GB",
1483
+ "es",
1484
+ "es-ES",
1485
+ "es-MX",
1486
+ "fr",
1487
+ "fr-FR",
1488
+ "fr-CA",
1489
+ "de",
1490
+ "de-DE",
1491
+ "it",
1492
+ "it-IT",
1493
+ "pt",
1494
+ "pt-BR",
1495
+ "pt-PT",
1496
+ "ru",
1497
+ "ru-RU",
1498
+ "zh",
1499
+ "zh-CN",
1500
+ "zh-TW",
1501
+ "ja",
1502
+ "ja-JP",
1503
+ "ko",
1504
+ "ko-KR",
1505
+ "ar",
1506
+ "ar-SA",
1507
+ "he",
1508
+ "he-IL",
1509
+ "hi",
1510
+ "hi-IN",
1511
+ "pl",
1512
+ "pl-PL",
1513
+ "nl",
1514
+ "nl-NL",
1515
+ "tr",
1516
+ "tr-TR",
1517
+ "sv",
1518
+ "sv-SE",
1519
+ "da",
1520
+ "da-DK",
1521
+ "no",
1522
+ "nb-NO",
1523
+ "fi",
1524
+ "fi-FI",
1525
+ "cs",
1526
+ "cs-CZ",
1527
+ "sk",
1528
+ "sk-SK",
1529
+ "hu",
1530
+ "hu-HU",
1531
+ "ro",
1532
+ "ro-RO",
1533
+ "bg",
1534
+ "bg-BG",
1535
+ "uk",
1536
+ "uk-UA",
1537
+ "el",
1538
+ "el-GR",
1539
+ "th",
1540
+ "th-TH",
1541
+ "vi",
1542
+ "vi-VN",
1543
+ "id",
1544
+ "id-ID",
1545
+ "ms",
1546
+ "ms-MY"
1547
+ ], J = [
1548
+ "ar",
1549
+ "ar-SA",
1550
+ "ar-AE",
1551
+ "ar-EG",
1552
+ "ar-MA",
1553
+ "he",
1554
+ "he-IL",
1555
+ "fa",
1556
+ "fa-IR",
1557
+ "ur",
1558
+ "ur-PK",
1559
+ "ps",
1560
+ // Pashto
1561
+ "sd",
1562
+ // Sindhi
1563
+ "yi"
1564
+ // Yiddish
1565
+ ], zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1566
+ __proto__: null,
1567
+ COMMON_LOCALES: X,
1568
+ DEFAULT_ACCESSIBILITY_CONFIG: K,
1569
+ RTL_LOCALES: J,
1570
+ WCAG_AAA_CONTRAST: W,
1571
+ WCAG_AA_CONTRAST: G
1572
+ }, Symbol.toStringTag, { value: "Module" })), Y = [
1573
+ { width: 16, height: 16, purpose: "favicon", format: "ico" },
1574
+ { width: 32, height: 32, purpose: "favicon", format: "png" },
1575
+ { width: 48, height: 48, purpose: "favicon", format: "png" },
1576
+ { width: 180, height: 180, purpose: "apple-touch", format: "png" },
1577
+ { width: 192, height: 192, purpose: "any", format: "png" },
1578
+ { width: 512, height: 512, purpose: "any", format: "png" },
1579
+ { width: 512, height: 512, purpose: "maskable", format: "png" }
1580
+ ], Z = [
1581
+ {
1582
+ name: "Business Icons",
1583
+ npmName: "@nice2dev/icons-business",
1584
+ description: "All ERP-related icons for business applications",
1585
+ iconCount: 500,
1586
+ categories: ["accounting", "hr", "crm", "production", "warehouse", "sales", "purchasing"],
1587
+ domains: ["business", "finance", "hr", "logistics"],
1588
+ dependencies: [],
1589
+ version: "1.0.0"
1590
+ },
1591
+ {
1592
+ name: "Education Icons",
1593
+ npmName: "@nice2dev/icons-education",
1594
+ description: "Educational, scientific, and mathematical icons",
1595
+ iconCount: 300,
1596
+ categories: ["subjects", "learning", "school", "science", "math"],
1597
+ domains: ["education", "science"],
1598
+ dependencies: [],
1599
+ version: "1.0.0"
1600
+ },
1601
+ {
1602
+ name: "Tech Icons",
1603
+ npmName: "@nice2dev/icons-tech",
1604
+ description: "Development tools, infrastructure, cloud, and containers",
1605
+ iconCount: 400,
1606
+ categories: ["devtools", "infrastructure", "cloud", "containers", "networking"],
1607
+ domains: ["technology"],
1608
+ dependencies: [],
1609
+ version: "1.0.0"
1610
+ },
1611
+ {
1612
+ name: "Media Icons",
1613
+ npmName: "@nice2dev/icons-media",
1614
+ description: "Audio, video, graphics, 3D, and streaming icons",
1615
+ iconCount: 350,
1616
+ categories: ["audio", "video", "graphics", "3d", "streaming"],
1617
+ domains: ["creative"],
1618
+ dependencies: [],
1619
+ version: "1.0.0"
1620
+ },
1621
+ {
1622
+ name: "Social Icons",
1623
+ npmName: "@nice2dev/icons-social",
1624
+ description: "Social platforms, reactions, and messaging icons",
1625
+ iconCount: 200,
1626
+ categories: ["platforms", "reactions", "messaging"],
1627
+ domains: [],
1628
+ dependencies: [],
1629
+ version: "1.0.0"
1630
+ },
1631
+ {
1632
+ name: "Game Icons",
1633
+ npmName: "@nice2dev/icons-game",
1634
+ description: "Characters, items, UI elements, and game actions",
1635
+ iconCount: 400,
1636
+ categories: ["characters", "items", "ui", "actions"],
1637
+ domains: ["gaming"],
1638
+ dependencies: [],
1639
+ version: "1.0.0"
1640
+ },
1641
+ {
1642
+ name: "Life Management Icons",
1643
+ npmName: "@nice2dev/icons-life",
1644
+ description: "Personal finance, health, productivity, and home icons",
1645
+ iconCount: 300,
1646
+ categories: ["finance", "health", "productivity", "home", "family"],
1647
+ domains: ["life-management"],
1648
+ dependencies: [],
1649
+ version: "1.0.0"
1650
+ },
1651
+ {
1652
+ name: "All Icons",
1653
+ npmName: "@nice2dev/icons-all",
1654
+ description: "Meta-package containing all icon packs",
1655
+ iconCount: 2500,
1656
+ categories: [],
1657
+ domains: [],
1658
+ dependencies: [
1659
+ "@nice2dev/icons-business",
1660
+ "@nice2dev/icons-education",
1661
+ "@nice2dev/icons-tech",
1662
+ "@nice2dev/icons-media",
1663
+ "@nice2dev/icons-social",
1664
+ "@nice2dev/icons-game",
1665
+ "@nice2dev/icons-life"
1666
+ ],
1667
+ version: "1.0.0"
1668
+ }
1669
+ ], Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1670
+ __proto__: null,
1671
+ STANDARD_FAVICON_SIZES: Y,
1672
+ THEMATIC_PACKAGES: Z
1673
+ }, Symbol.toStringTag, { value: "Module" })), kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1674
+ __proto__: null
1675
+ }, Symbol.toStringTag, { value: "Module" }));
1676
+ export {
1677
+ ye as AIAssistant,
1678
+ at as AIPlaygrounds,
1679
+ ze as APMProfiling,
1680
+ Le as AccessControl,
1681
+ zt as AccessibilityI18n,
1682
+ Ce as AlertingIncidents,
1683
+ Ee as ApiDesigner,
1684
+ Ne as ApiTesting,
1685
+ he as Artifacts,
1686
+ Ie as AuditCompliance,
1687
+ It as CURRENT_SCHEMA_VERSION,
1688
+ ue as Certificates,
1689
+ Ge as ChartBuilder,
1690
+ se as CloudInstances,
1691
+ ge as ConfigManagement,
1692
+ oe as Containers,
1693
+ qe as DashboardDesigner,
1694
+ Te as DataManagement,
1695
+ We as DataPipeline,
1696
+ Ke as DataWarehouse,
1697
+ ot as DatasetManagement,
1698
+ De as DbAdapters,
1699
+ Oe as DbAdmin,
1700
+ Me as DbDesigner,
1701
+ Se as Debugger,
1702
+ Je as DeviceManagement,
1703
+ Pe as DistributedTracing,
1704
+ ce as DnsManagement,
1705
+ E as DownloadManager,
1706
+ mt as DownloadTorrent,
1707
+ Ze as EdgeComputing,
1708
+ ct as Education,
1709
+ $e as EmailTemplate,
1710
+ ut as ErpEnterprise,
1711
+ Qe as FormBuilder,
1712
+ kt as GameEngineAdvanced,
1713
+ me as Git,
1714
+ lt as HardwareIntegration,
1715
+ be as IDE,
1716
+ fe as IaC,
1717
+ Ct as IconTools,
1718
+ Fe as IntegrationPlatform,
1719
+ ne as Kubernetes,
1720
+ pt as LifeManagement,
1721
+ je as LogManagement,
1722
+ gt as Mathematics,
1723
+ Be as MessageQueue,
1724
+ Ae as MetricsDashboard,
1725
+ it as MobileComponents,
1726
+ st as ModelDeployment,
1727
+ rt as ModelRegistry,
1728
+ nt as ModelTraining,
1729
+ ie as NetworkConfig,
1730
+ le as NetworkMonitoring,
1731
+ Et as NiceAuditLog,
1732
+ Nt as NiceChat,
1733
+ Ft as NiceColumnChooser,
1734
+ Bt as NiceComponentTypeMapping,
1735
+ Rt as NiceDesignTokens,
1736
+ Ut as NiceDiagramDesigner,
1737
+ Vt as NiceDisplayStylePicker,
1738
+ Qt as NiceDocumentViewer,
1739
+ Ht as NiceDraggable,
1740
+ $t as NiceFeatureFlagsProvider,
1741
+ qt as NiceFeatureGate,
1742
+ Gt as NiceFileManager,
1743
+ Wt as NiceFileUploader,
1744
+ Kt as NiceFilterBuilder,
1745
+ Xt as NiceGallery,
1746
+ Jt as NiceGitManager,
1747
+ Yt as NiceMap,
1748
+ Zt as NiceModuleHotSwap,
1749
+ eo as NiceModuleLoaderProvider,
1750
+ to as NiceModuleRoute,
1751
+ oo as NicePermissionMatrix,
1752
+ no as NicePrintPreview,
1753
+ ro as NiceShowcase,
1754
+ so as NiceSortable,
1755
+ ao as NiceSpeechToText,
1756
+ io as NiceThemeBuilder,
1757
+ lo as NiceThemeDesigner,
1758
+ co as NiceUndoManager,
1759
+ uo as NiceUndoProvider,
1760
+ po as NiceValidationGroup,
1761
+ fo as NiceValidationSummary,
1762
+ go as NiceValidator,
1763
+ mo as NiceViewCache,
1764
+ ho as NiceViewFetchError,
1765
+ bo as NiceViewFetcher,
1766
+ wo as NiceViewHotReload,
1767
+ yo as NiceViewRegistry,
1768
+ So as NiceViewRenderer,
1769
+ Re as PdfTools,
1770
+ pe as Pipelines,
1771
+ te as RemoteDesktop,
1772
+ He as ReportDesigner,
1773
+ et as ScadaIndustrial,
1774
+ ft as ScientificResearch,
1775
+ xe as SecretManagement,
1776
+ ke as SecurityScanning,
1777
+ Xe as SelfServiceAnalytics,
1778
+ Ye as SensorDashboard,
1779
+ de as ServerManagement,
1780
+ tt as SmartHome,
1781
+ Ue as Spreadsheet,
1782
+ ve as SqlEditor,
1783
+ ae as Terminal,
1784
+ dt as TestingQA,
1785
+ U as TorrentClient,
1786
+ Pt as Traceless,
1787
+ re as VirtualMachines,
1788
+ we as VisualScripting,
1789
+ Ve as WordProcessor,
1790
+ _e as Workspace,
1791
+ _o as autoDetectColumns,
1792
+ M as calculateETA,
1793
+ T as calculatePieces,
1794
+ vt as calculateTorrentHealth,
1795
+ vo as checkModuleHealth,
1796
+ Mo as checkPermissions,
1797
+ To as checkSingleModule,
1798
+ Do as compareSemver,
1799
+ wt as createDownloadSegments,
1800
+ Mt as createFileSelection,
1801
+ R as createMagnetUri,
1802
+ O as createPieceStatus,
1803
+ Oo as createStandardErpContracts,
1804
+ V as createTorrent,
1805
+ Ao as createUndoMiddleware,
1806
+ jo as defaultTypeMapping,
1807
+ Po as defaultViewRegistry,
1808
+ zo as deserializeManifest,
1809
+ Co as deserializeRbacPolicy,
1810
+ ko as deserializeViewV2,
1811
+ xo as diffObjects,
1812
+ Lo as diffViews,
1813
+ yt as disposeDownloadManager,
1814
+ At as disposeTorrentClient,
1815
+ Io as downloadCSV,
1816
+ Eo as downloadHTML,
1817
+ No as downloadJSON,
1818
+ Fo as downloadPDF,
1819
+ Bo as downloadXLSX,
1820
+ Ro as exportToCSV,
1821
+ Uo as exportToHTML,
1822
+ Vo as exportToJSON,
1823
+ Qo as exportToPDF,
1824
+ Ho as exportToXLSX,
1825
+ $o as extractControlTypes,
1826
+ qo as extractTokensFromTheme,
1827
+ P as filterFilesByExtension,
1828
+ ht as formatBytes,
1829
+ Go as formatDiffAsText,
1830
+ bt as formatDuration,
1831
+ _t as formatPeerCount,
1832
+ g as formatSpeed,
1833
+ Wo as generateAllForRbac,
1834
+ Ko as generateAllForView,
1835
+ Xo as generateDartModel,
1836
+ L as generateDownloadId,
1837
+ j as generateInfoHash,
1838
+ Jo as generateMermaidSyntax,
1839
+ F as generatePeerId,
1840
+ Yo as generateRbacDart,
1841
+ Zo as generateRbacTypescript,
1842
+ en as generateScaffold,
1843
+ tn as generateStoriesFromViews,
1844
+ on as generateStoryFromView,
1845
+ nn as generateTokens,
1846
+ rn as generateTypescriptModel,
1847
+ sn as generateViewCatalog,
1848
+ Dt as getAudioFiles,
1849
+ N as getDownloadManager,
1850
+ x as getFileType,
1851
+ Ot as getLargestFile,
1852
+ Q as getTorrentClient,
1853
+ Tt as getVideoFiles,
1854
+ an as isAllowed,
1855
+ ln as isVersionCompatible,
1856
+ dn as isViewCompatibleWith,
1857
+ cn as listScaffoldTemplates,
1858
+ un as niceExport,
1859
+ C as parseDownloadUrl,
1860
+ k as parseMagnetLink,
1861
+ B as parseMagnetUri,
1862
+ pn as resolvePermissions,
1863
+ fn as runContractTests,
1864
+ gn as serializeManifest,
1865
+ mn as serializeRbacPolicy,
1866
+ hn as serializeViewV2,
1867
+ bn as useAuditLog,
1868
+ wn as useColumnChooser,
1869
+ St as useDownloadManager,
1870
+ yn as useFeatureFlag,
1871
+ Sn as useFeatureFlags,
1872
+ _n as useModuleLoader,
1873
+ vn as useNiceValidation,
1874
+ Mn as usePrintPreview,
1875
+ jt as useTorrentClient,
1876
+ Tn as useUndoKeyboard,
1877
+ Dn as useUndoManager,
1878
+ I as validateChecksum,
1879
+ On as validateCrossPlatformView,
1880
+ An as validateDiagramSchema,
1881
+ jn as validateModuleManifest,
1882
+ Pn as validateRbacPolicy,
1883
+ zn as validateViewDefinitionV2,
1884
+ Cn as validateViewForDeploy,
1885
+ kn as validateViewsBatch
1886
+ };
1887
+ //# sourceMappingURL=index.mjs.map