@heyramzi/ui 2.8.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +1 -1
- package/README.md +1 -1
- package/dist/agents/helpers.js +52 -0
- package/dist/agents/index.js +3 -0
- package/dist/agents/page-state.js +65 -0
- package/dist/agents/types.js +1 -0
- package/dist/agents/vendor/color.js +149 -0
- package/dist/agents/vendor/draw.js +548 -0
- package/dist/agents/vendor/engine.js +632 -0
- package/dist/agents/vendor/mesh.js +727 -0
- package/dist/agents/vendor/plastic.js +3273 -0
- package/dist/agents/vendor/presets.js +171 -0
- package/dist/agents/vendor/shapes.js +24 -0
- package/dist/agents/vendor/ticker.js +56 -0
- package/dist/agents/vendor/types.js +0 -0
- package/dist/agents/vendor/wear.js +1525 -0
- package/dist/ai/ai-button/index.js +2 -0
- package/dist/ai/confirmation/confirmation-context.svelte.js +12 -0
- package/dist/ai/confirmation/index.js +9 -0
- package/dist/ai/generation-progress/index.js +2 -0
- package/dist/ai/index.js +11 -0
- package/dist/ai/loading-state/index.js +3 -0
- package/dist/ai/prompt-input/index.js +6 -0
- package/dist/ai/reasoning/index.js +4 -0
- package/dist/ai/reasoning/reasoning-context.svelte.js +12 -0
- package/dist/ai/response/index.js +3 -0
- package/dist/ai/suggestion/index.js +3 -0
- package/dist/ai/thinking-dots/index.js +3 -0
- package/dist/ai/typing-dots/index.js +2 -0
- package/dist/ai/voice-waveform/index.js +3 -0
- package/dist/animations/text-swap.js +30 -0
- package/dist/brand/index.js +65 -0
- package/dist/canvas/card/resize.js +10 -0
- package/dist/canvas/edges/edge-path.js +284 -0
- package/dist/canvas/editor/context-menu.js +42 -0
- package/dist/canvas/editor/dispatch.svelte.js +157 -0
- package/dist/canvas/editor/editor-context.js +8 -0
- package/dist/canvas/editor/editor-mode.js +0 -0
- package/dist/canvas/editor/frame.js +87 -0
- package/dist/canvas/editor/hand-context.js +8 -0
- package/dist/canvas/editor/history-core.js +221 -0
- package/dist/canvas/editor/keymap.js +193 -0
- package/dist/canvas/editor/layout-actions.js +170 -0
- package/dist/canvas/editor/lock.js +65 -0
- package/dist/canvas/editor/rebase.js +279 -0
- package/dist/canvas/editor/style.js +174 -0
- package/dist/canvas/editor/text-field-context.js +8 -0
- package/dist/canvas/editor/z-order.js +82 -0
- package/dist/canvas/headless/alignment.js +20 -0
- package/dist/canvas/headless/break-apart-find.js +324 -0
- package/dist/canvas/headless/break-apart-pieces.js +74 -0
- package/dist/canvas/headless/break-apart-plan.js +378 -0
- package/dist/canvas/headless/break-apart-style.js +93 -0
- package/dist/canvas/headless/break-apart.js +206 -0
- package/dist/canvas/headless/canvas-cleanup.js +70 -0
- package/dist/canvas/headless/edge-anchors.js +134 -0
- package/dist/canvas/headless/edge-memo.js +28 -0
- package/dist/canvas/headless/edge-serialization.js +31 -0
- package/dist/canvas/headless/figure-geometry.js +331 -0
- package/dist/canvas/headless/fit-viewport.js +82 -0
- package/dist/canvas/headless/grid.js +96 -0
- package/dist/canvas/headless/icon-node.js +45 -0
- package/dist/canvas/headless/index.js +1 -0
- package/dist/canvas/headless/linkify.js +25 -0
- package/dist/canvas/headless/pen-marks.js +115 -0
- package/dist/canvas/headless/sketch.js +250 -0
- package/dist/canvas/headless/snap-guides.js +100 -0
- package/dist/canvas/headless/svg-figure.js +137 -0
- package/dist/canvas/headless/table-layout.js +161 -0
- package/dist/canvas/index.js +25 -0
- package/dist/canvas/lod/lod-mode.svelte.js +22 -0
- package/dist/canvas/lod/render-all.svelte.js +45 -0
- package/dist/canvas/ops/arrange.js +83 -0
- package/dist/canvas/ops/ops.js +318 -0
- package/dist/canvas/pen/colors.js +41 -0
- package/dist/canvas/pen/eraser.js +35 -0
- package/dist/canvas/pen/geometry.js +143 -0
- package/dist/canvas/pen/index.js +9 -0
- package/dist/canvas/pen/ops.js +15 -0
- package/dist/canvas/pen/pen-session.js +171 -0
- package/dist/canvas/pen/plugin.js +129 -0
- package/dist/canvas/pen/shapes.js +80 -0
- package/dist/canvas/pen/stroke-path.js +37 -0
- package/dist/canvas/pen/types.js +30 -0
- package/dist/canvas/pen/ui.js +20 -0
- package/dist/canvas/plugin.js +51 -0
- package/dist/canvas/screen/glyphs.js +24 -0
- package/dist/canvas/screen/labels.js +24 -0
- package/dist/canvas/screen/parts.js +140 -0
- package/dist/canvas/screen/plugin.js +71 -0
- package/dist/canvas/screen/types.js +44 -0
- package/dist/canvas/screen/ui.js +13 -0
- package/dist/canvas/test-utils.js +18 -0
- package/dist/canvas/types.js +0 -0
- package/dist/canvas/ui/forward-wheel.js +27 -0
- package/dist/canvas/ui/icons.js +133 -0
- package/dist/canvas/ui/place-panel.js +57 -0
- package/dist/canvas/ui/shortcut-tip.js +18 -0
- package/dist/canvas/ui/tools.js +411 -0
- package/dist/charts/dashboard/chart.js +1 -0
- package/dist/charts/dashboard/data-table.js +7 -0
- package/dist/charts/dashboard/index.js +13 -0
- package/dist/charts/dashboard/windows.js +5 -0
- package/dist/charts/edge-fade.js +7 -0
- package/dist/charts/hover-band.js +13 -0
- package/dist/charts/index.js +19 -0
- package/dist/charts/motion.js +15 -0
- package/dist/charts/primitives/chart-utils.js +22 -0
- package/dist/charts/primitives/index.js +4 -0
- package/dist/components/copy/clipboard.js +38 -0
- package/dist/components/copy/copied.svelte.js +26 -0
- package/dist/components/copy/index.js +3 -0
- package/dist/components/data-table/data-table.js +55 -0
- package/dist/components/data-table/index.js +7 -0
- package/dist/components/docs/index.js +3 -0
- package/dist/components/docs/scroll-spy.svelte.js +71 -0
- package/dist/components/field-row/index.js +1 -0
- package/dist/components/hold-to-confirm/index.js +1 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/language-flag/index.js +1 -0
- package/dist/components/list-page/filter-section.js +4 -0
- package/dist/components/list-page/index.js +25 -0
- package/dist/components/list-page/list-table.js +5 -0
- package/dist/components/list-page/queue-rail.js +3 -0
- package/dist/components/list-page/section-host.js +8 -0
- package/dist/components/list-page/step.js +5 -0
- package/dist/components/list-page/types.js +0 -0
- package/dist/components/locale-switch/index.js +1 -0
- package/dist/components/mark/index.js +1 -0
- package/dist/components/open-in/index.js +1 -0
- package/dist/components/picker/index.js +3 -0
- package/dist/components/picker/trigger.js +33 -0
- package/dist/components/picker/types.js +0 -0
- package/dist/components/section-card/index.js +1 -0
- package/dist/components/section-header/index.js +2 -0
- package/dist/components/segmented/collapse.js +32 -0
- package/dist/components/segmented/index.js +8 -0
- package/dist/components/segmented/segmented.js +50 -0
- package/dist/components/star-rating-input/index.js +2 -0
- package/dist/components/svg/index.js +1 -0
- package/dist/components/table-view/index.js +1 -0
- package/dist/components/table-view/types.js +0 -0
- package/dist/components/tags-input/index.js +2 -0
- package/dist/components/tags-input/tags.js +90 -0
- package/dist/components/theme/index.js +3 -0
- package/dist/components/toolbar/index.js +3 -0
- package/dist/components/toolbar/toolbar-trigger.js +4 -0
- package/dist/editor/anchors.js +17 -0
- package/dist/editor/block-id.js +62 -0
- package/dist/editor/block-ops.js +105 -0
- package/dist/editor/doc-blocks.js +181 -0
- package/dist/editor/extensions.js +200 -0
- package/dist/editor/index.js +4 -0
- package/dist/editor/markdown-test-helpers.js +6 -0
- package/dist/editor/markdown.js +486 -0
- package/dist/editor/serializer.js +268 -0
- package/dist/editor/slash-items.js +104 -0
- package/dist/editor/youtube-url.js +27 -0
- package/dist/effects/animated-beam/index.js +1 -0
- package/dist/effects/animated-beam/path-calculator.svelte.js +42 -0
- package/dist/effects/animated-beam/types.js +0 -0
- package/dist/effects/border-beam/css.js +420 -0
- package/dist/effects/border-beam/presets.js +1792 -0
- package/dist/effects/border-beam/register-properties.js +39 -0
- package/dist/effects/border-beam/types.js +0 -0
- package/dist/effects/image-comparison/compare.js +4 -0
- package/dist/effects/image-reveal/index.js +1 -0
- package/dist/effects/image-reveal/types.js +0 -0
- package/dist/effects/magnetic/magnetic.js +54 -0
- package/dist/effects/reveal/index.js +4 -0
- package/dist/effects/reveal/observe.js +43 -0
- package/dist/effects/reveal/types.js +0 -0
- package/dist/effects/shader-gradient/color.js +34 -0
- package/dist/effects/shader-gradient/index.js +1 -0
- package/dist/effects/shader-gradient/renderer.js +320 -0
- package/dist/effects/shader-gradient/shaders.js +280 -0
- package/dist/effects/shader-gradient/types.js +0 -0
- package/dist/icons/apple-symbol-exports.js +126 -0
- package/dist/icons/sf-symbols.js +465 -0
- package/dist/icons/trades.js +34 -0
- package/dist/inbox/index.js +4 -0
- package/dist/inbox/logic.js +156 -0
- package/dist/inbox/types.js +46 -0
- package/dist/index.js +18 -0
- package/dist/lib/arrive.js +13 -0
- package/dist/lib/icon-types.js +0 -0
- package/dist/lib/initials.js +17 -0
- package/dist/lib/layout.js +1 -0
- package/dist/lib/panel.js +3 -0
- package/dist/lib/result.js +26 -0
- package/dist/lib/sliding-pill.js +45 -0
- package/dist/lib/theme-transition.js +53 -0
- package/dist/lib/tone.js +32 -0
- package/dist/lib/utils.js +5 -0
- package/dist/onboarding/define-tours.js +28 -0
- package/dist/onboarding/index.js +4 -0
- package/dist/onboarding/onboarding.svelte.js +15 -0
- package/dist/onboarding/pick.js +16 -0
- package/dist/onboarding/stores.js +50 -0
- package/dist/onboarding/types.js +1 -0
- package/dist/onboarding/wait.js +25 -0
- package/dist/panel/index.js +1 -0
- package/dist/panel/side-panel-types.js +0 -0
- package/dist/record/demo-data.js +512 -0
- package/dist/record/fields.js +148 -0
- package/dist/record/format.js +97 -0
- package/dist/record/gutter.js +1 -0
- package/dist/record/index.js +15 -0
- package/dist/record/kinds.js +110 -0
- package/dist/record/logic.js +255 -0
- package/dist/record/types.js +52 -0
- package/dist/shadcn/accordion/index.js +5 -0
- package/dist/shadcn/alert/index.js +5 -0
- package/dist/shadcn/alert-dialog/index.js +12 -0
- package/dist/shadcn/attachment/index.js +10 -0
- package/dist/shadcn/avatar/index.js +7 -0
- package/dist/shadcn/badge/index.js +2 -0
- package/dist/shadcn/breadcrumb/index.js +8 -0
- package/dist/shadcn/bubble/index.js +5 -0
- package/dist/shadcn/button/index.js +2 -0
- package/dist/shadcn/calendar/index.js +19 -0
- package/dist/shadcn/card/index.js +8 -0
- package/dist/shadcn/checkbox/index.js +2 -0
- package/dist/shadcn/code-block/index.js +9 -0
- package/dist/shadcn/collapsible/index.js +4 -0
- package/dist/shadcn/command/index.js +13 -0
- package/dist/shadcn/context-menu/index.js +17 -0
- package/dist/shadcn/dialog/index.js +11 -0
- package/dist/shadcn/dropdown-menu/index.js +19 -0
- package/dist/shadcn/dropdown-menu/menu-item.js +23 -0
- package/dist/shadcn/empty/index.js +7 -0
- package/dist/shadcn/field/index.js +12 -0
- package/dist/shadcn/hooks/highlighter.js +92 -0
- package/dist/shadcn/hooks/is-mobile.svelte.js +7 -0
- package/dist/shadcn/hooks/use-highlighted-code.svelte.js +65 -0
- package/dist/shadcn/hover-card/index.js +5 -0
- package/dist/shadcn/input/index.js +3 -0
- package/dist/shadcn/input-otp/index.js +5 -0
- package/dist/shadcn/kbd/index.js +3 -0
- package/dist/shadcn/label/index.js +2 -0
- package/dist/shadcn/marker/index.js +4 -0
- package/dist/shadcn/message/index.js +7 -0
- package/dist/shadcn/message-scroller/index.js +8 -0
- package/dist/shadcn/popover/index.js +9 -0
- package/dist/shadcn/progress/index.js +2 -0
- package/dist/shadcn/progress/tone.js +11 -0
- package/dist/shadcn/radio-group/index.js +3 -0
- package/dist/shadcn/scroll-area/index.js +3 -0
- package/dist/shadcn/select/index.js +12 -0
- package/dist/shadcn/separator/index.js +2 -0
- package/dist/shadcn/sheet/index.js +11 -0
- package/dist/shadcn/sidebar/constants.js +6 -0
- package/dist/shadcn/sidebar/context.svelte.js +38 -0
- package/dist/shadcn/sidebar/index.js +25 -0
- package/dist/shadcn/skeleton/index.js +2 -0
- package/dist/shadcn/slider/index.js +2 -0
- package/dist/shadcn/sonner/index.js +1 -0
- package/dist/shadcn/spinner/index.js +1 -0
- package/dist/shadcn/switch/index.js +2 -0
- package/dist/shadcn/table/index.js +9 -0
- package/dist/shadcn/tabs/index.js +5 -0
- package/dist/shadcn/textarea/index.js +2 -0
- package/dist/shadcn/toggle/index.js +3 -0
- package/dist/shadcn/toggle-group/index.js +3 -0
- package/dist/shadcn/tooltip/context.js +8 -0
- package/dist/shadcn/tooltip/index.js +6 -0
- package/dist/shadcn/trace/index.js +9 -0
- package/dist/slides/bridges.js +66 -0
- package/dist/slides/deck-controller.svelte.js +221 -0
- package/dist/slides/export/capture.js +81 -0
- package/dist/slides/export/ffmpeg.js +85 -0
- package/dist/slides/export/index.js +4 -0
- package/dist/slides/export/launch.js +8 -0
- package/dist/slides/export/pdf.js +78 -0
- package/dist/slides/export/types.js +0 -0
- package/dist/slides/index.js +7 -0
- package/dist/slides/labels.js +26 -0
- package/dist/slides/layout.js +47 -0
- package/dist/slides/model.js +9 -0
- package/dist/slides/navigation.js +89 -0
- package/dist/slides/types.js +6 -0
- package/dist/status/define-statuses.js +16 -0
- package/dist/status/index.js +4 -0
- package/dist/status/status-types.js +0 -0
- package/dist/test-setup.js +26 -0
- package/dist/thread/index.js +3 -0
- package/dist/thread/logic.js +94 -0
- package/dist/thread/types.js +23 -0
- package/dist/work/board-order.js +109 -0
- package/dist/work/dates.js +19 -0
- package/dist/work/detail/detail-types.js +20 -0
- package/dist/work/docs/edited.js +39 -0
- package/dist/work/docs/index.js +7 -0
- package/dist/work/docs/labels.js +38 -0
- package/dist/work/docs/menu.js +121 -0
- package/dist/work/docs/outline.js +39 -0
- package/dist/work/gantt/logic.js +260 -0
- package/dist/work/inbox/inbox-logic.js +94 -0
- package/dist/work/inbox/inbox-statuses.js +86 -0
- package/dist/work/inbox/inbox-types.js +0 -0
- package/dist/work/inbox/index.js +1 -0
- package/dist/work/index.js +21 -0
- package/dist/work/kanban-drag.js +25 -0
- package/dist/work/kanban-types.js +0 -0
- package/dist/work/presets/sales.js +35 -0
- package/dist/work/reorder.js +10 -0
- package/dist/work/task-types.js +0 -0
- package/dist/work/time/duration.js +60 -0
- package/dist/work/time/time-types.js +25 -0
- package/dist/work/use-kanban-dnd.svelte.js +128 -0
- package/package.json +102 -76
- package/src/agents/vendor/draw.ts +4 -4
- package/src/canvas/headless/canvas-cleanup.test.ts +1 -1
- package/src/canvas/ops/ops.ts +1 -1
- package/src/charts/area-chart.svelte +11 -1
- package/src/charts/bar-chart.svelte +18 -3
- package/src/charts/line-chart.svelte +11 -1
- package/src/components/data-table/data-table.ts +4 -5
- package/src/components/data-table/pagination.svelte +5 -3
- package/src/components/docs/on-this-page.svelte +82 -5
- package/src/components/docs/scroll-spy.svelte.ts +6 -1
- package/src/components/list-page/detail-header.svelte +7 -3
- package/src/components/list-page/empty-state.svelte +3 -1
- package/src/components/list-page/filter-popover.svelte +2 -2
- package/src/components/list-page/rail-row.svelte +5 -2
- package/src/components/mark/mark.svelte +2 -1
- package/src/components/section-card/section-card.svelte +3 -1
- package/src/components/section-header/section-header.svelte +5 -5
- package/src/components/segmented/segment.svelte +1 -1
- package/src/components/table-view/table-view.svelte +6 -1
- package/src/components/tags-input/tags-input.svelte +1 -1
- package/src/components/toolbar/toolbar-trigger.ts +8 -2
- package/src/components/toolbar/toolbar.svelte +1 -1
- package/src/editor/anchors.ts +28 -0
- package/src/editor/doc-blocks.ts +168 -0
- package/src/editor/doc-page.css +389 -0
- package/src/editor/editor.svelte +47 -5
- package/src/editor/extensions.ts +26 -2
- package/src/editor/markdown.ts +27 -2
- package/src/editor/slash-items.ts +18 -0
- package/src/icons/trades.ts +1 -1
- package/src/inbox/README.md +6 -4
- package/src/inbox/inbox.test.ts +1 -1
- package/src/inbox/index.ts +2 -2
- package/src/inbox/logic.ts +29 -5
- package/src/inbox/thread-inbox.svelte +219 -92
- package/src/inbox/types.ts +27 -1
- package/src/lib/initials.test.ts +25 -0
- package/src/lib/initials.ts +29 -0
- package/src/modules.test.ts +4 -64
- package/src/panel/README.md +1 -1
- package/src/record/README.md +1 -1
- package/src/record/demo-data.ts +4 -4
- package/src/record/info-list.svelte +5 -4
- package/src/record/next-up.svelte +1 -1
- package/src/record/project-list.svelte +1 -1
- package/src/record/record-demo.svelte +2 -2
- package/src/record/steps-rail.svelte +3 -3
- package/src/shadcn/badge/badge.svelte +1 -1
- package/src/shadcn/card/card-title.svelte +1 -5
- package/src/shadcn/empty/empty-description.svelte +1 -1
- package/src/shadcn/progress/progress.svelte +8 -1
- package/src/shadcn/table/table-cell.svelte +10 -2
- package/src/status/README.md +1 -1
- package/src/thread/README.md +2 -0
- package/src/thread/index.ts +9 -1
- package/src/thread/logic.ts +33 -3
- package/src/thread/thread-body.svelte +37 -0
- package/src/thread/thread-events.svelte +30 -0
- package/src/thread/thread.svelte +74 -59
- package/src/thread/types.ts +21 -0
- package/src/{tasks → work}/README.md +11 -8
- package/src/{tasks → work}/detail/task-thread.svelte +8 -15
- package/src/work/docs/doc-editor-page.svelte +194 -0
- package/src/work/docs/doc-menu.svelte +333 -0
- package/src/work/docs/docs-demo.svelte +227 -0
- package/src/work/docs/edited-chip.svelte +125 -0
- package/src/work/docs/edited.ts +54 -0
- package/src/work/docs/index.ts +38 -0
- package/src/work/docs/labels.ts +70 -0
- package/src/work/docs/menu.ts +127 -0
- package/src/work/docs/outline.ts +60 -0
- package/src/{tasks → work}/gantt/gantt-group-row.svelte +1 -1
- package/src/{tasks → work}/inbox/inbox-card.svelte +113 -50
- package/src/work/inbox/inbox-logic.ts +98 -0
- package/src/work/inbox/inbox-trace.svelte +58 -0
- package/src/{tasks → work}/inbox/inbox-types.ts +2 -0
- package/src/{tasks → work}/index.ts +0 -10
- package/src/{tasks → work}/kanban-board.svelte +1 -1
- package/src/{tasks → work}/task-list.svelte +1 -1
- package/src/{tasks → work}/time/time-tracker.svelte +2 -5
- package/src/tasks/inbox/inbox-logic.ts +0 -21
- package/src/tasks/inbox/inbox-trace.svelte +0 -51
- /package/src/{tasks → work}/ambient.d.ts +0 -0
- /package/src/{tasks → work}/board-order.ts +0 -0
- /package/src/{tasks → work}/dates.ts +0 -0
- /package/src/{tasks → work}/demo.svelte +0 -0
- /package/src/{tasks → work}/detail/detail-demo.svelte +0 -0
- /package/src/{tasks → work}/detail/detail-types.ts +0 -0
- /package/src/{tasks → work}/detail/task-chip.svelte +0 -0
- /package/src/{tasks → work}/detail/task-detail.svelte +0 -0
- /package/src/{tasks → work}/detail/task-property.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-bar.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-grid.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-header.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-task-row.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt.css +0 -0
- /package/src/{tasks → work}/gantt/gantt.test.ts +0 -0
- /package/src/{tasks → work}/gantt/logic.test.ts +0 -0
- /package/src/{tasks → work}/gantt/logic.ts +0 -0
- /package/src/{tasks → work}/inbox/inbox-draft.svelte +0 -0
- /package/src/{tasks → work}/inbox/inbox-statuses.ts +0 -0
- /package/src/{tasks → work}/inbox/index.ts +0 -0
- /package/src/{tasks → work}/kanban-column.svelte +0 -0
- /package/src/{tasks → work}/kanban-drag.ts +0 -0
- /package/src/{tasks → work}/kanban-types.ts +0 -0
- /package/src/{tasks → work}/presets/sales.ts +0 -0
- /package/src/{tasks → work}/reorder.ts +0 -0
- /package/src/{tasks → work}/task-gantt.svelte +0 -0
- /package/src/{tasks → work}/task-types.ts +0 -0
- /package/src/{tasks → work}/time/duration.ts +0 -0
- /package/src/{tasks → work}/time/time-chip.svelte +0 -0
- /package/src/{tasks → work}/time/time-dot.svelte +0 -0
- /package/src/{tasks → work}/time/time-ring.svelte +0 -0
- /package/src/{tasks → work}/time/time-types.ts +0 -0
- /package/src/{tasks → work}/use-kanban-dnd.svelte.ts +0 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import MarkdownIt from "markdown-it";
|
|
2
|
+
import { generateBlockId } from "./block-id.js";
|
|
3
|
+
import { YOUTUBE_ID_RE, parseYoutubeUrl } from "./youtube-url.js";
|
|
4
|
+
const mdi = new MarkdownIt({
|
|
5
|
+
breaks: false,
|
|
6
|
+
linkify: false
|
|
7
|
+
});
|
|
8
|
+
function imageTokenToYoutubeNode(tok) {
|
|
9
|
+
if (tok.type !== "image") return null;
|
|
10
|
+
const src = String(tok.attrGet("src") ?? "");
|
|
11
|
+
const parsed = parseYoutubeUrl(src);
|
|
12
|
+
if (!parsed) return null;
|
|
13
|
+
return {
|
|
14
|
+
type: "youtube",
|
|
15
|
+
attrs: {
|
|
16
|
+
videoId: parsed.videoId,
|
|
17
|
+
title: tok.content ?? "",
|
|
18
|
+
start: parsed.start,
|
|
19
|
+
id: null
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function markdownToTiptap(md) {
|
|
24
|
+
const tokens = mdi.parse(md.trim(), {});
|
|
25
|
+
const blocks = parseTokensToBlocks(tokens);
|
|
26
|
+
return {
|
|
27
|
+
type: "doc",
|
|
28
|
+
content: blocks
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function parseTokensToBlocks(tokens) {
|
|
32
|
+
const blocks = [];
|
|
33
|
+
let i = 0;
|
|
34
|
+
while(i < tokens.length){
|
|
35
|
+
const parse = Object.hasOwn(BLOCK_PARSERS, tokens[i].type) ? BLOCK_PARSERS[tokens[i].type] : null;
|
|
36
|
+
if (!parse) {
|
|
37
|
+
i++;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const { node, next } = parse(tokens, i);
|
|
41
|
+
blocks.push(stampId(node));
|
|
42
|
+
i = next;
|
|
43
|
+
}
|
|
44
|
+
return blocks;
|
|
45
|
+
}
|
|
46
|
+
function inlineChildrenAt(tokens, i) {
|
|
47
|
+
const inlineTok = tokens[i];
|
|
48
|
+
return inlineTok?.type === "inline" ? inlineTok.children ?? [] : [];
|
|
49
|
+
}
|
|
50
|
+
function orderedStart(tok) {
|
|
51
|
+
const startAttr = tok.attrGet("start");
|
|
52
|
+
return startAttr !== null ? parseInt(String(startAttr), 10) : 1;
|
|
53
|
+
}
|
|
54
|
+
function parseParagraph(tokens, i) {
|
|
55
|
+
const children = inlineChildrenAt(tokens, i + 1);
|
|
56
|
+
const youtube = children.length === 1 ? imageTokenToYoutubeNode(children[0]) : null;
|
|
57
|
+
const node = youtube ?? {
|
|
58
|
+
type: "paragraph",
|
|
59
|
+
attrs: {
|
|
60
|
+
id: null
|
|
61
|
+
},
|
|
62
|
+
content: parseInlineChildren(children)
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
node,
|
|
66
|
+
next: i + 3
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function parseHeading(tokens, i) {
|
|
70
|
+
const level = headingLevel(tokens[i].markup);
|
|
71
|
+
const content = parseInlineChildren(inlineChildrenAt(tokens, i + 1));
|
|
72
|
+
return {
|
|
73
|
+
node: {
|
|
74
|
+
type: "heading",
|
|
75
|
+
attrs: {
|
|
76
|
+
level,
|
|
77
|
+
id: null
|
|
78
|
+
},
|
|
79
|
+
content
|
|
80
|
+
},
|
|
81
|
+
next: i + 3
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function parseFence(tokens, i) {
|
|
85
|
+
const tok = tokens[i];
|
|
86
|
+
const lang = tok.info.trim() || null;
|
|
87
|
+
const code = tok.content.endsWith("\n") ? tok.content.slice(0, -1) : tok.content;
|
|
88
|
+
const node = {
|
|
89
|
+
type: "codeBlock",
|
|
90
|
+
attrs: {
|
|
91
|
+
language: lang,
|
|
92
|
+
id: null
|
|
93
|
+
},
|
|
94
|
+
content: code ? [
|
|
95
|
+
{
|
|
96
|
+
type: "text",
|
|
97
|
+
text: code
|
|
98
|
+
}
|
|
99
|
+
] : []
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
node,
|
|
103
|
+
next: i + 1
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function parseBlockquote(tokens, i) {
|
|
107
|
+
const { inner, next } = collectUntilClose(tokens, i + 1, "blockquote");
|
|
108
|
+
const innerBlocks = parseTokensToBlocks(inner).map(stripId);
|
|
109
|
+
const content = innerBlocks.length ? innerBlocks : [
|
|
110
|
+
{
|
|
111
|
+
type: "paragraph",
|
|
112
|
+
content: []
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
return {
|
|
116
|
+
node: {
|
|
117
|
+
type: "blockquote",
|
|
118
|
+
attrs: {
|
|
119
|
+
id: null
|
|
120
|
+
},
|
|
121
|
+
content
|
|
122
|
+
},
|
|
123
|
+
next: next + 1
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function parseBulletList(tokens, i) {
|
|
127
|
+
const { inner, next } = collectUntilClose(tokens, i + 1, "bullet_list");
|
|
128
|
+
const node = {
|
|
129
|
+
type: "bulletList",
|
|
130
|
+
attrs: {
|
|
131
|
+
id: null
|
|
132
|
+
},
|
|
133
|
+
content: parseListItems(inner)
|
|
134
|
+
};
|
|
135
|
+
return {
|
|
136
|
+
node,
|
|
137
|
+
next: next + 1
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function parseOrderedList(tokens, i) {
|
|
141
|
+
const start = orderedStart(tokens[i]);
|
|
142
|
+
const { inner, next } = collectUntilClose(tokens, i + 1, "ordered_list");
|
|
143
|
+
const node = {
|
|
144
|
+
type: "orderedList",
|
|
145
|
+
attrs: {
|
|
146
|
+
id: null,
|
|
147
|
+
start
|
|
148
|
+
},
|
|
149
|
+
content: parseListItems(inner)
|
|
150
|
+
};
|
|
151
|
+
return {
|
|
152
|
+
node,
|
|
153
|
+
next: next + 1
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const BLOCK_PARSERS = {
|
|
157
|
+
paragraph_open: parseParagraph,
|
|
158
|
+
heading_open: parseHeading,
|
|
159
|
+
hr: (_tokens, i)=>({
|
|
160
|
+
node: {
|
|
161
|
+
type: "horizontalRule",
|
|
162
|
+
attrs: {
|
|
163
|
+
id: null
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
next: i + 1
|
|
167
|
+
}),
|
|
168
|
+
fence: parseFence,
|
|
169
|
+
blockquote_open: parseBlockquote,
|
|
170
|
+
bullet_list_open: parseBulletList,
|
|
171
|
+
ordered_list_open: parseOrderedList
|
|
172
|
+
};
|
|
173
|
+
function collectUntilClose(tokens, start, type) {
|
|
174
|
+
const openType = `${type}_open`;
|
|
175
|
+
const closeType = `${type}_close`;
|
|
176
|
+
let depth = 1;
|
|
177
|
+
let i = start;
|
|
178
|
+
while(i < tokens.length){
|
|
179
|
+
if (tokens[i].type === openType) depth++;
|
|
180
|
+
else if (tokens[i].type === closeType) {
|
|
181
|
+
depth--;
|
|
182
|
+
if (depth === 0) {
|
|
183
|
+
return {
|
|
184
|
+
inner: tokens.slice(start, i),
|
|
185
|
+
next: i
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
i++;
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
inner: tokens.slice(start),
|
|
193
|
+
next: i
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function parseListItems(tokens) {
|
|
197
|
+
const items = [];
|
|
198
|
+
let i = 0;
|
|
199
|
+
while(i < tokens.length){
|
|
200
|
+
if (tokens[i].type === "list_item_open") {
|
|
201
|
+
const { inner, next } = collectUntilClose(tokens, i + 1, "list_item");
|
|
202
|
+
items.push(parseListItemContent(inner));
|
|
203
|
+
i = next + 1;
|
|
204
|
+
} else {
|
|
205
|
+
i++;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return items;
|
|
209
|
+
}
|
|
210
|
+
function parseListItemContent(tokens) {
|
|
211
|
+
const content = [];
|
|
212
|
+
let i = 0;
|
|
213
|
+
while(i < tokens.length){
|
|
214
|
+
const tok = tokens[i];
|
|
215
|
+
if (tok.type === "paragraph_open") {
|
|
216
|
+
content.push({
|
|
217
|
+
type: "paragraph",
|
|
218
|
+
content: parseInlineChildren(inlineChildrenAt(tokens, i + 1))
|
|
219
|
+
});
|
|
220
|
+
i += 3;
|
|
221
|
+
} else if (tok.type === "bullet_list_open" || tok.type === "ordered_list_open") {
|
|
222
|
+
const { node, next } = BLOCK_PARSERS[tok.type](tokens, i);
|
|
223
|
+
content.push(stripId(node));
|
|
224
|
+
i = next;
|
|
225
|
+
} else {
|
|
226
|
+
i++;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (!content.length) {
|
|
230
|
+
content.push({
|
|
231
|
+
type: "paragraph",
|
|
232
|
+
content: []
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
type: "listItem",
|
|
237
|
+
content
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function parseInlineChildren(tokens) {
|
|
241
|
+
const nodes = [];
|
|
242
|
+
const markStack = [];
|
|
243
|
+
for (const tok of tokens){
|
|
244
|
+
const handle = Object.hasOwn(INLINE_HANDLERS, tok.type) ? INLINE_HANDLERS[tok.type] : null;
|
|
245
|
+
const node = handle?.(tok, markStack);
|
|
246
|
+
if (node) nodes.push(node);
|
|
247
|
+
}
|
|
248
|
+
return nodes;
|
|
249
|
+
}
|
|
250
|
+
function textNode(tok, markStack) {
|
|
251
|
+
if (!tok.content) return;
|
|
252
|
+
const marks = markStack.length ? [
|
|
253
|
+
...markStack
|
|
254
|
+
] : undefined;
|
|
255
|
+
return {
|
|
256
|
+
type: "text",
|
|
257
|
+
text: tok.content,
|
|
258
|
+
...marks ? {
|
|
259
|
+
marks
|
|
260
|
+
} : {}
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
const openMark = (type)=>(_tok, markStack)=>{
|
|
264
|
+
markStack.push({
|
|
265
|
+
type
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
const closeMark = (type)=>(_tok, markStack)=>{
|
|
269
|
+
removeLastMark(markStack, type);
|
|
270
|
+
};
|
|
271
|
+
function openLink(tok, markStack) {
|
|
272
|
+
const href = tok.attrGet("href") ?? "";
|
|
273
|
+
const title = tok.attrGet("title");
|
|
274
|
+
markStack.push({
|
|
275
|
+
type: "link",
|
|
276
|
+
attrs: {
|
|
277
|
+
href,
|
|
278
|
+
target: null,
|
|
279
|
+
rel: null,
|
|
280
|
+
...title ? {
|
|
281
|
+
title
|
|
282
|
+
} : {}
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
const INLINE_HANDLERS = {
|
|
287
|
+
text: textNode,
|
|
288
|
+
text_special: textNode,
|
|
289
|
+
softbreak: ()=>({
|
|
290
|
+
type: "text",
|
|
291
|
+
text: " "
|
|
292
|
+
}),
|
|
293
|
+
hardbreak: ()=>({
|
|
294
|
+
type: "hardBreak"
|
|
295
|
+
}),
|
|
296
|
+
code_inline: (tok, markStack)=>({
|
|
297
|
+
type: "text",
|
|
298
|
+
text: tok.content,
|
|
299
|
+
marks: [
|
|
300
|
+
...markStack,
|
|
301
|
+
{
|
|
302
|
+
type: "code"
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
}),
|
|
306
|
+
strong_open: openMark("bold"),
|
|
307
|
+
strong_close: closeMark("bold"),
|
|
308
|
+
em_open: openMark("italic"),
|
|
309
|
+
em_close: closeMark("italic"),
|
|
310
|
+
s_open: openMark("strike"),
|
|
311
|
+
s_close: closeMark("strike"),
|
|
312
|
+
link_open: openLink,
|
|
313
|
+
link_close: closeMark("link")
|
|
314
|
+
};
|
|
315
|
+
function removeLastMark(stack, type) {
|
|
316
|
+
for(let i = stack.length - 1; i >= 0; i--){
|
|
317
|
+
if (stack[i].type === type) {
|
|
318
|
+
stack.splice(i, 1);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function headingLevel(markup) {
|
|
324
|
+
const n = markup.length;
|
|
325
|
+
return Math.min(Math.max(n, 1), 6);
|
|
326
|
+
}
|
|
327
|
+
function stampId(node) {
|
|
328
|
+
return {
|
|
329
|
+
...node,
|
|
330
|
+
attrs: {
|
|
331
|
+
...node.attrs,
|
|
332
|
+
id: generateBlockId()
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function stripId(node) {
|
|
337
|
+
if (!node.attrs || !("id" in node.attrs)) return node;
|
|
338
|
+
const { id: _id, ...rest } = node.attrs;
|
|
339
|
+
if (Object.keys(rest).length > 0) return {
|
|
340
|
+
...node,
|
|
341
|
+
attrs: rest
|
|
342
|
+
};
|
|
343
|
+
const { attrs: _attrs, ...bare } = node;
|
|
344
|
+
return bare;
|
|
345
|
+
}
|
|
346
|
+
export function tiptapToMarkdown(doc) {
|
|
347
|
+
const d = doc;
|
|
348
|
+
if (!d || d.type !== "doc" || !Array.isArray(d.content)) return "";
|
|
349
|
+
return d.content.map((node)=>nodeToMd(node, 0)).filter(Boolean).join("\n\n");
|
|
350
|
+
}
|
|
351
|
+
function numAttr(node, key) {
|
|
352
|
+
const value = node.attrs?.[key];
|
|
353
|
+
return typeof value === "number" ? value : undefined;
|
|
354
|
+
}
|
|
355
|
+
function strAttr(node, key) {
|
|
356
|
+
const value = node.attrs?.[key];
|
|
357
|
+
return typeof value === "string" ? value : undefined;
|
|
358
|
+
}
|
|
359
|
+
function childrenToMd(node, listDepth) {
|
|
360
|
+
return (node.content ?? []).map((child)=>nodeToMd(child, listDepth)).filter(Boolean).join("\n\n");
|
|
361
|
+
}
|
|
362
|
+
function headingToMd(node) {
|
|
363
|
+
const level = numAttr(node, "level") ?? 1;
|
|
364
|
+
const prefix = "#".repeat(Math.min(Math.max(level, 1), 6));
|
|
365
|
+
return `${prefix} ${inlineToMd(node.content ?? [])}`;
|
|
366
|
+
}
|
|
367
|
+
function orderedListToMd(node, listDepth) {
|
|
368
|
+
const start = numAttr(node, "start") ?? 1;
|
|
369
|
+
return (node.content ?? []).map((item, i)=>listItemToMd(item, `${start + i}.`, listDepth)).join("\n");
|
|
370
|
+
}
|
|
371
|
+
function blockquoteToMd(node) {
|
|
372
|
+
return childrenToMd(node, 0).split("\n").map((line)=>`> ${line}`).join("\n");
|
|
373
|
+
}
|
|
374
|
+
function codeBlockToMd(node) {
|
|
375
|
+
const lang = strAttr(node, "language") ?? "";
|
|
376
|
+
return `\`\`\`${lang}\n${extractPlainText(node.content ?? [])}\n\`\`\``;
|
|
377
|
+
}
|
|
378
|
+
function youtubeToMd(node) {
|
|
379
|
+
const videoId = strAttr(node, "videoId") ?? "";
|
|
380
|
+
if (!YOUTUBE_ID_RE.test(videoId)) return "";
|
|
381
|
+
const title = strAttr(node, "title") ?? "";
|
|
382
|
+
const rawStart = numAttr(node, "start") ?? 0;
|
|
383
|
+
const start = rawStart > 0 ? rawStart : 0;
|
|
384
|
+
const url = `https://www.youtube.com/watch?v=${videoId}${start ? `&t=${start}` : ""}`;
|
|
385
|
+
return ``;
|
|
386
|
+
}
|
|
387
|
+
const dropped = ()=>"";
|
|
388
|
+
function taskBullet(item) {
|
|
389
|
+
return item.attrs?.checked === true ? "- [x]" : "- [ ]";
|
|
390
|
+
}
|
|
391
|
+
function tableToMd(node) {
|
|
392
|
+
const rows = (node.content ?? []).map((row)=>(row.content ?? []).map((cell)=>(cell.content ?? []).map((block)=>inlineToMd(block.content ?? [])).join(" ").replace(/\|/g, "\\|")));
|
|
393
|
+
if (rows.length === 0) return "";
|
|
394
|
+
const width = Math.max(...rows.map((row)=>row.length));
|
|
395
|
+
const line = (cells)=>`| ${Array.from({
|
|
396
|
+
length: width
|
|
397
|
+
}, (_, i)=>cells[i] ?? "").join(" | ")} |`;
|
|
398
|
+
const rule = `| ${Array.from({
|
|
399
|
+
length: width
|
|
400
|
+
}, ()=>"---").join(" | ")} |`;
|
|
401
|
+
return [
|
|
402
|
+
line(rows[0]),
|
|
403
|
+
rule,
|
|
404
|
+
...rows.slice(1).map(line)
|
|
405
|
+
].join("\n");
|
|
406
|
+
}
|
|
407
|
+
const MD_WRITERS = {
|
|
408
|
+
paragraph: (node)=>inlineToMd(node.content ?? []),
|
|
409
|
+
heading: headingToMd,
|
|
410
|
+
bulletList: (node, listDepth)=>(node.content ?? []).map((item)=>listItemToMd(item, "-", listDepth)).join("\n"),
|
|
411
|
+
orderedList: orderedListToMd,
|
|
412
|
+
listItem: (node, listDepth)=>listItemContentsToMd(node, listDepth),
|
|
413
|
+
blockquote: blockquoteToMd,
|
|
414
|
+
codeBlock: codeBlockToMd,
|
|
415
|
+
horizontalRule: ()=>"---",
|
|
416
|
+
hardBreak: ()=>" \n",
|
|
417
|
+
youtube: youtubeToMd,
|
|
418
|
+
taskList: (node, listDepth)=>(node.content ?? []).map((item)=>listItemToMd(item, taskBullet(item), listDepth)).join("\n"),
|
|
419
|
+
taskItem: (node, listDepth)=>listItemContentsToMd(node, listDepth),
|
|
420
|
+
table: tableToMd,
|
|
421
|
+
image: dropped,
|
|
422
|
+
cmsBlock: dropped,
|
|
423
|
+
tableRow: dropped,
|
|
424
|
+
tableCell: dropped,
|
|
425
|
+
tableHeader: dropped,
|
|
426
|
+
text: (node)=>inlineTextToMd(node)
|
|
427
|
+
};
|
|
428
|
+
function nodeToMd(node, listDepth) {
|
|
429
|
+
if (Object.hasOwn(MD_WRITERS, node.type)) return MD_WRITERS[node.type](node, listDepth);
|
|
430
|
+
return childrenToMd(node, listDepth);
|
|
431
|
+
}
|
|
432
|
+
function listItemToMd(item, bullet, depth) {
|
|
433
|
+
const indent = " ".repeat(depth);
|
|
434
|
+
const content = listItemContentsToMd(item, depth + 1);
|
|
435
|
+
const lines = content.split("\n");
|
|
436
|
+
if (!lines.length) return `${indent}${bullet} `;
|
|
437
|
+
const first = `${indent}${bullet} ${lines[0]}`;
|
|
438
|
+
const rest = lines.slice(1).map((l)=>l.trim() ? `${indent} ${l}` : l).join("\n");
|
|
439
|
+
return rest ? `${first}\n${rest}` : first;
|
|
440
|
+
}
|
|
441
|
+
function listItemContentsToMd(item, depth) {
|
|
442
|
+
const parts = [];
|
|
443
|
+
for (const child of item.content ?? []){
|
|
444
|
+
if (child.type === "paragraph") {
|
|
445
|
+
parts.push(inlineToMd(child.content ?? []));
|
|
446
|
+
} else if (child.type === "bulletList" || child.type === "orderedList") {
|
|
447
|
+
parts.push(nodeToMd(child, depth));
|
|
448
|
+
} else {
|
|
449
|
+
parts.push(nodeToMd(child, depth));
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return parts.join("\n");
|
|
453
|
+
}
|
|
454
|
+
function inlineToMd(nodes) {
|
|
455
|
+
return nodes.map((n)=>inlineTextToMd(n)).join("");
|
|
456
|
+
}
|
|
457
|
+
const MARK_WRAPS = {
|
|
458
|
+
bold: (text)=>`**${text}**`,
|
|
459
|
+
italic: (text)=>`*${text}*`,
|
|
460
|
+
strike: (text)=>`~~${text}~~`
|
|
461
|
+
};
|
|
462
|
+
function applyMark(text, mark, raw) {
|
|
463
|
+
if (mark.type === "code") return `\`${raw}\``;
|
|
464
|
+
return Object.hasOwn(MARK_WRAPS, mark.type) ? MARK_WRAPS[mark.type](text) : text;
|
|
465
|
+
}
|
|
466
|
+
function inlineTextToMd(node) {
|
|
467
|
+
if (node.type === "hardBreak") return " \n";
|
|
468
|
+
if (node.type !== "text") return "";
|
|
469
|
+
const escaped = escapeMdText(node.text ?? "");
|
|
470
|
+
if (!node.marks?.length) return escaped;
|
|
471
|
+
const linkMark = node.marks.find((m)=>m.type === "link");
|
|
472
|
+
const text = node.marks.filter((m)=>m.type !== "link").reduce((acc, mark)=>applyMark(acc, mark, node.text ?? ""), escaped);
|
|
473
|
+
if (!linkMark) return text;
|
|
474
|
+
const href = typeof linkMark.attrs?.href === "string" ? linkMark.attrs.href : "";
|
|
475
|
+
return `[${text}](${href})`;
|
|
476
|
+
}
|
|
477
|
+
function escapeMdText(text) {
|
|
478
|
+
return text.replace(/\\/g, "\\\\").replace(/\*/g, "\\*").replace(/_/g, "\\_").replace(/`/g, "\\`").replace(/\[/g, "\\[");
|
|
479
|
+
}
|
|
480
|
+
function extractPlainText(nodes) {
|
|
481
|
+
return nodes.map((n)=>{
|
|
482
|
+
if (n.type === "text") return n.text ?? "";
|
|
483
|
+
if (n.type === "hardBreak") return "\n";
|
|
484
|
+
return extractPlainText(n.content ?? []);
|
|
485
|
+
}).join("");
|
|
486
|
+
}
|