@lenne.tech/ng-base 18.1.2 → 22.0.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.
Files changed (416) hide show
  1. package/CLAUDE.md +55 -0
  2. package/LICENSE +2 -2
  3. package/README.md +237 -44
  4. package/fesm2022/lenne.tech-ng-base-ai.mjs +767 -0
  5. package/fesm2022/lenne.tech-ng-base-ai.mjs.map +1 -0
  6. package/fesm2022/lenne.tech-ng-base-auth-provide.mjs +939 -0
  7. package/fesm2022/lenne.tech-ng-base-auth-provide.mjs.map +1 -0
  8. package/fesm2022/lenne.tech-ng-base-auth.mjs +454 -0
  9. package/fesm2022/lenne.tech-ng-base-auth.mjs.map +1 -0
  10. package/fesm2022/lenne.tech-ng-base-bug-bug-report-dialog-BRzVmKJr.mjs +825 -0
  11. package/fesm2022/lenne.tech-ng-base-bug-bug-report-dialog-BRzVmKJr.mjs.map +1 -0
  12. package/fesm2022/lenne.tech-ng-base-bug-bug-report-service-DWoTb_iw.mjs +351 -0
  13. package/fesm2022/lenne.tech-ng-base-bug-bug-report-service-DWoTb_iw.mjs.map +1 -0
  14. package/fesm2022/lenne.tech-ng-base-bug-capture-engine-TkjMDdqj.mjs +1046 -0
  15. package/fesm2022/lenne.tech-ng-base-bug-capture-engine-TkjMDdqj.mjs.map +1 -0
  16. package/fesm2022/lenne.tech-ng-base-bug-constants-Brm2KGHi.mjs +4 -0
  17. package/fesm2022/lenne.tech-ng-base-bug-constants-Brm2KGHi.mjs.map +1 -0
  18. package/fesm2022/lenne.tech-ng-base-bug-messages-BsP4fRQU.mjs +179 -0
  19. package/fesm2022/lenne.tech-ng-base-bug-messages-BsP4fRQU.mjs.map +1 -0
  20. package/fesm2022/lenne.tech-ng-base-bug-provide.mjs +26 -0
  21. package/fesm2022/lenne.tech-ng-base-bug-provide.mjs.map +1 -0
  22. package/fesm2022/lenne.tech-ng-base-bug-report-Tzlhe1Cm.mjs +62 -0
  23. package/fesm2022/lenne.tech-ng-base-bug-report-Tzlhe1Cm.mjs.map +1 -0
  24. package/fesm2022/lenne.tech-ng-base-bug-server.mjs +818 -0
  25. package/fesm2022/lenne.tech-ng-base-bug-server.mjs.map +1 -0
  26. package/fesm2022/lenne.tech-ng-base-bug.mjs +196 -0
  27. package/fesm2022/lenne.tech-ng-base-bug.mjs.map +1 -0
  28. package/fesm2022/lenne.tech-ng-base-files-ui.mjs +445 -0
  29. package/fesm2022/lenne.tech-ng-base-files-ui.mjs.map +1 -0
  30. package/fesm2022/lenne.tech-ng-base-files.mjs +474 -0
  31. package/fesm2022/lenne.tech-ng-base-files.mjs.map +1 -0
  32. package/fesm2022/lenne.tech-ng-base-server.mjs +408 -0
  33. package/fesm2022/lenne.tech-ng-base-server.mjs.map +1 -0
  34. package/fesm2022/lenne.tech-ng-base-share.mjs +76 -0
  35. package/fesm2022/lenne.tech-ng-base-share.mjs.map +1 -0
  36. package/fesm2022/lenne.tech-ng-base-sync.mjs +1096 -0
  37. package/fesm2022/lenne.tech-ng-base-sync.mjs.map +1 -0
  38. package/fesm2022/lenne.tech-ng-base-testing.mjs +171 -0
  39. package/fesm2022/lenne.tech-ng-base-testing.mjs.map +1 -0
  40. package/fesm2022/lenne.tech-ng-base-ui-provide.mjs +124 -0
  41. package/fesm2022/lenne.tech-ng-base-ui-provide.mjs.map +1 -0
  42. package/fesm2022/lenne.tech-ng-base-ui.mjs +34611 -0
  43. package/fesm2022/lenne.tech-ng-base-ui.mjs.map +1 -0
  44. package/fesm2022/lenne.tech-ng-base-utils.mjs +287 -0
  45. package/fesm2022/lenne.tech-ng-base-utils.mjs.map +1 -0
  46. package/fesm2022/lenne.tech-ng-base.mjs +615 -902
  47. package/fesm2022/lenne.tech-ng-base.mjs.map +1 -1
  48. package/i18n/auth/de.json +17 -0
  49. package/i18n/auth/en.json +17 -0
  50. package/i18n/bug/de.json +85 -0
  51. package/i18n/bug/en.json +85 -0
  52. package/i18n/de.json +8 -0
  53. package/i18n/en.json +8 -0
  54. package/i18n/files/de.json +27 -0
  55. package/i18n/files/en.json +27 -0
  56. package/i18n/share/de.json +8 -0
  57. package/i18n/share/en.json +8 -0
  58. package/i18n/ui/de.json +38 -0
  59. package/i18n/ui/en.json +38 -0
  60. package/package.json +127 -58
  61. package/types/lenne.tech-ng-base-ai.d.ts +830 -0
  62. package/types/lenne.tech-ng-base-auth-provide.d.ts +603 -0
  63. package/types/lenne.tech-ng-base-auth.d.ts +320 -0
  64. package/types/lenne.tech-ng-base-bug-provide.d.ts +272 -0
  65. package/types/lenne.tech-ng-base-bug-rolldown-runtime-C25Le4-w.d.ts +1 -0
  66. package/types/lenne.tech-ng-base-bug-server.d.ts +316 -0
  67. package/types/lenne.tech-ng-base-bug.d.ts +202 -0
  68. package/types/lenne.tech-ng-base-files-ui.d.ts +116 -0
  69. package/types/lenne.tech-ng-base-files.d.ts +288 -0
  70. package/types/lenne.tech-ng-base-server.d.ts +262 -0
  71. package/types/lenne.tech-ng-base-share.d.ts +21 -0
  72. package/types/lenne.tech-ng-base-sync.d.ts +380 -0
  73. package/types/lenne.tech-ng-base-testing.d.ts +327 -0
  74. package/types/lenne.tech-ng-base-ui-provide.d.ts +65 -0
  75. package/types/lenne.tech-ng-base-ui.d.ts +7732 -0
  76. package/types/lenne.tech-ng-base-utils.d.ts +150 -0
  77. package/types/lenne.tech-ng-base.d.ts +503 -0
  78. package/ui/styles/components/accordion.css +3 -0
  79. package/ui/styles/components/alert-dialog.css +4 -0
  80. package/ui/styles/components/alert.css +3 -0
  81. package/ui/styles/components/aspect-ratio.css +3 -0
  82. package/ui/styles/components/attachment.css +4 -0
  83. package/ui/styles/components/autocomplete.css +4 -0
  84. package/ui/styles/components/avatar.css +3 -0
  85. package/ui/styles/components/badge.css +3 -0
  86. package/ui/styles/components/breadcrumb.css +3 -0
  87. package/ui/styles/components/bubble.css +3 -0
  88. package/ui/styles/components/button-group.css +3 -0
  89. package/ui/styles/components/button.css +3 -0
  90. package/ui/styles/components/calendar.css +5 -0
  91. package/ui/styles/components/card.css +3 -0
  92. package/ui/styles/components/checkbox.css +3 -0
  93. package/ui/styles/components/code-block.css +4 -0
  94. package/ui/styles/components/collapsible.css +3 -0
  95. package/ui/styles/components/combobox.css +5 -0
  96. package/ui/styles/components/command.css +5 -0
  97. package/ui/styles/components/context-menu.css +3 -0
  98. package/ui/styles/components/date-picker.css +7 -0
  99. package/ui/styles/components/dialog.css +4 -0
  100. package/ui/styles/components/drawer.css +3 -0
  101. package/ui/styles/components/dropdown-menu.css +3 -0
  102. package/ui/styles/components/empty.css +3 -0
  103. package/ui/styles/components/field.css +5 -0
  104. package/ui/styles/components/hover-card.css +3 -0
  105. package/ui/styles/components/index.css +91 -0
  106. package/ui/styles/components/input-group.css +6 -0
  107. package/ui/styles/components/input-otp.css +3 -0
  108. package/ui/styles/components/input.css +3 -0
  109. package/ui/styles/components/item.css +4 -0
  110. package/ui/styles/components/kbd.css +3 -0
  111. package/ui/styles/components/label.css +3 -0
  112. package/ui/styles/components/lt-breadcrumb.css +3 -0
  113. package/ui/styles/components/lt-bug-attachments.css +5 -0
  114. package/ui/styles/components/lt-bug-journey-timeline.css +5 -0
  115. package/ui/styles/components/lt-bug-report-dialog.css +15 -0
  116. package/ui/styles/components/lt-bug-report.css +4 -0
  117. package/ui/styles/components/lt-color-mode-button.css +3 -0
  118. package/ui/styles/components/lt-confirm-dialog.css +4 -0
  119. package/ui/styles/components/lt-data-view.css +5 -0
  120. package/ui/styles/components/lt-date-picker.css +3 -0
  121. package/ui/styles/components/lt-date-time-picker.css +5 -0
  122. package/ui/styles/components/lt-enter-action.css +2 -0
  123. package/ui/styles/components/lt-footer.css +3 -0
  124. package/ui/styles/components/lt-form-field.css +4 -0
  125. package/ui/styles/components/lt-header.css +5 -0
  126. package/ui/styles/components/lt-imports.css +21 -0
  127. package/ui/styles/components/lt-navigation-menu.css +3 -0
  128. package/ui/styles/components/lt-notice.css +3 -0
  129. package/ui/styles/components/lt-overlay-defaults.css +3 -0
  130. package/ui/styles/components/lt-page-card.css +3 -0
  131. package/ui/styles/components/lt-page-title.css +2 -0
  132. package/ui/styles/components/lt-password-input.css +4 -0
  133. package/ui/styles/components/lt-readonly-field.css +2 -0
  134. package/ui/styles/components/lt-select.css +4 -0
  135. package/ui/styles/components/lt-text-field.css +5 -0
  136. package/ui/styles/components/lt-toolbar-item.css +2 -0
  137. package/ui/styles/components/lt-toolbar.css +3 -0
  138. package/ui/styles/components/lt-tus-upload-component.css +5 -0
  139. package/ui/styles/components/marker.css +3 -0
  140. package/ui/styles/components/menubar.css +3 -0
  141. package/ui/styles/components/message-scroller.css +4 -0
  142. package/ui/styles/components/message.css +3 -0
  143. package/ui/styles/components/native-select.css +3 -0
  144. package/ui/styles/components/navigation-menu.css +3 -0
  145. package/ui/styles/components/pagination.css +4 -0
  146. package/ui/styles/components/popover.css +3 -0
  147. package/ui/styles/components/progress.css +3 -0
  148. package/ui/styles/components/questionnaire.css +4 -0
  149. package/ui/styles/components/radio-group.css +3 -0
  150. package/ui/styles/components/resizable.css +3 -0
  151. package/ui/styles/components/select.css +3 -0
  152. package/ui/styles/components/separator.css +3 -0
  153. package/ui/styles/components/sheet.css +4 -0
  154. package/ui/styles/components/sidebar.css +9 -0
  155. package/ui/styles/components/skeleton.css +3 -0
  156. package/ui/styles/components/slider.css +3 -0
  157. package/ui/styles/components/sonner.css +4 -0
  158. package/ui/styles/components/spinner.css +3 -0
  159. package/ui/styles/components/switch.css +3 -0
  160. package/ui/styles/components/table.css +3 -0
  161. package/ui/styles/components/tabs.css +4 -0
  162. package/ui/styles/components/textarea.css +3 -0
  163. package/ui/styles/components/toggle-group.css +4 -0
  164. package/ui/styles/components/toggle.css +3 -0
  165. package/ui/styles/components/tooltip.css +3 -0
  166. package/ui/styles/components/trace.css +3 -0
  167. package/ui/styles/components/typography.css +3 -0
  168. package/ui/styles/components/utils.css +2 -0
  169. package/ui/styles/core.css +137 -0
  170. package/ui/styles/palette.css +94 -0
  171. package/ui/styles/theme.css +14 -0
  172. package/ui/styles/transitions.css +131 -0
  173. package/base-cms/index.d.ts +0 -5
  174. package/base-cms/interfaces/base-cms-module-config.interface.d.ts +0 -16
  175. package/base-cms/pages/base-cms/base-cms.component.d.ts +0 -92
  176. package/base-cms/public-api.d.ts +0 -5
  177. package/base-components/components/breadcrumb/breadcrumb.component.d.ts +0 -10
  178. package/base-components/components/change-password/change-password.component.d.ts +0 -24
  179. package/base-components/components/checkbox/checkbox.component.d.ts +0 -12
  180. package/base-components/components/delete-account/delete-account.component.d.ts +0 -15
  181. package/base-components/components/fab-button/fab-button.component.d.ts +0 -16
  182. package/base-components/components/input/input.component.d.ts +0 -27
  183. package/base-components/components/loading-bar/loading-bar.component.d.ts +0 -17
  184. package/base-components/components/model-form/model-form-base.component.d.ts +0 -64
  185. package/base-components/components/model-form/model-form.component.d.ts +0 -139
  186. package/base-components/components/model-form-sub/model-form-sub.component.d.ts +0 -56
  187. package/base-components/components/model-table/model-table.component.d.ts +0 -115
  188. package/base-components/components/refence-input/refence-input.component.d.ts +0 -84
  189. package/base-components/components/select/select.component.d.ts +0 -25
  190. package/base-components/components/skeleton-loader/skeleton-loader.component.d.ts +0 -10
  191. package/base-components/components/tags/tags.component.d.ts +0 -60
  192. package/base-components/components/textarea/textarea.component.d.ts +0 -21
  193. package/base-components/components/toast/toast.component.d.ts +0 -19
  194. package/base-components/components/upload-image/upload-image.component.d.ts +0 -111
  195. package/base-components/directives/back-button.directive.d.ts +0 -9
  196. package/base-components/directives/context-menu.directive.d.ts +0 -22
  197. package/base-components/directives/sort.directive.d.ts +0 -15
  198. package/base-components/directives/stop-propagation.directive.d.ts +0 -10
  199. package/base-components/index.d.ts +0 -5
  200. package/base-components/pipes/ellipses.pipe.d.ts +0 -10
  201. package/base-components/public-api.d.ts +0 -26
  202. package/base-prototype/index.d.ts +0 -5
  203. package/base-prototype/pages/email-verification/email-verification.component.d.ts +0 -18
  204. package/base-prototype/pages/forgot-password/forgot-password.component.d.ts +0 -26
  205. package/base-prototype/pages/login/login.component.d.ts +0 -33
  206. package/base-prototype/pages/profile/profile.component.d.ts +0 -24
  207. package/base-prototype/pages/register/register.component.d.ts +0 -31
  208. package/base-prototype/pages/set-password/set-password.component.d.ts +0 -29
  209. package/base-prototype/public-api.d.ts +0 -9
  210. package/esm2022/base-cms/interfaces/base-cms-module-config.interface.mjs +0 -3
  211. package/esm2022/base-cms/lenne.tech-ng-base-base-cms.mjs +0 -5
  212. package/esm2022/base-cms/pages/base-cms/base-cms.component.mjs +0 -238
  213. package/esm2022/base-cms/public-api.mjs +0 -8
  214. package/esm2022/base-components/components/breadcrumb/breadcrumb.component.mjs +0 -23
  215. package/esm2022/base-components/components/change-password/change-password.component.mjs +0 -97
  216. package/esm2022/base-components/components/checkbox/checkbox.component.mjs +0 -38
  217. package/esm2022/base-components/components/delete-account/delete-account.component.mjs +0 -59
  218. package/esm2022/base-components/components/fab-button/fab-button.component.mjs +0 -24
  219. package/esm2022/base-components/components/input/input.component.mjs +0 -75
  220. package/esm2022/base-components/components/loading-bar/loading-bar.component.mjs +0 -37
  221. package/esm2022/base-components/components/model-form/model-form-base.component.mjs +0 -145
  222. package/esm2022/base-components/components/model-form/model-form.component.mjs +0 -591
  223. package/esm2022/base-components/components/model-form-sub/model-form-sub.component.mjs +0 -117
  224. package/esm2022/base-components/components/model-table/model-table.component.mjs +0 -478
  225. package/esm2022/base-components/components/refence-input/refence-input.component.mjs +0 -278
  226. package/esm2022/base-components/components/select/select.component.mjs +0 -62
  227. package/esm2022/base-components/components/skeleton-loader/skeleton-loader.component.mjs +0 -33
  228. package/esm2022/base-components/components/tags/tags.component.mjs +0 -227
  229. package/esm2022/base-components/components/textarea/textarea.component.mjs +0 -79
  230. package/esm2022/base-components/components/toast/toast.component.mjs +0 -69
  231. package/esm2022/base-components/components/upload-image/upload-image.component.mjs +0 -346
  232. package/esm2022/base-components/directives/back-button.directive.mjs +0 -25
  233. package/esm2022/base-components/directives/context-menu.directive.mjs +0 -112
  234. package/esm2022/base-components/directives/sort.directive.mjs +0 -61
  235. package/esm2022/base-components/directives/stop-propagation.directive.mjs +0 -24
  236. package/esm2022/base-components/lenne.tech-ng-base-base-components.mjs +0 -5
  237. package/esm2022/base-components/pipes/ellipses.pipe.mjs +0 -23
  238. package/esm2022/base-components/public-api.mjs +0 -30
  239. package/esm2022/base-prototype/lenne.tech-ng-base-base-prototype.mjs +0 -5
  240. package/esm2022/base-prototype/pages/email-verification/email-verification.component.mjs +0 -60
  241. package/esm2022/base-prototype/pages/forgot-password/forgot-password.component.mjs +0 -78
  242. package/esm2022/base-prototype/pages/login/login.component.mjs +0 -114
  243. package/esm2022/base-prototype/pages/profile/profile.component.mjs +0 -87
  244. package/esm2022/base-prototype/pages/register/register.component.mjs +0 -100
  245. package/esm2022/base-prototype/pages/set-password/set-password.component.mjs +0 -91
  246. package/esm2022/base-prototype/public-api.mjs +0 -11
  247. package/esm2022/lenne.tech-ng-base.mjs +0 -5
  248. package/esm2022/public-api.mjs +0 -25
  249. package/esm2022/shared/classes/auth.class.mjs +0 -14
  250. package/esm2022/shared/classes/basic-user.class.mjs +0 -49
  251. package/esm2022/shared/classes/graphql-enum.class.mjs +0 -10
  252. package/esm2022/shared/classes/graphql-meta.class.mjs +0 -345
  253. package/esm2022/shared/classes/graphql-type.class.mjs +0 -14
  254. package/esm2022/shared/classes/helper.class.mjs +0 -307
  255. package/esm2022/shared/classes/sort.class.mjs +0 -38
  256. package/esm2022/shared/classes/standard.class.mjs +0 -40
  257. package/esm2022/shared/decorators/debounce.decorator.mjs +0 -12
  258. package/esm2022/shared/enums/comparison-operator.enum.mjs +0 -16
  259. package/esm2022/shared/enums/graphql-request-type.enum.mjs +0 -10
  260. package/esm2022/shared/enums/logical-operator.enum.mjs +0 -10
  261. package/esm2022/shared/enums/skeleton-type.enum.mjs +0 -7
  262. package/esm2022/shared/enums/sort-order.enum.mjs +0 -6
  263. package/esm2022/shared/enums/toast-type.enum.mjs +0 -8
  264. package/esm2022/shared/functions/ws-client.function.mjs +0 -39
  265. package/esm2022/shared/interfaces/base-module-config.interface.mjs +0 -3
  266. package/esm2022/shared/interfaces/breadcrumb.interface.mjs +0 -2
  267. package/esm2022/shared/interfaces/can-component-deactivate.interface.mjs +0 -2
  268. package/esm2022/shared/interfaces/cms-enum-values.interface.mjs +0 -2
  269. package/esm2022/shared/interfaces/cms-field-config.interface.mjs +0 -2
  270. package/esm2022/shared/interfaces/cms-model-config.interface.mjs +0 -2
  271. package/esm2022/shared/interfaces/cms-table-field.interface.mjs +0 -2
  272. package/esm2022/shared/interfaces/combined-filter-input.interface.mjs +0 -2
  273. package/esm2022/shared/interfaces/compress-options.interface.mjs +0 -2
  274. package/esm2022/shared/interfaces/cropping-options.interface.mjs +0 -2
  275. package/esm2022/shared/interfaces/field-object.interface.mjs +0 -2
  276. package/esm2022/shared/interfaces/field.interface.mjs +0 -2
  277. package/esm2022/shared/interfaces/filter-input.interface.mjs +0 -2
  278. package/esm2022/shared/interfaces/find-args.interface.mjs +0 -2
  279. package/esm2022/shared/interfaces/graphql-crud-type.interface.mjs +0 -2
  280. package/esm2022/shared/interfaces/graphql-fields-object.interface.mjs +0 -2
  281. package/esm2022/shared/interfaces/graphql-options.interface.mjs +0 -2
  282. package/esm2022/shared/interfaces/graphql-plus-options.interfacen.mjs +0 -2
  283. package/esm2022/shared/interfaces/graphql-type-collection.interface.mjs +0 -2
  284. package/esm2022/shared/interfaces/login-config.interface.mjs +0 -2
  285. package/esm2022/shared/interfaces/register-config.interface.mjs +0 -2
  286. package/esm2022/shared/interfaces/single-filter-input.interface.mjs +0 -2
  287. package/esm2022/shared/interfaces/sort-input.interface.mjs +0 -2
  288. package/esm2022/shared/interfaces/time-components.interface.mjs +0 -2
  289. package/esm2022/shared/interfaces/toast.interface.mjs +0 -2
  290. package/esm2022/shared/lenne.tech-ng-base-shared.mjs +0 -5
  291. package/esm2022/shared/public-api.mjs +0 -74
  292. package/esm2022/shared/services/auth.service.mjs +0 -152
  293. package/esm2022/shared/services/breadcrumb.service.mjs +0 -69
  294. package/esm2022/shared/services/cms.service.mjs +0 -82
  295. package/esm2022/shared/services/file.service.mjs +0 -86
  296. package/esm2022/shared/services/forms.service.mjs +0 -61
  297. package/esm2022/shared/services/graphql-meta.service.mjs +0 -132
  298. package/esm2022/shared/services/graphql-plus.service.mjs +0 -93
  299. package/esm2022/shared/services/graphql.service.mjs +0 -510
  300. package/esm2022/shared/services/image.service.mjs +0 -102
  301. package/esm2022/shared/services/loader.service.mjs +0 -78
  302. package/esm2022/shared/services/navigation.service.mjs +0 -38
  303. package/esm2022/shared/services/scroll.service.mjs +0 -207
  304. package/esm2022/shared/services/storage.service.mjs +0 -149
  305. package/esm2022/shared/services/toast.service.mjs +0 -39
  306. package/esm2022/shared/services/user.service.mjs +0 -160
  307. package/esm2022/shared/services/ws.service.mjs +0 -17
  308. package/esm2022/shared/types/graphql-fields.type.mjs +0 -2
  309. package/esm2022/shared/types/storage.type.mjs +0 -2
  310. package/esm2022/shared/validators/email.validator.mjs +0 -7
  311. package/esm2022/shared/validators/match.validator.mjs +0 -22
  312. package/esm2022/shared/validators/secure-password.validator.mjs +0 -7
  313. package/esm2022/src/base.module.mjs +0 -64
  314. package/esm2022/src/decorators/auto-unsubscribe.decorator.mjs +0 -23
  315. package/esm2022/src/directives/lazy-load.directive.mjs +0 -48
  316. package/esm2022/src/directives/match-height.directive.mjs +0 -92
  317. package/esm2022/src/directives/resizable.directive.mjs +0 -92
  318. package/esm2022/src/factories/apollo-options.factory.mjs +0 -108
  319. package/esm2022/src/functions/extract-files.function.mjs +0 -87
  320. package/esm2022/src/guards/auth.guard.mjs +0 -91
  321. package/esm2022/src/guards/can-deactivate.guard.mjs +0 -16
  322. package/esm2022/src/guards/logout.guard.mjs +0 -34
  323. package/esm2022/src/pipes/date-ago.pipe.mjs +0 -64
  324. package/esm2022/src/pipes/safe-html.pipe.mjs +0 -22
  325. package/esm2022/src/services/fullscreen.service.mjs +0 -51
  326. package/esm2022/src/services/seo.service.mjs +0 -109
  327. package/esm2022/src/services/theme.service.mjs +0 -44
  328. package/fesm2022/lenne.tech-ng-base-base-cms.mjs +0 -251
  329. package/fesm2022/lenne.tech-ng-base-base-cms.mjs.map +0 -1
  330. package/fesm2022/lenne.tech-ng-base-base-components.mjs +0 -2917
  331. package/fesm2022/lenne.tech-ng-base-base-components.mjs.map +0 -1
  332. package/fesm2022/lenne.tech-ng-base-base-prototype.mjs +0 -505
  333. package/fesm2022/lenne.tech-ng-base-base-prototype.mjs.map +0 -1
  334. package/fesm2022/lenne.tech-ng-base-shared.mjs +0 -2863
  335. package/fesm2022/lenne.tech-ng-base-shared.mjs.map +0 -1
  336. package/index.d.ts +0 -5
  337. package/public-api.d.ts +0 -17
  338. package/shared/classes/auth.class.d.ts +0 -10
  339. package/shared/classes/basic-user.class.d.ts +0 -27
  340. package/shared/classes/graphql-enum.class.d.ts +0 -7
  341. package/shared/classes/graphql-meta.class.d.ts +0 -66
  342. package/shared/classes/graphql-type.class.d.ts +0 -13
  343. package/shared/classes/helper.class.d.ts +0 -99
  344. package/shared/classes/sort.class.d.ts +0 -12
  345. package/shared/classes/standard.class.d.ts +0 -32
  346. package/shared/decorators/debounce.decorator.d.ts +0 -1
  347. package/shared/enums/comparison-operator.enum.d.ts +0 -14
  348. package/shared/enums/graphql-request-type.enum.d.ts +0 -8
  349. package/shared/enums/logical-operator.enum.d.ts +0 -8
  350. package/shared/enums/skeleton-type.enum.d.ts +0 -5
  351. package/shared/enums/sort-order.enum.d.ts +0 -4
  352. package/shared/enums/toast-type.enum.d.ts +0 -6
  353. package/shared/functions/ws-client.function.d.ts +0 -5
  354. package/shared/index.d.ts +0 -5
  355. package/shared/interfaces/base-module-config.interface.d.ts +0 -61
  356. package/shared/interfaces/breadcrumb.interface.d.ts +0 -4
  357. package/shared/interfaces/can-component-deactivate.interface.d.ts +0 -7
  358. package/shared/interfaces/cms-enum-values.interface.d.ts +0 -4
  359. package/shared/interfaces/cms-field-config.interface.d.ts +0 -45
  360. package/shared/interfaces/cms-model-config.interface.d.ts +0 -14
  361. package/shared/interfaces/cms-table-field.interface.d.ts +0 -10
  362. package/shared/interfaces/combined-filter-input.interface.d.ts +0 -9
  363. package/shared/interfaces/compress-options.interface.d.ts +0 -15
  364. package/shared/interfaces/cropping-options.interface.d.ts +0 -12
  365. package/shared/interfaces/field-object.interface.d.ts +0 -6
  366. package/shared/interfaces/field.interface.d.ts +0 -5
  367. package/shared/interfaces/filter-input.interface.d.ts +0 -9
  368. package/shared/interfaces/find-args.interface.d.ts +0 -11
  369. package/shared/interfaces/graphql-crud-type.interface.d.ts +0 -7
  370. package/shared/interfaces/graphql-fields-object.interface.d.ts +0 -6
  371. package/shared/interfaces/graphql-options.interface.d.ts +0 -11
  372. package/shared/interfaces/graphql-plus-options.interfacen.d.ts +0 -9
  373. package/shared/interfaces/graphql-type-collection.interface.d.ts +0 -7
  374. package/shared/interfaces/login-config.interface.d.ts +0 -6
  375. package/shared/interfaces/register-config.interface.d.ts +0 -4
  376. package/shared/interfaces/single-filter-input.interface.d.ts +0 -11
  377. package/shared/interfaces/sort-input.interface.d.ts +0 -5
  378. package/shared/interfaces/time-components.interface.d.ts +0 -6
  379. package/shared/interfaces/toast.interface.d.ts +0 -8
  380. package/shared/public-api.d.ts +0 -65
  381. package/shared/services/auth.service.d.ts +0 -44
  382. package/shared/services/breadcrumb.service.d.ts +0 -32
  383. package/shared/services/cms.service.d.ts +0 -27
  384. package/shared/services/file.service.d.ts +0 -22
  385. package/shared/services/forms.service.d.ts +0 -14
  386. package/shared/services/graphql-meta.service.d.ts +0 -45
  387. package/shared/services/graphql-plus.service.d.ts +0 -27
  388. package/shared/services/graphql.service.d.ts +0 -71
  389. package/shared/services/image.service.d.ts +0 -27
  390. package/shared/services/loader.service.d.ts +0 -32
  391. package/shared/services/navigation.service.d.ts +0 -15
  392. package/shared/services/scroll.service.d.ts +0 -85
  393. package/shared/services/storage.service.d.ts +0 -49
  394. package/shared/services/toast.service.d.ts +0 -15
  395. package/shared/services/user.service.d.ts +0 -77
  396. package/shared/services/ws.service.d.ts +0 -8
  397. package/shared/types/graphql-fields.type.d.ts +0 -5
  398. package/shared/types/storage.type.d.ts +0 -4
  399. package/shared/validators/email.validator.d.ts +0 -1
  400. package/shared/validators/match.validator.d.ts +0 -4
  401. package/shared/validators/secure-password.validator.d.ts +0 -1
  402. package/src/base.module.d.ts +0 -16
  403. package/src/decorators/auto-unsubscribe.decorator.d.ts +0 -5
  404. package/src/directives/lazy-load.directive.d.ts +0 -17
  405. package/src/directives/match-height.directive.d.ts +0 -20
  406. package/src/directives/resizable.directive.d.ts +0 -26
  407. package/src/factories/apollo-options.factory.d.ts +0 -16
  408. package/src/functions/extract-files.function.d.ts +0 -15
  409. package/src/guards/auth.guard.d.ts +0 -27
  410. package/src/guards/can-deactivate.guard.d.ts +0 -10
  411. package/src/guards/logout.guard.d.ts +0 -16
  412. package/src/pipes/date-ago.pipe.d.ts +0 -34
  413. package/src/pipes/safe-html.pipe.d.ts +0 -13
  414. package/src/services/fullscreen.service.d.ts +0 -18
  415. package/src/services/seo.service.d.ts +0 -50
  416. package/src/services/theme.service.d.ts +0 -17
@@ -0,0 +1,1046 @@
1
+ import { t as LT_BUG_UI_ATTRIBUTE } from "./lenne.tech-ng-base-bug-constants-Brm2KGHi.mjs";
2
+ import { buildLtBugReport } from "./lenne.tech-ng-base-bug-report-Tzlhe1Cm.mjs";
3
+ import { NavigationEnd } from "@angular/router";
4
+ const LT_BUG_REDACTED = "[redacted]";
5
+ const LT_BUG_SENSITIVE_HEADERS = Object.freeze([
6
+ "api-key",
7
+ "authorization",
8
+ "cookie",
9
+ "proxy-authorization",
10
+ "set-cookie",
11
+ "x-access-token",
12
+ "x-api-key",
13
+ "x-auth-token",
14
+ "x-csrf-token",
15
+ "x-system-setup-token",
16
+ "x-xsrf-token"
17
+ ]);
18
+ const LT_BUG_BODY_EXCLUDED_SEGMENTS = Object.freeze([
19
+ "auth",
20
+ "iam",
21
+ "login",
22
+ "logout",
23
+ "oauth",
24
+ "oauth2",
25
+ "passkey",
26
+ "reset-password",
27
+ "sign-in",
28
+ "sign-up",
29
+ "signin",
30
+ "signup",
31
+ "system-setup",
32
+ "token",
33
+ "two-factor",
34
+ "verify-email"
35
+ ]);
36
+ const SENSITIVE_KEY_PARTS = [
37
+ "apikey",
38
+ "authorization",
39
+ "backupcode",
40
+ "cardnumber",
41
+ "cookie",
42
+ "credential",
43
+ "creditcard",
44
+ "passwd",
45
+ "password",
46
+ "privatekey",
47
+ "recoverycode",
48
+ "secret",
49
+ "signature",
50
+ "token",
51
+ "totp",
52
+ "twofactor",
53
+ "verificationcode"
54
+ ];
55
+ const SENSITIVE_KEYS = /* @__PURE__ */ new Set([
56
+ "auth",
57
+ "code",
58
+ "csc",
59
+ "cvc",
60
+ "cvv",
61
+ "iban",
62
+ "jwt",
63
+ "otp",
64
+ "pin",
65
+ "pwd",
66
+ "sessionid",
67
+ "sid",
68
+ "ssn"
69
+ ]);
70
+ const SENSITIVE_HEADER_SET = new Set(LT_BUG_SENSITIVE_HEADERS);
71
+ const BODY_EXCLUDED = new RegExp(`/(?:${LT_BUG_BODY_EXCLUDED_SEGMENTS.map((segment) => segment.replace(/[-/]/g, "\\$&")).join("|")})(?:[/?#;]|$)`, "i");
72
+ const USERINFO = /\b([a-z][a-z\d+.-]*:\/\/)[^\s/?#@:]+:[^\s/?#@]+@/gi;
73
+ const JWT = /\beyJ[\w-]{5,}\.[\w-]{5,}\.[\w-]*/g;
74
+ const BEARER = /\b(Bearer)\s+(?=[\w\-.~+/]*[\d.\-_~+/])[\w\-.~+/]{8,}=*/g;
75
+ const PATH_TOKEN = /(\/(?:activate|confirm-email|email-verification|invitation|invite|magic-link|reset-password|verify-email)\/)[^/?#\s"'<>]+/gi;
76
+ const PARAM = /(^|[?&#;\s"'(,{]|%3[fF]|%26|%23)((?:[\w.\-~[\]]|%5[bBdD])+)(=|%3[dD])([^&#;\s"'<>)}]*?)(?=$|[&#;\s"'<>)}]|%26|%23)/g;
77
+ const JSON_PAIR = /("((?:[^"\\]|\\.)*)"\s*:\s*)("(?:[^"\\]|\\.)*"|-?\d[\d.eE+-]*|true|false|null)/g;
78
+ const JSON_PAIR_OPEN = /("((?:[^"\\]|\\.)*)"\s*:\s*)"(?:[^"\\]|\\.)*$/;
79
+ const LABELLED = /\b(api[-_]?key|otp|passwd|password|secret|token)(\s*:\s*)("[^"]*"|'[^']*'|[^\s,;]+)/gi;
80
+ function isLtSensitiveHeader(name) {
81
+ return SENSITIVE_HEADER_SET.has(name.trim().toLowerCase());
82
+ }
83
+ function isLtSensitiveKey(key) {
84
+ const decoded = safeDecode(key);
85
+ const normalized = (decoded.split(/[[\].]/).filter(Boolean).pop() ?? decoded).toLowerCase().replace(/[-_\s]/g, "");
86
+ return SENSITIVE_KEYS.has(normalized) || SENSITIVE_KEY_PARTS.some((part) => normalized.includes(part));
87
+ }
88
+ function isLtBodyExcludedUrl(url) {
89
+ const path = url.replace(/^[a-z][a-z\d+.-]*:\/\/[^/?#]*/i, "").split(/[?#]/)[0] ?? "";
90
+ return BODY_EXCLUDED.test(path);
91
+ }
92
+ function redactLtText(text) {
93
+ if (!text) return text;
94
+ let result = text.replace(USERINFO, `$1${LT_BUG_REDACTED}@`).replace(JWT, LT_BUG_REDACTED).replace(BEARER, `$1 ${LT_BUG_REDACTED}`).replace(PATH_TOKEN, `$1${LT_BUG_REDACTED}`);
95
+ result = redactParams(result, 0);
96
+ result = result.replace(JSON_PAIR, (match, prefix, key) => isLtSensitiveKey(key) ? `${prefix}"${LT_BUG_REDACTED}"` : match);
97
+ result = result.replace(JSON_PAIR_OPEN, (match, prefix, key) => isLtSensitiveKey(key) ? `${prefix}"${LT_BUG_REDACTED}"` : match);
98
+ return result.replace(LABELLED, `$1$2${LT_BUG_REDACTED}`);
99
+ }
100
+ function redactLtUrl(url) {
101
+ return redactLtText(url);
102
+ }
103
+ function redactLtValue(value, depth = 0) {
104
+ if (typeof value === "string") return redactLtText(value);
105
+ if (depth > 20 || value === null || typeof value !== "object") return depth > 20 ? LT_BUG_REDACTED : value;
106
+ if (Array.isArray(value)) return value.map((item) => redactLtValue(item, depth + 1));
107
+ const result = {};
108
+ for (const [key, item] of Object.entries(value)) result[key] = isLtSensitiveKey(key) ? LT_BUG_REDACTED : redactLtValue(item, depth + 1);
109
+ return result;
110
+ }
111
+ function redactLtBody(body, maxLength = 1e3) {
112
+ const input = body.length > 2e4 ? body.slice(0, 2e4) : body;
113
+ const trimmed = input.trim();
114
+ let redacted;
115
+ if (trimmed.startsWith("{") || trimmed.startsWith("[")) try {
116
+ redacted = JSON.stringify(redactLtValue(JSON.parse(trimmed)));
117
+ } catch {
118
+ redacted = redactLtText(input);
119
+ }
120
+ else redacted = redactLtText(input);
121
+ return truncateLt(redacted, maxLength);
122
+ }
123
+ function redactLtHeaders(headers) {
124
+ const result = {};
125
+ for (const [name, value] of Object.entries(headers)) result[name] = isLtSensitiveHeader(name) ? LT_BUG_REDACTED : redactLtText(String(value));
126
+ return result;
127
+ }
128
+ function truncateLt(text, maxLength) {
129
+ return text.length <= maxLength ? text : `${text.slice(0, maxLength)}... [truncated ${text.length - maxLength} characters]`;
130
+ }
131
+ function redactParams(text, depth) {
132
+ return text.replace(PARAM, (match, separator, key, equals, value) => {
133
+ if (isLtSensitiveKey(key)) return `${separator}${key}${equals}${value ? LT_BUG_REDACTED : ""}`;
134
+ if (depth < 3 && /=|%3[dD]/.test(value)) return `${separator}${key}${equals}${redactParams(value, depth + 1)}`;
135
+ return match;
136
+ });
137
+ }
138
+ function safeDecode(value) {
139
+ try {
140
+ return decodeURIComponent(value);
141
+ } catch {
142
+ return value;
143
+ }
144
+ }
145
+ const BROWSERS = [
146
+ {
147
+ name: "Edge",
148
+ regex: /Edg(?:e|A|iOS)?\/([\d.]+)/
149
+ },
150
+ {
151
+ name: "Opera",
152
+ regex: /(?:OPR|Opera)\/([\d.]+)/
153
+ },
154
+ {
155
+ name: "Firefox",
156
+ regex: /(?:Firefox|FxiOS)\/([\d.]+)/
157
+ },
158
+ {
159
+ name: "Chrome",
160
+ regex: /(?:Chrome|CriOS)\/([\d.]+)/
161
+ },
162
+ {
163
+ name: "Safari",
164
+ regex: /Version\/([\d.]+).*Safari/
165
+ }
166
+ ];
167
+ const SYSTEMS = [
168
+ {
169
+ name: "Windows",
170
+ regex: /Windows NT ([\d.]+)/
171
+ },
172
+ {
173
+ name: "Android",
174
+ regex: /Android ([\d.]+)/
175
+ },
176
+ {
177
+ name: "iOS",
178
+ regex: /(?:iPhone|iPad|iPod).*? OS ([\d_]+)/
179
+ },
180
+ {
181
+ name: "macOS",
182
+ regex: /Mac OS X ([\d_.]+)/
183
+ },
184
+ {
185
+ name: "Linux",
186
+ regex: /Linux/
187
+ }
188
+ ];
189
+ function detectLtBrowser(userAgent) {
190
+ for (const browser of BROWSERS) {
191
+ const match = browser.regex.exec(userAgent);
192
+ if (match) return {
193
+ name: browser.name,
194
+ version: match[1] ?? "Unknown"
195
+ };
196
+ }
197
+ return {
198
+ name: "Unknown",
199
+ version: "Unknown"
200
+ };
201
+ }
202
+ function detectLtOs(userAgent) {
203
+ for (const system of SYSTEMS) {
204
+ const match = system.regex.exec(userAgent);
205
+ if (match) return {
206
+ name: system.name,
207
+ version: match[1] ? match[1].replace(/_/g, ".") : "Unknown"
208
+ };
209
+ }
210
+ return {
211
+ name: "Unknown",
212
+ version: "Unknown"
213
+ };
214
+ }
215
+ function getLtBrowserInfo(view = typeof window === "undefined" ? void 0 : window) {
216
+ if (!view?.navigator) throw new TypeError("Browser info collection is only available in the browser");
217
+ const { document, location, navigator, screen } = view;
218
+ let timezone = "Unknown";
219
+ try {
220
+ timezone = Intl.DateTimeFormat().resolvedOptions().timeZone || "Unknown";
221
+ } catch {}
222
+ return {
223
+ browser: detectLtBrowser(navigator.userAgent ?? ""),
224
+ cookieEnabled: !!navigator.cookieEnabled,
225
+ language: navigator.language,
226
+ languages: navigator.languages?.length ? [...navigator.languages] : [navigator.language],
227
+ onLine: !!navigator.onLine,
228
+ os: detectLtOs(navigator.userAgent ?? ""),
229
+ performance: performanceInfo(view),
230
+ platform: navigator.platform ?? "",
231
+ referrer: document?.referrer ? redactLtUrl(document.referrer) : "",
232
+ screen: {
233
+ colorDepth: screen?.colorDepth ?? 0,
234
+ height: screen?.height ?? 0,
235
+ pixelDepth: screen?.pixelDepth ?? 0,
236
+ width: screen?.width ?? 0
237
+ },
238
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
239
+ timezone,
240
+ title: document?.title ?? "",
241
+ url: redactLtUrl(location?.href ?? ""),
242
+ userAgent: navigator.userAgent ?? "",
243
+ vendor: navigator.vendor ?? "",
244
+ viewport: {
245
+ height: view.innerHeight || document?.documentElement?.clientHeight || 0,
246
+ width: view.innerWidth || document?.documentElement?.clientWidth || 0
247
+ }
248
+ };
249
+ }
250
+ function performanceInfo(view) {
251
+ const performance = view.performance;
252
+ if (!performance?.getEntriesByType) return;
253
+ const navigation = performance.getEntriesByType("navigation")[0];
254
+ if (!navigation) return;
255
+ const paint = (name) => performance.getEntriesByName?.(name)[0]?.startTime ?? null;
256
+ return {
257
+ domComplete: navigation.domComplete,
258
+ domContentLoaded: navigation.domContentLoadedEventEnd - navigation.domContentLoadedEventStart,
259
+ firstContentfulPaint: paint("first-contentful-paint"),
260
+ firstPaint: paint("first-paint"),
261
+ loadTime: navigation.loadEventEnd - navigation.loadEventStart,
262
+ navigationStart: navigation.fetchStart,
263
+ responseEnd: navigation.responseEnd
264
+ };
265
+ }
266
+ var LtRingBuffer = class {
267
+ capacity;
268
+ items = [];
269
+ constructor(capacity) {
270
+ this.capacity = capacity;
271
+ }
272
+ get size() {
273
+ return this.items.length;
274
+ }
275
+ push(item) {
276
+ this.items.push(item);
277
+ if (this.items.length > this.capacity) this.items.splice(0, this.items.length - this.capacity);
278
+ }
279
+ toArray(limit = this.capacity) {
280
+ return this.items.slice(-Math.max(0, limit)).map((item) => item && typeof item === "object" ? { ...item } : item);
281
+ }
282
+ last() {
283
+ return this.items[this.items.length - 1];
284
+ }
285
+ clear() {
286
+ this.items = [];
287
+ }
288
+ };
289
+ const LEVELS = [
290
+ "log",
291
+ "info",
292
+ "warn",
293
+ "error",
294
+ "debug"
295
+ ];
296
+ const MAX_PART_LENGTH = 2e3;
297
+ const MAX_STACK_LENGTH = 5e3;
298
+ var LtConsoleCapture = class {
299
+ target;
300
+ buffer;
301
+ originals = null;
302
+ wrappers = {};
303
+ removeListeners = null;
304
+ constructor(capacity, target = console) {
305
+ this.target = target;
306
+ this.buffer = new LtRingBuffer(capacity);
307
+ }
308
+ get installed() {
309
+ return this.originals !== null;
310
+ }
311
+ install(view) {
312
+ if (this.originals) return;
313
+ const target = this.target;
314
+ this.originals = {};
315
+ for (const level of LEVELS) {
316
+ const original = target[level];
317
+ if (typeof original !== "function") continue;
318
+ this.originals[level] = original;
319
+ const wrapper = (...args) => {
320
+ original.apply(this.target, args);
321
+ try {
322
+ this.record(level, args);
323
+ } catch {}
324
+ };
325
+ this.wrappers[level] = wrapper;
326
+ target[level] = wrapper;
327
+ }
328
+ if (view) {
329
+ const onError = (event) => queueMicrotask(() => {
330
+ if (!event.defaultPrevented) this.push({
331
+ level: "error",
332
+ message: [redactLtText(truncateLt(event.message || "Error", MAX_PART_LENGTH))],
333
+ stack: stackOf(event.error),
334
+ timestamp: now()
335
+ });
336
+ });
337
+ const onRejection = (event) => queueMicrotask(() => {
338
+ if (!event.defaultPrevented) this.push({
339
+ level: "error",
340
+ message: [serialize(event.reason)],
341
+ stack: stackOf(event.reason),
342
+ timestamp: now()
343
+ });
344
+ });
345
+ view.addEventListener("error", onError);
346
+ view.addEventListener("unhandledrejection", onRejection);
347
+ this.removeListeners = () => {
348
+ view.removeEventListener("error", onError);
349
+ view.removeEventListener("unhandledrejection", onRejection);
350
+ };
351
+ }
352
+ }
353
+ uninstall() {
354
+ if (!this.originals) return;
355
+ const target = this.target;
356
+ for (const level of LEVELS) {
357
+ const original = this.originals[level];
358
+ if (original && target[level] === this.wrappers[level]) target[level] = original;
359
+ }
360
+ this.originals = null;
361
+ this.wrappers = {};
362
+ this.removeListeners?.();
363
+ this.removeListeners = null;
364
+ }
365
+ entries(limit) {
366
+ return this.buffer.toArray(limit);
367
+ }
368
+ get size() {
369
+ return this.buffer.size;
370
+ }
371
+ clear() {
372
+ this.buffer.clear();
373
+ }
374
+ record(level, args) {
375
+ const entry = {
376
+ level,
377
+ message: withoutStyleArguments(args).map((arg) => serialize(arg)).filter((part) => part.length > 0),
378
+ timestamp: now()
379
+ };
380
+ if (level === "error") {
381
+ const error = args.find((arg) => arg instanceof Error);
382
+ if (error) entry.stack = stackOf(error);
383
+ }
384
+ this.push(entry);
385
+ }
386
+ push(entry) {
387
+ this.buffer.push(entry);
388
+ }
389
+ };
390
+ function serialize(arg) {
391
+ let text;
392
+ if (typeof arg === "string") text = arg.replace(/%c/g, "").replace(/\s+/g, " ").trim();
393
+ else if (arg instanceof Error) text = arg.message;
394
+ else try {
395
+ text = JSON.stringify(arg, null, 2) ?? String(arg);
396
+ } catch {
397
+ text = String(arg);
398
+ }
399
+ return truncateLt(redactLtText(text.length > 2e4 ? text.slice(0, 2e4) : text), MAX_PART_LENGTH);
400
+ }
401
+ function withoutStyleArguments(args) {
402
+ const [first, ...rest] = args;
403
+ if (typeof first !== "string" || !first.includes("%c")) return args;
404
+ const styles = first.match(/%c/g)?.length ?? 0;
405
+ return [first, ...rest.filter((arg, index) => index >= styles || typeof arg !== "string")];
406
+ }
407
+ function stackOf(error) {
408
+ const stack = error?.stack;
409
+ return typeof stack === "string" ? truncateLt(redactLtText(stack), MAX_STACK_LENGTH) : void 0;
410
+ }
411
+ function now() {
412
+ return (/* @__PURE__ */ new Date()).toISOString();
413
+ }
414
+ const DEDUPE_MS = 1e3;
415
+ function ltWrapErrorHandler(handler, listener) {
416
+ const hadOwn = Object.prototype.hasOwnProperty.call(handler, "handleError");
417
+ const original = handler.handleError;
418
+ const wrapped = function(error) {
419
+ try {
420
+ listener(error);
421
+ } catch {}
422
+ original.call(this, error);
423
+ };
424
+ handler.handleError = wrapped;
425
+ return () => {
426
+ if (handler.handleError !== wrapped) return;
427
+ if (hadOwn) handler.handleError = original;
428
+ else delete handler.handleError;
429
+ };
430
+ }
431
+ function toLtBugErrorInfo(error, componentName, view) {
432
+ const candidate = error;
433
+ const message = typeof error === "string" ? error : typeof candidate?.message === "string" && candidate.message ? candidate.message : String(error ?? "Unknown error");
434
+ const stack = typeof candidate?.stack === "string" ? candidate.stack : void 0;
435
+ return {
436
+ componentName,
437
+ message: truncateLt(redactLtText(message), 1e3),
438
+ stack: stack ? truncateLt(redactLtText(stack), 5e3) : void 0,
439
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
440
+ url: view?.location?.href ? redactLtUrl(view.location.href) : void 0,
441
+ userAgent: view?.navigator?.userAgent
442
+ };
443
+ }
444
+ var LtErrorCapture = class {
445
+ onError;
446
+ seen = /* @__PURE__ */ new WeakSet();
447
+ lastMessage = null;
448
+ cleanups = [];
449
+ view = null;
450
+ constructor(onError) {
451
+ this.onError = onError;
452
+ }
453
+ get installed() {
454
+ return this.cleanups.length > 0;
455
+ }
456
+ install(handler, view) {
457
+ if (this.installed) return;
458
+ this.view = view;
459
+ if (handler) this.cleanups.push(ltWrapErrorHandler(handler, (error) => this.report(error, "ErrorHandler")));
460
+ if (view) {
461
+ const onError = (event) => this.report(event.error ?? event.message, "window");
462
+ const onRejection = (event) => this.report(event.reason, "unhandledrejection");
463
+ view.addEventListener("error", onError);
464
+ view.addEventListener("unhandledrejection", onRejection);
465
+ this.cleanups.push(() => {
466
+ view.removeEventListener("error", onError);
467
+ view.removeEventListener("unhandledrejection", onRejection);
468
+ });
469
+ }
470
+ if (!this.cleanups.length) this.cleanups.push(() => void 0);
471
+ }
472
+ uninstall() {
473
+ while (this.cleanups.length) this.cleanups.pop()?.();
474
+ this.view = null;
475
+ }
476
+ report(error, componentName) {
477
+ if (error && typeof error === "object") {
478
+ if (this.seen.has(error)) return;
479
+ this.seen.add(error);
480
+ }
481
+ const info = toLtBugErrorInfo(error, componentName, this.view);
482
+ const at = Date.now();
483
+ if (this.lastMessage && this.lastMessage.message === info.message && at - this.lastMessage.at < DEDUPE_MS) return;
484
+ this.lastMessage = {
485
+ at,
486
+ message: info.message
487
+ };
488
+ this.onError(info, error);
489
+ }
490
+ };
491
+ const INTERACTIVE = "a,button,input,label,select,summary,textarea,[role=\"button\"],[role=\"checkbox\"],[role=\"link\"],[role=\"menuitem\"],[role=\"option\"],[role=\"switch\"],[role=\"tab\"]";
492
+ const DIALOG = "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]";
493
+ const SENSITIVE_AUTOCOMPLETE = /(^|\s)(cc-csc|cc-exp|cc-exp-month|cc-exp-year|cc-number|current-password|new-password|one-time-code)(\s|$)/i;
494
+ const SENSITIVE_NAME_PARTS = [
495
+ "card",
496
+ "credit",
497
+ "cvc",
498
+ "cvv",
499
+ "iban",
500
+ "pin",
501
+ "secret",
502
+ "ssn",
503
+ "token"
504
+ ];
505
+ const MODIFIER_KEYS = /* @__PURE__ */ new Set([
506
+ "Alt",
507
+ "AltGraph",
508
+ "Control",
509
+ "Meta",
510
+ "OS",
511
+ "Shift"
512
+ ]);
513
+ const ERROR_DEDUPE_MS = 1e3;
514
+ function isLtSensitiveField(element) {
515
+ if (!element || typeof element.getAttribute !== "function") return false;
516
+ const tag = element.tagName.toLowerCase();
517
+ if (tag !== "input" && tag !== "textarea" && tag !== "select" && !element.isContentEditable) return false;
518
+ const type = (element.getAttribute("type") ?? "").toLowerCase();
519
+ if (tag === "input" && (type === "password" || type === "hidden")) return true;
520
+ if (SENSITIVE_AUTOCOMPLETE.test(element.getAttribute("autocomplete") ?? "")) return true;
521
+ return [element.getAttribute("name") ?? "", element.id ?? ""].some((name) => !!name && (isLtSensitiveKey(name) || SENSITIVE_NAME_PARTS.some((part) => name.toLowerCase().includes(part))));
522
+ }
523
+ var LtJourneyCapture = class {
524
+ options;
525
+ buffer;
526
+ cleanups = [];
527
+ lastUrl = null;
528
+ lastError = null;
529
+ view = null;
530
+ constructor(options) {
531
+ this.options = options;
532
+ this.buffer = new LtRingBuffer(options.maxEvents);
533
+ }
534
+ get installed() {
535
+ return this.view !== null;
536
+ }
537
+ install(view, options) {
538
+ if (this.view || !this.options.enabled) return;
539
+ this.view = view;
540
+ const o = this.options;
541
+ const listen = (target, type, handler, capture = true) => {
542
+ const listenerOptions = {
543
+ capture,
544
+ passive: true
545
+ };
546
+ target.addEventListener(type, handler, listenerOptions);
547
+ this.cleanups.push(() => target.removeEventListener(type, handler, listenerOptions));
548
+ };
549
+ if (o.captureClicks) listen(view, "click", (event) => {
550
+ const element = this.eventElement(event, INTERACTIVE);
551
+ if (element) {
552
+ const description = describe(element);
553
+ this.record("click", description.target, description);
554
+ }
555
+ });
556
+ if (o.captureNavigation) {
557
+ this.recordNavigation(view.location?.href ?? "");
558
+ if (options.listenToHistory) {
559
+ const onHistory = () => this.recordNavigation(view.location?.href ?? "");
560
+ listen(view, "popstate", onHistory, false);
561
+ listen(view, "hashchange", onHistory, false);
562
+ }
563
+ }
564
+ if (o.captureFormInteractions) {
565
+ listen(view, "submit", (event) => {
566
+ const element = this.eventElement(event);
567
+ if (element) {
568
+ const description = describe(element);
569
+ this.record("form_submit", description.target, description);
570
+ }
571
+ });
572
+ listen(view, "change", (event) => this.recordField("form_change", event));
573
+ }
574
+ if (o.captureInputChanges) listen(view, "input", this.throttle((event) => this.recordField("input_change", event)));
575
+ if (o.captureHover) listen(view, "mouseover", this.throttle((event) => {
576
+ const element = this.eventElement(event, INTERACTIVE);
577
+ if (element) {
578
+ const description = describe(element);
579
+ this.record("hover", description.target, description);
580
+ }
581
+ }));
582
+ if (o.captureScroll) listen(view, "scroll", this.throttle(() => this.record("scroll", "window", { scrollPosition: Math.round(view.scrollY || view.document?.documentElement?.scrollTop || 0) })), false);
583
+ if (o.captureKeyboard) listen(view, "keydown", (event) => this.recordKey(event), false);
584
+ if (o.captureErrors) {
585
+ listen(view, "error", (event) => {
586
+ const error = event;
587
+ if (error.message || error.error) this.recordError(error.error instanceof Error ? error.error.message : error.message, error.filename);
588
+ }, false);
589
+ listen(view, "unhandledrejection", (event) => this.recordError(reasonMessage(event.reason)), false);
590
+ }
591
+ if (o.captureModalEvents) this.observeDialogs(view);
592
+ }
593
+ uninstall() {
594
+ while (this.cleanups.length) this.cleanups.pop()?.();
595
+ this.view = null;
596
+ this.lastUrl = null;
597
+ }
598
+ record(type, target, metadata) {
599
+ if (!this.options.enabled) return;
600
+ this.buffer.push({
601
+ metadata,
602
+ target: truncateLt(redactLtText(target), 200),
603
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
604
+ type
605
+ });
606
+ }
607
+ recordNavigation(url) {
608
+ if (!this.options.captureNavigation || !url || url === this.lastUrl) return;
609
+ const fromUrl = this.lastUrl;
610
+ this.lastUrl = url;
611
+ const toUrl = redactLtUrl(url);
612
+ this.record("navigation", toUrl, {
613
+ ...fromUrl ? { fromUrl: redactLtUrl(fromUrl) } : {},
614
+ toUrl,
615
+ url: toUrl
616
+ });
617
+ }
618
+ recordError(message, source) {
619
+ if (!this.options.captureErrors) return;
620
+ const at = Date.now();
621
+ if (this.lastError && this.lastError.message === message && at - this.lastError.at < ERROR_DEDUPE_MS) return;
622
+ this.lastError = {
623
+ at,
624
+ message
625
+ };
626
+ this.record("error", "window", {
627
+ errorMessage: truncateLt(redactLtText(message || "Error"), 500),
628
+ ...source ? { url: redactLtUrl(source) } : {}
629
+ });
630
+ }
631
+ entries(limit) {
632
+ return this.buffer.toArray(limit);
633
+ }
634
+ get size() {
635
+ return this.buffer.size;
636
+ }
637
+ clear() {
638
+ this.buffer.clear();
639
+ }
640
+ recordField(type, event) {
641
+ const element = this.eventElement(event);
642
+ if (!element || ![
643
+ "input",
644
+ "select",
645
+ "textarea"
646
+ ].includes(element.tagName.toLowerCase())) return;
647
+ if (type === "input_change" && element.tagName.toLowerCase() === "select") return;
648
+ const description = describe(element);
649
+ let value;
650
+ if (this.options.captureInputValues && !isLtSensitiveField(element)) {
651
+ const raw = element.value;
652
+ value = typeof raw === "string" && raw ? truncateLt(redactLtText(raw.slice(0, 200)), 50) : void 0;
653
+ }
654
+ this.record(type, description.target, {
655
+ ...description,
656
+ ...value ? { value } : {}
657
+ });
658
+ }
659
+ recordKey(event) {
660
+ if (!(event.ctrlKey || event.metaKey || event.altKey) || MODIFIER_KEYS.has(event.key)) return;
661
+ if (event.altKey && event.key.length === 1) return;
662
+ const target = event.target;
663
+ if (target && typeof target.closest === "function") {
664
+ if (target.closest(`[data-lt-bug-ui]`)) return;
665
+ if (isEditable(target) && (isLtSensitiveField(target) || event.altKey || !(event.ctrlKey || event.metaKey))) return;
666
+ }
667
+ this.record("keyboard", event.key, {
668
+ altKey: event.altKey,
669
+ ctrlKey: event.ctrlKey,
670
+ key: event.key,
671
+ metaKey: event.metaKey,
672
+ shiftKey: event.shiftKey
673
+ });
674
+ }
675
+ eventElement(event, selector) {
676
+ const target = event.target;
677
+ if (!target || typeof target.closest !== "function" || target.closest(`[data-lt-bug-ui]`)) return null;
678
+ return (selector ? target.closest(selector) : null) ?? target;
679
+ }
680
+ observeDialogs(view) {
681
+ const Observer = view.MutationObserver;
682
+ const body = view.document?.body;
683
+ if (!Observer || !body) return;
684
+ const open = /* @__PURE__ */ new Set();
685
+ const dialogsIn = (node) => {
686
+ if (node.nodeType !== 1) return [];
687
+ const element = node;
688
+ return [...element.matches(DIALOG) ? [element] : [], ...Array.from(element.querySelectorAll(DIALOG))].filter((dialog) => !dialog.closest(`[${LT_BUG_UI_ATTRIBUTE}]`));
689
+ };
690
+ const observer = new Observer((mutations) => {
691
+ for (const mutation of mutations) {
692
+ mutation.addedNodes.forEach((node) => dialogsIn(node).forEach((dialog) => {
693
+ if (!open.has(dialog)) {
694
+ open.add(dialog);
695
+ this.record("modal_open", dialogLabel(dialog), { tag: dialog.tagName.toLowerCase() });
696
+ }
697
+ }));
698
+ mutation.removedNodes.forEach((node) => dialogsIn(node).forEach((dialog) => {
699
+ if (open.delete(dialog)) this.record("modal_close", dialogLabel(dialog), { tag: dialog.tagName.toLowerCase() });
700
+ }));
701
+ }
702
+ });
703
+ observer.observe(body, {
704
+ childList: true,
705
+ subtree: true
706
+ });
707
+ this.cleanups.push(() => observer.disconnect());
708
+ }
709
+ throttle(handler) {
710
+ const delay = this.options.throttleRate;
711
+ let last = 0;
712
+ let timer = null;
713
+ let pending = null;
714
+ this.cleanups.push(() => {
715
+ if (timer) clearTimeout(timer);
716
+ });
717
+ return (event) => {
718
+ const now = Date.now();
719
+ if (now - last >= delay) {
720
+ last = now;
721
+ handler(event);
722
+ return;
723
+ }
724
+ pending = event;
725
+ timer ??= setTimeout(() => {
726
+ timer = null;
727
+ last = Date.now();
728
+ if (pending) {
729
+ handler(pending);
730
+ pending = null;
731
+ }
732
+ }, delay - (now - last));
733
+ };
734
+ }
735
+ };
736
+ function describe(element) {
737
+ const tag = element.tagName.toLowerCase();
738
+ const id = element.id || void 0;
739
+ const classes = element.classList?.length ? Array.from(element.classList).slice(0, 10) : void 0;
740
+ const ownText = (element.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 50);
741
+ const label = element.getAttribute("aria-label") ?? element.getAttribute("title") ?? "";
742
+ const text = ownText || label ? redactLtText(ownText || label) : void 0;
743
+ let target = tag;
744
+ if (id) target += `#${id}`;
745
+ if (classes?.length) target += `.${classes.slice(0, 3).join(".")}`;
746
+ target = truncateLt(target, 120);
747
+ return {
748
+ classes,
749
+ element: target,
750
+ id,
751
+ tag,
752
+ target,
753
+ text
754
+ };
755
+ }
756
+ function dialogLabel(dialog) {
757
+ const labelledBy = dialog.getAttribute("aria-labelledby");
758
+ const labelled = labelledBy ? dialog.ownerDocument?.getElementById(labelledBy.split(/\s+/)[0] ?? "")?.textContent : null;
759
+ return truncateLt(redactLtText((dialog.getAttribute("aria-label") ?? labelled ?? dialog.querySelector("h1,h2,h3")?.textContent ?? dialog.tagName.toLowerCase()).replace(/\s+/g, " ").trim()), 80);
760
+ }
761
+ function isEditable(element) {
762
+ const tag = element.tagName.toLowerCase();
763
+ return tag === "input" || tag === "textarea" || tag === "select" || !!element.isContentEditable;
764
+ }
765
+ function reasonMessage(reason) {
766
+ return reason instanceof Error ? reason.message : typeof reason === "string" ? reason : String(reason);
767
+ }
768
+ const STATIC_EXTENSIONS = [
769
+ ".css",
770
+ ".eot",
771
+ ".gif",
772
+ ".ico",
773
+ ".jpeg",
774
+ ".jpg",
775
+ ".js",
776
+ ".map",
777
+ ".mjs",
778
+ ".png",
779
+ ".svg",
780
+ ".ttf",
781
+ ".webp",
782
+ ".woff",
783
+ ".woff2"
784
+ ];
785
+ const MAX_RESPONSE_BYTES = 1e6;
786
+ var LtNetworkCapture = class {
787
+ ignorePaths;
788
+ paused = false;
789
+ buffer;
790
+ restore = null;
791
+ constructor(capacity, ignorePaths = []) {
792
+ this.ignorePaths = ignorePaths;
793
+ this.buffer = new LtRingBuffer(capacity);
794
+ }
795
+ get installed() {
796
+ return this.restore !== null;
797
+ }
798
+ install(view) {
799
+ if (this.restore) return;
800
+ const restorers = [];
801
+ if (typeof view.fetch === "function") restorers.push(this.wrapFetch(view));
802
+ const proto = view.XMLHttpRequest?.prototype;
803
+ if (proto && typeof proto.open === "function" && typeof proto.send === "function") restorers.push(this.wrapXhr(view, proto));
804
+ this.restore = () => restorers.forEach((restore) => restore());
805
+ }
806
+ uninstall() {
807
+ this.restore?.();
808
+ this.restore = null;
809
+ }
810
+ entries(limit) {
811
+ return this.buffer.toArray(limit);
812
+ }
813
+ get size() {
814
+ return this.buffer.size;
815
+ }
816
+ clear() {
817
+ this.buffer.clear();
818
+ }
819
+ shouldCapture(url, view) {
820
+ if (this.paused || /^(data|blob):/i.test(url)) return false;
821
+ let pathname;
822
+ try {
823
+ pathname = new URL(url, view.location?.href || "http://localhost/").pathname;
824
+ } catch {
825
+ return true;
826
+ }
827
+ const lower = pathname.toLowerCase();
828
+ if (STATIC_EXTENSIONS.some((extension) => lower.endsWith(extension))) return false;
829
+ return !this.ignorePaths.some((path) => pathname === path || pathname.endsWith(path));
830
+ }
831
+ wrapFetch(view) {
832
+ const originalFetch = view.fetch;
833
+ const wrapped = async (...args) => {
834
+ const [input, init] = args;
835
+ const url = fetchUrl(input);
836
+ if (!this.shouldCapture(url, view)) return originalFetch.apply(view, args);
837
+ const request = isRequestLike(input) ? input : void 0;
838
+ const method = String(init?.method ?? request?.method ?? "GET").toUpperCase();
839
+ const excludeBody = isLtBodyExcludedUrl(url);
840
+ const requestHeaders = redactLtHeaders(headersToRecord(request?.headers, init?.headers));
841
+ const requestBody = excludeBody ? void 0 : bodyText(init?.body);
842
+ const startTime = Date.now();
843
+ try {
844
+ const response = await originalFetch.apply(view, args);
845
+ const entry = {
846
+ duration: Date.now() - startTime,
847
+ method,
848
+ requestBody,
849
+ requestHeaders,
850
+ responseHeaders: redactLtHeaders(headersToRecord(response.headers)),
851
+ status: response.status,
852
+ statusText: response.statusText,
853
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
854
+ type: "fetch",
855
+ url: redactLtUrl(url)
856
+ };
857
+ this.buffer.push(entry);
858
+ if (!excludeBody) readResponseBody(response, entry);
859
+ return response;
860
+ } catch (error) {
861
+ this.buffer.push({
862
+ duration: Date.now() - startTime,
863
+ error: redactLtText(error instanceof Error ? error.message : String(error)),
864
+ method,
865
+ requestBody,
866
+ requestHeaders,
867
+ status: 0,
868
+ statusText: "Network Error",
869
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
870
+ type: "fetch",
871
+ url: redactLtUrl(url)
872
+ });
873
+ throw error;
874
+ }
875
+ };
876
+ view.fetch = wrapped;
877
+ return () => {
878
+ if (view.fetch === wrapped) view.fetch = originalFetch;
879
+ };
880
+ }
881
+ wrapXhr(view, proto) {
882
+ const shouldCapture = (url) => this.shouldCapture(url, view);
883
+ const isPaused = () => this.paused;
884
+ const record = (entry) => this.buffer.push(entry);
885
+ const infos = /* @__PURE__ */ new WeakMap();
886
+ const originalOpen = proto.open;
887
+ const originalSend = proto.send;
888
+ const originalSetRequestHeader = proto.setRequestHeader;
889
+ const open = function(method, url, ...rest) {
890
+ const urlString = String(url);
891
+ infos.set(this, {
892
+ capture: shouldCapture(urlString),
893
+ headers: {},
894
+ method: String(method).toUpperCase(),
895
+ url: urlString
896
+ });
897
+ return originalOpen.call(this, method, url, ...rest);
898
+ };
899
+ const setRequestHeader = function(name, value) {
900
+ const info = infos.get(this);
901
+ if (info) info.headers[name] = value;
902
+ return originalSetRequestHeader.call(this, name, value);
903
+ };
904
+ const send = function(body) {
905
+ const info = infos.get(this);
906
+ if (!info?.capture || isPaused()) return originalSend.call(this, body);
907
+ const excludeBody = isLtBodyExcludedUrl(info.url);
908
+ const requestBody = excludeBody ? void 0 : bodyText(body);
909
+ const startTime = Date.now();
910
+ this.addEventListener("loadend", () => {
911
+ const readable = this.responseType === "" || this.responseType === "text";
912
+ record({
913
+ duration: Date.now() - startTime,
914
+ ...this.status === 0 ? { error: "Network Error" } : {},
915
+ method: info.method,
916
+ requestBody,
917
+ requestHeaders: redactLtHeaders(info.headers),
918
+ responseBody: !excludeBody && readable && this.responseText ? redactLtBody(this.responseText) : void 0,
919
+ responseHeaders: redactLtHeaders(parseHeaderBlock(this.getAllResponseHeaders())),
920
+ status: this.status,
921
+ statusText: this.statusText,
922
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
923
+ type: "xhr",
924
+ url: redactLtUrl(info.url)
925
+ });
926
+ }, { once: true });
927
+ return originalSend.call(this, body);
928
+ };
929
+ proto.open = open;
930
+ proto.send = send;
931
+ proto.setRequestHeader = setRequestHeader;
932
+ return () => {
933
+ if (proto.open === open) proto.open = originalOpen;
934
+ if (proto.send === send) proto.send = originalSend;
935
+ if (proto.setRequestHeader === setRequestHeader) proto.setRequestHeader = originalSetRequestHeader;
936
+ };
937
+ }
938
+ };
939
+ function isRequestLike(input) {
940
+ return typeof input === "object" && input !== null && !(input instanceof URL) && typeof input.url === "string";
941
+ }
942
+ function fetchUrl(input) {
943
+ if (typeof input === "string") return input;
944
+ if (input instanceof URL) return input.href;
945
+ return isRequestLike(input) ? input.url : String(input ?? "");
946
+ }
947
+ function headersToRecord(...sources) {
948
+ const result = {};
949
+ for (const source of sources) {
950
+ if (!source) continue;
951
+ try {
952
+ new Headers(source).forEach((value, name) => result[name.toLowerCase()] = value);
953
+ } catch {}
954
+ }
955
+ return result;
956
+ }
957
+ function bodyText(body) {
958
+ if (body === null || body === void 0) return;
959
+ if (typeof body === "string") return redactLtBody(body);
960
+ if (typeof URLSearchParams !== "undefined" && body instanceof URLSearchParams) return redactLtBody(body.toString());
961
+ if (typeof FormData !== "undefined" && body instanceof FormData) return "[FormData]";
962
+ if (typeof Blob !== "undefined" && body instanceof Blob) return `[Blob ${body.size} bytes]`;
963
+ if (body instanceof ArrayBuffer || ArrayBuffer.isView(body)) return `[binary ${body.byteLength} bytes]`;
964
+ return "[body not recorded]";
965
+ }
966
+ function readResponseBody(response, entry) {
967
+ const type = (response.headers.get("content-type") ?? "").toLowerCase();
968
+ const length = Number(response.headers.get("content-length") ?? 0);
969
+ if (!(!type || /json|text\/|xml|javascript|x-www-form-urlencoded|graphql/.test(type)) || type.includes("event-stream") || length > MAX_RESPONSE_BYTES || response.bodyUsed) return;
970
+ let clone;
971
+ try {
972
+ clone = response.clone();
973
+ } catch {
974
+ return;
975
+ }
976
+ clone.text().then((text) => {
977
+ if (text) entry.responseBody = redactLtBody(text);
978
+ }, () => void 0);
979
+ }
980
+ function parseHeaderBlock(block) {
981
+ const result = {};
982
+ for (const line of (block ?? "").split(/\r?\n/)) {
983
+ const index = line.indexOf(":");
984
+ if (index > 0) result[line.slice(0, index).trim().toLowerCase()] = line.slice(index + 1).trim();
985
+ }
986
+ return result;
987
+ }
988
+ function startLtBugCapture(deps) {
989
+ const { options, view } = deps;
990
+ const consoleCapture = options.enableConsoleLogs ? new LtConsoleCapture(options.maxConsoleLogs, view.console ?? console) : null;
991
+ consoleCapture?.install(view);
992
+ const networkCapture = options.enableNetworkRequests ? new LtNetworkCapture(options.maxNetworkRequests, [options.endpoint]) : null;
993
+ networkCapture?.install(view);
994
+ const journeyCapture = options.enableUserJourney && options.userJourney.enabled ? new LtJourneyCapture(options.userJourney) : null;
995
+ journeyCapture?.install(view, { listenToHistory: !deps.router });
996
+ const routerSubscription = journeyCapture && deps.router && options.userJourney.captureNavigation ? deps.router.events.subscribe((event) => {
997
+ if (event instanceof NavigationEnd) journeyCapture.recordNavigation(absoluteUrl(event.urlAfterRedirects, deps.baseUri || view.location.href));
998
+ }) : null;
999
+ const errorCapture = options.enableErrorBoundary ? new LtErrorCapture((info) => {
1000
+ journeyCapture?.recordError(info.message);
1001
+ deps.onError(info);
1002
+ }) : null;
1003
+ errorCapture?.install(deps.errorHandler, view);
1004
+ const engine = {
1005
+ browserInfo: () => {
1006
+ try {
1007
+ return getLtBrowserInfo(view);
1008
+ } catch {
1009
+ return null;
1010
+ }
1011
+ },
1012
+ buildReport: (form, attachments, includes) => buildLtBugReport(form, attachments, includes, {
1013
+ browserInfo: options.enableBrowserInfo ? () => getLtBrowserInfo(view) : void 0,
1014
+ consoleLogs: consoleCapture ? () => engine.consoleLogs() : void 0,
1015
+ networkRequests: networkCapture ? () => engine.networkRequests() : void 0,
1016
+ userInteractions: journeyCapture ? () => engine.userJourney() : void 0
1017
+ }),
1018
+ consoleLogs: () => consoleCapture?.entries(options.maxConsoleLogs) ?? [],
1019
+ networkRequests: () => networkCapture?.entries(options.maxNetworkRequests) ?? [],
1020
+ record: (type, target, metadata) => journeyCapture?.record(type, target, metadata),
1021
+ recordError: (message) => journeyCapture?.recordError(message),
1022
+ reportError: (error, source) => errorCapture ? errorCapture.report(error, source) : deps.onError(toLtBugErrorInfo(error, source, view)),
1023
+ setNetworkPaused: (paused) => {
1024
+ if (networkCapture) networkCapture.paused = paused;
1025
+ },
1026
+ stop: () => {
1027
+ consoleCapture?.uninstall();
1028
+ networkCapture?.uninstall();
1029
+ journeyCapture?.uninstall();
1030
+ errorCapture?.uninstall();
1031
+ routerSubscription?.unsubscribe();
1032
+ },
1033
+ userJourney: () => journeyCapture?.entries(options.userJourney.maxEvents) ?? []
1034
+ };
1035
+ return engine;
1036
+ }
1037
+ function absoluteUrl(routerUrl, base) {
1038
+ try {
1039
+ return new URL(routerUrl.replace(/^\//, ""), base).href;
1040
+ } catch {
1041
+ return routerUrl;
1042
+ }
1043
+ }
1044
+ export { startLtBugCapture };
1045
+
1046
+ //# sourceMappingURL=lenne.tech-ng-base-bug-capture-engine-TkjMDdqj.mjs.map