vue-data-ui 3.17.13 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/A11yDataTable-q2-8fSlJ.js +45 -0
- package/dist/Arrow-BU2Z7mfz.js +116 -0
- package/dist/BaseDraggableDialog-LE75fWYz.js +272 -0
- package/dist/BaseIcon-CL6Y7alf.js +499 -0
- package/dist/BaseLegendToggle-BvPOFMVZ.js +56 -0
- package/dist/BaseScanner-C7dmAref.js +27 -0
- package/dist/BaseZoomControls-DSwf4HhS.js +111 -0
- package/dist/ColorPicker-BGbMrtup.js +255 -0
- package/dist/DataTable-ZG4GX2Zg.js +150 -0
- package/dist/Legend-BPb8i4aC.js +114 -0
- package/dist/NonSvgPenAndPaper-BT3YMjgo.js +577 -0
- package/dist/PackageVersion-B1cPtZ3Q.js +11 -0
- package/dist/PenAndPaper-DxBCVZAx.js +461 -0
- package/dist/RecursiveCircles-DPpLel6f.js +117 -0
- package/dist/RecursiveLabels-DBMJf_to.js +56 -0
- package/dist/RecursiveLinks-D06dBL4a.js +78 -0
- package/dist/Shape-Dbug7CtK.js +141 -0
- package/dist/Slicer-SEdaKYPX.js +1144 -0
- package/dist/SlicerPreview-BLlQTUI_.js +1523 -0
- package/dist/SparkTooltip-BaONR2nq.js +93 -0
- package/dist/Title-ByyzJzpc.js +87 -0
- package/dist/Tooltip-V6Z0Ko-1.js +307 -0
- package/dist/UserOptions-Gaw1761w.js +1407 -0
- package/dist/_plugin-vue_export-helper-Dq1MygBL.js +8 -0
- package/dist/canvas-lib-DTaADQOK.js +79 -0
- package/dist/components/arrow.js +2 -5
- package/dist/components/vue-ui-3d-bar.js +2 -5
- package/dist/components/vue-ui-accordion.js +2 -5
- package/dist/components/vue-ui-age-pyramid.js +2 -5
- package/dist/components/vue-ui-annotator.js +2 -5
- package/dist/components/vue-ui-bullet.js +2 -5
- package/dist/components/vue-ui-bump.js +2 -5
- package/dist/components/vue-ui-candlestick.js +2 -5
- package/dist/components/vue-ui-carousel-table.js +2 -5
- package/dist/components/vue-ui-chestnut.js +2 -5
- package/dist/components/vue-ui-chord.js +2 -5
- package/dist/components/vue-ui-circle-pack.js +2 -5
- package/dist/components/vue-ui-cursor.js +2 -5
- package/dist/components/vue-ui-dag.js +2 -5
- package/dist/components/vue-ui-dashboard.js +2 -5
- package/dist/components/vue-ui-digits.js +2 -5
- package/dist/components/vue-ui-donut-evolution.js +2 -5
- package/dist/components/vue-ui-donut.js +2 -5
- package/dist/components/vue-ui-dumbbell.js +2 -5
- package/dist/components/vue-ui-flow.js +2 -5
- package/dist/components/vue-ui-funnel.js +2 -5
- package/dist/components/vue-ui-galaxy.js +2 -5
- package/dist/components/vue-ui-gauge.js +2 -5
- package/dist/components/vue-ui-geo.js +2 -5
- package/dist/components/vue-ui-gizmo.js +2 -5
- package/dist/components/vue-ui-heatmap.js +2 -5
- package/dist/components/vue-ui-history-plot.js +2 -5
- package/dist/components/vue-ui-horizontal-bar.js +2 -5
- package/dist/components/vue-ui-icon.js +2 -5
- package/dist/components/vue-ui-kpi.js +2 -5
- package/dist/components/vue-ui-mini-loader.js +2 -5
- package/dist/components/vue-ui-molecule.js +2 -5
- package/dist/components/vue-ui-mood-radar.js +2 -5
- package/dist/components/vue-ui-nested-donuts.js +2 -5
- package/dist/components/vue-ui-onion.js +2 -5
- package/dist/components/vue-ui-parallel-coordinate-plot.js +2 -5
- package/dist/components/vue-ui-pattern-seed.js +2 -5
- package/dist/components/vue-ui-pattern.js +2 -5
- package/dist/components/vue-ui-quadrant.js +2 -5
- package/dist/components/vue-ui-quick-chart.js +2 -5
- package/dist/components/vue-ui-radar.js +2 -5
- package/dist/components/vue-ui-rating.js +2 -5
- package/dist/components/vue-ui-relation-circle.js +2 -5
- package/dist/components/vue-ui-ridgeline.js +2 -5
- package/dist/components/vue-ui-rings.js +2 -5
- package/dist/components/vue-ui-scatter.js +2 -5
- package/dist/components/vue-ui-skeleton.js +2 -5
- package/dist/components/vue-ui-smiley.js +2 -5
- package/dist/components/vue-ui-spark-trend.js +2 -5
- package/dist/components/vue-ui-sparkbar.js +2 -5
- package/dist/components/vue-ui-sparkgauge.js +2 -5
- package/dist/components/vue-ui-sparkhistogram.js +2 -5
- package/dist/components/vue-ui-sparkline.js +2 -5
- package/dist/components/vue-ui-sparkstackbar.js +2 -5
- package/dist/components/vue-ui-stackbar.js +2 -5
- package/dist/components/vue-ui-stackline.js +2 -5
- package/dist/components/vue-ui-strip-plot.js +2 -5
- package/dist/components/vue-ui-table-heatmap.js +2 -5
- package/dist/components/vue-ui-table-sparkline.js +2 -5
- package/dist/components/vue-ui-table.js +2 -5
- package/dist/components/vue-ui-thermometer.js +2 -5
- package/dist/components/vue-ui-timer.js +2 -5
- package/dist/components/vue-ui-tiremarks.js +2 -5
- package/dist/components/vue-ui-treemap.js +2 -5
- package/dist/components/vue-ui-vertical-bar.js +2 -5
- package/dist/components/vue-ui-waffle.js +2 -5
- package/dist/components/vue-ui-wheel.js +2 -5
- package/dist/components/vue-ui-word-cloud.js +2 -5
- package/dist/components/vue-ui-world.js +2 -5
- package/dist/components/vue-ui-xy-canvas.js +2 -5
- package/dist/components/vue-ui-xy.js +2 -5
- package/dist/dom-to-png-C9UOX1d2.js +237 -0
- package/dist/exposedLib-BQjH823l.js +19 -0
- package/dist/geoProjections-CQIkC70z.js +146 -0
- package/dist/img-NMY-_LiJ.js +74 -0
- package/dist/labelUtils-BiSegLOT.js +19 -0
- package/dist/lib-B83ZCydz.js +1879 -0
- package/dist/patternUtils-B7BWu5bV.js +258 -0
- package/dist/pdf-Ey2KFETK.js +90 -0
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/style.css +2 -1
- package/dist/types/arrow.d.ts +1 -1
- package/dist/types/utils.d.ts +23 -0
- package/dist/types/vue-data-ui.d.ts +4766 -630
- package/dist/types/vue-ui-3d-bar.d.ts +64 -9
- package/dist/types/vue-ui-accordion.d.ts +4 -3
- package/dist/types/vue-ui-age-pyramid.d.ts +79 -9
- package/dist/types/vue-ui-annotator.d.ts +3 -5
- package/dist/types/vue-ui-bullet.d.ts +60 -9
- package/dist/types/vue-ui-bump.d.ts +65 -9
- package/dist/types/vue-ui-candlestick.d.ts +83 -9
- package/dist/types/vue-ui-carousel-table.d.ts +36 -6
- package/dist/types/vue-ui-chestnut.d.ts +66 -9
- package/dist/types/vue-ui-chord.d.ts +78 -9
- package/dist/types/vue-ui-circle-pack.d.ts +86 -9
- package/dist/types/vue-ui-cursor.d.ts +4 -2
- package/dist/types/vue-ui-dag.d.ts +92 -9
- package/dist/types/vue-ui-dashboard.d.ts +43 -6
- package/dist/types/vue-ui-digits.d.ts +4 -2
- package/dist/types/vue-ui-donut-evolution.d.ts +70 -9
- package/dist/types/vue-ui-donut.d.ts +92 -9
- package/dist/types/vue-ui-dumbbell.d.ts +65 -9
- package/dist/types/vue-ui-flow.d.ts +79 -9
- package/dist/types/vue-ui-funnel.d.ts +55 -9
- package/dist/types/vue-ui-galaxy.d.ts +83 -9
- package/dist/types/vue-ui-gauge.d.ts +64 -9
- package/dist/types/vue-ui-geo.d.ts +71 -9
- package/dist/types/vue-ui-gizmo.d.ts +17 -6
- package/dist/types/vue-ui-heatmap.d.ts +73 -9
- package/dist/types/vue-ui-history-plot.d.ts +82 -9
- package/dist/types/vue-ui-horizontal-bar.d.ts +84 -9
- package/dist/types/vue-ui-icon.d.ts +2 -2
- package/dist/types/vue-ui-kpi.d.ts +21 -7
- package/dist/types/vue-ui-mini-loader.d.ts +5 -3
- package/dist/types/vue-ui-molecule.d.ts +86 -9
- package/dist/types/vue-ui-mood-radar.d.ts +66 -9
- package/dist/types/vue-ui-nested-donuts.d.ts +80 -9
- package/dist/types/vue-ui-onion.d.ts +77 -9
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +92 -9
- package/dist/types/vue-ui-pattern-seed.d.ts +1 -1
- package/dist/types/vue-ui-pattern.d.ts +2 -2
- package/dist/types/vue-ui-quadrant.d.ts +86 -9
- package/dist/types/vue-ui-quick-chart.d.ts +79 -9
- package/dist/types/vue-ui-radar.d.ts +83 -9
- package/dist/types/vue-ui-rating.d.ts +22 -6
- package/dist/types/vue-ui-relation-circle.d.ts +66 -9
- package/dist/types/vue-ui-ridgeline.d.ts +69 -9
- package/dist/types/vue-ui-rings.d.ts +70 -9
- package/dist/types/vue-ui-scatter.d.ts +67 -9
- package/dist/types/vue-ui-skeleton.d.ts +3 -2
- package/dist/types/vue-ui-smiley.d.ts +3 -2
- package/dist/types/vue-ui-spark-trend.d.ts +14 -6
- package/dist/types/vue-ui-sparkbar.d.ts +27 -6
- package/dist/types/vue-ui-sparkgauge.d.ts +20 -6
- package/dist/types/vue-ui-sparkhistogram.d.ts +24 -6
- package/dist/types/vue-ui-sparkline.d.ts +35 -6
- package/dist/types/vue-ui-sparkstackbar.d.ts +35 -6
- package/dist/types/vue-ui-stackbar.d.ts +85 -9
- package/dist/types/vue-ui-stackline.d.ts +81 -9
- package/dist/types/vue-ui-strip-plot.d.ts +66 -9
- package/dist/types/vue-ui-table-heatmap.d.ts +52 -6
- package/dist/types/vue-ui-table-sparkline.d.ts +30 -6
- package/dist/types/vue-ui-table.d.ts +10 -2
- package/dist/types/vue-ui-thermometer.d.ts +46 -9
- package/dist/types/vue-ui-timer.d.ts +31 -5
- package/dist/types/vue-ui-tiremarks.d.ts +46 -9
- package/dist/types/vue-ui-treemap.d.ts +73 -9
- package/dist/types/vue-ui-vertical-bar.d.ts +2 -2
- package/dist/types/vue-ui-waffle.d.ts +72 -9
- package/dist/types/vue-ui-wheel.d.ts +46 -9
- package/dist/types/vue-ui-word-cloud.d.ts +73 -9
- package/dist/types/vue-ui-world.d.ts +68 -9
- package/dist/types/vue-ui-xy-canvas.d.ts +75 -9
- package/dist/types/vue-ui-xy.d.ts +108 -10
- package/dist/useAutoSizeLabelsInsideViewbox-De0rTecW.js +50 -0
- package/dist/useChartAccessibility-Do37qcw2.js +12 -0
- package/dist/useConfig-KnOLHtlJ.js +7419 -0
- package/dist/useFitSvgText-C-MEdAfe.js +63 -0
- package/dist/useNestedProp-CcxL1gUU.js +10 -0
- package/dist/useObjectBindings-Dc8Rf6Qy.js +189 -0
- package/dist/usePanZoom-B-4M_gmY.js +157 -0
- package/dist/usePrefersMotion-BywLbIko.js +15 -0
- package/dist/usePrinter-CMLF900n.js +49 -0
- package/dist/useResponsive-CrAInupd.js +19 -0
- package/dist/useStableElementSize-0I1IpHPl.js +77 -0
- package/dist/useSvgExport-Dtu973wa.js +755 -0
- package/dist/useTableResponsive-DrM1xqII.js +24 -0
- package/dist/useThemeCheck-rFK9Zlb_.js +24 -0
- package/dist/useTimeLabelCollider-Dm55Emzg.js +57 -0
- package/dist/useTimeLabels-C0x7zUXP.js +272 -0
- package/dist/useUserOptionState-CjPJPTg2.js +15 -0
- package/dist/utils.js +27 -44
- package/dist/vClickOutside-CbX_bC9A.js +13 -0
- package/dist/vue-data-ui-D1REqS_k.js +274 -0
- package/dist/vue-data-ui.js +76 -167
- package/dist/vue-ui-3d-bar-vO_kSCd6.js +1747 -0
- package/dist/vue-ui-accordion-Cf-jZELj.js +81 -0
- package/dist/vue-ui-age-pyramid-DHXhrP_3.js +1226 -0
- package/dist/vue-ui-annotator-B0o6czmF.js +2899 -0
- package/dist/vue-ui-bullet-C93-cf0H.js +700 -0
- package/dist/vue-ui-bump-C_Szk9AZ.js +1239 -0
- package/dist/vue-ui-candlestick-6JdMEJKO.js +1802 -0
- package/dist/vue-ui-carousel-table-CZ_HK0Iw.js +445 -0
- package/dist/vue-ui-chestnut-B8ixU585.js +2000 -0
- package/dist/vue-ui-chord-DC5sLapz.js +1381 -0
- package/dist/vue-ui-circle-pack-CsmSEwt3.js +1183 -0
- package/dist/vue-ui-cursor-B-QODIL3.js +283 -0
- package/dist/vue-ui-dag-C9LYfjS_.js +2899 -0
- package/dist/vue-ui-dashboard-D-f4ZaLi.js +503 -0
- package/dist/vue-ui-digits-CcB3odN7.js +209 -0
- package/dist/vue-ui-donut-DR0ngnZC.js +2396 -0
- package/dist/vue-ui-donut-evolution-BXpOscCe.js +1490 -0
- package/dist/vue-ui-dumbbell-CB_clJWA.js +1517 -0
- package/dist/vue-ui-flow-CUiOAEy1.js +1223 -0
- package/dist/vue-ui-funnel-BAlGDK0o.js +767 -0
- package/dist/vue-ui-galaxy-DbYNfSHb.js +1062 -0
- package/dist/vue-ui-gauge-Cie7jykM.js +910 -0
- package/dist/vue-ui-geo-Ce_gBRye.js +1504 -0
- package/dist/vue-ui-gizmo-B9POi_SN.js +225 -0
- package/dist/vue-ui-heatmap-DFfRSbnk.js +1556 -0
- package/dist/vue-ui-history-plot-DHp5WFgx.js +1551 -0
- package/dist/vue-ui-horizontal-bar-DI4yoARv.js +1669 -0
- package/dist/vue-ui-kpi-oUfso4UP.js +96 -0
- package/dist/vue-ui-mini-loader-aZMi1_uX.js +125 -0
- package/dist/vue-ui-molecule-D72kzel_.js +912 -0
- package/dist/vue-ui-mood-radar-Tw2ZFP7Y.js +1138 -0
- package/dist/vue-ui-nested-donuts-Bza1LczX.js +1472 -0
- package/dist/vue-ui-onion-BOuuib5d.js +1188 -0
- package/dist/vue-ui-parallel-coordinate-plot-BuQUq6-o.js +1413 -0
- package/dist/vue-ui-pattern-Bj-IPFr2.js +154 -0
- package/dist/vue-ui-pattern-seed-abRweCDE.js +61 -0
- package/dist/vue-ui-quadrant-zNFIXNt9.js +1966 -0
- package/dist/vue-ui-quick-chart-B1a8QVUn.js +2459 -0
- package/dist/vue-ui-radar-VFn-YP_2.js +1214 -0
- package/dist/vue-ui-rating-Dxgn21FA.js +343 -0
- package/dist/vue-ui-relation-circle-B0sZaCgX.js +914 -0
- package/dist/vue-ui-ridgeline-BsBAbg5V.js +1612 -0
- package/dist/vue-ui-rings-CDwUzMF-.js +1231 -0
- package/dist/vue-ui-scatter-Du_b-zM8.js +2380 -0
- package/dist/vue-ui-skeleton-BAq6J_6G.js +2556 -0
- package/dist/vue-ui-smiley-CoHvkS0c.js +356 -0
- package/dist/vue-ui-spark-trend-BmCcJ17C.js +438 -0
- package/dist/vue-ui-sparkbar-9z05IMx8.js +393 -0
- package/dist/vue-ui-sparkgauge-BlWri9DP.js +255 -0
- package/dist/vue-ui-sparkhistogram-CHZTt8d8.js +560 -0
- package/dist/vue-ui-sparkline-DirLW9Nd.js +1503 -0
- package/dist/vue-ui-sparkstackbar-Dk6cEI2o.js +660 -0
- package/dist/vue-ui-stackbar-DNIrGHkt.js +2235 -0
- package/dist/vue-ui-stackline-HoWn_ur2.js +2362 -0
- package/dist/vue-ui-strip-plot-Bi8u_fLr.js +1328 -0
- package/dist/vue-ui-table-XLjOOfdI.js +1338 -0
- package/dist/vue-ui-table-heatmap-DvnFiveI.js +334 -0
- package/dist/vue-ui-table-sparkline-CSZf8XxP.js +697 -0
- package/dist/vue-ui-thermometer-7eUO_7CP.js +753 -0
- package/dist/vue-ui-timer-DCbxsREb.js +439 -0
- package/dist/vue-ui-tiremarks-p_sfTufv.js +542 -0
- package/dist/vue-ui-treemap-BdZOW7TM.js +1575 -0
- package/dist/vue-ui-waffle-Bf9dWWCM.js +1350 -0
- package/dist/vue-ui-wheel-CZrIiB0K.js +875 -0
- package/dist/vue-ui-word-cloud-BeLjxoRe.js +1644 -0
- package/dist/vue-ui-world-D9ahzEQ2.js +14252 -0
- package/dist/vue-ui-xy-DrvbVuHO.js +4063 -0
- package/dist/vue-ui-xy-canvas-DU7vFrQr.js +1774 -0
- package/dist/vue_ui_3d_bar-CXKqO5Ej.js +185 -0
- package/dist/vue_ui_age_pyramid-BON8QI6X.js +301 -0
- package/dist/vue_ui_bullet-CE5sFT7u.js +186 -0
- package/dist/vue_ui_bump-frnXaXul.js +201 -0
- package/dist/vue_ui_candlestick-sY6UtOop.js +374 -0
- package/dist/vue_ui_chestnut-BiUZFv40.js +305 -0
- package/dist/vue_ui_chord-DpyR_b9A.js +275 -0
- package/dist/vue_ui_circle_pack-DBKz_Fi_.js +130 -0
- package/dist/vue_ui_dag-Ci_MOnvd.js +258 -0
- package/dist/vue_ui_donut-Cx2_BGcQ.js +358 -0
- package/dist/vue_ui_donut_evolution-CAJefrHs.js +717 -0
- package/dist/vue_ui_dumbbell-CClzAZTN.js +304 -0
- package/dist/vue_ui_flow-CCHO1Lo9.js +238 -0
- package/dist/vue_ui_funnel-h8q2mRpC.js +234 -0
- package/dist/vue_ui_galaxy-70vtkEBw.js +265 -0
- package/dist/vue_ui_gauge-C17CgfzN.js +178 -0
- package/dist/vue_ui_geo-C0UbQ0Lc.js +248 -0
- package/dist/vue_ui_heatmap-BqPP3J4M.js +319 -0
- package/dist/vue_ui_history_plot-C5nytDHh.js +413 -0
- package/dist/vue_ui_horizontal_bar-Bqxorkc_.js +341 -0
- package/dist/vue_ui_molecule-Dka4JBOp.js +231 -0
- package/dist/vue_ui_mood_radar-Dg4ijm53.js +281 -0
- package/dist/vue_ui_nested_donuts-BY9cOoHF.js +273 -0
- package/dist/vue_ui_onion-DTV9cup-.js +293 -0
- package/dist/vue_ui_parallel_coordinate_plot-CNWrDh96.js +278 -0
- package/dist/vue_ui_quadrant-3kjYvxpj.js +428 -0
- package/dist/vue_ui_quick_chart--VaYQuM4.js +139 -0
- package/dist/vue_ui_radar-Dxx9GJmj.js +306 -0
- package/dist/vue_ui_relation_circle-Cr0I2SoU.js +98 -0
- package/dist/vue_ui_ridgeline-CAtYca4b.js +767 -0
- package/dist/vue_ui_rings-DXC1VeX5.js +320 -0
- package/dist/vue_ui_scatter-D2S2j0ap.js +479 -0
- package/dist/vue_ui_spark_trend-BHMQ6_1p.js +82 -0
- package/dist/vue_ui_sparkbar-BR6hbuDE.js +64 -0
- package/dist/vue_ui_sparkgauge-xfPRHnMv.js +90 -0
- package/dist/vue_ui_sparkhistogram-CJRENZ1C.js +123 -0
- package/dist/vue_ui_sparkline-wgk7yO7E.js +151 -0
- package/dist/vue_ui_sparkstackbar-C5qZMmAl.js +175 -0
- package/dist/vue_ui_stackbar-BW_C3MXw.js +412 -0
- package/dist/vue_ui_stackline-DpI2LnjO.js +426 -0
- package/dist/vue_ui_strip_plot-8ZelqC5b.js +301 -0
- package/dist/vue_ui_table_heatmap-BGUjA0WA.js +80 -0
- package/dist/vue_ui_table_sparkline-i0Q-N_we.js +124 -0
- package/dist/vue_ui_thermometer-CuN7Gpez.js +123 -0
- package/dist/vue_ui_tiremarks-A6UHC0c3.js +122 -0
- package/dist/vue_ui_treemap-BQp06q-g.js +328 -0
- package/dist/vue_ui_vertical_bar-CJSD1FZS.js +247 -0
- package/dist/vue_ui_waffle-C_Ev4l7B.js +292 -0
- package/dist/vue_ui_wheel-DdkTPXJU.js +133 -0
- package/dist/vue_ui_word_cloud-B1PbsYPc.js +254 -0
- package/dist/vue_ui_xy-BYPqfYyx.js +482 -0
- package/dist/vue_ui_xy_canvas-CMHGNrLf.js +408 -0
- package/package.json +7 -7
- package/dist/A11yDataTable-BpmuNomI.js +0 -54
- package/dist/Arrow-dSvLFssU.js +0 -101
- package/dist/BaseDraggableDialog-Di8Hlru3.js +0 -249
- package/dist/BaseIcon-DX0hTWa-.js +0 -476
- package/dist/BaseLegendToggle-cMP8M2u0.js +0 -47
- package/dist/BaseScanner-C2j3TsSY.js +0 -36
- package/dist/BaseZoomControls-CVSC1-SU.js +0 -123
- package/dist/ColorPicker-bAxGcXK0.js +0 -271
- package/dist/DataTable-cMnb68Ik.js +0 -145
- package/dist/Legend-DGN5lY60.js +0 -104
- package/dist/NonSvgPenAndPaper-B6E0zEYe.js +0 -573
- package/dist/PackageVersion-BfrCAH6_.js +0 -10
- package/dist/PenAndPaper-CJDoB5H9.js +0 -527
- package/dist/RecursiveCircles-BE6GoMmo.js +0 -101
- package/dist/RecursiveLabels-BhQMS9Sm.js +0 -55
- package/dist/RecursiveLinks-BDwyYfP-.js +0 -83
- package/dist/Shape-CxJ5_Rre.js +0 -116
- package/dist/Slicer-D7UcO8sN.js +0 -1145
- package/dist/SlicerPreview-D_CgrN_7.js +0 -1580
- package/dist/SparkTooltip-D4bM-kfz.js +0 -68
- package/dist/Title-BbKoiBk2.js +0 -88
- package/dist/Tooltip-Cvt7Fi0Q.js +0 -299
- package/dist/UserOptions-DVduN6X7.js +0 -1474
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/dom-to-png-DGvx6i5V.js +0 -262
- package/dist/exposedLib-sJvY1pST.js +0 -22
- package/dist/geoProjections-BFq2sOBY.js +0 -162
- package/dist/img-CjTQXS0U.js +0 -57
- package/dist/labelUtils-DX9oyq3C.js +0 -26
- package/dist/lib-DMzrGQHK.js +0 -2477
- package/dist/patternUtils-BINhU4Ky.js +0 -615
- package/dist/pdf-C4H4o1Cj.js +0 -88
- package/dist/useAutoSizeLabelsInsideViewbox-izlGDfwu.js +0 -55
- package/dist/useChartAccessibility-cp6XQtqi.js +0 -15
- package/dist/useConfig-CG4HT3wS.js +0 -7901
- package/dist/useFitSvgText-2crs6Fv5.js +0 -69
- package/dist/useNestedProp-DH0BEVVS.js +0 -13
- package/dist/useObjectBindings-Dixg-RIe.js +0 -228
- package/dist/usePanZoom-BbDhcKWf.js +0 -141
- package/dist/usePrefersMotion-Co0nj1eS.js +0 -17
- package/dist/usePrinter-C4t8DdQ-.js +0 -51
- package/dist/useResponsive-DfdjqQps.js +0 -195
- package/dist/useStableElementSize-C48ZVcZQ.js +0 -77
- package/dist/useSvgExport-BTG4hVPO.js +0 -870
- package/dist/useTableResponsive-BpfiEtzR.js +0 -26
- package/dist/useThemeCheck-C9Ccl7U9.js +0 -36
- package/dist/useTimeLabelCollider-D3JeJ6Ye.js +0 -86
- package/dist/useTimeLabels-Cv0tD9In.js +0 -307
- package/dist/useUserOptionState-B7Ej974k.js +0 -19
- package/dist/vClickOutside-C6WiFswA.js +0 -13
- package/dist/vue-data-ui-D1ZI7Y4l.js +0 -433
- package/dist/vue-ui-3d-bar-DEjKYzI5.js +0 -1824
- package/dist/vue-ui-accordion-DFtpH_16.js +0 -92
- package/dist/vue-ui-age-pyramid-LiC9hTjP.js +0 -1179
- package/dist/vue-ui-annotator-DrKnQoHf.js +0 -2991
- package/dist/vue-ui-bullet-DdxEINdq.js +0 -769
- package/dist/vue-ui-bump-CdgO1V7z.js +0 -1250
- package/dist/vue-ui-candlestick-DxJnPwto.js +0 -1775
- package/dist/vue-ui-carousel-table-CMefu5TI.js +0 -487
- package/dist/vue-ui-chestnut-BnGN72PO.js +0 -2001
- package/dist/vue-ui-chord-DWyar45U.js +0 -1457
- package/dist/vue-ui-circle-pack-CQ8vF2XH.js +0 -1076
- package/dist/vue-ui-cursor-HHOdkmyB.js +0 -260
- package/dist/vue-ui-dag-BDWPBElq.js +0 -3209
- package/dist/vue-ui-dashboard-Dg_I3X2a.js +0 -627
- package/dist/vue-ui-digits-CZmdir8V.js +0 -211
- package/dist/vue-ui-donut-BKegKHxj.js +0 -2608
- package/dist/vue-ui-donut-evolution-047dE4Lu.js +0 -1578
- package/dist/vue-ui-dumbbell-BL4ZMChj.js +0 -1552
- package/dist/vue-ui-flow-BAqtyunQ.js +0 -1279
- package/dist/vue-ui-funnel-Pl2sEOZs.js +0 -823
- package/dist/vue-ui-galaxy-CBF5Wsax.js +0 -1108
- package/dist/vue-ui-gauge-COV_S0Vp.js +0 -955
- package/dist/vue-ui-geo-CaPXElPf.js +0 -1510
- package/dist/vue-ui-gizmo-Csn7up96.js +0 -238
- package/dist/vue-ui-heatmap-Cpb0BYLa.js +0 -1694
- package/dist/vue-ui-history-plot-ZZEdzFCE.js +0 -1564
- package/dist/vue-ui-horizontal-bar-BonPYUZf.js +0 -1735
- package/dist/vue-ui-kpi-DoHhSsDK.js +0 -130
- package/dist/vue-ui-mini-loader-DOTBVCLE.js +0 -138
- package/dist/vue-ui-molecule-mVYnXouV.js +0 -945
- package/dist/vue-ui-mood-radar-DPvwnc3z.js +0 -1197
- package/dist/vue-ui-nested-donuts-C7E6TXrZ.js +0 -1702
- package/dist/vue-ui-onion-BGIlFhGB.js +0 -1207
- package/dist/vue-ui-parallel-coordinate-plot-C6G_A9ua.js +0 -1432
- package/dist/vue-ui-pattern-mXZW_pvA.js +0 -146
- package/dist/vue-ui-pattern-seed-BcNlxb2i.js +0 -36
- package/dist/vue-ui-quadrant-CVpIeYOB.js +0 -1918
- package/dist/vue-ui-quick-chart-CcV8qn9-.js +0 -2514
- package/dist/vue-ui-radar-G4AV1rBo.js +0 -1259
- package/dist/vue-ui-rating-CqPlP88P.js +0 -370
- package/dist/vue-ui-relation-circle-CkZ8oFVV.js +0 -856
- package/dist/vue-ui-ridgeline-CBTyYn6Q.js +0 -1737
- package/dist/vue-ui-rings-CSIOqFiP.js +0 -1256
- package/dist/vue-ui-scatter-AuC46ufT.js +0 -2345
- package/dist/vue-ui-skeleton-YD6rZjY_.js +0 -2475
- package/dist/vue-ui-smiley-CY0WFv2j.js +0 -391
- package/dist/vue-ui-spark-trend-D8KGIt-R.js +0 -423
- package/dist/vue-ui-sparkbar-BjWGJjzN.js +0 -424
- package/dist/vue-ui-sparkgauge-Dab5mss7.js +0 -285
- package/dist/vue-ui-sparkhistogram-D0rsmiPh.js +0 -559
- package/dist/vue-ui-sparkline-BCaauQuX.js +0 -1550
- package/dist/vue-ui-sparkstackbar-NT5yD6xA.js +0 -672
- package/dist/vue-ui-stackbar-ChBk_A1c.js +0 -2393
- package/dist/vue-ui-stackline-Cujamlze.js +0 -2490
- package/dist/vue-ui-strip-plot-CGBumG6I.js +0 -1293
- package/dist/vue-ui-table-BX2iMku4.js +0 -1726
- package/dist/vue-ui-table-heatmap-KXgXYVXm.js +0 -353
- package/dist/vue-ui-table-sparkline-C3NWnry0.js +0 -803
- package/dist/vue-ui-thermometer-DvdceZB1.js +0 -743
- package/dist/vue-ui-timer-XWAbvuAY.js +0 -504
- package/dist/vue-ui-tiremarks-B-YI1RlT.js +0 -578
- package/dist/vue-ui-treemap-AzorGfmd.js +0 -1757
- package/dist/vue-ui-waffle-CKtUvdTE.js +0 -1442
- package/dist/vue-ui-wheel-CnsLEArZ.js +0 -908
- package/dist/vue-ui-word-cloud-iAme2ihe.js +0 -1644
- package/dist/vue-ui-world-D5rrC9rw.js +0 -14452
- package/dist/vue-ui-xy-C_Q9chQe.js +0 -4468
- package/dist/vue-ui-xy-canvas-DG0299qE.js +0 -2107
- package/dist/vue_ui_3d_bar-CL0iX8Qi.js +0 -22
- package/dist/vue_ui_age_pyramid-8H8WSL7J.js +0 -22
- package/dist/vue_ui_bullet-Ckqieba5.js +0 -22
- package/dist/vue_ui_bump-CIht647H.js +0 -22
- package/dist/vue_ui_candlestick-BAMn-VGw.js +0 -22
- package/dist/vue_ui_chestnut-BloFvDuV.js +0 -22
- package/dist/vue_ui_chord-Bc1_ocwK.js +0 -22
- package/dist/vue_ui_circle_pack-CLmw8nHe.js +0 -22
- package/dist/vue_ui_dag-ZOwuDBZ8.js +0 -22
- package/dist/vue_ui_donut-CA4dgV8J.js +0 -22
- package/dist/vue_ui_donut_evolution-DFQU-rqE.js +0 -22
- package/dist/vue_ui_dumbbell-BCOHDiPk.js +0 -22
- package/dist/vue_ui_flow-BErINgox.js +0 -22
- package/dist/vue_ui_funnel-yuaMZ-yb.js +0 -22
- package/dist/vue_ui_galaxy-D95AN4FT.js +0 -22
- package/dist/vue_ui_gauge-BMEuRC4J.js +0 -22
- package/dist/vue_ui_geo--kg4VoVX.js +0 -22
- package/dist/vue_ui_heatmap-C9u993qE.js +0 -22
- package/dist/vue_ui_history_plot-BCKk1CrQ.js +0 -22
- package/dist/vue_ui_horizontal_bar-BEagrV0T.js +0 -22
- package/dist/vue_ui_molecule-BtvlINUh.js +0 -22
- package/dist/vue_ui_mood_radar-BUs6Fdn8.js +0 -22
- package/dist/vue_ui_nested_donuts-DvTrWT_C.js +0 -22
- package/dist/vue_ui_onion-CxWH9_OZ.js +0 -22
- package/dist/vue_ui_parallel_coordinate_plot-DH3cFJ3n.js +0 -22
- package/dist/vue_ui_quadrant-DjRs--Uz.js +0 -22
- package/dist/vue_ui_quick_chart-DMCjEjPe.js +0 -22
- package/dist/vue_ui_radar-DryGBOrz.js +0 -22
- package/dist/vue_ui_relation_circle-CCroen7h.js +0 -22
- package/dist/vue_ui_ridgeline-j4rVmpEp.js +0 -22
- package/dist/vue_ui_rings-CxOrekqA.js +0 -22
- package/dist/vue_ui_scatter-Bu1EAy9H.js +0 -22
- package/dist/vue_ui_spark_trend-3BjrSprO.js +0 -22
- package/dist/vue_ui_sparkbar-BsMzz5Um.js +0 -22
- package/dist/vue_ui_sparkgauge-KnjASOZs.js +0 -22
- package/dist/vue_ui_sparkhistogram-GBdzIVvS.js +0 -22
- package/dist/vue_ui_sparkline-CQ8DJVJx.js +0 -22
- package/dist/vue_ui_sparkstackbar-BSexvOuM.js +0 -22
- package/dist/vue_ui_stackbar-CuDC4O4b.js +0 -22
- package/dist/vue_ui_stackline-QTh-nuxE.js +0 -22
- package/dist/vue_ui_strip_plot-B9ypi_F3.js +0 -22
- package/dist/vue_ui_table_heatmap-CkvipPVy.js +0 -16
- package/dist/vue_ui_table_sparkline-yQdijcyJ.js +0 -22
- package/dist/vue_ui_thermometer-BTmjRBH8.js +0 -22
- package/dist/vue_ui_tiremarks-DBotWfi8.js +0 -22
- package/dist/vue_ui_treemap-D9-AIkT-.js +0 -22
- package/dist/vue_ui_vertical_bar-CELc39b8.js +0 -18
- package/dist/vue_ui_waffle-M2h-uJQ_.js +0 -22
- package/dist/vue_ui_wheel-LqBz3lv4.js +0 -22
- package/dist/vue_ui_word_cloud-mKAtBxHR.js +0 -22
- package/dist/vue_ui_xy-esktmpg-.js +0 -22
- package/dist/vue_ui_xy_canvas-6BBDSowT.js +0 -22
|
@@ -1,2991 +0,0 @@
|
|
|
1
|
-
import { computed as de, ref as i, watch as ut, onMounted as kt, onBeforeUnmount as xt, openBlock as f, createBlock as E, Teleport as qt, createElementBlock as Y, normalizeStyle as C, normalizeClass as D, createElementVNode as r, renderSlot as gt, createCommentVNode as g, createVNode as _, withCtx as W, createTextVNode as R, toDisplayString as S, unref as tt, withDirectives as ze, vModelCheckbox as lt, vModelText as ot, withModifiers as Ge, Fragment as Jt, renderList as Zt, nextTick as Qt } from "vue";
|
|
2
|
-
import { j as he, t as _t, y as el, aB as tl } from "./lib-DMzrGQHK.js";
|
|
3
|
-
import { u as ll } from "./useConfig-CG4HT3wS.js";
|
|
4
|
-
import { d as ol } from "./dom-to-png-DGvx6i5V.js";
|
|
5
|
-
import { u as ul } from "./usePrinter-C4t8DdQ-.js";
|
|
6
|
-
import oe from "./BaseIcon-DX0hTWa-.js";
|
|
7
|
-
import rl from "./vue-ui-accordion-DFtpH_16.js";
|
|
8
|
-
import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
import { C as nl } from "./ColorPicker-bAxGcXK0.js";
|
|
10
|
-
function sl(p) {
|
|
11
|
-
const Q = (d) => p.isMacLike.value ? d.metaKey : d.ctrlKey, pe = (d) => {
|
|
12
|
-
const V = d;
|
|
13
|
-
if (!V) return !1;
|
|
14
|
-
const B = (V.tagName || "").toLowerCase();
|
|
15
|
-
return V.isContentEditable || B === "input" || B === "textarea" || B === "select";
|
|
16
|
-
}, $e = (d) => !!(!p.isSummaryOpen.value || pe(d.target) || p.isWriting.value), se = () => {
|
|
17
|
-
p.isDeleteMode.value = !1, p.isMoveMode.value = !1, p.isResizeMode.value = !1, p.isSelectMode.value = !1, p.isDrawMode.value = !1, p.isTextMode.value = !1, p.activeShape.value = void 0, p.showCaret.value = !1;
|
|
18
|
-
}, fe = (d) => {
|
|
19
|
-
switch (se(), d) {
|
|
20
|
-
case "m":
|
|
21
|
-
p.isMoveMode.value = !0;
|
|
22
|
-
break;
|
|
23
|
-
case "r":
|
|
24
|
-
p.isResizeMode.value = !0;
|
|
25
|
-
break;
|
|
26
|
-
case "d":
|
|
27
|
-
p.isDeleteMode.value = !0;
|
|
28
|
-
break;
|
|
29
|
-
case "g":
|
|
30
|
-
p.isSelectMode.value = !0, p.setShapeTo("group"), p.activeShape.value = "group";
|
|
31
|
-
break;
|
|
32
|
-
case "t":
|
|
33
|
-
p.isTextMode.value = !0, p.isWriting.value = !1, p.showCaret.value = !1;
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}, ve = (d) => {
|
|
37
|
-
switch (d) {
|
|
38
|
-
case "c":
|
|
39
|
-
p.setShapeTo("circle");
|
|
40
|
-
break;
|
|
41
|
-
case "s":
|
|
42
|
-
p.setShapeTo("rect");
|
|
43
|
-
break;
|
|
44
|
-
case "a":
|
|
45
|
-
p.setShapeTo("arrow");
|
|
46
|
-
break;
|
|
47
|
-
case "l":
|
|
48
|
-
p.setShapeTo("line");
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
}, s = (d, V) => {
|
|
52
|
-
const B = p.lastSelectedShape.value;
|
|
53
|
-
if (!B) return;
|
|
54
|
-
const U = (we, T) => {
|
|
55
|
-
typeof B[we] == "number" && (B[we] += T);
|
|
56
|
-
};
|
|
57
|
-
switch (B.type) {
|
|
58
|
-
case "rect":
|
|
59
|
-
case "circle":
|
|
60
|
-
case "text":
|
|
61
|
-
U("x", d), U("y", V);
|
|
62
|
-
break;
|
|
63
|
-
case "arrow":
|
|
64
|
-
U("x", d), U("y", V), U("endX", d), U("endY", V);
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
}, ee = () => {
|
|
68
|
-
const d = p.lastSelectedShape.value;
|
|
69
|
-
d && (p.shapes.value = p.shapes.value.filter(
|
|
70
|
-
(V) => V.id !== d.id
|
|
71
|
-
), p.lastSelectedShape.value = void 0);
|
|
72
|
-
};
|
|
73
|
-
let h = !1, q = null;
|
|
74
|
-
const F = () => {
|
|
75
|
-
h || (h = !0, p.history?.value?.begin?.("nudge"));
|
|
76
|
-
}, te = () => {
|
|
77
|
-
h && (clearTimeout(q), q = setTimeout(() => {
|
|
78
|
-
h = !1, p.history?.value?.end?.();
|
|
79
|
-
}, 160));
|
|
80
|
-
}, le = () => {
|
|
81
|
-
clearTimeout(q), h && p.history?.value?.end?.(), h = !1;
|
|
82
|
-
}, ue = (d) => {
|
|
83
|
-
if (Q(d) && !d.shiftKey && d.key.toLowerCase() === "z") {
|
|
84
|
-
if ($e(d)) return;
|
|
85
|
-
d.preventDefault(), p.undoLastShape?.();
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (Q(d) && d.shiftKey && d.key.toLowerCase() === "z" || Q(d) && d.key.toLowerCase() === "y") {
|
|
89
|
-
if ($e(d)) return;
|
|
90
|
-
d.preventDefault(), typeof p.redoLastShape == "function" ? p.redoLastShape() : p.history?.value?.redo?.();
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if ($e(d)) return;
|
|
94
|
-
const V = d.key.toLowerCase();
|
|
95
|
-
if (V === "escape") {
|
|
96
|
-
d.preventDefault(), se();
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (V === "delete" || V === "backspace") {
|
|
100
|
-
d.preventDefault(), ee();
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
if (["m", "r", "d", "g", "t"].includes(V)) {
|
|
104
|
-
d.preventDefault(), fe(V);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (["c", "a", "l", "s"].includes(V)) {
|
|
108
|
-
d.preventDefault(), ve(V);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
if (d.key === "ArrowUp" || d.key === "ArrowDown" || d.key === "ArrowLeft" || d.key === "ArrowRight") {
|
|
112
|
-
d.preventDefault(), F();
|
|
113
|
-
const U = d.shiftKey ? 10 : 1;
|
|
114
|
-
d.key === "ArrowUp" && s(0, -U), d.key === "ArrowDown" && s(0, U), d.key === "ArrowLeft" && s(-U, 0), d.key === "ArrowRight" && s(U, 0), te();
|
|
115
|
-
}
|
|
116
|
-
}, $ = (d) => {
|
|
117
|
-
d.key.startsWith("Arrow") && te();
|
|
118
|
-
};
|
|
119
|
-
return window.addEventListener("keydown", ue), window.addEventListener("keyup", $), function() {
|
|
120
|
-
window.removeEventListener("keydown", ue), window.removeEventListener("keyup", $), le();
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
const al = { class: "teleport-tooltip__inner" }, il = {
|
|
124
|
-
__name: "TeleportedTooltip",
|
|
125
|
-
props: {
|
|
126
|
-
show: {
|
|
127
|
-
type: Boolean,
|
|
128
|
-
default: !1
|
|
129
|
-
},
|
|
130
|
-
x: {
|
|
131
|
-
type: Number,
|
|
132
|
-
required: !0
|
|
133
|
-
},
|
|
134
|
-
y: {
|
|
135
|
-
type: Number,
|
|
136
|
-
required: !0
|
|
137
|
-
},
|
|
138
|
-
placement: {
|
|
139
|
-
type: String,
|
|
140
|
-
default: "top"
|
|
141
|
-
},
|
|
142
|
-
styleObject: {
|
|
143
|
-
type: Object,
|
|
144
|
-
default() {
|
|
145
|
-
return {};
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
delay: {
|
|
149
|
-
type: Number,
|
|
150
|
-
default: 0
|
|
151
|
-
},
|
|
152
|
-
delayIn: {
|
|
153
|
-
type: Number,
|
|
154
|
-
default: 300
|
|
155
|
-
},
|
|
156
|
-
delayOut: {
|
|
157
|
-
type: Number,
|
|
158
|
-
default: 0
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
setup(p) {
|
|
162
|
-
const Q = p, pe = de(() => Q.delayIn ?? Q.delay), $e = de(() => Q.delayOut ?? Q.delay), se = i(!1);
|
|
163
|
-
let fe = null, ve = null;
|
|
164
|
-
function s() {
|
|
165
|
-
fe && (clearTimeout(fe), fe = null), ve && (clearTimeout(ve), ve = null);
|
|
166
|
-
}
|
|
167
|
-
function ee() {
|
|
168
|
-
s();
|
|
169
|
-
const F = Math.max(0, pe.value || 0);
|
|
170
|
-
F === 0 ? se.value = !0 : fe = setTimeout(() => {
|
|
171
|
-
se.value = !0, fe = null;
|
|
172
|
-
}, F);
|
|
173
|
-
}
|
|
174
|
-
function h() {
|
|
175
|
-
s();
|
|
176
|
-
const F = Math.max(0, $e.value || 0);
|
|
177
|
-
F === 0 ? se.value = !1 : ve = setTimeout(() => {
|
|
178
|
-
se.value = !1, ve = null;
|
|
179
|
-
}, F);
|
|
180
|
-
}
|
|
181
|
-
ut(
|
|
182
|
-
() => Q.show,
|
|
183
|
-
(F) => {
|
|
184
|
-
F ? ee() : h();
|
|
185
|
-
},
|
|
186
|
-
{ immediate: !0 }
|
|
187
|
-
), kt(() => {
|
|
188
|
-
Q.show && ee();
|
|
189
|
-
}), xt(() => {
|
|
190
|
-
s();
|
|
191
|
-
});
|
|
192
|
-
const q = de(() => ({
|
|
193
|
-
position: "fixed",
|
|
194
|
-
zIndex: 2147483647,
|
|
195
|
-
top: `${Q.y}px`,
|
|
196
|
-
left: `${Q.x}px`,
|
|
197
|
-
transform: Q.placement === "bottom" ? "translate(-50%, 8px)" : "translate(-50%, -100%)",
|
|
198
|
-
pointerEvents: "none",
|
|
199
|
-
...Q.styleObject
|
|
200
|
-
}));
|
|
201
|
-
return (F, te) => (f(), E(qt, { to: "body" }, [
|
|
202
|
-
se.value ? (f(), Y("div", {
|
|
203
|
-
key: 0,
|
|
204
|
-
class: D(["teleport-tooltip", p.placement]),
|
|
205
|
-
style: C(q.value),
|
|
206
|
-
role: "tooltip",
|
|
207
|
-
"aria-hidden": "false"
|
|
208
|
-
}, [
|
|
209
|
-
r("div", al, [
|
|
210
|
-
gt(F.$slots, "default", {}, void 0, !0)
|
|
211
|
-
])
|
|
212
|
-
], 6)) : g("", !0)
|
|
213
|
-
]));
|
|
214
|
-
}
|
|
215
|
-
}, L = /* @__PURE__ */ pt(il, [["__scopeId", "data-v-c292996f"]]), dl = { class: "vue-data-ui-component vue-ui-annotator" }, vl = { "data-dom-to-png-ignore": "" }, cl = ["disabled"], yl = ["disabled"], fl = ["disabled"], bl = ["disabled"], kl = ["disabled"], xl = ["disabled"], gl = ["disabled"], pl = ["disabled"], $l = ["disabled"], wl = {
|
|
216
|
-
class: "tool-selection",
|
|
217
|
-
style: { "margin-top": "6px" }
|
|
218
|
-
}, ml = {
|
|
219
|
-
viewBox: "0 0 12 12",
|
|
220
|
-
style: { width: "100%" }
|
|
221
|
-
}, Tl = ["fill"], Sl = { key: 0 }, Ml = { class: "tool-input" }, Cl = ["checked"], hl = {
|
|
222
|
-
viewBox: "0 0 12 12",
|
|
223
|
-
style: { width: "100%" }
|
|
224
|
-
}, Rl = ["fill"], Bl = { key: 1 }, Al = { class: "tool-input" }, Ol = ["checked"], zl = {
|
|
225
|
-
viewBox: "0 0 24 24",
|
|
226
|
-
style: { width: "100%" }
|
|
227
|
-
}, jl = ["stroke"], Wl = { key: 2 }, Dl = { style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" } }, Fl = { class: "tool-input" }, Il = { key: 3 }, Pl = { style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" } }, El = { class: "tool-input" }, Hl = {
|
|
228
|
-
viewBox: "0 0 24 24",
|
|
229
|
-
height: "24",
|
|
230
|
-
width: "24",
|
|
231
|
-
style: { "margin-bottom": "-5px", "margin-top": "-10px" }
|
|
232
|
-
}, Ll = ["checked"], Yl = { key: 4 }, Xl = { style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" } }, Ul = { class: "tool-input" }, Nl = { key: 5 }, Vl = { key: 6 }, Gl = ["disabled"], Kl = { key: 7 }, ql = ["disabled"], Jl = { key: 8 }, Zl = { key: 9 }, Ql = { key: 10 }, _l = { key: 11 }, eo = {
|
|
233
|
-
style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" },
|
|
234
|
-
class: "tooltip"
|
|
235
|
-
}, to = { style: { display: "flex", "flex-direction": "column", "align-items": "start", "justify-content": "center" } }, lo = {
|
|
236
|
-
class: "tool-input",
|
|
237
|
-
style: { "font-variant-numeric": "tabular-nums" }
|
|
238
|
-
}, oo = ["id"], uo = ["viewBox", "width", "height"], ro = ["width", "height", "pointer-events"], no = ["innerHTML"], so = ["height", "viewBox", "width"], ao = ["cx", "cy"], io = "annotations", vo = {
|
|
239
|
-
__name: "vue-ui-annotator",
|
|
240
|
-
props: {
|
|
241
|
-
config: {
|
|
242
|
-
type: Object,
|
|
243
|
-
default() {
|
|
244
|
-
return {};
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
dataset: {
|
|
248
|
-
type: Object,
|
|
249
|
-
default() {
|
|
250
|
-
return {
|
|
251
|
-
shapes: [],
|
|
252
|
-
lastSelectedShape: void 0
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
emits: ["toggleOpenState", "saveAnnotations"],
|
|
258
|
-
setup(p, { emit: Q }) {
|
|
259
|
-
const pe = p, $e = Q, se = i(he()), { isImaging: fe, generateImage: ve } = ul({
|
|
260
|
-
elementId: se.value,
|
|
261
|
-
fileName: io
|
|
262
|
-
}), s = i(void 0), ee = i(1), h = i({
|
|
263
|
-
start: { x: 0, y: 0 },
|
|
264
|
-
end: { x: 0, y: 0 }
|
|
265
|
-
}), q = i(void 0), F = i(void 0), te = i(!1), le = i(!1), ue = i(!1), $ = i(!1), d = i(!1), V = i(!0), B = i(!1), U = i(!1), we = i(!1), T = i(!1), Ke = i(!1), w = i(!1), m = i(!1), ce = i(!1), M = i(!1), be = i(!1), J = i(!1), a = i(pe.dataset?.lastSelectedShape ?? void 0), O = i({ x: 0, y: 0 }), qe = i(!0), ae = i([]), n = i(pe.dataset?.shapes || []);
|
|
266
|
-
i([]);
|
|
267
|
-
const $t = i(Math.round(Math.random()) * 1e5), Ce = i(1e3), Re = i(1e3), N = i({
|
|
268
|
-
arrow: {
|
|
269
|
-
color: "grey",
|
|
270
|
-
filled: !0
|
|
271
|
-
},
|
|
272
|
-
circle: {
|
|
273
|
-
color: "grey",
|
|
274
|
-
filled: !1,
|
|
275
|
-
radius: 3,
|
|
276
|
-
strokeWidth: 2
|
|
277
|
-
},
|
|
278
|
-
rect: {
|
|
279
|
-
color: "grey",
|
|
280
|
-
filled: !1,
|
|
281
|
-
strokeWidth: 2,
|
|
282
|
-
height: 12,
|
|
283
|
-
width: 12
|
|
284
|
-
}
|
|
285
|
-
}), ie = i("#1A1A1A"), G = i(!1), Fe = i(1), Je = i(void 0), Ie = i(1), Pe = i(1), Z = i("start"), Ee = i(20), Be = i(100), wt = tl, ke = i(null), z = i(!1), j = i(null), c = i({ x: 0, y: 0 }), He = i(null), re = i([]), Le = i(!1), Ye = i(null), Ae = i({ undo: 0, redo: 0 }), xe = i(null);
|
|
286
|
-
i(null), i(null);
|
|
287
|
-
const je = i(null), l = de(() => {
|
|
288
|
-
const e = ll().vue_ui_annotator;
|
|
289
|
-
if (!Object.keys(pe.config || {}).length)
|
|
290
|
-
return e;
|
|
291
|
-
const t = _t({
|
|
292
|
-
defaultConfig: e,
|
|
293
|
-
userConfig: pe.config
|
|
294
|
-
});
|
|
295
|
-
return el(t);
|
|
296
|
-
}), I = de(() => l.value.useCursorPointer), H = de(() => {
|
|
297
|
-
const e = l.value.style.tooltips;
|
|
298
|
-
return {
|
|
299
|
-
backgroundColor: e.backgroundColor,
|
|
300
|
-
color: e.color,
|
|
301
|
-
border: e.border,
|
|
302
|
-
borderRadius: `${e.borderRadius}px`,
|
|
303
|
-
boxShadow: e.boxShadow
|
|
304
|
-
};
|
|
305
|
-
}), mt = de(
|
|
306
|
-
() => n.value.filter((e) => !["line", "group"].includes(e.type)).length > 1
|
|
307
|
-
), me = de(
|
|
308
|
-
() => wt[Be.value > 98 ? 98 : Be.value]
|
|
309
|
-
), Tt = de(() => {
|
|
310
|
-
switch (!0) {
|
|
311
|
-
case $.value:
|
|
312
|
-
return "default";
|
|
313
|
-
case T.value:
|
|
314
|
-
return "move";
|
|
315
|
-
case M.value:
|
|
316
|
-
return "text";
|
|
317
|
-
case w.value:
|
|
318
|
-
return "se-resize";
|
|
319
|
-
default:
|
|
320
|
-
return "";
|
|
321
|
-
}
|
|
322
|
-
}), St = de(() => n.value), ye = i(null);
|
|
323
|
-
function Xe(e) {
|
|
324
|
-
if (e)
|
|
325
|
-
switch (!0) {
|
|
326
|
-
case e.type === "rect":
|
|
327
|
-
return `
|
|
328
|
-
<rect
|
|
329
|
-
id="${e.id}"
|
|
330
|
-
style="stroke-dasharray: 10; display:${F.value && F.value === e.id ? "initial" : "none"}"
|
|
331
|
-
x="${e.x - 20}"
|
|
332
|
-
y="${e.y - 20}"
|
|
333
|
-
height="${e.rectHeight + 40}"
|
|
334
|
-
width="${e.rectWidth + 40}"
|
|
335
|
-
fill="transparent"
|
|
336
|
-
stroke="grey"
|
|
337
|
-
/>
|
|
338
|
-
`;
|
|
339
|
-
case e.type === "circle":
|
|
340
|
-
return `
|
|
341
|
-
<rect
|
|
342
|
-
id="${e.id}"
|
|
343
|
-
style="stroke-dasharray: 10; display:${F.value && F.value === e.id ? "initial" : "none"}"
|
|
344
|
-
x="${e.x - e.circleRadius - 20}"
|
|
345
|
-
y="${e.y - e.circleRadius - 20}"
|
|
346
|
-
height="${e.circleRadius * 2 + 40}"
|
|
347
|
-
width="${e.circleRadius * 2 + 40}"
|
|
348
|
-
fill="transparent"
|
|
349
|
-
stroke="grey"
|
|
350
|
-
/>
|
|
351
|
-
`;
|
|
352
|
-
case e.type === "arrow":
|
|
353
|
-
const t = e.endX - e.x > 0, u = e.endY - e.y > 0;
|
|
354
|
-
return `
|
|
355
|
-
<rect
|
|
356
|
-
id="${e.id}"
|
|
357
|
-
style="stroke-dasharray: 10; display:${F.value && F.value === e.id ? "initial" : "none"}"
|
|
358
|
-
x="${t ? e.x - 20 : e.endX - 20}"
|
|
359
|
-
y="${u ? e.y - 20 : e.endY - 20}"
|
|
360
|
-
height="${u ? e.endY - e.y + 40 : e.y - e.endY + 40}"
|
|
361
|
-
width="${t ? e.endX - e.x + 40 : e.x - e.endX + 40}"
|
|
362
|
-
fill="transparent"
|
|
363
|
-
stroke="grey"
|
|
364
|
-
/>
|
|
365
|
-
`;
|
|
366
|
-
case e.type === "text":
|
|
367
|
-
const o = ye.value ? Array.from(ye.value.getElementsByTagName("text")).find(
|
|
368
|
-
(X) => X.id === e.id
|
|
369
|
-
) : null;
|
|
370
|
-
if (!o)
|
|
371
|
-
return;
|
|
372
|
-
const { x: v, y: x, width: A, height: K } = o.getBBox();
|
|
373
|
-
return `
|
|
374
|
-
<rect
|
|
375
|
-
id="${e.id}"
|
|
376
|
-
style="stroke-dasharray: 10; display:${F.value && F.value === e.id ? "initial" : "none"}"
|
|
377
|
-
x="${v - 20}"
|
|
378
|
-
y="${x - 20}"
|
|
379
|
-
height="${K + 40}"
|
|
380
|
-
width="${A + 40}"
|
|
381
|
-
fill="transparent"
|
|
382
|
-
stroke="grey"
|
|
383
|
-
/>
|
|
384
|
-
`;
|
|
385
|
-
default:
|
|
386
|
-
return "";
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
function Te(e, t = !1) {
|
|
390
|
-
switch (!0) {
|
|
391
|
-
case e.type === "circle":
|
|
392
|
-
return `
|
|
393
|
-
<g id="${e.id}" style="display:${$.value ? "initial" : "none"};">
|
|
394
|
-
<circle id="${e.id}" cx="${e.x}" cy="${e.y}" r="12" fill="red"/>
|
|
395
|
-
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x - 4}" y1="${e.y - 4}" x2="${e.x + 4}" y2="${e.y + 4}"/>
|
|
396
|
-
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + 4}" y1="${e.y - 4}" x2="${e.x - 4}" y2="${e.y + 4}"/>
|
|
397
|
-
</g>
|
|
398
|
-
`;
|
|
399
|
-
case e.type === "text":
|
|
400
|
-
let u, o = [-8, -12, -4, -12, -4];
|
|
401
|
-
switch (!0) {
|
|
402
|
-
case e.textAlign === "start":
|
|
403
|
-
t ? u = [-20, -24, -16, -16, -24] : u = [-16, -20, -12, -12, -20];
|
|
404
|
-
break;
|
|
405
|
-
case e.textAlign === "middle":
|
|
406
|
-
u = [0, -4, 4, 4, -4], o = [-32, -36, -28, -36, -28];
|
|
407
|
-
break;
|
|
408
|
-
case e.textAlign === "end":
|
|
409
|
-
u = [16, 20, 12, 12, 20];
|
|
410
|
-
break;
|
|
411
|
-
default:
|
|
412
|
-
u = [0, 0, 0];
|
|
413
|
-
break;
|
|
414
|
-
}
|
|
415
|
-
return `
|
|
416
|
-
<g id="${e.id}" style="display:${$.value ? "initial" : "none"};">
|
|
417
|
-
<circle id="${e.id}" cx="${e.x + u[0]}" cy="${e.y + o[0]}" r="12" fill="red"/>
|
|
418
|
-
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + u[1]}" y1="${e.y + o[1]}" x2="${e.x + u[2]}" y2="${e.y + o[2]}"/>
|
|
419
|
-
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + u[3]}" y1="${e.y + o[3]}" x2="${e.x + u[4]}" y2="${e.y + o[4]}"/>
|
|
420
|
-
</g>
|
|
421
|
-
`;
|
|
422
|
-
default:
|
|
423
|
-
return `
|
|
424
|
-
<g id="${e.id}" style="display:${$.value ? "initial" : "none"};">
|
|
425
|
-
<circle id="${e.id}" cx="${e.x - 4}" cy="${e.y - 4}" r="12" fill="red"/>
|
|
426
|
-
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x - 8}" y1="${e.y - 8}" x2="${e.x}" y2="${e.y}"/>
|
|
427
|
-
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x}" y1="${e.y - 8}" x2="${e.x - 8}" y2="${e.y}"/>
|
|
428
|
-
</g>
|
|
429
|
-
`;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
function Ze(e) {
|
|
433
|
-
switch (!0) {
|
|
434
|
-
case e.textAlign === "middle":
|
|
435
|
-
return `<path class="vue-ui-annotator-caret" stroke="black" stroke-width="2" d="M${e.x},${e.y - e.fontSize} ${e.x},${e.y - e.fontSize - 15}" /> <path class="vue-ui-annotator-caret" stroke="black" stroke-width="2" d="M${e.x - 3},${e.y - e.fontSize - 5} ${e.x},${e.y - e.fontSize} ${e.x + 3},${e.y - e.fontSize - 5}"/>`;
|
|
436
|
-
case e.textAlign === "start":
|
|
437
|
-
const t = e.isBulletTextMode ? e.fontSize : 0;
|
|
438
|
-
return `<path class="vue-ui-annotator-caret" d="M${e.x - 20 - t},${e.y - e.fontSize / 6} ${e.x - 5 - t},${e.y - e.fontSize / 6}" stroke="black" stroke-width="2" />
|
|
439
|
-
<path class="vue-ui-annotator-caret" d="M${e.x - 10 - t},${e.y - e.fontSize / 3} ${e.x - 5 - t},${e.y - e.fontSize / 6} ${e.x - 10 - t},${e.y}" stroke="black" stroke-width="2">`;
|
|
440
|
-
case e.textAlign === "end":
|
|
441
|
-
return `<path class="vue-ui-annotator-caret" d="M${e.x + 20},${e.y - e.fontSize / 6} ${e.x + 5},${e.y - e.fontSize / 6}" stroke="black" stroke-width="2" />
|
|
442
|
-
<path class="vue-ui-annotator-caret" d="M${e.x + 10},${e.y - e.fontSize / 3} ${e.x + 5},${e.y - e.fontSize / 6} ${e.x + 10},${e.y}" stroke="black" stroke-width="2">`;
|
|
443
|
-
default:
|
|
444
|
-
return "";
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
function rt(e, t, u = !1) {
|
|
448
|
-
switch (!0) {
|
|
449
|
-
case e.textAlign === "start":
|
|
450
|
-
return `
|
|
451
|
-
<g id="${e.id}">
|
|
452
|
-
<rect
|
|
453
|
-
id="${e.id}"
|
|
454
|
-
style="display:${a.value && a.value.id === e.id ? "initial" : "none"};"
|
|
455
|
-
x="${e.x}"
|
|
456
|
-
y="${e.y - 50}"
|
|
457
|
-
height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
|
|
458
|
-
width="100"
|
|
459
|
-
fill="rgba(0,0,0,0)"
|
|
460
|
-
/>
|
|
461
|
-
<text
|
|
462
|
-
style="user-select:none; height:100px;"
|
|
463
|
-
id="${e.id}"
|
|
464
|
-
x="${e.x}"
|
|
465
|
-
y="${e.y}"
|
|
466
|
-
text-anchor="${e.textAlign}"
|
|
467
|
-
font-size="${e.fontSize}"
|
|
468
|
-
fill="${e.color}"
|
|
469
|
-
font-weight="${e.isBold ? "bold" : "normal"}"
|
|
470
|
-
font-style="${e.isItalic ? "italic" : "normal"}"
|
|
471
|
-
text-decoration="${e.isUnderline ? "underline" : "none"}"
|
|
472
|
-
>
|
|
473
|
-
${t.join("")}
|
|
474
|
-
</text>
|
|
475
|
-
${G.value && a.value && a.value.id === e.id ? Ze(e) : ""}
|
|
476
|
-
${Te(e, u)}
|
|
477
|
-
</g>
|
|
478
|
-
`;
|
|
479
|
-
case e.textAlign === "middle":
|
|
480
|
-
return `
|
|
481
|
-
<g id="${e.id}">
|
|
482
|
-
<rect
|
|
483
|
-
id="${e.id}"
|
|
484
|
-
style="display:${a.value && a.value.id === e.id ? "initial" : "none"};"
|
|
485
|
-
x="${e.x - 50}"
|
|
486
|
-
y="${e.y - 50}"
|
|
487
|
-
height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
|
|
488
|
-
width="100"
|
|
489
|
-
fill="rgba(0,0,0,0)"
|
|
490
|
-
/>
|
|
491
|
-
<text
|
|
492
|
-
style="user-select:none; height:100px;"
|
|
493
|
-
id="${e.id}"
|
|
494
|
-
x="${e.x}"
|
|
495
|
-
y="${e.y}"
|
|
496
|
-
text-anchor="${e.textAlign}"
|
|
497
|
-
font-size="${e.fontSize}"
|
|
498
|
-
fill="${e.color}"
|
|
499
|
-
font-weight="${e.isBold ? "bold" : "normal"}"
|
|
500
|
-
font-style="${e.isItalic ? "italic" : "normal"}"
|
|
501
|
-
text-decoration="${e.isUnderline ? "underline" : "none"}"
|
|
502
|
-
>
|
|
503
|
-
${t.join("")}
|
|
504
|
-
</text>
|
|
505
|
-
${G.value && a.value && a.value.id === e.id ? Ze(e) : ""}
|
|
506
|
-
${Te(e)}
|
|
507
|
-
</g>
|
|
508
|
-
`;
|
|
509
|
-
case e.textAlign === "end":
|
|
510
|
-
return `
|
|
511
|
-
<g id="${e.id}">
|
|
512
|
-
<rect
|
|
513
|
-
id="${e.id}"
|
|
514
|
-
style="display:${a.value && a.value.id === e.id ? "initial" : "none"};"
|
|
515
|
-
x="${e.x - 100}"
|
|
516
|
-
y="${e.y - 50}"
|
|
517
|
-
height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
|
|
518
|
-
width="100"
|
|
519
|
-
fill="rgba(0,0,0,0)"
|
|
520
|
-
/>
|
|
521
|
-
<text
|
|
522
|
-
style="user-select:none; height:100px;"
|
|
523
|
-
id="${e.id}"
|
|
524
|
-
x="${e.x}"
|
|
525
|
-
y="${e.y}"
|
|
526
|
-
text-anchor="${e.textAlign}"
|
|
527
|
-
font-size="${e.fontSize}"
|
|
528
|
-
fill="${e.color}"
|
|
529
|
-
font-weight="${e.isBold ? "bold" : "normal"}"
|
|
530
|
-
font-style="${e.isItalic ? "italic" : "normal"}"
|
|
531
|
-
text-decoration="${e.isUnderline ? "underline" : "none"}"
|
|
532
|
-
>
|
|
533
|
-
${t.join("")}
|
|
534
|
-
</text>
|
|
535
|
-
${G.value && a.value && a.value.id === e.id ? Ze(e) : ""}
|
|
536
|
-
${Te(e)}
|
|
537
|
-
</g>
|
|
538
|
-
`;
|
|
539
|
-
default:
|
|
540
|
-
return "";
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
const Mt = de(() => St.value.map((e) => {
|
|
544
|
-
switch (!0) {
|
|
545
|
-
case (e && e.type === "arrow"):
|
|
546
|
-
const t = e.strokeWidth > 3 ? 5 : 10, u = e.strokeWidth > 3 ? 2.5 : 5;
|
|
547
|
-
return {
|
|
548
|
-
html: `
|
|
549
|
-
<defs>
|
|
550
|
-
<marker
|
|
551
|
-
id="${e.id}"
|
|
552
|
-
markerWidth="${t}"
|
|
553
|
-
markerHeight="${t}"
|
|
554
|
-
refX="0"
|
|
555
|
-
refY="${u}"
|
|
556
|
-
orient="auto"
|
|
557
|
-
>
|
|
558
|
-
<polygon
|
|
559
|
-
points="0 0,${t} ${u}, 0 ${t}"
|
|
560
|
-
fill="${e.color}"
|
|
561
|
-
/>
|
|
562
|
-
</marker>
|
|
563
|
-
</defs>
|
|
564
|
-
${Xe(e)}
|
|
565
|
-
<g id="${e.id}">
|
|
566
|
-
<path
|
|
567
|
-
style="stroke-linecap: round !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
|
|
568
|
-
stroke="${e.color}"
|
|
569
|
-
id="${e.id}"
|
|
570
|
-
d="M${e.x},${e.y} ${e.endX},${e.endY}"
|
|
571
|
-
stroke-width="${e.strokeWidth}"
|
|
572
|
-
marker-end="url(#${e.id})"
|
|
573
|
-
/>
|
|
574
|
-
</g>
|
|
575
|
-
<g id="${e.id}">
|
|
576
|
-
<rect
|
|
577
|
-
id="${e.id}"
|
|
578
|
-
x="${e.x - 10}"
|
|
579
|
-
y="${e.y - 10}"
|
|
580
|
-
height="20"
|
|
581
|
-
width="20"
|
|
582
|
-
fill="rgba(0,0,0,0.3)"
|
|
583
|
-
style="display:${w.value || T.value ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
|
|
584
|
-
/>
|
|
585
|
-
</g>
|
|
586
|
-
${Te(e)}
|
|
587
|
-
</g>
|
|
588
|
-
`,
|
|
589
|
-
id: e.id
|
|
590
|
-
};
|
|
591
|
-
case (e && e.type === "circle"):
|
|
592
|
-
return {
|
|
593
|
-
html: `
|
|
594
|
-
<g id="${e.id}">
|
|
595
|
-
${Xe(e)}
|
|
596
|
-
<circle
|
|
597
|
-
id="${e.id}"
|
|
598
|
-
cx="${e.x}"
|
|
599
|
-
cy="${e.y}"
|
|
600
|
-
r="${e.circleRadius ? e.circleRadius : Number.MIN_VALUE}"
|
|
601
|
-
fill="${e.isFilled ? e.color + e.alpha : "rgba(255,255,255,0.001)"}"
|
|
602
|
-
stroke="${e.color + e.alpha}"
|
|
603
|
-
stroke-width="${e.strokeWidth}"
|
|
604
|
-
style="${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
|
|
605
|
-
>
|
|
606
|
-
</circle>
|
|
607
|
-
</g>
|
|
608
|
-
|
|
609
|
-
${Te(e)}`,
|
|
610
|
-
id: e.id
|
|
611
|
-
};
|
|
612
|
-
case (e && e.type === "group"):
|
|
613
|
-
return {
|
|
614
|
-
html: `<g id="${e.id}">
|
|
615
|
-
<rect
|
|
616
|
-
id="${w.value ? "" : e.id}"
|
|
617
|
-
x="${e.x}"
|
|
618
|
-
y="${e.y}"
|
|
619
|
-
fill="transparent"
|
|
620
|
-
height="${e.rectHeight}"
|
|
621
|
-
width="${e.rectWidth}"
|
|
622
|
-
stroke="grey"
|
|
623
|
-
stroke-width="1"
|
|
624
|
-
style="rx:1 !important; ry:1 !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}; display:${m.value || $.value || F.value && F.value === e.id ? "initial" : "none"};"
|
|
625
|
-
/>
|
|
626
|
-
<g id="${e.id}">
|
|
627
|
-
${e.content ? e.content : ""}
|
|
628
|
-
</g>
|
|
629
|
-
${Te(e)}
|
|
630
|
-
</g> `,
|
|
631
|
-
id: e.id
|
|
632
|
-
};
|
|
633
|
-
case (e && e.type === "rect"):
|
|
634
|
-
return {
|
|
635
|
-
html: `<g id="${e.id}">
|
|
636
|
-
${Xe(e)}
|
|
637
|
-
<rect
|
|
638
|
-
id="${w.value ? "" : e.id}"
|
|
639
|
-
x="${e.x}"
|
|
640
|
-
y="${e.y}"
|
|
641
|
-
fill="${e.isFilled ? e.color + e.alpha : "rgba(255,255,255,0.001)"}"
|
|
642
|
-
height="${e.rectHeight}"
|
|
643
|
-
width="${e.rectWidth}"
|
|
644
|
-
stroke="${e.color + e.alpha}"
|
|
645
|
-
stroke-width="${e.strokeWidth}"
|
|
646
|
-
style="rx:1 !important; ry:1 !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
|
|
647
|
-
/>
|
|
648
|
-
<rect id="${e.id}"
|
|
649
|
-
x="${e.x + e.rectWidth}"
|
|
650
|
-
y="${e.y + e.rectHeight}"
|
|
651
|
-
height="20"
|
|
652
|
-
width="20"
|
|
653
|
-
fill="rgba(0,0,0,0.3)"
|
|
654
|
-
style="display:${w.value ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
|
|
655
|
-
/>
|
|
656
|
-
${Te(e)}
|
|
657
|
-
</g> `,
|
|
658
|
-
id: e.id
|
|
659
|
-
};
|
|
660
|
-
case (e && e.type === "line"):
|
|
661
|
-
return {
|
|
662
|
-
html: `
|
|
663
|
-
<g id="${e.id}">
|
|
664
|
-
<path
|
|
665
|
-
id="${e.id}"
|
|
666
|
-
d="M${e.path ? e.path : ""}"
|
|
667
|
-
style="stroke:${e.color + e.alpha} !important; fill:none; stroke-width:${e.strokeWidth} !important; stroke-linecap: round !important; stroke-linejoin: round !important;"
|
|
668
|
-
/>
|
|
669
|
-
${Te(e)}
|
|
670
|
-
</g>
|
|
671
|
-
`,
|
|
672
|
-
id: e.id
|
|
673
|
-
};
|
|
674
|
-
case (e && e.type === "text"):
|
|
675
|
-
const o = e.textContent.split(""), v = [];
|
|
676
|
-
for (let x = 0; x < o.length; x += 1)
|
|
677
|
-
v.push(`
|
|
678
|
-
${e.isBulletTextMode ? `<tspan x="${e.x - e.fontSize}" y="${e.y + e.fontSize * x}" id="${e.id}" font-size="${e.fontSize / 2}">⬤</tspan>` : ""}
|
|
679
|
-
<tspan id="${e.id}" x="${e.x}" y="${e.y + e.fontSize * x}">
|
|
680
|
-
${o[x]}
|
|
681
|
-
</tspan>`);
|
|
682
|
-
return {
|
|
683
|
-
html: `
|
|
684
|
-
${Xe(e)}
|
|
685
|
-
${rt(e, v, e.isBulletTextMode)}
|
|
686
|
-
`,
|
|
687
|
-
id: e.id
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
}));
|
|
691
|
-
function b(e) {
|
|
692
|
-
if (e == null) return e;
|
|
693
|
-
try {
|
|
694
|
-
return typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e));
|
|
695
|
-
} catch {
|
|
696
|
-
return Array.isArray(e) ? e.map((t) => b(t)) : typeof e == "object" ? Object.fromEntries(
|
|
697
|
-
Object.entries(e).map(([t, u]) => [t, b(u)])
|
|
698
|
-
) : e;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
function nt(e = !1) {
|
|
702
|
-
if (!s.value || !d.value)
|
|
703
|
-
return;
|
|
704
|
-
h.value.end = {
|
|
705
|
-
x: O.value.x,
|
|
706
|
-
y: O.value.y
|
|
707
|
-
};
|
|
708
|
-
let t;
|
|
709
|
-
n.value.length > 0 && q.value && (t = [...n.value].find(
|
|
710
|
-
(K) => K.id === q.value.id
|
|
711
|
-
));
|
|
712
|
-
let u, o, v;
|
|
713
|
-
t && (u = t.x - h.value.end.x, o = t.y - h.value.end.y, v = Math.sqrt(u * u + o * o));
|
|
714
|
-
let x, A;
|
|
715
|
-
switch (e ? (x = Math.max(h.value.end.x, t.x), A = Math.min(h.value.end.x, t.x), Math.max(h.value.end.y, t.y), Math.min(h.value.end.y, t.y)) : (x = Math.max(
|
|
716
|
-
h.value.end.x,
|
|
717
|
-
h.value.start.x
|
|
718
|
-
), A = Math.min(
|
|
719
|
-
h.value.end.x,
|
|
720
|
-
h.value.start.x
|
|
721
|
-
), Math.max(
|
|
722
|
-
h.value.end.y,
|
|
723
|
-
h.value.start.y
|
|
724
|
-
), Math.min(
|
|
725
|
-
h.value.end.y,
|
|
726
|
-
h.value.start.y
|
|
727
|
-
)), !0) {
|
|
728
|
-
case s.value === "arrow":
|
|
729
|
-
n.value.at(-1).endX = h.value.end.x, n.value.at(-1).endY = h.value.end.y;
|
|
730
|
-
break;
|
|
731
|
-
case s.value === "circle":
|
|
732
|
-
const K = 20;
|
|
733
|
-
n.value.at(-1).circleRadius = V.value ? b(x - A) + K : v + K;
|
|
734
|
-
break;
|
|
735
|
-
case s.value === "line":
|
|
736
|
-
n.value.at(-1).path += ` ${O.value.x} ${O.value.y} `;
|
|
737
|
-
break;
|
|
738
|
-
case ["rect", "group"].includes(s.value):
|
|
739
|
-
const X = 20;
|
|
740
|
-
n.value.at(-1).rectWidth = b(h.value.end.x - n.value.at(-1).x) > 0 ? b(h.value.end.x - n.value.at(-1).x) : X, n.value.at(-1).rectHeight = b(h.value.end.y - n.value.at(-1).y) > 0 ? b(h.value.end.y - n.value.at(-1).y) : X;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
function st() {
|
|
744
|
-
if (!d.value) {
|
|
745
|
-
xe.value = null;
|
|
746
|
-
return;
|
|
747
|
-
}
|
|
748
|
-
nt(), xe.value = requestAnimationFrame(st);
|
|
749
|
-
}
|
|
750
|
-
function Ct(e) {
|
|
751
|
-
const t = n.value.findIndex((u) => u.id === e);
|
|
752
|
-
if (t > -1 && t !== n.value.length - 1) {
|
|
753
|
-
const [u] = n.value.splice(t, 1);
|
|
754
|
-
n.value.push(u);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
function ht(e) {
|
|
758
|
-
const t = (x) => !!x && n.value.some((A) => A.id === x);
|
|
759
|
-
if (t(e?.target?.id)) return e.target.id;
|
|
760
|
-
const u = ye.value?.querySelector(".annotator__glass");
|
|
761
|
-
if (!u) return null;
|
|
762
|
-
const o = u.style.pointerEvents;
|
|
763
|
-
u.style.pointerEvents = "none";
|
|
764
|
-
const v = document.elementFromPoint(e.clientX, e.clientY);
|
|
765
|
-
return u.style.pointerEvents = o || "all", t(v?.id) ? v.id : null;
|
|
766
|
-
}
|
|
767
|
-
function Rt(e = {}) {
|
|
768
|
-
const { maxEntries: t = 200, maxBytes: u = 2e6 } = e, o = { open: !1, before: null, undo: [], redo: [] }, v = { undo: 0, redo: 0 }, x = (P) => typeof P == "string" ? P.length * 2 : 0, A = () => JSON.stringify({
|
|
769
|
-
shapes: b(n.value),
|
|
770
|
-
lastSelectedShape: b(a.value)
|
|
771
|
-
}), K = (P) => {
|
|
772
|
-
const ne = JSON.parse(P);
|
|
773
|
-
n.value = ne.shapes, a.value = ne.lastSelectedShape;
|
|
774
|
-
}, X = () => {
|
|
775
|
-
Ae.value.undo = o.undo.length, Ae.value.redo = o.redo.length;
|
|
776
|
-
}, ge = (P, ne) => {
|
|
777
|
-
const Me = o[P];
|
|
778
|
-
for (Me.push(ne), v[P] += x(ne); Me.length > t || v[P] > u; ) {
|
|
779
|
-
const Kt = Me.shift();
|
|
780
|
-
v[P] -= x(Kt);
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
return {
|
|
784
|
-
begin() {
|
|
785
|
-
o.open || (o.open = !0, o.before = A());
|
|
786
|
-
},
|
|
787
|
-
end() {
|
|
788
|
-
if (!o.open) return;
|
|
789
|
-
o.open = !1, A() !== o.before && (ge("undo", o.before), o.redo.length = 0, v.redo = 0), o.before = null, X();
|
|
790
|
-
},
|
|
791
|
-
undo() {
|
|
792
|
-
const P = o.undo.pop();
|
|
793
|
-
if (!P) return;
|
|
794
|
-
v.undo -= x(P);
|
|
795
|
-
const ne = A();
|
|
796
|
-
ge("redo", ne), K(P), X();
|
|
797
|
-
},
|
|
798
|
-
redo() {
|
|
799
|
-
const P = o.redo.pop();
|
|
800
|
-
if (!P) return;
|
|
801
|
-
v.redo -= x(P);
|
|
802
|
-
const ne = A();
|
|
803
|
-
ge("undo", ne), K(P), X();
|
|
804
|
-
},
|
|
805
|
-
size() {
|
|
806
|
-
return {
|
|
807
|
-
undo: o.undo.length,
|
|
808
|
-
redo: o.redo.length,
|
|
809
|
-
approxBytes: { undo: v.undo, redo: v.redo }
|
|
810
|
-
};
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
function We() {
|
|
815
|
-
if (!He.value) return;
|
|
816
|
-
const e = He.value.getBoundingClientRect();
|
|
817
|
-
c.value = { x: e.left + e.width / 2, y: e.top };
|
|
818
|
-
}
|
|
819
|
-
function k(e, t, u = "top") {
|
|
820
|
-
j.value = e, He.value = t.currentTarget || t.target, We(), z.value = !0, window.addEventListener("scroll", We, !0), window.addEventListener("resize", We, { passive: !0 });
|
|
821
|
-
}
|
|
822
|
-
function y() {
|
|
823
|
-
z.value = !1, j.value = null, He.value = null, window.removeEventListener("scroll", We, !0), window.removeEventListener("resize", We);
|
|
824
|
-
}
|
|
825
|
-
function at(e) {
|
|
826
|
-
const t = e?.target && e.target.id || q.value && q.value.id, u = n.value.find((x) => x.id === t);
|
|
827
|
-
if (!u) {
|
|
828
|
-
ke.value = null;
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
a.value = u;
|
|
832
|
-
const o = O.value.x, v = O.value.y;
|
|
833
|
-
switch (u.type) {
|
|
834
|
-
case "rect":
|
|
835
|
-
case "circle":
|
|
836
|
-
case "text":
|
|
837
|
-
ke.value = { dx: o - u.x, dy: v - u.y };
|
|
838
|
-
break;
|
|
839
|
-
case "arrow":
|
|
840
|
-
ke.value = {
|
|
841
|
-
dx: o - u.x,
|
|
842
|
-
dy: v - u.y,
|
|
843
|
-
endDx: o - u.endX,
|
|
844
|
-
endDy: v - u.endY
|
|
845
|
-
};
|
|
846
|
-
break;
|
|
847
|
-
case "group":
|
|
848
|
-
ke.value = {
|
|
849
|
-
dx: o - (u.x || 0),
|
|
850
|
-
dy: v - (u.y || 0)
|
|
851
|
-
};
|
|
852
|
-
break;
|
|
853
|
-
default:
|
|
854
|
-
ke.value = { dx: 0, dy: 0 };
|
|
855
|
-
break;
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
function it(e) {
|
|
859
|
-
const t = n.value.find(
|
|
860
|
-
(u) => u.id === a.value.id
|
|
861
|
-
);
|
|
862
|
-
switch (!0) {
|
|
863
|
-
case e === "front":
|
|
864
|
-
n.value = n.value.filter(
|
|
865
|
-
(u) => u.id !== t.id
|
|
866
|
-
), n.value.push(t);
|
|
867
|
-
break;
|
|
868
|
-
case e === "back":
|
|
869
|
-
n.value = n.value.filter(
|
|
870
|
-
(u) => u.id !== t.id
|
|
871
|
-
), n.value = [t, ...n.value];
|
|
872
|
-
break;
|
|
873
|
-
default:
|
|
874
|
-
return;
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
function Bt() {
|
|
878
|
-
if (!a.value?.id) return;
|
|
879
|
-
const e = {
|
|
880
|
-
...a.value,
|
|
881
|
-
id: `${a.value.id}_copy_${he()}`,
|
|
882
|
-
x: a.value.x - 100 < 0 ? 1 : a.value.x - 100,
|
|
883
|
-
y: a.value.y - 100 < 0 ? 1 : a.value.y - 100
|
|
884
|
-
};
|
|
885
|
-
n.value.push(e);
|
|
886
|
-
}
|
|
887
|
-
function At(e) {
|
|
888
|
-
e.preventDefault(), qe.value = !1, e.target && e.target.id && (F.value = e.target.id);
|
|
889
|
-
}
|
|
890
|
-
function Se() {
|
|
891
|
-
!a.value || !a.value.id.includes("text") || a.value.textContent === "" && (n.value = n.value.filter(
|
|
892
|
-
(e) => e.id !== a.value.id
|
|
893
|
-
), a.value = n.value.at(-1));
|
|
894
|
-
}
|
|
895
|
-
function dt(e) {
|
|
896
|
-
if ($.value)
|
|
897
|
-
return;
|
|
898
|
-
e.preventDefault(), e.stopPropagation(), Se(), M.value ? (J.value = !0, G.value = !0) : (J.value = !1, G.value = !1, M.value = !1);
|
|
899
|
-
let t = `text_${he()}`;
|
|
900
|
-
if (J.value) {
|
|
901
|
-
re.value?.begin(), n.value.push({
|
|
902
|
-
id: t,
|
|
903
|
-
type: "text",
|
|
904
|
-
lines: 0,
|
|
905
|
-
x: O.value.x,
|
|
906
|
-
y: O.value.y,
|
|
907
|
-
textContent: "",
|
|
908
|
-
fontSize: b(Ee.value),
|
|
909
|
-
textAlign: b(Z.value),
|
|
910
|
-
isBold: b(te.value),
|
|
911
|
-
isItalic: b(U.value),
|
|
912
|
-
isUnderline: b(be.value),
|
|
913
|
-
color: b(ie.value),
|
|
914
|
-
isBulletTextMode: b(le.value)
|
|
915
|
-
}), q.value = n.value.at(-1), a.value = n.value.at(-1), re.value?.end();
|
|
916
|
-
return;
|
|
917
|
-
}
|
|
918
|
-
const u = () => {
|
|
919
|
-
ue.value = n.value.find(
|
|
920
|
-
(v) => v.id === e.target.id
|
|
921
|
-
).isDash;
|
|
922
|
-
}, o = () => {
|
|
923
|
-
ee.value = n.value.find(
|
|
924
|
-
(v) => v.id === e.target.id
|
|
925
|
-
).strokeWidth;
|
|
926
|
-
};
|
|
927
|
-
if (m.value = !1, e.target.id.includes("arrow")) {
|
|
928
|
-
s.value = "arrow", u(), o();
|
|
929
|
-
return;
|
|
930
|
-
}
|
|
931
|
-
if (e.target.id.includes("circle")) {
|
|
932
|
-
s.value = "circle", N.value.circle.filled = n.value.find(
|
|
933
|
-
(v) => v.id === e.target.id
|
|
934
|
-
).isFilled, u(), o();
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
937
|
-
if (e.target.id.includes("rect")) {
|
|
938
|
-
s.value = "rect", N.value.rect.filled = n.value.find(
|
|
939
|
-
(v) => v.id === e.target.id
|
|
940
|
-
).isFilled, u(), o();
|
|
941
|
-
return;
|
|
942
|
-
}
|
|
943
|
-
if (e.target.id.includes("line")) {
|
|
944
|
-
s.value = "line", o();
|
|
945
|
-
return;
|
|
946
|
-
}
|
|
947
|
-
if (e.target.id.includes("text")) {
|
|
948
|
-
M.value = !0, J.value = !0, G.value = !0;
|
|
949
|
-
const v = n.value.find(
|
|
950
|
-
(x) => x.id === e.target.id
|
|
951
|
-
);
|
|
952
|
-
v && v.textAlign && (Z.value = n.value.find(
|
|
953
|
-
(x) => x.id === e.target.id
|
|
954
|
-
).textAlign), v && (le.value = n.value.find(
|
|
955
|
-
(x) => x.id === e.target.id
|
|
956
|
-
).isBulletTextMode);
|
|
957
|
-
return;
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
function Ue(e) {
|
|
961
|
-
!a.value || a.value.type !== "text" || (a.value.textAlign = e);
|
|
962
|
-
}
|
|
963
|
-
function vt() {
|
|
964
|
-
re.value?.undo?.();
|
|
965
|
-
}
|
|
966
|
-
function ct() {
|
|
967
|
-
re.value?.redo?.();
|
|
968
|
-
}
|
|
969
|
-
const Ot = [
|
|
970
|
-
16,
|
|
971
|
-
17,
|
|
972
|
-
18,
|
|
973
|
-
20,
|
|
974
|
-
27,
|
|
975
|
-
33,
|
|
976
|
-
34,
|
|
977
|
-
35,
|
|
978
|
-
36,
|
|
979
|
-
37,
|
|
980
|
-
38,
|
|
981
|
-
39,
|
|
982
|
-
40,
|
|
983
|
-
45,
|
|
984
|
-
91,
|
|
985
|
-
112,
|
|
986
|
-
113,
|
|
987
|
-
114,
|
|
988
|
-
115,
|
|
989
|
-
116,
|
|
990
|
-
117,
|
|
991
|
-
118,
|
|
992
|
-
119,
|
|
993
|
-
120,
|
|
994
|
-
121,
|
|
995
|
-
122,
|
|
996
|
-
123,
|
|
997
|
-
221,
|
|
998
|
-
255,
|
|
999
|
-
"Unidentified"
|
|
1000
|
-
];
|
|
1001
|
-
function yt(e) {
|
|
1002
|
-
if (qe.value)
|
|
1003
|
-
return;
|
|
1004
|
-
e.preventDefault();
|
|
1005
|
-
const t = e.keyCode;
|
|
1006
|
-
if (!J.value)
|
|
1007
|
-
return;
|
|
1008
|
-
G.value = !0;
|
|
1009
|
-
let u;
|
|
1010
|
-
if (a.value.type === "text" ? u = n.value.find(
|
|
1011
|
-
(o) => o.id === a.value.id
|
|
1012
|
-
) : u = n.value.at(-1), q.value = u, u.type === "text")
|
|
1013
|
-
switch (q.value.isBold = b(te.value), q.value.isItalic = b(U.value), q.value.isUnderline = b(be.value), !0) {
|
|
1014
|
-
case [8, 46].includes(t):
|
|
1015
|
-
u.textContent = u.textContent.slice(0, -1);
|
|
1016
|
-
break;
|
|
1017
|
-
case t === 9:
|
|
1018
|
-
u.textContent += " ";
|
|
1019
|
-
break;
|
|
1020
|
-
case t === 13:
|
|
1021
|
-
u.lines += 1, u.textContent += "";
|
|
1022
|
-
return;
|
|
1023
|
-
case Ot.includes(t):
|
|
1024
|
-
return;
|
|
1025
|
-
default:
|
|
1026
|
-
u.textContent += e.key;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
function zt() {
|
|
1030
|
-
if (ae.value = [], s.value !== "group") {
|
|
1031
|
-
m.value = !1, n.value = n.value.filter((t) => t.type !== "group");
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
const e = n.value.at(-1);
|
|
1035
|
-
if (n.value.forEach((t) => {
|
|
1036
|
-
if (t.type !== "group")
|
|
1037
|
-
switch (!0) {
|
|
1038
|
-
case t.type === "arrow":
|
|
1039
|
-
const u = t.x <= t.endX && t.y <= t.endY && e.x <= t.x && e.y <= t.y && e.x + e.rectWidth >= t.endX && e.y + e.rectHeight >= t.endY, o = t.endY < t.y && t.x < t.endX && e.x <= t.x && e.y <= t.y && e.x + e.rectWidth >= t.endX && e.y + e.rectHeight >= t.y, v = t.x > t.endX && t.y < t.endY && e.x <= t.endX && e.y <= t.endY && e.x + e.rectWidth >= t.x && e.y + e.rectHeight >= t.endY, x = t.x > t.endX && t.y > t.endY && e.x <= t.endX && e.y <= t.endY && e.x + e.rectWidth >= t.x && e.y + e.rectHeight >= t.y;
|
|
1040
|
-
(u || o || v || x) && ae.value.push(t);
|
|
1041
|
-
break;
|
|
1042
|
-
case t.type === "circle":
|
|
1043
|
-
e.x <= t.x + t.circleRadius && e.y <= t.y + t.circleRadius && t.x + t.circleRadius <= e.x + e.rectWidth && t.y + t.circleRadius <= e.y + e.rectHeight && ae.value.push(t);
|
|
1044
|
-
break;
|
|
1045
|
-
case t.type === "rect":
|
|
1046
|
-
e.x <= t.x && e.y <= t.y && t.x <= e.x + e.rectWidth && t.y <= e.y + e.rectHeight && t.x + t.rectWidth <= e.x + e.rectWidth && t.y + t.rectHeight <= e.y + e.rectHeight && t.rectWidth <= e.rectWidth && t.rectHeight <= e.rectHeight && ae.value.push(t);
|
|
1047
|
-
break;
|
|
1048
|
-
case t.type === "text":
|
|
1049
|
-
e.x <= t.x && e.y <= t.y && ae.value.push(t);
|
|
1050
|
-
break;
|
|
1051
|
-
}
|
|
1052
|
-
}), ae.value = ae.value.map((t) => ({
|
|
1053
|
-
...t,
|
|
1054
|
-
id: e.id,
|
|
1055
|
-
oldId: t.id,
|
|
1056
|
-
diffX: t.x - e.x,
|
|
1057
|
-
diffY: t.y - e.y,
|
|
1058
|
-
diffEndX: t.endX ? t.endX - e.x : 0,
|
|
1059
|
-
diffEndY: t.endY ? t.endY - e.y : 0
|
|
1060
|
-
})), e.source = ae.value, ae.value.length > 1) {
|
|
1061
|
-
const t = b(ae.value).map((u) => u.oldId);
|
|
1062
|
-
n.value = n.value.filter(
|
|
1063
|
-
(u) => !t.includes(u.id)
|
|
1064
|
-
), ae.value.forEach((u) => {
|
|
1065
|
-
switch (!0) {
|
|
1066
|
-
case u.type === "circle":
|
|
1067
|
-
e.content += `
|
|
1068
|
-
<circle
|
|
1069
|
-
id="${u.id}"
|
|
1070
|
-
cx="${u.x}"
|
|
1071
|
-
cy="${u.y}"
|
|
1072
|
-
r="${u.circleRadius ? u.circleRadius : Number.MIN_VALUE}"
|
|
1073
|
-
fill="${u.isFilled ? u.color + u.alpha : "rgba(255,255,255,0.001)"}"
|
|
1074
|
-
stroke="${u.color + u.alpha}"
|
|
1075
|
-
stroke-width="${u.strokeWidth}"
|
|
1076
|
-
style="${u.isDash ? `stroke-dasharray: ${u.strokeWidth * 3}` : ""}"
|
|
1077
|
-
/>
|
|
1078
|
-
`;
|
|
1079
|
-
break;
|
|
1080
|
-
case u.type === "rect":
|
|
1081
|
-
e.content += `
|
|
1082
|
-
<rect
|
|
1083
|
-
id="${w.value ? "" : u.id}"
|
|
1084
|
-
x="${u.x}"
|
|
1085
|
-
y="${u.y}"
|
|
1086
|
-
fill="${u.isFilled ? u.color + u.alpha : "rgba(255,255,255,0.001)"}"
|
|
1087
|
-
height="${u.rectHeight}"
|
|
1088
|
-
width="${u.rectWidth}"
|
|
1089
|
-
stroke="${u.color + u.alpha}"
|
|
1090
|
-
stroke-width="${u.strokeWidth}"
|
|
1091
|
-
style="rx:1 !important; ry:1 !important; ${u.isDash ? `stroke-dasharray: ${u.strokeWidth * 3}` : ""}"
|
|
1092
|
-
/>
|
|
1093
|
-
`;
|
|
1094
|
-
break;
|
|
1095
|
-
case u.type === "arrow":
|
|
1096
|
-
const o = u.strokeWidth > 3 ? 5 : 10, v = u.strokeWidth > 3 ? 2.5 : 5, x = he();
|
|
1097
|
-
e.content += `
|
|
1098
|
-
<g id="${u.id}">
|
|
1099
|
-
<defs>
|
|
1100
|
-
<marker
|
|
1101
|
-
id="${x}"
|
|
1102
|
-
markerWidth="${o}"
|
|
1103
|
-
markerHeight="${o}"
|
|
1104
|
-
refX="0"
|
|
1105
|
-
refY="${v}"
|
|
1106
|
-
orient="auto"
|
|
1107
|
-
>
|
|
1108
|
-
<polygon
|
|
1109
|
-
points="0 0,${o} ${v}, 0 ${o}"
|
|
1110
|
-
fill="${u.color}"
|
|
1111
|
-
/>
|
|
1112
|
-
</marker>
|
|
1113
|
-
</defs>
|
|
1114
|
-
|
|
1115
|
-
<path
|
|
1116
|
-
style="stroke-linecap: round !important; ${u.isDash ? `stroke-dasharray: ${u.strokeWidth * 3}` : ""}"
|
|
1117
|
-
stroke="${u.color}"
|
|
1118
|
-
id="${u.id}"
|
|
1119
|
-
d="M${u.x},${u.y} ${u.endX},${u.endY}"
|
|
1120
|
-
stroke-width="${u.strokeWidth}"
|
|
1121
|
-
marker-end="url(#${x})"
|
|
1122
|
-
/>
|
|
1123
|
-
</g>
|
|
1124
|
-
`;
|
|
1125
|
-
break;
|
|
1126
|
-
case u.type === "text":
|
|
1127
|
-
const A = u.textContent.split(""), K = [];
|
|
1128
|
-
for (let X = 0; X < A.length; X += 1)
|
|
1129
|
-
K.push(`
|
|
1130
|
-
${u.isBulletTextMode ? `<tspan x="${u.x - u.fontSize}" y="${u.y + u.fontSize * X}" id="${u.id}" font-size="${u.fontSize / 2}">⬤</tspan>` : ""}
|
|
1131
|
-
<tspan id="${u.id}" x="${u.x}" y="${u.y + u.fontSize * X}">
|
|
1132
|
-
${A[X]}
|
|
1133
|
-
</tspan>`);
|
|
1134
|
-
e.content += `
|
|
1135
|
-
${rt(u, K, u.isBulletTextMode)}
|
|
1136
|
-
`;
|
|
1137
|
-
break;
|
|
1138
|
-
}
|
|
1139
|
-
});
|
|
1140
|
-
} else
|
|
1141
|
-
n.value = n.value.filter((t) => t.id !== e.id);
|
|
1142
|
-
}
|
|
1143
|
-
function jt(e) {
|
|
1144
|
-
e.content = "";
|
|
1145
|
-
const t = e.x || 0, u = e.y || 0;
|
|
1146
|
-
(e.source || []).forEach((o) => {
|
|
1147
|
-
switch (o.type) {
|
|
1148
|
-
case "circle": {
|
|
1149
|
-
const v = t + o.diffX, x = u + o.diffY;
|
|
1150
|
-
e.content += `
|
|
1151
|
-
<circle
|
|
1152
|
-
id="${o.id}"
|
|
1153
|
-
cx="${v}"
|
|
1154
|
-
cy="${x}"
|
|
1155
|
-
r="${o.circleRadius ? o.circleRadius : Number.MIN_VALUE}"
|
|
1156
|
-
fill="${o.isFilled ? o.color + o.alpha : "rgba(255,255,255,0.001)"}"
|
|
1157
|
-
stroke="${o.color + o.alpha}"
|
|
1158
|
-
stroke-width="${o.strokeWidth}"
|
|
1159
|
-
style="${o.isDash ? `stroke-dasharray: ${o.strokeWidth * 3}` : ""}"
|
|
1160
|
-
/>
|
|
1161
|
-
`;
|
|
1162
|
-
break;
|
|
1163
|
-
}
|
|
1164
|
-
case "rect": {
|
|
1165
|
-
const v = t + o.diffX, x = u + o.diffY;
|
|
1166
|
-
e.content += `
|
|
1167
|
-
<rect
|
|
1168
|
-
id="${w.value ? "" : o.id}"
|
|
1169
|
-
x="${v}"
|
|
1170
|
-
y="${x}"
|
|
1171
|
-
fill="${o.isFilled ? o.color + o.alpha : "rgba(255,255,255,0.001)"}"
|
|
1172
|
-
height="${o.rectHeight}"
|
|
1173
|
-
width="${o.rectWidth}"
|
|
1174
|
-
stroke="${o.color + o.alpha}"
|
|
1175
|
-
stroke-width="${o.strokeWidth}"
|
|
1176
|
-
style="rx:1 !important; ry:1 !important; ${o.isDash ? `stroke-dasharray: ${o.strokeWidth * 3}` : ""}"
|
|
1177
|
-
/>
|
|
1178
|
-
`;
|
|
1179
|
-
break;
|
|
1180
|
-
}
|
|
1181
|
-
case "arrow": {
|
|
1182
|
-
const v = t + o.diffX, x = u + o.diffY, A = t + o.diffEndX, K = u + o.diffEndY, X = o.strokeWidth > 3 ? 5 : 10, ge = o.strokeWidth > 3 ? 2.5 : 5, P = `m_${o.id}_${he()}`;
|
|
1183
|
-
e.content += `
|
|
1184
|
-
<g id="${o.id}">
|
|
1185
|
-
<defs>
|
|
1186
|
-
<marker
|
|
1187
|
-
id="${P}"
|
|
1188
|
-
markerWidth="${X}"
|
|
1189
|
-
markerHeight="${X}"
|
|
1190
|
-
refX="0"
|
|
1191
|
-
refY="${ge}"
|
|
1192
|
-
orient="auto">
|
|
1193
|
-
<polygon points="0 0,${X} ${ge}, 0 ${X}" fill="${o.color}" />
|
|
1194
|
-
</marker>
|
|
1195
|
-
</defs>
|
|
1196
|
-
<path
|
|
1197
|
-
style="stroke-linecap: round !important; ${o.isDash ? `stroke-dasharray: ${o.strokeWidth * 3}` : ""}"
|
|
1198
|
-
stroke="${o.color}"
|
|
1199
|
-
id="${o.id}"
|
|
1200
|
-
d="M${v},${x} ${A},${K}"
|
|
1201
|
-
stroke-width="${o.strokeWidth}"
|
|
1202
|
-
marker-end="url(#${P})"
|
|
1203
|
-
/>
|
|
1204
|
-
</g>
|
|
1205
|
-
`;
|
|
1206
|
-
break;
|
|
1207
|
-
}
|
|
1208
|
-
case "text": {
|
|
1209
|
-
const x = (o.textContent || "").split("").map(
|
|
1210
|
-
(A, K) => `
|
|
1211
|
-
${o.isBulletTextMode ? `<tspan x="${t + o.diffX - o.fontSize}" y="${u + o.diffY + o.fontSize * K}" id="${o.id}" font-size="${o.fontSize / 2}">⬤</tspan>` : ""}
|
|
1212
|
-
<tspan id="${o.id}" x="${t + o.diffX}" y="${u + o.diffY + o.fontSize * K}">
|
|
1213
|
-
${A}
|
|
1214
|
-
</tspan>
|
|
1215
|
-
`
|
|
1216
|
-
).join("");
|
|
1217
|
-
e.content += `
|
|
1218
|
-
<g id="${o.id}">
|
|
1219
|
-
<text
|
|
1220
|
-
style="user-select:none; height:100px;"
|
|
1221
|
-
id="${o.id}"
|
|
1222
|
-
x="${t + o.diffX}"
|
|
1223
|
-
y="${u + o.diffY}"
|
|
1224
|
-
text-anchor="${o.textAlign}"
|
|
1225
|
-
font-size="${o.fontSize}"
|
|
1226
|
-
fill="${o.color}"
|
|
1227
|
-
font-weight="${o.isBold ? "bold" : "normal"}"
|
|
1228
|
-
font-style="${o.isItalic ? "italic" : "normal"}"
|
|
1229
|
-
text-decoration="${o.isUnderline ? "underline" : "none"}">
|
|
1230
|
-
${x}
|
|
1231
|
-
</text>
|
|
1232
|
-
</g>
|
|
1233
|
-
`;
|
|
1234
|
-
break;
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
});
|
|
1238
|
-
}
|
|
1239
|
-
function Wt(e) {
|
|
1240
|
-
e.relatedTarget && ye.value && ye.value.contains(e.relatedTarget) || (qe.value = !0, F.value = void 0);
|
|
1241
|
-
}
|
|
1242
|
-
function Dt() {
|
|
1243
|
-
if (d.value = !0, !s.value && !m.value || !d.value)
|
|
1244
|
-
return;
|
|
1245
|
-
V.value = !0, h.value.start = {
|
|
1246
|
-
x: O.value.x,
|
|
1247
|
-
y: O.value.y
|
|
1248
|
-
};
|
|
1249
|
-
let e = `${m.value ? "group" : s.value}_${he()}`;
|
|
1250
|
-
switch (!0) {
|
|
1251
|
-
case s.value === "arrow":
|
|
1252
|
-
n.value.push({
|
|
1253
|
-
id: e,
|
|
1254
|
-
x: O.value.x,
|
|
1255
|
-
y: O.value.y,
|
|
1256
|
-
endX: O.value.x,
|
|
1257
|
-
endY: O.value.y,
|
|
1258
|
-
type: s.value,
|
|
1259
|
-
color: b(ie.value),
|
|
1260
|
-
strokeWidth: b(Math.abs(ee.value)),
|
|
1261
|
-
isDash: b(ue.value)
|
|
1262
|
-
}), a.value = n.value.at(-1);
|
|
1263
|
-
break;
|
|
1264
|
-
case s.value === "circle":
|
|
1265
|
-
n.value.push({
|
|
1266
|
-
alpha: N.value.circle.filled ? me.value : "",
|
|
1267
|
-
id: e,
|
|
1268
|
-
color: b(ie.value),
|
|
1269
|
-
isFilled: b(N.value.circle.filled),
|
|
1270
|
-
circleRadius: b(N.value.circle.radius),
|
|
1271
|
-
circleStrokeWidth: b(N.value.circle.strokeWidth),
|
|
1272
|
-
type: s.value,
|
|
1273
|
-
x: O.value.x,
|
|
1274
|
-
y: O.value.y,
|
|
1275
|
-
strokeWidth: b(Math.abs(ee.value)),
|
|
1276
|
-
isDash: b(ue.value)
|
|
1277
|
-
}), a.value = n.value.at(-1);
|
|
1278
|
-
break;
|
|
1279
|
-
case s.value === "line":
|
|
1280
|
-
n.value.push({
|
|
1281
|
-
alpha: b(me.value),
|
|
1282
|
-
id: e,
|
|
1283
|
-
x: O.value.x,
|
|
1284
|
-
y: O.value.y,
|
|
1285
|
-
type: s.value,
|
|
1286
|
-
color: b(ie.value),
|
|
1287
|
-
strokeWidth: b(Math.abs(ee.value)),
|
|
1288
|
-
isDash: b(ue.value),
|
|
1289
|
-
path: `${O.value.x} ${O.value.y}`
|
|
1290
|
-
}), a.value = n.value.at(-1);
|
|
1291
|
-
break;
|
|
1292
|
-
case s.value === "rect":
|
|
1293
|
-
n.value.push({
|
|
1294
|
-
alpha: N.value.rect.filled ? me.value : "",
|
|
1295
|
-
id: e,
|
|
1296
|
-
color: b(ie.value),
|
|
1297
|
-
isFilled: b(N.value.rect.filled),
|
|
1298
|
-
rectStrokeWidth: b(N.value.rect.strokeWidth),
|
|
1299
|
-
rectHeight: b(N.value.rect.height),
|
|
1300
|
-
rectWidth: b(N.value.rect.width),
|
|
1301
|
-
type: s.value,
|
|
1302
|
-
x: O.value.x,
|
|
1303
|
-
y: O.value.y,
|
|
1304
|
-
strokeWidth: b(Math.abs(ee.value)),
|
|
1305
|
-
isDash: b(ue.value)
|
|
1306
|
-
}), a.value = n.value.at(-1);
|
|
1307
|
-
break;
|
|
1308
|
-
case s.value === "group":
|
|
1309
|
-
n.value.push({
|
|
1310
|
-
alpha: 1,
|
|
1311
|
-
id: `group_${he()}`,
|
|
1312
|
-
x: O.value.x,
|
|
1313
|
-
y: O.value.y,
|
|
1314
|
-
isFilled: !1,
|
|
1315
|
-
rectHeight: b(N.value.rect.height),
|
|
1316
|
-
rectWidth: b(N.value.rect.width),
|
|
1317
|
-
rectStrokeWidth: 1,
|
|
1318
|
-
type: "group",
|
|
1319
|
-
color: "grey",
|
|
1320
|
-
strokeWidth: 1,
|
|
1321
|
-
isDash: !0,
|
|
1322
|
-
content: ""
|
|
1323
|
-
});
|
|
1324
|
-
break;
|
|
1325
|
-
}
|
|
1326
|
-
xe.value || (xe.value = requestAnimationFrame(st));
|
|
1327
|
-
}
|
|
1328
|
-
function ft(e) {
|
|
1329
|
-
if ($.value) {
|
|
1330
|
-
we.value = !1;
|
|
1331
|
-
return;
|
|
1332
|
-
}
|
|
1333
|
-
if (e.preventDefault(), e.stopPropagation(), we.value = !0, e.pointerId != null) {
|
|
1334
|
-
try {
|
|
1335
|
-
ye.value?.setPointerCapture?.(e.pointerId);
|
|
1336
|
-
} catch {
|
|
1337
|
-
}
|
|
1338
|
-
je.value = e.pointerId;
|
|
1339
|
-
} else
|
|
1340
|
-
je.value = null;
|
|
1341
|
-
if ((B.value || T.value || w.value || m.value) && re.value?.begin?.(), B.value) {
|
|
1342
|
-
Dt();
|
|
1343
|
-
return;
|
|
1344
|
-
}
|
|
1345
|
-
if (T.value) {
|
|
1346
|
-
const t = ht(e) || F.value || a.value?.id;
|
|
1347
|
-
t && (Ct(t), q.value = { id: t }), at(e);
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
function Ft(e) {
|
|
1351
|
-
if (!e || !e.id || e.type === "line" || !ke.value && (at({ target: { id: e.id } }), !ke.value))
|
|
1352
|
-
return;
|
|
1353
|
-
const { dx: t, dy: u, endDx: o, endDy: v } = ke.value, x = O.value.x, A = O.value.y;
|
|
1354
|
-
switch (a.value = e, e.type) {
|
|
1355
|
-
case "arrow":
|
|
1356
|
-
e.x = x - t, e.y = A - u, e.endX = x - (o ?? t), e.endY = A - (v ?? u);
|
|
1357
|
-
break;
|
|
1358
|
-
case "circle":
|
|
1359
|
-
e.x = x - t, e.y = A - u;
|
|
1360
|
-
break;
|
|
1361
|
-
case "rect":
|
|
1362
|
-
e.x = x - t, e.y = A - u;
|
|
1363
|
-
break;
|
|
1364
|
-
case "text":
|
|
1365
|
-
e.x = x - t, e.y = A - u;
|
|
1366
|
-
break;
|
|
1367
|
-
case "group":
|
|
1368
|
-
e.x = x - t, e.y = A - u, jt(e);
|
|
1369
|
-
break;
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
function It() {
|
|
1373
|
-
const e = q.value?.id || F.value;
|
|
1374
|
-
if (!e) return;
|
|
1375
|
-
const t = n.value.find((u) => u.id === e);
|
|
1376
|
-
t && Ft(t);
|
|
1377
|
-
}
|
|
1378
|
-
function Pt() {
|
|
1379
|
-
V.value = !1;
|
|
1380
|
-
const e = q.value.id;
|
|
1381
|
-
if (!e)
|
|
1382
|
-
return;
|
|
1383
|
-
d.value = !0;
|
|
1384
|
-
const t = n.value.find((u) => u.id === e);
|
|
1385
|
-
s.value = t.type, n.value = n.value.filter((u) => u.id !== e), n.value.push(t), nt(!0);
|
|
1386
|
-
}
|
|
1387
|
-
function bt(e) {
|
|
1388
|
-
$.value || (e.preventDefault(), e.stopPropagation(), e.target.localName !== "svg" && (q.value = e.target), T.value && we.value ? It() : w.value && we.value && Pt());
|
|
1389
|
-
}
|
|
1390
|
-
function Et(e) {
|
|
1391
|
-
const t = e.target.id;
|
|
1392
|
-
if (!0 === $.value) {
|
|
1393
|
-
re.value?.begin(), n.value = [...n.value].filter(
|
|
1394
|
-
(u) => u.id !== t
|
|
1395
|
-
), a.value = void 0, re.value?.end();
|
|
1396
|
-
return;
|
|
1397
|
-
} else
|
|
1398
|
-
a.value = n.value.find(
|
|
1399
|
-
(u) => u.id === t
|
|
1400
|
-
);
|
|
1401
|
-
}
|
|
1402
|
-
const Ne = i(null);
|
|
1403
|
-
function Ve(e, t) {
|
|
1404
|
-
for (t(e), e = e.firstChild; e; )
|
|
1405
|
-
Ve(e, t), e = e.nextSibling;
|
|
1406
|
-
}
|
|
1407
|
-
function Ht() {
|
|
1408
|
-
Ke.value = !0, $.value = !1, T.value = !1, w.value = !1, M.value = !1, J.value = !1, m.value = !1, s.value = void 0, G.value = !1, Qt(async () => {
|
|
1409
|
-
const e = Ne.value;
|
|
1410
|
-
if (e) {
|
|
1411
|
-
Ve(e, (t) => {
|
|
1412
|
-
t && t.nodeType === 1 && (t.setAttribute("font-family", "Helvetica"), t.style.fontFamily = "Helvetica");
|
|
1413
|
-
});
|
|
1414
|
-
try {
|
|
1415
|
-
let t;
|
|
1416
|
-
try {
|
|
1417
|
-
t = (await import("jspdf")).default;
|
|
1418
|
-
} catch {
|
|
1419
|
-
throw new Error(
|
|
1420
|
-
"jspdf is not installed. Run npm install jspdf"
|
|
1421
|
-
);
|
|
1422
|
-
}
|
|
1423
|
-
const u = await ol({
|
|
1424
|
-
container: e,
|
|
1425
|
-
scale: 2
|
|
1426
|
-
}), o = new Image();
|
|
1427
|
-
o.src = u, o.onload = () => {
|
|
1428
|
-
const v = {
|
|
1429
|
-
width: 595.28,
|
|
1430
|
-
height: 841.89
|
|
1431
|
-
}, x = o.width, A = o.height, K = x / v.width * v.height, X = v.width, ge = X / x * A, P = new t("", "pt", "a4");
|
|
1432
|
-
let ne = 0, Me = A;
|
|
1433
|
-
if (Me < K)
|
|
1434
|
-
P.addImage(
|
|
1435
|
-
u,
|
|
1436
|
-
"PNG",
|
|
1437
|
-
0,
|
|
1438
|
-
0,
|
|
1439
|
-
X,
|
|
1440
|
-
ge,
|
|
1441
|
-
"",
|
|
1442
|
-
"FAST"
|
|
1443
|
-
);
|
|
1444
|
-
else
|
|
1445
|
-
for (; Me > 0; )
|
|
1446
|
-
P.addImage(
|
|
1447
|
-
u,
|
|
1448
|
-
"PNG",
|
|
1449
|
-
0,
|
|
1450
|
-
ne,
|
|
1451
|
-
X,
|
|
1452
|
-
ge,
|
|
1453
|
-
"",
|
|
1454
|
-
"FAST"
|
|
1455
|
-
), Me -= K, ne -= v.height, Me > 0 && P.addPage();
|
|
1456
|
-
P.save(`${(/* @__PURE__ */ new Date()).toLocaleDateString()}_annotations.pdf`);
|
|
1457
|
-
};
|
|
1458
|
-
} catch (t) {
|
|
1459
|
-
console.error("Error generating image:", t);
|
|
1460
|
-
} finally {
|
|
1461
|
-
Ke.value = !1, Ve(e, (t) => {
|
|
1462
|
-
t && t.nodeType === 1 && (t.setAttribute(
|
|
1463
|
-
"font-family",
|
|
1464
|
-
l.value.style.fontFamily
|
|
1465
|
-
), t.style.fontFamily = l.value.style.fontFamily);
|
|
1466
|
-
});
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
});
|
|
1470
|
-
}
|
|
1471
|
-
function Qe(e) {
|
|
1472
|
-
if (!$.value && e && (e.preventDefault(), e.stopPropagation()), d.value = !1, we.value = !1, ke.value = null, je.value != null) {
|
|
1473
|
-
try {
|
|
1474
|
-
ye.value?.releasePointerCapture?.(je.value);
|
|
1475
|
-
} catch {
|
|
1476
|
-
}
|
|
1477
|
-
je.value = null;
|
|
1478
|
-
}
|
|
1479
|
-
xe.value && (cancelAnimationFrame(xe.value), xe.value = null), m.value && zt(), re.value?.end();
|
|
1480
|
-
}
|
|
1481
|
-
function Lt() {
|
|
1482
|
-
!a.value || !a.value.id.includes("rect") || (a.value.isFilled = !a.value.isFilled);
|
|
1483
|
-
}
|
|
1484
|
-
function Yt() {
|
|
1485
|
-
!a.value || !a.value.id.includes("circle") || (a.value.isFilled = !a.value.isFilled);
|
|
1486
|
-
}
|
|
1487
|
-
function Xt() {
|
|
1488
|
-
!a.value || a.value.type === "text" || (a.value.isDash = b(ue.value));
|
|
1489
|
-
}
|
|
1490
|
-
function Ut() {
|
|
1491
|
-
!a.value || ["arrow", "text"].includes(a.value.id) || (a.value.alpha = b(me.value));
|
|
1492
|
-
}
|
|
1493
|
-
function Nt() {
|
|
1494
|
-
!a.value || !["arrow", "circle", "rect", "line"].includes(
|
|
1495
|
-
a.value.type
|
|
1496
|
-
) || (a.value.strokeWidth = b(Math.abs(ee.value)));
|
|
1497
|
-
}
|
|
1498
|
-
function De() {
|
|
1499
|
-
!a.value || a.value.type !== "text" || (a.value.isBold = b(te.value), a.value.isItalic = b(U.value), a.value.isUnderline = b(be.value), a.value.fontSize = b(Ee.value), a.value.isBulletTextMode = b(le.value));
|
|
1500
|
-
}
|
|
1501
|
-
function _e(e) {
|
|
1502
|
-
if (e.preventDefault(), !ye.value) return;
|
|
1503
|
-
const t = ye.value.getBoundingClientRect();
|
|
1504
|
-
let u, o;
|
|
1505
|
-
e.touches && e.touches.length > 0 ? (u = e.touches[0].clientX, o = e.touches[0].clientY) : (u = e.clientX, o = e.clientY), O.value.x = (u - t.left) / t.width * Re.value, O.value.y = (o - t.top) / t.height * Ce.value;
|
|
1506
|
-
}
|
|
1507
|
-
function Oe(e) {
|
|
1508
|
-
if (G.value = !1, Se(), e === s.value) {
|
|
1509
|
-
s.value = void 0, B.value = !1;
|
|
1510
|
-
return;
|
|
1511
|
-
}
|
|
1512
|
-
B.value = !0, $.value = !1, T.value = !1, w.value = !1, M.value = !1, s.value = e;
|
|
1513
|
-
}
|
|
1514
|
-
function Vt() {
|
|
1515
|
-
ce.value = !ce.value, ce.value || (T.value = !1, w.value = !1, M.value = !1, J.value = !1, s.value = void 0, G.value = !1, $.value = !1, J.value = !1), $e("toggleOpenState", { isOpen: ce.value });
|
|
1516
|
-
}
|
|
1517
|
-
function Gt() {
|
|
1518
|
-
$e("saveAnnotations", {
|
|
1519
|
-
shapes: n.value,
|
|
1520
|
-
lastSelectedShape: a.value
|
|
1521
|
-
});
|
|
1522
|
-
}
|
|
1523
|
-
let et = null;
|
|
1524
|
-
return kt(() => {
|
|
1525
|
-
if (Ne.value) {
|
|
1526
|
-
let u = !1;
|
|
1527
|
-
Ve(Ne.value, (o) => {
|
|
1528
|
-
if (!u && ["DIV", "svg", "section", "canvas"].includes(o.tagName)) {
|
|
1529
|
-
Je.value = o, u = !0;
|
|
1530
|
-
return;
|
|
1531
|
-
}
|
|
1532
|
-
});
|
|
1533
|
-
}
|
|
1534
|
-
Le.value = (() => {
|
|
1535
|
-
if (typeof navigator > "u") return !1;
|
|
1536
|
-
const u = navigator.userAgentData?.platform ?? "";
|
|
1537
|
-
if (u) return /mac|ios/i.test(u);
|
|
1538
|
-
const o = navigator.userAgent ?? "";
|
|
1539
|
-
return /(Mac|iPhone|iPad|iPod)/i.test(o);
|
|
1540
|
-
})();
|
|
1541
|
-
const e = Je?.value.getBoundingClientRect();
|
|
1542
|
-
if (Fe.value = e.height / e.width, Re.value = 1e3, Ce.value = Fe.value * 1e3, Ie.value = e.width, Pe.value = e.height, new ResizeObserver((u) => {
|
|
1543
|
-
u.forEach((o) => {
|
|
1544
|
-
Ie.value = o.contentRect.width, Pe.value = o.contentRect.height, Fe.value = o.contentRect.height / o.contentRect.width, Ce.value = Fe.value * 1e3;
|
|
1545
|
-
});
|
|
1546
|
-
}).observe(Je.value), Ye.value = (u) => yt(u), window.addEventListener("keydown", Ye.value), re.value = Rt(), re.value.size) {
|
|
1547
|
-
const u = re.value.size();
|
|
1548
|
-
Ae.value.undo = u.undo, Ae.value.redo = u.redo;
|
|
1549
|
-
}
|
|
1550
|
-
et = sl({
|
|
1551
|
-
isMacLike: Le,
|
|
1552
|
-
isSummaryOpen: ce,
|
|
1553
|
-
isWriting: J,
|
|
1554
|
-
isDeleteMode: $,
|
|
1555
|
-
isMoveMode: T,
|
|
1556
|
-
isResizeMode: w,
|
|
1557
|
-
isSelectMode: m,
|
|
1558
|
-
isDrawMode: B,
|
|
1559
|
-
isTextMode: M,
|
|
1560
|
-
activeShape: s,
|
|
1561
|
-
showCaret: G,
|
|
1562
|
-
lastSelectedShape: a,
|
|
1563
|
-
shapes: n,
|
|
1564
|
-
history: re,
|
|
1565
|
-
setShapeTo: Oe,
|
|
1566
|
-
undoLastShape: vt,
|
|
1567
|
-
redoLastShape: ct
|
|
1568
|
-
});
|
|
1569
|
-
}), xt(() => {
|
|
1570
|
-
y(), xe.value && cancelAnimationFrame(xe.value), Ye.value && window.removeEventListener("keydown", Ye.value), et && et(), window.removeEventListener("keydown", yt);
|
|
1571
|
-
}), ut(n, (e) => {
|
|
1572
|
-
e.length === 0 && (a.value = void 0);
|
|
1573
|
-
}), ut(M, (e) => {
|
|
1574
|
-
G.value = e;
|
|
1575
|
-
}), (e, t) => (f(), Y("div", dl, [
|
|
1576
|
-
r("div", vl, [
|
|
1577
|
-
_(rl, {
|
|
1578
|
-
config: {
|
|
1579
|
-
maxHeight: 1e3,
|
|
1580
|
-
useCursorPointer: I.value,
|
|
1581
|
-
head: {
|
|
1582
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
1583
|
-
color: l.value.style.color,
|
|
1584
|
-
iconColor: l.value.style.color,
|
|
1585
|
-
iconSize: 20,
|
|
1586
|
-
icon: ce.value ? "close" : "annotator",
|
|
1587
|
-
padding: "6px"
|
|
1588
|
-
},
|
|
1589
|
-
body: {
|
|
1590
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
1591
|
-
color: l.value.style.color
|
|
1592
|
-
}
|
|
1593
|
-
},
|
|
1594
|
-
onToggle: Vt
|
|
1595
|
-
}, {
|
|
1596
|
-
title: W(({ color: u }) => [
|
|
1597
|
-
r("div", {
|
|
1598
|
-
style: C({ color: u })
|
|
1599
|
-
}, S(l.value.translations.title), 5)
|
|
1600
|
-
]),
|
|
1601
|
-
content: W(({ backgroundColor: u }) => [
|
|
1602
|
-
r("div", {
|
|
1603
|
-
class: "tool-selection",
|
|
1604
|
-
style: C({
|
|
1605
|
-
backgroundColor: u
|
|
1606
|
-
})
|
|
1607
|
-
}, [
|
|
1608
|
-
r("button", {
|
|
1609
|
-
disabled: n.value.length === 0,
|
|
1610
|
-
style: C({
|
|
1611
|
-
background: T.value ? l.value.style.buttons.controls.selected.backgroundColor : l.value.style.buttons.controls.backgroundColor,
|
|
1612
|
-
border: T.value ? l.value.style.buttons.controls.selected.border : l.value.style.buttons.controls.border,
|
|
1613
|
-
color: T.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color,
|
|
1614
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1615
|
-
cursor: I.value ? "pointer" : "default"
|
|
1616
|
-
}),
|
|
1617
|
-
class: D({
|
|
1618
|
-
"button-tool": !0,
|
|
1619
|
-
"button-tool--selected": T.value,
|
|
1620
|
-
tooltip: !0
|
|
1621
|
-
}),
|
|
1622
|
-
onClick: t[0] || (t[0] = (o) => {
|
|
1623
|
-
Se(), T.value = !T.value, s.value = void 0, $.value = !1, B.value = !1, w.value = !1, m.value = !1, M.value = !1, J.value = !1, G.value = !1;
|
|
1624
|
-
}),
|
|
1625
|
-
onMouseenter: t[1] || (t[1] = (o) => l.value.style.showTooltips && k("move", o, "top")),
|
|
1626
|
-
onMouseleave: y,
|
|
1627
|
-
onFocus: t[2] || (t[2] = (o) => l.value.style.showTooltips && k("move", o, "top")),
|
|
1628
|
-
onBlur: y
|
|
1629
|
-
}, [
|
|
1630
|
-
_(oe, {
|
|
1631
|
-
name: "move",
|
|
1632
|
-
stroke: T.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color
|
|
1633
|
-
}, null, 8, ["stroke"]),
|
|
1634
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1635
|
-
key: 0,
|
|
1636
|
-
show: z.value && j.value === "move",
|
|
1637
|
-
x: c.value.x,
|
|
1638
|
-
y: c.value.y - 6,
|
|
1639
|
-
placement: "top",
|
|
1640
|
-
styleObject: H.value
|
|
1641
|
-
}, {
|
|
1642
|
-
default: W(() => [
|
|
1643
|
-
R(S(l.value.translations.tooltipMove) + " ", 1),
|
|
1644
|
-
t[91] || (t[91] = r("kbd", null, "M", -1))
|
|
1645
|
-
]),
|
|
1646
|
-
_: 1
|
|
1647
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1648
|
-
], 46, cl),
|
|
1649
|
-
r("button", {
|
|
1650
|
-
disabled: n.value.length === 0 || s.value === "line",
|
|
1651
|
-
style: C({
|
|
1652
|
-
background: w.value ? l.value.style.buttons.controls.selected.backgroundColor : l.value.style.buttons.controls.backgroundColor,
|
|
1653
|
-
border: w.value ? l.value.style.buttons.controls.selected.border : l.value.style.buttons.controls.border,
|
|
1654
|
-
color: w.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color,
|
|
1655
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1656
|
-
cursor: I.value ? "pointer" : "default"
|
|
1657
|
-
}),
|
|
1658
|
-
class: D({
|
|
1659
|
-
"button-tool": !0,
|
|
1660
|
-
"button-tool--selected": w.value,
|
|
1661
|
-
tooltip: !0
|
|
1662
|
-
}),
|
|
1663
|
-
onClick: t[3] || (t[3] = (o) => {
|
|
1664
|
-
Se(), w.value = !w.value, T.value = !1, $.value = !1, B.value = !1, m.value = !1, M.value = !1, J.value = !1, s.value = void 0, G.value = !1;
|
|
1665
|
-
}),
|
|
1666
|
-
onMouseenter: t[4] || (t[4] = (o) => l.value.style.showTooltips && k("resize", o, "top")),
|
|
1667
|
-
onMouseleave: y,
|
|
1668
|
-
onFocus: t[5] || (t[5] = (o) => l.value.style.showTooltips && k("resize", o, "top")),
|
|
1669
|
-
onBlur: y
|
|
1670
|
-
}, [
|
|
1671
|
-
_(oe, {
|
|
1672
|
-
name: "resize",
|
|
1673
|
-
stroke: w.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color
|
|
1674
|
-
}, null, 8, ["stroke"]),
|
|
1675
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1676
|
-
key: 0,
|
|
1677
|
-
show: z.value && j.value === "resize",
|
|
1678
|
-
x: c.value.x,
|
|
1679
|
-
y: c.value.y - 6,
|
|
1680
|
-
placement: "top",
|
|
1681
|
-
styleObject: H.value
|
|
1682
|
-
}, {
|
|
1683
|
-
default: W(() => [
|
|
1684
|
-
R(S(l.value.translations.tooltipResize) + " ", 1),
|
|
1685
|
-
t[92] || (t[92] = r("kbd", null, "R", -1))
|
|
1686
|
-
]),
|
|
1687
|
-
_: 1
|
|
1688
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1689
|
-
], 46, yl),
|
|
1690
|
-
r("button", {
|
|
1691
|
-
disabled: n.value.length === 0,
|
|
1692
|
-
style: C({
|
|
1693
|
-
background: $.value ? l.value.style.buttons.controls.selected.backgroundColor : l.value.style.buttons.controls.backgroundColor,
|
|
1694
|
-
border: $.value ? l.value.style.buttons.controls.selected.border : l.value.style.buttons.controls.border,
|
|
1695
|
-
color: $.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color,
|
|
1696
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1697
|
-
cursor: I.value ? "pointer" : "default"
|
|
1698
|
-
}),
|
|
1699
|
-
class: D({
|
|
1700
|
-
"button-tool": !0,
|
|
1701
|
-
"button-tool--selected": $.value,
|
|
1702
|
-
tooltip: !0
|
|
1703
|
-
}),
|
|
1704
|
-
onClick: t[6] || (t[6] = (o) => {
|
|
1705
|
-
Se(), $.value = !$.value, T.value = !1, w.value = !1, m.value = !1, M.value = !1, J.value = !1, s.value = void 0, G.value = !1;
|
|
1706
|
-
}),
|
|
1707
|
-
onMouseenter: t[7] || (t[7] = (o) => l.value.style.showTooltips && k("delete", o, "top")),
|
|
1708
|
-
onMouseleave: y,
|
|
1709
|
-
onFocus: t[8] || (t[8] = (o) => l.value.style.showTooltips && k("delete", o, "top")),
|
|
1710
|
-
onBlur: y
|
|
1711
|
-
}, [
|
|
1712
|
-
_(oe, {
|
|
1713
|
-
name: "trash",
|
|
1714
|
-
stroke: $.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color
|
|
1715
|
-
}, null, 8, ["stroke"]),
|
|
1716
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1717
|
-
key: 0,
|
|
1718
|
-
show: z.value && j.value === "delete",
|
|
1719
|
-
x: c.value.x,
|
|
1720
|
-
y: c.value.y - 6,
|
|
1721
|
-
placement: "top",
|
|
1722
|
-
styleObject: H.value
|
|
1723
|
-
}, {
|
|
1724
|
-
default: W(() => [
|
|
1725
|
-
R(S(l.value.translations.tooltipDelete) + " ", 1),
|
|
1726
|
-
t[93] || (t[93] = r("kbd", null, "D", -1))
|
|
1727
|
-
]),
|
|
1728
|
-
_: 1
|
|
1729
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1730
|
-
], 46, fl),
|
|
1731
|
-
r("button", {
|
|
1732
|
-
disabled: !mt.value,
|
|
1733
|
-
style: C({
|
|
1734
|
-
background: m.value ? l.value.style.buttons.controls.selected.backgroundColor : l.value.style.buttons.controls.backgroundColor,
|
|
1735
|
-
border: m.value ? l.value.style.buttons.controls.selected.border : l.value.style.buttons.controls.border,
|
|
1736
|
-
color: m.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color,
|
|
1737
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1738
|
-
cursor: I.value ? "pointer" : "default"
|
|
1739
|
-
}),
|
|
1740
|
-
class: D({
|
|
1741
|
-
"button-tool": !0,
|
|
1742
|
-
"button-tool--selected": m.value,
|
|
1743
|
-
tooltip: !0
|
|
1744
|
-
}),
|
|
1745
|
-
onClick: t[9] || (t[9] = (o) => {
|
|
1746
|
-
Se(), Oe("group"), m.value = !m.value, $.value = !1, T.value = !1, w.value = !1, M.value = !1, J.value = !1, s.value = "group", G.value = !1;
|
|
1747
|
-
}),
|
|
1748
|
-
onMouseenter: t[10] || (t[10] = (o) => l.value.style.showTooltips && k("selectAndGroup", o, "top")),
|
|
1749
|
-
onMouseleave: y,
|
|
1750
|
-
onFocus: t[11] || (t[11] = (o) => l.value.style.showTooltips && k("selectAndGroup", o, "top")),
|
|
1751
|
-
onBlur: y
|
|
1752
|
-
}, [
|
|
1753
|
-
_(oe, {
|
|
1754
|
-
name: "selectAndGroup",
|
|
1755
|
-
stroke: m.value ? l.value.style.buttons.controls.selected.color : l.value.style.buttons.controls.color
|
|
1756
|
-
}, null, 8, ["stroke"]),
|
|
1757
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1758
|
-
key: 0,
|
|
1759
|
-
show: z.value && j.value === "selectAndGroup",
|
|
1760
|
-
x: c.value.x,
|
|
1761
|
-
y: c.value.y - 6,
|
|
1762
|
-
placement: "top",
|
|
1763
|
-
styleObject: H.value
|
|
1764
|
-
}, {
|
|
1765
|
-
default: W(() => [
|
|
1766
|
-
R(S(l.value.translations.tooltipGroup) + " ", 1),
|
|
1767
|
-
t[94] || (t[94] = r("kbd", null, "G", -1))
|
|
1768
|
-
]),
|
|
1769
|
-
_: 1
|
|
1770
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1771
|
-
], 46, bl),
|
|
1772
|
-
r("button", {
|
|
1773
|
-
disabled: n.value.length === 0,
|
|
1774
|
-
style: C({
|
|
1775
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
1776
|
-
border: l.value.style.buttons.controls.border,
|
|
1777
|
-
color: l.value.style.buttons.controls.color,
|
|
1778
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1779
|
-
cursor: I.value ? "pointer" : "default"
|
|
1780
|
-
}),
|
|
1781
|
-
class: D({ "button-tool": !0, tooltip: !0 }),
|
|
1782
|
-
onClick: t[12] || (t[12] = (o) => {
|
|
1783
|
-
w.value = !1, T.value = !0, $.value = !1, B.value = !1, m.value = !1, M.value = !1, J.value = !1, G.value = !1, it("front");
|
|
1784
|
-
}),
|
|
1785
|
-
onMouseenter: t[13] || (t[13] = (o) => l.value.style.showTooltips && k("bringToFront", o, "top")),
|
|
1786
|
-
onMouseleave: y,
|
|
1787
|
-
onFocus: t[14] || (t[14] = (o) => l.value.style.showTooltips && k("bringToFront", o, "top")),
|
|
1788
|
-
onBlur: y
|
|
1789
|
-
}, [
|
|
1790
|
-
_(oe, {
|
|
1791
|
-
name: "bringToFront",
|
|
1792
|
-
stroke: l.value.style.buttons.controls.color
|
|
1793
|
-
}, null, 8, ["stroke"]),
|
|
1794
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1795
|
-
key: 0,
|
|
1796
|
-
show: z.value && j.value === "bringToFront",
|
|
1797
|
-
x: c.value.x,
|
|
1798
|
-
y: c.value.y - 6,
|
|
1799
|
-
placement: "top",
|
|
1800
|
-
styleObject: H.value
|
|
1801
|
-
}, {
|
|
1802
|
-
default: W(() => [
|
|
1803
|
-
R(S(l.value.translations.tooltipBringToFront), 1)
|
|
1804
|
-
]),
|
|
1805
|
-
_: 1
|
|
1806
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1807
|
-
], 44, kl),
|
|
1808
|
-
r("button", {
|
|
1809
|
-
disabled: n.value.length === 0,
|
|
1810
|
-
style: C({
|
|
1811
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
1812
|
-
border: l.value.style.buttons.controls.border,
|
|
1813
|
-
color: l.value.style.buttons.controls.color,
|
|
1814
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1815
|
-
cursor: I.value ? "pointer" : "default"
|
|
1816
|
-
}),
|
|
1817
|
-
class: D({ "button-tool": !0, tooltip: !0 }),
|
|
1818
|
-
onClick: t[15] || (t[15] = (o) => {
|
|
1819
|
-
w.value = !1, T.value = !0, $.value = !1, B.value = !1, m.value = !1, M.value = !1, J.value = !1, G.value = !1, it("back");
|
|
1820
|
-
}),
|
|
1821
|
-
onMouseenter: t[16] || (t[16] = (o) => l.value.style.showTooltips && k("bringToBack", o, "top")),
|
|
1822
|
-
onMouseleave: y,
|
|
1823
|
-
onFocus: t[17] || (t[17] = (o) => l.value.style.showTooltips && k("bringToBack", o, "top")),
|
|
1824
|
-
onBlur: y
|
|
1825
|
-
}, [
|
|
1826
|
-
_(oe, {
|
|
1827
|
-
name: "bringToBack",
|
|
1828
|
-
stroke: l.value.style.buttons.controls.color
|
|
1829
|
-
}, null, 8, ["stroke"]),
|
|
1830
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1831
|
-
key: 0,
|
|
1832
|
-
show: z.value && j.value === "bringToBack",
|
|
1833
|
-
x: c.value.x,
|
|
1834
|
-
y: c.value.y - 6,
|
|
1835
|
-
placement: "top",
|
|
1836
|
-
styleObject: H.value
|
|
1837
|
-
}, {
|
|
1838
|
-
default: W(() => [
|
|
1839
|
-
R(S(l.value.translations.tooltipBringToBack), 1)
|
|
1840
|
-
]),
|
|
1841
|
-
_: 1
|
|
1842
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1843
|
-
], 44, xl),
|
|
1844
|
-
r("button", {
|
|
1845
|
-
disabled: n.value.length === 0 || s.value === "line",
|
|
1846
|
-
style: C({
|
|
1847
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
1848
|
-
border: l.value.style.buttons.controls.border,
|
|
1849
|
-
color: l.value.style.buttons.controls.color,
|
|
1850
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1851
|
-
cursor: I.value ? "pointer" : "default"
|
|
1852
|
-
}),
|
|
1853
|
-
class: D({ "button-tool": !0, tooltip: !0 }),
|
|
1854
|
-
onClick: t[18] || (t[18] = (o) => {
|
|
1855
|
-
Se(), w.value = !1, T.value = !0, $.value = !1, B.value = !1, m.value = !1, M.value = !1, J.value = !1, G.value = !1, Bt();
|
|
1856
|
-
}),
|
|
1857
|
-
onMouseenter: t[19] || (t[19] = (o) => l.value.style.showTooltips && k("duplicate", o, "top")),
|
|
1858
|
-
onMouseleave: y,
|
|
1859
|
-
onFocus: t[20] || (t[20] = (o) => l.value.style.showTooltips && k("duplicate", o, "top")),
|
|
1860
|
-
onBlur: y
|
|
1861
|
-
}, [
|
|
1862
|
-
_(oe, {
|
|
1863
|
-
name: "copy",
|
|
1864
|
-
stroke: l.value.style.buttons.controls.color,
|
|
1865
|
-
size: 18
|
|
1866
|
-
}, null, 8, ["stroke"]),
|
|
1867
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1868
|
-
key: 0,
|
|
1869
|
-
show: z.value && j.value === "duplicate",
|
|
1870
|
-
x: c.value.x,
|
|
1871
|
-
y: c.value.y - 6,
|
|
1872
|
-
placement: "top",
|
|
1873
|
-
styleObject: H.value
|
|
1874
|
-
}, {
|
|
1875
|
-
default: W(() => [
|
|
1876
|
-
R(S(l.value.translations.tooltipDuplicate), 1)
|
|
1877
|
-
]),
|
|
1878
|
-
_: 1
|
|
1879
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1880
|
-
], 44, gl),
|
|
1881
|
-
r("button", {
|
|
1882
|
-
disabled: Ae.value.undo === 0,
|
|
1883
|
-
style: C({
|
|
1884
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
1885
|
-
border: l.value.style.buttons.controls.border,
|
|
1886
|
-
color: l.value.style.buttons.controls.color,
|
|
1887
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1888
|
-
cursor: I.value ? "pointer" : "default"
|
|
1889
|
-
}),
|
|
1890
|
-
class: D({
|
|
1891
|
-
"button-tool": !0,
|
|
1892
|
-
"button-tool--one-shot": !0,
|
|
1893
|
-
tooltip: !0
|
|
1894
|
-
}),
|
|
1895
|
-
onClick: t[21] || (t[21] = (o) => {
|
|
1896
|
-
w.value = !1, T.value = !1, $.value = !1, B.value = !1, m.value = !1, M.value = !1, J.value = !1, s.value = void 0, G.value = !1, vt();
|
|
1897
|
-
}),
|
|
1898
|
-
onMouseenter: t[22] || (t[22] = (o) => l.value.style.showTooltips && k("undoLast", o, "top")),
|
|
1899
|
-
onMouseleave: y,
|
|
1900
|
-
onFocus: t[23] || (t[23] = (o) => l.value.style.showTooltips && k("undoLast", o, "top")),
|
|
1901
|
-
onBlur: y
|
|
1902
|
-
}, [
|
|
1903
|
-
_(oe, {
|
|
1904
|
-
name: "refresh",
|
|
1905
|
-
stroke: l.value.style.buttons.controls.color,
|
|
1906
|
-
size: 20
|
|
1907
|
-
}, null, 8, ["stroke"]),
|
|
1908
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1909
|
-
key: 0,
|
|
1910
|
-
show: z.value && j.value === "undoLast",
|
|
1911
|
-
x: c.value.x,
|
|
1912
|
-
y: c.value.y - 6,
|
|
1913
|
-
placement: "top",
|
|
1914
|
-
styleObject: H.value
|
|
1915
|
-
}, {
|
|
1916
|
-
default: W(() => [
|
|
1917
|
-
R(S(l.value.translations.tooltipUndo) + " ", 1),
|
|
1918
|
-
r("kbd", null, S(Le.value ? "⌘" : "Ctrl"), 1),
|
|
1919
|
-
t[95] || (t[95] = r("kbd", null, "Z", -1))
|
|
1920
|
-
]),
|
|
1921
|
-
_: 1
|
|
1922
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1923
|
-
], 44, pl),
|
|
1924
|
-
r("button", {
|
|
1925
|
-
disabled: Ae.value.redo === 0,
|
|
1926
|
-
style: C({
|
|
1927
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
1928
|
-
border: l.value.style.buttons.controls.border,
|
|
1929
|
-
color: l.value.style.buttons.controls.color,
|
|
1930
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1931
|
-
cursor: I.value ? "pointer" : "default"
|
|
1932
|
-
}),
|
|
1933
|
-
class: D({
|
|
1934
|
-
"button-tool": !0,
|
|
1935
|
-
"button-tool--one-shot": !0,
|
|
1936
|
-
tooltip: !0
|
|
1937
|
-
}),
|
|
1938
|
-
onClick: t[24] || (t[24] = (o) => {
|
|
1939
|
-
w.value = !1, T.value = !1, $.value = !1, B.value = !1, m.value = !1, M.value = !1, J.value = !1, s.value = void 0, G.value = !1, ct();
|
|
1940
|
-
}),
|
|
1941
|
-
onMouseenter: t[25] || (t[25] = (o) => l.value.style.showTooltips && k("redoLast", o, "top")),
|
|
1942
|
-
onMouseleave: y,
|
|
1943
|
-
onFocus: t[26] || (t[26] = (o) => l.value.style.showTooltips && k("redoLast", o, "top")),
|
|
1944
|
-
onBlur: y
|
|
1945
|
-
}, [
|
|
1946
|
-
_(oe, {
|
|
1947
|
-
name: "refresh",
|
|
1948
|
-
stroke: l.value.style.buttons.controls.color,
|
|
1949
|
-
size: 20,
|
|
1950
|
-
style: {
|
|
1951
|
-
transform: "rotateX(0deg) rotateY(180deg)"
|
|
1952
|
-
}
|
|
1953
|
-
}, null, 8, ["stroke"]),
|
|
1954
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1955
|
-
key: 0,
|
|
1956
|
-
show: z.value && j.value === "redoLast",
|
|
1957
|
-
x: c.value.x,
|
|
1958
|
-
y: c.value.y - 6,
|
|
1959
|
-
placement: "top",
|
|
1960
|
-
styleObject: H.value
|
|
1961
|
-
}, {
|
|
1962
|
-
default: W(() => [
|
|
1963
|
-
R(S(l.value.translations.tooltipRedo) + " ", 1),
|
|
1964
|
-
r("kbd", null, S(Le.value ? "⌘" : "Ctrl"), 1),
|
|
1965
|
-
t[96] || (t[96] = r("kbd", null, "Y", -1))
|
|
1966
|
-
]),
|
|
1967
|
-
_: 1
|
|
1968
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
1969
|
-
], 44, $l),
|
|
1970
|
-
l.value.style.showPrint ? (f(), Y("button", {
|
|
1971
|
-
key: 0,
|
|
1972
|
-
style: C({
|
|
1973
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
1974
|
-
border: l.value.style.buttons.controls.border,
|
|
1975
|
-
color: l.value.style.buttons.controls.color,
|
|
1976
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
1977
|
-
cursor: I.value ? "pointer" : "default"
|
|
1978
|
-
}),
|
|
1979
|
-
class: D({ "button-tool": !0, tooltip: !0 }),
|
|
1980
|
-
onClick: Ht,
|
|
1981
|
-
onMouseenter: t[27] || (t[27] = (o) => l.value.style.showTooltips && k("printPdf", o, "top")),
|
|
1982
|
-
onMouseleave: y,
|
|
1983
|
-
onFocus: t[28] || (t[28] = (o) => l.value.style.showTooltips && k("printPdf", o, "top")),
|
|
1984
|
-
onBlur: y
|
|
1985
|
-
}, [
|
|
1986
|
-
_(oe, {
|
|
1987
|
-
name: "printer",
|
|
1988
|
-
stroke: l.value.style.buttons.controls.color
|
|
1989
|
-
}, null, 8, ["stroke"]),
|
|
1990
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
1991
|
-
key: 0,
|
|
1992
|
-
show: z.value && j.value === "printPdf",
|
|
1993
|
-
x: c.value.x,
|
|
1994
|
-
y: c.value.y - 6,
|
|
1995
|
-
placement: "top",
|
|
1996
|
-
styleObject: H.value
|
|
1997
|
-
}, {
|
|
1998
|
-
default: W(() => [
|
|
1999
|
-
R(S(l.value.translations.tooltipPdf), 1)
|
|
2000
|
-
]),
|
|
2001
|
-
_: 1
|
|
2002
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2003
|
-
], 36)) : g("", !0),
|
|
2004
|
-
l.value.style.showImage ? (f(), Y("button", {
|
|
2005
|
-
key: 1,
|
|
2006
|
-
style: C({
|
|
2007
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
2008
|
-
border: l.value.style.buttons.controls.border,
|
|
2009
|
-
color: l.value.style.buttons.controls.color,
|
|
2010
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2011
|
-
cursor: I.value ? "pointer" : "default"
|
|
2012
|
-
}),
|
|
2013
|
-
class: D({ "button-tool": !0, tooltip: !0 }),
|
|
2014
|
-
onClick: t[29] || (t[29] = (...o) => tt(ve) && tt(ve)(...o)),
|
|
2015
|
-
onMouseenter: t[30] || (t[30] = (o) => l.value.style.showTooltips && k("printImage", o, "top")),
|
|
2016
|
-
onMouseleave: y,
|
|
2017
|
-
onFocus: t[31] || (t[31] = (o) => l.value.style.showTooltips && k("printImage", o, "top")),
|
|
2018
|
-
onBlur: y
|
|
2019
|
-
}, [
|
|
2020
|
-
_(oe, {
|
|
2021
|
-
name: "image",
|
|
2022
|
-
stroke: l.value.style.buttons.controls.color,
|
|
2023
|
-
size: 20
|
|
2024
|
-
}, null, 8, ["stroke"]),
|
|
2025
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2026
|
-
key: 0,
|
|
2027
|
-
show: z.value && j.value === "printImage",
|
|
2028
|
-
x: c.value.x,
|
|
2029
|
-
y: c.value.y - 6,
|
|
2030
|
-
placement: "top",
|
|
2031
|
-
styleObject: H.value
|
|
2032
|
-
}, {
|
|
2033
|
-
default: W(() => [
|
|
2034
|
-
R(S(l.value.translations.tooltipImage), 1)
|
|
2035
|
-
]),
|
|
2036
|
-
_: 1
|
|
2037
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2038
|
-
], 36)) : g("", !0),
|
|
2039
|
-
l.value.style.showSave && e.$attrs.onSaveAnnotations ? (f(), Y("button", {
|
|
2040
|
-
key: 2,
|
|
2041
|
-
style: C({
|
|
2042
|
-
background: l.value.style.buttons.controls.backgroundColor,
|
|
2043
|
-
border: l.value.style.buttons.controls.border,
|
|
2044
|
-
color: l.value.style.buttons.controls.color,
|
|
2045
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2046
|
-
cursor: I.value ? "pointer" : "default"
|
|
2047
|
-
}),
|
|
2048
|
-
class: D({ "button-tool": !0, tooltip: !0 }),
|
|
2049
|
-
onClick: Gt,
|
|
2050
|
-
onMouseenter: t[32] || (t[32] = (o) => l.value.style.showTooltips && k("saveAction", o, "top")),
|
|
2051
|
-
onMouseleave: y,
|
|
2052
|
-
onFocus: t[33] || (t[33] = (o) => l.value.style.showTooltips && k("saveAction", o, "top")),
|
|
2053
|
-
onBlur: y
|
|
2054
|
-
}, [
|
|
2055
|
-
_(oe, {
|
|
2056
|
-
name: "save",
|
|
2057
|
-
stroke: l.value.style.buttons.controls.color
|
|
2058
|
-
}, null, 8, ["stroke"]),
|
|
2059
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2060
|
-
key: 0,
|
|
2061
|
-
show: z.value && j.value === "saveAction",
|
|
2062
|
-
x: c.value.x,
|
|
2063
|
-
y: c.value.y - 6,
|
|
2064
|
-
placement: "top",
|
|
2065
|
-
styleObject: H.value
|
|
2066
|
-
}, {
|
|
2067
|
-
default: W(() => [
|
|
2068
|
-
R(S(l.value.translations.tooltipSave), 1)
|
|
2069
|
-
]),
|
|
2070
|
-
_: 1
|
|
2071
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2072
|
-
], 36)) : g("", !0)
|
|
2073
|
-
], 4),
|
|
2074
|
-
r("div", wl, [
|
|
2075
|
-
r("button", {
|
|
2076
|
-
class: D({
|
|
2077
|
-
"button-tool": !0,
|
|
2078
|
-
"button-tool--selected": s.value === "circle",
|
|
2079
|
-
tooltip: !0
|
|
2080
|
-
}),
|
|
2081
|
-
style: C({
|
|
2082
|
-
background: s.value === "circle" ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2083
|
-
border: s.value === "circle" ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2084
|
-
color: s.value === "circle" ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2085
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2086
|
-
cursor: I.value ? "pointer" : "default"
|
|
2087
|
-
}),
|
|
2088
|
-
onClick: t[34] || (t[34] = (o) => {
|
|
2089
|
-
Oe("circle"), m.value = !1;
|
|
2090
|
-
}),
|
|
2091
|
-
onMouseenter: t[35] || (t[35] = (o) => l.value.style.showTooltips && k("setCircle", o, "top")),
|
|
2092
|
-
onMouseleave: y,
|
|
2093
|
-
onFocus: t[36] || (t[36] = (o) => l.value.style.showTooltips && k("setCircle", o, "top")),
|
|
2094
|
-
onBlur: y
|
|
2095
|
-
}, [
|
|
2096
|
-
(f(), Y("svg", ml, [
|
|
2097
|
-
r("circle", {
|
|
2098
|
-
cx: 6,
|
|
2099
|
-
cy: 6,
|
|
2100
|
-
r: "4",
|
|
2101
|
-
fill: N.value.circle.filled ? (s.value === "circle", ie.value + me.value) : "none",
|
|
2102
|
-
stroke: "currentColor"
|
|
2103
|
-
}, null, 8, Tl)
|
|
2104
|
-
])),
|
|
2105
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2106
|
-
key: 0,
|
|
2107
|
-
show: z.value && j.value === "setCircle",
|
|
2108
|
-
x: c.value.x,
|
|
2109
|
-
y: c.value.y - 6,
|
|
2110
|
-
placement: "top",
|
|
2111
|
-
styleObject: H.value
|
|
2112
|
-
}, {
|
|
2113
|
-
default: W(() => [
|
|
2114
|
-
R(S(l.value.translations.tooltipShapeCircle) + " ", 1),
|
|
2115
|
-
t[97] || (t[97] = r("kbd", null, "C", -1))
|
|
2116
|
-
]),
|
|
2117
|
-
_: 1
|
|
2118
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2119
|
-
], 38),
|
|
2120
|
-
s.value === "circle" ? (f(), Y("div", Sl, [
|
|
2121
|
-
r("label", Ml, [
|
|
2122
|
-
R(S(l.value.translations.filled) + " ", 1),
|
|
2123
|
-
ze(r("input", {
|
|
2124
|
-
type: "checkbox",
|
|
2125
|
-
"onUpdate:modelValue": t[37] || (t[37] = (o) => N.value.circle.filled = o),
|
|
2126
|
-
onChange: Yt,
|
|
2127
|
-
checked: N.value.circle.filled,
|
|
2128
|
-
style: C({
|
|
2129
|
-
all: "revert",
|
|
2130
|
-
appearance: "auto",
|
|
2131
|
-
"-webkit-appearance": "auto",
|
|
2132
|
-
accentColor: l.value.style.color + " !important"
|
|
2133
|
-
})
|
|
2134
|
-
}, null, 44, Cl), [
|
|
2135
|
-
[lt, N.value.circle.filled]
|
|
2136
|
-
])
|
|
2137
|
-
])
|
|
2138
|
-
])) : g("", !0),
|
|
2139
|
-
r("button", {
|
|
2140
|
-
class: D({
|
|
2141
|
-
"button-tool": !0,
|
|
2142
|
-
"button-tool--selected": s.value === "rect",
|
|
2143
|
-
tooltip: !0
|
|
2144
|
-
}),
|
|
2145
|
-
style: C({
|
|
2146
|
-
background: s.value === "rect" ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2147
|
-
border: s.value === "rect" ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2148
|
-
color: s.value === "rect" ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2149
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2150
|
-
cursor: I.value ? "pointer" : "default"
|
|
2151
|
-
}),
|
|
2152
|
-
onClick: t[38] || (t[38] = (o) => {
|
|
2153
|
-
Oe("rect"), m.value = !1;
|
|
2154
|
-
}),
|
|
2155
|
-
onMouseenter: t[39] || (t[39] = (o) => l.value.style.showTooltips && k("setRect", o, "top")),
|
|
2156
|
-
onMouseleave: y,
|
|
2157
|
-
onFocus: t[40] || (t[40] = (o) => l.value.style.showTooltips && k("setRect", o, "top")),
|
|
2158
|
-
onBlur: y
|
|
2159
|
-
}, [
|
|
2160
|
-
(f(), Y("svg", hl, [
|
|
2161
|
-
r("rect", {
|
|
2162
|
-
x: "3",
|
|
2163
|
-
y: "3",
|
|
2164
|
-
style: { rx: "0 !important", ry: "0 !important" },
|
|
2165
|
-
height: "6",
|
|
2166
|
-
width: "6",
|
|
2167
|
-
fill: N.value.rect.filled ? (s.value === "rect", ie.value + me.value) : "none",
|
|
2168
|
-
stroke: "currentColor"
|
|
2169
|
-
}, null, 8, Rl)
|
|
2170
|
-
])),
|
|
2171
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2172
|
-
key: 0,
|
|
2173
|
-
show: z.value && j.value === "setRect",
|
|
2174
|
-
x: c.value.x,
|
|
2175
|
-
y: c.value.y - 6,
|
|
2176
|
-
placement: "top",
|
|
2177
|
-
styleObject: H.value
|
|
2178
|
-
}, {
|
|
2179
|
-
default: W(() => [
|
|
2180
|
-
R(S(l.value.translations.tooltipShapeRect) + " ", 1),
|
|
2181
|
-
t[98] || (t[98] = r("kbd", null, "S", -1))
|
|
2182
|
-
]),
|
|
2183
|
-
_: 1
|
|
2184
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2185
|
-
], 38),
|
|
2186
|
-
s.value === "rect" ? (f(), Y("div", Bl, [
|
|
2187
|
-
r("label", Al, [
|
|
2188
|
-
R(S(l.value.translations.filled) + " ", 1),
|
|
2189
|
-
ze(r("input", {
|
|
2190
|
-
type: "checkbox",
|
|
2191
|
-
"onUpdate:modelValue": t[41] || (t[41] = (o) => N.value.rect.filled = o),
|
|
2192
|
-
onChange: Lt,
|
|
2193
|
-
checked: N.value.rect.filled,
|
|
2194
|
-
style: C({
|
|
2195
|
-
all: "revert",
|
|
2196
|
-
appearance: "auto",
|
|
2197
|
-
"-webkit-appearance": "auto",
|
|
2198
|
-
accentColor: l.value.style.color + " !important"
|
|
2199
|
-
})
|
|
2200
|
-
}, null, 44, Ol), [
|
|
2201
|
-
[lt, N.value.rect.filled]
|
|
2202
|
-
])
|
|
2203
|
-
])
|
|
2204
|
-
])) : g("", !0),
|
|
2205
|
-
r("button", {
|
|
2206
|
-
class: D({
|
|
2207
|
-
"button-tool": !0,
|
|
2208
|
-
"button-tool--selected": s.value === "arrow",
|
|
2209
|
-
tooltip: !0
|
|
2210
|
-
}),
|
|
2211
|
-
style: C({
|
|
2212
|
-
background: s.value === "arrow" ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2213
|
-
border: s.value === "arrow" ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2214
|
-
color: s.value === "arrow" ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2215
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2216
|
-
cursor: I.value ? "pointer" : "default"
|
|
2217
|
-
}),
|
|
2218
|
-
onClick: t[42] || (t[42] = (o) => {
|
|
2219
|
-
Oe("arrow"), m.value = !1;
|
|
2220
|
-
}),
|
|
2221
|
-
onMouseenter: t[43] || (t[43] = (o) => l.value.style.showTooltips && k("setArrow", o, "top")),
|
|
2222
|
-
onMouseleave: y,
|
|
2223
|
-
onFocus: t[44] || (t[44] = (o) => l.value.style.showTooltips && k("setArrow", o, "top")),
|
|
2224
|
-
onBlur: y
|
|
2225
|
-
}, [
|
|
2226
|
-
(f(), Y("svg", zl, [
|
|
2227
|
-
r("path", {
|
|
2228
|
-
stroke: N.value.arrow.filled ? s.value === "arrow" ? "white" : "grey" : "none",
|
|
2229
|
-
"stroke-width": "2",
|
|
2230
|
-
d: "M5,19 19,5 14,5 19,10.5 19,5",
|
|
2231
|
-
fill: "none",
|
|
2232
|
-
"stroke-linecap": "round",
|
|
2233
|
-
"stroke-linejoin": "round"
|
|
2234
|
-
}, null, 8, jl)
|
|
2235
|
-
])),
|
|
2236
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2237
|
-
key: 0,
|
|
2238
|
-
show: z.value && j.value === "setArrow",
|
|
2239
|
-
x: c.value.x,
|
|
2240
|
-
y: c.value.y - 6,
|
|
2241
|
-
placement: "top",
|
|
2242
|
-
styleObject: H.value
|
|
2243
|
-
}, {
|
|
2244
|
-
default: W(() => [
|
|
2245
|
-
R(S(l.value.translations.tooltipShapeArrow) + " ", 1),
|
|
2246
|
-
t[99] || (t[99] = r("kbd", null, "A", -1))
|
|
2247
|
-
]),
|
|
2248
|
-
_: 1
|
|
2249
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2250
|
-
], 38),
|
|
2251
|
-
r("button", {
|
|
2252
|
-
class: D({
|
|
2253
|
-
"button-tool": !0,
|
|
2254
|
-
"button-tool--selected": s.value === "line",
|
|
2255
|
-
tooltip: !0
|
|
2256
|
-
}),
|
|
2257
|
-
style: C({
|
|
2258
|
-
background: s.value === "line" ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2259
|
-
border: s.value === "line" ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2260
|
-
color: s.value === "line" ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2261
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2262
|
-
cursor: I.value ? "pointer" : "default"
|
|
2263
|
-
}),
|
|
2264
|
-
onClick: t[45] || (t[45] = (o) => {
|
|
2265
|
-
Oe("line"), m.value = !1;
|
|
2266
|
-
}),
|
|
2267
|
-
onMouseenter: t[46] || (t[46] = (o) => l.value.style.showTooltips && k("setFreehand", o, "top")),
|
|
2268
|
-
onMouseleave: y,
|
|
2269
|
-
onFocus: t[47] || (t[47] = (o) => l.value.style.showTooltips && k("setFreehand", o, "top")),
|
|
2270
|
-
onBlur: y
|
|
2271
|
-
}, [
|
|
2272
|
-
t[101] || (t[101] = r("svg", {
|
|
2273
|
-
width: "80%",
|
|
2274
|
-
viewBox: "0 0 24 24",
|
|
2275
|
-
"stroke-width": "2",
|
|
2276
|
-
stroke: "currentColor",
|
|
2277
|
-
fill: "none",
|
|
2278
|
-
"stroke-linecap": "round",
|
|
2279
|
-
"stroke-linejoin": "round"
|
|
2280
|
-
}, [
|
|
2281
|
-
r("path", {
|
|
2282
|
-
stroke: "none",
|
|
2283
|
-
d: "M0 0h24v24H0z",
|
|
2284
|
-
fill: "none"
|
|
2285
|
-
}),
|
|
2286
|
-
r("path", { d: "M3 15c2 3 4 4 7 4s7 -3 7 -7s-3 -7 -6 -7s-5 1.5 -5 4s2 5 6 5s8.408 -2.453 10 -5" })
|
|
2287
|
-
], -1)),
|
|
2288
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2289
|
-
key: 0,
|
|
2290
|
-
show: z.value && j.value === "setFreehand",
|
|
2291
|
-
x: c.value.x,
|
|
2292
|
-
y: c.value.y - 6,
|
|
2293
|
-
placement: "top",
|
|
2294
|
-
styleObject: H.value
|
|
2295
|
-
}, {
|
|
2296
|
-
default: W(() => [
|
|
2297
|
-
R(S(l.value.translations.tooltipShapeFreehand) + " ", 1),
|
|
2298
|
-
t[100] || (t[100] = r("kbd", null, "L", -1))
|
|
2299
|
-
]),
|
|
2300
|
-
_: 1
|
|
2301
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2302
|
-
], 38),
|
|
2303
|
-
["arrow", "circle", "rect", "line"].includes(
|
|
2304
|
-
s.value
|
|
2305
|
-
) ? (f(), Y("div", Wl, [
|
|
2306
|
-
r("div", Dl, [
|
|
2307
|
-
r("label", Fl, [
|
|
2308
|
-
R(S(l.value.translations.thickness) + " ", 1),
|
|
2309
|
-
ze(r("input", {
|
|
2310
|
-
type: "number",
|
|
2311
|
-
"onUpdate:modelValue": t[48] || (t[48] = (o) => ee.value = o),
|
|
2312
|
-
onInput: Nt,
|
|
2313
|
-
min: 1,
|
|
2314
|
-
style: { padding: "0 4px", width: "40px", border: "1px solid #dadada", "border-radius": "3px" }
|
|
2315
|
-
}, null, 544), [
|
|
2316
|
-
[ot, ee.value]
|
|
2317
|
-
])
|
|
2318
|
-
])
|
|
2319
|
-
])
|
|
2320
|
-
])) : g("", !0),
|
|
2321
|
-
["arrow", "circle", "rect"].includes(
|
|
2322
|
-
s.value
|
|
2323
|
-
) ? (f(), Y("div", Il, [
|
|
2324
|
-
r("div", Pl, [
|
|
2325
|
-
r("label", El, [
|
|
2326
|
-
R(S(l.value.translations.dashedLines) + " ", 1),
|
|
2327
|
-
(f(), Y("svg", Hl, [...t[102] || (t[102] = [
|
|
2328
|
-
r("line", {
|
|
2329
|
-
x1: "0",
|
|
2330
|
-
x2: "24",
|
|
2331
|
-
y1: "12",
|
|
2332
|
-
y2: "12",
|
|
2333
|
-
"stroke-width": "2",
|
|
2334
|
-
stroke: "black",
|
|
2335
|
-
"stroke-dasharray": "3"
|
|
2336
|
-
}, null, -1)
|
|
2337
|
-
])])),
|
|
2338
|
-
ze(r("input", {
|
|
2339
|
-
name: "dashStyle",
|
|
2340
|
-
type: "checkbox",
|
|
2341
|
-
"onUpdate:modelValue": t[49] || (t[49] = (o) => ue.value = o),
|
|
2342
|
-
onChange: Xt,
|
|
2343
|
-
checked: ue.value,
|
|
2344
|
-
style: C({
|
|
2345
|
-
all: "revert",
|
|
2346
|
-
appearance: "auto",
|
|
2347
|
-
"-webkit-appearance": "auto",
|
|
2348
|
-
accentColor: l.value.style.color + " !important"
|
|
2349
|
-
})
|
|
2350
|
-
}, null, 44, Ll), [
|
|
2351
|
-
[lt, ue.value]
|
|
2352
|
-
])
|
|
2353
|
-
])
|
|
2354
|
-
])
|
|
2355
|
-
])) : g("", !0),
|
|
2356
|
-
r("button", {
|
|
2357
|
-
class: D({
|
|
2358
|
-
"button-tool": !0,
|
|
2359
|
-
"button-tool--selected": M.value,
|
|
2360
|
-
tooltip: !0
|
|
2361
|
-
}),
|
|
2362
|
-
style: C({
|
|
2363
|
-
background: M.value ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2364
|
-
border: M.value ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2365
|
-
color: M.value ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2366
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2367
|
-
cursor: I.value ? "pointer" : "default"
|
|
2368
|
-
}),
|
|
2369
|
-
onClick: t[50] || (t[50] = (o) => {
|
|
2370
|
-
Se(), M.value = !M.value, $.value = !1, T.value = !1, w.value = !1, m.value = !1, B.value = !1, s.value = void 0;
|
|
2371
|
-
}),
|
|
2372
|
-
onMouseenter: t[51] || (t[51] = (o) => l.value.style.showTooltips && k("setText", o, "top")),
|
|
2373
|
-
onMouseleave: y,
|
|
2374
|
-
onFocus: t[52] || (t[52] = (o) => l.value.style.showTooltips && k("setText", o, "top")),
|
|
2375
|
-
onBlur: y
|
|
2376
|
-
}, [
|
|
2377
|
-
_(oe, {
|
|
2378
|
-
name: "text",
|
|
2379
|
-
stroke: M.value ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color
|
|
2380
|
-
}, null, 8, ["stroke"]),
|
|
2381
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2382
|
-
key: 0,
|
|
2383
|
-
show: z.value && j.value === "setText",
|
|
2384
|
-
x: c.value.x,
|
|
2385
|
-
y: c.value.y - 6,
|
|
2386
|
-
placement: "top",
|
|
2387
|
-
styleObject: H.value
|
|
2388
|
-
}, {
|
|
2389
|
-
default: W(() => [
|
|
2390
|
-
R(S(l.value.translations.tooltipShapeText) + " ", 1),
|
|
2391
|
-
t[103] || (t[103] = r("kbd", null, "T", -1))
|
|
2392
|
-
]),
|
|
2393
|
-
_: 1
|
|
2394
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2395
|
-
], 38),
|
|
2396
|
-
M.value ? (f(), Y("div", Yl, [
|
|
2397
|
-
r("div", Xl, [
|
|
2398
|
-
r("label", Ul, [
|
|
2399
|
-
R(S(l.value.translations.fontSize) + " ", 1),
|
|
2400
|
-
ze(r("input", {
|
|
2401
|
-
type: "number",
|
|
2402
|
-
"onUpdate:modelValue": t[53] || (t[53] = (o) => Ee.value = o),
|
|
2403
|
-
onInput: De,
|
|
2404
|
-
style: { padding: "0 4px", width: "40px", border: "1px solid #dadada", "border-radius": "3px" }
|
|
2405
|
-
}, null, 544), [
|
|
2406
|
-
[ot, Ee.value]
|
|
2407
|
-
])
|
|
2408
|
-
])
|
|
2409
|
-
])
|
|
2410
|
-
])) : g("", !0),
|
|
2411
|
-
M.value ? (f(), Y("div", Nl, [
|
|
2412
|
-
r("button", {
|
|
2413
|
-
class: D({
|
|
2414
|
-
"button-tool": !0,
|
|
2415
|
-
"button-tool--selected": Z.value === "start",
|
|
2416
|
-
tooltip: !0
|
|
2417
|
-
}),
|
|
2418
|
-
style: C({
|
|
2419
|
-
background: Z.value === "start" ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2420
|
-
border: Z.value === "start" ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2421
|
-
color: Z.value === "start" ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2422
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2423
|
-
cursor: I.value ? "pointer" : "default"
|
|
2424
|
-
}),
|
|
2425
|
-
onClick: t[54] || (t[54] = (o) => {
|
|
2426
|
-
$.value = !1, T.value = !1, w.value = !1, B.value = !1, m.value = !1, s.value = void 0, Z.value = "start", Ue("start");
|
|
2427
|
-
}),
|
|
2428
|
-
onMouseenter: t[55] || (t[55] = (o) => l.value.style.showTooltips && k(
|
|
2429
|
-
"setAlignStart",
|
|
2430
|
-
o,
|
|
2431
|
-
"top"
|
|
2432
|
-
)),
|
|
2433
|
-
onMouseleave: y,
|
|
2434
|
-
onFocus: t[56] || (t[56] = (o) => l.value.style.showTooltips && k(
|
|
2435
|
-
"setAlignStart",
|
|
2436
|
-
o,
|
|
2437
|
-
"top"
|
|
2438
|
-
)),
|
|
2439
|
-
onBlur: y
|
|
2440
|
-
}, [
|
|
2441
|
-
t[104] || (t[104] = r("svg", {
|
|
2442
|
-
width: "80%",
|
|
2443
|
-
viewBox: "0 0 24 24",
|
|
2444
|
-
"stroke-width": "2",
|
|
2445
|
-
stroke: "currentColor",
|
|
2446
|
-
fill: "none",
|
|
2447
|
-
"stroke-linecap": "round",
|
|
2448
|
-
"stroke-linejoin": "round"
|
|
2449
|
-
}, [
|
|
2450
|
-
r("path", {
|
|
2451
|
-
stroke: "none",
|
|
2452
|
-
d: "M0 0h24v24H0z",
|
|
2453
|
-
fill: "none"
|
|
2454
|
-
}),
|
|
2455
|
-
r("path", { d: "M4 6l16 0" }),
|
|
2456
|
-
r("path", { d: "M4 12l10 0" }),
|
|
2457
|
-
r("path", { d: "M4 18l14 0" })
|
|
2458
|
-
], -1)),
|
|
2459
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2460
|
-
key: 0,
|
|
2461
|
-
show: z.value && j.value === "setAlignStart",
|
|
2462
|
-
x: c.value.x,
|
|
2463
|
-
y: c.value.y - 6,
|
|
2464
|
-
placement: "top",
|
|
2465
|
-
styleObject: H.value
|
|
2466
|
-
}, {
|
|
2467
|
-
default: W(() => [
|
|
2468
|
-
R(S(l.value.translations.tooltipShapeTextLeft), 1)
|
|
2469
|
-
]),
|
|
2470
|
-
_: 1
|
|
2471
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2472
|
-
], 38)
|
|
2473
|
-
])) : g("", !0),
|
|
2474
|
-
M.value ? (f(), Y("div", Vl, [
|
|
2475
|
-
r("button", {
|
|
2476
|
-
class: D({
|
|
2477
|
-
"button-tool": !0,
|
|
2478
|
-
"button-tool--selected": Z.value === "middle",
|
|
2479
|
-
tooltip: !0
|
|
2480
|
-
}),
|
|
2481
|
-
style: C({
|
|
2482
|
-
background: Z.value === "middle" ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2483
|
-
border: Z.value === "middle" ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2484
|
-
color: Z.value === "middle" ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2485
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2486
|
-
cursor: I.value ? "pointer" : "default"
|
|
2487
|
-
}),
|
|
2488
|
-
disabled: le.value,
|
|
2489
|
-
onClick: t[57] || (t[57] = (o) => {
|
|
2490
|
-
$.value = !1, T.value = !1, w.value = !1, B.value = !1, m.value = !1, s.value = void 0, Z.value = "middle", Ue("middle");
|
|
2491
|
-
}),
|
|
2492
|
-
onMouseenter: t[58] || (t[58] = (o) => l.value.style.showTooltips && k(
|
|
2493
|
-
"setAlignMiddle",
|
|
2494
|
-
o,
|
|
2495
|
-
"top"
|
|
2496
|
-
)),
|
|
2497
|
-
onMouseleave: y,
|
|
2498
|
-
onFocus: t[59] || (t[59] = (o) => l.value.style.showTooltips && k(
|
|
2499
|
-
"setAlignMiddle",
|
|
2500
|
-
o,
|
|
2501
|
-
"top"
|
|
2502
|
-
)),
|
|
2503
|
-
onBlur: y
|
|
2504
|
-
}, [
|
|
2505
|
-
t[105] || (t[105] = r("svg", {
|
|
2506
|
-
width: "80%",
|
|
2507
|
-
viewBox: "0 0 24 24",
|
|
2508
|
-
"stroke-width": "2",
|
|
2509
|
-
stroke: "currentColor",
|
|
2510
|
-
fill: "none",
|
|
2511
|
-
"stroke-linecap": "round",
|
|
2512
|
-
"stroke-linejoin": "round"
|
|
2513
|
-
}, [
|
|
2514
|
-
r("path", {
|
|
2515
|
-
stroke: "none",
|
|
2516
|
-
d: "M0 0h24v24H0z",
|
|
2517
|
-
fill: "none"
|
|
2518
|
-
}),
|
|
2519
|
-
r("path", { d: "M4 6l16 0" }),
|
|
2520
|
-
r("path", { d: "M8 12l8 0" }),
|
|
2521
|
-
r("path", { d: "M6 18l12 0" })
|
|
2522
|
-
], -1)),
|
|
2523
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2524
|
-
key: 0,
|
|
2525
|
-
show: z.value && j.value === "setAlignMiddle",
|
|
2526
|
-
x: c.value.x,
|
|
2527
|
-
y: c.value.y - 6,
|
|
2528
|
-
placement: "top",
|
|
2529
|
-
styleObject: H.value
|
|
2530
|
-
}, {
|
|
2531
|
-
default: W(() => [
|
|
2532
|
-
R(S(l.value.translations.tooltipShapeTextCenter), 1)
|
|
2533
|
-
]),
|
|
2534
|
-
_: 1
|
|
2535
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2536
|
-
], 46, Gl)
|
|
2537
|
-
])) : g("", !0),
|
|
2538
|
-
M.value ? (f(), Y("div", Kl, [
|
|
2539
|
-
r("button", {
|
|
2540
|
-
class: D({
|
|
2541
|
-
"button-tool": !0,
|
|
2542
|
-
"button-tool--selected": Z.value === "end",
|
|
2543
|
-
tooltip: !0
|
|
2544
|
-
}),
|
|
2545
|
-
style: C({
|
|
2546
|
-
background: Z.value === "end" ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2547
|
-
border: Z.value === "end" ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2548
|
-
color: Z.value === "end" ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2549
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2550
|
-
cursor: I.value ? "pointer" : "default"
|
|
2551
|
-
}),
|
|
2552
|
-
disabled: le.value,
|
|
2553
|
-
onClick: t[60] || (t[60] = (o) => {
|
|
2554
|
-
$.value = !1, T.value = !1, w.value = !1, B.value = !1, m.value = !1, s.value = void 0, Z.value = "end", Ue("end");
|
|
2555
|
-
}),
|
|
2556
|
-
onMouseenter: t[61] || (t[61] = (o) => l.value.style.showTooltips && k("setAlignEnd", o, "top")),
|
|
2557
|
-
onMouseleave: y,
|
|
2558
|
-
onFocus: t[62] || (t[62] = (o) => l.value.style.showTooltips && k("setAlignEnd", o, "top")),
|
|
2559
|
-
onBlur: y
|
|
2560
|
-
}, [
|
|
2561
|
-
t[106] || (t[106] = r("svg", {
|
|
2562
|
-
width: "80%",
|
|
2563
|
-
viewBox: "0 0 24 24",
|
|
2564
|
-
"stroke-width": "2",
|
|
2565
|
-
stroke: "currentColor",
|
|
2566
|
-
fill: "none",
|
|
2567
|
-
"stroke-linecap": "round",
|
|
2568
|
-
"stroke-linejoin": "round"
|
|
2569
|
-
}, [
|
|
2570
|
-
r("path", {
|
|
2571
|
-
stroke: "none",
|
|
2572
|
-
d: "M0 0h24v24H0z",
|
|
2573
|
-
fill: "none"
|
|
2574
|
-
}),
|
|
2575
|
-
r("path", { d: "M4 6l16 0" }),
|
|
2576
|
-
r("path", { d: "M10 12l10 0" }),
|
|
2577
|
-
r("path", { d: "M6 18l14 0" })
|
|
2578
|
-
], -1)),
|
|
2579
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2580
|
-
key: 0,
|
|
2581
|
-
show: z.value && j.value === "setAlignEnd",
|
|
2582
|
-
x: c.value.x,
|
|
2583
|
-
y: c.value.y - 6,
|
|
2584
|
-
placement: "top",
|
|
2585
|
-
styleObject: H.value
|
|
2586
|
-
}, {
|
|
2587
|
-
default: W(() => [
|
|
2588
|
-
R(S(l.value.translations.tooltipShapeTextRight), 1)
|
|
2589
|
-
]),
|
|
2590
|
-
_: 1
|
|
2591
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2592
|
-
], 46, ql)
|
|
2593
|
-
])) : g("", !0),
|
|
2594
|
-
M.value ? (f(), Y("div", Jl, [
|
|
2595
|
-
r("button", {
|
|
2596
|
-
class: D({
|
|
2597
|
-
"button-tool": !0,
|
|
2598
|
-
"button-tool--selected": le.value,
|
|
2599
|
-
tooltip: !0
|
|
2600
|
-
}),
|
|
2601
|
-
style: C({
|
|
2602
|
-
background: le.value ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2603
|
-
border: le.value ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2604
|
-
color: le.value ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2605
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2606
|
-
cursor: I.value ? "pointer" : "default"
|
|
2607
|
-
}),
|
|
2608
|
-
onClick: t[63] || (t[63] = (o) => {
|
|
2609
|
-
$.value = !1, T.value = !1, w.value = !1, B.value = !1, m.value = !1, s.value = void 0, le.value = !le.value, Z.value = "start", Ue("start"), De();
|
|
2610
|
-
}),
|
|
2611
|
-
onMouseenter: t[64] || (t[64] = (o) => l.value.style.showTooltips && k(
|
|
2612
|
-
"setBulletMode",
|
|
2613
|
-
o,
|
|
2614
|
-
"top"
|
|
2615
|
-
)),
|
|
2616
|
-
onMouseleave: y,
|
|
2617
|
-
onFocus: t[65] || (t[65] = (o) => l.value.style.showTooltips && k(
|
|
2618
|
-
"setBulletMode",
|
|
2619
|
-
o,
|
|
2620
|
-
"top"
|
|
2621
|
-
)),
|
|
2622
|
-
onBlur: y
|
|
2623
|
-
}, [
|
|
2624
|
-
t[107] || (t[107] = r("svg", {
|
|
2625
|
-
width: "100%",
|
|
2626
|
-
viewBox: "0 0 24 24",
|
|
2627
|
-
"stroke-width": "2",
|
|
2628
|
-
stroke: "currentColor",
|
|
2629
|
-
fill: "none",
|
|
2630
|
-
"stroke-linecap": "round",
|
|
2631
|
-
"stroke-linejoin": "round"
|
|
2632
|
-
}, [
|
|
2633
|
-
r("path", {
|
|
2634
|
-
stroke: "none",
|
|
2635
|
-
d: "M0 0h24v24H0z",
|
|
2636
|
-
fill: "none"
|
|
2637
|
-
}),
|
|
2638
|
-
r("path", { d: "M9 6l11 0" }),
|
|
2639
|
-
r("path", { d: "M9 12l11 0" }),
|
|
2640
|
-
r("path", { d: "M9 18l11 0" }),
|
|
2641
|
-
r("path", { d: "M5 6l0 .01" }),
|
|
2642
|
-
r("path", { d: "M5 12l0 .01" }),
|
|
2643
|
-
r("path", { d: "M5 18l0 .01" })
|
|
2644
|
-
], -1)),
|
|
2645
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2646
|
-
key: 0,
|
|
2647
|
-
show: z.value && j.value === "setBulletMode",
|
|
2648
|
-
x: c.value.x,
|
|
2649
|
-
y: c.value.y - 6,
|
|
2650
|
-
placement: "top",
|
|
2651
|
-
styleObject: H.value
|
|
2652
|
-
}, {
|
|
2653
|
-
default: W(() => [
|
|
2654
|
-
R(S(l.value.translations.tooltipShapeTextBullet), 1)
|
|
2655
|
-
]),
|
|
2656
|
-
_: 1
|
|
2657
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2658
|
-
], 38)
|
|
2659
|
-
])) : g("", !0),
|
|
2660
|
-
M.value ? (f(), Y("div", Zl, [
|
|
2661
|
-
r("button", {
|
|
2662
|
-
class: D({
|
|
2663
|
-
"button-tool": !0,
|
|
2664
|
-
"button-tool--selected": te.value,
|
|
2665
|
-
tooltip: !0
|
|
2666
|
-
}),
|
|
2667
|
-
style: C({
|
|
2668
|
-
background: te.value ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2669
|
-
border: te.value ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2670
|
-
color: te.value ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2671
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2672
|
-
cursor: I.value ? "pointer" : "default"
|
|
2673
|
-
}),
|
|
2674
|
-
onClick: t[66] || (t[66] = (o) => {
|
|
2675
|
-
$.value = !1, T.value = !1, w.value = !1, B.value = !1, m.value = !1, s.value = void 0, te.value = !te.value, De();
|
|
2676
|
-
}),
|
|
2677
|
-
onMouseenter: t[67] || (t[67] = (o) => l.value.style.showTooltips && k("setBold", o, "top")),
|
|
2678
|
-
onMouseleave: y,
|
|
2679
|
-
onFocus: t[68] || (t[68] = (o) => l.value.style.showTooltips && k("setBold", o, "top")),
|
|
2680
|
-
onBlur: y
|
|
2681
|
-
}, [
|
|
2682
|
-
t[108] || (t[108] = r("svg", {
|
|
2683
|
-
width: "100%",
|
|
2684
|
-
viewBox: "0 0 24 24",
|
|
2685
|
-
"stroke-width": "3",
|
|
2686
|
-
stroke: "currentColor",
|
|
2687
|
-
fill: "none",
|
|
2688
|
-
"stroke-linecap": "round",
|
|
2689
|
-
"stroke-linejoin": "round"
|
|
2690
|
-
}, [
|
|
2691
|
-
r("path", {
|
|
2692
|
-
stroke: "none",
|
|
2693
|
-
d: "M0 0h24v24H0z",
|
|
2694
|
-
fill: "none"
|
|
2695
|
-
}),
|
|
2696
|
-
r("path", { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" }),
|
|
2697
|
-
r("path", { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" })
|
|
2698
|
-
], -1)),
|
|
2699
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2700
|
-
key: 0,
|
|
2701
|
-
show: z.value && j.value === "setBold",
|
|
2702
|
-
x: c.value.x,
|
|
2703
|
-
y: c.value.y - 6,
|
|
2704
|
-
placement: "top",
|
|
2705
|
-
styleObject: H.value
|
|
2706
|
-
}, {
|
|
2707
|
-
default: W(() => [
|
|
2708
|
-
R(S(l.value.translations.tooltipShapeTextBold), 1)
|
|
2709
|
-
]),
|
|
2710
|
-
_: 1
|
|
2711
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2712
|
-
], 38)
|
|
2713
|
-
])) : g("", !0),
|
|
2714
|
-
M.value ? (f(), Y("div", Ql, [
|
|
2715
|
-
r("button", {
|
|
2716
|
-
class: D({
|
|
2717
|
-
"button-tool": !0,
|
|
2718
|
-
"button-tool--selected": U.value,
|
|
2719
|
-
tooltip: !0
|
|
2720
|
-
}),
|
|
2721
|
-
style: C({
|
|
2722
|
-
background: U.value ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2723
|
-
border: U.value ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2724
|
-
color: U.value ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2725
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2726
|
-
cursor: I.value ? "pointer" : "default"
|
|
2727
|
-
}),
|
|
2728
|
-
onClick: t[69] || (t[69] = (o) => {
|
|
2729
|
-
$.value = !1, T.value = !1, w.value = !1, B.value = !1, m.value = !1, s.value = void 0, U.value = !U.value, De();
|
|
2730
|
-
}),
|
|
2731
|
-
onMouseenter: t[70] || (t[70] = (o) => l.value.style.showTooltips && k("setItalic", o, "top")),
|
|
2732
|
-
onMouseleave: y,
|
|
2733
|
-
onFocus: t[71] || (t[71] = (o) => l.value.style.showTooltips && k("setItalic", o, "top")),
|
|
2734
|
-
onBlur: y
|
|
2735
|
-
}, [
|
|
2736
|
-
t[109] || (t[109] = r("svg", {
|
|
2737
|
-
width: "100%",
|
|
2738
|
-
height: "44",
|
|
2739
|
-
viewBox: "0 0 24 24",
|
|
2740
|
-
"stroke-width": "2",
|
|
2741
|
-
stroke: "currentColor",
|
|
2742
|
-
fill: "none",
|
|
2743
|
-
"stroke-linecap": "round",
|
|
2744
|
-
"stroke-linejoin": "round"
|
|
2745
|
-
}, [
|
|
2746
|
-
r("path", {
|
|
2747
|
-
stroke: "none",
|
|
2748
|
-
d: "M0 0h24v24H0z",
|
|
2749
|
-
fill: "none"
|
|
2750
|
-
}),
|
|
2751
|
-
r("path", { d: "M11 5l6 0" }),
|
|
2752
|
-
r("path", { d: "M7 19l6 0" }),
|
|
2753
|
-
r("path", { d: "M14 5l-4 14" })
|
|
2754
|
-
], -1)),
|
|
2755
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2756
|
-
key: 0,
|
|
2757
|
-
show: z.value && j.value === "setItalic",
|
|
2758
|
-
x: c.value.x,
|
|
2759
|
-
y: c.value.y - 6,
|
|
2760
|
-
placement: "top",
|
|
2761
|
-
styleObject: H.value
|
|
2762
|
-
}, {
|
|
2763
|
-
default: W(() => [
|
|
2764
|
-
R(S(l.value.translations.tooltipShapeTextItalic), 1)
|
|
2765
|
-
]),
|
|
2766
|
-
_: 1
|
|
2767
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2768
|
-
], 38)
|
|
2769
|
-
])) : g("", !0),
|
|
2770
|
-
M.value ? (f(), Y("div", _l, [
|
|
2771
|
-
r("button", {
|
|
2772
|
-
class: D({
|
|
2773
|
-
"button-tool": !0,
|
|
2774
|
-
"button-tool--selected": be.value,
|
|
2775
|
-
tooltip: !0
|
|
2776
|
-
}),
|
|
2777
|
-
style: C({
|
|
2778
|
-
background: be.value ? l.value.style.buttons.shapes.selected.backgroundColor : l.value.style.buttons.shapes.backgroundColor,
|
|
2779
|
-
border: be.value ? l.value.style.buttons.shapes.selected.border : l.value.style.buttons.shapes.border,
|
|
2780
|
-
color: be.value ? l.value.style.buttons.shapes.selected.color : l.value.style.buttons.shapes.color,
|
|
2781
|
-
borderRadius: `${l.value.style.buttons.borderRadius}px`,
|
|
2782
|
-
cursor: I.value ? "pointer" : "default"
|
|
2783
|
-
}),
|
|
2784
|
-
onClick: t[72] || (t[72] = (o) => {
|
|
2785
|
-
$.value = !1, T.value = !1, w.value = !1, B.value = !1, m.value = !1, s.value = void 0, be.value = !be.value, De();
|
|
2786
|
-
}),
|
|
2787
|
-
onMouseenter: t[73] || (t[73] = (o) => l.value.style.showTooltips && k(
|
|
2788
|
-
"setUnderline",
|
|
2789
|
-
o,
|
|
2790
|
-
"top"
|
|
2791
|
-
)),
|
|
2792
|
-
onMouseleave: y,
|
|
2793
|
-
onFocus: t[74] || (t[74] = (o) => l.value.style.showTooltips && k(
|
|
2794
|
-
"setUnderline",
|
|
2795
|
-
o,
|
|
2796
|
-
"top"
|
|
2797
|
-
)),
|
|
2798
|
-
onBlur: y
|
|
2799
|
-
}, [
|
|
2800
|
-
t[110] || (t[110] = r("svg", {
|
|
2801
|
-
width: "100%",
|
|
2802
|
-
viewBox: "0 0 24 24",
|
|
2803
|
-
"stroke-width": "2",
|
|
2804
|
-
stroke: "currentColor",
|
|
2805
|
-
fill: "none",
|
|
2806
|
-
"stroke-linecap": "round",
|
|
2807
|
-
"stroke-linejoin": "round"
|
|
2808
|
-
}, [
|
|
2809
|
-
r("path", {
|
|
2810
|
-
stroke: "none",
|
|
2811
|
-
d: "M0 0h24v24H0z",
|
|
2812
|
-
fill: "none"
|
|
2813
|
-
}),
|
|
2814
|
-
r("path", { d: "M7 5v5a5 5 0 0 0 10 0v-5" }),
|
|
2815
|
-
r("path", { d: "M5 19h14" })
|
|
2816
|
-
], -1)),
|
|
2817
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2818
|
-
key: 0,
|
|
2819
|
-
show: z.value && j.value === "setUnderline",
|
|
2820
|
-
x: c.value.x,
|
|
2821
|
-
y: c.value.y - 6,
|
|
2822
|
-
placement: "top",
|
|
2823
|
-
styleObject: H.value
|
|
2824
|
-
}, {
|
|
2825
|
-
default: W(() => [
|
|
2826
|
-
R(S(l.value.translations.tooltipShapeTextUnderline), 1)
|
|
2827
|
-
]),
|
|
2828
|
-
_: 1
|
|
2829
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2830
|
-
], 38)
|
|
2831
|
-
])) : g("", !0),
|
|
2832
|
-
r("div", eo, [
|
|
2833
|
-
r("button", {
|
|
2834
|
-
class: D({
|
|
2835
|
-
"button-tool": !0,
|
|
2836
|
-
tooltip: !0
|
|
2837
|
-
}),
|
|
2838
|
-
style: {
|
|
2839
|
-
borderRadius: "6px"
|
|
2840
|
-
},
|
|
2841
|
-
onMouseenter: t[76] || (t[76] = (o) => l.value.style.showTooltips && k("setColor", o, "top")),
|
|
2842
|
-
onMouseleave: y,
|
|
2843
|
-
onFocus: t[77] || (t[77] = (o) => l.value.style.showTooltips && k("setColor", o, "top")),
|
|
2844
|
-
onBlur: y
|
|
2845
|
-
}, [
|
|
2846
|
-
_(nl, {
|
|
2847
|
-
value: ie.value,
|
|
2848
|
-
"onUpdate:value": t[75] || (t[75] = (o) => ie.value = o),
|
|
2849
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
2850
|
-
buttonBorderColor: l.value.style.color,
|
|
2851
|
-
isCursorPointer: I.value,
|
|
2852
|
-
teleported: ""
|
|
2853
|
-
}, null, 8, ["value", "backgroundColor", "buttonBorderColor", "isCursorPointer"])
|
|
2854
|
-
], 32),
|
|
2855
|
-
l.value.style.showTooltips ? (f(), E(L, {
|
|
2856
|
-
key: 0,
|
|
2857
|
-
show: z.value && j.value === "setColor",
|
|
2858
|
-
x: c.value.x,
|
|
2859
|
-
y: c.value.y - 6,
|
|
2860
|
-
placement: "top",
|
|
2861
|
-
styleObject: H.value
|
|
2862
|
-
}, {
|
|
2863
|
-
default: W(() => [
|
|
2864
|
-
R(S(l.value.translations.tooltipShapeColor), 1)
|
|
2865
|
-
]),
|
|
2866
|
-
_: 1
|
|
2867
|
-
}, 8, ["show", "x", "y", "styleObject"])) : g("", !0)
|
|
2868
|
-
]),
|
|
2869
|
-
r("div", to, [
|
|
2870
|
-
r("label", lo, [
|
|
2871
|
-
R(S(l.value.translations.colorAlpha) + ": " + S(Be.value > 98 ? 100 : Be.value) + " % ", 1),
|
|
2872
|
-
ze(r("input", {
|
|
2873
|
-
name: "colorTransparency",
|
|
2874
|
-
type: "range",
|
|
2875
|
-
"onUpdate:modelValue": t[78] || (t[78] = (o) => Be.value = o),
|
|
2876
|
-
onInput: Ut,
|
|
2877
|
-
min: 0,
|
|
2878
|
-
max: 100,
|
|
2879
|
-
style: C({
|
|
2880
|
-
width: "100%",
|
|
2881
|
-
accentColor: l.value.style.color + " !important"
|
|
2882
|
-
})
|
|
2883
|
-
}, null, 36), [
|
|
2884
|
-
[ot, Be.value]
|
|
2885
|
-
])
|
|
2886
|
-
])
|
|
2887
|
-
])
|
|
2888
|
-
])
|
|
2889
|
-
]),
|
|
2890
|
-
_: 1
|
|
2891
|
-
}, 8, ["config"])
|
|
2892
|
-
]),
|
|
2893
|
-
r("div", {
|
|
2894
|
-
class: "annotator annotator__wrapper",
|
|
2895
|
-
ref_key: "drawSvgContainer",
|
|
2896
|
-
ref: Ne,
|
|
2897
|
-
style: { position: "relative" },
|
|
2898
|
-
id: se.value,
|
|
2899
|
-
"data-annotator-content": ""
|
|
2900
|
-
}, [
|
|
2901
|
-
r("div", {
|
|
2902
|
-
class: "annotator__content-layer",
|
|
2903
|
-
style: C(`${ce.value ? "pointer-events: none;" : ""}`)
|
|
2904
|
-
}, [
|
|
2905
|
-
gt(e.$slots, "default", {}, void 0, !0)
|
|
2906
|
-
], 4),
|
|
2907
|
-
ce.value || l.value.alwaysVisible ? (f(), Y("svg", {
|
|
2908
|
-
id: "annotatorSvg",
|
|
2909
|
-
key: $t.value,
|
|
2910
|
-
ref_key: "mainSvg",
|
|
2911
|
-
ref: ye,
|
|
2912
|
-
class: D({
|
|
2913
|
-
annotator__overlay: !0,
|
|
2914
|
-
draw: !0,
|
|
2915
|
-
"draw--free": s.value === "line"
|
|
2916
|
-
}),
|
|
2917
|
-
viewBox: `0 0 ${Re.value} ${Ce.value}`,
|
|
2918
|
-
width: Ie.value,
|
|
2919
|
-
height: Pe.value,
|
|
2920
|
-
onPointerdown: t[83] || (t[83] = (u) => ft(u)),
|
|
2921
|
-
onPointerup: t[84] || (t[84] = (u) => Qe(u)),
|
|
2922
|
-
onTouchend: t[85] || (t[85] = (u) => Qe(u)),
|
|
2923
|
-
onTouchstart: t[86] || (t[86] = (u) => {
|
|
2924
|
-
_e(u), dt(u);
|
|
2925
|
-
}),
|
|
2926
|
-
onPointermove: t[87] || (t[87] = (u) => {
|
|
2927
|
-
_e(u), bt(u);
|
|
2928
|
-
}),
|
|
2929
|
-
onPointerout: t[88] || (t[88] = (u) => Wt(u)),
|
|
2930
|
-
onPointerover: t[89] || (t[89] = (u) => At(u)),
|
|
2931
|
-
onClick: t[90] || (t[90] = (u) => dt(u)),
|
|
2932
|
-
style: C({
|
|
2933
|
-
position: "absolute",
|
|
2934
|
-
top: 0,
|
|
2935
|
-
left: 0,
|
|
2936
|
-
cursor: Tt.value,
|
|
2937
|
-
fontFamily: "Helvetica",
|
|
2938
|
-
zIndex: 1e8,
|
|
2939
|
-
pointerEvents: ce.value ? "all" : "none"
|
|
2940
|
-
})
|
|
2941
|
-
}, [
|
|
2942
|
-
r("rect", {
|
|
2943
|
-
class: "annotator__glass",
|
|
2944
|
-
x: "0",
|
|
2945
|
-
y: "0",
|
|
2946
|
-
width: Re.value,
|
|
2947
|
-
height: Ce.value,
|
|
2948
|
-
fill: "transparent",
|
|
2949
|
-
"pointer-events": ce.value ? "all" : "none",
|
|
2950
|
-
style: { cursor: "inherit" },
|
|
2951
|
-
onPointerdown: t[79] || (t[79] = Ge((u) => ft(u), ["stop", "prevent"])),
|
|
2952
|
-
onPointermove: t[80] || (t[80] = Ge((u) => {
|
|
2953
|
-
_e(u), bt(u);
|
|
2954
|
-
}, ["stop", "prevent"])),
|
|
2955
|
-
onPointerup: Ge(Qe, ["stop", "prevent"]),
|
|
2956
|
-
onClick: t[81] || (t[81] = Ge(() => {
|
|
2957
|
-
}, ["stop", "prevent"]))
|
|
2958
|
-
}, null, 40, ro),
|
|
2959
|
-
(f(!0), Y(Jt, null, Zt(Mt.value, (u) => (f(), Y("g", {
|
|
2960
|
-
key: u.id,
|
|
2961
|
-
innerHTML: u.html,
|
|
2962
|
-
onClick: t[82] || (t[82] = (o) => {
|
|
2963
|
-
Et(o), T.value = !1;
|
|
2964
|
-
})
|
|
2965
|
-
}, null, 8, no))), 128))
|
|
2966
|
-
], 46, uo)) : g("", !0),
|
|
2967
|
-
Ke.value || tt(fe) ? (f(), Y("svg", {
|
|
2968
|
-
key: 1,
|
|
2969
|
-
style: { position: "absolute", top: "0", left: "0" },
|
|
2970
|
-
height: Pe.value,
|
|
2971
|
-
viewBox: `0 0 ${Re.value} ${Ce.value}`,
|
|
2972
|
-
width: Ie.value,
|
|
2973
|
-
"data-dom-to-png-ignore": ""
|
|
2974
|
-
}, [
|
|
2975
|
-
r("circle", {
|
|
2976
|
-
class: "animated-circle-print",
|
|
2977
|
-
cx: Re.value / 2,
|
|
2978
|
-
cy: Ce.value / 2,
|
|
2979
|
-
r: "50",
|
|
2980
|
-
stroke: "#6376DD",
|
|
2981
|
-
"stroke-width": "10",
|
|
2982
|
-
fill: "none"
|
|
2983
|
-
}, null, 8, ao)
|
|
2984
|
-
], 8, so)) : g("", !0)
|
|
2985
|
-
], 8, oo)
|
|
2986
|
-
]));
|
|
2987
|
-
}
|
|
2988
|
-
}, wo = /* @__PURE__ */ pt(vo, [["__scopeId", "data-v-4a2d539c"]]);
|
|
2989
|
-
export {
|
|
2990
|
-
wo as default
|
|
2991
|
-
};
|