autotel-subscribers 41.0.3 → 41.0.4

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 (67) hide show
  1. package/dist/amplitude.cjs +2 -2
  2. package/dist/amplitude.cjs.map +1 -1
  3. package/dist/amplitude.js +2 -2
  4. package/dist/architecture-snapshot.cjs +6 -6
  5. package/dist/architecture-snapshot.cjs.map +1 -1
  6. package/dist/architecture-snapshot.js +3 -3
  7. package/dist/architecture-snapshot.js.map +1 -1
  8. package/dist/{cjs-BS1fE_MP.js → cjs-Bef2t9Tr.js} +348 -109
  9. package/dist/cjs-Bef2t9Tr.js.map +1 -0
  10. package/dist/{cjs-CC1S3xV3.cjs → cjs-C2fugEI8.cjs} +169 -164
  11. package/dist/{cjs-CC1S3xV3.cjs.map → cjs-C2fugEI8.cjs.map} +1 -1
  12. package/dist/{cjs-BVWTUHeD.cjs → cjs-C5tev9Yr.cjs} +458 -219
  13. package/dist/cjs-C5tev9Yr.cjs.map +1 -0
  14. package/dist/{cjs-j3aHAiuq.js → cjs-CY69zXGd.js} +20 -15
  15. package/dist/{cjs-j3aHAiuq.js.map → cjs-CY69zXGd.js.map} +1 -1
  16. package/dist/factories.cjs +2 -2
  17. package/dist/factories.d.cts +1 -1
  18. package/dist/factories.d.ts +1 -1
  19. package/dist/factories.js +1 -1
  20. package/dist/file.cjs +2 -2
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.d.cts +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/{index.node-T6N3xCyo.js → index.node-BF2WkODf.js} +368 -148
  26. package/dist/index.node-BF2WkODf.js.map +1 -0
  27. package/dist/{index.node-CVFSZNnN.cjs → index.node-DOkEUdYV.cjs} +369 -149
  28. package/dist/index.node-DOkEUdYV.cjs.map +1 -0
  29. package/dist/middleware.cjs +1 -1
  30. package/dist/{mixpanel-node-CTaHqgil.cjs → mixpanel-node-BVS2X-h7.cjs} +32 -31
  31. package/dist/{mixpanel-node-CTaHqgil.cjs.map → mixpanel-node-BVS2X-h7.cjs.map} +1 -1
  32. package/dist/{mixpanel-node-2RXHuOWK.js → mixpanel-node-BltEtoG6.js} +5 -4
  33. package/dist/{mixpanel-node-2RXHuOWK.js.map → mixpanel-node-BltEtoG6.js.map} +1 -1
  34. package/dist/mixpanel.cjs +2 -2
  35. package/dist/mixpanel.cjs.map +1 -1
  36. package/dist/mixpanel.js +2 -2
  37. package/dist/{posthog-DTpCMk3r.js → posthog-C9M1c_oG.js} +2 -2
  38. package/dist/{posthog-DTpCMk3r.js.map → posthog-C9M1c_oG.js.map} +1 -1
  39. package/dist/{posthog-DLBf2UJJ.d.ts → posthog-DCV5Arkw.d.ts} +217 -24
  40. package/dist/posthog-DCV5Arkw.d.ts.map +1 -0
  41. package/dist/{posthog-Duh9pZs7.d.cts → posthog-DRYlG5fG.d.cts} +217 -24
  42. package/dist/posthog-DRYlG5fG.d.cts.map +1 -0
  43. package/dist/{posthog-Bz9XTdX5.cjs → posthog-DZfoAW1q.cjs} +4 -4
  44. package/dist/{posthog-Bz9XTdX5.cjs.map → posthog-DZfoAW1q.cjs.map} +1 -1
  45. package/dist/posthog.cjs +2 -2
  46. package/dist/posthog.d.cts +1 -1
  47. package/dist/posthog.d.ts +1 -1
  48. package/dist/posthog.js +1 -1
  49. package/dist/{chunk-CiiB0FCw.js → rolldown-runtime-BHkdefai.js} +9 -2
  50. package/dist/{chunk-BIkA7V7q.cjs → rolldown-runtime-CfAboj1T.cjs} +8 -1
  51. package/dist/security.cjs +1 -1
  52. package/dist/segment.cjs +2 -2
  53. package/dist/segment.cjs.map +1 -1
  54. package/dist/segment.js +2 -2
  55. package/dist/slack.cjs +1 -1
  56. package/dist/{tslib.es6-Ck6tgf4J.cjs → tslib.es6-02HJIdSd.cjs} +4 -4
  57. package/dist/{tslib.es6-Ck6tgf4J.cjs.map → tslib.es6-02HJIdSd.cjs.map} +1 -1
  58. package/dist/{tslib.es6-13Ha9x3r.js → tslib.es6-Dvm0j0am.js} +2 -2
  59. package/dist/{tslib.es6-13Ha9x3r.js.map → tslib.es6-Dvm0j0am.js.map} +1 -1
  60. package/dist/webhook.cjs +1 -1
  61. package/package.json +15 -15
  62. package/dist/cjs-BS1fE_MP.js.map +0 -1
  63. package/dist/cjs-BVWTUHeD.cjs.map +0 -1
  64. package/dist/index.node-CVFSZNnN.cjs.map +0 -1
  65. package/dist/index.node-T6N3xCyo.js.map +0 -1
  66. package/dist/posthog-DLBf2UJJ.d.ts.map +0 -1
  67. package/dist/posthog-Duh9pZs7.d.cts.map +0 -1
@@ -1,7 +1,7 @@
1
- const require_chunk = require('./chunk-BIkA7V7q.cjs');
1
+ const require_rolldown_runtime = require('./rolldown-runtime-CfAboj1T.cjs');
2
2
  const require_event_subscriber_base = require('./event-subscriber-base-C_F3Ycbe.cjs');
3
3
  let slow_redact = require("slow-redact");
4
- slow_redact = require_chunk.__toESM(slow_redact, 1);
4
+ slow_redact = require_rolldown_runtime.__toESM(slow_redact, 1);
5
5
 
6
6
  //#region src/posthog-error-formatter.ts
7
7
  const MAX_CAUSE_DEPTH = 5;
@@ -113,7 +113,7 @@ var PostHogSubscriber = class extends require_event_subscriber_base.EventSubscri
113
113
  this.setupErrorHandling();
114
114
  return;
115
115
  }
116
- const { PostHog } = await Promise.resolve().then(() => require("./index.node-CVFSZNnN.cjs"));
116
+ const { PostHog } = await Promise.resolve().then(() => require("./index.node-DOkEUdYV.cjs"));
117
117
  this.posthog = new PostHog(this.config.apiKey, {
118
118
  host: this.config.host || "https://us.i.posthog.com",
119
119
  flushAt: this.config.flushAt,
@@ -482,4 +482,4 @@ Object.defineProperty(exports, 'PostHogSubscriber', {
482
482
  return PostHogSubscriber;
483
483
  }
484
484
  });
485
- //# sourceMappingURL=posthog-Bz9XTdX5.cjs.map
485
+ //# sourceMappingURL=posthog-DZfoAW1q.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"posthog-Bz9XTdX5.cjs","names":["EventSubscriber"],"sources":["../src/posthog-error-formatter.ts","../src/posthog.ts"],"sourcesContent":["/**\n * Format errors for PostHog's $exception event format.\n * Compatible with autotel-web's ExceptionList type.\n */\n\ntype StringRedactor = (value: string) => string;\n\ninterface StackFrame {\n filename?: string;\n function?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n in_app?: boolean;\n platform?: string;\n}\n\ninterface ExceptionRecord {\n type: string;\n value: string;\n mechanism: { type: string; handled: boolean };\n stacktrace?: { frames: StackFrame[] };\n}\n\ninterface PostHogExceptionProperties {\n $exception_list: Array<{\n type: string;\n value: string;\n mechanism: { type: string; handled: boolean };\n stacktrace: { frames: Array<StackFrame & { platform: string }> };\n }>;\n}\n\nconst MAX_CAUSE_DEPTH = 5;\n\nexport function formatExceptionForPostHog(\n exceptionList: ExceptionRecord[],\n platform: string = 'web:javascript',\n redactor?: StringRedactor,\n): PostHogExceptionProperties {\n return {\n $exception_list: exceptionList.map((ex) => ({\n type: ex.type,\n value: redactor ? redactor(ex.value) : ex.value,\n mechanism: ex.mechanism,\n stacktrace: {\n frames: (ex.stacktrace?.frames || []).map((frame) => ({\n ...frame,\n abs_path: frame.abs_path && redactor ? redactor(frame.abs_path) : frame.abs_path,\n platform,\n })),\n },\n })),\n };\n}\n\nexport function errorToExceptionList(\n input: unknown,\n redactor?: StringRedactor,\n): ExceptionRecord[] {\n const error = input instanceof Error ? input : new Error(\n input === null || input === undefined ? 'Unknown error' : String(input),\n );\n\n const records: ExceptionRecord[] = [];\n let current: Error | undefined = error;\n let depth = 0;\n\n while (current && depth < MAX_CAUSE_DEPTH) {\n const value = current.message || 'Unknown error';\n const frames = current.stack ? parseStackBasic(current.stack) : undefined;\n records.push({\n type: current.name || 'Error',\n value: redactor ? redactor(value) : value,\n mechanism: { type: 'manual', handled: true },\n stacktrace: frames ? {\n frames: redactor\n ? frames.map((f) => ({\n ...f,\n abs_path: f.abs_path ? redactor(f.abs_path) : f.abs_path,\n }))\n : frames,\n } : undefined,\n });\n current = current.cause instanceof Error ? current.cause : undefined;\n depth++;\n }\n\n return records.toReversed();\n}\n\nfunction parseStackBasic(stack: string): StackFrame[] {\n const lines = stack.split('\\n');\n const frames: StackFrame[] = [];\n const re = /^\\s*at\\s+(?:(.+?)\\s+\\()?(.+?):(\\d+):(\\d+)\\)?$/;\n\n for (const line of lines) {\n const match = line.trim().match(re);\n if (match) {\n const [, fn, absPath, lineStr, colStr] = match;\n frames.push({\n function: fn || undefined,\n abs_path: absPath,\n filename: absPath.split('/').pop() || absPath,\n lineno: Number.parseInt(lineStr, 10),\n colno: Number.parseInt(colStr, 10),\n in_app: !absPath.includes('node_modules'),\n });\n }\n }\n\n return frames;\n}\n","/**\n * PostHog Subscriber for autotel\n *\n * Send events to PostHog for product events, feature flags, and A/B testing.\n *\n * @example Basic usage\n * ```typescript\n * import { Events } from 'autotel/events';\n * import { PostHogSubscriber } from 'autotel-subscribers/posthog';\n *\n * const events = new Events('checkout', {\n * subscribers: [\n * new PostHogSubscriber({\n * apiKey: process.env.POSTHOG_API_KEY!,\n * host: 'https://us.i.posthog.com' // optional, defaults to US cloud\n * })\n * ]\n * });\n *\n * // Events go to both OpenTelemetry AND PostHog\n * events.trackEvent('order.completed', { userId: '123', amount: 99.99 });\n * ```\n *\n * @example Feature flags\n * ```typescript\n * const subscriber = new PostHogSubscriber({ apiKey: 'phc_...' });\n *\n * // Check if feature is enabled\n * const isEnabled = await subscriber.isFeatureEnabled('new-checkout', 'user-123');\n *\n * // Get feature flag value (string, boolean, number)\n * const variant = await subscriber.getFeatureFlag('experiment-variant', 'user-123');\n *\n * // Get all flags for a user\n * const allFlags = await subscriber.getAllFlags('user-123');\n * ```\n *\n * @example Person and group events\n * ```typescript\n * // Identify user and set properties\n * await subscriber.identify('user-123', {\n * email: 'user@example.com',\n * plan: 'premium'\n * });\n *\n * // Identify a group (e.g., organization)\n * await subscriber.groupIdentify('company', 'acme-corp', {\n * industry: 'saas',\n * employees: 500\n * });\n * ```\n *\n * @example Serverless configuration\n * ```typescript\n * // Optimized for AWS Lambda / Vercel Functions\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * flushAt: 1, // Send immediately (don't batch)\n * flushInterval: 0, // Disable interval-based flushing\n * });\n * ```\n *\n * @example Custom PostHog client\n * ```typescript\n * import { PostHog } from 'posthog-node';\n *\n * const customClient = new PostHog('phc_...', {\n * host: 'https://eu.i.posthog.com',\n * // ... other PostHog options\n * });\n *\n * const subscriber = new PostHogSubscriber({\n * client: customClient\n * });\n * ```\n *\n * @example Error handling\n * ```typescript\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * onError: (error) => {\n * console.error('PostHog error:', error);\n * // Send to error tracking service\n * }\n * });\n * ```\n */\n\nimport type { EventAttributes, EventAttributesInput } from 'autotel/event-subscriber';\nimport { EventSubscriber, type EventPayload } from './event-subscriber-base';\nimport { formatExceptionForPostHog, errorToExceptionList } from './posthog-error-formatter';\nimport slowRedact from 'slow-redact';\n\n// Type-only import to avoid runtime dependency\nimport type { PostHog } from 'posthog-node';\n\n/**\n * Error context for enhanced error handling\n *\n * Provides detailed context about the event that caused an error.\n */\nexport interface ErrorContext {\n /** The error that occurred */\n error: Error;\n\n /** Event name (if applicable) */\n eventName?: string;\n\n /** Event type (event, funnel, outcome, value) */\n eventType?: 'event' | 'funnel' | 'outcome' | 'value';\n\n /** Event attributes (filtered) */\n attributes?: EventAttributes;\n\n /** Subscriber name */\n subscriberName: string;\n}\n\ntype StringRedactor = (value: string) => string;\n\nexport interface PostHogConfig {\n /** PostHog API key (starts with phc_) - required if not providing custom client */\n apiKey?: string;\n\n /** PostHog host (defaults to US cloud) */\n host?: string;\n\n /** Enable/disable the subscriber */\n enabled?: boolean;\n\n /** Custom PostHog client instance (bypasses apiKey/host) */\n client?: PostHog;\n\n /**\n * Use global browser client (window.posthog)\n *\n * When true, uses the PostHog client already loaded on the page via script tag.\n * This is useful for Next.js apps that initialize PostHog in _app.tsx.\n *\n * @example\n * ```typescript\n * // Browser - uses window.posthog\n * const subscriber = new PostHogSubscriber({\n * useGlobalClient: true,\n * });\n * ```\n */\n useGlobalClient?: boolean;\n\n /**\n * Serverless mode preset (AWS Lambda, Vercel Functions, Next.js API routes)\n *\n * When true, auto-configures for serverless environments:\n * - flushAt: 1 (send immediately, don't batch)\n * - flushInterval: 0 (disable interval-based flushing)\n * - requestTimeout: 3000 (shorter timeout for fast responses)\n *\n * @example\n * ```typescript\n * // Vercel / Next.js API route\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * serverless: true,\n * });\n * ```\n */\n serverless?: boolean;\n\n // Serverless optimizations\n /** Flush batch when it reaches this size (default: 20, set to 1 for immediate send) */\n flushAt?: number;\n\n /** Flush interval in milliseconds (default: 10000, set to 0 to disable) */\n flushInterval?: number;\n\n // Performance tuning\n /** Disable geoip lookup to reduce request size (default: false) */\n disableGeoip?: boolean;\n\n /** Request timeout in milliseconds (default: 10000) */\n requestTimeout?: number;\n\n /** Send feature flag evaluation events (default: true) */\n sendFeatureFlags?: boolean;\n\n /**\n * Automatically filter out undefined and null values from attributes\n *\n * When true (default), undefined and null values are removed before sending.\n * This improves DX when passing objects with optional properties.\n *\n * @default true\n *\n * @example\n * ```typescript\n * // With filterUndefinedValues: true (default)\n * subscriber.trackEvent('user.action', {\n * userId: user.id,\n * email: user.email, // might be undefined - will be filtered\n * plan: user.subscription, // might be null - will be filtered\n * });\n * ```\n */\n filterUndefinedValues?: boolean;\n\n // Error handling\n /** Error callback for debugging and monitoring */\n onError?: (error: Error) => void;\n\n /**\n * Enhanced error callback with event context\n *\n * Provides detailed context about the event that caused the error.\n * If both onError and onErrorWithContext are provided, both are called.\n *\n * @example\n * ```typescript\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * onErrorWithContext: (ctx) => {\n * console.error(`Failed to track ${ctx.eventType}: ${ctx.eventName}`, ctx.error);\n * Sentry.captureException(ctx.error, { extra: ctx });\n * }\n * });\n * ```\n */\n onErrorWithContext?: (context: ErrorContext) => void;\n\n /** Known attribute paths to redact using slow-redact (path-based, immutable). */\n redactPaths?: string[];\n\n /** String redactor for value-based PII scanning. Applied after path-based redaction. */\n stringRedactor?: StringRedactor;\n\n /** Enable debug logging (default: false) */\n debug?: boolean;\n}\n\n/**\n * PostHog feature flag options\n */\nexport interface FeatureFlagOptions {\n /** Group context for group-based feature flags */\n groups?: Record<string, string | number>;\n\n /** Group properties for feature flag evaluation */\n groupProperties?: Record<string, Record<string, any>>;\n\n /** Person properties for feature flag evaluation */\n personProperties?: Record<string, any>;\n\n /** Only evaluate locally, don't send $feature_flag_called event */\n onlyEvaluateLocally?: boolean;\n\n /** Send feature flag events even if disabled globally */\n sendFeatureFlagEvents?: boolean;\n}\n\n/**\n * Person properties for identify calls\n */\nexport interface PersonProperties {\n /** Set properties (will update existing values) */\n $set?: Record<string, any>;\n\n /** Set properties only if they don't exist */\n $set_once?: Record<string, any>;\n\n /** Any custom properties */\n [key: string]: any;\n}\n\nexport class PostHogSubscriber extends EventSubscriber {\n readonly name = 'PostHogSubscriber';\n readonly version = '2.0.0';\n\n private posthog: PostHog | null = null;\n private config: PostHogConfig;\n private initPromise: Promise<void> | null = null;\n /** True when using browser's window.posthog (different API signature) */\n private isBrowserClient = false;\n private pathRedactor: ((obj: Record<string, unknown>) => Record<string, unknown>) | null = null;\n private stringRedactor: StringRedactor | null = null;\n\n constructor(config: PostHogConfig) {\n super();\n\n // Apply serverless preset first (can be overridden by explicit config)\n if (config.serverless) {\n config = {\n flushAt: 1,\n flushInterval: 0,\n requestTimeout: 3000,\n ...config, // User config overrides serverless defaults\n };\n }\n\n // Validate: need either apiKey, client, or useGlobalClient\n if (!config.apiKey && !config.client && !config.useGlobalClient) {\n throw new Error(\n 'PostHogSubscriber requires either apiKey, client, or useGlobalClient to be provided',\n );\n }\n\n this.enabled = config.enabled ?? true;\n // Default filterUndefinedValues to true\n this.config = {\n filterUndefinedValues: true,\n ...config,\n };\n\n if (this.config.redactPaths && this.config.redactPaths.length > 0) {\n this.pathRedactor = slowRedact({\n paths: this.config.redactPaths,\n serialize: false,\n }) as any;\n }\n if (this.config.stringRedactor) {\n this.stringRedactor = this.config.stringRedactor;\n }\n\n if (this.enabled) {\n // Start initialization immediately but don't block constructor\n this.initPromise = this.initialize();\n }\n }\n\n private async initialize(): Promise<void> {\n try {\n // Option 1: Use global browser client (window.posthog)\n if (this.config.useGlobalClient) {\n const globalWindow = typeof globalThis === 'undefined' ? undefined : (globalThis as Record<string, unknown>);\n if (globalWindow?.posthog) {\n this.posthog = globalWindow.posthog as PostHog;\n this.isBrowserClient = true;\n this.setupErrorHandling();\n return;\n }\n throw new Error(\n 'useGlobalClient enabled but window.posthog not found. ' +\n 'Ensure PostHog script is loaded before initializing the subscriber.',\n );\n }\n\n // Option 2: Use custom client if provided\n if (this.config.client) {\n this.posthog = this.config.client;\n this.setupErrorHandling();\n return;\n }\n\n // Option 3: Create new PostHog client with dynamic import\n const { PostHog } = await import('posthog-node');\n\n this.posthog = new PostHog(this.config.apiKey!, {\n host: this.config.host || 'https://us.i.posthog.com',\n flushAt: this.config.flushAt,\n flushInterval: this.config.flushInterval,\n requestTimeout: this.config.requestTimeout,\n disableGeoip: this.config.disableGeoip,\n sendFeatureFlagEvent: this.config.sendFeatureFlags,\n });\n\n this.setupErrorHandling();\n } catch (error) {\n console.error(\n 'PostHog subscriber failed to initialize. Install posthog-node: pnpm add posthog-node',\n error,\n );\n this.enabled = false;\n this.config.onError?.(error as Error);\n }\n }\n\n private setupErrorHandling(): void {\n if (this.config.debug) {\n this.posthog?.debug();\n }\n\n if (this.config.onError && this.posthog?.on) {\n this.posthog.on('error', this.config.onError);\n }\n }\n\n private async ensureInitialized(): Promise<void> {\n if (this.initPromise) {\n await this.initPromise;\n this.initPromise = null;\n }\n }\n\n private extractDistinctId(attributes?: EventAttributes): string {\n return (attributes?.userId || attributes?.user_id || 'anonymous') as string;\n }\n\n private redactProperties(properties: Record<string, unknown>): Record<string, unknown> {\n let result = properties;\n if (this.pathRedactor) {\n result = this.pathRedactor(properties) as Record<string, unknown>;\n }\n if (this.stringRedactor) {\n result = this.redactStringValues(result);\n }\n return result;\n }\n\n private redactStringValues(obj: Record<string, unknown>): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === 'string') {\n result[key] = this.stringRedactor!(value);\n } else if (Array.isArray(value)) {\n result[key] = this.redactArray(value);\n } else if (value !== null && typeof value === 'object') {\n result[key] = this.redactStringValues(value as Record<string, unknown>);\n } else {\n result[key] = value;\n }\n }\n return result;\n }\n\n private redactArray(arr: unknown[]): unknown[] {\n return arr.map((item) => {\n if (typeof item === 'string') {\n return this.stringRedactor!(item);\n } else if (Array.isArray(item)) {\n return this.redactArray(item);\n } else if (item !== null && typeof item === 'object') {\n return this.redactStringValues(item as Record<string, unknown>);\n }\n return item;\n });\n }\n\n /**\n * Set the string redactor. Called by autotel init() when attributeRedactor is configured.\n * Can also be called manually.\n */\n setStringRedactor(redactor: StringRedactor): void {\n this.stringRedactor = redactor;\n }\n\n /**\n * Send payload to PostHog\n *\n * Maps autotel context to PostHog-specific field names:\n * - autotel.trace_id → $trace_id\n * - autotel.span_id → $span_id\n * - autotel.correlation_id → $correlation_id\n * - autotel.trace_url → $trace_url\n */\n protected async sendToDestination(payload: EventPayload): Promise<void> {\n await this.ensureInitialized();\n\n // Filter attributes if enabled (default: true)\n const filteredAttributes =\n this.config.filterUndefinedValues === false\n ? payload.attributes\n : this.filterAttributes(payload.attributes as EventAttributesInput);\n\n // Build properties object, including value and funnel metadata if present\n const properties: Record<string, unknown> = { ...filteredAttributes };\n if (payload.value !== undefined) {\n properties.value = payload.value;\n }\n // Add funnel progression metadata\n if (payload.stepNumber !== undefined) {\n properties.step_number = payload.stepNumber;\n }\n if (payload.stepName !== undefined) {\n properties.step_name = payload.stepName;\n }\n\n // Map autotel context to PostHog-specific field names\n if (payload.autotel) {\n if (payload.autotel.trace_id) {\n properties.$trace_id = payload.autotel.trace_id;\n }\n if (payload.autotel.span_id) {\n properties.$span_id = payload.autotel.span_id;\n }\n if (payload.autotel.correlation_id) {\n properties.$correlation_id = payload.autotel.correlation_id;\n }\n if (payload.autotel.trace_flags) {\n properties.$trace_flags = payload.autotel.trace_flags;\n }\n if (payload.autotel.trace_state) {\n properties.$trace_state = payload.autotel.trace_state;\n }\n if (payload.autotel.trace_url) {\n properties.$trace_url = payload.autotel.trace_url;\n }\n // Batch/fan-in context\n if (payload.autotel.linked_trace_id_count !== undefined) {\n properties.$linked_trace_id_count = payload.autotel.linked_trace_id_count;\n }\n if (payload.autotel.linked_trace_id_hash) {\n properties.$linked_trace_id_hash = payload.autotel.linked_trace_id_hash;\n }\n if (payload.autotel.linked_trace_ids) {\n properties.$linked_trace_ids = payload.autotel.linked_trace_ids;\n }\n }\n\n const redactedProperties = this.redactProperties(properties);\n\n if (payload.attributes?.['exception.list']) {\n try {\n const exceptionList = JSON.parse(payload.attributes['exception.list'] as string);\n const formatted = formatExceptionForPostHog(\n exceptionList,\n undefined,\n this.stringRedactor ?? undefined,\n );\n const exceptionProperties = {\n ...redactedProperties,\n ...formatted,\n };\n\n if (this.isBrowserClient) {\n (this.posthog as any)?.capture('$exception', exceptionProperties);\n } else {\n this.posthog?.capture({\n distinctId: this.extractDistinctId(filteredAttributes),\n event: '$exception',\n properties: exceptionProperties,\n });\n }\n } catch {\n // exception.list parsing failed, continue with normal event\n }\n }\n\n const distinctId = this.extractDistinctId(filteredAttributes);\n\n // Browser client has different API signature\n if (this.isBrowserClient) {\n // Browser API: capture(eventName, properties)\n (this.posthog as any)?.capture(payload.name, redactedProperties);\n } else {\n // Server API: capture({ distinctId, event, properties, groups })\n const capturePayload: any = {\n distinctId,\n event: payload.name,\n properties: redactedProperties,\n };\n\n // Add groups if present in attributes\n if (filteredAttributes?.groups) {\n capturePayload.groups = filteredAttributes.groups;\n }\n\n this.posthog?.capture(capturePayload);\n }\n }\n\n // Feature Flag Methods\n\n /**\n * Check if a feature flag is enabled for a user\n *\n * @param flagKey - Feature flag key\n * @param distinctId - User ID or anonymous ID\n * @param options - Feature flag evaluation options\n * @returns true if enabled, false otherwise\n *\n * @example\n * ```typescript\n * const isEnabled = await subscriber.isFeatureEnabled('new-checkout', 'user-123');\n *\n * // With groups\n * const isEnabled = await subscriber.isFeatureEnabled('beta-features', 'user-123', {\n * groups: { company: 'acme-corp' }\n * });\n * ```\n */\n async isFeatureEnabled(\n flagKey: string,\n distinctId: string,\n options?: FeatureFlagOptions,\n ): Promise<boolean> {\n if (!this.enabled) return false;\n await this.ensureInitialized();\n\n try {\n return await this.posthog?.isFeatureEnabled(flagKey, distinctId, options as any) ?? false;\n } catch (error) {\n this.config.onError?.(error as Error);\n return false;\n }\n }\n\n /**\n * Get feature flag value for a user\n *\n * @param flagKey - Feature flag key\n * @param distinctId - User ID or anonymous ID\n * @param options - Feature flag evaluation options\n * @returns Flag value (string, boolean, or undefined)\n *\n * @example\n * ```typescript\n * const variant = await subscriber.getFeatureFlag('experiment-variant', 'user-123');\n * // Returns: 'control' | 'test' | 'test-2' | undefined\n *\n * // With person properties\n * const variant = await subscriber.getFeatureFlag('premium-feature', 'user-123', {\n * personProperties: { plan: 'premium' }\n * });\n * ```\n */\n async getFeatureFlag(\n flagKey: string,\n distinctId: string,\n options?: FeatureFlagOptions,\n ): Promise<string | boolean | undefined> {\n if (!this.enabled) return undefined;\n await this.ensureInitialized();\n\n try {\n return await this.posthog?.getFeatureFlag(flagKey, distinctId, options as any);\n } catch (error) {\n this.config.onError?.(error as Error);\n return undefined;\n }\n }\n\n /**\n * Get all feature flags for a user\n *\n * @param distinctId - User ID or anonymous ID\n * @param options - Feature flag evaluation options\n * @returns Object mapping flag keys to their values\n *\n * @example\n * ```typescript\n * const flags = await subscriber.getAllFlags('user-123');\n * // Returns: { 'new-checkout': true, 'experiment-variant': 'test', ... }\n * ```\n */\n async getAllFlags(\n distinctId: string,\n options?: FeatureFlagOptions,\n ): Promise<Record<string, string | number | boolean>> {\n if (!this.enabled) return {};\n await this.ensureInitialized();\n\n try {\n const flags = await this.posthog?.getAllFlags(distinctId, options as any);\n return flags ?? {};\n } catch (error) {\n this.config.onError?.(error as Error);\n return {};\n }\n }\n\n /**\n * Reload feature flags from PostHog server\n *\n * Call this to refresh feature flag definitions without restarting.\n *\n * @example\n * ```typescript\n * await subscriber.reloadFeatureFlags();\n * ```\n */\n async reloadFeatureFlags(): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n await this.posthog?.reloadFeatureFlags();\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n\n // Person and Group Events\n\n /**\n * Identify a user and set their properties\n *\n * @param distinctId - User ID\n * @param properties - Person properties ($set, $set_once, or custom properties)\n *\n * @example\n * ```typescript\n * // Set properties (will update existing values)\n * await subscriber.identify('user-123', {\n * $set: {\n * email: 'user@example.com',\n * plan: 'premium'\n * }\n * });\n *\n * // Set properties only once (won't update if already exists)\n * await subscriber.identify('user-123', {\n * $set_once: {\n * signup_date: '2025-01-17'\n * }\n * });\n * ```\n */\n async identify(distinctId: string, properties?: PersonProperties): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n this.posthog?.identify({\n distinctId,\n properties,\n });\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n\n /**\n * Identify a group and set its properties\n *\n * Groups are useful for B2B SaaS to track organizations, teams, or accounts.\n *\n * @param groupType - Type of group (e.g., 'company', 'organization', 'team')\n * @param groupKey - Unique identifier for the group\n * @param properties - Group properties\n *\n * @example\n * ```typescript\n * await subscriber.groupIdentify('company', 'acme-corp', {\n * $set: {\n * name: 'Acme Corporation',\n * industry: 'saas',\n * employees: 500,\n * plan: 'enterprise'\n * }\n * });\n * ```\n */\n async groupIdentify(\n groupType: string,\n groupKey: string | number,\n properties?: Record<string, any>,\n ): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n this.posthog?.groupIdentify({\n groupType,\n groupKey: String(groupKey), // Convert to string for PostHog SDK\n properties,\n });\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n\n /**\n * Track an event with group context\n *\n * Use this to associate events with groups (e.g., organizations).\n *\n * @param name - Event name\n * @param attributes - Event attributes\n * @param groups - Group context (e.g., { company: 'acme-corp' })\n *\n * @example\n * ```typescript\n * await subscriber.trackEventWithGroups('feature.used', {\n * userId: 'user-123',\n * feature: 'advanced-events'\n * }, {\n * company: 'acme-corp'\n * });\n * ```\n */\n async trackEventWithGroups(\n name: string,\n attributes?: EventAttributes,\n groups?: Record<string, string | number>,\n ): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n const eventAttributes: EventAttributes = { ...attributes } as EventAttributes;\n if (groups) {\n (eventAttributes as any).groups = groups;\n }\n\n await this.trackEvent(name, eventAttributes);\n }\n\n /**\n * Capture an exception and send to PostHog error tracking.\n *\n * If using browser client (window.posthog), delegates to its captureException.\n * Otherwise, formats and sends via posthog-node capture API.\n */\n async captureException(\n error: unknown,\n options?: {\n distinctId?: string;\n additionalProperties?: Record<string, unknown>;\n },\n ): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n if (this.isBrowserClient) {\n const browserProps = options?.additionalProperties\n ? this.redactProperties(options.additionalProperties)\n : undefined;\n (this.posthog as any)?.captureException?.(error, browserProps);\n return;\n }\n\n const exceptionList = errorToExceptionList(error, this.stringRedactor ?? undefined);\n const formatted = formatExceptionForPostHog(exceptionList, 'node:javascript', this.stringRedactor ?? undefined);\n\n const properties = {\n ...formatted,\n ...options?.additionalProperties,\n };\n\n this.posthog?.capture({\n distinctId: options?.distinctId || 'anonymous',\n event: '$exception',\n properties: this.redactProperties(properties),\n });\n } catch (error_) {\n this.config.onError?.(error_ as Error);\n }\n }\n\n /**\n * Flush pending events and clean up resources\n */\n async shutdown(): Promise<void> {\n await super.shutdown(); // Drain pending requests first\n await this.ensureInitialized();\n\n if (this.posthog) {\n try {\n await this.posthog.shutdown();\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n }\n\n /**\n * Handle errors with custom error handler\n */\n protected handleError(error: Error, payload: EventPayload): void {\n // Call basic onError if provided\n this.config.onError?.(error);\n\n // Call enhanced onErrorWithContext if provided\n if (this.config.onErrorWithContext) {\n this.config.onErrorWithContext({\n error,\n eventName: payload.name,\n eventType: payload.type,\n attributes: payload.attributes,\n subscriberName: this.name,\n });\n }\n\n super.handleError(error, payload);\n }\n}\n"],"mappings":";;;;;;AAiCA,MAAM,kBAAkB;AAExB,SAAgB,0BACd,eACA,WAAmB,kBACnB,UAC4B;CAC5B,OAAO,EACL,iBAAiB,cAAc,KAAK,QAAQ;EAC1C,MAAM,GAAG;EACT,OAAO,WAAW,SAAS,GAAG,KAAK,IAAI,GAAG;EAC1C,WAAW,GAAG;EACd,YAAY,EACV,SAAS,GAAG,YAAY,UAAU,CAAC,EAAC,CAAE,KAAK,WAAW;GACpD,GAAG;GACH,UAAU,MAAM,YAAY,WAAW,SAAS,MAAM,QAAQ,IAAI,MAAM;GACxE;EACF,EAAE,EACJ;CACF,EAAE,EACJ;AACF;AAEA,SAAgB,qBACd,OACA,UACmB;CACnB,MAAM,QAAQ,iBAAiB,QAAQ,QAAQ,IAAI,MACjD,UAAU,QAAQ,UAAU,SAAY,kBAAkB,OAAO,KAAK,CACxE;CAEA,MAAM,UAA6B,CAAC;CACpC,IAAI,UAA6B;CACjC,IAAI,QAAQ;CAEZ,OAAO,WAAW,QAAQ,iBAAiB;EACzC,MAAM,QAAQ,QAAQ,WAAW;EACjC,MAAM,SAAS,QAAQ,QAAQ,gBAAgB,QAAQ,KAAK,IAAI;EAChE,QAAQ,KAAK;GACX,MAAM,QAAQ,QAAQ;GACtB,OAAO,WAAW,SAAS,KAAK,IAAI;GACpC,WAAW;IAAE,MAAM;IAAU,SAAS;GAAK;GAC3C,YAAY,SAAS,EACnB,QAAQ,WACJ,OAAO,KAAK,OAAO;IACjB,GAAG;IACH,UAAU,EAAE,WAAW,SAAS,EA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,UAAU,KAAK;EAG3B,IAAI,KAAK,OAAO,oBACd,KAAK,OAAO,mBAAmB;GAC7B;GACA,WAAW,QAAQ;GACnB,WAAW,QAAQ;GACnB,YAAY,QAAQ;GACpB,gBAAgB,KAAK;EACvB,CAAC;EAGH,MAAM,YAAY,OAAO,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"posthog-DZfoAW1q.cjs","names":["EventSubscriber"],"sources":["../src/posthog-error-formatter.ts","../src/posthog.ts"],"sourcesContent":["/**\n * Format errors for PostHog's $exception event format.\n * Compatible with autotel-web's ExceptionList type.\n */\n\ntype StringRedactor = (value: string) => string;\n\ninterface StackFrame {\n filename?: string;\n function?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n in_app?: boolean;\n platform?: string;\n}\n\ninterface ExceptionRecord {\n type: string;\n value: string;\n mechanism: { type: string; handled: boolean };\n stacktrace?: { frames: StackFrame[] };\n}\n\ninterface PostHogExceptionProperties {\n $exception_list: Array<{\n type: string;\n value: string;\n mechanism: { type: string; handled: boolean };\n stacktrace: { frames: Array<StackFrame & { platform: string }> };\n }>;\n}\n\nconst MAX_CAUSE_DEPTH = 5;\n\nexport function formatExceptionForPostHog(\n exceptionList: ExceptionRecord[],\n platform: string = 'web:javascript',\n redactor?: StringRedactor,\n): PostHogExceptionProperties {\n return {\n $exception_list: exceptionList.map((ex) => ({\n type: ex.type,\n value: redactor ? redactor(ex.value) : ex.value,\n mechanism: ex.mechanism,\n stacktrace: {\n frames: (ex.stacktrace?.frames || []).map((frame) => ({\n ...frame,\n abs_path: frame.abs_path && redactor ? redactor(frame.abs_path) : frame.abs_path,\n platform,\n })),\n },\n })),\n };\n}\n\nexport function errorToExceptionList(\n input: unknown,\n redactor?: StringRedactor,\n): ExceptionRecord[] {\n const error = input instanceof Error ? input : new Error(\n input === null || input === undefined ? 'Unknown error' : String(input),\n );\n\n const records: ExceptionRecord[] = [];\n let current: Error | undefined = error;\n let depth = 0;\n\n while (current && depth < MAX_CAUSE_DEPTH) {\n const value = current.message || 'Unknown error';\n const frames = current.stack ? parseStackBasic(current.stack) : undefined;\n records.push({\n type: current.name || 'Error',\n value: redactor ? redactor(value) : value,\n mechanism: { type: 'manual', handled: true },\n stacktrace: frames ? {\n frames: redactor\n ? frames.map((f) => ({\n ...f,\n abs_path: f.abs_path ? redactor(f.abs_path) : f.abs_path,\n }))\n : frames,\n } : undefined,\n });\n current = current.cause instanceof Error ? current.cause : undefined;\n depth++;\n }\n\n return records.toReversed();\n}\n\nfunction parseStackBasic(stack: string): StackFrame[] {\n const lines = stack.split('\\n');\n const frames: StackFrame[] = [];\n const re = /^\\s*at\\s+(?:(.+?)\\s+\\()?(.+?):(\\d+):(\\d+)\\)?$/;\n\n for (const line of lines) {\n const match = line.trim().match(re);\n if (match) {\n const [, fn, absPath, lineStr, colStr] = match;\n frames.push({\n function: fn || undefined,\n abs_path: absPath,\n filename: absPath.split('/').pop() || absPath,\n lineno: Number.parseInt(lineStr, 10),\n colno: Number.parseInt(colStr, 10),\n in_app: !absPath.includes('node_modules'),\n });\n }\n }\n\n return frames;\n}\n","/**\n * PostHog Subscriber for autotel\n *\n * Send events to PostHog for product events, feature flags, and A/B testing.\n *\n * @example Basic usage\n * ```typescript\n * import { Events } from 'autotel/events';\n * import { PostHogSubscriber } from 'autotel-subscribers/posthog';\n *\n * const events = new Events('checkout', {\n * subscribers: [\n * new PostHogSubscriber({\n * apiKey: process.env.POSTHOG_API_KEY!,\n * host: 'https://us.i.posthog.com' // optional, defaults to US cloud\n * })\n * ]\n * });\n *\n * // Events go to both OpenTelemetry AND PostHog\n * events.trackEvent('order.completed', { userId: '123', amount: 99.99 });\n * ```\n *\n * @example Feature flags\n * ```typescript\n * const subscriber = new PostHogSubscriber({ apiKey: 'phc_...' });\n *\n * // Check if feature is enabled\n * const isEnabled = await subscriber.isFeatureEnabled('new-checkout', 'user-123');\n *\n * // Get feature flag value (string, boolean, number)\n * const variant = await subscriber.getFeatureFlag('experiment-variant', 'user-123');\n *\n * // Get all flags for a user\n * const allFlags = await subscriber.getAllFlags('user-123');\n * ```\n *\n * @example Person and group events\n * ```typescript\n * // Identify user and set properties\n * await subscriber.identify('user-123', {\n * email: 'user@example.com',\n * plan: 'premium'\n * });\n *\n * // Identify a group (e.g., organization)\n * await subscriber.groupIdentify('company', 'acme-corp', {\n * industry: 'saas',\n * employees: 500\n * });\n * ```\n *\n * @example Serverless configuration\n * ```typescript\n * // Optimized for AWS Lambda / Vercel Functions\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * flushAt: 1, // Send immediately (don't batch)\n * flushInterval: 0, // Disable interval-based flushing\n * });\n * ```\n *\n * @example Custom PostHog client\n * ```typescript\n * import { PostHog } from 'posthog-node';\n *\n * const customClient = new PostHog('phc_...', {\n * host: 'https://eu.i.posthog.com',\n * // ... other PostHog options\n * });\n *\n * const subscriber = new PostHogSubscriber({\n * client: customClient\n * });\n * ```\n *\n * @example Error handling\n * ```typescript\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * onError: (error) => {\n * console.error('PostHog error:', error);\n * // Send to error tracking service\n * }\n * });\n * ```\n */\n\nimport type { EventAttributes, EventAttributesInput } from 'autotel/event-subscriber';\nimport { EventSubscriber, type EventPayload } from './event-subscriber-base';\nimport { formatExceptionForPostHog, errorToExceptionList } from './posthog-error-formatter';\nimport slowRedact from 'slow-redact';\n\n// Type-only import to avoid runtime dependency\nimport type { PostHog } from 'posthog-node';\n\n/**\n * Error context for enhanced error handling\n *\n * Provides detailed context about the event that caused an error.\n */\nexport interface ErrorContext {\n /** The error that occurred */\n error: Error;\n\n /** Event name (if applicable) */\n eventName?: string;\n\n /** Event type (event, funnel, outcome, value) */\n eventType?: 'event' | 'funnel' | 'outcome' | 'value';\n\n /** Event attributes (filtered) */\n attributes?: EventAttributes;\n\n /** Subscriber name */\n subscriberName: string;\n}\n\ntype StringRedactor = (value: string) => string;\n\nexport interface PostHogConfig {\n /** PostHog API key (starts with phc_) - required if not providing custom client */\n apiKey?: string;\n\n /** PostHog host (defaults to US cloud) */\n host?: string;\n\n /** Enable/disable the subscriber */\n enabled?: boolean;\n\n /** Custom PostHog client instance (bypasses apiKey/host) */\n client?: PostHog;\n\n /**\n * Use global browser client (window.posthog)\n *\n * When true, uses the PostHog client already loaded on the page via script tag.\n * This is useful for Next.js apps that initialize PostHog in _app.tsx.\n *\n * @example\n * ```typescript\n * // Browser - uses window.posthog\n * const subscriber = new PostHogSubscriber({\n * useGlobalClient: true,\n * });\n * ```\n */\n useGlobalClient?: boolean;\n\n /**\n * Serverless mode preset (AWS Lambda, Vercel Functions, Next.js API routes)\n *\n * When true, auto-configures for serverless environments:\n * - flushAt: 1 (send immediately, don't batch)\n * - flushInterval: 0 (disable interval-based flushing)\n * - requestTimeout: 3000 (shorter timeout for fast responses)\n *\n * @example\n * ```typescript\n * // Vercel / Next.js API route\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * serverless: true,\n * });\n * ```\n */\n serverless?: boolean;\n\n // Serverless optimizations\n /** Flush batch when it reaches this size (default: 20, set to 1 for immediate send) */\n flushAt?: number;\n\n /** Flush interval in milliseconds (default: 10000, set to 0 to disable) */\n flushInterval?: number;\n\n // Performance tuning\n /** Disable geoip lookup to reduce request size (default: false) */\n disableGeoip?: boolean;\n\n /** Request timeout in milliseconds (default: 10000) */\n requestTimeout?: number;\n\n /** Send feature flag evaluation events (default: true) */\n sendFeatureFlags?: boolean;\n\n /**\n * Automatically filter out undefined and null values from attributes\n *\n * When true (default), undefined and null values are removed before sending.\n * This improves DX when passing objects with optional properties.\n *\n * @default true\n *\n * @example\n * ```typescript\n * // With filterUndefinedValues: true (default)\n * subscriber.trackEvent('user.action', {\n * userId: user.id,\n * email: user.email, // might be undefined - will be filtered\n * plan: user.subscription, // might be null - will be filtered\n * });\n * ```\n */\n filterUndefinedValues?: boolean;\n\n // Error handling\n /** Error callback for debugging and monitoring */\n onError?: (error: Error) => void;\n\n /**\n * Enhanced error callback with event context\n *\n * Provides detailed context about the event that caused the error.\n * If both onError and onErrorWithContext are provided, both are called.\n *\n * @example\n * ```typescript\n * const subscriber = new PostHogSubscriber({\n * apiKey: 'phc_...',\n * onErrorWithContext: (ctx) => {\n * console.error(`Failed to track ${ctx.eventType}: ${ctx.eventName}`, ctx.error);\n * Sentry.captureException(ctx.error, { extra: ctx });\n * }\n * });\n * ```\n */\n onErrorWithContext?: (context: ErrorContext) => void;\n\n /** Known attribute paths to redact using slow-redact (path-based, immutable). */\n redactPaths?: string[];\n\n /** String redactor for value-based PII scanning. Applied after path-based redaction. */\n stringRedactor?: StringRedactor;\n\n /** Enable debug logging (default: false) */\n debug?: boolean;\n}\n\n/**\n * PostHog feature flag options\n */\nexport interface FeatureFlagOptions {\n /** Group context for group-based feature flags */\n groups?: Record<string, string | number>;\n\n /** Group properties for feature flag evaluation */\n groupProperties?: Record<string, Record<string, any>>;\n\n /** Person properties for feature flag evaluation */\n personProperties?: Record<string, any>;\n\n /** Only evaluate locally, don't send $feature_flag_called event */\n onlyEvaluateLocally?: boolean;\n\n /** Send feature flag events even if disabled globally */\n sendFeatureFlagEvents?: boolean;\n}\n\n/**\n * Person properties for identify calls\n */\nexport interface PersonProperties {\n /** Set properties (will update existing values) */\n $set?: Record<string, any>;\n\n /** Set properties only if they don't exist */\n $set_once?: Record<string, any>;\n\n /** Any custom properties */\n [key: string]: any;\n}\n\nexport class PostHogSubscriber extends EventSubscriber {\n readonly name = 'PostHogSubscriber';\n readonly version = '2.0.0';\n\n private posthog: PostHog | null = null;\n private config: PostHogConfig;\n private initPromise: Promise<void> | null = null;\n /** True when using browser's window.posthog (different API signature) */\n private isBrowserClient = false;\n private pathRedactor: ((obj: Record<string, unknown>) => Record<string, unknown>) | null = null;\n private stringRedactor: StringRedactor | null = null;\n\n constructor(config: PostHogConfig) {\n super();\n\n // Apply serverless preset first (can be overridden by explicit config)\n if (config.serverless) {\n config = {\n flushAt: 1,\n flushInterval: 0,\n requestTimeout: 3000,\n ...config, // User config overrides serverless defaults\n };\n }\n\n // Validate: need either apiKey, client, or useGlobalClient\n if (!config.apiKey && !config.client && !config.useGlobalClient) {\n throw new Error(\n 'PostHogSubscriber requires either apiKey, client, or useGlobalClient to be provided',\n );\n }\n\n this.enabled = config.enabled ?? true;\n // Default filterUndefinedValues to true\n this.config = {\n filterUndefinedValues: true,\n ...config,\n };\n\n if (this.config.redactPaths && this.config.redactPaths.length > 0) {\n this.pathRedactor = slowRedact({\n paths: this.config.redactPaths,\n serialize: false,\n }) as any;\n }\n if (this.config.stringRedactor) {\n this.stringRedactor = this.config.stringRedactor;\n }\n\n if (this.enabled) {\n // Start initialization immediately but don't block constructor\n this.initPromise = this.initialize();\n }\n }\n\n private async initialize(): Promise<void> {\n try {\n // Option 1: Use global browser client (window.posthog)\n if (this.config.useGlobalClient) {\n const globalWindow = typeof globalThis === 'undefined' ? undefined : (globalThis as Record<string, unknown>);\n if (globalWindow?.posthog) {\n this.posthog = globalWindow.posthog as PostHog;\n this.isBrowserClient = true;\n this.setupErrorHandling();\n return;\n }\n throw new Error(\n 'useGlobalClient enabled but window.posthog not found. ' +\n 'Ensure PostHog script is loaded before initializing the subscriber.',\n );\n }\n\n // Option 2: Use custom client if provided\n if (this.config.client) {\n this.posthog = this.config.client;\n this.setupErrorHandling();\n return;\n }\n\n // Option 3: Create new PostHog client with dynamic import\n const { PostHog } = await import('posthog-node');\n\n this.posthog = new PostHog(this.config.apiKey!, {\n host: this.config.host || 'https://us.i.posthog.com',\n flushAt: this.config.flushAt,\n flushInterval: this.config.flushInterval,\n requestTimeout: this.config.requestTimeout,\n disableGeoip: this.config.disableGeoip,\n sendFeatureFlagEvent: this.config.sendFeatureFlags,\n });\n\n this.setupErrorHandling();\n } catch (error) {\n console.error(\n 'PostHog subscriber failed to initialize. Install posthog-node: pnpm add posthog-node',\n error,\n );\n this.enabled = false;\n this.config.onError?.(error as Error);\n }\n }\n\n private setupErrorHandling(): void {\n if (this.config.debug) {\n this.posthog?.debug();\n }\n\n if (this.config.onError && this.posthog?.on) {\n this.posthog.on('error', this.config.onError);\n }\n }\n\n private async ensureInitialized(): Promise<void> {\n if (this.initPromise) {\n await this.initPromise;\n this.initPromise = null;\n }\n }\n\n private extractDistinctId(attributes?: EventAttributes): string {\n return (attributes?.userId || attributes?.user_id || 'anonymous') as string;\n }\n\n private redactProperties(properties: Record<string, unknown>): Record<string, unknown> {\n let result = properties;\n if (this.pathRedactor) {\n result = this.pathRedactor(properties) as Record<string, unknown>;\n }\n if (this.stringRedactor) {\n result = this.redactStringValues(result);\n }\n return result;\n }\n\n private redactStringValues(obj: Record<string, unknown>): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === 'string') {\n result[key] = this.stringRedactor!(value);\n } else if (Array.isArray(value)) {\n result[key] = this.redactArray(value);\n } else if (value !== null && typeof value === 'object') {\n result[key] = this.redactStringValues(value as Record<string, unknown>);\n } else {\n result[key] = value;\n }\n }\n return result;\n }\n\n private redactArray(arr: unknown[]): unknown[] {\n return arr.map((item) => {\n if (typeof item === 'string') {\n return this.stringRedactor!(item);\n } else if (Array.isArray(item)) {\n return this.redactArray(item);\n } else if (item !== null && typeof item === 'object') {\n return this.redactStringValues(item as Record<string, unknown>);\n }\n return item;\n });\n }\n\n /**\n * Set the string redactor. Called by autotel init() when attributeRedactor is configured.\n * Can also be called manually.\n */\n setStringRedactor(redactor: StringRedactor): void {\n this.stringRedactor = redactor;\n }\n\n /**\n * Send payload to PostHog\n *\n * Maps autotel context to PostHog-specific field names:\n * - autotel.trace_id → $trace_id\n * - autotel.span_id → $span_id\n * - autotel.correlation_id → $correlation_id\n * - autotel.trace_url → $trace_url\n */\n protected async sendToDestination(payload: EventPayload): Promise<void> {\n await this.ensureInitialized();\n\n // Filter attributes if enabled (default: true)\n const filteredAttributes =\n this.config.filterUndefinedValues === false\n ? payload.attributes\n : this.filterAttributes(payload.attributes as EventAttributesInput);\n\n // Build properties object, including value and funnel metadata if present\n const properties: Record<string, unknown> = { ...filteredAttributes };\n if (payload.value !== undefined) {\n properties.value = payload.value;\n }\n // Add funnel progression metadata\n if (payload.stepNumber !== undefined) {\n properties.step_number = payload.stepNumber;\n }\n if (payload.stepName !== undefined) {\n properties.step_name = payload.stepName;\n }\n\n // Map autotel context to PostHog-specific field names\n if (payload.autotel) {\n if (payload.autotel.trace_id) {\n properties.$trace_id = payload.autotel.trace_id;\n }\n if (payload.autotel.span_id) {\n properties.$span_id = payload.autotel.span_id;\n }\n if (payload.autotel.correlation_id) {\n properties.$correlation_id = payload.autotel.correlation_id;\n }\n if (payload.autotel.trace_flags) {\n properties.$trace_flags = payload.autotel.trace_flags;\n }\n if (payload.autotel.trace_state) {\n properties.$trace_state = payload.autotel.trace_state;\n }\n if (payload.autotel.trace_url) {\n properties.$trace_url = payload.autotel.trace_url;\n }\n // Batch/fan-in context\n if (payload.autotel.linked_trace_id_count !== undefined) {\n properties.$linked_trace_id_count = payload.autotel.linked_trace_id_count;\n }\n if (payload.autotel.linked_trace_id_hash) {\n properties.$linked_trace_id_hash = payload.autotel.linked_trace_id_hash;\n }\n if (payload.autotel.linked_trace_ids) {\n properties.$linked_trace_ids = payload.autotel.linked_trace_ids;\n }\n }\n\n const redactedProperties = this.redactProperties(properties);\n\n if (payload.attributes?.['exception.list']) {\n try {\n const exceptionList = JSON.parse(payload.attributes['exception.list'] as string);\n const formatted = formatExceptionForPostHog(\n exceptionList,\n undefined,\n this.stringRedactor ?? undefined,\n );\n const exceptionProperties = {\n ...redactedProperties,\n ...formatted,\n };\n\n if (this.isBrowserClient) {\n (this.posthog as any)?.capture('$exception', exceptionProperties);\n } else {\n this.posthog?.capture({\n distinctId: this.extractDistinctId(filteredAttributes),\n event: '$exception',\n properties: exceptionProperties,\n });\n }\n } catch {\n // exception.list parsing failed, continue with normal event\n }\n }\n\n const distinctId = this.extractDistinctId(filteredAttributes);\n\n // Browser client has different API signature\n if (this.isBrowserClient) {\n // Browser API: capture(eventName, properties)\n (this.posthog as any)?.capture(payload.name, redactedProperties);\n } else {\n // Server API: capture({ distinctId, event, properties, groups })\n const capturePayload: any = {\n distinctId,\n event: payload.name,\n properties: redactedProperties,\n };\n\n // Add groups if present in attributes\n if (filteredAttributes?.groups) {\n capturePayload.groups = filteredAttributes.groups;\n }\n\n this.posthog?.capture(capturePayload);\n }\n }\n\n // Feature Flag Methods\n\n /**\n * Check if a feature flag is enabled for a user\n *\n * @param flagKey - Feature flag key\n * @param distinctId - User ID or anonymous ID\n * @param options - Feature flag evaluation options\n * @returns true if enabled, false otherwise\n *\n * @example\n * ```typescript\n * const isEnabled = await subscriber.isFeatureEnabled('new-checkout', 'user-123');\n *\n * // With groups\n * const isEnabled = await subscriber.isFeatureEnabled('beta-features', 'user-123', {\n * groups: { company: 'acme-corp' }\n * });\n * ```\n */\n async isFeatureEnabled(\n flagKey: string,\n distinctId: string,\n options?: FeatureFlagOptions,\n ): Promise<boolean> {\n if (!this.enabled) return false;\n await this.ensureInitialized();\n\n try {\n return await this.posthog?.isFeatureEnabled(flagKey, distinctId, options as any) ?? false;\n } catch (error) {\n this.config.onError?.(error as Error);\n return false;\n }\n }\n\n /**\n * Get feature flag value for a user\n *\n * @param flagKey - Feature flag key\n * @param distinctId - User ID or anonymous ID\n * @param options - Feature flag evaluation options\n * @returns Flag value (string, boolean, or undefined)\n *\n * @example\n * ```typescript\n * const variant = await subscriber.getFeatureFlag('experiment-variant', 'user-123');\n * // Returns: 'control' | 'test' | 'test-2' | undefined\n *\n * // With person properties\n * const variant = await subscriber.getFeatureFlag('premium-feature', 'user-123', {\n * personProperties: { plan: 'premium' }\n * });\n * ```\n */\n async getFeatureFlag(\n flagKey: string,\n distinctId: string,\n options?: FeatureFlagOptions,\n ): Promise<string | boolean | undefined> {\n if (!this.enabled) return undefined;\n await this.ensureInitialized();\n\n try {\n return await this.posthog?.getFeatureFlag(flagKey, distinctId, options as any);\n } catch (error) {\n this.config.onError?.(error as Error);\n return undefined;\n }\n }\n\n /**\n * Get all feature flags for a user\n *\n * @param distinctId - User ID or anonymous ID\n * @param options - Feature flag evaluation options\n * @returns Object mapping flag keys to their values\n *\n * @example\n * ```typescript\n * const flags = await subscriber.getAllFlags('user-123');\n * // Returns: { 'new-checkout': true, 'experiment-variant': 'test', ... }\n * ```\n */\n async getAllFlags(\n distinctId: string,\n options?: FeatureFlagOptions,\n ): Promise<Record<string, string | number | boolean>> {\n if (!this.enabled) return {};\n await this.ensureInitialized();\n\n try {\n const flags = await this.posthog?.getAllFlags(distinctId, options as any);\n return flags ?? {};\n } catch (error) {\n this.config.onError?.(error as Error);\n return {};\n }\n }\n\n /**\n * Reload feature flags from PostHog server\n *\n * Call this to refresh feature flag definitions without restarting.\n *\n * @example\n * ```typescript\n * await subscriber.reloadFeatureFlags();\n * ```\n */\n async reloadFeatureFlags(): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n await this.posthog?.reloadFeatureFlags();\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n\n // Person and Group Events\n\n /**\n * Identify a user and set their properties\n *\n * @param distinctId - User ID\n * @param properties - Person properties ($set, $set_once, or custom properties)\n *\n * @example\n * ```typescript\n * // Set properties (will update existing values)\n * await subscriber.identify('user-123', {\n * $set: {\n * email: 'user@example.com',\n * plan: 'premium'\n * }\n * });\n *\n * // Set properties only once (won't update if already exists)\n * await subscriber.identify('user-123', {\n * $set_once: {\n * signup_date: '2025-01-17'\n * }\n * });\n * ```\n */\n async identify(distinctId: string, properties?: PersonProperties): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n this.posthog?.identify({\n distinctId,\n properties,\n });\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n\n /**\n * Identify a group and set its properties\n *\n * Groups are useful for B2B SaaS to track organizations, teams, or accounts.\n *\n * @param groupType - Type of group (e.g., 'company', 'organization', 'team')\n * @param groupKey - Unique identifier for the group\n * @param properties - Group properties\n *\n * @example\n * ```typescript\n * await subscriber.groupIdentify('company', 'acme-corp', {\n * $set: {\n * name: 'Acme Corporation',\n * industry: 'saas',\n * employees: 500,\n * plan: 'enterprise'\n * }\n * });\n * ```\n */\n async groupIdentify(\n groupType: string,\n groupKey: string | number,\n properties?: Record<string, any>,\n ): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n this.posthog?.groupIdentify({\n groupType,\n groupKey: String(groupKey), // Convert to string for PostHog SDK\n properties,\n });\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n\n /**\n * Track an event with group context\n *\n * Use this to associate events with groups (e.g., organizations).\n *\n * @param name - Event name\n * @param attributes - Event attributes\n * @param groups - Group context (e.g., { company: 'acme-corp' })\n *\n * @example\n * ```typescript\n * await subscriber.trackEventWithGroups('feature.used', {\n * userId: 'user-123',\n * feature: 'advanced-events'\n * }, {\n * company: 'acme-corp'\n * });\n * ```\n */\n async trackEventWithGroups(\n name: string,\n attributes?: EventAttributes,\n groups?: Record<string, string | number>,\n ): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n const eventAttributes: EventAttributes = { ...attributes } as EventAttributes;\n if (groups) {\n (eventAttributes as any).groups = groups;\n }\n\n await this.trackEvent(name, eventAttributes);\n }\n\n /**\n * Capture an exception and send to PostHog error tracking.\n *\n * If using browser client (window.posthog), delegates to its captureException.\n * Otherwise, formats and sends via posthog-node capture API.\n */\n async captureException(\n error: unknown,\n options?: {\n distinctId?: string;\n additionalProperties?: Record<string, unknown>;\n },\n ): Promise<void> {\n if (!this.enabled) return;\n await this.ensureInitialized();\n\n try {\n if (this.isBrowserClient) {\n const browserProps = options?.additionalProperties\n ? this.redactProperties(options.additionalProperties)\n : undefined;\n (this.posthog as any)?.captureException?.(error, browserProps);\n return;\n }\n\n const exceptionList = errorToExceptionList(error, this.stringRedactor ?? undefined);\n const formatted = formatExceptionForPostHog(exceptionList, 'node:javascript', this.stringRedactor ?? undefined);\n\n const properties = {\n ...formatted,\n ...options?.additionalProperties,\n };\n\n this.posthog?.capture({\n distinctId: options?.distinctId || 'anonymous',\n event: '$exception',\n properties: this.redactProperties(properties),\n });\n } catch (error_) {\n this.config.onError?.(error_ as Error);\n }\n }\n\n /**\n * Flush pending events and clean up resources\n */\n async shutdown(): Promise<void> {\n await super.shutdown(); // Drain pending requests first\n await this.ensureInitialized();\n\n if (this.posthog) {\n try {\n await this.posthog.shutdown();\n } catch (error) {\n this.config.onError?.(error as Error);\n }\n }\n }\n\n /**\n * Handle errors with custom error handler\n */\n protected handleError(error: Error, payload: EventPayload): void {\n // Call basic onError if provided\n this.config.onError?.(error);\n\n // Call enhanced onErrorWithContext if provided\n if (this.config.onErrorWithContext) {\n this.config.onErrorWithContext({\n error,\n eventName: payload.name,\n eventType: payload.type,\n attributes: payload.attributes,\n subscriberName: this.name,\n });\n }\n\n super.handleError(error, payload);\n }\n}\n"],"mappings":";;;;;;AAiCA,MAAM,kBAAkB;AAExB,SAAgB,0BACd,eACA,WAAmB,kBACnB,UAC4B;CAC5B,OAAO,EACL,iBAAiB,cAAc,KAAK,QAAQ;EAC1C,MAAM,GAAG;EACT,OAAO,WAAW,SAAS,GAAG,KAAK,IAAI,GAAG;EAC1C,WAAW,GAAG;EACd,YAAY,EACV,SAAS,GAAG,YAAY,UAAU,CAAC,EAAC,CAAE,KAAK,WAAW;GACpD,GAAG;GACH,UAAU,MAAM,YAAY,WAAW,SAAS,MAAM,QAAQ,IAAI,MAAM;GACxE;EACF,EAAE,EACJ;CACF,EAAE,EACJ;AACF;AAEA,SAAgB,qBACd,OACA,UACmB;CACnB,MAAM,QAAQ,iBAAiB,QAAQ,QAAQ,IAAI,MACjD,UAAU,QAAQ,UAAU,SAAY,kBAAkB,OAAO,KAAK,CACxE;CAEA,MAAM,UAA6B,CAAC;CACpC,IAAI,UAA6B;CACjC,IAAI,QAAQ;CAEZ,OAAO,WAAW,QAAQ,iBAAiB;EACzC,MAAM,QAAQ,QAAQ,WAAW;EACjC,MAAM,SAAS,QAAQ,QAAQ,gBAA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CAKA,MAAM,WAA0B;EAC9B,MAAM,MAAM,SAAS;EACrB,MAAM,KAAK,kBAAkB;EAE7B,IAAI,KAAK,SACP,IAAI;GACF,MAAM,KAAK,QAAQ,SAAS;EAC9B,SAAS,OAAO;GACd,KAAK,OAAO,UAAU,KAAc;EACtC;CAEJ;;;;CAKA,AAAU,YAAY,OAAc,SAA6B;EAE/D,KAAK,OAAO,UAAU,KAAK;EAG3B,IAAI,KAAK,OAAO,oBACd,KAAK,OAAO,mBAAmB;GAC7B;GACA,WAAW,QAAQ;GACnB,WAAW,QAAQ;GACnB,YAAY,QAAQ;GACpB,gBAAgB,KAAK;EACvB,CAAC;EAGH,MAAM,YAAY,OAAO,OAAO;CAClC;AACF"}
package/dist/posthog.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-BIkA7V7q.cjs');
3
- const require_posthog = require('./posthog-Bz9XTdX5.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-CfAboj1T.cjs');
3
+ const require_posthog = require('./posthog-DZfoAW1q.cjs');
4
4
 
5
5
  exports.PostHogSubscriber = require_posthog.PostHogSubscriber;
@@ -1,2 +1,2 @@
1
- import { a as PostHogSubscriber, i as PostHogConfig, n as FeatureFlagOptions, r as PersonProperties, t as ErrorContext } from "./posthog-Duh9pZs7.cjs";
1
+ import { a as PostHogSubscriber, i as PostHogConfig, n as FeatureFlagOptions, r as PersonProperties, t as ErrorContext } from "./posthog-DRYlG5fG.cjs";
2
2
  export { ErrorContext, FeatureFlagOptions, PersonProperties, PostHogConfig, PostHogSubscriber };
package/dist/posthog.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as PostHogSubscriber, i as PostHogConfig, n as FeatureFlagOptions, r as PersonProperties, t as ErrorContext } from "./posthog-DLBf2UJJ.js";
1
+ import { a as PostHogSubscriber, i as PostHogConfig, n as FeatureFlagOptions, r as PersonProperties, t as ErrorContext } from "./posthog-DCV5Arkw.js";
2
2
  export { ErrorContext, FeatureFlagOptions, PersonProperties, PostHogConfig, PostHogSubscriber };
package/dist/posthog.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as PostHogSubscriber } from "./posthog-DTpCMk3r.js";
1
+ import { t as PostHogSubscriber } from "./posthog-C9M1c_oG.js";
2
2
 
3
3
  export { PostHogSubscriber };
@@ -7,7 +7,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
8
  var __getProtoOf = Object.getPrototypeOf;
9
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
10
+ var __esmMin = (fn, res, err) => () => {
11
+ if (err) throw err[0];
12
+ try {
13
+ return fn && (res = fn(fn = 0)), res;
14
+ } catch (e) {
15
+ throw err = [e], e;
16
+ }
17
+ };
11
18
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
12
19
  var __exportAll = (all, no_symbols) => {
13
20
  let target = {};
@@ -41,7 +48,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
41
48
  enumerable: true
42
49
  }) : target, mod));
43
50
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
44
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
51
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
45
52
 
46
53
  //#endregion
47
54
  export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
@@ -5,7 +5,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
8
+ var __esmMin = (fn, res, err) => () => {
9
+ if (err) throw err[0];
10
+ try {
11
+ return fn && (res = fn(fn = 0)), res;
12
+ } catch (e) {
13
+ throw err = [e], e;
14
+ }
15
+ };
9
16
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
17
  var __exportAll = (all, no_symbols) => {
11
18
  let target = {};
package/dist/security.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-BIkA7V7q.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-CfAboj1T.cjs');
3
3
  const require_event_subscriber_base = require('./event-subscriber-base-C_F3Ycbe.cjs');
4
4
  const require_webhook_delivery = require('./webhook-delivery-DZeUlZhi.cjs');
5
5
  let autotel_security_schema = require("autotel/security-schema");
package/dist/segment.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-BIkA7V7q.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-CfAboj1T.cjs');
3
3
 
4
4
  //#region src/segment.ts
5
5
  var SegmentSubscriber = class {
@@ -16,7 +16,7 @@ var SegmentSubscriber = class {
16
16
  }
17
17
  async initialize() {
18
18
  try {
19
- const { Analytics } = await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./cjs-CC1S3xV3.cjs").default, 1));
19
+ const { Analytics } = await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./cjs-C2fugEI8.cjs").default, 1));
20
20
  this.events = new Analytics({ writeKey: this.config.writeKey });
21
21
  } catch (error) {
22
22
  console.error("Segment subscriber failed to initialize. Install @segment/events-node: pnpm add @segment/events-node", error);
@@ -1 +1 @@
1
- {"version":3,"file":"segment.cjs","names":[],"sources":["../src/segment.ts"],"sourcesContent":["/**\n * Segment Subscriber for autotel\n *\n * Send events to Segment (customer data platform).\n *\n * @example\n * ```typescript\n * import { Events } from 'autotel/events';\n * import { SegmentSubscriber } from 'autotel-subscribers/segment';\n *\n * const events = new Events('checkout', {\n * subscribers: [\n * new SegmentSubscriber({\n * writeKey: process.env.SEGMENT_WRITE_KEY!\n * })\n * ]\n * });\n *\n * events.trackEvent('order.completed', { userId: '123', amount: 99.99 });\n * ```\n */\n\nimport type {\n EventSubscriber,\n EventAttributes,\n FunnelStatus,\n OutcomeStatus,\n} from 'autotel/event-subscriber';\n\nexport interface SegmentConfig {\n /** Segment write key */\n writeKey: string;\n /** Enable/disable the subscriber */\n enabled?: boolean;\n}\n\nexport class SegmentSubscriber implements EventSubscriber {\n readonly name = 'SegmentSubscriber';\n readonly version = '1.0.0';\n\n private events: any;\n private enabled: boolean;\n private config: SegmentConfig;\n private initPromise: Promise<void> | null = null;\n\n constructor(config: SegmentConfig) {\n this.enabled = config.enabled ?? true;\n this.config = config;\n\n if (this.enabled) {\n // Start initialization immediately but don't block constructor\n this.initPromise = this.initialize();\n }\n }\n\n private async initialize(): Promise<void> {\n try {\n // Dynamic import to avoid adding @segment/events-node as a hard dependency\n const { Analytics } = await import('@segment/analytics-node');\n this.events = new Analytics({ writeKey: this.config.writeKey });\n } catch (error) {\n console.error(\n 'Segment subscriber failed to initialize. Install @segment/events-node: pnpm add @segment/events-node',\n error,\n );\n this.enabled = false;\n }\n }\n\n private async ensureInitialized(): Promise<void> {\n if (this.initPromise) {\n await this.initPromise;\n this.initPromise = null;\n }\n }\n\n async trackEvent(name: string, attributes?: EventAttributes): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: name,\n properties: attributes,\n });\n }\n\n async trackFunnelStep(\n funnelName: string,\n step: FunnelStatus,\n attributes?: EventAttributes,\n ): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: `${funnelName}.${step}`,\n properties: {\n funnel: funnelName,\n step,\n ...attributes,\n },\n });\n }\n\n async trackOutcome(\n operationName: string,\n outcome: OutcomeStatus,\n attributes?: EventAttributes,\n ): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: `${operationName}.${outcome}`,\n properties: {\n operation: operationName,\n outcome,\n ...attributes,\n },\n });\n }\n\n async trackValue(name: string, value: number, attributes?: EventAttributes): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: name,\n properties: {\n value,\n ...attributes,\n },\n });\n }\n\n /** Flush pending events before shutdown */\n async shutdown(): Promise<void> {\n await this.ensureInitialized();\n if (this.events) {\n await this.events.closeAndFlush();\n }\n }\n}\n\n"],"mappings":";;;;AAoCA,IAAa,oBAAb,MAA0D;CACxD,AAAS,OAAO;CAChB,AAAS,UAAU;CAEnB,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ,cAAoC;CAE5C,YAAY,QAAuB;EACjC,KAAK,UAAU,OAAO,WAAW;EACjC,KAAK,SAAS;EAEd,IAAI,KAAK,SAEP,KAAK,cAAc,KAAK,WAAW;CAEvC;CAEA,MAAc,aAA4B;EACxC,IAAI;GAEF,MAAM,EAAE,cAAc,iFAAM;GAC5B,KAAK,SAAS,IAAI,UAAU,EAAE,UAAU,KAAK,OAAO,SAAS,CAAC;EAChE,SAAS,OAAO;GACd,QAAQ,MACN,wGACA,KACF;GACA,KAAK,UAAU;EACjB;CACF;CAEA,MAAc,oBAAmC;EAC/C,IAAI,KAAK,aAAa;GACpB,MAAM,KAAK;GACX,KAAK,cAAc;EACrB;CACF;CAEA,MAAM,WAAW,MAAc,YAA6C;EAC1E,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO;GACP,YAAY;EACd,CAAC;CACH;CAEA,MAAM,gBACJ,YACA,MACA,YACe;EACf,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO,GAAG,WAAW,GAAG;GACxB,YAAY;IACV,QAAQ;IACR;IACA,GAAG;GACL;EACF,CAAC;CACH;CAEA,MAAM,aACJ,eACA,SACA,YACe;EACf,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO,GAAG,cAAc,GAAG;GAC3B,YAAY;IACV,WAAW;IACX;IACA,GAAG;GACL;EACF,CAAC;CACH;CAEA,MAAM,WAAW,MAAc,OAAe,YAA6C;EACzF,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO;GACP,YAAY;IACV;IACA,GAAG;GACL;EACF,CAAC;CACH;;CAGA,MAAM,WAA0B;EAC9B,MAAM,KAAK,kBAAkB;EAC7B,IAAI,KAAK,QACP,MAAM,KAAK,OAAO,cAAc;CAEpC;AACF"}
1
+ {"version":3,"file":"segment.cjs","names":[],"sources":["../src/segment.ts"],"sourcesContent":["/**\n * Segment Subscriber for autotel\n *\n * Send events to Segment (customer data platform).\n *\n * @example\n * ```typescript\n * import { Events } from 'autotel/events';\n * import { SegmentSubscriber } from 'autotel-subscribers/segment';\n *\n * const events = new Events('checkout', {\n * subscribers: [\n * new SegmentSubscriber({\n * writeKey: process.env.SEGMENT_WRITE_KEY!\n * })\n * ]\n * });\n *\n * events.trackEvent('order.completed', { userId: '123', amount: 99.99 });\n * ```\n */\n\nimport type {\n EventSubscriber,\n EventAttributes,\n FunnelStatus,\n OutcomeStatus,\n} from 'autotel/event-subscriber';\n\nexport interface SegmentConfig {\n /** Segment write key */\n writeKey: string;\n /** Enable/disable the subscriber */\n enabled?: boolean;\n}\n\nexport class SegmentSubscriber implements EventSubscriber {\n readonly name = 'SegmentSubscriber';\n readonly version = '1.0.0';\n\n private events: any;\n private enabled: boolean;\n private config: SegmentConfig;\n private initPromise: Promise<void> | null = null;\n\n constructor(config: SegmentConfig) {\n this.enabled = config.enabled ?? true;\n this.config = config;\n\n if (this.enabled) {\n // Start initialization immediately but don't block constructor\n this.initPromise = this.initialize();\n }\n }\n\n private async initialize(): Promise<void> {\n try {\n // Dynamic import to avoid adding @segment/events-node as a hard dependency\n const { Analytics } = await import('@segment/analytics-node');\n this.events = new Analytics({ writeKey: this.config.writeKey });\n } catch (error) {\n console.error(\n 'Segment subscriber failed to initialize. Install @segment/events-node: pnpm add @segment/events-node',\n error,\n );\n this.enabled = false;\n }\n }\n\n private async ensureInitialized(): Promise<void> {\n if (this.initPromise) {\n await this.initPromise;\n this.initPromise = null;\n }\n }\n\n async trackEvent(name: string, attributes?: EventAttributes): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: name,\n properties: attributes,\n });\n }\n\n async trackFunnelStep(\n funnelName: string,\n step: FunnelStatus,\n attributes?: EventAttributes,\n ): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: `${funnelName}.${step}`,\n properties: {\n funnel: funnelName,\n step,\n ...attributes,\n },\n });\n }\n\n async trackOutcome(\n operationName: string,\n outcome: OutcomeStatus,\n attributes?: EventAttributes,\n ): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: `${operationName}.${outcome}`,\n properties: {\n operation: operationName,\n outcome,\n ...attributes,\n },\n });\n }\n\n async trackValue(name: string, value: number, attributes?: EventAttributes): Promise<void> {\n if (!this.enabled) return;\n\n await this.ensureInitialized();\n this.events?.track({\n userId: attributes?.userId || attributes?.user_id || 'anonymous',\n event: name,\n properties: {\n value,\n ...attributes,\n },\n });\n }\n\n /** Flush pending events before shutdown */\n async shutdown(): Promise<void> {\n await this.ensureInitialized();\n if (this.events) {\n await this.events.closeAndFlush();\n }\n }\n}\n\n"],"mappings":";;;;AAoCA,IAAa,oBAAb,MAA0D;CACxD,AAAS,OAAO;CAChB,AAAS,UAAU;CAEnB,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ,cAAoC;CAE5C,YAAY,QAAuB;EACjC,KAAK,UAAU,OAAO,WAAW;EACjC,KAAK,SAAS;EAEd,IAAI,KAAK,SAEP,KAAK,cAAc,KAAK,WAAW;CAEvC;CAEA,MAAc,aAA4B;EACxC,IAAI;GAEF,MAAM,EAAE,cAAc,4FAAM;GAC5B,KAAK,SAAS,IAAI,UAAU,EAAE,UAAU,KAAK,OAAO,SAAS,CAAC;EAChE,SAAS,OAAO;GACd,QAAQ,MACN,wGACA,KACF;GACA,KAAK,UAAU;EACjB;CACF;CAEA,MAAc,oBAAmC;EAC/C,IAAI,KAAK,aAAa;GACpB,MAAM,KAAK;GACX,KAAK,cAAc;EACrB;CACF;CAEA,MAAM,WAAW,MAAc,YAA6C;EAC1E,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO;GACP,YAAY;EACd,CAAC;CACH;CAEA,MAAM,gBACJ,YACA,MACA,YACe;EACf,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO,GAAG,WAAW,GAAG;GACxB,YAAY;IACV,QAAQ;IACR;IACA,GAAG;GACL;EACF,CAAC;CACH;CAEA,MAAM,aACJ,eACA,SACA,YACe;EACf,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO,GAAG,cAAc,GAAG;GAC3B,YAAY;IACV,WAAW;IACX;IACA,GAAG;GACL;EACF,CAAC;CACH;CAEA,MAAM,WAAW,MAAc,OAAe,YAA6C;EACzF,IAAI,CAAC,KAAK,SAAS;EAEnB,MAAM,KAAK,kBAAkB;EAC7B,KAAK,QAAQ,MAAM;GACjB,QAAQ,YAAY,UAAU,YAAY,WAAW;GACrD,OAAO;GACP,YAAY;IACV;IACA,GAAG;GACL;EACF,CAAC;CACH;;CAGA,MAAM,WAA0B;EAC9B,MAAM,KAAK,kBAAkB;EAC7B,IAAI,KAAK,QACP,MAAM,KAAK,OAAO,cAAc;CAEpC;AACF"}
package/dist/segment.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as __toESM } from "./chunk-CiiB0FCw.js";
1
+ import { o as __toESM } from "./rolldown-runtime-BHkdefai.js";
2
2
 
3
3
  //#region src/segment.ts
4
4
  var SegmentSubscriber = class {
@@ -15,7 +15,7 @@ var SegmentSubscriber = class {
15
15
  }
16
16
  async initialize() {
17
17
  try {
18
- const { Analytics } = await import("./cjs-j3aHAiuq.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
18
+ const { Analytics } = await import("./cjs-CY69zXGd.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
19
19
  this.events = new Analytics({ writeKey: this.config.writeKey });
20
20
  } catch (error) {
21
21
  console.error("Segment subscriber failed to initialize. Install @segment/events-node: pnpm add @segment/events-node", error);
package/dist/slack.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-BIkA7V7q.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-CfAboj1T.cjs');
3
3
  const require_event_subscriber_base = require('./event-subscriber-base-C_F3Ycbe.cjs');
4
4
 
5
5
  //#region src/slack.ts
@@ -1,7 +1,7 @@
1
- const require_chunk = require('./chunk-BIkA7V7q.cjs');
1
+ const require_rolldown_runtime = require('./rolldown-runtime-CfAboj1T.cjs');
2
2
 
3
3
  //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
4
- var tslib_es6_exports = /* @__PURE__ */ require_chunk.__exportAll({
4
+ var tslib_es6_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
5
5
  __addDisposableResource: () => __addDisposableResource,
6
6
  __assign: () => __assign,
7
7
  __asyncDelegator: () => __asyncDelegator,
@@ -452,7 +452,7 @@ function __rewriteRelativeImportExtension(path, preserveJsx) {
452
452
  return path;
453
453
  }
454
454
  var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
455
- var init_tslib_es6 = require_chunk.__esmMin((() => {
455
+ var init_tslib_es6 = require_rolldown_runtime.__esmMin((() => {
456
456
  extendStatics = function(d, b) {
457
457
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
458
458
  d.__proto__ = b;
@@ -554,4 +554,4 @@ Object.defineProperty(exports, 'tslib_es6_exports', {
554
554
  return tslib_es6_exports;
555
555
  }
556
556
  });
557
- //# sourceMappingURL=tslib.es6-Ck6tgf4J.cjs.map
557
+ //# sourceMappingURL=tslib.es6-02HJIdSd.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tslib.es6-Ck6tgf4J.cjs","names":[],"sources":["../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,UAAU,GAAG,GAAG;CAC9B,IAAI,OAAO,MAAM,cAAc,MAAM,MACjC,MAAM,IAAI,UAAU,yBAAyB,OAAO,CAAC,IAAI,+BAA+B;CAC5F,cAAc,GAAG,CAAC;CAClB,SAAS,KAAK;E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AK,WAAW;IAAE,OAAO,EAAE;GAAI;EAAE;EAEhE,OAAO,eAAe,GAAG,IAAI,IAAI;CACnC,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI;EAC1B,IAAI,OAAO,QAAW,KAAK;EAC3B,EAAE,MAAM,EAAE;CACZ;CAiGI,qBAAqB,OAAO,UAAU,SAAS,GAAG,GAAG;EACvD,OAAO,eAAe,GAAG,WAAW;GAAE,YAAY;GAAM,OAAO;EAAE,CAAC;CACpE,KAAK,SAAS,GAAG,GAAG;EAClB,EAAE,aAAa;CACjB;CAEI,UAAU,SAAS,GAAG;EACxB,UAAU,OAAO,uBAAuB,SAAU,GAAG;GACnD,IAAI,KAAK,CAAC;GACV,KAAK,IAAI,KAAK,GAAG,IAAI,OAAO,UAAU,eAAe,KAAK,GAAG,CAAC,GAAG,GAAG,GAAG,UAAU;GACjF,OAAO;EACT;EACA,OAAO,QAAQ,CAAC;CAClB;CAuDI,mBAAmB,OAAO,oBAAoB,aAAa,kBAAkB,SAAU,OAAO,YAAY,SAAS;EACrH,IAAI,IAAI,IAAI,MAAM,OAAO;EACzB,OAAO,EAAE,OAAO,mBAAmB,EAAE,QAAQ,OAAO,EAAE,aAAa,YAAY;CACjF;qBAqCe;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF"}
1
+ {"version":3,"file":"tslib.es6-02HJIdSd.cjs","names":[],"sources":["../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,UAAU,GAAG,GAAG;CAC9B,IAAI,OAAO,MAAM,cAAc,MAAM,MACjC,MAAM,IAAI,UAAU,yBAAyB,OAAO,CAAC,IAAI,+BAA+B;CAC5F,cAAc,GAAG,CAAC;CAClB,SAAS,KAAK;EAAE,KAAK,cAAc;CAAG;CACtC,EAAE,YAAY,MAAM,OAAO,OAAO,OAAO,CAAC,KAAK,GAAG,YAAY,EAAE,W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AAG,GAAG,GAAG,IAAI;EAC1B,IAAI,OAAO,QAAW,KAAK;EAC3B,EAAE,MAAM,EAAE;CACZ;CAiGI,qBAAqB,OAAO,UAAU,SAAS,GAAG,GAAG;EACvD,OAAO,eAAe,GAAG,WAAW;GAAE,YAAY;GAAM,OAAO;EAAE,CAAC;CACpE,KAAK,SAAS,GAAG,GAAG;EAClB,EAAE,aAAa;CACjB;CAEI,UAAU,SAAS,GAAG;EACxB,UAAU,OAAO,uBAAuB,SAAU,GAAG;GACnD,IAAI,KAAK,CAAC;GACV,KAAK,IAAI,KAAK,GAAG,IAAI,OAAO,UAAU,eAAe,KAAK,GAAG,CAAC,GAAG,GAAG,GAAG,UAAU;GACjF,OAAO;EACT;EACA,OAAO,QAAQ,CAAC;CAClB;CAuDI,mBAAmB,OAAO,oBAAoB,aAAa,kBAAkB,SAAU,OAAO,YAAY,SAAS;EACrH,IAAI,IAAI,IAAI,MAAM,OAAO;EACzB,OAAO,EAAE,OAAO,mBAAmB,EAAE,QAAQ,OAAO,EAAE,aAAa,YAAY;CACjF;qBAqCe;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF"}
@@ -1,4 +1,4 @@
1
- import { n as __esmMin, r as __exportAll } from "./chunk-CiiB0FCw.js";
1
+ import { n as __esmMin, r as __exportAll } from "./rolldown-runtime-BHkdefai.js";
2
2
 
3
3
  //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
4
4
  var tslib_es6_exports = /* @__PURE__ */ __exportAll({
@@ -543,4 +543,4 @@ var init_tslib_es6 = __esmMin((() => {
543
543
 
544
544
  //#endregion
545
545
  export { tslib_es6_exports as n, init_tslib_es6 as t };
546
- //# sourceMappingURL=tslib.es6-13Ha9x3r.js.map
546
+ //# sourceMappingURL=tslib.es6-Dvm0j0am.js.map