@mks2508/better-logger 0.14.0-alpha.2 → 1.1.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 (205) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/dist/Logger.d.ts +12 -16
  3. package/dist/Logger.d.ts.map +1 -1
  4. package/dist/ScopedLogger.d.ts +1 -9
  5. package/dist/chunks/{Logger-D_p3xnbq.js → Logger-C9zTFYBh.js} +2 -2
  6. package/dist/chunks/Logger-C9zTFYBh.js.map +1 -0
  7. package/dist/chunks/{Logger-Crw1woqR.js → Logger-Th9SfADL.js} +50 -17
  8. package/dist/chunks/Logger-Th9SfADL.js.map +1 -0
  9. package/dist/chunks/ScopedLogger-HgV_J-ug.js +2 -0
  10. package/dist/chunks/ScopedLogger-HgV_J-ug.js.map +1 -0
  11. package/dist/chunks/ScopedLogger-uAAeJkfA.js +361 -0
  12. package/dist/chunks/ScopedLogger-uAAeJkfA.js.map +1 -0
  13. package/dist/chunks/environment-5I5unY89.js +4 -0
  14. package/dist/chunks/environment-5I5unY89.js.map +1 -0
  15. package/dist/chunks/{environment-Bxbnw4pd.js → environment-wXLQvk5g.js} +103 -11
  16. package/dist/chunks/environment-wXLQvk5g.js.map +1 -0
  17. package/dist/chunks/formatting-CiFnwe1I.js +2 -0
  18. package/dist/chunks/formatting-CiFnwe1I.js.map +1 -0
  19. package/dist/chunks/formatting-DIhpRCCk.js +380 -0
  20. package/dist/chunks/formatting-DIhpRCCk.js.map +1 -0
  21. package/dist/cli/CommandProcessor.d.ts +1 -4
  22. package/dist/cli/commands/ConfigCommand.d.ts +2 -5
  23. package/dist/cli/commands/ExportCommand.d.ts +2 -5
  24. package/dist/cli/commands/HistoryCommand.d.ts +2 -5
  25. package/dist/cli/commands/StatusCommand.d.ts +2 -5
  26. package/dist/cli/commands/ThemeCommand.d.ts +2 -5
  27. package/dist/cli/help.d.ts +2 -5
  28. package/dist/cli/index.d.ts +1 -1
  29. package/dist/constants.d.ts +110 -5
  30. package/dist/constants.d.ts.map +1 -1
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.cjs.map +1 -1
  33. package/dist/core.d.ts +1 -8
  34. package/dist/core.d.ts.map +1 -1
  35. package/dist/core.js +281 -307
  36. package/dist/core.js.map +1 -1
  37. package/dist/exports-module.d.ts +1 -8
  38. package/dist/exports.cjs +1 -1
  39. package/dist/exports.js +2 -2
  40. package/dist/handlers/AnalyticsLogHandler.d.ts +1 -4
  41. package/dist/handlers/ExportLogHandler.d.ts +1 -4
  42. package/dist/handlers/ExportLogHandler.d.ts.map +1 -1
  43. package/dist/handlers/FileLogHandler.d.ts +1 -4
  44. package/dist/handlers/RemoteLogHandler.d.ts +1 -4
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.ts +8 -41
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +246 -159
  50. package/dist/index.js.map +1 -1
  51. package/dist/styling/LogStyleBuilder.d.ts +2 -5
  52. package/dist/styling/SemanticStyles.d.ts +0 -3
  53. package/dist/styling/SmartPresets.d.ts +1 -4
  54. package/dist/styling/banners.d.ts +1 -4
  55. package/dist/styling/themes.d.ts +2 -5
  56. package/dist/styling-module.d.ts +1 -8
  57. package/dist/styling.cjs +1 -1
  58. package/dist/styling.js +3 -3
  59. package/dist/types/core.d.ts +13 -0
  60. package/dist/types/core.d.ts.map +1 -1
  61. package/dist/types/handlers.d.ts +1 -4
  62. package/dist/types/index.d.ts +1 -1
  63. package/dist/types/index.d.ts.map +1 -1
  64. package/dist/utils/ansi-colors.d.ts +156 -0
  65. package/dist/utils/ansi-colors.d.ts.map +1 -0
  66. package/dist/utils/formatting.d.ts +20 -2
  67. package/dist/utils/formatting.d.ts.map +1 -1
  68. package/dist/utils/index.d.ts +1 -0
  69. package/dist/utils/index.d.ts.map +1 -1
  70. package/dist/utils/output.d.ts +1 -4
  71. package/dist/utils/stackTrace.d.ts +1 -4
  72. package/package.json +2 -1
  73. package/src/Logger.ts +102 -64
  74. package/src/constants.ts +131 -1
  75. package/src/core.ts +11 -7
  76. package/src/handlers/ExportLogHandler.ts +2 -1
  77. package/src/index.ts +62 -27
  78. package/src/styling/SemanticStyles.ts +1 -1
  79. package/src/types/core.ts +15 -1
  80. package/src/types/index.ts +1 -0
  81. package/src/utils/ansi-colors.ts +333 -0
  82. package/src/utils/formatting.ts +196 -6
  83. package/src/utils/index.ts +23 -11
  84. package/vite.config.ts +1 -1
  85. package/dist/.tsbuildinfo +0 -1
  86. package/dist/Logger.js +0 -1124
  87. package/dist/ScopedLogger.js +0 -426
  88. package/dist/chunks/Logger-Crw1woqR.js.map +0 -1
  89. package/dist/chunks/Logger-D_p3xnbq.js.map +0 -1
  90. package/dist/chunks/environment-Bxbnw4pd.js.map +0 -1
  91. package/dist/chunks/environment-Dm66zOML.js +0 -4
  92. package/dist/chunks/environment-Dm66zOML.js.map +0 -1
  93. package/dist/chunks/formatting-C0riPC5_.js +0 -95
  94. package/dist/chunks/formatting-C0riPC5_.js.map +0 -1
  95. package/dist/chunks/formatting-DNCAV66-.js +0 -2
  96. package/dist/chunks/formatting-DNCAV66-.js.map +0 -1
  97. package/dist/cli/CommandProcessor.js +0 -184
  98. package/dist/cli/commands/ConfigCommand.js +0 -88
  99. package/dist/cli/commands/ExportCommand.js +0 -243
  100. package/dist/cli/commands/HistoryCommand.js +0 -96
  101. package/dist/cli/commands/StatusCommand.js +0 -93
  102. package/dist/cli/commands/ThemeCommand.js +0 -79
  103. package/dist/cli/help.js +0 -118
  104. package/dist/cli/index.js +0 -46
  105. package/dist/constants.js +0 -159
  106. package/dist/example.js +0 -154
  107. package/dist/exports-module.js +0 -260
  108. package/dist/handlers/AnalyticsLogHandler.js +0 -19
  109. package/dist/handlers/ExportLogHandler.js +0 -516
  110. package/dist/handlers/FileLogHandler.js +0 -156
  111. package/dist/handlers/RemoteLogHandler.js +0 -37
  112. package/dist/handlers/index.js +0 -7
  113. package/dist/main.js +0 -139
  114. package/dist/styling/LogStyleBuilder.js +0 -289
  115. package/dist/styling/SemanticStyles.js +0 -339
  116. package/dist/styling/SmartPresets.js +0 -276
  117. package/dist/styling/StyleBuilder.js +0 -280
  118. package/dist/styling/banners.js +0 -155
  119. package/dist/styling/index.js +0 -9
  120. package/dist/styling/themes.js +0 -231
  121. package/dist/styling-module.js +0 -199
  122. package/dist/types/Logger.d.ts +0 -700
  123. package/dist/types/Logger.d.ts.map +0 -1
  124. package/dist/types/ScopedLogger.d.ts +0 -310
  125. package/dist/types/ScopedLogger.d.ts.map +0 -1
  126. package/dist/types/cli/CommandProcessor.d.ts +0 -100
  127. package/dist/types/cli/CommandProcessor.d.ts.map +0 -1
  128. package/dist/types/cli/commands/ConfigCommand.d.ts +0 -14
  129. package/dist/types/cli/commands/ConfigCommand.d.ts.map +0 -1
  130. package/dist/types/cli/commands/ExportCommand.d.ts +0 -48
  131. package/dist/types/cli/commands/ExportCommand.d.ts.map +0 -1
  132. package/dist/types/cli/commands/HistoryCommand.d.ts +0 -47
  133. package/dist/types/cli/commands/HistoryCommand.d.ts.map +0 -1
  134. package/dist/types/cli/commands/StatusCommand.d.ts +0 -30
  135. package/dist/types/cli/commands/StatusCommand.d.ts.map +0 -1
  136. package/dist/types/cli/commands/ThemeCommand.d.ts +0 -30
  137. package/dist/types/cli/commands/ThemeCommand.d.ts.map +0 -1
  138. package/dist/types/cli/help.d.ts +0 -12
  139. package/dist/types/cli/help.d.ts.map +0 -1
  140. package/dist/types/cli/index.d.ts +0 -15
  141. package/dist/types/cli/index.d.ts.map +0 -1
  142. package/dist/types/constants.d.ts +0 -119
  143. package/dist/types/constants.d.ts.map +0 -1
  144. package/dist/types/core.js +0 -28
  145. package/dist/types/example.d.ts +0 -18
  146. package/dist/types/example.d.ts.map +0 -1
  147. package/dist/types/exports-module.d.ts +0 -196
  148. package/dist/types/exports-module.d.ts.map +0 -1
  149. package/dist/types/handlers/AnalyticsLogHandler.d.ts +0 -8
  150. package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +0 -1
  151. package/dist/types/handlers/ExportLogHandler.d.ts +0 -100
  152. package/dist/types/handlers/ExportLogHandler.d.ts.map +0 -1
  153. package/dist/types/handlers/FileLogHandler.d.ts +0 -33
  154. package/dist/types/handlers/FileLogHandler.d.ts.map +0 -1
  155. package/dist/types/handlers/RemoteLogHandler.d.ts +0 -11
  156. package/dist/types/handlers/RemoteLogHandler.d.ts.map +0 -1
  157. package/dist/types/handlers/index.d.ts +0 -8
  158. package/dist/types/handlers/index.d.ts.map +0 -1
  159. package/dist/types/handlers.js +0 -4
  160. package/dist/types/index.js +0 -4
  161. package/dist/types/main.d.ts +0 -2
  162. package/dist/types/main.d.ts.map +0 -1
  163. package/dist/types/styling/LogStyleBuilder.d.ts +0 -146
  164. package/dist/types/styling/LogStyleBuilder.d.ts.map +0 -1
  165. package/dist/types/styling/SemanticStyles.d.ts +0 -178
  166. package/dist/types/styling/SemanticStyles.d.ts.map +0 -1
  167. package/dist/types/styling/SmartPresets.d.ts +0 -22
  168. package/dist/types/styling/SmartPresets.d.ts.map +0 -1
  169. package/dist/types/styling/StyleBuilder.d.ts +0 -140
  170. package/dist/types/styling/StyleBuilder.d.ts.map +0 -1
  171. package/dist/types/styling/banners.d.ts +0 -42
  172. package/dist/types/styling/banners.d.ts.map +0 -1
  173. package/dist/types/styling/index.d.ts +0 -10
  174. package/dist/types/styling/index.d.ts.map +0 -1
  175. package/dist/types/styling/themes.d.ts +0 -7
  176. package/dist/types/styling/themes.d.ts.map +0 -1
  177. package/dist/types/styling-module.d.ts +0 -178
  178. package/dist/types/styling-module.d.ts.map +0 -1
  179. package/dist/types/types/core.d.ts +0 -221
  180. package/dist/types/types/core.d.ts.map +0 -1
  181. package/dist/types/types/handlers.d.ts +0 -85
  182. package/dist/types/types/handlers.d.ts.map +0 -1
  183. package/dist/types/types/index.d.ts +0 -7
  184. package/dist/types/types/index.d.ts.map +0 -1
  185. package/dist/types/utils/environment.d.ts +0 -47
  186. package/dist/types/utils/environment.d.ts.map +0 -1
  187. package/dist/types/utils/formatting.d.ts +0 -37
  188. package/dist/types/utils/formatting.d.ts.map +0 -1
  189. package/dist/types/utils/index.d.ts +0 -7
  190. package/dist/types/utils/index.d.ts.map +0 -1
  191. package/dist/types/utils/opentui-detection.d.ts +0 -34
  192. package/dist/types/utils/opentui-detection.d.ts.map +0 -1
  193. package/dist/types/utils/output.d.ts +0 -41
  194. package/dist/types/utils/output.d.ts.map +0 -1
  195. package/dist/types/utils/stackTrace.d.ts +0 -6
  196. package/dist/types/utils/stackTrace.d.ts.map +0 -1
  197. package/dist/types/utils/timestamps.d.ts +0 -20
  198. package/dist/types/utils/timestamps.d.ts.map +0 -1
  199. package/dist/utils/environment.js +0 -85
  200. package/dist/utils/formatting.js +0 -117
  201. package/dist/utils/index.js +0 -6
  202. package/dist/utils/opentui-detection.js +0 -116
  203. package/dist/utils/output.js +0 -150
  204. package/dist/utils/stackTrace.js +0 -81
  205. package/dist/utils/timestamps.js +0 -71
@@ -28,7 +28,8 @@
28
28
  "Bash(git rebase:*)",
29
29
  "Bash(find:*)",
30
30
  "Bash(npm run type-check:*)",
31
- "Bash(git tag:*)"
31
+ "Bash(git tag:*)",
32
+ "Bash(npx tsc:*)"
32
33
  ],
33
34
  "deny": [],
34
35
  "ask": [],
package/dist/Logger.d.ts CHANGED
@@ -1,12 +1,4 @@
1
- /**
2
- * @fileoverview Logger avanzado con arquitectura modular y API simplificada
3
- * @version 0.3.0
4
- * @since 2024
5
- *
6
- * Sistema de logging profesional con estilos CSS avanzados, temas adaptativos,
7
- * badges automáticos, contextos temporales y exportación de datos.
8
- */
9
- import type { LogLevel, Verbosity, ThemeVariant, BannerType, LoggerConfig, ILogHandler, StyleOptions } from './types/index.js';
1
+ import { LogLevel, Verbosity, ThemeVariant, BannerType, LoggerConfig, ILogHandler, StyleOptions } from './types/index.js';
10
2
  import { ExportLogHandler } from './handlers/index.js';
11
3
  /**
12
4
  * Clase principal Logger con capacidades avanzadas de logging
@@ -164,6 +156,14 @@ export declare class Logger {
164
156
  * @since 0.3.0
165
157
  */
166
158
  cleanup(): void;
159
+ /**
160
+ * Factory method para crear loggers con scope evitando dependencias circulares
161
+ * @private
162
+ * @param {string} type - Tipo de logger ('scope' | 'api' | 'component')
163
+ * @param {string} name - Nombre del scope
164
+ * @returns {Promise<any>} Logger con scope
165
+ */
166
+ private createScopedLogger;
167
167
  /**
168
168
  * Aplica un preset inteligente - funciona perfectamente sin configuración
169
169
  *
@@ -657,15 +657,11 @@ export declare class Logger {
657
657
  */
658
658
  cli(command: string): Promise<void>;
659
659
  }
660
- /**
661
- * Instancia singleton del logger con configuración por defecto
662
- * @constant {Logger}
663
- */
664
- declare const defaultLogger: Logger;
665
- export default defaultLogger;
660
+ declare const _default: Logger;
661
+ export default _default;
666
662
  /**
667
663
  * Métodos individuales exportados para conveniencia
668
- * @description Todos los métodos están correctamente enlazados al singleton
664
+ * @description Todos los métodos están correctamente enlazados al singleton lazy
669
665
  * @since 0.3.0
670
666
  */
671
667
  export declare const debug: (...args: any[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../src/Logger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EAEZ,WAAW,EAEX,YAAY,EACf,MAAM,kBAAkB,CAAC;AAwB1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAcvD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,MAAM;IACf,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,MAAM,CAAsC;IACpD,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,aAAa,CAAC,CAAmB;IACzC,OAAO,CAAC,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oC,CAAC;AACxE,eAAO,MAAM,OAAO,YAAqC,CAAC;AAG1D,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,SAAoC,CAAC;AACxE,eAAO,MAAM,OAAO,gBAAqC,CAAC;AAC1D,eAAO,MAAM,aAAa,YAA2C,CAAC;AACtE,eAAO,MAAM,aAAa,YAA2C,CAAC;AACtE,eAAO,MAAM,YAAY,YAA0C,CAAC;AACpE,eAAO,MAAM,YAAY,YAA0C,CAAC;AACpE,eAAO,MAAM,UAAU,YAAwC,CAAC;AAChE,eAAO,MAAM,UAAU,YAAwC,CAAC;AAChE,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,QAAuC,CAAC;AAC9E,eAAO,MAAM,GAAG,GAAI,MAAM,MAAM,QAAiC,CAAC;AAClE,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,QAAmC,CAAC;AACtE,eAAO,MAAM,SAAS,GAAI,WAAW,GAAG,SAA4C,CAAC;AACrF,eAAO,MAAM,MAAM,WAAoC,CAAC;AAGxD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,13 +1,5 @@
1
- /**
2
- * @fileoverview ScopedLogger con badges y logging contextual
3
- * @version 0.3.0
4
- * @since 2024
5
- *
6
- * Proporciona loggers especializados con contexto, badges automáticos
7
- * y características avanzadas para componentes y APIs.
8
- */
9
1
  import { Logger } from './Logger.js';
10
- import type { LoggerConfig, LogLevel } from './types/index.js';
2
+ import { LoggerConfig, LogLevel } from './types/index.js';
11
3
  /**
12
4
  * Logger con scope mejorado con badges y API simplificada
13
5
  *
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./environment-Dm66zOML.js"),t={default:{debug:{emoji:"🐞",label:"DEBUG",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"#ffffff",border:"1px solid #667eea",shadow:"0 2px 4px rgba(102, 126, 234, 0.3)"},info:{emoji:"ℹ️",label:"INFO",background:"linear-gradient(135deg, #74b9ff 0%, #0984e3 100%)",color:"#ffffff",border:"1px solid #74b9ff",shadow:"0 2px 4px rgba(116, 185, 255, 0.3)"},warn:{emoji:"⚠️",label:"WARN",background:"linear-gradient(135deg, #fdcb6e 0%, #e17055 100%)",color:"#2d3436",border:"1px solid #fdcb6e",shadow:"0 2px 4px rgba(253, 203, 110, 0.3)"},error:{emoji:"❌",label:"ERROR",background:"linear-gradient(135deg, #e84393 0%, #d63031 100%)",color:"#ffffff",border:"1px solid #e84393",shadow:"0 2px 4px rgba(232, 67, 147, 0.3)"},success:{emoji:"✅",label:"SUCCESS",background:"linear-gradient(135deg, #00b894 0%, #00a085 100%)",color:"#ffffff",border:"1px solid #00b894",shadow:"0 2px 4px rgba(0, 184, 148, 0.3)"},critical:{emoji:"🔥",label:"CRITICAL",background:"linear-gradient(135deg, #ff3838 0%, #ff1744 100%)",color:"#ffffff",border:"2px solid #ff3838",shadow:"0 4px 8px rgba(255, 56, 56, 0.5)"}},dark:{debug:{emoji:"🌙",label:"DEBUG",background:"linear-gradient(135deg, #2d3748 0%, #4a5568 100%)",color:"#e2e8f0",border:"1px solid #4a5568",shadow:"0 2px 4px rgba(45, 55, 72, 0.8)"},info:{emoji:"💡",label:"INFO",background:"linear-gradient(135deg, #1a202c 0%, #2d3748 100%)",color:"#90cdf4",border:"1px solid #3182ce",shadow:"0 2px 4px rgba(26, 32, 44, 0.8)"},warn:{emoji:"⚡",label:"WARN",background:"linear-gradient(135deg, #744210 0%, #975a16 100%)",color:"#faf089",border:"1px solid #d69e2e",shadow:"0 2px 4px rgba(116, 66, 16, 0.8)"},error:{emoji:"💀",label:"ERROR",background:"linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%)",color:"#feb2b2",border:"1px solid #e53e3e",shadow:"0 2px 4px rgba(116, 42, 42, 0.8)"},success:{emoji:"🎯",label:"SUCCESS",background:"linear-gradient(135deg, #276749 0%, #2f855a 100%)",color:"#9ae6b4",border:"1px solid #38a169",shadow:"0 2px 4px rgba(39, 103, 73, 0.8)"},critical:{emoji:"💥",label:"CRITICAL",background:"linear-gradient(135deg, #1a1a1a 0%, #ff0000 100%)",color:"#ffffff",border:"2px solid #ff0000",shadow:"0 4px 8px rgba(255, 0, 0, 0.9)"}},neon:{debug:{emoji:"⚡",label:"DEBUG",background:"linear-gradient(135deg, #0f3460 0%, #e94560 100%)",color:"#00ffff",border:"1px solid #00ffff",shadow:"0 0 10px rgba(0, 255, 255, 0.5)"},info:{emoji:"🔮",label:"INFO",background:"linear-gradient(135deg, #16213e 0%, #0f3460 100%)",color:"#00ff41",border:"1px solid #00ff41",shadow:"0 0 10px rgba(0, 255, 65, 0.5)"},warn:{emoji:"⚠️",label:"WARN",background:"linear-gradient(135deg, #533a03 0%, #e94560 100%)",color:"#ffff00",border:"1px solid #ffff00",shadow:"0 0 10px rgba(255, 255, 0, 0.5)"},error:{emoji:"💥",label:"ERROR",background:"linear-gradient(135deg, #5c0a0a 0%, #ff073a 100%)",color:"#ff073a",border:"1px solid #ff073a",shadow:"0 0 10px rgba(255, 7, 58, 0.8)"},success:{emoji:"✨",label:"SUCCESS",background:"linear-gradient(135deg, #0a5c0a 0%, #39ff14 100%)",color:"#39ff14",border:"1px solid #39ff14",shadow:"0 0 10px rgba(57, 255, 20, 0.8)"},critical:{emoji:"🌟",label:"CRITICAL",background:"linear-gradient(135deg, #000000 0%, #ff0080 100%)",color:"#ff0080",border:"2px solid #ff0080",shadow:"0 0 20px rgba(255, 0, 128, 1)"}},minimal:{debug:{emoji:"",label:"DEBUG",background:"#f7fafc",color:"#4a5568",border:"1px solid #e2e8f0",shadow:"none"},info:{emoji:"",label:"INFO",background:"#ebf8ff",color:"#2b6cb0",border:"1px solid #bee3f8",shadow:"none"},warn:{emoji:"",label:"WARN",background:"#fffbf0",color:"#c05621",border:"1px solid #fed7aa",shadow:"none"},error:{emoji:"",label:"ERROR",background:"#fef5f5",color:"#c53030",border:"1px solid #fca5a5",shadow:"none"},success:{emoji:"",label:"SUCCESS",background:"#f0fff4",color:"#2f855a",border:"1px solid #9ae6b4",shadow:"none"},critical:{emoji:"",label:"CRITICAL",background:"#fef5f5",color:"#e53e3e",border:"2px solid #f56565",shadow:"none"}},light:{debug:{emoji:"🔍",label:"DEBUG",background:"linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)",color:"#1565c0",border:"1px solid #90caf9",shadow:"0 1px 3px rgba(33, 150, 243, 0.2)"},info:{emoji:"ℹ️",label:"INFO",background:"linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%)",color:"#7b1fa2",border:"1px solid #ce93d8",shadow:"0 1px 3px rgba(156, 39, 176, 0.2)"},warn:{emoji:"⚠️",label:"WARN",background:"linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)",color:"#f57c00",border:"1px solid #ffcc02",shadow:"0 1px 3px rgba(255, 152, 0, 0.2)"},error:{emoji:"❌",label:"ERROR",background:"linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%)",color:"#d32f2f",border:"1px solid #f44336",shadow:"0 1px 3px rgba(244, 67, 54, 0.2)"},success:{emoji:"✅",label:"SUCCESS",background:"linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%)",color:"#388e3c",border:"1px solid #4caf50",shadow:"0 1px 3px rgba(76, 175, 80, 0.2)"},critical:{emoji:"🚨",label:"CRITICAL",background:"linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%)",color:"#c2185b",border:"2px solid #e91e63",shadow:"0 2px 6px rgba(233, 30, 99, 0.3)"}},cyberpunk:{debug:{emoji:"🤖",label:"DEBUG",background:"linear-gradient(135deg, #0d1b2a 0%, #415a77 100%)",color:"#00d4aa",border:"1px solid #00d4aa",shadow:"0 0 15px rgba(0, 212, 170, 0.4)"},info:{emoji:"🔗",label:"INFO",background:"linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%)",color:"#00b4d8",border:"1px solid #00b4d8",shadow:"0 0 15px rgba(0, 180, 216, 0.4)"},warn:{emoji:"⚡",label:"WARN",background:"linear-gradient(135deg, #f72585 0%, #b5179e 100%)",color:"#ffff3f",border:"1px solid #ffff3f",shadow:"0 0 15px rgba(255, 255, 63, 0.4)"},error:{emoji:"💀",label:"ERROR",background:"linear-gradient(135deg, #7209b7 0%, #480ca8 100%)",color:"#ff006e",border:"1px solid #ff006e",shadow:"0 0 15px rgba(255, 0, 110, 0.6)"},success:{emoji:"⚡",label:"SUCCESS",background:"linear-gradient(135deg, #003566 0%, #001d3d 100%)",color:"#00f5ff",border:"1px solid #00f5ff",shadow:"0 0 15px rgba(0, 245, 255, 0.4)"},critical:{emoji:"💥",label:"CRITICAL",background:"linear-gradient(135deg, #000000 0%, #ff0040 100%)",color:"#ff0040",border:"2px solid #ff0040",shadow:"0 0 25px rgba(255, 0, 64, 0.8)"}}},o={simple:{text:"🚀 ADVANCED LOGGER v2.0.0 - State-of-the-art Console Styling 🚀",style:"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 20px; border-radius: 8px; font-weight: bold; font-size: 14px;"},ascii:{text:"\n ___ ____ _ __ ___ _ __ _____ _____ ____ __ ___ _____ _____ _____ ____ \n / _ \\ / __ \\| | / / / _ \\ | \\ | |/ ____| ____| _ \\ | | / _ \\ / ____| ___| _ | _ \\ \n / /_\\ \\ / / _` | |/ / / /_\\ \\ | \\| | | | |__ | | | | | | / / \\ \\| | __| |_ | |_| | |_) |\n | _ || | (_| | < | _ | | . ` | | | __| | | | | | | | | | | | |_ | _| | /| _ < \n | | | |\\ \\__,_|_|\\_\\ | | | | | |\\ | |___| |____| |_| | | |__\\ \\_/ /| |__| | |___| |\\ \\| |_) |\n \\_| |_/ \\____/ \\_| |_/ |_| \\_|\\_____|______|____/ |_____/\\___/ \\_____|_____|_| \\_|____/\n\n Advanced Logger v2.0.0 - Console Excellence",style:'font-family: "Courier New", Consolas, Monaco, monospace; color: #667eea; font-size: 11px; line-height: 1.2;'},unicode:{text:"\n╔══════════════════════════════════════════════════════════════════════════╗\n║ 🚀 ADVANCED LOGGER v2.0.0 ║\n║ State-of-the-art Console Styling ║ \n╚══════════════════════════════════════════════════════════════════════════╝",style:'font-family: "Courier New", Consolas, Monaco, monospace; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px; border-radius: 8px; font-size: 12px; line-height: 1.3;'},svg:{text:" ",style:"\n background-image: url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80'><defs><linearGradient id='grad' x1='0%' y1='0%' x2='100%' y2='0%'><stop offset='0%' style='stop-color:%23667eea'/><stop offset='100%' style='stop-color:%23764ba2'/></linearGradient></defs><rect width='100%' height='100%' fill='url(%23grad)' rx='8'/><text x='200' y='30' text-anchor='middle' fill='white' font-family='monospace' font-size='14' font-weight='bold'>🚀 ADVANCED LOGGER</text><text x='200' y='50' text-anchor='middle' fill='white' font-family='monospace' font-size='12'>State-of-the-art Console Styling</text><text x='200' y='65' text-anchor='middle' fill='white' font-family='monospace' font-size='10'>v2.0.0</text></svg>\");\n background-repeat: no-repeat;\n background-size: 400px 80px;\n padding: 40px 200px;\n color: transparent;\n display: inline-block;\n border-radius: 8px;\n "},animated:{text:" 🚀 ADVANCED LOGGER v2.0.0 ",style:"\n background: linear-gradient(-45deg, #667eea, #764ba2, #667eea, #764ba2);\n background-size: 400% 400%;\n color: white;\n padding: 15px 25px;\n border-radius: 10px;\n font-weight: bold;\n font-size: 14px;\n font-family: monospace;\n animation: gradientShift 3s ease infinite;\n display: inline-block;\n "}},r={default:{simple:"🚀 ADVANCED LOGGER v2.0.0 - State-of-the-art Console Styling 🚀",style:"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 20px; border-radius: 8px; font-weight: bold;"},dark:{simple:"🌙 ADVANCED LOGGER v2.0.0 - Dark Mode Console Excellence 🌙",style:"background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); color: #e2e8f0; padding: 12px 20px; border-radius: 8px; font-weight: bold; border: 1px solid #4a5568;"},neon:{simple:"⚡ ADVANCED LOGGER v2.0.0 - Cyberpunk Console Experience ⚡",style:"background: linear-gradient(135deg, #0f3460 0%, #e94560 100%); color: #00ffff; padding: 12px 20px; border-radius: 8px; font-weight: bold; text-shadow: 0 0 10px #00ffff;"},minimal:{simple:"ADVANCED LOGGER v2.0.0 - Clean Console Styling",style:"background: #f7fafc; color: #2d3748; padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 4px; font-weight: 500;"},light:{simple:"☀️ ADVANCED LOGGER v2.0.0 - Bright Console Styling ☀️",style:"background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); color: #495057; padding: 12px 20px; border-radius: 8px; font-weight: bold; border: 1px solid #dee2e6;"},cyberpunk:{simple:"🤖 ADVANCED LOGGER v2.0.0 - Neural Console Interface 🤖",style:"background: linear-gradient(135deg, #0d1b2a 0%, #415a77 100%); color: #00d4aa; padding: 12px 20px; border-radius: 8px; font-weight: bold; text-shadow: 0 0 10px #00d4aa; border: 1px solid #00d4aa;"}};function displayInitBanner(e){const t=e||function(){const e=navigator.userAgent,t=/Chrome/.test(e),o=/Firefox/.test(e),r=/Safari/.test(e)&&!/Chrome/.test(e),s=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;return"undefined"!=typeof document&&"animationName"in document.createElement("div").style&&t?"animated":s&&(t||o)?"svg":t||o?"unicode":r?"ascii":"simple"}(),r=o[t];if("animated"===t){const e=document.createElement("style");e.textContent="\n @keyframes gradientShift {\n 0% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n 100% { background-position: 0% 50%; }\n }\n ",document.head.appendChild(e)}console.log(`%c${r.text}`,r.style),console.group("%c✨ Features","background: #f8f9fa; color: #495057; padding: 4px 8px; border-radius: 4px; font-weight: bold;"),["🎨 Advanced CSS Console Styling","📍 Automatic Stack Trace Parsing","🔧 Scoped Loggers & Prefixes","⚡ Performance Timers","🎯 Verbosity Filtering","🔌 Extensible Handlers","📱 Modern TypeScript Patterns","📤 Export & Clipboard Support"].forEach(e=>{console.log(`%c${e}`,"color: #6c757d; font-size: 13px;")}),console.groupEnd(),console.log("")}class BaseStyler{builder;constructor(t=new e.StyleBuilder){this.builder=t}primary(){return this.color("#007bff")}secondary(){return this.color("#6c757d")}accent(){return this.color("#17a2b8")}muted(){return this.color(e.getAdaptiveColor({light:"#6c757d",dark:"#a0aec0"}))}success(){return this.color("#28a745")}warning(){return this.color("#ffc107")}danger(){return this.color("#dc3545")}mono(){return this.builder.font('Monaco, Consolas, "Courier New", monospace'),this}system(){return this.builder.font('system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'),this}readable(){return this.builder.font('Georgia, "Times New Roman", serif'),this}compact(){return this.builder.padding("1px 4px").margin("0 1px"),this}spacious(){return this.builder.padding("6px 12px").margin("2px 4px"),this}inline(){return this.builder.display("inline-block"),this}glassmorphic(){return this.builder.css("backdrop-filter","blur(10px)").css("background","rgba(255, 255, 255, 0.1)").border("1px solid rgba(255, 255, 255, 0.2)").rounded("8px"),this}neon(){const e="#00ffff";return this.builder.color(e).border(`1px solid ${e}`).shadow(`0 0 10px ${e}, 0 0 20px ${e}`).css("text-shadow",`0 0 5px ${e}`),this}gradient(e="#667eea",t="#764ba2"){return this.builder.bg(`linear-gradient(135deg, ${e} 0%, ${t} 100%)`),this}bold(){return this.builder.bold(),this}color(e){return this.builder.color(e),this}build(){return this.builder.build()}}class TimestampStyler extends BaseStyler{default(){return this.muted().mono(),this.builder.size("11px"),this}hidden(){return this.builder.display("none"),this}minimal(){return this.muted().mono(),this.builder.size("10px").opacity(.7),this}size(e){return this.builder.size(e),this}}class LevelStyler extends BaseStyler{badge(){return this.builder.padding("2px 8px").rounded("4px").bold().color("#ffffff"),this}glowing(){return this.neon().badge()}flat(){return this.builder.padding("1px 6px").rounded("2px").border("1px solid currentColor").css("background","transparent"),this}uppercase(){return this.builder.uppercase(),this}}class PrefixStyler extends BaseStyler{dark(){return this.builder.bg(e.getAdaptiveColor({light:"#2d3748",dark:"#4a5568"})).color(e.getAdaptiveColor({light:"#e2e8f0",dark:"#f7fafc"})).padding("2px 6px").rounded("3px").bold().mono().size("11px"),this}light(){return this.builder.bg("#f8f9fa").color("#495057").padding("2px 6px").rounded("3px").bold().mono().size("11px").border("1px solid #dee2e6"),this}compact(){return this.builder.padding("1px 4px").size("10px").rounded("2px"),this}}class MessageStyler extends BaseStyler{readable(){return this.builder.color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.messageText)).system().size("14px"),this}code(){return this.builder.mono().size("13px").color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.messageText)).bg("rgba(0, 0, 0, 0.05)").padding("1px 4px").rounded("3px"),this}large(){return this.builder.size("16px").color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.messageText)),this}}class LocationStyler extends BaseStyler{subtle(){return this.builder.color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.location)).mono().size("11px").opacity(.7),this}hidden(){return this.builder.display("none"),this}clickable(){return this.subtle(),this.builder.css("text-decoration","underline").cursor("pointer"),this}}class LogStyleBuilder{logStyles={};logger;constructor(e){this.logger=e}timestamp(){return new TimestampStyleBuilderProxy(this)}level(){return new LevelStyleBuilderProxy(this)}prefix(){return new PrefixStyleBuilderProxy(this)}message(){return new MessageStyleBuilderProxy(this)}location(){return new LocationStyleBuilderProxy(this)}usePreset(e){return console.warn(`Preset '${e}' will be available in next implementation phase`),this}customize(e){return this.logStyles={...this.logStyles,...e},this}spacing(e){switch(this.logStyles.layout?this.logStyles.layout.spacing=e:this.logStyles.layout={spacing:e},e){case"compact":this.logStyles.layout.innerPadding="1px",this.logStyles.layout.outerMargin="0px";break;case"spacious":this.logStyles.layout.innerPadding="4px",this.logStyles.layout.outerMargin="2px";break;default:this.logStyles.layout.innerPadding="2px",this.logStyles.layout.outerMargin="1px"}return this}backdrop(e){return this.logStyles.backdrop=e,this}transparency(e){return this.logStyles.transparency=Math.max(0,Math.min(1,e)),this}apply(){this.logger._customLogStyles=this.logStyles,console.log("Applied log styles:",this.logStyles)}getConfig(){return{...this.logStyles}}_updatePartConfig(e,t){"layout"!==e&&"backdrop"!==e&&"transparency"!==e&&(this.logStyles[e]||(this.logStyles[e]={}),this.logStyles[e].style=t)}}class PartStyleBuilderProxy{parentBuilder;partName;constructor(e,t){this.parentBuilder=e,this.partName=t}and(){return this.parentBuilder}apply(){this.parentBuilder.apply()}applyStyles(e){const t=e.build();return this.parentBuilder._updatePartConfig(this.partName,t),this}}class TimestampStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"timestamp")}default(){return this.applyStyles((new TimestampStyler).default())}hidden(){return this.applyStyles((new TimestampStyler).hidden())}minimal(){return this.applyStyles((new TimestampStyler).minimal())}muted(){return this.applyStyles((new TimestampStyler).muted())}mono(){return this.applyStyles((new TimestampStyler).mono())}compact(){return this.applyStyles((new TimestampStyler).compact())}}class LevelStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"level")}badge(){return this.applyStyles((new LevelStyler).badge())}gradient(e,t){return this.applyStyles((new LevelStyler).gradient(e,t))}glowing(){return this.applyStyles((new LevelStyler).glowing())}flat(){return this.applyStyles((new LevelStyler).flat())}bold(){return this.applyStyles((new LevelStyler).bold())}uppercase(){return this.applyStyles((new LevelStyler).uppercase())}neon(){return this.applyStyles((new LevelStyler).neon())}}class PrefixStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"prefix")}dark(){return this.applyStyles((new PrefixStyler).dark())}light(){return this.applyStyles((new PrefixStyler).light())}compact(){return this.applyStyles((new PrefixStyler).compact())}muted(){return this.applyStyles((new PrefixStyler).muted())}mono(){return this.applyStyles((new PrefixStyler).mono())}}class MessageStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"message")}readable(){return this.applyStyles((new MessageStyler).readable())}code(){return this.applyStyles((new MessageStyler).code())}large(){return this.applyStyles((new MessageStyler).large())}system(){return this.applyStyles((new MessageStyler).system())}mono(){return this.applyStyles((new MessageStyler).mono())}}class LocationStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"location")}subtle(){return this.applyStyles((new LocationStyler).subtle())}hidden(){return this.applyStyles((new LocationStyler).hidden())}clickable(){return this.applyStyles((new LocationStyler).clickable())}muted(){return this.applyStyles((new LocationStyler).muted())}mono(){return this.applyStyles((new LocationStyler).mono())}}const s={default:{layout:{spacing:"normal",innerPadding:"2px",outerMargin:"1px"},timestamp:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"11px"},level:{show:!0,style:"badge",uppercase:!1,padding:"2px 8px"},prefix:{show:!0,style:"dark",padding:"2px 6px"},message:{show:!0,color:"auto",font:"system-ui, -apple-system, sans-serif",size:"14px"},location:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"11px"}},cyberpunk:{layout:{spacing:"compact",innerPadding:"1px",outerMargin:"0px"},timestamp:{show:!0,color:"#00ffff",font:"Monaco, Consolas, monospace",size:"10px",style:"neon"},level:{show:!0,style:"glowing",uppercase:!0,padding:"2px 8px"},prefix:{show:!0,color:"#ff0080",background:"rgba(255, 0, 128, 0.1)",border:"1px solid #ff0080",style:"neon"},message:{show:!0,color:"#00ff41",font:"Monaco, Consolas, monospace",size:"13px"},location:{show:!1},backdrop:"blur(2px)",transparency:.9},glassmorphism:{layout:{spacing:"spacious",innerPadding:"4px",outerMargin:"2px"},timestamp:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"11px",style:"glassmorphic"},level:{show:!0,style:"glassmorphic",uppercase:!1,padding:"4px 12px"},prefix:{show:!0,style:"glassmorphic",padding:"3px 8px"},message:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"14px"},location:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"11px",style:"glassmorphic"},backdrop:"blur(10px)",transparency:.8},minimal:{layout:{spacing:"compact",innerPadding:"0px",outerMargin:"0px"},timestamp:{show:!1},level:{show:!0,style:"flat",uppercase:!0,padding:"0px 4px",border:"none",background:"transparent"},prefix:{show:!0,style:"flat",padding:"0px 4px",border:"none",background:"transparent"},message:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"14px"},location:{show:!1}},debug:{layout:{spacing:"compact",innerPadding:"1px",outerMargin:"0px"},timestamp:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"10px"},level:{show:!0,style:"compact",uppercase:!0,padding:"1px 4px",font:"Monaco, Consolas, monospace",size:"10px"},prefix:{show:!0,style:"compact",padding:"1px 4px",font:"Monaco, Consolas, monospace",size:"10px"},message:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"12px"},location:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"10px",style:"clickable"}},production:{layout:{spacing:"normal",innerPadding:"2px",outerMargin:"1px"},timestamp:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"11px"},level:{show:!0,style:"badge",uppercase:!1,padding:"2px 6px"},prefix:{show:!1},message:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"14px"},location:{show:!1}}};function getAvailablePresets(){return Object.keys(s)}function hasPreset(e){return e in s}class ExportLogHandler{buffer=[];maxSize;groupDepth=0;currentGroup;constructor(t=e.BUFFER_LIMITS.DEFAULT_SIZE){this.maxSize=Math.min(Math.max(t,e.BUFFER_LIMITS.MIN_SIZE),e.BUFFER_LIMITS.MAX_SIZE)}handle(t,o,r,s){const n={id:e.generateLogId(),timestamp:s.timestamp,level:t,prefix:s.prefix,message:o,args:r,location:s.stackInfo,groupInfo:this.groupDepth>0?{depth:this.groupDepth,groupName:this.currentGroup}:void 0};this.buffer.push(n),this.buffer.length>this.maxSize&&this.buffer.shift()}setGroupInfo(e,t){this.groupDepth=e,this.currentGroup=t}getBufferStats(){const e=this.buffer.reduce((e,t)=>{const o=e[t.level]?e[t.level]:0;return e[t.level]=o+1,e},{});let t,o;if(this.buffer.length>0){const e=this.buffer[0],r=this.buffer[this.buffer.length-1];e&&e.timestamp&&(t=new Date(e.timestamp)),r&&r.timestamp&&(o=new Date(r.timestamp))}return{size:this.buffer.length,maxSize:this.maxSize,usage:this.buffer.length/this.maxSize*100,oldestLog:t,newestLog:o,levelCounts:{debug:e.debug?e.debug:0,info:e.info?e.info:0,warn:e.warn?e.warn:0,error:e.error?e.error:0,critical:e.critical?e.critical:0}}}clearBuffer(){this.buffer=[]}setBufferSize(t){this.maxSize=Math.min(Math.max(t,e.BUFFER_LIMITS.MIN_SIZE),e.BUFFER_LIMITS.MAX_SIZE),this.buffer.length>this.maxSize&&(this.buffer=this.buffer.slice(-this.maxSize))}filterLogs(t={}){let o=[...this.buffer];if(t.levels?.length&&(o=o.filter(e=>t.levels.includes(e.level))),t.prefixes?.length&&(o=o.filter(e=>e.prefix&&t.prefixes.includes(e.prefix))),t.excludePrefixes?.length&&(o=o.filter(e=>!e.prefix||!t.excludePrefixes.includes(e.prefix))),t.since){const r=e.parseTimeInput(t.since);o=o.filter(e=>new Date(e.timestamp)>=r)}if(t.until){const r=e.parseTimeInput(t.until);o=o.filter(e=>new Date(e.timestamp)<=r)}if(t.withStackTrace&&(o=o.filter(e=>e.location)),t.errorsOnly&&(o=o.filter(e=>"error"===e.level||"critical"===e.level)),t.search){const e=t.search.toLowerCase();o=o.filter(t=>t.message.toLowerCase().includes(e)||t.args.some(t=>String(t).toLowerCase().includes(e)))}return t.last&&(o=o.slice(-t.last)),t.first&&(o=o.slice(0,t.first)),o}exportJSON(e,t){const o=e.map(e=>({timestamp:e.timestamp,level:e.level,prefix:e.prefix,message:e.message,...t.minimal?{}:{args:e.args.slice(1),location:e.location,groupInfo:e.groupInfo}}));return t.compact?JSON.stringify(o):JSON.stringify(o,null,2)}exportCSV(t,o){const r=o.minimal?["Timestamp","Level","Prefix","Message"]:["Timestamp","Level","Prefix","Message","File","Line","Args"],s=t.map(t=>{const r=[e.formatDisplayTime(new Date(t.timestamp),"full"),t.level.toUpperCase(),t.prefix||"",`"${t.message.replace(/"/g,'""')}"`];return o.minimal||r.push(t.location?.file||"",t.location?.line?.toString()||"",`"${e.safeStringify(t.args.slice(1)).replace(/"/g,'""')}"`),r});return[r.join(","),...s.map(e=>e.join(","))].join("\n")}exportMarkdown(t,o){const r=/* @__PURE__ */new Date;let s=`# Log Export - ${e.formatDisplayTime(r,"full")}\n\n`;if(!o.minimal){const e=this.getBufferStats();s+="## Summary\n",s+=`- **Total logs**: ${t.length}\n`,s+=`- **Errors**: ${e.levelCounts.error+e.levelCounts.critical}\n`,s+=`- **Warnings**: ${e.levelCounts.warn}\n\n`}if("level"===o.groupBy){const o=t.reduce((e,t)=>{const o=t.level;e[o]||(e[o]=[]);const r=e[o];return r&&r.push(t),e},{});Object.entries(o).forEach(([t,o])=>{const r=this.getLevelEmoji(t);s+=`## ${r} ${t.toUpperCase()} (${o.length})\n\n`,o.forEach(t=>{const o=e.formatDisplayTime(new Date(t.timestamp),"time-only"),r=t.location?` (${t.location.file}:${t.location.line})`:"",n=t.prefix?` **${t.prefix}**:`:"";s+=`- \`${o}\`${n} ${t.message}${r}\n`}),s+="\n"})}else s+="## Logs\n\n",t.forEach(t=>{const o=e.formatDisplayTime(new Date(t.timestamp),"time-only"),r=this.getLevelEmoji(t.level),n=t.location?` (${t.location.file}:${t.location.line})`:"",a=t.prefix?` **${t.prefix}**:`:"";s+=`- \`${o}\` ${r}${a} ${t.message}${n}\n`});return s}exportPlain(t,o){return t.map(t=>{const r=e.formatDisplayTime(new Date(t.timestamp),o.minimal?"time-only":"short"),s=t.level.toUpperCase().padEnd(8),n=t.prefix?`[${t.prefix}] `:"",a=!o.minimal&&t.location?` (${t.location.file}:${t.location.line})`:"";return`${r} ${s} ${n}${t.message}${a}`}).join("\n")}exportHTML(t,o){const r=`Log Export - ${e.formatDisplayTime(/* @__PURE__ */new Date,"full")}`;let s=`<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>${r}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 20px; line-height: 1.6; }\n .header { border-bottom: 2px solid #ddd; padding-bottom: 20px; margin-bottom: 20px; }\n .log-entry { margin: 5px 0; padding: 8px; border-radius: 4px; font-family: 'Monaco', 'Consolas', monospace; }\n .timestamp { color: #666; font-size: 0.9em; }\n .level { font-weight: bold; padding: 2px 6px; border-radius: 3px; margin: 0 8px; }\n .prefix { background: #2d3748; color: #e2e8f0; padding: 2px 6px; border-radius: 3px; margin: 0 8px; }\n .location { color: #718096; font-size: 0.9em; }\n .debug { background: #f0f4ff; }\n .info { background: #f0f9ff; }\n .warn { background: #fffbeb; }\n .error { background: #fef2f2; }\n .critical { background: #fef2f2; border-left: 4px solid #dc2626; }\n .level.debug { background: #667eea; color: white; }\n .level.info { background: #74b9ff; color: white; }\n .level.warn { background: #fdcb6e; color: #2d3436; }\n .level.error { background: #e84393; color: white; }\n .level.critical { background: #ff3838; color: white; }\n </style>\n</head>\n<body>\n <div class="header">\n <h1>${r}</h1>\n <p>Generated by Advanced Logger v2.0.0</p>\n </div>\n <div class="logs">`;return t.forEach(t=>{const o=e.formatDisplayTime(new Date(t.timestamp),"full"),r=t.location?` <span class="location">(${e.escapeHtml(t.location.file)}:${t.location.line})</span>`:"",n=t.prefix?` <span class="prefix">${e.escapeHtml(t.prefix)}</span>`:"";s+=`\n <div class="log-entry ${t.level}">\n <span class="timestamp">${o}</span>\n <span class="level ${t.level}">${t.level.toUpperCase()}</span>\n ${n}\n <span class="message">${e.escapeHtml(t.message)}</span>\n ${r}\n </div>`}),s+="\n </div>\n</body>\n</html>",s}getLevelEmoji(e){return{debug:"🐞",info:"ℹ️",warn:"⚠️",error:"❌",critical:"🔥"}[e]||""}export(e,t={},o={}){const r=this.filterLogs(t);let s;switch(e){case"json":s=this.exportJSON(r,o);break;case"csv":s=this.exportCSV(r,o);break;case"markdown":s=this.exportMarkdown(r,o);break;case"plain":s=this.exportPlain(r,o);break;case"html":s=this.exportHTML(r,o);break;default:throw new Error(`Unsupported export format: ${e}`)}return{format:e,data:s,metadata:{totalLogs:this.buffer.length,filteredLogs:r.length,exportedAt:/* @__PURE__ */(new Date).toISOString(),filters:t,options:o}}}async copyToClipboard(e,t={},o={}){const r=this.export(e,t,o);try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(r.data),!0;{const e=document.createElement("textarea");e.value=r.data,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.focus(),e.select();const t=document.execCommand("copy");return document.body.removeChild(e),t}}catch(s){return console.error("Failed to copy to clipboard:",s),!1}}getAllLogs(){return[...this.buffer]}async saveToFile(e,t={},o={}){try{const r=this.export(e,t,o),s=new Blob([r.data],{type:this.getMimeType(e)}),n=URL.createObjectURL(s),a=document.createElement("a"),i=this.generateFilename(e,t);return a.href=n,a.download=i,a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n),!0}catch(r){return console.error("Failed to save file:",r),!1}}getMimeType(e){return{json:"application/json",csv:"text/csv",markdown:"text/markdown",plain:"text/plain",html:"text/html"}[e]||"text/plain"}generateFilename(e,t){const o=/* @__PURE__ */(new Date).toISOString().replace(/[:.]/g,"-").slice(0,-5);return`logs${1===t.prefixes?.length?`_${t.prefixes[0]}`:""}_${o}.${"markdown"===e?"md":e}`}async streamToEndpoint(e,t={},o={}){try{const r=this.filterLogs(t),s=o.batchSize||100,n=o.format||"json";for(let t=0;t<r.length;t+=s){const a=r.slice(t,t+s),i=(this.export(n,{},{compact:!0}),{"Content-Type":"application/json"});o.apiKey&&(i.Authorization=`Bearer ${o.apiKey}`);const l=await fetch(e,{method:"POST",headers:i,body:JSON.stringify({logs:a,metadata:{batchIndex:Math.floor(t/s),totalBatches:Math.ceil(r.length/s),timestamp:/* @__PURE__ */(new Date).toISOString()}})});if(!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`)}return!0}catch(r){return console.error("Failed to stream logs:",r),!1}}exportWithMetadata(e,t={},o={}){const r=this.export(e,t,o),s=this.getBufferStats();return{...r,metadata:{...r.metadata,bufferStats:s,performance:{memoryUsage:this.estimateMemoryUsage(),processingTime:Date.now()},system:{userAgent:"undefined"!=typeof navigator?navigator.userAgent:"Node.js",timestamp:/* @__PURE__ */(new Date).toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}}}}estimateMemoryUsage(){const e=this.buffer[0];return e?JSON.stringify(e).length*this.buffer.length:0}}class CommandProcessor{commands=/* @__PURE__ */new Map;aliases=/* @__PURE__ */new Map;plugins=/* @__PURE__ */new Map;history=[];maxHistorySize=100;isInteractiveMode=!1;registerCommand(e){if(this.commands.set(e.name,e),e.aliases)for(const t of e.aliases)this.aliases.set(t,e.name)}registerPlugin(e,t){if(this.plugins.has(e.name))throw new Error(`Plugin ${e.name} is already registered`);this.plugins.set(e.name,e);for(const o of e.commands)this.registerCommand(o);e.initialize&&t&&e.initialize(this,t)}unregisterPlugin(e){const t=this.plugins.get(e);if(t){for(const e of t.commands)if(this.commands.delete(e.name),e.aliases)for(const t of e.aliases)this.aliases.delete(t);t.cleanup&&t.cleanup(),this.plugins.delete(e)}}getCommands(){return Array.from(this.commands.values())}getCommand(e){let t=this.commands.get(e);if(t)return t;const o=this.aliases.get(e);return o?this.commands.get(o):void 0}getHistory(){return[...this.history]}clearHistory(){this.history=[]}getPlugins(){return Array.from(this.plugins.values())}enterInteractiveMode(e){this.isInteractiveMode=!0,e.info("🔧 Interactive CLI mode activated. Type /exit to quit, /help for commands."),"undefined"!=typeof window&&this.setupBrowserInteractiveMode(e)}exitInteractiveMode(){this.isInteractiveMode=!1}setupBrowserInteractiveMode(e){window.cli=t=>this.processCommand(`/${t}`,e),e.info('💡 Use cli("command") to execute CLI commands in browser console.')}async processCommand(e,t){if(!e.startsWith("/"))return t.error("Invalid command. Commands must start with /"),void this.addToHistory(e,!1);const o=e.slice(1).split(" "),r=o[0]||"",s=o.slice(1).join(" "),n=this.getCommand(r);if(!n){t.error(`Unknown command: ${r}. Type /help for available commands.`);const o=this.getSuggestions(r);return o.length>0&&t.info(`📋 Did you mean: ${o.slice(0,3).join(", ")}?`),void this.addToHistory(e,!1)}try{await n.execute(s||"",t),this.addToHistory(e,!0)}catch(a){t.error(`Command '${r}' failed:`,a),this.addToHistory(e,!1)}}addToHistory(e,t){this.history.unshift({command:e,timestamp:/* @__PURE__ */new Date,success:t}),this.history.length>this.maxHistorySize&&(this.history=this.history.slice(0,this.maxHistorySize))}getSuggestions(e){return Array.from(this.commands.keys()).filter(t=>t.startsWith(e))}}class ConfigCommand{name="config";description="Show or update logger configuration";usage="/config [json|key=value,...]";execute(e,t){if(e)try{if(e.startsWith("{")){const o=JSON.parse(e);this.applyConfig(o,t)}else{const o=e.split(",").map(e=>e.trim().split("=")),r={};o.forEach(([e,t])=>{e&&t&&(r[e.trim()]=t.trim().replace(/["']/g,""))}),this.applyConfig(r,t)}}catch(o){t.error("Invalid config format. Use JSON or key=value pairs:",o),t.info('Examples: /config {"theme":"dark"} or /config theme=neon,verbosity=debug')}else this.showStatus(t)}showStatus(e){const t={theme:e.getConfig().theme||"default",verbosity:e.getConfig().verbosity,colors:e.getConfig().enableColors,timestamps:e.getConfig().enableTimestamps,stackTrace:e.getConfig().enableStackTrace,globalPrefix:e.getConfig().globalPrefix||"none",bannerType:e.getConfig().bannerType||"simple",handlers:e.getHandlers().length};e.group("⚙️ Logger Configuration"),e.table(t),e.groupEnd()}applyConfig(e,t){const o=["theme","verbosity","enableColors","enableTimestamps","enableStackTrace","globalPrefix","bannerType"],r=[];Object.entries(e).forEach(([e,s])=>{o.includes(e)?"theme"===e&&"string"==typeof s?(t.setTheme(s),r.push(`${e}=${s}`)):"bannerType"===e&&"string"==typeof s?(t.setBannerType(s),r.push(`${e}=${s}`)):"verbosity"===e?(t.setVerbosity(s),r.push(`${e}=${s}`)):"globalPrefix"===e?(t.setGlobalPrefix(s),r.push(`${e}=${s}`)):(t.updateConfig({[e]:s}),r.push(`${e}=${s}`)):t.warn(`Invalid config key: ${e}`)}),r.length>0&&t.success(`Configuration updated: ${r.join(", ")}`)}}class ThemesCommand{name="themes";description="Show available theme presets";usage="/themes";execute(o,r){r.group("🎨 Available Themes"),Object.keys(t).forEach(o=>{const r=t[o],s=(new e.StyleBuilder).bg(r.info.background).color(r.info.color).padding("4px 8px").rounded("4px").border(r.info.border).build();console.log(`%c${o}`,s,`- ${o} theme preview`)}),r.groupEnd()}}class BannersCommand{name="banners";description="Show available banner types";usage="/banners";execute(e,t){t.group("🖼️ Available Banner Types"),Object.keys(o).forEach(e=>{const t=o[e];console.log(`%c${e}`,"font-weight: bold; color: #667eea;"),console.log("%cPreview:","color: #666; font-size: 12px;"),"simple"===e?console.log(`%c${t.text}`,t.style):"ascii"===e?console.log(`%c${t.text.split("\n").slice(1,4).join("\n")}...`,"font-family: monospace; color: #667eea; font-size: 10px;"):"unicode"===e?console.log(`%c${t.text}`,t.style):console.log(`%c${e} banner`,"color: #666; font-style: italic;")}),t.groupEnd()}}class BannerCommand{name="banner";description="Change or show current banner type";usage="/banner [type]";execute(e,t){e?e in o?(t.setBannerType(e),t.showBanner()):t.error(`Invalid banner type: ${e}. Available: ${Object.keys(o).join(", ")}`):t.showBanner()}}class StatusCommand{name="status";description="Show current logger status and configuration";usage="/status";execute(e,t){const o=t.getConfig(),r={theme:o.theme?o.theme:"default",verbosity:o.verbosity,colors:o.enableColors,timestamps:o.enableTimestamps,stackTrace:o.enableStackTrace,globalPrefix:o.globalPrefix?o.globalPrefix:"none",bannerType:o.bannerType?o.bannerType:"simple",handlers:t.getHandlers().length,bufferSize:o.bufferSize?o.bufferSize:1e3};t.group("⚙️ Logger Configuration"),t.table(r),t.groupEnd();const s=t.getExportHandler();if(s){const e=s.getBufferStats();t.group("📊 Buffer Statistics"),t.table({size:`${e.size}/${e.maxSize}`,usage:`${e.usage.toFixed(1)}%`,oldestLog:e.oldestLog?e.oldestLog.toISOString():"None",newestLog:e.newestLog?e.newestLog.toISOString():"None",errorCount:e.levelCounts.error+e.levelCounts.critical,warningCount:e.levelCounts.warn}),t.groupEnd()}}}class ResetCommand{name="reset";description="Reset logger configuration to defaults";usage="/reset";execute(e,t){t.resetConfig()}}class DemoCommand{name="demo";description="Show comprehensive feature demonstration";usage="/demo";execute(e,t){t.group("🎪 Advanced Logger Demo"),t.debug("Debug message with detailed information"),t.info("Informational message about system state"),t.warn("Warning about deprecated feature"),t.error("Error processing user request"),t.success("Operation completed successfully"),t.critical("Critical system failure detected"),t.group("📊 Advanced Features Demo"),t.table([{feature:"Styled Console",status:"✅ Active",performance:"Excellent"},{feature:"Theme System",status:"✅ Active",performance:"Great"},{feature:"CLI Interface",status:"✅ Active",performance:"Good"},{feature:"Export System",status:"✅ Active",performance:"Excellent"}]),t.time("demo-operation"),setTimeout(()=>{t.timeEnd("demo-operation")},100),t.logWithSVG("SVG Demo"),t.logAnimated("🌟 Animated Logger Demo 🌟",2),t.groupEnd(),t.groupEnd(),t.info("Demo completed! Check the console for styled output.")}}function parseArguments(t){const o={},r={};let s;if(!t.trim())return{filters:o,options:r};const n=t.match(/(?:[^\s"]+|"[^"]*")+/g)||[];for(let a=0;a<n.length;a++){const t=n[a];if(t)if(0!==a||t.startsWith("--")||!(t in e.EXPORT_FORMATS)){if(t.startsWith("--")){const[e,s]=t.slice(2).split("=");switch(e){case"level":case"levels":s&&(o.levels=s.split(",").map(e=>e.trim()));break;case"since":s&&(o.since=s);break;case"until":s&&(o.until=s);break;case"prefix":case"prefixes":s&&(o.prefixes=s.split(",").map(e=>e.trim()));break;case"exclude-prefix":case"exclude-prefixes":s&&(o.excludePrefixes=s.split(",").map(e=>e.trim()));break;case"last":s&&(o.last=parseInt(s,10));break;case"first":s&&(o.first=parseInt(s,10));break;case"search":s&&(o.search=s.replace(/['"]/g,""));break;case"with-stack":o.withStackTrace=!0;break;case"errors-only":o.errorsOnly=!0;break;case"group-by":s&&(o.groupBy=s,r.groupBy=s);break;case"minimal":r.minimal=!0;break;case"compact":r.compact=!0;break;case"styled":r.styled=!0}}}else s=t}return{filters:o,options:r,format:s}}class ExportCommand{name="export";description="Export logs to various formats";usage="/export <format> [--filter=value] [--option]";execute(t,o){const r=o.getExportHandler();if(!r)return void o.error("Export handler not available. Make sure ExportLogHandler is registered.");const{filters:s,options:n,format:a}=parseArguments(t);if(!a)return o.error("Format required. Available formats: "+Object.keys(e.EXPORT_FORMATS).join(", ")),o.info("Usage: /export <format> [--filter=value]"),void o.info("Example: /export json --level=error,warn --last=50");try{const e=r.export(a,s,n);o.success(`✅ Export completed: ${e.metadata.filteredLogs} logs exported in ${a} format`),e.data.length<1e3?(o.group(`📄 Preview (${a.toUpperCase()})`),console.log(e.data),o.groupEnd()):o.info(`📄 Export size: ${(e.data.length/1024).toFixed(2)}KB`),o.table({format:e.format,totalLogs:e.metadata.totalLogs,filtered:e.metadata.filteredLogs,exported:e.metadata.exportedAt})}catch(i){o.error("Export failed:",i)}}}class CopyCommand{name="copy";description="Copy logs to clipboard";usage="/copy <format> [--filter=value] [--option]";async execute(t,o){const r=o.getExportHandler();if(!r)return void o.error("Export handler not available. Make sure ExportLogHandler is registered.");const{filters:s,options:n,format:a}=parseArguments(t);if(!a)return o.error("Format required. Available formats: "+Object.keys(e.EXPORT_FORMATS).join(", ")),o.info("Usage: /copy <format> [--filter=value]"),void o.info("Example: /copy plain --level=error --last=25");try{if(await r.copyToClipboard(a,s,n)){const e=r.export(a,s,n);o.success(`📋 Copied ${e.metadata.filteredLogs} logs to clipboard (${a} format)`)}else o.error("Failed to copy to clipboard. Browser may not support clipboard API.")}catch(i){o.error("Copy failed:",i)}}}class BufferSizeCommand{name="buffer-size";description="Set log buffer size";usage="/buffer-size <size>";execute(e,t){const o=t.getExportHandler();if(!o)return void t.error("Export handler not available.");const r=parseInt(e.trim(),10);if(isNaN(r)||r<=0)return t.error("Invalid buffer size. Must be a positive number."),void t.info("Example: /buffer-size 2000");o.setBufferSize(r),t.success(`Buffer size set to ${r}`)}}class ClearBufferCommand{name="clear-buffer";description="Clear the log buffer";usage="/clear-buffer";execute(e,t){const o=t.getExportHandler();if(!o)return void t.error("Export handler not available.");const r=o.getBufferStats();o.clearBuffer(),t.success(`✅ Buffer cleared. Removed ${r.size} log entries.`)}}class BufferInfoCommand{name="buffer-info";description="Show buffer statistics and information";usage="/buffer-info";execute(e,t){const o=t.getExportHandler();if(!o)return void t.error("Export handler not available.");const r=o.getBufferStats();t.group("📊 Buffer Information"),t.table({size:`${r.size}/${r.maxSize}`,usage:`${r.usage.toFixed(1)}%`,oldestLog:r.oldestLog?.toLocaleString()||"None",newestLog:r.newestLog?.toLocaleString()||"None"}),t.group("📈 Log Level Counts"),t.table(r.levelCounts),t.groupEnd(),t.groupEnd()}}class HelpCommand{name="help";description="Show CLI help and available commands";usage="/help [command]";execute(t,o){const r=(new e.StyleBuilder).bg("linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)").color("#495057").padding("15px 20px").rounded("8px").border("1px solid #dee2e6").font("Monaco, Consolas, monospace").size("13px").build();console.log('%c\n╭─────────────── ADVANCED LOGGER CLI COMMANDS ─────────────────╮\n│ │\n│ CONFIGURATION │\n│ /config Show current configuration │\n│ /config {json} Apply JSON configuration │\n│ /config key=val Apply key-value configuration │\n│ /themes Show available themes │\n│ /banners Show available banner types │\n│ /banner [type] Change/show banner type │\n│ /status Show logger status & buffer stats │\n│ /demo Show feature demonstration │\n│ /reset Reset to default configuration │\n│ │\n│ EXPORT & CLIPBOARD │\n│ /export <format> Export logs (json|csv|md|plain|html) │\n│ /copy <format> Copy logs to clipboard │\n│ /buffer-size N Set log buffer size │\n│ /buffer-info Show buffer statistics │\n│ /clear-buffer Clear stored logs │\n│ │\n│ EXPORT FILTERS (for export/copy commands) │\n│ --level error,warn Filter by log levels │\n│ --since 2h Logs from last 2 hours │\n│ --until 1h Logs until 1 hour ago │\n│ --prefix API,DB Filter by prefixes │\n│ --exclude-prefix INT Exclude prefixes │\n│ --last 50 Last 50 logs only │\n│ --first 25 First 25 logs only │\n│ --search "error" Search in log messages │\n│ --with-stack Only logs with stack traces │\n│ --errors-only Only error + critical logs │\n│ --group-by level Group by level/prefix/hour │\n│ │\n│ EXPORT OPTIONS │\n│ --minimal Minimal output format │\n│ --compact Remove extra whitespace │\n│ --styled Include styling (HTML format) │\n│ │\n├──────────────────── CONFIGURATION OPTIONS ─────────────────┤\n│ │\n│ theme: default | dark | light | neon | minimal | cyberpunk│\n│ bannerType: simple | ascii | unicode | svg | animated │\n│ verbosity: debug | info | warn | error | critical | silent│\n│ enableColors: true | false │\n│ enableTimestamps: true | false │\n│ enableStackTrace: true | false │\n│ globalPrefix: "string" │\n│ bufferSize: number (50-10000) │\n│ │\n├──────────────────────── EXAMPLES ──────────────────────────┤\n│ │\n│ Basic Configuration: │\n│ /config {"theme":"dark","verbosity":"debug"} │\n│ /config theme=neon,bufferSize=2000 │\n│ /banner animated Change to animated banner │\n│ │\n│ Export Examples: │\n│ /export json --level=error,warn --last=25 │\n│ /export csv --since=2h --prefix=API │\n│ /export markdown --group-by=level --errors-only │\n│ /export html --styled --since=1h │\n│ │\n│ Clipboard Examples: │\n│ /copy plain --minimal --last=10 │\n│ /copy json --search="authentication" --compact │\n│ /copy csv --since=30m --exclude-prefix=DEBUG │\n│ │\n│ Buffer Management: │\n│ /buffer-size 5000 Increase buffer to 5000 logs │\n│ /buffer-info Show detailed buffer statistics │\n│ /clear-buffer Clear all stored logs │\n│ │\n│ Time Formats: │\n│ --since=2h 2 hours ago │\n│ --since=30m 30 minutes ago │\n│ --since=1d 1 day ago │\n│ --since="2024-01-01T10:00:00Z" Specific ISO date │\n│ │\n╰─────────────────────────────────────────────────────────────╯',r),o.group("💡 Quick Tips"),["Use /demo to see all logger features in action","Logs are automatically stored in a circular buffer for export","Export formats: JSON (structured), CSV (Excel), Markdown (readable), Plain (simple), HTML (styled)","Time filters support relative (2h, 30m) and absolute (ISO) formats",'Combine multiple filters: /export json --level=error --since=1h --search="auth"',"Use /copy for quick clipboard access instead of /export"].forEach(e=>{o.info(`• ${e}`)}),o.groupEnd()}}class HistoryCommand{name="history";description="Show command execution history";usage="/history [limit] - Show recent commands (default: 10)";category="system";aliases=["hist","h"];execute(e,t){const o=t.cliProcessor;if(!o)return void t.error("CLI processor not available");const r=parseInt(e)||10,s=o.getHistory().slice(0,r);0!==s.length?(t.info(`📋 Last ${s.length} commands:`),s.forEach((e,o)=>{const r=e.success?"✅":"❌",s=e.timestamp.toLocaleTimeString();t.info(`${r} [${s}] ${e.command}`)})):t.info("📝 No command history available")}}class ClearHistoryCommand{name="clearhistory";description="Clear command execution history";usage="/clearhistory - Remove all command history";category="system";aliases=["clrhist"];execute(e,t){const o=t.cliProcessor;o?(o.clearHistory(),t.success("🗑️ Command history cleared")):t.error("CLI processor not available")}}class InteractiveCommand{name="interactive";description="Enter interactive CLI mode";usage="/interactive - Start interactive command mode";category="system";aliases=["i","repl"];execute(e,t){const o=t.cliProcessor;o?o.enterInteractiveMode(t):t.error("CLI processor not available")}}class PluginsCommand{name="plugins";description="List loaded CLI plugins";usage="/plugins - Show all registered plugins";category="system";aliases=["plug"];execute(e,t){const o=t.cliProcessor;if(!o)return void t.error("CLI processor not available");const r=o.getPlugins();0!==r.length?(t.info(`🔌 Loaded plugins (${r.length}):`),r.forEach(e=>{t.info(` 📦 ${e.name} v${e.version} - ${e.description}`),t.info(` Commands: ${e.commands.map(e=>e.name).join(", ")}`)})):t.info("🔌 No plugins registered")}}let n=t.default;class Logger{config;scopedPrefix;handlers=[];timers=/* @__PURE__ */new Map;groupDepth=0;exportHandler;cliProcessor;themeChangeListener;displaySettings={showTimestamp:!0,showLocation:!0,showBadges:!0};constructor(t={}){this.config={...e.DEFAULT_CONFIG,...t},this.config.bufferSize&&(this.exportHandler=new ExportLogHandler(this.config.bufferSize),this.handlers.push(this.exportHandler)),this.cliProcessor=function(){const e=new CommandProcessor;return e.registerCommand(new HelpCommand),e.registerCommand(new ConfigCommand),e.registerCommand(new ThemesCommand),e.registerCommand(new BannersCommand),e.registerCommand(new BannerCommand),e.registerCommand(new StatusCommand),e.registerCommand(new ResetCommand),e.registerCommand(new DemoCommand),e.registerCommand(new ExportCommand),e.registerCommand(new CopyCommand),e.registerCommand(new BufferSizeCommand),e.registerCommand(new ClearBufferCommand),e.registerCommand(new BufferInfoCommand),e.registerCommand(new HistoryCommand),e.registerCommand(new ClearHistoryCommand),e.registerCommand(new InteractiveCommand),e.registerCommand(new PluginsCommand),e}(),this.config.autoDetectTheme&&this.setupAutoThemeDetection()}setupAutoThemeDetection(){this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null),this.themeChangeListener=e.setupThemeChangeListener(e=>{this.debug(`DevTools theme changed to: ${e}`)})}getConfig(){return{...this.config}}updateConfig(e){const t=this.config.autoDetectTheme;this.config={...this.config,...e},void 0!==e.autoDetectTheme&&e.autoDetectTheme!==t&&(e.autoDetectTheme?this.setupAutoThemeDetection():this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null))}setGlobalPrefix(e){this.config.globalPrefix=e}setVerbosity(e){this.config.verbosity=e}setTheme(e){if(hasPreset(e))this.preset(e);else if(e in t){if(n=t[e],this.config.theme=e,e in r){const t=r[e];console.log(`%c${t.simple}`,t.style)}this.success(`Theme changed to: ${e}`)}else this.error(`Invalid theme: ${e}. Available:`,[...getAvailablePresets(),...Object.keys(t)])}setBannerType(e){this.config.bannerType=e,this.success(`Banner type changed to: ${e}`)}resetConfig(){this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null),this.config={...e.DEFAULT_CONFIG},n=t.default,this.config.autoDetectTheme&&this.setupAutoThemeDetection(),this.success("Logger configuration reset to defaults")}cleanup(){this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null)}preset(e){if(!hasPreset(e))return void this.error(`Unknown preset: ${e}. Available presets:`,getAvailablePresets());const t=function(e){return s[e]||null}(e);t&&(this.displaySettings.showTimestamp=t.timestamp?.show??!0,this.displaySettings.showLocation=t.location?.show??!0,this._activePreset=t,this._activePresetName=e,this.success(`Applied preset: ${e}`))}presets(){return getAvailablePresets()}hideTimestamp(){this.displaySettings.showTimestamp=!1,this.success("Timestamp hidden")}showTimestamp(){this.displaySettings.showTimestamp=!0,this.success("Timestamp shown")}hideLocation(){this.displaySettings.showLocation=!1,this.success("Location info hidden")}showLocation(){this.displaySettings.showLocation=!0,this.success("Location info shown")}hideBadges(){this.displaySettings.showBadges=!1,this.success("Badges hidden")}showBadges(){this.displaySettings.showBadges=!0,this.success("Badges shown")}component(e){const{ComponentLogger:t}=require("./ScopedLogger.js");return new t(this,e)}api(e){const{APILogger:t}=require("./ScopedLogger.js");return new t(this,e)}scope(e){const{ScopedLogger:t}=require("./ScopedLogger.js");return new t(this,e)}customize(e){void 0!==e.timestamp?.show&&(this.displaySettings.showTimestamp=e.timestamp.show),void 0!==e.location?.show&&(this.displaySettings.showLocation=e.location.show),e.prefix,this._customization=e,this.success("Customization applied")}styles(){return new LogStyleBuilder(this)}addHandler(e){this.handlers.push(e)}getHandlers(){return[...this.handlers]}getExportHandler(){return this.exportHandler}shouldLog(e){if("silent"===this.config.verbosity)return!1;const t={debug:0,info:1,warn:2,error:3,critical:4};return t[e]>=t[this.config.verbosity]}getEffectivePrefix(){const e=[this.config.globalPrefix,this.scopedPrefix].filter(Boolean);return e.length>0?e.join(":"):void 0}log(t,...o){if(!this.shouldLog(t))return;const r=this.config.enableStackTrace?e.parseStackTrace():null,s=this.getEffectivePrefix(),a=o.length>0?String(o[0]):"",i=o.slice(1),[l,...c]=e.createStyledOutput(t,n,s,a,this.displaySettings.showLocation?r:null,this.config.autoDetectTheme),d=" ".repeat(this.groupDepth)+l;i.length>0?console.log(d,...c,...i):console.log(d,...c),this.exportHandler&&this.exportHandler.setGroupInfo(this.groupDepth);const p={timestamp:e.formatTimestamp(),level:t,prefix:s,stackInfo:r||void 0};this.handlers.forEach(e=>{try{e.handle(t,a,o,p)}catch(r){console.error("Log handler failed:",r)}})}debug(...e){this.log("debug",...e)}info(...e){this.log("info",...e)}warn(...e){this.log("warn",...e)}error(...e){this.log("error",...e)}success(...t){if(!this.shouldLog("info"))return;const o=this.config.enableStackTrace?e.parseStackTrace():null,r=this.getEffectivePrefix(),s=t.length>0?String(t[0]):"",a=t.slice(1),[i,...l]=e.createStyledOutput("info",n,r,s,this.displaySettings.showLocation?o:null,this.config.autoDetectTheme),c=n.success;let d="✅",p="SUCCESS";c&&(c.emoji&&(d=c.emoji),c.label&&(p=c.label));const g=i.replace(/ℹ️ INFO/,`${d} ${p}`),f=" ".repeat(this.groupDepth)+g;a.length>0?console.log(f,...l,...a):console.log(f,...l);const u={timestamp:e.formatTimestamp(),level:"info",prefix:r,stackInfo:o||void 0};this.handlers.forEach(e=>{try{e.handle("info",s,t,u)}catch(o){console.error("Log handler failed:",o)}})}trace(...e){this.log("debug",...e),this.shouldLog("debug")&&console.trace(...e)}critical(...e){this.log("critical",...e)}table(t,o){if(!this.shouldLog("info"))return;const r=this.getEffectivePrefix(),s=e.StylePresets.accent().build(),n="%c📊 TABLE"+(r?` [${r}]`:"");console.log(n,s),o?console.table(t,o):console.table(t)}group(t,o=!1){const r=(new e.StyleBuilder).bg("linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)").color("#1565c0").border("1px solid #90caf9").padding("4px 12px").rounded("6px").bold().build(),s=`%c📁 ${t}`;o?console.groupCollapsed(s,r):console.group(s,r),this.groupDepth++}groupEnd(){this.groupDepth>0&&(console.groupEnd(),this.groupDepth--)}time(t){const o={label:t,startTime:performance.now()};this.timers.set(t,o);const r=e.StylePresets.warning().build();console.log(`%c⏱️ Timer started: ${t}`,r)}timeEnd(t){const o=this.timers.get(t);if(!o)return void this.warn(`Timer '${t}' does not exist`);const r=performance.now()-o.startTime;this.timers.delete(t);const s=e.StylePresets.success().build();console.log(`%c⏱️ Timer ended: ${t} - ${r.toFixed(2)}ms`,s)}showBanner(e){displayInitBanner(e||this.config.bannerType)}logWithSVG(t,o,r={}){const{width:s=300,height:n=60,padding:a="30px 150px"}=r;let i="";i=o?`data:image/svg+xml,${encodeURIComponent(o)}`:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${s} ${n}'><defs><linearGradient id='grad' x1='0%' y1='0%' x2='100%' y2='0%'><stop offset='0%' style='stop-color:%23667eea'/><stop offset='100%' style='stop-color:%23764ba2'/></linearGradient></defs><rect width='100%' height='100%' fill='url(%23grad)' rx='4'/><text x='${s/2}' y='${n/2+5}' text-anchor='middle' fill='white' font-family='monospace' font-size='14' font-weight='bold'>${t}</text></svg>`)}`;const l=(new e.StyleBuilder).bg(`url("${i}") no-repeat center center`).padding(a).color("transparent").rounded("4px").build();console.log(`%c${t}`,l)}logAnimated(t,o=3){if(!document.getElementById("logger-animations")){const e=document.createElement("style");e.id="logger-animations",e.textContent="\n @keyframes loggerGradient {\n 0% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n 100% { background-position: 0% 50%; }\n }\n ",document.head.appendChild(e)}const r=(new e.StyleBuilder).bg("linear-gradient(-45deg, #667eea, #764ba2, #667eea, #764ba2)").css("background-size","400% 400%").color("#ffffff").padding("12px 20px").rounded("8px").bold().font("Monaco, Consolas, monospace").animation(`loggerGradient ${o}s ease infinite`).display("inline-block").build();console.log(`%c${t}`,r)}logGrouped(e,t){try{let o;o=Object.groupBy?Object.groupBy(e,t):e.reduce((e,o)=>{const r=t(o);return e[r]||(e[r]=[]),e[r].push(o),e},{}),Object.entries(o).forEach(([e,t])=>{this.group(`Group: ${e}`),this.table(t),this.groupEnd()})}catch{this.info("Grouped data:",e)}}async cli(e){this.cliProcessor?await this.cliProcessor.processCommand(e,this):this.error("CLI processor not initialized")}}new Logger({verbosity:"info",enableColors:!0,enableTimestamps:!0,enableStackTrace:!0,bufferSize:1e3}),displayInitBanner(),exports.BANNER_VARIANTS=o,exports.ExportLogHandler=ExportLogHandler,exports.Logger=Logger,exports.THEME_BANNERS=r,exports.THEME_PRESETS=t,exports.displayInitBanner=displayInitBanner;
2
- //# sourceMappingURL=Logger-D_p3xnbq.js.map
1
+ "use strict";const e=require("./environment-5I5unY89.js"),t={default:{debug:{emoji:"🐞",label:"DEBUG",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"#ffffff",border:"1px solid #667eea",shadow:"0 2px 4px rgba(102, 126, 234, 0.3)"},info:{emoji:"ℹ️",label:"INFO",background:"linear-gradient(135deg, #74b9ff 0%, #0984e3 100%)",color:"#ffffff",border:"1px solid #74b9ff",shadow:"0 2px 4px rgba(116, 185, 255, 0.3)"},warn:{emoji:"⚠️",label:"WARN",background:"linear-gradient(135deg, #fdcb6e 0%, #e17055 100%)",color:"#2d3436",border:"1px solid #fdcb6e",shadow:"0 2px 4px rgba(253, 203, 110, 0.3)"},error:{emoji:"❌",label:"ERROR",background:"linear-gradient(135deg, #e84393 0%, #d63031 100%)",color:"#ffffff",border:"1px solid #e84393",shadow:"0 2px 4px rgba(232, 67, 147, 0.3)"},success:{emoji:"✅",label:"SUCCESS",background:"linear-gradient(135deg, #00b894 0%, #00a085 100%)",color:"#ffffff",border:"1px solid #00b894",shadow:"0 2px 4px rgba(0, 184, 148, 0.3)"},critical:{emoji:"🔥",label:"CRITICAL",background:"linear-gradient(135deg, #ff3838 0%, #ff1744 100%)",color:"#ffffff",border:"2px solid #ff3838",shadow:"0 4px 8px rgba(255, 56, 56, 0.5)"}},dark:{debug:{emoji:"🌙",label:"DEBUG",background:"linear-gradient(135deg, #2d3748 0%, #4a5568 100%)",color:"#e2e8f0",border:"1px solid #4a5568",shadow:"0 2px 4px rgba(45, 55, 72, 0.8)"},info:{emoji:"💡",label:"INFO",background:"linear-gradient(135deg, #1a202c 0%, #2d3748 100%)",color:"#90cdf4",border:"1px solid #3182ce",shadow:"0 2px 4px rgba(26, 32, 44, 0.8)"},warn:{emoji:"⚡",label:"WARN",background:"linear-gradient(135deg, #744210 0%, #975a16 100%)",color:"#faf089",border:"1px solid #d69e2e",shadow:"0 2px 4px rgba(116, 66, 16, 0.8)"},error:{emoji:"💀",label:"ERROR",background:"linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%)",color:"#feb2b2",border:"1px solid #e53e3e",shadow:"0 2px 4px rgba(116, 42, 42, 0.8)"},success:{emoji:"🎯",label:"SUCCESS",background:"linear-gradient(135deg, #276749 0%, #2f855a 100%)",color:"#9ae6b4",border:"1px solid #38a169",shadow:"0 2px 4px rgba(39, 103, 73, 0.8)"},critical:{emoji:"💥",label:"CRITICAL",background:"linear-gradient(135deg, #1a1a1a 0%, #ff0000 100%)",color:"#ffffff",border:"2px solid #ff0000",shadow:"0 4px 8px rgba(255, 0, 0, 0.9)"}},neon:{debug:{emoji:"⚡",label:"DEBUG",background:"linear-gradient(135deg, #0f3460 0%, #e94560 100%)",color:"#00ffff",border:"1px solid #00ffff",shadow:"0 0 10px rgba(0, 255, 255, 0.5)"},info:{emoji:"🔮",label:"INFO",background:"linear-gradient(135deg, #16213e 0%, #0f3460 100%)",color:"#00ff41",border:"1px solid #00ff41",shadow:"0 0 10px rgba(0, 255, 65, 0.5)"},warn:{emoji:"⚠️",label:"WARN",background:"linear-gradient(135deg, #533a03 0%, #e94560 100%)",color:"#ffff00",border:"1px solid #ffff00",shadow:"0 0 10px rgba(255, 255, 0, 0.5)"},error:{emoji:"💥",label:"ERROR",background:"linear-gradient(135deg, #5c0a0a 0%, #ff073a 100%)",color:"#ff073a",border:"1px solid #ff073a",shadow:"0 0 10px rgba(255, 7, 58, 0.8)"},success:{emoji:"✨",label:"SUCCESS",background:"linear-gradient(135deg, #0a5c0a 0%, #39ff14 100%)",color:"#39ff14",border:"1px solid #39ff14",shadow:"0 0 10px rgba(57, 255, 20, 0.8)"},critical:{emoji:"🌟",label:"CRITICAL",background:"linear-gradient(135deg, #000000 0%, #ff0080 100%)",color:"#ff0080",border:"2px solid #ff0080",shadow:"0 0 20px rgba(255, 0, 128, 1)"}},minimal:{debug:{emoji:"",label:"DEBUG",background:"#f7fafc",color:"#4a5568",border:"1px solid #e2e8f0",shadow:"none"},info:{emoji:"",label:"INFO",background:"#ebf8ff",color:"#2b6cb0",border:"1px solid #bee3f8",shadow:"none"},warn:{emoji:"",label:"WARN",background:"#fffbf0",color:"#c05621",border:"1px solid #fed7aa",shadow:"none"},error:{emoji:"",label:"ERROR",background:"#fef5f5",color:"#c53030",border:"1px solid #fca5a5",shadow:"none"},success:{emoji:"",label:"SUCCESS",background:"#f0fff4",color:"#2f855a",border:"1px solid #9ae6b4",shadow:"none"},critical:{emoji:"",label:"CRITICAL",background:"#fef5f5",color:"#e53e3e",border:"2px solid #f56565",shadow:"none"}},light:{debug:{emoji:"🔍",label:"DEBUG",background:"linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)",color:"#1565c0",border:"1px solid #90caf9",shadow:"0 1px 3px rgba(33, 150, 243, 0.2)"},info:{emoji:"ℹ️",label:"INFO",background:"linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%)",color:"#7b1fa2",border:"1px solid #ce93d8",shadow:"0 1px 3px rgba(156, 39, 176, 0.2)"},warn:{emoji:"⚠️",label:"WARN",background:"linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)",color:"#f57c00",border:"1px solid #ffcc02",shadow:"0 1px 3px rgba(255, 152, 0, 0.2)"},error:{emoji:"❌",label:"ERROR",background:"linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%)",color:"#d32f2f",border:"1px solid #f44336",shadow:"0 1px 3px rgba(244, 67, 54, 0.2)"},success:{emoji:"✅",label:"SUCCESS",background:"linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%)",color:"#388e3c",border:"1px solid #4caf50",shadow:"0 1px 3px rgba(76, 175, 80, 0.2)"},critical:{emoji:"🚨",label:"CRITICAL",background:"linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%)",color:"#c2185b",border:"2px solid #e91e63",shadow:"0 2px 6px rgba(233, 30, 99, 0.3)"}},cyberpunk:{debug:{emoji:"🤖",label:"DEBUG",background:"linear-gradient(135deg, #0d1b2a 0%, #415a77 100%)",color:"#00d4aa",border:"1px solid #00d4aa",shadow:"0 0 15px rgba(0, 212, 170, 0.4)"},info:{emoji:"🔗",label:"INFO",background:"linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%)",color:"#00b4d8",border:"1px solid #00b4d8",shadow:"0 0 15px rgba(0, 180, 216, 0.4)"},warn:{emoji:"⚡",label:"WARN",background:"linear-gradient(135deg, #f72585 0%, #b5179e 100%)",color:"#ffff3f",border:"1px solid #ffff3f",shadow:"0 0 15px rgba(255, 255, 63, 0.4)"},error:{emoji:"💀",label:"ERROR",background:"linear-gradient(135deg, #7209b7 0%, #480ca8 100%)",color:"#ff006e",border:"1px solid #ff006e",shadow:"0 0 15px rgba(255, 0, 110, 0.6)"},success:{emoji:"⚡",label:"SUCCESS",background:"linear-gradient(135deg, #003566 0%, #001d3d 100%)",color:"#00f5ff",border:"1px solid #00f5ff",shadow:"0 0 15px rgba(0, 245, 255, 0.4)"},critical:{emoji:"💥",label:"CRITICAL",background:"linear-gradient(135deg, #000000 0%, #ff0040 100%)",color:"#ff0040",border:"2px solid #ff0040",shadow:"0 0 25px rgba(255, 0, 64, 0.8)"}}},o={simple:{text:"🚀 ADVANCED LOGGER v2.0.0 - State-of-the-art Console Styling 🚀",style:"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 20px; border-radius: 8px; font-weight: bold; font-size: 14px;"},ascii:{text:"\n ___ ____ _ __ ___ _ __ _____ _____ ____ __ ___ _____ _____ _____ ____ \n / _ \\ / __ \\| | / / / _ \\ | \\ | |/ ____| ____| _ \\ | | / _ \\ / ____| ___| _ | _ \\ \n / /_\\ \\ / / _` | |/ / / /_\\ \\ | \\| | | | |__ | | | | | | / / \\ \\| | __| |_ | |_| | |_) |\n | _ || | (_| | < | _ | | . ` | | | __| | | | | | | | | | | | |_ | _| | /| _ < \n | | | |\\ \\__,_|_|\\_\\ | | | | | |\\ | |___| |____| |_| | | |__\\ \\_/ /| |__| | |___| |\\ \\| |_) |\n \\_| |_/ \\____/ \\_| |_/ |_| \\_|\\_____|______|____/ |_____/\\___/ \\_____|_____|_| \\_|____/\n\n Advanced Logger v2.0.0 - Console Excellence",style:'font-family: "Courier New", Consolas, Monaco, monospace; color: #667eea; font-size: 11px; line-height: 1.2;'},unicode:{text:"\n╔══════════════════════════════════════════════════════════════════════════╗\n║ 🚀 ADVANCED LOGGER v2.0.0 ║\n║ State-of-the-art Console Styling ║ \n╚══════════════════════════════════════════════════════════════════════════╝",style:'font-family: "Courier New", Consolas, Monaco, monospace; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px; border-radius: 8px; font-size: 12px; line-height: 1.3;'},svg:{text:" ",style:"\n background-image: url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80'><defs><linearGradient id='grad' x1='0%' y1='0%' x2='100%' y2='0%'><stop offset='0%' style='stop-color:%23667eea'/><stop offset='100%' style='stop-color:%23764ba2'/></linearGradient></defs><rect width='100%' height='100%' fill='url(%23grad)' rx='8'/><text x='200' y='30' text-anchor='middle' fill='white' font-family='monospace' font-size='14' font-weight='bold'>🚀 ADVANCED LOGGER</text><text x='200' y='50' text-anchor='middle' fill='white' font-family='monospace' font-size='12'>State-of-the-art Console Styling</text><text x='200' y='65' text-anchor='middle' fill='white' font-family='monospace' font-size='10'>v2.0.0</text></svg>\");\n background-repeat: no-repeat;\n background-size: 400px 80px;\n padding: 40px 200px;\n color: transparent;\n display: inline-block;\n border-radius: 8px;\n "},animated:{text:" 🚀 ADVANCED LOGGER v2.0.0 ",style:"\n background: linear-gradient(-45deg, #667eea, #764ba2, #667eea, #764ba2);\n background-size: 400% 400%;\n color: white;\n padding: 15px 25px;\n border-radius: 10px;\n font-weight: bold;\n font-size: 14px;\n font-family: monospace;\n animation: gradientShift 3s ease infinite;\n display: inline-block;\n "}},r={default:{simple:"🚀 ADVANCED LOGGER v2.0.0 - State-of-the-art Console Styling 🚀",style:"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 20px; border-radius: 8px; font-weight: bold;"},dark:{simple:"🌙 ADVANCED LOGGER v2.0.0 - Dark Mode Console Excellence 🌙",style:"background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); color: #e2e8f0; padding: 12px 20px; border-radius: 8px; font-weight: bold; border: 1px solid #4a5568;"},neon:{simple:"⚡ ADVANCED LOGGER v2.0.0 - Cyberpunk Console Experience ⚡",style:"background: linear-gradient(135deg, #0f3460 0%, #e94560 100%); color: #00ffff; padding: 12px 20px; border-radius: 8px; font-weight: bold; text-shadow: 0 0 10px #00ffff;"},minimal:{simple:"ADVANCED LOGGER v2.0.0 - Clean Console Styling",style:"background: #f7fafc; color: #2d3748; padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 4px; font-weight: 500;"},light:{simple:"☀️ ADVANCED LOGGER v2.0.0 - Bright Console Styling ☀️",style:"background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); color: #495057; padding: 12px 20px; border-radius: 8px; font-weight: bold; border: 1px solid #dee2e6;"},cyberpunk:{simple:"🤖 ADVANCED LOGGER v2.0.0 - Neural Console Interface 🤖",style:"background: linear-gradient(135deg, #0d1b2a 0%, #415a77 100%); color: #00d4aa; padding: 12px 20px; border-radius: 8px; font-weight: bold; text-shadow: 0 0 10px #00d4aa; border: 1px solid #00d4aa;"}};function displayInitBanner(e){const t=e||function(){const e=navigator.userAgent,t=/Chrome/.test(e),o=/Firefox/.test(e),r=/Safari/.test(e)&&!/Chrome/.test(e),s=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;return"undefined"!=typeof document&&"animationName"in document.createElement("div").style&&t?"animated":s&&(t||o)?"svg":t||o?"unicode":r?"ascii":"simple"}(),r=o[t];if("animated"===t){const e=document.createElement("style");e.textContent="\n @keyframes gradientShift {\n 0% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n 100% { background-position: 0% 50%; }\n }\n ",document.head.appendChild(e)}console.log(`%c${r.text}`,r.style),console.group("%c✨ Features","background: #f8f9fa; color: #495057; padding: 4px 8px; border-radius: 4px; font-weight: bold;"),["🎨 Advanced CSS Console Styling","📍 Automatic Stack Trace Parsing","🔧 Scoped Loggers & Prefixes","⚡ Performance Timers","🎯 Verbosity Filtering","🔌 Extensible Handlers","📱 Modern TypeScript Patterns","📤 Export & Clipboard Support"].forEach(e=>{console.log(`%c${e}`,"color: #6c757d; font-size: 13px;")}),console.groupEnd(),console.log("")}class BaseStyler{builder;constructor(t=new e.StyleBuilder){this.builder=t}primary(){return this.color("#007bff")}secondary(){return this.color("#6c757d")}accent(){return this.color("#17a2b8")}muted(){return this.color(e.getAdaptiveColor({light:"#6c757d",dark:"#a0aec0"}))}success(){return this.color("#28a745")}warning(){return this.color("#ffc107")}danger(){return this.color("#dc3545")}mono(){return this.builder.font('Monaco, Consolas, "Courier New", monospace'),this}system(){return this.builder.font('system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'),this}readable(){return this.builder.font('Georgia, "Times New Roman", serif'),this}compact(){return this.builder.padding("1px 4px").margin("0 1px"),this}spacious(){return this.builder.padding("6px 12px").margin("2px 4px"),this}inline(){return this.builder.display("inline-block"),this}glassmorphic(){return this.builder.css("backdrop-filter","blur(10px)").css("background","rgba(255, 255, 255, 0.1)").border("1px solid rgba(255, 255, 255, 0.2)").rounded("8px"),this}neon(){const e="#00ffff";return this.builder.color(e).border(`1px solid ${e}`).shadow(`0 0 10px ${e}, 0 0 20px ${e}`).css("text-shadow",`0 0 5px ${e}`),this}gradient(e="#667eea",t="#764ba2"){return this.builder.bg(`linear-gradient(135deg, ${e} 0%, ${t} 100%)`),this}bold(){return this.builder.bold(),this}color(e){return this.builder.color(e),this}build(){return this.builder.build()}}class TimestampStyler extends BaseStyler{default(){return this.muted().mono(),this.builder.size("11px"),this}hidden(){return this.builder.display("none"),this}minimal(){return this.muted().mono(),this.builder.size("10px").opacity(.7),this}size(e){return this.builder.size(e),this}}class LevelStyler extends BaseStyler{badge(){return this.builder.padding("2px 8px").rounded("4px").bold().color("#ffffff"),this}glowing(){return this.neon().badge()}flat(){return this.builder.padding("1px 6px").rounded("2px").border("1px solid currentColor").css("background","transparent"),this}uppercase(){return this.builder.uppercase(),this}}class PrefixStyler extends BaseStyler{dark(){return this.builder.bg(e.getAdaptiveColor({light:"#2d3748",dark:"#4a5568"})).color(e.getAdaptiveColor({light:"#e2e8f0",dark:"#f7fafc"})).padding("2px 6px").rounded("3px").bold().mono().size("11px"),this}light(){return this.builder.bg("#f8f9fa").color("#495057").padding("2px 6px").rounded("3px").bold().mono().size("11px").border("1px solid #dee2e6"),this}compact(){return this.builder.padding("1px 4px").size("10px").rounded("2px"),this}}class MessageStyler extends BaseStyler{readable(){return this.builder.color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.messageText)).system().size("14px"),this}code(){return this.builder.mono().size("13px").color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.messageText)).bg("rgba(0, 0, 0, 0.05)").padding("1px 4px").rounded("3px"),this}large(){return this.builder.size("16px").color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.messageText)),this}}class LocationStyler extends BaseStyler{subtle(){return this.builder.color(e.getAdaptiveColor(e.ADAPTIVE_COLORS.location)).mono().size("11px").opacity(.7),this}hidden(){return this.builder.display("none"),this}clickable(){return this.subtle(),this.builder.css("text-decoration","underline").cursor("pointer"),this}}class LogStyleBuilder{logStyles={};logger;constructor(e){this.logger=e}timestamp(){return new TimestampStyleBuilderProxy(this)}level(){return new LevelStyleBuilderProxy(this)}prefix(){return new PrefixStyleBuilderProxy(this)}message(){return new MessageStyleBuilderProxy(this)}location(){return new LocationStyleBuilderProxy(this)}usePreset(e){return console.warn(`Preset '${e}' will be available in next implementation phase`),this}customize(e){return this.logStyles={...this.logStyles,...e},this}spacing(e){switch(this.logStyles.layout?this.logStyles.layout.spacing=e:this.logStyles.layout={spacing:e},e){case"compact":this.logStyles.layout.innerPadding="1px",this.logStyles.layout.outerMargin="0px";break;case"spacious":this.logStyles.layout.innerPadding="4px",this.logStyles.layout.outerMargin="2px";break;default:this.logStyles.layout.innerPadding="2px",this.logStyles.layout.outerMargin="1px"}return this}backdrop(e){return this.logStyles.backdrop=e,this}transparency(e){return this.logStyles.transparency=Math.max(0,Math.min(1,e)),this}apply(){this.logger._customLogStyles=this.logStyles,console.log("Applied log styles:",this.logStyles)}getConfig(){return{...this.logStyles}}_updatePartConfig(e,t){"layout"!==e&&"backdrop"!==e&&"transparency"!==e&&(this.logStyles[e]||(this.logStyles[e]={}),this.logStyles[e].style=t)}}class PartStyleBuilderProxy{parentBuilder;partName;constructor(e,t){this.parentBuilder=e,this.partName=t}and(){return this.parentBuilder}apply(){this.parentBuilder.apply()}applyStyles(e){const t=e.build();return this.parentBuilder._updatePartConfig(this.partName,t),this}}class TimestampStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"timestamp")}default(){return this.applyStyles((new TimestampStyler).default())}hidden(){return this.applyStyles((new TimestampStyler).hidden())}minimal(){return this.applyStyles((new TimestampStyler).minimal())}muted(){return this.applyStyles((new TimestampStyler).muted())}mono(){return this.applyStyles((new TimestampStyler).mono())}compact(){return this.applyStyles((new TimestampStyler).compact())}}class LevelStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"level")}badge(){return this.applyStyles((new LevelStyler).badge())}gradient(e,t){return this.applyStyles((new LevelStyler).gradient(e,t))}glowing(){return this.applyStyles((new LevelStyler).glowing())}flat(){return this.applyStyles((new LevelStyler).flat())}bold(){return this.applyStyles((new LevelStyler).bold())}uppercase(){return this.applyStyles((new LevelStyler).uppercase())}neon(){return this.applyStyles((new LevelStyler).neon())}}class PrefixStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"prefix")}dark(){return this.applyStyles((new PrefixStyler).dark())}light(){return this.applyStyles((new PrefixStyler).light())}compact(){return this.applyStyles((new PrefixStyler).compact())}muted(){return this.applyStyles((new PrefixStyler).muted())}mono(){return this.applyStyles((new PrefixStyler).mono())}}class MessageStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"message")}readable(){return this.applyStyles((new MessageStyler).readable())}code(){return this.applyStyles((new MessageStyler).code())}large(){return this.applyStyles((new MessageStyler).large())}system(){return this.applyStyles((new MessageStyler).system())}mono(){return this.applyStyles((new MessageStyler).mono())}}class LocationStyleBuilderProxy extends PartStyleBuilderProxy{constructor(e){super(e,"location")}subtle(){return this.applyStyles((new LocationStyler).subtle())}hidden(){return this.applyStyles((new LocationStyler).hidden())}clickable(){return this.applyStyles((new LocationStyler).clickable())}muted(){return this.applyStyles((new LocationStyler).muted())}mono(){return this.applyStyles((new LocationStyler).mono())}}const s={default:{layout:{spacing:"normal",innerPadding:"2px",outerMargin:"1px"},timestamp:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"11px"},level:{show:!0,style:"badge",uppercase:!1,padding:"2px 8px"},prefix:{show:!0,style:"dark",padding:"2px 6px"},message:{show:!0,color:"auto",font:"system-ui, -apple-system, sans-serif",size:"14px"},location:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"11px"}},cyberpunk:{layout:{spacing:"compact",innerPadding:"1px",outerMargin:"0px"},timestamp:{show:!0,color:"#00ffff",font:"Monaco, Consolas, monospace",size:"10px",style:"neon"},level:{show:!0,style:"glowing",uppercase:!0,padding:"2px 8px"},prefix:{show:!0,color:"#ff0080",background:"rgba(255, 0, 128, 0.1)",border:"1px solid #ff0080",style:"neon"},message:{show:!0,color:"#00ff41",font:"Monaco, Consolas, monospace",size:"13px"},location:{show:!1},backdrop:"blur(2px)",transparency:.9},glassmorphism:{layout:{spacing:"spacious",innerPadding:"4px",outerMargin:"2px"},timestamp:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"11px",style:"glassmorphic"},level:{show:!0,style:"glassmorphic",uppercase:!1,padding:"4px 12px"},prefix:{show:!0,style:"glassmorphic",padding:"3px 8px"},message:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"14px"},location:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"11px",style:"glassmorphic"},backdrop:"blur(10px)",transparency:.8},minimal:{layout:{spacing:"compact",innerPadding:"0px",outerMargin:"0px"},timestamp:{show:!1},level:{show:!0,style:"flat",uppercase:!0,padding:"0px 4px",border:"none",background:"transparent"},prefix:{show:!0,style:"flat",padding:"0px 4px",border:"none",background:"transparent"},message:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"14px"},location:{show:!1}},debug:{layout:{spacing:"compact",innerPadding:"1px",outerMargin:"0px"},timestamp:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"10px"},level:{show:!0,style:"compact",uppercase:!0,padding:"1px 4px",font:"Monaco, Consolas, monospace",size:"10px"},prefix:{show:!0,style:"compact",padding:"1px 4px",font:"Monaco, Consolas, monospace",size:"10px"},message:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"12px"},location:{show:!0,color:"auto",font:"Monaco, Consolas, monospace",size:"10px",style:"clickable"}},production:{layout:{spacing:"normal",innerPadding:"2px",outerMargin:"1px"},timestamp:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"11px"},level:{show:!0,style:"badge",uppercase:!1,padding:"2px 6px"},prefix:{show:!1},message:{show:!0,color:"auto",font:"system-ui, sans-serif",size:"14px"},location:{show:!1}}};function getAvailablePresets(){return Object.keys(s)}function hasPreset(e){return e in s}class ExportLogHandler{buffer=[];maxSize;groupDepth=0;currentGroup;constructor(t=e.BUFFER_LIMITS.DEFAULT_SIZE){this.maxSize=Math.min(Math.max(t,e.BUFFER_LIMITS.MIN_SIZE),e.BUFFER_LIMITS.MAX_SIZE)}handle(t,o,r,s){const n={id:e.generateLogId(),timestamp:s.timestamp,level:t,prefix:s.prefix,message:o,args:r,location:s.stackInfo,groupInfo:this.groupDepth>0?{depth:this.groupDepth,groupName:this.currentGroup}:void 0};this.buffer.push(n),this.buffer.length>this.maxSize&&this.buffer.shift()}setGroupInfo(e,t){this.groupDepth=e,this.currentGroup=t}getBufferStats(){const e=this.buffer.reduce((e,t)=>{const o=e[t.level]?e[t.level]:0;return e[t.level]=o+1,e},{});let t,o;if(this.buffer.length>0){const e=this.buffer[0],r=this.buffer[this.buffer.length-1];e&&e.timestamp&&(t=new Date(e.timestamp)),r&&r.timestamp&&(o=new Date(r.timestamp))}return{size:this.buffer.length,maxSize:this.maxSize,usage:this.buffer.length/this.maxSize*100,oldestLog:t,newestLog:o,levelCounts:{debug:e.debug?e.debug:0,info:e.info?e.info:0,warn:e.warn?e.warn:0,error:e.error?e.error:0,critical:e.critical?e.critical:0}}}clearBuffer(){this.buffer=[]}setBufferSize(t){this.maxSize=Math.min(Math.max(t,e.BUFFER_LIMITS.MIN_SIZE),e.BUFFER_LIMITS.MAX_SIZE),this.buffer.length>this.maxSize&&(this.buffer=this.buffer.slice(-this.maxSize))}filterLogs(t={}){let o=[...this.buffer];if(t.levels?.length&&(o=o.filter(e=>t.levels.includes(e.level))),t.prefixes?.length&&(o=o.filter(e=>e.prefix&&t.prefixes.includes(e.prefix))),t.excludePrefixes?.length&&(o=o.filter(e=>!e.prefix||!t.excludePrefixes.includes(e.prefix))),t.since){const r=e.parseTimeInput(t.since);o=o.filter(e=>new Date(e.timestamp)>=r)}if(t.until){const r=e.parseTimeInput(t.until);o=o.filter(e=>new Date(e.timestamp)<=r)}if(t.withStackTrace&&(o=o.filter(e=>e.location)),t.errorsOnly&&(o=o.filter(e=>"error"===e.level||"critical"===e.level)),t.search){const e=t.search.toLowerCase();o=o.filter(t=>t.message.toLowerCase().includes(e)||t.args.some(t=>String(t).toLowerCase().includes(e)))}return t.last&&(o=o.slice(-t.last)),t.first&&(o=o.slice(0,t.first)),o}exportJSON(e,t){const o=e.map(e=>({timestamp:e.timestamp,level:e.level,prefix:e.prefix,message:e.message,...t.minimal?{}:{args:e.args.slice(1),location:e.location,groupInfo:e.groupInfo}}));return t.compact?JSON.stringify(o):JSON.stringify(o,null,2)}exportCSV(t,o){const r=o.minimal?["Timestamp","Level","Prefix","Message"]:["Timestamp","Level","Prefix","Message","File","Line","Args"],s=t.map(t=>{const r=[e.formatDisplayTime(new Date(t.timestamp),"full"),t.level.toUpperCase(),t.prefix||"",`"${t.message.replace(/"/g,'""')}"`];return o.minimal||r.push(t.location?.file||"",t.location?.line?.toString()||"",`"${e.safeStringify(t.args.slice(1)).replace(/"/g,'""')}"`),r});return[r.join(","),...s.map(e=>e.join(","))].join("\n")}exportMarkdown(t,o){const r=/* @__PURE__ */new Date;let s=`# Log Export - ${e.formatDisplayTime(r,"full")}\n\n`;if(!o.minimal){const e=this.getBufferStats();s+="## Summary\n",s+=`- **Total logs**: ${t.length}\n`,s+=`- **Errors**: ${e.levelCounts.error+e.levelCounts.critical}\n`,s+=`- **Warnings**: ${e.levelCounts.warn}\n\n`}if("level"===o.groupBy){const o=t.reduce((e,t)=>{const o=t.level;e[o]||(e[o]=[]);const r=e[o];return r&&r.push(t),e},{});Object.entries(o).forEach(([t,o])=>{const r=this.getLevelEmoji(t);s+=`## ${r} ${t.toUpperCase()} (${o.length})\n\n`,o.forEach(t=>{const o=e.formatDisplayTime(new Date(t.timestamp),"time-only"),r=t.location?` (${t.location.file}:${t.location.line})`:"",n=t.prefix?` **${t.prefix}**:`:"";s+=`- \`${o}\`${n} ${t.message}${r}\n`}),s+="\n"})}else s+="## Logs\n\n",t.forEach(t=>{const o=e.formatDisplayTime(new Date(t.timestamp),"time-only"),r=this.getLevelEmoji(t.level),n=t.location?` (${t.location.file}:${t.location.line})`:"",a=t.prefix?` **${t.prefix}**:`:"";s+=`- \`${o}\` ${r}${a} ${t.message}${n}\n`});return s}exportPlain(t,o){return t.map(t=>{const r=e.formatDisplayTime(new Date(t.timestamp),o.minimal?"time-only":"short"),s=t.level.toUpperCase().padEnd(8),n=t.prefix?`[${t.prefix}] `:"",a=!o.minimal&&t.location?` (${t.location.file}:${t.location.line})`:"";return`${r} ${s} ${n}${t.message}${a}`}).join("\n")}exportHTML(t,o){const r=`Log Export - ${e.formatDisplayTime(/* @__PURE__ */new Date,"full")}`;let s=`<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>${r}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 20px; line-height: 1.6; }\n .header { border-bottom: 2px solid #ddd; padding-bottom: 20px; margin-bottom: 20px; }\n .log-entry { margin: 5px 0; padding: 8px; border-radius: 4px; font-family: 'Monaco', 'Consolas', monospace; }\n .timestamp { color: #666; font-size: 0.9em; }\n .level { font-weight: bold; padding: 2px 6px; border-radius: 3px; margin: 0 8px; }\n .prefix { background: #2d3748; color: #e2e8f0; padding: 2px 6px; border-radius: 3px; margin: 0 8px; }\n .location { color: #718096; font-size: 0.9em; }\n .debug { background: #f0f4ff; }\n .info { background: #f0f9ff; }\n .warn { background: #fffbeb; }\n .error { background: #fef2f2; }\n .critical { background: #fef2f2; border-left: 4px solid #dc2626; }\n .level.debug { background: #667eea; color: white; }\n .level.info { background: #74b9ff; color: white; }\n .level.warn { background: #fdcb6e; color: #2d3436; }\n .level.error { background: #e84393; color: white; }\n .level.critical { background: #ff3838; color: white; }\n </style>\n</head>\n<body>\n <div class="header">\n <h1>${r}</h1>\n <p>Generated by Advanced Logger v2.0.0</p>\n </div>\n <div class="logs">`;return t.forEach(t=>{const o=e.formatDisplayTime(new Date(t.timestamp),"full"),r=t.location?` <span class="location">(${e.escapeHtml(t.location.file)}:${t.location.line})</span>`:"",n=t.prefix?` <span class="prefix">${e.escapeHtml(t.prefix)}</span>`:"";s+=`\n <div class="log-entry ${t.level}">\n <span class="timestamp">${o}</span>\n <span class="level ${t.level}">${t.level.toUpperCase()}</span>\n ${n}\n <span class="message">${e.escapeHtml(t.message)}</span>\n ${r}\n </div>`}),s+="\n </div>\n</body>\n</html>",s}getLevelEmoji(e){return{debug:"🐞",info:"ℹ️",warn:"⚠️",error:"❌",critical:"🔥"}[e]||""}export(e,t={},o={}){const r=this.filterLogs(t);let s;switch(e){case"json":s=this.exportJSON(r,o);break;case"csv":s=this.exportCSV(r,o);break;case"markdown":s=this.exportMarkdown(r,o);break;case"plain":s=this.exportPlain(r,o);break;case"html":s=this.exportHTML(r,o);break;default:throw new Error(`Unsupported export format: ${e}`)}return{format:e,data:s,metadata:{totalLogs:this.buffer.length,filteredLogs:r.length,exportedAt:/* @__PURE__ */(new Date).toISOString(),filters:t,options:o}}}async copyToClipboard(e,t={},o={}){const r=this.export(e,t,o);try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(r.data),!0;{const e=document.createElement("textarea");e.value=r.data,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.focus(),e.select();const t=document.execCommand("copy");return document.body.removeChild(e),t}}catch(s){return console.error("Failed to copy to clipboard:",s),!1}}getAllLogs(){return[...this.buffer]}async saveToFile(e,t={},o={}){try{const r=this.export(e,t,o),s=new Blob([r.data],{type:this.getMimeType(e)}),n=URL.createObjectURL(s),a=document.createElement("a"),i=this.generateFilename(e,t);return a.href=n,a.download=i,a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n),!0}catch(r){return console.error("Failed to save file:",r),!1}}getMimeType(e){return{json:"application/json",csv:"text/csv",markdown:"text/markdown",plain:"text/plain",html:"text/html"}[e]||"text/plain"}generateFilename(e,t){const o=/* @__PURE__ */(new Date).toISOString().replace(/[:.]/g,"-").slice(0,-5);return`logs${1===t.prefixes?.length?`_${t.prefixes[0]}`:""}_${o}.${"markdown"===e?"md":e}`}async streamToEndpoint(e,t={},o={}){try{const r=this.filterLogs(t),s=o.batchSize||100,n=o.format||"json";for(let t=0;t<r.length;t+=s){const a=r.slice(t,t+s),i=(this.export(n,{},{compact:!0}),{"Content-Type":"application/json"});o.apiKey&&(i.Authorization=`Bearer ${o.apiKey}`);const l=await fetch(e,{method:"POST",headers:i,body:JSON.stringify({logs:a,metadata:{batchIndex:Math.floor(t/s),totalBatches:Math.ceil(r.length/s),timestamp:/* @__PURE__ */(new Date).toISOString()}})});if(!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`)}return!0}catch(r){return console.error("Failed to stream logs:",r),!1}}exportWithMetadata(e,t={},o={}){const r=this.export(e,t,o),s=this.getBufferStats();return{...r,metadata:{...r.metadata,bufferStats:s,performance:{memoryUsage:this.estimateMemoryUsage(),processingTime:Date.now()},system:{userAgent:"undefined"!=typeof navigator?navigator.userAgent:"Node.js",timestamp:/* @__PURE__ */(new Date).toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}}}}estimateMemoryUsage(){const e=this.buffer[0];return e?JSON.stringify(e).length*this.buffer.length:0}}class CommandProcessor{commands=/* @__PURE__ */new Map;aliases=/* @__PURE__ */new Map;plugins=/* @__PURE__ */new Map;history=[];maxHistorySize=100;isInteractiveMode=!1;registerCommand(e){if(this.commands.set(e.name,e),e.aliases)for(const t of e.aliases)this.aliases.set(t,e.name)}registerPlugin(e,t){if(this.plugins.has(e.name))throw new Error(`Plugin ${e.name} is already registered`);this.plugins.set(e.name,e);for(const o of e.commands)this.registerCommand(o);e.initialize&&t&&e.initialize(this,t)}unregisterPlugin(e){const t=this.plugins.get(e);if(t){for(const e of t.commands)if(this.commands.delete(e.name),e.aliases)for(const t of e.aliases)this.aliases.delete(t);t.cleanup&&t.cleanup(),this.plugins.delete(e)}}getCommands(){return Array.from(this.commands.values())}getCommand(e){let t=this.commands.get(e);if(t)return t;const o=this.aliases.get(e);return o?this.commands.get(o):void 0}getHistory(){return[...this.history]}clearHistory(){this.history=[]}getPlugins(){return Array.from(this.plugins.values())}enterInteractiveMode(e){this.isInteractiveMode=!0,e.info("🔧 Interactive CLI mode activated. Type /exit to quit, /help for commands."),"undefined"!=typeof window&&this.setupBrowserInteractiveMode(e)}exitInteractiveMode(){this.isInteractiveMode=!1}setupBrowserInteractiveMode(e){window.cli=t=>this.processCommand(`/${t}`,e),e.info('💡 Use cli("command") to execute CLI commands in browser console.')}async processCommand(e,t){if(!e.startsWith("/"))return t.error("Invalid command. Commands must start with /"),void this.addToHistory(e,!1);const o=e.slice(1).split(" "),r=o[0]||"",s=o.slice(1).join(" "),n=this.getCommand(r);if(!n){t.error(`Unknown command: ${r}. Type /help for available commands.`);const o=this.getSuggestions(r);return o.length>0&&t.info(`📋 Did you mean: ${o.slice(0,3).join(", ")}?`),void this.addToHistory(e,!1)}try{await n.execute(s||"",t),this.addToHistory(e,!0)}catch(a){t.error(`Command '${r}' failed:`,a),this.addToHistory(e,!1)}}addToHistory(e,t){this.history.unshift({command:e,timestamp:/* @__PURE__ */new Date,success:t}),this.history.length>this.maxHistorySize&&(this.history=this.history.slice(0,this.maxHistorySize))}getSuggestions(e){return Array.from(this.commands.keys()).filter(t=>t.startsWith(e))}}class ConfigCommand{name="config";description="Show or update logger configuration";usage="/config [json|key=value,...]";execute(e,t){if(e)try{if(e.startsWith("{")){const o=JSON.parse(e);this.applyConfig(o,t)}else{const o=e.split(",").map(e=>e.trim().split("=")),r={};o.forEach(([e,t])=>{e&&t&&(r[e.trim()]=t.trim().replace(/["']/g,""))}),this.applyConfig(r,t)}}catch(o){t.error("Invalid config format. Use JSON or key=value pairs:",o),t.info('Examples: /config {"theme":"dark"} or /config theme=neon,verbosity=debug')}else this.showStatus(t)}showStatus(e){const t={theme:e.getConfig().theme||"default",verbosity:e.getConfig().verbosity,colors:e.getConfig().enableColors,timestamps:e.getConfig().enableTimestamps,stackTrace:e.getConfig().enableStackTrace,globalPrefix:e.getConfig().globalPrefix||"none",bannerType:e.getConfig().bannerType||"simple",handlers:e.getHandlers().length};e.group("⚙️ Logger Configuration"),e.table(t),e.groupEnd()}applyConfig(e,t){const o=["theme","verbosity","enableColors","enableTimestamps","enableStackTrace","globalPrefix","bannerType"],r=[];Object.entries(e).forEach(([e,s])=>{o.includes(e)?"theme"===e&&"string"==typeof s?(t.setTheme(s),r.push(`${e}=${s}`)):"bannerType"===e&&"string"==typeof s?(t.setBannerType(s),r.push(`${e}=${s}`)):"verbosity"===e?(t.setVerbosity(s),r.push(`${e}=${s}`)):"globalPrefix"===e?(t.setGlobalPrefix(s),r.push(`${e}=${s}`)):(t.updateConfig({[e]:s}),r.push(`${e}=${s}`)):t.warn(`Invalid config key: ${e}`)}),r.length>0&&t.success(`Configuration updated: ${r.join(", ")}`)}}class ThemesCommand{name="themes";description="Show available theme presets";usage="/themes";execute(o,r){r.group("🎨 Available Themes"),Object.keys(t).forEach(o=>{const r=t[o],s=(new e.StyleBuilder).bg(r.info.background).color(r.info.color).padding("4px 8px").rounded("4px").border(r.info.border).build();console.log(`%c${o}`,s,`- ${o} theme preview`)}),r.groupEnd()}}class BannersCommand{name="banners";description="Show available banner types";usage="/banners";execute(e,t){t.group("🖼️ Available Banner Types"),Object.keys(o).forEach(e=>{const t=o[e];console.log(`%c${e}`,"font-weight: bold; color: #667eea;"),console.log("%cPreview:","color: #666; font-size: 12px;"),"simple"===e?console.log(`%c${t.text}`,t.style):"ascii"===e?console.log(`%c${t.text.split("\n").slice(1,4).join("\n")}...`,"font-family: monospace; color: #667eea; font-size: 10px;"):"unicode"===e?console.log(`%c${t.text}`,t.style):console.log(`%c${e} banner`,"color: #666; font-style: italic;")}),t.groupEnd()}}class BannerCommand{name="banner";description="Change or show current banner type";usage="/banner [type]";execute(e,t){e?e in o?(t.setBannerType(e),t.showBanner()):t.error(`Invalid banner type: ${e}. Available: ${Object.keys(o).join(", ")}`):t.showBanner()}}class StatusCommand{name="status";description="Show current logger status and configuration";usage="/status";execute(e,t){const o=t.getConfig(),r={theme:o.theme?o.theme:"default",verbosity:o.verbosity,colors:o.enableColors,timestamps:o.enableTimestamps,stackTrace:o.enableStackTrace,globalPrefix:o.globalPrefix?o.globalPrefix:"none",bannerType:o.bannerType?o.bannerType:"simple",handlers:t.getHandlers().length,bufferSize:o.bufferSize?o.bufferSize:1e3};t.group("⚙️ Logger Configuration"),t.table(r),t.groupEnd();const s=t.getExportHandler();if(s){const e=s.getBufferStats();t.group("📊 Buffer Statistics"),t.table({size:`${e.size}/${e.maxSize}`,usage:`${e.usage.toFixed(1)}%`,oldestLog:e.oldestLog?e.oldestLog.toISOString():"None",newestLog:e.newestLog?e.newestLog.toISOString():"None",errorCount:e.levelCounts.error+e.levelCounts.critical,warningCount:e.levelCounts.warn}),t.groupEnd()}}}class ResetCommand{name="reset";description="Reset logger configuration to defaults";usage="/reset";execute(e,t){t.resetConfig()}}class DemoCommand{name="demo";description="Show comprehensive feature demonstration";usage="/demo";execute(e,t){t.group("🎪 Advanced Logger Demo"),t.debug("Debug message with detailed information"),t.info("Informational message about system state"),t.warn("Warning about deprecated feature"),t.error("Error processing user request"),t.success("Operation completed successfully"),t.critical("Critical system failure detected"),t.group("📊 Advanced Features Demo"),t.table([{feature:"Styled Console",status:"✅ Active",performance:"Excellent"},{feature:"Theme System",status:"✅ Active",performance:"Great"},{feature:"CLI Interface",status:"✅ Active",performance:"Good"},{feature:"Export System",status:"✅ Active",performance:"Excellent"}]),t.time("demo-operation"),setTimeout(()=>{t.timeEnd("demo-operation")},100),t.logWithSVG("SVG Demo"),t.logAnimated("🌟 Animated Logger Demo 🌟",2),t.groupEnd(),t.groupEnd(),t.info("Demo completed! Check the console for styled output.")}}function parseArguments(t){const o={},r={};let s;if(!t.trim())return{filters:o,options:r};const n=t.match(/(?:[^\s"]+|"[^"]*")+/g)||[];for(let a=0;a<n.length;a++){const t=n[a];if(t)if(0!==a||t.startsWith("--")||!(t in e.EXPORT_FORMATS)){if(t.startsWith("--")){const[e,s]=t.slice(2).split("=");switch(e){case"level":case"levels":s&&(o.levels=s.split(",").map(e=>e.trim()));break;case"since":s&&(o.since=s);break;case"until":s&&(o.until=s);break;case"prefix":case"prefixes":s&&(o.prefixes=s.split(",").map(e=>e.trim()));break;case"exclude-prefix":case"exclude-prefixes":s&&(o.excludePrefixes=s.split(",").map(e=>e.trim()));break;case"last":s&&(o.last=parseInt(s,10));break;case"first":s&&(o.first=parseInt(s,10));break;case"search":s&&(o.search=s.replace(/['"]/g,""));break;case"with-stack":o.withStackTrace=!0;break;case"errors-only":o.errorsOnly=!0;break;case"group-by":s&&(o.groupBy=s,r.groupBy=s);break;case"minimal":r.minimal=!0;break;case"compact":r.compact=!0;break;case"styled":r.styled=!0}}}else s=t}return{filters:o,options:r,format:s}}class ExportCommand{name="export";description="Export logs to various formats";usage="/export <format> [--filter=value] [--option]";execute(t,o){const r=o.getExportHandler();if(!r)return void o.error("Export handler not available. Make sure ExportLogHandler is registered.");const{filters:s,options:n,format:a}=parseArguments(t);if(!a)return o.error("Format required. Available formats: "+Object.keys(e.EXPORT_FORMATS).join(", ")),o.info("Usage: /export <format> [--filter=value]"),void o.info("Example: /export json --level=error,warn --last=50");try{const e=r.export(a,s,n);o.success(`✅ Export completed: ${e.metadata.filteredLogs} logs exported in ${a} format`),e.data.length<1e3?(o.group(`📄 Preview (${a.toUpperCase()})`),console.log(e.data),o.groupEnd()):o.info(`📄 Export size: ${(e.data.length/1024).toFixed(2)}KB`),o.table({format:e.format,totalLogs:e.metadata.totalLogs,filtered:e.metadata.filteredLogs,exported:e.metadata.exportedAt})}catch(i){o.error("Export failed:",i)}}}class CopyCommand{name="copy";description="Copy logs to clipboard";usage="/copy <format> [--filter=value] [--option]";async execute(t,o){const r=o.getExportHandler();if(!r)return void o.error("Export handler not available. Make sure ExportLogHandler is registered.");const{filters:s,options:n,format:a}=parseArguments(t);if(!a)return o.error("Format required. Available formats: "+Object.keys(e.EXPORT_FORMATS).join(", ")),o.info("Usage: /copy <format> [--filter=value]"),void o.info("Example: /copy plain --level=error --last=25");try{if(await r.copyToClipboard(a,s,n)){const e=r.export(a,s,n);o.success(`📋 Copied ${e.metadata.filteredLogs} logs to clipboard (${a} format)`)}else o.error("Failed to copy to clipboard. Browser may not support clipboard API.")}catch(i){o.error("Copy failed:",i)}}}class BufferSizeCommand{name="buffer-size";description="Set log buffer size";usage="/buffer-size <size>";execute(e,t){const o=t.getExportHandler();if(!o)return void t.error("Export handler not available.");const r=parseInt(e.trim(),10);if(isNaN(r)||r<=0)return t.error("Invalid buffer size. Must be a positive number."),void t.info("Example: /buffer-size 2000");o.setBufferSize(r),t.success(`Buffer size set to ${r}`)}}class ClearBufferCommand{name="clear-buffer";description="Clear the log buffer";usage="/clear-buffer";execute(e,t){const o=t.getExportHandler();if(!o)return void t.error("Export handler not available.");const r=o.getBufferStats();o.clearBuffer(),t.success(`✅ Buffer cleared. Removed ${r.size} log entries.`)}}class BufferInfoCommand{name="buffer-info";description="Show buffer statistics and information";usage="/buffer-info";execute(e,t){const o=t.getExportHandler();if(!o)return void t.error("Export handler not available.");const r=o.getBufferStats();t.group("📊 Buffer Information"),t.table({size:`${r.size}/${r.maxSize}`,usage:`${r.usage.toFixed(1)}%`,oldestLog:r.oldestLog?.toLocaleString()||"None",newestLog:r.newestLog?.toLocaleString()||"None"}),t.group("📈 Log Level Counts"),t.table(r.levelCounts),t.groupEnd(),t.groupEnd()}}class HelpCommand{name="help";description="Show CLI help and available commands";usage="/help [command]";execute(t,o){const r=(new e.StyleBuilder).bg("linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)").color("#495057").padding("15px 20px").rounded("8px").border("1px solid #dee2e6").font("Monaco, Consolas, monospace").size("13px").build();console.log('%c\n╭─────────────── ADVANCED LOGGER CLI COMMANDS ─────────────────╮\n│ │\n│ CONFIGURATION │\n│ /config Show current configuration │\n│ /config {json} Apply JSON configuration │\n│ /config key=val Apply key-value configuration │\n│ /themes Show available themes │\n│ /banners Show available banner types │\n│ /banner [type] Change/show banner type │\n│ /status Show logger status & buffer stats │\n│ /demo Show feature demonstration │\n│ /reset Reset to default configuration │\n│ │\n│ EXPORT & CLIPBOARD │\n│ /export <format> Export logs (json|csv|md|plain|html) │\n│ /copy <format> Copy logs to clipboard │\n│ /buffer-size N Set log buffer size │\n│ /buffer-info Show buffer statistics │\n│ /clear-buffer Clear stored logs │\n│ │\n│ EXPORT FILTERS (for export/copy commands) │\n│ --level error,warn Filter by log levels │\n│ --since 2h Logs from last 2 hours │\n│ --until 1h Logs until 1 hour ago │\n│ --prefix API,DB Filter by prefixes │\n│ --exclude-prefix INT Exclude prefixes │\n│ --last 50 Last 50 logs only │\n│ --first 25 First 25 logs only │\n│ --search "error" Search in log messages │\n│ --with-stack Only logs with stack traces │\n│ --errors-only Only error + critical logs │\n│ --group-by level Group by level/prefix/hour │\n│ │\n│ EXPORT OPTIONS │\n│ --minimal Minimal output format │\n│ --compact Remove extra whitespace │\n│ --styled Include styling (HTML format) │\n│ │\n├──────────────────── CONFIGURATION OPTIONS ─────────────────┤\n│ │\n│ theme: default | dark | light | neon | minimal | cyberpunk│\n│ bannerType: simple | ascii | unicode | svg | animated │\n│ verbosity: debug | info | warn | error | critical | silent│\n│ enableColors: true | false │\n│ enableTimestamps: true | false │\n│ enableStackTrace: true | false │\n│ globalPrefix: "string" │\n│ bufferSize: number (50-10000) │\n│ │\n├──────────────────────── EXAMPLES ──────────────────────────┤\n│ │\n│ Basic Configuration: │\n│ /config {"theme":"dark","verbosity":"debug"} │\n│ /config theme=neon,bufferSize=2000 │\n│ /banner animated Change to animated banner │\n│ │\n│ Export Examples: │\n│ /export json --level=error,warn --last=25 │\n│ /export csv --since=2h --prefix=API │\n│ /export markdown --group-by=level --errors-only │\n│ /export html --styled --since=1h │\n│ │\n│ Clipboard Examples: │\n│ /copy plain --minimal --last=10 │\n│ /copy json --search="authentication" --compact │\n│ /copy csv --since=30m --exclude-prefix=DEBUG │\n│ │\n│ Buffer Management: │\n│ /buffer-size 5000 Increase buffer to 5000 logs │\n│ /buffer-info Show detailed buffer statistics │\n│ /clear-buffer Clear all stored logs │\n│ │\n│ Time Formats: │\n│ --since=2h 2 hours ago │\n│ --since=30m 30 minutes ago │\n│ --since=1d 1 day ago │\n│ --since="2024-01-01T10:00:00Z" Specific ISO date │\n│ │\n╰─────────────────────────────────────────────────────────────╯',r),o.group("💡 Quick Tips"),["Use /demo to see all logger features in action","Logs are automatically stored in a circular buffer for export","Export formats: JSON (structured), CSV (Excel), Markdown (readable), Plain (simple), HTML (styled)","Time filters support relative (2h, 30m) and absolute (ISO) formats",'Combine multiple filters: /export json --level=error --since=1h --search="auth"',"Use /copy for quick clipboard access instead of /export"].forEach(e=>{o.info(`• ${e}`)}),o.groupEnd()}}class HistoryCommand{name="history";description="Show command execution history";usage="/history [limit] - Show recent commands (default: 10)";category="system";aliases=["hist","h"];execute(e,t){const o=t.cliProcessor;if(!o)return void t.error("CLI processor not available");const r=parseInt(e)||10,s=o.getHistory().slice(0,r);0!==s.length?(t.info(`📋 Last ${s.length} commands:`),s.forEach((e,o)=>{const r=e.success?"✅":"❌",s=e.timestamp.toLocaleTimeString();t.info(`${r} [${s}] ${e.command}`)})):t.info("📝 No command history available")}}class ClearHistoryCommand{name="clearhistory";description="Clear command execution history";usage="/clearhistory - Remove all command history";category="system";aliases=["clrhist"];execute(e,t){const o=t.cliProcessor;o?(o.clearHistory(),t.success("🗑️ Command history cleared")):t.error("CLI processor not available")}}class InteractiveCommand{name="interactive";description="Enter interactive CLI mode";usage="/interactive - Start interactive command mode";category="system";aliases=["i","repl"];execute(e,t){const o=t.cliProcessor;o?o.enterInteractiveMode(t):t.error("CLI processor not available")}}class PluginsCommand{name="plugins";description="List loaded CLI plugins";usage="/plugins - Show all registered plugins";category="system";aliases=["plug"];execute(e,t){const o=t.cliProcessor;if(!o)return void t.error("CLI processor not available");const r=o.getPlugins();0!==r.length?(t.info(`🔌 Loaded plugins (${r.length}):`),r.forEach(e=>{t.info(` 📦 ${e.name} v${e.version} - ${e.description}`),t.info(` Commands: ${e.commands.map(e=>e.name).join(", ")}`)})):t.info("🔌 No plugins registered")}}let n=t.default;class Logger{config;scopedPrefix;handlers=[];timers=/* @__PURE__ */new Map;groupDepth=0;exportHandler;cliProcessor;themeChangeListener;displaySettings={showTimestamp:!0,showLocation:!0,showBadges:!0};constructor(t={}){this.config={...e.DEFAULT_CONFIG,...t},this.config.bufferSize&&(this.exportHandler=new ExportLogHandler(this.config.bufferSize),this.handlers.push(this.exportHandler)),this.cliProcessor=function(){const e=new CommandProcessor;return e.registerCommand(new HelpCommand),e.registerCommand(new ConfigCommand),e.registerCommand(new ThemesCommand),e.registerCommand(new BannersCommand),e.registerCommand(new BannerCommand),e.registerCommand(new StatusCommand),e.registerCommand(new ResetCommand),e.registerCommand(new DemoCommand),e.registerCommand(new ExportCommand),e.registerCommand(new CopyCommand),e.registerCommand(new BufferSizeCommand),e.registerCommand(new ClearBufferCommand),e.registerCommand(new BufferInfoCommand),e.registerCommand(new HistoryCommand),e.registerCommand(new ClearHistoryCommand),e.registerCommand(new InteractiveCommand),e.registerCommand(new PluginsCommand),e}(),this.config.autoDetectTheme&&this.setupAutoThemeDetection()}setupAutoThemeDetection(){this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null),this.themeChangeListener=e.setupThemeChangeListener(e=>{this.debug(`DevTools theme changed to: ${e}`)})}getConfig(){return{...this.config}}updateConfig(e){const t=this.config.autoDetectTheme;this.config={...this.config,...e},void 0!==e.autoDetectTheme&&e.autoDetectTheme!==t&&(e.autoDetectTheme?this.setupAutoThemeDetection():this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null))}setGlobalPrefix(e){this.config.globalPrefix=e}setVerbosity(e){this.config.verbosity=e}setTheme(e){if(hasPreset(e))this.preset(e);else if(e in t){if(n=t[e],this.config.theme=e,e in r){const t=r[e];console.log(`%c${t.simple}`,t.style)}this.success(`Theme changed to: ${e}`)}else this.error(`Invalid theme: ${e}. Available:`,[...getAvailablePresets(),...Object.keys(t)])}setBannerType(e){this.config.bannerType=e,this.success(`Banner type changed to: ${e}`)}resetConfig(){this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null),this.config={...e.DEFAULT_CONFIG},n=t.default,this.config.autoDetectTheme&&this.setupAutoThemeDetection(),this.success("Logger configuration reset to defaults")}cleanup(){this.themeChangeListener&&(this.themeChangeListener(),this.themeChangeListener=null)}async createScopedLogger(e,t){try{const{ScopedLogger:o,APILogger:r,ComponentLogger:s}=await Promise.resolve().then(()=>require("./ScopedLogger-HgV_J-ug.js"));switch(e){case"component":return new s(this,t);case"api":return new r(this,t);default:return new o(this,t)}}catch(o){this.error("Failed to load ScopedLogger, using basic logger with prefix:",o);const e=new Logger(this.getConfig());return e.setGlobalPrefix(`${this.config.globalPrefix||""}:${t}`),e}}preset(e){if(!hasPreset(e))return void this.error(`Unknown preset: ${e}. Available presets:`,getAvailablePresets());const t=function(e){return s[e]||null}(e);t&&(this.displaySettings.showTimestamp=t.timestamp?.show??!0,this.displaySettings.showLocation=t.location?.show??!0,this._activePreset=t,this._activePresetName=e,this.success(`Applied preset: ${e}`))}presets(){return getAvailablePresets()}hideTimestamp(){this.displaySettings.showTimestamp=!1,this.success("Timestamp hidden")}showTimestamp(){this.displaySettings.showTimestamp=!0,this.success("Timestamp shown")}hideLocation(){this.displaySettings.showLocation=!1,this.success("Location info hidden")}showLocation(){this.displaySettings.showLocation=!0,this.success("Location info shown")}hideBadges(){this.displaySettings.showBadges=!1,this.success("Badges hidden")}showBadges(){this.displaySettings.showBadges=!0,this.success("Badges shown")}component(e){return this.createScopedLogger("component",e)}api(e){return this.createScopedLogger("api",e)}scope(e){return this.createScopedLogger("scope",e)}customize(e){void 0!==e.timestamp?.show&&(this.displaySettings.showTimestamp=e.timestamp.show),void 0!==e.location?.show&&(this.displaySettings.showLocation=e.location.show),e.prefix,this._customization=e,this.success("Customization applied")}styles(){return new LogStyleBuilder(this)}addHandler(e){this.handlers.push(e)}getHandlers(){return[...this.handlers]}getExportHandler(){return this.exportHandler}shouldLog(e){if("silent"===this.config.verbosity)return!1;const t={debug:0,info:1,warn:2,error:3,critical:4};return t[e]>=t[this.config.verbosity]}getEffectivePrefix(){const e=[this.config.globalPrefix,this.scopedPrefix].filter(Boolean);return e.length>0?e.join(":"):void 0}log(t,...o){if(!this.shouldLog(t))return;const r=this.config.enableStackTrace?e.parseStackTrace():null,s=this.getEffectivePrefix(),a=o.length>0?String(o[0]):"",i=o.slice(1),[l,...c]=e.createStyledOutput(t,n,s,a,this.displaySettings.showLocation?r:null,this.config.autoDetectTheme),d=" ".repeat(this.groupDepth)+l;i.length>0?console.log(d,...c,...i):console.log(d,...c),this.exportHandler&&this.exportHandler.setGroupInfo(this.groupDepth);const p={timestamp:e.formatTimestamp(),level:t,prefix:s,stackInfo:r||void 0};this.handlers.forEach(e=>{try{e.handle(t,a,o,p)}catch(r){console.error("Log handler failed:",r)}})}debug(...e){this.log("debug",...e)}info(...e){this.log("info",...e)}warn(...e){this.log("warn",...e)}error(...e){this.log("error",...e)}success(...t){if(!this.shouldLog("info"))return;const o=this.config.enableStackTrace?e.parseStackTrace():null,r=this.getEffectivePrefix(),s=t.length>0?String(t[0]):"",a=t.slice(1),[i,...l]=e.createStyledOutput("info",n,r,s,this.displaySettings.showLocation?o:null,this.config.autoDetectTheme),c=n.success;let d="✅",p="SUCCESS";c&&(c.emoji&&(d=c.emoji),c.label&&(p=c.label));const g=i.replace(/ℹ️ INFO/,`${d} ${p}`),f=" ".repeat(this.groupDepth)+g;a.length>0?console.log(f,...l,...a):console.log(f,...l);const u={timestamp:e.formatTimestamp(),level:"info",prefix:r,stackInfo:o||void 0};this.handlers.forEach(e=>{try{e.handle("info",s,t,u)}catch(o){console.error("Log handler failed:",o)}})}trace(...e){this.log("debug",...e),this.shouldLog("debug")&&console.trace(...e)}critical(...e){this.log("critical",...e)}table(t,o){if(!this.shouldLog("info"))return;const r=this.getEffectivePrefix(),s=e.StylePresets.accent().build(),n="%c📊 TABLE"+(r?` [${r}]`:"");console.log(n,s),o?console.table(t,o):console.table(t)}group(t,o=!1){const r=(new e.StyleBuilder).bg("linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)").color("#1565c0").border("1px solid #90caf9").padding("4px 12px").rounded("6px").bold().build(),s=`%c📁 ${t}`;o?console.groupCollapsed(s,r):console.group(s,r),this.groupDepth++}groupEnd(){this.groupDepth>0&&(console.groupEnd(),this.groupDepth--)}time(t){const o={label:t,startTime:performance.now()};this.timers.set(t,o);const r=e.StylePresets.warning().build();console.log(`%c⏱️ Timer started: ${t}`,r)}timeEnd(t){const o=this.timers.get(t);if(!o)return void this.warn(`Timer '${t}' does not exist`);const r=performance.now()-o.startTime;this.timers.delete(t);const s=e.StylePresets.success().build();console.log(`%c⏱️ Timer ended: ${t} - ${r.toFixed(2)}ms`,s)}showBanner(e){displayInitBanner(e||this.config.bannerType)}logWithSVG(t,o,r={}){const{width:s=300,height:n=60,padding:a="30px 150px"}=r;let i="";i=o?`data:image/svg+xml,${encodeURIComponent(o)}`:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${s} ${n}'><defs><linearGradient id='grad' x1='0%' y1='0%' x2='100%' y2='0%'><stop offset='0%' style='stop-color:%23667eea'/><stop offset='100%' style='stop-color:%23764ba2'/></linearGradient></defs><rect width='100%' height='100%' fill='url(%23grad)' rx='4'/><text x='${s/2}' y='${n/2+5}' text-anchor='middle' fill='white' font-family='monospace' font-size='14' font-weight='bold'>${t}</text></svg>`)}`;const l=(new e.StyleBuilder).bg(`url("${i}") no-repeat center center`).padding(a).color("transparent").rounded("4px").build();console.log(`%c${t}`,l)}logAnimated(t,o=3){if(!document.getElementById("logger-animations")){const e=document.createElement("style");e.id="logger-animations",e.textContent="\n @keyframes loggerGradient {\n 0% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n 100% { background-position: 0% 50%; }\n }\n ",document.head.appendChild(e)}const r=(new e.StyleBuilder).bg("linear-gradient(-45deg, #667eea, #764ba2, #667eea, #764ba2)").css("background-size","400% 400%").color("#ffffff").padding("12px 20px").rounded("8px").bold().font("Monaco, Consolas, monospace").animation(`loggerGradient ${o}s ease infinite`).display("inline-block").build();console.log(`%c${t}`,r)}logGrouped(e,t){try{let o;o=Object.groupBy?Object.groupBy(e,t):e.reduce((e,o)=>{const r=t(o);return e[r]||(e[r]=[]),e[r].push(o),e},{}),Object.entries(o).forEach(([e,t])=>{this.group(`Group: ${e}`),this.table(t),this.groupEnd()})}catch{this.info("Grouped data:",e)}}async cli(e){this.cliProcessor?await this.cliProcessor.processCommand(e,this):this.error("CLI processor not initialized")}}let a=null;!function(){if(!a){a=new Logger({verbosity:"info",enableColors:!0,enableTimestamps:!0,enableStackTrace:!0,bufferSize:1e3});try{displayInitBanner()}catch(e){}}}(),exports.BANNER_VARIANTS=o,exports.ExportLogHandler=ExportLogHandler,exports.Logger=Logger,exports.THEME_BANNERS=r,exports.THEME_PRESETS=t,exports.displayInitBanner=displayInitBanner;
2
+ //# sourceMappingURL=Logger-C9zTFYBh.js.map