decocms 4.358.13 → 4.359.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C2peZxpT.js → AlertCircle-DduYJGdo.js} +1 -1
- package/dist/client/assets/{AreaChart-DvLPC2Vn.js → AreaChart-BNgtLhCM.js} +1 -1
- package/dist/client/assets/{ArrowLeft-XoE591DG.js → ArrowLeft-BDb6VF38.js} +1 -1
- package/dist/client/assets/{ArrowRight-Du6uxsYm.js → ArrowRight-B-nb4oPk.js} +1 -1
- package/dist/client/assets/{ArrowUp-DVW9xAC3.js → ArrowUp-B__iy6Fj.js} +1 -1
- package/dist/client/assets/{Check-BWdX7vLc.js → Check-B5lVPL6o.js} +1 -1
- package/dist/client/assets/{CheckCircle-DX0OYipq.js → CheckCircle-D54empHS.js} +1 -1
- package/dist/client/assets/{ChevronRight-otMe0h2L.js → ChevronRight-Co21vyUi.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BngZxX5N.js → ChevronSelectorVertical-onJ5MuTS.js} +1 -1
- package/dist/client/assets/{ChevronUp-C1t8jP2H.js → ChevronUp-BZmhC_ut.js} +1 -1
- package/dist/client/assets/{Copy01-BNWSUZpJ.js → Copy01-Dd9yHt8W.js} +1 -1
- package/dist/client/assets/{CreditCard01-hO0ARoOv.js → CreditCard01-B4ntajzv.js} +1 -1
- package/dist/client/assets/{DotsVertical-DBd910Jd.js → DotsVertical-B3XbuR6Q.js} +1 -1
- package/dist/client/assets/{Download01-ii_27Oqs.js → Download01-BIwFZy2F.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DUThj0uw.js → ErrorBarContext-Diaglh2T.js} +1 -1
- package/dist/client/assets/{Eye-DM4W948-.js → Eye-BY-tlWQP.js} +1 -1
- package/dist/client/assets/{GitBranch01-DFfaJudb.js → GitBranch01-GJgAdUE2.js} +1 -1
- package/dist/client/assets/{Globe01-DJinjr0K.js → Globe01-BM5f0eMl.js} +1 -1
- package/dist/client/assets/{HardDrive-7CGW3Svr.js → HardDrive-C09ZNCNu.js} +1 -1
- package/dist/client/assets/{Image01-BFsuKz8u.js → Image01-Nr-BPrDe.js} +1 -1
- package/dist/client/assets/{Key01-DYgX-zjz.js → Key01-BYKZVeKx.js} +1 -1
- package/dist/client/assets/{Link01-W5bpilNW.js → Link01-fL4IN5J0.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BQnsj9e7.js → LinkExternal01-Bn3pF-OY.js} +1 -1
- package/dist/client/assets/{Monitor01-BXpUWmd8.js → Monitor01-hSb-k6Sy.js} +1 -1
- package/dist/client/assets/{Package-gwlbAgrX.js → Package-CCPUzuLY.js} +1 -1
- package/dist/client/assets/{Palette-P-W-5zvK.js → Palette-CfV5uJAy.js} +1 -1
- package/dist/client/assets/{Play-BO8wGHIc.js → Play-fdlvf2Ai.js} +1 -1
- package/dist/client/assets/{Plus-CHkkXjVu.js → Plus-C1n1EJGk.js} +1 -1
- package/dist/client/assets/{SearchLg-C6Yv69Ek.js → SearchLg-C4ztZgQg.js} +1 -1
- package/dist/client/assets/{SearchMd-CnW4IRbA.js → SearchMd-BMTTKRwS.js} +1 -1
- package/dist/client/assets/{Sector-D24t1-cm.js → Sector-gZNrQ64x.js} +1 -1
- package/dist/client/assets/{Settings02-DtzBUrc7.js → Settings02-jcMzc9y6.js} +1 -1
- package/dist/client/assets/{Share07-56AGCzYO.js → Share07-hcK0gsO8.js} +1 -1
- package/dist/client/assets/{Shield01-DSVh_tJn.js → Shield01-ByHZek-z.js} +1 -1
- package/dist/client/assets/{Stars01-Dh3lvp5C.js → Stars01-VqAaX40x.js} +1 -1
- package/dist/client/assets/{Sun-Blejd0cH.js → Sun-BEQKf5uQ.js} +1 -1
- package/dist/client/assets/{Tool01-Ba4Axnhd.js → Tool01-D9GFw-ss.js} +1 -1
- package/dist/client/assets/{Tool02-yBA-17XM.js → Tool02-D7Ja0MCt.js} +1 -1
- package/dist/client/assets/{Trash01-BtvJ44UA.js → Trash01-D59l9os_.js} +1 -1
- package/dist/client/assets/{TrendUp01-Dwekyagd.js → TrendUp01-D0XD8Af4.js} +1 -1
- package/dist/client/assets/{Upload01-C9LgNltE.js → Upload01-C_92E7G-.js} +1 -1
- package/dist/client/assets/{User01-qIrIR3Qe.js → User01-CPeYX-Nh.js} +1 -1
- package/dist/client/assets/{UserSquare-Afg3axyH.js → UserSquare-D2uSbUmd.js} +1 -1
- package/dist/client/assets/{Users01-B1xDo1NH.js → Users01-CH2saVzV.js} +1 -1
- package/dist/client/assets/{Users03-CUo6PI7L.js → Users03-CUM69_io.js} +1 -1
- package/dist/client/assets/{XCircle-BMf3k1GY.js → XCircle-DS-9ZVRt.js} +1 -1
- package/dist/client/assets/{XClose-DlWziGJ8.js → XClose-BBzEhqrJ.js} +1 -1
- package/dist/client/assets/{Zap-DiPV7cgo.js → Zap-1a5YG1h0.js} +1 -1
- package/dist/client/assets/{ZoomOut-BipNNYvO.js → ZoomOut-S5PMK2Tp.js} +1 -1
- package/dist/client/assets/{access-gate-C5aSHXVL.js → access-gate-FFsHdHxV.js} +1 -1
- package/dist/client/assets/{agent-icon-DFSdwFAE.js → agent-icon-DciI1Qtd.js} +1 -1
- package/dist/client/assets/{agents-list-BHfAkhe8.js → agents-list-DeOijGV7.js} +1 -1
- package/dist/client/assets/{ai-providers-Br6X1lG8.js → ai-providers-BkCPbynQ.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dl4i4sNL.js → alert-dialog-D-SBvq6F.js} +1 -1
- package/dist/client/assets/{alert-Dd3thVEN.js → alert-nEyjpIHG.js} +1 -1
- package/dist/client/assets/{analytics-tab-C11qmRRj.js → analytics-tab-CfjXZEF7.js} +1 -1
- package/dist/client/assets/{api-keys-WWYtSFRZ.js → api-keys-8Qr0yjWz.js} +1 -1
- package/dist/client/assets/api-keys-ZU0HMP57.js +1 -0
- package/dist/client/assets/{app-editor-BUxq5qLp.js → app-editor-Cb_Z_GER.js} +1 -1
- package/dist/client/assets/{auth-catchall-pX7F8bIm.js → auth-catchall-M-hUihn7.js} +1 -1
- package/dist/client/assets/{auth-entry-ym-SwAnl.js → auth-entry-E08CbiNE.js} +1 -1
- package/dist/client/assets/{auth-split-layout-HdJyFxtk.js → auth-split-layout-Q0gVQp31.js} +1 -1
- package/dist/client/assets/{auth-lnkWRDLo.js → auth-u3VcsxzZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Bxg0D2pE.js → authenticate-and-persist-oauth-Dgf6bQjD.js} +1 -1
- package/dist/client/assets/{automation-list-row-B2I6Moyo.js → automation-list-row-BqtIeR7z.js} +1 -1
- package/dist/client/assets/{automation-runs-G2_F3Ewu.js → automation-runs-DB3VqoaI.js} +1 -1
- package/dist/client/assets/{automations-D0grW8VA.js → automations-BJB7qcua.js} +1 -1
- package/dist/client/assets/{autosend-D1KQkcRc.js → autosend-C9OBp9VP.js} +1 -1
- package/dist/client/assets/{avatar-DluoiWbT.js → avatar-a8kJqnY-.js} +1 -1
- package/dist/client/assets/{badge-B2jLDYrw.js → badge-BwAb3yp8.js} +1 -1
- package/dist/client/assets/{block-document-DEWDvC5y.js → block-document-BNk8CtK7.js} +1 -1
- package/dist/client/assets/{breadcrumb-qd2HXqQG.js → breadcrumb-CAW77Nh_.js} +1 -1
- package/dist/client/assets/{buckets-C5S-cCDS.js → buckets-_9BM1FM8.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D1vZe3gf.js → bulk-category-panel-y84FIruG.js} +1 -1
- package/dist/client/assets/{capability-load-error-8YuGo6zv.js → capability-load-error-CeH-MNFY.js} +1 -1
- package/dist/client/assets/{cards-5LrJjhsm.js → cards-BTT2IfO8.js} +1 -1
- package/dist/client/assets/{category-editor--V_tmJMY.js → category-editor-4dUFg5Gm.js} +1 -1
- package/dist/client/assets/{cdn-tab-d3jmSmzc.js → cdn-tab-CNbDOCmB.js} +1 -1
- package/dist/client/assets/{chart-CiORo7Hg.js → chart-BsXTSoE9.js} +1 -1
- package/dist/client/assets/{chat-context-zgLp3VGO.js → chat-context-BPG_NYqx.js} +1 -1
- package/dist/client/assets/{checkbox-B_0P3SnS.js → checkbox-DgF2n3KA.js} +1 -1
- package/dist/client/assets/{choose-editor-ChREMMjn.js → choose-editor-Byq4r-Ol.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cg3eF5XS.js → cli-auth-success-sMSpq5U1.js} +1 -1
- package/dist/client/assets/{client-icons-C7OC9hB8.js → client-icons-DgiuODAB.js} +1 -1
- package/dist/client/assets/{collection-detail-BQWmua4U.js → collection-detail-C_iM161A.js} +1 -1
- package/dist/client/assets/{collection-display-button-CMroFxwa.js → collection-display-button-pETjhDGI.js} +1 -1
- package/dist/client/assets/{collection-search-BPq0d2O8.js → collection-search-DVEkPVdg.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Csi3o-dK.js → collection-table-wrapper-JTnmrDJN.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dp9FqZ6o.js → collection-tabs-BUA3Ldxz.js} +1 -1
- package/dist/client/assets/{command-Btt5YLdw.js → command-DU0G_nVQ.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-eLPK7gBv.js → commerce-onboarding-Bfwq6BPF.js} +1 -1
- package/dist/client/assets/{connect-Dm7Ay1u3.js → connect-DPR0aZz0.js} +1 -1
- package/dist/client/assets/{connect-layout-D0wm5zoS.js → connect-layout-COMVdZFE.js} +1 -1
- package/dist/client/assets/{connection-VmomcsPx.js → connection-BdE0gYbI.js} +1 -1
- package/dist/client/assets/{connection-card-U7MqDxB4.js → connection-card-Y-zoUfZ8.js} +1 -1
- package/dist/client/assets/{connection-detail-Dt6eCAYi.js → connection-detail-Eb8ETQnE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Dz7DFh6Z.js → connection-form-helpers-D_krTmkJ.js} +1 -1
- package/dist/client/assets/{connections-KoDf0dYU.js → connections-CPjMhB9t.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-OOA4n3rZ.js → create-organization-dialog-DwO7c2Zm.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-SNqef3x6.js → decopilot-sse-pool-PYFgqCvv.js} +1 -1
- package/dist/client/assets/{dialog-DuDScMhK.js → dialog-DSXE-h2y.js} +1 -1
- package/dist/client/assets/{domain-settings-D15ISC-a.js → domain-settings-DQTlbc8g.js} +1 -1
- package/dist/client/assets/{drawer-k235Fscu.js → drawer-CmnH-XNP.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C3j0F4Z-.js → dropdown-menu-SfABXz9g.js} +1 -1
- package/dist/client/assets/{e2e-tab-DimUyqhu.js → e2e-tab-uK04somg.js} +1 -1
- package/dist/client/assets/{editor-CJrJEUO0.js → editor-He8deRsD.js} +1 -1
- package/dist/client/assets/{empty-state-C8h3RfjY.js → empty-state-B2PCkqyQ.js} +1 -1
- package/dist/client/assets/{empty-state-LyiUmY7q.js → empty-state-Dr8-vgIO.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DfBQnubl.js → extract-connection-data-BoqkyeXG.js} +1 -1
- package/dist/client/assets/{file-explorer-Uf5ZYWqQ.js → file-explorer-CWI-XjzT.js} +1 -1
- package/dist/client/assets/{file-type-icon-BhHvQPrs.js → file-type-icon-DDh4Ghiw.js} +1 -1
- package/dist/client/assets/{folder-icon-7odf_OtT.js → folder-icon-CnBXJT63.js} +1 -1
- package/dist/client/assets/{form-Dcp_nsUZ.js → form-Di5iBpkH.js} +1 -1
- package/dist/client/assets/{general-BJm00vUX.js → general-8jjZEI2b.js} +1 -1
- package/dist/client/assets/{github-icon-DMDP-ZSG.js → github-icon-CPt7rYQG.js} +1 -1
- package/dist/client/assets/{hooks-DX9VKmA1.js → hooks-DtXLHIJC.js} +1 -1
- package/dist/client/assets/{index-Dd7F2bh8.js → index-4NvhUqZI.js} +1 -1
- package/dist/client/assets/{index-CZxSjm4V.js → index-70jgYSui.js} +1 -1
- package/dist/client/assets/{index-Cn4zTh5n.js → index-B6RQSOMu.js} +1 -1
- package/dist/client/assets/{index-BvbRFAyr.js → index-BPXWnTeZ.js} +1 -1
- package/dist/client/assets/{index-DInKCNrU.js → index-BrWYInHD.js} +2 -2
- package/dist/client/assets/{index-Dwkla_4C.js → index-C344fJP9.js} +1 -1
- package/dist/client/assets/index-CUtBHKQc.js +1 -0
- package/dist/client/assets/{index-ELPKNDE7.js → index-D3iQ6MuP.js} +1 -1
- package/dist/client/assets/{index-DwEmH7Ty.js → index-DupPF7RG.js} +1 -1
- package/dist/client/assets/{index-CJo6t9Oa.js → index-mlfPUJla.js} +6 -6
- package/dist/client/assets/{index-DOm9HPLB.js → index-nNjwrhFZ.js} +1 -1
- package/dist/client/assets/{index-redirect-CwTub-SD.js → index-redirect-6SD1wYgJ.js} +1 -1
- package/dist/client/assets/{index-sn-CyHS_.js → index-yG_rF3Ap.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-9n0yW5aK.js → infiniteQueryObserver-B9IjMVrY.js} +1 -1
- package/dist/client/assets/{infra-billing-D-nEGPZD.js → infra-billing-JwfnbrOK.js} +1 -1
- package/dist/client/assets/{input-BrXILa8m.js → input-BRw9riSG.js} +1 -1
- package/dist/client/assets/{integration-icon-Cj6fKYRW.js → integration-icon-CBe_wvki.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DNdubZpU.js → invite-member-dialog-CLv4j2x9.js} +1 -1
- package/dist/client/assets/{label-D-7ujTe8.js → label-vv_5bGyv.js} +1 -1
- package/dist/client/assets/{layout-DtrhlaJL.js → layout-C8MLChrq.js} +1 -1
- package/dist/client/assets/{login-DDebIxrX.js → login-DThL_TB1.js} +1 -1
- package/dist/client/assets/{markdown-CBvIeoNz.js → markdown-Df_voRJJ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-B26Sci18.js → mcp-app-renderer-BrQISIA5.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BPZqiE76.js → mcp-oauth-D-nBsRip.js} +1 -1
- package/dist/client/assets/{members-Ewp6dFBp.js → members-B6Da0_XH.js} +1 -1
- package/dist/client/assets/{monaco-editor-9_XRptB9.js → monaco-editor-XR4rCTW7.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BWjVy2go.js → monitoring-stats-row-DDgl7T63.js} +1 -1
- package/dist/client/assets/{multi-select-CDiiGfXC.js → multi-select-BFR6ETlp.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bn4cTIrc.js → oauth-callback-Cdl6a3fc.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DbNTXYrS.js → oauth-callback-ai-provider-NGk1tliS.js} +1 -1
- package/dist/client/assets/{onboarding-BAs2eTQe.js → onboarding-BpdtEr8Y.js} +1 -1
- package/dist/client/assets/{org-layout-DC9Z5oBD.js → org-layout-DsOBEnRI.js} +1 -1
- package/dist/client/assets/{organization-choice-zenYl6dq.js → organization-choice-BytoPv3L.js} +1 -1
- package/dist/client/assets/{orgs-BQeEuasg.js → orgs-Bc7cviFT.js} +1 -1
- package/dist/client/assets/{page-seo-form-ByMwLgW_.js → page-seo-form-D-KEDQxp.js} +1 -1
- package/dist/client/assets/{popover-BUmF8ZKi.js → popover-DMR3SZYA.js} +1 -1
- package/dist/client/assets/{post-calendar-CKZEG41j.js → post-calendar-q_RAvnv6.js} +1 -1
- package/dist/client/assets/{post-editor-BcdpN9np.js → post-editor-BQkgbX-f.js} +1 -1
- package/dist/client/assets/{primitives-Dpxdbv5-.js → primitives-3i2MNWyW.js} +1 -1
- package/dist/client/assets/{profile-B09IwER_.js → profile-DxG4hQYY.js} +1 -1
- package/dist/client/assets/{project-app-view-D7G1A3OU.js → project-app-view-BmM-KFqr.js} +1 -1
- package/dist/client/assets/{project-icon-CNCL0Rvv.js → project-icon-BFr62Msp.js} +1 -1
- package/dist/client/assets/{prompts-rYzLA5AP.js → prompts-BjXOxB2F.js} +1 -1
- package/dist/client/assets/record-editor-DTph8Qk_.js +1 -0
- package/dist/client/assets/redirect-editor-Lx2p7SqO.js +1 -0
- package/dist/client/assets/registry-DoA-OSMR.js +2 -0
- package/dist/client/assets/{registry-layout-DKHB0_M4.js → registry-layout-C_hgnQzQ.js} +1 -1
- package/dist/client/assets/{reports-CtRVjjRq.js → reports-DUNvh4Uw.js} +1 -1
- package/dist/client/assets/{repositories-KlgC1WKl.js → repositories-D9N9np8u.js} +1 -1
- package/dist/client/assets/{repository-import-picker-WviFOvaK.js → repository-import-picker-aidXkhAJ.js} +1 -1
- package/dist/client/assets/{repository-picker-CpGAWv83.js → repository-picker-DhBKFS48.js} +1 -1
- package/dist/client/assets/{require-capability-DxrWCF6p.js → require-capability-C1an8wtJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-B_6Uu4q4.js → required-auth-layout-DGgwbTE4.js} +1 -1
- package/dist/client/assets/{reset-password-Bg8z4YMN.js → reset-password-BeHE8ix4.js} +1 -1
- package/dist/client/assets/{review-settings-Ysbk5DNV.js → review-settings-C22MhmAY.js} +1 -1
- package/dist/client/assets/{roles-BYrpVwlA.js → roles-DfBbbYbO.js} +1 -1
- package/dist/client/assets/{schema-CSY6N0ZL.js → schema-CH8BYUlc.js} +1 -1
- package/dist/client/assets/{scroll-area-BMWth9Xn.js → scroll-area-CwaLlV1z.js} +1 -1
- package/dist/client/assets/{search-input-DhYVjyTG.js → search-input-BMFL9Xg4.js} +1 -1
- package/dist/client/assets/{secrets-CNuI8mQc.js → secrets-DP4W-ebq.js} +1 -1
- package/dist/client/assets/{sections-editor-LthK6YAF.js → sections-editor-Dof4Lw4F.js} +1 -1
- package/dist/client/assets/{select-BPCcAdbc.js → select-DkWnnEiO.js} +1 -1
- package/dist/client/assets/{select-model-DdNGksM7.js → select-model-BmnqEs9E.js} +1 -1
- package/dist/client/assets/{self-tool-result-B5IJ1iD2.js → self-tool-result-D0_ChGac.js} +1 -1
- package/dist/client/assets/{seo-editor-4n8_9mQF.js → seo-editor-CusrT3NB.js} +1 -1
- package/dist/client/assets/settings-layout-DzRA8o4K.js +1 -0
- package/dist/client/assets/{settings-sidebar-Bo_rsbyl.js → settings-sidebar-ecmNiFCZ.js} +1 -1
- package/dist/client/assets/{shell-controls-NW1Eslvz.js → shell-controls-BJpt9syQ.js} +1 -1
- package/dist/client/assets/{shell-layout-BMfOJ_z2.js → shell-layout-3CCNsj8M.js} +1 -1
- package/dist/client/assets/{skill-preview-BAroESjn.js → skill-preview-CuUdFGeG.js} +1 -1
- package/dist/client/assets/{skills-BgYs55wx.js → skills-HsZiQOMl.js} +1 -1
- package/dist/client/assets/{sso-CQtwbTcC.js → sso-CFDMnkjP.js} +1 -1
- package/dist/client/assets/{store-KyClNptr.js → store-DCh9NiaD.js} +1 -1
- package/dist/client/assets/store-registry-CVkvF3V2.js +2 -0
- package/dist/client/assets/{switch-CRuhuu6I.js → switch-9DG-qtNx.js} +1 -1
- package/dist/client/assets/{synced-repos-BnswYvFZ.js → synced-repos-DnORiccP.js} +1 -1
- package/dist/client/assets/{table-C51eOY5F.js → table-BGmvzdS5.js} +1 -1
- package/dist/client/assets/{tabs-DAHAaQa1.js → tabs-DFMWFVFX.js} +1 -1
- package/dist/client/assets/{task-board-CXkAW9Cb.js → task-board-0y7gdVcL.js} +1 -1
- package/dist/client/assets/{task-route-RK4qxZjX.js → task-route-DxgRf2L7.js} +1 -1
- package/dist/client/assets/{tasks-Co018oQ_.js → tasks-DVK74C5k.js} +1 -1
- package/dist/client/assets/{textarea-CacGhBnj.js → textarea-C38U8HrI.js} +1 -1
- package/dist/client/assets/{thread-intent-Cg3lEeRc.js → thread-intent-DHsjjSxl.js} +1 -1
- package/dist/client/assets/thread-route-DGNN4htb.js +1 -0
- package/dist/client/assets/{toggle-group-DZpx88qZ.js → toggle-group-CJE9fjdH.js} +1 -1
- package/dist/client/assets/toolbar-BE_Jm52P.js +1 -0
- package/dist/client/assets/{toolbar-icon-button-TUIBd-PY.js → toolbar-icon-button-Bt1YTIDq.js} +1 -1
- package/dist/client/assets/{track-ANFN_uei.js → track-DlMFXhPt.js} +1 -1
- package/dist/client/assets/{types-Cc8sZuaO.js → types-rvKHwKH9.js} +1 -1
- package/dist/client/assets/{use-ai-providers-SDTRf44P.js → use-ai-providers-C1pBjqCO.js} +1 -1
- package/dist/client/assets/{use-automations-u7vGrWw0.js → use-automations-CdgLepCw.js} +1 -1
- package/dist/client/assets/{use-autosave-DW1anlq7.js → use-autosave-C2tiJrPM.js} +1 -1
- package/dist/client/assets/{use-connection-CKcN-w99.js → use-connection-DNNdwAip.js} +1 -1
- package/dist/client/assets/{use-copy-CsABisS_.js → use-copy-B3hpnz-w.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D07ziFeD.js → use-create-virtual-mcp-CUdJyCns.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Dur297df.js → use-date-fns-locale-lJum_BtL.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-u-7jRdMV.js → use-debounced-autosave-5DBe08Or.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B8Eo8mnj.js → use-debounced-value-D9lBb84w.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Bkbtbykk.js → use-decopilot-events-CU8Oth_C.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C5axJ7Z9.js → use-delete-connection-B4A22cPK.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CQkyPZsR.js → use-deployment-admin-Dv_pjnw2.js} +1 -1
- package/dist/client/assets/{use-destination-route-DMaxzsHW.js → use-destination-route-gsir5rs_.js} +1 -1
- package/dist/client/assets/{use-file-configs-LNdaFYTZ.js → use-file-configs-BNbs86un.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CE1SvpYw.js → use-infinite-scroll-CI5RUX8K.js} +1 -1
- package/dist/client/assets/{use-join-requests-Cu-K3wDs.js → use-join-requests-FwzoMhhJ.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BOmRZNBX.js → use-mcp-auth-status-DqsaOcTu.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CiFgg44p.js → use-mcp-client-iGjtlLph.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B8AsQpy5.js → use-mcp-prompts-CkmNWPL7.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-RMSiYCg2.js → use-mcp-tools-CdhI5bXo.js} +1 -1
- package/dist/client/assets/{use-members-PUKYx0yA.js → use-members-OnGVaG4I.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D18e7030.js → use-navigate-to-agent-DEXN5rsq.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-neT246tq.js → use-org-auth-client-DWpXTLFE.js} +1 -1
- package/dist/client/assets/{use-org-notice-D6EM9MeM.js → use-org-notice-DeLc1K4W.js} +1 -1
- package/dist/client/assets/{use-org-sso-DvsOLE0c.js → use-org-sso-4g9ArPPB.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BN9wweKo.js → use-organization-roles-By_B3iFH.js} +1 -1
- package/dist/client/assets/{use-organization-settings-J5ddog8G.js → use-organization-settings-CgAKCOQi.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-D3l0LEOd.js → use-panel-navigate-C_EftDCi.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BxAYs80R.js → use-registry-connections-CeJdETFf.js} +1 -1
- package/dist/client/assets/{use-secrets-DlSWEArP.js → use-secrets-C_VIxUH4.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DI905g_h.js → use-section-preview-base-B_mwNj5l.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CzNgacN0.js → use-status-sounds-BnKcskNU.js} +1 -1
- package/dist/client/assets/{use-tags-DJrxTKrF.js → use-tags-DB5bJnt_.js} +1 -1
- package/dist/client/assets/{use-view-mode-DkTDG0BG.js → use-view-mode-B9OchqHr.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B6xYy2tn.js → use-virtual-mcp-TEyIDz6Q.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-oMf3sWAZ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BTAtvgnh.js +1 -0
- package/dist/client/assets/{users-BaA8uQ6H.js → users-C3OuYJnL.js} +1 -1
- package/dist/client/assets/{variant-calendar-awd9k2lp.js → variant-calendar-CJ0kWXYl.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-QMwqlb-v.js → view-mode-toggle-BC37ixLf.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +721 -669
- package/dist/server/server.js +489 -437
- package/package.json +1 -1
- package/dist/client/assets/api-keys-KwxqFNTz.js +0 -1
- package/dist/client/assets/index-COPb8jAD.js +0 -1
- package/dist/client/assets/record-editor-apFBnlua.js +0 -1
- package/dist/client/assets/redirect-editor-ChE0Vped.js +0 -1
- package/dist/client/assets/registry-7W5qAL96.js +0 -2
- package/dist/client/assets/settings-layout---Yi_SOe.js +0 -1
- package/dist/client/assets/store-registry-DkOfFcHr.js +0 -2
- package/dist/client/assets/thread-route-_-j2-glj.js +0 -1
- package/dist/client/assets/toolbar-B8Q8eV6S.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CN5wImAp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BGvUO2nU.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-DThL_TB1.js","assets/auth-entry-E08CbiNE.js","assets/input-BRw9riSG.js","assets/use-is-desktop-app-BNujXJc_.js","assets/retry-CErkP7V6.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/auth-split-layout-Q0gVQp31.js","assets/cli-auth-success-sMSpq5U1.js","assets/reset-password-BeHE8ix4.js","assets/oauth-callback-Cdl6a3fc.js","assets/mcp-oauth-D-nBsRip.js","assets/auth-u3VcsxzZ.js","assets/layout-C8MLChrq.js","assets/required-auth-layout-DGgwbTE4.js","assets/use-deployment-admin-Dv_pjnw2.js","assets/users-C3OuYJnL.js","assets/collection-table-wrapper-JTnmrDJN.js","assets/table-BGmvzdS5.js","assets/ArrowUp-B__iy6Fj.js","assets/empty-state-B2PCkqyQ.js","assets/search-input-BMFL9Xg4.js","assets/SearchMd-BMTTKRwS.js","assets/avatar-a8kJqnY-.js","assets/User01-CPeYX-Nh.js","assets/badge-BwAb3yp8.js","assets/use-debounced-value-D9lBb84w.js","assets/admin-fetch-CCSvjTk1.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/get-initials-D-f_fDFw.js","assets/orgs-Bc7cviFT.js","assets/label-vv_5bGyv.js","assets/dialog-DSXE-h2y.js","assets/select-DkWnnEiO.js","assets/Check-B5lVPL6o.js","assets/ChevronUp-BZmhC_ut.js","assets/switch-9DG-qtNx.js","assets/textarea-C38U8HrI.js","assets/schema-CH8BYUlc.js","assets/site-slug-uya6Wp4-.js","assets/prompts-BjXOxB2F.js","assets/shell-layout-3CCNsj8M.js","assets/Users03-CUM69_io.js","assets/SearchLg-C4ztZgQg.js","assets/agent-icon-DciI1Qtd.js","assets/AlertCircle-DduYJGdo.js","assets/Tool01-D9GFw-ss.js","assets/ArrowLeft-BDb6VF38.js","assets/Tool02-D7Ja0MCt.js","assets/ArrowRight-B-nb4oPk.js","assets/TrendUp01-D0XD8Af4.js","assets/ZoomOut-S5PMK2Tp.js","assets/CheckCircle-D54empHS.js","assets/ChevronRight-Co21vyUi.js","assets/ChevronSelectorVertical-onJ5MuTS.js","assets/DotsVertical-B3XbuR6Q.js","assets/UserSquare-D2uSbUmd.js","assets/Copy01-Dd9yHt8W.js","assets/CreditCard01-B4ntajzv.js","assets/Download01-BIwFZy2F.js","assets/Settings02-jcMzc9y6.js","assets/Eye-BY-tlWQP.js","assets/Share07-hcK0gsO8.js","assets/GitBranch01-GJgAdUE2.js","assets/Globe01-BM5f0eMl.js","assets/XClose-BBzEhqrJ.js","assets/HardDrive-C09ZNCNu.js","assets/Image01-Nr-BPrDe.js","assets/Key01-BYKZVeKx.js","assets/Link01-fL4IN5J0.js","assets/LinkExternal01-Bn3pF-OY.js","assets/Monitor01-hSb-k6Sy.js","assets/Sun-BEQKf5uQ.js","assets/Package-CCPUzuLY.js","assets/Palette-CfV5uJAy.js","assets/Play-fdlvf2Ai.js","assets/Plus-C1n1EJGk.js","assets/Shield01-ByHZek-z.js","assets/Stars01-VqAaX40x.js","assets/Trash01-D59l9os_.js","assets/Upload01-C_92E7G-.js","assets/Users01-CH2saVzV.js","assets/XCircle-DS-9ZVRt.js","assets/Zap-1a5YG1h0.js","assets/thread-route-DGNN4htb.js","assets/use-destination-route-gsir5rs_.js","assets/use-mcp-client-iGjtlLph.js","assets/anchors-yqDzZN4K.js","assets/project-icon-BFr62Msp.js","assets/use-virtual-mcp-TEyIDz6Q.js","assets/github-repo-CTPv5ZM2.js","assets/source-system-tabs-CnEGUb4r.js","assets/use-panel-navigate-C_EftDCi.js","assets/command-DU0G_nVQ.js","assets/index-yG_rF3Ap.js","assets/integration-icon-CBe_wvki.js","assets/hooks-DtXLHIJC.js","assets/decopilot-sse-pool-PYFgqCvv.js","assets/task-board-0y7gdVcL.js","assets/autosend-C9OBp9VP.js","assets/use-organization-settings-CgAKCOQi.js","assets/use-org-sso-4g9ArPPB.js","assets/use-org-notice-DeLc1K4W.js","assets/shell-layout-CuFt8bor.css","assets/onboarding-BpdtEr8Y.js","assets/organization-choice-BytoPv3L.js","assets/commerce-onboarding-Bfwq6BPF.js","assets/self-tool-result-D0_ChGac.js","assets/extract-connection-data-BoqkyeXG.js","assets/metadata-dUsYcpuu.js","assets/connection-BdE0gYbI.js","assets/provision-repo-scoped-github-connection-WQFARyHG.js","assets/form-Di5iBpkH.js","assets/authenticate-and-persist-oauth-Dgf6bQjD.js","assets/track-DlMFXhPt.js","assets/create-organization-dialog-DwO7c2Zm.js","assets/alert-dialog-D-SBvq6F.js","assets/dropdown-menu-SfABXz9g.js","assets/site-error--i37Vnuw.js","assets/choose-editor-Byq4r-Ol.js","assets/reports-DUNvh4Uw.js","assets/reports-DH10I8_D.css","assets/org-layout-DsOBEnRI.js","assets/index-CUtBHKQc.js","assets/settings-sidebar-ecmNiFCZ.js","assets/toolbar-icon-button-Bt1YTIDq.js","assets/drawer-CmnH-XNP.js","assets/popover-DMR3SZYA.js","assets/use-join-requests-FwzoMhhJ.js","assets/invite-member-dialog-CLv4j2x9.js","assets/use-org-auth-client-DWpXTLFE.js","assets/use-organization-roles-By_B3iFH.js","assets/task-route-DxgRf2L7.js","assets/collection-search-DVEkPVdg.js","assets/connection-card-Y-zoUfZ8.js","assets/use-registry-connections-CeJdETFf.js","assets/use-connection-DNNdwAip.js","assets/useInfiniteQuery-oMf3sWAZ.js","assets/infiniteQueryObserver-B9IjMVrY.js","assets/connection-slug-CITJ0kGN.js","assets/slugify-CEUa2lfQ.js","assets/connection-form-helpers-D_krTmkJ.js","assets/collection-tabs-BUA3Ldxz.js","assets/use-infinite-scroll-CI5RUX8K.js","assets/useSuspenseInfiniteQuery-BTAtvgnh.js","assets/use-ai-providers-C1pBjqCO.js","assets/use-file-configs-BNbs86un.js","assets/use-decopilot-events-CU8Oth_C.js","assets/github-icon-CPt7rYQG.js","assets/scroll-area-CwaLlV1z.js","assets/use-navigate-to-agent-DEXN5rsq.js","assets/thread-intent-DHsjjSxl.js","assets/index-4NvhUqZI.js","assets/connect-layout-COMVdZFE.js","assets/chat-context-BPG_NYqx.js","assets/location-oTTXFrSF.js","assets/toolbar-BE_Jm52P.js","assets/shell-controls-BJpt9syQ.js","assets/index-mlfPUJla.js","assets/automation-runs-DB3VqoaI.js","assets/use-members-OnGVaG4I.js","assets/use-automations-CdgLepCw.js","assets/use-copy-B3hpnz-w.js","assets/markdown-Df_voRJJ.js","assets/monaco-editor-XR4rCTW7.js","assets/editor-He8deRsD.js","assets/mcp-app-renderer-BrQISIA5.js","assets/types-rvKHwKH9.js","assets/use-mcp-prompts-CkmNWPL7.js","assets/file-type-icon-DDh4Ghiw.js","assets/tabs-DFMWFVFX.js","assets/toggle-group-CJE9fjdH.js","assets/select-model-BmnqEs9E.js","assets/checkbox-DgF2n3KA.js","assets/ai-providers-logos-DD3qZ33J.js","assets/folder-icon-CnBXJT63.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-BnKcskNU.js","assets/use-mcp-tools-CdhI5bXo.js","assets/skill-preview-CuUdFGeG.js","assets/use-date-fns-locale-lJum_BtL.js","assets/use-debounced-autosave-5DBe08Or.js","assets/use-mcp-auth-status-DqsaOcTu.js","assets/breadcrumb-CAW77Nh_.js","assets/repository-import-picker-aidXkhAJ.js","assets/repository-picker-DhBKFS48.js","assets/use-secrets-C_VIxUH4.js","assets/client-icons-DgiuODAB.js","assets/use-tags-DB5bJnt_.js","assets/safe-image-url-D5z803Ot.js","assets/automation-list-row-BqtIeR7z.js","assets/cards-BTT2IfO8.js","assets/index-DDGTF8rc.css","assets/index-70jgYSui.js","assets/settings-layout-DzRA8o4K.js","assets/index-redirect-6SD1wYgJ.js","assets/capability-load-error-CeH-MNFY.js","assets/connections-CPjMhB9t.js","assets/collection-display-button-pETjhDGI.js","assets/view-mode-toggle-BC37ixLf.js","assets/use-delete-connection-B4A22cPK.js","assets/use-view-mode-B9OchqHr.js","assets/connection-detail-Eb8ETQnE.js","assets/index-DupPF7RG.js","assets/index-B6RQSOMu.js","assets/index-nNjwrhFZ.js","assets/index-D3iQ6MuP.js","assets/use-create-virtual-mcp-CUdJyCns.js","assets/monitoring-stats-row-DDgl7T63.js","assets/chart-BsXTSoE9.js","assets/AreaChart-BNgtLhCM.js","assets/ErrorBarContext-Diaglh2T.js","assets/Sector-gZNrQ64x.js","assets/collection-detail-C_iM161A.js","assets/alert-nEyjpIHG.js","assets/empty-state-Dr8-vgIO.js","assets/index-C344fJP9.js","assets/require-capability-C1an8wtJ.js","assets/access-gate-FFsHdHxV.js","assets/multi-select-BFR6ETlp.js","assets/general-8jjZEI2b.js","assets/review-settings-C22MhmAY.js","assets/domain-settings-DQTlbc8g.js","assets/connect-DPR0aZz0.js","assets/api-keys-8Qr0yjWz.js","assets/ai-providers-BkCPbynQ.js","assets/infra-billing-JwfnbrOK.js","assets/secrets-DP4W-ebq.js","assets/api-keys-ZU0HMP57.js","assets/buckets-_9BM1FM8.js","assets/repositories-D9N9np8u.js","assets/synced-repos-DnORiccP.js","assets/tasks-DVK74C5k.js","assets/members-B6Da0_XH.js","assets/role-color-Dn2tXDDF.js","assets/roles-DfBbbYbO.js","assets/sso-CFDMnkjP.js","assets/profile-DxG4hQYY.js","assets/store-DCh9NiaD.js","assets/registry-DoA-OSMR.js","assets/store-registry-CVkvF3V2.js","assets/agents-list-DeOijGV7.js","assets/automations-BJB7qcua.js","assets/skills-HsZiQOMl.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function Y6(e,t){for(var o=0;o<t.length;o++){const a=t[o];if(typeof a!="string"&&!Array.isArray(a)){for(const n in a)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(a,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>a[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function o(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=o(n);fetch(n.href,i)}})();const Z6="modulepreload",Q6=function(e){return"/"+e},Qk={},st=function(t,o,a){let n=Promise.resolve();if(o&&o.length>0){let l=function(m){return Promise.all(m.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=c?.nonce||c?.getAttribute("nonce");n=l(o.map(m=>{if(m=Q6(m),m in Qk)return;Qk[m]=!0;const h=m.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${p}`))return;const f=document.createElement("link");if(f.rel=h?"stylesheet":Z6,h||(f.as="script"),f.crossOrigin="",f.href=m,u&&f.setAttribute("nonce",u),document.head.appendChild(f),h)return new Promise((v,b)=>{f.addEventListener("load",v),f.addEventListener("error",()=>b(Error(`Unable to preload CSS for ${m}`)))})}))}function i(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return n.then(l=>{for(const c of l||[])c.status==="rejected"&&i(c.reason);return t().catch(i)})};var whe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aS={exports:{}},du={};var Jk;function J6(){if(Jk)return du;Jk=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,n,i){var l=null;if(i!==void 0&&(l=""+i),n.key!==void 0&&(l=""+n.key),"key"in n){i={};for(var c in n)c!=="key"&&(i[c]=n[c])}else i=n;return n=i.ref,{$$typeof:e,type:a,key:l,ref:n!==void 0?n:null,props:i}}return du.Fragment=t,du.jsx=o,du.jsxs=o,du}var Xk;function X6(){return Xk||(Xk=1,aS.exports=J6()),aS.exports}var T=X6(),nS={exports:{}},ct={};var eR;function ez(){if(eR)return ct;eR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),f=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=f&&I[f]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function w(I,G,$){this.props=I,this.context=G,this.refs=C,this.updater=$||b}w.prototype.isReactComponent={},w.prototype.setState=function(I,G){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,G,"setState")},w.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function _(){}_.prototype=w.prototype;function k(I,G,$){this.props=I,this.context=G,this.refs=C,this.updater=$||b}var x=k.prototype=new _;x.constructor=k,S(x,w.prototype),x.isPureReactComponent=!0;var E=Array.isArray;function A(){}var D={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function L(I,G,$){var N=$.ref;return{$$typeof:e,type:I,key:G,ref:N!==void 0?N:null,props:$}}function U(I,G){return L(I.type,G,I.props)}function F(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function q(I){var G={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function($){return G[$]})}var j=/\/+/g;function K(I,G){return typeof I=="object"&&I!==null&&I.key!=null?q(""+I.key):G.toString(36)}function ne(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(A,A):(I.status="pending",I.then(function(G){I.status==="pending"&&(I.status="fulfilled",I.value=G)},function(G){I.status==="pending"&&(I.status="rejected",I.reason=G)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function H(I,G,$,N,z){var J=typeof I;(J==="undefined"||J==="boolean")&&(I=null);var me=!1;if(I===null)me=!0;else switch(J){case"bigint":case"string":case"number":me=!0;break;case"object":switch(I.$$typeof){case e:case t:me=!0;break;case h:return me=I._init,H(me(I._payload),G,$,N,z)}}if(me)return z=z(I),me=N===""?"."+K(I,0):N,E(z)?($="",me!=null&&($=me.replace(j,"$&/")+"/"),H(z,G,$,"",function(je){return je})):z!=null&&(F(z)&&(z=U(z,$+(z.key==null||I&&I.key===z.key?"":(""+z.key).replace(j,"$&/")+"/")+me)),G.push(z)),1;me=0;var he=N===""?".":N+":";if(E(I))for(var _e=0;_e<I.length;_e++)N=I[_e],J=he+K(N,_e),me+=H(N,G,$,J,z);else if(_e=v(I),typeof _e=="function")for(I=_e.call(I),_e=0;!(N=I.next()).done;)N=N.value,J=he+K(N,_e++),me+=H(N,G,$,J,z);else if(J==="object"){if(typeof I.then=="function")return H(ne(I),G,$,N,z);throw G=String(I),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return me}function Z(I,G,$){if(I==null)return I;var N=[],z=0;return H(I,N,"","",function(J){return G.call($,J,z++)}),N}function te(I){if(I._status===-1){var G=I._result;G=G(),G.then(function($){(I._status===0||I._status===-1)&&(I._status=1,I._result=$)},function($){(I._status===0||I._status===-1)&&(I._status=2,I._result=$)}),I._status===-1&&(I._status=0,I._result=G)}if(I._status===1)return I._result.default;throw I._result}var le=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},Q={map:Z,forEach:function(I,G,$){Z(I,function(){G.apply(this,arguments)},$)},count:function(I){var G=0;return Z(I,function(){G++}),G},toArray:function(I){return Z(I,function(G){return G})||[]},only:function(I){if(!F(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return ct.Activity=p,ct.Children=Q,ct.Component=w,ct.Fragment=o,ct.Profiler=n,ct.PureComponent=k,ct.StrictMode=a,ct.Suspense=u,ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ct.__COMPILER_RUNTIME={__proto__:null,c:function(I){return D.H.useMemoCache(I)}},ct.cache=function(I){return function(){return I.apply(null,arguments)}},ct.cacheSignal=function(){return null},ct.cloneElement=function(I,G,$){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var N=S({},I.props),z=I.key;if(G!=null)for(J in G.key!==void 0&&(z=""+G.key),G)!O.call(G,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&G.ref===void 0||(N[J]=G[J]);var J=arguments.length-2;if(J===1)N.children=$;else if(1<J){for(var me=Array(J),he=0;he<J;he++)me[he]=arguments[he+2];N.children=me}return L(I.type,z,N)},ct.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:i,_context:I},I},ct.createElement=function(I,G,$){var N,z={},J=null;if(G!=null)for(N in G.key!==void 0&&(J=""+G.key),G)O.call(G,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(z[N]=G[N]);var me=arguments.length-2;if(me===1)z.children=$;else if(1<me){for(var he=Array(me),_e=0;_e<me;_e++)he[_e]=arguments[_e+2];z.children=he}if(I&&I.defaultProps)for(N in me=I.defaultProps,me)z[N]===void 0&&(z[N]=me[N]);return L(I,J,z)},ct.createRef=function(){return{current:null}},ct.forwardRef=function(I){return{$$typeof:c,render:I}},ct.isValidElement=F,ct.lazy=function(I){return{$$typeof:h,_payload:{_status:-1,_result:I},_init:te}},ct.memo=function(I,G){return{$$typeof:m,type:I,compare:G===void 0?null:G}},ct.startTransition=function(I){var G=D.T,$={};D.T=$;try{var N=I(),z=D.S;z!==null&&z($,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(A,le)}catch(J){le(J)}finally{G!==null&&$.types!==null&&(G.types=$.types),D.T=G}},ct.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ct.use=function(I){return D.H.use(I)},ct.useActionState=function(I,G,$){return D.H.useActionState(I,G,$)},ct.useCallback=function(I,G){return D.H.useCallback(I,G)},ct.useContext=function(I){return D.H.useContext(I)},ct.useDebugValue=function(){},ct.useDeferredValue=function(I,G){return D.H.useDeferredValue(I,G)},ct.useEffect=function(I,G){return D.H.useEffect(I,G)},ct.useEffectEvent=function(I){return D.H.useEffectEvent(I)},ct.useId=function(){return D.H.useId()},ct.useImperativeHandle=function(I,G,$){return D.H.useImperativeHandle(I,G,$)},ct.useInsertionEffect=function(I,G){return D.H.useInsertionEffect(I,G)},ct.useLayoutEffect=function(I,G){return D.H.useLayoutEffect(I,G)},ct.useMemo=function(I,G){return D.H.useMemo(I,G)},ct.useOptimistic=function(I,G){return D.H.useOptimistic(I,G)},ct.useReducer=function(I,G,$){return D.H.useReducer(I,G,$)},ct.useRef=function(I){return D.H.useRef(I)},ct.useState=function(I){return D.H.useState(I)},ct.useSyncExternalStore=function(I,G,$){return D.H.useSyncExternalStore(I,G,$)},ct.useTransition=function(){return D.H.useTransition()},ct.version="19.2.6",ct}var tR;function Ps(){return tR||(tR=1,nS.exports=ez()),nS.exports}var R=Ps();const X=Tl(R),n_=Y6({__proto__:null,default:X},[R]);var rS={exports:{}},uu={},iS={exports:{}},sS={};var oR;function tz(){return oR||(oR=1,(function(e){function t(H,Z){var te=H.length;H.push(Z);e:for(;0<te;){var le=te-1>>>1,Q=H[le];if(0<n(Q,Z))H[le]=Z,H[te]=Q,te=le;else break e}}function o(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var Z=H[0],te=H.pop();if(te!==Z){H[0]=te;e:for(var le=0,Q=H.length,I=Q>>>1;le<I;){var G=2*(le+1)-1,$=H[G],N=G+1,z=H[N];if(0>n($,te))N<Q&&0>n(z,$)?(H[le]=z,H[N]=te,le=N):(H[le]=$,H[G]=te,le=G);else if(N<Q&&0>n(z,te))H[le]=z,H[N]=te,le=N;else break e}}return Z}function n(H,Z){var te=H.sortIndex-Z.sortIndex;return te!==0?te:H.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var u=[],m=[],h=1,p=null,f=3,v=!1,b=!1,S=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function x(H){for(var Z=o(m);Z!==null;){if(Z.callback===null)a(m);else if(Z.startTime<=H)a(m),Z.sortIndex=Z.expirationTime,t(u,Z);else break;Z=o(m)}}function E(H){if(S=!1,x(H),!b)if(o(u)!==null)b=!0,A||(A=!0,q());else{var Z=o(m);Z!==null&&ne(E,Z.startTime-H)}}var A=!1,D=-1,O=5,L=-1;function U(){return C?!0:!(e.unstable_now()-L<O)}function F(){if(C=!1,A){var H=e.unstable_now();L=H;var Z=!0;try{e:{b=!1,S&&(S=!1,_(D),D=-1),v=!0;var te=f;try{t:{for(x(H),p=o(u);p!==null&&!(p.expirationTime>H&&U());){var le=p.callback;if(typeof le=="function"){p.callback=null,f=p.priorityLevel;var Q=le(p.expirationTime<=H);if(H=e.unstable_now(),typeof Q=="function"){p.callback=Q,x(H),Z=!0;break t}p===o(u)&&a(u),x(H)}else a(u);p=o(u)}if(p!==null)Z=!0;else{var I=o(m);I!==null&&ne(E,I.startTime-H),Z=!1}}break e}finally{p=null,f=te,v=!1}Z=void 0}}finally{Z?q():A=!1}}}var q;if(typeof k=="function")q=function(){k(F)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,K=j.port2;j.port1.onmessage=F,q=function(){K.postMessage(null)}}else q=function(){w(F,0)};function ne(H,Z){D=w(function(){H(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(H){switch(f){case 1:case 2:case 3:var Z=3;break;default:Z=f}var te=f;f=Z;try{return H()}finally{f=te}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(H,Z){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var te=f;f=H;try{return Z()}finally{f=te}},e.unstable_scheduleCallback=function(H,Z,te){var le=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?le+te:le):te=le,H){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=te+Q,H={id:h++,callback:Z,priorityLevel:H,startTime:te,expirationTime:Q,sortIndex:-1},te>le?(H.sortIndex=te,t(m,H),o(u)===null&&H===o(m)&&(S?(_(D),D=-1):S=!0,ne(E,te-le))):(H.sortIndex=Q,t(u,H),b||v||(b=!0,A||(A=!0,q()))),H},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(H){var Z=f;return function(){var te=f;f=Z;try{return H.apply(this,arguments)}finally{f=te}}}})(sS)),sS}var aR;function oz(){return aR||(aR=1,iS.exports=tz()),iS.exports}var lS={exports:{}},Ca={};var nR;function az(){if(nR)return Ca;nR=1;var e=Ps();function t(u){var m="https://react.dev/errors/"+u;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)m+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var a={d:{f:o,r:function(){throw Error(t(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},n=Symbol.for("react.portal");function i(u,m,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:n,key:p==null?null:""+p,children:u,containerInfo:m,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,m){if(u==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ca.createPortal=function(u,m){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return i(u,m,null,h)},Ca.flushSync=function(u){var m=l.T,h=a.p;try{if(l.T=null,a.p=2,u)return u()}finally{l.T=m,a.p=h,a.d.f()}},Ca.preconnect=function(u,m){typeof u=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(u,m))},Ca.prefetchDNS=function(u){typeof u=="string"&&a.d.D(u)},Ca.preinit=function(u,m){if(typeof u=="string"&&m&&typeof m.as=="string"){var h=m.as,p=c(h,m.crossOrigin),f=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;h==="style"?a.d.S(u,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:f,fetchPriority:v}):h==="script"&&a.d.X(u,{crossOrigin:p,integrity:f,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ca.preinitModule=function(u,m){if(typeof u=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var h=c(m.as,m.crossOrigin);a.d.M(u,{crossOrigin:h,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(u)},Ca.preload=function(u,m){if(typeof u=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var h=m.as,p=c(h,m.crossOrigin);a.d.L(u,h,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ca.preloadModule=function(u,m){if(typeof u=="string")if(m){var h=c(m.as,m.crossOrigin);a.d.m(u,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:h,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(u)},Ca.requestFormReset=function(u){a.d.r(u)},Ca.unstable_batchedUpdates=function(u,m){return u(m)},Ca.useFormState=function(u,m,h){return l.H.useFormState(u,m,h)},Ca.useFormStatus=function(){return l.H.useHostTransitionStatus()},Ca.version="19.2.6",Ca}var rR;function LM(){if(rR)return lS.exports;rR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lS.exports=az(),lS.exports}var iR;function nz(){if(iR)return uu;iR=1;var e=oz(),t=Ps(),o=LM();function a(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function i(r){var s=r,d=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(d=s.return),r=s.return;while(r)}return s.tag===3?d:null}function l(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function c(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function u(r){if(i(r)!==r)throw Error(a(188))}function m(r){var s=r.alternate;if(!s){if(s=i(r),s===null)throw Error(a(188));return s!==r?null:r}for(var d=r,g=s;;){var y=d.return;if(y===null)break;var P=y.alternate;if(P===null){if(g=y.return,g!==null){d=g;continue}break}if(y.child===P.child){for(P=y.child;P;){if(P===d)return u(y),r;if(P===g)return u(y),s;P=P.sibling}throw Error(a(188))}if(d.return!==g.return)d=y,g=P;else{for(var M=!1,B=y.child;B;){if(B===d){M=!0,d=y,g=P;break}if(B===g){M=!0,g=y,d=P;break}B=B.sibling}if(!M){for(B=P.child;B;){if(B===d){M=!0,d=P,g=y;break}if(B===g){M=!0,g=P,d=y;break}B=B.sibling}if(!M)throw Error(a(189))}}if(d.alternate!==g)throw Error(a(190))}if(d.tag!==3)throw Error(a(188));return d.stateNode.current===d?r:s}function h(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=h(r),s!==null)return s;r=r.sibling}return null}var p=Object.assign,f=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),k=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function q(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function K(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===j?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case S:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case E:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case b:return"Portal";case k:return r.displayName||"Context";case _:return(r._context.displayName||"Context")+".Consumer";case x:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case D:return s=r.displayName||null,s!==null?s:K(r.type)||"Memo";case O:s=r._payload,r=r._init;try{return K(r(s))}catch{}}return null}var ne=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},le=[],Q=-1;function I(r){return{current:r}}function G(r){0>Q||(r.current=le[Q],le[Q]=null,Q--)}function $(r,s){Q++,le[Q]=r.current,r.current=s}var N=I(null),z=I(null),J=I(null),me=I(null);function he(r,s){switch($(J,s),$(z,r),$(N,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?Sk(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=Sk(s),r=Tk(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}G(N),$(N,r)}function _e(){G(N),G(z),G(J)}function je(r){r.memoizedState!==null&&$(me,r);var s=N.current,d=Tk(s,r.type);s!==d&&($(z,r),$(N,d))}function Y(r){z.current===r&&(G(N),G(z)),me.current===r&&(G(me),iu._currentValue=te)}var ae,ve;function ie(r){if(ae===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||"",ve=-1<d.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+ae+r+ve}var Te=!1;function xe(r,s){if(!r||Te)return"";Te=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(s){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(fe){var pe=fe}Reflect.construct(r,[],we)}else{try{we.call()}catch(fe){pe=fe}r.call(we.prototype)}}else{try{throw Error()}catch(fe){pe=fe}(we=r())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(fe){if(fe&&pe&&typeof fe.stack=="string")return[fe.stack,pe.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=g.DetermineComponentFrameRoot(),M=P[0],B=P[1];if(M&&B){var ee=M.split(`
|
|
@@ -161,7 +161,7 @@ ou um por linha`,"common.inviteMemberDialog.errorFailedInvite":"Falha ao convida
|
|
|
161
161
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
162
162
|
|
|
163
163
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return R.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},hee="DialogDescriptionWarning",gee=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${FN(hee).contentName}}.`;return R.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},BN=_N,fee=PN,jN=EN,zN=kN,UN=RN,qN=DN,$N=MN,VN=LN;function vee(e){const t=Ne.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx(BN,{"data-slot":"sheet",...o}),t[2]=o,t[3]=a):a=t[3],a}function bee(e){const t=Ne.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx(jN,{"data-slot":"sheet-portal",...o}),t[2]=o,t[3]=a):a=t[3],a}function yee(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx(zN,{"data-slot":"sheet-overlay",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function See(e){const t=Ne.c(20);let o,a,n,i,l;t[0]!==e?({className:a,children:o,side:i,hideCloseButton:l,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i,t[5]=l):(o=t[1],a=t[2],n=t[3],i=t[4],l=t[5]);const c=i===void 0?"right":i,u=l===void 0?!1:l;let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=T.jsx(yee,{}),t[6]=m):m=t[6];const h=c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",p=c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",v=c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let b;t[7]!==a||t[8]!==h||t[9]!==p||t[10]!==f||t[11]!==v?(b=Dt("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",h,p,f,v,a),t[7]=a,t[8]=h,t[9]=p,t[10]=f,t[11]=v,t[12]=b):b=t[12];let S;t[13]!==u?(S=!u&&T.jsxs(VN,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[T.jsx(rN,{className:"size-4"}),T.jsx("span",{className:"sr-only",children:"Close"})]}),t[13]=u,t[14]=S):S=t[14];let C;return t[15]!==o||t[16]!==n||t[17]!==b||t[18]!==S?(C=T.jsxs(bee,{children:[m,T.jsxs(UN,{"data-slot":"sheet-content",className:b,...n,children:[o,S]})]}),t[15]=o,t[16]=n,t[17]=b,t[18]=S,t[19]=C):C=t[19],C}function Tee(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("flex flex-col gap-1.5 p-4",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{"data-slot":"sheet-header",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function wee(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("text-foreground font-semibold",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx(qN,{"data-slot":"sheet-title",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function _ee(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("text-muted-foreground text-sm",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx($N,{"data-slot":"sheet-description",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}const HN=["top","right","bottom","left"],uD=["start","end"],mD=HN.reduce((e,t)=>e.concat(t,t+"-"+uD[0],t+"-"+uD[1]),[]),ur=Math.min,Ea=Math.max,gf=Math.round,fg=Math.floor,Lr=e=>({x:e,y:e}),Cee={left:"right",right:"left",bottom:"top",top:"bottom"};function GT(e,t,o){return Ea(e,ur(t,o))}function mr(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function lr(e){return e.split("-")[1]}function X_(e){return e==="x"?"y":"x"}function eC(e){return e==="y"?"height":"width"}function sr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function tC(e){return X_(sr(e))}function GN(e,t,o){o===void 0&&(o=!1);const a=lr(e),n=tC(e),i=eC(n);let l=n==="x"?a===(o?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=vf(l)),[l,vf(l)]}function Pee(e){const t=vf(e);return[ff(e),t,ff(t)]}function ff(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const pD=["left","right"],hD=["right","left"],xee=["top","bottom"],Eee=["bottom","top"];function kee(e,t,o){switch(e){case"top":case"bottom":return o?t?hD:pD:t?pD:hD;case"left":case"right":return t?xee:Eee;default:return[]}}function Ree(e,t,o,a){const n=lr(e);let i=kee(_n(e),o==="start",a);return n&&(i=i.map(l=>l+"-"+n),t&&(i=i.concat(i.map(ff)))),i}function vf(e){const t=_n(e);return Cee[t]+e.slice(t.length)}function Aee(e){return{top:0,right:0,bottom:0,left:0,...e}}function oC(e){return typeof e!="number"?Aee(e):{top:e,right:e,bottom:e,left:e}}function nd(e){const{x:t,y:o,width:a,height:n}=e;return{width:a,height:n,top:o,left:t,right:t+a,bottom:o+n,x:t,y:o}}function gD(e,t,o){let{reference:a,floating:n}=e;const i=sr(t),l=tC(t),c=eC(l),u=_n(t),m=i==="y",h=a.x+a.width/2-n.width/2,p=a.y+a.height/2-n.height/2,f=a[c]/2-n[c]/2;let v;switch(u){case"top":v={x:h,y:a.y-n.height};break;case"bottom":v={x:h,y:a.y+a.height};break;case"right":v={x:a.x+a.width,y:p};break;case"left":v={x:a.x-n.width,y:p};break;default:v={x:a.x,y:a.y}}switch(lr(t)){case"start":v[l]-=f*(o&&m?-1:1);break;case"end":v[l]+=f*(o&&m?-1:1);break}return v}async function Dee(e,t){var o;t===void 0&&(t={});const{x:a,y:n,platform:i,rects:l,elements:c,strategy:u}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:f=!1,padding:v=0}=mr(t,e),b=oC(v),C=c[f?p==="floating"?"reference":"floating":p],w=nd(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(C)))==null||o?C:C.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:m,rootBoundary:h,strategy:u})),_=p==="floating"?{x:a,y:n,width:l.floating.width,height:l.floating.height}:l.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),x=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},E=nd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:k,strategy:u}):_);return{top:(w.top-E.top+b.top)/x.y,bottom:(E.bottom-w.bottom+b.bottom)/x.y,left:(w.left-E.left+b.left)/x.x,right:(E.right-w.right+b.right)/x.x}}const Oee=50,Mee=async(e,t,o)=>{const{placement:a="bottom",strategy:n="absolute",middleware:i=[],platform:l}=o,c=l.detectOverflow?l:{...l,detectOverflow:Dee},u=await(l.isRTL==null?void 0:l.isRTL(t));let m=await l.getElementRects({reference:e,floating:t,strategy:n}),{x:h,y:p}=gD(m,a,u),f=a,v=0;const b={};for(let S=0;S<i.length;S++){const C=i[S];if(!C)continue;const{name:w,fn:_}=C,{x:k,y:x,data:E,reset:A}=await _({x:h,y:p,initialPlacement:a,placement:f,strategy:n,middlewareData:b,rects:m,platform:c,elements:{reference:e,floating:t}});h=k??h,p=x??p,b[w]={...b[w],...E},A&&v<Oee&&(v++,typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(m=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:n}):A.rects),{x:h,y:p}=gD(m,f,u)),S=-1)}return{x:h,y:p,placement:f,strategy:n,middlewareData:b}},Iee=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:a,placement:n,rects:i,platform:l,elements:c,middlewareData:u}=t,{element:m,padding:h=0}=mr(e,t)||{};if(m==null)return{};const p=oC(h),f={x:o,y:a},v=tC(n),b=eC(v),S=await l.getDimensions(m),C=v==="y",w=C?"top":"left",_=C?"bottom":"right",k=C?"clientHeight":"clientWidth",x=i.reference[b]+i.reference[v]-f[v]-i.floating[b],E=f[v]-i.reference[v],A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(m));let D=A?A[k]:0;(!D||!await(l.isElement==null?void 0:l.isElement(A)))&&(D=c.floating[k]||i.floating[b]);const O=x/2-E/2,L=D/2-S[b]/2-1,U=ur(p[w],L),F=ur(p[_],L),q=U,j=D-S[b]-F,K=D/2-S[b]/2+O,ne=GT(q,K,j),H=!u.arrow&&lr(n)!=null&&K!==ne&&i.reference[b]/2-(K<q?U:F)-S[b]/2<0,Z=H?K<q?K-q:K-j:0;return{[v]:f[v]+Z,data:{[v]:ne,centerOffset:K-ne-Z,...H&&{alignmentOffset:Z}},reset:H}}});function Lee(e,t,o){return(e?[...o.filter(n=>lr(n)===e),...o.filter(n=>lr(n)!==e)]:o.filter(n=>_n(n)===n)).filter(n=>e?lr(n)===e||(t?ff(n)!==n:!1):!0)}const Nee=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,a,n;const{rects:i,middlewareData:l,placement:c,platform:u,elements:m}=t,{crossAxis:h=!1,alignment:p,allowedPlacements:f=mD,autoAlignment:v=!0,...b}=mr(e,t),S=p!==void 0||f===mD?Lee(p||null,v,f):f,C=await u.detectOverflow(t,b),w=((o=l.autoPlacement)==null?void 0:o.index)||0,_=S[w];if(_==null)return{};const k=GN(_,i,await(u.isRTL==null?void 0:u.isRTL(m.floating)));if(c!==_)return{reset:{placement:S[0]}};const x=[C[_n(_)],C[k[0]],C[k[1]]],E=[...((a=l.autoPlacement)==null?void 0:a.overflows)||[],{placement:_,overflows:x}],A=S[w+1];if(A)return{data:{index:w+1,overflows:E},reset:{placement:A}};const D=E.map(U=>{const F=lr(U.placement);return[U.placement,F&&h?U.overflows.slice(0,2).reduce((q,j)=>q+j,0):U.overflows[0],U.overflows]}).sort((U,F)=>U[1]-F[1]),L=((n=D.filter(U=>U[2].slice(0,lr(U[0])?2:3).every(F=>F<=0))[0])==null?void 0:n[0])||D[0][0];return L!==c?{data:{index:w+1,overflows:E},reset:{placement:L}}:{}}}},Fee=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,a;const{placement:n,middlewareData:i,rects:l,initialPlacement:c,platform:u,elements:m}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:S=!0,...C}=mr(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};const w=_n(n),_=sr(c),k=_n(c)===c,x=await(u.isRTL==null?void 0:u.isRTL(m.floating)),E=f||(k||!S?[vf(c)]:Pee(c)),A=b!=="none";!f&&A&&E.push(...Ree(c,S,b,x));const D=[c,...E],O=await u.detectOverflow(t,C),L=[];let U=((a=i.flip)==null?void 0:a.overflows)||[];if(h&&L.push(O[w]),p){const K=GN(n,l,x);L.push(O[K[0]],O[K[1]])}if(U=[...U,{placement:n,overflows:L}],!L.every(K=>K<=0)){var F,q;const K=(((F=i.flip)==null?void 0:F.index)||0)+1,ne=D[K];if(ne&&(!(p==="alignment"?_!==sr(ne):!1)||U.every(te=>sr(te.placement)===_?te.overflows[0]>0:!0)))return{data:{index:K,overflows:U},reset:{placement:ne}};let H=(q=U.filter(Z=>Z.overflows[0]<=0).sort((Z,te)=>Z.overflows[1]-te.overflows[1])[0])==null?void 0:q.placement;if(!H)switch(v){case"bestFit":{var j;const Z=(j=U.filter(te=>{if(A){const le=sr(te.placement);return le===_||le==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(le=>le>0).reduce((le,Q)=>le+Q,0)]).sort((te,le)=>te[1]-le[1])[0])==null?void 0:j[0];Z&&(H=Z);break}case"initialPlacement":H=c;break}if(n!==H)return{reset:{placement:H}}}return{}}}};function fD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vD(e){return HN.some(t=>e[t]>=0)}const Bee=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:a}=t,{strategy:n="referenceHidden",...i}=mr(e,t);switch(n){case"referenceHidden":{const l=await a.detectOverflow(t,{...i,elementContext:"reference"}),c=fD(l,o.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:vD(c)}}}case"escaped":{const l=await a.detectOverflow(t,{...i,altBoundary:!0}),c=fD(l,o.floating);return{data:{escapedOffsets:c,escaped:vD(c)}}}default:return{}}}}};function KN(e){const t=ur(...e.map(i=>i.left)),o=ur(...e.map(i=>i.top)),a=Ea(...e.map(i=>i.right)),n=Ea(...e.map(i=>i.bottom));return{x:t,y:o,width:a-t,height:n-o}}function jee(e){const t=e.slice().sort((n,i)=>n.y-i.y),o=[];let a=null;for(let n=0;n<t.length;n++){const i=t[n];!a||i.y-a.y>a.height/2?o.push([i]):o[o.length-1].push(i),a=i}return o.map(n=>nd(KN(n)))}const zee=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:a,rects:n,platform:i,strategy:l}=t,{padding:c=2,x:u,y:m}=mr(e,t),h=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(a.reference))||[]),p=jee(h),f=nd(KN(h)),v=oC(c);function b(){if(p.length===2&&p[0].left>p[1].right&&u!=null&&m!=null)return p.find(C=>u>C.left-v.left&&u<C.right+v.right&&m>C.top-v.top&&m<C.bottom+v.bottom)||f;if(p.length>=2){if(sr(o)==="y"){const U=p[0],F=p[p.length-1],q=_n(o)==="top",j=U.top,K=F.bottom,ne=q?U.left:F.left,H=q?U.right:F.right,Z=H-ne,te=K-j;return{top:j,bottom:K,left:ne,right:H,width:Z,height:te,x:ne,y:j}}const C=_n(o)==="left",w=Ea(...p.map(U=>U.right)),_=ur(...p.map(U=>U.left)),k=p.filter(U=>C?U.left===_:U.right===w),x=k[0].top,E=k[k.length-1].bottom,A=_,D=w,O=D-A,L=E-x;return{top:x,bottom:E,left:A,right:D,width:O,height:L,x:A,y:x}}return f}const S=await i.getElementRects({reference:{getBoundingClientRect:b},floating:a.floating,strategy:l});return n.reference.x!==S.reference.x||n.reference.y!==S.reference.y||n.reference.width!==S.reference.width||n.reference.height!==S.reference.height?{reset:{rects:S}}:{}}}},WN=new Set(["left","top"]);async function Uee(e,t){const{placement:o,platform:a,elements:n}=e,i=await(a.isRTL==null?void 0:a.isRTL(n.floating)),l=_n(o),c=lr(o),u=sr(o)==="y",m=WN.has(l)?-1:1,h=i&&u?-1:1,p=mr(t,e);let{mainAxis:f,crossAxis:v,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof b=="number"&&(v=c==="end"?b*-1:b),u?{x:v*h,y:f*m}:{x:f*m,y:v*h}}const qee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,a;const{x:n,y:i,placement:l,middlewareData:c}=t,u=await Uee(t,e);return l===((o=c.offset)==null?void 0:o.placement)&&(a=c.arrow)!=null&&a.alignmentOffset?{}:{x:n+u.x,y:i+u.y,data:{...u,placement:l}}}}},$ee=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:a,placement:n,platform:i}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:u={fn:w=>{let{x:_,y:k}=w;return{x:_,y:k}}},...m}=mr(e,t),h={x:o,y:a},p=await i.detectOverflow(t,m),f=sr(_n(n)),v=X_(f);let b=h[v],S=h[f];if(l){const w=v==="y"?"top":"left",_=v==="y"?"bottom":"right",k=b+p[w],x=b-p[_];b=GT(k,b,x)}if(c){const w=f==="y"?"top":"left",_=f==="y"?"bottom":"right",k=S+p[w],x=S-p[_];S=GT(k,S,x)}const C=u.fn({...t,[v]:b,[f]:S});return{...C,data:{x:C.x-o,y:C.y-a,enabled:{[v]:l,[f]:c}}}}}},Vee=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:a,placement:n,rects:i,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:m=!0}=mr(e,t),h={x:o,y:a},p=sr(n),f=X_(p);let v=h[f],b=h[p];const S=mr(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(u){const k=f==="y"?"height":"width",x=i.reference[f]-i.floating[k]+C.mainAxis,E=i.reference[f]+i.reference[k]-C.mainAxis;v<x?v=x:v>E&&(v=E)}if(m){var w,_;const k=f==="y"?"width":"height",x=WN.has(_n(n)),E=i.reference[p]-i.floating[k]+(x&&((w=l.offset)==null?void 0:w[p])||0)+(x?0:C.crossAxis),A=i.reference[p]+i.reference[k]+(x?0:((_=l.offset)==null?void 0:_[p])||0)-(x?C.crossAxis:0);b<E?b=E:b>A&&(b=A)}return{[f]:v,[p]:b}}}},Hee=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,a;const{placement:n,rects:i,platform:l,elements:c}=t,{apply:u=()=>{},...m}=mr(e,t),h=await l.detectOverflow(t,m),p=_n(n),f=lr(n),v=sr(n)==="y",{width:b,height:S}=i.floating;let C,w;p==="top"||p==="bottom"?(C=p,w=f===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(w=p,C=f==="end"?"top":"bottom");const _=S-h.top-h.bottom,k=b-h.left-h.right,x=ur(S-h[C],_),E=ur(b-h[w],k),A=!t.middlewareData.shift;let D=x,O=E;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(O=k),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(D=_),A&&!f){const U=Ea(h.left,0),F=Ea(h.right,0),q=Ea(h.top,0),j=Ea(h.bottom,0);v?O=b-2*(U!==0||F!==0?U+F:Ea(h.left,h.right)):D=S-2*(q!==0||j!==0?q+j:Ea(h.top,h.bottom))}await u({...t,availableWidth:O,availableHeight:D});const L=await l.getDimensions(c.floating);return b!==L.width||S!==L.height?{reset:{rects:!0}}:{}}}};function Tv(){return typeof window<"u"}function Sd(e){return YN(e)?(e.nodeName||"").toLowerCase():"#document"}function Tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fr(e){var t;return(t=(YN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function YN(e){return Tv()?e instanceof Node||e instanceof Tn(e).Node:!1}function pr(e){return Tv()?e instanceof Element||e instanceof Tn(e).Element:!1}function Ci(e){return Tv()?e instanceof HTMLElement||e instanceof Tn(e).HTMLElement:!1}function bD(e){return!Tv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tn(e).ShadowRoot}function jm(e){const{overflow:t,overflowX:o,overflowY:a,display:n}=hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+o)&&n!=="inline"&&n!=="contents"}function Gee(e){return/^(table|td|th)$/.test(Sd(e))}function wv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Kee=/transform|translate|scale|rotate|perspective|filter/,Wee=/paint|layout|strict|content/,tl=e=>!!e&&e!=="none";let XS;function aC(e){const t=pr(e)?hr(e):e;return tl(t.transform)||tl(t.translate)||tl(t.scale)||tl(t.rotate)||tl(t.perspective)||!nC()&&(tl(t.backdropFilter)||tl(t.filter))||Kee.test(t.willChange||"")||Wee.test(t.contain||"")}function Yee(e){let t=Cs(e);for(;Ci(t)&&!rd(t);){if(aC(t))return t;if(wv(t))return null;t=Cs(t)}return null}function nC(){return XS==null&&(XS=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),XS}function rd(e){return/^(html|body|#document)$/.test(Sd(e))}function hr(e){return Tn(e).getComputedStyle(e)}function _v(e){return pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cs(e){if(Sd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bD(e)&&e.host||Fr(e);return bD(t)?t.host:t}function ZN(e){const t=Cs(e);return rd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ci(t)&&jm(t)?t:ZN(t)}function mm(e,t,o){var a;t===void 0&&(t=[]),o===void 0&&(o=!0);const n=ZN(e),i=n===((a=e.ownerDocument)==null?void 0:a.body),l=Tn(n);if(i){const c=KT(l);return t.concat(l,l.visualViewport||[],jm(n)?n:[],c&&o?mm(c):[])}else return t.concat(n,mm(n,[],o))}function KT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function QN(e){const t=hr(e);let o=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const n=Ci(e),i=n?e.offsetWidth:o,l=n?e.offsetHeight:a,c=gf(o)!==i||gf(a)!==l;return c&&(o=i,a=l),{width:o,height:a,$:c}}function rC(e){return pr(e)?e:e.contextElement}function Gc(e){const t=rC(e);if(!Ci(t))return Lr(1);const o=t.getBoundingClientRect(),{width:a,height:n,$:i}=QN(t);let l=(i?gf(o.width):o.width)/a,c=(i?gf(o.height):o.height)/n;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Zee=Lr(0);function JN(e){const t=Tn(e);return!nC()||!t.visualViewport?Zee:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qee(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==Tn(e)?!1:t}function yl(e,t,o,a){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=e.getBoundingClientRect(),i=rC(e);let l=Lr(1);t&&(a?pr(a)&&(l=Gc(a)):l=Gc(e));const c=Qee(i,o,a)?JN(i):Lr(0);let u=(n.left+c.x)/l.x,m=(n.top+c.y)/l.y,h=n.width/l.x,p=n.height/l.y;if(i){const f=Tn(i),v=a&&pr(a)?Tn(a):a;let b=f,S=KT(b);for(;S&&a&&v!==b;){const C=Gc(S),w=S.getBoundingClientRect(),_=hr(S),k=w.left+(S.clientLeft+parseFloat(_.paddingLeft))*C.x,x=w.top+(S.clientTop+parseFloat(_.paddingTop))*C.y;u*=C.x,m*=C.y,h*=C.x,p*=C.y,u+=k,m+=x,b=Tn(S),S=KT(b)}}return nd({width:h,height:p,x:u,y:m})}function Cv(e,t){const o=_v(e).scrollLeft;return t?t.left+o:yl(Fr(e)).left+o}function XN(e,t){const o=e.getBoundingClientRect(),a=o.left+t.scrollLeft-Cv(e,o),n=o.top+t.scrollTop;return{x:a,y:n}}function Jee(e){let{elements:t,rect:o,offsetParent:a,strategy:n}=e;const i=n==="fixed",l=Fr(a),c=t?wv(t.floating):!1;if(a===l||c&&i)return o;let u={scrollLeft:0,scrollTop:0},m=Lr(1);const h=Lr(0),p=Ci(a);if((p||!p&&!i)&&((Sd(a)!=="body"||jm(l))&&(u=_v(a)),p)){const v=yl(a);m=Gc(a),h.x=v.x+a.clientLeft,h.y=v.y+a.clientTop}const f=l&&!p&&!i?XN(l,u):Lr(0);return{width:o.width*m.x,height:o.height*m.y,x:o.x*m.x-u.scrollLeft*m.x+h.x+f.x,y:o.y*m.y-u.scrollTop*m.y+h.y+f.y}}function Xee(e){return Array.from(e.getClientRects())}function ete(e){const t=Fr(e),o=_v(e),a=e.ownerDocument.body,n=Ea(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),i=Ea(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let l=-o.scrollLeft+Cv(e);const c=-o.scrollTop;return hr(a).direction==="rtl"&&(l+=Ea(t.clientWidth,a.clientWidth)-n),{width:n,height:i,x:l,y:c}}const yD=25;function tte(e,t){const o=Tn(e),a=Fr(e),n=o.visualViewport;let i=a.clientWidth,l=a.clientHeight,c=0,u=0;if(n){i=n.width,l=n.height;const h=nC();(!h||h&&t==="fixed")&&(c=n.offsetLeft,u=n.offsetTop)}const m=Cv(a);if(m<=0){const h=a.ownerDocument,p=h.body,f=getComputedStyle(p),v=h.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(a.clientWidth-p.clientWidth-v);b<=yD&&(i-=b)}else m<=yD&&(i+=m);return{width:i,height:l,x:c,y:u}}function ote(e,t){const o=yl(e,!0,t==="fixed"),a=o.top+e.clientTop,n=o.left+e.clientLeft,i=Ci(e)?Gc(e):Lr(1),l=e.clientWidth*i.x,c=e.clientHeight*i.y,u=n*i.x,m=a*i.y;return{width:l,height:c,x:u,y:m}}function SD(e,t,o){let a;if(t==="viewport")a=tte(e,o);else if(t==="document")a=ete(Fr(e));else if(pr(t))a=ote(t,o);else{const n=JN(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nd(a)}function eF(e,t){const o=Cs(e);return o===t||!pr(o)||rd(o)?!1:hr(o).position==="fixed"||eF(o,t)}function ate(e,t){const o=t.get(e);if(o)return o;let a=mm(e,[],!1).filter(c=>pr(c)&&Sd(c)!=="body"),n=null;const i=hr(e).position==="fixed";let l=i?Cs(e):e;for(;pr(l)&&!rd(l);){const c=hr(l),u=aC(l);!u&&c.position==="fixed"&&(n=null),(i?!u&&!n:!u&&c.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||jm(l)&&!u&&eF(e,l))?a=a.filter(h=>h!==l):n=c,l=Cs(l)}return t.set(e,a),a}function nte(e){let{element:t,boundary:o,rootBoundary:a,strategy:n}=e;const l=[...o==="clippingAncestors"?wv(t)?[]:ate(t,this._c):[].concat(o),a],c=SD(t,l[0],n);let u=c.top,m=c.right,h=c.bottom,p=c.left;for(let f=1;f<l.length;f++){const v=SD(t,l[f],n);u=Ea(v.top,u),m=ur(v.right,m),h=ur(v.bottom,h),p=Ea(v.left,p)}return{width:m-p,height:h-u,x:p,y:u}}function rte(e){const{width:t,height:o}=QN(e);return{width:t,height:o}}function ite(e,t,o){const a=Ci(t),n=Fr(t),i=o==="fixed",l=yl(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=Lr(0);function m(){u.x=Cv(n)}if(a||!a&&!i)if((Sd(t)!=="body"||jm(n))&&(c=_v(t)),a){const v=yl(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else n&&m();i&&!a&&n&&m();const h=n&&!a&&!i?XN(n,c):Lr(0),p=l.left+c.scrollLeft-u.x-h.x,f=l.top+c.scrollTop-u.y-h.y;return{x:p,y:f,width:l.width,height:l.height}}function e0(e){return hr(e).position==="static"}function TD(e,t){if(!Ci(e)||hr(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Fr(e)===o&&(o=o.ownerDocument.body),o}function tF(e,t){const o=Tn(e);if(wv(e))return o;if(!Ci(e)){let n=Cs(e);for(;n&&!rd(n);){if(pr(n)&&!e0(n))return n;n=Cs(n)}return o}let a=TD(e,t);for(;a&&Gee(a)&&e0(a);)a=TD(a,t);return a&&rd(a)&&e0(a)&&!aC(a)?o:a||Yee(e)||o}const ste=async function(e){const t=this.getOffsetParent||tF,o=this.getDimensions,a=await o(e.floating);return{reference:ite(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function lte(e){return hr(e).direction==="rtl"}const cte={convertOffsetParentRelativeRectToViewportRelativeRect:Jee,getDocumentElement:Fr,getClippingRect:nte,getOffsetParent:tF,getElementRects:ste,getClientRects:Xee,getDimensions:rte,getScale:Gc,isElement:pr,isRTL:lte};function oF(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dte(e,t){let o=null,a;const n=Fr(e);function i(){var c;clearTimeout(a),(c=o)==null||c.disconnect(),o=null}function l(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const m=e.getBoundingClientRect(),{left:h,top:p,width:f,height:v}=m;if(c||t(),!f||!v)return;const b=fg(p),S=fg(n.clientWidth-(h+f)),C=fg(n.clientHeight-(p+v)),w=fg(h),k={rootMargin:-b+"px "+-S+"px "+-C+"px "+-w+"px",threshold:Ea(0,ur(1,u))||1};let x=!0;function E(A){const D=A[0].intersectionRatio;if(D!==u){if(!x)return l();D?l(!1,D):a=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!oF(m,e.getBoundingClientRect())&&l(),x=!1}try{o=new IntersectionObserver(E,{...k,root:n.ownerDocument})}catch{o=new IntersectionObserver(E,k)}o.observe(e)}return l(!0),i}function ute(e,t,o,a){a===void 0&&(a={});const{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=a,m=rC(e),h=n||i?[...m?mm(m):[],...t?mm(t):[]]:[];h.forEach(w=>{n&&w.addEventListener("scroll",o,{passive:!0}),i&&w.addEventListener("resize",o)});const p=m&&c?dte(m,o):null;let f=-1,v=null;l&&(v=new ResizeObserver(w=>{let[_]=w;_&&_.target===m&&v&&t&&(v.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),o()}),m&&!u&&v.observe(m),t&&v.observe(t));let b,S=u?yl(e):null;u&&C();function C(){const w=yl(e);S&&!oF(S,w)&&o(),S=w,b=requestAnimationFrame(C)}return o(),()=>{var w;h.forEach(_=>{n&&_.removeEventListener("scroll",o),i&&_.removeEventListener("resize",o)}),p?.(),(w=v)==null||w.disconnect(),v=null,u&&cancelAnimationFrame(b)}}const mte=qee,Tge=Nee,pte=$ee,hte=Fee,gte=Hee,fte=Bee,wD=Iee,wge=zee,vte=Vee,bte=(e,t,o)=>{const a=new Map,n={platform:cte,...o},i={...n.platform,_c:a};return Mee(e,t,{...n,platform:i})};var yte=typeof document<"u",Ste=function(){},zg=yte?R.useLayoutEffect:Ste;function bf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,a,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(a=o;a--!==0;)if(!bf(e[a],t[a]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(a=o;a--!==0;)if(!{}.hasOwnProperty.call(t,n[a]))return!1;for(a=o;a--!==0;){const i=n[a];if(!(i==="_owner"&&e.$$typeof)&&!bf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function aF(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _D(e,t){const o=aF(e);return Math.round(t*o)/o}function t0(e){const t=R.useRef(e);return zg(()=>{t.current=e}),t}function Tte(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:a=[],platform:n,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:u,open:m}=e,[h,p]=R.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=R.useState(a);bf(f,a)||v(a);const[b,S]=R.useState(null),[C,w]=R.useState(null),_=R.useCallback(te=>{te!==A.current&&(A.current=te,S(te))},[]),k=R.useCallback(te=>{te!==D.current&&(D.current=te,w(te))},[]),x=i||b,E=l||C,A=R.useRef(null),D=R.useRef(null),O=R.useRef(h),L=u!=null,U=t0(u),F=t0(n),q=t0(m),j=R.useCallback(()=>{if(!A.current||!D.current)return;const te={placement:t,strategy:o,middleware:f};F.current&&(te.platform=F.current),bte(A.current,D.current,te).then(le=>{const Q={...le,isPositioned:q.current!==!1};K.current&&!bf(O.current,Q)&&(O.current=Q,Xf.flushSync(()=>{p(Q)}))})},[f,t,o,F,q]);zg(()=>{m===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(te=>({...te,isPositioned:!1})))},[m]);const K=R.useRef(!1);zg(()=>(K.current=!0,()=>{K.current=!1}),[]),zg(()=>{if(x&&(A.current=x),E&&(D.current=E),x&&E){if(U.current)return U.current(x,E,j);j()}},[x,E,j,U,L]);const ne=R.useMemo(()=>({reference:A,floating:D,setReference:_,setFloating:k}),[_,k]),H=R.useMemo(()=>({reference:x,floating:E}),[x,E]),Z=R.useMemo(()=>{const te={position:o,left:0,top:0};if(!H.floating)return te;const le=_D(H.floating,h.x),Q=_D(H.floating,h.y);return c?{...te,transform:"translate("+le+"px, "+Q+"px)",...aF(H.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:le,top:Q}},[o,c,H.floating,h.x,h.y]);return R.useMemo(()=>({...h,update:j,refs:ne,elements:H,floatingStyles:Z}),[h,j,ne,H,Z])}const wte=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:a,padding:n}=typeof e=="function"?e(o):e;return a&&t(a)?a.current!=null?wD({element:a.current,padding:n}).fn(o):{}:a?wD({element:a,padding:n}).fn(o):{}}}},_te=(e,t)=>{const o=mte(e);return{name:o.name,fn:o.fn,options:[e,t]}},Cte=(e,t)=>{const o=pte(e);return{name:o.name,fn:o.fn,options:[e,t]}},Pte=(e,t)=>({fn:vte(e).fn,options:[e,t]}),xte=(e,t)=>{const o=hte(e);return{name:o.name,fn:o.fn,options:[e,t]}},Ete=(e,t)=>{const o=gte(e);return{name:o.name,fn:o.fn,options:[e,t]}},kte=(e,t)=>{const o=fte(e);return{name:o.name,fn:o.fn,options:[e,t]}},Rte=(e,t)=>{const o=wte(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Ate="Arrow",nF=R.forwardRef((e,t)=>{const{children:o,width:a=10,height:n=5,...i}=e;return T.jsx(ho.svg,{...i,ref:t,width:a,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});nF.displayName=Ate;var Dte=nF;function rF(e){const[t,o]=R.useState(void 0);return cr(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const i=n[0];let l,c;if("borderBoxSize"in i){const u=i.borderBoxSize,m=Array.isArray(u)?u[0]:u;l=m.inlineSize,c=m.blockSize}else l=e.offsetWidth,c=e.offsetHeight;o({width:l,height:c})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else o(void 0)},[e]),t}var iC="Popper",[iF,Pv]=Ds(iC),[Ote,sF]=iF(iC),lF=e=>{const{__scopePopper:t,children:o}=e,[a,n]=R.useState(null);return T.jsx(Ote,{scope:t,anchor:a,onAnchorChange:n,children:o})};lF.displayName=iC;var cF="PopperAnchor",dF=R.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:a,...n}=e,i=sF(cF,o),l=R.useRef(null),c=No(t,l),u=R.useRef(null);return R.useEffect(()=>{const m=u.current;u.current=a?.current||l.current,m!==u.current&&i.onAnchorChange(u.current)}),a?null:T.jsx(ho.div,{...n,ref:c})});dF.displayName=cF;var sC="PopperContent",[Mte,Ite]=iF(sC),uF=R.forwardRef((e,t)=>{const{__scopePopper:o,side:a="bottom",sideOffset:n=0,align:i="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:v="optimized",onPlaced:b,...S}=e,C=sF(sC,o),[w,_]=R.useState(null),k=No(t,me=>_(me)),[x,E]=R.useState(null),A=rF(x),D=A?.width??0,O=A?.height??0,L=a+(i!=="center"?"-"+i:""),U=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},F=Array.isArray(m)?m:[m],q=F.length>0,j={padding:U,boundary:F.filter(Nte),altBoundary:q},{refs:K,floatingStyles:ne,placement:H,isPositioned:Z,middlewareData:te}=Tte({strategy:"fixed",placement:L,whileElementsMounted:(...me)=>ute(...me,{animationFrame:v==="always"}),elements:{reference:C.anchor},middleware:[_te({mainAxis:n+O,alignmentAxis:l}),u&&Cte({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Pte():void 0,...j}),u&&xte({...j}),Ete({...j,apply:({elements:me,rects:he,availableWidth:_e,availableHeight:je})=>{const{width:Y,height:ae}=he.reference,ve=me.floating.style;ve.setProperty("--radix-popper-available-width",`${_e}px`),ve.setProperty("--radix-popper-available-height",`${je}px`),ve.setProperty("--radix-popper-anchor-width",`${Y}px`),ve.setProperty("--radix-popper-anchor-height",`${ae}px`)}}),x&&Rte({element:x,padding:c}),Fte({arrowWidth:D,arrowHeight:O}),f&&kte({strategy:"referenceHidden",...j})]}),[le,Q]=hF(H),I=dr(b);cr(()=>{Z&&I?.()},[Z,I]);const G=te.arrow?.x,$=te.arrow?.y,N=te.arrow?.centerOffset!==0,[z,J]=R.useState();return cr(()=>{w&&J(window.getComputedStyle(w).zIndex)},[w]),T.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Z?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" "),...te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(Mte,{scope:o,placedSide:le,onArrowChange:E,arrowX:G,arrowY:$,shouldHideArrow:N,children:T.jsx(ho.div,{"data-side":le,"data-align":Q,...S,ref:k,style:{...S.style,animation:Z?void 0:"none"}})})})});uF.displayName=sC;var mF="PopperArrow",Lte={top:"bottom",right:"left",bottom:"top",left:"right"},pF=R.forwardRef(function(t,o){const{__scopePopper:a,...n}=t,i=Ite(mF,a),l=Lte[i.placedSide];return T.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:T.jsx(Dte,{...n,ref:o,style:{...n.style,display:"block"}})})});pF.displayName=mF;function Nte(e){return e!==null}var Fte=e=>({name:"transformOrigin",options:e,fn(t){const{placement:o,rects:a,middlewareData:n}=t,l=n.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[m,h]=hF(o),p={start:"0%",center:"50%",end:"100%"}[h],f=(n.arrow?.x??0)+c/2,v=(n.arrow?.y??0)+u/2;let b="",S="";return m==="bottom"?(b=l?p:`${f}px`,S=`${-u}px`):m==="top"?(b=l?p:`${f}px`,S=`${a.floating.height+u}px`):m==="right"?(b=`${-u}px`,S=l?p:`${v}px`):m==="left"&&(b=`${a.floating.width+u}px`,S=l?p:`${v}px`),{data:{x:b,y:S}}}});function hF(e){const[t,o="center"]=e.split("-");return[t,o]}var lC=lF,gF=dF,fF=uF,vF=pF,Bte=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),jte="VisuallyHidden",bF=R.forwardRef((e,t)=>T.jsx(ho.span,{...e,ref:t,style:{...Bte,...e.style}}));bF.displayName=jte;var zte=bF,[xv]=Ds("Tooltip",[Pv]),Ev=Pv(),yF="TooltipProvider",Ute=700,WT="tooltip.open",[qte,cC]=xv(yF),SF=e=>{const{__scopeTooltip:t,delayDuration:o=Ute,skipDelayDuration:a=300,disableHoverableContent:n=!1,children:i}=e,l=R.useRef(!0),c=R.useRef(!1),u=R.useRef(0);return R.useEffect(()=>{const m=u.current;return()=>window.clearTimeout(m)},[]),T.jsx(qte,{scope:t,isOpenDelayedRef:l,delayDuration:o,onOpen:R.useCallback(()=>{window.clearTimeout(u.current),l.current=!1},[]),onClose:R.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:R.useCallback(m=>{c.current=m},[]),disableHoverableContent:n,children:i})};SF.displayName=yF;var pm="Tooltip",[$te,zm]=xv(pm),TF=e=>{const{__scopeTooltip:t,children:o,open:a,defaultOpen:n,onOpenChange:i,disableHoverableContent:l,delayDuration:c}=e,u=cC(pm,e.__scopeTooltip),m=Ev(t),[h,p]=R.useState(null),f=Ti(),v=R.useRef(0),b=l??u.disableHoverableContent,S=c??u.delayDuration,C=R.useRef(!1),[w,_]=yd({prop:a,defaultProp:n??!1,onChange:D=>{D?(u.onOpen(),document.dispatchEvent(new CustomEvent(WT))):u.onClose(),i?.(D)},caller:pm}),k=R.useMemo(()=>w?C.current?"delayed-open":"instant-open":"closed",[w]),x=R.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C.current=!1,_(!0)},[_]),E=R.useCallback(()=>{window.clearTimeout(v.current),v.current=0,_(!1)},[_]),A=R.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{C.current=!0,_(!0),v.current=0},S)},[S,_]);return R.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),T.jsx(lC,{...m,children:T.jsx($te,{scope:t,contentId:f,open:w,stateAttribute:k,trigger:h,onTriggerChange:p,onTriggerEnter:R.useCallback(()=>{u.isOpenDelayedRef.current?A():x()},[u.isOpenDelayedRef,A,x]),onTriggerLeave:R.useCallback(()=>{b?E():(window.clearTimeout(v.current),v.current=0)},[E,b]),onOpen:x,onClose:E,disableHoverableContent:b,children:o})})};TF.displayName=pm;var YT="TooltipTrigger",wF=R.forwardRef((e,t)=>{const{__scopeTooltip:o,...a}=e,n=zm(YT,o),i=cC(YT,o),l=Ev(o),c=R.useRef(null),u=No(t,c,n.onTriggerChange),m=R.useRef(!1),h=R.useRef(!1),p=R.useCallback(()=>m.current=!1,[]);return R.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),T.jsx(gF,{asChild:!0,...l,children:T.jsx(ho.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...a,ref:u,onPointerMove:it(e.onPointerMove,f=>{f.pointerType!=="touch"&&!h.current&&!i.isPointerInTransitRef.current&&(n.onTriggerEnter(),h.current=!0)}),onPointerLeave:it(e.onPointerLeave,()=>{n.onTriggerLeave(),h.current=!1}),onPointerDown:it(e.onPointerDown,()=>{n.open&&n.onClose(),m.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:it(e.onFocus,()=>{m.current||n.onOpen()}),onBlur:it(e.onBlur,n.onClose),onClick:it(e.onClick,n.onClose)})})});wF.displayName=YT;var dC="TooltipPortal",[Vte,Hte]=xv(dC,{forceMount:void 0}),_F=e=>{const{__scopeTooltip:t,forceMount:o,children:a,container:n}=e,i=zm(dC,t);return T.jsx(Vte,{scope:t,forceMount:o,children:T.jsx(vr,{present:o||i.open,children:T.jsx(bv,{asChild:!0,container:n,children:a})})})};_F.displayName=dC;var id="TooltipContent",CF=R.forwardRef((e,t)=>{const o=Hte(id,e.__scopeTooltip),{forceMount:a=o.forceMount,side:n="top",...i}=e,l=zm(id,e.__scopeTooltip);return T.jsx(vr,{present:a||l.open,children:l.disableHoverableContent?T.jsx(PF,{side:n,...i,ref:t}):T.jsx(Gte,{side:n,...i,ref:t})})}),Gte=R.forwardRef((e,t)=>{const o=zm(id,e.__scopeTooltip),a=cC(id,e.__scopeTooltip),n=R.useRef(null),i=No(t,n),[l,c]=R.useState(null),{trigger:u,onClose:m}=o,h=n.current,{onPointerInTransitChange:p}=a,f=R.useCallback(()=>{c(null),p(!1)},[p]),v=R.useCallback((b,S)=>{const C=b.currentTarget,w={x:b.clientX,y:b.clientY},_=Zte(w,C.getBoundingClientRect()),k=Qte(w,_),x=Jte(S.getBoundingClientRect()),E=eoe([...k,...x]);c(E),p(!0)},[p]);return R.useEffect(()=>()=>f(),[f]),R.useEffect(()=>{if(u&&h){const b=C=>v(C,h),S=C=>v(C,u);return u.addEventListener("pointerleave",b),h.addEventListener("pointerleave",S),()=>{u.removeEventListener("pointerleave",b),h.removeEventListener("pointerleave",S)}}},[u,h,v,f]),R.useEffect(()=>{if(l){const b=S=>{const C=S.target,w={x:S.clientX,y:S.clientY},_=u?.contains(C)||h?.contains(C),k=!Xte(w,l);_?f():k&&(f(),m())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,h,l,m,f]),T.jsx(PF,{...e,ref:i})}),[Kte,Wte]=xv(pm,{isInside:!1}),Yte=JJ("TooltipContent"),PF=R.forwardRef((e,t)=>{const{__scopeTooltip:o,children:a,"aria-label":n,onEscapeKeyDown:i,onPointerDownOutside:l,...c}=e,u=zm(id,o),m=Ev(o),{onClose:h}=u;return R.useEffect(()=>(document.addEventListener(WT,h),()=>document.removeEventListener(WT,h)),[h]),R.useEffect(()=>{if(u.trigger){const p=f=>{f.target?.contains(u.trigger)&&h()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,h]),T.jsx(vv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:T.jsxs(fF,{"data-state":u.stateAttribute,...m,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[T.jsx(Yte,{children:a}),T.jsx(Kte,{scope:o,isInside:!0,children:T.jsx(zte,{id:u.contentId,role:"tooltip",children:n||a})})]})})});CF.displayName=id;var xF="TooltipArrow",EF=R.forwardRef((e,t)=>{const{__scopeTooltip:o,...a}=e,n=Ev(o);return Wte(xF,o).isInside?null:T.jsx(vF,{...n,...a,ref:t})});EF.displayName=xF;function Zte(e,t){const o=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(o,a,n,i)){case i:return"left";case n:return"right";case o:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function Qte(e,t,o=5){const a=[];switch(t){case"top":a.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":a.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":a.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":a.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return a}function Jte(e){const{top:t,right:o,bottom:a,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:a},{x:n,y:a}]}function Xte(e,t){const{x:o,y:a}=e;let n=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const c=t[i],u=t[l],m=c.x,h=c.y,p=u.x,f=u.y;h>a!=f>a&&o<(p-m)*(a-h)/(f-h)+m&&(n=!n)}return n}function eoe(e){const t=e.slice();return t.sort((o,a)=>o.x<a.x?-1:o.x>a.x?1:o.y<a.y?-1:o.y>a.y?1:0),toe(t)}function toe(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const n=e[a];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(n.y-l.y)>=(i.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}t.pop();const o=[];for(let a=e.length-1;a>=0;a--){const n=e[a];for(;o.length>=2;){const i=o[o.length-1],l=o[o.length-2];if((i.x-l.x)*(n.y-l.y)>=(i.y-l.y)*(n.x-l.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var ooe=SF,aoe=TF,noe=wF,roe=_F,ioe=CF,soe=EF;function uC(e){const t=Ne.c(6);let o,a;t[0]!==e?({delayDuration:a,...o}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);const n=a===void 0?0:a;let i;return t[3]!==n||t[4]!==o?(i=T.jsx(ooe,{"data-slot":"tooltip-provider",delayDuration:n,...o}),t[3]=n,t[4]=o,t[5]=i):i=t[5],i}function kF(e){const t=Ne.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx(uC,{children:T.jsx(aoe,{"data-slot":"tooltip",...o})}),t[2]=o,t[3]=a):a=t[3],a}function RF(e){const t=Ne.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx(noe,{"data-slot":"tooltip-trigger",...o}),t[2]=o,t[3]=a):a=t[3],a}function AF(e){const t=Ne.c(13);let o,a,n,i;t[0]!==e?({className:a,sideOffset:i,children:o,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i):(o=t[1],a=t[2],n=t[3],i=t[4]);const l=i===void 0?0:i;let c;t[5]!==a?(c=Dt("notranslate bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",a),t[5]=a,t[6]=c):c=t[6];let u;t[7]===Symbol.for("react.memo_cache_sentinel")?(u=T.jsx(soe,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),t[7]=u):u=t[7];let m;return t[8]!==o||t[9]!==n||t[10]!==l||t[11]!==c?(m=T.jsx(roe,{children:T.jsxs(ioe,{"data-slot":"tooltip-content",sideOffset:l,translate:"no",className:c,...n,children:[o,u]})}),t[8]=o,t[9]=n,t[10]=l,t[11]=c,t[12]=m):m=t[12],m}const loe="15rem",coe="18rem",doe="4.5rem",DF=R.createContext(null);function mC(){const e=R.useContext(DF);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function _ge(e){const t=Ne.c(19),{children:o,defaultOpen:a,open:n,onOpenChange:i}=e,l=a===void 0?!1:a,c=qJ(),[u,m]=R.useState(l),[h,p]=R.useState(!1),f=n!==void 0,v=f?n:u;let b;t[0]!==f||t[1]!==i?(b=D=>{f||m(D),i?.(D)},t[0]=f,t[1]=i,t[2]=b):b=t[2];const S=b;let C;t[3]!==c||t[4]!==v||t[5]!==S?(C=()=>{c?p(uoe):S(!v)},t[3]=c,t[4]=v,t[5]=S,t[6]=C):C=t[6];const w=C,_=v?"expanded":"collapsed";let k;t[7]!==c||t[8]!==v||t[9]!==h||t[10]!==S||t[11]!==_||t[12]!==w?(k={state:_,open:v,setOpen:S,isMobile:c,openMobile:h,setOpenMobile:p,toggleSidebar:w},t[7]=c,t[8]=v,t[9]=h,t[10]=S,t[11]=_,t[12]=w,t[13]=k):k=t[13];const x=k;let E;t[14]!==o?(E=T.jsx(uC,{delayDuration:0,children:o}),t[14]=o,t[15]=E):E=t[15];let A;return t[16]!==x||t[17]!==E?(A=T.jsx(DF.Provider,{value:x,children:E}),t[16]=x,t[17]=E,t[18]=A):A=t[18],A}function uoe(e){return!e}function Cge(e){const t=Ne.c(14);let o,a,n,i;t[0]!==e?({className:a,style:i,children:o,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i):(o=t[1],a=t[2],n=t[3],i=t[4]);let l;t[5]!==i?(l={"--sidebar-width":loe,"--sidebar-width-icon":doe,...i},t[5]=i,t[6]=l):l=t[6];const c=l;let u;t[7]!==a?(u=Dt("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),t[7]=a,t[8]=u):u=t[8];let m;return t[9]!==o||t[10]!==n||t[11]!==c||t[12]!==u?(m=T.jsx("div",{"data-slot":"sidebar-wrapper",style:c,className:u,...n,children:o}),t[9]=o,t[10]=n,t[11]=c,t[12]=u,t[13]=m):m=t[13],m}function Pge(e){const t=Ne.c(36);let o,a,n,i,l;t[0]!==e?({side:i,variant:l,className:a,children:o,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i,t[5]=l):(o=t[1],a=t[2],n=t[3],i=t[4],l=t[5]);const c=i===void 0?"left":i,u=l===void 0?"sidebar":l,{isMobile:m,state:h,openMobile:p,setOpenMobile:f}=mC();if(m){let A;t[6]===Symbol.for("react.memo_cache_sentinel")?(A={"--sidebar-width":coe},t[6]=A):A=t[6];let D;t[7]===Symbol.for("react.memo_cache_sentinel")?(D=T.jsxs(Tee,{className:"sr-only",children:[T.jsx(wee,{children:"Sidebar"}),T.jsx(_ee,{children:"Displays the mobile sidebar."})]}),t[7]=D):D=t[7];let O;t[8]!==o?(O=T.jsx("div",{className:"flex h-full w-full flex-col",children:o}),t[8]=o,t[9]=O):O=t[9];let L;t[10]!==c||t[11]!==O?(L=T.jsxs(See,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:A,side:c,children:[D,O]}),t[10]=c,t[11]=O,t[12]=L):L=t[12];let U;return t[13]!==p||t[14]!==n||t[15]!==f||t[16]!==L?(U=T.jsx(vee,{open:p,onOpenChange:f,...n,children:L}),t[13]=p,t[14]=n,t[15]=f,t[16]=L,t[17]=U):U=t[17],U}const v=h==="expanded",b=v?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let S;t[18]!==b?(S=Dt("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",b),t[18]=b,t[19]=S):S=t[19];const C=v?void 0:"icon",w=v?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let _;t[20]!==a||t[21]!==w?(_=Dt("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",w,a),t[20]=a,t[21]=w,t[22]=_):_=t[22];let k;t[23]!==o?(k=T.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:o}),t[23]=o,t[24]=k):k=t[24];let x;t[25]!==n||t[26]!==_||t[27]!==k?(x=T.jsx("div",{"data-slot":"sidebar-container",className:_,...n,children:k}),t[25]=n,t[26]=_,t[27]=k,t[28]=x):x=t[28];let E;return t[29]!==c||t[30]!==h||t[31]!==S||t[32]!==C||t[33]!==x||t[34]!==u?(E=T.jsx("div",{className:S,"data-state":h,"data-collapsible":C,"data-variant":u,"data-side":c,"data-slot":"sidebar",children:x}),t[29]=c,t[30]=h,t[31]=S,t[32]=C,t[33]=x,t[34]=u,t[35]=E):E=t[35],E}function moe(e){const t=Ne.c(18);let o,a,n;t[0]!==e?({className:o,onClick:a,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n):(o=t[1],a=t[2],n=t[3]);const{toggleSidebar:i}=mC();let l;t[4]!==o?(l=Dt("size-7",o),t[4]=o,t[5]=l):l=t[5];let c;t[6]!==a||t[7]!==i?(c=v=>{a?.(v),i()},t[6]=a,t[7]=i,t[8]=c):c=t[8];let u,m;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=T.jsx(oN,{}),m=T.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=u,t[10]=m):(u=t[9],m=t[10]);let h;t[11]!==n||t[12]!==l||t[13]!==c?(h=T.jsx(RF,{asChild:!0,children:T.jsxs(ad,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l,onClick:c,...n,children:[u,m]})}),t[11]=n,t[12]=l,t[13]=c,t[14]=h):h=t[14];let p;t[15]===Symbol.for("react.memo_cache_sentinel")?(p=T.jsxs(AF,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",T.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(poe)})]}),t[15]=p):p=t[15];let f;return t[16]!==h?(f=T.jsx(uC,{delayDuration:300,children:T.jsxs(kF,{children:[h,p]})}),t[16]=h,t[17]=f):f=t[17],f}function poe(e){return T.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:e},e)}function xge(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("main",{"data-slot":"sidebar-inset",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function Ege(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("flex flex-col gap-2 p-2",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function kge(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("flex min-h-0 flex-1 flex-col gap-2",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function Rge(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function Age(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("group/menu-item relative w-full list-none",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}const hoe=gv("peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Dge(e){const t=Ne.c(28);let o,a,n,i,l,c,u;t[0]!==e?({asChild:n,isActive:i,variant:l,size:c,tooltip:u,className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i,t[5]=l,t[6]=c,t[7]=u):(o=t[1],a=t[2],n=t[3],i=t[4],l=t[5],c=t[6],u=t[7]);const m=n===void 0?!1:n,h=i===void 0?!1:i,p=l===void 0?"default":l,f=c===void 0?"default":c,v=m?fv:"button",{isMobile:b}=mC();let S;t[8]!==o||t[9]!==f||t[10]!==p?(S=Dt(hoe({variant:p,size:f}),o),t[8]=o,t[9]=f,t[10]=p,t[11]=S):S=t[11];let C;t[12]!==v||t[13]!==h||t[14]!==a||t[15]!==f||t[16]!==S?(C=T.jsx(v,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":h,className:S,...a}),t[12]=v,t[13]=h,t[14]=a,t[15]=f,t[16]=S,t[17]=C):C=t[17];const w=C;if(!u)return w;if(typeof u=="string"){let E;t[18]!==u?(E={children:u},t[18]=u,t[19]=E):E=t[19],u=E}let _;t[20]!==w?(_=T.jsx(RF,{asChild:!0,children:w}),t[20]=w,t[21]=_):_=t[21];let k;t[22]!==b||t[23]!==u?(k=T.jsx(AF,{side:"right",align:"center",hidden:b,...u}),t[22]=b,t[23]=u,t[24]=k):k=t[24];let x;return t[25]!==_||t[26]!==k?(x=T.jsxs(kF,{children:[_,k]}),t[25]=_,t[26]=k,t[27]=x):x=t[27],x}const OF=R.createContext(void 0),Oge=OF.Provider;function CD(e,t){const o=R.Children.toArray(e);for(const a of o)if(R.isValidElement(a)&&a.type===t)return a;return null}function goe(e){const t=Ne.c(5),{children:o,className:a}=e;let n;t[0]!==a?(n=Dt("flex flex-col h-full w-full bg-background overflow-hidden",a),t[0]=a,t[1]=n):n=t[1];let i;return t[2]!==o||t[3]!==n?(i=T.jsx("div",{className:n,children:o}),t[2]=o,t[3]=n,t[4]=i):i=t[4],i}function foe(e){const t=Ne.c(17),{children:o,className:a,hideSidebarTrigger:n}=e;let i;t[0]!==o?(i=CD(o,MF),t[0]=o,t[1]=i):i=t[1];const l=i;let c;t[2]!==o?(c=CD(o,IF),t[2]=o,t[3]=c):c=t[3];const u=c;let m;t[4]!==a?(m=Dt("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",a),t[4]=a,t[5]=m):m=t[5];let h;t[6]!==n?(h=!n&&T.jsx(moe,{className:"md:hidden shrink-0"}),t[6]=n,t[7]=h):h=t[7];let p;t[8]!==l||t[9]!==h?(p=T.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[h,l]}),t[8]=l,t[9]=h,t[10]=p):p=t[10];let f;t[11]!==u?(f=T.jsx("div",{className:"flex items-center",children:u}),t[11]=u,t[12]=f):f=t[12];let v;return t[13]!==m||t[14]!==p||t[15]!==f?(v=T.jsxs("div",{className:m,children:[p,f]}),t[13]=m,t[14]=p,t[15]=f,t[16]=v):v=t[16],v}function MF(e){const t=Ne.c(5),{children:o,className:a}=e;let n;t[0]!==a?(n=Dt("flex items-center gap-2 min-w-0 overflow-hidden",a),t[0]=a,t[1]=n):n=t[1];let i;return t[2]!==o||t[3]!==n?(i=T.jsx("div",{className:n,children:o}),t[2]=o,t[3]=n,t[4]=i):i=t[4],i}function IF(e){const t=Ne.c(5),{children:o,className:a}=e;let n;t[0]!==a?(n=Dt("flex items-center gap-2 shrink-0 overflow-hidden",a),t[0]=a,t[1]=n):n=t[1];let i;return t[2]!==o||t[3]!==n?(i=T.jsx("div",{className:n,children:o}),t[2]=o,t[3]=n,t[4]=i):i=t[4],i}function voe(e){const t=Ne.c(6),{children:o,className:a}=e,n=R.useContext(OF);let i;t[0]!==a||t[1]!==n?(i=Dt("flex-1 overflow-auto",n,a),t[0]=a,t[1]=n,t[2]=i):i=t[2];let l;return t[3]!==o||t[4]!==i?(l=T.jsx("div",{className:i,children:o}),t[3]=o,t[4]=i,t[5]=l):l=t[5],l}function boe(e){const t=Ne.c(10),{children:o,actions:a,className:n}=e;let i;t[0]!==n?(i=Dt("flex flex-wrap items-center justify-between gap-3",n),t[0]=n,t[1]=i):i=t[1];let l;t[2]!==o?(l=T.jsx("div",{className:"text-xl font-medium min-w-0",children:o}),t[2]=o,t[3]=l):l=t[3];let c;t[4]!==a?(c=a&&T.jsx("div",{className:"flex items-center gap-2",children:a}),t[4]=a,t[5]=c):c=t[5];let u;return t[6]!==i||t[7]!==l||t[8]!==c?(u=T.jsxs("div",{className:i,children:[l,c]}),t[6]=i,t[7]=l,t[8]=c,t[9]=u):u=t[9],u}function yoe(e){const t=Ne.c(6),{children:o,className:a,maxWidth:n}=e,i=n===void 0?"max-w-[1200px]":n;let l;t[0]!==a||t[1]!==i?(l=Dt("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",i,a),t[0]=a,t[1]=i,t[2]=l):l=t[2];let c;return t[3]!==o||t[4]!==l?(c=T.jsx("div",{className:l,children:o}),t[3]=o,t[4]=l,t[5]=c):c=t[5],c}const Ug=Object.assign(goe,{Header:Object.assign(foe,{Left:MF,Right:IF}),Content:voe,Title:boe,Body:yoe});var ge=typeof window<"u"?window:void 0,ea=typeof globalThis<"u"?globalThis:ge;typeof self>"u"&&(ea.self=ea),typeof File>"u"&&(ea.File=function(){});var Sn=ea?.navigator,Fe=ea?.document,ha=ea?.location,ZT=ea?.fetch,QT=ea!=null&&ea.XMLHttpRequest&&"withCredentials"in new ea.XMLHttpRequest?ea.XMLHttpRequest:void 0,PD=ea?.AbortController,Soe=ea?.CompressionStream,Xa=Sn?.userAgent,Je=ge??{},xD="1.372.3",za={DEBUG:!1,LIB_VERSION:xD,LIB_NAME:"web",JS_SDK_VERSION:xD};function ED(e,t,o,a,n,i,l){try{var c=e[i](l),u=c.value}catch(m){return void o(m)}c.done?t(u):Promise.resolve(u).then(a,n)}function zn(e){return function(){var t=this,o=arguments;return new Promise((function(a,n){var i=e.apply(t,o);function l(u){ED(i,a,n,l,c,"next",u)}function c(u){ED(i,a,n,l,c,"throw",u)}l(void 0)}))}}function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},Oe.apply(null,arguments)}function LF(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function JT(){return JT=zn((function*(e,t,o){t===void 0&&(t=!0);try{var a=new CompressionStream("gzip"),n=a.writable.getWriter(),i=n.write(new TextEncoder().encode(e)).then((()=>n.close())).catch((function(){var u=zn((function*(m){try{yield n.abort(m)}catch{}throw m}));return function(m){return u.apply(this,arguments)}})()),l=new Response(a.readable).blob(),[c]=yield Promise.all([l,i]);return c}catch(u){if(o!=null&&o.rethrow)throw u;return t&&console.error("Failed to gzip compress data",u),null}})),JT.apply(this,arguments)}var Toe=["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","pinterest","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"],kD=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var o=e.toLowerCase();return Toe.concat(t).some((a=>{var n=a.toLowerCase();return o.indexOf(n)!==-1}))},woe=["$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"];function _t(e,t){return e.indexOf(t)!==-1}var kv=function(e){return e.trim()},XT=function(e){return e.replace(/^\$/,"")},NF=Object.prototype,FF=NF.hasOwnProperty,Rv=NF.toString,Ot=Array.isArray||function(e){return Rv.call(e)==="[object Array]"},hi=e=>typeof e=="function",Do=e=>e===Object(e)&&!Ot(e),Fc=e=>{if(Do(e)){for(var t in e)if(FF.call(e,t))return!1;return!0}return!1},Ue=e=>e===void 0,To=e=>Rv.call(e)=="[object String]",qg=e=>To(e)&&e.trim().length===0,Pi=e=>e===null,Ct=e=>Ue(e)||Pi(e),Hn=e=>Rv.call(e)=="[object Number]"&&e==e,Ac=e=>Hn(e)&&e>0,Mr=e=>Rv.call(e)==="[object Boolean]",_oe=e=>e instanceof FormData,Coe=e=>_t(woe,e);function BF(e){return e===null||typeof e!="object"}function yf(e,t){return{}.toString.call(e)==="[object "+t+"]"}function pC(e){return typeof Event<"u"&&(function(t,o){try{return t instanceof o}catch{return!1}})(e,Event)}var Poe=[!0,"true",1,"1","yes"],o0=e=>_t(Poe,e),xoe=[!1,"false",0,"0","no"];function Ir(e,t,o,a,n){return t>o&&(a.warn("min cannot be greater than max."),t=o),Hn(e)?e>o?(a.warn(" cannot be greater than max: "+o+". Using max value instead."),o):t>e?(a.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(a.warn(" must be a number. using max or fallback. max: "+o+", fallback: "+n),Ir(n||o,t,o,a))}let Eoe=class{constructor(t){this.$t={},this.zt=t.zt,this.Ut=Ir(t.bucketSize,0,100,t.Gt),this.Wt=Ir(t.refillRate,0,this.Ut,t.Gt),this.Xt=Ir(t.refillInterval,0,864e5,t.Gt)}Jt(t,o){var a=Math.floor((o-t.lastAccess)/this.Xt);a>0&&(t.tokens=Math.min(t.tokens+a*this.Wt,this.Ut),t.lastAccess=t.lastAccess+a*this.Xt)}consumeRateLimit(t){var o,a=Date.now(),n=String(t),i=this.$t[n];return i?this.Jt(i,a):this.$t[n]=i={tokens:this.Ut,lastAccess:a},i.tokens===0||(i.tokens--,i.tokens===0&&((o=this.zt)==null||o.call(this,t)),i.tokens===0)}stop(){this.$t={}}};var vg,RD,a0,wn="Mobile",Sf="iOS",bi="Android",sd="Tablet",jF=bi+" "+sd,zF="iPad",UF="Apple",qF=UF+" Watch",Yu="Safari",ld="BlackBerry",$F="Samsung",VF=$F+"Browser",HF=$F+" Internet",fl="Chrome",koe=fl+" OS",GF=fl+" "+Sf,hC="Internet Explorer",KF=hC+" "+wn,gC="Opera",Roe=gC+" Mini",fC="Edge",WF="Microsoft "+fC,Kc="Firefox",YF=Kc+" "+Sf,hm="Nintendo",gm="PlayStation",Wc="Xbox",ZF=bi+" "+wn,QF=wn+" "+Yu,Bu="Windows",ew=Bu+" Phone",AD="Nokia",tw="Ouya",JF="Generic",Aoe=JF+" "+wn.toLowerCase(),XF=JF+" "+sd.toLowerCase(),ow="Konqueror",ja="(\\d+(\\.\\d+)?)",n0=new RegExp("Version/"+ja),Doe=new RegExp(Wc,"i"),Ooe=new RegExp(gm+" \\w+","i"),Moe=new RegExp(hm+" \\w+","i"),vC=new RegExp(ld+"|PlayBook|BB10","i"),Ioe={"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"},eB=function(e,t){return t=t||"",_t(e," OPR/")&&_t(e,"Mini")?Roe:_t(e," OPR/")?gC:vC.test(e)?ld:_t(e,"IE"+wn)||_t(e,"WPDesktop")?KF:_t(e,VF)?HF:_t(e,fC)||_t(e,"Edg/")?WF:_t(e,"FBIOS")?"Facebook "+wn:_t(e,"UCWEB")||_t(e,"UCBrowser")?"UC Browser":_t(e,"CriOS")?GF:_t(e,"CrMo")||_t(e,fl)?fl:_t(e,bi)&&_t(e,Yu)?ZF:_t(e,"FxiOS")?YF:_t(e.toLowerCase(),ow.toLowerCase())?ow:((o,a)=>a&&_t(a,UF)||(function(n){return _t(n,Yu)&&!_t(n,fl)&&!_t(n,bi)})(o))(e,t)?_t(e,wn)?QF:Yu:_t(e,Kc)?Kc:_t(e,"MSIE")||_t(e,"Trident/")?hC:_t(e,"Gecko")?Kc:""},Loe={[KF]:[new RegExp("rv:"+ja)],[WF]:[new RegExp(fC+"?\\/"+ja)],[fl]:[new RegExp("("+fl+"|CrMo)\\/"+ja)],[GF]:[new RegExp("CriOS\\/"+ja)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+ja)],[Yu]:[n0],[QF]:[n0],[gC]:[new RegExp("(Opera|OPR)\\/"+ja)],[Kc]:[new RegExp(Kc+"\\/"+ja)],[YF]:[new RegExp("FxiOS\\/"+ja)],[ow]:[new RegExp("Konqueror[:/]?"+ja,"i")],[ld]:[new RegExp(ld+" "+ja),n0],[ZF]:[new RegExp("android\\s"+ja,"i")],[HF]:[new RegExp(VF+"\\/"+ja)],[hC]:[new RegExp("(rv:|MSIE )"+ja)],Mozilla:[new RegExp("rv:"+ja)]},Noe=function(e,t){var o=eB(e,t),a=Loe[o];if(Ue(a))return null;for(var n=0;a.length>n;n++){var i=e.match(a[n]);if(i)return parseFloat(i[i.length-2])}return null},DD=[[new RegExp(Wc+"; "+Wc+" (.*?)[);]","i"),e=>[Wc,e&&e[1]||""]],[new RegExp(hm,"i"),[hm,""]],[new RegExp(gm,"i"),[gm,""]],[vC,[ld,""]],[new RegExp(Bu,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ew,""];if(new RegExp(wn).test(t)&&!/IEMobile\b/.test(t))return[Bu+" "+wn,""];var o=/Windows NT ([0-9.]+)/i.exec(t);if(o&&o[1]){var a=Ioe[o[1]]||"";return/arm/i.test(t)&&(a="RT"),[Bu,a]}return[Bu,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Sf,[e[3],e[4],e[5]||"0"].join(".")]:[Sf,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=Ue(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+bi+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+bi+")","i"),e=>e&&e[2]?[bi,[e[2],e[3],e[4]||"0"].join(".")]:[bi,""]],[/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/,[koe,""]],[/Linux|debian/i,["Linux",""]]],OD=function(e){return Moe.test(e)?hm:Ooe.test(e)?gm:Doe.test(e)?Wc:new RegExp(tw,"i").test(e)?tw:new RegExp("("+ew+"|WPDesktop)","i").test(e)?ew:/iPad/.test(e)?zF:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?qF:vC.test(e)?ld:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(AD,"i").test(e)?AD:/(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(wn).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)?bi:jF:new RegExp("(pda|"+wn+")","i").test(e)?Aoe:new RegExp(sd,"i").test(e)&&!new RegExp(sd+" pc","i").test(e)?XF:""},Foe=e=>e instanceof Error,tB={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}},Boe=tB.info;function oB(e){if(Mr(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(Ot(e))return{arrayValue:{values:e.map((t=>oB(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function MD(e){var t=[];for(var o in e){var a=e[o];Pi(a)||Ue(a)||t.push({key:o,value:oB(a)})}return t}function joe(e){var t=globalThis._posthogChunkIds;if(t){var o=Object.keys(t);return a0&&o.length===RD||(RD=o.length,a0=o.reduce(((a,n)=>{vg||(vg={});var i=vg[n];if(i)a[i[0]]=i[1];else for(var l=e(n),c=l.length-1;c>=0;c--){var u=l[c],m=u?.filename,h=t[n];if(m&&h){a[m]=h,vg[n]=[m,h];break}}return a}),{})),a0}}class zoe{constructor(t,o,a){a===void 0&&(a=[]),this.coercers=t,this.stackParser=o,this.modifiers=a}buildFromUnknown(t,o){o===void 0&&(o={});var a=o&&o.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(a,o,0).apply(t),i=this.buildParsingContext(o),l=this.parseStacktrace(n,i);return{$exception_list:this.convertToExceptionList(l,a),$exception_level:"error"}}modifyFrames(t){var o=this;return zn((function*(){for(var a of t)a.stacktrace&&a.stacktrace.frames&&Ot(a.stacktrace.frames)&&(a.stacktrace.frames=yield o.applyModifiers(a.stacktrace.frames));return t}))()}coerceFallback(t){var o;return{type:"Error",value:"Unknown error",stack:(o=t.syntheticException)==null?void 0:o.stack,synthetic:!0}}parseStacktrace(t,o){var a,n;return t.cause!=null&&(a=this.parseStacktrace(t.cause,o)),t.stack!=""&&t.stack!=null&&(n=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?o.skipFirstLines:0),o.chunkIdMap)),Oe({},t,{cause:a,stack:n})}applyChunkIds(t,o){return t.map((a=>(a.filename&&o&&(a.chunk_id=o[a.filename]),a)))}applyCoercers(t,o){for(var a of this.coercers)if(a.match(t))return a.coerce(t,o);return this.coerceFallback(o)}applyModifiers(t){var o=this;return zn((function*(){var a=t;for(var n of o.modifiers)a=yield n(a);return a}))()}convertToExceptionList(t,o){var a,n,i,l={type:t.type,value:t.value,mechanism:{type:(a=o.type)!==null&&a!==void 0?a:"generic",handled:(n=o.handled)===null||n===void 0||n,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(l.stacktrace={type:"raw",frames:t.stack});var c=[l];return t.cause!=null&&c.push(...this.convertToExceptionList(t.cause,Oe({},o,{handled:!0}))),c}buildParsingContext(t){var o;return{chunkIdMap:joe(this.stackParser),skipFirstLines:(o=t.skipFirstLines)!==null&&o!==void 0?o:1}}buildCoercingContext(t,o,a){a===void 0&&(a=0);var n=(i,l)=>{if(4>=l){var c=this.buildCoercingContext(t,o,l);return this.applyCoercers(i,c)}};return Oe({},o,{syntheticException:a==0?o.syntheticException:void 0,mechanism:t,apply:i=>n(i,a),next:i=>n(i,a+1)})}}var cd="?";function aw(e,t,o,a,n){var i={platform:e,filename:t,function:o==="<anonymous>"?cd:o,in_app:!0};return Ue(a)||(i.lineno=a),Ue(n)||(i.colno=n),i}var aB=(e,t)=>{var o=e.indexOf("safari-extension")!==-1,a=e.indexOf("safari-web-extension")!==-1;return o||a?[e.indexOf("@")!==-1?e.split("@")[0]:cd,o?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},Uoe=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,qoe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,$oe=/\((\S*)(?::(\d+))(?::(\d+))\)/,Voe=(e,t)=>{var o=Uoe.exec(e);if(o){var[,a,n,i]=o;return aw(t,a,cd,+n,+i)}var l=qoe.exec(e);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=$oe.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[u,m]=aB(l[1]||cd,l[2]);return aw(t,m,u,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},Hoe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Goe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Koe=(e,t)=>{var o=Hoe.exec(e);if(o){if(o[3]&&o[3].indexOf(" > eval")>-1){var a=Goe.exec(o[3]);a&&(o[1]=o[1]||"eval",o[3]=a[1],o[4]=a[2],o[5]="")}var n=o[3],i=o[1]||cd;return[i,n]=aB(i,n),aw(t,n,i,o[4]?+o[4]:void 0,o[5]?+o[5]:void 0)}},ID=/\(error: (.*)\)/;let Woe=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,o){var a=To(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:a?t.stack:void 0,cause:t.cause?o.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var o=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?o+": "+t.message:o}isDOMException(t){return yf(t,"DOMException")}isDOMError(t){return yf(t,"DOMError")}};class Yoe{match(t){return(o=>o instanceof Error)(t)}coerce(t,o){return{type:this.getType(t),value:this.getMessage(t,o),stack:this.getStack(t),cause:t.cause?o.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,o){var a=t.message;return String(a.error&&typeof a.error.message=="string"?a.error.message:a)}getStack(t){return t.stacktrace||t.stack||void 0}}let Zoe=class{constructor(){}match(t){return yf(t,"ErrorEvent")&&t.error!=null}coerce(t,o){var a;return o.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}};var Qoe=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let Joe=class{match(t){return typeof t=="string"}coerce(t,o){var a,[n,i]=this.getInfos(t);return{type:n??"Error",value:i??t,stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}getInfos(t){var o="Error",a=t,n=t.match(Qoe);return n&&(o=n[1],a=n[2]),[o,a]}};var Xoe=["fatal","error","warning","log","info","debug"];function nB(e,t){t===void 0&&(t=40);var o=Object.keys(e);if(o.sort(),!o.length)return"[object has no keys]";for(var a=o.length;a>0;a--){var n=o.slice(0,a).join(", ");if(t>=n.length)return a===o.length?n:n.length>t?n.slice(0,t)+"...":n}return""}let eae=class{match(t){return typeof t=="object"&&t!==null}coerce(t,o){var a,n=this.getErrorPropertyFromObject(t);return n?o.apply(n):{type:this.getType(t),value:this.getValue(t),stack:(a=o.syntheticException)==null?void 0:a.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return pC(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var o="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(o+=" with message: '"+t.message+"'"),o}if("message"in t&&typeof t.message=="string")return t.message;var a=this.getObjectClassName(t);return(a&&a!=="Object"?"'"+a+"'":"Object")+" captured as exception with keys: "+nB(t)}isSeverityLevel(t){return To(t)&&!qg(t)&&Xoe.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var o in t)if({}.hasOwnProperty.call(t,o)){var a=t[o];if(Foe(a))return a}}getObjectClassName(t){try{var o=Object.getPrototypeOf(t);return o?o.constructor.name:void 0}catch{return}}},tae=class{match(t){return pC(t)}coerce(t,o){var a,n=t.constructor.name;return{type:n,value:n+" captured as exception with keys: "+nB(t),stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}},oae=class{match(t){return BF(t)}coerce(t,o){var a;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}},aae=class{match(t){return yf(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!pC(t))return!1;try{var o=t.detail;return o!=null&&typeof o=="object"&&"reason"in o}catch{return!1}}coerce(t,o){var a,n=this.getUnhandledRejectionReason(t);return BF(n)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(n),stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}:o.apply(n)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}};var Tf="$message",wf="$timestamp",nae=new Set([Tf,wf]),r0={enabled:!0,max_bytes:32768};function _f(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:r0.enabled,max_bytes:iae(e.max_bytes,r0.max_bytes)}:Oe({},r0)}let rae=class{constructor(t){this.Kt=[],this.Qt=0,this.Bt=_f(t)}setConfig(t){this.Bt=_f(t),this.er()}add(t){var o=(function(n){var i=(function(h){var p=new WeakSet;try{return JSON.stringify(h,((f,v)=>{if(typeof v=="bigint")return v.toString();if(typeof v!="function"&&typeof v!="symbol"){if(v instanceof Date)return v.toISOString();if(v instanceof Error)return{name:v.name,message:v.message,stack:v.stack};if(v&&typeof v=="object"){if(p.has(v))return"[Circular]";p.add(v)}return v}}))}catch{return}})(n);if(i)try{var l=JSON.parse(i);if(!Do(l))return;var c=l,u=c[Tf],m=c[wf];return!To(u)||u.trim().length===0||!To(m)&&!Hn(m)?void 0:{step:c,json:i}}catch{return}})(t);if(o){var a=(function(n){if(typeof TextEncoder<"u")return new TextEncoder().encode(n).length;for(var i=encodeURIComponent(n),l=0,c=0;i.length>c;c++)i[c]==="%"?(l+=1,c+=2):l+=1;return l})(o.json);a>this.Bt.max_bytes||(this.Kt.push({step:o.step,bytes:a}),this.Qt+=a,this.er())}}getAttachable(){return this.Kt.map((t=>t.step))}clear(){this.Kt=[],this.Qt=0}size(){return this.Kt.length}er(){for(;this.Qt>this.Bt.max_bytes&&this.Kt.length>0;){var t=this.Kt.shift();t&&(this.Qt-=t.bytes)}}};function iae(e,t){if(!Hn(e)||e===1/0||e===-1/0)return t;var o=Math.floor(e);return 0>o?t:o}var rB=function(e,t){var{debugEnabled:o}=t===void 0?{}:t,a={C(n){if(ge&&(za.DEBUG||Je.POSTHOG_DEBUG||o)&&!Ue(ge.console)&&ge.console){for(var i=("__rrweb_original__"in ge.console[n])?ge.console[n].__rrweb_original__:ge.console[n],l=arguments.length,c=new Array(l>1?l-1:0),u=1;l>u;u++)c[u-1]=arguments[u];i(e,...c)}},info(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];a.C("log",...i)},warn(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];a.C("warn",...i)},error(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];a.C("error",...i)},critical(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];console.error(e,...i)},uninitializedWarning(n){a.error("You must initialize PostHog before calling "+n)},createLogger:(n,i)=>rB(e+" "+n,i)};return a},Be=rB("[PostHog.js]"),vo=Be.createLogger,sae=vo("[ExternalScriptsLoader]"),i0=(e,t,o)=>{if(e.config.disable_external_dependency_loading)return sae.warn(t+" was requested but loading of external scripts is disabled."),o("Loading of external scripts is disabled");var a=Fe?.querySelectorAll("script");if(a){for(var n,i=function(){if(a[l].src===t){var u=a[l];return u.__posthog_loading_callback_fired?{v:o()}:(u.addEventListener("load",(m=>{u.__posthog_loading_callback_fired=!0,o(void 0,m)})),u.onerror=m=>o(m),{v:void 0})}},l=0;a.length>l;l++)if(n=i())return n.v}var c=()=>{if(!Fe)return o("document not found");var u=Fe.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=t,u.onload=p=>{u.__posthog_loading_callback_fired=!0,o(void 0,p)},u.onerror=p=>o(p),e.config.prepare_external_dependency_script&&(u=e.config.prepare_external_dependency_script(u)),!u)return o("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")Fe.head.appendChild(u);else{var m,h=Fe.querySelectorAll("body > script");h.length>0?(m=h[0].parentNode)==null||m.insertBefore(u,h[0]):Fe.body.appendChild(u)}};Fe!=null&&Fe.body?c():Fe?.addEventListener("DOMContentLoaded",c)};Je.__PosthogExtensions__=Je.__PosthogExtensions__||{},Je.__PosthogExtensions__.loadExternalDependency=(e,t,o)=>{if(t!=="remote-config"){var a;if(e.config.__preview_external_dependency_versioned_paths)a=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var n="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var i=3e5;n=n+"&t="+Math.floor(Date.now()/i)*i}a=e.requestRouter.endpointFor("assets",n)}i0(e,a,o)}else{var l=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");i0(e,l,o)}},Je.__PosthogExtensions__.loadSiteApp=(e,t,o)=>{var a=e.requestRouter.endpointFor("api",t);i0(e,a,o)};var iB="$people_distinct_id",Cf="$device_id",ju="__alias",zu="__timers",nw="$autocapture_disabled_server_side",rw="$heatmaps_enabled_server_side",iw="$exception_capture_enabled_server_side",sw="$error_tracking_suppression_rules",lw="$error_tracking_capture_extension_exceptions",cw="$web_vitals_enabled_server_side",bC="$dead_clicks_enabled_server_side",dw="$product_tours_enabled_server_side",uw="$web_vitals_allowed_metrics",Uu="$session_recording_remote_config",sB="$replay_override_sampling",lB="$replay_override_linked_flag",cB="$replay_override_url_trigger",dB="$replay_override_event_trigger",Pf="$sesid",yC="$session_is_sampled",Bc="$enabled_feature_flags",$g="$active_feature_flags",qu="$early_access_features",mw="$feature_flag_details",pw="$feature_flag_payloads",hw="$feature_flag_request_id",pi="$override_feature_flags",Dc="$override_feature_flag_payloads",$u="$stored_person_properties",sl="$stored_group_properties",gw="$surveys",fw="$surveys_activated",Vg="ph_product_tours",Zu="$flag_call_reported",vw="$flag_call_reported_session_id",bw="$feature_flag_errors",xf="$feature_flag_evaluated_at",ar="$user_state",yw="$client_session_props",Sw="$capture_rate_limit",Tw="$initial_campaign_params",ww="$initial_referrer_info",Ef="$initial_person_info",kf="$epp",uB="__POSTHOG_TOOLBAR__",bg="$posthog_cookieless",mB="$sdk_debug_extensions_init_method",pB="$sdk_debug_extensions_init_time_ms",hB="$sdk_debug_recording_script_not_loaded",SC="PostHog loadExternalDependency extension not found.",ll="on_reject",gi="always",Sc="anonymous",Tc="identified",_w="identified_only",Rf="visibilitychange",Af="beforeunload",Oc="$pageview",s0="$pageleave",l0="$identify",LD="$groupidentify";function yg(e,t){Ot(e)&&e.forEach(t)}function uo(e,t){if(!Ct(e))if(Ot(e))e.forEach(t);else if(_oe(e))e.forEach(((a,n)=>t(a,n)));else for(var o in e)FF.call(e,o)&&t(e[o],o)}var Eo=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),a=1;t>a;a++)o[a-1]=arguments[a];for(var n of o)for(var i in n)n[i]!==void 0&&(e[i]=n[i]);return e};function Hg(e){for(var t=Object.keys(e),o=t.length,a=new Array(o);o--;)a[o]=[t[o],e[t[o]]];return a}var ND=function(e){try{return e()}catch{return}},lae=function(e){return function(){try{for(var t=arguments.length,o=new Array(t),a=0;t>a;a++)o[a]=arguments[a];return e.apply(this,o)}catch(n){Be.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Be.critical(n)}}},TC=function(e){var t={};return uo(e,(function(o,a){(To(o)&&o.length>0||Hn(o))&&(t[a]=o)})),t},cae=["herokuapp.com","vercel.app","netlify.app"];function dae(e){var t=e?.hostname;if(!To(t))return!1;var o=t.split(".").slice(-2).join(".");for(var a of cae)if(o===a)return!1;return!0}function Ho(e,t,o,a){var{capture:n=!1,passive:i=!0}=a??{};e?.addEventListener(t,o,{capture:n,passive:i})}function gB(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Hn(e)&&isFinite(e)&&Math.floor(e)===e});class Df{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,o,a,n){if(!Number.isInteger(t)||!Number.isInteger(o)||!Number.isInteger(a)||!Number.isInteger(n)||0>t||0>o||0>a||0>n||t>0xffffffffffff||o>4095||a>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|o>>>8,i[7]=o,i[8]=128|a>>>24,i[9]=a>>>16,i[10]=a>>>8,i[11]=a,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new Df(i)}toString(){for(var t="",o=0;this.bytes.length>o;o++)t=t+(this.bytes[o]>>>4).toString(16)+(15&this.bytes[o]).toString(16),o!==3&&o!==5&&o!==7&&o!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new Df(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var o=0;16>o;o++){var a=this.bytes[o]-t.bytes[o];if(a!==0)return Math.sign(a)}return 0}}class uae{constructor(){this.I=0,this.S=0,this.k=new mae}generate(){var t=this.generateOrAbort();if(Ue(t)){this.I=0;var o=this.generateOrAbort();if(Ue(o))throw new Error("Could not generate UUID after timestamp reset");return o}return t}generateOrAbort(){var t=Date.now();if(t>this.I)this.I=t,this.A();else{if(this.I>=t+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return Df.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var FD,fB=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new 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};ge&&!Ue(ge.crypto)&&crypto.getRandomValues&&(fB=e=>crypto.getRandomValues(e));class mae{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(fB(this.T),this.N=0),this.T[this.N++]}}var ms=()=>pae().toString(),pae=()=>(FD||(FD=new uae)).generate(),wu="",hae=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Or={R:()=>!!Fe,B(e){Be.error("cookieStore error: "+e)},O(e){if(Fe){try{for(var t=e+"=",o=Fe.cookie.split(";").filter((i=>i.length)),a=0;o.length>a;a++){for(var n=o[a];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(t)===0)return decodeURIComponent(n.substring(t.length,n.length))}}catch{}return null}},Z(e){var t;try{t=JSON.parse(Or.O(e))||{}}catch{}return t},M(e,t,o,a,n){if(Fe)try{var i="",l="",c=(function(h,p){if(p){var f=(function(b,S){if(S===void 0&&(S=Fe),wu)return wu;if(!S||["localhost","127.0.0.1"].includes(b))return"";for(var C=b.split("."),w=Math.min(C.length,8),_="dmn_chk_"+ms();!wu&&w--;){var k=C.slice(w).join("."),x=_+"=1;domain=."+k+";path=/";S.cookie=x+";max-age=3",S.cookie.includes(_)&&(S.cookie=x+";max-age=0",wu=k)}return wu})(h);if(!f){var v=(b=>{var S=b.match(hae);return S?S[0]:""})(h);v!==f&&Be.info("Warning: cookie subdomain discovery mismatch",v,f),f=v}return f?"; domain=."+f:""}return""})(Fe.location.hostname,a);if(o){var u=new Date;u.setTime(u.getTime()+864e5*o),i="; expires="+u.toUTCString()}n&&(l="; secure");var m=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+c+l;return m.length>3686.4&&Be.warn("cookieStore warning: large cookie, len="+m.length),Fe.cookie=m,m}catch{return}},F(e,t){if(Fe!=null&&Fe.cookie)try{Or.M(e,"",-1,t)}catch{return}}},c0=null,So={R(){if(!Pi(c0))return c0;var e=!0;if(Ue(ge))e=!1;else try{var t="__mplssupport__";So.M(t,"xyz"),So.O(t)!=='"xyz"'&&(e=!1),So.F(t)}catch{e=!1}return e||Be.error("localStorage unsupported; falling back to cookie store"),c0=e,e},B(e){Be.error("localStorage error: "+e)},O(e){try{return ge?.localStorage.getItem(e)}catch(t){So.B(t)}return null},Z(e){try{return JSON.parse(So.O(e))||{}}catch{}return null},M(e,t){try{ge?.localStorage.setItem(e,JSON.stringify(t))}catch(o){So.B(o)}},F(e){try{ge?.localStorage.removeItem(e)}catch(t){So.B(t)}}},gae=[Cf,"distinct_id",Pf,yC,kf,Ef,ar],Sg={},fae={R:()=>!0,B(e){Be.error("memoryStorage error: "+e)},O:e=>Sg[e]||null,Z:e=>Sg[e]||null,M(e,t){Sg[e]=t},F(e){delete Sg[e]}},ol=null,ga={R(){if(!Pi(ol))return ol;if(ol=!0,Ue(ge))ol=!1;else try{var e="__support__";ga.M(e,"xyz"),ga.O(e)!=='"xyz"'&&(ol=!1),ga.F(e)}catch{ol=!1}return ol},B(e){Be.error("sessionStorage error: ",e)},O(e){try{return ge?.sessionStorage.getItem(e)}catch(t){ga.B(t)}return null},Z(e){try{return JSON.parse(ga.O(e))||null}catch{}return null},M(e,t){try{ge?.sessionStorage.setItem(e,JSON.stringify(t))}catch(o){ga.B(o)}},F(e){try{ge?.sessionStorage.removeItem(e)}catch(t){ga.B(t)}}};class vae{constructor(t){this._instance=t}get Bt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.Bt.cookieless_mode===gi||this.isRejected()||this.consent===-1&&this.Bt.cookieless_mode===ll}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Bt.opt_out_capturing_by_default}optInOut(t){this.nr.M(this.sr,t?1:0,this.Bt.cookie_expiration,this.Bt.cross_subdomain_cookie,this.Bt.secure_cookie)}reset(){this.nr.F(this.sr,this.Bt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:o,consent_persistence_name:a}=this._instance.config;return a||(o?o+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.O(this.sr);return o0(t)?1:_t(xoe,t)?0:-1}get nr(){var t=this.Bt.opt_out_capturing_persistence_type,o=t==="localStorage"?So:Or;if(!this.ar||this.ar!==o){this.ar=o;var a=t==="localStorage"?Or:So;a.O(this.sr)&&(this.ar.O(this.sr)||this.optInOut(o0(a.O(this.sr))),a.F(this.sr,this.Bt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.Bt.respect_dnt&&[Sn?.doNotTrack,Sn?.msDoNotTrack,Je.doNotTrack].some((t=>o0(t)))}}var Tg=vo("[Dead Clicks]"),bae=()=>!0,yae=e=>{var t,o=!((t=e.instance.persistence)==null||!t.get_property(bC)),a=e.instance.config.capture_dead_clicks;return Mr(a)?a:!!Do(a)||o};class BD{get lazyLoadedDeadClicksAutocapture(){return this.lr}constructor(t,o,a){this.instance=t,this.isEnabled=o,this.onCapture=a,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[bC]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ur((()=>{this.hr()})):this.stop()}ur(t){var o,a;(o=Je.__PosthogExtensions__)!=null&&o.initDeadClicksAutocapture&&t(),(a=Je.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this.instance,"dead-clicks-autocapture",(n=>{n?Tg.error("failed to load script",n):t()}))}hr(){var t;if(Fe){if(!this.lr&&(t=Je.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var o=Do(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};o.__onCapture=this.onCapture,this.lr=Je.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,o),this.lr.start(Fe),Tg.info("starting...")}}else Tg.error("`document` not found. Cannot start.")}stop(){this.lr&&(this.lr.stop(),this.lr=void 0,Tg.info("stopping..."))}}var d0=vo("[SegmentIntegration]"),vB="posthog-js";function bB(e,t){var{organization:o,projectId:a,prefix:n,severityAllowList:i=["error"],sendExceptionsToPostHog:l=!0}=t===void 0?{}:t;return c=>{var u,m,h,p,f;if(i!=="*"&&!i.includes(c.level)||!e.__loaded)return c;c.tags||(c.tags={});var v=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());c.tags["PostHog Person URL"]=v,e.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var b,S=((u=c.exception)==null?void 0:u.values)||[],C=S.map((_=>Oe({},_,{stacktrace:_.stacktrace?Oe({},_.stacktrace,{type:"raw",frames:(_.stacktrace.frames||[]).map((k=>Oe({},k,{platform:"web:javascript"})))}):void 0}))),w={$exception_message:((m=S[0])==null?void 0:m.value)||c.message,$exception_type:(h=S[0])==null?void 0:h.type,$exception_level:c.level,$exception_list:C,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((p=S[0])==null?void 0:p.value)||c.message,$sentry_exception_type:(f=S[0])==null?void 0:f.type,$sentry_tags:c.tags};return o&&a&&(w.$sentry_url=(n||"https://sentry.io/organizations/")+o+"/issues/?project="+a+"&query="+c.event_id),l&&((b=e.exceptions)==null||b.sendExceptionEvent(w)),c}}class Sae{constructor(t,o,a,n,i,l){this.name=vB,this.setupOnce=function(c){c(bB(t,{organization:o,projectId:a,prefix:n,severityAllowList:i,sendExceptionsToPostHog:l==null||l}))}}}class jD{constructor(t){this.cr=(o,a,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength)&&(Be.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:o,changeReason:n}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,o){var a,n=this.gr(t,o);return this.dr={pathname:(a=ge?.location.pathname)!==null&&a!==void 0?a:"",pageViewId:o,timestamp:t},this._instance.scrollManager.resetContext(),n}doPageLeave(t){var o;return this.gr(t,(o=this.dr)==null?void 0:o.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,o){var a=this.dr;if(!a)return{$pageview_id:o};var n={$pageview_id:o,$prev_pageview_id:a.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:u,maxContentHeight:m,lastContentY:h,maxContentY:p}=i;if(!(Ue(l)||Ue(c)||Ue(u)||Ue(m)||Ue(h)||Ue(p))){l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),m=Math.ceil(m),h=Math.ceil(h),p=Math.ceil(p);var f=l>1?Ir(c/l,0,1,Be):1,v=l>1?Ir(u/l,0,1,Be):1,b=m>1?Ir(h/m,0,1,Be):1,S=m>1?Ir(p/m,0,1,Be):1;n=Eo(n,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:h,$prev_pageview_last_content_percentage:b,$prev_pageview_max_content:p,$prev_pageview_max_content_percentage:S})}}return a.pathname&&(n.$prev_pageview_pathname=a.pathname),a.timestamp&&(n.$prev_pageview_duration=(t.getTime()-a.timestamp.getTime())/1e3),n}}var Tae={[iB]:{exposure:"hidden"},[ju]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[zu]:{exposure:"hidden"},[nw]:{exposure:"event"},[rw]:{exposure:"hidden"},[iw]:{exposure:"event"},[sw]:{exposure:"hidden"},[lw]:{exposure:"event"},[cw]:{exposure:"event"},[bC]:{exposure:"event"},[dw]:{exposure:"hidden"},[uw]:{exposure:"event"},[Uu]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[Pf]:{exposure:"hidden"},[yC]:{exposure:"event"},$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"},[Bc]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!Do(e))return{};for(var t={},o=Object.keys(e),a=0;o.length>a;a++)t["$feature/"+o[a]]=e[o[a]];return t}},[$g]:{exposure:"event"},[qu]:{exposure:"hidden"},[mw]:{exposure:"hidden"},[pw]:{exposure:"event"},[hw]:{exposure:"event"},[pi]:{exposure:"event"},[Dc]:{exposure:"hidden"},[$u]:{exposure:"hidden"},[sl]:{exposure:"hidden"},[gw]:{exposure:"hidden"},[fw]:{exposure:"event"},[Vg]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Zu]:{exposure:"hidden"},[vw]:{exposure:"hidden"},[bw]:{exposure:"hidden"},[xf]:{exposure:"hidden"},[ar]:{exposure:"hidden"},[yw]:{exposure:"hidden"},[Sw]:{exposure:"hidden"},[Tw]:{exposure:"hidden"},[ww]:{exposure:"hidden"},[Ef]:{exposure:"hidden"},[kf]:{exposure:"hidden"},[sB]:{exposure:"event"},[lB]:{exposure:"event"},[cB]:{exposure:"event"},[dB]:{exposure:"event"},[mB]:{exposure:"event"},[pB]:{exposure:"event"},[hB]:{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_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"}},wae=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Of=e=>{var t=Fe?.createElement("a");return Ue(t)?null:(t.href=e,t)},Mf=function(e,t){for(var o,a=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),n=0;a.length>n;n++){var i=a[n].split("=");if(i[0]===t){o=i;break}}if(!Ot(o)||2>o.length)return"";var l=o[1];try{l=decodeURIComponent(l)}catch{Be.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},fm=function(e,t,o){if(!e||!t||!t.length)return e;for(var a=e.split("#"),n=a[1],i=(a[0]||"").split("?"),l=i[1],c=i[0],u=(l||"").split("&"),m=[],h=0;u.length>h;h++){var p=u[h].split("=");Ot(p)&&(t.includes(p[0])?m.push(p[0]+"="+o):m.push(u[h]))}var f=c;return l!=null&&(f+="?"+m.join("&")),n!=null&&(f+="#"+n),f},If=function(e,t){var o=e.match(new RegExp(t+"=([^&]*)"));return o?o[1]:null},wg="https?://(.*)",dd=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],_ae=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...dd],vm="<masked>",Cae=["li_fat_id"];function yB(e,t,o){if(!Fe)return{};var a,n=t?[...dd,...o||[]]:[],i=SB(fm(Fe.URL,n,vm),e),l=(a={},uo(Cae,(function(c){var u=Or.O(c);a[c]=u||null})),a);return Eo(l,i)}function SB(e,t){var o=_ae.concat(t||[]),a={};return uo(o,(function(n){var i=Mf(e,n);a[n]=i||null})),a}function TB(e){var t=(function(i){return i?i.search(wg+"google.([^/?]*)")===0?"google":i.search(wg+"bing.com")===0?"bing":i.search(wg+"yahoo.com")===0?"yahoo":i.search(wg+"duckduckgo.com")===0?"duckduckgo":null:null})(e),o=t!="yahoo"?"q":"p",a={};if(!Pi(t)){a.$search_engine=t;var n=Fe?Mf(Fe.referrer,o):"";n.length&&(a.ph_keyword=n)}return a}function zD(){return navigator.language||navigator.userLanguage}var Lf="$direct";function wB(){return Fe?.referrer||Lf}function _B(e,t){var o=e?[...dd,...t||[]]:[],a=ha?.href.substring(0,1e3);return{r:wB().substring(0,1e3),u:a?fm(a,o,vm):void 0}}function CB(e){var t,{r:o,u:a}=e,n={$referrer:o,$referring_domain:o==null?void 0:o==Lf?Lf:(t=Of(o))==null?void 0:t.host};if(a){n.$current_url=a;var i=Of(a);n.$host=i?.host,n.$pathname=i?.pathname;var l=SB(a);Eo(n,l)}if(o){var c=TB(o);Eo(n,c)}return n}function PB(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Pae(){try{return new Date().getTimezoneOffset()}catch{return}}var xae=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class u0{constructor(t,o){this.Bt=t,this.props={},this.mr=!1,this.yr=(a=>{var n="";return a.token&&(n=a.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),a.persistence_name?"ph_"+a.persistence_name:"ph_"+n+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&Be.info("Persistence loaded",t.persistence,Oe({},this.props)),this.update_config(t,t,o),this.save()}isDisabled(){return!!this._r}br(t){xae.indexOf(t.persistence.toLowerCase())===-1&&(Be.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var o=(function(n){n===void 0&&(n=[]);var i=[...gae,...n];return Oe({},So,{Z(l){try{var c={};try{c=Or.Z(l)||{}}catch{}var u=Eo(c,JSON.parse(So.O(l)||"{}"));return So.M(l,u),u}catch{}return null},M(l,c,u,m,h,p){try{So.M(l,c,void 0,void 0,p);var f={};i.forEach((v=>{c[v]&&(f[v]=c[v])})),Object.keys(f).length&&Or.M(l,f,u,m,h,p)}catch(v){So.B(v)}},F(l,c){try{ge?.localStorage.removeItem(l),Or.F(l,c)}catch(u){So.B(u)}}})})(t.cookie_persisted_properties||[]),a=t.persistence.toLowerCase();return a==="localstorage"&&So.R()?So:a==="localstorage+cookie"&&o.R()?o:a==="sessionstorage"&&ga.R()?ga:a==="memory"?fae:a==="cookie"?Or:o.R()?o:Or}wr(t){var o=t??this.Bt.feature_flag_cache_ttl_ms;if(!o||0>=o)return!1;var a=this.props[xf];return!a||typeof a!="number"||Date.now()-a>o}properties(){var t={};return uo(this.props,((o,a)=>{var n=(i=>{var l=Tae[i];if(l)return l;for(var[c,u]of wae)if(i.indexOf(c)===0)return u})(a);if(n?.exposure==="derived"){if(n.shouldSkipFromEventProperties!=null&&n.shouldSkipFromEventProperties(o,a===Bc?()=>this.wr():()=>!1))return;n.transformToEventProperties&&Eo(t,n.transformToEventProperties(o))}else n&&n.exposure!=="event"||(t[a]=o)})),t}load(){if(!this._r){var t=this.nr.Z(this.yr);t&&(this.props=Eo({},t))}}save(){this._r||this.nr.M(this.yr,this.props,this.Ir,this.Cr,this.Sr,this.Bt.debug)}remove(){this.nr.F(this.yr,!1),this.nr.F(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(t,o,a){if(Do(t)){Ue(o)&&(o="None"),this.Ir=Ue(a)?this.kr:a;var n=!1;if(uo(t,((i,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==o||(this.Tr(l,i),n=!0)})),n)return this.save(),!0}return!1}register(t,o){if(Do(t)){this.Ir=Ue(o)?this.kr:o;var a=!1;if(uo(t,((n,i)=>{t.hasOwnProperty(i)&&this.props[i]!==n&&(this.Tr(i,n),a=!0)})),a)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Ar(t),this.save())}update_campaign_params(){if(!this.mr){var t=yB(this.Bt.custom_campaign_params,this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties);Fc(TC(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=Fe?.referrer)?TB(t):{})}update_referrer_info(){var t;this.register_once({$referrer:wB(),$referring_domain:Fe!=null&&Fe.referrer&&((t=Of(Fe.referrer))==null?void 0:t.host)||Lf},void 0)}set_initial_person_info(){this.props[Tw]||this.props[ww]||this.register_once({[Ef]:_B(this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};uo([ww,Tw],(l=>{var c=this.props[l];c&&uo(c,(function(u,m){t["$initial_"+XT(m)]=u}))}));var o,a,n=this.props[Ef];if(n){var i=(o=CB(n),a={},uo(o,(function(l,c){a["$initial_"+XT(c)]=l})),a);Eo(t,i)}return t}safe_merge(t){return uo(this.props,(function(o,a){a in t||(t[a]=o)})),t}update_config(t,o,a){if(this.kr=this.Ir=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!a),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==o.persistence||!((l,c)=>{if(l.length!==c.length)return!1;var u=[...l].sort(),m=[...c].sort();return u.every(((h,p)=>h===m[p]))})(t.cookie_persisted_properties||[],o.cookie_persisted_properties||[])){var n=this.br(t),i=this.props;this.clear(),this.nr=n,this.props=i,this.save()}}set_disabled(t){this._r=t,this._r?this.remove():this.save()}set_cross_subdomain(t){t!==this.Cr&&(this.Cr=t,this.remove(),this.save())}set_secure(t){t!==this.Sr&&(this.Sr=t,this.remove(),this.save())}set_event_timer(t,o){var a=this.props[zu]||{};a[t]=o,this.Tr(zu,a),this.save()}remove_event_timer(t){var o=this.props[zu]||{},a=o[t];return Ue(a)||(delete o[t],this.Tr(zu,o),this.save()),a}get_property(t){return this.props[t]}set_property(t,o){this.Tr(t,o),this.save()}Tr(t,o){this.props[t]=o}Ar(t){delete this.props[t]}}var _u={Activation:"events",Cancellation:"cancelEvents"},m0={Popover:"popover",API:"api",Widget:"widget"},Vu={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},p0={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Cw={Popover:"popover",Inline:"inline"},Eae={SHOWN:"product tour shown"},UD={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},qD=vo("[RateLimiter]");class kae{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=o=>{var a=o.text;if(a&&a.length)try{(JSON.parse(a).quota_limited||[]).forEach((n=>{qD.info((n||"events")+" is quota limited."),this.serverLimits[n]=new Date().getTime()+6e4}))}catch(n){return void qD.warn('could not rate limit - continuing. Error: "'+n?.message+'"',{text:a})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var o,a,n;t===void 0&&(t=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:l}=this,c=new Date().getTime(),u=(o=(a=this.instance.persistence)==null?void 0:a.get_property(Sw))!==null&&o!==void 0?o:{tokens:i,last:c};u.tokens+=(c-u.last)/1e3*l,u.last=c,u.tokens>i&&(u.tokens=i);var m=1>u.tokens;return m||t||(u.tokens=Math.max(0,u.tokens-1)),!m||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=m,(n=this.instance.persistence)==null||n.set_property(Sw,u),{isRateLimited:m,remainingTokens:u.tokens}}isServerRateLimited(t){var o=this.serverLimits[t||"events"]||!1;return o!==!1&&new Date().getTime()<o}}var Cu=vo("[RemoteConfig]");class xB{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Je._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Er(t){var o,a;(o=Je.__PosthogExtensions__)!=null&&o.loadExternalDependency?(a=Je.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):t()}Rr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(o){t(o.json)}})}load(){try{if(this.remoteConfig)return Cu.info("Using preloaded remote config",this.remoteConfig),this.Nr(this.remoteConfig),void this.Mr();if(this._instance.Fr())return void Cu.warn("Remote config is disabled. Falling back to local config.");this.Er((t=>{if(!t)return Cu.info("No config found after loading remote JS config. Falling back to JSON."),void this.Rr((o=>{this.Nr(o),this.Mr()}));this.Nr(t),this.Mr()}))}catch(t){Cu.error("Error loading remote config",t)}}stop(){this.Or&&(clearInterval(this.Or),this.Or=void 0)}refresh(){this._instance.Fr()||Fe?.visibilityState==="hidden"||this._instance.reloadFeatureFlags()}Mr(){var t;if(!this.Or){var o=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;o!==0&&(this.Or=setInterval((()=>{this.refresh()}),o))}}Nr(t){var o;t||Cu.error("Failed to fetch remote config from PostHog."),this._instance.Nr(t??{}),t?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(o=this._instance.featureFlags)==null||o.ensureFlagsLoaded())}}var kr={GZipJS:"gzip-js",Base64:"base64"},$n=Uint8Array,on=Uint16Array,ud=Uint32Array,wC=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]),_C=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]),$D=new $n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),EB=function(e,t){for(var o=new on(31),a=0;31>a;++a)o[a]=t+=1<<e[a-1];var n=new ud(o[30]);for(a=1;30>a;++a)for(var i=o[a];o[a+1]>i;++i)n[i]=i-o[a]<<5|a;return[o,n]},kB=EB(wC,2),Pw=kB[1];kB[0][28]=258,Pw[258]=28;for(var VD=EB(_C,0)[1],RB=new on(32768),mo=0;32768>mo;++mo){var wc=(43690&mo)>>>1|(21845&mo)<<1;RB[mo]=((65280&(wc=(61680&(wc=(52428&wc)>>>2|(13107&wc)<<2))>>>4|(3855&wc)<<4))>>>8|(255&wc)<<8)>>>1}var Qu=function(e,t,o){for(var a=e.length,n=0,i=new on(t);a>n;++n)++i[e[n]-1];var l,c=new on(t);for(n=0;t>n;++n)c[n]=c[n-1]+i[n-1]<<1;for(l=new on(a),n=0;a>n;++n)l[n]=RB[c[e[n]-1]++]>>>15-e[n];return l},Sl=new $n(288);for(mo=0;144>mo;++mo)Sl[mo]=8;for(mo=144;256>mo;++mo)Sl[mo]=9;for(mo=256;280>mo;++mo)Sl[mo]=7;for(mo=280;288>mo;++mo)Sl[mo]=8;var Nf=new $n(32);for(mo=0;32>mo;++mo)Nf[mo]=5;var Rae=Qu(Sl,9),Aae=Qu(Nf,5),AB=function(e){return(e/8>>0)+(7&e&&1)},DB=function(e,t,o){(o==null||o>e.length)&&(o=e.length);var a=new(e instanceof on?on:e instanceof ud?ud:$n)(o-t);return a.set(e.subarray(t,o)),a},ui=function(e,t,o){var a=t/8>>0;e[a]|=o<<=7&t,e[a+1]|=o>>>8},Pu=function(e,t,o){var a=t/8>>0;e[a]|=o<<=7&t,e[a+1]|=o>>>8,e[a+2]|=o>>>16},h0=function(e,t){for(var o=[],a=0;e.length>a;++a)e[a]&&o.push({s:a,f:e[a]});var n=o.length,i=o.slice();if(!n)return[new $n(0),0];if(n==1){var l=new $n(o[0].s+1);return l[o[0].s]=1,[l,1]}o.sort((function(E,A){return E.f-A.f})),o.push({s:-1,f:25001});var c=o[0],u=o[1],m=0,h=1,p=2;for(o[0]={s:-1,f:c.f+u.f,l:c,r:u};h!=n-1;)c=o[o[p].f>o[m].f?m++:p++],u=o[m!=h&&o[p].f>o[m].f?m++:p++],o[h++]={s:-1,f:c.f+u.f,l:c,r:u};var f=i[0].s;for(a=1;n>a;++a)i[a].s>f&&(f=i[a].s);var v=new on(f+1),b=xw(o[h-1],v,0);if(b>t){a=0;var S=0,C=b-t,w=1<<C;for(i.sort((function(E,A){return v[A.s]-v[E.s]||E.f-A.f}));n>a;++a){var _=i[a].s;if(t>=v[_])break;S+=w-(1<<b-v[_]),v[_]=t}for(S>>>=C;S>0;){var k=i[a].s;t>v[k]?S-=1<<t-v[k]++-1:++a}for(;a>=0&&S;--a){var x=i[a].s;v[x]==t&&(--v[x],++S)}b=t}return[new $n(v),b]},xw=function(e,t,o){return e.s==-1?Math.max(xw(e.l,t,o+1),xw(e.r,t,o+1)):t[e.s]=o},HD=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new on(++t),a=0,n=e[0],i=1,l=function(u){o[a++]=u},c=1;t>=c;++c)if(e[c]==n&&c!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)l(32754);i>2&&(l(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(l(n),--i;i>6;i-=6)l(8304);i>2&&(l(i-3<<5|8208),i=0)}for(;i--;)l(n);i=1,n=e[c]}return[o.subarray(0,a),t]},xu=function(e,t){for(var o=0,a=0;t.length>a;++a)o+=e[a]*t[a];return o},Ew=function(e,t,o){var a=o.length,n=AB(t+2);e[n]=255&a,e[n+1]=a>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var i=0;a>i;++i)e[n+i+4]=o[i];return 8*(n+4+a)},GD=function(e,t,o,a,n,i,l,c,u,m,h){ui(t,h++,o),++n[256];for(var p=h0(n,15),f=p[0],v=p[1],b=h0(i,15),S=b[0],C=b[1],w=HD(f),_=w[0],k=w[1],x=HD(S),E=x[0],A=x[1],D=new on(19),O=0;_.length>O;++O)D[31&_[O]]++;for(O=0;E.length>O;++O)D[31&E[O]]++;for(var L=h0(D,7),U=L[0],F=L[1],q=19;q>4&&!U[$D[q-1]];--q);var j,K,ne,H,Z=m+5<<3,te=xu(n,Sl)+xu(i,Nf)+l,le=xu(n,f)+xu(i,S)+l+14+3*q+xu(D,U)+(2*D[16]+3*D[17]+7*D[18]);if(te>=Z&&le>=Z)return Ew(t,h,e.subarray(u,u+m));if(ui(t,h,1+(te>le)),h+=2,te>le){j=Qu(f,v),K=f,ne=Qu(S,C),H=S;var Q=Qu(U,F);for(ui(t,h,k-257),ui(t,h+5,A-1),ui(t,h+10,q-4),h+=14,O=0;q>O;++O)ui(t,h+3*O,U[$D[O]]);h+=3*q;for(var I=[_,E],G=0;2>G;++G){var $=I[G];for(O=0;$.length>O;++O)ui(t,h,Q[N=31&$[O]]),h+=U[N],N>15&&(ui(t,h,$[O]>>>5&127),h+=$[O]>>>12)}}else j=Rae,K=Sl,ne=Aae,H=Nf;for(O=0;c>O;++O)if(a[O]>255){var N;Pu(t,h,j[257+(N=a[O]>>>18&31)]),h+=K[N+257],N>7&&(ui(t,h,a[O]>>>23&31),h+=wC[N]);var z=31&a[O];Pu(t,h,ne[z]),h+=H[z],z>3&&(Pu(t,h,a[O]>>>5&8191),h+=_C[z])}else Pu(t,h,j[a[O]]),h+=K[a[O]];return Pu(t,h,j[256]),h+K[256]},Dae=new ud([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Oae=(function(){for(var e=new ud(256),t=0;256>t;++t){for(var o=t,a=9;--a;)o=(1&o&&3988292384)^o>>>1;e[t]=o}return e})(),g0=function(e,t,o){for(;o;++t)e[t]=o,o>>>=8};function Mae(e,t){t===void 0&&(t={});var o=(function(){var p=4294967295;return{p(f){for(var v=p,b=0;f.length>b;++b)v=Oae[255&v^f[b]]^v>>>8;p=v},d(){return 4294967295^p}}})(),a=e.length;o.p(e);var n,i,l,c,u,m=(c=10+((n=t).filename&&n.filename.length+1||0),u=8,(function(p,f,v,b,S,C){var w=p.length,_=new $n(b+w+5*(1+Math.floor(w/7e3))+S),k=_.subarray(b,_.length-S),x=0;if(!f||8>w)for(var E=0;w>=E;E+=65535){var A=E+65535;w>A?x=Ew(k,x,p.subarray(E,A)):(k[E]=!0,x=Ew(k,x,p.subarray(E,w)))}else{for(var D=Dae[f-1],O=D>>>13,L=8191&D,U=(1<<v)-1,F=new on(32768),q=new on(U+1),j=Math.ceil(v/3),K=2*j,ne=function(qe){return(p[qe]^p[qe+1]<<j^p[qe+2]<<K)&U},H=new ud(25e3),Z=new on(288),te=new on(32),le=0,Q=0,I=(E=0,0),G=0,$=0;w>E;++E){var N=ne(E),z=32767&E,J=q[N];if(F[z]=J,q[N]=z,E>=G){var me=w-E;if((le>7e3||I>24576)&&me>423){x=GD(p,k,0,H,Z,te,Q,I,$,E-$,x),I=le=Q=0,$=E;for(var he=0;286>he;++he)Z[he]=0;for(he=0;30>he;++he)te[he]=0}var _e=2,je=0,Y=L,ae=z-J&32767;if(me>2&&N==ne(E-ae))for(var ve=Math.min(O,me)-1,ie=Math.min(32767,E),Te=Math.min(258,me);ie>=ae&&--Y&&z!=J;){if(p[E+_e]==p[E+_e-ae]){for(var xe=0;Te>xe&&p[E+xe]==p[E+xe-ae];++xe);if(xe>_e){if(_e=xe,je=ae,xe>ve)break;var at=Math.min(ae,xe-2),rt=0;for(he=0;at>he;++he){var $e=E-ae+he+32768&32767,Xe=$e-F[$e]+32768&32767;Xe>rt&&(rt=Xe,J=$e)}}}ae+=(z=J)-(J=F[z])+32768&32767}if(je){H[I++]=268435456|Pw[_e]<<18|VD[je];var De=31&Pw[_e],Ae=31&VD[je];Q+=wC[De]+_C[Ae],++Z[257+De],++te[Ae],G=E+_e,++le}else H[I++]=p[E],++Z[p[E]]}}x=GD(p,k,!0,H,Z,te,Q,I,$,E-$,x)}return DB(_,0,b+AB(x)+S)})(i=e,(l=t).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+l.mem,c,u)),h=m.length;return(function(p,f){var v=f.filename;if(p[0]=31,p[1]=139,p[2]=8,p[8]=2>f.level?4:f.level==9?2:0,p[9]=3,f.mtime!=0&&g0(p,4,Math.floor(new Date(f.mtime||Date.now())/1e3)),v){p[3]=8;for(var b=0;v.length>=b;++b)p[b+10]=v.charCodeAt(b)}})(m,t),g0(m,h-8,o.d()),g0(m,h-4,a),m}var Iae=!!QT||!!ZT,OB="text/plain",KD=!1,Av=function(e,t,o){var a;o===void 0&&(o=!0);var[n,i]=e.split("?"),l=Oe({},t),c=(a=i?.split("&").map((m=>{var h,[p,f]=m.split("="),v=o&&(h=l[p])!==null&&h!==void 0?h:f;return delete l[p],p+"="+v})))!==null&&a!==void 0?a:[],u=(function(m,h){var p,f;h===void 0&&(h="&");var v=[];return uo(m,(function(b,S){Ue(b)||Ue(S)||S==="undefined"||(p=encodeURIComponent((C=>C instanceof File)(b)?b.name:b.toString()),f=encodeURIComponent(S),v[v.length]=f+"="+p)})),v.join(h)})(l);return u&&c.push(u),n+"?"+c.join("&")},jc=(e,t)=>JSON.stringify(e,((o,a)=>typeof a=="bigint"?a.toString():a),t),f0=e=>{if(e.tr)return e.tr;var{data:t,compression:o}=e;if(t){if(o===kr.GZipJS){var a=Mae((function(c,u){var m=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var h=new $n(c.length+(c.length>>>1)),p=0,f=function(C){h[p++]=C},v=0;m>v;++v){if(p+5>h.length){var b=new $n(p+8+(m-v<<1));b.set(h),h=b}var S=c.charCodeAt(v);128>S?f(S):2048>S?(f(192|S>>>6),f(128|63&S)):S>55295&&57344>S?(f(240|(S=65536+(1047552&S)|1023&c.charCodeAt(++v))>>>18),f(128|S>>>12&63),f(128|S>>>6&63),f(128|63&S)):(f(224|S>>>12),f(128|S>>>6&63),f(128|63&S))}return DB(h,0,p)})(jc(t)),{mtime:0});return{contentType:OB,body:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),estimatedSize:a.byteLength}}if(o===kr.Base64){var n=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((u,m)=>String.fromCharCode(parseInt(m,16)))))})(jc(t)),i=(c=>"data="+encodeURIComponent(typeof c=="string"?c:jc(c)))(n);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var l=jc(t);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},Lae=(function(){var e=zn((function*(t){var o=jc(t.data),a=yield(function(i,l,c){return JT.apply(this,arguments)})(o,za.DEBUG,{rethrow:!0});if(!a)return t;var n=yield a.arrayBuffer();return Oe({},t,{tr:{contentType:OB,body:n,estimatedSize:n.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),WD=(e,t)=>Av(e,{_:new Date().getTime().toString(),ver:za.JS_SDK_VERSION,compression:t}),Gg=[];ZT&&Gg.push({transport:"fetch",method(e){var t,o,{contentType:a,body:n,estimatedSize:i}=(t=f0(e))!==null&&t!==void 0?t:{},l=new Headers;uo(e.headers,(function(h,p){l.append(p,h)})),a&&l.append("Content-Type",a);var c=e.url,u=null;if(PD){var m=new PD;u={signal:m.signal,timeout:setTimeout((()=>m.abort()),e.timeout)}}ZT(c,Oe({method:e?.method||"GET",headers:l,keepalive:e.method==="POST"&&52428.8>(i||0),body:n,signal:(o=u)==null?void 0:o.signal},e.fetchOptions)).then((h=>h.text().then((p=>{var f={statusCode:h.status,text:p};if(h.status===200)try{f.json=JSON.parse(p)}catch(v){Be.error(v)}e.callback==null||e.callback(f)})))).catch((h=>{Be.error(h),e.callback==null||e.callback({statusCode:0,error:h})})).finally((()=>u?clearTimeout(u.timeout):null))}}),QT&&Gg.push({transport:"XHR",method(e){var t,o=new QT;o.open(e.method||"GET",e.url,!0);var{contentType:a,body:n}=(t=f0(e))!==null&&t!==void 0?t:{};uo(e.headers,(function(i,l){o.setRequestHeader(l,i)})),a&&o.setRequestHeader("Content-Type",a),e.timeout&&(o.timeout=e.timeout),e.disableXHRCredentials||(o.withCredentials=!0),o.onreadystatechange=()=>{if(o.readyState===4){var i={statusCode:o.status,text:o.responseText};if(o.status===200)try{i.json=JSON.parse(o.responseText)}catch{}e.callback==null||e.callback(i)}},o.send(n)}}),Sn!=null&&Sn.sendBeacon&&Gg.push({transport:"sendBeacon",method(e){var t=Av(e.url,{beacon:"1"});try{var o,{contentType:a,body:n}=(o=f0(e))!==null&&o!==void 0?o:{};if(!n)return;var i=n instanceof Blob?n:new Blob([n],{type:a});Sn.sendBeacon(t,i)}catch{}}});var kw=3e3;class Nae{constructor(t,o){this.Pr=!0,this.Lr=[],this.Dr=Ir(o?.flush_interval_ms||kw,250,5e3,Be.createLogger("flush interval"),kw),this.Br=t}enqueue(t){this.Lr.push(t),this.jr||this.$r()}unload(){this.qr();var t=this.Lr.length>0?this.Zr():{},o=Object.values(t);[...o.filter((a=>a.url.indexOf("/e")===0)),...o.filter((a=>a.url.indexOf("/e")!==0))].map((a=>{this.Br(Oe({},a,{transport:"sendBeacon"}))}))}enable(){this.Pr=!1,this.$r()}$r(){var t=this;this.Pr||(this.jr=setTimeout((()=>{if(this.qr(),this.Lr.length>0){var o=this.Zr(),a=function(){var i=o[n],l=new Date().getTime();i.data&&Ot(i.data)&&uo(i.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),t.Br(i)};for(var n in o)a()}}),this.Dr))}qr(){clearTimeout(this.jr),this.jr=void 0}Zr(){var t={};return uo(this.Lr,(o=>{var a,n=o,i=(n?n.batchKey:null)||n.url;Ue(t[i])&&(t[i]=Oe({},n,{data:[]})),(a=t[i].data)==null||a.push(n.data)})),this.Lr=[],t}}var Fae=["retriesPerformedSoFar"];class Bae{constructor(t){this.Vr=!1,this.Hr=3e3,this.Lr=[],this._instance=t,this.Lr=[],this.zr=!0,!Ue(ge)&&"onLine"in ge.navigator&&(this.zr=ge.navigator.onLine,this.Ur=()=>{this.zr=!0,this.Yr()},this.Gr=()=>{this.zr=!1},Ho(ge,"online",this.Ur),Ho(ge,"offline",this.Gr))}get length(){return this.Lr.length}retriableRequest(t){var{retriesPerformedSoFar:o}=t,a=LF(t,Fae);Ac(o)&&(a.url=Av(a.url,{retry_count:o})),this._instance._send_request(Oe({},a,{callback:n=>{n.statusCode===200||n.statusCode>=400&&500>n.statusCode||(o??0)>=10?a.callback==null||a.callback(n):this.Wr(Oe({retriesPerformedSoFar:o},a))}}))}Wr(t){var o=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=o+1;var a=(function(l){var c=3e3*Math.pow(2,l),u=c/2,m=Math.min(18e5,c),h=Math.random()-.5;return Math.ceil(m+h*(m-u))})(o),n=Date.now()+a;this.Lr.push({retryAt:n,requestOptions:t});var i="Enqueued failed request for retry in "+a;navigator.onLine||(i+=" (Browser is offline)"),Be.warn(i),this.Vr||(this.Vr=!0,this.Xr())}Xr(){if(this.Jr&&clearTimeout(this.Jr),this.Lr.length===0)return this.Vr=!1,void(this.Jr=void 0);this.Jr=setTimeout((()=>{this.zr&&this.Lr.length>0&&this.Yr(),this.Xr()}),this.Hr)}Yr(){var t=Date.now(),o=[],a=this.Lr.filter((i=>t>i.retryAt||(o.push(i),!1)));if(this.Lr=o,a.length>0)for(var{requestOptions:n}of a)this.retriableRequest(n)}unload(){for(var{requestOptions:t}of(this.Jr&&(clearTimeout(this.Jr),this.Jr=void 0),this.Vr=!1,Ue(ge)||(this.Ur&&(ge.removeEventListener("online",this.Ur),this.Ur=void 0),this.Gr&&(ge.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Lr))try{this._instance._send_request(Oe({},t,{transport:"sendBeacon"}))}catch(o){Be.error(o)}this.Lr=[]}}class jae{constructor(t){this.Kr=()=>{var o,a,n,i;this.Qr||(this.Qr={});var l=this.scrollElement(),c=this.scrollY(),u=l?Math.max(0,l.scrollHeight-l.clientHeight):0,m=c+(l?.clientHeight||0),h=l?.scrollHeight||0;this.Qr.lastScrollY=Math.ceil(c),this.Qr.maxScrollY=Math.max(c,(o=this.Qr.maxScrollY)!==null&&o!==void 0?o:0),this.Qr.maxScrollHeight=Math.max(u,(a=this.Qr.maxScrollHeight)!==null&&a!==void 0?a:0),this.Qr.lastContentY=m,this.Qr.maxContentY=Math.max(m,(n=this.Qr.maxContentY)!==null&&n!==void 0?n:0),this.Qr.maxContentHeight=Math.max(h,(i=this.Qr.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=t}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Qr}resetContext(){var t=this.Qr;return setTimeout(this.Kr,0),t}startMeasuringScrollPosition(){Ho(ge,"scroll",this.Kr,{capture:!0}),Ho(ge,"scrollend",this.Kr,{capture:!0}),Ho(ge,"resize",this.Kr)}scrollElement(){if(!this.ei)return ge?.document.documentElement;var t=Ot(this.ei)?this.ei:[this.ei];for(var o of t){var a=ge?.document.querySelector(o);if(a)return a}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return ge&&(ge.scrollY||ge.pageYOffset||ge.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return ge&&(ge.scrollX||ge.pageXOffset||ge.document.documentElement.scrollLeft)||0}}var zae=e=>_B(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);class YD{constructor(t,o,a,n){this.ti=i=>{var l=this.ri();if(!l||l.sessionId!==i){var c={sessionId:i,props:this.ii(this._instance)};this.ni.register({[yw]:c})}},this._instance=t,this.si=o,this.ni=a,this.ii=n||zae,this.si.onSessionId(this.ti)}ri(){return this.ni.props[yw]}getSetOnceProps(){var t,o=(t=this.ri())==null?void 0:t.props;return o?"r"in o?CB(o):{$referring_domain:o.referringDomain,$pathname:o.initialPathName,utm_source:o.utm_source,utm_campaign:o.utm_campaign,utm_medium:o.utm_medium,utm_content:o.utm_content,utm_term:o.utm_term}:{}}getSessionProps(){var t={};return uo(TC(this.getSetOnceProps()),((o,a)=>{a==="$current_url"&&(a="url"),t["$session_entry_"+XT(a)]=o})),t}}class CC{constructor(){this.oi={}}on(t,o){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(o),()=>{this.oi[t]=this.oi[t].filter((a=>a!==o))}}emit(t,o){for(var a of this.oi[t]||[])a(o);for(var n of this.oi["*"]||[])n(t,o)}}var v0=vo("[SessionId]");class ZD{on(t,o){return this.ai.on(t,o)}constructor(t,o,a){var n;if(this.li=[],this.ui=void 0,this.ai=new CC,this.hi=(m,h)=>!(!Ac(m)||!Ac(h))&&Math.abs(m-h)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===gi)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Bt=t.config,this.ni=t.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=o||ms,this.fi=a||ms;var i=this.Bt.persistence_name||this.Bt.token;if(this._sessionTimeoutMs=1e3*Ir(this.Bt.session_idle_timeout_seconds||1800,60,36e3,v0.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+i+"_window_id",this.mi="ph_"+i+"_primary_window_exists",this.yi()){var l=ga.Z(this.gi),c=ga.Z(this.mi);l&&!c?this.ci=l:ga.F(this.gi),ga.M(this.mi,!0)}if((n=this.Bt.bootstrap)!=null&&n.sessionID)try{var u=(m=>{var h=this.Bt.bootstrap.sessionID.replace(/-/g,"");if(h.length!==32)throw new Error("Not a valid UUID");if(h[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(h.substring(0,12),16)})();this.bi(this.Bt.bootstrap.sessionID,new Date().getTime(),u)}catch(m){v0.error("Invalid sessionID in bootstrap",m)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return Ue(this.li)&&(this.li=[]),this.li.push(t),this.di&&t(this.di,this.ci),()=>{this.li=this.li.filter((o=>o!==t))}}yi(){return this.Bt.persistence!=="memory"&&!this.ni._r&&ga.R()}Ii(t){t!==this.ci&&(this.ci=t,this.yi()&&ga.M(this.gi,t))}Ci(){return this.ci?this.ci:this.yi()?ga.Z(this.gi):null}bi(t,o,a){t===this.di&&o===this._sessionActivityTimestamp&&a===this._sessionStartTimestamp||(this._sessionStartTimestamp=a,this._sessionActivityTimestamp=o,this.di=t,this.ni.register({[Pf]:[o,t,a]}))}Si(){var t=this.ni.props[Pf];return Ot(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.xi),this.xi=void 0,this.ui&&ge&&(ge.removeEventListener(Af,this.ui,{capture:!1}),this.ui=void 0),this.li=[]}wi(){this.ui=()=>{this.yi()&&ga.F(this.mi)},Ho(ge,Af,this.ui,{capture:!1})}checkAndGetSessionAndWindowId(t,o){if(t===void 0&&(t=!1),o===void 0&&(o=null),this.Bt.cookieless_mode===gi)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var a=o||new Date().getTime(),[n,i,l]=this.Si(),c=this.Ci(),u=Ac(l)&&Math.abs(a-l)>864e5,m=!1,h=!i,p=!h&&!t&&this.hi(a,n);h||p||u?(i=this.vi(),c=this.fi(),v0.info("new session ID generated",{sessionId:i,windowId:c,changeReason:{noSessionId:h,activityTimeout:p,sessionPastMaximumLength:u}}),l=a,m=!0):c||(c=this.fi(),m=!0);var f=Ac(n)&&t&&!u?n:a,v=Ac(l)?l:new Date().getTime();return this.Ii(c),this.bi(i,f,v),t||this.pi(),m&&this.li.forEach((b=>b(i,c,m?{noSessionId:h,activityTimeout:p,sessionPastMaximumLength:u}:void 0))),{sessionId:i,windowId:c,sessionStartTimestamp:v,changeReason:m?{noSessionId:h,activityTimeout:p,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:n}}pi(){clearTimeout(this.xi),this.xi=setTimeout((()=>{var[t]=this.Si();if(this.hi(new Date().getTime(),t)){var o=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:o})}}),1.1*this.sessionTimeoutMs)}}var MB=function(e,t){if(!e)return!1;var o=e.userAgent;if(o&&kD(o,t))return!0;try{var a=e?.userAgentData;if(a!=null&&a.brands&&a.brands.some((n=>kD(n?.brand,t))))return!0}catch{}return!!e.webdriver},Ff=function(e,t){if(!(function(o){try{new RegExp(o)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function QD(e,t,o){return jc({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:o})}var IB={exact:(e,t)=>t.some((o=>e.some((a=>o===a)))),is_not:(e,t)=>t.every((o=>e.every((a=>o!==a)))),regex:(e,t)=>t.some((o=>e.some((a=>Ff(o,a))))),not_regex:(e,t)=>t.every((o=>e.every((a=>!Ff(o,a))))),icontains:(e,t)=>t.map(_g).some((o=>e.map(_g).some((a=>o.includes(a))))),not_icontains:(e,t)=>t.map(_g).every((o=>e.map(_g).every((a=>!o.includes(a))))),gt:(e,t)=>t.some((o=>{var a=parseFloat(o);return!isNaN(a)&&e.some((n=>a>parseFloat(n)))})),lt:(e,t)=>t.some((o=>{var a=parseFloat(o);return!isNaN(a)&&e.some((n=>a<parseFloat(n)))}))},_g=e=>e.toLowerCase();function LB(e,t){return!e||Object.entries(e).every((o=>{var[a,n]=o,i=t?.[a];if(Ue(i)||Pi(i))return!1;var l=[String(i)],c=IB[n.operator];return!!c&&c(n.values,l)}))}var Rw="custom",JD="i.posthog.com",Uae=/^\/static\//;class qae{constructor(t){this.ki={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,o=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return o||(o=this.apiHost.replace("."+JD,".posthog.com")),o==="https://app.posthog.com"?"https://us.posthog.com":o}get region(){return this.ki[this.apiHost]||(this.ki[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":Rw),this.ki[this.apiHost]}Ti(t){var o=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof o=="string"&&Uae.test(t))return o.trim().replace(/\/$/,"")||void 0}endpointFor(t,o){if(o===void 0&&(o=""),o&&(o=o[0]==="/"?o:"/"+o),t==="ui")return this.uiHost+o;if(t==="flags")return this.flagsApiHost+o;if(t==="assets"){var a=this.Ti(o);if(a)return""+a+o}if(this.region===Rw)return this.apiHost+o;var n=JD+o;switch(t){case"assets":return"https://"+this.region+"-assets."+n;case"api":return"https://"+this.region+"."+n}}}var Jt=vo("[Surveys]"),Aw="seenSurvey_",$ae=[m0.Popover,m0.Widget,m0.API],Vae={ignoreConditions:!1,ignoreDelay:!1,displayType:Cw.Popover},Hae=vo("[PostHog ExternalIntegrations]"),Gae={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Kae{constructor(t){this._instance=t}ur(t,o){var a;(a=Je.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,t,(n=>{if(n)return Hae.error("failed to load script",n);o()}))}startIfEnabledOrStop(){var t=this,o=function(l){var c,u,m;!n||(c=Je.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||t.ur(Gae[l],(()=>{var h;(h=Je.__PosthogExtensions__)==null||(h=h.integrations)==null||(h=h[l])==null||h.start(t._instance)})),!n&&(u=Je.__PosthogExtensions__)!=null&&(u=u.integrations)!=null&&u[l]&&((m=Je.__PosthogExtensions__)==null||(m=m.integrations)==null||(m=m[l])==null||m.stop())};for(var[a,n]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;o(a)}}}var _c,Ju={},b0=0,Dw=()=>{},XD='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Eu="Surveys module not available",eO="sanitize_properties is deprecated. Use before_send instead",NB="Invalid value for property_denylist config: ",Mc="posthog",FB=!Iae&&Xa?.indexOf("MSIE")===-1&&Xa?.indexOf("Mozilla")===-1,tO=e=>{var t;return Oe({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:dae(Fe?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Dw,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:ha&&To(ha?.search)&&ha.search.indexOf("__posthog_debug=true")!==-1||!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,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(ge==null||(t=ge.location)==null?void 0:t.protocol)==="https:",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(o){Be.error("Bad HTTP status: "+o.statusCode+" "+o.text)},get_device_id:o=>o,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:_w,before_send:void 0,request_queue_config:{flush_interval_ms:kw},error_tracking:{},_onCapture:Dw,__preview_eager_load_replay:!1},(o=>({rageclick:!o||"2025-11-30">o||{content_ignorelist:!0},capture_pageview:!o||"2025-05-24">o||"history_change",session_recording:o&&o>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:o&&o>="2026-01-30"?"head":"body",internal_or_test_user_hostname:o&&o>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},Wae=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],oO=e=>{var t={};for(var[o,a]of Wae)Ue(e[o])||(t[a]=e[o]);var n=Eo({},t,e);return Ot(e.property_blacklist)&&(Ue(e.property_denylist)?n.property_denylist=e.property_blacklist:Ot(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:Be.error(NB+e.property_denylist)),n};class Yae{constructor(){this.__forceAllowLocalhost=!1}get Ai(){return this.__forceAllowLocalhost}set Ai(t){Be.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Un{Ei(t,o){if(t){var a=this.Ri.indexOf(t);a!==-1&&this.Ri.splice(a,1)}return this.Ri.push(o),o.initialize==null||o.initialize(),o}Ni(){return this.config.cookieless_mode===gi||this.config.cookieless_mode===ll&&this.consent.isRejected()}get decideEndpointWasHit(){var t,o;return(t=(o=this.featureFlags)==null?void 0:o.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,o;return(t=(o=this.featureFlags)==null?void 0:o.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new Yae,this.Mi=!1,this.version=za.LIB_VERSION,this.Fi=new CC,this.Ri=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=tO(),this.SentryIntegration=Sae,this.sentryIntegration=a=>(function(n,i){var l=bB(n,i);return{name:vB,processEvent:c=>l(c)}})(this,a),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Oi=!1,this.Pi=null,this.Li=null,this.Di=null,this.scrollManager=new jae(this),this.pageViewManager=new jD(this),this.rateLimiter=new kae(this),this.requestRouter=new qae(this),this.consent=new vae(this),this.externalIntegrations=new Kae(this);var o=(t=Un.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=o.featureFlags&&new o.featureFlags(this),this.toolbar=o.toolbar&&new o.toolbar(this),this.surveys=o.surveys&&new o.surveys(this),this.conversations=o.conversations&&new o.conversations(this),this.logs=o.logs&&new o.logs(this),this.experiments=o.experiments&&new o.experiments(this),this.exceptions=o.exceptions&&new o.exceptions(this),this.people={set:(a,n,i)=>{var l=To(a)?{[a]:n}:a;this.setPersonProperties(l),i?.({})},set_once:(a,n,i)=>{var l=To(a)?{[a]:n}:a;this.setPersonProperties(void 0,l),i?.({})}},this.on("eventCaptured",(a=>Be.info('send "'+a?.event+'"',a)))}init(t,o,a){if(a&&a!==Mc){var n,i=(n=Ju[a])!==null&&n!==void 0?n:new Un;return i._init(t,o,a),Ju[a]=i,Ju[Mc][a]=i,i}return this._init(t,o,a)}_init(t,o,a){var n,i;if(o===void 0&&(o={}),Ue(t)||qg(t))return Be.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 console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},o.debug=this.Bi(o.debug),this.ji=o,this.$i=[],o.person_profiles?this.Li=o.person_profiles:o.process_person&&(this.Li=o.process_person),this.set_config(Eo({},tO(o.defaults),oO(o),{name:a,token:t})),this.config.on_xhr_error&&Be.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=o.disable_compression?void 0:kr.GZipJS;var l=this.qi();this.persistence=new u0(this.config,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new u0(Oe({},this.config,{persistence:"sessionStorage"}),l);var c=Oe({},this.persistence.props),u=Oe({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Zi=new Nae((C=>this.Vi(C)),this.config.request_queue_config),this.Hi=new Bae(this),this.__request_queue=[];var m=this.Ni();if(m||(this.sessionManager=new ZD(this),this.sessionPropsManager=new YD(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Be.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.zi(m)}),0)):(Be.info("Initializing extensions synchronously"),this.zi(m)),za.DEBUG=za.DEBUG||this.config.debug,za.DEBUG&&Be.info("Starting in debug mode",{this:this,config:o,thisC:Oe({},this.config),p:c,s:u}),!this.config.identity_distinct_id||(n=o.bootstrap)!=null&&n.distinctID||(o.bootstrap=Oe({},o.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((i=o.bootstrap)==null?void 0:i.distinctID)!==void 0){var h=o.bootstrap.distinctID,p=this.get_distinct_id(),f=this.persistence.get_property(ar);if(o.bootstrap.isIdentifiedID&&p!=null&&p!==h&&f===Sc)this.identify(h);else if(o.bootstrap.isIdentifiedID&&p!=null&&p!==h&&f===Tc)Be.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 v=this.config.get_device_id(ms()),b=o.bootstrap.isIdentifiedID?v:h;this.persistence.set_property(ar,o.bootstrap.isIdentifiedID?Tc:Sc),this.register({distinct_id:h,$device_id:b})}}if(m)this.register_once({distinct_id:bg,$device_id:null},"");else if(!this.get_distinct_id()){var S=this.config.get_device_id(ms());this.register_once({distinct_id:S,$device_id:S},""),this.persistence.set_property(ar,Sc)}return Ho(ge,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),o.segment?(function(C,w){var _=C.config.segment;if(!_)return w();(function(k,x){var E=k.config.segment;if(!E)return x();var A=O=>{var L=()=>O.anonymousId()||ms();k.config.get_device_id=L,O.id()&&(k.register({distinct_id:O.id(),$device_id:L()}),k.persistence.set_property(ar,Tc)),x()},D=E.user();"then"in D&&hi(D.then)?D.then(A):A(D)})(C,(()=>{_.register((k=>{Promise&&Promise.resolve||d0.warn("This browser does not have Promise support, and can not use the segment integration");var x=(E,A)=>{if(!A)return E;E.event.userId||E.event.anonymousId===k.get_distinct_id()||(d0.info("No userId set, resetting PostHog"),k.reset()),E.event.userId&&E.event.userId!==k.get_distinct_id()&&(d0.info("UserId set, identifying with PostHog"),k.identify(E.event.userId));var D=k.calculateEventProperties(A,E.event.properties);return E.event.properties=Object.assign({},D,E.event.properties),E};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:E=>x(E,E.event.event),page:E=>x(E,Oc),identify:E=>x(E,l0),screen:E=>x(E,"$screen")}})(C)).then((()=>{w()}))}))})(this,(()=>this.Ui())):this.Ui(),hi(this.config._onCapture)&&this.config._onCapture!==Dw&&(Be.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(C=>this.config._onCapture(C.event,C)))),this.config.ip&&Be.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}zi(t){var o,a,n,i,l,c,u,m=performance.now(),h=Oe({},Un.__defaultExtensionClasses,this.config.__extensionClasses),p=[];h.featureFlags&&this.Ri.push(this.featureFlags=(o=this.featureFlags)!==null&&o!==void 0?o:new h.featureFlags(this)),h.exceptions&&this.Ri.push(this.exceptions=(a=this.exceptions)!==null&&a!==void 0?a:new h.exceptions(this)),h.historyAutocapture&&this.Ri.push(this.historyAutocapture=new h.historyAutocapture(this)),h.tracingHeaders&&this.Ri.push(new h.tracingHeaders(this)),h.siteApps&&this.Ri.push(this.siteApps=new h.siteApps(this)),h.sessionRecording&&!t&&this.Ri.push(this.sessionRecording=new h.sessionRecording(this)),this.config.disable_scroll_properties||p.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),h.autocapture&&this.Ri.push(this.autocapture=new h.autocapture(this)),h.surveys&&this.Ri.push(this.surveys=(n=this.surveys)!==null&&n!==void 0?n:new h.surveys(this)),h.logs&&this.Ri.push(this.logs=(i=this.logs)!==null&&i!==void 0?i:new h.logs(this)),h.conversations&&this.Ri.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new h.conversations(this)),h.productTours&&this.Ri.push(this.productTours=new h.productTours(this)),h.heatmaps&&this.Ri.push(this.heatmaps=new h.heatmaps(this)),h.webVitalsAutocapture&&this.Ri.push(this.webVitalsAutocapture=new h.webVitalsAutocapture(this)),h.exceptionObserver&&this.Ri.push(this.exceptionObserver=new h.exceptionObserver(this)),h.deadClicksAutocapture&&this.Ri.push(this.deadClicksAutocapture=new h.deadClicksAutocapture(this,yae)),h.toolbar&&this.Ri.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new h.toolbar(this)),h.experiments&&this.Ri.push(this.experiments=(u=this.experiments)!==null&&u!==void 0?u:new h.experiments(this)),this.Ri.forEach((f=>{f.initialize&&p.push((()=>{f.initialize==null||f.initialize()}))})),p.push((()=>{if(this.Yi){var f=this.Yi;this.Yi=void 0,this.Nr(f)}})),this.Gi(p,m)}Gi(t,o){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-o>=30&&t.length>0)return void setTimeout((()=>{this.Gi(t,o)}),0);var a=t.shift();if(a)try{a()}catch(i){Be.error("Error initializing extension:",i)}}var n=Math.round(performance.now()-o);this.register_for_session({[mB]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[pB]:n}),this.config.__preview_deferred_init_extensions&&Be.info("PostHog extensions initialized ("+n+"ms)")}Nr(t){var o;if(!Fe||!Fe.body)return Be.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Nr(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Yi=t),this.Wi=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=_t(t.supportedCompression,kr.GZipJS)?kr.GZipJS:_t(t.supportedCompression,kr.Base64)?kr.Base64:void 0),(o=t.analytics)!=null&&o.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Li?this.Li:_w}),this.Ri.forEach((a=>a.onRemoteConfig==null?void 0:a.onRemoteConfig(t)))}Ui(){try{this.config.loaded(this)}catch(a){Be.critical("`loaded` function failed",a)}if(this.Xi(),this.config.internal_or_test_user_hostname&&ha!=null&&ha.hostname){var t=ha.hostname,o=this.config.internal_or_test_user_hostname;(typeof o=="string"?t===o:o.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ni())&&this.Ji()}),1),this.Ki=new xB(this),this.Ki.load()}Xi(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Zi)==null||t.enable())}_dom_loaded(){this.is_capturing()&&yg(this.__request_queue,(t=>this.Vi(t))),this.__request_queue=[],this.Xi()}_handle_unload(){var t,o,a,n;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Qi()&&this.capture(s0),(o=this.logs)==null||o.flushLogs("sendBeacon"),(a=this.Zi)==null||a.unload(),(n=this.Hi)==null||n.unload()):this.Qi()&&this.capture(s0,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(FB?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=Av(t.url,{ip:this.config.ip?1:0}),t.headers=Oe({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(o=>{var a,n,i,l=Oe({},o);l.timeout=l.timeout||6e4,l.url=WD(l.url,l.compression);var c=(a=l.transport)!==null&&a!==void 0?a:"fetch",u=Gg.filter((h=>!l.disableTransport||!h.transport||!l.disableTransport.includes(h.transport))),m=(n=(i=(function(h,p){for(var f=0;h.length>f;f++)if(h[f].transport===c)return h[f]})(u))==null?void 0:i.method)!==null&&n!==void 0?n:u[0].method;if(!m)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===kr.GZipJS&&Soe&&!KD?Lae(l).then((h=>{m(h)})).catch((h=>{if((p=>!(!p||typeof p!="object")&&("name"in p?String(p.name):"")==="NotReadableError")(h))return KD=!0,void m(Oe({},l,{compression:void 0,url:WD(o.url,void 0)}));m(l)})):m(l)})(Oe({},t,{callback:o=>{var a,n;this.rateLimiter.checkForLimiting(o),400>o.statusCode||(a=(n=this.config).on_request_error)==null||a.call(n,o),t.callback==null||t.callback(o)}}))))}Vi(t){this.Hi?this.Hi.retriableRequest(t):this._send_request(t)}_execute_array(t){b0++;try{var o,a=[],n=[],i=[];yg(t,(c=>{c&&(Ot(o=c[0])?i.push(c):hi(c)?c.call(this):Ot(c)&&o==="alias"?a.push(c):Ot(c)&&o.indexOf("capture")!==-1&&hi(this[o])?i.push(c):n.push(c))}));var l=function(c,u){yg(c,(function(m){if(Ot(m[0])){var h=u;uo(m,(function(p){h=h[p[0]].apply(h,p.slice(1))}))}else u[m[0]].apply(u,m.slice(1))}))};l(a,this),l(n,this),l(i,this)}finally{b0--}}push(t){if(b0>0&&Ot(t)&&To(t[0])){var o=Un.prototype[t[0]];hi(o)&&o.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,o,a){var n,i,l,c,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Zi){if(this.is_capturing())if(!Ue(t)&&To(t)){var m=!this.config.opt_out_useragent_filter&&this._is_bot();if(!m||this.config.__preview_capture_bot_pageviews){var h=a!=null&&a.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(h==null||!h.isRateLimited){o!=null&&o.$current_url&&!To(o?.$current_url)&&(Be.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),o==null||delete o.$current_url),t!=="$exception"||a!=null&&a.en||Be.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&&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 p=new Date,f=a?.timestamp||p,v=ms(),b={uuid:v,event:t,properties:this.calculateEventProperties(t,o||{},f,v)};t===Oc&&this.config.__preview_capture_bot_pageviews&&m&&(b.event="$bot_pageview",b.properties.$browser_type="bot"),h&&(b.properties.$lib_rate_limit_remaining_tokens=h.remainingTokens),a?.$set&&(b.$set=a?.$set);var S,C,w,_=this.tn(a?.$set_once,t!==LD,t===l0);if(_&&(b.$set_once=_),a!=null&&a._noTruncate||(i=this.config.properties_string_max_length,l=b,c=L=>To(L)?L.slice(0,i):L,u=new Set,b=(function L(U,F){return U!==Object(U)?c?c(U):U:u.has(U)?void 0:(u.add(U),Ot(U)?(q=[],yg(U,(j=>{q.push(L(j))}))):(q={},uo(U,((j,K)=>{u.has(j)||(q[K]=L(j))}))),q);var q})(l)),b.timestamp=f,Ue(a?.timestamp)||(b.properties.$event_time_override_provided=!0,b.properties.$event_time_override_system_time=p),t===Vu.DISMISSED||t===Vu.SENT){var k=o?.[p0.SURVEY_ID],x=o?.[p0.SURVEY_ITERATION];(L=>{try{var U=(F=>((q,j)=>{var K=""+Aw+j.id;return j.current_iteration&&j.current_iteration>0&&(K=""+Aw+j.id+"_"+j.current_iteration),K})(0,F))(L);if(localStorage.getItem(U))return;localStorage.setItem(U,"true")}catch(F){Jt.error("Failed to persist survey seen state",F)}})({id:k,current_iteration:x}),b.$set=Oe({},b.$set,{[(S={id:k,current_iteration:x},C=t===Vu.SENT?"responded":"dismissed",w="$survey_"+C+"/"+S.id,S.current_iteration&&S.current_iteration>0&&(w="$survey_"+C+"/"+S.id+"/"+S.current_iteration),w)]:!0})}else t===Vu.SHOWN&&(b.$set=Oe({},b.$set,{[p0.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===Eae.SHOWN){var E=o?.[UD.TOUR_TYPE];E&&(b.$set=Oe({},b.$set,{[UD.TOUR_LAST_SEEN_DATE+"/"+E]:new Date().toISOString()}))}var A=Oe({},b.properties.$set,b.$set);if(Fc(A)||this.setPersonPropertiesForFlags(A),!Ct(this.config.before_send)){var D=this.rn(b);if(!D)return;b=D}this.Fi.emit("eventCaptured",b);var O={method:"POST",url:(n=a?._url)!==null&&n!==void 0?n:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:b,compression:"best-available",batchKey:a?._batchKey};return!this.config.request_batching||a&&(a==null||!a._batchKey)||a!=null&&a.send_instantly?this.Vi(O):this.Zi.enqueue(O),b}Be.critical("This capture call is ignored due to client rate limiting.")}}else Be.error("No event name provided to posthog.capture")}else Be.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(o=>t(o.event,o)))}calculateEventProperties(t,o,a,n,i){if(a=a||new Date,!this.persistence||!this.sessionPersistence)return o;var l=i?void 0:this.persistence.remove_event_timer(t),c=Oe({},o);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ni()&&(c.$cookieless_mode=!0),t==="$snapshot"){var u=Oe({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=u.distinct_id,(!To(c.distinct_id)&&!Hn(c.distinct_id)||qg(c.distinct_id))&&Be.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var m,h=(function(w,_){var k,x,E,A;if(!Xa)return{};var D,O,L,U,F,q,j,K,ne=w?[...dd,..._||[]]:[],[H,Z]=(function(te){for(var le=0;DD.length>le;le++){var[Q,I]=DD[le],G=Q.exec(te),$=G&&(hi(I)?I(G,te):I);if($)return $}return["",""]})(Xa);return Eo(TC({$os:H,$os_version:Z,$browser:eB(Xa,navigator.vendor),$device:OD(Xa),$device_type:(O=Xa,L={userAgentDataPlatform:(k=navigator)==null||(k=k.userAgentData)==null?void 0:k.platform,maxTouchPoints:(x=navigator)==null?void 0:x.maxTouchPoints,screenWidth:ge==null||(E=ge.screen)==null?void 0:E.width,screenHeight:ge==null||(A=ge.screen)==null?void 0:A.height,devicePixelRatio:ge?.devicePixelRatio},K=OD(O),K===zF||K===jF||K==="Kobo"||K==="Kindle Fire"||K===XF?sd:K===hm||K===Wc||K===gm||K===tw?"Console":K===qF?"Wearable":K?wn:L?.userAgentDataPlatform==="Android"&&((U=L?.maxTouchPoints)!==null&&U!==void 0?U:0)>0?600>Math.min((F=L?.screenWidth)!==null&&F!==void 0?F:0,(q=L?.screenHeight)!==null&&q!==void 0?q:0)/((j=L?.devicePixelRatio)!==null&&j!==void 0?j:1)?wn:sd:"Desktop"),$timezone:PB(),$timezone_offset:Pae()}),{$current_url:fm(ha?.href,ne,vm),$host:ha?.host,$pathname:ha?.pathname,$raw_user_agent:Xa.length>1e3?Xa.substring(0,997)+"...":Xa,$browser_version:Noe(Xa,navigator.vendor),$browser_language:zD(),$browser_language_prefix:(D=zD(),typeof D=="string"?D.split("-")[0]:void 0),$screen_height:ge?.screen.height,$screen_width:ge?.screen.width,$viewport_height:ge?.innerHeight,$viewport_width:ge?.innerWidth,$lib:za.LIB_NAME,$lib_version:za.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:p,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(i,a.getTime());c.$session_id=p,c.$window_id=f}this.sessionPropsManager&&Eo(c,this.sessionPropsManager.getSessionProps());try{var v;this.sessionRecording&&Eo(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(v=this.Hi)==null?void 0:v.length}catch(w){c.$sdk_debug_error_capturing_properties=String(w)}if(this.requestRouter.region===Rw&&(c.$lib_custom_api_host=this.config.api_host),m=t!==Oc||i?t!==s0||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(a):this.pageViewManager.doPageView(a,n),c=Eo(c,m),t===Oc&&Fe&&(c.title=Fe.title),!Ue(l)){var b=a.getTime()-l;c.$duration=parseFloat((b/1e3).toFixed(3))}Xa&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=Eo({},h,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),Ot(this.config.property_denylist)?uo(this.config.property_denylist,(function(w){delete c[w]})):Be.error(NB+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var S=this.config.sanitize_properties;S&&(Be.error(eO),c=S(c,t));var C=this.nn();return c.$process_person_profile=C,C&&!i&&this.sn("_calculate_event_properties"),c}tn(t,o,a){var n;if(o===void 0&&(o=!0),a===void 0&&(a=!1),!this.persistence||!this.nn()||this.Mi&&!a)return t;var i=this.persistence.get_initial_props(),l=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),c=Eo({},i,l||{},t||{}),u=this.config.sanitize_properties;return u&&(Be.error(eO),c=u(c,"$set_once")),o&&(this.Mi=!0),Fc(c)?void 0:c}register(t,o){var a;(a=this.persistence)==null||a.register(t,o)}register_once(t,o,a){var n;(n=this.persistence)==null||n.register_once(t,o,a)}register_for_session(t){var o;(o=this.sessionPersistence)==null||o.register(t)}unregister(t){var o;(o=this.persistence)==null||o.unregister(t)}unregister_for_session(t){var o;(o=this.sessionPersistence)==null||o.unregister(t)}an(t,o){this.register({[t]:o})}getFeatureFlag(t,o){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlag(t,o)}getFeatureFlagPayload(t){var o;return(o=this.featureFlags)==null?void 0:o.getFeatureFlagPayload(t)}getFeatureFlagResult(t,o){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlagResult(t,o)}isFeatureEnabled(t,o){var a;return(a=this.featureFlags)==null?void 0:a.isFeatureEnabled(t,o)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,o,a){var n;(n=this.featureFlags)==null||n.updateFlags(t,o,a)}updateEarlyAccessFeatureEnrollment(t,o,a){var n;(n=this.featureFlags)==null||n.updateEarlyAccessFeatureEnrollment(t,o,a)}getEarlyAccessFeatures(t,o,a){var n;return o===void 0&&(o=!1),(n=this.featureFlags)==null?void 0:n.getEarlyAccessFeatures(t,o,a)}on(t,o){return this.Fi.on(t,o)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:Eu}),()=>{})}onSessionId(t){var o,a;return(o=(a=this.sessionManager)==null?void 0:a.onSessionId(t))!==null&&o!==void 0?o:()=>{}}getSurveys(t,o){o===void 0&&(o=!1),this.surveys?this.surveys.getSurveys(t,o):t([],{isLoaded:!1,error:Eu})}getActiveMatchingSurveys(t,o){o===void 0&&(o=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,o):t([],{isLoaded:!1,error:Eu})}renderSurvey(t,o){var a;(a=this.surveys)==null||a.renderSurvey(t,o)}displaySurvey(t,o){var a;o===void 0&&(o=Vae),(a=this.surveys)==null||a.displaySurvey(t,o)}cancelPendingSurvey(t){var o;(o=this.surveys)==null||o.cancelPendingSurvey(t)}canRenderSurvey(t){var o,a;return(o=(a=this.surveys)==null?void 0:a.canRenderSurvey(t))!==null&&o!==void 0?o:{visible:!1,disabledReason:Eu}}canRenderSurveyAsync(t,o){var a,n;return o===void 0&&(o=!1),(a=(n=this.surveys)==null?void 0:n.canRenderSurveyAsync(t,o))!==null&&a!==void 0?a:Promise.resolve({visible:!1,disabledReason:Eu})}ln(t){return!t||qg(t)?(Be.critical("Unique user id has not been set in posthog.identify"),!1):t===bg?(Be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(Be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,o,a){if(!this.__loaded||!this.persistence)return Be.uninitializedWarning("posthog.identify");if(Hn(t)&&(t=t.toString(),Be.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.ln(t)&&this.sn("posthog.identify")){var n=this.get_distinct_id();this.register({$user_id:t}),this.get_property(Cf)||this.register_once({$had_persisted_distinct_id:!0,$device_id:n},""),t!==n&&t!==this.get_property(ju)&&(this.unregister(ju),this.register({distinct_id:t}));var i,l=(this.persistence.get_property(ar)||Sc)===Sc;t!==n&&l?(this.persistence.set_property(ar,Tc),this.setPersonPropertiesForFlags({$set:o||{},$set_once:a||{}},!1),this.capture(l0,{distinct_id:t,$anon_distinct_id:n},{$set:o||{},$set_once:a||{}}),this.Di=QD(t,o,a),(i=this.featureFlags)==null||i.setAnonymousDistinctId(n)):(o||a)&&this.setPersonProperties(o,a),t!==n&&(this.reloadFeatureFlags(),this.unregister(Zu))}}setPersonProperties(t,o){if((t||o)&&this.sn("posthog.setPersonProperties")){var a=QD(this.get_distinct_id(),t,o);this.Di!==a?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:o||{}},!0),this.capture("$set",{$set:t||{},$set_once:o||{}}),this.Di=a):Be.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,o,a){if(t&&o){var n=this.getGroups(),i=n[t]!==o;if(i&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Oe({},n,{[t]:o})}),i||a){var l={$group_type:t,$group_key:o};a&&(l.$group_set=a),this.capture(LD,l)}a&&this.setGroupPropertiesForFlags({[t]:a}),i&&!a&&this.reloadFeatureFlags()}else Be.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,o){var a;o===void 0&&(o=!0),(a=this.featureFlags)==null||a.setPersonPropertiesForFlags(t,o)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,o){var a;o===void 0&&(o=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((a=this.featureFlags)==null||a.setGroupPropertiesForFlags(t,o))}resetGroupPropertiesForFlags(t){var o;(o=this.featureFlags)==null||o.resetGroupPropertiesForFlags(t)}reset(t){var o,a,n,i,l,c,u,m;if(Be.info("reset"),!this.__loaded)return Be.uninitializedWarning("posthog.reset");var h=this.get_property(Cf);if(this.consent.reset(),(o=this.persistence)==null||o.clear(),(a=this.sessionPersistence)==null||a.clear(),(n=this.surveys)==null||n.reset(),(i=this.Ki)==null||i.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(u=this.persistence)==null||u.set_property(ar,Sc),(m=this.sessionManager)==null||m.resetSessionId(),this.Di=null,this.config.cookieless_mode===gi)this.register_once({distinct_id:bg,$device_id:null},"");else{var p=this.config.get_device_id(ms());this.register_once({distinct_id:p,$device_id:t?p:h},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,o){var a;this.config.identity_distinct_id=t,this.config.identity_hash=o,this.alias(t),(a=this.conversations)==null||a.un()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,o;return(t=(o=this.sessionManager)==null?void 0:o.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:o,sessionStartTimestamp:a}=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+o);if(t!=null&&t.withTimestamp&&a){var i,l=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!a)return n;n+="?t="+Math.max(Math.floor((new Date().getTime()-a)/1e3)-l,0)}return n}alias(t,o){return t===this.get_property(iB)?(Be.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(Ue(o)&&(o=this.get_distinct_id()),t!==o?(this.an(ju,t),this.capture("$create_alias",{alias:t,distinct_id:o})):(Be.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var o=Oe({},this.config);if(Do(t)){var a,n,i,l,c,u,m,h,p,f;Eo(this.config,oO(t));var v=this.qi();(a=this.persistence)==null||a.update_config(this.config,o,v),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new u0(Oe({},this.config,{persistence:"sessionStorage"}),v);var b=this.Bi(this.config.debug);Mr(b)&&(this.config.debug=b),Mr(this.config.debug)&&(this.config.debug?(za.DEBUG=!0,So.R()&&So.M("ph_debug",!0),Be.info("set_config",{config:t,oldConfig:o,newConfig:Oe({},this.config)})):(za.DEBUG=!1,So.R()&&So.F("ph_debug"))),(n=this.exceptionObserver)==null||n.onConfigChange(),(i=this.exceptions)==null||i.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(u=this.heatmaps)==null||u.startIfEnabled(),(m=this.exceptionObserver)==null||m.startIfEnabledOrStop(),(h=this.deadClicksAutocapture)==null||h.startIfEnabledOrStop(),(p=this.surveys)==null||p.loadIfEnabled(),this.cn(),(f=this.externalIntegrations)==null||f.startIfEnabledOrStop()}}_overrideSDKInfo(t,o){za.LIB_NAME=t,za.LIB_VERSION=o}startSessionRecording(t){var o,a,n,i,l,c=t===!0,u={sampling:c||!(t==null||!t.sampling),linked_flag:c||!(t==null||!t.linked_flag),url_trigger:c||!(t==null||!t.url_trigger),event_trigger:c||!(t==null||!t.event_trigger)};Object.values(u).some(Boolean)&&((o=this.sessionManager)==null||o.checkAndGetSessionAndWindowId(),u.sampling&&((a=this.sessionRecording)==null||a.overrideSampling()),u.linked_flag&&((n=this.sessionRecording)==null||n.overrideLinkedFlag()),u.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("url")),u.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,o){if(this.exceptions){var a=new Error("PostHog syntheticException"),n=this.exceptions.buildProperties(t,{handled:!0,syntheticException:a});return this.exceptions.sendExceptionEvent(Oe({},n,o))}}addExceptionStep(t,o){var a;(a=this.exceptions)==null||a.addExceptionStep(t,o)}captureLog(t){var o;(o=this.logs)==null||o.captureLog(t)}get logger(){var t,o;return(t=(o=this.logs)==null?void 0:o.logger)!==null&&t!==void 0?t:Un.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var o,a;return(o=(a=this.toolbar)==null?void 0:a.loadToolbar(t))!==null&&o!==void 0&&o}get_property(t){var o;return(o=this.persistence)==null?void 0:o.props[t]}getSessionProperty(t){var o;return(o=this.sessionPersistence)==null?void 0:o.props[t]}toString(){var t,o=(t=this.config.name)!==null&&t!==void 0?t:Mc;return o!==Mc&&(o=Mc+"."+o),o}_isIdentified(){var t,o;return((t=this.persistence)==null?void 0:t.get_property(ar))===Tc||((o=this.sessionPersistence)==null?void 0:o.get_property(ar))===Tc}nn(){var t,o;return!(this.config.person_profiles==="never"||this.config.person_profiles===_w&&!this._isIdentified()&&Fc(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[ju])&&((o=this.persistence)==null||(o=o.props)==null||!o[kf]))}Qi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(t){return this.config.person_profiles==="never"?(Be.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(kf,!0),!0)}qi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==ll)}cn(){var t,o,a,n,i=this.qi();return((t=this.persistence)==null?void 0:t._r)!==i&&((a=this.persistence)==null||a.set_disabled(i)),((o=this.sessionPersistence)==null?void 0:o._r)!==i&&((n=this.sessionPersistence)==null||n.set_disabled(i)),i}opt_in_capturing(t){var o;if(this.config.cookieless_mode!==gi){if(this.Ni()){var a,n,i,l,c;this.reset(!0),(a=this.sessionManager)==null||a.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=new ZD(this),this.pageViewManager=new jD(this),this.persistence&&(this.sessionPropsManager=new YD(this,this.sessionManager,this.persistence));var u,m=(i=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&i!==void 0?i:(c=Un.__defaultExtensionClasses)==null?void 0:c.sessionRecording;m&&(this.sessionRecording=this.Ei(this.sessionRecording,new m(this)),this.Wi&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.Wi)))}var h,p;this.consent.optInOut(!0),this.cn(),this.Xi(),(o=this.sessionRecording)==null||o.startIfEnabledOrStop(),this.config.cookieless_mode==ll&&((h=this.surveys)==null||h.loadIfEnabled()),(Ue(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((p=t?.captureEventName)!==null&&p!==void 0?p:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ji()}else Be.warn(XD)}opt_out_capturing(){var t,o,a;this.config.cookieless_mode!==gi?(this.config.cookieless_mode===ll&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===ll&&(this.register({distinct_id:bg,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),(o=this.pageViewManager)==null||o.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(a=this.sessionRecording)==null||a.stopRecording(),this.sessionRecording=void 0,this.Ji())):Be.warn(XD)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===gi||(this.config.cookieless_mode===ll?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return Sn?MB(Sn,this.config.custom_blocked_useragents):void 0}Ji(){Fe&&(Fe.visibilityState==="visible"?this.Oi||(this.Oi=!0,this.capture(Oc,{title:Fe.title},{send_instantly:!0}),this.Pi&&(Fe.removeEventListener(Rf,this.Pi),this.Pi=null)):this.Pi||(this.Pi=this.Ji.bind(this),Ho(Fe,Rf,this.Pi)))}debug(t){t===!1?(ge?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(ge?.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}))}Fr(){var t,o,a,n,i,l,c=this.ji||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(Be.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):(a="advanced_disable_decide",n=Be,i=(o="advanced_disable_flags")in(t=c)&&!Ct(t[o]),l=a in t&&!Ct(t[a]),i?t[o]:!!l&&(n&&n.warn("Config field '"+a+"' is deprecated. Please use '"+o+"' instead. The old field will be removed in a future major version."),t[a]))}rn(t){if(Ct(this.config.before_send))return t;var o=Ot(this.config.before_send)?this.config.before_send:[this.config.before_send],a=t;for(var n of o){if(a=n(a),Ct(a)){var i="Event '"+t.event+"' was rejected in beforeSend function";return Coe(t.event)?Be.warn(i+". This can cause unexpected behavior."):Be.info(i),null}a.properties&&!Fc(a.properties)||Be.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return a}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,o){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:o})}captureTraceMetric(t,o,a){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:o,$ai_metric_value:String(a)})}Bi(t){var o=Mr(t)&&!t,a=So.R()&&So.O("ph_debug")==="true";return!o&&(!!a||t)}}function aO(e){return e instanceof Element&&(e.id===uB||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Dv(e){return!!e&&e.nodeType===1}function Ss(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function BB(e){return!!e&&e.nodeType===3}function jB(e){return!!e&&e.nodeType===11}function PC(e){return e?kv(e).split(/\s+/):[]}function nO(e){var t=ge?.location.href;return!!(t&&e&&e.some((o=>t.match(o))))}function Bf(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 PC(t)}function zB(e){return Ct(e)?null:kv(e).split(/(\s+)/).filter((t=>Xu(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function bm(e){var t="";return Mw(e)&&!qB(e)&&e.childNodes&&e.childNodes.length&&uo(e.childNodes,(function(o){var a;BB(o)&&o.textContent&&(t+=(a=zB(o.textContent))!==null&&a!==void 0?a:"")})),kv(t)}function rO(e){return Ue(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}Un.__defaultExtensionClasses={},Un.dn={trace:_c=()=>{},debug:_c,info:_c,warn:_c,error:_c,fatal:_c},(function(e,t){for(var o=0;t.length>o;o++)e.prototype[t[o]]=lae(e.prototype[t[o]])})(Un,["identify"]);var xC=["a","button","form","input","select","textarea","label"];function iO(e,t){if(Ue(t))return!0;var o,a=function(i){if(t.some((l=>i.matches(l))))return{v:!0}};for(var n of e)if(o=a(n))return o.v;return!1}function UB(e){var t=e.parentNode;return!(!t||!Dv(t))&&t}var Zae=["next","previous","prev",">","<"],sO=[".ph-no-rageclick",".ph-no-capture"],Ow=e=>!e||Ss(e,"html")||!Dv(e),lO=(e,t)=>{if(!ge||Ow(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var o=!1,a=[e],n=e;n.parentNode&&!Ss(n,"body");)if(jB(n.parentNode))a.push(n.parentNode.host),n=n.parentNode.host;else{var i=UB(n);if(!i)break;if(t||xC.indexOf(i.tagName.toLowerCase())>-1)o=!0;else{var l=ge.getComputedStyle(i);l&&l.getPropertyValue("cursor")==="pointer"&&(o=!0)}a.push(i),n=i}return{parentIsUsefulElement:o,targetElementList:a}};function Mw(e){for(var t=e;t.parentNode&&!Ss(t,"body");t=t.parentNode){var o=Bf(t);if(_t(o,"ph-sensitive")||_t(o,"ph-no-capture"))return!1}if(_t(Bf(e),"ph-include"))return!0;var a=e.type||"";if(To(a))switch(a.toLowerCase()){case"hidden":case"password":return!1}var n=e.name||e.id||"";return!To(n)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,""))}function qB(e){return!!(Ss(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Ss(e,"select")||Ss(e,"textarea")||e.getAttribute("contenteditable")==="true")}var $B="(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})",Qae=new RegExp("^(?:"+$B+")$"),Jae=new RegExp($B),VB="\\d{3}-?\\d{2}-?\\d{4}",Xae=new RegExp("^("+VB+")$"),ene=new RegExp("("+VB+")");function Xu(e,t){return t===void 0&&(t=!0),!(Ct(e)||To(e)&&(e=kv(e),(t?Qae:Jae).test((e||"").replace(/[- ]/g,""))||(t?Xae:ene).test(e)))}function cO(e){var t=bm(e);return Xu(t=(t+" "+HB(e)).trim())?t:""}function HB(e){var t="";return e&&e.childNodes&&e.childNodes.length&&uo(e.childNodes,(function(o){var a;if(o&&((a=o.tagName)==null?void 0:a.toLowerCase())==="span")try{var n=bm(o);t=(t+" "+n).trim(),o.childNodes&&o.childNodes.length&&(t=(t+" "+HB(o)).trim())}catch(i){Be.error("[AutoCapture]",i)}})),t}function dO(e){return e.replace(/"|\\"/g,'\\"')}function tne(e){var t=e.attr__class;return t?Ot(t)?t:PC(t):void 0}class uO{constructor(t){this.disabled=t===!1;var o=Do(t)?t:{};this.thresholdPx=o.threshold_px||30,this.timeoutMs=o.timeout_ms||1e3,this.clickCount=o.click_count||3,this.clicks=[]}isRageClick(t,o,a){if(this.disabled)return!1;var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(t-n.x)+Math.abs(o-n.y)<this.thresholdPx&&this.timeoutMs>a-n.timestamp){if(this.clicks.push({x:t,y:o,timestamp:a}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:o,timestamp:a}];return!1}}var y0="$copy_autocapture",mO=vo("[AutoCapture]");function S0(e,t){return t.length>e?t.slice(0,e)+"...":t}function one(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Dv(t));return t}function ane(e,t){for(var o,a,{e:n,maskAllElementAttributes:i,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:u}=t,m=[e],h=e;h.parentNode&&!Ss(h,"body");)jB(h.parentNode)?(m.push(h.parentNode.host),h=h.parentNode.host):(m.push(h.parentNode),h=h.parentNode);var p,f,v=[],b={},S=!1,C=!1;if(uo(m,(E=>{var A=Mw(E);E.tagName.toLowerCase()==="a"&&(S=E.getAttribute("href"),S=A&&S&&Xu(S)&&S),_t(Bf(E),"ph-no-capture")&&(C=!0),v.push((function(O,L,U,F){var q=O.tagName.toLowerCase(),j={tag_name:q};xC.indexOf(q)>-1&&!U&&(j.$el_text=q.toLowerCase()==="a"||q.toLowerCase()==="button"?S0(1024,cO(O)):S0(1024,bm(O)));var K=Bf(O);K.length>0&&(j.classes=K.filter((function(te){return te!==""}))),uo(O.attributes,(function(te){var le;if((!qB(O)||["name","id","class","aria-label"].indexOf(te.name)!==-1)&&(F==null||!F.includes(te.name))&&!L&&Xu(te.value)&&(!To(le=te.name)||le.substring(0,10)!=="_ngcontent"&&le.substring(0,7)!=="_nghost")){var Q=te.value;te.name==="class"&&(Q=PC(Q).join(" ")),j["attr__"+te.name]=S0(1024,Q)}}));for(var ne=1,H=1,Z=O;Z=one(Z);)ne++,Z.tagName===O.tagName&&H++;return j.nth_child=ne,j.nth_of_type=H,j})(E,i,l,c));var D=(function(O){if(!Mw(O))return{};var L={};return uo(O.attributes,(function(U){if(U.name&&U.name.indexOf("data-ph-capture-attribute")===0){var F=U.name.replace("data-ph-capture-attribute-",""),q=U.value;F&&q&&Xu(q)&&(L[F]=q)}})),L})(E);Eo(b,D)})),C)return{props:{},explicitNoCapture:C};if(l||(v[0].$el_text=e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?cO(e):bm(e)),S){var w,_;v[0].attr__href=S;var k=(w=Of(S))==null?void 0:w.host,x=ge==null||(_=ge.location)==null?void 0:_.host;k&&x&&k!==x&&(p=S)}return{props:Eo({$event_type:n.type,$ce_version:1},u?{}:{$elements:v},{$elements_chain:(f=v,(function(E){return E.map((A=>{var D,O,L="";if(A.tag_name&&(L+=A.tag_name),A.attr_class)for(var U of(A.attr_class.sort(),A.attr_class))L+="."+U.replace(/"/g,"");var F=Oe({},A.text?{text:A.text}:{},{"nth-child":(D=A.nth_child)!==null&&D!==void 0?D:0,"nth-of-type":(O=A.nth_of_type)!==null&&O!==void 0?O:0},A.href?{href:A.href}:{},A.attr_id?{attr_id:A.attr_id}:{},A.attributes),q={};return Hg(F).sort(((j,K)=>{var[ne]=j,[H]=K;return ne.localeCompare(H)})).forEach((j=>{var[K,ne]=j;return q[dO(K.toString())]=dO(ne.toString())})),(L+=":")+Hg(q).map((j=>{var[K,ne]=j;return K+'="'+ne+'"'})).join("")})).join(";")})((function(E){return E.map((A=>{var D,O,L={text:(D=A.$el_text)==null?void 0:D.slice(0,400),tag_name:A.tag_name,href:(O=A.attr__href)==null?void 0:O.slice(0,2048),attr_class:tne(A),attr_id:A.attr__id,nth_child:A.nth_child,nth_of_type:A.nth_of_type,attributes:{}};return Hg(A).filter((U=>{var[F]=U;return F.indexOf("attr__")===0})).forEach((U=>{var[F,q]=U;return L.attributes[F]=q})),L}))})(f)))},(o=v[0])!=null&&o.$el_text?{$el_text:(a=v[0])==null?void 0:a.$el_text}:{},p&&n.type==="click"?{$external_click_url:p}:{},b)}}var ku=vo("[ExceptionAutocapture]");function pO(e,t,o){try{if(!(t in e))return()=>{};var a=e[t],n=o(a);return hi(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=n,()=>{e[t]=a}}catch{return()=>{}}}var nne=vo("[TracingHeaders]"),as=vo("[Web Vitals]"),hO=9e5,gO="disabled",fO="lazy_loading",Ru="awaiting_config",Cg="missing_config";vo("[SessionRecording]"),vo("[SessionRecording]");var Iw="[SessionRecording]",ns=vo(Iw),rne=vo("[Heatmaps]");function vO(e){return Do(e)&&"clientX"in e&&"clientY"in e&&Hn(e.clientX)&&Hn(e.clientY)}var bO=vo("[Product Tours]"),ine=["$set_once","$set"],rs=vo("[SiteApps]"),yO="Error while initializing PostHog app with config id ";function Cc(e,t,o){if(Ct(e))return!1;switch(o){case"exact":return e===t;case"contains":var a=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(a,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class sne{constructor(t){this.vn=new CC,this.fn=(o,a)=>this.pn(o,a)&&this.gn(o,a)&&this.mn(o,a)&&this.yn(o,a),this.pn=(o,a)=>a==null||!a.event||o?.event===a?.event,this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,o;Ue((t=this._instance)==null?void 0:t._addCaptureHook)||(o=this._instance)==null||o._addCaptureHook(((a,n)=>{this.on(a,n)}))}register(t){var o,a;if(!Ue((o=this._instance)==null?void 0:o._addCaptureHook)&&(t.forEach((l=>{var c,u;(c=this._n)==null||c.add(l),(u=l.steps)==null||u.forEach((m=>{var h;(h=this.bn)==null||h.add(m?.event||"")}))})),(a=this._instance)!=null&&a.autocapture)){var n,i=new Set;t.forEach((l=>{var c;(c=l.steps)==null||c.forEach((u=>{u!=null&&u.selector&&i.add(u?.selector)}))})),(n=this._instance)==null||n.autocapture.setElementSelectors(i)}}on(t,o){var a;o!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(o?.event))&&this._n&&((a=this._n)==null?void 0:a.size)>0&&this._n.forEach((n=>{this.wn(o,n)&&this.vn.emit("actionCaptured",n.name)}))}In(t){this.onAction("actionCaptured",(o=>t(o)))}wn(t,o){if(o?.steps==null)return!1;for(var a of o.steps)if(this.fn(t,a))return!0;return!1}onAction(t,o){return this.vn.on(t,o)}gn(t,o){if(o!=null&&o.url){var a,n=t==null||(a=t.properties)==null?void 0:a.$current_url;if(!n||typeof n!="string"||!Cc(n,o.url,o.url_matching||"contains"))return!1}return!0}mn(t,o){return!!this.Cn(t,o)&&!!this.Sn(t,o)&&!!this.xn(t,o)}Cn(t,o){var a;if(o==null||!o.href)return!0;var n=this.kn(t);if(n.length>0)return n.some((c=>Cc(c.href,o.href,o.href_matching||"exact")));var i,l=(t==null||(a=t.properties)==null?void 0:a.$elements_chain)||"";return!!l&&Cc((i=l.match(/(?::|")href="(.*?)"/))?i[1]:"",o.href,o.href_matching||"exact")}Sn(t,o){var a;if(o==null||!o.text)return!0;var n=this.kn(t);if(n.length>0)return n.some((m=>Cc(m.text,o.text,o.text_matching||"exact")||Cc(m.$el_text,o.text,o.text_matching||"exact")));var i,l,c,u=(t==null||(a=t.properties)==null?void 0:a.$elements_chain)||"";return!!u&&(i=(function(m){for(var h,p=[],f=/(?::|")text="(.*?)"/g;!Ct(h=f.exec(m));)p.includes(h[1])||p.push(h[1]);return p})(u),l=o.text,c=o.text_matching||"exact",i.some((m=>Cc(m,l,c))))}xn(t,o){var a,n;if(o==null||!o.selector)return!0;var i=t==null||(a=t.properties)==null?void 0:a.$element_selectors;if(i!=null&&i.includes(o.selector))return!0;var l=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";if(o.selector_regex&&l)try{return new RegExp(o.selector_regex).test(l)}catch{return!1}return!1}kn(t){var o;return(t==null||(o=t.properties)==null?void 0:o.$elements)==null?[]:t?.properties.$elements}yn(t,o){return o==null||!o.properties||o.properties.length===0||LB(o.properties.reduce(((a,n)=>{var i=Ot(n.value)?n.value.map(String):n.value!=null?[String(n.value)]:[];return a[n.key]={values:i,operator:n.operator||"exact"},a}),{}),t?.properties)}}class lne{constructor(t){this._instance=t,this.Tn=new Map,this.An=new Map,this.En=new Map}Rn(t,o){return!!t&&LB(t.propertyFilters,o?.properties)}Nn(t,o){var a=new Map;return t.forEach((n=>{var i;(i=n.conditions)==null||(i=i[o])==null||(i=i.values)==null||i.forEach((l=>{if(l!=null&&l.name){var c=a.get(l.name)||[];c.push(n.id),a.set(l.name,c)}}))})),a}Mn(t,o,a){var n=(a===_u.Activation?this.Tn:this.An).get(t),i=[];return this.Fn((l=>{i=l.filter((c=>n?.includes(c.id)))})),i.filter((l=>{var c,u=(c=l.conditions)==null||(c=c[a])==null||(c=c.values)==null?void 0:c.find((m=>m.name===t));return this.Rn(u,o)}))}register(t){var o;Ue((o=this._instance)==null?void 0:o._addCaptureHook)||(this.On(t),this.Pn(t))}Pn(t){var o=t.filter((a=>{var n,i;return((n=a.conditions)==null?void 0:n.actions)&&((i=a.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0}));o.length!==0&&(this.Ln==null&&(this.Ln=new sne(this._instance),this.Ln.init(),this.Ln.In((a=>{this.onAction(a)}))),o.forEach((a=>{var n,i,l,c,u;a.conditions&&(n=a.conditions)!=null&&n.actions&&(i=a.conditions)!=null&&(i=i.actions)!=null&&i.values&&((l=a.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Ln)==null||c.register(a.conditions.actions.values),(u=a.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach((m=>{if(m&&m.name){var h=this.En.get(m.name);h&&h.push(a.id),this.En.set(m.name,h||[a.id])}})))})))}On(t){var o,a=t.filter((i=>{var l,c;return((l=i.conditions)==null?void 0:l.events)&&((c=i.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),n=t.filter((i=>{var l,c;return((l=i.conditions)==null?void 0:l.cancelEvents)&&((c=i.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));a.length===0&&n.length===0||((o=this._instance)==null||o._addCaptureHook(((i,l)=>{this.onEvent(i,l)})),this.Tn=this.Nn(t,_u.Activation),this.An=this.Nn(t,_u.Cancellation))}onEvent(t,o){var a,n=this.le(),i=this.Dn(),l=this.Bn(),c=((a=this._instance)==null||(a=a.persistence)==null?void 0:a.props[i])||[];if(l===t&&o&&c.length>0){var u,m;n.info("event matched, removing item from activated items",{event:t,eventPayload:o,existingActivatedItems:c});var h=(o==null||(u=o.properties)==null?void 0:u.$survey_id)||(o==null||(m=o.properties)==null?void 0:m.$product_tour_id);if(h){var p=c.indexOf(h);0>p||(c.splice(p,1),this.jn(c))}}else{if(this.An.has(t)){var f=this.Mn(t,o,_u.Cancellation);f.length>0&&(n.info("cancel event matched, cancelling items",{event:t,itemsToCancel:f.map((b=>b.id))}),f.forEach((b=>{var S=c.indexOf(b.id);0>S||c.splice(S,1),this.$n(b.id)})),this.jn(c))}if(this.Tn.has(t)){n.info("event name matched",{event:t,eventPayload:o,items:this.Tn.get(t)});var v=this.Mn(t,o,_u.Activation);this.jn(c.concat(v.map((b=>b.id))||[]))}}}onAction(t){var o,a=this.Dn(),n=((o=this._instance)==null||(o=o.persistence)==null?void 0:o.props[a])||[];this.En.has(t)&&this.jn(n.concat(this.En.get(t)||[]))}jn(t){var o=this.le(),a=[...new Set(t)].filter((n=>!this.qn(n)));o.info("updating activated items",{activatedItems:a}),this.Zn(a)}getActivatedIds(){var t,o=this.Dn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[o])||[]}getEventToItemsMap(){return this.Tn}Vn(){return this.Ln}}class cne extends lne{constructor(t){super(t)}Dn(){return fw}Bn(){return Vu.SHOWN}Fn(t){var o;(o=this._instance)==null||o.getSurveys(t)}$n(t){var o;(o=this._instance)==null||o.cancelPendingSurvey(t)}le(){return Jt}Zn(t){var o;(o=this._instance)==null||(o=o.persistence)==null||o.register({[fw]:t})}qn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var T0="SDK is not enabled or survey functionality is not yet loaded",SO="Disabled. Not loading surveys.",dne=ge!=null&&ge.location?If(ge.location.hash,"__posthog")||If(location.hash,"state"):null,TO="_postHogToolbarParams",wO=vo("[Toolbar]"),Fa=vo("[FeatureFlags]"),al=vo("[FeatureFlags]",{debugEnabled:!0}),w0=`" failed. Feature flags didn't load in time.`,_O=e=>{for(var t={},o=0;e.length>o;o++)t[e[o]]=!0;return t},CO=e=>{var t={};for(var[o,a]of Hg(e||{}))a&&(t[o]=a);return t},mi=vo("[Error tracking]"),PO="Refusing to render web experiment since the viewer is a likely bot",une={icontains:(e,t)=>!!ge&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!ge&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!ge&&Ff(t.href,e),not_regex:(e,t)=>!!ge&&!Ff(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class xa{get Bt(){return this._instance.config}constructor(t){var o=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(a){a===void 0&&(a=!1),o.getWebExperiments((n=>{xa.Hn("retrieved web experiments from the server"),o.zn=new Map,n.forEach((i=>{if(i.feature_flag_key){var l;o.zn&&(xa.Hn("setting flag key ",i.feature_flag_key," to web experiment ",i),(l=o.zn)==null||l.set(i.feature_flag_key,i));var c=o._instance.getFeatureFlag(i.feature_flag_key);To(c)&&i.variants[c]&&o.Un(i.name,c,i.variants[c].transforms)}else if(i.variants)for(var u in i.variants){var m=i.variants[u];xa.Yn(m)&&o.Un(i.name,u,m.transforms)}}))}),a)},this._instance=t,this._instance.onFeatureFlags((a=>{this.onFeatureFlags(a)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())xa.Hn(PO);else if(!this.Bt.disable_web_experiments){if(Ct(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();xa.Hn("applying feature flags",t),t.forEach((o=>{var a;if(this.zn&&(a=this.zn)!=null&&a.has(o)){var n,i=this._instance.getFeatureFlag(o),l=(n=this.zn)==null?void 0:n.get(o);i&&l!=null&&l.variants[i]&&this.Un(l.name,i,l.variants[i].transforms)}}))}}previewWebExperiment(){var t=xa.getWindowLocation();if(t!=null&&t.search){var o=Mf(t?.search,"__experiment_id"),a=Mf(t?.search,"__experiment_variant");o&&a&&(xa.Hn("previewing web experiments "+o+" && "+a),this.getWebExperiments((n=>{this.Gn(parseInt(o),a,n)}),!1,!0))}}loadIfEnabled(){this.Bt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,o,a){if(this.Bt.disable_web_experiments&&!a)return t([]);var n=this._instance.get_property("$web_experiments");if(n&&!o)return t(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Bt.token),method:"GET",callback:i=>t(i.statusCode===200&&i.json&&i.json.experiments||[])})}Gn(t,o,a){var n=a.filter((i=>i.id===t));n&&n.length>0&&(xa.Hn("Previewing web experiment ["+n[0].name+"] with variant ["+o+"]"),this.Un(n[0].name,o,n[0].variants[o].transforms))}static Yn(t){return!Ct(t.conditions)&&xa.Wn(t)&&xa.Xn(t)}static Wn(t){var o;if(Ct(t.conditions)||Ct((o=t.conditions)==null?void 0:o.url))return!0;var a,n,i,l=xa.getWindowLocation();return!!l&&((a=t.conditions)==null||!a.url||une[(n=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&n!==void 0?n:"icontains"](t.conditions.url,l))}static getWindowLocation(){return ge?.location}static Xn(t){var o;if(Ct(t.conditions)||Ct((o=t.conditions)==null?void 0:o.utm))return!0;var a=yB();if(a.utm_source){var n,i,l,c,u,m,h,p,f=(n=t.conditions)==null||(n=n.utm)==null||!n.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==a.utm_campaign,v=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==a.utm_source,b=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_medium||((m=t.conditions)==null||(m=m.utm)==null?void 0:m.utm_medium)==a.utm_medium,S=(h=t.conditions)==null||(h=h.utm)==null||!h.utm_term||((p=t.conditions)==null||(p=p.utm)==null?void 0:p.utm_term)==a.utm_term;return f&&b&&S&&v}return!1}static Hn(t){for(var o=arguments.length,a=new Array(o>1?o-1:0),n=1;o>n;n++)a[n-1]=arguments[n];Be.info("[WebExperiments] "+t,a)}Un(t,o,a){this._is_bot()?xa.Hn(PO):o!=="control"?a.forEach((n=>{if(n.selector){var i;xa.Hn("applying transform of variant "+o+" for experiment "+t+" ",n);var l=(i=document)==null?void 0:i.querySelectorAll(n.selector);l?.forEach((c=>{var u=c;n.html&&(u.innerHTML=n.html),n.css&&u.setAttribute("style",n.css)}))}})):xa.Hn("Control variants leave the page unmodified.")}_is_bot(){return Sn&&this._instance?MB(Sn,this.Bt.custom_blocked_useragents):void 0}}var Fn=vo("[Conversations]"),nl="Conversations not available yet.",Ov={featureFlags:class{constructor(e){this.Jn=!1,this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Bt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}ls(){var e,t;return(e=(t=this.ni)==null?void 0:t.wr(this.Bt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}us(){return!!this.ls()&&(this.ss||this.Qn||(this.ss=!0,Fa.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=(e=this.Bt.evaluation_contexts)!==null&&e!==void 0?e:this.Bt.evaluation_environments;return!this.Bt.evaluation_environments||this.Bt.evaluation_contexts||this.ns||(Fa.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),t!=null&&t.length?t.filter((o=>{var a=o&&typeof o=="string"&&o.trim().length>0;return a||Fa.error("Invalid evaluation context found:",o,"Expected non-empty string"),a})):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:o}=this._instance,a=(e=(t=o.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(a).length){var n,i,l=(n=(i=o.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&n!==void 0?n:{},c=Object.keys(a).filter((m=>!!a[m])).reduce(((m,h)=>(m[h]=a[h]||!1,m)),{}),u=Object.keys(l).filter((m=>c[m])).reduce(((m,h)=>(l[h]&&(m[h]=l[h]),m)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:u})}}updateFlags(e,t,o){var a=o!=null&&o.merge?this.getFlagVariants():{},n=o!=null&&o.merge?this.getFlagPayloads():{},i=Oe({},a,e),l=Oe({},n,t),c={};for(var[u,m]of Object.entries(i)){var h=typeof m=="string";c[u]={key:u,enabled:!!h||!!m,variant:h?m:void 0,reason:void 0,metadata:Ue(l?.[u])?void 0:{id:0,version:void 0,description:void 0,payload:l[u]}}}this.receivedFeatureFlags({flags:c})}get hasLoadedFlags(){return this.Kn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(mw),t=this.os(pi),o=this.os(Dc);if(!o&&!t)return e||{};var a=Eo({},e||{}),n=[...new Set([...Object.keys(o||{}),...Object.keys(t||{})])];for(var i of n){var l,c,u=a[i],m=t?.[i],h=Ue(m)?(l=u?.enabled)!==null&&l!==void 0&&l:!!m,p=Ue(m)?u.variant:typeof m=="string"?m:void 0,f=o?.[i],v=Oe({},u,{enabled:h,variant:h?p??u?.variant:void 0});h!==u?.enabled&&(v.original_enabled=u?.enabled),p!==u?.variant&&(v.original_variant=u?.variant),f&&(v.metadata=Oe({},u?.metadata,{payload:f,original_payload:u==null||(c=u.metadata)==null?void 0:c.payload})),a[i]=v}return this.Jn||(Fa.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:o,finalDetails:a}),this.Jn=!0),a}getFlagVariants(){var e=this.os(Bc),t=this.os(pi);if(!t)return e||{};for(var o=Eo({},e),a=Object.keys(t),n=0;a.length>n;n++)o[a[n]]=t[a[n]];return this.Jn||(Fa.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:o}),this.Jn=!0),o}getFlagPayloads(){var e=this.os(pw),t=this.os(Dc);if(!t)return e||{};for(var o=Eo({},e||{}),a=Object.keys(t),n=0;a.length>n;n++)o[a[n]]=t[a[n]];return this.Jn||(Fa.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:o}),this.Jn=!0),o}reloadFeatureFlags(){this.es||this.Bt.advanced_disable_feature_flags||this.ds||(this._instance.Fi.emit("featureFlagsReloading",!0),this.ds=setTimeout((()=>{this.vs()}),5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Kn||this.Qn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Fr())if(this.Qn)this.ts=!0;else{var o=this.Bt.token,a=this.os(Cf),n={token:o,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Oe({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os($u)||{}),group_properties:this.os(sl),timezone:PB()};Pi(a)||Ue(a)||(n.$device_id=a),(e!=null&&e.disableFlags||this.Bt.advanced_disable_feature_flags)&&(n.disable_flags=!0),this.cs()&&(n.evaluation_contexts=this.hs());var i=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Bt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Qn=!0,this._instance._send_request({method:"POST",url:i,data:n,compression:this.Bt.disable_compression?void 0:kr.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback:l=>{var c,u,m,h=!0;if(l.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),h=!1),this.Qn=!1,!n.disable_flags||this.ts){this.rs=!h;var p=[];l.error?l.error instanceof Error?p.push(l.error.name==="AbortError"?"timeout":"connection_error"):p.push("unknown_error"):l.statusCode!==200&&p.push("api_error_"+l.statusCode),(c=l.json)!=null&&c.errorsWhileComputingFlags&&p.push("errors_while_computing_flags");var f,v=!((u=l.json)==null||(u=u.quotaLimited)==null||!u.includes("feature_flags"));v&&p.push("quota_limited"),(m=this.ni)==null||m.register({[bw]:p}),v?Fa.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."):(n.disable_flags||this.receivedFeatureFlags((f=l.json)!==null&&f!==void 0?f:{},h,{partialResponse:!!this.Bt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var o;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var a=this.getFeatureFlagResult(e,t);return(o=a?.variant)!==null&&o!==void 0?o:a?.enabled}}else Fa.warn('getFeatureFlag for key "'+e+w0)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var o=this.getFlagVariants(),a=e in o,n=o[e],i=this.getFlagPayloads()[e],l=String(n),c=this.os(hw)||void 0,u=this.os(xf)||void 0,m=this.os(Zu)||{};if(this.Bt.advanced_feature_flags_dedup_per_session){var h,p=this._instance.get_session_id(),f=this.os(vw);p&&p!==f&&(m={},(h=this.ni)==null||h.register({[Zu]:m,[vw]:p}))}if((t.send_event||!("send_event"in t))&&(!(e in m)||!m[e].includes(l))){var v,b,S,C,w,_,k,x,E,A;Ot(m[e])?m[e].push(l):m[e]=[l],(v=this.ni)==null||v.register({[Zu]:m});var D=this.getFeatureFlagDetails(e),O=[...(b=this.os(bw))!==null&&b!==void 0?b:[]];Ue(n)&&O.push("flag_missing");var L={$feature_flag:e,$feature_flag_response:n,$feature_flag_payload:i||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((S=this.Bt.bootstrap)==null||(S=S.featureFlags)==null?void 0:S[e])||null,$feature_flag_bootstrapped_payload:((C=this.Bt.bootstrap)==null||(C=C.featureFlagPayloads)==null?void 0:C[e])||null,$used_bootstrap_value:!this.rs};Ue(D==null||(w=D.metadata)==null?void 0:w.version)||(L.$feature_flag_version=D.metadata.version);var U,F=(_=D==null||(k=D.reason)==null?void 0:k.description)!==null&&_!==void 0?_:D==null||(x=D.reason)==null?void 0:x.code;F&&(L.$feature_flag_reason=F),D!=null&&(E=D.metadata)!=null&&E.id&&(L.$feature_flag_id=D.metadata.id),Ue(D?.original_variant)&&Ue(D?.original_enabled)||(L.$feature_flag_original_response=Ue(D.original_variant)?D.original_enabled:D.original_variant),D!=null&&(A=D.metadata)!=null&&A.original_payload&&(L.$feature_flag_original_payload=D==null||(U=D.metadata)==null?void 0:U.original_payload),O.length&&(L.$feature_flag_error=O.join(",")),this._instance.capture("$feature_flag_called",L)}if(a){var q=i;if(!Ue(i))try{q=JSON.parse(i)}catch{}return{key:e,enabled:!!n,variant:typeof n=="string"?n:void 0,payload:q}}}}else Fa.warn('getFeatureFlagResult for key "'+e+w0)}getRemoteConfigPayload(e,t){var o=this.Bt.token,a={distinct_id:this._instance.get_distinct_id(),token:o};this.cs()&&(a.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:a,compression:this.Bt.disable_compression?void 0:kr.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback(n){var i,l=(i=n.json)==null?void 0:i.featureFlagPayloads;t(l?.[e]||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs){if(this.Kn||this.getFlags()&&this.getFlags().length>0){var o=this.getFeatureFlag(e,t);return Ue(o)?void 0:!!o}Fa.warn('isFeatureEnabled for key "'+e+w0)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,o){if(this.ni){this.Kn=!0;var a=this.getFlagVariants(),n=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(l,c,u,m,h,p){u===void 0&&(u={}),m===void 0&&(m={}),h===void 0&&(h={});var f=(O=>{var L=O.flags;return L?(O.featureFlags=Object.fromEntries(Object.keys(L).map((U=>{var F;return[U,(F=L[U].variant)!==null&&F!==void 0?F:L[U].enabled]}))),O.featureFlagPayloads=Object.fromEntries(Object.keys(L).filter((U=>L[U].enabled)).filter((U=>{var F;return(F=L[U].metadata)==null?void 0:F.payload})).map((U=>{var F;return[U,(F=L[U].metadata)==null?void 0:F.payload]})))):Fa.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),O})(l),v=f.flags,b=f.featureFlags,S=f.featureFlagPayloads;if(b){var C=l.requestId,w=l.evaluatedAt;if(Ot(b)){Fa.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var _={};if(b)for(var k=0;b.length>k;k++)_[b[k]]=!0;c&&c.register({[$g]:b,[Bc]:_})}else{var x=b,E=S,A=v;if(p!=null&&p.partialResponse)x=Oe({},u,x),E=Oe({},m,E),A=Oe({},h,A);else if(l.errorsWhileComputingFlags)if(v){var D=new Set(Object.keys(v).filter((O=>{var L;return!((L=v[O])!=null&&L.failed)})));x=Oe({},u,Object.fromEntries(Object.entries(x).filter((O=>{var[L]=O;return D.has(L)})))),E=Oe({},m,Object.fromEntries(Object.entries(E||{}).filter((O=>{var[L]=O;return D.has(L)})))),A=Oe({},h,Object.fromEntries(Object.entries(A||{}).filter((O=>{var[L]=O;return D.has(L)}))))}else x=Oe({},u,x),E=Oe({},m,E),A=Oe({},h,A);c&&c.register(Oe({[$g]:Object.keys(CO(x)),[Bc]:x||{},[pw]:E||{},[mw]:A||{}},C?{[hw]:C}:{},w?{[xf]:w}:{}))}}})(e,this.ni,a,n,i,o),t||(this.ss=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),Fa.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return Fa.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister(pi),this.ni.unregister(Dc),this.ps(),al.info("All overrides cleared");if(Ot(e)){var t=_O(e);return this.ni.register({[pi]:t}),this.ps(),al.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var o,a=e;if(this.Jn=!!((o=a.suppressWarning)!==null&&o!==void 0&&o),"flags"in a){if(a.flags===!1)this.ni.unregister(pi),al.info("Flag overrides cleared");else if(a.flags){if(Ot(a.flags)){var n=_O(a.flags);this.ni.register({[pi]:n})}else this.ni.register({[pi]:a.flags});al.info("Flag overrides set",{flags:a.flags})}}return"payloads"in a&&(a.payloads===!1?(this.ni.unregister(Dc),al.info("Payload overrides cleared")):a.payloads&&(this.ni.register({[Dc]:a.payloads}),al.info("Payload overrides set",{payloads:a.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.ni.register({[pi]:e}),this.ps(),al.info("Flag overrides set",{flags:e});Fa.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Kn){var{flags:t,flagVariants:o}=this.gs();e(t,o)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,o){var a,n=(this.os(qu)||[]).find((u=>u.flagKey===e)),i={["$feature_enrollment/"+e]:t},l={$feature_flag:e,$feature_enrollment:t,$set:i};n&&(l.$early_access_feature_name=n.name),o&&(l.$feature_enrollment_stage=o),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(i,!1);var c=Oe({},this.getFlagVariants(),{[e]:t});(a=this.ni)==null||a.register({[$g]:Object.keys(CO(c)),[Bc]:c}),this.ps()}getEarlyAccessFeatures(e,t,o){t===void 0&&(t=!1);var a=this.os(qu),n=o?"&"+o.map((i=>"stage="+i)).join("&"):"";if(a&&!t)return e(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Bt.token+n),method:"GET",callback:i=>{var l,c;if(i.json){var u=i.json.earlyAccessFeatures;return(l=this.ni)==null||l.unregister(qu),(c=this.ni)==null||c.register({[qu]:u}),e(u)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((o=>t[o])),flagVariants:Object.keys(t).filter((o=>t[o])).reduce(((o,a)=>(o[a]=t[a],o)),{})}}ps(e){var{flags:t,flagVariants:o}=this.gs();this.featureFlagEventHandlers.forEach((a=>a(t,o,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var o=this.os($u)||{},a=e?.$set||(e!=null&&e.$set_once?{}:e),n=e?.$set_once,i={};if(n)for(var l in n)({}).hasOwnProperty.call(n,l)&&(l in o||(i[l]=n[l]));this._instance.register({[$u]:Oe({},o,i,a)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister($u)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var o=this.os(sl)||{};Object.keys(o).length!==0&&Object.keys(o).forEach((a=>{o[a]=Oe({},o[a],e[a]),delete e[a]})),this._instance.register({[sl]:Oe({},o,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(sl)||{};this._instance.register({[sl]:Oe({},t,{[e]:{}})})}else this._instance.unregister(sl)}reset(){this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Jn=!1}}},mne={sessionRecording:class{get Bt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e,t;return this.bs===Ru||this.bs===Cg?this.bs:(e=(t=this.ys)==null?void 0:t.status)!==null&&e!==void 0?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=gO,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw ns.error("started without valid sessionManager"),new Error(Iw+" started without valid sessionManager. This is a bug.");if(this.Bt.cookieless_mode===gi)throw new Error(Iw+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(Uu))==null||!e.enabled),o=!this.Bt.disable_session_recording,a=this.Bt.disable_session_recording||this._instance.consent.isOptedOut();return ge&&t&&o&&!a}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var o=!Ue(Object.assign)&&!Ue(Array.from);this.ws&&o?(this.Is(e),ns.info("starting")):(this.bs=gO,this.stopRecording())}}Is(e){var t,o,a;this.ws&&(this.bs!==Ru&&this.bs!==Cg&&(this.bs=fO),Je!=null&&(t=Je.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(o=Je.__PosthogExtensions__)!=null&&o.initSessionRecording?this.Cs(e):(a=Je.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,this.Ss,(n=>{if(n)return ns.error("could not load recorder",n);this.Cs(e)})))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}xs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}ks(){var e;(e=this.ni)==null||e.unregister(yC)}Ts(e,t){if(Ct(e))return null;var o,a=Hn(e)?e:parseFloat(e);return typeof(o=a)!="number"||!Number.isFinite(o)||0>o||o>1?(ns.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):a}As(e){if(this.ni){var t,o,a=this.ni,n=()=>{var i,l=e.sessionRecording===!1?void 0:e.sessionRecording,c=this.Ts((i=this.Bt.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),u=this.Ts(l?.sampleRate,"remote config sampleRate"),m=c??u;Ct(m)&&this.ks();var h=l?.minimumDurationMilliseconds;a.register({[Uu]:Oe({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:Oe({capturePerformance:e.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:m,minimumDurationMilliseconds:Ue(h)?null:h,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};n(),(t=this._s)==null||t.call(this),this._s=(o=this._instance.sessionManager)==null?void 0:o.onSessionId(n)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.As(e),void this.xs()):(this.As(e),void this.startIfEnabledOrStop()):(this.bs===Ru&&(this.bs=Cg,ns.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var o;t===void 0&&(t="log"),(o=this.ys)!=null&&o.log?this.ys.log(e,t):ns.warn("log called before recorder was ready")}get Ss(){var e,t,o=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Uu);return(o==null||(t=o.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Es(){var e,t=this._instance.get_property(Uu);if(!t)return!1;var o=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-o}Cs(e){var t,o;if((t=Je.__PosthogExtensions__)==null||!t.initSessionRecording)return ns.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[hB]:!0});if(this.ys||(this.ys=(o=Je.__PosthogExtensions__)==null?void 0:o.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Es())return this.bs===Cg||this.bs===Ru?void 0:(this.bs=Ru,ns.info("persisted remote config is stale, requesting fresh config before starting"),void new xB(this._instance).load());this.bs=fO,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.ni)==null||t.register({[lB]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.ni)==null||t.register({[sB]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,o;this.ys||(o=this.ni)==null||o.register({[e==="url"?cB:dB]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var o;return!((o=this.ys)==null||!o.tryAddCustomEvent(e,t))}}},pne={autocapture:class{constructor(e){this.Rs=!1,this.Ns=null,this.Ms=!1,this.instance=e,this.rageclicks=new uO(e.config.rageclick),this.Fs=null}initialize(){this.startIfEnabled()}get Bt(){var e,t,o=Do(this.instance.config.autocapture)?this.instance.config.autocapture:{};return o.url_allowlist=(e=o.url_allowlist)==null?void 0:e.map((a=>new RegExp(a))),o.url_ignorelist=(t=o.url_ignorelist)==null?void 0:t.map((a=>new RegExp(a))),o}Os(){if(this.isBrowserSupported()){if(ge&&Fe){var e=o=>{o=o||ge?.event;try{this.Ps(o)}catch(a){mO.error("Failed to capture event",a)}};if(Ho(Fe,"submit",e,{capture:!0}),Ho(Fe,"change",e,{capture:!0}),Ho(Fe,"click",e,{capture:!0}),this.Bt.capture_copied_text){var t=o=>{this.Ps(o=o||ge?.event,y0)};Ho(Fe,"copy",t,{capture:!0}),Ho(Fe,"cut",t,{capture:!0})}}}else mO.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Rs&&(this.Os(),this.Rs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Ms=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[nw]:!!e.autocapture_opt_out}),this.Ns=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Fs=e}getElementSelectors(e){var t,o=[];return(t=this.Fs)==null||t.forEach((a=>{var n=Fe?.querySelectorAll(a);n?.forEach((i=>{e===i&&o.push(a)}))})),o}get isEnabled(){var e,t,o=(e=this.instance.persistence)==null?void 0:e.props[nw];if(Pi(this.Ns)&&!Mr(o)&&!this.instance.Fr())return!1;var a=(t=this.Ns)!==null&&t!==void 0?t:!!o;return!!this.instance.config.autocapture&&!a}Ps(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var o,a=rO(e);BB(a)&&(a=a.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(o=this.rageclicks)!=null&&o.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&(function(p,f){if(!ge||Ow(p))return!1;var v,b,S;if(Mr(f)?(v=!!f&&sO,b=void 0):(v=(S=f?.css_selector_ignorelist)!==null&&S!==void 0?S:sO,b=f?.content_ignorelist),v===!1)return!1;var{targetElementList:C}=lO(p,!1);return!(function(w,_){if(w===!1||Ue(w))return!1;var k;if(w===!0)k=Zae;else{if(!Ot(w))return!1;if(w.length>10)return Be.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;k=w.map((x=>x.toLowerCase()))}return _.some((x=>{var{safeText:E,ariaLabel:A}=x;return k.some((D=>E.includes(D)||A.includes(D)))}))})(b,C.map((w=>{var _;return{safeText:bm(w).toLowerCase(),ariaLabel:((_=w.getAttribute("aria-label"))==null?void 0:_.toLowerCase().trim())||""}})))&&!iO(C,v)})(a,this.instance.config.rageclick)&&this.Ps(e,"$rageclick");var n=t===y0;if(a&&(function(p,f,v,b,S){var C,w,_,k;if(v===void 0&&(v=void 0),!ge||Ow(p)||(C=v)!=null&&C.url_allowlist&&!nO(v.url_allowlist)||(w=v)!=null&&w.url_ignorelist&&nO(v.url_ignorelist))return!1;if((_=v)!=null&&_.dom_event_allowlist){var x=v.dom_event_allowlist;if(x&&!x.some((L=>f.type===L)))return!1}var{parentIsUsefulElement:E,targetElementList:A}=lO(p,b);if(!(function(L,U){var F=U?.element_allowlist;if(Ue(F))return!0;var q,j=function(ne){if(F.some((H=>ne.tagName.toLowerCase()===H)))return{v:!0}};for(var K of L)if(q=j(K))return q.v;return!1})(A,v)||!iO(A,(k=v)==null?void 0:k.css_selector_allowlist))return!1;var D=ge.getComputedStyle(p);if(D&&D.getPropertyValue("cursor")==="pointer"&&f.type==="click")return!0;var O=p.tagName.toLowerCase();switch(O){case"html":return!1;case"form":return(S||["submit"]).indexOf(f.type)>=0;case"input":case"select":case"textarea":return(S||["change","click"]).indexOf(f.type)>=0;default:return E?(S||["click"]).indexOf(f.type)>=0:(S||["click"]).indexOf(f.type)>=0&&(xC.indexOf(O)>-1||p.getAttribute("contenteditable")==="true")}})(a,e,this.Bt,n,n?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:l}=ane(a,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Bt.element_attribute_ignorelist,elementsChainAsString:this.Ms});if(l)return!1;var c=this.getElementSelectors(a);if(c&&c.length>0&&(i.$element_selectors=c),t===y0){var u,m=zB(ge==null||(u=ge.getSelection())==null?void 0:u.toString()),h=e.type||"clipboard";if(!m)return!1;i.$selected_content=m,i.$copy_type=h}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return hi(Fe?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ls=(ge==null||(t=ge.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(Be.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,Be.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(ge&&ge.history){var o=this;(e=ge.history.pushState)!=null&&e.__posthog_wrapped__||pO(ge.history,"pushState",(a=>function(n,i,l){a.call(this,n,i,l),o.Bs("pushState")})),(t=ge.history.replaceState)!=null&&t.__posthog_wrapped__||pO(ge.history,"replaceState",(a=>function(n,i,l){a.call(this,n,i,l),o.Bs("replaceState")})),this.js()}}Bs(e){try{var t,o=ge==null||(t=ge.location)==null?void 0:t.pathname;if(!o)return;o!==this.Ls&&this.isEnabled&&this._instance.capture(Oc,{navigation_type:e}),this.Ls=o}catch(a){Be.error("Error capturing "+e+" pageview",a)}}js(){if(!this.Ds){var e=()=>{this.Bs("popstate")};Ho(ge,"popstate",e),this.Ds=()=>{ge&&ge.removeEventListener("popstate",e)}}}},heatmaps:class{get Bt(){return this.instance.config}constructor(e){var t;this.$s=!1,this.Rs=!1,this.qs=null,this.instance=e,this.$s=!((t=this.instance.persistence)==null||!t.props[rw]),this.rageclicks=new uO(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return Do(this.Bt.capture_heatmaps)&&this.Bt.capture_heatmaps.flush_interval_milliseconds&&(e=this.Bt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return Ct(this.Bt.capture_heatmaps)?Ct(this.Bt.enable_heatmaps)?this.$s:this.Bt.enable_heatmaps:this.Bt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Rs)return;rne.info("starting..."),this.Zs(),this.Ft()}else{var e;clearInterval((e=this.qs)!==null&&e!==void 0?e:void 0),this.Vs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[rw]:t}),this.$s=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.T;return this.T=void 0,e}Hs(e){this.Tt(e.originalEvent,"deadclick")}Ft(){this.qs&&clearInterval(this.qs),this.qs=Fe?.visibilityState==="visible"?setInterval(this.Yr.bind(this),this.flushIntervalMilliseconds):null}Zs(){ge&&Fe&&(this.zs=this.Yr.bind(this),Ho(ge,Af,this.zs),this.Us=e=>this.Tt(e||ge?.event),Ho(Fe,"click",this.Us,{capture:!0}),this.Ys=e=>this.Gs(e||ge?.event),Ho(Fe,"mousemove",this.Ys,{capture:!0}),this.Ws=new BD(this.instance,bae,this.Hs.bind(this)),this.Ws.startIfEnabledOrStop(),this.Xs=this.Ft.bind(this),Ho(Fe,Rf,this.Xs),this.Rs=!0)}Vs(){var e;ge&&Fe&&(this.zs&&ge.removeEventListener(Af,this.zs),this.Us&&Fe.removeEventListener("click",this.Us,{capture:!0}),this.Ys&&Fe.removeEventListener("mousemove",this.Ys,{capture:!0}),this.Xs&&Fe.removeEventListener(Rf,this.Xs),clearTimeout(this.Js),(e=this.Ws)==null||e.stop(),this.Rs=!1)}Ks(e,t){var o=this.instance.scrollManager.scrollY(),a=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),i=(function(l,c,u){for(var m=l;m&&Dv(m)&&!Ss(m,"body");){if(m===u)return!1;if(_t(c,ge?.getComputedStyle(m).position))return!0;m=UB(m)}return!1})(rO(e),["fixed","sticky"],n);return{x:e.clientX+(i?0:a),y:e.clientY+(i?0:o),target_fixed:i,type:t}}Tt(e,t){var o;if(t===void 0&&(t="click"),!aO(e.target)&&vO(e)){var a=this.Ks(e,t);(o=this.rageclicks)!=null&&o.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.Qs(Oe({},a,{type:"rageclick"})),this.Qs(a)}}Gs(e){!aO(e.target)&&vO(e)&&(clearTimeout(this.Js),this.Js=setTimeout((()=>{this.Qs(this.Ks(e,"mousemove"))}),500))}Qs(e){if(ge){var t=ge.location.href,o=this.Bt.custom_personal_data_properties,a=this.Bt.mask_personal_data_properties?[...dd,...o||[]]:[],n=fm(t,a,vm);this.T=this.T||{},this.T[n]||(this.T[n]=[]),this.T[n].push(e)}}Yr(){this.T&&!Fc(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:BD,webVitalsAutocapture:class{constructor(e){var t;this.$s=!1,this.Rs=!1,this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),this.T.metrics.length!==0&&(this._instance.capture("$web_vitals",this.T.metrics.reduce(((o,a)=>Oe({},o,{["$web_vitals_"+a.name+"_event"]:Oe({},a),["$web_vitals_"+a.name+"_value"]:a.value})),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=o=>{var a,n=(a=this._instance.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0);if(Ue(n))as.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.io();Ue(i)||(Ct(o?.name)||Ct(o?.value)?as.error("Invalid metric received",o):!this.no||this.no>o.value?(this.T.url!==i&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),Ue(this.T.url)&&(this.T.url=i),this.T.firstMetricTimestamp=Ue(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,o.attribution&&o.attribution.interactionTargetElement&&(o.attribution.interactionTargetElement=void 0),this.T.metrics.push(Oe({},o,{$current_url:i,$session_id:n.sessionId,$window_id:n.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.eo()):as.error("Ignoring metric with value >= "+this.no,o))}},this.so=()=>{if(!this.Rs){var o,a,n,i,l=Je.__PosthogExtensions__;Ue(l)||Ue(l.postHogWebVitalsCallbacks)||({onLCP:o,onCLS:a,onFCP:n,onINP:i}=l.postHogWebVitalsCallbacks),o&&a&&n&&i?(this.allowedMetrics.indexOf("LCP")>-1&&o(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&a(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.ht.bind(this)),this.Rs=!0):as.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.$s=!((t=this._instance.persistence)==null||!t.props[cw]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,o=Do(this.oo)?(e=this.oo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return Ct(o)?((t=this._instance.persistence)==null?void 0:t.props[uw])||["CLS","FCP","INP","LCP"]:o}get flushToCaptureTimeoutMs(){return(Do(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Do(this.oo)?this.oo.web_vitals_attribution:void 0;return e!=null&&e}get no(){var e=Do(this.oo)&&Hn(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:hO;return e>0&&6e4>=e?hO:e}get isEnabled(){var e=ha?.protocol;if(e!=="http:"&&e!=="https:")return as.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Do(this.oo)?this.oo.web_vitals:Mr(this.oo)?this.oo:void 0;return Mr(t)?t:this.$s}startIfEnabled(){this.isEnabled&&!this.Rs&&(as.info("enabled, starting..."),this.ur(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=Do(e.capturePerformance)&&!!e.capturePerformance.web_vitals,o=Do(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[cw]:t}),this._instance.persistence.register({[uw]:o})),this.$s=t,this.startIfEnabled()}}ur(e){var t,o;(t=Je.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(a=>{a?as.error("failed to load script",a):e()}))}io(){var e=ge?ge.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,o=this._instance.config.mask_personal_data_properties?[...dd,...t||[]]:[];return fm(e,o,vm)}as.error("Could not determine current URL")}}},hne={exceptionObserver:class{constructor(e){var t,o,a;this.so=()=>{var n;if(ge&&this.isEnabled&&(n=Je.__PosthogExtensions__)!=null&&n.errorWrappingFunctions){var i=Je.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=Je.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=Je.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.Bt.capture_unhandled_errors&&(this.ao=i(this.captureException.bind(this))),!this.lo&&this.Bt.capture_unhandled_rejections&&(this.lo=l(this.captureException.bind(this))),!this.uo&&this.Bt.capture_console_errors&&(this.uo=c(this.captureException.bind(this)))}catch(u){ku.error("failed to start",u),this.ho()}}},this._instance=e,this.co=!((t=this._instance.persistence)==null||!t.props[iw]),this.do=new Eoe({refillRate:(o=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&o!==void 0?o:1,bucketSize:(a=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:10,refillInterval:1e4,Gt:ku}),this.Bt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Do(e)?t=Oe({},t,e):(Ue(e)?this.co:e)&&(t=Oe({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Bt.capture_console_errors||this.Bt.capture_unhandled_errors||this.Bt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ku.info("enabled"),this.ho(),this.ur(this.so)):this.ho()}ur(e){var t,o;(t=Je.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"exception-autocapture",(a=>{if(a)return ku.error("failed to load script",a);e()}))}ho(){var e,t,o;(e=this.ao)==null||e.call(this),this.ao=void 0,(t=this.lo)==null||t.call(this),this.lo=void 0,(o=this.uo)==null||o.call(this),this.uo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[iw]:this.co}),this.Bt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.Bt=this.vo()}captureException(e){var t,o,a,n=(t=e==null||(o=e.$exception_list)==null||(o=o[0])==null?void 0:o.type)!==null&&t!==void 0?t:"Exception";this.do.consumeRateLimit(n)?ku.info("Skipping exception capture because of client rate limiting.",{exception:n}):(a=this._instance.exceptions)==null||a.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,o;this.fo=[],this.po=new zoe([new Woe,new aae,new Zoe,new Yoe,new tae,new eae,new Joe,new oae],(function(a){for(var n=arguments.length,i=new Array(n>1?n-1:0),l=1;n>l;l++)i[l-1]=arguments[l];return function(c,u){u===void 0&&(u=0);for(var m=[],h=c.split(`
|
|
164
|
-
`),p=u;h.length>p;p++){var f=h[p];if(1024>=f.length){var v=ID.test(f)?f.replace(ID,"$1"):f;if(!v.match(/\S*Error: /)){for(var b of i){var S=b(v,a);if(S){m.push(S);break}}if(m.length>=50)break}}}return(function(C){if(!C.length)return[];var w=Array.from(C);return w.reverse(),w.slice(0,50).map((_=>{return Oe({},_,{filename:_.filename||(k=w,k[k.length-1]||{}).filename,function:_.function||cd});var k}))})(m)}})("web:javascript",Voe,Koe)),this._instance=e,this.fo=(t=(o=this._instance.persistence)==null?void 0:o.get_property(sw))!==null&&t!==void 0?t:[],this.mo=_f(this.yo()),this.bo=new rae(this.mo)}onConfigChange(){this.mo=_f(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,o,a;if("errorTracking"in e){var n=(t=(o=e.errorTracking)==null?void 0:o.suppressionRules)!==null&&t!==void 0?t:[],i=(a=e.errorTracking)==null?void 0:a.captureExtensionExceptions;this.fo=n,this._instance.persistence&&this._instance.persistence.register({[sw]:this.fo,[lw]:i})}}get _o(){var e,t=!!this._instance.get_property(lw),o=this._instance.config.error_tracking.captureExtensionExceptions;return(e=o??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!To(e)||e.trim().length===0)return void mi.warn("Ignoring exception step because message must be a non-empty string");var o=this.wo(t),{sanitizedProperties:a,droppedKeys:n}=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(i).reduce(((c,u)=>nae.has(u)?(l.push(u),c):(c[u]=i[u],c)),{}),droppedKeys:l}})(o);n.length>0&&mi.warn("Ignoring reserved exception step fields",{droppedKeys:n}),this.bo.add(Oe({[Tf]:e,[wf]:new Date().toISOString()},a))}catch(i){mi.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Io(t)){if(this.Co(t))return this.So("Exception dropped: matched a suppression rule"),void mi.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.xo(t))return this.So("Exception dropped: thrown by a browser extension"),void mi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ko(t))return this.So("Exception dropped: thrown by the PostHog SDK"),void mi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var o=this.mo.enabled&&Ct(e.$exception_steps)?this.To(e):e;try{var a=this._instance.capture("$exception",o,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return a&&this.bo.clear(),a}catch(n){return mi.error("Failed to capture exception event. Dropping this exception.",n),void this.bo.clear()}}catch(n){return void mi.error("Failed to process exception event. Ignoring this exception.",n)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Oe({},e,{$exception_steps:t})}catch(o){return mi.error("Failed to read buffered exception steps. Capturing exception without steps.",o),e}}So(e){this.mo.enabled&&this.bo.add({[Tf]:e,[wf]:new Date().toISOString()})}wo(e){return Do(e)?Oe({},e):{}}yo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}Co(e){if(e.length===0)return!1;var t=e.reduce(((o,a)=>{var{type:n,value:i}=a;return To(n)&&n.length>0&&o.$exception_types.push(n),To(i)&&i.length>0&&o.$exception_values.push(i),o}),{$exception_types:[],$exception_values:[]});return this.fo.some((o=>{var a=o.values.map((n=>{var i,l=IB[n.operator],c=Ot(n.value)?n.value:[n.value],u=(i=t[n.key])!==null&&i!==void 0?i:[];return c.length>0&&l(c,u)}));return o.type==="OR"?a.some(Boolean):a.every(Boolean)}))}xo(e){return e.flatMap((t=>{var o,a;return(o=(a=t.stacktrace)==null?void 0:a.frames)!==null&&o!==void 0?o:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ko(e){if(e.length>0){var t,o,a,n,i=(t=(o=e[0].stacktrace)==null?void 0:o.frames)!==null&&t!==void 0?t:[],l=i[i.length-1];return(a=l==null||(n=l.filename)==null?void 0:n.includes("posthog.com/static"))!==null&&a!==void 0&&a}return!1}Io(e){return!Ct(e)&&Ot(e)}}},gne=Oe({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Ao=null,this.Eo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[dw]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Ao||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(dw)||this.ur((()=>this.Ro()))}ur(e){var t,o;(t=Je.__PosthogExtensions__)!=null&&t.generateProductTours?e():(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"product-tours",(a=>{a?bO.error("Could not load product tours script",a):e()}))}Ro(){var e;!this.Ao&&(e=Je.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ao=Je.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Ot(this.Eo)||t){var o=this.ni;if(o){var a=o.props[Vg];if(Ot(a)&&!t)return this.Eo=a,void e(a,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:n=>{var i=n.statusCode;if(i!==200||!n.json){var l="Product Tours API could not be loaded, status: "+i;return bO.error(l),void e([],{isLoaded:!1,error:l})}var c=Ot(n.json.product_tours)?n.json.product_tours:[];this.Eo=c,o&&o.register({[Vg]:c}),e(c,{isLoaded:!0})}})}else e(this.Eo,{isLoaded:!0})}getActiveProductTours(e){Ct(this.Ao)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Ao.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Ao)==null||t.showTourById(e)}previewTour(e){this.Ao?this.Ao.previewTour(e):this.ur((()=>{var t;this.Ro(),(t=this.Ao)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.Ao)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Ao)==null||e.nextStep()}previousStep(){var e;(e=this.Ao)==null||e.previousStep()}clearCache(){var e;this.Eo=null,(e=this.ni)==null||e.unregister(Vg)}resetTour(e){var t;(t=this.Ao)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Ao)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Ao)==null||t.cancelPendingTour(e)}}},Ov),fne={siteApps:class{constructor(e){this._instance=e,this.No=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Mo(e,t){if(t){var o=this.globalsForEvent(t);this.No.push(o),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var e;return(e=Je._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Mo.bind(this));this.Fo=()=>{e(),this.No=[],this.Fo=void 0}}}globalsForEvent(e){var t,o,a,n,i,l,c;if(!e)throw new Error("Event payload is required");var u={},m=this._instance.get_property("$groups")||[],h=this._instance.get_property("$stored_group_properties")||{};for(var[p,f]of Object.entries(h))u[p]={id:m[p],type:p,properties:f};var{$set_once:v,$set:b}=e;return{event:Oe({},LF(e,ine),{properties:Oe({},e.properties,b?{$set:Oe({},(t=(o=e.properties)==null?void 0:o.$set)!==null&&t!==void 0?t:{},b)}:{},v?{$set_once:Oe({},(a=(n=e.properties)==null?void 0:n.$set_once)!==null&&a!==void 0?a:{},v)}:{}),elements_chain:(i=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t=this.apps[e.id],o=()=>{var l;!t.errored&&this.No.length&&(rs.info("Processing "+this.No.length+" events for site app with id "+e.id),this.No.forEach((c=>t.processEvent==null?void 0:t.processEvent(c))),t.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Fo)==null||l.call(this))},a=!1,n=l=>{t.errored=!l,t.loaded=!0,rs.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),a&&o()};try{var{processEvent:i}=e.init({posthog:this._instance,callback(l){n(l)}});i&&(t.processEvent=i),a=!0}catch(l){rs.error(yO+e.id,l),n(!1)}if(a&&t.loaded)try{o()}catch(l){rs.error("Error while processing buffered events PostHog app with config id "+e.id,l),t.errored=!0}}Oo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var o of e)this.setupSiteApp(o)}Po(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var o of Object.values(this.apps))try{o.processEvent==null||o.processEvent(t)}catch(a){rs.error("Error while processing event "+e.event+" for site app "+o.id,a)}}}onRemoteConfig(e){var t,o,a,n=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Oo(),void this._instance.on("eventCaptured",(u=>this.Po(u)))):void rs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((o=this.Fo)==null||o.call(this),(a=e.siteApps)!=null&&a.length)if(this.isEnabled){var i=function(u){var m;Je["__$$ph_site_app_"+u]=n._instance,(m=Je.__PosthogExtensions__)==null||m.loadSiteApp==null||m.loadSiteApp(n._instance,c,(h=>{if(h)return rs.error(yO+u,h)}))};for(var{id:l,url:c}of e.siteApps)i(l)}else rs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},vne={tracingHeaders:class{constructor(e){this.Lo=void 0,this.Do=void 0,this.so=()=>{var t,o,a=this.Bo()||[];Ue(this.Lo)&&((t=Je.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(a,this._instance.get_distinct_id(),this._instance.sessionManager)),Ue(this.Do)&&((o=Je.__PosthogExtensions__)==null||(o=o.tracingHeadersPatchFns)==null||o._patchFetch(a,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,o;(t=Je.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"tracing-headers",(a=>{if(a)return nne.error("failed to load script",a);e()}))}Bo(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Bo()?this.ur(this.so):((e=this.Lo)==null||e.call(this),(t=this.Do)==null||t.call(this),this.Lo=void 0,this.Do=void 0)}}},bne=Oe({surveys:class{get Bt(){return this._instance.config}constructor(e){this.jo=void 0,this._surveyManager=null,this.$o=!1,this.qo=[],this.Zo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Bt.disable_surveys){var t=e.surveys;if(Ct(t))return Jt.warn("Flags not loaded yet. Not loading surveys.");var o=Ot(t);this.jo=o?t.length>0:t,Jt.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var o=localStorage.key(t);(o!=null&&o.startsWith(Aw)||o!=null&&o.startsWith("inProgressSurvey_"))&&e.push(o)}e.forEach((a=>localStorage.removeItem(a)))}loadIfEnabled(){if(!this._surveyManager)if(this.$o)Jt.info("Already initializing surveys, skipping...");else if(this.Bt.disable_surveys)Jt.info(SO);else if(this.Bt.cookieless_mode&&this._instance.consent.isOptedOut())Jt.info("Not loading surveys in cookieless mode without consent.");else{var e=Je?.__PosthogExtensions__;if(e){if(!Ue(this.jo)||this.Bt.advanced_enable_surveys){var t=this.jo||this.Bt.advanced_enable_surveys;this.$o=!0;try{var o=e.generateSurveys;if(o)return void this.Vo(o,t);var a=e.loadExternalDependency;if(!a)return void this.Ho(SC);a(this._instance,"surveys",(n=>{n||!e.generateSurveys?this.Ho("Could not load surveys script",n):this.Vo(e.generateSurveys,t)}))}catch(n){throw this.Ho("Error initializing surveys",n),n}finally{this.$o=!1}}}else Jt.error("PostHog Extensions not found.")}}Vo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new cne(this._instance),Jt.info("Surveys loaded successfully"),this.zo({isLoaded:!0})}Ho(e,t){Jt.error(e,t),this.zo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.qo.push(e),this._surveyManager&&this.zo({isLoaded:!0}),()=>{this.qo=this.qo.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Bt.disable_surveys)return Jt.info(SO),e([]);var o,a=this._instance.get_property(gw);if(a&&!t)return e(a,{isLoaded:!0});typeof Promise<"u"&&this.Zo?this.Zo.then((n=>{var{surveys:i,context:l}=n;return e(i,l)})):(typeof Promise<"u"&&(this.Zo=new Promise((n=>{o=n}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Bt.token),method:"GET",timeout:this.Bt.surveys_request_timeout_ms,callback:n=>{var i;this.Zo=null;var l=n.statusCode;if(l!==200||!n.json){var c="Surveys API could not be loaded, status: "+l;Jt.error(c);var u={isLoaded:!1,error:c};return e([],u),void(o==null||o({surveys:[],context:u}))}var m,h=n.json.surveys||[],p=h.filter((v=>(function(b){return!(!b.start_date||b.end_date)})(v)&&((function(b){var S;return!((S=b.conditions)==null||(S=S.events)==null||(S=S.values)==null||!S.length)})(v)||(function(b){var S;return!((S=b.conditions)==null||(S=S.actions)==null||(S=S.values)==null||!S.length)})(v))));p.length>0&&((m=this._surveyEventReceiver)==null||m.register(p)),(i=this._instance.persistence)==null||i.register({[gw]:h});var f={isLoaded:!0};e(h,f),o?.({surveys:h,context:f})}}))}zo(e){for(var t of this.qo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(o){Jt.error("Error in survey callback",o)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!Ct(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Jt.warn("init was not called")}Uo(e){var t=null;return this.getSurveys((o=>{var a;t=(a=o.find((n=>n.id===e)))!==null&&a!==void 0?a:null})),t}Yo(e){if(Ct(this._surveyManager))return{eligible:!1,reason:T0};var t=typeof e=="string"?this.Uo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Ct(this._surveyManager))return Jt.warn("init was not called"),{visible:!1,disabledReason:T0};var t=this.Yo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return Ct(this._surveyManager)?(Jt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:T0})):new Promise((o=>{this.getSurveys((a=>{var n,i=(n=a.find((c=>c.id===e)))!==null&&n!==void 0?n:null;if(i){var l=this.Yo(i);o({visible:l.eligible,disabledReason:l.reason})}else o({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,o){var a;if(Ct(this._surveyManager))Jt.warn("init was not called");else{var n=typeof e=="string"?this.Uo(e):e;if(n!=null&&n.id)if($ae.includes(n.type)){var i=Fe?.querySelector(t);if(i)return(a=n.appearance)!=null&&a.surveyPopupDelaySeconds?(Jt.info("Rendering survey "+n.id+" with delay of "+n.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Jt.info("Rendering survey "+n.id+" with delay of "+((l=n.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(n,i,o),Jt.info("Survey "+n.id+" rendered")}),1e3*n.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(n,i,o);Jt.warn("Survey element not found")}else Jt.warn("Surveys of type "+n.type+" cannot be rendered in the app");else Jt.warn("Survey not found")}}displaySurvey(e,t){var o;if(Ct(this._surveyManager))Jt.warn("init was not called");else{var a=this.Uo(e);if(a){var n=a;if((o=a.appearance)!=null&&o.surveyPopupDelaySeconds&&t.ignoreDelay&&(n=Oe({},a,{appearance:Oe({},a.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Cw.Popover&&t.initialResponses&&Jt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var i=this.canRenderSurvey(a);if(!i.visible)return void Jt.warn("Survey is not eligible to be displayed: ",i.disabledReason)}t.displayType!==Cw.Inline?this._surveyManager.handlePopoverSurvey(n,t):this.renderSurvey(n,t.selector,t.properties)}else Jt.warn("Survey not found")}}cancelPendingSurvey(e){Ct(this._surveyManager)?Jt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},Ov),yne={toolbar:class{constructor(e){this.instance=e}Go(e){Je.ph_toolbar_state=e}Wo(){var e;return(e=Je.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,o){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),gB(this.instance.config)||!ge||!Fe)return!1;e=e??ge.location,o=o??ge.history;try{if(!t){try{ge.localStorage.setItem("test","test"),ge.localStorage.removeItem("test")}catch{return!1}t=ge?.localStorage}var a,n=dne||If(e.hash,"__posthog")||If(e.hash,"state"),i=n?ND((()=>JSON.parse(atob(decodeURIComponent(n)))))||ND((()=>JSON.parse(decodeURIComponent(n)))):null;return i&&i.action==="ph_authorize"?((a=i).source="url",a&&Object.keys(a).length>0&&(i.desiredHash?e.hash=i.desiredHash:o?o.replaceState(o.state,"",e.pathname+e.search):e.hash="")):((a=JSON.parse(t.getItem(TO)||"{}")).source="localstorage",delete a.userIntent),!(!a.token||this.instance.config.token!==a.token||(this.loadToolbar(a),0))}catch{return!1}}Xo(e){var t=Je.ph_load_toolbar||Je.ph_load_editor;!Ct(t)&&hi(t)?t(e,this.instance):wO.warn("No toolbar load function found")}loadToolbar(e){var t=!(Fe==null||!Fe.getElementById(uB));if(!ge||t)return!1;var o=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,a=Oe({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},o?{instrument:!1}:{});if(ge.localStorage.setItem(TO,JSON.stringify(Oe({},a,{source:void 0}))),this.Wo()===2)this.Xo(a);else if(this.Wo()===0){var n;this.Go(1),(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return wO.error("[Toolbar] Failed to load",i),void this.Go(0);this.Go(2),this.Xo(a)})),Ho(ge,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(a)}))}return!0}Jo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,o){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),this.maybeLoadToolbar(e,t,o)}}},Sne=Oe({experiments:xa},Ov),Tne={conversations:class{constructor(e){this.Ko=void 0,this._conversationsManager=null,this.Qo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Ct(t)||(Mr(t)?this.Ko=t:(this.Ko=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Ko=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Qo||this._instance.config.disable_conversations||gB(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=Je?.__PosthogExtensions__;if(e&&!Ue(this.Ko)&&this.Ko)if(this.ea&&this.ea.token){this.Qo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Qo=!1);var o=e.loadExternalDependency;if(!o)return void this.ra(SC);o(this._instance,"conversations",(a=>{a||!e.initConversations?this.ra("Could not load conversations script",a):this.ta(e.initConversations),this.Qo=!1}))}catch(a){this.ra("Error initializing conversations",a),this.Qo=!1}}else Fn.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Fn.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else Fn.error("Cannot complete initialization: remote config is null")}ra(e,t){Fn.error(e,t),this._conversationsManager=null,this.Qo=!1}show(){this._conversationsManager?this._conversationsManager.show():Fn.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ko===!0&&!Pi(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,o){var a=this;return zn((function*(){return a._conversationsManager?a._conversationsManager.sendMessage(e,t,o):(Fn.warn(nl),null)}))()}getMessages(e,t){var o=this;return zn((function*(){return o._conversationsManager?o._conversationsManager.getMessages(e,t):(Fn.warn(nl),null)}))()}markAsRead(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Fn.warn(nl),null)}))()}getTickets(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Fn.warn(nl),null)}))()}requestRestoreLink(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Fn.warn(nl),null)}))()}restoreFromToken(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Fn.warn(nl),null)}))()}restoreFromUrlToken(){var e=this;return zn((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Fn.warn(nl),null)}))()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}un(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},wne={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=vo("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.la=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,o=(t=e.logs)==null?void 0:t.captureConsoleLogs;!Ct(o)&&o&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.oa=0,this.aa=0,this.la=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=Je?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(o=>{var a;o||(a=e.logs)==null||!a.initializeLogs?this.Gt.error("Could not load logs script",o):(e.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(SC)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,o,a,n,i,l;if(this._instance.is_capturing())if(e&&e.body){var c=(t=(o=this._instance.config.logs)==null?void 0:o.flushIntervalMs)!==null&&t!==void 0?t:3e3,u=(a=(n=this._instance.config.logs)==null?void 0:n.maxLogsPerInterval)!==null&&a!==void 0?a:1e3,m=Date.now();if(c>m-this.aa||(this.aa=m,this.oa=0,this.la=!1),u>this.oa){this.oa++;var h=(function(p,f){var v=p.level||"info",{text:b,number:S}=tB[v]||Boe,C=String(Date.now())+"000000",w={};f.distinctId&&(w.posthogDistinctId=f.distinctId),f.sessionId&&(w.sessionId=f.sessionId),f.currentUrl&&(w["url.full"]=f.currentUrl),f.screenName&&(w["screen.name"]=f.screenName),f.appState&&(w["app.state"]=f.appState),f.activeFeatureFlags&&f.activeFeatureFlags.length>0&&(w.feature_flags=f.activeFeatureFlags);var _=Oe({},w,p.attributes||{}),k={timeUnixNano:C,observedTimeUnixNano:C,severityNumber:S,severityText:b,body:{stringValue:p.body},attributes:MD(_)};return p.trace_id&&(k.traceId=p.trace_id),p.span_id&&(k.spanId=p.span_id),Ue(p.trace_flags)||(k.flags=p.trace_flags),k})(e,this.ua());this.sa.push({record:h}),((i=(l=this._instance.config.logs)==null?void 0:l.maxBufferSize)!==null&&i!==void 0?i:100)>this.sa.length?this.ha():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+u+" logs per "+c+"ms"),this.la=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={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.ca}flushLogs(e){if(this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.sa.length!==0){var t=this.sa;this.sa=[];var o=this._instance.config.logs,a=Oe({"service.name":o?.serviceName||"unknown_service"},o?.environment&&{"deployment.environment":o.environment},o?.serviceVersion&&{"service.version":o.serviceVersion},o?.resourceAttributes),n=(function(l,c,u,m){return{resourceLogs:[{resource:{attributes:MD(c)},scopeLogs:[{scope:{name:u,version:m},logRecords:l}]}]}})(t.map((l=>l.record)),a,za.LIB_NAME,za.LIB_VERSION),i=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Vi({method:"POST",url:i,data:n,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.jr||(this.jr=setTimeout((()=>{this.jr=void 0,this.flushLogs()}),(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}ua(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:o}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=o}if(Je!=null&&(e=Je.location)!=null&&e.href&&(t.currentUrl=Je.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(t.activeFeatureFlags=a)}return t}}},_ne=Oe({},Ov,mne,pne,hne,gne,fne,bne,vne,yne,Sne,Tne,wne);Un.__defaultExtensionClasses=Oe({},_ne);var xO,xi=(xO=Ju[Mc]=new Un,(function(){function e(){e.done||(e.done=!0,FB=!1,uo(Ju,(function(t){t._dom_loaded()})))}Fe!=null&&Fe.addEventListener?Fe.readyState==="complete"?e():Ho(Fe,"DOMContentLoaded",e,{capture:!1}):ge&&Be.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),xO);const Cne="studio-ui-resources",jf="html",Pne=10080*60*1e3,xne=50,Ene=16*1024*1024;function kne(e){return e[0]==="mcp"&&e[1]===gL}function Mv(){return new Promise((e,t)=>{const o=indexedDB.open(Cne,1);o.onupgradeneeded=()=>{o.result.objectStoreNames.contains(jf)||o.result.createObjectStore(jf)},o.onsuccess=()=>e(o.result),o.onerror=()=>t(o.error)})}function md(e,t){return e.transaction(jf,t).objectStore(jf)}function Lw(e){return new Promise((t,o)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>o(e.error)})}async function Rne(e){if(!(typeof indexedDB>"u"))try{const t=await Mv(),o=md(t,"readonly"),a=await Lw(o.getAllKeys()),n=await Lw(o.getAll()),i=Date.now(),l=a.map((m,h)=>({key:m,value:n[h]})).sort((m,h)=>(h.value?.updatedAt??0)-(m.value?.updatedAt??0)),c=[];let u=0;for(const{key:m,value:h}of l){if(!h||i-h.updatedAt>Pne||u>=xne){c.push(m);continue}u++;try{const f=JSON.parse(String(m));e.getQueryData(f)===void 0&&e.setQueryData(f,h.html,{updatedAt:0})}catch{c.push(m)}}if(c.length>0){const m=md(t,"readwrite");for(const h of c)m.delete(h)}}catch{}}function Ane(e){if(typeof indexedDB>"u")return()=>{};const t=Mv().catch(()=>null);return e.getQueryCache().subscribe(o=>{const a=o.query;if(!Array.isArray(a.queryKey)||!kne(a.queryKey)||a.state.status!=="success")return;const n=a.state.data;typeof n!="string"||n.length>Ene||t.then(i=>{if(i)try{md(i,"readwrite").put({html:n,updatedAt:Date.now()},JSON.stringify(a.queryKey))}catch{}})})}function Dne(){typeof indexedDB>"u"||Mv().then(e=>md(e,"readwrite").clear()).catch(()=>{})}async function qge(e){if(!(typeof indexedDB>"u"))try{const t=await Mv(),o=await Lw(md(t,"readonly").getAllKeys()),a=md(t,"readwrite");for(const n of o)try{const i=JSON.parse(String(n));i[1]===gL&&i[3]===e&&a.delete(n)}catch{}}catch{}}const zf="studio:rq-cache",EC=1440*60*1e3,One=1e3,Mne=new Set(["publicConfig","ai-provider-keys","organization-settings","home-next-actions"]),Ine=new Set(["VIRTUAL_MCP","CONNECTIONS"]);let GB=!1,KB=!1;function Lne(e){const t=e[0];return typeof t=="string"&&Mne.has(t)?!0:e[3]==="collection"&&typeof e[4]=="string"&&Ine.has(e[4])}function Nne(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(zf);if(!t)return;const o=JSON.parse(t),a=!o.timestamp||Date.now()-o.timestamp>EC;if(o.buster!=="4.358.13"||a||!o.state){window.localStorage.removeItem(zf);return}Sq(e,o.state),GB=!0}catch{zne()}}function Fne(e){if(typeof window>"u")return()=>{};let t=null;const o=()=>{t=null;try{const a=yq(e,{shouldDehydrateQuery:n=>n.state.status==="success"&&Lne(n.queryKey)});window.localStorage.setItem(zf,JSON.stringify({buster:"4.358.13",timestamp:Date.now(),state:a}))}catch{}};return e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(o,One))})}const WB="studio:org-cache:",Bne=20;function jne(e){const t=Date.now(),o=Object.entries(e).filter(([,a])=>t-a.updatedAt<=EC);for(o.sort(([,a],[,n])=>a.updatedAt-n.updatedAt);o.length>Bne;)o.shift();return Object.fromEntries(o)}function YB(e){return`${WB}${e}`}function $ge(e,t){if(typeof window>"u")return null;try{const o=window.localStorage.getItem(YB(e));if(!o)return null;const a=JSON.parse(o)[t];return!a||Date.now()-a.updatedAt>EC?null:(KB=!0,a)}catch{return null}}function Vge(e,t,o){if(!(typeof window>"u"))try{const a=YB(e),n=window.localStorage.getItem(a),i=n?JSON.parse(n):{};i[t]={data:o,updatedAt:Date.now()},window.localStorage.setItem(a,JSON.stringify(jne(i)))}catch{}}function zne(){if(Dne(),!(typeof window>"u"))try{window.localStorage.removeItem(zf);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(WB)&&window.localStorage.removeItem(t)}}catch{}}function Une(){return GB}function qne(){return KB}let wi=!1,Nw=null,EO=!1;const kC="studio:lp-distinct-id",ZB="mesh:lp-distinct-id",_0="/api/_reports/link-token/",$ne=1440*60*1e3;function QB(e){const t="https://analytics.invalid",o=/^[a-z][a-z\d+.-]*:\/\//i.test(e),a=e.startsWith("//");try{const n=new URL(e,t);let i=!1;for(const l of["key","d"])n.searchParams.has(l)&&(n.searchParams.delete(l),i=!0);return n.pathname.startsWith(_0)&&n.pathname!==_0&&(n.pathname=`${_0}redacted`,i=!0),i?o?n.toString():a?`//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`:e}catch{return e}}function C0(e){return Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="string"?QB(o):o]))}const Vne=e=>e?(e.properties=C0(e.properties),e.$set&&(e.$set=C0(e.$set)),e.$set_once&&(e.$set_once=C0(e.$set_once)),e):null;function JB(){try{const e=window.localStorage.getItem(kC)??window.localStorage.getItem(ZB);if(!e)return;const{id:t,ts:o}=JSON.parse(e);return typeof t!="string"||!t||typeof o!="number"?void 0:Date.now()-o<=$ne?t:void 0}catch{return}}function Hne(){try{window.localStorage.removeItem(kC),window.localStorage.removeItem(ZB)}catch{}}function Gne(){try{const e=new URL(window.location.href),t=e.searchParams.get("ph_did");t&&(window.localStorage.setItem(kC,JSON.stringify({id:t,ts:Date.now()})),e.searchParams.delete("ph_did"),window.history.replaceState(window.history.state,"",e.toString()));const o=t??JB();return o?Object.keys(window.localStorage).some(n=>n.startsWith("ph_")&&n.endsWith("_posthog"))?void 0:o:void 0}catch{return}}function Kne(e){const t=JB();if(t&&(Hne(),t!==e))try{xi.alias(t)}catch{}}function Wne(e,t){if(wi||typeof window>"u")return;const o=Gne();xi.init(e,{api_host:t,ui_host:"https://us.posthog.com",cross_subdomain_cookie:!0,...o?{bootstrap:{distinctID:o}}:{},capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,before_send:Vne,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture",maskCapturedNetworkRequestFn:a=>({...a,...typeof a.name=="string"?{name:QB(a.name)}:{}})},person_profiles:"identified_only"}),wi=!0}function Yne(e,t){wi&&(xi.identify(e,t),Kne(e))}function Zne(){wi&&(xi.reset(),Nw=null)}function XB(e,t){wi&&xi.capture(e,t)}function Hge(){return wi}function Gge(){if(!wi||EO||typeof performance>"u")return;EO=!0;const e=performance.getEntriesByType("navigation")[0],t=o=>{const a=performance.getEntriesByName(o,"measure")[0];return a?Math.round(a.duration):void 0};XB("perf_app_bootstrap",{nav_type:e?.type,ttfb_ms:e?Math.round(e.responseStart):void 0,dom_interactive_ms:e?Math.round(e.domInteractive):void 0,dom_content_loaded_ms:e?Math.round(e.domContentLoadedEventEnd):void 0,config_fetch_ms:t("studio:config-fetch"),active_org_fetch_ms:t("studio:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:Une(),org_cache_restored:qne()})}function Kge(e,t){wi&&e!==Nw&&(xi.group("organization",e,t),Nw=e)}function e3(e,t){if(wi)try{xi.captureException(e,t)}catch{}}const Qne=["radial-gradient(ellipse 85% 85% at 0% 0%, rgba(165,149,255,0.6) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 100% 100%, rgba(208,236,26,0.52) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 0% 100%, rgba(255,193,22,0.48) 0%, transparent 72%)"].join(", ");function Jne(e){const t=Ne.c(3),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=T.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:Qne}}),t[0]=a):a=t[0];let n;return t[1]!==o?(n=T.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[a,T.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:o})]}),t[1]=o,t[2]=n):n=t[2],n}function t3(e){const t=Ne.c(20),{orgName:o}=e,a=Rs(),n=Xne;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx("div",{className:"bg-muted p-3 rounded-full",children:T.jsx(eN,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=i):i=t[0];let l;t[1]!==a?(l=a("common.archivedOrgScreen.orgUnavailable"),t[1]=a,t[2]=l):l=t[2];let c;t[3]!==l?(c=T.jsx("h3",{className:"text-lg font-medium",children:l}),t[3]=l,t[4]=c):c=t[4];let u;t[5]!==o||t[6]!==a?(u=o?a("common.archivedOrgScreen.deletedWithName",{orgName:o}):a("common.archivedOrgScreen.deletedGeneric"),t[5]=o,t[6]=a,t[7]=u):u=t[7];let m;t[8]!==u?(m=T.jsx("p",{className:"text-sm text-muted-foreground",children:u}),t[8]=u,t[9]=m):m=t[9];let h;t[10]!==c||t[11]!==m?(h=T.jsxs("div",{className:"space-y-2",children:[c,m]}),t[10]=c,t[11]=m,t[12]=h):h=t[12];let p;t[13]!==a?(p=a("common.archivedOrgScreen.goHome"),t[13]=a,t[14]=p):p=t[14];let f;t[15]!==p?(f=T.jsx(ad,{onClick:n,children:p}),t[15]=p,t[16]=f):f=t[16];let v;return t[17]!==h||t[18]!==f?(v=T.jsxs(Jne,{children:[i,h,f]}),t[17]=h,t[18]=f,t[19]=v):v=t[19],v}function Xne(){window.location.href="/"}function ere(){const e=Ne.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:o}=xm(t);let a;return e[1]!==o?(a=T.jsx(ad,{variant:"outline",size:"sm",asChild:!0,children:T.jsx(hd,{to:"/$org/settings/profile",params:{org:o},children:"Go to your profile"})}),e[1]=o,e[2]=a):a=e[2],a}function tre(e){const t=Ne.c(13),{area:o,description:a,action:n}=e,i=o?`No access to ${o}`:"No access",l=a??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=T.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:T.jsx(aN,{size:28})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=T.jsx("h3",{className:"text-lg font-medium",children:i}),t[1]=i,t[2]=u):u=t[2];let m;t[3]!==l?(m=T.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:l}),t[3]=l,t[4]=m):m=t[4];let h;t[5]!==u||t[6]!==m?(h=T.jsxs("div",{className:"space-y-1",children:[u,m]}),t[5]=u,t[6]=m,t[7]=h):h=t[7];let p;t[8]!==n?(p=n??T.jsx(ere,{}),t[8]=n,t[9]=p):p=t[9];let f;return t[10]!==h||t[11]!==p?(f=T.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[c,h,p]}),t[10]=h,t[11]=p,t[12]=f):f=t[12],f}const kO="__studio_chunk_reload_ts";function o3(e){return e?.message==="Organization is archived"}function ore(e){return!!e?.message?.includes("Access denied")}function RO(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class are extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o),e3(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:o.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t,t:o}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:o3(this.state.error)?T.jsx(t3,{}):ore(this.state.error)?T.jsx(tre,{}):T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(K_,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:o("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||o("common.errorBoundary.unexpectedError")})]}),T.jsx(ad,{variant:"outline",onClick:this.resetError,children:o("common.errorBoundary.tryAgain")})]})}return this.props.children}}function nre(e){const t=Ne.c(3),o=Rs();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(are,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}class rre extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o);const a=RO(t);if(e3(t,{boundary:"chunk_root",is_chunk_load_error:a,error_name:t.name,error_message:t.message,component_stack:o.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!a)return;const n=sessionStorage.getItem(kO),i=Date.now();(!n||i-Number(n)>1e4)&&(sessionStorage.setItem(kO,String(i)),window.location.reload())}render(){const{t}=this.props;return this.state.hasError&&RO(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(nN,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.newVersionAvailable")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:t("common.errorBoundary.newVersionDeployed")})]}),T.jsx(ad,{onClick:()=>window.location.reload(),children:t("common.errorBoundary.refresh")})]}):this.state.hasError?o3(this.state.error)?T.jsx(t3,{}):T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(K_,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||t("common.errorBoundary.unexpectedError")})]}),T.jsx(ad,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:t("common.errorBoundary.tryAgain")})]}):this.props.children}}function ire(e){const t=Ne.c(3),o=Rs();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(rre,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}function sre(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{"data-slot":"card",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function Wge(e){const t=Ne.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx("div",{"data-slot":"card-content",...o}),t[2]=o,t[3]=a):a=t[3],a}function Yge(e){const t=Ne.c(12),{title:o,description:a,docsHref:n,actions:i,className:l,headerClassName:c,children:u}=e;let m;t[0]!==l?(m=Dt("flex flex-col gap-3",l),t[0]=l,t[1]=m):m=t[1];let h;t[2]!==i||t[3]!==a||t[4]!==n||t[5]!==c||t[6]!==o?(h=(o||a||n||i)&&T.jsxs("div",{className:Dt("flex items-center justify-between gap-3 px-4",c),children:[T.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[o&&T.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:o}),(a||n)&&T.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[a,n&&T.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",T.jsx(tN,{size:12})]})]})]}),i&&T.jsx("div",{className:"shrink-0",children:i})]}),t[2]=i,t[3]=a,t[4]=n,t[5]=c,t[6]=o,t[7]=h):h=t[7];let p;return t[8]!==u||t[9]!==m||t[10]!==h?(p=T.jsxs("section",{className:m,children:[h,u]}),t[8]=u,t[9]=m,t[10]=h,t[11]=p):p=t[11],p}function Zge(e){const t=Ne.c(11),{className:o,children:a}=e;let n,i,l;if(t[0]!==a||t[1]!==o){const u=R.Children.toArray(a).filter(R.isValidElement);n=sre,t[5]!==o?(i=Dt("p-0 gap-0 overflow-hidden",o),t[5]=o,t[6]=i):i=t[6],l=u.map(lre),t[0]=a,t[1]=o,t[2]=n,t[3]=i,t[4]=l}else n=t[2],i=t[3],l=t[4];let c;return t[7]!==n||t[8]!==i||t[9]!==l?(c=T.jsx(n,{className:i,children:l}),t[7]=n,t[8]=i,t[9]=l,t[10]=c):c=t[10],c}function lre(e,t){return T.jsxs("div",{children:[t>0&&T.jsx("div",{className:"h-px bg-border mx-5"}),e]},t)}function Qge(e){const t=Ne.c(27),{icon:o,title:a,description:n,action:i,onClick:l,className:c,children:u}=e,m=u?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",h=l&&"hover:bg-muted/50 cursor-pointer";let p;t[0]!==c||t[1]!==m||t[2]!==h?(p=Dt(m,h,c),t[0]=c,t[1]=m,t[2]=h,t[3]=p):p=t[3];const f=l?"button":void 0,v=l?0:void 0;let b;t[4]!==l?(b=l?E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),l())}:void 0,t[4]=l,t[5]=b):b=t[5];let S;t[6]!==o?(S=o&&T.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:o}),t[6]=o,t[7]=S):S=t[7];let C;t[8]!==a?(C=T.jsx("div",{className:"text-sm font-medium",children:a}),t[8]=a,t[9]=C):C=t[9];let w;t[10]!==n?(w=n&&T.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:n}),t[10]=n,t[11]=w):w=t[11];let _;t[12]!==u||t[13]!==C||t[14]!==w?(_=T.jsxs("div",{className:"flex-1 min-w-0",children:[C,w,u]}),t[12]=u,t[13]=C,t[14]=w,t[15]=_):_=t[15];let k;t[16]!==i?(k=i&&T.jsx("div",{className:"shrink-0",onClick:cre,children:i}),t[16]=i,t[17]=k):k=t[17];let x;return t[18]!==l||t[19]!==_||t[20]!==k||t[21]!==p||t[22]!==f||t[23]!==v||t[24]!==b||t[25]!==S?(x=T.jsxs("div",{className:p,onClick:l,role:f,tabIndex:v,onKeyDown:b,children:[S,_,k]}),t[18]=l,t[19]=_,t[20]=k,t[21]=p,t[22]=f,t[23]=v,t[24]=b,t[25]=S,t[26]=x):x=t[26],x}function cre(e){return e.stopPropagation()}function Jge(e){const t=Ne.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Dt("px-4 py-4",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}function Xge(e){const t=Ne.c(5),{children:o,className:a}=e;let n;t[0]!==a?(n=Dt("flex items-center justify-end gap-2 px-4 py-4",a),t[0]=a,t[1]=n):n=t[1];let i;return t[2]!==o||t[3]!==n?(i=T.jsx("div",{className:n,children:o}),t[2]=o,t[3]=n,t[4]=i):i=t[4],i}function dre(e){const t=Ne.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Dt("flex flex-col gap-10",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}const Iv={connect:{key:"connect",titleKey:"settings.connectClients.pageTitle",tabs:[],ownedRoutes:["/$org/settings/api-keys"]},members:{key:"members",titleKey:"orgs.members.title",tabs:[{key:"members",labelKey:"orgs.members.title",to:"/$org/settings/members",requires:"members:manage"},{key:"roles",labelKey:"settings.roles.pageTitle",to:"/$org/settings/roles",privilegedOnly:!0}]},billing:{key:"billing",titleKey:"settings.nav.billing",tabs:[{key:"ai-providers",labelKey:"settings.nav.aiProviders",to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"infra",labelKey:"settings.subnav.infrastructure",to:"/$org/settings/infra-billing",requires:"members:manage",requiresOwnedSites:!0}]},repositories:{key:"repositories",titleKey:"settings.nav.repositories",tabs:[],ownedRoutes:["/$org/settings/repositories"]},storage:{key:"storage",titleKey:"settings.nav.storage",tabs:[{key:"buckets",labelKey:"settings.nav.buckets",to:"/$org/settings/buckets",requires:"file-configs:manage"},{key:"synced-repos",labelKey:"settings.nav.syncedRepos",to:"/$org/settings/synced-repos",requires:"file-configs:manage"}]}};function efe(e){const t=Iv[e];return[...t.tabs.map(o=>o.to),...t.ownedRoutes??[]]}function tfe(e){return Iv[e].tabs.length>0}const ure=new Set(["owner","admin"]);function a3(){const e=Ne.c(11),{org:t,locator:o}=Nm();let a;e[0]!==o?(a=gr.myCapabilities(o),e[0]=o,e[1]=a):a=e[1];let n;e[2]!==t?(n=async()=>{const h=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(t.slug)}`,{credentials:"include"});if(!h.ok)throw new Error(`my-capabilities request failed: ${h.status}`);return await h.json()},e[2]=t,e[3]=n):n=e[3];let i;e[4]!==a||e[5]!==n?(i={queryKey:a,queryFn:n,staleTime:3e4,retry:2},e[4]=a,e[5]=n,e[6]=i):i=e[6];const{data:l,isLoading:c,isError:u}=Em(i);let m;return e[7]!==l||e[8]!==u||e[9]!==c?(m={data:l,loading:c,error:u},e[7]=l,e[8]=u,e[9]=c,e[10]=m):m=e[10],m}function ofe(e){const t=Ne.c(8),{data:o,loading:a,error:n}=a3();if(a){let m;return t[0]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!1,loading:!0,error:!1,reason:"loading"},t[0]=m):m=t[0],m}if(n){let m;return t[1]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!1,loading:!1,error:!0,reason:"error"},t[1]=m):m=t[1],m}const i=o?.role??null;if(!i){let m;return t[2]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!1,loading:!1,error:!1,reason:"denied"},t[2]=m):m=t[2],m}if(i==="owner"){let m;return t[3]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!0,loading:!1,error:!1,reason:"owner"},t[3]=m):m=t[3],m}if(i==="admin"){let m;return t[4]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!0,loading:!1,error:!1,reason:"admin"},t[4]=m):m=t[4],m}const l=o?.capabilities?.[e]===!0,c=l?"role":"denied";let u;return t[5]!==l||t[6]!==c?(u={granted:l,loading:!1,error:!1,reason:c},t[5]=l,t[6]=c,t[7]=u):u=t[7],u}function n3(){const e=Ne.c(10),{data:t,loading:o,error:a}=a3(),n=t?.role??void 0;let i;e[0]!==n?(i=n?ure.has(n):!1,e[0]=n,e[1]=i):i=e[1];const l=i;let c;e[2]!==t?.capabilities?(c=t?.capabilities??{},e[2]=t?.capabilities,e[3]=c):c=e[3];const u=c;let m;return e[4]!==a||e[5]!==l||e[6]!==o||e[7]!==n||e[8]!==u?(m={capabilities:u,loading:o,error:a,isPrivileged:l,roleSlug:n},e[4]=a,e[5]=l,e[6]=o,e[7]=n,e[8]=u,e[9]=m):m=e[9],m}class AO extends Error{constructor(t,o){super(t),this.status=o,this.name="StudioToolError"}status}async function mre(e,t,o){const a=await fetch(`/api/${encodeURIComponent(e)}/tools/${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o??{})});if(!a.ok){let n=`${t} failed (${a.status})`;try{const i=await a.json();i?.error&&(n=i.error)}catch{}throw new AO(n,a.status)}try{return await a.json()}catch{throw new AO(`${t} returned a non-JSON response`,a.status)}}function RC(){const e=Ne.c(5),{org:t}=Nm(),o=t.slug;let a;e[0]!==o?(a=(i,l)=>mre(o,i,l),e[0]=o,e[1]=a):a=e[1];let n;return e[2]!==o||e[3]!==a?(n={orgSlug:o,call:a},e[2]=o,e[3]=a,e[4]=n):n=e[4],n}function pre(){const e=Ne.c(13),{org:t}=Nm(),o=RC(),{capabilities:a,isPrivileged:n}=n3(),i=n||!!a["members:manage"];let l;e[0]!==t.id?(l=gr.infraBillingSites(t.id),e[0]=t.id,e[1]=l):l=e[1];const c=!!t.id&&i;let u;e[2]!==o?(u=()=>o.call("INFRA_BILLING_SITES_LIST",{}),e[2]=o,e[3]=u):u=e[3];let m;e[4]!==l||e[5]!==c||e[6]!==u?(m={queryKey:l,staleTime:3e5,enabled:c,queryFn:u},e[4]=l,e[5]=c,e[6]=u,e[7]=m):m=e[7];const{data:h,isLoading:p}=Em(m);let f;e[8]!==h?.sites?(f=h?.sites.map(hre)??[],e[8]=h?.sites,e[9]=f):f=e[9];let v;return e[10]!==p||e[11]!==f?(v={sites:f,isLoading:p},e[10]=p,e[11]=f,e[12]=v):v=e[12],v}function hre(e){return e.slug}function afe(){const e=Ne.c(7),t=RC(),o=Rs();let a;e[0]!==t?(a=l=>t.call("INFRA_BILLING_PORTAL",{siteSlugs:l}),e[0]=t,e[1]=a):a=e[1];let n;e[2]!==o?(n=l=>Si.error(o("settings.infraBilling.portalError",{message:l.message})),e[2]=o,e[3]=n):n=e[3];let i;return e[4]!==a||e[5]!==n?(i={mutationFn:a,onSuccess:gre,onError:n},e[4]=a,e[5]=n,e[6]=i):i=e[6],Ku(i)}function gre(e){const{url:t}=e;return window.open(t,"_blank","noopener,noreferrer")}function nfe(e,t){const o=Ne.c(14),{org:a}=Nm(),n=RC();let i,l,c;o[0]!==a.id||o[1]!==t||o[2]!==e?(i=[...e].sort(),c=Em,l=gr.infraBilling(a.id,i.join(","),t),o[0]=a.id,o[1]=t,o[2]=e,o[3]=i,o[4]=l,o[5]=c):(i=o[3],l=o[4],c=o[5]);const u=i.length>0;let m;o[6]!==t||o[7]!==i||o[8]!==n?(m=()=>n.call("INFRA_BILLING_GET",{siteSlugs:i,period:t}),o[6]=t,o[7]=i,o[8]=n,o[9]=m):m=o[9];let h;return o[10]!==l||o[11]!==u||o[12]!==m?(h={queryKey:l,enabled:u,staleTime:6e4,queryFn:m},o[10]=l,o[11]=u,o[12]=m,o[13]=h):h=o[13],c(h)}function fre(){const e=Ne.c(7),{capabilities:t,isPrivileged:o,loading:a,error:n}=n3(),{sites:i,isLoading:l}=pre(),c=i.length>0;let u;if(e[0]!==t||e[1]!==n||e[2]!==o||e[3]!==a||e[4]!==c||e[5]!==l){const m=h=>h.requiresOwnedSites&&!c&&!l?!1:a||n?!0:h.privilegedOnly?o:h.requires?o||t[h.requires]:!0;u=Object.fromEntries(Object.values(Iv).map(h=>[h.key,h.tabs.filter(m)])),e[0]=t,e[1]=n,e[2]=o,e[3]=a,e[4]=c,e[5]=l,e[6]=u}else u=e[6];return u}function vre(e){const t=Ne.c(16),{group:o}=e,a=Rs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},t[0]=n):n=t[0];const{org:i}=xm(n);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:bre},t[1]=l):l=t[1];const c=XU(l),u=fre()[o],{titleKey:m}=Iv[o];let h;t[2]!==a||t[3]!==m?(h=a(m),t[2]=a,t[3]=m,t[4]=h):h=t[4];let p;t[5]!==h?(p=T.jsx(Ug.Title,{children:h}),t[5]=h,t[6]=p):p=t[6];let f;t[7]!==o||t[8]!==i||t[9]!==c||t[10]!==a||t[11]!==u?(f=u.length>1&&T.jsx("nav",{"data-slot":"settings-subnav","aria-label":a("settings.subnav.ariaLabel"),className:"bg-muted inline-flex h-10 w-fit items-center rounded-xl p-[3px] gap-0.5",children:u.map(b=>{const S=b.to.replace("$org",i),C=c===S||c.startsWith(`${S}/`);return T.jsx(hd,{to:b.to,params:{org:i},onClick:()=>XB("settings_subnav_clicked",{group_key:o,tab_key:b.key}),className:Dt("inline-flex h-full items-center justify-center rounded-lg border border-transparent px-3 text-sm font-medium whitespace-nowrap transition-[color,box-shadow]",C?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a(b.labelKey)},b.key)})}),t[7]=o,t[8]=i,t[9]=c,t[10]=a,t[11]=u,t[12]=f):f=t[12];let v;return t[13]!==p||t[14]!==f?(v=T.jsxs("div",{"data-slot":"settings-heading",className:"flex flex-col gap-4",children:[p,f]}),t[13]=p,t[14]=f,t[15]=v):v=t[15],v}function bre(e){return e.location.pathname}function r3(){const e=Ne.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=T.jsxs("div",{"data-testid":"settings-content-loading",className:"flex flex-col gap-4",children:[T.jsx(QA,{className:"h-32 w-full"}),T.jsx(QA,{className:"h-32 w-full"})]}),e[0]=t):t=e[0],t}function yre(e){const t=Ne.c(14),{group:o,fallback:a,errorFallback:n,className:i,children:l}=e;let c;t[0]!==o?(c=T.jsx(vre,{group:o}),t[0]=o,t[1]=c):c=t[1];let u;t[2]!==a?(u=a??T.jsx(r3,{}),t[2]=a,t[3]=u):u=t[3];let m;t[4]!==l||t[5]!==u?(m=T.jsx(R.Suspense,{fallback:u,children:l}),t[4]=l,t[5]=u,t[6]=m):m=t[6];let h;t[7]!==n||t[8]!==m?(h=T.jsx(nre,{fallback:n,children:m}),t[7]=n,t[8]=m,t[9]=h):h=t[9];let p;return t[10]!==i||t[11]!==c||t[12]!==h?(p=T.jsx(Ug,{children:T.jsx(Ug.Content,{children:T.jsx(Ug.Body,{children:T.jsxs(dre,{className:i,children:[c,h]})})})}),t[10]=i,t[11]=c,t[12]=h,t[13]=p):p=t[13],p}function Ei(e){return function(){return T.jsx(yre,{group:e,children:T.jsx(r3,{})})}}function i3(e){try{localStorage.setItem(Cl.lastLocation(),JSON.stringify(e))}catch{}}function Sre(){try{const e=localStorage.getItem(Cl.lastLocation());if(!e)return null;const t=JSON.parse(e);if(typeof t?.org=="string")return{org:t.org,taskId:typeof t.taskId=="string"?t.taskId:void 0,virtualmcpid:typeof t.virtualmcpid=="string"?t.virtualmcpid:void 0}}catch{}return null}function rfe(){try{localStorage.removeItem(Cl.lastLocation())}catch{}}function s3(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function l3(e,t){return`app:${e}:${t}`}function Tre(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),o=t.indexOf(":");if(o<=0)return null;const a=t.slice(0,o),n=t.slice(o+1);return!a||!n?null:{connectionId:a,toolName:n}}function wre(e){return`deck:${encodeURIComponent(e)}`}function _re(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function Cre(e){return`file:${encodeURIComponent(e)}`}function Pre(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function xre(e){return`library-file:${encodeURIComponent(e)}`}function Ere(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function kre(e){return`code:${encodeURIComponent(e)}`}function Rre(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const c3=["overview","settings","automations","site-editor","code","content","assets","hosting","e2e","analytics","cdn","git"],Are=new Set(c3),Dre=new Set(["hosting","e2e","analytics","cdn"]),Ore=new Set(["board","files","connect-sources","reports","discover"]);function ife(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const Mre=new Map([["preview","site-editor"]]);function Lv(e){return Mre.get(e)??e}const AC=new Set(["instructions","connections","layout","settings"]);function Ire(e){return!!e&&AC.has(e)}const Lre=new Set(["overview","board","reports"]);function sfe(e){const t=e?.defaultMainView??null;if(!(!t||t.type==="chat"))return d3(e??null)}function d3(e){const t=e?.defaultMainView??null;if(!t)return"settings";const o=Lv(t.type);if(AC.has(o))return"settings";if(Are.has(o)||Lre.has(o))return o;if(o==="ext-app"||o==="ext-apps"){if(t.id&&t.toolName)return l3(t.id,t.toolName);const a=e?.tabs?.map(n=>n.id)??[];return t.id&&a.includes(t.id)?t.id:a[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function lfe(e){const t=e.routeDefaultMain||d3(e.metadata),o=e.panelTabId&&AC.has(e.panelTabId)?"settings":e.panelTabId?Lv(e.panelTabId):e.panelTabId,a=e.metadata?.defaultMainView??null,n=a==null||a.type==="chat";return{mainOpen:e.mainPanelParam??(!!o||!!e.routeDefaultMain||!n),activeTab:o??t}}function cfe(e){return e.mainOpen&&e.clickedId===e.activeTab?{close:!0}:{tabId:e.clickedId}}function dfe(e){return e.mainOpen?e.activeTab==="automations"?!0:s3(e.activeTab)!==null:!1}function ufe(e){return e.mainOpen&&e.activeTab==="automations"?{close:!0}:{tabId:"automations"}}const Nre=["file","key","deck","path","connection","tool","automation","main","section"],ym="content";function Fre(){const e={};for(const t of Nre)e[t]=void 0;return e}const Bre=new Set([...c3.filter(e=>!Dre.has(e)),...Ore,"app","file","deck","library-file","connect-sources","instructions","connections","layout","preview"]),jre=["board","files","reports","overview","discover"],zre=new Set(jre);function Ure(e){return zre.has(e)}function qre(e){return!!e&&Bre.has(e)}function $re(e){const t=Fre(),o=Tre(e);if(o)return{panel:"app",payload:{...t,connection:o.connectionId,tool:o.toolName}};const a=s3(e);if(a)return{panel:"automations",payload:{...t,automation:a.id}};const n=Pre(e);if(n)return{panel:"file",payload:{...t,key:n.key}};const i=_re(e);if(i)return{panel:"deck",payload:{...t,deck:i.path}};const l=Ere(e);if(l)return{panel:"library-file",payload:{...t,path:l.path}};const c=Rre(e);return c?{panel:"code",payload:{...t,file:c.path??void 0}}:Ire(e)?{panel:"settings",payload:t}:e===ym?{panel:"site-editor",payload:{...t,main:ym}}:{panel:Lv(e),payload:t}}function mfe(e,t){if(e)switch(e){case"app":return t.connection&&t.tool?l3(t.connection,t.tool):void 0;case"automations":return t.automation?`automation:${t.automation}`:"automations";case"file":return t.key?Cre(t.key):void 0;case"deck":return t.deck?wre(t.deck):void 0;case"library-file":return t.path?xre(t.path):void 0;case"code":return t.file?kre(t.file):"code";default:{const o=Lv(e);return o==="site-editor"&&t.main===ym?ym:o}}}const Vre={board:"/$org/tasks/{-$taskKey}",files:"/$org/library",reports:"/$org/reports",overview:"/$org/home",discover:"/$org/discover"};function Hre(e,t){if(e===void 0||e===ym&&t==="site-editor")return null;const o={main:void 0};if(e===0||e==="0")return{to:null,panel:void 0,search:{...o,mainpanel:!1}};const{panel:a,payload:n}=$re(e);return a&&Ure(a)?{to:Vre[a],panel:void 0,search:{...o,...n}}:{to:"/$org/agents/{-$panel}",panel:a,search:{...o,...n}}}function pfe(e){const{org:t,taskId:o}=e,{virtualmcpid:a,main:n,...i}=e.search??{},l=Hre(n);if(l&&l.to&&l.to!=="/$org/agents/{-$panel}")return{to:l.to,params:{org:t,project:void 0,panel:void 0},search:{...i,...l.search,virtualmcpid:void 0,thread:o}};const c=a?.trim()?a:void 0;return{to:"/$org/agents/{-$panel}",params:{org:t,project:c,panel:l?.panel},search:{...i,...l?.search??{},thread:o}}}function Gre(e,t){if(t.task===void 0)return null;const{task:o,...a}=t;return{taskKey:e??(o.trim()||void 0),search:a}}const u3={contentPageId:V().optional(),contentPath:V().optional(),contentPathTemplate:V().optional(),contentCollection:V().optional(),contentItem:V().optional()},Pn=BU({component:()=>T.jsx(ire,{children:T.jsx(sI,{})})}),Kre=Qe({getParentRoute:()=>Pn,path:"/login",component:lt(()=>st(()=>import("./login-DDebIxrX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),validateSearch:Nr(()=>Pe({next:V().optional(),client_id:V().optional(),redirect_uri:V().optional(),response_type:V().optional(),state:V().optional(),scope:V().optional(),code_challenge:V().optional(),code_challenge_method:V().optional(),src:V().optional(),ref:V().optional()}))}),Wre=Qe({getParentRoute:()=>Pn,path:"/cli/auth-success",component:lt(()=>st(()=>import("./cli-auth-success-Cg3eF5XS.js"),__vite__mapDeps([8,7])))}),Yre=Qe({getParentRoute:()=>Pn,path:"/reset-password",component:lt(()=>st(()=>import("./reset-password-Bg8z4YMN.js"),__vite__mapDeps([9,2]))),validateSearch:Nr(()=>Pe({token:V().optional(),error:V().optional()}))}),Zre=Qe({getParentRoute:()=>Pn,path:"/auth/$pathname",component:lt(()=>st(()=>import("./auth-catchall-pX7F8bIm.js"),[]))}),Qre=Qe({getParentRoute:()=>Pn,path:"/oauth/callback",component:lt(()=>st(()=>import("./oauth-callback-Bn4cTIrc.js"),__vite__mapDeps([10,11,12])))}),Jre=Qe({getParentRoute:()=>Pn,path:"/oauth/callback/ai-provider",component:lt(()=>st(()=>import("./oauth-callback-ai-provider-DbNTXYrS.js"),[]))}),Um=Qe({getParentRoute:()=>Pn,path:"/_admin",component:lt(()=>st(()=>import("./layout-DtrhlaJL.js"),__vite__mapDeps([13,14,15])))}),Xre=Qe({getParentRoute:()=>Um,path:"/",beforeLoad:()=>{throw qa({to:"/_admin/users"})}}),eie=Qe({getParentRoute:()=>Um,path:"/users",component:lt(()=>st(()=>import("./users-BaA8uQ6H.js"),__vite__mapDeps([16,17,18,19,20,21,22,23,24,25,26,27,28,29,30])))}),tie=Qe({getParentRoute:()=>Um,path:"/orgs",component:lt(()=>st(()=>import("./orgs-BQeEuasg.js"),__vite__mapDeps([31,17,18,19,20,21,22,2,32,26,33,34,35,36,37,38,25,39,40,27,28,29])))}),oie=Qe({getParentRoute:()=>Um,path:"/prompts",component:lt(()=>st(()=>import("./prompts-rYzLA5AP.js"),__vite__mapDeps([41,20,2,32,38,27])))}),aie=Um.addChildren([Xre,eie,tie,oie]),DC=Qe({getParentRoute:()=>Pn,id:"shell",component:lt(()=>st(()=>import("./shell-layout-BMfOJ_z2.js").then(e=>e.s),__vite__mapDeps([42,23,24,43,44,45,46,47,19,48,49,50,51,52,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,22,78,79,80,81,82,83,84,85,33,86,87,12,88,89,90,91,92,93,94,95,96,97,6,5,98,99,39,3,14,100,101,102,103,104])))}),nie=Qe({getParentRoute:()=>DC,path:"/",beforeLoad:async()=>{const e=Sre();if(e)throw qa({to:"/$org",params:{org:e.org}});const t=localStorage.getItem(Cl.lastOrgSlug());if(t)throw qa({to:"/$org",params:{org:t}});const{data:o}=await RL();if(!o)return;const a=o[0];throw qa(a?{to:"/$org",params:{org:a.slug}}:{to:"/onboarding"})}}),rie=Qe({getParentRoute:()=>Pn,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await RL();if(e&&e.length>0)throw qa({to:"/"})},component:lt(()=>st(()=>import("./onboarding-BAs2eTQe.js"),__vite__mapDeps([105,14,7,106,23,24,77,2,32,37,43,53,75,81])))}),iie=Qe({getParentRoute:()=>Pn,path:"/commerce-onboarding",component:lt(()=>st(()=>import("./commerce-onboarding-eLPK7gBv.js"),__vite__mapDeps([107,108,87,12,96,49,45,46,47,19,48,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,33,109,110,111,112,113,32,2,26,114,11,115,1,3,4,5,6,7,106,23,116,117,118,119]))),validateSearch:Nr(()=>Pe({org:V().optional(),siteUrl:V().optional()}))}),sie=Qe({getParentRoute:()=>Pn,path:"/choose-editor",component:lt(()=>st(()=>import("./choose-editor-ChREMMjn.js"),__vite__mapDeps([120,86,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,14]))),validateSearch:Nr(()=>Pe({site:V().optional(),domain:V().optional(),pageId:V().optional(),path:V().optional(),pathTemplate:V().optional()}))}),lie=Qe({getParentRoute:()=>Pn,path:"/report/$domain",component:lt(()=>st(()=>import("./reports-CtRVjjRq.js"),__vite__mapDeps([121,1,2,3,4,5,6,115,46,19,50,51,53,62,70,74,44,78,79,83,84,122]))),validateSearch:Nr(()=>Pe({key:V().optional()}))}),Nv=Qe({getParentRoute:()=>DC,path:"/$org",beforeLoad:({params:e})=>{i3({org:e.org})},component:lt(()=>st(()=>import("./org-layout-DC9Z5oBD.js"),__vite__mapDeps([123,103,124,86,89,87,12,90,91,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,85,33,125,126,94,95,127,128,116,117,113,32,2,88,129,23,15,3,130,34,38,131,132,133,134,109,110,111,135,136,137,101,39,99,138,139,4,5,6,140,141,96,142,114,11,143,25,144,145,146,147,40,98,148,118,149,30,150,28,29,151,97,152,93,92])))}),Fv=Qe({getParentRoute:()=>Nv,id:"org-shell",pendingComponent:bd,component:lt(()=>st(()=>import("./index-Dd7F2bh8.js"),__vite__mapDeps([153,108,87,12,96,49,45,46,47,19,48,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,33,109,110,111,112,113,32,2,26,114,11,115,154,86,101,39,99,124,89,90,91,85,125,126,94,95,127,128,116,117,88,129,23,15,3,130,34,38,131,132,133,134,135,136,137,138,139,4,5,6,140,141,142,143,25,144,145,146,147,40,98,148,118,149,30,150,28,29,151,97,152,93,92,155,100,156,157,158])))}),cie=Pe({sidepanel:QL,mainpanel:IJ,main:io([V(),Ye(0)]).optional(),thread:V().optional(),virtualmcpid:V().optional()}),ki=Qe({getParentRoute:()=>Fv,id:"agent-shell",validateSearch:cie,search:{middlewares:[cU(["sidepanel","virtualmcpid"])]},pendingComponent:bd,component:lt(()=>st(()=>import("./index-CJo6t9Oa.js").then(e=>e.bI),__vite__mapDeps([159,19,155,93,86,100,152,141,97,87,12,6,5,98,99,39,3,90,146,156,148,85,33,35,58,60,101,160,45,46,47,48,49,50,51,52,43,53,36,54,55,56,57,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,138,139,137,18,20,144,161,131,162,145,23,28,29,163,164,165,166,167,168,42,88,89,91,92,94,95,96,14,102,103,104,151,169,113,32,2,170,127,134,34,171,172,133,109,110,111,135,136,4,140,38,142,114,11,143,25,147,40,118,128,149,30,173,174,175,176,177,178,157,179,180,181,117,182,150,21,183,37,184,185,186,26,187,188,154,108,112,115,189,126,190,191,119,192,193])))}),die=Pe({virtualmcpid:V().optional(),preview:V().optional(),task:V().optional(),autosend:V().optional(),connect:Rm().optional(),siteUrl:V().optional(),...u3,view:V().optional(),q:V().optional(),assignee:V().optional(),priority:V().optional(),due:V().optional(),tags:V().optional(),repo:V().optional()}),uie=Qe({getParentRoute:()=>ki,path:"/$taskId",validateSearch:die,beforeLoad:({params:e,search:t})=>{i3({org:e.org,taskId:e.taskId,virtualmcpid:t.virtualmcpid})},component:()=>null}),mie=Qe({getParentRoute:()=>ki,path:"/home",staticData:{defaultMain:"overview"},validateSearch:Pe({connect:Rm().optional(),siteUrl:V().optional()}),component:()=>null}),pie=Qe({getParentRoute:()=>ki,path:"/agents/{-$panel}",beforeLoad:({params:e,search:t})=>{const o=e.panel;if(!(!o||qre(o))&&!t.virtualmcpid)throw qa({to:"/$org/agents/{-$panel}",params:{org:e.org,panel:void 0},search:a=>({...a,virtualmcpid:o}),hash:!0,replace:!0})},validateSearch:Pe({file:V().optional(),key:V().optional(),deck:V().optional(),path:V().optional(),connection:V().optional(),tool:V().optional(),automation:V().optional(),section:V().optional(),preview:V().optional(),autosend:V().optional(),connect:Rm().optional(),siteUrl:V().optional(),...u3}),component:()=>null}),hie=Qe({getParentRoute:()=>ki,path:"/agents/$project/$panel",beforeLoad:({params:e})=>{throw qa({to:"/$org/agents/{-$panel}",params:{org:e.org,panel:e.panel},search:t=>({...t,virtualmcpid:e.project}),hash:!0,replace:!0})}}),gie=Qe({getParentRoute:()=>ki,path:"/tasks/{-$taskKey}",staticData:{defaultMain:"board"},validateSearch:Pe({task:V().optional(),view:V().optional(),q:V().optional(),assignee:V().optional(),priority:V().optional(),due:V().optional(),tags:V().optional(),repo:V().optional()}),beforeLoad:({params:e,search:t})=>{const o=Gre(e.taskKey,t);if(o)throw qa({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:o.taskKey},search:o.search,replace:!0})},component:()=>null}),fie=Qe({getParentRoute:()=>ki,path:"/reports",staticData:{defaultMain:"reports"},validateSearch:Pe({connect:Rm().optional(),siteUrl:V().optional()}),component:()=>null}),vie=Qe({getParentRoute:()=>ki,path:"/library",staticData:{defaultMain:"files"},validateSearch:Pe({path:V().optional(),preview:V().optional(),skill:V().optional(),brand:V().optional()}),component:()=>null}),bie=Qe({getParentRoute:()=>ki,path:"/discover",staticData:{defaultMain:"discover"},component:()=>null}),yie=Qe({getParentRoute:()=>Nv,path:"/members",beforeLoad:({params:e})=>{throw qa({to:"/$org/settings/members",params:{org:e.org}})}}),Sie=Pe({main:V().optional(),connect:Rm().optional(),siteUrl:V().optional(),task:V().optional(),sidepanel:QL}),Tie=Qe({getParentRoute:()=>Fv,path:"/",validateSearch:Sie,pendingComponent:bd,component:lt(()=>st(()=>import("./index-CZxSjm4V.js"),__vite__mapDeps([194,86])))}),wie=Qe({getParentRoute:()=>Fv,path:"/t/$taskKey",beforeLoad:({params:e})=>{throw qa({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:e.taskKey},replace:!0})}}),Xt=Qe({getParentRoute:()=>Nv,path:"/settings",pendingComponent:bd,component:lt(()=>st(()=>import("./settings-layout---Yi_SOe.js"),__vite__mapDeps([195,125,36,54,51,126,35,55,77,94,95,33,22,127,128,45,46,47,19,48,49,50,52,43,53,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,78,79,80,81,24,82,83,84,89,87,12,90,91,116,117,113,32,2,86,88,129,157,158,178,177,148,98,99,39,5])))}),_ie=Qe({getParentRoute:()=>Xt,path:"/",component:lt(()=>st(()=>import("./index-redirect-CwTub-SD.js"),__vite__mapDeps([196,197])))}),Cie=Qe({getParentRoute:()=>Xt,path:"/connections",component:lt(()=>st(()=>import("./connections-KoDf0dYU.js"),__vite__mapDeps([198,109,110,87,12,111,199,118,35,54,56,19,66,200,25,21,22,143,135,136,137,101,39,99,138,139,4,5,6,140,141,96,49,45,46,47,48,50,51,52,43,53,36,55,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,44,78,79,80,81,24,82,83,84,20,201,117,144,202,33,127,113,32,2,34,38,90,168,142,114,11,174]))),validateSearch:Nr(()=>Pe({action:ba(["create"]).optional(),tab:ba(["all","connected"]).optional()}))}),Pie=Qe({getParentRoute:()=>Xt,path:"/connections/$appSlug",component:lt(()=>st(()=>import("./connection-detail-Dt6eCAYi.js"),__vite__mapDeps([203,109,110,87,12,111,20,142,2,77,80,204,179,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,22,78,79,81,24,82,83,84,137,136,101,39,99,34,205,206,207,95,128,90,208,151,86,97,6,5,98,152,141,91,183,25,168,11,161,131,23,169,96,113,32,201,117,209,210,211,212,213,171,140,167,134,118]))),validateSearch:Nr(()=>Pe({tab:V().optional()}))}),xie=Qe({getParentRoute:()=>Xt,path:"/connections/$appSlug/$collectionName/$itemId",component:lt(()=>st(()=>import("./collection-detail-BQWmua4U.js"),__vite__mapDeps([214,20,87,12,113,32,2,38,204,179,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,137,109,110,111,136,101,39,99,34,205,206,207,95,128,90,208,151,86,97,6,5,98,152,141,91,167,168,215,184,140,183,25,11,165,166,96,155,93,100,3,146,156,148,85,33,42,23,88,89,92,94,14,102,103,104,216]))),validateSearch:Nr(()=>Pe({replayId:V().optional()}))}),Eie=Qe({getParentRoute:()=>Xt,path:"/monitor",component:lt(()=>st(()=>import("./index-Dwkla_4C.js"),__vite__mapDeps([217,21,22,20,218,219,197,160,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,78,79,80,81,24,82,83,84,138,139,137,87,12,90,18,144,161,131,162,145,23,28,29,163,164,33,93,86,97,6,5,98,99,39,155,100,152,141,3,146,156,148,85,101,165,166,167,168,42,88,89,91,92,94,95,96,14,102,103,104,151,169,113,32,2,170,140,25,128,220,174,34,150,38,143,37,215,209,210,205,211,212,213]))),validateSearch:Nr(()=>Pe({tab:ba(["overview","audit","dashboards","threads","automations"]).default("overview"),from:V().default("now-30m"),to:V().default("now"),connectionId:Le(V()).optional().default([]),virtualMcpId:Le(V()).optional().default([]),tool:V().default(""),status:ba(["all","success","errors"]).default("all"),search:V().default(""),page:Mt().optional(),streaming:zt().default(!0),propertyFilters:V().default(""),hideSystem:zt().default(!1)}))}),kie=Qe({getParentRoute:()=>Xt,path:"/general",component:lt(()=>st(()=>import("./general-BJm00vUX.js"),__vite__mapDeps([221,131,182,23,24,2,222,37,57,64,44,101,87,12,39,99,137,223,25,34,35,36,117,218,219,197])))}),Rie=Qe({getParentRoute:()=>Xt,path:"/connect",pendingComponent:Ei("connect"),component:lt(()=>st(()=>import("./connect-Dm7Ay1u3.js"),__vite__mapDeps([224,215,34,35,36,171,163,54,58,69,70,188,225,46,77,80,117,33,2,32,87,12,218,219,197])))}),Aie=Qe({getParentRoute:()=>Xt,path:"/ai-providers",pendingComponent:Ei("billing"),component:lt(()=>st(()=>import("./ai-providers-Br6X1lG8.js"),__vite__mapDeps([226,46,146,53,101,87,12,39,99,173,33,127,155,93,86,100,152,141,97,6,5,98,3,90,156,148,85,35,58,60,174,2,34,36,48,55,69,61,22,175,72,54,23,24,62,47,68,79,182,172,117,77,80,181,29,218,219,197])))}),Die=Qe({getParentRoute:()=>Xt,path:"/billing",beforeLoad:({params:e})=>{throw qa({to:"/$org/settings/ai-providers",params:{org:e.org}})}}),Oie=Qe({getParentRoute:()=>Xt,path:"/infra-billing",pendingComponent:Ei("billing"),component:lt(()=>st(()=>import("./infra-billing-D-nEGPZD.js"),__vite__mapDeps([227,59,71,25,220,174,35,36,94,95,33,22,128,34,18,211,205,213,218,219,197])))}),Mie=Qe({getParentRoute:()=>Xt,path:"/secrets",component:lt(()=>st(()=>import("./secrets-CNuI8mQc.js"),__vite__mapDeps([228,46,77,24,82,33,2,32,34,35,36,38,187,218,219,197])))}),Iie=Qe({getParentRoute:()=>Xt,path:"/api-keys",pendingComponent:Ei("connect"),component:lt(()=>st(()=>import("./api-keys-KwxqFNTz.js"),__vite__mapDeps([229,225,46,58,69,77,80,117,33,2,32,87,12,218,219,197])))}),Lie=Qe({getParentRoute:()=>Xt,path:"/buckets",pendingComponent:Ei("storage"),component:lt(()=>st(()=>import("./buckets-C5S-cCDS.js"),__vite__mapDeps([230,46,67,77,80,117,33,2,32,34,35,36,37,38,147,218,219,197])))}),Nie=Qe({getParentRoute:()=>Xt,path:"/repositories",validateSearch:Pe({git_error:V().optional().catch(void 0),git_flow:V().uuid().optional().catch(void 0),git_return:zt().optional().catch(void 0)}),pendingComponent:Ei("repositories"),component:lt(()=>st(()=>import("./repositories-KlgC1WKl.js"),__vite__mapDeps([231,186,54,33,2,32,149,138,139,48,64,23,24,134,22,26,50,71,174,35,77,117,25,215,218,219,197])))}),Fie=Qe({getParentRoute:()=>Xt,path:"/synced-repos",pendingComponent:Ei("storage"),component:lt(()=>st(()=>import("./synced-repos-BnswYvFZ.js"),__vite__mapDeps([232,64,77,117,33,2,186,54,32,149,138,139,48,23,24,134,22,26,192,176,62,56,60,63,65,69,75,80,84,118,35,170,218,219,197])))}),Bie=Qe({getParentRoute:()=>Xt,path:"/task-board",component:lt(()=>st(()=>import("./tasks-Co018oQ_.js"),__vite__mapDeps([233,2,35,55,76,77,80,94,95,33,22,128,37,38,117,222,57,64,44,101,87,12,39,99,137,218,219,197])))}),jie=Qe({getParentRoute:()=>Xt,path:"/tasks",beforeLoad:({params:e})=>{throw qa({to:"/$org/settings/task-board",params:{org:e.org}})}}),zie=Qe({getParentRoute:()=>Xt,path:"/members",pendingComponent:Ei("members"),component:lt(()=>st(()=>import("./members-Ewp6dFBp.js"),__vite__mapDeps([234,199,118,35,54,56,19,66,200,25,21,22,17,18,20,130,33,113,32,34,36,38,131,132,129,23,24,28,29,30,161,235,117,69,78,80,174,94,95,128,77,189,218,219,197])))}),Uie=Qe({getParentRoute:()=>Xt,path:"/roles",pendingComponent:Ei("members"),component:lt(()=>st(()=>import("./roles-BYrpVwlA.js"),__vite__mapDeps([236,132,131,235,25,117,118,35,54,56,77,80,17,18,19,20,21,22,175,96,49,45,46,47,48,50,51,52,43,53,36,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,78,79,81,24,82,83,84,144,174,145,139,87,12,134,111,161,30,137,90,146,23,37,89,91,219,197]))),validateSearch:Nr(()=>Pe({role:V().optional()}))}),qie=Qe({getParentRoute:()=>Xt,path:"/sso",component:lt(()=>st(()=>import("./sso-CQtwbTcC.js"),__vite__mapDeps([237,223,25,2,34,35,36,117,37,102,80,218,219,197])))}),$ie=Qe({getParentRoute:()=>Xt,path:"/profile",component:lt(()=>st(()=>import("./profile-B09IwER_.js"),__vite__mapDeps([238,23,24,33,207,34,35,36,80,81,37,172,2,72,73,76,182,177])))}),Vie=Qe({getParentRoute:()=>Xt,path:"/store",component:lt(()=>st(()=>import("./store-KyClNptr.js"),__vite__mapDeps([239,46,54,77,80,2,37,23,24,128,137,87,12,136,101,39,99,218,219,197])))}),Hie=Qe({getParentRoute:()=>Xt,path:"/registry",component:lt(()=>st(()=>import("./registry-7W5qAL96.js"),__vite__mapDeps([240,218,219,197])))}),Gie=Qe({getParentRoute:()=>Xt,path:"/store/registry",component:lt(()=>st(()=>import("./store-registry-DkOfFcHr.js"),__vite__mapDeps([241,218,219,197])))}),Kie=Qe({getParentRoute:()=>Xt,path:"/agents",component:lt(()=>st(()=>import("./agents-list-BHfAkhe8.js"),__vite__mapDeps([242,118,35,54,56,64,43,90,87,12,61,80,45,46,47,19,48,49,50,51,52,53,36,55,57,58,59,60,62,63,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,81,24,82,83,84,181,29,151,86,97,6,5,98,99,39,152,141,91,101,20,208,137,114,11,179,109,110,111,112,33,134,149,117,21,185,186,2,32,138,139,23,26])))}),Wie=Qe({getParentRoute:()=>Xt,path:"/automations",component:lt(()=>st(()=>import("./automations-D0grW8VA.js"),__vite__mapDeps([243,77,84,21,22,20,162,87,12,151,86,90,97,6,5,98,99,39,152,141,91,191,117,118,35,54,56,45,46,47,19,48,49,50,51,52,43,53,36,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,78,79,80,81,24,82,83,218,219,197])))}),Yie=Qe({getParentRoute:()=>Xt,path:"/skills",component:lt(()=>st(()=>import("./skills-BgYs55wx.js"),__vite__mapDeps([244,56,64,74,80,81,84,21,22,118,35,54,117,20,143,25,176,62,156,180,33,164,58,60,52,93,86,68,166,170])))}),Zie=Xt.addChildren([_ie,Cie,Pie,xie,Kie,Wie,Yie,Eie,kie,Rie,Aie,Die,Oie,Mie,Iie,Lie,Nie,Fie,Bie,jie,zie,Uie,qie,$ie,Vie,Gie,Hie]),Qie=ki.addChildren([uie,mie,pie,hie,gie,fie,vie,bie]),Jie=Fv.addChildren([Tie,wie,Qie]),Xie=Nv.addChildren([Jie,yie,Zie]),ese=DC.addChildren([nie,Xie]),tse=Pn.addChildren([ese,aie,rie,iie,sie,lie,Kre,Wre,Yre,Zre,Qre,Jre]);function ose(){const e=Ne.c(16),t=Rs();let o;e[0]!==t?(o=t("common.index.pageNotFound"),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==o?(a=T.jsx("h3",{className:"text-lg font-medium text-foreground",children:o}),e[2]=o,e[3]=a):a=e[3];let n;e[4]!==t?(n=t("common.index.pageNotFoundDescription"),e[4]=t,e[5]=n):n=e[5];let i;e[6]!==n?(i=T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:n}),e[6]=n,e[7]=i):i=e[7];let l;e[8]!==t?(l=t("common.index.goBack"),e[8]=t,e[9]=l):l=e[9];let c;e[10]!==l?(c=T.jsx("button",{type:"button",onClick:ase,className:"text-sm text-primary hover:underline",children:l}),e[10]=l,e[11]=c):c=e[11];let u;return e[12]!==a||e[13]!==i||e[14]!==c?(u=T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[a,i,c]})}),e[12]=a,e[13]=i,e[14]=c,e[15]=u):u=e[15],u}function ase(){return window.history.back()}const Bv=YU({routeTree:tse,defaultPendingComponent:bd,defaultPendingMs:200,defaultPendingMinMs:500,defaultNotFoundComponent:ose});function Ee(...e){return ZL(V_(e))}function nse(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Fo({error:e,localization:t,localizeErrors:o=!0}){var a;const n="Request failed";if(!o)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:n;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||n}function xl(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Fw(e,t){for(const o in e)if(e[o]===t)return o}function Sm(e,t){let o=V().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(o=o.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(o=o.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(o=o.regex(e.regex,{message:t?.INVALID_PASSWORD})),o}var rse={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},ise={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},sse={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},lse={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},cse={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},dse={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},use={...cse,...dse},mse={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},pse={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},hse={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},gse={INVALID_SESSION_TOKEN:"Invalid session token"},fse={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},vse={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},bse={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},yse={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},Sse={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},Tse={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},wse={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},_se={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...lse,...rse,...ise,...sse,...use,...mse,...pse,...hse,...gse,...fse,...vse,...bse,...yse,...Sse,...Tse,...wse},Cse={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},DO={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},OO={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};const m3=R.createContext({});function p3(){return R.useContext(m3)}var P0,MO;function Pse(){if(MO)return P0;MO=1;var e=function(){};return P0=e,P0}var xse=Pse();const Ese=Tl(xse);function kse({async:e,appendTo:t,defer:o,id:a,nonce:n,src:i}){const l=document.createElement("script");e!==void 0&&(l.async=e),o!==void 0&&(l.defer=o),a&&(l.id=a),n&&l.setAttribute("nonce",n),l.src=i,(t==="head"?document.head:document.body).appendChild(l)}var Rse=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]]);return o};let em=null,Tm=!1;const Uf=new Set,qf=new Set,Ase=typeof window<"u",Yc="___grecaptcha_cfg",h3=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function Dse(){if(!Ase)return;function e(o){if(Tm)o();else{window[Yc]||(window[Yc]={});const a=window[Yc];a.fns||(a.fns=[]),a.fns.push(o)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){Tm=!0;for(const o of qf)o();qf.clear()}window[h3]=t}function Ose({language:e,onLoadCallbackName:t,render:o,useEnterprise:a=!1,useRecaptchaNet:n=!1}){const i=n?"recaptcha.net":"google.com",l=a?"enterprise.js":"api.js",c=new URLSearchParams({render:o});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${i}/recaptcha/${l}?${c.toString()}`}function Mse({language:e,render:t,scriptProps:o,useEnterprise:a,useRecaptchaNet:n}){const i={id:"google-recaptcha-v3"},l=Ose({language:e,onLoadCallbackName:h3,render:t,useEnterprise:a,useRecaptchaNet:n});if(em){if(em!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}em=l,kse(Object.assign(Object.assign(Object.assign({},i),o),{src:l}))}function Ise(e){if(!window[Yc])return;const t=window[Yc];t.clients&&delete t.clients[e]}function Lse(e,t){var{onLoadCallback:o,onLoadCallbackName:a}=t,n=Rse(t,["onLoadCallback","onLoadCallbackName"]);if(Uf.size===0&&Dse(),Mse(n),Uf.add(e),o&&(Tm?o():qf.add(o)),a){let i=function(){if(!a)return;const l=window[a];typeof l=="function"&&l()};Tm?i():qf.add(i)}}function Nse(e){var t,o,a;Uf.delete(e),Uf.size===0&&(window.grecaptcha=void 0,window[Yc]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(o=document.querySelector(`script[src="${em}"]`))===null||o===void 0||o.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),em=null,Tm=!1)}let IO=!1;function Fse({container:e,children:t,language:o,reCaptchaKey:a,scriptProps:n,useEnterprise:i,useRecaptchaNet:l}){var c,u,m,h,p,f,v;const b=R.useId(),[S,C]=R.useState(null),[w,_]=R.useState(null),k=R.useRef(!1);R.useEffect(()=>{function D(){var O;const L=i?(O=window.grecaptcha)===null||O===void 0?void 0:O.enterprise:window.grecaptcha;if(!L)throw new Error("reCAPTCHA not found");if(!L.ready)throw new Error("reCAPTCHA ready callback not found");L.ready(()=>{C(L)})}return Lse(b,{language:o,onLoadCallback:D,onLoadCallbackName:n?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:n?.appendTo,async:n?.async,defer:n?.defer,id:n?.id,nonce:n?.nonce},useEnterprise:i,useRecaptchaNet:l}),()=>{Nse(b),C(null)}},[e?.element,b,o,a,n?.appendTo,n?.async,n?.defer,n?.id,n?.nonce,n?.onLoadCallbackName,i,l]),R.useEffect(()=>{var D,O,L;if(!e?.element||!S?.render)return;const U={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((D=e.parameters)===null||D===void 0?void 0:D.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},F=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!F)throw new Error("reCAPTCHA container element not found");const q=S.render(F,U);return!((O=e?.parameters)===null||O===void 0)&&O.hidden&&(IO||(Ese(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),IO=!0),(L=F.querySelector(".grecaptcha-badge"))===null||L===void 0||L.style.setProperty("display","none")),_(q),k.current=!0,()=>{_(null),k.current=!1,Ise(q),F.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.badge,(u=e?.parameters)===null||u===void 0?void 0:u.hidden,(m=e?.parameters)===null||m===void 0?void 0:m.callback,(h=e?.parameters)===null||h===void 0?void 0:h.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(f=e?.parameters)===null||f===void 0?void 0:f.tabindex,(v=e?.parameters)===null||v===void 0?void 0:v.theme,S,a]);const x=!!e?.element,E=x?w:a,A=R.useMemo(()=>E!==null&&S?.execute?D=>{if(E===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return x&&!k.current?(console.warn("Client ID not mounted"),null):S.execute(E,{action:D})}:void 0,[E,S,x]);return T.jsx(m3.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:S},children:t})}var Bse=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const o={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,o),this.notify(e)}setRefetching(e,t){const o=this.cache.get(e);o&&(o.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const o of t)this.notify(o)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const o=this.listeners.get(e);o&&(o.delete(t),o.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const o=Array.from(t);for(const a of o)a()}}},Bn=new Bse;function jse(){return()=>{}}function Ri(){return R.useSyncExternalStore(jse,()=>!0,()=>!1)}function g3(){const[e,t]=R.useState();return R.useEffect(()=>{const o=()=>{const n=document.documentElement.getAttribute("lang");t(n??void 0)};o();const a=new MutationObserver(n=>{for(const i of n)i.attributeName==="lang"&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function OC(){const[e,t]=R.useState("light");return R.useEffect(()=>{const o=()=>{var n;const i=document.documentElement.classList.contains("dark")||((n=document.documentElement.getAttribute("style"))==null?void 0:n.includes("color-scheme: dark"));t(i?"dark":"light")};o();const a=new MutationObserver(n=>{for(const i of n)(i.attributeName==="style"||i.attributeName==="class")&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function zse({children:e}){const t=Ri(),{captcha:o}=R.useContext(bt);return o?.provider!=="google-recaptcha-v3"?e:T.jsxs(Fse,{reCaptchaKey:o.siteKey,useEnterprise:o.enterprise,useRecaptchaNet:o.recaptchaNet,children:[t&&T.jsx("style",{children:`
|
|
164
|
+
`),p=u;h.length>p;p++){var f=h[p];if(1024>=f.length){var v=ID.test(f)?f.replace(ID,"$1"):f;if(!v.match(/\S*Error: /)){for(var b of i){var S=b(v,a);if(S){m.push(S);break}}if(m.length>=50)break}}}return(function(C){if(!C.length)return[];var w=Array.from(C);return w.reverse(),w.slice(0,50).map((_=>{return Oe({},_,{filename:_.filename||(k=w,k[k.length-1]||{}).filename,function:_.function||cd});var k}))})(m)}})("web:javascript",Voe,Koe)),this._instance=e,this.fo=(t=(o=this._instance.persistence)==null?void 0:o.get_property(sw))!==null&&t!==void 0?t:[],this.mo=_f(this.yo()),this.bo=new rae(this.mo)}onConfigChange(){this.mo=_f(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,o,a;if("errorTracking"in e){var n=(t=(o=e.errorTracking)==null?void 0:o.suppressionRules)!==null&&t!==void 0?t:[],i=(a=e.errorTracking)==null?void 0:a.captureExtensionExceptions;this.fo=n,this._instance.persistence&&this._instance.persistence.register({[sw]:this.fo,[lw]:i})}}get _o(){var e,t=!!this._instance.get_property(lw),o=this._instance.config.error_tracking.captureExtensionExceptions;return(e=o??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!To(e)||e.trim().length===0)return void mi.warn("Ignoring exception step because message must be a non-empty string");var o=this.wo(t),{sanitizedProperties:a,droppedKeys:n}=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(i).reduce(((c,u)=>nae.has(u)?(l.push(u),c):(c[u]=i[u],c)),{}),droppedKeys:l}})(o);n.length>0&&mi.warn("Ignoring reserved exception step fields",{droppedKeys:n}),this.bo.add(Oe({[Tf]:e,[wf]:new Date().toISOString()},a))}catch(i){mi.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Io(t)){if(this.Co(t))return this.So("Exception dropped: matched a suppression rule"),void mi.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.xo(t))return this.So("Exception dropped: thrown by a browser extension"),void mi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ko(t))return this.So("Exception dropped: thrown by the PostHog SDK"),void mi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var o=this.mo.enabled&&Ct(e.$exception_steps)?this.To(e):e;try{var a=this._instance.capture("$exception",o,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return a&&this.bo.clear(),a}catch(n){return mi.error("Failed to capture exception event. Dropping this exception.",n),void this.bo.clear()}}catch(n){return void mi.error("Failed to process exception event. Ignoring this exception.",n)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Oe({},e,{$exception_steps:t})}catch(o){return mi.error("Failed to read buffered exception steps. Capturing exception without steps.",o),e}}So(e){this.mo.enabled&&this.bo.add({[Tf]:e,[wf]:new Date().toISOString()})}wo(e){return Do(e)?Oe({},e):{}}yo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}Co(e){if(e.length===0)return!1;var t=e.reduce(((o,a)=>{var{type:n,value:i}=a;return To(n)&&n.length>0&&o.$exception_types.push(n),To(i)&&i.length>0&&o.$exception_values.push(i),o}),{$exception_types:[],$exception_values:[]});return this.fo.some((o=>{var a=o.values.map((n=>{var i,l=IB[n.operator],c=Ot(n.value)?n.value:[n.value],u=(i=t[n.key])!==null&&i!==void 0?i:[];return c.length>0&&l(c,u)}));return o.type==="OR"?a.some(Boolean):a.every(Boolean)}))}xo(e){return e.flatMap((t=>{var o,a;return(o=(a=t.stacktrace)==null?void 0:a.frames)!==null&&o!==void 0?o:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ko(e){if(e.length>0){var t,o,a,n,i=(t=(o=e[0].stacktrace)==null?void 0:o.frames)!==null&&t!==void 0?t:[],l=i[i.length-1];return(a=l==null||(n=l.filename)==null?void 0:n.includes("posthog.com/static"))!==null&&a!==void 0&&a}return!1}Io(e){return!Ct(e)&&Ot(e)}}},gne=Oe({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Ao=null,this.Eo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[dw]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Ao||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(dw)||this.ur((()=>this.Ro()))}ur(e){var t,o;(t=Je.__PosthogExtensions__)!=null&&t.generateProductTours?e():(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"product-tours",(a=>{a?bO.error("Could not load product tours script",a):e()}))}Ro(){var e;!this.Ao&&(e=Je.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ao=Je.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Ot(this.Eo)||t){var o=this.ni;if(o){var a=o.props[Vg];if(Ot(a)&&!t)return this.Eo=a,void e(a,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:n=>{var i=n.statusCode;if(i!==200||!n.json){var l="Product Tours API could not be loaded, status: "+i;return bO.error(l),void e([],{isLoaded:!1,error:l})}var c=Ot(n.json.product_tours)?n.json.product_tours:[];this.Eo=c,o&&o.register({[Vg]:c}),e(c,{isLoaded:!0})}})}else e(this.Eo,{isLoaded:!0})}getActiveProductTours(e){Ct(this.Ao)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Ao.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Ao)==null||t.showTourById(e)}previewTour(e){this.Ao?this.Ao.previewTour(e):this.ur((()=>{var t;this.Ro(),(t=this.Ao)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.Ao)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Ao)==null||e.nextStep()}previousStep(){var e;(e=this.Ao)==null||e.previousStep()}clearCache(){var e;this.Eo=null,(e=this.ni)==null||e.unregister(Vg)}resetTour(e){var t;(t=this.Ao)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Ao)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Ao)==null||t.cancelPendingTour(e)}}},Ov),fne={siteApps:class{constructor(e){this._instance=e,this.No=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Mo(e,t){if(t){var o=this.globalsForEvent(t);this.No.push(o),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var e;return(e=Je._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Mo.bind(this));this.Fo=()=>{e(),this.No=[],this.Fo=void 0}}}globalsForEvent(e){var t,o,a,n,i,l,c;if(!e)throw new Error("Event payload is required");var u={},m=this._instance.get_property("$groups")||[],h=this._instance.get_property("$stored_group_properties")||{};for(var[p,f]of Object.entries(h))u[p]={id:m[p],type:p,properties:f};var{$set_once:v,$set:b}=e;return{event:Oe({},LF(e,ine),{properties:Oe({},e.properties,b?{$set:Oe({},(t=(o=e.properties)==null?void 0:o.$set)!==null&&t!==void 0?t:{},b)}:{},v?{$set_once:Oe({},(a=(n=e.properties)==null?void 0:n.$set_once)!==null&&a!==void 0?a:{},v)}:{}),elements_chain:(i=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t=this.apps[e.id],o=()=>{var l;!t.errored&&this.No.length&&(rs.info("Processing "+this.No.length+" events for site app with id "+e.id),this.No.forEach((c=>t.processEvent==null?void 0:t.processEvent(c))),t.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Fo)==null||l.call(this))},a=!1,n=l=>{t.errored=!l,t.loaded=!0,rs.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),a&&o()};try{var{processEvent:i}=e.init({posthog:this._instance,callback(l){n(l)}});i&&(t.processEvent=i),a=!0}catch(l){rs.error(yO+e.id,l),n(!1)}if(a&&t.loaded)try{o()}catch(l){rs.error("Error while processing buffered events PostHog app with config id "+e.id,l),t.errored=!0}}Oo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var o of e)this.setupSiteApp(o)}Po(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var o of Object.values(this.apps))try{o.processEvent==null||o.processEvent(t)}catch(a){rs.error("Error while processing event "+e.event+" for site app "+o.id,a)}}}onRemoteConfig(e){var t,o,a,n=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Oo(),void this._instance.on("eventCaptured",(u=>this.Po(u)))):void rs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((o=this.Fo)==null||o.call(this),(a=e.siteApps)!=null&&a.length)if(this.isEnabled){var i=function(u){var m;Je["__$$ph_site_app_"+u]=n._instance,(m=Je.__PosthogExtensions__)==null||m.loadSiteApp==null||m.loadSiteApp(n._instance,c,(h=>{if(h)return rs.error(yO+u,h)}))};for(var{id:l,url:c}of e.siteApps)i(l)}else rs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},vne={tracingHeaders:class{constructor(e){this.Lo=void 0,this.Do=void 0,this.so=()=>{var t,o,a=this.Bo()||[];Ue(this.Lo)&&((t=Je.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(a,this._instance.get_distinct_id(),this._instance.sessionManager)),Ue(this.Do)&&((o=Je.__PosthogExtensions__)==null||(o=o.tracingHeadersPatchFns)==null||o._patchFetch(a,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,o;(t=Je.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"tracing-headers",(a=>{if(a)return nne.error("failed to load script",a);e()}))}Bo(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Bo()?this.ur(this.so):((e=this.Lo)==null||e.call(this),(t=this.Do)==null||t.call(this),this.Lo=void 0,this.Do=void 0)}}},bne=Oe({surveys:class{get Bt(){return this._instance.config}constructor(e){this.jo=void 0,this._surveyManager=null,this.$o=!1,this.qo=[],this.Zo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Bt.disable_surveys){var t=e.surveys;if(Ct(t))return Jt.warn("Flags not loaded yet. Not loading surveys.");var o=Ot(t);this.jo=o?t.length>0:t,Jt.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var o=localStorage.key(t);(o!=null&&o.startsWith(Aw)||o!=null&&o.startsWith("inProgressSurvey_"))&&e.push(o)}e.forEach((a=>localStorage.removeItem(a)))}loadIfEnabled(){if(!this._surveyManager)if(this.$o)Jt.info("Already initializing surveys, skipping...");else if(this.Bt.disable_surveys)Jt.info(SO);else if(this.Bt.cookieless_mode&&this._instance.consent.isOptedOut())Jt.info("Not loading surveys in cookieless mode without consent.");else{var e=Je?.__PosthogExtensions__;if(e){if(!Ue(this.jo)||this.Bt.advanced_enable_surveys){var t=this.jo||this.Bt.advanced_enable_surveys;this.$o=!0;try{var o=e.generateSurveys;if(o)return void this.Vo(o,t);var a=e.loadExternalDependency;if(!a)return void this.Ho(SC);a(this._instance,"surveys",(n=>{n||!e.generateSurveys?this.Ho("Could not load surveys script",n):this.Vo(e.generateSurveys,t)}))}catch(n){throw this.Ho("Error initializing surveys",n),n}finally{this.$o=!1}}}else Jt.error("PostHog Extensions not found.")}}Vo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new cne(this._instance),Jt.info("Surveys loaded successfully"),this.zo({isLoaded:!0})}Ho(e,t){Jt.error(e,t),this.zo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.qo.push(e),this._surveyManager&&this.zo({isLoaded:!0}),()=>{this.qo=this.qo.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Bt.disable_surveys)return Jt.info(SO),e([]);var o,a=this._instance.get_property(gw);if(a&&!t)return e(a,{isLoaded:!0});typeof Promise<"u"&&this.Zo?this.Zo.then((n=>{var{surveys:i,context:l}=n;return e(i,l)})):(typeof Promise<"u"&&(this.Zo=new Promise((n=>{o=n}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Bt.token),method:"GET",timeout:this.Bt.surveys_request_timeout_ms,callback:n=>{var i;this.Zo=null;var l=n.statusCode;if(l!==200||!n.json){var c="Surveys API could not be loaded, status: "+l;Jt.error(c);var u={isLoaded:!1,error:c};return e([],u),void(o==null||o({surveys:[],context:u}))}var m,h=n.json.surveys||[],p=h.filter((v=>(function(b){return!(!b.start_date||b.end_date)})(v)&&((function(b){var S;return!((S=b.conditions)==null||(S=S.events)==null||(S=S.values)==null||!S.length)})(v)||(function(b){var S;return!((S=b.conditions)==null||(S=S.actions)==null||(S=S.values)==null||!S.length)})(v))));p.length>0&&((m=this._surveyEventReceiver)==null||m.register(p)),(i=this._instance.persistence)==null||i.register({[gw]:h});var f={isLoaded:!0};e(h,f),o?.({surveys:h,context:f})}}))}zo(e){for(var t of this.qo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(o){Jt.error("Error in survey callback",o)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!Ct(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Jt.warn("init was not called")}Uo(e){var t=null;return this.getSurveys((o=>{var a;t=(a=o.find((n=>n.id===e)))!==null&&a!==void 0?a:null})),t}Yo(e){if(Ct(this._surveyManager))return{eligible:!1,reason:T0};var t=typeof e=="string"?this.Uo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Ct(this._surveyManager))return Jt.warn("init was not called"),{visible:!1,disabledReason:T0};var t=this.Yo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return Ct(this._surveyManager)?(Jt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:T0})):new Promise((o=>{this.getSurveys((a=>{var n,i=(n=a.find((c=>c.id===e)))!==null&&n!==void 0?n:null;if(i){var l=this.Yo(i);o({visible:l.eligible,disabledReason:l.reason})}else o({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,o){var a;if(Ct(this._surveyManager))Jt.warn("init was not called");else{var n=typeof e=="string"?this.Uo(e):e;if(n!=null&&n.id)if($ae.includes(n.type)){var i=Fe?.querySelector(t);if(i)return(a=n.appearance)!=null&&a.surveyPopupDelaySeconds?(Jt.info("Rendering survey "+n.id+" with delay of "+n.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Jt.info("Rendering survey "+n.id+" with delay of "+((l=n.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(n,i,o),Jt.info("Survey "+n.id+" rendered")}),1e3*n.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(n,i,o);Jt.warn("Survey element not found")}else Jt.warn("Surveys of type "+n.type+" cannot be rendered in the app");else Jt.warn("Survey not found")}}displaySurvey(e,t){var o;if(Ct(this._surveyManager))Jt.warn("init was not called");else{var a=this.Uo(e);if(a){var n=a;if((o=a.appearance)!=null&&o.surveyPopupDelaySeconds&&t.ignoreDelay&&(n=Oe({},a,{appearance:Oe({},a.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Cw.Popover&&t.initialResponses&&Jt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var i=this.canRenderSurvey(a);if(!i.visible)return void Jt.warn("Survey is not eligible to be displayed: ",i.disabledReason)}t.displayType!==Cw.Inline?this._surveyManager.handlePopoverSurvey(n,t):this.renderSurvey(n,t.selector,t.properties)}else Jt.warn("Survey not found")}}cancelPendingSurvey(e){Ct(this._surveyManager)?Jt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},Ov),yne={toolbar:class{constructor(e){this.instance=e}Go(e){Je.ph_toolbar_state=e}Wo(){var e;return(e=Je.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,o){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),gB(this.instance.config)||!ge||!Fe)return!1;e=e??ge.location,o=o??ge.history;try{if(!t){try{ge.localStorage.setItem("test","test"),ge.localStorage.removeItem("test")}catch{return!1}t=ge?.localStorage}var a,n=dne||If(e.hash,"__posthog")||If(e.hash,"state"),i=n?ND((()=>JSON.parse(atob(decodeURIComponent(n)))))||ND((()=>JSON.parse(decodeURIComponent(n)))):null;return i&&i.action==="ph_authorize"?((a=i).source="url",a&&Object.keys(a).length>0&&(i.desiredHash?e.hash=i.desiredHash:o?o.replaceState(o.state,"",e.pathname+e.search):e.hash="")):((a=JSON.parse(t.getItem(TO)||"{}")).source="localstorage",delete a.userIntent),!(!a.token||this.instance.config.token!==a.token||(this.loadToolbar(a),0))}catch{return!1}}Xo(e){var t=Je.ph_load_toolbar||Je.ph_load_editor;!Ct(t)&&hi(t)?t(e,this.instance):wO.warn("No toolbar load function found")}loadToolbar(e){var t=!(Fe==null||!Fe.getElementById(uB));if(!ge||t)return!1;var o=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,a=Oe({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},o?{instrument:!1}:{});if(ge.localStorage.setItem(TO,JSON.stringify(Oe({},a,{source:void 0}))),this.Wo()===2)this.Xo(a);else if(this.Wo()===0){var n;this.Go(1),(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return wO.error("[Toolbar] Failed to load",i),void this.Go(0);this.Go(2),this.Xo(a)})),Ho(ge,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(a)}))}return!0}Jo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,o){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),this.maybeLoadToolbar(e,t,o)}}},Sne=Oe({experiments:xa},Ov),Tne={conversations:class{constructor(e){this.Ko=void 0,this._conversationsManager=null,this.Qo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Ct(t)||(Mr(t)?this.Ko=t:(this.Ko=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Ko=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Qo||this._instance.config.disable_conversations||gB(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=Je?.__PosthogExtensions__;if(e&&!Ue(this.Ko)&&this.Ko)if(this.ea&&this.ea.token){this.Qo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Qo=!1);var o=e.loadExternalDependency;if(!o)return void this.ra(SC);o(this._instance,"conversations",(a=>{a||!e.initConversations?this.ra("Could not load conversations script",a):this.ta(e.initConversations),this.Qo=!1}))}catch(a){this.ra("Error initializing conversations",a),this.Qo=!1}}else Fn.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Fn.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else Fn.error("Cannot complete initialization: remote config is null")}ra(e,t){Fn.error(e,t),this._conversationsManager=null,this.Qo=!1}show(){this._conversationsManager?this._conversationsManager.show():Fn.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ko===!0&&!Pi(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,o){var a=this;return zn((function*(){return a._conversationsManager?a._conversationsManager.sendMessage(e,t,o):(Fn.warn(nl),null)}))()}getMessages(e,t){var o=this;return zn((function*(){return o._conversationsManager?o._conversationsManager.getMessages(e,t):(Fn.warn(nl),null)}))()}markAsRead(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Fn.warn(nl),null)}))()}getTickets(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Fn.warn(nl),null)}))()}requestRestoreLink(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Fn.warn(nl),null)}))()}restoreFromToken(e){var t=this;return zn((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Fn.warn(nl),null)}))()}restoreFromUrlToken(){var e=this;return zn((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Fn.warn(nl),null)}))()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}un(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},wne={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=vo("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.la=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,o=(t=e.logs)==null?void 0:t.captureConsoleLogs;!Ct(o)&&o&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.oa=0,this.aa=0,this.la=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=Je?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(o=>{var a;o||(a=e.logs)==null||!a.initializeLogs?this.Gt.error("Could not load logs script",o):(e.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(SC)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,o,a,n,i,l;if(this._instance.is_capturing())if(e&&e.body){var c=(t=(o=this._instance.config.logs)==null?void 0:o.flushIntervalMs)!==null&&t!==void 0?t:3e3,u=(a=(n=this._instance.config.logs)==null?void 0:n.maxLogsPerInterval)!==null&&a!==void 0?a:1e3,m=Date.now();if(c>m-this.aa||(this.aa=m,this.oa=0,this.la=!1),u>this.oa){this.oa++;var h=(function(p,f){var v=p.level||"info",{text:b,number:S}=tB[v]||Boe,C=String(Date.now())+"000000",w={};f.distinctId&&(w.posthogDistinctId=f.distinctId),f.sessionId&&(w.sessionId=f.sessionId),f.currentUrl&&(w["url.full"]=f.currentUrl),f.screenName&&(w["screen.name"]=f.screenName),f.appState&&(w["app.state"]=f.appState),f.activeFeatureFlags&&f.activeFeatureFlags.length>0&&(w.feature_flags=f.activeFeatureFlags);var _=Oe({},w,p.attributes||{}),k={timeUnixNano:C,observedTimeUnixNano:C,severityNumber:S,severityText:b,body:{stringValue:p.body},attributes:MD(_)};return p.trace_id&&(k.traceId=p.trace_id),p.span_id&&(k.spanId=p.span_id),Ue(p.trace_flags)||(k.flags=p.trace_flags),k})(e,this.ua());this.sa.push({record:h}),((i=(l=this._instance.config.logs)==null?void 0:l.maxBufferSize)!==null&&i!==void 0?i:100)>this.sa.length?this.ha():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+u+" logs per "+c+"ms"),this.la=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={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.ca}flushLogs(e){if(this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.sa.length!==0){var t=this.sa;this.sa=[];var o=this._instance.config.logs,a=Oe({"service.name":o?.serviceName||"unknown_service"},o?.environment&&{"deployment.environment":o.environment},o?.serviceVersion&&{"service.version":o.serviceVersion},o?.resourceAttributes),n=(function(l,c,u,m){return{resourceLogs:[{resource:{attributes:MD(c)},scopeLogs:[{scope:{name:u,version:m},logRecords:l}]}]}})(t.map((l=>l.record)),a,za.LIB_NAME,za.LIB_VERSION),i=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Vi({method:"POST",url:i,data:n,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.jr||(this.jr=setTimeout((()=>{this.jr=void 0,this.flushLogs()}),(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}ua(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:o}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=o}if(Je!=null&&(e=Je.location)!=null&&e.href&&(t.currentUrl=Je.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(t.activeFeatureFlags=a)}return t}}},_ne=Oe({},Ov,mne,pne,hne,gne,fne,bne,vne,yne,Sne,Tne,wne);Un.__defaultExtensionClasses=Oe({},_ne);var xO,xi=(xO=Ju[Mc]=new Un,(function(){function e(){e.done||(e.done=!0,FB=!1,uo(Ju,(function(t){t._dom_loaded()})))}Fe!=null&&Fe.addEventListener?Fe.readyState==="complete"?e():Ho(Fe,"DOMContentLoaded",e,{capture:!1}):ge&&Be.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),xO);const Cne="studio-ui-resources",jf="html",Pne=10080*60*1e3,xne=50,Ene=16*1024*1024;function kne(e){return e[0]==="mcp"&&e[1]===gL}function Mv(){return new Promise((e,t)=>{const o=indexedDB.open(Cne,1);o.onupgradeneeded=()=>{o.result.objectStoreNames.contains(jf)||o.result.createObjectStore(jf)},o.onsuccess=()=>e(o.result),o.onerror=()=>t(o.error)})}function md(e,t){return e.transaction(jf,t).objectStore(jf)}function Lw(e){return new Promise((t,o)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>o(e.error)})}async function Rne(e){if(!(typeof indexedDB>"u"))try{const t=await Mv(),o=md(t,"readonly"),a=await Lw(o.getAllKeys()),n=await Lw(o.getAll()),i=Date.now(),l=a.map((m,h)=>({key:m,value:n[h]})).sort((m,h)=>(h.value?.updatedAt??0)-(m.value?.updatedAt??0)),c=[];let u=0;for(const{key:m,value:h}of l){if(!h||i-h.updatedAt>Pne||u>=xne){c.push(m);continue}u++;try{const f=JSON.parse(String(m));e.getQueryData(f)===void 0&&e.setQueryData(f,h.html,{updatedAt:0})}catch{c.push(m)}}if(c.length>0){const m=md(t,"readwrite");for(const h of c)m.delete(h)}}catch{}}function Ane(e){if(typeof indexedDB>"u")return()=>{};const t=Mv().catch(()=>null);return e.getQueryCache().subscribe(o=>{const a=o.query;if(!Array.isArray(a.queryKey)||!kne(a.queryKey)||a.state.status!=="success")return;const n=a.state.data;typeof n!="string"||n.length>Ene||t.then(i=>{if(i)try{md(i,"readwrite").put({html:n,updatedAt:Date.now()},JSON.stringify(a.queryKey))}catch{}})})}function Dne(){typeof indexedDB>"u"||Mv().then(e=>md(e,"readwrite").clear()).catch(()=>{})}async function qge(e){if(!(typeof indexedDB>"u"))try{const t=await Mv(),o=await Lw(md(t,"readonly").getAllKeys()),a=md(t,"readwrite");for(const n of o)try{const i=JSON.parse(String(n));i[1]===gL&&i[3]===e&&a.delete(n)}catch{}}catch{}}const zf="studio:rq-cache",EC=1440*60*1e3,One=1e3,Mne=new Set(["publicConfig","ai-provider-keys","organization-settings","home-next-actions"]),Ine=new Set(["VIRTUAL_MCP","CONNECTIONS"]);let GB=!1,KB=!1;function Lne(e){const t=e[0];return typeof t=="string"&&Mne.has(t)?!0:e[3]==="collection"&&typeof e[4]=="string"&&Ine.has(e[4])}function Nne(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(zf);if(!t)return;const o=JSON.parse(t),a=!o.timestamp||Date.now()-o.timestamp>EC;if(o.buster!=="4.359.0"||a||!o.state){window.localStorage.removeItem(zf);return}Sq(e,o.state),GB=!0}catch{zne()}}function Fne(e){if(typeof window>"u")return()=>{};let t=null;const o=()=>{t=null;try{const n=yq(e,{shouldDehydrateQuery:i=>i.state.status==="success"&&Lne(i.queryKey)});window.localStorage.setItem(zf,JSON.stringify({buster:"4.359.0",timestamp:Date.now(),state:n}))}catch{}},a=e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(o,One))});return()=>{t!=null&&clearTimeout(t),a()}}const WB="studio:org-cache:",Bne=20;function jne(e){const t=Date.now(),o=Object.entries(e).filter(([,a])=>t-a.updatedAt<=EC);for(o.sort(([,a],[,n])=>a.updatedAt-n.updatedAt);o.length>Bne;)o.shift();return Object.fromEntries(o)}function YB(e){return`${WB}${e}`}function $ge(e,t){if(typeof window>"u")return null;try{const o=window.localStorage.getItem(YB(e));if(!o)return null;const a=JSON.parse(o)[t];return!a||Date.now()-a.updatedAt>EC?null:(KB=!0,a)}catch{return null}}function Vge(e,t,o){if(!(typeof window>"u"))try{const a=YB(e),n=window.localStorage.getItem(a),i=n?JSON.parse(n):{};i[t]={data:o,updatedAt:Date.now()},window.localStorage.setItem(a,JSON.stringify(jne(i)))}catch{}}function zne(){if(Dne(),!(typeof window>"u"))try{window.localStorage.removeItem(zf);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(WB)&&window.localStorage.removeItem(t)}}catch{}}function Une(){return GB}function qne(){return KB}let wi=!1,Nw=null,EO=!1;const kC="studio:lp-distinct-id",ZB="mesh:lp-distinct-id",_0="/api/_reports/link-token/",$ne=1440*60*1e3;function QB(e){const t="https://analytics.invalid",o=/^[a-z][a-z\d+.-]*:\/\//i.test(e),a=e.startsWith("//");try{const n=new URL(e,t);let i=!1;for(const l of["key","d"])n.searchParams.has(l)&&(n.searchParams.delete(l),i=!0);return n.pathname.startsWith(_0)&&n.pathname!==_0&&(n.pathname=`${_0}redacted`,i=!0),i?o?n.toString():a?`//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`:e}catch{return e}}function C0(e){return Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="string"?QB(o):o]))}const Vne=e=>e?(e.properties=C0(e.properties),e.$set&&(e.$set=C0(e.$set)),e.$set_once&&(e.$set_once=C0(e.$set_once)),e):null;function JB(){try{const e=window.localStorage.getItem(kC)??window.localStorage.getItem(ZB);if(!e)return;const{id:t,ts:o}=JSON.parse(e);return typeof t!="string"||!t||typeof o!="number"?void 0:Date.now()-o<=$ne?t:void 0}catch{return}}function Hne(){try{window.localStorage.removeItem(kC),window.localStorage.removeItem(ZB)}catch{}}function Gne(){try{const e=new URL(window.location.href),t=e.searchParams.get("ph_did");t&&(window.localStorage.setItem(kC,JSON.stringify({id:t,ts:Date.now()})),e.searchParams.delete("ph_did"),window.history.replaceState(window.history.state,"",e.toString()));const o=t??JB();return o?Object.keys(window.localStorage).some(n=>n.startsWith("ph_")&&n.endsWith("_posthog"))?void 0:o:void 0}catch{return}}function Kne(e){const t=JB();if(t&&(Hne(),t!==e))try{xi.alias(t)}catch{}}function Wne(e,t){if(wi||typeof window>"u")return;const o=Gne();xi.init(e,{api_host:t,ui_host:"https://us.posthog.com",cross_subdomain_cookie:!0,...o?{bootstrap:{distinctID:o}}:{},capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,before_send:Vne,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture",maskCapturedNetworkRequestFn:a=>({...a,...typeof a.name=="string"?{name:QB(a.name)}:{}})},person_profiles:"identified_only"}),wi=!0}function Yne(e,t){wi&&(xi.identify(e,t),Kne(e))}function Zne(){wi&&(xi.reset(),Nw=null)}function XB(e,t){wi&&xi.capture(e,t)}function Hge(){return wi}function Gge(){if(!wi||EO||typeof performance>"u")return;EO=!0;const e=performance.getEntriesByType("navigation")[0],t=o=>{const a=performance.getEntriesByName(o,"measure")[0];return a?Math.round(a.duration):void 0};XB("perf_app_bootstrap",{nav_type:e?.type,ttfb_ms:e?Math.round(e.responseStart):void 0,dom_interactive_ms:e?Math.round(e.domInteractive):void 0,dom_content_loaded_ms:e?Math.round(e.domContentLoadedEventEnd):void 0,config_fetch_ms:t("studio:config-fetch"),active_org_fetch_ms:t("studio:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:Une(),org_cache_restored:qne()})}function Kge(e,t){wi&&e!==Nw&&(xi.group("organization",e,t),Nw=e)}function e3(e,t){if(wi)try{xi.captureException(e,t)}catch{}}const Qne=["radial-gradient(ellipse 85% 85% at 0% 0%, rgba(165,149,255,0.6) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 100% 100%, rgba(208,236,26,0.52) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 0% 100%, rgba(255,193,22,0.48) 0%, transparent 72%)"].join(", ");function Jne(e){const t=Ne.c(3),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=T.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:Qne}}),t[0]=a):a=t[0];let n;return t[1]!==o?(n=T.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[a,T.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:o})]}),t[1]=o,t[2]=n):n=t[2],n}function t3(e){const t=Ne.c(20),{orgName:o}=e,a=Rs(),n=Xne;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx("div",{className:"bg-muted p-3 rounded-full",children:T.jsx(eN,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=i):i=t[0];let l;t[1]!==a?(l=a("common.archivedOrgScreen.orgUnavailable"),t[1]=a,t[2]=l):l=t[2];let c;t[3]!==l?(c=T.jsx("h3",{className:"text-lg font-medium",children:l}),t[3]=l,t[4]=c):c=t[4];let u;t[5]!==o||t[6]!==a?(u=o?a("common.archivedOrgScreen.deletedWithName",{orgName:o}):a("common.archivedOrgScreen.deletedGeneric"),t[5]=o,t[6]=a,t[7]=u):u=t[7];let m;t[8]!==u?(m=T.jsx("p",{className:"text-sm text-muted-foreground",children:u}),t[8]=u,t[9]=m):m=t[9];let h;t[10]!==c||t[11]!==m?(h=T.jsxs("div",{className:"space-y-2",children:[c,m]}),t[10]=c,t[11]=m,t[12]=h):h=t[12];let p;t[13]!==a?(p=a("common.archivedOrgScreen.goHome"),t[13]=a,t[14]=p):p=t[14];let f;t[15]!==p?(f=T.jsx(ad,{onClick:n,children:p}),t[15]=p,t[16]=f):f=t[16];let v;return t[17]!==h||t[18]!==f?(v=T.jsxs(Jne,{children:[i,h,f]}),t[17]=h,t[18]=f,t[19]=v):v=t[19],v}function Xne(){window.location.href="/"}function ere(){const e=Ne.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:o}=xm(t);let a;return e[1]!==o?(a=T.jsx(ad,{variant:"outline",size:"sm",asChild:!0,children:T.jsx(hd,{to:"/$org/settings/profile",params:{org:o},children:"Go to your profile"})}),e[1]=o,e[2]=a):a=e[2],a}function tre(e){const t=Ne.c(13),{area:o,description:a,action:n}=e,i=o?`No access to ${o}`:"No access",l=a??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=T.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:T.jsx(aN,{size:28})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=T.jsx("h3",{className:"text-lg font-medium",children:i}),t[1]=i,t[2]=u):u=t[2];let m;t[3]!==l?(m=T.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:l}),t[3]=l,t[4]=m):m=t[4];let h;t[5]!==u||t[6]!==m?(h=T.jsxs("div",{className:"space-y-1",children:[u,m]}),t[5]=u,t[6]=m,t[7]=h):h=t[7];let p;t[8]!==n?(p=n??T.jsx(ere,{}),t[8]=n,t[9]=p):p=t[9];let f;return t[10]!==h||t[11]!==p?(f=T.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[c,h,p]}),t[10]=h,t[11]=p,t[12]=f):f=t[12],f}const kO="__studio_chunk_reload_ts";function o3(e){return e?.message==="Organization is archived"}function ore(e){return!!e?.message?.includes("Access denied")}function RO(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class are extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o),e3(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:o.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t,t:o}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:o3(this.state.error)?T.jsx(t3,{}):ore(this.state.error)?T.jsx(tre,{}):T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(K_,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:o("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||o("common.errorBoundary.unexpectedError")})]}),T.jsx(ad,{variant:"outline",onClick:this.resetError,children:o("common.errorBoundary.tryAgain")})]})}return this.props.children}}function nre(e){const t=Ne.c(3),o=Rs();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(are,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}class rre extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o);const a=RO(t);if(e3(t,{boundary:"chunk_root",is_chunk_load_error:a,error_name:t.name,error_message:t.message,component_stack:o.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!a)return;const n=sessionStorage.getItem(kO),i=Date.now();(!n||i-Number(n)>1e4)&&(sessionStorage.setItem(kO,String(i)),window.location.reload())}render(){const{t}=this.props;return this.state.hasError&&RO(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(nN,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.newVersionAvailable")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:t("common.errorBoundary.newVersionDeployed")})]}),T.jsx(ad,{onClick:()=>window.location.reload(),children:t("common.errorBoundary.refresh")})]}):this.state.hasError?o3(this.state.error)?T.jsx(t3,{}):T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(K_,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||t("common.errorBoundary.unexpectedError")})]}),T.jsx(ad,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:t("common.errorBoundary.tryAgain")})]}):this.props.children}}function ire(e){const t=Ne.c(3),o=Rs();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(rre,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}function sre(e){const t=Ne.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Dt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{"data-slot":"card",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function Wge(e){const t=Ne.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx("div",{"data-slot":"card-content",...o}),t[2]=o,t[3]=a):a=t[3],a}function Yge(e){const t=Ne.c(12),{title:o,description:a,docsHref:n,actions:i,className:l,headerClassName:c,children:u}=e;let m;t[0]!==l?(m=Dt("flex flex-col gap-3",l),t[0]=l,t[1]=m):m=t[1];let h;t[2]!==i||t[3]!==a||t[4]!==n||t[5]!==c||t[6]!==o?(h=(o||a||n||i)&&T.jsxs("div",{className:Dt("flex items-center justify-between gap-3 px-4",c),children:[T.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[o&&T.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:o}),(a||n)&&T.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[a,n&&T.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",T.jsx(tN,{size:12})]})]})]}),i&&T.jsx("div",{className:"shrink-0",children:i})]}),t[2]=i,t[3]=a,t[4]=n,t[5]=c,t[6]=o,t[7]=h):h=t[7];let p;return t[8]!==u||t[9]!==m||t[10]!==h?(p=T.jsxs("section",{className:m,children:[h,u]}),t[8]=u,t[9]=m,t[10]=h,t[11]=p):p=t[11],p}function Zge(e){const t=Ne.c(11),{className:o,children:a}=e;let n,i,l;if(t[0]!==a||t[1]!==o){const u=R.Children.toArray(a).filter(R.isValidElement);n=sre,t[5]!==o?(i=Dt("p-0 gap-0 overflow-hidden",o),t[5]=o,t[6]=i):i=t[6],l=u.map(lre),t[0]=a,t[1]=o,t[2]=n,t[3]=i,t[4]=l}else n=t[2],i=t[3],l=t[4];let c;return t[7]!==n||t[8]!==i||t[9]!==l?(c=T.jsx(n,{className:i,children:l}),t[7]=n,t[8]=i,t[9]=l,t[10]=c):c=t[10],c}function lre(e,t){return T.jsxs("div",{children:[t>0&&T.jsx("div",{className:"h-px bg-border mx-5"}),e]},t)}function Qge(e){const t=Ne.c(27),{icon:o,title:a,description:n,action:i,onClick:l,className:c,children:u}=e,m=u?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",h=l&&"hover:bg-muted/50 cursor-pointer";let p;t[0]!==c||t[1]!==m||t[2]!==h?(p=Dt(m,h,c),t[0]=c,t[1]=m,t[2]=h,t[3]=p):p=t[3];const f=l?"button":void 0,v=l?0:void 0;let b;t[4]!==l?(b=l?E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),l())}:void 0,t[4]=l,t[5]=b):b=t[5];let S;t[6]!==o?(S=o&&T.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:o}),t[6]=o,t[7]=S):S=t[7];let C;t[8]!==a?(C=T.jsx("div",{className:"text-sm font-medium",children:a}),t[8]=a,t[9]=C):C=t[9];let w;t[10]!==n?(w=n&&T.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:n}),t[10]=n,t[11]=w):w=t[11];let _;t[12]!==u||t[13]!==C||t[14]!==w?(_=T.jsxs("div",{className:"flex-1 min-w-0",children:[C,w,u]}),t[12]=u,t[13]=C,t[14]=w,t[15]=_):_=t[15];let k;t[16]!==i?(k=i&&T.jsx("div",{className:"shrink-0",onClick:cre,children:i}),t[16]=i,t[17]=k):k=t[17];let x;return t[18]!==l||t[19]!==_||t[20]!==k||t[21]!==p||t[22]!==f||t[23]!==v||t[24]!==b||t[25]!==S?(x=T.jsxs("div",{className:p,onClick:l,role:f,tabIndex:v,onKeyDown:b,children:[S,_,k]}),t[18]=l,t[19]=_,t[20]=k,t[21]=p,t[22]=f,t[23]=v,t[24]=b,t[25]=S,t[26]=x):x=t[26],x}function cre(e){return e.stopPropagation()}function Jge(e){const t=Ne.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Dt("px-4 py-4",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}function Xge(e){const t=Ne.c(5),{children:o,className:a}=e;let n;t[0]!==a?(n=Dt("flex items-center justify-end gap-2 px-4 py-4",a),t[0]=a,t[1]=n):n=t[1];let i;return t[2]!==o||t[3]!==n?(i=T.jsx("div",{className:n,children:o}),t[2]=o,t[3]=n,t[4]=i):i=t[4],i}function dre(e){const t=Ne.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Dt("flex flex-col gap-10",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}const Iv={connect:{key:"connect",titleKey:"settings.connectClients.pageTitle",tabs:[],ownedRoutes:["/$org/settings/api-keys"]},members:{key:"members",titleKey:"orgs.members.title",tabs:[{key:"members",labelKey:"orgs.members.title",to:"/$org/settings/members",requires:"members:manage"},{key:"roles",labelKey:"settings.roles.pageTitle",to:"/$org/settings/roles",privilegedOnly:!0}]},billing:{key:"billing",titleKey:"settings.nav.billing",tabs:[{key:"ai-providers",labelKey:"settings.nav.aiProviders",to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"infra",labelKey:"settings.subnav.infrastructure",to:"/$org/settings/infra-billing",requires:"members:manage",requiresOwnedSites:!0}]},repositories:{key:"repositories",titleKey:"settings.nav.repositories",tabs:[],ownedRoutes:["/$org/settings/repositories"]},storage:{key:"storage",titleKey:"settings.nav.storage",tabs:[{key:"buckets",labelKey:"settings.nav.buckets",to:"/$org/settings/buckets",requires:"file-configs:manage"},{key:"synced-repos",labelKey:"settings.nav.syncedRepos",to:"/$org/settings/synced-repos",requires:"file-configs:manage"}]}};function efe(e){const t=Iv[e];return[...t.tabs.map(o=>o.to),...t.ownedRoutes??[]]}function tfe(e){return Iv[e].tabs.length>0}const ure=new Set(["owner","admin"]);function a3(){const e=Ne.c(11),{org:t,locator:o}=Nm();let a;e[0]!==o?(a=gr.myCapabilities(o),e[0]=o,e[1]=a):a=e[1];let n;e[2]!==t?(n=async()=>{const h=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(t.slug)}`,{credentials:"include"});if(!h.ok)throw new Error(`my-capabilities request failed: ${h.status}`);return await h.json()},e[2]=t,e[3]=n):n=e[3];let i;e[4]!==a||e[5]!==n?(i={queryKey:a,queryFn:n,staleTime:3e4,retry:2},e[4]=a,e[5]=n,e[6]=i):i=e[6];const{data:l,isLoading:c,isError:u}=Em(i);let m;return e[7]!==l||e[8]!==u||e[9]!==c?(m={data:l,loading:c,error:u},e[7]=l,e[8]=u,e[9]=c,e[10]=m):m=e[10],m}function ofe(e){const t=Ne.c(8),{data:o,loading:a,error:n}=a3();if(a){let m;return t[0]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!1,loading:!0,error:!1,reason:"loading"},t[0]=m):m=t[0],m}if(n){let m;return t[1]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!1,loading:!1,error:!0,reason:"error"},t[1]=m):m=t[1],m}const i=o?.role??null;if(!i){let m;return t[2]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!1,loading:!1,error:!1,reason:"denied"},t[2]=m):m=t[2],m}if(i==="owner"){let m;return t[3]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!0,loading:!1,error:!1,reason:"owner"},t[3]=m):m=t[3],m}if(i==="admin"){let m;return t[4]===Symbol.for("react.memo_cache_sentinel")?(m={granted:!0,loading:!1,error:!1,reason:"admin"},t[4]=m):m=t[4],m}const l=o?.capabilities?.[e]===!0,c=l?"role":"denied";let u;return t[5]!==l||t[6]!==c?(u={granted:l,loading:!1,error:!1,reason:c},t[5]=l,t[6]=c,t[7]=u):u=t[7],u}function n3(){const e=Ne.c(10),{data:t,loading:o,error:a}=a3(),n=t?.role??void 0;let i;e[0]!==n?(i=n?ure.has(n):!1,e[0]=n,e[1]=i):i=e[1];const l=i;let c;e[2]!==t?.capabilities?(c=t?.capabilities??{},e[2]=t?.capabilities,e[3]=c):c=e[3];const u=c;let m;return e[4]!==a||e[5]!==l||e[6]!==o||e[7]!==n||e[8]!==u?(m={capabilities:u,loading:o,error:a,isPrivileged:l,roleSlug:n},e[4]=a,e[5]=l,e[6]=o,e[7]=n,e[8]=u,e[9]=m):m=e[9],m}class AO extends Error{constructor(t,o){super(t),this.status=o,this.name="StudioToolError"}status}async function mre(e,t,o){const a=await fetch(`/api/${encodeURIComponent(e)}/tools/${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o??{})});if(!a.ok){let n=`${t} failed (${a.status})`;try{const i=await a.json();i?.error&&(n=i.error)}catch{}throw new AO(n,a.status)}try{return await a.json()}catch{throw new AO(`${t} returned a non-JSON response`,a.status)}}function RC(){const e=Ne.c(5),{org:t}=Nm(),o=t.slug;let a;e[0]!==o?(a=(i,l)=>mre(o,i,l),e[0]=o,e[1]=a):a=e[1];let n;return e[2]!==o||e[3]!==a?(n={orgSlug:o,call:a},e[2]=o,e[3]=a,e[4]=n):n=e[4],n}function pre(){const e=Ne.c(13),{org:t}=Nm(),o=RC(),{capabilities:a,isPrivileged:n}=n3(),i=n||!!a["members:manage"];let l;e[0]!==t.id?(l=gr.infraBillingSites(t.id),e[0]=t.id,e[1]=l):l=e[1];const c=!!t.id&&i;let u;e[2]!==o?(u=()=>o.call("INFRA_BILLING_SITES_LIST",{}),e[2]=o,e[3]=u):u=e[3];let m;e[4]!==l||e[5]!==c||e[6]!==u?(m={queryKey:l,staleTime:3e5,enabled:c,queryFn:u},e[4]=l,e[5]=c,e[6]=u,e[7]=m):m=e[7];const{data:h,isLoading:p}=Em(m);let f;e[8]!==h?.sites?(f=h?.sites.map(hre)??[],e[8]=h?.sites,e[9]=f):f=e[9];let v;return e[10]!==p||e[11]!==f?(v={sites:f,isLoading:p},e[10]=p,e[11]=f,e[12]=v):v=e[12],v}function hre(e){return e.slug}function afe(){const e=Ne.c(7),t=RC(),o=Rs();let a;e[0]!==t?(a=l=>t.call("INFRA_BILLING_PORTAL",{siteSlugs:l}),e[0]=t,e[1]=a):a=e[1];let n;e[2]!==o?(n=l=>Si.error(o("settings.infraBilling.portalError",{message:l.message})),e[2]=o,e[3]=n):n=e[3];let i;return e[4]!==a||e[5]!==n?(i={mutationFn:a,onSuccess:gre,onError:n},e[4]=a,e[5]=n,e[6]=i):i=e[6],Ku(i)}function gre(e){const{url:t}=e;return window.open(t,"_blank","noopener,noreferrer")}function nfe(e,t){const o=Ne.c(14),{org:a}=Nm(),n=RC();let i,l,c;o[0]!==a.id||o[1]!==t||o[2]!==e?(i=[...e].sort(),c=Em,l=gr.infraBilling(a.id,i.join(","),t),o[0]=a.id,o[1]=t,o[2]=e,o[3]=i,o[4]=l,o[5]=c):(i=o[3],l=o[4],c=o[5]);const u=i.length>0;let m;o[6]!==t||o[7]!==i||o[8]!==n?(m=()=>n.call("INFRA_BILLING_GET",{siteSlugs:i,period:t}),o[6]=t,o[7]=i,o[8]=n,o[9]=m):m=o[9];let h;return o[10]!==l||o[11]!==u||o[12]!==m?(h={queryKey:l,enabled:u,staleTime:6e4,queryFn:m},o[10]=l,o[11]=u,o[12]=m,o[13]=h):h=o[13],c(h)}function fre(){const e=Ne.c(7),{capabilities:t,isPrivileged:o,loading:a,error:n}=n3(),{sites:i,isLoading:l}=pre(),c=i.length>0;let u;if(e[0]!==t||e[1]!==n||e[2]!==o||e[3]!==a||e[4]!==c||e[5]!==l){const m=h=>h.requiresOwnedSites&&!c&&!l?!1:a||n?!0:h.privilegedOnly?o:h.requires?o||t[h.requires]:!0;u=Object.fromEntries(Object.values(Iv).map(h=>[h.key,h.tabs.filter(m)])),e[0]=t,e[1]=n,e[2]=o,e[3]=a,e[4]=c,e[5]=l,e[6]=u}else u=e[6];return u}function vre(e){const t=Ne.c(16),{group:o}=e,a=Rs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},t[0]=n):n=t[0];const{org:i}=xm(n);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:bre},t[1]=l):l=t[1];const c=XU(l),u=fre()[o],{titleKey:m}=Iv[o];let h;t[2]!==a||t[3]!==m?(h=a(m),t[2]=a,t[3]=m,t[4]=h):h=t[4];let p;t[5]!==h?(p=T.jsx(Ug.Title,{children:h}),t[5]=h,t[6]=p):p=t[6];let f;t[7]!==o||t[8]!==i||t[9]!==c||t[10]!==a||t[11]!==u?(f=u.length>1&&T.jsx("nav",{"data-slot":"settings-subnav","aria-label":a("settings.subnav.ariaLabel"),className:"bg-muted inline-flex h-10 w-fit items-center rounded-xl p-[3px] gap-0.5",children:u.map(b=>{const S=b.to.replace("$org",i),C=c===S||c.startsWith(`${S}/`);return T.jsx(hd,{to:b.to,params:{org:i},onClick:()=>XB("settings_subnav_clicked",{group_key:o,tab_key:b.key}),className:Dt("inline-flex h-full items-center justify-center rounded-lg border border-transparent px-3 text-sm font-medium whitespace-nowrap transition-[color,box-shadow]",C?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a(b.labelKey)},b.key)})}),t[7]=o,t[8]=i,t[9]=c,t[10]=a,t[11]=u,t[12]=f):f=t[12];let v;return t[13]!==p||t[14]!==f?(v=T.jsxs("div",{"data-slot":"settings-heading",className:"flex flex-col gap-4",children:[p,f]}),t[13]=p,t[14]=f,t[15]=v):v=t[15],v}function bre(e){return e.location.pathname}function r3(){const e=Ne.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=T.jsxs("div",{"data-testid":"settings-content-loading",className:"flex flex-col gap-4",children:[T.jsx(QA,{className:"h-32 w-full"}),T.jsx(QA,{className:"h-32 w-full"})]}),e[0]=t):t=e[0],t}function yre(e){const t=Ne.c(14),{group:o,fallback:a,errorFallback:n,className:i,children:l}=e;let c;t[0]!==o?(c=T.jsx(vre,{group:o}),t[0]=o,t[1]=c):c=t[1];let u;t[2]!==a?(u=a??T.jsx(r3,{}),t[2]=a,t[3]=u):u=t[3];let m;t[4]!==l||t[5]!==u?(m=T.jsx(R.Suspense,{fallback:u,children:l}),t[4]=l,t[5]=u,t[6]=m):m=t[6];let h;t[7]!==n||t[8]!==m?(h=T.jsx(nre,{fallback:n,children:m}),t[7]=n,t[8]=m,t[9]=h):h=t[9];let p;return t[10]!==i||t[11]!==c||t[12]!==h?(p=T.jsx(Ug,{children:T.jsx(Ug.Content,{children:T.jsx(Ug.Body,{children:T.jsxs(dre,{className:i,children:[c,h]})})})}),t[10]=i,t[11]=c,t[12]=h,t[13]=p):p=t[13],p}function Ei(e){return function(){return T.jsx(yre,{group:e,children:T.jsx(r3,{})})}}function i3(e){try{localStorage.setItem(Cl.lastLocation(),JSON.stringify(e))}catch{}}function Sre(){try{const e=localStorage.getItem(Cl.lastLocation());if(!e)return null;const t=JSON.parse(e);if(typeof t?.org=="string")return{org:t.org,taskId:typeof t.taskId=="string"?t.taskId:void 0,virtualmcpid:typeof t.virtualmcpid=="string"?t.virtualmcpid:void 0}}catch{}return null}function rfe(){try{localStorage.removeItem(Cl.lastLocation())}catch{}}function s3(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function l3(e,t){return`app:${e}:${t}`}function Tre(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),o=t.indexOf(":");if(o<=0)return null;const a=t.slice(0,o),n=t.slice(o+1);return!a||!n?null:{connectionId:a,toolName:n}}function wre(e){return`deck:${encodeURIComponent(e)}`}function _re(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function Cre(e){return`file:${encodeURIComponent(e)}`}function Pre(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function xre(e){return`library-file:${encodeURIComponent(e)}`}function Ere(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function kre(e){return`code:${encodeURIComponent(e)}`}function Rre(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const c3=["overview","settings","automations","site-editor","code","content","assets","hosting","e2e","analytics","cdn","git"],Are=new Set(c3),Dre=new Set(["hosting","e2e","analytics","cdn"]),Ore=new Set(["board","files","connect-sources","reports","discover"]);function ife(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const Mre=new Map([["preview","site-editor"]]);function Lv(e){return Mre.get(e)??e}const AC=new Set(["instructions","connections","layout","settings"]);function Ire(e){return!!e&&AC.has(e)}const Lre=new Set(["overview","board","reports"]);function sfe(e){const t=e?.defaultMainView??null;if(!(!t||t.type==="chat"))return d3(e??null)}function d3(e){const t=e?.defaultMainView??null;if(!t)return"settings";const o=Lv(t.type);if(AC.has(o))return"settings";if(Are.has(o)||Lre.has(o))return o;if(o==="ext-app"||o==="ext-apps"){if(t.id&&t.toolName)return l3(t.id,t.toolName);const a=e?.tabs?.map(n=>n.id)??[];return t.id&&a.includes(t.id)?t.id:a[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function lfe(e){const t=e.routeDefaultMain||d3(e.metadata),o=e.panelTabId&&AC.has(e.panelTabId)?"settings":e.panelTabId?Lv(e.panelTabId):e.panelTabId,a=e.metadata?.defaultMainView??null,n=a==null||a.type==="chat";return{mainOpen:e.mainPanelParam??(!!o||!!e.routeDefaultMain||!n),activeTab:o??t}}function cfe(e){return e.mainOpen&&e.clickedId===e.activeTab?{close:!0}:{tabId:e.clickedId}}function dfe(e){return e.mainOpen?e.activeTab==="automations"?!0:s3(e.activeTab)!==null:!1}function ufe(e){return e.mainOpen&&e.activeTab==="automations"?{close:!0}:{tabId:"automations"}}const Nre=["file","key","deck","path","connection","tool","automation","main","section"],ym="content";function Fre(){const e={};for(const t of Nre)e[t]=void 0;return e}const Bre=new Set([...c3.filter(e=>!Dre.has(e)),...Ore,"app","file","deck","library-file","connect-sources","instructions","connections","layout","preview"]),jre=["board","files","reports","overview","discover"],zre=new Set(jre);function Ure(e){return zre.has(e)}function qre(e){return!!e&&Bre.has(e)}function $re(e){const t=Fre(),o=Tre(e);if(o)return{panel:"app",payload:{...t,connection:o.connectionId,tool:o.toolName}};const a=s3(e);if(a)return{panel:"automations",payload:{...t,automation:a.id}};const n=Pre(e);if(n)return{panel:"file",payload:{...t,key:n.key}};const i=_re(e);if(i)return{panel:"deck",payload:{...t,deck:i.path}};const l=Ere(e);if(l)return{panel:"library-file",payload:{...t,path:l.path}};const c=Rre(e);return c?{panel:"code",payload:{...t,file:c.path??void 0}}:Ire(e)?{panel:"settings",payload:t}:e===ym?{panel:"site-editor",payload:{...t,main:ym}}:{panel:Lv(e),payload:t}}function mfe(e,t){if(e)switch(e){case"app":return t.connection&&t.tool?l3(t.connection,t.tool):void 0;case"automations":return t.automation?`automation:${t.automation}`:"automations";case"file":return t.key?Cre(t.key):void 0;case"deck":return t.deck?wre(t.deck):void 0;case"library-file":return t.path?xre(t.path):void 0;case"code":return t.file?kre(t.file):"code";default:{const o=Lv(e);return o==="site-editor"&&t.main===ym?ym:o}}}const Vre={board:"/$org/tasks/{-$taskKey}",files:"/$org/library",reports:"/$org/reports",overview:"/$org/home",discover:"/$org/discover"};function Hre(e,t){if(e===void 0||e===ym&&t==="site-editor")return null;const o={main:void 0};if(e===0||e==="0")return{to:null,panel:void 0,search:{...o,mainpanel:!1}};const{panel:a,payload:n}=$re(e);return a&&Ure(a)?{to:Vre[a],panel:void 0,search:{...o,...n}}:{to:"/$org/agents/{-$panel}",panel:a,search:{...o,...n}}}function pfe(e){const{org:t,taskId:o}=e,{virtualmcpid:a,main:n,...i}=e.search??{},l=Hre(n);if(l&&l.to&&l.to!=="/$org/agents/{-$panel}")return{to:l.to,params:{org:t,project:void 0,panel:void 0},search:{...i,...l.search,virtualmcpid:void 0,thread:o}};const c=a?.trim()?a:void 0;return{to:"/$org/agents/{-$panel}",params:{org:t,project:c,panel:l?.panel},search:{...i,...l?.search??{},thread:o}}}function Gre(e,t){if(t.task===void 0)return null;const{task:o,...a}=t;return{taskKey:e??(o.trim()||void 0),search:a}}const u3={contentPageId:V().optional(),contentPath:V().optional(),contentPathTemplate:V().optional(),contentCollection:V().optional(),contentItem:V().optional()},Pn=BU({component:()=>T.jsx(ire,{children:T.jsx(sI,{})})}),Kre=Qe({getParentRoute:()=>Pn,path:"/login",component:lt(()=>st(()=>import("./login-DThL_TB1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),validateSearch:Nr(()=>Pe({next:V().optional(),client_id:V().optional(),redirect_uri:V().optional(),response_type:V().optional(),state:V().optional(),scope:V().optional(),code_challenge:V().optional(),code_challenge_method:V().optional(),src:V().optional(),ref:V().optional()}))}),Wre=Qe({getParentRoute:()=>Pn,path:"/cli/auth-success",component:lt(()=>st(()=>import("./cli-auth-success-sMSpq5U1.js"),__vite__mapDeps([8,7])))}),Yre=Qe({getParentRoute:()=>Pn,path:"/reset-password",component:lt(()=>st(()=>import("./reset-password-BeHE8ix4.js"),__vite__mapDeps([9,2]))),validateSearch:Nr(()=>Pe({token:V().optional(),error:V().optional()}))}),Zre=Qe({getParentRoute:()=>Pn,path:"/auth/$pathname",component:lt(()=>st(()=>import("./auth-catchall-M-hUihn7.js"),[]))}),Qre=Qe({getParentRoute:()=>Pn,path:"/oauth/callback",component:lt(()=>st(()=>import("./oauth-callback-Cdl6a3fc.js"),__vite__mapDeps([10,11,12])))}),Jre=Qe({getParentRoute:()=>Pn,path:"/oauth/callback/ai-provider",component:lt(()=>st(()=>import("./oauth-callback-ai-provider-NGk1tliS.js"),[]))}),Um=Qe({getParentRoute:()=>Pn,path:"/_admin",component:lt(()=>st(()=>import("./layout-C8MLChrq.js"),__vite__mapDeps([13,14,15])))}),Xre=Qe({getParentRoute:()=>Um,path:"/",beforeLoad:()=>{throw qa({to:"/_admin/users"})}}),eie=Qe({getParentRoute:()=>Um,path:"/users",component:lt(()=>st(()=>import("./users-C3OuYJnL.js"),__vite__mapDeps([16,17,18,19,20,21,22,23,24,25,26,27,28,29,30])))}),tie=Qe({getParentRoute:()=>Um,path:"/orgs",component:lt(()=>st(()=>import("./orgs-Bc7cviFT.js"),__vite__mapDeps([31,17,18,19,20,21,22,2,32,26,33,34,35,36,37,38,25,39,40,27,28,29])))}),oie=Qe({getParentRoute:()=>Um,path:"/prompts",component:lt(()=>st(()=>import("./prompts-BjXOxB2F.js"),__vite__mapDeps([41,20,2,32,38,27])))}),aie=Um.addChildren([Xre,eie,tie,oie]),DC=Qe({getParentRoute:()=>Pn,id:"shell",component:lt(()=>st(()=>import("./shell-layout-3CCNsj8M.js").then(e=>e.s),__vite__mapDeps([42,23,24,43,44,45,46,47,19,48,49,50,51,52,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,22,78,79,80,81,82,83,84,85,33,86,87,12,88,89,90,91,92,93,94,95,96,97,6,5,98,99,39,3,14,100,101,102,103,104])))}),nie=Qe({getParentRoute:()=>DC,path:"/",beforeLoad:async()=>{const e=Sre();if(e)throw qa({to:"/$org",params:{org:e.org}});const t=localStorage.getItem(Cl.lastOrgSlug());if(t)throw qa({to:"/$org",params:{org:t}});const{data:o}=await RL();if(!o)return;const a=o[0];throw qa(a?{to:"/$org",params:{org:a.slug}}:{to:"/onboarding"})}}),rie=Qe({getParentRoute:()=>Pn,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await RL();if(e&&e.length>0)throw qa({to:"/"})},component:lt(()=>st(()=>import("./onboarding-BpdtEr8Y.js"),__vite__mapDeps([105,14,7,106,23,24,77,2,32,37,43,53,75,81])))}),iie=Qe({getParentRoute:()=>Pn,path:"/commerce-onboarding",component:lt(()=>st(()=>import("./commerce-onboarding-Bfwq6BPF.js"),__vite__mapDeps([107,108,87,12,96,49,45,46,47,19,48,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,33,109,110,111,112,113,32,2,26,114,11,115,1,3,4,5,6,7,106,23,116,117,118,119]))),validateSearch:Nr(()=>Pe({org:V().optional(),siteUrl:V().optional()}))}),sie=Qe({getParentRoute:()=>Pn,path:"/choose-editor",component:lt(()=>st(()=>import("./choose-editor-Byq4r-Ol.js"),__vite__mapDeps([120,86,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,14]))),validateSearch:Nr(()=>Pe({site:V().optional(),domain:V().optional(),pageId:V().optional(),path:V().optional(),pathTemplate:V().optional()}))}),lie=Qe({getParentRoute:()=>Pn,path:"/report/$domain",component:lt(()=>st(()=>import("./reports-DUNvh4Uw.js"),__vite__mapDeps([121,1,2,3,4,5,6,115,46,19,50,51,53,62,70,74,44,78,79,83,84,122]))),validateSearch:Nr(()=>Pe({key:V().optional()}))}),Nv=Qe({getParentRoute:()=>DC,path:"/$org",beforeLoad:({params:e})=>{i3({org:e.org})},component:lt(()=>st(()=>import("./org-layout-DsOBEnRI.js"),__vite__mapDeps([123,103,124,86,89,87,12,90,91,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,85,33,125,126,94,95,127,128,116,117,113,32,2,88,129,23,15,3,130,34,38,131,132,133,134,109,110,111,135,136,137,101,39,99,138,139,4,5,6,140,141,96,142,114,11,143,25,144,145,146,147,40,98,148,118,149,30,150,28,29,151,97,152,93,92])))}),Fv=Qe({getParentRoute:()=>Nv,id:"org-shell",pendingComponent:bd,component:lt(()=>st(()=>import("./index-4NvhUqZI.js"),__vite__mapDeps([153,108,87,12,96,49,45,46,47,19,48,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,33,109,110,111,112,113,32,2,26,114,11,115,154,86,101,39,99,124,89,90,91,85,125,126,94,95,127,128,116,117,88,129,23,15,3,130,34,38,131,132,133,134,135,136,137,138,139,4,5,6,140,141,142,143,25,144,145,146,147,40,98,148,118,149,30,150,28,29,151,97,152,93,92,155,100,156,157,158])))}),cie=Pe({sidepanel:QL,mainpanel:IJ,main:io([V(),Ye(0)]).optional(),thread:V().optional(),virtualmcpid:V().optional()}),ki=Qe({getParentRoute:()=>Fv,id:"agent-shell",validateSearch:cie,search:{middlewares:[cU(["sidepanel","virtualmcpid"])]},pendingComponent:bd,component:lt(()=>st(()=>import("./index-mlfPUJla.js").then(e=>e.bI),__vite__mapDeps([159,19,155,93,86,100,152,141,97,87,12,6,5,98,99,39,3,90,146,156,148,85,33,35,58,60,101,160,45,46,47,48,49,50,51,52,43,53,36,54,55,56,57,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,138,139,137,18,20,144,161,131,162,145,23,28,29,163,164,165,166,167,168,42,88,89,91,92,94,95,96,14,102,103,104,151,169,113,32,2,170,127,134,34,171,172,133,109,110,111,135,136,4,140,38,142,114,11,143,25,147,40,118,128,149,30,173,174,175,176,177,178,157,179,180,181,117,182,150,21,183,37,184,185,186,26,187,188,154,108,112,115,189,126,190,191,119,192,193])))}),die=Pe({virtualmcpid:V().optional(),preview:V().optional(),task:V().optional(),autosend:V().optional(),connect:Rm().optional(),siteUrl:V().optional(),...u3,view:V().optional(),q:V().optional(),assignee:V().optional(),priority:V().optional(),due:V().optional(),tags:V().optional(),repo:V().optional()}),uie=Qe({getParentRoute:()=>ki,path:"/$taskId",validateSearch:die,beforeLoad:({params:e,search:t})=>{i3({org:e.org,taskId:e.taskId,virtualmcpid:t.virtualmcpid})},component:()=>null}),mie=Qe({getParentRoute:()=>ki,path:"/home",staticData:{defaultMain:"overview"},validateSearch:Pe({connect:Rm().optional(),siteUrl:V().optional()}),component:()=>null}),pie=Qe({getParentRoute:()=>ki,path:"/agents/{-$panel}",beforeLoad:({params:e,search:t})=>{const o=e.panel;if(!(!o||qre(o))&&!t.virtualmcpid)throw qa({to:"/$org/agents/{-$panel}",params:{org:e.org,panel:void 0},search:a=>({...a,virtualmcpid:o}),hash:!0,replace:!0})},validateSearch:Pe({file:V().optional(),key:V().optional(),deck:V().optional(),path:V().optional(),connection:V().optional(),tool:V().optional(),automation:V().optional(),section:V().optional(),preview:V().optional(),autosend:V().optional(),connect:Rm().optional(),siteUrl:V().optional(),...u3}),component:()=>null}),hie=Qe({getParentRoute:()=>ki,path:"/agents/$project/$panel",beforeLoad:({params:e})=>{throw qa({to:"/$org/agents/{-$panel}",params:{org:e.org,panel:e.panel},search:t=>({...t,virtualmcpid:e.project}),hash:!0,replace:!0})}}),gie=Qe({getParentRoute:()=>ki,path:"/tasks/{-$taskKey}",staticData:{defaultMain:"board"},validateSearch:Pe({task:V().optional(),view:V().optional(),q:V().optional(),assignee:V().optional(),priority:V().optional(),due:V().optional(),tags:V().optional(),repo:V().optional()}),beforeLoad:({params:e,search:t})=>{const o=Gre(e.taskKey,t);if(o)throw qa({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:o.taskKey},search:o.search,replace:!0})},component:()=>null}),fie=Qe({getParentRoute:()=>ki,path:"/reports",staticData:{defaultMain:"reports"},validateSearch:Pe({connect:Rm().optional(),siteUrl:V().optional()}),component:()=>null}),vie=Qe({getParentRoute:()=>ki,path:"/library",staticData:{defaultMain:"files"},validateSearch:Pe({path:V().optional(),preview:V().optional(),skill:V().optional(),brand:V().optional()}),component:()=>null}),bie=Qe({getParentRoute:()=>ki,path:"/discover",staticData:{defaultMain:"discover"},component:()=>null}),yie=Qe({getParentRoute:()=>Nv,path:"/members",beforeLoad:({params:e})=>{throw qa({to:"/$org/settings/members",params:{org:e.org}})}}),Sie=Pe({main:V().optional(),connect:Rm().optional(),siteUrl:V().optional(),task:V().optional(),sidepanel:QL}),Tie=Qe({getParentRoute:()=>Fv,path:"/",validateSearch:Sie,pendingComponent:bd,component:lt(()=>st(()=>import("./index-70jgYSui.js"),__vite__mapDeps([194,86])))}),wie=Qe({getParentRoute:()=>Fv,path:"/t/$taskKey",beforeLoad:({params:e})=>{throw qa({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:e.taskKey},replace:!0})}}),Xt=Qe({getParentRoute:()=>Nv,path:"/settings",pendingComponent:bd,component:lt(()=>st(()=>import("./settings-layout-DzRA8o4K.js"),__vite__mapDeps([195,125,36,54,51,126,35,55,77,94,95,33,22,127,128,45,46,47,19,48,49,50,52,43,53,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,78,79,80,81,24,82,83,84,89,87,12,90,91,116,117,113,32,2,86,88,129,157,158,178,177,148,98,99,39,5])))}),_ie=Qe({getParentRoute:()=>Xt,path:"/",component:lt(()=>st(()=>import("./index-redirect-6SD1wYgJ.js"),__vite__mapDeps([196,197])))}),Cie=Qe({getParentRoute:()=>Xt,path:"/connections",component:lt(()=>st(()=>import("./connections-CPjMhB9t.js"),__vite__mapDeps([198,109,110,87,12,111,199,118,35,54,56,19,66,200,25,21,22,143,135,136,137,101,39,99,138,139,4,5,6,140,141,96,49,45,46,47,48,50,51,52,43,53,36,55,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,44,78,79,80,81,24,82,83,84,20,201,117,144,202,33,127,113,32,2,34,38,90,168,142,114,11,174]))),validateSearch:Nr(()=>Pe({action:ba(["create"]).optional(),tab:ba(["all","connected"]).optional()}))}),Pie=Qe({getParentRoute:()=>Xt,path:"/connections/$appSlug",component:lt(()=>st(()=>import("./connection-detail-Eb8ETQnE.js"),__vite__mapDeps([203,109,110,87,12,111,20,142,2,77,80,204,179,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,22,78,79,81,24,82,83,84,137,136,101,39,99,34,205,206,207,95,128,90,208,151,86,97,6,5,98,152,141,91,183,25,168,11,161,131,23,169,96,113,32,201,117,209,210,211,212,213,171,140,167,134,118]))),validateSearch:Nr(()=>Pe({tab:V().optional()}))}),xie=Qe({getParentRoute:()=>Xt,path:"/connections/$appSlug/$collectionName/$itemId",component:lt(()=>st(()=>import("./collection-detail-C_iM161A.js"),__vite__mapDeps([214,20,87,12,113,32,2,38,204,179,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,80,81,24,82,83,84,137,109,110,111,136,101,39,99,34,205,206,207,95,128,90,208,151,86,97,6,5,98,152,141,91,167,168,215,184,140,183,25,11,165,166,96,155,93,100,3,146,156,148,85,33,42,23,88,89,92,94,14,102,103,104,216]))),validateSearch:Nr(()=>Pe({replayId:V().optional()}))}),Eie=Qe({getParentRoute:()=>Xt,path:"/monitor",component:lt(()=>st(()=>import("./index-C344fJP9.js"),__vite__mapDeps([217,21,22,20,218,219,197,160,45,46,47,19,48,49,50,51,52,43,53,35,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,44,78,79,80,81,24,82,83,84,138,139,137,87,12,90,18,144,161,131,162,145,23,28,29,163,164,33,93,86,97,6,5,98,99,39,155,100,152,141,3,146,156,148,85,101,165,166,167,168,42,88,89,91,92,94,95,96,14,102,103,104,151,169,113,32,2,170,140,25,128,220,174,34,150,38,143,37,215,209,210,205,211,212,213]))),validateSearch:Nr(()=>Pe({tab:ba(["overview","audit","dashboards","threads","automations"]).default("overview"),from:V().default("now-30m"),to:V().default("now"),connectionId:Le(V()).optional().default([]),virtualMcpId:Le(V()).optional().default([]),tool:V().default(""),status:ba(["all","success","errors"]).default("all"),search:V().default(""),page:Mt().optional(),streaming:zt().default(!0),propertyFilters:V().default(""),hideSystem:zt().default(!1)}))}),kie=Qe({getParentRoute:()=>Xt,path:"/general",component:lt(()=>st(()=>import("./general-8jjZEI2b.js"),__vite__mapDeps([221,131,182,23,24,2,222,37,57,64,44,101,87,12,39,99,137,223,25,34,35,36,117,218,219,197])))}),Rie=Qe({getParentRoute:()=>Xt,path:"/connect",pendingComponent:Ei("connect"),component:lt(()=>st(()=>import("./connect-DPR0aZz0.js"),__vite__mapDeps([224,215,34,35,36,171,163,54,58,69,70,188,225,46,77,80,117,33,2,32,87,12,218,219,197])))}),Aie=Qe({getParentRoute:()=>Xt,path:"/ai-providers",pendingComponent:Ei("billing"),component:lt(()=>st(()=>import("./ai-providers-BkCPbynQ.js"),__vite__mapDeps([226,46,146,53,101,87,12,39,99,173,33,127,155,93,86,100,152,141,97,6,5,98,3,90,156,148,85,35,58,60,174,2,34,36,48,55,69,61,22,175,72,54,23,24,62,47,68,79,182,172,117,77,80,181,29,218,219,197])))}),Die=Qe({getParentRoute:()=>Xt,path:"/billing",beforeLoad:({params:e})=>{throw qa({to:"/$org/settings/ai-providers",params:{org:e.org}})}}),Oie=Qe({getParentRoute:()=>Xt,path:"/infra-billing",pendingComponent:Ei("billing"),component:lt(()=>st(()=>import("./infra-billing-JwfnbrOK.js"),__vite__mapDeps([227,59,71,25,220,174,35,36,94,95,33,22,128,34,18,211,205,213,218,219,197])))}),Mie=Qe({getParentRoute:()=>Xt,path:"/secrets",component:lt(()=>st(()=>import("./secrets-DP4W-ebq.js"),__vite__mapDeps([228,46,77,24,82,33,2,32,34,35,36,38,187,218,219,197])))}),Iie=Qe({getParentRoute:()=>Xt,path:"/api-keys",pendingComponent:Ei("connect"),component:lt(()=>st(()=>import("./api-keys-ZU0HMP57.js"),__vite__mapDeps([229,225,46,58,69,77,80,117,33,2,32,87,12,218,219,197])))}),Lie=Qe({getParentRoute:()=>Xt,path:"/buckets",pendingComponent:Ei("storage"),component:lt(()=>st(()=>import("./buckets-_9BM1FM8.js"),__vite__mapDeps([230,46,67,77,80,117,33,2,32,34,35,36,37,38,147,218,219,197])))}),Nie=Qe({getParentRoute:()=>Xt,path:"/repositories",validateSearch:Pe({git_error:V().optional().catch(void 0),git_flow:V().uuid().optional().catch(void 0),git_return:zt().optional().catch(void 0)}),pendingComponent:Ei("repositories"),component:lt(()=>st(()=>import("./repositories-D9N9np8u.js"),__vite__mapDeps([231,186,54,33,2,32,149,138,139,48,64,23,24,134,22,26,50,71,174,35,77,117,25,215,218,219,197])))}),Fie=Qe({getParentRoute:()=>Xt,path:"/synced-repos",pendingComponent:Ei("storage"),component:lt(()=>st(()=>import("./synced-repos-DnORiccP.js"),__vite__mapDeps([232,64,77,117,33,2,186,54,32,149,138,139,48,23,24,134,22,26,192,176,62,56,60,63,65,69,75,80,84,118,35,170,218,219,197])))}),Bie=Qe({getParentRoute:()=>Xt,path:"/task-board",component:lt(()=>st(()=>import("./tasks-DVK74C5k.js"),__vite__mapDeps([233,2,35,55,76,77,80,94,95,33,22,128,37,38,117,222,57,64,44,101,87,12,39,99,137,218,219,197])))}),jie=Qe({getParentRoute:()=>Xt,path:"/tasks",beforeLoad:({params:e})=>{throw qa({to:"/$org/settings/task-board",params:{org:e.org}})}}),zie=Qe({getParentRoute:()=>Xt,path:"/members",pendingComponent:Ei("members"),component:lt(()=>st(()=>import("./members-B6Da0_XH.js"),__vite__mapDeps([234,199,118,35,54,56,19,66,200,25,21,22,17,18,20,130,33,113,32,34,36,38,131,132,129,23,24,28,29,30,161,235,117,69,78,80,174,94,95,128,77,189,218,219,197])))}),Uie=Qe({getParentRoute:()=>Xt,path:"/roles",pendingComponent:Ei("members"),component:lt(()=>st(()=>import("./roles-DfBbbYbO.js"),__vite__mapDeps([236,132,131,235,25,117,118,35,54,56,77,80,17,18,19,20,21,22,175,96,49,45,46,47,48,50,51,52,43,53,36,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,78,79,81,24,82,83,84,144,174,145,139,87,12,134,111,161,30,137,90,146,23,37,89,91,219,197]))),validateSearch:Nr(()=>Pe({role:V().optional()}))}),qie=Qe({getParentRoute:()=>Xt,path:"/sso",component:lt(()=>st(()=>import("./sso-CFDMnkjP.js"),__vite__mapDeps([237,223,25,2,34,35,36,117,37,102,80,218,219,197])))}),$ie=Qe({getParentRoute:()=>Xt,path:"/profile",component:lt(()=>st(()=>import("./profile-DxG4hQYY.js"),__vite__mapDeps([238,23,24,33,207,34,35,36,80,81,37,172,2,72,73,76,182,177])))}),Vie=Qe({getParentRoute:()=>Xt,path:"/store",component:lt(()=>st(()=>import("./store-DCh9NiaD.js"),__vite__mapDeps([239,46,54,77,80,2,37,23,24,128,137,87,12,136,101,39,99,218,219,197])))}),Hie=Qe({getParentRoute:()=>Xt,path:"/registry",component:lt(()=>st(()=>import("./registry-DoA-OSMR.js"),__vite__mapDeps([240,218,219,197])))}),Gie=Qe({getParentRoute:()=>Xt,path:"/store/registry",component:lt(()=>st(()=>import("./store-registry-CVkvF3V2.js"),__vite__mapDeps([241,218,219,197])))}),Kie=Qe({getParentRoute:()=>Xt,path:"/agents",component:lt(()=>st(()=>import("./agents-list-DeOijGV7.js"),__vite__mapDeps([242,118,35,54,56,64,43,90,87,12,61,80,45,46,47,19,48,49,50,51,52,53,36,55,57,58,59,60,62,63,65,66,67,68,69,70,71,72,73,74,75,76,77,44,22,78,79,81,24,82,83,84,181,29,151,86,97,6,5,98,99,39,152,141,91,101,20,208,137,114,11,179,109,110,111,112,33,134,149,117,21,185,186,2,32,138,139,23,26])))}),Wie=Qe({getParentRoute:()=>Xt,path:"/automations",component:lt(()=>st(()=>import("./automations-BJB7qcua.js"),__vite__mapDeps([243,77,84,21,22,20,162,87,12,151,86,90,97,6,5,98,99,39,152,141,91,191,117,118,35,54,56,45,46,47,19,48,49,50,51,52,43,53,36,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,44,78,79,80,81,24,82,83,218,219,197])))}),Yie=Qe({getParentRoute:()=>Xt,path:"/skills",component:lt(()=>st(()=>import("./skills-HsZiQOMl.js"),__vite__mapDeps([244,56,64,74,80,81,84,21,22,118,35,54,117,20,143,25,176,62,156,180,33,164,58,60,52,93,86,68,166,170])))}),Zie=Xt.addChildren([_ie,Cie,Pie,xie,Kie,Wie,Yie,Eie,kie,Rie,Aie,Die,Oie,Mie,Iie,Lie,Nie,Fie,Bie,jie,zie,Uie,qie,$ie,Vie,Gie,Hie]),Qie=ki.addChildren([uie,mie,pie,hie,gie,fie,vie,bie]),Jie=Fv.addChildren([Tie,wie,Qie]),Xie=Nv.addChildren([Jie,yie,Zie]),ese=DC.addChildren([nie,Xie]),tse=Pn.addChildren([ese,aie,rie,iie,sie,lie,Kre,Wre,Yre,Zre,Qre,Jre]);function ose(){const e=Ne.c(16),t=Rs();let o;e[0]!==t?(o=t("common.index.pageNotFound"),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==o?(a=T.jsx("h3",{className:"text-lg font-medium text-foreground",children:o}),e[2]=o,e[3]=a):a=e[3];let n;e[4]!==t?(n=t("common.index.pageNotFoundDescription"),e[4]=t,e[5]=n):n=e[5];let i;e[6]!==n?(i=T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:n}),e[6]=n,e[7]=i):i=e[7];let l;e[8]!==t?(l=t("common.index.goBack"),e[8]=t,e[9]=l):l=e[9];let c;e[10]!==l?(c=T.jsx("button",{type:"button",onClick:ase,className:"text-sm text-primary hover:underline",children:l}),e[10]=l,e[11]=c):c=e[11];let u;return e[12]!==a||e[13]!==i||e[14]!==c?(u=T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[a,i,c]})}),e[12]=a,e[13]=i,e[14]=c,e[15]=u):u=e[15],u}function ase(){return window.history.back()}const Bv=YU({routeTree:tse,defaultPendingComponent:bd,defaultPendingMs:200,defaultPendingMinMs:500,defaultNotFoundComponent:ose});function Ee(...e){return ZL(V_(e))}function nse(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Fo({error:e,localization:t,localizeErrors:o=!0}){var a;const n="Request failed";if(!o)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:n;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||n}function xl(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Fw(e,t){for(const o in e)if(e[o]===t)return o}function Sm(e,t){let o=V().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(o=o.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(o=o.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(o=o.regex(e.regex,{message:t?.INVALID_PASSWORD})),o}var rse={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},ise={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},sse={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},lse={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},cse={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},dse={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},use={...cse,...dse},mse={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},pse={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},hse={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},gse={INVALID_SESSION_TOKEN:"Invalid session token"},fse={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},vse={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},bse={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},yse={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},Sse={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},Tse={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},wse={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},_se={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...lse,...rse,...ise,...sse,...use,...mse,...pse,...hse,...gse,...fse,...vse,...bse,...yse,...Sse,...Tse,...wse},Cse={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},DO={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},OO={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};const m3=R.createContext({});function p3(){return R.useContext(m3)}var P0,MO;function Pse(){if(MO)return P0;MO=1;var e=function(){};return P0=e,P0}var xse=Pse();const Ese=Tl(xse);function kse({async:e,appendTo:t,defer:o,id:a,nonce:n,src:i}){const l=document.createElement("script");e!==void 0&&(l.async=e),o!==void 0&&(l.defer=o),a&&(l.id=a),n&&l.setAttribute("nonce",n),l.src=i,(t==="head"?document.head:document.body).appendChild(l)}var Rse=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]]);return o};let em=null,Tm=!1;const Uf=new Set,qf=new Set,Ase=typeof window<"u",Yc="___grecaptcha_cfg",h3=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function Dse(){if(!Ase)return;function e(o){if(Tm)o();else{window[Yc]||(window[Yc]={});const a=window[Yc];a.fns||(a.fns=[]),a.fns.push(o)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){Tm=!0;for(const o of qf)o();qf.clear()}window[h3]=t}function Ose({language:e,onLoadCallbackName:t,render:o,useEnterprise:a=!1,useRecaptchaNet:n=!1}){const i=n?"recaptcha.net":"google.com",l=a?"enterprise.js":"api.js",c=new URLSearchParams({render:o});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${i}/recaptcha/${l}?${c.toString()}`}function Mse({language:e,render:t,scriptProps:o,useEnterprise:a,useRecaptchaNet:n}){const i={id:"google-recaptcha-v3"},l=Ose({language:e,onLoadCallbackName:h3,render:t,useEnterprise:a,useRecaptchaNet:n});if(em){if(em!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}em=l,kse(Object.assign(Object.assign(Object.assign({},i),o),{src:l}))}function Ise(e){if(!window[Yc])return;const t=window[Yc];t.clients&&delete t.clients[e]}function Lse(e,t){var{onLoadCallback:o,onLoadCallbackName:a}=t,n=Rse(t,["onLoadCallback","onLoadCallbackName"]);if(Uf.size===0&&Dse(),Mse(n),Uf.add(e),o&&(Tm?o():qf.add(o)),a){let i=function(){if(!a)return;const l=window[a];typeof l=="function"&&l()};Tm?i():qf.add(i)}}function Nse(e){var t,o,a;Uf.delete(e),Uf.size===0&&(window.grecaptcha=void 0,window[Yc]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(o=document.querySelector(`script[src="${em}"]`))===null||o===void 0||o.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),em=null,Tm=!1)}let IO=!1;function Fse({container:e,children:t,language:o,reCaptchaKey:a,scriptProps:n,useEnterprise:i,useRecaptchaNet:l}){var c,u,m,h,p,f,v;const b=R.useId(),[S,C]=R.useState(null),[w,_]=R.useState(null),k=R.useRef(!1);R.useEffect(()=>{function D(){var O;const L=i?(O=window.grecaptcha)===null||O===void 0?void 0:O.enterprise:window.grecaptcha;if(!L)throw new Error("reCAPTCHA not found");if(!L.ready)throw new Error("reCAPTCHA ready callback not found");L.ready(()=>{C(L)})}return Lse(b,{language:o,onLoadCallback:D,onLoadCallbackName:n?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:n?.appendTo,async:n?.async,defer:n?.defer,id:n?.id,nonce:n?.nonce},useEnterprise:i,useRecaptchaNet:l}),()=>{Nse(b),C(null)}},[e?.element,b,o,a,n?.appendTo,n?.async,n?.defer,n?.id,n?.nonce,n?.onLoadCallbackName,i,l]),R.useEffect(()=>{var D,O,L;if(!e?.element||!S?.render)return;const U={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((D=e.parameters)===null||D===void 0?void 0:D.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},F=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!F)throw new Error("reCAPTCHA container element not found");const q=S.render(F,U);return!((O=e?.parameters)===null||O===void 0)&&O.hidden&&(IO||(Ese(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),IO=!0),(L=F.querySelector(".grecaptcha-badge"))===null||L===void 0||L.style.setProperty("display","none")),_(q),k.current=!0,()=>{_(null),k.current=!1,Ise(q),F.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.badge,(u=e?.parameters)===null||u===void 0?void 0:u.hidden,(m=e?.parameters)===null||m===void 0?void 0:m.callback,(h=e?.parameters)===null||h===void 0?void 0:h.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(f=e?.parameters)===null||f===void 0?void 0:f.tabindex,(v=e?.parameters)===null||v===void 0?void 0:v.theme,S,a]);const x=!!e?.element,E=x?w:a,A=R.useMemo(()=>E!==null&&S?.execute?D=>{if(E===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return x&&!k.current?(console.warn("Client ID not mounted"),null):S.execute(E,{action:D})}:void 0,[E,S,x]);return T.jsx(m3.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:S},children:t})}var Bse=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const o={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,o),this.notify(e)}setRefetching(e,t){const o=this.cache.get(e);o&&(o.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const o of t)this.notify(o)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const o=this.listeners.get(e);o&&(o.delete(t),o.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const o=Array.from(t);for(const a of o)a()}}},Bn=new Bse;function jse(){return()=>{}}function Ri(){return R.useSyncExternalStore(jse,()=>!0,()=>!1)}function g3(){const[e,t]=R.useState();return R.useEffect(()=>{const o=()=>{const n=document.documentElement.getAttribute("lang");t(n??void 0)};o();const a=new MutationObserver(n=>{for(const i of n)i.attributeName==="lang"&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function OC(){const[e,t]=R.useState("light");return R.useEffect(()=>{const o=()=>{var n;const i=document.documentElement.classList.contains("dark")||((n=document.documentElement.getAttribute("style"))==null?void 0:n.includes("color-scheme: dark"));t(i?"dark":"light")};o();const a=new MutationObserver(n=>{for(const i of n)(i.attributeName==="style"||i.attributeName==="class")&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function zse({children:e}){const t=Ri(),{captcha:o}=R.useContext(bt);return o?.provider!=="google-recaptcha-v3"?e:T.jsxs(Fse,{reCaptchaKey:o.siteKey,useEnterprise:o.enterprise,useRecaptchaNet:o.recaptchaNet,children:[t&&T.jsx("style",{children:`
|
|
165
165
|
.grecaptcha-badge {
|
|
166
166
|
visibility: hidden;
|
|
167
167
|
border-radius: var(--radius) !important;
|