@jxsuite/studio 6.1.1 → 6.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{2020-va2wwra4.js → 2020-f2gkpy8d.js} +3 -3
- package/dist/chunks/{action-group-2mqby73c.js → action-group-4aan7g6g.js} +3 -3
- package/dist/chunks/adapter-4912g339.js +4 -0
- package/dist/chunks/cf-account-picker-wccaenh6.js +4 -0
- package/dist/chunks/cf-settings-br6105tr.js +4 -0
- package/dist/chunks/color-28ksk2qm.js +4 -0
- package/dist/chunks/color-area-0fj8a4ga.js +4 -0
- package/dist/chunks/color-field-xch8kx2g.js +4 -0
- package/dist/chunks/color-slider-jxd8v350.js +4 -0
- package/dist/chunks/combobox-p0efwjke.js +4 -0
- package/dist/chunks/components-db68vsn7.js +4 -0
- package/dist/chunks/content-source-1449qesq.js +4 -0
- package/dist/chunks/convert-to-repeater-5h457egj.js +4 -0
- package/dist/chunks/dialog-c4x05vyx.js +4 -0
- package/dist/chunks/editor-x9jn86a7.js +4 -0
- package/dist/chunks/entry-commands-may24cpt.js +4 -0
- package/dist/chunks/extension-sections-pvr14vxr.js +4 -0
- package/dist/chunks/file-ops-x9v54pcj.js +4 -0
- package/dist/chunks/files-j3knqf0s.js +4 -0
- package/dist/chunks/format-host-tyre2trb.js +4 -0
- package/dist/chunks/fs-events-64ma9htc.js +4 -0
- package/dist/chunks/git-panel-84ps5dex.js +4 -0
- package/dist/chunks/grid-view-d2wq9ezg.js +51 -0
- package/dist/chunks/icons-pnfz478q.js +4 -0
- package/dist/chunks/iframe-entry-fvbk89gm.js +5 -0
- package/dist/chunks/iframe-entry-jdcktez8.js +5 -0
- package/dist/chunks/iframe-entry-x0ygf2yr.js +5 -0
- package/dist/chunks/iframe-entry-zap785cw.js +5 -0
- package/dist/chunks/iframe-host-ck6vejt5.js +4 -0
- package/dist/chunks/index-b8xw3vy9.js +4 -0
- package/dist/chunks/{index-2veqmnhr.js → index-zpjmzqfk.js} +3 -3
- package/dist/chunks/{javascript-8nbvs12s.js → javascript-m54mnwp6.js} +3 -3
- package/dist/chunks/{jsonMode-s8kt9dsj.js → jsonMode-w15cmrcm.js} +8 -8
- package/dist/chunks/jx-validate-at3zn8wa.js +4 -0
- package/dist/chunks/layers-h4xp1pss.js +4 -0
- package/dist/chunks/layers-panel-m5hw1d7g.js +4 -0
- package/dist/chunks/listbox-e74qjyq6.js +4 -0
- package/dist/chunks/lit-html-8t8t3dnr.js +4 -0
- package/dist/chunks/media-picker-2cweexc5.js +4 -0
- package/dist/chunks/menu-n6yzswmy.js +4 -0
- package/dist/chunks/menu-ynw13y0s.js +4 -0
- package/dist/chunks/monaco-binding-7gx83x3r.js +4 -0
- package/dist/chunks/monaco-buffer-qzxn567r.js +4 -0
- package/dist/chunks/monaco-setup-gxf6656g.js +4 -0
- package/dist/chunks/notify-cj5zbrs2.js +4 -0
- package/dist/chunks/number-field-y62xq0ty.js +4 -0
- package/dist/chunks/parse-b7ddhr8m.js +4 -0
- package/dist/chunks/platform-3dfws9js.js +4 -0
- package/dist/chunks/popover-jt2gxmzs.js +4 -0
- package/dist/chunks/publish-panel-1gvxbj21.js +4 -0
- package/dist/chunks/quick-search-0dajrwqg.js +4 -0
- package/dist/chunks/references-49qgt404.js +4 -0
- package/dist/chunks/right-panel-jm1bwe53.js +4 -0
- package/dist/chunks/section-registry-6kwc4fky.js +4 -0
- package/dist/chunks/select-rzds841e.js +4 -0
- package/dist/chunks/split-n2gfpm5m.js +4 -0
- package/dist/chunks/{studio-1q1sh2ax.js → studio-0q988f9w.js} +3 -3
- package/dist/chunks/studio-0rt52vpq.js +5 -0
- package/dist/chunks/studio-18vgbhs5.js +5 -0
- package/dist/chunks/{studio-h46vtzk8.js → studio-1fxkaaea.js} +4 -4
- package/dist/chunks/studio-24mccdrj.js +5 -0
- package/dist/chunks/studio-2eh507zk.js +9 -0
- package/dist/chunks/studio-2hcbccfv.js +5 -0
- package/dist/chunks/studio-2j1cb95x.js +5 -0
- package/dist/chunks/studio-2jbs3rxv.js +5 -0
- package/dist/chunks/{studio-rv11kfwa.js → studio-485046te.js} +7 -7
- package/dist/chunks/studio-4h8k4dw9.js +5 -0
- package/dist/chunks/studio-5f6n18kx.js +5 -0
- package/dist/chunks/studio-5gthpky6.js +5 -0
- package/dist/chunks/studio-5ve6bbep.js +5 -0
- package/dist/chunks/studio-6ep3js6b.js +9 -0
- package/dist/chunks/studio-6wkmf3wz.js +9 -0
- package/dist/chunks/studio-841rf3cg.js +5 -0
- package/dist/chunks/studio-8gmwgheg.js +5 -0
- package/dist/chunks/studio-8qm0ep50.js +5 -0
- package/dist/chunks/{studio-8grwxtqk.js → studio-90pq9km1.js} +4 -4
- package/dist/chunks/studio-924p1tm1.js +6 -0
- package/dist/chunks/{studio-pre0skq6.js → studio-a3g98wjr.js} +4 -4
- package/dist/chunks/studio-a3shpz9y.js +5 -0
- package/dist/chunks/studio-amsbaaar.js +6 -0
- package/dist/chunks/studio-at5spjbc.js +7 -0
- package/dist/chunks/studio-b2xv945e.js +5 -0
- package/dist/chunks/studio-bn5nkafw.js +5 -0
- package/dist/chunks/studio-bw6q5xjf.js +9 -0
- package/dist/chunks/studio-c7q0t9x1.js +5 -0
- package/dist/chunks/studio-camnhc96.js +6 -0
- package/dist/chunks/studio-cffqvnzd.js +5 -0
- package/dist/chunks/studio-d81xfh1g.js +5 -0
- package/dist/chunks/studio-dgz8d0c1.js +5 -0
- package/dist/chunks/studio-efvfrsf8.js +5 -0
- package/dist/chunks/studio-er30bpcx.js +5 -0
- package/dist/chunks/studio-ezscgr64.js +5 -0
- package/dist/chunks/studio-ffrrncvz.js +5 -0
- package/dist/chunks/studio-fpphgn8y.js +10 -0
- package/dist/chunks/studio-j1kvhdjk.js +4 -0
- package/dist/chunks/{studio-vrmcjf9g.js → studio-j430n16g.js} +5 -5
- package/dist/chunks/studio-jjkg84nj.js +5 -0
- package/dist/chunks/studio-m0q32ars.js +4 -0
- package/dist/chunks/studio-m6bdst11.js +5 -0
- package/dist/chunks/studio-nv2cptd4.js +64 -0
- package/dist/chunks/studio-nwfrc98n.js +5 -0
- package/dist/chunks/studio-p1wgvp7r.js +5 -0
- package/dist/chunks/studio-pag2wncm.js +5 -0
- package/dist/chunks/studio-qvanvzfd.js +5 -0
- package/dist/chunks/studio-qwa64kt7.js +5 -0
- package/dist/chunks/studio-rk1zc4x3.js +928 -0
- package/dist/chunks/studio-se2r3ptc.js +5 -0
- package/dist/chunks/studio-sg2a0dh0.js +5 -0
- package/dist/chunks/studio-tjzjhe68.js +5 -0
- package/dist/chunks/{studio-wszjyh0j.js → studio-tq0rtfwj.js} +4 -4
- package/dist/chunks/{studio-kggey1jt.js → studio-v0jzqdjm.js} +4 -4
- package/dist/chunks/studio-v2w7q8r1.js +7 -0
- package/dist/chunks/studio-v5vjq1h0.js +4 -0
- package/dist/chunks/studio-v8aga3vp.js +14 -0
- package/dist/chunks/studio-vfcdrfmv.js +5 -0
- package/dist/chunks/studio-vmfkgdjf.js +5 -0
- package/dist/chunks/studio-wt1816jj.js +5 -0
- package/dist/chunks/studio-wz73q5kq.js +4 -0
- package/dist/chunks/studio-y04qtxvp.js +7 -0
- package/dist/chunks/studio-y21g8zzg.js +5 -0
- package/dist/chunks/{studio-zey7zsdw.js → studio-y64hrt8p.js} +7 -7
- package/dist/chunks/studio-ynn90f58.js +16 -0
- package/dist/chunks/studio-yxz682sx.js +5 -0
- package/dist/chunks/studio-zp7snvkq.js +5 -0
- package/dist/chunks/studio-zq4z6tm6.js +5 -0
- package/dist/chunks/swatch-group-ewh24n1f.js +4 -0
- package/dist/chunks/tabs-f5cw3tgp.js +4 -0
- package/dist/chunks/textfield-wewc8rq2.js +4 -0
- package/dist/chunks/toast-c9fn075p.js +4 -0
- package/dist/chunks/toast-host-ke5z4ng7.js +4 -0
- package/dist/chunks/{toolbar-2nnzqhrj.js → toolbar-44cm5cta.js} +3 -3
- package/dist/chunks/tooltip-5v8ngwj2.js +4 -0
- package/dist/chunks/tree-mdq3v5cw.js +4 -0
- package/dist/chunks/{tsMode-2frah6h1.js → tsMode-sf49ee9x.js} +7 -7
- package/dist/chunks/workspace-jtfahpee.js +4 -0
- package/dist/chunks/ws-client-nze0k6mv.js +4 -0
- package/dist/iframe-entry.js +16 -16
- package/dist/manifest.json +63 -63
- package/dist/studio.js +97 -97
- package/package.json +6 -6
- package/src/about/about-modal.ts +4 -3
- package/src/account/action-flow.ts +45 -38
- package/src/account-status.ts +7 -2
- package/src/browse/library-layouts.ts +8 -5
- package/src/browse/library-model.ts +18 -6
- package/src/browse/library-pane.ts +37 -21
- package/src/browse/library-preview.ts +14 -9
- package/src/browse/library-source.ts +1 -1
- package/src/canvas/asset-refs.ts +24 -9
- package/src/canvas/asset-resolve.ts +19 -23
- package/src/canvas/canvas-helpers.ts +7 -6
- package/src/canvas/canvas-live-render.ts +44 -53
- package/src/canvas/canvas-patcher.ts +30 -30
- package/src/canvas/canvas-perf.ts +11 -5
- package/src/canvas/canvas-render.ts +62 -41
- package/src/canvas/canvas-surface.ts +5 -3
- package/src/canvas/canvas-utils.ts +90 -49
- package/src/canvas/dialog-path.ts +9 -4
- package/src/canvas/dialog-state.ts +1 -2
- package/src/canvas/diff-marks.ts +9 -16
- package/src/canvas/diff-toolbar.ts +8 -7
- package/src/canvas/edit-width-drag.ts +4 -1
- package/src/canvas/edit-width.ts +1 -3
- package/src/canvas/iframe-channel.ts +27 -13
- package/src/canvas/iframe-drop.ts +13 -12
- package/src/canvas/iframe-editable-root.ts +29 -16
- package/src/canvas/iframe-entry.ts +80 -63
- package/src/canvas/iframe-eval.ts +73 -49
- package/src/canvas/iframe-host.ts +135 -96
- package/src/canvas/iframe-inline-edit.ts +49 -30
- package/src/canvas/iframe-insert.ts +5 -4
- package/src/canvas/iframe-interaction.ts +30 -25
- package/src/canvas/iframe-overlay.ts +1 -1
- package/src/canvas/iframe-patch.ts +18 -15
- package/src/canvas/iframe-position.ts +12 -6
- package/src/canvas/iframe-protocol.ts +12 -16
- package/src/canvas/iframe-render.ts +36 -34
- package/src/canvas/iframe-slash.ts +24 -11
- package/src/canvas/iframe-subtree.ts +6 -2
- package/src/canvas/path-mapping.ts +19 -12
- package/src/canvas/popover-path.ts +7 -3
- package/src/canvas/popover-state.ts +1 -2
- package/src/canvas/serialize-scope.ts +13 -5
- package/src/canvas/stage-scrollbar.ts +2 -1
- package/src/canvas/surface-registry.ts +21 -3
- package/src/collab/collab-commands.ts +7 -2
- package/src/collab/collab-session.ts +84 -45
- package/src/collab/collab-state.ts +4 -3
- package/src/collab/monaco-binding.ts +16 -13
- package/src/collab/monaco-cursors.ts +5 -2
- package/src/commands/budget.ts +3 -3
- package/src/commands/command-args.ts +103 -71
- package/src/commands/context.ts +22 -20
- package/src/commands/keymap.ts +47 -43
- package/src/commands/levels.ts +3 -3
- package/src/commands/live-context.ts +7 -7
- package/src/commands/reference.ts +2 -1
- package/src/commands/registry.ts +12 -10
- package/src/commands/run-reported.ts +15 -10
- package/src/component-props.ts +46 -30
- package/src/content/collection-match.ts +5 -4
- package/src/content/draft-state.ts +4 -3
- package/src/content/entry-commands.ts +3 -2
- package/src/content/entry-editor.ts +29 -17
- package/src/content/entry-fields.ts +12 -7
- package/src/content/entry-model.ts +21 -12
- package/src/editor/canvas-context-menu.ts +1 -2
- package/src/editor/canvas-slash-bridge.ts +3 -6
- package/src/editor/content-slice.ts +16 -14
- package/src/editor/context-menu.ts +35 -22
- package/src/editor/convert-targets.ts +30 -35
- package/src/editor/convert-to-component.ts +11 -5
- package/src/editor/convert-to-repeater.ts +34 -22
- package/src/editor/editable-tags.ts +17 -2
- package/src/editor/file-drop-action.ts +21 -22
- package/src/editor/inline-edit-apply.ts +35 -17
- package/src/editor/inline-edit.ts +66 -50
- package/src/editor/inline-format.ts +59 -56
- package/src/editor/inline-link.ts +40 -15
- package/src/editor/insert-zone-action.ts +1 -1
- package/src/editor/merge-tags.ts +58 -19
- package/src/editor/repeater-scope.ts +39 -28
- package/src/editor/shortcuts.ts +32 -20
- package/src/editor/slash-menu.ts +1 -6
- package/src/files/asset-versions.ts +4 -4
- package/src/files/components.ts +15 -10
- package/src/files/elements.ts +5 -6
- package/src/files/file-ops.ts +77 -36
- package/src/files/files.ts +90 -95
- package/src/files/media-meta.ts +2 -1
- package/src/files/media-paths.ts +3 -0
- package/src/files/serialize-document.ts +2 -2
- package/src/format/constraints.ts +1 -1
- package/src/format/convert-file.ts +27 -13
- package/src/format/format-choices.ts +2 -1
- package/src/format/format-host.ts +76 -50
- package/src/github/github-auth-status.ts +27 -3
- package/src/github/github-auth.ts +19 -9
- package/src/github/github-publish.ts +24 -20
- package/src/grid/cell-editors.ts +46 -31
- package/src/grid/cell-popovers.ts +5 -3
- package/src/grid/edit-buffer.ts +10 -9
- package/src/grid/grid-controller.ts +20 -22
- package/src/grid/grid-layout.ts +21 -5
- package/src/grid/grid-open.ts +3 -6
- package/src/grid/grid-panel.ts +11 -4
- package/src/grid/grid-source.ts +8 -8
- package/src/grid/grid-view.ts +14 -17
- package/src/grid/redirects-grid.ts +14 -5
- package/src/grid/redirects.ts +16 -14
- package/src/grid/schema-columns.ts +25 -19
- package/src/grid/sources/connector-source.ts +47 -20
- package/src/grid/sources/content-source.ts +25 -24
- package/src/grid/sources/csv-file-source.ts +2 -2
- package/src/grid/tabulator-tables.d.ts +55 -34
- package/src/hosting/stage.ts +7 -7
- package/src/i18n/i18n-commands.ts +1 -2
- package/src/media/media-pane.ts +4 -1
- package/src/new-project/add-repo-modal.ts +20 -19
- package/src/new-project/import-tab.ts +10 -14
- package/src/new-project/location-fields.ts +2 -1
- package/src/new-project/new-project-modal.ts +12 -9
- package/src/packages/jxsuite-update.ts +4 -3
- package/src/packages/pull-package-sync.ts +26 -25
- package/src/page-params.ts +97 -68
- package/src/panels/activity-panel.ts +17 -9
- package/src/panels/ai-chat/attached-context.ts +13 -7
- package/src/panels/ai-chat/chat-view.ts +80 -73
- package/src/panels/ai-chat/composer.ts +30 -33
- package/src/panels/ai-chat/sessions-view.ts +1 -2
- package/src/panels/ai-panel.ts +23 -20
- package/src/panels/block-action-bar.ts +46 -35
- package/src/panels/bottom-dock.ts +5 -3
- package/src/panels/canvas-dnd-bridge.ts +31 -24
- package/src/panels/data-explorer.ts +62 -25
- package/src/panels/data-grid.ts +14 -11
- package/src/panels/dnd.ts +108 -118
- package/src/panels/editors.ts +52 -21
- package/src/panels/elements-panel.ts +10 -3
- package/src/panels/events-panel.ts +84 -69
- package/src/panels/formula-workspace.ts +76 -51
- package/src/panels/frontmatter-fields.ts +24 -19
- package/src/panels/frontmatter-panel.ts +44 -34
- package/src/panels/git-diff-open.ts +4 -4
- package/src/panels/git-panel.ts +49 -61
- package/src/panels/head-panel.ts +131 -111
- package/src/panels/i18n-panel.ts +10 -3
- package/src/panels/imports-panel.ts +23 -47
- package/src/panels/jump-bar.ts +48 -29
- package/src/panels/layers-panel.ts +97 -74
- package/src/panels/left-panel.ts +3 -3
- package/src/panels/pane-context.ts +31 -22
- package/src/panels/pane-grid.ts +49 -20
- package/src/panels/panel-registry.ts +22 -37
- package/src/panels/properties-panel.ts +175 -121
- package/src/panels/quick-search.ts +53 -31
- package/src/panels/right-panel.ts +3 -3
- package/src/panels/seo-modal.ts +13 -17
- package/src/panels/settings-menu.ts +15 -15
- package/src/panels/signals-panel.ts +153 -131
- package/src/panels/statement-editor.ts +230 -140
- package/src/panels/style-panel.ts +218 -205
- package/src/panels/style-utils.ts +114 -51
- package/src/panels/stylebook-doc.ts +57 -54
- package/src/panels/stylebook-layers-panel.ts +9 -9
- package/src/panels/stylebook-panel.ts +13 -17
- package/src/panels/tab-drop.ts +27 -11
- package/src/panels/tab-strip.ts +36 -26
- package/src/platform-errors.ts +57 -43
- package/src/platform.ts +58 -30
- package/src/platforms/cloud.ts +345 -175
- package/src/platforms/default-platform.ts +10 -4
- package/src/platforms/devserver.ts +129 -117
- package/src/platforms/read-batcher.ts +16 -8
- package/src/project-list.ts +2 -1
- package/src/publish/deploy-checklist.ts +8 -2
- package/src/publish/pages-service.ts +28 -13
- package/src/publish/publish-commands.ts +5 -4
- package/src/publish/publish-panel.ts +10 -6
- package/src/recent-projects.ts +15 -8
- package/src/resize-edges.ts +26 -36
- package/src/services/a11y-report.ts +26 -19
- package/src/services/agent-seed.ts +23 -11
- package/src/services/ai-ask.ts +9 -12
- package/src/services/ai-command-tools.ts +68 -62
- package/src/services/ai-import-tools.ts +80 -67
- package/src/services/ai-models.ts +17 -13
- package/src/services/ai-project-tools.ts +68 -32
- package/src/services/ai-session-store.ts +19 -10
- package/src/services/ai-system-prompt.ts +46 -20
- package/src/services/ai-tools.ts +71 -27
- package/src/services/ai-write-report.ts +20 -12
- package/src/services/ai-writes.ts +4 -4
- package/src/services/automation.ts +58 -31
- package/src/services/cem-export.ts +149 -58
- package/src/services/clock.ts +6 -1
- package/src/services/code-services.ts +37 -31
- package/src/services/context-manager.ts +14 -10
- package/src/services/context-resolver.ts +20 -8
- package/src/services/data-service.ts +19 -15
- package/src/services/directory-picker.ts +18 -12
- package/src/services/document-assistant.ts +39 -19
- package/src/services/gated-registry.ts +10 -6
- package/src/services/harness/chat-reducer.ts +23 -1
- package/src/services/import-client.ts +91 -38
- package/src/services/import-seed.ts +8 -2
- package/src/services/jx-validate.ts +28 -31
- package/src/services/live-preview.ts +0 -0
- package/src/services/live-surfaces.ts +6 -3
- package/src/services/model-uri.ts +10 -2
- package/src/services/module-preloads.ts +12 -8
- package/src/services/monaco-buffer.ts +43 -24
- package/src/services/monaco-lazy.ts +7 -8
- package/src/services/monaco-setup.ts +23 -16
- package/src/services/notify.ts +44 -17
- package/src/services/popover-report.ts +25 -10
- package/src/services/preview-eval.ts +20 -8
- package/src/services/profile.ts +13 -6
- package/src/services/project-path.ts +13 -10
- package/src/services/references.ts +0 -0
- package/src/services/render-critic.ts +8 -7
- package/src/services/settings/kernel.ts +13 -4
- package/src/services/settings/write-queue.ts +9 -9
- package/src/services/token-lint.ts +12 -10
- package/src/services/tool-executor.ts +17 -5
- package/src/services/tool-outcomes.ts +44 -24
- package/src/services/trusted-types.ts +24 -7
- package/src/settings/contexts-section.ts +11 -8
- package/src/settings/contributed-section.ts +79 -60
- package/src/settings/css-vars-editor.ts +37 -16
- package/src/settings/defs-editor.ts +38 -35
- package/src/settings/extension-rows.ts +16 -8
- package/src/settings/extension-sections.ts +23 -13
- package/src/settings/extensions-section.ts +4 -1
- package/src/settings/general-settings.ts +11 -8
- package/src/settings/locales-section.ts +20 -12
- package/src/settings/preferences-dialog.ts +9 -6
- package/src/settings/preferences-keymap.ts +7 -5
- package/src/settings/preferences-sections.ts +11 -5
- package/src/settings/project-sections.ts +1 -1
- package/src/settings/schema-field-ui.ts +9 -0
- package/src/settings/settings-document.ts +5 -5
- package/src/shell/tree.ts +6 -5
- package/src/shell.ts +104 -81
- package/src/site-context.ts +37 -22
- package/src/state.ts +41 -49
- package/src/store.ts +54 -34
- package/src/studio.ts +25 -75
- package/src/style/live-preview.ts +1 -1
- package/src/style/project-styles.ts +6 -7
- package/src/style/token-ref.ts +5 -4
- package/src/surfaces/about.ts +18 -19
- package/src/surfaces/add-repo.ts +17 -19
- package/src/surfaces/ai-chat.ts +31 -36
- package/src/surfaces/ai-credentials-form.ts +6 -16
- package/src/surfaces/ai-managed-connect.ts +3 -4
- package/src/surfaces/ai-model-picker.ts +3 -5
- package/src/surfaces/block-action-bar.ts +22 -11
- package/src/surfaces/boot-failure.ts +4 -5
- package/src/surfaces/bottom-dock.ts +9 -18
- package/src/surfaces/canvas-stage.ts +12 -11
- package/src/surfaces/cf-account-picker.ts +17 -18
- package/src/surfaces/commandbar.ts +14 -9
- package/src/surfaces/convert-repeater.ts +17 -19
- package/src/surfaces/data-actions.ts +9 -7
- package/src/surfaces/dialog.ts +26 -28
- package/src/surfaces/diff-toolbar.ts +9 -7
- package/src/surfaces/doc-header.ts +10 -19
- package/src/surfaces/empty-state.ts +7 -10
- package/src/surfaces/entry-editor.ts +14 -11
- package/src/surfaces/expression-editor.ts +11 -25
- package/src/surfaces/files-panel.ts +27 -14
- package/src/surfaces/formula-palette.ts +4 -5
- package/src/surfaces/git-panel.ts +7 -15
- package/src/surfaces/github-auth.ts +16 -20
- package/src/surfaces/github-publish.ts +17 -22
- package/src/surfaces/grid-cell.ts +30 -31
- package/src/surfaces/grid-open.ts +10 -14
- package/src/surfaces/grid-panel.ts +13 -9
- package/src/surfaces/grid-replace.ts +13 -13
- package/src/surfaces/grid-views.ts +15 -18
- package/src/surfaces/inspector-dock.ts +13 -12
- package/src/surfaces/jump-bar.ts +5 -6
- package/src/surfaces/jxsuite-update.ts +16 -22
- package/src/surfaces/library-pane.ts +19 -20
- package/src/surfaces/logic-panel.ts +17 -30
- package/src/surfaces/logic-workspace.ts +13 -15
- package/src/surfaces/media-browser.ts +11 -10
- package/src/surfaces/media-field.ts +4 -5
- package/src/surfaces/media-pane.ts +8 -7
- package/src/surfaces/menu.ts +29 -23
- package/src/surfaces/navigator-dock.ts +11 -12
- package/src/surfaces/new-project.ts +27 -26
- package/src/surfaces/pane-context.ts +20 -25
- package/src/surfaces/pane-grid.ts +15 -10
- package/src/surfaces/panel-activity.ts +5 -6
- package/src/surfaces/panel-data.ts +3 -4
- package/src/surfaces/panel-deploy-checklist.ts +5 -6
- package/src/surfaces/panel-elements.ts +5 -7
- package/src/surfaces/panel-i18n.ts +5 -7
- package/src/surfaces/panel-imports.ts +6 -13
- package/src/surfaces/panel-outline.ts +25 -19
- package/src/surfaces/panel-page.ts +11 -18
- package/src/surfaces/panel-problems.ts +5 -7
- package/src/surfaces/panel-signals.ts +20 -34
- package/src/surfaces/panel-stylebook-layers.ts +5 -8
- package/src/surfaces/preferences.ts +21 -11
- package/src/surfaces/progress-modal.ts +15 -9
- package/src/surfaces/properties-panel.json +1 -1
- package/src/surfaces/properties-panel.ts +20 -42
- package/src/surfaces/publish.ts +18 -18
- package/src/surfaces/push-plan.ts +7 -8
- package/src/surfaces/rail.ts +13 -13
- package/src/surfaces/reference-field.ts +11 -15
- package/src/surfaces/schema-builder.ts +16 -22
- package/src/surfaces/schema-form.ts +15 -25
- package/src/surfaces/secret-field.ts +9 -6
- package/src/surfaces/seo.ts +21 -15
- package/src/surfaces/settings-contexts.ts +9 -7
- package/src/surfaces/settings-contributed.ts +14 -10
- package/src/surfaces/settings-css-vars.ts +5 -12
- package/src/surfaces/settings-defs.json +2 -2
- package/src/surfaces/settings-defs.ts +17 -21
- package/src/surfaces/settings-deploy.ts +8 -15
- package/src/surfaces/settings-extensions.ts +5 -6
- package/src/surfaces/settings-head.ts +33 -39
- package/src/surfaces/settings-locales.ts +8 -20
- package/src/surfaces/settings-overview.ts +5 -6
- package/src/surfaces/settings-packages.ts +8 -7
- package/src/surfaces/settings-pane.ts +9 -18
- package/src/surfaces/settings-rawjson.ts +5 -6
- package/src/surfaces/shell.ts +1 -2
- package/src/surfaces/slash-menu.ts +19 -9
- package/src/surfaces/statements.ts +13 -18
- package/src/surfaces/statusbar.ts +17 -14
- package/src/surfaces/style-panel.ts +18 -31
- package/src/surfaces/stylebook-chrome.ts +3 -5
- package/src/surfaces/tab-strip.ts +14 -13
- package/src/surfaces/target-line.ts +6 -7
- package/src/surfaces/welcome.ts +5 -7
- package/src/tabs/patch-ops.ts +4 -3
- package/src/tabs/project-config.ts +32 -21
- package/src/tabs/selection.ts +36 -8
- package/src/tabs/tab.ts +52 -41
- package/src/tabs/transact.ts +98 -53
- package/src/types.ts +32 -17
- package/src/ui/ai-credentials-form.ts +10 -13
- package/src/ui/ai-model-picker.ts +3 -3
- package/src/ui/cf-account-picker.ts +7 -9
- package/src/ui/color-selector.ts +9 -5
- package/src/ui/dynamic-slot.ts +7 -8
- package/src/ui/expression-editor.ts +112 -105
- package/src/ui/form-controls.ts +57 -48
- package/src/ui/formula-catalog.ts +239 -230
- package/src/ui/formula-chips.ts +33 -18
- package/src/ui/layers.ts +44 -31
- package/src/ui/media-picker.ts +18 -9
- package/src/ui/popover-surface.ts +20 -12
- package/src/ui/progress-modal.ts +13 -8
- package/src/ui/regions.ts +7 -6
- package/src/ui/schema-form.ts +113 -70
- package/src/ui/surface.ts +71 -8
- package/src/ui/timing.ts +9 -0
- package/src/ui/value-source.ts +44 -31
- package/src/ui/virtual-window.ts +3 -2
- package/src/utils/base64.ts +3 -1
- package/src/utils/edit-display.ts +73 -73
- package/src/utils/element-selectors.ts +3 -2
- package/src/utils/google-fonts.ts +15 -14
- package/src/utils/inherited-style.ts +18 -20
- package/src/utils/link-target.ts +1 -1
- package/src/utils/preview-format.ts +25 -3
- package/src/utils/strip-events.ts +49 -22
- package/src/utils/studio-utils.ts +29 -14
- package/src/view.ts +2 -3
- package/src/workspace/pane-derive.ts +10 -12
- package/src/workspace/session.ts +53 -43
- package/src/workspace/workspace.ts +40 -36
- package/dist/chunks/adapter-f93pafd7.js +0 -4
- package/dist/chunks/cf-account-picker-af1h381v.js +0 -4
- package/dist/chunks/cf-settings-125tdm0w.js +0 -4
- package/dist/chunks/color-area-jqhna8zy.js +0 -4
- package/dist/chunks/color-field-embq5ctg.js +0 -4
- package/dist/chunks/color-fpezvnkt.js +0 -4
- package/dist/chunks/color-slider-1qmw7wqy.js +0 -4
- package/dist/chunks/combobox-773hdzyj.js +0 -4
- package/dist/chunks/components-ax2f1fnn.js +0 -4
- package/dist/chunks/content-source-108aqtk1.js +0 -4
- package/dist/chunks/convert-to-repeater-ry5rmppr.js +0 -4
- package/dist/chunks/dialog-mtm9fq5t.js +0 -4
- package/dist/chunks/editor-pfgdmkb0.js +0 -4
- package/dist/chunks/entry-commands-t0k1q0kx.js +0 -4
- package/dist/chunks/extension-sections-6mwh2hf8.js +0 -4
- package/dist/chunks/file-ops-meej5mqf.js +0 -4
- package/dist/chunks/files-44vp8a2s.js +0 -4
- package/dist/chunks/format-host-7q1petb9.js +0 -4
- package/dist/chunks/fs-events-h2mwnxaz.js +0 -4
- package/dist/chunks/git-panel-zngbymvd.js +0 -4
- package/dist/chunks/grid-view-sx9vynsp.js +0 -51
- package/dist/chunks/icons-p44xhjf0.js +0 -4
- package/dist/chunks/iframe-entry-f7mqjwpm.js +0 -5
- package/dist/chunks/iframe-entry-haw7jkvz.js +0 -5
- package/dist/chunks/iframe-entry-z6qrytv3.js +0 -5
- package/dist/chunks/iframe-host-qk3ycq87.js +0 -4
- package/dist/chunks/index-wkyfjeqz.js +0 -4
- package/dist/chunks/jx-validate-psgd7vsx.js +0 -4
- package/dist/chunks/layers-panel-1kq2jyfk.js +0 -4
- package/dist/chunks/layers-xd92fg8d.js +0 -4
- package/dist/chunks/listbox-s8fkmnq8.js +0 -4
- package/dist/chunks/lit-html-ac4cwwr4.js +0 -4
- package/dist/chunks/media-picker-0svzkdyb.js +0 -4
- package/dist/chunks/menu-37d07z9m.js +0 -4
- package/dist/chunks/menu-5c55ea3d.js +0 -4
- package/dist/chunks/monaco-binding-z6r70pdt.js +0 -4
- package/dist/chunks/monaco-buffer-fz6gq5y7.js +0 -4
- package/dist/chunks/monaco-setup-q4axkgj7.js +0 -4
- package/dist/chunks/notify-0xgtn8q1.js +0 -4
- package/dist/chunks/number-field-gw7sq8rn.js +0 -4
- package/dist/chunks/parse-897fvqah.js +0 -4
- package/dist/chunks/platform-v1qctbe6.js +0 -4
- package/dist/chunks/popover-8htra4er.js +0 -4
- package/dist/chunks/publish-panel-ym1fmgq5.js +0 -4
- package/dist/chunks/quick-search-a54e6t5n.js +0 -4
- package/dist/chunks/references-gmqp82fs.js +0 -4
- package/dist/chunks/right-panel-v7t9awbk.js +0 -4
- package/dist/chunks/section-registry-vhyf3zsr.js +0 -4
- package/dist/chunks/select-n3v7gwas.js +0 -4
- package/dist/chunks/split-pff8f3ze.js +0 -4
- package/dist/chunks/studio-0bhx5hz6.js +0 -5
- package/dist/chunks/studio-0k1ddnyy.js +0 -6
- package/dist/chunks/studio-1b04pd0j.js +0 -64
- package/dist/chunks/studio-4dwbj6gb.js +0 -5
- package/dist/chunks/studio-4tanh828.js +0 -5
- package/dist/chunks/studio-55h4mstj.js +0 -4
- package/dist/chunks/studio-5tnvjkz4.js +0 -5
- package/dist/chunks/studio-60dqgb0c.js +0 -5
- package/dist/chunks/studio-61dp09qg.js +0 -9
- package/dist/chunks/studio-63epcrj2.js +0 -5
- package/dist/chunks/studio-74k29dy9.js +0 -5
- package/dist/chunks/studio-7vg6jcd3.js +0 -5
- package/dist/chunks/studio-7zx31knw.js +0 -9
- package/dist/chunks/studio-8bxk97km.js +0 -5
- package/dist/chunks/studio-933e30n4.js +0 -5
- package/dist/chunks/studio-98wnwhbg.js +0 -5
- package/dist/chunks/studio-9mccjwjh.js +0 -14
- package/dist/chunks/studio-a2ke1e4t.js +0 -5
- package/dist/chunks/studio-e3a2a6v3.js +0 -4
- package/dist/chunks/studio-e81q1vb9.js +0 -5
- package/dist/chunks/studio-epgrmqqm.js +0 -5
- package/dist/chunks/studio-ery42sqr.js +0 -4
- package/dist/chunks/studio-g1shz58g.js +0 -5
- package/dist/chunks/studio-gf0fz03c.js +0 -5
- package/dist/chunks/studio-gjtpe62q.js +0 -6
- package/dist/chunks/studio-gkskhg7m.js +0 -5
- package/dist/chunks/studio-gx4dnjzd.js +0 -5
- package/dist/chunks/studio-j03zga3y.js +0 -9
- package/dist/chunks/studio-jhpxeckz.js +0 -5
- package/dist/chunks/studio-k01r7ykp.js +0 -5
- package/dist/chunks/studio-kk7h30ne.js +0 -7
- package/dist/chunks/studio-kt1zqney.js +0 -5
- package/dist/chunks/studio-m3cwhvye.js +0 -5
- package/dist/chunks/studio-mcayt6hz.js +0 -5
- package/dist/chunks/studio-myjcghv3.js +0 -5
- package/dist/chunks/studio-n8bxwc3y.js +0 -4
- package/dist/chunks/studio-ngm8gvpb.js +0 -5
- package/dist/chunks/studio-nj5a01jy.js +0 -928
- package/dist/chunks/studio-pcgz8heb.js +0 -5
- package/dist/chunks/studio-qcsq0t15.js +0 -5
- package/dist/chunks/studio-qkstvve9.js +0 -5
- package/dist/chunks/studio-qv1pwd3c.js +0 -5
- package/dist/chunks/studio-rc6dvxjb.js +0 -7
- package/dist/chunks/studio-s8dmmz66.js +0 -5
- package/dist/chunks/studio-sp5xzbj4.js +0 -6
- package/dist/chunks/studio-szsjbj0g.js +0 -5
- package/dist/chunks/studio-t1xzawhr.js +0 -16
- package/dist/chunks/studio-t6b6qe31.js +0 -5
- package/dist/chunks/studio-tdcprbqb.js +0 -5
- package/dist/chunks/studio-vyc0b4he.js +0 -10
- package/dist/chunks/studio-w0cgf6jg.js +0 -5
- package/dist/chunks/studio-w3hskzqk.js +0 -5
- package/dist/chunks/studio-xgrgcdyh.js +0 -9
- package/dist/chunks/studio-xz2yxfcb.js +0 -5
- package/dist/chunks/studio-y6n42tgs.js +0 -5
- package/dist/chunks/studio-yb560vxr.js +0 -5
- package/dist/chunks/studio-yn9f8vtx.js +0 -5
- package/dist/chunks/studio-yw05w8f0.js +0 -7
- package/dist/chunks/studio-z16sgavc.js +0 -5
- package/dist/chunks/studio-zyqn40w4.js +0 -5
- package/dist/chunks/swatch-group-8qh9a3bm.js +0 -4
- package/dist/chunks/tabs-jwthg40w.js +0 -4
- package/dist/chunks/textfield-spy3hc77.js +0 -4
- package/dist/chunks/toast-4d35zd64.js +0 -4
- package/dist/chunks/toast-host-8sjmfed3.js +0 -4
- package/dist/chunks/tooltip-fd6g9xy3.js +0 -4
- package/dist/chunks/tree-h19v1jfz.js +0 -4
- package/dist/chunks/workspace-zt81g1ms.js +0 -4
- package/dist/chunks/ws-client-n2bh4hkf.js +0 -4
package/dist/iframe-entry.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
function ko(e){let{target:t,source:n,targetOrigin:r,acceptOrigin:o,token:s}=e,i=new Set,a=(c)=>{if(o!=="*"&&c.origin!==o)return;let l=c.data;if(!l||typeof l!=="object"||l["jx:canvas"]!==s)return;for(let u of i)u(l.payload)};return n.addEventListener("message",a),{dispose(){i.clear(),n.removeEventListener("message",a)},onMessage(c){return i.add(c),()=>i.delete(c)},post(c){t.postMessage({["jx:canvas"]:s,payload:c},r)}}}function oe(e){return e.getBoundingClientRect()}function To(e){return e.getBoundingClientRect()}function Ao(e,t,n=document){return n.elementFromPoint(e,t)}function se(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function De(e){return se(e)&&typeof e.$ref==="string"}function ft(e){return se(e)&&e.$prototype==="Function"}function Ke(e){return se(e)&&se(e.$expression)}function Co(e){return Ke(e)&&Array.isArray(e.parameters)&&e.parameters.length>0}function Fn(e){return ft(e)&&Array.isArray(e.body)}function Wn(e){return se(e)&&typeof e.$prototype==="string"&&e.$prototype!=="Function"}function Bn(e){return se(e)&&e.timing==="server"&&typeof e.$src==="string"&&typeof e.$export==="string"&&!e.$prototype}function Kt(e){return se(e)&&e.$prototype==="Array"}function le(e){return typeof e==="string"&&e.includes("${")}function Kn(e){return/\breturn\b[^\S\n]*(?![;}\s]|$)/.test(e)}function Po(e){return De(e)||ft(e)||Ke(e)}function Ro(e){if(!e)return[];return e.map((t)=>typeof t==="string"?t:t.name)}function Vn(e){if(!se(e)||!se(e.$expression))return!1;let t=e.$expression;if(t.operator==="?:")return typeof t.value==="string"&&typeof t.initial==="string";if(t.operator==="switch")return se(t.cases)&&Object.values(t.cases).every((n)=>typeof n==="string")&&typeof t.default==="string";return!1}function _a(e){if(typeof e==="string")return[e];if(!Vn(e))return[];let t=e.$expression;if(t.operator==="?:")return[...new Set([t.value,t.initial])];return[...new Set([...Object.values(t.cases),t.default])]}function be(e){return typeof e==="string"?e:_a(e).join("|")}function Vt(e){return e.startsWith("#")}function Un(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var Ut=Object.assign;var Oa=Object.prototype.hasOwnProperty,qt=(e,t)=>Oa.call(e,t),Ve=Array.isArray,dt=(e)=>No(e)==="[object Map]";var $o=(e)=>typeof e==="function",Da=(e)=>typeof e==="string",Ue=(e)=>typeof e==="symbol",qe=(e)=>e!==null&&typeof e==="object";var La=Object.prototype.toString,No=(e)=>La.call(e),Mo=(e)=>No(e).slice(8,-1);var zt=(e)=>Da(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var Gt=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},Ia=/-\w/g,wf=Gt((e)=>e.replace(Ia,(t)=>t.slice(1).toUpperCase())),Ja=/\B([A-Z])/g,Ef=Gt((e)=>e.replace(Ja,"-$1").toLowerCase()),_o=Gt((e)=>e.charAt(0).toUpperCase()+e.slice(1)),vf=Gt((e)=>e?`on${_o(e)}`:""),we=(e,t)=>!Object.is(e,t);var ja="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var Sf=Un(ja+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var z;class Lo{constructor(e=!1){if(this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&z)if(z.active)this.parent=z,this.index=(z.scopes||(z.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let r=this.scopes.slice();for(e=0,t=r.length;e<t;e++)r[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}}run(e){if(this._active){let t=z;try{return z=this,e()}finally{z=t}}}on(){if(++this._on===1)this.prevScope=z,z=this}off(){if(this._on>0&&--this._on===0){if(z===this)z=this.prevScope;else{let e=z;while(e){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();this.effects.length=0;for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();if(r&&r!==this)this.parent.scopes[this.index]=r,r.index=this.index}this.parent=void 0}}}function Ge(e){return new Lo(e)}function Qt(e,t=!1){if(z)z.cleanups.push(e)}var H;var qn=new WeakSet;class Zt{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,z)if(z.active)z.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,qn.has(this))qn.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Jo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Oo(this),jo(this);let e=H,t=ce;H=this,ce=!0;try{return this.fn()}finally{Ho(this),H=e,ce=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)rr(e);this.deps=this.depsTail=void 0,Oo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)qn.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Yn(this))this.run()}get dirty(){return Yn(this)}}var Io=0,mt,ht;function Jo(e,t=!1){if(e.flags|=8,t){e.next=ht,ht=e;return}e.next=mt,mt=e}function tr(){Io++}function nr(){if(--Io>0)return;if(ht){let t=ht;ht=void 0;while(t){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;while(mt){let t=mt;mt=void 0;while(t){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){if(!e)e=r}t=n}}if(e)throw e}function jo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ho(e){let t,n=e.depsTail,r=n;while(r){let o=r.prevDep;if(r.version===-1){if(r===n)n=o;rr(r),Ha(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function Yn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Fo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Fo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===gt)return;if(e.globalVersion=gt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Yn(e)))return;e.flags|=2;let t=e.dep,n=H,r=ce;H=e,ce=!0;try{jo(e);let o=e.fn(e._value);if(t.version===0||we(o,e._value))e.flags|=128,e._value=o,t.version++}catch(o){throw t.version++,o}finally{H=n,ce=r,Ho(e),e.flags&=-3}}function rr(e,t=!1){let{dep:n,prevSub:r,nextSub:o}=e;if(r)r.nextSub=o,e.prevSub=void 0;if(o)o.prevSub=r,e.nextSub=void 0;if(n.subs===e){if(n.subs=r,!r&&n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)rr(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function Ha(e){let{prevDep:t,nextDep:n}=e;if(t)t.nextDep=n,e.prevDep=void 0;if(n)n.prevDep=t,e.nextDep=void 0}function G(e,t){if(e.effect instanceof Zt)e=e.effect.fn;let n=new Zt(e);if(t)Ut(n,t);try{n.run()}catch(o){throw n.stop(),o}let r=n.run.bind(n);return r.effect=n,r}var ce=!0,Wo=[];function en(){Wo.push(ce),ce=!1}function tn(){let e=Wo.pop();ce=e===void 0?!0:e}function nn(e,t=!1){if(H instanceof Zt)H.cleanup=e}function Oo(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=H;H=void 0;try{t()}finally{H=n}}}var gt=0;class Bo{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class rn{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!H||!ce||H===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==H){if(t=this.activeLink=new Bo(H,this),!H.deps)H.deps=H.depsTail=t;else t.prevDep=H.depsTail,H.depsTail.nextDep=t,H.depsTail=t;Ko(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let n=t.nextDep;if(n.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=n;if(t.prevDep=H.depsTail,t.nextDep=void 0,H.depsTail.nextDep=t,H.depsTail=t,H.deps===t)H.deps=n}}return t}trigger(e){this.version++,gt++,this.notify(e)}notify(e){tr();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{nr()}}}function Ko(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ko(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var Xn=new WeakMap,Le=Symbol(""),Zn=Symbol(""),xt=Symbol("");function Q(e,t,n){if(ce&&H){let r=Xn.get(e);if(!r)Xn.set(e,r=new Map);let o=r.get(n);if(!o)r.set(n,o=new rn),o.map=r,o.key=n;o.track()}}function Ce(e,t,n,r,o,s){let i=Xn.get(e);if(!i){gt++;return}let a=(c)=>{if(c)c.trigger()};if(tr(),t==="clear")i.forEach(a);else{let c=Ve(e),l=c&&zt(n);if(c&&n==="length"){let u=Number(r);i.forEach((f,d)=>{if(d==="length"||d===xt||!Ue(d)&&d>=u)a(f)})}else{if(n!==void 0||i.has(void 0))a(i.get(n));if(l)a(i.get(xt));switch(t){case"add":if(!c){if(a(i.get(Le)),dt(e))a(i.get(Zn))}else if(l)a(i.get("length"));break;case"delete":if(!c){if(a(i.get(Le)),dt(e))a(i.get(Zn))}break;case"set":if(dt(e))a(i.get(Le));break}}}nr()}function ze(e){let t=j(e);if(t===e)return t;if(Q(t,"iterate",xt),Re(e))return t;if(!ve(e))return t.map(ge);return yt(e)?t.map((n)=>Ie(ge(n))):t.map(Ie)}function or(e){return Q(e=j(e),"iterate",xt),e}function he(e,t){if(ve(e))return yt(e)?Ie(ge(t)):Ie(t);return ge(t)}var Fa={__proto__:null,[Symbol.iterator](){return zn(this,Symbol.iterator,(e)=>he(this,e))},concat(...e){return ze(this).concat(...e.map((t)=>Ve(t)?ze(t):t))},entries(){return zn(this,"entries",(e)=>(e[1]=he(this,e[1]),e))},every(e,t){return Ee(this,"every",e,t,void 0,arguments)},filter(e,t){return Ee(this,"filter",e,t,(n)=>n.map((r)=>he(this,r)),arguments)},find(e,t){return Ee(this,"find",e,t,(n)=>he(this,n),arguments)},findIndex(e,t){return Ee(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ee(this,"findLast",e,t,(n)=>he(this,n),arguments)},findLastIndex(e,t){return Ee(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ee(this,"forEach",e,t,void 0,arguments)},includes(...e){return Gn(this,"includes",e)},indexOf(...e){return Gn(this,"indexOf",e)},join(e){return ze(this).join(e)},lastIndexOf(...e){return Gn(this,"lastIndexOf",e)},map(e,t){return Ee(this,"map",e,t,void 0,arguments)},pop(){return pt(this,"pop")},push(...e){return pt(this,"push",e)},reduce(e,...t){return Do(this,"reduce",e,t)},reduceRight(e,...t){return Do(this,"reduceRight",e,t)},shift(){return pt(this,"shift")},some(e,t){return Ee(this,"some",e,t,void 0,arguments)},splice(...e){return pt(this,"splice",e)},toReversed(){return ze(this).toReversed()},toSorted(e){return ze(this).toSorted(e)},toSpliced(...e){return ze(this).toSpliced(...e)},unshift(...e){return pt(this,"unshift",e)},values(){return zn(this,"values",(e)=>he(this,e))}};function zn(e,t,n){let r=or(e),o=r[t]();if(r!==e&&!Re(e))o._next=o.next,o.next=()=>{let s=o._next();if(!s.done)s.value=n(s.value);return s};return o}var Wa=Array.prototype;function Ee(e,t,n,r,o,s){let i=or(e),a=i!==e&&!Re(e),c=i[t];if(c!==Wa[t]){let f=c.apply(e,s);return a?ge(f):f}let l=n;if(i!==e){if(a)l=function(f,d){return n.call(this,he(e,f),d,e)};else if(n.length>2)l=function(f,d){return n.call(this,f,d,e)}}let u=c.call(i,l,r);return a&&o?o(u):u}function Do(e,t,n,r){let o=or(e),s=o!==e&&!Re(e),i=n,a=!1;if(o!==e){if(s)a=r.length===0,i=function(l,u,f){if(a)a=!1,l=he(e,l);return n.call(this,l,he(e,u),f,e)};else if(n.length>3)i=function(l,u,f){return n.call(this,l,u,f,e)}}let c=o[t](i,...r);return a?he(e,c):c}function Gn(e,t,n){let r=j(e);Q(r,"iterate",xt);let o=r[t](...n);if((o===-1||o===!1)&&tl(n[0]))return n[0]=j(n[0]),r[t](...n);return o}function pt(e,t,n=[]){en(),tr();let r=j(e)[t].apply(e,n);return nr(),tn(),r}var Ba=Un("__proto__,__v_isRef,__isVue"),Vo=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Ue));function Ka(e){if(!Ue(e))e=String(e);let t=j(this);return Q(t,"has",e),t.hasOwnProperty(e)}class sr{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;let r=this._isReadonly,o=this._isShallow;if(t==="__v_isReactive")return!r;else if(t==="__v_isReadonly")return r;else if(t==="__v_isShallow")return o;else if(t==="__v_raw"){if(n===(r?o?Qa:Go:o?zo:qo).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=Ve(e);if(!r){let a;if(s&&(a=Fa[t]))return a;if(t==="hasOwnProperty")return Ka}let i=Reflect.get(e,t,Pe(e)?e:n);if(Ue(t)?Vo.has(t):Ba(t))return i;if(!r)Q(e,"get",t);if(o)return i;if(Pe(i)){let a=s&&zt(t)?i:i.value;return r&&qe(a)?er(a):a}if(qe(i))return r?er(i):on(i);return i}}class ir extends sr{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t],s=Ve(e)&&zt(t);if(!this._isShallow){let c=ve(o);if(!Re(n)&&!ve(n))o=j(o),n=j(n);if(!s&&Pe(o)&&!Pe(n))if(c)return!0;else return o.value=n,!0}let i=s?Number(t)<e.length:qt(e,t),a=Reflect.set(e,t,n,Pe(e)?e:r);if(e===j(r)&&a){if(!i)Ce(e,"add",t,n);else if(we(n,o))Ce(e,"set",t,n,o)}return a}deleteProperty(e,t){let n=qt(e,t),r=e[t],o=Reflect.deleteProperty(e,t);if(o&&n)Ce(e,"delete",t,void 0,r);return o}has(e,t){let n=Reflect.has(e,t);if(!Ue(t)||!Vo.has(t))Q(e,"has",t);return n}ownKeys(e){return Q(e,"iterate",Ve(e)?"length":Le),Reflect.ownKeys(e)}}class Uo extends sr{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Va=new ir,Ua=new Uo,qa=new ir(!0);var Qn=(e)=>e,Yt=(e)=>Reflect.getPrototypeOf(e);function za(e,t,n){return function(...r){let o=this.__v_raw,s=j(o),i=dt(s),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,l=o[e](...r),u=n?Qn:t?Ie:ge;return!t&&Q(s,"iterate",c?Zn:Le),Ut(Object.create(l),{next(){let{value:f,done:d}=l.next();return d?{value:f,done:d}:{value:a?[u(f[0]),u(f[1])]:u(f),done:d}}})}}function Xt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ga(e,t){let n={get(o){let s=this.__v_raw,i=j(s),a=j(o);if(!e){if(we(o,a))Q(i,"get",o);Q(i,"get",a)}let{has:c}=Yt(i),l=t?Qn:e?Ie:ge;if(c.call(i,o))return l(s.get(o));else if(c.call(i,a))return l(s.get(a));else if(s!==i)s.get(o)},get size(){let o=this.__v_raw;return!e&&Q(j(o),"iterate",Le),o.size},has(o){let s=this.__v_raw,i=j(s),a=j(o);if(!e){if(we(o,a))Q(i,"has",o);Q(i,"has",a)}return o===a?s.has(o):s.has(o)||s.has(a)},forEach(o,s){let i=this,a=i.__v_raw,c=j(a),l=t?Qn:e?Ie:ge;return!e&&Q(c,"iterate",Le),a.forEach((u,f)=>o.call(s,l(u),l(f),i))}};return Ut(n,e?{add:Xt("add"),set:Xt("set"),delete:Xt("delete"),clear:Xt("clear")}:{add(o){let s=j(this),i=Yt(s),a=j(o),c=!t&&!Re(o)&&!ve(o)?a:o;if(!(i.has.call(s,c)||we(o,c)&&i.has.call(s,o)||we(a,c)&&i.has.call(s,a)))s.add(c),Ce(s,"add",c,c);return this},set(o,s){if(!t&&!Re(s)&&!ve(s))s=j(s);let i=j(this),{has:a,get:c}=Yt(i),l=a.call(i,o);if(!l)o=j(o),l=a.call(i,o);let u=c.call(i,o);if(i.set(o,s),!l)Ce(i,"add",o,s);else if(we(s,u))Ce(i,"set",o,s,u);return this},delete(o){let s=j(this),{has:i,get:a}=Yt(s),c=i.call(s,o);if(!c)o=j(o),c=i.call(s,o);let l=a?a.call(s,o):void 0,u=s.delete(o);if(c)Ce(s,"delete",o,void 0,l);return u},clear(){let o=j(this),s=o.size!==0,i=void 0,a=o.clear();if(s)Ce(o,"clear",void 0,void 0,void 0);return a}}),["keys","values","entries",Symbol.iterator].forEach((o)=>{n[o]=za(o,e,t)}),n}function ar(e,t){let n=Ga(e,t);return(r,o,s)=>{if(o==="__v_isReactive")return!e;else if(o==="__v_isReadonly")return e;else if(o==="__v_raw")return r;return Reflect.get(qt(n,o)&&o in r?n:r,o,s)}}var Ya={get:ar(!1,!1)},Xa={get:ar(!1,!0)},Za={get:ar(!0,!1)};var qo=new WeakMap,zo=new WeakMap,Go=new WeakMap,Qa=new WeakMap;function el(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function on(e){if(ve(e))return e;return lr(e,!1,Va,Ya,qo)}function Yo(e){return lr(e,!1,qa,Xa,zo)}function er(e){return lr(e,!0,Ua,Za,Go)}function lr(e,t,n,r,o){if(!qe(e))return e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let s=o.get(e);if(s)return s;let i=el(Mo(e));if(i===0)return e;let a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function yt(e){if(ve(e))return yt(e.__v_raw);return!!(e&&e.__v_isReactive)}function ve(e){return!!(e&&e.__v_isReadonly)}function Re(e){return!!(e&&e.__v_isShallow)}function tl(e){return e?!!e.__v_raw:!1}function j(e){let t=e&&e.__v_raw;return t?j(t):e}var ge=(e)=>qe(e)?on(e):e,Ie=(e)=>qe(e)?er(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function ue(e){return nl(e,!1)}function nl(e,t){if(Pe(e))return e;return new Xo(e,t)}class Xo{constructor(e,t){this.dep=new rn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:j(e),this._value=t?e:ge(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Re(e)||ve(e);if(e=n?e:j(e),we(e,t))this._rawValue=e,this._value=n?e:ge(e),this.dep.trigger()}}class Zo{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new rn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&H!==this)return Jo(this,!0),!0}get value(){let e=this.dep.track();if(Fo(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function bt(e,t,n=!1){let r,o;if($o(e))r=e;else r=e.get,o=e.set;return new Zo(r,o,n)}function sn(e){return e.replaceAll(/[A-Z]/g,(t)=>`-${t.toLowerCase()}`)}var rl=new Set(["all","print","screen","speech"]);function Qo(e,t){if(e.startsWith("@--"))return t[e.slice(1)]??e.slice(1);if(e.startsWith("@(")){let n=e.slice(2,-1).trim();return rl.has(n.toLowerCase())?n:e.slice(1)}return null}function wt(e){return e.startsWith("@position-try")||e.startsWith("@property")||e.startsWith("@font-face")||e.startsWith("@counter-style")}function vt(e){return e.startsWith("@keyframes")}function es(e,t){let n=[];for(let r of cr(e))for(let o of cr(t))n.push(ol(r,o));return n.join(", ")}function ol(e,t){if(t.startsWith("&"))return t.replaceAll("&",e);if(t.startsWith("[")||t.startsWith(":")||t.startsWith("."))return`${e}${t}`;return`${e} ${t}`}function cr(e){let t=[],n=0,r=null,o=0;for(let i=0;i<e.length;i+=1){let a=e[i];if(r){if(a==="\\")i+=1;else if(a===r)r=null;continue}if(a==='"'||a==="'")r=a;else if(a==="("||a==="[")n+=1;else if(a===")"||a==="]")n=Math.max(0,n-1);else if(a===","&&n===0)t.push(e.slice(o,i)),o=i+1}t.push(e.slice(o));let s=t.map((i)=>i.trim()).filter((i)=>i!=="");return s.length>0?s:[e]}var sl=/[\s>+~,()]/,il=/^[A-Za-z_\u{00A0}-\u{FFFF}][\w\u{00A0}-\u{FFFF}-]*/u;function al(e,t){let n="",r=0;for(;;){let o=e.indexOf("[open]",r);if(o===-1)return n+e.slice(r);let s=o;while(s>0&&!sl.test(e[s-1]))s-=1;let i=il.exec(e.slice(s,o))?.[0]?.toLowerCase(),a=i===void 0?t.dialog===!0:i==="dialog";n+=e.slice(r,o)+(a?"[data-jx-dialog-open]":"[open]"),r=o+6}}function ur(e,t={}){if(e.includes("::backdrop"))return null;let n=e.replaceAll(":popover-open","[data-jx-popover-open]").replaceAll(":modal","[data-jx-dialog-open]").replaceAll("[inert]","[data-jx-inert]");return al(n,t)}var $e="data-color-scheme";function an(e){return/^\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)$/.exec(e.trim())?.[1]??null}function ts(e,t){if(e===":root"||e==="html")return{auto:`${e}:where(:not([${$e}]))`,forced:`${e}:where([${$e}="${t}"])`};return{auto:`:where(:root:not([${$e}])) ${e}`,forced:`:where(:root[${$e}="${t}"]) ${e}`}}function St(e){return e.startsWith(":")||e.startsWith(".")||e.startsWith("&")||e.startsWith("[")}function fr(e){return e.startsWith("--")?e:sn(e)}function Et(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function ns(e,t,n){let r=n.map(([s,i])=>`${s}: ${i}`).join("; "),o=t===null?r:`${t} { ${r} }`;for(let s=e.length-1;s>=0;s-=1)o=`${e[s]} { ${o} }`;return o}function ll(e,t,n){let r=n.map(({selector:s,declarations:i})=>`${s} { ${i.map(([a,c])=>`${a}: ${c}`).join("; ")} }`).join(" "),o=`@keyframes ${t} { ${r} }`;for(let s=e.length-1;s>=0;s-=1)o=`${e[s]} { ${o} }`;return o}function cl(e){let t=Object.keys(e).filter((r)=>vt(r));if(t.length===0)return e;let n={...e};for(let r of t)delete n[r];return n}function ul(e){let t=e.startsWith("&")?e.slice(1):e;return t===""||t.startsWith(":")||t.startsWith(".")||t.startsWith("[")}function kt(e,t={}){let{scope:n=null,mediaQueries:r={},transposeValue:o=(h)=>h,transposeSelector:s=(h)=>h,resolveValue:i}=t,a=[],c=(h)=>h!==null&&typeof h==="object"&&!Array.isArray(h)&&!De(h),l=(h,x)=>{if(c(x))return[x];if(!wt(h)||!Array.isArray(x)||x.length===0)return[];return x.every((S)=>c(S))?x:[]},u=(h,x,S,A)=>{if(x===void 0||x===null)return null;if(De(x))return S?i?.(h,x,A)??null:null;if(typeof x==="object")return null;let C=String(x);if(le(C))return S?i?.(h,C,A)??null:null;return o(C)},f=(h,x,S=!0,A="self")=>{let C=[];for(let[T,g]of Object.entries(h)){if(l(T,g).length>0)continue;if(x&&(T.startsWith("@")||St(T)))continue;if(T.startsWith("$"))continue;let v=u(T,g,S,A);if(v!==null)C.push([fr(T),v])}return C},d=(h,x,S,A,C)=>{if(S.length===0)return;let T=x;if(T!==null){let v=s(T);if(v===null)return;T=v}let g=ns(h,T,S);a.push({text:g,conditions:[...h],selector:T,declarations:S,target:A,key:Et(g),...typeof C==="string"&&C!==""?{description:C}:{}})},m=(h,x,S)=>{let A=h.slice(10).trim();if(A==="")return;let C=[];for(let[g,v]of Object.entries(x)){if(!c(v))continue;let P=f(v,!0,!1,"unscoped");if(P.length>0)C.push({declarations:P,selector:g.trim()})}if(C.length===0)return;let T=ll(S,A,C);a.push({blocks:C,conditions:[...S],declarations:[],key:Et(T),selector:null,target:"unscoped",text:T})},w=(h,x,S,A,C)=>{if(h==="@--")return;if(wt(h)){d([...A,h],null,f(x,!1,!0,"unscoped"),"unscoped",x.$description);return}if(vt(h)){m(h,x,A);return}let T=Qo(h,r),g=T===null?h:`@media ${T}`,v=T===null?null:an(T);if(v!==null&&S!==null){let{auto:P,forced:E}=ts(S,v);y(x,P,[...A,g],C),y(cl(x),E,A,C);return}y(x,S,[...A,g],C)};function y(h,x,S,A){d(S,x,f(h,!0,!0,A),A,h.$description);for(let[C,T]of Object.entries(h))for(let g of l(C,T))if(C.startsWith("@"))w(C,g,x,S,A);else if(x!==null)y(g,es(x,C),S,ul(C)?A:"descendant")}return y(e,n,[],"self"),a}var Se="en-US",rs="UTC",os=[{api:"Intl.NumberFormat",params:["value","locale","options"],path:"Intl/formatNumber",summary:"Format a number for a locale — grouping, decimals, currency, percent, units."},{api:"Intl.DateTimeFormat",params:["value","locale","options"],path:"Intl/formatDate",summary:"Format a date or timestamp for a locale. Pass `timeZone` in options."},{api:"Intl.RelativeTimeFormat",params:["value","unit","locale","options"],path:"Intl/formatRelativeTime",summary:'Format a relative time — `-3, "day"` becomes "3 days ago".'},{api:"Intl.ListFormat",params:["values","locale","options"],path:"Intl/formatList",summary:'Join a list the way a locale does — "a, b, and c", not a hand-written comma join.'},{api:"Intl.PluralRules",params:["value","locale","options"],path:"Intl/plural",summary:'Which plural category a number falls in ("one", "few", "other") — many languages have '+"more than two, so a ternary on `n === 1` is wrong outside English."},{api:"Intl.Collator",params:["a","b","locale","options"],path:"Intl/compare",summary:'Compare two strings for sorting. `<` and `sort()` order by UTF-16 code unit, which puts "Zebra" before "apple" and sorts every accented word into the wrong place.'},{api:"Intl.DisplayNames",params:["code","type","locale","options"],path:"Intl/displayName",summary:'The name of a language, region, script or currency in a locale — "de" as "German" or '+'"Deutsch", from CLDR rather than a hand-kept table.'},{api:"Intl.Segmenter",params:["value","granularity","locale"],path:"Intl/segment",summary:"Split text into graphemes, words or sentences (UAX #29). `[...str]` splits code points, so it cuts an emoji with a skin-tone modifier in half."}],ss=os.map((e)=>e.path),is=Object.fromEntries(os.map((e)=>[e.path,e.params.indexOf("locale")]));function fl(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function dr(e){if(e==="")return[];return e.split("/").map((t)=>fl(t))}function fe(e,t){let n=e;for(let r of dr(t))n=n?.[r];return n}function pr(e){let t=e.$map;return t&&typeof t==="object"?t:void 0}var ls=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),cs=new Set(["!","-"]),us=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||","??"]),dl=new Set(["=","+=","-=","*=","/="]),pl=new Set(["push","pop","shift","unshift","splice"]),fs=new Set(["reduce","map","filter"]),ds=new Set(["?:","switch"]),ps=new Set(["includes","indexOf","lastIndexOf","join","slice","concat","at","flat","toSorted","toReversed","toSpliced","with","toUpperCase","toLowerCase","trim","trimStart","trimEnd","split","startsWith","endsWith","padStart","padEnd","replaceAll","repeat","charAt","normalize","toLocaleUpperCase","toLocaleLowerCase","toFixed","toPrecision","toLocaleString"]),ml=new Set([...ls,...cs,...us,...fs,...ds,...ps,"call"]),hl=new Set(["isNaN","isFinite","parseFloat","parseInt","encodeURIComponent","decodeURIComponent","structuredClone","Math/abs","Math/ceil","Math/floor","Math/round","Math/trunc","Math/sign","Math/sqrt","Math/cbrt","Math/pow","Math/exp","Math/log","Math/log2","Math/log10","Math/min","Math/max","Math/hypot","Number/isInteger","Number/isFinite","Number/isNaN","Number/parseFloat","Number/parseInt","JSON/parse","JSON/stringify","Object/keys","Object/values","Object/entries","Object/fromEntries","Array/from","Array/isArray","Array/of","String/fromCharCode","String/fromCodePoint",...ss]),gl={"Intl/compare":(e,t,n,r)=>new Intl.Collator(n??Se,r).compare(e,t),"Intl/displayName":(e,t,n,r)=>new Intl.DisplayNames(n??Se,{...r,type:t??"language"}).of(e),"Intl/formatDate":(e,t,n)=>new Intl.DateTimeFormat(t??Se,{timeZone:rs,...n}).format(new Date(e)),"Intl/formatList":(e,t,n)=>new Intl.ListFormat(t??Se,n).format(e),"Intl/formatNumber":(e,t,n)=>new Intl.NumberFormat(t??Se,n).format(e),"Intl/formatRelativeTime":(e,t,n,r)=>new Intl.RelativeTimeFormat(n??Se,r).format(e,t),"Intl/plural":(e,t,n)=>new Intl.PluralRules(t??Se,n).select(e),"Intl/segment":(e,t,n)=>[...new Intl.Segmenter(n??Se,{granularity:t??"grapheme"}).segment(e)].map((r)=>r.segment)};function xl(e,t,n){let r=is[e];if(r===void 0||r<0||t[r]!=null)return t;let s=n.$page?.locale;if(typeof s!=="string"||s==="")return t;let i=[...t];return i[r]=s,i}function yl(e){return e.startsWith("window#/")&&hl.has(e.slice(8))}function ms(e){return ls.has(e)}var as=64,bl=64;function K(e,t){if(!e)return;let n=(e.depth??0)+1;if(n>bl)return;return{depth:n,path:[...e.path??[],...Array.isArray(t)?t:[t]],report:e.report}}function W(e,t,n,r,o){if(e===null||e===void 0)return e;if(typeof e==="object"&&!Array.isArray(e)&&"operator"in e)return ee(e,t,n,r,o);if(typeof e==="object"&&!Array.isArray(e)&&"$ref"in e){let s=ln(e.$ref,t,n,r);return o?.report(o.path??[],s),s}if(Array.isArray(e))return e.map((s,i)=>W(s,t,n,r,K(o,i)));return o?.report(o.path??[],e),e}function wl(e,t,n,r){let o=(s)=>{if(!e.slice(s.length).includes("/"))return t;return ln(e.slice(0,e.lastIndexOf("/")),t,n,r)};if(e.startsWith("#/state/"))return o("#/state/");if(e.startsWith("parent#/"))return o("parent#/");if(e.startsWith("$map/")||e.startsWith("$args/"))return e.split("/").length>2?ln(e.slice(0,e.lastIndexOf("/")),t,n,r):void 0;return}function ln(e,t,n,r){if(e==="$reduce/acc")return r?.acc;if(e.startsWith("$reduce/"))return r?.acc;if(e.startsWith("$args/")){let o=e.slice(6).split("/"),s=r?.args?.[o[0]];return o.length>1?Ne(s,o.slice(1).join("/")):s}if(e.startsWith("event#/")){let o=e.slice(7);return Ne(n,o)}if(e.startsWith("$map/")){let o=e.split("/"),[,s]=o,i,a=pr(t);if(s==="item")i=r?.item??a?.item??t["$map/item"];else if(s==="index")i=r?.index??a?.index??t["$map/index"];else i=a?.[s]??t[`$map/${s}`];return o.length>2?Ne(i,o.slice(2).join("/")):i}if(e.startsWith("#/state/"))return fe(t,e.slice(8));if(e.startsWith("parent#/"))return fe(t,e.slice(8));if(e.startsWith("window#/"))return Ne(globalThis.window,e.slice(8));if(e.startsWith("document#/"))return Ne(globalThis.document,e.slice(10));return fe(t,e)??null}function El(e,t,n,r){if(e.startsWith("$map/")){let o=e.split("/"),[,s]=o,i,a=pr(t);if(s==="item")i=r?.item??a?.item??t["$map/item"];else if(s==="index")i=r?.index??a?.index??t["$map/index"];else i=a?.[s]??t[`$map/${s}`];if(o.length>2){let c=o.slice(2),l=c.pop(),u=c.length>0?Ne(i,c.join("/")):i;return{key:l,obj:u}}return{key:s==="item"?"$map/item":"$map/index",obj:pr(t)??t}}if(e.startsWith("#/state/")){let o=e.slice(8);if(o.indexOf("/")===-1)return{key:o,obj:t};let i=dr(o),a=i.pop(),c=t;for(let l of i)c=c[l];return{key:a,obj:c}}return{key:e,obj:t}}function ee(e,t,n,r,o){let s=vl(e,t,n,r,o);return o?.report(o.path??[],s),s}function vl(e,t,n,r,o){let{operator:s,target:i,value:a,initial:c}=e;if(!ml.has(s))throw Error(`$expression: unknown operator "${s}"`);if(cs.has(s)&&!("value"in e)){let l=W(i,t,n,r,K(o,"target"));if(s==="!")return!l;if(s==="-")return-l}if(s==="call"){let l=i?.$ref;if(typeof l!=="string")throw TypeError("$expression: call target must be a $ref pointer");let u=(r?.callDepth??0)+1;if(u>as)throw Error(`$expression: call depth exceeded (${as})`);let f=Array.isArray(a)?a.map((m,w)=>W(m,t,n,r,K(o,["value",w]))):[];if(l.startsWith("window#/")){if(!yl(l))throw Error(`$expression: "${l}" is not a blessed pure global`);let m=l.slice(8),w=gl[m];if(w)return w(...xl(m,f,t));let y=Ne(globalThis.window,m),h=m.lastIndexOf("/"),x=h===-1?globalThis.window:Ne(globalThis.window,m.slice(0,h));return y.apply(x,f)}let d=ln(l,t,n,r);if(typeof d==="function")return d.apply(wl(l,t,n,r),f);if(d&&typeof d==="object"&&"$expression"in d){let m=d,w={};for(let[y,h]of(m.parameters??[]).entries()){let x=typeof h==="string"?h:h?.name??"";if(!x)continue;w[x]=f[y]===void 0&&typeof h==="object"&&h!==null&&"default"in h?h.default:f[y]}return ee(m.$expression,t,n,{args:w,callDepth:u})}throw TypeError(`$expression: call target "${l}" is not callable`)}if(ds.has(s)){if(s==="?:"){let m=W(i,t,n,r,K(o,"target"));if(o){let w=W(a,t,n,r,K(o,"value")),y=W(c,t,n,r,K(o,"initial"));return m?w:y}return m?W(a,t,n,r):W(c,t,n,r)}let l=W(i,t,n,r,K(o,"target")),u=String(l),f=e.cases??{},d=Object.hasOwn(f,u);if(o){let m;for(let[y,h]of Object.entries(f)){let x=W(h,t,n,r,K(o,["cases",y]));if(y===u)m=x}let w=W(e.default,t,n,r,K(o,"default"));return d?m:w}return d?W(f[u],t,n,r):W(e.default,t,n,r)}if(us.has(s)){let l=W(i,t,n,r,K(o,"target")),u=W(a,t,n,r,K(o,"value"));switch(s){case"+":return l+u;case"-":return l-u;case"*":return l*u;case"/":return l/u;case"%":return l%u;case"===":return l===u;case"!==":return l!==u;case"<":return l<u;case"<=":return l<=u;case">":return l>u;case">=":return l>=u;case"&&":return l&&u;case"||":return l||u;case"??":return l??u;default:break}}if(dl.has(s)){let l=W(a,t,n,r,K(o,"value")),{obj:u,key:f}=El(i.$ref,t,n,r);switch(s){case"=":{u[f]=l;break}case"+=":{let d=u[f];u[f]=d+l;break}case"-=":{let d=u[f];u[f]=d-l;break}case"*=":{let d=u[f];u[f]=d*l;break}case"/=":{let d=u[f];u[f]=d/l;break}default:break}return}if(pl.has(s)){let l=W(i,t,n,r,K(o,"target"));switch(s){case"push":return l.push(W(a,t,n,r,K(o,"value")));case"unshift":return l.unshift(W(a,t,n,r,K(o,"value")));case"pop":return l.pop();case"shift":return l.shift();case"splice":{let u=W(a,t,n,r,K(o,"value"));return l.splice(...u)}default:break}}if(ps.has(s)){let l=W(i,t,n,r,K(o,"target")),u=a===void 0?[]:Array.isArray(a)?W(a,t,n,r,K(o,"value")):[W(a,t,n,r,K(o,"value"))],f=l?.[s];if(typeof f!=="function")return;return f.apply(l,u)}if(fs.has(s)){let l=W(i,t,n,r,K(o,"target"));if(s==="reduce"){let u=W(c,t,n,r,K(o,"initial"));for(let[f,d]of l.entries())u=ee(a,t,n,{acc:u,index:f,item:d},f===0?K(o,"value"):void 0);return u}if(s==="map")return l.map((u,f)=>ee(a,t,n,{...r,index:f,item:u},f===0?K(o,"value"):void 0));if(s==="filter")return l.filter((u,f)=>ee(a,t,n,{...r,index:f,item:u},f===0?K(o,"value"):void 0))}return}function Ne(e,t){return fe(e,t)}function Je(e,t,n,r){return W(e,t,n,r)}function cn(e){let t=e.replaceAll("\\","/");return t.length>1&&t.endsWith("/")?t.slice(0,-1):t}function hs(e){let t=cn(e);return t.startsWith("/")?t:`/${t}`}function gs(e,t){return[...e].toSorted((n,r)=>r[t].length-n[t].length)}function Sl(e,t){return e===t||e.startsWith(`${t}/`)}function xs(e,t){let n=cn(t);for(let r of gs(e,"dir")){let o=cn(r.dir);if(!Sl(n,o)||n===o)continue;let s=n.slice(o.length+1),{filter:i}=r;if(i&&!i(s))return null;let a=s.split("/").map((c)=>encodeURIComponent(c)).join("/");return`${hs(r.urlPrefix)}/${a}`}return null}function kl(e,t){let n=t.split("#")[0].split("?")[0];if(!n.startsWith("/"))return null;let r;try{r=decodeURIComponent(n)}catch{return null}if(/%2e|%2f/i.test(r))return null;for(let o of gs(e,"urlPrefix")){let s=hs(o.urlPrefix);if(!r.startsWith(`${s}/`))continue;let a=r.slice(s.length+1).split("/");if(a.some((l)=>l===""||l==="."||l===".."))return null;let{filter:c}=o;if(c&&!c(a.join("/")))return null;return`${cn(o.dir)}/${a.join("/")}`}return null}var Ff=String.raw`"'\s<>()\\`;var Tl="public";function Tt(e){let t=e.search(/[#?]/);return t===-1?{path:e,suffix:""}:{path:e.slice(0,t),suffix:e.slice(t)}}function mr(e){return e===""||e.startsWith("/")||e.startsWith("#")||e.includes("${")||/^[a-z][\w+.-]*:/i.test(e)}function hr(e){return e.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}function gr(e,t){let r=(e===""||e==="."?[]:hr(e).split("/")).filter((o)=>o!==""&&o!==".");for(let o of t.replaceAll("\\","/").split("/")){if(o===""||o===".")continue;if(o===".."){if(r.length===0)return null;r.pop();continue}r.push(o)}return r.join("/")}function Al(e,t,n){let{path:r}=Tt(e);if(!r.startsWith("/"))return[];let o;try{o=decodeURIComponent(r)}catch{return[]}if(/%2e|%2f/i.test(o))return[];let s=o.replace(/^\/+/,"");if(s===""||s.split("/").some((a)=>a==="."||a===".."))return[];let i=[];for(let a of n){if(a==="mounts"){let c=kl(t,r);if(c!==null&&!c.startsWith("/")&&!/^[A-Za-z]:/.test(c))i.push(hr(c));continue}i.push(a==="root"?s:`${Tl}/${s}`)}return[...new Set(i)]}function ys(e,t,n,r){let{path:o}=Tt(e);if(o==="")return null;if(mr(e))return o.startsWith("/")?Al(o,n,r)[0]??null:null;if(o.endsWith("/"))return null;let s;try{s=decodeURIComponent(o)}catch{return null}let i=gr(t,s);if(i===null||i===""||i===hr(t))return null;return i}function bs(e){return e.split("/").map((t)=>encodeURIComponent(t)).join("/")}function ws(e){let t=[],n=0;while(n<e.length){while(n<e.length&&(/\s/.test(e[n])||e[n]===","))n+=1;if(n>=e.length)break;let r=n;while(n<e.length&&!/\s/.test(e[n]))n+=1;let o=e.slice(r,n);if(o.endsWith(",")){t.push({descriptor:"",url:o.replace(/,+$/,"")});continue}while(n<e.length&&/\s/.test(e[n]))n+=1;let s=n;while(n<e.length&&e[n]!==",")n+=1;let i=e.slice(s,n).trim();if(n+=1,o=o.replace(/,+$/,""),o!=="")t.push({descriptor:i,url:o})}return t}function Es(e){return e.map(({url:t,descriptor:n})=>n?`${t} ${n}`:t).join(", ")}function Cl(e){if("operator"in e)return"expression";if("if"in e)return"if";if("$switch"in e)return"switch";if("stopPropagation"in e)return"stopPropagation";if("preventDefault"in e)return"preventDefault";return"dispatch"}async function Ye(e,t,n,r={}){let o=r.args?{args:r.args}:void 0;for(let s of e)switch(Cl(s)){case"expression":{let i=ee(s,t,n,o);if(i&&typeof i.then==="function")await i;break}case"if":{let i=s,a=Je(i.if,t,n,o)?i.then:i.else;if(Array.isArray(a))await Ye(a,t,n,r);break}case"switch":{let i=s,a=String(Je(i.$switch,t,n,o)),c=i.cases??{},l=Object.hasOwn(c,a)?c[a]:i.default;if(Array.isArray(l))await Ye(l,t,n,r);break}case"dispatch":{let i=s,a=typeof r.target==="function"?r.target():r.target,c=n?.currentTarget??a;if(!c)break;let l={};if("detail"in i)l.detail=Je(i.detail,t,n,o);if(i.bubbles!==void 0)l.bubbles=i.bubbles;if(i.composed!==void 0)l.composed=i.composed;c.dispatchEvent(new CustomEvent(i.dispatchEvent,l));break}case"stopPropagation":{n?.stopPropagation();break}case"preventDefault":{n?.preventDefault();break}default:break}}function vs(e,t){for(let n of e.split(";")){let r=n.indexOf("=");if(r===-1)continue;if(n.slice(0,r).trim()===t)return n.slice(r+1)}return null}function Ss(e,t,n){let r=e.startsWith("__Host-"),o=[`${e}=${encodeURIComponent(JSON.stringify(t))}`];if(n.maxAge!==void 0)o.push(`Max-Age=${n.maxAge}`);let s=r?"/":n.path;if(s)o.push(`Path=${s}`);if(n.domain&&!r)o.push(`Domain=${n.domain}`);let{sameSite:i}=n;if(n.secure===!0||r||e.startsWith("__Secure-")||i?.toLowerCase()==="none")o.push("Secure");if(i)o.push(`SameSite=${i}`);return o.join("; ")}var xr=new Map;async function kr(e,t){if(typeof e!=="string")return e;let n=t?.resolver?.(e);if(n)return n;if(xr.has(e))return xr.get(e);let r=fetch(e).then(async(o)=>{if(!o.ok)throw Error(`Jx: failed to fetch ${e} (${o.status})`);if((o.headers?.get("Content-Type")??"").includes("text/html"))throw Error(`Jx: ${e} returned HTML, not a document — the host answered a missing file with its `+"app shell (a single-page fallback), so this path is not served.");return await o.json()});return xr.set(e,r),r}var Pl=new Set(["type","properties","items","enum","minimum","maximum","minLength","maxLength","pattern","required","examples"]),Ds={skip:!1};function Ls(e){Ds.skip=e}var Is={skip:!1};function Js(e){Is.skip=e}var br=null;function js(e){br=e||null}function Hs(e){return br?`${e}?token=${encodeURIComponent(br)}`:e}function Fs(e){let t=Ge(!0);return t.run(()=>{G(e)}),()=>t.stop()}function xn(e){let t=Ge(!0);try{return{result:t.run(e),stop:()=>t.stop()}}catch(n){throw t.stop(),n}}var Ws=!1;function Bs(e){Ws=e}var Rl=/(-?\d*\.?\d+)(?:s|l|d)?v(h|w|min|max|i|b)\b/gi,$l={b:"cqb",h:"cqh",i:"cqi",max:"cqmax",min:"cqmin",w:"cqw"};function Nl(e){if(!Ws||!e.includes("v"))return e;return e.replace(Rl,(t,n,r)=>`${n}${$l[r.toLowerCase()]??`cq${r}`}`)}var Ks=!1;function Vs(e){Ks=e}var Tr=!1;function Us(e){Tr=e}var Ar=!1;function qs(e){Ar=e}var fn=!1;function wr(e){return fn||e.dataset.jxPath!==void 0}function Ml(e,t){if(Ks&&t==="href"&&(e.tagName==="A"||e.tagName==="AREA"))return"data-jx-href";if(Tr&&t==="popover"&&wr(e))return"data-jx-popover";if(Ar&&wr(e)){if(t==="commandfor")return"data-jx-commandfor";if(t==="inert")return"data-jx-inert";if(t==="open"&&e.tagName==="DIALOG")return"data-jx-open"}return t}var Ze=null;function yn(e){Ze=e}var _l=new Set(["src","poster","data"]),Ol=new Set(["srcset","imagesrcset"]),Dl=new Set(["LINK"]);function Ll(e,t){return _l.has(t)||t==="href"&&Dl.has(e)}function Cr(e,t,n){if(!Ze||n==="")return n;let r=t.toLowerCase();if(Ol.has(r)){let o=ws(n),s=!1,i=o.map((a)=>{let c=Ze?.(a.url,r)??null;if(c===null||c===a.url)return a;return s=!0,{descriptor:a.descriptor,url:c}});return s?Es(i):n}if(!Ll(e,r))return n;return Ze(n,r)??n}var Il=/\burl\(\s*(?<q>["']?)(?<u>[^"')]*)\k<q>\s*\)/g;function Jl(e){if(!Ze||!e.includes("url("))return e;return e.replaceAll(Il,(t,n,r)=>{let o=r===""?null:Ze?.(r,"url()")??null;return o===null?t:`url(${n}${o}${n})`})}function dn(e){return Nl(Jl(e))}var zs=!1;function Gs(e){zs=e}var jl=/^\s*\$\{\s*state\.(\w+)\s*\}\s*$/;function Hl(e,t,n){if(!zs||e!=="textContent")return null;let r=null;if(U(t)){if(!t.$ref.startsWith("#/state/"))return null;let s=t.$ref.slice(8);r=s&&!s.includes("/")?s:null}else if(typeof t==="string")r=jl.exec(t)?.[1]??null;if(!r)return null;let o=j(n)[r];if(Pe(o)||typeof o==="function")return null;if(typeof o==="object"&&o!==null)return null;return r}async function bn(e,t={},n=location.href,r){let o=()=>r?.root??null,s={},i=e.state??{},a=yt(t);for(let f of Object.keys(t))if(a&&!(f in i))Object.defineProperty(s,f,{configurable:!0,enumerable:!0,get:()=>t[f],set:(d)=>{t[f]=d}});else s[f]=t[f];let c=e.imports??{};for(let[,f]of Object.entries(i))if(Wn(f)&&!f.$src){let d=c[f.$prototype];if(d){if(!d.endsWith(".class.json")){console.warn(`Jx: import "${f.$prototype}" must map to a .class.json path, got "${d}"`);continue}f.$src=d}}for(let[f,d]of Object.entries(i)){if(typeof d==="string"){if(!d.includes("${"))s[f]=d;continue}if(typeof d==="number"||typeof d==="boolean"||d===null){s[f]=d;continue}if(Array.isArray(d)){s[f]=d;continue}if(typeof d==="object"){if(d.$prototype)continue;if(Ke(d))continue;if(Bn(d))continue;if("default"in d){s[f]=d.default;continue}if(Fl(d))continue;s[f]=d}}let l=on(s);for(let[f,d]of Object.entries(i))if(typeof d==="string"&&d.includes("${"))l[f]=bt(()=>ke(d,l));for(let[f,d]of Object.entries(i))if(Ke(d)){let m=d.$expression;if(Co(d)){let w=d.parameters;l[f]=(...y)=>{let h={};for(let[x,S]of w.entries()){let A=typeof S==="string"?S:S?.name??"";if(!A)continue;h[A]=y[x]===void 0&&typeof S==="object"&&S!==null&&"default"in S?S.default:y[x]}return ee(m,l,null,{args:h})}}else if(ms(m.operator)){let w=(y,h)=>ee(m,y,h);l[f]=w}else l[f]=bt(()=>ee(m,l,null))}for(let[f,d]of Object.entries(i))if(Fn(d)){let{body:m}=d;if(Array.isArray(d.parameters)&&d.parameters.length>0){let w=d.parameters;l[f]=(...y)=>{let h={};for(let[x,S]of w.entries()){let A=typeof S==="string"?S:S?.name??"";if(!A)continue;h[A]=y[x]===void 0&&typeof S==="object"&&S!==null&&"default"in S?S.default:y[x]}return Ye(m,l,null,{args:h,target:o})}}else{let w=(y,h)=>{Ye(m,y,h??null,{target:o})};l[f]=w}}else if(ft(d))l[f]=await Kl(d,l,f,n);for(let[f,d]of Object.entries(i))if(Wn(d))l[f]=await nc(d,l,f,n,r);if(!(r?.skipServerFunctions??Ds.skip)){for(let[f,d]of Object.entries(i))if(Bn(d))l[f]=await ac(d,l,f,n)}let u=r?.media??ii;if(e.$media)l.$media=e.$media;else if(!l.$media&&Object.keys(u).length>0)l.$media=u;return l}function Fl(e){for(let t of Object.keys(e))if(Pl.has(t))return!0;return!1}function ke(e,t){let n=t?.$map;return Function("state","$map","item","index",`return \`${e}\``)(t,n,n?.item,n?.index)}function Wl(e){if(!e.startsWith("${")||!e.endsWith("}"))return!1;let t=0;for(let n=1;n<e.length;n+=1){let r=e[n];if(r==="{")t+=1;else if(r==="}"){if(t-=1,t===0)return n===e.length-1}}return!1}function Bl(e,t){if(!Wl(e))return ke(e,t);let n=t?.$map;return Function("state","$map","item","index",`return (${e.slice(2,-1)})`)(t,n,n?.item,n?.index)}var et=new Map,Xe=new Map,Ys=new Set;function Xs(e,t){if(Ys.add(e),typeof t==="function"){et.delete(e),Xe.set(e,t);return}Xe.delete(e),et.set(e,t)}function Pr(e){let t=et.get(e);if(t)return t;let n=Xe.get(e);if(!n)return;if(typeof n!=="function")return n;let r=Promise.resolve(n()).then((o)=>(et.set(e,o),Xe.delete(e),o),(o)=>{throw Xe.set(e,n),o});return Xe.set(e,r),r}async function Kl(e,t,n,r){if(e.body&&e.$src)throw Error(`Jx: '${n}' declares both body and $src — these are mutually exclusive`);if(!e.body&&!e.$src){let a=Er(e),c=Function(...a,"");return Object.defineProperty(c,"name",{configurable:!0,value:e.name??n}),c}let o;if(typeof e.body==="string"){let a=Er(e);o=Function(...a,e.body),Object.defineProperty(o,"name",{configurable:!0,value:e.name??n})}else{let a=e.$src;if(!a)throw Error(`Jx: '${n}' has neither body nor $src`);let c=e.$export??n,l,u=Pr(a);if(u instanceof Promise)l=await u;else if(u)l=u;else{if(r){let d=new URL(a,r).href;try{l=await import(d)}catch{l=await import(a)}}else l=await import(a);et.set(a,l)}let f=l[c]??l.default?.[c];if(typeof f!=="function")throw TypeError(`Jx: export "${c}" not found or not a function in "${a}"`);o=f}let s=(e.parameters??e.arguments??[]).length>0,i=!1;if(!s){if(typeof e.body==="string")i=Kn(e.body);else if(o)i=o.length<=1&&Kn(o.toString())}if(i)return bt(()=>o(t));return o}function Er(e){let t=e.parameters?Ro(e.parameters):e.arguments??[];return t.length>0&&t[0]==="state"?t:["state",...t]}var Pt=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$title","$description","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"]),ks=new Set,Vl="http://www.w3.org/2000/svg",Ul="http://www.w3.org/1998/Math/MathML";function ql(e,t){if(e==="svg")return Vl;if(e==="math")return Ul;return t??null}function de(e,t,n){let r=n?._path??[];if(typeof e==="string"||typeof e==="number"||typeof e==="boolean"){let f=document.createTextNode(String(e));if(typeof e==="string"&&le(e))G(()=>{f.textContent=ke(e,t)});return f}let o=t;for(let[f,d]of Object.entries(e))if(f.startsWith("$")&&!Pt.has(f)){if(o===t)o=Object.create(t);o[f]=U(d)?Y(d.$ref,t):d}if("$ref"in e&&!e.tagName){let f=String(e.$ref??"");if(!ks.has(f))ks.add(f),console.warn(`Jx: a $ref child ("${f}") is not a supported component instance; register the `+"component in $elements and use its custom-element tag instead (spec §13).")}let s=Nr(e.tagName,o),i=s.includes("-")&&customElements.get(s);if(e.$props&&i)return Os(e,o,n,r);if(e.$props){if(s.includes("-"))return Os(e,o,n,r);let{$props:f,...d}=e;return de(d,dc(e,o),n)}if(e.$switch)return tc(e,o,n);let a=ql(s,n?._ns),c=s==="foreignObject"?null:a,l=a?document.createElementNS(a,s):document.createElement(s);if(n?.onNodeCreated)n.onNodeCreated(l,r,e,o);if(Rr(l,e,o),e.style&&s.includes("-"))$r.set(l,e.style);wn(l,e.style??{},o.$media??{},o),vn(l,e.attributes??{},o);let u=e.children;if(Kt(u)){let f=n||c?{...n,_ns:c,_path:[...r,"children"]}:void 0;vr(l,u,o,f)}else if(Array.isArray(u))for(let f=0;f<u.length;f++){let d=u[f],m=n||c?{...n,_ns:c,_path:[...r,"children",f]}:void 0;if(Kt(d))vr(l,d,o,m);else l.append(de(d,o,m))}return l}function Rr(e,t,n){for(let[r,o]of Object.entries(t)){if(Pt.has(r))continue;if(r.startsWith("$"))continue;if(r.startsWith("on")&&Zs(e,r,o,n))continue;Qs(e,r,o,n)}}function Zs(e,t,n,r){let o=t.slice(2),s=r;if(U(n)){let i=Y(n.$ref,r);if(typeof i==="function"){let a=i;e.addEventListener(o,(c)=>a(s,c))}return!0}if(Fn(n)){let{body:i}=n;return e.addEventListener(o,(a)=>{Ye(i,s,a)}),!0}if(ft(n)&&typeof n.body==="string"){let i=Er(n),a=Function(...i,n.body);return e.addEventListener(o,(c)=>a(s,c)),!0}if(Ke(n)){let i=n.$expression;return e.addEventListener(o,(a)=>ee(i,s,a)),!0}return!1}function zl(e,t,n){for(let[r,o]of Object.entries(t))if(r.startsWith("on")&&!Pt.has(r))Zs(e,r,o,n)}function Qs(e,t,n,r){let o=e,s=Hl(t,n,r);if(s)e.dataset.jxBoundProp=s;let i=(c)=>typeof c==="string"?Cr(e.tagName,t,c):c,a=(c)=>{let l=e;if(t==="className"&&!(l instanceof HTMLElement)){l.setAttribute("class",c==null?"":String(c));return}if(o[t]===c)return;o[t]=c};if(U(n)){let c=n;if(t==="id"){o[t]=Y(c.$ref,r);return}G(()=>{a(i(Y(c.$ref,r)))});return}if(le(n)){G(()=>{a(i(ke(n,r)))});return}a(i(n))}function Ts(e,t){let n=[];return{detach:t,insert(r){let o=[];for(let i of r){let a=e.cssRules.length;try{e.insertRule(i,a)}catch{continue}let c=e.cssRules[a];if(c)o.push(c)}let s={rules:o,texts:r};return n.push(s),s},remove(r){let o=n.indexOf(r);if(o!==-1)n.splice(o,1);if(r.rules.length===0)return;let s=[...e.cssRules],i=r.rules.map((a)=>s.indexOf(a)).filter((a)=>a>=0).toSorted((a,c)=>c-a);for(let a of i)e.deleteRule(a);r.rules.length=0},replaceAll(r){n.length=0,n.push({rules:[],texts:r}),e.replaceSync(r.join(`
|
|
3
|
-
`))},text(){return
|
|
1
|
+
import{e,s,x,t,n,i,r,v,b,j,N,R,D,S,u,l,I,F,Z,W,J,f,M}from"./chunks/iframe-entry-fvbk89gm.js";var jo,nr,sn,pe=(o,a)=>{for(var[c,d,p]of jo||[])for(var m=[o],h=globalThis,g=h.document,E,y,w,T,C;y=m.pop();)if(!nr[y]&&(w=d[y])){nr[y]=1;for(T=1;T<w.length;T++)m.push(p[w[T]]);if(!a&&y!==o&&(E=g&&g.head)){if(sn===void 0)sn=(T=g.querySelector("meta[property=csp-nonce]"))&&(T.nonce||T.getAttribute("nonce"))||"";if(C=g.createElement("link"),C.rel="modulepreload",C.crossOrigin="",sn)C.nonce=sn;C.href=new h.URL(w[0],c),E.appendChild(C)}}},ol=(o,a,c,d)=>{for(var p={},m=0;m<a.length;m++)p[a[m]]=c[m];(jo||=[]).push([o,p,a]),nr||={},pe(a[d],1)};ol(import.meta.url,["ktp07yvr","mdq3v5cw","5v8ngwj2","wewc8rq2","c9fn075p","ke5z4ng7","28ksk2qm","pnfz478q","y62xq0ty","4aan7g6g","jt2gxmzs","rzds841e","n2gfpm5m","ewh24n1f","f5cw3tgp","44cm5cta","0fj8a4ga","xch8kx2g","jxd8v350","p0efwjke","c4x05vyx","e74qjyq6","n6yzswmy","fvbk89gm","zap785cw","x0ygf2yr","jdcktez8"],[["./iframe-entry.js",23],["./chunks/tree-mdq3v5cw.js",23],["./chunks/tooltip-5v8ngwj2.js",24,23],["./chunks/textfield-wewc8rq2.js"],["./chunks/toast-c9fn075p.js",25],["./chunks/toast-host-ke5z4ng7.js",25],["./chunks/color-28ksk2qm.js",26],["./chunks/icons-pnfz478q.js",23],["./chunks/number-field-y62xq0ty.js"],["./chunks/action-group-4aan7g6g.js"],["./chunks/popover-jt2gxmzs.js",24],["./chunks/select-rzds841e.js"],["./chunks/split-n2gfpm5m.js",23],["./chunks/swatch-group-ewh24n1f.js"],["./chunks/tabs-f5cw3tgp.js"],["./chunks/toolbar-44cm5cta.js"],["./chunks/color-area-0fj8a4ga.js",26,23],["./chunks/color-field-xch8kx2g.js",26,24,23],["./chunks/color-slider-jxd8v350.js",26],["./chunks/combobox-p0efwjke.js",24],["./chunks/dialog-c4x05vyx.js"],["./chunks/listbox-e74qjyq6.js",23],["./chunks/menu-n6yzswmy.js",24,23],["./chunks/iframe-entry-fvbk89gm.js"],["./chunks/iframe-entry-zap785cw.js",23],["./chunks/iframe-entry-x0ygf2yr.js"],["./chunks/iframe-entry-jdcktez8.js",23]],0);
|
|
2
|
+
var rr="jx:canvas";function Ho(o){let{target:a,source:c,targetOrigin:d,acceptOrigin:p,token:m}=o,h=new Set,g=(E)=>{if(p!=="*"&&E.origin!==p)return;let y=E.data;if(!n(y)||!(rr in y)||y[rr]!==m)return;let w="payload"in y?y.payload:void 0;for(let T of h)T(w)};return c.addEventListener("message",g),{dispose(){h.clear(),c.removeEventListener("message",g)},onMessage(E){return h.add(E),()=>h.delete(E)},post(E){a.postMessage({[rr]:m,payload:E},d)}}}function Pe(o){return o.getBoundingClientRect()}function Fo(o){return o.getBoundingClientRect()}function Vo(o,a,c=document){return c.elementFromPoint(o,a)}function or(o){let a=Object.create(null);for(let c of o.split(","))a[c]=1;return(c)=>(c in a)}var an=Object.assign;var il=Object.prototype.hasOwnProperty,ln=(o,a)=>il.call(o,a),lt=Array.isArray,At=(o)=>Bo(o)==="[object Map]";var Wo=(o)=>typeof o==="function",sl=(o)=>typeof o==="string",ct=(o)=>typeof o==="symbol",ut=(o)=>o!==null&&typeof o==="object";var al=Object.prototype.toString,Bo=(o)=>al.call(o),Ko=(o)=>Bo(o).slice(8,-1);var cn=(o)=>sl(o)&&o!=="NaN"&&o[0]!=="-"&&""+parseInt(o,10)===o;var un=(o)=>{let a=Object.create(null);return(c)=>a[c]||(a[c]=o(c))},ll=/-\w/g,af=un((o)=>o.replace(ll,(a)=>a.slice(1).toUpperCase())),cl=/\B([A-Z])/g,lf=un((o)=>o.replace(cl,"-$1").toLowerCase()),Uo=un((o)=>o.charAt(0).toUpperCase()+o.slice(1)),cf=un((o)=>o?`on${Uo(o)}`:""),je=(o,a)=>!Object.is(o,a);var ul="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var uf=or(ul+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var ye;class Yo{constructor(o=!1){if(this.detached=o,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!o&&ye)if(ye.active)this.parent=ye,this.index=(ye.scopes||(ye.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let o,a;if(this.scopes){let c=this.scopes.slice();for(o=0,a=c.length;o<a;o++)c[o].pause()}for(o=0,a=this.effects.length;o<a;o++)this.effects[o].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let o,a;if(this.scopes){let d=this.scopes.slice();for(o=0,a=d.length;o<a;o++)d[o].resume()}let c=this.effects.slice();for(o=0,a=c.length;o<a;o++)c[o].resume()}}}run(o){if(this._active){let a=ye;try{return ye=this,o()}finally{ye=a}}}on(){if(++this._on===1)this.prevScope=ye,ye=this}off(){if(this._on>0&&--this._on===0){if(ye===this)ye=this.prevScope;else{let o=ye;while(o){if(o.prevScope===this){o.prevScope=this.prevScope;break}o=o.prevScope}}this.prevScope=void 0}}stop(o){if(this._active){this._active=!1;let a,c;for(a=0,c=this.effects.length;a<c;a++)this.effects[a].stop();this.effects.length=0;for(a=0,c=this.cleanups.length;a<c;a++)this.cleanups[a]();if(this.cleanups.length=0,this.scopes){let d=this.scopes.slice();for(a=0,c=d.length;a<c;a++)d[a].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!o){let d=this.parent.scopes.pop();if(d&&d!==this)this.parent.scopes[this.index]=d,d.index=this.index}this.parent=void 0}}}function ft(o){return new Yo(o)}function mn(o,a=!1){if(ye)ye.cleanups.push(o)}var ce;var ir=new WeakSet;class pn{constructor(o){if(this.fn=o,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ye)if(ye.active)ye.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ir.has(this))ir.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Zo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,qo(this),Qo(this);let o=ce,a=ke;ce=this,ke=!0;try{return this.fn()}finally{ei(this),ce=o,ke=a,this.flags&=-3}}stop(){if(this.flags&1){for(let o=this.deps;o;o=o.nextDep)hr(o);this.deps=this.depsTail=void 0,qo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ir.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(lr(this))this.run()}get dirty(){return lr(this)}}var Xo=0,Nt,Rt;function Zo(o,a=!1){if(o.flags|=8,a){o.next=Rt,Rt=o;return}o.next=Nt,Nt=o}function pr(){Xo++}function mr(){if(--Xo>0)return;if(Rt){let a=Rt;Rt=void 0;while(a){let c=a.next;a.next=void 0,a.flags&=-9,a=c}}let o;while(Nt){let a=Nt;Nt=void 0;while(a){let c=a.next;if(a.next=void 0,a.flags&=-9,a.flags&1)try{a.trigger()}catch(d){if(!o)o=d}a=c}}if(o)throw o}function Qo(o){for(let a=o.deps;a;a=a.nextDep)a.version=-1,a.prevActiveLink=a.dep.activeLink,a.dep.activeLink=a}function ei(o){let a,c=o.depsTail,d=c;while(d){let p=d.prevDep;if(d.version===-1){if(d===c)c=p;hr(d),dl(d)}else a=d;d.dep.activeLink=d.prevActiveLink,d.prevActiveLink=void 0,d=p}o.deps=a,o.depsTail=c}function lr(o){for(let a=o.deps;a;a=a.nextDep)if(a.dep.version!==a.version||a.dep.computed&&(ti(a.dep.computed)||a.dep.version!==a.version))return!0;if(o._dirty)return!0;return!1}function ti(o){if(o.flags&4&&!(o.flags&16))return;if(o.flags&=-17,o.globalVersion===$t)return;if(o.globalVersion=$t,!o.isSSR&&o.flags&128&&(!o.deps&&!o._dirty||!lr(o)))return;o.flags|=2;let a=o.dep,c=ce,d=ke;ce=o,ke=!0;try{Qo(o);let p=o.fn(o._value);if(a.version===0||je(p,o._value))o.flags|=128,o._value=p,a.version++}catch(p){throw a.version++,p}finally{ce=c,ke=d,ei(o),o.flags&=-3}}function hr(o,a=!1){let{dep:c,prevSub:d,nextSub:p}=o;if(d)d.nextSub=p,o.prevSub=void 0;if(p)p.prevSub=d,o.nextSub=void 0;if(c.subs===o){if(c.subs=d,!d&&c.computed){c.computed.flags&=-5;for(let m=c.computed.deps;m;m=m.nextDep)hr(m,!0)}}if(!a&&!--c.sc&&c.map)c.map.delete(c.key)}function dl(o){let{prevDep:a,nextDep:c}=o;if(a)a.nextDep=c,o.prevDep=void 0;if(c)c.prevDep=a,o.nextDep=void 0}function be(o,a){if(o.effect instanceof pn)o=o.effect.fn;let c=new pn(o);if(a)an(c,a);try{c.run()}catch(p){throw c.stop(),p}let d=c.run.bind(c);return d.effect=c,d}var ke=!0,ni=[];function hn(){ni.push(ke),ke=!1}function gn(){let o=ni.pop();ke=o===void 0?!0:o}function xn(o,a=!1){if(ce instanceof pn)ce.cleanup=o}function qo(o){let{cleanup:a}=o;if(o.cleanup=void 0,a){let c=ce;ce=void 0;try{a()}finally{ce=c}}}var $t=0;class ri{constructor(o,a){this.sub=o,this.dep=a,this.version=a.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class yn{constructor(o){this.computed=o,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(o){if(!ce||!ke||ce===this.computed)return;let a=this.activeLink;if(a===void 0||a.sub!==ce){if(a=this.activeLink=new ri(ce,this),!ce.deps)ce.deps=ce.depsTail=a;else a.prevDep=ce.depsTail,ce.depsTail.nextDep=a,ce.depsTail=a;oi(a)}else if(a.version===-1){if(a.version=this.version,a.nextDep){let c=a.nextDep;if(c.prevDep=a.prevDep,a.prevDep)a.prevDep.nextDep=c;if(a.prevDep=ce.depsTail,a.nextDep=void 0,ce.depsTail.nextDep=a,ce.depsTail=a,ce.deps===a)ce.deps=c}}return a}trigger(o){this.version++,$t++,this.notify(o)}notify(o){pr();try{for(let a=this.subs;a;a=a.prevSub)if(a.sub.notify())a.sub.dep.notify()}finally{mr()}}}function oi(o){if(o.dep.sc++,o.sub.flags&4){let a=o.dep.computed;if(a&&!o.dep.subs){a.flags|=20;for(let d=a.deps;d;d=d.nextDep)oi(d)}let c=o.dep.subs;if(c!==o){if(o.prevSub=c,c)c.nextSub=o}o.dep.subs=o}}var cr=new WeakMap,Qe=Symbol(""),ur=Symbol(""),Ot=Symbol("");function Ce(o,a,c){if(ke&&ce){let d=cr.get(o);if(!d)cr.set(o,d=new Map);let p=d.get(c);if(!p)d.set(c,p=new yn),p.map=d,p.key=c;p.track()}}function Ke(o,a,c,d,p,m){let h=cr.get(o);if(!h){$t++;return}let g=(E)=>{if(E)E.trigger()};if(pr(),a==="clear")h.forEach(g);else{let E=lt(o),y=E&&cn(c);if(E&&c==="length"){let w=Number(d);h.forEach((T,C)=>{if(C==="length"||C===Ot||!ct(C)&&C>=w)g(T)})}else{if(c!==void 0||h.has(void 0))g(h.get(c));if(y)g(h.get(Ot));switch(a){case"add":if(!E){if(g(h.get(Qe)),At(o))g(h.get(ur))}else if(y)g(h.get("length"));break;case"delete":if(!E){if(g(h.get(Qe)),At(o))g(h.get(ur))}break;case"set":if(At(o))g(h.get(Qe));break}}}mr()}function dt(o){let a=le(o);if(a===o)return a;if(Ce(a,"iterate",Ot),qe(o))return a;if(!Fe(o))return a.map(Le);return kt(o)?a.map((c)=>et(Le(c))):a.map(et)}function gr(o){return Ce(o=le(o),"iterate",Ot),o}function De(o,a){if(Fe(o))return kt(o)?et(Le(a)):et(a);return Le(a)}var fl={__proto__:null,[Symbol.iterator](){return sr(this,Symbol.iterator,(o)=>De(this,o))},concat(...o){return dt(this).concat(...o.map((a)=>lt(a)?dt(a):a))},entries(){return sr(this,"entries",(o)=>(o[1]=De(this,o[1]),o))},every(o,a){return He(this,"every",o,a,void 0,arguments)},filter(o,a){return He(this,"filter",o,a,(c)=>c.map((d)=>De(this,d)),arguments)},find(o,a){return He(this,"find",o,a,(c)=>De(this,c),arguments)},findIndex(o,a){return He(this,"findIndex",o,a,void 0,arguments)},findLast(o,a){return He(this,"findLast",o,a,(c)=>De(this,c),arguments)},findLastIndex(o,a){return He(this,"findLastIndex",o,a,void 0,arguments)},forEach(o,a){return He(this,"forEach",o,a,void 0,arguments)},includes(...o){return ar(this,"includes",o)},indexOf(...o){return ar(this,"indexOf",o)},join(o){return dt(this).join(o)},lastIndexOf(...o){return ar(this,"lastIndexOf",o)},map(o,a){return He(this,"map",o,a,void 0,arguments)},pop(){return Pt(this,"pop")},push(...o){return Pt(this,"push",o)},reduce(o,...a){return Go(this,"reduce",o,a)},reduceRight(o,...a){return Go(this,"reduceRight",o,a)},shift(){return Pt(this,"shift")},some(o,a){return He(this,"some",o,a,void 0,arguments)},splice(...o){return Pt(this,"splice",o)},toReversed(){return dt(this).toReversed()},toSorted(o){return dt(this).toSorted(o)},toSpliced(...o){return dt(this).toSpliced(...o)},unshift(...o){return Pt(this,"unshift",o)},values(){return sr(this,"values",(o)=>De(this,o))}};function sr(o,a,c){let d=gr(o),p=d[a],m=p.call(d);if(d!==o&&!qe(o)){if(m[Symbol.toStringTag]==="Array Iterator"){let h=Object.create(Object.getPrototypeOf(m));if(h.next=()=>zo(m.next(),c),p!==ii[a])Object.defineProperties(h,{return:{get(){let g=m.return;return typeof g==="function"?g.bind(m):g}},throw:{get(){let g=m.throw;return typeof g==="function"?g.bind(m):g}}});return h}m._next=m.next,m.next=()=>zo(m._next(),c)}return m}function zo(o,a){if(!o.done)o.value=a(o.value);return o}var ii=Array.prototype;function He(o,a,c,d,p,m){let h=gr(o),g=h!==o&&!qe(o),E=h[a];if(E!==ii[a]){let T=E.apply(o,m);return g?Le(T):T}let y=c;if(h!==o){if(g)y=function(T,C){return c.call(this,De(o,T),C,o)};else if(c.length>2)y=function(T,C){return c.call(this,T,C,o)}}let w=E.call(h,y,d);return g&&p?p(w):w}function Go(o,a,c,d){let p=gr(o),m=p!==o&&!qe(o),h=c,g=!1;if(p!==o){if(m)g=d.length===0,h=function(y,w,T){if(g)g=!1,y=De(o,y);return c.call(this,y,De(o,w),T,o)};else if(c.length>3)h=function(y,w,T){return c.call(this,y,w,T,o)}}let E=p[a](h,...d);return g?De(o,E):E}function ar(o,a,c){let d=le(o);Ce(d,"iterate",Ot);let p=d[a](...c);if((p===-1||p===!1)&&Cl(c[0]))return c[0]=le(c[0]),d[a](...c);return p}function Pt(o,a,c=[]){hn(),pr();let d=le(o)[a].apply(o,c);return mr(),gn(),d}var pl=or("__proto__,__v_isRef,__isVue"),si=new Set(Object.getOwnPropertyNames(Symbol).filter((o)=>o!=="arguments"&&o!=="caller").map((o)=>Symbol[o]).filter(ct));function ml(o){if(!ct(o))o=String(o);let a=le(this);return Ce(a,"has",o),a.hasOwnProperty(o)}class xr{constructor(o=!1,a=!1){this._isReadonly=o,this._isShallow=a}get(o,a,c){if(a==="__v_skip")return o.__v_skip;let d=this._isReadonly,p=this._isShallow;if(a==="__v_isReactive")return!d;else if(a==="__v_isReadonly")return d;else if(a==="__v_isShallow")return p;else if(a==="__v_raw"){if(c===(d?p?wl:ui:p?ci:li).get(o)||Object.getPrototypeOf(o)===Object.getPrototypeOf(c))return o;return}let m=lt(o);if(!d){let g;if(m&&(g=fl[a]))return g;if(a==="hasOwnProperty")return ml}let h=Reflect.get(o,a,Ue(o)?o:c);if(ct(a)?si.has(a):pl(a))return h;if(!d)Ce(o,"get",a);if(p)return h;if(Ue(h)){let g=m&&cn(a)?h:h.value;return d&&ut(g)?fr(g):g}if(ut(h))return d?fr(h):bn(h);return h}}class yr extends xr{constructor(o=!1){super(!1,o)}set(o,a,c,d){let p=o[a],m=lt(o)&&cn(a);if(!this._isShallow){let E=Fe(p);if(!qe(c)&&!Fe(c))p=le(p),c=le(c);if(!m&&Ue(p)&&!Ue(c))if(E)return!0;else return p.value=c,!0}let h=m?Number(a)<o.length:ln(o,a),g=Reflect.set(o,a,c,Ue(o)?o:d);if(o===le(d)&&g){if(!h)Ke(o,"add",a,c);else if(je(c,p))Ke(o,"set",a,c,p)}return g}deleteProperty(o,a){let c=ln(o,a),d=o[a],p=Reflect.deleteProperty(o,a);if(p&&c)Ke(o,"delete",a,void 0,d);return p}has(o,a){let c=Reflect.has(o,a);if(!ct(a)||!si.has(a))Ce(o,"has",a);return c}ownKeys(o){return Ce(o,"iterate",lt(o)?"length":Qe),Reflect.ownKeys(o)}}class ai extends xr{constructor(o=!1){super(!0,o)}set(o,a){return!0}deleteProperty(o,a){return!0}}var hl=new yr,gl=new ai,xl=new yr(!0);var dr=(o)=>o,dn=(o)=>Reflect.getPrototypeOf(o);function yl(o,a,c){return function(...d){let p=this.__v_raw,m=le(p),h=At(m),g=o==="entries"||o===Symbol.iterator&&h,E=o==="keys"&&h,y=p[o](...d),w=c?dr:a?et:Le;return!a&&Ce(m,"iterate",E?ur:Qe),an(Object.create(y),{next(){let{value:T,done:C}=y.next();return C?{value:T,done:C}:{value:g?[w(T[0]),w(T[1])]:w(T),done:C}}})}}function fn(o){return function(...a){return o==="delete"?!1:o==="clear"?void 0:this}}function bl(o,a){let c={get(p){let m=this.__v_raw,h=le(m),g=le(p);if(!o){if(je(p,g))Ce(h,"get",p);Ce(h,"get",g)}let{has:E}=dn(h),y=a?dr:o?et:Le;if(E.call(h,p))return y(m.get(p));else if(E.call(h,g))return y(m.get(g));else if(m!==h)m.get(p)},get size(){let p=this.__v_raw;return!o&&Ce(le(p),"iterate",Qe),p.size},has(p){let m=this.__v_raw,h=le(m),g=le(p);if(!o){if(je(p,g))Ce(h,"has",p);Ce(h,"has",g)}return p===g?m.has(p):m.has(p)||m.has(g)},forEach(p,m){let h=this,g=h.__v_raw,E=le(g),y=a?dr:o?et:Le;return!o&&Ce(E,"iterate",Qe),g.forEach((w,T)=>p.call(m,y(w),y(T),h))}};return an(c,o?{add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear")}:{add(p){let m=le(this),h=dn(m),g=le(p),E=!a&&!qe(p)&&!Fe(p)?g:p;if(!(h.has.call(m,E)||je(p,E)&&h.has.call(m,p)||je(g,E)&&h.has.call(m,g)))m.add(E),Ke(m,"add",E,E);return this},set(p,m){if(!a&&!qe(m)&&!Fe(m))m=le(m);let h=le(this),{has:g,get:E}=dn(h),y=g.call(h,p);if(!y)p=le(p),y=g.call(h,p);let w=E.call(h,p);if(h.set(p,m),!y)Ke(h,"add",p,m);else if(je(m,w))Ke(h,"set",p,m,w);return this},delete(p){let m=le(this),{has:h,get:g}=dn(m),E=h.call(m,p);if(!E)p=le(p),E=h.call(m,p);let y=g?g.call(m,p):void 0,w=m.delete(p);if(E)Ke(m,"delete",p,void 0,y);return w},clear(){let p=le(this),m=p.size!==0,h=void 0,g=p.clear();if(m)Ke(p,"clear",void 0,void 0,void 0);return g}}),["keys","values","entries",Symbol.iterator].forEach((p)=>{c[p]=yl(p,o,a)}),c}function br(o,a){let c=bl(o,a);return(d,p,m)=>{if(p==="__v_isReactive")return!o;else if(p==="__v_isReadonly")return o;else if(p==="__v_isShallow")return a;else if(p==="__v_raw")return d;return Reflect.get(ln(c,p)&&p in d?c:d,p,m)}}var Sl={get:br(!1,!1)},vl={get:br(!1,!0)},El={get:br(!0,!1)};var li=new WeakMap,ci=new WeakMap,ui=new WeakMap,wl=new WeakMap;function Tl(o){switch(o){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bn(o){if(Fe(o))return o;return Sr(o,!1,hl,Sl,li)}function di(o){return Sr(o,!1,xl,vl,ci)}function fr(o){return Sr(o,!0,gl,El,ui)}function Sr(o,a,c,d,p){if(!ut(o))return o;if(o.__v_raw&&!(a&&o.__v_isReactive))return o;if(o.__v_skip||!Object.isExtensible(o))return o;let m=p.get(o);if(m)return m;let h=Tl(Ko(o));if(h===0)return o;let g=new Proxy(o,h===2?d:c);return p.set(o,g),g}function kt(o){if(Fe(o))return kt(o.__v_raw);return!!(o&&o.__v_isReactive)}function Fe(o){return!!(o&&o.__v_isReadonly)}function qe(o){return!!(o&&o.__v_isShallow)}function Cl(o){return o?!!o.__v_raw:!1}function le(o){let a=o&&o.__v_raw;return a?le(a):o}var Le=(o)=>ut(o)?bn(o):o,et=(o)=>ut(o)?fr(o):o;function Ue(o){return o?o.__v_isRef===!0:!1}function ze(o){return Al(o,!1)}function Al(o,a){if(Ue(o))return o;return new fi(o,a)}class fi{constructor(o,a){this.dep=new yn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=a?o:le(o),this._value=a?o:Le(o),this.__v_isShallow=a}get value(){return this.dep.track(),this._value}set value(o){let a=this._rawValue,c=this.__v_isShallow||qe(o)||Fe(o);if(o=c?o:le(o),je(o,a))this._rawValue=o,this._value=c?o:Le(o),this.dep.trigger()}}class pi{constructor(o,a,c){this.fn=o,this.setter=a,this._value=void 0,this.dep=new yn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$t-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!a,this.isSSR=c}notify(){if(this.flags|=16,!(this.flags&8)&&ce!==this)return Zo(this,!0),!0}get value(){let o=this.dep.track();if(ti(this),o)o.version=this.dep.version;return this._value}set value(o){if(this.setter)this.setter(o)}}function Mt(o,a,c=!1){let d,p;if(Wo(o))d=o;else d=o.get,p=o.set;return new pi(d,p,c)}function Sn(o){return o.replaceAll(/[A-Z]/g,(a)=>`-${a.toLowerCase()}`)}var Pl=new Set(["all","print","screen","speech"]);function mi(o,a){if(o.startsWith("@--"))return a[o.slice(1)]??o.slice(1);if(o.startsWith("@(")){let c=o.slice(2,-1).trim();return Pl.has(c.toLowerCase())?c:o.slice(1)}return null}function _t(o){return o.startsWith("@position-try")||o.startsWith("@property")||o.startsWith("@font-face")||o.startsWith("@counter-style")}function Dt(o){return o.startsWith("@keyframes")}function hi(o,a){let c=[];for(let d of vr(o))for(let p of vr(a))c.push(Nl(d,p));return c.join(", ")}function Nl(o,a){if(a.startsWith("&"))return a.replaceAll("&",o);if(a.startsWith("[")||a.startsWith(":")||a.startsWith("."))return`${o}${a}`;return`${o} ${a}`}function vr(o){let a=[],c=0,d=null,p=0;for(let h=0;h<o.length;h+=1){let g=o[h];if(d){if(g==="\\")h+=1;else if(g===d)d=null;continue}if(g==='"'||g==="'")d=g;else if(g==="("||g==="[")c+=1;else if(g===")"||g==="]")c=Math.max(0,c-1);else if(g===","&&c===0)a.push(o.slice(p,h)),p=h+1}a.push(o.slice(p));let m=a.flatMap((h)=>{let g=h.trim();return g===""?[]:[g]});return m.length>0?m:[o]}var Rl=/[\s>+~,()]/,$l=/^[A-Za-z_\u{00A0}-\u{FFFF}][\w\u{00A0}-\u{FFFF}-]*/u;function Ol(o,a){let c="",d=0;for(;;){let p=o.indexOf("[open]",d);if(p===-1)return c+o.slice(d);let m=p;while(m>0&&!Rl.test(o.charAt(m-1)))m-=1;let h=$l.exec(o.slice(m,p))?.[0]?.toLowerCase(),g=h===void 0?a.dialog===!0:h==="dialog";c+=o.slice(d,p)+(g?"[data-jx-dialog-open]":"[open]"),d=p+6}}function Er(o,a={}){if(o.includes("::backdrop"))return null;let c=o.replaceAll(":popover-open","[data-jx-popover-open]").replaceAll(":modal","[data-jx-dialog-open]").replaceAll("[inert]","[data-jx-inert]");return Ol(c,a)}var Ge="data-color-scheme";function vn(o){let a=/^\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)$/.exec(o.trim())?.[1];return a==="light"||a==="dark"?a:null}function gi(o,a){if(o===":root"||o==="html")return{auto:`${o}:where(:not([${Ge}]))`,forced:`${o}:where([${Ge}="${a}"])`};return{auto:`:where(:root:not([${Ge}])) ${o}`,forced:`:where(:root[${Ge}="${a}"]) ${o}`}}function Lt(o){return o.startsWith(":")||o.startsWith(".")||o.startsWith("&")||o.startsWith("[")}function wr(o){return o.startsWith("--")?o:Sn(o)}function Jt(o){let a=2166136261;for(let c=0;c<o.length;c+=1)a^=o.charCodeAt(c),a=Math.imul(a,16777619);return(a>>>0).toString(36)}function xi(o,a,c){let d=c.map(([m,h])=>`${m}: ${h}`).join("; "),p=a===null?d:`${a} { ${d} }`;for(let m=o.length-1;m>=0;m-=1)p=`${o[m]} { ${p} }`;return p}function kl(o,a,c){let d=c.map(({selector:m,declarations:h})=>`${m} { ${h.map(([g,E])=>`${g}: ${E}`).join("; ")} }`).join(" "),p=`@keyframes ${a} { ${d} }`;for(let m=o.length-1;m>=0;m-=1)p=`${o[m]} { ${p} }`;return p}function Ml(o){let a=Object.keys(o).filter((d)=>Dt(d));if(a.length===0)return o;let c={...o};for(let d of a)delete c[d];return c}function _l(o){let a=o.startsWith("&")?o.slice(1):o;return a===""||a.startsWith(":")||a.startsWith(".")||a.startsWith("[")}function It(o,a={}){let{scope:c=null,mediaQueries:d={},transposeValue:p=(k)=>k,transposeSelector:m=(k)=>k,resolveValue:h}=a,g=[],E=(k)=>k!==null&&typeof k==="object"&&!Array.isArray(k)&&!r(k),y=(k,L)=>{if(E(L))return[L];if(!_t(k)||!Array.isArray(L)||L.length===0)return[];return L.every((z)=>E(z))?L:[]},w=(k,L,z,G)=>{if(L===void 0||L===null)return null;if(r(L))return z?h?.(k,L,G)??null:null;if(n(L))return null;let Y=String(L);if(l(Y))return z?h?.(k,Y,G)??null:null;return p(Y)},T=(k,L,z=!0,G="self")=>{let Y=[];for(let[U,P]of Object.entries(k)){if(y(U,P).length>0)continue;if(L&&(U.startsWith("@")||Lt(U)))continue;if(U.startsWith("$"))continue;let B=w(U,P,z,G);if(B!==null)Y.push([wr(U),B])}return Y},C=(k,L,z,G,Y)=>{if(z.length===0)return;let U=L;if(U!==null){let ie=m(U);if(ie===null)return;U=ie}let P=xi(k,U,z),B={text:P,conditions:[...k],selector:U,declarations:z,target:G,key:Jt(P)};if(e(Y)&&Y!=="")B.description=Y;g.push(B)},_=(k,L,z)=>{let G=k.slice(10).trim();if(G==="")return;let Y=[];for(let[P,B]of Object.entries(L)){if(!E(B))continue;let ie=T(B,!0,!1,"unscoped");if(ie.length>0)Y.push({declarations:ie,selector:P.trim()})}if(Y.length===0)return;let U=kl(z,G,Y);g.push({blocks:Y,conditions:[...z],declarations:[],key:Jt(U),selector:null,target:"unscoped",text:U})},O=(k,L,z,G,Y)=>{if(k==="@--")return;if(_t(k)){C([...G,k],null,T(L,!1,!0,"unscoped"),"unscoped",L.$description);return}if(Dt(k)){_(k,L,G);return}let U=mi(k,d),P=U===null?k:`@media ${U}`,B=U===null?null:vn(U);if(B!==null&&z!==null){let{auto:ie,forced:V}=gi(z,B);K(L,ie,[...G,P],Y),K(Ml(L),V,G,Y);return}K(L,z,[...G,P],Y)};function K(k,L,z,G){C(z,L,T(k,!0,!0,G),G,k.$description);for(let[Y,U]of Object.entries(k))for(let P of y(Y,U))if(Y.startsWith("@"))O(Y,P,L,z,G);else if(L!==null)K(P,hi(L,Y),z,_l(Y)?G:"descendant")}return K(o,c,[],"self"),g}var Ve="en-US",yi="UTC",bi=[{api:"Intl.NumberFormat",params:["value","locale","options"],path:"Intl/formatNumber",summary:"Format a number for a locale — grouping, decimals, currency, percent, units."},{api:"Intl.DateTimeFormat",params:["value","locale","options"],path:"Intl/formatDate",summary:"Format a date or timestamp for a locale. Pass `timeZone` in options."},{api:"Intl.RelativeTimeFormat",params:["value","unit","locale","options"],path:"Intl/formatRelativeTime",summary:'Format a relative time — `-3, "day"` becomes "3 days ago".'},{api:"Intl.ListFormat",params:["values","locale","options"],path:"Intl/formatList",summary:'Join a list the way a locale does — "a, b, and c", not a hand-written comma join.'},{api:"Intl.PluralRules",params:["value","locale","options"],path:"Intl/plural",summary:'Which plural category a number falls in ("one", "few", "other") — many languages have '+"more than two, so a ternary on `n === 1` is wrong outside English."},{api:"Intl.Collator",params:["a","b","locale","options"],path:"Intl/compare",summary:'Compare two strings for sorting. `<` and `sort()` order by UTF-16 code unit, which puts "Zebra" before "apple" and sorts every accented word into the wrong place.'},{api:"Intl.DisplayNames",params:["code","type","locale","options"],path:"Intl/displayName",summary:'The name of a language, region, script or currency in a locale — "de" as "German" or '+'"Deutsch", from CLDR rather than a hand-kept table.'},{api:"Intl.Segmenter",params:["value","granularity","locale"],path:"Intl/segment",summary:"Split text into graphemes, words or sentences (UAX #29). `[...str]` splits code points, so it cuts an emoji with a skin-tone modifier in half."}],Si=bi.map((o)=>o.path),vi=Object.fromEntries(bi.map((o)=>[o.path,o.params.indexOf("locale")]));function Jl(o){return o.replaceAll("~1","/").replaceAll("~0","~")}function Tr(o){if(o==="")return[];return o.split("/").map((a)=>Jl(a))}function me(o,a){let c=o;for(let d of Tr(a))c=c?.[d];return c}function Cr(o){let a=o.$map;return n(a)?a:void 0}function Dl(o){return n(o)&&!Array.isArray(o)&&"operator"in o}function Ti(o){return n(o)&&!Array.isArray(o)&&"$ref"in o}var Ci=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),Ai=new Set(["!","-"]),Pi=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||","??"]),Ll=new Set(["=","+=","-=","*=","/="]),Il=new Set(["push","pop","shift","unshift","splice"]),Ni=new Set(["reduce","map","filter"]),Ri=new Set(["?:","switch"]),$i=new Set(["includes","indexOf","lastIndexOf","join","slice","concat","at","flat","toSorted","toReversed","toSpliced","with","toUpperCase","toLowerCase","trim","trimStart","trimEnd","split","startsWith","endsWith","padStart","padEnd","replaceAll","repeat","charAt","normalize","toLocaleUpperCase","toLocaleLowerCase","toFixed","toPrecision","toLocaleString"]),jl=new Set([...Ci,...Ai,...Pi,...Ni,...Ri,...$i,"call"]),Hl=new Set(["isNaN","isFinite","parseFloat","parseInt","encodeURIComponent","decodeURIComponent","structuredClone","Math/abs","Math/ceil","Math/floor","Math/round","Math/trunc","Math/sign","Math/sqrt","Math/cbrt","Math/pow","Math/exp","Math/log","Math/log2","Math/log10","Math/min","Math/max","Math/hypot","Number/isInteger","Number/isFinite","Number/isNaN","Number/parseFloat","Number/parseInt","JSON/parse","JSON/stringify","Object/keys","Object/values","Object/entries","Object/fromEntries","Array/from","Array/isArray","Array/of","String/fromCharCode","String/fromCodePoint",...Si]),Fl=new Map([["Intl/compare",(o,a,c,d)=>new Intl.Collator(c??Ve,d).compare(o,a)],["Intl/displayName",(o,a,c,d)=>new Intl.DisplayNames(c??Ve,{...d,type:a??"language"}).of(o)],["Intl/formatDate",(o,a,c)=>new Intl.DateTimeFormat(a??Ve,{timeZone:yi,...c}).format(new Date(o))],["Intl/formatList",(o,a,c)=>new Intl.ListFormat(a??Ve,c).format(o)],["Intl/formatNumber",(o,a,c)=>new Intl.NumberFormat(a??Ve,c).format(o)],["Intl/formatRelativeTime",(o,a,c,d)=>new Intl.RelativeTimeFormat(c??Ve,d).format(o,a)],["Intl/plural",(o,a,c)=>new Intl.PluralRules(a??Ve,c).select(o)],["Intl/segment",(o,a,c)=>[...new Intl.Segmenter(c??Ve,{granularity:a??"grapheme"}).segment(o)].map((d)=>d.segment)]]);function Vl(o,a,c){let d=vi[o];if(d===void 0||d<0||a[d]!=null)return a;let p=me(c.$page,"locale");if(!e(p)||p==="")return a;let m=[...a];return m[d]=p,m}function Wl(o){return o.startsWith("window#/")&&Hl.has(o.slice(8))}function Oi(o){return Ci.has(o)}var Ei=64,Bl=64;function fe(o,a){if(!o)return;let c=(o.depth??0)+1;if(c>Bl)return;return{depth:c,path:[...o.path??[],...Array.isArray(a)?a:[a]],report:o.report}}function de(o,a,c,d,p){if(o===null||o===void 0)return o;if(Dl(o))return Ae(o,a,c,d,p);if(Ti(o)){let m=En(o.$ref,a,c,d);return p?.report(p.path??[],m),m}if(Array.isArray(o))return ki(o,a,c,d,p);return p?.report(p.path??[],o),o}function ki(o,a,c,d,p){return o.map((m,h)=>de(m,a,c,d,fe(p,h)))}function Kl(o,a,c,d){let p=(m)=>{if(!o.slice(m.length).includes("/"))return a;return En(o.slice(0,o.lastIndexOf("/")),a,c,d)};if(o.startsWith("#/state/"))return p("#/state/");if(o.startsWith("parent#/"))return p("parent#/");if(o.startsWith("$map/")||o.startsWith("$args/"))return o.split("/").length>2?En(o.slice(0,o.lastIndexOf("/")),a,c,d):void 0;return}function En(o,a,c,d){if(o==="$reduce/acc")return d?.acc;if(o.startsWith("$reduce/"))return d?.acc;if(o.startsWith("$args/")){let p=o.slice(6).split("/"),m=d?.args?.[p[0]];return p.length>1?me(m,p.slice(1).join("/")):m}if(o.startsWith("event#/")){let p=o.slice(7);return me(c,p)}if(o.startsWith("$map/")){let p=o.split("/"),[,m]=p,h,g=Cr(a);if(m==="item")h=d?.item??g?.item??a["$map/item"];else if(m==="index")h=d?.index??g?.index??a["$map/index"];else h=g?.[m]??a[`$map/${m}`];return p.length>2?me(h,p.slice(2).join("/")):h}if(o.startsWith("#/state/"))return me(a,o.slice(8));if(o.startsWith("parent#/"))return me(a,o.slice(8));if(o.startsWith("window#/"))return me(globalThis.window,o.slice(8));if(o.startsWith("document#/"))return me(globalThis.document,o.slice(10));return me(a,o)??null}function Ul(o,a,c,d){if(o.startsWith("$map/")){let p=o.split("/"),[,m]=p,h,g=Cr(a);if(m==="item")h=d?.item??g?.item??a["$map/item"];else if(m==="index")h=d?.index??g?.index??a["$map/index"];else h=g?.[m]??a[`$map/${m}`];if(p.length>2){let E=p.slice(2),y=E.pop(),w=E.length>0?me(h,E.join("/")):h;return{key:y,obj:w}}return{key:m==="item"?"$map/item":"$map/index",obj:Cr(a)??a}}if(o.startsWith("#/state/")){let p=o.slice(8);if(p.indexOf("/")===-1)return{key:p,obj:a};let h=Tr(p),g=h.pop(),E=a;for(let y of h)E=E[y];return{key:g,obj:E}}return{key:o,obj:a}}function Ae(o,a,c,d,p){let m=ql(o,a,c,d,p);return p?.report(p.path??[],m),m}function wi(o,a,c){switch(o){case"+":return a+c;case"-":return a-c;case"*":return a*c;case"/":return a/c;case"%":return a%c;case"<":return a<c;case"<=":return a<=c;case">":return a>c;default:return a>=c}}function ql(o,a,c,d,p){let{operator:m,target:h,value:g,initial:E}=o;if(!jl.has(m))throw Error(`$expression: unknown operator "${m}"`);if(Ai.has(m)&&!("value"in o)){let y=de(h,a,c,d,fe(p,"target"));if(m==="!")return!y;if(m==="-")return-y}if(m==="call"){let y=Ti(h)?h.$ref:void 0;if(!e(y))throw TypeError("$expression: call target must be a $ref pointer");let w=(d?.callDepth??0)+1;if(w>Ei)throw Error(`$expression: call depth exceeded (${Ei})`);let T=Array.isArray(g)?g.map((_,O)=>de(_,a,c,d,fe(p,["value",O]))):[];if(y.startsWith("window#/")){if(!Wl(y))throw Error(`$expression: "${y}" is not a blessed pure global`);let _=y.slice(8),O=Fl.get(_);if(O)return O(...Vl(_,T,a));let K=me(globalThis.window,_),k=_.lastIndexOf("/"),L=k===-1?globalThis.window:me(globalThis.window,_.slice(0,k));return K.apply(L,T)}let C=En(y,a,c,d);if(t(C))return C.apply(Kl(y,a,c,d),T);if(n(C)&&"$expression"in C){let _=C,O={};for(let[K,k]of(_.parameters??[]).entries()){let L=e(k)?k:k?.name??"";if(!L)continue;O[L]=T[K]===void 0&&n(k)&&"default"in k?k.default:T[K]}return Ae(_.$expression,a,c,{args:O,callDepth:w})}throw TypeError(`$expression: call target "${y}" is not callable`)}if(Ri.has(m)){if(m==="?:"){let _=de(h,a,c,d,fe(p,"target"));if(p){let O=de(g,a,c,d,fe(p,"value")),K=de(E,a,c,d,fe(p,"initial"));return _?O:K}return _?de(g,a,c,d):de(E,a,c,d)}let y=de(h,a,c,d,fe(p,"target")),w=String(y),T=o.cases??{},C=Object.hasOwn(T,w);if(p){let _;for(let[K,k]of Object.entries(T)){let L=de(k,a,c,d,fe(p,["cases",K]));if(K===w)_=L}let O=de(o.default,a,c,d,fe(p,"default"));return C?_:O}return C?de(T[w],a,c,d):de(o.default,a,c,d)}if(Pi.has(m)){let y=de(h,a,c,d,fe(p,"target")),w=de(g,a,c,d,fe(p,"value"));switch(m){case"===":return y===w;case"!==":return y!==w;case"&&":return y&&w;case"||":return y||w;case"??":return y??w;default:return wi(m,y,w)}}if(Ll.has(m)){let y=de(g,a,c,d,fe(p,"value")),{obj:w,key:T}=Ul(h.$ref,a,c,d);w[T]=m==="="?y:wi(m.slice(0,-1),w[T],y);return}if(Il.has(m)){let y=de(h,a,c,d,fe(p,"target"));switch(m){case"push":return y.push(de(g,a,c,d,fe(p,"value")));case"unshift":return y.unshift(de(g,a,c,d,fe(p,"value")));case"pop":return y.pop();case"shift":return y.shift();case"splice":{let w=de(g,a,c,d,fe(p,"value"));return y.splice(...w)}default:break}}if($i.has(m)){let y=de(h,a,c,d,fe(p,"target")),w=g===void 0?[]:Array.isArray(g)?ki(g,a,c,d,fe(p,"value")):[de(g,a,c,d,fe(p,"value"))],T=me(y,m);if(!t(T))return;return T.apply(y,w)}if(Ni.has(m)){let y=de(h,a,c,d,fe(p,"target")),w=g;if(m==="reduce"){let T=de(E,a,c,d,fe(p,"initial"));for(let[C,_]of y.entries())T=Ae(w,a,c,{acc:T,index:C,item:_},C===0?fe(p,"value"):void 0);return T}if(m==="map")return y.map((T,C)=>Ae(w,a,c,{...d,index:C,item:T},C===0?fe(p,"value"):void 0));if(m==="filter")return y.filter((T,C)=>Ae(w,a,c,{...d,index:C,item:T},C===0?fe(p,"value"):void 0))}return}function tt(o,a,c,d){return de(o,a,c,d)}function wn(o){let a=o.replaceAll("\\","/");return a.length>1&&a.endsWith("/")?a.slice(0,-1):a}function Mi(o){let a=wn(o);return a.startsWith("/")?a:`/${a}`}function _i(o,a){return[...o].toSorted((c,d)=>d[a].length-c[a].length)}function zl(o,a){return o===a||o.startsWith(`${a}/`)}function Ji(o,a){let c=wn(a);for(let d of _i(o,"dir")){let p=wn(d.dir);if(!zl(c,p)||c===p)continue;let m=c.slice(p.length+1),{filter:h}=d;if(h&&!h(m))return null;let g=m.split("/").map((E)=>encodeURIComponent(E)).join("/");return`${Mi(d.urlPrefix)}/${g}`}return null}function Gl(o,a){let c=a.split("#")[0].split("?")[0];if(!c.startsWith("/"))return null;let d;try{d=decodeURIComponent(c)}catch{return null}if(/%2e|%2f/i.test(d))return null;for(let p of _i(o,"urlPrefix")){let m=Mi(p.urlPrefix);if(!d.startsWith(`${m}/`))continue;let g=d.slice(m.length+1).split("/");if(g.some((y)=>y===""||y==="."||y===".."))return null;let{filter:E}=p;if(E&&!E(g.join("/")))return null;return`${wn(p.dir)}/${g.join("/")}`}return null}var $f=String.raw`"'\s<>()\\`;var Yl="public";function jt(o){let a=o.search(/[#?]/);return a===-1?{path:o,suffix:""}:{path:o.slice(0,a),suffix:o.slice(a)}}function Ar(o){return o===""||o.startsWith("/")||o.startsWith("#")||o.includes("${")||/^[a-z][\w+.-]*:/i.test(o)}function Pr(o){return o.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}function Nr(o,a){let d=(o===""||o==="."?[]:Pr(o).split("/")).filter((p)=>p!==""&&p!==".");for(let p of a.replaceAll("\\","/").split("/")){if(p===""||p===".")continue;if(p===".."){if(d.length===0)return null;d.pop();continue}d.push(p)}return d.join("/")}function Xl(o,a,c){let{path:d}=jt(o);if(!d.startsWith("/"))return[];let p;try{p=decodeURIComponent(d)}catch{return[]}if(/%2e|%2f/i.test(p))return[];let m=p.replace(/^\/+/,"");if(m===""||m.split("/").some((g)=>g==="."||g===".."))return[];let h=[];for(let g of c){if(g==="mounts"){let E=Gl(a,d);if(E!==null&&!E.startsWith("/")&&!/^[A-Za-z]:/.test(E))h.push(Pr(E));continue}h.push(g==="root"?m:`${Yl}/${m}`)}return[...new Set(h)]}function Di(o,a,c,d){let{path:p}=jt(o);if(p==="")return null;if(Ar(o))return p.startsWith("/")?Xl(p,c,d)[0]??null:null;if(p.endsWith("/"))return null;let m;try{m=decodeURIComponent(p)}catch{return null}let h=Nr(a,m);if(h===null||h===""||h===Pr(a))return null;return h}function Li(o){return o.split("/").map((a)=>encodeURIComponent(a)).join("/")}function Ii(o){let a=[],c=0;while(c<o.length){while(c<o.length&&(/\s/.test(o[c])||o[c]===","))c+=1;if(c>=o.length)break;let d=c;while(c<o.length&&!/\s/.test(o[c]))c+=1;let p=o.slice(d,c);if(p.endsWith(",")){a.push({descriptor:"",url:p.replace(/,+$/,"")});continue}while(c<o.length&&/\s/.test(o[c]))c+=1;let m=c;while(c<o.length&&o[c]!==",")c+=1;let h=o.slice(m,c).trim();if(c+=1,p=p.replace(/,+$/,""),p!=="")a.push({descriptor:h,url:p})}return a}function ji(o){return o.map(({url:a,descriptor:c})=>c?`${a} ${c}`:a).join(", ")}function Zl(o){if("operator"in o)return{kind:"expression",node:o};if("if"in o)return{kind:"if",node:o};if("$switch"in o)return{kind:"switch",node:o};if("stopPropagation"in o)return{kind:"stopPropagation"};if("preventDefault"in o)return{kind:"preventDefault"};return{kind:"dispatch",node:o}}function Ql(o){return(n(o)||t(o))&&"then"in o&&t(o.then)}async function pt(o,a,c,d={}){let p=d.args?{args:d.args}:void 0;for(let m of o){let h=Zl(m);switch(h.kind){case"expression":{let g=Ae(h.node,a,c,p);if(Ql(g))await g;break}case"if":{let g=h.node,E=tt(g.if,a,c,p)?g.then:g.else;if(Array.isArray(E))await pt(E,a,c,d);break}case"switch":{let g=h.node,E=String(tt(g.$switch,a,c,p)),y=g.cases??{},w=Object.hasOwn(y,E)?y[E]:g.default;if(Array.isArray(w))await pt(w,a,c,d);break}case"dispatch":{let g=h.node,E=t(d.target)?d.target():d.target,y=c?.currentTarget??E;if(!y)break;let w={};if("detail"in g)w.detail=tt(g.detail,a,c,p);if(g.bubbles!==void 0)w.bubbles=g.bubbles;if(g.composed!==void 0)w.composed=g.composed;y.dispatchEvent(new CustomEvent(g.dispatchEvent,w));break}case"stopPropagation":{c?.stopPropagation();break}case"preventDefault":{c?.preventDefault();break}default:break}}}function Hi(o,a){for(let c of o.split(";")){let d=c.indexOf("=");if(d===-1)continue;if(c.slice(0,d).trim()===a)return c.slice(d+1)}return null}function Fi(o,a,c){let d=o.startsWith("__Host-"),p=[`${o}=${encodeURIComponent(JSON.stringify(a))}`];if(c.maxAge!==void 0)p.push(`Max-Age=${c.maxAge}`);let m=d?"/":c.path;if(m)p.push(`Path=${m}`);if(c.domain&&!d)p.push(`Domain=${c.domain}`);let{sameSite:h}=c;if(c.secure===!0||d||o.startsWith("__Secure-")||h?.toLowerCase()==="none")p.push("Secure");if(h)p.push(`SameSite=${h}`);return p.join("; ")}function Rr(o){return t(o)}var $r=new Map;function ec(o){return o.headers?.get("Content-Type")??""}async function Dr(o,a){if(!e(o))return o;let c=a?.resolver?.(o);if(c)return c;if($r.has(o))return $r.get(o);let d=fetch(o).then(async(p)=>{if(!p.ok)throw Error(`Jx: failed to fetch ${o} (${p.status})`);if(ec(p).includes("text/html"))throw Error(`Jx: ${o} returned HTML, not a document — the host answered a missing file with its `+"app shell (a single-page fallback), so this path is not served.");return await p.json()});return $r.set(o,d),d}var tc=new Set(["type","properties","items","enum","minimum","maximum","minLength","maxLength","pattern","required","examples"]),es={skip:!1};function ts(o){es.skip=o}var ns={skip:!1};function rs(o){ns.skip=o}var Or=null;function os(o){Or=o||null}function is(o){return Or?`${o}?token=${encodeURIComponent(Or)}`:o}function ss(o){let a=ft(!0);return a.run(()=>{be(o)}),()=>a.stop()}function kn(o){let a=ft(!0);try{return{result:a.run(o),stop:()=>a.stop()}}catch(c){throw a.stop(),c}}var as=!1;function ls(o){as=o}var nc=/(-?\d*\.?\d+)(?:s|l|d)?v(h|w|min|max|i|b)\b/gi,rc=new Map([["b","cqb"],["h","cqh"],["i","cqi"],["max","cqmax"],["min","cqmin"],["w","cqw"]]);function oc(o){if(!as||!o.includes("v"))return o;return o.replace(nc,(a,c,d)=>`${c}${rc.get(d.toLowerCase())??`cq${d}`}`)}var cs=!1;function us(o){cs=o}var Lr=!1;function ds(o){Lr=o}var Ir=!1;function fs(o){Ir=o}var Cn=!1;function kr(o){return Cn||o.dataset.jxPath!==void 0}function ic(o,a){if(cs&&a==="href"&&(o.tagName==="A"||o.tagName==="AREA"))return"data-jx-href";if(Lr&&a==="popover"&&kr(o))return"data-jx-popover";if(Ir&&kr(o)){if(a==="commandfor")return"data-jx-commandfor";if(a==="inert")return"data-jx-inert";if(a==="open"&&o.tagName==="DIALOG")return"data-jx-open"}return a}var ht=null;function Mn(o){ht=o}var sc=new Set(["src","poster","data"]),ac=new Set(["srcset","imagesrcset"]),lc=new Set(["LINK"]);function cc(o,a){return sc.has(a)||a==="href"&&lc.has(o)}function jr(o,a,c){if(!ht||c==="")return c;let d=a.toLowerCase();if(ac.has(d)){let p=Ii(c),m=p.map((g)=>{let E=ht?.(g.url,d)??null;if(E===null||E===g.url)return g;return{descriptor:g.descriptor,url:E}});return m.some((g,E)=>g!==p[E])?ji(m):c}if(!cc(o,d))return c;return ht(c,d)??c}var uc=/\burl\(\s*(?<q>["']?)(?<u>[^"')]*)\k<q>\s*\)/g;function dc(o){if(!ht||!o.includes("url("))return o;return o.replaceAll(uc,(a,c,d)=>{let p=d===""?null:ht?.(d,"url()")??null;return p===null?a:`url(${c}${p}${c})`})}function An(o){return oc(dc(o))}var ps=!1;function ms(o){ps=o}var fc=/^\s*\$\{\s*state\.(\w+)\s*\}\s*$/;function pc(o,a,c){if(!ps||o!=="textContent")return null;let d=null;if(r(a)){if(!a.$ref.startsWith("#/state/"))return null;let m=a.$ref.slice(8);d=m&&!m.includes("/")?m:null}else if(e(a))d=fc.exec(a)?.[1]??null;if(!d)return null;let p=le(c)[d];if(Ue(p)||t(p))return null;if(n(p))return null;return d}async function _n(o,a={},c=location.href,d){let p=()=>d?.root??null,m={},h=o.state??{},g=kt(a);for(let T of Object.keys(a))if(g&&!(T in h))Object.defineProperty(m,T,{configurable:!0,enumerable:!0,get:()=>a[T],set:(C)=>{a[T]=C}});else m[T]=a[T];let E=o.imports??{};for(let[,T]of Object.entries(h))if(R(T)&&!T.$src){let C=E[T.$prototype];if(C){if(!C.endsWith(".class.json")){console.warn(`Jx: import "${T.$prototype}" must map to a .class.json path, got "${C}"`);continue}T.$src=C}}for(let[T,C]of Object.entries(h)){if(e(C)){if(!C.includes("${"))m[T]=C;continue}if(s(C)||x(C)||C===null){m[T]=C;continue}if(Array.isArray(C)){m[T]=C;continue}if(n(C)){if(C.$prototype)continue;if(b(C))continue;if(D(C))continue;if("default"in C){m[T]=C.default;continue}if(mc(C))continue;m[T]=C}}let y=bn(m);for(let[T,C]of Object.entries(h))if(e(C)&&C.includes("${"))y[T]=Mt(()=>We(C,y));for(let[T,C]of Object.entries(h))if(b(C)){let _=C.$expression;if(j(C)){let O=C.parameters;y[T]=(...K)=>Ae(_,y,null,{args:Vi(O,K)})}else if(Oi(_.operator)){let O=(K,k)=>Ae(_,K,k);y[T]=O}else y[T]=Mt(()=>Ae(_,y,null))}for(let[T,C]of Object.entries(h))if(N(C)){let{body:_}=C;if(Array.isArray(C.parameters)&&C.parameters.length>0){let O=C.parameters;y[T]=(...K)=>pt(_,y,null,{args:Vi(O,K),target:p})}else{let O=(K,k)=>{pt(_,K,k??null,{target:p})};y[T]=O}}else if(v(C))y[T]=await xc(C,y,T,c);for(let[T,C]of Object.entries(h))if(R(C))y[T]=await Oc(C,y,T,c,d);if(!(d?.skipServerFunctions??es.skip)){for(let[T,C]of Object.entries(h))if(D(C))y[T]=await Ic(C,y,T,c)}let w=d?.media??As;if(o.$media)y.$media=o.$media;else if(!y.$media&&Object.keys(w).length>0)y.$media=w;return y}function Vi(o,a){let c={};for(let[d,p]of o.entries()){let m=e(p)?p:p?.name??"";if(!m)continue;c[m]=a[d]===void 0&&p!==null&&!e(p)&&"default"in p?p.default:a[d]}return c}function mc(o){for(let a of Object.keys(o))if(tc.has(a))return!0;return!1}function We(o,a){let c=hs(a);return Function("state","$map","item","index",`return \`${o}\``)(a,c,c?.item,c?.index)}function hs(o){return o.$map}function hc(o){if(!o.startsWith("${")||!o.endsWith("}"))return!1;let a=0;for(let c=1;c<o.length;c+=1){let d=o[c];if(d==="{")a+=1;else if(d==="}"){if(a-=1,a===0)return c===o.length-1}}return!1}function gc(o,a){if(!hc(o))return We(o,a);let c=hs(a);return Function("state","$map","item","index",`return (${o.slice(2,-1)})`)(a,c,c?.item,c?.index)}function Ht(o){return import(o)}var xt=new Map,mt=new Map,gs=new Set;function xs(o,a){if(gs.add(o),t(a)){xt.delete(o),mt.set(o,a);return}mt.delete(o),xt.set(o,a)}function Hr(o){let a=xt.get(o);if(a)return a;let c=mt.get(o);if(!c)return;if(!t(c))return c;let d=c(),p=(async()=>{try{let m=await d;return xt.set(o,m),mt.delete(o),m}catch(m){throw mt.set(o,c),m}})();return mt.set(o,p),p}async function xc(o,a,c,d){if(o.body&&o.$src)throw Error(`Jx: '${c}' declares both body and $src — these are mutually exclusive`);if(!o.body&&!o.$src){let g=Mr(o),E=Function(...g,"");return Object.defineProperty(E,"name",{configurable:!0,value:o.name??c}),E}let p;if(e(o.body)){let g=Mr(o);p=Function(...g,o.body),Object.defineProperty(p,"name",{configurable:!0,value:o.name??c})}else{let g=o.$src;if(!g)throw Error(`Jx: '${c}' has neither body nor $src`);let E=o.$export??c,y,w=Hr(g);if(w instanceof Promise)y=await w;else if(w)y=w;else{if(d){let C=new URL(g,d).href;try{y=await Ht(C)}catch{y=await Ht(g)}}else y=await Ht(g);xt.set(g,y)}let T=y[E]??y.default?.[E];if(!t(T))throw TypeError(`Jx: export "${E}" not found or not a function in "${g}"`);p=T}let m=(o.parameters??o.arguments??[]).length>0,h=!1;if(!m)h=e(o.body)?I(o.body):p.length<=1&&I(p.toString());if(h)return Mt(()=>p(a));return p}function Mr(o){let a=o.parameters?W(o.parameters):o.arguments??[];return a.length>0&&a[0]==="state"?a:["state",...a]}var Wt=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$title","$description","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"]);function Fr(o){return Object.create(o)}function Jn(o){return o.$media??{}}function Vr(o){return o}function yc(o){return t(o)}var Wi=new Set,bc="http://www.w3.org/2000/svg",Sc="http://www.w3.org/1998/Math/MathML";function vc(o,a){if(o==="svg")return bc;if(o==="math")return Sc;return a??null}function Me(o,a,c){let d=c?._path??[];if(e(o)||s(o)||x(o)){let T=document.createTextNode(String(o));if(l(o))be(()=>{T.textContent=We(o,a)});return T}let p=a;for(let[T,C]of Object.entries(o))if(T.startsWith("$")&&!Wt.has(T)){if(p===a)p=Fr(a);p[T]=r(C)?Se(C.$ref,a):C}if("$ref"in o&&!o.tagName){let T=String(o.$ref??"");if(!Wi.has(T))Wi.add(T),console.warn(`Jx: a $ref child ("${T}") is not a supported component instance; register the `+"component in $elements and use its custom-element tag instead (spec §13).")}let m=Kr(o.tagName,p),h=m.includes("-")&&customElements.get(m);if(o.$props&&h)return Qi(o,p,c,d);if(o.$props){if(m.includes("-"))return Qi(o,p,c,d);let{$props:T,...C}=o;return Me(C,Wc(o,p),c)}if(o.$switch)return $c(o,p,c);let g=vc(m,c?._ns),E=m==="foreignObject"?null:g,y=g?document.createElementNS(g,m):document.createElement(m);if(c?.onNodeCreated)c.onNodeCreated(y,d,o,p);if(Wr(y,o,p),o.style&&m.includes("-"))Br.set(y,o.style);Dn(y,o.style??{},Jn(p),p),In(y,o.attributes??{},p);let w=o.children;if(S(w)){let T=c||E?{...c,_ns:E,_path:[...d,"children"]}:void 0;_r(y,w,p,T)}else if(Array.isArray(w))for(let T=0;T<w.length;T++){let C=w[T],_=c||E?{...c,_ns:E,_path:[...d,"children",T]}:void 0;if(S(C))_r(y,C,p,_);else y.append(Me(C,p,_))}return y}function Wr(o,a,c){for(let[d,p]of Object.entries(a)){if(Wt.has(d))continue;if(d.startsWith("$"))continue;if(d.startsWith("on")&&ys(o,d,p,c))continue;bs(o,d,p,c)}}function ys(o,a,c,d){let p=a.slice(2),m=d;if(r(c)){let h=Se(c.$ref,d);if(yc(h))o.addEventListener(p,(g)=>h(m,g));return!0}if(N(c)){let{body:h}=c;return o.addEventListener(p,(g)=>{pt(h,m,g)}),!0}if(v(c)&&e(c.body)){let h=Mr(c),g=Function(...h,c.body);return o.addEventListener(p,(E)=>g(m,E)),!0}if(b(c)){let h=c.$expression;return o.addEventListener(p,(g)=>Ae(h,m,g)),!0}return!1}function Ec(o,a,c){for(let[d,p]of Object.entries(a))if(d.startsWith("on")&&!Wt.has(d))ys(o,d,p,c)}function bs(o,a,c,d){let p=Vr(o),m=pc(a,c,d);if(m)o.dataset.jxBoundProp=m;let h=(E)=>e(E)?jr(o.tagName,a,E):E,g=(E)=>{let y=o;if(a==="className"&&!(y instanceof HTMLElement)){y.setAttribute("class",E==null?"":String(E));return}if(p[a]===E)return;p[a]=E};if(r(c)){let E=c;if(a==="id"){p[a]=Se(E.$ref,d);return}be(()=>{g(h(Se(E.$ref,d)))});return}if(l(c)){let E=c;be(()=>{g(h(We(E,d)))});return}g(h(c))}function Bi(o,a){let c=[];return{detach:a,insert(d){let p=[];for(let h of d){let g=o.cssRules.length;try{o.insertRule(h,g)}catch{continue}let E=o.cssRules[g];if(E)p.push(E)}let m={rules:p,texts:d};return c.push(m),m},remove(d){let p=c.indexOf(d);if(p!==-1)c.splice(p,1);if(d.rules.length===0)return;let m=[...o.cssRules],h=d.rules.map((g)=>m.indexOf(g)).filter((g)=>g>=0).toSorted((g,E)=>E-g);for(let g of h)o.deleteRule(g);d.rules.length=0},replaceAll(d){c.length=0,c.push({rules:[],texts:d}),o.replaceSync(d.join(`
|
|
3
|
+
`))},text(){return c.flatMap((d)=>d.texts.join(`
|
|
4
4
|
`)).join(`
|
|
5
|
-
`)}}}function
|
|
5
|
+
`)}}}function wc(o){let a=[],c=()=>{o.textContent=a.map((d)=>d.texts.join(`
|
|
6
6
|
`)).join(`
|
|
7
|
-
`)};return{detach(){e.remove()},insert(r){let o={rules:[],texts:r};return t.push(o),n(),o},remove(r){let o=t.indexOf(r);if(o!==-1)t.splice(o,1),n()},replaceAll(r){t.length=0,t.push({rules:[],texts:r}),n()},text(){return e.textContent??""}}}function ei(e){let n=e.defaultView?.CSSStyleSheet;if(typeof n==="function"&&Array.isArray(e.adoptedStyleSheets))try{let o=new n;return e.adoptedStyleSheets=[...e.adoptedStyleSheets,o],Ts(o,()=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter((s)=>s!==o)})}catch{}let r=e.createElement("style");return r.dataset.jxSheet="",(e.head??e.documentElement).append(r),r.sheet?Ts(r.sheet,()=>r.remove()):Gl(r)}var Ct=new WeakMap;function Yl(e){let t=Ct.get(e);if(t)return t;let n={hoisted:new Map,interned:new Map,scratch:null,scratchOwners:new Map,serial:0,shared:ei(e)};return Ct.set(e,n),n}var pn=new WeakMap,As="\x01jx-scope\x01";function ti(e){e.scratch.replaceAll([...e.scratchOwners.values()].flat())}function Cs(e,t,n){let r=t.get(n);if(r.refs-=1,r.refs<=0)t.delete(n),e.shared.remove(r.inserted)}function Ps(e,t,n,r){let o=t.get(n);if(o){o.refs+=1;return}t.set(n,{inserted:e.shared.insert(r),refs:1})}function mn(e,t){let n=pn.get(e);if(!n||t!==void 0&&n!==t)return;pn.delete(e),n.stop?.();for(let o of n.vars)e.style.removeProperty(o);if(delete e.dataset.jx,Ct.get(n.doc)!==n.state)return;let{state:r}=n;if(n.interned===null){if(r.scratchOwners.delete(e))ti(r)}else Cs(r,r.interned,n.interned);for(let o of n.hoisted)Cs(r,r.hoisted,o)}function ni(e=document){let t=Ct.get(e);if(!t)return;Ct.delete(e);for(let n of t.scratchOwners.keys())pn.delete(n),delete n.dataset.jx;t.scratchOwners.clear(),t.interned.clear(),t.hoisted.clear(),t.shared.detach(),t.scratch?.detach()}function Xl(e){return Boolean(e)&&typeof e==="object"&&"display"in e}var $r=new WeakMap;function ri(e,t){if(!t)return e;let n={...e};for(let[r,o]of Object.entries(t)){let s=n[r];n[r]=s!==null&&typeof s==="object"&&o!==null&&typeof o==="object"&&!Array.isArray(o)?ri(s,o):o}return n}function wn(e,t,n={},r={}){oi(e,t,n,r,!1)}function En(e,t,n={},r={}){oi(e,t??{},n,r,!0)}function oi(e,t,n,r,o){mn(e);let s=e.ownerDocument??document,i=Yl(s),a=(Tr||Ar)&&wr(e)?(x)=>ur(x,{dialog:e.tagName==="DIALOG"}):(x)=>x,c=-1,l=0,u=[],f=kt(t,{mediaQueries:n,resolveValue:(x,S,A)=>{if(A==="self"&&x.startsWith("--"))return u.push({name:x,value:S}),null;if(c<0)({serial:c}=i),i.serial+=1;let C=`--jx-r${c}-${l}`;return l+=1,u.push({name:C,value:S}),`var(${C})`},scope:As,transposeSelector:a,transposeValue:dn});if(f.length===0&&u.length===0)return;let d=f.filter((x)=>x.target!=="unscoped"),m=f.filter((x)=>x.target==="unscoped");for(let x of m)Ps(i,i.hoisted,x.text,[x.text]);let w=`jx-${Et(d.map((x)=>x.key).join("|"))}`,y=d.map((x)=>x.text.replaceAll(As,`[data-jx="${w}"]`));if(y.length>0)if(e.dataset.jx=w,o)i.scratch??=ei(s),i.scratchOwners.set(e,y),ti(i);else Ps(i,i.interned,w,y);let h={doc:s,hoisted:m.map((x)=>x.text),interned:y.length>0&&!o?w:null,state:i,stop:null,uid:w,vars:u.map((x)=>x.name)};if(u.length>0){let x=Ge();x.run(()=>{for(let{name:S,value:A}of u)G(()=>{let C=U(A)?Y(A.$ref,r):ke(A,r);e.style.setProperty(S,dn(String(C??"")))})}),h.stop=()=>x.stop()}pn.set(e,h),Qt(()=>mn(e,h),!0)}var Zl=new Set(["contenteditable","draggable","spellcheck"]);function Ql(e,t){let n=e.toLowerCase();if(n.startsWith("aria-")||Zl.has(n))return String(t);return t?"":null}function vn(e,t,n){for(let[r,o]of Object.entries(t)){let s=Ml(e,r),i=(a)=>{if(a===null||a===void 0){e.removeAttribute(s);return}if(typeof a==="boolean"){let c=Ql(s,a);if(c===null)e.removeAttribute(s);else e.setAttribute(s,c);return}e.setAttribute(s,Cr(e.tagName,r,String(a)))};if(U(o))G(()=>i(Y(o.$ref,n)));else if(le(o))G(()=>i(Bl(o,n)));else i(o)}}function vr(e,t,n,r){let o=r?._path??[],s=document.createComment("jx-array");e.append(s);let{items:i,map:a,filter:c,sort:l,key:u}=t,f=U(u)?u.$ref:null,d=Qe,m=!1,w=(v)=>{if(!m)m=!0,console.warn(`Jx $map: ${v}`)},y=[],h=(v)=>{v.scope.stop(),v.node.remove()},x=(v,P,E)=>{let _=Yo({index:E,item:P}),R=Object.create(n);R.$map=_,Object.defineProperty(R,"$map/item",{enumerable:!0,get:()=>_.item}),Object.defineProperty(R,"$map/index",{enumerable:!0,get:()=>_.index});let I=Ge(!0),te=r?{...r,_path:[...o,"map",E]}:void 0,b=I.run(()=>de(a,R,te));return{key:v,map:_,node:b,scope:I}},S=(v,P)=>{let E=new Map;for(let I of y)E.set(I.key,I);let _=[];for(let I=0;I<v.length;I++){let te=P[I],b=v[I],k=E.get(te);if(k){if(E.delete(te),k.map.item!==b)k.map.item=b;if(k.map.index!==I)k.map.index=I,r?.onNodeMoved?.(k.node,[...o,"map",I]);_.push(k)}else _.push(x(te,b,I))}for(let I of E.values())h(I);let R=y.find((I)=>!E.has(I.key))?.node??s;for(let I of _){if(I.node===R){R=R.nextSibling??s;continue}R.before(I.node)}y=_},A=()=>{let v=U(i)?Y(i.$ref,n):i;if(Array.isArray(v)&&U(c)){let R=Y(c.$ref,n);if(typeof R==="function")v=v.filter(R)}if(Array.isArray(v)&&U(l)){let R=Y(l.$ref,n);if(typeof R==="function")v=[...v].toSorted(R)}let P=Array.isArray(v)&&a?v:[],E=P.map((R,I)=>ec(f,R,I,w)),_=new Set;for(let R=0;R<E.length;R++)if(_.has(E[R]))w(`duplicate key ${String(E[R])} — every occurrence after the first is rebuilt on each change`),E[R]={duplicate:R};else _.add(E[R]);en();try{gn(Sr(d),()=>S(P,E))}finally{tn()}},C=!1,T=!1,g=G(A,{scheduler:()=>{if(C)return;C=!0,queueMicrotask(()=>{if(C=!1,!T)g()})}});Qt(()=>{T=!0;for(let v of y)h(v);y=[]},!0)}function ec(e,t,n,r){if(e===null)return n;if(e==="$map/item")return t;if(e.startsWith("$map/item/")){let o=fe(t,e.slice(10));if(o===void 0||o===null)return r(`key "${e}" is empty for some items — those rows fall back to their index`),n;return o}return r(`key "${e}" is not a $map/item pointer — rows fall back to their index`),n}function Nr(e,t){if(typeof e==="string")return e;if(!Vn(e))return"div";let n=e.$expression;if(n.operator==="?:")return Je(n.target,t,null)?n.value:n.initial;let r=Je(n.target,t,null);return n.cases[String(r)]??n.default}function tc(e,t,n){let r=n?._path??[],o=document.createElement(Nr(e.tagName,t)),s=Qe;if(n?.onNodeCreated)n.onNodeCreated(o,r,e,t);Rr(o,e,t),wn(o,e.style??{},t.$media??{},t),vn(o,e.attributes??{},t);let i=0,a=null,c=null,l=()=>{a?.stop(),a=null};return G(()=>{if(!U(e.$switch)){l(),o.replaceChildren(),i+=1;return}let u=String(Y(e.$switch.$ref,t));if(u===c)return;c=u,l(),o.replaceChildren(),i+=1;let f=e.cases?.[u];if(!f)return;let d=i,m=Ge(!0);a=m;let w=n?{...n,_path:[...r,"cases",u]}:void 0;if(U(f)){let{href:y}=new URL(f.$ref,n?._ctx?.base??location.href);kr(y,n?._ctx).then(async(h)=>{if(d!==i)return;let x=await bn(h,{},y,n?._ctx);if(d!==i)return;o.replaceChildren(),gn(Sr(s),()=>m.run(()=>o.append(de(h,x,w))))}).catch((h)=>console.error("Jx $switch: failed to load external case",f.$ref,h));return}en();try{gn(Sr(s),()=>m.run(()=>o.append(de(f,t,w))))}finally{tn()}}),Qt(l,!0),o}async function nc(e,t,n,r,o){if(e.$src)return rc(e,t,n,r);switch(e.$prototype){case"Request":{let s=ue(null),i=e.debounce??0,a=null;if(!e.manual&&!(o?.skipAutoRequests??Is.skip))G(()=>{let c;if(le(e.url))c=ke(e.url,t);else({url:c}=e);if(!c||c==="undefined"||c.includes("undefined"))return;let l=new AbortController;nn(()=>{if(l.abort(),a!==null)clearTimeout(a)});let u=()=>fetch(c,{method:e.method??"GET",signal:l.signal,...e.headers&&{headers:e.headers},...e.body&&{body:typeof e.body==="object"?JSON.stringify(e.body):e.body}}).then((f)=>f.ok?f.json():Promise.reject(f.statusText)).then((f)=>{s.value=f}).catch((f)=>{if(!(f instanceof Error&&f.name==="AbortError"))s.value={error:String(f)}});if(i>0)a=setTimeout(u,i);else u()});return s}case"URLSearchParams":return bt(()=>{let s={};for(let[i,a]of Object.entries(e))if(i!=="$prototype")s[i]=U(a)?Y(a.$ref,t):le(a)?ke(a,t):a;return new URLSearchParams(s).toString()});case"LocalStorage":case"SessionStorage":{let s=e.$prototype==="LocalStorage"?localStorage:sessionStorage,i=e.key??n,a;try{let l=s.getItem(i);a=l!==null?JSON.parse(l):e.default??null}catch{a=e.default??null}let c=ue(a);return G(()=>{let l=c.value;if(l===null)try{s.removeItem(i)}catch{}else try{s.setItem(i,JSON.stringify(l))}catch{}}),c}case"Cookie":{let s=e.name??n,a=ue((()=>{let c=vs(document.cookie,s);if(c===null)return null;try{return JSON.parse(decodeURIComponent(c))}catch{return c}})()??e.default??null);return G(()=>{document.cookie=Ss(s,a.value,e)}),a}case"IndexedDB":{let s=ue(null),{database:i,store:a,version:c=1,keyPath:l="id",autoIncrement:u=!0,indexes:f=[]}=e;if(!i||!a)throw Error(`Jx: IndexedDB entry '${n}' requires database and store`);let d=indexedDB.open(i,c);return d.addEventListener("upgradeneeded",(m)=>{let w=m.target.result;if(!w.objectStoreNames.contains(a)){let y=w.createObjectStore(a,{autoIncrement:u,keyPath:l});for(let h of f)y.createIndex(h.name,h.keyPath,{unique:h.unique??!1})}}),d.addEventListener("success",(m)=>{let w=m.target.result;s.value={database:i,getStore:(y="readwrite")=>Promise.resolve(w.transaction(a,y).objectStore(a)),isReady:!0,store:a,version:c}}),d.addEventListener("error",()=>{s.value={error:d.error?.message}}),s}case"Set":return new Set(Array.isArray(e.default)?e.default:[]);case"Map":return new Map(Object.entries(se(e.default)?e.default:{}));case"FormData":{let s=new FormData;for(let[i,a]of Object.entries(e.fields??{}))s.append(i,a);return s}case"Blob":return new Blob(e.parts??[],{type:typeof e.type==="string"?e.type:"text/plain"});case"ReadableStream":return null;default:return console.warn(`Jx: unknown $prototype "${e.$prototype}" for "${n}". Did you mean to add '$src'?`),ue(null)}}var Mr=new Set(["$prototype","$src","$export","timing","default","description","body","parameters","arguments","name"]);async function rc(e,t,n,r){let o=e.$src;if(!o||!o.endsWith(".class.json"))throw Error(`Jx: $prototype "${e.$prototype}" requires a .class.json $src, got "${o}". Wrap the class in a .class.json schema with $implementation.`);return sc(e,t,n,r)}async function oc(e,t,n,r){let o,s=Pr(t);if(s instanceof Promise)o=await s;else if(s)o=s;else{try{o=await import(t)}catch{if(r)o=await import(new URL(t,r).href);else throw Error(`Failed to import "${t}"`)}et.set(t,o)}let i=o[n]??o.default?.[n];if(!i)throw Error(`Jx: export "${n}" not found in "${t}"`);if(typeof i!=="function")throw TypeError(`Jx: "${n}" from "${t}" is not a class`);let a={};for(let[d,m]of Object.entries(e))if(!Mr.has(d))a[d]=m;let l=new i(a),u;if(typeof l.resolve==="function")u=await l.resolve();else if("value"in l)({value:u}=l);else u=l;let f=ue(u);if(typeof l.subscribe==="function")l.subscribe((d)=>{f.value=d});return f}async function sc(e,t,n,r){let o=e.$src,s;if(!o.startsWith(".")&&!o.startsWith("/")&&!o.startsWith("http")&&!o.startsWith("file:"))return un(e,t,n,r);try{let d=r?new URL(o,r).href:o,m=await fetch(d);if(!m.ok)throw Error(`HTTP ${m.status}`);s=await m.json()}catch{return un(e,t,n,r)}if(s.$implementation){if(JSON.stringify(s).includes('"#/$context/'))return un(e,t,n,r);let m=r?new URL(o,r).href:new URL(o,location.href).href,w=new URL(s.$implementation,m).href,y=e.$export??s.title??e.$prototype;try{return await oc(e,w,y,r)}catch{return un(e,t,n,r)}}let a=ic(s),c={};for(let[d,m]of Object.entries(e))if(!Mr.has(d))c[d]=m;let l=new a(c),u;if(typeof l.resolve==="function")u=await l.resolve();else if("value"in l)({value:u}=l);else u=l;let f=ue(u);if(typeof l.subscribe==="function")l.subscribe((d)=>{f.value=d});return f}function ic(e){let t=e.$defs?.fields??{},n=e.$defs?.constructor,r=typeof n==="object"?n:void 0,o=e.$defs?.methods??{};class s{constructor(a={}){for(let[c,l]of Object.entries(t)){let u=l.identifier??c,f=l.access==="private"?`_${u}`:u;if(a[u]!==void 0)this[f]=a[u];else if(l.initializer!==void 0)this[f]=l.initializer;else if(l.default!==void 0)this[f]=structuredClone(l.default);else this[f]=null}if(r?.body){let c=Array.isArray(r.body)?r.body.join(`
|
|
8
|
-
`):
|
|
9
|
-
`):c.body??"";if(c.role==="accessor"){let d={};if(c.getter)d.get=Function(c.getter.body??"");if(c.setter){let m=(c.setter.parameters??[]).map((w)=>w.$ref?.split("/").pop()??"v");d.set=Function(...m,c.setter.body??"")}Object.defineProperty(s.prototype,l,{...d,configurable:!0})}else if(c.scope==="static")s[l]=Function(...u,f);else s.prototype[l]=Function(...u,f)}return Object.defineProperty(s,"name",{configurable:!0,value:e.title}),s}async function un(e,t,n,r){let o={};for(let[c,l]of Object.entries(e))if(!Mr.has(c))o[c]=l;let s=Object.values(o).some((c)=>le(c)),i=(c)=>fetch(Hs("/__jx_resolve__"),{body:JSON.stringify({$base:r,$export:e.$export,$prototype:e.$prototype,$src:e.$src,...c}),headers:{"Content-Type":"application/json"},method:"POST"}).then((l)=>{if(!l.ok)throw Error(`Jx dev proxy ${l.status} for "${n}"`);return l.json()}),a=ue(null);if(s)G(()=>{let c={};for(let[l,u]of Object.entries(o))c[l]=le(u)?ke(u,t):u;i(c).then((l)=>{a.value=l}).catch((l)=>console.error("Jx dev proxy:",l))});else i(o).then((c)=>{a.value=c}).catch((c)=>console.error("Jx dev proxy:",c));return a}function si(e,t,n){let r=0;return(o)=>{r+=1;let s=r;new Promise((i)=>{i(t(o))}).then((i)=>{if(s===r)e.value=i}).catch((i)=>{if(s===r)console.error(n,i)})}}async function ac(e,t,n,r){let{$src:o,$export:s}=e,i=Ys.has(o)?Pr(o):void 0;if(!i)return lc(e,t,n,r);let a=i instanceof Promise?await i:i,c=a[s]??a.default?.[s];if(!c)throw Error(`Jx: export "${s}" not found in "${o}" for "${n}"`);if(typeof c!=="function")throw TypeError(`Jx: "${s}" from "${o}" is not a function`);let l=c,u=e.arguments??{},f=Object.values(u).some((w)=>U(w)),d=()=>{let w={};for(let[y,h]of Object.entries(u))w[y]=U(h)?Y(h.$ref,t):h;return w},m=ue(null);if(f){let w=si(m,l,"Jx server function:");G(()=>{let y=d();nn(()=>{}),w(y)})}else m.value=await l(d());return m}async function lc(e,t,n,r){let o=e.arguments??{},s=Object.values(o).some((u)=>U(u)),i=()=>{let u={};for(let[f,d]of Object.entries(o))u[f]=U(d)?Y(d.$ref,t):d;return u},a=(u)=>fetch(Hs("/__jx_server__"),{body:JSON.stringify({$base:r,$export:e.$export,$src:e.$src,arguments:u}),headers:{"Content-Type":"application/json"},method:"POST"}).then((f)=>{if(!f.ok)throw Error(`Jx server proxy ${f.status} for "${n}"`);return f.json()}),c=ue(null),l=si(c,a,"Jx server proxy:");if(s)G(()=>{let u=i();nn(()=>{}),l(u)});else l(i());return c}function Y(e,t){if(typeof e!=="string")return e;if(e.startsWith("$map/")||e.startsWith("#/$map/")){let n=(e.startsWith("#/")?e.slice(2):e).split("/"),[,r]=n,s=t.$map?.[r]??t[`$map/${r}`];return n.length>2?yr(s,n.slice(2).join("/")):s}if(e.startsWith("#/state/"))return fe(t,e.slice(8));if(e.startsWith("parent#/"))return fe(t,e.slice(8));if(e.startsWith("window#/"))return yr(globalThis.window,e.slice(8));if(e.startsWith("document#/"))return yr(globalThis.document,e.slice(10));return fe(t,e)??null}function U(e){return De(e)}function yr(e,t){return fe(e,t)}function Rs(e,t,n,r){let o=t.replaceAll(/-([a-z])/g,(i,a)=>a.toUpperCase()),s=e[o];if(typeof s==="boolean"){e[o]=n!==null&&n!=="false";return}if(n===null){let i=r?.get(o);e[o]=i===void 0?typeof s==="number"?0:"":i;return}e[o]=typeof s==="number"?Number(n):n}function cc(e){let t=new Map;for(let[n,r]of Object.entries(e.state??{})){if(r!==null&&typeof r==="object"){let o=r;if("default"in o){t.set(n,o.default);continue}if(uc.some((s)=>(s in o)))continue}t.set(n,r)}return t}var uc=["$expression","$prototype","$ref","$src"],$s=new Set;function fc(e,t){if(Object.hasOwn(e,t))return!0;if(e.hasAttribute(t))return!0;let n=t.replaceAll(/[A-Z]/gu,(r)=>`-${r.toLowerCase()}`);return n!==t&&e.hasAttribute(n)}function hn(e,t){if(!Vt(e))return!1;let n=t===void 0?e:`${t}:${e}`;if(!$s.has(n))$s.add(n),console.warn(`Jx: "${e}" is private state (spec.md §5.6) and cannot be set through $props`+`${t===void 0?"":` (${t})`}. The write was ignored; rename the entry without the leading # to make it part of the component's interface.`);return!0}function dc(e,t){let n=Object.create(t);for(let[r,o]of Object.entries(e.$props??{})){if(hn(r,"$props"))continue;n[r]=U(o)?Y(o.$ref,t):o}return n}var ii={},At=new Map;async function ai(e,t){let n=t??location.href,{tagName:r}=e;if(!r||!r.includes("-"))throw Error(`Jx redefineElement: tagName "${r}" must contain a hyphen`);if(!customElements.get(r)){await Rt(e,n);return}if(e.$elements)await _r(e.$elements,n);let o=At.get(r)?.doc.observedAttributes??[],s=e.observedAttributes??[];if(JSON.stringify(o)!==JSON.stringify(s))console.warn(`Jx redefineElement: <${r}> keeps observedAttributes [${o.join(", ")}] as first defined; [${s.join(", ")}] takes effect only in a fresh realm`);At.set(r,{base:n,doc:e})}function li(e){ii=e??{}}async function _r(e,t,n){for(let r of e){if(typeof r==="string"){try{await import(r.startsWith("/")||r.startsWith(".")?r:`/node_modules/${r}`)}catch(i){console.warn(`Jx: failed to import package "${r}"`,i)}continue}if(!U(r))continue;let{href:o}=new URL(r.$ref,t),s=await kr(o,n);if(!s.tagName||!s.tagName.includes("-"))continue;if(customElements.get(s.tagName))continue;if(s.$elements)await _r(s.$elements,o,n);await Rt(s,o)}}var Ns=32,pc={expansion:0,frames:[]},Qe=pc;function gn(e,t){let n=Qe;Qe=e;try{return t()}finally{Qe=n}}function Sr(e){return{expansion:e.frames.length,frames:e.frames}}function mc(e,t){if(Object.is(e,t))return!0;if(!Ms(e)||!Ms(t))return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}function Ms(e){if(typeof e!=="object"||e===null)return!1;let t=j(e);if(Array.isArray(t))return!0;let n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}function hc(e,t){if(e.tag!==t.tag)return!1;let n=Object.keys(e.props);if(n.length!==Object.keys(t.props).length)return!1;return n.every((r)=>Object.hasOwn(t.props,r)&&mc(e.props[r],t.props[r]))}function gc(e,t){let n=[...e.frames.map((r)=>r.tag),t.tag].join(" → ");if(e.frames.slice(e.expansion).some((r)=>hc(r,t)))throw Error(`Component <${t.tag}> renders itself: ${n}. A component cannot appear inside its own `+"definition with the same props — the expansion would never end.");if(e.frames.length>=Ns)throw Error(`Component nesting exceeds ${Ns} levels: ${n}. A component that renders itself with changing props needs a case that stops.`);return{expansion:e.expansion,frames:[...e.frames,t]}}var _s=new Set;async function Rt(e,t){let n=t,r=e;if(typeof e==="string"){if(n=new URL(e,n??location.href).href,_s.has(n))return;_s.add(n),r=await kr(e)}n??=location.href;let o=r,{tagName:s}=o;if(!s||!s.includes("-"))throw Error(`Jx defineElement: tagName "${s}" must contain a hyphen`);if(customElements.get(s))return;if(o.$elements)await _r(o.$elements,n);At.set(s,{base:n,doc:o});let i=o,a=n,c=i.observedAttributes??[],l=class extends HTMLElement{_jxInitialized=!1;_state=null;static get observedAttributes(){return c}async connectedCallback(){if(this.dataset.jxDefinitionRoot!==void 0)return;if(this._jxInitialized)return;this._jxInitialized=!0;let u=Qe,f={},d=At.get(s)??{base:a,doc:i},{doc:m,base:w}=d,y=await bn(m,{},w,{base:w,media:null,root:this});for(let E of c)if(this.hasAttribute(E))Rs(y,E,this.getAttribute(E)),f[E]=this.getAttribute(E);let h=this.dataset.jxProps;if(h){try{let E=JSON.parse(h);for(let[_,R]of Object.entries(E)){if(hn(_,"data-jx-props"))continue;if(_ in(m.state??{}))y[_]=R,f[_]=R}}catch{}delete this.dataset.jxProps}let x=this.getAttributeNames().filter((E)=>E.startsWith("props.")&&E.length>6);for(let E of x){let _=E.slice(6);if(hn(_,"props.* attribute")){this.removeAttribute(E);continue}if(_ in(m.state??{}))y[_]=this.getAttribute(E),f[_]=this.getAttribute(E),this.removeAttribute(E)}for(let E of Object.keys(m.state??{})){if(Vt(E))continue;if(E in this&&this[E]!==void 0&&fc(this,E))y[E]=this[E],f[E]=this[E]}let S;try{S=gc(u,{props:f,tag:s})}catch(E){if(this.replaceChildren(),!this.isConnected)return;console.error(`Jx: <${s}> was not rendered:`,E),this.dispatchEvent(new ErrorEvent("jx-error",{bubbles:!0,composed:!0,error:E,message:E instanceof Error?E.message:String(E)}));return}for(let E of Object.keys(m.state??{})){if(Vt(E))continue;if(!(E in HTMLElement.prototype))Object.defineProperty(this,E,{configurable:!0,get:()=>y[E],set:(_)=>{y[E]=_}})}this._state=y;let A=[...this.childNodes];this.replaceChildren();let C=Xl(m.style)?m.style:{display:"block",...m.style},T=ri(C,$r.get(this));if(wn(this,T,y.$media??{},y),vn(this,m.attributes??{},y),zl(this,m,y),!Array.isArray(m.children)&&m.textContent!==void 0)Qs(this,"textContent",m.textContent,y);let g=Array.isArray(m.children)?m.children:[],v=fn;fn||=this.dataset.jxPath!==void 0;try{gn(S,()=>{for(let E of g)this.append(de(E,y))})}finally{fn=v}xc(this,A);let{onMount:P}=y;if(typeof P==="function")queueMicrotask(()=>P(y,this))}disconnectedCallback(){if(typeof this._state?.onUnmount==="function")this._state.onUnmount(this._state)}adoptedCallback(){if(typeof this._state?.onAdopted==="function")this._state.onAdopted(this._state)}attributeChangedCallback(u,f,d){if(!this._state||f===d)return;Rs(this._state,u,d,cc(At.get(s)?.doc??i))}};customElements.define(s,l)}function Os(e,t,n,r){let o=document.createElement(Nr(e.tagName,t));if(n?.onNodeCreated)n.onNodeCreated(o,r??[],e,t);for(let[i,a]of Object.entries(e.$props??{})){if(hn(i,"$props"))continue;let c=(l)=>{o[i]=typeof l==="string"?Cr(o.tagName,i,l):l};if(U(a)){let l=a;c(Y(l.$ref,t)),G(()=>{c(Y(l.$ref,t))})}else if(le(a))G(()=>{c(ke(a,t))});else c(a)}if(e.style)$r.set(o,e.style);wn(o,e.style??{},t.$media??{},t),vn(o,e.attributes??{},t),Rr(o,e,t);let s=Array.isArray(e.children)?e.children:[];for(let i=0;i<s.length;i++){let a=s[i],c=n&&r?{...n,_path:[...r,"children",i]}:void 0;if(Kt(a))vr(o,a,t,c);else o.append(de(a,t,c))}return o}function xc(e,t){let n=e.querySelectorAll("slot");if(n.length===0)return;let r=new Map,o=[];for(let s of t)if(s.nodeType===Node.ELEMENT_NODE&&s.getAttribute("slot")){let i=s.getAttribute("slot");if(!r.has(i))r.set(i,[]);r.get(i).push(s)}else o.push(s);for(let s of n){let i=s.getAttribute("name"),a=i?r.get(i)??[]:o;s.replaceWith(...a.length>0?a:[...s.childNodes])}}function yc(e,t){if(typeof t!=="string"||t==="")return e;let n=e.indexOf("#"),r=n===-1?"":e.slice(n),o=n===-1?e:e.slice(0,n),s=o.indexOf("?"),i=s===-1?o:o.slice(0,s),c=(s===-1?[]:o.slice(s+1).split("&")).filter((l)=>l!==""&&!bc(l));return c.push(`v=${encodeURIComponent(t)}`),`${i}?${c.join("&")}${r}`}function bc(e){let t=e.indexOf("="),n=t===-1?e:e.slice(0,t);if(n==="v")return!0;if(!n.includes("%"))return!1;try{return decodeURIComponent(n)==="v"}catch{return!1}}function wc(e,t){if(!e||!Object.hasOwn(e,t))return;let n=e[t];return typeof n==="string"?n:void 0}function $t(e,t){if(!t||e==="")return null;if(t.space==="repo"){if(!t.fileBaseUrl)return null;let r=ys(e,t.documentDir,t.mounts,t.lanes);if(r===null)return null;let{suffix:o}=Tt(e);return yc(`${t.fileBaseUrl}${bs(r)}${o}`,wc(t.versions,r))}let[n]=t.mounts;return n?Ec(e,t.documentDir,n):null}function Ec(e,t,n){if(mr(e))return null;let{path:r,suffix:o}=Tt(e),s;try{s=decodeURIComponent(r)}catch{return null}let i=gr(t,s);if(i===null)return null;let a=xs([n],i);if(!a)return null;return`${a}${o}`}function je(e){return`[data-jx-path='${e.replaceAll("\\",String.raw`\\`).replaceAll("'",String.raw`\'`)}']`}function vc(e,t){if(!t)return!1;return e.length<=t.length&&e.every((n,r)=>t[r]===n)}function ci(e,t,n){let r=n.layoutWrapped&&typeof t==="object"?t?.$__layout:void 0;if(r){let s=typeof r==="object"?r:{};return{chrome:e.length>0&&!vc(e,n.pageContentPrefix),kind:"layout",layoutFile:typeof s.file==="string"?s.file:"",layoutPath:Array.isArray(s.path)?s.path:[]}}let o=e;if(n.layoutWrapped&&n.pageContentPrefix){let s=n.pageContentPrefix;if(e.length>=s.length&&s.every((i,a)=>e[a]===i)){let i=e.slice(s.length),[a]=i;o=typeof a==="number"?["children",a-(n.pageContentOffset??0),...i.slice(1)]:["children",...i]}}if(n.arrayPaths.size>0){let s=!0;while(s){s=!1;for(let i=1;i<o.length-1;i++)if(o[i]==="children"&&o[i+1]===0&&n.arrayPaths.has(o.slice(0,i).join("/"))){o=[...o.slice(0,i),"map",...o.slice(i+2)],s=!0;break}}}return{kind:"path",path:o}}function J(e){return JSON.stringify(e)}function q(e){return JSON.parse(e)}function ui(e){if(e.dataset.jxDefinitionRoot!==void 0)return!1;return e.getAttribute("contenteditable")==="false"||e.tagName.includes("-")}function Sn(e,t){let n=e instanceof Element?e:e?.parentElement??null;while(n){if(n instanceof HTMLElement){if(n.dataset.jxPath&&t(n))return{el:n,path:q(n.dataset.jxPath)};if(ui(n))return null}n=n.parentElement}return null}function kn(e,t){let n=e.querySelector(je(J(t)));return n instanceof HTMLElement?n:null}function Or(e){return e.textContent?.length??0}function Sc(e,t,n){if(!e.contains(t))return null;let r=e.ownerDocument.createRange();r.setStart(e,0);try{r.setEnd(t,n)}catch{return null}return r.toString().length}function kc(e,t){let n=Math.max(0,Math.min(t,Or(e))),r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=0,s=null,i=r.nextNode();while(i){let a=i.length;if(o+a>=n)return{node:i,offset:n-o};o+=a,s=i,i=r.nextNode()}return s?{node:s,offset:s.length}:{node:e,offset:0}}function Nt(e,t,n){let r=Sn(e,n);if(!r||!e)return null;let o=Sc(r.el,e,t);return o===null?null:{offset:o,path:r.path}}function Dr(e,t){let n=kn(e,t.path);return n?kc(n,t.offset):null}function fi(e){return e.offset<=0}function Mt(e,t){return J(e.path)===J(t.path)}function Lr(e,t){let n=[];for(let r of e.querySelectorAll("[data-jx-path]"))if(t(r)&&!Tc(r,e))n.push(r);return n}function Tc(e,t){let n=e.parentElement;while(n&&n!==t){if(ui(n))return!0;n=n.parentElement}return!1}function di(e,t,n,r){let o=Lr(e,r),s=J(t),i=o.findIndex((c)=>c.dataset.jxPath===s),a=i===-1?void 0:o[i+n];return a?{el:a,path:q(a.dataset.jxPath)}:null}var Ir="jx-site-style";function pi(e,t,n,r){let o=[],s=(u,f)=>{for(let d of kt(u,{mediaQueries:t,scope:f,transposeValue:n,...r?{resolveValue:(m,w)=>r(m,w,f)}:{}}))o.push(d.text)},i={},a={},c=[],l=[];for(let[u,f]of Object.entries(e)){if(f!==null&&typeof f==="object"&&!Array.isArray(f)){if(u.startsWith("@"))c.push([u,f]);else if(!u.startsWith("--"))l.push([u,f]);continue}if(St(u)||u.startsWith("@"))continue;if(u.startsWith("--")||u==="colorScheme"||u==="color-scheme")i[u]=f;else a[u]=f}s(i,":root"),s(a,"body");for(let[u,f]of l)if(u.startsWith("&"))s({[u]:f},":root");else s(f,u);for(let[u,f]of c){if(wt(u)||vt(u)){s({[u]:f},null);continue}let d={},m={},w=[];for(let[y,h]of Object.entries(f)){if(h!==null&&typeof h==="object"&&!Array.isArray(h)){if(!y.startsWith("@"))w.push([y,h]);continue}if(y.startsWith("--"))d[y]=h;else m[y]=h}s({[u]:d},":root"),s({[u]:m},"body");for(let[y,h]of w)s({[u]:h},y)}if(Object.values(t).some((u)=>an(u)!==null)&&!("colorScheme"in e))o.push(":root { color-scheme: light dark }",`:root:where([${$e}="light"]) { color-scheme: light }`,`:root:where([${$e}="dark"]) { color-scheme: dark }`);return o.join(`
|
|
10
|
-
`)}async function
|
|
7
|
+
`)};return{detach(){o.remove()},insert(d){let p={rules:[],texts:d};return a.push(p),c(),p},remove(d){let p=a.indexOf(d);if(p!==-1)a.splice(p,1),c()},replaceAll(d){a.length=0,a.push({rules:[],texts:d}),c()},text(){return o.textContent}}}function Ss(o){let c=o.defaultView?.CSSStyleSheet;if(t(c)&&Array.isArray(o.adoptedStyleSheets))try{let p=new c;return o.adoptedStyleSheets=[...o.adoptedStyleSheets,p],Bi(p,()=>{o.adoptedStyleSheets=o.adoptedStyleSheets.filter((m)=>m!==p)})}catch{}let d=o.createElement("style");return d.dataset.jxSheet="",(Tc(o)??o.documentElement).append(d),d.sheet?Bi(d.sheet,()=>d.remove()):wc(d)}function Tc(o){return o.head}var Vt=new WeakMap;function Cc(o){let a=Vt.get(o);if(a)return a;let c={hoisted:new Map,interned:new Map,scratch:null,scratchOwners:new Map,serial:0,shared:Ss(o)};return Vt.set(o,c),c}var Pn=new WeakMap,Ki="\x01jx-scope\x01";function vs(o){o.scratch.replaceAll([...o.scratchOwners.values()].flat())}function Ui(o,a,c){let d=a.get(c);if(d.refs-=1,d.refs<=0)a.delete(c),o.shared.remove(d.inserted)}function qi(o,a,c,d){let p=a.get(c);if(p){p.refs+=1;return}a.set(c,{inserted:o.shared.insert(d),refs:1})}function Nn(o,a){let c=Pn.get(o);if(!c||a!==void 0&&c!==a)return;Pn.delete(o),c.stop?.();for(let p of c.vars)o.style.removeProperty(p);if(delete o.dataset.jx,Vt.get(c.doc)!==c.state)return;let{state:d}=c;if(c.interned===null){if(d.scratchOwners.delete(o))vs(d)}else Ui(d,d.interned,c.interned);for(let p of c.hoisted)Ui(d,d.hoisted,p)}function Es(o=document){let a=Vt.get(o);if(!a)return;Vt.delete(o);for(let c of a.scratchOwners.keys())Pn.delete(c),delete c.dataset.jx;a.scratchOwners.clear(),a.interned.clear(),a.hoisted.clear(),a.shared.detach(),a.scratch?.detach()}function Ac(o){return n(o)&&"display"in o}var Br=new WeakMap;function ws(o,a){if(!a)return o;let c={...o};for(let[d,p]of Object.entries(a)){let m=c[d];c[d]=F(p)&&n(m)?ws(Array.isArray(m)?Object.fromEntries(Object.entries(m)):m,p):p}return c}function Dn(o,a,c={},d={}){Ts(o,a,c,d,!1)}function Ln(o,a,c={},d={}){Ts(o,a??{},c,d,!0)}function Ts(o,a,c,d,p){Nn(o);let m=o.ownerDocument,h=Cc(m),g=(Lr||Ir)&&kr(o)?(L)=>Er(L,{dialog:o.tagName==="DIALOG"}):(L)=>L,E=-1,y=0,w=[],T=It(a,{mediaQueries:c,resolveValue:(L,z,G)=>{if(G==="self"&&L.startsWith("--"))return w.push({name:L,value:z}),null;if(E<0)({serial:E}=h),h.serial+=1;let Y=`--jx-r${E}-${y}`;return y+=1,w.push({name:Y,value:z}),`var(${Y})`},scope:Ki,transposeSelector:g,transposeValue:An});if(T.length===0&&w.length===0)return;let C=T.filter((L)=>L.target!=="unscoped"),_=T.filter((L)=>L.target==="unscoped");for(let L of _)qi(h,h.hoisted,L.text,[L.text]);let O=`jx-${Jt(C.map((L)=>L.key).join("|"))}`,K=C.map((L)=>L.text.replaceAll(Ki,`[data-jx="${O}"]`));if(K.length>0)if(o.dataset.jx=O,p)h.scratch??=Ss(m),h.scratchOwners.set(o,K),vs(h);else qi(h,h.interned,O,K);let k={doc:m,hoisted:_.map((L)=>L.text),interned:K.length>0&&!p?O:null,state:h,stop:null,uid:O,vars:w.map((L)=>L.name)};if(w.length>0){let L=ft();L.run(()=>{for(let{name:z,value:G}of w)be(()=>{let Y=r(G)?Se(G.$ref,d):We(G,d);o.style.setProperty(z,An(String(Y??"")))})}),k.stop=()=>L.stop()}Pn.set(o,k),mn(()=>Nn(o,k),!0)}var Pc=new Set(["contenteditable","draggable","spellcheck"]);function Nc(o,a){let c=o.toLowerCase();if(c.startsWith("aria-")||Pc.has(c))return String(a);return a?"":null}function In(o,a,c){for(let[d,p]of Object.entries(a)){let m=ic(o,d),h=(g)=>{if(g===null||g===void 0){o.removeAttribute(m);return}if(x(g)){let E=Nc(m,g);if(E===null)o.removeAttribute(m);else o.setAttribute(m,E);return}o.setAttribute(m,jr(o.tagName,d,String(g)))};if(r(p))be(()=>h(Se(p.$ref,c)));else if(l(p))be(()=>h(gc(p,c)));else h(p)}}function _r(o,a,c,d){let p=d?._path??[],m=document.createComment("jx-array");o.append(m);let{items:h,map:g,filter:E,sort:y,key:w}=a,T=r(w)?w.$ref:null,C=gt,_=!1,O=(B)=>{if(!_)_=!0,console.warn(`Jx $map: ${B}`)},K=[],k=(B)=>{B.scope.stop(),B.node.remove()},L=(B,ie,V)=>{let ne=di({index:V,item:ie}),X=Fr(c);X.$map=ne,Object.defineProperty(X,"$map/item",{enumerable:!0,get:()=>ne.item}),Object.defineProperty(X,"$map/index",{enumerable:!0,get:()=>ne.index});let re=ft(!0),Te=d?{...d,_path:[...p,"map",V]}:void 0,H=re.run(()=>Me(g,X,Te));return{key:B,map:ne,node:H,scope:re}},z=(B,ie)=>{let V=new Map;for(let re of K)V.set(re.key,re);let ne=[];for(let re=0;re<B.length;re++){let Te=ie[re],H=B[re],q=V.get(Te);if(q){if(V.delete(Te),q.map.item!==H)q.map.item=H;if(q.map.index!==re)q.map.index=re,d?.onNodeMoved?.(q.node,[...p,"map",re]);ne.push(q)}else ne.push(L(Te,H,re))}for(let re of V.values())k(re);let X=K.find((re)=>!V.has(re.key))?.node??m;for(let re of ne){if(re.node===X){X=X.nextSibling??m;continue}X.before(re.node)}K=ne},G=()=>{let B=r(h)?Se(h.$ref,c):h;if(Array.isArray(B)&&r(E)){let X=Se(E.$ref,c);if(t(X))B=B.filter(X)}if(Array.isArray(B)&&r(y)){let X=Se(y.$ref,c);if(t(X)){let re=X;B=[...B].toSorted(re)}}let ie=Array.isArray(B)&&g?B:[],V=ie.map((X,re)=>Rc(T,X,re,O)),ne=new Set;for(let X=0;X<V.length;X++)if(ne.has(V[X]))O(`duplicate key ${String(V[X])} — every occurrence after the first is rebuilt on each change`),V[X]={duplicate:X};else ne.add(V[X]);hn();try{On(Jr(C),()=>z(ie,V))}finally{gn()}},Y=!1,U=!1,P=be(G,{scheduler:()=>{if(Y)return;Y=!0,queueMicrotask(()=>{if(Y=!1,!U)P()})}});mn(()=>{U=!0;for(let B of K)k(B);K=[]},!0)}function Rc(o,a,c,d){if(o===null)return c;if(o==="$map/item")return a;if(o.startsWith("$map/item/")){let p=me(a,o.slice(10));if(p===void 0||p===null)return d(`key "${o}" is empty for some items — those rows fall back to their index`),c;return p}return d(`key "${o}" is not a $map/item pointer — rows fall back to their index`),c}function Kr(o,a){if(e(o))return o;if(!J(o))return"div";let c=o.$expression;if(c.operator==="?:")return tt(c.target,a,null)?c.value:c.initial;let d=tt(c.target,a,null);return c.cases[String(d)]??c.default}function $c(o,a,c){let d=c?._path??[],p=document.createElement(Kr(o.tagName,a)),m=gt;if(c?.onNodeCreated)c.onNodeCreated(p,d,o,a);Wr(p,o,a),Dn(p,o.style??{},Jn(a),a),In(p,o.attributes??{},a);let h=0,g=null,E=null,y=()=>{g?.stop(),g=null};return be(()=>{if(!r(o.$switch)){y(),p.replaceChildren(),h+=1;return}let w=String(Se(o.$switch.$ref,a));if(w===E)return;E=w,y(),p.replaceChildren(),h+=1;let T=o.cases?.[w];if(!T)return;let C=h,_=ft(!0);g=_;let O=c?{...c,_path:[...d,"cases",w]}:void 0;if(r(T)){let{href:K}=new URL(T.$ref,c?._ctx?.base??location.href);Dr(K,c?._ctx).then(async(k)=>{if(C!==h)return;let L=await _n(k,{},K,c?._ctx);if(C!==h)return;p.replaceChildren(),On(Jr(m),()=>_.run(()=>p.append(Me(k,L,O))))}).catch((k)=>console.error("Jx $switch: failed to load external case",T.$ref,k));return}hn();try{On(Jr(m),()=>_.run(()=>p.append(Me(T,a,O))))}finally{gn()}}),mn(y,!0),p}var Rn=ze;async function Oc(o,a,c,d,p){if(o.$src)return Mc(o,a,c,d);switch(o.$prototype){case"Request":{let m=ze(null),h=o.debounce??0,g=null;if(!o.manual&&!(p?.skipAutoRequests??ns.skip))be(()=>{let E;if(l(o.url))E=We(o.url,a);else({url:E}=o);if(!E||E==="undefined"||E.includes("undefined"))return;let y=new AbortController;xn(()=>{if(y.abort(),g!==null)clearTimeout(g)});let w=()=>fetch(E,{method:o.method??"GET",signal:y.signal,...o.headers&&{headers:o.headers},...o.body&&{body:n(o.body)?JSON.stringify(o.body):o.body}}).then((T)=>T.ok?T.json():Promise.reject(T.statusText)).then((T)=>{m.value=T}).catch((T)=>{if(!(T instanceof Error&&T.name==="AbortError"))m.value={error:String(T)}});if(h>0)g=setTimeout(w,h);else w()});return m}case"URLSearchParams":return Mt(()=>{let m={};for(let[h,g]of Object.entries(o))if(h!=="$prototype")m[h]=r(g)?Se(g.$ref,a):l(g)?We(g,a):g;return new URLSearchParams(m).toString()});case"LocalStorage":case"SessionStorage":{let m=o.$prototype==="LocalStorage"?localStorage:sessionStorage,h=o.key??c,g;try{let y=m.getItem(h);g=y!==null?JSON.parse(y):o.default??null}catch{g=o.default??null}let E=Rn(g);return be(()=>{let y=E.value;if(y===null)try{m.removeItem(h)}catch{}else try{m.setItem(h,JSON.stringify(y))}catch{}}),E}case"Cookie":{let m=o.name??c,g=Rn((()=>{let E=Hi(document.cookie,m);if(E===null)return null;try{return JSON.parse(decodeURIComponent(E))}catch{return E}})()??o.default??null);return be(()=>{document.cookie=Fi(m,g.value,o)}),g}case"IndexedDB":{let m=ze(null),{database:h,store:g,version:E=1,keyPath:y="id",autoIncrement:w=!0,indexes:T=[]}=o;if(!h||!g)throw Error(`Jx: IndexedDB entry '${c}' requires database and store`);let C=indexedDB.open(h,E);return C.addEventListener("upgradeneeded",(_)=>{let O=_.target.result;if(!O.objectStoreNames.contains(g)){let K=O.createObjectStore(g,{autoIncrement:w,keyPath:y});for(let k of T)K.createIndex(k.name,k.keyPath,{unique:k.unique??!1})}}),C.addEventListener("success",(_)=>{let O=_.target.result;m.value={database:h,getStore:(K="readwrite")=>Promise.resolve(O.transaction(g,K).objectStore(g)),isReady:!0,store:g,version:E}}),C.addEventListener("error",()=>{m.value={error:C.error?.message}}),m}case"Set":return new Set(Array.isArray(o.default)?o.default:[]);case"Map":return new Map(Object.entries(i(o.default)?o.default:{}));case"FormData":{let m=new FormData;for(let[h,g]of Object.entries(o.fields??{}))m.append(h,g);return m}case"Blob":{let m=o.parts;return new Blob(m??[],{type:e(o.type)?o.type:"text/plain"})}case"ReadableStream":return null;default:return console.warn(`Jx: unknown $prototype "${o.$prototype}" for "${c}". Did you mean to add '$src'?`),ze(null)}}var kc=new Set(["$prototype","$src","$export","timing","default","description","body","parameters","arguments","name"]);function Ur(o){let a={};for(let[c,d]of Object.entries(o))if(!kc.has(c))a[c]=d;return a}async function Mc(o,a,c,d){let p=o.$src;if(!p||!p.endsWith(".class.json"))throw Error(`Jx: $prototype "${o.$prototype}" requires a .class.json $src, got "${p}". Wrap the class in a .class.json schema with $implementation.`);return Jc(o,a,c,d)}async function _c(o,a,c,d){let p,m=Hr(a);if(m instanceof Promise)p=await m;else if(m)p=m;else{try{p=await Ht(a)}catch{if(d){let w=new URL(a,d).href;p=await Ht(w)}else throw Error(`Failed to import "${a}"`)}xt.set(a,p)}let h=p[c]??p.default?.[c];if(!h)throw Error(`Jx: export "${c}" not found in "${a}"`);if(!t(h))throw TypeError(`Jx: "${c}" from "${a}" is not a class`);let g=new h(Ur(o)),E=t(g.resolve)?await g.resolve():("value"in g)?g.value:g,y=Rn(E);if(t(g.subscribe))g.subscribe((w)=>{y.value=w});return y}async function Jc(o,a,c,d){let p=o.$src,m;if(!p.startsWith(".")&&!p.startsWith("/")&&!p.startsWith("http")&&!p.startsWith("file:"))return Tn(o,a,c,d);try{let T=d?new URL(p,d).href:p,C=await fetch(T);if(!C.ok)throw Error(`HTTP ${C.status}`);m=await C.json()}catch{return Tn(o,a,c,d)}if(m.$implementation){if(JSON.stringify(m).includes('"#/$context/'))return Tn(o,a,c,d);let C=d?new URL(p,d).href:new URL(p,location.href).href,_=new URL(m.$implementation,C).href,O=o.$export??m.title??o.$prototype;try{return await _c(o,_,O,d)}catch{return Tn(o,a,c,d)}}let E=new(Lc(m))(Ur(o)),y=t(E.resolve)?await E.resolve():("value"in E)?E.value:E,w=Rn(y);if(t(E.subscribe))E.subscribe((T)=>{w.value=T});return w}function Dc(o){return n(o)}function Lc(o){let a=o.$defs?.fields??{},c=o.$defs?.constructor,d=Dc(c)?c:void 0,p=o.$defs?.methods??{};class m{constructor(h={}){for(let[g,E]of Object.entries(a)){let y=E.identifier??g,w=E.access==="private"?`_${y}`:y;if(h[y]!==void 0)this[w]=h[y];else if(E.initializer!==void 0)this[w]=E.initializer;else if(E.default!==void 0)this[w]=structuredClone(E.default);else this[w]=null}if(d?.body){let g=Array.isArray(d.body)?d.body.join(`
|
|
8
|
+
`):d.body;Function("config",g).call(this,h)}}}for(let[h,g]of Object.entries(p)){let E=g.identifier??h,y=(g.parameters??[]).map((T)=>{if(T.$ref)return T.$ref.split("/").pop()??"";let C=T.identifier??T.name;return e(C)?C:"arg"}),w=Array.isArray(g.body)?g.body.join(`
|
|
9
|
+
`):g.body??"";if(g.role==="accessor"){let T={};if(g.getter)T.get=Function(g.getter.body??"");if(g.setter){let C=(g.setter.parameters??[]).map((_)=>_.$ref?.split("/").pop()??"v");T.set=Function(...C,g.setter.body??"")}Object.defineProperty(m.prototype,E,{...T,configurable:!0})}else if(g.scope==="static")m[E]=Function(...y,w);else m.prototype[E]=Function(...y,w)}return Object.defineProperty(m,"name",{configurable:!0,value:o.title}),m}async function Tn(o,a,c,d){let p=Ur(o),m=Object.values(p).some((E)=>l(E)),h=(E)=>fetch(is("/__jx_resolve__"),{body:JSON.stringify({$base:d,$export:o.$export,$prototype:o.$prototype,$src:o.$src,...E}),headers:{"Content-Type":"application/json"},method:"POST"}).then((y)=>{if(!y.ok)throw Error(`Jx dev proxy ${y.status} for "${c}"`);return y.json()}),g=ze(null);if(m)be(()=>{let E={};for(let[y,w]of Object.entries(p))E[y]=l(w)?We(w,a):w;h(E).then((y)=>{g.value=y}).catch((y)=>console.error("Jx dev proxy:",y))});else h(p).then((E)=>{g.value=E}).catch((E)=>console.error("Jx dev proxy:",E));return g}function Cs(o,a,c){let d=0;return(p)=>{d+=1;let m=d;new Promise((h)=>{h(a(p))}).then((h)=>{if(m===d)o.value=h}).catch((h)=>{if(m===d)console.error(c,h)})}}async function Ic(o,a,c,d){let{$src:p,$export:m}=o,h=gs.has(p)?Hr(p):void 0;if(!h)return jc(o,a,c,d);let g=h instanceof Promise?await h:h,E=g[m]??g.default?.[m];if(!E)throw Error(`Jx: export "${m}" not found in "${p}" for "${c}"`);if(!t(E))throw TypeError(`Jx: "${m}" from "${p}" is not a function`);let y=E,w=o.arguments??{},T=Object.values(w).some((O)=>r(O)),C=()=>{let O={};for(let[K,k]of Object.entries(w))O[K]=r(k)?Se(k.$ref,a):k;return O},_=ze(null);if(T){let O=Cs(_,y,"Jx server function:");be(()=>{let K=C();xn(()=>{}),O(K)})}else _.value=await y(C());return _}async function jc(o,a,c,d){let p=o.arguments??{},m=Object.values(p).some((w)=>r(w)),h=()=>{let w={};for(let[T,C]of Object.entries(p))w[T]=r(C)?Se(C.$ref,a):C;return w},g=(w)=>fetch(is("/__jx_server__"),{body:JSON.stringify({$base:d,$export:o.$export,$src:o.$src,arguments:w}),headers:{"Content-Type":"application/json"},method:"POST"}).then((T)=>{if(!T.ok)throw Error(`Jx server proxy ${T.status} for "${c}"`);return T.json()}),E=ze(null),y=Cs(E,g,"Jx server proxy:");if(m)be(()=>{let w=h();xn(()=>{}),y(w)});else y(h());return E}function Se(o,a){if(!e(o))return o;if(o.startsWith("$map/")||o.startsWith("#/$map/")){let c=(o.startsWith("#/")?o.slice(2):o).split("/"),[,d]=c,m=a.$map?.[d]??a[`$map/${d}`];return c.length>2?me(m,c.slice(2).join("/")):m}if(o.startsWith("#/state/"))return me(a,o.slice(8));if(o.startsWith("parent#/"))return me(a,o.slice(8));if(o.startsWith("window#/"))return me(globalThis.window,o.slice(8));if(o.startsWith("document#/"))return me(globalThis.document,o.slice(10));return me(a,o)??null}function zi(o,a,c,d){let p=a.replaceAll(/-([a-z])/g,(h,g)=>g.toUpperCase()),m=o[p];if(x(m)){o[p]=c!==null&&c!=="false";return}if(c===null){let h=d?.get(p);o[p]=h===void 0?s(m)?0:"":h;return}o[p]=s(m)?Number(c):c}function Hc(o){let a=new Map;for(let[c,d]of Object.entries(o.state??{})){if(n(d)){if("default"in d){a.set(c,d.default);continue}if(Fc.some((p)=>(p in d)))continue}a.set(c,d)}return a}var Fc=["$expression","$prototype","$ref","$src"],Gi=new Set;function Vc(o,a){if(Object.hasOwn(o,a))return!0;if(o.hasAttribute(a))return!0;let c=a.replaceAll(/[A-Z]/gu,(d)=>`-${d.toLowerCase()}`);return c!==a&&o.hasAttribute(c)}function $n(o,a){if(!M(o))return!1;let c=a===void 0?o:`${a}:${o}`;if(!Gi.has(c))Gi.add(c),console.warn(`Jx: "${o}" is private state (spec.md §5.6) and cannot be set through $props`+`${a===void 0?"":` (${a})`}. The write was ignored; rename the entry without the leading # to make it part of the component's interface.`);return!0}function Wc(o,a){let c=Fr(a);for(let[d,p]of Object.entries(o.$props??{})){if($n(d,"$props"))continue;c[d]=r(p)?Se(p.$ref,a):p}return c}var As={},Ft=new Map;async function Ps(o,a){let c=a??location.href,{tagName:d}=o;if(!d||!d.includes("-"))throw Error(`Jx redefineElement: tagName "${d}" must contain a hyphen`);if(!customElements.get(d)){await Bt(o,c);return}if(o.$elements)await qr(o.$elements,c);let p=Ft.get(d)?.doc.observedAttributes??[],m=o.observedAttributes??[];if(JSON.stringify(p)!==JSON.stringify(m))console.warn(`Jx redefineElement: <${d}> keeps observedAttributes [${p.join(", ")}] as first defined; [${m.join(", ")}] takes effect only in a fresh realm`);Ft.set(d,{base:c,doc:o})}function Ns(o){As=o??{}}async function qr(o,a,c){for(let d of o){if(e(d)){try{await import(d.startsWith("/")||d.startsWith(".")?d:`/node_modules/${d}`)}catch(h){console.warn(`Jx: failed to import package "${d}"`,h)}continue}if(!r(d))continue;let{href:p}=new URL(d.$ref,a),m=await Dr(p,c);if(!m.tagName||!m.tagName.includes("-"))continue;if(customElements.get(m.tagName))continue;if(m.$elements)await qr(m.$elements,p,c);await Bt(m,p)}}var Yi=32,Bc={expansion:0,frames:[]},gt=Bc;function On(o,a){let c=gt;gt=o;try{return a()}finally{gt=c}}function Jr(o){return{expansion:o.frames.length,frames:o.frames}}function Kc(o,a){if(Object.is(o,a))return!0;if(!Xi(o)||!Xi(a))return!1;try{return JSON.stringify(o)===JSON.stringify(a)}catch{return!1}}function Xi(o){if(!n(o))return!1;let a=le(o);if(Array.isArray(a))return!0;let c=Object.getPrototypeOf(a);return c===Object.prototype||c===null}function Uc(o,a){if(o.tag!==a.tag)return!1;let c=Object.keys(o.props);if(c.length!==Object.keys(a.props).length)return!1;return c.every((d)=>Object.hasOwn(a.props,d)&&Kc(o.props[d],a.props[d]))}function qc(o,a){let c=[...o.frames.map((d)=>d.tag),a.tag].join(" → ");if(o.frames.slice(o.expansion).some((d)=>Uc(d,a)))throw Error(`Component <${a.tag}> renders itself: ${c}. A component cannot appear inside its own `+"definition with the same props — the expansion would never end.");if(o.frames.length>=Yi)throw Error(`Component nesting exceeds ${Yi} levels: ${c}. A component that renders itself with changing props needs a case that stops.`);return{expansion:o.expansion,frames:[...o.frames,a]}}var Zi=new Set;async function Bt(o,a){let c=a,d;if(e(o)){if(c=new URL(o,c??location.href).href,Zi.has(c))return;Zi.add(c),d=await Dr(o)}else d=o;c??=location.href;let{tagName:p}=d;if(!p||!p.includes("-"))throw Error(`Jx defineElement: tagName "${p}" must contain a hyphen`);if(customElements.get(p))return;if(d.$elements)await qr(d.$elements,c);Ft.set(p,{base:c,doc:d});let m=d,h=c,g=m.observedAttributes??[],E=class extends HTMLElement{_jxInitialized=!1;_state=null;static get observedAttributes(){return g}async connectedCallback(){if(this.dataset.jxDefinitionRoot!==void 0)return;if(this._jxInitialized)return;this._jxInitialized=!0;let y=gt,w={},T=Ft.get(p)??{base:h,doc:m},{doc:C,base:_}=T,O=await _n(C,{},_,{base:_,media:null,root:this});for(let V of g)if(this.hasAttribute(V))zi(O,V,this.getAttribute(V)),w[V]=this.getAttribute(V);let K=this.dataset.jxProps;if(K){try{let V=JSON.parse(K),ne=n(V)||e(V)?Object.entries(V):[];for(let[X,re]of ne){if($n(X,"data-jx-props"))continue;if(X in(C.state??{}))O[X]=re,w[X]=re}}catch{}delete this.dataset.jxProps}let k=this.getAttributeNames().filter((V)=>V.startsWith("props.")&&V.length>6);for(let V of k){let ne=V.slice(6);if($n(ne,"props.* attribute")){this.removeAttribute(V);continue}if(ne in(C.state??{}))O[ne]=this.getAttribute(V),w[ne]=this.getAttribute(V),this.removeAttribute(V)}for(let V of Object.keys(C.state??{})){if(M(V))continue;let ne=Vr(this);if(V in this&&ne[V]!==void 0&&Vc(this,V))O[V]=ne[V],w[V]=ne[V]}let L;try{L=qc(y,{props:w,tag:p})}catch(V){if(this.replaceChildren(),!this.isConnected)return;console.error(`Jx: <${p}> was not rendered:`,V),this.dispatchEvent(new ErrorEvent("jx-error",{bubbles:!0,composed:!0,error:V,message:V instanceof Error?V.message:String(V)}));return}for(let V of Object.keys(C.state??{})){if(M(V))continue;if(!(V in HTMLElement.prototype))Object.defineProperty(this,V,{configurable:!0,get:()=>O[V],set:(ne)=>{O[V]=ne}})}this._state=O;let z=[...this.childNodes];this.replaceChildren();let G=C.style,Y=G&&Ac(G)?G:{display:"block",...G},U=ws(Y,Br.get(this));if(Dn(this,U,Jn(O),O),In(this,C.attributes??{},O),Ec(this,C,O),!Array.isArray(C.children)&&C.textContent!==void 0)bs(this,"textContent",C.textContent,O);let P=Array.isArray(C.children)?C.children:[],B=Cn;Cn||=this.dataset.jxPath!==void 0;try{On(L,()=>{for(let V of P)this.append(Me(V,O))})}finally{Cn=B}Gc(this,z);let{onMount:ie}=O;if(Rr(ie))queueMicrotask(()=>ie(O,this))}disconnectedCallback(){let y=this._state;if(y&&Rr(y.onUnmount))y.onUnmount(y)}adoptedCallback(){let y=this._state;if(y&&Rr(y.onAdopted))y.onAdopted(y)}attributeChangedCallback(y,w,T){if(!this._state||w===T)return;zi(this._state,y,T,Hc(Ft.get(p)?.doc??m))}};customElements.define(p,E)}function Qi(o,a,c,d){let p=document.createElement(Kr(o.tagName,a));if(c?.onNodeCreated)c.onNodeCreated(p,d??[],o,a);for(let[h,g]of Object.entries(o.$props??{})){if($n(h,"$props"))continue;let E=(y)=>{Vr(p)[h]=e(y)?jr(p.tagName,h,y):y};if(r(g)){let y=g;E(Se(y.$ref,a)),be(()=>{E(Se(y.$ref,a))})}else if(l(g))be(()=>{E(We(g,a))});else E(g)}if(o.style)Br.set(p,o.style);Dn(p,o.style??{},Jn(a),a),In(p,o.attributes??{},a),Wr(p,o,a);let m=Array.isArray(o.children)?o.children:[];for(let h=0;h<m.length;h++){let g=m[h],E=c&&d?{...c,_path:[...d,"children",h]}:void 0;if(S(g))_r(p,g,a,E);else p.append(Me(g,a,E))}return p}function zc(o){return o.nodeType===Node.ELEMENT_NODE}function Gc(o,a){let c=o.querySelectorAll("slot");if(c.length===0)return;let d=new Map,p=[];for(let m of a)if(zc(m)&&m.getAttribute("slot")){let h=m.getAttribute("slot"),g=d.get(h);if(!g)g=[],d.set(h,g);g.push(m)}else p.push(m);for(let m of c){let h=m.getAttribute("name"),g=h?d.get(h)??[]:p;m.replaceWith(...g.length>0?g:[...m.childNodes])}}function Xc(o,a){if(!e(a)||a==="")return o;let c=o.indexOf("#"),d=c===-1?"":o.slice(c),p=c===-1?o:o.slice(0,c),m=p.indexOf("?"),h=m===-1?p:p.slice(0,m),E=(m===-1?[]:p.slice(m+1).split("&")).filter((y)=>y!==""&&!Zc(y));return E.push(`v=${encodeURIComponent(a)}`),`${h}?${E.join("&")}${d}`}function Zc(o){let a=o.indexOf("="),c=a===-1?o:o.slice(0,a);if(c==="v")return!0;if(!c.includes("%"))return!1;try{return decodeURIComponent(c)==="v"}catch{return!1}}function Qc(o,a){if(!o||!Object.hasOwn(o,a))return;let c=o[a];return e(c)?c:void 0}function Kt(o,a){if(!a||o==="")return null;if(a.space==="repo"){if(!a.fileBaseUrl)return null;let d=Di(o,a.documentDir,a.mounts,a.lanes);if(d===null)return null;let{suffix:p}=jt(o);return Xc(`${a.fileBaseUrl}${Li(d)}${p}`,Qc(a.versions,d))}let[c]=a.mounts;return c?eu(o,a.documentDir,c):null}function eu(o,a,c){if(Ar(o))return null;let{path:d,suffix:p}=jt(o),m;try{m=decodeURIComponent(d)}catch{return null}let h=Nr(a,m);if(h===null)return null;let g=Ji([c],h);if(!g)return null;return`${g}${p}`}function nt(o){return`[data-jx-path='${o.replaceAll("\\",String.raw`\\`).replaceAll("'",String.raw`\'`)}']`}function tu(o,a){if(!a)return!1;return o.length<=a.length&&o.every((c,d)=>a[d]===c)}function Rs(o,a,c){let d=c.layoutWrapped&&n(a)?a.$__layout:void 0;if(d){let m=i(d)?d:{},{file:h,path:g}=m;return{chrome:o.length>0&&!tu(o,c.pageContentPrefix),kind:"layout",layoutFile:e(h)?h:"",layoutPath:Array.isArray(g)?g:[]}}let p=o;if(c.layoutWrapped&&c.pageContentPrefix){let m=c.pageContentPrefix;if(o.length>=m.length&&m.every((h,g)=>o[g]===h)){let h=o.slice(m.length),[g]=h;p=s(g)?["children",g-(c.pageContentOffset??0),...h.slice(1)]:["children",...h]}}if(c.arrayPaths.size>0){let m=!0;while(m){m=!1;for(let h=1;h<p.length-1;h++)if(p[h]==="children"&&p[h+1]===0&&c.arrayPaths.has(p.slice(0,h).join("/"))){p=[...p.slice(0,h),"map",...p.slice(h+2)],m=!0;break}}}return{kind:"path",path:p}}function ae(o){return JSON.stringify(o)}function ge(o){return JSON.parse(o)}function $s(o){if(o.dataset.jxDefinitionRoot!==void 0)return!1;return o.getAttribute("contenteditable")==="false"||o.tagName.includes("-")}function jn(o,a){let c=o instanceof Element?o:o?.parentElement??null;while(c){if(c instanceof HTMLElement){if(c.dataset.jxPath&&a(c))return{el:c,path:ge(c.dataset.jxPath)};if($s(c))return null}c=c.parentElement}return null}function Hn(o,a){let c=o.querySelector(nt(ae(a)));return c instanceof HTMLElement?c:null}function zr(o){return o.textContent.length}function nu(o,a,c){if(!o.contains(a))return null;let d=o.ownerDocument.createRange();d.setStart(o,0);try{d.setEnd(a,c)}catch{return null}return d.toString().length}function ru(o,a){let c=Math.max(0,Math.min(a,zr(o))),d=o.ownerDocument.createTreeWalker(o,NodeFilter.SHOW_TEXT),p=0,m=null,h=d.nextNode();while(h){let g=h.length;if(p+g>=c)return{node:h,offset:c-p};p+=g,m=h,h=d.nextNode()}return m?{node:m,offset:m.length}:{node:o,offset:0}}function Ut(o,a,c){let d=jn(o,c);if(!d||!o)return null;let p=nu(d.el,o,a);return p===null?null:{offset:p,path:d.path}}function Gr(o,a){let c=Hn(o,a.path);return c?ru(c,a.offset):null}function Os(o){return o.offset<=0}function qt(o,a){return ae(o.path)===ae(a.path)}function Yr(o,a){let c=[];for(let d of o.querySelectorAll("[data-jx-path]"))if(a(d)&&!ou(d,o))c.push(d);return c}function ou(o,a){let c=o.parentElement;while(c&&c!==a){if($s(c))return!0;c=c.parentElement}return!1}function ks(o,a,c,d){let p=Yr(o,d),m=ae(a),h=p.findIndex((E)=>E.dataset.jxPath===m),g=h===-1?void 0:p[h+c];return g?{el:g,path:ge(g.dataset.jxPath)}:null}var Xr="jx-site-style";function Ms(o,a,c,d){let p=[],m=(w,T)=>{let C={mediaQueries:a,scope:T,transposeValue:c};if(d)C.resolveValue=(_,O)=>d(_,O,T);for(let _ of It(w,C))p.push(_.text)},h={},g={},E=[],y=[];for(let[w,T]of Object.entries(o)){if(n(T)&&!Array.isArray(T)){if(w.startsWith("@"))E.push([w,T]);else if(!w.startsWith("--"))y.push([w,T]);continue}if(Lt(w)||w.startsWith("@"))continue;if(w.startsWith("--")||w==="colorScheme"||w==="color-scheme")h[w]=T;else g[w]=T}m(h,":root"),m(g,"body");for(let[w,T]of y)if(w.startsWith("&"))m({[w]:T},":root");else m(T,w);for(let[w,T]of E){if(_t(w)||Dt(w)){m({[w]:T},null);continue}let C={},_={},O=[];for(let[K,k]of Object.entries(T)){if(n(k)&&!Array.isArray(k)){if(!K.startsWith("@"))O.push([K,k]);continue}if(K.startsWith("--"))C[K]=k;else _[K]=k}m({[w]:C},":root"),m({[w]:_},"body");for(let[K,k]of O)m({[w]:k},K)}if(Object.values(a).some((w)=>vn(w)!==null)&&!("colorScheme"in o))p.push(":root { color-scheme: light dark }",`:root:where([${Ge}="light"]) { color-scheme: light }`,`:root:where([${Ge}="dark"]) { color-scheme: dark }`);return p.join(`
|
|
10
|
+
`)}async function iu(o,a){let c=o.$elements;if(!Array.isArray(c))return;await Promise.all(c.map(async(d)=>{let p=(async()=>{if(e(d))await import(d.startsWith("/")||d.startsWith(".")?d:`/node_modules/${d}`);else if(n(d)&&"$ref"in d)await Bt(new URL(String(d.$ref),a).href);else if(n(d))await Bt(d,a)})();try{await Promise.race([p,new Promise((m,h)=>{setTimeout(()=>h(Error("register timeout")),5000)})])}catch(m){console.warn("iframe canvas: failed to register element",JSON.stringify(d),m)}}))}var _s="jx-canvas-edit-css",su=`
|
|
11
11
|
.empty-media-placeholder {
|
|
12
12
|
display: inline-block;
|
|
13
13
|
min-width: 120px;
|
|
@@ -96,7 +96,7 @@ function ko(e){let{target:t,source:n,targetOrigin:r,acceptOrigin:o,token:s}=e,i=
|
|
|
96
96
|
[data-jx-layout-region] [data-jx-layout-region]::before {
|
|
97
97
|
content: none;
|
|
98
98
|
}
|
|
99
|
-
`;function
|
|
99
|
+
`;function au(o,a){let c=o.head.querySelector(`#${_s}`);if(a!=="design"&&a!=="edit"){c?.remove();return}if(c)return;let d=o.createElement("style");d.id=_s,d.textContent=su,o.head.append(d)}var Js="jx-canvas-overlay-css",lu=`
|
|
100
100
|
/* The UA rule a de-popovered element lost, re-supplied at UA-EQUIVALENT PRECEDENCE.
|
|
101
101
|
|
|
102
102
|
The cascade layer is the mechanism and it is the whole point. An unlayered author declaration
|
|
@@ -184,7 +184,7 @@ dialog[data-jx-dialog-open]::before {
|
|
|
184
184
|
letter-spacing: 0.08em;
|
|
185
185
|
pointer-events: none;
|
|
186
186
|
}
|
|
187
|
-
`;function
|
|
187
|
+
`;function cu(o,a){let c=o.head.querySelector(`#${Js}`);if(a==="preview"){c?.remove();return}if(c)return;let d=o.createElement("style");d.id=Js,d.textContent=lu,o.head.append(d)}var Ds="jx-canvas-diff-css",uu=`
|
|
188
188
|
[data-jx-diff] {
|
|
189
189
|
position: relative;
|
|
190
190
|
border-left-width: 3px;
|
|
@@ -227,7 +227,7 @@ dialog[data-jx-dialog-open]::before {
|
|
|
227
227
|
border-left-color: CanvasText;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
`;function
|
|
230
|
+
`;function du(o,a){let c=o.head.querySelector(`#${Ds}`);if(!a){c?.remove();return}if(c)return;let d=o.createElement("style");d.id=Ds,d.textContent=uu,o.head.append(d)}function fu(o,a){for(let c of o.querySelectorAll("[data-jx-diff], [data-jx-diff-within]"))if(c instanceof HTMLElement)delete c.dataset.jxDiff,delete c.dataset.jxDiffWithin;if(!a?.length)return;for(let c of a){let d=Hn(o,c.path);if(d){d.dataset.jxDiff=c.kind;continue}let{path:p}=c;while(p.length>=2){p=p.slice(0,-2);let m=Hn(o,p);if(m){m.dataset.jxDiffWithin="";break}}}}function pu(o,a){o.documentElement.toggleAttribute("data-jx-preview",a==="preview")}function Fn(o){return o==="design"||o==="edit"}function mu(o,a){if(!Fn(a)){o.removeAttribute("contenteditable"),o.removeAttribute("spellcheck"),o.removeAttribute("role"),o.removeAttribute("aria-multiline"),o.removeAttribute("aria-label");return}o.contentEditable="true",o.spellcheck=!0,o.setAttribute("autocorrect","off"),o.setAttribute("writingsuggestions","false"),o.setAttribute("draggable","false"),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline","true"),o.setAttribute("aria-label","Document content")}var Ls="jx-canvas-stylebook-css",hu=`
|
|
231
231
|
.sb-root {
|
|
232
232
|
padding: 16px;
|
|
233
233
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
@@ -306,10 +306,10 @@ dialog[data-jx-dialog-open]::before {
|
|
|
306
306
|
color: color-mix(in srgb, #808080 70%, transparent);
|
|
307
307
|
font-size: 13px;
|
|
308
308
|
}
|
|
309
|
-
`;function Ic(e,t){let n=e.head.querySelector(`#${xi}`);if(t!=="stylebook"){n?.remove();return}if(n)return;let r=e.createElement("style");r.id=xi,r.textContent=Lc,e.head.append(r)}function Jr(e,t={}){let n=document.head.querySelector(`#${Ir}`);if(!e||typeof e!=="object"){n?.remove();return}let r=pi(e,t,dn);if(n){n.textContent=r;return}let o=document.createElement("style");o.id=Ir,o.textContent=r,document.head.append(o)}function jr(e,t){if(t)e.documentElement.dataset.colorScheme=t;else delete e.documentElement.dataset.colorScheme}function _t(e,t){for(let r of e.querySelectorAll("[data-jx-popover-open]"))delete r.dataset.jxPopoverOpen;if(t===null)return;let n=e.querySelector(`[data-jx-popover]${je(t)}`);if(n)n.dataset.jxPopoverOpen=""}function tt(e,t){for(let r of e.querySelectorAll("[data-jx-dialog-open]"))delete r.dataset.jxDialogOpen;if(t===null)return;let n=e.querySelector(`dialog${je(t)}`);if(n)n.dataset.jxDialogOpen=""}function Jc(e,t=null){let n=e.$head;if(!Array.isArray(n))return;for(let r of n){if(!r?.tagName)continue;let o=String(r.tagName).toLowerCase();if(o==="script"&&!r.attributes?.src)continue;let s={...r.attributes};for(let c of["href","src"]){let l=s[c];if(typeof l!=="string"||l==="")continue;if(!l.startsWith("/")&&!l.startsWith(".")&&!l.startsWith("http")){s[c]=`/node_modules/${l}`;continue}s[c]=$t(l,t)??l}let i=`${o}${s.href?`[href="${String(s.href)}"]`:""}${s.src?`[src="${String(s.src)}"]`:""}`;if(i!==o&&document.head.querySelector(i))continue;let a=document.createElement(o);for(let[c,l]of Object.entries(s))a.setAttribute(c,String(l));if(r.textContent)a.textContent=r.textContent;document.head.append(a)}}function Hr(e){let t=[],n=(r)=>t.some((o)=>r.length>o.length&&o.every((s,i)=>r[i]===s));return(r,o,s)=>{if(!(r instanceof HTMLElement))return;let i=o.length===0&&s?.tagName?.includes("-");if(i)r.dataset.jxDefinitionRoot="";let a=!i&&r.tagName.includes("-")&&Tn(e.canvasMode);if(a)r.contentEditable="false",t.push(o);let c=ci(o,s,e);if(c.kind==="layout"){if(r.dataset.jxLayoutPath=J(c.layoutPath),c.layoutFile)r.dataset.jxLayoutFile=c.layoutFile;if(c.chrome){if(r.dataset.jxLayoutRegion="",Tn(e.canvasMode))r.contentEditable="false"}return}if(r.dataset.jxPath=J(c.path),!a&&Tn(e.canvasMode)&&n(o))r.contentEditable="true"}}function yi(e,t=3){let n=new WeakMap,r=(o)=>{let s=o.target;if(!(s instanceof HTMLImageElement))return;if(!s.src||s.src.startsWith("data:"))return;let i=(n.get(s)??0)+1;if(i>t)return;n.set(s,i),setTimeout(()=>{let a=s.src;s.src="",s.src=a},150*i)};return e.addEventListener("error",r,!0),()=>e.removeEventListener("error",r,!0)}async function bi(e){let t=e.assets??null;yn(t?(i)=>$t(i,t):null),Ls(e.mode!=="preview"),Js(e.mode!=="preview"&&!e.allowAutoRequests),Bs(!0),Vs(e.mode!=="preview"&&e.mode!=="stylebook"),Us(e.mode!=="preview"),qs(e.mode!=="preview"),Gs(e.mode==="design"||e.mode==="edit"),Jr(e.siteStyle,e.doc.$media??{}),Jc(e.doc,t),Pc(e.container.ownerDocument,e.mode),$c(e.container.ownerDocument,e.mode),Oc(e.container.ownerDocument,e.mode),Ic(e.container.ownerDocument,e.mode),Mc(e.container.ownerDocument,Boolean(e.diffMarks?.length)),li(e.doc.$media??{}),await Ac(e.doc,e.docBase);let n=await bn(e.doc,{},e.docBase),r=Hr(e.mapperCtx),{result:o,stop:s}=xn(()=>de(e.doc,n,{_path:[],onNodeCreated:r}));return e.container.replaceChildren(o),_t(e.container,e.popoverOpen??null),tt(e.container,e.dialogOpen??null),Dc(e.container,e.mode),_c(e.container,e.diffMarks??null),{ctx:{defs:n,docBase:e.docBase,mapperCtx:e.mapperCtx,mode:e.mode},dispose:s}}function Z(e,t){let n=e;for(let r of t){if(n==null)return;n=n[r]}return n}function wi(e){return e.length>=2?e.slice(0,-2):null}function Ei(e){return e.at(-1)}function vi(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;return e.every((n,r)=>n===t[r])}function nt(e,t){if(e.length>t.length)return!1;return e.every((n,r)=>n===t[r])}var An=14,jc="empty-container-placeholder";function Si(e){let t=oe(e);return{height:t.height,width:t.width,x:t.x,y:t.y}}function Hc(e){let t=getComputedStyle(e),{display:n}=t,r=n==="flex"||n==="inline-flex",o=n==="grid"||n==="inline-grid";return r&&t.flexDirection.startsWith("row")||o&&(t.gridAutoFlow??"").startsWith("column")}function Ai(e,t,n){let r=e.dataset?.jxPath;if(r==null)return null;let o=q(r);if(e.classList.contains(jc))return[{edge:"center",index:0,insertParentPath:o,rect:Si(e)}];let s=wi(o);if(!s)return null;let i=e.parentElement;if(!i)return null;let a=Ei(o);if(typeof a!=="number")return null;let c=Si(e);if(Hc(i)){let u=t.x-c.x;if(u<An)return[Cn("left",s,a,ki(c,!0))];if(c.width-u<An)return[Cn("right",s,a+1,Ti(c,!0))];return null}let l=t.y-c.y;if(l<An)return[Cn("top",s,a,ki(c,!1))];if(c.height-l<An)return[Cn("bottom",s,a+1,Ti(c,!1))];return null}function Cn(e,t,n,r){return{edge:e,index:n,insertParentPath:t,rect:r}}function ki(e,t){return t?{height:e.height,width:0,x:e.x,y:e.y}:{height:0,width:e.width,x:e.x,y:e.y}}function Ti(e,t){return t?{height:e.height,width:0,x:e.x+e.width,y:e.y}:{height:0,width:e.width,x:e.x,y:e.y+e.height}}function Ci(e){if(!e||e.length===0)return"none";return e.map((t)=>`${t.edge}:${t.insertParentPath.join("/")}:${t.index}`).join("|")}var Fr={$id:"elements-meta",title:"HTML Element Metadata",description:"Inline scoping and inline toolbar action metadata for HTML elements.",$convertGroups:{text:["p","h1","h2","h3","h4","h5","h6","blockquote"],container:["div","section","article","aside","main","header","footer","nav","search"],list:["ul","ol"]},$defs:{p:{$convertTo:"text",$convertToWhenEmpty:["text","container"],$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:[{tag:"strong",label:"Bold",command:"bold"},{tag:"em",label:"Italic",command:"italic"},{tag:"u",label:"Underline",command:"underline"},{tag:"del",label:"Strikethrough",command:"strikethrough"},{tag:"sup",label:"Superscript",command:"superscript"},{tag:"sub",label:"Subscript",command:"subscript"},{tag:"code",label:"Code",command:"code"},{tag:"a",label:"Link",command:"link"}]},h1:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:[{tag:"strong",label:"Bold",command:"bold"},{tag:"em",label:"Italic",command:"italic"},{tag:"code",label:"Code",command:"code"},{tag:"a",label:"Link",command:"link"}]},h2:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h3:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h4:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h5:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h6:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},li:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},td:{$inlineChildren:["em","strong","del","code","a","span","br","b","i","u","sub","sup","s"],$inlineActions:"p"},th:{$inlineChildren:["em","strong","del","code","a","span","br","b","i","u","sub","sup","s"],$inlineActions:"p"},blockquote:{$convertTo:"text",$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},figcaption:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},caption:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},summary:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},dt:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},dd:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},label:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},a:{$inlineChildren:["em","strong","code","span","br","b","i","u","sub","sup"],$inlineActions:[{tag:"strong",label:"Bold",command:"bold"},{tag:"em",label:"Italic",command:"italic"},{tag:"code",label:"Code",command:"code"}]},span:{$inlineChildren:["em","strong","del","code","a","br","b","i","u","sub","sup","s"],$inlineActions:"p"},div:{$convertTo:"container",$convertToWhenEmpty:["container","text"],$inlineChildren:[]},section:{$convertTo:"container",$inlineChildren:[]},article:{$convertTo:"container",$inlineChildren:[]},nav:{$convertTo:"container",$inlineChildren:[]},main:{$convertTo:"container",$inlineChildren:[]},header:{$convertTo:"container",$inlineChildren:[]},footer:{$convertTo:"container",$inlineChildren:[]},aside:{$convertTo:"container",$inlineChildren:[]},ul:{$convertTo:"list",$inlineChildren:[]},ol:{$convertTo:"list",$inlineChildren:[]},pre:{$inlineChildren:["code"]},table:{$inlineChildren:[]},thead:{$inlineChildren:[]},tbody:{$inlineChildren:[]},tr:{$inlineChildren:[]}}};var Pn=new Set(["strong","em","b","i","u","del","s","strike","code","sub","sup","span"]);function Ri(e,t){if(!t)return!1;if(t.contentEditable==="plaintext-only")return!1;let n=window.getSelection();if(!n||!n.rangeCount)return!1;let{anchorNode:r,focusNode:o}=n;if(!r||!o)return!1;if(!t.contains(r)||!t.contains(o))return!1;let s=(i)=>{let a=i;while(a&&a!==t){if(a.nodeType===Node.ELEMENT_NODE&&a.tagName.toLowerCase()===e)return!0;a=a.parentNode}return!1};return s(r)&&s(o)}function $i(e,t){if(!t)return;let n=window.getSelection();if(!n||!n.rangeCount)return;let r=n.getRangeAt(0);if(r.collapsed)return;if(!t.contains(r.commonAncestorContainer))return;Qc(r);let o=Wc(e,r,t);if(o.length>0)Bc(e,r,t,o);else Kc(e,r,t);rt(t)}function Wc(e,t,n){let r=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode(s){if(s.tagName.toLowerCase()===e&&t.intersectsNode(s))return NodeFilter.FILTER_ACCEPT;return NodeFilter.FILTER_SKIP}});while(o.nextNode())r.push(o.currentNode);return r}function Bc(e,t,n,r){for(let o=r.length-1;o>=0;o--){let s=r[o];Ni(s)}}function Ni(e){if(!e.parentNode)return;let n=document.createDocumentFragment();while(e.firstChild)n.append(e.firstChild);e.replaceWith(n)}function Kc(e,t,n){let r=t.extractContents(),o=Vc(r),s=Uc(r);if(!r.hasChildNodes()){if(o)t.insertNode(document.createTextNode(o));if(s){let l=document.createTextNode(s);t.collapse(!1),t.insertNode(l)}return}let i=document.createElement(e);i.append(r);let a=document.createDocumentFragment();if(o)a.append(document.createTextNode(o));if(a.append(i),s)a.append(document.createTextNode(s));t.insertNode(a);let c=window.getSelection();if(c){c.removeAllRanges();let l=document.createRange();l.selectNodeContents(i),c.addRange(l)}}function Vc(e){let t=e.firstChild;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let n=t.textContent??"",r=n.match(/^(\s+)/);if(!r)return null;let o=r[1];if(n.length===o.length)t.remove();else t.textContent=n.slice(o.length);return o}function Uc(e){let t=e.lastChild;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let n=t.textContent??"",r=n.match(/(\s+)$/);if(!r)return null;let o=r[1];if(n.length===o.length)t.remove();else t.textContent=n.slice(0,-o.length);return o}function rt(e){if(!e)return;let t=!0,n=0;while(t&&n<10){if(t=!1,n+=1,e.normalize(),qc(e))t=!0;if(zc(e))t=!0;if(Gc(e))t=!0;if(Yc(e))t=!0;if(Xc(e))t=!0}}function qc(e){let t=!1,n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r=[];while(n.nextNode()){let o=n.currentNode,s=o.nextSibling;if(s&&s.nodeType===Node.ELEMENT_NODE&&s.tagName===o.tagName&&Pn.has(o.tagName.toLowerCase())&&Zc(o,s))r.push([o,s])}for(let o=r.length-1;o>=0;o--){let[s,i]=r[o];while(i.firstChild)s.append(i.firstChild);i.remove(),t=!0}return t}function zc(e){let t=!1,n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r=[];while(n.nextNode()){let o=n.currentNode;if(!Pn.has(o.tagName.toLowerCase()))continue;if(o.childNodes.length===1&&o.firstChild!==null&&o.firstChild.nodeType===Node.ELEMENT_NODE&&o.firstChild.tagName===o.tagName)r.push(o)}for(let o of r){let s=o.firstChild;while(s.firstChild)s.before(s.firstChild);s.remove(),t=!0}return t}function Gc(e){let t=!1,n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r=[];while(n.nextNode()){let o=n.currentNode;if(!Pn.has(o.tagName.toLowerCase()))continue;if(o.childNodes.length===0&&!o.textContent)r.push(o)}for(let o of r)o.remove(),t=!0;return t}function Yc(e){let t=!1,n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r=[];while(n.nextNode()){let o=n.currentNode;if(!Pn.has(o.tagName.toLowerCase()))continue;if(o===e)continue;let s=o.firstChild;if(s&&s.nodeType===Node.TEXT_NODE){let a=s.textContent??"",c=a.match(/^(\s+)/);if(c&&a.length>c[1].length)r.push({el:o,type:"lift-leading",ws:c[1]})}let i=o.lastChild;if(i&&i.nodeType===Node.TEXT_NODE&&i!==s){let a=i.textContent??"",c=a.match(/(\s+)$/);if(c&&a.length>c[1].length)r.push({el:o,type:"lift-trailing",ws:c[1]})}}for(let o of r)if(o.type==="lift-leading"){let s=o.el.firstChild;s.textContent=(s.textContent??"").slice(o.ws.length),o.el.parentNode?.insertBefore(document.createTextNode(o.ws),o.el),t=!0}else if(o.type==="lift-trailing"){let s=o.el.lastChild;s.textContent=(s.textContent??"").slice(0,-o.ws.length),o.el.parentNode?.insertBefore(document.createTextNode(o.ws),o.el.nextSibling),t=!0}return t}function Xc(e){let t=!1,n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r=[];while(n.nextNode()){let o=n.currentNode;if(o.tagName.toLowerCase()!=="span")continue;if(o===e)continue;if(o.attributes.length>0)continue;r.push(o)}for(let o of r)Ni(o),t=!0;return t}function Zc(e,t){if(e.tagName.toLowerCase()==="a")return e.getAttribute("href")===t.getAttribute("href");return!0}function Qc(e){Pi(e,!0),Pi(e,!1)}function Pi(e,t){let n=t?e.startContainer:e.endContainer,r=t?e.startOffset:e.endOffset;if(n.nodeType!==Node.TEXT_NODE)return;let o=n.textContent??"",s=eu(o);for(let i of s)if(t){if(r>i.start&&r<i.end)e.setStart(n,i.start)}else if(r>i.start&&r<i.end)e.setEnd(n,i.end)}function eu(e){let t=[],n=0;while(n<e.length-1){if(e[n]==="$"&&e[n+1]==="{"){let r=n,o=1,s=n+2;while(s<e.length&&o>0){if(e[s]==="{")o+=1;else if(e[s]==="}")o-=1;s+=1}if(o===0){t.push({end:s,start:r}),n=s;continue}}n+=1}return t}var tu=new Set(["pre"]),nu=new Set(Object.entries(Fr.$defs).filter(([e,t])=>!tu.has(e)&&(t.$inlineChildren?.length??0)>0).map(([e])=>e));function Mi(e,t){return t?.[e.toLowerCase()]??nu.has(e.toLowerCase())}var ru={dismiss:()=>{},isOpen:()=>!1,show:()=>{}},_e=ru;function Wr(e){_e=e}var M=null,ie=null,ot=null,Ot=null,st=null,Me=null,pe=!1,Lt="",Dt=!1,Oi=null;function Di(e){Oi=e}function He(e){return Mi(e.tagName,Oi)}function Br(e,t,n,r){if(M)xe(!0);if(M=e,ie=t,ot=n.onCommit,Ot=n.onSplit,st=n.onInsert,Me=n.onEnd,pe=r?.plainText===!0,Lt=pe?e.textContent??"":"",Dt=!1,e.dataset.jxActiveBlock="",pe){try{e.contentEditable="plaintext-only"}catch{e.contentEditable="true"}e.focus()}e.addEventListener("keydown",Kr),e.addEventListener("input",Vr),e.addEventListener("paste",Ur)}function xe(e=!1){if(!M)return;if(Wi(!1),_e.dismiss(),delete M.dataset.jxActiveBlock,pe)M.contentEditable="false";if(M.removeEventListener("keydown",Kr),M.removeEventListener("input",Vr),M.removeEventListener("paste",Ur),M=null,ie=null,ot=null,Ot=null,st=null,pe=!1,Lt="",Dt=!1,e)Me=null;else if(Me){let t=Me;Me=null,t()}}function Li(){Wi(!0)}function Ii(){return pe&&M!==null}function me(){return M!==null}function it(){return M}function Ji(){return ie}function ji(){return _e.isOpen()}function Kr(e){if(pe){if(e.key==="Escape"){if(e.preventDefault(),e.stopPropagation(),M)M.textContent=Lt;xe();return}if(e.key==="Enter"){e.preventDefault(),e.stopPropagation(),xe();return}if((e.ctrlKey||e.metaKey)&&["b","i","u","`"].includes(e.key))e.preventDefault()}}function Vr(){if(_e.isOpen())Gr()}function Ur(e){e.preventDefault();let t=e.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,t)}function Hi(){if(!Ot||!M||!ie)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0),n=document.createRange();n.setStart(M,0),n.setEnd(t.startContainer,t.startOffset);let r=document.createRange();r.setStart(t.endContainer,t.endOffset),r.setEnd(M,M.childNodes.length);let o=_i(n.cloneContents()),s=_i(r.cloneContents()),i=[...ie],a=Ot;return Fi(),a(i,o,s),!0}function Fi(){if(!M)return;if(delete M.dataset.jxActiveBlock,pe)M.contentEditable="false";if(M.removeEventListener("keydown",Kr),M.removeEventListener("input",Vr),M.removeEventListener("paste",Ur),M=null,ie=null,ot=null,Ot=null,st=null,pe=!1,Lt="",Dt=!1,Me){let e=Me;Me=null,e()}}function Wi(e){if(!ot||!M||!ie)return;if(pe){let n=(M.textContent??"").replaceAll(`
|
|
310
|
-
`," ");if(
|
|
311
|
-
`," ")&&!
|
|
312
|
-
`))requestAnimationFrame(()=>zr())}function Gr(){if(!M||!Rn)return;let e=window.getSelection();if(!e||!e.rangeCount){_e.dismiss();return}let t=e.getRangeAt(0),n=$n(t),r=n.lastIndexOf("/");if(r===-1||n.length<Ki-1){_e.dismiss();return}let o=n.slice(r+1).toLowerCase();_e.show(M,o,{onSelect:Ui})}function Ui(e){if(!M||!st||!ie)return;let t=Rn?window.getSelection():null;if(t&&t.rangeCount){let s=t.getRangeAt(0),a=$n(s).lastIndexOf("/");if(a!==-1){let c=document.createTreeWalker(M,NodeFilter.SHOW_TEXT),l=0,u=null,f=0;while(c.nextNode()){let d=c.currentNode;if(l+d.length>a){u=d,f=a-l;break}l+=d.length}if(u){let d=document.createRange();d.setStart(u,f),d.setEnd(s.startContainer,s.startOffset),d.deleteContents()}}}rt(M);let n=Bi(M),r=[...ie],o=st;Fi(),o(r,e,n)}function su(e,t){let{target:n}=e;return n===t||n===t.documentElement||n===t.body}function Yr(e){let t=e instanceof Element?e:null;while(t){if(t.dataset?.jxPath)return t;t=t.parentElement}return null}function zi(e,t){let n=oe(e);return{path:q(t),rect:{height:n.height,width:n.width,x:n.x,y:n.y}}}function qi(e){let t=Yr(e instanceof Element?e:null);if(!t)return null;return zi(t,t.dataset.jxPath)}function iu(e){let t=e.checkVisibility;return typeof t==="function"?t.call(e,{checkVisibilityCSS:!0}):!0}function Gi(e,t=document){let n=[],r=[];for(let o of e){let s=t.querySelector(je(J(o)));if(!s)continue;if(iu(s)){let i=oe(s);n.push({path:o,rect:{height:i.height,width:i.width,x:i.x,y:i.y}})}else r.push(o)}return{hidden:r,hits:n}}var au=new Set(["toggle","show","hide"]);function lu(e,t){if(!(e instanceof Element))return;let n=e.closest("[popovertarget]"),r=n?.getAttribute("popovertarget");if(!n||!r)return;let i=[...n.ownerDocument.querySelectorAll("[data-jx-popover]")].find((l)=>l.id===r)?.dataset.jxPath;if(!i)return;let a=n.getAttribute("popovertargetaction")??"toggle",c=au.has(a)?a:"toggle";t.post({action:c,kind:"popoverTargetClick",targetPath:q(i)})}function cu(e,t){if(!(e instanceof Element))return;let n=e.closest("[data-jx-commandfor]"),r=n?.dataset.jxCommandfor,o=n?.getAttribute("command")?.trim().toLowerCase()??"";if(!n||!r||!o)return;let a=[...n.ownerDocument.querySelectorAll("[data-jx-popover], dialog[data-jx-path]")].find((c)=>c.id===r)?.dataset.jxPath;if(!a)return;t.post({command:o,kind:"commandTargetClick",targetPath:q(a)})}function Yi(e,t=document,n){let r=null,o=null,s=n?.getGen?.()??0,i=()=>n?.getMode?.()==="preview",a=()=>{e.post({kind:"paneFocus"})},c=(g)=>{if(i()){if(g.target instanceof Element){let E=g.target.closest("a[href]")?.getAttribute("href");if(E&&!E.startsWith("#"))g.preventDefault(),e.post({href:E,kind:"previewNavigate"})}return}if(n?.getMode?.()==="stylebook"&&g.target instanceof Element&&g.target.closest("a"))g.preventDefault();let v=qi(g.target);if(v){let P=g;e.post({additive:P.ctrlKey===!0||P.metaKey===!0,hit:v,kind:"hit"})}lu(g.target,e),cu(g.target,e)},l=(g)=>{if(i())return;let v=g?.dataset.jxPath??null;if(v===r)return;r=v,e.post({hit:g&&v?zi(g,v):null,kind:"hover"})},u=()=>{let g=n?.getGen?.()??s;if(g!==s)s=g,o="none"},f=(g,v)=>{if(!n||n.getMode?.()==="stylebook"||i())return;u();let P=n.getShadowDoc(),E=Yr(g instanceof Element?g:null),_=E&&P?Ai(E,v,P):null,R=Ci(_);if(R===o)return;o=R,e.post({kind:"insertZones",zones:_})},d=0,m=null,w=0,y=0,h=(g)=>t.defaultView?.requestAnimationFrame(g)??requestAnimationFrame(g),x=(g)=>t.defaultView?.cancelAnimationFrame(g)??cancelAnimationFrame(g),S=()=>{d=0;let g=m;m=null,l(Yr(g instanceof Element?g:null)),f(g,{x:w,y})},A=(g)=>{let v=g;if(m=g.target,w=v.clientX,y=v.clientY,d)return;d=h(S)},C=(g)=>{if(!su(g,t))return;if(l(null),n&&!i()&&o!=="none")o="none",e.post({kind:"insertZones",zones:null})},T=(g)=>{let v=g;if(i())return;let P=me()?it():null;if(P&&g.target instanceof Node&&P.contains(g.target))return;let E=qi(g.target);if(!E)return;g.preventDefault(),e.post({kind:"contextMenu",path:E.path,x:v.clientX,y:v.clientY})};return t.addEventListener("pointerdown",a,!0),t.addEventListener("click",c,!0),t.addEventListener("pointermove",A,!0),t.addEventListener("pointerleave",C,!0),t.addEventListener("contextmenu",T,!0),()=>{if(d)x(d),d=0;t.removeEventListener("pointerdown",a,!0),t.removeEventListener("click",c,!0),t.removeEventListener("pointermove",A,!0),t.removeEventListener("pointerleave",C,!0),t.removeEventListener("contextmenu",T,!0)}}var uu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function fu(e){let t=e instanceof Element?e:null;while(t){if(t.dataset?.jxPath)return t;t=t.parentElement}return null}function Zr(e,t,n){let r=Ao(e,t,n);return fu(r)}function Qr(e,t,n,r){let o=e.dataset?.jxPath;if(o==null)return null;let s=q(o);if(s.length===0){let d=[...e.children];if(d.length===0)return Xr(r,s)?{edge:"inside",instruction:"make-child",referenceRect:Fe(e),targetPath:s}:null;return du(d,t,s,r)}if(!Xr(r,s))return null;let i=Z(n,s),a=(be(i?.tagName)||"div").toLowerCase(),c=Array.isArray(i?.children)&&i.children.some((d)=>d!=null&&typeof d==="object"),l=uu.has(a)||!c,u=Fe(e),f=u.height===0?0:(t-u.y)/u.height;if(l)return f<0.5?{edge:"top",instruction:"reorder-above",referenceRect:u,targetPath:s}:{edge:"bottom",instruction:"reorder-below",referenceRect:u,targetPath:s};if(f<0.25)return{edge:"top",instruction:"reorder-above",referenceRect:u,targetPath:s};if(f>0.75)return{edge:"bottom",instruction:"reorder-below",referenceRect:u,targetPath:s};return{edge:"inside",instruction:"make-child",referenceRect:u,targetPath:s}}function du(e,t,n,r){let o=1/0,s="reorder-below",i=e.length-1;for(let c=0;c<e.length;c++){let l=Fe(e[c]),u=Math.abs(t-l.y),f=Math.abs(t-(l.y+l.height));if(u<o)o=u,s="reorder-above",i=c;if(f<o)o=f,s="reorder-below",i=c}let a=[...n,"children",i];if(!Xr(r,a))return null;return{edge:s==="reorder-above"?"top":"bottom",instruction:s,referenceRect:Fe(e[i]),targetPath:a}}function Xr(e,t){if(e.type!=="tree-node")return!0;let n=e.path;if(vi(n,t))return!1;return!nt(n,t)}function Fe(e){let t=oe(e);return{height:t.height,width:t.width,x:t.x,y:t.y}}var pu=40,Xi=12;function eo(e,t,n=pu){if(e<n)return-1;if(e>t-n)return 1;return 0}var to=new Set(["deleteContentBackward","deleteWordBackward","deleteSoftLineBackward","deleteHardLineBackward"]),no=new Set(["deleteContentForward","deleteWordForward","deleteSoftLineForward","deleteHardLineForward"]),Zi=new Set(["deleteByCut","deleteContent"]),Qi=new Set(["insertText","insertReplacementText","insertFromPaste","insertFromPasteAsQuotation","insertFromYank","insertTranspose"]),mu="format",hu=new Set(["insertParagraph","insertLineBreak"]);function ea(e){let{inputType:t,from:n,to:r}=e;if(t==="insertCompositionText"||t==="insertFromComposition")return{kind:"native"};if(t==="historyUndo"||t==="historyRedo")return{kind:"reject"};if(t.startsWith(mu))return{kind:"reject"};if(t==="insertFromDrop"||t==="deleteByDrag")return{kind:"reject"};if(e.inPropHost)return hu.has(t)?{kind:"reject"}:{kind:"native"};if(!n||!r)return{kind:"reject"};let o=Mt(n,r)&&n.offset===r.offset,s=!Mt(n,r);if(t==="insertParagraph")return{from:n,kind:"split",to:r};if(t==="insertLineBreak"&&!s)return{kind:"native"};if(o&&to.has(t)&&e.atBlockStart)return{at:n,kind:"mergeBackward"};if(o&&no.has(t)&&e.atBlockEnd)return{at:n,kind:"mergeForward"};if(s){if(Qi.has(t)||t==="insertLineBreak")return{from:n,kind:"replaceRange",text:e.data,to:r};if(to.has(t)||no.has(t)||Zi.has(t))return{from:n,kind:"replaceRange",text:"",to:r};return{kind:"reject"}}if(Qi.has(t)||to.has(t)||no.has(t)||Zi.has(t))return{kind:"native"};return{kind:"native"}}var gu=500;function Nn(e,t){let n=e.ownerDocument.getSelection();if(!n||n.rangeCount===0||!n.anchorNode||!n.focusNode)return null;if(!e.contains(n.anchorNode)||!e.contains(n.focusNode))return null;let r=Nt(n.anchorNode,n.anchorOffset,t),o=Nt(n.focusNode,n.focusOffset,t);return r&&o?{anchor:r,head:o}:null}function It(e,t){let n=Dr(e,t.anchor),r=Dr(e,t.head)??n;if(!n)return!1;let o=e.ownerDocument.getSelection();if(!o)return!1;let s=e.ownerDocument.createRange();if(s.setStart(n.node,n.offset),o.removeAllRanges(),o.addRange(s),r&&r!==n)o.extend(r.node,r.offset);return!0}function ta(e,t){let n=e.ownerDocument,r=null,o=null,s=()=>{let T=t.getMode?.();return T===void 0||T==="design"||T==="edit"},i=0,a=()=>{if(i)clearTimeout(i),i=0},c=()=>{if(i=0,!r||!t.onCommitTick)return;let T=Nn(e,t.isEditableBlock);if(t.onCommitTick(),T)It(e,T)},l=!1,u=()=>{if(!t.onCommitTick||!r||l)return;a(),i=setTimeout(c,t.commitDelayMs??gu)},f=()=>{l=!0,a()},d=()=>{l=!1,u()},m=()=>{a(),r=null,o=null},w=()=>{if(!r)return;a(),r=null,o=null,t.onDeactivate()},y=()=>{if(!s()){w();return}let g=n.getSelection()?.focusNode??null;if(!g)return;if(!e.contains(g)){w();return}let v=Sn(g,t.isEditableBlock);if(!v){if(r?.contains(g)){t.onSelectionChange?.();return}w();return}let P=J(v.path);if(P===o){t.onSelectionChange?.();return}w(),r=v.el,o=P,t.onActivate(v.el,v.path)},h=(T)=>{let[g]=typeof T.getTargetRanges==="function"?T.getTargetRanges():[],v=n.getSelection(),P=v&&v.rangeCount>0&&(v.isCollapsed||!g),E,_,R,I;if(P)({startContainer:E,startOffset:_,endContainer:R,endOffset:I}=v.getRangeAt(0));else if(g)({startContainer:E,startOffset:_,endContainer:R,endOffset:I}=g);else return null;let te=Nt(E,_,t.isEditableBlock),b=Nt(R,I,t.isEditableBlock),k=Sn(R,t.isEditableBlock);return te&&b&&k?{endEl:k.el,from:te,to:b}:null},x=(T)=>{let g=T;if(!s())return;let v=h(g),P=ea({atBlockEnd:v?v.to.offset>=Or(v.endEl):!1,atBlockStart:v?fi(v.from):!1,data:g.data??"",from:v?.from??null,inPropHost:r!==null&&o===null,inputType:g.inputType,to:v?.to??null});switch(P.kind){case"native":return;case"split":{if(g.preventDefault(),!Mt(P.from,P.to)&&!t.onReplaceRange)return;t.onSplit?.();return}case"mergeBackward":{g.preventDefault(),t.onMergeBackward?.(P.at);return}case"mergeForward":{g.preventDefault(),t.onMergeForward?.(P.at);return}case"replaceRange":{g.preventDefault(),t.onReplaceRange?.(P.from,P.to,P.text);return}default:g.preventDefault()}},S=(T)=>{if(!s()||!t.onPropActivate)return;let g=T.target instanceof Element?T.target:null;while(g&&g!==e){if(g.dataset?.jxBoundProp){if(g!==r){if(w(),t.onPropActivate(g))r=g,o=null}return}if(g.dataset?.jxPath)return;g=g.parentElement}},A=(T)=>{T.preventDefault()},C=()=>u();return n.addEventListener("selectionchange",y),e.addEventListener("beforeinput",x),e.addEventListener("input",C),e.addEventListener("compositionstart",f),e.addEventListener("compositionend",d),e.addEventListener("dragstart",A),n.addEventListener("pointerdown",S,!0),{capture:()=>Nn(e,t.isEditableBlock),forget:m,isComposing:()=>l,flush:()=>{if(l)return;if(i)a(),c()},placeCaret:(T)=>{let g=It(e,{anchor:T,head:T});if(g)y();return g},restore:(T)=>{let g=It(e,T);if(g)y();return g},stop:()=>{n.removeEventListener("selectionchange",y),e.removeEventListener("beforeinput",x),e.removeEventListener("input",C),e.removeEventListener("compositionstart",f),e.removeEventListener("compositionend",d),e.removeEventListener("dragstart",A),n.removeEventListener("pointerdown",S,!0),w()},sync:y}}var na=(e,t)=>document.execCommand(e,!1,t);function ra(e){let t=window.getSelection();if(!t||!t.rangeCount)return{active:!1,href:null};let n=t.anchorNode;while(n&&n!==e){if(n.nodeType===Node.ELEMENT_NODE&&n.tagName.toLowerCase()==="a"){let r=n;return{active:!0,href:r.dataset.jxHref??r.getAttribute("href")}}n=n.parentNode}return{active:!1,href:null}}function xu(e){let t=window.getSelection();if(!t||!t.rangeCount)return null;let n=t.anchorNode;while(n&&n!==e){if(n.nodeType===Node.ELEMENT_NODE&&n.tagName.toLowerCase()==="a")return n;n=n.parentNode}return null}function oa(e,t){let n=xu(e);if(n)if(t)n.setAttribute("href",t);else{let r=document.createDocumentFragment();while(n.firstChild)r.append(n.firstChild);n.replaceWith(r)}else if(t)na("createLink",t);rt(e)}function sa(e,t){e.focus(),na("insertText",`\${${t}}`)}var Mn=new Set(["img","video","source","iframe","audio"]),_n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",yu="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%3E%3Crect%20width='32'%20height='32'%20fill='%23d0d0d0'/%3E%3C/svg%3E";var bu=/(src|poster|image|bg|background|icon|logo|photo|avatar|thumbnail|cover|banner)$/i;function wu(e){return bu.test(e)}var Eu=new Set(["p","h1","h2","h3","h4","h5","h6","blockquote","li","dt","dd","th","td","span","strong","em","small","mark","code","abbr","q","sub","sup","time","a","button","label","legend","caption","summary","pre","option"]),vu=new Set(["div","section","article","aside","header","footer","main","nav","figure","figcaption","details","fieldset","form","ul","ol","dl","table"]),ia=["empty-text-placeholder","empty-container-placeholder"];function ro(e){if(!e.tagName||e.textContent||e.innerHTML)return null;if(e.$__layout)return null;if(Array.isArray(e.children)&&e.children.length>0)return null;if(Eu.has(be(e.tagName)))return"empty-text-placeholder";if(vu.has(be(e.tagName)))return"empty-container-placeholder";return null}function Jt(e){return e.replaceAll(/\$\{([^}]+)\}/g,"❪ $1 ❫")}function aa(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);while(t.nextNode()){let n=t.currentNode;if(n.data.includes("❪"))n.data=n.data.replaceAll(/\u276A\s*(.*?)\s*\u276B/g,"${$1}")}}function Su(e){let t=e.map;return{children:t&&typeof t==="object"?[Te(t)]:[],className:"repeater-perimeter",tagName:"div"}}function Te(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e))return e.map((i)=>Te(i));if(e.$prototype==="Array")return Su(e);let t=e,n={},r=!1,o=Mn.has(t.tagName||"");if(o){let{attributes:i,src:a}=t,c=i?.src,l=t.poster,u=i?.poster;if(!(a&&a!==""||c&&c!=="")&&!(l&&l!==""||u&&u!==""))r=!0}for(let[i,a]of Object.entries(t))if(i==="state"||i==="$media"||i==="$elements")n[i]=a;else if(i==="$props"&&a&&typeof a==="object"){let c={};for(let[l,u]of Object.entries(a))if(typeof u==="string"&&u.includes("${"))if(wu(l))c[l]=yu;else if(l==="href"||l==="action")c[l]="";else c[l]=Jt(u);else if(u&&typeof u==="object"&&u.$ref){let f=u.$ref,d=f.startsWith("#/state/")?f.slice(8):f;c[l]=`{${d}}`}else c[l]=u;n[i]=c}else if(i==="children")if(Array.isArray(a))n.children=a.map((c)=>Te(c));else if(a&&typeof a==="object"&&a.$prototype==="Array")n.children=[Te(a)];else n.children=Te(a);else if(i==="cases"&&t.$switch&&a&&typeof a==="object"){let c=Object.keys(a);if(c.length>0){let l=a[c[0]];n.children=l&&typeof l==="object"&&!l.$ref?[Te(l)]:[{style:{background:"color-mix(in srgb, var(--danger) 8%, transparent)",border:"1px dashed color-mix(in srgb, var(--danger) 40%, transparent)",borderRadius:"4px",color:"var(--danger)",fontFamily:"'JetBrains Mono', 'SF Mono', 'Fira Code', monospace",fontSize:"11px",fontStyle:"italic",padding:"6px 10px"},tagName:"div",textContent:`[$switch: ${c.join(" | ")}]`}]}}else if(i==="attributes"&&o&&a&&typeof a==="object"){let c=a,l={};for(let[u,f]of Object.entries(c))if(u==="src"||u==="poster")if(typeof f==="string"&&f!==""&&!f.includes("${"))l[u]=f;else r=!0,l[u]=_n;else if(typeof f==="string"&&f.includes("${")){let d=u==="href"||u==="action";l[u]=d?"":Jt(f)}else if(f&&typeof f==="object"&&f.$ref){let d=f.$ref,m=d.startsWith("#/state/")?d.slice(8):d;l[u]=`{${m}}`}else l[u]=f;n.attributes=l}else if(i==="style")if(a&&typeof a==="object"){let c={};for(let[l,u]of Object.entries(a))if(typeof u!=="string"||!u.includes("${"))c[l]=u;n.style=c}else n.style=a;else if(typeof a==="string"&&a.includes("${"))if((i==="src"||i==="poster")&&Mn.has(t.tagName||""))r=!0,n[i]=_n;else{let l=i==="src"||i==="href"||i==="poster"||i==="action";n[i]=l?"":Jt(a)}else if(a&&typeof a==="object"&&a.$ref){let c=a.$ref,l=c.startsWith("#/state/")?c.slice(8):c;if((i==="src"||i==="poster")&&Mn.has(t.tagName||""))r=!0,n[i]=_n;else n[i]=`{${l}}`}else if((i==="src"||i==="poster")&&a===""&&Mn.has(t.tagName||""))r=!0,n[i]=_n;else n[i]=Te(a);let s=ro(n);if(s)n.className=n.className?`${n.className} ${s}`:s;if(r){let i=n.className||"";if(!i.includes("empty-media-placeholder"))n.className=i?`${i} empty-media-placeholder`:"empty-media-placeholder"}return n}var ku={bold:"strong",code:"code",italic:"em",strikethrough:"del",subscript:"sub",superscript:"sup",underline:"u"},Tu=["strong","em","u","del","sub","sup","code"],On="jx-pending-format",la="jx-pending-format-style";function Au(e){let t=e.parentElement;while(t){if(t.tagName.includes("-"))return t;t=t.parentElement}return null}function Cu(e,t){if(!e)return!1;let n=e.attributes;if(n){if(n[`props.${t}`]!==void 0)return!0;let r=new Set([t.toLowerCase(),sn(t).toLowerCase()]);for(let[s,i]of Object.entries(n))if(i!==void 0&&r.has(s.toLowerCase()))return!0;let o=n["data-jx-props"];if(typeof o==="string"&&Pu(o,t))return!0}if(Pt.has(t)||t.startsWith("$"))return!1;return e[t]!==void 0}function Pu(e,t){try{let n=JSON.parse(e);return typeof n==="object"&&n!==null&&t in n}catch{return!1}}function ca(e,t){let r=J(t).replaceAll("\\",String.raw`\\`).replaceAll("'",String.raw`\'`),o=e.querySelector(`[data-jx-path='${r}']`);return o instanceof HTMLElement?o:null}function Ru(e){return{height:e.height,width:e.width,x:e.x,y:e.y}}function ua(e,t,n){let r=t.ownerDocument,o=()=>{let b=n?.getMode?.();return b===void 0||b==="design"||b==="edit"},s=null,i=0,a=(b)=>{let k=window.getSelection();if(!k||!k.rangeCount)return null;let N=k.getRangeAt(0);return b.contains(N.commonAncestorContainer)?N:null},c=()=>{let b=it();if(!b)return;let k=a(b);if(k&&!k.collapsed)s=k.cloneRange()},l=()=>{if(r.querySelector(`#${la}`))return;let b=r.createElement("style");b.id=la,b.textContent=`::highlight(${On}) { background-color: Highlight; color: HighlightText; }`,r.head.append(b)},u=()=>{let b=globalThis.Highlight,k=globalThis.CSS?.highlights;if(!b||!k)return;if(s&&s.startContainer.isConnected)l(),k.set(On,new b(s.cloneRange()));else k.delete(On)},f=()=>{globalThis.CSS?.highlights?.delete(On)},d=()=>{let b=it();if(!b||!b.dataset.jxPath)return null;let k=a(b),N=k??s,F=N?Ru(To(N)):null,B=k?k.collapsed:!0,X=Tu.filter((Ae)=>Ri(Ae,b)),ne=ra(b);if(ne.active)X.push("a");return i+=1,{activeTags:X,collapsed:B,kind:"selectionChanged",link:ne,localScope:null,path:q(b.dataset.jxPath),rect:F,seq:i}},m=()=>{if(!me())return;c(),u();let b=d();if(b)e.post(b)},w=!1,y=(b,k)=>{aa(b),e.post({kind:"editStart",path:k}),Br(b,k,{onCommit:(N,F,B,X)=>{w=!1,e.post({children:F,kind:"editCommit",path:N,textContent:B,...X?{inPlace:!0}:{}})},onEnd:()=>{f(),s=null,e.post({kind:"editEnd"})},onInsert:(N,F,B)=>e.post({cmd:F,commitData:B,kind:"editInsert",path:N}),onSplit:(N,F,B)=>e.post({after:B,before:F,kind:"editSplit",path:N})}),c(),m()},h=(b,k)=>{let N=n?.getShadowDoc?.();if(!N)return!0;let F=Z(N,b);if(Cu(F,k))return!1;let B=F?.$props?.[k];if(B==null)return!0;if(typeof B!=="string")return!1;return!B.includes("${")},x=(b,k,N)=>{e.post({kind:"editStart",path:k,prop:N}),Br(b,k,{onCommit:(F,B,X,ne)=>{w=!1,e.post({kind:"editCommitProp",path:F,prop:N,value:X??"",...ne?{inPlace:!0}:{}})},onEnd:()=>{f(),s=null,E.forget(),e.post({kind:"editEnd"})},onInsert:()=>{},onSplit:()=>{}},{plainText:!0})},S=(b)=>{let k=it();if(!k)return;if(Ii())return;if(s&&s.startContainer.isConnected&&k.contains(s.commonAncestorContainer)){let N=window.getSelection();k.focus(),N?.removeAllRanges(),N?.addRange(s)}if(b.command==="link")oa(k,b.href);else if(b.command==="insertData")sa(k,b.token);else{let N=ku[b.command];if(N)$i(N,k)}c(),m()},A=(b)=>{let k=b.dataset.jxBoundProp,N=Au(b),F=N?.dataset.jxPath;if(!k||!N||!F)return!1;let B=q(F);if(!h(B,k))return!1;return x(b,B,k),!0},C=(b,k)=>{let N=di(t,b,k,He);if(!N)return!1;let[F,B]=k===-1?[b,N.path]:[N.path,b];return E.flush(),e.post({fromPath:F,intoPath:B,kind:"editMerge"}),!0},T=(b,k,N)=>{let F=Lr(t,He),B=J(b.path),X=J(k.path),ne=F.findIndex((ae)=>ae.dataset.jxPath===B),Ae=F.findIndex((ae)=>ae.dataset.jxPath===X);if(ne===-1||Ae===-1||Ae<=ne)return!1;let Ht=F.slice(ne+1,Ae).map((ae)=>q(ae.dataset.jxPath));return E.flush(),e.post({between:Ht,from:b,kind:"editRangeReplace",text:N,to:k}),!0},g=()=>c(),v=()=>c(),P=()=>c(),E=ta(t,{getMode:()=>n?.getMode?.()??"edit",isEditableBlock:He,onActivate:(b,k)=>y(b,k),onDeactivate:()=>{if(me())xe()},onCommitTick:()=>Li(),onMergeBackward:(b)=>C(b.path,-1),onMergeForward:(b)=>C(b.path,1),onReplaceRange:(b,k,N)=>T(b,k,N),onPropActivate:A,onSelectionChange:()=>m(),onSplit:()=>Hi()}),_=(b)=>Vi(b),R=()=>{if(ji())Gr()},I=()=>{if(!w)w=!0,e.post({kind:"editInput"})};t.addEventListener("input",I),t.addEventListener("keydown",_),t.addEventListener("input",R),r.addEventListener("mouseup",g,!0),r.addEventListener("keyup",v,!0),r.addEventListener("blur",P,!0);let te=e.onMessage((b)=>{if(b.kind==="applyFormat"){S(b.intent);return}if(b.kind==="openSlash"){zr({anchored:!1});return}if(b.kind==="flushEdits"){E.flush(),e.post({kind:"flushComplete",reqId:b.reqId});return}if(b.kind==="endEdit"){if(me())xe();return}if(b.kind!=="enterEdit")return;if(!o())return;if(b.prop!==void 0){let F=ca(t,b.path)?.querySelector(`[data-jx-bound-prop="${CSS.escape(b.prop)}"]`);if(F)A(F);return}let k=ca(t,b.path);if(k&&He(k))E.placeCaret({offset:b.offset??0,path:b.path})});return()=>{if(t.removeEventListener("keydown",_),t.removeEventListener("input",R),t.removeEventListener("input",I),r.removeEventListener("mouseup",g,!0),r.removeEventListener("keyup",v,!0),r.removeEventListener("blur",P,!0),E.stop(),te(),f(),s=null,me())xe()}}var $u=new Set(["ArrowUp","ArrowDown","Enter","Escape"]);function fa(e,t){let n=!1,r=null,o=null,s={dismiss:()=>{if(!n)return;n=!1,o=null,e.post({kind:"slashDismiss"})},isOpen:()=>n,show:(l,u,f)=>{if({onSelect:r}=f,n&&u===o)return;n=!0,o=u;let d=oe(l);e.post({filter:u,kind:"slashShow",rect:{height:d.height,width:d.width,x:d.left,y:d.top},...f.showFilter===!0?{showFilter:!0}:{}})}};Wr(s);let i=(l)=>{if(!n||!$u.has(l.key))return;l.preventDefault(),l.stopPropagation(),e.post({key:l.key,kind:"slashNav"})},a=()=>{if(n)s.dismiss()};t.addEventListener("keydown",i,!0),t.addEventListener("mousedown",a,!0);let c=e.onMessage((l)=>{if(l.kind==="slashSelect"){n=!1,o=null,r?.({...l.cmd});return}if(l.kind==="slashDismissed")n=!1,o=null});return()=>{t.removeEventListener("keydown",i,!0),t.removeEventListener("mousedown",a,!0),c(),Wr({dismiss:()=>{},isOpen:()=>!1,show:()=>{}})}}var da=["global","canvas","caret","grid","code","dock","palette"];var hp={"commandbar/primary":{admits:["application","document"],note:"document only for Save / Undo / Redo / Open in Browser, by frequency; ≤5 total"},"commandbar/overflow":{admits:["application","project","document"],note:"never selection — the Command Bar is not a selection surface"},"statusbar/project":{admits:["project"],note:"the status bar's left field"},"statusbar/document":{admits:["document"],note:"the status bar's centre field"},"statusbar/selection":{admits:["selection"],note:"the status bar's right field"},"context/element":{admits:["selection"],note:"the canvas element menu acts on a selection"},"context/file":{admits:["project"],note:"a file row addresses the project's file set"},"context/layer":{admits:["selection"],note:"an outline row IS a selection"},"context/tab":{admits:["document"],note:"a tab addresses one document"},"context/pane":{admits:["document"],note:"a pane hosts one document"},blockbar:{admits:["selection"],note:"the floating bar owns selection-scoped verbs"},"blockbar/format":{admits:["selection"],note:"the bar's inline-format cluster — a range inside the selection is still the selection"},"outline/row":{admits:["selection"],note:"row actions act on the row's node"},"settings/menu":{admits:["application","project"],note:"the rail foot's gear menu — the settings family. It is a MENU, not a pinned slot, so it "+"may host two levels for the reason commandbar/overflow does: a menu prints each row's own name, chord and gate, and draws a divider where the level changes. The rail's PINNED groups stay single-level, in PANEL_PLACEMENT_MATRIX"},palette:{admits:["application","project","document","selection"],note:"the level-agnostic surface; it groups rows by level"},never:{admits:["application","project","document","selection"],note:"keyboard- and API-only; no rendered surface to be misplaced in"}};var Nu=["mod","ctrl","alt","shift"],Mu={mod:"mod",cmd:"mod",command:"mod",meta:"mod",super:"mod",ctrl:"ctrl",control:"ctrl",alt:"alt",opt:"alt",option:"alt",shift:"shift"},_u={up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",esc:"escape",space:" ",spacebar:" ",del:"delete",plus:"=",return:"enter"};function Ou(e){return[...Nu.filter((n)=>e[n]),e.key].join("+")}function Du(e){return/^Digit(\d)$/.exec(e??"")?.[1]}function pa(e,t){let n=Du(e.code)??e.key.toLowerCase();if(Mu[n])return"";let r={mod:t?e.metaKey:e.ctrlKey,ctrl:t?e.ctrlKey:!1,alt:e.altKey,shift:e.shiftKey,key:_u[n]??n};return Ou(r)}var yp=["global",...da.filter((e)=>e!=="global"&&e!=="palette")];var Lu=["caret","global"],Iu=["canvas","global"],Ju=["global"],Dn={chords:[],mac:!1};function ju(e){if(!(e instanceof HTMLElement))return!1;return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"}function Hu(e,t){if(e)return Lu;return t==="preview"?Ju:Iu}function Fu(e,t=Dn,n=!1,r="design"){if(ju(e.target))return!1;let o=pa(e,t.mac);if(!o)return!1;let s=Hu(n,r);return t.chords.some((i)=>i.chord===o&&s.includes(i.scope))}function Wu(e){return{altKey:e.altKey,code:e.code,ctrlKey:e.ctrlKey,key:e.key,metaKey:e.metaKey,shiftKey:e.shiftKey}}function ma(e,t=document,n=()=>!1,r=()=>Dn,o=()=>"design"){let s=(i)=>{if(!Fu(i,r(),n(),o()))return;i.preventDefault(),e.post({event:Wu(i),kind:"forwardKey"})};return t.addEventListener("keydown",s,!0),()=>t.removeEventListener("keydown",s,!0)}function Bu(e){return JSON.parse(JSON.stringify(e))}function Ln(e){return e===void 0||e===null?e:Bu(e)}function at(e,t){let n=e;for(let r of t){if(n==null)return;n=n[r]}return n}function lt(e){if(Array.isArray(e))throw TypeError("Cannot insert into a children array; parentPath must point at a node");if(!e.children)e.children=[];if(!Array.isArray(e.children))throw TypeError("Cannot insert into mapped-array children; edit the map template instead");return e.children}function oo(e,t){switch(t.op){case"set-key":{let n=at(e,t.path);if(!n)throw Error(`doc-op-node-not-found:${t.path.join("/")}`);let r=n;if(t.value===void 0)delete r[t.key];else r[t.key]=Ln(t.value);return}case"insert-child":{let n=at(e,t.parentPath);lt(n).splice(t.index,0,Ln(t.node));return}case"remove-child":{let n=at(e,t.parentPath);lt(n).splice(t.index,1);return}case"set-child":{let n=at(e,t.parentPath);lt(n).splice(t.index,1,Ln(t.node));return}case"move-child":{Ku(t);let n=at(e,t.fromParentPath),r=at(e,t.toParentPath),o=lt(n),s=lt(r),[i]=o.splice(t.fromIndex,1);s.splice(t.toIndex,0,i);return}default:break}throw Error(`unknown-doc-op:${t.op}`)}function Ku(e){let t=[...e.fromParentPath,"children",e.fromIndex],n=e.toParentPath;if(n.length>=t.length&&t.every((r,o)=>r===n[o]))throw Error(`doc-op-move-into-self:${n.join("/")}`)}function ct(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e))return e.map((n)=>ct(n));let t={};for(let[n,r]of Object.entries(e)){if(n.startsWith("on")&&Po(r))continue;if(n==="children")t.children=Array.isArray(r)?r.map((o)=>ct(o)):ct(r);else if(n==="cases"&&typeof r==="object"){let o={};for(let[s,i]of Object.entries(r))o[s]=ct(i);t.cases=o}else if(n==="state"&&typeof r==="object"&&r!==null){let o={};for(let[s,i]of Object.entries(r)){if(i&&typeof i==="object"&&i.timing==="server")continue;o[s]=i}t.state=o}else if(n==="style"||n==="attributes"||n==="$media")t[n]=r;else t[n]=r}return t}var so=new WeakMap,In=new Set;function io(e,t,n){let r=Z(e,t);if(r===void 0)throw Error(`iframe-patch-node-not-found:${t.join("/")}`);let o=typeof r==="string"?r:Te(ct(r)),{result:s,stop:i}=xn(()=>de(o,n.defs,{_path:Vu(t,n),onNodeCreated:Hr(n.mapperCtx)}));if(In.add(i),s instanceof HTMLElement)so.set(s,i);return s}function ao(e){let t=[e,...e.querySelectorAll("*")];for(let n of t){if(!(n instanceof HTMLElement))continue;mn(n);let r=so.get(n);if(r)r(),In.delete(r),so.delete(n)}}function ha(){for(let e of In)e();In.clear()}function Vu(e,t){let{mapperCtx:n}=t;if(n.layoutWrapped&&n.pageContentPrefix&&e[0]==="children"){let[,r]=e;return typeof r==="number"?[...n.pageContentPrefix,r+(n.pageContentOffset??0),...e.slice(2)]:[...n.pageContentPrefix,...e.slice(1)]}return e}function ya(e,t,n,r,o){for(let i of t)oo(e,i);if(!o?.length){for(let i of t)ga(e,i,n,r);return}let s=new Set(o.map((i)=>J(i)));for(let i of t){if(i.op==="set-key"&&s.has(J(i.path))){Uu(e,i.path,n);continue}ga(e,i,n,r)}}function Uu(e,t,n){let r=Ea(n,t);if(r)ut(r,Z(e,t))}function lo(e){if(!e)throw Error("iframe-patch-no-render-ctx");return e}function ga(e,t,n,r){switch(t.op){case"set-key":{if(t.key==="style"){Xu(e,t.path,n,r);return}if(t.key==="textContent"){Zu(e,t.path,n);return}if(t.key.startsWith("on"))return;xa(e,t.path,n,lo(r));return}case"insert-child":{qu(e,t.parentPath,t.index,n,lo(r));return}case"set-child":{xa(e,[...t.parentPath,"children",t.index],n,lo(r));return}case"remove-child":{zu(e,t.parentPath,t.index,n);return}case"move-child":{Gu(e,t.fromParentPath,t.fromIndex,t.toParentPath,t.toIndex,n);return}default:throw Error(`iframe-patch-unsupported-op:${JSON.stringify(t)}`)}}function qu(e,t,n,r,o){let s=We(r,t),i=Z(e,t),a=io(e,[...t,"children",n],o);Jn(r,t,n,1),ba(s,a,wa(s,i,n)),ut(s,i)}function xa(e,t,n,r){let o=We(n,t),s=io(e,t,r);ao(o),o.replaceWith(s)}function zu(e,t,n,r){let o=We(r,[...t,"children",n]),s=o.parentElement;if(ao(o),o.remove(),Jn(r,t,n+1,-1),s)ut(s,Z(e,t))}function Gu(e,t,n,r,o,s){let i=[...t,"children",n],a=We(s,i),c=a.parentElement,l=We(s,r);a.remove(),Jn(s,t,n+1,-1);let u=jn(l)??r;Jn(s,u,o,1),Yu(a,i,[...u,"children",o]);let f=Z(e,u);if(ba(l,a,wa(l,f,o)),c)ut(c,Z(e,jn(c)??t));ut(l,f)}function ut(e,t){for(let r of ia)e.classList.remove(r);let n=t?ro(t):null;if(n)e.classList.add(n)}function ba(e,t,n){if(n)n.before(t);else e.append(t)}function wa(e,t,n){let r=t?.textContent,o=r!=null&&String(r)!==""?1:0;return e.childNodes[o+n]??null}function Jn(e,t,n,r){let o=t.length;for(let s of e.querySelectorAll("[data-jx-path]")){let i=jn(s);if(!i||i.length<o+2||i[o]!=="children")continue;let a=i[o+1];if(typeof a!=="number"||a<n)continue;if(!t.every((l,u)=>i[u]===l))continue;let c=[...i];c[o+1]=a+r,s.dataset.jxPath=J(c)}}function Yu(e,t,n){let r=[e,...e.querySelectorAll("[data-jx-path]")];for(let o of r){let s=jn(o);if(!s||s.length<t.length||!t.every((i,a)=>s[a]===i))continue;o.dataset.jxPath=J([...n,...s.slice(t.length)])}}function jn(e){let t=e.dataset.jxPath;return t===void 0?null:q(t)}function Xu(e,t,n,r){let o=We(n,t),s=Z(e,t),i=r?.defs?.$media??{};En(o,Qu(s?.style),i)}function Zu(e,t,n){let r=We(n,t),o=Z(e,t);r.textContent=ef(o),ut(r,o)}function We(e,t){let n=Ea(e,t);if(!n)throw Error(`iframe-patch-element-not-found:${J(t)}`);return n}function Ea(e,t){let r=J(t).replaceAll("\\",String.raw`\\`).replaceAll("'",String.raw`\'`),o=e.querySelector(`[data-jx-path='${r}']`);return o instanceof HTMLElement?o:null}function Qu(e){if(!e||typeof e!=="object")return;let t={};for(let[n,r]of Object.entries(e)){if(typeof r==="string"&&r.includes("${"))continue;t[n]=r}return t}function ef(e){let t=e?.textContent;if(t==null)return"";if(typeof t==="string")return t.includes("${")?Jt(t):t;if(typeof t==="object"&&t.$ref){let n=String(t.$ref);return`{${n.startsWith("#/state/")?n.slice(8):n}}`}return String(t)}function va(e){if(e===void 0)return"undefined";let t;try{t=typeof e==="string"?JSON.stringify(e):JSON.stringify(e)??"undefined"}catch{t=String(e)}if(t.length>48)t=`${t.slice(0,47)}…`;return t}function tf(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&"$expression"in e&&Array.isArray(e.parameters)}function nf(e,t){let n={};for(let r of Object.keys(e))try{let o=e[r];if(typeof o==="function"){if(tf(t?.[r]))n[r]=o;continue}let s=JSON.stringify(o);n[r]=s===void 0?null:JSON.parse(s)}catch{n[r]=null}return n}function rf(e,t,n){if(!n||n.length===0)return e;let r=t,o=e;for(let s of n){if(!r||typeof r!=="object")break;let i=r;if(i.$prototype==="Array"&&s==="map"){let a=i.items,c=a&&typeof a==="object"&&"$ref"in a?Y(a.$ref,o):a;if(Array.isArray(c)&&c.length>0){let l;try{l=structuredClone(c[0])}catch{l=null}let u=Object.create(o);u.$map={index:0,item:l},u["$map/item"]=l,u["$map/index"]=0,o=u}}r=i[s]}return o}function Sa(e,t,n,r){let o=n&&typeof n==="object"?n.state??null:null;return e.map(({id:s,node:i})=>{let a=new Map,c;try{c=rf(nf(t,o),n,r)}catch(l){return{error:l instanceof Error?l.message:String(l),id:s,values:[]}}try{if(!i||typeof i!=="object"||!("operator"in i))throw Error("not an expression node");return ee(i,c,null,void 0,{report:(l,u)=>a.set(l.join("/"),va(u))}),{id:s,values:[...a.entries()]}}catch(l){return{error:l instanceof Error?l.message:String(l),id:s,values:[...a.entries()]}}})}function ka(e){let t={};for(let n of Object.keys(e))try{let r=e[n];if(typeof r==="function")continue;let o=JSON.stringify(r);if(o===void 0){t[n]=null;continue}if(o.length>256000){t[n]="[large value omitted]";continue}t[n]=JSON.parse(o)}catch{t[n]=null}return t}var Ta={"jx-ui:/behaviors/color-area.ts":()=>(V("jqhna8zy"),import("./chunks/color-area-jqhna8zy.js")),"jx-ui:/behaviors/color-field.ts":()=>(V("embq5ctg"),import("./chunks/color-field-embq5ctg.js")),"jx-ui:/behaviors/color-slider.ts":()=>(V("1qmw7wqy"),import("./chunks/color-slider-1qmw7wqy.js")),"jx-ui:/behaviors/combobox.ts":()=>(V("773hdzyj"),import("./chunks/combobox-773hdzyj.js")),"jx-ui:/behaviors/dialog.ts":()=>(V("mtm9fq5t"),import("./chunks/dialog-mtm9fq5t.js")),"jx-ui:/behaviors/listbox.ts":()=>(V("s8fkmnq8"),import("./chunks/listbox-s8fkmnq8.js")),"jx-ui:/behaviors/menu.ts":()=>(V("37d07z9m"),import("./chunks/menu-37d07z9m.js")),"jx-ui:/behaviors/number-field.ts":()=>(V("gw7sq8rn"),import("./chunks/number-field-gw7sq8rn.js")),"jx-ui:/behaviors/action-group.ts":()=>(V("2mqby73c"),import("./chunks/action-group-2mqby73c.js")),"jx-ui:/behaviors/popover.ts":()=>(V("8htra4er"),import("./chunks/popover-8htra4er.js")),"jx-ui:/behaviors/select.ts":()=>(V("n3v7gwas"),import("./chunks/select-n3v7gwas.js")),"jx-ui:/behaviors/split.ts":()=>(V("pff8f3ze"),import("./chunks/split-pff8f3ze.js")),"jx-ui:/behaviors/swatch-group.ts":()=>(V("8qh9a3bm"),import("./chunks/swatch-group-8qh9a3bm.js")),"jx-ui:/behaviors/tabs.ts":()=>(V("jwthg40w"),import("./chunks/tabs-jwthg40w.js")),"jx-ui:/behaviors/toolbar.ts":()=>(V("2nnzqhrj"),import("./chunks/toolbar-2nnzqhrj.js")),"jx-ui:/behaviors/tree.ts":()=>(V("h19v1jfz"),import("./chunks/tree-h19v1jfz.js")),"jx-ui:/behaviors/tooltip.ts":()=>(V("fd6g9xy3"),import("./chunks/tooltip-fd6g9xy3.js")),"jx-ui:/behaviors/textfield.ts":()=>(V("spy3hc77"),import("./chunks/textfield-spy3hc77.js")),"jx-ui:/behaviors/toast.ts":()=>(V("4d35zd64"),import("./chunks/toast-4d35zd64.js")),"jx-ui:/behaviors/toast-host.ts":()=>(V("8sjmfed3"),import("./chunks/toast-host-8sjmfed3.js")),"jx-ui:/color.ts":()=>(V("fpezvnkt"),import("./chunks/color-fpezvnkt.js")),"jx-ui:/icons.ts":()=>(V("p44xhjf0"),import("./chunks/icons-p44xhjf0.js"))};var of;function Aa(e){of=new URL("./",e).href}Aa(import.meta.url);for(let[e,t]of Object.entries(Ta))Xs(e,t);function jt(e,t,n,r){let o=Zr(e.x,e.y,r);if(!o)return null;return Qr(o,e.y,n,t)}function co(e){return[...e.dataTransfer?.types??[]].includes("Files")}var sf={type:"block"},fo={},uo=null;function Ca(e){return e?{...e,versions:fo}:null}function af(e,t){let n=e.dataset?.jxPath;if(n==null)return null;let r=q(n),o=t?Z(t,r):void 0;return{path:r,rect:Fe(e),tagName:(be(o?.tagName)||e.tagName).toLowerCase()}}function lf(e){if(!(e instanceof Element))return null;if(e.closest("[data-jx-path]"))return null;let t=e.closest("[data-jx-layout-region]");if(!(t instanceof HTMLElement))return null;return{className:typeof t.className==="string"?t.className:"",layoutFile:t.dataset.jxLayoutFile??"",layoutPath:q(t.dataset.jxLayoutPath??"[]"),rect:Fe(t),tagName:t.tagName.toLowerCase()}}var cf=new Set(["style","textContent"]);function uf(e){let t=Ji();if(!t)return!1;for(let n of e){let r;if(n.op==="set-key"){if(cf.has(n.key)||n.key.startsWith("on"))continue;r=n.path}else if(n.op==="move-child"){if(r=n.fromParentPath,nt(r,t)||nt(n.toParentPath,t))return!0;continue}else r=n.parentPath;if(nt(r,t))return!0}return!1}var ff=2,df=5000,pf=500;function mf(e){let{channel:t,container:n}=e;fo={},uo=null;let r=null,o=null,s=-1,i=null,a=-1,c="design",l=null,u=null,f=Dn,d=null,m=null,w=-1,y=-1,h=0,x=null,S=n.ownerDocument.defaultView;function A(){if(h&&S)S.cancelAnimationFrame(h);h=0,x=null}function C(){h=0;let p=x?.src??m;if(!S||!x||!p||!i)return;let D=eo(x.y,S.innerHeight);if(D===0)return;let L=S.scrollY;if(S.scrollBy(0,D*Xi),S.scrollY===L)return;let re=jt(x,p,i,n.ownerDocument);t.post({...x.withCursor?{cursor:{x:x.x,y:x.y}}:{},dragSeq:x.dragSeq,gen:x.gen??w,kind:"dragOver",preview:re}),h=S.requestAnimationFrame(C)}function T(p,D,L){if(!S||eo(p.y,S.innerHeight)===0){A();return}if(x={dragSeq:D,withCursor:L!=null,x:p.x,y:p.y,...L?{gen:L.gen,src:L.src}:{}},!h)h=S.requestAnimationFrame(C)}let g=Yi(t,n.ownerDocument,{getGen:()=>a,getMode:()=>c,getShadowDoc:()=>i}),v=(p)=>{if(c!=="design"&&c!=="edit")return;let D=lf(p.target);if(D)t.post({hit:D,kind:"layoutHit"})};n.ownerDocument.addEventListener("click",v,!0);let P=ma(t,n.ownerDocument,me,()=>f,()=>c),E=ua(t,n,{getMode:()=>c,getShadowDoc:()=>i}),_=fa(t,n.ownerDocument),R=yi(n),I=30000,te=-1;function b(){let p=n.querySelectorAll("[data-jx-popover][data-jx-popover-open], dialog[data-jx-dialog-open]"),D=oe(n),L=0;for(let re of p)L=Math.max(L,oe(re).bottom-D.top);return L}function k(){let p=Math.max(n.scrollHeight,b()),D=Math.min(p,I);if(D>0&&Math.abs(D-te)>=1){te=D;let L=n.firstElementChild,re=L instanceof HTMLElement&&L.dataset.jxDefinitionRoot!==void 0;t.post({fragment:re,height:D,kind:"contentHeight"}),Be()}}let N=S?.ResizeObserver,F=N?new N(()=>k()):null,B=n.ownerDocument,X=0,ne=0,Ae=0,Ht="",ae=new Map;function Pa(){let p=Date.now();for(let[D,L]of ae)if(L<=p)ae.delete(D);return ae.size}function Ra(){return{animations:typeof B.getAnimations==="function"?B.getAnimations().filter((D)=>D.playState==="running").length:0,fonts:B.fonts?B.fonts.status==="loaded":!0,gen:a,images:Pa(),kind:"idle"}}function po(){X=0;let p=Ra(),D=`${p.gen}|${p.fonts}|${p.animations}|${p.images}`,L=D!==Ht;if(L)Ht=D,t.post(p);if(ne=p.fonts&&p.animations===0&&p.images===0?L?1:ne+1:0,ne>=ff){k();return}if(Date.now()>=Ae)return;X=S?S.requestAnimationFrame(po):0}function Be(){if(ne=0,Ae=Date.now()+df,!X&&S)X=S.requestAnimationFrame(po)}let mo=(p)=>{if(p.target instanceof HTMLImageElement)ae.set(p.target,Date.now()+pf),Be()},ho=(p)=>{if(p.target instanceof HTMLImageElement&&ae.delete(p.target))Be()};n.addEventListener("error",mo,!0),n.addEventListener("load",ho,!0),Be(),F?.observe(n);let go=(p)=>{if(c==="preview"){if(p.ctrlKey||p.metaKey)p.preventDefault();return}p.preventDefault(),t.post({ctrlKey:p.ctrlKey,deltaX:p.deltaX,deltaY:p.deltaY,kind:"forwardWheel",metaKey:p.metaKey,shiftKey:p.shiftKey,x:p.clientX,y:p.clientY})};n.ownerDocument.addEventListener("wheel",go,{passive:!1});let $a=300,xo=0,yo=(p,D)=>{p.preventDefault(),p.stopPropagation();let L={x:p.clientX,y:p.clientY},re=n.ownerDocument,O=Zr(L.x,L.y,re),ye=O?af(O,i):null,Wt=i&&O?Qr(O,L.y,i,sf):null;if(D==="fileDragOver"){if(p.dataTransfer)p.dataTransfer.dropEffect="copy";t.post({hit:ye,kind:"fileDragOver",preview:Wt});return}t.post({files:[...p.dataTransfer?.files??[]],hit:ye,kind:"fileDrop",preview:Wt})},Ft=(p)=>{if(!m){if(co(p)){yo(p,"fileDragOver");return}let re=Date.now();if(re-xo>=$a)xo=re,t.post({kind:"nativeDragEnter"});return}if(p.preventDefault(),p.dataTransfer)p.dataTransfer.dropEffect="move";let D={x:p.clientX,y:p.clientY},L=i?jt(D,m,i,n.ownerDocument):null;t.post({cursor:D,dragSeq:y,gen:w,kind:"dragOver",preview:L}),T(D,y)},bo=(p)=>{if(!m){if(co(p))yo(p,"fileDrop");return}p.preventDefault();let D={x:p.clientX,y:p.clientY},L=i?jt(D,m,i,n.ownerDocument):null;t.post({dragSeq:y,gen:w,instruction:L?.instruction??null,kind:"dropResult",targetPath:L?.targetPath??null}),m=null,w=-1,y=-1,A()},wo=(p)=>{if(!m&&co(p)&&!p.relatedTarget)t.post({kind:"fileDragLeave"})};n.ownerDocument.addEventListener("dragenter",Ft,!0),n.ownerDocument.addEventListener("dragover",Ft,!0),n.ownerDocument.addEventListener("dragleave",wo,!0),n.ownerDocument.addEventListener("drop",bo,!0);let Na=t.onMessage((p)=>{if(p.kind==="measure"){let{hidden:O,hits:ye}=Gi(p.paths,n.ownerDocument);t.post({hidden:O,hits:ye,kind:"geometry",reqId:p.reqId});return}if(p.kind==="evalExpr"){let O=p.gen===a&&d&&i?Sa(p.exprs,d.defs,i,p.contextPath):[];t.post({gen:p.gen,kind:"evalResult",reqId:p.reqId,results:O});return}if(p.kind==="patch"){let{gen:O}=p;if(O<a){t.post({gen:O,kind:"patchError",message:"patch-behind-render"});return}if(O>a||!i||!d){t.post({gen:O,kind:"patchError",message:"patch-ahead-of-render"});return}let ye=new Set((p.echoPaths??[]).map((Oe)=>J(Oe))),Wt=ye.size===0?p.forwardOps:p.forwardOps.filter((Oe)=>!(Oe.op==="set-key"&&ye.has(J(Oe.path)))),Eo=me()&&uf(Wt),vo=Eo?Nn(n,He):null;if(Eo)xe();try{if(ya(i,p.forwardOps,n,d,p.echoPaths),_t(n,l),tt(n,u),vo)It(n,vo);t.post({gen:O,kind:"patchComplete"}),Be()}catch(Oe){t.post({gen:O,kind:"patchError",message:String(Oe?.message??Oe)})}return}if(p.kind==="styleUpdate"){if(p.gen!==a||!i)return;i.style=p.style;let O=n.firstElementChild;if(O instanceof HTMLElement)En(O,p.style,i.$media??{});return}if(p.kind==="dragStart"){m=p.src,w=p.gen,y=p.dragSeq;return}if(p.kind==="dragEnd"||p.kind==="dragCancel"){m=null,w=-1,y=-1,A();return}if(p.kind==="dragMove"){let O=m&&i?jt(p.cursor,m,i,n.ownerDocument):null;t.post({dragSeq:p.dragSeq,gen:w,kind:"dragOver",preview:O}),T(p.cursor,p.dragSeq);return}if(p.kind==="drop"){let O=m&&i?jt(p.cursor,m,i,n.ownerDocument):null;t.post({dragSeq:p.dragSeq,gen:w,instruction:O?.instruction??null,kind:"dropResult",targetPath:O?.targetPath??null}),m=null,w=-1,y=-1,A();return}if(p.kind==="assetVersions"){fo=p.versions;let O=Ca(uo);if(O)yn((ye)=>$t(ye,O));return}if(p.kind==="keymap"){f={chords:p.chords,mac:p.mac};return}if(p.kind==="setColorScheme"){jr(n.ownerDocument,p.scheme);return}if(p.kind==="setPopoverOpen"){if(c==="preview")return;l=p.path===null?null:J(p.path),_t(n,l),tt(n,u),k();return}if(p.kind==="setDialogOpen"){if(c==="preview")return;u=p.path===null?null:J(p.path),tt(n,u),k();return}if(p.kind==="redefineElement"){ai(p.doc,p.base);return}if(p.kind==="setLocale"){let O=n.ownerDocument.documentElement;if(p.locale===null)O.removeAttribute("lang"),O.removeAttribute("dir");else O.setAttribute("lang",p.locale),O.setAttribute("dir",p.dir);return}if(p.kind==="siteStyleUpdate"){Jr(p.siteStyle,p.media);return}if(p.kind!=="render"||p.gen<s)return;if(jr(n.ownerDocument,p.colorScheme??null),me())xe();s=p.gen,uo=p.assets??null,Di(p.editableTags??null);let{gen:D,mapperCtx:L}=p,re=p.shadowDoc;(async()=>{try{if(ha(),o?.(),o=null,r?.dispose(),ni(n.ownerDocument),r=await bi({assets:Ca(p.assets??null),container:n,doc:p.doc,docBase:p.docBase,mapperCtx:{arrayPaths:new Set(L.arrayPaths),canvasMode:L.canvasMode,layoutWrapped:L.layoutWrapped,pageContentOffset:L.pageContentOffset,pageContentPrefix:L.pageContentPrefix},diffMarks:p.diffMarks??null,mode:p.mode,popoverOpen:p.popoverOpen?J(p.popoverOpen):null,dialogOpen:p.dialogOpen?J(p.dialogOpen):null,siteStyle:p.siteStyle,...p.allowAutoRequests?{allowAutoRequests:!0}:{}}),D===s){l=p.popoverOpen?J(p.popoverOpen):null,u=p.dialogOpen?J(p.dialogOpen):null,_t(n,l),tt(n,u),i=re,d=r.ctx,a=D,c=p.mode,t.post({gen:D,kind:"renderComplete"}),Be();let O=r.ctx.defs;o=Fs(()=>{try{t.post({gen:D,kind:"dataScope",scope:ka(O)})}catch{}}),k()}}catch(O){t.post({gen:D,kind:"renderError",message:String(O?.message??O)})}})()});return t.post({kind:"ready"}),()=>{if(Na(),g(),P(),E(),_(),R(),X&&S)S.cancelAnimationFrame(X);X=0,n.removeEventListener("error",mo,!0),n.removeEventListener("load",ho,!0),A(),F?.disconnect(),n.ownerDocument.removeEventListener("click",v,!0),n.ownerDocument.removeEventListener("wheel",go),n.ownerDocument.removeEventListener("dragenter",Ft,!0),n.ownerDocument.removeEventListener("dragleave",wo,!0),n.ownerDocument.removeEventListener("dragover",Ft,!0),n.ownerDocument.removeEventListener("drop",bo,!0),o?.(),r?.dispose()}}function hf(e){let t=new URLSearchParams(e.location.search);js(t.get("rpcToken"));let n=t.get("parentOrigin"),r=n||"*";if(!n)console.warn("[jx-canvas] no parentOrigin in iframe URL — accepting messages from any origin (token-gated). "+"The parent origin did not round-trip; the channel relies on the shared token alone.");let o=e.document.querySelector("#jx-canvas-root")??e.document.body,s=ko({acceptOrigin:r,source:e,target:e.parent,targetOrigin:r,token:t.get("token")||""});return mf({channel:s,container:o})}if(typeof window<"u"&&window.parent!==window)hf(window);export{ff as IDLE_QUIET_FRAMES,df as IDLE_WATCH_MAX_MS,pf as IMAGE_RETRY_WINDOW_MS,hf as bootCanvasIframe,af as fileDropHitFor,co as isExternalFileDrag,lf as layoutHitFor,uf as patchDisturbsActiveEdit,mf as startCanvasIframe};
|
|
309
|
+
`;function gu(o,a){let c=o.head.querySelector(`#${Ls}`);if(a!=="stylebook"){c?.remove();return}if(c)return;let d=o.createElement("style");d.id=Ls,d.textContent=hu,o.head.append(d)}function Zr(o,a={}){let c=document.head.querySelector(`#${Xr}`);if(!o||!n(o)){c?.remove();return}let d=Ms(o,a,An);if(c){c.textContent=d;return}let p=document.createElement("style");p.id=Xr,p.textContent=d,document.head.append(p)}function Qr(o,a){if(a)o.documentElement.dataset.colorScheme=a;else delete o.documentElement.dataset.colorScheme}function zt(o,a){for(let d of o.querySelectorAll("[data-jx-popover-open]"))delete d.dataset.jxPopoverOpen;if(a===null)return;let c=o.querySelector(`[data-jx-popover]${nt(a)}`);if(c)c.dataset.jxPopoverOpen=""}function yt(o,a){for(let d of o.querySelectorAll("[data-jx-dialog-open]"))delete d.dataset.jxDialogOpen;if(a===null)return;let c=o.querySelector(`dialog${nt(a)}`);if(c)c.dataset.jxDialogOpen=""}function xu(o,a=null){let c=o.$head;if(!Array.isArray(c))return;for(let d of c){if(!n(d)||!d.tagName)continue;let p=String(d.tagName).toLowerCase();if(p==="script"&&!d.attributes?.src)continue;let m={...d.attributes};for(let E of["href","src"]){let y=m[E];if(!e(y)||y==="")continue;if(!y.startsWith("/")&&!y.startsWith(".")&&!y.startsWith("http")){m[E]=`/node_modules/${y}`;continue}m[E]=Kt(y,a)??y}let h=`${p}${m.href?`[href="${String(m.href)}"]`:""}${m.src?`[src="${String(m.src)}"]`:""}`;if(h!==p&&document.head.querySelector(h))continue;let g=document.createElement(p);for(let[E,y]of Object.entries(m))g.setAttribute(E,String(y));if(d.textContent)g.textContent=String(d.textContent);document.head.append(g)}}function eo(o){let a=[],c=(d)=>a.some((p)=>d.length>p.length&&p.every((m,h)=>d[h]===m));return(d,p,m)=>{if(!(d instanceof HTMLElement))return;let h=p.length===0&&n(m)&&e(m.tagName)&&m.tagName.includes("-");if(h)d.dataset.jxDefinitionRoot="";let g=!h&&d.tagName.includes("-")&&Fn(o.canvasMode);if(g)d.contentEditable="false",a.push(p);let E=Rs(p,m,o);if(E.kind==="layout"){if(d.dataset.jxLayoutPath=ae(E.layoutPath),E.layoutFile)d.dataset.jxLayoutFile=E.layoutFile;if(E.chrome){if(d.dataset.jxLayoutRegion="",Fn(o.canvasMode))d.contentEditable="false"}return}if(d.dataset.jxPath=ae(E.path),!g&&Fn(o.canvasMode)&&c(p))d.contentEditable="true"}}function Is(o,a=3){let c=new WeakMap,d=(p)=>{let m=p.target;if(!(m instanceof HTMLImageElement))return;if(!m.src||m.src.startsWith("data:"))return;let h=(c.get(m)??0)+1;if(h>a)return;c.set(m,h),setTimeout(()=>{let g=m.src;m.src="",m.src=g},150*h)};return o.addEventListener("error",d,!0),()=>o.removeEventListener("error",d,!0)}async function js(o){let a=o.assets??null;Mn(a?(h)=>Kt(h,a):null),ts(o.mode!=="preview"),rs(o.mode!=="preview"&&!o.allowAutoRequests),ls(!0),us(o.mode!=="preview"&&o.mode!=="stylebook"),ds(o.mode!=="preview"),fs(o.mode!=="preview"),ms(o.mode==="design"||o.mode==="edit"),Zr(o.siteStyle,o.doc.$media??{}),xu(o.doc,a),au(o.container.ownerDocument,o.mode),cu(o.container.ownerDocument,o.mode),pu(o.container.ownerDocument,o.mode),gu(o.container.ownerDocument,o.mode),du(o.container.ownerDocument,Boolean(o.diffMarks?.length)),Ns(o.doc.$media??{}),await iu(o.doc,o.docBase);let c=await _n(o.doc,{},o.docBase),d=eo(o.mapperCtx),{result:p,stop:m}=kn(()=>Me(o.doc,c,{_path:[],onNodeCreated:d}));return o.container.replaceChildren(p),zt(o.container,o.popoverOpen??null),yt(o.container,o.dialogOpen??null),mu(o.container,o.mode),fu(o.container,o.diffMarks??null),{ctx:{defs:c,docBase:o.docBase,mapperCtx:o.mapperCtx,mode:o.mode},dispose:m}}function yu(o){return JSON.parse(JSON.stringify(o))}function Vn(o){return o===void 0||o===null?o:yu(o)}function xe(o,a){let c=o;for(let d of a){if(c==null)return;c=c[d]}return c}function Hs(o){if(Array.isArray(o))throw TypeError("Cannot insert into a children array; parentPath must point at a node");if(!o.children)o.children=[];if(!Array.isArray(o.children))throw TypeError("Cannot insert into mapped-array children; edit the map template instead");return o.children}function to(o,a){let{op:c}=a;switch(a.op){case"set-key":{let d=xe(o,a.path);if(!d)throw Error(`doc-op-node-not-found:${a.path.join("/")}`);if(a.value===void 0)delete d[a.key];else d[a.key]=Vn(a.value);return}case"insert-child":{Gt(o,a.parentPath).splice(a.index,0,Vn(a.node));return}case"remove-child":{Gt(o,a.parentPath).splice(a.index,1);return}case"set-child":{Gt(o,a.parentPath).splice(a.index,1,Vn(a.node));return}case"move-child":{bu(a);let d=Gt(o,a.fromParentPath),p=Gt(o,a.toParentPath),[m]=d.splice(a.fromIndex,1);p.splice(a.toIndex,0,m);return}default:break}throw Error(`unknown-doc-op:${c}`)}function Gt(o,a){let c=xe(o,a);if(c==null)throw TypeError(`doc-op-node-not-found:${a.join("/")}`);return Hs(c)}function bu(o){let a=[...o.fromParentPath,"children",o.fromIndex],c=o.toParentPath;if(c.length>=a.length&&a.every((d,p)=>d===c[p]))throw Error(`doc-op-move-into-self:${c.join("/")}`)}function Fs(o){return o.length>=2?o.slice(0,-2):null}function Vs(o){return o.at(-1)}function Ws(o,a){if(o===a)return!0;if(!o||!a||o.length!==a.length)return!1;return o.every((c,d)=>c===a[d])}function bt(o,a){if(o.length>a.length)return!1;return o.every((c,d)=>c===a[d])}var Wn=14,Su="empty-container-placeholder";function Bs(o){let a=Pe(o);return{height:a.height,width:a.width,x:a.x,y:a.y}}function vu(o){let a=getComputedStyle(o),{display:c}=a,d=c==="flex"||c==="inline-flex",p=c==="grid"||c==="inline-grid";return d&&a.flexDirection.startsWith("row")||p&&a.gridAutoFlow.startsWith("column")}function qs(o,a,c){let d=o.dataset.jxPath;if(d==null)return null;let p=ge(d);if(o.classList.contains(Su))return[{edge:"center",index:0,insertParentPath:p,rect:Bs(o)}];let m=Fs(p);if(!m)return null;let h=o.parentElement;if(!h)return null;let g=Vs(p);if(!s(g))return null;let E=Bs(o);if(vu(h)){let w=a.x-E.x;if(w<Wn)return[Bn("left",m,g,Ks(E,!0))];if(E.width-w<Wn)return[Bn("right",m,g+1,Us(E,!0))];return null}let y=a.y-E.y;if(y<Wn)return[Bn("top",m,g,Ks(E,!1))];if(E.height-y<Wn)return[Bn("bottom",m,g+1,Us(E,!1))];return null}function Bn(o,a,c,d){return{edge:o,index:c,insertParentPath:a,rect:d}}function Ks(o,a){return a?{height:o.height,width:0,x:o.x,y:o.y}:{height:0,width:o.width,x:o.x,y:o.y}}function Us(o,a){return a?{height:o.height,width:0,x:o.x+o.width,y:o.y}:{height:0,width:o.width,x:o.x,y:o.y+o.height}}function zs(o){if(!o||o.length===0)return"none";return o.map((a)=>`${a.edge}:${a.insertParentPath.join("/")}:${a.index}`).join("|")}var Kn=new Set(["strong","em","b","i","u","del","s","strike","code","sub","sup","span"]);function no(o){return o.nodeType===Node.ELEMENT_NODE}function Gs(o){return o.nodeType===Node.TEXT_NODE}function Xs(o,a){if(!a)return!1;if(a.contentEditable==="plaintext-only")return!1;let c=window.getSelection();if(!c||!c.rangeCount)return!1;let{anchorNode:d,focusNode:p}=c;if(!d||!p)return!1;if(!a.contains(d)||!a.contains(p))return!1;let m=(h)=>{let g=h;while(g&&g!==a){if(no(g)&&g.tagName.toLowerCase()===o)return!0;g=g.parentNode}return!1};return m(d)&&m(p)}function Zs(o,a){if(!a)return;let c=window.getSelection();if(!c||!c.rangeCount)return;let d=c.getRangeAt(0);if(d.collapsed)return;if(!a.contains(d.commonAncestorContainer))return;Mu(d);let p=Eu(o,d,a);if(p.length>0)wu(o,d,a,p);else Tu(o,d,a);St(a)}function Eu(o,a,c){let d=[];for(let p of c.querySelectorAll("*"))if(p.tagName.toLowerCase()===o&&a.intersectsNode(p))d.push(p);return d}function wu(o,a,c,d){for(let p=d.length-1;p>=0;p--){let m=d[p];Qs(m)}}function Qs(o){if(!o.parentNode)return;let c=document.createDocumentFragment();while(o.firstChild)c.append(o.firstChild);o.replaceWith(c)}function Tu(o,a,c){let d=a.extractContents(),p=Cu(d),m=Au(d);if(!d.hasChildNodes()){if(p)a.insertNode(document.createTextNode(p));if(m){let y=document.createTextNode(m);a.collapse(!1),a.insertNode(y)}return}let h=document.createElement(o);h.append(d);let g=document.createDocumentFragment();if(p)g.append(document.createTextNode(p));if(g.append(h),m)g.append(document.createTextNode(m));a.insertNode(g);let E=window.getSelection();if(E){E.removeAllRanges();let y=document.createRange();y.selectNodeContents(h),E.addRange(y)}}function Cu(o){let a=o.firstChild;if(!a||a.nodeType!==Node.TEXT_NODE)return null;let c=a.textContent??"",d=c.match(/^(\s+)/);if(!d)return null;let p=d[1];if(c.length===p.length)a.remove();else a.textContent=c.slice(p.length);return p}function Au(o){let a=o.lastChild;if(!a||a.nodeType!==Node.TEXT_NODE)return null;let c=a.textContent??"",d=c.match(/(\s+)$/);if(!d)return null;let p=d[1];if(c.length===p.length)a.remove();else a.textContent=c.slice(0,-p.length);return p}function St(o){if(!o)return;let a=!0,c=0;while(a&&c<10){if(a=!1,c+=1,o.normalize(),Pu(o))a=!0;if(Nu(o))a=!0;if(Ru(o))a=!0;if($u(o))a=!0;if(Ou(o))a=!0}}function Pu(o){let a=!1,c=[];for(let d of o.querySelectorAll("*")){let p=d.nextSibling;if(p&&no(p)&&p.tagName===d.tagName&&Kn.has(d.tagName.toLowerCase())&&ku(d,p))c.push([d,p])}for(let d=c.length-1;d>=0;d--){let[p,m]=c[d];while(m.firstChild)p.append(m.firstChild);m.remove(),a=!0}return a}function Nu(o){let a=!1,c=[];for(let d of o.querySelectorAll("*")){if(!Kn.has(d.tagName.toLowerCase()))continue;let p=d.firstChild;if(d.childNodes.length===1&&p!==null&&no(p)&&p.tagName===d.tagName)c.push(d)}for(let d of c){let p=d.firstChild;if(p===null)throw TypeError("collapseRedundantNesting: an earlier collapse emptied this wrapper");while(p.firstChild)p.before(p.firstChild);p.remove(),a=!0}return a}function Ru(o){let a=!1,c=[];for(let d of o.querySelectorAll("*")){if(!Kn.has(d.tagName.toLowerCase()))continue;if(d.childNodes.length===0&&!d.textContent)c.push(d)}for(let d of c)d.remove(),a=!0;return a}function $u(o){let a=!1,c=[];for(let d of o.querySelectorAll("*")){if(!Kn.has(d.tagName.toLowerCase()))continue;if(d===o)continue;let p=d.firstChild;if(p&&Gs(p)){let h=p.textContent,g=h.match(/^(\s+)/);if(g&&h.length>g[1].length)c.push({el:d,text:p,type:"lift-leading",ws:g[1]})}let m=d.lastChild;if(m&&Gs(m)&&m!==p){let h=m.textContent,g=h.match(/(\s+)$/);if(g&&h.length>g[1].length)c.push({el:d,text:m,type:"lift-trailing",ws:g[1]})}}for(let d of c){if(d.type==="lift-leading")d.text.textContent=d.text.textContent.slice(d.ws.length),d.el.parentNode?.insertBefore(document.createTextNode(d.ws),d.el);else d.text.textContent=d.text.textContent.slice(0,-d.ws.length),d.el.parentNode?.insertBefore(document.createTextNode(d.ws),d.el.nextSibling);a=!0}return a}function Ou(o){let a=!1,c=[];for(let d of o.querySelectorAll("*")){if(d.tagName.toLowerCase()!=="span")continue;if(d===o)continue;if(d.attributes.length>0)continue;c.push(d)}for(let d of c)Qs(d),a=!0;return a}function ku(o,a){if(o.tagName.toLowerCase()==="a")return o.getAttribute("href")===a.getAttribute("href");return!0}function Mu(o){Ys(o,!0),Ys(o,!1)}function Ys(o,a){let c=a?o.startContainer:o.endContainer,d=a?o.startOffset:o.endOffset;if(c.nodeType!==Node.TEXT_NODE)return;let p=c.textContent??"",m=_u(p);for(let h of m)if(a){if(d>h.start&&d<h.end)o.setStart(c,h.start)}else if(d>h.start&&d<h.end)o.setEnd(c,h.end)}function _u(o){let a=[],c=0;while(c<o.length-1){if(o[c]==="$"&&o[c+1]==="{"){let d=c,p=1,m=c+2;while(m<o.length&&p>0){if(o[m]==="{")p+=1;else if(o[m]==="}")p-=1;m+=1}if(p===0){a.push({end:m,start:d}),c=m;continue}}c+=1}return a}var Un=(o,a)=>document.execCommand(o,!1,a);function ea(o){return o.nodeType===Node.ELEMENT_NODE&&o.nodeName.toLowerCase()==="a"}function ta(o){let a=window.getSelection();if(!a||!a.rangeCount)return{active:!1,href:null};let c=a.anchorNode;while(c&&c!==o){if(ea(c))return{active:!0,href:c.dataset.jxHref??c.getAttribute("href")};c=c.parentNode}return{active:!1,href:null}}function Ju(o){let a=window.getSelection();if(!a||!a.rangeCount)return null;let c=a.anchorNode;while(c&&c!==o){if(ea(c))return c;c=c.parentNode}return null}function na(o,a){let c=Ju(o);if(c)if(a)c.setAttribute("href",a);else{let d=document.createDocumentFragment();while(c.firstChild)d.append(c.firstChild);c.replaceWith(d)}else if(a)Un("createLink",a);St(o)}function ra(o,a){o.focus(),Un("insertText",`\${${a}}`)}var oa={$id:"elements-meta",title:"HTML Element Metadata",description:"Inline scoping and inline toolbar action metadata for HTML elements.",$convertGroups:{text:["p","h1","h2","h3","h4","h5","h6","blockquote"],container:["div","section","article","aside","main","header","footer","nav","search"],list:["ul","ol"]},$defs:{p:{$convertTo:"text",$convertToWhenEmpty:["text","container"],$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:[{tag:"strong",label:"Bold",command:"bold"},{tag:"em",label:"Italic",command:"italic"},{tag:"u",label:"Underline",command:"underline"},{tag:"del",label:"Strikethrough",command:"strikethrough"},{tag:"sup",label:"Superscript",command:"superscript"},{tag:"sub",label:"Subscript",command:"subscript"},{tag:"code",label:"Code",command:"code"},{tag:"a",label:"Link",command:"link"}]},h1:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:[{tag:"strong",label:"Bold",command:"bold"},{tag:"em",label:"Italic",command:"italic"},{tag:"code",label:"Code",command:"code"},{tag:"a",label:"Link",command:"link"}]},h2:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h3:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h4:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h5:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},h6:{$convertTo:"text",$inlineChildren:["em","strong","code","a","span","br","b","i","u","sub","sup"],$inlineActions:"h1"},li:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},td:{$inlineChildren:["em","strong","del","code","a","span","br","b","i","u","sub","sup","s"],$inlineActions:"p"},th:{$inlineChildren:["em","strong","del","code","a","span","br","b","i","u","sub","sup","s"],$inlineActions:"p"},blockquote:{$convertTo:"text",$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},figcaption:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},caption:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},summary:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},dt:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},dd:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},label:{$inlineChildren:["em","strong","del","code","a","span","br","img","b","i","u","sub","sup","s"],$inlineActions:"p"},a:{$inlineChildren:["em","strong","code","span","br","b","i","u","sub","sup"],$inlineActions:[{tag:"strong",label:"Bold",command:"bold"},{tag:"em",label:"Italic",command:"italic"},{tag:"code",label:"Code",command:"code"}]},span:{$inlineChildren:["em","strong","del","code","a","br","b","i","u","sub","sup","s"],$inlineActions:"p"},div:{$convertTo:"container",$convertToWhenEmpty:["container","text"],$inlineChildren:[]},section:{$convertTo:"container",$inlineChildren:[]},article:{$convertTo:"container",$inlineChildren:[]},nav:{$convertTo:"container",$inlineChildren:[]},main:{$convertTo:"container",$inlineChildren:[]},header:{$convertTo:"container",$inlineChildren:[]},footer:{$convertTo:"container",$inlineChildren:[]},aside:{$convertTo:"container",$inlineChildren:[]},ul:{$convertTo:"list",$inlineChildren:[]},ol:{$convertTo:"list",$inlineChildren:[]},pre:{$inlineChildren:["code"]},table:{$inlineChildren:[]},thead:{$inlineChildren:[]},tbody:{$inlineChildren:[]},tr:{$inlineChildren:[]}}};var ia=oa.$defs,Lu=new Set(["pre"]),Iu=new Set(Object.entries(ia).filter(([o,a])=>!Lu.has(o)&&(a.$inlineChildren?.length??0)>0).map(([o])=>o));function sa(o,a){return a?.[o.toLowerCase()]??Iu.has(o.toLowerCase())}var ju={dismiss:()=>{},isOpen:()=>!1,show:()=>{}},Xe=ju;function ro(o){Xe=o}var te=null,Ne=null,vt=null,Yt=null,Et=null,Ye=null,_e=!1,Zt="",Xt=!1,la=null;function ca(o){la=o}function rt(o){return sa(o.tagName,la)}function oo(o,a,c,d){if(te)Ie(!0);if(te=o,Ne=a,vt=c.onCommit,Yt=c.onSplit,Et=c.onInsert,Ye=c.onEnd,_e=d?.plainText===!0,Zt=_e?o.textContent:"",Xt=!1,o.dataset.jxActiveBlock="",_e){try{o.contentEditable="plaintext-only"}catch{o.contentEditable="true"}o.focus()}o.addEventListener("keydown",io),o.addEventListener("input",so),o.addEventListener("paste",ao)}function Ie(o=!1){if(!te)return;if(ga(!1),Xe.dismiss(),delete te.dataset.jxActiveBlock,_e)te.contentEditable="false";if(te.removeEventListener("keydown",io),te.removeEventListener("input",so),te.removeEventListener("paste",ao),te=null,Ne=null,vt=null,Yt=null,Et=null,_e=!1,Zt="",Xt=!1,o)Ye=null;else if(Ye){let a=Ye;Ye=null,a()}}function ua(){ga(!0)}function da(){return _e&&te!==null}function Je(){return te!==null}function wt(){return te}function fa(){return Ne}function pa(){return Xe.isOpen()}function io(o){if(_e){if(o.key==="Escape"){if(o.preventDefault(),o.stopPropagation(),te)te.textContent=Zt;Ie();return}if(o.key==="Enter"){o.preventDefault(),o.stopPropagation(),Ie();return}if((o.ctrlKey||o.metaKey)&&["b","i","u","`"].includes(o.key))o.preventDefault()}}function so(){if(Xe.isOpen())uo()}function ao(o){o.preventDefault();let a=o.clipboardData?.getData("text/plain")??"";Un("insertText",a)}function ma(){if(!Yt||!te||!Ne)return!1;let o=window.getSelection();if(!o||!o.rangeCount)return!1;let a=o.getRangeAt(0),c=document.createRange();c.setStart(te,0),c.setEnd(a.startContainer,a.startOffset);let d=document.createRange();d.setStart(a.endContainer,a.endOffset),d.setEnd(te,te.childNodes.length);let p=aa(c.cloneContents()),m=aa(d.cloneContents()),h=[...Ne],g=Yt;return ha(),g(h,p,m),!0}function ha(){if(!te)return;if(delete te.dataset.jxActiveBlock,_e)te.contentEditable="false";if(te.removeEventListener("keydown",io),te.removeEventListener("input",so),te.removeEventListener("paste",ao),te=null,Ne=null,vt=null,Yt=null,Et=null,_e=!1,Zt="",Xt=!1,Ye){let o=Ye;Ye=null,o()}}function ga(o){if(!vt||!te||!Ne)return;if(_e){let c=te.textContent.replaceAll(`
|
|
310
|
+
`," ");if(c===Zt.replaceAll(`
|
|
311
|
+
`," ")&&!Xt)return;Xt=!0,vt(Ne,null,c,o);return}St(te);let a=xa(te);vt(Ne,a.children??null,a.textContent??null,o)}function Hu(o){if(!Array.isArray(o.children)||o.children.length===0)return{textContent:""};let a=[];for(let c of o.children){let d=a.at(-1);if(e(c)&&e(d))a[a.length-1]=d+c;else a.push(c)}if(a.every((c)=>e(c)))return{textContent:a.join("")};return{children:a}}function xa(o){let a=o.childNodes;if(a.length===0)return{textContent:""};if(a.length===1&&a[0].nodeType===Node.TEXT_NODE)return{textContent:a[0].textContent};let c=[];for(let d of a){let p=lo(d);if(p!==null)c.push(p)}return Hu({children:c})}function Fu(o){return o.nodeType===Node.ELEMENT_NODE&&"dataset"in o}var Vu=new Map([["b","strong"],["i","em"],["s","del"],["strike","del"]]);function lo(o){if(o.nodeType===Node.TEXT_NODE){let g=o.textContent;if(!g)return null;return g}if(!Fu(o))return null;let a=o,c=a.tagName.toLowerCase(),d={tagName:c},p=Vu.get(c);if(p)d.tagName=p;let m=a.dataset.jxHref??a.getAttribute("href");if(c==="a"&&m!=null){if(d.attributes={href:m},"title"in a&&e(a.title)&&a.title)d.attributes.title=a.title}if(c==="code")return d.textContent=a.textContent,d;let{childNodes:h}=a;if(h.length===0)d.textContent="";else if(h.length===1&&h[0].nodeType===Node.TEXT_NODE)d.textContent=h[0].textContent;else{d.children=[];for(let g of h){let E=lo(g);if(E)d.children.push(E)}}return d}function aa(o){let a=o.childNodes;if(a.length===0)return{textContent:""};if(a.length===1&&a[0].nodeType===Node.TEXT_NODE)return{textContent:a[0].textContent};let c=[];for(let p of a){let m=lo(p);if(m)c.push(m)}let[d]=c;if(c.length===1&&d!==void 0&&!e(d)&&d.tagName==="span"&&e(d.textContent))return{textContent:d.textContent};return c.length>0?{children:c}:{textContent:""}}function zn(o){let a=document.createRange();return a.setStart(te,0),a.setEnd(o.startContainer,o.startOffset),a.toString()}var ya=0,qn=!0;function co(o){if(!te||!Et||!Ne)return;if(_e)return;let a=window.getSelection();if(!a||!a.rangeCount)return;let c=a.getRangeAt(0);qn=o?.anchored!==!1,ya=zn(c).length;let d={onSelect:Sa};if(!qn)d.showFilter=!0;Xe.show(te,"",d)}function ba(o){if(o.key!=="/"||o.ctrlKey||o.metaKey||!te)return;let a=window.getSelection();if(!a||a.rangeCount===0)return;let c=zn(a.getRangeAt(0));if(c===""||c.endsWith(" ")||c.endsWith(`
|
|
312
|
+
`))requestAnimationFrame(()=>co())}function uo(){if(!te||!qn)return;let o=window.getSelection();if(!o||!o.rangeCount){Xe.dismiss();return}let a=o.getRangeAt(0),c=zn(a),d=c.lastIndexOf("/");if(d===-1||c.length<ya-1){Xe.dismiss();return}let p=c.slice(d+1).toLowerCase();Xe.show(te,p,{onSelect:Sa})}function Sa(o){if(!te||!Et||!Ne)return;let a=qn?window.getSelection():null;if(a&&a.rangeCount){let m=a.getRangeAt(0),g=zn(m).lastIndexOf("/");if(g!==-1){let E=document.createTreeWalker(te,NodeFilter.SHOW_TEXT),y=0,w=null,T=0;while(E.nextNode()){let C=E.currentNode;if(y+C.length>g){w=C,T=g-y;break}y+=C.length}if(w){let C=document.createRange();C.setStart(w,T),C.setEnd(m.startContainer,m.startOffset),C.deleteContents()}}}St(te);let c=xa(te),d=[...Ne],p=Et;ha(),p(d,o,c)}function Wu(o,a){let{target:c}=o;return c===a||c===a.documentElement||c===a.body}function fo(o){let a=o instanceof Element?o:null;while(a){if(a instanceof HTMLElement&&a.dataset.jxPath)return a;a=a.parentElement}return null}function Ea(o,a){let c=Pe(o);return{path:ge(a),rect:{height:c.height,width:c.width,x:c.x,y:c.y}}}function va(o){let a=fo(o instanceof Element?o:null);if(!a)return null;return Ea(a,a.dataset.jxPath)}function Bu(o){let a=o.checkVisibility;return t(a)?a.call(o,{checkVisibilityCSS:!0}):!0}function wa(o,a=document){let c=[],d=[];for(let p of o){let m=a.querySelector(nt(ae(p)));if(!m)continue;if(Bu(m)){let h=Pe(m);c.push({path:p,rect:{height:h.height,width:h.width,x:h.x,y:h.y}})}else d.push(p)}return{hidden:d,hits:c}}var Ku=new Set(["toggle","show","hide"]);function Uu(o){return Ku.has(o)}function qu(o,a){if(!(o instanceof Element))return;let c=o.closest("[popovertarget]"),d=c?.getAttribute("popovertarget");if(!c||!d)return;let h=[...c.ownerDocument.querySelectorAll("[data-jx-popover]")].find((y)=>y.id===d)?.dataset.jxPath;if(!h)return;let g=c.getAttribute("popovertargetaction")??"toggle",E=Uu(g)?g:"toggle";a.post({action:E,kind:"popoverTargetClick",targetPath:ge(h)})}function zu(o,a){if(!(o instanceof Element))return;let c=o.closest("[data-jx-commandfor]"),d=c?.dataset.jxCommandfor,p=c?.getAttribute("command")?.trim().toLowerCase()??"";if(!c||!d||!p)return;let g=[...c.ownerDocument.querySelectorAll("[data-jx-popover], dialog[data-jx-path]")].find((E)=>E.id===d)?.dataset.jxPath;if(!g)return;a.post({command:p,kind:"commandTargetClick",targetPath:ge(g)})}function Ta(o,a=document,c){let d=null,p=null,m=c?.getGen?.()??0,h=()=>c?.getMode?.()==="preview",g=()=>{o.post({kind:"paneFocus"})},E=(P)=>{if(h()){if(P.target instanceof Element){let V=P.target.closest("a[href]")?.getAttribute("href");if(V&&!V.startsWith("#"))P.preventDefault(),o.post({href:V,kind:"previewNavigate"})}return}if(c?.getMode?.()==="stylebook"&&P.target instanceof Element&&P.target.closest("a"))P.preventDefault();let B=va(P.target);if(B)o.post({additive:P.ctrlKey===!0||P.metaKey===!0,hit:B,kind:"hit"});qu(P.target,o),zu(P.target,o)},y=(P)=>{if(h())return;let B=P?.dataset.jxPath??null;if(B===d)return;d=B,o.post({hit:P&&B?Ea(P,B):null,kind:"hover"})},w=()=>{let P=c?.getGen?.()??m;if(P!==m)m=P,p="none"},T=(P,B)=>{if(!c||c.getMode?.()==="stylebook"||h())return;w();let ie=c.getShadowDoc(),V=fo(P instanceof Element?P:null),ne=V&&ie?qs(V,B,ie):null,X=zs(ne);if(X===p)return;p=X,o.post({kind:"insertZones",zones:ne})},C=0,_=null,O=0,K=0,k=(P)=>a.defaultView?.requestAnimationFrame(P)??requestAnimationFrame(P),L=(P)=>a.defaultView?.cancelAnimationFrame(P)??cancelAnimationFrame(P),z=()=>{C=0;let P=_;_=null,y(fo(P instanceof Element?P:null)),T(P,{x:O,y:K})},G=(P)=>{if(_=P.target,O=P.clientX,K=P.clientY,C)return;C=k(z)},Y=(P)=>{if(!Wu(P,a))return;if(y(null),c&&!h()&&p!=="none")p="none",o.post({kind:"insertZones",zones:null})},U=(P)=>{if(h())return;let B=Je()?wt():null;if(B&&P.target instanceof Node&&B.contains(P.target))return;let ie=va(P.target);if(!ie)return;P.preventDefault(),o.post({kind:"contextMenu",path:ie.path,x:P.clientX,y:P.clientY})};return a.addEventListener("pointerdown",g,!0),a.addEventListener("click",E,!0),a.addEventListener("pointermove",G,!0),a.addEventListener("pointerleave",Y,!0),a.addEventListener("contextmenu",U,!0),()=>{if(C)L(C),C=0;a.removeEventListener("pointerdown",g,!0),a.removeEventListener("click",E,!0),a.removeEventListener("pointermove",G,!0),a.removeEventListener("pointerleave",Y,!0),a.removeEventListener("contextmenu",U,!0)}}var Gu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Yu(o){let a=o;while(a){if(a instanceof HTMLElement&&a.dataset.jxPath)return a;a=a.parentElement}return null}function mo(o,a,c){let d=Vo(o,a,c);return Yu(d)}function ho(o,a,c,d){let p=o.dataset.jxPath;if(p==null)return null;let m=ge(p);if(m.length===0){let C=[...o.children];if(C.length===0)return po(d,m)?{edge:"inside",instruction:"make-child",referenceRect:ot(o),targetPath:m}:null;return Xu(C,a,m,d)}if(!po(d,m))return null;let h=xe(c,m),g=(f(h?.tagName)||"div").toLowerCase(),E=Array.isArray(h?.children)&&h.children.some((C)=>n(C)),y=Gu.has(g)||!E,w=ot(o),T=w.height===0?0:(a-w.y)/w.height;if(y)return T<0.5?{edge:"top",instruction:"reorder-above",referenceRect:w,targetPath:m}:{edge:"bottom",instruction:"reorder-below",referenceRect:w,targetPath:m};if(T<0.25)return{edge:"top",instruction:"reorder-above",referenceRect:w,targetPath:m};if(T>0.75)return{edge:"bottom",instruction:"reorder-below",referenceRect:w,targetPath:m};return{edge:"inside",instruction:"make-child",referenceRect:w,targetPath:m}}function Xu(o,a,c,d){let p=1/0,m="reorder-below",h=o.length-1;for(let E=0;E<o.length;E++){let y=ot(o[E]),w=Math.abs(a-y.y),T=Math.abs(a-(y.y+y.height));if(w<p)p=w,m="reorder-above",h=E;if(T<p)p=T,m="reorder-below",h=E}let g=[...c,"children",h];if(!po(d,g))return null;return{edge:m==="reorder-above"?"top":"bottom",instruction:m,referenceRect:ot(o[h]),targetPath:g}}function po(o,a){if(o.type!=="tree-node")return!0;let c=o.path;if(Ws(c,a))return!1;return!bt(c,a)}function ot(o){let a=Pe(o);return{height:a.height,width:a.width,x:a.x,y:a.y}}var Zu=40,Ca=12;function go(o,a,c=Zu){if(o<c)return-1;if(o>a-c)return 1;return 0}var xo=new Set(["deleteContentBackward","deleteWordBackward","deleteSoftLineBackward","deleteHardLineBackward"]),yo=new Set(["deleteContentForward","deleteWordForward","deleteSoftLineForward","deleteHardLineForward"]),Aa=new Set(["deleteByCut","deleteContent"]),Pa=new Set(["insertText","insertReplacementText","insertFromPaste","insertFromPasteAsQuotation","insertFromYank","insertTranspose"]),Qu="format",ed=new Set(["insertParagraph","insertLineBreak"]);function Na(o){let{inputType:a,from:c,to:d}=o;if(a==="insertCompositionText"||a==="insertFromComposition")return{kind:"native"};if(a==="historyUndo"||a==="historyRedo")return{kind:"reject"};if(a.startsWith(Qu))return{kind:"reject"};if(a==="insertFromDrop"||a==="deleteByDrag")return{kind:"reject"};if(o.inPropHost)return ed.has(a)?{kind:"reject"}:{kind:"native"};if(!c||!d)return{kind:"reject"};let p=qt(c,d)&&c.offset===d.offset,m=!qt(c,d);if(a==="insertParagraph")return{from:c,kind:"split",to:d};if(a==="insertLineBreak"&&!m)return{kind:"native"};if(p&&xo.has(a)&&o.atBlockStart)return{at:c,kind:"mergeBackward"};if(p&&yo.has(a)&&o.atBlockEnd)return{at:c,kind:"mergeForward"};if(m){if(Pa.has(a)||a==="insertLineBreak")return{from:c,kind:"replaceRange",text:o.data,to:d};if(xo.has(a)||yo.has(a)||Aa.has(a))return{from:c,kind:"replaceRange",text:"",to:d};return{kind:"reject"}}if(Pa.has(a)||xo.has(a)||yo.has(a)||Aa.has(a))return{kind:"native"};return{kind:"native"}}var td=500;function Gn(o,a){let c=o.ownerDocument.getSelection();if(!c||c.rangeCount===0||!c.anchorNode||!c.focusNode)return null;if(!o.contains(c.anchorNode)||!o.contains(c.focusNode))return null;let d=Ut(c.anchorNode,c.anchorOffset,a),p=Ut(c.focusNode,c.focusOffset,a);return d&&p?{anchor:d,head:p}:null}function Qt(o,a){let c=Gr(o,a.anchor),d=Gr(o,a.head)??c;if(!c)return!1;let p=o.ownerDocument.getSelection();if(!p)return!1;let m=o.ownerDocument.createRange();if(m.setStart(c.node,c.offset),p.removeAllRanges(),p.addRange(m),d&&d!==c)p.extend(d.node,d.offset);return!0}function Ra(o){return"dataset"in o}function $a(o,a){let c=o.ownerDocument,d=null,p=null,m=()=>{let U=a.getMode?.();return U===void 0||U==="design"||U==="edit"},h=null,g=()=>{if(h!==null)clearTimeout(h),h=null},E=()=>{if(h=null,!d||!a.onCommitTick)return;let U=Gn(o,a.isEditableBlock);if(a.onCommitTick(),U)Qt(o,U)},y=!1,w=()=>{if(!a.onCommitTick||!d||y)return;g(),h=setTimeout(E,a.commitDelayMs??td)},T=()=>{y=!0,g()},C=()=>{y=!1,w()},_=()=>{g(),d=null,p=null},O=()=>{if(!d)return;g(),d=null,p=null,a.onDeactivate()},K=()=>{if(!m()){O();return}let P=c.getSelection()?.focusNode??null;if(!P)return;if(!o.contains(P)){O();return}let B=jn(P,a.isEditableBlock);if(!B){if(d?.contains(P)){a.onSelectionChange?.();return}O();return}let ie=ae(B.path);if(ie===p){a.onSelectionChange?.();return}O(),d=B.el,p=ie,a.onActivate(B.el,B.path)},k=(U)=>{let[P]=t(U.getTargetRanges)?U.getTargetRanges():[],B=c.getSelection(),ie=B&&B.rangeCount>0&&(B.isCollapsed||!P),V,ne,X,re;if(ie)({startContainer:V,startOffset:ne,endContainer:X,endOffset:re}=B.getRangeAt(0));else if(P)({startContainer:V,startOffset:ne,endContainer:X,endOffset:re}=P);else return null;let Te=Ut(V,ne,a.isEditableBlock),H=Ut(X,re,a.isEditableBlock),q=jn(X,a.isEditableBlock);return Te&&H&&q?{endEl:q.el,from:Te,to:H}:null},L=(U)=>{if(!m())return;let P=k(U),B=Na({atBlockEnd:P?P.to.offset>=zr(P.endEl):!1,atBlockStart:P?Os(P.from):!1,data:U.data??"",from:P?.from??null,inPropHost:d!==null&&p===null,inputType:U.inputType,to:P?.to??null});switch(B.kind){case"native":return;case"split":{if(U.preventDefault(),!qt(B.from,B.to)&&!a.onReplaceRange)return;a.onSplit?.();return}case"mergeBackward":{U.preventDefault(),a.onMergeBackward?.(B.at);return}case"mergeForward":{U.preventDefault(),a.onMergeForward?.(B.at);return}case"replaceRange":{U.preventDefault(),a.onReplaceRange?.(B.from,B.to,B.text);return}default:U.preventDefault()}},z=(U)=>{if(!m()||!a.onPropActivate)return;let P=U.target instanceof Element?U.target:null;while(P&&P!==o){if(Ra(P)&&P.dataset.jxBoundProp){let B=P;if(B!==d){if(O(),a.onPropActivate(B))d=B,p=null}return}if(Ra(P)&&P.dataset.jxPath)return;P=P.parentElement}},G=(U)=>{U.preventDefault()},Y=()=>w();return c.addEventListener("selectionchange",K),o.addEventListener("beforeinput",L),o.addEventListener("input",Y),o.addEventListener("compositionstart",T),o.addEventListener("compositionend",C),o.addEventListener("dragstart",G),c.addEventListener("pointerdown",z,!0),{capture:()=>Gn(o,a.isEditableBlock),forget:_,isComposing:()=>y,flush:()=>{if(y)return;if(h!==null)g(),E()},placeCaret:(U)=>{let P=Qt(o,{anchor:U,head:U});if(P)K();return P},restore:(U)=>{let P=Qt(o,U);if(P)K();return P},stop:()=>{c.removeEventListener("selectionchange",K),o.removeEventListener("beforeinput",L),o.removeEventListener("input",Y),o.removeEventListener("compositionstart",T),o.removeEventListener("compositionend",C),o.removeEventListener("dragstart",G),c.removeEventListener("pointerdown",z,!0),O()},sync:K}}function Ze(o){return n(o)}function Tt(o){if(Array.isArray(o))return o.map((c)=>Tt(c));if(!u(o))return o;let a={};for(let[c,d]of Object.entries(o)){if(c.startsWith("on")&&Z(d))continue;if(c==="children")a.children=Array.isArray(d)?d.map((p)=>Tt(p)):Tt(d);else if(c==="cases"&&Ze(d)){let p={};for(let[m,h]of Object.entries(d))p[m]=Tt(h);a.cases=p}else if(c==="state"&&Ze(d)){let p={};for(let[m,h]of Object.entries(d)){if(i(h)&&h.timing==="server")continue;p[m]=h}a.state=p}else a[c]=d}return a}var nd=new Set(["img","video","source","iframe","audio"]),Yn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",rd="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%3E%3Crect%20width='32'%20height='32'%20fill='%23d0d0d0'/%3E%3C/svg%3E";var od=/(src|poster|image|bg|background|icon|logo|photo|avatar|thumbnail|cover|banner)$/i;function id(o){return od.test(o)}var sd=new Set(["p","h1","h2","h3","h4","h5","h6","blockquote","li","dt","dd","th","td","span","strong","em","small","mark","code","abbr","q","sub","sup","time","a","button","label","legend","caption","summary","pre","option"]),ad=new Set(["div","section","article","aside","header","footer","main","nav","figure","figcaption","details","fieldset","form","ul","ol","dl","table"]),Oa=["empty-text-placeholder","empty-container-placeholder"];function So(o){if(!o.tagName||o.textContent||o.innerHTML)return null;if(o.$__layout)return null;if(Array.isArray(o.children)&&o.children.length>0)return null;if(sd.has(f(o.tagName)))return"empty-text-placeholder";if(ad.has(f(o.tagName)))return"empty-container-placeholder";return null}function en(o){return o.replaceAll(/\$\{([^}]+)\}/g,"❪ $1 ❫")}function ka(o){let a=document.createTreeWalker(o,NodeFilter.SHOW_TEXT);while(a.nextNode()){let c=a.currentNode;if(c.data.includes("❪"))c.data=c.data.replaceAll(/\u276A\s*(.*?)\s*\u276B/g,"${$1}")}}function ld(o){let a=o.map;return{children:n(a)?[Be(a)]:[],className:"repeater-perimeter",tagName:"div"}}function bo(o){return`{${o.startsWith("#/state/")?o.slice(8):o}}`}function Be(o){if(Array.isArray(o))return o.map((h)=>Be(h));if(!u(o))return o;if(o.$prototype==="Array")return ld(o);let a=o,c={},d=!1,p=e(a.tagName)&&nd.has(a.tagName);if(p){let{attributes:h,src:g}=a,E=h?.src,y=a.poster,w=h?.poster;if(!(g&&g!==""||E&&E!=="")&&!(y&&y!==""||w&&w!==""))d=!0}for(let[h,g]of Object.entries(a))if(h==="state"||h==="$media"||h==="$elements")c[h]=g;else if(h==="$props"&&Ze(g)){let E={};for(let[y,w]of Object.entries(g))if(e(w)&&w.includes("${"))if(id(y))E[y]=rd;else if(y==="href"||y==="action")E[y]="";else E[y]=en(w);else if(u(w)&&w.$ref)E[y]=bo(w.$ref);else E[y]=w;c[h]=E}else if(h==="children")if(Array.isArray(g))c.children=g.map((E)=>Be(E));else if(u(g)&&g.$prototype==="Array")c.children=[Be(g)];else c.children=Be(g);else if(h==="cases"&&a.$switch&&Ze(g)){let[E]=Object.entries(g);if(E){let[,y]=E;c.children=Ze(y)&&!(u(y)&&y.$ref)?[Be(y)]:[{style:{background:"color-mix(in srgb, var(--danger) 8%, transparent)",border:"1px dashed color-mix(in srgb, var(--danger) 40%, transparent)",borderRadius:"4px",color:"var(--danger)",fontFamily:"'JetBrains Mono', 'SF Mono', 'Fira Code', monospace",fontSize:"11px",fontStyle:"italic",padding:"6px 10px"},tagName:"div",textContent:`[$switch: ${Object.keys(g).join(" | ")}]`}]}}else if(h==="attributes"&&p&&Ze(g)){let E={};for(let[y,w]of Object.entries(g))if(y==="src"||y==="poster")if(e(w)&&w!==""&&!w.includes("${"))E[y]=w;else d=!0,E[y]=Yn;else if(e(w)&&w.includes("${")){let T=y==="href"||y==="action";E[y]=T?"":en(w)}else if(u(w)&&w.$ref)E[y]=bo(w.$ref);else E[y]=w;c.attributes=E}else if(h==="style")if(Ze(g)){let E={};for(let[y,w]of Object.entries(g))if(!e(w)||!w.includes("${"))E[y]=w;c.style=E}else c.style=g;else if(e(g)&&g.includes("${"))if((h==="src"||h==="poster")&&p)d=!0,c[h]=Yn;else{let y=h==="src"||h==="href"||h==="poster"||h==="action";c[h]=y?"":en(g)}else if(u(g)&&g.$ref){let E=bo(g.$ref);if((h==="src"||h==="poster")&&p)d=!0,c[h]=Yn;else c[h]=E}else if((h==="src"||h==="poster")&&g===""&&p)d=!0,c[h]=Yn;else c[h]=Be(g);let m=So(c);if(m)c.className=c.className?`${c.className} ${m}`:m;if(d){let h=e(c.className)?c.className:"";if(!h.includes("empty-media-placeholder"))c.className=h?`${h} empty-media-placeholder`:"empty-media-placeholder"}return c}var cd={bold:"strong",code:"code",italic:"em",strikethrough:"del",subscript:"sub",superscript:"sup",underline:"u"},vo=globalThis,ud=["strong","em","u","del","sub","sup","code"],Xn="jx-pending-format",Ma="jx-pending-format-style";function dd(o){let a=o.parentElement;while(a){if(a.tagName.includes("-"))return a;a=a.parentElement}return null}function fd(o,a){if(!o)return!1;let c=o.attributes;if(c){if(c[`props.${a}`]!==void 0)return!0;let d=new Set([a.toLowerCase(),Sn(a).toLowerCase()]);for(let m of Object.keys(c))if(c[m]!==void 0&&d.has(m.toLowerCase()))return!0;let p=c["data-jx-props"];if(e(p)&&pd(p,a))return!0}if(Wt.has(a)||a.startsWith("$"))return!1;return o[a]!==void 0}function pd(o,a){try{let c=JSON.parse(o);return n(c)&&a in c}catch{return!1}}function _a(o,a){let d=ae(a).replaceAll("\\",String.raw`\\`).replaceAll("'",String.raw`\'`),p=o.querySelector(`[data-jx-path='${d}']`);return p instanceof HTMLElement?p:null}function md(o){return{height:o.height,width:o.width,x:o.x,y:o.y}}function Ja(o,a,c){let d=a.ownerDocument,p=()=>{let H=c?.getMode?.();return H===void 0||H==="design"||H==="edit"},m=null,h=0,g=(H)=>{let q=window.getSelection();if(!q||!q.rangeCount)return null;let Q=q.getRangeAt(0);return H.contains(Q.commonAncestorContainer)?Q:null},E=()=>{let H=wt();if(!H)return;let q=g(H);if(q&&!q.collapsed)m=q.cloneRange()},y=()=>{if(d.querySelector(`#${Ma}`))return;let H=d.createElement("style");H.id=Ma,H.textContent=`::highlight(${Xn}) { background-color: Highlight; color: HighlightText; }`,d.head.append(H)},w=()=>{let H=vo.Highlight,q=vo.CSS?.highlights;if(!H||!q)return;if(m&&m.startContainer.isConnected)y(),q.set(Xn,new H(m.cloneRange()));else q.delete(Xn)},T=()=>{vo.CSS?.highlights?.delete(Xn)},C=()=>{let H=wt();if(!H||!H.dataset.jxPath)return null;let q=g(H),Q=q??m,ue=Q?md(Fo(Q)):null,he=q?q.collapsed:!0,Ee=ud.filter((Re)=>Xs(Re,H)),we=ta(H);if(we.active)Ee.push("a");return h+=1,{activeTags:Ee,collapsed:he,kind:"selectionChanged",link:we,localScope:null,path:ge(H.dataset.jxPath),rect:ue,seq:h}},_=()=>{if(!Je())return;E(),w();let H=C();if(H)o.post(H)},O=!1,K=(H,q)=>{ka(H),o.post({kind:"editStart",path:q}),oo(H,q,{onCommit:(Q,ue,he,Ee)=>{O=!1;let we={children:ue,kind:"editCommit",path:Q,textContent:he};if(Ee)we.inPlace=!0;o.post(we)},onEnd:()=>{T(),m=null,o.post({kind:"editEnd"})},onInsert:(Q,ue,he)=>o.post({cmd:ue,commitData:he,kind:"editInsert",path:Q}),onSplit:(Q,ue,he)=>o.post({after:he,before:ue,kind:"editSplit",path:Q})}),E(),_()},k=(H,q)=>{let Q=c?.getShadowDoc?.();if(!Q)return!0;let ue=xe(Q,H);if(fd(ue,q))return!1;let he=ue?.$props?.[q];if(he==null)return!0;if(!e(he))return!1;return!he.includes("${")},L=(H,q,Q)=>{o.post({kind:"editStart",path:q,prop:Q}),oo(H,q,{onCommit:(ue,he,Ee,we)=>{O=!1;let Re={kind:"editCommitProp",path:ue,prop:Q,value:Ee??""};if(we)Re.inPlace=!0;o.post(Re)},onEnd:()=>{T(),m=null,V.forget(),o.post({kind:"editEnd"})},onInsert:()=>{},onSplit:()=>{}},{plainText:!0})},z=(H)=>{let q=wt();if(!q)return;if(da())return;if(m&&m.startContainer.isConnected&&q.contains(m.commonAncestorContainer)){let Q=window.getSelection();q.focus(),Q?.removeAllRanges(),Q?.addRange(m)}if(H.command==="link")na(q,H.href);else if(H.command==="insertData")ra(q,H.token);else{let Q=cd[H.command];if(Q)Zs(Q,q)}E(),_()},G=(H)=>{let q=H.dataset.jxBoundProp,Q=dd(H),ue=Q?.dataset.jxPath;if(!q||!Q||!ue)return!1;let he=ge(ue);if(!k(he,q))return!1;return L(H,he,q),!0},Y=(H,q)=>{let Q=ks(a,H,q,rt);if(!Q)return!1;let[ue,he]=q===-1?[H,Q.path]:[Q.path,H];return V.flush(),o.post({fromPath:ue,intoPath:he,kind:"editMerge"}),!0},U=(H,q,Q)=>{let ue=Yr(a,rt),he=ae(H.path),Ee=ae(q.path),we=ue.findIndex(($e)=>$e.dataset.jxPath===he),Re=ue.findIndex(($e)=>$e.dataset.jxPath===Ee);if(we===-1||Re===-1||Re<=we)return!1;let nn=ue.slice(we+1,Re).map(($e)=>ge($e.dataset.jxPath));return V.flush(),o.post({between:nn,from:H,kind:"editRangeReplace",text:Q,to:q}),!0},P=()=>E(),B=()=>E(),ie=()=>E(),V=$a(a,{getMode:()=>c?.getMode?.()??"edit",isEditableBlock:rt,onActivate:(H,q)=>K(H,q),onDeactivate:()=>{if(Je())Ie()},onCommitTick:()=>ua(),onMergeBackward:(H)=>Y(H.path,-1),onMergeForward:(H)=>Y(H.path,1),onReplaceRange:(H,q,Q)=>U(H,q,Q),onPropActivate:G,onSelectionChange:()=>_(),onSplit:()=>ma()}),ne=(H)=>ba(H),X=()=>{if(pa())uo()},re=()=>{if(!O)O=!0,o.post({kind:"editInput"})};a.addEventListener("input",re),a.addEventListener("keydown",ne),a.addEventListener("input",X),d.addEventListener("mouseup",P,!0),d.addEventListener("keyup",B,!0),d.addEventListener("blur",ie,!0);let Te=o.onMessage((H)=>{if(H.kind==="applyFormat"){z(H.intent);return}if(H.kind==="openSlash"){co({anchored:!1});return}if(H.kind==="flushEdits"){V.flush(),o.post({kind:"flushComplete",reqId:H.reqId});return}if(H.kind==="endEdit"){if(Je())Ie();return}if(H.kind!=="enterEdit")return;if(!p())return;if(H.prop!==void 0){let ue=_a(a,H.path)?.querySelector(`[data-jx-bound-prop="${CSS.escape(H.prop)}"]`);if(ue)G(ue);return}let q=_a(a,H.path);if(q&&rt(q))V.placeCaret({offset:H.offset??0,path:H.path})});return()=>{if(a.removeEventListener("keydown",ne),a.removeEventListener("input",X),a.removeEventListener("input",re),d.removeEventListener("mouseup",P,!0),d.removeEventListener("keyup",B,!0),d.removeEventListener("blur",ie,!0),V.stop(),Te(),T(),m=null,Je())Ie()}}var hd=new Set(["ArrowUp","ArrowDown","Enter","Escape"]);function gd(o){return hd.has(o)}function Da(o,a){let c=!1,d=null,p=null,m={dismiss:()=>{if(!c)return;c=!1,p=null,o.post({kind:"slashDismiss"})},isOpen:()=>c,show:(y,w,T)=>{if({onSelect:d}=T,c&&w===p)return;c=!0,p=w;let C=Pe(y),_={filter:w,kind:"slashShow",rect:{height:C.height,width:C.width,x:C.left,y:C.top}};if(T.showFilter===!0)_.showFilter=!0;o.post(_)}};ro(m);let h=(y)=>{if(!c||!gd(y.key))return;y.preventDefault(),y.stopPropagation(),o.post({key:y.key,kind:"slashNav"})},g=()=>{if(c)m.dismiss()};a.addEventListener("keydown",h,!0),a.addEventListener("mousedown",g,!0);let E=o.onMessage((y)=>{if(y.kind==="slashSelect"){c=!1,p=null,d?.({...y.cmd});return}if(y.kind==="slashDismissed")c=!1,p=null});return()=>{a.removeEventListener("keydown",h,!0),a.removeEventListener("mousedown",g,!0),E(),ro({dismiss:()=>{},isOpen:()=>!1,show:()=>{}})}}var La=["global","canvas","caret","grid","code","dock","palette"];var Em={"commandbar/primary":{admits:["application","document"],note:"document only for Save / Undo / Redo / Open in Browser, by frequency; ≤5 total"},"commandbar/overflow":{admits:["application","project","document"],note:"never selection — the Command Bar is not a selection surface"},"statusbar/project":{admits:["project"],note:"the status bar's left field"},"statusbar/document":{admits:["document"],note:"the status bar's centre field"},"statusbar/selection":{admits:["selection"],note:"the status bar's right field"},"context/element":{admits:["selection"],note:"the canvas element menu acts on a selection"},"context/file":{admits:["project"],note:"a file row addresses the project's file set"},"context/layer":{admits:["selection"],note:"an outline row IS a selection"},"context/tab":{admits:["document"],note:"a tab addresses one document"},"context/pane":{admits:["document"],note:"a pane hosts one document"},blockbar:{admits:["selection"],note:"the floating bar owns selection-scoped verbs"},"blockbar/format":{admits:["selection"],note:"the bar's inline-format cluster — a range inside the selection is still the selection"},"outline/row":{admits:["selection"],note:"row actions act on the row's node"},"settings/menu":{admits:["application","project"],note:"the rail foot's gear menu — the settings family. It is a MENU, not a pinned slot, so it "+"may host two levels for the reason commandbar/overflow does: a menu prints each row's own name, chord and gate, and draws a divider where the level changes. The rail's PINNED groups stay single-level, in PANEL_PLACEMENT_MATRIX"},palette:{admits:["application","project","document","selection"],note:"the level-agnostic surface; it groups rows by level"},never:{admits:["application","project","document","selection"],note:"keyboard- and API-only; no rendered surface to be misplaced in"}};var xd=["mod","ctrl","alt","shift"],yd=new Map([["mod","mod"],["cmd","mod"],["command","mod"],["meta","mod"],["super","mod"],["ctrl","ctrl"],["control","ctrl"],["alt","alt"],["opt","alt"],["option","alt"],["shift","shift"]]),bd=new Map([["up","arrowup"],["down","arrowdown"],["left","arrowleft"],["right","arrowright"],["esc","escape"],["space"," "],["spacebar"," "],["del","delete"],["plus","="],["return","enter"]]);function Sd(o){return[...xd.filter((c)=>o[c]),o.key].join("+")}function vd(o){return/^Digit(\d)$/.exec(o??"")?.[1]}function Ia(o,a){let c=vd(o.code)??o.key.toLowerCase();if(yd.has(c))return"";let d={mod:a?o.metaKey:o.ctrlKey,ctrl:a?o.ctrlKey:!1,alt:o.altKey,shift:o.shiftKey,key:bd.get(c)??c};return Sd(d)}var Am=["global",...La.filter((o)=>o!=="global"&&o!=="palette")];var Ed=["caret","global"],wd=["canvas","global"],Td=["global"],Zn={chords:[],mac:!1};function Cd(o){if(!(o instanceof HTMLElement))return!1;return o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.tagName==="SELECT"}function Ad(o,a){if(o)return Ed;return a==="preview"?Td:wd}function Pd(o,a=Zn,c=!1,d="design"){if(Cd(o.target))return!1;let p=Ia(o,a.mac);if(!p)return!1;let m=Ad(c,d);return a.chords.some((h)=>h.chord===p&&m.includes(h.scope))}function Nd(o){return{altKey:o.altKey,code:o.code,ctrlKey:o.ctrlKey,key:o.key,metaKey:o.metaKey,shiftKey:o.shiftKey}}function ja(o,a=document,c=()=>!1,d=()=>Zn,p=()=>"design"){let m=(h)=>{if(!Pd(h,d(),c(),p()))return;h.preventDefault(),o.post({event:Nd(h),kind:"forwardKey"})};return a.addEventListener("keydown",m,!0),()=>a.removeEventListener("keydown",m,!0)}var Eo=new WeakMap,Qn=new Set;function wo(o,a,c){let d=xe(o,a);if(d===void 0)throw Error(`iframe-patch-node-not-found:${a.join("/")}`);let p=e(d)?d:Be(Tt(d)),{result:m,stop:h}=kn(()=>Me(p,c.defs,{_path:Rd(a,c),onNodeCreated:eo(c.mapperCtx)}));if(Qn.add(h),m instanceof HTMLElement)Eo.set(m,h);return m}function To(o){let a=[o,...o.querySelectorAll("*")];for(let c of a){if(!(c instanceof HTMLElement))continue;Nn(c);let d=Eo.get(c);if(d)d(),Qn.delete(d),Eo.delete(c)}}function Ha(){for(let o of Qn)o();Qn.clear()}function Rd(o,a){let{mapperCtx:c}=a;if(c.layoutWrapped&&c.pageContentPrefix&&o[0]==="children"){let[,d]=o;return s(d)?[...c.pageContentPrefix,d+(c.pageContentOffset??0),...o.slice(2)]:[...c.pageContentPrefix,...o.slice(1)]}return o}function Wa(o,a,c,d,p){for(let h of a)to(o,h);if(!p?.length){for(let h of a)Fa(o,h,c,d);return}let m=new Set(p.map((h)=>ae(h)));for(let h of a){if(h.op==="set-key"&&m.has(ae(h.path))){$d(o,h.path,c);continue}Fa(o,h,c,d)}}function $d(o,a,c){let d=Ua(c,a);if(d)Ct(d,xe(o,a))}function Co(o){if(!o)throw Error("iframe-patch-no-render-ctx");return o}function Fa(o,a,c,d){switch(a.op){case"set-key":{if(a.key==="style"){Jd(o,a.path,c,d);return}if(a.key==="textContent"){Dd(o,a.path,c);return}if(a.key.startsWith("on"))return;Va(o,a.path,c,Co(d));return}case"insert-child":{Od(o,a.parentPath,a.index,c,Co(d));return}case"set-child":{Va(o,[...a.parentPath,"children",a.index],c,Co(d));return}case"remove-child":{kd(o,a.parentPath,a.index,c);return}case"move-child":{Md(o,a.fromParentPath,a.fromIndex,a.toParentPath,a.toIndex,c);return}default:throw Error(`iframe-patch-unsupported-op:${JSON.stringify(a)}`)}}function Od(o,a,c,d,p){let m=it(d,a),h=xe(o,a),g=wo(o,[...a,"children",c],p);er(d,a,c,1),Ba(m,g,Ka(m,h,c)),Ct(m,h)}function Va(o,a,c,d){let p=it(c,a),m=wo(o,a,d);To(p),p.replaceWith(m)}function kd(o,a,c,d){let p=it(d,[...a,"children",c]),m=p.parentElement;if(To(p),p.remove(),er(d,a,c+1,-1),m)Ct(m,xe(o,a))}function Md(o,a,c,d,p,m){let h=[...a,"children",c],g=it(m,h),E=g.parentElement,y=it(m,d);g.remove(),er(m,a,c+1,-1);let w=tr(y)??d;er(m,w,p,1),_d(g,h,[...w,"children",p]);let T=xe(o,w);if(Ba(y,g,Ka(y,T,p)),E)Ct(E,xe(o,tr(E)??a));Ct(y,T)}function Ct(o,a){for(let d of Oa)o.classList.remove(d);let c=a?So(a):null;if(c)o.classList.add(c)}function Ba(o,a,c){if(c)c.before(a);else o.append(a)}function Ka(o,a,c){let d=a?.textContent,p=d!=null&&String(d)!==""?1:0;return o.childNodes[p+c]??null}function er(o,a,c,d){let p=a.length;for(let m of o.querySelectorAll("[data-jx-path]")){let h=tr(m);if(!h||h.length<p+2||h[p]!=="children")continue;let g=h[p+1];if(!s(g)||g<c)continue;if(!a.every((y,w)=>h[w]===y))continue;let E=[...h];E[p+1]=g+d,m.dataset.jxPath=ae(E)}}function _d(o,a,c){let d=[o,...o.querySelectorAll("[data-jx-path]")];for(let p of d){let m=tr(p);if(!m||m.length<a.length||!a.every((h,g)=>m[g]===h))continue;p.dataset.jxPath=ae([...c,...m.slice(a.length)])}}function tr(o){let a=o.dataset.jxPath;return a===void 0?null:ge(a)}function Jd(o,a,c,d){let p=it(c,a),m=xe(o,a),h=d?.defs.$media??{};Ln(p,Ld(m?.style),h)}function Dd(o,a,c){let d=it(c,a),p=xe(o,a);d.textContent=Id(p),Ct(d,p)}function it(o,a){let c=Ua(o,a);if(!c)throw Error(`iframe-patch-element-not-found:${ae(a)}`);return c}function Ua(o,a){let d=ae(a).replaceAll("\\",String.raw`\\`).replaceAll("'",String.raw`\'`),p=o.querySelector(`[data-jx-path='${d}']`);return p instanceof HTMLElement?p:null}function Ld(o){if(!o||!n(o))return;let a={};for(let[c,d]of Object.entries(o)){if(e(d)&&d.includes("${"))continue;a[c]=d}return a}function Id(o){let a=o?.textContent;if(a==null)return"";if(e(a))return a.includes("${")?en(a):a;if(n(a)&&a.$ref){let c=String(a.$ref);return`{${c.startsWith("#/state/")?c.slice(8):c}}`}return String(a)}function qa(o){if(o===void 0)return"undefined";let a;try{a=JSON.stringify(o)??"undefined"}catch{a=String(o)}if(a.length>48)a=`${a.slice(0,47)}…`;return a}function jd(o){return i(o)&&"$expression"in o&&Array.isArray(o.parameters)}function Hd(o){try{return structuredClone(o)}catch{return null}}function Fd(o,a){let c={};for(let d of Object.keys(o))try{let p=o[d];if(t(p)){if(jd(a?.[d]))c[d]=p;continue}let m=JSON.stringify(p);c[d]=m===void 0?null:JSON.parse(m)}catch{c[d]=null}return c}function Vd(o,a,c){if(!c||c.length===0)return o;let d=a,p=o;for(let m of c){if(!n(d))break;let h=d;if(h.$prototype==="Array"&&m==="map"){let g=h.items,E=r(g)?Se(g.$ref,p):g;if(Array.isArray(E)&&E.length>0){let[y]=E,w=Hd(y),T=Object.create(p);T.$map={index:0,item:w},T["$map/item"]=w,T["$map/index"]=0,p=T}}d=h[m]}return p}function za(o,a,c,d){let p=c?.state??null;return o.map(({id:m,node:h})=>{let g=new Map,E;try{E=Vd(Fd(a,p),c,d)}catch(y){return{error:y instanceof Error?y.message:String(y),id:m,values:[]}}try{if(!n(h)||!("operator"in h))throw Error("not an expression node");return Ae(h,E,null,void 0,{report:(y,w)=>{g.set(y.join("/"),qa(w))}}),{id:m,values:[...g.entries()]}}catch(y){return{error:y instanceof Error?y.message:String(y),id:m,values:[...g.entries()]}}})}var Wd=256000,Bd="[large value omitted]";function Ga(o){let a={};for(let c of Object.keys(o))try{let d=o[c];if(t(d))continue;let p=JSON.stringify(d);if(p===void 0){a[c]=null;continue}if(p.length>Wd){a[c]=Bd;continue}a[c]=JSON.parse(p)}catch{a[c]=null}return a}var Ya={"jx-ui:/behaviors/color-area.ts":()=>(pe("0fj8a4ga"),import("./chunks/color-area-0fj8a4ga.js")),"jx-ui:/behaviors/color-field.ts":()=>(pe("xch8kx2g"),import("./chunks/color-field-xch8kx2g.js")),"jx-ui:/behaviors/color-slider.ts":()=>(pe("jxd8v350"),import("./chunks/color-slider-jxd8v350.js")),"jx-ui:/behaviors/combobox.ts":()=>(pe("p0efwjke"),import("./chunks/combobox-p0efwjke.js")),"jx-ui:/behaviors/dialog.ts":()=>(pe("c4x05vyx"),import("./chunks/dialog-c4x05vyx.js")),"jx-ui:/behaviors/listbox.ts":()=>(pe("e74qjyq6"),import("./chunks/listbox-e74qjyq6.js")),"jx-ui:/behaviors/menu.ts":()=>(pe("n6yzswmy"),import("./chunks/menu-n6yzswmy.js")),"jx-ui:/behaviors/number-field.ts":()=>(pe("y62xq0ty"),import("./chunks/number-field-y62xq0ty.js")),"jx-ui:/behaviors/action-group.ts":()=>(pe("4aan7g6g"),import("./chunks/action-group-4aan7g6g.js")),"jx-ui:/behaviors/popover.ts":()=>(pe("jt2gxmzs"),import("./chunks/popover-jt2gxmzs.js")),"jx-ui:/behaviors/select.ts":()=>(pe("rzds841e"),import("./chunks/select-rzds841e.js")),"jx-ui:/behaviors/split.ts":()=>(pe("n2gfpm5m"),import("./chunks/split-n2gfpm5m.js")),"jx-ui:/behaviors/swatch-group.ts":()=>(pe("ewh24n1f"),import("./chunks/swatch-group-ewh24n1f.js")),"jx-ui:/behaviors/tabs.ts":()=>(pe("f5cw3tgp"),import("./chunks/tabs-f5cw3tgp.js")),"jx-ui:/behaviors/toolbar.ts":()=>(pe("44cm5cta"),import("./chunks/toolbar-44cm5cta.js")),"jx-ui:/behaviors/tree.ts":()=>(pe("mdq3v5cw"),import("./chunks/tree-mdq3v5cw.js")),"jx-ui:/behaviors/tooltip.ts":()=>(pe("5v8ngwj2"),import("./chunks/tooltip-5v8ngwj2.js")),"jx-ui:/behaviors/textfield.ts":()=>(pe("wewc8rq2"),import("./chunks/textfield-wewc8rq2.js")),"jx-ui:/behaviors/toast.ts":()=>(pe("c9fn075p"),import("./chunks/toast-c9fn075p.js")),"jx-ui:/behaviors/toast-host.ts":()=>(pe("ke5z4ng7"),import("./chunks/toast-host-ke5z4ng7.js")),"jx-ui:/color.ts":()=>(pe("28ksk2qm"),import("./chunks/color-28ksk2qm.js")),"jx-ui:/icons.ts":()=>(pe("pnfz478q"),import("./chunks/icons-pnfz478q.js"))};var Kd;function Xa(o){Kd=new URL("./",o).href}Xa(import.meta.url);for(let[o,a]of Object.entries(Ya))xs(o,a);function tn(o,a,c,d){let p=mo(o.x,o.y,d);if(!p)return null;return ho(p,o.y,c,a)}function Ao(o){return[...o.dataTransfer?.types??[]].includes("Files")}var Ud={type:"block"},No={},Po=null;function Za(o){return o?{...o,versions:No}:null}function qd(o,a){let c=o.dataset.jxPath;if(c==null)return null;let d=ge(c),p=a?xe(a,d):void 0;return{path:d,rect:ot(o),tagName:(f(p?.tagName)||o.tagName).toLowerCase()}}function zd(o){if(!(o instanceof Element))return null;if(o.closest("[data-jx-path]"))return null;let a=o.closest("[data-jx-layout-region]");if(!(a instanceof HTMLElement))return null;return{className:a.className,layoutFile:a.dataset.jxLayoutFile??"",layoutPath:ge(a.dataset.jxLayoutPath??"[]"),rect:ot(a),tagName:a.tagName.toLowerCase()}}function Qa(o){let a=n(o)&&"message"in o?o.message:void 0;return String(a??o)}var Gd=new Set(["style","textContent"]);function Yd(o){let a=fa();if(!a)return!1;for(let c of o){let d;if(c.op==="set-key"){if(Gd.has(c.key)||c.key.startsWith("on"))continue;d=c.path}else if(c.op==="move-child"){if(d=c.fromParentPath,bt(d,a)||bt(c.toParentPath,a))return!0;continue}else d=c.parentPath;if(bt(d,a))return!0}return!1}var Xd=2,Zd=5000,Qd=500;function ef(o){let{channel:a,container:c}=o;No={},Po=null;let d=null,p=null,m=-1,h=null,g=-1,E="design",y=null,w=null,T=Zn,C=null,_=null,O=-1,K=-1,k=0,L=null,z=c.ownerDocument.defaultView;function G(){if(k&&z)z.cancelAnimationFrame(k);k=0,L=null}function Y(){k=0;let A=L?.src??_;if(!z||!L||!A||!h)return;let se=go(L.y,z.innerHeight);if(se===0)return;let oe=z.scrollY;if(z.scrollBy(0,se*Ca),z.scrollY===oe)return;let ve=tn(L,A,h,c.ownerDocument),ee={dragSeq:L.dragSeq,gen:L.gen??O,kind:"dragOver",preview:ve};if(L.withCursor)ee.cursor={x:L.x,y:L.y};a.post(ee),k=z.requestAnimationFrame(Y)}function U(A,se,oe){if(!z||go(A.y,z.innerHeight)===0){G();return}let ve={dragSeq:se,withCursor:oe!=null,x:A.x,y:A.y};if(oe)ve.gen=oe.gen,ve.src=oe.src;if(L=ve,!k)k=z.requestAnimationFrame(Y)}let P=Ta(a,c.ownerDocument,{getGen:()=>g,getMode:()=>E,getShadowDoc:()=>h}),B=(A)=>{if(E!=="design"&&E!=="edit")return;let se=zd(A.target);if(se)a.post({hit:se,kind:"layoutHit"})};c.ownerDocument.addEventListener("click",B,!0);let ie=ja(a,c.ownerDocument,Je,()=>T,()=>E),V=Ja(a,c,{getMode:()=>E,getShadowDoc:()=>h}),ne=Da(a,c.ownerDocument),X=Is(c),re=30000,Te=-1;function H(){let A=c.querySelectorAll("[data-jx-popover][data-jx-popover-open], dialog[data-jx-dialog-open]"),se=Pe(c),oe=0;for(let ve of A)oe=Math.max(oe,Pe(ve).bottom-se.top);return oe}function q(){let A=Math.max(c.scrollHeight,H()),se=Math.min(A,re);if(se>0&&Math.abs(se-Te)>=1){Te=se;let oe=c.firstElementChild,ve=oe instanceof HTMLElement&&oe.dataset.jxDefinitionRoot!==void 0;a.post({fragment:ve,height:se,kind:"contentHeight"}),st()}}let Q=z?.ResizeObserver,ue=Q?new Q(()=>q()):null,he=c.ownerDocument,Ee=0,we=0,Re=0,nn="",$e=new Map;function el(){let A=Date.now();for(let[se,oe]of $e)if(oe<=A)$e.delete(se);return $e.size}function tl(){let A=he;return{animations:A.getAnimations?.().filter((oe)=>oe.playState==="running").length??0,fonts:A.fonts?A.fonts.status==="loaded":!0,gen:g,images:el(),kind:"idle"}}function Ro(){Ee=0;let A=tl(),se=`${A.gen}|${A.fonts}|${A.animations}|${A.images}`,oe=se!==nn;if(oe)nn=se,a.post(A);if(we=A.fonts&&A.animations===0&&A.images===0?oe?1:we+1:0,we>=Xd){q();return}if(Date.now()>=Re)return;Ee=z?z.requestAnimationFrame(Ro):0}function st(){if(we=0,Re=Date.now()+Zd,!Ee&&z)Ee=z.requestAnimationFrame(Ro)}let $o=(A)=>{if(A.target instanceof HTMLImageElement)$e.set(A.target,Date.now()+Qd),st()},Oo=(A)=>{if(A.target instanceof HTMLImageElement&&$e.delete(A.target))st()};c.addEventListener("error",$o,!0),c.addEventListener("load",Oo,!0),st(),ue?.observe(c);let ko=(A)=>{if(E==="preview"){if(A.ctrlKey||A.metaKey)A.preventDefault();return}A.preventDefault(),a.post({ctrlKey:A.ctrlKey,deltaX:A.deltaX,deltaY:A.deltaY,kind:"forwardWheel",metaKey:A.metaKey,shiftKey:A.shiftKey,x:A.clientX,y:A.clientY})};c.ownerDocument.addEventListener("wheel",ko,{passive:!1});let nl=300,Mo=0,_o=(A,se)=>{A.preventDefault(),A.stopPropagation();let oe={x:A.clientX,y:A.clientY},ve=c.ownerDocument,ee=mo(oe.x,oe.y,ve),Oe=ee?qd(ee,h):null,on=h&&ee?ho(ee,oe.y,h,Ud):null;if(se==="fileDragOver"){if(A.dataTransfer)A.dataTransfer.dropEffect="copy";a.post({hit:Oe,kind:"fileDragOver",preview:on});return}a.post({files:[...A.dataTransfer?.files??[]],hit:Oe,kind:"fileDrop",preview:on})},rn=(A)=>{if(!_){if(Ao(A)){_o(A,"fileDragOver");return}let ve=Date.now();if(ve-Mo>=nl)Mo=ve,a.post({kind:"nativeDragEnter"});return}if(A.preventDefault(),A.dataTransfer)A.dataTransfer.dropEffect="move";let se={x:A.clientX,y:A.clientY},oe=h?tn(se,_,h,c.ownerDocument):null;a.post({cursor:se,dragSeq:K,gen:O,kind:"dragOver",preview:oe}),U(se,K)},Jo=(A)=>{if(!_){if(Ao(A))_o(A,"fileDrop");return}A.preventDefault();let se={x:A.clientX,y:A.clientY},oe=h?tn(se,_,h,c.ownerDocument):null;a.post({dragSeq:K,gen:O,instruction:oe?.instruction??null,kind:"dropResult",targetPath:oe?.targetPath??null}),_=null,O=-1,K=-1,G()},Do=(A)=>{if(!_&&Ao(A)&&!A.relatedTarget)a.post({kind:"fileDragLeave"})};c.ownerDocument.addEventListener("dragenter",rn,!0),c.ownerDocument.addEventListener("dragover",rn,!0),c.ownerDocument.addEventListener("dragleave",Do,!0),c.ownerDocument.addEventListener("drop",Jo,!0);let rl=a.onMessage((A)=>{if(A.kind==="measure"){let{hidden:ee,hits:Oe}=wa(A.paths,c.ownerDocument);a.post({hidden:ee,hits:Oe,kind:"geometry",reqId:A.reqId});return}if(A.kind==="evalExpr"){let ee=A.gen===g&&C&&h?za(A.exprs,C.defs,h,A.contextPath):[];a.post({gen:A.gen,kind:"evalResult",reqId:A.reqId,results:ee});return}if(A.kind==="patch"){let{gen:ee}=A;if(ee<g){a.post({gen:ee,kind:"patchError",message:"patch-behind-render"});return}if(ee>g||!h||!C){a.post({gen:ee,kind:"patchError",message:"patch-ahead-of-render"});return}let Oe=new Set((A.echoPaths??[]).map((at)=>ae(at))),on=Oe.size===0?A.forwardOps:A.forwardOps.filter((at)=>!(at.op==="set-key"&&Oe.has(ae(at.path)))),Lo=Je()&&Yd(on),Io=Lo?Gn(c,rt):null;if(Lo)Ie();try{if(Wa(h,A.forwardOps,c,C,A.echoPaths),zt(c,y),yt(c,w),Io)Qt(c,Io);a.post({gen:ee,kind:"patchComplete"}),st()}catch(at){a.post({gen:ee,kind:"patchError",message:Qa(at)})}return}if(A.kind==="styleUpdate"){if(A.gen!==g||!h)return;h.style=A.style;let ee=c.firstElementChild;if(ee instanceof HTMLElement)Ln(ee,A.style,h.$media??{});return}if(A.kind==="dragStart"){_=A.src,O=A.gen,K=A.dragSeq;return}if(A.kind==="dragEnd"||A.kind==="dragCancel"){_=null,O=-1,K=-1,G();return}if(A.kind==="dragMove"){let ee=_&&h?tn(A.cursor,_,h,c.ownerDocument):null;a.post({dragSeq:A.dragSeq,gen:O,kind:"dragOver",preview:ee}),U(A.cursor,A.dragSeq);return}if(A.kind==="drop"){let ee=_&&h?tn(A.cursor,_,h,c.ownerDocument):null;a.post({dragSeq:A.dragSeq,gen:O,instruction:ee?.instruction??null,kind:"dropResult",targetPath:ee?.targetPath??null}),_=null,O=-1,K=-1,G();return}if(A.kind==="assetVersions"){No=A.versions;let ee=Za(Po);if(ee)Mn((Oe)=>Kt(Oe,ee));return}if(A.kind==="keymap"){T={chords:A.chords,mac:A.mac};return}if(A.kind==="setColorScheme"){Qr(c.ownerDocument,A.scheme);return}if(A.kind==="setPopoverOpen"){if(E==="preview")return;y=A.path===null?null:ae(A.path),zt(c,y),yt(c,w),q();return}if(A.kind==="setDialogOpen"){if(E==="preview")return;w=A.path===null?null:ae(A.path),yt(c,w),q();return}if(A.kind==="redefineElement"){Ps(A.doc,A.base);return}if(A.kind==="setLocale"){let ee=c.ownerDocument.documentElement;if(A.locale===null)ee.removeAttribute("lang"),ee.removeAttribute("dir");else ee.setAttribute("lang",A.locale),ee.setAttribute("dir",A.dir);return}if(A.kind==="siteStyleUpdate"){Zr(A.siteStyle,A.media);return}if(A.kind!=="render"||A.gen<m)return;if(Qr(c.ownerDocument,A.colorScheme??null),Je())Ie();m=A.gen,Po=A.assets??null,ca(A.editableTags??null);let{gen:se,mapperCtx:oe}=A,ve=A.shadowDoc;(async()=>{try{Ha(),p?.(),p=null,d?.dispose(),Es(c.ownerDocument);let ee={assets:Za(A.assets??null),container:c,doc:A.doc,docBase:A.docBase,mapperCtx:{arrayPaths:new Set(oe.arrayPaths),canvasMode:oe.canvasMode,layoutWrapped:oe.layoutWrapped,pageContentOffset:oe.pageContentOffset,pageContentPrefix:oe.pageContentPrefix},diffMarks:A.diffMarks??null,mode:A.mode,popoverOpen:A.popoverOpen?ae(A.popoverOpen):null,dialogOpen:A.dialogOpen?ae(A.dialogOpen):null,siteStyle:A.siteStyle};if(A.allowAutoRequests)ee.allowAutoRequests=!0;if(d=await js(ee),se===m){y=A.popoverOpen?ae(A.popoverOpen):null,w=A.dialogOpen?ae(A.dialogOpen):null,zt(c,y),yt(c,w),h=ve,C=d.ctx,g=se,E=A.mode,a.post({gen:se,kind:"renderComplete"}),st();let{defs:Oe}=d.ctx;p=ss(()=>{try{a.post({gen:se,kind:"dataScope",scope:Ga(Oe)})}catch{}}),q()}}catch(ee){a.post({gen:se,kind:"renderError",message:Qa(ee)})}})()});return a.post({kind:"ready"}),()=>{if(rl(),P(),ie(),V(),ne(),X(),Ee&&z)z.cancelAnimationFrame(Ee);Ee=0,c.removeEventListener("error",$o,!0),c.removeEventListener("load",Oo,!0),G(),ue?.disconnect(),c.ownerDocument.removeEventListener("click",B,!0),c.ownerDocument.removeEventListener("wheel",ko),c.ownerDocument.removeEventListener("dragenter",rn,!0),c.ownerDocument.removeEventListener("dragleave",Do,!0),c.ownerDocument.removeEventListener("dragover",rn,!0),c.ownerDocument.removeEventListener("drop",Jo,!0),p?.(),d?.dispose()}}function tf(o){let a=new URLSearchParams(o.location.search);os(a.get("rpcToken"));let c=a.get("parentOrigin"),d=c||"*";if(!c)console.warn("[jx-canvas] no parentOrigin in iframe URL — accepting messages from any origin (token-gated). "+"The parent origin did not round-trip; the channel relies on the shared token alone.");let p=o.document.querySelector("#jx-canvas-root"),m=p instanceof HTMLElement?p:o.document.body,h=Ho({acceptOrigin:d,source:o,target:o.parent,targetOrigin:d,token:a.get("token")||""});return ef({channel:h,container:m})}if(typeof window<"u"&&window.parent!==window)tf(window);export{Xd as IDLE_QUIET_FRAMES,Zd as IDLE_WATCH_MAX_MS,Qd as IMAGE_RETRY_WINDOW_MS,tf as bootCanvasIframe,qd as fileDropHitFor,Ao as isExternalFileDrag,zd as layoutHitFor,Yd as patchDisturbsActiveEdit,ef as startCanvasIframe};
|
|
313
313
|
|
|
314
|
-
//# debugId=
|
|
314
|
+
//# debugId=2A646D9319E133E264756E2164756E21
|
|
315
315
|
//# sourceMappingURL=iframe-entry.js.map
|