@xopcai/xopc 0.0.145 → 0.0.147
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 +2 -2
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/demo-memory/src/index.js +6 -4
- package/dist/extensions/demo-memory/src/index.js.map +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/Combination-14nmIgxH.js +41 -0
- package/dist/gateway/static/root/assets/activity-store-DXeSSlw1.js +1 -0
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BEUxdhZx.js → agent-avatar-dicebear-CFdJKSjY.js} +1 -1
- package/dist/gateway/static/root/assets/agents-DKjbRpbA.js +2 -0
- package/dist/gateway/static/root/assets/api-Bs69B5zA.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CRHSZJWi.js → app-management-settings-panel-ag1ViXT_.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BunADYJb.js → appearance-settings-C6iMpwOM.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-CpX3lBFF.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-B6vTkH2A.js → archive-plugin-Dwi3mIBy.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BjZXzaNv.js → attachment-load-BaCDoq40.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-ZDA-Stg1.js → automation-suggestion-card-CwqtFgnw.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-DlupOxFQ.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DYZfLvPz.js → binary-plugins-DoAYhsxa.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-C3MUlYC9.js → block-editor-Bw72pO7S.js} +31 -31
- package/dist/gateway/static/root/assets/browser-settings-page-BwLoUBcZ.js +8 -0
- package/dist/gateway/static/root/assets/capability-presets-api-vdbAR65Q.js +1 -0
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-BAsKbJgm.js +2 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-fTlTnWB4.js → channel-recipient-api-rTG26jpV.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-CxFWy0cE.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-OKlqTtKJ.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-BVFNT2zW.js → connector-logo-DIMP4NWY.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BjQQwX62.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-_jUmoXd3.js → desktop-pet-kQq2e0BN.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DwGOy4AQ.js → desktop-pet-settings-B6vtozMY.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-akvF0F-u.js → directory-picker-path-field-Dn5-e3v4.js} +1 -1
- package/dist/gateway/static/root/assets/dist-C230izr8.js +1 -0
- package/dist/gateway/static/root/assets/dist-CxGUk8J-.js +1 -0
- package/dist/gateway/static/root/assets/dreaming-settings-BzwIujPG.js +3 -0
- package/dist/gateway/static/root/assets/extension-debug-page-D_e_hsEy.js +1 -0
- package/dist/gateway/static/root/assets/{extension-page-CwWktRNz.js → extension-page-D15CWHBd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CuggWOIl.js → extension-settings-page-D4P0n1om.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-B7sxIbza.js → gateway-config-api-B4qZctjG.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DIv0eKMf.js → gateway-settings-BvndV7TP.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DtoLihQE.js → gateway-startup-retry-BpgMunEb.js} +1 -1
- package/dist/gateway/static/root/assets/{goal-create-dialog-C4Kw0mfS.js → goal-create-dialog-DrVHKXHq.js} +1 -1
- package/dist/gateway/static/root/assets/goal-detail-page-PHlCwv68.js +4 -0
- package/dist/gateway/static/root/assets/{goals-config-api-B0jm5JaA.js → goals-config-api-B6YJB_ct.js} +1 -1
- package/dist/gateway/static/root/assets/goals-page-Hg9uyO6e.js +2 -0
- package/dist/gateway/static/root/assets/{goals-settings-N5_iL7es.js → goals-settings-BROWCIcL.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-XzH3lbRR.js → heartbeat-settings-CoCwIOIg.js} +1 -1
- package/dist/gateway/static/root/assets/index-CxkNzw3e.js +259 -0
- package/dist/gateway/static/root/assets/index-DjCSOyaN.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-Bm_AIYQ7.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-BJWFcxwG.js +2 -0
- package/dist/gateway/static/root/assets/local-apps-page-BsiZMrEf.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-CiM-D9jA.js → locale-store-Bp8joZck.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DOmK61ey.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-5rJx5flj.js → markdown-split-Dy7QpaAz.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DYXccwAd.js → media-plugins-3Lxliy9D.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CQGpD-dC.js +5 -0
- package/dist/gateway/static/root/assets/models-hub-panel-DGCZom4o.js +2 -0
- package/dist/gateway/static/root/assets/{notes-page-BgLyndCO.js → notes-page-BJtT4vSf.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-B_bN7cOR.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-6Al9_sGz.js → page-tabs-DKB6RDre.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Cm3G72Hv.js → preview-open-alternatives-Br_YhYHp.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Dq8JouJj.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DvfL7fSe.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-DqwMXSXP.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-BYtfzu_F.js → save-bar-controls-BgIE9BBh.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-CvIRc6yK.js → schedule-field-BXDP-oMz.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-CQuKx0n7.js → schema-form-Dhv-SmjG.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-B_mOZkQk.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BHGmH6YS.js +1 -0
- package/dist/gateway/static/root/assets/{settings-collapsible-section-CF3HHM-t.js → settings-collapsible-section-CUTExnlK.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-form-section-CwWjoRN6.js → settings-form-section-CmnDhsf0.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-aUFmJa13.js → settings-loading-skeleton-B79dq-XY.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-B2UUU9TF.js → settings-page-Db8uAv3X.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-DqpbTWqI.js → settings-page-layout-DaFwstQw.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BUSEj0KK.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BOhlPsS1.js → share-preview-page-Bi00uXzV.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DzsTYfuX.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DSsdU081.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DeB1tQZL.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CWxSvuwD.js → system-settings-panel-Cxaph7hW.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-C9Dxcppm.js → theme-store-eCTN1RpG.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-qROAvqTw.js → typed-models-lib-CcZ_tyFY.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-DE9cpn4G.js → use-channel-catalog-C4PWbNoi.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-QTVMx_hG.js +1 -0
- package/dist/gateway/static/root/assets/{user-profile-fields-editor-CWxc0ghP.js → user-profile-fields-editor-CPOO9Jz5.js} +1 -1
- package/dist/gateway/static/root/assets/{user-profile-settings-panel-DW-Up6vt.js → user-profile-settings-panel-C8cgtSF7.js} +1 -1
- package/dist/gateway/static/root/assets/{utils-D53uRXVr.js → utils-CiZK2KwH.js} +1 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-b-YZtvUu.js +1 -0
- package/dist/gateway/static/root/assets/work-discovery-page-4zVDOl2G.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-CHe2tfkc.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D_x9ELJp.js → workflow-run-setup-panel-8SLCYeXE.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DEOFqiWn.js +11 -0
- package/dist/gateway/static/root/index.html +10 -9
- package/dist/package.js +1 -1
- package/dist/src/activity/types.d.ts +1 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +1 -1
- package/dist/src/agent/agent-manager.d.ts +1 -1
- package/dist/src/agent/agent-manager.js +5 -4
- package/dist/src/agent/agent-manager.js.map +1 -1
- package/dist/src/agent/background-review/coordinator.js +0 -1
- package/dist/src/agent/background-review/coordinator.js.map +1 -1
- package/dist/src/agent/background-review/settings.d.ts +1 -1
- package/dist/src/agent/background-review/settings.js +10 -17
- package/dist/src/agent/background-review/settings.js.map +1 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.d.ts +1 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js.map +1 -1
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +2 -3
- package/dist/src/agent/bootstrap/load-bootstrap-files.js.map +1 -1
- package/dist/src/agent/code-intelligence/binary.js +1 -1
- package/dist/src/agent/context/project-context.d.ts +14 -0
- package/dist/src/agent/context/project-context.js +23 -1
- package/dist/src/agent/context/project-context.js.map +1 -1
- package/dist/src/agent/context/workspace-templates/AGENTS.md +1 -1
- package/dist/src/agent/context/workspace.d.ts +1 -2
- package/dist/src/agent/context/workspace.js +2 -4
- package/dist/src/agent/context/workspace.js.map +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -2
- package/dist/src/agent/embedded/run-for-session.js.map +1 -1
- package/dist/src/agent/embedded/run-turn.js +6 -1
- package/dist/src/agent/embedded/run-turn.js.map +1 -1
- package/dist/src/agent/embedded/types.d.ts +17 -0
- package/dist/src/agent/memory/builtin-memory-store.d.ts +2 -2
- package/dist/src/agent/memory/builtin-memory-store.js +2 -2
- package/dist/src/agent/memory/builtin-memory-store.js.map +1 -1
- package/dist/src/agent/memory/builtin-provider.d.ts +1 -3
- package/dist/src/agent/memory/builtin-provider.js +21 -48
- package/dist/src/agent/memory/builtin-provider.js.map +1 -1
- package/dist/src/agent/memory/context/planner.js +48 -9
- package/dist/src/agent/memory/context/planner.js.map +1 -1
- package/dist/src/agent/memory/context/types.d.ts +7 -1
- package/dist/src/agent/memory/context-fence.js +1 -1
- package/dist/src/agent/memory/context-fence.js.map +1 -1
- package/dist/src/agent/memory/create-memory-manager.js +2 -9
- package/dist/src/agent/memory/create-memory-manager.js.map +1 -1
- package/dist/src/agent/memory/dreaming/config.js +5 -10
- package/dist/src/agent/memory/dreaming/config.js.map +1 -1
- package/dist/src/agent/memory/dreaming/promotion-lifecycle.js +2 -2
- package/dist/src/agent/memory/dreaming/promotion-lifecycle.js.map +1 -1
- package/dist/src/agent/memory/dreaming/scope.d.ts +2 -3
- package/dist/src/agent/memory/dreaming/scope.js +8 -8
- package/dist/src/agent/memory/dreaming/scope.js.map +1 -1
- package/dist/src/agent/memory/manager.d.ts +1 -5
- package/dist/src/agent/memory/manager.js +2 -23
- package/dist/src/agent/memory/manager.js.map +1 -1
- package/dist/src/agent/memory/memory-config.d.ts +3 -3
- package/dist/src/agent/memory/memory-config.js +9 -14
- package/dist/src/agent/memory/memory-config.js.map +1 -1
- package/dist/src/agent/memory/types.d.ts +9 -5
- package/dist/src/agent/memory/understanding/service.js +21 -8
- package/dist/src/agent/memory/understanding/service.js.map +1 -1
- package/dist/src/agent/memory/understanding/types.d.ts +5 -0
- package/dist/src/agent/memory/user-context-coordinator.d.ts +1 -1
- package/dist/src/agent/memory/user-context-coordinator.js +6 -2
- package/dist/src/agent/memory/user-context-coordinator.js.map +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +2 -2
- package/dist/src/agent/orchestration/agent-orchestrator.js.map +1 -1
- package/dist/src/agent/prompt/memory/index.d.ts +1 -2
- package/dist/src/agent/prompt/memory/index.js +6 -7
- package/dist/src/agent/prompt/memory/index.js.map +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.js.map +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +13 -2
- package/dist/src/agent/service/direct-turn-helpers.js.map +1 -1
- package/dist/src/agent/tools/curated-memory-tool.js +4 -4
- package/dist/src/agent/tools/curated-memory-tool.js.map +1 -1
- package/dist/src/agent/tools/factory.d.ts +1 -1
- package/dist/src/agent/tools/factory.js +2 -2
- package/dist/src/agent/tools/factory.js.map +1 -1
- package/dist/src/agent/tools/memory-tool.js +1 -1
- package/dist/src/agent/tools/memory-tool.js.map +1 -1
- package/dist/src/agent/workflow/workflow-child-tools.js +2 -3
- package/dist/src/agent/workflow/workflow-child-tools.js.map +1 -1
- package/dist/src/agent/workspace-runtime/registry.d.ts +5 -5
- package/dist/src/agent/workspace-runtime/registry.js +6 -11
- package/dist/src/agent/workspace-runtime/registry.js.map +1 -1
- package/dist/src/agent-manifest/index.js +2 -2
- package/dist/src/agent-manifest/prompt.js +1 -7
- package/dist/src/agent-manifest/prompt.js.map +1 -1
- package/dist/src/agent-manifest/schema.d.ts +0 -598
- package/dist/src/agent-manifest/schema.js +2 -143
- package/dist/src/agent-manifest/schema.js.map +1 -1
- package/dist/src/agent-manifest/validator.js +0 -12
- package/dist/src/agent-manifest/validator.js.map +1 -1
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/memory-runtime.d.ts +2 -2
- package/dist/src/agent-runtime/memory-runtime.js +8 -7
- package/dist/src/agent-runtime/memory-runtime.js.map +1 -1
- package/dist/src/agent-runtime/runtime-profile.d.ts +2 -0
- package/dist/src/agent-runtime/runtime-profile.js +2 -2
- package/dist/src/agent-runtime/runtime-profile.js.map +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -2
- package/dist/src/chat-commands/agent-edit.js.map +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/init.js +0 -22
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/templates.d.ts +1 -1
- package/dist/src/cli/templates.js +1 -16
- package/dist/src/cli/templates.js.map +1 -1
- package/dist/src/commands/agents.config.js +0 -10
- package/dist/src/commands/agents.config.js.map +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/paths.d.ts +0 -1
- package/dist/src/config/paths.js +1 -2
- package/dist/src/config/paths.js.map +1 -1
- package/dist/src/config/schema.d.ts +118 -532
- package/dist/src/config/schema.js +32 -26
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/extensions/loader.js +2 -1
- package/dist/src/extensions/loader.js.map +1 -1
- package/dist/src/gateway/agents-admin.d.ts +0 -2
- package/dist/src/gateway/agents-admin.js +1 -7
- package/dist/src/gateway/agents-admin.js.map +1 -1
- package/dist/src/gateway/capability-presets-admin.d.ts +0 -2
- package/dist/src/gateway/capability-presets-admin.js.map +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +26 -0
- package/dist/src/gateway/chat-stream/mapper.js.map +1 -1
- package/dist/src/gateway/chat-stream/protocol.d.ts +16 -1
- package/dist/src/gateway/dreaming-automation-reconciler.d.ts +0 -1
- package/dist/src/gateway/dreaming-automation-reconciler.js +41 -63
- package/dist/src/gateway/dreaming-automation-reconciler.js.map +1 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/app.js +3 -1
- package/dist/src/gateway/hono/app.js.map +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +0 -130
- package/dist/src/gateway/hono/lib/config-payload.js +0 -1
- package/dist/src/gateway/hono/lib/config-payload.js.map +1 -1
- package/dist/src/gateway/hono/routes/agents.js +6 -12
- package/dist/src/gateway/hono/routes/agents.js.map +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +6 -0
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js.map +1 -1
- package/dist/src/gateway/hono/routes/capability-presets.js +2 -2
- package/dist/src/gateway/hono/routes/capability-presets.js.map +1 -1
- package/dist/src/gateway/hono/routes/dreaming.js +9 -20
- package/dist/src/gateway/hono/routes/dreaming.js.map +1 -1
- package/dist/src/gateway/hono/routes/index.js +4 -0
- package/dist/src/gateway/hono/routes/index.js.map +1 -1
- package/dist/src/gateway/hono/routes/local-apps.d.ts +5 -0
- package/dist/src/gateway/hono/routes/local-apps.js +99 -0
- package/dist/src/gateway/hono/routes/local-apps.js.map +1 -0
- package/dist/src/gateway/hono/routes/memory.js +48 -65
- package/dist/src/gateway/hono/routes/memory.js.map +1 -1
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js.map +1 -1
- package/dist/src/gateway/hono/routes/work-discovery.d.ts +3 -0
- package/dist/src/gateway/hono/routes/work-discovery.js +150 -0
- package/dist/src/gateway/hono/routes/work-discovery.js.map +1 -0
- package/dist/src/gateway/hono/routes/you.d.ts +3 -0
- package/dist/src/gateway/hono/routes/you.js +358 -91
- package/dist/src/gateway/hono/routes/you.js.map +1 -1
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +12 -0
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/knowledge/connected-knowledge-pipeline.js +9 -5
- package/dist/src/knowledge/connected-knowledge-pipeline.js.map +1 -1
- package/dist/src/local-apps/acceptance.d.ts +30 -0
- package/dist/src/local-apps/acceptance.js +93 -0
- package/dist/src/local-apps/acceptance.js.map +1 -0
- package/dist/src/local-apps/index.d.ts +5 -0
- package/dist/src/local-apps/index.js +4 -0
- package/dist/src/local-apps/preview-runtime-bridge.d.ts +4 -0
- package/dist/src/local-apps/preview-runtime-bridge.js +171 -0
- package/dist/src/local-apps/preview-runtime-bridge.js.map +1 -0
- package/dist/src/local-apps/runtime-entry.d.ts +8 -0
- package/dist/src/local-apps/runtime-entry.js +25 -0
- package/dist/src/local-apps/runtime-entry.js.map +1 -0
- package/dist/src/local-apps/scaffold.d.ts +8 -0
- package/dist/src/local-apps/scaffold.js +122 -0
- package/dist/src/local-apps/scaffold.js.map +1 -0
- package/dist/src/local-apps/service.d.ts +37 -0
- package/dist/src/local-apps/service.js +553 -0
- package/dist/src/local-apps/service.js.map +1 -0
- package/dist/src/local-apps/store.d.ts +44 -0
- package/dist/src/local-apps/store.js +195 -0
- package/dist/src/local-apps/store.js.map +1 -0
- package/dist/src/local-apps/types.d.ts +105 -0
- package/dist/src/local-apps/types.js +1 -0
- package/dist/src/storage/sqlite/index.d.ts +3 -2
- package/dist/src/storage/sqlite/index.js +4 -3
- package/dist/src/storage/sqlite/memory-index-repository.d.ts +2 -3
- package/dist/src/storage/sqlite/memory-index-repository.js +16 -20
- package/dist/src/storage/sqlite/memory-index-repository.js.map +1 -1
- package/dist/src/storage/sqlite/memory-records-repository.d.ts +18 -10
- package/dist/src/storage/sqlite/memory-records-repository.js +79 -34
- package/dist/src/storage/sqlite/memory-records-repository.js.map +1 -1
- package/dist/src/storage/sqlite/memory-reference-consent-repository.d.ts +27 -0
- package/dist/src/storage/sqlite/memory-reference-consent-repository.js +109 -0
- package/dist/src/storage/sqlite/memory-reference-consent-repository.js.map +1 -0
- package/dist/src/storage/sqlite/migrations/038_user_owned_memory.sql +68 -0
- package/dist/src/storage/sqlite/migrations/039_memory_reference_consents.sql +19 -0
- package/dist/src/storage/sqlite/migrations/040_local_apps.sql +32 -0
- package/dist/src/storage/sqlite/migrations/041_local_app_release_lifecycle.sql +17 -0
- package/dist/src/storage/sqlite/migrations/042_work_discovery.sql +41 -0
- package/dist/src/storage/sqlite/migrations/043_local_app_acceptance_runs.sql +16 -0
- package/dist/src/storage/sqlite/migrations/044_repair_work_discovery_foreign_keys.sql +75 -0
- package/dist/src/storage/sqlite/migrations/045_extension_ui_grants.sql +13 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +20 -0
- package/dist/src/user-context/config.d.ts +227 -0
- package/dist/src/user-context/config.js +158 -0
- package/dist/src/user-context/config.js.map +1 -0
- package/dist/src/user-context/import.d.ts +1 -1
- package/dist/src/user-context/import.js +6 -1
- package/dist/src/user-context/import.js.map +1 -1
- package/dist/src/user-context/owner.d.ts +5 -0
- package/dist/src/user-context/owner.js +9 -0
- package/dist/src/user-context/owner.js.map +1 -0
- package/dist/src/user-context/projection.d.ts +11 -9
- package/dist/src/user-context/projection.js +74 -47
- package/dist/src/user-context/projection.js.map +1 -1
- package/dist/src/user-context/runtime.d.ts +13 -0
- package/dist/src/user-context/runtime.js +36 -0
- package/dist/src/user-context/runtime.js.map +1 -0
- package/dist/src/work-discovery/analyzer.d.ts +11 -0
- package/dist/src/work-discovery/analyzer.js +171 -0
- package/dist/src/work-discovery/analyzer.js.map +1 -0
- package/dist/src/work-discovery/index.d.ts +5 -0
- package/dist/src/work-discovery/index.js +5 -0
- package/dist/src/work-discovery/probe.d.ts +12 -0
- package/dist/src/work-discovery/probe.js +335 -0
- package/dist/src/work-discovery/probe.js.map +1 -0
- package/dist/src/work-discovery/repository.d.ts +11 -0
- package/dist/src/work-discovery/repository.js +100 -0
- package/dist/src/work-discovery/repository.js.map +1 -0
- package/dist/src/work-discovery/service.d.ts +30 -0
- package/dist/src/work-discovery/service.js +387 -0
- package/dist/src/work-discovery/service.js.map +1 -0
- package/dist/src/work-discovery/types.d.ts +114 -0
- package/dist/src/work-discovery/types.js +1 -0
- package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
- package/dist/src/workflows/service/workflow-session-bridge.js.map +1 -1
- package/package.json +5 -3
- package/skills/engineering/build-xopc-local-app/SKILL.md +45 -0
- package/skills/engineering/build-xopc-local-app/references/app-contract.md +33 -0
- package/skills/engineering/build-xopc-local-app/scripts/validate-local-app.mjs +72 -0
- package/dist/gateway/static/root/assets/Combination-DolwnuKi.js +0 -41
- package/dist/gateway/static/root/assets/activity-center-store-3l9ahUqb.js +0 -1
- package/dist/gateway/static/root/assets/agents-1bpT0xRO.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-Cc4JgVUQ.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-mb0fdVpq.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Bb0xhaMN.js +0 -8
- package/dist/gateway/static/root/assets/capability-presets-api-BV76yN9a.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-CUcGKZqC.js +0 -2
- package/dist/gateway/static/root/assets/channels-settings-BlSDMGdy.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-CJauF1CW.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CMgAFGvb.js +0 -2
- package/dist/gateway/static/root/assets/dist-C99RGfAH.js +0 -1
- package/dist/gateway/static/root/assets/dreaming-settings-BLetQiYY.js +0 -3
- package/dist/gateway/static/root/assets/extension-debug-page-Cof2ncxE.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-BMmzYpZL.js +0 -4
- package/dist/gateway/static/root/assets/goals-page-CGeT77PC.js +0 -2
- package/dist/gateway/static/root/assets/index-CSLF84-Q.css +0 -1
- package/dist/gateway/static/root/assets/index-I-ZCenVw.js +0 -259
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-x_v0nrIi.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-BSh1t8cD.js +0 -7
- package/dist/gateway/static/root/assets/messages-Cb1VMeqP.js +0 -5
- package/dist/gateway/static/root/assets/models-hub-panel-BNpTenAI.js +0 -2
- package/dist/gateway/static/root/assets/notes-workbench-teklkhcE.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-CCB_dKoh.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-VOAFAHYj.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-USYu64Ru.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-oGC8O5h_.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-D4rP66R1.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Ck9keROI.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BYLsCuqj.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BNHUyVML.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-CpXbQH4n.js +0 -2
- package/dist/gateway/static/root/assets/user-context-page-DbNEK4Yp.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-Cs7MOrg0.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-D1ziG1Pp.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-DHGV_n6i.js +0 -11
- package/dist/src/agent/context/workspace-templates/MEMORY.md +0 -33
- package/dist/src/agent/memory/access-policy.d.ts +0 -12
- package/dist/src/agent/memory/access-policy.js +0 -44
- package/dist/src/agent/memory/access-policy.js.map +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-xopc-local-app
|
|
3
|
+
description: Build and iteratively improve a user-owned local XOPC app while preserving its stable extension identity, UI sandbox, and Phase 1 capability boundary.
|
|
4
|
+
metadata:
|
|
5
|
+
xopc:
|
|
6
|
+
emoji: "🧩"
|
|
7
|
+
requires_tools:
|
|
8
|
+
- read_file
|
|
9
|
+
- write_file
|
|
10
|
+
- exec_command
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Build a local XOPC app
|
|
14
|
+
|
|
15
|
+
Use this skill inside a Project created for a Local App. Treat `APP_BRIEF.md`, `.xopc/app.json`, and
|
|
16
|
+
`xopc.extension.json` as the app contract. Convert the user's latest request into a small observable UI
|
|
17
|
+
change, preserve working behaviour, and leave the draft previewable after every iteration.
|
|
18
|
+
|
|
19
|
+
## Required workflow
|
|
20
|
+
|
|
21
|
+
1. Read `APP_BRIEF.md`, `.xopc/app.json`, `.xopc/acceptance.json`, `xopc.extension.json`, and the
|
|
22
|
+
current `ui/` implementation.
|
|
23
|
+
2. Restate the requested behaviour as observable acceptance checks. Add or update a declarative
|
|
24
|
+
scenario in `.xopc/acceptance.json` for each critical journey changed by the request.
|
|
25
|
+
3. Edit the smallest coherent set of files. Phase 1 apps are UI-only; do not add backend routes,
|
|
26
|
+
shell execution, network access, or undeclared permissions. Never edit the manifest `main` field
|
|
27
|
+
or `.xopc/runtime/local-ui.js`; xopc owns that trusted gateway runtime entry.
|
|
28
|
+
4. Keep the extension `id`, page `path`, and UI `entrypoint` stable. Do not rename them during an
|
|
29
|
+
iteration.
|
|
30
|
+
5. Run `node "$XOPC_LOCAL_APP_SKILL_DIR/scripts/validate-local-app.mjs" .` when that environment
|
|
31
|
+
variable is available. Otherwise validate the same contract directly.
|
|
32
|
+
6. Report what changed, what was verified, and whether the draft is ready for the user to install.
|
|
33
|
+
|
|
34
|
+
## Interface constraints
|
|
35
|
+
|
|
36
|
+
- Use semantic HTML, keyboard-accessible controls, visible focus states, and `aria-live` for async
|
|
37
|
+
feedback.
|
|
38
|
+
- Support light and dark color schemes without assuming access to the host DOM.
|
|
39
|
+
- Keep scripts and styles local. The preview CSP blocks network access and inline scripts.
|
|
40
|
+
- Use browser storage only for user-owned local preferences or app data.
|
|
41
|
+
- Ask before expanding permissions. A permission change must be visible in the install review.
|
|
42
|
+
- Mark scenario targets with stable `data-xopc-test-id` values. Never encode CSS selectors or
|
|
43
|
+
executable JavaScript in acceptance scenarios.
|
|
44
|
+
|
|
45
|
+
For the exact Phase 1 file contract and completion checklist, read `references/app-contract.md`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Phase 1 local app contract
|
|
2
|
+
|
|
3
|
+
Required files:
|
|
4
|
+
|
|
5
|
+
- `.xopc/app.json`: `schemaVersion`, immutable `extensionId`, `capabilityLevel: "ui"`, and entrypoint.
|
|
6
|
+
- `.xopc/acceptance.json`: declarative critical user journeys. Older apps may omit it.
|
|
7
|
+
- `xopc.extension.json`: matching `id`, xopc-owned `main`, `ui.main`, and one navigation page.
|
|
8
|
+
- `.xopc/runtime/local-ui.js`: immutable xopc-owned runtime entry; generated app code must stay in `ui/`.
|
|
9
|
+
- `ui/index.html`: sandbox entrypoint with only local asset references.
|
|
10
|
+
|
|
11
|
+
Before marking a draft ready:
|
|
12
|
+
|
|
13
|
+
- Manifest and app metadata ids match.
|
|
14
|
+
- Runtime `main` remains `.xopc/runtime/local-ui.js` and its contents are unchanged.
|
|
15
|
+
- Declared files exist and remain inside the Project.
|
|
16
|
+
- Navigation path stays `/extensions/<extension-id>`.
|
|
17
|
+
- No remote scripts, stylesheets, images, frames, or fetch calls were introduced.
|
|
18
|
+
- UI remains usable at narrow desktop widths, with keyboard navigation and both color schemes.
|
|
19
|
+
- The user-facing acceptance checks pass in preview.
|
|
20
|
+
|
|
21
|
+
## Acceptance scenarios
|
|
22
|
+
|
|
23
|
+
Use at most 10 scenarios and 20 steps per scenario. Targets are exact `data-xopc-test-id` values
|
|
24
|
+
using letters, numbers, dashes, or underscores. Supported steps are:
|
|
25
|
+
|
|
26
|
+
- `{ "action": "click", "target": "save-button" }`
|
|
27
|
+
- `{ "action": "fill", "target": "title-input", "value": "Read later" }`
|
|
28
|
+
- `{ "assert": "text_visible", "text": "Read later" }`
|
|
29
|
+
- `{ "assert": "element_exists", "target": "reading-list" }`
|
|
30
|
+
- `{ "assert": "value_equals", "target": "title-input", "value": "" }`
|
|
31
|
+
|
|
32
|
+
Do not use selectors, scripts, timing commands, network calls, or host APIs. The workbench runs these
|
|
33
|
+
scenarios in an isolated preview and requires them to pass before installation.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { resolve, join } from 'node:path';
|
|
4
|
+
|
|
5
|
+
const root = resolve(process.argv[2] || '.');
|
|
6
|
+
const trustedRuntimeEntry = '.xopc/runtime/local-ui.js';
|
|
7
|
+
const trustedRuntimeSource = 'export default Object.freeze({});\n';
|
|
8
|
+
const required = ['.xopc/app.json', 'xopc.extension.json', 'ui/index.html'];
|
|
9
|
+
const errors = required.filter((file) => !existsSync(join(root, file))).map((file) => `Missing ${file}`);
|
|
10
|
+
|
|
11
|
+
let app = {};
|
|
12
|
+
let manifest = {};
|
|
13
|
+
let acceptance = null;
|
|
14
|
+
try { app = JSON.parse(readFileSync(join(root, '.xopc/app.json'), 'utf8')); } catch { errors.push('Invalid .xopc/app.json'); }
|
|
15
|
+
try { manifest = JSON.parse(readFileSync(join(root, 'xopc.extension.json'), 'utf8')); } catch { errors.push('Invalid xopc.extension.json'); }
|
|
16
|
+
if (existsSync(join(root, '.xopc/acceptance.json'))) {
|
|
17
|
+
try { acceptance = JSON.parse(readFileSync(join(root, '.xopc/acceptance.json'), 'utf8')); } catch { errors.push('Invalid .xopc/acceptance.json'); }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (app.extensionId !== manifest.id) errors.push('App metadata and manifest ids do not match');
|
|
21
|
+
if (app.capabilityLevel !== 'ui') errors.push('Phase 1 capabilityLevel must be ui');
|
|
22
|
+
const legacyRuntimeSource = `export default {\n id: ${JSON.stringify(manifest.id)},\n name: ${JSON.stringify(manifest.name)},\n version: '0.1.0',\n kind: 'utility',\n register(api) {\n api.logger.info('Local app registered');\n },\n};\n`;
|
|
23
|
+
const recognizedRuntimeEntry = manifest.main === trustedRuntimeEntry || manifest.main === 'index.js';
|
|
24
|
+
const runtimeSource = recognizedRuntimeEntry && existsSync(join(root, manifest.main))
|
|
25
|
+
? readFileSync(join(root, manifest.main), 'utf8')
|
|
26
|
+
: null;
|
|
27
|
+
const trustedRuntime = manifest.main === trustedRuntimeEntry && runtimeSource === trustedRuntimeSource;
|
|
28
|
+
const trustedLegacyRuntime = manifest.main === 'index.js' && runtimeSource === legacyRuntimeSource;
|
|
29
|
+
if (!trustedRuntime && !trustedLegacyRuntime) errors.push(`Phase 1 runtime main must be the unchanged xopc-owned ${trustedRuntimeEntry}`);
|
|
30
|
+
if (manifest.ui?.main !== app.entrypoint) errors.push('UI entrypoints do not match');
|
|
31
|
+
if (manifest.ui?.contributions?.pages?.[0]?.path !== `/extensions/${manifest.id}`) {
|
|
32
|
+
errors.push('Navigation path must use the stable extension id');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const testIdPattern = /^[A-Za-z0-9_-]{1,80}$/;
|
|
36
|
+
if (acceptance) {
|
|
37
|
+
if (acceptance.schemaVersion !== 1 || !Array.isArray(acceptance.scenarios) || acceptance.scenarios.length > 10) {
|
|
38
|
+
errors.push('Acceptance config must use schemaVersion 1 and contain at most 10 scenarios');
|
|
39
|
+
} else {
|
|
40
|
+
const ids = new Set();
|
|
41
|
+
acceptance.scenarios.forEach((scenario, scenarioIndex) => {
|
|
42
|
+
const label = `Acceptance scenario ${scenarioIndex + 1}`;
|
|
43
|
+
if (!testIdPattern.test(scenario?.id || '') || ids.has(scenario.id)) errors.push(`${label} has an invalid or duplicate id`);
|
|
44
|
+
else ids.add(scenario.id);
|
|
45
|
+
if (typeof scenario?.name !== 'string' || !scenario.name.trim() || scenario.name.length > 120) errors.push(`${label} has an invalid name`);
|
|
46
|
+
if (!Array.isArray(scenario?.steps) || !scenario.steps.length || scenario.steps.length > 20) {
|
|
47
|
+
errors.push(`${label} must contain 1 to 20 steps`);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
scenario.steps.forEach((step, stepIndex) => {
|
|
51
|
+
const stepLabel = `${label} step ${stepIndex + 1}`;
|
|
52
|
+
const hasOnly = (...keys) => Object.keys(step || {}).every((key) => keys.includes(key));
|
|
53
|
+
const validTarget = typeof step.target === 'string' && testIdPattern.test(step.target);
|
|
54
|
+
const validValue = typeof step.value === 'string' && step.value.length <= 500;
|
|
55
|
+
const validText = typeof step.text === 'string' && step.text.trim() && step.text.length <= 500;
|
|
56
|
+
const valid = step.action === 'click' && validTarget && hasOnly('action', 'target')
|
|
57
|
+
|| step.action === 'fill' && validTarget && validValue && hasOnly('action', 'target', 'value')
|
|
58
|
+
|| step.assert === 'text_visible' && validText && hasOnly('assert', 'text')
|
|
59
|
+
|| step.assert === 'element_exists' && validTarget && hasOnly('assert', 'target')
|
|
60
|
+
|| step.assert === 'value_equals' && validTarget && validValue && hasOnly('assert', 'target', 'value');
|
|
61
|
+
if (!valid) errors.push(`${stepLabel} uses an unsupported or invalid operation`);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (errors.length) {
|
|
68
|
+
for (const error of errors) console.error(`- ${error}`);
|
|
69
|
+
process.exitCode = 1;
|
|
70
|
+
} else {
|
|
71
|
+
console.log(`Local app ${manifest.id} is valid.`);
|
|
72
|
+
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,i as n,t as r}from"./vendor-react-BOUWij0V.js";var i=e(n(),1),a=r(),o=e(t(),1);function s(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function c(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():s(e[t],null)}}}}function l(...e){return o.useCallback(c(...e),e)}function u(e){let t=o.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,s=!1,c=[];y(r)&&typeof S==`function`&&(r=S(r._payload)),o.Children.forEach(r,e=>{if(_(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;y(n)&&typeof S==`function`&&(n=S(n._payload)),a=m(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=o.cloneElement(a,void 0,c):!s&&o.Children.count(r)===1&&o.isValidElement(r)&&(a=r);let u=a?g(a):void 0,d=l(n,u);if(!a){if(r||r===0)throw Error(s?x(e):ee(e));return r}let f=h(i,a.props??{});return a.type!==o.Fragment&&(f.ref=n?d:u),o.cloneElement(a,f)});return t.displayName=`${e}.Slot`,t}var d=u(`Slot`),f=Symbol.for(`radix.slottable`);function p(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=f,t}var m=(e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null};function h(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function g(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===f}var v=Symbol.for(`react.lazy`);function y(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===v&&`_payload`in e&&b(e._payload)}function b(e){return typeof e==`object`&&!!e&&`then`in e}var ee=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,x=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,S=o.use;typeof window<`u`&&window.document&&window.document.createElement;function C(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function w(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r);i.displayName=t+`Context`;let s=n.length;n=[...n,r];let c=t=>{let{scope:n,children:r,...c}=t,l=n?.[e]?.[s]||i,u=o.useMemo(()=>c,Object.values(c));return(0,a.jsx)(l.Provider,{value:u,children:r})};c.displayName=t+`Provider`;function l(n,a,c={}){let{optional:l=!1}=c,u=a?.[e]?.[s]||i,d=o.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,T(i,...t)]}function T(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var E=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=u(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...o}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,a.jsx)(s,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function D(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}function O(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}var te=`DismissableLayer`,k=`dismissableLayer.update`,ne=`dismissableLayer.pointerDownOutside`,A=`dismissableLayer.focusOutside`,re,j=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ie=o.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:d,...f}=e,p=o.useContext(j),[m,h]=o.useState(null),g=m?.ownerDocument??globalThis?.document,[,_]=o.useState({}),v=l(t,h),y=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),ee=b?y.indexOf(b):-1,x=m?y.indexOf(m):-1,S=p.layersWithOutsidePointerEventsDisabled.size>0,w=x>=ee,T=o.useRef(!1),D=le(e=>{s?.(e),u?.(e),e.defaultPrevented||d?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:o.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...p.branches].some(t=>t.contains(e));return w&&!t},[p.branches,w])}),te=ue(e=>{if(r&&T.current)return;let t=e.target;[...p.branches].some(e=>e.contains(t))||(c?.(e),u?.(e),e.defaultPrevented||d?.())},g),ne=m?x===y.length-1:!1,A=O(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))});return o.useEffect(()=>{if(ne)return g.addEventListener(`keydown`,A,{capture:!0}),()=>g.removeEventListener(`keydown`,A,{capture:!0})},[g,ne,A]),o.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(re=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),de(),()=>{n&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=re))}},[m,g,n,p]),o.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),de())},[m,p]),o.useEffect(()=>{let e=()=>_({});return document.addEventListener(k,e),()=>document.removeEventListener(k,e)},[]),(0,a.jsx)(E.div,{...f,ref:v,style:{pointerEvents:S?w?`auto`:`none`:void 0,...e.style},onFocusCapture:C(e.onFocusCapture,te.onFocusCapture),onBlurCapture:C(e.onBlurCapture,te.onBlurCapture),onPointerDownCapture:C(e.onPointerDownCapture,D.onPointerDownCapture)})});ie.displayName=te;var ae=`DismissableLayerBranch`,oe=o.forwardRef((e,t)=>{let n=o.useContext(j),r=o.useRef(null),i=l(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,a.jsx)(E.div,{...e,ref:i})});oe.displayName=ae;function se(){let e=o.useContext(j),[t,n]=o.useState(null);return o.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var ce=()=>!0;function le(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:s=ce}=t,c=O(e),l=o.useRef(!1),u=o.useRef(!1),d=o.useRef(new Map),f=o.useRef(()=>{});return o.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function o(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(e){u.current&&d.current.set(e.type,!1)}let m=a=>{if(a.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||fe(ne,c,p,{discrete:!0})};if(!s(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,o,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,o,!0),n.removeEventListener(e,p)}},[n,c,r,i,a,s]),{onPointerDownCapture:()=>l.current=!0}}function ue(e,t=globalThis?.document){let n=O(e),r=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!r.current&&fe(A,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){let e=new CustomEvent(k);document.dispatchEvent(e)}function fe(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?D(i,a):i.dispatchEvent(a)}var M=0,N=null;function pe(){o.useEffect(()=>{N||={start:me(),end:me()};let{start:e,end:t}=N;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),M++,()=>{M===1&&(N?.start.remove(),N?.end.remove(),N=null),M=Math.max(0,M-1)}},[])}function me(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var P=`focusScope.autoFocusOnMount`,F=`focusScope.autoFocusOnUnmount`,he={bubbles:!1,cancelable:!0},ge=`FocusScope`,_e=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...c}=e,[u,d]=o.useState(null),f=O(i),p=O(s),m=o.useRef(null),h=l(t,d),g=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let e=function(e){if(g.paused||!u)return;let t=e.target;u.contains(t)?m.current=t:I(m.current,{select:!0})},t=function(e){if(g.paused||!u)return;let t=e.relatedTarget;t!==null&&(u.contains(t)||I(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&I(u)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,u,g.paused]),o.useEffect(()=>{if(u){we.add(g);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(P,he);u.addEventListener(P,f),u.dispatchEvent(t),t.defaultPrevented||(ve(De(be(u)),{select:!0}),document.activeElement===e&&I(u))}return()=>{u.removeEventListener(P,f),setTimeout(()=>{let t=new CustomEvent(F,he);u.addEventListener(F,p),u.dispatchEvent(t),t.defaultPrevented||I(e??document.body,{select:!0}),u.removeEventListener(F,p),we.remove(g)},0)}}},[u,f,p,g]);let _=o.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ye(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&I(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&I(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,a.jsx)(E.div,{tabIndex:-1,...c,ref:h,onKeyDown:_})});_e.displayName=ge;function ve(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(I(r,{select:t}),document.activeElement!==n)return}function ye(e){let t=be(e);return[xe(t,e),xe(t.reverse(),e)]}function be(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xe(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Se(r,{upTo:t})))return r}function Se(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Ce(e){return e instanceof HTMLInputElement&&`select`in e}function I(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ce(e)&&t&&e.select()}}var we=Te();function Te(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ee(e,t),e.unshift(t)},remove(t){e=Ee(e,t),e[0]?.resume()}}}function Ee(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function De(e){return e.filter(e=>e.tagName!==`A`)}var L=globalThis?.document?o.useLayoutEffect:()=>{},Oe=o.useId||(()=>void 0),ke=0;function Ae(e){let[t,n]=o.useState(Oe());return L(()=>{e||n(e=>e??String(ke++))},[e]),e||(t?`radix-${t}`:``)}var je=`Portal`,Me=o.forwardRef((e,t)=>{let{container:n,...r}=e,[s,c]=o.useState(!1);L(()=>c(!0),[]);let l=n||s&&globalThis?.document?.body;return l?i.createPortal((0,a.jsx)(E.div,{...r,ref:t}),l):null});Me.displayName=je;function Ne(e,t){return o.useReducer((e,n)=>t[e][n]??e,e)}var Pe=e=>{let{present:t,children:n}=e,r=Fe(t),i=typeof n==`function`?n({present:r.isPresent}):o.Children.only(n),a=Le(r.ref,Re(i));return typeof n==`function`||r.isPresent?o.cloneElement(i,{ref:a}):null};Pe.displayName=`Presence`;function Fe(e){let[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef(`none`),s=o.useRef(void 0),[c,l]=Ne(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return o.useEffect(()=>{c===`mounted`?(a.current=s.current??R(r.current),s.current=void 0):a.current=`none`},[c]),L(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=R(t);e?(s.current=o,l(`MOUNT`)):o===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),L(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=R(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=R(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:o.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=R(t)}else r.current=null;n(e)},[])}}function Ie(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Le(...e){let t=o.useRef(e);return t.current=e,o.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ie(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ie(n[e],null)}}},[])}function R(e){return e?.animationName||`none`}function Re(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ze=o.useInsertionEffect||L;function Be({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,s]=Ve({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:i;{let t=o.useRef(e!==void 0);o.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,r])}return[l,o.useCallback(t=>{if(c){let n=He(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}function Ve({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return ze(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function He(e){return typeof e==`function`}var Ue=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},z=new WeakMap,B=new WeakMap,V={},H=0,We=function(e){return e&&(e.host||We(e.parentNode))},Ge=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=We(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ke=function(e,t,n,r){var i=Ge(t,Array.isArray(e)?e:[e]);V[n]||(V[n]=new WeakMap);var a=V[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(z.get(e)||0)+1,l=(a.get(e)||0)+1;z.set(e,c),a.set(e,l),o.push(e),c===1&&i&&B.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),H++,function(){o.forEach(function(e){var t=z.get(e)-1,i=a.get(e)-1;z.set(e,t),a.set(e,i),t||(B.has(e)||e.removeAttribute(r),B.delete(e)),i||e.removeAttribute(n)}),H--,H||(z=new WeakMap,z=new WeakMap,B=new WeakMap,V={})}},qe=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ue(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ke(r,i,n,`aria-hidden`)):function(){return null}},U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},U.apply(this,arguments)};function Je(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ye(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var W=`right-scroll-bar-position`,G=`width-before-scroll-bar`,Xe=`with-scroll-bars-hidden`,Ze=`--removed-body-scroll-bar-size`;function K(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Qe(e,t){var n=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var $e=typeof window<`u`?o.useLayoutEffect:o.useEffect,et=new WeakMap;function tt(e,t){var n=Qe(t||null,function(t){return e.forEach(function(e){return K(e,t)})});return $e(function(){var t=et.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||K(e,null)}),i.forEach(function(e){r.has(e)||K(e,a)})}et.set(n,e)},[e]),n}function nt(e){return e}function rt(e,t){t===void 0&&(t=nt);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function it(e){e===void 0&&(e={});var t=rt(null);return t.options=U({async:!0,ssr:!1},e),t}var at=function(e){var t=e.sideCar,n=Je(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return o.createElement(r,U({},n))};at.isSideCarExport=!0;function ot(e,t){return e.useMedium(t),at}var st=it(),q=function(){},J=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:q,onWheelCapture:q,onTouchMoveCapture:q}),i=r[0],a=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,ee=Je(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=p,S=tt([n,t]),C=U(U({},ee),i);return o.createElement(o.Fragment,null,d&&o.createElement(x,{sideCar:st,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?o.cloneElement(o.Children.only(c),U(U({},C),{ref:S})):o.createElement(y,U({},C,{className:l,ref:S}),c))});J.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},J.classNames={fullWidth:G,zeroRight:W};var ct,lt=function(){if(ct)return ct;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ut(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=lt();return t&&e.setAttribute(`nonce`,t),e}function dt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ft(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var pt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ut())&&(dt(t,n),ft(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mt=function(){var e=pt();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ht=function(){var e=mt();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},gt={left:0,top:0,right:0,gap:0},_t=function(e){return parseInt(e||``,10)||0},vt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[_t(n),_t(r),_t(i)]},yt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return gt;var t=vt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},bt=ht(),Y=`data-scroll-locked`,xt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${Xe} {
|
|
3
|
-
overflow: hidden ${r};
|
|
4
|
-
padding-right: ${s}px ${r};
|
|
5
|
-
}
|
|
6
|
-
body[${Y}] {
|
|
7
|
-
overflow: hidden ${r};
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
-
padding-left: ${i}px;
|
|
11
|
-
padding-top: ${a}px;
|
|
12
|
-
padding-right: ${o}px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: ${s}px ${r};
|
|
16
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.${W} {
|
|
20
|
-
right: ${s}px ${r};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.${G} {
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${W} .${W} {
|
|
28
|
-
right: 0 ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${G} .${G} {
|
|
32
|
-
margin-right: 0 ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[${Y}] {
|
|
36
|
-
${Ze}: ${s}px;
|
|
37
|
-
}
|
|
38
|
-
`},St=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Ct=function(){o.useEffect(function(){return document.body.setAttribute(Y,(St()+1).toString()),function(){var e=St()-1;e<=0?document.body.removeAttribute(Y):document.body.setAttribute(Y,e.toString())}},[])},wt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Ct();var a=o.useMemo(function(){return yt(i)},[i]);return o.createElement(bt,{styles:xt(a,!t,i,n?``:`!important`)})},Tt=!1;if(typeof window<`u`)try{var X=Object.defineProperty({},"passive",{get:function(){return Tt=!0,!0}});window.addEventListener(`test`,X,X),window.removeEventListener(`test`,X,X)}catch{Tt=!1}var Z=Tt?{passive:!1}:!1,Et=function(e){return e.tagName===`TEXTAREA`},Dt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Et(e)&&n[t]===`visible`)},Ot=function(e){return Dt(e,`overflowY`)},kt=function(e){return Dt(e,`overflowX`)},At=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Nt(e,r)){var i=Pt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Mt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Nt=function(e,t){return e===`v`?Ot(t):kt(t)},Pt=function(e,t){return e===`v`?jt(t):Mt(t)},Ft=function(e,t){return e===`h`&&t===`rtl`?-1:1},It=function(e,t,n,r,i){var a=Ft(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Pt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Nt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Q=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lt=function(e){return[e.deltaX,e.deltaY]},Rt=function(e){return e&&`current`in e?e.current:e},zt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bt=function(e){return`
|
|
39
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},Vt=0,$=[];function Ht(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Vt++)[0],a=o.useState(ht)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ye([e.lockRef.current],(e.shards||[]).map(Rt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Q(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=At(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=At(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return It(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(!(!$.length||$[$.length-1]!==a)){var r=`deltaY`in n?Lt(n):Q(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&zt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var o=(s.current.shards||[]).map(Rt).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ut(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=Q(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,Lt(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,Q(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return $.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Z),document.addEventListener(`touchmove`,l,Z),document.addEventListener(`touchstart`,d,Z),function(){$=$.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,Z),document.removeEventListener(`touchmove`,l,Z),document.removeEventListener(`touchstart`,d,Z)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:Bt(i)}):null,m?o.createElement(wt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ut(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wt=ot(st,Ht),Gt=o.forwardRef(function(e,t){return o.createElement(J,U({},e,{ref:t,sideCar:Wt}))});Gt.classNames=J.classNames;export{d as _,Me as a,l as b,_e as c,se as d,O as f,C as g,w as h,Pe as i,pe as l,D as m,qe as n,Ae as o,E as p,Be as r,L as s,Gt as t,ie as u,u as v,p as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as e}from"./locale-store-CiM-D9jA.js";var t=`xopc.activity-center.v1`,n=80;function r(e){return e===`error`?`failed`:e===`warning`?`attention`:`done`}function i(){if(!(typeof window>`u`))return window.location.hash.replace(/^#/,``)||`${window.location.pathname}${window.location.search}`||void 0}function a(){try{let e=globalThis.localStorage?.getItem(t);if(!e)return[];let r=JSON.parse(e);return Array.isArray(r.items)?r.items.filter(e=>e&&typeof e.id==`string`&&typeof e.title==`string`).slice(0,n):[]}catch{return[]}}function o(e){try{globalThis.localStorage?.setItem(t,JSON.stringify({items:e}))}catch{}}function s(e){return`${e.toString(36)}-${Math.random().toString(36).slice(2,8)}`}var c=e(e=>({open:!1,items:a(),setOpen:t=>e(e=>{let n=t?e.items.map(e=>({...e,read:!0})):e.items;return t&&o(n),{open:t,items:n}}),add:t=>e(e=>{let a=t.title.trim();if(!a)return e;let c=Date.now(),l=t.tone??`info`,u=t.dedupeKey?e.items.findIndex(e=>e.dedupeKey===t.dedupeKey):-1,d=[{id:u>=0?e.items[u].id:s(c),tone:l,status:t.status??r(l),title:a,message:t.message?.trim()||void 0,source:t.source?.trim()||void 0,href:t.href??i(),dedupeKey:t.dedupeKey,createdAt:u>=0?e.items[u].createdAt:c,updatedAt:c,read:t.read??e.open,occurrences:u>=0?e.items[u].occurrences+1:1},...u>=0?e.items.filter((e,t)=>t!==u):e.items].slice(0,n);return o(d),{items:d}}),markAllRead:()=>e(e=>{let t=e.items.map(e=>({...e,read:!0}));return o(t),{items:t}}),remove:t=>e(e=>{let n=e.items.filter(e=>e.id!==t);return o(n),{items:n}}),clear:()=>{o([]),e({items:[]})}}));function l(e){c.getState().add(e)}export{c as n,l as t};
|