vue-data-ui 3.2.2 → 3.2.3

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.
Files changed (157) hide show
  1. package/dist/{Arrow-BWqgcDpl.js → Arrow-Bb0bGghy.js} +1 -1
  2. package/dist/{BaseDraggableDialog-Cg4ZF9cb.js → BaseDraggableDialog-CHhZIht2.js} +2 -2
  3. package/dist/{BaseIcon-e63bhLIi.js → BaseIcon-Bz-1GQhu.js} +10 -3
  4. package/dist/ColorPicker-B-WUqMoV.js +238 -0
  5. package/dist/{DataTable-dv6G7Krn.js → DataTable-BvjacRbw.js} +2 -2
  6. package/dist/{Legend-CVcdvTLM.js → Legend-BpoFJ8fc.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DSmotL8i.js → NonSvgPenAndPaper-l9giyY1Z.js} +3 -3
  8. package/dist/{PackageVersion-C3Vg-vTM.js → PackageVersion-oBQ8brnx.js} +1 -1
  9. package/dist/{PenAndPaper-CplrzuG7.js → PenAndPaper-CR8q353D.js} +3 -3
  10. package/dist/{Shape-D_vfF7sk.js → Shape-C_C_OmqR.js} +1 -1
  11. package/dist/{Slicer-BO2wNLcR.js → Slicer-BA2GhOmY.js} +63 -63
  12. package/dist/{SparkTooltip-B82G5-BO.js → SparkTooltip-Dz1PDE_h.js} +1 -1
  13. package/dist/{Title-DlqxaiIs.js → Title-C__lOIPC.js} +1 -1
  14. package/dist/{Tooltip-BKqK7z38.js → Tooltip-BOXz8skU.js} +1 -1
  15. package/dist/{UserOptions-C9IFsUt0.js → UserOptions-DsTgvAok.js} +2 -2
  16. package/dist/components/arrow.js +1 -1
  17. package/dist/components/vue-ui-3d-bar.js +1 -1
  18. package/dist/components/vue-ui-accordion.js +1 -1
  19. package/dist/components/vue-ui-age-pyramid.js +1 -1
  20. package/dist/components/vue-ui-annotator.js +5 -0
  21. package/dist/components/vue-ui-bullet.js +1 -1
  22. package/dist/components/vue-ui-candlestick.js +1 -1
  23. package/dist/components/vue-ui-carousel-table.js +1 -1
  24. package/dist/components/vue-ui-chestnut.js +1 -1
  25. package/dist/components/vue-ui-chord.js +1 -1
  26. package/dist/components/vue-ui-circle-pack.js +1 -1
  27. package/dist/components/vue-ui-cursor.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-gizmo.js +1 -1
  38. package/dist/components/vue-ui-heatmap.js +1 -1
  39. package/dist/components/vue-ui-history-plot.js +1 -1
  40. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  41. package/dist/components/vue-ui-icon.js +1 -1
  42. package/dist/components/vue-ui-kpi.js +1 -1
  43. package/dist/components/vue-ui-mini-loader.js +1 -1
  44. package/dist/components/vue-ui-molecule.js +1 -1
  45. package/dist/components/vue-ui-mood-radar.js +1 -1
  46. package/dist/components/vue-ui-nested-donuts.js +1 -1
  47. package/dist/components/vue-ui-onion.js +1 -1
  48. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  49. package/dist/components/vue-ui-quadrant.js +1 -1
  50. package/dist/components/vue-ui-quick-chart.js +1 -1
  51. package/dist/components/vue-ui-radar.js +1 -1
  52. package/dist/components/vue-ui-rating.js +1 -1
  53. package/dist/components/vue-ui-relation-circle.js +1 -1
  54. package/dist/components/vue-ui-ridgeline.js +1 -1
  55. package/dist/components/vue-ui-rings.js +1 -1
  56. package/dist/components/vue-ui-scatter.js +1 -1
  57. package/dist/components/vue-ui-skeleton.js +1 -1
  58. package/dist/components/vue-ui-smiley.js +1 -1
  59. package/dist/components/vue-ui-spark-trend.js +1 -1
  60. package/dist/components/vue-ui-sparkbar.js +1 -1
  61. package/dist/components/vue-ui-sparkgauge.js +1 -1
  62. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  63. package/dist/components/vue-ui-sparkline.js +1 -1
  64. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  65. package/dist/components/vue-ui-stackbar.js +1 -1
  66. package/dist/components/vue-ui-strip-plot.js +1 -1
  67. package/dist/components/vue-ui-table-heatmap.js +1 -1
  68. package/dist/components/vue-ui-table-sparkline.js +1 -1
  69. package/dist/components/vue-ui-table.js +1 -1
  70. package/dist/components/vue-ui-thermometer.js +1 -1
  71. package/dist/components/vue-ui-timer.js +1 -1
  72. package/dist/components/vue-ui-tiremarks.js +1 -1
  73. package/dist/components/vue-ui-treemap.js +1 -1
  74. package/dist/components/vue-ui-vertical-bar.js +1 -1
  75. package/dist/components/vue-ui-waffle.js +1 -1
  76. package/dist/components/vue-ui-wheel.js +1 -1
  77. package/dist/components/vue-ui-word-cloud.js +1 -1
  78. package/dist/components/vue-ui-world.js +1 -1
  79. package/dist/components/vue-ui-xy-canvas.js +1 -1
  80. package/dist/components/vue-ui-xy.js +1 -1
  81. package/dist/{dom-to-png-1edcjS0-.js → dom-to-png-BgvOdfyW.js} +1 -1
  82. package/dist/{img-A48JwXxj.js → img-DjWwQXVS.js} +1 -1
  83. package/dist/{lib-CDp2KgIU.js → lib-BEpWEyMm.js} +56 -56
  84. package/dist/{pdf-BZV8MuXM.js → pdf-YD0ShN36.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/types/vue-data-ui.d.ts +14 -3
  87. package/dist/{useAutoSizeLabelsInsideViewbox-C2IsrQqi.js → useAutoSizeLabelsInsideViewbox-BVJkib7z.js} +1 -1
  88. package/dist/{useNestedProp-Cwtenuui.js → useNestedProp-CLD3Gk9S.js} +17 -13
  89. package/dist/{usePrinter-DU_Pi3Rq.js → usePrinter-w23K-ezx.js} +2 -2
  90. package/dist/{vue-data-ui-BHJOTOQY.js → vue-data-ui-hSWsJzdK.js} +64 -64
  91. package/dist/vue-data-ui.js +96 -96
  92. package/dist/{vue-ui-3d-bar-rxghnZJO.js → vue-ui-3d-bar-B45AYk-O.js} +6 -6
  93. package/dist/vue-ui-accordion-Cv7OaVUI.js +78 -0
  94. package/dist/{vue-ui-age-pyramid-gT_SnI-F.js → vue-ui-age-pyramid-CJ66TbYc.js} +6 -6
  95. package/dist/vue-ui-annotator-DOO0qej9.js +2959 -0
  96. package/dist/{vue-ui-bullet-DREbhLhy.js → vue-ui-bullet-D_V1l1Jt.js} +15 -15
  97. package/dist/{vue-ui-candlestick-D4P15Ci1.js → vue-ui-candlestick-DrkWrGT2.js} +33 -33
  98. package/dist/{vue-ui-carousel-table-C24KX4gd.js → vue-ui-carousel-table-0zk2YkV7.js} +4 -4
  99. package/dist/{vue-ui-chestnut-BbQknrj0.js → vue-ui-chestnut-CAGkS9Lt.js} +32 -32
  100. package/dist/{vue-ui-chord-BM4_D9kI.js → vue-ui-chord-CHAaUGaZ.js} +53 -53
  101. package/dist/{vue-ui-circle-pack-S4Asc9CS.js → vue-ui-circle-pack-CBySiQot.js} +29 -29
  102. package/dist/{vue-ui-cursor-F9MXsQ1K.js → vue-ui-cursor-Cbt_0B5t.js} +2 -2
  103. package/dist/{vue-ui-dashboard-D6LHLdFS.js → vue-ui-dashboard-BAOd1hi1.js} +67 -67
  104. package/dist/{vue-ui-digits-B_8VzLOS.js → vue-ui-digits-ChAz3jSS.js} +2 -2
  105. package/dist/{vue-ui-donut-B7T8_tP1.js → vue-ui-donut-BgYaWImK.js} +8 -8
  106. package/dist/{vue-ui-donut-evolution-DOn-7PnK.js → vue-ui-donut-evolution-UWyvIsbE.js} +55 -55
  107. package/dist/{vue-ui-dumbbell-Ch66pFUG.js → vue-ui-dumbbell-B5IHRXdS.js} +7 -7
  108. package/dist/{vue-ui-flow-DPcsRLJJ.js → vue-ui-flow-DB4sLZG4.js} +63 -63
  109. package/dist/{vue-ui-funnel-BdcKoacQ.js → vue-ui-funnel-COZLSfZ8.js} +36 -36
  110. package/dist/{vue-ui-galaxy-D3c-O1Op.js → vue-ui-galaxy-S8pIdU78.js} +46 -46
  111. package/dist/{vue-ui-gauge-D1zbKzZQ.js → vue-ui-gauge-BVaE3IZt.js} +59 -59
  112. package/dist/{vue-ui-gizmo-CcrANrSX.js → vue-ui-gizmo-BmJ01zdG.js} +3 -3
  113. package/dist/{vue-ui-heatmap-CcvV9Y14.js → vue-ui-heatmap-DiAryN8L.js} +7 -7
  114. package/dist/{vue-ui-history-plot-a0mLhd0L.js → vue-ui-history-plot-eeYk4C28.js} +44 -44
  115. package/dist/{vue-ui-kpi-BwUpplcm.js → vue-ui-kpi-D7WXGb3K.js} +3 -3
  116. package/dist/{vue-ui-mini-loader-DBPZOqZA.js → vue-ui-mini-loader-CKMzFSG5.js} +2 -2
  117. package/dist/{vue-ui-molecule-xsgartoC.js → vue-ui-molecule-daI3rmbc.js} +5 -5
  118. package/dist/{vue-ui-mood-radar-kl2d5QsL.js → vue-ui-mood-radar-CawOBU0s.js} +7 -7
  119. package/dist/{vue-ui-nested-donuts-D9I8_VnP.js → vue-ui-nested-donuts-Ci7qxsh6.js} +70 -70
  120. package/dist/{vue-ui-onion-BlxsHavW.js → vue-ui-onion-CUkVuewC.js} +8 -8
  121. package/dist/{vue-ui-parallel-coordinate-plot-DHH6lrbW.js → vue-ui-parallel-coordinate-plot-D7UkjkUV.js} +35 -35
  122. package/dist/{vue-ui-quadrant-DyIQZUPC.js → vue-ui-quadrant-B9VZz5d6.js} +8 -8
  123. package/dist/{vue-ui-quick-chart-Jfr_Ezh9.js → vue-ui-quick-chart-BQgH4Aap.js} +55 -55
  124. package/dist/{vue-ui-radar-BL_dJV12.js → vue-ui-radar-DvZ8XcZC.js} +54 -54
  125. package/dist/{vue-ui-rating-LiragGSU.js → vue-ui-rating-C0Ubexdn.js} +2 -2
  126. package/dist/{vue-ui-relation-circle-BrR2W_6V.js → vue-ui-relation-circle-Bal5QL_Z.js} +25 -25
  127. package/dist/{vue-ui-ridgeline-CpaOYplC.js → vue-ui-ridgeline-DbRZFJcN.js} +27 -27
  128. package/dist/{vue-ui-rings-B9TGOwFE.js → vue-ui-rings-BJ_Dmy5i.js} +38 -38
  129. package/dist/{vue-ui-scatter-Bq4pSRu_.js → vue-ui-scatter-bljL9Bav.js} +49 -49
  130. package/dist/{vue-ui-skeleton-BlVnOk2o.js → vue-ui-skeleton-DZPi12tE.js} +3 -3
  131. package/dist/{vue-ui-smiley-DyP9gKYe.js → vue-ui-smiley-DxC8rN5b.js} +2 -2
  132. package/dist/{vue-ui-spark-trend-Pvdqnqia.js → vue-ui-spark-trend-CqMF642_.js} +22 -22
  133. package/dist/{vue-ui-sparkbar-DF6eDrxt.js → vue-ui-sparkbar-BcyaivMe.js} +3 -3
  134. package/dist/{vue-ui-sparkgauge-BR7oFSSF.js → vue-ui-sparkgauge-BkIUpzkZ.js} +3 -3
  135. package/dist/{vue-ui-sparkhistogram-CkOGqy2h.js → vue-ui-sparkhistogram-DnPdJk3e.js} +4 -4
  136. package/dist/{vue-ui-sparkline-DF8bLc-F.js → vue-ui-sparkline-F7h636hU.js} +29 -29
  137. package/dist/{vue-ui-sparkstackbar-DMkn-0FV.js → vue-ui-sparkstackbar-B-Du5D3w.js} +3 -3
  138. package/dist/{vue-ui-stackbar-CUXktGA-.js → vue-ui-stackbar-BNOfLkY2.js} +38 -38
  139. package/dist/{vue-ui-strip-plot-ibdxtil6.js → vue-ui-strip-plot-DNPM01M_.js} +7 -7
  140. package/dist/{vue-ui-table-BocHahKB.js → vue-ui-table-__ABUm9x.js} +17 -17
  141. package/dist/{vue-ui-table-heatmap-B03YDYck.js → vue-ui-table-heatmap-D-iueyM0.js} +13 -13
  142. package/dist/{vue-ui-table-sparkline-8mOvfeTL.js → vue-ui-table-sparkline-B5QdvlV7.js} +4 -4
  143. package/dist/{vue-ui-thermometer-Dq_nJLiU.js → vue-ui-thermometer-DID_4Y6w.js} +7 -7
  144. package/dist/{vue-ui-timer-BLveMseW.js → vue-ui-timer-CjJmpXoF.js} +27 -27
  145. package/dist/{vue-ui-tiremarks-DMG1_YzV.js → vue-ui-tiremarks-wDKOTVny.js} +6 -6
  146. package/dist/{vue-ui-treemap-io-J9w5R.js → vue-ui-treemap-DFo4w0cb.js} +8 -8
  147. package/dist/{vue-ui-vertical-bar-DqnTF6h2.js → vue-ui-vertical-bar-BEdckhBh.js} +30 -30
  148. package/dist/{vue-ui-waffle-X9DHHqlw.js → vue-ui-waffle-D5i1Q6tF.js} +75 -75
  149. package/dist/{vue-ui-wheel-BLBwVpV8.js → vue-ui-wheel-DJlN8joO.js} +6 -6
  150. package/dist/{vue-ui-word-cloud-0GXQqY8G.js → vue-ui-word-cloud-B7Y2UrwO.js} +28 -28
  151. package/dist/{vue-ui-world-5OHPVwxv.js → vue-ui-world-DzF8YW_Q.js} +6 -6
  152. package/dist/{vue-ui-xy-HW0T1CD8.js → vue-ui-xy-DGln2YgO.js} +9 -9
  153. package/dist/{vue-ui-xy-canvas-C4FbbXNQ.js → vue-ui-xy-canvas-DF2Ts-g3.js} +10 -10
  154. package/package.json +1 -1
  155. package/dist/ColorPicker-BO4ntExI.js +0 -135
  156. package/dist/vue-ui-accordion-BWnxgda4.js +0 -76
  157. package/dist/vue-ui-annotator-BkHDHfHG.js +0 -2182
@@ -1,2182 +0,0 @@
1
- import { B as p, t as v, C as w } from "./lib-CDp2KgIU.js";
2
- import { u as A } from "./useNestedProp-Cwtenuui.js";
3
- import { d as M } from "./dom-to-png-1edcjS0-.js";
4
- import { createElementBlock as d, openBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, createCommentVNode as a, normalizeClass as y, createStaticVNode as F, withDirectives as N, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G } from "vue";
5
- import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const m = {
7
- props: {
8
- config: {
9
- type: Object,
10
- default() {
11
- return {};
12
- }
13
- },
14
- dataset: {
15
- type: Object,
16
- default() {
17
- return {
18
- shapes: [],
19
- lastSelectedShape: void 0
20
- };
21
- }
22
- }
23
- },
24
- data() {
25
- return {
26
- activeShape: void 0,
27
- strokeSize: 1,
28
- currentPointer: {
29
- start: {
30
- x: 0,
31
- y: 0
32
- },
33
- end: {
34
- x: 0,
35
- end: 0
36
- }
37
- },
38
- currentTarget: void 0,
39
- hoveredShapeId: void 0,
40
- isBold: !1,
41
- isBulletTextMode: !1,
42
- isDash: !1,
43
- isDeleteMode: !1,
44
- isDrawing: !1,
45
- isDrawingNewShape: !0,
46
- isDrawMode: !1,
47
- isItalic: !1,
48
- isMouseDown: !1,
49
- isMoveMode: !1,
50
- isPrinting: !1,
51
- isResizeMode: !1,
52
- isSelectMode: !1,
53
- isSummaryOpen: !1,
54
- isTextMode: !1,
55
- isUnderline: !1,
56
- isWriting: !1,
57
- lastSelectedShape: this.dataset.lastSelectedShape,
58
- pointerDownId: -1,
59
- pointerPosition: {
60
- x: 0,
61
- y: 0
62
- },
63
- preventEdit: !0,
64
- selectedGroup: [],
65
- shapes: this.dataset.shapes ? this.dataset.shapes : [],
66
- shapesOrder: [],
67
- step: Math.round(Math.random()) * 1e5,
68
- svgHeight: 1e3,
69
- svgWidth: 1e3,
70
- options: {
71
- arrow: {
72
- color: "grey",
73
- filled: !0
74
- },
75
- circle: {
76
- color: "grey",
77
- filled: !1,
78
- radius: 3,
79
- strokeWidth: 2
80
- },
81
- rect: {
82
- color: "grey",
83
- filled: !1,
84
- strokeWidth: 2,
85
- height: 12,
86
- width: 12
87
- }
88
- },
89
- selectedColor: "#000000",
90
- showCaret: !1,
91
- sizeRatio: 1,
92
- slottedSvg: void 0,
93
- sourceWidth: 1,
94
- sourceHeight: 1,
95
- textAlign: "start",
96
- textFont: 20,
97
- transparency: 100,
98
- transparencyCodes: w
99
- };
100
- },
101
- watch: {
102
- shapes: {
103
- handler(t) {
104
- t.length === 0 && (this.lastSelectedShape = void 0);
105
- }
106
- }
107
- },
108
- computed: {
109
- FINAL_CONFIG() {
110
- const t = A().vue_ui_annotator;
111
- if (!Object.keys(this.config || {}).length)
112
- return t;
113
- const i = this.treeShake({
114
- defaultConfig: t,
115
- userConfig: this.config
116
- });
117
- return this.convertConfigColors(i);
118
- },
119
- canSelect() {
120
- return this.shapes.filter((t) => !["line", "group"].includes(t.type)).length > 1;
121
- },
122
- colorTransparency() {
123
- return this.transparencyCodes[this.transparency > 98 ? 98 : this.transparency];
124
- },
125
- cursorClass() {
126
- switch (!0) {
127
- case this.isDeleteMode:
128
- return "default";
129
- case this.isMoveMode:
130
- return "move";
131
- case this.isTextMode:
132
- return "text";
133
- case this.isResizeMode:
134
- return "se-resize";
135
- default:
136
- return "";
137
- }
138
- },
139
- records() {
140
- return this.shapes;
141
- },
142
- userShapes() {
143
- return this.records.map((t) => {
144
- switch (!0) {
145
- case (t && t.type === "arrow"):
146
- const i = t.strokeWidth > 3 ? 5 : 10, o = t.strokeWidth > 3 ? 2.5 : 5;
147
- return `
148
- <defs>
149
- <marker
150
- id="${t.id}"
151
- markerWidth="${i}"
152
- markerHeight="${i}"
153
- refX="0"
154
- refY="${o}"
155
- orient="auto"
156
- >
157
- <polygon
158
- points="0 0,${i} ${o}, 0 ${i}"
159
- fill="${t.color}"
160
- />
161
- </marker>
162
- </defs>
163
- ${this.includeSelectionIndicator(t)}
164
- <g id="${t.id}">
165
- <path
166
- style="stroke-linecap: round !important; ${t.isDash ? `stroke-dasharray: ${t.strokeWidth * 3}` : ""}"
167
- stroke="${t.color}"
168
- id="${t.id}"
169
- d="M${t.x},${t.y} ${t.endX},${t.endY}"
170
- stroke-width="${t.strokeWidth}"
171
- marker-end="url(#${t.id})"
172
- />
173
- </g>
174
- <g id="${t.id}">
175
- <rect
176
- id="${t.id}"
177
- x="${t.x - 10}"
178
- y="${t.y - 10}"
179
- height="20"
180
- width="20"
181
- fill="rgba(0,0,0,0.3)"
182
- style="display:${this.isResizeMode || this.isMoveMode ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
183
- />
184
- </g>
185
- ${this.includeDeleteButton(t)}
186
- </g>
187
- `;
188
- case (t && t.type === "circle"):
189
- return `
190
- <g id="${t.id}">
191
- ${this.includeSelectionIndicator(t)}
192
- <circle
193
- id="${t.id}"
194
- cx="${t.x}"
195
- cy="${t.y}"
196
- r="${t.circleRadius ? t.circleRadius : Number.MIN_VALUE}"
197
- fill="${t.isFilled ? t.color + t.alpha : "rgba(255,255,255,0.001)"}"
198
- stroke="${t.color + t.alpha}"
199
- stroke-width="${t.strokeWidth}"
200
- style="${t.isDash ? `stroke-dasharray: ${t.strokeWidth * 3}` : ""}"
201
- >
202
- </circle>
203
- </g>
204
-
205
- ${this.includeDeleteButton(t)}`;
206
- case (t && t.type === "group"):
207
- return `<g id="${t.id}">
208
- <rect
209
- id="${this.isResizeMode ? "" : t.id}"
210
- x="${t.x}"
211
- y="${t.y}"
212
- fill="transparent"
213
- height="${t.rectHeight}"
214
- width="${t.rectWidth}"
215
- stroke="grey"
216
- stroke-width="1"
217
- style="rx:1 !important; ry:1 !important; ${t.isDash ? `stroke-dasharray: ${t.strokeWidth * 3}` : ""}; display:${this.isSelectMode || this.isDeleteMode || this.hoveredShapeId && this.hoveredShapeId === t.id ? "initial" : "none"};"
218
- />
219
- <g id="${t.id}">
220
- ${t.content ? t.content : ""}
221
- </g>
222
- ${this.includeDeleteButton(t)}
223
- </g> `;
224
- case (t && t.type === "rect"):
225
- return `<g id="${t.id}">
226
- ${this.includeSelectionIndicator(t)}
227
- <rect
228
- id="${this.isResizeMode ? "" : t.id}"
229
- x="${t.x}"
230
- y="${t.y}"
231
- fill="${t.isFilled ? t.color + t.alpha : "rgba(255,255,255,0.001)"}"
232
- height="${t.rectHeight}"
233
- width="${t.rectWidth}"
234
- stroke="${t.color + t.alpha}"
235
- stroke-width="${t.strokeWidth}"
236
- style="rx:1 !important; ry:1 !important; ${t.isDash ? `stroke-dasharray: ${t.strokeWidth * 3}` : ""}"
237
- />
238
- <rect id="${t.id}"
239
- x="${t.x + t.rectWidth}"
240
- y="${t.y + t.rectHeight}"
241
- height="20"
242
- width="20"
243
- fill="rgba(0,0,0,0.3)"
244
- style="display:${this.isResizeMode ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
245
- />
246
- ${this.includeDeleteButton(t)}
247
- </g> `;
248
- case (t && t.type === "line"):
249
- return `
250
- <g id="${t.id}">
251
- <path
252
- id="${t.id}"
253
- d="M${t.path ? t.path : ""}"
254
- style="stroke:${t.color + t.alpha} !important; fill:none; stroke-width:${t.strokeWidth} !important; stroke-linecap: round !important; stroke-linejoin: round !important;"
255
- />
256
- ${this.includeDeleteButton(t)}
257
- </g>
258
- `;
259
- case (t && t.type === "text"):
260
- const h = t.textContent.split("‎"), s = [];
261
- for (let e = 0; e < h.length; e += 1)
262
- s.push(`
263
- ${t.isBulletTextMode ? `<tspan x="${t.x - t.fontSize}" y="${t.y + t.fontSize * e}" id="${t.id}" font-size="${t.fontSize / 2}">⬤</tspan>` : ""}
264
- <tspan id="${t.id}" x="${t.x}" y="${t.y + t.fontSize * e}">
265
- ${h[e]}
266
- </tspan>`);
267
- return `
268
- ${this.includeSelectionIndicator(t)}
269
- ${this.computeTextElement(
270
- t,
271
- s,
272
- t.isBulletTextMode
273
- )}
274
- `;
275
- }
276
- });
277
- }
278
- },
279
- mounted() {
280
- const t = this.$refs.drawSvgContainer;
281
- let i = !1;
282
- this.walkTheDOM(t, (s) => {
283
- if (!i && ["DIV", "svg", "section", "canvas"].includes(s.tagName)) {
284
- this.slottedSvg = s, i = !0;
285
- return;
286
- }
287
- });
288
- const o = this.slottedSvg.getBoundingClientRect();
289
- this.sizeRatio = o.height / o.width, this.svgWidth = 1e3, this.svgHeight = this.sizeRatio * 1e3, this.sourceWidth = o.width, this.sourceHeight = o.height, new ResizeObserver((s) => {
290
- s.forEach((e) => {
291
- this.sourceWidth = e.contentRect.width, this.sourceHeight = e.contentRect.height, this.sizeRatio = e.contentRect.height / e.contentRect.width, this.svgHeight = this.sizeRatio * 1e3;
292
- });
293
- }).observe(this.slottedSvg), window.addEventListener("keydown", (s) => {
294
- this.write(s);
295
- });
296
- },
297
- destroyed() {
298
- window.removeEventListener("keydown", (t) => {
299
- this.write(t);
300
- });
301
- },
302
- methods: {
303
- treeShake: v,
304
- convertConfigColors: p,
305
- bringShapeTo(t) {
306
- const i = this.shapes.find(
307
- (o) => o.id === this.lastSelectedShape.id
308
- );
309
- switch (!0) {
310
- case t === "front":
311
- this.shapes = this.shapes.filter((o) => o.id !== i.id), this.shapes.push(i);
312
- break;
313
- case t === "back":
314
- this.shapes = this.shapes.filter((o) => o.id !== i.id), this.shapes = [i, ...this.shapes];
315
- break;
316
- default:
317
- return;
318
- }
319
- },
320
- clickSvg(t) {
321
- if (this.isDeleteMode)
322
- return;
323
- this.deleteEmptyTextElement(), this.isTextMode ? (this.isWriting = !0, this.showCaret = !0) : (this.isWriting = !1, this.showCaret = !1, this.isTextMode = !1);
324
- let i = `text_${Math.random() * 1e4}_${Math.random() * 99999}`;
325
- if (this.isWriting) {
326
- this.shapes.push({
327
- id: i,
328
- type: "text",
329
- lines: 0,
330
- x: this.pointerPosition.x,
331
- y: this.pointerPosition.y,
332
- textContent: "",
333
- fontSize: this.copy(this.textFont),
334
- textAlign: this.copy(this.textAlign),
335
- isBold: this.copy(this.isBold),
336
- isItalic: this.copy(this.isItalic),
337
- isUnderline: this.copy(this.isUnderline),
338
- color: this.copy(this.selectedColor),
339
- isBulletTextMode: this.copy(this.isBulletTextMode)
340
- }), this.currentTarget = this.shapes.at(-1), this.lastSelectedShape = this.shapes.at(-1);
341
- return;
342
- }
343
- const o = () => {
344
- this.isDash = this.shapes.find((s) => s.id === t.target.id).isDash;
345
- }, h = () => {
346
- this.strokeSize = this.shapes.find(
347
- (s) => s.id === t.target.id
348
- ).strokeWidth;
349
- };
350
- if (this.isSelectMode = !1, t.target.id.includes("arrow")) {
351
- this.activeShape = "arrow", o(), h();
352
- return;
353
- }
354
- if (t.target.id.includes("circle")) {
355
- this.activeShape = "circle", this.options.circle.filled = this.shapes.find(
356
- (s) => s.id === t.target.id
357
- ).isFilled, o(), h();
358
- return;
359
- }
360
- if (t.target.id.includes("rect")) {
361
- this.activeShape = "rect", this.options.rect.filled = this.shapes.find(
362
- (s) => s.id === t.target.id
363
- ).isFilled, o(), h();
364
- return;
365
- }
366
- if (t.target.id.includes("line")) {
367
- this.activeShape = "line", h();
368
- return;
369
- }
370
- if (t.target.id.includes("text")) {
371
- this.isTextMode = !0, this.isWriting = !0, this.showCaret = !0;
372
- const s = this.shapes.find((e) => e.id === t.target.id);
373
- s && s.textAlign && (this.textAlign = this.shapes.find(
374
- (e) => e.id === t.target.id
375
- ).textAlign), s && (this.isBulletTextMode = this.shapes.find(
376
- (e) => e.id === t.target.id
377
- ).isBulletTextMode);
378
- return;
379
- }
380
- },
381
- copyPaste() {
382
- const t = {
383
- ...this.lastSelectedShape,
384
- id: `${this.lastSelectedShape.id}_copy`,
385
- x: this.lastSelectedShape.x - 100 < 0 ? 1 : this.lastSelectedShape.x - 100,
386
- y: this.lastSelectedShape.y - 100 < 0 ? 1 : this.lastSelectedShape.y - 100
387
- };
388
- this.shapes.push(t);
389
- },
390
- includeDeleteButton(t, i = !1) {
391
- switch (!0) {
392
- case t.type === "circle":
393
- return `
394
- <g id="${t.id}" style="display:${this.isDeleteMode ? "initial" : "none"};">
395
- <circle id="${t.id}" cx="${t.x}" cy="${t.y}" r="12" fill="red"/>
396
- <line stroke="white" stroke-width="2" id="${t.id}" x1="${t.x - 4}" y1="${t.y - 4}" x2="${t.x + 4}" y2="${t.y + 4}"/>
397
- <line stroke="white" stroke-width="2" id="${t.id}" x1="${t.x + 4}" y1="${t.y - 4}" x2="${t.x - 4}" y2="${t.y + 4}"/>
398
- </g>
399
- `;
400
- case t.type === "text":
401
- let o, h = [-8, -12, -4, -12, -4];
402
- switch (!0) {
403
- case t.textAlign === "start":
404
- i ? o = [-20, -24, -16, -16, -24] : o = [-16, -20, -12, -12, -20];
405
- break;
406
- case t.textAlign === "middle":
407
- o = [0, -4, 4, 4, -4], h = [-32, -36, -28, -36, -28];
408
- break;
409
- case t.textAlign === "end":
410
- o = [16, 20, 12, 12, 20];
411
- break;
412
- default:
413
- o = [0, 0, 0];
414
- break;
415
- }
416
- return `
417
- <g id="${t.id}" style="display:${this.isDeleteMode ? "initial" : "none"};">
418
- <circle id="${t.id}" cx="${t.x + o[0]}" cy="${t.y + h[0]}" r="12" fill="red"/>
419
- <line stroke="white" stroke-width="2" id="${t.id}" x1="${t.x + o[1]}" y1="${t.y + h[1]}" x2="${t.x + o[2]}" y2="${t.y + h[2]}"/>
420
- <line stroke="white" stroke-width="2" id="${t.id}" x1="${t.x + o[3]}" y1="${t.y + h[3]}" x2="${t.x + o[4]}" y2="${t.y + h[4]}"/>
421
- </g>
422
- `;
423
- default:
424
- return `
425
- <g id="${t.id}" style="display:${this.isDeleteMode ? "initial" : "none"};">
426
- <circle id="${t.id}" cx="${t.x - 4}" cy="${t.y - 4}" r="12" fill="red"/>
427
- <line stroke="white" stroke-width="2" id="${t.id}" x1="${t.x - 8}" y1="${t.y - 8}" x2="${t.x}" y2="${t.y}"/>
428
- <line stroke="white" stroke-width="2" id="${t.id}" x1="${t.x}" y1="${t.y - 8}" x2="${t.x - 8}" y2="${t.y}"/>
429
- </g>
430
- `;
431
- }
432
- },
433
- includeSelectionIndicator(t) {
434
- if (t)
435
- switch (!0) {
436
- case t.type === "rect":
437
- return `
438
- <rect
439
- id="${t.id}"
440
- style="stroke-dasharray: 10; display:${this.hoveredShapeId && this.hoveredShapeId === t.id ? "initial" : "none"}"
441
- x="${t.x - 20}"
442
- y="${t.y - 20}"
443
- height="${t.rectHeight + 40}"
444
- width="${t.rectWidth + 40}"
445
- fill="transparent"
446
- stroke="grey"
447
- />
448
- `;
449
- case t.type === "circle":
450
- return `
451
- <rect
452
- id="${t.id}"
453
- style="stroke-dasharray: 10; display:${this.hoveredShapeId && this.hoveredShapeId === t.id ? "initial" : "none"}"
454
- x="${t.x - t.circleRadius - 20}"
455
- y="${t.y - t.circleRadius - 20}"
456
- height="${t.circleRadius * 2 + 40}"
457
- width="${t.circleRadius * 2 + 40}"
458
- fill="transparent"
459
- stroke="grey"
460
- />
461
- `;
462
- case t.type === "arrow":
463
- const i = t.endX - t.x > 0, o = t.endY - t.y > 0;
464
- return `
465
- <rect
466
- id="${t.id}"
467
- style="stroke-dasharray: 10; display:${this.hoveredShapeId && this.hoveredShapeId === t.id ? "initial" : "none"}"
468
- x="${i ? t.x - 20 : t.endX - 20}"
469
- y="${o ? t.y - 20 : t.endY - 20}"
470
- height="${o ? t.endY - t.y + 40 : t.y - t.endY + 40}"
471
- width="${i ? t.endX - t.x + 40 : t.x - t.endX + 40}"
472
- fill="transparent"
473
- stroke="grey"
474
- />
475
- `;
476
- case t.type === "text":
477
- const h = Array.from(document.getElementsByTagName("text")).find(
478
- (I) => I.id === t.id
479
- );
480
- if (!h)
481
- return;
482
- const { x: s, y: e, width: l, height: b } = h.getBBox();
483
- return `
484
- <rect
485
- id="${t.id}"
486
- style="stroke-dasharray: 10; display:${this.hoveredShapeId && this.hoveredShapeId === t.id ? "initial" : "none"}"
487
- x="${s - 20}"
488
- y="${e - 20}"
489
- height="${b + 40}"
490
- width="${l + 40}"
491
- fill="transparent"
492
- stroke="grey"
493
- />
494
- `;
495
- default:
496
- return "";
497
- }
498
- },
499
- allowEditAndHoverShapes(t) {
500
- t.preventDefault(), this.preventEdit = !1, t.target && t.target.id && (this.hoveredShapeId = t.target.id);
501
- },
502
- setSelectedTextAlignTo(t) {
503
- !this.lastSelectedShape || this.lastSelectedShape.type !== "text" || (this.lastSelectedShape.textAlign = t);
504
- },
505
- undoLastShape() {
506
- this.lastSelectedShape = void 0, this.shapes = this.shapes.slice(0, -1);
507
- },
508
- write(t) {
509
- if (this.preventEdit)
510
- return;
511
- t.preventDefault();
512
- const i = t.keyCode;
513
- if (!this.isWriting)
514
- return;
515
- this.showCaret = !0;
516
- let o;
517
- if (this.lastSelectedShape.type === "text" ? o = this.shapes.find((s) => s.id === this.lastSelectedShape.id) : o = this.shapes.at(-1), this.currentTarget = o, o.type !== "text")
518
- return;
519
- this.currentTarget.isBold = this.copy(this.isBold), this.currentTarget.isItalic = this.copy(this.isItalic), this.currentTarget.isUnderline = this.copy(this.isUnderline);
520
- const h = [
521
- 16,
522
- 17,
523
- 18,
524
- 20,
525
- 27,
526
- 33,
527
- 34,
528
- 35,
529
- 36,
530
- 37,
531
- 38,
532
- 39,
533
- 40,
534
- 45,
535
- 91,
536
- 112,
537
- 113,
538
- 114,
539
- 115,
540
- 116,
541
- 117,
542
- 118,
543
- 119,
544
- 120,
545
- 121,
546
- 122,
547
- 123,
548
- 221,
549
- 255,
550
- "Unidentified"
551
- ];
552
- switch (!0) {
553
- case i === 8:
554
- o.textContent = o.textContent.slice(0, -1);
555
- break;
556
- case i === 9:
557
- o.textContent += "&nbsp; &nbsp; &nbsp; &nbsp;";
558
- break;
559
- case i === 13:
560
- o.lines += 1, o.textContent += "‎";
561
- return;
562
- case h.includes(i):
563
- return;
564
- default:
565
- o.textContent += t.key;
566
- }
567
- },
568
- groupShapes() {
569
- if (this.selectedGroup = [], this.activeShape !== "group") {
570
- this.isSelectMode = !1, this.shapes = this.shapes.filter((i) => i.type !== "group");
571
- return;
572
- }
573
- const t = this.shapes.at(-1);
574
- if (this.shapes.forEach((i) => {
575
- if (i.type !== "group")
576
- switch (!0) {
577
- case i.type === "arrow":
578
- const o = i.x <= i.endX && i.y <= i.endY && t.x <= i.x && t.y <= i.y && t.x + t.rectWidth >= i.endX && t.y + t.rectHeight >= i.endY, h = i.endY < i.y && i.x < i.endX && t.x <= i.x && t.y <= i.y && t.x + t.rectWidth >= i.endX && t.y + t.rectHeight >= i.y, s = i.x > i.endX && i.y < i.endY && t.x <= i.endX && t.y <= i.endY && t.x + t.rectWidth >= i.x && t.y + t.rectHeight >= i.endY, e = i.x > i.endX && i.y > i.endY && t.x <= i.endX && t.y <= i.endY && t.x + t.rectWidth >= i.x && t.y + t.rectHeight >= i.y;
579
- (o || h || s || e) && this.selectedGroup.push(i);
580
- break;
581
- case i.type === "circle":
582
- t.x <= i.x + i.circleRadius && t.y <= i.y + i.circleRadius && i.x + i.circleRadius <= t.x + t.rectWidth && i.y + i.circleRadius <= t.y + t.rectHeight && this.selectedGroup.push(i);
583
- break;
584
- case i.type === "rect":
585
- t.x <= i.x && t.y <= i.y && i.x <= t.x + t.rectWidth && i.y <= t.y + t.rectHeight && i.x + i.rectWidth <= t.x + t.rectWidth && i.y + i.rectHeight <= t.y + t.rectHeight && i.rectWidth <= t.rectWidth && i.rectHeight <= t.rectHeight && this.selectedGroup.push(i);
586
- break;
587
- case i.type === "text":
588
- t.x <= i.x && t.y <= i.y && this.selectedGroup.push(i);
589
- break;
590
- }
591
- }), this.selectedGroup = this.selectedGroup.map((i) => ({
592
- ...i,
593
- id: t.id,
594
- oldId: i.id,
595
- diffX: i.x - t.x,
596
- diffY: i.y - t.y,
597
- diffEndX: i.endX ? i.endX - t.x : 0,
598
- diffEndY: i.endY ? i.endY - t.y : 0
599
- })), t.source = this.selectedGroup, this.selectedGroup.length > 1) {
600
- const i = this.copy(this.selectedGroup).map((o) => o.oldId);
601
- this.shapes = this.shapes.filter((o) => !i.includes(o.id)), this.selectedGroup.forEach((o) => {
602
- switch (!0) {
603
- case o.type === "circle":
604
- t.content += `
605
- <circle
606
- id="${o.id}"
607
- cx="${o.x}"
608
- cy="${o.y}"
609
- r="${o.circleRadius ? o.circleRadius : Number.MIN_VALUE}"
610
- fill="${o.isFilled ? o.color + o.alpha : "rgba(255,255,255,0.001)"}"
611
- stroke="${o.color + o.alpha}"
612
- stroke-width="${o.strokeWidth}"
613
- style="${o.isDash ? `stroke-dasharray: ${o.strokeWidth * 3}` : ""}"
614
- />
615
- `;
616
- break;
617
- case o.type === "rect":
618
- t.content += `
619
- <rect
620
- id="${this.isResizeMode ? "" : o.id}"
621
- x="${o.x}"
622
- y="${o.y}"
623
- fill="${o.isFilled ? o.color + o.alpha : "rgba(255,255,255,0.001)"}"
624
- height="${o.rectHeight}"
625
- width="${o.rectWidth}"
626
- stroke="${o.color + o.alpha}"
627
- stroke-width="${o.strokeWidth}"
628
- style="rx:1 !important; ry:1 !important; ${o.isDash ? `stroke-dasharray: ${o.strokeWidth * 3}` : ""}"
629
- />
630
- `;
631
- break;
632
- case o.type === "arrow":
633
- const h = o.strokeWidth > 3 ? 5 : 10, s = o.strokeWidth > 3 ? 2.5 : 5, e = Date.now();
634
- t.content += `
635
- <g id="${o.id}">
636
- <defs>
637
- <marker
638
- id="${e}"
639
- markerWidth="${h}"
640
- markerHeight="${h}"
641
- refX="0"
642
- refY="${s}"
643
- orient="auto"
644
- >
645
- <polygon
646
- points="0 0,${h} ${s}, 0 ${h}"
647
- fill="${o.color}"
648
- />
649
- </marker>
650
- </defs>
651
-
652
- <path
653
- style="stroke-linecap: round !important; ${o.isDash ? `stroke-dasharray: ${o.strokeWidth * 3}` : ""}"
654
- stroke="${o.color}"
655
- id="${o.id}"
656
- d="M${o.x},${o.y} ${o.endX},${o.endY}"
657
- stroke-width="${o.strokeWidth}"
658
- marker-end="url(#${e})"
659
- />
660
- </g>
661
- `;
662
- break;
663
- case o.type === "text":
664
- const l = o.textContent.split("‎"), b = [];
665
- for (let I = 0; I < l.length; I += 1)
666
- b.push(`
667
- ${o.isBulletTextMode ? `<tspan x="${o.x - o.fontSize}" y="${o.y + o.fontSize * I}" id="${o.id}" font-size="${o.fontSize / 2}">⬤</tspan>` : ""}
668
- <tspan id="${o.id}" x="${o.x}" y="${o.y + o.fontSize * I}">
669
- ${l[I]}
670
- </tspan>`);
671
- t.content += `
672
- ${this.computeTextElement(o, b, o.isBulletTextMode)}
673
- `;
674
- break;
675
- }
676
- });
677
- } else
678
- this.shapes = this.shapes.filter((i) => i.id !== t.id);
679
- },
680
- moveGroup(t) {
681
- t.content = "", t.x = this.copy(this.pointerPosition.x) - t.rectWidth / 2, t.y = this.copy(this.pointerPosition.y) - t.rectHeight / 2, t.source.forEach((i) => {
682
- switch (!0) {
683
- case i.type === "circle":
684
- t.content += `
685
- <circle
686
- id="${i.id}"
687
- cx="${this.copy(this.pointerPosition.x) + i.diffX - t.rectWidth / 2}"
688
- cy="${this.copy(this.pointerPosition.y) + i.diffY - t.rectHeight / 2}"
689
- r="${i.circleRadius ? i.circleRadius : Number.MIN_VALUE}"
690
- fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
691
- stroke="${i.color + i.alpha}"
692
- stroke-width="${i.strokeWidth}"
693
- style="${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
694
- />
695
- `;
696
- break;
697
- case i.type === "rect":
698
- t.content += `
699
- <rect
700
- id="${this.isResizeMode ? "" : i.id}"
701
- x="${this.copy(this.pointerPosition.x) + i.diffX - t.rectWidth / 2}"
702
- y="${this.copy(this.pointerPosition.y) + i.diffY - t.rectHeight / 2}"
703
- fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
704
- height="${i.rectHeight}"
705
- width="${i.rectWidth}"
706
- stroke="${i.color + i.alpha}"
707
- stroke-width="${i.strokeWidth}"
708
- style="rx:1 !important; ry:1 !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
709
- />
710
- `;
711
- break;
712
- case i.type === "arrow":
713
- const o = i.strokeWidth > 3 ? 5 : 10, h = i.strokeWidth > 3 ? 2.5 : 5, s = Date.now();
714
- t.content += `
715
- <g id="${i.id}">
716
- <defs>
717
- <marker
718
- id="${s}"
719
- markerWidth="${o}"
720
- markerHeight="${o}"
721
- refX="0"
722
- refY="${h}"
723
- orient="auto"
724
- >
725
- <polygon
726
- points="0 0,${o} ${h}, 0 ${o}"
727
- fill="${i.color}"
728
- />
729
- </marker>
730
- </defs>
731
-
732
- <path
733
- style="stroke-linecap: round !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
734
- stroke="${i.color}"
735
- id="${i.id}"
736
- d="M${this.copy(this.pointerPosition.x) + i.diffX - t.rectWidth / 2},${this.copy(this.pointerPosition.y) + i.diffY - t.rectHeight / 2} ${this.copy(this.pointerPosition.x) + i.diffEndX - t.rectWidth / 2},${this.copy(this.pointerPosition.y) + i.diffEndY - t.rectHeight / 2}"
737
- stroke-width="${i.strokeWidth}"
738
- marker-end="url(#${s})"
739
- />
740
- </g>
741
- `;
742
- break;
743
- case i.type === "text":
744
- const e = i.textContent.split("‎"), l = [];
745
- for (let b = 0; b < e.length; b += 1)
746
- l.push(`
747
- ${i.isBulletTextMode ? `<tspan x="${this.copy(this.pointerPosition.x) + i.diffX - i.fontSize - t.rectWidth / 2}" y="${this.copy(this.pointerPosition.y) + i.diffY + i.fontSize * b - t.rectHeight / 2}" id="${i.id}" font-size="${i.fontSize / 2}">⬤</tspan>` : ""}
748
- <tspan id="${i.id}" x="${this.copy(this.pointerPosition.x) + i.diffX - t.rectWidth / 2}" y="${this.copy(this.pointerPosition.y) + i.diffY + i.fontSize * b - t.rectHeight / 2}">
749
- ${e[b]}
750
- </tspan>`);
751
- t.content += `
752
- ${this.computeTextElement(i, l, i.isBulletTextMode)}
753
- `;
754
- break;
755
- }
756
- });
757
- },
758
- chooseAction(t) {
759
- switch (t.preventDefault(), this.isMouseDown = !0, !0) {
760
- case this.isDrawMode:
761
- this.drawDown();
762
- break;
763
- }
764
- },
765
- chooseMove(t) {
766
- switch (t.preventDefault(), t.target.localName !== "svg" && (this.currentTarget = t.target), !0) {
767
- case (this.isMoveMode && this.isMouseDown):
768
- this.moveDown();
769
- break;
770
- case (this.isResizeMode && this.isMouseDown):
771
- this.resize();
772
- break;
773
- }
774
- },
775
- computeCaretPosition(t) {
776
- switch (!0) {
777
- case t.textAlign === "middle":
778
- return `<path stroke="black" stroke-width="2" d="M${t.x},${t.y - t.fontSize} ${t.x},${t.y - t.fontSize - 15}" /> <path stroke="black" stroke-width="2" d="M${t.x - 3},${t.y - t.fontSize - 5} ${t.x},${t.y - t.fontSize} ${t.x + 3},${t.y - t.fontSize - 5}"/>`;
779
- case t.textAlign === "start":
780
- const i = t.isBulletTextMode ? t.fontSize : 0;
781
- return `<path d="M${t.x - 20 - i},${t.y - t.fontSize / 6} ${t.x - 5 - i},${t.y - t.fontSize / 6}" stroke="black" stroke-width="2" />
782
- <path d="M${t.x - 10 - i},${t.y - t.fontSize / 3} ${t.x - 5 - i},${t.y - t.fontSize / 6} ${t.x - 10 - i},${t.y}" stroke="black" stroke-width="2">`;
783
- case t.textAlign === "end":
784
- return `<path d="M${t.x + 20},${t.y - t.fontSize / 6} ${t.x + 5},${t.y - t.fontSize / 6}" stroke="black" stroke-width="2" />
785
- <path d="M${t.x + 10},${t.y - t.fontSize / 3} ${t.x + 5},${t.y - t.fontSize / 6} ${t.x + 10},${t.y}" stroke="black" stroke-width="2">`;
786
- default:
787
- return "";
788
- }
789
- },
790
- computeTextElement(t, i, o = !1) {
791
- switch (!0) {
792
- case t.textAlign === "start":
793
- return `
794
- <g id="${t.id}">
795
- <rect
796
- id="${t.id}"
797
- style="display:${this.lastSelectedShape && this.lastSelectedShape.id === t.id ? "initial" : "none"};"
798
- x="${t.x}"
799
- y="${t.y - 50}"
800
- height="${t.lines === 0 || t.lines === 1 ? t.fontSize * 4 : t.fontSize * 2 * t.lines}"
801
- width="100"
802
- fill="rgba(0,0,0,0)"
803
- />
804
- <text
805
- style="user-select:none; height:100px;"
806
- id="${t.id}"
807
- x="${t.x}"
808
- y="${t.y}"
809
- text-anchor="${t.textAlign}"
810
- font-size="${t.fontSize}"
811
- fill="${t.color}"
812
- font-weight="${t.isBold ? "bold" : "normal"}"
813
- font-style="${t.isItalic ? "italic" : "normal"}"
814
- text-decoration="${t.isUnderline ? "underline" : "none"}"
815
- >
816
- ${i.join("")}
817
- </text>
818
- ${this.showCaret && this.lastSelectedShape && this.lastSelectedShape.id === t.id ? this.computeCaretPosition(t) : ""}
819
- ${this.includeDeleteButton(t, o)}
820
- </g>
821
- `;
822
- case t.textAlign === "middle":
823
- return `
824
- <g id="${t.id}">
825
- <rect
826
- id="${t.id}"
827
- style="display:${this.lastSelectedShape && this.lastSelectedShape.id === t.id ? "initial" : "none"};"
828
- x="${t.x - 50}"
829
- y="${t.y - 50}"
830
- height="${t.lines === 0 || t.lines === 1 ? t.fontSize * 4 : t.fontSize * 2 * t.lines}"
831
- width="100"
832
- fill="rgba(0,0,0,0)"
833
- />
834
- <text
835
- style="user-select:none; height:100px;"
836
- id="${t.id}"
837
- x="${t.x}"
838
- y="${t.y}"
839
- text-anchor="${t.textAlign}"
840
- font-size="${t.fontSize}"
841
- fill="${t.color}"
842
- font-weight="${t.isBold ? "bold" : "normal"}"
843
- font-style="${t.isItalic ? "italic" : "normal"}"
844
- text-decoration="${t.isUnderline ? "underline" : "none"}"
845
- >
846
- ${i.join("")}
847
- </text>
848
- ${this.showCaret && this.lastSelectedShape && this.lastSelectedShape.id === t.id ? this.computeCaretPosition(t) : ""}
849
- ${this.includeDeleteButton(t)}
850
- </g>
851
- `;
852
- case t.textAlign === "end":
853
- return `
854
- <g id="${t.id}">
855
- <rect
856
- id="${t.id}"
857
- style="display:${this.lastSelectedShape && this.lastSelectedShape.id === t.id ? "initial" : "none"};"
858
- x="${t.x - 100}"
859
- y="${t.y - 50}"
860
- height="${t.lines === 0 || t.lines === 1 ? t.fontSize * 4 : t.fontSize * 2 * t.lines}"
861
- width="100"
862
- fill="rgba(0,0,0,0)"
863
- />
864
- <text
865
- style="user-select:none; height:100px;"
866
- id="${t.id}"
867
- x="${t.x}"
868
- y="${t.y}"
869
- text-anchor="${t.textAlign}"
870
- font-size="${t.fontSize}"
871
- fill="${t.color}"
872
- font-weight="${t.isBold ? "bold" : "normal"}"
873
- font-style="${t.isItalic ? "italic" : "normal"}"
874
- text-decoration="${t.isUnderline ? "underline" : "none"}"
875
- >
876
- ${i.join("")}
877
- </text>
878
- ${this.showCaret && this.lastSelectedShape && this.lastSelectedShape.id === t.id ? this.computeCaretPosition(t) : ""}
879
- ${this.includeDeleteButton(t)}
880
- </g>
881
- `;
882
- default:
883
- return "";
884
- }
885
- },
886
- copy(t) {
887
- return JSON.parse(JSON.stringify(t));
888
- },
889
- clickShape(t) {
890
- const i = t.target.id;
891
- switch (!0) {
892
- case this.isDeleteMode:
893
- this.shapes = [...this.shapes].filter((o) => o.id !== i), this.lastSelectedShape = void 0;
894
- break;
895
- default:
896
- this.lastSelectedShape = this.shapes.find((o) => o.id === i);
897
- break;
898
- }
899
- },
900
- deleteEmptyTextElement() {
901
- !this.lastSelectedShape || !this.lastSelectedShape.id.includes("text") || this.lastSelectedShape.textContent === "" && (this.shapes = this.shapes.filter(
902
- (t) => t.id !== this.lastSelectedShape.id
903
- ), this.lastSelectedShape = this.shapes.at(-1));
904
- },
905
- drawUp(t = !1) {
906
- if (!this.activeShape || !this.isDrawing)
907
- return;
908
- this.currentPointer.end = {
909
- x: this.pointerPosition.x,
910
- y: this.pointerPosition.y
911
- };
912
- let i;
913
- this.shapes.length > 0 && this.currentTarget && (i = [...this.shapes].find(
914
- (b) => b.id === this.currentTarget.id
915
- ));
916
- let o, h, s;
917
- i && (o = i.x - this.currentPointer.end.x, h = i.y - this.currentPointer.end.y, s = Math.sqrt(o * o + h * h));
918
- let e, l;
919
- t ? (e = Math.max(this.currentPointer.end.x, i.x), l = Math.min(this.currentPointer.end.x, i.x), Math.max(this.currentPointer.end.y, i.y), Math.min(this.currentPointer.end.y, i.y)) : (e = Math.max(this.currentPointer.end.x, this.currentPointer.start.x), l = Math.min(this.currentPointer.end.x, this.currentPointer.start.x), Math.max(this.currentPointer.end.y, this.currentPointer.start.y), Math.min(this.currentPointer.end.y, this.currentPointer.start.y)), this.$nextTick(() => {
920
- switch (!0) {
921
- case this.activeShape === "arrow":
922
- this.shapes.at(-1).endX = this.currentPointer.end.x, this.shapes.at(-1).endY = this.currentPointer.end.y;
923
- break;
924
- case this.activeShape === "circle":
925
- const b = 20;
926
- this.shapes.at(-1).circleRadius = this.isDrawingNewShape ? this.copy(e - l) + b : s + b;
927
- break;
928
- case this.activeShape === "line":
929
- this.shapes.at(
930
- -1
931
- ).path += ` ${this.pointerPosition.x} ${this.pointerPosition.y} `;
932
- break;
933
- case ["rect", "group"].includes(this.activeShape):
934
- const I = 20;
935
- this.shapes.at(-1).rectWidth = this.copy(this.currentPointer.end.x - this.shapes.at(-1).x) > 0 ? this.copy(this.currentPointer.end.x - this.shapes.at(-1).x) : I, this.shapes.at(-1).rectHeight = this.copy(this.currentPointer.end.y - this.shapes.at(-1).y) > 0 ? this.copy(this.currentPointer.end.y - this.shapes.at(-1).y) : I;
936
- }
937
- });
938
- },
939
- drawDown() {
940
- if (this.isDrawing = !0, !this.activeShape && !this.isSelectMode || !this.isDrawing)
941
- return;
942
- this.isDrawingNewShape = !0, this.currentPointer.start = {
943
- x: this.pointerPosition.x,
944
- y: this.pointerPosition.y
945
- };
946
- let t = `${this.isSelectMode ? "group" : this.activeShape}_${Math.random() * 1e4}_${Date.now()}`;
947
- switch (!0) {
948
- case this.activeShape === "arrow":
949
- this.shapes.push({
950
- id: t,
951
- x: this.pointerPosition.x,
952
- y: this.pointerPosition.y,
953
- endX: this.pointerPosition.x,
954
- endY: this.pointerPosition.y,
955
- type: this.activeShape,
956
- color: this.copy(this.selectedColor),
957
- strokeWidth: this.copy(Math.abs(this.strokeSize)),
958
- isDash: this.copy(this.isDash)
959
- }), this.lastSelectedShape = this.shapes.at(-1);
960
- break;
961
- case this.activeShape === "circle":
962
- this.shapes.push({
963
- alpha: this.options.circle.filled ? this.colorTransparency : "",
964
- id: t,
965
- color: this.copy(this.selectedColor),
966
- isFilled: this.copy(this.options.circle.filled),
967
- circleRadius: this.copy(this.options.circle.radius),
968
- circleStrokeWidth: this.copy(this.options.circle.strokeWidth),
969
- type: this.activeShape,
970
- x: this.pointerPosition.x,
971
- y: this.pointerPosition.y,
972
- strokeWidth: this.copy(Math.abs(this.strokeSize)),
973
- isDash: this.copy(this.isDash)
974
- }), this.lastSelectedShape = this.shapes.at(-1);
975
- break;
976
- case this.activeShape === "line":
977
- this.shapes.push({
978
- alpha: this.copy(this.colorTransparency),
979
- id: t,
980
- x: this.pointerPosition.x,
981
- y: this.pointerPosition.y,
982
- type: this.activeShape,
983
- color: this.copy(this.selectedColor),
984
- strokeWidth: this.copy(Math.abs(this.strokeSize)),
985
- isDash: this.copy(this.isDash),
986
- path: `${this.pointerPosition.x} ${this.pointerPosition.y}`
987
- }), this.lastSelectedShape = this.shapes.at(-1);
988
- break;
989
- case this.activeShape === "rect":
990
- this.shapes.push({
991
- alpha: this.options.rect.filled ? this.colorTransparency : "",
992
- id: t,
993
- color: this.copy(this.selectedColor),
994
- isFilled: this.copy(this.options.rect.filled),
995
- rectStrokeWidth: this.copy(this.options.rect.strokeWidth),
996
- rectHeight: this.copy(this.options.rect.height),
997
- rectWidth: this.copy(this.options.rect.width),
998
- type: this.activeShape,
999
- x: this.pointerPosition.x,
1000
- y: this.pointerPosition.y,
1001
- strokeWidth: this.copy(Math.abs(this.strokeSize)),
1002
- isDash: this.copy(this.isDash)
1003
- }), this.lastSelectedShape = this.shapes.at(-1);
1004
- break;
1005
- case this.activeShape === "group":
1006
- this.shapes.push({
1007
- alpha: 1,
1008
- id: `group_${Math.random() * 1e4}_${Date.now()}`,
1009
- x: this.pointerPosition.x,
1010
- y: this.pointerPosition.y,
1011
- isFilled: !1,
1012
- rectHeight: this.copy(this.options.rect.height),
1013
- rectWidth: this.copy(this.options.rect.width),
1014
- rectStrokeWidth: 1,
1015
- type: "group",
1016
- color: "grey",
1017
- strokeWidth: 1,
1018
- isDash: !0,
1019
- content: ""
1020
- });
1021
- break;
1022
- }
1023
- if ((this.pointerDownId !== -1 || !this.isDrawing) && (clearInterval(this.pointerDownId), this.pointerDownId = -1), this.pointerDownId === -1 && this.isDrawing) {
1024
- this.pointerDownId = setInterval(this.drawUp, 1);
1025
- return;
1026
- }
1027
- },
1028
- move(t) {
1029
- if (!(!t || !t.id || t.type === "line"))
1030
- switch (this.lastSelectedShape = t, !0) {
1031
- case t.type === "arrow":
1032
- t.x = this.copy(this.pointerPosition.x), t.y = this.copy(this.pointerPosition.y);
1033
- break;
1034
- case t.type === "circle":
1035
- t.x = this.copy(this.pointerPosition.x), t.y = this.copy(this.pointerPosition.y);
1036
- break;
1037
- case t.type === "group":
1038
- this.moveGroup(t);
1039
- break;
1040
- case t.type === "rect":
1041
- t.x = this.copy(this.pointerPosition.x - t.rectWidth / 2), t.y = this.copy(this.pointerPosition.y - t.rectHeight / 2);
1042
- break;
1043
- case t.type === "text":
1044
- const i = Array.from(document.getElementsByTagName("text")).find(
1045
- (l) => l.id === t.id
1046
- );
1047
- if (!i)
1048
- return;
1049
- const { x: o, y: h, width: s, height: e } = i.getBBox();
1050
- t.textAlign === "start" && (t.x = this.copy(this.pointerPosition.x - s / 2)), t.textAlign === "middle" && (t.x = this.copy(this.pointerPosition.x)), t.textAlign === "end" && (t.x = this.copy(this.pointerPosition.x + s / 2)), t.lines > 1 ? t.y = this.copy(this.pointerPosition.y - e / 3) : t.y = this.copy(this.pointerPosition.y + t.fontSize / 2);
1051
- break;
1052
- }
1053
- },
1054
- moveDown() {
1055
- if (!this.currentTarget || !this.currentTarget.id)
1056
- return;
1057
- const t = this.currentTarget.id, i = this.shapes.find((o) => o.id === t);
1058
- this.shapes = this.shapes.filter((o) => o.id !== t), this.shapes.push(i), this.pointerDownId === -1 && t && this.move(i);
1059
- },
1060
- print() {
1061
- this.isPrinting = !0, this.isDeleteMode = !1, this.isMoveMode = !1, this.isResizeMode = !1, this.isTextMode = !1, this.isWriting = !1, this.isSelectMode = !1, this.activeShape = void 0, this.showCaret = !1, this.$nextTick(async () => {
1062
- const t = this.$refs.drawSvgContainer;
1063
- this.walkTheDOM(t, (i) => {
1064
- i && i.nodeType === 1 && (i.setAttribute("font-family", "Helvetica"), i.style.fontFamily = "Helvetica");
1065
- });
1066
- try {
1067
- let i;
1068
- try {
1069
- i = (await import("jspdf")).default;
1070
- } catch {
1071
- throw new Error("jspdf is not installed. Run npm install jspdf");
1072
- }
1073
- const o = await M({
1074
- container: t,
1075
- scale: 2
1076
- }), h = new Image();
1077
- h.src = o, h.onload = () => {
1078
- const s = {
1079
- width: 595.28,
1080
- height: 841.89
1081
- }, e = h.width, l = h.height, b = e / s.width * s.height, I = s.width, S = I / e * l, f = new i("", "pt", "a4");
1082
- let k = 0, x = l;
1083
- if (x < b)
1084
- f.addImage(o, "PNG", 0, 0, I, S, "", "FAST");
1085
- else
1086
- for (; x > 0; )
1087
- f.addImage(o, "PNG", 0, k, I, S, "", "FAST"), x -= b, k -= s.height, x > 0 && f.addPage();
1088
- f.save(`${(/* @__PURE__ */ new Date()).toLocaleDateString()}_annotations.pdf`);
1089
- };
1090
- } catch (i) {
1091
- console.error("Error generating image:", i);
1092
- } finally {
1093
- this.isPrinting = !1, this.walkTheDOM(t, (i) => {
1094
- i && i.nodeType === 1 && (i.setAttribute("font-family", this.FINAL_CONFIG.style.fontFamily), i.style.fontFamily = this.FINAL_CONFIG.style.fontFamily);
1095
- });
1096
- }
1097
- });
1098
- },
1099
- resetDraw() {
1100
- this.isDrawing = !1, this.isMouseDown = !1, this.pointerDownId = -1, this.isSelectMode && this.groupShapes(), clearInterval(this.pointerDownId);
1101
- },
1102
- resize() {
1103
- this.isDrawingNewShape = !1;
1104
- const t = this.currentTarget.id;
1105
- if (!t)
1106
- return;
1107
- this.isDrawing = !0;
1108
- const i = this.shapes.find((o) => o.id === t);
1109
- this.activeShape = i.type, this.shapes = this.shapes.filter((o) => o.id !== t), this.shapes.push(i), this.drawUp(!0);
1110
- },
1111
- setFillOfSelectedRect() {
1112
- !this.lastSelectedShape || !this.lastSelectedShape.id.includes("rect") || (this.lastSelectedShape.isFilled = !this.lastSelectedShape.isFilled);
1113
- },
1114
- setFillOfSelectedCircle() {
1115
- !this.lastSelectedShape || !this.lastSelectedShape.id.includes("circle") || (this.lastSelectedShape.isFilled = !this.lastSelectedShape.isFilled);
1116
- },
1117
- setColorOfSelectedShape() {
1118
- this.lastSelectedShape && (this.lastSelectedShape.color = this.copy(this.selectedColor), !["arrow", "text"].includes(this.lastSelectedShape.id) && (this.lastSelectedShape.alpha = this.copy(this.colorTransparency)));
1119
- },
1120
- setSelectedShapeToDash() {
1121
- !this.lastSelectedShape || this.lastSelectedShape.type === "text" || (this.lastSelectedShape.isDash = this.copy(this.isDash));
1122
- },
1123
- setTransparencyOfSelectedShape() {
1124
- !this.lastSelectedShape || ["arrow", "text"].includes(this.lastSelectedShape.id) || (this.lastSelectedShape.alpha = this.copy(this.colorTransparency));
1125
- },
1126
- setStrokeWidthOfSelectedShape() {
1127
- !this.lastSelectedShape || !["arrow", "circle", "rect", "line"].includes(this.lastSelectedShape.type) || (this.lastSelectedShape.strokeWidth = this.copy(Math.abs(this.strokeSize)));
1128
- },
1129
- setCurrentStyleOfSelectedText() {
1130
- !this.lastSelectedShape || this.lastSelectedShape.type !== "text" || (this.lastSelectedShape.isBold = this.copy(this.isBold), this.lastSelectedShape.isItalic = this.copy(this.isItalic), this.lastSelectedShape.isUnderline = this.copy(this.isUnderline), this.lastSelectedShape.fontSize = this.copy(this.textFont), this.lastSelectedShape.isBulletTextMode = this.copy(this.isBulletTextMode));
1131
- },
1132
- setPointer(t) {
1133
- t.preventDefault();
1134
- const o = this.$refs.mainSvg.getBoundingClientRect();
1135
- let h, s;
1136
- t.touches && t.touches.length > 0 ? (h = t.touches[0].clientX, s = t.touches[0].clientY) : (h = t.clientX, s = t.clientY), this.pointerPosition.x = (h - o.left) / o.width * this.svgWidth, this.pointerPosition.y = (s - o.top) / o.height * this.svgHeight;
1137
- },
1138
- setShapeTo(t) {
1139
- if (this.showCaret = !1, this.deleteEmptyTextElement(), t === this.activeShape) {
1140
- this.activeShape = void 0, this.isDrawMode = !1;
1141
- return;
1142
- }
1143
- this.isDrawMode = !0, this.isDeleteMode = !1, this.isMoveMode = !1, this.isResizeMode = !1, this.isTextMode = !1, this.activeShape = t;
1144
- },
1145
- toggleSummary() {
1146
- this.isSummaryOpen = !this.isSummaryOpen, this.isSummaryOpen || (this.isMoveMode = !1, this.isResizeMode = !1, this.isTextMode = !1, this.isWriting = !1, this.activeShape = void 0, this.showCaret = !1, this.isDeleteMode = !1, this.isWriting = !1), this.$emit("toggleOpenState", { isOpen: this.isSummaryOpen });
1147
- },
1148
- walkTheDOM(t, i) {
1149
- for (i(t), t = t.firstChild; t; )
1150
- this.walkTheDOM(t, i), t = t.nextSibling;
1151
- },
1152
- save() {
1153
- this.$emit("saveAnnotations", {
1154
- shapes: this.shapes,
1155
- lastSelectedShape: this.lastSelectedShape
1156
- });
1157
- }
1158
- }
1159
- }, T = { class: "vue-ui-annotator" }, R = { "data-dom-to-png-ignore": "" }, D = {
1160
- class: "tool-selection",
1161
- style: { "margin-top": "24px" }
1162
- }, z = ["disabled"], H = ["disabled"], W = ["disabled"], P = ["disabled"], B = {
1163
- style: { width: "80%" },
1164
- viewBox: "0 0 24 24"
1165
- }, V = ["disabled"], E = {
1166
- style: { width: "80%" },
1167
- viewBox: "0 0 24 24"
1168
- }, X = ["disabled"], U = {
1169
- style: { width: "80%" },
1170
- viewBox: "0 0 24 24"
1171
- }, Y = ["disabled"], j = ["disabled"], J = {
1172
- class: "tool-selection",
1173
- style: { "margin-top": "6px" }
1174
- }, Z = {
1175
- viewBox: "0 0 12 12",
1176
- style: { width: "100%" }
1177
- }, q = ["fill"], K = {
1178
- key: 0,
1179
- class: "tool-input"
1180
- }, Q = { for: "circleFill" }, $ = ["checked"], tt = {
1181
- viewBox: "0 0 12 12",
1182
- style: { width: "100%" }
1183
- }, et = ["fill"], it = {
1184
- key: 1,
1185
- class: "tool-input"
1186
- }, st = { for: "rectFill" }, ot = ["checked"], lt = {
1187
- viewBox: "0 0 24 24",
1188
- style: { width: "100%" }
1189
- }, rt = ["stroke"], dt = { key: 2 }, nt = { style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" } }, ct = {
1190
- for: "textFont",
1191
- style: { "font-size": "0.7em" }
1192
- }, ht = { key: 3 }, at = { style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" } }, ut = {
1193
- for: "dashStyle",
1194
- style: { "font-size": "0.7em" }
1195
- }, yt = {
1196
- viewBox: "0 0 24 24",
1197
- height: "24",
1198
- width: "24",
1199
- style: { "margin-bottom": "-5px", "margin-top": "-10px" }
1200
- }, bt = ["checked"], It = {
1201
- style: { width: "80%" },
1202
- viewBox: "0 0 24 24",
1203
- fill: "currentColor"
1204
- }, Ft = { key: 4 }, Nt = { style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" } }, ft = {
1205
- for: "textFont",
1206
- style: { "font-size": "0.7em" }
1207
- }, xt = { key: 5 }, Ct = { key: 6 }, gt = ["disabled"], St = { key: 7 }, kt = ["disabled"], pt = { key: 8 }, vt = { key: 9 }, wt = { key: 10 }, At = { key: 11 }, Mt = {
1208
- style: { display: "flex", "flex-direction": "column", "align-items": "center", "justify-content": "center" },
1209
- class: "tooltip"
1210
- }, Ot = { style: { display: "flex", "flex-direction": "column", "align-items": "start", "justify-content": "center" } }, Lt = {
1211
- for: "colorTransparency",
1212
- style: { "font-size": "0.7em" }
1213
- }, Gt = {
1214
- class: "annotator annotator__wrapper",
1215
- ref: "drawSvgContainer",
1216
- style: { position: "relative" }
1217
- }, _t = ["viewBox", "width", "height"], mt = ["id", "innerHTML"], Tt = ["height", "viewBox", "width"], Rt = ["cx", "cy"];
1218
- function Dt(t, i, o, h, s, e) {
1219
- return n(), d("div", T, [
1220
- r("div", R, [
1221
- r("details", {
1222
- class: "vue-ui-annotator-summary",
1223
- onToggle: i[36] || (i[36] = (...l) => e.toggleSummary && e.toggleSummary(...l)),
1224
- style: c(`${s.isSummaryOpen ? "padding-bottom: 12px" : ""}; background: ${e.FINAL_CONFIG.style.backgroundColor}; color:${e.FINAL_CONFIG.style.color}; ${e.FINAL_CONFIG.style.fixedTools && s.isSummaryOpen ? "position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 1;" : ""}`)
1225
- }, [
1226
- r("summary", null, u(e.FINAL_CONFIG.translations.title), 1),
1227
- r("div", D, [
1228
- r("button", {
1229
- disabled: s.shapes.length === 0,
1230
- style: c({
1231
- background: s.isMoveMode ? e.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1232
- border: s.isMoveMode ? e.FINAL_CONFIG.style.buttons.controls.selected.border : e.FINAL_CONFIG.style.buttons.controls.border,
1233
- color: s.isMoveMode ? e.FINAL_CONFIG.style.buttons.controls.selected.color : e.FINAL_CONFIG.style.buttons.controls.color,
1234
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1235
- }),
1236
- class: y({
1237
- "button-tool": !0,
1238
- "button-tool--selected": s.isMoveMode,
1239
- tooltip: !0
1240
- }),
1241
- onClick: i[0] || (i[0] = (l) => {
1242
- e.deleteEmptyTextElement(), s.isMoveMode = !s.isMoveMode, s.activeShape = void 0, s.isDeleteMode = !1, s.isDrawMode = !1, s.isResizeMode = !1, s.isSelectMode = !1, s.isTextMode = !1, s.isWriting = !1, s.showCaret = !1;
1243
- })
1244
- }, [
1245
- i[46] || (i[46] = F('<svg xmlns="http://www.w3.org/2000/svg" width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M18 9l3 3l-3 3" data-v-633bc577></path><path d="M15 12h6" data-v-633bc577></path><path d="M6 9l-3 3l3 3" data-v-633bc577></path><path d="M3 12h6" data-v-633bc577></path><path d="M9 18l3 3l3 -3" data-v-633bc577></path><path d="M12 15v6" data-v-633bc577></path><path d="M15 6l-3 -3l-3 3" data-v-633bc577></path><path d="M12 3v6" data-v-633bc577></path></svg>', 1)),
1246
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1247
- key: 0,
1248
- class: "tooltiptext",
1249
- style: c({
1250
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1251
- color: e.FINAL_CONFIG.style.tooltips.color,
1252
- border: e.FINAL_CONFIG.style.tooltips.border,
1253
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1254
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1255
- })
1256
- }, u(e.FINAL_CONFIG.translations.tooltipMove), 5)) : a("", !0)
1257
- ], 14, z),
1258
- r("button", {
1259
- disabled: s.shapes.length === 0 || s.activeShape === "line",
1260
- style: c({
1261
- background: s.isResizeMode ? e.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1262
- border: s.isResizeMode ? e.FINAL_CONFIG.style.buttons.controls.selected.border : e.FINAL_CONFIG.style.buttons.controls.border,
1263
- color: s.isResizeMode ? e.FINAL_CONFIG.style.buttons.controls.selected.color : e.FINAL_CONFIG.style.buttons.controls.color,
1264
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1265
- }),
1266
- class: y({
1267
- "button-tool": !0,
1268
- "button-tool--selected": s.isResizeMode,
1269
- tooltip: !0
1270
- }),
1271
- onClick: i[1] || (i[1] = (l) => {
1272
- e.deleteEmptyTextElement(), s.isResizeMode = !s.isResizeMode, s.isMoveMode = !1, s.isDeleteMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.isTextMode = !1, s.isWriting = !1, s.activeShape = void 0, s.showCaret = !1;
1273
- })
1274
- }, [
1275
- i[47] || (i[47] = r("svg", {
1276
- xmlns: "http://www.w3.org/2000/svg",
1277
- width: "80%",
1278
- viewBox: "0 0 24 24",
1279
- "stroke-width": "2",
1280
- stroke: "currentColor",
1281
- fill: "none",
1282
- "stroke-linecap": "round",
1283
- "stroke-linejoin": "round"
1284
- }, [
1285
- r("path", {
1286
- stroke: "none",
1287
- d: "M0 0h24v24H0z",
1288
- fill: "none"
1289
- }),
1290
- r("path", { d: "M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1" }),
1291
- r("path", { d: "M4 12h7a1 1 0 0 1 1 1v7" })
1292
- ], -1)),
1293
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1294
- key: 0,
1295
- class: "tooltiptext",
1296
- style: c({
1297
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1298
- color: e.FINAL_CONFIG.style.tooltips.color,
1299
- border: e.FINAL_CONFIG.style.tooltips.border,
1300
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1301
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1302
- })
1303
- }, u(e.FINAL_CONFIG.translations.tooltipResize), 5)) : a("", !0)
1304
- ], 14, H),
1305
- r("button", {
1306
- disabled: s.shapes.length === 0,
1307
- style: c({
1308
- background: s.isDeleteMode ? e.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1309
- border: s.isDeleteMode ? e.FINAL_CONFIG.style.buttons.controls.selected.border : e.FINAL_CONFIG.style.buttons.controls.border,
1310
- color: s.isDeleteMode ? e.FINAL_CONFIG.style.buttons.controls.selected.color : e.FINAL_CONFIG.style.buttons.controls.color,
1311
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1312
- }),
1313
- class: y({
1314
- "button-tool": !0,
1315
- "button-tool--selected": s.isDeleteMode,
1316
- tooltip: !0
1317
- }),
1318
- onClick: i[2] || (i[2] = (l) => {
1319
- e.deleteEmptyTextElement(), s.isDeleteMode = !s.isDeleteMode, s.isMoveMode = !1, s.isResizeMode = !1, s.isSelectMode = !1, s.isTextMode = !1, s.isWriting = !1, s.activeShape = void 0, s.showCaret = !1;
1320
- })
1321
- }, [
1322
- i[48] || (i[48] = F('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M4 7l16 0" data-v-633bc577></path><path d="M10 11l0 6" data-v-633bc577></path><path d="M14 11l0 6" data-v-633bc577></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" data-v-633bc577></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" data-v-633bc577></path></svg>', 1)),
1323
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1324
- key: 0,
1325
- class: "tooltiptext",
1326
- style: c({
1327
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1328
- color: e.FINAL_CONFIG.style.tooltips.color,
1329
- border: e.FINAL_CONFIG.style.tooltips.border,
1330
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1331
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1332
- })
1333
- }, u(e.FINAL_CONFIG.translations.tooltipDelete), 5)) : a("", !0)
1334
- ], 14, W),
1335
- r("button", {
1336
- disabled: !e.canSelect,
1337
- style: c({
1338
- background: s.isSelectMode ? e.FINAL_CONFIG.style.buttons.controls.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1339
- border: s.isSelectMode ? e.FINAL_CONFIG.style.buttons.controls.selected.border : e.FINAL_CONFIG.style.buttons.controls.border,
1340
- color: s.isSelectMode ? e.FINAL_CONFIG.style.buttons.controls.selected.color : e.FINAL_CONFIG.style.buttons.controls.color,
1341
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1342
- }),
1343
- class: y({
1344
- "button-tool": !0,
1345
- "button-tool--selected": s.isSelectMode,
1346
- tooltip: !0
1347
- }),
1348
- onClick: i[3] || (i[3] = (l) => {
1349
- e.deleteEmptyTextElement(), e.setShapeTo("group"), s.isSelectMode = !s.isSelectMode, s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isTextMode = !1, s.isWriting = !1, s.activeShape = "group", s.showCaret = !1;
1350
- })
1351
- }, [
1352
- (n(), d("svg", B, [...i[49] || (i[49] = [
1353
- r("path", {
1354
- fill: "currentColor",
1355
- d: "M1,1V5H2V19H1V23H5V22H19V23H23V19H22V5H23V1H19V2H5V1M5,4H19V5H20V19H19V20H5V19H4V5H5M6,6V14H9V18H18V9H14V6M8,8H12V12H8M14,11H16V16H11V14H14"
1356
- }, null, -1)
1357
- ])])),
1358
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1359
- key: 0,
1360
- class: "tooltiptext",
1361
- style: c({
1362
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1363
- color: e.FINAL_CONFIG.style.tooltips.color,
1364
- border: e.FINAL_CONFIG.style.tooltips.border,
1365
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1366
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1367
- })
1368
- }, u(e.FINAL_CONFIG.translations.tooltipGroup), 5)) : a("", !0)
1369
- ], 14, P),
1370
- r("button", {
1371
- disabled: s.shapes.length === 0,
1372
- style: c({
1373
- background: e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1374
- border: e.FINAL_CONFIG.style.buttons.controls.border,
1375
- color: e.FINAL_CONFIG.style.buttons.controls.color,
1376
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1377
- }),
1378
- class: y({ "button-tool": !0, tooltip: !0 }),
1379
- onClick: i[4] || (i[4] = (l) => {
1380
- s.isResizeMode = !1, s.isMoveMode = !0, s.isDeleteMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.isTextMode = !1, s.isWriting = !1, s.showCaret = !1, e.bringShapeTo("front");
1381
- })
1382
- }, [
1383
- (n(), d("svg", E, [...i[50] || (i[50] = [
1384
- r("path", {
1385
- fill: "currentColor",
1386
- d: "M2,2H11V6H9V4H4V9H6V11H2V2M22,13V22H13V18H15V20H20V15H18V13H22M8,8H16V16H8V8Z"
1387
- }, null, -1)
1388
- ])])),
1389
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1390
- key: 0,
1391
- class: "tooltiptext",
1392
- style: c({
1393
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1394
- color: e.FINAL_CONFIG.style.tooltips.color,
1395
- border: e.FINAL_CONFIG.style.tooltips.border,
1396
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1397
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1398
- })
1399
- }, u(e.FINAL_CONFIG.translations.tooltipBringToFront), 5)) : a("", !0)
1400
- ], 12, V),
1401
- r("button", {
1402
- disabled: s.shapes.length === 0,
1403
- style: c({
1404
- background: e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1405
- border: e.FINAL_CONFIG.style.buttons.controls.border,
1406
- color: e.FINAL_CONFIG.style.buttons.controls.color,
1407
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1408
- }),
1409
- class: y({ "button-tool": !0, tooltip: !0 }),
1410
- onClick: i[5] || (i[5] = (l) => {
1411
- s.isResizeMode = !1, s.isMoveMode = !0, s.isDeleteMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.isTextMode = !1, s.isWriting = !1, s.showCaret = !1, e.bringShapeTo("back");
1412
- })
1413
- }, [
1414
- (n(), d("svg", U, [...i[51] || (i[51] = [
1415
- r("path", {
1416
- fill: "currentColor",
1417
- d: "M2,2H11V11H2V2M9,4H4V9H9V4M22,13V22H13V13H22M15,20H20V15H15V20M16,8V11H13V8H16M11,16H8V13H11V16Z"
1418
- }, null, -1)
1419
- ])])),
1420
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1421
- key: 0,
1422
- class: "tooltiptext",
1423
- style: c({
1424
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1425
- color: e.FINAL_CONFIG.style.tooltips.color,
1426
- border: e.FINAL_CONFIG.style.tooltips.border,
1427
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1428
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1429
- })
1430
- }, u(e.FINAL_CONFIG.translations.tooltipBringToBack), 5)) : a("", !0)
1431
- ], 12, X),
1432
- r("button", {
1433
- disabled: s.shapes.length === 0 || s.activeShape === "line",
1434
- style: c({
1435
- background: e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1436
- border: e.FINAL_CONFIG.style.buttons.controls.border,
1437
- color: e.FINAL_CONFIG.style.buttons.controls.color,
1438
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1439
- }),
1440
- class: y({ "button-tool": !0, tooltip: !0 }),
1441
- onClick: i[6] || (i[6] = (l) => {
1442
- e.deleteEmptyTextElement(), s.isResizeMode = !1, s.isMoveMode = !0, s.isDeleteMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.isTextMode = !1, s.isWriting = !1, s.showCaret = !1, e.copyPaste();
1443
- })
1444
- }, [
1445
- i[52] || (i[52] = r("svg", {
1446
- width: "80%",
1447
- viewBox: "0 0 24 24",
1448
- "stroke-width": "2",
1449
- stroke: "currentColor",
1450
- fill: "none",
1451
- "stroke-linecap": "round",
1452
- "stroke-linejoin": "round"
1453
- }, [
1454
- r("path", {
1455
- stroke: "none",
1456
- d: "M0 0h24v24H0z",
1457
- fill: "none"
1458
- }),
1459
- r("path", { d: "M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z" }),
1460
- r("path", { d: "M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2" })
1461
- ], -1)),
1462
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1463
- key: 0,
1464
- class: "tooltiptext",
1465
- style: c({
1466
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1467
- color: e.FINAL_CONFIG.style.tooltips.color,
1468
- border: e.FINAL_CONFIG.style.tooltips.border,
1469
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1470
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1471
- })
1472
- }, u(e.FINAL_CONFIG.translations.tooltipDuplicate), 5)) : a("", !0)
1473
- ], 12, Y),
1474
- r("button", {
1475
- disabled: s.shapes.length === 0,
1476
- style: c({
1477
- background: e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1478
- border: e.FINAL_CONFIG.style.buttons.controls.border,
1479
- color: e.FINAL_CONFIG.style.buttons.controls.color,
1480
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1481
- }),
1482
- class: y({ "button-tool": !0, "button-tool--one-shot": !0, tooltip: !0 }),
1483
- onClick: i[7] || (i[7] = (l) => {
1484
- s.isResizeMode = !1, s.isMoveMode = !1, s.isDeleteMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.isTextMode = !1, s.isWriting = !1, s.activeShape = void 0, s.showCaret = !1, e.undoLastShape();
1485
- })
1486
- }, [
1487
- i[53] || (i[53] = r("svg", {
1488
- width: "80%",
1489
- viewBox: "0 0 24 24",
1490
- "stroke-width": "2",
1491
- stroke: "currentColor",
1492
- fill: "none",
1493
- "stroke-linecap": "round",
1494
- "stroke-linejoin": "round"
1495
- }, [
1496
- r("path", {
1497
- stroke: "none",
1498
- d: "M0 0h24v24H0z",
1499
- fill: "none"
1500
- }),
1501
- r("path", { d: "M9 14l-4 -4l4 -4" }),
1502
- r("path", { d: "M5 10h11a4 4 0 1 1 0 8h-1" })
1503
- ], -1)),
1504
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1505
- key: 0,
1506
- class: "tooltiptext",
1507
- style: c({
1508
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1509
- color: e.FINAL_CONFIG.style.tooltips.color,
1510
- border: e.FINAL_CONFIG.style.tooltips.border,
1511
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1512
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1513
- })
1514
- }, u(e.FINAL_CONFIG.translations.tooltipUndo), 5)) : a("", !0)
1515
- ], 12, j),
1516
- e.FINAL_CONFIG.style.showPrint ? (n(), d("button", {
1517
- key: 0,
1518
- style: c({
1519
- background: e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1520
- border: e.FINAL_CONFIG.style.buttons.controls.border,
1521
- color: e.FINAL_CONFIG.style.buttons.controls.color,
1522
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1523
- }),
1524
- class: y({ "button-tool": !0, tooltip: !0 }),
1525
- onClick: i[8] || (i[8] = (...l) => e.print && e.print(...l))
1526
- }, [
1527
- i[54] || (i[54] = F('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2" data-v-633bc577></path><path d="M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4" data-v-633bc577></path><path d="M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z" data-v-633bc577></path></svg>', 1)),
1528
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1529
- key: 0,
1530
- class: "tooltiptext",
1531
- style: c({
1532
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1533
- color: e.FINAL_CONFIG.style.tooltips.color,
1534
- border: e.FINAL_CONFIG.style.tooltips.border,
1535
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1536
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1537
- })
1538
- }, u(e.FINAL_CONFIG.translations.tooltipPdf), 5)) : a("", !0)
1539
- ], 4)) : a("", !0),
1540
- e.FINAL_CONFIG.style.showSave ? (n(), d("button", {
1541
- key: 1,
1542
- style: c({
1543
- background: e.FINAL_CONFIG.style.buttons.controls.backgroundColor,
1544
- border: e.FINAL_CONFIG.style.buttons.controls.border,
1545
- color: e.FINAL_CONFIG.style.buttons.controls.color,
1546
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1547
- }),
1548
- class: y({ "button-tool": !0, tooltip: !0 }),
1549
- onClick: i[9] || (i[9] = (...l) => e.save && e.save(...l))
1550
- }, [
1551
- i[55] || (i[55] = F('<svg width="100%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2" data-v-633bc577></path><path d="M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" data-v-633bc577></path><path d="M14 4l0 4l-6 0l0 -4" data-v-633bc577></path></svg>', 1)),
1552
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1553
- key: 0,
1554
- class: "tooltiptext",
1555
- style: c({
1556
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1557
- color: e.FINAL_CONFIG.style.tooltips.color,
1558
- border: e.FINAL_CONFIG.style.tooltips.border,
1559
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1560
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1561
- })
1562
- }, u(e.FINAL_CONFIG.translations.tooltipSave), 5)) : a("", !0)
1563
- ], 4)) : a("", !0)
1564
- ]),
1565
- r("div", J, [
1566
- r("button", {
1567
- class: y({
1568
- "button-tool": !0,
1569
- "button-tool--selected": s.activeShape === "circle",
1570
- tooltip: !0
1571
- }),
1572
- style: c({
1573
- background: s.activeShape === "circle" ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1574
- border: s.activeShape === "circle" ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1575
- color: s.activeShape === "circle" ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1576
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1577
- }),
1578
- onClick: i[10] || (i[10] = (l) => {
1579
- e.setShapeTo("circle"), s.isSelectMode = !1;
1580
- })
1581
- }, [
1582
- (n(), d("svg", Z, [
1583
- r("circle", {
1584
- cx: 6,
1585
- cy: 6,
1586
- r: "4",
1587
- fill: s.options.circle.filled ? (s.activeShape === "circle", s.selectedColor + e.colorTransparency) : "none",
1588
- stroke: "currentColor"
1589
- }, null, 8, q)
1590
- ])),
1591
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1592
- key: 0,
1593
- class: "tooltiptext",
1594
- style: c({
1595
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1596
- color: e.FINAL_CONFIG.style.tooltips.color,
1597
- border: e.FINAL_CONFIG.style.tooltips.border,
1598
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1599
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1600
- })
1601
- }, u(e.FINAL_CONFIG.translations.tooltipShapeCircle), 5)) : a("", !0)
1602
- ], 6),
1603
- s.activeShape === "circle" ? (n(), d("div", K, [
1604
- r("label", Q, u(e.FINAL_CONFIG.translations.filled), 1),
1605
- N(r("input", {
1606
- type: "checkbox",
1607
- "onUpdate:modelValue": i[11] || (i[11] = (l) => s.options.circle.filled = l),
1608
- onChange: i[12] || (i[12] = (...l) => e.setFillOfSelectedCircle && e.setFillOfSelectedCircle(...l)),
1609
- checked: s.options.circle.filled
1610
- }, null, 40, $), [
1611
- [g, s.options.circle.filled]
1612
- ])
1613
- ])) : a("", !0),
1614
- r("button", {
1615
- class: y({
1616
- "button-tool": !0,
1617
- "button-tool--selected": s.activeShape === "rect",
1618
- tooltip: !0
1619
- }),
1620
- style: c({
1621
- background: s.activeShape === "rect" ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1622
- border: s.activeShape === "rect" ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1623
- color: s.activeShape === "rect" ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1624
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1625
- }),
1626
- onClick: i[13] || (i[13] = (l) => {
1627
- e.setShapeTo("rect"), s.isSelectMode = !1;
1628
- })
1629
- }, [
1630
- (n(), d("svg", tt, [
1631
- r("rect", {
1632
- x: "3",
1633
- y: "3",
1634
- style: { rx: "0 !important", ry: "0 !important" },
1635
- height: "6",
1636
- width: "6",
1637
- fill: s.options.rect.filled ? (s.activeShape === "rect", s.selectedColor + e.colorTransparency) : "none",
1638
- stroke: "currentColor"
1639
- }, null, 8, et)
1640
- ])),
1641
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1642
- key: 0,
1643
- class: "tooltiptext",
1644
- style: c({
1645
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1646
- color: e.FINAL_CONFIG.style.tooltips.color,
1647
- border: e.FINAL_CONFIG.style.tooltips.border,
1648
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1649
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1650
- })
1651
- }, u(e.FINAL_CONFIG.translations.tooltipShapeRect), 5)) : a("", !0)
1652
- ], 6),
1653
- s.activeShape === "rect" ? (n(), d("div", it, [
1654
- r("label", st, u(e.FINAL_CONFIG.translations.filled), 1),
1655
- N(r("input", {
1656
- id: "rectFill",
1657
- type: "checkbox",
1658
- "onUpdate:modelValue": i[14] || (i[14] = (l) => s.options.rect.filled = l),
1659
- onChange: i[15] || (i[15] = (...l) => e.setFillOfSelectedRect && e.setFillOfSelectedRect(...l)),
1660
- checked: s.options.rect.filled
1661
- }, null, 40, ot), [
1662
- [g, s.options.rect.filled]
1663
- ])
1664
- ])) : a("", !0),
1665
- r("button", {
1666
- class: y({
1667
- "button-tool": !0,
1668
- "button-tool--selected": s.activeShape === "arrow",
1669
- tooltip: !0
1670
- }),
1671
- style: c({
1672
- background: s.activeShape === "arrow" ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1673
- border: s.activeShape === "arrow" ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1674
- color: s.activeShape === "arrow" ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1675
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1676
- }),
1677
- onClick: i[16] || (i[16] = (l) => {
1678
- e.setShapeTo("arrow"), s.isSelectMode = !1;
1679
- })
1680
- }, [
1681
- (n(), d("svg", lt, [
1682
- r("path", {
1683
- stroke: s.options.arrow.filled ? s.activeShape === "arrow" ? "white" : "grey" : "none",
1684
- "stroke-width": "2",
1685
- d: "M5,19 19,5 14,5 19,10.5 19,5",
1686
- fill: "none",
1687
- "stroke-linecap": "round",
1688
- "stroke-linejoin": "round"
1689
- }, null, 8, rt)
1690
- ])),
1691
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1692
- key: 0,
1693
- class: "tooltiptext",
1694
- style: c({
1695
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1696
- color: e.FINAL_CONFIG.style.tooltips.color,
1697
- border: e.FINAL_CONFIG.style.tooltips.border,
1698
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1699
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1700
- })
1701
- }, u(e.FINAL_CONFIG.translations.tooltipShapeArrow), 5)) : a("", !0)
1702
- ], 6),
1703
- r("button", {
1704
- class: y({
1705
- "button-tool": !0,
1706
- "button-tool--selected": s.activeShape === "line",
1707
- tooltip: !0
1708
- }),
1709
- style: c({
1710
- background: s.activeShape === "line" ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1711
- border: s.activeShape === "line" ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1712
- color: s.activeShape === "line" ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1713
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1714
- }),
1715
- onClick: i[17] || (i[17] = (l) => {
1716
- e.setShapeTo("line"), s.isSelectMode = !1;
1717
- })
1718
- }, [
1719
- i[56] || (i[56] = r("svg", {
1720
- width: "80%",
1721
- viewBox: "0 0 24 24",
1722
- "stroke-width": "2",
1723
- stroke: "currentColor",
1724
- fill: "none",
1725
- "stroke-linecap": "round",
1726
- "stroke-linejoin": "round"
1727
- }, [
1728
- r("path", {
1729
- stroke: "none",
1730
- d: "M0 0h24v24H0z",
1731
- fill: "none"
1732
- }),
1733
- 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" })
1734
- ], -1)),
1735
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1736
- key: 0,
1737
- class: "tooltiptext",
1738
- style: c({
1739
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1740
- color: e.FINAL_CONFIG.style.tooltips.color,
1741
- border: e.FINAL_CONFIG.style.tooltips.border,
1742
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1743
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1744
- })
1745
- }, u(e.FINAL_CONFIG.translations.tooltipShapeFreehand), 5)) : a("", !0)
1746
- ], 6),
1747
- ["arrow", "circle", "rect", "line"].includes(s.activeShape) ? (n(), d("div", dt, [
1748
- r("div", nt, [
1749
- r("label", ct, u(e.FINAL_CONFIG.translations.thickness), 1),
1750
- N(r("input", {
1751
- id: "textFont",
1752
- type: "number",
1753
- "onUpdate:modelValue": i[18] || (i[18] = (l) => s.strokeSize = l),
1754
- onInput: i[19] || (i[19] = (...l) => e.setStrokeWidthOfSelectedShape && e.setStrokeWidthOfSelectedShape(...l)),
1755
- style: { padding: "0 4px", width: "40px", border: "1px solid #dadada", "border-radius": "3px" }
1756
- }, null, 544), [
1757
- [C, s.strokeSize]
1758
- ])
1759
- ])
1760
- ])) : a("", !0),
1761
- ["arrow", "circle", "rect"].includes(s.activeShape) ? (n(), d("div", ht, [
1762
- r("div", at, [
1763
- r("label", ut, u(e.FINAL_CONFIG.translations.dashedLines), 1),
1764
- (n(), d("svg", yt, [...i[57] || (i[57] = [
1765
- r("line", {
1766
- x1: "0",
1767
- x2: "24",
1768
- y1: "12",
1769
- y2: "12",
1770
- "stroke-width": "2",
1771
- stroke: "black",
1772
- "stroke-dasharray": "3"
1773
- }, null, -1)
1774
- ])])),
1775
- N(r("input", {
1776
- id: "dashStyle",
1777
- name: "dashStyle",
1778
- type: "checkbox",
1779
- "onUpdate:modelValue": i[20] || (i[20] = (l) => s.isDash = l),
1780
- onChange: i[21] || (i[21] = (...l) => e.setSelectedShapeToDash && e.setSelectedShapeToDash(...l)),
1781
- checked: s.isDash
1782
- }, null, 40, bt), [
1783
- [g, s.isDash]
1784
- ])
1785
- ])
1786
- ])) : a("", !0),
1787
- r("button", {
1788
- class: y({
1789
- "button-tool": !0,
1790
- "button-tool--selected": s.isTextMode,
1791
- tooltip: !0
1792
- }),
1793
- style: c({
1794
- background: s.isTextMode ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1795
- border: s.isTextMode ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1796
- color: s.isTextMode ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1797
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1798
- }),
1799
- onClick: i[22] || (i[22] = (l) => {
1800
- e.deleteEmptyTextElement(), s.isTextMode = !s.isTextMode, s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isSelectMode = !1, s.isDrawMode = !1, s.activeShape = void 0;
1801
- })
1802
- }, [
1803
- (n(), d("svg", It, [...i[58] || (i[58] = [
1804
- r("path", { d: "M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z" }, null, -1)
1805
- ])])),
1806
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1807
- key: 0,
1808
- class: "tooltiptext",
1809
- style: c({
1810
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1811
- color: e.FINAL_CONFIG.style.tooltips.color,
1812
- border: e.FINAL_CONFIG.style.tooltips.border,
1813
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1814
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1815
- })
1816
- }, u(e.FINAL_CONFIG.translations.tooltipShapeText), 5)) : a("", !0)
1817
- ], 6),
1818
- s.isTextMode ? (n(), d("div", Ft, [
1819
- r("div", Nt, [
1820
- r("label", ft, u(e.FINAL_CONFIG.translations.fontSize), 1),
1821
- N(r("input", {
1822
- id: "textFont",
1823
- type: "number",
1824
- "onUpdate:modelValue": i[23] || (i[23] = (l) => s.textFont = l),
1825
- onInput: i[24] || (i[24] = (...l) => e.setCurrentStyleOfSelectedText && e.setCurrentStyleOfSelectedText(...l)),
1826
- style: { padding: "0 4px", width: "40px", border: "1px solid #dadada", "border-radius": "3px" }
1827
- }, null, 544), [
1828
- [C, s.textFont]
1829
- ])
1830
- ])
1831
- ])) : a("", !0),
1832
- s.isTextMode ? (n(), d("div", xt, [
1833
- r("button", {
1834
- class: y({
1835
- "button-tool": !0,
1836
- "button-tool--selected": s.textAlign === "start",
1837
- tooltip: !0
1838
- }),
1839
- style: c({
1840
- background: s.textAlign === "start" ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1841
- border: s.textAlign === "start" ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1842
- color: s.textAlign === "start" ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1843
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1844
- }),
1845
- onClick: i[25] || (i[25] = (l) => {
1846
- s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.activeShape = void 0, s.textAlign = "start", e.setSelectedTextAlignTo("start");
1847
- })
1848
- }, [
1849
- i[59] || (i[59] = F('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M4 6l16 0" data-v-633bc577></path><path d="M4 12l10 0" data-v-633bc577></path><path d="M4 18l14 0" data-v-633bc577></path></svg>', 1)),
1850
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1851
- key: 0,
1852
- class: "tooltiptext",
1853
- style: c({
1854
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1855
- color: e.FINAL_CONFIG.style.tooltips.color,
1856
- border: e.FINAL_CONFIG.style.tooltips.border,
1857
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1858
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1859
- })
1860
- }, u(e.FINAL_CONFIG.translations.tooltipShapeTextLeft), 5)) : a("", !0)
1861
- ], 6)
1862
- ])) : a("", !0),
1863
- s.isTextMode ? (n(), d("div", Ct, [
1864
- r("button", {
1865
- class: y({
1866
- "button-tool": !0,
1867
- "button-tool--selected": s.textAlign === "middle",
1868
- tooltip: !0
1869
- }),
1870
- style: c({
1871
- background: s.textAlign === "middle" ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1872
- border: s.textAlign === "middle" ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1873
- color: s.textAlign === "middle" ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1874
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1875
- }),
1876
- disabled: s.isBulletTextMode,
1877
- onClick: i[26] || (i[26] = (l) => {
1878
- s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.activeShape = void 0, s.textAlign = "middle", e.setSelectedTextAlignTo("middle");
1879
- })
1880
- }, [
1881
- i[60] || (i[60] = F('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M4 6l16 0" data-v-633bc577></path><path d="M8 12l8 0" data-v-633bc577></path><path d="M6 18l12 0" data-v-633bc577></path></svg>', 1)),
1882
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1883
- key: 0,
1884
- class: "tooltiptext",
1885
- style: c({
1886
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1887
- color: e.FINAL_CONFIG.style.tooltips.color,
1888
- border: e.FINAL_CONFIG.style.tooltips.border,
1889
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1890
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1891
- })
1892
- }, u(e.FINAL_CONFIG.translations.tooltipShapeTextCenter), 5)) : a("", !0)
1893
- ], 14, gt)
1894
- ])) : a("", !0),
1895
- s.isTextMode ? (n(), d("div", St, [
1896
- r("button", {
1897
- class: y({
1898
- "button-tool": !0,
1899
- "button-tool--selected": s.textAlign === "end",
1900
- tooltip: !0
1901
- }),
1902
- style: c({
1903
- background: s.textAlign === "end" ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1904
- border: s.textAlign === "end" ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1905
- color: s.textAlign === "end" ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1906
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1907
- }),
1908
- disabled: s.isBulletTextMode,
1909
- onClick: i[27] || (i[27] = (l) => {
1910
- s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.activeShape = void 0, s.textAlign = "end", e.setSelectedTextAlignTo("end");
1911
- })
1912
- }, [
1913
- i[61] || (i[61] = F('<svg width="80%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M4 6l16 0" data-v-633bc577></path><path d="M10 12l10 0" data-v-633bc577></path><path d="M6 18l14 0" data-v-633bc577></path></svg>', 1)),
1914
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1915
- key: 0,
1916
- class: "tooltiptext",
1917
- style: c({
1918
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1919
- color: e.FINAL_CONFIG.style.tooltips.color,
1920
- border: e.FINAL_CONFIG.style.tooltips.border,
1921
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1922
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1923
- })
1924
- }, u(e.FINAL_CONFIG.translations.tooltipShapeTextRight), 5)) : a("", !0)
1925
- ], 14, kt)
1926
- ])) : a("", !0),
1927
- s.isTextMode ? (n(), d("div", pt, [
1928
- r("button", {
1929
- class: y({
1930
- "button-tool": !0,
1931
- "button-tool--selected": s.isBulletTextMode,
1932
- tooltip: !0
1933
- }),
1934
- style: c({
1935
- background: s.isBulletTextMode ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1936
- border: s.isBulletTextMode ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1937
- color: s.isBulletTextMode ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1938
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1939
- }),
1940
- onClick: i[28] || (i[28] = (l) => {
1941
- s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.activeShape = void 0, s.isBulletTextMode = !s.isBulletTextMode, s.textAlign = "start", e.setSelectedTextAlignTo("start"), e.setCurrentStyleOfSelectedText();
1942
- })
1943
- }, [
1944
- i[62] || (i[62] = F('<svg width="100%" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M9 6l11 0" data-v-633bc577></path><path d="M9 12l11 0" data-v-633bc577></path><path d="M9 18l11 0" data-v-633bc577></path><path d="M5 6l0 .01" data-v-633bc577></path><path d="M5 12l0 .01" data-v-633bc577></path><path d="M5 18l0 .01" data-v-633bc577></path></svg>', 1)),
1945
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1946
- key: 0,
1947
- class: "tooltiptext",
1948
- style: c({
1949
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1950
- color: e.FINAL_CONFIG.style.tooltips.color,
1951
- border: e.FINAL_CONFIG.style.tooltips.border,
1952
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
1953
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
1954
- })
1955
- }, u(e.FINAL_CONFIG.translations.tooltipShapeTextBullet), 5)) : a("", !0)
1956
- ], 6)
1957
- ])) : a("", !0),
1958
- s.isTextMode ? (n(), d("div", vt, [
1959
- r("button", {
1960
- class: y({
1961
- "button-tool": !0,
1962
- "button-tool--selected": s.isBold,
1963
- tooltip: !0
1964
- }),
1965
- style: c({
1966
- background: s.isBold ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
1967
- border: s.isBold ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
1968
- color: s.isBold ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
1969
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
1970
- }),
1971
- onClick: i[29] || (i[29] = (l) => {
1972
- s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.activeShape = void 0, s.isBold = !s.isBold, e.setCurrentStyleOfSelectedText();
1973
- })
1974
- }, [
1975
- i[63] || (i[63] = r("svg", {
1976
- width: "100%",
1977
- viewBox: "0 0 24 24",
1978
- "stroke-width": "3",
1979
- stroke: "currentColor",
1980
- fill: "none",
1981
- "stroke-linecap": "round",
1982
- "stroke-linejoin": "round"
1983
- }, [
1984
- r("path", {
1985
- stroke: "none",
1986
- d: "M0 0h24v24H0z",
1987
- fill: "none"
1988
- }),
1989
- r("path", { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" }),
1990
- r("path", { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" })
1991
- ], -1)),
1992
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
1993
- key: 0,
1994
- class: "tooltiptext",
1995
- style: c({
1996
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
1997
- color: e.FINAL_CONFIG.style.tooltips.color,
1998
- border: e.FINAL_CONFIG.style.tooltips.border,
1999
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
2000
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
2001
- })
2002
- }, u(e.FINAL_CONFIG.translations.tooltipShapeTextBold), 5)) : a("", !0)
2003
- ], 6)
2004
- ])) : a("", !0),
2005
- s.isTextMode ? (n(), d("div", wt, [
2006
- r("button", {
2007
- class: y({
2008
- "button-tool": !0,
2009
- "button-tool--selected": s.isItalic,
2010
- tooltip: !0
2011
- }),
2012
- style: c({
2013
- background: s.isItalic ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
2014
- border: s.isItalic ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
2015
- color: s.isItalic ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
2016
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
2017
- }),
2018
- onClick: i[30] || (i[30] = (l) => {
2019
- s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.activeShape = void 0, s.isItalic = !s.isItalic, e.setCurrentStyleOfSelectedText();
2020
- })
2021
- }, [
2022
- i[64] || (i[64] = F('<svg width="100%" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" data-v-633bc577><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-633bc577></path><path d="M11 5l6 0" data-v-633bc577></path><path d="M7 19l6 0" data-v-633bc577></path><path d="M14 5l-4 14" data-v-633bc577></path></svg>', 1)),
2023
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
2024
- key: 0,
2025
- class: "tooltiptext",
2026
- style: c({
2027
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
2028
- color: e.FINAL_CONFIG.style.tooltips.color,
2029
- border: e.FINAL_CONFIG.style.tooltips.border,
2030
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
2031
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
2032
- })
2033
- }, u(e.FINAL_CONFIG.translations.tooltipShapeTextItalic), 5)) : a("", !0)
2034
- ], 6)
2035
- ])) : a("", !0),
2036
- s.isTextMode ? (n(), d("div", At, [
2037
- r("button", {
2038
- class: y({
2039
- "button-tool": !0,
2040
- "button-tool--selected": s.isUnderline,
2041
- tooltip: !0
2042
- }),
2043
- style: c({
2044
- background: s.isUnderline ? e.FINAL_CONFIG.style.buttons.shapes.selected.backgroundColor : e.FINAL_CONFIG.style.buttons.shapes.backgroundColor,
2045
- border: s.isUnderline ? e.FINAL_CONFIG.style.buttons.shapes.selected.border : e.FINAL_CONFIG.style.buttons.shapes.border,
2046
- color: s.isUnderline ? e.FINAL_CONFIG.style.buttons.shapes.selected.color : e.FINAL_CONFIG.style.buttons.shapes.color,
2047
- borderRadius: `${e.FINAL_CONFIG.style.buttons.borderRadius}px`
2048
- }),
2049
- onClick: i[31] || (i[31] = (l) => {
2050
- s.isDeleteMode = !1, s.isMoveMode = !1, s.isResizeMode = !1, s.isDrawMode = !1, s.isSelectMode = !1, s.activeShape = void 0, s.isUnderline = !s.isUnderline, e.setCurrentStyleOfSelectedText();
2051
- })
2052
- }, [
2053
- i[65] || (i[65] = r("svg", {
2054
- width: "100%",
2055
- viewBox: "0 0 24 24",
2056
- "stroke-width": "2",
2057
- stroke: "currentColor",
2058
- fill: "none",
2059
- "stroke-linecap": "round",
2060
- "stroke-linejoin": "round"
2061
- }, [
2062
- r("path", {
2063
- stroke: "none",
2064
- d: "M0 0h24v24H0z",
2065
- fill: "none"
2066
- }),
2067
- r("path", { d: "M7 5v5a5 5 0 0 0 10 0v-5" }),
2068
- r("path", { d: "M5 19h14" })
2069
- ], -1)),
2070
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
2071
- key: 0,
2072
- class: "tooltiptext",
2073
- style: c({
2074
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
2075
- color: e.FINAL_CONFIG.style.tooltips.color,
2076
- border: e.FINAL_CONFIG.style.tooltips.border,
2077
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
2078
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
2079
- })
2080
- }, u(e.FINAL_CONFIG.translations.tooltipShapeTextUnderline), 5)) : a("", !0)
2081
- ], 6)
2082
- ])) : a("", !0),
2083
- r("div", Mt, [
2084
- N(r("input", {
2085
- type: "color",
2086
- id: "colorPicker",
2087
- name: "colorPicker",
2088
- "onUpdate:modelValue": i[32] || (i[32] = (l) => s.selectedColor = l),
2089
- onInput: i[33] || (i[33] = (...l) => e.setColorOfSelectedShape && e.setColorOfSelectedShape(...l)),
2090
- style: c(`height: 30px; width: 30px; border-radius: ${e.FINAL_CONFIG.style.buttons.borderRadius}px; cursor: pointer`)
2091
- }, null, 36), [
2092
- [C, s.selectedColor]
2093
- ]),
2094
- e.FINAL_CONFIG.style.showTooltips ? (n(), d("span", {
2095
- key: 0,
2096
- class: "tooltiptext",
2097
- style: c({
2098
- backgroundColor: e.FINAL_CONFIG.style.tooltips.backgroundColor,
2099
- color: e.FINAL_CONFIG.style.tooltips.color,
2100
- border: e.FINAL_CONFIG.style.tooltips.border,
2101
- borderRadius: `${e.FINAL_CONFIG.style.tooltips.borderRadius}px`,
2102
- boxShadow: e.FINAL_CONFIG.style.tooltips.boxShadow
2103
- })
2104
- }, u(e.FINAL_CONFIG.translations.tooltipShapeColor), 5)) : a("", !0)
2105
- ]),
2106
- r("div", Ot, [
2107
- r("label", Lt, u(e.FINAL_CONFIG.translations.colorAlpha) + ": " + u(s.transparency > 98 ? 100 : s.transparency) + " % ", 1),
2108
- N(r("input", {
2109
- id: "colorTransparency",
2110
- name: "colorTransparency",
2111
- type: "range",
2112
- "onUpdate:modelValue": i[34] || (i[34] = (l) => s.transparency = l),
2113
- onInput: i[35] || (i[35] = (...l) => e.setTransparencyOfSelectedShape && e.setTransparencyOfSelectedShape(...l)),
2114
- min: 0,
2115
- max: 100,
2116
- style: { width: "100px" }
2117
- }, null, 544), [
2118
- [C, s.transparency]
2119
- ])
2120
- ])
2121
- ])
2122
- ], 36)
2123
- ]),
2124
- r("div", Gt, [
2125
- O(t.$slots, "default", {}, void 0, !0),
2126
- s.isSummaryOpen ? (n(), d("svg", {
2127
- id: "annotatorSvg",
2128
- key: s.step,
2129
- ref: "mainSvg",
2130
- class: y({ draw: !0, "draw--free": s.activeShape === "line" }),
2131
- style: c([`cursor:${e.cursorClass}; font-family: Helvetica; z-index: 100000000;`, { position: "absolute", top: "0", left: "0" }]),
2132
- viewBox: `0 0 ${s.svgWidth} ${s.svgHeight}`,
2133
- width: s.sourceWidth,
2134
- height: s.sourceHeight,
2135
- onPointerdown: i[38] || (i[38] = (l) => e.chooseAction(l)),
2136
- onPointerup: i[39] || (i[39] = (...l) => e.resetDraw && e.resetDraw(...l)),
2137
- onTouchend: i[40] || (i[40] = (...l) => e.resetDraw && e.resetDraw(...l)),
2138
- onTouchstart: i[41] || (i[41] = (l) => {
2139
- e.setPointer(l), e.clickSvg(l);
2140
- }),
2141
- onPointermove: i[42] || (i[42] = (l) => {
2142
- e.setPointer(l), e.chooseMove(l);
2143
- }),
2144
- onPointerout: i[43] || (i[43] = (l) => {
2145
- s.preventEdit = !0, s.hoveredShapeId = void 0;
2146
- }),
2147
- onPointerover: i[44] || (i[44] = (l) => e.allowEditAndHoverShapes(l)),
2148
- onClick: i[45] || (i[45] = (l) => e.clickSvg(l))
2149
- }, [
2150
- (n(!0), d(L, null, G(e.userShapes, (l, b) => (n(), d("g", {
2151
- key: `shape_${b}`,
2152
- id: l.id,
2153
- innerHTML: l,
2154
- onClick: i[37] || (i[37] = (I) => {
2155
- e.clickShape(I), s.isMoveMode = !1;
2156
- })
2157
- }, null, 8, mt))), 128))
2158
- ], 46, _t)) : a("", !0),
2159
- s.isPrinting ? (n(), d("svg", {
2160
- key: 1,
2161
- style: { position: "absolute", top: "0", left: "0" },
2162
- height: s.sourceHeight,
2163
- viewBox: `0 0 ${s.svgWidth} ${s.svgHeight}`,
2164
- width: s.sourceWidth
2165
- }, [
2166
- r("circle", {
2167
- class: "animated-circle-print",
2168
- cx: s.svgWidth / 2,
2169
- cy: s.svgHeight / 2,
2170
- r: "50",
2171
- stroke: "#6376DD",
2172
- "stroke-width": "10",
2173
- fill: "none"
2174
- }, null, 8, Rt)
2175
- ], 8, Tt)) : a("", !0)
2176
- ], 512)
2177
- ]);
2178
- }
2179
- const Vt = /* @__PURE__ */ _(m, [["render", Dt], ["__scopeId", "data-v-633bc577"]]);
2180
- export {
2181
- Vt as default
2182
- };