{"version":3,"sources":["../../src/db/constants.ts","../../src/db/config.ts"],"names":["NUMERIX","dynamicPoolDefaultConfig"],"mappings":";AAsCO,IAAMA,EAAU,CACrB,GAAA,CAAK,CAAA,CACL,IAAA,CAAM,EACN,IAAA,CAAM,CAAA,CACN,GAAA,CAAK,EAAA,CACL,YAAa,EAAA,CACb,UAAA,CAAY,EAAA,CACZ,KAAA,CAAO,GACP,KAAA,CAAO,EAAA,CACP,MAAA,CAAQ,EAAA,CACR,QAAS,GAAA,CACT,YAAA,CAAc,GAAA,CACd,6BAAA,CAA+B,KAC/B,QAAA,CAAU,GAAA,CACV,YAAA,CAAc,GAAA,CACd,eAAgB,GAAA,CAChB,aAAA,CAAe,GAAA,CACf,aAAA,CAAe,IACf,kBAAA,CAAoB,IAAA,CACpB,aAAA,CAAe,GAAA,CACf,QAAS,EAAA,CACT,eAAA,CAAiB,GAAA,CACjB,eAAA,CAAiB,IACjB,mBAAA,CAAqB,IAAA,CACrB,cAAA,CAAgB,GAAA,CAChB,eAAgB,GAClB,EC7DO,IAAMC,CAAAA,CAA2B,CACtC,GAAA,CAAK,CAAA,CACL,GAAA,CAAK,EAAA,CACL,kBAAmB,GAAA,CACnB,oBAAA,CAAsB,GAAA,CACtB,OAAA,CAAS,CACP,OAAA,CAAS,IAAA,CACT,gBAAA,CAAkB,EAAA,CAClB,mBAAoB,EAAA,CACpB,aAAA,CAAe,GAAA,CACf,QAAA,CAAU,CACZ,CACF","file":"index.mjs","sourcesContent":["/**\n * A centralized collection of numeric constants used to avoid magic numbers across the codebase.\n *\n * Purpose:\n * - Provide named aliases for common numeric values so intent is clearer and maintenance is easier.\n * - Keep commonly used numeric literals (counts, thresholds, time durations, limits) in one place.\n *\n * Typical uses:\n * - Time and duration calculations (e.g., seconds/minutes/hours, TTLs, timeouts).\n * - Pagination, limit and capacity defaults.\n * - Validation thresholds, scaling factors and numeric formatting.\n * - Bit/byte or base arithmetic where small numeric constants improve readability.\n *\n * Properties (brief intent and common usage):\n * - TWO (2) — small counts, boolean-like numeric operations, pair-related logic.\n * - FIVE (5) — small retry counts or UI/validation limits.\n * - NINE (9) — index/format boundaries or small-range checks.\n * - TEN (10) — decimal/base operations, digit limits, common loop bounds.\n * - SIXTEEN (16) — bit/hex operations, buffer sizes or base-16 related math.\n * - TWENTY_FOUR (24) — hours-in-day, daily calculations.\n * - THIRTY_SIX (36) — base-36 or domain-specific scaling factors.\n * - SIXTY (60) — seconds/minutes conversions.\n * - NINETY (90) — percentage/angle thresholds or large-range caps.\n * - HUNDERD (100) — percentage base or general scaling (note: name preserved for backward compatibility).\n * - THOUSAND (1000) — millisecond/rounding bases or thousand-scale thresholds.\n * - FIVE_THOUSAND (5000) — medium-duration timeouts or capacity hints (e.g., ms).\n * - THREE_HUNDERD (300) — short timeouts or conventional numeric boundaries (name preserved).\n * - THIRTY_SIX_HUNDERD (3600) — seconds-per-hour; common default TTL/cache durations (3600 seconds).\n * - THIRTY_THOUSAND (30000) — longer timeouts/polling intervals in milliseconds.\n *\n * Remarks:\n * - Using these constants improves readability and makes it easier to change a value in one place.\n * - Several keys contain spelling inconsistencies (e.g., \"HUNDERD\", \"THREE_HUNDERD\", \"THIRTY_SIX_HUNDERD\") — keep names stable to avoid breaking callers; consider normalizing names in a planned refactor.\n *\n * Example:\n * - const timeoutMs = digits.FIVE_THOUSAND;          // use 5000 ms timeout\n * - const hourlySeconds = digits.THIRTY_SIX_HUNDERD; // use 3600 seconds for TTL\n */\nexport const NUMERIX = {\n  TWO: 2,\n  FIVE: 5,\n  NINE: 9,\n  TEN: 10,\n  TWENTY_FOUR: 24,\n  THIRTY_SIX: 36,\n  FIFTY: 50,\n  SIXTY: 60,\n  NINETY: 90,\n  HUNDRED: 100,\n  FIVE_HUNDERD: 500,\n  ONE_THOUSAND_AND_FIVE_HUNDERD: 1500,\n  THOUSAND: 1000,\n  TWO_THOUSAND: 2000,\n  THREE_THOUSAND: 3000,\n  FOUR_THOUSAND: 4000,\n  FIVE_THOUSAND: 5000,\n  THIRTY_SIX_HUNDERD: 3600,\n  THREE_HUNDERD: 300,\n  SIXTEEN: 16,\n  TWENTY_THOUSAND: 20000,\n  THIRTY_THOUSAND: 30000,\n  FORTY_FIVE_THOUSAND: 45000,\n  FIFTY_THOUSAND: 50000,\n  SIXTY_THOUSAND: 60000,\n};\n","// Default configuration for the dynamic PostgreSQL connection pool.\n// Defines minimum/maximum connections, timeouts, and auto-scaling thresholds\n// to maintain optimal performance and resource utilization.\nexport const dynamicPoolDefaultConfig = {\n  min: 2,\n  max: 10,\n  idleTimeoutMillis: 30000,\n  acquireTimeoutMillis: 10000,\n  scaling: {\n    enabled: true,\n    scaleUpThreshold: 80, // Scale up when pool usage exceeds 80%\n    scaleDownThreshold: 20, // Scale down when usage drops below 20%\n    scaleInterval: 30000, // Interval (ms) to check scaling conditions\n    maxScale: 2, // Maximum scaling multiplier\n  },\n};\n"]}