@vantran-se/openchamber-web 2.1.1 → 2.2.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/README.md +32 -24
- package/bin/cli.js +1 -3
- package/bin/cli.test.js +40 -16
- package/bin/lib/DOCUMENTATION.md +6 -5
- package/bin/lib/cli-args.js +6 -1
- package/bin/lib/cli-args.test.js +34 -0
- package/bin/lib/cli-lifecycle.js +0 -1
- package/bin/lib/cli-network.js +8 -2
- package/bin/lib/cli-process.js +1 -1
- package/bin/lib/cli-settings-accessors.test.js +21 -13
- package/bin/lib/cli-startup.js +17 -11
- package/bin/lib/cli-startup.test.js +92 -2
- package/bin/lib/commands-connect-url.js +8 -1
- package/bin/lib/commands-schedule.js +8 -2
- package/bin/lib/commands-serve.js +15 -21
- package/bin/lib/commands-update.js +12 -24
- package/bin/lib/commands-update.test.js +14 -46
- package/dist/assets/DiffView-Cv9MSXl1.js +4 -0
- package/dist/assets/FilePreviewCommentMenu-D4kLseHj.js +4 -0
- package/dist/assets/FilesView-BVoD8I2x.js +14 -0
- package/dist/assets/{GitView-DzuzhIPx.js → GitView-Bzb8p-ew.js} +4 -4
- package/dist/assets/GuestSurfacePane-Crdbvsxo.js +1 -0
- package/dist/assets/InProgressOperationBanner-CwMjNQgk.js +2 -0
- package/dist/assets/{JsonTreeView-B_EPRjzy.js → JsonTreeView-DRKHZfsn.js} +1 -1
- package/dist/assets/MarkdownImageGallery-DZtqT1Zn.js +1 -0
- package/dist/assets/MarkdownRendererImpl-CqG7HCNd.js +10 -0
- package/dist/assets/OnboardingScreen-DMIxwYK5.js +1 -0
- package/dist/assets/{PatchDiff-6yh1csza.js → PatchDiff-CUcCg1jk.js} +1 -1
- package/dist/assets/PierreDiffViewer-CnnR-dnD.js +228 -0
- package/dist/assets/PlanView-RCBadcY7.js +5 -0
- package/dist/assets/SettingsView-CjBjZFRO.js +30 -0
- package/dist/assets/SettingsWindow-DyM7QuhI.js +1 -0
- package/dist/assets/SubmoduleDiffSummary-BWIfgMED.js +1 -0
- package/dist/assets/ToolOutputDialog-Q0P3FuAi.js +15 -0
- package/dist/assets/ToolPartDiffPreview-p7qR9FpU.js +8 -0
- package/dist/assets/{VirtualizedFileDiff-BTJVRkyo.js → VirtualizedFileDiff-CFpjL8Ns.js} +3 -3
- package/dist/assets/{Virtualizer-xCEYz34p.js → Virtualizer-C0IsclZn.js} +1 -1
- package/dist/assets/WalkthroughView-DI31zD02.js +4 -0
- package/dist/assets/appThemeRegistry-B9gkFq9i.js +1 -0
- package/dist/assets/{computeVirtualFileMetrics-CmPe29DM.js → computeVirtualFileMetrics-C2WM6JC2.js} +2 -2
- package/dist/assets/de-YKfk5MmC.js +14 -0
- package/dist/assets/es-_gwT0kr-.js +20 -0
- package/dist/assets/fileTreeStatus-D438yi8M.js +1 -0
- package/dist/assets/fr-DqzvXmIm.js +18 -0
- package/dist/assets/index-BLaHKdtx.js +1 -0
- package/dist/assets/index-BkMXRrVQ.css +1 -0
- package/dist/assets/index-DxNa7xYB.js +65 -0
- package/dist/assets/initializeSharedPreferences-Bck5EAWP.js +1 -0
- package/dist/assets/{isDiffPlainText-CQmDCnEv.js → isDiffPlainText-Dgbw8VKk.js} +1 -1
- package/dist/assets/{isFilePlainText-CYBUzW4I.js → isFilePlainText-_ZS5UYRj.js} +1 -1
- package/dist/assets/ja-B-GFYhQE.js +20 -0
- package/dist/assets/ko-mzksfqDC.js +20 -0
- package/dist/assets/main-C5Xx8dn_.js +2 -0
- package/dist/assets/main-CfBSQM1H.js +990 -0
- package/dist/assets/markdownCore-BmWwW1ll.js +7 -0
- package/dist/assets/miniChat-mnKwy4vQ.js +2 -0
- package/dist/assets/mobile-DeEQd0wZ.js +2 -0
- package/dist/assets/nl-CWQr6NSq.js +20 -0
- package/dist/assets/{parseDiffFromFile-Cy0PNxun.js → parseDiffFromFile-BUgn-T9p.js} +2 -2
- package/dist/assets/patchFileDiff-Dt8LhgBh.js +13 -0
- package/dist/assets/pl-UmRcDUX2.js +20 -0
- package/dist/assets/pt-BR-BSLybvVF.js +20 -0
- package/dist/assets/relocateRestoredSession-B5E9xb3T.js +1 -0
- package/dist/assets/renderElectronMiniChatApp-C0a9A5_J.js +2 -0
- package/dist/assets/renderMobileApp-BNncg3Pk.js +25 -0
- package/dist/assets/runtimeEndpointReset-CZ5aafpl.js +62 -0
- package/dist/assets/{selectionMarkdown-TkYk5h9l.js → selectionMarkdown-CUN3wUld.js} +9 -9
- package/dist/assets/{sessionOwnership-Bs1xbRfB.js → sessionOwnership-BSuxCEhb.js} +1 -1
- package/dist/assets/shikiHighlight-DHDx-6eM.js +1 -0
- package/dist/assets/space-apply-DM_2pRW7.js +1 -0
- package/dist/assets/space-close-Bpomt8z0.js +1 -0
- package/dist/assets/{surface-B6n7wJtt.js → surface-C-jQaGnL.js} +1 -1
- package/dist/assets/{textMateThemeFromAppTheme-CDlKffWz.js → textMateThemeFromAppTheme-DlsTphbY.js} +1 -1
- package/dist/assets/tr-gaTrX_HK.js +11 -0
- package/dist/assets/uk-CnJF6ykl.js +20 -0
- package/dist/assets/{useAppFontEffects-DCqCVGlT.js → useAppFontEffects-DGlvOqP_.js} +194 -233
- package/dist/assets/useInlineCommentController-kMN4Wg_D.js +2 -0
- package/dist/assets/{useRootScrollLock-BowwS8kq.js → useRootScrollLock-DMPpvpNP.js} +2 -2
- package/dist/assets/{vendor-base-ui-DX96QhTP.js → vendor-base-ui-Det7U81h.js} +1 -1
- package/dist/assets/{vendor-codemirror-autocomplete-DW1FQz9_.js → vendor-codemirror-autocomplete-BSHQHbKu.js} +1 -1
- package/dist/assets/{vendor-codemirror-commands-DpmhalwN.js → vendor-codemirror-commands-C4G_dPWe.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-angular-BqExbN1M.js → vendor-codemirror-lang-angular-B6LbBGHB.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-cpp-DZA36HfS.js → vendor-codemirror-lang-cpp-BWWXBx7W.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-css-B07blnnZ.js → vendor-codemirror-lang-css-Cayfb29q.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-go-BM8K9D1-.js → vendor-codemirror-lang-go-BoKlCNKw.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-html-DaH9adfE.js → vendor-codemirror-lang-html-BQWerHsJ.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-java-CsdC0viz.js → vendor-codemirror-lang-java-DWX7Fq_K.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-javascript-CpGYXGuo.js → vendor-codemirror-lang-javascript-DbpEcZM0.js} +2 -2
- package/dist/assets/{vendor-codemirror-lang-jinja-BBeGzXw5.js → vendor-codemirror-lang-jinja-D1JIJRA7.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-json-58T70Hqs.js → vendor-codemirror-lang-json-BzgckzmB.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-less-BI-xCA59.js → vendor-codemirror-lang-less-B9EpDXFi.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-liquid-zEcMa-zy.js → vendor-codemirror-lang-liquid-9U7kRbSf.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-markdown-BLKnlLP4.js → vendor-codemirror-lang-markdown-D2TEBIvZ.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-php-9f35M83-.js → vendor-codemirror-lang-php-BT6sDVzE.js} +1 -1
- package/dist/assets/vendor-codemirror-lang-python-jAMtYiA9.js +3 -0
- package/dist/assets/{vendor-codemirror-lang-rust-MNDL_jZQ.js → vendor-codemirror-lang-rust-CVO56EiL.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-sass-p9epsSNm.js → vendor-codemirror-lang-sass-DZlOoUWu.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-sql-Bqzh0EXX.js → vendor-codemirror-lang-sql-fZ6t1DPw.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-vue-BnNUWV-p.js → vendor-codemirror-lang-vue-DxbqrLiE.js} +1 -1
- package/dist/assets/{vendor-codemirror-lang-wast-C2a-oLmk.js → vendor-codemirror-lang-wast-DyU1Gt-I.js} +1 -1
- package/dist/assets/vendor-codemirror-lang-xml-C9a_K5_p.js +1 -0
- package/dist/assets/{vendor-codemirror-lang-yaml-C0sjswB0.js → vendor-codemirror-lang-yaml-Cptq8l0e.js} +1 -1
- package/dist/assets/{vendor-codemirror-language-ByBn5zIW.js → vendor-codemirror-language-DufXoQvE.js} +2 -2
- package/dist/assets/vendor-codemirror-language-data-CtwSWKtX.js +2 -0
- package/dist/assets/{vendor-codemirror-search-ib-sHD5W.js → vendor-codemirror-search-CvXM_pZg.js} +1 -1
- package/dist/assets/{vendor-codemirror-state-G3UuR-be.js → vendor-codemirror-state-Dek9sMtw.js} +1 -1
- package/dist/assets/{vendor-codemirror-view-Bniqp7p5.js → vendor-codemirror-view-1e0FQ6Wn.js} +1 -1
- package/dist/assets/vendor-framer-motion-DxDVhOLc.js +9 -0
- package/dist/assets/vendor-katex-CuQvj9-L.js +257 -0
- package/dist/assets/vendor-katex-DdZNUVNG.css +1 -0
- package/dist/assets/{vendor-motion-dom-DcCgeG69.js → vendor-motion-dom-HXPOMxb7.js} +1 -1
- package/dist/assets/{vendor-opencode-client-DHzhmLwV.js → vendor-opencode-client-BmFcUkbQ.js} +1 -1
- package/dist/assets/{vendor-replit-codemirror-vim-DkzqxN2H.js → vendor-replit-codemirror-vim-BlJRn-cW.js} +2 -2
- package/dist/assets/{vendor-tanstack-react-virtual-H_JmXOFV.js → vendor-tanstack-react-virtual-CvuLsk7D.js} +1 -1
- package/dist/assets/{vendor-tanstack-virtual-core-Dxc8hSTB.js → vendor-tanstack-virtual-core-DPaNcJcT.js} +1 -1
- package/dist/assets/zh-CN-t2vigSB1.js +20 -0
- package/dist/assets/zh-TW-jAgqBokB.js +20 -0
- package/dist/index.html +6 -6
- package/dist/mini-chat.html +6 -6
- package/dist/mobile.html +6 -6
- package/package.json +8 -5
- package/server/index.js +80 -36
- package/server/lib/agent-memory/actions.js +1 -6
- package/server/lib/agent-memory/routes.js +1 -2
- package/server/lib/agent-memory/runtime.js +1 -8
- package/server/lib/agent-tool/DOCUMENTATION.md +7 -3
- package/server/lib/agent-tool/runtime.js +3 -6
- package/server/lib/agent-tool/runtime.test.js +0 -2
- package/server/lib/browser-control/DOCUMENTATION.md +6 -0
- package/server/lib/changelog/update-notes.js +1 -1
- package/server/lib/context-obligatory/runtime.js +1 -2
- package/server/lib/dev-tunnel/DOCUMENTATION.md +8 -0
- package/server/lib/dev-tunnel/client.js +21 -10
- package/server/lib/dev-tunnel/tunnel.test.js +34 -0
- package/server/lib/dispatch-results/runtime.js +1 -1
- package/server/lib/enterprise-mode.d.ts +1 -0
- package/server/lib/enterprise-mode.js +13 -2
- package/server/lib/enterprise-mode.test.js +21 -0
- package/server/lib/event-stream/DOCUMENTATION.md +2 -2
- package/server/lib/event-stream/index.js +1 -3
- package/server/lib/event-stream/translate-v2.js +1 -9
- package/server/lib/event-stream/translate-v2.test.js +0 -11
- package/server/lib/fs/DOCUMENTATION.md +5 -2
- package/server/lib/fs/routes.js +62 -15
- package/server/lib/fs/routes.test.js +278 -48
- package/server/lib/fs/workspace-file-names.js +104 -0
- package/server/lib/fs/workspace-file-names.test.js +62 -0
- package/server/lib/git/DOCUMENTATION.md +17 -5
- package/server/lib/git/contributor-provenance-storage.js +9 -6
- package/server/lib/git/contributor-provenance-storage.test.js +29 -0
- package/server/lib/git/credential-broker.js +1 -1
- package/server/lib/git/credential-resolver.js +1 -4
- package/server/lib/git/credentials.js +1 -0
- package/server/lib/git/discovery-endpoint.js +1 -1
- package/server/lib/git/identity-provisioning.js +2 -1
- package/server/lib/git/identity-storage.js +3 -4
- package/server/lib/git/lfs-discovery.js +14 -14
- package/server/lib/git/lfs-discovery.test.js +16 -6
- package/server/lib/git/network-operation-plan.js +50 -62
- package/server/lib/git/network-operation-plan.test.js +103 -1
- package/server/lib/git/network-operation-registry.js +4 -6
- package/server/lib/git/network-operation-storage.js +4 -6
- package/server/lib/git/network-operations.js +12 -4
- package/server/lib/git/network-operations.test.js +19 -6
- package/server/lib/git/redaction.js +2 -1
- package/server/lib/git/repository-credential-runtime.js +5 -3
- package/server/lib/git/repository-credential-runtime.test.js +22 -0
- package/server/lib/git/routes.js +31 -137
- package/server/lib/git/routes.test.js +2 -2
- package/server/lib/git/service.js +143 -27
- package/server/lib/git/service.test.js +215 -1
- package/server/lib/git/ssh-credential-storage.js +1 -4
- package/server/lib/git/submodule-discovery.js +1 -1
- package/server/lib/git/worktree-bootstrap-storage.js +3 -4
- package/server/lib/git/worktree-bootstrap-storage.test.js +15 -0
- package/server/lib/git/worktree-creation.js +194 -0
- package/server/lib/git/worktree-creation.test.js +155 -0
- package/server/lib/github/DOCUMENTATION.md +11 -6
- package/server/lib/github/auth.js +2 -4
- package/server/lib/github/device-flow.js +2 -2
- package/server/lib/github/gh-cli-credential.js +1 -0
- package/server/lib/github/octokit.js +31 -0
- package/server/lib/github/pr-status.js +35 -18
- package/server/lib/github/pr-status.test.js +271 -3
- package/server/lib/github/reference-search.js +102 -13
- package/server/lib/github/reference-search.test.js +48 -7
- package/server/lib/github/routes.auth.test.js +18 -0
- package/server/lib/github/routes.js +360 -6
- package/server/lib/github/routes.mutations.test.js +239 -0
- package/server/lib/github/routes.test.js +134 -2
- package/server/lib/gitlab/DOCUMENTATION.md +5 -1
- package/server/lib/gitlab/auth-storage.test.js +1 -0
- package/server/lib/gitlab/mappers.js +30 -1
- package/server/lib/gitlab/resources.js +230 -6
- package/server/lib/gitlab/resources.test.js +179 -0
- package/server/lib/gitlab/routes.js +200 -6
- package/server/lib/gitlab/routes.test.js +186 -2
- package/server/lib/gitlab/validation.js +1 -5
- package/server/lib/guests/DOCUMENTATION.md +1 -1
- package/server/lib/guests/oauth.js +2 -2
- package/server/lib/guests/service.js +1 -1
- package/server/lib/guests/sockets.js +1 -1
- package/server/lib/injected-env.d.ts +8 -0
- package/server/lib/injected-env.js +50 -0
- package/server/lib/injected-env.test.js +56 -0
- package/server/lib/linear/DOCUMENTATION.md +5 -6
- package/server/lib/linear/issues.js +62 -4
- package/server/lib/linear/issues.test.js +68 -0
- package/server/lib/linear/oauth.js +5 -5
- package/server/lib/linear/parse.js +2 -9
- package/server/lib/message-queue/DOCUMENTATION.md +23 -1
- package/server/lib/message-queue/runtime.js +85 -12
- package/server/lib/message-queue/runtime.test.js +172 -2
- package/server/lib/notifications/apns-runtime.js +5 -6
- package/server/lib/notifications/apns-runtime.test.js +20 -4
- package/server/lib/openchamber-control/DOCUMENTATION.md +19 -1
- package/server/lib/openchamber-control/actions.js +2 -1
- package/server/lib/openchamber-control/service.js +119 -20
- package/server/lib/openchamber-control/service.test.js +166 -0
- package/server/lib/openchamber-sessions/archive-store.js +1 -6
- package/server/lib/openchamber-sessions/routes.js +47 -12
- package/server/lib/openchamber-sessions/routes.test.js +65 -2
- package/server/lib/openchamber-sessions/session-metadata-store.js +1 -6
- package/server/lib/opencode/DOCUMENTATION.md +22 -8
- package/server/lib/opencode/agents.js +62 -0
- package/server/lib/opencode/auth-state-runtime.js +3 -1
- package/server/lib/opencode/auth.d.ts +1 -1
- package/server/lib/opencode/auth.js +8 -0
- package/server/lib/opencode/auth.test.js +31 -0
- package/server/lib/opencode/config-entity-routes.js +16 -0
- package/server/lib/opencode/config-entity-v2.test.js +16 -1
- package/server/lib/opencode/config-paths.test.js +2 -2
- package/server/lib/opencode/config-v2.js +2 -4
- package/server/lib/opencode/feature-routes-runtime.js +89 -49
- package/server/lib/opencode/lifecycle.js +41 -21
- package/server/lib/opencode/lifecycle.test.js +50 -2
- package/server/lib/opencode/model-discovery.js +1 -1
- package/server/lib/opencode/model-discovery.test.js +17 -0
- package/server/lib/opencode/models-metadata.js +0 -2
- package/server/lib/opencode/openchamber-routes.test.js +3 -3
- package/server/lib/opencode/plugins.js +6 -9
- package/server/lib/opencode/provider-source-route.test.js +101 -3
- package/server/lib/opencode/providers-disabled.test.js +59 -0
- package/server/lib/opencode/providers.js +34 -0
- package/server/lib/opencode/proxy.js +11 -3
- package/server/lib/opencode/routes.js +40 -2
- package/server/lib/opencode/settings-helpers.js +27 -1
- package/server/lib/opencode/settings-helpers.test.js +19 -7
- package/server/lib/opencode/settings-registry.json +27 -16
- package/server/lib/opencode/settings-runtime.test.js +18 -0
- package/server/lib/opencode/shared-service-runtime.js +23 -104
- package/server/lib/opencode/shared.js +77 -46
- package/server/lib/opencode/shared.test.js +12 -12
- package/server/lib/opencode/shutdown-runtime.test.js +2 -3
- package/server/lib/opencode/skill-routes.js +123 -38
- package/server/lib/opencode/skill-routes.test.js +201 -0
- package/server/lib/opencode/skills.js +81 -34
- package/server/lib/opencode/skills.test.js +176 -21
- package/server/lib/opencode/startup-pipeline-runtime.js +6 -3
- package/server/lib/opencode/startup-pipeline-runtime.test.js +2 -1
- package/server/lib/opencode/watcher.test.js +0 -54
- package/server/lib/outbound-proxy.js +52 -0
- package/server/lib/outbound-proxy.test.js +55 -0
- package/server/lib/package-manager.js +23 -17
- package/server/lib/package-manager.test.js +5 -18
- package/server/lib/permission-auto-accept/DOCUMENTATION.md +1 -1
- package/server/lib/permission-auto-accept/runtime.js +19 -47
- package/server/lib/permission-auto-accept/runtime.test.js +2 -2
- package/server/lib/project-context/DOCUMENTATION.md +7 -1
- package/server/lib/project-context/routes.js +1 -2
- package/server/lib/project-context/runtime.js +12 -14
- package/server/lib/project-context/runtime.test.js +78 -2
- package/server/lib/projects/project-config.js +30 -15
- package/server/lib/projects/project-config.test.js +30 -0
- package/server/lib/projects/project-setup.js +1 -2
- package/server/lib/projects/routes.js +1 -2
- package/server/lib/quota/DOCUMENTATION.md +35 -7
- package/server/lib/quota/index.js +1 -0
- package/server/lib/quota/providers/claude/index.js +1 -1
- package/server/lib/quota/providers/cline-pass.js +1 -1
- package/server/lib/quota/providers/exe-dev.js +1 -1
- package/server/lib/quota/providers/google/index.js +1 -1
- package/server/lib/quota/providers/hyper.js +1 -1
- package/server/lib/quota/providers/kimi.js +116 -36
- package/server/lib/quota/providers/kimi.test.js +128 -3
- package/server/lib/quota/providers/opencode-go.js +144 -21
- package/server/lib/quota/providers/opencode-go.test.js +229 -6
- package/server/lib/quota/providers/openrouter.js +1 -1
- package/server/lib/quota/providers/zenmux.js +1 -1
- package/server/lib/quota/utils/auth.js +1 -0
- package/server/lib/quota/utils/transformers.js +2 -6
- package/server/lib/relay/DOCUMENTATION.md +18 -3
- package/server/lib/relay/e2ee.js +7 -7
- package/server/lib/relay/host-client.js +84 -13
- package/server/lib/relay/host-client.test.js +201 -1
- package/server/lib/relay/identity.js +6 -29
- package/server/lib/relay/identity.test.js +18 -28
- package/server/lib/relay/key-store.js +141 -0
- package/server/lib/relay/key-store.test.js +138 -0
- package/server/lib/relay/service.js +8 -8
- package/server/lib/relay/service.test.js +10 -5
- package/server/lib/relay/signing-key.js +13 -36
- package/server/lib/relay/tunnel-codec.js +10 -10
- package/server/lib/route-module-exports.test.js +22 -0
- package/server/lib/routing/DOCUMENTATION.md +23 -3
- package/server/lib/routing/cache.js +87 -0
- package/server/lib/routing/defaults.js +11 -0
- package/server/lib/routing/history.js +12 -4
- package/server/lib/routing/runtime.js +39 -3
- package/server/lib/routing/runtime.test.js +81 -2
- package/server/lib/routing/store.js +12 -1
- package/server/lib/routing/store.test.js +13 -0
- package/server/lib/scheduled-tasks/DOCUMENTATION.md +59 -1
- package/server/lib/scheduled-tasks/existing-session.js +119 -0
- package/server/lib/scheduled-tasks/existing-session.test.js +350 -0
- package/server/lib/scheduled-tasks/loops.js +1 -8
- package/server/lib/scheduled-tasks/routes.js +8 -8
- package/server/lib/scheduled-tasks/runtime.js +103 -13
- package/server/lib/scheduled-tasks/runtime.test.js +48 -0
- package/server/lib/scheduled-tasks/service.js +33 -11
- package/server/lib/scheduled-tasks/service.test.js +128 -2
- package/server/lib/scheduled-tasks/session-defaults.js +27 -0
- package/server/lib/scheduled-tasks/session-defaults.test.js +19 -0
- package/server/lib/session-assist/context.js +1 -0
- package/server/lib/session-folders/routes.js +2 -2
- package/server/lib/session-goal/objectives.js +1 -1
- package/server/lib/session-knowledge/routes.js +2 -2
- package/server/lib/session-knowledge/runtime.js +1 -2
- package/server/lib/session-work/DOCUMENTATION.md +39 -14
- package/server/lib/session-work/questions.js +31 -2
- package/server/lib/session-work/runtime.js +22 -13
- package/server/lib/session-work/runtime.test.js +43 -26
- package/server/lib/session-work/state.js +10 -4
- package/server/lib/session-work/state.test.js +8 -1
- package/server/lib/shared/DOCUMENTATION.md +89 -0
- package/server/lib/shared/guards.js +53 -0
- package/server/lib/shared/guards.test.js +112 -0
- package/server/lib/skills-catalog/DOCUMENTATION.md +10 -8
- package/server/lib/skills-catalog/cache.js +3 -2
- package/server/lib/skills-catalog/curated-sources.js +5 -1
- package/server/lib/skills-catalog/git.js +107 -20
- package/server/lib/skills-catalog/git.test.js +78 -0
- package/server/lib/skills-catalog/install.js +21 -12
- package/server/lib/skills-catalog/scan.js +25 -15
- package/server/lib/skills-catalog/source.js +26 -1
- package/server/lib/skills-catalog/source.test.js +27 -0
- package/server/lib/source-control/DOCUMENTATION.md +2 -1
- package/server/lib/source-control/audit-storage.js +7 -6
- package/server/lib/source-control/audit-storage.test.js +11 -0
- package/server/lib/source-control/binding-service.js +2 -5
- package/server/lib/source-control/change-request-worktree.js +90 -0
- package/server/lib/source-control/change-request-worktree.test.js +121 -0
- package/server/lib/source-control/mutation-executor.js +1 -1
- package/server/lib/source-control/mutation-storage.js +11 -5
- package/server/lib/source-control/provider-instance.js +1 -2
- package/server/lib/source-control/repository-identity.js +1 -1
- package/server/lib/source-control/routes.js +14 -2
- package/server/lib/spaces/DOCUMENTATION.md +42 -17
- package/server/lib/spaces/command-stream.test.js +15 -0
- package/server/lib/spaces/dispatcher.js +7 -0
- package/server/lib/spaces/dispatcher.test.js +17 -0
- package/server/lib/spaces/hardening.js +2 -2
- package/server/lib/spaces/hardening.test.js +1 -1
- package/server/lib/spaces/host.js +2 -0
- package/server/lib/spaces/journey.js +66 -5
- package/server/lib/spaces/journey.test.js +95 -4
- package/server/lib/spaces/layout.js +1 -1
- package/server/lib/spaces/places/docker-disk.js +38 -14
- package/server/lib/spaces/places/docker-disk.test.js +80 -1
- package/server/lib/spaces/places/docker.js +35 -11
- package/server/lib/spaces/places/fake-docker.js +22 -3
- package/server/lib/spaces/places/memory-place.js +3 -0
- package/server/lib/spaces/places/packed.docker.live.test.js +1 -1
- package/server/lib/spaces/routes.js +5 -0
- package/server/lib/spaces/routes.test.js +4 -2
- package/server/lib/spaces/run-command.js +9 -2
- package/server/lib/spaces/tools.js +4 -5
- package/server/lib/spaces/tools.test.js +2 -2
- package/server/lib/terminal/runtime.js +18 -6
- package/server/lib/terminal/runtime.test.js +66 -0
- package/server/lib/tts/index.js +3 -0
- package/server/lib/tts/service.js +4 -2
- package/server/lib/walkthrough/DOCUMENTATION.md +3 -1
- package/server/lib/walkthrough/index.js +2 -3
- package/server/lib/walkthrough/pr-source.test.js +22 -0
- package/server/lib/walkthrough/sources.js +6 -1
- package/server/opencode-proxy.test.js +127 -0
- package/bin/lib/commands-startup.test.js +0 -15
- package/dist/assets/CodeMirrorCommentWidgets-CVDSjcrP.js +0 -1
- package/dist/assets/DiffView-Ct7vL3fD.js +0 -4
- package/dist/assets/FilesView-DT0uEYgT.js +0 -17
- package/dist/assets/GuestSurfacePane-DVvk1VPu.js +0 -1
- package/dist/assets/LinearIssuesView-C10MwA9h.js +0 -1
- package/dist/assets/MarkdownImageGallery-BbN_K_3d.js +0 -1
- package/dist/assets/MarkdownRendererImpl-BLt2Tkk9.js +0 -10
- package/dist/assets/OnboardingScreen-Bgp5A3WB.js +0 -1
- package/dist/assets/PierreDiffViewer-CWJLj-S-.js +0 -210
- package/dist/assets/PlanView-DsRWnsOI.js +0 -5
- package/dist/assets/PublishDialog-CCeKloRu.js +0 -2
- package/dist/assets/SettingsView-BuPPsNPp.js +0 -30
- package/dist/assets/SettingsWindow-CM5fL8Ot.js +0 -1
- package/dist/assets/SubmoduleDiffSummary-CfsMcfiQ.js +0 -1
- package/dist/assets/ToolOutputDialog-mZrfSofz.js +0 -15
- package/dist/assets/ToolPartDiffPreview-BUGCRYEL.js +0 -8
- package/dist/assets/WalkthroughView-ClBo7PPd.js +0 -4
- package/dist/assets/appThemeRegistry-CxzMxR-H.js +0 -1
- package/dist/assets/de-CBla4hjd.js +0 -14
- package/dist/assets/es-BmnZtxTD.js +0 -20
- package/dist/assets/fileTreeStatus-BSHFIGEg.js +0 -1
- package/dist/assets/fr-OVKIBUZO.js +0 -18
- package/dist/assets/index-CKCFKmjF.js +0 -1
- package/dist/assets/index-Dbx4V4GN.css +0 -1
- package/dist/assets/index-vQ1Pg1cr.js +0 -61
- package/dist/assets/ja-6v-yr-gE.js +0 -20
- package/dist/assets/ko-I_ZLvgQ9.js +0 -20
- package/dist/assets/main-CmO4dRtR.js +0 -2
- package/dist/assets/main-b9vqhlYM.js +0 -999
- package/dist/assets/markdownCore-BPEZRQfP.js +0 -7
- package/dist/assets/miniChat-B5Oi7B-6.js +0 -2
- package/dist/assets/mobile-CVtShif9.js +0 -2
- package/dist/assets/nl-DcvIJf46.js +0 -20
- package/dist/assets/patchFileDiff-CW3wCH1O.js +0 -13
- package/dist/assets/pl-JxCUl0sd.js +0 -20
- package/dist/assets/pt-BR-L89mjja2.js +0 -20
- package/dist/assets/relocateRestoredSession-DYh_9oBa.js +0 -1
- package/dist/assets/renderElectronMiniChatApp-BD-1JHSg.js +0 -2
- package/dist/assets/renderMobileApp-7s5InXt1.js +0 -25
- package/dist/assets/runtimeEndpointReset-DqLJC6L1.js +0 -53
- package/dist/assets/shikiHighlight-CXgZnvHh.js +0 -1
- package/dist/assets/space-apply-1trGVIl8.js +0 -1
- package/dist/assets/space-close-y7j-NuBv.js +0 -1
- package/dist/assets/tr-ka5J1flt.js +0 -11
- package/dist/assets/uk-PyGe6Q_u.js +0 -20
- package/dist/assets/useInlineCommentController-CrjSGCpi.js +0 -2
- package/dist/assets/vendor-codemirror-lang-python-B7ClrMIT.js +0 -3
- package/dist/assets/vendor-codemirror-lang-xml-C8tGnS64.js +0 -1
- package/dist/assets/vendor-codemirror-language-data-q2bKO1EM.js +0 -2
- package/dist/assets/vendor-framer-motion-Bq3iTZ6r.js +0 -1
- package/dist/assets/vendor-katex-CHD9BdDO.js +0 -257
- package/dist/assets/vendor-katex-Cp579UoJ.css +0 -1
- package/dist/assets/zh-CN-B0P2tybJ.js +0 -20
- package/dist/assets/zh-TW-Bs9C5cN8.js +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,math,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.19.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .katex-vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .katex-thinbox{display:inline-flex;flex-direction:row;max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.katex-root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .katex-stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .reflectbox{display:inline-block;transform:scaleX(-1)}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as _,n as ht,c as X,p as ye,m as K,v as Us,s as $,i as Ks,a as ge,b as rn,e as je,d as on,f as Ws,h as an,j as ln,k as cn,l as un,o as $s,S as Te,q as zs,t as _s,u as hn,w as Xs,r as Gt}from"./vendor-motion-utils-BGh8QBgx.js";const Vt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fn(t,e){let s=new Set,i=new Set,n=!1,a=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),t()),u(o)}const c={schedule:(u,h=!1,f=!1)=>{const m=f&&n?s:i;return h&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{i.delete(u),r.delete(u)},process:u=>{if(o=u,n){a=!0;return}n=!0,[s,i]=[i,s],s.forEach(l),s.clear(),n=!1,a&&(a=!1,c.process(u))}};return c}const dn=40;function Ys(t,e){let s=!1,i=!0;const n={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,r=Vt.reduce((y,V)=>(y[V]=fn(a),y),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:m}=r,x=()=>{const y=_.useManualTiming?n.timestamp:performance.now();s=!1,_.useManualTiming||(n.delta=i?1e3/60:Math.max(Math.min(y-n.timestamp,dn),1)),n.timestamp=y,n.isProcessing=!0,o.process(n),l.process(n),c.process(n),u.process(n),h.process(n),f.process(n),d.process(n),m.process(n),n.isProcessing=!1,s&&e&&(i=!1,t(x))},T=()=>{s=!0,i=!0,n.isProcessing||t(x)};return{schedule:Vt.reduce((y,V)=>{const v=r[V];return y[V]=(S,D=!1,b=!1)=>(s||T(),v.schedule(S,D,b)),y},{}),cancel:y=>{for(let V=0;V<Vt.length;V++)r[Vt[V]].cancel(y)},state:n,steps:r}}const{schedule:E,cancel:et,state:B,steps:It}=Ys(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0);let wt;function pn(){wt=void 0}const k={now:()=>(wt===void 0&&k.set(B.isProcessing||_.useManualTiming?B.timestamp:performance.now()),wt),set:t=>{wt=t,queueMicrotask(pn)}},Hs=t=>e=>typeof e=="string"&&e.startsWith(t),Gs=Hs("--"),mn=Hs("var(--"),ve=t=>mn(t)?yn.test(t.split("/*")[0].trim()):!1,yn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ne(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const ft={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},xt={...ft,transform:t=>X(0,1,t)},St={...ft,default:1},gt=t=>Math.round(t*1e5)/1e5,xe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gn(t){return t==null}const Tn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ae=(t,e)=>s=>!!(typeof s=="string"&&Tn.test(s)&&s.startsWith(t)||e&&!gn(s)&&Object.prototype.hasOwnProperty.call(s,e)),qs=(t,e,s)=>i=>{if(typeof i!="string")return i;const[n,a,r,o]=i.match(xe);return{[t]:parseFloat(n),[e]:parseFloat(a),[s]:parseFloat(r),alpha:o!==void 0?parseFloat(o):1}},vn=t=>X(0,255,t),Ot={...ft,transform:t=>Math.round(vn(t))},J={test:Ae("rgb","red"),parse:qs("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:i=1})=>"rgba("+Ot.transform(t)+", "+Ot.transform(e)+", "+Ot.transform(s)+", "+gt(xt.transform(i))+")"};function xn(t){let e="",s="",i="",n="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),i=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),i=t.substring(3,4),n=t.substring(4,5),e+=e,s+=s,i+=i,n+=n),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}}const qt={test:Ae("#"),parse:xn,transform:J.transform},bt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=bt("deg"),z=bt("%"),p=bt("px"),An=bt("vh"),bn=bt("vw"),Ue={...z,parse:t=>z.parse(t)/100,transform:t=>z.transform(t*100)},nt={test:Ae("hsl","hue"),parse:qs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:i=1})=>"hsla("+Math.round(t)+", "+z.transform(gt(e))+", "+z.transform(gt(s))+", "+gt(xt.transform(i))+")"},P={test:t=>J.test(t)||qt.test(t)||nt.test(t),parse:t=>J.test(t)?J.parse(t):nt.test(t)?nt.parse(t):qt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?J.transform(t):nt.transform(t),getAnimatableNone:t=>{const e=P.parse(t);return e.alpha=0,P.transform(e)}},Vn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sn(t){return isNaN(t)&&typeof t=="string"&&(t.match(xe)?.length||0)+(t.match(Vn)?.length||0)>0}const Zs="number",Js="color",wn="var",Pn="var(",Ke="${}",Dn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function At(t){const e=t.toString(),s=[],i={color:[],number:[],var:[]},n=[];let a=0;const o=e.replace(Dn,l=>(P.test(l)?(i.color.push(a),n.push(Js),s.push(P.parse(l))):l.startsWith(Pn)?(i.var.push(a),n.push(wn),s.push(l)):(i.number.push(a),n.push(Zs),s.push(parseFloat(l))),++a,Ke)).split(Ke);return{values:s,split:o,indexes:i,types:n}}function Qs(t){return At(t).values}function ti(t){const{split:e,types:s}=At(t),i=e.length;return n=>{let a="";for(let r=0;r<i;r++)if(a+=e[r],n[r]!==void 0){const o=s[r];o===Zs?a+=gt(n[r]):o===Js?a+=P.transform(n[r]):a+=n[r]}return a}}const Rn=t=>typeof t=="number"?0:P.test(t)?P.getAnimatableNone(t):t;function Mn(t){const e=Qs(t);return ti(t)(e.map(Rn))}const W={test:Sn,parse:Qs,createTransformer:ti,getAnimatableNone:Mn};function jt(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function Cn({hue:t,saturation:e,lightness:s,alpha:i}){t/=360,e/=100,s/=100;let n=0,a=0,r=0;if(!e)n=a=r=s;else{const o=s<.5?s*(1+e):s+e-s*e,l=2*s-o;n=jt(l,o,t+1/3),a=jt(l,o,t),r=jt(l,o,t-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(r*255),alpha:i}}function Ct(t,e){return s=>s>0?e:t}const M=(t,e,s)=>t+(e-t)*s,Nt=(t,e,s)=>{const i=t*t,n=s*(e*e-i)+i;return n<0?0:Math.sqrt(n)},Bn=[qt,J,nt],En=t=>Bn.find(e=>e.test(t));function We(t){const e=En(t);if(!e)return!1;let s=e.parse(t);return e===nt&&(s=Cn(s)),s}const $e=(t,e)=>{const s=We(t),i=We(e);if(!s||!i)return Ct(t,e);const n={...s};return a=>(n.red=Nt(s.red,i.red,a),n.green=Nt(s.green,i.green,a),n.blue=Nt(s.blue,i.blue,a),n.alpha=M(s.alpha,i.alpha,a),J.transform(n))},Zt=new Set(["none","hidden"]);function kn(t,e){return Zt.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function Fn(t,e){return s=>M(t,e,s)}function be(t){return typeof t=="number"?Fn:typeof t=="string"?ve(t)?Ct:P.test(t)?$e:On:Array.isArray(t)?ei:typeof t=="object"?P.test(t)?$e:Ln:Ct}function ei(t,e){const s=[...t],i=s.length,n=t.map((a,r)=>be(a)(a,e[r]));return a=>{for(let r=0;r<i;r++)s[r]=n[r](a);return s}}function Ln(t,e){const s={...t,...e},i={};for(const n in s)t[n]!==void 0&&e[n]!==void 0&&(i[n]=be(t[n])(t[n],e[n]));return n=>{for(const a in i)s[a]=i[a](n);return s}}function In(t,e){const s=[],i={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){const a=e.types[n],r=t.indexes[a][i[a]],o=t.values[r]??0;s[n]=o,i[a]++}return s}const On=(t,e)=>{const s=W.createTransformer(e),i=At(t),n=At(e);return i.indexes.var.length===n.indexes.var.length&&i.indexes.color.length===n.indexes.color.length&&i.indexes.number.length>=n.indexes.number.length?Zt.has(t)&&!n.values.length||Zt.has(e)&&!i.values.length?kn(t,e):ye(ei(In(i,n),n.values),s):Ct(t,e)};function si(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?M(t,e,s):be(t)(t,e)}const jn=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>E.update(e,s),stop:()=>et(e),now:()=>B.isProcessing?B.timestamp:k.now()}},ii=(t,e,s=10)=>{let i="";const n=Math.max(Math.round(e/s),2);for(let a=0;a<n;a++)i+=Math.round(t(a/(n-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Bt=2e4;function Ve(t){let e=0;const s=50;let i=t.next(e);for(;!i.done&&e<Bt;)e+=s,i=t.next(e);return e>=Bt?1/0:e}function Nn(t,e=100,s){const i=s({...t,keyframes:[0,e]}),n=Math.min(Ve(i),Bt);return{type:"keyframes",ease:a=>i.next(n*a).value/e,duration:K(n)}}const Un=5;function ni(t,e,s){const i=Math.max(e-Un,0);return Us(s-t(i),e-i)}const w={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ut=.001;function Kn({duration:t=w.duration,bounce:e=w.bounce,velocity:s=w.velocity,mass:i=w.mass}){let n,a,r=1-e;r=X(w.minDamping,w.maxDamping,r),t=X(w.minDuration,w.maxDuration,K(t)),r<1?(n=c=>{const u=c*r,h=u*t,f=u-s,d=Jt(c,r),m=Math.exp(-h);return Ut-f/d*m},a=c=>{const h=c*r*t,f=h*s+s,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),x=Jt(Math.pow(c,2),r);return(-n(c)+Ut>0?-1:1)*((f-d)*m)/x}):(n=c=>{const u=Math.exp(-c*t),h=(c-s)*t+1;return-Ut+u*h},a=c=>{const u=Math.exp(-c*t),h=(s-c)*(t*t);return u*h});const o=5/t,l=$n(n,a,o);if(t=$(t),isNaN(l))return{stiffness:w.stiffness,damping:w.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:t}}}const Wn=12;function $n(t,e,s){let i=s;for(let n=1;n<Wn;n++)i=i-t(i)/e(i);return i}function Jt(t,e){return t*Math.sqrt(1-e*e)}const zn=["duration","bounce"],_n=["stiffness","damping","mass"];function ze(t,e){return e.some(s=>t[s]!==void 0)}function Xn(t){let e={velocity:w.velocity,stiffness:w.stiffness,damping:w.damping,mass:w.mass,isResolvedFromDuration:!1,...t};if(!ze(t,_n)&&ze(t,zn))if(e.velocity=0,t.visualDuration){const s=t.visualDuration,i=2*Math.PI/(s*1.2),n=i*i,a=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:w.mass,stiffness:n,damping:a}}else{const s=Kn({...t,velocity:0});e={...e,...s,mass:w.mass},e.isResolvedFromDuration=!0}return e}function Et(t=w.visualDuration,e=w.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:n}=s;const a=s.keyframes[0],r=s.keyframes[s.keyframes.length-1],o={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=Xn({...s,velocity:-K(s.velocity||0)}),m=f||0,x=c/(2*Math.sqrt(l*u)),T=r-a,g=K(Math.sqrt(l/u)),A=Math.abs(T)<5;i||(i=A?w.restSpeed.granular:w.restSpeed.default),n||(n=A?w.restDelta.granular:w.restDelta.default);let y;if(x<1){const v=Jt(g,x);y=S=>{const D=Math.exp(-x*g*S);return r-D*((m+x*g*T)/v*Math.sin(v*S)+T*Math.cos(v*S))}}else if(x===1)y=v=>r-Math.exp(-g*v)*(T+(m+g*T)*v);else{const v=g*Math.sqrt(x*x-1);y=S=>{const D=Math.exp(-x*g*S),b=Math.min(v*S,300);return r-D*((m+x*g*T)*Math.sinh(b)+v*T*Math.cosh(b))/v}}const V={calculatedDuration:d&&h||null,next:v=>{const S=y(v);if(d)o.done=v>=h;else{let D=v===0?m:0;x<1&&(D=v===0?$(m):ni(y,v,S));const b=Math.abs(D)<=i,F=Math.abs(r-S)<=n;o.done=b&&F}return o.value=o.done?r:S,o},toString:()=>{const v=Math.min(Ve(V),Bt),S=ii(D=>V.next(v*D).value,v,30);return v+"ms "+S},toTransition:()=>{}};return V}Et.applyToOptions=t=>{const e=Nn(t,100,Et);return t.ease=e.ease,t.duration=$(e.duration),t.type="keyframes",t};function Qt({keyframes:t,velocity:e=0,power:s=.8,timeConstant:i=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:r,min:o,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=b=>o!==void 0&&b<o||l!==void 0&&b>l,m=b=>o===void 0?l:l===void 0||Math.abs(o-b)<Math.abs(l-b)?o:l;let x=s*e;const T=h+x,g=r===void 0?T:r(T);g!==T&&(x=g-h);const A=b=>-x*Math.exp(-b/i),y=b=>g+A(b),V=b=>{const F=A(b),I=y(b);f.done=Math.abs(F)<=c,f.value=f.done?g:I};let v,S;const D=b=>{d(f.value)&&(v=b,S=Et({keyframes:[f.value,m(f.value)],velocity:ni(y,b,f.value),damping:n,stiffness:a,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:b=>{let F=!1;return!S&&v===void 0&&(F=!0,V(b),D(b)),v!==void 0&&b>=v?S.next(b-v):(!F&&V(b),f)}}}function Yn(t,e,s){const i=[],n=s||_.mix||si,a=t.length-1;for(let r=0;r<a;r++){let o=n(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||ht:e;o=ye(l,o)}i.push(o)}return i}function Hn(t,e,{clamp:s=!0,ease:i,mixer:n}={}){const a=t.length;if(Ks(a===e.length),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Yn(e,i,n),l=o.length,c=u=>{if(r&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=ge(t[h],t[h+1],u);return o[h](f)};return s?u=>c(X(t[0],t[a-1],u)):c}function Gn(t,e){const s=t[t.length-1];for(let i=1;i<=e;i++){const n=ge(0,e,i);t.push(M(s,1,n))}}function qn(t){const e=[0];return Gn(e,t.length-1),e}function Zn(t,e){return t.map(s=>s*e)}function Jn(t,e){return t.map(()=>e||on).splice(0,t.length-1)}function Tt({duration:t=300,keyframes:e,times:s,ease:i="easeInOut"}){const n=rn(i)?i.map(je):je(i),a={done:!1,value:e[0]},r=Zn(s&&s.length===e.length?s:qn(e),t),o=Hn(r,e,{ease:Array.isArray(n)?n:Jn(e,n)});return{calculatedDuration:t,next:l=>(a.value=o(l),a.done=l>=t,a)}}const Qn=t=>t!==null;function Se(t,{repeat:e,repeatType:s="loop"},i,n=1){const a=t.filter(Qn),o=n<0||e&&s!=="loop"&&e%2===1?0:a.length-1;return!o||i===void 0?a[o]:i}const tr={decay:Qt,inertia:Qt,tween:Tt,keyframes:Tt,spring:Et};function ri(t){typeof t.type=="string"&&(t.type=tr[t.type])}class we{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const er=t=>t/100;class Pe extends we{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ri(e);const{type:s=Tt,repeat:i=0,repeatDelay:n=0,repeatType:a,velocity:r=0}=e;let{keyframes:o}=e;const l=s||Tt;l!==Tt&&typeof o[0]!="number"&&(this.mixKeyframes=ye(er,si(o[0],o[1])),o=[0,100]);const c=l({...e,keyframes:o});a==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...o].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ve(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=c}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:i,totalDuration:n,mixKeyframes:a,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:x,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,V=i;if(h){const b=Math.min(this.currentTime,n)/o;let F=Math.floor(b),I=b%1;!I&&b>=1&&(I=1),I===1&&F--,F=Math.min(F,h+1),F%2&&(f==="reverse"?(I=1-I,d&&(I-=d/o)):f==="mirror"&&(V=r)),y=X(0,1,I)*o}const v=A?{done:!1,value:u[0]}:V.next(y);a&&(v.value=a(v.value));let{done:S}=v;!A&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return D&&m!==Qt&&(v.value=Se(u,this.options,T,this.speed)),x&&x(v.value),D&&this.finish(),v}then(e,s){return this.finished.then(e,s)}get duration(){return K(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(this.currentTime)}set time(e){e=$(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(k.now());const s=this.playbackSpeed!==e;this.playbackSpeed=e,s&&(this.time=K(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=jn,startTime:s}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function sr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Q=t=>t*180/Math.PI,te=t=>{const e=Q(Math.atan2(t[1],t[0]));return ee(e)},ir={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:te,rotateZ:te,skewX:t=>Q(Math.atan(t[1])),skewY:t=>Q(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ee=t=>(t=t%360,t<0&&(t+=360),t),_e=te,Xe=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ye=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),nr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xe,scaleY:Ye,scale:t=>(Xe(t)+Ye(t))/2,rotateX:t=>ee(Q(Math.atan2(t[6],t[5]))),rotateY:t=>ee(Q(Math.atan2(-t[2],t[0]))),rotateZ:_e,rotate:_e,skewX:t=>Q(Math.atan(t[4])),skewY:t=>Q(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function se(t){return t.includes("scale")?1:0}function ie(t,e){if(!t||t==="none")return se(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,n;if(s)i=nr,n=s;else{const o=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ir,n=o}if(!n)return se(e);const a=i[e],r=n[1].split(",").map(or);return typeof a=="function"?a(r):r[a]}const rr=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return ie(s,e)};function or(t){return parseFloat(t.trim())}const dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pt=new Set(dt),He=t=>t===ft||t===p,ar=new Set(["x","y","z"]),lr=dt.filter(t=>!ar.has(t));function cr(t){const e=[];return lr.forEach(s=>{const i=t.getValue(s);i!==void 0&&(e.push([s,i.get()]),i.set(s.startsWith("scale")?1:0))}),e}const H={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ie(e,"x"),y:(t,{transform:e})=>ie(e,"y")};H.translateX=H.x;H.translateY=H.y;const tt=new Set;let ne=!1,re=!1,oe=!1;function oi(){if(re){const t=Array.from(tt).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),s=new Map;e.forEach(i=>{const n=cr(i);n.length&&(s.set(i,n),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const n=s.get(i);n&&n.forEach(([a,r])=>{i.getValue(a)?.set(r)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}re=!1,ne=!1,tt.forEach(t=>t.complete(oe)),tt.clear()}function ai(){tt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(re=!0)})}function ur(){oe=!0,ai(),oi(),oe=!1}class De{constructor(e,s,i,n,a,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=i,this.motionValue=n,this.element=a,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(tt.add(this),ne||(ne=!0,E.read(ai),E.resolveKeyframes(oi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:i,motionValue:n}=this;if(e[0]===null){const a=n?.get(),r=e[e.length-1];if(a!==void 0)e[0]=a;else if(i&&s){const o=i.readValue(s,r);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=r),n&&a===void 0&&n.set(e[0])}sr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),tt.delete(this)}cancel(){this.state==="scheduled"&&(tt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const hr=t=>t.startsWith("--");function fr(t,e,s){hr(e)?t.style.setProperty(e,s):t.style[e]=s}const dr={};function li(t,e){const s=Ws(t);return()=>dr[e]??s()}const pr=li(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ci=li(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yt=([t,e,s,i])=>`cubic-bezier(${t}, ${e}, ${s}, ${i})`,Ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function ui(t,e){if(t)return typeof t=="function"?ci()?ii(t,e):"ease-out":an(t)?yt(t):Array.isArray(t)?t.map(s=>ui(s,e)||Ge.easeOut):Ge[t]}function mr(t,e,s,{delay:i=0,duration:n=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:l}={},c=void 0){const u={[e]:s};l&&(u.offset=l);const h=ui(o,n);Array.isArray(h)&&(u.easing=h);const f={delay:i,duration:n,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function hi(t){return typeof t=="function"&&"applyToOptions"in t}function yr({type:t,...e}){return hi(t)&&ci()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class fi extends we{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:s,name:i,keyframes:n,pseudoElement:a,allowFlatten:r=!1,finalKeyframe:o,onComplete:l}=e;this.isPseudoElement=!!a,this.allowFlatten=r,this.options=e,Ks(typeof e.type!="string");const c=yr(e);this.animation=mr(s,i,n,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const u=Se(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(u):fr(s,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return K(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&pr()?(this.animation.timeline=e,ht):s(this)}}const di={anticipate:un,backInOut:cn,circInOut:ln};function gr(t){return t in di}function Tr(t){typeof t.ease=="string"&&gr(t.ease)&&(t.ease=di[t.ease])}const Kt=10;class vr extends fi{constructor(e){Tr(e),ri(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:s,onUpdate:i,onComplete:n,element:a,...r}=this.options;if(!s)return;if(e!==void 0){s.set(e);return}const o=new Pe({...r,autoplay:!1}),l=Math.max(Kt,k.now()-this.startTime),c=X(0,Kt,l-Kt);s.setWithVelocity(o.sample(Math.max(0,l-c)).value,o.sample(l).value,c),o.stop()}}const qe=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(W.test(t)||t==="0")&&!t.startsWith("url("));function xr(t){const e=t[0];if(t.length===1)return!0;for(let s=0;s<t.length;s++)if(t[s]!==e)return!0}function Ar(t,e,s,i){const n=t[0];if(n===null)return!1;if(e==="display"||e==="visibility")return!0;const a=t[t.length-1],r=qe(n,e),o=qe(a,e);return!r||!o?!1:xr(t)||(s==="spring"||hi(s))&&i}function ae(t){t.duration=0,t.type="keyframes"}const br=new Set(["opacity","clipPath","filter","transform"]),Vr=Ws(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Sr(t){const{motionValue:e,name:s,repeatDelay:i,repeatType:n,damping:a,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Vr()&&s&&br.has(s)&&(s!=="transform"||!c)&&!l&&!i&&n!=="mirror"&&a!==0&&r!=="inertia"}const wr=40;class Pr extends we{constructor({autoplay:e=!0,delay:s=0,type:i="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:r="loop",keyframes:o,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=k.now();const f={autoplay:e,delay:s,type:i,repeat:n,repeatDelay:a,repeatType:r,name:l,motionValue:c,element:u,...h},d=u?.KeyframeResolver||De;this.keyframeResolver=new d(o,(m,x,T)=>this.onKeyframesResolved(m,x,f,!T),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,s,i,n){this.keyframeResolver=void 0;const{name:a,type:r,velocity:o,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=k.now(),Ar(e,a,r,o)||((_.instantAnimations||!l)&&u?.(Se(e,i,s)),e[0]=e[e.length-1],ae(i),i.repeat=0);const f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>wr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...i,keyframes:e},d=!c&&Sr(f),m=f.motionValue?.owner?.current,x=d?new vr({...f,element:m}):new Pe(f);x.finished.then(()=>{this.notifyFinished()}).catch(ht),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(e,s){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ur()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Dr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,s){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=s}attachTimeline(e){const s=this.animations.map(i=>i.attachTimeline(e));return()=>{s.forEach((i,n)=>{i&&i(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Ze(this.animations,"duration")}get iterationDuration(){return Ze(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(s=>s[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Ze(t,e){let s=0;for(let i=0;i<t.length;i++){const n=t[i][e];n!==null&&n>s&&(s=n)}return s}class Wa extends Dr{then(e,s){return this.finished.finally(e).then(()=>{})}}function pi(t,e,s,i=0,n=1){const a=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,o=(r-1)*i;return typeof s=="function"?s(a,r):n===1?a*i:o-a*i}const Rr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Mr(t){const e=Rr.exec(t);if(!e)return[,];const[,s,i,n]=e;return[`--${s??i}`,n]}function mi(t,e,s=1){const[i,n]=Mr(t);if(!i)return;const a=window.getComputedStyle(e).getPropertyValue(i);if(a){const r=a.trim();return $s(r)?parseFloat(r):r}return ve(n)?mi(n,e,s+1):n}const Cr={type:"spring",stiffness:500,damping:25,restSpeed:10},Br=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Er={type:"keyframes",duration:.8},kr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fr=(t,{keyframes:e})=>e.length>2?Er:pt.has(t)?t.startsWith("scale")?Br(e[1]):Cr:kr,Lr=t=>t!==null;function Ir(t,{repeat:e,repeatType:s="loop"},i){const n=t.filter(Lr),a=e&&s!=="loop"&&e%2===1?0:n.length-1;return n[a]}function yi(t,e){if(t?.inherit&&e){const{inherit:s,...i}=t;return{...e,...i}}return t}function Re(t,e){const s=t?.[e]??t?.default??t;return s!==t?yi(s,t):s}function Or({when:t,delay:e,delayChildren:s,staggerChildren:i,staggerDirection:n,repeat:a,repeatType:r,repeatDelay:o,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const gi=(t,e,s,i={},n,a)=>r=>{const o=Re(i,t)||{},l=o.delay||i.delay||0;let{elapsed:c=0}=i;c=c-$(l);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-c,onUpdate:f=>{e.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{r(),o.onComplete&&o.onComplete()},name:t,motionValue:e,element:a?void 0:n};Or(o)||Object.assign(u,Fr(t,u)),u.duration&&(u.duration=$(u.duration)),u.repeatDelay&&(u.repeatDelay=$(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ae(u),u.delay===0&&(h=!0)),(_.instantAnimations||_.skipAnimations||n?.shouldSkipAnimations)&&(h=!0,ae(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,h&&!a&&e.get()!==void 0){const f=Ir(u.keyframes,o);if(f!==void 0){E.update(()=>{u.onUpdate(f),u.onComplete()});return}}return o.isSync?new Pe(u):new Pr(u)};function Je(t){const e=[{},{}];return t?.values.forEach((s,i)=>{e[0][i]=s.get(),e[1][i]=s.getVelocity()}),e}function Ti(t,e,s,i){if(typeof e=="function"){const[n,a]=Je(i);e=e(s!==void 0?s:t.custom,n,a)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[n,a]=Je(i);e=e(s!==void 0?s:t.custom,n,a)}return e}function ct(t,e,s){const i=t.getProps();return Ti(i,e,s!==void 0?s:i.custom,t)}const vi=new Set(["width","height","top","left","right","bottom",...dt]),Qe=30,jr=t=>!isNaN(parseFloat(t));class Nr{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const n=k.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=k.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=jr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Te);const i=this.events[e].add(s);return e==="change"?()=>{i(),E.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Qe)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Qe);return Us(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ut(t,e){return new Nr(t,e)}const le=t=>Array.isArray(t);function Ur(t,e,s){t.hasValue(e)?t.getValue(e).set(s):t.addValue(e,ut(s))}function Kr(t){return le(t)?t[t.length-1]||0:t}function Wr(t,e){const s=ct(t,e);let{transitionEnd:i={},transition:n={},...a}=s||{};a={...a,...i};for(const r in a){const o=Kr(a[r]);Ur(t,r,o)}}const L=t=>!!(t&&t.getVelocity);function $r(t){return!!(L(t)&&t.add)}function zr(t,e){const s=t.getValue("willChange");if($r(s))return s.add(e);if(!s&&_.WillChange){const i=new _.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function Me(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const _r="framerAppearId",Xr="data-"+Me(_r);function xi(t){return t.props[Xr]}function Yr({protectedKeys:t,needsAnimating:e},s){const i=t.hasOwnProperty(s)&&e[s]!==!0;return e[s]=!1,i}function Ai(t,e,{delay:s=0,transitionOverride:i,type:n}={}){let{transition:a,transitionEnd:r,...o}=e;const l=t.getDefaultTransition();a=a?yi(a,l):l;const c=a?.reduceMotion;i&&(a=i);const u=[],h=n&&t.animationState&&t.animationState.getState()[n];for(const f in o){const d=t.getValue(f,t.latestValues[f]??null),m=o[f];if(m===void 0||h&&Yr(h,f))continue;const x={delay:s,...Re(a||{},f)},T=d.get();if(T!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===T&&!x.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const V=xi(t);if(V){const v=window.MotionHandoffAnimation(V,f,E);v!==null&&(x.startTime=v,g=!0)}}zr(t,f);const A=c??t.shouldReduceMotion;d.start(gi(f,d,m,A&&vi.has(f)?{type:!1}:x,t,g));const y=d.animation;y&&u.push(y)}if(r){const f=()=>E.update(()=>{r&&Wr(t,r)});u.length?Promise.all(u).then(f):f()}return u}function ce(t,e,s={}){const i=ct(t,e,s.type==="exit"?t.presenceContext?.custom:void 0);let{transition:n=t.getDefaultTransition()||{}}=i||{};s.transitionOverride&&(n=s.transitionOverride);const a=i?()=>Promise.all(Ai(t,i,s)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=n;return Hr(t,e,l,c,u,h,s)}:()=>Promise.resolve(),{when:o}=n;if(o){const[l,c]=o==="beforeChildren"?[a,r]:[r,a];return l().then(()=>c())}else return Promise.all([a(),r(s.delay)])}function Hr(t,e,s=0,i=0,n=0,a=1,r){const o=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),o.push(ce(l,e,{...r,delay:s+(typeof i=="function"?0:i)+pi(t.variantChildren,l,i,n,a)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(o)}function Gr(t,e,s={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const n=e.map(a=>ce(t,a,s));i=Promise.all(n)}else if(typeof e=="string")i=ce(t,e,s);else{const n=typeof e=="function"?ct(t,e,s.custom):e;i=Promise.all(Ai(t,n,s))}return i.then(()=>{t.notify("AnimationComplete",e)})}const qr={test:t=>t==="auto",parse:t=>t},bi=t=>e=>e.test(t),Vi=[ft,p,z,Y,bn,An,qr],ts=t=>Vi.find(bi(t));function Zr(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||zs(t):!0}const Jr=new Set(["brightness","contrast","saturate","opacity"]);function Qr(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=s.match(xe)||[];if(!i)return t;const n=s.replace(i,"");let a=Jr.has(e)?1:0;return i!==s&&(a*=100),e+"("+a+n+")"}const to=/\b([a-z-]*)\(.*?\)/gu,ue={...W,getAnimatableNone:t=>{const e=t.match(to);return e?e.map(Qr).join(" "):t}},he={...W,getAnimatableNone:t=>{const e=W.parse(t);return W.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},es={...ft,transform:Math.round},eo={rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:St,scaleX:St,scaleY:St,scaleZ:St,skew:Y,skewX:Y,skewY:Y,distance:p,translateX:p,translateY:p,translateZ:p,x:p,y:p,z:p,perspective:p,transformPerspective:p,opacity:xt,originX:Ue,originY:Ue,originZ:p},Ce={borderWidth:p,borderTopWidth:p,borderRightWidth:p,borderBottomWidth:p,borderLeftWidth:p,borderRadius:p,borderTopLeftRadius:p,borderTopRightRadius:p,borderBottomRightRadius:p,borderBottomLeftRadius:p,width:p,maxWidth:p,height:p,maxHeight:p,top:p,right:p,bottom:p,left:p,inset:p,insetBlock:p,insetBlockStart:p,insetBlockEnd:p,insetInline:p,insetInlineStart:p,insetInlineEnd:p,padding:p,paddingTop:p,paddingRight:p,paddingBottom:p,paddingLeft:p,paddingBlock:p,paddingBlockStart:p,paddingBlockEnd:p,paddingInline:p,paddingInlineStart:p,paddingInlineEnd:p,margin:p,marginTop:p,marginRight:p,marginBottom:p,marginLeft:p,marginBlock:p,marginBlockStart:p,marginBlockEnd:p,marginInline:p,marginInlineStart:p,marginInlineEnd:p,fontSize:p,backgroundPositionX:p,backgroundPositionY:p,...eo,zIndex:es,fillOpacity:xt,strokeOpacity:xt,numOctaves:es},so={...Ce,color:P,backgroundColor:P,outlineColor:P,fill:P,stroke:P,borderColor:P,borderTopColor:P,borderRightColor:P,borderBottomColor:P,borderLeftColor:P,filter:ue,WebkitFilter:ue,mask:he,WebkitMask:he},Si=t=>so[t],io=new Set([ue,he]);function wi(t,e){let s=Si(t);return io.has(s)||(s=W),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const no=new Set(["auto","none","0"]);function ro(t,e,s){let i=0,n;for(;i<t.length&&!n;){const a=t[i];typeof a=="string"&&!no.has(a)&&At(a).values.length&&(n=t[i]),i++}if(n&&s)for(const a of e)t[a]=wi(s,n)}class oo extends De{constructor(e,s,i,n,a){super(e,s,i,n,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),ve(h))){const f=mi(h,s.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!vi.has(i)||e.length!==2)return;const[n,a]=e,r=ts(n),o=ts(a),l=Ne(n),c=Ne(a);if(l!==c&&H[i]){this.needsMeasurement=!0;return}if(r!==o)if(He(r)&&He(o))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else H[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,i=[];for(let n=0;n<e.length;n++)(e[n]===null||Zr(e[n]))&&i.push(n);i.length&&ro(e,i,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=H[i](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const n=s[s.length-1];n!==void 0&&e.getValue(i,n).jump(n,!1)}measureEndState(){const{element:e,name:s,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const n=e.getValue(s);n&&n.jump(this.measuredOrigin,!1);const a=i.length-1,r=i[a];i[a]=H[s](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,l])=>{e.getValue(o).set(l)}),this.resolveNoneKeyframes()}}const ao=new Set(["opacity","clipPath","filter","transform"]);function Pi(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);const n=s?.[t]??i.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(i=>i!=null)}const Di=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function lo(t){return _s(t)&&"offsetHeight"in t}const{schedule:Ri}=Ys(queueMicrotask,!1),U={x:!1,y:!1};function Mi(){return U.x||U.y}function $a(t){return t==="x"||t==="y"?U[t]?null:(U[t]=!0,()=>{U[t]=!1}):U.x||U.y?null:(U.x=U.y=!0,()=>{U.x=U.y=!1})}function Ci(t,e){const s=Pi(t),i=new AbortController,n={passive:!0,...e,signal:i.signal};return[s,n,()=>i.abort()]}function co(t){return!(t.pointerType==="touch"||Mi())}function za(t,e,s={}){const[i,n,a]=Ci(t,s);return i.forEach(r=>{let o=!1,l=!1,c;const u=()=>{r.removeEventListener("pointerleave",m)},h=T=>{c&&(c(T),c=void 0),u()},f=T=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(T))},d=()=>{o=!0,window.addEventListener("pointerup",f,n),window.addEventListener("pointercancel",f,n)},m=T=>{if(T.pointerType!=="touch"){if(o){l=!0;return}h(T)}},x=T=>{if(!co(T))return;l=!1;const g=e(r,T);typeof g=="function"&&(c=g,r.addEventListener("pointerleave",m,n))};r.addEventListener("pointerenter",x,n),r.addEventListener("pointerdown",d,n)}),a}const Bi=(t,e)=>e?t===e?!0:Bi(t,e.parentElement):!1,uo=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ho=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fo(t){return ho.has(t.tagName)||t.isContentEditable===!0}const po=new Set(["INPUT","SELECT","TEXTAREA"]);function _a(t){return po.has(t.tagName)||t.isContentEditable===!0}const Pt=new WeakSet;function ss(t){return e=>{e.key==="Enter"&&t(e)}}function Wt(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const mo=(t,e)=>{const s=t.currentTarget;if(!s)return;const i=ss(()=>{if(Pt.has(s))return;Wt(s,"down");const n=ss(()=>{Wt(s,"up")}),a=()=>Wt(s,"cancel");s.addEventListener("keyup",n,e),s.addEventListener("blur",a,e)});s.addEventListener("keydown",i,e),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),e)};function is(t){return uo(t)&&!Mi()}const ns=new WeakSet;function Xa(t,e,s={}){const[i,n,a]=Ci(t,s),r=o=>{const l=o.currentTarget;if(!is(o)||ns.has(o))return;Pt.add(l),s.stopPropagation&&ns.add(o);const c=e(l,o),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Pt.has(l)&&Pt.delete(l),is(d)&&typeof c=="function"&&c(d,{success:m})},h=d=>{u(d,l===window||l===document||s.useGlobalTarget||Bi(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,n),window.addEventListener("pointercancel",f,n)};return i.forEach(o=>{(s.useGlobalTarget?window:o).addEventListener("pointerdown",r,n),lo(o)&&(o.addEventListener("focus",c=>mo(c,n)),!fo(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function Be(t){return _s(t)&&"ownerSVGElement"in t}const Dt=new WeakMap;let Rt;const Ei=(t,e,s)=>(i,n)=>n&&n[0]?n[0][t+"Size"]:Be(i)&&"getBBox"in i?i.getBBox()[e]:i[s],yo=Ei("inline","width","offsetWidth"),go=Ei("block","height","offsetHeight");function To({target:t,borderBoxSize:e}){Dt.get(t)?.forEach(s=>{s(t,{get width(){return yo(t,e)},get height(){return go(t,e)}})})}function vo(t){t.forEach(To)}function xo(){typeof ResizeObserver>"u"||(Rt=new ResizeObserver(vo))}function Ao(t,e){Rt||xo();const s=Pi(t);return s.forEach(i=>{let n=Dt.get(i);n||(n=new Set,Dt.set(i,n)),n.add(e),Rt?.observe(i)}),()=>{s.forEach(i=>{const n=Dt.get(i);n?.delete(e),n?.size||Rt?.unobserve(i)})}}const Mt=new Set;let rt;function bo(){rt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Mt.forEach(e=>e(t))},window.addEventListener("resize",rt)}function Vo(t){return Mt.add(t),rt||bo(),()=>{Mt.delete(t),!Mt.size&&typeof rt=="function"&&(window.removeEventListener("resize",rt),rt=void 0)}}function Ya(t,e){return typeof t=="function"?Vo(t):Ao(t,e)}function So(t){return Be(t)&&t.tagName==="svg"}const wo=[...Vi,P,W],Po=t=>wo.find(bi(t)),rs=()=>({translate:0,scale:1,origin:0,originPoint:0}),ot=()=>({x:rs(),y:rs()}),os=()=>({min:0,max:0}),R=()=>({x:os(),y:os()}),Do=new WeakMap;function ki(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ee(t){return typeof t=="string"||Array.isArray(t)}const ke=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fe=["initial",...ke];function Fi(t){return ki(t.animate)||Fe.some(e=>Ee(t[e]))}function Ro(t){return!!(Fi(t)||t.variants)}function Mo(t,e,s){for(const i in e){const n=e[i],a=s[i];if(L(n))t.addValue(i,n);else if(L(a))t.addValue(i,ut(n,{owner:t}));else if(a!==n)if(t.hasValue(i)){const r=t.getValue(i);r.liveStyle===!0?r.jump(n):r.hasAnimated||r.set(n)}else{const r=t.getStaticValue(i);t.addValue(i,ut(r!==void 0?r:n,{owner:t}))}}for(const i in s)e[i]===void 0&&t.removeValue(i);return e}const fe={current:null},Li={current:!1},Co=typeof window<"u";function Bo(){if(Li.current=!0,!!Co)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fe.current=t.matches;t.addEventListener("change",e),e()}else fe.current=!1}const as=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let kt={};function Ha(t){kt=t}function Ga(){return kt}class Ii{scrapeMotionValuesFromProps(e,s,i){return{}}constructor({parent:e,props:s,presenceContext:i,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:r,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=De,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=k.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,E.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=s,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=l,this.blockInitialAnimation=!!r,this.isControllingVariants=Fi(s),this.isVariantNode=Ro(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(s,{},this);for(const d in f){const m=f[d];c[d]!==void 0&&L(m)&&m.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const s in this.initialValues)this.values.get(s)?.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,Do.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Li.current||Bo(),this.shouldReduceMotion=fe.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),et(this.notifyUpdate),et(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const s=this.features[e];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,s){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),s.accelerate&&ao.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:o,times:l,ease:c,duration:u}=s.accelerate,h=new fi({element:this.current,name:e,keyframes:o,times:l,ease:c,duration:$(u)}),f=r(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const i=pt.has(e);i&&this.onBindTransform&&this.onBindTransform();const n=s.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&E.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{n(),a&&a(),s.owner&&s.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in kt){const s=kt[e];if(!s)continue;const{isEnabled:i,Feature:n}=s;if(!this.features[e]&&n&&i(this.props)&&(this.features[e]=new n(this)),this.features[e]){const a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):R()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,s){this.latestValues[e]=s}update(e,s){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<as.length;i++){const n=as[i];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const a="on"+n,r=e[a];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Mo(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(e),()=>s.variantChildren.delete(e)}addValue(e,s){const i=this.values.get(e);s!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,s),this.values.set(e,s),this.latestValues[e]=s.get())}removeValue(e){this.values.delete(e);const s=this.valueSubscriptions.get(e);s&&(s(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,s){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&s!==void 0&&(i=ut(s===null?void 0:s,{owner:this}),this.addValue(e,i)),i}readValue(e,s){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&($s(i)||zs(i))?i=parseFloat(i):!Po(i)&&W.test(s)&&(i=wi(e,s)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,s){this.baseTarget[e]=s}getBaseTarget(e){const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const a=Ti(this.props,s,this.presenceContext?.custom);a&&(i=a[e])}if(s&&i!==void 0)return i;const n=this.getBaseTargetFromProps(this.props,e);return n!==void 0&&!L(n)?n:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,s){return this.events[e]||(this.events[e]=new Te),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}scheduleRenderMicrotask(){Ri.render(this.render)}}class Oi extends Ii{constructor(){super(...arguments),this.KeyframeResolver=oo}sortInstanceNodePosition(e,s){return e.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(e,s){const i=e.style;return i?i[s]:void 0}removeValueFromRenderState(e,{vars:s,style:i}){delete s[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class qa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Eo({top:t,left:e,right:s,bottom:i}){return{x:{min:e,max:s},y:{min:t,max:i}}}function Za({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ko(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function $t(t){return t===void 0||t===1}function de({scale:t,scaleX:e,scaleY:s}){return!$t(t)||!$t(e)||!$t(s)}function Z(t){return de(t)||ji(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ji(t){return ls(t.x)||ls(t.y)}function ls(t){return t&&t!=="0%"}function Ft(t,e,s){const i=t-s,n=e*i;return s+n}function cs(t,e,s,i,n){return n!==void 0&&(t=Ft(t,n,i)),Ft(t,s,i)+e}function pe(t,e=0,s=1,i,n){t.min=cs(t.min,e,s,i,n),t.max=cs(t.max,e,s,i,n)}function Ni(t,{x:e,y:s}){pe(t.x,e.translate,e.scale,e.originPoint),pe(t.y,s.translate,s.scale,s.originPoint)}const us=.999999999999,hs=1.0000000000001;function Fo(t,e,s,i=!1){const n=s.length;if(!n)return;e.x=e.y=1;let a,r;for(let o=0;o<n;o++){a=s[o],r=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&<(t,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ni(t,r)),i&&Z(a.latestValues)&<(t,a.latestValues))}e.x<hs&&e.x>us&&(e.x=1),e.y<hs&&e.y>us&&(e.y=1)}function at(t,e){t.min=t.min+e,t.max=t.max+e}function fs(t,e,s,i,n=.5){const a=M(t.min,t.max,n);pe(t,e,s,a,i)}function lt(t,e){fs(t.x,e.x,e.scaleX,e.scale,e.originX),fs(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ui(t,e){return Eo(ko(t.getBoundingClientRect(),e))}function Ja(t,e,s){const i=Ui(t,s),{scroll:n}=e;return n&&(at(i.x,n.offset.x),at(i.y,n.offset.y)),i}const Lo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Io=dt.length;function Oo(t,e,s){let i="",n=!0;for(let a=0;a<Io;a++){const r=dt[a],o=t[r];if(o===void 0)continue;let l=!0;if(typeof o=="number")l=o===(r.startsWith("scale")?1:0);else{const c=parseFloat(o);l=r.startsWith("scale")?c===1:c===0}if(!l||s){const c=Di(o,Ce[r]);if(!l){n=!1;const u=Lo[r]||r;i+=`${u}(${c}) `}s&&(e[r]=c)}}return i=i.trim(),s?i=s(e,n?"":i):n&&(i="none"),i}function Ki(t,e,s){const{style:i,vars:n,transformOrigin:a}=t;let r=!1,o=!1;for(const l in e){const c=e[l];if(pt.has(l)){r=!0;continue}else if(Gs(l)){n[l]=c;continue}else{const u=Di(c,Ce[l]);l.startsWith("origin")?(o=!0,a[l]=u):i[l]=u}}if(e.transform||(r||s?i.transform=Oo(e,t.transform,s):i.transform&&(i.transform="none")),o){const{originX:l="50%",originY:c="50%",originZ:u=0}=a;i.transformOrigin=`${l} ${c} ${u}`}}function Wi(t,{style:e,vars:s},i,n){const a=t.style;let r;for(r in e)a[r]=e[r];n?.applyProjectionStyles(a,i);for(r in s)a.setProperty(r,s[r])}function ds(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(p.test(t))t=parseFloat(t);else return t;const s=ds(t,e.target.x),i=ds(t,e.target.y);return`${s}% ${i}%`}},jo={correct:(t,{treeScale:e,projectionDelta:s})=>{const i=t,n=W.parse(t);if(n.length>5)return i;const a=W.createTransformer(t),r=typeof n[0]!="number"?1:0,o=s.x.scale*e.x,l=s.y.scale*e.y;n[0+r]/=o,n[1+r]/=l;const c=M(o,l,.5);return typeof n[2+r]=="number"&&(n[2+r]/=c),typeof n[3+r]=="number"&&(n[3+r]/=c),a(n)}},me={borderRadius:{...mt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomLeftRadius:mt,borderBottomRightRadius:mt,boxShadow:jo};function No(t,{layout:e,layoutId:s}){return pt.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!me[t]||t==="opacity")}function $i(t,e,s){const i=t.style,n=e?.style,a={};if(!i)return a;for(const r in i)(L(i[r])||n&&L(n[r])||No(r,t)||s?.getValue(r)?.liveStyle!==void 0)&&(a[r]=i[r]);return a}function Uo(t){return window.getComputedStyle(t)}class Qa extends Oi{constructor(){super(...arguments),this.type="html",this.renderInstance=Wi}readValueFromInstance(e,s){if(pt.has(s))return this.projection?.isProjecting?se(s):rr(e,s);{const i=Uo(e),n=(Gs(s)?i.getPropertyValue(s):i[s])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:s}){return Ui(e,s)}build(e,s,i){Ki(e,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,s,i){return $i(e,s,i)}}function Ko(t,e){return t in e}class tl extends Ii{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,s){if(Ko(s,e)){const i=e[s];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,s){delete s.output[e]}measureInstanceViewportBox(){return R()}build(e,s){Object.assign(e.output,s)}renderInstance(e,{output:s}){Object.assign(e,s)}sortInstanceNodePosition(){return 0}}const Wo={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function zo(t,e,s=1,i=0,n=!0){t.pathLength=1;const a=n?Wo:$o;t[a.offset]=`${-i}`,t[a.array]=`${e} ${s}`}const _o=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xo(t,{attrX:e,attrY:s,attrScale:i,pathLength:n,pathSpacing:a=1,pathOffset:r=0,...o},l,c,u){if(Ki(t,o,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const d of _o)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),s!==void 0&&(h.y=s),i!==void 0&&(h.scale=i),n!==void 0&&zo(h,n,a,r,!1)}const zi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Yo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ho(t,e,s,i){Wi(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(zi.has(n)?n:Me(n),e.attrs[n])}function Go(t,e,s){const i=$i(t,e,s);for(const n in t)if(L(t[n])||L(e[n])){const a=dt.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;i[a]=t[n]}return i}class el extends Oi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,s){return e[s]}readValueFromInstance(e,s){if(pt.has(s)){const i=Si(s);return i&&i.default||0}return s=zi.has(s)?s:Me(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,s,i){return Go(e,s,i)}build(e,s,i){Xo(e,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,s,i,n){Ho(e,s,i,n)}mount(e){this.isSVGTag=Yo(e.tagName),super.mount(e)}}const qo=Fe.length;function _i(t){if(!t)return;if(!t.isControllingVariants){const s=t.parent?_i(t.parent)||{}:{};return t.props.initial!==void 0&&(s.initial=t.props.initial),s}const e={};for(let s=0;s<qo;s++){const i=Fe[s],n=t.props[i];(Ee(n)||n===!1)&&(e[i]=n)}return e}function Xi(t,e){if(!Array.isArray(e))return!1;const s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(e[i]!==t[i])return!1;return!0}const Zo=[...ke].reverse(),Jo=ke.length;function Qo(t){return e=>Promise.all(e.map(({animation:s,options:i})=>Gr(t,s,i)))}function sl(t){let e=Qo(t),s=ps(),i=!0;const n=l=>(c,u)=>{const h=ct(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...m}=h;c={...c,...m,...d}}return c};function a(l){e=l(t)}function r(l){const{props:c}=t,u=_i(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let T=0;T<Jo;T++){const g=Zo[T],A=s[g],y=c[g]!==void 0?c[g]:u[g],V=Ee(y),v=g===l?A.isActive:null;v===!1&&(m=T);let S=y===u[g]&&y!==c[g]&&V;if(S&&i&&t.manuallyAnimateOnMount&&(S=!1),A.protectedKeys={...d},!A.isActive&&v===null||!y&&!A.prevProp||ki(y)||typeof y=="boolean")continue;if(g==="exit"&&A.isActive&&v!==!0){A.prevResolvedValues&&(d={...d,...A.prevResolvedValues});continue}const D=ta(A.prevProp,y);let b=D||g===l&&A.isActive&&!S&&V||T>m&&V,F=!1;const I=Array.isArray(y)?y:[y];let st=I.reduce(n(g),{});v===!1&&(st={});const{prevResolvedValues:Le={}}=A,sn={...Le,...st},Ie=C=>{b=!0,f.has(C)&&(F=!0,f.delete(C)),A.needsAnimating[C]=!0;const O=t.getValue(C);O&&(O.liveStyle=!1)};for(const C in sn){const O=st[C],G=Le[C];if(d.hasOwnProperty(C))continue;let it=!1;le(O)&&le(G)?it=!Xi(O,G):it=O!==G,it?O!=null?Ie(C):f.add(C):O!==void 0&&f.has(C)?Ie(C):A.protectedKeys[C]=!0}A.prevProp=y,A.prevResolvedValues=st,A.isActive&&(d={...d,...st}),i&&t.blockInitialAnimation&&(b=!1);const Oe=S&&D;b&&(!Oe||F)&&h.push(...I.map(C=>{const O={type:g};if(typeof C=="string"&&i&&!Oe&&t.manuallyAnimateOnMount&&t.parent){const{parent:G}=t,it=ct(G,C);if(G.enteringChildren&&it){const{delayChildren:nn}=it.transition||{};O.delay=pi(G.enteringChildren,t,nn)}}return{animation:C,options:O}}))}if(f.size){const T={};if(typeof c.initial!="boolean"){const g=ct(t,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(T.transition=g.transition)}f.forEach(g=>{const A=t.getBaseTarget(g),y=t.getValue(g);y&&(y.liveStyle=!0),T[g]=A??null}),h.push({animation:T})}let x=!!h.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(h):Promise.resolve()}function o(l,c){if(s[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,c)),s[l].isActive=c;const u=r(l);for(const h in s)s[h].protectedKeys={};return u}return{animateChanges:r,setActive:o,setAnimateFunction:a,getState:()=>s,reset:()=>{s=ps()}}}function ta(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Xi(e,t):!1}function q(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ps(){return{animate:q(!0),whileInView:q(),whileHover:q(),whileTap:q(),whileDrag:q(),whileFocus:q(),exit:q()}}function ms(t,e){t.min=e.min,t.max=e.max}function N(t,e){ms(t.x,e.x),ms(t.y,e.y)}function ys(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Yi=1e-4,ea=1-Yi,sa=1+Yi,Hi=.01,ia=0-Hi,na=0+Hi;function j(t){return t.max-t.min}function ra(t,e,s){return Math.abs(t-e)<=s}function gs(t,e,s,i=.5){t.origin=i,t.originPoint=M(e.min,e.max,t.origin),t.scale=j(s)/j(e),t.translate=M(s.min,s.max,t.origin)-t.originPoint,(t.scale>=ea&&t.scale<=sa||isNaN(t.scale))&&(t.scale=1),(t.translate>=ia&&t.translate<=na||isNaN(t.translate))&&(t.translate=0)}function vt(t,e,s,i){gs(t.x,e.x,s.x,i?i.originX:void 0),gs(t.y,e.y,s.y,i?i.originY:void 0)}function Ts(t,e,s){t.min=s.min+e.min,t.max=t.min+j(e)}function oa(t,e,s){Ts(t.x,e.x,s.x),Ts(t.y,e.y,s.y)}function vs(t,e,s){t.min=e.min-s.min,t.max=t.min+j(e)}function Lt(t,e,s){vs(t.x,e.x,s.x),vs(t.y,e.y,s.y)}function xs(t,e,s,i,n){return t-=e,t=Ft(t,1/s,i),n!==void 0&&(t=Ft(t,1/n,i)),t}function aa(t,e=0,s=1,i=.5,n,a=t,r=t){if(z.test(e)&&(e=parseFloat(e),e=M(r.min,r.max,e/100)-r.min),typeof e!="number")return;let o=M(a.min,a.max,i);t===a&&(o-=e),t.min=xs(t.min,e,s,o,n),t.max=xs(t.max,e,s,o,n)}function As(t,e,[s,i,n],a,r){aa(t,e[s],e[i],e[n],e.scale,a,r)}const la=["x","scaleX","originX"],ca=["y","scaleY","originY"];function bs(t,e,s,i){As(t.x,e,la,s?s.x:void 0,i?i.x:void 0),As(t.y,e,ca,s?s.y:void 0,i?i.y:void 0)}function Vs(t){return t.translate===0&&t.scale===1}function Gi(t){return Vs(t.x)&&Vs(t.y)}function Ss(t,e){return t.min===e.min&&t.max===e.max}function ua(t,e){return Ss(t.x,e.x)&&Ss(t.y,e.y)}function ws(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qi(t,e){return ws(t.x,e.x)&&ws(t.y,e.y)}function Ps(t){return j(t.x)/j(t.y)}function Ds(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Rs(t){return[t("x"),t("y")]}function ha(t,e,s){let i="";const n=t.x.translate/e.x,a=t.y.translate/e.y,r=s?.z||0;if((n||a||r)&&(i=`translate3d(${n}px, ${a}px, ${r}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=s;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const o=t.x.scale*e.x,l=t.y.scale*e.y;return(o!==1||l!==1)&&(i+=`scale(${o}, ${l})`),i||"none"}const Zi=["TopLeft","TopRight","BottomLeft","BottomRight"],fa=Zi.length,Ms=t=>typeof t=="string"?parseFloat(t):t,Cs=t=>typeof t=="number"||p.test(t);function da(t,e,s,i,n,a){n?(t.opacity=M(0,s.opacity??1,pa(i)),t.opacityExit=M(e.opacity??1,0,ma(i))):a&&(t.opacity=M(e.opacity??1,s.opacity??1,i));for(let r=0;r<fa;r++){const o=`border${Zi[r]}Radius`;let l=Bs(e,o),c=Bs(s,o);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Cs(l)===Cs(c)?(t[o]=Math.max(M(Ms(l),Ms(c),i),0),(z.test(c)||z.test(l))&&(t[o]+="%")):t[o]=c}(e.rotate||s.rotate)&&(t.rotate=M(e.rotate||0,s.rotate||0,i))}function Bs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const pa=Ji(0,.5,hn),ma=Ji(.5,.95,ht);function Ji(t,e,s){return i=>i<t?0:i>e?1:s(ge(t,e,i))}function ya(t,e,s){const i=L(t)?t:ut(t);return i.start(gi("",i,e,s)),i.animation}function ga(t,e,s,i={passive:!0}){return t.addEventListener(e,s,i),()=>t.removeEventListener(e,s)}const Ta=(t,e)=>t.depth-e.depth;class va{constructor(){this.children=[],this.isDirty=!1}add(e){Xs(this.children,e),this.isDirty=!0}remove(e){Gt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ta),this.isDirty=!1,this.children.forEach(e)}}function xa(t,e){const s=k.now(),i=({timestamp:n})=>{const a=n-s;a>=e&&(et(i),t(a-e))};return E.setup(i,!0),()=>et(i)}function zt(t){return L(t)?t.get():t}class Aa{constructor(){this.members=[]}add(e){Xs(this.members,e);for(let s=this.members.length-1;s>=0;s--){const i=this.members[s];if(i===e||i===this.lead||i===this.prevLead)continue;const n=i.instance;n&&n.isConnected===!1&&i.isPresent!==!1&&!i.snapshot&&Gt(this.members,i)}e.scheduleRender()}remove(e){if(Gt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){const s=this.members.findIndex(n=>e===n);if(s===0)return!1;let i;for(let n=s;n>=0;n--){const a=this.members[n],r=a.instance;if(a.isPresent!==!1&&(!r||r.isConnected!==!1)){i=a;break}}return i?(this.promote(i),!0):!1}promote(e,s){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender();const n=i.options.layoutDependency,a=e.options.layoutDependency;if(!(n!==void 0&&a!==void 0&&n===a)){const l=i.instance;l&&l.isConnected===!1&&!i.snapshot||(e.resumeFrom=i,s&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:o}=e.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:s,resumingFrom:i}=e;s.onExitComplete&&s.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const _t={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Xt=["","X","Y","Z"],ba=1e3;let Va=0;function Yt(t,e,s,i){const{latestValues:n}=e;n[t]&&(s[t]=n[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Qi(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=xi(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:n,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",E,!(n||a))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Qi(i)}function tn({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:i,resetTransform:n}){return class{constructor(r={},o=e?.()){this.id=Va++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Pa),this.nodes.forEach(Ca),this.nodes.forEach(Ba),this.nodes.forEach(Da)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new va)}addEventListener(r,o){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Te),this.eventHandlers.get(r).add(o)}notifyListeners(r,...o){const l=this.eventHandlers.get(r);l&&l.notify(...o)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Be(r)&&!So(r),this.instance=r;const{layoutId:o,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;E.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=xa(f,250),_t.hasAnimatedSinceResize&&(_t.hasAnimatedSinceResize=!1,this.nodes.forEach(Fs)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&c&&(o||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Ia,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=c.getProps(),g=!this.targetLayout||!qi(this.targetLayout,d),A=!h&&f;if(this.options.layoutRoot||this.resumeFrom||A||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Re(m,"layout"),onPlay:x,onComplete:T};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,A)}else h||Fs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),et(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ea),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Es);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ks);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ma),this.nodes.forEach(Sa),this.nodes.forEach(wa)):this.nodes.forEach(ks),this.clearAllSnapshots();const o=k.now();B.delta=X(0,1e3/60,o-B.timestamp),B.timestamp=o,B.isProcessing=!0,It.update.process(B),It.preRender.process(B),It.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ri.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ra),this.sharedNodes.forEach(ka)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!j(this.snapshot.measuredBox.x)&&!j(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=R(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(o=!1),o&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(o||Z(this.latestValues)||u)&&(n(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return r&&(l=this.removeTransform(l)),Oa(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return R();const o=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ja))){const{scroll:c}=this.root;c&&(at(o.x,c.offset.x),at(o.y,c.offset.y))}return o}removeElementScroll(r){const o=R();if(N(o,r),this.scroll?.wasRoot)return o;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&N(o,r),at(o.x,u.offset.x),at(o.y,u.offset.y))}return o}applyTransform(r,o=!1){const l=R();N(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&<(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Z(u.latestValues)&<(l,u.latestValues)}return Z(this.latestValues)&<(l,this.latestValues),l}removeTransform(r){const o=R();N(o,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Z(c.latestValues))continue;de(c.latestValues)&&c.updateSnapshot();const u=R(),h=c.measurePageBox();N(u,h),bs(o,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Z(this.latestValues)&&bs(o,this.latestValues),o}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=B.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),oa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):N(this.target,this.layout.layoutBox),Ni(this.target,this.targetDelta)):N(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||de(this.parent.latestValues)||ji(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,o,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),Lt(this.relativeTargetOrigin,o,l),N(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),o=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===B.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;N(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Fo(this.layoutCorrected,this.treeScale,this.path,o),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=R());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ys(this.prevProjectionDelta.x,this.projectionDelta.x),ys(this.prevProjectionDelta.y,this.projectionDelta.y)),vt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ot(),this.projectionDelta=ot(),this.projectionDeltaWithTransform=ot()}setAnimationOrigin(r,o=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ot();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=R(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=d!==m,T=this.getStack(),g=!T||T.members.length<=1,A=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(La));this.animationProgress=0;let y;this.mixTargetDelta=V=>{const v=V/1e3;Ls(h.x,r.x,v),Ls(h.y,r.y,v),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Fa(this.relativeTarget,this.relativeTargetOrigin,f,v),y&&ua(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=R()),N(y,this.relativeTarget)),x&&(this.animationValues=u,da(u,c,this.latestValues,v,A,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(et(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{_t.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ut(0)),this.motionValue.jump(0,!1),this.currentAnimation=ya(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),r.onUpdate&&r.onUpdate(o)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ba),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:u}=r;if(!(!o||!l||!c)){if(this!==r&&this.layout&&c&&en(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||R();const h=j(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=j(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}N(o,l),lt(o,u),vt(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(r,o){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Aa),this.sharedNodes.get(r).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let o=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const c={};l.z&&Yt("z",r,c,this.animationValues);for(let u=0;u<Xt.length;u++)Yt(`rotate${Xt[u]}`,r,c,this.animationValues),Yt(`skew${Xt[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=zt(o?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=zt(o?.pointerEvents)||""),this.hasProjected&&!Z(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=ha(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in me){if(u[m]===void 0)continue;const{correct:x,applyTo:T,isCSSVariable:g}=me[m],A=h==="none"?u[m]:x(u[m],c);if(T){const y=T.length;for(let V=0;V<y;V++)r[T[V]]=A}else g?this.options.visualElement.renderState.vars[m]=A:r[m]=A}this.options.layoutId&&(r.pointerEvents=c===this?zt(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Es),this.root.sharedNodes.clear()}}}function Sa(t){t.updateLayout()}function wa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:n}=t.options,a=e.source!==t.layout.source;n==="size"?Rs(u=>{const h=a?e.measuredBox[u]:e.layoutBox[u],f=j(h);h.min=s[u].min,h.max=h.min+f}):en(n,e.layoutBox,s)&&Rs(u=>{const h=a?e.measuredBox[u]:e.layoutBox[u],f=j(s[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const r=ot();vt(r,s,e.layoutBox);const o=ot();a?vt(o,t.applyTransform(i,!0),e.measuredBox):vt(o,s,e.layoutBox);const l=!Gi(r);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=R();Lt(d,e.layoutBox,h.layoutBox);const m=R();Lt(m,s,f.layoutBox),qi(d,m)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:o,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Pa(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Da(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ra(t){t.clearSnapshot()}function Es(t){t.clearMeasurements()}function ks(t){t.isLayoutDirty=!1}function Ma(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Fs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ca(t){t.resolveTargetDelta()}function Ba(t){t.calcProjection()}function Ea(t){t.resetSkewAndRotation()}function ka(t){t.removeLeadSnapshot()}function Ls(t,e,s){t.translate=M(e.translate,0,s),t.scale=M(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function Is(t,e,s,i){t.min=M(e.min,s.min,i),t.max=M(e.max,s.max,i)}function Fa(t,e,s,i){Is(t.x,e.x,s.x,i),Is(t.y,e.y,s.y,i)}function La(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Ia={duration:.45,ease:[.4,0,.1,1]},Os=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),js=Os("applewebkit/")&&!Os("chrome/")?Math.round:ht;function Ns(t){t.min=js(t.min),t.max=js(t.max)}function Oa(t){Ns(t.x),Ns(t.y)}function en(t,e,s){return t==="position"||t==="preserve-aspect"&&!ra(Ps(e),Ps(s),.2)}function ja(t){return t!==t.root&&t.scroll?.wasRoot}const Na=tn({attachResizeListener:(t,e)=>ga(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ht={current:void 0},nl=tn({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ht.current){const t=new Na({});t.mount(window),t.setOptions({layoutScroll:!0}),Ht.current=t}return Ht.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});export{Do as $,Ja as A,Za as B,Eo as C,zr as D,gi as E,qa as F,$a as G,Qa as H,Ya as I,z as J,_a as K,Ri as L,_t as M,nl as N,za as O,Xa as P,Li as Q,Bo as R,el as S,fe as T,Pi as U,qn as V,Nn as W,Gn as X,hi as Y,Be as Z,So as _,Ee as a,tl as a0,ya as a1,Ai as a2,ut as a3,Et as a4,Wa as a5,L as b,No as c,Ki as d,Xo as e,Yo as f,Ga as g,Ro as h,Fi as i,ki as j,Ti as k,$i as l,Go as m,sl as n,Xr as o,uo as p,ga as q,zt as r,Ha as s,B as t,E as u,et as v,M as w,j as x,R as y,Rs as z};
|
|
1
|
+
import{M as _,n as ht,c as X,p as ye,m as K,v as Us,s as $,i as Ks,a as ge,b as rn,e as je,d as on,f as Ws,h as an,j as ln,k as cn,l as un,o as $s,S as Te,q as zs,t as _s,u as hn,w as Xs,r as Gt}from"./vendor-motion-utils-BGh8QBgx.js";const Vt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fn(t,e){let s=new Set,i=new Set,n=!1,a=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),t()),u(o)}const c={schedule:(u,h=!1,f=!1)=>{const m=f&&n?s:i;return h&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{i.delete(u),r.delete(u)},process:u=>{if(o=u,n){a=!0;return}n=!0,[s,i]=[i,s],s.forEach(l),s.clear(),n=!1,a&&(a=!1,c.process(u))}};return c}const dn=40;function Ys(t,e){let s=!1,i=!0;const n={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,r=Vt.reduce((y,V)=>(y[V]=fn(a),y),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:m}=r,x=()=>{const y=_.useManualTiming?n.timestamp:performance.now();s=!1,_.useManualTiming||(n.delta=i?1e3/60:Math.max(Math.min(y-n.timestamp,dn),1)),n.timestamp=y,n.isProcessing=!0,o.process(n),l.process(n),c.process(n),u.process(n),h.process(n),f.process(n),d.process(n),m.process(n),n.isProcessing=!1,s&&e&&(i=!1,t(x))},T=()=>{s=!0,i=!0,n.isProcessing||t(x)};return{schedule:Vt.reduce((y,V)=>{const v=r[V];return y[V]=(S,D=!1,b=!1)=>(s||T(),v.schedule(S,D,b)),y},{}),cancel:y=>{for(let V=0;V<Vt.length;V++)r[Vt[V]].cancel(y)},state:n,steps:r}}const{schedule:E,cancel:et,state:B,steps:It}=Ys(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0);let wt;function pn(){wt=void 0}const k={now:()=>(wt===void 0&&k.set(B.isProcessing||_.useManualTiming?B.timestamp:performance.now()),wt),set:t=>{wt=t,queueMicrotask(pn)}},Hs=t=>e=>typeof e=="string"&&e.startsWith(t),Gs=Hs("--"),mn=Hs("var(--"),ve=t=>mn(t)?yn.test(t.split("/*")[0].trim()):!1,yn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ne(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const ft={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},xt={...ft,transform:t=>X(0,1,t)},St={...ft,default:1},gt=t=>Math.round(t*1e5)/1e5,xe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gn(t){return t==null}const Tn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ae=(t,e)=>s=>!!(typeof s=="string"&&Tn.test(s)&&s.startsWith(t)||e&&!gn(s)&&Object.prototype.hasOwnProperty.call(s,e)),qs=(t,e,s)=>i=>{if(typeof i!="string")return i;const[n,a,r,o]=i.match(xe);return{[t]:parseFloat(n),[e]:parseFloat(a),[s]:parseFloat(r),alpha:o!==void 0?parseFloat(o):1}},vn=t=>X(0,255,t),Ot={...ft,transform:t=>Math.round(vn(t))},J={test:Ae("rgb","red"),parse:qs("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:i=1})=>"rgba("+Ot.transform(t)+", "+Ot.transform(e)+", "+Ot.transform(s)+", "+gt(xt.transform(i))+")"};function xn(t){let e="",s="",i="",n="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),i=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),i=t.substring(3,4),n=t.substring(4,5),e+=e,s+=s,i+=i,n+=n),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}}const qt={test:Ae("#"),parse:xn,transform:J.transform},bt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=bt("deg"),z=bt("%"),p=bt("px"),An=bt("vh"),bn=bt("vw"),Ue={...z,parse:t=>z.parse(t)/100,transform:t=>z.transform(t*100)},nt={test:Ae("hsl","hue"),parse:qs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:i=1})=>"hsla("+Math.round(t)+", "+z.transform(gt(e))+", "+z.transform(gt(s))+", "+gt(xt.transform(i))+")"},P={test:t=>J.test(t)||qt.test(t)||nt.test(t),parse:t=>J.test(t)?J.parse(t):nt.test(t)?nt.parse(t):qt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?J.transform(t):nt.transform(t),getAnimatableNone:t=>{const e=P.parse(t);return e.alpha=0,P.transform(e)}},Vn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sn(t){return isNaN(t)&&typeof t=="string"&&(t.match(xe)?.length||0)+(t.match(Vn)?.length||0)>0}const Zs="number",Js="color",wn="var",Pn="var(",Ke="${}",Dn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function At(t){const e=t.toString(),s=[],i={color:[],number:[],var:[]},n=[];let a=0;const o=e.replace(Dn,l=>(P.test(l)?(i.color.push(a),n.push(Js),s.push(P.parse(l))):l.startsWith(Pn)?(i.var.push(a),n.push(wn),s.push(l)):(i.number.push(a),n.push(Zs),s.push(parseFloat(l))),++a,Ke)).split(Ke);return{values:s,split:o,indexes:i,types:n}}function Qs(t){return At(t).values}function ti(t){const{split:e,types:s}=At(t),i=e.length;return n=>{let a="";for(let r=0;r<i;r++)if(a+=e[r],n[r]!==void 0){const o=s[r];o===Zs?a+=gt(n[r]):o===Js?a+=P.transform(n[r]):a+=n[r]}return a}}const Rn=t=>typeof t=="number"?0:P.test(t)?P.getAnimatableNone(t):t;function Mn(t){const e=Qs(t);return ti(t)(e.map(Rn))}const W={test:Sn,parse:Qs,createTransformer:ti,getAnimatableNone:Mn};function jt(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function Cn({hue:t,saturation:e,lightness:s,alpha:i}){t/=360,e/=100,s/=100;let n=0,a=0,r=0;if(!e)n=a=r=s;else{const o=s<.5?s*(1+e):s+e-s*e,l=2*s-o;n=jt(l,o,t+1/3),a=jt(l,o,t),r=jt(l,o,t-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(r*255),alpha:i}}function Ct(t,e){return s=>s>0?e:t}const M=(t,e,s)=>t+(e-t)*s,Nt=(t,e,s)=>{const i=t*t,n=s*(e*e-i)+i;return n<0?0:Math.sqrt(n)},Bn=[qt,J,nt],En=t=>Bn.find(e=>e.test(t));function We(t){const e=En(t);if(!e)return!1;let s=e.parse(t);return e===nt&&(s=Cn(s)),s}const $e=(t,e)=>{const s=We(t),i=We(e);if(!s||!i)return Ct(t,e);const n={...s};return a=>(n.red=Nt(s.red,i.red,a),n.green=Nt(s.green,i.green,a),n.blue=Nt(s.blue,i.blue,a),n.alpha=M(s.alpha,i.alpha,a),J.transform(n))},Zt=new Set(["none","hidden"]);function kn(t,e){return Zt.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function Fn(t,e){return s=>M(t,e,s)}function be(t){return typeof t=="number"?Fn:typeof t=="string"?ve(t)?Ct:P.test(t)?$e:On:Array.isArray(t)?ei:typeof t=="object"?P.test(t)?$e:Ln:Ct}function ei(t,e){const s=[...t],i=s.length,n=t.map((a,r)=>be(a)(a,e[r]));return a=>{for(let r=0;r<i;r++)s[r]=n[r](a);return s}}function Ln(t,e){const s={...t,...e},i={};for(const n in s)t[n]!==void 0&&e[n]!==void 0&&(i[n]=be(t[n])(t[n],e[n]));return n=>{for(const a in i)s[a]=i[a](n);return s}}function In(t,e){const s=[],i={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){const a=e.types[n],r=t.indexes[a][i[a]],o=t.values[r]??0;s[n]=o,i[a]++}return s}const On=(t,e)=>{const s=W.createTransformer(e),i=At(t),n=At(e);return i.indexes.var.length===n.indexes.var.length&&i.indexes.color.length===n.indexes.color.length&&i.indexes.number.length>=n.indexes.number.length?Zt.has(t)&&!n.values.length||Zt.has(e)&&!i.values.length?kn(t,e):ye(ei(In(i,n),n.values),s):Ct(t,e)};function si(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?M(t,e,s):be(t)(t,e)}const jn=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>E.update(e,s),stop:()=>et(e),now:()=>B.isProcessing?B.timestamp:k.now()}},ii=(t,e,s=10)=>{let i="";const n=Math.max(Math.round(e/s),2);for(let a=0;a<n;a++)i+=Math.round(t(a/(n-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Bt=2e4;function Ve(t){let e=0;const s=50;let i=t.next(e);for(;!i.done&&e<Bt;)e+=s,i=t.next(e);return e>=Bt?1/0:e}function Nn(t,e=100,s){const i=s({...t,keyframes:[0,e]}),n=Math.min(Ve(i),Bt);return{type:"keyframes",ease:a=>i.next(n*a).value/e,duration:K(n)}}const Un=5;function ni(t,e,s){const i=Math.max(e-Un,0);return Us(s-t(i),e-i)}const w={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ut=.001;function Kn({duration:t=w.duration,bounce:e=w.bounce,velocity:s=w.velocity,mass:i=w.mass}){let n,a,r=1-e;r=X(w.minDamping,w.maxDamping,r),t=X(w.minDuration,w.maxDuration,K(t)),r<1?(n=c=>{const u=c*r,h=u*t,f=u-s,d=Jt(c,r),m=Math.exp(-h);return Ut-f/d*m},a=c=>{const h=c*r*t,f=h*s+s,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),x=Jt(Math.pow(c,2),r);return(-n(c)+Ut>0?-1:1)*((f-d)*m)/x}):(n=c=>{const u=Math.exp(-c*t),h=(c-s)*t+1;return-Ut+u*h},a=c=>{const u=Math.exp(-c*t),h=(s-c)*(t*t);return u*h});const o=5/t,l=$n(n,a,o);if(t=$(t),isNaN(l))return{stiffness:w.stiffness,damping:w.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:t}}}const Wn=12;function $n(t,e,s){let i=s;for(let n=1;n<Wn;n++)i=i-t(i)/e(i);return i}function Jt(t,e){return t*Math.sqrt(1-e*e)}const zn=["duration","bounce"],_n=["stiffness","damping","mass"];function ze(t,e){return e.some(s=>t[s]!==void 0)}function Xn(t){let e={velocity:w.velocity,stiffness:w.stiffness,damping:w.damping,mass:w.mass,isResolvedFromDuration:!1,...t};if(!ze(t,_n)&&ze(t,zn))if(e.velocity=0,t.visualDuration){const s=t.visualDuration,i=2*Math.PI/(s*1.2),n=i*i,a=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:w.mass,stiffness:n,damping:a}}else{const s=Kn({...t,velocity:0});e={...e,...s,mass:w.mass},e.isResolvedFromDuration=!0}return e}function Et(t=w.visualDuration,e=w.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:n}=s;const a=s.keyframes[0],r=s.keyframes[s.keyframes.length-1],o={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=Xn({...s,velocity:-K(s.velocity||0)}),m=f||0,x=c/(2*Math.sqrt(l*u)),T=r-a,g=K(Math.sqrt(l/u)),A=Math.abs(T)<5;i||(i=A?w.restSpeed.granular:w.restSpeed.default),n||(n=A?w.restDelta.granular:w.restDelta.default);let y;if(x<1){const v=Jt(g,x);y=S=>{const D=Math.exp(-x*g*S);return r-D*((m+x*g*T)/v*Math.sin(v*S)+T*Math.cos(v*S))}}else if(x===1)y=v=>r-Math.exp(-g*v)*(T+(m+g*T)*v);else{const v=g*Math.sqrt(x*x-1);y=S=>{const D=Math.exp(-x*g*S),b=Math.min(v*S,300);return r-D*((m+x*g*T)*Math.sinh(b)+v*T*Math.cosh(b))/v}}const V={calculatedDuration:d&&h||null,next:v=>{const S=y(v);if(d)o.done=v>=h;else{let D=v===0?m:0;x<1&&(D=v===0?$(m):ni(y,v,S));const b=Math.abs(D)<=i,F=Math.abs(r-S)<=n;o.done=b&&F}return o.value=o.done?r:S,o},toString:()=>{const v=Math.min(Ve(V),Bt),S=ii(D=>V.next(v*D).value,v,30);return v+"ms "+S},toTransition:()=>{}};return V}Et.applyToOptions=t=>{const e=Nn(t,100,Et);return t.ease=e.ease,t.duration=$(e.duration),t.type="keyframes",t};function Qt({keyframes:t,velocity:e=0,power:s=.8,timeConstant:i=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:r,min:o,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=b=>o!==void 0&&b<o||l!==void 0&&b>l,m=b=>o===void 0?l:l===void 0||Math.abs(o-b)<Math.abs(l-b)?o:l;let x=s*e;const T=h+x,g=r===void 0?T:r(T);g!==T&&(x=g-h);const A=b=>-x*Math.exp(-b/i),y=b=>g+A(b),V=b=>{const F=A(b),I=y(b);f.done=Math.abs(F)<=c,f.value=f.done?g:I};let v,S;const D=b=>{d(f.value)&&(v=b,S=Et({keyframes:[f.value,m(f.value)],velocity:ni(y,b,f.value),damping:n,stiffness:a,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:b=>{let F=!1;return!S&&v===void 0&&(F=!0,V(b),D(b)),v!==void 0&&b>=v?S.next(b-v):(!F&&V(b),f)}}}function Yn(t,e,s){const i=[],n=s||_.mix||si,a=t.length-1;for(let r=0;r<a;r++){let o=n(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||ht:e;o=ye(l,o)}i.push(o)}return i}function Hn(t,e,{clamp:s=!0,ease:i,mixer:n}={}){const a=t.length;if(Ks(a===e.length),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Yn(e,i,n),l=o.length,c=u=>{if(r&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=ge(t[h],t[h+1],u);return o[h](f)};return s?u=>c(X(t[0],t[a-1],u)):c}function Gn(t,e){const s=t[t.length-1];for(let i=1;i<=e;i++){const n=ge(0,e,i);t.push(M(s,1,n))}}function qn(t){const e=[0];return Gn(e,t.length-1),e}function Zn(t,e){return t.map(s=>s*e)}function Jn(t,e){return t.map(()=>e||on).splice(0,t.length-1)}function Tt({duration:t=300,keyframes:e,times:s,ease:i="easeInOut"}){const n=rn(i)?i.map(je):je(i),a={done:!1,value:e[0]},r=Zn(s&&s.length===e.length?s:qn(e),t),o=Hn(r,e,{ease:Array.isArray(n)?n:Jn(e,n)});return{calculatedDuration:t,next:l=>(a.value=o(l),a.done=l>=t,a)}}const Qn=t=>t!==null;function Se(t,{repeat:e,repeatType:s="loop"},i,n=1){const a=t.filter(Qn),o=n<0||e&&s!=="loop"&&e%2===1?0:a.length-1;return!o||i===void 0?a[o]:i}const tr={decay:Qt,inertia:Qt,tween:Tt,keyframes:Tt,spring:Et};function ri(t){typeof t.type=="string"&&(t.type=tr[t.type])}class we{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const er=t=>t/100;class Pe extends we{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ri(e);const{type:s=Tt,repeat:i=0,repeatDelay:n=0,repeatType:a,velocity:r=0}=e;let{keyframes:o}=e;const l=s||Tt;l!==Tt&&typeof o[0]!="number"&&(this.mixKeyframes=ye(er,si(o[0],o[1])),o=[0,100]);const c=l({...e,keyframes:o});a==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...o].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ve(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=c}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:i,totalDuration:n,mixKeyframes:a,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:x,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,V=i;if(h){const b=Math.min(this.currentTime,n)/o;let F=Math.floor(b),I=b%1;!I&&b>=1&&(I=1),I===1&&F--,F=Math.min(F,h+1),F%2&&(f==="reverse"?(I=1-I,d&&(I-=d/o)):f==="mirror"&&(V=r)),y=X(0,1,I)*o}const v=A?{done:!1,value:u[0]}:V.next(y);a&&(v.value=a(v.value));let{done:S}=v;!A&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return D&&m!==Qt&&(v.value=Se(u,this.options,T,this.speed)),x&&x(v.value),D&&this.finish(),v}then(e,s){return this.finished.then(e,s)}get duration(){return K(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(this.currentTime)}set time(e){e=$(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(k.now());const s=this.playbackSpeed!==e;this.playbackSpeed=e,s&&(this.time=K(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=jn,startTime:s}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function sr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Q=t=>t*180/Math.PI,te=t=>{const e=Q(Math.atan2(t[1],t[0]));return ee(e)},ir={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:te,rotateZ:te,skewX:t=>Q(Math.atan(t[1])),skewY:t=>Q(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ee=t=>(t=t%360,t<0&&(t+=360),t),_e=te,Xe=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ye=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),nr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xe,scaleY:Ye,scale:t=>(Xe(t)+Ye(t))/2,rotateX:t=>ee(Q(Math.atan2(t[6],t[5]))),rotateY:t=>ee(Q(Math.atan2(-t[2],t[0]))),rotateZ:_e,rotate:_e,skewX:t=>Q(Math.atan(t[4])),skewY:t=>Q(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function se(t){return t.includes("scale")?1:0}function ie(t,e){if(!t||t==="none")return se(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,n;if(s)i=nr,n=s;else{const o=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ir,n=o}if(!n)return se(e);const a=i[e],r=n[1].split(",").map(or);return typeof a=="function"?a(r):r[a]}const rr=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return ie(s,e)};function or(t){return parseFloat(t.trim())}const dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pt=new Set(dt),He=t=>t===ft||t===p,ar=new Set(["x","y","z"]),lr=dt.filter(t=>!ar.has(t));function cr(t){const e=[];return lr.forEach(s=>{const i=t.getValue(s);i!==void 0&&(e.push([s,i.get()]),i.set(s.startsWith("scale")?1:0))}),e}const H={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ie(e,"x"),y:(t,{transform:e})=>ie(e,"y")};H.translateX=H.x;H.translateY=H.y;const tt=new Set;let ne=!1,re=!1,oe=!1;function oi(){if(re){const t=Array.from(tt).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),s=new Map;e.forEach(i=>{const n=cr(i);n.length&&(s.set(i,n),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const n=s.get(i);n&&n.forEach(([a,r])=>{i.getValue(a)?.set(r)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}re=!1,ne=!1,tt.forEach(t=>t.complete(oe)),tt.clear()}function ai(){tt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(re=!0)})}function ur(){oe=!0,ai(),oi(),oe=!1}class De{constructor(e,s,i,n,a,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=i,this.motionValue=n,this.element=a,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(tt.add(this),ne||(ne=!0,E.read(ai),E.resolveKeyframes(oi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:i,motionValue:n}=this;if(e[0]===null){const a=n?.get(),r=e[e.length-1];if(a!==void 0)e[0]=a;else if(i&&s){const o=i.readValue(s,r);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=r),n&&a===void 0&&n.set(e[0])}sr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),tt.delete(this)}cancel(){this.state==="scheduled"&&(tt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const hr=t=>t.startsWith("--");function fr(t,e,s){hr(e)?t.style.setProperty(e,s):t.style[e]=s}const dr={};function li(t,e){const s=Ws(t);return()=>dr[e]??s()}const pr=li(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ci=li(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yt=([t,e,s,i])=>`cubic-bezier(${t}, ${e}, ${s}, ${i})`,Ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function ui(t,e){if(t)return typeof t=="function"?ci()?ii(t,e):"ease-out":an(t)?yt(t):Array.isArray(t)?t.map(s=>ui(s,e)||Ge.easeOut):Ge[t]}function mr(t,e,s,{delay:i=0,duration:n=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:l}={},c=void 0){const u={[e]:s};l&&(u.offset=l);const h=ui(o,n);Array.isArray(h)&&(u.easing=h);const f={delay:i,duration:n,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function hi(t){return typeof t=="function"&&"applyToOptions"in t}function yr({type:t,...e}){return hi(t)&&ci()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class fi extends we{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:s,name:i,keyframes:n,pseudoElement:a,allowFlatten:r=!1,finalKeyframe:o,onComplete:l}=e;this.isPseudoElement=!!a,this.allowFlatten=r,this.options=e,Ks(typeof e.type!="string");const c=yr(e);this.animation=mr(s,i,n,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const u=Se(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(u):fr(s,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return K(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&pr()?(this.animation.timeline=e,ht):s(this)}}const di={anticipate:un,backInOut:cn,circInOut:ln};function gr(t){return t in di}function Tr(t){typeof t.ease=="string"&&gr(t.ease)&&(t.ease=di[t.ease])}const Kt=10;class vr extends fi{constructor(e){Tr(e),ri(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:s,onUpdate:i,onComplete:n,element:a,...r}=this.options;if(!s)return;if(e!==void 0){s.set(e);return}const o=new Pe({...r,autoplay:!1}),l=Math.max(Kt,k.now()-this.startTime),c=X(0,Kt,l-Kt);s.setWithVelocity(o.sample(Math.max(0,l-c)).value,o.sample(l).value,c),o.stop()}}const qe=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(W.test(t)||t==="0")&&!t.startsWith("url("));function xr(t){const e=t[0];if(t.length===1)return!0;for(let s=0;s<t.length;s++)if(t[s]!==e)return!0}function Ar(t,e,s,i){const n=t[0];if(n===null)return!1;if(e==="display"||e==="visibility")return!0;const a=t[t.length-1],r=qe(n,e),o=qe(a,e);return!r||!o?!1:xr(t)||(s==="spring"||hi(s))&&i}function ae(t){t.duration=0,t.type="keyframes"}const br=new Set(["opacity","clipPath","filter","transform"]),Vr=Ws(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Sr(t){const{motionValue:e,name:s,repeatDelay:i,repeatType:n,damping:a,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Vr()&&s&&br.has(s)&&(s!=="transform"||!c)&&!l&&!i&&n!=="mirror"&&a!==0&&r!=="inertia"}const wr=40;class Pr extends we{constructor({autoplay:e=!0,delay:s=0,type:i="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:r="loop",keyframes:o,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=k.now();const f={autoplay:e,delay:s,type:i,repeat:n,repeatDelay:a,repeatType:r,name:l,motionValue:c,element:u,...h},d=u?.KeyframeResolver||De;this.keyframeResolver=new d(o,(m,x,T)=>this.onKeyframesResolved(m,x,f,!T),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,s,i,n){this.keyframeResolver=void 0;const{name:a,type:r,velocity:o,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=k.now(),Ar(e,a,r,o)||((_.instantAnimations||!l)&&u?.(Se(e,i,s)),e[0]=e[e.length-1],ae(i),i.repeat=0);const f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>wr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...i,keyframes:e},d=!c&&Sr(f),m=f.motionValue?.owner?.current,x=d?new vr({...f,element:m}):new Pe(f);x.finished.then(()=>{this.notifyFinished()}).catch(ht),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(e,s){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ur()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Dr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,s){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=s}attachTimeline(e){const s=this.animations.map(i=>i.attachTimeline(e));return()=>{s.forEach((i,n)=>{i&&i(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Ze(this.animations,"duration")}get iterationDuration(){return Ze(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(s=>s[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Ze(t,e){let s=0;for(let i=0;i<t.length;i++){const n=t[i][e];n!==null&&n>s&&(s=n)}return s}class Wa extends Dr{then(e,s){return this.finished.finally(e).then(()=>{})}}function pi(t,e,s,i=0,n=1){const a=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,o=(r-1)*i;return typeof s=="function"?s(a,r):n===1?a*i:o-a*i}const Rr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Mr(t){const e=Rr.exec(t);if(!e)return[,];const[,s,i,n]=e;return[`--${s??i}`,n]}function mi(t,e,s=1){const[i,n]=Mr(t);if(!i)return;const a=window.getComputedStyle(e).getPropertyValue(i);if(a){const r=a.trim();return $s(r)?parseFloat(r):r}return ve(n)?mi(n,e,s+1):n}const Cr={type:"spring",stiffness:500,damping:25,restSpeed:10},Br=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Er={type:"keyframes",duration:.8},kr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fr=(t,{keyframes:e})=>e.length>2?Er:pt.has(t)?t.startsWith("scale")?Br(e[1]):Cr:kr,Lr=t=>t!==null;function Ir(t,{repeat:e,repeatType:s="loop"},i){const n=t.filter(Lr),a=e&&s!=="loop"&&e%2===1?0:n.length-1;return n[a]}function yi(t,e){if(t?.inherit&&e){const{inherit:s,...i}=t;return{...e,...i}}return t}function Re(t,e){const s=t?.[e]??t?.default??t;return s!==t?yi(s,t):s}function Or({when:t,delay:e,delayChildren:s,staggerChildren:i,staggerDirection:n,repeat:a,repeatType:r,repeatDelay:o,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const gi=(t,e,s,i={},n,a)=>r=>{const o=Re(i,t)||{},l=o.delay||i.delay||0;let{elapsed:c=0}=i;c=c-$(l);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-c,onUpdate:f=>{e.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{r(),o.onComplete&&o.onComplete()},name:t,motionValue:e,element:a?void 0:n};Or(o)||Object.assign(u,Fr(t,u)),u.duration&&(u.duration=$(u.duration)),u.repeatDelay&&(u.repeatDelay=$(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ae(u),u.delay===0&&(h=!0)),(_.instantAnimations||_.skipAnimations||n?.shouldSkipAnimations)&&(h=!0,ae(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,h&&!a&&e.get()!==void 0){const f=Ir(u.keyframes,o);if(f!==void 0){E.update(()=>{u.onUpdate(f),u.onComplete()});return}}return o.isSync?new Pe(u):new Pr(u)};function Je(t){const e=[{},{}];return t?.values.forEach((s,i)=>{e[0][i]=s.get(),e[1][i]=s.getVelocity()}),e}function Ti(t,e,s,i){if(typeof e=="function"){const[n,a]=Je(i);e=e(s!==void 0?s:t.custom,n,a)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[n,a]=Je(i);e=e(s!==void 0?s:t.custom,n,a)}return e}function ct(t,e,s){const i=t.getProps();return Ti(i,e,s!==void 0?s:i.custom,t)}const vi=new Set(["width","height","top","left","right","bottom",...dt]),Qe=30,jr=t=>!isNaN(parseFloat(t));class Nr{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const n=k.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=k.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=jr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Te);const i=this.events[e].add(s);return e==="change"?()=>{i(),E.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Qe)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Qe);return Us(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ut(t,e){return new Nr(t,e)}const le=t=>Array.isArray(t);function Ur(t,e,s){t.hasValue(e)?t.getValue(e).set(s):t.addValue(e,ut(s))}function Kr(t){return le(t)?t[t.length-1]||0:t}function Wr(t,e){const s=ct(t,e);let{transitionEnd:i={},transition:n={},...a}=s||{};a={...a,...i};for(const r in a){const o=Kr(a[r]);Ur(t,r,o)}}const L=t=>!!(t&&t.getVelocity);function $r(t){return!!(L(t)&&t.add)}function zr(t,e){const s=t.getValue("willChange");if($r(s))return s.add(e);if(!s&&_.WillChange){const i=new _.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function Me(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const _r="framerAppearId",Xr="data-"+Me(_r);function xi(t){return t.props[Xr]}function Yr({protectedKeys:t,needsAnimating:e},s){const i=t.hasOwnProperty(s)&&e[s]!==!0;return e[s]=!1,i}function Ai(t,e,{delay:s=0,transitionOverride:i,type:n}={}){let{transition:a,transitionEnd:r,...o}=e;const l=t.getDefaultTransition();a=a?yi(a,l):l;const c=a?.reduceMotion;i&&(a=i);const u=[],h=n&&t.animationState&&t.animationState.getState()[n];for(const f in o){const d=t.getValue(f,t.latestValues[f]??null),m=o[f];if(m===void 0||h&&Yr(h,f))continue;const x={delay:s,...Re(a||{},f)},T=d.get();if(T!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===T&&!x.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const V=xi(t);if(V){const v=window.MotionHandoffAnimation(V,f,E);v!==null&&(x.startTime=v,g=!0)}}zr(t,f);const A=c??t.shouldReduceMotion;d.start(gi(f,d,m,A&&vi.has(f)?{type:!1}:x,t,g));const y=d.animation;y&&u.push(y)}if(r){const f=()=>E.update(()=>{r&&Wr(t,r)});u.length?Promise.all(u).then(f):f()}return u}function ce(t,e,s={}){const i=ct(t,e,s.type==="exit"?t.presenceContext?.custom:void 0);let{transition:n=t.getDefaultTransition()||{}}=i||{};s.transitionOverride&&(n=s.transitionOverride);const a=i?()=>Promise.all(Ai(t,i,s)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=n;return Hr(t,e,l,c,u,h,s)}:()=>Promise.resolve(),{when:o}=n;if(o){const[l,c]=o==="beforeChildren"?[a,r]:[r,a];return l().then(()=>c())}else return Promise.all([a(),r(s.delay)])}function Hr(t,e,s=0,i=0,n=0,a=1,r){const o=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),o.push(ce(l,e,{...r,delay:s+(typeof i=="function"?0:i)+pi(t.variantChildren,l,i,n,a)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(o)}function Gr(t,e,s={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const n=e.map(a=>ce(t,a,s));i=Promise.all(n)}else if(typeof e=="string")i=ce(t,e,s);else{const n=typeof e=="function"?ct(t,e,s.custom):e;i=Promise.all(Ai(t,n,s))}return i.then(()=>{t.notify("AnimationComplete",e)})}const qr={test:t=>t==="auto",parse:t=>t},bi=t=>e=>e.test(t),Vi=[ft,p,z,Y,bn,An,qr],ts=t=>Vi.find(bi(t));function Zr(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||zs(t):!0}const Jr=new Set(["brightness","contrast","saturate","opacity"]);function Qr(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=s.match(xe)||[];if(!i)return t;const n=s.replace(i,"");let a=Jr.has(e)?1:0;return i!==s&&(a*=100),e+"("+a+n+")"}const to=/\b([a-z-]*)\(.*?\)/gu,ue={...W,getAnimatableNone:t=>{const e=t.match(to);return e?e.map(Qr).join(" "):t}},he={...W,getAnimatableNone:t=>{const e=W.parse(t);return W.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},es={...ft,transform:Math.round},eo={rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:St,scaleX:St,scaleY:St,scaleZ:St,skew:Y,skewX:Y,skewY:Y,distance:p,translateX:p,translateY:p,translateZ:p,x:p,y:p,z:p,perspective:p,transformPerspective:p,opacity:xt,originX:Ue,originY:Ue,originZ:p},Ce={borderWidth:p,borderTopWidth:p,borderRightWidth:p,borderBottomWidth:p,borderLeftWidth:p,borderRadius:p,borderTopLeftRadius:p,borderTopRightRadius:p,borderBottomRightRadius:p,borderBottomLeftRadius:p,width:p,maxWidth:p,height:p,maxHeight:p,top:p,right:p,bottom:p,left:p,inset:p,insetBlock:p,insetBlockStart:p,insetBlockEnd:p,insetInline:p,insetInlineStart:p,insetInlineEnd:p,padding:p,paddingTop:p,paddingRight:p,paddingBottom:p,paddingLeft:p,paddingBlock:p,paddingBlockStart:p,paddingBlockEnd:p,paddingInline:p,paddingInlineStart:p,paddingInlineEnd:p,margin:p,marginTop:p,marginRight:p,marginBottom:p,marginLeft:p,marginBlock:p,marginBlockStart:p,marginBlockEnd:p,marginInline:p,marginInlineStart:p,marginInlineEnd:p,fontSize:p,backgroundPositionX:p,backgroundPositionY:p,...eo,zIndex:es,fillOpacity:xt,strokeOpacity:xt,numOctaves:es},so={...Ce,color:P,backgroundColor:P,outlineColor:P,fill:P,stroke:P,borderColor:P,borderTopColor:P,borderRightColor:P,borderBottomColor:P,borderLeftColor:P,filter:ue,WebkitFilter:ue,mask:he,WebkitMask:he},Si=t=>so[t],io=new Set([ue,he]);function wi(t,e){let s=Si(t);return io.has(s)||(s=W),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const no=new Set(["auto","none","0"]);function ro(t,e,s){let i=0,n;for(;i<t.length&&!n;){const a=t[i];typeof a=="string"&&!no.has(a)&&At(a).values.length&&(n=t[i]),i++}if(n&&s)for(const a of e)t[a]=wi(s,n)}class oo extends De{constructor(e,s,i,n,a){super(e,s,i,n,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),ve(h))){const f=mi(h,s.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!vi.has(i)||e.length!==2)return;const[n,a]=e,r=ts(n),o=ts(a),l=Ne(n),c=Ne(a);if(l!==c&&H[i]){this.needsMeasurement=!0;return}if(r!==o)if(He(r)&&He(o))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else H[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,i=[];for(let n=0;n<e.length;n++)(e[n]===null||Zr(e[n]))&&i.push(n);i.length&&ro(e,i,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=H[i](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const n=s[s.length-1];n!==void 0&&e.getValue(i,n).jump(n,!1)}measureEndState(){const{element:e,name:s,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const n=e.getValue(s);n&&n.jump(this.measuredOrigin,!1);const a=i.length-1,r=i[a];i[a]=H[s](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,l])=>{e.getValue(o).set(l)}),this.resolveNoneKeyframes()}}const ao=new Set(["opacity","clipPath","filter","transform"]);function Pi(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);const n=s?.[t]??i.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(i=>i!=null)}const Di=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function lo(t){return _s(t)&&"offsetHeight"in t}const{schedule:Ri}=Ys(queueMicrotask,!1),U={x:!1,y:!1};function Mi(){return U.x||U.y}function $a(t){return t==="x"||t==="y"?U[t]?null:(U[t]=!0,()=>{U[t]=!1}):U.x||U.y?null:(U.x=U.y=!0,()=>{U.x=U.y=!1})}function Ci(t,e){const s=Pi(t),i=new AbortController,n={passive:!0,...e,signal:i.signal};return[s,n,()=>i.abort()]}function co(t){return!(t.pointerType==="touch"||Mi())}function za(t,e,s={}){const[i,n,a]=Ci(t,s);return i.forEach(r=>{let o=!1,l=!1,c;const u=()=>{r.removeEventListener("pointerleave",m)},h=T=>{c&&(c(T),c=void 0),u()},f=T=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(T))},d=()=>{o=!0,window.addEventListener("pointerup",f,n),window.addEventListener("pointercancel",f,n)},m=T=>{if(T.pointerType!=="touch"){if(o){l=!0;return}h(T)}},x=T=>{if(!co(T))return;l=!1;const g=e(r,T);typeof g=="function"&&(c=g,r.addEventListener("pointerleave",m,n))};r.addEventListener("pointerenter",x,n),r.addEventListener("pointerdown",d,n)}),a}const Bi=(t,e)=>e?t===e?!0:Bi(t,e.parentElement):!1,uo=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ho=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fo(t){return ho.has(t.tagName)||t.isContentEditable===!0}const po=new Set(["INPUT","SELECT","TEXTAREA"]);function _a(t){return po.has(t.tagName)||t.isContentEditable===!0}const Pt=new WeakSet;function ss(t){return e=>{e.key==="Enter"&&t(e)}}function Wt(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const mo=(t,e)=>{const s=t.currentTarget;if(!s)return;const i=ss(()=>{if(Pt.has(s))return;Wt(s,"down");const n=ss(()=>{Wt(s,"up")}),a=()=>Wt(s,"cancel");s.addEventListener("keyup",n,e),s.addEventListener("blur",a,e)});s.addEventListener("keydown",i,e),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),e)};function is(t){return uo(t)&&!Mi()}const ns=new WeakSet;function Xa(t,e,s={}){const[i,n,a]=Ci(t,s),r=o=>{const l=o.currentTarget;if(!is(o)||ns.has(o))return;Pt.add(l),s.stopPropagation&&ns.add(o);const c=e(l,o),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Pt.has(l)&&Pt.delete(l),is(d)&&typeof c=="function"&&c(d,{success:m})},h=d=>{u(d,l===window||l===document||s.useGlobalTarget||Bi(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,n),window.addEventListener("pointercancel",f,n)};return i.forEach(o=>{(s.useGlobalTarget?window:o).addEventListener("pointerdown",r,n),lo(o)&&(o.addEventListener("focus",c=>mo(c,n)),!fo(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function Be(t){return _s(t)&&"ownerSVGElement"in t}const Dt=new WeakMap;let Rt;const Ei=(t,e,s)=>(i,n)=>n&&n[0]?n[0][t+"Size"]:Be(i)&&"getBBox"in i?i.getBBox()[e]:i[s],yo=Ei("inline","width","offsetWidth"),go=Ei("block","height","offsetHeight");function To({target:t,borderBoxSize:e}){Dt.get(t)?.forEach(s=>{s(t,{get width(){return yo(t,e)},get height(){return go(t,e)}})})}function vo(t){t.forEach(To)}function xo(){typeof ResizeObserver>"u"||(Rt=new ResizeObserver(vo))}function Ao(t,e){Rt||xo();const s=Pi(t);return s.forEach(i=>{let n=Dt.get(i);n||(n=new Set,Dt.set(i,n)),n.add(e),Rt?.observe(i)}),()=>{s.forEach(i=>{const n=Dt.get(i);n?.delete(e),n?.size||Rt?.unobserve(i)})}}const Mt=new Set;let rt;function bo(){rt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Mt.forEach(e=>e(t))},window.addEventListener("resize",rt)}function Vo(t){return Mt.add(t),rt||bo(),()=>{Mt.delete(t),!Mt.size&&typeof rt=="function"&&(window.removeEventListener("resize",rt),rt=void 0)}}function Ya(t,e){return typeof t=="function"?Vo(t):Ao(t,e)}function So(t){return Be(t)&&t.tagName==="svg"}const wo=[...Vi,P,W],Po=t=>wo.find(bi(t)),rs=()=>({translate:0,scale:1,origin:0,originPoint:0}),ot=()=>({x:rs(),y:rs()}),os=()=>({min:0,max:0}),R=()=>({x:os(),y:os()}),Do=new WeakMap;function ki(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ee(t){return typeof t=="string"||Array.isArray(t)}const ke=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fe=["initial",...ke];function Fi(t){return ki(t.animate)||Fe.some(e=>Ee(t[e]))}function Ro(t){return!!(Fi(t)||t.variants)}function Mo(t,e,s){for(const i in e){const n=e[i],a=s[i];if(L(n))t.addValue(i,n);else if(L(a))t.addValue(i,ut(n,{owner:t}));else if(a!==n)if(t.hasValue(i)){const r=t.getValue(i);r.liveStyle===!0?r.jump(n):r.hasAnimated||r.set(n)}else{const r=t.getStaticValue(i);t.addValue(i,ut(r!==void 0?r:n,{owner:t}))}}for(const i in s)e[i]===void 0&&t.removeValue(i);return e}const fe={current:null},Li={current:!1},Co=typeof window<"u";function Bo(){if(Li.current=!0,!!Co)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fe.current=t.matches;t.addEventListener("change",e),e()}else fe.current=!1}const as=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let kt={};function Ha(t){kt=t}function Ga(){return kt}class Ii{scrapeMotionValuesFromProps(e,s,i){return{}}constructor({parent:e,props:s,presenceContext:i,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:r,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=De,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=k.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,E.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=s,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=l,this.blockInitialAnimation=!!r,this.isControllingVariants=Fi(s),this.isVariantNode=Ro(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(s,{},this);for(const d in f){const m=f[d];c[d]!==void 0&&L(m)&&m.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const s in this.initialValues)this.values.get(s)?.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,Do.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Li.current||Bo(),this.shouldReduceMotion=fe.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),et(this.notifyUpdate),et(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const s=this.features[e];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,s){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),s.accelerate&&ao.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:o,times:l,ease:c,duration:u}=s.accelerate,h=new fi({element:this.current,name:e,keyframes:o,times:l,ease:c,duration:$(u)}),f=r(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const i=pt.has(e);i&&this.onBindTransform&&this.onBindTransform();const n=s.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&E.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{n(),a&&a(),s.owner&&s.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in kt){const s=kt[e];if(!s)continue;const{isEnabled:i,Feature:n}=s;if(!this.features[e]&&n&&i(this.props)&&(this.features[e]=new n(this)),this.features[e]){const a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):R()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,s){this.latestValues[e]=s}update(e,s){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<as.length;i++){const n=as[i];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const a="on"+n,r=e[a];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Mo(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(e),()=>s.variantChildren.delete(e)}addValue(e,s){const i=this.values.get(e);s!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,s),this.values.set(e,s),this.latestValues[e]=s.get())}removeValue(e){this.values.delete(e);const s=this.valueSubscriptions.get(e);s&&(s(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,s){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&s!==void 0&&(i=ut(s===null?void 0:s,{owner:this}),this.addValue(e,i)),i}readValue(e,s){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&($s(i)||zs(i))?i=parseFloat(i):!Po(i)&&W.test(s)&&(i=wi(e,s)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,s){this.baseTarget[e]=s}getBaseTarget(e){const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const a=Ti(this.props,s,this.presenceContext?.custom);a&&(i=a[e])}if(s&&i!==void 0)return i;const n=this.getBaseTargetFromProps(this.props,e);return n!==void 0&&!L(n)?n:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,s){return this.events[e]||(this.events[e]=new Te),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}scheduleRenderMicrotask(){Ri.render(this.render)}}class Oi extends Ii{constructor(){super(...arguments),this.KeyframeResolver=oo}sortInstanceNodePosition(e,s){return e.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(e,s){const i=e.style;return i?i[s]:void 0}removeValueFromRenderState(e,{vars:s,style:i}){delete s[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class qa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Eo({top:t,left:e,right:s,bottom:i}){return{x:{min:e,max:s},y:{min:t,max:i}}}function Za({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ko(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function $t(t){return t===void 0||t===1}function de({scale:t,scaleX:e,scaleY:s}){return!$t(t)||!$t(e)||!$t(s)}function Z(t){return de(t)||ji(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ji(t){return ls(t.x)||ls(t.y)}function ls(t){return t&&t!=="0%"}function Ft(t,e,s){const i=t-s,n=e*i;return s+n}function cs(t,e,s,i,n){return n!==void 0&&(t=Ft(t,n,i)),Ft(t,s,i)+e}function pe(t,e=0,s=1,i,n){t.min=cs(t.min,e,s,i,n),t.max=cs(t.max,e,s,i,n)}function Ni(t,{x:e,y:s}){pe(t.x,e.translate,e.scale,e.originPoint),pe(t.y,s.translate,s.scale,s.originPoint)}const us=.999999999999,hs=1.0000000000001;function Fo(t,e,s,i=!1){const n=s.length;if(!n)return;e.x=e.y=1;let a,r;for(let o=0;o<n;o++){a=s[o],r=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&<(t,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ni(t,r)),i&&Z(a.latestValues)&<(t,a.latestValues))}e.x<hs&&e.x>us&&(e.x=1),e.y<hs&&e.y>us&&(e.y=1)}function at(t,e){t.min=t.min+e,t.max=t.max+e}function fs(t,e,s,i,n=.5){const a=M(t.min,t.max,n);pe(t,e,s,a,i)}function lt(t,e){fs(t.x,e.x,e.scaleX,e.scale,e.originX),fs(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ui(t,e){return Eo(ko(t.getBoundingClientRect(),e))}function Ja(t,e,s){const i=Ui(t,s),{scroll:n}=e;return n&&(at(i.x,n.offset.x),at(i.y,n.offset.y)),i}const Lo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Io=dt.length;function Oo(t,e,s){let i="",n=!0;for(let a=0;a<Io;a++){const r=dt[a],o=t[r];if(o===void 0)continue;let l=!0;if(typeof o=="number")l=o===(r.startsWith("scale")?1:0);else{const c=parseFloat(o);l=r.startsWith("scale")?c===1:c===0}if(!l||s){const c=Di(o,Ce[r]);if(!l){n=!1;const u=Lo[r]||r;i+=`${u}(${c}) `}s&&(e[r]=c)}}return i=i.trim(),s?i=s(e,n?"":i):n&&(i="none"),i}function Ki(t,e,s){const{style:i,vars:n,transformOrigin:a}=t;let r=!1,o=!1;for(const l in e){const c=e[l];if(pt.has(l)){r=!0;continue}else if(Gs(l)){n[l]=c;continue}else{const u=Di(c,Ce[l]);l.startsWith("origin")?(o=!0,a[l]=u):i[l]=u}}if(e.transform||(r||s?i.transform=Oo(e,t.transform,s):i.transform&&(i.transform="none")),o){const{originX:l="50%",originY:c="50%",originZ:u=0}=a;i.transformOrigin=`${l} ${c} ${u}`}}function Wi(t,{style:e,vars:s},i,n){const a=t.style;let r;for(r in e)a[r]=e[r];n?.applyProjectionStyles(a,i);for(r in s)a.setProperty(r,s[r])}function ds(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(p.test(t))t=parseFloat(t);else return t;const s=ds(t,e.target.x),i=ds(t,e.target.y);return`${s}% ${i}%`}},jo={correct:(t,{treeScale:e,projectionDelta:s})=>{const i=t,n=W.parse(t);if(n.length>5)return i;const a=W.createTransformer(t),r=typeof n[0]!="number"?1:0,o=s.x.scale*e.x,l=s.y.scale*e.y;n[0+r]/=o,n[1+r]/=l;const c=M(o,l,.5);return typeof n[2+r]=="number"&&(n[2+r]/=c),typeof n[3+r]=="number"&&(n[3+r]/=c),a(n)}},me={borderRadius:{...mt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomLeftRadius:mt,borderBottomRightRadius:mt,boxShadow:jo};function No(t,{layout:e,layoutId:s}){return pt.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!me[t]||t==="opacity")}function $i(t,e,s){const i=t.style,n=e?.style,a={};if(!i)return a;for(const r in i)(L(i[r])||n&&L(n[r])||No(r,t)||s?.getValue(r)?.liveStyle!==void 0)&&(a[r]=i[r]);return a}function Uo(t){return window.getComputedStyle(t)}class Qa extends Oi{constructor(){super(...arguments),this.type="html",this.renderInstance=Wi}readValueFromInstance(e,s){if(pt.has(s))return this.projection?.isProjecting?se(s):rr(e,s);{const i=Uo(e),n=(Gs(s)?i.getPropertyValue(s):i[s])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:s}){return Ui(e,s)}build(e,s,i){Ki(e,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,s,i){return $i(e,s,i)}}function Ko(t,e){return t in e}class tl extends Ii{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,s){if(Ko(s,e)){const i=e[s];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,s){delete s.output[e]}measureInstanceViewportBox(){return R()}build(e,s){Object.assign(e.output,s)}renderInstance(e,{output:s}){Object.assign(e,s)}sortInstanceNodePosition(){return 0}}const Wo={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function zo(t,e,s=1,i=0,n=!0){t.pathLength=1;const a=n?Wo:$o;t[a.offset]=`${-i}`,t[a.array]=`${e} ${s}`}const _o=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xo(t,{attrX:e,attrY:s,attrScale:i,pathLength:n,pathSpacing:a=1,pathOffset:r=0,...o},l,c,u){if(Ki(t,o,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const d of _o)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),s!==void 0&&(h.y=s),i!==void 0&&(h.scale=i),n!==void 0&&zo(h,n,a,r,!1)}const zi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Yo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ho(t,e,s,i){Wi(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(zi.has(n)?n:Me(n),e.attrs[n])}function Go(t,e,s){const i=$i(t,e,s);for(const n in t)if(L(t[n])||L(e[n])){const a=dt.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;i[a]=t[n]}return i}class el extends Oi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,s){return e[s]}readValueFromInstance(e,s){if(pt.has(s)){const i=Si(s);return i&&i.default||0}return s=zi.has(s)?s:Me(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,s,i){return Go(e,s,i)}build(e,s,i){Xo(e,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,s,i,n){Ho(e,s,i,n)}mount(e){this.isSVGTag=Yo(e.tagName),super.mount(e)}}const qo=Fe.length;function _i(t){if(!t)return;if(!t.isControllingVariants){const s=t.parent?_i(t.parent)||{}:{};return t.props.initial!==void 0&&(s.initial=t.props.initial),s}const e={};for(let s=0;s<qo;s++){const i=Fe[s],n=t.props[i];(Ee(n)||n===!1)&&(e[i]=n)}return e}function Xi(t,e){if(!Array.isArray(e))return!1;const s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(e[i]!==t[i])return!1;return!0}const Zo=[...ke].reverse(),Jo=ke.length;function Qo(t){return e=>Promise.all(e.map(({animation:s,options:i})=>Gr(t,s,i)))}function sl(t){let e=Qo(t),s=ps(),i=!0;const n=l=>(c,u)=>{const h=ct(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...m}=h;c={...c,...m,...d}}return c};function a(l){e=l(t)}function r(l){const{props:c}=t,u=_i(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let T=0;T<Jo;T++){const g=Zo[T],A=s[g],y=c[g]!==void 0?c[g]:u[g],V=Ee(y),v=g===l?A.isActive:null;v===!1&&(m=T);let S=y===u[g]&&y!==c[g]&&V;if(S&&i&&t.manuallyAnimateOnMount&&(S=!1),A.protectedKeys={...d},!A.isActive&&v===null||!y&&!A.prevProp||ki(y)||typeof y=="boolean")continue;if(g==="exit"&&A.isActive&&v!==!0){A.prevResolvedValues&&(d={...d,...A.prevResolvedValues});continue}const D=ta(A.prevProp,y);let b=D||g===l&&A.isActive&&!S&&V||T>m&&V,F=!1;const I=Array.isArray(y)?y:[y];let st=I.reduce(n(g),{});v===!1&&(st={});const{prevResolvedValues:Le={}}=A,sn={...Le,...st},Ie=C=>{b=!0,f.has(C)&&(F=!0,f.delete(C)),A.needsAnimating[C]=!0;const O=t.getValue(C);O&&(O.liveStyle=!1)};for(const C in sn){const O=st[C],G=Le[C];if(d.hasOwnProperty(C))continue;let it=!1;le(O)&&le(G)?it=!Xi(O,G):it=O!==G,it?O!=null?Ie(C):f.add(C):O!==void 0&&f.has(C)?Ie(C):A.protectedKeys[C]=!0}A.prevProp=y,A.prevResolvedValues=st,A.isActive&&(d={...d,...st}),i&&t.blockInitialAnimation&&(b=!1);const Oe=S&&D;b&&(!Oe||F)&&h.push(...I.map(C=>{const O={type:g};if(typeof C=="string"&&i&&!Oe&&t.manuallyAnimateOnMount&&t.parent){const{parent:G}=t,it=ct(G,C);if(G.enteringChildren&&it){const{delayChildren:nn}=it.transition||{};O.delay=pi(G.enteringChildren,t,nn)}}return{animation:C,options:O}}))}if(f.size){const T={};if(typeof c.initial!="boolean"){const g=ct(t,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(T.transition=g.transition)}f.forEach(g=>{const A=t.getBaseTarget(g),y=t.getValue(g);y&&(y.liveStyle=!0),T[g]=A??null}),h.push({animation:T})}let x=!!h.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(h):Promise.resolve()}function o(l,c){if(s[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,c)),s[l].isActive=c;const u=r(l);for(const h in s)s[h].protectedKeys={};return u}return{animateChanges:r,setActive:o,setAnimateFunction:a,getState:()=>s,reset:()=>{s=ps()}}}function ta(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Xi(e,t):!1}function q(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ps(){return{animate:q(!0),whileInView:q(),whileHover:q(),whileTap:q(),whileDrag:q(),whileFocus:q(),exit:q()}}function ms(t,e){t.min=e.min,t.max=e.max}function N(t,e){ms(t.x,e.x),ms(t.y,e.y)}function ys(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Yi=1e-4,ea=1-Yi,sa=1+Yi,Hi=.01,ia=0-Hi,na=0+Hi;function j(t){return t.max-t.min}function ra(t,e,s){return Math.abs(t-e)<=s}function gs(t,e,s,i=.5){t.origin=i,t.originPoint=M(e.min,e.max,t.origin),t.scale=j(s)/j(e),t.translate=M(s.min,s.max,t.origin)-t.originPoint,(t.scale>=ea&&t.scale<=sa||isNaN(t.scale))&&(t.scale=1),(t.translate>=ia&&t.translate<=na||isNaN(t.translate))&&(t.translate=0)}function vt(t,e,s,i){gs(t.x,e.x,s.x,i?i.originX:void 0),gs(t.y,e.y,s.y,i?i.originY:void 0)}function Ts(t,e,s){t.min=s.min+e.min,t.max=t.min+j(e)}function oa(t,e,s){Ts(t.x,e.x,s.x),Ts(t.y,e.y,s.y)}function vs(t,e,s){t.min=e.min-s.min,t.max=t.min+j(e)}function Lt(t,e,s){vs(t.x,e.x,s.x),vs(t.y,e.y,s.y)}function xs(t,e,s,i,n){return t-=e,t=Ft(t,1/s,i),n!==void 0&&(t=Ft(t,1/n,i)),t}function aa(t,e=0,s=1,i=.5,n,a=t,r=t){if(z.test(e)&&(e=parseFloat(e),e=M(r.min,r.max,e/100)-r.min),typeof e!="number")return;let o=M(a.min,a.max,i);t===a&&(o-=e),t.min=xs(t.min,e,s,o,n),t.max=xs(t.max,e,s,o,n)}function As(t,e,[s,i,n],a,r){aa(t,e[s],e[i],e[n],e.scale,a,r)}const la=["x","scaleX","originX"],ca=["y","scaleY","originY"];function bs(t,e,s,i){As(t.x,e,la,s?s.x:void 0,i?i.x:void 0),As(t.y,e,ca,s?s.y:void 0,i?i.y:void 0)}function Vs(t){return t.translate===0&&t.scale===1}function Gi(t){return Vs(t.x)&&Vs(t.y)}function Ss(t,e){return t.min===e.min&&t.max===e.max}function ua(t,e){return Ss(t.x,e.x)&&Ss(t.y,e.y)}function ws(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qi(t,e){return ws(t.x,e.x)&&ws(t.y,e.y)}function Ps(t){return j(t.x)/j(t.y)}function Ds(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Rs(t){return[t("x"),t("y")]}function ha(t,e,s){let i="";const n=t.x.translate/e.x,a=t.y.translate/e.y,r=s?.z||0;if((n||a||r)&&(i=`translate3d(${n}px, ${a}px, ${r}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=s;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const o=t.x.scale*e.x,l=t.y.scale*e.y;return(o!==1||l!==1)&&(i+=`scale(${o}, ${l})`),i||"none"}const Zi=["TopLeft","TopRight","BottomLeft","BottomRight"],fa=Zi.length,Ms=t=>typeof t=="string"?parseFloat(t):t,Cs=t=>typeof t=="number"||p.test(t);function da(t,e,s,i,n,a){n?(t.opacity=M(0,s.opacity??1,pa(i)),t.opacityExit=M(e.opacity??1,0,ma(i))):a&&(t.opacity=M(e.opacity??1,s.opacity??1,i));for(let r=0;r<fa;r++){const o=`border${Zi[r]}Radius`;let l=Bs(e,o),c=Bs(s,o);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Cs(l)===Cs(c)?(t[o]=Math.max(M(Ms(l),Ms(c),i),0),(z.test(c)||z.test(l))&&(t[o]+="%")):t[o]=c}(e.rotate||s.rotate)&&(t.rotate=M(e.rotate||0,s.rotate||0,i))}function Bs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const pa=Ji(0,.5,hn),ma=Ji(.5,.95,ht);function Ji(t,e,s){return i=>i<t?0:i>e?1:s(ge(t,e,i))}function ya(t,e,s){const i=L(t)?t:ut(t);return i.start(gi("",i,e,s)),i.animation}function ga(t,e,s,i={passive:!0}){return t.addEventListener(e,s,i),()=>t.removeEventListener(e,s)}const Ta=(t,e)=>t.depth-e.depth;class va{constructor(){this.children=[],this.isDirty=!1}add(e){Xs(this.children,e),this.isDirty=!0}remove(e){Gt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ta),this.isDirty=!1,this.children.forEach(e)}}function xa(t,e){const s=k.now(),i=({timestamp:n})=>{const a=n-s;a>=e&&(et(i),t(a-e))};return E.setup(i,!0),()=>et(i)}function zt(t){return L(t)?t.get():t}class Aa{constructor(){this.members=[]}add(e){Xs(this.members,e);for(let s=this.members.length-1;s>=0;s--){const i=this.members[s];if(i===e||i===this.lead||i===this.prevLead)continue;const n=i.instance;n&&n.isConnected===!1&&i.isPresent!==!1&&!i.snapshot&&Gt(this.members,i)}e.scheduleRender()}remove(e){if(Gt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){const s=this.members.findIndex(n=>e===n);if(s===0)return!1;let i;for(let n=s;n>=0;n--){const a=this.members[n],r=a.instance;if(a.isPresent!==!1&&(!r||r.isConnected!==!1)){i=a;break}}return i?(this.promote(i),!0):!1}promote(e,s){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender();const n=i.options.layoutDependency,a=e.options.layoutDependency;if(!(n!==void 0&&a!==void 0&&n===a)){const l=i.instance;l&&l.isConnected===!1&&!i.snapshot||(e.resumeFrom=i,s&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:o}=e.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:s,resumingFrom:i}=e;s.onExitComplete&&s.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const _t={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Xt=["","X","Y","Z"],ba=1e3;let Va=0;function Yt(t,e,s,i){const{latestValues:n}=e;n[t]&&(s[t]=n[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Qi(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=xi(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:n,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",E,!(n||a))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Qi(i)}function tn({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:i,resetTransform:n}){return class{constructor(r={},o=e?.()){this.id=Va++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Pa),this.nodes.forEach(Ca),this.nodes.forEach(Ba),this.nodes.forEach(Da)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new va)}addEventListener(r,o){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Te),this.eventHandlers.get(r).add(o)}notifyListeners(r,...o){const l=this.eventHandlers.get(r);l&&l.notify(...o)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Be(r)&&!So(r),this.instance=r;const{layoutId:o,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;E.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=xa(f,250),_t.hasAnimatedSinceResize&&(_t.hasAnimatedSinceResize=!1,this.nodes.forEach(Fs)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&c&&(o||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Ia,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=c.getProps(),g=!this.targetLayout||!qi(this.targetLayout,d),A=!h&&f;if(this.options.layoutRoot||this.resumeFrom||A||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Re(m,"layout"),onPlay:x,onComplete:T};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,A)}else h||Fs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),et(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ea),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Es);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ks);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ma),this.nodes.forEach(Sa),this.nodes.forEach(wa)):this.nodes.forEach(ks),this.clearAllSnapshots();const o=k.now();B.delta=X(0,1e3/60,o-B.timestamp),B.timestamp=o,B.isProcessing=!0,It.update.process(B),It.preRender.process(B),It.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ri.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ra),this.sharedNodes.forEach(ka)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!j(this.snapshot.measuredBox.x)&&!j(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=R(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(o=!1),o&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(o||Z(this.latestValues)||u)&&(n(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return r&&(l=this.removeTransform(l)),Oa(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return R();const o=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ja))){const{scroll:c}=this.root;c&&(at(o.x,c.offset.x),at(o.y,c.offset.y))}return o}removeElementScroll(r){const o=R();if(N(o,r),this.scroll?.wasRoot)return o;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&N(o,r),at(o.x,u.offset.x),at(o.y,u.offset.y))}return o}applyTransform(r,o=!1){const l=R();N(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&<(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Z(u.latestValues)&<(l,u.latestValues)}return Z(this.latestValues)&<(l,this.latestValues),l}removeTransform(r){const o=R();N(o,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Z(c.latestValues))continue;de(c.latestValues)&&c.updateSnapshot();const u=R(),h=c.measurePageBox();N(u,h),bs(o,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Z(this.latestValues)&&bs(o,this.latestValues),o}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=B.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),oa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):N(this.target,this.layout.layoutBox),Ni(this.target,this.targetDelta)):N(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||de(this.parent.latestValues)||ji(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,o,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),Lt(this.relativeTargetOrigin,o,l),N(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),o=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===B.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;N(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Fo(this.layoutCorrected,this.treeScale,this.path,o),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=R());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ys(this.prevProjectionDelta.x,this.projectionDelta.x),ys(this.prevProjectionDelta.y,this.projectionDelta.y)),vt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ot(),this.projectionDelta=ot(),this.projectionDeltaWithTransform=ot()}setAnimationOrigin(r,o=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ot();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=R(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=d!==m,T=this.getStack(),g=!T||T.members.length<=1,A=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(La));this.animationProgress=0;let y;this.mixTargetDelta=V=>{const v=V/1e3;Ls(h.x,r.x,v),Ls(h.y,r.y,v),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Fa(this.relativeTarget,this.relativeTargetOrigin,f,v),y&&ua(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=R()),N(y,this.relativeTarget)),x&&(this.animationValues=u,da(u,c,this.latestValues,v,A,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(et(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{_t.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ut(0)),this.motionValue.jump(0,!1),this.currentAnimation=ya(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),r.onUpdate&&r.onUpdate(o)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ba),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:u}=r;if(!(!o||!l||!c)){if(this!==r&&this.layout&&c&&en(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||R();const h=j(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=j(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}N(o,l),lt(o,u),vt(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(r,o){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Aa),this.sharedNodes.get(r).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let o=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const c={};l.z&&Yt("z",r,c,this.animationValues);for(let u=0;u<Xt.length;u++)Yt(`rotate${Xt[u]}`,r,c,this.animationValues),Yt(`skew${Xt[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=zt(o?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=zt(o?.pointerEvents)||""),this.hasProjected&&!Z(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=ha(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in me){if(u[m]===void 0)continue;const{correct:x,applyTo:T,isCSSVariable:g}=me[m],A=h==="none"?u[m]:x(u[m],c);if(T){const y=T.length;for(let V=0;V<y;V++)r[T[V]]=A}else g?this.options.visualElement.renderState.vars[m]=A:r[m]=A}this.options.layoutId&&(r.pointerEvents=c===this?zt(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Es),this.root.sharedNodes.clear()}}}function Sa(t){t.updateLayout()}function wa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:n}=t.options,a=e.source!==t.layout.source;n==="size"?Rs(u=>{const h=a?e.measuredBox[u]:e.layoutBox[u],f=j(h);h.min=s[u].min,h.max=h.min+f}):en(n,e.layoutBox,s)&&Rs(u=>{const h=a?e.measuredBox[u]:e.layoutBox[u],f=j(s[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const r=ot();vt(r,s,e.layoutBox);const o=ot();a?vt(o,t.applyTransform(i,!0),e.measuredBox):vt(o,s,e.layoutBox);const l=!Gi(r);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=R();Lt(d,e.layoutBox,h.layoutBox);const m=R();Lt(m,s,f.layoutBox),qi(d,m)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:o,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Pa(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Da(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ra(t){t.clearSnapshot()}function Es(t){t.clearMeasurements()}function ks(t){t.isLayoutDirty=!1}function Ma(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Fs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ca(t){t.resolveTargetDelta()}function Ba(t){t.calcProjection()}function Ea(t){t.resetSkewAndRotation()}function ka(t){t.removeLeadSnapshot()}function Ls(t,e,s){t.translate=M(e.translate,0,s),t.scale=M(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function Is(t,e,s,i){t.min=M(e.min,s.min,i),t.max=M(e.max,s.max,i)}function Fa(t,e,s,i){Is(t.x,e.x,s.x,i),Is(t.y,e.y,s.y,i)}function La(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Ia={duration:.45,ease:[.4,0,.1,1]},Os=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),js=Os("applewebkit/")&&!Os("chrome/")?Math.round:ht;function Ns(t){t.min=js(t.min),t.max=js(t.max)}function Oa(t){Ns(t.x),Ns(t.y)}function en(t,e,s){return t==="position"||t==="preserve-aspect"&&!ra(Ps(e),Ps(s),.2)}function ja(t){return t!==t.root&&t.scroll?.wasRoot}const Na=tn({attachResizeListener:(t,e)=>ga(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ht={current:void 0},nl=tn({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ht.current){const t=new Na({});t.mount(window),t.setOptions({layoutScroll:!0}),Ht.current=t}return Ht.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});export{So as $,Rs as A,Ja as B,Za as C,Eo as D,zr as E,qa as F,gi as G,Qa as H,$a as I,Ya as J,z as K,_a as L,Ri as M,_t as N,nl as O,za as P,Xa as Q,Li as R,el as S,Bo as T,fe as U,Pi as V,qn as W,Nn as X,Gn as Y,hi as Z,Be as _,Fi as a,Do as a0,tl as a1,ya as a2,Ai as a3,ut as a4,Et as a5,Wa as a6,Ee as b,L as c,No as d,Ki as e,Xo as f,Ga as g,Yo as h,lo as i,Ro as j,ki as k,Ti as l,$i as m,Go as n,Xr as o,sl as p,uo as q,zt as r,Ha as s,ga as t,B as u,E as v,et as w,M as x,j as y,R as z};
|