@cling-se/widget 0.9.11 → 0.9.12

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 (143) hide show
  1. package/dist/{AddClientCallout-bccc787f.js → AddClientCallout-6b0621ec.js} +5 -5
  2. package/dist/{AnswerModal-4de1dbc1.js → AnswerModal-f6cb74d7.js} +154 -143
  3. package/dist/{AttachmentItem-800d8c9f.js → AttachmentItem-2a4cb524.js} +3 -3
  4. package/dist/{BaseDatePicker-1abafbac.js → BaseDatePicker-2daf62c0.js} +43 -43
  5. package/dist/{BaseInput-51ade595.js → BaseInput-a4523348.js} +1 -1
  6. package/dist/{BaseUpload-b9b2fa68.js → BaseUpload-737004ad.js} +2 -2
  7. package/dist/{BlockMedia-efc20618.js → BlockMedia-a145fc19.js} +1 -1
  8. package/dist/{CCallout-a357fde2.js → CCallout-7fb1ad5c.js} +3 -3
  9. package/dist/{CDropdownItem-bb7f1de7.js → CDropdownItem-79c8dc70.js} +5 -5
  10. package/dist/{CField-d69fcf46.js → CField-2b1118f9.js} +1 -1
  11. package/dist/{CSlider.vue_vue_type_style_index_0_lang-5ac8d200.js → CSlider.vue_vue_type_style_index_0_lang-47894df7.js} +1 -1
  12. package/dist/{ClientAutocomplete-d126a3bd.js → ClientAutocomplete-3d098904.js} +2 -2
  13. package/dist/{ClientModal-e2c196c4.js → ClientModal-d1bf8d0d.js} +4 -4
  14. package/dist/{ColorPicker-81f9f778.js → ColorPicker-c61cd86f.js} +29 -29
  15. package/dist/{CompanyModal-092999bf.js → CompanyModal-46cab2d1.js} +3 -3
  16. package/dist/{ContentWrapper-1f930dce.js → ContentWrapper-3251ab37.js} +11 -11
  17. package/dist/{CoverBlockSettings-5aa513a4.js → CoverBlockSettings-3ad93db4.js} +9 -8
  18. package/dist/DocAnswer-a0f2853b.js +33 -0
  19. package/dist/{DocForm-2e9af604.js → DocForm-a4c0a0f1.js} +695 -740
  20. package/dist/{DocFormSend-fadf14c9.js → DocFormSend-ed982485.js} +28 -24
  21. package/dist/{DocModalBase-4172fbbb.js → DocModalBase-22abfff9.js} +1 -1
  22. package/dist/{DocPrint-edc291ba.js → DocPrint-028aa0ed.js} +1 -1
  23. package/dist/{DocReceipt-bcb8539c.js → DocReceipt-3bd27c4a.js} +1 -1
  24. package/dist/{DocSendReminder-c75a1906.js → DocSendReminder-8ad0ca86.js} +1 -1
  25. package/dist/{DocTextEditor-c9b90281.js → DocTextEditor-8930e458.js} +7 -7
  26. package/dist/{DocTimeline-2afee21c.js → DocTimeline-2ab336f0.js} +5 -5
  27. package/dist/{DocumentClient-425f6e0b.js → DocumentClient-441798b5.js} +5 -5
  28. package/dist/{DocumentLayout-0d24ac85.js → DocumentLayout-02c32058.js} +95 -95
  29. package/dist/{DocumentLogotype-278b2823.js → DocumentLogotype-43ef9231.js} +16 -16
  30. package/dist/{EmbedInput-28796e66.js → EmbedInput-996ae0e3.js} +2 -2
  31. package/dist/{EmbedSettings-1e097db9.js → EmbedSettings-41af8b9c.js} +3 -3
  32. package/dist/{ErrorCallout-ddbc30af.js → ErrorCallout-d392ffe9.js} +1 -1
  33. package/dist/{FilePreviewModal-360216a2.js → FilePreviewModal-e298691e.js} +4 -4
  34. package/dist/{HeaderSettings-abc9e60f.js → HeaderSettings-687131c9.js} +18 -17
  35. package/dist/{ImageSelectModal-2c078df5.js → ImageSelectModal-eec441aa.js} +15 -17
  36. package/dist/{ImageUploadWrapper-99a3b0dd.js → ImageUploadWrapper-b244cf9e.js} +2 -2
  37. package/dist/{Index-61786d22.js → Index-01a3b6ed.js} +6 -6
  38. package/dist/{Index-f9a97c67.js → Index-0ed1b84a.js} +2 -2
  39. package/dist/{Index-05d4a173.js → Index-13b65d9b.js} +2 -2
  40. package/dist/{Index-6435f551.js → Index-2468cd69.js} +11 -11
  41. package/dist/{Index-aecbccac.js → Index-25ce24cc.js} +2 -2
  42. package/dist/{Index-942a36d2.js → Index-2b19a264.js} +12 -12
  43. package/dist/{Index-23c1de88.js → Index-30ebb13c.js} +2 -2
  44. package/dist/{Index-8b57e293.js → Index-37d3fd60.js} +2 -2
  45. package/dist/{Index-abb29c87.js → Index-485b35e8.js} +26 -26
  46. package/dist/{Index-cb10ca9b.js → Index-5ff95ead.js} +8 -8
  47. package/dist/{Index-0a9e95d6.js → Index-62ea070e.js} +2 -2
  48. package/dist/{Index-81eeecba.js → Index-6c5de42a.js} +2 -2
  49. package/dist/{Index-5688e5e1.js → Index-6ca4a7e4.js} +14 -14
  50. package/dist/{Index-610a54bf.js → Index-6d61f98d.js} +25 -25
  51. package/dist/{Index-a0de23fe.js → Index-77a7d639.js} +5 -5
  52. package/dist/{Index-a8faf552.js → Index-7c421b05.js} +4 -4
  53. package/dist/{Index-d841c396.js → Index-7d2fe1bd.js} +5 -5
  54. package/dist/{Index-a8b60741.js → Index-87cd4771.js} +4 -4
  55. package/dist/{Index-ad024dc9.js → Index-8882ee1b.js} +5 -5
  56. package/dist/{Index-7317f443.js → Index-8c254496.js} +4 -4
  57. package/dist/{Index-168790bc.js → Index-9ccce76f.js} +4 -4
  58. package/dist/{Index-7a56c885.js → Index-a7871ea6.js} +4 -4
  59. package/dist/{Index-61b794ca.js → Index-a9f197a7.js} +4 -4
  60. package/dist/{Index-f3af647f.js → Index-af3a9b66.js} +4 -4
  61. package/dist/{Index-cb1efaaa.js → Index-b9b80eae.js} +6 -6
  62. package/dist/{Index-4cae2241.js → Index-bf23d7a9.js} +11 -11
  63. package/dist/{Index-c5b9ad7f.js → Index-c3a619f4.js} +4 -4
  64. package/dist/{Index-193a4968.js → Index-d3225e03.js} +5 -5
  65. package/dist/{Index-d56d4b7b.js → Index-d76bf229.js} +1 -1
  66. package/dist/{Index-d2d40188.js → Index-e2919ed0.js} +4 -4
  67. package/dist/{Index-8b02f74f.js → Index-ee558d21.js} +1 -1
  68. package/dist/{Index-44764dbb.js → Index-efa47af4.js} +7 -7
  69. package/dist/{Index-901f2f68.js → Index-f14261e7.js} +3 -3
  70. package/dist/{Index-83597574.js → Index-fd947a18.js} +10 -10
  71. package/dist/{InputToggleRow-3bba2a55.js → InputToggleRow-ee713437.js} +1 -1
  72. package/dist/IsPremiumPreStep-9b5a0a01.js +3669 -0
  73. package/dist/{MediaWrapper-574eca05.js → MediaWrapper-45257b41.js} +3 -3
  74. package/dist/{NotBindingText-f2acdb51.js → NotBindingText-c2f7c9cb.js} +2 -2
  75. package/dist/{PackageGroup-625d7093.js → PackageGroup-b2aa42da.js} +12 -12
  76. package/dist/{PdfTerms-05e6491e.js → PdfTerms-2d66043e.js} +4 -4
  77. package/dist/{PdfViewer-4d32b0f1.js → PdfViewer-947ee278.js} +2 -2
  78. package/dist/{PlainHtml-c2e1feca.js → PlainHtml-a3d47a45.js} +1 -1
  79. package/dist/{PriceHeader-ce8bb22c.js → PriceHeader-b6a99a57.js} +11 -11
  80. package/dist/{SearchApi-b7e03288.js → SearchApi-c6511bc3.js} +2 -2
  81. package/dist/Setup-60ec3c2a.js +54 -0
  82. package/dist/{TermsSettings-de33fad6.js → TermsSettings-836555da.js} +6 -6
  83. package/dist/{ThemeColorRow-52efe243.js → ThemeColorRow-672086c3.js} +11 -20
  84. package/dist/{ToggleBinding-ec8d351f.js → ToggleBinding-3c581fbb.js} +3 -3
  85. package/dist/{UploadModal-463188b1.js → UploadModal-b3933203.js} +3 -3
  86. package/dist/{VideoPlayerInput-9314dfa5.js → VideoPlayerInput-5ad13a27.js} +3 -3
  87. package/dist/{VideoPlayerSettings-e7978498.js → VideoPlayerSettings-e964804b.js} +4 -4
  88. package/dist/{VideoSelectModal-72e1e4e2.js → VideoSelectModal-321b2270.js} +12 -12
  89. package/dist/{answerDocumentMixin-d65059b8.js → answerDocumentMixin-76224b35.js} +3 -3
  90. package/dist/{cssMode-88d0146a.js → cssMode-2bf89988.js} +15 -19
  91. package/dist/{focusDrawerMixin-46eade80.js → focusDrawerMixin-dffff858.js} +1 -1
  92. package/dist/{formComponentsInstall-0cfab48e.js → formComponentsInstall-57c30f22.js} +263 -258
  93. package/dist/{formValidationMixin-94fb3562.js → formValidationMixin-9d5c1283.js} +1 -1
  94. package/dist/{freemarker2-fb187d64.js → freemarker2-503b066f.js} +19 -23
  95. package/dist/{handlebars-4a1a8024.js → handlebars-8c0c0a90.js} +11 -15
  96. package/dist/{html-00e90fc7.js → html-5b503855.js} +14 -18
  97. package/dist/{htmlMode-cfbebdc7.js → htmlMode-b751a462.js} +19 -23
  98. package/dist/image-a902f5a5.js +18 -0
  99. package/dist/index-1c1cefec.js +14 -0
  100. package/dist/{index-93fd29b3.js → index-771f5571.js} +4 -4
  101. package/dist/index-9a5227ef.js +82 -0
  102. package/dist/{index-7a30802a.js → index-a9f8e647.js} +7 -7
  103. package/dist/{index-de7702a8.js → index-d81be181.js} +15 -15
  104. package/dist/index.es.js +4 -4
  105. package/dist/index.umd.js +600 -597
  106. package/dist/{javascript-3213b923.js → javascript-2d18f43b.js} +11 -15
  107. package/dist/{jsonMode-afc781d8.js → jsonMode-95421c7a.js} +19 -23
  108. package/dist/{liquid-dc5a4df5.js → liquid-47ff3277.js} +14 -18
  109. package/dist/{main-abeba7c1.js → main-5532481e.js} +26942 -26704
  110. package/dist/{mapFormMixin-e82f943f.js → mapFormMixin-218f9749.js} +1 -1
  111. package/dist/{publicSenderState-2f11c080.js → publicSenderState-7c91d66d.js} +1 -1
  112. package/dist/{python-4bce1745.js → python-afd06bc4.js} +11 -15
  113. package/dist/{razor-f57062fd.js → razor-28875ccf.js} +18 -22
  114. package/dist/{simplebar.min-07c0e6b7.js → simplebar.min-3682e5c9.js} +1 -1
  115. package/dist/style.css +2 -2
  116. package/dist/template-cd101772.js +526 -0
  117. package/dist/throttle-3a262479.js +18 -0
  118. package/dist/{tinycolor-0084a04e.js → tinycolor-ca02e626.js} +6 -6
  119. package/dist/{tippy.esm-2bcbed04.js → tippy.esm-a7740684.js} +5 -5
  120. package/dist/{tsMode-c0486e4e.js → tsMode-bc258439.js} +15 -19
  121. package/dist/{typescript-50a48698.js → typescript-ac68850c.js} +11 -15
  122. package/dist/{utils-d907da71.js → utils-b0646315.js} +5 -5
  123. package/dist/{vuedraggable.umd-c326d90c.js → vuedraggable.umd-934a0379.js} +48 -48
  124. package/dist/{xml-0ef7a70a.js → xml-a8591419.js} +14 -18
  125. package/package.json +10 -8
  126. package/dist/IsPremiumPreStep-1657f1ce.js +0 -2443
  127. package/dist/Setup-e92daff6.js +0 -50
  128. package/dist/assets/article-options-10522.png +0 -0
  129. package/dist/assets/bg-base-11995.png +0 -0
  130. package/dist/assets/bg-pro-89155.png +0 -0
  131. package/dist/assets/bg-start-17372.png +0 -0
  132. package/dist/assets/blank-95062.png +0 -0
  133. package/dist/assets/block-options-11378.png +0 -0
  134. package/dist/assets/columnGallery.image-14820.png +0 -0
  135. package/dist/assets/doc-send-25589.png +0 -0
  136. package/dist/assets/drag-block-21107.png +0 -0
  137. package/dist/assets/headerCircularGradient.image-79345.png +0 -0
  138. package/dist/assets/roiCalculator.image-13673.png +0 -0
  139. package/dist/assets/text-bubble-21606.png +0 -0
  140. package/dist/index-e9d870d0.js +0 -17
  141. package/dist/regions-29ee6964.js +0 -1250
  142. package/dist/template-3600893b.js +0 -528
  143. package/dist/throttle-1bf5bb97.js +0 -18
@@ -1,119 +1,107 @@
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 Ve, bd as De, 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 D, 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-abeba7c1.js";
2
- import { m as g, a as x } from "./vuex.esm-4a0fff7c.js";
3
- import "./index-de7702a8.js";
4
- import { v as M } from "./index-805c56e4.js";
5
- import { d as B, w as b } from "./CDropdownItem-bb7f1de7.js";
6
- import { D as Ue, l as We, g as qe, W as Ne, b as je, a as Ke } from "./DocumentLayout-0d24ac85.js";
7
- import { s as k } from "./simplebar.min-07c0e6b7.js";
8
- import { B as Ye } from "./BlockMedia-efc20618.js";
9
- import { b as Qe, I as K, a as Y } from "./IsPremiumPreStep-1657f1ce.js";
10
- import { c as Je, g as Xe } from "./template-3600893b.js";
11
- import { a as e1 } from "./tinycolor-0084a04e.js";
12
- import { m as L } from "./mapFormMixin-e82f943f.js";
13
- import { S as t1, C as Q, i as i1 } from "./formComponentsInstall-0cfab48e.js";
14
- import { s as v, f as a1 } from "./focusDrawerMixin-46eade80.js";
15
- import { f as n1 } from "./formValidationMixin-94fb3562.js";
16
- import { F as J, d as s1 } from "./tippy.esm-2bcbed04.js";
17
- import { S as o1 } from "./CSlider.vue_vue_type_style_index_0_lang-5ac8d200.js";
18
- import { o as l1, d as r1 } from "./vuedraggable.umd-c326d90c.js";
19
- import c1 from "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/drag-block-21107.png";
20
- import d1 from "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/text-bubble-21606.png";
21
- import p1 from "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/block-options-11378.png";
22
- import u1 from "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/article-options-10522.png";
23
- import m1 from "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/doc-send-25589.png";
24
- import { s as h1 } from "./dom-068d1a7b.js";
25
- import f1 from "./AnswerModal-4de1dbc1.js";
26
- import "./color-71c20583.js";
1
+ import { aY as ue, aZ as me, a_ as G, a$ as he, b0 as U, b1 as W, b2 as fe, b3 as ge, b4 as Ce, b5 as ve, j as ye, g as m, n as c, s as q, b as u, av as xe, c as f, C as N, b6 as we, b7 as be, h as S, b8 as _e, b9 as ke, A as Le, ba as $e, bb as Se, aX as Te, bc as De, M as d, a4 as h, aS as x, bd as Ve, be as Be, bf as Me, bg as Ie, D as Fe, bh as He, d as Ae, i as _, a3 as j, S as Pe, ap as Ee, ae as ze, bi as Ze, V as k, aU as K, aV as Y, I as F, bj as D, aW as Oe, bk as Re, bl as H, r as Ge, m as Ue, a as We, bm as qe } from "./main-5532481e.js";
2
+ import { m as g, a as y } from "./vuex.esm-4a0fff7c.js";
3
+ import "./index-d81be181.js";
4
+ import { v as B } from "./index-805c56e4.js";
5
+ import { d as M, w as L } from "./CDropdownItem-79c8dc70.js";
6
+ import { I, b as Ne, a as Q } from "./IsPremiumPreStep-9b5a0a01.js";
7
+ import { D as je, l as Ke, g as Ye, W as Qe, b as Je, a as Xe } from "./DocumentLayout-02c32058.js";
8
+ import { s as b } from "./simplebar.min-3682e5c9.js";
9
+ import { B as et } from "./BlockMedia-a145fc19.js";
10
+ import { c as tt, g as it } from "./template-cd101772.js";
11
+ import { a as at } from "./tinycolor-ca02e626.js";
12
+ import { m as $ } from "./mapFormMixin-218f9749.js";
13
+ import { S as nt, C as J, i as st } from "./formComponentsInstall-57c30f22.js";
14
+ import { s as v, f as ot } from "./focusDrawerMixin-dffff858.js";
15
+ import { f as lt } from "./formValidationMixin-9d5c1283.js";
16
+ import { F as X, d as rt } from "./tippy.esm-a7740684.js";
17
+ import { S as ct } from "./CSlider.vue_vue_type_style_index_0_lang-47894df7.js";
18
+ import { o as dt, d as pt } from "./vuedraggable.umd-934a0379.js";
19
+ import { s as ut } from "./dom-068d1a7b.js";
20
+ import mt from "./AnswerModal-f6cb74d7.js";
27
21
  import "./anime.es-e284c852.js";
28
- import "./regions-29ee6964.js";
29
- import "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/bg-pro-89155.png";
30
- import "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/bg-base-11995.png";
31
- import "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/bg-start-17372.png";
32
- import "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/headerCircularGradient.image-79345.png";
33
- import "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/columnGallery.image-14820.png";
34
- import "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/roiCalculator.image-13673.png";
35
- import "/Users/rang.ali/Projects/cling-vue/widget/dist/assets/blank-95062.png";
36
- import "./BaseDatePicker-1abafbac.js";
37
- import "./ErrorCallout-ddbc30af.js";
38
- import "./AddClientCallout-bccc787f.js";
39
- import "./ClientAutocomplete-d126a3bd.js";
40
- import "./SearchApi-b7e03288.js";
41
- import "./ClientModal-e2c196c4.js";
42
- import "./CCallout-a357fde2.js";
43
- import "./CField-d69fcf46.js";
22
+ import "./image-a902f5a5.js";
23
+ import "./color-71c20583.js";
24
+ import "./BaseDatePicker-2daf62c0.js";
25
+ import "./ErrorCallout-d392ffe9.js";
26
+ import "./AddClientCallout-6b0621ec.js";
27
+ import "./ClientAutocomplete-3d098904.js";
28
+ import "./SearchApi-c6511bc3.js";
29
+ import "./ClientModal-d1bf8d0d.js";
30
+ import "./CCallout-7fb1ad5c.js";
31
+ import "./CField-2b1118f9.js";
44
32
  import "./CField.vue_vue_type_style_index_0_lang-4ed993c7.js";
45
- import "./ColorPicker-81f9f778.js";
46
- var g1 = de, C1 = pe, v1 = R;
47
- function y1(i, e, t) {
33
+ import "./ColorPicker-c61cd86f.js";
34
+ var ht = ue, ft = me, gt = G;
35
+ function Ct(i, e, t) {
48
36
  for (var a = -1, n = e.length, s = {}; ++a < n; ) {
49
- var o = e[a], l = g1(i, o);
50
- t(l, o) && C1(s, v1(o, i), l);
37
+ var o = e[a], l = ht(i, o);
38
+ t(l, o) && ft(s, gt(o, i), l);
51
39
  }
52
40
  return s;
53
41
  }
54
- var x1 = y1;
55
- function w1(i, e) {
42
+ var vt = Ct;
43
+ function yt(i, e) {
56
44
  return i != null && e in Object(i);
57
45
  }
58
- var _1 = w1, b1 = ue, k1 = G, L1 = "[object Arguments]";
59
- function $1(i) {
60
- return k1(i) && b1(i) == L1;
46
+ var xt = yt, wt = he, bt = U, _t = "[object Arguments]";
47
+ function kt(i) {
48
+ return bt(i) && wt(i) == _t;
61
49
  }
62
- var S1 = $1, H = S1, V1 = G, X = Object.prototype, D1 = X.hasOwnProperty, T1 = X.propertyIsEnumerable, M1 = H(function() {
50
+ var Lt = kt, A = Lt, $t = U, ee = Object.prototype, St = ee.hasOwnProperty, Tt = ee.propertyIsEnumerable, Dt = A(function() {
63
51
  return arguments;
64
- }()) ? H : function(i) {
65
- return V1(i) && D1.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;
52
+ }()) ? A : function(i) {
53
+ return $t(i) && St.call(i, "callee") && !Tt.call(i, "callee");
54
+ }, te = Dt, Vt = 9007199254740991;
55
+ function Bt(i) {
56
+ return typeof i == "number" && i > -1 && i % 1 == 0 && i <= Vt;
69
57
  }
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);
58
+ var Mt = Bt, It = G, Ft = te, Ht = W, At = fe, Pt = Mt, Et = ge;
59
+ function zt(i, e, t) {
60
+ e = It(e, i);
73
61
  for (var a = -1, n = e.length, s = !1; ++a < n; ) {
74
- var o = Z1(e[a]);
62
+ var o = Et(e[a]);
75
63
  if (!(s = i != null && t(i, o)))
76
64
  break;
77
65
  i = i[o];
78
66
  }
79
- return s || ++a != n ? s : (n = i == null ? 0 : i.length, !!n && z1(n) && E1(o, n) && (P1(i) || A1(i)));
67
+ return s || ++a != n ? s : (n = i == null ? 0 : i.length, !!n && Pt(n) && At(o, n) && (Ht(i) || Ft(i)));
80
68
  }
81
- var R1 = O1, G1 = _1, U1 = R1;
82
- function W1(i, e) {
83
- return i != null && U1(i, e, G1);
69
+ var Zt = zt, Ot = xt, Rt = Zt;
70
+ function Gt(i, e) {
71
+ return i != null && Rt(i, e, Ot);
84
72
  }
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);
73
+ var Ut = Gt, Wt = vt, qt = Ut;
74
+ function Nt(i, e) {
75
+ return Wt(i, e, function(t, a) {
76
+ return qt(i, a);
89
77
  });
90
78
  }
91
- var Y1 = K1;
92
- function Q1(i, e) {
79
+ var jt = Nt;
80
+ function Kt(i, e) {
93
81
  for (var t = -1, a = e.length, n = i.length; ++t < a; )
94
82
  i[n + t] = e[t];
95
83
  return i;
96
84
  }
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]);
85
+ var Yt = Kt, P = Ce, Qt = te, Jt = W, E = P ? P.isConcatSpreadable : void 0;
86
+ function Xt(i) {
87
+ return Jt(i) || Qt(i) || !!(E && i && i[E]);
100
88
  }
101
- var it = tt, at = J1, nt = it;
102
- function te(i, e, t, a, n) {
89
+ var e1 = Xt, t1 = Yt, i1 = e1;
90
+ function ie(i, e, t, a, n) {
103
91
  var s = -1, o = i.length;
104
- for (t || (t = nt), n || (n = []); ++s < o; ) {
92
+ for (t || (t = i1), n || (n = []); ++s < o; ) {
105
93
  var l = i[s];
106
- e > 0 && t(l) ? e > 1 ? te(l, e - 1, t, a, n) : at(n, l) : a || (n[n.length] = l);
94
+ e > 0 && t(l) ? e > 1 ? ie(l, e - 1, t, a, n) : t1(n, l) : a || (n[n.length] = l);
107
95
  }
108
96
  return n;
109
97
  }
110
- var st = te, ot = st;
111
- function lt(i) {
98
+ var a1 = ie, n1 = a1;
99
+ function s1(i) {
112
100
  var e = i == null ? 0 : i.length;
113
- return e ? ot(i, 1) : [];
101
+ return e ? n1(i, 1) : [];
114
102
  }
115
- var rt = lt;
116
- function ct(i, e, t) {
103
+ var o1 = s1;
104
+ function l1(i, e, t) {
117
105
  switch (t.length) {
118
106
  case 0:
119
107
  return i.call(e);
@@ -126,56 +114,56 @@ function ct(i, e, t) {
126
114
  }
127
115
  return i.apply(e, t);
128
116
  }
129
- var dt = ct, pt = dt, E = Math.max;
130
- function ut(i, e, t) {
131
- return e = E(e === void 0 ? i.length - 1 : e, 0), function() {
132
- for (var a = arguments, n = -1, s = E(a.length - e, 0), o = Array(s); ++n < s; )
117
+ var r1 = l1, c1 = r1, z = Math.max;
118
+ function d1(i, e, t) {
119
+ return e = z(e === void 0 ? i.length - 1 : e, 0), function() {
120
+ for (var a = arguments, n = -1, s = z(a.length - e, 0), o = Array(s); ++n < s; )
133
121
  o[n] = a[e + n];
134
122
  n = -1;
135
123
  for (var l = Array(e + 1); ++n < e; )
136
124
  l[n] = a[n];
137
- return l[e] = t(o), pt(i, this, l);
125
+ return l[e] = t(o), c1(i, this, l);
138
126
  };
139
127
  }
140
- var mt = ut;
141
- function ht(i) {
128
+ var p1 = d1;
129
+ function u1(i) {
142
130
  return function() {
143
131
  return i;
144
132
  };
145
133
  }
146
- var ft = ht;
147
- function gt(i) {
134
+ var m1 = u1;
135
+ function h1(i) {
148
136
  return i;
149
137
  }
150
- var Ct = gt, vt = ft, z = ge, yt = Ct, xt = z ? function(i, e) {
151
- return z(i, "toString", {
138
+ var f1 = h1, g1 = m1, Z = ve, C1 = f1, v1 = Z ? function(i, e) {
139
+ return Z(i, "toString", {
152
140
  configurable: !0,
153
141
  enumerable: !1,
154
- value: vt(e),
142
+ value: g1(e),
155
143
  writable: !0
156
144
  });
157
- } : yt, wt = xt, _t = 800, bt = 16, kt = Date.now;
158
- function Lt(i) {
145
+ } : C1, y1 = v1, x1 = 800, w1 = 16, b1 = Date.now;
146
+ function _1(i) {
159
147
  var e = 0, t = 0;
160
148
  return function() {
161
- var a = kt(), n = bt - (a - t);
149
+ var a = b1(), n = w1 - (a - t);
162
150
  if (t = a, n > 0) {
163
- if (++e >= _t)
151
+ if (++e >= x1)
164
152
  return arguments[0];
165
153
  } else
166
154
  e = 0;
167
155
  return i.apply(void 0, arguments);
168
156
  };
169
157
  }
170
- var $t = Lt, St = wt, Vt = $t, Dt = Vt(St), Tt = Dt, Mt = rt, Bt = mt, It = Tt;
171
- function Ft(i) {
172
- return It(Bt(i, void 0, Mt), i + "");
158
+ var k1 = _1, L1 = y1, $1 = k1, S1 = $1(L1), T1 = S1, D1 = o1, V1 = p1, B1 = T1;
159
+ function M1(i) {
160
+ return B1(V1(i, void 0, D1), i + "");
173
161
  }
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 = {
162
+ var I1 = M1, F1 = jt, H1 = I1, A1 = H1(function(i, e) {
163
+ return i == null ? {} : F1(i, e);
164
+ }), P1 = A1;
165
+ const E1 = /* @__PURE__ */ ye(P1);
166
+ const z1 = {
179
167
  i18nOptions: {
180
168
  namespaces: "DocumentTemplateFormModal",
181
169
  messages: {
@@ -228,7 +216,7 @@ const Ot = {
228
216
  },
229
217
  validations: {
230
218
  name: {
231
- required: M.requiredIf((i) => !i.updateExistingDocTemplate)
219
+ required: B.requiredIf((i) => !i.updateExistingDocTemplate)
232
220
  }
233
221
  },
234
222
  computed: {
@@ -256,10 +244,10 @@ const Ot = {
256
244
  this.$refs.input && this.$refs.input.focus();
257
245
  },
258
246
  methods: {
259
- ...x({
260
- loadTemplate: u.DO_LOAD_TEMPLATE,
261
- saveTemplate: u.SAVE_TEMPLATE_FORM,
262
- updateSettings: u.UPDATE_SETTINGS
247
+ ...y({
248
+ loadTemplate: m.DO_LOAD_TEMPLATE,
249
+ saveTemplate: m.SAVE_TEMPLATE_FORM,
250
+ updateSettings: m.UPDATE_SETTINGS
263
251
  }),
264
252
  async onSave() {
265
253
  if (!this.document && !this.template && (this.$log.error('Missing prop "document" or "template"'), this.$emit("close")), this.$v.$invalid)
@@ -309,7 +297,7 @@ const Ot = {
309
297
  }
310
298
  }
311
299
  };
312
- var Rt = function() {
300
+ var Z1 = function() {
313
301
  var e = this, t = e._self._c;
314
302
  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) {
315
303
  e.name = a;
@@ -318,22 +306,60 @@ var Rt = function() {
318
306
  }, 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) {
319
307
  e.keepClients = a;
320
308
  }, 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,
309
+ }, O1 = [], R1 = /* @__PURE__ */ c(
310
+ z1,
311
+ Z1,
312
+ O1,
325
313
  !1,
326
314
  null,
327
315
  "9f39f8ce",
328
316
  null,
329
317
  null
330
318
  );
331
- const ie = Ut.exports;
332
- const Wt = {
319
+ const ae = R1.exports;
320
+ function G1(i, { availableProducts: e }) {
321
+ if (!i)
322
+ throw new Error("Missing parameter templateId");
323
+ const t = e, a = Object.keys(t).find((n) => {
324
+ var o;
325
+ const s = u(
326
+ t[n],
327
+ "metadata.companyPurchase"
328
+ );
329
+ return (s == null ? void 0 : s.type) === "template" && ((o = s == null ? void 0 : s.data) == null ? void 0 : o.id) === i;
330
+ });
331
+ return a ? t[a] : null;
332
+ }
333
+ async function U1(i) {
334
+ if (!i)
335
+ throw new Error("Missing argument stripeProduct");
336
+ const e = i == null ? void 0 : i.prices[0], { data: t } = await xe.createCheckoutSession({
337
+ items: [
338
+ {
339
+ stripePriceStripeId: e.stripeId,
340
+ quantity: 1
341
+ }
342
+ ],
343
+ successUrl: `${f.baseUrl}/purchase/success`
344
+ // cancelUrl: window.location.href
345
+ }), { redirectUrl: a } = t;
346
+ window.open(a, "_blank");
347
+ }
348
+ function ne(i, { availableProducts: e }) {
349
+ var n, s, o;
350
+ let t = null;
351
+ const a = G1(i.templateId, { availableProducts: e });
352
+ return a && (t = {
353
+ price: q((n = a == null ? void 0 : a.prices) == null ? void 0 : n[0].amount, { currency: (s = a == null ? void 0 : a.prices) == null ? void 0 : s[0].currency }),
354
+ isPurchased: ((o = i.purchaseInfo) == null ? void 0 : o.isPurchased) || !1,
355
+ onBuy: async () => U1(a)
356
+ }), t;
357
+ }
358
+ const W1 = {
333
359
  name: "GalleryTemplateModal",
334
360
  components: {
335
- simplebar: k,
336
- DocumentLayout: Ue
361
+ simplebar: b,
362
+ DocumentLayout: je
337
363
  },
338
364
  props: {
339
365
  // Instance of template
@@ -341,6 +367,10 @@ const Wt = {
341
367
  type: Object,
342
368
  required: !0
343
369
  },
370
+ fetchGallery: {
371
+ type: Function,
372
+ required: !0
373
+ },
344
374
  meta: {
345
375
  type: Object,
346
376
  default: () => ({})
@@ -359,12 +389,21 @@ const Wt = {
359
389
  type: Function,
360
390
  required: !1,
361
391
  default: null
392
+ },
393
+ product: {
394
+ type: Object,
395
+ default: null
396
+ },
397
+ galleryItemId: {
398
+ type: String,
399
+ required: !0
362
400
  }
363
401
  },
364
402
  data() {
365
403
  return {
366
404
  // previewDocument: null,
367
405
  didSave: !1,
406
+ privateProduct: null,
368
407
  dummyPreviewClient: {
369
408
  name: "Pernilla P.",
370
409
  email: "pernilla@mail.se",
@@ -372,15 +411,18 @@ const Wt = {
372
411
  documentRole: "signee",
373
412
  type: "individual"
374
413
  },
375
- templateStat: null
414
+ templateStat: null,
415
+ socketUnsubscribeFn: null
416
+ // Function to unsubscribe from socket
376
417
  };
377
418
  },
378
419
  computed: {
379
420
  ...g({
380
- isLoading: "templates/isPosting"
421
+ isLoading: "templates/isPosting",
422
+ stripeProducts: "stripe/products"
381
423
  }),
382
424
  previewDocument() {
383
- const { data: i, defaultData: e } = this.template, t = new W({
425
+ const { data: i, defaultData: e } = this.template, t = new N({
384
426
  data: {
385
427
  ...e,
386
428
  template: i,
@@ -393,14 +435,30 @@ const Wt = {
393
435
  }
394
436
  },
395
437
  created() {
396
- this.loadTemplateStat();
438
+ this.privateProduct = this.product, this.loadTemplateStat(), this.product && (this.socketUnsubscribeFn = we.on("event", async ({ type: i, action: e, data: t }) => {
439
+ var a;
440
+ if (i === "companyPurchase" && e === "applied" && (t == null ? void 0 : t.type) === "template") {
441
+ const n = (a = t == null ? void 0 : t.data) == null ? void 0 : a.id;
442
+ if (n !== this.template.id)
443
+ return;
444
+ const s = {
445
+ templateId: n,
446
+ isVisibleApp: !0,
447
+ includePurchaseInfo: !0
448
+ }, o = await this.fetchGallery(s);
449
+ this.privateProduct = ne(o[0], { availableProducts: this.stripeProducts });
450
+ }
451
+ }));
452
+ },
453
+ beforeDestroy() {
454
+ this.socketUnsubscribeFn && this.socketUnsubscribeFn();
397
455
  },
398
456
  methods: {
399
457
  async loadTemplateStat() {
400
458
  const i = this.template.id;
401
459
  i || (this.templateStat = null);
402
460
  try {
403
- const { data: e } = await ve.get(i);
461
+ const { data: e } = await be.get(i);
404
462
  this.templateStat = e;
405
463
  } catch {
406
464
  this.templateStat = null;
@@ -409,30 +467,33 @@ const Wt = {
409
467
  async useSelectedTemplate() {
410
468
  this.$parent.$emit("use-template", this.template), this.$emit("close");
411
469
  },
470
+ async buyTemplate() {
471
+ await this.privateProduct.onBuy();
472
+ },
412
473
  async saveAsTemplate() {
413
474
  this.template && typeof this.onSaveTemplate == "function" && (this.didSave = await this.onSaveTemplate(this.template));
414
475
  }
415
476
  }
416
477
  };
417
- var qt = function() {
418
- var a;
478
+ var q1 = function() {
479
+ var a, n;
419
480
  var e = this, t = e._self._c;
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: {
481
+ return t("div", { staticClass: "bg-gray-200 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", "min-height": "0" } }, [t("simplebar", { staticClass: "w-full h-full", attrs: { "data-simplebar-auto-hide": "false" } }, [e.previewDocument ? t("DocumentLayout", { attrs: { document: e.previewDocument } }) : e._e(), e.product && !e.privateProduct.isPurchased ? t("style", { tag: "component" }, [e._v(" .ProseMirror > * + * { filter: blur(8px); user-select: none; pointer-events: none; } ")]) : 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) + " ")]), e.meta.author ? 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: {
421
482
  backgroundImage: `url(${e.meta.author.avatar})`
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) {
483
+ } }), 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)])]) : e._e()]), t("div", { staticStyle: { "padding-bottom": "2em" } }, [e.product ? [e.privateProduct.isPurchased ? t("div", { staticClass: "flex items-center gap-2 p-1 mb-5 text-sm border border-gray-300 rounded-full bg-gray-300/60" }, [t("div", { staticClass: "flex items-center justify-center w-5 h-5 rounded-full bg-primary-500" }, [t("BaseIcon", { staticClass: "text-white", attrs: { type: "check", size: "12" } })], 1), t("div", { staticClass: "text-xs font-medium text-gray-700", domProps: { textContent: e._s(e.$t("_common:purchased", { thing: e.$t("_common:template") })) } })]) : t("CButton", { staticClass: "text-left !justify-start !px-4", staticStyle: { "margin-bottom": "0.5em" }, attrs: { type: "secondary", wide: "" }, on: { click: e.buyTemplate } }, [t("div", [e._v(" " + e._s(e.$t("_common:buy", { thing: e.$t("_common:template") })) + " ")]), t("div", { staticClass: "absolute py-1.5 px-2 text-sm leading-none text-white -translate-y-1/2 border rounded-md right-2 top-1/2 bg-primary-400/80 border-primary-600/60", domProps: { textContent: e._s(e.privateProduct.price) } })])] : e._e(), !e.product || e.privateProduct.isPurchased ? t("CButton", { staticStyle: { "margin-bottom": "0.5em" }, attrs: { disabled: e.product ? !e.privateProduct.isPurchased : !1, type: "secondary", wide: "" }, on: { click: e.useSelectedTemplate } }, [e._v(" " + e._s(e.$t("_common:use", { thing: e.$t("_common:template") })) + " ")]) : e._e(), (e.product ? (n = e.product) != null && n.isPurchased : e.showSave) ? t("CButton", { attrs: { loading: e.isLoading, type: e.didSave ? "success" : "none", "icon-left": e.didSave ? "check" : void 0, wide: "" }, on: { click: function(s) {
423
484
  e.didSave || e.saveAsTemplate();
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)])]);
425
- }, Nt = [], jt = /* @__PURE__ */ c(
426
- Wt,
427
- qt,
428
- Nt,
485
+ } } }, [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()], 2)])]);
486
+ }, N1 = [], j1 = /* @__PURE__ */ c(
487
+ W1,
488
+ q1,
489
+ N1,
429
490
  !1,
430
491
  null,
431
- "e2568605",
492
+ "07b93fb2",
432
493
  null,
433
494
  null
434
495
  );
435
- const Kt = jt.exports, Yt = {
496
+ const K1 = j1.exports, Y1 = {
436
497
  name: "GalleryLogic",
437
498
  i18nOptions: {
438
499
  namespaces: "GalleryLogic",
@@ -489,6 +550,14 @@ const Kt = jt.exports, Yt = {
489
550
  filterLanguage: {
490
551
  type: String,
491
552
  default: () => ["cling", "fortnoxSe"].includes(f.brand) ? "sv" : "en"
553
+ },
554
+ showTemplateAuthor: {
555
+ type: Boolean,
556
+ default: !0
557
+ },
558
+ canPurchase: {
559
+ type: Boolean,
560
+ default: !0
492
561
  }
493
562
  },
494
563
  data() {
@@ -516,6 +585,9 @@ const Kt = jt.exports, Yt = {
516
585
  };
517
586
  },
518
587
  computed: {
588
+ ...g({
589
+ stripeProducts: "stripe/products"
590
+ }),
519
591
  galleryItems() {
520
592
  return this.isLoading ? Array(6).fill({ placeholder: !0 }) : this.templateGalleryItems.filter(({ categories: i }) => i.includes(this.activeCategory && this.activeCategory.key));
521
593
  },
@@ -533,38 +605,46 @@ const Kt = jt.exports, Yt = {
533
605
  !i || !i.length || (!this.activeCategory || !i.includes(this.activeCategory)) && this.selectCategory(i[0]);
534
606
  }
535
607
  },
536
- created() {
537
- var i, e;
538
- if ((e = (i = this.$route) == null ? void 0 : i.query) != null && e.list) {
539
- const [t] = this.$route.query.list.split(",");
540
- this.activeCategory = this.allCategories.find(({ key: a }) => a === t);
541
- }
542
- this.loadTemplateGallery(() => {
543
- var a, n;
544
- const t = (n = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : n.id;
545
- if (t)
546
- try {
547
- const s = this.templateGalleryItems.find(({ id: o }) => o === t);
548
- this.selectGalleryItem(s);
549
- } catch (s) {
550
- $(s);
551
- }
552
- });
608
+ async created() {
609
+ var e, t, a, n;
610
+ if (this.canPurchase && await this.loadPrices(), (t = (e = this.$route) == null ? void 0 : e.query) != null && t.list) {
611
+ const [s] = this.$route.query.list.split(",");
612
+ this.activeCategory = this.allCategories.find(({ key: o }) => o === s);
613
+ }
614
+ await this.loadTemplateGallery();
615
+ const i = (n = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : n.id;
616
+ if (i)
617
+ try {
618
+ const s = this.templateGalleryItems.find(({ id: o }) => o === i);
619
+ this.selectGalleryItem(s);
620
+ } catch (s) {
621
+ S(s);
622
+ }
553
623
  },
554
624
  methods: {
555
- async loadTemplateGallery(i) {
625
+ ...y({
626
+ loadPrices: m.LOAD_PRICES
627
+ }),
628
+ async loadTemplateGallery() {
556
629
  this.isLoading = !0;
557
- const e = {
558
- isVisibleApp: !0
630
+ const i = {
631
+ isVisibleApp: !0,
632
+ includePurchaseInfo: !0
559
633
  };
560
- this.language && (e.language = this.language);
634
+ this.language && (i.language = this.language);
561
635
  try {
562
- const t = await this.fetchGallery(e);
563
- this.templateGalleryItems = t || [], this.availableCategoryKeys = t.reduce((a, n) => [.../* @__PURE__ */ new Set([...a, ...n.categories])], []);
564
- } catch (t) {
565
- $(t);
636
+ const e = await this.fetchGallery(i);
637
+ this.templateGalleryItems = (e || []).map((t) => {
638
+ if (this.canPurchase && t.isPurchasable) {
639
+ const a = ne(t, { availableProducts: this.stripeProducts });
640
+ a && (t.product = a);
641
+ }
642
+ return t;
643
+ }), this.availableCategoryKeys = e.reduce((t, a) => [.../* @__PURE__ */ new Set([...t, ...a.categories])], []);
644
+ } catch (e) {
645
+ S(e);
566
646
  } finally {
567
- this.isLoading = !1, typeof i == "function" && i();
647
+ this.isLoading = !1;
568
648
  }
569
649
  },
570
650
  async getGalleryTemplate(i) {
@@ -572,9 +652,10 @@ const Kt = jt.exports, Yt = {
572
652
  const e = {
573
653
  _id: i,
574
654
  populate: "templateId",
575
- isVisibleApp: !0
655
+ isVisibleApp: !0,
656
+ includePurchaseInfo: !0
576
657
  }, t = await this.fetchGallery(e), a = (s = t == null ? void 0 : t[0]) == null ? void 0 : s.templateId;
577
- return a ? (ye(a), new xe(a)) : null;
658
+ return a ? (_e(a), new ke(a)) : null;
578
659
  },
579
660
  onUseTemplate(i) {
580
661
  if (!i)
@@ -597,17 +678,23 @@ const Kt = jt.exports, Yt = {
597
678
  fortnoxCom: "/img/fortnox/apple-touch-icon-180x180.png"
598
679
  };
599
680
  this.$modal.show(
600
- Kt,
681
+ K1,
601
682
  {
602
683
  template: i,
684
+ fetchGallery: this.fetchGallery,
685
+ product: e.product,
686
+ galleryItemId: e.id,
603
687
  meta: {
604
688
  name: e.name,
605
689
  text: e.description,
606
- author: {
607
- name: this.$t("_common:brand.name"),
608
- avatar: t[f.brand],
609
- templatesCount: this.templateGalleryItems.length
610
- }
690
+ ...this.showTemplateAuthor ? {
691
+ // Only show author if enabled)
692
+ author: {
693
+ name: this.$t("_common:brand.name"),
694
+ avatar: t[f.brand],
695
+ templatesCount: this.templateGalleryItems.length
696
+ }
697
+ } : {}
611
698
  },
612
699
  ...this.modalProps
613
700
  },
@@ -646,25 +733,25 @@ const Kt = jt.exports, Yt = {
646
733
  selectGalleryItem: this.selectGalleryItem
647
734
  });
648
735
  }
649
- }, Qt = null, Jt = null;
650
- var Xt = /* @__PURE__ */ c(
651
- Yt,
652
- Qt,
653
- Jt,
736
+ }, Q1 = null, J1 = null;
737
+ var X1 = /* @__PURE__ */ c(
738
+ Y1,
739
+ Q1,
740
+ J1,
654
741
  !1,
655
742
  null,
656
743
  null,
657
744
  null,
658
745
  null
659
746
  );
660
- const e2 = Xt.exports;
747
+ const e2 = X1.exports;
661
748
  const t2 = {
662
749
  name: "DocumentIcon",
663
- truncate: we,
750
+ truncate: Le,
664
751
  inject: {
665
752
  components: {
666
753
  default: {
667
- BlockMedia: Ye
754
+ BlockMedia: et
668
755
  }
669
756
  }
670
757
  }
@@ -672,6 +759,7 @@ const t2 = {
672
759
  var i2 = function(e, t) {
673
760
  return e("div", t._b({ key: t.data.key, staticClass: "item", class: [
674
761
  t.data.staticClass,
762
+ t.data.class,
675
763
  {
676
764
  "is-placeholder": t.props.isPlaceholder,
677
765
  "is-add": t.props.isAdd,
@@ -681,14 +769,14 @@ var i2 = function(e, t) {
681
769
  t.listeners.click && t.listeners.click();
682
770
  } } }, "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: {
683
771
  backgroundImage: `url(${t.props.thumbnail})`
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)]);
772
+ } }) : 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.scopedSlots.badge ? e("div", { staticClass: "absolute right-2 bottom-2" }, [t._t("badge")], 2) : t._e(), 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)]);
685
773
  }, a2 = [], n2 = /* @__PURE__ */ c(
686
774
  t2,
687
775
  i2,
688
776
  a2,
689
777
  !0,
690
778
  null,
691
- "6b8b46e0",
779
+ "7ebb1c9a",
692
780
  null,
693
781
  null
694
782
  );
@@ -696,7 +784,7 @@ const s2 = n2.exports;
696
784
  const o2 = {
697
785
  name: "HorizontalScroll",
698
786
  components: {
699
- Simplebar: k
787
+ Simplebar: b
700
788
  },
701
789
  data() {
702
790
  return {
@@ -797,8 +885,8 @@ const p2 = {
797
885
  this.onLoadDocuments();
798
886
  },
799
887
  methods: {
800
- ...x({
801
- loadDocument: u.LOAD_DOCUMENT2
888
+ ...y({
889
+ loadDocument: m.LOAD_DOCUMENT2
802
890
  }),
803
891
  async onInput() {
804
892
  this.isLoading = !0, this.onLoadDocuments();
@@ -806,7 +894,7 @@ const p2 = {
806
894
  async fetchDocuments(i) {
807
895
  const e = this.query ? 180 : 90, t = {
808
896
  createdAt: {
809
- $gte: this.$formatDate(_e(/* @__PURE__ */ new Date(), e), "yyyy-MM-dd")
897
+ $gte: this.$formatDate($e(/* @__PURE__ */ new Date(), e), "yyyy-MM-dd")
810
898
  },
811
899
  // Only provide or if there is a search query to filter on
812
900
  ...this.query && {
@@ -821,7 +909,7 @@ const p2 = {
821
909
  }
822
910
  ]
823
911
  }
824
- }, { data: a } = await be.getAll({
912
+ }, { data: a } = await Se.getAll({
825
913
  lean: !0,
826
914
  filter: encodeURIComponent(JSON.stringify(t)),
827
915
  fields: "clients,data.name,createdAt",
@@ -831,7 +919,7 @@ const p2 = {
831
919
  }), { items: n = [] } = a || {};
832
920
  return n;
833
921
  },
834
- onLoadDocuments: B(async function() {
922
+ onLoadDocuments: M(async function() {
835
923
  this.isLoading = !0, this.hasItems = !0;
836
924
  const e = await this.fetchDocuments();
837
925
  (!e || !e.length) && (this.canFetchMore = !1), this.list = [...e || []], this.isLoading = !1;
@@ -889,7 +977,8 @@ const g2 = {
889
977
  cancel: "Avbryt"
890
978
  },
891
979
  icon: {
892
- tooltip: "Fler val"
980
+ tooltip: "Fler val",
981
+ freeTooltip: "Det här en gratismall som du kan använda obegränsat."
893
982
  }
894
983
  },
895
984
  en: {
@@ -906,18 +995,20 @@ const g2 = {
906
995
  cancel: "Cancel"
907
996
  },
908
997
  icon: {
909
- tooltip: "More options"
998
+ tooltip: "More options",
999
+ freeTooltip: "This is a template that you can use for free, without limitations."
910
1000
  }
911
1001
  }
912
1002
  }
913
1003
  },
914
- name: "DocumentFormSelect",
915
- mixins: [b],
1004
+ name: "TemplateSelector",
1005
+ mixins: [L],
916
1006
  components: {
917
1007
  HorizontalScroll: d2,
918
1008
  DocumentIcon: s2,
919
1009
  DocumentRecent: f2,
920
- GalleryLogic: e2
1010
+ GalleryLogic: e2,
1011
+ IsPremiumPreStep: I
921
1012
  },
922
1013
  props: {
923
1014
  // Used for creating documents form project/client views
@@ -945,9 +1036,17 @@ const g2 = {
945
1036
  type: Boolean,
946
1037
  default: !1
947
1038
  },
1039
+ showGalleryTemplateAuthor: {
1040
+ type: Boolean,
1041
+ default: !0
1042
+ },
948
1043
  listExpanded: {
949
1044
  type: Boolean,
950
1045
  default: !1
1046
+ },
1047
+ includePartnerTemplates: {
1048
+ type: Boolean,
1049
+ default: !1
951
1050
  }
952
1051
  },
953
1052
  data() {
@@ -958,6 +1057,7 @@ const g2 = {
958
1057
  },
959
1058
  computed: {
960
1059
  ...g({
1060
+ canFeature: "application/feature",
961
1061
  templateById: "templates/byId",
962
1062
  isFetchingTemplates: "templates/isFetching",
963
1063
  availableTemplates: "templates/availableTemplates",
@@ -979,7 +1079,7 @@ const g2 = {
979
1079
  },
980
1080
  myTemplates() {
981
1081
  const i = [...this.availableTemplates];
982
- return !i.length && this.isFetchingTemplates ? Array(5).fill({ placeholder: !0 }) : [{ id: "empty" }, ...i];
1082
+ return !i.length && this.isFetchingTemplates ? Array(5).fill({ placeholder: !0 }) : [{ id: "empty", doConsumeDocumentQuota: !0 }, ...i];
983
1083
  },
984
1084
  galleryModalProps() {
985
1085
  const { fSkatt: i, insurance: e } = this.companySettings;
@@ -998,16 +1098,15 @@ const g2 = {
998
1098
  this.loadTemplates();
999
1099
  },
1000
1100
  methods: {
1001
- ...x({
1002
- loadTemplatesAction: u.LOAD_TEMPLATES,
1003
- loadTemplate: u.LOAD_TEMPLATE,
1004
- createTemplate: u.DO_CREATE_TEMPLATE,
1005
- hideTemplate: u.HIDE_TEMPLATE,
1006
- deleteTemplate: u.DELETE_TEMPLATE
1101
+ ...y({
1102
+ loadTemplatesAction: m.LOAD_TEMPLATES,
1103
+ loadTemplate: m.LOAD_TEMPLATE,
1104
+ createTemplate: m.DO_CREATE_TEMPLATE,
1105
+ removeTemplate: m.REMOVE_TEMPLATE
1007
1106
  }),
1008
1107
  loadTemplates() {
1009
1108
  const i = {};
1010
- this.defaultLanguage && (i.sharedLanguage = this.defaultLanguage), this.loadTemplatesAction(i), this.isAuthenticatedCRM("hubspot") && this.loadTemplate({ id: "hubspot" });
1109
+ this.defaultLanguage && (i.sharedLanguage = this.defaultLanguage), this.includePartnerTemplates && (i.includePartnerTemplates = !0), this.loadTemplatesAction(i), this.isAuthenticatedCRM("hubspot") && this.loadTemplate({ id: "hubspot" });
1011
1110
  },
1012
1111
  select({ templateId: i, documentId: e, formData: t }) {
1013
1112
  return this.onUseTemplate({
@@ -1020,19 +1119,16 @@ const g2 = {
1020
1119
  },
1021
1120
  async saveTemplate(i) {
1022
1121
  try {
1023
- const { data: e } = i, t = ke(e, ["_id", "id", "companyId", "isVisible"]);
1122
+ const { data: e } = i, t = Te(e, ["_id", "id", "companyId", "isVisible"]);
1024
1123
  return await this.createTemplate({ body: t }), !0;
1025
1124
  } catch (e) {
1026
- $(e);
1125
+ S(e);
1027
1126
  }
1028
1127
  return !1;
1029
1128
  },
1030
- async onRemoveTemplate(i) {
1031
- i.companyId ? await this.deleteTemplate({ id: i.id }) : await this.hideTemplate({ id: i.id });
1032
- },
1033
1129
  async openTemplateFormModal({ document: i = null, template: e = null }) {
1034
1130
  this.$modal.show(
1035
- ie,
1131
+ ae,
1036
1132
  {
1037
1133
  document: i,
1038
1134
  template: e,
@@ -1049,28 +1145,41 @@ const g2 = {
1049
1145
  );
1050
1146
  },
1051
1147
  async fetchGallery(i = {}) {
1052
- const { data: e } = await Le.get(i);
1148
+ const { data: e } = await De.get(i);
1053
1149
  return e;
1150
+ },
1151
+ canUseTemplate(i) {
1152
+ return i.doConsumeDocumentQuota ? this.canFeature("editDocLayout") : !0;
1054
1153
  }
1055
1154
  }
1056
1155
  };
1057
1156
  var C2 = function() {
1058
1157
  var e = this, t = e._self._c;
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) {
1060
- e.isExpanded = !0;
1061
- } } }, e._l(e.myTemplates, function(a) {
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) {
1063
- a.placeholder || e.select({ templateId: a.id });
1064
- } } }, [t("CDropdown", { staticStyle: { top: "-8px", right: "-4px" }, attrs: { "append-to-body": "" }, nativeOn: { click: function(n) {
1065
- n.stopPropagation();
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) {
1069
- return e.openTemplateFormModal({ template: a });
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) {
1071
- return e.onRemoveTemplate(a);
1072
- } } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 1)], 1);
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({
1158
+ 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("IsPremiumPreStep", { attrs: { feature: "editDocumentLayout" }, scopedSlots: e._u([{ key: "default", fn: function({ onClick: a }) {
1159
+ return [t(e.isExpanded ? "div" : "HorizontalScroll", { tag: "component", staticClass: "template-list", class: { "is-expanded": e.isExpanded }, on: { expand: function(n) {
1160
+ e.isExpanded = !0;
1161
+ } } }, e._l(e.myTemplates, function(n) {
1162
+ return t("DocumentIcon", { key: n.id, staticClass: "template-item", attrs: { "is-add": n.id === "empty", "is-placeholder": n.placeholder, media: n.defaultMedia || e.fallbackMedia, thumbnail: n.thumbnailUrl, name: n.name }, on: { click: function(s) {
1163
+ n.placeholder || (e.canUseTemplate(n) ? e.select({ templateId: n.id }) : a());
1164
+ } } }, [e.canUseTemplate(n) ? !n.doConsumeDocumentQuota && !n.placeholder ? t("div", { staticClass: "text-[11px] h-5 capitalize font-semibold text-white bg-primary-500 rounded leading-none px-1.5 inline-flex items-center border border-primary-600 shadow-sm", attrs: { slot: "badge" }, slot: "badge" }, [e._v(" " + e._s(e.$t("_common:free")) + " ")]) : e._e() : t("div", { staticClass: "inline-flex items-center h-5 gap-1 px-1 leading-none bg-gray-200 border border-gray-300 rounded shadow-sm text-gray-500/90", attrs: { slot: "badge" }, slot: "badge" }, [t("BaseIcon", { attrs: { type: "lock", size: "12", "stroke-width": "2.5" } }), t("div", { staticClass: "text-[11px] font-semibold" }, [e._v("Pro")])], 1), n.onModify === "create" && !n.doConsumeDocumentQuota ? t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
1165
+ content: e.$t("icon.freeTooltip"),
1166
+ placement: "bottom"
1167
+ }, expression: `{
1168
+ content: $t('icon.freeTooltip'),
1169
+ placement: 'bottom'
1170
+ }` }], staticStyle: { top: "-8px", right: "-4px" }, attrs: { icon: "info", type: "none", pattern: "tertiary", size: "small" }, nativeOn: { click: function(s) {
1171
+ s.stopPropagation();
1172
+ } } }) : t("CDropdown", { staticStyle: { top: "-8px", right: "-4px" }, attrs: { "append-to-body": "" }, nativeOn: { click: function(s) {
1173
+ s.stopPropagation();
1174
+ } } }, [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(s) {
1175
+ return e.onEditTemplate(n.id);
1176
+ } } }, [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(s) {
1177
+ return e.openTemplateFormModal({ template: n });
1178
+ } } }, [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(s) {
1179
+ return e.removeTemplate({ template: n });
1180
+ } } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 1)], 1);
1181
+ }), 1)];
1182
+ } }]) })], 1), e.showGallery ? [t("GalleryLogic", { attrs: { "fetch-gallery": e.fetchGallery, "use-template": e.select, "show-template-author": e.showGalleryTemplateAuthor, "modal-props": e.galleryModalProps }, scopedSlots: e._u([{ key: "default", fn: function({
1074
1183
  galleryItems: a,
1075
1184
  categories: n,
1076
1185
  activeCategory: s,
@@ -1086,16 +1195,16 @@ var C2 = function() {
1086
1195
  })], 2)], 1), t("HorizontalScroll", { staticClass: "template-list" }, e._l(a, function(r) {
1087
1196
  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) {
1088
1197
  r.placeholder || l(r);
1089
- } } });
1198
+ } } }, [r.product ? t("div", { staticClass: "p-1 text-xs font-semibold leading-none text-white border rounded shadow-lg bg-primary-500 border-primary-700/40", attrs: { slot: "badge" }, slot: "badge" }, [r.product.isPurchased ? t("BaseIcon", { attrs: { type: "check", size: "14", "stroke-width": "3" } }) : t("div", { domProps: { textContent: e._s(r.product.price) } })], 1) : e._e()]);
1090
1199
  }), 1)], 1)];
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)]);
1200
+ } }], null, !1, 4229824708) })] : 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
1201
  }, v2 = [], y2 = /* @__PURE__ */ c(
1093
1202
  g2,
1094
1203
  C2,
1095
1204
  v2,
1096
1205
  !1,
1097
1206
  null,
1098
- "1eb8b257",
1207
+ "b0c014da",
1099
1208
  null,
1100
1209
  null
1101
1210
  );
@@ -1122,7 +1231,7 @@ const w2 = (i) => {
1122
1231
  nodeId: e[1]
1123
1232
  }
1124
1233
  ];
1125
- }, _2 = (i, e = "en") => [
1234
+ }, b2 = (i, e = "en") => [
1126
1235
  { key: `title-${i}`, anyOf: [{ type: "string" }, { type: "null" }], defaultValue: h.t("attachment_plural", { lng: e }).capitalize() },
1127
1236
  {
1128
1237
  key: `files-${i}`,
@@ -1131,11 +1240,11 @@ const w2 = (i) => {
1131
1240
  $ref: `${f.api.baseUrl}/schemas/file/1.json`
1132
1241
  }
1133
1242
  }
1134
- ], b2 = ({ document: i = null }) => {
1243
+ ], _2 = ({ document: i = null }) => {
1135
1244
  const e = d(), { language: t } = i || {};
1136
1245
  return {
1137
1246
  readView: w2(e),
1138
- validation: _2(e, t)
1247
+ validation: b2(e, t)
1139
1248
  };
1140
1249
  }, k2 = () => [
1141
1250
  {
@@ -1178,7 +1287,7 @@ const w2 = (i) => {
1178
1287
  anyOf: [{ type: "string" }, { type: "null" }],
1179
1288
  defaultValue: h.t("components:document.chapters.multiGroupPricing.title", { lng: i })
1180
1289
  }
1181
- ], V2 = ({ document: i = null }) => {
1290
+ ], T2 = ({ document: i = null }) => {
1182
1291
  const { language: e } = i || {};
1183
1292
  return {
1184
1293
  readView: $2(),
@@ -1202,7 +1311,7 @@ const w2 = (i) => {
1202
1311
  parentId: "0",
1203
1312
  nodeId: d()
1204
1313
  }
1205
- ], T2 = () => [
1314
+ ], V2 = () => [
1206
1315
  {
1207
1316
  key: "terms",
1208
1317
  anyOf: [
@@ -1210,10 +1319,10 @@ const w2 = (i) => {
1210
1319
  { type: "null" }
1211
1320
  ]
1212
1321
  }
1213
- ], M2 = () => ({
1322
+ ], B2 = () => ({
1214
1323
  readView: D2(),
1215
- validation: T2()
1216
- }), B2 = () => {
1324
+ validation: V2()
1325
+ }), M2 = () => {
1217
1326
  const i = Array(5).fill().map(() => d());
1218
1327
  return [
1219
1328
  {
@@ -1280,7 +1389,7 @@ const w2 = (i) => {
1280
1389
  const { language: a } = e || {};
1281
1390
  let n = null;
1282
1391
  return typeof t == "function" ? n = t() : i && (n = I2()), {
1283
- readView: B2(),
1392
+ readView: M2(),
1284
1393
  validation: F2(a),
1285
1394
  // Client / company will for now always exist on doc and in validation
1286
1395
  ...n && { data: n }
@@ -1862,7 +1971,7 @@ const w2 = (i) => {
1862
1971
  background: o,
1863
1972
  priceSummaryBackground: l,
1864
1973
  backgroundFilter: r
1865
- } = n || {}, p = l || "hsl(228, 52%, 18%)", C = e1.readability(p, "#fff") < 1.8 ? "#111111" : "#FFFFFF";
1974
+ } = n || {}, p = l || "hsl(228, 52%, 18%)", C = at.readability(p, "#fff") < 1.8 ? "#111111" : "#FFFFFF";
1866
1975
  return [
1867
1976
  {
1868
1977
  key: `header-${i}`,
@@ -2388,7 +2497,7 @@ const gi = ({
2388
2497
  _getters: t,
2389
2498
  allArticles: a = []
2390
2499
  } = {}) => {
2391
- const n = m(t, "settings/defaultVatRate") || null, s = !m(t, "settings/hidePriceOnNewlyAddedArticles"), o = (l) => h.t(`packageGroupContentItems:${l}`, { lng: i });
2500
+ const n = u(t, "settings/defaultVatRate") || null, s = !u(t, "settings/hidePriceOnNewlyAddedArticles"), o = (l) => h.t(`packageGroupContentItems:${l}`, { lng: i });
2392
2501
  return [
2393
2502
  {
2394
2503
  previewUrl: `
@@ -2455,7 +2564,7 @@ const gi = ({
2455
2564
  },
2456
2565
  articles: [
2457
2566
  ...a,
2458
- y({
2567
+ x({
2459
2568
  vat: n,
2460
2569
  showPrice: s,
2461
2570
  currency: e,
@@ -2584,7 +2693,7 @@ const gi = ({
2584
2693
  },
2585
2694
  articles: [
2586
2695
  ...a,
2587
- y({
2696
+ x({
2588
2697
  vat: n,
2589
2698
  showPrice: s,
2590
2699
  currency: e,
@@ -2592,7 +2701,7 @@ const gi = ({
2592
2701
  name: o("radio.artA"),
2593
2702
  price: 1e5
2594
2703
  }),
2595
- y({
2704
+ x({
2596
2705
  vat: n,
2597
2706
  showPrice: s,
2598
2707
  currency: e,
@@ -2718,7 +2827,7 @@ const gi = ({
2718
2827
  },
2719
2828
  articles: [
2720
2829
  ...a,
2721
- y({
2830
+ x({
2722
2831
  vat: n,
2723
2832
  showPrice: s,
2724
2833
  currency: e,
@@ -2726,7 +2835,7 @@ const gi = ({
2726
2835
  name: o("checkbox.artBase"),
2727
2836
  price: 1e5
2728
2837
  }),
2729
- y({
2838
+ x({
2730
2839
  vat: n,
2731
2840
  showPrice: s,
2732
2841
  currency: e,
@@ -3074,7 +3183,7 @@ const wi = ({ language: i = "en" } = {}) => [
3074
3183
  }
3075
3184
  })
3076
3185
  }
3077
- ], _i = (i) => [
3186
+ ], bi = (i) => [
3078
3187
  {
3079
3188
  itemId: "videoPlayer",
3080
3189
  itemType: "videoPlayer",
@@ -3087,7 +3196,7 @@ const wi = ({ language: i = "en" } = {}) => [
3087
3196
  parentId: "0",
3088
3197
  nodeId: d()
3089
3198
  }
3090
- ], bi = (i) => [
3199
+ ], _i = (i) => [
3091
3200
  {
3092
3201
  key: `video-${i}`,
3093
3202
  $ref: `${f.api.baseUrl}/schemas/videoPlayer/1.json`,
@@ -3111,8 +3220,8 @@ const wi = ({ language: i = "en" } = {}) => [
3111
3220
  const t = d();
3112
3221
  let a = null;
3113
3222
  return typeof e == "function" ? a = e(t) : i && (a = ki(t)), {
3114
- readView: _i(t),
3115
- validation: bi(t),
3223
+ readView: bi(t),
3224
+ validation: _i(t),
3116
3225
  ...a && { data: a }
3117
3226
  };
3118
3227
  }, $i = ({ language: i = "en" } = {}) => [
@@ -3316,20 +3425,20 @@ const wi = ({ language: i = "en" } = {}) => [
3316
3425
  }
3317
3426
  })
3318
3427
  }
3319
- ], Z = {
3428
+ ], O = {
3320
3429
  titleAndText2: ti,
3321
- attachments2: b2,
3322
- pdf: $e,
3430
+ attachments2: _2,
3431
+ pdf: Ve,
3323
3432
  packageGroup: fi,
3324
- multiGroupPricing: V2,
3433
+ multiGroupPricing: T2,
3325
3434
  coverBlock: si,
3326
3435
  videoPlayer: Li,
3327
3436
  embed: xi,
3328
3437
  header: di,
3329
- answer: Se,
3330
- terms: M2,
3438
+ answer: Be,
3439
+ terms: B2,
3331
3440
  parties: H2,
3332
- custom: Xe,
3441
+ custom: it,
3333
3442
  // legacy
3334
3443
  presentation: L2,
3335
3444
  estimatedTimeCompleted: z2,
@@ -3337,13 +3446,13 @@ const wi = ({ language: i = "en" } = {}) => [
3337
3446
  extraWorkConstructionPricingList: W2,
3338
3447
  extraWorkTimeImpactText: j2,
3339
3448
  notBinding: Q2
3340
- }, O = {
3449
+ }, R = {
3341
3450
  coverBlock: oi,
3342
3451
  header: pi,
3343
3452
  packageGroup: gi,
3344
3453
  embed: wi,
3345
3454
  videoPlayer: $i,
3346
- custom: Je
3455
+ custom: tt
3347
3456
  }, Si = {
3348
3457
  name: "AddBlock",
3349
3458
  props: {
@@ -3358,20 +3467,20 @@ const wi = ({ language: i = "en" } = {}) => [
3358
3467
  },
3359
3468
  render() {
3360
3469
  return this.$scopedSlots.default({
3361
- addBlock: (i) => Ve({
3470
+ addBlock: (i) => Me({
3362
3471
  ...i,
3363
3472
  set: this.set,
3364
- tplGenerators: Z,
3473
+ tplGenerators: O,
3365
3474
  includeMockData: this.includeMockData,
3366
3475
  emit: (...e) => this.$emit(...e)
3367
3476
  }),
3368
- getBlockPayload: (i) => De(i, this.set, Z, this.includeMockdata)
3477
+ getBlockPayload: (i) => Ie(i, this.set, O, this.includeMockdata)
3369
3478
  });
3370
3479
  }
3371
- }, Vi = null, Di = null;
3372
- var Ti = /* @__PURE__ */ c(
3480
+ }, Ti = null, Di = null;
3481
+ var Vi = /* @__PURE__ */ c(
3373
3482
  Si,
3374
- Vi,
3483
+ Ti,
3375
3484
  Di,
3376
3485
  !1,
3377
3486
  null,
@@ -3379,8 +3488,8 @@ var Ti = /* @__PURE__ */ c(
3379
3488
  null,
3380
3489
  null
3381
3490
  );
3382
- const ae = Ti.exports;
3383
- const Mi = {
3491
+ const se = Vi.exports;
3492
+ const Bi = {
3384
3493
  name: "Drawer",
3385
3494
  props: {
3386
3495
  value: {
@@ -3423,7 +3532,7 @@ const Mi = {
3423
3532
  }
3424
3533
  }
3425
3534
  };
3426
- var Bi = function() {
3535
+ var Mi = function() {
3427
3536
  var e = this, t = e._self._c;
3428
3537
  return t("div", [t("transition", { attrs: { name: "fade" } }, [!e.hideOverlay && e.value ? t("div", { staticClass: "d-overlay", style: {
3429
3538
  zIndex: e.zIndex
@@ -3440,8 +3549,8 @@ var Bi = function() {
3440
3549
  ...e.contentStyle
3441
3550
  } }, [e._t("default")], 2)]) : e._e()])], 1);
3442
3551
  }, Ii = [], Fi = /* @__PURE__ */ c(
3443
- Mi,
3444
3552
  Bi,
3553
+ Mi,
3445
3554
  Ii,
3446
3555
  !1,
3447
3556
  null,
@@ -3449,7 +3558,7 @@ var Bi = function() {
3449
3558
  null,
3450
3559
  null
3451
3560
  );
3452
- const ne = Fi.exports;
3561
+ const oe = Fi.exports;
3453
3562
  const Hi = {
3454
3563
  name: "DocumentSend",
3455
3564
  i18nOptions: {
@@ -3474,19 +3583,19 @@ const Hi = {
3474
3583
  }
3475
3584
  },
3476
3585
  components: {
3477
- AddBlock: ae,
3478
- Drawer: ne,
3479
- SendForm: t1,
3480
- CCheckbox: Te,
3481
- BaseIcon: Me,
3482
- CButton: Be
3586
+ AddBlock: se,
3587
+ Drawer: oe,
3588
+ SendForm: nt,
3589
+ CCheckbox: Fe,
3590
+ BaseIcon: He,
3591
+ CButton: Ae
3483
3592
  },
3484
3593
  mixins: [
3485
- L([], {
3594
+ $([], {
3486
3595
  useEmit: !1,
3487
3596
  setFnName: "setFormValue"
3488
3597
  }),
3489
- b
3598
+ L
3490
3599
  ],
3491
3600
  props: {
3492
3601
  setFormValue: {
@@ -3524,7 +3633,7 @@ const Hi = {
3524
3633
  return !!(this.viewSettings && this.viewSettings.isPublicForm);
3525
3634
  },
3526
3635
  hasAnswerBlock() {
3527
- return (m(this._document, "template.views.read.nodes") || []).some((e) => e.itemType === "answer");
3636
+ return (u(this._document, "template.views.read.nodes") || []).some((e) => e.itemType === "answer");
3528
3637
  }
3529
3638
  },
3530
3639
  watch: {
@@ -3540,8 +3649,8 @@ const Hi = {
3540
3649
  !this.isPublicForm && ((i = window.App) != null && i.$fab) && (window.App.$fab.show = !0);
3541
3650
  },
3542
3651
  methods: {
3543
- ...x({
3544
- createTemplate: u.DO_CREATE_TEMPLATE
3652
+ ...y({
3653
+ createTemplate: m.DO_CREATE_TEMPLATE
3545
3654
  }),
3546
3655
  open() {
3547
3656
  this.isOpen = !0;
@@ -3551,7 +3660,7 @@ const Hi = {
3551
3660
  return;
3552
3661
  const i = {
3553
3662
  ...this._document.copyTemplateDocDefault(),
3554
- name: m(this._document, "name") || this.$t("_common:untitled"),
3663
+ name: u(this._document, "name") || this.$t("_common:untitled"),
3555
3664
  _id: void 0,
3556
3665
  id: void 0,
3557
3666
  isVisible: !0
@@ -3667,7 +3776,7 @@ var qi = function() {
3667
3776
  null,
3668
3777
  null
3669
3778
  );
3670
- const se = ji.exports;
3779
+ const le = ji.exports;
3671
3780
  const Ki = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ki), Yi = {
3672
3781
  i18nOptions: {
3673
3782
  namespaces: "common",
@@ -3675,11 +3784,11 @@ const Ki = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ki), Yi = {
3675
3784
  },
3676
3785
  name: "Design",
3677
3786
  components: {
3678
- FormInputRow: J,
3679
- DragWindow: se
3787
+ FormInputRow: X,
3788
+ DragWindow: le
3680
3789
  },
3681
3790
  mixins: [
3682
- L(
3791
+ $(
3683
3792
  ["css"],
3684
3793
  { useEmit: !1, setFnName: "set" }
3685
3794
  )
@@ -3748,7 +3857,7 @@ const Ki = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ki), Yi = {
3748
3857
  // Dynamic depending on font family
3749
3858
  definitionOptions: {
3750
3859
  fontFamily: ({ key: i, value: e }) => {
3751
- const t = m(this.css, `${this.activeItem.selector}.fontWeight`) || m(this.activeItem, "style.fontWeight") || "400";
3860
+ const t = u(this.css, `${this.activeItem.selector}.fontWeight`) || u(this.activeItem, "style.fontWeight") || "400";
3752
3861
  return {
3753
3862
  label: this.$t("font"),
3754
3863
  inputs: [
@@ -3765,7 +3874,7 @@ const Ki = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ki), Yi = {
3765
3874
  weight: n,
3766
3875
  options: s = []
3767
3876
  }) => {
3768
- this.update(i, a), We(a), t != n && this.update("fontWeight", n), this.fontWeightOptions = s;
3877
+ this.update(i, a), Ke(a), t != n && this.update("fontWeight", n), this.fontWeightOptions = s;
3769
3878
  }
3770
3879
  }
3771
3880
  ]
@@ -4200,7 +4309,7 @@ const Ki = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ki), Yi = {
4200
4309
  activeItemOptions() {
4201
4310
  if (!this.activeItem)
4202
4311
  return [];
4203
- const { selector: i, category: e, style: t = {} } = this.activeItem, a = m(this.css, i) || {}, n = (s) => a[s] || t[s];
4312
+ const { selector: i, category: e, style: t = {} } = this.activeItem, a = u(this.css, i) || {}, n = (s) => a[s] || t[s];
4204
4313
  return this[e].map(({ option: s, key: o }, l) => {
4205
4314
  const r = this.definitionOptions[s], p = Array.isArray(o) ? o.map((C) => ({ key: C, value: n(C) })) : { key: o, value: n(o) };
4206
4315
  return r(p, l);
@@ -4209,8 +4318,8 @@ const Ki = /([\d+.]*)(.*)/, w = (i) => (i || "").match(Ki), Yi = {
4209
4318
  },
4210
4319
  watch: {
4211
4320
  async activeItem(i) {
4212
- const e = m(i, "style.fontFamily");
4213
- e && (this.fontWeightOptions = await qe(e));
4321
+ const e = u(i, "style.fontFamily");
4322
+ e && (this.fontWeightOptions = await Ye(e));
4214
4323
  }
4215
4324
  },
4216
4325
  methods: {
@@ -4286,7 +4395,7 @@ const ta = {
4286
4395
  }
4287
4396
  },
4288
4397
  components: {
4289
- CField: Q
4398
+ CField: J
4290
4399
  },
4291
4400
  props: {
4292
4401
  document: {
@@ -4317,12 +4426,12 @@ const ta = {
4317
4426
  validations: {
4318
4427
  form: {
4319
4428
  label: {
4320
- required: M.required,
4429
+ required: B.required,
4321
4430
  isUniqueLabel(i) {
4322
4431
  return this.fields.reduce((t, { label: a }) => a === i ? !1 : t, !0);
4323
4432
  }
4324
4433
  },
4325
- value: { required: M.required }
4434
+ value: { required: B.required }
4326
4435
  }
4327
4436
  },
4328
4437
  computed: {
@@ -4342,7 +4451,7 @@ const ta = {
4342
4451
  },
4343
4452
  created() {
4344
4453
  if (this.existingFieldId) {
4345
- const i = m(this.document, `fields.${this.existingFieldId}`);
4454
+ const i = u(this.document, `fields.${this.existingFieldId}`);
4346
4455
  i && (this.form = { ...this.form, ...i });
4347
4456
  }
4348
4457
  },
@@ -4362,7 +4471,7 @@ const ta = {
4362
4471
  remove() {
4363
4472
  if (!this.existingFieldId)
4364
4473
  return;
4365
- const i = l1(this.document.fields, [this.existingFieldId]);
4474
+ const i = dt(this.document.fields, [this.existingFieldId]);
4366
4475
  this.set({ key: "data.fields", value: i }), this.$emit("close");
4367
4476
  }
4368
4477
  }
@@ -4413,11 +4522,11 @@ const oa = {
4413
4522
  },
4414
4523
  name: "DocumentFormFields",
4415
4524
  components: {
4416
- SmartList: o1,
4417
- CAccordion: Qe,
4418
- CField: Q
4525
+ SmartList: ct,
4526
+ CAccordion: Ne,
4527
+ CField: J
4419
4528
  },
4420
- mixins: [L()],
4529
+ mixins: [$()],
4421
4530
  props: {
4422
4531
  set: {
4423
4532
  type: Function,
@@ -4511,7 +4620,7 @@ const oa = {
4511
4620
  );
4512
4621
  },
4513
4622
  onCopyField(i) {
4514
- navigator && navigator.clipboard && i && navigator.clipboard.writeText(i).then(() => q("info", this.$t("_common:copyMessage"))).catch((e) => $(e));
4623
+ navigator && navigator.clipboard && i && navigator.clipboard.writeText(i).then(() => j("info", this.$t("_common:copyMessage"))).catch((e) => S(e));
4515
4624
  },
4516
4625
  filterMethod(i, e) {
4517
4626
  return e.filter((t) => t.label.toLowerCase().includes(i.toLowerCase()));
@@ -4524,7 +4633,7 @@ const oa = {
4524
4633
  };
4525
4634
  var la = function() {
4526
4635
  var e = this, t = e._self._c;
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) {
4636
+ return t("div", { 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) {
4528
4637
  e.query = a;
4529
4638
  }, expression: "query" } }), e.query ? t("div", { staticStyle: { "margin-top": "15px", "padding-top": "15px", "border-top": "1px solid hsl(0, 0%, 88%)" } }, [t("SmartList", { attrs: { items: e.options, "filter-method": e.filterMethod, query: e.query }, scopedSlots: e._u([{ key: "default", fn: function({ items: a }) {
4530
4639
  return t("div", {}, [a.length ? e._l(a, function(n, s) {
@@ -4573,7 +4682,7 @@ var la = function() {
4573
4682
  ra,
4574
4683
  !1,
4575
4684
  null,
4576
- "ef9c2946",
4685
+ "9a0b5b61",
4577
4686
  null,
4578
4687
  null
4579
4688
  );
@@ -4621,10 +4730,10 @@ const pa = {
4621
4730
  },
4622
4731
  name: "ExtensionTab",
4623
4732
  components: {
4624
- draggable: r1,
4625
- Spinner: Ie
4733
+ draggable: pt,
4734
+ Spinner: Pe
4626
4735
  },
4627
- mixins: [L([
4736
+ mixins: [$([
4628
4737
  "externalReferences",
4629
4738
  "clients",
4630
4739
  "articles"
@@ -4678,7 +4787,7 @@ const pa = {
4678
4787
  }
4679
4788
  },
4680
4789
  methods: {
4681
- priceFormat: Fe,
4790
+ priceFormat: q,
4682
4791
  async _search(i) {
4683
4792
  try {
4684
4793
  this.isSearching = !0;
@@ -4697,7 +4806,7 @@ const pa = {
4697
4806
  this.isSearching = !1;
4698
4807
  }
4699
4808
  },
4700
- search: B(async function(e) {
4809
+ search: M(async function(e) {
4701
4810
  await this._search(e);
4702
4811
  }, 750),
4703
4812
  useSearchResult(i) {
@@ -4739,7 +4848,7 @@ const pa = {
4739
4848
  const { service: i, type: e, typeId: t } = this.currentExternalDeal, { data: a } = await _.suggestClients(i, { type: e, typeId: t });
4740
4849
  if (Array.isArray(a) && a.length) {
4741
4850
  const s = (n = this._document) == null ? void 0 : n.defaultAnswerMethod, o = a.map((l) => ({
4742
- ...He(),
4851
+ ...Ee(),
4743
4852
  ...s && { answerMethod: s },
4744
4853
  ...l
4745
4854
  }));
@@ -4747,7 +4856,7 @@ const pa = {
4747
4856
  }
4748
4857
  },
4749
4858
  cloneArticle(i) {
4750
- return y({
4859
+ return x({
4751
4860
  ...i,
4752
4861
  _uniqueId: void 0
4753
4862
  });
@@ -4757,7 +4866,7 @@ const pa = {
4757
4866
  const [e] = ((n = (a = this._document) == null ? void 0 : a.packageGroups) == null ? void 0 : n.packages) || [];
4758
4867
  if (!(e != null && e.packageId))
4759
4868
  return;
4760
- const t = y({
4869
+ const t = x({
4761
4870
  ...i,
4762
4871
  _uniqueId: void 0,
4763
4872
  packageId: e.packageId
@@ -4899,8 +5008,8 @@ const ga = {
4899
5008
  },
4900
5009
  name: "DocumentGeneralSettings",
4901
5010
  components: {
4902
- FormInputRow: J,
4903
- DragWindow: se
5011
+ FormInputRow: X,
5012
+ DragWindow: le
4904
5013
  },
4905
5014
  props: {
4906
5015
  offset: {
@@ -4908,7 +5017,7 @@ const ga = {
4908
5017
  required: !0
4909
5018
  }
4910
5019
  },
4911
- mixins: [L([
5020
+ mixins: [$([
4912
5021
  "tags",
4913
5022
  "series",
4914
5023
  "senderId",
@@ -4939,7 +5048,7 @@ const ga = {
4939
5048
  vatTypes() {
4940
5049
  var e;
4941
5050
  const i = ["vat"];
4942
- return ((e = Ae[f.brand]) == null ? void 0 : e.defaultRegion) === "US" && i.push("tax"), i;
5051
+ return ((e = ze[f.brand]) == null ? void 0 : e.defaultRegion) === "US" && i.push("tax"), i;
4943
5052
  },
4944
5053
  options() {
4945
5054
  return [
@@ -4965,7 +5074,7 @@ const ga = {
4965
5074
  component: "select",
4966
5075
  props: {
4967
5076
  value: this.language,
4968
- options: Pe.map((i) => ({ value: i, label: this.$t(`iso:language.${i}`) })).sort((i, e) => i.label.localeCompare(e.label))
5077
+ options: Ze.map((i) => ({ value: i, label: this.$t(`iso:language.${i}`) })).sort((i, e) => i.label.localeCompare(e.label))
4969
5078
  },
4970
5079
  onInput: (i) => this.update("language", i)
4971
5080
  }
@@ -5098,8 +5207,8 @@ const ga = {
5098
5207
  this.isPublicForm || await this.loadUsers();
5099
5208
  },
5100
5209
  methods: {
5101
- ...x({
5102
- loadUsers: u.LOAD_COMPANY_USERS
5210
+ ...y({
5211
+ loadUsers: m.LOAD_COMPANY_USERS
5103
5212
  }),
5104
5213
  update(i, e) {
5105
5214
  this[i] = e;
@@ -5118,7 +5227,7 @@ const ga = {
5118
5227
  };
5119
5228
  var Ca = function() {
5120
5229
  var e = this, t = e._self._c;
5121
- return t("div", { staticClass: "d-scroll-container", staticStyle: { height: "100%", padding: "1em" } }, [e._l(e.options, function(a, n) {
5230
+ return t("div", { staticStyle: { height: "100%", padding: "1em" } }, [e._l(e.options, function(a, n) {
5122
5231
  return t("FormInputRow", { key: n, attrs: { label: a.label, "info-tooltip": a.infoTooltip, inputs: a.inputs } });
5123
5232
  }), e.showDragWindow ? t("DragWindow", { attrs: { offset: e.offset, title: e.$t("pricing.title") }, on: { close: function(a) {
5124
5233
  e.showDragWindow = !1;
@@ -5131,207 +5240,11 @@ var Ca = function() {
5131
5240
  va,
5132
5241
  !1,
5133
5242
  null,
5134
- "1601b625",
5243
+ "eec61e30",
5135
5244
  null,
5136
5245
  null
5137
5246
  );
5138
- const xa = ya.exports;
5139
- const wa = {
5140
- name: "DocumentGuide",
5141
- i18nOptions: {
5142
- namespaces: "documentGuide",
5143
- messages: {
5144
- en: {
5145
- title: "Quick tour",
5146
- steps: {
5147
- addBlocks: "Add document blocks from the left sidebar.",
5148
- textFormatting: "Select some text and formatting options will appear.",
5149
- editBlocks: `Adjust a block's appearance by clicking on the <span class="dg-button-icon appearance"></span> button.`,
5150
- changeProduct: `Change a product's quantity by clicking on the <span class="dg-button-icon cog"></span> button.`,
5151
- send: `Once you're done, hit <span class="dg-button-text">Send</span>`
5152
- }
5153
- },
5154
- sv: {
5155
- title: "Snabbguide",
5156
- steps: {
5157
- addBlocks: "Lägg till dokumentblock ifrån vänstra sidomenyn.",
5158
- textFormatting: "Markera en bit text för att få upp formateringsmenyn.",
5159
- editBlocks: 'Ändra utseendet på ett block genom att klicka på <span class="dg-button-icon appearance"></span> knappen.',
5160
- changeProduct: 'Ändra en varas antal genom att klicka på <span class="dg-button-icon cog"></span> knappen.',
5161
- send: 'När du är klar, klicka på <span class="dg-button-text">Skicka</span>'
5162
- }
5163
- }
5164
- }
5165
- },
5166
- data() {
5167
- return {
5168
- step: 0,
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
- }]
5185
- };
5186
- }
5187
- };
5188
- var _a = function() {
5189
- var e = this, t = e._self._c;
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 = {
5247
+ const xa = ya.exports, wa = {
5335
5248
  name: "MenuBlockConvertPopover",
5336
5249
  props: {
5337
5250
  target: {
@@ -5364,28 +5277,32 @@ const La = ka.exports, $a = {
5364
5277
  }
5365
5278
  }
5366
5279
  };
5367
- var Sa = function() {
5280
+ var ba = function() {
5368
5281
  var e = this, t = e._self._c;
5369
5282
  return t("div", [t("div", { staticClass: "fixed inset-0 z-10", on: { click: function(a) {
5370
5283
  return a.target !== a.currentTarget ? null : e.$emit("close");
5371
5284
  } } }), 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
5285
  return e.$emit("convert");
5373
5286
  } } }, [e._v(" " + e._s(e.$t("button")) + " ")])], 1)])], 1);
5374
- }, Va = [], Da = /* @__PURE__ */ c(
5375
- $a,
5376
- Sa,
5377
- Va,
5287
+ }, _a = [], ka = /* @__PURE__ */ c(
5288
+ wa,
5289
+ ba,
5290
+ _a,
5378
5291
  !1,
5379
5292
  null,
5380
5293
  null,
5381
5294
  null,
5382
5295
  null
5383
5296
  );
5384
- const Ta = Da.exports;
5385
- const Ma = {
5297
+ const La = ka.exports;
5298
+ const $a = k.component("ProBadge", {
5386
5299
  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 = {
5300
+ render(i) {
5301
+ return i("div", {
5302
+ staticClass: "text-[10px] font-semibold text-white bg-primary-500 rounded leading-none px-1.5 py-1"
5303
+ }, "Pro");
5304
+ }
5305
+ }), Sa = {
5389
5306
  name: "MenuBlocks",
5390
5307
  i18nOptions: {
5391
5308
  namespaces: "menuBlocks",
@@ -5455,13 +5372,13 @@ const Ma = {
5455
5372
  }
5456
5373
  },
5457
5374
  components: {
5458
- simplebar: k,
5459
- DragList: N,
5460
- DragItem: j,
5461
- AddBlock: ae,
5462
- IsPremiumPreStep: K,
5463
- ProBadge: Ma,
5464
- MenuBlockConvertPopover: Ta
5375
+ simplebar: b,
5376
+ DragList: K,
5377
+ DragItem: Y,
5378
+ AddBlock: se,
5379
+ IsPremiumPreStep: I,
5380
+ ProBadge: $a,
5381
+ MenuBlockConvertPopover: La
5465
5382
  },
5466
5383
  props: {
5467
5384
  _document: {
@@ -5485,7 +5402,7 @@ const Ma = {
5485
5402
  default: !0
5486
5403
  }
5487
5404
  },
5488
- mixins: [b],
5405
+ mixins: [L],
5489
5406
  data() {
5490
5407
  return {
5491
5408
  subMenuToShow: null,
@@ -5750,7 +5667,7 @@ const Ma = {
5750
5667
  }
5751
5668
  ];
5752
5669
  return i.forEach((e) => {
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);
5670
+ R[e.key] && (e.subMenu = (R[e.key](this._document || {}) || []).map((t) => ({ ...t, key: e.key, locked: e.locked }))), this.tooltips[e.key] && (e.hasTooltip = !0);
5754
5671
  }), i;
5755
5672
  },
5756
5673
  availableBlocks() {
@@ -5763,7 +5680,7 @@ const Ma = {
5763
5680
  return this.availableBlocks.filter(({ key: i }) => !this.primaryFilterNames.includes(i));
5764
5681
  },
5765
5682
  activeSubMenuKey() {
5766
- return m(this.activeSubMenu, "[0].key") || null;
5683
+ return u(this.activeSubMenu, "[0].key") || null;
5767
5684
  }
5768
5685
  // section key is added to each element in the menu
5769
5686
  },
@@ -5793,14 +5710,14 @@ const Ma = {
5793
5710
  });
5794
5711
  },
5795
5712
  deSyncTemplate() {
5796
- ["_id", "id"].forEach((i) => this.removeValue(`template.${i}`)), this.set({ key: "views.read.isEditable", value: !0 }), this.showConvertEditableDialog = !1;
5713
+ ["_id", "id"].forEach((i) => this.removeValue(`template.${i}`)), this.set({ key: "template.views.read.isEditable", value: !0 }), this.showConvertEditableDialog = !1;
5797
5714
  },
5798
5715
  createTooltips() {
5799
5716
  var n, s;
5800
5717
  if (this.mq === "sm")
5801
5718
  return;
5802
5719
  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;
5803
- this.tippyInstances = s1(this.$el, {
5720
+ this.tippyInstances = rt(this.$el, {
5804
5721
  target: "[data-tooltip-key]",
5805
5722
  allowHTML: !0,
5806
5723
  duration: [150, 0],
@@ -5825,7 +5742,7 @@ const Ma = {
5825
5742
  i.destroy();
5826
5743
  }) : this.tippyInstances.destroy && this.tippyInstances.destroy());
5827
5744
  },
5828
- setSubMenuState: B(function(e) {
5745
+ setSubMenuState: M(function(e) {
5829
5746
  this.activeSubMenu = e;
5830
5747
  }, 100, { trailing: !0 }),
5831
5748
  onMouseleaveDrawer() {
@@ -5839,7 +5756,7 @@ const Ma = {
5839
5756
  return !this.feature(`docBlock_${i}`);
5840
5757
  },
5841
5758
  doesBlockExist(i) {
5842
- return !!m(this._document, "_doc.template.views.read.nodes", []).find((t) => t.itemId.startsWith(i));
5759
+ return !!u(this._document, "_doc.template.views.read.nodes", []).find((t) => t.itemId.startsWith(i));
5843
5760
  },
5844
5761
  getGhostParent() {
5845
5762
  var t, a;
@@ -5859,7 +5776,7 @@ const Ma = {
5859
5776
  }
5860
5777
  }
5861
5778
  };
5862
- var Ia = function() {
5779
+ var Ta = function() {
5863
5780
  var e = this, t = e._self._c;
5864
5781
  return t("AddBlock", { attrs: { set: e.set }, on: { "block-added": function(a) {
5865
5782
  return e.$emit("block-added", a);
@@ -5893,23 +5810,23 @@ var Ia = function() {
5893
5810
  e.subMenuToShow = e.activeSubMenu;
5894
5811
  }, "&mouseleave": function(o) {
5895
5812
  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)]);
5813
+ } } }, [t("simplebar", { staticClass: "h-full py-4 pl-3", attrs: { "data-simplebar-auto-hide": "false" } }, [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) {
5814
+ return t("DragItem", { key: o.key + l, staticClass: "px-1.5", 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
5815
  }), 1)], 1)], 1)])], 1)];
5899
5816
  } }], null, !0) })];
5900
5817
  } }]) });
5901
- }, Fa = [], Ha = /* @__PURE__ */ c(
5902
- Ba,
5903
- Ia,
5904
- Fa,
5818
+ }, Da = [], Va = /* @__PURE__ */ c(
5819
+ Sa,
5820
+ Ta,
5821
+ Da,
5905
5822
  !1,
5906
5823
  null,
5907
- "4ce1e5ea",
5824
+ "7b99e10a",
5908
5825
  null,
5909
5826
  null
5910
5827
  );
5911
- const Aa = Ha.exports;
5912
- const Pa = {
5828
+ const Ba = Va.exports;
5829
+ const Ma = {
5913
5830
  name: "DocumentFormMenu",
5914
5831
  i18nOptions: {
5915
5832
  namespaces: "documentFormMenu",
@@ -5929,8 +5846,9 @@ const Pa = {
5929
5846
  Fields: da,
5930
5847
  ExtensionTab: fa,
5931
5848
  DocumentGeneralSettings: xa,
5932
- DocumentGuide: La,
5933
- MenuBlocks: Aa
5849
+ DocumentGuide: () => import("./index-9a5227ef.js"),
5850
+ MenuBlocks: Ba,
5851
+ Simplebar: b
5934
5852
  },
5935
5853
  props: {
5936
5854
  state: {
@@ -5970,7 +5888,7 @@ const Pa = {
5970
5888
  data() {
5971
5889
  return {
5972
5890
  showGuide: !1,
5973
- showGuideNotification: !I.getItem("hideFormGuideNotification"),
5891
+ showGuideNotification: !F.getItem("hideFormGuideNotification"),
5974
5892
  tab: "blocks"
5975
5893
  };
5976
5894
  },
@@ -5992,11 +5910,11 @@ const Pa = {
5992
5910
  },
5993
5911
  methods: {
5994
5912
  openGuide() {
5995
- this.showGuide = !0, this.showGuideNotification = !1, I.setItem("hideFormGuideNotification", !0);
5913
+ this.showGuide = !0, this.showGuideNotification = !1, F.setItem("hideFormGuideNotification", !0);
5996
5914
  }
5997
5915
  }
5998
5916
  };
5999
- var Ea = function() {
5917
+ var Ia = function() {
6000
5918
  var e = this, t = e._self._c;
6001
5919
  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
5920
  return e.$emit("close");
@@ -6014,15 +5932,15 @@ var Ea = function() {
6014
5932
  e.extensionTabType === "salesforce" && { backgroundColor: "#009CDB" }
6015
5933
  ] }, [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
5934
  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: {
5935
+ } } }, [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)]) : t("div", { staticClass: "menu-container" }, [t("Simplebar", { staticClass: "w-full h-full" }, [e.tab === "design" ? t("Design", { attrs: { _document: e.state, _value: {
6018
5936
  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: {
5937
+ }, set: e.set, offset: e.width } }) : e.tab === "fields" ? t("Fields", { attrs: { _document: e.state, "crm-service": e.extensionTabType, _value: {
6020
5938
  css: "data.css"
6021
- }, set: e.set } }) : e.tab === "extension" ? t("ExtensionTab", { staticClass: "menu-container", attrs: { _document: e.state, _value: {
5939
+ }, set: e.set } }) : e.tab === "extension" ? t("ExtensionTab", { attrs: { _document: e.state, _value: {
6022
5940
  externalReferences: "externalReferences",
6023
5941
  clients: "clients",
6024
5942
  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: {
5943
+ } }, on: { input: ({ key: a, value: n }) => e.set({ key: a, value: n }) } }) : e._e(), e.tab === "generalSettings" ? t("DocumentGeneralSettings", { class: { "!top-0 rounded-sm": e.isLegacyTemplate }, attrs: { _document: e.state, _value: {
6026
5944
  term: "data.terms",
6027
5945
  series: "docNumber.series",
6028
5946
  tags: "tags",
@@ -6032,59 +5950,78 @@ var Ea = function() {
6032
5950
  useVat: "data.formSettings.useVat",
6033
5951
  vatType: "data.formSettings.vatType",
6034
5952
  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) {
5953
+ }, offset: e.width }, on: { input: ({ key: a, value: n }) => e.set({ key: a, value: n }) } }) : e._e()], 1)], 1), e.showGuide ? t("DocumentGuide", { on: { close: function(a) {
6036
5954
  e.showGuide = !1;
6037
5955
  } } }) : e._e()], 1)])]);
6038
- }, za = [], Za = /* @__PURE__ */ c(
6039
- Pa,
6040
- Ea,
6041
- za,
5956
+ }, Fa = [], Ha = /* @__PURE__ */ c(
5957
+ Ma,
5958
+ Ia,
5959
+ Fa,
6042
5960
  !1,
6043
5961
  null,
6044
- "49f05ec2",
5962
+ "383e8c99",
6045
5963
  null,
6046
5964
  null
6047
5965
  );
6048
- const Oa = Za.exports;
6049
- const Ra = {
5966
+ const Aa = Ha.exports;
5967
+ const Pa = {
6050
5968
  name: "BlockControlButtons",
5969
+ i18nOptions: {
5970
+ namespace: "blockControlButtons",
5971
+ messages: {
5972
+ en: {
5973
+ hidden: "Hidden"
5974
+ },
5975
+ sv: {
5976
+ hidden: "Dold"
5977
+ }
5978
+ }
5979
+ },
6051
5980
  props: {
6052
5981
  isVisible: {
6053
5982
  type: [Boolean, Object],
6054
- default: !0
5983
+ default: void 0
6055
5984
  },
6056
5985
  isMovable: {
6057
5986
  type: Boolean,
6058
5987
  default: !0
6059
5988
  }
5989
+ },
5990
+ computed: {
5991
+ canToggleVisibility() {
5992
+ return typeof this.isVisible == "boolean";
5993
+ },
5994
+ isHidden() {
5995
+ return typeof this.isVisible == "boolean" && !this.isVisible;
5996
+ }
6060
5997
  }
6061
5998
  };
6062
- var Ga = function() {
5999
+ var Ea = function() {
6063
6000
  var e = this, t = e._self._c;
6064
- return t("div", { staticClass: "flex flex-col gap-1 control-root" }, [t("div", { staticClass: "control-button", on: { click: function(a) {
6001
+ return t("div", { staticClass: "flex flex-col gap-1 control-root" }, [e.canToggleVisibility ? t("div", { staticClass: "control-button", on: { click: function(a) {
6065
6002
  return e.$emit("toggle-visible", !e.isVisible);
6066
- } } }, [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.isVisible && e.isMovable ? [t("div", { staticClass: "control-direction" }, [t("div", { staticClass: "control-button", on: { click: function(a) {
6003
+ } } }, [e.isVisible ? e._e() : t("span", { staticClass: "px-1.5 text-xs text-gray-600" }, [e._v(" " + e._s(e.$t("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) {
6067
6004
  return e.$emit("move", "up");
6068
6005
  } } }, [t("BaseIcon", { attrs: { type: "chevron-up", size: "16" } })], 1), t("div", { staticClass: "control-button", on: { click: function(a) {
6069
6006
  return e.$emit("move", "down");
6070
6007
  } } }, [t("BaseIcon", { attrs: { type: "chevron-down", size: "16" } })], 1)]), t("div", { staticClass: "control-button remove", on: { click: function(a) {
6071
6008
  return e.$emit("remove");
6072
6009
  } } }, [t("BaseIcon", { attrs: { type: "x", size: "16" } })], 1)] : e._e()], 2);
6073
- }, Ua = [], Wa = /* @__PURE__ */ c(
6074
- Ra,
6075
- Ga,
6076
- Ua,
6010
+ }, za = [], Za = /* @__PURE__ */ c(
6011
+ Pa,
6012
+ Ea,
6013
+ za,
6077
6014
  !1,
6078
6015
  null,
6079
- "bfc946ab",
6016
+ "79921f13",
6080
6017
  null,
6081
6018
  null
6082
6019
  );
6083
- const qa = Wa.exports;
6084
- const Na = {
6020
+ const Oa = Za.exports;
6021
+ const Ra = {
6085
6022
  name: "DynamicBlock",
6086
6023
  components: {
6087
- BlockControlButtons: qa
6024
+ BlockControlButtons: Oa
6088
6025
  },
6089
6026
  props: {
6090
6027
  isDragging: {
@@ -6109,7 +6046,7 @@ const Na = {
6109
6046
  },
6110
6047
  isVisible: {
6111
6048
  type: [Boolean, Object],
6112
- default: !0
6049
+ default: void 0
6113
6050
  },
6114
6051
  disableControls: {
6115
6052
  type: Boolean,
@@ -6122,22 +6059,25 @@ const Na = {
6122
6059
  };
6123
6060
  },
6124
6061
  computed: {
6062
+ isHidden() {
6063
+ return typeof this.isVisible == "boolean" && !this.isVisible;
6064
+ },
6125
6065
  showControls() {
6126
- return this.disableControls ? !1 : !this.isDragging && this.isHovering ? !0 : !this.isVisible;
6066
+ return !this.isEditView || this.disableControls ? !1 : !this.isDragging && this.isHovering ? !0 : this.isHidden;
6127
6067
  },
6128
6068
  contentClass() {
6129
- return this.isVisible ? "" : "h-16 overflow-hidden after:bg-gradient-to-b after:from-white/50 after:to-white relative after:absolute after:content-[''] after:inset-0";
6069
+ 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 after:z-[1]" : "";
6130
6070
  }
6131
6071
  }
6132
6072
  };
6133
- var ja = function() {
6073
+ var Ga = function() {
6134
6074
  var e = this, t = e._self._c;
6135
- return t("Animation", { staticClass: "w-full" }, [e.isEditView || e.isVisible ? t("div", { staticClass: "block-root", class: [
6075
+ return t("Animation", { staticClass: "w-full" }, [t("div", { staticClass: "block-root", class: [
6136
6076
  {
6137
6077
  "is-edit-view": e.isEditView,
6138
6078
  "is-hovering": e.isHovering,
6139
- "min-h-none": e.blockType === "custom" || !e.isVisible,
6140
- "border-b border-gray-200": !e.isVisible
6079
+ "min-h-none": e.blockType === "custom" || e.isHidden,
6080
+ "border-b border-gray-200": e.isHidden
6141
6081
  },
6142
6082
  e.contentClass
6143
6083
  ], style: e.isDragging && {
@@ -6146,29 +6086,29 @@ var ja = function() {
6146
6086
  e.isHovering = !0;
6147
6087
  }, "&mouseleave": function(a) {
6148
6088
  e.isHovering = !1;
6149
- } } }, [t("div", { staticClass: "block-container", class: { "spacing-snug": !e.isVisible }, attrs: { inert: !e.isVisible } }, [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) {
6089
+ } } }, [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) {
6150
6090
  return e.$emit("toggle-visible", a);
6151
6091
  }, move: function(a) {
6152
6092
  return e.$emit("move", a);
6153
6093
  }, remove: function(a) {
6154
6094
  return e.$emit("remove");
6155
- } } }) : e._e()], 1) : e._e()]);
6156
- }, Ka = [], Ya = /* @__PURE__ */ c(
6157
- Na,
6158
- ja,
6159
- Ka,
6095
+ } } }) : e._e()], 1)]);
6096
+ }, Ua = [], Wa = /* @__PURE__ */ c(
6097
+ Ra,
6098
+ Ga,
6099
+ Ua,
6160
6100
  !1,
6161
6101
  null,
6162
- "af9f6b1e",
6102
+ "60aa95ad",
6163
6103
  null,
6164
6104
  null
6165
6105
  );
6166
- const Qa = Ya.exports;
6167
- const Ja = {
6106
+ const qa = Wa.exports;
6107
+ const Na = {
6168
6108
  name: "DocumentDrawer",
6169
6109
  components: {
6170
- simplebar: k,
6171
- Drawer: ne
6110
+ simplebar: b,
6111
+ Drawer: oe
6172
6112
  },
6173
6113
  props: {
6174
6114
  position: {
@@ -6190,7 +6130,7 @@ const Ja = {
6190
6130
  }
6191
6131
  }
6192
6132
  };
6193
- var Xa = function() {
6133
+ var ja = function() {
6194
6134
  var e = this, t = e._self._c;
6195
6135
  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: {
6196
6136
  "is-sticky": !e.fixed
@@ -6202,18 +6142,18 @@ var Xa = function() {
6202
6142
  padding: "calc(2.5 * var(--rem)) calc(1 * var(--rem)) calc(6 * var(--rem)) calc(1 * var(--rem))",
6203
6143
  ...e.fixedStyle
6204
6144
  } }, [e._t("default")], 2)])])]) : e._e()], 1);
6205
- }, en = [], tn = /* @__PURE__ */ c(
6206
- Ja,
6207
- Xa,
6208
- en,
6145
+ }, Ka = [], Ya = /* @__PURE__ */ c(
6146
+ Na,
6147
+ ja,
6148
+ Ka,
6209
6149
  !1,
6210
6150
  null,
6211
6151
  "f0a56edd",
6212
6152
  null,
6213
6153
  null
6214
6154
  );
6215
- const an = tn.exports;
6216
- const nn = {
6155
+ const Qa = Ya.exports;
6156
+ const Ja = {
6217
6157
  name: "DocumentFormViewRadio",
6218
6158
  props: {
6219
6159
  value: {
@@ -6226,24 +6166,24 @@ const nn = {
6226
6166
  }
6227
6167
  }
6228
6168
  };
6229
- var sn = function() {
6169
+ var Xa = function() {
6230
6170
  var e = this, t = e._self._c;
6231
6171
  return t("div", { staticClass: "nav-toggle font-inter" }, [t("div", { staticClass: "nav-toggle-button", class: { active: e.value === "edit" }, on: { click: function(a) {
6232
6172
  e.value === "preview" && e.$emit("input", "edit");
6233
6173
  } } }, [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) {
6234
6174
  e.value === "edit" && e.$emit("input", "preview");
6235
6175
  } } }, [e.small ? t("BaseIcon", { attrs: { type: "eye" } }) : [e._v(e._s(e.$t("preview")))]], 2)]);
6236
- }, on = [], ln = /* @__PURE__ */ c(
6237
- nn,
6238
- sn,
6239
- on,
6176
+ }, en = [], tn = /* @__PURE__ */ c(
6177
+ Ja,
6178
+ Xa,
6179
+ en,
6240
6180
  !1,
6241
6181
  null,
6242
6182
  "bfd27279",
6243
6183
  null,
6244
6184
  null
6245
6185
  );
6246
- const rn = ln.exports, cn = {
6186
+ const an = tn.exports, nn = {
6247
6187
  name: "LogoBanner",
6248
6188
  props: {
6249
6189
  position: {
@@ -6261,44 +6201,44 @@ const rn = ln.exports, cn = {
6261
6201
  }
6262
6202
  }
6263
6203
  };
6264
- var dn = function() {
6204
+ var sn = function() {
6265
6205
  var e = this, t = e._self._c;
6266
6206
  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")) + " ")])])]);
6267
- }, pn = [], un = /* @__PURE__ */ c(
6268
- cn,
6269
- dn,
6270
- pn,
6207
+ }, on = [], ln = /* @__PURE__ */ c(
6208
+ nn,
6209
+ sn,
6210
+ on,
6271
6211
  !1,
6272
6212
  null,
6273
6213
  null,
6274
6214
  null,
6275
6215
  null
6276
6216
  );
6277
- const mn = un.exports;
6278
- const hn = {
6217
+ const rn = ln.exports;
6218
+ const cn = {
6279
6219
  name: "DocumentFormNav"
6280
6220
  };
6281
- var fn = function() {
6221
+ var dn = function() {
6282
6222
  var e = this, t = e._self._c;
6283
6223
  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)])]);
6284
- }, gn = [], Cn = /* @__PURE__ */ c(
6285
- hn,
6286
- fn,
6287
- gn,
6224
+ }, pn = [], un = /* @__PURE__ */ c(
6225
+ cn,
6226
+ dn,
6227
+ pn,
6288
6228
  !1,
6289
6229
  null,
6290
6230
  "05fc111c",
6291
6231
  null,
6292
6232
  null
6293
6233
  );
6294
- const vn = Cn.exports;
6295
- const oe = (i, e, t = "$children") => {
6234
+ const mn = un.exports;
6235
+ const re = (i, e, t = "$children") => {
6296
6236
  if (!i)
6297
6237
  return;
6298
6238
  e(i);
6299
6239
  const a = i[t];
6300
- !a && !Array.isArray(a) || a.forEach((n) => oe(n, e));
6301
- }, yn = {
6240
+ !a && !Array.isArray(a) || a.forEach((n) => re(n, e));
6241
+ }, hn = {
6302
6242
  i18nOptions: {
6303
6243
  namespaces: "DocumentFormContainer",
6304
6244
  messages: {
@@ -6314,19 +6254,19 @@ const oe = (i, e, t = "$children") => {
6314
6254
  },
6315
6255
  name: "DocumentFormContainer",
6316
6256
  components: {
6317
- WithDimensions: Ne,
6318
- DragList: N,
6319
- DragItem: j,
6320
- DynamicChapter: je,
6321
- DocumentFormMenu: Oa,
6322
- DynamicBlock: Qa,
6323
- DocumentFormViewRadio: rn,
6324
- DocumentFormNav: vn,
6325
- DocumentDrawer: an,
6326
- DocumentStyleContainer: Ke,
6327
- simplebar: k,
6328
- LogoBanner: mn,
6329
- IsPremium: Y
6257
+ WithDimensions: Qe,
6258
+ DragList: K,
6259
+ DragItem: Y,
6260
+ DynamicChapter: Je,
6261
+ DocumentFormMenu: Aa,
6262
+ DynamicBlock: qa,
6263
+ DocumentFormViewRadio: an,
6264
+ DocumentFormNav: mn,
6265
+ DocumentDrawer: Qa,
6266
+ DocumentStyleContainer: Xe,
6267
+ simplebar: b,
6268
+ LogoBanner: rn,
6269
+ IsPremium: Q
6330
6270
  },
6331
6271
  props: {
6332
6272
  _document: {
@@ -6357,9 +6297,13 @@ const oe = (i, e, t = "$children") => {
6357
6297
  goBack: {
6358
6298
  type: Function,
6359
6299
  default: null
6300
+ },
6301
+ canShowBanner: {
6302
+ type: Boolean,
6303
+ default: !0
6360
6304
  }
6361
6305
  },
6362
- mixins: [b],
6306
+ mixins: [L],
6363
6307
  data() {
6364
6308
  return {
6365
6309
  drawerState: v,
@@ -6374,28 +6318,28 @@ const oe = (i, e, t = "$children") => {
6374
6318
  },
6375
6319
  computed: {
6376
6320
  docTemplate() {
6377
- return m(this._document, "template", null);
6321
+ return u(this._document, "template", null);
6378
6322
  },
6379
6323
  isTemplateEditable() {
6380
- return m(this.docTemplate, "views.read.isEditable", !1);
6324
+ return u(this.docTemplate, "views.read.isEditable", !1);
6381
6325
  },
6382
6326
  canMove() {
6383
- return this.isTemplateEditable;
6327
+ return this.isTemplateEditable && this.isEditView;
6384
6328
  },
6385
6329
  readLayout() {
6386
- return m(this.docTemplate, "views.read.nodes", []);
6330
+ return u(this.docTemplate, "views.read.nodes", []);
6387
6331
  },
6388
6332
  nestedReadLayout() {
6389
6333
  return this._document.getReadLayout({ showHiddenNodes: this.isEditView });
6390
6334
  },
6391
6335
  currency() {
6392
- return m(this._document, "currency");
6336
+ return u(this._document, "currency");
6393
6337
  },
6394
6338
  externalReferences() {
6395
- return m(this._document, "externalReferences") || [];
6339
+ return u(this._document, "externalReferences") || [];
6396
6340
  },
6397
6341
  headingColor() {
6398
- return m(this._document, "theme.headingColor");
6342
+ return u(this._document, "theme.headingColor");
6399
6343
  },
6400
6344
  isEditView() {
6401
6345
  return this.view === "edit";
@@ -6450,7 +6394,7 @@ const oe = (i, e, t = "$children") => {
6450
6394
  },
6451
6395
  methods: {
6452
6396
  onAddBlockMount(i, e) {
6453
- !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]);
6397
+ !this.onAddRedis[i] || !e || (e.$el && this.$nextTick(() => ut(e.$el, { offset: 100 })), typeof e[this.onAddRedis[i]] == "function" && e[this.onAddRedis[i]](), delete this.onAddRedis[i]);
6454
6398
  },
6455
6399
  onBlockToggleVisible(i, e) {
6456
6400
  const a = [...this.readLayout].findIndex(
@@ -6471,7 +6415,7 @@ const oe = (i, e, t = "$children") => {
6471
6415
  const a = i.itemId.split("-")[1];
6472
6416
  this.removePackageGroup(a);
6473
6417
  } else
6474
- oe(i, (n) => {
6418
+ re(i, (n) => {
6475
6419
  n.value && Object.values(n.value).forEach((s) => {
6476
6420
  this.removeFormKeyValue(`${s}`);
6477
6421
  let o = s.replace(/^data.(?!properties)/g, "data.properties.");
@@ -6491,17 +6435,17 @@ const oe = (i, e, t = "$children") => {
6491
6435
  Array.isArray(e.packages) && e.packages.forEach((a) => {
6492
6436
  this.setFormValue({
6493
6437
  key: "articles",
6494
- value: m(this._document, "_doc.articles", []).filter(({ packageId: n }) => n !== a.packageId)
6438
+ value: u(this._document, "_doc.articles", []).filter(({ packageId: n }) => n !== a.packageId)
6495
6439
  });
6496
6440
  });
6497
- const t = Object.assign({}, m(this._document, "_doc.data.packageGroups"));
6498
- 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");
6441
+ const t = Object.assign({}, u(this._document, "_doc.data.packageGroups"));
6442
+ delete t[i], this.setFormValue({ key: "data.packageGroups", value: t }), Object.keys(u(this._document, "_doc.data.packageGroups", {})).length || this.removeFormValue("template.validationSchema.properties.data.properties.packageGroups");
6499
6443
  },
6500
6444
  onBlockListChange(i, { removedIndex: e, addedIndex: t, payload: a }) {
6501
6445
  if (e !== null && t !== null) {
6502
6446
  if (e === t)
6503
6447
  return;
6504
- const n = Ee(this.nestedReadLayout, e, t);
6448
+ const n = Oe(this.nestedReadLayout, e, t);
6505
6449
  this.setFormValue({
6506
6450
  key: "template.views.read.nodes",
6507
6451
  value: D(n)
@@ -6516,20 +6460,20 @@ const oe = (i, e, t = "$children") => {
6516
6460
  readView: r,
6517
6461
  validation: p,
6518
6462
  data: C,
6519
- onAddFnName: V = "onAdd"
6463
+ onAddFnName: T = "onAdd"
6520
6464
  } = s({ sectionKey: n, document: this._document, contentData: l });
6521
6465
  o({ validation: p, data: C });
6522
- const le = ze({ tree: r }), re = [
6466
+ const ce = Re({ tree: r }), de = [
6523
6467
  ...this.nestedReadLayout.slice(0, t),
6524
- ...le,
6468
+ ...ce,
6525
6469
  ...this.nestedReadLayout.slice(t)
6526
6470
  ];
6527
6471
  this.setFormValue({
6528
6472
  key: "template.views.read.nodes",
6529
- value: D(re)
6473
+ value: D(de)
6530
6474
  });
6531
- const [{ nodeId: ce }] = r;
6532
- this.onAddRedis[ce] = V;
6475
+ const [{ nodeId: pe }] = r;
6476
+ this.onAddRedis[pe] = T;
6533
6477
  }
6534
6478
  },
6535
6479
  shouldAnimateDrop(i) {
@@ -6537,7 +6481,7 @@ const oe = (i, e, t = "$children") => {
6537
6481
  }
6538
6482
  }
6539
6483
  };
6540
- var xn = function() {
6484
+ var fn = function() {
6541
6485
  var e = this, t = e._self._c;
6542
6486
  return t("div", { staticStyle: { overflow: "auto", height: "100vh" } }, [t("div", { staticClass: "flex container-root font-inter", class: {
6543
6487
  "is-edit-view": e.isEditView,
@@ -6552,9 +6496,9 @@ var xn = function() {
6552
6496
  marginLeft: `${e.sidebarWidth}px`
6553
6497
  } }, [t("DocumentFormNav", { style: {
6554
6498
  marginLeft: e.drawerState.showLeft ? `${e.sidebarWidth}px` : 0
6555
- }, 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) {
6499
+ }, 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("div", { staticClass: "relative" }, [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) {
6556
6500
  return a.stopPropagation(), e.drawerState.toggleLeft.apply(null, arguments);
6557
- } } }), 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) {
6501
+ } } }), t("transition", { attrs: { name: "fade-bounce", appear: "" } }, [!e.nestedReadLayout.length && e.isFixedSidebar ? t("div", { staticClass: "absolute w-64 p-3 text-base font-semibold leading-snug text-white translate-y-2 rounded-lg shadow-lg bg-primary-500 -left-3/4 top-full" }, [e._v(" " + e._s(e.$t("emptyBlockPlaceholderSmall")) + " "), t("svg", { staticClass: "absolute top-0 -translate-y-full text-primary-500 left-10", 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()])], 1), 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) {
6558
6502
  return e.$emit("update:view", a);
6559
6503
  } } }), !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) {
6560
6504
  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 && {
@@ -6573,7 +6517,7 @@ var xn = function() {
6573
6517
  "is-empty": !e.nestedReadLayout.length
6574
6518
  },
6575
6519
  !e.isEditView && `is-device-${e.previewDevice}`
6576
- ] }, [!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) {
6520
+ ] }, [!e.nestedReadLayout.length && !e.isFixedSidebar ? t("div", { staticClass: "text-gray-400 drag-drop-empty-list is-placeholder" }, [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) {
6577
6521
  e.parentSize.width = a;
6578
6522
  } }, scopedSlots: e._u([{ key: "default", fn: function({ width: a, height: n }) {
6579
6523
  var s, o;
@@ -6597,39 +6541,39 @@ var xn = function() {
6597
6541
  return e.onBlockMove(p, r);
6598
6542
  }, "toggle-visible": function(p) {
6599
6543
  return e.onBlockToggleVisible(l, p);
6600
- } } }, [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: V }) => e.setFormValue({ key: p, value: C, options: V }), "on-remove": ({ key: p }) => e.removeFormValue(p), "on-mount": (p) => e.onAddBlockMount(l.nodeId, p) } })], 1)], 1);
6601
- }), 1) : e._e(), t("IsPremium", { scopedSlots: e._u([{ key: "default", fn: function({ isProLike: l }) {
6544
+ } } }, [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: T }) => e.setFormValue({ key: p, value: C, options: T }), "on-remove": ({ key: p }) => e.removeFormValue(p), "on-mount": (p) => e.onAddBlockMount(l.nodeId, p) } })], 1)], 1);
6545
+ }), 1) : e._e(), e.canShowBanner ? t("IsPremium", { scopedSlots: e._u([{ key: "default", fn: function({ isProLike: l }) {
6602
6546
  return [!e.isEditView && !l ? t("LogoBanner", { attrs: { position: "sticky" } }) : e._e()];
6603
- } }], null, !0) })], 1);
6547
+ } }], null, !0) }) : e._e()], 1);
6604
6548
  } }]) })], 1)], 1)], 1), t("DocumentDrawer", { key: "settingsDrawer", attrs: { id: "settingsDrawer", open: e.drawerState.showRight, fixed: !0, position: "right" }, on: { "update:open": function(a) {
6605
6549
  return e.$set(e.drawerState, "showRight", a);
6606
6550
  } } }, [t("portal-target", { attrs: { name: "drawer-content" } })], 1)], 1)]);
6607
- }, wn = [function() {
6551
+ }, gn = [function() {
6608
6552
  var i = this, e = i._self._c;
6609
6553
  return e("div", { staticClass: "drag-drop-illustration-block" }, [e("div"), e("div")]);
6610
- }], _n = /* @__PURE__ */ c(
6611
- yn,
6612
- xn,
6613
- wn,
6554
+ }], Cn = /* @__PURE__ */ c(
6555
+ hn,
6556
+ fn,
6557
+ gn,
6614
6558
  !1,
6615
6559
  null,
6616
- "1592c6b7",
6560
+ "e54004e2",
6617
6561
  null,
6618
6562
  null
6619
6563
  );
6620
- const bn = _n.exports, T = S.observable({
6564
+ const vn = Cn.exports, V = k.observable({
6621
6565
  canEdit: !1,
6622
6566
  isForm: !0,
6623
6567
  setFormValue: null
6624
- }), kn = {
6568
+ }), yn = {
6625
6569
  name: "DocumentForm",
6626
6570
  components: {
6627
- DocumentFormContainer: bn,
6628
- IsPremium: Y,
6629
- IsPremiumPreStep: K,
6571
+ DocumentFormContainer: vn,
6572
+ IsPremium: Q,
6573
+ IsPremiumPreStep: I,
6630
6574
  DocumentSend: zi
6631
6575
  },
6632
- mixins: [a1({ currentElement: null }), n1],
6576
+ mixins: [ot({ currentElement: null }), lt],
6633
6577
  props: {
6634
6578
  document: {
6635
6579
  type: Object,
@@ -6670,9 +6614,13 @@ const bn = _n.exports, T = S.observable({
6670
6614
  goBack: {
6671
6615
  type: Function,
6672
6616
  default: null
6617
+ },
6618
+ canShowBanner: {
6619
+ type: Boolean,
6620
+ default: !0
6673
6621
  }
6674
6622
  },
6675
- provide: () => ({ viewSettings: T }),
6623
+ provide: () => ({ viewSettings: V }),
6676
6624
  data() {
6677
6625
  return {
6678
6626
  view: "edit",
@@ -6683,13 +6631,13 @@ const bn = _n.exports, T = S.observable({
6683
6631
  canEdit: {
6684
6632
  immediate: !0,
6685
6633
  handler(i) {
6686
- T.canEdit = !!i;
6634
+ V.canEdit = !!i;
6687
6635
  }
6688
6636
  }
6689
6637
  },
6690
6638
  computed: {
6691
6639
  canDoActions() {
6692
- return !!m(this.document, "template.views.read.nodes", []).length;
6640
+ return !!u(this.document, "template.views.read.nodes", []).length;
6693
6641
  },
6694
6642
  canEdit() {
6695
6643
  const { document: i } = this;
@@ -6697,7 +6645,7 @@ const bn = _n.exports, T = S.observable({
6697
6645
  }
6698
6646
  },
6699
6647
  created() {
6700
- this.setFormValue && (T.setFormValue = this.setDocValue);
6648
+ this.setFormValue && (V.setFormValue = this.setDocValue);
6701
6649
  },
6702
6650
  methods: {
6703
6651
  isValid() {
@@ -6712,7 +6660,7 @@ const bn = _n.exports, T = S.observable({
6712
6660
  },
6713
6661
  async saveAsTemplate() {
6714
6662
  this.document && this.$modal.show(
6715
- ie,
6663
+ ae,
6716
6664
  {
6717
6665
  document: this.document,
6718
6666
  onSaveTemplate: this.onSaveTemplate
@@ -6729,9 +6677,9 @@ const bn = _n.exports, T = S.observable({
6729
6677
  }
6730
6678
  }
6731
6679
  };
6732
- var Ln = function() {
6680
+ var xn = function() {
6733
6681
  var e = this, t = e._self._c;
6734
- 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) {
6682
+ 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, "can-show-banner": e.canShowBanner }, on: { "update:view": function(a) {
6735
6683
  e.view = a;
6736
6684
  } } }, [t("template", { slot: "nav-right" }, [t("IsPremium", { scopedSlots: e._u([{ key: "default", fn: function({ canCreateDocument: a }) {
6737
6685
  return [t("IsPremiumPreStep", { attrs: { feature: "documents" }, scopedSlots: e._u([{ key: "default", fn: function({ onClick: n }) {
@@ -6751,18 +6699,18 @@ var Ln = function() {
6751
6699
  reminders: "data.reminders",
6752
6700
  name: "data.name"
6753
6701
  }, "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();
6754
- }, $n = [], Sn = /* @__PURE__ */ c(
6755
- kn,
6756
- Ln,
6757
- $n,
6702
+ }, wn = [], bn = /* @__PURE__ */ c(
6703
+ yn,
6704
+ xn,
6705
+ wn,
6758
6706
  !1,
6759
6707
  null,
6760
6708
  null,
6761
6709
  null,
6762
6710
  null
6763
6711
  );
6764
- const Vn = Sn.exports;
6765
- const Dn = {
6712
+ const _n = bn.exports;
6713
+ const kn = {
6766
6714
  name: "ClientLinks",
6767
6715
  props: {
6768
6716
  id: {
@@ -6813,36 +6761,36 @@ const Dn = {
6813
6761
  this.loadDocument({ id: this.id });
6814
6762
  },
6815
6763
  methods: {
6816
- ...x({
6817
- loadDocument: u.LOAD_DOCUMENT2
6764
+ ...y({
6765
+ loadDocument: m.LOAD_DOCUMENT2
6818
6766
  }),
6819
6767
  copyToClipboard(i) {
6820
- i.target.previousElementSibling.select(), document.execCommand("copy", !1), q("info", this.$t("copied"));
6768
+ i.target.previousElementSibling.select(), document.execCommand("copy", !1), j("info", this.$t("copied"));
6821
6769
  }
6822
6770
  }
6823
6771
  };
6824
- var Tn = function() {
6772
+ var Ln = function() {
6825
6773
  var e = this, t = e._self._c;
6826
6774
  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) {
6827
6775
  return e.$emit("close");
6828
6776
  } } }), 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) {
6829
6777
  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)])]);
6830
6778
  }) : 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)]);
6831
- }, Mn = [], Bn = /* @__PURE__ */ c(
6832
- Dn,
6833
- Tn,
6834
- Mn,
6779
+ }, $n = [], Sn = /* @__PURE__ */ c(
6780
+ kn,
6781
+ Ln,
6782
+ $n,
6835
6783
  !1,
6836
6784
  null,
6837
6785
  "791a9a8f",
6838
6786
  null,
6839
6787
  null
6840
6788
  );
6841
- const In = Bn.exports, Fn = In, Hn = ({ id: i }) => {
6842
- if (!S.prototype.$modal)
6789
+ const Tn = Sn.exports, Dn = Tn, Vn = ({ id: i }) => {
6790
+ if (!k.prototype.$modal)
6843
6791
  throw Error("Open client modal requires plugin vue-js-modal");
6844
- S.prototype.$modal.show(
6845
- Fn,
6792
+ k.prototype.$modal.show(
6793
+ Dn,
6846
6794
  {
6847
6795
  id: i
6848
6796
  },
@@ -6855,9 +6803,9 @@ const In = Bn.exports, Fn = In, Hn = ({ id: i }) => {
6855
6803
  }
6856
6804
  );
6857
6805
  };
6858
- const An = {
6806
+ const Bn = {
6859
6807
  name: "PostDocumentSend",
6860
- mixins: [b],
6808
+ mixins: [L],
6861
6809
  i18nOptions: {
6862
6810
  namespaces: "PostDocumentSend",
6863
6811
  messages: {
@@ -6892,7 +6840,7 @@ const An = {
6892
6840
  return this.mq === "sm" ? "100%" : "auto";
6893
6841
  },
6894
6842
  usesManualDelivery() {
6895
- const i = F(this.document);
6843
+ const i = H(this.document);
6896
6844
  return !i.sms && !i.email;
6897
6845
  }
6898
6846
  },
@@ -6901,18 +6849,18 @@ const An = {
6901
6849
  (i = this.document) != null && i.senderClient ? await this.senderAnswer() : await this.onSend();
6902
6850
  },
6903
6851
  methods: {
6904
- ...x({
6905
- updateDocument: u.DO_UPDATE_DOCUMENT2,
6906
- answerDocument: u.ANSWER_OWN_DOCUMENT2,
6907
- sendDocument: u.DO_SEND_DOCUMENT2
6852
+ ...y({
6853
+ updateDocument: m.DO_UPDATE_DOCUMENT2,
6854
+ answerDocument: m.ANSWER_OWN_DOCUMENT2,
6855
+ sendDocument: m.DO_SEND_DOCUMENT2
6908
6856
  }),
6909
6857
  async handleDocumentLinks() {
6910
- const { id: i } = this.document, e = F(this.document), t = !e.sms && !e.email;
6858
+ const { id: i } = this.document, e = H(this.document), t = !e.sms && !e.email;
6911
6859
  t && (await this.updateDocument({
6912
6860
  id: i,
6913
6861
  body: { status: "sent" },
6914
6862
  showMessage: !1
6915
- }), Hn({ id: i })), t || setTimeout(() => this.close(), 2e3);
6863
+ }), Vn({ id: i })), t || setTimeout(() => this.close(), 2e3);
6916
6864
  },
6917
6865
  async onSend() {
6918
6866
  typeof this.onSendFunc == "function" && this.onSendFunc(this.document), await this.handleDocumentLinks();
@@ -6931,7 +6879,7 @@ const An = {
6931
6879
  body: { isAccepted: !0 },
6932
6880
  checksum: a
6933
6881
  }), await this.sendDocument({ id: i }), this.onSend()) : (this.$modal.show(
6934
- f1,
6882
+ mt,
6935
6883
  {
6936
6884
  _document: this.document,
6937
6885
  fullScreen: this.modalHeight === "100%",
@@ -6975,23 +6923,24 @@ const An = {
6975
6923
  }
6976
6924
  }
6977
6925
  };
6978
- var Pn = function() {
6926
+ var Mn = function() {
6979
6927
  var e = this, t = e._self._c;
6980
6928
  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)]);
6981
- }, En = [], zn = /* @__PURE__ */ c(
6982
- An,
6983
- Pn,
6984
- En,
6929
+ }, In = [], Fn = /* @__PURE__ */ c(
6930
+ Bn,
6931
+ Mn,
6932
+ In,
6985
6933
  !1,
6986
6934
  null,
6987
6935
  "1f679c67",
6988
6936
  null,
6989
6937
  null
6990
6938
  );
6991
- const Zn = zn.exports;
6992
- S.use(i1);
6993
- const On = {
6939
+ const Hn = Fn.exports;
6940
+ k.use(st);
6941
+ const An = {
6994
6942
  name: "DocForm",
6943
+ mixins: [Ge(["closeFunc", "beforeSave", "beforeSend"])],
6995
6944
  i18nOptions: {
6996
6945
  namespaces: "widgetDocForm",
6997
6946
  messages: {
@@ -7005,8 +6954,8 @@ const On = {
7005
6954
  },
7006
6955
  components: {
7007
6956
  TemplateSelector: x2,
7008
- DocumentEditor: Vn,
7009
- PostSend: Zn
6957
+ DocumentForm: _n,
6958
+ PostSend: Hn
7010
6959
  },
7011
6960
  props: {
7012
6961
  isNew: {
@@ -7027,7 +6976,7 @@ const On = {
7027
6976
  };
7028
6977
  },
7029
6978
  computed: {
7030
- ...Ze({
6979
+ ...Ue({
7031
6980
  company: "application/company",
7032
6981
  feature: "application/feature",
7033
6982
  can: "application/can",
@@ -7056,19 +7005,19 @@ const On = {
7056
7005
  (!this.rawDoc || (i = this.rawDoc) != null && i.__isNew) && (this.view = "templateSelect");
7057
7006
  },
7058
7007
  methods: {
7059
- ...Oe({
7060
- setFormValue: u.SET_FORM_VALUE,
7061
- removeFormValue: u.REMOVE_FORM_VALUE,
7062
- removeFormKeyValue: u.REMOVE_FORM_KEY_VALUE,
7063
- loadDocumentForm: u.LOAD_DOCUMENT2_FORM,
7064
- duplicateDocumentForm: u.LOAD_DUPLICATE_DOCUMENT2_FORM,
7065
- saveDocument: u.SAVE_DYNDOC_FORM,
7066
- loadCompanyUser: u.LOAD_COMPANY_USER
7008
+ ...We({
7009
+ setFormValue: m.SET_FORM_VALUE,
7010
+ removeFormValue: m.REMOVE_FORM_VALUE,
7011
+ removeFormKeyValue: m.REMOVE_FORM_KEY_VALUE,
7012
+ loadDocumentForm: m.LOAD_DOCUMENT2_FORM,
7013
+ duplicateDocumentForm: m.LOAD_DUPLICATE_DOCUMENT2_FORM,
7014
+ saveDocument: m.SAVE_DYNDOC_FORM,
7015
+ loadCompanyUser: m.LOAD_COMPANY_USER
7067
7016
  }),
7068
7017
  async initDoc() {
7069
7018
  if (!this.rawDoc)
7070
7019
  throw new Error("Missing initiated form document");
7071
- this.document = new W({
7020
+ this.document = new N({
7072
7021
  data: this.rawDoc,
7073
7022
  can: this.can,
7074
7023
  getters: this.$store.getters,
@@ -7077,7 +7026,7 @@ const On = {
7077
7026
  },
7078
7027
  async onTemplateSelect({ templateId: i, documentId: e, formData: t }) {
7079
7028
  var n;
7080
- const a = Zt({ ...this.rawDoc }, [
7029
+ const a = E1({ ...this.rawDoc }, [
7081
7030
  "__tempId",
7082
7031
  "externalReferences",
7083
7032
  "clients",
@@ -7088,7 +7037,7 @@ const On = {
7088
7037
  _formData: a
7089
7038
  }) : await this.loadDocumentForm({
7090
7039
  templateId: i,
7091
- formData: t ? Re(t, a) : null,
7040
+ formData: t ? qe(t, a) : null,
7092
7041
  _formData: a
7093
7042
  }), (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";
7094
7043
  },
@@ -7102,31 +7051,37 @@ const On = {
7102
7051
  return this.removeFormKeyValue(`document2.${i}`);
7103
7052
  },
7104
7053
  async onSaveDocument({ doSend: i = !1 } = {}) {
7054
+ typeof this.beforeSave == "function" && await this.beforeSave(), i && typeof this.beforeSend == "function" && await this.beforeSend();
7105
7055
  const e = await this.saveDocument({ doSend: i }), t = this.docById(e);
7106
7056
  i && (t != null && t.senderClient) ? (this.document = t, this.view = "postSend") : this.close();
7107
7057
  },
7108
7058
  close() {
7109
- Ge.open = !1;
7059
+ if (this.closeFunc)
7060
+ this.closeFunc();
7061
+ else
7062
+ throw new Error(
7063
+ "[DocForm] closeFunc is missing from route params. Make sure to set it from ui"
7064
+ );
7110
7065
  },
7111
7066
  goBack() {
7112
7067
  this.view = "templateSelect", this.setDocValue({ key: "__isNew", value: !0 });
7113
7068
  }
7114
7069
  }
7115
7070
  };
7116
- var Rn = function() {
7071
+ var Pn = function() {
7117
7072
  var e = this, t = e._self._c;
7118
- 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);
7119
- }, Gn = [], Un = /* @__PURE__ */ c(
7120
- On,
7121
- Rn,
7122
- Gn,
7073
+ return t("div", { staticClass: "flex flex-col w-full h-full" }, [e.view === "templateSelect" ? t("div", { staticClass: "flex flex-col w-full h-full" }, [t("div", { staticClass: "relative flex items-center justify-center h-16 border-b border-gray-200" }, [t("CButton", { staticClass: "absolute -translate-y-1/2 top-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: "min-h-0 body-scroll", attrs: { "on-use-template": e.onTemplateSelect, "show-gallery": e.feature("templateGallery"), "show-gallery-template-author": !1, "include-partner-templates": "" } })], 1) : e.view === "editor" ? t("DocumentForm", { 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, "can-show-banner": !1 } }) : t("PostSend", { attrs: { document: e.document, "on-send-func": e.close, "on-close-func": e.close } })], 1);
7074
+ }, En = [], zn = /* @__PURE__ */ c(
7075
+ An,
7076
+ Pn,
7077
+ En,
7123
7078
  !1,
7124
7079
  null,
7125
7080
  null,
7126
7081
  null,
7127
7082
  null
7128
7083
  );
7129
- const As = Un.exports;
7084
+ const ys = zn.exports;
7130
7085
  export {
7131
- As as default
7086
+ ys as default
7132
7087
  };