polyrouter 1.0.19 → 1.0.21
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.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +17 -17
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +7 -7
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/analytics/installation/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/setup-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/commandcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/commandcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/embedding-banners/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/chatgpt-web/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/trae/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/web-cookie/browser/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/realtime/authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/realtime/authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/realtime/tickets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/realtime/tickets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/public-telemetry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/sponsors/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/rerank/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/rerank/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +7 -7
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/realtime.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/realtime.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard/realtime/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard/realtime.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/realtime.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +7 -7
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +8 -8
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/privacy/page.js +1 -1
- package/app/.next-cli-build/server/app/privacy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/privacy.html +1 -1
- package/app/.next-cli-build/server/app/privacy.rsc +7 -7
- package/app/.next-cli-build/server/app/privacy.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/privacy.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/privacy.segments/_index.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/privacy.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/privacy.segments/privacy/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/privacy.segments/privacy.segment.rsc +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +17 -17
- package/app/.next-cli-build/server/chunks/112.js +1 -1
- package/app/.next-cli-build/server/chunks/1455.js +1 -0
- package/app/.next-cli-build/server/chunks/1522.js +2 -2
- package/app/.next-cli-build/server/chunks/1605.js +1 -1
- package/app/.next-cli-build/server/chunks/1829.js +1 -1
- package/app/.next-cli-build/server/chunks/2268.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +3 -3
- package/app/.next-cli-build/server/chunks/3212.js +1 -1
- package/app/.next-cli-build/server/chunks/3922.js +1 -1
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4293.js +1 -1
- package/app/.next-cli-build/server/chunks/5245.js +1 -1
- package/app/.next-cli-build/server/chunks/5699.js +1 -1
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/{2932.js → 6705.js} +1 -1
- package/app/.next-cli-build/server/chunks/7774.js +13 -13
- package/app/.next-cli-build/server/chunks/8185.js +1 -1
- package/app/.next-cli-build/server/chunks/827.js +1 -1
- package/app/.next-cli-build/server/chunks/8292.js +1 -1
- package/app/.next-cli-build/server/chunks/8302.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/9570.js +1 -0
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +3 -3
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-c757925df8cecd9a.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-f6f4bccbcacbeafd.js +7 -0
- package/app/.next-cli-build/static/chunks/app/{layout-b5dceb29f62eb194.js → layout-2d0385ce4543a81e.js} +1 -1
- package/app/.next-cli-build/static/chunks/b468fba8-0fe8861cc53ab943.js +1 -0
- package/app/.next-cli-build/static/css/d55dcf99ce3b35c0.css +1 -0
- package/app/custom-server.js +8 -1
- package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
- package/app/node_modules/baseline-browser-mapping/package.json +3 -3
- package/app/node_modules/playwright-core/browsers.json +9 -32
- package/app/node_modules/playwright-core/lib/coreBundle.js +5402 -4419
- package/app/node_modules/playwright-core/lib/utilsBundle.js +1934 -7341
- package/app/node_modules/playwright-core/package.json +1 -1
- package/app/package.json +1 -1
- package/app/public/downloads/polyrouter-connector.zip +0 -0
- package/app/public/providers/experiential.png +0 -0
- package/app/public/providers/explabs.png +0 -0
- package/app/public/providers/explabs.svg +9 -0
- package/app/public/providers/xpl.png +0 -0
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/2065.js +0 -1
- package/app/.next-cli-build/server/chunks/5640.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-90255f352db9d429.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-9cf3552b2aa4b803.js +0 -7
- package/app/.next-cli-build/static/chunks/9da6db1e-10cc9fd5eddee255.js +0 -1
- package/app/.next-cli-build/static/css/b41c61002c7da44b.css +0 -1
- /package/app/.next-cli-build/static/{BJ6CYOx4BYBxvTyDcUsZj → 87XHL6seNDDI_EbMngR7T}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{BJ6CYOx4BYBxvTyDcUsZj → 87XHL6seNDDI_EbMngR7T}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9432],{56122:(e,t,i)=>{i.d(t,{Ay:()=>la});var s,r,n,a="u">typeof window?window:void 0,o="u">typeof globalThis?globalThis:a,l=null==o?void 0:o.navigator,u=null==o?void 0:o.document,h=null==o?void 0:o.location,c=null==o?void 0:o.fetch,d=null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:void 0,v=null==o?void 0:o.AbortController,p=null==o?void 0:o.CompressionStream,g=null==l?void 0:l.userAgent;function f(){return!(!a||!1===a.navigator.onLine)}var _="u">typeof globalThis?globalThis:a;_&&"u"<typeof self&&(_.self=_),_&&"u"<typeof File&&(_.File=function(){});var m=null!=a?a:{},y={DEBUG:!1,LIB_VERSION:"0.7.2",LIB_NAME:"browser-common"};function b(e,t,i,s,r,n,a){try{var o=e[n](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(s,r)}function w(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function a(e){b(n,s,r,a,o,"next",e)}function o(e){b(n,s,r,a,o,"throw",e)}a(void 0)})}}function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(null,arguments)}function k(e,t){if(null==e)return{};var i={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}var E=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterestbot","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],S=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return E.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})};function P(e,t){return -1!==e.indexOf(t)}var F=function(e){return e.trim()},I=function(e){return e.replace(/^\$/,"")};function C(e){var t,i=[];return null!=(t=JSON.stringify(e,function(e,t){if("bigint"==typeof t)return t.toString();if("function"!=typeof t&&"symbol"!=typeof t){if(t instanceof Error)return{name:t.name,message:t.message,stack:t.stack};if(t&&"object"==typeof t){for(;i.length>0&&i[i.length-1]!==this;)i.pop();if(i.includes(t))return"[Circular]";i.push(t)}return t}}))?t:"null"}var O=((to={}).AnonymousId="anonymous_id",to.DistinctId="distinct_id",to.Props="props",to.EnablePersonProcessing="enable_person_processing",to.PersonMode="person_mode",to.FeatureFlagDetails="feature_flag_details",to.FeatureFlags="feature_flags",to.FeatureFlagPayloads="feature_flag_payloads",to.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",to.BootstrapFeatureFlags="bootstrap_feature_flags",to.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",to.OverrideFeatureFlags="override_feature_flags",to.Queue="queue",to.AiQueue="ai_queue",to.AiCaptureQueue="ai_capture_queue",to.LogsQueue="logs_queue",to.OptedOut="opted_out",to.SessionId="session_id",to.SessionStartTimestamp="session_start_timestamp",to.SessionLastTimestamp="session_timestamp",to.PersonProperties="person_properties",to.GroupProperties="group_properties",to.InstalledAppBuild="installed_app_build",to.InstalledAppVersion="installed_app_version",to.SessionReplay="session_replay",to.PushRegistered="push_registered",to.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",to.SurveyLastSeenDate="survey_last_seen_date",to.SurveysSeen="surveys_seen",to.Surveys="surveys",to.RemoteConfig="remote_config",to.FlagsEndpointWasHit="flags_endpoint_was_hit",to.DeviceId="device_id",to),$=((tl={}).GZipJS="gzip-js",tl.Base64="base64",tl),A=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],R=["token"],T=Object.prototype,M=T.hasOwnProperty,D=T.toString,L=Array.isArray||function(e){return"[object Array]"===D.call(e)},N=e=>"function"==typeof e,j=e=>e===Object(e)&&!L(e),q=e=>{if(j(e)){for(var t in e)if(M.call(e,t))return!1;return!0}return!1},B=e=>void 0===e,z=e=>"[object String]"==D.call(e),H=e=>z(e)&&0===e.trim().length,V=e=>null===e,U=e=>B(e)||V(e),W=e=>"[object Number]"==D.call(e)&&e==e,G=e=>W(e)&&e>0,K=e=>"[object Boolean]"===D.call(e),J=e=>P(A,e),Y=e=>P(R,e);function Q(e){return null===e||"object"!=typeof e}function Z(e,t){return({}).toString.call(e)==="[object "+t+"]"}function X(e){switch(({}).toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return et(e,Error)}}function ee(e){return"u">typeof Event&&et(e,Event)}function et(e,t){try{return e instanceof t}catch(e){return!1}}var ei=[!0,"true",1,"1","yes"],es=[!1,"false",0,"0","no"];function er(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),W(e)?e>i?(s.warn(" cannot be greater than max: "+i+". Using max value instead."),i):t>e?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+r),er(null!=r?r:i,t,i,s))}class en{constructor(e){this.C={},this.I=e.I,this.R=er(e.bucketSize,0,100,e.A),this.O=er(e.refillRate,0,this.R,e.A),this.N=er(e.refillInterval,0,864e5,e.A)}F(e,t){var i=Math.floor((t-e.lastAccess)/this.N);i>0&&(e.tokens=Math.min(e.tokens+i*this.O,this.R),e.lastAccess=e.lastAccess+i*this.N)}consumeRateLimit(e){var t,i=Date.now(),s=String(e),r=this.C[s];return r?this.F(r,i):this.C[s]=r={tokens:this.R,lastAccess:i},0===r.tokens||(r.tokens--,0===r.tokens&&(null==(t=this.I)||t.call(this,e)),0===r.tokens)}stop(){this.C={}}}var ea="Mobile",eo="Android",el="Tablet",eu=eo+" "+el,eh="iPad",ec="Apple",ed=ec+" Watch",ev="Safari",ep="BlackBerry",eg="Samsung",ef=eg+"Browser",e_=eg+" Internet",em="Chrome",ey=em+" OS",eb=em+" iOS",ew="Internet Explorer",ex=ew+" "+ea,ek="Opera",eE=ek+" Mini",eS="Edge",eP="Microsoft "+eS,eF="Firefox",eI=eF+" iOS",eC="Nintendo",eO="PlayStation",e$="Xbox",eA=eo+" "+ea,eR=ea+" "+ev,eT="Windows",eM=eT+" Phone",eD="Nokia",eL="Ouya",eN="Generic",ej=eN+" "+ea.toLowerCase(),eq=eN+" "+el.toLowerCase(),eB="Konqueror",ez="Oculus Browser",eH="Vivaldi",eV="Yandex",eU="Whale",eW="DuckDuckGo",eG="Pale Moon",eK="Waterfox",eJ="Brave",eY="Claude",eQ="Codex",eZ="ChatGPT",eX="Google Search App",e0="(\\d+(\\.\\d+)?)",e1=RegExp("Version/"+e0),e2=RegExp("("+eY+"|"+eQ+"|"+eZ+")\\/"+e0),e3=RegExp(e$,"i"),e5=RegExp(eO+" \\w+","i"),e6=RegExp(eC+" \\w+","i"),e8=RegExp(ep+"|PlayBook|BB10","i"),e4={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},e9=function(e,t,i,s){var r;return t=t||"",(null!=i&&i.brave?eJ:null)||(null!=s&&s.detectGoogleSearchApp&&P(e,"GSA/")?eX:P(e," OPR/")&&P(e,"Mini")?eE:P(e," OPR/")?ek:e8.test(e)?ep:P(e,"IE"+ea)||P(e,"WPDesktop")?ex:P(e,"OculusBrowser")?ez:P(e,ef)?e_:P(e,eS)||P(e,"Edg/")?eP:P(e,eH+"/")?eH:P(e,"YaBrowser/")?eV:P(e,eU+"/")?eU:P(e,eW+"/")||P(e,"Ddg/")?eW:P(e,eY+"/")?eY:P(e,eQ+"/")?eQ:P(e,eZ+"/")?eZ:P(e,"FBIOS")?"Facebook "+ea:P(e,"UCWEB")||P(e,"UCBrowser")?"UC Browser":P(e,"CriOS")?eb:P(e,"CrMo")||P(e,em)?em:P(e,eo)&&P(e,ev)?eA:P(e,"FxiOS")?eI:P(e.toLowerCase(),eB.toLowerCase())?eB:P(e,eJ+"/")?eJ:(r=t)&&P(r,ec)||P(e,ev)&&!P(e,em)&&!P(e,eo)?P(e,ea)?eR:ev:P(e,"PaleMoon/")?eG:P(e,eK+"/")?eK:P(e,eF)?eF:P(e,"MSIE")||P(e,"Trident/")?ew:P(e,"Gecko")?eF:"")},e7={[ex]:[RegExp("rv:"+e0)],[eP]:[RegExp(eS+"?\\/"+e0)],[em]:[RegExp("("+em+"|CrMo)\\/"+e0)],[eb]:[RegExp("CriOS\\/"+e0)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+e0)],[ev]:[e1],[eR]:[e1],[ek]:[RegExp("(Opera|OPR)\\/"+e0)],[eF]:[RegExp(eF+"\\/"+e0)],[eI]:[RegExp("FxiOS\\/"+e0)],[eB]:[RegExp("Konqueror[:/]?"+e0,"i")],[ep]:[RegExp(ep+" "+e0),e1],[eA]:[RegExp("android\\s"+e0,"i")],[e_]:[RegExp(ef+"\\/"+e0)],[ez]:[RegExp("OculusBrowser\\/"+e0)],[eH]:[RegExp(eH+"\\/"+e0)],[eV]:[RegExp("YaBrowser\\/"+e0)],[eU]:[RegExp(eU+"\\/"+e0)],[eJ]:[RegExp(eJ+"\\/"+e0)],[eY]:[e2],[eQ]:[e2],[eZ]:[e2],[eW]:[RegExp("(DuckDuckGo|Ddg)\\/"+e0)],[eG]:[RegExp("PaleMoon\\/"+e0)],[eK]:[RegExp(eK+"\\/"+e0)],[eX]:[RegExp("GSA\\/"+e0)],[ew]:[RegExp("(rv:|MSIE )"+e0)],Mozilla:[RegExp("rv:"+e0)]},te=function(e,t,i,s){var r=e7[e9(e,t,i,s)];if(B(r))return null;for(var n=0;r.length>n;n++){var a=e.match(r[n]);if(a)return parseFloat(a[a.length-2])}return null},tt=[[RegExp(e$+"; "+e$+" (.*?)[);]","i"),e=>[e$,e&&e[1]||""]],[RegExp(eC,"i"),[eC,""]],[RegExp(eO,"i"),[eO,""]],[e8,[ep,""]],[RegExp(eT,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[eM,""];if(new RegExp(ea).test(t)&&!/IEMobile\b/.test(t))return[eT+" "+ea,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=e4[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[eT,s]}return[eT,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=B(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+eo+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+eo+")","i"),e=>e&&e[2]?[eo,[e[2],e[3],e[4]||"0"].join(".")]:[eo,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ey,""]],[/Linux|debian/i,["Linux",""]]],ti=function(e){for(var t=0;tt.length>t;t++){var i=tt[t],s=i[1],r=i[0].exec(e),n=r&&(N(s)?s(r,e):s);if(n)return n}return["",""]},ts=function(e){return e6.test(e)?eC:e5.test(e)?eO:e3.test(e)?e$:RegExp(eL,"i").test(e)?eL:RegExp("("+eM+"|WPDesktop)","i").test(e)?eM:/iPad/.test(e)?eh:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?ed:e8.test(e)?ep:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(eD,"i").test(e)?eD:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(ea).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?eo:eu:RegExp("(pda|"+ea+")","i").test(e)?ej:RegExp(el,"i").test(e)&&!RegExp(el+" pc","i").test(e)?eq:""},tr="[Truncated]",tn="[Unserializable]";function ta(e){for(var t="",i=0;e.length>i;i++){var s=e.charCodeAt(i);if(55296>s||s>56319)t+=56320>s||s>57343?e[i]:"�";else{var r=e.charCodeAt(i+1);56320>r||r>57343?t+="�":(t+=e[i]+e[i+1],i++)}}return t}var to,tl,tu,th,tc,td=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function tv(e,t){return"string"==typeof e&&td.test(e)?e:t()}function tp(e,t){var i=Error(t);try{Object.defineProperty(i,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch(e){}return i}function tg(e){return e?e.split("#")[0]:e}function tf(e,t){var i=setTimeout(e,t);return(null==i?void 0:i.unref)&&(null==i||i.unref()),i}function t_(e,t,i){return tm.apply(this,arguments)}function tm(){return(tm=w(function*(e,t,i){var s;try{return yield Promise.race([e,new Promise((e,r)=>{s=tf(()=>{try{null==i||i(),e()}catch(e){r(e)}},t)})])}finally{clearTimeout(s)}})).apply(this,arguments)}class ty{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,t,0).apply(e),r=this.buildParsingContext(t),n=this.parseStacktrace(s,r);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return w(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&L(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,s;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),x({},e,{cause:i,stack:s})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return w(function*(){var i=e;for(var s of t.modifiers)i=yield s(i);return i})()}convertToExceptionList(e,t){var i,s,r,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(s=t.handled)||s,synthetic:null!=(r=e.synthetic)&&r}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,x({},t,{handled:!0}))),a}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return tc&&i.length===th||(th=i.length,tc=i.reduce((i,s)=>{tu||(tu={});var r=tu[s];if(r)i[r[0]]=r[1];else for(var n=e(s),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,u=t[s];if(l&&u){i[l]=u,tu[s]=[l,u];break}}return i},{})),tc}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var s=(i,s)=>{if(4>=s){var r=this.buildCoercingContext(e,t,s);return this.applyCoercers(i,r)}};return x({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>s(e,i),next:e=>s(e,i+1)})}}function tb(e,t,i,s,r){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!!t&&!t.startsWith("webkit-masked-url://")&&"<anonymous>"!==t};return B(s)||(n.lineno=s),B(r)||(n.colno=r),n}var tw=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),s=-1!==e.indexOf("safari-web-extension");return i||s?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},tx=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tE=/\((\S*)(?::(\d+))(?::(\d+))\)/,tS=(e,t)=>{var i=tx.exec(e);if(i)return tb(t,i[1],"?",+i[2],+i[3]);var s=tk.exec(e);if(s){if(s[2]&&0===s[2].indexOf("eval")){var r=tE.exec(s[2]);r&&(s[2]=r[1],s[3]=r[2],s[4]=r[3])}var n=tw(s[1]||"?",s[2]);return tb(t,n[1],n[0],s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},tP=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tI=(e,t)=>{var i=tP.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var s=tF.exec(i[3]);s&&(i[1]=i[1]||"eval",i[3]=s[1],i[4]=s[2],i[5]="")}var r=i[3],n=i[1]||"?",a=tw(n,r);return tb(t,r=a[1],n=a[0],i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},tC=/\(error: (.*)\)/;class tO{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=z(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return Z(e,"DOMException")}isDOMError(e){return Z(e,"DOMError")}}class t${match(e){return X(e)}coerce(e,t){var i,s=this.getStack(e);return{type:this.getType(e),value:this.getMessage(e,t),stack:null!=s?s:null==(i=t.syntheticException)?void 0:i.stack,cause:e.cause?t.next(e.cause):void 0,synthetic:void 0===s}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return String(i.error&&"string"==typeof i.error.message?i.error.message:i)}getStack(e){return e.stacktrace||e.stack||void 0}}class tA{match(e){return!!Z(e,"ErrorEvent")&&(null!=e.error||this.Vi(e))}coerce(e,t){if(null!=e.error)return t.apply(e.error);var i,s=t.apply(e.message);return x({},s,{stack:null!=(i=this.Zi(e))?i:s.stack,synthetic:!0})}Vi(e){return z(e.message)&&e.message.length>0}Zi(e){var t,i,s=null!=(t=e.lineno)?t:0,r=null!=(i=e.colno)?i:0;if(z(e.filename)&&0!==e.filename.length&&0!==s)return"Error\n at "+e.filename+":"+s+":"+r}}var tR=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class tT{match(e){return"string"==typeof e}coerce(e,t){var i,s=this.getInfos(e),r=s[0],n=s[1];return{type:null!=r?r:"Error",value:null!=n?n:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,s=e.match(tR);return s&&(t=s[1],i=s[2]),[t,i]}}var tM=["fatal","error","warning","log","info","debug"];function tD(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var s=i.length;s>0;s--){var r=i.slice(0,s).join(", ");if(t>=r.length)return s===i.length?r:r.length>t?r.slice(0,t)+"...":r}return""}class tL{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,s,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null!=(i=this.getStack(e))?i:null==(s=t.syntheticException)?void 0:s.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if(ee(e))return e.constructor.name;var t="name"in e?e.name:void 0;return z(t)&&!H(t)?t:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+tD(e)}isSeverityLevel(e){return z(e)&&!H(e)&&tM.indexOf(e)>=0}getStack(e){try{return z(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:z(e.stack)&&e.stack.length>0?e.stack:void 0}catch(e){return}}getErrorPropertyFromObject(e){for(var t in e)if(({}).hasOwnProperty.call(e,t)){var i=e[t];if(X(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tN{match(e){return ee(e)}coerce(e,t){var i,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+tD(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tj{match(e){return Q(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tq{match(e){return Z(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!ee(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var i,s=this.getUnhandledRejectionReason(e);return Q(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var tB="$message",tz="$timestamp",tH=new Set([tB,tz]),tV={enabled:!0,max_bytes:32768};function tU(e){var t;return e?{enabled:null!=(t=e.enabled)?t:tV.enabled,max_bytes:function(e,t){if(!W(e)||1/0===e||-1/0===e)return t;var i=Math.floor(e);return 0>i?t:i}(e.max_bytes,tV.max_bytes)}:x({},tV)}class tW{constructor(e){this.Fn=[],this.Dn=0,this.mn=tU(e)}setConfig(e){this.mn=tU(e),this.$n()}add(e){var t=function(e){var t;try{t=C(e)}catch(e){return}try{var i=JSON.parse(t);if(!j(i))return;var s=i[tB],r=i[tz];if(!z(s)||0===s.trim().length||!z(r)&&!W(r))return;return{step:i,json:t}}catch(e){return}}(e);if(t){var i=function(e){if("u">typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),i=0,s=0;t.length>s;s++)"%"===t[s]?(i+=1,s+=2):i+=1;return i}(t.json);i>this.mn.max_bytes||(this.Fn.push({step:t.step,bytes:i}),this.Dn+=i,this.$n())}}getAttachable(){return this.Fn.map(e=>e.step)}clear(){this.Fn=[],this.Dn=0}size(){return this.Fn.length}$n(){for(;this.Dn>this.mn.max_bytes&&this.Fn.length>0;){var e=this.Fn.shift();e&&(this.Dn-=e.bytes)}}}var tG=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(t){return e}};function tK(e){return"string"==typeof e||e}function tJ(e){return"string"==typeof e?e:void 0}var tY,tQ,tZ=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],tX="NativeGzipValidationError",t0=e=>e.length>=2&&31===e[0]&&139===e[1],t1=(e,t)=>e===$.GZipJS||t===$.GZipJS||"gzip"===t,t2=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),t3=e=>{throw tp(tX,"Native gzip produced invalid output: "+e)},t5=(tY=w(function*(e,t){18>e.size&&t3("too-short");var i=new Uint8Array((yield e.slice(0,10).arrayBuffer()));t0(i)&&8===i[2]||t3("invalid-header");var s=new DataView((yield e.slice(e.size-8).arrayBuffer()));s.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(tQ)return tQ;tQ=[];for(var e=0;256>e;e++){for(var t=e,i=0;8>i;i++)t=1&t?0xedb88320^t>>>1:t>>>1;tQ[e]=t>>>0}return tQ})(),i=0xffffffff,s=0;e.length>s;s++)i=t[255&(i^e[s])]^i>>>8;return(0xffffffff^i)>>>0})(t)&&t3("invalid-crc");var r=t.length>>>0;s.getUint32(4,!0)!==r&&t3("invalid-size")}),function(e,t){return tY.apply(this,arguments)});function t6(){return(t6=w(function*(e,t,i){void 0===t&&(t=!0);try{var s,r=(new TextEncoder).encode(e),n=new globalThis.CompressionStream("gzip"),a=n.writable.getWriter(),o=a.write(r).then(()=>a.close()).catch((s=w(function*(e){try{yield a.abort(e)}catch(e){}throw e}),function(e){return s.apply(this,arguments)})),l=new Response(n.readable).blob(),u=(yield Promise.all([l,o]))[0];return yield t5(u,r),u}catch(e){if(null!=i&&i.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}})).apply(this,arguments)}var t8={}.propertyIsEnumerable;function t4(e,t){try{return t9(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}catch(e){return[]}}function t9(e,t,i,s){var r=[];for(var n in e)if(t8.call(e,n)){if(!n){null==t||t.debug("Dropping an attribute with an empty key");continue}if(r.length>=1e3||0>=i.remainingNodes){null==t||t.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{var a=e[n];if(V(a)||B(a))continue;r.push({key:ta(n),value:function e(t,i,s,r){if(0>=s.remainingNodes)return{stringValue:tr};if(s.remainingNodes--,K(t))return{boolValue:t};if("bigint"==typeof t){var n,a;return n=t.toString(),t>=(a=BigInt("9223372036854775808"))||-a>t?(null==i||i.debug("Attribute "+n+" is outside the int64 range; encoding it as a string"),{stringValue:n}):{intValue:n}}if("number"==typeof t){if(!Number.isFinite(t))return{stringValue:String(t)};if(Number.isInteger(t)){if(Number.isSafeInteger(t))return{intValue:String(t)};if(typeof BigInt>"u")return{stringValue:String(t)};var o=BigInt(t).toString();return t>=0x8000000000000000||-0x8000000000000000>t?(null==i||i.debug("Attribute "+o+" is outside the int64 range; encoding it as a string"),{stringValue:o}):{intValue:o}}return{doubleValue:t}}if("string"==typeof t)return{stringValue:ta(t)};if("function"==typeof t)return{stringValue:"[Function]"};if("symbol"==typeof t)return{stringValue:String(t)};if("object"==typeof t&&null!==t){if(s.ancestors.has(t))return{stringValue:"[Circular]"};if(r>=20)return{stringValue:tr};if(t instanceof Date){var l=Number.isFinite(t.getTime())?t.toISOString():String(t);return{stringValue:"string"==typeof l?ta(l):String(l)}}s.ancestors.add(t);try{try{var u=t.toJSON;if("function"==typeof u)return e(u.call(t),i,s,r+1)}catch(e){}return L(t)?{arrayValue:{values:function(t,i,s,r){for(var n=[],a=Math.min(t.length,1e3),o=0;a>o&&s.remainingNodes>0;o++)try{var l=o in t?t[o]:void 0;if(U(l))continue;n.push(e(l,i,s,r))}catch(e){n.push({stringValue:tn})}return t.length>o&&n.push({stringValue:tr}),n}(t,i,s,r+1)}}:{kvlistValue:{values:t9(t,i,s,r+1)}}}finally{s.ancestors.delete(t)}}return{stringValue:ta(String(t))}}(a,t,i,s)})}catch(e){r.push({key:ta(n),value:{stringValue:tn}})}}return r}function t7(e,t,i){return x({},e.resourceAttributes,{"service.name":e.serviceName||"unknown_service"},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":i})}var ie={darwin:"macOS",win32:"Windows",linux:"Linux",android:"Android",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",aix:"AIX","Mac OS X":"macOS"},it={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},ii=it.info;function is(e,t,i,s){return{resourceLogs:[{resource:{attributes:t4(t)},scopeLogs:[{scope:{name:i,version:s},logRecords:e}]}]}}let ir=class{constructor(e,t,i,s,r,n,a){var o;void 0===n&&(n=()=>Promise.resolve()),this._instance=e,this.mn=t,this.A=i,this.Nn=s,this.qn=r,this.jn=n,this.Bn=a,this.Hn=null,this.zn=0,this.Un=0,this.Wn=0,this.Vn=0,this.Gn=0,this.Zn=!1,this.Qn=t.maxBufferSize,this.Jn=Math.max(null!=(o=t.maxQueueSize)?o:t.maxBufferSize,t.maxBufferSize),this.Kn=t.flushIntervalMs,this.Yn=t.maxBatchRecordsPerPost,this.Xn=t.rateCapWindowMs,this.ts=t.maxLogsPerInterval}clearQueue(){this.Un++,this._instance.setPersistedProperty(O.LogsQueue,[])}reset(){this.es(),this.Vn=0,this.Gn=0,this.Zn=!1,this.Wn=0,this.Yn=this.mn.maxBatchRecordsPerPost}onReconnect(){this.Wn=0,this.rs()}captureLog(e,t){var i;if(!this._instance.isDisabled&&!this._instance.optedOut&&null!=e&&e.body){var s=this.ns(e);if(null!==s)if(s.body){if(this.ss()){var r={record:function(e,t,i,s){var r,n=it[e.level||"info"]||ii,a=n.text,o=n.number,l=(void 0===(r=W(s)?s:void 0)&&(r=Date.now()),String(r)+"000000"),u={};t.distinctId&&(u.posthogDistinctId=t.distinctId),t.sessionId&&(u.sessionId=t.sessionId),t.windowId&&(u["window.id"]=t.windowId),U(t.sessionStartTimestamp)||(u.sessionStartTimestamp=String(t.sessionStartTimestamp)),U(t.lastActivityTimestamp)||(u.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(u["url.full"]=t.currentUrl),t.screenName&&(u["screen.name"]=t.screenName),t.appState&&(u["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(u.feature_flags=t.activeFeatureFlags);var h=x({},u),c=e.attributes;if(c){var d=[];try{d=Object.keys(c)}catch(e){d=[]}for(var v of d){var p=void 0;try{p=c[v]}catch(e){p=tn}Object.defineProperty(h,v,{value:p,enumerable:!0,writable:!0,configurable:!0})}}var g={timeUnixNano:l,observedTimeUnixNano:l,severityNumber:o,severityText:a,body:{stringValue:function(e){try{return ta(String(e))}catch(e){return tn}}(e.body)},attributes:t4(h,i)};return e.trace_id&&(g.traceId=e.trace_id),e.span_id&&(g.spanId=e.span_id),B(e.trace_flags)||(g.flags=e.trace_flags),g}(s,null!=(i=null==t?void 0:t.context)?i:this.Nn(),this.A,null==t?void 0:t.occurredAtMs)};this.qn(()=>this.os(r))}}else this.A.info("Log was rejected in beforeSend function")}}ns(e){var t=this.mn.beforeSend;if(!t)return e;var i=L(t)?t:[t],s=e;for(var r of i)try{var n=r(s);if(!n)return this.A.info("Log was rejected in beforeSend function"),null;s=n}catch(e){return this.A.error("Error in beforeSend function for log:",e),null}return s}ss(){if(void 0===this.ts)return!0;var e=Date.now(),t=e-this.Vn;return this.Xn>t&&t>=0||(this.Vn=e,this.Gn=0,this.Zn=!1),this.ts>this.Gn?(this.Gn++,!0):(this.Zn||(this.A.warn("captureLog dropping logs: exceeded "+this.ts+" logs per "+this.Xn+"ms"),this.Zn=!0),!1)}flush(){var e=this;return w(function*(){if(!e._instance.isDisabled)return e.Hn||(e.Hn=e.ls().finally(()=>{e.Hn=null})),e.Hn})()}ls(){var e=this;return w(function*(){e.es();var t=null!=(r=e._instance.getPersistedProperty(O.LogsQueue))?r:[];if(0!==t.length)for(var i=t.length,s=0;t.length>0&&i>s;){var r,n,a,o=e.Un;e.zn=0;var l=Math.min(t.length,e.Yn),u=t.slice(0,l),h=is(u.map(e=>e.record),e.us(),null!=(n=e.Bn)?n:e._instance.getLibraryId(),e._instance.getLibraryVersion()),c=yield e._instance.hs(h);if(e.Un!==o)return;if("too-large"===c.kind&&u.length>1)e.Yn=Math.max(1,Math.floor(u.length/2)),e.A.warn("Received 413 when sending logs batch of size "+u.length+", reducing batch size to "+e.Yn);else if("retry-later"===c.kind||("too-large"===c.kind?e.A.warn("Dropping a single log record after 413 with batch size 1 — the record is larger than the server cap and cannot be split further."):"ok"===c.kind&&e.mn.maxBatchRecordsPerPost>e.Yn&&(e.Yn=Math.min(e.mn.maxBatchRecordsPerPost,e.Yn+1)),yield e.ds(u.length),t=null!=(a=e._instance.getPersistedProperty(O.LogsQueue))?a:[],s+=u.length,"fatal"===c.kind))throw c.error}})()}ds(e){var t=this;return w(function*(){var i,s=Math.max(0,e-t.zn),r=null!=(i=t._instance.getPersistedProperty(O.LogsQueue))?i:[];t._instance.setPersistedProperty(O.LogsQueue,r.slice(s)),yield t.jn()})()}us(){var e;return e=this.mn,t7(e,this._instance.getLibraryId(),this._instance.getLibraryVersion())}os(e){var t;if(!this._instance.optedOut){var i=null!=(t=this._instance.getPersistedProperty(O.LogsQueue))?t:[];this.Jn>i.length||(i.shift(),this.zn++,this.A.info("Logs queue is full, dropping oldest record.")),i.push(e),this._instance.setPersistedProperty(O.LogsQueue,i),this.Qn>i.length?this.vs():this.rs()}}vs(e){void 0===e&&(e=this.Kn),this.cs||(this.cs=tf(()=>{this.cs=void 0,this.rs()},e))}fs(){var e=Math.min(Math.max(0,this.Wn-1),6);return this.Kn*Math.pow(2,e)}ps(){var e=this._instance.getPersistedProperty(O.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return w(function*(){t.es();var i=t.flush().catch(()=>{});void 0!==e?yield t_(i,e):yield i})()}flushWithTimeout(e){var t=this;return w(function*(){var i=t.flush();yield t_(i,e,()=>{i.catch(()=>{})})})()}rs(){this.flush().then(()=>{this.Wn=0},e=>{this.Wn++,this.A.error("PostHog logs flush failed:",e)}).finally(()=>{!this._instance.isDisabled&&this.ps()&&this.vs(this.fs())})}es(){this.cs&&(clearTimeout(this.cs),this.cs=void 0)}};var ia=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function io(e){return String(e)+"000000"}function il(e,t,i,s){var r="";return s&&(r=Object.keys(s).sort().map(e=>JSON.stringify(e)+":"+JSON.stringify(s[e])).join(",")),e+"\0"+t+"\0"+(null!=i?i:"")+"\0"+r}let iu=class{constructor(e,t,i){this._instance=e,this.mn=t,this.A=i,this.gs=new Map,this.Hn=null,this.ys=!1,this.bs=new Map,this._s=new Set,this.ws=0}count(e,t,i){void 0===t&&(t=1),this.ks({name:e,type:"count",value:t,unit:null==i?void 0:i.unit,attributes:null==i?void 0:i.attributes})}gauge(e,t,i){this.ks({name:e,type:"gauge",value:t,unit:null==i?void 0:i.unit,attributes:null==i?void 0:i.attributes})}histogram(e,t,i){this.ks({name:e,type:"histogram",value:t,unit:null==i?void 0:i.unit,attributes:null==i?void 0:i.attributes})}flush(){var e,t=this,i=this.Hn,s=(e=w(function*(){i&&(yield i.catch(()=>{})),yield t.Ss()}),function(){return e.apply(this,arguments)})().finally(()=>{this.Hn===s&&(this.Hn=null)});return this.Hn=s,s}drainWindow(){if(0===this.gs.size)return null;var e=this.gs;return this.gs=new Map,this.ys=!1,this.bs=new Map,this._s=new Set,this.xs(e)}reset(){this.ws++,this.es(),this.gs=new Map,this.Hn=null,this.ys=!1,this.bs=new Map,this._s=new Set}ks(e){if(!this._instance.isDisabled&&!this._instance.optedOut){var t=this.ns(e);if(null!==t)if(t.name&&"string"==typeof t.name)if("number"==typeof t.value&&Number.isFinite(t.value))if("count"===t.type&&0>t.value)this.A.warn("Dropping count '"+t.name+"': counters are monotonic, value must be >= 0");else{try{i=t.attributes?x({},t.attributes):void 0,s=il(t.type,t.name,t.unit,i)}catch(e){return void this.A.warn("Dropping metric '"+t.name+"': attributes could not be serialized",e)}var i,s,r=this.gs.get(s);if(!r){if(!this.Cs())return;r={name:t.name,type:t.type,unit:t.unit,attributes:i,windowStartMs:Date.now()},this.gs.set(s,r)}var n=this.bs.get(t.name);void 0===n?this.bs.set(t.name,t.type):n===t.type||this._s.has(t.name)||(this._s.add(t.name),this.A.warn("Metric name '"+t.name+"' is already used as a "+n+"; recording it as a "+t.type+" too will blend both series in charts. Use a distinct name.")),this.Ts(r,t.value),this.vs()}else this.A.warn("Dropping metric '"+t.name+"': value must be a finite number");else this.A.warn("Dropping metric with empty name")}}Cs(){return this.mn.maxSeriesPerFlush>this.gs.size||(this.ys||(this.ys=!0,this.A.warn("Metric series cap reached ("+this.mn.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")),!1)}Ts(e,t){var i;switch(e.type){case"count":e.total=(null!=(i=e.total)?i:0)+t;break;case"gauge":e.last=t;break;case"histogram":e.hist||(e.hist={count:0,sum:0,min:t,max:t,bucketCounts:Array(ia.length+1).fill(0)});var s=e.hist;s.count+=1,s.sum+=t,s.min=Math.min(s.min,t),s.max=Math.max(s.max,t),s.bucketCounts[function(e,t){for(var i=0;t.length>i;i++)if(t[i]>=e)return i;return t.length}(t,ia)]+=1}}ns(e){var t=this.mn.beforeSend;if(!t)return e;var i=L(t)?t:[t],s=e;for(var r of i)try{var n=r(s);if(!n)return this.A.info("Metric was rejected in beforeSend function"),null;s=n}catch(e){return this.A.error("Error in beforeSend function for metric:",e),null}return s}vs(){this.cs||(this.cs=tf(()=>{this.cs=void 0,this.flush().catch(e=>{this.A.error("Metrics flush failed:",e)})},this.mn.flushIntervalMs))}es(){this.cs&&(clearTimeout(this.cs),this.cs=void 0)}Ss(){var e=this;return w(function*(){if(0!==e.gs.size){var t=e.gs;e.gs=new Map,e.ys=!1,e.bs=new Map,e._s=new Set;var i=e.ws,s=yield e._instance.Ms(e.xs(t));if(i===e.ws)switch(s.kind){case"ok":return;case"retry-later":return e.Is(t),void e.vs();case"too-large":return void e.A.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void e.A.error("Failed to send metrics batch:",s.error)}}})()}xs(e){var t,i,s,r;return t=this.Es(e),i=t7(this.mn,this._instance.getLibraryId(),this._instance.getLibraryVersion()),s=this._instance.getLibraryId(),r=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:t4(i)},scopeMetrics:[{scope:{name:s,version:r},metrics:t}]}]}}Es(e){var t=io(Date.now()),i=new Map;for(var s of e.values()){var r,n=il(s.type,s.name,s.unit,void 0),a=i.get(n);a||(a=x({name:s.name},s.unit&&{unit:s.unit}),"count"===s.type?a.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:"gauge"===s.type?a.gauge={dataPoints:[]}:a.histogram={aggregationTemporality:1,dataPoints:[]},i.set(n,a));var o=t4(null!=(r=s.attributes)?r:{},this.A),l=io(s.windowStartMs);if("count"===s.type){var u,h={attributes:o,startTimeUnixNano:l,timeUnixNano:t,asDouble:null!=(u=s.total)?u:0};a.sum.dataPoints.push(h)}else if("gauge"===s.type){var c,d={attributes:o,timeUnixNano:t,asDouble:null!=(c=s.last)?c:0};a.gauge.dataPoints.push(d)}else s.hist&&a.histogram.dataPoints.push({attributes:o,startTimeUnixNano:l,timeUnixNano:t,count:s.hist.count,sum:s.hist.sum,min:s.hist.min,max:s.hist.max,bucketCounts:s.hist.bucketCounts,explicitBounds:ia})}return Array.from(i.values())}Is(e){var t,i;for(var s of e){var r=s[0],n=s[1],a=this.gs.get(r);if(a)switch(a.windowStartMs=Math.min(a.windowStartMs,n.windowStartMs),a.type){case"count":a.total=(null!=(t=a.total)?t:0)+(null!=(i=n.total)?i:0);break;case"gauge":break;case"histogram":if(n.hist)if(a.hist){a.hist.count+=n.hist.count,a.hist.sum+=n.hist.sum,a.hist.min=Math.min(a.hist.min,n.hist.min),a.hist.max=Math.max(a.hist.max,n.hist.max);for(var o=0;a.hist.bucketCounts.length>o;o++)a.hist.bucketCounts[o]+=n.hist.bucketCounts[o]}else a.hist=n.hist}else this.Cs()&&this.gs.set(r,n)}}};var ih=function(e,t){var i=(void 0===t?{}:t).debugEnabled,s={q(t){if(a&&(y.DEBUG||a.POSTHOG_DEBUG||i)&&!B(a.console)&&a.console){for(var s=("__rrweb_original__"in a.console[t])?a.console[t].__rrweb_original__:a.console[t],r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];s(e,...n)}},debug(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.q("debug",...t)},info(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.q("log",...t)},warn(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.q("warn",...t)},error(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.q("error",...t)},critical(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];console.error(e,...i)},uninitializedWarning(e){s.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>ih(e+" "+t,i)};return s},ic=ih("[PostHog.js]"),id=ic.createLogger,iv=id("[ExternalScriptsLoader]"),ip=e=>{var t=null==u?void 0:u.querySelectorAll("script");if(t){for(var i=0;t.length>i;i++)if(t[i].src===e||t[i].getAttribute("src")===e)return t[i]}},ig=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return iv.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=ip(t);if(s){if(s.__posthog_loading_callback_fired)return i();var r=s.__posthog_loading_error;return r?i(r):(s.addEventListener("load",e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)}),void s.addEventListener("error",e=>{s.__posthog_loading_error=e,i(e)}))}var n=()=>{if(!u)return i("document not found");if(ip(t))return ig(e,t,i);var s=u.createElement("script");if(s.type="text/javascript",s.crossOrigin="anonymous",s.src=t,s.onload=e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)},s.onerror=e=>{s.__posthog_loading_error=e,i(e)},e.config.prepare_external_dependency_script&&(s=e.config.prepare_external_dependency_script(s)),!s)return i("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)u.head.appendChild(s);else{var r,n=u.querySelectorAll("body > script");n.length>0?null==(r=n[0].parentNode)||r.insertBefore(s,n[0]):u.body.appendChild(s)}};null!=u&&u.body?n():null==u||u.addEventListener("DOMContentLoaded",n)},i_={},im=(e,t)=>{var i="/static/"+t+".js?v="+e.version;return"toolbar"===t&&(i=i+"&t="+3e5*Math.floor(Date.now()/3e5)),e.requestRouter.endpointFor("assets",i)};m.__PosthogExtensions__=m.__PosthogExtensions__||{},m.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{if("remote-config"!==t){var s=e.config.strict_script_versioning;if(s){var r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js"),n=i_[r];if("fallback"===s&&n){if(ip(n))return void ig(e,n,i);delete i_[r]}ig(e,r,"fallback"===s?(s,n)=>{if(s)if("string"==typeof s)i(s);else{var a,o=im(e,t);i_[r]=o;var l=ip(r);null==l||null==(a=l.parentNode)||a.removeChild(l),ig(e,o,i)}else i(void 0,n)}:i)}else ig(e,im(e,t),i)}else{var a=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");ig(e,a,i)}},m.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);ig(e,s,i)},y.DEBUG=!1,y.LIB_VERSION="1.427.2",y.LIB_NAME="web";var iy="$people_distinct_id",ib="distinct_id",iw="$device_id",ix="$device_model",ik="__alias",iE="$fbc",iS="$fbc_persistence",iP="__timers",iF="$autocapture_disabled_server_side",iI="$heatmaps_enabled_server_side",iC="$exception_capture_enabled_server_side",iO="$error_tracking_suppression_rules",i$="$error_tracking_capture_extension_exceptions",iA="$web_vitals_enabled_server_side",iR="$dead_clicks_enabled_server_side",iT="$product_tours_enabled_server_side",iM="$logs_capture_enabled_server_side",iD="$web_vitals_allowed_metrics",iL="$session_recording_remote_config",iN="$replay_sample_rate",ij="$replay_override_sampling",iq="$replay_override_linked_flag",iB="$replay_override_url_trigger",iz="$replay_override_event_trigger",iH="$sesid",iV="$session_is_sampled",iU="$enabled_feature_flags",iW="$active_feature_flags",iG="$early_access_features",iK="$feature_flag_details",iJ="$feature_flag_payloads",iY="$feature_flag_request_id",iQ="$minimal_flag_called_events",iZ="$override_feature_flags",iX="$override_feature_flag_payloads",i0="$stored_person_properties",i1="$stored_group_properties",i2="$groups",i3="$surveys",i5="$surveys_loaded_at",i6="$surveys_activated",i8="$surveys_activated_session",i4="$surveys_activated_timestamps",i9="ph_product_tours",i7="$flag_call_reported",se="$flag_call_reported_session_id",st="$feature_flag_errors",si="$feature_flag_evaluated_at",ss="$user_state",sr="$client_session_props",sn="$capture_rate_limit",sa="$initial_campaign_params",so="$initial_referrer_info",sl="$initial_person_info",su="$epp",sh="$posthog_cookieless",sc="$cookieless_mode",sd="$sdk_debug_extensions_init_method",sv="$sdk_debug_extensions_init_time_ms",sp="$sdk_debug_recording_script_not_loaded",sg="PostHog loadExternalDependency extension not found.",sf="on_reject",s_="always",sm="anonymous",sy="identified",sb="identified_only",sw="visibilitychange",sx="beforeunload",sk="$pageview",sE="$pageleave",sS="$identify",sP="$groupidentify";function sF(e,t){L(e)&&e.forEach(t)}function sI(e,t){if(!U(e))if(L(e))e.forEach(t);else if(e instanceof FormData)e.forEach((e,i)=>t(e,i));else for(var i in e)M.call(e,i)&&t(e[i],i)}var sC=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];for(var r of i)for(var n in r)void 0!==r[n]&&(e[n]=r[n]);return e};function sO(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var s$=function(e){try{return e()}catch(e){return}},sA=function(e){return function(){try{for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,i)}catch(e){ic.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ic.critical(e)}}},sR=function(e){var t={};return sI(e,function(e,i){(z(e)&&e.length>0||W(e))&&(t[i]=e)}),t},sT=["herokuapp.com","vercel.app","netlify.app"];function sM(e,t,i,s){var r=null!=s?s:{},n=r.capture,a=r.passive;null==e||e.addEventListener(t,i,{capture:void 0!==n&&n,passive:void 0===a||a})}function sD(e){return"ph_toolbar_internal"===e.name}var sL=e=>{if(u){try{for(var t=e+"=",i=u.cookie.split(";").filter(e=>e.length),s=0;i.length>s;s++){for(var r=i[s];" "==r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}}catch(e){}return null}};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return W(e)&&isFinite(e)&&Math.floor(e)===e});class sN{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(s)||0>e||0>t||0>i||0>s||e>0xffffffffffff||t>4095||i>0x3fffffff||s>0xffffffff)throw RangeError("invalid field value");var r=new Uint8Array(16);return r[0]=e/0x10000000000,r[1]=e/0x100000000,r[2]=e/0x1000000,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=s>>>24,r[13]=s>>>16,r[14]=s>>>8,r[15]=s,new sN(r)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new sN(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class sj{generate(){var e=this.generateOrAbort();if(!B(e))return e;this.Kr=0;var t=this.generateOrAbort();if(B(t))throw Error("Could not generate UUID after timestamp reset");return t}generateOrAbort(){var e=Date.now();if(e>this.Kr)this.Kr=e,this.Xr();else{if(this.Kr>=e+1e4)return;this.ti++,this.ti>0x3ffffffffff&&(this.Kr++,this.Xr())}return sN.fromFieldsV7(this.Kr,Math.trunc(this.ti/0x40000000),0x3fffffff&this.ti,this.ei.nextUint32())}Xr(){this.ti=1024*this.ei.nextUint32()+(1023&this.ei.nextUint32())}constructor(){this.Kr=0,this.ti=0,this.ei=new sz}}var sq,sB=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};a&&!B(a.crypto)&&crypto.getRandomValues&&(sB=e=>crypto.getRandomValues(e));class sz{nextUint32(){return this.De.length>this.ri||(sB(this.De),this.ri=0),this.De[this.ri++]}constructor(){this.De=new Uint32Array(8),this.ri=1/0}}var sH=()=>sV().toString(),sV=()=>(sq||(sq=new sj)).generate(),sU="",sW=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,sG=null,sK={ii(){if(!V(sG))return sG;if(sG=!1,u)try{var e="__ph_cookie_support_"+sH();sK.ni(e,"xyz"),sG='"xyz"'===sL(e),sK.oi(e)}catch(e){sG=!1}return sG},si(e){ic.error("cookieStore error: "+e)},ai:sL,ui(e){var t;try{t=JSON.parse(sK.ai(e))||{}}catch(e){}return t},ni(e,t,i,s,r){if(!u)return!1;try{var n="",a="",o=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=u),sU)return sU;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),r="dmn_chk_"+sH();!sU&&s--;){var n=i.slice(s).join("."),a=r+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(r)&&(t.cookie=a+";max-age=0",sU=n)}return sU}(e);if(!i){var s,r=(s=e.match(sW))?s[0]:"";r!==i&&ic.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(u.location.hostname,s);if(i){var l=new Date;l.setTime(l.getTime()+864e5*i),n="; expires="+l.toUTCString()}r&&(a="; secure");var h=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+o+a;return h.length>3686.4&&ic.warn("cookieStore warning: large cookie, len="+h.length),u.cookie=h,!0}catch(e){return!1}},oi(e,t){if(null!=u&&u.cookie)try{sK.ni(e,"",-1,t)}catch(e){return}}},sJ=null,sY={ii(){if(!V(sJ))return sJ;var e=!0;if(B(a))e=!1;else try{var t="__mplssupport__";sY.ni(t,"xyz"),'"xyz"'!==sY.ai(t)&&(e=!1),sY.oi(t)}catch(t){e=!1}return e||ic.error("localStorage unsupported; falling back to cookie store"),sJ=e,e},si(e){ic.error("localStorage error: "+e)},ai(e){try{return null==a?void 0:a.localStorage.getItem(e)}catch(e){sY.si(e)}return null},ui(e){try{return JSON.parse(sY.ai(e))||{}}catch(e){}return null},ni(e,t){try{return null==a||a.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){sY.si(e)}return!1},oi(e){try{null==a||a.localStorage.removeItem(e)}catch(e){sY.si(e)}}},sQ=[i0,iW,iU,iK,iJ,iY,si,st,i7],sZ=[iw,ib,iH,iV,su,sl,iS,ss],sX=["__proto__","constructor","prototype"],s0=e=>{if(!j(e))return{};var t={};return Object.keys(e).forEach(i=>{-1===sX.indexOf(i)&&(t[i]=e[i])}),t},s1=function(e,t){void 0===t&&(t=[]);var i={};return[...sZ,...t].forEach(t=>{var s=e[t];B(s)||V(s)||""===s||(i[t]=s)}),i},s2=e=>{for(var t=5381,i=0x811c9dc5,s=0;e.length>s;s++){var r=e.charCodeAt(s);t=33*t^r,i=Math.imul(i^r,0x1000193)}return e.length.toString(36)+"."+(t>>>0).toString(36)+"."+(i>>>0).toString(36)},s3=(e,t)=>({p:t,f:s2(JSON.stringify(e))}),s5=(e,t)=>{if(!t)return{properties:[],isValid:!1};try{var i=sK.ui(e+"_cpm"),s=(null==i?void 0:i.f)===s2(t)&&L(i.p);return{properties:s?i.p:[],isValid:s}}catch(e){return{properties:[],isValid:!1}}},s6=(e,t)=>t+"|"+(sK.ai(e+"_cpm")||""),s8={},s4={ii:()=>!0,si(e){ic.error("memoryStorage error: "+e)},ai:e=>e in s8?s8[e]:null,ui:e=>e in s8?s8[e]:null,ni:(e,t)=>(s8[e]=t,!0),oi(e){delete s8[e]}},s9=null,s7={ii(){if(!V(s9))return s9;if(s9=!0,B(a))s9=!1;else try{var e="__support__";s7.ni(e,"xyz"),'"xyz"'!==s7.ai(e)&&(s9=!1),s7.oi(e)}catch(e){s9=!1}return s9},si(e){ic.error("sessionStorage error: ",e)},ai(e){try{return null==a?void 0:a.sessionStorage.getItem(e)}catch(e){s7.si(e)}return null},ui(e){try{return JSON.parse(s7.ai(e))||null}catch(e){}return null},ni(e,t){try{return null==a||a.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(e){s7.si(e)}return!1},oi(e){try{null==a||a.sessionStorage.removeItem(e)}catch(e){s7.si(e)}}};class re{constructor(e){this._instance=e}get mn(){return this._instance.config}get consent(){return this.Vs()?0:this.Gs}isOptedOut(){return this.mn.cookieless_mode===s_||this.isRejected()||-1===this.consent&&this.mn.cookieless_mode===sf}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.mn.opt_out_capturing_by_default}optInOut(e){this.Zs.ni(this.Qs,+!!e,this.mn.cookie_expiration,this.mn.cross_subdomain_cookie,this.mn.secure_cookie)}reset(){this.Zs.oi(this.Qs,this.mn.cross_subdomain_cookie)}get Qs(){var e=this._instance.config,t=e.token,i=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(i?i+t:"__ph_opt_in_out_"+t)}get Gs(){var e=this.Zs.ai(this.Qs);return P(ei,e)?1:P(es,e)?0:-1}get Zs(){var e=this.mn.opt_out_capturing_persistence_type,t="localStorage"===e?sY:sK,i=t.ii()?t:s4;if(!this.Js||this.Js!==i){this.Js=i;var s="localStorage"===e?sK:sY;s.ai(this.Qs)&&(this.Js.ai(this.Qs)||this.optInOut(P(ei,s.ai(this.Qs))),s.oi(this.Qs,this.mn.cross_subdomain_cookie))}return this.Js}Vs(){return!!this.mn.respect_dnt&&[null==l?void 0:l.doNotTrack,null==l?void 0:l.msDoNotTrack,m.doNotTrack,null==l?void 0:l.globalPrivacyControl].some(e=>P(ei,e))}}function rt(e,t){var i,s=null==e||null==(i=e.config)?void 0:i.get_current_url;if(!N(s))return t;try{var r=s(t);return z(r)&&r?r:t}catch(e){return ic.error("Error in get_current_url, falling back to window.location.href",e),t}}var ri="__POSTHOG_TOOLBAR__";function rs(e){return e instanceof Element&&(e.id===ri||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function rr(e){return!!e&&1===e.nodeType}function rn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function ra(e){return!!e&&3===e.nodeType}function ro(e){return!!e&&11===e.nodeType&&rr(e.host)}function rl(e){return e?F(e).split(/\s+/):[]}function ru(e,t){var i,s,r=B(s=null==a||null==(i=a.location)?void 0:i.href)?void 0:rt(t,s);return!!(r&&e&&e.some(e=>r.match(e)))}function rh(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return rl(t)}function rc(e){return U(e)?null:F(e).split(/(\s+)/).filter(e=>rT(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function rd(e){var t="";return rP(e)&&!rF(e)&&e.childNodes&&e.childNodes.length&&sI(e.childNodes,function(e){var i;ra(e)&&e.textContent&&(t+=null!=(i=rc(e.textContent))?i:"")}),F(t)}function rv(e){var t;return B(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var rp=["a","button","form","input","select","textarea","label"];function rg(e,t){if(B(t))return!0;var i,s=function(e){if(t.some(t=>(function(e,t){var i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!i&&i.call(e,t)}catch(e){return!1}})(e,t)))return{v:!0}};for(var r of e)if(i=s(r))return i.v;return!1}function rf(e){var t=e.parentNode;return!(!t||!rr(t))&&t}var r_=[".ph-no-autocapture","[data-ph-no-autocapture]"],rm=["next","previous","prev",">","<"],ry=[...rm,"+","-","−","–"],rb=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,rw=[".ph-no-rageclick",".ph-no-capture"],rx=["","text","search","email","password","url","tel","number"];function rk(e,t){if(!a||rE(e)||(K(t)?(s=!!t&&rw,r=void 0,n=!1):(s=null!=(o=null==t?void 0:t.css_selector_ignorelist)?o:rw,r=null==t?void 0:t.content_ignorelist,n=null!=(l=null==t?void 0:t.ignore_text_selection)&&l),!1===s)||n&&!(!(i=e)||!rr(i))&&(rn(i,"textarea")||(rn(i,"input")?P(rx,(i.getAttribute("type")||"").toLowerCase()):function(e){if(e.isContentEditable)return!0;var t=null==e.getAttribute?void 0:e.getAttribute("contenteditable");return"true"===t||""===t}(i))))return!1;var i,s,r,n,o,l,u=rS(e,!1).targetElementList;return!function(e,t){var i;if(!1===e||B(e))return!1;if(!0===e)i=rm;else{if(!L(e))return!1;if(e.length>10)return ic.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var t=e.safeText,s=e.ariaLabel;return i.some(e=>rb(t,e)||rb(s,e))})}(r,u.map(e=>{var t;return{safeText:rd(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!rg(u,s)}var rE=e=>!e||rn(e,"html")||!rr(e),rS=(e,t)=>{if(!a||rE(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,s=[e],r=e;r.parentNode&&!rn(r,"body");)if(ro(r.parentNode))s.push(r.parentNode.host),r=r.parentNode.host;else{var n=rf(r);if(!n)break;if(t||rp.indexOf(n.tagName.toLowerCase())>-1)i=!0;else try{var o=a.getComputedStyle(n);o&&"pointer"===o.getPropertyValue("cursor")&&(i=!0)}catch(e){}s.push(n),r=n}return{parentIsUsefulElement:i,targetElementList:s}};function rP(e){for(var t=new Set,i=0,s=e;s.parentNode&&!rn(s,"body");s=s.parentNode){if(i++>=1e3||t.has(s))return!1;t.add(s);var r=rh(s);if(P(r,"ph-sensitive")||P(r,"ph-no-capture"))return!1}if(P(rh(e),"ph-include"))return!0;var n=e.type||"";if(z(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var a=e.name||e.id||"";return!z(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function rF(e){return!!(rn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||rn(e,"select")||rn(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var rI=RegExp("^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$"),rC=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,rO=[16,15,14,13],r$=RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),rA=RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),rR=/[0-9A-Za-z_]/;function rT(e,t){return void 0===t&&(t=!0),!(U(e)||z(e)&&(e=F(e),(t?rI.test((e||"").replace(/[- ]/g,"")):function(e){var t;for(rC.lastIndex=0;t=rC.exec(e);){var i=t[2];if(i)for(var s=i.replace(/[- ]/g,""),r=0;s.length>r;r++)for(var n of rO){var a=r+n;if(s.length>=a){var o=s.slice(r,a);if(rI.test(o)&&function(e){for(var t=0,i=!1,s=e.length-1;s>=0;s--){var r=e.charCodeAt(s)-48;i&&(r*=2)>9&&(r-=9),t+=r,i=!i}return t%10==0}(o))return!0}}}return!1}(e))||(t?r$.test(e):function(e){var t;for(rA.lastIndex=0;t=rA.exec(e);){var i=t[1],s=t[3];if(!(i&&s&&rR.test(i)&&rR.test(s)))return!0}return!1}(e))))&&!0}function rM(e){var t=rd(e);return rT(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&sI(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=rd(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){ic.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function rD(e){return e.replace(/"|\\"/g,'\\"')}var rL=id("[Dead Clicks]"),rN=()=>!0,rj=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(iR)),s=e.instance.config.capture_dead_clicks;return K(s)?s:!!j(s)||i};class rq{get lazyLoadedDeadClicksAutocapture(){return this.Ks}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){if(e.ok){var t=e.config;"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[iR]:t.captureDeadClicks}),this.startIfEnabledOrStop())}}startIfEnabledOrStop(){this.isEnabled(this)?this.Ys(()=>{this.Xs()}):this.stop()}Ys(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.initDeadClicksAutocapture?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?rL.error("failed to load script",t):e()})}Xs(){var e;if(u){if(!this.Ks&&null!=(e=m.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=j(this.instance.config.capture_dead_clicks)?x({},this.instance.config.capture_dead_clicks):{};t.__onCapture=this.onCapture,this.onCapture&&(t.capture_dead_swipes=!1),this.Ks=m.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.Ks.start(u),rL.info("starting...")}}else rL.error("`document` not found. Cannot start.")}stop(){this.Ks&&(this.Ks.stop(),this.Ks=void 0,rL.info("stopping..."))}}var rB=id("[SegmentIntegration]");function rz(e,t,i){void 0===i&&(i=!0);var s=e.config.segment;if(!s)return t();!function(e,t,i){var s=e.config.segment;if(!s)return t();var r=s=>{var r=()=>s.anonymousId()||sH();e.config.get_device_id=r,i&&s.id()&&(e.register({distinct_id:s.id(),$device_id:r()}),e.persistence.set_property(ss,sy)),t(i?void 0:s.anonymousId()||void 0)},n=s.user();"then"in n&&N(n.then)?n.then(r):r(n)}(e,i=>{var r,n;s.register((r=i,"u">typeof Promise&&Promise.resolve||rB.warn("This browser does not have Promise support, and can not use the segment integration"),n=(t,i)=>{if(!i)return t;var s=!!r&&t.event.anonymousId===r&&!t.event.userId;s||t.event.userId||t.event.anonymousId===e.get_distinct_id()||(rB.info("No userId set, resetting PostHog"),e.reset()),s||(r=void 0),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(rB.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var n=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},n,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>n(e,e.event.event),page:e=>n(e,sk),identify:e=>n(e,sS),screen:e=>n(e,"$screen")})).then(()=>{t()},e=>{rB.error("Failed to register the Segment integration",e),t()})},i)}var rH="posthog-js";function rV(e,t){var i=void 0===t?{}:t,s=i.organization,r=i.projectId,n=i.prefix,a=i.severityAllowList,o=void 0===a?["error"]:a,l=i.sendExceptionsToPostHog,u=void 0===l||l;return t=>{if("*"!==o&&!o.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var i=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=i,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var a,l,h,c,d,v,p=(null==(a=t.exception)?void 0:a.values)||[],g=p.map(e=>x({},e,{stacktrace:e.stacktrace?x({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>x({},e,{platform:"web:javascript"}))}):void 0})),f={$exception_message:(null==(l=p[0])?void 0:l.value)||t.message,$exception_type:null==(h=p[0])?void 0:h.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=p[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=p[0])?void 0:d.type,$sentry_tags:t.tags};return s&&r&&(f.$sentry_url=(n||"https://sentry.io/organizations/")+s+"/issues/?project="+r+"&query="+t.event_id),u&&(null==(v=e.exceptions)||v.sendExceptionEvent(f)),t}}class rU{constructor(e,t,i,s,r,n){this.name=rH,this.setupOnce=function(a){a(rV(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}class rW{constructor(e){this.eo=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength||i.crossTabAdoption)&&(ic.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.io=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.ro()}ro(){var e;this.no=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.eo)}destroy(){var e;null==(e=this.no)||e.call(this),this.no=void 0}doPageView(e,t){var i,s=this.so(e,t);return this.io={pathname:null!=(i=null==a?void 0:a.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.so(e,null==(t=this.io)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.io)?void 0:e.pageViewId}}so(e,t){var i=this.io;if(!i)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:i.pageViewId},r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){var n=r.maxScrollHeight,a=r.lastScrollY,o=r.maxScrollY,l=r.maxContentHeight,u=r.lastContentY,h=r.maxContentY;if(!(B(n)||B(a)||B(o)||B(l)||B(u)||B(h))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),u=Math.ceil(u),h=Math.ceil(h);var c=n>1?er(a/n,0,1,ic):1,d=n>1?er(o/n,0,1,ic):1,v=l>1?er(u/l,0,1,ic):1,p=l>1?er(h/l,0,1,ic):1;s=sC(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:c,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:v,$prev_pageview_max_content:h,$prev_pageview_max_content_percentage:p})}}return i.pathname&&(s.$prev_pageview_pathname=i.pathname),i.timestamp&&(s.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),s}}var rG=["flags","surveys"],rK={[iy]:{exposure:"hidden"},[ik]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[iP]:{exposure:"hidden"},[iS]:{exposure:"hidden"},[iF]:{exposure:"event"},[iI]:{exposure:"hidden"},[iM]:{exposure:"hidden"},[iC]:{exposure:"event"},[iO]:{exposure:"hidden"},[i$]:{exposure:"event"},[iA]:{exposure:"event"},[iR]:{exposure:"event"},[iT]:{exposure:"hidden"},[iD]:{exposure:"event"},[iL]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[iH]:{exposure:"hidden"},[iV]:{exposure:"event"},[iN]:{exposure:"event",shouldSkipFromEventProperties:e=>V(e)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[iU]:{exposure:"hidden",storageGroup:"flags"},[iW]:{exposure:"hidden",storageGroup:"flags"},[iG]:{exposure:"hidden"},[iK]:{exposure:"hidden",storageGroup:"flags"},[iJ]:{exposure:"hidden",storageGroup:"flags"},[iY]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[iQ]:{exposure:"hidden",storageGroup:"flags"},[iZ]:{exposure:"hidden"},[iX]:{exposure:"hidden"},[i0]:{exposure:"hidden"},[i1]:{exposure:"hidden"},[i3]:{exposure:"hidden",storageGroup:"surveys"},[i5]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[i6]:{exposure:"event"},[i8]:{exposure:"hidden"},[i4]:{exposure:"hidden"},[i9]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$product_tours_activated_session:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[i7]:{exposure:"hidden"},[se]:{exposure:"hidden"},[i2]:{exposure:"event"},[st]:{exposure:"hidden"},[si]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[ss]:{exposure:"hidden"},[sr]:{exposure:"hidden"},[sn]:{exposure:"hidden"},[sa]:{exposure:"hidden"},[so]:{exposure:"hidden"},[sl]:{exposure:"hidden"},[su]:{exposure:"hidden"},[ij]:{exposure:"event"},[iq]:{exposure:"event"},[iB]:{exposure:"event"},[iz]:{exposure:"event"},[sd]:{exposure:"event"},[sv]:{exposure:"event"},[sp]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_pending_trigger_conditions:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},rJ=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],rY=e=>{var t=rK[e];if(t)return t;for(var i of rJ){var s=i[1];if(0===e.indexOf(i[0]))return s}},rQ=(e,t)=>{try{return JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t)}catch(t){return C(e)}},rZ=e=>{var t=null==u?void 0:u.createElement("a");return B(t)?null:(t.href=e,t)},rX=function(e,t){for(var i,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;s.length>r;r++){var n=s[r].split("=");if(n[0]===t){i=n;break}}if(!L(i)||2>i.length)return"";var a=i[1];try{a=decodeURIComponent(a)}catch(e){ic.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},r0=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[1],n=(s[0]||"").split("?"),a=n[1],o=n[0],l=(a||"").split("&"),u=[],h=0;l.length>h;h++){var c=l[h].split("=");L(c)&&(t.includes(c[0])?u.push(c[0]+"="+i):u.push(l[h]))}var d=o;return null!=a&&(d+="?"+u.join("&")),null!=r&&(d+="#"+r),d},r1=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},r2=(e,t)=>e>=t&&f(),r3=(e,t,i,s)=>{if(0===e){if(f()){var r=t+1;return r===i&&s(),r}return t}return 0},r5="https?://(.*)",r6=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],r8=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...r6],r4="<masked>",r9=["li_fat_id"];function r7(e,t,i){if(!u)return{};var s,r=t?[...r6,...i||[]]:[],n=ne(r0(u.URL,r,r4),e);return sC((s={},sI(r9,function(e){var t=sL(e);s[e]=t||null}),s),n)}function ne(e,t){var i=r8.concat(t||[]),s={};return sI(i,function(t){var i=rX(e,t);s[t]=i||null}),s}function nt(e){var t=e?0===e.search(r5+"google.([^/?]*)")?"google":0===e.search(r5+"bing.com")?"bing":0===e.search(r5+"yahoo.com")?"yahoo":0===e.search(r5+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!V(t)){i.$search_engine=t;var s=u?rX(u.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function ni(){return navigator.language||navigator.userLanguage}var ns="$direct";function nr(){return(null==u?void 0:u.referrer)||ns}function nn(e,t,i){void 0===i&&(i=!1);var s=e?[...r6,...t||[]]:[],r=i?tg(null==h?void 0:h.href):null==h?void 0:h.href,n=null==r?void 0:r.substring(0,1e3);return{r:nr().substring(0,1e3),u:n?r0(n,s,r4):void 0}}function na(e,t){void 0===t&&(t=!1);var i,s=e.r,r=e.u,n=t?tg(r):r,a={$referrer:s,$referring_domain:null==s?void 0:s==ns?ns:null==(i=rZ(s))?void 0:i.host};if(n){a.$current_url=n;var o=rZ(n);a.$host=null==o?void 0:o.host,a.$pathname=null==o?void 0:o.pathname,sC(a,ne(n))}return s&&sC(a,nt(s)),a}function no(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var nl={flags:si,surveys:i5},nu=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],nh=e=>{var t="",i=0;for(var s of e){var r=encodeURIComponent(JSON.stringify(s).slice(1,-1)).length;if(i+r>1e3)break;t+=s,i+=r}return t},nc="main",nd=[iU,iW,iK,iJ,iY,si,iQ,i0],nv=e=>-1!==nd.indexOf(e),np=(e,t)=>{try{return JSON.stringify(e)===JSON.stringify(t)}catch(i){return e===t}},ng=e=>{if(!e)return{};var t=JSON.parse(e);return j(t)?t:{}},nf=(e,t)=>{sI(e,(i,s)=>{var r=rY(s);r&&"event"!==r.exposure||({}).hasOwnProperty.call(t,s)||delete e[s]})};class n_{constructor(e,t,i){if(void 0===i&&(i=!0),this.oo={},this.ao=!1,this.lo=!1,this.uo=!1,this.ho=!1,this.do=!1,this.vo=new Map,this.co=!1,this.fo=!1,this.po=!1,this.mo=!1,this.yo=new Set,this.mn=e,this.bo=i,this.props={},this._o=void 0,this.wo=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.Zs=this.ko(e),this.uo=this.So(e),this.load(),this.xo(),e.debug&&ic.info("Persistence loaded",e.persistence,x({},this.props)),this.update_config(e,e,t),this.save(),a){var s=()=>this.flush();sM(a,"beforeunload",s,{capture:!1}),sM(a,"pagehide",s,{capture:!1}),this.Co=e=>{if(this.ao&&(!e.storageArea||e.storageArea===(null==a?void 0:a.localStorage))&&e.key)if(e.key!==this.wo){if(this.uo){var t=rG.find(t=>e.key===this.To(t));t&&this.Mo(e.key,t)}}else this.Mo(e.key,nc)},sM(a,"storage",this.Co)}}markCrossTabFeatureFlagChanges(e){Object.entries(e).forEach(e=>{var t=e[0],i=e[1],s=this.vo.get(t);if(nv(t)&&!0!==s)if(!0!==i){var r=new Set(s||[]);i.forEach(e=>r.add(e)),r.size&&this.Io(t,r)}else this.Io(t,!0)})}onCrossTabFeatureFlagChange(e){return this.yo.add(e),()=>this.yo.delete(e)}destroy(){this.Co&&a&&(a.removeEventListener("storage",this.Co),this.Co=void 0),this.yo.clear()}Mo(e,t,i){if(void 0===i&&(i=!0),this.Eo)return!1;try{if(r=sY.ai(e),V(r)){var s,r,n=this.Ro(t);return n.storageValue=null,t!==nc&&(n.persisted=!1),!1}s=ng(r)}catch(e){return!1}var a=t===nc?s:sY.ui(this.wo);if(a&&this.Po(a))return!1;var o=this.Ao(s,t,i);return t===nc&&this.uo&&!np(this.Fo().main,s)||this.Oo(s,t,!0,r),o}Po(e){var t=this.props[ib],i=e[ib];return!B(t)&&!B(i)&&t!==i}Oo(e,t,i,s){var r=this.Ro(t);r.storageValue=s,t!==nc&&(r.persisted=i);try{r.fingerprint=this.Lo(e,t)}catch(e){r.fingerprint=void 0}}Ao(e,t,i){var s=!1;return nd.forEach(i=>{var r,n=null==(r=rY(i))?void 0:r.storageGroup;if(!(t===nc&&this.uo&&n||t!==nc&&n!==t)){var a=i in e,o=this.Do(i,a?e[i]:void 0),l=this.vo.has(i)?i in this.props:a;l===i in this.props&&np(o,this.props[i])||(l?this.$o(i,o,!1):this.No(i,!1),s=!0)}}),s&&i&&this.yo.forEach(e=>e()),s}qo(){if(!this.ao)return!1;try{this.po=!1;var e,t=sY.ai(this.wo),i=this.Ro(nc),s=!1,r=!1;if(t!==i.storageValue)if(V(t))i.storageValue=null;else{if(e=ng(t),this.po=!this.fo&&this.Po(e),this.po)return!1;r=this.Ao(e,nc,!1),!this.uo||np(this.Fo().main,e)?this.Oo(e,nc,!0,t):i.storageValue=t,s=!0}return this.uo&&rG.forEach(t=>{var i=sY.ai(this.To(t)),n=this.Ro(t),a=e||{},o=s&&nd.some(e=>{var i;return(null==(i=rY(e))?void 0:i.storageGroup)===t&&e in a});if(i!==n.storageValue||o){if(V(i))return n.storageValue=null,n.persisted=!1,void(o&&(r=this.Ao(a,t,!1)||r));var l=ng(i);r=this.Ao(l,t,!1)||r,this.Oo(l,t,!0,i)}}),r}catch(e){return!1}}Io(e,t){this.vo.set(e,t);var i=rY(e);null!=i&&i.volatile||(this.Ro((this.uo?null==i?void 0:i.storageGroup:void 0)||nc).fingerprint=void 0,this.jo(e))}Bo(){nd.forEach(e=>this.vo.set(e,!0))}xo(){if(this.ao)try{var e=sY.ai(this.wo),t=ng(e);this.Ro(nc).storageValue=e,nd.forEach(e=>{var i,s=this.uo?null==(i=rY(e))?void 0:i.storageGroup:void 0,r=s?sY.ai(this.To(s)):null;if(s){var n=this.Ro(s);n.storageValue=r,n.persisted=!V(r)}var a=s&&!V(r)?ng(r):t;e in this.props?this.Ho(e,a[e],this.props[e]):e in a&&this.Io(e,!0)})}catch(e){}}Do(e,t){var i=this.vo.get(e);if(!i)return t;if(!0===i)return this.props[e];if(e===iW){var s=new Set(L(t)?t:[]),r=new Set(L(this.props[e])?this.props[e]:[]);return i.forEach(e=>r.has(e)?s.add(e):s.delete(e)),Array.from(s)}var n=j(t)?x({},t):{},a=j(this.props[e])?this.props[e]:{};return i.forEach(e=>{e in a?n[e]=a[e]:delete n[e]}),n}Ho(e,t,i){if(nv(e)){var s=this.vo.get(e);if(!0!==s){var r=t;if(this.ao)try{var n,a=this.uo?null==(n=rY(e))?void 0:n.storageGroup:void 0,o=a?this.To(a):this.wo;r=ng(sY.ai(o))[e]}catch(e){}var l=new Set(s||[]);if(e===iW){if(!B(t)&&!L(t)||!B(r)&&!L(r)||!L(i))return void this.Io(e,!0);var u=new Set(t||[]),h=new Set(r||[]),c=new Set(i);new Set([...u,...c]).forEach(e=>{u.has(e)!==c.has(e)&&l.add(e)}),l.forEach(e=>{h.has(e)===c.has(e)&&l.delete(e)})}else{if(!j(i))return void(np(r,i)?this.vo.delete(e):this.Io(e,!0));if(!B(t)&&!j(t)||B(t)&&q(i)&&B(r))return void this.Io(e,!0);var d=j(t)?t:{},v=j(r)?r:{};new Set([...Object.keys(d),...Object.keys(i)]).forEach(e=>{e in d==e in i&&np(d[e],i[e])||l.add(e)}),l.forEach(e=>{e in v==e in i&&np(v[e],i[e])&&l.delete(e)})}l.size?this.Io(e,l):this.vo.delete(e)}}}zo(){var e,t=null==(e=this.mn)?void 0:e.persistence_save_debounce_ms;return W(t)&&t>0?t:0}Uo(e){if(this.mn.cookieWinsOnConflict&&"localstorage+cookie"===this.mn.persistence.toLowerCase())if(e)try{var t=s1(e,this.mn.cookie_persisted_properties||[]),i=s3(t,this.mn.cookie_persisted_properties||[]),s=JSON.stringify(t)+"|"+JSON.stringify(i),r=sK.ai(this.wo)||void 0;r&&s6(this.wo,r)===s&&(this.Wo=s,this.Vo=r)}catch(e){}else try{var n=sK.ai(this.wo)||void 0;this.Wo=n?s6(this.wo,n):void 0,this.Vo=n}catch(e){}}syncCookieProperties(){return this.Go(this.mn)}Go(e,t){if(void 0===t&&(t=!1),this.Eo&&!t||this.do||!e.cookieWinsOnConflict||"localstorage+cookie"!==e.persistence.toLowerCase())return!1;try{i=sK.ai(this.wo)||void 0}catch(e){}if(!i||i===this.Vo)return!1;var i,s,r=s6(this.wo,i);try{s=s0(JSON.parse(i))}catch(e){return!1}if((sK.ai(this.wo)||void 0)!==i)return!1;this.Wo=r,this.Vo=i;var n=s5(this.wo,i),a=[...sZ,...n.properties],o={};if(Object.keys(s).forEach(e=>{var t=s[e];(B(t)||V(t)||""===t||e===ss&&t!==sm&&t!==sy)&&(o[e]=!0,delete s[e])}),q(s))return!1;var l=ib in s||s[ss]===sm||s[ss]===sy,u=this.props,h=u[ib],c=u[ss],d=sC({},u);[...sZ,...e.cookie_persisted_properties||[]].forEach(e=>{if(-1!==a.indexOf(e)&&!(e in s)&&!o[e]&&(l||e!==ib&&e!==ss)){var t=d[e];(n.isValid||-1===sZ.indexOf(e)||!1!==t&&0!==t)&&delete d[e]}}),this.props=sC(d,s),nd.forEach(e=>{var t=e in this.props;e in u===t&&np(u[e],this.props[e])||(t?this.Ho(e,u[e],this.props[e]):this.Io(e,!0))}),!l||ss in s||ss in this.props||this.$o(ss,sm);var v=this.props[ib],p=this.props[ss];return l&&(v!==h||p!==c)&&(this.fo=!0,this.ho=!0,s7.ni(this.wo+"_cookie_identity_change_pending",!0),this.No(i0),this.No(iW),this.No(iU),this.No(iK),this.No(iJ),this.No(iY),this.No(si),this.No(st),this.No(i7),p!==sm||c!==sy&&s[ss]!==sm&&(B(h)||v===h)||(nf(this.props,s),this.No(i1)),p===sy?this.props.$user_id=v:delete this.props.$user_id,this.No(ik)),!0}consumeCookieIdentityChange(){var e=this.wo+"_cookie_identity_change_pending",t=this.ho||!!s7.ai(e);return this.ho=!1,t&&s7.oi(e),t}Zo(e){return void 0===e&&(e=!1),!(this.do||this.Eo&&!e||!this.mn.cookieWinsOnConflict||"localstorage+cookie"!==this.mn.persistence.toLowerCase()||(this.do=!0,0))}Qo(){this.do&&(B(this.Jo)||(clearTimeout(this.Jo),this.Jo=void 0),delete this.oo[nc],this.Ko(!0))}Yo(e){if(void 0===e&&(e=!0),this.do)try{e?this.Qo():B(this.Jo)||(clearTimeout(this.Jo),this.Jo=void 0)}finally{this.do=!1}}isDisabled(){return!!this.Eo}ko(e){-1===nu.indexOf(e.persistence.toLowerCase())&&(ic.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,i,s,r,n=(t=e.cookie_persisted_properties||[],i=e.cookieWinsOnConflict,void 0===t&&(t=[]),void 0===i&&(i=!1),s=[...sZ,...t],x({},sY,{ui(e){try{var t,r={};try{r=(t=sK.ai(e)||void 0)?s0(JSON.parse(t)):{}}catch(e){}var n,a=JSON.parse(sY.ai(e)||"{}");if(i){var o=s5(e,t),l=[...sZ,...o.properties],u={};Object.keys(r).forEach(e=>{var t=r[e];V(t)||""===t||e===ss&&t!==sm&&t!==sy||(u[e]=t)});var h=ib in u||u[ss]===sm||u[ss]===sy;if(Object.keys(u).length>0){var c,d=a[ib],v=null!=(c=a[ss])?c:sm;s.forEach(e=>{if(-1!==l.indexOf(e)&&!(e in r)&&(h||e!==ib&&e!==ss)){var t=a[e];(o.isValid||-1===sZ.indexOf(e)||!1!==t&&0!==t)&&delete a[e]}}),!h||ss in r||ss in a||(a[ss]=sm),h&&((ib in u?u[ib]:a[ib])!==d||(ss in u?u[ss]:a[ss])!==v)&&(sQ.forEach(e=>delete a[e]),u[ss]===sy&&ib in u?a.$user_id=u[ib]:delete a.$user_id,u[ss]!==sy&&(delete a[i2],delete a[i1]),delete a.__alias)}n=sC(a,u)}else n=sC(r,a);return sY.ni(e,n),n}catch(e){}return null},ni(e,s,r,n,a,o){var l=sY.ni(e,s,void 0,void 0,o);try{var u=s1(s,t);if(Object.keys(u).length){if(i){var h=e+"_cpm",c=s3(u,t);if(sK.ni(h,c,r,n,a,o),sK.ai(h)!==JSON.stringify(c)){sK.oi(h,n);var d=s1(s);return sK.ni(e,d,r,n,a,o),l}}sK.ni(e,u,r,n,a,o)}}catch(e){sY.si(e)}return l},oi(e,t){try{null==a||a.localStorage.removeItem(e),sK.oi(e,t),sK.oi(e+"_cpm",t)}catch(e){sY.si(e)}}})),o=!1,l=!1,u=e.persistence.toLowerCase();return"localstorage"===u&&sY.ii()?(r=sY,l=!0):"localstorage+cookie"===u&&n.ii()?(r=n,l=!0,o=!0):"sessionstorage"===u&&s7.ii()?r=s7:"memory"===u?r=s4:"cookie"===u&&sK.ii()?(r=sK,o=!0):n.ii()?(r=n,l=!0,o=!0):sK.ii()?(r=sK,o=!0):r=s4,this.ao=l,this.lo=o,r}To(e){return this.wo+"__"+e}So(e){return this.ao&&!!e.split_storage}properties(){var e={};return sI(this.props,(t,i)=>{var s=rY(i);if(!s||"event"===s.exposure){if(null!=s&&null!=s.shouldSkipFromEventProperties&&s.shouldSkipFromEventProperties(t))return;e[i]=t}}),e}load(e){if(void 0===e&&(e=!1),!this.Eo||e){var t=this.mn.cookieWinsOnConflict&&"localstorage+cookie"===this.mn.persistence.toLowerCase(),i=t?sY.ui(this.wo):null,s={};if(t)try{sI(s=s0(sK.ui(this.wo)),(e,t)=>{(B(e)||V(e)||""===e)&&delete s[t]})}catch(e){}var r=this.Zs.ui(this.wo);if(r&&(this.props=sC({},r)),this.uo&&this.Xo(),t&&r){var n,a,o=null==i?void 0:i[ib],l=null!=(n=null==i?void 0:i[ss])?n:sm,u=r[ib],h=null!=(a=r[ss])?a:sm;if(u!==o||h!==l){this.ho=!0,s7.ni(this.wo+"_cookie_identity_change_pending",!0);var c=sC({},this.props);sQ.forEach(e=>delete c[e]),h!==sm||l!==sy&&s[ss]!==sm&&(B(o)||u===o)||(nf(c,s),delete c[i1]),this.props=c;var d=new Set;sQ.forEach(e=>{var t,i=null==(t=rY(e))?void 0:t.storageGroup;i&&d.add(i)}),d.forEach(e=>{var t={};sI(this.props,(i,s)=>{var r;(null==(r=rY(s))?void 0:r.storageGroup)===e&&(t[s]=i)}),q(t)?(sY.oi(this.To(e)),this.oo[e]={}):sY.ni(this.To(e),t)&&(this.oo[e]={persisted:!0,fingerprint:this.Lo(t,e)})})}}s7.ai(this.wo+"_cookie_identity_change_pending")&&(this.ho=!0)}}Xo(){for(var e of rG){var t=sY.ui(this.To(e));if(t&&!q(t)){var i=this.Ro(e);i.persisted=!0,this.ta(e)||(i.fingerprint=this.Lo(t,e)),this.ea(e,t)||sC(this.props,t)}}}ta(e){return Object.keys(this.props).some(t=>{var i;return(null==(i=rY(t))?void 0:i.storageGroup)===e})}ea(e,t){var i=nl[e];if(!i)return!1;var s=t[i],r=this.props[i];return W(s)&&W(r)&&r>s}refreshKey(e){var t;if(!(this.Eo||e===iS&&this.mo)){var i=this.uo?null==(t=rY(e))?void 0:t.storageGroup:void 0,s=i?sY.ui(this.To(i)):this.Zs.ui(this.wo);if(s&&e in s)this.$o(e,s[e],!1);else{if(i){var r=this.Zs.ui(this.wo);if(r&&e in r)return void this.$o(e,r[e],!1)}this.No(e,!1)}}}save(){if(!this.Eo){var e=this.zo();e>0?B(this.Jo)&&(this.Jo=setTimeout(()=>{this.Jo=void 0,this.Ko()},e)):this.Ko()}}flush(){B(this.Jo)||(clearTimeout(this.Jo),this.Jo=void 0,this.Ko())}Ko(e){if(void 0===e&&(e=!1),!(this.Eo||this.do&&!e)){e||(this.syncCookieProperties(),this.mo||this.mn.cookieWinsOnConflict&&"localstorage+cookie"===this.mn.persistence.toLowerCase()||this.refreshKey(iS));var t=!e&&!this.co;t||(this.po=!1);var i=!!t&&this.qo();if(this.po)this.mn.debug&&ic.warn("skipping persistence write because storage belongs to a different distinct ID");else{if(this.uo)return this.ia(),void(i&&this.yo.forEach(e=>e()));var s=this.ra(this.Zs,this.wo,this.props,nc);"written"===s&&this.Uo(this.props),"failed"!==s&&(this.vo.clear(),this.fo=!1,this.mo=!1),i&&this.yo.forEach(e=>e())}}}ia(){var e=this,t=this.Fo(),i=t.main,s=t.groups,r=this.ra(this.Zs,this.wo,i,nc);"written"===r&&this.Uo(i),"failed"!==r&&(this.fo=!1,this.mo=!1,nd.forEach(e=>{var t;null!=(t=rY(e))&&t.storageGroup||this.vo.delete(e)}));var n=function(t){var i,r=s[t];if(q(r)&&(null==(i=e.oo[t])||!i.persisted))return nd.forEach(i=>{var s;(null==(s=rY(i))?void 0:s.storageGroup)===t&&e.vo.delete(i)}),1;var n=e.ra(sY,e.To(t),r,t);"failed"!==n&&nd.forEach(i=>{var s=rY(i);(null==s?void 0:s.storageGroup)!==t||"written"!==n&&s.volatile||e.vo.delete(i)})};for(var a of rG)n(a)}Fo(){var e={},t={flags:{},surveys:{}};return sI(this.props,(i,s)=>{var r,n=null==(r=rY(s))?void 0:r.storageGroup;n?t[n][s]=i:e[s]=i}),{main:e,groups:t}}Lo(e,t){if(t===nc)return JSON.stringify(e)+"|"+this.na+"|"+this.sa+"|"+this.oa;var i={};return sI(e,(e,t)=>{var s;i[t]=null!=(s=rY(t))&&s.volatile?"__volatile__":e}),JSON.stringify(i)}ra(e,t,i,s){var r,n=this.Ro(s);if(s!==nc&&!n.dirty&&!B(n.fingerprint))return"skipped";try{if((r=this.Lo(i,s))===n.fingerprint)return n.dirty=!1,"skipped"}catch(e){r=void 0}return e.ni(t,i,this.na,this.sa,this.oa,this.mn.debug)?(n.dirty=!1,s!==nc&&(n.persisted=!0),B(r)||(n.fingerprint=r),this.ao&&(n.storageValue=sY.ai(t)),"written"):(this.mn.debug&&ic.warn('failed to persist storage entry "'+t+'"; will retry on next save'),"failed")}remove(e){var t=(void 0===e?{}:e).keepGroupEntries,i=void 0!==t&&t;if(this.Bo(),B(this.Jo)||(clearTimeout(this.Jo),this.Jo=void 0),this.Zs.oi(this.wo,!1),this.Zs.oi(this.wo,!0),!i&&this.bo)for(var s of rG)sY.oi(this.To(s));i?delete this.oo[nc]:this.oo={},this.Wo=void 0,this.Vo=void 0}clear(){this.remove(),this.props={}}register_once(e,t,i){if(j(e)){this.syncCookieProperties(),B(t)&&(t="None"),this.na=B(i)?this.aa:i;var s=!1;if(sI(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.$o(i,e),s=!0)}),s)return this.save(),!0}return!1}register(e,t){if(j(e)){this.syncCookieProperties(),this.na=B(t)?this.aa:t;var i=!1;if(sI(e,(t,s)=>{e.hasOwnProperty(s)&&(this.props[s]!==t||j(t)||L(t))&&(this.$o(s,t),i=!0)}),i)return this.save(),!0}return!1}unregister(e){this.syncCookieProperties();var t=!1;for(var i of"string"==typeof e?[e]:e)i in this.props&&(this.No(i),t=!0);t&&this.save()}update_campaign_params(){var e=null==u?void 0:u.URL;if(e!==this._o){var t=r7(this.mn.custom_campaign_params,this.mn.mask_personal_data_properties,this.mn.custom_personal_data_properties),i=!q(sR(t));return i&&this.register(t),this._o=e,i?t:void 0}}update_search_keyword(){var e;this.register((e=null==u?void 0:u.referrer)?nt(e):{})}update_referrer_info(){var e;this.register_once({$referrer:nr(),$referring_domain:null!=u&&u.referrer&&(null==(e=rZ(u.referrer))?void 0:e.host)||ns},void 0)}set_initial_person_info(){if(!this.props[sa]&&!this.props[so]){var e=nn(this.mn.mask_personal_data_properties,this.mn.custom_personal_data_properties,this.mn.disable_capture_url_hashes);this.register_once({[sl]:this.lo?{r:nh(e.r),u:e.u?nh(e.u):void 0}:e},void 0)}}get_initial_props(){var e,t,i,s={};sI([so,sa],e=>{var t=this.props[e];t&&sI(t,function(e,t){s["$initial_"+I(t)]=e})});var r=this.props[sl];return r&&sC(s,(void 0===(e=this.mn.disable_capture_url_hashes)&&(e=!1),t=na(r,e),i={},sI(t,function(e,t){i["$initial_"+I(t)]=e}),i)),s}safe_merge(e){return sI(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){var s=e.persistence!==t.persistence,r=!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),s=[...t].sort();return i.every((e,t)=>e===s[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),n=s||r,a=e.cookieWinsOnConflict!==t.cookieWinsOnConflict,o=e.disable_persistence||!!i,l=!!this.Eo&&!o;o||this.Go(t,l),this.mn=e,!o&&(s||r||a)&&(this.Wo=void 0,this.Vo=void 0,this.Go(x({},e,{cookie_persisted_properties:t.cookie_persisted_properties}),l));var u=n||a?this.ko(e):this.Zs;this.la();var h=this.So(e),c=n||h!==this.uo,d=!o&&(c||e.cross_subdomain_cookie!==this.sa||e.secure_cookie!==this.oa)&&this.Zo(l);this.co=c;try{if(this.aa=this.na=e.cookie_expiration,this.set_disabled(o),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),c){var v=this.props;this.clear(),this.Zs=u,this.uo=h,this.props=v,this.save()}else a&&(this.Zs=u,o||(delete this.oo[nc],this.Ko()))}finally{this.co=!1,d&&this.Yo()}}la(){var e=this.props[sl];if(this.lo&&j(e)&&"string"==typeof e.r){var t=nh(e.r),i="string"==typeof e.u?nh(e.u):e.u;t===e.r&&i===e.u||this.$o(sl,x({},e,{r:t,u:i}))}}set_disabled(e){this.Eo=e,this.Eo?this.remove():this.save()}set_cross_subdomain(e){e!==this.sa&&(this.sa=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.oa&&(this.oa=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){var i=this.props[iP]||{};i[e]=t,this.$o(iP,i),this.save()}remove_event_timer(e){var t=this.props[iP]||{},i=t[e];return B(i)||(delete t[e],this.$o(iP,t),this.save()),i}get_property(e){return this.props[e]}set_property(e,t){this.$o(e,t),this.save()}$o(e,t,i){void 0===i&&(i=!0);var s,r=this.props[e];this.props[e]=t,i&&(e!==ib&&e!==ss||r===t||(this.fo=!0),e!==iS||np(r,t)||(this.mo=!0),this.Ho(e,r,t),null!=(s=rY(e))&&s.volatile||this.jo(e))}No(e,t){void 0===t&&(t=!0),delete this.props[e],t&&(nv(e)&&this.Io(e,!0),e===iS&&(this.mo=!0),this.jo(e))}jo(e){var t,i=null==(t=rY(e))?void 0:t.storageGroup;i&&(this.Ro(i).dirty=!0)}Ro(e){return this.oo[e]||(this.oo[e]={})}}var nm="gzip-js",ny="base64",nb="events",nw="cancelEvents",nx="survey shown",nk="survey dismissed",nE="survey sent",nS="popover";function nP(e){var t=!0;return{dispose(){if(t){t=!1;var i=e();i&&N(i.then)&&i.then(void 0,()=>{})}}}}var nF=id("[RateLimiter]");class nI{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{nF.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void nF.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,s,r=this.captureEventsBurstLimit,n=this.captureEventsPerSecond,a=(new Date).getTime(),o=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(sn))?t:{tokens:r,last:a};o.tokens+=(a-o.last)/1e3*n,o.last=a,o.tokens>r&&(o.tokens=r);var l=1>o.tokens;if(l||e||(o.tokens=Math.max(0,o.tokens-1)),l&&!e){var u=(W(o.dropped)?o.dropped:0)+1;o.dropped=u,!this.lastEventRateLimited&&this.ua(u)&&(o.dropped=0)}return this.lastEventRateLimited=l,null==(s=this.instance.persistence)||s.set_property(sn,o),{isRateLimited:l,remainingTokens:o.tokens}}ha(e){var t=this.instance.config.property_denylist;return!L(t)||!t.includes(e)}da(){var e;if(this.ha("$current_url")&&this.ha("$pathname")&&null!=h&&h.pathname)return""+(null!=(e=h.origin)?e:"")+h.pathname}ua(e){var t,i,s=this.captureEventsBurstLimit,r=this.captureEventsPerSecond,n=this.da(),a=this.ha("$session_id")?null==(t=(i=this.instance).get_session_id)?void 0:t.call(i):void 0,o=[e+" event(s) dropped since the last warning",n?"triggered on "+n:void 0,a?"session "+a:void 0].filter(Boolean).join(", ");return!!this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited: "+o+". Config is set to "+r+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0})}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var nC=id("[RemoteConfig]");class nO{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=m._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}va(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}ca(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:e})}load(){try{if(this.remoteConfig)return nC.info("Using preloaded remote config",this.remoteConfig),void this.fa(this.remoteConfig);if(this._instance.pa())return void nC.warn("Remote config is disabled. Falling back to local config.");this.va(e=>{e?this.fa(e):(nC.info("No config found after loading remote JS config. Falling back to JSON."),this.ca(e=>{this.fa(e.json,e)}))})}catch(e){nC.error("Error loading remote config",e),this.fa()}}fa(e,t){!e&&t&&(0===t.statusCode?t.error||nC.warn("Failed to fetch remote config from PostHog."):nC.error("Failed to fetch remote config from PostHog."));try{this._instance.fa(e?{ok:!0,config:e}:{ok:!1})}catch(e){nC.error("Error applying remote config",e)}if(!1!==(null==e?void 0:e.hasFeatureFlags)&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var i;null==(i=this._instance.featureFlags)||i.ensureFlagsLoaded()}catch(e){nC.error("Error loading feature flags",e)}}}var n$=Uint8Array,nA=Uint16Array,nR=Uint32Array,nT=new n$([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),nM=new n$([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),nD=new n$([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nL=function(e,t){for(var i=new nA(31),s=0;31>s;++s)i[s]=t+=1<<e[s-1];var r=new nR(i[30]);for(s=1;30>s;++s)for(var n=i[s];i[s+1]>n;++n)r[n]=n-i[s]<<5|s;return[i,r]},nN=nL(nT,2),nj=nN[1];nN[0][28]=258,nj[258]=28;for(var nq=nL(nM,0)[1],nB=new nA(32768),nz=0;32768>nz;++nz){var nH=(43690&nz)>>>1|(21845&nz)<<1;nB[nz]=((65280&(nH=(61680&(nH=(52428&nH)>>>2|(13107&nH)<<2))>>>4|(3855&nH)<<4))>>>8|(255&nH)<<8)>>>1}var nV=function(e,t,i){for(var s=e.length,r=0,n=new nA(t);s>r;++r)++n[e[r]-1];var a,o=new nA(t);for(r=0;t>r;++r)o[r]=o[r-1]+n[r-1]<<1;if(i){a=new nA(1<<t);var l=15-t;for(r=0;s>r;++r)if(e[r])for(var u=r<<4|e[r],h=t-e[r],c=o[e[r]-1]++<<h,d=c|(1<<h)-1;d>=c;++c)a[nB[c]>>>l]=u}else for(a=new nA(s),r=0;s>r;++r)a[r]=nB[o[e[r]-1]++]>>>15-e[r];return a},nU=new n$(288);for(nz=0;144>nz;++nz)nU[nz]=8;for(nz=144;256>nz;++nz)nU[nz]=9;for(nz=256;280>nz;++nz)nU[nz]=7;for(nz=280;288>nz;++nz)nU[nz]=8;var nW=new n$(32);for(nz=0;32>nz;++nz)nW[nz]=5;var nG=nV(nU,9,0),nK=nV(nW,5,0),nJ=function(e){return(e/8|0)+(7&e&&1)},nY=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof nA?nA:e instanceof nR?nR:n$)(i-t);return s.set(e.subarray(t,i)),s},nQ=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8},nZ=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8,e[s+2]|=i>>>16},nX=function(e,t){for(var i=[],s=0;e.length>s;++s)e[s]&&i.push({s:s,f:e[s]});var r=i.length,n=i.slice();if(!r)return[new n$(0),0];if(1==r){var a=new n$(i[0].s+1);return a[i[0].s]=1,[a,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],u=0,h=1,c=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=r-1;)o=i[i[c].f>i[u].f?u++:c++],l=i[u!=h&&i[c].f>i[u].f?u++:c++],i[h++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(s=1;r>s;++s)n[s].s>d&&(d=n[s].s);var v=new nA(d+1),p=n0(i[h-1],v,0);if(p>t){s=0;var g=0,f=p-t,_=1<<f;for(n.sort(function(e,t){return v[t.s]-v[e.s]||e.f-t.f});r>s;++s){var m=n[s].s;if(t>=v[m])break;g+=_-(1<<p-v[m]),v[m]=t}for(g>>>=f;g>0;){var y=n[s].s;t>v[y]?g-=1<<t-v[y]++-1:++s}for(;s>=0&&g;--s){var b=n[s].s;v[b]==t&&(--v[b],++g)}p=t}return[new n$(v),p]},n0=function(e,t,i){return -1==e.s?Math.max(n0(e.l,t,i+1),n0(e.r,t,i+1)):t[e.s]=i},n1=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new nA(++t),s=0,r=e[0],n=1,a=function(e){i[s++]=e},o=1;t>=o;++o)if(e[o]==r&&o!=t)++n;else{if(!r&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(r),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(r);n=1,r=e[o]}return[i.subarray(0,s),t]},n2=function(e,t){for(var i=0,s=0;t.length>s;++s)i+=e[s]*t[s];return i},n3=function(e,t,i){var s=i.length,r=nJ(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var n=0;s>n;++n)e[r+n+4]=i[n];return 8*(r+4+s)},n5=function(e,t,i,s,r,n,a,o,l,u,h){nQ(t,h++,i),++r[256];for(var c=nX(r,15),d=c[0],v=c[1],p=nX(n,15),g=p[0],f=p[1],_=n1(d),m=_[0],y=_[1],b=n1(g),w=b[0],x=b[1],k=new nA(19),E=0;m.length>E;++E)k[31&m[E]]++;for(E=0;w.length>E;++E)k[31&w[E]]++;for(var S=nX(k,7),P=S[0],F=S[1],I=19;I>4&&!P[nD[I-1]];--I);var C,O,$,A,R=u+5<<3,T=n2(r,nU)+n2(n,nW)+a,M=n2(r,d)+n2(n,g)+a+14+3*I+n2(k,P)+(2*k[16]+3*k[17]+7*k[18]);if(T>=R&&M>=R)return n3(t,h,e.subarray(l,l+u));if(nQ(t,h,1+(T>M)),h+=2,T>M){C=nV(d,v,0),O=d,$=nV(g,f,0),A=g;var D=nV(P,F,0);for(nQ(t,h,y-257),nQ(t,h+5,x-1),nQ(t,h+10,I-4),h+=14,E=0;I>E;++E)nQ(t,h+3*E,P[nD[E]]);h+=3*I;for(var L=[m,w],N=0;2>N;++N){var j=L[N];for(E=0;j.length>E;++E)nQ(t,h,D[q=31&j[E]]),h+=P[q],q>15&&(nQ(t,h,j[E]>>>5&127),h+=j[E]>>>12)}}else C=nG,O=nU,$=nK,A=nW;for(E=0;o>E;++E)if(s[E]>255){nZ(t,h,C[257+(q=s[E]>>>18&31)]),h+=O[q+257],q>7&&(nQ(t,h,s[E]>>>23&31),h+=nT[q]);var q,B=31&s[E];nZ(t,h,$[B]),h+=A[B],B>3&&(nZ(t,h,s[E]>>>5&8191),h+=nM[B])}else nZ(t,h,C[s[E]]),h+=O[s[E]];return nZ(t,h,C[256]),h+O[256]},n6=new nR([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),n8=function(){for(var e=new nR(256),t=0;256>t;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),n4=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},n9=!!d||!!c,n7="text/plain",ae=!1,at=(e,t)=>{var i=e.split("#"),s=i[1],r=i[0].split("?"),n=r[0],a=r[1];if(!a)return e;var o=a.split("&").filter(e=>e.split("=")[0]!==t).join("&");return n+(o?"?"+o:"")+(s?"#"+s:"")},ai=function(e,t,i){void 0===i&&(i=!0);var s,r,n,a,o,l=e.split("?"),u=l[0],h=l[1],c=x({},t),d=null!=(o=null==h?void 0:h.split("&").map(e=>{var t,s=e.split("="),r=s[0],n=i&&null!=(t=c[r])?t:s[1];return delete c[r],r+"="+n}))?o:[],v=(void 0===s&&(s="&"),a=[],sI(c,function(e,t){B(e)||B(t)||"undefined"===t||(r=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(t),a[a.length]=n+"="+r)}),a.join(s));return v&&d.push(v),d.length>0?u+"?"+d.join("&"):u},as=e=>{if(e.ga)return e.ga;var t=e.data,i=e.compression;if(t){if(i===nm){var s,r,n,a,o,l,u,h,c=(s=function(e){var t=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new n$(e.length+(e.length>>>1)),s=0,r=function(e){i[s++]=e},n=0;t>n;++n){if(s+5>i.length){var a=new n$(s+8+(t-n<<1));a.set(i),i=a}var o=e.charCodeAt(n);128>o?r(o):(2048>o?r(192|o>>>6):(o>55295&&57344>o?(r(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++n))>>>18),r(128|o>>>12&63)):r(224|o>>>12),r(128|o>>>6&63)),r(128|63&o))}return nY(i,0,s)}(rQ(t)),r={mtime:0},n=0xffffffff,a={p(e){for(var t=n,i=0;e.length>i;++i)t=n8[255&t^e[i]]^t>>>8;n=t},d:()=>0xffffffff^n},o=s.length,a.p(s),h=(l=10+(r.filename&&r.filename.length+1||0),u=function(e,t,i,s){var r=e.length,n=new n$(s+r+5*(1+Math.floor(r/7e3))+8),a=n.subarray(s,n.length-8),o=0;if(!t||8>r)for(var l=0;r>=l;l+=65535){var u=l+65535;r>u?o=n3(a,o,e.subarray(l,u)):(a[l]=!0,o=n3(a,o,e.subarray(l,r)))}else{for(var h=n6[t-1],c=h>>>13,d=8191&h,v=(1<<i)-1,p=new nA(32768),g=new nA(v+1),f=Math.ceil(i/3),_=2*f,m=function(t){return(e[t]^e[t+1]<<f^e[t+2]<<_)&v},y=new nR(25e3),b=new nA(288),w=new nA(32),x=0,k=0,E=(l=0,0),S=0,P=0;r>l;++l){var F=m(l),I=32767&l,C=g[F];if(p[I]=C,g[F]=I,l>=S){var O=r-l;if((x>7e3||E>24576)&&O>423){o=n5(e,a,0,y,b,w,k,E,P,l-P,o),E=x=k=0,P=l;for(var $=0;286>$;++$)b[$]=0;for($=0;30>$;++$)w[$]=0}var A=2,R=0,T=d,M=I-C&32767;if(O>2&&F==m(l-M))for(var D=Math.min(c,O)-1,L=Math.min(32767,l),N=Math.min(258,O);L>=M&&--T&&I!=C;){if(e[l+A]==e[l+A-M]){for(var j=0;N>j&&e[l+j]==e[l+j-M];++j);if(j>A){if(A=j,R=M,j>D)break;var q=Math.min(M,j-2),B=0;for($=0;q>$;++$){var z=l-M+$+32768&32767,H=z-p[z]+32768&32767;H>B&&(B=H,C=z)}}}M+=(I=C)-(C=p[I])+32768&32767}if(R){y[E++]=0x10000000|nj[A]<<18|nq[R];var V=31&nj[A],U=31&nq[R];k+=nT[V]+nM[U],++b[257+V],++w[U],S=l+A,++x}else y[E++]=e[l],++b[e[l]]}}o=n5(e,a,!0,y,b,w,k,E,P,l-P,o)}return nY(n,0,s+nJ(o)+8)}(s,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+r.mem,l)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:2*(9==t.level),e[9]=3,0!=t.mtime&&n4(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var s=0;i.length>=s;++s)e[s+10]=i.charCodeAt(s)}}(u,r),n4(u,h-8,a.d()),n4(u,h-4,o),u);return{contentType:n7,body:c.buffer.slice(c.byteOffset,c.byteOffset+c.byteLength),estimatedSize:c.byteLength}}if(i===ny){let e;var d,v="data="+encodeURIComponent("string"==typeof(e=(d=rQ(t))?btoa(encodeURIComponent(d).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))):d)?e:rQ(e));return{contentType:"application/x-www-form-urlencoded",body:v,estimatedSize:new Blob([v]).size}}var p=rQ(t);return{contentType:"application/json",body:p,estimatedSize:new Blob([p]).size}}},ar=e=>{var t,i,s=()=>"sendBeacon"===e.transport?{url:ai(e.url,{compression:ny}),encodedBody:as(x({},e,{compression:ny,ga:void 0}))}:{url:at(e.url,"compression"),encodedBody:as(x({},e,{compression:void 0,ga:void 0}))};try{t=as(e)}catch(t){if(t1(e.compression,rX(e.url,"compression")))return ic.error("Failed to gzip request body, sending uncompressed payload",t),s();throw t}return!(t&&t1(e.compression,rX(e.url,"compression")))||((i=t.body)instanceof ArrayBuffer?t0(new Uint8Array(i)):ArrayBuffer.isView(i)&&t0(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)))?{url:e.url,encodedBody:t}:(ae=!0,s())},an=e=>{try{return ar(e)}catch(t){return ic.error(t),void(null==e.callback||e.callback({statusCode:0,error:t}))}},aa=(s=w(function*(e){var t=rQ(e.data),i=yield function(e,t,i){return t6.apply(this,arguments)}(t,y.DEBUG,{rethrow:!0});if(!i)return e;var s=yield i.arrayBuffer();return x({},e,{ga:{contentType:n7,body:s,estimatedSize:s.byteLength}})}),function(e){return s.apply(this,arguments)}),ao=/Failed to fetch|NetworkError|Load failed/i,al=e=>"TypeError"===(null==e?void 0:e.name)&&ao.test((null==e?void 0:e.message)||""),au=e=>{var t=an(e);if(t){var i,s=t.url,r=t.encodedBody,n=null!=r?r:{},a=n.contentType,o=n.body,l=n.estimatedSize,u=new Headers;sI(e.headers,function(e,t){u.append(t,e)}),a&&u.append("Content-Type",a);var h=null,d=!1;if(v){var p=new v;h={signal:p.signal,timeout:setTimeout(()=>{var t;d=!0,p.abort(tp("AbortError","PostHog request timed out"+((t=e.timeout)?" after "+t+"ms":"")))},e.timeout)}}var g=t=>{d&&"AbortError"===(null==t?void 0:t.name)||al(t)?ic.warn(t):ic.error(t),null==e.callback||e.callback({statusCode:0,error:t})};try{c(s,x({method:(null==e?void 0:e.method)||"GET",headers:u,keepalive:"POST"===e.method&&!e.ma&&52428.8>(l||0),body:o,signal:null==(i=h)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var s={statusCode:t.status,text:i};if(200===t.status)try{s.json=JSON.parse(i)}catch(e){ic.error(e)}null==e.callback||e.callback(s)})).catch(g).finally(()=>h?clearTimeout(h.timeout):null)}catch(e){h&&clearTimeout(h.timeout),g(e)}}},ah=e=>{try{var t,i=ar(e),s=i.url,r=i.encodedBody,n=null!=r?r:{},a=n.body,o=n.estimatedSize;if(!a)return;var u=a instanceof Blob?a:new Blob([a],{type:n.contentType});if(l.sendBeacon(s,u))return;var h=L(e.data)?e.data:null==(t=e.data)?void 0:t.batch;if(L(h)&&h.length>1&&(null!=o?o:0)>16384){var c=Math.ceil(h.length/2),d=t=>L(e.data)?t:x({},e.data,{batch:t});return ah(x({},e,{data:d(h.slice(0,c))})),void ah(x({},e,{data:d(h.slice(c))}))}ic.warn("Beacon of ~"+(null!=o?o:0)+" bytes was rejected by the browser, falling back to fetch"),au(x({},e,{ma:!0}))}catch(e){ic.warn("Beacon send failed",e)}},ac=(e,t,i,s)=>{var r="query"===s?"POST"===t?"sent_at":"_":void 0;return ai(i===nm?at(e,"compression"):e,x({},r?{[r]:Date.now().toString()}:{},i===nm?{}:{compression:i}))},ad=[];c&&ad.push({transport:"fetch",method:au}),d&&ad.push({transport:"XHR",method(e){var t=an(e);if(t){var i=new d,s=t.encodedBody;i.open(e.method||"GET",t.url,!0);var r=null!=s?s:{},n=r.contentType,a=r.body;sI(e.headers,function(e,t){i.setRequestHeader(t,e)}),n&&i.setRequestHeader("Content-Type",n),e.timeout&&(i.timeout=e.timeout),i.onreadystatechange=()=>{if(4===i.readyState){var t={statusCode:i.status,text:i.responseText};if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(a)}}}),null!=l&&l.sendBeacon&&ad.push({transport:"sendBeacon",method:ah});class av{constructor(e,t){this.ya=!0,this.ba=[],this._a=er((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,ic.createLogger("flush interval"),3e3),this.wa=e}enqueue(e){this.ba.push(e),this.ka||this.Sa()}unload(){this.xa();var e=Object.values(this.ba.length>0?this.Ca():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Ta(x({},e,{transport:"sendBeacon"}))})}enable(){this.ya=!1,this.Sa()}Sa(){var e=this;this.ya||(this.ka=setTimeout(()=>{if(this.xa(),this.ba.length>0){var t=this.Ca();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&L(s.data)&&sI(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.Ta(s)}()}},this._a))}Ta(e){try{this.wa(e)}catch(e){ic.error(e)}}xa(){clearTimeout(this.ka),this.ka=void 0}Ca(){var e={};return sI(this.ba,t=>{var i,s=(t?t.batchKey:null)||t.url;B(e[s])&&(e[s]=x({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.ba=[],e}}var ap=["retriesPerformedSoFar"];class ag{constructor(e){this.Ma=!1,this.Ia=3e3,this.ba=[],this._instance=e,this.ba=[],this.Ea=!0,!B(a)&&"onLine"in a.navigator&&(this.Ea=a.navigator.onLine,this.Ra=()=>{this.Ea=!0,this.Pa()},this.Aa=()=>{this.Ea=!1},sM(a,"online",this.Ra),sM(a,"offline",this.Aa))}get length(){return this.ba.length}retriableRequest(e){var t=e.retriesPerformedSoFar,i=k(e,ap);G(t)&&(i.url=ai(i.url,{retry_count:t})),this._instance._send_request(x({},i,{callback:e=>{if(200!==e.statusCode&&(400>e.statusCode||e.statusCode>=500)){if((0===e.statusCode?3:10)>(null!=t?t:0))return void this.os(x({retriesPerformedSoFar:t},i));0===e.statusCode&&ic.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(null!=t?t:0)+" retries.")}null==i.callback||i.callback(e)}}))}os(e){var t,i,s=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=s+1;var r=Math.ceil((i=Math.min(18e5,t=3e3*Math.pow(2,s)))+(Math.random()-.5)*(i-t/2)),n=Date.now()+r;this.ba.push({retryAt:n,requestOptions:e});var a="Enqueued failed request for retry in "+r;navigator.onLine||(a+=" (Browser is offline)"),ic.warn(a),this.Ma||(this.Ma=!0,this.Fa())}Fa(){(this.Oa&&clearTimeout(this.Oa),0===this.ba.length)?(this.Ma=!1,this.Oa=void 0):this.Oa=setTimeout(()=>{this.Ea&&this.ba.length>0&&this.Pa(),this.Fa()},this.Ia)}Pa(){var e=Date.now(),t=[],i=this.ba.filter(i=>e>i.retryAt||(t.push(i),!1));if(this.ba=t,i.length>0)for(var s of i)this.retriableRequest(s.requestOptions)}unload(){for(var e of(this.Oa&&(clearTimeout(this.Oa),this.Oa=void 0),this.Ma=!1,B(a)||(this.Ra&&(a.removeEventListener("online",this.Ra),this.Ra=void 0),this.Aa&&(a.removeEventListener("offline",this.Aa),this.Aa=void 0)),this.ba)){var t=e.requestOptions;try{this._instance._send_request(x({},t,{transport:"sendBeacon"}))}catch(e){ic.error(e)}}this.ba=[]}}class af{constructor(e){this.La=()=>{this.Da||(this.Da={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),a=r?Math.max(0,r.scrollHeight-r.clientHeight):0,o=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this.Da.lastScrollY=Math.ceil(n),this.Da.maxScrollY=Math.max(n,null!=(e=this.Da.maxScrollY)?e:0),this.Da.maxScrollHeight=Math.max(a,null!=(t=this.Da.maxScrollHeight)?t:0),this.Da.lastContentY=o,this.Da.maxContentY=Math.max(o,null!=(i=this.Da.maxContentY)?i:0),this.Da.maxContentHeight=Math.max(l,null!=(s=this.Da.maxContentHeight)?s:0)},this._instance=e}get $a(){return this._instance.config.scroll_root_selector}getContext(){return this.Da}resetContext(){var e=this.Da;return setTimeout(this.La,0),e}startMeasuringScrollPosition(){sM(a,"scroll",this.La,{capture:!0}),sM(a,"scrollend",this.La,{capture:!0}),sM(a,"resize",this.La)}scrollElement(){if(!this.$a)return null==a||null==(t=a.document)?void 0:t.documentElement;for(var e of L(this.$a)?this.$a:[this.$a]){var t,i,s=null==a||null==(i=a.document)?void 0:i.querySelector(e);if(s)return s}}Na(e){var t,i;if(this.$a){var s=this.scrollElement();return s&&s["y"===e?"scrollTop":"scrollLeft"]||0}return a?"y"===e?a.scrollY||a.pageYOffset||(null==(t=a.document)||null==(t=t.documentElement)?void 0:t.scrollTop)||0:a.scrollX||a.pageXOffset||(null==(i=a.document)||null==(i=i.documentElement)?void 0:i.scrollLeft)||0:0}scrollY(){return this.Na("y")}scrollX(){return this.Na("x")}}var a_=e=>nn(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties,null==e?void 0:e.config.disable_capture_url_hashes);class am{constructor(e,t,i,s){this.Te=e=>{var t=this.qa();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.ja(this._instance)};this.Ba.register({[sr]:i})}},this._instance=e,this.Ha=t,this.Ba=i,this.ja=s||a_,this.Ha.onSessionId(this.Te)}qa(){return this.Ba.props[sr]}getSetOnceProps(){var e,t=null==(e=this.qa())?void 0:e.props;return t?"r"in t?na(t,this._instance.config.disable_capture_url_hashes):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return sI(sR(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+I(i)]=t}),e}}class ay{on(e,t){return this.za[e]||(this.za[e]=[]),this.za[e].push(t),()=>{this.za[e]=this.za[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.za[e]||[])i(t);for(var s of this.za["*"]||[])s(e,t)}constructor(){this.za={}}}var ab=id("[SessionId]");class aw{on(e,t){return this.Ua.on(e,t)}constructor(e,t,i){if(this.Wa=null,this.Va=null,this.Ga=[],this.Za=void 0,this.Qa=!1,this.Ua=new ay,this.Ja=(e,t)=>!(!G(e)||!G(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===s_)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.mn=e.config,this.Ba=e.persistence,this.Ie=void 0,this.Bt=void 0,this._sessionStartTimestamp=null,this.Ka=void 0,this._sessionActivityTimestamp=null,this.Ya=t||sH,this.Xa=i||sH;var s,r=this.mn.persistence_name||this.mn.token;if(this._sessionTimeoutMs=1e3*er(this.mn.session_idle_timeout_seconds||1800,60,36e3,ab.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.tl(),this.el="ph_"+r+"_window_id",this.il="ph_"+r+"_primary_window_exists",this.rl()){var n=s7.ui(this.el),a=s7.ui(this.il);n&&!a?this.Ie=n:s7.oi(this.el),s7.ni(this.il,!0)}null!=(s=this.mn.bootstrap)&&s.sessionID&&this.setBootstrapSessionId(this.mn.bootstrap.sessionID),this.nl()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return B(this.Ga)&&(this.Ga=[]),this.Ga.push(e),this.Bt&&e(this.Bt,this.Ie),()=>{this.Ga=this.Ga.filter(t=>t!==e)}}rl(){return"memory"!==this.mn.persistence&&!this.Ba.Eo&&s7.ii()}sl(e){e!==this.Ie&&(this.Ie=e,this.rl()&&s7.ni(this.el,e))}ol(){return this.Ie?this.Ie:this.rl()?s7.ui(this.el):null}al(e){var t=this.Wa;return!V(t)&&!V(e)&&5e3>Math.abs(e-t)}ll(e,t,i){var s=t!==this._sessionActivityTimestamp,r=e===this.Bt&&i===this._sessionStartTimestamp;this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Bt=e,r&&!s||r&&this.al(t)||(this.Wa=t,this.Ba.register({[iH]:[t,e,i]}))}ul(){var e,t=null==(e=this.mn)?void 0:e.persistence_save_debounce_ms;return G(t)&&t>0}hl(){this.ul()?this.Ba.refreshKey(iH):(this.Ba.flush(),this.Ba.load())}dl(){var e;if(!V(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Wa){this.hl();var t=this.vl();t[1]===this.Bt&&t[2]===this._sessionStartTimestamp&&(this.Wa=this._sessionActivityTimestamp,this.Ba.register({[iH]:[this._sessionActivityTimestamp,null!=(e=this.Bt)?e:null,this._sessionStartTimestamp]}),this.Ba.flush())}}cl(){var e=this.vl()[0];return Math.max(G(e)?e:0,G(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0)}fl(e){return this.hl(),this.Ja(e,this.cl())}vl(){var e=this.Ba.props[iH];return L(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Wa=null,this.Ka=void 0,clearTimeout(this.pl),this.pl=void 0,this.ll(null,null,null)}setBootstrapSessionId(e,t){void 0===t&&(t=!1);var i=function(e,t){void 0===t&&(t=(new Date).getTime());try{var i=(e=>{var t=e.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})(e);return i>t+6e4?void ab.error("Bootstrap sessionID cannot be in the future"):i}catch(e){return void ab.error("Invalid sessionID in bootstrap",e)}}(e);return!B(i)&&(t?this.Ka={sessionId:e,sessionStartTimestamp:i}:this.ll(e,(new Date).getTime(),i),!0)}destroy(){this.Qa=!0,this.dl(),clearTimeout(this.pl),this.pl=void 0,this.Za&&a&&(a.removeEventListener(sx,this.Za,{capture:!1}),this.Za=void 0),this.Ga=[]}nl(){this.Za=()=>{this.dl(),this.rl()&&s7.oi(this.il)},sM(a,sx,this.Za,{capture:!1})}checkAndGetSessionAndWindowId(e,t,i){if(void 0===e&&(e=!1),void 0===t&&(t=null),void 0===i&&(i=!1),this.mn.cookieless_mode===s_)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var s,r,n=t||(new Date).getTime(),a=this.Bt;i?this.Va=n:(V(this.Va)||this.Va>n||n-this.Va>=1e3)&&(null==(s=(r=this.Ba).syncCookieProperties)||s.call(r),this.Va=n);var o=this.vl(),l=o[1],u=o[2],h=!B(a)&&l!==a,c=this.cl(),d=this.ol(),v=this.Ka,p=!!v&&(v.sessionStartTimestamp>n+6e4||n-v.sessionStartTimestamp>864e5),g=v?p:G(u)&&Math.abs(n-u)>864e5,f=!1,_=h,m=!l||!!v,y=l,b=!m&&!e&&this.Ja(n,c);if(b){(b=this.fl(n))||ab.info("cross-tab refresh kept the session alive",{sessionId:l});var w=this.vl();l=w[1],u=w[2]}if(m||b||g){_=!1;var x=v&&!p;l=x?v.sessionId:this.Ya(),d=this.Xa(),ab.info("new session ID assigned",{sessionId:l,windowId:d,bootstrapped:!!x,changeReason:{noSessionId:m,activityTimeout:b,sessionPastMaximumLength:g}}),u=x?v.sessionStartTimestamp:n,this.Ka=void 0,f=!0}else d||(d=this.Xa(),f=!0),(_=_||l!==y)&&(ab.info("adopted cross-tab session id",{sessionId:l,windowId:d}),f=!0);var k=G(c)&&e&&!g?c:n,E=G(u)?u:(new Date).getTime();this.sl(d),this.ll(l,k,E),e||this.tl();var S={noSessionId:m,activityTimeout:b,sessionPastMaximumLength:g,crossTabAdoption:_};return f&&this.Ga.forEach(e=>e(l,d,S)),{sessionId:l,windowId:d,sessionStartTimestamp:E,changeReason:f?S:void 0,lastActivityTimestamp:c}}tl(){this.Qa||(clearTimeout(this.pl),this.pl=setTimeout(()=>{if(!this.Qa)if(this.fl((new Date).getTime())){var e=this.Bt;this.resetSessionId(),this.Ua.emit("forcedIdleReset",{idleSessionId:e})}else this.tl()},1.1*this.sessionTimeoutMs))}}var ax=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&S(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>S(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver};function ak(){return(ak=w(function*(){var e=null==l?void 0:l.userAgentData;if(null!=e&&e.getHighEntropyValues)try{var t=yield e.getHighEntropyValues(["model"]),i=null==t?void 0:t.model;return z(i)&&i.length>0?i:void 0}catch(e){return void ic.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",e)}})).apply(this,arguments)}function aE(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}var aS=(e,t)=>{if(!(e=>{try{new RegExp(e)}catch(e){return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},aP=e=>e.toLowerCase(),aF={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>aS(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!aS(t,e))),icontains:(e,t)=>t.map(aP).some(t=>e.map(aP).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(aP).every(t=>e.map(aP).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i<parseFloat(e))})};function aI(e,t){return!e||Object.entries(e).every(e=>{var i=e[1],s=null==t?void 0:t[e[0]];if(null==s)return!1;var r=aF[i.operator];return!!r&&r(i.values,[String(s)])})}function aC(e,t,i){return rQ({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var aO="custom",a$="i.posthog.com",aA=/^\/static\//,aR=["/s/","/e/","/i/"];class aT{constructor(e){this.gl={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+a$,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.gl[this.apiHost]||(this.gl[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":aO),this.gl[this.apiHost]}ml(e){if(aA.test(e)){var t=this.instance.config.asset_host;if("string"==typeof t)return t.trim().replace(/\/$/,"")||void 0}}yl(e){var t=rZ(e);return t?t.protocol+"//"+t.host+t.pathname:void 0}bl(e,t,i){if("ui"===e)return i;var s=i,r=this.instance.config.rewriteRequestPath;if(r&&(s=r(new URL((null==(a=rZ(i))?void 0:a.href)||i)).toString()),r&&"api"===e&&aR.some(e=>0===t.indexOf(e))){var n=this.yl(s);if(n){var a,o,l=this.apiHost,u=this._l;(null==(o=u)?void 0:o.apiHost)===l&&u.rewriteRequestPath===r||(u={apiHost:l,rewriteRequestPath:r,urls:new Set},this._l=u),u.urls.add(n)}}return s}isIngestionEndpoint(e){var t=this._l,i=this.yl(e);return(null==t?void 0:t.apiHost)===this.apiHost&&t.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!i&&t.urls.has(i)}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.bl(e,t,this.uiHost+t);if("flags"===e)return this.bl(e,t,this.flagsApiHost+t);if("assets"===e){var i=this.ml(t);if(i)return this.bl(e,t,""+i+t)}if(this.region===aO)return this.bl(e,t,this.apiHost+t);var s=a$+t;switch(e){case"assets":return this.bl(e,t,"https://"+this.region+"-assets."+s);case"api":return this.bl(e,t,"https://"+this.region+"."+s)}}}var aM=id("[Surveys]"),aD="seenSurvey_",aL=e=>{try{var t=""+aD+(e.current_iteration&&e.current_iteration>0?e.id+"_"+e.current_iteration:e.id);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){aM.error("Failed to persist survey seen state",e)}},aN=["popover","widget","api"],aj={ignoreConditions:!1,ignoreDelay:!1,displayType:nS},aq=id("[PostHog ExternalIntegrations]"),aB={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class az{constructor(e){this._instance=e}Ys(e,t){var i;null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return aq.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this;for(var i of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))!function(){var e,s,r,n=i[0],a=i[1];!a||null!=(e=m.__PosthogExtensions__)&&null!=(e=e.integrations)&&e[n]||t.Ys(aB[n],()=>{var e;null==(e=m.__PosthogExtensions__)||null==(e=e.integrations)||null==(e=e[n])||e.start(t._instance)}),!a&&null!=(s=m.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[n]&&(null==(r=m.__PosthogExtensions__)||null==(r=r.integrations)||null==(r=r[n])||r.stop())}()}}class aH{constructor(e,t){this.A=e,this.Ns=t,this.wl=new Map,this.Os=!1}add(e){var t=this;return w(function*(){if(t.Os)throw Error("Cannot add an extension to a disposed ExtensionRuntime");if(t.wl.has(e.name))throw Error('Browser extension "'+e.name+'" is already registered');t.wl.set(e.name,e);try{var i=e.setup(t.Ns);i&&(yield i)}catch(i){var s=t.wl.get(e.name)===e;s&&t.wl.delete(e.name),t.A.error('Failed to set up browser extension "'+e.name+'"',i),s&&t.kl(e)}})()}getExtension(e){return this.wl.get(e)}dispose(){if(!this.Os){this.Os=!0;var e=Array.from(this.wl.values()).reverse();for(var t of(this.wl.clear(),e))this.kl(t)}}kl(e){try{var t=null==e.dispose?void 0:e.dispose();t&&N(t.then)&&t.then(void 0,t=>{this.A.error('Failed to dispose browser extension "'+e.name+'"',t)})}catch(t){this.A.error('Failed to dispose browser extension "'+e.name+'"',t)}}}class aV{constructor(e){this._instance=e}initialize(){}get(e){var t=this._instance.persistence;if("string"==typeof e)return null==t?void 0:t.get_property(e);var i={};for(var s of e){var r=null==t?void 0:t.get_property(s);B(r)||(i[s]=r)}return i}set(e,t){var i;null==(i=this._instance.persistence)||i.register("string"==typeof e?{[e]:t}:e)}remove(e){var t;null==(t=this._instance.persistence)||t.unregister(e)}}var aU="extensionsRemoteConfig";class aW{constructor(e){this.Os=!1,this.instance=e,this.A=ic,this.Sl=e.xl,this.kv=new aV(e),this.onEvent=e=>nP(this.instance.on("eventCaptured",t=>{try{e({event:t.event,properties:t.properties})}catch(e){this.A.error("Browser extension event listener failed",e)}})),this.onRemoteConfig=e=>{if(this.Os)return nP(()=>{});var t=t=>{try{e(t)}catch(e){this.A.error("Browser extension remote config listener failed",e)}},i=this.instance.Cl.on(aU,t);return this.Sl&&t(this.Sl),nP(i)},this.Tl=new aH(ic.createLogger("[BrowserExtensions]"),this)}get logger(){return this.A}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var e;return null!=(e=this.instance.get_property(iw))?e:this.distinctId}get deviceId(){var e=this.instance.get_property(iw);return"string"==typeof e?e:void 0}get library(){return{name:y.LIB_NAME,version:y.LIB_VERSION}}get initialPersonProperties(){var e,t;return null!=(e=null==(t=this.instance.persistence)?void 0:t.get_initial_props())?e:{}}get groups(){return this.instance.getGroups()}get session(){try{var e,t,i,s,r=null==(e=this.instance.sessionManager)?void 0:e.checkAndGetSessionAndWindowId(!0);return{sessionId:null!=(t=null==r?void 0:r.sessionId)?t:"",windowId:null!=(i=null==r?void 0:r.windowId)?i:"",sessionStartTimestamp:null!=(s=null==r?void 0:r.sessionStartTimestamp)?s:0}}catch(e){return{sessionId:"",windowId:"",sessionStartTimestamp:0}}}get canCapture(){return this.instance.is_capturing()}get projectToken(){return this.instance.config.token}add(e){return this.Tl.add(e)}getExtension(e){return this.Tl.getExtension(e)}capture(e,t,i){var s=this;return w(function*(){i?s.instance.capture(e,t,{timestamp:i.timestamp,uuid:i.uuid,$set:i.set,$set_once:i.setOnce}):s.instance.capture(e,t)})()}registerDynamicEventProperties(e){return nP(this.instance.Ml(e))}handleRemoteConfig(e){this.Os||(this.Sl=e,this.instance.Cl.emit(aU,e))}sendRequest(e,t){var i=this;return w(function*(){void 0===t&&(t={});var s,r=i.instance.requestRouter.endpointFor(null!=(s=t.target)?s:"api",e),n={method:t.method,url:t.query?ai(r,t.query):r,data:t.body,headers:t.headers,timeout:t.timeoutMs,fireCallbackOnDrop:!0,transport:t.transport,compression:t.compression,compressionFallback:"flags"===t.target&&"best-available"===t.compression?$.Base64:void 0,timestampMode:t.sentAt};return"sendBeacon"===t.transport?(i.instance._send_request(n),{statusCode:202}):new Promise(e=>{n.callback=e,i.instance._send_request(n)})})()}dispose(){this.Os||(this.Os=!0,this.Tl.dispose())}}var aG={},aK=0,aJ=()=>{},aY='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',aQ="Surveys module not available",aZ="sanitize_properties is deprecated. Use before_send instead",aX="Invalid value for property_denylist config: ",a0=/^[A-Za-z0-9_-]{1,400}$/,a1=/^fb\.[0-9]+\.[0-9]+\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?$/,a2=["token","distinct_id",sc],a3="posthog",a5=!n9&&-1===(null==g?void 0:g.indexOf("MSIE"))&&-1===(null==g?void 0:g.indexOf("Mozilla")),a6=e=>{var t,i;return x({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!z(t))return!1;var i=t.split(".").slice(-2).join(".");for(var s of sT)if(i===s)return!1;return!0}(null==u?void 0:u.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:aJ,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:h&&z(null==h?void 0:h.search)&&-1!==h.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,reuseAnonymousId:!1,disable_external_dependency_loading:!1,strict_script_versioning:"fallback",enable_recording_console_log:void 0,secure_cookie:"https:"===(null==a||null==(t=a.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){ic.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:sb,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:aJ},{rageclick:e&&e>="2026-05-30"?{content_ignorelist:ry,ignore_text_selection:!0}:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:(i={},e&&"unset"!==e&&("2025-11-30">e||(i.strictMinimumDuration=!0),"2026-05-30">e||(i.canvasCapture={resolutionScale:.6}),"2026-06-25">e||(i.streamNetworkBody=!0),"2026-08-30">e||(i.captureJsonLd=!0)),i),external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>="2026-05-30"?250:0,split_storage:!(!e||"2026-05-30">e),detect_google_search_app:!(!e||"2026-05-30">e),disable_capture_url_hashes:!(!e||"2026-06-25">e),cookieWinsOnConflict:!(!e||"unset"===e||"2026-08-29">e)})},a8=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"],["__preview_cookie_wins_on_conflict","cookieWinsOnConflict"]],a4=e=>{var t={};for(var i of a8){var s=i[0],r=i[1];B(e[s])||(t[r]=e[s])}var n=sC({},t,e),a=e.__preview_external_dependency_versioned_paths;return B(a)||(B(e.strict_script_versioning)&&(n.strict_script_versioning=!!a),z(a)&&B(e.asset_host)&&(n.asset_host=a)),L(e.property_blacklist)&&(B(e.property_denylist)?n.property_denylist=e.property_blacklist:L(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:ic.error(aX+e.property_denylist)),n};class a9{constructor(){this.__forceAllowLocalhost=!1}get Il(){return this.__forceAllowLocalhost}set Il(e){ic.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class a7{El(e){if(e){var t=this.wl.indexOf(e);-1!==t&&this.wl.splice(t,1)}}Rl(e,t){return this.El(e),this.wl.push(t),null==t.initialize||t.initialize(),t}Pl(){return this.config.cookieless_mode===s_||this.config.cookieless_mode===sf&&this.consent.isRejected()}Al(){if(!(this.Fl||this.config.reuseAnonymousId||this.config.segment||this.Pl())){var e,t,i,s="memory"===this.config.persistence||"sessionStorage"===this.config.persistence;(s||this.config.disable_persistence)&&(this.Ol||(s?(e="persistence is set to '"+this.config.persistence+"'",t="memory"===this.config.persistence?"on every page load":"for every new browser tab or window",i="Either set persistence to 'localStorage+cookie', keep this persistence and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId."):(e="persistence is disabled (disable_persistence is true)",t="on every page load",i="Either set disable_persistence to false, keep persistence disabled and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId."),this.Fl=!0,console.warn("[PostHog.js]",e+" but no bootstrap.distinctID was provided. PostHog will mint a new distinct ID "+t+", so calling identify() merges a new ID onto the person each time. A person can then pass the distinct-ID limit and its events stop appearing on person pages and the session tab. "+i)))}}Ll(){if(!this.Pl()&&this.get_distinct_id()===sh){var e=this.persistence;if(e){this.Dl()||e.load(!0);var t=this.get_distinct_id();if(!t||t===sh){var i=this.config.get_device_id(sH());this.register({distinct_id:i,$device_id:i}),e.set_property(ss,sm)}this.$l()}}}get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new a9,this.Nl=!1,this.version=y.LIB_VERSION,this.ql=new Set,this.jl="",this.Cl=new ay,this.wl=[],this.Bl=[],this.Ol=!1,this.Fl=!1,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=a6(),this.SentryIntegration=rU,this.sentryIntegration=e=>{var t;return t=rV(this,e),{name:rH,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Hl=!1,this.zl=null,this.Ul=null,this.Wl=null,this.scrollManager=new af(this),this.pageViewManager=new rW(this),this.rateLimiter=new nI(this),this.requestRouter=new aT(this),this.consent=new re(this),this.externalIntegrations=new az(this);var e,t=null!=(e=a7.__defaultExtensionClasses)?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.metrics=t.metrics&&new t.metrics(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,i)=>{var s=z(e)?{[e]:t}:e;this.setPersonProperties(s),null==i||i({})},set_once:(e,t,i)=>{var s=z(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),null==i||i({})}},this.on("eventCaptured",e=>ic.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==a3){var s,r=null!=(s=aG[i])?s:new a7;return r._init(e,t,i),aG[i]=r,aG[a3][i]=r,r}return this._init(e,t,i)}_init(e,t,i){void 0===t&&(t={});var s,r,n,o,l=z(e)?e.trim():"";if(!l)return ic.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return l!==(null==(o=this.config)?void 0:o.token)?console.warn("[PostHog.js]","You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('"+l+"', { ... }, 'project2')"):console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=a6(t.defaults),t.debug=this.Vl(t.debug),this.Gl=t,this.Zl=[],t.person_profiles?this.Ul=t.person_profiles:t.process_person&&(this.Ul=t.process_person);var u=a6(t.defaults),h=a4(t),c=sC({},u,h,{name:i,token:l});j(u.rageclick)&&j(h.rageclick)&&(c.rageclick=sC({},u.rageclick,h.rageclick)),j(u.session_recording)&&j(h.session_recording)&&(c.session_recording=sC({},u.session_recording,h.session_recording)),this.set_config(c),this.config.on_xhr_error&&ic.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:nm;var d=this.Dl();if(this.persistence=new n_(this.config,d),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new n_(x({},this.config,{persistence:"sessionStorage"}),d,!1),this.jl="ph_"+(this.config.persistence_name||this.config.token)+"_session_registered_properties","memory"!==this.config.persistence&&!d&&s7.ii()){var v=s7.ui(this.jl);L(v)&&v.forEach(e=>{z(e)&&this.ql.add(e)})}else s7.oi(this.jl);var p=x({},this.persistence.props),g=x({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ql=new av(e=>this.Jl(e),this.config.request_queue_config),this.Kl=new ag(this),this.__request_queue=[];var f=this.Pl();f||(this.sessionManager=new aw(this),this.sessionPropsManager=new am(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId((e,t,i)=>{(null!=i&&i.activityTimeout||null!=i&&i.sessionPastMaximumLength||null!=i&&i.crossTabAdoption)&&this.Yl()})),this.Xl(),this.config.__preview_deferred_init_extensions?(ic.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.tu(f)},0)):(ic.info("Initializing extensions synchronously"),this.tu(f)),y.DEBUG=y.DEBUG||this.config.debug,y.DEBUG&&ic.info("Starting in debug mode",{this:this,config:t,thisC:x({},this.config),p:p,s:g}),!this.config.identity_distinct_id||null!=(s=t.bootstrap)&&s.distinctID||(t.bootstrap=x({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}));var _=null==(r=t.bootstrap)?void 0:r.distinctID;if(this.Ol=!!_&&!H(_),void 0!==(null==(n=t.bootstrap)?void 0:n.distinctID)){var m=t.bootstrap.distinctID,b=this.get_distinct_id(),w=this.persistence.get_property(ss);if(t.bootstrap.isIdentifiedID&&null!=b&&b!==m&&w===sm)this.identify(m);else if(t.bootstrap.isIdentifiedID&&null!=b&&b!==m&&w===sy)ic.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var k=this.config.get_device_id(sH()),E=t.bootstrap.isIdentifiedID?k:m;this.persistence.set_property(ss,t.bootstrap.isIdentifiedID?sy:sm),this.register({distinct_id:m,$device_id:E})}}if(f)this.register_once({distinct_id:sh,$device_id:null},"");else if(!this.get_distinct_id()){var S=this.config.get_device_id(sH());this.register_once({distinct_id:S,$device_id:S},""),this.persistence.set_property(ss,sm)}return sM(a,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?rz(this,()=>this.eu()):this.eu(),N(this.config._onCapture)&&this.config._onCapture!==aJ&&(ic.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&ic.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return ak.apply(this,arguments)})().then(e=>{e&&this.register({[ix]:e})}).catch(aJ),this}iu(e){return z(e.name)&&N(e.setup)}ru(e,t){this.iu(e)?t.push(()=>{this.nu().add(e).catch(()=>null==e.dispose?void 0:e.dispose()).catch(t=>{ic.error('Failed to dispose browser extension "'+e.name+'"',t)})}):this.wl.push(e)}Xl(){var e,t,i,s,r,n,a=null!=(e=null==(t=this.config.__extensionClasses)?void 0:t.featureFlags)?e:null==(i=a7.__defaultExtensionClasses)?void 0:i.featureFlags;a&&(this.featureFlags&&this.featureFlags instanceof a||(null==(s=this.su)||s.call(this),this.su=void 0,this.featureFlags=new a(this)),N(this.featureFlags.onReloading)&&N(this.featureFlags.setup)?this.su||(this.su=this.featureFlags.onReloading(()=>{this.Cl.emit("featureFlagsReloading",!0)}),this.nu().add(this.featureFlags)):null==(r=(n=this.featureFlags).initialize)||r.call(n))}tu(e){var t,i,s,r,n,a,o,l=performance.now(),u=x({},a7.__defaultExtensionClasses,this.config.__extensionClasses),h=[];u.exceptions&&this.wl.push(this.exceptions=null!=(t=this.exceptions)?t:new u.exceptions(this)),u.historyAutocapture&&this.wl.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.wl.push(this.tracingHeaders=new u.tracingHeaders(this)),u.siteApps&&this.wl.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.wl.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||h.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.ru(this.autocapture=new u.autocapture(this),h),u.surveys&&this.ru(this.surveys=null!=(i=this.surveys)?i:new u.surveys(this),h),u.logs&&this.ru(this.logs=null!=(s=this.logs)?s:new u.logs(this),h),u.metrics&&this.wl.push(this.metrics=null!=(r=this.metrics)?r:new u.metrics(this)),u.conversations&&this.wl.push(this.conversations=null!=(n=this.conversations)?n:new u.conversations(this)),u.productTours&&this.wl.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.wl.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.wl.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.wl.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.wl.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,rj)),u.toolbar&&this.wl.push(this.toolbar=null!=(a=this.toolbar)?a:new u.toolbar(this)),u.experiments&&this.wl.push(this.experiments=null!=(o=this.experiments)?o:new u.experiments(this)),this.wl.forEach(e=>{e.initialize&&h.push(()=>{null==e.initialize||e.initialize()})}),h.push(()=>{if(this.ou){var e=this.ou;this.ou=void 0,this.wl.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}}),this.au(h,l)}au(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.au(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){ic.error("Error initializing extension:",e)}}var s=Math.round(performance.now()-t);this.register_for_session({[sd]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[sv]:s}),this.config.__preview_deferred_init_extensions&&ic.info("PostHog extensions initialized ("+s+"ms)")}fa(e){var t;if(!u||!u.body)return ic.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.fa(e)},500);if(this.config.__preview_deferred_init_extensions&&(this.ou=e),this.xl=e,this.compression=void 0,e.ok){var i,s=e.config;s.supportedCompression&&!this.config.disable_compression&&(this.compression=P(s.supportedCompression,nm)?nm:P(s.supportedCompression,ny)?ny:void 0),null!=(i=s.analytics)&&i.endpoint&&(this.analyticsDefaultEndpoint=s.analytics.endpoint)}this.set_config({person_profiles:this.Ul?this.Ul:sb}),null==(t=this.lu)||t.handleRemoteConfig(e),this.wl.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}eu(){try{this.config.loaded(this)}catch(e){ic.critical("`loaded` function failed",e)}if(this.uu(),this.config.internal_or_test_user_hostname&&null!=h&&h.hostname){var e=h.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Pl())&&this.hu()},1),this.du=new nO(this),this.du.load()}uu(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ql)||e.enable())}_dom_loaded(){this.is_capturing()&&sF(this.__request_queue,e=>this.Jl(e)),this.__request_queue=[],this.uu()}_handle_unload(){var e,t,i,s,r;null==(e=this.surveys)||null==e.handlePageUnload||e.handlePageUnload(),null==(t=this.metrics)||t.flush("sendBeacon"),this.config.request_batching?(this.vu()&&this.capture(sE),null==(i=this.logs)||i.flushLogs("sendBeacon"),null==(s=this.Ql)||s.unload(),null==(r=this.Kl)||r.unload()):this.vu()&&this.capture(sE,null,{transport:"sendBeacon"})}_send_request(e){var t;this.__loaded?a5?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=x({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?null!=(t=this.compression)?t:e.compressionFallback:e.compression,(B(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,i,s,r,n,a=x({},e);a.timeout=a.timeout||6e4;var o,l,u,h,c,d=null!=(s=a.transport)?s:"fetch";"sendBeacon"===d&&B(a.compression)&&a.data&&(a.compression=ny),"POST"===a.method&&a.data&&("capture-body"===a.timestampMode?a.data={api_key:null!=(l=null==(c=(h=(L(o=a.data)?o:[o]).map(e=>x({},e,e.timestamp instanceof Date&&!isNaN(e.timestamp.getTime())?{timestamp:e.timestamp.toISOString()}:{})))[0])||null==(u=c.properties)?void 0:u.token)?l:null==c?void 0:c.token,batch:h,sent_at:(new Date).toISOString()}:"body"===a.timestampMode&&(t=a.data,void 0===i&&(i=(new Date).toISOString()),a.data=L(t)?t.map(e=>x({},e,{sent_at:i})):x({},t,{sent_at:i}))),a.url=ac(a.url,a.method,a.compression,a.timestampMode);var v=ad.filter(e=>!a.disableTransport||!e.transport||!a.disableTransport.includes(e.transport)),g=null!=(r=null==(n=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===d)return e[t]}(v))?void 0:n.method)?r:v[0].method;if(!g)throw Error("No available transport method");var f=e=>{try{g(e)}catch(e){al(e)?ic.warn(e):ic.error(e),null==a.callback||a.callback({statusCode:0,error:e})}};"sendBeacon"!==d&&a.data&&a.compression===nm&&p&&"u">typeof Promise&&!ae?aa(a).then(e=>{f(e)}).catch(t=>{t2(t)?(ae=!0,f(x({},a,{compression:void 0,url:ac(e.url,e.method,void 0,e.timestampMode)}))):((e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return t2(e)||t===tX})(t)&&(ae=!0),f(a))}):g(a)})(x({},e,{callback:t=>{var i,s;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(i=(s=this.config).on_request_error)||i.call(s,t),null==e.callback||e.callback(t)}}))):e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:0}))}Jl(e){this.Kl?this.Kl.retriableRequest(e):this._send_request(e)}_execute_array(e){aK++;try{var t,i=[],s=[],r=[];sF(e,e=>{if(e)if(L(t=e[0]))r.push(e);else if(N(e))try{e.call(this)}catch(t){ic.error("Error executing queued PostHog call",e,t)}else L(e)&&"alias"===t?i.push(e):L(e)&&-1!==t.indexOf("capture")&&N(this[t])?r.push(e):s.push(e)});var n=function(e,t){sF(e,function(e){try{if(L(e[0])){var i=t;sI(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){ic.error("Error executing queued PostHog call",e,t)}})};n(i,this),n(s,this),n(r,this)}finally{aK--}}push(e){if(aK>0&&L(e)&&z(e[0])){var t=a7.prototype[e[0]];N(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}cu(){var e,t=null==(e=this.persistence)?void 0:e.get_property(iS);return z(t)&&a1.test(t)?{value:t,delivered:!1}:j(t)&&z(t.value)&&a1.test(t.value)?{value:t.value,delivered:!0===t.delivered}:void 0}fu(e,t,i,s){if(this.persistence){this.persistence.refreshKey(iS);var r=this.cu();if(!s){if(i)return z(t)&&a1.test(t)?(t!==(null==r?void 0:r.value)&&this.persistence.register({[iS]:{value:t,delivered:!1}}),{value:t,pending:t!==(null==r?void 0:r.value)||!r.delivered}):void this.persistence.unregister(iS);if(z(e)&&a0.test(e)){if((null==r?void 0:r.value.split(".")[3])===e)return{value:r.value,pending:!r.delivered};var n="fb.1."+Date.now()+"."+e;return this.persistence.register({[iS]:{value:n,delivered:!1}}),{value:n,pending:!0}}return r?{value:r.value,pending:!r.delivered}:void 0}this.persistence.unregister(iS)}}pu(e){if(this.persistence){this.persistence.refreshKey(iS);var t=this.cu();(null==t?void 0:t.value)!==e||t.delivered||this.persistence.register({[iS]:{value:e,delivered:!0}})}}capture(e,t,i){var s,r,n,a,o,l,u,h,c,d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ql){if(this.is_capturing())if(!B(e)&&z(e)){this.Ll();var v=!this.config.opt_out_useragent_filter&&this._is_bot();if(!v||this.config.__preview_capture_bot_pageviews){var p=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==p||!p.isRateLimited){null!=t&&t.$current_url&&!z(null==t?void 0:t.$current_url)&&(ic.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=i&&i.gu||ic.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&(T=this.sessionPersistence.update_campaign_params()),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var g,f,_,m,y=new Date,b=(null==i?void 0:i.timestamp)||y,w=tv(null==i?void 0:i.uuid,sH),k={uuid:w,event:e,properties:this.calculateEventProperties(e,t||{},b,w)};e===sk&&this.config.__preview_capture_bot_pageviews&&v&&(k.event="$bot_pageview",k.properties.$browser_type="bot"),p&&(k.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens);var E="$feature_flag_called"===e&&!1===k.properties.$feature_flag_has_experiment&&!0===this.get_property(iQ);(null==i?void 0:i.$set)&&!E&&(k.$set=null==i?void 0:i.$set);var S=j(null==t?void 0:t.$set)?t.$set:void 0,P=!(null==i||!i.$set)&&iE in i.$set,F=P||!!S&&iE in S,I=P?null==i||null==(s=i.$set)?void 0:s[iE]:null==S?void 0:S[iE],C=L(null==t?void 0:t.$unset)?t.$unset:[],O=(null==i?void 0:i.$unset)||[],$=-1!==C.indexOf(iE)||-1!==O.indexOf(iE),A=this.fu(null==(r=T)?void 0:r.fbclid,I,F,$);A&&!0===k.properties.$process_person_profile&&A.pending&&!F&&!E&&(k.$set=x({[iE]:A.value},k.$set));var R=null==i?void 0:i.$unset;R&&(k.$unset=R);var T,M,D,N,H=E?void 0:this.mu(null==i?void 0:i.$set_once,e!==sP,e===sS);if(H&&(k.$set_once=H),null!=i&&i._noTruncate||(u=this.config.properties_string_max_length,h=k,c=e=>z(e)?e.slice(0,u):e,d=new Set,k=function e(t,i){if(t!==Object(t))return c?c(t):t;if(!d.has(t)){var s;if(d.add(t),L(t))s=[],sF(t,t=>{s.push(e(t))});else{var r={};sI(t,(t,i)=>{d.has(t)||(r[i]=e(t,i))}),s=r}return s}}(h)),k.timestamp=b,B(null==i?void 0:i.timestamp)||(k.properties.$event_time_override_provided=!0,k.properties.$event_time_override_system_time=y),E&&(k.properties=(g=k.properties,void 0===(f=a2)&&(f=[]),_={},m=e=>{void 0!==g[e]&&(_[e]=g[e])},tZ.forEach(m),f.forEach(m),_)),e===nk||e===nE){var V=null==t?void 0:t.$survey_id,W=null==t?void 0:t.$survey_iteration;aL({id:V,current_iteration:W}),k.$set=x({},k.$set,{[(M={id:V,current_iteration:W},N="$survey_"+(D=e===nE?"responded":"dismissed")+"/"+M.id,M.current_iteration&&M.current_iteration>0&&(N="$survey_"+D+"/"+M.id+"/"+M.current_iteration),N)]:!0})}else e===nx&&(k.$set=x({},k.$set,{$survey_last_seen_date:(new Date).toISOString()}));if("product tour shown"===e){var G=null==t?void 0:t.$product_tour_type;G&&(k.$set=x({},k.$set,{["$product_tour_last_seen_date/"+G]:(new Date).toISOString()}))}var K=x({},k.properties.$set,k.$set);if(q(K)||this.setPersonPropertiesForFlags(K),!U(this.config.before_send)){var J=this.ns(k);if(!J)return;(k=J).uuid=tv(k.uuid,sH)}var Y=null!=(n=null==(a=k.$set)?void 0:a[iE])?n:j(null==(o=k.properties)?void 0:o.$set)?k.properties.$set[iE]:void 0,Q=null!=A&&A.pending&&Y===A.value?A.value:void 0;this.Cl.emit("eventCaptured",k);var Z=null!=(l=null==i?void 0:i._url)?l:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),X=x({method:"POST",url:Z,data:k,compression:"best-available",timestampMode:"recordings"===(null==i?void 0:i._batchKey)||/\/s\/(?:\?|$)/.test(Z)?"body":"capture-body",batchKey:null==i?void 0:i._batchKey},null!=i&&i.transport?{transport:i.transport}:{},Q?{fireCallbackOnDrop:!0,callback:e=>{e.statusCode>=200&&300>e.statusCode&&this.pu(Q)}}:{});return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly||Q?this.Jl(X):this.Ql.enqueue(X),k}ic.critical("This capture call is ignored due to client rate limiting.")}}else ic.error("No event name provided to posthog.capture")}else ic.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}getExtension(e){var t;return null==(t=this.lu)?void 0:t.getExtension(e)}nu(){var e;return null!=(e=this.lu)?e:this.lu=new aW(this)}Ml(e){this.Bl.push(e);var t=!0;return()=>{if(t){t=!1;var i=this.Bl.indexOf(e);-1!==i&&this.Bl.splice(i,1)}}}yu(e){var t,i,s;return void 0===e&&(e=!0),!(null==(t=this.persistence)||!t.consumeCookieIdentityChange())&&(this.Wl=null,this.persistence.get_property(ss)===sm&&(null==(s=this.sessionPersistence)||s.clear(),this.ql.clear(),this.bu()),null==(i=this.featureFlags)||i.reset(),e&&this.reloadFeatureFlags(),!0)}calculateEventProperties(e,t,i,s,r){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;this.persistence.syncCookieProperties(),this.yu();var n,o=r?void 0:this.persistence.remove_event_timer(e),l=x({},t);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,this.Pl()&&(l[sc]=!0),"$snapshot"===e){var c=x({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=c.distinct_id,(!z(l.distinct_id)&&!W(l.distinct_id)||H(l.distinct_id))&&ic.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var d,v=function(e,t,i,s){if(void 0===s&&(s=!1),!g)return{};var r,n,o,l,u,c=e?[...r6,...t||[]]:[],d=ti(g),v=d[0],p=d[1],f=null!=(u="u">typeof navigator?navigator:void 0)&&u.brave?{brave:!0}:{},_={};B(i)||(_.detectGoogleSearchApp=i);var m={},b=null==(r=navigator)||null==(r=r.userAgentData)?void 0:r.platform,w=null==(n=navigator)?void 0:n.maxTouchPoints,x=null==a||null==(o=a.screen)?void 0:o.width,k=null==a||null==(l=a.screen)?void 0:l.height,E=null==a?void 0:a.devicePixelRatio;B(b)||(m.userAgentDataPlatform=b),B(w)||(m.maxTouchPoints=w),B(x)||(m.screenWidth=x),B(k)||(m.screenHeight=k),B(E)||(m.devicePixelRatio=E);var S,P,F,I,C,O,$=sC(sR({$os:v,$os_version:p,$browser:e9(g,navigator.vendor,f,_),$device:ts(g),$device_type:(O=ts(g))===eh||O===eu||"Kobo"===O||"Kindle Fire"===O||O===eq?el:O===eC||O===e$||O===eO||O===eL?"Console":O===ed?"Wearable":O?ea:"Android"===(null==m?void 0:m.userAgentDataPlatform)&&(null!=(P=null==m?void 0:m.maxTouchPoints)?P:0)>0?600>Math.min(null!=(F=null==m?void 0:m.screenWidth)?F:0,null!=(I=null==m?void 0:m.screenHeight)?I:0)/(null!=(C=null==m?void 0:m.devicePixelRatio)?C:1)?ea:el:"Desktop",$timezone:no(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:r0(s?tg(null==h?void 0:h.href):null==h?void 0:h.href,c,r4),$host:null==h?void 0:h.host,$pathname:null==h?void 0:h.pathname,$raw_user_agent:g.length>1e3?g.substring(0,997)+"...":g,$browser_version:te(g,navigator.vendor,f,_),$browser_language:ni(),$browser_language_prefix:"string"==typeof(S=ni())?S.split("-")[0]:void 0,$screen_height:null==a?void 0:a.screen.height,$screen_width:null==a?void 0:a.screen.width,$viewport_height:null==a?void 0:a.innerHeight,$viewport_width:null==a?void 0:a.innerWidth,$lib:y.LIB_NAME,$lib_version:y.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return y.SDK_DIST_CHANNEL&&($.$sdk_dist_channel=y.SDK_DIST_CHANNEL),$}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var p=this.sessionManager.checkAndGetSessionAndWindowId(r,i.getTime(),!0),f=p.windowId;l.$session_id=p.sessionId,l.$window_id=f}this.sessionPropsManager&&sC(l,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&sC(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=null==(n=this.Kl)?void 0:n.length}catch(e){l.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===aO&&(l.$lib_custom_api_host=this.config.api_host),d=e!==sk||r?e!==sE||r?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,s),l=sC(l,d),e===sk&&u&&(l.title=u.title),!B(o)){var _=i.getTime()-o;l.$duration=parseFloat((_/1e3).toFixed(3))}g&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser");var m=this.persistence.properties(),b=this.sessionPersistence.properties(),w=l.$groups,k=m.$groups;j(w)&&!q(w)&&(l.$groups=x({},j(k)?k:{},w)),sI(["$referrer","$referring_domain"],e=>{e in m&&delete b[e]});var E={};if(this.Bl.length>0)for(var S of this.Bl.slice())try{sC(E,S())}catch(e){ic.error("Failed to produce browser extension event properties",e)}(l=sC({},v,m,b,x({},E,l))).$is_identified=this._isIdentified(),L(this.config.property_denylist)?sI(this.config.property_denylist,function(e){delete l[e]}):ic.error(aX+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var P=this.config.sanitize_properties;P&&(ic.error(aZ),l=P(l,e));var F=this._u();return l.$process_person_profile=F,F&&!r&&this.wu("_calculate_event_properties"),l}mu(e,t,i){if(void 0===t&&(t=!0),void 0===i&&(i=!1),!this.persistence||!this._u()||this.Nl&&!i)return e;var s,r=sC({},this.persistence.get_initial_props(),(null==(s=this.sessionPropsManager)?void 0:s.getSetOnceProps())||{},e||{}),n=this.config.sanitize_properties;return n&&(ic.error(aZ),r=n(r,"$set_once")),t&&(this.Nl=!0),q(r)?void 0:r}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var s;null==(s=this.persistence)||s.register_once(e,t,i)}register_for_session(e){var t,i;null==(t=this.persistence)||t.syncCookieProperties(),this.yu(),null==(i=this.sessionPersistence)||i.register(e),Object.keys(e).forEach(e=>this.ql.add(e)),this.bu()}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e),this.ql.delete(e),this.bu()}ku(e,t){this.register({[e]:t})}Yl(){this.ql.forEach(e=>{var t;null==(t=this.sessionPersistence)||t.unregister(e)}),this.ql.clear(),this.bu()}bu(){var e;if(this.jl)if("memory"===this.config.persistence||null!=(e=this.sessionPersistence)&&e.Eo||!s7.ii())s7.oi(this.jl);else{var t=[];this.ql.forEach(e=>t.push(e)),t.length>0?s7.ni(this.jl,t):s7.oi(this.jl)}}getFeatureFlag(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlagResult(e,t)}getAllFeatureFlags(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.getAllFeatureFlags())?e:[]}isFeatureEnabled(e,t){var i,s;return null!=(i=null==(s=this.featureFlags)?void 0:s.isFeatureEnabled(e,t))?i:null==t?void 0:t.defaultValue}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,i){var s;null==(s=this.featureFlags)||s.updateFlags(e,t,i)}updateEarlyAccessFeatureEnrollment(e,t,i){var s;null==(s=this.featureFlags)||s.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){var s;return void 0===t&&(t=!1),null==(s=this.featureFlags)?void 0:s.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.Cl.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:aQ}),()=>{})}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:aQ})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:aQ})}renderSurvey(e,t){var i;null==(i=this.surveys)||i.renderSurvey(e,t)}displaySurvey(e,t){var i;void 0===t&&(t=aj),null==(i=this.surveys)||i.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,i;return null!=(t=null==(i=this.surveys)?void 0:i.canRenderSurvey(e))?t:{visible:!1,disabledReason:aQ}}canRenderSurveyAsync(e,t){var i,s;return void 0===t&&(t=!1),null!=(i=null==(s=this.surveys)?void 0:s.canRenderSurveyAsync(e,t))?i:Promise.resolve({visible:!1,disabledReason:aQ})}Su(e){return!e||H(e)?(ic.critical("Unique user id has not been set in posthog.identify"),!1):e===sh?(ic.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(ic.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,i){if(!this.__loaded||!this.persistence)return ic.uninitializedWarning("posthog.identify");if(W(e)&&(e=e.toString(),ic.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Su(e)&&this.wu("posthog.identify")){this.Ll();var s=this.get_distinct_id(),r=this.persistence.syncCookieProperties()&&this.get_distinct_id()!==s,n=this.yu(!1),a=this.persistence.Zo(),o=!1;try{var l=this.get_distinct_id();this.register({$user_id:e}),this.get_property(iw)||this.register_once({$had_persisted_distinct_id:!0,$device_id:l},""),e!==l&&e!==this.get_property(ik)&&(this.unregister(ik),this.register({distinct_id:e}));var u=(this.persistence.get_property(ss)||sm)===sm,h=e!==l,c=!h&&u;if(h&&u){var d,v=this.config.reuseAnonymousId?{distinct_id:e}:{distinct_id:e,$anon_distinct_id:l};this.persistence.set_property(ss,sy),this.setPersonPropertiesForFlags({$set:t||{},$set_once:i||{}},!1),this.config.cookieWinsOnConflict&&this.persistence.Qo(),this.capture(sS,v,{$set:t||{},$set_once:i||{}}),this.Wl=aC(e,t,i),null==(d=this.featureFlags)||d.setAnonymousDistinctId(this.config.reuseAnonymousId?void 0:l)}else if(c){this.persistence.set_property(ss,sy);var p=t||{},g=i||{};this.setPersonPropertiesForFlags({$set:p,$set_once:g},!1),this.config.cookieWinsOnConflict&&this.persistence.Qo(),this.capture("$set",{$set:p,$set_once:g}),this.Wl=aC(e,t,i)}else(t||i)&&this.setPersonProperties(t,i);h||r||n?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(i7)):c&&(t||i)&&this.reloadFeatureFlags(),o=!0}finally{a&&this.persistence.Yo(o)}}}setPersonProperties(e,t){if((e||t)&&this.wu("posthog.setPersonProperties")){var i=aC(this.get_distinct_id(),e,t);this.Wl!==i?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Wl=i):ic.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var t,i=(L(e)?e:[e]).filter(e=>z(e)&&e.length>0);0!==i.length&&this.wu("posthog.unsetPersonProperties")&&(null==(t=this.featureFlags)||t.unsetPersonPropertiesForFlags(i,!0),this.capture("$set",{$unset:i}),this.Wl=null)}group(e,t,i){var s;if(e&&t){null==(s=this.persistence)||s.syncCookieProperties(),this.yu();var r=this.getGroups(),n=r[e]!==t;if(n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:x({},r,{[e]:t})}),(n||i)&&this._u()){var a={$group_type:e,$group_key:t};i&&(a.$group_set=i),this.capture(sP,a)}i&&this.setGroupPropertiesForFlags({[e]:i}),n&&!i&&this.reloadFeatureFlags()}else ic.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),null==(i=this.featureFlags)||i.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e){var t;void 0===e&&(e=!0),null==(t=this.featureFlags)||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),this.wu("posthog.setGroupPropertiesForFlags")&&(null==(i=this.featureFlags)||i.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){var t=K(e)?e:null==e?void 0:e.resetDeviceID,i=K(e)||null==e?void 0:e.bootstrap;this.xu(t,!1,i)}xu(e,t,i){if(void 0===t&&(t=!1),ic.info("reset"),!this.__loaded)return ic.uninitializedWarning("posthog.reset");var s,r,n,a,o,l,u,h,c,d,v,p,g,f,_,m,y,b=null==i?void 0:i.sessionID;this.config.bootstrap=i||(null==(s=this.Gl)?void 0:s.bootstrap)||{},null==(r=this.featureFlags)||null==r.updateConfig||r.updateConfig(this.config,this.pa());var w=this.get_property(iw),k=this.get_property(ix),E=this.get_property(iL),S=this.is_capturing();this.consent.reset(),t||!S||this.is_capturing()||console.warn("[PostHog.js]","reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.");var P=null==(n=this.persistence)||null==n.Zo?void 0:n.Zo(),F=!1;try{if(null==(a=this.persistence)||a.clear(),null==(o=this.sessionPersistence)||o.clear(),this.ql.clear(),this.bu(),B(E)||null==(g=this.persistence)||g.register({[iL]:E}),null==(l=this.surveys)||l.reset(),null==(u=this.featureFlags)||u.reset(),null==(h=this.conversations)||h.reset(),null==(c=this.logs)||c.reset(),null==(d=this.metrics)||d.reset(),null==(v=this.persistence)||v.set_property(ss,sm),null==(p=this.sessionManager)||p.resetSessionId(),this.Wl=null,this.config.cookieless_mode===s_)this.register_once({distinct_id:sh,$device_id:null},"");else{var I=this.config.get_device_id(sH());this.register_once({distinct_id:I,$device_id:e?I:w},""),e||B(k)||this.register({[ix]:k})}if(this.register({$last_posthog_reset:(new Date).toISOString()},1),i&&(void 0===i.distinctID||this.Pl()||(null==(m=this.persistence)||m.set_property(ss,i.isIdentifiedID?sy:sm),this.register({distinct_id:i.distinctID})),null==(f=this.featureFlags)||f.initialize(),!(B(b)||null!=(_=this.sessionManager)&&_.setBootstrapSessionId(b,!0)))){var C=x({},i);delete C.sessionID,this.config.bootstrap=C}delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,F=!0}finally{P&&(null==(y=this.persistence)||null==y.Yo||y.Yo(F))}this.reloadFeatureFlags()}shutdown(e){var t=this;return w(function*(){var e,i,s,r,n,a,o,l;if(t.__loaded){t.nu().dispose(),null==(e=t.sessionRecording)||e.dispose(),null==(i=t.logs)||i.flushLogs("sendBeacon"),null==(s=t.metrics)||s.flush("sendBeacon"),null==(r=t.Ql)||r.unload(),null==(n=t.Kl)||n.unload();try{null==(l=t.featureFlags)||l.destroy()}catch(e){ic.error("Error while destroying feature flags",e)}null==(a=t.persistence)||a.destroy(),null==(o=t.sessionPersistence)||o.destroy()}else ic.uninitializedWarning("posthog.shutdown")})()}setIdentity(e,t){var i;delete this.config.identity_claims,this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(i=this.conversations)||i.Cu()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,null==(e=this.conversations)||e.Tu()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=t.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t.sessionId);if(null!=e&&e.withTimestamp&&i){var r,n=null!=(r=e.timestampLookBack)?r:10;if(!i)return s;s+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return s}alias(e,t){return e===this.get_property(iy)?(ic.critical("Attempting to create alias for existing People user - aborting."),-2):this.wu("posthog.alias")?(B(t)&&(t=this.get_distinct_id()),e!==t?(this.ku(ik,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(ic.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=x({},this.config);if(j(e)){sC(this.config,a4(e));var i=this.Dl();null==(s=this.persistence)||s.update_config(this.config,t,i),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new n_(x({},this.config,{persistence:"sessionStorage"}),i,!1);var s,r,n,a,o,l,u,h,c,d,v,p,g,f=this.Vl(this.config.debug);K(f)&&(this.config.debug=f),K(this.config.debug)&&(this.config.debug?(y.DEBUG=!0,sY.ii()&&sY.ni("ph_debug",!0),ic.info("set_config",{config:e,oldConfig:t,newConfig:x({},this.config)})):(y.DEBUG=!1,sY.ii()&&sY.oi("ph_debug"))),null==(r=this.featureFlags)||null==r.updateConfig||r.updateConfig(this.config,this.pa()),null==(n=this.exceptionObserver)||n.onConfigChange(),null==(a=this.exceptions)||a.onConfigChange(),null==(o=this.sessionRecording)||o.startIfEnabledOrStop(),null==(l=this.tracingHeaders)||l.startIfEnabledOrStop(),null==(u=this.autocapture)||u.startIfEnabled(),null==(h=this.heatmaps)||h.startIfEnabled(),("capture_pageview"in e||"disable_capture_url_hashes"in e)&&(null==(g=this.historyAutocapture)||g.startIfEnabledOrStop()),null==(c=this.exceptionObserver)||c.startIfEnabledOrStop(),null==(d=this.deadClicksAutocapture)||d.startIfEnabledOrStop(),null==(v=this.surveys)||v.loadIfEnabled(),this.$l(),null==(p=this.externalIntegrations)||p.startIfEnabledOrStop(),!t.segment&&this.config.segment&&this.persistence&&rz(this,aJ,!1)}}_overrideSDKInfo(e,t){y.LIB_NAME=e,y.LIB_VERSION=t}startSessionRecording(e){var t,i,s,r,n,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),o.linked_flag&&(null==(s=this.sessionRecording)||s.overrideLinkedFlag()),o.url_trigger&&(null==(r=this.sessionRecording)||r.overrideTrigger("url")),o.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){try{if(!this.exceptions)return;var i=Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(x({},s,t))}catch(e){return}}addExceptionStep(e,t){var i;null==(i=this.exceptions)||i.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!=(e=null==(t=this.logs)?void 0:t.logger)?e:a7.Mu}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,i;return null!=(t=null==(i=this.toolbar)?void 0:i.loadToolbar(e))&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:a3;return t!==a3&&(t=a3+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(ss))===sy||(null==(t=this.sessionPersistence)?void 0:t.get_property(ss))===sy}_u(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===sb&&!this._isIdentified()&&q(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[ik])&&(null==(t=this.persistence)||null==(t=t.props)||!t[su]))}vu(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&!!this.config.capture_pageview}createPersonProfile(){this._u()||this.wu("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.wu("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}wu(e){return"never"===this.config.person_profiles?(ic.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Al(),this.ku(su,!0),!0)}Dl(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==sf)}$l(){var e,t,i,s,r,n=this.Dl();return this.is_capturing()||null==(i=this.logs)||i.Iu(),(null==(e=this.persistence)?void 0:e.Eo)!==n&&(null==(s=this.persistence)||s.set_disabled(n)),(null==(t=this.sessionPersistence)?void 0:t.Eo)!==n&&(null==(r=this.sessionPersistence)||r.set_disabled(n)),n&&(this.ql.clear(),this.bu()),n}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==s_){if(this.Pl()){null==(r=this.sessionRecording)||r.dispose({discardBufferedEvents:!0}),this.xu(!0,!0),null==(n=this.sessionManager)||n.destroy(),null==(a=this.pageViewManager)||a.destroy(),this.sessionManager=new aw(this),this.pageViewManager=new rW(this),this.persistence&&(this.sessionPropsManager=new am(this,this.sessionManager,this.persistence));var i,s,r,n,a,o,l,u,h,c=null!=(o=null==(l=this.config.__extensionClasses)?void 0:l.sessionRecording)?o:null==(u=a7.__defaultExtensionClasses)?void 0:u.sessionRecording;c&&(this.sessionRecording=this.Rl(this.sessionRecording,new c(this)),this.xl&&(null==(h=this.sessionRecording)||null==h.onRemoteConfig||h.onRemoteConfig(this.xl)))}this.consent.optInOut(!0),this.$l(),this.uu(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==sf&&(null==(i=this.surveys)||i.loadIfEnabled()),(B(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(s=null==e?void 0:e.captureEventName)?s:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.hu()}else ic.warn(aY)}opt_out_capturing(){if(this.config.cookieless_mode!==s_){var e,t,i=this.config.cookieless_mode===sf?this.sessionRecording:void 0;null==i||i.dispose({discardBufferedEvents:!0}),this.config.cookieless_mode===sf&&this.consent.isOptedIn()&&this.xu(!0,!0),this.consent.optInOut(!1),this.$l(),this.config.cookieless_mode===sf&&(this.register({distinct_id:sh,$device_id:null}),this.El(i),this.sessionRecording=void 0,null==(e=this.sessionManager)||e.destroy(),null==(t=this.pageViewManager)||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.hu(),this.uu())}else ic.warn(aY)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===s_||(this.config.cookieless_mode===sf?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.$l()}_is_bot(){return l?ax(l,this.config.custom_blocked_useragents):void 0}hu(){u&&("visible"===u.visibilityState?this.Hl||(this.Hl=!0,this.capture(sk,{title:u.title},{send_instantly:!0}),this.zl&&(u.removeEventListener(sw,this.zl),this.zl=null)):this.zl||(this.zl=this.hu.bind(this),sM(u,sw,this.zl)))}debug(e){!1===e?(null==a||a.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==a||a.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}pa(){var e,t,i,s,r=this.Gl||{};return"advanced_disable_flags"in r?!!r.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(ic.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in r&&!U(r[e]),s=t in r&&!U(r[t]),i?r[e]:!!s&&(ic&&ic.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}ns(e){if(U(this.config.before_send))return e;var t,i=Object.keys(null!=(t=e.properties)?t:{}).filter(Y),s=L(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var n of s)try{if(r=n(r),U(r)){var a="Event '"+e.event+"' was rejected in beforeSend function";return J(e.event)?ic.warn(a+". This can cause unexpected behavior."):ic.info(a),null}r.properties&&!q(r.properties)||ic.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}catch(t){return ic.error("Error in beforeSend function for event '"+e.event+"':",t),null}for(var o of i)if(r.properties&&U(r.properties[o]))return ic.warn("Event '"+e.event+"' had its '"+o+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return r}getPageViewId(){var e;return null==(e=this.pageViewManager.io)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}Vl(e){var t=K(e)&&!e,i=sY.ii()&&"true"===sY.ai("ph_debug");return!t&&(!!i||e)}}a7.__defaultExtensionClasses={},a7.Mu={trace:r=()=>{},debug:r,info:r,warn:r,error:r,fatal:r},function(e,t){for(var i=0;t.length>i;i++)e.prototype[t[i]]=sA(e.prototype[t[i]])}(a7,["identify"]);class oe{constructor(e){this.disabled=!1===e;var t=j(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<this.thresholdPx&&this.timeoutMs>i-s.timestamp){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var ot="$copy_autocapture",oi=id("[AutoCapture]");function os(e,t){return t.length>e?t.slice(0,e)+"...":t}class or{constructor(e){this.name="autocapture",this.Rs=!1,this.Ps=null,this.As=!1,this.Fs=!1,this.mn={enabled:!1,rageclick:!1,maskAllElementAttributes:!1,maskAllText:!1,disableCaptureUrlHashes:!1,remoteRequestsDisabled:!1},this.Os=!1,this.Ls=e,this.Ls.refresh(this.mn),this.rageclicks=new oe(this.mn.rageclick),this.Ds=null}setup(e){this.$s(),this.Ns=e;var t=e.onRemoteConfig(this.onRemoteConfig.bind(this));this.Os?t.dispose():(this.qs=t,this.startIfEnabled())}dispose(){var e;this.Os||(this.Os=!0,this.Ns=void 0,null==(e=this.qs)||e.dispose(),this.qs=void 0,this.js())}Bs(){return this.Ls.refresh(this.mn),this.mn}$s(){var e,t;return this.Bs(),this.mn.url_allowlist=null==(e=this.mn.url_allowlist)?void 0:e.map(e=>new RegExp(e)),this.mn.url_ignorelist=null==(t=this.mn.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),this.mn}Hs(){if(this.isBrowserSupported()){if(a&&u){var e=this.zs=e=>{e=e||(null==a?void 0:a.event);try{this.Us(e)}catch(e){oi.error("Failed to capture event",e)}};if(sM(u,"submit",e,{capture:!0}),sM(u,"change",e,{capture:!0}),sM(u,"click",e,{capture:!0}),this.Bs().capture_copied_text){var t=this.Ws=e=>{e=e||(null==a?void 0:a.event);try{this.Us(e,ot)}catch(e){oi.error("Failed to capture clipboard event",e)}};sM(u,"copy",t,{capture:!0}),sM(u,"cut",t,{capture:!0}),sM(u,"paste",t,{capture:!0})}}}else oi.info("Disabling Automatic Event Collection because this browser is not supported")}js(){this.zs&&(null==u||u.removeEventListener("submit",this.zs,!0),null==u||u.removeEventListener("change",this.zs,!0),null==u||u.removeEventListener("click",this.zs,!0),this.zs=void 0),this.Ws&&(null==u||u.removeEventListener("copy",this.Ws,!0),null==u||u.removeEventListener("cut",this.Ws,!0),null==u||u.removeEventListener("paste",this.Ws,!0),this.Ws=void 0),this.Rs=!1}startIfEnabled(){!this.Os&&this.Ns&&this.isEnabled&&!this.Rs&&(this.Hs(),this.Rs=!0)}onRemoteConfig(e){if(!this.Os)if(this.As=!0,e.ok){var t=e.config;t.elementsChainAsString&&(this.Fs=t.elementsChainAsString);var i,s=t.autocapture_opt_out;K(s)&&(null==(i=this.Ns)||i.kv.set(iF,s),this.Ps=s),this.startIfEnabled()}else this.startIfEnabled()}setElementSelectors(e){this.Ds=e}getElementSelectors(e){var t,i=[];return null==(t=this.Ds)||t.forEach(t=>{var s=null==u?void 0:u.querySelectorAll(t);null==s||s.forEach(s=>{e===s&&i.push(t)})}),i}get isEnabled(){if(this.Os)return!1;var e,t,i=null==(e=this.Ns)?void 0:e.kv.get(iF),s=this.Ps,r=this.Bs(),n=r.remoteRequestsDisabled&&!this.As;if(V(s)&&!K(i)&&!n)return!1;var a=null!=(t=this.Ps)?t:!!i;return!!r.enabled&&!a}Us(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i=rv(e);ra(i)&&(i=i.parentNode||null);var s,r=this.$s();"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&r.rageclick&&null!=(s=this.rageclicks)&&s.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&rk(i,r.rageclick)&&this.Us(e,"$rageclick");var n=t===ot,o=n?x({},r,{dom_event_allowlist:void 0}):r;if(i&&function(e,t,i,s,r,n){if(!a||rE(e)||null!=i&&i.url_allowlist&&!ru(i.url_allowlist,n)||null!=i&&i.url_ignorelist&&ru(i.url_ignorelist,n))return!1;if(null!=i&&i.dom_event_allowlist){var o,l=i.dom_event_allowlist;if(l&&!l.some(e=>t.type===e))return!1}var u=rS(e,s),h=u.parentIsUsefulElement,c=u.targetElementList;if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(B(i))return!0;var s,r=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(c,i)||!rg(c,null==i?void 0:i.css_selector_allowlist)||rg(c,null!=(o=null==i?void 0:i.css_selector_ignorelist)?o:r_))return!1;try{var d=a.getComputedStyle(e);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===t.type)return!0}catch(e){}var v=e.tagName.toLowerCase();switch(v){case"html":return!1;case"form":return(r||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(r||["change","click"]).indexOf(t.type)>=0;default:return h?(r||["click"]).indexOf(t.type)>=0:(r||["click"]).indexOf(t.type)>=0&&(rp.indexOf(v)>-1||"true"===e.getAttribute("contenteditable"))}}(i,e,o,n,n?["copy","cut","paste"]:void 0,{config:{get_current_url:r.getCurrentUrl}})){var l,u=function(e,t){var i,s,r=t.e,n=t.maskAllElementAttributes,o=t.maskAllText,l=t.elementAttributeIgnoreList,u=t.elementsChainAsString,h=t.disableCaptureUrlHashes;if(!rr(e))return{props:{}};for(var c=[e],d=new Set([e]),v=e;v.parentNode&&!rn(v,"body")&&1e3>c.length;)if(ro(v.parentNode)){var p=v.parentNode.host;if(d.has(p))break;d.add(p),c.push(p),v=p}else{if(!rr(v.parentNode)||d.has(v.parentNode))break;d.add(v.parentNode),c.push(v.parentNode),v=v.parentNode}var g,f=[],_={},m=!1,y=!1;if(sI(c,e=>{var t=rP(e);if(rn(e,"a")){var i=e.getAttribute("href");m=!!(t&&i&&rT(i))&&(h?tg(i):i)}P(rh(e),"ph-no-capture")&&(y=!0),f.push(function(e,t,i,s,r){void 0===r&&(r=!1);var n=e.tagName.toLowerCase(),a={tag_name:n};rp.indexOf(n)>-1&&!i&&(a.$el_text="a"===n.toLowerCase()||"button"===n.toLowerCase()?os(1024,rM(e)):os(1024,rd(e)));var o=rh(e);o.length>0&&(a.classes=o.filter(function(e){return""!==e})),sI(e.attributes,function(i){var n;if((!rF(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&rT(i.value)&&(!z(n=i.name)||"_ngcontent"!==n.substring(0,10)&&"_nghost"!==n.substring(0,7))){var o=i.value;"class"===i.name&&(o=rl(o).join(" ")),a["attr__"+i.name]=os(1024,"href"===i.name&&r?tg(o):o)}});for(var l=1,u=1,h=e;h=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!rr(t));return t}(h);)l++,h.tagName===e.tagName&&u++;return a.nth_child=l,a.nth_of_type=u,a}(e,n,o,l,h));var s=function(e){if(!rP(e))return{};var t={};return sI(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),s=e.value;i&&s&&rT(s)&&(t[i]=s)}}),t}(e);sI(s,(e,t)=>{({}).hasOwnProperty.call(_,t)||(_[t]=e)})}),y)return{props:{},explicitNoCapture:y};if(o||(f[0].$el_text=rn(e,"a")||rn(e,"button")?rM(e):rd(e)),m){f[0].attr__href=m;var b,w,k=null==(b=rZ(m))?void 0:b.host,E=null==a||null==(w=a.location)?void 0:w.host;k&&E&&k!==E&&(g=m)}return{props:sC({$event_type:r.type,$ce_version:1},u?{}:{$elements:f},{$elements_chain:L(f)?f.map(e=>{var t,i,s={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(i=e.attr__href)?void 0:i.slice(0,2048),attr_class:function(e){var t=e.attr__class;if(t)return L(t)?t:rl(t)}(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return sO(e).filter(e=>0===e[0].indexOf("attr__")).forEach(e=>s.attributes[e[0]]=e[1]),s}).map(e=>{var t,i,s="";if(e.tag_name&&(s+=e.tag_name),e.attr_class)for(var r of(e.attr_class.sort(),e.attr_class))s+="."+r.replace(/"/g,"");var n=x({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return sO(n).sort((e,t)=>{var i,s;return(s=t[0])>(i=e[0])?-1:+(i>s)}).forEach(e=>{var t=e[1];return a[rD(e[0].toString())]=rD(t.toString())}),(s+=":")+sO(a).map(e=>e[0]+'="'+e[1]+'"').join("")}).join(";"):""},null!=(i=f[0])&&i.$el_text?{$el_text:null==(s=f[0])?void 0:s.$el_text}:{},g&&"click"===r.type?{$external_click_url:g}:{},_)}}(i,{e:e,maskAllElementAttributes:r.maskAllElementAttributes,maskAllText:r.maskAllText,elementAttributeIgnoreList:r.element_attribute_ignorelist,elementsChainAsString:this.Fs,disableCaptureUrlHashes:r.disableCaptureUrlHashes}),h=u.props;if(u.explicitNoCapture)return!1;var c=this.getElementSelectors(i);if(c&&c.length>0&&(h.$element_selectors=c),t===ot){var d=e.type||"clipboard";if("paste"!==d){var v,p,g=null==a||null==(v=a.getSelection())?void 0:v.toString(),f=rc(g);if(!f)return!1;h.$selected_content=f,h.$clipboard_text_length=null!=(p=null==g?void 0:g.length)?p:0}h.$copy_type=d}return null==(l=this.Ns)||l.capture(t,h).catch(e=>oi.error("Failed to capture event",e)),!0}}}isBrowserSupported(){return N(null==u?void 0:u.querySelectorAll)}}class on{constructor(e){this._instance=e}refresh(e){var t=this._instance.config,i=j(t.autocapture)?t.autocapture:void 0;e.enabled=!!t.autocapture,e.rageclick=t.rageclick,e.maskAllElementAttributes=t.mask_all_element_attributes,e.maskAllText=t.mask_all_text,e.disableCaptureUrlHashes=t.disable_capture_url_hashes,e.getCurrentUrl=t.get_current_url,e.remoteRequestsDisabled=this._instance.pa(),e.url_allowlist=null==i?void 0:i.url_allowlist,e.url_ignorelist=null==i?void 0:i.url_ignorelist,e.dom_event_allowlist=null==i?void 0:i.dom_event_allowlist,e.element_allowlist=null==i?void 0:i.element_allowlist,e.css_selector_allowlist=null==i?void 0:i.css_selector_allowlist,e.css_selector_ignorelist=null==i?void 0:i.css_selector_ignorelist,e.element_attribute_ignorelist=null==i?void 0:i.element_attribute_ignorelist,e.capture_copied_text=null==i?void 0:i.capture_copied_text}}var oa=id("[ExceptionAutocapture]"),oo=()=>{},ol=e=>{var t;if(N(e))return null!=(t=e.__posthog_layer__)?t:e.__rrweb_layer__};function ou(e,t,i){try{if(!(t in e))return oo;var s={next:e[t]},r=i(function(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return s.next.apply(this,t)});return N(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:s}})),e[t]=r,()=>{if(e[t]!==r)for(var i=e[t],n=ol(i);n;){if(n.next===r)return void(n.next=s.next);n=ol(i=n.next)}else e[t]=s.next}}catch(e){return oo}}var oh=id("[TracingHeaders]"),oc=id("[Web Vitals]"),od=["CLS","FCP","INP","LCP"],ov=["INP","LCP"],op=["interactionTarget","interactionType","inputDelay","processingDuration","presentationDelay","loadState","target","url","timeToFirstByte","resourceLoadDelay","resourceLoadDuration","elementRenderDelay","largestShiftTarget","largestShiftTime","largestShiftValue","firstByteToFCP"],og="disabled",of="lazy_loading",o_="awaiting_config",om="missing_config";id("[SessionRecording]"),id("[SessionRecording]");var oy="[SessionRecording]",ob=id(oy),ow=id("[Heatmaps]");function ox(e){return j(e)&&"clientX"in e&&"clientY"in e&&W(e.clientX)&&W(e.clientY)}var ok=id("[Product Tours]"),oE=e=>{var t;return!e.config.disable_product_tours&&!(null==(t=e.persistence)||!t.get_property(iT))},oS=["$set_once","$set"],oP=id("[SiteApps]"),oF="Error while initializing PostHog app with config id ",oI=(e,t)=>null!=e&&e.then?e.then(t):t(e),oC="SDK is not enabled or survey functionality is not yet loaded",oO="Disabled. Not loading surveys.";class o${constructor(e,t){this.name="surveys",this._surveyEventReceiver=null,this._surveyManager=null,this.Eu=!1,this.Ru=[],this.Pu=null,this.Au=null,this.Os=!1,this.Fu=new Set,this.onRemoteConfig=e=>{if(!this.Os&&!this.mn.disableSurveys){if(!e.ok)return aM.warn("Remote config unavailable. Not loading surveys.");var t=e.config.surveys;if(U(t))return aM.warn("Flags not loaded yet. Not loading surveys.");this.Ou=K(t)?t:t.length>0,aM.info("flags response received, isSurveysEnabled: "+this.Ou),this.loadIfEnabled()}},this.Ls=e,this.Lu=t}setup(e){if(!this.Os)return this.Du=e,oI(e.kv.initialize(),()=>{if(this.Du===e&&!this.Os){this.Du=void 0,this.Ns=e;var t=e.onRemoteConfig(this.onRemoteConfig);this.Os?t.dispose():(this.qs=t,this.loadIfEnabled())}})}dispose(){var e,t,i;this.Os||(this.Os=!0,this.Du=void 0,this.Ns=void 0,null==(e=this.qs)||e.dispose(),this.qs=void 0,null==(t=this._surveyEventReceiver)||t.dispose(),this._surveyEventReceiver=null,null==(i=this._surveyManager)||null==i.dispose||i.dispose(),this._surveyManager=null,this.Ru=[],this.Pu=null,this.Fu.forEach(e=>clearTimeout(e)),this.Fu.clear())}get mn(){return this.Ls.get()}initialize(){this.loadIfEnabled()}reset(){try{var e;null==(e=this._surveyEventReceiver)||e.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var t=[],i=0;i<localStorage.length;i++){var s=localStorage.key(i);(null!=s&&s.startsWith(aD)||null!=s&&s.startsWith("inProgressSurvey_"))&&t.push(s)}t.forEach(e=>localStorage.removeItem(e))}catch(e){}}loadIfEnabled(){if(!this.Os&&this.Ns){var e=this.mn;if(!this._surveyManager)if(this.Eu)aM.info("Already initializing surveys, skipping...");else if(e.disableSurveys)aM.info(oO);else if(e.cookielessMode&&this.Ls.isOptedOut())aM.info("Not loading surveys in cookieless mode without consent.");else{var t=this.Ls.getExtensions();if(t){if(!B(this.Ou)||e.advancedEnableSurveys){var i=this.Ou||e.advancedEnableSurveys;this.Eu=!0;try{var s=t.generateSurveys;if(s)return this.$u(s,i),void(this.Eu=!1);var r=t.loadExternalDependency;if(!r)return this.Nu(sg),void(this.Eu=!1);r(e=>{try{if(this.Os)return;var t=this.Ls.getExtensions();e||null==t||!t.generateSurveys?this.Nu("Could not load surveys script",e):this.$u(t.generateSurveys,i)}finally{this.Eu=!1}})}catch(e){throw this.Eu=!1,this.Nu("Error initializing surveys",e),e}}}else aM.error("PostHog Extensions not found.")}}}$u(e,t){this.Os||(this._surveyManager=e(t),this._surveyEventReceiver=this.Ls.createEventReceiver(),aM.info("Surveys loaded successfully"),this.qu({isLoaded:!0}))}Nu(e,t){aM.error(e,t),this.qu({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ru.push(e),this._surveyManager&&this.qu({isLoaded:!0}),()=>{this.Ru=this.Ru.filter(t=>t!==e)}}getSurveys(e,t){void 0===t&&(t=!1);var i,s=null!=(i=this.Ns)?i:this.Lu;if(s&&!this.Os){if(this.mn.disableSurveys)return aM.info(oO),e([]);var r=s.kv.get(i3);if(r&&!t)return e(r,{isLoaded:!0}),void(this.ju()&&this.getSurveys(()=>{},!0));if(this.Pu)this.Pu.then(t=>{this.Os||e(t.surveys,t.context)}).catch(e=>aM.error("Error in survey callback",e));else{var n=this.Bu("/api/surveys/",{method:"GET",query:{token:s.projectToken},sentAt:"query",timeoutMs:this.mn.requestTimeoutMs}).then(e=>{try{return this.Hu(s,e)}catch(e){return aM.error("Error processing surveys response",e),this.Hu(s,{statusCode:0,error:e})}},e=>this.Hu(s,{statusCode:0,error:e}));this.Pu=n;var a=()=>{this.Pu===n&&(this.Pu=null)};n.then(t=>{a(),this.Os||e(t.surveys,t.context)},a).catch(e=>aM.error("Error in survey callback",e))}}}Bu(e,t){var i=this.Ns;return i?i.sendRequest(e,t):new Promise(e=>e({statusCode:0,error:Error(oC)}))}Hu(e,t){if(this.Os)return{surveys:[],context:{isLoaded:!1,error:oC}};var i=t.statusCode;if(200!==i||!t.json){var s="Surveys API could not be loaded, status: "+i;return 0!==i?aM.error(s):t.error||aM.warn(s),this.Au=Date.now(),{surveys:[],context:{isLoaded:!1,error:s}}}this.Au=null;var r,n=t.json.surveys||[],a=n.filter(e=>{var t;return!(!e.start_date||e.end_date)&&(aE(e)||!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length))});return a.length>0&&(null==(r=this._surveyEventReceiver)||r.register(a)),e.kv.set({[i3]:n,[i5]:Date.now()}),{surveys:n,context:{isLoaded:!0}}}ju(){return this.zu()&&!this.Pu&&!this.Uu()}zu(){var e,t,i=null==(e=null!=(t=this.Ns)?t:this.Lu)?void 0:e.kv.get(i5);return W(i)&&Date.now()-i>3e5}Uu(){return W(this.Au)&&3e5>Date.now()-this.Au}markSurveyAsSeen(e,t){var i;aL({id:e,current_iteration:null!=(i=null==t?void 0:t.iteration)?i:null});try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}}qu(e){for(var t of this.Ru)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){aM.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!U(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);aM.warn("init was not called")}Wu(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}Vu(e){if(U(this._surveyManager))return{eligible:!1,reason:oC};var t="string"==typeof e?this.Wu(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}Gu(e){if(U(this._surveyManager))return{eligible:!1,reason:oC};var t="string"==typeof e?this.Wu(e):e;return t?this._surveyManager.checkSurveyRenderability(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(U(this._surveyManager))return aM.warn("init was not called"),{visible:!1,disabledReason:oC};var t=this.Gu(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return U(this._surveyManager)?(aM.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:oC})):new Promise(i=>{this.getSurveys(t=>{var s,r=null!=(s=t.find(t=>t.id===e))?s:null;if(r){var n=this.Gu(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var s;if(U(this._surveyManager))aM.warn("init was not called");else{var r="string"==typeof e?this.Wu(e):e;if(null!=r&&r.id)if(aN.includes(r.type)){var n=null==u?void 0:u.querySelector(t);if(n)if(null!=(s=r.appearance)&&s.surveyPopupDelaySeconds){aM.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds");var a=setTimeout(()=>{var e,t;this.Fu.delete(a),this.Os||(aM.info("Rendering survey "+r.id+" with delay of "+(null==(e=r.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(r,n,i),aM.info("Survey "+r.id+" rendered"))},1e3*r.appearance.surveyPopupDelaySeconds);this.Fu.add(a)}else this._surveyManager.renderSurvey(r,n,i);else aM.warn("Survey element not found")}else aM.warn("Surveys of type "+r.type+" cannot be rendered in the app");else aM.warn("Survey not found")}}displaySurvey(e,t){var i;if(U(this._surveyManager))aM.warn("init was not called");else{var s=this.Wu(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=x({},s,{appearance:x({},s.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==nS&&t.initialResponses&&aM.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.Vu(s);if(!n.eligible)return void aM.warn("Survey is not eligible to be displayed: ",n.reason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(r,t):this.renderSurvey(r,t.selector,t.properties)}else aM.warn("Survey not found")}}cancelPendingSurvey(e){U(this._surveyManager)?aM.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||null==e.handlePageUnload||e.handlePageUnload()}}function oA(e,t,i){if(U(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class oR{constructor(e){this.Zu=new Set,this.Qu=new Set,this.Ju=new ay,this.Ku=(e,t)=>this.Yu(e,t)&&this.Xu(e,t)&&this.th(e,t)&&this.eh(e,t),this.Yu=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e}init(){var e,t;B(null==(e=this._instance)?void 0:e._addCaptureHook)||(this.ih=null==(t=this._instance)?void 0:t._addCaptureHook((e,t)=>{this.on(e,t)}))}dispose(){var e;null==(e=this.ih)||e.call(this),this.ih=void 0,this.Ju=new ay}register(e){var t,i;if(!B(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e=>{var t;this.Zu.add(e),null==(t=e.steps)||t.forEach(e=>{this.Qu.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var s=new Set;this.Zu.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&s.add(e.selector)})}),this._instance.autocapture.setElementSelectors(s)}}replace(e){this.Zu.clear(),this.Qu.clear(),this.register(e)}on(e,t){null!=t&&0!=e.length&&(this.Qu.has(e)||this.Qu.has(t.event))&&this.Zu.forEach(e=>{this.rh(t,e)&&this.Ju.emit("actionCaptured",e.name)})}nh(e){this.onAction("actionCaptured",t=>e(t))}rh(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Ku(e,i))return!0;return!1}onAction(e,t){return this.Ju.on(e,t)}Xu(e,t){if(null!=t&&t.url){var i,s=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!s||"string"!=typeof s||!oA(s,t.url,t.url_matching||"contains"))return!1}return!0}th(e,t){return!!this.sh(e,t)&&!!this.oh(e,t)&&!!this.ah(e,t)}sh(e,t){if(null==t||!t.href)return!0;var i=this.lh(e);if(i.length>0)return i.some(e=>oA(e.href,t.href,t.href_matching||"exact"));var s,r,n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!n&&oA((r=n.match(/(?::|")href="(.*?)"/))?r[1]:"",t.href,t.href_matching||"exact")}oh(e,t){if(null==t||!t.text)return!0;var i=this.lh(e);if(i.length>0)return i.some(e=>oA(e.text,t.text,t.text_matching||"exact")||oA(e.$el_text,t.text,t.text_matching||"exact"));var s,r,n,a,o=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!o&&(r=function(e){for(var t,i=[],s=/(?::|")text="(.*?)"/g;!U(t=s.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(o),n=t.text,a=t.text_matching||"exact",r.some(e=>oA(e,n,a)))}ah(e,t){if(null==t||!t.selector)return!0;var i,s,r=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=r&&r.includes(t.selector))return!0;var n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}lh(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}eh(e,t){return null==t||!t.properties||0===t.properties.length||aI(t.properties.reduce((e,t)=>{var i=L(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class oT{constructor(e){var t;this.uh=[],this._instance=e,this.hh=new Map,this.dh=new Map,this.fh=new Map,this.ph=null==(t=this._instance)||null==t.onSessionId?void 0:t.onSessionId(e=>this.gh(e))}mh(e){return!1}yh(){return null}bh(e){}_h(){}wh(e,t){return!!e&&aI(e.propertyFilters,null==t?void 0:t.properties)}kh(e,t){var i=new Map;return e.forEach(e=>{var s;null==(s=e.conditions)||null==(s=s[t])||null==(s=s.values)||s.forEach(t=>{if(null!=t&&t.name){var s=i.get(t.name)||[];s.push(e.id),i.set(t.name,s)}})}),i}Sh(e,t,i){var s=(i===nb?this.hh:this.dh).get(e),r=[];return this.xh(e=>{r=e.filter(e=>null==s?void 0:s.includes(e.id))}),r.filter(s=>{var r,n=null==(r=s.conditions)||null==(r=r[i])||null==(r=r.values)?void 0:r.find(t=>t.name===e);return this.wh(n,t)})}register(e){this.Ch(e,!1)}replace(e){this.Ch(e,!0)}Ch(e,t){var i;B(null==(i=this._instance)?void 0:i._addCaptureHook)||(this.Th(e,t),this.Mh(e,t))}Mh(e,t){var i,s=e.filter(e=>{var t;return null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)?void 0:t.length});if(t&&this.fh.clear(),0!==s.length){this.Ih||(this.Ih=new oR(this._instance),this.Ih.init(),this.Ih.nh(e=>this.onAction(e)));var r=[];s.forEach(e=>{var t;null==(t=e.conditions)||null==(t=t.actions)||t.values.forEach(t=>{if(r.push(t),t.name){var i,s=null!=(i=this.fh.get(t.name))?i:[];s.includes(e.id)||s.push(e.id),this.fh.set(t.name,s)}})}),t?this.Ih.replace(r):this.Ih.register(r)}else t&&(null==(i=this.Ih)||i.replace([]))}Eh(e,t){t.forEach((t,i)=>{var s,r=null!=(s=e.get(i))?s:[];t.forEach(e=>{r.includes(e)||r.push(e)}),e.set(i,r)})}Th(e,t){var i,s=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),r=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0}),n=this.kh(e,nb),a=this.kh(e,nw);t?(this.hh=n,this.dh=a):(this.Eh(this.hh,n),this.Eh(this.dh,a)),(0!==s.length||0!==r.length)&&(null!=this.ih||(this.ih=null==(i=this._instance)?void 0:i._addCaptureHook((e,t)=>{this.onEvent(e,t)})))}onEvent(e,t){var i,s,r=this.Rh(),n=(null==t||null==(i=t.properties)?void 0:i.$survey_id)||(null==t||null==(s=t.properties)?void 0:s.$product_tour_id);if(n&&this.getActivatedIds().includes(n)){var a=this.Ph(e,n);if("consume"===a)return r.info("event consumed activated item, removing it",{event:e,itemId:n}),void this.Ah([n]);if("persist"===a)return r.info("shown item promoted to persisted activation",{event:e,itemId:n}),this.Fh(n),void this.Oh([n])}if(this.dh.has(e)){var o=this.Sh(e,t,nw);o.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:o.map(e=>e.id)}),this.Ah(o.map(e=>e.id)),o.forEach(e=>this.Lh(e.id)))}if(this.hh.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.hh.get(e)});var l=this.Sh(e,t,nb);this.Dh(l.map(e=>e.id))}}onAction(e){this.fh.has(e)&&this.Dh(this.fh.get(e)||[])}Dh(e){var t;if(0!==e.length){var i=!(null==(t=this._instance)||null==t.get_session_id||!t.get_session_id()),s=[];for(var r of e)i&&this.mh(r)?this.Fh(r)&&this.$h(r):s.push(r);s.length>0&&(this.uh=[...new Set([...this.uh,...s])]),this.Rh().info("updating activated items",{activatedItems:this.getActivatedIds()})}}Fh(e){this.uh=this.uh.filter(t=>t!==e);var t=this.Nh();return!t.includes(e)&&(this.qh([...t,e]),this.jh(),!0)}Ah(e){var t=new Set(e);this.uh=this.uh.filter(e=>!t.has(e));var i=this.Bh(),s=i.filter(e=>!t.has(e));s.length!==i.length&&(this.qh(s),0===s.length&&this.Hh()),this.Oh(e)}zh(){var e,t=this.yh();if(!t)return{};var i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t];return i&&"object"==typeof i?i:{}}$h(e){if(this.yh()){var t=this.zh();this.bh(x({},t,{[e]:Date.now()}))}}Oh(e){if(this.yh()){var t=this.zh(),i={},s=!1;for(var r of Object.entries(t)){var n=r[0],a=r[1];e.includes(n)?s=!0:i[n]=a}s&&(q(i)?this._h():this.bh(i))}}Uh(){this.yh()&&this._h()}getActivationTimestamp(e){if(this.Nh().includes(e)){var t=this.zh()[e];return W(t)?t:void 0}}Bh(){var e,t=this.Wh();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}Nh(){var e,t,i=this.Bh();if(0===i.length)return[];var s=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[this.Vh()],r=null==(t=this._instance)||null==t.get_session_id?void 0:t.get_session_id();return r&&s===r?i:[]}jh(){var e,t=null==(e=this._instance)||null==e.get_session_id?void 0:e.get_session_id();t&&this.Gh(t)}Hh(){this.Zh()}gh(e){var t,i=null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[this.Vh()];if(i&&i!==e){var s=this.Bh(),r=this.zh();s.length>0&&(this.qh([]),s.filter(e=>W(r[e])).forEach(e=>this.Lh(e))),this.Hh(),this.Uh()}}getActivatedIds(){return[...new Set([...this.Nh(),...this.uh])].filter(e=>!this.Qh(e))}dispose(){var e,t,i;null==(e=this.ph)||e.call(this),this.ph=void 0,null==(t=this.ih)||t.call(this),this.ih=void 0,null==(i=this.Ih)||i.dispose(),this.Ih=void 0}reset(){this.uh=[],this.Bh().length>0&&this.qh([]),this.Hh(),this.Uh()}getEventToItemsMap(){return this.hh}Jh(){return this.Ih}}class oM extends oT{constructor(e){super(e)}Wh(){return i6}Vh(){return i8}yh(){return i4}bh(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[i4]:e})}_h(){var e;null==(e=this._instance)||null==(e=e.persistence)||e.unregister(i4)}mh(e){this.xh(t=>{i=t.find(t=>t.id===e)});var t,i,s=null==(t=i)||null==(t=t.appearance)?void 0:t.surveyPopupDelaySeconds;return W(s)&&s>0}Kh(){return nx}xh(e){var t;null==(t=this._instance)||t.getSurveys(e)}Lh(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}Rh(){return aM}qh(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[i6]:e})}Gh(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[i8]:e})}Zh(){var e;null==(e=this._instance)||null==(e=e.persistence)||e.unregister(i8)}Qh(){return!1}Ph(e,t){var i,s,r;return this.xh(e=>{r=e.find(e=>e.id===t)}),!r||aE(i=r)&&!(null==(s=i.conditions)||null==(s=s.events)||!s.repeatedActivation)||"always"===i.schedule?e===nx?"consume":"ignore":e===nx?"persist":e===nk||e===nE?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}class oD{constructor(e){this._instance=e}initialize(){}get(e){if("string"==typeof e)return this._instance.get_property(e);var t={};for(var i of e){var s=this._instance.get_property(i);B(s)||(t[i]=s)}return t}set(e,t){this._instance.register("string"==typeof e?{[e]:t}:e)}remove(e){"string"!=typeof e?e.forEach(e=>this._instance.unregister(e)):this._instance.unregister(e)}}class oL{constructor(e){this._instance=e}get(){var e=this._instance.config;return{disableSurveys:e.disable_surveys,cookielessMode:!!e.cookieless_mode,advancedEnableSurveys:e.advanced_enable_surveys,requestTimeoutMs:e.surveys_request_timeout_ms}}isOptedOut(){return this._instance.consent.isOptedOut()}getExtensions(){var e=null==m?void 0:m.__PosthogExtensions__;if(e){var t=e.generateSurveys,i=e.loadExternalDependency;return{generateSurveys:t?e=>t(this._instance,e):void 0,loadExternalDependency:i?e=>i(this._instance,"surveys",e):void 0}}}createEventReceiver(){return new oM(this._instance)}}var oN=null!=a&&a.location?r1(a.location.hash,"__posthog")||r1(location.hash,"state"):null,oj="_postHogToolbarParams",oq=id("[Toolbar]"),oB=id("[FeatureFlags]");class oz{constructor(e,t){void 0===t&&(t=!1),this.Yh=!1,this.update(e,t)}update(e,t){var i,s,r,n,a;this.Xh={bootstrap:{featureFlags:null==(i=e.bootstrap)?void 0:i.featureFlags,featureFlagPayloads:null==(s=e.bootstrap)?void 0:s.featureFlagPayloads},remoteRequestsDisabled:t,featureFlagsDisabled:!!e.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!e.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!e.advanced_feature_flags_dedup_per_session,cacheTtlMs:e.feature_flag_cache_ttl_ms,refreshIntervalMs:null!=(r=e.remote_config_refresh_interval_ms)?r:3e5,requestTimeoutMs:e.feature_flag_request_timeout_ms,compression:e.disable_compression?void 0:"best-available",evaluationContexts:null!=(n=null!=(a=e.evaluation_contexts)?a:e.evaluation_environments)?n:[],flagKeys:L(e.flag_keys)?e.flag_keys:void 0},!e.evaluation_environments||e.evaluation_contexts||this.Yh||(oB.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Yh=!0),B(e.flag_keys)||L(e.flag_keys)||oB.error("Invalid flag_keys found:",e.flag_keys,"Expected array of non-empty strings")}get(){return this.Xh}}var oH=id("[FeatureFlags]"),oV=id("[FeatureFlags]",{debugEnabled:!0}),oU="\" failed. Feature flags didn't load in time.",oW="connection_error",oG=e=>{for(var t={},i=0;e.length>i;i++)t[e[i]]=!0;return t},oK=e=>{var t={};for(var i of sO(e||{})){var s=i[1];s&&(t[i[0]]=s)}return t},oJ=e=>X(e)&&("RangeError"===e.name&&0===e.message.indexOf("Maximum call stack size exceeded")||"InternalError"===e.name&&"too much recursion"===e.message),oY=id("[Error tracking]"),oQ="webkit-masked-url:",oZ=["chrome-extension://","moz-extension://","safari-extension:","safari-web-extension:",oQ],oX=["__firefox__","__gCrWeb"],o0="Refusing to render web experiment since the viewer is a likely bot",o1={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>-1===t.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>aS(t,e),not_regex:(e,t)=>!aS(t,e),exact:(e,t)=>t===e,is_not:(e,t)=>t!==e};class o2{get mn(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{o2.td("retrieved web experiments from the server"),t.ed=new Map,e.forEach(e=>{if(e.feature_flag_key){t.ed&&(o2.td("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.ed)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);z(s)&&e.variants[s]&&t.rd(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];o2.nd(n,t._instance)&&t.rd(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())o2.td(o0);else if(!this.mn.disable_web_experiments){if(U(this.ed))return this.ed=new Map,this.loadIfEnabled(),void this.previewWebExperiment();o2.td("applying feature flags",e),e.forEach(e=>{var t;if(this.ed&&null!=(t=this.ed)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this.ed)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.rd(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=o2.getWindowLocation();if(null!=e&&e.search){var t=rX(null==e?void 0:e.search,"__experiment_id"),i=rX(null==e?void 0:e.search,"__experiment_variant");t&&i&&(o2.td("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.sd(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this.mn.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this.mn.disable_web_experiments&&!i)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.mn.token),method:"GET",timestampMode:"query",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}sd(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(o2.td("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.rd(s[0].name,t,s[0].variants[t].transforms))}static nd(e,t){return!U(e.conditions)&&o2.od(e,t)&&o2.ad(e)}static od(e,t){if(U(e.conditions)||U(null==(s=e.conditions)?void 0:s.url))return!0;var i=o2.getWindowLocation();if(i){var s,r,n,a,o=rt(t,i.href);return null==(r=e.conditions)||!r.url||o1[null!=(n=null==(a=e.conditions)?void 0:a.urlMatchType)?n:"icontains"](e.conditions.url,o)}return!1}static getWindowLocation(){return null==a?void 0:a.location}static ad(e){if(U(e.conditions)||U(null==(i=e.conditions)?void 0:i.utm))return!0;var t=r7();if(t.utm_source){var i,s,r,n,a,o,l,u,h,c=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_campaign||(null==(r=e.conditions)||null==(r=r.utm)?void 0:r.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==t.utm_source,v=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,p=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(h=e.conditions)||null==(h=h.utm)?void 0:h.utm_term)==t.utm_term;return c&&v&&p&&d}return!1}static td(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];ic.info("[WebExperiments] "+e,i)}rd(e,t,i){this._is_bot()?o2.td(o0):"control"!==t?i.forEach(i=>{if(i.selector){o2.td("applying transform of variant "+t+" for experiment "+e+" ",i);var s,r=null==(s=document)?void 0:s.querySelectorAll(i.selector);null==r||r.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):o2.td("Control variants leave the page unmodified.")}_is_bot(){return l&&this._instance?ax(l,this.mn.custom_blocked_useragents):void 0}}var o3=id("[Conversations]"),o5="Conversations not available yet.";function o6(e,t){var i,s,r,n,a,o,u,h=null!=(i=null==e?void 0:e.flushIntervalMs)?i:3e3,c=null!=(s=null==e?void 0:e.maxBufferSize)?s:100,d=null!=t&&t.consoleCapture?void 0:null!=(r=null==e?void 0:e.maxLogsPerInterval)?r:1e3,v=B(d)?Math.max(c,2048):Math.max(c,d),p=x({},function(){var e,t,i,s="",r="";try{var n=null==l?void 0:l.userAgent;if(n){var a=ti(n);s=a[0],r=a[1]}}catch(e){}return e=s,t=r,i=function(e){if(e)return({}).hasOwnProperty.call(ie,e)?ie[e]:e}(e),x({},i?{"os.name":i}:{},t?{"os.version":t}:{})}(),null==e?void 0:e.resourceAttributes);return{serviceName:null!=(n=null!=(a=null==p?void 0:p["service.name"])?a:null==e?void 0:e.serviceName)?n:null==t?void 0:t.serviceNameDefault,serviceVersion:null!=(o=null==p?void 0:p["service.version"])?o:null==e?void 0:e.serviceVersion,environment:null!=(u=null==p?void 0:p["deployment.environment"])?u:null==e?void 0:e.environment,resourceAttributes:p,beforeSend:null==e?void 0:e.beforeSend,flushIntervalMs:h,maxBufferSize:c,maxQueueSize:v,maxBatchRecordsPerPost:100,rateCapWindowMs:h,maxLogsPerInterval:d,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}var o8=["debug","log","warn","error","info"],o4="console",o9="__posthogHandledLogsRequestError",o7=(e,t)=>{var i=e instanceof Error?e:Error(t);return i[o9]=!0,i},le=e=>!!e&&"object"==typeof e&&!0===e[o9],lt={featureFlags:class{constructor(e){this.name="featureFlags",this.ld=!1,this.featureFlagEventHandlers=[],this.A=oH,this.ud={},this.hd={},this.dd=[],this.vd=!1,this.fd=!1,this.pd=0,this.gd=!1,this.md=!1,this.yd=!1,this.bd=!1,this._d=0,this.We=()=>{var e=this.wd();this._d=0,e&&this.reloadFeatureFlags()},this.kd=()=>{var e,t=this.Sd;B(t)||this.mn.remoteRequestsDisabled||!u||"hidden"===u.visibilityState||Date.now()-(null!=(e=this.xd)?e:0)<t||(this.reloadFeatureFlags(),this.Cd())},this.Ve=()=>{"visible"===(null==u?void 0:u.visibilityState)&&this.kd()},"get"in e?this.Ls=e:(this._instance=e,this.Td=new oz(e.config,e.pa()),this.Ls=this.Td)}updateConfig(e,t){var i;null==(i=this.Td)||i.update(e,t),this.Ns&&this.Md()}setup(e){return this.Du=e,this.A=e.logger.createLogger("[FeatureFlags]"),oI(e.kv.initialize(),()=>{this.Du===e&&(this.Du=void 0,this.Ns=e,this.Id(e))})}Id(e){var t;if(this.Ns===e)return a&&sM(a,"online",this.We),this.Md(),this.Ed=e.registerDynamicEventProperties(()=>this.Rd()?this.ud:this.hd),this.Pd=null==(t=this._instance)||null==(t=t.persistence)?void 0:t.onCrossTabFeatureFlagChange(()=>{this.Ad(),this.Fd(),this.Od()}),this.Fd(),this.initialize()}Md(){var e=this.mn.refreshIntervalMs,t=!this.mn.remoteRequestsDisabled&&u&&!B(e)&&e>0?e:void 0;t!==this.Sd&&(this.Ld(),B(t)||(this.Sd=t,this.Cd(),null!=u&&u.addEventListener&&sM(u,sw,this.Ve)))}Cd(){B(this.Sd)||(B(this.Dd)||clearInterval(this.Dd),this.xd=Date.now(),this.Dd=setInterval(this.kd,this.Sd))}Ld(){B(this.Dd)||(clearInterval(this.Dd),this.Dd=void 0,null==u||null==u.removeEventListener||u.removeEventListener(sw,this.Ve)),this.Sd=void 0,this.xd=void 0}destroy(){this.$d()}dispose(){this.$d()}$d(){var e,t;this.Ld(),this.pd++,this.md=!1,this.Du=void 0,this.Ns&&(this.Nd(),null==(e=this.Ed)||e.dispose(),this.Ed=void 0,null==(t=this.Pd)||t.call(this),this.Pd=void 0,this.dd=[],null==a||a.removeEventListener("online",this.We),this.Ns=void 0)}get mn(){return this.Ls.get()}qd(e){var t;return this.jd&&e in this.jd?this.jd[e]:null==(t=this.Ns)?void 0:t.kv.get(e)}Ad(){return!!this.jd&&(this.jd=void 0,!0)}Bd(){var e;return!B(null==(e=this.Ns)?void 0:e.kv.get(iU))&&this.Ad()}ni(e){this.Hd(()=>{var t;return null==(t=this.Ns)?void 0:t.kv.set(e)})}zd(e,t,i){var s;if(null!=(s=this._instance)&&s.persistence&&e[iU]){var r=this.qd(iU)||{},n=e[iU]||{},a=t.flags||t.featureFlags,o=t.flags?Object.entries(t.flags).filter(e=>{var t=e[1];return!(null!=t&&t.failed)}).map(e=>e[0]):[],l=!!t.errorsWhileComputingFlags&&!!t.flags,u=l?o:i&&!L(a)?Object.keys(a||{}):Array.from(new Set([...Object.keys(r),...Object.keys(n)])),h=this.qd(iJ)||{},c=e[iJ]||{},d=l||i?u:Array.from(new Set([...Object.keys(h),...Object.keys(c)])),v=!l&&!i,p=!!v||u,g={[iW]:p,[iU]:p,[iJ]:!!v||d};for(var f of(e[iK]&&(g[iK]=p),[iY,si,iQ]))B(e[f])||(g[f]=!0);this._instance.persistence.markCrossTabFeatureFlagChanges(g)}}oi(e){this.Hd(()=>{var t;return null==(t=this.Ns)?void 0:t.kv.remove(e)})}Hd(e){try{e()}catch(e){this.A.error("Failed to update feature flag persistence",e)}}Fd(){var e={};for(var t of[iW,iJ,iY,iZ]){var i=this.qd(t);B(i)||(e[t]=i)}this.ud=e;var s=x({},e),r=this.qd(iU);if(r)for(var n of Object.entries(r))s["$feature/"+n[0]]=n[1];this.hd=s}Rd(){var e=this.mn.cacheTtlMs;if(!e||0>=e)return!1;var t=this.qd(si);return"number"!=typeof t||Date.now()-t>e}Ud(){return!!this.Rd()&&(this.bd||this.fd||(this.bd=!0,this.A.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Wd(){var e=this.mn.evaluationContexts;return null!=e&&e.length?e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||this.A.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}Vd(){var e=this.mn.flagKeys;if(!B(e))return e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||this.A.error("Invalid flag key found:",e,"Expected non-empty string"),t})}initialize(){var e,t,i=this.mn,s=null!=(e=null==(t=i.bootstrap)?void 0:t.featureFlags)?e:{};if(Object.keys(s).length){var r,n,a=null!=(r=null==(n=i.bootstrap)?void 0:n.featureFlagPayloads)?r:{},o=Object.keys(s).filter(e=>!B(s[e])).reduce((e,t)=>(e[t]=s[t],e),{}),l=Object.keys(a).filter(e=>o[e]).reduce((e,t)=>(e[t]=a[t],e),{});return this.Gd({featureFlags:o,featureFlagPayloads:l},void 0,{persist:!1})}}updateFlags(e,t,i){var s,r,n=null!=i&&i.merge&&null!=(s=this.qd(iU))?s:{},a=null!=i&&i.merge&&null!=(r=this.qd(iJ))?r:{},o=x({},n,e),l=x({},a,t),u={};for(var h of Object.entries(o)){var c=h[0],d=h[1];u[c]={key:c,enabled:tK(d),variant:tJ(d),reason:void 0,metadata:B(null==l?void 0:l[c])?void 0:{id:0,version:void 0,description:void 0,payload:l[c]}}}this.Gd({flags:u})}get hasLoadedFlags(){return this.vd}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.qd(iK),t=this.qd(iZ),i=this.qd(iX);if(!i&&!t)return e||{};var s=sC({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=s[r],l=null==t?void 0:t[r],u=B(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,h=B(l)?null==o?void 0:o.variant:"string"==typeof l?l:void 0,c=null==i?void 0:i[r],d=x({},o,{enabled:u,variant:u?null!=h?h:null==o?void 0:o.variant:void 0});u!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),h!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),c&&(d.metadata=x({},null==o?void 0:o.metadata,{payload:c,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),s[r]=d}return this.ld||(this.A.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.ld=!0),s}getAllFeatureFlags(){var e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map(i=>{var s=e[i];return{key:i,enabled:tK(s),variant:tJ(s),payload:tG(t[i])}})}getFlagVariants(){var e=this.qd(iU),t=this.qd(iZ);if(!t)return e||{};for(var i=sC({},e||{}),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.ld||(this.A.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.ld=!0),i}getFlagPayloads(){var e=this.qd(iJ),t=this.qd(iX);if(!t)return e||{};for(var i=sC({},e||{}),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.ld||(this.A.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.ld=!0),i}reloadFeatureFlags(){this.gd||this.mn.featureFlagsDisabled||this.wd()||(this.fd&&(this.md=!0),this.Zd||(this.dd.slice().forEach(e=>{try{e()}catch(e){this.A.error("Error while running feature flags reloading callback",e)}}),this.Zd=setTimeout(()=>{this.Qd()},5)))}Nd(){clearTimeout(this.Zd),this.Zd=void 0}onReloading(e){return this.dd.push(e),()=>{this.dd=this.dd.filter(t=>t!==e)}}ensureFlagsLoaded(){this.vd||this.fd||this.Zd||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.gd=e}resetFlagCallReported(){this.oi(i7)}Qd(e){this.Nd();var t=this.Ns;if(t&&!this.mn.remoteRequestsDisabled&&!this.wd())if(this.fd)this.md=!0;else{var i={token:t.projectToken,distinct_id:t.distinctId,groups:t.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:x({},t.initialPersonProperties,this.qd(i0)||{},{$lib:t.library.name,$lib_version:t.library.version}),group_properties:this.qd(i1),timezone:no()};B(t.deviceId)||(i.$device_id=t.deviceId),(null!=e&&e.disableFlags||this.mn.featureFlagsDisabled)&&(i.disable_flags=!0);var s=this.Wd();s.length&&(i.evaluation_contexts=s);var r=this.Vd();B(r)||(i.flag_keys=r);var n=this.mn.onlyEvaluateSurveyFeatureFlags,a=this.pd;this.fd=!0;var o=()=>{this.md&&(this.md=!1,this.Qd())},l=e=>{this.fd=!1,a===this.pd&&(this.ni({[st]:[oW]}),this.A.error("Feature flag request failed",e),this.Bd()&&this.Od(!0)),o()};try{t.sendRequest("/flags/?v=2"+(n?"&only_evaluate_survey_feature_flags=true":""),{target:"flags",method:"POST",body:i,compression:this.mn.compression,sentAt:"body",timeoutMs:this.mn.requestTimeoutMs}).then(e=>{var t,s,r=null!=(t=e.json)?t:{},l=200!==e.statusCode;if(this.fd=!1,a===this.pd){if(this.Jd(e.statusCode),l||this.md||(this.$anon_distinct_id=void 0),!i.disable_flags||this.md){this.yd=!l;var u=[];e.error?u.push(e.error instanceof Error&&"AbortError"===e.error.name?"timeout":e.error instanceof Error?oW:"unknown_error"):200!==e.statusCode&&u.push("api_error_"+e.statusCode),r.errorsWhileComputingFlags&&u.push("errors_while_computing_flags");var h=!(null==(s=r.quotaLimited)||!s.includes("feature_flags"));h&&u.push("quota_limited"),this.ni({[st]:u}),h?this.A.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):i.disable_flags||this.Gd(r,l,{partialResponse:n}),o()}}else o()}).catch(l)}catch(e){l(e)}}}wd(){return r2(this._d,3)}Jd(e){this._d=r3(e,this._d,3,()=>this.A.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes."))}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),!t.fresh||this.yd)if(this.vd||this.getFlags()&&this.getFlags().length>0){if(!this.Ud()){var s=this.getFeatureFlagResult(e,t);return null!=(i=null==s?void 0:s.variant)?i:null==s?void 0:s.enabled}}else this.A.warn('getFeatureFlag for key "'+e+oU)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.yd)if(this.vd||this.getFlags()&&this.getFlags().length>0){if(!this.Ud()){var i,s=this.getFlagVariants(),r=e in s,n=s[e],a=this.getFlagPayloads()[e],o=String(n),l=this.qd(iY)||void 0,u=this.qd(si)||void 0,h=this.qd(i7)||{};if(this.mn.deduplicateCallsPerSession){var c,d=null==(c=this.Ns)?void 0:c.session.sessionId,v=this.qd(se);d&&d!==v&&(h={},i=d)}if(!t.send_event&&"send_event"in t)i&&this.ni({[i7]:h,[se]:i});else if(e in h&&h[e].includes(o))i&&this.ni({[i7]:h,[se]:i});else{L(h[e])?h[e].push(o):h[e]=[o],this.ni(x({[i7]:h},i?{[se]:i}:{}));var p=this.getFeatureFlagDetails(e),g=[...null!=(_=this.qd(st))?_:[]];B(n)&&g.push("flag_missing");var f={$feature_flag:e,$feature_flag_response:n,$feature_flag_payload:null!=a?a:null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:null!=(m=null==(y=this.mn.bootstrap)||null==(y=y.featureFlags)?void 0:y[e])?m:null,$feature_flag_bootstrapped_payload:null!=(b=null==(w=this.mn.bootstrap)||null==(w=w.featureFlagPayloads)?void 0:w[e])?b:null,$used_bootstrap_value:!this.yd};B(null==p||null==(k=p.metadata)?void 0:k.has_experiment)||(f.$feature_flag_has_experiment=p.metadata.has_experiment),B(null==p||null==(E=p.metadata)?void 0:E.version)||(f.$feature_flag_version=p.metadata.version);var _,m,y,b,w,k,E,S,P,F,I,C,O,$=null!=(S=null==p||null==(P=p.reason)?void 0:P.description)?S:null==p||null==(F=p.reason)?void 0:F.code;$&&(f.$feature_flag_reason=$),null!=p&&null!=(I=p.metadata)&&I.id&&(f.$feature_flag_id=p.metadata.id),B(null==p?void 0:p.original_variant)&&B(null==p?void 0:p.original_enabled)||(f.$feature_flag_original_response=B(p.original_variant)?p.original_enabled:p.original_variant),null!=p&&null!=(C=p.metadata)&&C.original_payload&&(f.$feature_flag_original_payload=null==p||null==(O=p.metadata)?void 0:O.original_payload),g.length&&(f.$feature_flag_error=g.join(",")),this.Kd(f)}if(r)return{key:e,enabled:!!n,variant:"string"==typeof n?n:void 0,payload:tG(a)}}}else this.A.warn('getFeatureFlagResult for key "'+e+oU)}Kd(e){try{var t;null==(t=this.Ns)||t.capture("$feature_flag_called",e).catch(e=>{this.A.error("Failed to capture feature flag call",e)})}catch(e){this.A.error("Failed to capture feature flag call",e)}}getRemoteConfigPayload(e,t){this.Yd(e,t)}Yd(e,t){var i=this;return w(function*(){var s=i.Ns;if(s){var r={distinct_id:s.distinctId,token:s.projectToken,person_properties:{$lib:s.library.name,$lib_version:s.library.version}},n=i.Wd();n.length&&(r.evaluation_contexts=n);var a,o=i.Vd();B(o)||(r.flag_keys=o);try{var l,u=null==(l=(yield s.sendRequest("/flags/?v=2",{target:"flags",method:"POST",body:r,compression:i.mn.compression,sentAt:"body",timeoutMs:i.mn.requestTimeoutMs})).json)?void 0:l.featureFlagPayloads;a=(null==u?void 0:u[e])||void 0}catch(e){return void i.A.error("Remote config feature flag request failed",e)}try{t(a)}catch(e){i.A.error("Remote config feature flag callback failed",e)}}})()}isFeatureEnabled(e,t){if(void 0===t&&(t={}),t.fresh&&!this.yd)return t.defaultValue;if(!(this.vd||this.getFlags()&&this.getFlags().length>0))return this.A.warn('isFeatureEnabled for key "'+e+oU),t.defaultValue;var i=this.getFeatureFlag(e,t);return B(i)?t.defaultValue:!!i}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,i){this.Gd(e,t,i)}Gd(e,t,i){if(this.Ns){this.vd=!0;var s=function(e,t,i,s,r,n){void 0===t&&(t={}),void 0===i&&(i={}),void 0===s&&(s={}),void 0===n&&(n=oH);var a,o,l=(a=n,(o=e.flags)?x({},e,{featureFlags:Object.fromEntries(Object.keys(o).map(e=>{var t;return[e,null!=(t=o[e].variant)?t:o[e].enabled]})),featureFlagPayloads:Object.fromEntries(Object.keys(o).filter(e=>o[e].enabled).filter(e=>{var t;return!B(null==(t=o[e].metadata)?void 0:t.payload)}).map(e=>{var t;return[e,null==(t=o[e].metadata)?void 0:t.payload]}))}):(e.featureFlags&&a.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e)),u=l.flags,h=l.featureFlags,c=l.featureFlagPayloads;if(h){var d=e.requestId,v=e.evaluatedAt;if(L(h)){n.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var p={};if(h)for(var g=0;h.length>g;g++)p[h[g]]=!0;return{[iW]:h,[iU]:p,[iQ]:!1}}var f=h,_=c,m=u;if(null!=r&&r.partialResponse){var y=Object.keys(f),b=_||{};f=x({},t,f),_=x({},i,b),y.forEach(e=>{var t;e in b||null==(t=_)||delete t[e]}),m=x({},s,m)}else if(e.errorsWhileComputingFlags)if(u){var w=new Set(Object.keys(u).filter(e=>{var t;return!(null!=(t=u[e])&&t.failed)}));f=x({},t,Object.fromEntries(Object.entries(f).filter(e=>w.has(e[0]))));var k=Object.fromEntries(Object.entries(_||{}).filter(e=>w.has(e[0])));_=x({},i,k),w.forEach(e=>{var t;e in k||null==(t=_)||delete t[e]}),m=x({},s,Object.fromEntries(Object.entries(m||{}).filter(e=>w.has(e[0]))))}else f=x({},t,f),_=x({},i,_),m=x({},s,m);return x({[iW]:Object.keys(oK(f)),[iU]:f||{},[iJ]:_||{},[iK]:m||{},[iQ]:!0===e.minimalFlagCalledEvents},d?{[iY]:d}:{},v?{[si]:v}:{})}}(e,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),i,this.A);if(s)if(!1===(null==i?void 0:i.persist)){var r=!B(this.Ns.kv.get(iU));this.jd=s,r||this.ni(s)}else this.Ad(),this.zd(s,e,!(null==i||!i.partialResponse)),this.ni(s);else t&&this.Bd();t||(this.bd=!1),this.Od(t)}}override(e,t){void 0===t&&(t=!1),this.A.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){this.Xd(e)}Xd(e){if(this.Ns){if(!1===e)return this.oi([iZ,iX]),this.Od(),void oV.info("All overrides cleared");if(L(e))return this.ni({[iZ]:oG(e)}),this.Od(),void oV.info("Flag overrides set",{flags:e});if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){this.ld=!!(null!=(t=e.suppressWarning)&&t);var t,i={},s=e.flags,r=e.payloads;return s&&(i[iZ]=L(s)?oG(s):s),r&&(i[iX]=r),Object.keys(i).length&&this.ni(i),!1===s&&!1===r?this.oi([iZ,iX]):!1===s?this.oi(iZ):!1===r&&this.oi(iX),this.Od(),!1===s?oV.info("Flag overrides cleared"):s&&oV.info("Flag overrides set",{flags:s}),void(!1===r?oV.info("Payload overrides cleared"):r&&oV.info("Payload overrides set",{payloads:r}))}if(e&&"object"==typeof e)return this.ni({[iZ]:e}),this.Od(),void oV.info("Flag overrides set",{flags:e});this.A.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}else this.A.warn("posthog.featureFlags.overrideFeatureFlags called before feature flags were ready")}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.vd){var t=this.tv(),i=t.flags,s=t.flagVariants;try{e(i,s)}catch(e){this.A.error("Error while running feature flags callback",e)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r,n=(this.qd(iG)||[]).find(t=>t.flagKey===e),a={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:a};n&&(o.$early_access_feature_name=n.name),i&&(o.$feature_enrollment_stage=i);var l=x({},this.getFlagVariants(),{[e]:t});null==(r=this._instance)||null==(r=r.persistence)||r.markCrossTabFeatureFlagChanges({[iW]:[e],[iU]:[e],[i0]:Object.keys(a)}),this.ni({[iW]:Object.keys(oK(l)),[iU]:l,[i0]:x({},this.qd(i0)||{},a)}),this.Od();try{null==(s=this.Ns)||s.capture("$feature_enrollment_update",o).catch(e=>{this.A.error("Failed to capture early access feature enrollment",e)})}catch(e){this.A.error("Failed to capture early access feature enrollment",e)}}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this.qd(iG);!s||t?this.ev(e,i):e(s)}ev(e,t){var i=this;return w(function*(){var s=i.Ns;if(s){var r,n=t?"&"+t.map(e=>"stage="+e).join("&"):"";try{var a=yield s.sendRequest("/api/early_access_features/?token="+s.projectToken+n,{target:"api",method:"GET",sentAt:"query"});if(!a.json)return;i.ni({[iG]:r=a.json.earlyAccessFeatures})}catch(e){return void i.A.error("Early access feature request failed",e)}try{e(r)}catch(e){i.A.error("Early access feature callback failed",e)}}})()}tv(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}Od(e){this.Fd();var t=this.tv(),i=t.flags,s=t.flagVariants;this.featureFlagEventHandlers.forEach(t=>{try{t(i,s,{errorsLoading:e})}catch(e){this.A.error("Error while running feature flags callback",e)}})}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0),this.iv(e,t)}iv(e,t){void 0===t&&(t=!0);var i=this.qd(i0)||{},s=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),r=null==e?void 0:e.$set_once,n={};if(r)for(var a in r)({}).hasOwnProperty.call(r,a)&&(a in i||(n[a]=r[a]));this.ni({[i0]:x({},i,n,s)}),t&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=x({},this.qd(i0)||{});e.forEach(e=>{delete i[e]}),this.ni({[i0]:i}),t&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){void 0===e&&(e=!0),this.oi(i0),e&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.qd(i1)||{},s=x({},i);for(var r of Object.keys(e))s[r]=x({},i[r],e[r]);this.ni({[i1]:s}),t&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.qd(i1)||{};this.ni({[i1]:x({},t,{[e]:{}})})}else this.oi(i1)}reset(){this.pd++,this.md=!1,this.ud={},this.hd={},this.jd=void 0,this.vd=!1,this.gd=!1,this.yd=!1,this.$anon_distinct_id=void 0,this.Nd(),this.ld=!1,this._d=0}}},li=x({productTours:class{get Ba(){return this._instance.persistence}constructor(e){this.mc=null,this.yc=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(e.ok){var t,i,s=e.config;if("productTours"in s){if(this.Ba&&this.Ba.register({[iT]:!!s.productTours}),!oE(this._instance))return!this.mc&&U(null==(t=this.Ba)?void 0:t.props[i9])||ok.info("product tours disabled; stopping and clearing cached tours"),null==(i=this.mc)||i.stop(),this.mc=null,void this.clearCache();this.loadIfEnabled()}}}loadIfEnabled(){!this.mc&&oE(this._instance)&&this.Ys(()=>this.bc())}Ys(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?ok.error("Could not load product tours script",t):e()})}bc(){var e;!this.mc&&null!=(e=m.__PosthogExtensions__)&&e.generateProductTours&&(this.mc=m.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!L(this.yc)||t){var i=this.Ba;if(i){var s=i.props[i9];if(L(s)&&!t)return this.yc=s,void e(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",timestampMode:"query",callback:t=>{if(oE(this._instance)){var s=t.statusCode;if(200!==s||!t.json){var r="Product Tours API could not be loaded, status: "+s;return 0===s?t.error||ok.warn(r):ok.error(r),void e([],{isLoaded:!1,error:r})}var n=L(t.json.product_tours)?t.json.product_tours:[];this.yc=n,i&&i.register({[i9]:n}),e(n,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.yc,{isLoaded:!0})}getActiveProductTours(e){U(this.mc)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.mc.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.mc)||t.showTourById(e)}previewTour(e){this.mc?this.mc.previewTour(e):this.Ys(()=>{var t;this.bc(),null==(t=this.mc)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.mc)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.mc)||e.nextStep()}previousStep(){var e;null==(e=this.mc)||e.previousStep()}clearCache(){var e;this.yc=null,null==(e=this.Ba)||e.unregister(i9)}resetTour(e){var t;null==(t=this.mc)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.mc)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.mc)||t.cancelPendingTour(e)}}},lt),ls=x({surveys:class extends o${constructor(e){var t;super(new oL(e),{get projectToken(){return t.config.token},kv:new oD(t=e)}),this._instance=e}Bu(e,t){var i=t.query?ai(e,t.query):e;return new Promise(e=>{var s;this._instance._send_request({method:t.method,url:this._instance.requestRouter.endpointFor(null!=(s=t.target)?s:"api",i),data:t.body,headers:t.headers,timeout:t.timeoutMs,fireCallbackOnDrop:!0,transport:t.transport,compression:t.compression,timestampMode:t.sentAt,callback:e})})}}},lt),lr=x({experiments:o2},lt),ln=x({},lt,{sessionRecording:class{get mn(){return this._instance.config}get Ba(){return this._instance.persistence}get started(){var e;return!(null==(e=this.rv)||!e.isStarted)}get status(){var e,t;return this.nv===o_||this.nv===om?this.nv:null!=(e=null==(t=this.rv)?void 0:t.status)?e:this.nv}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.nv=og,this.sv=void 0,this.ov=!1,this.je=(()=>{if(null==u||!u.visibilityState||"visible"===u.visibilityState)return!0;var e,t=null==a||null==(e=a.performance)||null==e.getEntriesByType?void 0:e.getEntriesByType("visibility-state");return!(null!=t&&t.length)||t.some(e=>"visible"===e.name)})(),this.Ve=()=>{var e;"visible"===(null==u?void 0:u.visibilityState)&&(this.je=!0,null==(e=this.rv)||null==e.setDocumentWasEverVisible||e.setDocumentWasEverVisible(!0))},this._instance=e,!this._instance.sessionManager)throw ob.error("started without valid sessionManager"),Error(oy+" started without valid sessionManager. This is a bug.");if(this.mn.cookieless_mode===s_)throw Error(oy+' cannot be used with cookieless_mode="always"');null!=u&&u.addEventListener&&sM(u,"visibilitychange",this.Ve)}initialize(){this.startIfEnabledOrStop()}dispose(e){var t=(void 0===e?{}:e).discardBufferedEvents;this.ov=!0,null==u||null==u.removeEventListener||u.removeEventListener("visibilitychange",this.Ve),void 0!==t&&t?this.av(!0):this.stopRecording()}get lv(){var e,t=!(null==(e=this._instance.get_property(iL))||!e.enabled),i=!this.mn.disable_session_recording,s=this.mn.disable_session_recording||this._instance.consent.isOptedOut();return a&&t&&i&&!s}startIfEnabledOrStop(e){var t;if(!(this.ov||this.lv&&null!=(t=this.rv)&&t.isStarted)){var i=!B(Object.assign)&&!B(Array.from);this.lv&&i?(this.uv(e),ob.info("starting")):(this.nv=og,this.stopRecording())}}uv(e){var t,i;if(this.lv)if(this.nv!==o_&&this.nv!==om&&(this.nv=of),null!=m&&null!=(t=m.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=m.__PosthogExtensions__)&&i.initSessionRecording)this.hv(e);else{var s,r=this._instance.sessionManager;null==(s=m.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.dv,t=>{if(!this.ov&&this.lv&&this._instance.sessionManager===r)return t?(this._instance.register_for_session({[sp]:!0}),ob.error("could not load recorder",t)):void this.hv(e);this.nv=og})}}stopRecording(){var e,t;null==(e=this.sv)||e.call(this),this.sv=void 0,null==(t=this.rv)||t.stop()}av(e){var t,i;void 0===e&&(e=!1),null==(t=this.sv)||t.call(this),this.sv=void 0,null==(i=this.rv)||i.discard({discardProducerEvents:e})}vv(){var e,t;null==(e=this.Ba)||e.unregister(iV),null==(t=this.Ba)||t.unregister(iN)}fv(e,t){if(U(e))return null;var i=W(e)?e:parseFloat(e);return"number"!=typeof i||!Number.isFinite(i)||0>i||i>1?(ob.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):i}pv(e){if(this.Ba){var t,i,s=this.Ba,r=()=>{var t,i=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.fv(null==(t=this.mn.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),n=this.fv(null==i?void 0:i.sampleRate,"remote config sampleRate"),a=null!=r?r:n;U(a)&&this.vv();var o=null==i?void 0:i.minimumDurationMilliseconds;s.register({[iL]:x({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:x({capturePerformance:e.capturePerformance},null==i?void 0:i.networkPayloadCapture),canvasRecording:{enabled:null==i?void 0:i.recordCanvas,fps:null==i?void 0:i.canvasFps,quality:null==i?void 0:i.canvasQuality},sampleRate:a,minimumDurationMilliseconds:B(o)?null:o,endpoint:null==i?void 0:i.endpoint,triggerMatchType:null==i?void 0:i.triggerMatchType,masking:null==i?void 0:i.masking,urlTriggers:null==i?void 0:i.urlTriggers,version:null==i?void 0:i.version,triggerGroups:null==i?void 0:i.triggerGroups})})};r(),null==(t=this.sv)||t.call(this),this.sv=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(r)}}onRemoteConfig(e){var t=e.ok?e.config:void 0;return t&&"sessionRecording"in t?!1===t.sessionRecording?(this.pv(t),void this.av()):(this.pv(t),void this.startIfEnabledOrStop()):(this.nv===o_&&(this.nv=om,ob.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.rv)&&i.log?this.rv.log(e,t):ob.warn("log called before recorder was ready")}get dv(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(iL);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}gv(){var e,t=this._instance.get_property(iL);if(!t)return!1;try{e="object"==typeof t?t:JSON.parse(t)}catch(e){return ob.warn("persisted remote config for session recording is invalid and will be ignored",e),!1}return!U(e.cache_timestamp)&&36e5>=Date.now()-e.cache_timestamp}hv(e){var t,i,s,r;if(!this.ov&&this.lv&&this._instance.sessionManager){if(null==(t=m.__PosthogExtensions__)||!t.initSessionRecording)return ob.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[sp]:!0});if(this.rv||(this.rv=null==(r=m.__PosthogExtensions__)?void 0:r.initSessionRecording(this._instance,this.je),this.rv._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.gv()){if(this.nv===om||this.nv===o_)return;return this.nv=o_,ob.info("persisted remote config is stale, requesting fresh config before starting"),void new nO(this._instance).load()}this.nv=of,null==(i=(s=this.rv).setDocumentWasEverVisible)||i.call(s,this.je),this.rv.start(e)}else this.nv=og}onRRwebEmit(e){var t;null==(t=this.rv)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.rv||null==(t=this.Ba)||t.register({[iq]:!0}),null==(e=this.rv)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.rv||null==(t=this.Ba)||t.register({[ij]:!0}),null==(e=this.rv)||e.overrideSampling()}overrideTrigger(e){var t,i;this.rv||null==(i=this.Ba)||i.register({["url"===e?iB:iz]:!0}),null==(t=this.rv)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.rv)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.rv)||!i.tryAddCustomEvent(e,t))}}},{autocapture:class extends or{constructor(e){super(new on(e)),this.instance=e}},historyAutocapture:class{constructor(e){this._instance=e,this.mv=this.yv()}initialize(){this.startIfEnabled()}get isEnabled(){var e=this.bv();return!!(e.path||e.search||this._v(e))}startIfEnabled(){this.isEnabled&&(ic.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}startIfEnabledOrStop(){this.stop(),this.mv=this.yv(),this.startIfEnabled()}stop(){this.wv&&this.wv(),this.wv=void 0,this.Sv&&this.Sv(),this.Sv=void 0,ic.info("History API monitoring stopped")}monitorHistoryChanges(){a&&a.history&&(this.xv("pushState"),this.xv("replaceState"),this.Cv(),this._v()&&this.Tv())}xv(e){var t;if(a&&(null==(t=a.history[e])||!t.__posthog_wrapped__)){var i=this;ou(a.history,e,t=>function(s,r,n){t.call(this,s,r,n),i.Mv(e)})}}yv(){var e=null==a?void 0:a.location;if(null!=e&&e.pathname)return{pathname:e.pathname,search:e.search,hash:e.hash}}bv(){var e=this._instance.config.capture_pageview;return"history_change"===e?{path:!0}:j(e)?e:{}}_v(e){return void 0===e&&(e=this.bv()),!!e.hash&&!this._instance.config.disable_capture_url_hashes}Iv(e){var t=this.bv(),i=this.mv;return!(!i||!(t.path&&e.pathname!==i.pathname||t.search&&e.search!==i.search||this._v(t)&&e.hash!==i.hash))}Mv(e){try{var t=this.yv();if(!t)return;this.Iv(t)&&this._instance.capture(sk,{navigation_type:e}),this.mv=t}catch(t){ic.error("Error capturing "+e+" pageview",t)}}Cv(){if(!this.wv){var e=()=>{this.Mv("popstate")};sM(a,"popstate",e),this.wv=()=>{a&&a.removeEventListener("popstate",e)}}}Tv(){if(!this.Sv){var e=()=>{this.Mv("hashchange")};sM(a,"hashchange",e),this.Sv=()=>{a&&a.removeEventListener("hashchange",e)}}}},heatmaps:class{get mn(){return this.instance.config}constructor(e){var t;this.Ev=!1,this.Rs=!1,this.Rv=null,this.instance=e,this.Ev=!(null==(t=this.instance.persistence)||!t.props[iI]),this.rageclicks=new oe(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return j(this.mn.capture_heatmaps)&&this.mn.capture_heatmaps.flush_interval_milliseconds&&(e=this.mn.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return U(this.mn.capture_heatmaps)?U(this.mn.enable_heatmaps)?this.Ev:this.mn.enable_heatmaps:!1!==this.mn.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.Rs||(ow.info("starting..."),this.Pv(),this.Ve());else{var e;clearInterval(null!=(e=this.Rv)?e:void 0),this.Av(),this.getAndClearBuffer()}}onRemoteConfig(e){if(e.ok){var t=e.config;if("heatmaps"in t){var i=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[iI]:i}),this.Ev=i,this.startIfEnabled()}}}getAndClearBuffer(){var e=this.De;return this.De=void 0,e}Fv(e){ox(e.originalEvent)&&this.Xi(e.originalEvent,"deadclick")}Ve(){this.Rv&&clearInterval(this.Rv),this.Rv="visible"===(null==u?void 0:u.visibilityState)?setInterval(this.Pa.bind(this),this.flushIntervalMilliseconds):null}Pv(){a&&u&&(this.Ov=this.Pa.bind(this),sM(a,sx,this.Ov),this.Lv=e=>this.Xi(e||(null==a?void 0:a.event)),sM(u,"click",this.Lv,{capture:!0}),this.Dv=e=>this.$v(e||(null==a?void 0:a.event)),sM(u,"mousemove",this.Dv,{capture:!0}),this.Nv=new rq(this.instance,rN,this.Fv.bind(this)),this.Nv.startIfEnabledOrStop(),this.qv=this.Ve.bind(this),sM(u,sw,this.qv),this.Rs=!0)}Av(){var e;a&&u&&(this.Ov&&a.removeEventListener(sx,this.Ov),this.Lv&&u.removeEventListener("click",this.Lv,{capture:!0}),this.Dv&&u.removeEventListener("mousemove",this.Dv,{capture:!0}),this.qv&&u.removeEventListener(sw,this.qv),clearTimeout(this.jv),null==(e=this.Nv)||e.stop(),this.Rs=!1)}Bv(e,t){var i=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),n=function(e,t,i){for(var s=e;s&&rr(s)&&!rn(s,"body")&&s!==i;){var r,n,o,l=void 0;try{l=null==(r=null!=(n=null==(o=s.ownerDocument)?void 0:o.defaultView)?n:a)?void 0:r.getComputedStyle(s).position}catch(e){break}if(P(t,l))return!0;s=rf(s)}return!1}(rv(e),["fixed","sticky"],r);return{x:e.clientX+(n?0:s),y:e.clientY+(n?0:i),target_fixed:n,type:t}}Xi(e,t){var i;if(void 0===t&&(t="click"),!rs(e.target)&&ox(e)){var s=this.Bv(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&rk(rv(e),this.instance.config.rageclick)&&this.ks(x({},s,{type:"rageclick"})),this.ks(s)}}$v(e){!rs(e.target)&&ox(e)&&(clearTimeout(this.jv),this.jv=setTimeout(()=>{this.ks(this.Bv(e,"mousemove"))},500))}ks(e){if(a){var t=this.mn.disable_capture_url_hashes?tg(a.location.href):a.location.href,i=this.mn.custom_personal_data_properties,s=r0(t,this.mn.mask_personal_data_properties?[...r6,...i||[]]:[],r4);this.De=this.De||{},this.De[s]||(this.De[s]=[]),this.De[s].push(e)}}Pa(){this.De&&!q(this.De)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:rq,webVitalsAutocapture:class{constructor(e){var t;this.Ev=!1,this.Rs=!1,this.De={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Hv=()=>{clearTimeout(this.zv),this.zv=void 0,0!==this.De.metrics.length&&(this._instance.capture("$web_vitals",x({$current_url:this.De.url},this.De.metrics.reduce((e,t)=>x({},e,{["$web_vitals_"+t.name+"_event"]:x({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{}))),this.De={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Uv=e=>{var t;if(this.De=this.De||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},U(null==e?void 0:e.name)||U(null==e?void 0:e.value))oc.error("Invalid metric received",e);else{var i="string"==typeof e.navigationURL?e.navigationURL:void 0,s=this.Wv(i);if(!B(s)){var r=W(e.navigationId)||"string"==typeof e.navigationId?"navigation:"+e.navigationId:"url:"+s;if(!this.Vv||this.Vv>e.value){this.De.navigationKey!==r&&(this.Hv(),this.zv=setTimeout(this.Hv,this.flushToCaptureTimeoutMs)),B(this.De.navigationKey)&&(this.De.navigationKey=r,this.De.url=s),this.De.firstMetricTimestamp=B(this.De.firstMetricTimestamp)?Date.now():this.De.firstMetricTimestamp;var n=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),a=x({},e,i?{navigationURL:s}:{},{$current_url:s,timestamp:Date.now()});if(delete a.entries,j(e.attribution)&&this.attributionMetrics.indexOf(e.name)>-1){var o={};for(var l of op){var u="url"===l&&"string"==typeof e.attribution[l]?this.Wv(e.attribution[l]):e.attribution[l];B(u)||(o[l]=u)}a.attribution=o}else delete a.attribution;B(n)||(a.$session_id=n.sessionId,a.$window_id=n.windowId),this.De.metrics.push(a),this.De.metrics.length===this.allowedMetrics.length&&this.Hv()}else oc.error("Ignoring metric with value >= "+this.Vv,e)}}},this.Gv=()=>{if(!this.Rs){var e,t,i,s,r=!1,n=m.__PosthogExtensions__,a=null==n?void 0:n.postHogWebVitalsCallbacksByFlavor,o=(null==a?void 0:a[this.Zv])||("web-vitals"===this.Zv&&B(a)?null==n?void 0:n.postHogWebVitalsCallbacks:void 0);if(!B(o)){var l=o.withoutAttribution,u=this.attributionMetrics;r=!B(l),e=u.indexOf("LCP")>-1?o.onLCP:(null==l?void 0:l.onLCP)||o.onLCP,t=u.indexOf("CLS")>-1?o.onCLS:(null==l?void 0:l.onCLS)||o.onCLS,i=u.indexOf("FCP")>-1?o.onFCP:(null==l?void 0:l.onFCP)||o.onFCP,s=u.indexOf("INP")>-1?o.onINP:(null==l?void 0:l.onINP)||o.onINP}if(e&&t&&i&&s){var h={reportSoftNavs:this.useSoftNavs},c=r&&this.attributionMetrics.indexOf("INP")>-1?x({},h,{includeProcessedEventEntries:!1}):h;this.allowedMetrics.indexOf("LCP")>-1&&e(this.Uv.bind(this),h),this.allowedMetrics.indexOf("CLS")>-1&&t(this.Uv.bind(this),h),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Uv.bind(this),h),this.allowedMetrics.indexOf("INP")>-1&&s(this.Uv.bind(this),c),this.Rs=!0}else oc.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Ev=!(null==(t=this._instance.persistence)||!t.props[iA]),this.startIfEnabled()}get Qv(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,i=j(this.Qv)?null==(e=this.Qv)?void 0:e.web_vitals_allowed_metrics:void 0;return U(i)?(null==(t=this._instance.persistence)?void 0:t.props[iD])||od:i}get flushToCaptureTimeoutMs(){return(j(this.Qv)?this.Qv.web_vitals_delayed_flush_ms:void 0)||5e3}get attributionMetrics(){var e=j(this.Qv)?this.Qv.web_vitals_attribution:void 0;return K(e)?e?od:[]:L(e)?e:ov}get useAttribution(){return this.attributionMetrics.length>0}get useSoftNavs(){var e=j(this.Qv)?this.Qv.__preview_web_vitals_soft_navs:void 0;return null!=e&&e}get Vv(){var e=j(this.Qv)&&W(this.Qv.__web_vitals_max_value)?this.Qv.__web_vitals_max_value:9e5;return e>0&&6e4>=e?9e5:e}get isEnabled(){var e=null==h?void 0:h.protocol;if("http:"!==e&&"https:"!==e)return oc.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=j(this.Qv)?this.Qv.web_vitals:K(this.Qv)?this.Qv:void 0;return K(t)?t:this.Ev}startIfEnabled(){this.isEnabled&&!this.Rs&&(oc.info("enabled, starting..."),this.Ys(this.Gv))}onRemoteConfig(e){if(e.ok){var t=e.config;if("capturePerformance"in t){var i=j(t.capturePerformance)&&!!t.capturePerformance.web_vitals,s=j(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[iA]:i}),this._instance.persistence.register({[iD]:s})),this.Ev=i,this.startIfEnabled()}}}get Zv(){return this.useSoftNavs?this.useAttribution?"web-vitals-with-attribution-soft-navs":"web-vitals-soft-navs":this.useAttribution?"web-vitals-with-attribution":"web-vitals"}Ys(e){var t=m.__PosthogExtensions__,i=this.Zv,s=null==t?void 0:t.postHogWebVitalsCallbacksByFlavor;null!=s&&s[i]||"web-vitals"===i&&B(s)&&null!=t&&t.postHogWebVitalsCallbacks?e():null==t||null==t.loadExternalDependency||t.loadExternalDependency(this._instance,i,t=>{t?oc.error("failed to load script",t):e()})}Wv(e){var t=e||(null==a?void 0:a.location.href);if(t){var i=this._instance.config.disable_capture_url_hashes?tg(t):t,s=this._instance.config.custom_personal_data_properties;return r0(i,this._instance.config.mask_personal_data_properties?[...r6,...s||[]]:[],r4)}oc.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var t;this.Gv=()=>{var e;if(a&&this.isEnabled&&null!=(e=m.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=m.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=m.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=m.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Jv&&this.mn.capture_unhandled_errors&&(this.Jv=t(this.captureException.bind(this))),!this.Kv&&this.mn.capture_unhandled_rejections&&(this.Kv=i(this.captureException.bind(this))),!this.Yv&&this.mn.capture_console_errors&&(this.Yv=s(this.captureException.bind(this)))}catch(e){oa.error("failed to start",e),this.Xv()}}},this._instance=e,this.tc=!(null==(t=this._instance.persistence)||!t.props[iC]),this.wt=new en(x({},function(e){var t,i,s,r;return void 0===e&&(e={}),{refillRate:null!=(t=null!=(i=e.exceptionRateLimiterRefillRate)?i:e.__exceptionRateLimiterRefillRate)?t:1,bucketSize:null!=(s=null!=(r=e.exceptionRateLimiterBucketSize)?r:e.__exceptionRateLimiterBucketSize)?s:10}}(this._instance.config.error_tracking),{refillInterval:1e4,A:oa})),this.mn=this.ec(),this.startIfEnabledOrStop()}ec(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return j(e)?t=x({},t,e):(B(e)?this.tc:e)&&(t=x({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.mn.capture_console_errors||this.mn.capture_unhandled_errors||this.mn.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(oa.info("enabled"),this.Xv(),this.Ys(this.Gv)):this.Xv()}Ys(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.errorWrappingFunctions?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return oa.error("failed to load script",t);e()})}Xv(){var e,t,i;null==(e=this.Jv)||e.call(this),this.Jv=void 0,null==(t=this.Kv)||t.call(this),this.Kv=void 0,null==(i=this.Yv)||i.call(this),this.Yv=void 0}onRemoteConfig(e){if(e.ok){var t=e.config;"autocaptureExceptions"in t&&(this.tc=!!t.autocaptureExceptions,this._instance.persistence&&this._instance.persistence.register({[iC]:this.tc}),this.mn=this.ec(),this.startIfEnabledOrStop())}}onConfigChange(){this.mn=this.ec()}captureException(e){try{var t,i,s,r=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";if(this.wt.consumeRateLimit(r))return void oa.info("Skipping exception capture because of client rate limiting.",{exception:r});null==(s=this._instance.exceptions)||s.sendExceptionEvent(e)}catch(e){}}},exceptions:class{constructor(e){var t,i;this.ic=[],this.rc=new ty([new tO,new tq,new tA,new t$,new tN,new tL,new tT,new tj],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];return function(t,s){void 0===s&&(s=0);for(var r=[],n=t.split("\n"),a=s;n.length>a;a++){var o=n[a];if(1024>=o.length){var l=tC.test(o)?o.replace(tC,"$1"):o;if(!l.match(/\S*Error: /)){for(var u of i){var h=u(l,e);if(h){r.push(h);break}}if(r.length>=50)break}}}if(!r.length)return[];var c=Array.from(r);return c.reverse(),c.slice(0,50).map(e=>x({},e,{filename:e.filename||(c[c.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",tS,tI)),this._instance=e,this.ic=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(iO))?t:[],this.nc=tU(this.sc()),this.oc=new tW(this.nc)}onConfigChange(){this.nc=tU(this.sc()),this.oc.setConfig(this.nc)}onRemoteConfig(e){var t,i,s;if(e.ok){var r=e.config;if("errorTracking"in r){var n=null!=(t=null==(i=r.errorTracking)?void 0:i.suppressionRules)?t:[],a=null==(s=r.errorTracking)?void 0:s.captureExtensionExceptions;this.ic=n,this._instance.persistence&&this._instance.persistence.register({[iO]:this.ic,[i$]:a})}}}get ac(){var e,t=!!this._instance.get_property(i$),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.rc.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.nc.enabled)try{if(!z(e)||0===e.trim().length)return void oY.warn("Ignoring exception step because message must be a non-empty string");var i=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((i,s)=>(tH.has(s)?t.push(s):i[s]=e[s],i),{}),droppedKeys:t}}(this.lc(t)),s=i.sanitizedProperties,r=i.droppedKeys;r.length>0&&oY.warn("Ignoring reserved exception step fields",{droppedKeys:r}),this.oc.add(x({[tB]:e,[tz]:(new Date).toISOString()},s))}catch(e){oY.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){var t;try{var i=e.$exception_list;if(this.uc(i)){if(this.hc(i))return this.dc("Exception dropped: matched a suppression rule"),void oY.info("Skipping exception capture because a suppression rule matched");if(!this.ac&&this.vc(i))return this.dc("Exception dropped: thrown by a browser extension"),void oY.info("Skipping exception capture because it was thrown by an extension");if(!this.ac&&this.cc(i))return this.dc("Exception dropped: thrown by an injected browser script"),void oY.info("Skipping exception capture because it was thrown by an injected browser script");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.fc(i))return this.dc("Exception dropped: thrown by the PostHog SDK"),void oY.info("Skipping exception capture because it was thrown by the PostHog SDK")}var s=this.nc.enabled&&U(e.$exception_steps)?this.gc(e):e,r="string"==typeof(t=globalThis._posthogReleaseId)&&t.length>0?t:void 0;r&&(s.$release_id=r);try{var n=this._instance.capture("$exception",s,{_noTruncate:!0,_batchKey:"exceptionEvent",gu:!0});return n&&this.oc.clear(),n}catch(e){return oJ(e)||oY.error("Failed to capture exception event. Dropping this exception.",e),void this.oc.clear()}}catch(e){return void(oJ(e)||oY.error("Failed to process exception event. Ignoring this exception.",e))}}gc(e){try{var t=this.oc.getAttachable();return 0===t.length?e:x({},e,{$exception_steps:t})}catch(t){return oY.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}dc(e){this.nc.enabled&&this.oc.add({[tB]:e,[tz]:(new Date).toISOString()})}lc(e){return j(e)?x({},e):{}}sc(){var e,t;return null!=(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)?e:{}}hc(e){if(0===e.length)return!1;try{var t=e.reduce((e,t)=>{var i=t.type,s=t.value;return z(i)&&i.length>0&&e.$exception_types.push(i),z(s)&&s.length>0&&e.$exception_values.push(s),e},{$exception_types:[],$exception_values:[]});return this.ic.some(e=>{var i=e.values.map(e=>{var i=aF[e.operator],s=t[e.key];if(!i||!s)return!1;var r=L(e.value)?e.value:[e.value];return r.length>0&&i(r,s)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}catch(e){return oY.warn("Failed to evaluate suppression rules. Capturing the exception.",e),!1}}vc(e){var t=e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}),i=t.filter(e=>{var t=e.filename;return!!t&&oZ.some(e=>t.startsWith(e))});return 0!==i.length&&(!i.every(e=>{var t=e.filename;return!!t&&t.startsWith(oQ)})||e.some(e=>{var t=e.value;return z(t)&&t.includes("isolatedAPI.contexts.topHostname")})&&!t.some(e=>{var t=e.filename;return e.in_app&&!(null!=t&&t.startsWith(oQ))}))}cc(e){return e.some(e=>{var t=e.value;return z(t)&&oX.some(e=>t.includes(e))})}fc(e){if(e.length>0){var t,i,s,r,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],a=n[n.length-1];return null!=(s=null==a||null==(r=a.filename)?void 0:r.includes("posthog.com/static"))&&s}return!1}uc(e){return!U(e)&&L(e)}}},li,{siteApps:class{constructor(e){this._c=0,this._instance=e,this.wc=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}kc(e,t){if(t){var i=this.globalsForEvent(t);this.wc.push(i),this.wc.length>1e3&&(this.wc=this.wc.slice(10))}}get siteAppLoaders(){var e;return null==(e=m._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.kc.bind(this));this.Sc=()=>{e(),this.wc=[],this.Sc=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,a,o,l={},u=this._instance.get_property("$groups")||[];for(var h of Object.entries(this._instance.get_property("$stored_group_properties")||{})){var c=h[0];l[c]={id:u[c],type:c,properties:h[1]}}var d=e.$set_once,v=e.$set;return{event:x({},k(e,oS),{properties:x({},e.properties,v?{$set:x({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},v)}:{},d?{$set_once:x({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},d)}:{}),elements_chain:null!=(n=null==(a=e.properties)?void 0:a.$elements_chain)?n:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}xc(e){var t,i=null==(t=e.tagName)?void 0:t.toLowerCase();return"style"===i&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(oP.error("prepare_external_dependency_stylesheet returned null"),null):"script"===i&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(oP.error("prepare_external_dependency_script returned null"),null):e}Cc(){if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var e,t,i,s,r,n,a,o,l=null==u?void 0:u.defaultView,h=null==l||null==(e=l.Node)?void 0:e.prototype;if(!l||!h)return()=>{};if(this._c++,this.Tc)return this.Mc();var c=[],d=this,v=new WeakSet,p=(e,t,i)=>{if(null!=e&&e[t]){var s=e[t];e[t]=i(s),c.push(()=>{e[t]=s})}},g=e=>{if(v.has(e))return e;var t=d.xc(e);return t&&v.add(t),t},f=e=>e.map(e=>"string"==typeof e?e:g(e)).filter(e=>!V(e));return p(h,"appendChild",e=>function(t){var i=g(t);return i?e.call(this,i):t}),p(h,"insertBefore",e=>function(t,i){var s=g(t);return s?e.call(this,s,i):t}),p(h,"replaceChild",e=>function(t,i){var s=g(t);return s?e.call(this,s,i):i}),[null==(t=l.Element)?void 0:t.prototype,null==(i=l.Document)?void 0:i.prototype,null==(s=l.DocumentFragment)?void 0:s.prototype].forEach(e=>{p(e,"append",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))}),p(e,"prepend",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))})}),[null==(r=l.Element)?void 0:r.prototype,null==(n=l.CharacterData)?void 0:n.prototype,null==(a=l.DocumentType)?void 0:a.prototype].forEach(e=>{p(e,"before",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))}),p(e,"after",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))}),p(e,"replaceWith",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];var r=f(i);return i.length&&!r.length?void 0:e.apply(this,r)})}),p(null==(o=l.Element)?void 0:o.prototype,"insertAdjacentElement",e=>function(t,i){var s=g(i);return s?e.call(this,t,s):null}),this.Tc=()=>{c.forEach(e=>e()),this.Tc=void 0},this.Mc()}Mc(){var e=!1;return()=>{var t;e||(e=!0,this._c--,0===this._c&&(null==(t=this.Tc)||t.call(this)))}}Ic(e,t){void 0===t&&(t=!0);var i=this.Cc();try{var s=e(i);return t&&i(),s}catch(e){throw i(),e}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.wc.length&&(oP.info("Processing "+this.wc.length+" events for site app with id "+e.id),this.wc.forEach(e=>this.Ic(()=>null==t.processEvent?void 0:t.processEvent(e))),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.Sc)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,oP.info("Site app with id "+e.id+" "+(r?"loaded":"errored")),s&&i()};try{var n=this.Ic(t=>e.init({posthog:this._instance,callback(e){t(),r(e)}}),!1).processEvent;n&&(t.processEvent=n),s=!0}catch(t){oP.error(oF+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){oP.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}Ec(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}Rc(e){var t=this;if(0!==Object.keys(this.apps).length){var i=this.globalsForEvent(e),s=function(s){try{t.Ic(()=>null==s.processEvent?void 0:s.processEvent(i))}catch(t){oP.error("Error while processing event "+e.event+" for site app "+s.id,t)}};for(var r of Object.values(this.apps))s(r)}}onRemoteConfig(e){var t,i,s,r=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.Ec(),void this._instance.on("eventCaptured",e=>this.Rc(e))):void oP.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.Sc)||i.call(this),e.ok){var n=e.config;if(null!=(s=n.siteApps)&&s.length)if(this.isEnabled)for(var a of n.siteApps)!function(){var e,t=a.id,i=a.url;m["__$$ph_site_app_"+t]=r._instance,null==(e=m.__PosthogExtensions__)||null==e.loadSiteApp||e.loadSiteApp(r._instance,i,e=>{if(e)return oP.error(oF+t,e)})}();else oP.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}},ls,{tracingHeaders:class{constructor(e){this.Pc=void 0,this.Ac=void 0,this.Fc=void 0,this.Gv=()=>{var e,t,i=this.Oc();i?(B(this.Pc)&&(this.Pc=null==(e=m.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)?void 0:e._patchXHR(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),B(this.Ac)&&(this.Ac=null==(t=m.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)?void 0:t._patchFetch(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.Xv()},this._instance=e}initialize(){this.startIfEnabledOrStop()}Ys(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.tracingHeadersPatchFns?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return oh.error("failed to load script",t);e()})}Lc(){var e,t;return null!=(e=null!=(t=this._instance.config.tracing_headers)?t:this._instance.config.addTracingHeaders)?e:this._instance.config.__add_tracing_headers}Oc(){var e=this.Lc();return L(e)?(L(this.Fc)?this.Fc.splice(0,this.Fc.length,...e):this.Fc=[...e],e.length>0?this.Fc:void 0):(L(this.Fc)&&this.Fc.splice(0),this.Fc=e||void 0,this.Fc)}Xv(){var e,t;null==(e=this.Pc)||e.call(this),null==(t=this.Ac)||t.call(this),this.Pc=void 0,this.Ac=void 0}startIfEnabledOrStop(){this.Oc()?this.Ys(this.Gv):this.Xv()}}},{toolbar:class{constructor(e){this.instance=e}Dc(e){m.ph_toolbar_state=e}$c(){var e;return null!=(e=m.ph_toolbar_state)?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),sD(this.instance.config)||!a||!u)return!1;e=null!=e?e:a.location,i=null!=i?i:a.history;try{if(!t){try{a.localStorage.setItem("test","test"),a.localStorage.removeItem("test")}catch(e){return!1}t=null==a?void 0:a.localStorage}var s,r=oN||r1(e.hash,"__posthog")||r1(e.hash,"state"),n=r?s$(()=>JSON.parse(atob(decodeURIComponent(r))))||s$(()=>JSON.parse(decodeURIComponent(r))):null;return n&&"ph_authorize"===n.action?((s=n).source="url",s&&Object.keys(s).length>0&&(n.desiredHash?e.hash=n.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(oj)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch(e){return!1}}Nc(e){var t=m.ph_load_toolbar||m.ph_load_editor;!U(t)&&N(t)?t(e,this.instance):oq.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==u||!u.getElementById(ri));if(!a||i)return!1;var s="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,r=x({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},s?{instrument:!1}:{});return(a.localStorage.setItem(oj,JSON.stringify(x({},r,{source:void 0}))),2===this.$c())?this.Nc(r):0===this.$c()&&(this.Dc(1),null==(t=m.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(oq.error("[Toolbar] Failed to load",e),this.Dc(0)):(this.Dc(2),this.Nc(r))}),sM(a,"turbolinks:load",()=>{this.Dc(0),this.loadToolbar(r)})),!0}qc(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}},lr,{conversations:class{constructor(e){this.jc=void 0,this._conversationsManager=null,this.Bc=!1,this.zt=null,this.Hc=!1,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations&&(this.zc=e.ok,e.ok)){var t=e.config.conversations;U(t)||(K(t)?this.jc=t:(this.jc=t.enabled,this.zt=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.jc=void 0,this.zt=null,this.zc=void 0,this.Hc=!1}loadIfEnabled(){if(!(this._conversationsManager||this.Bc||this._instance.config.disable_conversations||sD(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==m?void 0:m.__PosthogExtensions__;if(e&&!B(this.jc)&&this.jc)if(this.zt&&this.zt.token){this.Bc=!0;try{var t=e.initConversations;if(t)return this.Uc(t),void(this.Bc=!1);var i=e.loadExternalDependency;if(!i)return void this.Wc(sg);i(this._instance,"conversations",t=>{t||!e.initConversations?this.Wc("Could not load conversations script",t):this.Uc(e.initConversations),this.Bc=!1})}catch(e){this.Wc("Error initializing conversations",e),this.Bc=!1}}else o3.error("Conversations enabled but missing token in remote config.")}}Uc(e){if(this.zt)try{this._conversationsManager=e(this.zt,this._instance),this.Hc=!1,o3.info("Conversations loaded successfully")}catch(e){this.Wc("Error completing conversations initialization",e)}else o3.error("Cannot complete initialization: remote config is null")}Wc(e,t){o3.error(e,t),this._conversationsManager=null,this.Bc=!1,this.Hc=!0}show(){this._conversationsManager?this._conversationsManager.show():o3.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.jc&&!V(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?"disabled_by_config":sD(this._instance.config)?"disabled_for_toolbar":this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?"consent_opted_out":!1===this.zc?"remote_config_failed":B(this.jc)?this.zc?"disabled_in_project":"remote_config_pending":this.jc?U(this.zt)||!this.zt.token?"missing_token":null!=m&&m.__PosthogExtensions__?this.Bc?"initializing":this.Hc?"load_failed":"not_loaded":"extensions_unavailable":"disabled_in_project"}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var s=this;return w(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(e,t,i):(o3.warn(o5),null)})()}getMessages(e,t){var i=this;return w(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(o3.warn(o5),null)})()}markAsRead(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(o3.warn(o5),null)})()}getTickets(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(o3.warn(o5),null)})()}requestRestoreLink(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(o3.warn(o5),null)})()}restoreFromToken(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(o3.warn(o5),null)})()}restoreFromUrlToken(){var e=this;return w(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(o3.warn(o5),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}Cu(){var e;null==(e=this._conversationsManager)||e.setIdentity()}Tu(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},{logs:class{constructor(e){var t,i=this;this.name="logs",this.Vc=!1,this.Gc=!1,this.Zc=!1,this.A=id("[logs]"),this.Qc=x({},this.A,{error(){for(var e=arguments.length,t=Array(e),s=0;e>s;s++)t[s]=arguments[s];t.some(le)||i.A.error(...t)}}),this.ba=[],this.Jc=[],this._d=0,this.Os=!1,this.Kc=[],this.Yc=[],this.Xc=!1,this.tf=!1,this.ef=()=>{var e,t;this.Os||(this._d=0,null==(e=this.if)||e.onReconnect(),null==(t=this.rf)||t.onReconnect())},this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.Vc=!0),a&&sM(a,"online",this.ef)}nf(e,t,i,s){var r,n=o6(null==(r=this._instance)||null==(r=r.config)?void 0:r.logs,i);return[new ir(this.sf(e,t),n,this.Qc,()=>this.af(),e=>e(),void 0,s),n]}lf(){var e,t=null==(e=this._instance)||null==(e=e.config)?void 0:e.logs;if(!this.if||this.uf!==t){null==(i=this.if)||i.reset(),this.uf=t;var i,s=this.nf(()=>this.ba,e=>{this.ba=e});this.if=s[0],this.hf=s[1]}return this.if}df(){var e,t=null==(e=this._instance)||null==(e=e.config)?void 0:e.logs;if(!this.rf||this.vf!==t){null==(i=this.rf)||i.reset(),this.vf=t;var i,s=this.nf(()=>this.Jc,e=>{this.Jc=e},{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},o4);this.rf=s[0],this.cf=s[1]}return this.rf}setup(e){var t;if(!this.Os){this.Ns=e,null!=(t=this._instance)&&null!=(t=t.config)&&null!=(t=t.logs)&&t.captureConsoleLogs&&(this.Vc=!0),(this.Vc||this.ff()&&this.pf())&&this.gf();var i=!1,s=e.onRemoteConfig(e=>{var t;i=e.ok&&!0===(null==(t=e.config.logs)?void 0:t.captureConsoleLogs),this.onRemoteConfig(e)});this.Os?s.dispose():(this.qs=s,i||this.loadIfEnabled())}}dispose(){var e,t,i,s;this.Os||(this.Os=!0,this.mf(),null==(e=this.qs)||e.dispose(),this.qs=void 0,this.Ns=void 0,this.Zc=!1,null==a||a.removeEventListener("online",this.ef),null==(t=this.yf)||t.call(this),this.yf=void 0,null==(i=this.if)||i.reset(),null==(s=this.rf)||s.reset())}onRemoteConfig(e){var t,i;if(!this.Os){var s=e.ok?null==(t=e.config.logs)?void 0:t.captureConsoleLogs:void 0;U(s)?this.bf():(null==(i=this._instance)||null==(i=i.persistence)||i.register({[iM]:!!s}),s?(this.Vc=!0,this.Gc||this.gf(),this.loadIfEnabled()):this.bf())}}reset(){var e,t,i,s;this.mf(),null==(e=this.if)||e.clearQueue(),this.ba=[],null==(t=this.if)||t.reset(),null==(i=this.rf)||i.clearQueue(),this.Jc=[],null==(s=this.rf)||s.reset(),this._d=0}captureLog(e){this.Os||this.lf().captureLog(e)}captureConsoleLog(e){this.Os||this.df().captureLog(e)}captureBufferedConsoleLog(e,t,i){this.Os||this.df().captureLog(e,{context:t,occurredAtMs:i})}pf(){var e;return!(null==(e=this._instance)||null==(e=e.persistence)||null==(e=e.props)||!e[iM])}ff(){var e,t;return null==(e=this._instance)||null==e.pa||!e.pa()||!(null==(t=m._POSTHOG_REMOTE_CONFIG)||null==(t=t[this._instance.config.token])||!t.config)}Iu(){var e;this.mf(),null==(e=this.rf)||e.clearQueue(),this.Jc=[]}bf(){this.Vc||this.mf()}gf(){var e,t=this;if(!this.Xc&&null!=m&&m.console){var i=o6(null==(e=this._instance)||null==(e=e.config)?void 0:e.logs).maxBufferSize,s=function(e){var s;try{s=(e=>{for(;null!=(t=e)&&t.__rrweb_original__;){var t;e=e.__rrweb_original__}return e})(m.console[e])}catch(e){return 0}if(!s)return 0;t.Yc.push(ou(m.console,e,r=>{var n=function(){for(var s=arguments.length,n=Array(s),a=0;s>a;a++)n[a]=arguments[a];try{t._f(e,n,i)}catch(e){}return r.apply(m.console,n)};return n.__rrweb_original__=s,n}))};for(var r of o8)s(r);this.Xc=!0,this.wf=setTimeout(()=>{this.mf()},3e4)}}_f(e,t,i){var s;if(this.Xc&&!this.tf&&0!==t.length)if(null!=(s=this._instance)&&s.is_capturing()){if(i>this.Kc.length){this.tf=!0;try{this.Kc.push({level:e,args:t,occurredAtMs:Date.now(),context:this.af()})}finally{this.tf=!1}}}else this.mf()}mf(){if(this.Kc=[],this.Xc){for(var e of(this.Xc=!1,this.wf&&(clearTimeout(this.wf),this.wf=void 0),this.Yc))e();this.Yc=[]}}kf(){var e=this.Kc;return this.mf(),e}get logger(){return this.Sf||(this.Sf={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.Sf}flushLogs(e){e?this.xf(e):(this.if&&this.if.flush().catch(e=>this.Cf(e)),this.rf&&this.rf.flush().catch(e=>this.Cf(e)))}Cf(e){le(e)||this.A.error("PostHog logs flush failed:",e)}loadIfEnabled(){if(!this.Os&&this.Vc&&!this.Gc&&!this.Zc){var e=null==m?void 0:m.__PosthogExtensions__;if(!e)return this.A.error("PostHog Extensions not found."),void this.mf();var t=e.loadExternalDependency;if(!t)return this.A.error(sg),void this.mf();this.Zc=!0;try{t(this._instance,"logs",t=>{if(this.Zc=!1,!this.Os&&this.Vc){var i=e.logs;if(t||null==i||!i.initializeLogs)this.A.error("Could not load logs script",t),this.mf();else{var s,r,n=this.kf();this.yf=i.initializeLogs(null!=(s=this.Ns)?s:this._instance),this.Gc=!0,n.length>0&&(null==i.replayConsoleBuffer||i.replayConsoleBuffer(null!=(r=this.Ns)?r:this._instance,n))}}})}catch(e){throw this.Zc=!1,e}}}sf(e,t){var i=this._instance;return{get isDisabled(){return!1},get optedOut(){return!i.is_capturing()},getPersistedProperty:t=>t===O.LogsQueue?e():void 0,setPersistedProperty(e,i){e===O.LogsQueue&&t(null!=i?i:[])},hs:e=>this.hs(e),getLibraryId:()=>y.LIB_NAME,getLibraryVersion:()=>y.LIB_VERSION}}hs(e){return new Promise(t=>{if(r2(this._d,3))t({kind:"fatal",error:o7(void 0,"logs endpoint is unreachable, dropping batch")});else{var i=!1,s=e=>{i||(i=!0,clearTimeout(r),t(e))},r=setTimeout(()=>{this.A.warn("Logs request timed out before receiving a response"),s({kind:"retry-later",error:o7(void 0,"logs request timed out")})},9e4);this._instance._send_request({method:"POST",url:this.Tf(),data:e,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:e=>{var t,i=e.statusCode;(this.Mf(i),i>=200&&300>i)?s({kind:"ok"}):413===i?s({kind:"too-large"}):0!==i&&408!==i&&429!==i&&500>i?s({kind:"fatal",error:Error("logs request failed with status "+i)}):0===i?(e.error||this.A.warn("Logs request failed before receiving an HTTP response"),s({kind:"retry-later",error:o7(e.error,"logs request failed before receiving an HTTP response")})):s({kind:"retry-later",error:null!=(t=e.error)?t:Error("logs request failed with status "+i)})}})}})}Mf(e){(0!==e||this._instance.__loaded)&&(this._d=r3(e,this._d,3,()=>this.A.warn("Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes.")))}xf(e){this.ba.length>0&&this.If(e,this.ba,this.hf,y.LIB_NAME,e=>{this.ba=e}),this.Jc.length>0&&this.If(e,this.Jc,this.cf,o4,e=>{this.Jc=e})}If(e,t,i,s,r){if(0!==t.length){var n=t.map(e=>e.record);r([]);var a=is(n,t7(i,y.LIB_NAME,y.LIB_VERSION),s,y.LIB_VERSION);this._instance._send_request({method:"POST",url:this.Tf(),data:a,compression:"best-available",batchKey:"logs",transport:e})}}Tf(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}af(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var i=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),s=i.windowId,r=i.sessionStartTimestamp,n=i.lastActivityTimestamp;t.sessionId=i.sessionId,t.windowId=s,U(r)||(t.sessionStartTimestamp=r),U(n)||(t.lastActivityTimestamp=n)}if(null!=m&&null!=(e=m.location)&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?tg(m.location.href):m.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(t.activeFeatureFlags=a)}return t}}},{metrics:class{constructor(e){this.A=id("[metrics]"),this._instance=e}initialize(){}lf(){var e,t,i,s,r,n,a,o,l=null==(a=this._instance)||null==(a=a.config)?void 0:a.metrics;return this.if&&this.uf===l||(null==(o=this.if)||o.reset(),this.uf=l,this.if=new iu(this.sf(),{serviceName:null!=(e=null==(n=null==l?void 0:l.resourceAttributes)?void 0:n["service.name"])?e:null==l?void 0:l.serviceName,serviceVersion:null!=(t=null==n?void 0:n["service.version"])?t:null==l?void 0:l.serviceVersion,environment:null!=(i=null==n?void 0:n["deployment.environment"])?i:null==l?void 0:l.environment,resourceAttributes:n,beforeSend:null==l?void 0:l.beforeSend,flushIntervalMs:null!=(s=null==l?void 0:l.flushIntervalMs)?s:1e4,maxSeriesPerFlush:null!=(r=null==l?void 0:l.maxSeriesPerFlush)?r:1e3},this.A)),this.if}count(e,t,i){void 0===t&&(t=1),this.lf().count(e,t,i)}gauge(e,t,i){this.lf().gauge(e,t,i)}histogram(e,t,i){this.lf().histogram(e,t,i)}flush(e){if(!this.if)return Promise.resolve();if(e){var t=this.if.drainWindow();return t&&this.Ms(t,e),Promise.resolve()}return this.if.flush().catch(e=>this.A.error("PostHog metrics flush failed:",e))}reset(){var e;null==(e=this.if)||e.reset()}sf(){var e=this._instance,t=this;return{get isDisabled(){return!1},get optedOut(){return!e.is_capturing()},Ms:e=>t.Ms(e),getLibraryId:()=>y.LIB_NAME,getLibraryVersion:()=>y.LIB_VERSION}}Ms(e,t){return new Promise(i=>{var s=!1,r=e=>{s||(s=!0,clearTimeout(n),i(e))},n=setTimeout(()=>r({kind:"retry-later",error:Error("metrics request timed out")}),9e4);this._instance._send_request(x({method:"POST",url:this.Ef(),data:e,compression:"best-available",batchKey:"metrics"},t&&{transport:t},{fireCallbackOnDrop:!0,callback(e){var t,i=e.statusCode;i>=200&&300>i?r({kind:"ok"}):413===i?r({kind:"too-large"}):0!==i&&408!==i&&429!==i&&500>i?r({kind:"fatal",error:Error("metrics request failed with status "+i)}):r({kind:"retry-later",error:null!=(t=e.error)?t:Error("metrics request failed with status "+i)})}}))})}Ef(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}});a7.__defaultExtensionClasses=x({},ln);var la=(y.SDK_DIST_CHANNEL="npm",n=aG[a3]=new a7,function(){function e(){e.done||(e.done=!0,a5=!1,sI(aG,function(e){e._dom_loaded()}))}null!=u&&u.addEventListener?"complete"===u.readyState?e():sM(u,"DOMContentLoaded",e,{capture:!1}):a&&ic.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),n)}}]);
|