@cling-se/widget 0.9.3 → 0.9.5

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 (145) hide show
  1. package/dist/{AddClientCallout-746899d9.js → AddClientCallout-e4e9874f.js} +5 -5
  2. package/dist/{AnswerModal-fdfea0f8.js → AnswerModal-acd3b9c0.js} +248 -248
  3. package/dist/{AttachmentItem-5671c64d.js → AttachmentItem-34e91526.js} +8 -8
  4. package/dist/{BaseDatePicker-a9240306.js → BaseDatePicker-581297bc.js} +43 -43
  5. package/dist/{BaseInput-d3c3688b.js → BaseInput-29d88150.js} +1 -1
  6. package/dist/{BaseUpload-8e7a2b72.js → BaseUpload-84d3b68b.js} +27 -26
  7. package/dist/{BlockMedia-b613a2a4.js → BlockMedia-319932b8.js} +1 -1
  8. package/dist/{CCallout-e9ff903a.js → CCallout-88ae9c08.js} +6 -6
  9. package/dist/{CDropdownItem-05d84f95.js → CDropdownItem-d46bf062.js} +76 -75
  10. package/dist/{CField-cd4dcae9.js → CField-be05883b.js} +1 -1
  11. package/dist/{CSlider.vue_vue_type_style_index_0_lang-383db616.js → CSlider.vue_vue_type_style_index_0_lang-df4c839e.js} +1 -1
  12. package/dist/{ClientAutocomplete-421a2216.js → ClientAutocomplete-68f76bfc.js} +4 -4
  13. package/dist/{ClientModal-11341b1c.js → ClientModal-73086005.js} +16 -16
  14. package/dist/{ColorPicker-f90939b5.js → ColorPicker-11ee76f0.js} +2 -2
  15. package/dist/{CompanyModal-2bfd21b8.js → CompanyModal-0fec4480.js} +8 -8
  16. package/dist/{ContentWrapper-4aae35b2.js → ContentWrapper-fba78b6f.js} +19 -19
  17. package/dist/{CoverBlockSettings-1f917be3.js → CoverBlockSettings-7ffa15b1.js} +19 -19
  18. package/dist/{DocForm-0891c6b2.js → DocForm-e56b3a0c.js} +1208 -832
  19. package/dist/{DocFormSend-2b35999d.js → DocFormSend-cdc4eaf8.js} +14 -14
  20. package/dist/{DocModalBase-225e2f2d.js → DocModalBase-e473b946.js} +4 -4
  21. package/dist/DocPrint-6d8b1f14.js +222 -0
  22. package/dist/{DocReceipt-1391c17a.js → DocReceipt-c8a543f8.js} +1 -1
  23. package/dist/{DocSendReminder-c488842d.js → DocSendReminder-70effa09.js} +1 -1
  24. package/dist/{DocTextEditor-2538e1ab.js → DocTextEditor-cce51e7c.js} +19 -19
  25. package/dist/{DocTimeline-69ada0de.js → DocTimeline-c2cbd773.js} +11 -11
  26. package/dist/{DocumentClient-74b8f25b.js → DocumentClient-611c8c1c.js} +8 -6
  27. package/dist/{formValidationMixin-df38771c.js → DocumentLayout-86c367d1.js} +1617 -1709
  28. package/dist/{DocumentLogotype-e89b53fb.js → DocumentLogotype-441a9fdb.js} +3 -3
  29. package/dist/{EmbedInput-b7fefe5e.js → EmbedInput-a5938c25.js} +2 -2
  30. package/dist/{EmbedSettings-4957252f.js → EmbedSettings-141ab53c.js} +10 -10
  31. package/dist/ErrorCallout-7dea37df.js +30 -0
  32. package/dist/{FilePreviewModal-75693619.js → FilePreviewModal-875fd8c9.js} +8 -7
  33. package/dist/{HeaderSettings-9b69eada.js → HeaderSettings-0364b6df.js} +29 -29
  34. package/dist/{ImageSelectModal-94d4dc7f.js → ImageSelectModal-2d3a69db.js} +11 -11
  35. package/dist/{ImageUploadWrapper-a144b042.js → ImageUploadWrapper-7c70045f.js} +4 -4
  36. package/dist/{Index-023c3119.js → Index-006a27da.js} +10 -10
  37. package/dist/{Index-ec8d534f.js → Index-0313a553.js} +2 -2
  38. package/dist/{Index-4563d3fa.js → Index-06bd31c3.js} +26 -26
  39. package/dist/Index-07ae23ce.js +54 -0
  40. package/dist/{Index-62936c19.js → Index-0f4c9eb4.js} +34 -34
  41. package/dist/{Index-3dff19dd.js → Index-1e0cf88a.js} +10 -9
  42. package/dist/{Index-37a9183b.js → Index-1fc54467.js} +4 -4
  43. package/dist/{Index-abb8c6e4.js → Index-205dd368.js} +14 -14
  44. package/dist/{Index-b7def77a.js → Index-245f88ff.js} +10 -10
  45. package/dist/{Index-9a243eb8.js → Index-28bdb859.js} +2 -2
  46. package/dist/{Index-90492f19.js → Index-2a0c06b1.js} +3 -3
  47. package/dist/{Index-2cb8fa22.js → Index-3d84a32c.js} +9 -9
  48. package/dist/{Index-9ffe9766.js → Index-418c517f.js} +4 -4
  49. package/dist/{Index-f9b5f03c.js → Index-5196628a.js} +27 -27
  50. package/dist/{Index-dbe97658.js → Index-532b8844.js} +2 -2
  51. package/dist/{Index-96f39afc.js → Index-53348c92.js} +4 -4
  52. package/dist/{Index-cec7d4f1.js → Index-54962a1e.js} +15 -15
  53. package/dist/{Index-a37beb03.js → Index-5de564da.js} +2 -2
  54. package/dist/{Index-d68a28da.js → Index-6f957f7e.js} +15 -15
  55. package/dist/{Index-304c45be.js → Index-710d1132.js} +8 -8
  56. package/dist/{Index-a86ea774.js → Index-7a2f20fd.js} +9 -9
  57. package/dist/{Index-693005f0.js → Index-818ef607.js} +4 -4
  58. package/dist/Index-875e7805.js +79 -0
  59. package/dist/{Index-f453850f.js → Index-889b6a45.js} +18 -19
  60. package/dist/{Index-a554b58c.js → Index-8975cd1e.js} +4 -4
  61. package/dist/{Index-97d1f2f3.js → Index-affdb14c.js} +11 -10
  62. package/dist/{Index-3ee2e944.js → Index-b80ab22f.js} +2 -2
  63. package/dist/{Index-53da7be8.js → Index-ba48e68b.js} +8 -8
  64. package/dist/{Index-35387450.js → Index-beb43a1a.js} +95 -95
  65. package/dist/{Index-00ef9241.js → Index-c746dc64.js} +13 -13
  66. package/dist/{Index-1bafafca.js → Index-cf54ef50.js} +2 -2
  67. package/dist/{Index-4440fe3d.js → Index-dbf5c34c.js} +4 -4
  68. package/dist/{Index-bcc478b3.js → Index-fa01557d.js} +12 -12
  69. package/dist/{Index-78f13416.js → Index-ff60354c.js} +7 -7
  70. package/dist/{InputToggleRow-68320d9f.js → InputToggleRow-c520bed9.js} +5 -5
  71. package/dist/IsPremiumPreStep-d4739d6a.js +2443 -0
  72. package/dist/{MediaWrapper-c50879c2.js → MediaWrapper-722723f7.js} +3 -3
  73. package/dist/{NotBindingText-8f2d9244.js → NotBindingText-613399b6.js} +2 -2
  74. package/dist/{PackageGroup-2c49e99b.js → PackageGroup-1085c76c.js} +56 -56
  75. package/dist/{PdfTerms-94153a5f.js → PdfTerms-f98a6f75.js} +8 -7
  76. package/dist/{PdfViewer-701ad40e.js → PdfViewer-096bbf00.js} +5 -4
  77. package/dist/{PlainHtml-04a6d7f9.js → PlainHtml-752bc8d6.js} +1 -1
  78. package/dist/PriceHeader-e25df5eb.js +337 -0
  79. package/dist/{SearchApi-ffe5b697.js → SearchApi-20629627.js} +2 -2
  80. package/dist/{TermsSettings-b1bf19e9.js → TermsSettings-4cc4a9ee.js} +11 -11
  81. package/dist/{ThemeColorRow-913497f6.js → ThemeColorRow-c292abc6.js} +3 -3
  82. package/dist/{ToggleBinding-6518935d.js → ToggleBinding-406175fb.js} +3 -3
  83. package/dist/{UploadModal-3c399d25.js → UploadModal-0cbd0c8f.js} +16 -16
  84. package/dist/{VideoPlayerInput-b54845a4.js → VideoPlayerInput-d7b5fe4b.js} +3 -3
  85. package/dist/{VideoPlayerSettings-496e9e79.js → VideoPlayerSettings-51c75143.js} +12 -12
  86. package/dist/VideoSelectModal-e34cde4b.js +111 -0
  87. package/dist/{answerDocumentMixin-0e5e4dbb.js → answerDocumentMixin-574c5304.js} +3 -3
  88. package/dist/assets/article-options-10291.png +0 -0
  89. package/dist/assets/bg-base-13048.png +0 -0
  90. package/dist/assets/bg-pro-81076.png +0 -0
  91. package/dist/assets/bg-start-20630.png +0 -0
  92. package/dist/assets/blank-10674.png +0 -0
  93. package/dist/assets/block-options-17322.png +0 -0
  94. package/dist/assets/columnGallery.image-24825.png +0 -0
  95. package/dist/assets/doc-send-94456.png +0 -0
  96. package/dist/assets/drag-block-17194.png +0 -0
  97. package/dist/assets/headerCircularGradient.image-13878.png +0 -0
  98. package/dist/assets/roiCalculator.image-14704.png +0 -0
  99. package/dist/assets/text-bubble-53861.png +0 -0
  100. package/dist/{cssMode-c0865919.js → cssMode-eda08630.js} +19 -15
  101. package/dist/dom-068d1a7b.js +59 -0
  102. package/dist/{focusDrawerMixin-298861bc.js → focusDrawerMixin-72f8dd7a.js} +1 -1
  103. package/dist/{formComponentsInstall-1be6791d.js → formComponentsInstall-3f1c6477.js} +40 -40
  104. package/dist/formValidationMixin-d4e84872.js +49 -0
  105. package/dist/{freemarker2-85dde97c.js → freemarker2-42cdfba5.js} +23 -19
  106. package/dist/{handlebars-6aa1e52b.js → handlebars-b4515777.js} +15 -11
  107. package/dist/{html-f0c735cd.js → html-ea5d1845.js} +18 -14
  108. package/dist/{htmlMode-7b3bd7c9.js → htmlMode-1cc3531d.js} +23 -19
  109. package/dist/{index-1ef6f423.js → index-07377b76.js} +45 -45
  110. package/dist/index-676b9274.js +17 -0
  111. package/dist/{index-431938de.js → index-762349d7.js} +7 -7
  112. package/dist/{index-30808a2c.js → index-7adda710.js} +31 -31
  113. package/dist/index.es.js +8 -8
  114. package/dist/index.umd.js +537 -533
  115. package/dist/{javascript-9c54ad9e.js → javascript-185ef2e0.js} +15 -11
  116. package/dist/{jsonMode-1d1176fa.js → jsonMode-59ea4e99.js} +23 -19
  117. package/dist/{liquid-0738c73d.js → liquid-517f2a7c.js} +18 -14
  118. package/dist/{main-2d9b8259.js → main-95207159.js} +15376 -12887
  119. package/dist/{mapFormMixin-308bbdab.js → mapFormMixin-a245a297.js} +1 -1
  120. package/dist/{publicSenderState-9eecb11f.js → publicSenderState-bea5980b.js} +1 -1
  121. package/dist/{python-588c9e64.js → python-eb6703d8.js} +15 -11
  122. package/dist/{razor-fbaa1d21.js → razor-4c5b7deb.js} +22 -18
  123. package/dist/simplebar.min-97b539d6.js +71 -0
  124. package/dist/style.css +2 -2
  125. package/dist/template-b3af7583.js +528 -0
  126. package/dist/{throttle-d7bed81a.js → throttle-a0ce8f66.js} +2 -2
  127. package/dist/{tinycolor-ef496244.js → tinycolor-65e7dc2e.js} +1 -1
  128. package/dist/{FormInputRow-09d450e3.js → tippy.esm-3c111ba9.js} +285 -285
  129. package/dist/{tsMode-c1de8e10.js → tsMode-a4a0e653.js} +19 -15
  130. package/dist/{typescript-737827aa.js → typescript-aeab7849.js} +15 -11
  131. package/dist/{utils-69c41ae9.js → utils-580c7144.js} +1 -1
  132. package/dist/{vuedraggable.umd-67b8cddf.js → vuedraggable.umd-2c22e5f8.js} +41 -41
  133. package/dist/{xml-30e811a1.js → xml-098907e6.js} +18 -14
  134. package/package.json +3 -2
  135. package/stats.html +1 -1
  136. package/vite-plugin-library-asset-external/index.js +134 -0
  137. package/dist/ErrorCallout-42e45ec0.js +0 -30
  138. package/dist/Index-42e26b46.js +0 -79
  139. package/dist/Index-f2b66b79.js +0 -47
  140. package/dist/IsPremiumPreStep-0c7032a3.js +0 -1919
  141. package/dist/PriceHeader-7f92d5a7.js +0 -336
  142. package/dist/VideoSelectModal-3a566398.js +0 -111
  143. package/dist/index-6d08eac3.js +0 -14
  144. package/dist/simplebar.min-75960401.js +0 -2429
  145. package/dist/template-b877debf.js +0 -526
@@ -1,105 +1,119 @@
1
- import { aL as re, aM as ce, aN as R, aO as de, aP as G, aQ as U, aR as pe, aS as ue, aT as me, aU as he, f as fe, g as u, n as c, C as W, aV as ge, j as f, x as L, aW as Ce, aX as ve, w as ye, aY as xe, aZ as we, aK as _e, a_ as be, F as d, Y as m, b as p, aF as y, a$ as ke, b0 as Le, b1 as $e, b2 as Se, av as De, b3 as Te, c as Ve, e as _, X as Me, S as Ie, o as Be, aq as Fe, a7 as He, b4 as Ae, aH as q, aI as N, I as B, b5 as T, aJ as Pe, b6 as Ee, V as $, b7 as F, m as ze, a as Ze, b8 as Oe, u as Re } from "./main-2d9b8259.js";
2
- import { m as v, a as x } from "./vuex.esm-4a0fff7c.js";
3
- import "./index-30808a2c.js";
1
+ import { aW as de, aX as pe, aY as R, aZ as ue, a_ as G, a$ as U, b0 as me, b1 as he, b2 as fe, b3 as ge, f as Ce, g as u, n as c, C as W, b4 as ve, k as f, h as $, b5 as ye, b6 as xe, y as we, b7 as _e, b8 as be, aV as ke, b9 as Le, L as d, P as h, b as m, aQ as y, ba as $e, bb as Se, bc as De, bd as Ve, A as Te, be as Me, c as Be, e as _, a2 as q, S as Ie, q as Fe, aC as He, ac as Ae, bf as Pe, aS as N, aT as j, I, bg as V, aU as Ee, bh as ze, V as S, bi as F, m as Ze, a as Oe, bj as Re, u as Ge } from "./main-95207159.js";
2
+ import { m as g, a as x } from "./vuex.esm-4a0fff7c.js";
3
+ import "./index-7adda710.js";
4
4
  import { v as M } from "./index-805c56e4.js";
5
- import { d as I, w as b } from "./CDropdownItem-05d84f95.js";
6
- import { D as Ge, l as Ue, g as We, W as qe, b as Ne, a as je, s as Ke, f as Ye } from "./formValidationMixin-df38771c.js";
7
- import { s as S } from "./simplebar.min-75960401.js";
8
- import { B as Qe } from "./BlockMedia-b613a2a4.js";
9
- import { b as Je, a as j, I as Xe } from "./IsPremiumPreStep-0c7032a3.js";
10
- import { c as e1, g as t1 } from "./template-b877debf.js";
11
- import { a as i1 } from "./tinycolor-ef496244.js";
12
- import { m as k } from "./mapFormMixin-308bbdab.js";
13
- import { S as a1, C as K, i as n1 } from "./formComponentsInstall-1be6791d.js";
14
- import { s as C, f as s1 } from "./focusDrawerMixin-298861bc.js";
15
- import { F as Y, d as o1 } from "./FormInputRow-09d450e3.js";
16
- import { S as l1 } from "./CSlider.vue_vue_type_style_index_0_lang-383db616.js";
17
- import { o as r1, d as c1 } from "./vuedraggable.umd-67b8cddf.js";
18
- import d1 from "./AnswerModal-fdfea0f8.js";
5
+ import { d as B, w as b } from "./CDropdownItem-d46bf062.js";
6
+ import { D as Ue, l as We, g as qe, W as Ne, b as je, a as Ke } from "./DocumentLayout-86c367d1.js";
7
+ import { s as k } from "./simplebar.min-97b539d6.js";
8
+ import { B as Ye } from "./BlockMedia-319932b8.js";
9
+ import { b as Qe, I as K, a as Y } from "./IsPremiumPreStep-d4739d6a.js";
10
+ import { c as Je, g as Xe } from "./template-b3af7583.js";
11
+ import { a as e1 } from "./tinycolor-65e7dc2e.js";
12
+ import { m as L } from "./mapFormMixin-a245a297.js";
13
+ import { S as t1, C as Q, i as i1 } from "./formComponentsInstall-3f1c6477.js";
14
+ import { s as v, f as a1 } from "./focusDrawerMixin-72f8dd7a.js";
15
+ import { f as n1 } from "./formValidationMixin-d4e84872.js";
16
+ import { F as J, d as s1 } from "./tippy.esm-3c111ba9.js";
17
+ import { S as o1 } from "./CSlider.vue_vue_type_style_index_0_lang-df4c839e.js";
18
+ import { o as l1, d as r1 } from "./vuedraggable.umd-2c22e5f8.js";
19
+ import c1 from "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/drag-block-17194.png";
20
+ import d1 from "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/text-bubble-53861.png";
21
+ import p1 from "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/block-options-17322.png";
22
+ import u1 from "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/article-options-10291.png";
23
+ import m1 from "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/doc-send-94456.png";
24
+ import { s as h1 } from "./dom-068d1a7b.js";
25
+ import f1 from "./AnswerModal-acd3b9c0.js";
19
26
  import "./color-71c20583.js";
20
27
  import "./anime.es-e284c852.js";
21
28
  import "./regions-29ee6964.js";
22
- import "./BaseDatePicker-a9240306.js";
23
- import "./ErrorCallout-42e45ec0.js";
24
- import "./AddClientCallout-746899d9.js";
25
- import "./ClientAutocomplete-421a2216.js";
26
- import "./SearchApi-ffe5b697.js";
27
- import "./ClientModal-11341b1c.js";
28
- import "./CCallout-e9ff903a.js";
29
- import "./CField-cd4dcae9.js";
29
+ import "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/bg-pro-81076.png";
30
+ import "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/bg-base-13048.png";
31
+ import "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/bg-start-20630.png";
32
+ import "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/headerCircularGradient.image-13878.png";
33
+ import "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/columnGallery.image-24825.png";
34
+ import "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/roiCalculator.image-14704.png";
35
+ import "/Users/max.antonsson/Documents/Github/cling-vue/widget/dist/assets/blank-10674.png";
36
+ import "./BaseDatePicker-581297bc.js";
37
+ import "./ErrorCallout-7dea37df.js";
38
+ import "./AddClientCallout-e4e9874f.js";
39
+ import "./ClientAutocomplete-68f76bfc.js";
40
+ import "./SearchApi-20629627.js";
41
+ import "./ClientModal-73086005.js";
42
+ import "./CCallout-88ae9c08.js";
43
+ import "./CField-be05883b.js";
30
44
  import "./CField.vue_vue_type_style_index_0_lang-4ed993c7.js";
31
- import "./ColorPicker-f90939b5.js";
32
- var p1 = re, u1 = ce, m1 = R;
33
- function h1(i, e, t) {
45
+ import "./ColorPicker-11ee76f0.js";
46
+ var g1 = de, C1 = pe, v1 = R;
47
+ function y1(i, e, t) {
34
48
  for (var a = -1, n = e.length, s = {}; ++a < n; ) {
35
- var o = e[a], l = p1(i, o);
36
- t(l, o) && u1(s, m1(o, i), l);
49
+ var o = e[a], l = g1(i, o);
50
+ t(l, o) && C1(s, v1(o, i), l);
37
51
  }
38
52
  return s;
39
53
  }
40
- var f1 = h1;
41
- function g1(i, e) {
54
+ var x1 = y1;
55
+ function w1(i, e) {
42
56
  return i != null && e in Object(i);
43
57
  }
44
- var C1 = g1, v1 = de, y1 = G, x1 = "[object Arguments]";
45
- function w1(i) {
46
- return y1(i) && v1(i) == x1;
58
+ var _1 = w1, b1 = ue, k1 = G, L1 = "[object Arguments]";
59
+ function $1(i) {
60
+ return k1(i) && b1(i) == L1;
47
61
  }
48
- var _1 = w1, H = _1, b1 = G, Q = Object.prototype, k1 = Q.hasOwnProperty, L1 = Q.propertyIsEnumerable, $1 = H(function() {
62
+ var S1 = $1, H = S1, D1 = G, X = Object.prototype, V1 = X.hasOwnProperty, T1 = X.propertyIsEnumerable, M1 = H(function() {
49
63
  return arguments;
50
64
  }()) ? H : function(i) {
51
- return b1(i) && k1.call(i, "callee") && !L1.call(i, "callee");
52
- }, J = $1, S1 = 9007199254740991;
53
- function D1(i) {
54
- return typeof i == "number" && i > -1 && i % 1 == 0 && i <= S1;
65
+ return D1(i) && V1.call(i, "callee") && !T1.call(i, "callee");
66
+ }, ee = M1, B1 = 9007199254740991;
67
+ function I1(i) {
68
+ return typeof i == "number" && i > -1 && i % 1 == 0 && i <= B1;
55
69
  }
56
- var T1 = D1, V1 = R, M1 = J, I1 = U, B1 = pe, F1 = T1, H1 = ue;
57
- function A1(i, e, t) {
58
- e = V1(e, i);
70
+ var F1 = I1, H1 = R, A1 = ee, P1 = U, E1 = me, z1 = F1, Z1 = he;
71
+ function O1(i, e, t) {
72
+ e = H1(e, i);
59
73
  for (var a = -1, n = e.length, s = !1; ++a < n; ) {
60
- var o = H1(e[a]);
74
+ var o = Z1(e[a]);
61
75
  if (!(s = i != null && t(i, o)))
62
76
  break;
63
77
  i = i[o];
64
78
  }
65
- return s || ++a != n ? s : (n = i == null ? 0 : i.length, !!n && F1(n) && B1(o, n) && (I1(i) || M1(i)));
79
+ return s || ++a != n ? s : (n = i == null ? 0 : i.length, !!n && z1(n) && E1(o, n) && (P1(i) || A1(i)));
66
80
  }
67
- var P1 = A1, E1 = C1, z1 = P1;
68
- function Z1(i, e) {
69
- return i != null && z1(i, e, E1);
81
+ var R1 = O1, G1 = _1, U1 = R1;
82
+ function W1(i, e) {
83
+ return i != null && U1(i, e, G1);
70
84
  }
71
- var O1 = Z1, R1 = f1, G1 = O1;
72
- function U1(i, e) {
73
- return R1(i, e, function(t, a) {
74
- return G1(i, a);
85
+ var q1 = W1, N1 = x1, j1 = q1;
86
+ function K1(i, e) {
87
+ return N1(i, e, function(t, a) {
88
+ return j1(i, a);
75
89
  });
76
90
  }
77
- var W1 = U1;
78
- function q1(i, e) {
91
+ var Y1 = K1;
92
+ function Q1(i, e) {
79
93
  for (var t = -1, a = e.length, n = i.length; ++t < a; )
80
94
  i[n + t] = e[t];
81
95
  return i;
82
96
  }
83
- var N1 = q1, A = me, j1 = J, K1 = U, P = A ? A.isConcatSpreadable : void 0;
84
- function Y1(i) {
85
- return K1(i) || j1(i) || !!(P && i && i[P]);
97
+ var J1 = Q1, A = fe, X1 = ee, et = U, P = A ? A.isConcatSpreadable : void 0;
98
+ function tt(i) {
99
+ return et(i) || X1(i) || !!(P && i && i[P]);
86
100
  }
87
- var Q1 = Y1, J1 = N1, X1 = Q1;
88
- function X(i, e, t, a, n) {
101
+ var it = tt, at = J1, nt = it;
102
+ function te(i, e, t, a, n) {
89
103
  var s = -1, o = i.length;
90
- for (t || (t = X1), n || (n = []); ++s < o; ) {
104
+ for (t || (t = nt), n || (n = []); ++s < o; ) {
91
105
  var l = i[s];
92
- e > 0 && t(l) ? e > 1 ? X(l, e - 1, t, a, n) : J1(n, l) : a || (n[n.length] = l);
106
+ e > 0 && t(l) ? e > 1 ? te(l, e - 1, t, a, n) : at(n, l) : a || (n[n.length] = l);
93
107
  }
94
108
  return n;
95
109
  }
96
- var et = X, tt = et;
97
- function it(i) {
110
+ var st = te, ot = st;
111
+ function lt(i) {
98
112
  var e = i == null ? 0 : i.length;
99
- return e ? tt(i, 1) : [];
113
+ return e ? ot(i, 1) : [];
100
114
  }
101
- var at = it;
102
- function nt(i, e, t) {
115
+ var rt = lt;
116
+ function ct(i, e, t) {
103
117
  switch (t.length) {
104
118
  case 0:
105
119
  return i.call(e);
@@ -112,56 +126,56 @@ function nt(i, e, t) {
112
126
  }
113
127
  return i.apply(e, t);
114
128
  }
115
- var st = nt, ot = st, E = Math.max;
116
- function lt(i, e, t) {
129
+ var dt = ct, pt = dt, E = Math.max;
130
+ function ut(i, e, t) {
117
131
  return e = E(e === void 0 ? i.length - 1 : e, 0), function() {
118
132
  for (var a = arguments, n = -1, s = E(a.length - e, 0), o = Array(s); ++n < s; )
119
133
  o[n] = a[e + n];
120
134
  n = -1;
121
135
  for (var l = Array(e + 1); ++n < e; )
122
136
  l[n] = a[n];
123
- return l[e] = t(o), ot(i, this, l);
137
+ return l[e] = t(o), pt(i, this, l);
124
138
  };
125
139
  }
126
- var rt = lt;
127
- function ct(i) {
140
+ var mt = ut;
141
+ function ht(i) {
128
142
  return function() {
129
143
  return i;
130
144
  };
131
145
  }
132
- var dt = ct;
133
- function pt(i) {
146
+ var ft = ht;
147
+ function gt(i) {
134
148
  return i;
135
149
  }
136
- var ut = pt, mt = dt, z = he, ht = ut, ft = z ? function(i, e) {
150
+ var Ct = gt, vt = ft, z = ge, yt = Ct, xt = z ? function(i, e) {
137
151
  return z(i, "toString", {
138
152
  configurable: !0,
139
153
  enumerable: !1,
140
- value: mt(e),
154
+ value: vt(e),
141
155
  writable: !0
142
156
  });
143
- } : ht, gt = ft, Ct = 800, vt = 16, yt = Date.now;
144
- function xt(i) {
157
+ } : yt, wt = xt, _t = 800, bt = 16, kt = Date.now;
158
+ function Lt(i) {
145
159
  var e = 0, t = 0;
146
160
  return function() {
147
- var a = yt(), n = vt - (a - t);
161
+ var a = kt(), n = bt - (a - t);
148
162
  if (t = a, n > 0) {
149
- if (++e >= Ct)
163
+ if (++e >= _t)
150
164
  return arguments[0];
151
165
  } else
152
166
  e = 0;
153
167
  return i.apply(void 0, arguments);
154
168
  };
155
169
  }
156
- var wt = xt, _t = gt, bt = wt, kt = bt(_t), Lt = kt, $t = at, St = rt, Dt = Lt;
157
- function Tt(i) {
158
- return Dt(St(i, void 0, $t), i + "");
170
+ var $t = Lt, St = wt, Dt = $t, Vt = Dt(St), Tt = Vt, Mt = rt, Bt = mt, It = Tt;
171
+ function Ft(i) {
172
+ return It(Bt(i, void 0, Mt), i + "");
159
173
  }
160
- var Vt = Tt, Mt = W1, It = Vt, Bt = It(function(i, e) {
161
- return i == null ? {} : Mt(i, e);
162
- }), Ft = Bt;
163
- const Ht = /* @__PURE__ */ fe(Ft);
164
- const At = {
174
+ var Ht = Ft, At = Y1, Pt = Ht, Et = Pt(function(i, e) {
175
+ return i == null ? {} : At(i, e);
176
+ }), zt = Et;
177
+ const Zt = /* @__PURE__ */ Ce(zt);
178
+ const Ot = {
165
179
  i18nOptions: {
166
180
  namespaces: "DocumentTemplateFormModal",
167
181
  messages: {
@@ -198,6 +212,10 @@ const At = {
198
212
  template: {
199
213
  type: Object,
200
214
  default: null
215
+ },
216
+ onSaveTemplate: {
217
+ type: Function,
218
+ default: null
201
219
  }
202
220
  },
203
221
  data() {
@@ -214,7 +232,7 @@ const At = {
214
232
  }
215
233
  },
216
234
  computed: {
217
- ...v({
235
+ ...g({
218
236
  isPosting: "templates/isPosting",
219
237
  templateById: "templates/byId",
220
238
  docById: "documents2/byId",
@@ -247,7 +265,7 @@ const At = {
247
265
  if (!this.document && !this.template && (this.$log.error('Missing prop "document" or "template"'), this.$emit("close")), this.$v.$invalid)
248
266
  return;
249
267
  let i;
250
- this.document ? (i = this.getNewTemplate(), this.updateExistingDocTemplate && this.canUpdateExistingDocTemplate && this.document.template.id && (i.id = this.document.template.id, delete i.name)) : this.template && (i = this.getExistingTemplateBody()), await this.saveTemplate({ body: i }), this.$emit("close");
268
+ this.document ? (i = this.getNewTemplate(), this.updateExistingDocTemplate && this.canUpdateExistingDocTemplate && this.document.template.id && (i.id = this.document.template.id, delete i.name)) : this.template && (i = this.getExistingTemplateBody()), await this.saveTemplate({ body: i, callback: this.onSaveTemplate }), this.$emit("close");
251
269
  },
252
270
  getNewTemplate() {
253
271
  return {
@@ -291,31 +309,31 @@ const At = {
291
309
  }
292
310
  }
293
311
  };
294
- var Pt = function() {
312
+ var Rt = function() {
295
313
  var e = this, t = e._self._c;
296
- return t("div", { staticClass: "t-root font-inter" }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "700", "text-align": "center", "margin-bottom": "1em" } }, [e._v(" " + e._s(e.template ? e.$t("_common:edit", { thing: e.$t("_common:name") }) : e.$t("_common:save", { thing: e.$t("_common:template") })) + " ")]), t("div", [e.template ? e._e() : t("CCallout", [e._v(" " + e._s(e.$t("calloutDescription")) + " ")]), t("CField", { attrs: { vuelidate: e.$v.name, "vuelidate-messages": e.messages.name, label: e.$t("_common:name").capitalize(), "label-position": "inside" } }, [t("CInput", { ref: "input", staticClass: "rounder", staticStyle: { "margin-bottom": "1rem" }, attrs: { value: e.updateExistingDocTemplate ? e.document.template.name : e.name, placeholder: e.$t("namePlaceholder"), disabled: e.updateExistingDocTemplate, autofocus: "", size: "medium" }, on: { input: function(a) {
314
+ return t("div", { staticClass: "t-root font-inter" }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "700", "text-align": "center", "margin-bottom": "1em" } }, [e._v(" " + e._s(e.template ? e.$t("_common:edit", { thing: e.$t("_common:name") }) : e.$t("_common:save", { thing: e.$t("_common:template") })) + " ")]), t("div", [e.template ? e._e() : t("CCallout", [e._v(" " + e._s(e.$t("calloutDescription")) + " ")]), t("CField", { attrs: { vuelidate: e.$v.name, "vuelidate-messages": e.messages.name, label: e.$t("_common:name").capitalize(), "label-position": "inside" } }, [t("CInput", { ref: "input", staticClass: "rounder", staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { value: e.updateExistingDocTemplate ? e.document.template.name : e.name, placeholder: e.$t("namePlaceholder"), disabled: e.updateExistingDocTemplate, autofocus: "", size: "medium" }, on: { input: function(a) {
297
315
  e.name = a;
298
- } } })], 1), e.document && e.document.template.id && e.canUpdateExistingDocTemplate ? t("div", [t("CField", { staticStyle: { "padding-left": "0.5rem", "margin-bottom": "0.5rem" } }, [t("CCheckbox", { attrs: { type: "secondary", size: "normal" }, model: { value: e.updateExistingDocTemplate, callback: function(a) {
316
+ } } })], 1), e.document && e.document.template.id && e.canUpdateExistingDocTemplate ? t("div", [t("CField", { staticStyle: { "padding-left": "calc(0.5 * var(--rem))", "margin-bottom": "calc(0.5 * var(--rem))" } }, [t("CCheckbox", { attrs: { type: "secondary", size: "normal" }, model: { value: e.updateExistingDocTemplate, callback: function(a) {
299
317
  e.updateExistingDocTemplate = a;
300
- }, expression: "updateExistingDocTemplate" } }, [t("div", { staticClass: "has-text-grey-dark" }, [e._v(" " + e._s(e.$t("updateExisting")) + " ")])])], 1)], 1) : e._e(), e.document && e.document.clients.length ? t("div", [t("CField", { staticStyle: { "padding-left": "0.5rem", "margin-bottom": "0.5rem" } }, [t("CCheckbox", { attrs: { type: "secondary", size: "normal" }, model: { value: e.keepClients, callback: function(a) {
318
+ }, expression: "updateExistingDocTemplate" } }, [t("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("updateExisting")) + " ")])])], 1)], 1) : e._e(), e.document && e.document.clients.length ? t("div", [t("CField", { staticStyle: { "padding-left": "calc(0.5 * var(--rem))", "margin-bottom": "calc(0.5 * var(--rem))" } }, [t("CCheckbox", { attrs: { type: "secondary", size: "normal" }, model: { value: e.keepClients, callback: function(a) {
301
319
  e.keepClients = a;
302
- }, expression: "keepClients" } }, [t("div", { staticClass: "has-text-grey-dark" }, [e._v(" " + e._s(e.$t("keepClients")) + " ")])])], 1)], 1) : e._e()], 1), t("CButton", { staticStyle: { "margin-top": "1.5em" }, attrs: { loading: e.isPosting, type: "secondary", wide: "", taller: "" }, on: { click: e.onSave } }, [e._v(" " + e._s(e.actionButtonText) + " ")])], 1);
303
- }, Et = [], zt = /* @__PURE__ */ c(
304
- At,
305
- Pt,
306
- Et,
320
+ }, expression: "keepClients" } }, [t("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("keepClients")) + " ")])])], 1)], 1) : e._e()], 1), t("CButton", { staticStyle: { "margin-top": "1.5em" }, attrs: { loading: e.isPosting, type: "secondary", wide: "", taller: "" }, on: { click: e.onSave } }, [e._v(" " + e._s(e.actionButtonText) + " ")])], 1);
321
+ }, Gt = [], Ut = /* @__PURE__ */ c(
322
+ Ot,
323
+ Rt,
324
+ Gt,
307
325
  !1,
308
326
  null,
309
- "7b8afc91",
327
+ "9f39f8ce",
310
328
  null,
311
329
  null
312
330
  );
313
- const ee = zt.exports;
314
- const Zt = {
331
+ const ie = Ut.exports;
332
+ const Wt = {
315
333
  name: "GalleryTemplateModal",
316
334
  components: {
317
- simplebar: S,
318
- DocumentLayout: Ge
335
+ simplebar: k,
336
+ DocumentLayout: Ue
319
337
  },
320
338
  props: {
321
339
  // Instance of template
@@ -358,7 +376,7 @@ const Zt = {
358
376
  };
359
377
  },
360
378
  computed: {
361
- ...v({
379
+ ...g({
362
380
  isLoading: "templates/isPosting"
363
381
  }),
364
382
  previewDocument() {
@@ -382,7 +400,7 @@ const Zt = {
382
400
  const i = this.template.id;
383
401
  i || (this.templateStat = null);
384
402
  try {
385
- const { data: e } = await ge.get(i);
403
+ const { data: e } = await ve.get(i);
386
404
  this.templateStat = e;
387
405
  } catch {
388
406
  this.templateStat = null;
@@ -396,7 +414,7 @@ const Zt = {
396
414
  }
397
415
  }
398
416
  };
399
- var Ot = function() {
417
+ var qt = function() {
400
418
  var a;
401
419
  var e = this, t = e._self._c;
402
420
  return t("div", { staticClass: "template-modal font-inter" }, [t("div", { staticStyle: { "background-color": "white", "border-radius": "1em", overflow: "auto", border: "10px solid white", "box-shadow": "rgb(244, 244, 244) 0px 2px 14px 0px inset, rgba(0, 0, 0, 0.09) 0px 8px 35px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px inset", flex: "1 1 auto" } }, [t("simplebar", [e.previewDocument ? t("DocumentLayout", { attrs: { document: e.previewDocument } }) : e._e()], 1)], 1), t("div", { staticStyle: { flex: "0 1 300px", padding: "2em 1em 3em 2em", "font-size": "18px" } }, [t("div", { staticStyle: { "padding-bottom": "2em" } }, [t("div", { staticStyle: { "font-size": "21px", "font-weight": "800", color: "hsl(0, 0%, 0%)" } }, [e._v(" " + e._s(e.meta.name) + " ")]), t("div", { staticStyle: { "font-weight": "400", "font-size": "14px", "min-height": "30px", color: "hsl(0, 0%, 27%)" } }, [(a = e.templateStat) != null && a.usedTimes ? [e._v(" " + e._s(e.$t("_common:used").capitalize()) + " " + e._s(e.templateStat.usedTimes) + " " + e._s(e.$t("_common:times", { count: e.templateStat.usedTimes })) + " ")] : e._e()], 2), t("div", { staticStyle: { hyphens: "auto" } }, [e._v(" " + e._s(e.meta.text) + " ")]), t("div", { staticClass: "flex items-center", staticStyle: { "padding-top": "1.5em" } }, [t("div", { staticStyle: { "background-color": "#03f", "border-radius": "50%", width: "2.5em", height: "2.5em", "background-size": "cover", "background-position": "center", "background-repeat": "no-repeat" }, style: {
@@ -404,17 +422,17 @@ var Ot = function() {
404
422
  } }), t("div", { staticStyle: { "margin-left": "0.5em" } }, [t("div", { staticStyle: { "font-weight": "500" } }, [e._v(e._s(e.meta.author.name))]), t("div", { staticStyle: { "font-weight": "400", "font-size": "14px" } }, [e.meta.author.templatesCount ? [e._v(" " + e._s(e.meta.author.templatesCount) + " " + e._s(e.$t("_common:template", { count: e.meta.author.templatesCount })) + " ")] : [e._v(e._s(e.$t("_common:template").capitalize()))]], 2)])])]), t("div", { staticStyle: { "padding-bottom": "2em" } }, [t("CButton", { staticStyle: { "margin-bottom": "0.5em" }, attrs: { type: "secondary", wide: "" }, on: { click: e.useSelectedTemplate } }, [e._v(" " + e._s(e.$t("_common:use", { thing: e.$t("_common:template") })) + " ")]), e.showSave ? t("CButton", { attrs: { loading: e.isLoading, type: e.didSave ? "success" : "none", "icon-left": e.didSave ? "check" : void 0, wide: "" }, on: { click: function(n) {
405
423
  e.didSave || e.saveAsTemplate();
406
424
  } } }, [e._v(" " + e._s(e.didSave ? e.$t("_common:savedThing", { thing: e.$t("_common:template") }) : e.$t("_common:saveAs", { thing: e.$t("_common:template") })) + " ")]) : e._e()], 1)])]);
407
- }, Rt = [], Gt = /* @__PURE__ */ c(
408
- Zt,
409
- Ot,
410
- Rt,
425
+ }, Nt = [], jt = /* @__PURE__ */ c(
426
+ Wt,
427
+ qt,
428
+ Nt,
411
429
  !1,
412
430
  null,
413
431
  "e2568605",
414
432
  null,
415
433
  null
416
434
  );
417
- const Ut = Gt.exports, Wt = {
435
+ const Kt = jt.exports, Yt = {
418
436
  name: "GalleryLogic",
419
437
  i18nOptions: {
420
438
  namespaces: "GalleryLogic",
@@ -529,7 +547,7 @@ const Ut = Gt.exports, Wt = {
529
547
  const s = this.templateGalleryItems.find(({ id: o }) => o === t);
530
548
  this.selectGalleryItem(s);
531
549
  } catch (s) {
532
- L(s);
550
+ $(s);
533
551
  }
534
552
  });
535
553
  },
@@ -544,7 +562,7 @@ const Ut = Gt.exports, Wt = {
544
562
  const t = await this.fetchGallery(e);
545
563
  this.templateGalleryItems = t || [], this.availableCategoryKeys = t.reduce((a, n) => [.../* @__PURE__ */ new Set([...a, ...n.categories])], []);
546
564
  } catch (t) {
547
- L(t);
565
+ $(t);
548
566
  } finally {
549
567
  this.isLoading = !1, typeof i == "function" && i();
550
568
  }
@@ -556,7 +574,7 @@ const Ut = Gt.exports, Wt = {
556
574
  populate: "templateId",
557
575
  isVisibleApp: !0
558
576
  }, t = await this.fetchGallery(e), a = (s = t == null ? void 0 : t[0]) == null ? void 0 : s.templateId;
559
- return a ? (Ce(a), new ve(a)) : null;
577
+ return a ? (ye(a), new xe(a)) : null;
560
578
  },
561
579
  onUseTemplate(i) {
562
580
  if (!i)
@@ -579,7 +597,7 @@ const Ut = Gt.exports, Wt = {
579
597
  fortnoxCom: "/img/fortnox/apple-touch-icon-180x180.png"
580
598
  };
581
599
  this.$modal.show(
582
- Ut,
600
+ Kt,
583
601
  {
584
602
  template: i,
585
603
  meta: {
@@ -587,7 +605,7 @@ const Ut = Gt.exports, Wt = {
587
605
  text: e.description,
588
606
  author: {
589
607
  name: this.$t("_common:brand.name"),
590
- avatar: t[this.$brand],
608
+ avatar: t[f.brand],
591
609
  templatesCount: this.templateGalleryItems.length
592
610
  }
593
611
  },
@@ -628,30 +646,30 @@ const Ut = Gt.exports, Wt = {
628
646
  selectGalleryItem: this.selectGalleryItem
629
647
  });
630
648
  }
631
- }, qt = null, Nt = null;
632
- var jt = /* @__PURE__ */ c(
633
- Wt,
634
- qt,
635
- Nt,
649
+ }, Qt = null, Jt = null;
650
+ var Xt = /* @__PURE__ */ c(
651
+ Yt,
652
+ Qt,
653
+ Jt,
636
654
  !1,
637
655
  null,
638
656
  null,
639
657
  null,
640
658
  null
641
659
  );
642
- const Kt = jt.exports;
643
- const Yt = {
660
+ const e2 = Xt.exports;
661
+ const t2 = {
644
662
  name: "DocumentIcon",
645
- truncate: ye,
663
+ truncate: we,
646
664
  inject: {
647
665
  components: {
648
666
  default: {
649
- BlockMedia: Qe
667
+ BlockMedia: Ye
650
668
  }
651
669
  }
652
670
  }
653
671
  };
654
- var Qt = function(e, t) {
672
+ var i2 = function(e, t) {
655
673
  return e("div", t._b({ key: t.data.key, staticClass: "item", class: [
656
674
  t.data.staticClass,
657
675
  {
@@ -664,21 +682,21 @@ var Qt = function(e, t) {
664
682
  } } }, "div", t.data.attrs, !1), [e("div", { staticClass: "item-paper" }, [t.props.thumbnail ? e("div", { staticStyle: { width: "100%", height: "100%", "background-size": "100% auto", "background-repeat": "no-repeat", "background-position": "0% 0%" }, style: {
665
683
  backgroundImage: `url(${t.props.thumbnail})`
666
684
  } }) : t.props.isPlaceholder || t.props.isAdd ? t._e() : e(t.injections.components.BlockMedia, { tag: "component", staticClass: "item-media", attrs: { media: t.props.media, preview: "" } }), t.props.isAdd ? e("div", { staticClass: "add-button" }, [e("BaseIcon", { attrs: { size: 18, "stroke-width": 3, type: "plus" } })], 1) : t._e()], 1), e("div", { staticClass: "item-footer" }, [t.props.isAdd ? e("div", { staticClass: "item-text", staticStyle: { color: "hsl(0, 0%, 55%)" }, domProps: { textContent: t._s(t.parent.$t("_common:empty", { thing: t.parent.$t("_common:template") })) } }) : t.props.name ? [e("div", { staticClass: "item-text", domProps: { textContent: t._s(t.$options.truncate(t.props.name, 60)) } }), t._t("default")] : t._e()], 2)]);
667
- }, Jt = [], Xt = /* @__PURE__ */ c(
668
- Yt,
669
- Qt,
670
- Jt,
685
+ }, a2 = [], n2 = /* @__PURE__ */ c(
686
+ t2,
687
+ i2,
688
+ a2,
671
689
  !0,
672
690
  null,
673
- "493bd35d",
691
+ "6b8b46e0",
674
692
  null,
675
693
  null
676
694
  );
677
- const e2 = Xt.exports;
678
- const t2 = {
695
+ const s2 = n2.exports;
696
+ const o2 = {
679
697
  name: "HorizontalScroll",
680
698
  components: {
681
- Simplebar: S
699
+ Simplebar: k
682
700
  },
683
701
  data() {
684
702
  return {
@@ -722,7 +740,7 @@ const t2 = {
722
740
  }
723
741
  }
724
742
  };
725
- var i2 = function() {
743
+ var l2 = function() {
726
744
  var e = this, t = e._self._c;
727
745
  return t("div", { ref: "container", staticClass: "horizontal-scroll" }, [t("div", { staticClass: "hl-navigation" }, [e.hasPrev ? t("div", { staticClass: "hl-btn-left", on: { click: function(a) {
728
746
  return e.go(-1);
@@ -735,18 +753,18 @@ var i2 = function() {
735
753
  return e.$emit("expand");
736
754
  } } })];
737
755
  })], 2) : e._e()]), t("div", { staticClass: "hl-container" }, [t("Simplebar", { ref: "list", staticClass: "hl-list", on: { scroll: e.scrollHandler } }, [t("div", { staticClass: "flex w-full" }, [e._t("default")], 2)])], 1)]);
738
- }, a2 = [], n2 = /* @__PURE__ */ c(
739
- t2,
740
- i2,
741
- a2,
756
+ }, r2 = [], c2 = /* @__PURE__ */ c(
757
+ o2,
758
+ l2,
759
+ r2,
742
760
  !1,
743
761
  null,
744
762
  "15f25c8e",
745
763
  null,
746
764
  null
747
765
  );
748
- const s2 = n2.exports;
749
- const o2 = {
766
+ const d2 = c2.exports;
767
+ const p2 = {
750
768
  name: "DocumentFormRecent",
751
769
  i18nOptions: {
752
770
  namespaces: "DocumentFormRecent",
@@ -771,7 +789,7 @@ const o2 = {
771
789
  };
772
790
  },
773
791
  computed: {
774
- ...v({
792
+ ...g({
775
793
  docById: "documents2/byId"
776
794
  })
777
795
  },
@@ -788,7 +806,7 @@ const o2 = {
788
806
  async fetchDocuments(i) {
789
807
  const e = this.query ? 180 : 90, t = {
790
808
  createdAt: {
791
- $gte: this.$formatDate(xe(/* @__PURE__ */ new Date(), e), "yyyy-MM-dd")
809
+ $gte: this.$formatDate(_e(/* @__PURE__ */ new Date(), e), "yyyy-MM-dd")
792
810
  },
793
811
  // Only provide or if there is a search query to filter on
794
812
  ...this.query && {
@@ -803,7 +821,7 @@ const o2 = {
803
821
  }
804
822
  ]
805
823
  }
806
- }, { data: a } = await we.getAll({
824
+ }, { data: a } = await be.getAll({
807
825
  lean: !0,
808
826
  filter: encodeURIComponent(JSON.stringify(t)),
809
827
  fields: "clients,data.name,createdAt",
@@ -813,7 +831,7 @@ const o2 = {
813
831
  }), { items: n = [] } = a || {};
814
832
  return n;
815
833
  },
816
- onLoadDocuments: I(async function() {
834
+ onLoadDocuments: B(async function() {
817
835
  this.isLoading = !0, this.hasItems = !0;
818
836
  const e = await this.fetchDocuments();
819
837
  (!e || !e.length) && (this.canFetchMore = !1), this.list = [...e || []], this.isLoading = !1;
@@ -825,35 +843,35 @@ const o2 = {
825
843
  }
826
844
  }
827
845
  };
828
- var l2 = function() {
846
+ var u2 = function() {
829
847
  var e = this, t = e._self._c;
830
848
  return t("div", [t("div", { staticClass: "flex w-full", staticStyle: { "padding-bottom": "1em" } }, [e._t("default"), e.hasItems ? t("CInput", { attrs: { loading: e.isLoading, placeholder: e.$t("_common:search"), type: "search", size: "normal", filled: "" }, on: { input: e.onInput }, model: { value: e.query, callback: function(a) {
831
849
  e.query = a;
832
850
  }, expression: "query" } }) : e._e()], 2), t("div", { staticClass: "recent-list" }, [e.isLoading && !e.list.length ? e._l(3, function(a) {
833
851
  return t("div", { key: a, staticClass: "recent-item placeholder" }, [t("CSkeleton", { staticClass: "recent-item-name", attrs: { width: "60%" } }), t("CSkeleton", { attrs: { width: "35%" } })], 1);
834
- }) : !e.isLoading && !e.query && !e.list.length ? t("div", { staticClass: "text-center has-text-grey", staticStyle: { padding: "1em", "background-color": "hsl(0, 0%, 97%)", border: "1px solid hsl(0, 0%, 90%)", "border-radius": "0.35em", "font-size": "15px" } }, [e._v(" " + e._s(e.$t("emptyPlaceholder")) + " ")]) : e.query && !e.isLoading && !e.list.length ? t("div", { staticClass: "text-center has-text-grey", staticStyle: { padding: "1em" } }, [e._v(" " + e._s(e.$t("noResults")) + " ")]) : e._l(e.list, function(a, n) {
852
+ }) : !e.isLoading && !e.query && !e.list.length ? t("div", { staticClass: "p-4 text-center text-gray-400 bg-gray-100 border border-gray-200 rounded-md", staticStyle: { "font-size": "15px" } }, [e._v(" " + e._s(e.$t("emptyPlaceholder")) + " ")]) : e.query && !e.isLoading && !e.list.length ? t("div", { staticClass: "text-center text-gray-400", staticStyle: { padding: "1em" } }, [e._v(" " + e._s(e.$t("noResults")) + " ")]) : e._l(e.list, function(a, n) {
835
853
  return t("div", { key: a._id, staticClass: "recent-item", on: { click: function(s) {
836
854
  return e.$emit("use-doc-template", { documentId: a._id });
837
855
  }, "&mouseover": function(s) {
838
856
  e.hoverIndex = n;
839
857
  }, "&mouseleave": function(s) {
840
858
  e.hoverIndex = null;
841
- } } }, [t("div", { staticClass: "recent-item-name", class: { "has-text-grey": !a.data.name } }, [e._v(" " + e._s(a.data.name || e.$t("_common:untitled")) + " ")]), t("div", [e._v(e._s(e.$formatDistanceToNow(a.createdAt)))]), e.hoverIndex === n ? t("div", { staticStyle: { display: "inline-flex", "align-items": "center", position: "absolute", right: "1em", top: "50%", transform: "translateY(-50%)" } }, [t("CButton", { staticStyle: { "margin-left": "1em" }, attrs: { size: "small" }, nativeOn: { click: function(s) {
859
+ } } }, [t("div", { staticClass: "recent-item-name", class: { "text-gray-400": !a.data.name } }, [e._v(" " + e._s(a.data.name || e.$t("_common:untitled")) + " ")]), t("div", [e._v(e._s(e.$formatDistanceToNow(a.createdAt)))]), e.hoverIndex === n ? t("div", { staticStyle: { display: "inline-flex", "align-items": "center", position: "absolute", right: "1em", top: "50%", transform: "translateY(-50%)" } }, [t("CButton", { staticStyle: { "margin-left": "1em" }, attrs: { size: "small" }, nativeOn: { click: function(s) {
842
860
  return s.stopPropagation(), e.onSaveDocumentTemplate(a._id);
843
861
  } } }, [e._v(" " + e._s(e.$t("_common:saveAs", { thing: e.$t("_common:template") })) + " ")]), t("CButton", { staticStyle: { "margin-left": "1em" }, attrs: { size: "small", type: "secondary" } }, [e._v(" " + e._s(e.$t("_common:use", { thing: e.$t("_common:template") })) + " ")])], 1) : e._e()]);
844
862
  })], 2)]);
845
- }, r2 = [], c2 = /* @__PURE__ */ c(
846
- o2,
847
- l2,
848
- r2,
863
+ }, m2 = [], h2 = /* @__PURE__ */ c(
864
+ p2,
865
+ u2,
866
+ m2,
849
867
  !1,
850
868
  null,
851
- "30ff8970",
869
+ "0096ccb0",
852
870
  null,
853
871
  null
854
872
  );
855
- const d2 = c2.exports;
856
- const p2 = {
873
+ const f2 = h2.exports;
874
+ const g2 = {
857
875
  i18nOptions: {
858
876
  namespaces: "TemplateSelector",
859
877
  messages: {
@@ -896,16 +914,12 @@ const p2 = {
896
914
  name: "DocumentFormSelect",
897
915
  mixins: [b],
898
916
  components: {
899
- HorizontalScroll: s2,
900
- DocumentIcon: e2,
901
- DocumentRecent: d2,
902
- GalleryLogic: Kt
917
+ HorizontalScroll: d2,
918
+ DocumentIcon: s2,
919
+ DocumentRecent: f2,
920
+ GalleryLogic: e2
903
921
  },
904
922
  props: {
905
- canEditTemplate: {
906
- type: Boolean,
907
- default: !1
908
- },
909
923
  // Used for creating documents form project/client views
910
924
  projectId: {
911
925
  type: Number,
@@ -915,10 +929,18 @@ const p2 = {
915
929
  type: Number,
916
930
  default: null
917
931
  },
932
+ onEditTemplate: {
933
+ type: Function,
934
+ default: null
935
+ },
918
936
  onUseTemplate: {
919
937
  type: Function,
920
938
  required: !0
921
939
  },
940
+ onSaveTemplate: {
941
+ type: Function,
942
+ default: null
943
+ },
922
944
  showGallery: {
923
945
  type: Boolean,
924
946
  default: !1
@@ -935,7 +957,7 @@ const p2 = {
935
957
  };
936
958
  },
937
959
  computed: {
938
- ...v({
960
+ ...g({
939
961
  templateById: "templates/byId",
940
962
  isFetchingTemplates: "templates/isFetching",
941
963
  availableTemplates: "templates/availableTemplates",
@@ -998,10 +1020,10 @@ const p2 = {
998
1020
  },
999
1021
  async saveTemplate(i) {
1000
1022
  try {
1001
- const { data: e } = i, t = _e(e, ["_id", "id", "companyId", "isVisible"]);
1023
+ const { data: e } = i, t = ke(e, ["_id", "id", "companyId", "isVisible"]);
1002
1024
  return await this.createTemplate({ body: t }), !0;
1003
1025
  } catch (e) {
1004
- L(e);
1026
+ $(e);
1005
1027
  }
1006
1028
  return !1;
1007
1029
  },
@@ -1010,10 +1032,11 @@ const p2 = {
1010
1032
  },
1011
1033
  async openTemplateFormModal({ document: i = null, template: e = null }) {
1012
1034
  this.$modal.show(
1013
- ee,
1035
+ ie,
1014
1036
  {
1015
1037
  document: i,
1016
- template: e
1038
+ template: e,
1039
+ onSaveTemplate: this.onSaveTemplate
1017
1040
  },
1018
1041
  {
1019
1042
  adaptive: !0,
@@ -1026,27 +1049,27 @@ const p2 = {
1026
1049
  );
1027
1050
  },
1028
1051
  async fetchGallery(i = {}) {
1029
- const { data: e } = await be.get(i);
1052
+ const { data: e } = await Le.get(i);
1030
1053
  return e;
1031
1054
  }
1032
1055
  }
1033
1056
  };
1034
- var u2 = function() {
1057
+ var C2 = function() {
1035
1058
  var e = this, t = e._self._c;
1036
1059
  return t("div", { staticClass: "t-root" }, [t("div", { staticClass: "font-inter form-start main", class: { small: e.mq === "sm" } }, [e._t("header"), t("div", { staticStyle: { width: "100%", "padding-bottom": "5em" } }, [t("div", { staticClass: "section-title" }, [t("div", [e._v(e._s(e.$t("myTemplates")))]), t("div", { staticClass: "section-subtitle" }, [e._v(" " + e._s(e.$t("myTemplatesSubTitle")) + " ")])]), t(e.isExpanded ? "div" : "HorizontalScroll", { tag: "component", staticClass: "template-list", class: { "is-expanded": e.isExpanded }, on: { expand: function(a) {
1037
1060
  e.isExpanded = !0;
1038
1061
  } } }, e._l(e.myTemplates, function(a) {
1039
1062
  return t("DocumentIcon", { key: a.id, staticClass: "template-item", attrs: { "is-add": a.id === "empty", "is-placeholder": a.placeholder, media: a.defaultMedia || e.fallbackMedia, thumbnail: a.thumbnailUrl, name: a.name }, on: { click: function(n) {
1040
1063
  a.placeholder || e.select({ templateId: a.id });
1041
- } } }, [e.canEditTemplate ? t("CDropdown", { staticStyle: { top: "-8px", right: "-4px" }, attrs: { "append-to-body": "" }, nativeOn: { click: function(n) {
1064
+ } } }, [t("CDropdown", { staticStyle: { top: "-8px", right: "-4px" }, attrs: { "append-to-body": "" }, nativeOn: { click: function(n) {
1042
1065
  n.stopPropagation();
1043
- } } }, [t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("icon.tooltip"), expression: "$t('icon.tooltip')" }], attrs: { slot: "trigger", icon: "more-vertical", type: "none", pattern: "tertiary", size: "small" }, slot: "trigger" }), t("CDropdownItem", { attrs: { "icon-left": "template-color" }, on: { click: function(n) {
1044
- return e.$router.push({ name: "templateForm", params: { templateId: a.id } });
1045
- } } }, [e._v(" " + e._s(e.$t("_common:edit", { thing: e.$t("_common:template") })) + " ")]), t("CDropdownItem", { attrs: { "icon-props": { size: 16 }, "icon-left": "edit" }, on: { click: function(n) {
1066
+ } } }, [t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("icon.tooltip"), expression: "$t('icon.tooltip')" }], attrs: { slot: "trigger", icon: "more-vertical", type: "none", pattern: "tertiary", size: "small" }, slot: "trigger" }), e.onEditTemplate ? t("CDropdownItem", { attrs: { "icon-left": "template-color" }, on: { click: function(n) {
1067
+ return e.onEditTemplate(a.id);
1068
+ } } }, [e._v(" " + e._s(e.$t("_common:edit", { thing: e.$t("_common:template") })) + " ")]) : e._e(), t("CDropdownItem", { attrs: { "icon-props": { size: 16 }, "icon-left": "edit" }, on: { click: function(n) {
1046
1069
  return e.openTemplateFormModal({ template: a });
1047
1070
  } } }, [e._v(" " + e._s(e.$t("_common:change", { thing: e.$t("_common:name") })) + " ")]), t("CDropdownItem", { attrs: { separator: "" } }), t("CDropdownItem", { attrs: { "icon-props": { size: 16, stroke: "hsl(360, 100%, 60%)" }, "icon-left": "trash" }, on: { click: function(n) {
1048
1071
  return e.onRemoveTemplate(a);
1049
- } } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 1) : e._e()], 1);
1072
+ } } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 1)], 1);
1050
1073
  }), 1)], 1), e.showGallery ? [t("GalleryLogic", { attrs: { "fetch-gallery": e.fetchGallery, "use-template": e.select, "modal-props": e.galleryModalProps }, scopedSlots: e._u([{ key: "default", fn: function({
1051
1074
  galleryItems: a,
1052
1075
  categories: n,
@@ -1054,30 +1077,30 @@ var u2 = function() {
1054
1077
  selectCategory: o,
1055
1078
  selectGalleryItem: l
1056
1079
  }) {
1057
- return [t("div", { staticStyle: { width: "100%", "padding-bottom": "5em" } }, [t("div", { staticClass: "flex items-center w-full section-title" }, [t("div", { staticStyle: { flex: "1 1 auto" } }, [t("div", [e._v(e._s(e.$t("gallery")))]), t("div", { staticClass: "section-subtitle", domProps: { innerHTML: e._s(e.$t("gallerySubTitle")) } })]), t("CDropdown", { staticStyle: { "margin-left": "0.5rem" }, nativeOn: { click: function(r) {
1080
+ return [t("div", { staticStyle: { width: "100%", "padding-bottom": "5em" } }, [t("div", { staticClass: "flex items-center w-full section-title" }, [t("div", { staticStyle: { flex: "1 1 auto" } }, [t("div", [e._v(e._s(e.$t("gallery")))]), t("div", { staticClass: "section-subtitle", domProps: { innerHTML: e._s(e.$t("gallerySubTitle")) } })]), t("CDropdown", { staticStyle: { "margin-left": "calc(0.5 * var(--rem))" }, nativeOn: { click: function(r) {
1058
1081
  r.stopPropagation();
1059
1082
  } } }, [t("CButton", { attrs: { slot: "trigger", size: "small", type: "none", pattern: "secondary", "icon-right": "chevron-down" }, slot: "trigger" }, [e._v(" " + e._s(s ? s.label : "") + " ")]), e._l(n, function(r) {
1060
- return t("CDropdownItem", { key: r.key, attrs: { "icon-right": s && s.key === r.key ? "check" : "" }, on: { click: function(h) {
1083
+ return t("CDropdownItem", { key: r.key, attrs: { "icon-right": s && s.key === r.key ? "check" : "" }, on: { click: function(p) {
1061
1084
  return o(r);
1062
1085
  } } }, [e._v(" " + e._s(r.label) + " ")]);
1063
1086
  })], 2)], 1), t("HorizontalScroll", { staticClass: "template-list" }, e._l(a, function(r) {
1064
- return t("DocumentIcon", { key: r.id, staticClass: "template-item", attrs: { "is-placeholder": r.placeholder, media: { type: "image", resourceUrl: r.backgroundUrl }, name: r.name }, on: { click: function(h) {
1087
+ return t("DocumentIcon", { key: r.id, staticClass: "template-item", attrs: { "is-placeholder": r.placeholder, media: { type: "image", resourceUrl: r.backgroundUrl }, name: r.name }, on: { click: function(p) {
1065
1088
  r.placeholder || l(r);
1066
1089
  } } });
1067
1090
  }), 1)], 1)];
1068
- } }], null, !1, 4229086650) })] : e._e(), t("DocumentRecent", { staticStyle: { width: "100%", "padding-bottom": "5em" }, on: { "use-doc-template": e.select, "save-template": e.openTemplateFormModal } }, [t("div", { staticClass: "section-title", staticStyle: { flex: "1 1 auto", "padding-bottom": "0.5em" } }, [t("div", [e._v(e._s(e.$t("recent")))]), t("div", { staticClass: "section-subtitle" }, [e._v(" " + e._s(e.$t("recentSubTitle")) + " ")])])])], 2)]);
1069
- }, m2 = [], h2 = /* @__PURE__ */ c(
1070
- p2,
1071
- u2,
1072
- m2,
1091
+ } }], null, !1, 3964948248) })] : e._e(), t("DocumentRecent", { staticStyle: { width: "100%", "padding-bottom": "5em" }, on: { "use-doc-template": e.select, "save-template": e.openTemplateFormModal } }, [t("div", { staticClass: "section-title", staticStyle: { flex: "1 1 auto", "padding-bottom": "0.5em" } }, [t("div", [e._v(e._s(e.$t("recent")))]), t("div", { staticClass: "section-subtitle" }, [e._v(" " + e._s(e.$t("recentSubTitle")) + " ")])])])], 2)]);
1092
+ }, v2 = [], y2 = /* @__PURE__ */ c(
1093
+ g2,
1094
+ C2,
1095
+ v2,
1073
1096
  !1,
1074
1097
  null,
1075
- "578dcbee",
1098
+ "1eb8b257",
1076
1099
  null,
1077
1100
  null
1078
1101
  );
1079
- const f2 = h2.exports;
1080
- const g2 = (i) => {
1102
+ const x2 = y2.exports;
1103
+ const w2 = (i) => {
1081
1104
  const e = Array(2).fill().map(() => d());
1082
1105
  return [
1083
1106
  {
@@ -1099,8 +1122,8 @@ const g2 = (i) => {
1099
1122
  nodeId: e[1]
1100
1123
  }
1101
1124
  ];
1102
- }, C2 = (i, e = "en") => [
1103
- { key: `title-${i}`, anyOf: [{ type: "string" }, { type: "null" }], defaultValue: m.t("attachment_plural", { lng: e }).capitalize() },
1125
+ }, _2 = (i, e = "en") => [
1126
+ { key: `title-${i}`, anyOf: [{ type: "string" }, { type: "null" }], defaultValue: h.t("attachment_plural", { lng: e }).capitalize() },
1104
1127
  {
1105
1128
  key: `files-${i}`,
1106
1129
  type: "array",
@@ -1108,13 +1131,13 @@ const g2 = (i) => {
1108
1131
  $ref: `${f.api.baseUrl}/schemas/file/1.json`
1109
1132
  }
1110
1133
  }
1111
- ], v2 = ({ document: i = null }) => {
1134
+ ], b2 = ({ document: i = null }) => {
1112
1135
  const e = d(), { language: t } = i || {};
1113
1136
  return {
1114
- readView: g2(e),
1115
- validation: C2(e, t)
1137
+ readView: w2(e),
1138
+ validation: _2(e, t)
1116
1139
  };
1117
- }, y2 = () => [
1140
+ }, k2 = () => [
1118
1141
  {
1119
1142
  itemId: "presentation",
1120
1143
  itemType: "presentation",
@@ -1122,11 +1145,11 @@ const g2 = (i) => {
1122
1145
  parentId: "0",
1123
1146
  nodeId: d()
1124
1147
  }
1125
- ], x2 = () => ({
1126
- readView: y2(),
1148
+ ], L2 = () => ({
1149
+ readView: k2(),
1127
1150
  validation: []
1128
1151
  // all relevant data is either within base doc or company settings etc
1129
- }), w2 = () => {
1152
+ }), $2 = () => {
1130
1153
  const i = Array(2).fill().map(() => d());
1131
1154
  return [
1132
1155
  {
@@ -1149,19 +1172,19 @@ const g2 = (i) => {
1149
1172
  // uniqid(),
1150
1173
  }
1151
1174
  ];
1152
- }, _2 = (i = "en") => [
1175
+ }, S2 = (i = "en") => [
1153
1176
  {
1154
1177
  key: "multiGroupPricing-title",
1155
1178
  anyOf: [{ type: "string" }, { type: "null" }],
1156
- defaultValue: m.t("components:document.chapters.multiGroupPricing.title", { lng: i })
1179
+ defaultValue: h.t("components:document.chapters.multiGroupPricing.title", { lng: i })
1157
1180
  }
1158
- ], b2 = ({ document: i = null }) => {
1181
+ ], D2 = ({ document: i = null }) => {
1159
1182
  const { language: e } = i || {};
1160
1183
  return {
1161
- readView: w2(),
1162
- validation: _2(e)
1184
+ readView: $2(),
1185
+ validation: S2(e)
1163
1186
  };
1164
- }, k2 = () => [
1187
+ }, V2 = () => [
1165
1188
  {
1166
1189
  itemId: "terms",
1167
1190
  itemType: "termsDisclaimer",
@@ -1179,7 +1202,7 @@ const g2 = (i) => {
1179
1202
  parentId: "0",
1180
1203
  nodeId: d()
1181
1204
  }
1182
- ], L2 = () => [
1205
+ ], T2 = () => [
1183
1206
  {
1184
1207
  key: "terms",
1185
1208
  anyOf: [
@@ -1187,10 +1210,10 @@ const g2 = (i) => {
1187
1210
  { type: "null" }
1188
1211
  ]
1189
1212
  }
1190
- ], $2 = () => ({
1191
- readView: k2(),
1192
- validation: L2()
1193
- }), S2 = () => {
1213
+ ], M2 = () => ({
1214
+ readView: V2(),
1215
+ validation: T2()
1216
+ }), B2 = () => {
1194
1217
  const i = Array(5).fill().map(() => d());
1195
1218
  return [
1196
1219
  {
@@ -1239,7 +1262,7 @@ const g2 = (i) => {
1239
1262
  nodeId: i[4]
1240
1263
  }
1241
1264
  ];
1242
- }, D2 = () => ({
1265
+ }, I2 = () => ({
1243
1266
  clients: [{
1244
1267
  name: "Pernilla P.",
1245
1268
  email: "pernilla@mail.se",
@@ -1249,20 +1272,20 @@ const g2 = (i) => {
1249
1272
  deliveryTypes: ["email"],
1250
1273
  answerMethod: { accept: "signature", deny: "button" }
1251
1274
  }]
1252
- }), T2 = (i = "en") => [
1275
+ }), F2 = (i = "en") => [
1253
1276
  { key: "senderString", anyOf: [{ type: "string" }, { type: "null" }] },
1254
1277
  { key: "receiverString", anyOf: [{ type: "string" }, { type: "null" }] },
1255
- { key: "partiesString", anyOf: [{ type: "string" }, { type: "null" }], defaultValue: m.t("components:document.chapters.parties.title", { lng: i }) }
1256
- ], V2 = ({ includeMockData: i = !1, document: e = null, contentData: t = null }) => {
1278
+ { key: "partiesString", anyOf: [{ type: "string" }, { type: "null" }], defaultValue: h.t("components:document.chapters.parties.title", { lng: i }) }
1279
+ ], H2 = ({ includeMockData: i = !1, document: e = null, contentData: t = null }) => {
1257
1280
  const { language: a } = e || {};
1258
1281
  let n = null;
1259
- return typeof t == "function" ? n = t() : i && (n = D2()), {
1260
- readView: S2(),
1261
- validation: T2(a),
1282
+ return typeof t == "function" ? n = t() : i && (n = I2()), {
1283
+ readView: B2(),
1284
+ validation: F2(a),
1262
1285
  // Client / company will for now always exist on doc and in validation
1263
1286
  ...n && { data: n }
1264
1287
  };
1265
- }, M2 = (i) => {
1288
+ }, A2 = (i) => {
1266
1289
  const e = Array(3).fill().map(() => d());
1267
1290
  return [
1268
1291
  {
@@ -1291,7 +1314,7 @@ const g2 = (i) => {
1291
1314
  nodeId: e[2]
1292
1315
  }
1293
1316
  ];
1294
- }, I2 = (i) => [
1317
+ }, P2 = (i) => [
1295
1318
  {
1296
1319
  key: `estimatedTimeComplete-${i}`,
1297
1320
  type: "object",
@@ -1312,20 +1335,20 @@ const g2 = (i) => {
1312
1335
  }
1313
1336
  }
1314
1337
  }
1315
- ], B2 = (i) => ({
1338
+ ], E2 = (i) => ({
1316
1339
  [`estimatedTimeComplete-${i}`]: {
1317
1340
  value: 4,
1318
1341
  unitType: "hour"
1319
1342
  }
1320
- }), F2 = ({ includeMockData: i = !1, contentData: e = null }) => {
1343
+ }), z2 = ({ includeMockData: i = !1, contentData: e = null }) => {
1321
1344
  const t = d();
1322
1345
  let a = null;
1323
- return typeof e == "function" ? a = e(t) : i && (a = B2(t)), {
1324
- readView: M2(t),
1325
- validation: I2(t),
1346
+ return typeof e == "function" ? a = e(t) : i && (a = E2(t)), {
1347
+ readView: A2(t),
1348
+ validation: P2(t),
1326
1349
  ...a && { data: a }
1327
1350
  };
1328
- }, H2 = () => {
1351
+ }, Z2 = () => {
1329
1352
  const i = Array(3).fill().map(() => d());
1330
1353
  return [
1331
1354
  {
@@ -1359,7 +1382,7 @@ const g2 = (i) => {
1359
1382
  nodeId: i[2]
1360
1383
  }
1361
1384
  ];
1362
- }, A2 = () => [
1385
+ }, O2 = () => [
1363
1386
  {
1364
1387
  key: "estimatedWorkDates",
1365
1388
  type: "object",
@@ -1368,10 +1391,10 @@ const g2 = (i) => {
1368
1391
  endAt: { anyOf: [{ type: "null" }, { type: "string" }] }
1369
1392
  }
1370
1393
  }
1371
- ], P2 = () => ({
1372
- readView: H2(),
1373
- validation: A2()
1374
- }), E2 = () => {
1394
+ ], R2 = () => ({
1395
+ readView: Z2(),
1396
+ validation: O2()
1397
+ }), G2 = () => {
1375
1398
  const i = Array(5).fill().map(() => d());
1376
1399
  return [
1377
1400
  {
@@ -1437,7 +1460,7 @@ const g2 = (i) => {
1437
1460
  nodeId: i[4]
1438
1461
  }
1439
1462
  ];
1440
- }, z2 = () => [
1463
+ }, U2 = () => [
1441
1464
  {
1442
1465
  key: "extraWorkConstruction",
1443
1466
  extraWorkConstruction: {
@@ -1461,11 +1484,11 @@ const g2 = (i) => {
1461
1484
  }
1462
1485
  }
1463
1486
  }
1464
- ], Z2 = () => ({
1465
- readView: E2(),
1466
- validation: z2()
1487
+ ], W2 = () => ({
1488
+ readView: G2(),
1489
+ validation: U2()
1467
1490
  // Client / company will for now always exist on doc and in validation
1468
- }), O2 = () => {
1491
+ }), q2 = () => {
1469
1492
  const i = Array(3).fill().map(() => d());
1470
1493
  return [
1471
1494
  {
@@ -1505,7 +1528,7 @@ const g2 = (i) => {
1505
1528
  nodeId: i[2]
1506
1529
  }
1507
1530
  ];
1508
- }, R2 = () => [
1531
+ }, N2 = () => [
1509
1532
  {
1510
1533
  key: "extraWorkTimeImpact",
1511
1534
  anyOf: [
@@ -1529,10 +1552,10 @@ const g2 = (i) => {
1529
1552
  }
1530
1553
  ]
1531
1554
  }
1532
- ], G2 = () => ({
1533
- readView: O2(),
1534
- validation: R2()
1535
- }), U2 = () => {
1555
+ ], j2 = () => ({
1556
+ readView: q2(),
1557
+ validation: N2()
1558
+ }), K2 = () => {
1536
1559
  const i = Array(5).fill().map(() => d());
1537
1560
  return [
1538
1561
  {
@@ -1585,13 +1608,13 @@ const g2 = (i) => {
1585
1608
  nodeId: i[4]
1586
1609
  }
1587
1610
  ];
1588
- }, W2 = () => [
1611
+ }, Y2 = () => [
1589
1612
  { key: "miscAgreements", anyOf: [{ type: "string" }, { type: null }] },
1590
1613
  { key: "notBinding", type: "boolean" }
1591
- ], q2 = () => ({
1592
- readView: U2(),
1593
- validation: W2()
1594
- }), N2 = (i) => {
1614
+ ], Q2 = () => ({
1615
+ readView: K2(),
1616
+ validation: Y2()
1617
+ }), J2 = (i) => {
1595
1618
  const e = Array(2).fill().map(() => d());
1596
1619
  return [
1597
1620
  {
@@ -1613,22 +1636,22 @@ const g2 = (i) => {
1613
1636
  nodeId: e[1]
1614
1637
  }
1615
1638
  ];
1616
- }, j2 = (i) => [
1639
+ }, X2 = (i) => [
1617
1640
  { key: `title-${i}`, anyOf: [{ type: "string" }, { type: "null" }], defaultValue: "" },
1618
1641
  { key: `content-${i}`, anyOf: [{ type: "string" }, { type: "null" }] }
1619
- ], K2 = (i) => ({
1642
+ ], ei = (i) => ({
1620
1643
  [`data.title-${i}`]: "My custom text",
1621
1644
  [`data.content-${i}`]: "<p>First impressions matter. Make it count by sending beautiful proposals to your clients. Proposals that look great on any device. Proposals that help you to close with notifications and digital signatures.</p>"
1622
- }), Y2 = ({ includeMockData: i = !1, contentData: e = null }) => {
1645
+ }), ti = ({ includeMockData: i = !1, contentData: e = null }) => {
1623
1646
  const t = d();
1624
1647
  let a = null;
1625
- return typeof e == "function" ? a = e(t) : i && (a = K2(t)), {
1626
- readView: N2(t),
1627
- validation: j2(t),
1648
+ return typeof e == "function" ? a = e(t) : i && (a = ei(t)), {
1649
+ readView: J2(t),
1650
+ validation: X2(t),
1628
1651
  ...a && { data: a },
1629
1652
  onAddFnName: "conditionalOnAdd"
1630
1653
  };
1631
- }, Q2 = (i) => [
1654
+ }, ii = (i) => [
1632
1655
  {
1633
1656
  itemId: "coverBlock",
1634
1657
  itemType: "coverBlock",
@@ -1638,12 +1661,12 @@ const g2 = (i) => {
1638
1661
  parentId: "0",
1639
1662
  nodeId: d()
1640
1663
  }
1641
- ], J2 = (i, e = "en") => [
1664
+ ], ai = (i, e = "en") => [
1642
1665
  {
1643
1666
  key: `coverBlock-${i}`,
1644
1667
  defaultValue: {
1645
1668
  type: "video",
1646
- text: `<p data-typography="title">${m.t("components:document.coverBlock.defaultText", { lng: e })}</p>`,
1669
+ text: `<p data-typography="title">${h.t("components:document.coverBlock.defaultText", { lng: e })}</p>`,
1647
1670
  cover: {
1648
1671
  video: {
1649
1672
  id: "1409899",
@@ -1655,7 +1678,7 @@ const g2 = (i) => {
1655
1678
  },
1656
1679
  $ref: `${f.api.baseUrl}/schemas/coverBlock/1.json`
1657
1680
  }
1658
- ], X2 = (i) => ({
1681
+ ], ni = (i) => ({
1659
1682
  [`data.coverBlock-${i}`]: {
1660
1683
  text: "<h1>We know communication</h1>",
1661
1684
  cover: {
@@ -1665,16 +1688,16 @@ const g2 = (i) => {
1665
1688
  blur: 0
1666
1689
  }
1667
1690
  }
1668
- }), ei = ({ includeMockData: i = !1, document: e = null, contentData: t = null } = {}) => {
1691
+ }), si = ({ includeMockData: i = !1, document: e = null, contentData: t = null } = {}) => {
1669
1692
  const a = d(), { language: n } = e || {};
1670
1693
  let s = null;
1671
- return typeof t == "function" ? s = t(a) : i && (s = X2(a)), {
1672
- readView: Q2(a),
1673
- validation: J2(a, n),
1694
+ return typeof t == "function" ? s = t(a) : i && (s = ni(a)), {
1695
+ readView: ii(a),
1696
+ validation: ai(a, n),
1674
1697
  ...s && { data: s }
1675
1698
  };
1676
- }, ti = ({ language: i = "en" } = {}) => {
1677
- const e = (t) => m.t(`components:account.documentForm.contentItems.coverBlock.${t}`, {
1699
+ }, oi = ({ language: i = "en" } = {}) => {
1700
+ const e = (t) => h.t(`components:account.documentForm.contentItems.coverBlock.${t}`, {
1678
1701
  lng: i
1679
1702
  });
1680
1703
  return [
@@ -1818,7 +1841,7 @@ const g2 = (i) => {
1818
1841
  })
1819
1842
  }
1820
1843
  ];
1821
- }, ii = (i) => [
1844
+ }, li = (i) => [
1822
1845
  {
1823
1846
  itemId: `header-${i}`,
1824
1847
  itemType: "header",
@@ -1828,18 +1851,18 @@ const g2 = (i) => {
1828
1851
  parentId: "0",
1829
1852
  nodeId: d()
1830
1853
  }
1831
- ], ai = (i, e = null) => {
1854
+ ], ri = (i, e = null) => {
1832
1855
  const {
1833
1856
  language: t = "en",
1834
1857
  name: a = "",
1835
1858
  theme: n
1836
- } = e || {}, s = a || m.t("_common:proposal", { lng: t }).capitalize();
1859
+ } = e || {}, s = a || h.t("_common:proposal", { lng: t }).capitalize();
1837
1860
  e && (e.name = s);
1838
1861
  const {
1839
1862
  background: o,
1840
1863
  priceSummaryBackground: l,
1841
1864
  backgroundFilter: r
1842
- } = n || {}, h = l || "hsl(228, 52%, 18%)", g = i1.readability(h, "#fff") < 1.8 ? "#111111" : "#FFFFFF";
1865
+ } = n || {}, p = l || "hsl(228, 52%, 18%)", C = e1.readability(p, "#fff") < 1.8 ? "#111111" : "#FFFFFF";
1843
1866
  return [
1844
1867
  {
1845
1868
  key: `header-${i}`,
@@ -1848,7 +1871,7 @@ const g2 = (i) => {
1848
1871
  layout: "vertical",
1849
1872
  baseStyle: {
1850
1873
  textAlign: "left",
1851
- textColor: g
1874
+ textColor: C
1852
1875
  },
1853
1876
  items: [
1854
1877
  {
@@ -1866,12 +1889,12 @@ const g2 = (i) => {
1866
1889
  size: 70,
1867
1890
  media: {
1868
1891
  type: "color",
1869
- backgroundColor: h
1892
+ backgroundColor: p
1870
1893
  },
1871
1894
  value: {
1872
1895
  preText: "",
1873
1896
  documentName: `<p data-typography="title">${s}</p>`,
1874
- postText: m.t("components:document.chapters.header.postText", { lng: t, interpolation: { prefix: "__", suffix: "__" } }),
1897
+ postText: h.t("components:document.chapters.header.postText", { lng: t, interpolation: { prefix: "__", suffix: "__" } }),
1875
1898
  showLogo: !0,
1876
1899
  logotype: ""
1877
1900
  }
@@ -1880,7 +1903,7 @@ const g2 = (i) => {
1880
1903
  }
1881
1904
  }
1882
1905
  ];
1883
- }, ni = (i) => ({
1906
+ }, ci = (i) => ({
1884
1907
  [`data.header-${i}`]: {
1885
1908
  layout: "vertical",
1886
1909
  baseStyle: { textAlign: "left", textColor: "#FFFFFF" },
@@ -1910,16 +1933,16 @@ const g2 = (i) => {
1910
1933
  }
1911
1934
  ]
1912
1935
  }
1913
- }), si = ({ includeMockData: i = !1, document: e = null, contentData: t = null }) => {
1936
+ }), di = ({ includeMockData: i = !1, document: e = null, contentData: t = null }) => {
1914
1937
  const a = d();
1915
1938
  let n = null;
1916
- return typeof t == "function" ? n = t(a) : i && (n = ni(a)), {
1917
- readView: ii(a),
1918
- validation: ai(a, e),
1939
+ return typeof t == "function" ? n = t(a) : i && (n = ci(a)), {
1940
+ readView: li(a),
1941
+ validation: ri(a, e),
1919
1942
  ...n && { data: n }
1920
1943
  };
1921
- }, oi = ({ language: i = "en" } = {}) => {
1922
- const e = (t) => m.t(`components:account.documentForm.contentItems.header.${t}`, {
1944
+ }, pi = ({ language: i = "en" } = {}) => {
1945
+ const e = (t) => h.t(`components:account.documentForm.contentItems.header.${t}`, {
1923
1946
  lng: i,
1924
1947
  interpolation: { prefix: "__", suffix: "__" }
1925
1948
  });
@@ -2207,7 +2230,7 @@ const g2 = (i) => {
2207
2230
  }
2208
2231
  ];
2209
2232
  };
2210
- m.loadOptions({
2233
+ h.loadOptions({
2211
2234
  namespaces: "packageGroupTemplate",
2212
2235
  messages: {
2213
2236
  en: {
@@ -2218,7 +2241,7 @@ m.loadOptions({
2218
2241
  }
2219
2242
  }
2220
2243
  });
2221
- const li = (i) => {
2244
+ const ui = (i) => {
2222
2245
  const e = Array(2).fill().map(() => d());
2223
2246
  return [
2224
2247
  {
@@ -2243,38 +2266,38 @@ const li = (i) => {
2243
2266
  nodeId: e[1]
2244
2267
  }
2245
2268
  ];
2246
- }, ri = (i, e = "en") => [
2269
+ }, mi = (i, e = "en") => [
2247
2270
  {
2248
2271
  key: `packageGroups.${i}`,
2249
2272
  validationKey: "packageGroups",
2250
2273
  defaultValue: {
2251
2274
  type: "",
2252
- title: m.t("packageGroupTemplate:title", { lng: e }),
2275
+ title: h.t("packageGroupTemplate:title", { lng: e }),
2253
2276
  hideGroupPrice: !1,
2254
2277
  packages: []
2255
2278
  },
2256
2279
  defaultValidation: {
2257
2280
  [i]: {
2258
2281
  type: "",
2259
- title: m.t("packageGroupTemplate:title", { lng: e }),
2282
+ title: h.t("packageGroupTemplate:title", { lng: e }),
2260
2283
  hideGroupPrice: !1,
2261
2284
  packages: []
2262
2285
  }
2263
2286
  },
2264
2287
  $ref: `${f.api.baseUrl}/schemas/packageGroups/1.json`
2265
2288
  }
2266
- ], ci = () => null, di = ({ includeMockData: i, document: e = null, contentData: t = null } = {}) => {
2289
+ ], hi = () => null, fi = ({ includeMockData: i, document: e = null, contentData: t = null } = {}) => {
2267
2290
  const a = d(), { language: n } = e || {};
2268
2291
  let s = null;
2269
- typeof t == "function" ? s = t(a) : i && (s = ci());
2270
- const o = li(a), l = ri(a, n);
2292
+ typeof t == "function" ? s = t(a) : i && (s = hi());
2293
+ const o = ui(a), l = mi(a, n);
2271
2294
  return {
2272
2295
  readView: o,
2273
2296
  validation: l,
2274
2297
  ...s && { data: s }
2275
2298
  };
2276
2299
  };
2277
- m.loadOptions({
2300
+ h.loadOptions({
2278
2301
  namespaces: "packageGroupContentItems",
2279
2302
  messages: {
2280
2303
  en: {
@@ -2359,13 +2382,13 @@ m.loadOptions({
2359
2382
  }
2360
2383
  }
2361
2384
  });
2362
- const pi = ({
2385
+ const gi = ({
2363
2386
  language: i = "en",
2364
2387
  currency: e = "USD",
2365
2388
  _getters: t,
2366
2389
  allArticles: a = []
2367
2390
  } = {}) => {
2368
- const n = p(t, "settings/defaultVatRate") || null, s = !p(t, "settings/hidePriceOnNewlyAddedArticles"), o = (l) => m.t(`packageGroupContentItems:${l}`, { lng: i });
2391
+ const n = m(t, "settings/defaultVatRate") || null, s = !m(t, "settings/hidePriceOnNewlyAddedArticles"), o = (l) => h.t(`packageGroupContentItems:${l}`, { lng: i });
2369
2392
  return [
2370
2393
  {
2371
2394
  previewUrl: `
@@ -2414,7 +2437,7 @@ const pi = ({
2414
2437
  return {
2415
2438
  [`data.packageGroups.${l}`]: {
2416
2439
  type: "single",
2417
- title: m.t("packageGroupTemplate:title", { lng: i }),
2440
+ title: h.t("packageGroupTemplate:title", { lng: i }),
2418
2441
  hideGroupPrice: !1,
2419
2442
  packages: [
2420
2443
  {
@@ -2532,7 +2555,7 @@ const pi = ({
2532
2555
  return {
2533
2556
  [`data.packageGroups.${l}`]: {
2534
2557
  type: "radio",
2535
- title: m.t("packageGroupTemplate:title", { lng: i }),
2558
+ title: h.t("packageGroupTemplate:title", { lng: i }),
2536
2559
  hideGroupPrice: !1,
2537
2560
  packages: [
2538
2561
  {
@@ -2666,7 +2689,7 @@ const pi = ({
2666
2689
  return {
2667
2690
  [`data.packageGroups.${l}`]: {
2668
2691
  type: "checkbox",
2669
- title: m.t("packageGroupTemplate:title", { lng: i }),
2692
+ title: h.t("packageGroupTemplate:title", { lng: i }),
2670
2693
  hideGroupPrice: !1,
2671
2694
  packages: [
2672
2695
  {
@@ -2716,7 +2739,7 @@ const pi = ({
2716
2739
  }
2717
2740
  }
2718
2741
  ];
2719
- }, ui = (i) => [
2742
+ }, Ci = (i) => [
2720
2743
  {
2721
2744
  itemId: "embed",
2722
2745
  itemType: "embed",
@@ -2730,7 +2753,7 @@ const pi = ({
2730
2753
  parentId: "0",
2731
2754
  nodeId: d()
2732
2755
  }
2733
- ], mi = (i) => [
2756
+ ], vi = (i) => [
2734
2757
  {
2735
2758
  key: `embed-${i}`,
2736
2759
  $ref: `${f.api.baseUrl}/schemas/embed/1.json`,
@@ -2739,16 +2762,16 @@ const pi = ({
2739
2762
  size: "small"
2740
2763
  }
2741
2764
  }
2742
- ], hi = () => null, fi = ({ includeMockData: i = !1, document: e = null, contentData: t = null } = {}) => {
2765
+ ], yi = () => null, xi = ({ includeMockData: i = !1, document: e = null, contentData: t = null } = {}) => {
2743
2766
  const a = d();
2744
2767
  let n = null;
2745
- return typeof t == "function" ? n = t(a) : i && (n = hi()), {
2746
- readView: ui(a),
2747
- validation: mi(a),
2768
+ return typeof t == "function" ? n = t(a) : i && (n = yi()), {
2769
+ readView: Ci(a),
2770
+ validation: vi(a),
2748
2771
  ...n && { data: n }
2749
2772
  };
2750
2773
  };
2751
- m.loadOptions({
2774
+ h.loadOptions({
2752
2775
  namespaces: "embedContentItems",
2753
2776
  messages: {
2754
2777
  en: {
@@ -2759,7 +2782,7 @@ m.loadOptions({
2759
2782
  }
2760
2783
  }
2761
2784
  });
2762
- const gi = ({ language: i = "en" } = {}) => [
2785
+ const wi = ({ language: i = "en" } = {}) => [
2763
2786
  {
2764
2787
  previewUrl: `
2765
2788
  <div style="position: relative;">
@@ -2818,7 +2841,7 @@ const gi = ({ language: i = "en" } = {}) => [
2818
2841
  </defs>
2819
2842
  </svg>
2820
2843
  <div class="submenu-item-badge">
2821
- ${m.t("embedContentItems:previewTitle", { lng: i })}
2844
+ ${h.t("embedContentItems:previewTitle", { lng: i })}
2822
2845
  </div>
2823
2846
  </div>
2824
2847
  `,
@@ -3051,7 +3074,7 @@ const gi = ({ language: i = "en" } = {}) => [
3051
3074
  }
3052
3075
  })
3053
3076
  }
3054
- ], Ci = (i) => [
3077
+ ], _i = (i) => [
3055
3078
  {
3056
3079
  itemId: "videoPlayer",
3057
3080
  itemType: "videoPlayer",
@@ -3064,7 +3087,7 @@ const gi = ({ language: i = "en" } = {}) => [
3064
3087
  parentId: "0",
3065
3088
  nodeId: d()
3066
3089
  }
3067
- ], vi = (i) => [
3090
+ ], bi = (i) => [
3068
3091
  {
3069
3092
  key: `video-${i}`,
3070
3093
  $ref: `${f.api.baseUrl}/schemas/videoPlayer/1.json`,
@@ -3075,7 +3098,7 @@ const gi = ({ language: i = "en" } = {}) => [
3075
3098
  }
3076
3099
  }
3077
3100
  }
3078
- ], yi = (i) => ({
3101
+ ], ki = (i) => ({
3079
3102
  [`data.video-${i}`]: {
3080
3103
  size: "small",
3081
3104
  video: {
@@ -3084,15 +3107,15 @@ const gi = ({ language: i = "en" } = {}) => [
3084
3107
  id: "166JEb6qkr4"
3085
3108
  }
3086
3109
  }
3087
- }), xi = ({ includeMockData: i = !1, contentData: e = null }) => {
3110
+ }), Li = ({ includeMockData: i = !1, contentData: e = null }) => {
3088
3111
  const t = d();
3089
3112
  let a = null;
3090
- return typeof e == "function" ? a = e(t) : i && (a = yi(t)), {
3091
- readView: Ci(t),
3092
- validation: vi(t),
3113
+ return typeof e == "function" ? a = e(t) : i && (a = ki(t)), {
3114
+ readView: _i(t),
3115
+ validation: bi(t),
3093
3116
  ...a && { data: a }
3094
3117
  };
3095
- }, wi = ({ language: i = "en" } = {}) => [
3118
+ }, $i = ({ language: i = "en" } = {}) => [
3096
3119
  {
3097
3120
  previewUrl: `
3098
3121
  <div style="position: relative;">
@@ -3116,7 +3139,7 @@ const gi = ({ language: i = "en" } = {}) => [
3116
3139
  </g>
3117
3140
  </svg>
3118
3141
  <div class="submenu-item-badge">
3119
- ${m.t("_common:video", { language: i }).capitalize()}
3142
+ ${h.t("_common:video", { language: i }).capitalize()}
3120
3143
  </div>
3121
3144
  </div>
3122
3145
  `,
@@ -3294,34 +3317,34 @@ const gi = ({ language: i = "en" } = {}) => [
3294
3317
  })
3295
3318
  }
3296
3319
  ], Z = {
3297
- titleAndText2: Y2,
3298
- attachments2: v2,
3299
- pdf: ke,
3300
- packageGroup: di,
3301
- multiGroupPricing: b2,
3302
- coverBlock: ei,
3303
- videoPlayer: xi,
3304
- embed: fi,
3305
- header: si,
3306
- answer: Le,
3307
- terms: $2,
3308
- parties: V2,
3309
- custom: t1,
3320
+ titleAndText2: ti,
3321
+ attachments2: b2,
3322
+ pdf: $e,
3323
+ packageGroup: fi,
3324
+ multiGroupPricing: D2,
3325
+ coverBlock: si,
3326
+ videoPlayer: Li,
3327
+ embed: xi,
3328
+ header: di,
3329
+ answer: Se,
3330
+ terms: M2,
3331
+ parties: H2,
3332
+ custom: Xe,
3310
3333
  // legacy
3311
- presentation: x2,
3312
- estimatedTimeCompleted: F2,
3313
- estimatedWorkStartAndEndAtText: P2,
3314
- extraWorkConstructionPricingList: Z2,
3315
- extraWorkTimeImpactText: G2,
3316
- notBinding: q2
3334
+ presentation: L2,
3335
+ estimatedTimeCompleted: z2,
3336
+ estimatedWorkStartAndEndAtText: R2,
3337
+ extraWorkConstructionPricingList: W2,
3338
+ extraWorkTimeImpactText: j2,
3339
+ notBinding: Q2
3317
3340
  }, O = {
3318
- coverBlock: ti,
3319
- header: oi,
3320
- packageGroup: pi,
3321
- embed: gi,
3322
- videoPlayer: wi,
3323
- custom: e1
3324
- }, _i = {
3341
+ coverBlock: oi,
3342
+ header: pi,
3343
+ packageGroup: gi,
3344
+ embed: wi,
3345
+ videoPlayer: $i,
3346
+ custom: Je
3347
+ }, Si = {
3325
3348
  name: "AddBlock",
3326
3349
  props: {
3327
3350
  set: {
@@ -3335,29 +3358,29 @@ const gi = ({ language: i = "en" } = {}) => [
3335
3358
  },
3336
3359
  render() {
3337
3360
  return this.$scopedSlots.default({
3338
- addBlock: (i) => $e({
3361
+ addBlock: (i) => De({
3339
3362
  ...i,
3340
3363
  set: this.set,
3341
3364
  tplGenerators: Z,
3342
3365
  includeMockData: this.includeMockData,
3343
3366
  emit: (...e) => this.$emit(...e)
3344
3367
  }),
3345
- getBlockPayload: (i) => Se(i, this.set, Z, this.includeMockdata)
3368
+ getBlockPayload: (i) => Ve(i, this.set, Z, this.includeMockdata)
3346
3369
  });
3347
3370
  }
3348
- }, bi = null, ki = null;
3349
- var Li = /* @__PURE__ */ c(
3350
- _i,
3351
- bi,
3352
- ki,
3371
+ }, Di = null, Vi = null;
3372
+ var Ti = /* @__PURE__ */ c(
3373
+ Si,
3374
+ Di,
3375
+ Vi,
3353
3376
  !1,
3354
3377
  null,
3355
3378
  null,
3356
3379
  null,
3357
3380
  null
3358
3381
  );
3359
- const te = Li.exports;
3360
- const $i = {
3382
+ const ae = Ti.exports;
3383
+ const Mi = {
3361
3384
  name: "Drawer",
3362
3385
  props: {
3363
3386
  value: {
@@ -3400,7 +3423,7 @@ const $i = {
3400
3423
  }
3401
3424
  }
3402
3425
  };
3403
- var Si = function() {
3426
+ var Bi = function() {
3404
3427
  var e = this, t = e._self._c;
3405
3428
  return t("div", [t("transition", { attrs: { name: "fade" } }, [!e.hideOverlay && e.value ? t("div", { staticClass: "d-overlay", style: {
3406
3429
  zIndex: e.zIndex
@@ -3416,18 +3439,18 @@ var Si = function() {
3416
3439
  boxShadow: e.boxShadow,
3417
3440
  ...e.contentStyle
3418
3441
  } }, [e._t("default")], 2)]) : e._e()])], 1);
3419
- }, Di = [], Ti = /* @__PURE__ */ c(
3420
- $i,
3421
- Si,
3422
- Di,
3442
+ }, Ii = [], Fi = /* @__PURE__ */ c(
3443
+ Mi,
3444
+ Bi,
3445
+ Ii,
3423
3446
  !1,
3424
3447
  null,
3425
3448
  "3cb13e4e",
3426
3449
  null,
3427
3450
  null
3428
3451
  );
3429
- const ie = Ti.exports;
3430
- const Vi = {
3452
+ const ne = Fi.exports;
3453
+ const Hi = {
3431
3454
  name: "DocumentSend",
3432
3455
  i18nOptions: {
3433
3456
  namespaces: "documentSend",
@@ -3451,15 +3474,15 @@ const Vi = {
3451
3474
  }
3452
3475
  },
3453
3476
  components: {
3454
- AddBlock: te,
3455
- Drawer: ie,
3456
- SendForm: a1,
3457
- CCheckbox: De,
3458
- BaseIcon: Te,
3459
- CButton: Ve
3477
+ AddBlock: ae,
3478
+ Drawer: ne,
3479
+ SendForm: t1,
3480
+ CCheckbox: Te,
3481
+ BaseIcon: Me,
3482
+ CButton: Be
3460
3483
  },
3461
3484
  mixins: [
3462
- k([], {
3485
+ L([], {
3463
3486
  useEmit: !1,
3464
3487
  setFnName: "setFormValue"
3465
3488
  }),
@@ -3501,7 +3524,7 @@ const Vi = {
3501
3524
  return !!(this.viewSettings && this.viewSettings.isPublicForm);
3502
3525
  },
3503
3526
  hasAnswerBlock() {
3504
- return (p(this._document, "template.views.read.nodes") || []).some((e) => e.itemType === "answer");
3527
+ return (m(this._document, "template.views.read.nodes") || []).some((e) => e.itemType === "answer");
3505
3528
  }
3506
3529
  },
3507
3530
  watch: {
@@ -3528,7 +3551,7 @@ const Vi = {
3528
3551
  return;
3529
3552
  const i = {
3530
3553
  ...this._document.copyTemplateDocDefault(),
3531
- name: p(this._document, "name") || this.$t("_common:untitled"),
3554
+ name: m(this._document, "name") || this.$t("_common:untitled"),
3532
3555
  _id: void 0,
3533
3556
  id: void 0,
3534
3557
  isVisible: !0
@@ -3540,7 +3563,7 @@ const Vi = {
3540
3563
  }
3541
3564
  }
3542
3565
  };
3543
- var Mi = function() {
3566
+ var Ai = function() {
3544
3567
  var e = this, t = e._self._c;
3545
3568
  return e.mq !== "sm" || e.isOpen ? t(e.mq === "sm" ? "div" : "Drawer", { tag: "component", attrs: { placement: "right" }, model: { value: e.isOpen, callback: function(a) {
3546
3569
  e.isOpen = a;
@@ -3552,20 +3575,20 @@ var Mi = function() {
3552
3575
  return [t("CButton", { staticClass: "is-left", attrs: { type: "secondary", size: "small" }, on: { click: function(n) {
3553
3576
  return a({ sectionKey: "answer" });
3554
3577
  } } }, [e._v(" " + e._s(e.$t("signMissingAdd")) + " ")])];
3555
- } }], null, !1, 2898075047) })], 1)]), e.isPublicForm ? t("CButton", { staticStyle: { height: "48px" }, attrs: { slot: "send", loading: e.isPosting, type: "secondary", wide: "" }, on: { click: e.onSaveDocument }, slot: "send" }, [e._v(" " + e._s(e.$t("signupToSend")) + " ")]) : e._e(), t("label", { staticClass: "has-text-grey-dark", staticStyle: { display: "inline-flex", "align-items": "center", cursor: "pointer", "user-select": "none", "font-size": "12px", "font-weight": "500", "padding-top": "1rem" }, attrs: { slot: "footer", for: "checkbox-save-as-temp" }, slot: "footer" }, [t("CCheckbox", { attrs: { id: "checkbox-save-as-temp", size: "small", type: "secondary" }, model: { value: e.saveTemplate, callback: function(a) {
3578
+ } }], null, !1, 2898075047) })], 1)]), e.isPublicForm ? t("CButton", { staticStyle: { height: "48px" }, attrs: { slot: "send", loading: e.isPosting, type: "secondary", wide: "" }, on: { click: e.onSaveDocument }, slot: "send" }, [e._v(" " + e._s(e.$t("signupToSend")) + " ")]) : e._e(), t("label", { staticClass: "text-gray-600", staticStyle: { display: "inline-flex", "align-items": "center", cursor: "pointer", "user-select": "none", "font-size": "12px", "font-weight": "500", "padding-top": "calc(1 * var(--rem))" }, attrs: { slot: "footer", for: "checkbox-save-as-temp" }, slot: "footer" }, [t("CCheckbox", { attrs: { id: "checkbox-save-as-temp", size: "small", type: "secondary" }, model: { value: e.saveTemplate, callback: function(a) {
3556
3579
  e.saveTemplate = a;
3557
3580
  }, expression: "saveTemplate" } }), t("div", { staticStyle: { "padding-left": "0.5em" } }, [e._v(" " + e._s(e.$t("saveDocAsTemplate")) + " "), t("BaseIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.saveTemplateTooltip, expression: "saveTemplateTooltip" }], attrs: { type: "info", size: "15" } })], 1)], 1)], 1)], 1)]) : e._e();
3558
- }, Ii = [], Bi = /* @__PURE__ */ c(
3559
- Vi,
3560
- Mi,
3561
- Ii,
3581
+ }, Pi = [], Ei = /* @__PURE__ */ c(
3582
+ Hi,
3583
+ Ai,
3584
+ Pi,
3562
3585
  !1,
3563
3586
  null,
3564
- "1321ff1f",
3587
+ "7cbf7355",
3565
3588
  null,
3566
3589
  null
3567
3590
  );
3568
- const Fi = Bi.exports, Hi = {
3591
+ const zi = Ei.exports, Zi = {
3569
3592
  name: "Draggable",
3570
3593
  data() {
3571
3594
  return {
@@ -3597,21 +3620,21 @@ const Fi = Bi.exports, Hi = {
3597
3620
  dragMousedown: this.onDragMouseDown
3598
3621
  });
3599
3622
  }
3600
- }, Ai = null, Pi = null;
3601
- var Ei = /* @__PURE__ */ c(
3602
- Hi,
3603
- Ai,
3604
- Pi,
3623
+ }, Oi = null, Ri = null;
3624
+ var Gi = /* @__PURE__ */ c(
3625
+ Zi,
3626
+ Oi,
3627
+ Ri,
3605
3628
  !1,
3606
3629
  null,
3607
3630
  null,
3608
3631
  null,
3609
3632
  null
3610
3633
  );
3611
- const zi = Ei.exports;
3612
- const Zi = {
3634
+ const Ui = Gi.exports;
3635
+ const Wi = {
3613
3636
  components: {
3614
- Draggable: zi
3637
+ Draggable: Ui
3615
3638
  },
3616
3639
  props: {
3617
3640
  offset: {
@@ -3624,39 +3647,39 @@ const Zi = {
3624
3647
  }
3625
3648
  }
3626
3649
  };
3627
- var Oi = function() {
3650
+ var qi = function() {
3628
3651
  var e = this, t = e._self._c;
3629
3652
  return t("portal", { attrs: { to: "modal" } }, [t("Draggable", { scopedSlots: e._u([{ key: "default", fn: function({ dragMousedown: a }) {
3630
- return [t("div", { staticClass: "popup", staticStyle: { position: "fixed", width: "280px", "border-radius": "0.5rem", padding: "1em 1em 3em 1em", "font-size": "14px", "background-color": "white", "min-height": "400px", "box-shadow": "0 5px 30px -5px rgb(0, 0, 0, 0.2)", "z-index": "1000" }, style: {
3653
+ return [t("div", { staticClass: "popup", staticStyle: { position: "fixed", width: "280px", "border-radius": "calc(0.5 * var(--rem))", padding: "1em 1em 3em 1em", "font-size": "14px", "background-color": "white", "min-height": "400px", "box-shadow": "0 5px 30px -5px rgb(0, 0, 0, 0.2)", "z-index": "1000" }, style: {
3631
3654
  top: "70px",
3632
3655
  left: `${e.offset + 15}px`
3633
3656
  } }, [t("div", { staticStyle: { position: "relative", height: "100%", width: "100%" } }, [t("CButton", { staticStyle: { position: "absolute", right: "0", top: "0" }, attrs: { icon: "x", size: "small", type: "none", pattern: "tertiary", circle: "" }, on: { click: function(n) {
3634
3657
  return e.$emit("close");
3635
- } } }), t("CButton", { staticStyle: { position: "absolute", right: "2.25rem", top: "0", cursor: "grab" }, attrs: { icon: "handle", size: "small", type: "none", pattern: "tertiary", circle: "" }, on: { mousedown: a } }), t("div", { staticStyle: { "font-weight": "700", "font-size": "1.5em", "margin-bottom": "1rem" } }, [e._v(" " + e._s(e.title) + " ")]), e._t("default")], 2)])];
3658
+ } } }), t("CButton", { staticStyle: { position: "absolute", right: "calc(2.25 * var(--rem))", top: "0", cursor: "grab" }, attrs: { icon: "handle", size: "small", type: "none", pattern: "tertiary", circle: "" }, on: { mousedown: a } }), t("div", { staticStyle: { "font-weight": "700", "font-size": "1.5em", "margin-bottom": "calc(1 * var(--rem))" } }, [e._v(" " + e._s(e.title) + " ")]), e._t("default")], 2)])];
3636
3659
  } }], null, !0) })], 1);
3637
- }, Ri = [], Gi = /* @__PURE__ */ c(
3638
- Zi,
3639
- Oi,
3640
- Ri,
3660
+ }, Ni = [], ji = /* @__PURE__ */ c(
3661
+ Wi,
3662
+ qi,
3663
+ Ni,
3641
3664
  !1,
3642
3665
  null,
3643
- "c854e562",
3666
+ "9b75010b",
3644
3667
  null,
3645
3668
  null
3646
3669
  );
3647
- const ae = Gi.exports;
3648
- const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
3670
+ const se = ji.exports;
3671
+ const Ki = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ki), Yi = {
3649
3672
  i18nOptions: {
3650
3673
  namespaces: "common",
3651
3674
  keyPrefix: "designLabels"
3652
3675
  },
3653
3676
  name: "Design",
3654
3677
  components: {
3655
- FormInputRow: Y,
3656
- DragWindow: ae
3678
+ FormInputRow: J,
3679
+ DragWindow: se
3657
3680
  },
3658
3681
  mixins: [
3659
- k(
3682
+ L(
3660
3683
  ["css"],
3661
3684
  { useEmit: !1, setFnName: "set" }
3662
3685
  )
@@ -3725,7 +3748,7 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
3725
3748
  // Dynamic depending on font family
3726
3749
  definitionOptions: {
3727
3750
  fontFamily: ({ key: i, value: e }) => {
3728
- const t = p(this.css, `${this.activeItem.selector}.fontWeight`) || p(this.activeItem, "style.fontWeight") || "400";
3751
+ const t = m(this.css, `${this.activeItem.selector}.fontWeight`) || m(this.activeItem, "style.fontWeight") || "400";
3729
3752
  return {
3730
3753
  label: this.$t("font"),
3731
3754
  inputs: [
@@ -3742,7 +3765,7 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
3742
3765
  weight: n,
3743
3766
  options: s = []
3744
3767
  }) => {
3745
- this.update(i, a), Ue(a), t != n && this.update("fontWeight", n), this.fontWeightOptions = s;
3768
+ this.update(i, a), We(a), t != n && this.update("fontWeight", n), this.fontWeightOptions = s;
3746
3769
  }
3747
3770
  }
3748
3771
  ]
@@ -4097,7 +4120,7 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
4097
4120
  style: {
4098
4121
  fontFamily: "Inter",
4099
4122
  fontSize: "56px",
4100
- // 2.5rem
4123
+ // calc(2.5 * var(--rem))
4101
4124
  fontWeight: 800,
4102
4125
  // 900
4103
4126
  ...s
@@ -4111,7 +4134,7 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
4111
4134
  style: {
4112
4135
  fontFamily: "Inter",
4113
4136
  fontSize: "48px",
4114
- // 2.5rem
4137
+ // calc(2.5 * var(--rem))
4115
4138
  fontWeight: 900,
4116
4139
  // 900
4117
4140
  ...i
@@ -4125,7 +4148,7 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
4125
4148
  style: {
4126
4149
  fontFamily: "Inter",
4127
4150
  fontSize: "36px",
4128
- // 2rem ~ 21px
4151
+ // calc(2 * var(--rem)) ~ 21px
4129
4152
  fontWeight: 900,
4130
4153
  // 900
4131
4154
  ...e
@@ -4139,7 +4162,7 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
4139
4162
  style: {
4140
4163
  fontFamily: "Inter",
4141
4164
  fontSize: "21px",
4142
- // 1.75rem
4165
+ // calc(1.75 * var(--rem))
4143
4166
  color: "#03f",
4144
4167
  // '#000000'
4145
4168
  fontWeight: 600,
@@ -4177,17 +4200,17 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
4177
4200
  activeItemOptions() {
4178
4201
  if (!this.activeItem)
4179
4202
  return [];
4180
- const { selector: i, category: e, style: t = {} } = this.activeItem, a = p(this.css, i) || {}, n = (s) => a[s] || t[s];
4203
+ const { selector: i, category: e, style: t = {} } = this.activeItem, a = m(this.css, i) || {}, n = (s) => a[s] || t[s];
4181
4204
  return this[e].map(({ option: s, key: o }, l) => {
4182
- const r = this.definitionOptions[s], h = Array.isArray(o) ? o.map((g) => ({ key: g, value: n(g) })) : { key: o, value: n(o) };
4183
- return r(h, l);
4205
+ const r = this.definitionOptions[s], p = Array.isArray(o) ? o.map((C) => ({ key: C, value: n(C) })) : { key: o, value: n(o) };
4206
+ return r(p, l);
4184
4207
  });
4185
4208
  }
4186
4209
  },
4187
4210
  watch: {
4188
4211
  async activeItem(i) {
4189
- const e = p(i, "style.fontFamily");
4190
- e && (this.fontWeightOptions = await We(e));
4212
+ const e = m(i, "style.fontFamily");
4213
+ e && (this.fontWeightOptions = await qe(e));
4191
4214
  }
4192
4215
  },
4193
4216
  methods: {
@@ -4199,9 +4222,9 @@ const Ui = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ui), Wi = {
4199
4222
  }
4200
4223
  }
4201
4224
  };
4202
- var qi = function() {
4225
+ var Qi = function() {
4203
4226
  var e = this, t = e._self._c;
4204
- return t("div", [t("div", { staticStyle: { padding: "0.5rem", position: "relative" } }, [t("div", { staticStyle: { "padding-left": "0.75rem", "font-size": "14px", color: "hsl(0, 0%, 30%)", "padding-bottom": "3px" } }, [e._v(" " + e._s(e.$t("typography")) + " ")]), e._l(e.typography, function(a) {
4227
+ return t("div", [t("div", { staticStyle: { padding: "calc(0.5 * var(--rem))", position: "relative" } }, [t("div", { staticStyle: { "padding-left": "calc(0.75 * var(--rem))", "font-size": "14px", color: "hsl(0, 0%, 30%)", "padding-bottom": "3px" } }, [e._v(" " + e._s(e.$t("typography")) + " ")]), e._l(e.typography, function(a) {
4205
4228
  return t("div", { key: a.label, staticClass: "list-option", on: { click: function(n) {
4206
4229
  e.activeItem = a;
4207
4230
  } } }, [t("div", { style: {
@@ -4211,25 +4234,25 @@ var qi = function() {
4211
4234
  color: a.style.color,
4212
4235
  lineHeight: 1
4213
4236
  } }, [e._v(" " + e._s(a.label) + " ")]), t("div", { staticStyle: { color: "hsl(0, 0%, 45%)", "font-weight": "500", "font-size": "13px", "padding-top": "5px" } }, [e._v(" " + e._s(a.style.fontFamily) + " " + e._s(a.style.fontSize) + " ")])]);
4214
- })], 2), t("div", { staticStyle: { height: "1px", "background-color": "hsl(0, 0%, 88%)", margin: "0.5rem 1rem" } }), t("div", { staticStyle: { padding: "0.75rem" } }, [t("div", { staticStyle: { "padding-left": "0.75rem", "font-size": "14px", color: "hsl(0, 0%, 30%)", "padding-bottom": "3px" } }, [e._v(" " + e._s(e.$t("section_plural")) + " ")]), e._l(e.sections, function(a) {
4237
+ })], 2), t("div", { staticStyle: { height: "1px", "background-color": "hsl(0, 0%, 88%)", margin: "calc(0.5 * var(--rem)) calc(1 * var(--rem))" } }), t("div", { staticStyle: { padding: "calc(0.75 * var(--rem))" } }, [t("div", { staticStyle: { "padding-left": "calc(0.75 * var(--rem))", "font-size": "14px", color: "hsl(0, 0%, 30%)", "padding-bottom": "3px" } }, [e._v(" " + e._s(e.$t("section_plural")) + " ")]), e._l(e.sections, function(a) {
4215
4238
  return t("div", { key: a.label, staticClass: "list-option", on: { click: function(n) {
4216
4239
  e.activeItem = a;
4217
4240
  } } }, [t("div", { staticStyle: { "font-size": "1.075em", "font-weight": "500" } }, [e._v(" " + e._s(a.label) + " ")]), t("div", { staticStyle: { color: "hsl(0, 0%, 45%)", "font-weight": "500", "font-size": "13px", "padding-top": "5px" } }, [e._v(" #000000 ")])]);
4218
4241
  })], 2), e.activeItem ? t("DragWindow", { attrs: { title: e.activeItem.label, offset: e.offset }, on: { close: () => e.activeItem = null } }, e._l(e.activeItemOptions, function(a, n) {
4219
4242
  return t("FormInputRow", { key: n, attrs: { label: a.label, inputs: a.inputs } });
4220
4243
  }), 1) : e._e()], 1);
4221
- }, Ni = [], ji = /* @__PURE__ */ c(
4222
- Wi,
4223
- qi,
4224
- Ni,
4244
+ }, Ji = [], Xi = /* @__PURE__ */ c(
4245
+ Yi,
4246
+ Qi,
4247
+ Ji,
4225
4248
  !1,
4226
4249
  null,
4227
- "7240db61",
4250
+ "930a4202",
4228
4251
  null,
4229
4252
  null
4230
4253
  );
4231
- const Ki = ji.exports;
4232
- const Yi = {
4254
+ const ea = Xi.exports;
4255
+ const ta = {
4233
4256
  name: "FieldsModal",
4234
4257
  i18nOptions: {
4235
4258
  namespaces: "FieldsModal",
@@ -4263,7 +4286,7 @@ const Yi = {
4263
4286
  }
4264
4287
  },
4265
4288
  components: {
4266
- CField: K
4289
+ CField: Q
4267
4290
  },
4268
4291
  props: {
4269
4292
  document: {
@@ -4319,7 +4342,7 @@ const Yi = {
4319
4342
  },
4320
4343
  created() {
4321
4344
  if (this.existingFieldId) {
4322
- const i = p(this.document, `fields.${this.existingFieldId}`);
4345
+ const i = m(this.document, `fields.${this.existingFieldId}`);
4323
4346
  i && (this.form = { ...this.form, ...i });
4324
4347
  }
4325
4348
  },
@@ -4339,14 +4362,14 @@ const Yi = {
4339
4362
  remove() {
4340
4363
  if (!this.existingFieldId)
4341
4364
  return;
4342
- const i = r1(this.document.fields, [this.existingFieldId]);
4365
+ const i = l1(this.document.fields, [this.existingFieldId]);
4343
4366
  this.set({ key: "data.fields", value: i }), this.$emit("close");
4344
4367
  }
4345
4368
  }
4346
4369
  };
4347
- var Qi = function() {
4370
+ var ia = function() {
4348
4371
  var e = this, t = e._self._c;
4349
- return t("div", { staticClass: "flex flex-col items-center w-full text-center font-inter has-background-white", staticStyle: { padding: "2em", "border-radius": "10px" } }, [t("div", { staticStyle: { "padding-bottom": "2em" } }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "600", "margin-bottom": "0.25em" } }, [e._v(" " + e._s(e.existingFieldId ? e.$t("editTitle") : e.$t("newTitle")) + " ")]), t("div", { staticStyle: { "margin-bottom": "0.25em", opacity: "0.65" } }, [e._v(" " + e._s(e.$t("description")) + " ")])]), t("form", { staticStyle: { width: "100%" }, on: { submit: function(a) {
4372
+ return t("div", { staticClass: "flex flex-col items-center w-full text-center bg-white font-inter", staticStyle: { padding: "2em", "border-radius": "10px" } }, [t("div", { staticStyle: { "padding-bottom": "2em" } }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "600", "margin-bottom": "0.25em" } }, [e._v(" " + e._s(e.existingFieldId ? e.$t("editTitle") : e.$t("newTitle")) + " ")]), t("div", { staticStyle: { "margin-bottom": "0.25em", opacity: "0.65" } }, [e._v(" " + e._s(e.$t("description")) + " ")])]), t("form", { staticStyle: { width: "100%" }, on: { submit: function(a) {
4350
4373
  return a.preventDefault(), e.submit.apply(null, arguments);
4351
4374
  }, keyup: function(a) {
4352
4375
  return !a.type.indexOf("key") && e._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : e.submit.apply(null, arguments);
@@ -4355,18 +4378,18 @@ var Qi = function() {
4355
4378
  }, expression: "form.label" } })], 1), t("CField", { staticStyle: { width: "100%", "text-align": "left", "margin-bottom": "1em" }, attrs: { label: e.$t("value"), messages: e.messages.form.value, validator: e.$v.form.value, "label-position": "inside" } }, [t("CInput", { attrs: { placeholder: e.$t("valuePlaceholder"), filled: "" }, model: { value: e.form.value, callback: function(a) {
4356
4379
  e.$set(e.form, "value", a);
4357
4380
  }, expression: "form.value" } })], 1), t("CButton", { staticStyle: { "margin-top": "1.5em" }, attrs: { type: "secondary", wide: "" }, domProps: { textContent: e._s(e.$t("_common:save")) }, on: { click: e.submit } }), e.existingFieldId ? t("CButton", { staticStyle: { "margin-top": "5px" }, attrs: { type: "none", pattern: "tertiary", wide: "" }, domProps: { textContent: e._s(e.$t("_common:remove")) }, on: { click: e.remove } }) : e._e()], 1)]);
4358
- }, Ji = [], Xi = /* @__PURE__ */ c(
4359
- Yi,
4360
- Qi,
4361
- Ji,
4381
+ }, aa = [], na = /* @__PURE__ */ c(
4382
+ ta,
4383
+ ia,
4384
+ aa,
4362
4385
  !1,
4363
4386
  null,
4364
- "073facc5",
4387
+ "5cc44007",
4365
4388
  null,
4366
4389
  null
4367
4390
  );
4368
- const ea = Xi.exports;
4369
- const ta = {
4391
+ const sa = na.exports;
4392
+ const oa = {
4370
4393
  i18nOptions: {
4371
4394
  namespaces: "DocumentFormFields",
4372
4395
  messages: {
@@ -4390,11 +4413,11 @@ const ta = {
4390
4413
  },
4391
4414
  name: "DocumentFormFields",
4392
4415
  components: {
4393
- SmartList: l1,
4394
- CAccordion: Je,
4395
- CField: K
4416
+ SmartList: o1,
4417
+ CAccordion: Qe,
4418
+ CField: Q
4396
4419
  },
4397
- mixins: [k()],
4420
+ mixins: [L()],
4398
4421
  props: {
4399
4422
  set: {
4400
4423
  type: Function,
@@ -4469,7 +4492,7 @@ const ta = {
4469
4492
  },
4470
4493
  openFieldModal({ existingFieldId: i }) {
4471
4494
  this.$modal.show(
4472
- ea,
4495
+ sa,
4473
4496
  {
4474
4497
  document: this._document,
4475
4498
  set: this.set,
@@ -4488,7 +4511,7 @@ const ta = {
4488
4511
  );
4489
4512
  },
4490
4513
  onCopyField(i) {
4491
- navigator && navigator.clipboard && i && navigator.clipboard.writeText(i).then(() => Me("info", this.$t("_common:copyMessage"))).catch((e) => L(e));
4514
+ navigator && navigator.clipboard && i && navigator.clipboard.writeText(i).then(() => q("info", this.$t("_common:copyMessage"))).catch((e) => $(e));
4492
4515
  },
4493
4516
  filterMethod(i, e) {
4494
4517
  return e.filter((t) => t.label.toLowerCase().includes(i.toLowerCase()));
@@ -4499,7 +4522,7 @@ const ta = {
4499
4522
  }
4500
4523
  }
4501
4524
  };
4502
- var ia = function() {
4525
+ var la = function() {
4503
4526
  var e = this, t = e._self._c;
4504
4527
  return t("div", { staticClass: "d-scroll-container", staticStyle: { padding: "1em" } }, [t("div", { staticStyle: { margin: "15px 0" } }, [t("div", { staticStyle: { "font-size": "16px", "font-weight": "600" }, domProps: { textContent: e._s(e.$t("title")) } }), t("div", { staticStyle: { color: "hsl(0, 0%, 35%)" }, domProps: { textContent: e._s(e.$t("description")) } })]), t("CInput", { attrs: { placeholder: e.$t("_common:search"), filled: "", size: "small" }, model: { value: e.query, callback: function(a) {
4505
4528
  e.query = a;
@@ -4544,18 +4567,18 @@ var ia = function() {
4544
4567
  } } })], 1)], 1)]);
4545
4568
  }) : t("div", { staticStyle: { "font-size": "13px", "text-align": "center", "user-select": "none", padding: "0.5em", "border-radius": "0.25em", opacity: "0.5" }, domProps: { textContent: e._s(e.$t("noResults")) } })], 2)]);
4546
4569
  })], 2)], 1);
4547
- }, aa = [], na = /* @__PURE__ */ c(
4548
- ta,
4549
- ia,
4550
- aa,
4570
+ }, ra = [], ca = /* @__PURE__ */ c(
4571
+ oa,
4572
+ la,
4573
+ ra,
4551
4574
  !1,
4552
4575
  null,
4553
- "ae1acd95",
4576
+ "ef9c2946",
4554
4577
  null,
4555
4578
  null
4556
4579
  );
4557
- const sa = na.exports;
4558
- const oa = {
4580
+ const da = ca.exports;
4581
+ const pa = {
4559
4582
  i18nOptions: {
4560
4583
  messages: {
4561
4584
  en: {
@@ -4598,10 +4621,10 @@ const oa = {
4598
4621
  },
4599
4622
  name: "ExtensionTab",
4600
4623
  components: {
4601
- draggable: c1,
4624
+ draggable: r1,
4602
4625
  Spinner: Ie
4603
4626
  },
4604
- mixins: [k([
4627
+ mixins: [L([
4605
4628
  "externalReferences",
4606
4629
  "clients",
4607
4630
  "articles"
@@ -4622,7 +4645,7 @@ const oa = {
4622
4645
  };
4623
4646
  },
4624
4647
  computed: {
4625
- ...v({
4648
+ ...g({
4626
4649
  allAuthenticatedCRMs: "settings/allAuthenticatedCRMs"
4627
4650
  }),
4628
4651
  currExternalReferences() {
@@ -4655,7 +4678,7 @@ const oa = {
4655
4678
  }
4656
4679
  },
4657
4680
  methods: {
4658
- priceFormat: Be,
4681
+ priceFormat: Fe,
4659
4682
  async _search(i) {
4660
4683
  try {
4661
4684
  this.isSearching = !0;
@@ -4674,7 +4697,7 @@ const oa = {
4674
4697
  this.isSearching = !1;
4675
4698
  }
4676
4699
  },
4677
- search: I(async function(e) {
4700
+ search: B(async function(e) {
4678
4701
  await this._search(e);
4679
4702
  }, 750),
4680
4703
  useSearchResult(i) {
@@ -4716,7 +4739,7 @@ const oa = {
4716
4739
  const { service: i, type: e, typeId: t } = this.currentExternalDeal, { data: a } = await _.suggestClients(i, { type: e, typeId: t });
4717
4740
  if (Array.isArray(a) && a.length) {
4718
4741
  const s = (n = this._document) == null ? void 0 : n.defaultAnswerMethod, o = a.map((l) => ({
4719
- ...Fe(),
4742
+ ...He(),
4720
4743
  ...s && { answerMethod: s },
4721
4744
  ...l
4722
4745
  }));
@@ -4746,49 +4769,49 @@ const oa = {
4746
4769
  }
4747
4770
  }
4748
4771
  };
4749
- var la = function() {
4772
+ var ua = function() {
4750
4773
  var e = this, t = e._self._c;
4751
- return t("div", { staticStyle: { "font-size": "13px", "padding-left": "0.5rem", "padding-right": "0.5rem", "padding-bottom": "4rem" } }, [e.allAuthenticatedCRMs.length > 1 ? t("CDropdown", { staticStyle: { position: "absolute", right: "0.5rem", top: "0.5rem" }, attrs: { position: "is-bottom-left" } }, [t("CButton", { attrs: { slot: "trigger", size: "small", circle: "", type: "none", pattern: "tertiary", icon: "more-vertical" }, slot: "trigger" }), e._l(e.allAuthenticatedCRMs, function(a) {
4774
+ return t("div", { staticStyle: { "font-size": "13px", "padding-left": "calc(0.5 * var(--rem))", "padding-right": "calc(0.5 * var(--rem))", "padding-bottom": "calc(4 * var(--rem))" } }, [e.allAuthenticatedCRMs.length > 1 ? t("CDropdown", { staticStyle: { position: "absolute", right: "calc(0.5 * var(--rem))", top: "calc(0.5 * var(--rem))" }, attrs: { position: "is-bottom-left" } }, [t("CButton", { attrs: { slot: "trigger", size: "small", circle: "", type: "none", pattern: "tertiary", icon: "more-vertical" }, slot: "trigger" }), e._l(e.allAuthenticatedCRMs, function(a) {
4752
4775
  return t("CDropdownItem", { key: a, attrs: { type: e.activeCrm === a ? "primary" : "secondary", size: "small" }, on: { click: function(n) {
4753
4776
  e.activeCrm = a;
4754
4777
  } } }, [e._v(" " + e._s(a.capitalize()) + " ")]);
4755
- })], 2) : e._e(), e.isLoading && !e.dealDetails ? t("div", { staticClass: "flex items-center justify-center w-full", staticStyle: { "padding-top": "2rem" } }, [t("Spinner", { attrs: { size: "24", color: "grey" } })], 1) : e.activeCrm ? [t("div", { staticStyle: { padding: "0 0.5rem 2rem 0.5rem" } }, [t("div", { staticStyle: { "font-weight": "500", "font-size": "16px" } }, [e._v(" " + e._s(e.activeCrm.capitalize()) + " ")]), e.typeDetails ? t("div", [t("div", { staticClass: "x-hint" }, [t("div", { staticClass: "flex w-full" }, [t("div", { domProps: { textContent: e._s(e.$t("referenceTo", { crm: e.activeCrm.capitalize(), type: e.$t(`type.${e.typeDetails.type}`) })) } }), t("CButton", { staticStyle: { position: "absolute", right: "2px", top: "2px" }, attrs: { icon: "x", size: "small", type: "none", pattern: "tertiary", circle: "" }, on: { click: function(a) {
4778
+ })], 2) : e._e(), e.isLoading && !e.dealDetails ? t("div", { staticClass: "flex items-center justify-center w-full", staticStyle: { "padding-top": "calc(2 * var(--rem))" } }, [t("Spinner", { attrs: { size: "24", color: "grey" } })], 1) : e.activeCrm ? [t("div", { staticStyle: { padding: "0 calc(0.5 * var(--rem)) calc(2 * var(--rem)) calc(0.5 * var(--rem))" } }, [t("div", { staticStyle: { "font-weight": "500", "font-size": "16px" } }, [e._v(" " + e._s(e.activeCrm.capitalize()) + " ")]), e.typeDetails ? t("div", [t("div", { staticClass: "x-hint" }, [t("div", { staticClass: "flex w-full" }, [t("div", { domProps: { textContent: e._s(e.$t("referenceTo", { crm: e.activeCrm.capitalize(), type: e.$t(`type.${e.typeDetails.type}`) })) } }), t("CButton", { staticStyle: { position: "absolute", right: "2px", top: "2px" }, attrs: { icon: "x", size: "small", type: "none", pattern: "tertiary", circle: "" }, on: { click: function(a) {
4756
4779
  return e.removeReference(e.typeDetails.type);
4757
- } } })], 1), t("div", { staticClass: "x-hint-name", domProps: { textContent: e._s(e.typeDetails.name || "") } })]), t("div", { staticClass: "divider" })]) : e._e(), t("div", { staticClass: "has-text-grey-dark" }, [e._v(" " + e._s(e.$t("headerText", { crm: e.activeCrm.capitalize() })) + " ")]), t("div", { staticStyle: { height: "2em" } }), e.currentExternalDeal ? [t("div", { staticClass: "has-text-grey", staticStyle: { "font-size": "12px" } }, [e._v(" " + e._s(e.$t("connectedTo", { type: e.dealType })) + " ")]), e.dealDetails ? t("div", { staticStyle: { padding: "0.5em", "border-radius": "3px", "background-color": "hsl(205, 100%, 95%)", border: "1px solid hsl(205, 100%, 78%)" } }, [t("div", [t(e.dealDetails.externalUrl ? "a" : "span", { tag: "component", staticClass: "has-text-secondary", staticStyle: { "font-weight": "600" }, attrs: { href: e.dealDetails.externalUrl || "#", target: "_blank" }, domProps: { textContent: e._s(e.dealDetails.name) } })], 1), e.dealDetails.currency ? t("div", { staticStyle: { opacity: "0.75", "font-size": "13px" } }, [e._v(" " + e._s(e.priceFormat(e.dealDetails.value, { showZero: !1, currency: e.dealDetails.currency })) + " ")]) : e._e()]) : e._e(), t("div", [t("CButton", { staticStyle: { "font-size": "12px", padding: "7px" }, attrs: { loading: e.isLoading, size: "small", type: "none", pattern: "tertiary" }, domProps: { textContent: e._s(e.$t("refreshData", { type: e.dealType })) }, on: { click: function(a) {
4780
+ } } })], 1), t("div", { staticClass: "x-hint-name", domProps: { textContent: e._s(e.typeDetails.name || "") } })]), t("div", { staticClass: "divider" })]) : e._e(), t("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("headerText", { crm: e.activeCrm.capitalize() })) + " ")]), t("div", { staticStyle: { height: "2em" } }), e.currentExternalDeal ? [t("div", { staticClass: "text-gray-400", staticStyle: { "font-size": "12px" } }, [e._v(" " + e._s(e.$t("connectedTo", { type: e.dealType })) + " ")]), e.dealDetails ? t("div", { staticStyle: { padding: "0.5em", "border-radius": "3px", "background-color": "hsl(205, 100%, 95%)", border: "1px solid hsl(205, 100%, 78%)" } }, [t("div", [t(e.dealDetails.externalUrl ? "a" : "span", { tag: "component", staticClass: "text-primary-500", staticStyle: { "font-weight": "600" }, attrs: { href: e.dealDetails.externalUrl || "#", target: "_blank" }, domProps: { textContent: e._s(e.dealDetails.name) } })], 1), e.dealDetails.currency ? t("div", { staticStyle: { opacity: "0.75", "font-size": "13px" } }, [e._v(" " + e._s(e.priceFormat(e.dealDetails.value, { showZero: !1, currency: e.dealDetails.currency })) + " ")]) : e._e()]) : e._e(), t("div", [t("CButton", { staticStyle: { "font-size": "12px", padding: "7px" }, attrs: { loading: e.isLoading, size: "small", type: "none", pattern: "tertiary" }, domProps: { textContent: e._s(e.$t("refreshData", { type: e.dealType })) }, on: { click: function(a) {
4758
4781
  return e.fetchReference();
4759
4782
  } } }), t("CButton", { staticStyle: { "font-size": "12px", padding: "7px" }, attrs: { size: "small", type: "none", pattern: "tertiary" }, domProps: { textContent: e._s(e.$t("unlink")) }, on: { click: function(a) {
4760
4783
  return e.removeReference();
4761
4784
  } } }), t("CButton", { staticStyle: { "font-size": "12px", padding: "7px" }, attrs: { size: "small", type: "none", pattern: "tertiary" }, domProps: { textContent: e._s(e.$t("suggestClients")) }, on: { click: function(a) {
4762
4785
  return e.suggestClients();
4763
- } } })], 1)] : t("div", [t("div", { staticClass: "has-text-grey-dark", staticStyle: { padding: "0 4px 0.25em" }, domProps: { textContent: e._s(e.$t("linkToDoc", { type: e.dealType })) } }), t("CAutocomplete", { ref: "input", staticStyle: { width: "auto" }, attrs: { data: e.searchResults, loading: e.isSearching, placeholder: `${e.$t("_common:search")} ${e.activeCrm.capitalize()}`, expanded: "", size: "small", "keep-first": "", filled: "" }, on: { typing: function(a) {
4786
+ } } })], 1)] : t("div", [t("div", { staticClass: "text-gray-600", staticStyle: { padding: "0 4px 0.25em" }, domProps: { textContent: e._s(e.$t("linkToDoc", { type: e.dealType })) } }), t("CAutocomplete", { ref: "input", staticStyle: { width: "auto" }, attrs: { data: e.searchResults, loading: e.isSearching, placeholder: `${e.$t("_common:search")} ${e.activeCrm.capitalize()}`, expanded: "", size: "small", "keep-first": "", filled: "" }, on: { typing: function(a) {
4764
4787
  return e.search(a);
4765
4788
  }, select: function(a) {
4766
4789
  return e.useSearchResult(a);
4767
4790
  } }, scopedSlots: e._u([{ key: "default", fn: function({ option: a }) {
4768
- return t("div", { staticStyle: { "line-height": "1.5" } }, [t("div", { staticStyle: { "font-weight": "500" } }, [e._v(e._s(a.name))]), t("div", { staticClass: "has-text-grey-dark", staticStyle: { "font-size": "14px" } }, [e._v(" " + e._s(a.externalReference.type.capitalize()) + " " + e._s(a.externalReference.typeId) + " "), a.value && a.currency ? [e._v(" · " + e._s(e.priceFormat(a.value, { showZero: !1, currency: a.currency })) + " ")] : e._e()], 2)]);
4791
+ return t("div", { staticStyle: { "line-height": "1.5" } }, [t("div", { staticStyle: { "font-weight": "500" } }, [e._v(e._s(a.name))]), t("div", { staticClass: "text-gray-600", staticStyle: { "font-size": "14px" } }, [e._v(" " + e._s(a.externalReference.type.capitalize()) + " " + e._s(a.externalReference.typeId) + " "), a.value && a.currency ? [e._v(" · " + e._s(e.priceFormat(a.value, { showZero: !1, currency: a.currency })) + " ")] : e._e()], 2)]);
4769
4792
  } }]), model: { value: e.searchQuery, callback: function(a) {
4770
4793
  e.searchQuery = a;
4771
- }, expression: "searchQuery" } }, [t("template", { slot: "empty" }, [e._v(" " + e._s(e.$t("_common:noResults")) + " ")])], 2)], 1)], 2), e.showDealProducts ? t("div", [t("div", { staticStyle: { padding: "0 0.5rem 1rem 0.5rem" } }, [t("div", { staticStyle: { "font-weight": "500" } }, [e._v(" " + e._s(e.$t("productsTitle")) + " "), t("BaseIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: "Use a product by drag & dropping a product to a package.", expression: "'Use a product by drag & dropping a product to a package.'" }], attrs: { type: "info", size: "13" } })], 1), t("div", { staticClass: "has-text-grey-dark", domProps: { textContent: e._s(e.$t("productsText", { type: e.dealType, crm: e.activeCrm.capitalize() })) } })]), e.dealDetails.articles && e.dealDetails.articles.length ? t("draggable", { staticStyle: { "min-height": "3rem", padding: "0 0.5rem" }, attrs: { list: e.dealDetails.articles, group: {
4794
+ }, expression: "searchQuery" } }, [t("template", { slot: "empty" }, [e._v(" " + e._s(e.$t("_common:noResults")) + " ")])], 2)], 1)], 2), e.showDealProducts ? t("div", [t("div", { staticStyle: { padding: "0 calc(0.5 * var(--rem)) calc(1 * var(--rem)) calc(0.5 * var(--rem))" } }, [t("div", { staticStyle: { "font-weight": "500" } }, [e._v(" " + e._s(e.$t("productsTitle")) + " "), t("BaseIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: "Use a product by drag & dropping a product to a package.", expression: "'Use a product by drag & dropping a product to a package.'" }], attrs: { type: "info", size: "13" } })], 1), t("div", { staticClass: "text-gray-600", domProps: { textContent: e._s(e.$t("productsText", { type: e.dealType, crm: e.activeCrm.capitalize() })) } })]), e.dealDetails.articles && e.dealDetails.articles.length ? t("draggable", { staticStyle: { "min-height": "calc(3 * var(--rem))", padding: "0 calc(0.5 * var(--rem))" }, attrs: { list: e.dealDetails.articles, group: {
4772
4795
  name: "articles",
4773
4796
  pull: "clone",
4774
4797
  put: !1
4775
4798
  }, clone: e.cloneArticle } }, e._l(e.dealDetails.articles, function(a) {
4776
- return t("div", { key: a._uniqueId, staticStyle: { padding: "0.5rem", "line-height": "1", "margin-bottom": "0.5rem", "box-shadow": "0 1px 3px rgb(0, 0, 0, 0.3)", background: "white", "border-radius": "3px", cursor: "grab", "user-select": "none" }, on: { click: function(n) {
4799
+ return t("div", { key: a._uniqueId, staticStyle: { padding: "calc(0.5 * var(--rem))", "line-height": "1", "margin-bottom": "calc(0.5 * var(--rem))", "box-shadow": "0 1px 3px rgb(0, 0, 0, 0.3)", background: "white", "border-radius": "3px", cursor: "grab", "user-select": "none" }, on: { click: function(n) {
4777
4800
  return e.addArticle(a);
4778
- } } }, [t("div", { staticStyle: { "font-weight": "500", "padding-bottom": "4px", "font-size": "14px" }, domProps: { textContent: e._s(a.name) } }), t("div", { staticClass: "has-text-grey-dark", staticStyle: { "font-size": "12px" } }, [e._v(" " + e._s(e.priceFormat(a.price || 0, { showZero: !1, currency: a.currency || "USD" })) + " · " + e._s(a.quantity || 0) + "x "), a.vat !== null ? [e._v(" · " + e._s(e._document.$t("vat").capitalize()) + " " + e._s(a.vat) + "% ")] : e._e()], 2)]);
4779
- }), 0) : t("div", { staticClass: "flex w-full has-text-grey-dark", staticStyle: { "background-color": "hsl(0, 0%, 95%)", padding: "5px", "font-size": "12px", "border-radius": "5px", "line-height": "1.35" } }, [t("BaseIcon", { staticStyle: { margin: "1px 4px 0 0", "flex-shrink": "0" }, attrs: { type: "info", size: "13" } }), t("div", { domProps: { textContent: e._s(e.$t("noProducts", { type: e.dealType })) } })], 1)], 1) : e._e()] : t("div", { staticClass: "flex flex-col items-center justify-center w-full text-center", staticStyle: { "padding-top": "1rem" } }, [t("BaseIcon", { staticClass: "has-text-secondary", staticStyle: { "padding-bottom": "5px" }, attrs: { type: "info", size: "16" } }), t("div", { staticClass: "has-text-grey-dark" }, [e._v(" " + e._s(e.$t("noCrm")) + " ")]), t("div", { staticClass: "text-center", staticStyle: { "padding-top": "1rem" } }, [t("router-link", { staticClass: "has-text-secondary", staticStyle: { "font-weight": "500" }, attrs: { to: { name: "settings" } } }, [e._v(" " + e._s(e.$t("noCrmAction")) + " ")])], 1)], 1)], 2);
4780
- }, ra = [], ca = /* @__PURE__ */ c(
4781
- oa,
4782
- la,
4783
- ra,
4801
+ } } }, [t("div", { staticStyle: { "font-weight": "500", "padding-bottom": "4px", "font-size": "14px" }, domProps: { textContent: e._s(a.name) } }), t("div", { staticClass: "text-gray-600", staticStyle: { "font-size": "12px" } }, [e._v(" " + e._s(e.priceFormat(a.price || 0, { showZero: !1, currency: a.currency || "USD" })) + " · " + e._s(a.quantity || 0) + "x "), a.vat !== null ? [e._v(" · " + e._s(e._document.$t("vat").capitalize()) + " " + e._s(a.vat) + "% ")] : e._e()], 2)]);
4802
+ }), 0) : t("div", { staticClass: "flex w-full text-gray-600", staticStyle: { "background-color": "hsl(var(--gray-color-100) / 1)", padding: "5px", "font-size": "12px", "border-radius": "5px", "line-height": "1.35" } }, [t("BaseIcon", { staticStyle: { margin: "1px 4px 0 0", "flex-shrink": "0" }, attrs: { type: "info", size: "13" } }), t("div", { domProps: { textContent: e._s(e.$t("noProducts", { type: e.dealType })) } })], 1)], 1) : e._e()] : t("div", { staticClass: "flex flex-col items-center justify-center w-full text-center", staticStyle: { "padding-top": "calc(1 * var(--rem))" } }, [t("BaseIcon", { staticClass: "text-primary-500", staticStyle: { "padding-bottom": "5px" }, attrs: { type: "info", size: "16" } }), t("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("noCrm")) + " ")]), t("div", { staticClass: "text-center", staticStyle: { "padding-top": "calc(1 * var(--rem))" } }, [t("router-link", { staticClass: "text-primary-500", staticStyle: { "font-weight": "500" }, attrs: { to: { name: "settings" } } }, [e._v(" " + e._s(e.$t("noCrmAction")) + " ")])], 1)], 1)], 2);
4803
+ }, ma = [], ha = /* @__PURE__ */ c(
4804
+ pa,
4805
+ ua,
4806
+ ma,
4784
4807
  !1,
4785
4808
  null,
4786
- "061b7aaa",
4809
+ "b775e9f9",
4787
4810
  null,
4788
4811
  null
4789
4812
  );
4790
- const da = ca.exports;
4791
- const pa = {
4813
+ const fa = ha.exports;
4814
+ const ga = {
4792
4815
  i18nOptions: {
4793
4816
  namespaces: "DocSettings",
4794
4817
  messages: {
@@ -4876,8 +4899,8 @@ const pa = {
4876
4899
  },
4877
4900
  name: "DocumentGeneralSettings",
4878
4901
  components: {
4879
- FormInputRow: Y,
4880
- DragWindow: ae
4902
+ FormInputRow: J,
4903
+ DragWindow: se
4881
4904
  },
4882
4905
  props: {
4883
4906
  offset: {
@@ -4885,7 +4908,7 @@ const pa = {
4885
4908
  required: !0
4886
4909
  }
4887
4910
  },
4888
- mixins: [k([
4911
+ mixins: [L([
4889
4912
  "tags",
4890
4913
  "series",
4891
4914
  "senderId",
@@ -4902,7 +4925,7 @@ const pa = {
4902
4925
  };
4903
4926
  },
4904
4927
  computed: {
4905
- ...v({
4928
+ ...g({
4906
4929
  members: "companyUsers/all",
4907
4930
  getMember: "companyUsers/byId",
4908
4931
  isLoadingMembers: "companyUsers/isFetching"
@@ -4914,8 +4937,9 @@ const pa = {
4914
4937
  return this.getMember(this.senderId) || {};
4915
4938
  },
4916
4939
  vatTypes() {
4940
+ var e;
4917
4941
  const i = ["vat"];
4918
- return He[this.$brand].defaultRegion === "US" && i.push("tax"), i;
4942
+ return ((e = Ae[f.brand]) == null ? void 0 : e.defaultRegion) === "US" && i.push("tax"), i;
4919
4943
  },
4920
4944
  options() {
4921
4945
  return [
@@ -4941,7 +4965,7 @@ const pa = {
4941
4965
  component: "select",
4942
4966
  props: {
4943
4967
  value: this.language,
4944
- options: Ae.map((i) => ({ value: i, label: this.$t(`iso:language.${i}`) })).sort((i, e) => i.label.localeCompare(e.label))
4968
+ options: Pe.map((i) => ({ value: i, label: this.$t(`iso:language.${i}`) })).sort((i, e) => i.label.localeCompare(e.label))
4945
4969
  },
4946
4970
  onInput: (i) => this.update("language", i)
4947
4971
  }
@@ -5092,7 +5116,7 @@ const pa = {
5092
5116
  }
5093
5117
  }
5094
5118
  };
5095
- var ua = function() {
5119
+ var Ca = function() {
5096
5120
  var e = this, t = e._self._c;
5097
5121
  return t("div", { staticClass: "d-scroll-container", staticStyle: { height: "100%", padding: "1em" } }, [e._l(e.options, function(a, n) {
5098
5122
  return t("FormInputRow", { key: n, attrs: { label: a.label, "info-tooltip": a.infoTooltip, inputs: a.inputs } });
@@ -5101,18 +5125,18 @@ var ua = function() {
5101
5125
  } } }, [e._l(e.priceOptions, function(a, n) {
5102
5126
  return [a.type === "divider" ? t("div", { key: n, staticClass: "divider" }) : t("FormInputRow", { key: n, attrs: { label: a.label, "info-tooltip": a.infoTooltip, inputs: a.inputs } })];
5103
5127
  })], 2) : e._e()], 2);
5104
- }, ma = [], ha = /* @__PURE__ */ c(
5105
- pa,
5106
- ua,
5107
- ma,
5128
+ }, va = [], ya = /* @__PURE__ */ c(
5129
+ ga,
5130
+ Ca,
5131
+ va,
5108
5132
  !1,
5109
5133
  null,
5110
- "c8d27822",
5134
+ "1601b625",
5111
5135
  null,
5112
5136
  null
5113
5137
  );
5114
- const fa = ha.exports;
5115
- const ga = {
5138
+ const xa = ya.exports;
5139
+ const wa = {
5116
5140
  name: "DocumentGuide",
5117
5141
  i18nOptions: {
5118
5142
  namespaces: "documentGuide",
@@ -5142,61 +5166,231 @@ const ga = {
5142
5166
  data() {
5143
5167
  return {
5144
5168
  step: 0,
5145
- steps: [
5146
- {
5147
- title: this.$t("steps.addBlocks"),
5148
- img: "drag-block.png"
5149
- },
5150
- {
5151
- title: this.$t("steps.textFormatting"),
5152
- img: "text-bubble.png"
5153
- },
5154
- {
5155
- title: this.$t("steps.editBlocks"),
5156
- img: "block-options.png"
5157
- },
5158
- {
5159
- title: this.$t("steps.changeProduct"),
5160
- img: "article-options.png"
5161
- },
5162
- {
5163
- title: this.$t("steps.send"),
5164
- img: "doc-send.png"
5165
- }
5166
- ]
5169
+ steps: [{
5170
+ title: this.$t("steps.addBlocks"),
5171
+ img: c1
5172
+ }, {
5173
+ title: this.$t("steps.textFormatting"),
5174
+ img: d1
5175
+ }, {
5176
+ title: this.$t("steps.editBlocks"),
5177
+ img: p1
5178
+ }, {
5179
+ title: this.$t("steps.changeProduct"),
5180
+ img: u1
5181
+ }, {
5182
+ title: this.$t("steps.send"),
5183
+ img: m1
5184
+ }]
5167
5185
  };
5168
5186
  }
5169
5187
  };
5170
- var Ca = function() {
5188
+ var _a = function() {
5171
5189
  var e = this, t = e._self._c;
5172
- return t("div", { staticStyle: { position: "fixed", left: "0", top: "0", right: "0", bottom: "0", "background-color": "hsla(0, 0%, 0%, 0.2)", padding: "4rem 0", display: "grid", "place-items": "center", "z-index": "9999" } }, [t("div", { staticStyle: { "background-color": "hsl(212, 90%, 15%)", padding: "3rem 2.5rem 2.5rem 2.5rem", "border-radius": "8px", width: "520px", color: "hsla(0, 0%, 100%, 0.8)", "max-width": "95%", "font-size": "16px", position: "relative" } }, [t("CButton", { staticStyle: { position: "absolute", right: "1rem", top: "1rem" }, attrs: { size: "small", type: "none", pattern: "tertiary", circle: "", icon: "x" }, on: { click: function(a) {
5173
- return e.$emit("close");
5174
- } } }), t("div", { staticStyle: { "padding-left": "1rem" } }, [t("div", { staticStyle: { "text-transform": "uppercase", "font-size": "0.75em", "padding-bottom": "0.7em", color: "hsl(321, 100%, 78%)" } }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", { staticStyle: { "font-size": "1.5em", "padding-bottom": "1em", "line-height": "1.4", "font-weight": "500", color: "white", "min-height": "100px" } }, [e._v(" " + e._s(e.step + 1) + ". "), t("span", { domProps: { innerHTML: e._s(e.steps[e.step].title) } })])]), t("div", { staticStyle: { width: "100%", "background-color": "hsla(0, 0%, 100%, 0.2)", "line-height": "0", "border-radius": "8px", overflow: "hidden", position: "relative", "padding-bottom": "60%" } }, [t("transition", { attrs: { name: "slide-prev" } }, [t("img", { key: e.step, staticStyle: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%" }, attrs: { src: `/img/app/account/onboarding/${e.steps[e.step].img}` } })])], 1), t("div", { staticStyle: { "margin-top": "3rem", display: "flex", "justify-content": "flex-end", position: "relative" } }, [t("div", { staticStyle: { position: "absolute", display: "grid", gap: "10px", "grid-template-columns": "repeat(5, 1fr)", top: "50%", left: "50%", transform: "translate(-50%, -50%)" } }, e._l(e.steps, function(a, n) {
5175
- return t("div", { key: n, staticStyle: { width: "8px", height: "8px", "border-radius": "8px", cursor: "pointer" }, style: { backgroundColor: e.step === n ? "white" : "hsla(0, 0%, 100%, 0.4)" }, on: { click: function(s) {
5176
- e.step = n;
5177
- } } });
5178
- }), 0), t("CButton", { staticClass: "pulse", staticStyle: { "border-radius": "5px", "animation-duration": "0.2s" }, attrs: { type: "secondary", "icon-right": "arrow-right" }, on: { click: function(a) {
5179
- e.step === e.steps.length - 1 ? e.$emit("close") : e.step++;
5180
- } } }, [e._v(" " + e._s(e.step === e.steps.length - 1 ? e.$t("_common:done").capitalize() : e.$t("_common:next").capitalize()) + " ")])], 1)], 1)]);
5181
- }, va = [], ya = /* @__PURE__ */ c(
5182
- ga,
5183
- Ca,
5184
- va,
5190
+ return t("div", {
5191
+ staticStyle: {
5192
+ position: "fixed",
5193
+ left: "0",
5194
+ top: "0",
5195
+ right: "0",
5196
+ bottom: "0",
5197
+ "background-color": "hsla(0, 0%, 0%, 0.2)",
5198
+ padding: "calc(4 * var(--rem)) 0",
5199
+ display: "grid",
5200
+ "place-items": "center",
5201
+ "z-index": "9999"
5202
+ }
5203
+ }, [t("div", {
5204
+ staticStyle: {
5205
+ "background-color": "hsl(212, 90%, 15%)",
5206
+ padding: "calc(3 * var(--rem)) calc(2.5 * var(--rem)) calc(2.5 * var(--rem)) calc(2.5 * var(--rem))",
5207
+ "border-radius": "8px",
5208
+ width: "520px",
5209
+ color: "hsla(0, 0%, 100%, 0.8)",
5210
+ "max-width": "95%",
5211
+ "font-size": "16px",
5212
+ position: "relative"
5213
+ }
5214
+ }, [t("CButton", {
5215
+ staticStyle: {
5216
+ position: "absolute",
5217
+ right: "calc(1 * var(--rem))",
5218
+ top: "calc(1 * var(--rem))"
5219
+ },
5220
+ attrs: {
5221
+ size: "small",
5222
+ type: "none",
5223
+ pattern: "tertiary",
5224
+ circle: "",
5225
+ icon: "x"
5226
+ },
5227
+ on: {
5228
+ click: function(a) {
5229
+ return e.$emit("close");
5230
+ }
5231
+ }
5232
+ }), t("div", {
5233
+ staticStyle: {
5234
+ "padding-left": "calc(1 * var(--rem))"
5235
+ }
5236
+ }, [t("div", {
5237
+ staticStyle: {
5238
+ "text-transform": "uppercase",
5239
+ "font-size": "0.75em",
5240
+ "padding-bottom": "0.7em",
5241
+ color: "hsl(321, 100%, 78%)"
5242
+ }
5243
+ }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", {
5244
+ staticStyle: {
5245
+ "font-size": "1.5em",
5246
+ "padding-bottom": "1em",
5247
+ "line-height": "1.4",
5248
+ "font-weight": "500",
5249
+ color: "white",
5250
+ "min-height": "100px"
5251
+ }
5252
+ }, [e._v(" " + e._s(e.step + 1) + ". "), t("span", {
5253
+ domProps: {
5254
+ innerHTML: e._s(e.steps[e.step].title)
5255
+ }
5256
+ })])]), t("div", {
5257
+ staticStyle: {
5258
+ width: "100%",
5259
+ "background-color": "hsla(0, 0%, 100%, 0.2)",
5260
+ "line-height": "0",
5261
+ "border-radius": "8px",
5262
+ overflow: "hidden",
5263
+ position: "relative",
5264
+ "padding-bottom": "60%"
5265
+ }
5266
+ }, [t("transition", {
5267
+ attrs: {
5268
+ name: "slide-prev"
5269
+ }
5270
+ }, [t("img", {
5271
+ key: e.step,
5272
+ staticStyle: {
5273
+ position: "absolute",
5274
+ left: "0",
5275
+ top: "0",
5276
+ width: "100%",
5277
+ height: "100%"
5278
+ },
5279
+ attrs: {
5280
+ src: e.steps[e.step].img
5281
+ }
5282
+ })])], 1), t("div", {
5283
+ staticStyle: {
5284
+ "margin-top": "calc(3 * var(--rem))",
5285
+ display: "flex",
5286
+ "justify-content": "flex-end",
5287
+ position: "relative"
5288
+ }
5289
+ }, [t("div", {
5290
+ staticStyle: {
5291
+ position: "absolute",
5292
+ display: "grid",
5293
+ gap: "10px",
5294
+ "grid-template-columns": "repeat(5, 1fr)",
5295
+ top: "50%",
5296
+ left: "50%",
5297
+ transform: "translate(-50%, -50%)"
5298
+ }
5299
+ }, e._l(e.steps, function(a, n) {
5300
+ return t("div", {
5301
+ key: n,
5302
+ staticStyle: {
5303
+ width: "8px",
5304
+ height: "8px",
5305
+ "border-radius": "8px",
5306
+ cursor: "pointer"
5307
+ },
5308
+ style: {
5309
+ backgroundColor: e.step === n ? "white" : "hsla(0, 0%, 100%, 0.4)"
5310
+ },
5311
+ on: {
5312
+ click: function(s) {
5313
+ e.step = n;
5314
+ }
5315
+ }
5316
+ });
5317
+ }), 0), t("CButton", {
5318
+ staticClass: "pulse",
5319
+ staticStyle: {
5320
+ "border-radius": "5px",
5321
+ "animation-duration": "0.2s"
5322
+ },
5323
+ attrs: {
5324
+ type: "secondary",
5325
+ "icon-right": "arrow-right"
5326
+ },
5327
+ on: {
5328
+ click: function(a) {
5329
+ e.step === e.steps.length - 1 ? e.$emit("close") : e.step++;
5330
+ }
5331
+ }
5332
+ }, [e._v(" " + e._s(e.step === e.steps.length - 1 ? e.$t("_common:done").capitalize() : e.$t("_common:next").capitalize()) + " ")])], 1)], 1)]);
5333
+ }, ba = [], ka = c(wa, _a, ba, !1, null, null, null, null);
5334
+ const La = ka.exports, $a = {
5335
+ name: "MenuBlockConvertPopover",
5336
+ props: {
5337
+ target: {
5338
+ type: HTMLElement,
5339
+ required: !0
5340
+ }
5341
+ },
5342
+ i18nOptions: {
5343
+ namespaces: "MenuBlockConvertPopover",
5344
+ messages: {
5345
+ sv: {
5346
+ text: '<span class="font-semibold">Den här dokumentmallen är låst.</span> För att lägga till block behöver du först göra mallen redigerbar.',
5347
+ button: "Gör redigerbar"
5348
+ },
5349
+ en: {
5350
+ text: '<span class="font-semibold">This document template is locked.</span> To add blocks you need to make the template editable first.',
5351
+ button: "Make editable"
5352
+ }
5353
+ }
5354
+ },
5355
+ watch: {
5356
+ target: {
5357
+ immediate: !0,
5358
+ handler(i) {
5359
+ i && this.$nextTick(() => {
5360
+ const { top: e, left: t, width: a, height: n } = i.getBoundingClientRect();
5361
+ this.$refs.popover.style.top = `${e + n}px`, this.$refs.popover.style.left = `${t + a + 10}px`;
5362
+ });
5363
+ }
5364
+ }
5365
+ }
5366
+ };
5367
+ var Sa = function() {
5368
+ var e = this, t = e._self._c;
5369
+ return t("div", [t("div", { staticClass: "fixed inset-0 z-10", on: { click: function(a) {
5370
+ return a.target !== a.currentTarget ? null : e.$emit("close");
5371
+ } } }), t("transition", { attrs: { appear: "", mode: "out-in", "enter-active-class": "transition-all duration-100 ease-out", "enter-class": "-translate-x-4 opacity-0", "enter-to-class": "translate-x-0 opacity-100", "leave-active-class": "transition-opacity duration-100 ease-out", "leave-class": "opacity-100", "leave-to-class": "opacity-0" } }, [t("div", { ref: "popover", staticClass: "absolute z-10 p-4 text-sm -translate-y-1/2 bg-white rounded-lg shadow-xl w-52" }, [t("div", { staticClass: "pb-4", domProps: { innerHTML: e._s(e.$t("text")) } }), t("CButton", { attrs: { type: "secondary", size: "small", "icon-right": "arrow-right" }, on: { click: function(a) {
5372
+ return e.$emit("convert");
5373
+ } } }, [e._v(" " + e._s(e.$t("button")) + " ")])], 1)])], 1);
5374
+ }, Da = [], Va = /* @__PURE__ */ c(
5375
+ $a,
5376
+ Sa,
5377
+ Da,
5185
5378
  !1,
5186
5379
  null,
5187
5380
  null,
5188
5381
  null,
5189
5382
  null
5190
5383
  );
5191
- const xa = ya.exports;
5192
- const wa = {
5193
- name: "DocumentFormMenu",
5384
+ const Ta = Va.exports;
5385
+ const Ma = {
5386
+ name: "ProBadge",
5387
+ template: '<div class="text-[10px] font-semibold text-white bg-primary-500 rounded leading-none px-1.5 py-1">Pro</div>'
5388
+ }, Ba = {
5389
+ name: "MenuBlocks",
5194
5390
  i18nOptions: {
5195
- namespaces: "documentFormMenu",
5391
+ namespaces: "menuBlocks",
5196
5392
  messages: {
5197
5393
  en: {
5198
- guideButton: "Tutorial",
5199
- tabs: { blocks: "Block", design: "Design", fields: "Fields" },
5200
5394
  blocks: {
5201
5395
  header: "Header",
5202
5396
  parties: "Parties",
@@ -5228,8 +5422,6 @@ const wa = {
5228
5422
  }
5229
5423
  },
5230
5424
  sv: {
5231
- guideButton: "Guide",
5232
- tabs: { blocks: "Block", design: "Design", fields: "Fält" },
5233
5425
  blocks: {
5234
5426
  header: "Header",
5235
5427
  parties: "Parter",
@@ -5263,65 +5455,47 @@ const wa = {
5263
5455
  }
5264
5456
  },
5265
5457
  components: {
5266
- DragList: q,
5267
- DragItem: N,
5268
- AddBlock: te,
5269
- Design: Ki,
5270
- Fields: sa,
5271
- ExtensionTab: da,
5272
- DocumentGeneralSettings: fa,
5273
- DocumentGuide: xa
5458
+ simplebar: k,
5459
+ DragList: N,
5460
+ DragItem: j,
5461
+ AddBlock: ae,
5462
+ IsPremiumPreStep: K,
5463
+ ProBadge: Ma,
5464
+ MenuBlockConvertPopover: Ta
5274
5465
  },
5275
5466
  props: {
5276
- state: {
5467
+ _document: {
5277
5468
  type: Object,
5278
5469
  required: !0
5279
5470
  },
5280
- onAddedBlock: {
5471
+ set: {
5281
5472
  type: Function,
5282
- // Function to call when a new section is added
5283
5473
  required: !0
5284
5474
  },
5285
- set: {
5475
+ removeValue: {
5286
5476
  type: Function,
5287
5477
  required: !0
5288
5478
  },
5289
- canDrag: {
5290
- type: Boolean,
5291
- default: !0
5292
- },
5293
- preferDrag: {
5294
- type: Boolean,
5295
- default: !1
5296
- },
5297
5479
  fixed: {
5298
5480
  type: Boolean,
5299
5481
  default: !1
5300
5482
  },
5301
- canEditTemplate: {
5483
+ canUseBlocks: {
5302
5484
  type: Boolean,
5303
- default: !1
5304
- },
5305
- width: {
5306
- type: Number,
5307
- default: 270
5485
+ default: !0
5308
5486
  }
5309
5487
  },
5310
5488
  mixins: [b],
5311
5489
  data() {
5312
5490
  return {
5313
- showGuide: !1,
5314
- showGuideNotification: !B.getItem("hideFormGuideNotification"),
5315
- tab: "blocks",
5316
5491
  subMenuToShow: null,
5317
5492
  // helper prop, working with delay, set subMenu or not depending on mouse movements
5318
5493
  activeSubMenu: null,
5319
5494
  // decisive prop showing/hiding subMenu
5320
5495
  showAllBlocks: !1,
5321
5496
  // if all blocks should be visible
5322
- includeMockData: !1,
5323
- // if mock data should be included onAdd
5324
- config: f,
5497
+ showConvertEditableDialog: !1,
5498
+ showConvertEditableDialogTarget: null,
5325
5499
  primaryFilterNames: ["header", "parties", "packageGroup", "multiGroupPricing", "titleAndText2", "answer"],
5326
5500
  tooltips: {
5327
5501
  parties: `
@@ -5460,85 +5634,88 @@ const wa = {
5460
5634
  };
5461
5635
  },
5462
5636
  computed: {
5463
- ...v({
5637
+ ...g({
5464
5638
  allAuthenticatedCRMs: "settings/allAuthenticatedCRMs",
5465
5639
  feature: "application/feature"
5466
5640
  }),
5467
- docLanguage() {
5468
- return p(this.state, "language") || "en";
5641
+ canDrag() {
5642
+ return !this.fixed;
5469
5643
  },
5470
5644
  allBlocks() {
5471
5645
  const i = [
5472
5646
  {
5473
5647
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 4C1 3.44772 1.44772 3 2 3H6V19H2C1.44772 19 1 18.5523 1 18V4Z" fill="currentColor"/><path opacity="0.3" d="M7 3H20C20.5523 3 21 3.44772 21 4V18C21 18.5523 20.5523 19 20 19H7V3Z" fill="currentColor"/></svg>',
5474
5648
  key: "header",
5475
- // disabled: this.doesBlockExist('header'),
5649
+ locked: this.isBlockLocked("header"),
5476
5650
  isVisible: !0
5477
5651
  },
5478
5652
  {
5479
5653
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18.75 3C19.3467 3 19.919 3.23705 20.341 3.65901C20.7629 4.08097 21 4.65326 21 5.25V16.755C21 17.3517 20.7629 17.924 20.341 18.346C19.919 18.7679 19.3467 19.005 18.75 19.005H3.25C2.95453 19.005 2.66194 18.9468 2.38896 18.8337C2.11598 18.7207 1.86794 18.5549 1.65901 18.346C1.45008 18.1371 1.28434 17.889 1.17127 17.616C1.0582 17.3431 1 17.0505 1 16.755V5.25C1 4.65326 1.23705 4.08097 1.65901 3.65901C2.08097 3.23705 2.65326 3 3.25 3H18.75ZM8.75 11.5H5.25C5.06876 11.5 4.89366 11.5656 4.75707 11.6848C4.62048 11.8039 4.53165 11.9684 4.507 12.148L4.5 12.25V12.742L4.508 12.85C4.67 13.964 5.602 14.5 7 14.5C8.331 14.5 9.24 14.014 9.464 13.006L9.492 12.851L9.5 12.743V12.25C9.49999 12.0688 9.43436 11.8937 9.31523 11.7571C9.19611 11.6205 9.03155 11.5316 8.852 11.507L8.75 11.5ZM16.75 11.996H12.252L12.15 12.003C11.9705 12.0277 11.806 12.1166 11.6869 12.2531C11.5678 12.3897 11.5022 12.5648 11.5022 12.746C11.5022 12.9272 11.5678 13.1023 11.6869 13.2389C11.806 13.3754 11.9705 13.4643 12.15 13.489L12.252 13.496H16.75L16.852 13.489C17.0315 13.4643 17.196 13.3754 17.3151 13.2389C17.4342 13.1023 17.4998 12.9272 17.4998 12.746C17.4998 12.5648 17.4342 12.3897 17.3151 12.2531C17.196 12.1166 17.0315 12.0277 16.852 12.003L16.75 11.996ZM7 7.502C6.60218 7.502 6.22064 7.66003 5.93934 7.94134C5.65804 8.22264 5.5 8.60418 5.5 9.002C5.5 9.39982 5.65804 9.78136 5.93934 10.0627C6.22064 10.344 6.60218 10.502 7 10.502C7.39782 10.502 7.77936 10.344 8.06066 10.0627C8.34196 9.78136 8.5 9.39982 8.5 9.002C8.5 8.60418 8.34196 8.22264 8.06066 7.94134C7.77936 7.66003 7.39782 7.502 7 7.502V7.502ZM16.75 8.5H12.252L12.15 8.507C11.9705 8.5317 11.806 8.62055 11.6869 8.75714C11.5678 8.89372 11.5022 9.0688 11.5022 9.25C11.5022 9.4312 11.5678 9.60628 11.6869 9.74286C11.806 9.87945 11.9705 9.9683 12.15 9.993L12.252 10H16.75L16.852 9.993C17.0315 9.9683 17.196 9.87945 17.3151 9.74286C17.4342 9.60628 17.4998 9.4312 17.4998 9.25C17.4998 9.0688 17.4342 8.89372 17.3151 8.75714C17.196 8.62055 17.0315 8.5317 16.852 8.507L16.75 8.5Z" fill="currentColor"/></svg>',
5480
5654
  key: "parties",
5655
+ locked: this.isBlockLocked("parties"),
5481
5656
  disabled: this.doesBlockExist("parties"),
5482
5657
  isVisible: !0
5483
5658
  },
5484
5659
  {
5485
5660
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 2C6.03714 2 2 6.03714 2 11C2 15.9629 6.03714 20 11 20C15.9629 20 20 15.9629 20 11C20 6.03714 15.9629 2 11 2ZM10.775 5.15C11.1479 5.15 11.45 5.45214 11.45 5.825V6.29429C11.9523 6.3392 12.4288 6.53653 12.8158 6.85984C13.2027 7.18316 13.4816 7.61702 13.6151 8.10329C13.6383 8.18897 13.6443 8.27838 13.6329 8.36639C13.6215 8.45441 13.5928 8.53932 13.5486 8.61626C13.5043 8.69321 13.4454 8.76069 13.3751 8.81485C13.3048 8.86901 13.2245 8.9088 13.1388 8.93193C13.0531 8.95506 12.9637 8.96109 12.8757 8.94967C12.7877 8.93825 12.7028 8.9096 12.6258 8.86537C12.5489 8.82113 12.4814 8.76218 12.4272 8.69186C12.3731 8.62155 12.3333 8.54126 12.3101 8.45557C12.2453 8.21732 12.104 8.00698 11.9079 7.85691C11.7119 7.70684 11.4719 7.62536 11.225 7.625H10.4369C10.1156 7.63536 9.81088 7.77027 9.58726 8.00122C9.36364 8.23217 9.23861 8.54103 9.23861 8.8625C9.23861 9.18397 9.36364 9.49283 9.58726 9.72378C9.81088 9.95473 10.1156 10.0896 10.4369 10.1H11.3369C12.0827 10.1007 12.7979 10.3973 13.3253 10.9247C13.8527 11.4521 14.1493 12.1673 14.15 12.9131C14.1486 13.6387 13.8669 14.3357 13.3638 14.8584C12.8606 15.3812 12.175 15.6894 11.45 15.7186V16.175C11.45 16.354 11.3789 16.5257 11.2523 16.6523C11.1257 16.7789 10.954 16.85 10.775 16.85C10.596 16.85 10.4243 16.7789 10.2977 16.6523C10.1711 16.5257 10.1 16.354 10.1 16.175V15.7057C9.59396 15.6611 9.11399 15.4615 8.72559 15.1341C8.33718 14.8066 8.05925 14.3674 7.92971 13.8761C7.90726 13.7904 7.90192 13.701 7.91399 13.6132C7.92607 13.5253 7.95533 13.4407 8.0001 13.3642C8.04487 13.2877 8.10428 13.2207 8.17493 13.1672C8.24558 13.1136 8.32609 13.0745 8.41186 13.052C8.49763 13.0295 8.58698 13.0242 8.67482 13.0363C8.76266 13.0484 8.84726 13.0776 8.92378 13.1224C9.00031 13.1672 9.06727 13.2266 9.12084 13.2972C9.17441 13.3679 9.21354 13.4484 9.236 13.5341C9.36457 14.0291 9.812 14.375 10.3237 14.375H11.3369C11.7172 14.3637 12.0782 14.2047 12.3433 13.9317C12.6084 13.6586 12.7566 13.293 12.7566 12.9125C12.7566 12.532 12.6084 12.1664 12.3433 11.8934C12.0782 11.6203 11.7172 11.4613 11.3369 11.45H10.4369C9.75109 11.449 9.09371 11.1761 8.6088 10.6912C8.12389 10.2063 7.85102 9.54891 7.85 8.86314C7.85 7.55043 8.83229 6.46529 10.1 6.29943V5.825C10.1 5.45214 10.4021 5.15 10.775 5.15V5.15Z" fill="currentColor"/></svg>',
5486
5661
  key: "packageGroup",
5662
+ locked: this.isBlockLocked("packageGroup"),
5487
5663
  isVisible: !0
5488
- // disabled: this.doesBlockExist('packageGroup'),
5489
5664
  },
5490
- // TODO: add when Presentation/Styling for multiGroupPricing-block exists
5491
- // {
5492
- // key: 'multiGroupPricing',
5493
- // subMenu: true,
5494
- // isVisible: this.noOfPackageGroups >= 2,
5495
- // disabled: this.doesBlockExist('multiGroupPricing'),
5496
- // },
5497
5665
  {
5498
5666
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.3" d="M6.49505 2C6.67958 1.99994 6.85966 2.05668 7.01084 2.1625C7.16201 2.26833 7.27696 2.41811 7.34007 2.59152L9.93087 9.71667L8.93303 12.232L8.48085 10.9896H4.51015L3.74423 13.095C3.6627 13.3191 3.49547 13.5016 3.27934 13.6024C3.06321 13.7032 2.81588 13.7141 2.59177 13.6325C2.36766 13.551 2.18511 13.3838 2.0843 13.1676C1.98348 12.9515 1.97265 12.7042 2.05419 12.4801L5.65093 2.59152C5.71404 2.41811 5.82898 2.26833 5.98016 2.1625C6.13134 2.05668 6.31052 1.99994 6.49505 2ZM5.16459 9.19167H7.82731L6.49505 5.52931L5.16459 9.19167Z" fill="currentColor"/><path d="M14.0176 6.07049C13.9513 5.90282 13.8361 5.75894 13.687 5.65755C13.538 5.55617 13.3618 5.50195 13.1815 5.50195C13.0012 5.50195 12.8251 5.55617 12.676 5.65755C12.5269 5.75894 12.4118 5.90282 12.3455 6.07049L7.52978 18.201H7.39493C7.15651 18.201 6.92786 18.2958 6.75927 18.4643C6.59068 18.6329 6.49597 18.8616 6.49597 19.1C6.49597 19.3384 6.59068 19.5671 6.75927 19.7357C6.92786 19.9043 7.15651 19.999 7.39493 19.999H8.12219C8.13417 19.9992 8.14616 19.9992 8.15815 19.999H10.0909C10.3293 19.999 10.558 19.9043 10.7266 19.7357C10.8952 19.5671 10.9899 19.3384 10.9899 19.1C10.9899 18.8616 10.8952 18.6329 10.7266 18.4643C10.558 18.2958 10.3293 18.201 10.0909 18.201H9.46434L10.1862 16.3834H16.167L16.8861 18.2019H16.3836C16.1452 18.2019 15.9166 18.2967 15.748 18.4652C15.5794 18.6338 15.4847 18.8625 15.4847 19.1009C15.4847 19.3393 15.5794 19.568 15.748 19.7366C15.9166 19.9052 16.1452 19.9999 16.3836 19.9999H18.1941C18.2046 20.0001 18.2151 20.0001 18.2256 19.9999H19.0886C19.327 19.9999 19.5557 19.9052 19.7243 19.7366C19.8928 19.568 19.9876 19.3393 19.9876 19.1009C19.9876 18.8625 19.8928 18.6338 19.7243 18.4652C19.5557 18.2967 19.327 18.2019 19.0886 18.2019H18.8207L14.0176 6.07049ZM15.455 14.5854H10.9L13.1806 8.84108L15.455 14.5854Z" fill="currentColor"/></svg>',
5499
5667
  key: "titleAndText2",
5668
+ locked: this.isBlockLocked("titleAndText2"),
5500
5669
  isVisible: !0
5501
5670
  },
5502
5671
  {
5503
5672
  // TODO: before we update this block, we need add condition: only avaible if terms exists (i.e. check doc.data.terms.type)
5504
5673
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.2296 4.75295C16.7113 5.23493 16.9819 5.88847 16.9819 6.5699C16.9819 7.25133 16.7113 7.90487 16.2296 8.38685L16.0228 8.5944C16.8494 9.60054 16.82 10.667 16.0508 11.4383L14.6138 12.8761C14.5126 12.977 14.3755 13.0337 14.2326 13.0335C14.0897 13.0334 13.9527 12.9765 13.8518 12.8754C13.7508 12.7742 13.6942 12.6371 13.6943 12.4942C13.6945 12.3513 13.7514 12.2143 13.8525 12.1134L15.2881 10.6778C15.6364 10.3288 15.6759 9.89499 15.2594 9.3578L9.071 15.5462C8.87197 15.7452 8.62442 15.8888 8.35284 15.9627L4.67944 16.9638C4.58794 16.9886 4.49152 16.9888 4.39992 16.9644C4.30832 16.94 4.22479 16.8919 4.15776 16.8248C4.09073 16.7578 4.04257 16.6743 4.01816 16.5827C3.99375 16.4911 3.99395 16.3946 4.01873 16.3031L5.01985 12.629C5.09378 12.3574 5.23736 12.1099 5.43638 11.9109L12.5957 4.75295C12.8344 4.51424 13.1177 4.32488 13.4295 4.19569C13.7413 4.0665 14.0755 4 14.413 4C14.7506 4 15.0848 4.0665 15.3966 4.19569C15.7084 4.32488 15.991 4.51424 16.2296 4.75295Z" fill="currentColor"/><path opacity="0.3" d="M13.1559 14.4697C14.0953 14.4697 14.4615 14.8876 14.7394 15.8155L14.7883 15.9857C14.9197 16.4583 14.998 16.599 15.1567 16.6651C15.3427 16.7412 15.4662 16.7304 15.6616 16.6306L15.7671 16.571C15.8052 16.5487 15.8461 16.5222 15.8935 16.4913L16.3697 16.1667C16.8121 15.8758 17.2099 15.6841 17.6932 15.5634C17.8295 15.5349 17.9715 15.5602 18.0896 15.6341C18.2076 15.708 18.2924 15.8247 18.3262 15.9598C18.36 16.0949 18.3402 16.2378 18.2709 16.3586C18.2016 16.4793 18.0883 16.5686 17.9546 16.6076C17.6637 16.6815 17.3861 16.8003 17.1316 16.9595L16.9176 17.096L16.5729 17.3323C16.4388 17.4264 16.299 17.512 16.1542 17.5886C15.6924 17.8256 15.2422 17.8651 14.7466 17.6605C14.2109 17.4407 13.9954 17.1003 13.7936 16.4245L13.6816 16.0353C13.5516 15.6115 13.4626 15.5469 13.1559 15.5469C12.9333 15.5469 12.7035 15.6582 12.3882 15.9225L12.256 16.0374L11.5946 16.6665C10.5834 17.6174 9.72093 18.0784 8.48642 18.0784C7.2756 18.0784 6.22852 17.896 5.34949 17.5269L7.46591 16.9488C7.78693 16.9839 8.12733 17.0012 8.48642 17.0012C9.336 17.0012 9.94572 16.7031 10.7034 16.023L10.8887 15.8514L11.2707 15.4844C11.4402 15.3214 11.568 15.2043 11.6959 15.0966C12.1871 14.6851 12.6331 14.4697 13.1559 14.4697Z" fill="currentColor"/></svg>',
5505
5674
  key: "answer",
5675
+ // locked: this.isBlockLocked('answer'), // TODO always available?
5506
5676
  disabled: this.doesBlockExist("answer"),
5507
5677
  isVisible: !0
5508
5678
  },
5509
5679
  {
5510
5680
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.3" d="M3 3C3 2.44772 3.44772 2 4 2H18C18.5523 2 19 2.44772 19 3V5H3V3Z" fill="currentColor"/><path opacity="0.3" d="M3 16H19V18C19 18.5523 18.5523 19 18 19H4C3.44772 19 3 18.5523 3 18V16Z" fill="currentColor"/><rect x="1" y="6" width="20" height="9" rx="1" fill="currentColor"/></svg>',
5511
5681
  key: "coverBlock",
5682
+ locked: this.isBlockLocked("coverBlock"),
5512
5683
  isVisible: !0
5513
5684
  },
5514
5685
  {
5515
5686
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.25 3H16.75C17.5801 2.99995 18.3788 3.31755 18.9822 3.88767C19.5856 4.45779 19.948 5.23719 19.995 6.066L20 6.25V15.75C20.0001 16.5801 19.6824 17.3788 19.1123 17.9822C18.5422 18.5856 17.7628 18.948 16.934 18.995L16.75 19H5.25C4.41986 19.0001 3.62117 18.6824 3.01777 18.1123C2.41437 17.5422 2.052 16.7628 2.005 15.934L2 15.75V6.25C1.99995 5.41986 2.31755 4.62117 2.88767 4.01777C3.45779 3.41437 4.23719 3.052 5.066 3.005L5.25 3H16.75H5.25ZM9.053 8.585C9.018 8.65483 8.99985 8.73189 9 8.81V13.192C9 13.2773 9.02181 13.3611 9.06335 13.4356C9.10489 13.51 9.16478 13.5726 9.23733 13.6174C9.30988 13.6622 9.39268 13.6877 9.47786 13.6915C9.56304 13.6953 9.64777 13.6772 9.724 13.639L14.106 11.449C14.1892 11.4075 14.2592 11.3437 14.3081 11.2646C14.357 11.1856 14.383 11.0945 14.383 11.0015C14.383 10.9085 14.357 10.8174 14.3081 10.7384C14.2592 10.6593 14.1892 10.5955 14.106 10.554L9.724 8.363C9.60545 8.3036 9.46815 8.29372 9.34232 8.33554C9.21648 8.37736 9.11241 8.46745 9.053 8.586V8.585Z" fill="currentColor"/></svg>',
5516
5687
  key: "videoPlayer",
5688
+ locked: this.isBlockLocked("videoPlayer"),
5517
5689
  isVisible: !0
5518
5690
  },
5519
5691
  {
5520
5692
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 1C7.28846 1.00007 8.52716 1.49754 9.45778 2.38866C10.3884 3.27978 10.9391 4.49575 10.995 5.783L11 6V17C11.0008 17.7809 10.697 18.5313 10.1532 19.0918C9.60948 19.6523 8.86861 19.9787 8.08804 20.0016C7.30747 20.0245 6.54873 19.7422 5.97303 19.2145C5.39733 18.6869 5.05006 17.9556 5.005 17.176L5 17V7C5.00028 6.74512 5.09788 6.49997 5.27285 6.31463C5.44782 6.1293 5.68695 6.01776 5.94139 6.00283C6.19584 5.98789 6.44638 6.07067 6.64183 6.23426C6.83729 6.39785 6.9629 6.6299 6.993 6.883L7 7V17C7.00028 17.2549 7.09788 17.5 7.27285 17.6854C7.44782 17.8707 7.68695 17.9822 7.94139 17.9972C8.19584 18.0121 8.44638 17.9293 8.64183 17.7657C8.83729 17.6021 8.9629 17.3701 8.993 17.117L9 17V6C9.00075 5.21909 8.69698 4.46867 8.15323 3.90818C7.60948 3.34769 6.86861 3.02132 6.08804 2.9984C5.30747 2.97548 4.54873 3.25784 3.97303 3.78546C3.39733 4.31309 3.05006 5.0444 3.005 5.824L3 6V15C2.99972 15.2549 2.90212 15.5 2.72715 15.6854C2.55218 15.8707 2.31305 15.9822 2.05861 15.9972C1.80416 16.0121 1.55362 15.9293 1.35817 15.7657C1.16271 15.6021 1.0371 15.3701 1.007 15.117L1 15V6C1 4.67392 1.52678 3.40215 2.46447 2.46447C3.40215 1.52678 4.67392 1 6 1Z" fill="currentColor"/><path opacity="0.3" d="M14 15H16C16.2549 15.0003 16.5 15.0979 16.6854 15.2728C16.8707 15.4478 16.9822 15.687 16.9972 15.9414C17.0121 16.1958 16.9293 16.4464 16.7657 16.6418C16.6021 16.8373 16.3701 16.9629 16.117 16.993L16 17H14C13.7451 16.9997 13.5 16.9021 13.3146 16.7272C13.1293 16.5522 13.0178 16.313 13.0028 16.0586C12.9879 15.8042 13.0707 15.5536 13.2343 15.3582C13.3978 15.1627 13.6299 15.0371 13.883 15.007L14 15ZM14 11H19.5C19.7549 11.0003 20 11.0979 20.1854 11.2728C20.3707 11.4478 20.4822 11.687 20.4972 11.9414C20.5121 12.1958 20.4293 12.4464 20.2657 12.6418C20.1021 12.8373 19.8701 12.9629 19.617 12.993L19.5 13H14C13.7451 12.9997 13.5 12.9021 13.3146 12.7272C13.1293 12.5522 13.0178 12.313 13.0028 12.0586C12.9879 11.8042 13.0707 11.5536 13.2343 11.3582C13.3978 11.1627 13.6299 11.0371 13.883 11.007L14 11ZM14 7H19.5C19.7549 7.00028 20 7.09788 20.1854 7.27285C20.3707 7.44782 20.4822 7.68695 20.4972 7.94139C20.5121 8.19584 20.4293 8.44638 20.2657 8.64183C20.1021 8.83729 19.8701 8.9629 19.617 8.993L19.5 9H14C13.7451 8.99972 13.5 8.90212 13.3146 8.72715C13.1293 8.55218 13.0178 8.31305 13.0028 8.05861C12.9879 7.80416 13.0707 7.55362 13.2343 7.35817C13.3978 7.16271 13.6299 7.0371 13.883 7.007L14 7ZM14 3H19.5C19.7549 3.00028 20 3.09788 20.1854 3.27285C20.3707 3.44782 20.4822 3.68695 20.4972 3.94139C20.5121 4.19584 20.4293 4.44638 20.2657 4.64183C20.1021 4.83729 19.8701 4.9629 19.617 4.993L19.5 5H14C13.7451 4.99972 13.5 4.90212 13.3146 4.72715C13.1293 4.55218 13.0178 4.31305 13.0028 4.05861C12.9879 3.80416 13.0707 3.55362 13.2343 3.35817C13.3978 3.16271 13.6299 3.0371 13.883 3.007L14 3Z" fill="currentColor"/></svg>',
5521
5693
  key: "attachments2",
5694
+ locked: this.isBlockLocked("attachments2"),
5522
5695
  isVisible: !0
5523
5696
  },
5524
5697
  {
5525
5698
  icon: '<svg viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.50299 12.002C6.37038 12.002 6.24321 12.0547 6.14944 12.1485C6.05567 12.2422 6.00299 12.3694 6.00299 12.502V15.502C6.00299 15.6346 6.05567 15.7618 6.14944 15.8556C6.24321 15.9493 6.37038 16.002 6.50299 16.002C6.6356 16.002 6.76278 15.9493 6.85654 15.8556C6.95031 15.7618 7.00299 15.6346 7.00299 15.502V15.002H7.49999C7.89782 15.002 8.27935 14.844 8.56065 14.5627C8.84196 14.2814 8.99999 13.8998 8.99999 13.502C8.99999 13.1042 8.84196 12.7227 8.56065 12.4414C8.27935 12.16 7.89782 12.002 7.49999 12.002H6.50299V12.002ZM7.49999 14.002H7.00299V13.002H7.49999C7.6326 13.002 7.75978 13.0547 7.85354 13.1485C7.94731 13.2422 7.99999 13.3694 7.99999 13.502C7.99999 13.6346 7.94731 13.7618 7.85354 13.8556C7.75978 13.9493 7.6326 14.002 7.49999 14.002ZM13.998 12.501C13.9983 12.3686 14.0511 12.2417 14.1448 12.1481C14.2385 12.0546 14.3656 12.002 14.498 12.002H16.003C16.1356 12.002 16.2628 12.0547 16.3565 12.1485C16.4503 12.2422 16.503 12.3694 16.503 12.502C16.503 12.6346 16.4503 12.7618 16.3565 12.8556C16.2628 12.9493 16.1356 13.002 16.003 13.002H14.997L14.996 14.004H16.003C16.1356 14.004 16.2628 14.0567 16.3565 14.1505C16.4503 14.2442 16.503 14.3714 16.503 14.504C16.503 14.6366 16.4503 14.7638 16.3565 14.8576C16.2628 14.9513 16.1356 15.004 16.003 15.004H14.996L14.998 15.501C14.9981 15.5667 14.9853 15.6317 14.9603 15.6924C14.9353 15.7531 14.8986 15.8083 14.8523 15.8549C14.7587 15.9488 14.6316 16.0017 14.499 16.002C14.3664 16.0023 14.2391 15.9499 14.1451 15.8563C14.0512 15.7627 13.9983 15.6356 13.998 15.503L13.995 14.505V14.503L13.998 12.501V12.501ZM10.5 12.002H10.998C11.5284 12.002 12.0371 12.2127 12.4122 12.5878C12.7873 12.9629 12.998 13.4716 12.998 14.002C12.998 14.5324 12.7873 15.0412 12.4122 15.4162C12.0371 15.7913 11.5284 16.002 10.998 16.002H10.5C10.3674 16.002 10.2402 15.9493 10.1464 15.8556C10.0527 15.7618 9.99999 15.6346 9.99999 15.502V12.502C9.99999 12.3694 10.0527 12.2422 10.1464 12.1485C10.2402 12.0547 10.3674 12.002 10.5 12.002V12.002ZM11 15.002C11.2652 15.002 11.5196 14.8967 11.7071 14.7091C11.8946 14.5216 12 14.2672 12 14.002C12 13.7368 11.8946 13.4824 11.7071 13.2949C11.5196 13.1074 11.2652 13.002 11 13.002V15.002Z" fill="currentColor"/><path d="M11 7V1H5C4.46957 1 3.96086 1.21071 3.58579 1.58579C3.21071 1.96086 3 2.46957 3 3V9.668C2.409 9.949 2 10.552 2 11.25V16.75C2 17.448 2.409 18.05 3 18.332V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H17C17.5304 21 18.0391 20.7893 18.4142 20.4142C18.7893 20.0391 19 19.5304 19 19V18.332C19.591 18.051 20 17.448 20 16.75V11.25C20 10.552 19.591 9.95 19 9.668V9H13C12.4696 9 11.9609 8.78929 11.5858 8.41421C11.2107 8.03914 11 7.53043 11 7ZM3.75 11H18.25C18.3163 11 18.3799 11.0263 18.4268 11.0732C18.4737 11.1201 18.5 11.1837 18.5 11.25V16.75C18.5 16.8163 18.4737 16.8799 18.4268 16.9268C18.3799 16.9737 18.3163 17 18.25 17H3.75C3.6837 17 3.62011 16.9737 3.57322 16.9268C3.52634 16.8799 3.5 16.8163 3.5 16.75V11.25C3.5 11.1837 3.52634 11.1201 3.57322 11.0732C3.62011 11.0263 3.6837 11 3.75 11Z" fill="currentColor"/><path d="M12.5 7V1.5L18.5 7.5H13C12.8674 7.5 12.7402 7.44732 12.6464 7.35355C12.5527 7.25979 12.5 7.13261 12.5 7Z" fill="currentColor"/></svg>',
5526
5699
  key: "pdf",
5700
+ locked: this.isBlockLocked("pdf"),
5527
5701
  isVisible: !0
5528
5702
  },
5529
5703
  {
5530
5704
  icon: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"><path fill="currentColor" d="M2 4.5A2.5 2.5 0 0 1 4.5 2h7A2.5 2.5 0 0 1 14 4.5v7a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 11.5v-7ZM3 6v5.5A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5V6H3Z"></path></svg>',
5531
5705
  key: "embed",
5706
+ locked: this.isBlockLocked("embed"),
5532
5707
  isVisible: !0
5533
5708
  },
5534
5709
  {
5535
5710
  icon: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"><path fill="currentColor" d="M2 4.5A2.5 2.5 0 0 1 4.5 2h7A2.5 2.5 0 0 1 14 4.5v7a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 11.5v-7ZM7.5 6a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-.5.5h-1a.5.5 0 0 0 0 1h1A1.5 1.5 0 0 0 8 10.5v-4a.5.5 0 0 0-.5-.5Zm1 1.5V8A1.5 1.5 0 0 0 10 9.5h.5a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H9a.5.5 0 0 0 0 1h1.5a1.5 1.5 0 0 0 1.5-1.5V10a1.5 1.5 0 0 0-1.5-1.5H10a.5.5 0 0 1-.5-.5v-.5A.5.5 0 0 1 10 7h1.5a.5.5 0 0 0 0-1H10a1.5 1.5 0 0 0-1.5 1.5Z"></path></svg>',
5536
5711
  key: "custom",
5712
+ locked: this.isBlockLocked("custom"),
5537
5713
  isVisible: !0
5538
5714
  },
5539
5715
  {
5540
5716
  icon: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M6.5 2A2.5 2.5 0 0 0 4 4.5v15A2.5 2.5 0 0 0 6.5 22h13.25a.75.75 0 0 0 0-1.5H6.5a1 1 0 0 1-1-1h14.25a.75.75 0 0 0 .75-.75V4.5A2.5 2.5 0 0 0 18 2H6.5ZM8 5h8a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Z"></path></svg>',
5541
5717
  key: "terms",
5718
+ locked: this.isBlockLocked("terms"),
5542
5719
  // Should allow multiple terms when the hint text can be edited
5543
5720
  disabled: this.doesBlockExist("terms"),
5544
5721
  isVisible: !0
@@ -5547,8 +5724,10 @@ const wa = {
5547
5724
  icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 6a4 4 0 014-4h12a4 4 0 014 4v12a4 4 0 01-4 4H6a4 4 0 01-4-4z" fill="currentColor" opacity=".2"/><path d="M17.333 15.333a2 2 0 110 4 2 2 0 010-4z" fill="currentColor"/><path d="M17.333 10a2 2 0 11.001 3.999A2 2 0 0117.333 10zM17.333 4.667a2 2 0 11.001 3.999 2 2 0 01-.001-3.999z" fill="currentColor" opacity=".4"/></svg>',
5548
5725
  key: "presentation",
5549
5726
  disabled: this.doesBlockExist("presentation"),
5550
- isVisible: this.feature("preDynDoc2")
5727
+ isVisible: !this.isBlockLocked("presentation")
5728
+ // hide presentation block if feature not enabled
5551
5729
  },
5730
+ // legacy
5552
5731
  {
5553
5732
  key: "estimatedTimeCompleted",
5554
5733
  isVisible: !1
@@ -5571,7 +5750,7 @@ const wa = {
5571
5750
  }
5572
5751
  ];
5573
5752
  return i.forEach((e) => {
5574
- O[e.key] && (e.subMenu = (O[e.key](this.state || {}) || []).map((t) => ({ ...t, key: e.key }))), this.tooltips[e.key] && (e.hasTooltip = !0);
5753
+ O[e.key] && (e.subMenu = (O[e.key](this._document || {}) || []).map((t) => ({ ...t, key: e.key, locked: e.locked }))), this.tooltips[e.key] && (e.hasTooltip = !0);
5575
5754
  }), i;
5576
5755
  },
5577
5756
  availableBlocks() {
@@ -5583,26 +5762,14 @@ const wa = {
5583
5762
  secondaryBlocks() {
5584
5763
  return this.availableBlocks.filter(({ key: i }) => !this.primaryFilterNames.includes(i));
5585
5764
  },
5586
- noOfPackageGroups() {
5587
- return Object.keys(p(this.state, "_doc.data.packageGroups") || {}).length;
5588
- },
5589
5765
  activeSubMenuKey() {
5590
- return p(this.activeSubMenu, "[0].key") || null;
5591
- },
5592
- // section key is added to each element in the menu
5593
- extensionTabType() {
5594
- return this.allAuthenticatedCRMs.length ? this.allAuthenticatedCRMs[0] : null;
5766
+ return m(this.activeSubMenu, "[0].key") || null;
5595
5767
  }
5768
+ // section key is added to each element in the menu
5596
5769
  },
5597
5770
  watch: {
5598
5771
  subMenuToShow(i) {
5599
5772
  this.setSubMenuState(i);
5600
- },
5601
- canEditTemplate: {
5602
- immediate: !0,
5603
- handler(i) {
5604
- i || (this.tab = "generalSettings");
5605
- }
5606
5773
  }
5607
5774
  },
5608
5775
  mounted() {
@@ -5612,12 +5779,28 @@ const wa = {
5612
5779
  this.destroyTooltips();
5613
5780
  },
5614
5781
  methods: {
5782
+ onUseBlock({ block: i, addBlock: e, openUpgradeModal: t }) {
5783
+ if (i.locked)
5784
+ return t();
5785
+ if (!this.canUseBlocks) {
5786
+ const a = this.availableBlocks.findIndex((n) => n.key === i.key);
5787
+ return this.showConvertEditableDialogTarget = this.$refs.blockItem[a].$el, this.showConvertEditableDialog = !0, !1;
5788
+ }
5789
+ return e({
5790
+ sectionKey: i.key,
5791
+ document: this._document,
5792
+ ...i.contentData && { contentData: i.contentData }
5793
+ });
5794
+ },
5795
+ deSyncTemplate() {
5796
+ ["_id", "id"].forEach((i) => this.removeValue(`template.${i}`)), this.set({ key: "views.read.isEditable", value: !0 }), this.showConvertEditableDialog = !1;
5797
+ },
5615
5798
  createTooltips() {
5616
5799
  var n, s;
5617
5800
  if (this.mq === "sm")
5618
5801
  return;
5619
5802
  const { tooltips: i } = this, e = (s = (n = this.$el).getRootNode) == null ? void 0 : s.call(n), a = (e == null ? void 0 : e.toString()) === "[object ShadowRoot]" ? e : document.body;
5620
- this.tippyInstances = o1(this.$el, {
5803
+ this.tippyInstances = s1(this.$el, {
5621
5804
  target: "[data-tooltip-key]",
5622
5805
  allowHTML: !0,
5623
5806
  duration: [150, 0],
@@ -5642,7 +5825,7 @@ const wa = {
5642
5825
  i.destroy();
5643
5826
  }) : this.tippyInstances.destroy && this.tippyInstances.destroy());
5644
5827
  },
5645
- setSubMenuState: I(function(e) {
5828
+ setSubMenuState: B(function(e) {
5646
5829
  this.activeSubMenu = e;
5647
5830
  }, 100, { trailing: !0 }),
5648
5831
  onMouseleaveDrawer() {
@@ -5652,8 +5835,11 @@ const wa = {
5652
5835
  const t = i[e];
5653
5836
  return t && t.key;
5654
5837
  },
5838
+ isBlockLocked(i) {
5839
+ return !this.feature(`docBlock_${i}`);
5840
+ },
5655
5841
  doesBlockExist(i) {
5656
- return !!p(this.state, "_doc.template.views.read.nodes", []).find((t) => t.itemId.startsWith(i));
5842
+ return !!m(this._document, "_doc.template.views.read.nodes", []).find((t) => t.itemId.startsWith(i));
5657
5843
  },
5658
5844
  getGhostParent() {
5659
5845
  var t, a;
@@ -5670,119 +5856,243 @@ const wa = {
5670
5856
  ...e(t),
5671
5857
  contentData: a
5672
5858
  };
5859
+ }
5860
+ }
5861
+ };
5862
+ var Ia = function() {
5863
+ var e = this, t = e._self._c;
5864
+ return t("AddBlock", { attrs: { set: e.set }, on: { "block-added": function(a) {
5865
+ return e.$emit("block-added", a);
5866
+ } }, scopedSlots: e._u([{ key: "default", fn: function({ addBlock: a, getBlockPayload: n }) {
5867
+ return [t("IsPremiumPreStep", { attrs: { feature: "documentBlocks" }, scopedSlots: e._u([{ key: "default", fn: function({ onClick: s }) {
5868
+ return [t("div", { on: { "&mouseleave": function(o) {
5869
+ return e.onMouseleaveDrawer.apply(null, arguments);
5870
+ } } }, [!e.canUseBlocks && e.showConvertEditableDialog ? t("MenuBlockConvertPopover", { attrs: { target: e.showConvertEditableDialogTarget }, on: { convert: e.deSyncTemplate, close: function(o) {
5871
+ e.showConvertEditableDialog = !1;
5872
+ } } }) : e._e(), t("div", { staticClass: "menu-container" }, [e._l([
5873
+ { data: e.primaryBlocks },
5874
+ { data: e.secondaryBlocks }
5875
+ ], function(o, l) {
5876
+ return t("div", { key: l }, [l > 0 ? t("div", { staticStyle: { height: "1px", "background-color": "hsl(0, 0%, 88%)", margin: "calc(1 * var(--rem))" } }) : e._e(), t("DragList", { attrs: { group: { name: "blocks", pull: "clone", put: !1 }, "get-child-payload": (r) => n(e.getSectionKey({ data: o.data, index: r })), "drop-placeholder": {
5877
+ className: "drag-drop-menu-placeholder"
5878
+ }, "get-ghost-parent": e.getGhostParent, "non-drag-area-selector": ".no-drag", "drag-handle-selector": ".drag-item", "group-name": "document-blocks", "ghost-class": "drag-drop-ghost", behaviour: "copy" } }, e._l(o.data, function(r) {
5879
+ return t("DragItem", { key: r.key, class: { "drag-item": e.canDrag } }, [t("div", e._b(
5880
+ { class: {
5881
+ "no-drag": r.disabled || r.locked || !e.canUseBlocks
5882
+ }, on: { "&mouseover": function(p) {
5883
+ e.subMenuToShow = !r.disabled && e.canDrag && r.subMenu || null;
5884
+ }, "&mouseleave": function(p) {
5885
+ e.subMenuToShow = null;
5886
+ } } },
5887
+ "div",
5888
+ r.hasTooltip ? { "data-tooltip-key": r.key } : null,
5889
+ !1
5890
+ ), [t("CButton", { ref: "blockItem", refInFor: !0, staticClass: "option-row is-thinner is-left", class: { "sub-menu-active": r.key === e.activeSubMenuKey }, staticStyle: { "padding-left": "1.5em", "padding-right": "2em", "border-radius": "0", "font-size": "14px", "border-color": "transparent" }, attrs: { disabled: r.disabled, wide: "", pattern: "secondary" }, on: { click: (p) => e.onUseBlock({ block: r, addBlock: a, openUpgradeModal: s }) } }, [t("div", { staticClass: "flex items-center", staticStyle: { width: "230px" } }, [t("div", { staticClass: "flex items-center", staticStyle: { width: "initial", flex: "1 1 auto" } }, [t("div", { staticClass: "option-image", domProps: { innerHTML: e._s(r.icon) } }), t("div", { staticClass: "option-title" }, [e._v(" " + e._s(e.$t(`blocks.${r.key}`)) + " ")])]), r.locked ? t("ProBadge") : !e.fixed && r.subMenu ? t("BaseIcon", { staticStyle: { color: "hsl(205, 10%, 65%)" }, attrs: { type: "chevron-right", size: "14" } }) : e._e()], 1)])], 1)]);
5891
+ }), 1)], 1);
5892
+ }), e._t("footer")], 2), t("transition", { attrs: { name: "slide-right" } }, [t("div", { directives: [{ name: "show", rawName: "v-show", value: e.activeSubMenu, expression: "activeSubMenu" }], staticClass: "submenu", on: { "&mouseover": function(o) {
5893
+ e.subMenuToShow = e.activeSubMenu;
5894
+ }, "&mouseleave": function(o) {
5895
+ e.subMenuToShow = null;
5896
+ } } }, [t("simplebar", [t("DragList", { attrs: { group: { name: "blocks", pull: "clone", put: !1 }, "get-child-payload": (o) => e.getSubMenuPayload({ index: o, getBlockPayload: n }), "drop-placeholder": { className: "drag-drop-menu-placeholder" }, "get-ghost-parent": e.getGhostParent, "non-drag-area-selector": ".no-drag", "drag-handle-selector": ".drag-item", "group-name": "document-blocks", "ghost-class": "drag-drop-ghost", behaviour: "copy" } }, e._l(e.activeSubMenu, function(o, l) {
5897
+ return t("DragItem", { key: o.key + l, class: { "drag-item": !o.locked && e.canUseBlocks } }, [t("div", { staticClass: "relative" }, [t("div", { staticClass: "drag-item-preview", domProps: { innerHTML: e._s(o.previewUrl) }, on: { click: (r) => e.onUseBlock({ block: o, addBlock: a, openUpgradeModal: s }) } }), o.locked ? t("ProBadge", { staticClass: "absolute bottom-2 right-4" }) : e._e()], 1)]);
5898
+ }), 1)], 1)], 1)])], 1)];
5899
+ } }], null, !0) })];
5900
+ } }]) });
5901
+ }, Fa = [], Ha = /* @__PURE__ */ c(
5902
+ Ba,
5903
+ Ia,
5904
+ Fa,
5905
+ !1,
5906
+ null,
5907
+ "4ce1e5ea",
5908
+ null,
5909
+ null
5910
+ );
5911
+ const Aa = Ha.exports;
5912
+ const Pa = {
5913
+ name: "DocumentFormMenu",
5914
+ i18nOptions: {
5915
+ namespaces: "documentFormMenu",
5916
+ messages: {
5917
+ en: {
5918
+ guideButton: "Tutorial",
5919
+ tabs: { blocks: "Block", design: "Design", fields: "Fields" }
5920
+ },
5921
+ sv: {
5922
+ guideButton: "Guide",
5923
+ tabs: { blocks: "Block", design: "Design", fields: "Fält" }
5924
+ }
5925
+ }
5926
+ },
5927
+ components: {
5928
+ Design: ea,
5929
+ Fields: da,
5930
+ ExtensionTab: fa,
5931
+ DocumentGeneralSettings: xa,
5932
+ DocumentGuide: La,
5933
+ MenuBlocks: Aa
5934
+ },
5935
+ props: {
5936
+ state: {
5937
+ type: Object,
5938
+ required: !0
5939
+ },
5940
+ onAddedBlock: {
5941
+ type: Function,
5942
+ // Function to call when a new section is added
5943
+ required: !0
5944
+ },
5945
+ set: {
5946
+ type: Function,
5947
+ required: !0
5673
5948
  },
5949
+ removeValue: {
5950
+ type: Function,
5951
+ required: !0
5952
+ },
5953
+ fixed: {
5954
+ type: Boolean,
5955
+ default: !1
5956
+ },
5957
+ canUseBlocks: {
5958
+ type: Boolean,
5959
+ default: !0
5960
+ },
5961
+ isLegacyTemplate: {
5962
+ type: Boolean,
5963
+ default: !1
5964
+ },
5965
+ width: {
5966
+ type: Number,
5967
+ default: 270
5968
+ }
5969
+ },
5970
+ data() {
5971
+ return {
5972
+ showGuide: !1,
5973
+ showGuideNotification: !I.getItem("hideFormGuideNotification"),
5974
+ tab: "blocks"
5975
+ };
5976
+ },
5977
+ computed: {
5978
+ ...g({
5979
+ allAuthenticatedCRMs: "settings/allAuthenticatedCRMs"
5980
+ }),
5981
+ extensionTabType() {
5982
+ return this.allAuthenticatedCRMs.length ? this.allAuthenticatedCRMs[0] : null;
5983
+ }
5984
+ },
5985
+ watch: {
5986
+ isLegacyTemplate: {
5987
+ immediate: !0,
5988
+ handler(i) {
5989
+ i && (this.tab = "generalSettings");
5990
+ }
5991
+ }
5992
+ },
5993
+ methods: {
5674
5994
  openGuide() {
5675
- this.showGuide = !0, this.showGuideNotification = !1, B.setItem("hideFormGuideNotification", !0);
5995
+ this.showGuide = !0, this.showGuideNotification = !1, I.setItem("hideFormGuideNotification", !0);
5676
5996
  }
5677
5997
  }
5678
5998
  };
5679
- var _a = function() {
5999
+ var Ea = function() {
5680
6000
  var e = this, t = e._self._c;
5681
- return t("AddBlock", { attrs: { set: e.set, "include-mock-data": e.includeMockData }, on: { "block-added": e.onAddedBlock }, scopedSlots: e._u([{ key: "default", fn: function({ addBlock: a, getBlockPayload: n }) {
5682
- return t("div", { staticClass: "root menu-wrapper", style: [
5683
- { width: `${e.width}px` },
5684
- e.fixed && { zIndex: 999 }
5685
- ], on: { "&mouseleave": function(s) {
5686
- return e.onMouseleaveDrawer.apply(null, arguments);
5687
- } } }, [e.fixed ? t("div", { staticStyle: { position: "fixed", top: "0", left: "0", right: "0", bottom: "0" }, on: { click: function(s) {
5688
- return e.$emit("close");
5689
- } } }) : e._e(), t("div", { staticStyle: { height: "100%", "font-size": "14px", "border-radius": "0 8px 8px 0", "box-shadow": "0 10px 20px rgba(0, 0, 0, 0.2)" }, style: { width: `${e.width}px` } }, [t("div", { staticClass: "tab-list" }, [e.canEditTemplate ? t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "blocks" }, on: { click: function(s) {
5690
- e.tab = "blocks";
5691
- } } }, [e._v(e._s(e.$t("tabs.blocks")))]) : e._e(), e.canEditTemplate ? t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "design" }, on: { click: function(s) {
5692
- e.tab = "design";
5693
- } } }, [e._v(e._s(e.$t("tabs.design")))]) : e._e(), e.canEditTemplate ? t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "fields" }, domProps: { textContent: e._s(e.$t("tabs.fields")) }, on: { click: function(s) {
5694
- e.tab = "fields";
5695
- } } }) : e._e(), e.canEditTemplate && e.extensionTabType ? t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "extension" }, on: { click: function(s) {
5696
- e.tab = "extension";
5697
- } } }, [t("div", { staticStyle: { width: "18px", height: "18px", background: "#343434", "border-radius": "4px", display: "flex", "align-items": "center", "justify-content": "center", "margin-top": "2px" }, style: [
5698
- e.extensionTabType === "pipedrive" && { backgroundColor: "#3A3A3A" },
5699
- e.extensionTabType === "hubspot" && { backgroundColor: "#FF8F3E" },
5700
- e.extensionTabType === "salesforce" && { backgroundColor: "#009CDB" }
5701
- ] }, [t("BaseIcon", { staticStyle: { color: "white" }, attrs: { type: e.extensionTabType, size: "14" } })], 1)]) : e._e(), t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "generalSettings" }, staticStyle: { "margin-left": "2px" }, on: { click: function(s) {
5702
- e.tab = "generalSettings";
5703
- } } }, [t("BaseIcon", { staticStyle: { "line-height": "1" }, attrs: { type: "cog", size: "16" } })], 1)]), e.tab === "blocks" ? [t("div", { staticClass: "menu-container" }, [e._e(), e._l([
5704
- { data: e.primaryBlocks },
5705
- { data: e.secondaryBlocks }
5706
- ], function(s, o) {
5707
- return t("div", { key: o }, [o > 0 ? t("div", { staticStyle: { height: "1px", "background-color": "hsl(0, 0%, 88%)", margin: "1rem" } }) : e._e(), t("DragList", { attrs: { group: { name: "blocks", pull: "clone", put: !1 }, "get-child-payload": (l) => n(e.getSectionKey({ data: s.data, index: l })), "drop-placeholder": {
5708
- className: "drag-drop-menu-placeholder"
5709
- }, "get-ghost-parent": e.getGhostParent, "non-drag-area-selector": ".no-drag", "drag-handle-selector": ".drag-item", "group-name": "document-blocks", "ghost-class": "drag-drop-ghost", behaviour: "copy" } }, e._l(s.data, function(l) {
5710
- return t("DragItem", { key: l.key, class: { "drag-item": e.canDrag } }, [t("div", e._b({ class: { "no-drag": l.disabled }, on: { "&mouseover": function(r) {
5711
- e.subMenuToShow = !l.disabled && e.canDrag && l.subMenu || null;
5712
- }, "&mouseleave": function(r) {
5713
- e.subMenuToShow = null;
5714
- } } }, "div", l.hasTooltip ? { "data-tooltip-key": l.key } : null, !1), [t("CButton", { staticClass: "option-row is-thinner is-left", class: { "sub-menu-active": l.key === e.activeSubMenuKey }, staticStyle: { "padding-left": "1.5em", "padding-right": "2em", "border-radius": "0", "font-size": "14px", "border-color": "transparent" }, attrs: { disabled: l.disabled, wide: "", pattern: "secondary" }, on: { click: function(r) {
5715
- e.canDrag && e.preferDrag || a({ sectionKey: l.key, document: e.state });
5716
- } } }, [t("div", { staticClass: "flex items-center", staticStyle: { width: "230px" } }, [t("div", { staticClass: "flex items-center", staticStyle: { width: "initial", flex: "1 1 auto" } }, [t("div", { staticClass: "option-image", domProps: { innerHTML: e._s(l.icon) } }), t("div", { staticClass: "option-title" }, [e._v(e._s(e.$t(`blocks.${l.key}`)))])]), !e.fixed && l.subMenu ? t("BaseIcon", { staticStyle: { color: "hsl(205, 10%, 65%)" }, attrs: { type: "chevron-right", size: "14" } }) : e._e()], 1)])], 1)]);
5717
- }), 1)], 1);
5718
- }), t("div", { staticStyle: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "flex-end", "align-items": "flex-start", padding: "1rem" } }, [t("CButton", { staticStyle: { position: "relative" }, attrs: { "icon-left": "help", type: "none", pattern: "secondary", size: "small" }, on: { click: e.openGuide } }, [e._v(" " + e._s(e.$t("guideButton")) + " "), e.showGuideNotification ? t("div", { staticClass: "circle-pulse" }) : e._e()])], 1), e.showGuide ? t("DocumentGuide", { on: { close: function(s) {
5719
- e.showGuide = !1;
5720
- } } }) : e._e()], 2), t("transition", { attrs: { name: "slide-right" } }, [t("div", { directives: [{ name: "show", rawName: "v-show", value: e.activeSubMenu, expression: "activeSubMenu" }], staticClass: "submenu", on: { "&mouseover": function(s) {
5721
- e.subMenuToShow = e.activeSubMenu;
5722
- }, "&mouseleave": function(s) {
5723
- e.subMenuToShow = null;
5724
- } } }, [t("DragList", { attrs: { group: { name: "blocks", pull: "clone", put: !1 }, "get-child-payload": (s) => e.getSubMenuPayload({ index: s, getBlockPayload: n }), "drop-placeholder": { className: "drag-drop-menu-placeholder" }, "get-ghost-parent": e.getGhostParent, "non-drag-area-selector": ".no-drag", "drag-handle-selector": ".drag-item", "group-name": "document-blocks", "ghost-class": "drag-drop-ghost", behaviour: "copy" } }, e._l(e.activeSubMenu, function(s, o) {
5725
- return t("DragItem", { key: s.key + o, staticClass: "drag-item" }, [t("div", { staticClass: "drag-item-preview", domProps: { innerHTML: e._s(s.previewUrl) }, on: { click: function(l) {
5726
- return a({ sectionKey: s.key, document: e.state, contentData: s.contentData });
5727
- } } })]);
5728
- }), 1)], 1)])] : e.tab === "design" ? t("Design", { staticClass: "menu-container", attrs: { _document: e.state, _value: {
5729
- css: "data.css"
5730
- }, set: e.set, offset: e.width } }) : e.tab === "fields" ? t("Fields", { staticClass: "menu-container", attrs: { _document: e.state, "crm-service": e.extensionTabType, _value: {
5731
- css: "data.css"
5732
- }, set: e.set } }) : e.tab === "extension" ? t("ExtensionTab", { staticClass: "menu-container", attrs: { _document: e.state, _value: {
5733
- externalReferences: "externalReferences",
5734
- clients: "clients",
5735
- articles: "articles"
5736
- } }, on: { input: ({ key: s, value: o }) => e.set({ key: s, value: o }) } }) : e._e(), e.tab === "generalSettings" ? t("DocumentGeneralSettings", { staticClass: "menu-container", attrs: { _document: e.state, _value: {
5737
- term: "data.terms",
5738
- series: "docNumber.series",
5739
- tags: "tags",
5740
- language: "language",
5741
- currency: "currency",
5742
- senderId: "companyUserId",
5743
- useVat: "data.formSettings.useVat",
5744
- vatType: "data.formSettings.vatType",
5745
- rounding: "data.formSettings.rounding"
5746
- }, offset: e.width }, on: { input: ({ key: s, value: o }) => e.set({ key: s, value: o }) } }) : e._e()], 2)]);
5747
- } }]) });
5748
- }, ba = [], ka = /* @__PURE__ */ c(
5749
- wa,
5750
- _a,
5751
- ba,
6001
+ return t("div", [t("div", { staticClass: "root menu-wrapper", style: [{ width: `${e.width}px` }, e.fixed && { zIndex: 999 }] }, [e.fixed ? t("div", { staticClass: "fixed inset-0", on: { click: function(a) {
6002
+ return e.$emit("close");
6003
+ } } }) : e._e(), t("div", { staticStyle: { height: "100%", "font-size": "14px", "border-radius": "0 8px 8px 0", "box-shadow": "0 10px 20px rgba(0, 0, 0, 0.2)" }, style: { width: `${e.width}px` } }, [e.isLegacyTemplate ? e._e() : t("div", { staticClass: "tab-list" }, [t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "blocks" }, domProps: { textContent: e._s(e.$t("tabs.blocks")) }, on: { click: function(a) {
6004
+ e.tab = "blocks";
6005
+ } } }), t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "design" }, domProps: { textContent: e._s(e.$t("tabs.design")) }, on: { click: function(a) {
6006
+ e.tab = "design";
6007
+ } } }), t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "fields" }, domProps: { textContent: e._s(e.$t("tabs.fields")) }, on: { click: function(a) {
6008
+ e.tab = "fields";
6009
+ } } }), e.extensionTabType ? t("div", { staticClass: "tab-item", class: { "is-active": e.tab === "extension" }, on: { click: function(a) {
6010
+ e.tab = "extension";
6011
+ } } }, [t("div", { staticStyle: { width: "18px", height: "18px", background: "#343434", "border-radius": "4px", display: "flex", "align-items": "center", "justify-content": "center", "margin-top": "2px" }, style: [
6012
+ e.extensionTabType === "pipedrive" && { backgroundColor: "#3A3A3A" },
6013
+ e.extensionTabType === "hubspot" && { backgroundColor: "#FF8F3E" },
6014
+ e.extensionTabType === "salesforce" && { backgroundColor: "#009CDB" }
6015
+ ] }, [t("BaseIcon", { staticStyle: { color: "white" }, attrs: { type: e.extensionTabType, size: "14" } })], 1)]) : e._e(), t("div", { staticClass: "tab-item ml-[2px]", class: { "is-active": e.tab === "generalSettings" }, on: { click: function(a) {
6016
+ e.tab = "generalSettings";
6017
+ } } }, [t("BaseIcon", { staticStyle: {}, attrs: { type: "cog", size: "16" } })], 1)]), e.tab === "blocks" ? t("MenuBlocks", { attrs: { _document: e.state, set: e.set, "remove-value": e.removeValue, fixed: e.fixed, "can-use-blocks": e.canUseBlocks }, on: { "block-added": e.onAddedBlock } }, [t("div", { staticStyle: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "flex-end", "align-items": "flex-start", padding: "calc(1 * var(--rem))" }, attrs: { slot: "footer" }, slot: "footer" }, [t("CButton", { staticStyle: { position: "relative" }, attrs: { "icon-left": "help", type: "none", pattern: "secondary", size: "small" }, on: { click: e.openGuide } }, [e._v(" " + e._s(e.$t("guideButton")) + " "), e.showGuideNotification ? t("div", { staticClass: "circle-pulse" }) : e._e()])], 1)]) : e.tab === "design" ? t("Design", { staticClass: "menu-container", attrs: { _document: e.state, _value: {
6018
+ css: "data.css"
6019
+ }, set: e.set, offset: e.width } }) : e.tab === "fields" ? t("Fields", { staticClass: "menu-container", attrs: { _document: e.state, "crm-service": e.extensionTabType, _value: {
6020
+ css: "data.css"
6021
+ }, set: e.set } }) : e.tab === "extension" ? t("ExtensionTab", { staticClass: "menu-container", attrs: { _document: e.state, _value: {
6022
+ externalReferences: "externalReferences",
6023
+ clients: "clients",
6024
+ articles: "articles"
6025
+ } }, on: { input: ({ key: a, value: n }) => e.set({ key: a, value: n }) } }) : e._e(), e.tab === "generalSettings" ? t("DocumentGeneralSettings", { staticClass: "menu-container", class: { "!top-0 rounded-sm": e.isLegacyTemplate }, attrs: { _document: e.state, _value: {
6026
+ term: "data.terms",
6027
+ series: "docNumber.series",
6028
+ tags: "tags",
6029
+ language: "language",
6030
+ currency: "currency",
6031
+ senderId: "companyUserId",
6032
+ useVat: "data.formSettings.useVat",
6033
+ vatType: "data.formSettings.vatType",
6034
+ rounding: "data.formSettings.rounding"
6035
+ }, offset: e.width }, on: { input: ({ key: a, value: n }) => e.set({ key: a, value: n }) } }) : e._e(), e.showGuide ? t("DocumentGuide", { on: { close: function(a) {
6036
+ e.showGuide = !1;
6037
+ } } }) : e._e()], 1)])]);
6038
+ }, za = [], Za = /* @__PURE__ */ c(
6039
+ Pa,
6040
+ Ea,
6041
+ za,
5752
6042
  !1,
5753
6043
  null,
5754
- "414ffd3d",
6044
+ "49f05ec2",
5755
6045
  null,
5756
6046
  null
5757
6047
  );
5758
- const La = ka.exports;
5759
- const $a = {
5760
- name: "BlockControlButtons"
6048
+ const Oa = Za.exports;
6049
+ const Ra = {
6050
+ name: "BlockControlButtons",
6051
+ props: {
6052
+ isVisible: {
6053
+ type: [Boolean, Object],
6054
+ default: void 0
6055
+ },
6056
+ isMovable: {
6057
+ type: Boolean,
6058
+ default: !0
6059
+ }
6060
+ },
6061
+ computed: {
6062
+ canToggleVisibility() {
6063
+ return typeof this.isVisible == "boolean";
6064
+ },
6065
+ isHidden() {
6066
+ return typeof this.isVisible == "boolean" && !this.isVisible;
6067
+ }
6068
+ }
5761
6069
  };
5762
- var Sa = function() {
6070
+ var Ga = function() {
5763
6071
  var e = this, t = e._self._c;
5764
- return t("div", { staticClass: "control-root" }, [t("div", { staticClass: "control-direction" }, [t("div", { staticClass: "control-button", on: { click: function(a) {
6072
+ return t("div", { staticClass: "flex flex-col gap-1 control-root" }, [e.canToggleVisibility ? t("div", { staticClass: "control-button", on: { click: function(a) {
6073
+ return e.$emit("toggle-visible", !e.isVisible);
6074
+ } } }, [e.isVisible ? e._e() : t("span", { staticClass: "px-1.5 text-xs text-gray-600" }, [e._v("Hidden")]), t("BaseIcon", { class: { "mr-1": !e.isVisible }, attrs: { type: e.isVisible ? "eye" : "eye-off", size: "14" } })], 1) : e._e(), !e.isHidden && e.isMovable ? [t("div", { staticClass: "control-direction" }, [t("div", { staticClass: "control-button", on: { click: function(a) {
5765
6075
  return e.$emit("move", "up");
5766
6076
  } } }, [t("BaseIcon", { attrs: { type: "chevron-up", size: "16" } })], 1), t("div", { staticClass: "control-button", on: { click: function(a) {
5767
6077
  return e.$emit("move", "down");
5768
6078
  } } }, [t("BaseIcon", { attrs: { type: "chevron-down", size: "16" } })], 1)]), t("div", { staticClass: "control-button remove", on: { click: function(a) {
5769
6079
  return e.$emit("remove");
5770
- } } }, [t("BaseIcon", { attrs: { type: "x", size: "16" } })], 1)]);
5771
- }, Da = [], Ta = /* @__PURE__ */ c(
5772
- $a,
5773
- Sa,
5774
- Da,
6080
+ } } }, [t("BaseIcon", { attrs: { type: "x", size: "16" } })], 1)] : e._e()], 2);
6081
+ }, Ua = [], Wa = /* @__PURE__ */ c(
6082
+ Ra,
6083
+ Ga,
6084
+ Ua,
5775
6085
  !1,
5776
6086
  null,
5777
- "6c9a7f0f",
6087
+ "930bc32a",
5778
6088
  null,
5779
6089
  null
5780
6090
  );
5781
- const Va = Ta.exports;
5782
- const Ma = {
6091
+ const qa = Wa.exports;
6092
+ const Na = {
5783
6093
  name: "DynamicBlock",
5784
6094
  components: {
5785
- BlockControlButtons: Va
6095
+ BlockControlButtons: qa
5786
6096
  },
5787
6097
  props: {
5788
6098
  isDragging: {
@@ -5800,47 +6110,76 @@ const Ma = {
5800
6110
  blockType: {
5801
6111
  type: String,
5802
6112
  default: ""
6113
+ },
6114
+ showContent: {
6115
+ type: Boolean,
6116
+ default: !0
6117
+ },
6118
+ isVisible: {
6119
+ type: [Boolean, Object],
6120
+ default: void 0
6121
+ },
6122
+ disableControls: {
6123
+ type: Boolean,
6124
+ default: !1
5803
6125
  }
5804
6126
  },
5805
6127
  data() {
5806
6128
  return {
5807
6129
  isHovering: !1
5808
6130
  };
6131
+ },
6132
+ computed: {
6133
+ isHidden() {
6134
+ return typeof this.isVisible == "boolean" && !this.isVisible;
6135
+ },
6136
+ showControls() {
6137
+ return this.disableControls ? !1 : !this.isDragging && this.isHovering ? !0 : this.isHidden;
6138
+ },
6139
+ contentClass() {
6140
+ return this.isHidden ? "h-16 overflow-hidden after:bg-gradient-to-b after:from-white/50 after:to-white relative after:absolute after:content-[''] after:inset-0" : "";
6141
+ }
5809
6142
  }
5810
6143
  };
5811
- var Ia = function() {
6144
+ var ja = function() {
5812
6145
  var e = this, t = e._self._c;
5813
- return t("div", { staticClass: "block-root", class: {
5814
- "is-edit-view": e.isEditView,
5815
- "is-hovering": e.isHovering,
5816
- "min-h-none": e.blockType === "custom"
5817
- }, style: e.isDragging && {
6146
+ return t("Animation", { staticClass: "w-full" }, [e.isEditView ? t("div", { staticClass: "block-root", class: [
6147
+ {
6148
+ "is-edit-view": e.isEditView,
6149
+ "is-hovering": e.isHovering,
6150
+ "min-h-none": e.blockType === "custom" || e.isHidden,
6151
+ "border-b border-gray-200": e.isHidden
6152
+ },
6153
+ e.contentClass
6154
+ ], style: e.isDragging && {
5818
6155
  pointerEvents: "none"
5819
6156
  }, on: { "&mouseover": function(a) {
5820
6157
  e.isHovering = !0;
5821
6158
  }, "&mouseleave": function(a) {
5822
6159
  e.isHovering = !1;
5823
- } } }, [t("div", { staticClass: "block-container" }, [e._t("default")], 2), !e.isDragging && e.isHovering && e.canMove ? t("BlockControlButtons", { staticClass: "control-root", on: { move: function(a) {
6160
+ } } }, [t("div", { staticClass: "block-container", class: { "spacing-snug": e.isHidden }, attrs: { inert: e.isHidden } }, [e._t("default")], 2), e.showControls ? t("BlockControlButtons", { staticClass: "control-root z-10", attrs: { "is-movable": e.canMove, "is-visible": e.isVisible }, on: { "toggle-visible": function(a) {
6161
+ return e.$emit("toggle-visible", a);
6162
+ }, move: function(a) {
5824
6163
  return e.$emit("move", a);
5825
6164
  }, remove: function(a) {
5826
6165
  return e.$emit("remove");
5827
- } } }) : e._e()], 1);
5828
- }, Ba = [], Fa = /* @__PURE__ */ c(
5829
- Ma,
5830
- Ia,
5831
- Ba,
6166
+ } } }) : e._e()], 1) : e._e()]);
6167
+ }, Ka = [], Ya = /* @__PURE__ */ c(
6168
+ Na,
6169
+ ja,
6170
+ Ka,
5832
6171
  !1,
5833
6172
  null,
5834
- "3c351301",
6173
+ "d0246610",
5835
6174
  null,
5836
6175
  null
5837
6176
  );
5838
- const Ha = Fa.exports;
5839
- const Aa = {
6177
+ const Qa = Ya.exports;
6178
+ const Ja = {
5840
6179
  name: "DocumentDrawer",
5841
6180
  components: {
5842
- simplebar: S,
5843
- Drawer: ie
6181
+ simplebar: k,
6182
+ Drawer: ne
5844
6183
  },
5845
6184
  props: {
5846
6185
  position: {
@@ -5862,7 +6201,7 @@ const Aa = {
5862
6201
  }
5863
6202
  }
5864
6203
  };
5865
- var Pa = function() {
6204
+ var Xa = function() {
5866
6205
  var e = this, t = e._self._c;
5867
6206
  return t("transition", { attrs: { name: e.fixed ? void 0 : "grow-anim", mode: "out-in" } }, [e.open ? t(e.fixed ? "drawer" : "div", e._b({ ref: "drawer", tag: "component", staticClass: "font-inter document-drawer-root", class: {
5868
6207
  "is-sticky": !e.fixed
@@ -5871,21 +6210,21 @@ var Pa = function() {
5871
6210
  } } }, "component", e.$props, !1), [t("div", { staticStyle: { height: "100%", "z-index": "110" } }, [t("div", { staticStyle: { height: "100%", overflow: "auto" } }, [t("div", { style: e.fixed && {
5872
6211
  maxWidth: "100%",
5873
6212
  width: "280px",
5874
- padding: "2.5rem 1rem 6rem 1rem",
6213
+ padding: "calc(2.5 * var(--rem)) calc(1 * var(--rem)) calc(6 * var(--rem)) calc(1 * var(--rem))",
5875
6214
  ...e.fixedStyle
5876
6215
  } }, [e._t("default")], 2)])])]) : e._e()], 1);
5877
- }, Ea = [], za = /* @__PURE__ */ c(
5878
- Aa,
5879
- Pa,
5880
- Ea,
6216
+ }, en = [], tn = /* @__PURE__ */ c(
6217
+ Ja,
6218
+ Xa,
6219
+ en,
5881
6220
  !1,
5882
6221
  null,
5883
- "4381e4b3",
6222
+ "f0a56edd",
5884
6223
  null,
5885
6224
  null
5886
6225
  );
5887
- const Za = za.exports;
5888
- const Oa = {
6226
+ const an = tn.exports;
6227
+ const nn = {
5889
6228
  name: "DocumentFormViewRadio",
5890
6229
  props: {
5891
6230
  value: {
@@ -5898,24 +6237,24 @@ const Oa = {
5898
6237
  }
5899
6238
  }
5900
6239
  };
5901
- var Ra = function() {
6240
+ var sn = function() {
5902
6241
  var e = this, t = e._self._c;
5903
6242
  return t("div", { staticClass: "nav-toggle font-inter" }, [t("div", { staticClass: "nav-toggle-button", class: { active: e.value === "edit" }, on: { click: function(a) {
5904
6243
  e.value === "preview" && e.$emit("input", "edit");
5905
6244
  } } }, [e.small ? t("BaseIcon", { attrs: { type: "edit" } }) : [e._v(e._s(e.$t("edit")))]], 2), t("div", { staticClass: "nav-toggle-button", class: { active: e.value === "preview" }, attrs: { "data-onboarding": "preview-button" }, on: { click: function(a) {
5906
6245
  e.value === "edit" && e.$emit("input", "preview");
5907
6246
  } } }, [e.small ? t("BaseIcon", { attrs: { type: "eye" } }) : [e._v(e._s(e.$t("preview")))]], 2)]);
5908
- }, Ga = [], Ua = /* @__PURE__ */ c(
5909
- Oa,
5910
- Ra,
5911
- Ga,
6247
+ }, on = [], ln = /* @__PURE__ */ c(
6248
+ nn,
6249
+ sn,
6250
+ on,
5912
6251
  !1,
5913
6252
  null,
5914
6253
  "bfd27279",
5915
6254
  null,
5916
6255
  null
5917
6256
  );
5918
- const Wa = Ua.exports, qa = {
6257
+ const rn = ln.exports, cn = {
5919
6258
  name: "LogoBanner",
5920
6259
  props: {
5921
6260
  position: {
@@ -5933,44 +6272,44 @@ const Wa = Ua.exports, qa = {
5933
6272
  }
5934
6273
  }
5935
6274
  };
5936
- var Na = function() {
6275
+ var dn = function() {
5937
6276
  var e = this, t = e._self._c;
5938
6277
  return t("div", { staticClass: "z-50 flex justify-end bottom-0 left-0 right-0 pb-[10px] px-[10px] pointer-events-none", class: e.position }, [t("a", { staticClass: "pointer-events-auto inline-flex items-center h-8 pl-1.5 pr-2 border rounded-md bg-black/80 border-white/30", attrs: { href: `https://${e.$t("_common:brand.domain")}?utm_source=document&utm_medium=logo-banner`, target: "_blank" } }, [t("div", { staticClass: "w-5 h-5 mr-2 overflow-hidden bg-white rounded" }, [t("img", { staticClass: "w-full h-full", attrs: { src: e.logoUrl, alt: e.$t("brand.name") } })]), t("div", { staticClass: "text-xs font-medium text-white" }, [e._v(" Made in " + e._s(e.$t("brand.name")) + " ")])])]);
5939
- }, ja = [], Ka = /* @__PURE__ */ c(
5940
- qa,
5941
- Na,
5942
- ja,
6278
+ }, pn = [], un = /* @__PURE__ */ c(
6279
+ cn,
6280
+ dn,
6281
+ pn,
5943
6282
  !1,
5944
6283
  null,
5945
6284
  null,
5946
6285
  null,
5947
6286
  null
5948
6287
  );
5949
- const Ya = Ka.exports;
5950
- const Qa = {
6288
+ const mn = un.exports;
6289
+ const hn = {
5951
6290
  name: "DocumentFormNav"
5952
6291
  };
5953
- var Ja = function() {
6292
+ var fn = function() {
5954
6293
  var e = this, t = e._self._c;
5955
- return t("div", { staticClass: "DocumentFormNav", staticStyle: { padding: "8px 1.5rem", position: "fixed", left: "0", top: "0", right: "0", "z-index": "98" } }, [t("div", { staticClass: "flex" }, [t("div", { staticClass: "inline-flex items-center flex-grow" }, [e._t("left")], 2), t("div", { staticClass: "inline-flex items-center justify-center flex-auto" }, [e._t("center")], 2), t("div", { staticClass: "inline-flex items-center justify-end flex-grow" }, [e._t("right")], 2)])]);
5956
- }, Xa = [], en = /* @__PURE__ */ c(
5957
- Qa,
5958
- Ja,
5959
- Xa,
6294
+ return t("div", { staticClass: "DocumentFormNav", staticStyle: { padding: "8px calc(1.5 * var(--rem))", position: "fixed", left: "0", top: "0", right: "0", "z-index": "98" } }, [t("div", { staticClass: "flex" }, [t("div", { staticClass: "inline-flex items-center flex-grow" }, [e._t("left")], 2), t("div", { staticClass: "inline-flex items-center justify-center flex-auto" }, [e._t("center")], 2), t("div", { staticClass: "inline-flex items-center justify-end flex-grow" }, [e._t("right")], 2)])]);
6295
+ }, gn = [], Cn = /* @__PURE__ */ c(
6296
+ hn,
6297
+ fn,
6298
+ gn,
5960
6299
  !1,
5961
6300
  null,
5962
- "5d1aad38",
6301
+ "05fc111c",
5963
6302
  null,
5964
6303
  null
5965
6304
  );
5966
- const tn = en.exports;
5967
- const ne = (i, e, t = "$children") => {
6305
+ const vn = Cn.exports;
6306
+ const oe = (i, e, t = "$children") => {
5968
6307
  if (!i)
5969
6308
  return;
5970
6309
  e(i);
5971
6310
  const a = i[t];
5972
- !a && !Array.isArray(a) || a.forEach((n) => ne(n, e));
5973
- }, an = {
6311
+ !a && !Array.isArray(a) || a.forEach((n) => oe(n, e));
6312
+ }, yn = {
5974
6313
  i18nOptions: {
5975
6314
  namespaces: "DocumentFormContainer",
5976
6315
  messages: {
@@ -5986,19 +6325,19 @@ const ne = (i, e, t = "$children") => {
5986
6325
  },
5987
6326
  name: "DocumentFormContainer",
5988
6327
  components: {
5989
- WithDimensions: qe,
5990
- DragList: q,
5991
- DragItem: N,
5992
- DynamicChapter: Ne,
5993
- DocumentFormMenu: La,
5994
- DynamicBlock: Ha,
5995
- DocumentFormViewRadio: Wa,
5996
- DocumentFormNav: tn,
5997
- DocumentDrawer: Za,
5998
- DocumentStyleContainer: je,
5999
- simplebar: S,
6000
- LogoBanner: Ya,
6001
- IsPremium: j
6328
+ WithDimensions: Ne,
6329
+ DragList: N,
6330
+ DragItem: j,
6331
+ DynamicChapter: je,
6332
+ DocumentFormMenu: Oa,
6333
+ DynamicBlock: Qa,
6334
+ DocumentFormViewRadio: rn,
6335
+ DocumentFormNav: vn,
6336
+ DocumentDrawer: an,
6337
+ DocumentStyleContainer: Ke,
6338
+ simplebar: k,
6339
+ LogoBanner: mn,
6340
+ IsPremium: Y
6002
6341
  },
6003
6342
  props: {
6004
6343
  _document: {
@@ -6025,12 +6364,16 @@ const ne = (i, e, t = "$children") => {
6025
6364
  close: {
6026
6365
  type: Function,
6027
6366
  default: null
6367
+ },
6368
+ goBack: {
6369
+ type: Function,
6370
+ default: null
6028
6371
  }
6029
6372
  },
6030
6373
  mixins: [b],
6031
6374
  data() {
6032
6375
  return {
6033
- drawerState: C,
6376
+ drawerState: v,
6034
6377
  isDragging: !1,
6035
6378
  previewDevice: "desktop",
6036
6379
  sidebarWidth: 270,
@@ -6042,47 +6385,52 @@ const ne = (i, e, t = "$children") => {
6042
6385
  },
6043
6386
  computed: {
6044
6387
  docTemplate() {
6045
- return p(this._document, "template", null);
6388
+ return m(this._document, "template", null);
6046
6389
  },
6047
6390
  isTemplateEditable() {
6048
- return p(this.docTemplate, "views.read.isEditable", !1);
6391
+ return m(this.docTemplate, "views.read.isEditable", !1);
6049
6392
  },
6050
6393
  canMove() {
6051
6394
  return this.isTemplateEditable;
6052
6395
  },
6053
6396
  readLayout() {
6054
- return p(this.docTemplate, "views.read.nodes", []);
6397
+ return m(this.docTemplate, "views.read.nodes", []);
6055
6398
  },
6056
6399
  nestedReadLayout() {
6057
6400
  return this._document.getReadLayout({ showHiddenNodes: this.isEditView });
6058
6401
  },
6059
6402
  currency() {
6060
- return p(this._document, "currency");
6403
+ return m(this._document, "currency");
6061
6404
  },
6062
6405
  externalReferences() {
6063
- return p(this._document, "externalReferences") || [];
6406
+ return m(this._document, "externalReferences") || [];
6064
6407
  },
6065
6408
  headingColor() {
6066
- return p(this._document, "theme.headingColor");
6409
+ return m(this._document, "theme.headingColor");
6067
6410
  },
6068
6411
  isEditView() {
6069
6412
  return this.view === "edit";
6070
6413
  },
6071
6414
  isFixedSidebar() {
6072
6415
  return ["sm", "md"].includes(this.mq);
6416
+ },
6417
+ isLegacyTemplate() {
6418
+ return !!this.readLayout.find(
6419
+ (i) => i.itemId === "workPackage-migrated"
6420
+ );
6073
6421
  }
6074
6422
  },
6075
6423
  watch: {
6076
6424
  isEditView: {
6077
6425
  immediate: !0,
6078
6426
  handler(i, e) {
6079
- C.isFixed = i ? this.isFixedSidebar : !0, i && !C.isFixed ? e === void 0 ? C.setLeft(!0) : C.useSavedLeftState() : C.showLeft = !1;
6427
+ v.isFixed = i ? this.isFixedSidebar : !0, i && !v.isFixed ? e === void 0 ? v.setLeft(!0) : v.useSavedLeftState() : v.showLeft = !1;
6080
6428
  }
6081
6429
  },
6082
6430
  isFixedSidebar: {
6083
6431
  immediate: !0,
6084
6432
  handler(i) {
6085
- C.isFixed = i, C.showLeft = !i;
6433
+ v.isFixed = i, v.showLeft = !i;
6086
6434
  }
6087
6435
  },
6088
6436
  currency(i) {
@@ -6113,7 +6461,16 @@ const ne = (i, e, t = "$children") => {
6113
6461
  },
6114
6462
  methods: {
6115
6463
  onAddBlockMount(i, e) {
6116
- !this.onAddRedis[i] || !e || (e.$el && this.$nextTick(() => Ke(e.$el, { offset: 100 })), typeof e[this.onAddRedis[i]] == "function" && e[this.onAddRedis[i]](), delete this.onAddRedis[i]);
6464
+ !this.onAddRedis[i] || !e || (e.$el && this.$nextTick(() => h1(e.$el, { offset: 100 })), typeof e[this.onAddRedis[i]] == "function" && e[this.onAddRedis[i]](), delete this.onAddRedis[i]);
6465
+ },
6466
+ onBlockToggleVisible(i, e) {
6467
+ const a = [...this.readLayout].findIndex(
6468
+ (n) => n.nodeId === i.nodeId
6469
+ );
6470
+ a !== -1 && this.setFormValue({
6471
+ key: `template.views.read.nodes[${a}].isVisible`,
6472
+ value: e
6473
+ });
6117
6474
  },
6118
6475
  // Move functions for sections
6119
6476
  onBlockMove(i, e) {
@@ -6125,7 +6482,7 @@ const ne = (i, e, t = "$children") => {
6125
6482
  const a = i.itemId.split("-")[1];
6126
6483
  this.removePackageGroup(a);
6127
6484
  } else
6128
- ne(i, (n) => {
6485
+ oe(i, (n) => {
6129
6486
  n.value && Object.values(n.value).forEach((s) => {
6130
6487
  this.removeFormKeyValue(`${s}`);
6131
6488
  let o = s.replace(/^data.(?!properties)/g, "data.properties.");
@@ -6135,7 +6492,7 @@ const ne = (i, e, t = "$children") => {
6135
6492
  this.removeFormKeyValue(r);
6136
6493
  });
6137
6494
  }, "children");
6138
- T([this.nestedReadLayout[e]]).forEach((a) => {
6495
+ V([this.nestedReadLayout[e]]).forEach((a) => {
6139
6496
  const n = this.readLayout.findIndex((s) => s.nodeId === a.nodeId);
6140
6497
  this.removeFormValue(`template.views.read.nodes[${n}]`);
6141
6498
  });
@@ -6145,20 +6502,20 @@ const ne = (i, e, t = "$children") => {
6145
6502
  Array.isArray(e.packages) && e.packages.forEach((a) => {
6146
6503
  this.setFormValue({
6147
6504
  key: "articles",
6148
- value: p(this._document, "_doc.articles", []).filter(({ packageId: n }) => n !== a.packageId)
6505
+ value: m(this._document, "_doc.articles", []).filter(({ packageId: n }) => n !== a.packageId)
6149
6506
  });
6150
6507
  });
6151
- const t = Object.assign({}, p(this._document, "_doc.data.packageGroups"));
6152
- delete t[i], this.setFormValue({ key: "data.packageGroups", value: t }), Object.keys(p(this._document, "_doc.data.packageGroups", {})).length || this.removeFormValue("template.validationSchema.properties.data.properties.packageGroups");
6508
+ const t = Object.assign({}, m(this._document, "_doc.data.packageGroups"));
6509
+ delete t[i], this.setFormValue({ key: "data.packageGroups", value: t }), Object.keys(m(this._document, "_doc.data.packageGroups", {})).length || this.removeFormValue("template.validationSchema.properties.data.properties.packageGroups");
6153
6510
  },
6154
6511
  onBlockListChange(i, { removedIndex: e, addedIndex: t, payload: a }) {
6155
6512
  if (e !== null && t !== null) {
6156
6513
  if (e === t)
6157
6514
  return;
6158
- const n = Pe(this.nestedReadLayout, e, t);
6515
+ const n = Ee(this.nestedReadLayout, e, t);
6159
6516
  this.setFormValue({
6160
6517
  key: "template.views.read.nodes",
6161
- value: T(n)
6518
+ value: V(n)
6162
6519
  });
6163
6520
  } else if (!e && t !== null) {
6164
6521
  const {
@@ -6168,22 +6525,22 @@ const ne = (i, e, t = "$children") => {
6168
6525
  contentData: l
6169
6526
  } = a, {
6170
6527
  readView: r,
6171
- validation: h,
6172
- data: g,
6528
+ validation: p,
6529
+ data: C,
6173
6530
  onAddFnName: D = "onAdd"
6174
6531
  } = s({ sectionKey: n, document: this._document, contentData: l });
6175
- o({ validation: h, data: g });
6176
- const se = Ee({ tree: r }), oe = [
6532
+ o({ validation: p, data: C });
6533
+ const le = ze({ tree: r }), re = [
6177
6534
  ...this.nestedReadLayout.slice(0, t),
6178
- ...se,
6535
+ ...le,
6179
6536
  ...this.nestedReadLayout.slice(t)
6180
6537
  ];
6181
6538
  this.setFormValue({
6182
6539
  key: "template.views.read.nodes",
6183
- value: T(oe)
6540
+ value: V(re)
6184
6541
  });
6185
- const [{ nodeId: le }] = r;
6186
- this.onAddRedis[le] = D;
6542
+ const [{ nodeId: ce }] = r;
6543
+ this.onAddRedis[ce] = D;
6187
6544
  }
6188
6545
  },
6189
6546
  shouldAnimateDrop(i) {
@@ -6191,14 +6548,14 @@ const ne = (i, e, t = "$children") => {
6191
6548
  }
6192
6549
  }
6193
6550
  };
6194
- var nn = function() {
6551
+ var xn = function() {
6195
6552
  var e = this, t = e._self._c;
6196
6553
  return t("div", { staticStyle: { overflow: "auto", height: "100vh" } }, [t("div", { staticClass: "flex container-root font-inter", class: {
6197
6554
  "is-edit-view": e.isEditView,
6198
6555
  "is-empty-list": !e.nestedReadLayout.length
6199
6556
  } }, [t("DocumentFormMenu", { directives: [{ name: "show", rawName: "v-show", value: e.drawerState.showLeft, expression: "drawerState.showLeft" }], attrs: { state: e._document, "on-added-block": ({ nodeId: a, onAddFnName: n = "onAdd" }) => {
6200
6557
  e.onAddRedis[a] = n;
6201
- }, set: e.setFormValue, template: e.docTemplate, "can-drag": !e.drawerState.isFixed, fixed: e.drawerState.isFixed, "can-edit-template": e.isTemplateEditable, width: e.sidebarWidth }, on: { close: function(a) {
6558
+ }, set: e.setFormValue, "remove-value": e.removeFormValue, template: e.docTemplate, fixed: e.drawerState.isFixed, "can-use-blocks": e.isTemplateEditable, "is-legacy-template": e.isLegacyTemplate, width: e.sidebarWidth }, on: { close: function(a) {
6202
6559
  e.drawerState.showLeft = !1;
6203
6560
  } } }), t("div", { ref: "scroll-body", staticClass: "flex justify-center w-full doc-scroll-container", class: {
6204
6561
  "device-offset": e.isEditView
@@ -6206,11 +6563,11 @@ var nn = function() {
6206
6563
  marginLeft: `${e.sidebarWidth}px`
6207
6564
  } }, [t("DocumentFormNav", { style: {
6208
6565
  marginLeft: e.drawerState.showLeft ? `${e.sidebarWidth}px` : 0
6209
- }, attrs: { close: e.close } }, [t("div", { staticClass: "flex items-center w-full", staticStyle: { position: "relative" }, attrs: { slot: "left" }, slot: "left" }, [e.close ? t("CButton", { staticClass: "d-nav-button position left close", staticStyle: { "font-size": "16px", height: "2.25em", width: "2.25em", "flex-shrink": "0", "margin-right": "0.5em", "background-color": "hsla(240, 10%, 94%, 0.35)" }, attrs: { "icon-props": { size: 20 }, size: "normal", icon: "x", circle: "", type: "none", pattern: "tertiary" }, on: { click: e.close } }) : e._e(), t("CButton", { staticStyle: { "font-size": "16px", height: "2.5em", width: "2.5em", "background-color": "hsla(240, 10%, 94%, 0.35)" }, attrs: { circle: "", type: "none", pattern: "tertiary", icon: "sidebar" }, on: { click: function(a) {
6566
+ }, attrs: { close: e.close } }, [t("div", { staticClass: "flex items-center w-full", staticStyle: { position: "relative" }, attrs: { slot: "left" }, slot: "left" }, [e.close ? t("CButton", { staticClass: "d-nav-button position left close", staticStyle: { "font-size": "16px", height: "2.25em", width: "2.25em", "flex-shrink": "0", "margin-right": "0.5em", "background-color": "hsla(240, 10%, 94%, 0.35)" }, attrs: { "icon-props": { size: 20 }, size: "normal", icon: "x", circle: "", type: "none", pattern: "tertiary" }, on: { click: e.close } }) : e._e(), e.goBack ? t("CButton", { staticClass: "mr-2", staticStyle: { "background-color": "hsla(240, 10%, 94%, 0.35)" }, attrs: { circle: "", type: "none", pattern: "tertiary", icon: "arrow-left" }, on: { click: e.goBack } }) : e._e(), t("CButton", { staticStyle: { "font-size": "16px", height: "2.5em", width: "2.5em", "background-color": "hsla(240, 10%, 94%, 0.35)" }, attrs: { circle: "", type: "none", pattern: "tertiary", icon: "sidebar" }, on: { click: function(a) {
6210
6567
  return a.stopPropagation(), e.drawerState.toggleLeft.apply(null, arguments);
6211
- } } }), t("transition", { attrs: { name: "fade-bounce", appear: "" } }, [!e.nestedReadLayout.length && e.isFixedSidebar ? t("div", { staticClass: "font-inter", staticStyle: { position: "absolute", top: "calc(100% + 4px)", left: "1rem", width: "280px", "background-color": "hsl(205, 100%, 50%)", "box-shadow": "0 5px 10px rgba(0,0,0,0.3)", "border-radius": "0.75rem", color: "white", padding: "14px", "font-size": "18px", "line-height": "1.4", "font-weight": "600" } }, [e._v(" " + e._s(e.$t("emptyBlockPlaceholderSmall")) + " "), t("svg", { staticStyle: { position: "absolute", left: "2.25em", top: "0", transform: "translateY(-100%)", color: "hsl(205deg 100% 50%)" }, attrs: { width: "16", height: "6", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { d: "M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z", fill: "currentColor" } })])]) : e._e()]), e._t("nav-left")], 2), t("div", { staticStyle: { position: "relative" }, attrs: { slot: "center" }, slot: "center" }, [t("DocumentFormViewRadio", { directives: [{ name: "show", rawName: "v-show", value: e.nestedReadLayout.length, expression: "nestedReadLayout.length" }], attrs: { small: e.mq === "sm", value: e.view }, on: { input: function(a) {
6568
+ } } }), t("transition", { attrs: { name: "fade-bounce", appear: "" } }, [!e.nestedReadLayout.length && e.isFixedSidebar ? t("div", { staticClass: "font-inter", staticStyle: { position: "absolute", top: "calc(100% + 4px)", left: "calc(1 * var(--rem))", width: "280px", "background-color": "hsl(205, 100%, 50%)", "box-shadow": "0 5px 10px rgba(0,0,0,0.3)", "border-radius": "calc(0.75 * var(--rem))", color: "white", padding: "14px", "font-size": "18px", "line-height": "1.4", "font-weight": "600" } }, [e._v(" " + e._s(e.$t("emptyBlockPlaceholderSmall")) + " "), t("svg", { staticStyle: { position: "absolute", left: "2.25em", top: "0", transform: "translateY(-100%)", color: "hsl(205deg 100% 50%)" }, attrs: { width: "16", height: "6", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { d: "M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z", fill: "currentColor" } })])]) : e._e()]), e._t("nav-left")], 2), t("div", { staticStyle: { position: "relative" }, attrs: { slot: "center" }, slot: "center" }, [t("DocumentFormViewRadio", { directives: [{ name: "show", rawName: "v-show", value: e.nestedReadLayout.length, expression: "nestedReadLayout.length" }], attrs: { small: e.mq === "sm", value: e.view }, on: { input: function(a) {
6212
6569
  return e.$emit("update:view", a);
6213
- } } }), !e.isEditView && !["sm", "md"].includes(e.mq) ? t("div", { staticStyle: { position: "absolute", left: "calc(100% + 1.25rem)", transform: "translateY(50%)", top: "-50%", display: "inline-flex", "border-radius": "2em", padding: "3px", "background-color": "hsl(0, 0%, 0%, 0.07)", "backdrop-filter": "saturate(180%) blur(20px)", "font-size": "15px", height: "36px" } }, e._l(["desktop", "tablet", "mobile"], function(a) {
6570
+ } } }), !e.isEditView && !["sm", "md"].includes(e.mq) ? t("div", { staticStyle: { position: "absolute", left: "calc(100% + calc(1.25 * var(--rem)))", transform: "translateY(50%)", top: "-50%", display: "inline-flex", "border-radius": "2em", padding: "3px", "background-color": "hsl(0, 0%, 0%, 0.07)", "backdrop-filter": "saturate(180%) blur(20px)", "font-size": "15px", height: "36px" } }, e._l(["desktop", "tablet", "mobile"], function(a) {
6214
6571
  return t("div", { key: a, staticStyle: { "border-radius": "2em", "font-weight": "500", cursor: "pointer", "padding-top": "4px", "padding-bottom": "4px", margin: "0 4px", "user-select": "none", display: "inline-flex", "align-items": "center", "justify-content": "center", color: "hsl(0, 0%, 0%, 0.5)", transition: "150ms" }, style: e.previewDevice === a && {
6215
6572
  boxShadow: "0 1px 1px rgba(0, 0, 0, 0.2)",
6216
6573
  backgroundColor: "hsl(0, 0%, 100%)",
@@ -6227,7 +6584,7 @@ var nn = function() {
6227
6584
  "is-empty": !e.nestedReadLayout.length
6228
6585
  },
6229
6586
  !e.isEditView && `is-device-${e.previewDevice}`
6230
- ] }, [!e.nestedReadLayout.length && !e.isFixedSidebar ? t("div", { staticClass: "drag-drop-empty-list is-placeholder has-text-grey" }, [t("div", { staticStyle: { position: "relative" } }, [e._m(0), t("svg", { staticClass: "drag-drop-illustration", attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 50 50" } }, [t("path", { staticClass: "drag-drop-illustration-finger", attrs: { d: "M8 0a4 4 0 00-2.7 1C4.6 1.6 4 2.7 4 4v21.4c-.4.2-.8.2-1.7 1A7.2 7.2 0 000 31.8c0 2 .8 3.8 1 4.5L4 42s-.1 0 0 0c1.4 3.1 4.5 5 8 5h9c5 0 9-4 9-9V22c0-.8-.1-2-.7-3-.5-1-1.7-2-3.3-2-1 0-2 .4-2.6.9 0-.3-.1-.7-.3-1-.6-1-1.7-1.9-3.1-1.9a4 4 0 00-2.7 1c-.6-1.1-1.7-2-3.3-2-.8 0-1.4.2-2 .6V4a4 4 0 00-4-4z", fill: "#000", "fill-rule": "nonzero" } }), t("path", { staticClass: "drag-drop-illustration-grabbing", attrs: { transform: "translate(0 11)", d: "M14 1c-.8 0-1.8.2-2.6.8l-.9 1a4 4 0 00-5.2.2C4.6 3.6 4 4.7 4 5.9V14c-1.7.7-4 3-4 7 0 2.2.9 4.2 1 4.5L3.9 31c1.5 3.1 4.6 5 8 5H21c5 0 9-4 9-9V9c0-4.4-2.5-5-4-5-.7 0-1.5.1-2.3.7C23 2.5 21.4 2 20 2c-1 0-2 .3-2.6.8l-.6-.9A4 4 0 0014 1z", fill: "#000", "fill-rule": "nonzero" } })])]), t("div", { staticClass: "text-center", staticStyle: { "max-width": "22ch" }, domProps: { innerHTML: e._s(e.$t("emptyBlockPlaceholderLarge")) } })]) : e._e(), t(e.isEditView ? "div" : "simplebar", { tag: "component", staticClass: "w-full h-full" }, [t("WithDimensions", { attrs: { "provide-device": !0 }, on: { width: function(a) {
6587
+ ] }, [!e.nestedReadLayout.length && !e.isFixedSidebar ? t("div", { staticClass: "drag-drop-empty-list is-placeholder text-gray-400" }, [t("div", { staticStyle: { position: "relative" } }, [e._m(0), t("svg", { staticClass: "drag-drop-illustration", attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 50 50" } }, [t("path", { staticClass: "drag-drop-illustration-finger", attrs: { d: "M8 0a4 4 0 00-2.7 1C4.6 1.6 4 2.7 4 4v21.4c-.4.2-.8.2-1.7 1A7.2 7.2 0 000 31.8c0 2 .8 3.8 1 4.5L4 42s-.1 0 0 0c1.4 3.1 4.5 5 8 5h9c5 0 9-4 9-9V22c0-.8-.1-2-.7-3-.5-1-1.7-2-3.3-2-1 0-2 .4-2.6.9 0-.3-.1-.7-.3-1-.6-1-1.7-1.9-3.1-1.9a4 4 0 00-2.7 1c-.6-1.1-1.7-2-3.3-2-.8 0-1.4.2-2 .6V4a4 4 0 00-4-4z", fill: "#000", "fill-rule": "nonzero" } }), t("path", { staticClass: "drag-drop-illustration-grabbing", attrs: { transform: "translate(0 11)", d: "M14 1c-.8 0-1.8.2-2.6.8l-.9 1a4 4 0 00-5.2.2C4.6 3.6 4 4.7 4 5.9V14c-1.7.7-4 3-4 7 0 2.2.9 4.2 1 4.5L3.9 31c1.5 3.1 4.6 5 8 5H21c5 0 9-4 9-9V9c0-4.4-2.5-5-4-5-.7 0-1.5.1-2.3.7C23 2.5 21.4 2 20 2c-1 0-2 .3-2.6.8l-.6-.9A4 4 0 0014 1z", fill: "#000", "fill-rule": "nonzero" } })])]), t("div", { staticClass: "text-center", staticStyle: { "max-width": "22ch" }, domProps: { innerHTML: e._s(e.$t("emptyBlockPlaceholderLarge")) } })]) : e._e(), t(e.isEditView ? "div" : "simplebar", { tag: "component", staticClass: "w-full h-full" }, [t("WithDimensions", { attrs: { "provide-device": !0 }, on: { width: function(a) {
6231
6588
  e.parentSize.width = a;
6232
6589
  } }, scopedSlots: e._u([{ key: "default", fn: function({ width: a, height: n }) {
6233
6590
  var s, o;
@@ -6245,43 +6602,45 @@ var nn = function() {
6245
6602
  {
6246
6603
  "drag-item": e.canMove
6247
6604
  }
6248
- ] }, [t("DynamicBlock", { ref: l.nodeId, refInFor: !0, attrs: { "is-dragging": e.isDragging, "is-edit-view": e.isEditView, "can-move": e.canMove, "block-type": l.itemType }, on: { remove: function(h) {
6605
+ ] }, [t("DynamicBlock", { ref: l.nodeId, refInFor: !0, attrs: { "is-dragging": e.isDragging, "is-edit-view": e.isEditView, "can-move": e.canMove, "block-type": l.itemType, "is-visible": l.isVisible, "disable-controls": e.isLegacyTemplate }, on: { remove: function(p) {
6249
6606
  return e.onBlockRemove(l, r);
6250
- }, move: function(h) {
6251
- return e.onBlockMove(h, r);
6252
- } } }, [t("DynamicChapter", { attrs: { "component-name": l.componentName, "component-props": { ...l.props, _document: e._document, _value: l.value }, children: l.children, "parent-size": e.parentSize, "on-input": ({ key: h, value: g, options: D }) => e.setFormValue({ key: h, value: g, options: D }), "on-remove": ({ key: h }) => e.removeFormValue(h), "on-mount": (h) => e.onAddBlockMount(l.nodeId, h) } })], 1)], 1);
6607
+ }, move: function(p) {
6608
+ return e.onBlockMove(p, r);
6609
+ }, "toggle-visible": function(p) {
6610
+ return e.onBlockToggleVisible(l, p);
6611
+ } } }, [t("DynamicChapter", { attrs: { "component-name": l.componentName, "component-props": { ...l.props, _document: e._document, _value: l.value }, children: l.children, "parent-size": e.parentSize, "is-visible": l.isVisible, "on-input": ({ key: p, value: C, options: D }) => e.setFormValue({ key: p, value: C, options: D }), "on-remove": ({ key: p }) => e.removeFormValue(p), "on-mount": (p) => e.onAddBlockMount(l.nodeId, p) } })], 1)], 1);
6253
6612
  }), 1) : e._e(), t("IsPremium", { scopedSlots: e._u([{ key: "default", fn: function({ isProLike: l }) {
6254
6613
  return [!e.isEditView && !l ? t("LogoBanner", { attrs: { position: "sticky" } }) : e._e()];
6255
6614
  } }], null, !0) })], 1);
6256
6615
  } }]) })], 1)], 1)], 1), t("DocumentDrawer", { key: "settingsDrawer", attrs: { id: "settingsDrawer", open: e.drawerState.showRight, fixed: !0, position: "right" }, on: { "update:open": function(a) {
6257
6616
  return e.$set(e.drawerState, "showRight", a);
6258
6617
  } } }, [t("portal-target", { attrs: { name: "drawer-content" } })], 1)], 1)]);
6259
- }, sn = [function() {
6618
+ }, wn = [function() {
6260
6619
  var i = this, e = i._self._c;
6261
6620
  return e("div", { staticClass: "drag-drop-illustration-block" }, [e("div"), e("div")]);
6262
- }], on = /* @__PURE__ */ c(
6263
- an,
6264
- nn,
6265
- sn,
6621
+ }], _n = /* @__PURE__ */ c(
6622
+ yn,
6623
+ xn,
6624
+ wn,
6266
6625
  !1,
6267
6626
  null,
6268
- "1c046d56",
6627
+ "1592c6b7",
6269
6628
  null,
6270
6629
  null
6271
6630
  );
6272
- const ln = on.exports, V = $.observable({
6631
+ const bn = _n.exports, T = S.observable({
6273
6632
  canEdit: !1,
6274
6633
  isForm: !0,
6275
6634
  setFormValue: null
6276
- }), rn = {
6635
+ }), kn = {
6277
6636
  name: "DocumentForm",
6278
6637
  components: {
6279
- DocumentFormContainer: ln,
6280
- IsPremium: j,
6281
- IsPremiumPreStep: Xe,
6282
- DocumentSend: Fi
6638
+ DocumentFormContainer: bn,
6639
+ IsPremium: Y,
6640
+ IsPremiumPreStep: K,
6641
+ DocumentSend: zi
6283
6642
  },
6284
- mixins: [s1({ currentElement: null }), Ye],
6643
+ mixins: [a1({ currentElement: null }), n1],
6285
6644
  props: {
6286
6645
  document: {
6287
6646
  type: Object,
@@ -6291,6 +6650,10 @@ const ln = on.exports, V = $.observable({
6291
6650
  type: Boolean,
6292
6651
  default: !1
6293
6652
  },
6653
+ setFormValue: {
6654
+ type: Function,
6655
+ required: !0
6656
+ },
6294
6657
  setDocValue: {
6295
6658
  type: Function,
6296
6659
  required: !0
@@ -6307,12 +6670,20 @@ const ln = on.exports, V = $.observable({
6307
6670
  type: Function,
6308
6671
  required: !0
6309
6672
  },
6673
+ onSaveTemplate: {
6674
+ type: Function,
6675
+ default: null
6676
+ },
6310
6677
  close: {
6311
6678
  type: Function,
6312
6679
  default: null
6680
+ },
6681
+ goBack: {
6682
+ type: Function,
6683
+ default: null
6313
6684
  }
6314
6685
  },
6315
- provide: () => ({ viewSettings: V }),
6686
+ provide: () => ({ viewSettings: T }),
6316
6687
  data() {
6317
6688
  return {
6318
6689
  view: "edit",
@@ -6323,13 +6694,13 @@ const ln = on.exports, V = $.observable({
6323
6694
  canEdit: {
6324
6695
  immediate: !0,
6325
6696
  handler(i) {
6326
- V.canEdit = !!i;
6697
+ T.canEdit = !!i;
6327
6698
  }
6328
6699
  }
6329
6700
  },
6330
6701
  computed: {
6331
6702
  canDoActions() {
6332
- return !!p(this.document, "template.views.read.nodes", []).length;
6703
+ return !!m(this.document, "template.views.read.nodes", []).length;
6333
6704
  },
6334
6705
  canEdit() {
6335
6706
  const { document: i } = this;
@@ -6337,7 +6708,7 @@ const ln = on.exports, V = $.observable({
6337
6708
  }
6338
6709
  },
6339
6710
  created() {
6340
- this.setFormValue && (V.setFormValue = this.setDocValue);
6711
+ this.setFormValue && (T.setFormValue = this.setDocValue);
6341
6712
  },
6342
6713
  methods: {
6343
6714
  isValid() {
@@ -6352,9 +6723,10 @@ const ln = on.exports, V = $.observable({
6352
6723
  },
6353
6724
  async saveAsTemplate() {
6354
6725
  this.document && this.$modal.show(
6355
- ee,
6726
+ ie,
6356
6727
  {
6357
- document: this.document
6728
+ document: this.document,
6729
+ onSaveTemplate: this.onSaveTemplate
6358
6730
  },
6359
6731
  {
6360
6732
  adaptive: !0,
@@ -6368,9 +6740,9 @@ const ln = on.exports, V = $.observable({
6368
6740
  }
6369
6741
  }
6370
6742
  };
6371
- var cn = function() {
6743
+ var Ln = function() {
6372
6744
  var e = this, t = e._self._c;
6373
- return e.document ? t("div", { staticClass: "flex flex-col w-screen bg-white" }, [t("DocumentFormContainer", { attrs: { _document: e.document, view: e.view, "set-form-value": e.setDocValue, "remove-form-value": e.removeDocValue, "remove-form-key-value": e.removeDocKeyValue, close: e.close }, on: { "update:view": function(a) {
6745
+ return e.document ? t("div", { staticClass: "flex flex-col w-screen bg-white" }, [t("DocumentFormContainer", { attrs: { _document: e.document, view: e.view, "set-form-value": e.setDocValue, "remove-form-value": e.removeDocValue, "remove-form-key-value": e.removeDocKeyValue, close: e.close, "go-back": e.goBack }, on: { "update:view": function(a) {
6374
6746
  e.view = a;
6375
6747
  } } }, [t("template", { slot: "nav-right" }, [t("IsPremium", { scopedSlots: e._u([{ key: "default", fn: function({ canCreateDocument: a }) {
6376
6748
  return [t("IsPremiumPreStep", { attrs: { feature: "documents" }, scopedSlots: e._u([{ key: "default", fn: function({ onClick: n }) {
@@ -6390,18 +6762,18 @@ var cn = function() {
6390
6762
  reminders: "data.reminders",
6391
6763
  name: "data.name"
6392
6764
  }, "set-form-value": e.setDocValue, "remove-form-value": e.removeDocValue, "on-save-document": e.onSaveDocument } }), e.showDrawer ? t("portal", { attrs: { to: "drawer-content" } }) : e._e()], 1) : e._e();
6393
- }, dn = [], pn = /* @__PURE__ */ c(
6394
- rn,
6395
- cn,
6396
- dn,
6765
+ }, $n = [], Sn = /* @__PURE__ */ c(
6766
+ kn,
6767
+ Ln,
6768
+ $n,
6397
6769
  !1,
6398
6770
  null,
6399
6771
  null,
6400
6772
  null,
6401
6773
  null
6402
6774
  );
6403
- const un = pn.exports;
6404
- const mn = {
6775
+ const Dn = Sn.exports;
6776
+ const Vn = {
6405
6777
  name: "ClientLinks",
6406
6778
  props: {
6407
6779
  id: {
@@ -6431,7 +6803,7 @@ const mn = {
6431
6803
  }
6432
6804
  },
6433
6805
  computed: {
6434
- ...v({
6806
+ ...g({
6435
6807
  docById: "documents2/byId"
6436
6808
  }),
6437
6809
  document() {
@@ -6453,36 +6825,35 @@ const mn = {
6453
6825
  },
6454
6826
  methods: {
6455
6827
  ...x({
6456
- loadDocument: u.LOAD_DOCUMENT2,
6457
- showMessage: u.SHOW_MESSAGE
6828
+ loadDocument: u.LOAD_DOCUMENT2
6458
6829
  }),
6459
6830
  copyToClipboard(i) {
6460
- i.target.previousElementSibling.select(), document.execCommand("copy", !1), this.showMessage("info", this.$t("copied"));
6831
+ i.target.previousElementSibling.select(), document.execCommand("copy", !1), q("info", this.$t("copied"));
6461
6832
  }
6462
6833
  }
6463
6834
  };
6464
- var hn = function() {
6835
+ var Tn = function() {
6465
6836
  var e = this, t = e._self._c;
6466
6837
  return t("div", { staticClass: "font-inter", staticStyle: { "background-color": "white", "border-radius": "10px", overflow: "hidden" } }, [t("div", { staticStyle: { padding: "40px 30px", position: "relative" } }, [t("CButton", { staticStyle: { position: "absolute", right: "1em", top: "1em", color: "hsl(0, 0%, 55%)" }, attrs: { icon: "x", circle: "", size: "normal" }, on: { click: function(a) {
6467
6838
  return e.$emit("close");
6468
6839
  } } }), t("div", { staticStyle: { padding: "0 0 2.5em" } }, [t("div", { staticClass: "x-title", domProps: { textContent: e._s(e.$t("title")) } }), t("div", { staticClass: "x-text", domProps: { textContent: e._s(e.$t("text")) } })]), e.clients.length ? e._l(e.clients, function(a, n) {
6469
6840
  return t("div", { key: n, staticClass: "client-card" }, [t("div", { staticStyle: { padding: "4px 6px 8px 6px" } }, [t("div", { staticClass: "client-title truncate-text" }, [e._v(" " + e._s(a.primaryTitle) + " "), a.secondaryTitle ? t("span", { staticStyle: { opacity: "0.5", "padding-left": "0.125ch" } }, [e._v("· " + e._s(a.secondaryTitle))]) : e._e()]), a.documentRole ? t("div", { domProps: { textContent: e._s(e.$t(`_common:documentRole.${a.documentRole}.label`)) } }) : e._e(), t("div", [a.email ? t("a", { attrs: { href: `mailto:${a.email}?&body=${a.docLink}` } }, [e._v(e._s(a.email))]) : e._e(), a.email && a.cellphone ? t("span", { staticStyle: { padding: "0 0.5ch" } }, [e._v("·")]) : e._e(), a.cellphone ? t("a", { attrs: { href: `sms:${a.cellphone}?&body=${a.docLink}` } }, [t("CPhoneFormat", { attrs: { phone: a.cellphone, region: a.cellphoneRegion } })], 1) : e._e()])]), t("div", { staticStyle: { display: "flex", position: "relative" } }, [t("input", { ref: "key", refInFor: !0, staticClass: "link-field truncate-text", attrs: { placeholder: e.$t("placeholder"), type: "text", readonly: "readonly" }, domProps: { value: a.docLink } }), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("tooltip"), expression: "$t('tooltip')" }], staticClass: "clipboard-button", on: { click: e.copyToClipboard } }, [t("BaseIcon", { staticStyle: { "pointer-events": "none" }, attrs: { type: "copy", size: "17" } })], 1)])]);
6470
- }) : t("div", { staticStyle: { padding: "2em", "font-size": "14px", "text-align": "center", color: "hsl(0, 0%, 55%)", border: "1px solid hsl(0, 0%, 88%)", "border-radius": "6px" }, domProps: { textContent: e._s(e.$t("placeholder")) } }), t("div", { staticClass: "x-hint" }, [t("BaseIcon", { staticClass: "has-text-secondary", staticStyle: { flex: "0 0 auto", "margin-right": "8px", "margin-top": "3px" }, attrs: { type: "info", size: "16" } }), t("div", { domProps: { textContent: e._s(e.$t("hint")) } })], 1)], 2)]);
6471
- }, fn = [], gn = /* @__PURE__ */ c(
6472
- mn,
6473
- hn,
6474
- fn,
6841
+ }) : t("div", { staticStyle: { padding: "2em", "font-size": "14px", "text-align": "center", color: "hsl(0, 0%, 55%)", border: "1px solid hsl(0, 0%, 88%)", "border-radius": "6px" }, domProps: { textContent: e._s(e.$t("placeholder")) } }), t("div", { staticClass: "x-hint" }, [t("BaseIcon", { staticClass: "text-primary-500", staticStyle: { flex: "0 0 auto", "margin-right": "8px", "margin-top": "3px" }, attrs: { type: "info", size: "16" } }), t("div", { domProps: { textContent: e._s(e.$t("hint")) } })], 1)], 2)]);
6842
+ }, Mn = [], Bn = /* @__PURE__ */ c(
6843
+ Vn,
6844
+ Tn,
6845
+ Mn,
6475
6846
  !1,
6476
6847
  null,
6477
- "1fe10a91",
6848
+ "791a9a8f",
6478
6849
  null,
6479
6850
  null
6480
6851
  );
6481
- const Cn = gn.exports, vn = Cn, yn = ({ id: i }) => {
6482
- if (!$.prototype.$modal)
6852
+ const In = Bn.exports, Fn = In, Hn = ({ id: i }) => {
6853
+ if (!S.prototype.$modal)
6483
6854
  throw Error("Open client modal requires plugin vue-js-modal");
6484
- $.prototype.$modal.show(
6485
- vn,
6855
+ S.prototype.$modal.show(
6856
+ Fn,
6486
6857
  {
6487
6858
  id: i
6488
6859
  },
@@ -6495,7 +6866,7 @@ const Cn = gn.exports, vn = Cn, yn = ({ id: i }) => {
6495
6866
  }
6496
6867
  );
6497
6868
  };
6498
- const xn = {
6869
+ const An = {
6499
6870
  name: "PostDocumentSend",
6500
6871
  mixins: [b],
6501
6872
  i18nOptions: {
@@ -6552,7 +6923,7 @@ const xn = {
6552
6923
  id: i,
6553
6924
  body: { status: "sent" },
6554
6925
  showMessage: !1
6555
- }), yn({ id: i })), t || setTimeout(() => this.close(), 2e3);
6926
+ }), Hn({ id: i })), t || setTimeout(() => this.close(), 2e3);
6556
6927
  },
6557
6928
  async onSend() {
6558
6929
  typeof this.onSendFunc == "function" && this.onSendFunc(this.document), await this.handleDocumentLinks();
@@ -6571,7 +6942,7 @@ const xn = {
6571
6942
  body: { isAccepted: !0 },
6572
6943
  checksum: a
6573
6944
  }), await this.sendDocument({ id: i }), this.onSend()) : (this.$modal.show(
6574
- d1,
6945
+ f1,
6575
6946
  {
6576
6947
  _document: this.document,
6577
6948
  fullScreen: this.modalHeight === "100%",
@@ -6615,22 +6986,22 @@ const xn = {
6615
6986
  }
6616
6987
  }
6617
6988
  };
6618
- var wn = function() {
6989
+ var Pn = function() {
6619
6990
  var e = this, t = e._self._c;
6620
6991
  return t("div", { staticClass: "font-inter root" }, [t("div", { staticClass: "container" }, [t("div", { staticClass: "icon-wrapper" }, [t("BaseIcon", { attrs: { size: 20, type: "email" } })], 1), t("div", { staticClass: "title", domProps: { textContent: e._s(e.$t("title")) } }), t("div", { staticClass: "divider" }), t("CButton", { staticClass: "close-button", attrs: { type: "secondary" }, on: { click: e.close } }, [e._v(" " + e._s(e.$t("_common:close")) + " ")])], 1)]);
6621
- }, _n = [], bn = /* @__PURE__ */ c(
6622
- xn,
6623
- wn,
6624
- _n,
6992
+ }, En = [], zn = /* @__PURE__ */ c(
6993
+ An,
6994
+ Pn,
6995
+ En,
6625
6996
  !1,
6626
6997
  null,
6627
- "af44c39e",
6998
+ "1f679c67",
6628
6999
  null,
6629
7000
  null
6630
7001
  );
6631
- const kn = bn.exports;
6632
- $.use(n1);
6633
- const Ln = {
7002
+ const Zn = zn.exports;
7003
+ S.use(i1);
7004
+ const On = {
6634
7005
  name: "DocForm",
6635
7006
  i18nOptions: {
6636
7007
  namespaces: "widgetDocForm",
@@ -6644,9 +7015,9 @@ const Ln = {
6644
7015
  }
6645
7016
  },
6646
7017
  components: {
6647
- TemplateSelector: f2,
6648
- DocumentEditor: un,
6649
- PostSend: kn
7018
+ TemplateSelector: x2,
7019
+ DocumentEditor: Dn,
7020
+ PostSend: Zn
6650
7021
  },
6651
7022
  props: {
6652
7023
  isNew: {
@@ -6667,7 +7038,7 @@ const Ln = {
6667
7038
  };
6668
7039
  },
6669
7040
  computed: {
6670
- ...ze({
7041
+ ...Ze({
6671
7042
  company: "application/company",
6672
7043
  feature: "application/feature",
6673
7044
  can: "application/can",
@@ -6696,7 +7067,7 @@ const Ln = {
6696
7067
  (!this.rawDoc || (i = this.rawDoc) != null && i.__isNew) && (this.view = "templateSelect");
6697
7068
  },
6698
7069
  methods: {
6699
- ...Ze({
7070
+ ...Oe({
6700
7071
  setFormValue: u.SET_FORM_VALUE,
6701
7072
  removeFormValue: u.REMOVE_FORM_VALUE,
6702
7073
  removeFormKeyValue: u.REMOVE_FORM_KEY_VALUE,
@@ -6716,7 +7087,9 @@ const Ln = {
6716
7087
  });
6717
7088
  },
6718
7089
  async onTemplateSelect({ templateId: i, documentId: e, formData: t }) {
6719
- const a = Ht({ ...this.rawDoc }, [
7090
+ var n;
7091
+ const a = Zt({ ...this.rawDoc }, [
7092
+ "__tempId",
6720
7093
  "externalReferences",
6721
7094
  "clients",
6722
7095
  "data"
@@ -6726,9 +7099,9 @@ const Ln = {
6726
7099
  _formData: a
6727
7100
  }) : await this.loadDocumentForm({
6728
7101
  templateId: i,
6729
- formData: t ? Oe(t, a) : null,
7102
+ formData: t ? Re(t, a) : null,
6730
7103
  _formData: a
6731
- }), await this.initDoc(), this.view = "editor";
7104
+ }), (n = a == null ? void 0 : a.data) != null && n.name && this.setDocValue({ key: "data.name", value: a.data.name }), await this.initDoc(), this.view = "editor";
6732
7105
  },
6733
7106
  setDocValue({ key: i, value: e }) {
6734
7107
  return this.setFormValue({ key: `document2.${i}`, value: e });
@@ -6744,24 +7117,27 @@ const Ln = {
6744
7117
  i && (t != null && t.senderClient) ? (this.document = t, this.view = "postSend") : this.close();
6745
7118
  },
6746
7119
  close() {
6747
- Re.open = !1;
7120
+ Ge.open = !1;
7121
+ },
7122
+ goBack() {
7123
+ this.view = "templateSelect", this.setDocValue({ key: "__isNew", value: !0 });
6748
7124
  }
6749
7125
  }
6750
7126
  };
6751
- var $n = function() {
7127
+ var Rn = function() {
6752
7128
  var e = this, t = e._self._c;
6753
- return t("div", { staticClass: "flex flex-col w-full h-full" }, [e.view === "templateSelect" ? t("div", { staticClass: "flex flex-col h-full w-full" }, [t("div", { staticClass: "relative flex items-center justify-center h-16 border-b border-gray-200" }, [t("CButton", { staticClass: "absolute top-1/2 -translate-y-1/2 left-4", attrs: { icon: "x", circle: "" }, on: { click: e.close } }), t("div", [e._v(e._s(e.$t("selectNavTitle")))])], 1), t("TemplateSelector", { staticClass: "body-scroll min-h-0", attrs: { "can-edit-template": !0, "on-use-template": e.onTemplateSelect, "show-gallery": e.feature("templateGallery") } })], 1) : e.view === "editor" ? t("DocumentEditor", { attrs: { document: e.document, "set-doc-value": e.setDocValue, "set-form-value": e.setFormValue, "remove-doc-value": e.removeDocValue, "remove-doc-key-value": e.removeDocKeyValue, "on-save-document": e.onSaveDocument, "is-loading": e.isPosting, close: e.close } }) : t("PostSend", { attrs: { document: e.document, "on-send-func": e.close, "on-close-func": e.close } })], 1);
6754
- }, Sn = [], Dn = /* @__PURE__ */ c(
6755
- Ln,
6756
- $n,
6757
- Sn,
7129
+ return t("div", { staticClass: "flex flex-col w-full h-full" }, [e.view === "templateSelect" ? t("div", { staticClass: "flex flex-col h-full w-full" }, [t("div", { staticClass: "relative flex items-center justify-center h-16 border-b border-gray-200" }, [t("CButton", { staticClass: "absolute top-1/2 -translate-y-1/2 left-4", attrs: { icon: "x", circle: "" }, on: { click: e.close } }), t("div", [e._v(e._s(e.$t("selectNavTitle")))])], 1), t("TemplateSelector", { staticClass: "body-scroll min-h-0", attrs: { "on-use-template": e.onTemplateSelect, "show-gallery": e.feature("templateGallery") } })], 1) : e.view === "editor" ? t("DocumentEditor", { attrs: { document: e.document, "set-doc-value": e.setDocValue, "set-form-value": e.setFormValue, "remove-doc-value": e.removeDocValue, "remove-doc-key-value": e.removeDocKeyValue, "on-save-document": e.onSaveDocument, "is-loading": e.isPosting, close: e.close, "go-back": e.goBack } }) : t("PostSend", { attrs: { document: e.document, "on-send-func": e.close, "on-close-func": e.close } })], 1);
7130
+ }, Gn = [], Un = /* @__PURE__ */ c(
7131
+ On,
7132
+ Rn,
7133
+ Gn,
6758
7134
  !1,
6759
7135
  null,
6760
- "8006e531",
7136
+ null,
6761
7137
  null,
6762
7138
  null
6763
7139
  );
6764
- const os = Dn.exports;
7140
+ const As = Un.exports;
6765
7141
  export {
6766
- os as default
7142
+ As as default
6767
7143
  };